@sjawhar/pi-legion-envoy 5.16.1 → 5.16.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/dist/legion.js
CHANGED
|
@@ -33415,7 +33415,7 @@ import { logger } from "@oh-my-pi/pi-utils";
|
|
|
33415
33415
|
// package.json
|
|
33416
33416
|
var package_default = {
|
|
33417
33417
|
name: "@sjawhar/pi-legion-envoy",
|
|
33418
|
-
version: "5.16.
|
|
33418
|
+
version: "5.16.2",
|
|
33419
33419
|
type: "module",
|
|
33420
33420
|
omp: {
|
|
33421
33421
|
extensions: [
|
|
@@ -33428,7 +33428,7 @@ var package_default = {
|
|
|
33428
33428
|
},
|
|
33429
33429
|
legion: {
|
|
33430
33430
|
daemonApiVersion: 9,
|
|
33431
|
-
goDaemonApiVersion:
|
|
33431
|
+
goDaemonApiVersion: 10
|
|
33432
33432
|
},
|
|
33433
33433
|
repository: {
|
|
33434
33434
|
type: "git",
|
|
@@ -34077,6 +34077,11 @@ var LegionGoSignOffRequest = exports_external.strictObject({
|
|
|
34077
34077
|
grantId: nonEmptyString2,
|
|
34078
34078
|
issue: nonEmptyString2
|
|
34079
34079
|
});
|
|
34080
|
+
var LegionGoRootCloseRequest = exports_external.strictObject({
|
|
34081
|
+
grantId: nonEmptyString2,
|
|
34082
|
+
issue: nonEmptyString2,
|
|
34083
|
+
reason: nonEmptyString2
|
|
34084
|
+
});
|
|
34080
34085
|
var LegionGoChildRequest = exports_external.strictObject({
|
|
34081
34086
|
grantId: nonEmptyString2,
|
|
34082
34087
|
issue: nonEmptyString2
|
|
@@ -34177,6 +34182,7 @@ function createLegionGoDaemonClient(baseUrl, fetchFn = fetch) {
|
|
|
34177
34182
|
phaseBackward: (input) => post("/legion/v1/phase/backward", LegionGoPhaseBackwardRequest, LegionGoEmptyResponse, input),
|
|
34178
34183
|
phaseRetry: (input) => post("/legion/v1/phase/retry", LegionGoPhaseRetryRequest, LegionGoEmptyResponse, input),
|
|
34179
34184
|
signOff: (input) => post("/legion/v1/signoff", LegionGoSignOffRequest, LegionGoEmptyResponse, input),
|
|
34185
|
+
rootClose: (input) => post("/legion/v1/roots/close", LegionGoRootCloseRequest, LegionGoEmptyResponse, input),
|
|
34180
34186
|
childPark: (input) => post("/legion/v1/children/park", LegionGoChildRequest, LegionGoEmptyResponse, input),
|
|
34181
34187
|
childRerun: (input) => post("/legion/v1/children/rerun", LegionGoChildRequest, LegionGoEmptyResponse, input)
|
|
34182
34188
|
};
|
|
@@ -34509,6 +34515,7 @@ var OPERATIONS = {
|
|
|
34509
34515
|
"request_backward_move",
|
|
34510
34516
|
"retry_or_escalate",
|
|
34511
34517
|
"sign_off",
|
|
34518
|
+
"close_root",
|
|
34512
34519
|
"park_child",
|
|
34513
34520
|
"rerun_child",
|
|
34514
34521
|
"read_record"
|
|
@@ -34521,6 +34528,7 @@ var OPERATION_FIELDS = {
|
|
|
34521
34528
|
request_backward_move: ["to", "reason"],
|
|
34522
34529
|
retry_or_escalate: ["issue", "decision"],
|
|
34523
34530
|
sign_off: ["issue"],
|
|
34531
|
+
close_root: ["issue", "reason"],
|
|
34524
34532
|
park_child: ["issue"],
|
|
34525
34533
|
rerun_child: ["issue"],
|
|
34526
34534
|
read_record: ["issue"]
|
|
@@ -34535,6 +34543,7 @@ function toolSchema2(pi) {
|
|
|
34535
34543
|
"request_backward_move",
|
|
34536
34544
|
"retry_or_escalate",
|
|
34537
34545
|
"sign_off",
|
|
34546
|
+
"close_root",
|
|
34538
34547
|
"park_child",
|
|
34539
34548
|
"rerun_child",
|
|
34540
34549
|
"read_record",
|
|
@@ -34674,6 +34683,15 @@ function createGoLegionTool(deps) {
|
|
|
34674
34683
|
});
|
|
34675
34684
|
return jsonSuccess({});
|
|
34676
34685
|
}
|
|
34686
|
+
case "close_root": {
|
|
34687
|
+
const grantId = await grantFor(client, active);
|
|
34688
|
+
await client.rootClose({
|
|
34689
|
+
grantId,
|
|
34690
|
+
issue: requiredString(parameters, operation, "issue"),
|
|
34691
|
+
reason: requiredString(parameters, operation, "reason")
|
|
34692
|
+
});
|
|
34693
|
+
return jsonSuccess({});
|
|
34694
|
+
}
|
|
34677
34695
|
case "park_child":
|
|
34678
34696
|
case "rerun_child": {
|
|
34679
34697
|
const grantId = await grantFor(client, active);
|
|
@@ -9,6 +9,9 @@ Retro is mandatory for every issue that passed review. The architect revives the
|
|
|
9
9
|
implementer so the person with implementation context performs the retrospective, and the
|
|
10
10
|
skill obtains a separate fresh-eyes perspective. Retro runs before merge.
|
|
11
11
|
|
|
12
|
+
Every path this skill cites (`packages/...`, `docs/...`) is in sjawhar/legion, the Legion
|
|
13
|
+
repository, which need not be the repository you are working in.
|
|
14
|
+
|
|
12
15
|
## Merge-gate ordering
|
|
13
16
|
|
|
14
17
|
Follow this ordering exactly. It keeps the reviewed branch clean while preserving the
|
|
@@ -11,6 +11,9 @@ phase gets its own long-lived process against the same jj workspace, run in turn
|
|
|
11
11
|
the phase assigned to you, report its completion to the architect, and leave the durable
|
|
12
12
|
copy the next phase can trust.
|
|
13
13
|
|
|
14
|
+
Every path this skill cites (`packages/...`, `docs/...`, `AGENTS.md`) is in sjawhar/legion, the
|
|
15
|
+
Legion repository, which need not be the repository you are working in.
|
|
16
|
+
|
|
14
17
|
## Identity, scope, and role
|
|
15
18
|
|
|
16
19
|
The daemon spawns you as a separate `omp --mode rpc` process (behind `legion worker-shim`,
|
|
@@ -102,8 +105,9 @@ committed predecessor handoffs in lifecycle order from `$LEGION_WORKSPACE/.legio
|
|
|
102
105
|
5. `review.json`
|
|
103
106
|
|
|
104
107
|
Read only files that precede the assigned phase. Every handoff is validated when it is read:
|
|
105
|
-
`validatePhaseHandoff` (`packages/contracts/src/handoff-schema.ts`) checks the
|
|
106
|
-
ledger (`packages/daemon/src/handoff/ledger.ts`) treats a file that
|
|
108
|
+
`validatePhaseHandoff` (`packages/contracts/src/handoff-schema.ts`) checks the
|
|
109
|
+
file, and the ledger (`packages/daemon/src/handoff/ledger.ts`) treats a file that
|
|
110
|
+
fails validation as missing.
|
|
107
111
|
Undeclared fields pass validation untouched and reach the next worker; a declared field of the
|
|
108
112
|
wrong type fails the whole file, so the `legion` tool's `handoff_read` returns null for that phase.
|
|
109
113
|
Write the phase-specific fields the next phase and the architect need, consistent with what
|
|
@@ -161,14 +165,19 @@ assignment, since `jj split`/`jj describe` keep its author). Never set or overri
|
|
|
161
165
|
`user.name`/`user.email` in any jj or Git scope — not `jj config set`, not `--config`, not
|
|
162
166
|
`git config`: `--config` outranks the pane environment and would put the wrong App back on your
|
|
163
167
|
commits, and the repository-scoped jj config is one file shared by every issue workspace of the
|
|
164
|
-
clone.
|
|
168
|
+
clone. Legion has two GitHub Apps, not one per role: your role's App is the **implement** App
|
|
169
|
+
if you are the implementer or the merger, and the **review** App if you are the planner, tester,
|
|
170
|
+
reviewer, or an architect (in Legion's own deployment, `legion-implementer[bot]` and
|
|
171
|
+
`legion-reviewer[bot]`). A planner's commits authored by the review App are right. Before a push,
|
|
172
|
+
check
|
|
165
173
|
`jj -R "$LEGION_WORKSPACE" log -r 'main@origin..@' -T 'author.email() ++ " | " ++ committer.email() ++ " " ++ description.first_line() ++ "\n"'`
|
|
166
174
|
shows your role's App in both columns **on every commit you made** — not on the whole list:
|
|
167
175
|
earlier phases' commits are legitimately authored by their own role's App, and a conflict-forced
|
|
168
176
|
rebase legitimately sets the committer of every rebased commit, other roles' included, to the
|
|
169
|
-
rebaser. A wrong identity on your own commit is a pane-environment
|
|
170
|
-
architect, not something to pin
|
|
171
|
-
Hazard 1).
|
|
177
|
+
rebaser. A wrong identity on your own commit, the other App or none, is a pane-environment
|
|
178
|
+
problem to report to the architect, not something to pin
|
|
179
|
+
(`docs/solutions/legion/shared-main-repo-hazards-for-concurrent-issue-workspaces.md`, Hazard 1).
|
|
180
|
+
Your session receives the credential capability it needs; invoke GitHub through the
|
|
172
181
|
credential helper:
|
|
173
182
|
|
|
174
183
|
```bash
|
|
@@ -225,8 +234,8 @@ legion gh -- pr comment <pr-number> \
|
|
|
225
234
|
|
|
226
235
|
The plan lives in `.legion/plan.json` and the Dispatch issue document; never commit a plan or spec file to the repository.
|
|
227
236
|
No `docs/plans/*`, `docs/superpowers/plans/*`, or spec markdown goes into the pull request: plan
|
|
228
|
-
and spec content goes into the issue, never into a PR (the root `AGENTS.md`
|
|
229
|
-
|
|
237
|
+
and spec content goes into the issue, never into a PR (the root `AGENTS.md`
|
|
238
|
+
calls its own `docs/plans/` human-authored design history, not a Legion artifact). A skill step that says "save the plan
|
|
230
239
|
to a file" is satisfied by the handoff write in the completion gate below; the planner's only
|
|
231
240
|
commit is `plan: record handoff`.
|
|
232
241
|
|
|
@@ -652,9 +661,16 @@ This publishes your phase's completion to the architect's role and clears the da
|
|
|
652
661
|
record of this issue's active phase. Do not add pipeline labels, run a controller loop, or
|
|
653
662
|
invent a different completion protocol — this is the whole contract.
|
|
654
663
|
|
|
655
|
-
A reviewer's phase ends with its completion, not with its review
|
|
656
|
-
|
|
657
|
-
|
|
664
|
+
A reviewer's phase ends with its completion, not with its review. A round that writes a handoff
|
|
665
|
+
takes this order: write, commit and push the handoff; submit the review of the head that push
|
|
666
|
+
made, by its SHA; then complete. An approval waits for the CI verdict to settle green at that head
|
|
667
|
+
before you submit it, since an approval stands only on green checks and GitHub can dismiss one
|
|
668
|
+
once the head moves, and a verdict that settles red there makes the round's decision a request for
|
|
669
|
+
changes naming the failing checks; a request for changes does not wait, since it stands whatever CI says and the
|
|
670
|
+
issue leaves reviewing with it. A review of a head the handoff push then replaces names a head
|
|
671
|
+
the pull request no longer has. A round that writes none (the final approval of the `.legion/`
|
|
672
|
+
deletion head) reviews the head as it is. The daemon moves the issue once both are in —
|
|
673
|
+
the decision GitHub reports and your completion, in either order — so a review posted without a
|
|
658
674
|
completion leaves the issue in reviewing until you finish.
|
|
659
675
|
|
|
660
676
|
**A refused completion is information, not a retry loop.** The daemon attributes your report to
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjawhar/pi-legion-envoy",
|
|
3
|
-
"version": "5.16.
|
|
3
|
+
"version": "5.16.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"omp": {
|
|
6
6
|
"extensions": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"legion": {
|
|
15
15
|
"daemonApiVersion": 9,
|
|
16
|
-
"goDaemonApiVersion":
|
|
16
|
+
"goDaemonApiVersion": 10
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|