@sjawhar/pi-envoy 8.4.0 → 8.6.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 +38 -31
- package/bin/dispatch +6 -0
- package/dist/dispatch.js +18648 -0
- package/dist/envoy.js +580 -2656
- package/dist/skills/dispatch/SKILL.md +85 -97
- package/dist/skills/dispatch/references/api.md +4 -4
- package/dist/skills/dispatch/references/asks.md +34 -54
- package/dist/skills/dispatch/references/document-edits.md +24 -21
- package/dist/skills/dispatch/references/documents.md +75 -72
- package/dist/skills/dispatch/references/examples.md +37 -67
- package/dist/skills/dispatch/references/issues.md +48 -48
- package/dist/skills/dispatch/references/messages.md +18 -25
- package/dist/skills/dispatch/references/reading.md +10 -10
- package/dist/skills/dispatch-brainstorming/SKILL.md +19 -15
- package/dist/skills/dispatch-first/SKILL.md +7 -7
- package/dist/skills/envoy/SKILL.md +3 -2
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pi Envoy Extension
|
|
2
2
|
|
|
3
|
-
`@sjawhar/pi-envoy` is the Oh My Pi extension for Envoy messaging and the
|
|
3
|
+
`@sjawhar/pi-envoy` is the Oh My Pi extension for Envoy messaging and the `dispatch` command,
|
|
4
4
|
the plugin every session loads. It shares the Envoy HTTP client, tool contract, envelope parsing,
|
|
5
5
|
and subject helpers with the other Legion adapters while keeping OMP's direct NATS subscriptions
|
|
6
6
|
and Pi steering delivery local (inbound messages steer an in-flight turn instead of queueing behind
|
|
@@ -100,12 +100,15 @@ performs that manifest rewrite around `bun pm pack` and restores the committed f
|
|
|
100
100
|
Packing with the committed source manifest is refused by the prepack, because such a tarball would
|
|
101
101
|
point OMP at an extension file it does not contain.
|
|
102
102
|
|
|
103
|
-
##
|
|
103
|
+
## The `dispatch` command
|
|
104
104
|
|
|
105
|
-
The extension registers
|
|
106
|
-
`
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
The extension registers no Dispatch tool. Agents reach Dispatch through the `dispatch` command in
|
|
106
|
+
their shell: `dispatch --help` lists its commands, `dispatch <command> --help` each one's flags and
|
|
107
|
+
an example, and the `dispatch` skill teaches when to use each. The package ships `bin/dispatch`, a
|
|
108
|
+
shim that runs the bundled `dist/dispatch.js` (built from `@legion/envoy-client`'s
|
|
109
|
+
`bin/dispatch.ts`) with `bun`. At load the extension puts that `bin/` first on `PATH` and sets
|
|
110
|
+
`DISPATCH_HOST=omp`; each session start, switch and branch sets `DISPATCH_SESSION_ID` to the
|
|
111
|
+
session's id, so a command acts as the session whose shell ran it.
|
|
109
112
|
|
|
110
113
|
Configure the shared `envoy.json` with:
|
|
111
114
|
|
|
@@ -129,31 +132,35 @@ whose trimmed contents are the token — how the Legion daemon delivers it to a
|
|
|
129
132
|
pane) wins over every other token source and never falls back when unreadable.
|
|
130
133
|
Omitting `dispatch.serverUrl` while `dispatch.enabled` is true targets
|
|
131
134
|
`http://localhost:8766`, the Go server's listen address. Invalid configuration,
|
|
132
|
-
an invalid URL, or an empty token
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
an unlinked project document (
|
|
137
|
-
|
|
138
|
-
repository. `
|
|
139
|
-
including `dispatch://PROJECT/artifact/<slug>`.
|
|
140
|
-
`
|
|
141
|
-
ask with
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
`notifications.dispatch.
|
|
148
|
-
`
|
|
149
|
-
|
|
150
|
-
The shared
|
|
151
|
-
`dispatch`
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
135
|
+
an invalid URL, or an empty token makes every `dispatch` command exit 2 naming the source of the
|
|
136
|
+
error, and the extension reports it when the session starts.
|
|
137
|
+
|
|
138
|
+
A command that writes to an owner names either an issue (`--issue`, a native `KEY` or an external
|
|
139
|
+
`owner/repo#n` reference) or an unlinked project document (`--project` plus `--artifact`). A Legion
|
|
140
|
+
session may omit `--issue`: `LEGION_ISSUE` names its issue, and a bare issue number there is read
|
|
141
|
+
against the GitHub repository of the working directory. `dispatch doc-read` and `dispatch read`
|
|
142
|
+
also accept `--ref` with a `dispatch://` reference, including `dispatch://PROJECT/artifact/<slug>`.
|
|
143
|
+
`dispatch search` needs only `--query`. `dispatch edit-ask`, `dispatch resolve-ask`, and
|
|
144
|
+
`dispatch follow` instead identify an existing ask with `--ask`, and `dispatch resolve-comment` a
|
|
145
|
+
comment with `--comment`. No result carries a subscription topic: opening an ask, or replying to
|
|
146
|
+
one with `dispatch comment --reply-to-ask`, makes the session a follower of that ask (its answer
|
|
147
|
+
and replies reach the session directly, server-side), and the command prints
|
|
148
|
+
`Following ask <id> on <owner>: …` after its result the first time the session follows that ask.
|
|
149
|
+
Whole-issue or whole-document subscription is the model's own `envoy_subscribe` of the topic every
|
|
150
|
+
write result names (`notifications.dispatch.issue.<KEY>.>` or
|
|
151
|
+
`notifications.dispatch.document.<PROJECT>.<SLUG>.>`).
|
|
152
|
+
|
|
153
|
+
The shared specs in `@legion/contracts` supply each command's description and flags:
|
|
154
|
+
`@legion/envoy-client`'s `dispatch-command.ts` derives one command per spec and one flag per field.
|
|
155
|
+
|
|
156
|
+
`dispatch artifact` takes exactly one upload source: a local `--path`, or inline `--content`. For
|
|
157
|
+
example, an architect can post a specification directly, its text on stdin:
|
|
158
|
+
|
|
159
|
+
```sh
|
|
160
|
+
dispatch artifact --issue LEGION-1 --name spec.md --content-file - <<'EOF'
|
|
161
|
+
# Design
|
|
162
|
+
EOF
|
|
163
|
+
```
|
|
157
164
|
|
|
158
165
|
Lifecycle and scope decisions between Legion roles go through `envoy_publish` to the owning
|
|
159
166
|
architect's role topic; Dispatch is for durable questions to the human and the shared
|
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" "$@"
|