opencode-swarm 7.194.0 → 7.196.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.
Files changed (116) hide show
  1. package/.opencode/skills/commit-pr/SKILL.md +8 -0
  2. package/.opencode/skills/issue-tracer/references/acceptance-checks.md +20 -0
  3. package/.opencode/skills/issue-tracer/references/full-resolution-contract.md +12 -0
  4. package/.opencode/skills/swarm-pr-feedback/SKILL.md +2 -2
  5. package/.opencode/skills/swarm-pr-feedback/references/operational-gotchas.md +18 -0
  6. package/.opencode/skills/swarm-pr-review/SKILL.md +11 -10
  7. package/.opencode/skills/swarm-pr-review/references/counterbalancing.md +68 -0
  8. package/.opencode/skills/swarm-pr-review/references/findings-persistence-contract.md +21 -0
  9. package/.opencode/skills/swarm-pr-review/references/parser-dry-run.md +11 -0
  10. package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +8 -0
  11. package/README.md +1 -1
  12. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  13. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  14. package/dist/background/pr-review-collection-receipt.d.ts +7 -1
  15. package/dist/background/pr-review-contract.d.ts +10 -0
  16. package/dist/cli/{auto-checkpoint-67dk8rjz.js → auto-checkpoint-f00tk7sc.js} +9 -9
  17. package/dist/cli/{checkpoint-jbqqyp5e.js → checkpoint-acztxqga.js} +17 -17
  18. package/dist/cli/{coder-settlement-a09t7mvx.js → coder-settlement-0ka4n1xf.js} +13 -13
  19. package/dist/cli/{config-doctor-dkp263xx.js → config-doctor-qv7wc6fa.js} +16 -16
  20. package/dist/cli/{core-stnmz1rg.js → core-dmn3arr1.js} +4 -4
  21. package/dist/cli/{curation-policy-8j6qn6nt.js → curation-policy-5hm6328s.js} +6 -6
  22. package/dist/cli/{curator-mc0wcpvw.js → curator-891pc8b7.js} +43 -43
  23. package/dist/cli/{curator-drift-d1wedyed.js → curator-drift-sxzs48ew.js} +9 -9
  24. package/dist/cli/curator-llm-factory-cvrt4bf9.js +82 -0
  25. package/dist/cli/{doctor-knowledge-receipt-phase-id-dfwx5jha.js → doctor-knowledge-receipt-phase-id-mvbj576e.js} +9 -9
  26. package/dist/cli/{evidence-summary-service-k1shqefr.js → evidence-summary-service-x9nxvmn5.js} +20 -20
  27. package/dist/cli/{gate-evidence-vw9y4gs6.js → gate-evidence-dxd20wrc.js} +8 -8
  28. package/dist/cli/guardrail-explain-fga9bnvt.js +83 -0
  29. package/dist/cli/{guardrail-log-vbeyx6nq.js → guardrail-log-y84b9m8n.js} +8 -8
  30. package/dist/cli/{guardrail-reset-jwtt15e3.js → guardrail-reset-xpcsxyt0.js} +43 -43
  31. package/dist/cli/{hive-promoter-p9ad63mx.js → hive-promoter-w1vchgfr.js} +43 -43
  32. package/dist/cli/{index-at34nry4.js → index-174j0g38.js} +5 -5
  33. package/dist/cli/{index-48h1yn6c.js → index-2grr37ry.js} +5 -5
  34. package/dist/cli/{index-yfbk69b1.js → index-31b55cq9.js} +6 -6
  35. package/dist/cli/{index-d7pznffh.js → index-391ydd25.js} +4 -4
  36. package/dist/cli/{index-jrs2qh6j.js → index-3drq02r1.js} +4 -4
  37. package/dist/cli/{index-t6aae9wq.js → index-3hpjqa6y.js} +1 -1
  38. package/dist/cli/{index-9bzgea2y.js → index-41p9zzpe.js} +4 -4
  39. package/dist/cli/{index-kp5qw5p4.js → index-4cazf4kb.js} +45 -45
  40. package/dist/cli/{index-5rkh69f3.js → index-4gmxdkcd.js} +2 -2
  41. package/dist/cli/{index-qh93qjc2.js → index-6183at3v.js} +2 -2
  42. package/dist/cli/{index-rpnkp79f.js → index-7gqmqhzj.js} +6 -6
  43. package/dist/cli/{index-mtqwyjrg.js → index-7rtq2t5n.js} +1 -1
  44. package/dist/cli/{index-n5xwza76.js → index-7zkgdefv.js} +7 -7
  45. package/dist/cli/{index-7bfshvq1.js → index-8bsnnnj2.js} +3 -3
  46. package/dist/cli/{index-0e318vgt.js → index-app2rmxv.js} +1 -1
  47. package/dist/cli/{index-vjytfp05.js → index-bjaef5zn.js} +293 -94
  48. package/dist/cli/{index-668npagp.js → index-c5xvm318.js} +1 -1
  49. package/dist/cli/{index-vg8sxg12.js → index-crz772sx.js} +1 -1
  50. package/dist/cli/{index-6s3ab22d.js → index-dfrcc46h.js} +2 -2
  51. package/dist/cli/{index-ndec8akq.js → index-gc0aeth5.js} +2 -2
  52. package/dist/cli/{index-fd6b9f38.js → index-ghckhk16.js} +2 -2
  53. package/dist/cli/{index-ehab3z5y.js → index-hjma52c8.js} +4 -4
  54. package/dist/cli/{index-1jt12p3y.js → index-hqrkr9ag.js} +1 -1
  55. package/dist/cli/{index-w2vbaczx.js → index-hy2fqapm.js} +1 -1
  56. package/dist/cli/{index-st80sjg7.js → index-j8t1g5qd.js} +1 -1
  57. package/dist/cli/{index-cwr69qw7.js → index-jnjvghgp.js} +7 -7
  58. package/dist/cli/{index-vfdkvvkf.js → index-knxq5byr.js} +2 -2
  59. package/dist/cli/{index-84k9zzv1.js → index-kphy4we7.js} +1 -1
  60. package/dist/cli/{index-ajkdt5b8.js → index-mt5t492g.js} +4 -4
  61. package/dist/cli/{index-7njm9jk1.js → index-necqa5bj.js} +2 -2
  62. package/dist/cli/{index-4ftg3p9n.js → index-nqxbqb50.js} +2 -2
  63. package/dist/cli/{index-x7qeaa9y.js → index-nrqyc8pr.js} +43 -43
  64. package/dist/cli/{index-0xe19j9g.js → index-ppnpkww2.js} +1 -1
  65. package/dist/cli/{index-h14wpwpa.js → index-psqfkgav.js} +4 -4
  66. package/dist/cli/{index-3atkcqpb.js → index-ry5g9s8d.js} +1 -1
  67. package/dist/cli/{index-6xppb1er.js → index-ryjp0wmq.js} +1 -1
  68. package/dist/cli/{index-y3n9ry9q.js → index-sgt1d7ez.js} +3 -3
  69. package/dist/cli/{index-f3ttgqak.js → index-svbh91pz.js} +2 -2
  70. package/dist/cli/{index-51dxek4p.js → index-t5med3ga.js} +4 -4
  71. package/dist/cli/{index-43v5axvm.js → index-te61qv0q.js} +5 -5
  72. package/dist/cli/{index-9v43y7y6.js → index-tjc68trf.js} +11 -11
  73. package/dist/cli/{index-r8mavcg6.js → index-tzasccpd.js} +5 -5
  74. package/dist/cli/{index-dy7nztyp.js → index-vsa05smc.js} +12 -10
  75. package/dist/cli/{index-9kbnxb7v.js → index-w3mav870.js} +2 -2
  76. package/dist/cli/{index-3dpb3kps.js → index-wscg5ryb.js} +4 -4
  77. package/dist/cli/{index-e8k0v19e.js → index-xmbtwtgw.js} +1 -1
  78. package/dist/cli/{index-hfssjyxs.js → index-yf2z4j7s.js} +2 -2
  79. package/dist/cli/{index-hfnyykvm.js → index-ypkfhqbc.js} +7 -7
  80. package/dist/cli/index.js +44 -44
  81. package/dist/cli/{knowledge-escalator-g6dctrae.js → knowledge-escalator-2dy96d0j.js} +15 -15
  82. package/dist/cli/{knowledge-events-acdz0x2g.js → knowledge-events-70kb745b.js} +13 -13
  83. package/dist/cli/{knowledge-link-srnt95wh.js → knowledge-link-8bn2b7vr.js} +5 -5
  84. package/dist/cli/{knowledge-store-vxtj4m59.js → knowledge-store-hvq03g0j.js} +6 -6
  85. package/dist/cli/{knowledge-validator-b545vc9t.js → knowledge-validator-eaatcnkr.js} +8 -8
  86. package/dist/cli/{mcp-c3t18313.js → mcp-bj3awdfy.js} +1 -1
  87. package/dist/cli/{model-preflight-r99c08re.js → model-preflight-skhq4xtr.js} +43 -43
  88. package/dist/cli/{pending-delegations-57f3049j.js → pending-delegations-yamzv468.js} +12 -12
  89. package/dist/cli/{pr-subscriptions-5jb793xe.js → pr-subscriptions-hkzd0nr4.js} +12 -12
  90. package/dist/cli/{pr-workflow-gate-n3x25ddw.js → pr-workflow-gate-2gmznmj4.js} +57 -43
  91. package/dist/cli/{runner-b2e89cp1.js → runner-rt2smh14.js} +6 -6
  92. package/dist/cli/{scan-cursor-s9mazw82.js → scan-cursor-arezehhk.js} +7 -7
  93. package/dist/cli/{schema-7czxpvwm.js → schema-emx6r32d.js} +2 -2
  94. package/dist/cli/{scope-persistence-y0ebqyjm.js → scope-persistence-tvr8w7ea.js} +16 -16
  95. package/dist/cli/{server-m10e78ey.js → server-ez03wdw9.js} +43 -43
  96. package/dist/cli/{skill-generator-kzw1dcba.js → skill-generator-w0jy1mpc.js} +17 -17
  97. package/dist/cli/{snapshot-coordination-init-z1aqsvn4.js → snapshot-coordination-init-2x56ds8a.js} +43 -43
  98. package/dist/cli/{speckit-checkoff-1g3vzywn.js → speckit-checkoff-c2e5wezr.js} +5 -5
  99. package/dist/cli/{telemetry-qaymh4gg.js → telemetry-vapc5q4p.js} +1 -1
  100. package/dist/cli/{workspace-snapshot-p69t9zn7.js → workspace-snapshot-e3kw9kpg.js} +3 -3
  101. package/dist/cli/{worktree-collision-ownership-d0etv08a.js → worktree-collision-ownership-1bgcea0v.js} +13 -13
  102. package/dist/cli/{worktree-isolation-dj2qw13p.js → worktree-isolation-9xp4dz41.js} +43 -43
  103. package/dist/commands/registry.d.ts +1 -1
  104. package/dist/epic/start.d.ts +5 -4
  105. package/dist/hooks/pr-workflow-gate.d.ts +153 -0
  106. package/dist/host/v2/agents-commands.d.ts +13 -3
  107. package/dist/host/v2/session-client.d.ts +45 -26
  108. package/dist/index.js +99 -94
  109. package/dist/pr-review/legacy-transcript-adapter.d.ts +54 -0
  110. package/dist/pr-review/render-review-body.d.ts +20 -0
  111. package/dist/sbom/detectors/index.d.ts +15 -0
  112. package/dist/tools/dispatch-lanes.d.ts +16 -1
  113. package/dist/tools/sbom-generate.d.ts +1 -1
  114. package/package.json +1 -1
  115. package/dist/cli/curator-llm-factory-97dpqjz4.js +0 -82
  116. package/dist/cli/guardrail-explain-24g3bsqw.js +0 -83
@@ -1,5 +1,5 @@
1
1
  /**
2
- * v2 session client shim — issue #3169 Phase 2.
2
+ * v2 session client shim — issue #3169 Phase 2 (+ Phase 3 lane sessions).
3
3
  *
4
4
  * A narrow `OpencodeClient` subset implementing exactly the v1 session surface
5
5
  * Epic's dispatch paths use (`session.create/prompt/abort/delete` plus `get`,
@@ -14,27 +14,36 @@
14
14
  * findings on @opencode/cli 2.0.26):
15
15
  *
16
16
  * - `create({body:{parentID,title}, query:{directory}})` validates placement
17
- * BEFORE creating anything: v2 child sessions inherit the parent's
18
- * directory and ignore the requested one (Phase 0 C1 catch), so a divergent
19
- * or unverifiable placement fails closed with a typed `{data: null,
20
- * error}` result — routing worktree isolation to its existing degradation
21
- * path instead of silently running a "lane" session in the project root.
22
- * A passing precheck mints a placeholder id; the real v2 session is
23
- * created at PROMPT time, when the v1 prompt body supplies the create-time
24
- * options (agent/model/permissions) the published `SessionCreateInput`
25
- * expects (issue R2: one session per dispatch contains the per-session
26
- * shift).
17
+ * BEFORE creating anything. Phase 3: a CONFIRMED parent-directory divergence
18
+ * (the worktree-isolation lane shape — a lane worktree directory always
19
+ * differs from the parent's project root) now takes the EAGER path: a REAL
20
+ * parentless host session created immediately in the requested directory
21
+ * (Phase 0 C1: parented children inherit the parent's directory; parentless
22
+ * creates honor the requested one), placement verified post-create (echo,
23
+ * `get` fallback) with a remove-and-fail-closed guard, and the requested
24
+ * `parentID` REMEMBERED plugin-side and overlaid onto `get` results so
25
+ * `prWorkflowSessionResolver`'s first-hop controller resolution
26
+ * (`pr-workflow-session-resolver.ts`) and `lookupParentSessionIDForTaskRoute`
27
+ * stay v1-faithful for parentless lane children (the host-side link is what
28
+ * the v2 host cannot carry here). A real id is returned — the native
29
+ * `subagent` tool resumes it by id (Phase 0 C7). Unverifiable parent
30
+ * placement still fails closed with the Phase 2 typed error (live-verification
31
+ * item), and same-directory/parentless creates keep the deferred placeholder
32
+ * (the real create there must carry prompt-time options — permissions are
33
+ * create-time-only on v2).
27
34
  * - `prompt({path:{id}, body:{agent,model?,system?,tools,parts}, signal?})`
28
- * emulates the v1 BLOCKING call: real create (carrying agent/model and the
29
- * read-only denial map as `effect:'deny'` permissions) → one sessionID-
30
- * scoped `context` hook that replaces `event.system` (fence-aware: parts
31
- * carrying the `<swarm_system_directive` provenance fence survive, per
32
- * #2526) and deletes denied keys from `event.tools` → `prompt` → bounded
33
- * `wait` → `context()` translated into the v1 `{data:{info,parts}}`
34
- * envelope so `dispatchEphemeralAgent` and `readProviderMessageError`
35
- * work unchanged. A prompt addressed to a non-placeholder (real) session
36
- * id takes a direct path without re-creating — the pr-event-delivery wake
37
- * prompt shape.
35
+ * emulates the v1 BLOCKING call over three arms keyed on the registry:
36
+ * (1) an EAGER record → full treatment on the real session — `switchAgent` +
37
+ * `switchModel`, a sessionID-scoped `context` hook (fence-aware system
38
+ * replacement preserving `<swarm_system_directive` parts, denied-tool
39
+ * deletion from `event.tools`), epoch-scoped error clear, `prompt` →
40
+ * bounded `wait` → `context()`; (2) a deferred/already-prompted PLACEHOLDER
41
+ * → real create carrying agent/model + the read-only denial map as
42
+ * `effect:'deny'` permissions, then the same hook/prompt/wait/context
43
+ * sequence, with the #3186 PRR-002 retire-and-recreate on re-prompts;
44
+ * (3) a foreign real id → the direct path (agent switch only). All three
45
+ * translate into the v1 `{data:{info,parts}}` envelope so
46
+ * `dispatchEphemeralAgent` and `readProviderMessageError` work unchanged.
38
47
  * - Provider failures are EVENT-SOURCED on v2 (Phase 0 C4: no error text in
39
48
  * `context()`), so the event pump records `session.error` /
40
49
  * `session.execution.failed` payloads here (`recordV2SessionErrorFromEnvelope`,
@@ -42,15 +51,25 @@
42
51
  * translation surfaces them as the v1 `info.error` shape. A failed outcome
43
52
  * without recorded detail yields a bounded `provider.unknown` error
44
53
  * instead of a silent empty success.
45
- * - `abort` maps to `interrupt`, `delete` to `remove`, `get` to the v2 get
46
- * (unresolved placeholders read as `{data: null}` — never prompted means
47
- * gone, satisfying `teardownEphemeralSessionVerified`).
54
+ * - `abort` maps to `interrupt`, `delete` to `remove` (eager records are
55
+ * pruned after the removal resolves — the id is real, so a later `get`
56
+ * still resolves through to a host that reports the session gone), and
57
+ * `get` maps `{path:{id}}` onto `ctx.session.get({sessionID})` returning
58
+ * `{data: info}` — verified teardown through the shim resolves.
59
+ *
60
+ * Registry (invariant 8): placeholder and eager records share ONE bounded map
61
+ * (cap 64, FIFO). Placeholder residue is intentionally not pruned (keep-for-get);
62
+ * that residue shares the cap, so a live eager record can be evicted after 64
63
+ * later insertions of any kind — a disclosed, bounded degradation (its next
64
+ * prompt takes the direct path and the parentID overlay stops applying), pinned
65
+ * in tests/unit/host/v2/session-client-lane-3169.test.ts.
48
66
  *
49
67
  * Deferred-work marker: NONE. The unverified live-host behaviors this design
50
68
  * rests on are recorded as deferrals in the trace (context-hook firing for
51
69
  * plugin-created sessions, permission vocabulary honor, `context()` entry
52
- * shapes, `wait` on failed prompts, `get(parent).location` availability) with
53
- * the owning follow-up on #3169.
70
+ * shapes, `wait` on failed prompts, `get(parent).location` availability,
71
+ * parentless subagent resume + parentID overlay — LVD-1..LVD-4) with the owning
72
+ * follow-up on #3169.
54
73
  *
55
74
  * C6 await convention: every `await` lives inside a `deferredV2Session*`
56
75
  * function declaration or `const deferredV2SessionX = async (` binding — the