opencode-swarm 7.134.0 → 7.134.2

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/codebase-review-swarm/SKILL.md +18 -2
  2. package/.opencode/skills/codebase-review-swarm/references/review-protocol-v8.2.md +18 -2
  3. package/.opencode/skills/swarm-implement/SKILL.md +17 -2
  4. package/dist/background/pr-event-subscribers.d.ts +1 -1
  5. package/dist/cli/{config-doctor-t5r92674.js → config-doctor-wk7xzrma.js} +2 -2
  6. package/dist/cli/{curation-policy-3smfn2a3.js → curation-policy-npgspa14.js} +2 -2
  7. package/dist/cli/{curator-drift-tsyyf4b4.js → curator-drift-9q6f85bm.js} +1 -1
  8. package/dist/cli/{curator-llm-factory-p3aqev12.js → curator-llm-factory-tpc0qg6x.js} +13 -13
  9. package/dist/cli/{curator-hva8f3nf.js → curator-njzxdyav.js} +13 -13
  10. package/dist/cli/{evidence-summary-service-mrzsjpg4.js → evidence-summary-service-pay9409b.js} +1 -1
  11. package/dist/cli/{guardrail-explain-k8mcvk61.js → guardrail-explain-75pr3e9z.js} +14 -14
  12. package/dist/cli/{guardrail-log-absma1rv.js → guardrail-log-783svw0e.js} +3 -3
  13. package/dist/cli/{hive-promoter-jwd51gzk.js → hive-promoter-nrxjatdx.js} +13 -13
  14. package/dist/cli/{index-hgh01f6h.js → index-0dszfjf3.js} +1 -1
  15. package/dist/cli/{index-kapharv7.js → index-1bytvz73.js} +2 -2
  16. package/dist/cli/{index-eedq2y40.js → index-225t7m1j.js} +15 -15
  17. package/dist/cli/{index-jpkxjmfw.js → index-4cnwvmsm.js} +5 -5
  18. package/dist/cli/{index-c3e0ymrg.js → index-746ga67b.js} +1 -1
  19. package/dist/cli/{index-k742ecbm.js → index-8fhg2nt2.js} +2 -2
  20. package/dist/cli/{index-rkyhv4p5.js → index-9299e7d5.js} +2 -2
  21. package/dist/cli/{index-2njes601.js → index-a0nk83rk.js} +2 -2
  22. package/dist/cli/{index-dgxgvzab.js → index-asd9n0ms.js} +1 -1
  23. package/dist/cli/{index-y0kk3rtv.js → index-ca44jww3.js} +1 -1
  24. package/dist/cli/{index-3dtjhr26.js → index-cav39zjt.js} +70 -39
  25. package/dist/cli/{index-xfejq1p9.js → index-n48xwynh.js} +1 -1
  26. package/dist/cli/{index-j6ywarjp.js → index-njfcm1tn.js} +3 -3
  27. package/dist/cli/{index-g87ty4wp.js → index-ss26e2d4.js} +1 -1
  28. package/dist/cli/{index-b5ek2cge.js → index-v8m282zt.js} +1 -1
  29. package/dist/cli/{index-baawkm48.js → index-x60gpbt5.js} +4 -4
  30. package/dist/cli/{index-m2s0gbzt.js → index-y8vqsm2g.js} +1 -1
  31. package/dist/cli/index.js +13 -13
  32. package/dist/cli/{knowledge-escalator-mkdac2m7.js → knowledge-escalator-b3b91k0t.js} +3 -3
  33. package/dist/cli/{knowledge-events-jjc9qbe0.js → knowledge-events-kyw0s745.js} +1 -1
  34. package/dist/cli/{knowledge-store-9e0w1kxm.js → knowledge-store-5watc2b2.js} +1 -1
  35. package/dist/cli/{knowledge-validator-h1nrn2pk.js → knowledge-validator-a4wxkgbc.js} +4 -4
  36. package/dist/cli/{scan-cursor-mk3tq3sf.js → scan-cursor-gcd771kn.js} +2 -2
  37. package/dist/cli/{schema-bjb0yzsq.js → schema-6eghf6gt.js} +1 -1
  38. package/dist/cli/{skill-generator-p1de0wkr.js → skill-generator-8dswjh14.js} +5 -5
  39. package/dist/hooks/guardrails/messages-transform.d.ts +10 -0
  40. package/dist/hooks/guardrails/stored-input-args.d.ts +6 -0
  41. package/dist/hooks/shell-write-detect.d.ts +1 -1
  42. package/dist/index.js +40 -39
  43. package/dist/prm/escalation.d.ts +1 -11
  44. package/dist/prm/index.d.ts +1 -0
  45. package/dist/prm/types.d.ts +0 -2
  46. package/dist/session/snapshot-writer.d.ts +1 -0
  47. package/dist/state.d.ts +11 -0
  48. package/dist/utils/advisory-queue.d.ts +60 -0
  49. package/package.json +1 -1
@@ -11,7 +11,7 @@ import {
11
11
  readDoctorArtifact,
12
12
  removeStraySwarmDir,
13
13
  runConfigDoctor
14
- } from "./index-g87ty4wp.js";
14
+ } from "./index-ss26e2d4.js";
15
15
  import {
16
16
  EvaluationTaskV1Schema,
17
17
  GateAuditManifestV1Schema,
@@ -66,7 +66,7 @@ import {
66
66
  saveTaskSetSnapshot,
67
67
  transientBackoff,
68
68
  validateProjectRoot
69
- } from "./index-k742ecbm.js";
69
+ } from "./index-8fhg2nt2.js";
70
70
  import {
71
71
  withTimeout
72
72
  } from "./index-4905hd2m.js";
@@ -92,15 +92,15 @@ import {
92
92
  retireSkill,
93
93
  selectCandidateEntries,
94
94
  syncBundledProjectSkillsIfMissingAsync
95
- } from "./index-j6ywarjp.js";
95
+ } from "./index-njfcm1tn.js";
96
96
  import {
97
97
  readRecentEscalations
98
- } from "./index-jpkxjmfw.js";
98
+ } from "./index-4cnwvmsm.js";
99
99
  import {
100
100
  alreadyCuratedThisGeneration,
101
101
  claimNextScanBatch,
102
102
  resolveCohortId
103
- } from "./index-m2s0gbzt.js";
103
+ } from "./index-y8vqsm2g.js";
104
104
  import {
105
105
  CURATOR_INIT_PROMPT,
106
106
  CURATOR_PHASE_PROMPT,
@@ -133,11 +133,11 @@ import {
133
133
  validateActionability,
134
134
  validateActionableFields,
135
135
  validateLesson
136
- } from "./index-2njes601.js";
136
+ } from "./index-a0nk83rk.js";
137
137
  import {
138
138
  authorizeCuration,
139
139
  buildConfigFingerprintInput
140
- } from "./index-y0kk3rtv.js";
140
+ } from "./index-ca44jww3.js";
141
141
  import {
142
142
  cohortConfigFingerprint
143
143
  } from "./index-rtry5xyf.js";
@@ -170,7 +170,7 @@ import {
170
170
  transactFile,
171
171
  transactKnowledge,
172
172
  wordBigrams
173
- } from "./index-baawkm48.js";
173
+ } from "./index-x60gpbt5.js";
174
174
  import {
175
175
  MAX_EVENT_LOG_ENTRIES,
176
176
  _internals,
@@ -180,7 +180,7 @@ import {
180
180
  recordHiveKnowledgeEvent,
181
181
  recordKnowledgeEvent,
182
182
  resolveKnowledgeEventsPath
183
- } from "./index-dgxgvzab.js";
183
+ } from "./index-asd9n0ms.js";
184
184
  import {
185
185
  resolveHiveDataDir,
186
186
  resolveHiveEventsPath,
@@ -205,7 +205,7 @@ import {
205
205
  init_loader,
206
206
  loadPluginConfig,
207
207
  loadPluginConfigWithMeta
208
- } from "./index-xfejq1p9.js";
208
+ } from "./index-n48xwynh.js";
209
209
  import {
210
210
  RetrospectiveEvidenceSchema
211
211
  } from "./index-k5jrywpr.js";
@@ -228,7 +228,7 @@ import {
228
228
  package_default,
229
229
  resolveAutoReviewConfig,
230
230
  stripKnownSwarmPrefix
231
- } from "./index-b5ek2cge.js";
231
+ } from "./index-v8m282zt.js";
232
232
  import {
233
233
  KNOWLEDGE_SCHEMA_VERSION,
234
234
  OUTCOME_BLOCK_THRESHOLD,
@@ -8600,6 +8600,26 @@ function detectBuiltinWrites(cmd) {
8600
8600
  }
8601
8601
  return results;
8602
8602
  }
8603
+ if (lowerName === "tee") {
8604
+ const suffixWords2 = getSuffixWords(cmd);
8605
+ let pastDoubleDash = false;
8606
+ for (const word of suffixWords2) {
8607
+ if (word === "--") {
8608
+ pastDoubleDash = true;
8609
+ continue;
8610
+ }
8611
+ if (!pastDoubleDash && word.startsWith("-"))
8612
+ continue;
8613
+ if (word && !isNullDevice(word)) {
8614
+ results.push({
8615
+ category: "builtin_write",
8616
+ operator: "tee",
8617
+ path: word
8618
+ });
8619
+ }
8620
+ }
8621
+ return results;
8622
+ }
8603
8623
  if (!BUILTIN_WRITE_COMMANDS.has(lowerName))
8604
8624
  return results;
8605
8625
  const suffixWords = getSuffixWords(cmd);
@@ -8690,7 +8710,7 @@ function detectInterpreterEval(cmd) {
8690
8710
  php: ["-r", "-R", "-F"]
8691
8711
  };
8692
8712
  const relevantFlags = evalFlags[lowerName] ?? [];
8693
- const hasEvalFlag = suffixWords.some((word) => relevantFlags.some((f) => word === f || word.startsWith(`${f}=`)));
8713
+ const hasEvalFlag = suffixWords.some((word) => relevantFlags.some((f) => word === f || word.startsWith(f) && word.length > f.length));
8694
8714
  if (!hasEvalFlag)
8695
8715
  return [];
8696
8716
  results.push({
@@ -10350,6 +10370,7 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
10350
10370
  reviewerCallCount: new Map,
10351
10371
  lastGateFailure: null,
10352
10372
  partialGateWarningsIssuedForTask: new Set,
10373
+ completionGateWarnedForTask: new Set,
10353
10374
  selfFixAttempted: false,
10354
10375
  selfCodingWarnedAtCount: 0,
10355
10376
  catastrophicPhaseWarnings: new Set,
@@ -10397,6 +10418,7 @@ function startAgentSession(sessionId, agentName, staleDurationMs = STALE_SESSION
10397
10418
  prmLastPatternDetected: null,
10398
10419
  prmTrajectoryStep: 0,
10399
10420
  prmHardStopPending: false,
10421
+ prmInjectedAdvisoryKeys: new Set,
10400
10422
  prSubscriptions: new Map
10401
10423
  };
10402
10424
  swarmState.agentSessions.set(sessionId, sessionState);
@@ -10496,6 +10518,9 @@ function ensureAgentSession(sessionId, agentName, directory) {
10496
10518
  if (!session.partialGateWarningsIssuedForTask) {
10497
10519
  session.partialGateWarningsIssuedForTask = new Set;
10498
10520
  }
10521
+ if (!session.completionGateWarnedForTask) {
10522
+ session.completionGateWarnedForTask = new Set;
10523
+ }
10499
10524
  if (session.selfFixAttempted === undefined) {
10500
10525
  session.selfFixAttempted = false;
10501
10526
  }
@@ -10625,6 +10650,9 @@ function ensureAgentSession(sessionId, agentName, directory) {
10625
10650
  if (session.prmHardStopPending === undefined) {
10626
10651
  session.prmHardStopPending = false;
10627
10652
  }
10653
+ if (!session.prmInjectedAdvisoryKeys) {
10654
+ session.prmInjectedAdvisoryKeys = new Set;
10655
+ }
10628
10656
  if (!session.prSubscriptions) {
10629
10657
  session.prSubscriptions = new Map;
10630
10658
  }
@@ -14918,7 +14946,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
14918
14946
  };
14919
14947
  }
14920
14948
  async function sweepActiveNearDuplicates(directory, options = {}) {
14921
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-kapharv7.js");
14949
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
14922
14950
  const { config } = loadPluginConfigWithMeta2(directory);
14923
14951
  const sweepConfig = config.learning?.dedup_sweep;
14924
14952
  if (sweepConfig?.enabled === false)
@@ -16511,7 +16539,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
16511
16539
  }
16512
16540
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
16513
16541
  try {
16514
- const skillModule = await import("./skill-generator-p1de0wkr.js");
16542
+ const skillModule = await import("./skill-generator-8dswjh14.js");
16515
16543
  for (const cand of skillCandidates) {
16516
16544
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
16517
16545
  continue;
@@ -16912,7 +16940,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
16912
16940
  } catch {}
16913
16941
  }
16914
16942
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
16915
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-mkdac2m7.js");
16943
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-b3b91k0t.js");
16916
16944
  for (const { id } of contradictedEntries) {
16917
16945
  try {
16918
16946
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -17720,7 +17748,7 @@ async function runCuratorPostMortem(directory, options = {}) {
17720
17748
  warnings.push("Failed to collect knowledge summary.");
17721
17749
  }
17722
17750
  try {
17723
- const { getScanStatus } = await import("./scan-cursor-mk3tq3sf.js");
17751
+ const { getScanStatus } = await import("./scan-cursor-gcd771kn.js");
17724
17752
  const scanStatus = await getScanStatus(directory);
17725
17753
  if (scanStatus.remaining_estimate > 0) {
17726
17754
  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.`);
@@ -17892,9 +17920,9 @@ var _internals23 = {
17892
17920
  verifyPostMortemKnowledgeActions,
17893
17921
  repairPostMortemActions,
17894
17922
  loadDefaultKnowledgeConfig: async (directory) => {
17895
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-bjb0yzsq.js");
17923
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-6eghf6gt.js");
17896
17924
  try {
17897
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-kapharv7.js");
17925
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
17898
17926
  const loaded = loadPluginConfigWithMeta2(directory);
17899
17927
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
17900
17928
  } catch {
@@ -17902,11 +17930,11 @@ var _internals23 = {
17902
17930
  }
17903
17931
  },
17904
17932
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
17905
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-hva8f3nf.js");
17933
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-njzxdyav.js");
17906
17934
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
17907
17935
  },
17908
17936
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
17909
- const { checkHivePromotions } = await import("./hive-promoter-jwd51gzk.js");
17937
+ const { checkHivePromotions } = await import("./hive-promoter-nrxjatdx.js");
17910
17938
  return checkHivePromotions(entries, knowledgeConfig, directory);
17911
17939
  },
17912
17940
  applyProposalTriage: async (directory, triage) => {
@@ -17915,7 +17943,7 @@ var _internals23 = {
17915
17943
  activateProposal,
17916
17944
  listSkills: listSkills2,
17917
17945
  sanitizeSlug
17918
- } = await import("./skill-generator-p1de0wkr.js");
17946
+ } = await import("./skill-generator-8dswjh14.js");
17919
17947
  const result = {
17920
17948
  approved: [],
17921
17949
  rejected: [],
@@ -17957,7 +17985,7 @@ var _internals23 = {
17957
17985
  return result;
17958
17986
  },
17959
17987
  readPriorDriftReports: async (directory) => {
17960
- const { readPriorDriftReports } = await import("./curator-drift-tsyyf4b4.js");
17988
+ const { readPriorDriftReports } = await import("./curator-drift-9q6f85bm.js");
17961
17989
  return readPriorDriftReports(directory);
17962
17990
  },
17963
17991
  readSwarmKnowledge: (directory) => readKnowledge(resolveSwarmKnowledgePath(directory))
@@ -20542,9 +20570,9 @@ function hashContent(content) {
20542
20570
  return createHash8("sha1").update(content).digest("hex");
20543
20571
  }
20544
20572
  async function loadConfigForPolicyCurator(directory) {
20545
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-bjb0yzsq.js");
20573
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-6eghf6gt.js");
20546
20574
  try {
20547
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-kapharv7.js");
20575
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
20548
20576
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
20549
20577
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
20550
20578
  } catch {
@@ -23889,7 +23917,7 @@ async function runFinalizeStage(ctx) {
23889
23917
  }
23890
23918
  }
23891
23919
  try {
23892
- const { CuratorConfigSchema: CCS } = await import("./schema-bjb0yzsq.js");
23920
+ const { CuratorConfigSchema: CCS } = await import("./schema-6eghf6gt.js");
23893
23921
  const { config: pmLoadedConfig } = _internals33.loadPluginConfigWithMeta(ctx.directory);
23894
23922
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
23895
23923
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -26007,9 +26035,9 @@ var _internals37 = {
26007
26035
  loadPluginConfigWithMeta,
26008
26036
  loadCuratorDeps: async () => {
26009
26037
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
26010
- import("./schema-bjb0yzsq.js"),
26011
- import("./curator-hva8f3nf.js"),
26012
- import("./curator-llm-factory-p3aqev12.js")
26038
+ import("./schema-6eghf6gt.js"),
26039
+ import("./curator-njzxdyav.js"),
26040
+ import("./curator-llm-factory-tpc0qg6x.js")
26013
26041
  ]);
26014
26042
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
26015
26043
  }
@@ -26910,7 +26938,7 @@ async function computeCurationDiagnostics(directory, entries) {
26910
26938
  let scanCompleted = false;
26911
26939
  let scanRemaining = 0;
26912
26940
  try {
26913
- const { getScanStatus } = await import("./scan-cursor-mk3tq3sf.js");
26941
+ const { getScanStatus } = await import("./scan-cursor-gcd771kn.js");
26914
26942
  const status = await getScanStatus(directory);
26915
26943
  scanGeneration = status.generation;
26916
26944
  scanCompleted = status.completed;
@@ -26920,17 +26948,17 @@ async function computeCurationDiagnostics(directory, entries) {
26920
26948
  try {
26921
26949
  const { isLinked: isLinked2 } = await import("./knowledge-link-nc4y2zkq.js");
26922
26950
  if (isLinked2(directory)) {
26923
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-bjb0yzsq.js");
26951
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-6eghf6gt.js");
26924
26952
  let config;
26925
26953
  try {
26926
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-kapharv7.js");
26954
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-1bytvz73.js");
26927
26955
  const loaded = loadPluginConfigWithMeta2(directory);
26928
26956
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
26929
26957
  } catch {
26930
26958
  config = KnowledgeConfigSchema2.parse({});
26931
26959
  }
26932
26960
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
26933
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-3smfn2a3.js");
26961
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-npgspa14.js");
26934
26962
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
26935
26963
  const cohortFp = await readCohortConfigFingerprint(directory);
26936
26964
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -28141,7 +28169,7 @@ async function handleDoctorCommand(directory, args) {
28141
28169
  const result = runConfigDoctor(config, directory);
28142
28170
  let output;
28143
28171
  if (enableAutoFix && result.hasAutoFixableIssues) {
28144
- const { runConfigDoctorWithFixes } = await import("./config-doctor-t5r92674.js");
28172
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-wk7xzrma.js");
28145
28173
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
28146
28174
  applyLossy: true
28147
28175
  });
@@ -28978,7 +29006,7 @@ async function handleEvidenceCommand(directory, args) {
28978
29006
  return formatTaskEvidenceMarkdown(evidenceData);
28979
29007
  }
28980
29008
  async function handleEvidenceSummaryCommand(directory) {
28981
- const { buildEvidenceSummary } = await import("./evidence-summary-service-mrzsjpg4.js");
29009
+ const { buildEvidenceSummary } = await import("./evidence-summary-service-pay9409b.js");
28982
29010
  const artifact = await buildEvidenceSummary(directory);
28983
29011
  if (!artifact) {
28984
29012
  return "No plan found. Run `/swarm plan` to check plan status.";
@@ -34420,6 +34448,7 @@ function serializeAgentSession(s) {
34420
34448
  reviewerCallCount[String(phase)] = count;
34421
34449
  }
34422
34450
  const partialGateWarningsIssuedForTask = Array.from(s.partialGateWarningsIssuedForTask ?? new Set);
34451
+ const completionGateWarnedForTask = Array.from(s.completionGateWarnedForTask ?? new Set);
34423
34452
  const catastrophicPhaseWarnings = Array.from(s.catastrophicPhaseWarnings ?? new Set);
34424
34453
  const phaseAgentsDispatched = Array.from(s.phaseAgentsDispatched ?? new Set);
34425
34454
  const lastCompletedPhaseAgentsDispatched = Array.from(s.lastCompletedPhaseAgentsDispatched ?? new Set);
@@ -34473,6 +34502,7 @@ function serializeAgentSession(s) {
34473
34502
  reviewerCallCount,
34474
34503
  lastGateFailure: s.lastGateFailure ?? null,
34475
34504
  partialGateWarningsIssuedForTask,
34505
+ completionGateWarnedForTask,
34476
34506
  selfFixAttempted: s.selfFixAttempted ?? false,
34477
34507
  selfCodingWarnedAtCount: s.selfCodingWarnedAtCount ?? 0,
34478
34508
  catastrophicPhaseWarnings,
@@ -44756,6 +44786,7 @@ function resetPrmSessionState(session, sessionId) {
44756
44786
  session.prmLastPatternDetected = null;
44757
44787
  session.prmHardStopPending = false;
44758
44788
  session.prmTrajectoryStep = 0;
44789
+ session.prmInjectedAdvisoryKeys = new Set;
44759
44790
  session.replayArtifactPath = null;
44760
44791
  if (sessionId) {
44761
44792
  _internals67.clearTrajectoryCache(sessionId);
@@ -49419,7 +49450,7 @@ function buildDetailedHelp(commandName, entry) {
49419
49450
  async function handleHelpCommand(ctx) {
49420
49451
  const targetCommand = ctx.args.join(" ");
49421
49452
  if (!targetCommand) {
49422
- const { buildHelpText } = await import("./index-eedq2y40.js");
49453
+ const { buildHelpText } = await import("./index-225t7m1j.js");
49423
49454
  return buildHelpText();
49424
49455
  }
49425
49456
  const tokens = targetCommand.split(/\s+/);
@@ -49428,7 +49459,7 @@ async function handleHelpCommand(ctx) {
49428
49459
  return _internals10.buildDetailedHelp(resolved.key, resolved.entry);
49429
49460
  }
49430
49461
  const similar = _internals10.findSimilarCommands(targetCommand);
49431
- const { buildHelpText: fullHelp } = await import("./index-eedq2y40.js");
49462
+ const { buildHelpText: fullHelp } = await import("./index-225t7m1j.js");
49432
49463
  if (similar.length > 0) {
49433
49464
  return `Command '/swarm ${targetCommand}' not found.
49434
49465
 
@@ -49567,7 +49598,7 @@ var COMMAND_REGISTRY = {
49567
49598
  },
49568
49599
  "guardrail explain": {
49569
49600
  handler: async (ctx) => {
49570
- const { handleGuardrailExplain } = await import("./guardrail-explain-k8mcvk61.js");
49601
+ const { handleGuardrailExplain } = await import("./guardrail-explain-75pr3e9z.js");
49571
49602
  return handleGuardrailExplain(ctx.directory, ctx.args);
49572
49603
  },
49573
49604
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -49577,7 +49608,7 @@ var COMMAND_REGISTRY = {
49577
49608
  },
49578
49609
  "guardrail-explain": {
49579
49610
  handler: async (ctx) => {
49580
- const { handleGuardrailExplain } = await import("./guardrail-explain-k8mcvk61.js");
49611
+ const { handleGuardrailExplain } = await import("./guardrail-explain-75pr3e9z.js");
49581
49612
  return handleGuardrailExplain(ctx.directory, ctx.args);
49582
49613
  },
49583
49614
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -49587,7 +49618,7 @@ var COMMAND_REGISTRY = {
49587
49618
  },
49588
49619
  "guardrail-log": {
49589
49620
  handler: async (ctx) => {
49590
- const { handleGuardrailLog } = await import("./guardrail-log-absma1rv.js");
49621
+ const { handleGuardrailLog } = await import("./guardrail-log-783svw0e.js");
49591
49622
  return handleGuardrailLog(ctx.directory, ctx.args);
49592
49623
  },
49593
49624
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  resolveExternalSkillsConfig
11
- } from "./index-b5ek2cge.js";
11
+ } from "./index-v8m282zt.js";
12
12
  import {
13
13
  advisoryWarn,
14
14
  init_warning_buffer
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-2njes601.js";
5
+ } from "./index-a0nk83rk.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-baawkm48.js";
12
+ } from "./index-x60gpbt5.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-dgxgvzab.js";
16
+ } from "./index-asd9n0ms.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -8,7 +8,7 @@ import {
8
8
  init_constants,
9
9
  init_schema,
10
10
  stripKnownSwarmPrefix
11
- } from "./index-b5ek2cge.js";
11
+ } from "./index-v8m282zt.js";
12
12
  import {
13
13
  log
14
14
  } from "./index-zgwm4ryv.js";
@@ -19,7 +19,7 @@ var package_default;
19
19
  var init_package = __esm(() => {
20
20
  package_default = {
21
21
  name: "opencode-swarm",
22
- version: "7.134.0",
22
+ version: "7.134.2",
23
23
  description: "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
24
24
  main: "dist/index.js",
25
25
  types: "dist/index.d.ts",
@@ -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-jjc9qbe0.js");
705
+ const { readKnowledgeCounterRollups, effectiveRetrievalOutcomes } = await import("./knowledge-events-kyw0s745.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-h1nrn2pk.js");
773
- const { KnowledgeConfigSchema } = await import("./schema-bjb0yzsq.js");
772
+ const { quarantineEntry } = await import("./knowledge-validator-a4wxkgbc.js");
773
+ const { KnowledgeConfigSchema } = await import("./schema-6eghf6gt.js");
774
774
  let config;
775
775
  try {
776
- const { loadPluginConfigWithMeta } = await import("./index-kapharv7.js");
776
+ const { loadPluginConfigWithMeta } = await import("./index-1bytvz73.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
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-baawkm48.js";
5
+ } from "./index-x60gpbt5.js";
6
6
  import {
7
7
  resolveKnowledgeStoreDir
8
8
  } from "./index-cfkvc5q9.js";
package/dist/cli/index.js CHANGED
@@ -6,30 +6,30 @@ import {
6
6
  getPluginConfigDir,
7
7
  getPluginLockFilePaths,
8
8
  resolveCommand
9
- } from "./index-3dtjhr26.js";
9
+ } from "./index-cav39zjt.js";
10
10
  import"./index-13xxjfhn.js";
11
- import"./index-hgh01f6h.js";
12
- import"./index-g87ty4wp.js";
13
- import"./index-k742ecbm.js";
11
+ import"./index-0dszfjf3.js";
12
+ import"./index-ss26e2d4.js";
13
+ import"./index-8fhg2nt2.js";
14
14
  import"./index-4905hd2m.js";
15
15
  import"./index-134d35c1.js";
16
- import"./index-j6ywarjp.js";
17
- import"./index-jpkxjmfw.js";
18
- import"./index-m2s0gbzt.js";
16
+ import"./index-njfcm1tn.js";
17
+ import"./index-4cnwvmsm.js";
18
+ import"./index-y8vqsm2g.js";
19
19
  import"./index-vxv732ex.js";
20
20
  import"./index-c8s9a3zh.js";
21
21
  import"./index-9ss2m4rs.js";
22
22
  import"./index-wk1h5ec2.js";
23
23
  import"./index-1j3682j8.js";
24
- import"./index-2njes601.js";
25
- import"./index-y0kk3rtv.js";
24
+ import"./index-a0nk83rk.js";
25
+ import"./index-ca44jww3.js";
26
26
  import"./index-rtry5xyf.js";
27
- import"./index-baawkm48.js";
28
- import"./index-dgxgvzab.js";
27
+ import"./index-x60gpbt5.js";
28
+ import"./index-asd9n0ms.js";
29
29
  import"./index-ae75rja9.js";
30
30
  import"./index-cfkvc5q9.js";
31
31
  import"./index-dd7ttx8x.js";
32
- import"./index-xfejq1p9.js";
32
+ import"./index-n48xwynh.js";
33
33
  import"./index-k5jrywpr.js";
34
34
  import"./index-n832052r.js";
35
35
  import {
@@ -37,7 +37,7 @@ import {
37
37
  init_constants,
38
38
  init_package,
39
39
  package_default
40
- } from "./index-b5ek2cge.js";
40
+ } from "./index-v8m282zt.js";
41
41
  import"./index-bk5tah7q.js";
42
42
  import"./index-8fwhhayc.js";
43
43
  import"./index-q1exe2b3.js";
@@ -8,9 +8,9 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-jpkxjmfw.js";
12
- import"./index-baawkm48.js";
13
- import"./index-dgxgvzab.js";
11
+ } from "./index-4cnwvmsm.js";
12
+ import"./index-x60gpbt5.js";
13
+ import"./index-asd9n0ms.js";
14
14
  import"./index-ae75rja9.js";
15
15
  import"./index-cfkvc5q9.js";
16
16
  import"./index-dd7ttx8x.js";
@@ -26,7 +26,7 @@ import {
26
26
  resolveKnowledgeCounterBaselinePath,
27
27
  resolveKnowledgeEventsPath,
28
28
  resolveLegacyApplicationLogPath
29
- } from "./index-dgxgvzab.js";
29
+ } from "./index-asd9n0ms.js";
30
30
  import"./index-ae75rja9.js";
31
31
  import"./index-cfkvc5q9.js";
32
32
  import"./index-dd7ttx8x.js";
@@ -41,7 +41,7 @@ import {
41
41
  transactKnowledge,
42
42
  transactKnowledgeWithCas,
43
43
  wordBigrams
44
- } from "./index-baawkm48.js";
44
+ } from "./index-x60gpbt5.js";
45
45
  import {
46
46
  resolveHiveDataDir
47
47
  } from "./index-ae75rja9.js";
@@ -23,11 +23,11 @@ import {
23
23
  validateLesson,
24
24
  validateSkillCandidatePath,
25
25
  validateSkillPath
26
- } from "./index-2njes601.js";
27
- import"./index-y0kk3rtv.js";
26
+ } from "./index-a0nk83rk.js";
27
+ import"./index-ca44jww3.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-baawkm48.js";
30
- import"./index-dgxgvzab.js";
29
+ import"./index-x60gpbt5.js";
30
+ import"./index-asd9n0ms.js";
31
31
  import"./index-ae75rja9.js";
32
32
  import"./index-cfkvc5q9.js";
33
33
  import"./index-dd7ttx8x.js";
@@ -4,8 +4,8 @@ import {
4
4
  alreadyCuratedThisGeneration,
5
5
  claimNextScanBatch,
6
6
  getScanStatus
7
- } from "./index-m2s0gbzt.js";
8
- import"./index-baawkm48.js";
7
+ } from "./index-y8vqsm2g.js";
8
+ import"./index-x60gpbt5.js";
9
9
  import"./index-ae75rja9.js";
10
10
  import"./index-cfkvc5q9.js";
11
11
  import"./index-dd7ttx8x.js";
@@ -93,7 +93,7 @@ import {
93
93
  resolveGeneratedAgentRole,
94
94
  resolveGuardrailsConfig,
95
95
  stripKnownSwarmPrefix
96
- } from "./index-b5ek2cge.js";
96
+ } from "./index-v8m282zt.js";
97
97
  import"./index-bk5tah7q.js";
98
98
  import"./index-bpmtbmy9.js";
99
99
  import"./index-zjygnfay.js";
@@ -33,12 +33,12 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-j6ywarjp.js";
37
- import"./index-2njes601.js";
38
- import"./index-y0kk3rtv.js";
36
+ } from "./index-njfcm1tn.js";
37
+ import"./index-a0nk83rk.js";
38
+ import"./index-ca44jww3.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-baawkm48.js";
41
- import"./index-dgxgvzab.js";
40
+ import"./index-x60gpbt5.js";
41
+ import"./index-asd9n0ms.js";
42
42
  import"./index-ae75rja9.js";
43
43
  import"./index-cfkvc5q9.js";
44
44
  import"./index-dd7ttx8x.js";
@@ -39,6 +39,16 @@ type ChatMessageLike = {
39
39
  * never contained, making the guard permanently inert.
40
40
  */
41
41
  export declare const RUNAWAY_OUTPUT_ADVISORY_MARKER = "Model is generating analysis without taking action";
42
+ /**
43
+ * Bound a set of advisory strings to a total byte budget, keeping the latest
44
+ * (dropping oldest from the front). Returns the kept entries and whether any
45
+ * were dropped. Never drops below a single entry (a single oversized advisory
46
+ * is kept verbatim rather than rendered empty).
47
+ */
48
+ export declare function boundAdvisoryBytes(advisories: string[], maxBytes: number): {
49
+ kept: string[];
50
+ truncated: boolean;
51
+ };
42
52
  export declare function getMostRecentAssistantText(messages: ChatMessageLike[]): string;
43
53
  export declare function isTransientProviderFailureText(text: string): boolean;
44
54
  export declare function getProviderFailureFingerprint(text: string): string;
@@ -5,6 +5,12 @@
5
5
  * input args by callID, used by guardrails for delegation detection
6
6
  * and exposed via safe accessor helpers.
7
7
  */
8
+ /**
9
+ * Max stored callID->args entries before the oldest-inserted is evicted
10
+ * (invariant 8). Larger than the per-session cap because callIDs are per
11
+ * tool-call, not per-session.
12
+ */
13
+ export declare const MAX_STORED_INPUT_ARGS = 2000;
8
14
  /**
9
15
  * Retrieves stored input args for a given callID.
10
16
  * Used by other hooks (e.g., delegation-gate) to access tool input args.
@@ -68,7 +68,7 @@ export declare function detectInteractiveSession(command: string, shell: 'posix'
68
68
  *
69
69
  * Detects:
70
70
  * - Redirection operators: >, >>, >|, <<, <<- (here-docs)
71
- * - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=)
71
+ * - Write-effect builtins: cp, mv, install, ln, truncate, dd (of=), tee
72
72
  * - In-place editors: sed -i, perl -i, awk -i
73
73
  * - Interpreter eval: python -c, node -e, bun -e, ruby -e, perl -e, php -r
74
74
  * - Network downloaders: curl -o, wget -O, scp