opencode-swarm 7.113.2 → 7.113.3

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 (66) hide show
  1. package/binaries/win32-arm64/.gitkeep +0 -0
  2. package/binaries/win32-x64/.gitkeep +0 -0
  3. package/dist/background/event-bus.d.ts +1 -1
  4. package/dist/background/queue.d.ts +11 -0
  5. package/dist/background/trigger.d.ts +1 -0
  6. package/dist/cli/{capability-probe-sh9bwh39.js → capability-probe-f1paszww.js} +1 -1
  7. package/dist/cli/{config-doctor-az11cwf5.js → config-doctor-xbdfrbwt.js} +2 -2
  8. package/dist/cli/{core-f4cbabe7.js → core-zg8s1jwx.js} +2 -2
  9. package/dist/cli/{curator-9s04amtf.js → curator-ckzb8ww4.js} +22 -22
  10. package/dist/cli/{curator-drift-jvs1v6em.js → curator-drift-c0by7063.js} +2 -2
  11. package/dist/cli/curator-llm-factory-mhjcpy1s.js +41 -0
  12. package/dist/cli/{dispatch-wst7bypk.js → dispatch-mczsxy5s.js} +2 -2
  13. package/dist/cli/{evidence-summary-service-w1er1ea2.js → evidence-summary-service-8g594znj.js} +7 -7
  14. package/dist/cli/{gate-evidence-9hdwj6tt.js → gate-evidence-vkpqt300.js} +5 -5
  15. package/dist/cli/guardrail-explain-kabd97j8.js +42 -0
  16. package/dist/cli/{guardrail-log-hysxdwg9.js → guardrail-log-qfc2j0tb.js} +4 -4
  17. package/dist/cli/hive-promoter-h21wzpsr.js +49 -0
  18. package/dist/cli/{index-0dab9w37.js → index-0p660a87.js} +2 -2
  19. package/dist/cli/{index-32bx4kch.js → index-0q7rrh59.js} +4 -4
  20. package/dist/cli/{index-1ey3dxq7.js → index-147ja18h.js} +0 -4
  21. package/dist/cli/{index-0gf6de8b.js → index-2148358e.js} +45 -1
  22. package/dist/cli/{index-30ejh1tx.js → index-43khae15.js} +3 -3
  23. package/dist/cli/{index-x5g7et24.js → index-4h2ea8h5.js} +2 -2
  24. package/dist/cli/{index-5mkc2f9z.js → index-4sckv7y6.js} +1 -1
  25. package/dist/cli/{index-q1jaeynn.js → index-80jkseqw.js} +2 -2
  26. package/dist/cli/{index-wvrj16f0.js → index-8fwhhayc.js} +4 -0
  27. package/dist/cli/{index-54dgk0bv.js → index-dh87tpc5.js} +176 -63
  28. package/dist/cli/{index-afgh75zg.js → index-f6y341yk.js} +14 -11
  29. package/dist/cli/{index-db1fh1fv.js → index-g40r5d08.js} +1 -1
  30. package/dist/cli/{index-8f256d7t.js → index-g6va6n3t.js} +1 -1
  31. package/dist/cli/{index-9fxs0rm1.js → index-ga4ta3cr.js} +1 -1
  32. package/dist/cli/{index-t6wfwdm1.js → index-h7q1bvzm.js} +3 -3
  33. package/dist/cli/{index-w51xz4dr.js → index-hw4tcxs9.js} +24 -24
  34. package/dist/cli/{index-h389ed8y.js → index-mr4whary.js} +3 -3
  35. package/dist/cli/{index-g55nzpwn.js → index-n6fa2hhk.js} +1 -1
  36. package/dist/cli/{index-vn263hqt.js → index-pa6t33pt.js} +17 -10
  37. package/dist/cli/{index-h91bv3hy.js → index-qe3v54nb.js} +6 -1
  38. package/dist/cli/{index-hpp2r0sd.js → index-qzqx2qky.js} +3 -3
  39. package/dist/cli/{index-fhmw7evd.js → index-rdwfqhp7.js} +2 -2
  40. package/dist/cli/{index-n7rd2rkj.js → index-srvqfcyj.js} +2 -2
  41. package/dist/cli/{index-1rga1vvb.js → index-wh8949ef.js} +1 -1
  42. package/dist/cli/{index-r9fjzr3k.js → index-xbe1wtme.js} +1 -1
  43. package/dist/cli/index.js +22 -22
  44. package/dist/cli/{knowledge-escalator-4gbz527n.js → knowledge-escalator-0q1p6br7.js} +8 -8
  45. package/dist/cli/{knowledge-events-b6x28fgc.js → knowledge-events-9518gzsp.js} +6 -6
  46. package/dist/cli/{knowledge-store-h3cjx4dg.js → knowledge-store-k5rab79h.js} +6 -6
  47. package/dist/cli/{knowledge-validator-q6jw2p0t.js → knowledge-validator-csay9wqj.js} +7 -7
  48. package/dist/cli/{pending-delegations-t047f4a7.js → pending-delegations-ddbkbgxy.js} +4 -4
  49. package/dist/cli/{pr-subscriptions-p8g2rzxd.js → pr-subscriptions-vwv7zm2p.js} +5 -5
  50. package/dist/cli/{schema-qb313fyy.js → schema-e5kd993s.js} +1 -1
  51. package/dist/cli/{scope-persistence-5ccgtebg.js → scope-persistence-fm0gzhnk.js} +2 -2
  52. package/dist/cli/{skill-generator-nnwn4sq0.js → skill-generator-z01sjppf.js} +9 -9
  53. package/dist/cli/{telemetry-jm7t8031.js → telemetry-jny76r83.js} +1 -1
  54. package/dist/commands/registry.d.ts +7 -0
  55. package/dist/config/constants.d.ts +1 -1
  56. package/dist/hooks/messages-transform.d.ts +22 -1
  57. package/dist/hooks/spawn-helper.d.ts +10 -0
  58. package/dist/index.js +95 -93
  59. package/dist/sandbox/capability-probe.d.ts +14 -0
  60. package/dist/sandbox/macos/sandbox-exec-executor.d.ts +5 -0
  61. package/dist/tools/tool-metadata.d.ts +1 -1
  62. package/dist/utils/path-security.d.ts +28 -0
  63. package/package.json +2 -1
  64. package/dist/cli/curator-llm-factory-dwvk7rh0.js +0 -41
  65. package/dist/cli/guardrail-explain-2k271yh4.js +0 -42
  66. package/dist/cli/hive-promoter-0y4pnft4.js +0 -49
@@ -4,7 +4,7 @@ import {
4
4
  countEntryViolationsInWindow,
5
5
  readKnowledgeEvents,
6
6
  recordKnowledgeEvent
7
- } from "./index-hpp2r0sd.js";
7
+ } from "./index-qzqx2qky.js";
8
8
  import {
9
9
  jaccardBigram,
10
10
  readKnowledge,
@@ -12,7 +12,7 @@ import {
12
12
  resolveSwarmKnowledgePath,
13
13
  transactKnowledge,
14
14
  wordBigrams
15
- } from "./index-32bx4kch.js";
15
+ } from "./index-0q7rrh59.js";
16
16
  import {
17
17
  isActiveStatus
18
18
  } from "./index-bfwt3abw.js";
@@ -188,7 +188,7 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
188
188
  alreadyInactive: true
189
189
  };
190
190
  }
191
- const { quarantineEntry } = await import("./knowledge-validator-q6jw2p0t.js");
191
+ const { quarantineEntry } = await import("./knowledge-validator-csay9wqj.js");
192
192
  await quarantineEntry(directory, entryId, `repeat_contradiction: ${count} contradicted events in ${windowDays}d`, "auto");
193
193
  return { quarantined: true, entryId, contradictionsInWindow: count };
194
194
  } catch {
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-n7rd2rkj.js";
4
+ } from "./index-srvqfcyj.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-r9fjzr3k.js";
7
+ } from "./index-xbe1wtme.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -81,44 +81,44 @@ import {
81
81
  handleWriteRetroCommand,
82
82
  normalizeSwarmCommandInput,
83
83
  resolveCommand
84
- } from "./index-54dgk0bv.js";
85
- import"./index-8f256d7t.js";
84
+ } from "./index-dh87tpc5.js";
85
+ import"./index-g6va6n3t.js";
86
86
  import"./index-c8s9a3zh.js";
87
- import"./index-0gf6de8b.js";
87
+ import"./index-2148358e.js";
88
88
  import {
89
89
  AGENT_TOOL_MAP,
90
90
  ORCHESTRATOR_NAME,
91
91
  stripKnownSwarmPrefix
92
- } from "./index-1ey3dxq7.js";
93
- import"./index-afgh75zg.js";
92
+ } from "./index-147ja18h.js";
93
+ import"./index-f6y341yk.js";
94
94
  import"./index-scww5b77.js";
95
- import"./index-9fxs0rm1.js";
96
- import"./index-q1jaeynn.js";
97
- import"./index-h389ed8y.js";
98
- import"./index-30ejh1tx.js";
99
- import"./index-t6wfwdm1.js";
100
- import"./index-hpp2r0sd.js";
101
- import"./index-32bx4kch.js";
95
+ import"./index-ga4ta3cr.js";
96
+ import"./index-80jkseqw.js";
97
+ import"./index-mr4whary.js";
98
+ import"./index-43khae15.js";
99
+ import"./index-h7q1bvzm.js";
100
+ import"./index-qzqx2qky.js";
101
+ import"./index-0q7rrh59.js";
102
102
  import"./index-bfwt3abw.js";
103
- import"./index-db1fh1fv.js";
103
+ import"./index-g40r5d08.js";
104
104
  import"./index-jt58s751.js";
105
- import"./index-wvrj16f0.js";
105
+ import"./index-8fwhhayc.js";
106
106
  import"./index-q1exe2b3.js";
107
- import"./index-g55nzpwn.js";
108
- import"./index-fhmw7evd.js";
109
- import"./index-1rga1vvb.js";
107
+ import"./index-n6fa2hhk.js";
108
+ import"./index-rdwfqhp7.js";
109
+ import"./index-wh8949ef.js";
110
110
  import"./index-jtqkh8jf.js";
111
111
  import"./index-5e4e2hvv.js";
112
112
  import"./index-p0arc26j.js";
113
113
  import"./index-zgwm4ryv.js";
114
114
  import"./index-dqh3zhhc.js";
115
- import"./index-x5g7et24.js";
116
- import"./index-0dab9w37.js";
115
+ import"./index-4h2ea8h5.js";
116
+ import"./index-0p660a87.js";
117
117
  import"./index-293f68mj.js";
118
- import"./index-5mkc2f9z.js";
119
- import"./index-vn263hqt.js";
118
+ import"./index-4sckv7y6.js";
119
+ import"./index-pa6t33pt.js";
120
120
  import"./index-vvk2g744.js";
121
- import"./index-h91bv3hy.js";
121
+ import"./index-qe3v54nb.js";
122
122
  import"./index-a76rekgs.js";
123
123
  // src/commands/command-names.ts
124
124
  var COMMAND_NAMES = Object.freeze(Object.keys(COMMAND_REGISTRY));
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-30ejh1tx.js";
5
+ } from "./index-43khae15.js";
6
6
  import {
7
7
  effectiveRetrievalOutcomes,
8
8
  readKnowledgeCounterRollups
9
- } from "./index-hpp2r0sd.js";
9
+ } from "./index-qzqx2qky.js";
10
10
  import {
11
11
  computeOutcomeSignal,
12
12
  readKnowledge,
13
13
  resolveHiveKnowledgePath,
14
14
  resolveSwarmKnowledgePath,
15
15
  transactKnowledge
16
- } from "./index-32bx4kch.js";
16
+ } from "./index-0q7rrh59.js";
17
17
  import {
18
18
  isActiveStatus
19
19
  } from "./index-bfwt3abw.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-vvk2g744.js";
5
5
  import {
6
6
  bunWrite
7
- } from "./index-h91bv3hy.js";
7
+ } from "./index-qe3v54nb.js";
8
8
  import {
9
9
  __toESM
10
10
  } from "./index-a76rekgs.js";
@@ -31,11 +31,14 @@ function initTelemetry(projectDirectory) {
31
31
  fs.mkdirSync(swarmDir, { recursive: true });
32
32
  }
33
33
  const telemetryPath = path.join(swarmDir, "telemetry.jsonl");
34
- _writeStream = createWriteStream(telemetryPath, { flags: "a" });
35
- _writeStream.on("error", () => {
36
- _disabled = true;
37
- _writeStream = null;
34
+ const stream = createWriteStream(telemetryPath, { flags: "a" });
35
+ stream.on("error", () => {
36
+ if (_writeStream === stream) {
37
+ _disabled = true;
38
+ _writeStream = null;
39
+ }
38
40
  });
41
+ _writeStream = stream;
39
42
  } catch {
40
43
  _disabled = true;
41
44
  _writeStream = null;
@@ -51,8 +54,9 @@ function emit(event, data) {
51
54
  event,
52
55
  ...data
53
56
  }) + os.EOL;
54
- _writeStream.write(line, (err) => {
55
- if (err) {
57
+ const stream = _writeStream;
58
+ stream.write(line, (err) => {
59
+ if (err && _writeStream === stream) {
56
60
  _disabled = true;
57
61
  _writeStream = null;
58
62
  }
@@ -89,11 +93,14 @@ function rotateTelemetryIfNeeded(maxBytes = 10 * 1024 * 1024) {
89
93
  fs.renameSync(telemetryPath, rotatedPath);
90
94
  if (_writeStream !== null) {
91
95
  _writeStream.end();
92
- _writeStream = createWriteStream(telemetryPath, { flags: "a" });
93
- _writeStream.on("error", () => {
94
- _disabled = true;
95
- _writeStream = null;
96
+ const stream = createWriteStream(telemetryPath, { flags: "a" });
97
+ stream.on("error", () => {
98
+ if (_writeStream === stream) {
99
+ _disabled = true;
100
+ _writeStream = null;
101
+ }
96
102
  });
103
+ _writeStream = stream;
97
104
  }
98
105
  } catch {}
99
106
  }
@@ -281,7 +281,12 @@ function bunSpawn(cmd, options) {
281
281
  const bun = getBun();
282
282
  if (bun?.spawn) {
283
283
  const mergedEnv2 = mergeEnvForChild(options?.env, options?.envOverrides);
284
- const spawnOpts = mergedEnv2 !== undefined ? { ...options, env: mergedEnv2 } : options;
284
+ const spawnOpts = { ...options };
285
+ if (mergedEnv2 !== undefined)
286
+ spawnOpts.env = mergedEnv2;
287
+ if (options?.timeout && options.timeout > 0) {
288
+ spawnOpts.killSignal = "SIGKILL";
289
+ }
285
290
  const proc2 = bun.spawn(cmd, spawnOpts);
286
291
  return {
287
292
  stdout: streamFromBun(proc2.stdout),
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveKnowledgeStoreDir
4
- } from "./index-db1fh1fv.js";
4
+ } from "./index-g40r5d08.js";
5
5
  import {
6
6
  init_logger,
7
7
  warn
8
8
  } from "./index-zgwm4ryv.js";
9
9
  import {
10
10
  atomicWriteFile
11
- } from "./index-0dab9w37.js";
11
+ } from "./index-0p660a87.js";
12
12
  import {
13
13
  require_proper_lockfile
14
14
  } from "./index-vvk2g744.js";
@@ -594,7 +594,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
594
594
  deltas.push({ id, delta });
595
595
  }
596
596
  if (deltas.length > 0) {
597
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-h3cjx4dg.js");
597
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-k5rab79h.js");
598
598
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
599
599
  }
600
600
  return {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-zgwm4ryv.js";
5
5
  import {
6
6
  bunSpawn
7
- } from "./index-h91bv3hy.js";
7
+ } from "./index-qe3v54nb.js";
8
8
  import {
9
9
  __require
10
10
  } from "./index-a76rekgs.js";
@@ -34,7 +34,7 @@ var _internals = {
34
34
  symlinkSync: fs.symlinkSync
35
35
  },
36
36
  writeScopeToDisk: async (directory, taskId, files) => {
37
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-5ccgtebg.js");
37
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-fm0gzhnk.js");
38
38
  return realWrite(directory, taskId, files);
39
39
  },
40
40
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -12,14 +12,14 @@ import {
12
12
  detectPosixWrites,
13
13
  detectWindowsWrites,
14
14
  resolveWriteTargets
15
- } from "./index-54dgk0bv.js";
15
+ } from "./index-dh87tpc5.js";
16
16
  import {
17
17
  checkFileAuthority,
18
18
  classifyFile,
19
19
  isInDeclaredScope,
20
20
  redactPath,
21
21
  redactShellCommand
22
- } from "./index-8f256d7t.js";
22
+ } from "./index-g6va6n3t.js";
23
23
 
24
24
  // src/services/guardrail-explain-service.ts
25
25
  import path from "path";
@@ -10,7 +10,7 @@ import {
10
10
  } from "./index-zgwm4ryv.js";
11
11
  import {
12
12
  bunFile
13
- } from "./index-h91bv3hy.js";
13
+ } from "./index-qe3v54nb.js";
14
14
 
15
15
  // src/hooks/utils.ts
16
16
  import * as fs from "fs";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-8f256d7t.js";
5
+ } from "./index-g6va6n3t.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
package/dist/cli/index.js CHANGED
@@ -7,42 +7,42 @@ import {
7
7
  getPluginLockFilePaths,
8
8
  package_default,
9
9
  resolveCommand
10
- } from "./index-54dgk0bv.js";
11
- import"./index-8f256d7t.js";
10
+ } from "./index-dh87tpc5.js";
11
+ import"./index-g6va6n3t.js";
12
12
  import"./index-c8s9a3zh.js";
13
- import"./index-0gf6de8b.js";
13
+ import"./index-2148358e.js";
14
14
  import {
15
15
  DEFAULT_AGENT_CONFIGS
16
- } from "./index-1ey3dxq7.js";
17
- import"./index-afgh75zg.js";
16
+ } from "./index-147ja18h.js";
17
+ import"./index-f6y341yk.js";
18
18
  import"./index-scww5b77.js";
19
- import"./index-9fxs0rm1.js";
20
- import"./index-q1jaeynn.js";
21
- import"./index-h389ed8y.js";
22
- import"./index-30ejh1tx.js";
23
- import"./index-t6wfwdm1.js";
24
- import"./index-hpp2r0sd.js";
25
- import"./index-32bx4kch.js";
19
+ import"./index-ga4ta3cr.js";
20
+ import"./index-80jkseqw.js";
21
+ import"./index-mr4whary.js";
22
+ import"./index-43khae15.js";
23
+ import"./index-h7q1bvzm.js";
24
+ import"./index-qzqx2qky.js";
25
+ import"./index-0q7rrh59.js";
26
26
  import"./index-bfwt3abw.js";
27
- import"./index-db1fh1fv.js";
27
+ import"./index-g40r5d08.js";
28
28
  import"./index-jt58s751.js";
29
- import"./index-wvrj16f0.js";
29
+ import"./index-8fwhhayc.js";
30
30
  import"./index-q1exe2b3.js";
31
- import"./index-g55nzpwn.js";
32
- import"./index-fhmw7evd.js";
33
- import"./index-1rga1vvb.js";
31
+ import"./index-n6fa2hhk.js";
32
+ import"./index-rdwfqhp7.js";
33
+ import"./index-wh8949ef.js";
34
34
  import"./index-jtqkh8jf.js";
35
35
  import"./index-5e4e2hvv.js";
36
36
  import"./index-p0arc26j.js";
37
37
  import"./index-zgwm4ryv.js";
38
38
  import"./index-dqh3zhhc.js";
39
- import"./index-x5g7et24.js";
40
- import"./index-0dab9w37.js";
39
+ import"./index-4h2ea8h5.js";
40
+ import"./index-0p660a87.js";
41
41
  import"./index-293f68mj.js";
42
- import"./index-5mkc2f9z.js";
43
- import"./index-vn263hqt.js";
42
+ import"./index-4sckv7y6.js";
43
+ import"./index-pa6t33pt.js";
44
44
  import"./index-vvk2g744.js";
45
- import"./index-h91bv3hy.js";
45
+ import"./index-qe3v54nb.js";
46
46
  import"./index-a76rekgs.js";
47
47
 
48
48
  // src/cli/index.ts
@@ -8,18 +8,18 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-t6wfwdm1.js";
12
- import"./index-hpp2r0sd.js";
13
- import"./index-32bx4kch.js";
11
+ } from "./index-h7q1bvzm.js";
12
+ import"./index-qzqx2qky.js";
13
+ import"./index-0q7rrh59.js";
14
14
  import"./index-bfwt3abw.js";
15
- import"./index-db1fh1fv.js";
15
+ import"./index-g40r5d08.js";
16
16
  import"./index-jtqkh8jf.js";
17
17
  import"./index-zgwm4ryv.js";
18
- import"./index-0dab9w37.js";
19
- import"./index-5mkc2f9z.js";
20
- import"./index-vn263hqt.js";
18
+ import"./index-0p660a87.js";
19
+ import"./index-4sckv7y6.js";
20
+ import"./index-pa6t33pt.js";
21
21
  import"./index-vvk2g744.js";
22
- import"./index-h91bv3hy.js";
22
+ import"./index-qe3v54nb.js";
23
23
  import"./index-a76rekgs.js";
24
24
  export {
25
25
  readRecentEscalations,
@@ -25,14 +25,14 @@ import {
25
25
  resolveKnowledgeCounterBaselinePath,
26
26
  resolveKnowledgeEventsPath,
27
27
  resolveLegacyApplicationLogPath
28
- } from "./index-hpp2r0sd.js";
29
- import"./index-db1fh1fv.js";
28
+ } from "./index-qzqx2qky.js";
29
+ import"./index-g40r5d08.js";
30
30
  import"./index-zgwm4ryv.js";
31
- import"./index-0dab9w37.js";
32
- import"./index-5mkc2f9z.js";
33
- import"./index-vn263hqt.js";
31
+ import"./index-0p660a87.js";
32
+ import"./index-4sckv7y6.js";
33
+ import"./index-pa6t33pt.js";
34
34
  import"./index-vvk2g744.js";
35
- import"./index-h91bv3hy.js";
35
+ import"./index-qe3v54nb.js";
36
36
  import"./index-a76rekgs.js";
37
37
  export {
38
38
  resolveLegacyApplicationLogPath,
@@ -34,16 +34,16 @@ import {
34
34
  transactFile,
35
35
  transactKnowledge,
36
36
  wordBigrams
37
- } from "./index-32bx4kch.js";
37
+ } from "./index-0q7rrh59.js";
38
38
  import"./index-bfwt3abw.js";
39
- import"./index-db1fh1fv.js";
39
+ import"./index-g40r5d08.js";
40
40
  import"./index-jtqkh8jf.js";
41
41
  import"./index-zgwm4ryv.js";
42
- import"./index-0dab9w37.js";
43
- import"./index-5mkc2f9z.js";
44
- import"./index-vn263hqt.js";
42
+ import"./index-0p660a87.js";
43
+ import"./index-4sckv7y6.js";
44
+ import"./index-pa6t33pt.js";
45
45
  import"./index-vvk2g744.js";
46
- import"./index-h91bv3hy.js";
46
+ import"./index-qe3v54nb.js";
47
47
  import"./index-a76rekgs.js";
48
48
  export {
49
49
  wordBigrams,
@@ -22,17 +22,17 @@ import {
22
22
  validateLesson,
23
23
  validateSkillCandidatePath,
24
24
  validateSkillPath
25
- } from "./index-30ejh1tx.js";
26
- import"./index-32bx4kch.js";
25
+ } from "./index-43khae15.js";
26
+ import"./index-0q7rrh59.js";
27
27
  import"./index-bfwt3abw.js";
28
- import"./index-db1fh1fv.js";
28
+ import"./index-g40r5d08.js";
29
29
  import"./index-jtqkh8jf.js";
30
30
  import"./index-zgwm4ryv.js";
31
- import"./index-0dab9w37.js";
32
- import"./index-5mkc2f9z.js";
33
- import"./index-vn263hqt.js";
31
+ import"./index-0p660a87.js";
32
+ import"./index-4sckv7y6.js";
33
+ import"./index-pa6t33pt.js";
34
34
  import"./index-vvk2g744.js";
35
- import"./index-h91bv3hy.js";
35
+ import"./index-qe3v54nb.js";
36
36
  import"./index-a76rekgs.js";
37
37
  export {
38
38
  validateSkillPath,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-1rga1vvb.js";
4
+ } from "./index-wh8949ef.js";
5
5
  import"./index-jtqkh8jf.js";
6
6
  import"./index-5e4e2hvv.js";
7
7
  import"./index-p0arc26j.js";
@@ -14,10 +14,10 @@ import {
14
14
  } from "./index-293f68mj.js";
15
15
  import {
16
16
  withEvidenceLock
17
- } from "./index-5mkc2f9z.js";
18
- import"./index-vn263hqt.js";
17
+ } from "./index-4sckv7y6.js";
18
+ import"./index-pa6t33pt.js";
19
19
  import"./index-vvk2g744.js";
20
- import"./index-h91bv3hy.js";
20
+ import"./index-qe3v54nb.js";
21
21
  import"./index-a76rekgs.js";
22
22
 
23
23
  // src/background/pending-delegations.ts
@@ -9,17 +9,17 @@ import {
9
9
  sweepStale,
10
10
  unsubscribe,
11
11
  updateSnapshot
12
- } from "./index-q1jaeynn.js";
13
- import"./index-1rga1vvb.js";
12
+ } from "./index-80jkseqw.js";
13
+ import"./index-wh8949ef.js";
14
14
  import"./index-jtqkh8jf.js";
15
15
  import"./index-5e4e2hvv.js";
16
16
  import"./index-p0arc26j.js";
17
17
  import"./index-zgwm4ryv.js";
18
18
  import"./index-293f68mj.js";
19
- import"./index-5mkc2f9z.js";
20
- import"./index-vn263hqt.js";
19
+ import"./index-4sckv7y6.js";
20
+ import"./index-pa6t33pt.js";
21
21
  import"./index-vvk2g744.js";
22
- import"./index-h91bv3hy.js";
22
+ import"./index-qe3v54nb.js";
23
23
  import"./index-a76rekgs.js";
24
24
  export {
25
25
  updateSnapshot,
@@ -86,7 +86,7 @@ import {
86
86
  resolveGeneratedAgentRole,
87
87
  resolveGuardrailsConfig,
88
88
  stripKnownSwarmPrefix
89
- } from "./index-1ey3dxq7.js";
89
+ } from "./index-147ja18h.js";
90
90
  import"./index-bfwt3abw.js";
91
91
  import"./index-p0arc26j.js";
92
92
  import"./index-293f68mj.js";
@@ -6,9 +6,9 @@ import {
6
6
  readScopeFromDisk,
7
7
  resolveScopeWithFallbacks,
8
8
  writeScopeToDisk
9
- } from "./index-g55nzpwn.js";
9
+ } from "./index-n6fa2hhk.js";
10
10
  import"./index-vvk2g744.js";
11
- import"./index-h91bv3hy.js";
11
+ import"./index-qe3v54nb.js";
12
12
  import"./index-a76rekgs.js";
13
13
  export {
14
14
  writeScopeToDisk,
@@ -33,19 +33,19 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-h389ed8y.js";
37
- import"./index-30ejh1tx.js";
38
- import"./index-hpp2r0sd.js";
39
- import"./index-32bx4kch.js";
36
+ } from "./index-mr4whary.js";
37
+ import"./index-43khae15.js";
38
+ import"./index-qzqx2qky.js";
39
+ import"./index-0q7rrh59.js";
40
40
  import"./index-bfwt3abw.js";
41
- import"./index-db1fh1fv.js";
41
+ import"./index-g40r5d08.js";
42
42
  import"./index-jtqkh8jf.js";
43
43
  import"./index-zgwm4ryv.js";
44
- import"./index-0dab9w37.js";
45
- import"./index-5mkc2f9z.js";
46
- import"./index-vn263hqt.js";
44
+ import"./index-0p660a87.js";
45
+ import"./index-4sckv7y6.js";
46
+ import"./index-pa6t33pt.js";
47
47
  import"./index-vvk2g744.js";
48
- import"./index-h91bv3hy.js";
48
+ import"./index-qe3v54nb.js";
49
49
  import"./index-a76rekgs.js";
50
50
  export {
51
51
  writeEvalStub,
@@ -8,7 +8,7 @@ import {
8
8
  resetTelemetryForTesting,
9
9
  rotateTelemetryIfNeeded,
10
10
  telemetry
11
- } from "./index-vn263hqt.js";
11
+ } from "./index-pa6t33pt.js";
12
12
  import"./index-a76rekgs.js";
13
13
  export {
14
14
  telemetry,
@@ -176,6 +176,13 @@ export declare const COMMAND_REGISTRY: {
176
176
  readonly toolPolicy: "agent";
177
177
  readonly toolNoArgs: false;
178
178
  };
179
+ readonly 'guardrail-explain': {
180
+ readonly handler: (ctx: CommandContext) => Promise<string>;
181
+ readonly description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)";
182
+ readonly category: "diagnostics";
183
+ readonly aliasOf: "guardrail explain";
184
+ readonly deprecated: true;
185
+ };
179
186
  readonly 'guardrail-log': {
180
187
  readonly handler: (ctx: CommandContext) => Promise<string>;
181
188
  readonly description: "Read the guardrail decision log (use --blocks-only for blocks)";
@@ -27,7 +27,7 @@ export declare const SKILL_AGENT_TOOL_MAP: Partial<Record<AgentName, ToolName[]>
27
27
  * NOTE: bash/shell tools are intentionally excluded — bash commands are opaque
28
28
  * to static scope analysis. Post-hoc detection via guardrails diff-scope provides secondary coverage.
29
29
  */
30
- export declare const WRITE_TOOL_NAMES: readonly ["write", "edit", "patch", "apply_patch", "swarm_apply_patch", "create_file", "insert", "replace", "append", "prepend"];
30
+ export declare const WRITE_TOOL_NAMES: readonly ["write", "edit", "patch", "apply_patch", "swarm_apply_patch", "create_file", "insert", "replace", "append", "prepend", "extract_code_blocks"];
31
31
  export type WriteToolName = (typeof WRITE_TOOL_NAMES)[number];
32
32
  export declare const DEFAULT_MODELS: Record<string, string>;
33
33
  export declare const DEFAULT_AGENT_CONFIGS: Record<string, {
@@ -3,11 +3,32 @@
3
3
  *
4
4
  * Note: Merged content order matches original insertion order (OpenCode base prompt
5
5
  * first, then swarm agent prompt) - this assumes sequential message construction.
6
+ *
7
+ * Dual-shape (issue #1778 H1): the OpenCode `messages.transform` hook delivers
8
+ * items shaped `{ info: { role, ... }, parts: [{ type: 'text', text }] }`, while
9
+ * unit fixtures and some callers use the flat `{ role, content }` shape. Both
10
+ * must be handled — reading role from `info.role` OR top-level `role`, and text
11
+ * from `parts[].text` OR `content` — or the consolidation (and the invariant-10
12
+ * safety-net that strips system messages at index > 0 for local models) becomes
13
+ * a silent no-op on production data.
6
14
  */
7
- type Message = {
15
+ type FlatMessage = {
8
16
  role: string;
9
17
  content: unknown;
10
18
  [key: string]: unknown;
11
19
  };
20
+ type PartsMessage = {
21
+ info: {
22
+ role: string;
23
+ [key: string]: unknown;
24
+ };
25
+ parts: Array<{
26
+ type?: string;
27
+ text?: string;
28
+ [key: string]: unknown;
29
+ }>;
30
+ [key: string]: unknown;
31
+ };
32
+ export type Message = FlatMessage | PartsMessage;
12
33
  export declare function consolidateSystemMessages(messages: Message[]): Message[];
13
34
  export {};
@@ -1,3 +1,13 @@
1
+ import * as child_process from 'node:child_process';
2
+ /**
3
+ * DI seam (AGENTS.md invariant #7 — prefer `_internals` over `mock.module`).
4
+ * Tests inject a spawn spy here to assert the win32 `.cmd` transformation of
5
+ * the resolved command name without depending on `npm.cmd` actually existing
6
+ * on the (POSIX) test runner. Restore in `afterEach`.
7
+ */
8
+ export declare const _internals: {
9
+ spawn: typeof child_process.spawn;
10
+ };
1
11
  export declare function spawnAsync(command: string[], cwd: string, timeoutMs: number): Promise<{
2
12
  exitCode: number;
3
13
  stdout: string;