opencode-swarm 7.200.9 → 7.200.11

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 (119) hide show
  1. package/.opencode/skills/ci-fix-monitor/SKILL.md +49 -0
  2. package/.opencode/skills/swarm-pr-review/references/lane-output-recoverability.md +11 -2
  3. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  4. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  5. package/dist/background/completion-observer.d.ts +2 -1
  6. package/dist/background/pending-delegations.d.ts +9 -1
  7. package/dist/background/pr-review-contract.d.ts +8 -0
  8. package/dist/cli/{attest-task-79gp34gf.js → attest-task-y0n69zgb.js} +78 -76
  9. package/dist/cli/{auto-checkpoint-kt9mr7ma.js → auto-checkpoint-hyaksmtg.js} +12 -12
  10. package/dist/cli/{capability-probe-dwqn2609.js → capability-probe-qjndmx6z.js} +1 -1
  11. package/dist/cli/{checkpoint-e7t1zbz2.js → checkpoint-t0p781sc.js} +23 -23
  12. package/dist/cli/{coder-settlement-rehndcey.js → coder-settlement-nh88s6es.js} +14 -13
  13. package/dist/cli/{config-doctor-hcemxnra.js → config-doctor-sf7hc0q4.js} +19 -19
  14. package/dist/cli/{core-k8mvhsty.js → core-p168fw3r.js} +6 -3
  15. package/dist/cli/{curation-policy-gy868ec3.js → curation-policy-1a23ftnv.js} +6 -6
  16. package/dist/cli/{curator-ayenbz0y.js → curator-5ayzhk7v.js} +53 -52
  17. package/dist/cli/{curator-drift-fwzrv9tw.js → curator-drift-jx9kyndc.js} +10 -10
  18. package/dist/cli/curator-llm-factory-ytfkvtxs.js +83 -0
  19. package/dist/cli/{doctor-knowledge-receipt-phase-id-jdy6651j.js → doctor-knowledge-receipt-phase-id-2gjvxndy.js} +10 -10
  20. package/dist/cli/{evidence-summary-service-4jm1hd1r.js → evidence-summary-service-972sqht5.js} +26 -25
  21. package/dist/cli/{gate-evidence-anef2bqv.js → gate-evidence-n1m842gj.js} +10 -9
  22. package/dist/cli/guardrail-explain-6yv78gmk.js +84 -0
  23. package/dist/cli/{guardrail-log-pv3bq9hj.js → guardrail-log-z5pzgkcv.js} +8 -8
  24. package/dist/cli/{guardrail-reset-k8b9yrec.js → guardrail-reset-w0nxcs6a.js} +53 -52
  25. package/dist/cli/{hive-promoter-zqscx6pb.js → hive-promoter-3q0738xg.js} +53 -52
  26. package/dist/cli/{index-4krkevgc.js → index-001tkp0j.js} +1 -1
  27. package/dist/cli/{index-zy943kpp.js → index-0an54fza.js} +18 -13
  28. package/dist/cli/{index-czsx86m5.js → index-0g0x9ets.js} +53 -52
  29. package/dist/cli/{index-rdyfrdcp.js → index-2n7a184b.js} +201 -33
  30. package/dist/cli/{index-4fr3r8k5.js → index-2vj8d8te.js} +1 -1
  31. package/dist/cli/{index-hhq5f82z.js → index-5k88v1e7.js} +81 -36
  32. package/dist/cli/{index-c2k7q723.js → index-6cppzd9c.js} +1 -1
  33. package/dist/cli/{index-yyrnkc3a.js → index-6m551cng.js} +2 -2
  34. package/dist/cli/{index-y16v2q1x.js → index-814q5t5s.js} +5 -5
  35. package/dist/cli/{index-08jd4gz2.js → index-8g9rn3rp.js} +121 -40
  36. package/dist/cli/{index-8srvdpw6.js → index-8xtdxy91.js} +2 -2
  37. package/dist/cli/{index-mn75z39t.js → index-9qy3tzt5.js} +1 -1
  38. package/dist/cli/{index-6q2s7r67.js → index-aj41bscz.js} +8 -8
  39. package/dist/cli/{index-2c4hjeea.js → index-bnbhqvsn.js} +8 -8
  40. package/dist/cli/{index-9jty56xr.js → index-bv9tqmpm.js} +5 -5
  41. package/dist/cli/{index-casbh4y7.js → index-ce6qarfq.js} +13032 -12437
  42. package/dist/cli/{index-y7c4hqcj.js → index-ck7jpn0y.js} +1 -1
  43. package/dist/cli/{index-p2dst45x.js → index-ckq78kq1.js} +1 -1
  44. package/dist/cli/{index-8mrentmw.js → index-dp6hy23p.js} +58 -53
  45. package/dist/cli/{index-4fkxdnc7.js → index-erp7fk72.js} +1 -1
  46. package/dist/cli/{index-qawbxp81.js → index-gkvk9et2.js} +17 -17
  47. package/dist/cli/{index-kxp43wbw.js → index-h1chaf63.js} +29 -29
  48. package/dist/cli/{index-4ya4krts.js → index-hhzwfyd7.js} +611 -1376
  49. package/dist/cli/{index-x3rxa3sh.js → index-jt9j02tm.js} +6 -6
  50. package/dist/cli/{index-tecp3a77.js → index-kd1n3ne2.js} +9 -9
  51. package/dist/cli/{index-ss8nfrbb.js → index-ke881z7m.js} +15 -15
  52. package/dist/cli/{index-9ws7m02r.js → index-krjamprc.js} +2 -2
  53. package/dist/cli/{index-f8nb470m.js → index-kzr3nby8.js} +4 -4
  54. package/dist/cli/{index-02vgzrpg.js → index-mq4eyhtf.js} +7 -7
  55. package/dist/cli/{index-4tpzdegx.js → index-njg8zvqe.js} +7 -7
  56. package/dist/cli/{index-hh87yny7.js → index-nnc23ddw.js} +6 -6
  57. package/dist/cli/{index-7c4gckzq.js → index-nzhfhpng.js} +5 -5
  58. package/dist/cli/{index-q8vfw61p.js → index-pjrx4jkq.js} +1 -1
  59. package/dist/cli/{index-xhxbv7mz.js → index-qdz6zysj.js} +11 -11
  60. package/dist/cli/{index-mhd6kdzr.js → index-qyj4383m.js} +1 -1
  61. package/dist/cli/index-r097ettz.js +1330 -0
  62. package/dist/cli/{index-tvdn9gr0.js → index-ra3erqpk.js} +15 -15
  63. package/dist/cli/{index-2x015vjy.js → index-rck7v4r4.js} +1 -1
  64. package/dist/cli/{index-vtpt8yns.js → index-rjsqf4hv.js} +2 -2
  65. package/dist/cli/{index-bk8r4m9j.js → index-rpvp88js.js} +2 -2
  66. package/dist/cli/{index-2k5348b6.js → index-ssp4t8g6.js} +58 -57
  67. package/dist/cli/{index-v839c9mv.js → index-tggyracy.js} +1 -1
  68. package/dist/cli/{index-hzy6n59p.js → index-ve74c3a8.js} +6 -6
  69. package/dist/cli/{index-4ph7ad0b.js → index-vx1j2t5p.js} +2 -2
  70. package/dist/cli/{index-7h22y3ew.js → index-w0afnznk.js} +2 -2
  71. package/dist/cli/{index-xh50xsgf.js → index-x8sh8v4a.js} +8 -8
  72. package/dist/cli/{index-6901y99d.js → index-xht6gprr.js} +35 -22
  73. package/dist/cli/{index-qw2wfz92.js → index-yn6jrxen.js} +18 -20
  74. package/dist/cli/{index-94s844qn.js → index-yq73sd3w.js} +4 -4
  75. package/dist/cli/index.js +57 -56
  76. package/dist/cli/{knowledge-escalator-m4b4q218.js → knowledge-escalator-2e92rdsx.js} +18 -18
  77. package/dist/cli/{knowledge-events-wwg0cc7m.js → knowledge-events-gzqwr94e.js} +15 -15
  78. package/dist/cli/{knowledge-link-13t3nfrz.js → knowledge-link-r7e2t5c1.js} +5 -5
  79. package/dist/cli/{knowledge-store-07fwtdzy.js → knowledge-store-6j8d1gm4.js} +7 -7
  80. package/dist/cli/{knowledge-validator-8492vmn3.js → knowledge-validator-wt2tcfg7.js} +9 -9
  81. package/dist/cli/{mcp-b1wyrebx.js → mcp-ky6xn6ys.js} +1 -1
  82. package/dist/cli/{model-preflight-315wr8nt.js → model-preflight-ajt55s59.js} +56 -55
  83. package/dist/cli/{pending-delegations-tpa7wpny.js → pending-delegations-wry31649.js} +14 -14
  84. package/dist/cli/{pr-subscriptions-ev2bkbrz.js → pr-subscriptions-dsdjbfr4.js} +13 -13
  85. package/dist/cli/{pr-workflow-gate-3cg64r61.js → pr-workflow-gate-0vcq1m95.js} +53 -52
  86. package/dist/cli/{runner-q1g9atrv.js → runner-s4422dq4.js} +6 -6
  87. package/dist/cli/{scan-cursor-3pfx6mbh.js → scan-cursor-1zgrg7kp.js} +8 -8
  88. package/dist/cli/{schema-km0fywpx.js → schema-q9xbwkec.js} +2 -2
  89. package/dist/cli/{scope-persistence-xctbs0aj.js → scope-persistence-4wwmytwh.js} +18 -18
  90. package/dist/cli/{server-d1mcxa8s.js → server-q8ydxk7z.js} +79 -69
  91. package/dist/cli/{skill-generator-tce30v8g.js → skill-generator-b1eqcxej.js} +20 -20
  92. package/dist/cli/{snapshot-coordination-init-t7vfaqhw.js → snapshot-coordination-init-0yva5015.js} +53 -52
  93. package/dist/cli/{speckit-checkoff-tcn1dqt0.js → speckit-checkoff-sh9w7j5b.js} +5 -5
  94. package/dist/cli/{telemetry-cr8q16wk.js → telemetry-j7zr1dht.js} +1 -1
  95. package/dist/cli/workflow-wal-file-a2c8e920.js +32 -0
  96. package/dist/cli/{workspace-snapshot-7hws89e9.js → workspace-snapshot-ksdspd74.js} +3 -3
  97. package/dist/cli/{worktree-collision-ownership-5jb0p5aa.js → worktree-collision-ownership-xr6crt8c.js} +15 -15
  98. package/dist/cli/{worktree-isolation-cxg8fgba.js → worktree-isolation-0126b5e7.js} +53 -52
  99. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +3 -0
  100. package/dist/hooks/delegation-gate.d.ts +6 -0
  101. package/dist/hooks/guardrails/audit-log.d.ts +2 -0
  102. package/dist/hooks/guardrails/cmd-delete-grammar.d.ts +47 -0
  103. package/dist/hooks/guardrails/destructive-command.d.ts +11 -3
  104. package/dist/hooks/guardrails/shell-audit-store.d.ts +2 -0
  105. package/dist/hooks/guardrails/tool-before.d.ts +16 -0
  106. package/dist/hooks/shell-write-detect.d.ts +10 -0
  107. package/dist/index.js +689 -687
  108. package/dist/memory/redaction.d.ts +13 -3
  109. package/dist/pr-review/legacy-transcript-adapter.d.ts +15 -4
  110. package/dist/sandbox/macos/sandbox-exec-executor.d.ts +24 -0
  111. package/dist/workflow/coder-settlement.d.ts +5 -0
  112. package/dist/worktree/core.d.ts +3 -0
  113. package/dist/worktree/merge.d.ts +15 -1
  114. package/dist/worktree/ownership.d.ts +3 -0
  115. package/dist/worktree/settlement-artifact-lifecycle.d.ts +32 -0
  116. package/dist/worktree/settlement-source-recovery.d.ts +12 -0
  117. package/package.json +1 -1
  118. package/dist/cli/curator-llm-factory-kja1c81k.js +0 -82
  119. package/dist/cli/guardrail-explain-agaet7r5.js +0 -83
@@ -11,7 +11,7 @@ import {
11
11
  } from "./index-te9hq2f4.js";
12
12
  import {
13
13
  atomicWriteSwarmFileSync
14
- } from "./index-mn75z39t.js";
14
+ } from "./index-9qy3tzt5.js";
15
15
 
16
16
  // src/db/project-db.ts
17
17
  import { existsSync, mkdirSync, unlinkSync } from "fs";
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-4ph7ad0b.js";
12
+ } from "./index-vx1j2t5p.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -26,9 +26,8 @@ var init_bubblewrap = __esm(() => {
26
26
 
27
27
  // src/sandbox/macos/sandbox-exec-executor.ts
28
28
  import { spawnSync } from "child_process";
29
- import { existsSync, mkdtempSync, writeFileSync } from "fs";
29
+ import { existsSync, realpathSync } from "fs";
30
30
  import * as os from "os";
31
- import * as path from "path";
32
31
  function resolveBinary(absolutePath, bareName) {
33
32
  try {
34
33
  if (_internals.exists(absolutePath)) {
@@ -43,11 +42,24 @@ function resolveSandboxExecBinary() {
43
42
  function resolveProbeTargetBinary() {
44
43
  return resolveBinary(TRUE_ABSOLUTE, "true");
45
44
  }
45
+ function realpathOrSelf(p, fsx = REAL_FS) {
46
+ const match = SYSTEM_LINK_PREFIX.exec(p);
47
+ if (!match)
48
+ return p;
49
+ const target = `/private/${match[1]}`;
50
+ try {
51
+ if (fsx.realpath(`/${match[1]}`) !== target)
52
+ return p;
53
+ } catch {
54
+ return p;
55
+ }
56
+ return `/private${p}`;
57
+ }
46
58
  function buildProbeProfile(tempDir) {
47
59
  return `(version 1)
48
60
  (allow default)
49
61
  (deny file-write*)
50
- (allow file-write* (subpath "${sbplEscapePath(tempDir)}"))`;
62
+ (allow file-write* (subpath "${sbplEscapePath(realpathOrSelf(tempDir))}"))`;
51
63
  }
52
64
  function probeSandboxExec() {
53
65
  try {
@@ -120,17 +132,17 @@ function buildEnvOverridePrefix(envOverrides) {
120
132
  }
121
133
  return `${parts.join("; ")}; `;
122
134
  }
123
- function sbplEscapePath(path2) {
124
- const withoutControlChars = path2.split("").filter((ch) => {
135
+ function sbplEscapePath(path) {
136
+ const withoutControlChars = path.split("").filter((ch) => {
125
137
  const cp = ch.codePointAt(0);
126
138
  return cp >= 32 && cp !== 127;
127
139
  }).join("");
128
140
  return withoutControlChars.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
129
141
  }
130
142
  function buildSandboxProfile(scopePaths, tempDir) {
131
- const rwPaths = [...scopePaths];
143
+ const rwPaths = scopePaths.map((p) => realpathOrSelf(p));
132
144
  if (tempDir) {
133
- rwPaths.push(tempDir);
145
+ rwPaths.push(realpathOrSelf(tempDir));
134
146
  }
135
147
  const rwAllowLines = rwPaths.map((p) => `(allow file-write* (subpath "${sbplEscapePath(p)}"))`).join(`
136
148
  `);
@@ -195,21 +207,11 @@ class MacOSSandboxExecutor {
195
207
  const temp = tempDir ?? this._tempDir ?? os.tmpdir();
196
208
  const allScopes = [...this._scopePaths, ...scopePaths];
197
209
  const profile = buildSandboxProfile(allScopes, temp);
198
- let profilePath;
199
- try {
200
- const profileDir = mkdtempSync(path.join(os.tmpdir(), "sandbox-"));
201
- profilePath = path.join(profileDir, `profile-${process.pid}-${Date.now()}.sb`);
202
- writeFileSync(profilePath, profile, { mode: 384 });
203
- } catch (err) {
204
- const message = err instanceof Error ? err.message : String(err);
205
- warn(`Sandbox disabled: failed to write profile (${message}). Falling through to tool-layer enforcement.`);
206
- throw new SandboxError("Sandbox not available", "SANDBOX_UNAVAILABLE");
207
- }
208
210
  const binary = _internals.resolveSandboxExecBinary();
209
211
  const envPrefix = buildEnvOverridePrefix(envOverrides);
210
212
  const escapedCommand = shellEscape(`${envPrefix}${command}`);
211
- const escapedProfilePath = shellEscape(profilePath);
212
- return `${binary} -f '${escapedProfilePath}' bash -c '${escapedCommand}'`;
213
+ const escapedProfile = shellEscape(profile);
214
+ return `${binary} -p '${escapedProfile}' bash -c '${escapedCommand}'`;
213
215
  }
214
216
  getEnvOverrides() {
215
217
  return {
@@ -222,17 +224,20 @@ class MacOSSandboxExecutor {
222
224
  };
223
225
  }
224
226
  }
225
- var SANDBOX_UNAVAILABLE_CODES, SANDBOX_EXEC_ABSOLUTE = "/usr/bin/sandbox-exec", TRUE_ABSOLUTE = "/usr/bin/true", PROBE_FAILURE_TTL_MS = 60000, _probeMemo, _internals;
227
+ var SANDBOX_UNAVAILABLE_CODES, SANDBOX_EXEC_ABSOLUTE = "/usr/bin/sandbox-exec", TRUE_ABSOLUTE = "/usr/bin/true", REAL_FS, SYSTEM_LINK_PREFIX, PROBE_FAILURE_TTL_MS = 60000, _probeMemo, _internals;
226
228
  var init_sandbox_exec_executor = __esm(() => {
227
229
  init_logger();
228
230
  init_executor();
229
231
  SANDBOX_UNAVAILABLE_CODES = new Set(["ENOENT", "EACCES", "ENOSPC"]);
232
+ REAL_FS = { realpath: realpathSync };
233
+ SYSTEM_LINK_PREFIX = /^\/(tmp|var|etc)(?=\/|$)/;
230
234
  _internals = {
231
235
  probeSandboxExec,
232
236
  probeSandboxExecMemoized,
233
237
  resetProbeMemo,
234
238
  buildSandboxProfile,
235
239
  buildProbeProfile,
240
+ realpathOrSelf,
236
241
  buildEnvOverridePrefix,
237
242
  resolveSandboxExecBinary,
238
243
  resolveProbeTargetBinary,
@@ -318,7 +323,7 @@ var init_edge_cases = () => {};
318
323
  import { Buffer } from "buffer";
319
324
  import { spawnSync as spawnSync2 } from "child_process";
320
325
  import * as os2 from "os";
321
- import * as path2 from "path";
326
+ import * as path from "path";
322
327
  function containsUnsafePathSyntax(value) {
323
328
  return [...value].some((character) => character.charCodeAt(0) < 32 || UNSAFE_PATH_CHARACTERS.has(character));
324
329
  }
@@ -327,15 +332,15 @@ function getSafeSystemRoot() {
327
332
  if (typeof raw !== "string" || !/^[A-Za-z]:[\\/]/.test(raw) || containsUnsafePathSyntax(raw.slice(2)) || raw.slice(3).split(/[\\/]+/).some((segment) => segment === "." || segment === "..")) {
328
333
  return DEFAULT_SYSTEM_ROOT;
329
334
  }
330
- const normalized = path2.win32.normalize(raw);
335
+ const normalized = path.win32.normalize(raw);
331
336
  return normalized.length > 3 ? normalized.replace(/\\+$/, "") : normalized;
332
337
  }
333
338
  function getWindowsExecutablePaths() {
334
339
  const systemRoot = getSafeSystemRoot();
335
340
  return {
336
341
  systemRoot,
337
- cmdExe: path2.win32.join(systemRoot, "System32", "cmd.exe"),
338
- powerShellExe: path2.win32.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe")
342
+ cmdExe: path.win32.join(systemRoot, "System32", "cmd.exe"),
343
+ powerShellExe: path.win32.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe")
339
344
  };
340
345
  }
341
346
  function probeWindowsSandbox() {
@@ -371,13 +376,13 @@ function normalizeInheritedPathEntry(rawEntry) {
371
376
  if (!/^[A-Za-z]:[\\/]/.test(entry) || containsUnsafePathSyntax(entry.slice(2)) || entry.slice(3).split(/[\\/]+/).some((segment) => segment === "." || segment === "..")) {
372
377
  return null;
373
378
  }
374
- const normalized = path2.win32.normalize(entry);
379
+ const normalized = path.win32.normalize(entry);
375
380
  return normalized.length > 3 ? normalized.replace(/\\+$/, "") : normalized;
376
381
  }
377
382
  function getSafeWindowsPath() {
378
383
  const { systemRoot } = getWindowsExecutablePaths();
379
384
  const candidates = [
380
- path2.win32.join(systemRoot, "System32"),
385
+ path.win32.join(systemRoot, "System32"),
381
386
  systemRoot,
382
387
  ...(process.env.PATH ?? "").split(";")
383
388
  ];
@@ -408,7 +413,7 @@ function isPathInScopes(command, scopes) {
408
413
  const paths = command.match(pathPattern) || [];
409
414
  if (paths.length === 0)
410
415
  return true;
411
- const normalizedPaths = paths.map((p) => path2.win32.resolve(p));
416
+ const normalizedPaths = paths.map((p) => path.win32.resolve(p));
412
417
  const normalizedScopes = scopes.map((s) => s.toLowerCase().replace(/\\+$/, ""));
413
418
  return normalizedPaths.every((p) => {
414
419
  const lower = p.toLowerCase();
@@ -620,16 +625,16 @@ __export(exports_runner_client, {
620
625
  import { spawn, spawnSync as spawnSync3 } from "child_process";
621
626
  import * as fs from "fs";
622
627
  import * as os3 from "os";
623
- import * as path3 from "path";
628
+ import * as path2 from "path";
624
629
  import { fileURLToPath } from "url";
625
630
  function findRunnerBinary() {
626
631
  const arch = process.arch === "x64" ? "x64" : "arm64";
627
632
  const platform = "win32";
628
633
  const runtimeDir = _internals3.runtimeDir ?? _runtimeDir;
629
634
  const packagePaths = [
630
- path3.resolve(runtimeDir, "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
631
- path3.resolve(runtimeDir, "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
632
- path3.resolve(runtimeDir, "..", "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe")
635
+ path2.resolve(runtimeDir, "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
636
+ path2.resolve(runtimeDir, "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe"),
637
+ path2.resolve(runtimeDir, "..", "..", "..", "..", "binaries", `${platform}-${arch}`, "swarm-sandbox-runner.exe")
633
638
  ];
634
639
  for (const p of packagePaths) {
635
640
  try {
@@ -713,7 +718,7 @@ function probe() {
713
718
  capabilities,
714
719
  error: `runner protocol mismatch (got ${reportedProtocol ?? "none"}, expected ${RUNNER_PROTOCOL_SCHEMA_VERSION})`
715
720
  };
716
- criticalWarn(`[sandbox] ${_cachedProbe.error} at ${path3.basename(binary)} \u2014 stale or foreign runner binary refused; degrading to weak sandbox. Run /swarm diagnose for details.`);
721
+ criticalWarn(`[sandbox] ${_cachedProbe.error} at ${path2.basename(binary)} \u2014 stale or foreign runner binary refused; degrading to weak sandbox. Run /swarm diagnose for details.`);
717
722
  return _cachedProbe;
718
723
  }
719
724
  let mode = "none";
@@ -817,8 +822,8 @@ function _resetProbeCache() {
817
822
  }
818
823
  function buildDefaultPolicy(workspaceRoot, runId) {
819
824
  const id = runId ?? `swarm-${crypto.randomUUID?.() ?? Date.now()}`;
820
- const appData = process.env.LOCALAPPDATA ?? path3.join(os3.homedir(), "AppData", "Local");
821
- const tempRoot = path3.join(appData, "opencode-swarm", "sandbox", id, "temp");
825
+ const appData = process.env.LOCALAPPDATA ?? path2.join(os3.homedir(), "AppData", "Local");
826
+ const tempRoot = path2.join(appData, "opencode-swarm", "sandbox", id, "temp");
822
827
  return {
823
828
  schema_version: 1,
824
829
  run_id: id,
@@ -872,7 +877,7 @@ var init_runner_client = __esm(() => {
872
877
  import * as crypto2 from "crypto";
873
878
  import * as fs2 from "fs";
874
879
  import * as os4 from "os";
875
- import * as path4 from "path";
880
+ import * as path3 from "path";
876
881
 
877
882
  class NativeWindowsSandboxExecutor {
878
883
  mechanism;
@@ -950,11 +955,11 @@ class NativeWindowsSandboxExecutor {
950
955
  }
951
956
  }
952
957
  const policyJson = JSON.stringify(policy);
953
- const policyDir = path4.join(os4.tmpdir(), "swarm-sandbox-policies");
958
+ const policyDir = path3.join(os4.tmpdir(), "swarm-sandbox-policies");
954
959
  try {
955
960
  fs2.mkdirSync(policyDir, { recursive: true });
956
961
  } catch {}
957
- const policyFile = path4.join(policyDir, `${runId}.json`);
962
+ const policyFile = path3.join(policyDir, `${runId}.json`);
958
963
  fs2.writeFileSync(policyFile, policyJson, "utf-8");
959
964
  const mode = this._probeResult.mode === "none" ? "auto" : this._probeResult.mode;
960
965
  const escapedBinary = binary.includes(" ") ? `"${binary}"` : binary;
@@ -1047,7 +1052,7 @@ async function _createExecutor() {
1047
1052
  return null;
1048
1053
  }
1049
1054
  async function _createLinuxExecutor() {
1050
- const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isBubblewrapAvailable } = await import("./capability-probe-dwqn2609.js");
1055
+ const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isBubblewrapAvailable } = await import("./capability-probe-qjndmx6z.js");
1051
1056
  await new SandboxCapabilityProbe2().detect();
1052
1057
  if (!isBubblewrapAvailable()) {
1053
1058
  return null;
@@ -1067,7 +1072,7 @@ async function _createMacOSExecutor() {
1067
1072
  }
1068
1073
  return null;
1069
1074
  }
1070
- const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isSandboxExecAvailable } = await import("./capability-probe-dwqn2609.js");
1075
+ const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isSandboxExecAvailable } = await import("./capability-probe-qjndmx6z.js");
1071
1076
  await new SandboxCapabilityProbe2().detect();
1072
1077
  if (!isSandboxExecAvailable()) {
1073
1078
  return null;
@@ -1080,7 +1085,7 @@ async function _createMacOSExecutor() {
1080
1085
  }
1081
1086
  }
1082
1087
  async function _createWindowsExecutor() {
1083
- const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isWindowsSandboxAvailable } = await import("./capability-probe-dwqn2609.js");
1088
+ const { SandboxCapabilityProbe: SandboxCapabilityProbe2, isWindowsSandboxAvailable } = await import("./capability-probe-qjndmx6z.js");
1084
1089
  await new SandboxCapabilityProbe2().detect();
1085
1090
  if (!isWindowsSandboxAvailable()) {
1086
1091
  return null;
@@ -1327,7 +1332,7 @@ var init_bubblewrap_executor = __esm(() => {
1327
1332
  import { execFile, spawnSync as spawnSync5 } from "child_process";
1328
1333
  import * as fs3 from "fs";
1329
1334
  import * as os5 from "os";
1330
- import * as path5 from "path";
1335
+ import * as path4 from "path";
1331
1336
  function assessSandboxRequirements(capability, requirements) {
1332
1337
  if (!requirements || requirements.mode !== "required") {
1333
1338
  return { satisfied: true, missing: [] };
@@ -1347,7 +1352,7 @@ function assessSandboxRequirements(capability, requirements) {
1347
1352
  function fileIdentity(input) {
1348
1353
  if (!input)
1349
1354
  return "missing";
1350
- const candidate = path5.normalize(input);
1355
+ const candidate = path4.normalize(input);
1351
1356
  try {
1352
1357
  const link = fs3.lstatSync(candidate, { bigint: true });
1353
1358
  const stat = fs3.statSync(candidate, { bigint: true });
@@ -1387,11 +1392,11 @@ function resolveWindowsCommandProcessorBinary() {
1387
1392
  candidates.push(comSpec);
1388
1393
  }
1389
1394
  const pathEnv = process.env.Path ?? process.env.PATH ?? "";
1390
- for (const entry of pathEnv.split(path5.delimiter)) {
1395
+ for (const entry of pathEnv.split(path4.delimiter)) {
1391
1396
  const trimmed = entry.trim();
1392
1397
  if (!trimmed)
1393
1398
  continue;
1394
- candidates.push(path5.join(trimmed, "cmd.exe"));
1399
+ candidates.push(path4.join(trimmed, "cmd.exe"));
1395
1400
  }
1396
1401
  for (const candidate of candidates) {
1397
1402
  try {
@@ -1473,10 +1478,10 @@ function runBoundedSync(cmd, args, input) {
1473
1478
  }
1474
1479
  function probeLinuxBehavior() {
1475
1480
  const binary = _internals4.resolveBwrapBinary();
1476
- const tempRoot = fs3.mkdtempSync(path5.join(os5.tmpdir(), "swarm-bwrap-probe-"));
1477
- const allowedRoot = path5.join(tempRoot, "allowed");
1478
- const inScopeFile = path5.join(allowedRoot, "inside.txt");
1479
- const outOfScopeFile = path5.join(tempRoot, "outside.txt");
1481
+ const tempRoot = fs3.mkdtempSync(path4.join(os5.tmpdir(), "swarm-bwrap-probe-"));
1482
+ const allowedRoot = path4.join(tempRoot, "allowed");
1483
+ const inScopeFile = path4.join(allowedRoot, "inside.txt");
1484
+ const outOfScopeFile = path4.join(tempRoot, "outside.txt");
1480
1485
  fs3.mkdirSync(allowedRoot, { recursive: true });
1481
1486
  const reasons = [];
1482
1487
  let filesystem = "weak";
@@ -1551,11 +1556,11 @@ function probeLinuxBehavior() {
1551
1556
  }
1552
1557
  function probeMacOSBehavior() {
1553
1558
  const binary = _internals.resolveSandboxExecBinary();
1554
- const tempRoot = fs3.mkdtempSync(path5.join(os5.tmpdir(), "swarm-seatbelt-probe-"));
1555
- const allowedRoot = path5.join(tempRoot, "allowed");
1556
- const sandboxTemp = path5.join(tempRoot, "sandbox-tmp");
1557
- const inScopeFile = path5.join(allowedRoot, "inside.txt");
1558
- const outOfScopeFile = path5.join(tempRoot, "outside.txt");
1559
+ const tempRoot = fs3.mkdtempSync(path4.join(os5.tmpdir(), "swarm-seatbelt-probe-"));
1560
+ const allowedRoot = path4.join(tempRoot, "allowed");
1561
+ const sandboxTemp = path4.join(tempRoot, "sandbox-tmp");
1562
+ const inScopeFile = path4.join(allowedRoot, "inside.txt");
1563
+ const outOfScopeFile = path4.join(tempRoot, "outside.txt");
1559
1564
  fs3.mkdirSync(allowedRoot, { recursive: true });
1560
1565
  fs3.mkdirSync(sandboxTemp, { recursive: true });
1561
1566
  const profile = _internals.buildSandboxProfile([allowedRoot], sandboxTemp);
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFile
4
- } from "./index-yyrnkc3a.js";
4
+ } from "./index-6m551cng.js";
5
5
  import {
6
6
  canonicalRootKeyFresh
7
7
  } from "./index-te9hq2f4.js";
@@ -4,15 +4,28 @@ import {
4
4
  ensureTaskCheckpointReceipt,
5
5
  loadPlan,
6
6
  updateTaskCheckpointReceipt
7
- } from "./index-kxp43wbw.js";
7
+ } from "./index-h1chaf63.js";
8
8
  import {
9
9
  tool
10
10
  } from "./index-9nyqt3kb.js";
11
+ import {
12
+ readLedgerEvents
13
+ } from "./index-ra3erqpk.js";
11
14
  import {
12
15
  init_executor,
13
16
  isUntrustedEnvKey,
14
17
  isValidEnvKey
15
- } from "./index-8mrentmw.js";
18
+ } from "./index-dp6hy23p.js";
19
+ import {
20
+ appendCoreEventSync
21
+ } from "./index-rjsqf4hv.js";
22
+ import {
23
+ derivePlanId,
24
+ derivePlanIdentityHash
25
+ } from "./index-7pmbnjvj.js";
26
+ import {
27
+ loadPluginConfigWithMeta
28
+ } from "./index-mq4eyhtf.js";
16
29
  import {
17
30
  GitBinaryMissingError,
18
31
  GitSpawnCwdError,
@@ -22,17 +35,7 @@ import {
22
35
  } from "./index-spggmr30.js";
23
36
  import {
24
37
  validateSwarmPath
25
- } from "./index-4krkevgc.js";
26
- import {
27
- readLedgerEvents
28
- } from "./index-tvdn9gr0.js";
29
- import {
30
- appendCoreEventSync
31
- } from "./index-vtpt8yns.js";
32
- import {
33
- derivePlanId,
34
- derivePlanIdentityHash
35
- } from "./index-7pmbnjvj.js";
38
+ } from "./index-001tkp0j.js";
36
39
  import {
37
40
  assertProjectRoot,
38
41
  hasExplicitProjectBoundary,
@@ -43,10 +46,7 @@ import {
43
46
  } from "./index-ejhxgyvm.js";
44
47
  import {
45
48
  atomicWriteSwarmFileSync
46
- } from "./index-mn75z39t.js";
47
- import {
48
- loadPluginConfigWithMeta
49
- } from "./index-02vgzrpg.js";
49
+ } from "./index-9qy3tzt5.js";
50
50
  import {
51
51
  GIT_BINARY_ENV_VAR,
52
52
  describeGitResolution,
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-6b295cas.js";
5
5
  import {
6
6
  readEffectiveSpecSync
7
- } from "./index-hh87yny7.js";
7
+ } from "./index-nnc23ddw.js";
8
8
  import {
9
9
  _internals,
10
10
  clearWorktreeMergeStatus,
@@ -12,15 +12,6 @@ import {
12
12
  initDurableStatusPath,
13
13
  scanWorktreeMergeFailuresForRecovery
14
14
  } from "./index-697mg68b.js";
15
- import {
16
- sanitizeContextText
17
- } from "./index-m9zzj4ee.js";
18
- import {
19
- estimateCharsForTokens,
20
- estimateTokens,
21
- readSwarmFileAsync,
22
- validateSwarmPath
23
- } from "./index-4krkevgc.js";
24
15
  import {
25
16
  LedgerStaleWriterError,
26
17
  appendLedgerEvent,
@@ -39,7 +30,7 @@ import {
39
30
  replayFromLedgerWithStatus,
40
31
  takeSnapshotEvent,
41
32
  takeSnapshotWithRetry
42
- } from "./index-tvdn9gr0.js";
33
+ } from "./index-ra3erqpk.js";
43
34
  import {
44
35
  deleteCoordinationStateWithinTransaction,
45
36
  getCoordinationStateRaw,
@@ -48,26 +39,46 @@ import {
48
39
  transitionCoordinationState,
49
40
  transitionCoordinationStateWithinTransaction,
50
41
  withCoordinationTransaction
51
- } from "./index-2x015vjy.js";
42
+ } from "./index-rck7v4r4.js";
52
43
  import {
53
44
  DURABILITY_CLASSES,
54
45
  getProjectDb,
55
46
  projectDbExists,
56
47
  withDurabilityClass
57
- } from "./index-y7c4hqcj.js";
48
+ } from "./index-ck7jpn0y.js";
58
49
  import {
59
50
  appendCoreEventSync
60
- } from "./index-vtpt8yns.js";
51
+ } from "./index-rjsqf4hv.js";
61
52
  import {
62
53
  derivePlanId,
63
54
  derivePlanIdentityHash
64
55
  } from "./index-7pmbnjvj.js";
56
+ import {
57
+ sanitizeContextText
58
+ } from "./index-m9zzj4ee.js";
59
+ import {
60
+ PlanSchema,
61
+ normalizeCurrentPhaseInPlace,
62
+ resolveActivePhaseId
63
+ } from "./index-3t46mez1.js";
64
+ import {
65
+ init_config,
66
+ init_loader,
67
+ isEpicModeConfigEnabled,
68
+ loadPluginConfigWithMeta
69
+ } from "./index-mq4eyhtf.js";
70
+ import {
71
+ estimateCharsForTokens,
72
+ estimateTokens,
73
+ readSwarmFileAsync,
74
+ validateSwarmPath
75
+ } from "./index-001tkp0j.js";
65
76
  import {
66
77
  assertProjectRoot
67
78
  } from "./index-t7hmqgjy.js";
68
79
  import {
69
80
  emit
70
- } from "./index-c2k7q723.js";
81
+ } from "./index-6cppzd9c.js";
71
82
  import {
72
83
  canonicalRootKeyFresh
73
84
  } from "./index-te9hq2f4.js";
@@ -78,18 +89,7 @@ import {
78
89
  atomicWriteSwarmFileSync,
79
90
  invalidateCachedArtifact,
80
91
  readCachedParsedFile
81
- } from "./index-mn75z39t.js";
82
- import {
83
- PlanSchema,
84
- normalizeCurrentPhaseInPlace,
85
- resolveActivePhaseId
86
- } from "./index-3t46mez1.js";
87
- import {
88
- init_config,
89
- init_loader,
90
- isEpicModeConfigEnabled,
91
- loadPluginConfigWithMeta
92
- } from "./index-02vgzrpg.js";
92
+ } from "./index-9qy3tzt5.js";
93
93
  import {
94
94
  bunHash,
95
95
  bunWrite,
@@ -2670,7 +2670,7 @@ ${markdown}`;
2670
2670
  }
2671
2671
  }
2672
2672
  async function defaultMaybeSaveAutoCheckpoint(directory, plan) {
2673
- const { maybeSaveAutoCheckpoint } = await import("./auto-checkpoint-kt9mr7ma.js");
2673
+ const { maybeSaveAutoCheckpoint } = await import("./auto-checkpoint-hyaksmtg.js");
2674
2674
  return maybeSaveAutoCheckpoint(directory, plan);
2675
2675
  }
2676
2676
  async function updateTaskStatus(directory, taskId, status, options) {
@@ -2746,7 +2746,7 @@ async function updateTaskStatus(directory, taskId, status, options) {
2746
2746
  if (status === "completed") {
2747
2747
  try {
2748
2748
  const completedTask = updatedPlan.phases.flatMap((phase) => phase.tasks).find((candidate) => candidate.id === taskId);
2749
- const { maybePropagateSpeckitCheckoff } = await import("./speckit-checkoff-tcn1dqt0.js");
2749
+ const { maybePropagateSpeckitCheckoff } = await import("./speckit-checkoff-sh9w7j5b.js");
2750
2750
  await maybePropagateSpeckitCheckoff(directory, {
2751
2751
  taskId,
2752
2752
  frRefs: completedTask?.fr_refs ?? [],