@sjawhar/opencode-legion-envoy 1.49.0 → 1.49.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/src/server.js +35 -7
- package/package.json +1 -1
- package/skills/legion-worker/SKILL.md +16 -3
package/dist/src/server.js
CHANGED
|
@@ -13686,6 +13686,7 @@ var MessageEventPayloadSchema = object({
|
|
|
13686
13686
|
target: string2().nullish(),
|
|
13687
13687
|
in_reply_to: string2().nullish(),
|
|
13688
13688
|
reply_body: string2().optional(),
|
|
13689
|
+
thread_target: string2().optional(),
|
|
13689
13690
|
author: object({ kind: string2(), id: string2() }).optional()
|
|
13690
13691
|
});
|
|
13691
13692
|
var DispatchTargetedResourceIDSchema = uuid2();
|
|
@@ -13751,6 +13752,29 @@ var AskFollowerEventPayloadSchema = object({
|
|
|
13751
13752
|
session_id: string2().optional(),
|
|
13752
13753
|
by: object({ kind: string2(), id: string2().optional() }).passthrough().optional()
|
|
13753
13754
|
});
|
|
13755
|
+
// ../contracts/src/dispatch-href.ts
|
|
13756
|
+
function itemFromSearch(search) {
|
|
13757
|
+
const params = new URLSearchParams(search);
|
|
13758
|
+
const ask = params.get("ask");
|
|
13759
|
+
const comment = params.get("comment");
|
|
13760
|
+
if (ask === null && comment === null) {
|
|
13761
|
+
return;
|
|
13762
|
+
}
|
|
13763
|
+
if (ask !== null && comment !== null) {
|
|
13764
|
+
return null;
|
|
13765
|
+
}
|
|
13766
|
+
const raw = ask ?? comment ?? "";
|
|
13767
|
+
if (raw === "" || raw.includes("/")) {
|
|
13768
|
+
return null;
|
|
13769
|
+
}
|
|
13770
|
+
let id;
|
|
13771
|
+
try {
|
|
13772
|
+
id = decodeURIComponent(raw);
|
|
13773
|
+
} catch {
|
|
13774
|
+
return null;
|
|
13775
|
+
}
|
|
13776
|
+
return ask === null ? { id, kind: "comment" } : { id, kind: "ask" };
|
|
13777
|
+
}
|
|
13754
13778
|
// ../contracts/src/dispatch-snippet.ts
|
|
13755
13779
|
var HTML_ENTITIES = [
|
|
13756
13780
|
["<", "<"],
|
|
@@ -15828,6 +15852,13 @@ function dispatchRefFromUrl(value, serverUrl) {
|
|
|
15828
15852
|
if (issuePage) {
|
|
15829
15853
|
const [, key, page, artifact, ask, comment, message] = issuePage;
|
|
15830
15854
|
const version = versionOf("v");
|
|
15855
|
+
if (page === "spec" || artifact !== undefined) {
|
|
15856
|
+
const item = itemFromSearch(url.search);
|
|
15857
|
+
if (item === null)
|
|
15858
|
+
return;
|
|
15859
|
+
if (item !== undefined)
|
|
15860
|
+
return `dispatch://${key}/${item.kind}/${item.id}`;
|
|
15861
|
+
}
|
|
15831
15862
|
if (page === "spec" && version !== "")
|
|
15832
15863
|
return `dispatch://${key}/artifact/spec${version}`;
|
|
15833
15864
|
if (page !== undefined)
|
|
@@ -15848,13 +15879,10 @@ function dispatchRefFromUrl(value, serverUrl) {
|
|
|
15848
15879
|
return;
|
|
15849
15880
|
const [, project, slug] = documentPage;
|
|
15850
15881
|
const document = `dispatch://${project}/artifact/${decodeURIComponent(slug ?? "")}${versionOf("version")}`;
|
|
15851
|
-
const
|
|
15852
|
-
if (
|
|
15853
|
-
return
|
|
15854
|
-
|
|
15855
|
-
if (comment !== null)
|
|
15856
|
-
return `${document}/comment/${comment}`;
|
|
15857
|
-
return document;
|
|
15882
|
+
const item = itemFromSearch(url.search);
|
|
15883
|
+
if (item === null)
|
|
15884
|
+
return;
|
|
15885
|
+
return item === undefined ? document : `${document}/${item.kind}/${item.id}`;
|
|
15858
15886
|
}
|
|
15859
15887
|
var refGrammarProblem = "ref must be a valid dispatch:// reference such as dispatch://KEY-1, " + "dispatch://KEY-1/ask/<uuid>, dispatch://KEY-1/comment/<uuid>, " + "dispatch://KEY-1/message/<uuid>, dispatch://KEY-1/artifact/<slug>, or " + "dispatch://PROJECT/artifact/<document-ref> (an artifact id, slug, or filename); " + "a dashboard URL on this Dispatch server is accepted too";
|
|
15860
15888
|
var ownerRequiredProblem = "issue is required; supply issue or set LEGION_ISSUE";
|
package/package.json
CHANGED
|
@@ -265,8 +265,8 @@ later phase keeps it current rather than replacing it:
|
|
|
265
265
|
resolved <thread URL>
|
|
266
266
|
left open <thread URL> — newest reply by <login> is not an acceptance
|
|
267
267
|
|
|
268
|
-
**Thermo:**
|
|
269
|
-
<verdict>. (omitted entirely on a docs-only PR — no
|
|
268
|
+
**Thermo:** `ce-simplify-code` once at <head-sha>: <0 applied | applied → new head <sha>>; thermonuclear pair at the final head <sha>:
|
|
269
|
+
<verdict>. (omitted entirely on a docs-only PR — there is no code for either pass, so neither runs)
|
|
270
270
|
|
|
271
271
|
**E2E (implementer):** <surface> — ran `<command or run id>`, observed <result>, at head <sha>.
|
|
272
272
|
Negative control: <deliberately broken input> → <refusal or failure observed>.
|
|
@@ -367,9 +367,22 @@ this proof.
|
|
|
367
367
|
`E2E` line's head to the new SHA with
|
|
368
368
|
`rebase re-check <old-sha> → <new-sha>: fingerprint unchanged, bare gates only`; the
|
|
369
369
|
real-surface verification is not repeated. Different: a full test round.
|
|
370
|
+
- **The implementer runs `ce-simplify-code` once per pull request, after the last review round
|
|
371
|
+
closes and before the reviewer's final pass, when the diff touches runtime code; a docs-only
|
|
372
|
+
diff gets none.** It is scoped to the pull request's own diff, at the head where the last review
|
|
373
|
+
round closed: nothing applied leaves that head final; applied → the applied head is the final
|
|
374
|
+
head: CI runs on it, the pair runs once on it, and the E2E proof re-runs on it for the surface
|
|
375
|
+
the simplify diff touched (Sami, 2026-09-13: test on the real surface before merging, no
|
|
376
|
+
shortcuts — a refactor that "preserves behaviour" is a claim until it is executed). That cost is
|
|
377
|
+
why 0-applied is the expected outcome and a pass that applies is spent sparingly. At the applied
|
|
378
|
+
head the implementer re-cites the `CI` line and re-runs its own proof into `E2E (implementer)`,
|
|
379
|
+
and the tester re-runs its proof for the touched surface into `E2E (tester)`, before the
|
|
380
|
+
reviewer's final pass. Simplify is the last code change; the pair is the last review. Record it
|
|
381
|
+
in the `Thermo` line.
|
|
370
382
|
- The reviewer verifies the `CI`, `Threads`, and `E2E` facts against GitHub directly —
|
|
371
383
|
never from a handoff — then runs `task(agent="thermonuclear-deep-review")` and
|
|
372
|
-
`task(agent="thermonuclear-code-quality")` once at that head
|
|
384
|
+
`task(agent="thermonuclear-code-quality")` once at that head — the head the implementer's
|
|
385
|
+
simplify pass left final — and records the verdict.
|
|
373
386
|
Approval is refused while either `E2E (implementer)` or `E2E (tester)` is missing: `REQUEST_CHANGES` naming the missing line.
|
|
374
387
|
Skip the `Thermo` line entirely on a docs-only PR. Submit **one review per round** —
|
|
375
388
|
`REQUEST_CHANGES` when any correctness finding stands, otherwise `COMMENT` while the head
|