opencode-swarm 7.181.1 → 7.181.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 (99) hide show
  1. package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
  2. package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
  3. package/dist/background/stage-b-gates.d.ts +4 -0
  4. package/dist/cli/{coder-settlement-ee8bmg83.js → coder-settlement-txte2m87.js} +11 -11
  5. package/dist/cli/{config-doctor-mnmxzg86.js → config-doctor-101n3c1r.js} +3 -3
  6. package/dist/cli/{core-m9yymv84.js → core-s0yzzpaj.js} +3 -3
  7. package/dist/cli/{curation-policy-m3x9mkj9.js → curation-policy-r4dkajw9.js} +4 -4
  8. package/dist/cli/{curator-7nmwpcxy.js → curator-dp49fr0p.js} +38 -38
  9. package/dist/cli/curator-drift-r7w3cg3m.js +37 -0
  10. package/dist/cli/curator-llm-factory-tycc9xkw.js +74 -0
  11. package/dist/cli/{evidence-summary-service-m2b0mxmr.js → evidence-summary-service-r648x5f2.js} +17 -17
  12. package/dist/cli/{gate-evidence-4y2x85g4.js → gate-evidence-8rh69tsh.js} +6 -6
  13. package/dist/cli/guardrail-explain-dfyj1g1c.js +75 -0
  14. package/dist/cli/{guardrail-log-202rfw7b.js → guardrail-log-yr60w7h6.js} +7 -7
  15. package/dist/cli/{guardrail-reset-7nt7z18b.js → guardrail-reset-eztc62va.js} +38 -38
  16. package/dist/cli/{hive-promoter-segsykns.js → hive-promoter-g56ba4a4.js} +38 -38
  17. package/dist/cli/{index-m65tnv4j.js → index-01r2wrwa.js} +1 -1
  18. package/dist/cli/{index-hxe22tx3.js → index-1ks0rnzn.js} +5 -5
  19. package/dist/cli/{index-ztph1v9m.js → index-1w1xrk5k.js} +1 -1
  20. package/dist/cli/{index-12ewkms0.js → index-23mdeh2a.js} +1 -1
  21. package/dist/cli/{index-a7z6jygf.js → index-2pt5g7zz.js} +3 -3
  22. package/dist/cli/{index-y4zjbrqs.js → index-2t21pv2v.js} +1 -1
  23. package/dist/cli/{index-38cfx8g8.js → index-427x3j6p.js} +2 -2
  24. package/dist/cli/{index-tczqm089.js → index-4ffryqb1.js} +1 -1
  25. package/dist/cli/{index-pee6ykkg.js → index-4jvt3r77.js} +5 -5
  26. package/dist/cli/{index-908yea8v.js → index-6ep83w7x.js} +1 -1
  27. package/dist/cli/{index-r6p6x0pb.js → index-789tdsfv.js} +4 -4
  28. package/dist/cli/{index-yhx94xpr.js → index-7s6ct0t2.js} +6 -6
  29. package/dist/cli/{index-9j5jjqks.js → index-8c37kzh6.js} +7 -7
  30. package/dist/cli/{index-gc6h1fmf.js → index-a2hvmc3a.js} +1 -1
  31. package/dist/cli/{index-ea9fk6v0.js → index-ap6hs8fj.js} +1 -1
  32. package/dist/cli/{index-92m05mew.js → index-by9wfeja.js} +1 -1
  33. package/dist/cli/{index-kjstkfgh.js → index-ckrm4784.js} +7 -7
  34. package/dist/cli/{index-rxs0rrv1.js → index-dy9mxh0z.js} +40 -40
  35. package/dist/cli/{index-b2zbak7v.js → index-ekwe81my.js} +2 -2
  36. package/dist/cli/{index-3qhx9dx0.js → index-h6gxh3an.js} +4946 -1965
  37. package/dist/cli/{index-basp4sxt.js → index-hcaspktr.js} +1 -1
  38. package/dist/cli/{index-bdpgfep1.js → index-jrxrjz89.js} +1 -1
  39. package/dist/cli/{index-q1prchye.js → index-k5rqe97g.js} +27 -13
  40. package/dist/cli/{index-4h54k8h3.js → index-kexzhwbq.js} +2 -2
  41. package/dist/cli/{index-516j9vsk.js → index-kkrbybgt.js} +27 -2
  42. package/dist/cli/{index-cyyvc1cd.js → index-m4e3p8na.js} +2 -2
  43. package/dist/cli/{index-jqjdejqe.js → index-mdqp0cq2.js} +4 -4
  44. package/dist/cli/{index-6mwha20t.js → index-mkpdcbye.js} +3 -3
  45. package/dist/cli/{index-y30y1rkg.js → index-nw3z614g.js} +6 -6
  46. package/dist/cli/{index-nhxykfyy.js → index-nw8pfcw1.js} +270 -10
  47. package/dist/cli/{index-na3br902.js → index-qdz43cne.js} +38 -38
  48. package/dist/cli/{index-g9ax7jyf.js → index-rchygh27.js} +57 -4
  49. package/dist/cli/{index-6gcxgx84.js → index-s34y6gbh.js} +1 -1
  50. package/dist/cli/{index-s0zgz4p1.js → index-sf51gh68.js} +1 -1
  51. package/dist/cli/{index-gydvqmtg.js → index-sr9k8sh7.js} +4 -4
  52. package/dist/cli/{index-edb3sgxg.js → index-ttgex8ky.js} +6 -6
  53. package/dist/cli/{index-91dhg3wr.js → index-ved1325w.js} +2 -2
  54. package/dist/cli/{index-rw0wy2y7.js → index-vgjmahnd.js} +3 -3
  55. package/dist/cli/{index-bv4b8tpa.js → index-vvgpgcyn.js} +10 -0
  56. package/dist/cli/{index-vmthakz0.js → index-w1ydvzef.js} +1 -1
  57. package/dist/cli/{index-gqe4sm73.js → index-xqr076aq.js} +4 -4
  58. package/dist/cli/{index-g5wjasjn.js → index-yv0q0hp9.js} +140 -9
  59. package/dist/cli/{index-vs83acgx.js → index-yzapt508.js} +3 -3
  60. package/dist/cli/index.js +39 -39
  61. package/dist/cli/{knowledge-escalator-r9chkas8.js → knowledge-escalator-0rcft6q4.js} +12 -12
  62. package/dist/cli/{knowledge-events-5j2n6age.js → knowledge-events-7jyz3qxs.js} +10 -10
  63. package/dist/cli/{knowledge-link-s2qs178z.js → knowledge-link-655xa3db.js} +3 -3
  64. package/dist/cli/{knowledge-store-mybx9bmx.js → knowledge-store-asa26g6p.js} +4 -4
  65. package/dist/cli/{knowledge-validator-v1sj9tv4.js → knowledge-validator-j3x9ezej.js} +6 -6
  66. package/dist/cli/{mcp-7yx5230p.js → mcp-70hefjk6.js} +1 -1
  67. package/dist/cli/model-preflight-szekh1dc.js +359 -0
  68. package/dist/cli/{pending-delegations-amjfmc7t.js → pending-delegations-rb6bhv5x.js} +10 -10
  69. package/dist/cli/{pr-subscriptions-rctqs0gk.js → pr-subscriptions-v4ms5pfb.js} +10 -10
  70. package/dist/cli/{pr-workflow-gate-9he8ys4e.js → pr-workflow-gate-qmfpz6wb.js} +38 -38
  71. package/dist/cli/{runner-tzgwvvn1.js → runner-b5vt1any.js} +4 -4
  72. package/dist/cli/{scan-cursor-pxqkphrh.js → scan-cursor-7zn4t1hw.js} +5 -5
  73. package/dist/cli/{schema-n8pk3f80.js → schema-tx62mfy8.js} +2 -2
  74. package/dist/cli/{scope-persistence-p992x2yd.js → scope-persistence-f8w12sns.js} +14 -14
  75. package/dist/cli/{server-ywrd2q6z.js → server-f2vrp2wc.js} +73 -603
  76. package/dist/cli/{skill-generator-cdppktqx.js → skill-generator-jme09w7n.js} +14 -14
  77. package/dist/cli/{snapshot-coordination-init-z42ev5g9.js → snapshot-coordination-init-ad83sq6c.js} +38 -38
  78. package/dist/cli/{speckit-checkoff-6ynv46bn.js → speckit-checkoff-98gfvn3r.js} +4 -4
  79. package/dist/cli/{telemetry-zhcgfe70.js → telemetry-6k8t2mrw.js} +1 -1
  80. package/dist/cli/{workspace-snapshot-4m2ex1ey.js → workspace-snapshot-hsssm50w.js} +2 -2
  81. package/dist/cli/{worktree-collision-ownership-65971p3m.js → worktree-collision-ownership-47kdjtqb.js} +11 -11
  82. package/dist/cli/{worktree-isolation-xf7dfc46.js → worktree-isolation-etaawcnt.js} +38 -38
  83. package/dist/commands/registry.d.ts +1 -1
  84. package/dist/config/agent-model.d.ts +14 -0
  85. package/dist/config/bundled-skill-dispositions.d.ts +29 -0
  86. package/dist/db/qa-gate-profile.d.ts +6 -3
  87. package/dist/db/qa-gate-session-override.d.ts +72 -0
  88. package/dist/index.js +404 -390
  89. package/dist/memory/index.d.ts +1 -0
  90. package/dist/memory/instruction-pairing.d.ts +112 -0
  91. package/dist/services/model-preflight.d.ts +103 -21
  92. package/dist/session/restart-reconciliation.d.ts +74 -0
  93. package/dist/state.d.ts +6 -3
  94. package/dist/tools/get-qa-gate-profile.d.ts +13 -6
  95. package/package.json +1 -1
  96. package/dist/cli/curator-drift-q42fr0c9.js +0 -297
  97. package/dist/cli/curator-llm-factory-s1b2p162.js +0 -74
  98. package/dist/cli/guardrail-explain-nvmf3y7j.js +0 -75
  99. package/dist/cli/model-preflight-ckvv1arg.js +0 -170
@@ -23,69 +23,69 @@ import {
23
23
  resolveFallbackModel,
24
24
  resolvePrimaryAgentNames,
25
25
  stripSwarmPrefix
26
- } from "./index-3qhx9dx0.js";
27
- import"./index-jqjdejqe.js";
26
+ } from "./index-h6gxh3an.js";
27
+ import"./index-mdqp0cq2.js";
28
28
  import"./index-hamqvzqn.js";
29
- import"./index-m65tnv4j.js";
30
- import"./index-nhxykfyy.js";
31
- import"./index-b2zbak7v.js";
32
- import"./index-q1prchye.js";
33
- import"./index-s0zgz4p1.js";
29
+ import"./index-01r2wrwa.js";
30
+ import"./index-nw8pfcw1.js";
31
+ import"./index-ekwe81my.js";
32
+ import"./index-k5rqe97g.js";
33
+ import"./index-sf51gh68.js";
34
34
  import"./index-txdagbh7.js";
35
- import"./index-tczqm089.js";
35
+ import"./index-4ffryqb1.js";
36
36
  import"./index-6b295cas.js";
37
- import"./index-vs83acgx.js";
38
- import"./index-hxe22tx3.js";
39
- import"./index-cyyvc1cd.js";
37
+ import"./index-yzapt508.js";
38
+ import"./index-1ks0rnzn.js";
39
+ import"./index-m4e3p8na.js";
40
40
  import {
41
41
  createExplorerAgent
42
42
  } from "./index-rdec0y3z.js";
43
- import"./index-y30y1rkg.js";
43
+ import"./index-nw3z614g.js";
44
44
  import"./index-cjapb4hy.js";
45
45
  import"./index-zsrtt42s.js";
46
- import"./index-kjstkfgh.js";
47
- import"./index-bdpgfep1.js";
48
- import"./index-92m05mew.js";
46
+ import"./index-ckrm4784.js";
47
+ import"./index-jrxrjz89.js";
48
+ import"./index-by9wfeja.js";
49
49
  import"./index-pt7h91zc.js";
50
50
  import"./index-q7sjgr1y.js";
51
- import"./index-908yea8v.js";
52
- import"./index-r6p6x0pb.js";
53
- import"./index-a7z6jygf.js";
54
- import"./index-9j5jjqks.js";
55
- import"./index-g5wjasjn.js";
56
- import"./index-gc6h1fmf.js";
51
+ import"./index-6ep83w7x.js";
52
+ import"./index-789tdsfv.js";
53
+ import"./index-2pt5g7zz.js";
54
+ import"./index-8c37kzh6.js";
55
+ import"./index-yv0q0hp9.js";
56
+ import"./index-a2hvmc3a.js";
57
57
  import"./index-2s7dvzff.js";
58
- import"./index-gqe4sm73.js";
59
- import"./index-6gcxgx84.js";
58
+ import"./index-xqr076aq.js";
59
+ import"./index-s34y6gbh.js";
60
60
  import"./index-rtry5xyf.js";
61
- import"./index-rw0wy2y7.js";
61
+ import"./index-vgjmahnd.js";
62
62
  import"./index-frcemc0b.js";
63
63
  import"./index-0725jpp7.js";
64
- import"./index-pee6ykkg.js";
65
- import"./index-edb3sgxg.js";
66
- import"./index-38cfx8g8.js";
67
- import"./index-91dhg3wr.js";
68
- import"./index-vmthakz0.js";
69
- import"./index-bv4b8tpa.js";
64
+ import"./index-4jvt3r77.js";
65
+ import"./index-ttgex8ky.js";
66
+ import"./index-427x3j6p.js";
67
+ import"./index-ved1325w.js";
68
+ import"./index-w1ydvzef.js";
69
+ import"./index-vvgpgcyn.js";
70
70
  import"./index-rdm3px0g.js";
71
71
  import"./index-ry16d01s.js";
72
- import"./index-516j9vsk.js";
73
- import"./index-yhx94xpr.js";
72
+ import"./index-kkrbybgt.js";
73
+ import"./index-7s6ct0t2.js";
74
74
  import"./index-vzm6zre7.js";
75
75
  import"./index-ae75rja9.js";
76
- import"./index-12ewkms0.js";
77
- import"./index-ea9fk6v0.js";
78
- import"./index-6mwha20t.js";
76
+ import"./index-23mdeh2a.js";
77
+ import"./index-ap6hs8fj.js";
78
+ import"./index-mkpdcbye.js";
79
79
  import"./index-1xnse449.js";
80
80
  import"./index-c1ggtmpm.js";
81
81
  import"./index-ejhxgyvm.js";
82
82
  import"./index-7g4c7s5r.js";
83
83
  import"./index-989v83pb.js";
84
84
  import"./index-gx2vp8gx.js";
85
- import"./index-basp4sxt.js";
85
+ import"./index-hcaspktr.js";
86
86
  import"./index-zxdawwc7.js";
87
- import"./index-g9ax7jyf.js";
88
- import"./index-y4zjbrqs.js";
87
+ import"./index-rchygh27.js";
88
+ import"./index-2t21pv2v.js";
89
89
  import"./index-bk5tah7q.js";
90
90
  import"./index-gknz3bv1.js";
91
91
  import"./index-zpsr8rpc.js";
@@ -3,7 +3,7 @@ import {
3
3
  ALL_AGENT_NAMES,
4
4
  SUMMARIZER_EXEMPT_TOOL_NAMES,
5
5
  init_constants
6
- } from "./index-y4zjbrqs.js";
6
+ } from "./index-2t21pv2v.js";
7
7
  import {
8
8
  OUTCOME_BLOCK_THRESHOLD,
9
9
  init_knowledge_types
@@ -21,7 +21,7 @@ var package_default;
21
21
  var init_package = __esm(() => {
22
22
  package_default = {
23
23
  name: "opencode-swarm",
24
- version: "7.181.1",
24
+ version: "7.181.3",
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",
@@ -192,7 +192,60 @@ var init_package = __esm(() => {
192
192
  });
193
193
 
194
194
  // src/config/context-window.ts
195
- var DEFAULT_MODEL_CONTEXT_TOKENS = 128000;
195
+ function normalizeLimitKey(key) {
196
+ return key.trim().toLowerCase();
197
+ }
198
+ function isUsableConfiguredWindow(value) {
199
+ return typeof value === "number" && Number.isFinite(value) && value >= 1;
200
+ }
201
+ function isUsableContextWindow(value) {
202
+ return typeof value === "number" && Number.isFinite(value) && value >= MIN_PLAUSIBLE_CONTEXT_TOKENS;
203
+ }
204
+ function resolveContextWindow(inputs) {
205
+ const { userLimits, modelID, providerID, liveContextLimit, fallbackLookup } = inputs;
206
+ if (userLimits) {
207
+ let normalized;
208
+ const normalizedLimits = () => {
209
+ if (normalized === undefined) {
210
+ normalized = {};
211
+ for (const [key, value] of Object.entries(userLimits)) {
212
+ normalized[normalizeLimitKey(key)] = value;
213
+ }
214
+ }
215
+ return normalized;
216
+ };
217
+ if (modelID && providerID) {
218
+ const compound = normalizedLimits()[normalizeLimitKey(`${providerID}/${modelID}`)];
219
+ if (isUsableConfiguredWindow(compound)) {
220
+ return { tokens: Math.floor(compound), source: "user_provider_model" };
221
+ }
222
+ }
223
+ if (modelID) {
224
+ const byModel = normalizedLimits()[normalizeLimitKey(modelID)];
225
+ if (isUsableConfiguredWindow(byModel)) {
226
+ return { tokens: Math.floor(byModel), source: "user_model" };
227
+ }
228
+ }
229
+ const byDefault = normalizedLimits().default;
230
+ if (isUsableConfiguredWindow(byDefault)) {
231
+ return { tokens: Math.floor(byDefault), source: "user_default" };
232
+ }
233
+ }
234
+ if (isUsableContextWindow(liveContextLimit)) {
235
+ return { tokens: Math.floor(liveContextLimit), source: "live_model_limit" };
236
+ }
237
+ if (fallbackLookup) {
238
+ const fromTable = fallbackLookup(modelID, providerID);
239
+ if (fromTable !== undefined && isUsableContextWindow(fromTable.tokens)) {
240
+ return {
241
+ tokens: Math.floor(fromTable.tokens),
242
+ source: fromTable.table === "provider_cap" ? "static_provider_cap" : "static_native"
243
+ };
244
+ }
245
+ }
246
+ return { tokens: DEFAULT_MODEL_CONTEXT_TOKENS, source: "static_default" };
247
+ }
248
+ var DEFAULT_MODEL_CONTEXT_TOKENS = 128000, MIN_PLAUSIBLE_CONTEXT_TOKENS = 1000;
196
249
  var init_context_window = () => {};
197
250
 
198
251
  // src/config/schema.ts
@@ -1978,4 +2031,4 @@ var init_schema = __esm(() => {
1978
2031
  });
1979
2032
  });
1980
2033
 
1981
- export { init_package, package_default, DEFAULT_MODEL_CONTEXT_TOKENS, init_context_window, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_SECTION_SCHEMAS, GateConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GATE_CONFIG_READERS, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, RetentionConfigSchema, ReviewPassesConfigSchema, AUTO_REVIEW_V8_BURN_IN_DECISION, AutoReviewConfigSchema, resolveAutoReviewConfig, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, GitConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, LearningConfigSchema, ConsensusConfigSchema, OtlpExportConfigSchema, ObservabilityConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, HarnessEvolutionConfigSchema, DEFAULT_HARNESS_EVOLUTION_CONFIG, HarnessOptConfigSchema, DEFAULT_HARNESS_OPT_CONFIG, SkillImproverConfigSchema, SkillsConfigSchema, SkillOptConfigSchema, DEFAULT_SKILL_OPT_CONFIG, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, PrFeedbackLoopConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, DEFAULT_PR_REVIEW_RESILIENCE_CONFIG, PrReviewResilienceConfigSchema, ReviewRoutingConfigSchema, DEFAULT_REVIEW_ROUTING_CONFIG, LaneLivenessWatchdogConfigSchema, DispatchProtectionConfigSchema, DashboardConfigSchema, DEFAULT_PR_REVIEW_LEGACY_TRANSCRIPT_COMPATIBILITY, PluginConfigSchema, init_schema };
2034
+ export { init_package, package_default, DEFAULT_MODEL_CONTEXT_TOKENS, isUsableConfiguredWindow, isUsableContextWindow, resolveContextWindow, init_context_window, _internals, isKnownCanonicalRole, getCanonicalAgentRole, resolveGeneratedAgentRole, stripKnownSwarmPrefix, AgentReasoningConfigSchema, AgentThinkingConfigSchema, FALLBACK_MODELS_MAX, AgentOverrideConfigSchema, SwarmConfigSchema, ModelPricingConfigSchema, PricingConfigSchema, HooksConfigSchema, ScoringWeightsSchema, DecisionDecaySchema, TokenRatiosSchema, ScoringConfigSchema, ContextBudgetConfigSchema, EvidenceConfigSchema, GateFeatureSchema, PlaceholderScanConfigSchema, QualityBudgetConfigSchema, GATE_SECTION_SCHEMAS, GateConfigSchema, GATE_CONFIG_KNOWN_SECTION_KEYS, GATE_CONFIG_READERS, PipelineConfigSchema, PhaseCompleteConfigSchema, SummaryConfigSchema, RetentionConfigSchema, ReviewPassesConfigSchema, AUTO_REVIEW_V8_BURN_IN_DECISION, AutoReviewConfigSchema, resolveAutoReviewConfig, AdversarialDetectionConfigSchema, AdversarialTestingConfigSchema, IntegrationAnalysisConfigSchema, DocsConfigSchema, DesignDocsConfigSchema, GitConfigSchema, UIReviewConfigSchema, CompactionAdvisoryConfigSchema, LintConfigSchema, SecretscanConfigSchema, GuardrailsProfileSchema, DEFAULT_AGENT_PROFILES, DEFAULT_ARCHITECT_PROFILE, GuardrailsConfigSchema, WatchdogConfigSchema, SelfReviewConfigSchema, resolveGuardrailsConfig, ToolFilterConfigSchema, PlanCursorConfigSchema, ContextMapConfigSchema, RepoGraphConfigSchema, CheckpointConfigSchema, ApplyPatchConfigSchema, AutomationModeSchema, AutomationCapabilitiesSchema, AutomationConfigSchema, KnowledgeConfigSchema, LearningConfigSchema, ConsensusConfigSchema, OtlpExportConfigSchema, ObservabilityConfigSchema, MemoryConfigSchema, CuratorConfigSchema, ArchitecturalSupervisionConfigSchema, KnowledgeApplicationConfigSchema, SkillPropagationConfigSchema, HarnessEvolutionConfigSchema, DEFAULT_HARNESS_EVOLUTION_CONFIG, HarnessOptConfigSchema, DEFAULT_HARNESS_OPT_CONFIG, SkillImproverConfigSchema, SkillsConfigSchema, SkillOptConfigSchema, DEFAULT_SKILL_OPT_CONFIG, SpecWriterConfigSchema, SlopDetectorConfigSchema, IncrementalVerifyConfigSchema, CompactionConfigSchema, PrmConfigSchema, AgentAuthorityRuleSchema, AuthorityConfigSchema, GeneralCouncilConfigSchema, CouncilConfigSchema, PrMonitorConfigSchema, PrFeedbackLoopConfigSchema, ParallelizationConfigSchema, WorktreeIsolationConfigSchema, LeanTurboConfigSchema, EpicConfigSchema, StandardTurboConfigSchema, LeanTurboStrategyConfigSchema, TurboConfigSchema, ExternalSkillCandidateSourceTypeSchema, ExternalSkillCandidateEvaluationVerdictSchema, DiscoverySourceSchema, ExternalSkillCandidateSchema, ExternalSkillsConfigSchema, DEFAULT_EXTERNAL_SKILLS_CONFIG, DEFAULT_SKILLS_CONFIG, resolveExternalSkillsConfig, DEFAULT_PR_REVIEW_RESILIENCE_CONFIG, PrReviewResilienceConfigSchema, ReviewRoutingConfigSchema, DEFAULT_REVIEW_ROUTING_CONFIG, LaneLivenessWatchdogConfigSchema, DispatchProtectionConfigSchema, DashboardConfigSchema, DEFAULT_PR_REVIEW_LEGACY_TRANSCRIPT_COMPATIBILITY, PluginConfigSchema, init_schema };
@@ -11,7 +11,7 @@ import {
11
11
  readLinkPointer,
12
12
  resolveKnowledgeStoreDir,
13
13
  resolveLinkDir
14
- } from "./index-12ewkms0.js";
14
+ } from "./index-23mdeh2a.js";
15
15
 
16
16
  // src/knowledge/curation-policy.ts
17
17
  import { readFile as readFile2 } from "fs/promises";
@@ -11,7 +11,7 @@ import {
11
11
  assertProjectRoot,
12
12
  atomicWriteFile,
13
13
  withEvidenceLock
14
- } from "./index-ea9fk6v0.js";
14
+ } from "./index-ap6hs8fj.js";
15
15
  import {
16
16
  exports_external,
17
17
  init_zod
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  _internals,
4
4
  resolveWorktreeIsolationConfig
5
- } from "./index-rw0wy2y7.js";
5
+ } from "./index-vgjmahnd.js";
6
6
  import {
7
7
  ApprovalEvidenceSchema,
8
8
  BaseEvidenceSchema,
@@ -46,7 +46,7 @@ import {
46
46
  loadPluginConfigWithMeta,
47
47
  loadPluginConfigWithMetaAsync,
48
48
  resetConfigAdvisoryDedup
49
- } from "./index-basp4sxt.js";
49
+ } from "./index-hcaspktr.js";
50
50
  import"./index-zxdawwc7.js";
51
51
  import {
52
52
  AUTO_REVIEW_V8_BURN_IN_DECISION,
@@ -72,7 +72,7 @@ import {
72
72
  TurboConfigSchema,
73
73
  WorktreeIsolationConfigSchema,
74
74
  resolveAutoReviewConfig
75
- } from "./index-g9ax7jyf.js";
75
+ } from "./index-rchygh27.js";
76
76
  import {
77
77
  ALL_AGENT_NAMES,
78
78
  ALL_SUBAGENT_NAMES,
@@ -82,7 +82,7 @@ import {
82
82
  QA_AGENTS,
83
83
  isQAAgent,
84
84
  isSubagent
85
- } from "./index-y4zjbrqs.js";
85
+ } from "./index-2t21pv2v.js";
86
86
  import"./index-bk5tah7q.js";
87
87
  import"./index-gknz3bv1.js";
88
88
  import"./index-zpsr8rpc.js";
@@ -2,20 +2,20 @@
2
2
  import {
3
3
  derivePlanId,
4
4
  derivePlanIdentityHash
5
- } from "./index-vmthakz0.js";
5
+ } from "./index-w1ydvzef.js";
6
6
  import {
7
7
  getProjectDb,
8
8
  projectDbExists,
9
9
  withImmediateTransaction,
10
10
  withProjectDbReadOnly
11
- } from "./index-bv4b8tpa.js";
11
+ } from "./index-vvgpgcyn.js";
12
12
  import {
13
13
  assertProjectRoot,
14
14
  withEvidenceLock
15
- } from "./index-ea9fk6v0.js";
15
+ } from "./index-ap6hs8fj.js";
16
16
  import {
17
17
  emit
18
- } from "./index-6mwha20t.js";
18
+ } from "./index-mkpdcbye.js";
19
19
  import {
20
20
  ExecutionProfileSchema,
21
21
  PlanSchema,
@@ -25,11 +25,11 @@ import {
25
25
  import {
26
26
  init_loader,
27
27
  loadPluginConfig
28
- } from "./index-basp4sxt.js";
28
+ } from "./index-hcaspktr.js";
29
29
  import {
30
30
  init_package,
31
31
  package_default
32
- } from "./index-g9ax7jyf.js";
32
+ } from "./index-rchygh27.js";
33
33
  import {
34
34
  criticalWarn,
35
35
  init_logger,
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  derivePlanId,
4
4
  derivePlanIdentityHash
5
- } from "./index-vmthakz0.js";
5
+ } from "./index-w1ydvzef.js";
6
6
  import {
7
7
  DURABILITY_CLASSES,
8
8
  getProjectDb,
9
9
  projectDbExists,
10
10
  withImmediateTransaction
11
- } from "./index-bv4b8tpa.js";
11
+ } from "./index-vvgpgcyn.js";
12
12
  import {
13
13
  init_logger,
14
14
  warn
@@ -2,14 +2,14 @@
2
2
  import {
3
3
  init_loader,
4
4
  loadPluginConfigWithMeta
5
- } from "./index-basp4sxt.js";
5
+ } from "./index-hcaspktr.js";
6
6
  import {
7
7
  init_schema
8
- } from "./index-g9ax7jyf.js";
8
+ } from "./index-rchygh27.js";
9
9
  import {
10
10
  DEFAULT_WORKTREE_ISOLATION_CONFIG,
11
11
  init_constants
12
- } from "./index-y4zjbrqs.js";
12
+ } from "./index-2t21pv2v.js";
13
13
 
14
14
  // src/config/index.ts
15
15
  init_constants();
@@ -493,6 +493,15 @@ var MIGRATIONS = [
493
493
  name: "create_observability_event_line_hash_index",
494
494
  sql: `CREATE INDEX IF NOT EXISTS idx_obs_event_line_hash
495
495
  ON observability_event(line_hash)`
496
+ },
497
+ {
498
+ version: 40,
499
+ name: "create_qa_gate_session_override",
500
+ sql: `CREATE TABLE IF NOT EXISTS qa_gate_session_override (
501
+ session_id TEXT PRIMARY KEY,
502
+ gates TEXT NOT NULL,
503
+ updated_at TEXT NOT NULL
504
+ )`
496
505
  }
497
506
  ];
498
507
  var _projectDbs = new Map;
@@ -808,6 +817,7 @@ var _internals = {
808
817
  var DURABILITY_CLASSES = {
809
818
  qa_gate_profile: "full",
810
819
  qa_gate_profile_identity: "full",
820
+ qa_gate_session_override: "full",
811
821
  task_checkpoint_receipt: "full",
812
822
  coordination_event: "full",
813
823
  coordination_state: "full",
@@ -4,7 +4,7 @@ import {
4
4
  getProjectDb,
5
5
  projectDbExists,
6
6
  withImmediateTransaction
7
- } from "./index-bv4b8tpa.js";
7
+ } from "./index-vvgpgcyn.js";
8
8
 
9
9
  // src/db/coordination-store.ts
10
10
  import { createHash } from "crypto";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  authorizeCuration
4
- } from "./index-6gcxgx84.js";
4
+ } from "./index-s34y6gbh.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-yhx94xpr.js";
12
+ } from "./index-7s6ct0t2.js";
13
13
  import {
14
14
  resolveKnowledgeStoreDir
15
- } from "./index-12ewkms0.js";
15
+ } from "./index-23mdeh2a.js";
16
16
  import {
17
17
  atomicWriteFile
18
- } from "./index-ea9fk6v0.js";
18
+ } from "./index-ap6hs8fj.js";
19
19
  import {
20
20
  require_proper_lockfile
21
21
  } from "./index-7g4c7s5r.js";
@@ -1,23 +1,23 @@
1
1
  // @bun
2
2
  import {
3
3
  validateSwarmPath
4
- } from "./index-gc6h1fmf.js";
4
+ } from "./index-a2hvmc3a.js";
5
5
  import {
6
6
  observeReceiptTransition
7
- } from "./index-516j9vsk.js";
7
+ } from "./index-kkrbybgt.js";
8
8
  import {
9
9
  resolveHiveEventsPath
10
10
  } from "./index-ae75rja9.js";
11
11
  import {
12
12
  resolveKnowledgeStoreDir
13
- } from "./index-12ewkms0.js";
13
+ } from "./index-23mdeh2a.js";
14
14
  import {
15
15
  assertProjectRoot,
16
16
  atomicWriteFile
17
- } from "./index-ea9fk6v0.js";
17
+ } from "./index-ap6hs8fj.js";
18
18
  import {
19
19
  emit
20
- } from "./index-6mwha20t.js";
20
+ } from "./index-mkpdcbye.js";
21
21
  import {
22
22
  canonicalRootKey
23
23
  } from "./index-1xnse449.js";
@@ -26,11 +26,11 @@ import {
26
26
  } from "./index-7g4c7s5r.js";
27
27
  import {
28
28
  loadPluginConfigWithMeta
29
- } from "./index-basp4sxt.js";
29
+ } from "./index-hcaspktr.js";
30
30
  import {
31
31
  KnowledgeConfigSchema,
32
32
  init_schema
33
- } from "./index-g9ax7jyf.js";
33
+ } from "./index-rchygh27.js";
34
34
  import {
35
35
  init_logger,
36
36
  warn
@@ -878,6 +878,13 @@ function legacyExposureKind(event) {
878
878
  return "manual_recall";
879
879
  return "legacy_unknown";
880
880
  }
881
+ function normalizeExposureKind(value) {
882
+ if (isReceiptExposureKind(value))
883
+ return value;
884
+ if (value === "delegate")
885
+ return "delegate_directive";
886
+ return "legacy_unknown";
887
+ }
881
888
  function parseEmptyTrace(value, requireSummaryKind = false) {
882
889
  if (!isPlainRecord(value))
883
890
  return null;
@@ -1782,6 +1789,130 @@ async function runLocked(directory, graceDays, action, options = {}) {
1782
1789
  return unavailable(error);
1783
1790
  }
1784
1791
  }
1792
+ async function clearRepairUncertaintyIfFresh(paths, state, input, clearedBy) {
1793
+ if (!input.phase)
1794
+ return;
1795
+ const key = repairUncertaintyKey(input.phase, input.session_id);
1796
+ const active = state.repairUncertainties.get(key);
1797
+ if (!active)
1798
+ return;
1799
+ const proof = input.repair_re_evaluation;
1800
+ if (!proof?.scope_complete || proof.repair_id !== active.repair_id || active.task_id !== undefined && input.task_id !== active.task_id) {
1801
+ return;
1802
+ }
1803
+ await appendRecord(paths, state, makeRecord(state, "repair_uncertainty_cleared", {
1804
+ phase: input.phase,
1805
+ session_id: input.session_id,
1806
+ task_id: input.task_id,
1807
+ repair_id: active.repair_id,
1808
+ cleared_by_event_id: clearedBy.event_id,
1809
+ cleared_by_trace_id: clearedBy.trace_id,
1810
+ cleared_by_kind: clearedBy.kind
1811
+ }));
1812
+ }
1813
+ async function commitDisplayedMembership(directory, input) {
1814
+ return runLocked(directory, input.grace_days, async (paths, state, graceDays) => {
1815
+ if (!input.trace_id || !input.session_id || input.entries.length === 0)
1816
+ throw new ReceiptStoreError("store_unavailable", "invalid displayed membership");
1817
+ const eventId = randomUUID2();
1818
+ const committedAt = nowIso();
1819
+ const exposureKind = normalizeExposureKind(input.exposure_kind);
1820
+ const memberships = [];
1821
+ const newMemberships = [];
1822
+ for (const entry of input.entries) {
1823
+ const existing = state.memberships.get(keyOf(input.trace_id, entry.entry_id));
1824
+ if (existing) {
1825
+ if (existing.session_id !== input.session_id || existing.phase !== input.phase || existing.task_id !== input.task_id || existing.critical !== entry.critical || existing.cohort_id !== input.cohort_id || existing.source_link_id !== input.source_link_id || existing.exposure_kind !== exposureKind) {
1826
+ throw new ReceiptStoreError("store_unavailable", `conflicting immutable membership for ${input.trace_id}/${entry.entry_id}`);
1827
+ }
1828
+ memberships.push({
1829
+ ...existing,
1830
+ terminal: existing.terminal ? { ...existing.terminal } : undefined
1831
+ });
1832
+ continue;
1833
+ }
1834
+ const closedLifecycle = state.phaseLifecycle.get(phaseLifecycleKey(input.phase ?? "", input.session_id, input.task_id)) ?? (input.task_id !== undefined ? state.phaseLifecycle.get(phaseLifecycleKey(input.phase ?? "", input.session_id)) : undefined);
1835
+ if (input.phase && closedLifecycle?.closed_event_id) {
1836
+ throw new ReceiptStoreError("store_unavailable", `cannot add receipt membership to closed lifecycle ${input.session_id}/${input.phase}`);
1837
+ }
1838
+ const membership = {
1839
+ trace_id: input.trace_id,
1840
+ entry_id: entry.entry_id,
1841
+ session_id: input.session_id,
1842
+ phase: input.phase,
1843
+ task_id: input.task_id,
1844
+ agent: input.agent,
1845
+ critical: entry.critical,
1846
+ rank: entry.rank,
1847
+ score: entry.score,
1848
+ committed_at: committedAt,
1849
+ membership_event_id: eventId,
1850
+ grace_days: graceDays,
1851
+ cohort_id: input.cohort_id,
1852
+ source_link_id: input.source_link_id,
1853
+ exposure_kind: exposureKind,
1854
+ origin: "v2"
1855
+ };
1856
+ memberships.push(membership);
1857
+ newMemberships.push(membership);
1858
+ }
1859
+ if (newMemberships.length) {
1860
+ await appendRecord(paths, state, makeRecord(state, "membership_committed", { memberships: newMemberships }, eventId));
1861
+ await clearRepairUncertaintyIfFresh(paths, state, input, {
1862
+ event_id: eventId,
1863
+ trace_id: input.trace_id,
1864
+ kind: "membership_committed"
1865
+ });
1866
+ }
1867
+ return {
1868
+ event_id: newMemberships.length ? eventId : memberships[0].membership_event_id,
1869
+ memberships
1870
+ };
1871
+ });
1872
+ }
1873
+ async function commitEmptyRetrieval(directory, input) {
1874
+ return runLocked(directory, input.grace_days, async (paths, state, graceDays) => {
1875
+ const existing = state.emptyTraces.get(emptyKeyOf(input.trace_id, input.session_id));
1876
+ if (existing) {
1877
+ if (existing.phase !== input.phase || existing.task_id !== input.task_id || existing.grace_days !== graceDays) {
1878
+ throw new ReceiptStoreError("store_unavailable", `conflicting immutable empty retrieval for ${input.trace_id}/${input.session_id}`);
1879
+ }
1880
+ if (!existing.terminal_event_id) {
1881
+ const terminal = makeRecord(state, "terminal_committed", {
1882
+ empty_trace_id: input.trace_id,
1883
+ empty_trace_session_id: input.session_id
1884
+ });
1885
+ await appendRecord(paths, state, terminal);
1886
+ }
1887
+ return {
1888
+ event_id: existing.empty_event_id,
1889
+ terminal_event_id: existing.terminal_event_id
1890
+ };
1891
+ }
1892
+ const eventId = randomUUID2();
1893
+ const terminalEventId = randomUUID2();
1894
+ const trace = {
1895
+ trace_id: input.trace_id,
1896
+ session_id: input.session_id,
1897
+ phase: input.phase,
1898
+ task_id: input.task_id,
1899
+ committed_at: nowIso(),
1900
+ empty_event_id: eventId,
1901
+ grace_days: graceDays
1902
+ };
1903
+ await appendRecord(paths, state, makeRecord(state, "empty_retrieval_committed", { trace }, eventId));
1904
+ await appendRecord(paths, state, makeRecord(state, "terminal_committed", {
1905
+ empty_trace_id: input.trace_id,
1906
+ empty_trace_session_id: input.session_id
1907
+ }, terminalEventId));
1908
+ await clearRepairUncertaintyIfFresh(paths, state, input, {
1909
+ event_id: eventId,
1910
+ trace_id: input.trace_id,
1911
+ kind: "empty_retrieval_committed"
1912
+ });
1913
+ return { event_id: eventId, terminal_event_id: terminalEventId };
1914
+ });
1915
+ }
1785
1916
  async function commitApplicationMarkerBatch(directory, input) {
1786
1917
  return runLocked(directory, undefined, async (paths, state) => {
1787
1918
  const items = input.items ?? input.markers ?? [];
@@ -2813,7 +2944,7 @@ async function applyKnowledgeVerdictFeedback(directory, options) {
2813
2944
  }
2814
2945
  let bumps = 0;
2815
2946
  if (deltas.length > 0) {
2816
- const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-mybx9bmx.js");
2947
+ const { bumpKnowledgeConfidenceBatch } = await import("./knowledge-store-asa26g6p.js");
2817
2948
  bumps = await bumpKnowledgeConfidenceBatch(directory, deltas, options?.floorOptions);
2818
2949
  }
2819
2950
  return {
@@ -2850,4 +2981,4 @@ var _internals4 = {
2850
2981
  mergeRollupInto
2851
2982
  };
2852
2983
 
2853
- export { commitGateReleaseBatch, queryLiveMemberships, queryHistoricalOutcomes, recordPhaseCloseIntent, reconcilePhaseClose, KNOWLEDGE_EVENT_SCHEMA_VERSION, MAX_EVENT_LOG_ENTRIES, RECEIPT_EVENT_TYPES, resolveKnowledgeEventsPath, resolveKnowledgeCounterBaselinePath, resolveHiveEventsPath2 as resolveHiveEventsPath, resolveLegacyApplicationLogPath, newTraceId, newEventId, appendKnowledgeEvent, appendKnowledgeEventsBatch, recordKnowledgeEvent, recordKnowledgeEventsBatch, appendHiveKnowledgeEvent, recordHiveKnowledgeEvent, readKnowledgeEvents, readHiveKnowledgeEvents, readLegacyApplicationRecords, MAX_VIOLATION_TIMESTAMPS, recomputeCounters, countViolationsInWindow, countEmptyTraceTerminals, countEntryViolationsInWindow, countEntryContradictionsInWindow, readKnowledgeCounterRollups, readAuthoritativeKnowledgeCounterRollups, effectiveRetrievalOutcomes, applyKnowledgeVerdictFeedback, _internals4 as _internals };
2984
+ export { commitDisplayedMembership, commitEmptyRetrieval, commitGateReleaseBatch, queryLiveMemberships, queryHistoricalOutcomes, recordPhaseCloseIntent, reconcilePhaseClose, KNOWLEDGE_EVENT_SCHEMA_VERSION, MAX_EVENT_LOG_ENTRIES, RECEIPT_EVENT_TYPES, resolveKnowledgeEventsPath, resolveKnowledgeCounterBaselinePath, resolveHiveEventsPath2 as resolveHiveEventsPath, resolveLegacyApplicationLogPath, newTraceId, newEventId, appendKnowledgeEvent, appendKnowledgeEventsBatch, recordKnowledgeEvent, recordKnowledgeEventsBatch, appendHiveKnowledgeEvent, recordHiveKnowledgeEvent, readKnowledgeEvents, readHiveKnowledgeEvents, readLegacyApplicationRecords, MAX_VIOLATION_TIMESTAMPS, recomputeCounters, countViolationsInWindow, countEmptyTraceTerminals, countEntryViolationsInWindow, countEntryContradictionsInWindow, readKnowledgeCounterRollups, readAuthoritativeKnowledgeCounterRollups, effectiveRetrievalOutcomes, applyKnowledgeVerdictFeedback, _internals4 as _internals };
@@ -5,18 +5,18 @@ import {
5
5
  import {
6
6
  effectiveRetrievalOutcomes,
7
7
  readAuthoritativeKnowledgeCounterRollups
8
- } from "./index-g5wjasjn.js";
8
+ } from "./index-yv0q0hp9.js";
9
9
  import {
10
10
  ALLOWED_SKILL_PATH_PREFIXES,
11
11
  validateSkillPath
12
- } from "./index-gqe4sm73.js";
12
+ } from "./index-xqr076aq.js";
13
13
  import {
14
14
  computeOutcomeSignal,
15
15
  readKnowledge,
16
16
  resolveHiveKnowledgePath,
17
17
  resolveSwarmKnowledgePath,
18
18
  transactKnowledge
19
- } from "./index-yhx94xpr.js";
19
+ } from "./index-7s6ct0t2.js";
20
20
  import {
21
21
  appendCappedJsonl,
22
22
  resolveRetentionCap