opencode-swarm 7.136.1 → 7.136.3

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 (112) hide show
  1. package/.opencode/skills/brainstorm/SKILL.md +1 -1
  2. package/.opencode/skills/clarify/SKILL.md +3 -3
  3. package/.opencode/skills/clarify-spec/SKILL.md +2 -2
  4. package/.opencode/skills/consult/SKILL.md +1 -1
  5. package/.opencode/skills/council/SKILL.md +1 -1
  6. package/.opencode/skills/critic-gate/SKILL.md +8 -3
  7. package/.opencode/skills/discover/SKILL.md +1 -1
  8. package/.opencode/skills/execute/SKILL.md +1 -1
  9. package/.opencode/skills/gate-attribution/SKILL.md +1 -1
  10. package/.opencode/skills/issue-ingest/SKILL.md +3 -3
  11. package/.opencode/skills/phase-wrap/SKILL.md +1 -1
  12. package/.opencode/skills/plan/SKILL.md +3 -3
  13. package/.opencode/skills/pre-phase-briefing/SKILL.md +1 -1
  14. package/.opencode/skills/resume/SKILL.md +1 -1
  15. package/.opencode/skills/specify/SKILL.md +1 -1
  16. package/.opencode/skills/swarm-pr-feedback/SKILL.md +41 -1
  17. package/.opencode/skills/swarm-pr-review/SKILL.md +72 -24
  18. package/README.md +18 -0
  19. package/dist/background/workspace-snapshot.d.ts +54 -0
  20. package/dist/cli/{config-doctor-6fphg5xm.js → config-doctor-g71mz50j.js} +2 -2
  21. package/dist/cli/{core-4z1s2ak1.js → core-jpjk2qvt.js} +1 -1
  22. package/dist/cli/{curation-policy-m24jbyag.js → curation-policy-zhyttjpa.js} +6 -6
  23. package/dist/cli/{curator-zrt5sqj2.js → curator-36dxw38r.js} +27 -24
  24. package/dist/cli/{curator-llm-factory-w5arq7tr.js → curator-llm-factory-k2a7cv41.js} +27 -24
  25. package/dist/cli/{evidence-summary-service-w006jnpg.js → evidence-summary-service-nse06dqr.js} +8 -6
  26. package/dist/cli/{gate-evidence-aenyz6vt.js → gate-evidence-kdygjr56.js} +4 -4
  27. package/dist/cli/{guardrail-explain-462jwhbh.js → guardrail-explain-1k337z5d.js} +28 -25
  28. package/dist/cli/{guardrail-log-ax21jd9e.js → guardrail-log-xbc9bvdt.js} +3 -3
  29. package/dist/cli/hashing-mjwn6j4y.js +34 -0
  30. package/dist/cli/{hive-promoter-2vacnbws.js → hive-promoter-daxrn62p.js} +27 -24
  31. package/dist/cli/{index-r9v98d0y.js → index-0vq9gnqd.js} +46 -5
  32. package/dist/cli/{index-jwrydqjp.js → index-176zwqcq.js} +2 -2
  33. package/dist/cli/{index-cggqh2dz.js → index-45y0y3xh.js} +57 -1000
  34. package/dist/cli/{index-gf7hqbmz.js → index-68tjkaqk.js} +5 -1
  35. package/dist/cli/{index-dyy3hvk3.js → index-79pgzj9a.js} +4 -4
  36. package/dist/cli/{index-45t7w06b.js → index-7t3vjw5e.js} +1 -1
  37. package/dist/cli/{index-ey29aap6.js → index-b3jfcptk.js} +1 -1
  38. package/dist/cli/{index-prnjt2jr.js → index-brtg922w.js} +4576 -2316
  39. package/dist/cli/{index-7a2hm51h.js → index-cze4bq1x.js} +41 -0
  40. package/dist/cli/{index-mrtms113.js → index-d2sf9an1.js} +2 -2
  41. package/dist/cli/{index-wxyxf0bd.js → index-d61h3f3h.js} +2 -2
  42. package/dist/cli/{index-rhgctfn3.js → index-g2kpqpvh.js} +29 -26
  43. package/dist/cli/{index-g7g4hqh3.js → index-g5rtcb1n.js} +1 -1
  44. package/dist/cli/{index-1sq47n6t.js → index-gj5jerzz.js} +12 -6
  45. package/dist/cli/{index-c9ddxv4k.js → index-hh34tyv7.js} +1 -1
  46. package/dist/cli/{index-h3bweb88.js → index-kp5h245k.js} +5 -5
  47. package/dist/cli/{index-tcn457d5.js → index-kym0cctr.js} +1 -1
  48. package/dist/cli/{index-kzc2ygea.js → index-mgbpbs1f.js} +3 -3
  49. package/dist/cli/{index-tfa40hwb.js → index-n89fdxwg.js} +19 -2
  50. package/dist/cli/index-ne28wyyc.js +783 -0
  51. package/dist/cli/index-nfm9f10v.js +1100 -0
  52. package/dist/cli/{index-zkddc5ye.js → index-pff46kfv.js} +2 -2
  53. package/dist/cli/{index-f4cmtd89.js → index-rtgqy0yg.js} +2 -2
  54. package/dist/cli/{index-09b9zncg.js → index-tncy55bp.js} +1 -1
  55. package/dist/cli/{index-vg3yx648.js → index-w6j1n5az.js} +1 -1
  56. package/dist/cli/{index-hzkvbycn.js → index-wbdxmf1a.js} +6 -6
  57. package/dist/cli/{index-y6a7gjtj.js → index-wsdnttf4.js} +228 -81
  58. package/dist/cli/index-y8552snf.js +264 -0
  59. package/dist/cli/{index-9gxp450h.js → index-zcrvn579.js} +2 -2
  60. package/dist/cli/{index-p1pqqwgp.js → index-zwh5dewz.js} +1 -1
  61. package/dist/cli/{index-dzyjb33e.js → index-zzhyws9g.js} +1 -1
  62. package/dist/cli/index.js +27 -24
  63. package/dist/cli/{knowledge-escalator-1zt8qy1c.js → knowledge-escalator-h7fspgph.js} +7 -7
  64. package/dist/cli/{knowledge-events-ej3s9tsm.js → knowledge-events-vkf7an5n.js} +5 -5
  65. package/dist/cli/{knowledge-link-mm1w967j.js → knowledge-link-zr40rnwr.js} +4 -4
  66. package/dist/cli/{knowledge-store-ey4cbkp4.js → knowledge-store-s4976v9c.js} +5 -5
  67. package/dist/cli/{knowledge-validator-zwmq7s2c.js → knowledge-validator-64ppqy4y.js} +8 -8
  68. package/dist/cli/{pending-delegations-qajsxct0.js → pending-delegations-0h5b18p7.js} +3 -3
  69. package/dist/cli/{pr-subscriptions-qhr41epq.js → pr-subscriptions-jn0h047q.js} +3 -3
  70. package/dist/cli/runner-deeswadt.js +21 -0
  71. package/dist/cli/{scan-cursor-809hf2n1.js → scan-cursor-xbkae12h.js} +6 -6
  72. package/dist/cli/{schema-mhd7xqwr.js → schema-7jm70cab.js} +5 -1
  73. package/dist/cli/{scope-persistence-h2fpgxww.js → scope-persistence-5xc9ntdh.js} +4 -4
  74. package/dist/cli/{skill-generator-yyc8zd9j.js → skill-generator-8gtq1ajr.js} +9 -9
  75. package/dist/cli/{telemetry-859khp82.js → telemetry-6678gya0.js} +1 -1
  76. package/dist/cli/{workspace-snapshot-jmyamqnv.js → workspace-snapshot-h5rzw37b.js} +5 -1
  77. package/dist/cli/{worktree-collision-ownership-13btcj9g.js → worktree-collision-ownership-wt7cc850.js} +3 -3
  78. package/dist/commands/registry.d.ts +72 -0
  79. package/dist/commands/skill-opt.d.ts +41 -0
  80. package/dist/config/schema.d.ts +57 -0
  81. package/dist/hooks/delegation-gate.d.ts +12 -1
  82. package/dist/hooks/gate-denial-tracker.d.ts +175 -0
  83. package/dist/hooks/guardrails/execution-episode.d.ts +41 -0
  84. package/dist/hooks/guardrails/execution-stall.d.ts +285 -0
  85. package/dist/hooks/guardrails/file-authority.d.ts +11 -2
  86. package/dist/hooks/guardrails/internals-guard.d.ts +117 -0
  87. package/dist/hooks/guardrails/messages-transform.d.ts +85 -0
  88. package/dist/hooks/pr-workflow-gate.d.ts +261 -4
  89. package/dist/hooks/pr-workflow-response-gate.d.ts +27 -9
  90. package/dist/hooks/trajectory-logger.d.ts +76 -0
  91. package/dist/hooks/write-target-resolver.d.ts +19 -0
  92. package/dist/index.js +511 -462
  93. package/dist/memory/schema.d.ts +3 -3
  94. package/dist/prm/index.d.ts +2 -0
  95. package/dist/services/skill-evaluator.d.ts +17 -0
  96. package/dist/services/skill-optimizer/activation.d.ts +58 -0
  97. package/dist/services/skill-optimizer/candidates.d.ts +88 -0
  98. package/dist/services/skill-optimizer/controller.d.ts +146 -0
  99. package/dist/services/skill-optimizer/deterministic-seed.d.ts +29 -0
  100. package/dist/services/skill-optimizer/lifecycle.d.ts +70 -0
  101. package/dist/services/skill-optimizer/promoted-external-staleness.d.ts +98 -0
  102. package/dist/services/skill-optimizer/retirement.d.ts +54 -0
  103. package/dist/services/skill-optimizer/skill-eval-tasks.d.ts +47 -0
  104. package/dist/services/skill-optimizer/smoke.d.ts +46 -0
  105. package/dist/services/skill-optimizer/store.d.ts +118 -0
  106. package/dist/state.d.ts +32 -0
  107. package/dist/telemetry.d.ts +66 -1
  108. package/dist/tools/write-pr-review-trigger-eval.d.ts +2 -1
  109. package/dist/types/events.d.ts +14 -1
  110. package/dist/utils/stable-stringify.d.ts +46 -0
  111. package/evaluation-fixtures/skill-eval/scoring/score-skill-eval.cjs +97 -0
  112. package/package.json +2 -1
@@ -245,6 +245,39 @@ var telemetry = {
245
245
  loopDetected(sessionId, agentName, loopType) {
246
246
  _internals.emit("loop_detected", { sessionId, agentName, loopType });
247
247
  },
248
+ noOpStrongWarning(sessionId, agentName, count, threshold) {
249
+ _internals.emit("no_op_strong_warning", {
250
+ sessionId,
251
+ agentName,
252
+ count,
253
+ threshold
254
+ });
255
+ },
256
+ gateDenialLoop(sessionId, tool, code, count) {
257
+ _internals.emit("gate_denial_loop", { sessionId, tool, code, count });
258
+ },
259
+ executionStallWarning(sessionId, count, threshold) {
260
+ _internals.emit("execution_stall_warning", {
261
+ sessionId,
262
+ count,
263
+ threshold
264
+ });
265
+ },
266
+ executionStallDenied(sessionId, tool, count, threshold) {
267
+ _internals.emit("execution_stall_denied", {
268
+ sessionId,
269
+ tool,
270
+ count,
271
+ threshold
272
+ });
273
+ },
274
+ swarmInternalsReadDenied(sessionId, tool, target) {
275
+ _internals.emit("swarm_internals_read_denied", {
276
+ sessionId,
277
+ tool,
278
+ target
279
+ });
280
+ },
248
281
  scopeViolation(sessionId, agentName, file, reason) {
249
282
  _internals.emit("scope_violation", { sessionId, agentName, file, reason });
250
283
  },
@@ -305,6 +338,14 @@ var telemetry = {
305
338
  level,
306
339
  occurrenceCount
307
340
  });
341
+ },
342
+ prmHardStopDelivered(sessionId, pattern, level, occurrenceCount) {
343
+ _internals.emit("prm_hard_stop_delivered", {
344
+ sessionId,
345
+ pattern,
346
+ level,
347
+ occurrenceCount
348
+ });
308
349
  }
309
350
  };
310
351
  var _internals = {
@@ -3,14 +3,14 @@ import {
3
3
  atomicWriteFile,
4
4
  taskEvidencePath,
5
5
  withTaskEvidenceLock
6
- } from "./index-ey29aap6.js";
6
+ } from "./index-b3jfcptk.js";
7
7
  import {
8
8
  exports_external,
9
9
  init_zod
10
10
  } from "./index-bpmtbmy9.js";
11
11
  import {
12
12
  telemetry
13
- } from "./index-7a2hm51h.js";
13
+ } from "./index-cze4bq1x.js";
14
14
 
15
15
  // src/gate-evidence.ts
16
16
  init_zod();
@@ -6,10 +6,10 @@ import {
6
6
  } from "./index-1kz6da87.js";
7
7
  import {
8
8
  withEvidenceLock
9
- } from "./index-09b9zncg.js";
9
+ } from "./index-tncy55bp.js";
10
10
  import {
11
11
  emit
12
- } from "./index-7a2hm51h.js";
12
+ } from "./index-cze4bq1x.js";
13
13
  import {
14
14
  criticalWarn,
15
15
  init_logger,
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  handleGuardrailExplain
4
- } from "./index-zkddc5ye.js";
4
+ } from "./index-pff46kfv.js";
5
5
  import {
6
6
  handleGuardrailLog
7
- } from "./index-g7g4hqh3.js";
7
+ } from "./index-g5rtcb1n.js";
8
8
  import {
9
9
  COMMAND_REGISTRY,
10
10
  SWARM_COMMAND_TOOL_ALLOWLIST,
@@ -84,59 +84,62 @@ import {
84
84
  handleWriteRetroCommand,
85
85
  normalizeSwarmCommandInput,
86
86
  resolveCommand
87
- } from "./index-prnjt2jr.js";
87
+ } from "./index-brtg922w.js";
88
88
  import"./index-vm4xw9z3.js";
89
- import"./index-tfa40hwb.js";
90
- import"./index-gf7hqbmz.js";
91
- import"./index-cggqh2dz.js";
89
+ import"./index-nfm9f10v.js";
90
+ import"./index-n89fdxwg.js";
91
+ import"./index-68tjkaqk.js";
92
+ import"./index-45y0y3xh.js";
93
+ import"./index-ne28wyyc.js";
94
+ import"./index-y8552snf.js";
92
95
  import"./index-4905hd2m.js";
93
96
  import"./index-134d35c1.js";
94
- import"./index-1sq47n6t.js";
95
- import"./index-h3bweb88.js";
96
- import"./index-9gxp450h.js";
97
+ import"./index-gj5jerzz.js";
98
+ import"./index-kp5h245k.js";
99
+ import"./index-zcrvn579.js";
97
100
  import"./index-6mjf4vr1.js";
98
101
  import"./index-c8s9a3zh.js";
99
102
  import"./index-9ss2m4rs.js";
100
- import"./index-y6a7gjtj.js";
101
- import"./index-mrtms113.js";
102
- import"./index-dyy3hvk3.js";
103
- import"./index-jwrydqjp.js";
103
+ import"./index-wsdnttf4.js";
104
+ import"./index-d2sf9an1.js";
105
+ import"./index-79pgzj9a.js";
106
+ import"./index-176zwqcq.js";
104
107
  import"./index-rtry5xyf.js";
105
- import"./index-hzkvbycn.js";
106
- import"./index-kzc2ygea.js";
108
+ import"./index-wbdxmf1a.js";
109
+ import"./index-mgbpbs1f.js";
107
110
  import"./index-ae75rja9.js";
108
- import"./index-dzyjb33e.js";
109
- import"./index-ey29aap6.js";
110
- import"./index-p1pqqwgp.js";
111
+ import"./index-zzhyws9g.js";
112
+ import"./index-b3jfcptk.js";
113
+ import"./index-zwh5dewz.js";
111
114
  import"./index-k5jrywpr.js";
112
115
  import"./index-n832052r.js";
113
116
  import {
114
117
  init_schema,
115
118
  stripKnownSwarmPrefix
116
- } from "./index-r9v98d0y.js";
119
+ } from "./index-0vq9gnqd.js";
117
120
  import"./index-bk5tah7q.js";
118
121
  import"./index-8fwhhayc.js";
119
122
  import"./index-q1exe2b3.js";
120
- import"./index-tcn457d5.js";
121
- import"./index-vg3yx648.js";
122
- import"./index-wxyxf0bd.js";
123
+ import"./index-kym0cctr.js";
124
+ import"./index-w6j1n5az.js";
125
+ import"./index-d61h3f3h.js";
123
126
  import"./index-1kz6da87.js";
124
127
  import"./index-x20cgr2q.js";
125
128
  import"./index-b8zgtz81.js";
126
- import"./index-c9ddxv4k.js";
129
+ import"./index-hh34tyv7.js";
127
130
  import"./index-4rhhvd1a.js";
128
131
  import {
129
132
  AGENT_TOOL_MAP,
130
133
  ORCHESTRATOR_NAME,
131
134
  init_constants
132
135
  } from "./index-3jcyn8g6.js";
133
- import"./index-45t7w06b.js";
136
+ import"./index-7t3vjw5e.js";
134
137
  import"./index-4qzeef9h.js";
135
138
  import"./index-fsrp8wp3.js";
136
- import"./index-09b9zncg.js";
139
+ import"./index-tncy55bp.js";
137
140
  import"./index-7g4c7s5r.js";
138
141
  import"./index-bpmtbmy9.js";
139
- import"./index-7a2hm51h.js";
142
+ import"./index-cze4bq1x.js";
140
143
  import"./index-z6xqpmqg.js";
141
144
  import"./index-zjygnfay.js";
142
145
  import"./index-y111zefa.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  redactPath,
4
4
  redactShellCommand
5
- } from "./index-tfa40hwb.js";
5
+ } from "./index-n89fdxwg.js";
6
6
 
7
7
  // src/services/guardrail-log-service.ts
8
8
  import * as fs from "fs/promises";
@@ -2,18 +2,18 @@
2
2
  import {
3
3
  ALLOWED_SKILL_PATH_PREFIXES,
4
4
  validateSkillPath
5
- } from "./index-dyy3hvk3.js";
5
+ } from "./index-79pgzj9a.js";
6
6
  import {
7
7
  computeOutcomeSignal,
8
8
  readKnowledge,
9
9
  resolveHiveKnowledgePath,
10
10
  resolveSwarmKnowledgePath,
11
11
  transactKnowledge
12
- } from "./index-hzkvbycn.js";
12
+ } from "./index-wbdxmf1a.js";
13
13
  import {
14
14
  effectiveRetrievalOutcomes,
15
15
  readKnowledgeCounterRollups
16
- } from "./index-kzc2ygea.js";
16
+ } from "./index-mgbpbs1f.js";
17
17
  import {
18
18
  init_knowledge_types,
19
19
  isActiveStatus
@@ -588,9 +588,15 @@ function includesPhrase(content, phrase) {
588
588
  return content.toLowerCase().includes(phrase.toLowerCase());
589
589
  }
590
590
  function evaluateContent(content, testCase) {
591
+ return scoreSkillPhrases({
592
+ content,
593
+ required: testCase.required_phrases,
594
+ forbidden: testCase.forbidden_phrases
595
+ });
596
+ }
597
+ function scoreSkillPhrases(args) {
598
+ const { content, required = [], forbidden = [] } = args;
591
599
  const failures = [];
592
- const required = testCase.required_phrases ?? [];
593
- const forbidden = testCase.forbidden_phrases ?? [];
594
600
  let requiredHits = 0;
595
601
  for (const phrase of required) {
596
602
  if (includesPhrase(content, phrase)) {
@@ -2135,4 +2141,4 @@ var _internals = {
2135
2141
  clearRetiredSkillLinks
2136
2142
  };
2137
2143
 
2138
- export { BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
2144
+ export { BUNDLED_PROJECT_SKILL_ROOT, bundledProjectSkillFileReference, syncBundledProjectSkillsIfMissingAsync, appendSkillChangelog, evaluateSkillChange, appendRejectedSkillEdit, isRejectedSkillContent, sanitizeSlug, isValidSlug2 as isValidSlug, proposalPath, activePath, activeRepoRelativePath, proposalRepoRelativePath, generateEvalStub, writeEvalStub, DEFAULT_SKILL_MIN_CONFIDENCE, DEFAULT_SKILL_MIN_CONFIRMATIONS, STRONG_SKILL_OUTCOME_COUNT, HIGH_PRIORITY_SKILL_MIN_CONFIDENCE, selectCandidateEntries, isSkillMaturityEligible, clusterEntries, buildKnowledgeCluster, renderSkillMarkdown, generateSkills, parseDraftFrontmatter, activateProposal, findSkillsBySourceKnowledgeId, findStaleSkillsBySourceKnowledgeId, listSkills, autoApplyProposals, inspectSkill, retireSkill, clearDraftSkillLinks, clearRetiredSkillLinks, markSkillStale, clearSkillStale, retireOrMarkStale, regenerateSkill, _internals };
@@ -86,7 +86,7 @@ var _internals = {
86
86
  symlinkSync: fs.symlinkSync
87
87
  },
88
88
  writeScopeToDisk: async (directory, taskId, files) => {
89
- const { writeScopeToDisk: realWrite } = await import("./scope-persistence-h2fpgxww.js");
89
+ const { writeScopeToDisk: realWrite } = await import("./scope-persistence-5xc9ntdh.js");
90
90
  return realWrite(directory, taskId, files);
91
91
  },
92
92
  writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
@@ -6,13 +6,13 @@ import {
6
6
  resolveSwarmKnowledgePath,
7
7
  transactKnowledge,
8
8
  wordBigrams
9
- } from "./index-hzkvbycn.js";
9
+ } from "./index-wbdxmf1a.js";
10
10
  import {
11
11
  countEntryContradictionsInWindow,
12
12
  countEntryViolationsInWindow,
13
13
  readKnowledgeEvents,
14
14
  recordKnowledgeEvent
15
- } from "./index-kzc2ygea.js";
15
+ } from "./index-mgbpbs1f.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-zwmq7s2c.js");
193
+ const { quarantineEntry } = await import("./knowledge-validator-64ppqy4y.js");
194
194
  let policyConfig;
195
195
  try {
196
- const { KnowledgeConfigSchema } = await import("./schema-mhd7xqwr.js");
197
- const { loadPluginConfigWithMeta } = await import("./index-f4cmtd89.js");
196
+ const { KnowledgeConfigSchema } = await import("./schema-7jm70cab.js");
197
+ const { loadPluginConfigWithMeta } = await import("./index-rtgqy0yg.js");
198
198
  const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
199
199
  policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
200
200
  } catch {
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-4qzeef9h.js";
5
5
  import {
6
6
  withEvidenceLock
7
- } from "./index-09b9zncg.js";
7
+ } from "./index-tncy55bp.js";
8
8
  import {
9
9
  exports_external,
10
10
  init_zod
@@ -4,10 +4,10 @@ import {
4
4
  } from "./index-ae75rja9.js";
5
5
  import {
6
6
  resolveKnowledgeStoreDir
7
- } from "./index-dzyjb33e.js";
7
+ } from "./index-zzhyws9g.js";
8
8
  import {
9
9
  atomicWriteFile
10
- } from "./index-ey29aap6.js";
10
+ } from "./index-b3jfcptk.js";
11
11
  import {
12
12
  require_proper_lockfile
13
13
  } from "./index-7g4c7s5r.js";
@@ -625,7 +625,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
625
625
  deltas.push({ id, delta });
626
626
  }
627
627
  if (deltas.length > 0) {
628
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-ey4cbkp4.js");
628
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-s4976v9c.js");
629
629
  await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
630
630
  }
631
631
  return {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  init_schema,
4
4
  stripKnownSwarmPrefix
5
- } from "./index-r9v98d0y.js";
5
+ } from "./index-0vq9gnqd.js";
6
6
  import {
7
7
  init_constants
8
8
  } from "./index-3jcyn8g6.js";
@@ -2032,6 +2032,23 @@ class QuickLRU extends Map {
2032
2032
 
2033
2033
  // src/hooks/guardrails/file-authority.ts
2034
2034
  init_schema();
2035
+
2036
+ // src/utils/stable-stringify.ts
2037
+ function stableCanonicalStringify(value) {
2038
+ if (value === null)
2039
+ return "null";
2040
+ if (typeof value !== "object")
2041
+ return JSON.stringify(value);
2042
+ if (Array.isArray(value)) {
2043
+ return `[${value.map((el) => stableCanonicalStringify(el)).join(",")}]`;
2044
+ }
2045
+ const obj = value;
2046
+ const keys = Object.keys(obj).sort();
2047
+ const entries = keys.map((k) => `${JSON.stringify(k)}:${stableCanonicalStringify(obj[k])}`).join(",");
2048
+ return `{${entries}}`;
2049
+ }
2050
+
2051
+ // src/hooks/guardrails/file-authority.ts
2035
2052
  var pathNormalizationCache = new QuickLRU({
2036
2053
  maxSize: 500
2037
2054
  });
@@ -2416,4 +2433,4 @@ function redactPath(filePath) {
2416
2433
  return normalized;
2417
2434
  }
2418
2435
 
2419
- export { classifyFile, checkFileAuthority, isInDeclaredScope2 as isInDeclaredScope, redactShellCommand, redactPath };
2436
+ export { stableCanonicalStringify, classifyFile, checkFileAuthority, isInDeclaredScope2 as isInDeclaredScope, redactShellCommand, redactPath };