@sjawhar/claude-envoy 1.40.0 → 1.40.2
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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/dispatch.js +1 -1
- package/dist/envoy-channel.js +2 -2
- package/dist/session-hook.js +1 -1
- package/legion/skills/legion-architect/references/merge-notices.md +6 -0
- package/legion/skills/legion-controller/SKILL.md +4 -4
- package/legion/skills/legion-controller/references/backlog-stewardship.md +8 -8
- package/legion/skills/legion-worker/references/withheld-capability.md +2 -2
- package/package.json +1 -1
- package/skills/dispatch/SKILL.md +3 -2
- package/skills/dispatch-first/SKILL.md +1 -1
- package/skills/dispatch-writing-specs/SKILL.md +1 -1
package/.omp-plugin/plugin.json
CHANGED
package/dist/dispatch.js
CHANGED
|
@@ -15226,7 +15226,7 @@ function imagesArgument(z, owner) {
|
|
|
15226
15226
|
var ASK_URGENCIES = ["low", "med", "high", "blocking"];
|
|
15227
15227
|
var DISPATCH_BLOCK_UNITS = 32000;
|
|
15228
15228
|
var DISPATCH_ITEM_BLOCKS = 32768;
|
|
15229
|
-
var BODY_BLOCK_RULE = `Each block (a paragraph, list, quote, table or code block) holds at most ${DISPATCH_BLOCK_UNITS} ` + `characters and a body at most ${DISPATCH_ITEM_BLOCKS} blocks; Dispatch refuses a longer one and ` + "names it, and `dispatch limits` prints the bounds.";
|
|
15229
|
+
var BODY_BLOCK_RULE = `Each block (a paragraph, list, quote, table or code block) holds at most ${DISPATCH_BLOCK_UNITS} ` + `characters and a body at most ${DISPATCH_ITEM_BLOCKS} blocks; Dispatch refuses a longer one and ` + "names it, and `dispatch limits` prints the bounds. A body holding a decision block (`:::ask`) " + "is refused however short it is, since nobody can answer a question put in a comment or a " + "message: ask the question in the issue's own document, as a decision block there, or open an " + "ask with `dispatch ask`.";
|
|
15230
15230
|
var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
|
|
15231
15231
|
var DISPATCH_HANDOFF_BODY_MAX = 262144;
|
|
15232
15232
|
var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
|
package/dist/envoy-channel.js
CHANGED
|
@@ -36875,7 +36875,7 @@ function imagesArgument(z, owner) {
|
|
|
36875
36875
|
var ASK_URGENCIES = ["low", "med", "high", "blocking"];
|
|
36876
36876
|
var DISPATCH_BLOCK_UNITS = 32000;
|
|
36877
36877
|
var DISPATCH_ITEM_BLOCKS = 32768;
|
|
36878
|
-
var BODY_BLOCK_RULE = `Each block (a paragraph, list, quote, table or code block) holds at most ${DISPATCH_BLOCK_UNITS} ` + `characters and a body at most ${DISPATCH_ITEM_BLOCKS} blocks; Dispatch refuses a longer one and ` + "names it, and `dispatch limits` prints the bounds.";
|
|
36878
|
+
var BODY_BLOCK_RULE = `Each block (a paragraph, list, quote, table or code block) holds at most ${DISPATCH_BLOCK_UNITS} ` + `characters and a body at most ${DISPATCH_ITEM_BLOCKS} blocks; Dispatch refuses a longer one and ` + "names it, and `dispatch limits` prints the bounds. A body holding a decision block (`:::ask`) " + "is refused however short it is, since nobody can answer a question put in a comment or a " + "message: ask the question in the issue's own document, as a decision block there, or open an " + "ask with `dispatch ask`.";
|
|
36879
36879
|
var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
|
|
36880
36880
|
var DISPATCH_HANDOFF_BODY_MAX = 262144;
|
|
36881
36881
|
var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
|
|
@@ -55498,7 +55498,7 @@ var import_nats2 = __toESM(require_mod4(), 1);
|
|
|
55498
55498
|
|
|
55499
55499
|
// package.json
|
|
55500
55500
|
var name = "@sjawhar/claude-envoy";
|
|
55501
|
-
var version2 = "1.40.
|
|
55501
|
+
var version2 = "1.40.2";
|
|
55502
55502
|
var legion = {
|
|
55503
55503
|
daemonApiVersion: 68
|
|
55504
55504
|
};
|
package/dist/session-hook.js
CHANGED
|
@@ -14225,7 +14225,7 @@ function imagesArgument(z, owner) {
|
|
|
14225
14225
|
var ASK_URGENCIES = ["low", "med", "high", "blocking"];
|
|
14226
14226
|
var DISPATCH_BLOCK_UNITS = 32000;
|
|
14227
14227
|
var DISPATCH_ITEM_BLOCKS = 32768;
|
|
14228
|
-
var BODY_BLOCK_RULE = `Each block (a paragraph, list, quote, table or code block) holds at most ${DISPATCH_BLOCK_UNITS} ` + `characters and a body at most ${DISPATCH_ITEM_BLOCKS} blocks; Dispatch refuses a longer one and ` + "names it, and `dispatch limits` prints the bounds.";
|
|
14228
|
+
var BODY_BLOCK_RULE = `Each block (a paragraph, list, quote, table or code block) holds at most ${DISPATCH_BLOCK_UNITS} ` + `characters and a body at most ${DISPATCH_ITEM_BLOCKS} blocks; Dispatch refuses a longer one and ` + "names it, and `dispatch limits` prints the bounds. A body holding a decision block (`:::ask`) " + "is refused however short it is, since nobody can answer a question put in a comment or a " + "message: ask the question in the issue's own document, as a decision block there, or open an " + "ask with `dispatch ask`.";
|
|
14229
14229
|
var ASK_BOUND_RULE = "Dispatch bounds an ask's question and its options together, refuses a longer one and names " + "the bound, and `dispatch limits` prints it. An ask is short and asks one thing; its reasoning " + "goes in the document, not in the question.";
|
|
14230
14230
|
var DISPATCH_HANDOFF_BODY_MAX = 262144;
|
|
14231
14231
|
var HANDOFF_PHASE_PATTERN = /^[a-z][a-z0-9-]{0,31}$/;
|
|
@@ -81,6 +81,12 @@ carries them — `close_root` answers `CLOSE_REASON_TOO_LONG` and `handoff_compl
|
|
|
81
81
|
`READY_PACKET_TOO_LONG`, each naming the bound and how far over the text is — so this notice is a
|
|
82
82
|
refusal those checks did not predict.
|
|
83
83
|
|
|
84
|
+
Those two calls also answer `CLOSE_REASON_DECISION_BLOCK` and `READY_PACKET_DECISION_BLOCK` for a
|
|
85
|
+
text holding a decision block (`:::ask{…}`). Such a text is refused however short it is, because
|
|
86
|
+
a question put in a message is one nobody can answer where it stands. The question belongs in the
|
|
87
|
+
issue's own document, as a decision block there, or in an ask opened with `dispatch ask`; the
|
|
88
|
+
close reason or the packet then goes again with the decision stated.
|
|
89
|
+
|
|
84
90
|
On a status write the daemon writes the status all the same, retrying it on the row's backoff
|
|
85
91
|
until Dispatch takes it, so the status is set unless Dispatch refused the status itself — the
|
|
86
92
|
reason says which. With the status set, only the reason beside it is on no issue: the issue's
|
|
@@ -14,7 +14,7 @@ except a clear defect a role reports ([Issues handed to Legion](#issues-handed-t
|
|
|
14
14
|
|
|
15
15
|
- Handle no wake until the extension has registered this session with the daemon as the project's controller, at session startup or, in a controller an operator started, from its first command once Oh My Pi has started, because without that registration the daemon does not know you as its controller.
|
|
16
16
|
- Answer a person's direct message first, in the conversation. A plain user turn that is neither the start message nor a task sent with `legion claims deliver` is a person writing from Dispatch's Agents page.
|
|
17
|
-
- A direct Dispatch message that
|
|
17
|
+
- A direct Dispatch message that settles scope, priority or an owner is a directive: after you answer it, run the weekly-plan reconciliation (`skill://legion-controller/references/backlog-stewardship.md`), because the plan must record the rule.
|
|
18
18
|
- Handle one wake per turn, then end the turn. Never poll or wait for an event, because the daemon wakes you again (`tick` at least every `controller_wake_interval_seconds`).
|
|
19
19
|
- Before any side effect, read `read_state` and the Dispatch issue, because a wake can be stale or sent twice.
|
|
20
20
|
- Read a session's state from the Envoy registry, never from its absence from a list (`skill://envoy`). Start no replacement for an `unresponsive` session, take nothing from it, and never report it as gone, because it is working and keeps its claims.
|
|
@@ -98,7 +98,7 @@ Before you publish to more than one role topic, read whether a wave of wakes is
|
|
|
98
98
|
The daemon works only issues carrying the Dispatch label `legion` (any case). Work reaches Legion
|
|
99
99
|
by a person's decision: they set the label from the issue header, or ask you to (a direct
|
|
100
100
|
message, a Slack request that asks Legion to do the work, their answer to a finding ask, or a
|
|
101
|
-
|
|
101
|
+
directive the weekly plan records with its link). The one exception is a clear defect a role hands
|
|
102
102
|
you whose code no running tree owns: you file it with the label, because its fix is how to do work
|
|
103
103
|
a person already wants, and humans decide what, agents decide how (the operator's answer on one
|
|
104
104
|
such case: a clear defect is fixed, not asked about). A defect whose code a running
|
|
@@ -132,7 +132,7 @@ which branch to open the pull request against; nothing else carries that.
|
|
|
132
132
|
|
|
133
133
|
A free slot is no reason to take an issue: a labelled root in `todo` takes the next slot through
|
|
134
134
|
`admission.waiting` without you, and a parked issue (status `backlog` or `icebox`) means "do not
|
|
135
|
-
run now". Move an issue out of `backlog` or `icebox` only on a request or a plan
|
|
135
|
+
run now". Move an issue out of `backlog` or `icebox` only on a request or a plan directive that names
|
|
136
136
|
it, and cite that request. A slot is one issue the daemon has started, a root or a child, not one
|
|
137
137
|
tree: a tree of four started issues holds four slots. An issue takes its slot when the daemon
|
|
138
138
|
starts it and keeps it
|
|
@@ -156,7 +156,7 @@ move to `todo` you make is one of these:
|
|
|
156
156
|
gone, or because a person asks;
|
|
157
157
|
- a tree you parked for a hold (`Parked by Legion while it waits on:`), once a person's decision
|
|
158
158
|
gives it a next step (`skill://legion-controller/references/parked-decisions.md`);
|
|
159
|
-
- stopped-session work that a person's
|
|
159
|
+
- stopped-session work that a person's directive in the weekly plan moves to Legion.
|
|
160
160
|
|
|
161
161
|
## Findings, and the issues you file
|
|
162
162
|
|
|
@@ -13,7 +13,7 @@ reach you on `notifications.role.legion-<project>-controller`.
|
|
|
13
13
|
|
|
14
14
|
## Reconcile the weekly plan
|
|
15
15
|
|
|
16
|
-
Run this pass on the first turn of every UTC day and after every
|
|
16
|
+
Run this pass on the first turn of every UTC day and after every directive from a person:
|
|
17
17
|
|
|
18
18
|
1. Read the weekly-planning issue and select its newest `plan-week-*` artifact by its latest
|
|
19
19
|
`artifact.version` event. Read that artifact before changing any issue.
|
|
@@ -41,11 +41,11 @@ Run this pass on the first turn of every UTC day and after every ruling from a p
|
|
|
41
41
|
instead of keeping a change log in it, because the artifact states the current rule. A comment
|
|
42
42
|
or message does not update the one-owner map.
|
|
43
43
|
|
|
44
|
-
A
|
|
45
|
-
its scope or priority
|
|
46
|
-
row (or its
|
|
44
|
+
A directive from a person is a direct Dispatch message to this controller. Answer it first, carry out
|
|
45
|
+
its directive on scope or priority, then record the resulting current rule in the affected weekly-plan
|
|
46
|
+
row (or its directives section when it has no one line). Link the message when Dispatch gave it a
|
|
47
47
|
reference.
|
|
48
|
-
A
|
|
48
|
+
A directive triggers the full reconciliation pass even when it appears to affect only one issue.
|
|
49
49
|
|
|
50
50
|
## Answering controller deliveries
|
|
51
51
|
|
|
@@ -86,9 +86,9 @@ send it waits for it. Recover the work only from an owner that reads `gone`, or
|
|
|
86
86
|
`unresponsive` with a `last_seen` more than 20 minutes old, which is as long as an issue claim is
|
|
87
87
|
protected.
|
|
88
88
|
|
|
89
|
-
For work that a
|
|
89
|
+
For work that a person's directive, recorded in the plan with its link (the directives section
|
|
90
90
|
above), says moves to Legion when its session stops, preserve its existing labels, add `legion`,
|
|
91
|
-
then set it `todo` with the `legion` tool's `set_status`. A plan row you wrote with no such
|
|
91
|
+
then set it `todo` with the `legion` tool's `set_status`. A plan row you wrote with no such directive
|
|
92
92
|
behind it moves nothing. The label comes first: it is what
|
|
93
93
|
lets the daemon admit the root. Do not apply that recovery to an issue already in a live Legion
|
|
94
94
|
tree (a root in `admission.trees`, or an issue whose `tree` is one); its architect and daemon own its lifecycle. Update the weekly-plan owner row after the move.
|
|
@@ -99,5 +99,5 @@ A person's `legion` label outranks a plan's deferral. The daemon queues the root
|
|
|
99
99
|
person's label on an unrecorded root in `triage` is the root's `todo`, written by the daemon. A
|
|
100
100
|
labelled root the weekly plan says to defer is parked by you at your next backlog pass, not
|
|
101
101
|
before: `set_status` it to `backlog`, or to `icebox` for a longer deferral, and cite the plan's
|
|
102
|
-
|
|
102
|
+
directive in a comment on the issue. The cost is the architect's work between the daemon's `todo`
|
|
103
103
|
and your park.
|
|
@@ -5,10 +5,10 @@ unpack, extract or install anything the worker image does not carry. Every path
|
|
|
5
5
|
cybermonklabs/legion.
|
|
6
6
|
|
|
7
7
|
The withheld row reads `installs or configures its own dependencies in the pod: Legion owns its
|
|
8
|
-
dependencies` (`packages/daemon/internal/capabilities/capabilities.go`,
|
|
8
|
+
dependencies` (`packages/daemon/internal/capabilities/capabilities.go`, decision
|
|
9
9
|
dispatch://LEGION-200). Read as a sentence on its own, that wording would also forbid `uvx`,
|
|
10
10
|
`bunx --package` and `go run`, each of which fetches a package and writes a cache. It does not, and
|
|
11
|
-
three artefacts in this repository are what draw the line — not a claim about what the
|
|
11
|
+
three artefacts in this repository are what draw the line — not a claim about what the decision meant:
|
|
12
12
|
|
|
13
13
|
- **What the image ships for a role to use.** `packages/daemon/docker/worker.Dockerfile` installs
|
|
14
14
|
`uv` and `uvx`, `bun` with its `bunx` link, and the Go toolchain, and the `toolchain` capability
|
package/package.json
CHANGED
package/skills/dispatch/SKILL.md
CHANGED
|
@@ -10,13 +10,13 @@ Dispatch is a record for the people who decide, never a log of your work.
|
|
|
10
10
|
- Use the `dispatch` command; the HTTP API only for what no command does. `dispatch <command> --help` gives its rules and an example.
|
|
11
11
|
- Put long text on stdin: `--<field>-file -` with a quoted here-document (`<<'EOF'`); give object and list fields as JSON.
|
|
12
12
|
- Exit 1 is a refusal, 2 a usage error. A refusal lists every problem: fix all, call once.
|
|
13
|
-
- A
|
|
13
|
+
- A command hard to use, or storing or losing something wrongly, is a defect to report, not work around: open an issue in the owning project's code and tell its controller; a Legion role tells its architect (`skill://legion-worker/references/findings.md`).
|
|
14
14
|
|
|
15
15
|
## Asks and ask blocks
|
|
16
16
|
|
|
17
17
|
- An ask is a question for a person, never a request to another agent. Ask an agent by envoy_send or a comment on the issue.
|
|
18
18
|
- An ask waits on the issue's assignee until a person hands it on. No agent can hand one on.
|
|
19
|
-
- A design question a document records is an ask block
|
|
19
|
+
- A design question a document records is an ask block ending its section:
|
|
20
20
|
|
|
21
21
|
```md
|
|
22
22
|
:::ask{urgency="med"}
|
|
@@ -27,6 +27,7 @@ The question and the recommendation (`skill://dispatch-writing-specs`).
|
|
|
27
27
|
:::
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
- A decision block in a comment, message or close reason is refused: ask in the issue's document, or `dispatch ask`.
|
|
30
31
|
- Never repeat an open ask in a message.
|
|
31
32
|
- Change an open ask's block with `dispatch edit-ask` (its ask id), or `doc-edit`'s `replace` or `move` (its block id). An answered ask is fixed: ask anew. `dispatch read --ref` takes either id.
|
|
32
33
|
- Reply on an open ask with `dispatch comment --reply-to-ask`; `--turn agent` (a progress note) needs it. An approval request a newer version moved needs `request-approval` again.
|
|
@@ -28,7 +28,7 @@ dispatch search --query 'reviewer threads OR review comments'
|
|
|
28
28
|
|
|
29
29
|
## Research before you ask
|
|
30
30
|
|
|
31
|
-
- Research when a file, command or document can show the answer
|
|
31
|
+
- Research when a file, command or document can show the answer.
|
|
32
32
|
- Ask a person only for what their authority, taste or risk appetite settles, because no file holds that. Where a file records the decision, cite it (`file:line`) and follow it; ask again only when the facts it rested on changed.
|
|
33
33
|
- Say what you searched: each part you found with its source, and each part you did not, with the queries you ran. Ask only the part no search answered.
|
|
34
34
|
|
|
@@ -37,7 +37,7 @@ For each spec, ask, comment and message:
|
|
|
37
37
|
- Write in `skill://asd-ste100`'s strict mode.
|
|
38
38
|
- Write about the current design, never the person or how people reached it, and never quote or upload their words.
|
|
39
39
|
- Link each source where the person wrote it. With no link, state the design.
|
|
40
|
-
- Treat a person's stated preference or past answer as evidence of their taste, never as a
|
|
40
|
+
- Treat a person's stated preference or past answer as evidence of their taste, never as a decision that settles the question: an answer given once is not a standing rule. A commit attributed to a person is not their decision, because agents commit the work.
|
|
41
41
|
- In a spec, cite code by file and symbol, never a line number: it goes stale at the next edit.
|
|
42
42
|
- A sentence citing a gate passing (test, review, check) also says what the pass does not show: "Tests pass: a wrong verdict, not a missing one."
|
|
43
43
|
- Keep only text a reader needs to understand, decide, build or check, and say what each issue you name does for them (`skill://plain-words`).
|