opencode-swarm 7.187.3 → 7.188.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 (92) 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/delegation-lifecycle.d.ts +4 -0
  4. package/dist/cli/{auto-checkpoint-521fehr3.js → auto-checkpoint-hm3qjke6.js} +7 -7
  5. package/dist/cli/{checkpoint-czx5eken.js → checkpoint-z3eprns8.js} +12 -12
  6. package/dist/cli/{coder-settlement-skfkfgt7.js → coder-settlement-enhpgjdh.js} +8 -8
  7. package/dist/cli/{config-doctor-t88fd5ra.js → config-doctor-pfwj6c8d.js} +11 -11
  8. package/dist/cli/{core-fap9x47g.js → core-r7ypbkzn.js} +1 -1
  9. package/dist/cli/{curation-policy-e1ce7ha8.js → curation-policy-v64ctcbd.js} +5 -5
  10. package/dist/cli/{curator-drift-ea11apaw.js → curator-drift-4e9p7afg.js} +5 -5
  11. package/dist/cli/{curator-llm-factory-758hynyn.js → curator-llm-factory-gnx5wyx0.js} +35 -35
  12. package/dist/cli/{curator-b7zzsv98.js → curator-m1f5tpmq.js} +35 -35
  13. package/dist/cli/{doctor-knowledge-receipt-phase-id-5768wb0n.js → doctor-knowledge-receipt-phase-id-mdvra07t.js} +6 -6
  14. package/dist/cli/{evidence-summary-service-z2yj87tn.js → evidence-summary-service-64nqgkaw.js} +15 -15
  15. package/dist/cli/{gate-evidence-m90ynftc.js → gate-evidence-22eweae0.js} +5 -5
  16. package/dist/cli/{guardrail-explain-y2g82gqv.js → guardrail-explain-e6z5x5jt.js} +36 -36
  17. package/dist/cli/{guardrail-log-c50qd8sf.js → guardrail-log-x53wpnp0.js} +6 -6
  18. package/dist/cli/{guardrail-reset-h7g9a90e.js → guardrail-reset-zr13a010.js} +35 -35
  19. package/dist/cli/{hive-promoter-wpcn3wyz.js → hive-promoter-knbj0apv.js} +35 -35
  20. package/dist/cli/{index-w3xapqjq.js → index-00mqbc83.js} +3 -3
  21. package/dist/cli/{index-5x8zhfsq.js → index-0dvkbkhg.js} +3 -3
  22. package/dist/cli/{index-bkcd3nwh.js → index-0v2svrev.js} +1 -1
  23. package/dist/cli/{index-468s960k.js → index-170k2yeh.js} +1 -1
  24. package/dist/cli/{index-ez4kkgcd.js → index-1wzsp7ag.js} +3 -3
  25. package/dist/cli/{index-7t15ybzn.js → index-2bdebshy.js} +3 -3
  26. package/dist/cli/{index-by488z8m.js → index-41v699sv.js} +3 -3
  27. package/dist/cli/{index-sec8fwf1.js → index-4htcpbs4.js} +67 -48
  28. package/dist/cli/{index-zbv9t6p2.js → index-4ws5agzc.js} +6 -6
  29. package/dist/cli/{index-6551m2st.js → index-64s3825r.js} +2 -2
  30. package/dist/cli/{index-japwz660.js → index-6j6fmw3r.js} +1 -1
  31. package/dist/cli/{index-h7p78r0w.js → index-6qef1jtq.js} +4 -4
  32. package/dist/cli/{index-mdxrk3az.js → index-6zpfvs4t.js} +3 -3
  33. package/dist/cli/{index-zzgv4jy6.js → index-78ag9dsc.js} +4 -4
  34. package/dist/cli/{index-xpj149rz.js → index-7sbyvk99.js} +1 -1
  35. package/dist/cli/{index-4tmk29gc.js → index-7vrnbtsk.js} +1 -1
  36. package/dist/cli/{index-7fekgghd.js → index-8b0gmpm6.js} +7 -7
  37. package/dist/cli/{index-h03j41jw.js → index-8tqt8fbf.js} +4 -4
  38. package/dist/cli/{index-10h0jx4e.js → index-8xzsncfk.js} +4 -4
  39. package/dist/cli/{index-mh3nsv7v.js → index-9yw1fgpp.js} +2 -2
  40. package/dist/cli/{index-6rdajskg.js → index-aahk3yq1.js} +138 -102
  41. package/dist/cli/{index-yk9vs9pw.js → index-af1qsczg.js} +2 -2
  42. package/dist/cli/{index-hrxr48p5.js → index-b9pz70d0.js} +2 -2
  43. package/dist/cli/{index-a5pjm9zc.js → index-bd4agttq.js} +2 -2
  44. package/dist/cli/{index-v8ytrkrg.js → index-dfyjz036.js} +77 -11
  45. package/dist/cli/{index-ksvm96bz.js → index-ggdwbsc3.js} +1 -1
  46. package/dist/cli/{index-by7x4ty3.js → index-j5ecgr3f.js} +35 -35
  47. package/dist/cli/{index-fk7s8btv.js → index-jd3hvnqn.js} +2 -2
  48. package/dist/cli/{index-45d3vpry.js → index-jj222n0z.js} +1 -1
  49. package/dist/cli/{index-02nzb100.js → index-k333nq26.js} +2 -2
  50. package/dist/cli/{index-7ba0hdg4.js → index-mb1reyw3.js} +1 -1
  51. package/dist/cli/{index-5ktekhxk.js → index-nf22t88g.js} +1 -1
  52. package/dist/cli/{index-m3dcecc5.js → index-qe3e6z5c.js} +37 -37
  53. package/dist/cli/{index-nsvm2j4x.js → index-rwabrcsg.js} +1 -1
  54. package/dist/cli/{index-npkxp81s.js → index-txecan4h.js} +14 -9
  55. package/dist/cli/{index-wvkbp1qr.js → index-w4309fkk.js} +6 -6
  56. package/dist/cli/{index-e3vbyy10.js → index-x73e0zkb.js} +1 -1
  57. package/dist/cli/{index-w9p41945.js → index-xgr0rjhh.js} +1 -1
  58. package/dist/cli/{index-naxtsh2e.js → index-zwbheerv.js} +4 -4
  59. package/dist/cli/{index-q0am9gm3.js → index-zwgh0gty.js} +1 -1
  60. package/dist/cli/index.js +36 -36
  61. package/dist/cli/{knowledge-escalator-wzsxp6yg.js → knowledge-escalator-w043k3ah.js} +12 -12
  62. package/dist/cli/{knowledge-events-dcchq50n.js → knowledge-events-krd8ndqh.js} +10 -10
  63. package/dist/cli/{knowledge-link-zh9rzesj.js → knowledge-link-9gx2djyd.js} +4 -4
  64. package/dist/cli/{knowledge-store-p27r8wa9.js → knowledge-store-0x9ejztz.js} +5 -5
  65. package/dist/cli/{knowledge-validator-rmtymth5.js → knowledge-validator-y7pr7h3g.js} +7 -7
  66. package/dist/cli/{mcp-jr1rr2zd.js → mcp-tf5b5aqa.js} +1 -1
  67. package/dist/cli/{model-preflight-xzy5x4rt.js → model-preflight-pt6n1re7.js} +35 -35
  68. package/dist/cli/{pending-delegations-4k740a2c.js → pending-delegations-rqfgnay0.js} +7 -7
  69. package/dist/cli/{pr-subscriptions-515xdgjj.js → pr-subscriptions-1frpr34c.js} +7 -7
  70. package/dist/cli/{pr-workflow-gate-srpa0mds.js → pr-workflow-gate-dhzvaqj8.js} +35 -35
  71. package/dist/cli/{runner-tk1cmgzt.js → runner-x8sbydkw.js} +5 -5
  72. package/dist/cli/{scan-cursor-w89sck5y.js → scan-cursor-nm6h3gdd.js} +6 -6
  73. package/dist/cli/{schema-1mwgvrv7.js → schema-4fxm5b9r.js} +1 -1
  74. package/dist/cli/{scope-persistence-qen27qx7.js → scope-persistence-3hs7yy2b.js} +11 -11
  75. package/dist/cli/{server-rhz44ye9.js → server-tmjef10y.js} +35 -35
  76. package/dist/cli/{skill-generator-05mxym3d.js → skill-generator-qk0gpwhq.js} +14 -14
  77. package/dist/cli/{snapshot-coordination-init-jjegs3v5.js → snapshot-coordination-init-pqsgthaa.js} +35 -35
  78. package/dist/cli/{speckit-checkoff-3m04ks95.js → speckit-checkoff-9kx59cdb.js} +3 -3
  79. package/dist/cli/{telemetry-vwxbsnye.js → telemetry-d0j31j5d.js} +1 -1
  80. package/dist/cli/{worktree-collision-ownership-0d73y8h0.js → worktree-collision-ownership-d890zzka.js} +7 -7
  81. package/dist/cli/{worktree-isolation-d0vn38wb.js → worktree-isolation-45hj9jy7.js} +35 -35
  82. package/dist/commands/close/align-stage.d.ts +26 -0
  83. package/dist/commands/close/context.d.ts +8 -0
  84. package/dist/commands/close/internals.d.ts +1 -1
  85. package/dist/commands/destructive-purge.d.ts +55 -27
  86. package/dist/commands/registry.d.ts +1 -1
  87. package/dist/hooks/knowledge-validator.d.ts +18 -1
  88. package/dist/index.js +20 -19
  89. package/dist/observability/catalog.d.ts +3 -3
  90. package/dist/telemetry.d.ts +15 -1
  91. package/dist/tools/repo-map.d.ts +4 -0
  92. package/package.json +1 -1
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-zbv9t6p2.js";
5
+ } from "./index-4ws5agzc.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
- } from "./index-q0am9gm3.js";
8
+ } from "./index-zwgh0gty.js";
9
9
  import {
10
10
  init_git_executable,
11
11
  resolveGitExecutableAsync
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  observeStoreHealth
4
- } from "./index-7ba0hdg4.js";
4
+ } from "./index-mb1reyw3.js";
5
5
  import {
6
6
  telemetry
7
- } from "./index-sec8fwf1.js";
7
+ } from "./index-4htcpbs4.js";
8
8
  import {
9
9
  init_logger,
10
10
  warn
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-5ktekhxk.js";
5
+ } from "./index-nf22t88g.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-4tmk29gc.js";
8
+ } from "./index-7vrnbtsk.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
@@ -7,7 +7,7 @@ import {
7
7
  loadPlan,
8
8
  transientBackoff,
9
9
  updateTaskCheckpointReceipt
10
- } from "./index-7fekgghd.js";
10
+ } from "./index-8b0gmpm6.js";
11
11
  import {
12
12
  tool
13
13
  } from "./index-9nyqt3kb.js";
@@ -23,10 +23,10 @@ import {
23
23
  } from "./index-bejxkee0.js";
24
24
  import {
25
25
  readLedgerEvents
26
- } from "./index-naxtsh2e.js";
26
+ } from "./index-zwbheerv.js";
27
27
  import {
28
28
  appendCoreEventSync
29
- } from "./index-hrxr48p5.js";
29
+ } from "./index-b9pz70d0.js";
30
30
  import {
31
31
  derivePlanId,
32
32
  derivePlanIdentityHash
@@ -44,7 +44,7 @@ import {
44
44
  } from "./index-r6e8syr3.js";
45
45
  import {
46
46
  loadPluginConfigWithMeta
47
- } from "./index-5ktekhxk.js";
47
+ } from "./index-nf22t88g.js";
48
48
  import {
49
49
  init_git_executable,
50
50
  resolveGitExecutable
@@ -65,9 +65,11 @@ import * as fs4 from "fs";
65
65
  import * as path5 from "path";
66
66
 
67
67
  // src/commands/destructive-purge.ts
68
+ import { spawnSync } from "child_process";
68
69
  import { createHash, randomBytes } from "crypto";
69
70
  import * as fs from "fs";
70
71
  import * as path from "path";
72
+ init_git_executable();
71
73
  init_logger();
72
74
  var PENDING_PURGE_PATH = "pending-purge.json";
73
75
  var PENDING_PURGE_TTL_MS = 15 * 60 * 1000;
@@ -78,8 +80,72 @@ var _internals = {
78
80
  atomicWriteSwarmFileSync,
79
81
  now: () => Date.now(),
80
82
  randomBytes,
81
- scopeDigest
83
+ scopeDigest,
84
+ runGitStatus: runGitStatusSync
82
85
  };
86
+ var GIT_STATUS_ARGS = ["status", "--porcelain"];
87
+ function runGitStatusSync(args, cwd) {
88
+ const result = spawnSync(resolveGitExecutable(), args, {
89
+ cwd,
90
+ encoding: "utf8",
91
+ timeout: 1e4,
92
+ maxBuffer: 1024 * 1024,
93
+ windowsHide: true,
94
+ stdio: ["ignore", "pipe", "pipe"]
95
+ });
96
+ if (result.error || result.status !== 0)
97
+ return null;
98
+ return result.stdout ?? "";
99
+ }
100
+ function parseTrackedDirtyPaths(statusOutput) {
101
+ const dirtyPaths = [];
102
+ for (const line of statusOutput.split(`
103
+ `)) {
104
+ if (!line)
105
+ continue;
106
+ if (line.startsWith("??"))
107
+ continue;
108
+ const filePath = line.slice(3).trim().replace(/^"|"$/g, "");
109
+ if (!filePath)
110
+ continue;
111
+ if (/[RC]/.test(line.slice(0, 2)) && filePath.includes(" -> ")) {
112
+ for (const side of filePath.split(" -> ")) {
113
+ const cleaned = side.trim().replace(/^"|"$/g, "");
114
+ if (cleaned)
115
+ dirtyPaths.push(cleaned);
116
+ }
117
+ } else {
118
+ dirtyPaths.push(filePath);
119
+ }
120
+ }
121
+ return dirtyPaths;
122
+ }
123
+ function readTrackedDirtyPaths(directory) {
124
+ const statusOutput = _internals.runGitStatus(GIT_STATUS_ARGS, directory);
125
+ if (statusOutput === null)
126
+ return { ok: false };
127
+ return { ok: true, dirtyPaths: parseTrackedDirtyPaths(statusOutput) };
128
+ }
129
+ function recheckBeforeDestructive(directory, expectedDirtyPaths) {
130
+ const read = readTrackedDirtyPaths(directory);
131
+ if (!read.ok) {
132
+ return {
133
+ ok: false,
134
+ reason: "git status could not be re-read before the destructive reset \u2014 the confirmed scope cannot be re-verified",
135
+ newDirtyPaths: []
136
+ };
137
+ }
138
+ const expected = new Set(expectedDirtyPaths);
139
+ const newDirtyPaths = read.dirtyPaths.filter((p) => !expected.has(p));
140
+ if (newDirtyPaths.length > 0) {
141
+ return {
142
+ ok: false,
143
+ reason: `${newDirtyPaths.length} tracked file(s) changed after the close gate was verified`,
144
+ newDirtyPaths
145
+ };
146
+ }
147
+ return { ok: true, dirtyPaths: read.dirtyPaths };
148
+ }
83
149
  function pendingPath(directory) {
84
150
  return validateSwarmPath(directory, PENDING_PURGE_PATH);
85
151
  }
@@ -370,7 +436,7 @@ function backupTrackedChangesBeforeRollback(directory, repoRelPaths) {
370
436
 
371
437
  // src/commands/rollback-gate.ts
372
438
  init_git_executable();
373
- import { spawnSync } from "child_process";
439
+ import { spawnSync as spawnSync2 } from "child_process";
374
440
  import * as fsSync from "fs";
375
441
  import * as path3 from "path";
376
442
  var ROLLBACK_GIT_KIND = "swarm-rollback-git";
@@ -379,7 +445,7 @@ var GIT_STATUS_TIMEOUT_MS = 1e4;
379
445
  var GIT_LIST_MAX_BUFFER_BYTES = 32 * 1024 * 1024;
380
446
  var _rollbackGateInternals = {
381
447
  runGit: (args, cwd) => {
382
- const result = spawnSync(resolveGitExecutable(), args, {
448
+ const result = spawnSync2(resolveGitExecutable(), args, {
383
449
  cwd,
384
450
  encoding: "utf-8",
385
451
  timeout: GIT_STATUS_TIMEOUT_MS,
@@ -391,7 +457,7 @@ var _rollbackGateInternals = {
391
457
  return result.stdout ?? "";
392
458
  },
393
459
  runGitBuffered: (args, cwd) => {
394
- const result = spawnSync(resolveGitExecutable(), args, {
460
+ const result = spawnSync2(resolveGitExecutable(), args, {
395
461
  cwd,
396
462
  encoding: "utf-8",
397
463
  timeout: GIT_STATUS_TIMEOUT_MS,
@@ -413,7 +479,7 @@ function isRealGitRepository(directory) {
413
479
  }
414
480
  return fsSync.existsSync(path3.join(directory, ".git", "HEAD"));
415
481
  }
416
- function parseTrackedDirtyPaths(statusOutput) {
482
+ function parseTrackedDirtyPaths2(statusOutput) {
417
483
  const dirtyPaths = [];
418
484
  const tokens = statusOutput.split("\x00");
419
485
  for (let i = 0;i < tokens.length; i += 1) {
@@ -471,7 +537,7 @@ function measureGitDestruction(directory, targetSha) {
471
537
  if (status === null) {
472
538
  return { kind: "unreadable" };
473
539
  }
474
- const dirtyRelPaths = parseTrackedDirtyPaths(status);
540
+ const dirtyRelPaths = parseTrackedDirtyPaths2(status);
475
541
  if (targetSha) {
476
542
  for (const rel of untrackedPathsInTargetTree(directory, targetSha)) {
477
543
  if (!dirtyRelPaths.includes(rel))
@@ -1449,4 +1515,4 @@ var checkpoint = createSwarmTool({
1449
1515
  }
1450
1516
  });
1451
1517
 
1452
- export { previewDestructivePurge, issueConfirmToken, consumeConfirmToken, executeDestructivePurge, backupSwarmStateBeforeReset, ROLLBACK_GIT_KIND, ROLLBACK_PHASE_KIND, trackedDirtyCandidates, swarmOverwriteCandidates, measureGitDestruction, resolveWorkingDirectory, createSwarmTool, _internals2 as _internals, saveCheckpointRecord, checkpoint };
1518
+ export { GIT_STATUS_ARGS, parseTrackedDirtyPaths, recheckBeforeDestructive, previewDestructivePurge, issueConfirmToken, consumeConfirmToken, executeDestructivePurge, backupSwarmStateBeforeReset, ROLLBACK_GIT_KIND, ROLLBACK_PHASE_KIND, trackedDirtyCandidates, swarmOverwriteCandidates, measureGitDestruction, resolveWorkingDirectory, createSwarmTool, _internals2 as _internals, saveCheckpointRecord, checkpoint };
@@ -242,7 +242,7 @@ var _internals2 = {
242
242
  symlinkSync: fs2.symlinkSync
243
243
  },
244
244
  writeScopeToDisk: async (directory, taskId, files) => {
245
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-qen27qx7.js");
245
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-3hs7yy2b.js");
246
246
  return realWrite(directory, taskId, files);
247
247
  },
248
248
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -23,76 +23,76 @@ import {
23
23
  resolveFallbackModel,
24
24
  resolvePrimaryAgentNames,
25
25
  stripSwarmPrefix
26
- } from "./index-6rdajskg.js";
27
- import"./index-ez4kkgcd.js";
28
- import"./index-6551m2st.js";
29
- import"./index-7t15ybzn.js";
26
+ } from "./index-aahk3yq1.js";
27
+ import"./index-1wzsp7ag.js";
28
+ import"./index-64s3825r.js";
29
+ import"./index-2bdebshy.js";
30
30
  import"./index-vx8a8w3b.js";
31
- import"./index-e3vbyy10.js";
32
- import"./index-fk7s8btv.js";
31
+ import"./index-x73e0zkb.js";
32
+ import"./index-jd3hvnqn.js";
33
33
  import"./index-txdagbh7.js";
34
- import"./index-yk9vs9pw.js";
34
+ import"./index-af1qsczg.js";
35
35
  import {
36
36
  createExplorerAgent
37
37
  } from "./index-rdec0y3z.js";
38
- import"./index-45d3vpry.js";
39
- import"./index-zzgv4jy6.js";
40
- import"./index-5x8zhfsq.js";
41
- import"./index-wvkbp1qr.js";
38
+ import"./index-jj222n0z.js";
39
+ import"./index-78ag9dsc.js";
40
+ import"./index-0dvkbkhg.js";
41
+ import"./index-w4309fkk.js";
42
42
  import"./index-mf19yqss.js";
43
- import"./index-by488z8m.js";
43
+ import"./index-41v699sv.js";
44
44
  import"./index-cjapb4hy.js";
45
45
  import"./index-a8gvszr2.js";
46
46
  import"./index-pt7h91zc.js";
47
47
  import"./index-q7sjgr1y.js";
48
- import"./index-v8ytrkrg.js";
49
- import"./index-7fekgghd.js";
48
+ import"./index-dfyjz036.js";
49
+ import"./index-8b0gmpm6.js";
50
50
  import"./index-6b295cas.js";
51
51
  import"./index-9nyqt3kb.js";
52
- import"./index-w9p41945.js";
52
+ import"./index-xgr0rjhh.js";
53
53
  import"./index-zsrtt42s.js";
54
- import"./index-468s960k.js";
55
- import"./index-w3xapqjq.js";
56
- import"./index-ksvm96bz.js";
54
+ import"./index-170k2yeh.js";
55
+ import"./index-00mqbc83.js";
56
+ import"./index-ggdwbsc3.js";
57
57
  import"./index-g4fs6z4e.js";
58
- import"./index-10h0jx4e.js";
59
- import"./index-h7p78r0w.js";
60
- import"./index-h03j41jw.js";
58
+ import"./index-8xzsncfk.js";
59
+ import"./index-6qef1jtq.js";
60
+ import"./index-8tqt8fbf.js";
61
61
  import"./index-m9zzj4ee.js";
62
62
  import"./index-bejxkee0.js";
63
63
  import"./index-2s7dvzff.js";
64
- import"./index-npkxp81s.js";
65
- import"./index-nsvm2j4x.js";
64
+ import"./index-txecan4h.js";
65
+ import"./index-rwabrcsg.js";
66
66
  import"./index-rtry5xyf.js";
67
- import"./index-a5pjm9zc.js";
67
+ import"./index-bd4agttq.js";
68
68
  import"./index-kbkk7vnh.js";
69
69
  import"./index-0725jpp7.js";
70
- import"./index-02nzb100.js";
71
- import"./index-naxtsh2e.js";
72
- import"./index-hrxr48p5.js";
70
+ import"./index-k333nq26.js";
71
+ import"./index-zwbheerv.js";
72
+ import"./index-b9pz70d0.js";
73
73
  import"./index-m1qy7f1e.js";
74
74
  import"./index-cc1vzq4m.js";
75
75
  import"./index-9hag235h.js";
76
76
  import"./index-ry16d01s.js";
77
77
  import"./index-rdm3px0g.js";
78
78
  import"./index-7pmbnjvj.js";
79
- import"./index-7ba0hdg4.js";
80
- import"./index-zbv9t6p2.js";
79
+ import"./index-mb1reyw3.js";
80
+ import"./index-4ws5agzc.js";
81
81
  import"./index-vzm6zre7.js";
82
82
  import"./index-ae75rja9.js";
83
- import"./index-q0am9gm3.js";
84
- import"./index-xpj149rz.js";
85
- import"./index-bkcd3nwh.js";
83
+ import"./index-zwgh0gty.js";
84
+ import"./index-7sbyvk99.js";
85
+ import"./index-0v2svrev.js";
86
86
  import"./index-t7hmqgjy.js";
87
- import"./index-sec8fwf1.js";
87
+ import"./index-4htcpbs4.js";
88
88
  import"./index-fzpt2djt.js";
89
89
  import"./index-ejhxgyvm.js";
90
90
  import"./index-7g4c7s5r.js";
91
91
  import"./index-r6e8syr3.js";
92
92
  import"./index-gx2vp8gx.js";
93
- import"./index-5ktekhxk.js";
93
+ import"./index-nf22t88g.js";
94
94
  import"./index-zxdawwc7.js";
95
- import"./index-4tmk29gc.js";
95
+ import"./index-7vrnbtsk.js";
96
96
  import"./index-bstjg81q.js";
97
97
  import"./index-bk5tah7q.js";
98
98
  import"./index-gknz3bv1.js";
@@ -9,10 +9,10 @@ import {
9
9
  } from "./index-txdagbh7.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-xpj149rz.js";
12
+ } from "./index-7sbyvk99.js";
13
13
  import {
14
14
  withEvidenceLock
15
- } from "./index-bkcd3nwh.js";
15
+ } from "./index-0v2svrev.js";
16
16
  import {
17
17
  assertProjectRoot
18
18
  } from "./index-t7hmqgjy.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  readEffectiveSpecSync
4
- } from "./index-w9p41945.js";
4
+ } from "./index-xgr0rjhh.js";
5
5
  import {
6
6
  readSwarmFileAsync
7
7
  } from "./index-bejxkee0.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  computePlanStructureHash
4
- } from "./index-naxtsh2e.js";
4
+ } from "./index-zwbheerv.js";
5
5
  import {
6
6
  appendCoreEventSync
7
- } from "./index-hrxr48p5.js";
7
+ } from "./index-b9pz70d0.js";
8
8
  import {
9
9
  deleteCoordinationState,
10
10
  importCoordinationOnce,
@@ -3,7 +3,7 @@ import {
3
3
  pseudonymousRef,
4
4
  resolveLineageSalt,
5
5
  telemetry
6
- } from "./index-sec8fwf1.js";
6
+ } from "./index-4htcpbs4.js";
7
7
  import {
8
8
  canonicalRootKeyFresh
9
9
  } from "./index-fzpt2djt.js";
@@ -13,7 +13,7 @@ import {
13
13
  PluginConfigSchema,
14
14
  init_schema,
15
15
  resolveExternalSkillsConfig
16
- } from "./index-4tmk29gc.js";
16
+ } from "./index-7vrnbtsk.js";
17
17
  import {
18
18
  DangerousMergeKeyError,
19
19
  MAX_MERGE_DEPTH,
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-mh3nsv7v.js";
4
+ } from "./index-9yw1fgpp.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-japwz660.js";
7
+ } from "./index-6j6fmw3r.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  DEFAULT_CI_DEADLINE_MS,
@@ -97,77 +97,77 @@ import {
97
97
  handleWriteRetroCommand,
98
98
  normalizeSwarmCommandInput,
99
99
  resolveCommand
100
- } from "./index-6rdajskg.js";
101
- import"./index-ez4kkgcd.js";
102
- import"./index-6551m2st.js";
103
- import"./index-7t15ybzn.js";
100
+ } from "./index-aahk3yq1.js";
101
+ import"./index-1wzsp7ag.js";
102
+ import"./index-64s3825r.js";
103
+ import"./index-2bdebshy.js";
104
104
  import"./index-vx8a8w3b.js";
105
- import"./index-e3vbyy10.js";
106
- import"./index-fk7s8btv.js";
105
+ import"./index-x73e0zkb.js";
106
+ import"./index-jd3hvnqn.js";
107
107
  import"./index-txdagbh7.js";
108
- import"./index-yk9vs9pw.js";
108
+ import"./index-af1qsczg.js";
109
109
  import"./index-rdec0y3z.js";
110
- import"./index-45d3vpry.js";
111
- import"./index-zzgv4jy6.js";
112
- import"./index-5x8zhfsq.js";
113
- import"./index-wvkbp1qr.js";
110
+ import"./index-jj222n0z.js";
111
+ import"./index-78ag9dsc.js";
112
+ import"./index-0dvkbkhg.js";
113
+ import"./index-w4309fkk.js";
114
114
  import"./index-mf19yqss.js";
115
- import"./index-by488z8m.js";
115
+ import"./index-41v699sv.js";
116
116
  import"./index-cjapb4hy.js";
117
117
  import"./index-a8gvszr2.js";
118
118
  import"./index-pt7h91zc.js";
119
119
  import"./index-q7sjgr1y.js";
120
- import"./index-v8ytrkrg.js";
121
- import"./index-7fekgghd.js";
120
+ import"./index-dfyjz036.js";
121
+ import"./index-8b0gmpm6.js";
122
122
  import"./index-6b295cas.js";
123
123
  import"./index-9nyqt3kb.js";
124
- import"./index-w9p41945.js";
124
+ import"./index-xgr0rjhh.js";
125
125
  import"./index-zsrtt42s.js";
126
- import"./index-468s960k.js";
127
- import"./index-w3xapqjq.js";
128
- import"./index-ksvm96bz.js";
126
+ import"./index-170k2yeh.js";
127
+ import"./index-00mqbc83.js";
128
+ import"./index-ggdwbsc3.js";
129
129
  import"./index-g4fs6z4e.js";
130
- import"./index-10h0jx4e.js";
131
- import"./index-h7p78r0w.js";
132
- import"./index-h03j41jw.js";
130
+ import"./index-8xzsncfk.js";
131
+ import"./index-6qef1jtq.js";
132
+ import"./index-8tqt8fbf.js";
133
133
  import"./index-m9zzj4ee.js";
134
134
  import"./index-bejxkee0.js";
135
135
  import"./index-2s7dvzff.js";
136
- import"./index-npkxp81s.js";
137
- import"./index-nsvm2j4x.js";
136
+ import"./index-txecan4h.js";
137
+ import"./index-rwabrcsg.js";
138
138
  import"./index-rtry5xyf.js";
139
- import"./index-a5pjm9zc.js";
139
+ import"./index-bd4agttq.js";
140
140
  import"./index-kbkk7vnh.js";
141
141
  import"./index-0725jpp7.js";
142
- import"./index-02nzb100.js";
143
- import"./index-naxtsh2e.js";
144
- import"./index-hrxr48p5.js";
142
+ import"./index-k333nq26.js";
143
+ import"./index-zwbheerv.js";
144
+ import"./index-b9pz70d0.js";
145
145
  import"./index-m1qy7f1e.js";
146
146
  import"./index-cc1vzq4m.js";
147
147
  import"./index-9hag235h.js";
148
148
  import"./index-ry16d01s.js";
149
149
  import"./index-rdm3px0g.js";
150
150
  import"./index-7pmbnjvj.js";
151
- import"./index-7ba0hdg4.js";
152
- import"./index-zbv9t6p2.js";
151
+ import"./index-mb1reyw3.js";
152
+ import"./index-4ws5agzc.js";
153
153
  import"./index-vzm6zre7.js";
154
154
  import"./index-ae75rja9.js";
155
- import"./index-q0am9gm3.js";
156
- import"./index-xpj149rz.js";
157
- import"./index-bkcd3nwh.js";
155
+ import"./index-zwgh0gty.js";
156
+ import"./index-7sbyvk99.js";
157
+ import"./index-0v2svrev.js";
158
158
  import"./index-t7hmqgjy.js";
159
- import"./index-sec8fwf1.js";
159
+ import"./index-4htcpbs4.js";
160
160
  import"./index-fzpt2djt.js";
161
161
  import"./index-ejhxgyvm.js";
162
162
  import"./index-7g4c7s5r.js";
163
163
  import"./index-r6e8syr3.js";
164
164
  import"./index-gx2vp8gx.js";
165
- import"./index-5ktekhxk.js";
165
+ import"./index-nf22t88g.js";
166
166
  import"./index-zxdawwc7.js";
167
167
  import {
168
168
  init_schema,
169
169
  stripKnownSwarmPrefix
170
- } from "./index-4tmk29gc.js";
170
+ } from "./index-7vrnbtsk.js";
171
171
  import {
172
172
  AGENT_TOOL_MAP,
173
173
  ORCHESTRATOR_NAME,
@@ -11,7 +11,7 @@ import {
11
11
  readLinkPointer,
12
12
  resolveKnowledgeStoreDir,
13
13
  resolveLinkDir
14
- } from "./index-q0am9gm3.js";
14
+ } from "./index-zwgh0gty.js";
15
15
 
16
16
  // src/knowledge/curation-policy.ts
17
17
  import { readFile as readFile2 } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-nsvm2j4x.js";
4
+ } from "./index-rwabrcsg.js";
5
5
  import {
6
6
  findNearDuplicate,
7
7
  inferTags,
@@ -9,13 +9,13 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-zbv9t6p2.js";
12
+ } from "./index-4ws5agzc.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
- } from "./index-q0am9gm3.js";
15
+ } from "./index-zwgh0gty.js";
16
16
  import {
17
17
  atomicWriteFile
18
- } from "./index-xpj149rz.js";
18
+ } from "./index-7sbyvk99.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./index-7g4c7s5r.js";
@@ -579,16 +579,16 @@ function auditEntryHealth(entry) {
579
579
  async function quarantineEntry(directory, entryId, reason, reportedBy, curationContext) {
580
580
  if (!directory || directory.includes("..")) {
581
581
  warn("[knowledge-validator] quarantineEntry: directory traversal attempt blocked");
582
- return;
582
+ return { status: "invalid_input" };
583
583
  }
584
584
  if (!entryId || entryId.includes("\x00") || entryId.includes(`
585
585
  `)) {
586
586
  warn("[knowledge-validator] quarantineEntry: invalid entryId rejected");
587
- return;
587
+ return { status: "invalid_input" };
588
588
  }
589
589
  const validReportedBy = ["architect", "user", "auto"];
590
590
  if (!validReportedBy.includes(reportedBy)) {
591
- return;
591
+ return { status: "invalid_input" };
592
592
  }
593
593
  const sanitizedReason = reason.slice(0, 500).replace(/[\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\x0d]/g, "");
594
594
  const knowledgePath = resolveSwarmKnowledgePath(directory);
@@ -605,7 +605,7 @@ async function quarantineEntry(directory, entryId, reason, reportedBy, curationC
605
605
  const entries = await readKnowledge(knowledgePath);
606
606
  const entry = entries.find((e) => e.id === entryId);
607
607
  if (!entry) {
608
- return;
608
+ return { status: "not_found" };
609
609
  }
610
610
  if (curationContext) {
611
611
  const refreshedContext = {
@@ -615,7 +615,11 @@ async function quarantineEntry(directory, entryId, reason, reportedBy, curationC
615
615
  const decision = await authorizeCuration(curationContext.input, refreshedContext);
616
616
  if (!decision.authorized) {
617
617
  warn(`[knowledge-validator] quarantineEntry blocked by cohort-safety policy ` + `(basis: ${decision.basis}): ${decision.detail}`);
618
- return;
618
+ return {
619
+ status: "denied",
620
+ basis: decision.basis,
621
+ detail: decision.detail
622
+ };
619
623
  }
620
624
  }
621
625
  const remaining = entries.filter((e) => e.id !== entryId);
@@ -650,6 +654,7 @@ async function quarantineEntry(directory, entryId, reason, reportedBy, curationC
650
654
  };
651
655
  await appendFile(rejectedPath, `${JSON.stringify(rejectedRecord)}
652
656
  `, "utf-8");
657
+ return { status: "quarantined" };
653
658
  } finally {
654
659
  if (release) {
655
660
  await release();
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  readKnowledgeEvents,
4
4
  recordKnowledgeEvent
5
- } from "./index-h7p78r0w.js";
5
+ } from "./index-6qef1jtq.js";
6
6
  import {
7
7
  queryHistoricalOutcomes
8
- } from "./index-h03j41jw.js";
8
+ } from "./index-8tqt8fbf.js";
9
9
  import {
10
10
  jaccardBigram,
11
11
  readKnowledge,
@@ -13,7 +13,7 @@ import {
13
13
  resolveSwarmKnowledgePath,
14
14
  transactKnowledge,
15
15
  wordBigrams
16
- } from "./index-zbv9t6p2.js";
16
+ } from "./index-4ws5agzc.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -226,11 +226,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
226
226
  alreadyInactive: true
227
227
  };
228
228
  }
229
- const { quarantineEntry } = await import("./knowledge-validator-rmtymth5.js");
229
+ const { quarantineEntry } = await import("./knowledge-validator-y7pr7h3g.js");
230
230
  let policyConfig;
231
231
  try {
232
- const { KnowledgeConfigSchema } = await import("./schema-1mwgvrv7.js");
233
- const { loadPluginConfigWithMeta } = await import("./index-mdxrk3az.js");
232
+ const { KnowledgeConfigSchema } = await import("./schema-4fxm5b9r.js");
233
+ const { loadPluginConfigWithMeta } = await import("./index-6zpfvs4t.js");
234
234
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
235
235
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
236
236
  } catch {
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-fk7s8btv.js";
12
+ } from "./index-jd3hvnqn.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  writeSpeckitCheckoffLedger
4
- } from "./index-468s960k.js";
4
+ } from "./index-170k2yeh.js";
5
5
  import {
6
6
  validateSpecContent
7
7
  } from "./index-0725jpp7.js";