opencode-swarm 7.144.7 → 7.145.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 (86) hide show
  1. package/dist/cli/{capability-probe-976tt4ba.js → capability-probe-va4kk8vg.js} +2 -2
  2. package/dist/cli/{config-doctor-zdvaq4nb.js → config-doctor-dzsv3pqy.js} +2 -2
  3. package/dist/cli/{core-j7f118a5.js → core-qkh9me8x.js} +2 -2
  4. package/dist/cli/{curation-policy-a511r0qz.js → curation-policy-5x6346tf.js} +7 -7
  5. package/dist/cli/{curator-drift-ckjm272w.js → curator-drift-yn5d0mvq.js} +3 -3
  6. package/dist/cli/curator-llm-factory-q5p4578g.js +64 -0
  7. package/dist/cli/{curator-97sm8wn0.js → curator-zssndq5x.js} +34 -33
  8. package/dist/cli/dispatch-ndxbsk98.js +1 -1
  9. package/dist/cli/{evidence-summary-service-kwtb2d14.js → evidence-summary-service-dqcpapj8.js} +15 -14
  10. package/dist/cli/{gate-evidence-rk9j0hc4.js → gate-evidence-bkdqryqg.js} +9 -8
  11. package/dist/cli/guardrail-explain-kspf83x5.js +65 -0
  12. package/dist/cli/{guardrail-log-zbqf4ws6.js → guardrail-log-qg4sq6gr.js} +4 -4
  13. package/dist/cli/{hive-promoter-qzvtp5wx.js → hive-promoter-3h7dhnek.js} +34 -33
  14. package/dist/cli/{index-00fk9c3b.js → index-0jr9zn34.js} +1 -1
  15. package/dist/cli/{index-zq9gs0yk.js → index-0pcq32y2.js} +1 -1
  16. package/dist/cli/{index-gmdgap01.js → index-2dnqazyr.js} +1 -1
  17. package/dist/cli/{index-b44qqqt2.js → index-3g0xk6tk.js} +1 -1
  18. package/dist/cli/{index-yz0hfa4g.js → index-4e5a28h7.js} +2 -2
  19. package/dist/cli/index-4evasm2b.js +514 -0
  20. package/dist/cli/{index-jszgrk71.js → index-4zwjc9sb.js} +10 -29
  21. package/dist/cli/{index-x4q96ejx.js → index-6ezbzd5e.js} +2509 -1995
  22. package/dist/cli/{index-q7zy6dej.js → index-6hqhyb0f.js} +4 -4
  23. package/dist/cli/{index-9s8drsf9.js → index-6q3agdmr.js} +4 -21
  24. package/dist/cli/{index-hkdgkkhb.js → index-77ef8gye.js} +2 -2
  25. package/dist/cli/{index-bx20cv1v.js → index-7g276m9m.js} +2 -2
  26. package/dist/cli/{index-zy7f84cs.js → index-85gkedsf.js} +14 -5
  27. package/dist/cli/{index-7bvd5nh2.js → index-apjdytwx.js} +3 -3
  28. package/dist/cli/{index-pzsezhek.js → index-b3xret0a.js} +5 -5
  29. package/dist/cli/{index-qm0mz7rj.js → index-c13ttmak.js} +8 -8
  30. package/dist/cli/{index-d879g58v.js → index-e00wbqw5.js} +2 -2
  31. package/dist/cli/{index-cwtpqm5f.js → index-e1pxav9g.js} +1 -1
  32. package/dist/cli/{index-n4hwcsbd.js → index-ffdwj1an.js} +5 -5
  33. package/dist/cli/{index-vdha477y.js → index-fp464as8.js} +1 -1
  34. package/dist/cli/{index-c1cfsg9y.js → index-h4hasck4.js} +4 -4
  35. package/dist/cli/{index-39jbnhar.js → index-hfzcztv6.js} +36 -35
  36. package/dist/cli/{index-wknz5c8q.js → index-jy9bwa9k.js} +2 -2
  37. package/dist/cli/{index-xjgwr4c6.js → index-k6pdsct6.js} +1 -1
  38. package/dist/cli/{index-r2q0nd0a.js → index-kp87kr1a.js} +3 -3
  39. package/dist/cli/{index-w9bnt74s.js → index-mkks7jwg.js} +13 -15
  40. package/dist/cli/{index-f9vvg5xb.js → index-pa86tpgt.js} +67 -2
  41. package/dist/cli/{index-77h4xjn5.js → index-qfawexc8.js} +9 -9
  42. package/dist/cli/{index-grkev1g6.js → index-s6cwsnrw.js} +8 -8
  43. package/dist/cli/{index-h1p08s3n.js → index-s72naw1j.js} +1 -1
  44. package/dist/cli/{index-s1xefrx7.js → index-v64kjqvg.js} +19 -16
  45. package/dist/cli/{index-6z5jtf7d.js → index-wk54ey3h.js} +4 -4
  46. package/dist/cli/{index-x4eqd82b.js → index-zfhe7vbb.js} +1 -1
  47. package/dist/cli/{index-1jsmmx7y.js → index-zz5qsjd1.js} +64 -35
  48. package/dist/cli/index.js +34 -33
  49. package/dist/cli/{knowledge-escalator-fhc6ecbv.js → knowledge-escalator-w1mbaktt.js} +14 -13
  50. package/dist/cli/{knowledge-events-31g69mx2.js → knowledge-events-a0dj6gy6.js} +12 -11
  51. package/dist/cli/{knowledge-link-4cg4776a.js → knowledge-link-mzdjvjsd.js} +6 -6
  52. package/dist/cli/{knowledge-store-g389c1cy.js → knowledge-store-8kk3rghx.js} +7 -7
  53. package/dist/cli/{knowledge-validator-sng5xt5a.js → knowledge-validator-91ym56e0.js} +9 -9
  54. package/dist/cli/{pending-delegations-9h1jmtw1.js → pending-delegations-6vsrmw5w.js} +6 -6
  55. package/dist/cli/{pr-subscriptions-8pg34pev.js → pr-subscriptions-zc3skxde.js} +6 -6
  56. package/dist/cli/{runner-cqecp1na.js → runner-jj32v8bk.js} +8 -7
  57. package/dist/cli/{scan-cursor-qm3tsvvw.js → scan-cursor-12jxwd14.js} +8 -8
  58. package/dist/cli/{schema-vnghba3d.js → schema-nq9tcz87.js} +1 -1
  59. package/dist/cli/{scope-persistence-k9mqd414.js → scope-persistence-dv6z7n08.js} +8 -7
  60. package/dist/cli/{skill-generator-v1wdh3ne.js → skill-generator-drscnzq9.js} +16 -15
  61. package/dist/cli/{telemetry-cybx6cfz.js → telemetry-z54dgdrh.js} +1 -1
  62. package/dist/cli/{workspace-snapshot-d89zm6wm.js → workspace-snapshot-q21mgbsh.js} +2 -2
  63. package/dist/cli/{worktree-collision-ownership-vy0kxa98.js → worktree-collision-ownership-rfyyjjct.js} +9 -9
  64. package/dist/cli/{worktree-isolation-bxt3rftm.js → worktree-isolation-4tehtym5.js} +34 -33
  65. package/dist/cli/{worktree-provisioning-owner-zzkjycp1.js → worktree-provisioning-owner-72cyddz5.js} +3 -3
  66. package/dist/commands/close.d.ts +8 -1
  67. package/dist/config/evidence-schema.d.ts +6 -6
  68. package/dist/config/plan-schema.d.ts +2 -2
  69. package/dist/config/schema.d.ts +7 -7
  70. package/dist/evidence/task-file.d.ts +16 -16
  71. package/dist/git/branch.d.ts +9 -0
  72. package/dist/hooks/delegation-gate/worktree-isolation.d.ts +5 -0
  73. package/dist/index.js +561 -531
  74. package/dist/memory/schema.d.ts +3 -3
  75. package/dist/observability/catalog.d.ts +5 -4
  76. package/dist/observability/envelope.d.ts +2 -2
  77. package/dist/sandbox/executor.d.ts +6 -0
  78. package/dist/services/swarm-residue.d.ts +151 -0
  79. package/dist/telemetry.d.ts +20 -1
  80. package/dist/tools/knowledge-receipt.d.ts +1 -1
  81. package/dist/utils/atomic-write.d.ts +185 -0
  82. package/package.json +1 -1
  83. package/dist/cli/curator-llm-factory-eny079d1.js +0 -63
  84. package/dist/cli/guardrail-explain-8gggptqj.js +0 -64
  85. package/dist/cli/{index-f36ybbsv.js → index-b30x236n.js} +3 -3
  86. package/dist/cli/{index-fv0s19g9.js → index-w8pgjr75.js} +3 -3
@@ -1,4 +1,7 @@
1
1
  // @bun
2
+ import {
3
+ bunSpawn
4
+ } from "./index-zj6t9zgx.js";
2
5
  import {
3
6
  SWARM_WORKTREE_DIR_NAME,
4
7
  init_constants
@@ -11,9 +14,6 @@ import {
11
14
  advisoryWarn,
12
15
  init_warning_buffer
13
16
  } from "./index-4rhhvd1a.js";
14
- import {
15
- bunSpawn
16
- } from "./index-zj6t9zgx.js";
17
17
  import {
18
18
  log
19
19
  } from "./index-zgwm4ryv.js";
@@ -92,7 +92,7 @@ var _internals = {
92
92
  symlinkSync: fs.symlinkSync
93
93
  },
94
94
  writeScopeToDisk: async (directory, taskId, files) => {
95
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-k9mqd414.js");
95
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-dv6z7n08.js");
96
96
  return realWrite(directory, taskId, files);
97
97
  },
98
98
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -1,16 +1,12 @@
1
1
  // @bun
2
2
  import {
3
- invalidateCachedArtifact
4
- } from "./index-ed5ykebp.js";
3
+ atomicWriteFileAnyRoot
4
+ } from "./index-4evasm2b.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-f9vvg5xb.js";
8
- import {
9
- bunWrite
10
- } from "./index-zj6t9zgx.js";
7
+ } from "./index-pa86tpgt.js";
11
8
 
12
9
  // src/evidence/task-file.ts
13
- import { renameSync, unlinkSync } from "fs";
14
10
  import * as path from "path";
15
11
  function taskEvidenceRelPath(taskId) {
16
12
  return path.join("evidence", `${taskId}.json`);
@@ -18,21 +14,8 @@ function taskEvidenceRelPath(taskId) {
18
14
  function taskEvidencePath(directory, taskId) {
19
15
  return path.join(directory, ".swarm", taskEvidenceRelPath(taskId));
20
16
  }
21
- var _internals = {
22
- renameSync,
23
- unlinkSync
24
- };
25
17
  async function atomicWriteFile(targetPath, content) {
26
- const tempPath = `${targetPath}.tmp.${Date.now()}.${Math.floor(Math.random() * 1e9)}`;
27
- try {
28
- await bunWrite(tempPath, content);
29
- _internals.renameSync(tempPath, targetPath);
30
- } finally {
31
- try {
32
- _internals.unlinkSync(tempPath);
33
- } catch {}
34
- }
35
- invalidateCachedArtifact(targetPath);
18
+ await atomicWriteFileAnyRoot(targetPath, content);
36
19
  }
37
20
  function withTaskEvidenceLock(directory, taskId, agent, fn) {
38
21
  return withEvidenceLock(directory, taskEvidenceRelPath(taskId), agent, taskId, fn);
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-fv0s19g9.js";
4
+ } from "./index-w8pgjr75.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-f9vvg5xb.js";
7
+ } from "./index-pa86tpgt.js";
8
8
  import {
9
9
  exports_external,
10
10
  init_zod
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-zq9gs0yk.js";
5
+ } from "./index-0pcq32y2.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-x4eqd82b.js";
8
+ } from "./index-zfhe7vbb.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
@@ -977,6 +977,14 @@ var init_windows = __esm(() => {
977
977
  function isValidEnvKey(key) {
978
978
  return /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(key);
979
979
  }
980
+ function isUntrustedEnvKey(key) {
981
+ const upper = key.toUpperCase();
982
+ for (const prefix of UNTRUSTED_ENV_KEY_PREFIXES) {
983
+ if (upper.startsWith(prefix))
984
+ return true;
985
+ }
986
+ return false;
987
+ }
980
988
  async function getExecutor() {
981
989
  if (_cachedExecutorPromise !== undefined) {
982
990
  return _cachedExecutorPromise;
@@ -998,7 +1006,7 @@ async function _createExecutor() {
998
1006
  return null;
999
1007
  }
1000
1008
  async function _createLinuxExecutor() {
1001
- const { SandboxCapabilityProbe, isBubblewrapAvailable } = await import("./capability-probe-976tt4ba.js");
1009
+ const { SandboxCapabilityProbe, isBubblewrapAvailable } = await import("./capability-probe-va4kk8vg.js");
1002
1010
  await new SandboxCapabilityProbe().detect();
1003
1011
  if (!isBubblewrapAvailable()) {
1004
1012
  return null;
@@ -1018,7 +1026,7 @@ async function _createMacOSExecutor() {
1018
1026
  }
1019
1027
  return null;
1020
1028
  }
1021
- const { SandboxCapabilityProbe, isSandboxExecAvailable } = await import("./capability-probe-976tt4ba.js");
1029
+ const { SandboxCapabilityProbe, isSandboxExecAvailable } = await import("./capability-probe-va4kk8vg.js");
1022
1030
  await new SandboxCapabilityProbe().detect();
1023
1031
  if (!isSandboxExecAvailable()) {
1024
1032
  return null;
@@ -1031,7 +1039,7 @@ async function _createMacOSExecutor() {
1031
1039
  }
1032
1040
  }
1033
1041
  async function _createWindowsExecutor() {
1034
- const { SandboxCapabilityProbe, isWindowsSandboxAvailable } = await import("./capability-probe-976tt4ba.js");
1042
+ const { SandboxCapabilityProbe, isWindowsSandboxAvailable } = await import("./capability-probe-va4kk8vg.js");
1035
1043
  await new SandboxCapabilityProbe().detect();
1036
1044
  if (!isWindowsSandboxAvailable()) {
1037
1045
  return null;
@@ -1043,7 +1051,7 @@ async function _createWindowsExecutor() {
1043
1051
  return null;
1044
1052
  }
1045
1053
  }
1046
- var SandboxError, _cachedExecutorPromise, _macosSandboxEnabled = false, _hasWarnedMacOSSandboxDisabledByConfig = false;
1054
+ var SandboxError, UNTRUSTED_ENV_KEY_PREFIXES, _cachedExecutorPromise, _macosSandboxEnabled = false, _hasWarnedMacOSSandboxDisabledByConfig = false;
1047
1055
  var init_executor = __esm(() => {
1048
1056
  init_logger();
1049
1057
  SandboxError = class SandboxError extends Error {
@@ -1054,6 +1062,7 @@ var init_executor = __esm(() => {
1054
1062
  this.name = "SandboxError";
1055
1063
  }
1056
1064
  };
1065
+ UNTRUSTED_ENV_KEY_PREFIXES = ["GIT_", "LD_", "DYLD_"];
1057
1066
  });
1058
1067
 
1059
1068
  // src/sandbox/linux/bubblewrap-executor.ts
@@ -1207,4 +1216,4 @@ var init_bubblewrap_executor = __esm(() => {
1207
1216
  };
1208
1217
  });
1209
1218
 
1210
- export { _internals4 as _internals, init_bubblewrap_executor, _internals as _internals1, init_sandbox_exec_executor, exports_runner_client, init_runner_client, isValidEnvKey, getExecutor, init_executor };
1219
+ export { _internals4 as _internals, init_bubblewrap_executor, _internals as _internals1, init_sandbox_exec_executor, exports_runner_client, init_runner_client, isValidEnvKey, isUntrustedEnvKey, getExecutor, init_executor };
@@ -4,14 +4,14 @@ import {
4
4
  PlanSchema,
5
5
  TaskStatusSchema,
6
6
  init_loader
7
- } from "./index-zq9gs0yk.js";
7
+ } from "./index-0pcq32y2.js";
8
8
  import {
9
9
  assertProjectRoot,
10
10
  withEvidenceLock
11
- } from "./index-f9vvg5xb.js";
11
+ } from "./index-pa86tpgt.js";
12
12
  import {
13
13
  emit
14
- } from "./index-1jsmmx7y.js";
14
+ } from "./index-zz5qsjd1.js";
15
15
  import {
16
16
  criticalWarn,
17
17
  init_logger,
@@ -6,12 +6,12 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-77h4xjn5.js";
9
+ } from "./index-qfawexc8.js";
10
10
  import {
11
11
  queryHistoricalOutcomes,
12
12
  readKnowledgeEvents,
13
13
  recordKnowledgeEvent
14
- } from "./index-qm0mz7rj.js";
14
+ } from "./index-c13ttmak.js";
15
15
  import {
16
16
  init_knowledge_types,
17
17
  isActiveStatus
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
224
224
  alreadyInactive: true
225
225
  };
226
226
  }
227
- const { quarantineEntry } = await import("./knowledge-validator-sng5xt5a.js");
227
+ const { quarantineEntry } = await import("./knowledge-validator-91ym56e0.js");
228
228
  let policyConfig;
229
229
  try {
230
- const { KnowledgeConfigSchema } = await import("./schema-vnghba3d.js");
231
- const { loadPluginConfigWithMeta } = await import("./index-r2q0nd0a.js");
230
+ const { KnowledgeConfigSchema } = await import("./schema-nq9tcz87.js");
231
+ const { loadPluginConfigWithMeta } = await import("./index-kp87kr1a.js");
232
232
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
233
233
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
234
234
  } catch {
@@ -1,29 +1,29 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-fv0s19g9.js";
4
+ } from "./index-w8pgjr75.js";
5
5
  import {
6
6
  loadPluginConfigWithMeta
7
- } from "./index-zq9gs0yk.js";
7
+ } from "./index-0pcq32y2.js";
8
8
  import {
9
9
  KnowledgeConfigSchema,
10
10
  init_schema
11
- } from "./index-x4eqd82b.js";
11
+ } from "./index-zfhe7vbb.js";
12
12
  import {
13
13
  resolveHiveEventsPath
14
14
  } from "./index-ae75rja9.js";
15
15
  import {
16
16
  resolveKnowledgeStoreDir
17
- } from "./index-h1p08s3n.js";
17
+ } from "./index-s72naw1j.js";
18
18
  import {
19
19
  atomicWriteFile
20
- } from "./index-9s8drsf9.js";
20
+ } from "./index-6q3agdmr.js";
21
21
  import {
22
22
  assertProjectRoot
23
- } from "./index-f9vvg5xb.js";
23
+ } from "./index-pa86tpgt.js";
24
24
  import {
25
25
  emit
26
- } from "./index-1jsmmx7y.js";
26
+ } from "./index-zz5qsjd1.js";
27
27
  import {
28
28
  require_proper_lockfile
29
29
  } from "./index-7g4c7s5r.js";
@@ -2545,7 +2545,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
2545
2545
  }
2546
2546
  let bumps = 0;
2547
2547
  if (deltas.length > 0) {
2548
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-g389c1cy.js");
2548
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-8kk3rghx.js");
2549
2549
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2550
2550
  }
2551
2551
  return {
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-77h4xjn5.js";
5
+ } from "./index-qfawexc8.js";
6
6
  import {
7
7
  init_git_executable,
8
8
  resolveGitExecutableAsync
9
9
  } from "./index-9e6fdz2h.js";
10
10
  import {
11
11
  resolveKnowledgeStoreDir
12
- } from "./index-h1p08s3n.js";
12
+ } from "./index-s72naw1j.js";
13
13
  import {
14
14
  init_knowledge_types,
15
15
  isActiveStatus
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-fv0s19g9.js";
4
+ } from "./index-w8pgjr75.js";
5
5
 
6
6
  // src/hooks/delegation-gate/worktree-provisioning-owner.ts
7
7
  import { createHash, randomBytes } from "crypto";
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-fv0s19g9.js";
4
+ } from "./index-w8pgjr75.js";
5
+ import {
6
+ bunWrite
7
+ } from "./index-zj6t9zgx.js";
5
8
  import {
6
9
  withEvidenceLock
7
- } from "./index-f9vvg5xb.js";
10
+ } from "./index-pa86tpgt.js";
8
11
  import {
9
12
  exports_external,
10
13
  init_zod
11
14
  } from "./index-bpmtbmy9.js";
12
- import {
13
- bunWrite
14
- } from "./index-zj6t9zgx.js";
15
15
  import {
16
16
  init_logger,
17
17
  warn
@@ -7,7 +7,7 @@ import {
7
7
  readLinkPointer,
8
8
  resolveKnowledgeStoreDir,
9
9
  resolveLinkDir
10
- } from "./index-h1p08s3n.js";
10
+ } from "./index-s72naw1j.js";
11
11
 
12
12
  // src/knowledge/curation-policy.ts
13
13
  import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-vdha477y.js";
4
+ } from "./index-fp464as8.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-77h4xjn5.js";
12
+ } from "./index-qfawexc8.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
- } from "./index-h1p08s3n.js";
15
+ } from "./index-s72naw1j.js";
16
16
  import {
17
17
  atomicWriteFile
18
- } from "./index-9s8drsf9.js";
18
+ } from "./index-6q3agdmr.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./index-7g4c7s5r.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-yz0hfa4g.js";
4
+ } from "./index-4e5a28h7.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-xjgwr4c6.js";
7
+ } from "./index-k6pdsct6.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -85,50 +85,51 @@ import {
85
85
  handleWriteRetroCommand,
86
86
  normalizeSwarmCommandInput,
87
87
  resolveCommand
88
- } from "./index-x4q96ejx.js";
89
- import"./index-gmdgap01.js";
90
- import"./index-00fk9c3b.js";
91
- import"./index-s1xefrx7.js";
88
+ } from "./index-6ezbzd5e.js";
89
+ import"./index-2dnqazyr.js";
90
+ import"./index-0jr9zn34.js";
91
+ import"./index-v64kjqvg.js";
92
92
  import"./index-134d35c1.js";
93
93
  import"./index-abtrcs16.js";
94
- import"./index-6z5jtf7d.js";
95
- import"./index-wknz5c8q.js";
94
+ import"./index-wk54ey3h.js";
95
+ import"./index-jy9bwa9k.js";
96
96
  import"./index-y8552snf.js";
97
- import"./index-d879g58v.js";
97
+ import"./index-e00wbqw5.js";
98
98
  import"./index-70ha9e09.js";
99
99
  import"./index-c8s9a3zh.js";
100
100
  import"./index-9ss2m4rs.js";
101
- import"./index-f36ybbsv.js";
102
- import"./index-hkdgkkhb.js";
103
- import"./index-w9bnt74s.js";
104
- import"./index-pzsezhek.js";
105
- import"./index-c1cfsg9y.js";
106
- import"./index-vdha477y.js";
101
+ import"./index-b30x236n.js";
102
+ import"./index-77ef8gye.js";
103
+ import"./index-mkks7jwg.js";
104
+ import"./index-b3xret0a.js";
105
+ import"./index-h4hasck4.js";
106
+ import"./index-fp464as8.js";
107
107
  import"./index-rtry5xyf.js";
108
108
  import"./index-zsrtt42s.js";
109
- import"./index-n4hwcsbd.js";
110
- import"./index-cwtpqm5f.js";
111
- import"./index-grkev1g6.js";
112
- import"./index-q7zy6dej.js";
113
- import"./index-jszgrk71.js";
114
- import"./index-7bvd5nh2.js";
109
+ import"./index-ffdwj1an.js";
110
+ import"./index-e1pxav9g.js";
111
+ import"./index-s6cwsnrw.js";
112
+ import"./index-6hqhyb0f.js";
113
+ import"./index-4zwjc9sb.js";
114
+ import"./index-apjdytwx.js";
115
115
  import"./index-556ja8an.js";
116
116
  import"./index-7sy3aa9m.js";
117
117
  import"./index-wx8zdh4a.js";
118
- import"./index-b44qqqt2.js";
119
- import"./index-zy7f84cs.js";
120
- import"./index-77h4xjn5.js";
121
- import"./index-qm0mz7rj.js";
122
- import"./index-bx20cv1v.js";
118
+ import"./index-3g0xk6tk.js";
119
+ import"./index-85gkedsf.js";
120
+ import"./index-qfawexc8.js";
121
+ import"./index-c13ttmak.js";
122
+ import"./index-7g276m9m.js";
123
123
  import"./index-gprxjmm7.js";
124
124
  import"./index-n832052r.js";
125
- import"./index-fv0s19g9.js";
125
+ import"./index-w8pgjr75.js";
126
126
  import"./index-z6xqpmqg.js";
127
- import"./index-zq9gs0yk.js";
127
+ import"./index-zj6t9zgx.js";
128
+ import"./index-0pcq32y2.js";
128
129
  import {
129
130
  init_schema,
130
131
  stripKnownSwarmPrefix
131
- } from "./index-x4eqd82b.js";
132
+ } from "./index-zfhe7vbb.js";
132
133
  import {
133
134
  AGENT_TOOL_MAP,
134
135
  ORCHESTRATOR_NAME,
@@ -138,15 +139,15 @@ import"./index-9e6fdz2h.js";
138
139
  import"./index-4rhhvd1a.js";
139
140
  import"./index-zjygnfay.js";
140
141
  import"./index-ae75rja9.js";
141
- import"./index-h1p08s3n.js";
142
- import"./index-9s8drsf9.js";
143
- import"./index-ed5ykebp.js";
142
+ import"./index-s72naw1j.js";
143
+ import"./index-6q3agdmr.js";
144
144
  import"./index-bk5tah7q.js";
145
- import"./index-f9vvg5xb.js";
146
- import"./index-1jsmmx7y.js";
145
+ import"./index-4evasm2b.js";
146
+ import"./index-pa86tpgt.js";
147
+ import"./index-zz5qsjd1.js";
147
148
  import"./index-7g4c7s5r.js";
148
149
  import"./index-bpmtbmy9.js";
149
- import"./index-zj6t9zgx.js";
150
+ import"./index-ed5ykebp.js";
150
151
  import"./index-zgwm4ryv.js";
151
152
  import"./index-a76rekgs.js";
152
153
 
@@ -9,11 +9,11 @@ import {
9
9
  } from "./index-y8552snf.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-9s8drsf9.js";
12
+ } from "./index-6q3agdmr.js";
13
13
  import {
14
14
  assertProjectRoot,
15
15
  withEvidenceLock
16
- } from "./index-f9vvg5xb.js";
16
+ } from "./index-pa86tpgt.js";
17
17
  import {
18
18
  exports_external,
19
19
  init_zod
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-gmdgap01.js";
5
+ } from "./index-2dnqazyr.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-bx20cv1v.js";
5
+ } from "./index-7g276m9m.js";
6
6
  import {
7
7
  ApprovalEvidenceSchema,
8
8
  BaseEvidenceSchema,
@@ -42,7 +42,7 @@ import {
42
42
  loadPluginConfig,
43
43
  loadPluginConfigWithMeta,
44
44
  loadPluginConfigWithMetaAsync
45
- } from "./index-zq9gs0yk.js";
45
+ } from "./index-0pcq32y2.js";
46
46
  import {
47
47
  AUTO_REVIEW_V8_BURN_IN_DECISION,
48
48
  AgentOverrideConfigSchema,
@@ -64,7 +64,7 @@ import {
64
64
  TurboConfigSchema,
65
65
  WorktreeIsolationConfigSchema,
66
66
  resolveAutoReviewConfig
67
- } from "./index-x4eqd82b.js";
67
+ } from "./index-zfhe7vbb.js";
68
68
  import {
69
69
  ALL_AGENT_NAMES,
70
70
  ALL_SUBAGENT_NAMES,
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-c1cfsg9y.js";
5
+ } from "./index-h4hasck4.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-77h4xjn5.js";
12
+ } from "./index-qfawexc8.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readAuthoritativeKnowledgeCounterRollups
16
- } from "./index-qm0mz7rj.js";
16
+ } from "./index-c13ttmak.js";
17
17
  import {
18
18
  advisoryWarn,
19
19
  init_warning_buffer
@@ -22,6 +22,10 @@ import {
22
22
  init_knowledge_types,
23
23
  isActiveStatus
24
24
  } from "./index-bk5tah7q.js";
25
+ import {
26
+ atomicWriteFileAnyRoot,
27
+ atomicWriteSwarmFile
28
+ } from "./index-4evasm2b.js";
25
29
  import {
26
30
  init_logger,
27
31
  log,
@@ -33,7 +37,7 @@ import {
33
37
 
34
38
  // src/services/skill-generator.ts
35
39
  import { existsSync as existsSync2, unlinkSync } from "fs";
36
- import { mkdir as mkdir4, readFile as readFile4, rename as rename3, unlink, writeFile as writeFile4 } from "fs/promises";
40
+ import { mkdir as mkdir4, readFile as readFile4, unlink, writeFile as writeFile3 } from "fs/promises";
37
41
  import * as path4 from "path";
38
42
 
39
43
  // src/config/bundled-skills.ts
@@ -375,9 +379,7 @@ import {
375
379
  readdir as readdir2,
376
380
  readFile as readFile3,
377
381
  realpath,
378
- rename as rename2,
379
- stat as stat2,
380
- writeFile as writeFile3
382
+ stat as stat2
381
383
  } from "fs/promises";
382
384
  import * as path3 from "path";
383
385
  var SLUG_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
@@ -692,9 +694,7 @@ async function evaluateSkillChange(req) {
692
694
  }
693
695
  async function atomicWrite(filePath, content) {
694
696
  await mkdir3(path3.dirname(filePath), { recursive: true });
695
- const tmp = `${filePath}.tmp-${process.pid}-${Date.now()}`;
696
- await writeFile3(tmp, content, "utf-8");
697
- await rename2(tmp, filePath);
697
+ await atomicWriteSwarmFile(filePath, content);
698
698
  }
699
699
  async function appendRejectedSkillEdit(req, evaluation) {
700
700
  const filePath = rejectedEditsPath(req.directory);
@@ -1040,9 +1040,7 @@ function escapeMarkdown(s) {
1040
1040
  }
1041
1041
  async function atomicWrite2(p, content) {
1042
1042
  await mkdir4(path4.dirname(p), { recursive: true });
1043
- const tmp = `${p}.tmp-${process.pid}-${Date.now()}`;
1044
- await writeFile4(tmp, content, "utf-8");
1045
- await rename3(tmp, p);
1043
+ await atomicWriteFileAnyRoot(p, content);
1046
1044
  }
1047
1045
  async function generateSkills(req) {
1048
1046
  const minConfidence = req.minConfidence ?? DEFAULT_SKILL_MIN_CONFIDENCE;
@@ -1794,7 +1792,7 @@ async function retireSkill(directory, slug, reason) {
1794
1792
  reason: reason ?? "manual_retire"
1795
1793
  });
1796
1794
  await mkdir4(markerDir, { recursive: true });
1797
- await writeFile4(markerPath, markerContent, "utf-8");
1795
+ await writeFile3(markerPath, markerContent, "utf-8");
1798
1796
  let clearedLinks = [];
1799
1797
  try {
1800
1798
  clearedLinks = await clearRetiredSkillLinks(directory, skillPath, cleanSlug);
@@ -1884,7 +1882,7 @@ async function clearSkillLinks(directory, skillFilePath, slug, mode) {
1884
1882
  }
1885
1883
  async function markSkillStale(skillDir, reason) {
1886
1884
  await mkdir4(skillDir, { recursive: true });
1887
- await writeFile4(path4.join(skillDir, "stale.marker"), reason, "utf-8");
1885
+ await writeFile3(path4.join(skillDir, "stale.marker"), reason, "utf-8");
1888
1886
  }
1889
1887
  async function clearSkillStale(skillDir) {
1890
1888
  const markerPath = path4.join(skillDir, "stale.marker");