@sjawhar/pi-legion-envoy 0.2.0 → 0.4.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/.mcp.json +7 -0
- package/README.md +20 -25
- package/dist/bin/dispatch-mcp-shim.js +13899 -0
- package/dist/envoy.js +51 -15
- package/dist/skills/AGENTS.md +4 -3
- package/dist/skills/legion-architect/SKILL.md +7 -5
- package/dist/skills/legion-controller/SKILL.md +3 -3
- package/dist/skills/legion-worker/SKILL.md +7 -5
- package/package.json +3 -2
package/.mcp.json
ADDED
package/README.md
CHANGED
|
@@ -64,31 +64,26 @@ OMP at extension files it does not contain.
|
|
|
64
64
|
|
|
65
65
|
## Dispatch
|
|
66
66
|
|
|
67
|
-
Legion sessions
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
"args": ["<checkout>/packages/envoy-client/bin/dispatch-mcp-shim.ts"]
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
```
|
|
67
|
+
Every OMP session — Legion sessions included — gets the `dispatch` MCP tool the way
|
|
68
|
+
OpenCode sessions do: the shared `@legion/envoy-client` shim mounts as a stdio MCP server,
|
|
69
|
+
and it serves when `dispatch.enabled` is true in the shared envoy.json
|
|
70
|
+
(`~/.config/opencode/envoy.json`, shallow-merged with `<cwd>/.opencode/envoy.json`) or
|
|
71
|
+
`DISPATCH_MCP_URL` is set explicitly. The server URL comes from `dispatch.serverUrl`
|
|
72
|
+
(default `http://localhost:8766`). Dispatch exists so headless unattended agents —
|
|
73
|
+
Legion architects, planners, phase workers — can raise durable questions to the human.
|
|
74
|
+
Replies route back to the asking session, which is auto-subscribed to the thread's
|
|
75
|
+
GitHub topic; a Legion role's session survives kill/resume because Legion resurrection
|
|
76
|
+
resumes the same OMP session file, so the reply still lands. Lifecycle and scope
|
|
77
|
+
decisions still go through `hub` to the owning architect — Dispatch is for durable
|
|
78
|
+
questions to the human, not for coordination between roles.
|
|
79
|
+
|
|
80
|
+
No manual mount is needed: the package-root `.mcp.json` ships the server with the
|
|
81
|
+
package, so any session that loads it (installed plugin, `--extension`, the Legion
|
|
82
|
+
daemon's repo checkout) discovers `dispatch` automatically. The committed manifest
|
|
83
|
+
runs `./bin/dispatch-mcp-shim.ts` from source; the release workflow points the
|
|
84
|
+
published tarball at the self-contained `./dist/bin/dispatch-mcp-shim.js`. A
|
|
85
|
+
same-named `dispatch` entry in `~/.omp/agent/mcp.json` would override the package
|
|
86
|
+
mount — remove machine-local entries rather than maintaining both.
|
|
92
87
|
|
|
93
88
|
The shim forwards newline-delimited JSON-RPC from stdin to the dispatch server's Streamable
|
|
94
89
|
HTTP `/mcp` endpoint with a cached GitHub bearer from the user's `gh` shim. The
|