@sjawhar/opencode-legion-envoy 6.4.1 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  OpenCode plugin for Legion's Envoy subsystem.
4
4
 
5
- This package exposes:
5
+ This package exposes the Envoy tools:
6
6
 
7
7
  - `envoy_subscribe`
8
8
  - `envoy_unsubscribe`
@@ -12,42 +12,19 @@ This package exposes:
12
12
  - `envoy_role_set`
13
13
  - `envoy_whoami`
14
14
  - `envoy_sessions`
15
- - `dispatch_issue`
16
- - `dispatch_issue_update`
17
- - `dispatch_claim`
18
- - `dispatch_ask`
19
- - `dispatch_edit_ask`
20
- - `dispatch_resolve_ask`
21
- - `dispatch_resolve_comment`
22
- - `dispatch_follow`
23
- - `dispatch_comment`
24
- - `dispatch_suggest`
25
- - `dispatch_message`
26
- - `dispatch_doc_edit`
27
- - `dispatch_doc_read`
28
- - `dispatch_request_approval`
29
- - `dispatch_artifact`
30
- - `dispatch_read`
31
- - `dispatch_search`
32
- - `dispatch_issues`
33
- - `dispatch_architecture_sync`
34
- - `dispatch_open_asks`
35
- - `dispatch_whoami`
36
15
 
37
- The twenty-one native `dispatch_*` tools create and read Dispatch issues, asks, comments,
38
- documents, and artifacts, list a project's issues, sync a project's architecture model, or search all of them. They are present when `dispatch.enabled`
39
- resolves a server URL and bearer token from envoy.json (`~/.config/opencode/envoy.json`, merged
40
- with `<repo>/.opencode/envoy.json`) or the `DISPATCH_URL` and `DISPATCH_TOKEN` environment
41
- variables; `dispatch.enabled: true` without `dispatch.serverUrl` targets `http://localhost:8766`.
42
- Each issue-scoped call fills the target issue from the session working directory and stamps it with
43
- the OpenCode session id and title. No write subscribes the session to an issue or document: a
44
- session follows the asks it opens or replies to (their answers and replies reach it directly),
45
- `dispatch_follow` leaves or rejoins one, and every write result names the `envoy_subscribe` line
46
- for the whole owner.
47
-
48
- `dispatch_artifact` accepts exactly one upload source: a local `path`, or inline `content`.
49
- An architect can post a specification directly with
50
- `{ issue, name: "spec.md", content: "# Design" }`.
16
+ Agents reach Dispatch through the `dispatch` command in their shell: `dispatch --help` lists the
17
+ commands, `dispatch <command> --help` each one's flags, and the `dispatch` skill teaches them. The
18
+ plugin's `shell.env` hook puts its `bin/` (the `dispatch` shim, which runs the bundled
19
+ `dist/dispatch.js`) first on every shell command's `PATH`, sets `DISPATCH_HOST=opencode`, and sets
20
+ `DISPATCH_SESSION_ID` and `DISPATCH_SESSION_TITLE` to the session running the command and the
21
+ title the plugin tracks for it (each empty when OpenCode names no session or the session has no
22
+ title yet, so a value inherited from a parent process never stands in). Dispatch is reachable when
23
+ `dispatch.enabled` resolves a server URL and bearer token from envoy.json
24
+ (`~/.config/opencode/envoy.json`, merged with `<repo>/.opencode/envoy.json`) or the `DISPATCH_URL`
25
+ and `DISPATCH_TOKEN` environment variables; `dispatch.enabled: true` without `dispatch.serverUrl`
26
+ targets `http://localhost:8766`. With Dispatch configured, every session also carries the
27
+ `dispatch-first` skill as an instruction file.
51
28
 
52
29
  It also maintains the live session registry metadata needed for Envoy to discover OpenCode sessions and their API ports.
53
30
 
package/bin/dispatch ADDED
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+ # The dispatch CLI, bundled into this plugin's dist/ by its build.
3
+ here=$(cd "$(dirname "$0")" && pwd)
4
+ cli="$here/../dist/dispatch.js"
5
+ [ -f "$cli" ] || { echo "dispatch: $cli is missing; build the plugin (bun run build)" >&2; exit 2; }
6
+ exec bun "$cli" "$@"