@sjawhar/pi-legion-envoy 1.60.0 → 1.60.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/envoy.js CHANGED
@@ -29783,6 +29783,7 @@ var MessageEventPayloadSchema = object({
29783
29783
  target: string2().nullish(),
29784
29784
  in_reply_to: string2().nullish(),
29785
29785
  reply_body: string2().optional(),
29786
+ thread_target: string2().optional(),
29786
29787
  author: object({ kind: string2(), id: string2() }).optional()
29787
29788
  });
29788
29789
  var DispatchTargetedResourceIDSchema = uuid2();
@@ -29848,6 +29849,29 @@ var AskFollowerEventPayloadSchema = object({
29848
29849
  session_id: string2().optional(),
29849
29850
  by: object({ kind: string2(), id: string2().optional() }).passthrough().optional()
29850
29851
  });
29852
+ // ../contracts/src/dispatch-href.ts
29853
+ function itemFromSearch(search) {
29854
+ const params = new URLSearchParams(search);
29855
+ const ask = params.get("ask");
29856
+ const comment = params.get("comment");
29857
+ if (ask === null && comment === null) {
29858
+ return;
29859
+ }
29860
+ if (ask !== null && comment !== null) {
29861
+ return null;
29862
+ }
29863
+ const raw = ask ?? comment ?? "";
29864
+ if (raw === "" || raw.includes("/")) {
29865
+ return null;
29866
+ }
29867
+ let id;
29868
+ try {
29869
+ id = decodeURIComponent(raw);
29870
+ } catch {
29871
+ return null;
29872
+ }
29873
+ return ask === null ? { id, kind: "comment" } : { id, kind: "ask" };
29874
+ }
29851
29875
  // ../contracts/src/dispatch-snippet.ts
29852
29876
  var HTML_ENTITIES = [
29853
29877
  ["&lt;", "<"],
@@ -33003,6 +33027,13 @@ function dispatchRefFromUrl(value, serverUrl) {
33003
33027
  if (issuePage) {
33004
33028
  const [, key, page, artifact, ask, comment, message] = issuePage;
33005
33029
  const version = versionOf("v");
33030
+ if (page === "spec" || artifact !== undefined) {
33031
+ const item = itemFromSearch(url.search);
33032
+ if (item === null)
33033
+ return;
33034
+ if (item !== undefined)
33035
+ return `dispatch://${key}/${item.kind}/${item.id}`;
33036
+ }
33006
33037
  if (page === "spec" && version !== "")
33007
33038
  return `dispatch://${key}/artifact/spec${version}`;
33008
33039
  if (page !== undefined)
@@ -33023,13 +33054,10 @@ function dispatchRefFromUrl(value, serverUrl) {
33023
33054
  return;
33024
33055
  const [, project, slug] = documentPage;
33025
33056
  const document = `dispatch://${project}/artifact/${decodeURIComponent(slug ?? "")}${versionOf("version")}`;
33026
- const ask = url.searchParams.get("ask");
33027
- if (ask !== null)
33028
- return `${document}/ask/${ask}`;
33029
- const comment = url.searchParams.get("comment");
33030
- if (comment !== null)
33031
- return `${document}/comment/${comment}`;
33032
- return document;
33057
+ const item = itemFromSearch(url.search);
33058
+ if (item === null)
33059
+ return;
33060
+ return item === undefined ? document : `${document}/${item.kind}/${item.id}`;
33033
33061
  }
33034
33062
  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";
33035
33063
  var ownerRequiredProblem = "issue is required; supply issue or set LEGION_ISSUE";
package/dist/legion.js CHANGED
@@ -16144,7 +16144,7 @@ import { logger } from "@oh-my-pi/pi-utils";
16144
16144
  // package.json
16145
16145
  var package_default = {
16146
16146
  name: "@sjawhar/pi-legion-envoy",
16147
- version: "1.60.0",
16147
+ version: "1.60.2",
16148
16148
  type: "module",
16149
16149
  omp: {
16150
16150
  extensions: [
@@ -29855,6 +29855,7 @@ var MessageEventPayloadSchema = object({
29855
29855
  target: string2().nullish(),
29856
29856
  in_reply_to: string2().nullish(),
29857
29857
  reply_body: string2().optional(),
29858
+ thread_target: string2().optional(),
29858
29859
  author: object({ kind: string2(), id: string2() }).optional()
29859
29860
  });
29860
29861
  var DispatchTargetedResourceIDSchema = uuid2();
@@ -29920,6 +29921,29 @@ var AskFollowerEventPayloadSchema = object({
29920
29921
  session_id: string2().optional(),
29921
29922
  by: object({ kind: string2(), id: string2().optional() }).passthrough().optional()
29922
29923
  });
29924
+ // ../contracts/src/dispatch-href.ts
29925
+ function itemFromSearch(search) {
29926
+ const params = new URLSearchParams(search);
29927
+ const ask = params.get("ask");
29928
+ const comment = params.get("comment");
29929
+ if (ask === null && comment === null) {
29930
+ return;
29931
+ }
29932
+ if (ask !== null && comment !== null) {
29933
+ return null;
29934
+ }
29935
+ const raw = ask ?? comment ?? "";
29936
+ if (raw === "" || raw.includes("/")) {
29937
+ return null;
29938
+ }
29939
+ let id;
29940
+ try {
29941
+ id = decodeURIComponent(raw);
29942
+ } catch {
29943
+ return null;
29944
+ }
29945
+ return ask === null ? { id, kind: "comment" } : { id, kind: "ask" };
29946
+ }
29923
29947
  // ../contracts/src/dispatch-snippet.ts
29924
29948
  var HTML_ENTITIES = [
29925
29949
  ["&lt;", "<"],
@@ -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:** thermonuclear-deep-review + thermonuclear-code-quality run once at <head-sha>:
269
- <verdict>. (omitted entirely on a docs-only PR — no thermo pass runs)
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 and records the verdict.
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjawhar/pi-legion-envoy",
3
- "version": "1.60.0",
3
+ "version": "1.60.2",
4
4
  "type": "module",
5
5
  "omp": {
6
6
  "extensions": [