Files
tty7/crates
l0ng-ai 9c1961de39 fix(agent-hooks): make the OpenCode plugin load on OpenCode 2.x (#999) (#1007)
OpenCode 2.x only loads a default export shaped { id, setup | effect } and
rejects the file otherwise ("Plugin must export a default definition with
an id and an effect or setup function"). The generated tty7.js only had a
named export, so every 2.x user got a load error.

- Export default { id, server, setup }: 1.x (>= 1.3.4) reads `server`,
  2.x reads `setup`; the named Tty7Presence export stays for older 1.x.
- 2.x: subscribe via ctx.event.subscribe(), read event.data, map
  permission.asked, and treat session.created with a parentID as a child
  session. Stay inert inside the shared --service process, whose sessions
  belong to no single pane.
- Spawn the emitter directly with node:child_process instead of
  `sh -c`, which does not exist on Windows.
2026-09-28 23:15:31 +08:00
..