@sjawhar/claude-envoy 6.8.1 → 6.10.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/.claude-plugin/plugin.json +1 -1
- package/.omp-plugin/plugin.json +1 -1
- package/dist/envoy-channel.js +62 -6
- package/legion/skills/legion-controller/SKILL.md +1 -1
- package/legion/skills/legion-controller/references/admission.md +10 -5
- package/legion/skills/legion-controller/references/backlog-stewardship.md +1 -1
- package/package.json +2 -2
package/.omp-plugin/plugin.json
CHANGED
package/dist/envoy-channel.js
CHANGED
|
@@ -66668,7 +66668,7 @@ var import_nats5 = __toESM(require_mod4(), 1);
|
|
|
66668
66668
|
|
|
66669
66669
|
// package.json
|
|
66670
66670
|
var name2 = "@sjawhar/claude-envoy";
|
|
66671
|
-
var version2 = "6.
|
|
66671
|
+
var version2 = "6.10.0";
|
|
66672
66672
|
var package_default = {
|
|
66673
66673
|
name: name2,
|
|
66674
66674
|
version: version2,
|
|
@@ -66679,7 +66679,7 @@ var package_default = {
|
|
|
66679
66679
|
repository: { type: "git", url: "https://github.com/cybermonklabs/legion" },
|
|
66680
66680
|
scripts: { channel: "bun bin/envoy-channel.ts", "verify-build": "bash scripts/verify-build.sh", prepack: "bash scripts/pack-skills.sh", postpack: "bash scripts/pack-skills.sh --restore", typecheck: "bun ../contracts/scripts/gen-api.ts && bunx tsc --noEmit", test: "bun test --timeout=60000", lint: "bunx biome check src/ hooks/ scripts/" },
|
|
66681
66681
|
devDependencies: { "@biomejs/biome": "^2.3.14", "@legion/cipher-client": "workspace:*", "@legion/contracts": "workspace:*", "@legion/envoy-client": "workspace:*", "@legion/pi-shared": "workspace:*", "@legion/test-fixtures": "workspace:*", "@modelcontextprotocol/sdk": "^1.30.0", "bun-types": "latest", nats: "^2.29.2", typescript: "^5.3.0", zod: "4.3.6" },
|
|
66682
|
-
legion: { daemonApiVersion:
|
|
66682
|
+
legion: { daemonApiVersion: 283 }
|
|
66683
66683
|
};
|
|
66684
66684
|
|
|
66685
66685
|
// ../envoy-client/src/inbound-card.ts
|
|
@@ -68496,6 +68496,8 @@ var legionIssue = object({
|
|
|
68496
68496
|
ancestry: array(issueKey).optional(),
|
|
68497
68497
|
architect: legionClaimView.optional(),
|
|
68498
68498
|
priority: dispatchPriority,
|
|
68499
|
+
resolvedPriority: dispatchPriority,
|
|
68500
|
+
priorityFrom: issueKey.optional(),
|
|
68499
68501
|
workers: partialRecord(string2(), legionPhaseView).optional(),
|
|
68500
68502
|
pullRequest: legionPullRequestView.optional(),
|
|
68501
68503
|
designGate: legionGateView.optional(),
|
|
@@ -68555,8 +68557,25 @@ var legionHeldIssue = object({
|
|
|
68555
68557
|
reason: _enum2(LEGION_HELD_REASONS).optional(),
|
|
68556
68558
|
heldBy: array(issueKey).optional()
|
|
68557
68559
|
});
|
|
68560
|
+
var legionPauseActor = discriminatedUnion("kind", [
|
|
68561
|
+
object({ kind: literal("controller"), session: nonEmptyString2 }),
|
|
68562
|
+
object({ kind: literal("operator") })
|
|
68563
|
+
]);
|
|
68564
|
+
var LegionP0BoundNumber = number2().int().positive().max(2147483647);
|
|
68565
|
+
var legionP0Bound = object({
|
|
68566
|
+
bound: LegionP0BoundNumber.nullable(),
|
|
68567
|
+
configured: LegionP0BoundNumber.nullable().optional(),
|
|
68568
|
+
live: object({
|
|
68569
|
+
bound: LegionP0BoundNumber.nullable(),
|
|
68570
|
+
setBy: legionPauseActor,
|
|
68571
|
+
setAt: timestamp,
|
|
68572
|
+
reason: nonEmptyString2
|
|
68573
|
+
}).optional()
|
|
68574
|
+
});
|
|
68558
68575
|
var legionAdmission = object({
|
|
68559
68576
|
cap: number2().int().nonnegative().optional(),
|
|
68577
|
+
p0Holders: number2().int().nonnegative().optional(),
|
|
68578
|
+
p0Bound: legionP0Bound.optional(),
|
|
68560
68579
|
active: array(nonEmptyString2).optional(),
|
|
68561
68580
|
waiting: array(nonEmptyString2).optional(),
|
|
68562
68581
|
trees: array(issueKey).optional(),
|
|
@@ -68662,10 +68681,6 @@ var legionIntakeGiveUps = object({
|
|
|
68662
68681
|
consumers: array(legionIntakeGiveUpCount),
|
|
68663
68682
|
newest: array(legionIntakeGiveUp).optional()
|
|
68664
68683
|
});
|
|
68665
|
-
var legionPauseActor = discriminatedUnion("kind", [
|
|
68666
|
-
object({ kind: literal("controller"), session: nonEmptyString2 }),
|
|
68667
|
-
object({ kind: literal("operator") })
|
|
68668
|
-
]);
|
|
68669
68684
|
var pauseFields = {
|
|
68670
68685
|
id: number2().int().positive(),
|
|
68671
68686
|
since: timestamp,
|
|
@@ -68977,6 +68992,7 @@ var LegionProjectResumeResponse = object({
|
|
|
68977
68992
|
pause: legionAnsweredPause.optional(),
|
|
68978
68993
|
released: number2().int().nonnegative().optional()
|
|
68979
68994
|
});
|
|
68995
|
+
var LegionP0BoundResponse = legionP0Bound;
|
|
68980
68996
|
var LegionPauseFailureResponse = object({
|
|
68981
68997
|
code: nonEmptyString2,
|
|
68982
68998
|
error: nonEmptyString2,
|
|
@@ -69055,6 +69071,18 @@ var LegionProjectPauseRequest = strictObject({
|
|
|
69055
69071
|
var LegionProjectResumeRequest = strictObject({
|
|
69056
69072
|
grantId: nonEmptyString2
|
|
69057
69073
|
});
|
|
69074
|
+
var LegionProjectP0BoundRequest = union([
|
|
69075
|
+
strictObject({
|
|
69076
|
+
grantId: nonEmptyString2,
|
|
69077
|
+
bound: LegionP0BoundNumber,
|
|
69078
|
+
reason: nonEmptyString2
|
|
69079
|
+
}),
|
|
69080
|
+
strictObject({ grantId: nonEmptyString2, unbounded: literal(true), reason: nonEmptyString2 })
|
|
69081
|
+
]);
|
|
69082
|
+
var LegionProjectP0BoundClearRequest = strictObject({
|
|
69083
|
+
grantId: nonEmptyString2,
|
|
69084
|
+
reason: nonEmptyString2
|
|
69085
|
+
});
|
|
69058
69086
|
var oneGiveUp = { giveUp: number2().int().positive() };
|
|
69059
69087
|
var giveUpsThroughSeq = {
|
|
69060
69088
|
consumer: nonEmptyString2,
|
|
@@ -69071,6 +69099,13 @@ var LegionIntakeDiscardRequest = union([
|
|
|
69071
69099
|
var LegionOperatorProjectPauseRequest = strictObject({
|
|
69072
69100
|
reason: nonEmptyString2
|
|
69073
69101
|
});
|
|
69102
|
+
var LegionOperatorProjectP0BoundRequest = union([
|
|
69103
|
+
strictObject({ bound: LegionP0BoundNumber, reason: nonEmptyString2 }),
|
|
69104
|
+
strictObject({ unbounded: literal(true), reason: nonEmptyString2 })
|
|
69105
|
+
]);
|
|
69106
|
+
var LegionOperatorProjectP0BoundClearRequest = strictObject({
|
|
69107
|
+
reason: nonEmptyString2
|
|
69108
|
+
});
|
|
69074
69109
|
var LegionGateRegisterRequest = strictObject({
|
|
69075
69110
|
grantId: nonEmptyString2,
|
|
69076
69111
|
issue: nonEmptyString2,
|
|
@@ -69163,6 +69198,15 @@ var LEGION_ANSWER_READS = {
|
|
|
69163
69198
|
"admission.held[].issue",
|
|
69164
69199
|
"admission.held[].reason",
|
|
69165
69200
|
"admission.held[].heldBy",
|
|
69201
|
+
"admission.p0Bound.bound",
|
|
69202
|
+
"admission.p0Bound.live",
|
|
69203
|
+
"admission.p0Bound.live.bound",
|
|
69204
|
+
"admission.p0Bound.live.setBy",
|
|
69205
|
+
"admission.p0Bound.live.setBy|0.kind",
|
|
69206
|
+
"admission.p0Bound.live.setBy|1.kind",
|
|
69207
|
+
"admission.p0Bound.live.setBy|0.session",
|
|
69208
|
+
"admission.p0Bound.live.setAt",
|
|
69209
|
+
"admission.p0Bound.live.reason",
|
|
69166
69210
|
"capabilities",
|
|
69167
69211
|
"capabilities[].name",
|
|
69168
69212
|
"capabilities[].status",
|
|
@@ -69250,6 +69294,16 @@ var LEGION_ANSWER_READS = {
|
|
|
69250
69294
|
"pause.endedBy|1.kind",
|
|
69251
69295
|
"pause.endedBy|0.session"
|
|
69252
69296
|
],
|
|
69297
|
+
LegionP0BoundResponse: [
|
|
69298
|
+
"bound",
|
|
69299
|
+
"live.bound",
|
|
69300
|
+
"live.setBy",
|
|
69301
|
+
"live.setBy|0.kind",
|
|
69302
|
+
"live.setBy|1.kind",
|
|
69303
|
+
"live.setBy|0.session",
|
|
69304
|
+
"live.setAt",
|
|
69305
|
+
"live.reason"
|
|
69306
|
+
],
|
|
69253
69307
|
LegionProjectResumeResponse: [
|
|
69254
69308
|
"pause.by|0.kind",
|
|
69255
69309
|
"pause.by|1.kind",
|
|
@@ -69504,6 +69558,8 @@ function createLegionDaemonClient(baseUrl, options) {
|
|
|
69504
69558
|
issuePodUpdate: (input) => post("/legion/v1/issues/pod-update", LegionPodUpdateRequest, LegionPodUpdateResponse, input),
|
|
69505
69559
|
projectPause: (input) => post("/legion/v1/project/pause", LegionProjectPauseRequest, LegionProjectPauseResponse, input),
|
|
69506
69560
|
projectResume: (input) => post("/legion/v1/project/resume", LegionProjectResumeRequest, LegionProjectResumeResponse, input),
|
|
69561
|
+
p0Bound: (input) => post("/legion/v1/project/p0-bound", LegionProjectP0BoundRequest, LegionP0BoundResponse, input),
|
|
69562
|
+
p0BoundClear: (input) => post("/legion/v1/project/p0-bound/clear", LegionProjectP0BoundClearRequest, LegionP0BoundResponse, input),
|
|
69507
69563
|
intakeReplay: (input) => post("/legion/v1/intake/replay", LegionIntakeReplayRequest, LegionIntakeReplayResponse, input),
|
|
69508
69564
|
intakeDiscard: (input) => post("/legion/v1/intake/discard", LegionIntakeDiscardRequest, LegionIntakeDiscardResponse, input),
|
|
69509
69565
|
gateRegister: (input) => post("/legion/v1/gates/register", LegionGateRegisterRequest, LegionEmptyResponse, input),
|
|
@@ -67,7 +67,7 @@ The daemon works only issues labelled `legion` (any case), and a labelled root i
|
|
|
67
67
|
|
|
68
68
|
A free slot or a full cap is no reason to take, label, admit or park an issue: a labelled root in `todo` takes the next slot by itself.
|
|
69
69
|
|
|
70
|
-
How a slot is counted, the words of the lists and of `admission.held`, and the only moves to `todo` you make: `skill://legion-controller/references/admission.md`.
|
|
70
|
+
How a slot is counted, what makes an issue P0, the words of the lists and of `admission.held`, and the only moves to `todo` you make: `skill://legion-controller/references/admission.md`.
|
|
71
71
|
|
|
72
72
|
## Merge holds
|
|
73
73
|
|
|
@@ -2,26 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Read this when you need to know where an issue stands in admission, what an `admission.held` word means, or which trees are live, and before you move an issue to `todo`.
|
|
4
4
|
An issue's `phase` alone does not say it: read its key against the `admission` lists and the root its `tree` names.
|
|
5
|
-
The `read_state` summary prints `admission.active`, `admission.waiting` and `admission.
|
|
6
|
-
no read prints `admission.trees` or `admission.held`.
|
|
5
|
+
The `read_state` summary prints `admission.active`, `admission.waiting`, `admission.blocked` and `admission.trees` as its `active`, `waiting`, `blocked` and `trees` lines, and each entry of `admission.held` as a `held` line.
|
|
7
6
|
The rules behind them: [Admission and the `legion` label](https://cybermonklabs.github.io/legion/legion/concepts/#admission-and-the-legion-label).
|
|
8
7
|
|
|
9
8
|
## The lists
|
|
10
9
|
|
|
11
10
|
- `admission.active`: every issue holding a slot, a root or a child, at work, `held` or waiting on a person.
|
|
11
|
+
The regular cap counts only holders that are not P0 (`admission.p0Holders` gives how many are P0), so `admission.active` can hold more issues than `admission.cap`.
|
|
12
12
|
An issue in `accepting`, `retro` or `merging` holds none (in the default steps, the phases after the review), and a step after `accepting` whose phase keeps a slot waits for one again.
|
|
13
13
|
A started issue that waits on another issue holds none either, except three roots that keep theirs:
|
|
14
14
|
one in `awaiting_person`, one at `admitted` whose gate has never opened, and one carried from another tree.
|
|
15
15
|
|
|
16
|
+
- `admission.p0Holders` and `admission.p0Bound`: how many holders in `admission.active` are P0, and the P0 bound in force (`bound`, null for none) with `legion.yaml`'s `configured` value and any `live` value.
|
|
17
|
+
An issue is P0 when its `resolvedPriority` is 0, or, where `resolvedPriority` is absent, its own `priority` is 0.
|
|
18
|
+
A P0 issue starts outside the cap while fewer than `bound` P0 issues hold a slot, or always when `bound` is null.
|
|
19
|
+
|
|
16
20
|
- The live trees: a root is a record whose `tree` is its own key (`read_state` with `issues`).
|
|
17
21
|
Its tree is live while the root stands in `admission.active` or `admission.waiting`, waits on a person, stands past `admitted` and not `done`, or waits under live work above it, and never while its record carries `lingerUntil`.
|
|
18
22
|
Use this, not `admission.active`, for which trees run.
|
|
19
23
|
|
|
20
24
|
- `admission.waiting`: the line, in order.
|
|
21
|
-
It is ordered by
|
|
25
|
+
It is ordered by the priority Dispatch resolves first: P0, P1, P2, P3, then the issues with no priority.
|
|
22
26
|
Within one priority, first the issues whose work came back, oldest first; then the issues whose first phase can start, by their root's Dispatch rank and then their own.
|
|
23
27
|
A priority changed in Dispatch moves the issue at the next admission pass; priority takes no slot back from work that runs.
|
|
24
|
-
`issues.<KEY>.priority` is the issue's own priority (0 for P0 to 3 for P3, null for none), and `waitingLine.priority` the one it waits at (null for one that waits after P3).
|
|
28
|
+
`issues.<KEY>.priority` is the issue's own priority (0 for P0 to 3 for P3, null for none), `resolvedPriority` is what Dispatch resolves (with `priorityFrom` naming the ancestor when inherited), and `waitingLine.priority` is the one it waits at (null for one that waits after P3).
|
|
25
29
|
`issues.<KEY>.waitingLine` says where one stands (`priority`, `part`, `kind`, `holdsSlot`, `reason`): quote its `reason` before you call an order wrong.
|
|
26
30
|
|
|
27
31
|
- `admission.blocked`: issues waiting on an unfinished `blocked_by` issue, or a parent waiting for its open children.
|
|
@@ -68,7 +72,8 @@ Name them in the day's report and take nothing for them.
|
|
|
68
72
|
|
|
69
73
|
## Free slots
|
|
70
74
|
|
|
71
|
-
A slot is one issue the daemon started, a root or a child.
|
|
75
|
+
A slot is one issue the daemon started, a root or a child.
|
|
76
|
+
Free slots are `admission.cap`, less the holders of `admission.active` that are not P0 (its length less `admission.p0Holders`), less each issue of `admission.waiting` that is not P0 and is in neither `admission.active` nor `admission.blocked`.
|
|
72
77
|
|
|
73
78
|
## Your moves to `todo`
|
|
74
79
|
|
|
@@ -21,7 +21,7 @@ The pass keeps the order of the work aligned with the project's priorities. Run
|
|
|
21
21
|
|
|
22
22
|
1. Read the weekly-planning issue and its newest `plan-week-*` artifact (by its latest `artifact.version` event) before you change any issue.
|
|
23
23
|
2. Rank the plan by the deployment's priorities (`dispatch priorities --project <KEY>`). An issue takes the rank of the highest priority its `Advances:` line names, its own or inherited; an issue that advances none ranks below all. Order the plan's lines by rank, highest first, keeping the plan's order within a rank; a line that lists several issues takes its highest issue's rank. Move a line that breaks this order, unless a person asked for a different order of that work: then cite that request beside the line (a request to do the work is no request about its order). Name each move in your turn's summary.
|
|
24
|
-
3. For every plan line whose key has this project's prefix (`daemon.project`), make the board order match the line order exactly, from the plan alone: `dispatch issue-update --issue <KEY> --before <OTHER>` (or `--after`). Set the priority a line states; leave it where it states none.
|
|
24
|
+
3. For every plan line whose key has this project's prefix (`daemon.project`), make the board order match the line order exactly, from the plan alone: `dispatch issue-update --issue <KEY> --before <OTHER>` (or `--after`). Set priority P0 only where the project owner's own words, cited on the issue, ask for it, and never from a plan line alone: a P0 issue starts at once, outside the admission cap. Set any other priority a line states; leave it where it states none. Change the P0 bound (`set_p0_bound`, `clear_p0_bound`) only on a person's word, cited in the change's reason.
|
|
25
25
|
4. Reconcile the one-owner map. A `live` or `unresponsive` owner in `envoy_sessions` still owns its work: change nothing. Only an owner that reads `gone`, or that the registry has no record of, has no session. Route such unowned work to a session whose `dir` is a checkout of the issue's repository (`dispatch issue-update --issue <KEY> --route session:<session id>`) and `envoy_send` it `You own <KEY>: <title>.`. Never route an issue that carries the `legion` label, and never change its `Assignee:`, which decides who receives asks.
|
|
26
26
|
5. Edit that line's owner in the artifact with `dispatch doc-edit`, guarded by the token of the current `dispatch doc-read`, replacing superseded text rather than logging changes.
|
|
27
27
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/claude-envoy",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Claude Code plugin for Legion's Envoy bus",
|
|
6
6
|
"type": "module",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
"zod": "4.3.6"
|
|
46
46
|
},
|
|
47
47
|
"legion": {
|
|
48
|
-
"daemonApiVersion":
|
|
48
|
+
"daemonApiVersion": 283
|
|
49
49
|
}
|
|
50
50
|
}
|