opencode-swarm 7.136.3 → 7.136.4

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 (36) hide show
  1. package/dist/cli/{config-doctor-g71mz50j.js → config-doctor-qwp5y9dk.js} +2 -2
  2. package/dist/cli/{curation-policy-zhyttjpa.js → curation-policy-8tsbaa4q.js} +2 -2
  3. package/dist/cli/{curator-36dxw38r.js → curator-763smew7.js} +12 -12
  4. package/dist/cli/{curator-llm-factory-k2a7cv41.js → curator-llm-factory-dg8mmzy7.js} +12 -12
  5. package/dist/cli/{guardrail-explain-1k337z5d.js → guardrail-explain-6jc012g3.js} +13 -13
  6. package/dist/cli/{guardrail-log-xbc9bvdt.js → guardrail-log-86aw7fne.js} +3 -3
  7. package/dist/cli/{hive-promoter-daxrn62p.js → hive-promoter-en786ja4.js} +12 -12
  8. package/dist/cli/{index-mgbpbs1f.js → index-06htxvzq.js} +1 -1
  9. package/dist/cli/{index-zwh5dewz.js → index-1hef020t.js} +1 -1
  10. package/dist/cli/{index-gj5jerzz.js → index-4cv991ra.js} +3 -3
  11. package/dist/cli/{index-n89fdxwg.js → index-89fpahtg.js} +1 -1
  12. package/dist/cli/{index-176zwqcq.js → index-94pvh7hc.js} +1 -1
  13. package/dist/cli/{index-wbdxmf1a.js → index-bb3ks0v3.js} +4 -4
  14. package/dist/cli/{index-g2kpqpvh.js → index-et8b70c8.js} +14 -14
  15. package/dist/cli/{index-zcrvn579.js → index-fhnbzz75.js} +1 -1
  16. package/dist/cli/{index-79pgzj9a.js → index-fkdxfdbx.js} +2 -2
  17. package/dist/cli/{index-g5rtcb1n.js → index-g0sdhyqk.js} +1 -1
  18. package/dist/cli/{index-68tjkaqk.js → index-gjs5g97v.js} +1 -1
  19. package/dist/cli/{index-0vq9gnqd.js → index-pq8ge6fe.js} +1 -1
  20. package/dist/cli/{index-pff46kfv.js → index-qv1xc6rd.js} +2 -2
  21. package/dist/cli/{index-rtgqy0yg.js → index-rkp6jvc3.js} +2 -2
  22. package/dist/cli/{index-brtg922w.js → index-t1s4b5ha.js} +36 -36
  23. package/dist/cli/{index-kp5h245k.js → index-wy2f83j5.js} +5 -5
  24. package/dist/cli/index.js +12 -12
  25. package/dist/cli/{knowledge-escalator-h7fspgph.js → knowledge-escalator-e815bveb.js} +3 -3
  26. package/dist/cli/{knowledge-events-vkf7an5n.js → knowledge-events-dz2tyhpw.js} +1 -1
  27. package/dist/cli/{knowledge-store-s4976v9c.js → knowledge-store-97qr7m9k.js} +1 -1
  28. package/dist/cli/{knowledge-validator-64ppqy4y.js → knowledge-validator-xsetvy4v.js} +4 -4
  29. package/dist/cli/{scan-cursor-xbkae12h.js → scan-cursor-129fwf7e.js} +2 -2
  30. package/dist/cli/{schema-7jm70cab.js → schema-3xdza5gg.js} +1 -1
  31. package/dist/cli/{skill-generator-8gtq1ajr.js → skill-generator-8zhprasg.js} +5 -5
  32. package/dist/hooks/context-budget.d.ts +8 -0
  33. package/dist/hooks/index.d.ts +1 -1
  34. package/dist/hooks/message-priority.d.ts +62 -4
  35. package/dist/index.js +4 -4
  36. package/package.json +1 -1
@@ -15,13 +15,13 @@ import {
15
15
  } from "./index-nfm9f10v.js";
16
16
  import {
17
17
  stableCanonicalStringify
18
- } from "./index-n89fdxwg.js";
18
+ } from "./index-89fpahtg.js";
19
19
  import {
20
20
  detectStraySwarmDirs,
21
21
  readDoctorArtifact,
22
22
  removeStraySwarmDir,
23
23
  runConfigDoctor
24
- } from "./index-68tjkaqk.js";
24
+ } from "./index-gjs5g97v.js";
25
25
  import {
26
26
  MAX_TRANSIENT_RETRIES,
27
27
  archiveEvidence,
@@ -113,15 +113,15 @@ import {
113
113
  retireSkill,
114
114
  selectCandidateEntries,
115
115
  syncBundledProjectSkillsIfMissingAsync
116
- } from "./index-gj5jerzz.js";
116
+ } from "./index-4cv991ra.js";
117
117
  import {
118
118
  readRecentEscalations
119
- } from "./index-kp5h245k.js";
119
+ } from "./index-wy2f83j5.js";
120
120
  import {
121
121
  alreadyCuratedThisGeneration,
122
122
  claimNextScanBatch,
123
123
  resolveCohortId
124
- } from "./index-zcrvn579.js";
124
+ } from "./index-fhnbzz75.js";
125
125
  import {
126
126
  CURATOR_INIT_PROMPT,
127
127
  CURATOR_PHASE_PROMPT,
@@ -174,11 +174,11 @@ import {
174
174
  validateActionableFields,
175
175
  validateLesson,
176
176
  validateSkillPath
177
- } from "./index-79pgzj9a.js";
177
+ } from "./index-fkdxfdbx.js";
178
178
  import {
179
179
  authorizeCuration,
180
180
  buildConfigFingerprintInput
181
- } from "./index-176zwqcq.js";
181
+ } from "./index-94pvh7hc.js";
182
182
  import {
183
183
  cohortConfigFingerprint
184
184
  } from "./index-rtry5xyf.js";
@@ -211,7 +211,7 @@ import {
211
211
  transactFile,
212
212
  transactKnowledge,
213
213
  wordBigrams
214
- } from "./index-wbdxmf1a.js";
214
+ } from "./index-bb3ks0v3.js";
215
215
  import {
216
216
  MAX_EVENT_LOG_ENTRIES,
217
217
  _internals,
@@ -221,7 +221,7 @@ import {
221
221
  recordHiveKnowledgeEvent,
222
222
  recordKnowledgeEvent,
223
223
  resolveKnowledgeEventsPath
224
- } from "./index-mgbpbs1f.js";
224
+ } from "./index-06htxvzq.js";
225
225
  import {
226
226
  resolveHiveDataDir,
227
227
  resolveHiveEventsPath,
@@ -246,7 +246,7 @@ import {
246
246
  init_loader,
247
247
  loadPluginConfig,
248
248
  loadPluginConfigWithMeta
249
- } from "./index-zwh5dewz.js";
249
+ } from "./index-1hef020t.js";
250
250
  import {
251
251
  RetrospectiveEvidenceSchema
252
252
  } from "./index-k5jrywpr.js";
@@ -262,7 +262,7 @@ import {
262
262
  package_default,
263
263
  resolveAutoReviewConfig,
264
264
  stripKnownSwarmPrefix
265
- } from "./index-0vq9gnqd.js";
265
+ } from "./index-pq8ge6fe.js";
266
266
  import {
267
267
  KNOWLEDGE_SCHEMA_VERSION,
268
268
  OUTCOME_BLOCK_THRESHOLD,
@@ -18113,7 +18113,7 @@ function planMerges(active, threshold, maxComparisons, maxMerges) {
18113
18113
  };
18114
18114
  }
18115
18115
  async function sweepActiveNearDuplicates(directory, options = {}) {
18116
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rtgqy0yg.js");
18116
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rkp6jvc3.js");
18117
18117
  const { config } = loadPluginConfigWithMeta2(directory);
18118
18118
  const sweepConfig = config.learning?.dedup_sweep;
18119
18119
  if (sweepConfig?.enabled === false)
@@ -19706,7 +19706,7 @@ async function runCuratorPhase(directory, phase, agentsDispatched, config, knowl
19706
19706
  }
19707
19707
  if (config.skill_generation_enabled === true && skillCandidates.length > 0) {
19708
19708
  try {
19709
- const skillModule = await import("./skill-generator-8gtq1ajr.js");
19709
+ const skillModule = await import("./skill-generator-8zhprasg.js");
19710
19710
  for (const cand of skillCandidates) {
19711
19711
  if (cand.confidence < (config.min_skill_confidence ?? DEFAULT_SKILL_MIN_CONFIDENCE)) {
19712
19712
  continue;
@@ -20166,7 +20166,7 @@ async function applyCuratorKnowledgeUpdates(directory, recommendations, knowledg
20166
20166
  } catch {}
20167
20167
  }
20168
20168
  if (contradictedEntries.length > 0 && knowledgeConfig.contradiction_threshold_action === "quarantine") {
20169
- const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-h7fspgph.js");
20169
+ const { maybeQuarantineOnContradiction } = await import("./knowledge-escalator-e815bveb.js");
20170
20170
  for (const { id } of contradictedEntries) {
20171
20171
  try {
20172
20172
  await maybeQuarantineOnContradiction(directory, id, knowledgeConfig.contradiction_quarantine_threshold, knowledgeConfig.contradiction_quarantine_window_days);
@@ -20985,7 +20985,7 @@ async function runCuratorPostMortem(directory, options = {}) {
20985
20985
  warnings.push("Failed to collect knowledge summary.");
20986
20986
  }
20987
20987
  try {
20988
- const { getScanStatus } = await import("./scan-cursor-xbkae12h.js");
20988
+ const { getScanStatus } = await import("./scan-cursor-129fwf7e.js");
20989
20989
  const scanStatus = await getScanStatus(directory);
20990
20990
  if (scanStatus.remaining_estimate > 0) {
20991
20991
  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.`);
@@ -21157,9 +21157,9 @@ var _internals23 = {
21157
21157
  verifyPostMortemKnowledgeActions,
21158
21158
  repairPostMortemActions,
21159
21159
  loadDefaultKnowledgeConfig: async (directory) => {
21160
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-7jm70cab.js");
21160
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-3xdza5gg.js");
21161
21161
  try {
21162
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rtgqy0yg.js");
21162
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rkp6jvc3.js");
21163
21163
  const loaded = loadPluginConfigWithMeta2(directory);
21164
21164
  return KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
21165
21165
  } catch {
@@ -21167,11 +21167,11 @@ var _internals23 = {
21167
21167
  }
21168
21168
  },
21169
21169
  applyCuratorKnowledgeUpdates: async (directory, recommendations, knowledgeConfig, generation) => {
21170
- const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-36dxw38r.js");
21170
+ const { applyCuratorKnowledgeUpdates: applyCuratorKnowledgeUpdates2 } = await import("./curator-763smew7.js");
21171
21171
  return applyCuratorKnowledgeUpdates2(directory, recommendations, knowledgeConfig, generation);
21172
21172
  },
21173
21173
  checkHivePromotions: async (entries, knowledgeConfig, directory) => {
21174
- const { checkHivePromotions } = await import("./hive-promoter-daxrn62p.js");
21174
+ const { checkHivePromotions } = await import("./hive-promoter-en786ja4.js");
21175
21175
  return checkHivePromotions(entries, knowledgeConfig, directory);
21176
21176
  },
21177
21177
  applyProposalTriage: async (directory, triage) => {
@@ -21180,7 +21180,7 @@ var _internals23 = {
21180
21180
  activateProposal,
21181
21181
  listSkills: listSkills2,
21182
21182
  sanitizeSlug
21183
- } = await import("./skill-generator-8gtq1ajr.js");
21183
+ } = await import("./skill-generator-8zhprasg.js");
21184
21184
  const result = {
21185
21185
  approved: [],
21186
21186
  rejected: [],
@@ -23807,9 +23807,9 @@ function hashContent(content) {
23807
23807
  return createHash9("sha1").update(content).digest("hex");
23808
23808
  }
23809
23809
  async function loadConfigForPolicyCurator(directory) {
23810
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-7jm70cab.js");
23810
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-3xdza5gg.js");
23811
23811
  try {
23812
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rtgqy0yg.js");
23812
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rkp6jvc3.js");
23813
23813
  const { config: loadedConfig } = loadPluginConfigWithMeta2(directory);
23814
23814
  return KnowledgeConfigSchema2.parse(loadedConfig.knowledge ?? {});
23815
23815
  } catch {
@@ -27154,7 +27154,7 @@ async function runFinalizeStage(ctx) {
27154
27154
  }
27155
27155
  }
27156
27156
  try {
27157
- const { CuratorConfigSchema: CCS } = await import("./schema-7jm70cab.js");
27157
+ const { CuratorConfigSchema: CCS } = await import("./schema-3xdza5gg.js");
27158
27158
  const { config: pmLoadedConfig } = _internals33.loadPluginConfigWithMeta(ctx.directory);
27159
27159
  const curatorCfg = CCS.parse(pmLoadedConfig.curator ?? {});
27160
27160
  if (curatorCfg.enabled && curatorCfg.postmortem_enabled) {
@@ -29384,9 +29384,9 @@ var _internals38 = {
29384
29384
  loadPluginConfigWithMeta,
29385
29385
  loadCuratorDeps: async () => {
29386
29386
  const [{ CuratorConfigSchema }, curator, { createCuratorLLMDelegate: createCuratorLLMDelegate2 }] = await Promise.all([
29387
- import("./schema-7jm70cab.js"),
29388
- import("./curator-36dxw38r.js"),
29389
- import("./curator-llm-factory-k2a7cv41.js")
29387
+ import("./schema-3xdza5gg.js"),
29388
+ import("./curator-763smew7.js"),
29389
+ import("./curator-llm-factory-dg8mmzy7.js")
29390
29390
  ]);
29391
29391
  return { CuratorConfigSchema, curator, createCuratorLLMDelegate: createCuratorLLMDelegate2 };
29392
29392
  }
@@ -30288,7 +30288,7 @@ async function computeCurationDiagnostics(directory, entries) {
30288
30288
  let scanCompleted = false;
30289
30289
  let scanRemaining = 0;
30290
30290
  try {
30291
- const { getScanStatus } = await import("./scan-cursor-xbkae12h.js");
30291
+ const { getScanStatus } = await import("./scan-cursor-129fwf7e.js");
30292
30292
  const status = await getScanStatus(directory);
30293
30293
  scanGeneration = status.generation;
30294
30294
  scanCompleted = status.completed;
@@ -30298,17 +30298,17 @@ async function computeCurationDiagnostics(directory, entries) {
30298
30298
  try {
30299
30299
  const { isLinked: isLinked2 } = await import("./knowledge-link-zr40rnwr.js");
30300
30300
  if (isLinked2(directory)) {
30301
- const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-7jm70cab.js");
30301
+ const { KnowledgeConfigSchema: KnowledgeConfigSchema2 } = await import("./schema-3xdza5gg.js");
30302
30302
  let config;
30303
30303
  try {
30304
- const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rtgqy0yg.js");
30304
+ const { loadPluginConfigWithMeta: loadPluginConfigWithMeta2 } = await import("./index-rkp6jvc3.js");
30305
30305
  const loaded = loadPluginConfigWithMeta2(directory);
30306
30306
  config = KnowledgeConfigSchema2.parse(loaded.config.knowledge ?? {});
30307
30307
  } catch {
30308
30308
  config = KnowledgeConfigSchema2.parse({});
30309
30309
  }
30310
30310
  const { cohortConfigFingerprint: cohortConfigFingerprint2 } = await import("./config-fingerprint-v22xh5a2.js");
30311
- const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-zhyttjpa.js");
30311
+ const { buildConfigFingerprintInput: buildConfigFingerprintInput2, readCohortConfigFingerprint } = await import("./curation-policy-8tsbaa4q.js");
30312
30312
  const currentFp = cohortConfigFingerprint2(buildConfigFingerprintInput2(config));
30313
30313
  const cohortFp = await readCohortConfigFingerprint(directory);
30314
30314
  configMatch = cohortFp === null ? null : currentFp === cohortFp;
@@ -31519,7 +31519,7 @@ async function handleDoctorCommand(directory, args) {
31519
31519
  const result = runConfigDoctor(config, directory);
31520
31520
  let output;
31521
31521
  if (enableAutoFix && result.hasAutoFixableIssues) {
31522
- const { runConfigDoctorWithFixes } = await import("./config-doctor-g71mz50j.js");
31522
+ const { runConfigDoctorWithFixes } = await import("./config-doctor-qwp5y9dk.js");
31523
31523
  const fixResult = await runConfigDoctorWithFixes(directory, config, true, {
31524
31524
  applyLossy: true
31525
31525
  });
@@ -54454,7 +54454,7 @@ function buildDetailedHelp(commandName, entry) {
54454
54454
  async function handleHelpCommand(ctx) {
54455
54455
  const targetCommand = ctx.args.join(" ");
54456
54456
  if (!targetCommand) {
54457
- const { buildHelpText } = await import("./index-g2kpqpvh.js");
54457
+ const { buildHelpText } = await import("./index-et8b70c8.js");
54458
54458
  return buildHelpText();
54459
54459
  }
54460
54460
  const tokens = targetCommand.split(/\s+/);
@@ -54463,7 +54463,7 @@ async function handleHelpCommand(ctx) {
54463
54463
  return _internals13.buildDetailedHelp(resolved.key, resolved.entry);
54464
54464
  }
54465
54465
  const similar = _internals13.findSimilarCommands(targetCommand);
54466
- const { buildHelpText: fullHelp } = await import("./index-g2kpqpvh.js");
54466
+ const { buildHelpText: fullHelp } = await import("./index-et8b70c8.js");
54467
54467
  if (similar.length > 0) {
54468
54468
  return `Command '/swarm ${targetCommand}' not found.
54469
54469
 
@@ -54640,7 +54640,7 @@ var COMMAND_REGISTRY = {
54640
54640
  },
54641
54641
  "guardrail explain": {
54642
54642
  handler: async (ctx) => {
54643
- const { handleGuardrailExplain } = await import("./guardrail-explain-1k337z5d.js");
54643
+ const { handleGuardrailExplain } = await import("./guardrail-explain-6jc012g3.js");
54644
54644
  return handleGuardrailExplain(ctx.directory, ctx.args);
54645
54645
  },
54646
54646
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -54650,7 +54650,7 @@ var COMMAND_REGISTRY = {
54650
54650
  },
54651
54651
  "guardrail-explain": {
54652
54652
  handler: async (ctx) => {
54653
- const { handleGuardrailExplain } = await import("./guardrail-explain-1k337z5d.js");
54653
+ const { handleGuardrailExplain } = await import("./guardrail-explain-6jc012g3.js");
54654
54654
  return handleGuardrailExplain(ctx.directory, ctx.args);
54655
54655
  },
54656
54656
  description: "Dry-run: show what the guardrails would do to a command or write target (executes nothing)",
@@ -54660,7 +54660,7 @@ var COMMAND_REGISTRY = {
54660
54660
  },
54661
54661
  "guardrail-log": {
54662
54662
  handler: async (ctx) => {
54663
- const { handleGuardrailLog } = await import("./guardrail-log-xbc9bvdt.js");
54663
+ const { handleGuardrailLog } = await import("./guardrail-log-86aw7fne.js");
54664
54664
  return handleGuardrailLog(ctx.directory, ctx.args);
54665
54665
  },
54666
54666
  description: "Read the guardrail decision log (use --blocks-only for blocks)",
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-wbdxmf1a.js";
9
+ } from "./index-bb3ks0v3.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-mgbpbs1f.js";
15
+ } from "./index-06htxvzq.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-64ppqy4y.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-xsetvy4v.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-7jm70cab.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-rtgqy0yg.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-3xdza5gg.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-rkp6jvc3.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
package/dist/cli/index.js CHANGED
@@ -6,39 +6,39 @@ import {
6
6
  getPluginConfigDir,
7
7
  getPluginLockFilePaths,
8
8
  resolveCommand
9
- } from "./index-brtg922w.js";
9
+ } from "./index-t1s4b5ha.js";
10
10
  import"./index-vm4xw9z3.js";
11
11
  import"./index-nfm9f10v.js";
12
- import"./index-n89fdxwg.js";
13
- import"./index-68tjkaqk.js";
12
+ import"./index-89fpahtg.js";
13
+ import"./index-gjs5g97v.js";
14
14
  import"./index-45y0y3xh.js";
15
15
  import"./index-ne28wyyc.js";
16
16
  import"./index-y8552snf.js";
17
17
  import"./index-4905hd2m.js";
18
18
  import"./index-134d35c1.js";
19
- import"./index-gj5jerzz.js";
20
- import"./index-kp5h245k.js";
21
- import"./index-zcrvn579.js";
19
+ import"./index-4cv991ra.js";
20
+ import"./index-wy2f83j5.js";
21
+ import"./index-fhnbzz75.js";
22
22
  import"./index-6mjf4vr1.js";
23
23
  import"./index-c8s9a3zh.js";
24
24
  import"./index-9ss2m4rs.js";
25
25
  import"./index-wsdnttf4.js";
26
26
  import"./index-d2sf9an1.js";
27
- import"./index-79pgzj9a.js";
28
- import"./index-176zwqcq.js";
27
+ import"./index-fkdxfdbx.js";
28
+ import"./index-94pvh7hc.js";
29
29
  import"./index-rtry5xyf.js";
30
- import"./index-wbdxmf1a.js";
31
- import"./index-mgbpbs1f.js";
30
+ import"./index-bb3ks0v3.js";
31
+ import"./index-06htxvzq.js";
32
32
  import"./index-ae75rja9.js";
33
33
  import"./index-zzhyws9g.js";
34
34
  import"./index-b3jfcptk.js";
35
- import"./index-zwh5dewz.js";
35
+ import"./index-1hef020t.js";
36
36
  import"./index-k5jrywpr.js";
37
37
  import"./index-n832052r.js";
38
38
  import {
39
39
  init_package,
40
40
  package_default
41
- } from "./index-0vq9gnqd.js";
41
+ } from "./index-pq8ge6fe.js";
42
42
  import"./index-bk5tah7q.js";
43
43
  import"./index-8fwhhayc.js";
44
44
  import"./index-q1exe2b3.js";
@@ -8,9 +8,9 @@ import {
8
8
  maybeEscalateOnViolation,
9
9
  maybeQuarantineOnContradiction,
10
10
  readRecentEscalations
11
- } from "./index-kp5h245k.js";
12
- import"./index-wbdxmf1a.js";
13
- import"./index-mgbpbs1f.js";
11
+ } from "./index-wy2f83j5.js";
12
+ import"./index-bb3ks0v3.js";
13
+ import"./index-06htxvzq.js";
14
14
  import"./index-ae75rja9.js";
15
15
  import"./index-zzhyws9g.js";
16
16
  import"./index-b3jfcptk.js";
@@ -28,7 +28,7 @@ import {
28
28
  resolveKnowledgeCounterBaselinePath,
29
29
  resolveKnowledgeEventsPath,
30
30
  resolveLegacyApplicationLogPath
31
- } from "./index-mgbpbs1f.js";
31
+ } from "./index-06htxvzq.js";
32
32
  import"./index-ae75rja9.js";
33
33
  import"./index-zzhyws9g.js";
34
34
  import"./index-b3jfcptk.js";
@@ -41,7 +41,7 @@ import {
41
41
  transactKnowledge,
42
42
  transactKnowledgeWithCas,
43
43
  wordBigrams
44
- } from "./index-wbdxmf1a.js";
44
+ } from "./index-bb3ks0v3.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-79pgzj9a.js";
27
- import"./index-176zwqcq.js";
26
+ } from "./index-fkdxfdbx.js";
27
+ import"./index-94pvh7hc.js";
28
28
  import"./index-rtry5xyf.js";
29
- import"./index-wbdxmf1a.js";
30
- import"./index-mgbpbs1f.js";
29
+ import"./index-bb3ks0v3.js";
30
+ import"./index-06htxvzq.js";
31
31
  import"./index-ae75rja9.js";
32
32
  import"./index-zzhyws9g.js";
33
33
  import"./index-b3jfcptk.js";
@@ -4,8 +4,8 @@ import {
4
4
  alreadyCuratedThisGeneration,
5
5
  claimNextScanBatch,
6
6
  getScanStatus
7
- } from "./index-zcrvn579.js";
8
- import"./index-wbdxmf1a.js";
7
+ } from "./index-fhnbzz75.js";
8
+ import"./index-bb3ks0v3.js";
9
9
  import"./index-ae75rja9.js";
10
10
  import"./index-zzhyws9g.js";
11
11
  import"./index-b3jfcptk.js";
@@ -95,7 +95,7 @@ import {
95
95
  resolveGeneratedAgentRole,
96
96
  resolveGuardrailsConfig,
97
97
  stripKnownSwarmPrefix
98
- } from "./index-0vq9gnqd.js";
98
+ } from "./index-pq8ge6fe.js";
99
99
  import"./index-bk5tah7q.js";
100
100
  import"./index-3jcyn8g6.js";
101
101
  import"./index-bpmtbmy9.js";
@@ -33,12 +33,12 @@ import {
33
33
  sanitizeSlug,
34
34
  selectCandidateEntries,
35
35
  writeEvalStub
36
- } from "./index-gj5jerzz.js";
37
- import"./index-79pgzj9a.js";
38
- import"./index-176zwqcq.js";
36
+ } from "./index-4cv991ra.js";
37
+ import"./index-fkdxfdbx.js";
38
+ import"./index-94pvh7hc.js";
39
39
  import"./index-rtry5xyf.js";
40
- import"./index-wbdxmf1a.js";
41
- import"./index-mgbpbs1f.js";
40
+ import"./index-bb3ks0v3.js";
41
+ import"./index-06htxvzq.js";
42
42
  import"./index-ae75rja9.js";
43
43
  import"./index-zzhyws9g.js";
44
44
  import"./index-b3jfcptk.js";
@@ -17,6 +17,14 @@ interface MessageInfo {
17
17
  interface MessagePart {
18
18
  type: string;
19
19
  text?: string;
20
+ tool?: string;
21
+ state?: {
22
+ status?: string;
23
+ output?: string;
24
+ error?: string;
25
+ input?: Record<string, unknown>;
26
+ [key: string]: unknown;
27
+ };
20
28
  [key: string]: unknown;
21
29
  }
22
30
  interface MessageWithParts {
@@ -10,7 +10,7 @@ export { createDelegationTrackerHook } from './delegation-tracker';
10
10
  export { extractCurrentPhase, extractCurrentPhaseFromPlan, extractCurrentTask, extractCurrentTaskFromPlan, extractDecisions, extractIncompleteTasks, extractIncompleteTasksFromPlan, extractPatterns, } from './extractors';
11
11
  export { createFullAutoInterceptHook } from './full-auto-intercept';
12
12
  export { checkFileAuthority, createGuardrailsHooks, DEFAULT_AGENT_AUTHORITY_RULES, } from './guardrails';
13
- export { classifyMessage, classifyMessages, containsPlanContent, isDuplicateToolRead, isStaleError, isToolResult, MessagePriority, type MessagePriorityType, type MessageWithParts, } from './message-priority';
13
+ export { classifyMessage, classifyMessages, containsPlanContent, getCompletedToolOutputs, getToolNames, getToolParts, isDuplicateToolRead, isStaleError, isToolResult, MessagePriority, type MessagePriorityType, type MessageWithParts, } from './message-priority';
14
14
  export { consolidateSystemMessages } from './messages-transform';
15
15
  export { extractModelInfo, NATIVE_MODEL_LIMITS, PROVIDER_CAPS, resolveModelLimit, } from './model-limits';
16
16
  export { type CuratorDelegateFactory, createPhaseMonitorHook, } from './phase-monitor';
@@ -36,13 +36,27 @@ interface MessageInfo {
36
36
  sessionID?: string;
37
37
  modelID?: string;
38
38
  providerID?: string;
39
- toolName?: string;
40
- toolArgs?: unknown;
41
39
  [key: string]: unknown;
42
40
  }
43
41
  interface MessagePart {
44
42
  type?: string;
45
43
  text?: string;
44
+ tool?: string;
45
+ state?: ToolStateLike;
46
+ [key: string]: unknown;
47
+ }
48
+ /**
49
+ * Minimal shape of a `ToolPart.state` value. The OpenCode SDK `ToolState` is a
50
+ * discriminated union on `status`; only `completed` carries `output` and only
51
+ * `error` carries `error`. We read defensively and never mutate `state` in
52
+ * place (see context-budget.ts mask/prune logic — those replace the whole
53
+ * ToolPart with a synthetic text part rather than corrupting the union).
54
+ */
55
+ interface ToolStateLike {
56
+ status?: string;
57
+ output?: string;
58
+ error?: string;
59
+ input?: Record<string, unknown>;
46
60
  [key: string]: unknown;
47
61
  }
48
62
  export interface MessageWithParts {
@@ -58,16 +72,60 @@ export interface MessageWithParts {
58
72
  */
59
73
  export declare function containsPlanContent(text: string): boolean;
60
74
  /**
61
- * Checks if a message is a tool result (assistant message with tool call).
75
+ * Returns all `ToolPart` objects in a message's `parts[]`.
76
+ *
77
+ * Per the OpenCode SDK contract (`@opencode-ai/sdk` v1+v2), tool results are
78
+ * delivered as `ToolPart` objects (`part.type === 'tool'`, with `part.tool`
79
+ * and `part.state`) inside a message's `parts[]` array — they are NOT separate
80
+ * `role:'tool'` messages and do not carry an `info.toolName` field. A message
81
+ * may contain multiple tool parts (parallel tool calls).
82
+ *
83
+ * @param message - The message to inspect
84
+ * @returns Array of tool parts (empty if none / malformed)
85
+ */
86
+ export declare function getToolParts(message: MessageWithParts): MessagePart[];
87
+ /**
88
+ * Returns the completed tool outputs in a message — the countable, maskable
89
+ * payloads (`part.state.output` where `state.status === 'completed'`).
90
+ *
91
+ * Pending/running tools have no output; error tools expose `state.error`
92
+ * (diagnostic signal — never masked, only routed via the stale-error →
93
+ * DISPOSABLE pruning path). Completed outputs are the heavy payloads the
94
+ * context budget must count and may mask/prune.
95
+ *
96
+ * @param message - The message to inspect
97
+ * @returns Array of `{ part, output }` for each completed tool part
98
+ */
99
+ export declare function getCompletedToolOutputs(message: MessageWithParts): Array<{
100
+ part: MessagePart;
101
+ output: string;
102
+ }>;
103
+ /**
104
+ * Returns the tool names (`part.tool`) for every tool part in a message.
105
+ *
106
+ * @param message - The message to inspect
107
+ * @returns Array of tool name strings (empty if none)
108
+ */
109
+ export declare function getToolNames(message: MessageWithParts): string[];
110
+ /**
111
+ * Checks if a message carries at least one tool result (a `ToolPart` in its
112
+ * `parts[]`).
113
+ *
114
+ * This detects the real OpenCode SDK shape. The legacy `info.toolName` field
115
+ * never existed on production payloads and was removed (issue #2068).
62
116
  *
63
117
  * @param message - The message to check
64
- * @returns true if the message appears to be a tool result
118
+ * @returns true if the message contains at least one tool part
65
119
  */
66
120
  export declare function isToolResult(message: MessageWithParts): boolean;
67
121
  /**
68
122
  * Checks if two consecutive tool read calls are duplicates
69
123
  * (same tool with same first argument).
70
124
  *
125
+ * Compares the first tool part in each message (`part.tool` name and the first
126
+ * value of `part.state.input`). Two messages are duplicate reads when both
127
+ * call a read tool whose name contains "read" with the same first input value.
128
+ *
71
129
  * @param current - The current message
72
130
  * @param previous - The previous message
73
131
  * @returns true if this is a duplicate tool read