opencode-swarm 7.132.1 → 7.133.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 (102) hide show
  1. package/.opencode/skills/swarm-pr-review/SKILL.md +15 -5
  2. package/README.md +4 -1
  3. package/dist/agents/agent-output-schema.d.ts +74 -0
  4. package/dist/agents/critic.d.ts +2 -1
  5. package/dist/agents/reviewer.d.ts +1 -1
  6. package/dist/background/completion-observer.d.ts +2 -0
  7. package/dist/background/pending-delegations.d.ts +39 -1
  8. package/dist/background/stage-b-gates.d.ts +2 -0
  9. package/dist/cli/{config-doctor-bp5spb79.js → config-doctor-8nbdwnn6.js} +2 -2
  10. package/dist/cli/{core-wg3re04e.js → core-egwpry19.js} +2 -2
  11. package/dist/cli/{curation-policy-7zp2m9gv.js → curation-policy-gae3xm5d.js} +2 -2
  12. package/dist/cli/{curator-28hcw9hx.js → curator-e88bm4mg.js} +17 -18
  13. package/dist/cli/{curator-llm-factory-rd0s95fw.js → curator-llm-factory-1a7esr69.js} +17 -18
  14. package/dist/cli/{evidence-summary-service-jfagmvrh.js → evidence-summary-service-nhsmsap8.js} +3 -3
  15. package/dist/cli/{guardrail-explain-742dhpec.js → guardrail-explain-zgja2b9m.js} +18 -19
  16. package/dist/cli/{guardrail-log-aa112fxv.js → guardrail-log-fjgyx76r.js} +3 -3
  17. package/dist/cli/{hive-promoter-8whgvcry.js → hive-promoter-2b04e0wh.js} +17 -18
  18. package/dist/cli/{index-9cf1yr67.js → index-0vd91yb8.js} +3 -3
  19. package/dist/cli/{index-w9cb5zwh.js → index-17zjp67y.js} +1 -1
  20. package/dist/cli/{index-djwemsjn.js → index-66zght9d.js} +1 -1
  21. package/dist/cli/{index-6ccynjv3.js → index-7ftthvqt.js} +2 -2
  22. package/dist/cli/{index-jgfcp9bh.js → index-bz08438z.js} +1 -1
  23. package/dist/cli/{index-mwkwyej1.js → index-cpest8sa.js} +5 -5
  24. package/dist/cli/{index-y5qp59rc.js → index-hfpw5m0e.js} +9 -3
  25. package/dist/cli/{index-3s9rfnqq.js → index-j5pnah1w.js} +4 -4
  26. package/dist/cli/{index-jj4earrh.js → index-kc1m6vpr.js} +2 -2
  27. package/dist/cli/{index-x3p6ktva.js → index-mhcge2ry.js} +34 -23
  28. package/dist/cli/{index-yvv1wt2h.js → index-mmvaf4t6.js} +1 -1
  29. package/dist/cli/{index-b21a4zw4.js → index-mwqfyjja.js} +37751 -33949
  30. package/dist/cli/{index-fgcmxjp7.js → index-sp7tm8t7.js} +1 -1
  31. package/dist/cli/{index-4hapy63e.js → index-sw82jvf2.js} +2 -2
  32. package/dist/cli/{index-630badhp.js → index-tj2mkfb3.js} +149 -6
  33. package/dist/cli/{index-rt5jgktq.js → index-wz36r0fk.js} +1 -1
  34. package/dist/cli/{index-bvp2v7k1.js → index-wzb4dv5s.js} +263 -16
  35. package/dist/cli/index.js +21 -20
  36. package/dist/cli/{knowledge-escalator-j0nceas7.js → knowledge-escalator-hzkw1ban.js} +3 -3
  37. package/dist/cli/{knowledge-events-gpqc62jr.js → knowledge-events-pbycdhqd.js} +1 -1
  38. package/dist/cli/{knowledge-store-ggxr3ww5.js → knowledge-store-45jawb2p.js} +1 -1
  39. package/dist/cli/{knowledge-validator-007smap6.js → knowledge-validator-ge576f8n.js} +4 -4
  40. package/dist/cli/pending-delegations-kxy8mdqg.js +75 -0
  41. package/dist/cli/{scan-cursor-wz4bff7a.js → scan-cursor-kvw872be.js} +2 -2
  42. package/dist/cli/{schema-023gwne7.js → schema-a2zm2m3r.js} +6 -2
  43. package/dist/cli/{scope-persistence-dm5bab50.js → scope-persistence-5qypzxxm.js} +1 -1
  44. package/dist/cli/{skill-generator-rtsg1m7x.js → skill-generator-ch79hvxh.js} +5 -5
  45. package/dist/commands/command-dispatch.d.ts +7 -0
  46. package/dist/commands/index.d.ts +7 -0
  47. package/dist/commands/registry.d.ts +16 -0
  48. package/dist/commands/review.d.ts +21 -0
  49. package/dist/config/agent-names.d.ts +3 -3
  50. package/dist/config/evidence-schema.d.ts +47 -47
  51. package/dist/config/index.d.ts +2 -2
  52. package/dist/config/schema.d.ts +58 -6
  53. package/dist/consensus/contracts.d.ts +3 -3
  54. package/dist/evaluation/contracts.d.ts +1 -1
  55. package/dist/evaluation/ephemeral-agent-dispatcher.d.ts +64 -0
  56. package/dist/evaluation/model-dispatcher.d.ts +11 -5
  57. package/dist/evaluation/public-api.d.ts +1 -1
  58. package/dist/hooks/auto-review.d.ts +30 -65
  59. package/dist/hooks/delegation-gate.d.ts +1 -1
  60. package/dist/hooks/guardrails/index.d.ts +32 -0
  61. package/dist/hooks/guardrails/messages-transform.d.ts +7 -0
  62. package/dist/hooks/guardrails/tool-before.d.ts +8 -0
  63. package/dist/hooks/guardrails.d.ts +1 -1
  64. package/dist/hooks/pr-workflow-response-gate.d.ts +44 -26
  65. package/dist/hooks/review-receipt-collector.d.ts +53 -10
  66. package/dist/hooks/review-receipt-scope.d.ts +74 -0
  67. package/dist/hooks/review-receipt.d.ts +104 -10
  68. package/dist/hooks/reviewer-scope-file-fingerprint.d.ts +21 -0
  69. package/dist/hooks/reviewer-scope-lifecycle.d.ts +19 -0
  70. package/dist/hooks/task-result-classifier.d.ts +6 -0
  71. package/dist/index.d.ts +2 -0
  72. package/dist/index.js +665 -612
  73. package/dist/memory/schema.d.ts +5 -5
  74. package/dist/review/contracts.d.ts +29 -0
  75. package/dist/review/diff-source.d.ts +134 -0
  76. package/dist/review/engine.d.ts +60 -0
  77. package/dist/review/evidence.d.ts +88 -0
  78. package/dist/review/finding-validator.d.ts +77 -0
  79. package/dist/review/phase-runner.d.ts +37 -0
  80. package/dist/review/runtime.d.ts +32 -0
  81. package/dist/scope/scope-binding.d.ts +9 -0
  82. package/dist/services/config-doctor.d.ts +12 -0
  83. package/dist/state.d.ts +179 -0
  84. package/dist/tools/dispatch-lanes.d.ts +2 -0
  85. package/dist/tools/lean-turbo-review.d.ts +4 -1
  86. package/dist/tools/lean-turbo-run-phase.d.ts +3 -1
  87. package/dist/tools/phase-complete/gates/final-review-gate.d.ts +18 -0
  88. package/dist/tools/phase-complete/gates/index.d.ts +1 -0
  89. package/dist/tools/phase-complete/gates/types.d.ts +10 -0
  90. package/dist/tools/phase-complete.d.ts +13 -1
  91. package/dist/tools/plugin-registration.d.ts +3 -1
  92. package/dist/tools/swarm-command.d.ts +4 -1
  93. package/dist/tools/tool-metadata.d.ts +22 -22
  94. package/dist/turbo/lean/integration.d.ts +18 -2
  95. package/dist/turbo/lean/reviewer.d.ts +19 -3
  96. package/dist/turbo/lean/runner.d.ts +1 -1
  97. package/package.json +1 -1
  98. package/dist/cli/index-y2pfmd0z.js +0 -259
  99. package/dist/cli/pending-delegations-37t4xecr.js +0 -34
  100. package/dist/cli/{curator-drift-y1wm4atk.js → curator-drift-ea0p8nh1.js} +2 -2
  101. package/dist/cli/{index-4ff0x4cg.js → index-74tptrss.js} +0 -0
  102. package/dist/cli/{index-03zyn94g.js → index-r260ybay.js} +4 -4
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-6ccynjv3.js";
5
+ } from "./index-7ftthvqt.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-3s9rfnqq.js";
12
+ } from "./index-j5pnah1w.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-jgfcp9bh.js";
16
+ } from "./index-bz08438z.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -39,7 +39,7 @@ var _internals = {
39
39
  symlinkSync: fs.symlinkSync
40
40
  },
41
41
  writeScopeToDisk: async (directory, taskId, files) => {
42
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-dm5bab50.js");
42
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-5qypzxxm.js");
43
43
  return realWrite(directory, taskId, files);
44
44
  },
45
45
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-3s9rfnqq.js";
5
+ } from "./index-j5pnah1w.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-q27bajqb.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-rt5jgktq.js";
4
+ } from "./index-wz36r0fk.js";
5
5
  import {
6
6
  findNearDuplicate,
7
7
  inferTags,
@@ -9,7 +9,7 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-3s9rfnqq.js";
12
+ } from "./index-j5pnah1w.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-q27bajqb.js";
@@ -608,7 +608,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
608
608
  deltas.push({ id, delta });
609
609
  }
610
610
  if (deltas.length > 0) {
611
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-ggxr3ww5.js");
611
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-45jawb2p.js");
612
612
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
613
613
  }
614
614
  return {
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-3s9rfnqq.js";
9
+ } from "./index-j5pnah1w.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-jgfcp9bh.js";
15
+ } from "./index-bz08438z.js";
16
16
  import {
17
17
  init_knowledge_types,
18
18
  isActiveStatus
@@ -190,11 +190,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
190
190
  alreadyInactive: true
191
191
  };
192
192
  }
193
- const { quarantineEntry } = await import("./knowledge-validator-007smap6.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-ge576f8n.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-023gwne7.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-y5qp59rc.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-a2zm2m3r.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-hfpw5m0e.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -7,7 +7,7 @@ import {
7
7
  loadPluginConfigWithMeta,
8
8
  loadPluginConfigWithMetaAsync,
9
9
  resolveWorktreeIsolationConfig
10
- } from "./index-jj4earrh.js";
10
+ } from "./index-kc1m6vpr.js";
11
11
  import {
12
12
  ApprovalEvidenceSchema,
13
13
  BaseEvidenceSchema,
@@ -36,8 +36,10 @@ import {
36
36
  import {
37
37
  ALL_AGENT_NAMES,
38
38
  ALL_SUBAGENT_NAMES,
39
+ AUTO_REVIEW_V8_BURN_IN_DECISION,
39
40
  AgentOverrideConfigSchema,
40
41
  ApplyPatchConfigSchema,
42
+ AutoReviewConfigSchema,
41
43
  AutomationCapabilitiesSchema,
42
44
  AutomationConfigSchema,
43
45
  AutomationModeSchema,
@@ -58,8 +60,9 @@ import {
58
60
  TurboConfigSchema,
59
61
  WorktreeIsolationConfigSchema,
60
62
  isQAAgent,
61
- isSubagent
62
- } from "./index-bvp2v7k1.js";
63
+ isSubagent,
64
+ resolveAutoReviewConfig
65
+ } from "./index-wzb4dv5s.js";
63
66
  import"./index-bk5tah7q.js";
64
67
  import {
65
68
  MigrationStatusSchema,
@@ -78,6 +81,7 @@ import"./index-a76rekgs.js";
78
81
  export {
79
82
  validateSpecContent,
80
83
  resolveWorktreeIsolationConfig,
84
+ resolveAutoReviewConfig,
81
85
  loadPluginConfigWithMetaAsync,
82
86
  loadPluginConfigWithMeta,
83
87
  loadPluginConfig,
@@ -131,9 +135,11 @@ export {
131
135
  AutomationModeSchema,
132
136
  AutomationConfigSchema,
133
137
  AutomationCapabilitiesSchema,
138
+ AutoReviewConfigSchema,
134
139
  ApprovalEvidenceSchema,
135
140
  ApplyPatchConfigSchema,
136
141
  AgentOverrideConfigSchema,
142
+ AUTO_REVIEW_V8_BURN_IN_DECISION,
137
143
  ALL_SUBAGENT_NAMES,
138
144
  ALL_AGENT_NAMES
139
145
  };
@@ -702,7 +702,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
702
702
  const recovered = touched.filter((e) => e.confidence > CONFIDENCE_FLOOR + FLOOR_EPSILON && e.confidence_floor_demoted);
703
703
  if (atFloor.length === 0 && recovered.length === 0)
704
704
  return;
705
- const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-gpqc62jr.js");
705
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-pbycdhqd.js");
706
706
  const rollups = await readKnowledgeCounterRollups(directory);
707
707
  const flagIds = new Set;
708
708
  for (const e of atFloor) {
@@ -769,11 +769,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
769
769
  });
770
770
  }
771
771
  if (action === "quarantine" && toQuarantine.length > 0) {
772
- const { quarantineEntry } = await import("./knowledge-validator-007smap6.js");
773
- const { KnowledgeConfigSchema } = await import("./schema-023gwne7.js");
772
+ const { quarantineEntry } = await import("./knowledge-validator-ge576f8n.js");
773
+ const { KnowledgeConfigSchema } = await import("./schema-a2zm2m3r.js");
774
774
  let config;
775
775
  try {
776
- const { loadPluginConfigWithMeta } = await import("./index-y5qp59rc.js");
776
+ const { loadPluginConfigWithMeta } = await import("./index-hfpw5m0e.js");
777
777
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
778
778
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
779
779
  } catch {
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  resolveExternalSkillsConfig
11
- } from "./index-bvp2v7k1.js";
11
+ } from "./index-wzb4dv5s.js";
12
12
  import {
13
13
  advisoryWarn,
14
14
  init_warning_buffer
@@ -715,4 +715,4 @@ function resolveWorktreeIsolationConfig(config) {
715
715
  // src/config/index.ts
716
716
  var _internals = { loadPluginConfigWithMeta };
717
717
 
718
- export { loadPluginConfig, loadPluginConfigWithMeta, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, resolveWorktreeIsolationConfig, _internals };
718
+ export { resolveWorktreeIsolationConfig, loadPluginConfig, loadPluginConfigWithMeta, getSafeDefaultConfigLoadResult, loadPluginConfigWithMetaAsync, loadAgentPrompt, exports_loader, init_loader, _internals };
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-4hapy63e.js";
4
+ } from "./index-sw82jvf2.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-fgcmxjp7.js";
7
+ } from "./index-sp7tm8t7.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -69,6 +69,7 @@ import {
69
69
  handleResetCommand,
70
70
  handleResetSessionCommand,
71
71
  handleRetrieveCommand,
72
+ handleReviewCommand,
72
73
  handleRollbackCommand,
73
74
  handleSddCommand,
74
75
  handleSddProjectCommand,
@@ -83,28 +84,29 @@ import {
83
84
  handleWriteRetroCommand,
84
85
  normalizeSwarmCommandInput,
85
86
  resolveCommand
86
- } from "./index-b21a4zw4.js";
87
- import"./index-yvv1wt2h.js";
88
- import"./index-630badhp.js";
89
- import"./index-03zyn94g.js";
87
+ } from "./index-mwqfyjja.js";
88
+ import"./index-mmvaf4t6.js";
89
+ import"./index-tj2mkfb3.js";
90
+ import"./index-r260ybay.js";
90
91
  import"./index-4905hd2m.js";
91
92
  import"./index-134d35c1.js";
92
93
  import"./index-9f71ye47.js";
93
- import"./index-9cf1yr67.js";
94
- import"./index-mwkwyej1.js";
95
- import"./index-djwemsjn.js";
94
+ import"./index-0vd91yb8.js";
95
+ import"./index-cpest8sa.js";
96
+ import"./index-66zght9d.js";
96
97
  import"./index-vxv732ex.js";
97
98
  import"./index-c8s9a3zh.js";
98
99
  import"./index-9ss2m4rs.js";
99
100
  import"./index-g4mnf3p5.js";
100
- import"./index-6ccynjv3.js";
101
- import"./index-rt5jgktq.js";
101
+ import"./index-s80bsjkj.js";
102
+ import"./index-7ftthvqt.js";
103
+ import"./index-wz36r0fk.js";
102
104
  import"./index-rtry5xyf.js";
103
- import"./index-3s9rfnqq.js";
104
- import"./index-jgfcp9bh.js";
105
+ import"./index-j5pnah1w.js";
106
+ import"./index-bz08438z.js";
105
107
  import"./index-ae75rja9.js";
106
108
  import"./index-q27bajqb.js";
107
- import"./index-jj4earrh.js";
109
+ import"./index-kc1m6vpr.js";
108
110
  import"./index-k5jrywpr.js";
109
111
  import"./index-n832052r.js";
110
112
  import {
@@ -113,18 +115,16 @@ import {
113
115
  init_constants,
114
116
  init_schema,
115
117
  stripKnownSwarmPrefix
116
- } from "./index-bvp2v7k1.js";
118
+ } from "./index-wzb4dv5s.js";
117
119
  import"./index-bk5tah7q.js";
118
120
  import"./index-8fwhhayc.js";
119
121
  import"./index-q1exe2b3.js";
120
- import"./index-4ff0x4cg.js";
122
+ import"./index-74tptrss.js";
121
123
  import"./index-2tn5h2zp.js";
122
124
  import"./index-1kz6da87.js";
123
- import"./index-w9cb5zwh.js";
124
- import"./index-4rhhvd1a.js";
125
- import"./index-y2pfmd0z.js";
126
- import"./index-s80bsjkj.js";
125
+ import"./index-17zjp67y.js";
127
126
  import"./index-z6xqpmqg.js";
127
+ import"./index-4rhhvd1a.js";
128
128
  import"./index-zjygnfay.js";
129
129
  import"./index-zgwm4ryv.js";
130
130
  import"./index-h3k62043.js";
@@ -263,7 +263,10 @@ function createSwarmCommandHandler(directory, agents, options = {}) {
263
263
  activeAgentName: options.getActiveAgentName?.(input.sessionID),
264
264
  packageRoot: options.packageRoot,
265
265
  registeredAgents: options.registeredAgents,
266
- evaluationModelDispatcher: options.evaluationModelDispatcher
266
+ evaluationModelDispatcher: options.evaluationModelDispatcher,
267
+ reviewModelDispatcher: options.reviewModelDispatcher,
268
+ autoReviewConfig: options.autoReviewConfig,
269
+ reviewAgentModelRegistry: options.reviewAgentModelRegistry
267
270
  })
268
271
  });
269
272
  return;
@@ -278,7 +281,10 @@ async function buildSwarmCommandPrompt(args) {
278
281
  activeAgentName,
279
282
  packageRoot,
280
283
  registeredAgents,
281
- evaluationModelDispatcher
284
+ evaluationModelDispatcher,
285
+ reviewModelDispatcher,
286
+ autoReviewConfig,
287
+ reviewAgentModelRegistry
282
288
  } = args;
283
289
  const resolved = _internals.resolveCommand(tokens);
284
290
  if (!resolved) {
@@ -322,7 +328,11 @@ async function buildSwarmCommandPrompt(args) {
322
328
  sessionID,
323
329
  tokens,
324
330
  packageRoot,
325
- evaluationModelDispatcher
331
+ evaluationModelDispatcher,
332
+ reviewModelDispatcher,
333
+ autoReviewConfig,
334
+ activeAgentName,
335
+ reviewAgentModelRegistry
326
336
  });
327
337
  return formatCanonicalPromptFallback({
328
338
  original: `/swarm ${tokens.join(" ")}`.trim(),
@@ -389,6 +399,7 @@ export {
389
399
  handleSddProjectCommand,
390
400
  handleSddCommand,
391
401
  handleRollbackCommand,
402
+ handleReviewCommand,
392
403
  handleRetrieveCommand,
393
404
  handleResetSessionCommand,
394
405
  handleResetCommand,
@@ -3,7 +3,7 @@ import {
3
3
  init_constants,
4
4
  init_schema,
5
5
  stripKnownSwarmPrefix
6
- } from "./index-bvp2v7k1.js";
6
+ } from "./index-wzb4dv5s.js";
7
7
  import {
8
8
  init_logger,
9
9
  warn