opencode-swarm 7.140.0 → 7.140.1

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 (49) hide show
  1. package/.opencode/skills/commit-pr/SKILL.md +7 -0
  2. package/.opencode/skills/issue-ingest/SKILL.md +32 -1
  3. package/.opencode/skills/swarm-pr-feedback/SKILL.md +2 -2
  4. package/.opencode/skills/swarm-pr-review/SKILL.md +14 -3
  5. package/dist/cli/{config-doctor-3bm8pvnb.js → config-doctor-0b5z13vq.js} +3 -3
  6. package/dist/cli/{core-jtj9j6z5.js → core-m5y25n0j.js} +2 -2
  7. package/dist/cli/{curation-policy-zkvkg4np.js → curation-policy-bn7g8n40.js} +2 -2
  8. package/dist/cli/{curator-78ejknh2.js → curator-b7f6nt8h.js} +14 -14
  9. package/dist/cli/{curator-llm-factory-kbqtk2wm.js → curator-llm-factory-0mkbw2hg.js} +14 -14
  10. package/dist/cli/{guardrail-explain-d6emse0z.js → guardrail-explain-p2htdqkz.js} +15 -15
  11. package/dist/cli/{guardrail-log-27d6r2xq.js → guardrail-log-rqt9wrzw.js} +4 -4
  12. package/dist/cli/{hive-promoter-r5x4a2ta.js → hive-promoter-61sjdrgt.js} +14 -14
  13. package/dist/cli/{index-43k8ntw7.js → index-0an7an2s.js} +2 -2
  14. package/dist/cli/{index-6d7jkk1s.js → index-6fwr2w8v.js} +2 -2
  15. package/dist/cli/{index-mb34t6w9.js → index-7f72x6nv.js} +71 -53
  16. package/dist/cli/{index-bdnrrx3w.js → index-7nhrn9sy.js} +1 -1
  17. package/dist/cli/{index-6ykm2eha.js → index-a98msw3z.js} +1 -1
  18. package/dist/cli/{index-0jbhmm8b.js → index-acc18zrj.js} +2 -2
  19. package/dist/cli/{index-s38e38qy.js → index-dbg3agxz.js} +4 -4
  20. package/dist/cli/{index-6yv6wda9.js → index-dn3nkwbc.js} +1 -1
  21. package/dist/cli/{index-scbp2d32.js → index-ff7b0cr5.js} +16 -16
  22. package/dist/cli/{index-chycpf9y.js → index-hgrzjhsf.js} +3 -3
  23. package/dist/cli/{index-ma8vk3v1.js → index-hnprx6qv.js} +2 -2
  24. package/dist/cli/{index-0pqh1710.js → index-jq7n7w9y.js} +2 -2
  25. package/dist/cli/{index-zebb6yw0.js → index-m9csth1h.js} +2 -2
  26. package/dist/cli/{index-fxw0zvxc.js → index-r7tg8kjh.js} +5 -5
  27. package/dist/cli/{index-r4t92q32.js → index-v1d4qz8y.js} +8 -0
  28. package/dist/cli/{index-hbnsmnb0.js → index-vw75bhf3.js} +1 -1
  29. package/dist/cli/{index-p6h8f59v.js → index-wysn7pcz.js} +1 -1
  30. package/dist/cli/{index-f8dhh53t.js → index-yf6p4wc5.js} +3 -3
  31. package/dist/cli/index.js +14 -14
  32. package/dist/cli/{knowledge-escalator-qjdfv9sj.js → knowledge-escalator-twwz5a0d.js} +3 -3
  33. package/dist/cli/{knowledge-events-7szzg70x.js → knowledge-events-hgaz06m8.js} +1 -1
  34. package/dist/cli/{knowledge-store-9mr7a9n8.js → knowledge-store-46jrzgvm.js} +1 -1
  35. package/dist/cli/{knowledge-validator-58s2j0dp.js → knowledge-validator-7vnqwjtv.js} +4 -4
  36. package/dist/cli/{scan-cursor-h3j1egky.js → scan-cursor-acsjpv2n.js} +2 -2
  37. package/dist/cli/{schema-9ryqandr.js → schema-4dy7emnw.js} +2 -2
  38. package/dist/cli/{skill-generator-66ez26yh.js → skill-generator-a48t83hf.js} +5 -5
  39. package/dist/hooks/issue-trace-reducer.d.ts +37 -13
  40. package/dist/hooks/issue-trace-state.d.ts +38 -9
  41. package/dist/hooks/issue-trace.d.ts +15 -2
  42. package/dist/hooks/pr-workflow-gate.d.ts +9 -1
  43. package/dist/index.js +47 -42
  44. package/dist/tools/index.d.ts +2 -0
  45. package/dist/tools/manifest.d.ts +2 -0
  46. package/dist/tools/record-issue-publication.d.ts +16 -0
  47. package/dist/tools/record-issue-reproduction.d.ts +22 -0
  48. package/dist/tools/tool-metadata.d.ts +8 -0
  49. package/package.json +1 -1
@@ -16,13 +16,13 @@ import {
16
16
  } from "./index-1m1ksyqt.js";
17
17
  import {
18
18
  stableCanonicalStringify
19
- } from "./index-zebb6yw0.js";
19
+ } from "./index-m9csth1h.js";
20
20
  import {
21
21
  detectStraySwarmDirs,
22
22
  readDoctorArtifact,
23
23
  removeStraySwarmDir,
24
24
  runConfigDoctor
25
- } from "./index-0jbhmm8b.js";
25
+ } from "./index-acc18zrj.js";
26
26
  import {
27
27
  MAX_TRANSIENT_RETRIES,
28
28
  archiveEvidence,
@@ -122,15 +122,15 @@ import {
122
122
  retireSkill,
123
123
  selectCandidateEntries,
124
124
  syncBundledProjectSkillsIfMissingAsync
125
- } from "./index-f8dhh53t.js";
125
+ } from "./index-yf6p4wc5.js";
126
126
  import {
127
127
  readRecentEscalations
128
- } from "./index-fxw0zvxc.js";
128
+ } from "./index-r7tg8kjh.js";
129
129
  import {
130
130
  alreadyCuratedThisGeneration,
131
131
  claimNextScanBatch,
132
132
  resolveCohortId
133
- } from "./index-bdnrrx3w.js";
133
+ } from "./index-7nhrn9sy.js";
134
134
  import {
135
135
  CURATOR_INIT_PROMPT,
136
136
  CURATOR_PHASE_PROMPT,
@@ -222,11 +222,11 @@ import {
222
222
  validateActionableFields,
223
223
  validateLesson,
224
224
  validateSkillPath
225
- } from "./index-ma8vk3v1.js";
225
+ } from "./index-hnprx6qv.js";
226
226
  import {
227
227
  authorizeCuration,
228
228
  buildConfigFingerprintInput
229
- } from "./index-6ykm2eha.js";
229
+ } from "./index-a98msw3z.js";
230
230
  import {
231
231
  cohortConfigFingerprint
232
232
  } from "./index-rtry5xyf.js";
@@ -259,7 +259,7 @@ import {
259
259
  transactFile,
260
260
  transactKnowledge,
261
261
  wordBigrams
262
- } from "./index-s38e38qy.js";
262
+ } from "./index-dbg3agxz.js";
263
263
  import {
264
264
  MAX_EVENT_LOG_ENTRIES,
265
265
  _internals,
@@ -269,7 +269,7 @@ import {
269
269
  recordHiveKnowledgeEvent,
270
270
  recordKnowledgeEvent,
271
271
  resolveKnowledgeEventsPath
272
- } from "./index-p6h8f59v.js";
272
+ } from "./index-wysn7pcz.js";
273
273
  import {
274
274
  resolveHiveDataDir,
275
275
  resolveHiveEventsPath,
@@ -313,7 +313,7 @@ import {
313
313
  init_loader,
314
314
  loadPluginConfig,
315
315
  loadPluginConfigWithMeta
316
- } from "./index-43k8ntw7.js";
316
+ } from "./index-0an7an2s.js";
317
317
  import {
318
318
  RetrospectiveEvidenceSchema
319
319
  } from "./index-gprxjmm7.js";
@@ -345,7 +345,7 @@ import {
345
345
  package_default,
346
346
  resolveAutoReviewConfig,
347
347
  stripKnownSwarmPrefix
348
- } from "./index-0pqh1710.js";
348
+ } from "./index-jq7n7w9y.js";
349
349
  import {
350
350
  AGENT_TOOL_MAP,
351
351
  ALL_AGENT_NAMES,
@@ -357,7 +357,7 @@ import {
357
357
  init_agent_names,
358
358
  init_constants,
359
359
  init_tool_metadata
360
- } from "./index-r4t92q32.js";
360
+ } from "./index-v1d4qz8y.js";
361
361
  import {
362
362
  KNOWLEDGE_SCHEMA_VERSION,
363
363
  OUTCOME_BLOCK_THRESHOLD,
@@ -2340,7 +2340,7 @@ async function clearPrWorkflowGateState(directory, sessionID, expectedRevision)
2340
2340
  trackedStatesByProjectSession.delete(stateCacheKey(directory, normalizedSessionID));
2341
2341
  });
2342
2342
  }
2343
- async function abortPrWorkflow(directory, sessionID, options = {}) {
2343
+ async function abortPrWorkflow(directory, sessionID, options = { kind: "recovery", reason: "" }) {
2344
2344
  const state = await requireAnyActiveState(directory, sessionID);
2345
2345
  if (options.expectedMode && state.mode !== options.expectedMode) {
2346
2346
  throw wrongModeError(state, options.expectedMode);
@@ -2353,15 +2353,23 @@ async function abortPrWorkflow(directory, sessionID, options = {}) {
2353
2353
  const laneIds = openLanes.map((record) => record.laneId ?? record.subagentSessionId ?? "unknown").filter(Boolean).slice(0, 10).join(", ");
2354
2354
  throw new Error(`BLOCKED: ${state.mode} abort refused while ${openLanes.length} PR workflow lane(s) are still in flight (lane ids: ${laneIds}). Collect their results or let them settle before aborting.`);
2355
2355
  }
2356
- const sanitizedReason = typeof options.reason === "string" ? options.reason.trim().slice(0, 500) : undefined;
2356
+ if (options.kind === "recovery" && state.prHeadSha && !state.checkoutRecovery) {
2357
+ throw new Error(`BLOCKED: recovery abort of a bound ${state.mode} (pr_head_sha ${state.prHeadSha}) requires a controller-recorded terminal recovery condition (checkoutRecovery). Binding succeeded, so "checkout unreachable" no longer justifies a recovery abort \u2014 complete the workflow, resolve the Git recovery state, or use the user-authorized force abort (/swarm abort-pr-workflow) to override.`);
2358
+ }
2359
+ const sanitizedReason = typeof options.reason === "string" && options.reason.trim().length > 0 ? options.reason.trim().slice(0, 500) : undefined;
2360
+ if (sanitizedReason === undefined) {
2361
+ throw new Error(`BLOCKED: ${state.mode} abort requires a non-empty reason (recorded to the audit trail).`);
2362
+ }
2357
2363
  const abortEvent = {
2358
2364
  type: "pr_workflow_aborted",
2359
2365
  timestamp: isoNow(),
2360
2366
  sessionID: state.sessionID,
2361
2367
  mode: state.mode,
2368
+ kind: options.kind,
2362
2369
  ...state.prHeadSha ? { prHeadSha: state.prHeadSha } : {},
2370
+ ...state.checkoutRecovery ? { hadTerminalRecovery: true } : {},
2363
2371
  openLanes: openLanes.length,
2364
- ...sanitizedReason ? { reason: sanitizedReason } : {}
2372
+ reason: sanitizedReason
2365
2373
  };
2366
2374
  try {
2367
2375
  const eventsPath = validateSwarmPath(directory, "events.jsonl");
@@ -2401,6 +2409,7 @@ async function bindPrWorkflowHead(directory, sessionID, prHeadSha) {
2401
2409
  const nextState = {
2402
2410
  ...state,
2403
2411
  prHeadSha: normalizedHead,
2412
+ checkoutRecovery: undefined,
2404
2413
  updatedAt: isoNow()
2405
2414
  };
2406
2415
  await _test_exports.beforePrFeedbackTrackingPersist?.();
@@ -4712,16 +4721,21 @@ init_logger();
4712
4721
 
4713
4722
  // src/commands/abort-pr-workflow.ts
4714
4723
  var USAGE = [
4715
- "Usage: /swarm abort-pr-workflow [PR_REVIEW|PR_FEEDBACK] [reason...]",
4724
+ "Usage: /swarm abort-pr-workflow [PR_REVIEW|PR_FEEDBACK] <reason...>",
4716
4725
  "",
4717
4726
  "Clear an active PR_REVIEW or PR_FEEDBACK mechanical gate for the current session",
4718
- "and stop the auto-resume loop. Use when a PR review or feedback workflow is stuck",
4719
- "(e.g. the working tree cannot reach the PR head, a compound shell command was",
4720
- "rejected, or the wake budget is suspended).",
4727
+ "and stop the auto-resume loop. This is the human-only FORCE escape hatch: it may",
4728
+ "clear a BOUND gate (one whose PR head was successfully checked out) without a",
4729
+ "recovery condition, which the agent's own recovery abort is refused for. Use when",
4730
+ "a PR review or feedback workflow is unrecoverably stuck (e.g. the working tree",
4731
+ "cannot reach the PR head, a compound shell command was rejected, or the wake",
4732
+ "budget is suspended).",
4721
4733
  "",
4722
4734
  "Arguments:",
4723
4735
  " mode Optional: PR_REVIEW or PR_FEEDBACK. If omitted, aborts whichever is active.",
4724
- " reason Optional free-text reason (recorded to .swarm/events.jsonl).",
4736
+ " reason Optional free-text reason recorded to the audit trail (.swarm/events.jsonl).",
4737
+ ' If omitted, a default ("user-initiated force abort ...") is recorded so the',
4738
+ " gate always has a non-empty reason. The agent tool call must supply its own.",
4725
4739
  "",
4726
4740
  "Refuses while the workflow is armed for publication (call complete_pr_workflow",
4727
4741
  "instead) or while PR workflow lanes are still in flight (collect their results first)."
@@ -4733,7 +4747,7 @@ async function handleAbortPrWorkflowCommand(directory, args, sessionID) {
4733
4747
  const modeToken = tokens[0]?.toUpperCase();
4734
4748
  const knownMode = modeToken && KNOWN_MODES.has(modeToken) ? modeToken : undefined;
4735
4749
  const reasonStartIndex = knownMode ? 1 : 0;
4736
- const reason = tokens.slice(reasonStartIndex).join(" ").trim().slice(0, 500) || undefined;
4750
+ const explicitReason = tokens.slice(reasonStartIndex).join(" ").trim().slice(0, 500);
4737
4751
  if (modeToken && !knownMode) {
4738
4752
  return `Error: Unknown mode "${modeToken}". Expected PR_REVIEW or PR_FEEDBACK.
4739
4753
 
@@ -4744,13 +4758,15 @@ ${USAGE}`;
4744
4758
 
4745
4759
  ${USAGE}`;
4746
4760
  }
4761
+ const reason = explicitReason || "user-initiated force abort via /swarm abort-pr-workflow (no explicit reason provided)";
4747
4762
  try {
4748
4763
  const summary = await abortPrWorkflow(directory, sessionID, {
4749
- ...knownMode ? { expectedMode: knownMode } : {},
4750
- ...reason ? { reason } : {}
4764
+ kind: "force",
4765
+ reason,
4766
+ ...knownMode ? { expectedMode: knownMode } : {}
4751
4767
  });
4752
4768
  const headLine = summary.prHeadSha ? ` (was bound to PR head ${summary.prHeadSha})` : " (was not bound to a PR head)";
4753
- return `Aborted active ${summary.mode} mechanical gate for session ${sessionID}${headLine}. The durable gate state has been cleared and the auto-resume loop will stop. An audit event was appended to .swarm/events.jsonl.`;
4769
+ return `Aborted active ${summary.mode} mechanical gate for session ${sessionID}${headLine} (force). The durable gate state has been cleared and the auto-resume loop will stop. An audit event was appended to .swarm/events.jsonl.`;
4754
4770
  } catch (error2) {
4755
4771
  const message = error2 instanceof Error ? error2.message : String(error2);
4756
4772
  return `Error: ${message}
@@ -21991,7 +22007,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
21991
22007
  };
21992
22008
  }
21993
22009
  async function sweepActiveNearDuplicates(directory, options = {}) {
21994
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-chycpf9y.js");
22010
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-hgrzjhsf.js");
21995
22011
  const { config } = loadPluginConfigWithMeta2(directory);
21996
22012
  const sweepConfig = config.learning?.dedup_sweep;
21997
22013
  if (sweepConfig?.enabled === false)
@@ -23075,7 +23091,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
23075
23091
  }
23076
23092
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
23077
23093
  try {
23078
- const skillModule = await import("./skill-generator-66ez26yh.js");
23094
+ const skillModule = await import("./skill-generator-a48t83hf.js");
23079
23095
  for (const cand of skillCandidates) {
23080
23096
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
23081
23097
  continue;
@@ -23535,7 +23551,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
23535
23551
  } catch {}
23536
23552
  }
23537
23553
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
23538
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-qjdfv9sj.js");
23554
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-twwz5a0d.js");
23539
23555
  for (const { id } of contradictedEntries) {
23540
23556
  try {
23541
23557
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -24354,7 +24370,7 @@ async function runCuratorPostMortem(directory, options = {}) {
24354
24370
  warnings.push("Failed to collect knowledge summary.");
24355
24371
  }
24356
24372
  try {
24357
- const { getScanStatus } = await import("./scan-cursor-h3j1egky.js");
24373
+ const { getScanStatus } = await import("./scan-cursor-acsjpv2n.js");
24358
24374
  const scanStatus = await getScanStatus(directory);
24359
24375
  if (scanStatus.remaining_estimate > 0) {
24360
24376
  warnings.push(`Fair scan: reviewed ${knowledgeSummary.length} entries this sweep (generation ${scanStatus.generation}); ${scanStatus.remaining_estimate} more eligible entries will be visited in future curation sweeps.`);
@@ -24526,9 +24542,9 @@ var _internals28 = {
24526
24542
  verifyPostMortemKnowledgeActions,
24527
24543
  repairPostMortemActions,
24528
24544
  loadDefaultKnowledgeConfig: async (directory) => {
24529
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-9ryqandr.js");
24545
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-4dy7emnw.js");
24530
24546
  try {
24531
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-chycpf9y.js");
24547
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-hgrzjhsf.js");
24532
24548
  const loaded = loadPluginConfigWithMeta2(directory);
24533
24549
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
24534
24550
  } catch {
@@ -24536,11 +24552,11 @@ var _internals28 = {
24536
24552
  }
24537
24553
  },
24538
24554
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
24539
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-78ejknh2.js");
24555
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-b7f6nt8h.js");
24540
24556
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
24541
24557
  },
24542
24558
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
24543
- const { checkHivePromotions } = await import("./hive-promoter-r5x4a2ta.js");
24559
+ const { checkHivePromotions } = await import("./hive-promoter-61sjdrgt.js");
24544
24560
  return checkHivePromotions(entries, knowledgeConfig, directory);
24545
24561
  },
24546
24562
  applyProposalTriage: async (directory, triage) => {
@@ -24549,7 +24565,7 @@ var _internals28 = {
24549
24565
  activateProposal,
24550
24566
  listSkills: listSkills2,
24551
24567
  sanitizeSlug
24552
- } = await import("./skill-generator-66ez26yh.js");
24568
+ } = await import("./skill-generator-a48t83hf.js");
24553
24569
  const result = {
24554
24570
  approved: [],
24555
24571
  rejected: [],
@@ -25774,9 +25790,9 @@ function hashContent(content) {
25774
25790
  return createHash9("sha1").update(content).digest("hex");
25775
25791
  }
25776
25792
  async function loadConfigForPolicyCurator(directory) {
25777
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-9ryqandr.js");
25793
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-4dy7emnw.js");
25778
25794
  try {
25779
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-chycpf9y.js");
25795
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-hgrzjhsf.js");
25780
25796
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
25781
25797
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
25782
25798
  } catch {
@@ -29785,7 +29801,7 @@ async function runFinalizeStage(ctx) {
29785
29801
  }
29786
29802
  }
29787
29803
  try {
29788
- const { CuratorConfigSchema: CCS } = await import("./schema-9ryqandr.js");
29804
+ const { CuratorConfigSchema: CCS } = await import("./schema-4dy7emnw.js");
29789
29805
  const { config: pmLoadedConfig } = _internals39.loadPluginConfigWithMeta(ctx.directory);
29790
29806
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
29791
29807
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -32058,9 +32074,9 @@ var _internals44 = {
32058
32074
  loadPluginConfigWithMeta,
32059
32075
  loadCuratorDeps: async () => {
32060
32076
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
32061
- import("./schema-9ryqandr.js"),
32062
- import("./curator-78ejknh2.js"),
32063
- import("./curator-llm-factory-kbqtk2wm.js")
32077
+ import("./schema-4dy7emnw.js"),
32078
+ import("./curator-b7f6nt8h.js"),
32079
+ import("./curator-llm-factory-0mkbw2hg.js")
32064
32080
  ]);
32065
32081
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
32066
32082
  }
@@ -32965,7 +32981,7 @@ async function computeCurationDiagnostics(directory, entries) {
32965
32981
  let scanCompleted = false;
32966
32982
  let scanRemaining = 0;
32967
32983
  try {
32968
- const { getScanStatus } = await import("./scan-cursor-h3j1egky.js");
32984
+ const { getScanStatus } = await import("./scan-cursor-acsjpv2n.js");
32969
32985
  const status = await getScanStatus(directory);
32970
32986
  scanGeneration = status.generation;
32971
32987
  scanCompleted = status.completed;
@@ -32975,17 +32991,17 @@ async function computeCurationDiagnostics(directory, entries) {
32975
32991
  try {
32976
32992
  const { isLinked: isLinked2 } = await import("./knowledge-link-q46k9adx.js");
32977
32993
  if (isLinked2(directory)) {
32978
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-9ryqandr.js");
32994
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-4dy7emnw.js");
32979
32995
  let config;
32980
32996
  try {
32981
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-chycpf9y.js");
32997
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-hgrzjhsf.js");
32982
32998
  const loaded = loadPluginConfigWithMeta2(directory);
32983
32999
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
32984
33000
  } catch {
32985
33001
  config = KnowledgeConfigSchema2.parse({});
32986
33002
  }
32987
33003
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
32988
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-zkvkg4np.js");
33004
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-bn7g8n40.js");
32989
33005
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
32990
33006
  const cohortFp = await readCohortConfigFingerprint(directory);
32991
33007
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -34196,7 +34212,7 @@ async function handleDoctorCommand(directory, args) {
34196
34212
  const result = runConfigDoctor(config, directory);
34197
34213
  let output;
34198
34214
  if (enableAutoFix && result.hasAutoFixableIssues) {
34199
- const { runConfigDoctorWithFixes } = await import("./config-doctor-3bm8pvnb.js");
34215
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-0b5z13vq.js");
34200
34216
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
34201
34217
  applyLossy: true
34202
34218
  });
@@ -40566,7 +40582,7 @@ ${USAGE9}`;
40566
40582
  const traceState = {
40567
40583
  issueNumber: issueInfo.number,
40568
40584
  lastTransition: null,
40569
- completed: false
40585
+ status: "in_progress"
40570
40586
  };
40571
40587
  let oldTraceState = null;
40572
40588
  try {
@@ -50815,7 +50831,9 @@ async function handleResetCommand(directory, args) {
50815
50831
  "plan-export/SWARM_PLAN.json",
50816
50832
  "checkpoints.json",
50817
50833
  "events.jsonl",
50818
- "run-memory.jsonl"
50834
+ "run-memory.jsonl",
50835
+ "reproduction.json",
50836
+ "issue-publication.json"
50819
50837
  ];
50820
50838
  const results = [];
50821
50839
  try {
@@ -57533,7 +57551,7 @@ function buildDetailedHelp(commandName, entry) {
57533
57551
  async function handleHelpCommand(ctx) {
57534
57552
  const targetCommand = ctx.args.join(" ");
57535
57553
  if (!targetCommand) {
57536
- const { buildHelpText } = await import("./index-scbp2d32.js");
57554
+ const { buildHelpText } = await import("./index-ff7b0cr5.js");
57537
57555
  return buildHelpText();
57538
57556
  }
57539
57557
  const tokens = targetCommand.split(/\s+/);
@@ -57542,7 +57560,7 @@ async function handleHelpCommand(ctx) {
57542
57560
  return _internals18.buildDetailedHelp(resolved.key, resolved.entry);
57543
57561
  }
57544
57562
  const similar = _internals18.findSimilarCommands(targetCommand);
57545
- const { buildHelpText: fullHelp } = await import("./index-scbp2d32.js");
57563
+ const { buildHelpText: fullHelp } = await import("./index-ff7b0cr5.js");
57546
57564
  if (similar.length > 0) {
57547
57565
  return `Command '/swarm ${targetCommand}' not found.
57548
57566
 
@@ -57719,7 +57737,7 @@ var COMMAND_REGISTRY = {
57719
57737
  },
57720
57738
  "guardrail explain": {
57721
57739
  handler: async (ctx) => {
57722
- const { handleGuardrailExplain } = await import("./guardrail-explain-d6emse0z.js");
57740
+ const { handleGuardrailExplain } = await import("./guardrail-explain-p2htdqkz.js");
57723
57741
  return handleGuardrailExplain(ctx.directory, ctx.args);
57724
57742
  },
57725
57743
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -57729,7 +57747,7 @@ var COMMAND_REGISTRY = {
57729
57747
  },
57730
57748
  "guardrail-explain": {
57731
57749
  handler: async (ctx) => {
57732
- const { handleGuardrailExplain } = await import("./guardrail-explain-d6emse0z.js");
57750
+ const { handleGuardrailExplain } = await import("./guardrail-explain-p2htdqkz.js");
57733
57751
  return handleGuardrailExplain(ctx.directory, ctx.args);
57734
57752
  },
57735
57753
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -57739,7 +57757,7 @@ var COMMAND_REGISTRY = {
57739
57757
  },
57740
57758
  "guardrail-log": {
57741
57759
  handler: async (ctx) => {
57742
- const { handleGuardrailLog } = await import("./guardrail-log-27d6r2xq.js");
57760
+ const { handleGuardrailLog } = await import("./guardrail-log-rqt9wrzw.js");
57743
57761
  return handleGuardrailLog(ctx.directory, ctx.args);
57744
57762
  },
57745
57763
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -59636,7 +59654,7 @@ HARD CONSTRAINTS (apply regardless of skill load success):
59636
59654
  - EVALUATE ALL RISK FAMILIES: after the base explorer lanes settle, evaluate every repository-agnostic trigger row against the exact diff/context pack. Record applicable families as \`MATCHED\` and inapplicable families as provenance-free \`NOT_TRIGGERED\` with concrete absence evidence; \`unclassified-risk\` always remains \`MATCHED\`. Launch \`swarm-pr-review:micro\` lanes only for the \`MATCHED\` IDs. The first micro dispatch MUST pass the complete exact eleven-row \`trigger_evaluation\`, which freezes it for this session; any subsequent same-session micro batch may omit it and reuse the frozen ledger, while an explicitly supplied copy must remain exactly identical. Use each dispatched trigger ID as \`workflow_lane\`. Missing an evaluation row or a matched-family attestation is BLOCKED; a \`NOT_TRIGGERED\` family must not create a micro artifact.
59637
59655
  - RUN HEAD-BOUND VALIDATION: dispatch independent reviewers with \`mode: "swarm-pr-review:reviewer"\` and critics with \`mode: "swarm-pr-review:critic"\`, unique \`workflow_lane\` obligations, role-correct agents, and the same exact \`pr_head_sha\`. Critic dispatch is blocked until all declared reviewer obligations have successful artifacts.
59638
59656
  - COMPLETE EXPLICITLY: after final artifacts and synthesis, call \`complete_pr_workflow\` with \`mode: "PR_REVIEW"\` and the bound \`pr_head_sha\`; never leave the session trapped in a stale workflow gate.
59639
- - ABORT IF UNRECOVERABLE: if the PR head cannot be fetched/checked out (the working tree stays on the wrong branch), a compound \`git fetch && git checkout\` keeps being rejected as read-only shell syntax (run them as TWO separate standalone commands first), or the merge-base bind is unreachable for any reason, call \`abort_pr_workflow\` with \`mode: "PR_REVIEW"\` and a one-line \`reason\` instead of looping. The tool refuses while PR workflow lanes are in flight (collect their results first). Aborting clears the durable gate and stops the auto-resume loop; the user can also run \`/swarm abort-pr-workflow\`. Do NOT abort as a shortcut to avoid coverage obligations \u2014 only when the bind/checkout path is genuinely unreachable.
59657
+ - ABORT IF UNRECOVERABLE: if the PR head cannot be fetched/checked out (the working tree stays on the wrong branch), a compound \`git fetch && git checkout\` keeps being rejected as read-only shell syntax (run them as TWO separate standalone commands first), or the merge-base bind is unreachable for any reason, call \`abort_pr_workflow\` with \`mode: "PR_REVIEW"\`, \`kind: "recovery"\`, and a one-line \`reason\` instead of looping. The tool refuses while PR workflow lanes are in flight (collect their results first) AND refuses a recovery abort of a bound review (pr_head_sha set) unless a controller-recorded terminal recovery condition (checkoutRecovery) exists \u2014 binding succeeded, so "checkout unreachable" no longer justifies recovery. Aborting clears the durable gate and stops the auto-resume loop; the user can force-clear a bound gate via \`/swarm abort-pr-workflow\`. Do NOT abort as a shortcut to avoid coverage obligations \u2014 only when the bind/checkout path is genuinely unreachable.
59640
59658
  - Honor any free-text instructions that follow the closing bracket of the signal as additional reviewer focus, without weakening the validation ladder above.
59641
59659
 
59642
59660
  ### MODE: PR_FEEDBACK
@@ -59664,7 +59682,7 @@ HARD CONSTRAINTS (apply regardless of skill load success):
59664
59682
  - DO NOT PUBLISH EARLY: commits, pushes, PR comments/updates, review-thread mutations, and other remote writes remain blocked until every ordered feedback gate settles positively on the same revision digest.
59665
59683
  - After every local gate passes, create the reviewed commit with one standalone \`git commit\`, then call \`complete_pr_workflow\` once. It requires a clean index/worktree and a non-merge direct child whose sole parent is the immutable intake head before binding that post-commit HEAD and arming publication. Push only with \`git push <bound-remote> <bound-commit>:refs/heads/<bound-branch>\`; the literal bound commit and exact bound branch are required, and force flags, wrappers, aliases, fetch-based local-ref forgery, extra refspecs, \`git -C\`, and other remote writes fail closed. Perform read-only remote checks, then call \`complete_pr_workflow\` a second time with the same immutable verification \`pr_head_sha\`; the second call clears only after both the actual remote ref and its local tracking ref resolve to the exact bound commit. Only then perform any explicitly authorized PR comment/body/thread writes.
59666
59684
  - Patch only confirmed items plus the tests/docs they require; report closure status for every ledger item including disproved ones.
59667
- - ABORT IF UNRECOVERABLE (pre-armed only): if the PR head cannot be fetched/checked out or the verification bind is unreachable for any reason, call \`abort_pr_workflow\` with \`mode: "PR_FEEDBACK"\` and a one-line \`reason\` instead of looping. The tool refuses while PR workflow lanes are in flight (collect their results first) AND refuses once \`prFeedbackReadyToPublish\` is armed \u2014 after arming, you MUST complete the workflow with \`complete_pr_workflow\` (or push the bound commit first); aborting an armed gate would drop the immutable-commit binding and leave a half-published commit. Do NOT abort as a shortcut to skip the mechanical gates \u2014 only when the bind/verification path is genuinely unreachable.
59685
+ - ABORT IF UNRECOVERABLE (pre-armed only): if the PR head cannot be fetched/checked out or the verification bind is unreachable for any reason, call \`abort_pr_workflow\` with \`mode: "PR_FEEDBACK"\`, \`kind: "recovery"\`, and a one-line \`reason\` instead of looping (the same bound-recovery refusal applies: a recovery abort of a bound gate requires a checkoutRecovery terminal condition). The tool refuses while PR workflow lanes are in flight (collect their results first) AND refuses once \`prFeedbackReadyToPublish\` is armed \u2014 after arming, you MUST complete the workflow with \`complete_pr_workflow\` (or push the bound commit first); aborting an armed gate would drop the immutable-commit binding and leave a half-published commit. Do NOT abort as a shortcut to skip the mechanical gates \u2014 only when the bind/verification path is genuinely unreachable.
59668
59686
  - Do NOT resolve or mark GitHub review threads resolved unless the user explicitly instructs it.
59669
59687
  - Honor any free-text instructions that follow the closing bracket of the signal as additional scope, without dropping any ledger item.
59670
59688
  - Quality is the only metric \u2014 there is no speed, efficiency, or time exception; time, tokens, and agent dispatches are irrelevant to correctness
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-s38e38qy.js";
5
+ } from "./index-dbg3agxz.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-rs1f1bh0.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-rtry5xyf.js";
5
5
  import {
6
6
  readKnowledgeEvents
7
- } from "./index-p6h8f59v.js";
7
+ } from "./index-wysn7pcz.js";
8
8
  import {
9
9
  isLinked,
10
10
  readLinkPointer,
@@ -9,11 +9,11 @@ import {
9
9
  PluginConfigSchema,
10
10
  init_schema,
11
11
  stripKnownSwarmPrefix
12
- } from "./index-0pqh1710.js";
12
+ } from "./index-jq7n7w9y.js";
13
13
  import {
14
14
  ALL_AGENT_NAMES,
15
15
  init_constants
16
- } from "./index-r4t92q32.js";
16
+ } from "./index-v1d4qz8y.js";
17
17
 
18
18
  // src/services/config-doctor.ts
19
19
  init_constants();
@@ -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-7szzg70x.js");
705
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-hgaz06m8.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-58s2j0dp.js");
773
- const { KnowledgeConfigSchema } = await import("./schema-9ryqandr.js");
772
+ const { quarantineEntry } = await import("./knowledge-validator-7vnqwjtv.js");
773
+ const { KnowledgeConfigSchema } = await import("./schema-4dy7emnw.js");
774
774
  let config;
775
775
  try {
776
- const { loadPluginConfigWithMeta } = await import("./index-chycpf9y.js");
776
+ const { loadPluginConfigWithMeta } = await import("./index-hgrzjhsf.js");
777
777
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
778
778
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
779
779
  } catch {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-zebb6yw0.js";
5
+ } from "./index-m9csth1h.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-6d7jkk1s.js";
4
+ } from "./index-6fwr2w8v.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-6yv6wda9.js";
7
+ } from "./index-dn3nkwbc.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -84,19 +84,19 @@ import {
84
84
  handleWriteRetroCommand,
85
85
  normalizeSwarmCommandInput,
86
86
  resolveCommand
87
- } from "./index-mb34t6w9.js";
87
+ } from "./index-7f72x6nv.js";
88
88
  import"./index-41hkt36g.js";
89
89
  import"./index-1m1ksyqt.js";
90
- import"./index-zebb6yw0.js";
91
- import"./index-0jbhmm8b.js";
90
+ import"./index-m9csth1h.js";
91
+ import"./index-acc18zrj.js";
92
92
  import"./index-brh827g0.js";
93
93
  import"./index-yyyk63kk.js";
94
94
  import"./index-y8552snf.js";
95
95
  import"./index-4905hd2m.js";
96
96
  import"./index-134d35c1.js";
97
- import"./index-f8dhh53t.js";
98
- import"./index-fxw0zvxc.js";
99
- import"./index-bdnrrx3w.js";
97
+ import"./index-yf6p4wc5.js";
98
+ import"./index-r7tg8kjh.js";
99
+ import"./index-7nhrn9sy.js";
100
100
  import"./index-v2xrer41.js";
101
101
  import"./index-c8s9a3zh.js";
102
102
  import"./index-9ss2m4rs.js";
@@ -106,7 +106,7 @@ import"./index-556ja8an.js";
106
106
  import"./index-kbfsp07d.js";
107
107
  import"./index-1kyex7z2.js";
108
108
  import"./index-b8zgtz81.js";
109
- import"./index-hbnsmnb0.js";
109
+ import"./index-vw75bhf3.js";
110
110
  import"./index-b9rd29ge.js";
111
111
  import"./index-k46me75h.js";
112
112
  import"./index-ee3x66a5.js";
@@ -114,11 +114,11 @@ import"./index-74hpm6sh.js";
114
114
  import"./index-n0pja0qs.js";
115
115
  import"./index-8fwhhayc.js";
116
116
  import"./index-q1exe2b3.js";
117
- import"./index-ma8vk3v1.js";
118
- import"./index-6ykm2eha.js";
117
+ import"./index-hnprx6qv.js";
118
+ import"./index-a98msw3z.js";
119
119
  import"./index-rtry5xyf.js";
120
- import"./index-s38e38qy.js";
121
- import"./index-p6h8f59v.js";
120
+ import"./index-dbg3agxz.js";
121
+ import"./index-wysn7pcz.js";
122
122
  import"./index-ae75rja9.js";
123
123
  import"./index-rs1f1bh0.js";
124
124
  import"./index-h2waehqq.js";
@@ -126,7 +126,7 @@ import"./index-ed5ykebp.js";
126
126
  import"./index-hfvxhk4z.js";
127
127
  import"./index-7g4c7s5r.js";
128
128
  import"./index-4nt52yr9.js";
129
- import"./index-43k8ntw7.js";
129
+ import"./index-0an7an2s.js";
130
130
  import"./index-gprxjmm7.js";
131
131
  import"./index-n832052r.js";
132
132
  import"./index-d181x9zr.js";
@@ -135,12 +135,12 @@ import"./index-zgwm4ryv.js";
135
135
  import {
136
136
  init_schema,
137
137
  stripKnownSwarmPrefix
138
- } from "./index-0pqh1710.js";
138
+ } from "./index-jq7n7w9y.js";
139
139
  import {
140
140
  AGENT_TOOL_MAP,
141
141
  ORCHESTRATOR_NAME,
142
142
  init_constants
143
- } from "./index-r4t92q32.js";
143
+ } from "./index-v1d4qz8y.js";
144
144
  import"./index-zjygnfay.js";
145
145
  import"./index-bk5tah7q.js";
146
146
  import"./index-ry0hgg3m.js";
@@ -7,7 +7,7 @@ import {
7
7
  loadPluginConfigWithMeta,
8
8
  loadPluginConfigWithMetaAsync,
9
9
  resolveWorktreeIsolationConfig
10
- } from "./index-43k8ntw7.js";
10
+ } from "./index-0an7an2s.js";
11
11
  import {
12
12
  ApprovalEvidenceSchema,
13
13
  BaseEvidenceSchema,
@@ -65,7 +65,7 @@ import {
65
65
  TurboConfigSchema,
66
66
  WorktreeIsolationConfigSchema,
67
67
  resolveAutoReviewConfig
68
- } from "./index-0pqh1710.js";
68
+ } from "./index-jq7n7w9y.js";
69
69
  import {
70
70
  ALL_AGENT_NAMES,
71
71
  ALL_SUBAGENT_NAMES,
@@ -75,7 +75,7 @@ import {
75
75
  QA_AGENTS,
76
76
  isQAAgent,
77
77
  isSubagent
78
- } from "./index-r4t92q32.js";
78
+ } from "./index-v1d4qz8y.js";
79
79
  import"./index-zjygnfay.js";
80
80
  import"./index-bk5tah7q.js";
81
81
  import"./index-bpmtbmy9.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-6ykm2eha.js";
4
+ } from "./index-a98msw3z.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-s38e38qy.js";
12
+ } from "./index-dbg3agxz.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
15
  } from "./index-rs1f1bh0.js";
@@ -3,7 +3,7 @@ import {
3
3
  ALL_AGENT_NAMES,
4
4
  SUMMARIZER_EXEMPT_TOOL_NAMES,
5
5
  init_constants
6
- } from "./index-r4t92q32.js";
6
+ } from "./index-v1d4qz8y.js";
7
7
  import {
8
8
  OUTCOME_BLOCK_THRESHOLD,
9
9
  init_knowledge_types
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.140.0",
24
+ version: "7.140.1",
25
25
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
26
26
  main: "dist/index.js",
27
27
  types: "dist/index.d.ts",
@@ -15,10 +15,10 @@ import {
15
15
  import {
16
16
  init_schema,
17
17
  stripKnownSwarmPrefix
18
- } from "./index-0pqh1710.js";
18
+ } from "./index-jq7n7w9y.js";
19
19
  import {
20
20
  init_constants
21
- } from "./index-r4t92q32.js";
21
+ } from "./index-v1d4qz8y.js";
22
22
  import {
23
23
  __commonJS,
24
24
  __toESM