@sjawhar/opencode-legion-envoy
v1.38.0
Published
OpenCode plugin for Legion's Envoy subsystem.
Readme
@sjawhar/opencode-legion-envoy
OpenCode plugin for Legion's Envoy subsystem.
This package exposes:
envoy_subscribeenvoy_unsubscribeenvoy_listenvoy_sendenvoy_publishenvoy_role_setenvoy_whoamienvoy_sessionsdispatch_issuedispatch_issue_updatedispatch_askdispatch_edit_askdispatch_resolve_askdispatch_resolve_commentdispatch_followdispatch_commentdispatch_suggestdispatch_messagedispatch_doc_editdispatch_doc_readdispatch_request_approvaldispatch_artifactdispatch_readdispatch_searchdispatch_issuesdispatch_architecture_syncdispatch_open_asksdispatch_whoami
The twenty native dispatch_* tools create and read Dispatch issues, asks, comments,
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
resolves a server URL and bearer token from envoy.json (~/.config/opencode/envoy.json, merged
with <repo>/.opencode/envoy.json) or the DISPATCH_URL and DISPATCH_TOKEN environment
variables; dispatch.enabled: true without dispatch.serverUrl targets http://localhost:8766.
Each issue-scoped call fills the target issue from the session working directory and stamps it with
the OpenCode session id and title. No write subscribes the session to an issue or document: a
session follows the asks it opens or replies to (their answers and replies reach it directly),
dispatch_follow leaves or rejoins one, and every write result names the envoy_subscribe line
for the whole owner.
dispatch_artifact accepts exactly one upload source: a local path, or inline content.
An architect can post a specification directly with
{ issue, name: "spec.md", content: "# Design" }.
It also maintains the live session registry metadata needed for Envoy to discover OpenCode sessions and their API ports.
Slack topic examples must use the real Slack team_id, for example:
notifications.slack.T01234567.C0A0DHVU8HE.mention
Do not use workspace slugs like acme in the topic path.
Sync to another machine
# From the repo root:
./packages/envoy-plugin/scripts/sync-host.sh sami@sami
# Or via the combined envoy sync:
./scripts/sync-envoy-host.sh sami@samiThe sync script downloads the latest envoy-plugin release tarball from GitHub,
extracts it to ~/legion/default/packages/envoy-plugin/ on the remote host, and
updates the remote's opencode.json to use a file:// reference instead of the
npm package. Requires gh CLI on the machine running the script.
