@sjawhar/pi-legion-envoy 0.5.0 → 0.7.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 +21 -25
- package/dist/envoy.js +843 -41
- package/dist/skills/dispatch/SKILL.md +196 -45
- package/package.json +2 -3
- package/.mcp.json +0 -7
- package/dist/bin/dispatch-mcp-shim.js +0 -4208
package/README.md
CHANGED
|
@@ -64,29 +64,25 @@ OMP at extension files it does not contain.
|
|
|
64
64
|
|
|
65
65
|
## Dispatch
|
|
66
66
|
|
|
67
|
-
Every OMP session — Legion sessions included — gets
|
|
68
|
-
|
|
69
|
-
and it serves when `dispatch.enabled` is true in the shared envoy.json
|
|
67
|
+
Every OMP session — Legion sessions included — gets a native `dispatch` tool from this
|
|
68
|
+
extension when `dispatch.enabled` is true in the shared envoy.json
|
|
70
69
|
(`~/.config/opencode/envoy.json`, shallow-merged with `<cwd>/.opencode/envoy.json`) or
|
|
71
|
-
`DISPATCH_MCP_URL`
|
|
72
|
-
(default `http://localhost:8766`). Dispatch is how any agent — an
|
|
73
|
-
a headless Legion role — raises a durable question to the human
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
The shim forwards newline-delimited JSON-RPC from stdin to the dispatch server's Streamable
|
|
91
|
-
HTTP `/mcp` endpoint with a cached GitHub bearer from the user's `gh` shim. The
|
|
92
|
-
bearer refreshes before expiry and retries once immediately after a 401 response.
|
|
70
|
+
`DISPATCH_MCP_URL` names a service endpoint explicitly. The service URL comes from
|
|
71
|
+
`dispatch.serverUrl` (default `http://localhost:8766`). Dispatch is how any agent — an
|
|
72
|
+
interactive session or a headless Legion role — raises a durable question to the human
|
|
73
|
+
and keeps the conversation on one GitHub issue: `subject` opens a thread, `thread: N`
|
|
74
|
+
continues one. Each call reads the session's id and title from OMP, resolves the cwd's
|
|
75
|
+
GitHub repo, mints a GitHub token with `gh auth token` in the session cwd, and makes one
|
|
76
|
+
stateless request to the dispatch service, which writes the issue or comment. The
|
|
77
|
+
`dispatch` skill (shipped in `skills/`) says when and how to ask. Replies route back to the
|
|
78
|
+
asking session, which is auto-subscribed to the thread's GitHub topic on every successful
|
|
79
|
+
call; a Legion role's session survives kill/resume because Legion resurrection resumes the
|
|
80
|
+
same OMP session file. Lifecycle and scope decisions still go through `hub` to the owning
|
|
81
|
+
architect — Dispatch is for durable questions to the human, not for coordination between roles.
|
|
82
|
+
|
|
83
|
+
The tool's model-facing schema is the shared contract's zod shape
|
|
84
|
+
(`@legion/envoy-client/dispatch-contract`) serialised to JSON Schema, so OMP shows the model
|
|
85
|
+
the same arguments and descriptions as every other host.
|
|
86
|
+
|
|
87
|
+
An invalid envoy.json disables the tool and the session is told why on start; a machine
|
|
88
|
+
without dispatch configured has no `dispatch` tool at all.
|