opencode-swarm 7.187.0 → 7.187.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.
Files changed (96) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/background/pr-review-contract.d.ts +2 -2
  4. package/dist/cli/{auto-checkpoint-r69e82bh.js → auto-checkpoint-2xmptd5t.js} +8 -8
  5. package/dist/cli/{checkpoint-1sqwbgra.js → checkpoint-2y7z19y5.js} +14 -13
  6. package/dist/cli/{coder-settlement-b9qx0732.js → coder-settlement-s4d28fa6.js} +9 -9
  7. package/dist/cli/{config-doctor-s4fr5qwr.js → config-doctor-312afzhr.js} +13 -12
  8. package/dist/cli/{core-bezezjy9.js → core-2bywxc4w.js} +2 -2
  9. package/dist/cli/{curation-policy-2x2w3b57.js → curation-policy-sr29thf5.js} +5 -5
  10. package/dist/cli/{curator-drift-785xnxdv.js → curator-drift-xx8pp4g9.js} +6 -6
  11. package/dist/cli/{curator-w4hp7a10.js → curator-dvhf6jex.js} +37 -35
  12. package/dist/cli/{curator-llm-factory-p0wwyswg.js → curator-llm-factory-4g2nvr76.js} +37 -35
  13. package/dist/cli/doctor-knowledge-receipt-phase-id-m239pgbz.js +83 -0
  14. package/dist/cli/{evidence-summary-service-33qcm9xc.js → evidence-summary-service-9et04fjh.js} +17 -16
  15. package/dist/cli/{gate-evidence-9ehj968e.js → gate-evidence-73vj3bgm.js} +6 -6
  16. package/dist/cli/{guardrail-explain-5715fdzv.js → guardrail-explain-8n4fx9zv.js} +38 -36
  17. package/dist/cli/{guardrail-log-k1dfzfzm.js → guardrail-log-9gmfvnd7.js} +7 -7
  18. package/dist/cli/{guardrail-reset-nt88n9dm.js → guardrail-reset-k3mrq25e.js} +37 -35
  19. package/dist/cli/{hive-promoter-c8fjn186.js → hive-promoter-bp3rz0q6.js} +37 -35
  20. package/dist/cli/{index-df2p0k0s.js → index-26zs9wsj.js} +2 -2
  21. package/dist/cli/{index-ectvhv8e.js → index-310h5192.js} +2 -2
  22. package/dist/cli/{index-en7vzpeq.js → index-33345434.js} +4 -4
  23. package/dist/cli/{index-2wgvjwpr.js → index-3ckfawjf.js} +3 -3
  24. package/dist/cli/{index-b2je0z0t.js → index-3g3n9fjq.js} +4 -4
  25. package/dist/cli/{index-ycz8z2db.js → index-3y0nr248.js} +3 -3
  26. package/dist/cli/{index-v08ksq0b.js → index-4g39nne8.js} +2 -2
  27. package/dist/cli/{index-t3hcd6zz.js → index-6t7ygevg.js} +1 -1
  28. package/dist/cli/{index-5m56c5r6.js → index-7fxy1s86.js} +4 -4
  29. package/dist/cli/{index-pymr99as.js → index-85cx1mmb.js} +4 -4
  30. package/dist/cli/{index-2s8wdagg.js → index-9jafghwk.js} +37 -35
  31. package/dist/cli/{index-evy5yrsw.js → index-b308erem.js} +3 -3
  32. package/dist/cli/{index-qzgfheb4.js → index-b5tthmy2.js} +2 -2
  33. package/dist/cli/{index-yw1g78v9.js → index-bstjg81q.js} +1 -1
  34. package/dist/cli/{index-hvr82s1t.js → index-dqberkr3.js} +4 -4
  35. package/dist/cli/{index-jtncfvhe.js → index-dx6bhbd6.js} +1 -1
  36. package/dist/cli/{index-ww8payq9.js → index-e9ry78z5.js} +2 -2
  37. package/dist/cli/{index-1vvr69ka.js → index-efbhea00.js} +1 -1
  38. package/dist/cli/{index-xs96nry2.js → index-exj7czz9.js} +4 -4
  39. package/dist/cli/{index-sztx0vyt.js → index-f6pft90q.js} +3 -3
  40. package/dist/cli/{index-6ersmqjd.js → index-j5db3v56.js} +318 -767
  41. package/dist/cli/{index-pts38j6x.js → index-jh9nrshe.js} +2 -2
  42. package/dist/cli/{index-0yj79yk1.js → index-jyxgkp4a.js} +1 -1
  43. package/dist/cli/index-kc635w60.js +748 -0
  44. package/dist/cli/{index-cppqxjw9.js → index-m1vsqmyr.js} +1 -1
  45. package/dist/cli/index-m9zzj4ee.js +10 -0
  46. package/dist/cli/{index-rm676s0p.js → index-n45kz69m.js} +1 -1
  47. package/dist/cli/{index-dypmvvga.js → index-n55exns2.js} +1 -1
  48. package/dist/cli/{index-pfpnzf6w.js → index-n8kqhxay.js} +1 -1
  49. package/dist/cli/{index-bbqxt1p5.js → index-pqffq9mm.js} +3 -3
  50. package/dist/cli/{index-knbjtqwt.js → index-rtdxyjrg.js} +8 -6
  51. package/dist/cli/{index-r7gt2w1b.js → index-tkm2rj27.js} +1 -1
  52. package/dist/cli/{index-cx4s7cak.js → index-tmp07h7b.js} +39 -37
  53. package/dist/cli/{index-ta48pe8j.js → index-tngc1erw.js} +3 -3
  54. package/dist/cli/{index-akt0arnt.js → index-tq6sbcys.js} +105 -185
  55. package/dist/cli/{index-c8ffgcvz.js → index-v9y0230d.js} +1 -1
  56. package/dist/cli/{index-469xmpd6.js → index-w0bvez8c.js} +1 -1
  57. package/dist/cli/{index-4g6sw4eq.js → index-wpxy7099.js} +1 -1
  58. package/dist/cli/{index-yf0cc6c5.js → index-xs070yr9.js} +2 -2
  59. package/dist/cli/{index-zzxnssy3.js → index-xv0t2sed.js} +4 -4
  60. package/dist/cli/{index-krqq8kbq.js → index-y81jjedn.js} +6 -6
  61. package/dist/cli/{index-d6kvatwp.js → index-z04d01pv.js} +11 -16
  62. package/dist/cli/index.js +38 -36
  63. package/dist/cli/{knowledge-escalator-qttydcx2.js → knowledge-escalator-fnqctvxz.js} +14 -12
  64. package/dist/cli/{knowledge-events-4vf0vj82.js → knowledge-events-mr1vh3nb.js} +12 -10
  65. package/dist/cli/{knowledge-link-p2c8agc8.js → knowledge-link-93nzznwd.js} +4 -4
  66. package/dist/cli/{knowledge-store-bw1dk2eb.js → knowledge-store-dxy4s9k6.js} +5 -5
  67. package/dist/cli/{knowledge-validator-gefcc36h.js → knowledge-validator-gy39attk.js} +7 -7
  68. package/dist/cli/{mcp-d5p0k3p1.js → mcp-bxb59wsq.js} +1 -1
  69. package/dist/cli/{model-preflight-fmx49pwy.js → model-preflight-2kje0sp0.js} +37 -35
  70. package/dist/cli/{pending-delegations-8333cb3y.js → pending-delegations-fm2nx2k0.js} +7 -7
  71. package/dist/cli/{pr-subscriptions-p42ny2sn.js → pr-subscriptions-g4f9rehb.js} +7 -7
  72. package/dist/cli/{pr-workflow-gate-csy32z8w.js → pr-workflow-gate-qtq1wq95.js} +37 -35
  73. package/dist/cli/{runner-cbpr45cs.js → runner-verr6er5.js} +5 -5
  74. package/dist/cli/{scan-cursor-14mwymtz.js → scan-cursor-8taj944f.js} +6 -6
  75. package/dist/cli/{schema-6426g0gw.js → schema-yxq3bjmd.js} +2 -2
  76. package/dist/cli/{scope-persistence-avkv3s4m.js → scope-persistence-jppvjncr.js} +12 -12
  77. package/dist/cli/{server-d9rk2zeb.js → server-2s7wqg9e.js} +37 -35
  78. package/dist/cli/{skill-generator-epdvdsh5.js → skill-generator-pyf95aqw.js} +16 -14
  79. package/dist/cli/{snapshot-coordination-init-35f7wrqb.js → snapshot-coordination-init-8gbxw9sa.js} +37 -35
  80. package/dist/cli/{speckit-checkoff-erwa7fbj.js → speckit-checkoff-x2z0jamv.js} +4 -4
  81. package/dist/cli/{telemetry-2vwb3n42.js → telemetry-xwj899pd.js} +1 -1
  82. package/dist/cli/{worktree-collision-ownership-3tqkw81h.js → worktree-collision-ownership-455bdcnk.js} +7 -7
  83. package/dist/cli/{worktree-isolation-0rrjqypt.js → worktree-isolation-8x4p7tvm.js} +37 -35
  84. package/dist/commands/doctor-knowledge-receipt-phase-id.d.ts +16 -0
  85. package/dist/hooks/extractors.d.ts +15 -0
  86. package/dist/hooks/knowledge-injector.d.ts +5 -0
  87. package/dist/hooks/knowledge-receipt-ledger.d.ts +50 -4
  88. package/dist/hooks/knowledge-receipt-observability.d.ts +1 -1
  89. package/dist/hooks/phase-complete-directive-gate.d.ts +18 -1
  90. package/dist/hooks/phase-directives.d.ts +7 -3
  91. package/dist/index.js +469 -460
  92. package/dist/state.d.ts +26 -3
  93. package/dist/tools/phase-complete.d.ts +2 -2
  94. package/dist/tools/repair-knowledge-receipt-ledger.d.ts +26 -0
  95. package/dist/utils/path.d.ts +23 -0
  96. package/package.json +1 -1
package/dist/state.d.ts CHANGED
@@ -1249,14 +1249,37 @@ export declare function recordPhaseAgentDispatch(sessionId: string, agentName: s
1249
1249
  /**
1250
1250
  * Atomically replace one task's attributed file list.
1251
1251
  *
1252
+ * Callers MUST pass `workspaceDirectory`: omitting it silently drops
1253
+ * absolute entries (issue #2925 review, PRR-014).
1254
+ *
1255
+ * Issue #2925: entries are canonicalized at this write boundary to the
1256
+ * portable form (repo-relative against `workspaceDirectory` when provided,
1257
+ * forward-slashed, win32-case-folded via `normalizePath`); entries that
1258
+ * cannot be proven canonical — absolutes without a base, `..`-escapes —
1259
+ * drop silently (entries are advisory). Legacy snapshot entries bypass this
1260
+ * boundary by design (deserializeModifiedFilesByTask builds the map
1261
+ * directly) and stay readable via read-side canonicalization.
1262
+ *
1252
1263
  * Returns false without mutation when the task id is invalid or the bounded
1253
1264
  * map has no reclaimable workflow-complete slot.
1254
1265
  */
1255
- export declare function recordModifiedFilesForTask(session: AgentSessionState, taskId: string, files: readonly string[]): boolean;
1266
+ export declare function recordModifiedFilesForTask(session: AgentSessionState, taskId: string, files: readonly string[], workspaceDirectory?: string): boolean;
1256
1267
  /**
1257
1268
  * Add one file to a task's attribution without disturbing its existing files.
1258
- */
1259
- export declare function recordModifiedFileForTask(session: AgentSessionState, taskId: string, file: string): boolean;
1269
+ *
1270
+ * Callers MUST pass `workspaceDirectory`: omitting it silently drops
1271
+ * absolute entries (they cannot be proven in-workspace), with no other
1272
+ * signal (issue #2925 review, PRR-014).
1273
+ *
1274
+ * Issue #2925: the INCOMING entry is canonicalized against
1275
+ * `workspaceDirectory` (same rules as the plural setter); a
1276
+ * non-canonicalizable incoming entry drops silently with a `true` return
1277
+ * (advisory no-op — pre-existing invalid-input/invalid-taskId paths still
1278
+ * return false). Stored legacy raw entries are deliberately NOT
1279
+ * re-canonicalized by an append; they persist verbatim until the task's list
1280
+ * is atomically replaced by a producer.
1281
+ */
1282
+ export declare function recordModifiedFileForTask(session: AgentSessionState, taskId: string, file: string, workspaceDirectory?: string): boolean;
1260
1283
  /**
1261
1284
  * Whether a per-task attribution slot EXISTS for the task (present-but-empty
1262
1285
  * counts as present). Distinguishes "no record" from "record with zero files"
@@ -9,10 +9,10 @@ import type { ReviewAgentModelRegistry } from '../review/runtime.js';
9
9
  import { runArchitectureSupervisorGate, runCompletionVerifyGate, runDriftGate, runFinalCouncilGate, runFinalReviewGate, runHallucinationGate, runMutationGate, runPhaseCouncilGate, runTodoGateGate } from './phase-complete/gates/index.js';
10
10
  /** Narrow seam for receipt/plan ordering tests. */
11
11
  export declare const phaseCompleteReceiptInternals: {
12
- recordPhaseCloseIntent: (directory: string, phase: string, sessionId?: string, taskId?: string) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
12
+ recordPhaseCloseIntent: (directory: string, phase: string, sessionId?: string, taskId?: string, phaseId?: number) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
13
13
  event_id: string;
14
14
  }>>;
15
- commitPhaseClosed: (directory: string, phase: string, sessionId?: string, taskId?: string) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
15
+ commitPhaseClosed: (directory: string, phase: string, sessionId?: string, taskId?: string, phaseId?: number) => Promise<import("../hooks/knowledge-receipt-ledger.js").ReceiptLedgerResult<{
16
16
  event_id: string;
17
17
  }>>;
18
18
  rebindCursorTaggedReceipts: (directory: string, plan: {
@@ -2,16 +2,38 @@ import type { ToolContext, ToolDefinition } from '@opencode-ai/plugin/tool';
2
2
  import { type RepairKnowledgeReceiptLedgerInput } from '../hooks/knowledge-receipt-ledger.js';
3
3
  export declare function executeRepairKnowledgeReceiptLedger(args: RepairKnowledgeReceiptLedgerInput & {
4
4
  working_directory?: string;
5
+ operation?: 'repair' | 'backfill_phase_id';
5
6
  }, directory: string, _ctx?: ToolContext): Promise<{
6
7
  success: boolean;
7
8
  message: string;
8
9
  errors: string[];
9
10
  code?: undefined;
11
+ backfilled?: undefined;
12
+ skipped?: undefined;
13
+ skipped_total?: undefined;
14
+ journal_records?: undefined;
10
15
  } | {
11
16
  success: boolean;
12
17
  message: string;
13
18
  errors: string[];
14
19
  code: import("../hooks/knowledge-receipt-ledger-storage.js").ReceiptStoreErrorCode | "legacy_unverifiable";
20
+ backfilled?: undefined;
21
+ skipped?: undefined;
22
+ skipped_total?: undefined;
23
+ journal_records?: undefined;
24
+ } | {
25
+ success: boolean;
26
+ message: string;
27
+ backfilled: number;
28
+ skipped: {
29
+ trace_id: string;
30
+ entry_id: string;
31
+ label?: string;
32
+ }[];
33
+ skipped_total: number;
34
+ journal_records: number;
35
+ errors?: undefined;
36
+ code?: undefined;
15
37
  } | {
16
38
  ok: true;
17
39
  status: "validated_projection" | "repaired_authority" | "pending_re_evaluation";
@@ -23,5 +45,9 @@ export declare function executeRepairKnowledgeReceiptLedger(args: RepairKnowledg
23
45
  message: string;
24
46
  errors?: undefined;
25
47
  code?: undefined;
48
+ backfilled?: undefined;
49
+ skipped?: undefined;
50
+ skipped_total?: undefined;
51
+ journal_records?: undefined;
26
52
  }>;
27
53
  export declare const repair_knowledge_receipt_ledger: ToolDefinition;
@@ -1 +1,24 @@
1
1
  export declare function normalizePath(p: string): string;
2
+ /**
3
+ * Canonicalize one per-task file-attribution entry to the portable form used
4
+ * by `modifiedFilesByTask` (issue #2925): repo-relative against the writer's
5
+ * workspace directory, forward-slashed, win32-case-folded via
6
+ * {@link normalizePath}.
7
+ *
8
+ * Returns null (drop) for entries that cannot be proven canonical:
9
+ * - absolute input without a `workspaceDirectory` (no base to resolve
10
+ * against — storing it raw is exactly the pre-#2925 defect);
11
+ * - any input whose resolved form escapes the workspace (`..`-prefixed or
12
+ * absolute relative, e.g. a different drive on win32);
13
+ * - relative input with a `..` segment when no base is available (a leading
14
+ * or inner `..` can never appear in a repo-relative path);
15
+ * - empty/whitespace-only input, or a path that collapses to '.' (the
16
+ * workspace root itself is not a file entry).
17
+ *
18
+ * Entries are advisory, so drops are silent by contract (the caller never
19
+ * throws on a dropped entry). The snapshot deserializer
20
+ * (`deserializeModifiedFilesByTask`) intentionally sits OUTSIDE this
21
+ * boundary: legacy raw entries round-trip verbatim from old snapshots and
22
+ * remain covered by read-side canonicalization.
23
+ */
24
+ export declare function canonicalAttributionPath(raw: string, workspaceDirectory?: string): string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-swarm",
3
- "version": "7.187.0",
3
+ "version": "7.187.2",
4
4
  "description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",