opencode-swarm 7.154.2 → 7.155.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/cli/{coder-settlement-xqs49g07.js → coder-settlement-2kdtysrg.js} +7 -7
  2. package/dist/cli/{config-doctor-69eebk90.js → config-doctor-s6p9aqfv.js} +2 -2
  3. package/dist/cli/{core-dyp14hcb.js → core-ev2ebc4v.js} +1 -1
  4. package/dist/cli/{curation-policy-jm9jsxtt.js → curation-policy-jabphe51.js} +4 -4
  5. package/dist/cli/{curator-he8n9z9n.js → curator-adp0dsv4.js} +28 -28
  6. package/dist/cli/{curator-drift-h57z6tm3.js → curator-drift-g6w4ga1q.js} +1 -1
  7. package/dist/cli/{curator-llm-factory-5tq9c4v5.js → curator-llm-factory-kd8v16jj.js} +28 -28
  8. package/dist/cli/{evidence-summary-service-05s5y8d6.js → evidence-summary-service-kpjpd86j.js} +10 -10
  9. package/dist/cli/{gate-evidence-3ptr9af3.js → gate-evidence-etbcms2v.js} +5 -5
  10. package/dist/cli/{guardrail-explain-tebk344k.js → guardrail-explain-wqb5h7kk.js} +29 -29
  11. package/dist/cli/{guardrail-log-x3gz3x17.js → guardrail-log-614g1pta.js} +3 -3
  12. package/dist/cli/{guardrail-reset-716pdyf5.js → guardrail-reset-0wdj53cp.js} +28 -28
  13. package/dist/cli/{hive-promoter-nvwpj2t9.js → hive-promoter-b1wv52fs.js} +28 -28
  14. package/dist/cli/{index-4xqa0sgz.js → index-0q8kywcf.js} +2 -2
  15. package/dist/cli/{index-8v69hfpt.js → index-26cvxrym.js} +3 -3
  16. package/dist/cli/{index-bxvkn0ye.js → index-2gfe61qp.js} +345 -221
  17. package/dist/cli/{index-57t97rtr.js → index-34wn2ztk.js} +5 -2
  18. package/dist/cli/{index-kemxyzc0.js → index-6bqqzfbe.js} +2 -2
  19. package/dist/cli/{index-dm9tc6qb.js → index-79qymsxf.js} +1 -1
  20. package/dist/cli/{index-r0dactw2.js → index-85p1850w.js} +1 -1
  21. package/dist/cli/{index-14bz2t7b.js → index-aqg7c1z9.js} +1 -1
  22. package/dist/cli/{index-xq2v52tt.js → index-c590qxts.js} +1 -1
  23. package/dist/cli/{index-fv9ddfta.js → index-c9nabqzd.js} +1 -1
  24. package/dist/cli/{index-nh4axsxc.js → index-caqe8x14.js} +2 -2
  25. package/dist/cli/{index-n0gqre56.js → index-ctsct3hy.js} +6 -6
  26. package/dist/cli/{index-4cgee5vh.js → index-dtn0pne5.js} +20 -1
  27. package/dist/cli/{index-ynvw5kxc.js → index-dw2q720x.js} +2 -2
  28. package/dist/cli/{index-xt6jx41g.js → index-e90g4dsw.js} +4 -4
  29. package/dist/cli/{index-9avdncr2.js → index-egnpzfe3.js} +5 -5
  30. package/dist/cli/{index-j6q3k628.js → index-ew6fykvv.js} +1 -1
  31. package/dist/cli/{index-6rns7b2m.js → index-fjcm6wwf.js} +2 -2
  32. package/dist/cli/{index-mnxtkt8s.js → index-ketfp4rv.js} +3 -3
  33. package/dist/cli/{index-f6qmar4k.js → index-kgdbtwfm.js} +5 -5
  34. package/dist/cli/{index-399e8aze.js → index-kyc2c7hq.js} +1 -1
  35. package/dist/cli/{index-07n87ctw.js → index-mm7ase9k.js} +1 -1
  36. package/dist/cli/{index-p7ey2w90.js → index-qj9jrjvr.js} +6 -6
  37. package/dist/cli/{index-v2ryvr8k.js → index-qzqpq75z.js} +30 -30
  38. package/dist/cli/{index-v9585wjc.js → index-rb4t72we.js} +2 -2
  39. package/dist/cli/{index-2w6vy9a9.js → index-spbxf9vn.js} +1 -1
  40. package/dist/cli/{index-6qwp46k0.js → index-t3xqpece.js} +3 -3
  41. package/dist/cli/{index-pj2nycpg.js → index-veajr5x7.js} +1 -1
  42. package/dist/cli/{index-vhhdj49x.js → index-wwv3cbv1.js} +8 -9
  43. package/dist/cli/{index-7tw116n6.js → index-x9tbe9v7.js} +2 -2
  44. package/dist/cli/{index-6rcx6vr6.js → index-xn23xnnk.js} +4 -4
  45. package/dist/cli/{index-dsqat5pg.js → index-zvp68qx6.js} +1 -1
  46. package/dist/cli/index.js +28 -28
  47. package/dist/cli/{knowledge-escalator-s0tye368.js → knowledge-escalator-z09aqvfe.js} +10 -10
  48. package/dist/cli/{knowledge-events-eyy9yf6b.js → knowledge-events-03f1rwm8.js} +8 -8
  49. package/dist/cli/{knowledge-link-rb11f06y.js → knowledge-link-4frk38w8.js} +3 -3
  50. package/dist/cli/{knowledge-store-zjq5mz2d.js → knowledge-store-sn28k13f.js} +4 -4
  51. package/dist/cli/{knowledge-validator-yw5qqqpd.js → knowledge-validator-rwrt3yja.js} +6 -6
  52. package/dist/cli/{pending-delegations-rdzjq3nw.js → pending-delegations-qe16vfrj.js} +2 -2
  53. package/dist/cli/{pr-subscriptions-2f5fne6z.js → pr-subscriptions-00evnffe.js} +3 -3
  54. package/dist/cli/{runner-yaqrj388.js → runner-k1rkbjm8.js} +4 -4
  55. package/dist/cli/{scan-cursor-8f0s883y.js → scan-cursor-h3mfzjc9.js} +5 -5
  56. package/dist/cli/{schema-2xw94dh3.js → schema-c37h5xw4.js} +1 -1
  57. package/dist/cli/{scope-persistence-tap2q94x.js → scope-persistence-35z42pj5.js} +5 -5
  58. package/dist/cli/{skill-generator-2xbfryqb.js → skill-generator-60px2mvb.js} +12 -12
  59. package/dist/cli/{worktree-collision-ownership-5gwey8ms.js → worktree-collision-ownership-2pc20ypq.js} +4 -4
  60. package/dist/cli/{worktree-isolation-xsy14t5a.js → worktree-isolation-w4yamc3b.js} +28 -28
  61. package/dist/commands/close.d.ts +2 -0
  62. package/dist/config/schema.d.ts +8 -0
  63. package/dist/hooks/final-context-accounting.d.ts +60 -0
  64. package/dist/hooks/index.d.ts +1 -0
  65. package/dist/hooks/knowledge-injector.d.ts +1 -1
  66. package/dist/hooks/repo-graph-injection.d.ts +40 -0
  67. package/dist/hooks/system-enhancer.d.ts +13 -0
  68. package/dist/hooks/utils.d.ts +11 -0
  69. package/dist/index.js +414 -389
  70. package/dist/memory/reflection-service.d.ts +8 -2
  71. package/dist/memory/schema.d.ts +4 -4
  72. package/dist/services/compaction-service.d.ts +9 -3
  73. package/dist/services/context-budget-service.d.ts +7 -3
  74. package/dist/services/injection-budget.d.ts +103 -26
  75. package/dist/state.d.ts +69 -0
  76. package/dist/summaries/summarizer.d.ts +34 -3
  77. package/dist/tools/repo-graph/indexed-storage.d.ts +136 -0
  78. package/dist/tools/repo-graph/query.d.ts +7 -0
  79. package/package.json +3 -1
@@ -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.154.2",
24
+ version: "7.155.0",
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",
@@ -135,6 +135,7 @@ var init_package = __esm(() => {
135
135
  "check:trajectory-store": "bun run scripts/check-trajectory-store-usage.ts",
136
136
  "check:mock-cleanup": "bun run scripts/check-mock-cleanup.ts",
137
137
  "check:invariants": "bun run scripts/check-invariants.ts",
138
+ "check:token-formula": "bun run scripts/check-token-formula.ts",
138
139
  "check:cross-contamination": "bun run scripts/check-cross-contamination.ts",
139
140
  "check:test-clock": "bun run scripts/check-test-clock.ts",
140
141
  "check:test-file-cap": "bun run scripts/check-test-file-cap.ts",
@@ -144,6 +145,7 @@ var init_package = __esm(() => {
144
145
  "check:gate-portability": "bun run scripts/check-gate-portability.ts",
145
146
  "check:bare-spawn": "bun run scripts/check-bare-executable-spawn.ts",
146
147
  "check:error-channel-discard": "bun run scripts/check-error-channel-discard.ts",
148
+ "check:registry-citations": "bun run scripts/check-registry-citations.ts",
147
149
  "check:memory-recall": "bun run scripts/memory-recall-regression.ts"
148
150
  },
149
151
  dependencies: {
@@ -832,7 +834,8 @@ var init_schema = __esm(() => {
832
834
  refresh_cap: exports_external.number().int().min(0).max(500).default(50),
833
835
  walk_budget_ms: exports_external.number().int().min(1000).max(60000).default(5000),
834
836
  max_files: exports_external.number().int().min(100).max(1e5).default(1e4),
835
- exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([])
837
+ exclude_dirs: exports_external.array(exports_external.string().trim().min(1)).default([]),
838
+ storage: exports_external.enum(["json", "indexed"]).default("json")
836
839
  });
837
840
  FORBIDDEN_CHECKPOINT_CONFIG_KEYS = new Set([
838
841
  "__proto__",
@@ -75,7 +75,7 @@ var SWARM_TEMP_GRAMMARS = [
75
75
  "src/evidence/manager.ts:288",
76
76
  "src/evidence/manager.ts:456",
77
77
  "src/tools/sast-baseline.ts:106",
78
- "src/tools/repo-graph/storage.ts:426",
78
+ "src/tools/repo-graph/storage.ts:493",
79
79
  "src/memory/reflection-service.ts:547 (pre-#2035)",
80
80
  "src/hooks/review-receipt.ts:608",
81
81
  "src/hooks/review-receipt.ts:674",
@@ -247,7 +247,7 @@ var SWARM_TEMP_GRAMMARS = [
247
247
  "src/tools/checkpoint.ts:195",
248
248
  "src/full-auto/state.ts:460",
249
249
  "src/context-map/persistence.ts:119",
250
- "src/context-map/capsule-persistence.ts:107",
250
+ "src/context-map/capsule-persistence.ts:109",
251
251
  "src/test-impact/history-store.ts:225",
252
252
  "src/test-impact/history-store.ts:353",
253
253
  "src/hooks/promotion-evidence-store.ts:102",
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  resolveExternalSkillsConfig
9
- } from "./index-57t97rtr.js";
9
+ } from "./index-34wn2ztk.js";
10
10
  import {
11
11
  MAX_MERGE_DEPTH,
12
12
  deepMerge,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFile
4
- } from "./index-j6q3k628.js";
4
+ } from "./index-ew6fykvv.js";
5
5
  import {
6
6
  init_logger,
7
7
  warn
@@ -7,7 +7,7 @@ import {
7
7
  readLinkPointer,
8
8
  resolveKnowledgeStoreDir,
9
9
  resolveLinkDir
10
- } from "./index-r0dactw2.js";
10
+ } from "./index-85p1850w.js";
11
11
 
12
12
  // src/knowledge/curation-policy.ts
13
13
  import { appendFile, mkdir as mkdir2, readFile as readFile2 } from "fs/promises";
@@ -11,7 +11,7 @@ import {
11
11
  import {
12
12
  init_schema,
13
13
  stripKnownSwarmPrefix
14
- } from "./index-57t97rtr.js";
14
+ } from "./index-34wn2ztk.js";
15
15
  import {
16
16
  init_constants
17
17
  } from "./index-myt57pht.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./index-y8552snf.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-j6q3k628.js";
12
+ } from "./index-ew6fykvv.js";
13
13
  import {
14
14
  assertProjectRoot,
15
15
  withEvidenceLock
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-ddszzne4.js";
5
5
  import {
6
6
  validateSwarmPath
7
- } from "./index-4cgee5vh.js";
7
+ } from "./index-dtn0pne5.js";
8
8
  import {
9
9
  bunWrite
10
10
  } from "./index-r3mvsbtq.js";
@@ -3096,7 +3096,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
3096
3096
  const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
3097
3097
  if (candidates.length === 0)
3098
3098
  return 0;
3099
- const { transferCoderSettlementToBackground } = await import("./coder-settlement-xqs49g07.js");
3099
+ const { transferCoderSettlementToBackground } = await import("./coder-settlement-2kdtysrg.js");
3100
3100
  let transferred = 0;
3101
3101
  for (const record of candidates) {
3102
3102
  try {
@@ -6,10 +6,10 @@ import {
6
6
  } from "./index-ae75rja9.js";
7
7
  import {
8
8
  resolveKnowledgeStoreDir
9
- } from "./index-r0dactw2.js";
9
+ } from "./index-85p1850w.js";
10
10
  import {
11
11
  atomicWriteFile
12
- } from "./index-j6q3k628.js";
12
+ } from "./index-ew6fykvv.js";
13
13
  import {
14
14
  init_knowledge_types,
15
15
  isActiveStatus
@@ -713,7 +713,7 @@ async function applyConfidenceFloorAction(directory, touched, options) {
713
713
  const {
714
714
  readAuthoritativeKnowledgeCounterRollups,
715
715
  effectiveRetrievalOutcomes
716
- } = await import("./knowledge-events-eyy9yf6b.js");
716
+ } = await import("./knowledge-events-03f1rwm8.js");
717
717
  const rollups = await readAuthoritativeKnowledgeCounterRollups(directory);
718
718
  const flagIds = new Set;
719
719
  for (const e of atFloor) {
@@ -780,11 +780,11 @@ async function applyConfidenceFloorAction(directory, touched, options) {
780
780
  });
781
781
  }
782
782
  if (action === "quarantine" && toQuarantine.length > 0) {
783
- const { quarantineEntry } = await import("./knowledge-validator-yw5qqqpd.js");
784
- const { KnowledgeConfigSchema } = await import("./schema-2xw94dh3.js");
783
+ const { quarantineEntry } = await import("./knowledge-validator-rwrt3yja.js");
784
+ const { KnowledgeConfigSchema } = await import("./schema-c37h5xw4.js");
785
785
  let config;
786
786
  try {
787
- const { loadPluginConfigWithMeta } = await import("./index-mnxtkt8s.js");
787
+ const { loadPluginConfigWithMeta } = await import("./index-ketfp4rv.js");
788
788
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
789
789
  config = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
790
790
  } catch {
@@ -168,5 +168,24 @@ async function readSwarmFileAsync(directory, filename, cache) {
168
168
  }
169
169
  return null;
170
170
  }
171
+ var TOKENS_PER_CHAR = 0.33;
172
+ function estimateTokensFromCharCount(chars) {
173
+ if (chars <= 0) {
174
+ return 0;
175
+ }
176
+ return Math.ceil(chars * TOKENS_PER_CHAR);
177
+ }
178
+ function estimateCharsForTokens(tokens) {
179
+ if (tokens <= 0) {
180
+ return 0;
181
+ }
182
+ return Math.floor(tokens / TOKENS_PER_CHAR);
183
+ }
184
+ function estimateTokens(text) {
185
+ if (!text) {
186
+ return 0;
187
+ }
188
+ return estimateTokensFromCharCount(text.length);
189
+ }
171
190
 
172
- export { safeHook, validateSwarmPath, readSwarmFileAsync };
191
+ export { safeHook, validateSwarmPath, readSwarmFileAsync, estimateCharsForTokens, estimateTokens };
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-dm9tc6qb.js";
5
+ } from "./index-79qymsxf.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-57t97rtr.js";
8
+ } from "./index-34wn2ztk.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-14bz2t7b.js";
4
+ } from "./index-aqg7c1z9.js";
5
5
  import {
6
6
  findNearDuplicate,
7
7
  inferTags,
@@ -9,13 +9,13 @@ import {
9
9
  resolveSwarmKnowledgePath,
10
10
  resolveSwarmRejectedPath,
11
11
  transactKnowledge
12
- } from "./index-n0gqre56.js";
12
+ } from "./index-ctsct3hy.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
- } from "./index-r0dactw2.js";
15
+ } from "./index-85p1850w.js";
16
16
  import {
17
17
  atomicWriteFile
18
- } from "./index-j6q3k628.js";
18
+ } from "./index-ew6fykvv.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./index-7g4c7s5r.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  removeWorktreeProvisioningOwner
4
- } from "./index-4xqa0sgz.js";
4
+ } from "./index-0q8kywcf.js";
5
5
  import {
6
6
  SOURCE_WORKTREE_GONE_STAGE,
7
7
  getTaskWorkflowSnapshot,
@@ -9,7 +9,7 @@ import {
9
9
  reconcileLandedMerge,
10
10
  withTaskEvidenceTransaction,
11
11
  writeWorkflowWalFile
12
- } from "./index-8v69hfpt.js";
12
+ } from "./index-26cvxrym.js";
13
13
  import {
14
14
  canonicalRootKeyFresh
15
15
  } from "./index-ddszzne4.js";
@@ -25,7 +25,7 @@ import {
25
25
  } from "./index-556ja8an.js";
26
26
  import {
27
27
  validateSwarmPath
28
- } from "./index-4cgee5vh.js";
28
+ } from "./index-dtn0pne5.js";
29
29
  import {
30
30
  init_git_executable,
31
31
  resolveGitExecutable
@@ -478,7 +478,7 @@ async function cleanupRecoveredWorktree(directory, descriptor) {
478
478
  awaitingMergeByCallID,
479
479
  cleanupStandardWorktreeForCallId,
480
480
  standardWorktreeByCallID
481
- } = await import("./worktree-isolation-xsy14t5a.js");
481
+ } = await import("./worktree-isolation-w4yamc3b.js");
482
482
  standardWorktreeByCallID.delete(descriptor.callID);
483
483
  if (hasResidue)
484
484
  awaitingMergeByCallID.set(descriptor.callID, {
@@ -602,7 +602,7 @@ async function recoverCoderSettlement(directory, taskId) {
602
602
  awaitingMergeByCallID,
603
603
  finishStandardWorktreeDispatch,
604
604
  standardWorktreeByCallID
605
- } = await import("./worktree-isolation-xsy14t5a.js");
605
+ } = await import("./worktree-isolation-w4yamc3b.js");
606
606
  const descriptor = wal.worktree;
607
607
  const reconstructedDispatch = {
608
608
  callID: descriptor.callID,
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  atomicWriteFileAnyRoot
4
- } from "./index-kemxyzc0.js";
4
+ } from "./index-6bqqzfbe.js";
5
5
  import {
6
6
  withEvidenceLock
7
7
  } from "./index-xagq35tf.js";
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-4cgee5vh.js";
4
+ } from "./index-dtn0pne5.js";
5
5
  import {
6
6
  atomicWriteSwarmFileSync
7
- } from "./index-kemxyzc0.js";
7
+ } from "./index-6bqqzfbe.js";
8
8
  import {
9
9
  withEvidenceLock
10
10
  } from "./index-xagq35tf.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-ynvw5kxc.js";
5
+ } from "./index-dw2q720x.js";
6
6
  import {
7
7
  ApprovalEvidenceSchema,
8
8
  BaseEvidenceSchema,
@@ -42,7 +42,7 @@ import {
42
42
  loadPluginConfig,
43
43
  loadPluginConfigWithMeta,
44
44
  loadPluginConfigWithMetaAsync
45
- } from "./index-dm9tc6qb.js";
45
+ } from "./index-79qymsxf.js";
46
46
  import {
47
47
  AUTO_REVIEW_V8_BURN_IN_DECISION,
48
48
  AgentOverrideConfigSchema,
@@ -64,7 +64,7 @@ import {
64
64
  TurboConfigSchema,
65
65
  WorktreeIsolationConfigSchema,
66
66
  resolveAutoReviewConfig
67
- } from "./index-57t97rtr.js";
67
+ } from "./index-34wn2ztk.js";
68
68
  import {
69
69
  ALL_AGENT_NAMES,
70
70
  ALL_SUBAGENT_NAMES,
@@ -6,12 +6,12 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-n0gqre56.js";
9
+ } from "./index-ctsct3hy.js";
10
10
  import {
11
11
  queryHistoricalOutcomes,
12
12
  readKnowledgeEvents,
13
13
  recordKnowledgeEvent
14
- } from "./index-p7ey2w90.js";
14
+ } from "./index-qj9jrjvr.js";
15
15
  import {
16
16
  init_knowledge_types,
17
17
  isActiveStatus
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
224
224
  alreadyInactive: true
225
225
  };
226
226
  }
227
- const { quarantineEntry } = await import("./knowledge-validator-yw5qqqpd.js");
227
+ const { quarantineEntry } = await import("./knowledge-validator-rwrt3yja.js");
228
228
  let policyConfig;
229
229
  try {
230
- const { KnowledgeConfigSchema } = await import("./schema-2xw94dh3.js");
231
- const { loadPluginConfigWithMeta } = await import("./index-mnxtkt8s.js");
230
+ const { KnowledgeConfigSchema } = await import("./schema-c37h5xw4.js");
231
+ const { loadPluginConfigWithMeta } = await import("./index-ketfp4rv.js");
232
232
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
233
233
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
234
234
  } catch {
@@ -9,7 +9,7 @@ import {
9
9
  readEvaluationRun,
10
10
  saveEvaluationRun,
11
11
  saveTaskSetSnapshot
12
- } from "./index-fv9ddfta.js";
12
+ } from "./index-c9nabqzd.js";
13
13
  import {
14
14
  canonicalHash,
15
15
  computeCandidateInputContentHash,
@@ -6,7 +6,7 @@ import {
6
6
  PluginConfigSchema,
7
7
  init_schema,
8
8
  stripKnownSwarmPrefix
9
- } from "./index-57t97rtr.js";
9
+ } from "./index-34wn2ztk.js";
10
10
  import {
11
11
  ALL_AGENT_NAMES,
12
12
  init_constants
@@ -1,23 +1,23 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-4cgee5vh.js";
4
+ } from "./index-dtn0pne5.js";
5
5
  import {
6
6
  loadPluginConfigWithMeta
7
- } from "./index-dm9tc6qb.js";
7
+ } from "./index-79qymsxf.js";
8
8
  import {
9
9
  KnowledgeConfigSchema,
10
10
  init_schema
11
- } from "./index-57t97rtr.js";
11
+ } from "./index-34wn2ztk.js";
12
12
  import {
13
13
  resolveHiveEventsPath
14
14
  } from "./index-ae75rja9.js";
15
15
  import {
16
16
  resolveKnowledgeStoreDir
17
- } from "./index-r0dactw2.js";
17
+ } from "./index-85p1850w.js";
18
18
  import {
19
19
  atomicWriteFile
20
- } from "./index-j6q3k628.js";
20
+ } from "./index-ew6fykvv.js";
21
21
  import {
22
22
  assertProjectRoot
23
23
  } from "./index-xagq35tf.js";
@@ -2793,7 +2793,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
2793
2793
  }
2794
2794
  let bumps = 0;
2795
2795
  if (deltas.length > 0) {
2796
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-zjq5mz2d.js");
2796
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-sn28k13f.js");
2797
2797
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2798
2798
  }
2799
2799
  return {
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-7tw116n6.js";
4
+ } from "./index-x9tbe9v7.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-pj2nycpg.js";
7
+ } from "./index-veajr5x7.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -86,53 +86,53 @@ import {
86
86
  handleWriteRetroCommand,
87
87
  normalizeSwarmCommandInput,
88
88
  resolveCommand
89
- } from "./index-bxvkn0ye.js";
90
- import"./index-399e8aze.js";
91
- import"./index-xq2v52tt.js";
92
- import"./index-07n87ctw.js";
93
- import"./index-vhhdj49x.js";
94
- import"./index-fv9ddfta.js";
89
+ } from "./index-2gfe61qp.js";
90
+ import"./index-kyc2c7hq.js";
91
+ import"./index-c590qxts.js";
92
+ import"./index-mm7ase9k.js";
93
+ import"./index-wwv3cbv1.js";
94
+ import"./index-c9nabqzd.js";
95
95
  import"./index-134d35c1.js";
96
96
  import"./index-nj6rmyeh.js";
97
97
  import"./index-y8552snf.js";
98
- import"./index-f6qmar4k.js";
99
- import"./index-v9585wjc.js";
98
+ import"./index-kgdbtwfm.js";
99
+ import"./index-rb4t72we.js";
100
100
  import"./index-70ha9e09.js";
101
101
  import"./index-c8s9a3zh.js";
102
102
  import"./index-9ss2m4rs.js";
103
- import"./index-6rns7b2m.js";
103
+ import"./index-fjcm6wwf.js";
104
104
  import"./index-zsrtt42s.js";
105
- import"./index-9avdncr2.js";
106
- import"./index-4xqa0sgz.js";
107
- import"./index-6rcx6vr6.js";
108
- import"./index-xt6jx41g.js";
109
- import"./index-14bz2t7b.js";
105
+ import"./index-egnpzfe3.js";
106
+ import"./index-0q8kywcf.js";
107
+ import"./index-xn23xnnk.js";
108
+ import"./index-e90g4dsw.js";
109
+ import"./index-aqg7c1z9.js";
110
110
  import"./index-rtry5xyf.js";
111
- import"./index-8v69hfpt.js";
112
- import"./index-2w6vy9a9.js";
113
- import"./index-nh4axsxc.js";
111
+ import"./index-26cvxrym.js";
112
+ import"./index-spbxf9vn.js";
113
+ import"./index-caqe8x14.js";
114
114
  import"./index-ddszzne4.js";
115
115
  import"./index-vnn7qq8c.js";
116
- import"./index-6qwp46k0.js";
117
- import"./index-dsqat5pg.js";
116
+ import"./index-t3xqpece.js";
117
+ import"./index-zvp68qx6.js";
118
118
  import"./index-xdy28ngt.js";
119
119
  import"./index-556ja8an.js";
120
120
  import"./index-4fwbbad3.js";
121
121
  import"./index-b43rt5ph.js";
122
122
  import"./index-q7sjgr1y.js";
123
- import"./index-n0gqre56.js";
124
- import"./index-p7ey2w90.js";
125
- import"./index-ynvw5kxc.js";
123
+ import"./index-ctsct3hy.js";
124
+ import"./index-qj9jrjvr.js";
125
+ import"./index-dw2q720x.js";
126
126
  import"./index-gprxjmm7.js";
127
127
  import"./index-n832052r.js";
128
- import"./index-4cgee5vh.js";
128
+ import"./index-dtn0pne5.js";
129
129
  import"./index-z6xqpmqg.js";
130
130
  import"./index-r3mvsbtq.js";
131
- import"./index-dm9tc6qb.js";
131
+ import"./index-79qymsxf.js";
132
132
  import {
133
133
  init_schema,
134
134
  stripKnownSwarmPrefix
135
- } from "./index-57t97rtr.js";
135
+ } from "./index-34wn2ztk.js";
136
136
  import {
137
137
  AGENT_TOOL_MAP,
138
138
  ORCHESTRATOR_NAME,
@@ -142,10 +142,10 @@ import"./index-zjygnfay.js";
142
142
  import"./index-9e6fdz2h.js";
143
143
  import"./index-4rhhvd1a.js";
144
144
  import"./index-ae75rja9.js";
145
- import"./index-r0dactw2.js";
146
- import"./index-j6q3k628.js";
145
+ import"./index-85p1850w.js";
146
+ import"./index-ew6fykvv.js";
147
147
  import"./index-bk5tah7q.js";
148
- import"./index-kemxyzc0.js";
148
+ import"./index-6bqqzfbe.js";
149
149
  import"./index-xagq35tf.js";
150
150
  import"./index-ed5ykebp.js";
151
151
  import"./index-h1g8w4v0.js";
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  readKnowledge,
4
4
  transactKnowledge
5
- } from "./index-n0gqre56.js";
5
+ } from "./index-ctsct3hy.js";
6
6
  import {
7
7
  init_git_executable,
8
8
  resolveGitExecutableAsync
9
9
  } from "./index-9e6fdz2h.js";
10
10
  import {
11
11
  resolveKnowledgeStoreDir
12
- } from "./index-r0dactw2.js";
12
+ } from "./index-85p1850w.js";
13
13
  import {
14
14
  init_knowledge_types,
15
15
  isActiveStatus
@@ -92,7 +92,7 @@ var _internals = {
92
92
  symlinkSync: fs.symlinkSync
93
93
  },
94
94
  writeScopeToDisk: async (directory, taskId, files) => {
95
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-tap2q94x.js");
95
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-35z42pj5.js");
96
96
  return realWrite(directory, taskId, files);
97
97
  },
98
98
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  computePlanStructureHash,
4
4
  derivePlanId
5
- } from "./index-dsqat5pg.js";
5
+ } from "./index-zvp68qx6.js";
6
6
  import {
7
7
  appendCoreEventSync
8
8
  } from "./index-xdy28ngt.js";
@@ -11,11 +11,11 @@ import {
11
11
  } from "./index-556ja8an.js";
12
12
  import {
13
13
  PlanSchema
14
- } from "./index-dm9tc6qb.js";
14
+ } from "./index-79qymsxf.js";
15
15
  import {
16
16
  atomicWriteSwarmFile,
17
17
  atomicWriteSwarmFileSync
18
- } from "./index-kemxyzc0.js";
18
+ } from "./index-6bqqzfbe.js";
19
19
  import {
20
20
  assertProjectRoot
21
21
  } from "./index-xagq35tf.js";
@@ -4,7 +4,7 @@ import {
4
4
  readShellAuditTail,
5
5
  redactPath,
6
6
  redactShellCommand
7
- } from "./index-xq2v52tt.js";
7
+ } from "./index-c590qxts.js";
8
8
 
9
9
  // src/services/guardrail-log-service.ts
10
10
  var BLOCK_TYPES = new Set([
@@ -3,7 +3,7 @@ import {
3
3
  EvaluationRunV1Schema,
4
4
  GateAuditResultV1Schema,
5
5
  getProtectedEvaluationRunIds
6
- } from "./index-fv9ddfta.js";
6
+ } from "./index-c9nabqzd.js";
7
7
  import {
8
8
  loadDatabaseCtor
9
9
  } from "./index-134d35c1.js";
@@ -23,7 +23,7 @@ import {
23
23
  readTaskEvidence,
24
24
  readTaskEvidenceRaw,
25
25
  sanitizeTaskId
26
- } from "./index-8v69hfpt.js";
26
+ } from "./index-26cvxrym.js";
27
27
  import {
28
28
  LedgerStaleWriterError,
29
29
  appendLedgerEvent,
@@ -43,7 +43,7 @@ import {
43
43
  replayFromLedgerWithStatus,
44
44
  takeSnapshotEvent,
45
45
  takeSnapshotWithRetry
46
- } from "./index-dsqat5pg.js";
46
+ } from "./index-zvp68qx6.js";
47
47
  import {
48
48
  appendCoreEventSync
49
49
  } from "./index-xdy28ngt.js";
@@ -58,9 +58,11 @@ import {
58
58
  EvidenceSchema
59
59
  } from "./index-gprxjmm7.js";
60
60
  import {
61
+ estimateCharsForTokens,
62
+ estimateTokens,
61
63
  readSwarmFileAsync,
62
64
  validateSwarmPath
63
- } from "./index-4cgee5vh.js";
65
+ } from "./index-dtn0pne5.js";
64
66
  import {
65
67
  bunHash,
66
68
  bunWrite,
@@ -68,7 +70,7 @@ import {
68
70
  } from "./index-r3mvsbtq.js";
69
71
  import {
70
72
  PlanSchema
71
- } from "./index-dm9tc6qb.js";
73
+ } from "./index-79qymsxf.js";
72
74
  import {
73
75
  GIT_BINARY_ENV_VAR,
74
76
  describeGitResolution,
@@ -1413,9 +1415,6 @@ async function getRunMemorySummary(directory) {
1413
1415
  Use this data to avoid repeating known failure patterns.`;
1414
1416
  let summaryText = summaries.join(`
1415
1417
  `);
1416
- const estimateTokens = (text) => {
1417
- return Math.ceil(text.length * 0.33);
1418
- };
1419
1418
  const totalText = prefix + summaryText + suffix;
1420
1419
  const estimatedTokens = estimateTokens(totalText);
1421
1420
  if (estimatedTokens > MAX_SUMMARY_TOKENS) {
@@ -1423,7 +1422,7 @@ Use this data to avoid repeating known failure patterns.`;
1423
1422
  const suffixTokens = estimateTokens(suffix);
1424
1423
  const availableContentTokens = MAX_SUMMARY_TOKENS - prefixTokens - suffixTokens;
1425
1424
  if (availableContentTokens > 0) {
1426
- const maxContentChars = Math.floor(availableContentTokens / 0.33);
1425
+ const maxContentChars = estimateCharsForTokens(availableContentTokens);
1427
1426
  summaryText = summaryText.slice(0, maxContentChars);
1428
1427
  } else {
1429
1428
  summaryText = "";