@tangle-network/agent-runtime 0.349.0 → 0.352.1

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 (139) hide show
  1. package/dist/{activation-wBipBkCf.d.ts → activation-BidzGkUQ.d.ts} +2 -24
  2. package/dist/{activation-tNGW73Y9.js → activation-C6zNC2kx.js} +12 -14
  3. package/dist/{activation-tNGW73Y9.js.map → activation-C6zNC2kx.js.map} +1 -1
  4. package/dist/agent.d.ts +8 -12
  5. package/dist/agent.js +9 -12
  6. package/dist/agent.js.map +1 -1
  7. package/dist/{analyst-loop-DZw5QWT9.js → analyst-loop-BZvXCDKy.js} +2 -3
  8. package/dist/{analyst-loop-DZw5QWT9.js.map → analyst-loop-BZvXCDKy.js.map} +1 -1
  9. package/dist/analyst-loop.d.ts +3 -5
  10. package/dist/analyst-loop.js +1 -2
  11. package/dist/{bundle-1xaJEgjq.js → bundle-DeDkJbsr.js} +3 -4
  12. package/dist/{bundle-1xaJEgjq.js.map → bundle-DeDkJbsr.js.map} +1 -1
  13. package/dist/candidate-execution/index.d.ts +13 -33
  14. package/dist/candidate-execution/index.js +16 -18
  15. package/dist/candidate-execution/index.js.map +1 -1
  16. package/dist/chat-turn.d.ts +2 -0
  17. package/dist/chat-turn.js +1 -0
  18. package/dist/{coordination-manager-B2Z_MmL9.js → coordination-manager-B7QadgrI.js} +101 -132
  19. package/dist/{coordination-manager-B2Z_MmL9.js.map → coordination-manager-B7QadgrI.js.map} +1 -1
  20. package/dist/{delegate-Dr-63jFl.js → delegate-CoscoyEo.js} +19 -21
  21. package/dist/delegate-CoscoyEo.js.map +1 -0
  22. package/dist/durable.d.ts +16 -149
  23. package/dist/durable.js +57 -980
  24. package/dist/durable.js.map +1 -1
  25. package/dist/{errors-DodWX-cb.js → errors-AzSuGI23.js} +5 -3
  26. package/dist/errors-AzSuGI23.js.map +1 -0
  27. package/dist/execution-handle-Bd2_nUB6.js +167 -0
  28. package/dist/execution-handle-Bd2_nUB6.js.map +1 -0
  29. package/dist/execution-handle-CujvqgCn.d.ts +130 -0
  30. package/dist/{graph-DPejYB3C.js → graph-mojMML8e.js} +192 -14
  31. package/dist/graph-mojMML8e.js.map +1 -0
  32. package/dist/{improve-DwSahPi1.js → improve-Dm5ZE8mr.js} +36 -53
  33. package/dist/{improve-DwSahPi1.js.map → improve-Dm5ZE8mr.js.map} +1 -1
  34. package/dist/{improvement-adapter-sIthWkcN.d.ts → improvement-adapter-D5GRU1eY.d.ts} +2 -6
  35. package/dist/index.d.ts +41 -89
  36. package/dist/index.js +45 -61
  37. package/dist/index.js.map +1 -1
  38. package/dist/intelligence.d.ts +39 -59
  39. package/dist/intelligence.js +24 -33
  40. package/dist/intelligence.js.map +1 -1
  41. package/dist/journal-store-BJPMUydp.js +3925 -0
  42. package/dist/journal-store-BJPMUydp.js.map +1 -0
  43. package/dist/kernel.d.ts +5 -5
  44. package/dist/kernel.js +12 -11
  45. package/dist/{loop-runner-CP6MfO1b.js → loop-runner-5cL_vZi0.js} +5 -6
  46. package/dist/{loop-runner-CP6MfO1b.js.map → loop-runner-5cL_vZi0.js.map} +1 -1
  47. package/dist/{loop-runner-C6pGq-2l.d.ts → loop-runner-DyLD-aNb.d.ts} +3 -5
  48. package/dist/loop-runner-bin.d.ts +5 -8
  49. package/dist/loop-runner-bin.js +2 -3
  50. package/dist/mcp/bin.js +6 -8
  51. package/dist/mcp/bin.js.map +1 -1
  52. package/dist/mcp/index.d.ts +8 -18
  53. package/dist/mcp/index.js +17 -25
  54. package/dist/mcp/index.js.map +1 -1
  55. package/dist/mcp/memory-bin.js +4 -6
  56. package/dist/mcp/memory-bin.js.map +1 -1
  57. package/dist/{model-policy-CyCUwHed.js → model-policy-C-RGAUW4.js} +11 -13
  58. package/dist/{model-policy-CyCUwHed.js.map → model-policy-C-RGAUW4.js.map} +1 -1
  59. package/dist/placement.d.ts +12 -14
  60. package/dist/placement.js +1 -2
  61. package/dist/platform.d.ts +7 -13
  62. package/dist/platform.js +3 -6
  63. package/dist/platform.js.map +1 -1
  64. package/dist/{prepare-B9wWffjO.js → prepare-XWwsOh8O.js} +50 -69
  65. package/dist/{prepare-B9wWffjO.js.map → prepare-XWwsOh8O.js.map} +1 -1
  66. package/dist/{profile-JLJd2wFG.js → profile-C01SQZKa.js} +58 -92
  67. package/dist/profile-C01SQZKa.js.map +1 -0
  68. package/dist/{profile-materialization-bPm0gGLO.d.ts → profile-materialization-BRY22Oh8.d.ts} +1 -3
  69. package/dist/profiles.d.ts +25 -12
  70. package/dist/profiles.js +52 -11
  71. package/dist/profiles.js.map +1 -1
  72. package/dist/{protected-model-port-DVVh-hEk.d.ts → protected-model-port-IKqhTypD.d.ts} +2 -14
  73. package/dist/{protected-redaction-DFCeo4vg.js → protected-redaction-DilFZch5.js} +2 -3
  74. package/dist/{protected-redaction-DFCeo4vg.js.map → protected-redaction-DilFZch5.js.map} +1 -1
  75. package/dist/{provision-supervisor-C4v2vqDo.js → provision-supervisor-D9pO-iPl.js} +11 -15
  76. package/dist/{provision-supervisor-C4v2vqDo.js.map → provision-supervisor-D9pO-iPl.js.map} +1 -1
  77. package/dist/{run-cancellation-CzFhQGMa.js → run-cancellation-CoJRKvih.js} +6 -7
  78. package/dist/{run-cancellation-CzFhQGMa.js.map → run-cancellation-CoJRKvih.js.map} +1 -1
  79. package/dist/{runtime-CsvGCQpl.js → runtime-BJPXHWbc.js} +652 -215
  80. package/dist/runtime-BJPXHWbc.js.map +1 -0
  81. package/dist/{runtime-hooks-tXpAarhW.js → runtime-hooks-CsW2pfFk.js} +2 -3
  82. package/dist/{runtime-hooks-tXpAarhW.js.map → runtime-hooks-CsW2pfFk.js.map} +1 -1
  83. package/dist/{runtime-hooks-nsqxSUFL.d.ts → runtime-hooks-ZQqPw-0g.d.ts} +1 -3
  84. package/dist/{sandbox-profile-compat-DtuJWFrM.js → sandbox-profile-compat-CXjozdWL.js} +52 -653
  85. package/dist/sandbox-profile-compat-CXjozdWL.js.map +1 -0
  86. package/dist/{search-executor-CCb82Umc.js → search-executor-CQEHMXoT.js} +12 -15
  87. package/dist/{search-executor-CCb82Umc.js.map → search-executor-CQEHMXoT.js.map} +1 -1
  88. package/dist/{server-CKPwZU-I.js → server-U9NGgudQ.js} +19 -30
  89. package/dist/{server-CKPwZU-I.js.map → server-U9NGgudQ.js.map} +1 -1
  90. package/dist/{structural-rollout-DylC_fwU.js → structural-rollout-wMSxE7bn.js} +71 -70
  91. package/dist/structural-rollout-wMSxE7bn.js.map +1 -0
  92. package/dist/{substrate-CGDFTSRh.js → substrate-Db2pp6y3.js} +2 -3
  93. package/dist/{substrate-CGDFTSRh.js.map → substrate-Db2pp6y3.js.map} +1 -1
  94. package/dist/{supervise-BGfm2GlY.js → supervise-CNNhX0ab.js} +460 -195
  95. package/dist/supervise-CNNhX0ab.js.map +1 -0
  96. package/dist/supervision-discovery-CewADdEs.js +772 -0
  97. package/dist/supervision-discovery-CewADdEs.js.map +1 -0
  98. package/dist/{supervisor-wS9Ehz_x.js → supervisor-rK5Y8en6.js} +521 -4320
  99. package/dist/supervisor-rK5Y8en6.js.map +1 -0
  100. package/dist/{task-queue-0fKkoweu.d.ts → task-queue-kefGy79U.d.ts} +1 -3
  101. package/dist/task-queue.d.ts +1 -1
  102. package/dist/task-queue.js +1 -2
  103. package/dist/testing.d.ts +7 -15
  104. package/dist/testing.js +241 -244
  105. package/dist/testing.js.map +1 -1
  106. package/dist/tool-loop.d.ts +16 -19
  107. package/dist/tool-loop.js +2 -3
  108. package/dist/{tool-server-XV4aJwoQ.js → tool-server-CZWd_Opp.js} +3 -4
  109. package/dist/{tool-server-XV4aJwoQ.js.map → tool-server-CZWd_Opp.js.map} +1 -1
  110. package/dist/{top-snapshot-CflmaDgk.js → top-snapshot-DcV7VG4m.js} +179 -163
  111. package/dist/top-snapshot-DcV7VG4m.js.map +1 -0
  112. package/dist/tui/bin.js +50 -81
  113. package/dist/tui/bin.js.map +1 -1
  114. package/dist/tui/index.d.ts +27 -58
  115. package/dist/tui/index.js +2 -2
  116. package/dist/{types-C8BGOCBn.d.ts → types-0uzVKtFW.d.ts} +388 -484
  117. package/dist/{types-Cwrea-bU.d.ts → types-qsqfyQoY.d.ts} +1 -3
  118. package/dist/util-ebWMWzY0.js +624 -0
  119. package/dist/util-ebWMWzY0.js.map +1 -0
  120. package/dist/workspace-store/index.d.ts +12 -22
  121. package/dist/workspace-store/index.js +13 -10
  122. package/dist/workspace-store/index.js.map +1 -1
  123. package/dist/{workspace-streams-BiS4ABah.d.ts → workspace-streams-Dq2Fzk3c.d.ts} +1 -11
  124. package/package.json +31 -26
  125. package/skills/agent-graphs/SKILL.md +17 -4
  126. package/skills/be-ambitious/SKILL.md +46 -0
  127. package/skills/graph-designer/SKILL.md +9 -2
  128. package/dist/delegate-Dr-63jFl.js.map +0 -1
  129. package/dist/errors-DodWX-cb.js.map +0 -1
  130. package/dist/graph-DPejYB3C.js.map +0 -1
  131. package/dist/profile-JLJd2wFG.js.map +0 -1
  132. package/dist/record-events-D93DkpAx.js +0 -263
  133. package/dist/record-events-D93DkpAx.js.map +0 -1
  134. package/dist/runtime-CsvGCQpl.js.map +0 -1
  135. package/dist/sandbox-profile-compat-DtuJWFrM.js.map +0 -1
  136. package/dist/structural-rollout-DylC_fwU.js.map +0 -1
  137. package/dist/supervise-BGfm2GlY.js.map +0 -1
  138. package/dist/supervisor-wS9Ehz_x.js.map +0 -1
  139. package/dist/top-snapshot-CflmaDgk.js.map +0 -1
@@ -1,15 +1,14 @@
1
- import { Em as AgentEnvironmentProviderRegistry, G_ as OtelExportStats, S as RuntimeStreamEvent, Tm as AgentEnvironmentProviderRef, gS as LoopTraceEvent, gb as defaultRedactor, hb as Redactor, rv as RuntimeTelemetryOptions } from "./types-C8BGOCBn.js";
2
- import { H as AgentCandidateTaskExecution, N as AgentCandidateOutputArtifactPort, S as AgentCandidateExecutorPort, _ as AgentCandidateBenchmarkGraderPort, y as AgentCandidateExecutionPorts } from "./workspace-streams-BiS4ABah.js";
3
- import { d as RunAnalystLoopResult, u as RunAnalystLoopOpts } from "./types-Cwrea-bU.js";
4
- import { b as AgentCandidateExecutionClaimStore, f as PrepareAgentCandidateExecutionOptions, i as CreateProtectedAgentCandidateModelPortOptions, m as ExecutePreparedAgentCandidateOptions, u as parseAgentCandidateProfileActivation } from "./protected-model-port-DVVh-hEk.js";
5
- import { A as AgentProfileMeasuredSurface, C as verifyAgentImprovementProposal, D as AgentImprovementActivationTargetIdentity, E as AGENT_PROFILE_MEASURED_SURFACES, F as isAgentImprovementProfileSurface, I as isAgentProfileMeasuredSurface, M as agentImprovementProfileSurfaceDigest, N as agentImprovementProfileSurfaceInput, O as AgentImprovementProfileSurface, P as agentImprovementTargetProfileDiffs, S as verifyAgentImprovementActivationResult, T as AGENT_IMPROVEMENT_PROFILE_SURFACES, _ as createAgentImprovementActivationResult, _t as ImproveResult, a as AgentImprovementActivationTransitionInput, b as reviewAgentImprovementProposal, c as CreateAgentImprovementActivationOptions, d as ExecuteAgentImprovementActivationInput, f as ExecuteAgentImprovementActivationOptions, g as createAgentImprovementActivation, h as SealedCandidateActivationTransitionInput, j as agentImprovementProfileDiffs, k as AgentImprovementTargetProfileDiffOptions, l as CreateAgentImprovementActivationResultOptions, lt as ImproveMethodOptions, m as ReviewAgentImprovementInput, o as AgentProfileImprovementActivationOperation, p as ProfileImprovementActivationTransitionInput, pt as ImproveOptions, r as AgentImprovementActivationTargetPlan, s as AgentProfileImprovementActivationTargetPlan, u as CreateAgentImprovementProposalOptions, ut as ImproveMethodResult, v as createAgentImprovementProposal, w as verifyAgentImprovementReview, x as verifyAgentImprovementActivation, y as executeAgentImprovementActivation, yt as ImproveScenarioPartitions } from "./activation-wBipBkCf.js";
1
+ import { FS as LoopTraceEvent, Fb as defaultRedactor, Pb as Redactor, S as RuntimeStreamEvent, Sv as RuntimeTelemetryOptions, Um as AgentEnvironmentProviderRef, Wm as AgentEnvironmentProviderRegistry, uv as OtelExportStats } from "./types-0uzVKtFW.js";
2
+ import { H as AgentCandidateTaskExecution, N as AgentCandidateOutputArtifactPort, S as AgentCandidateExecutorPort, _ as AgentCandidateBenchmarkGraderPort, y as AgentCandidateExecutionPorts } from "./workspace-streams-Dq2Fzk3c.js";
3
+ import { d as RunAnalystLoopResult, u as RunAnalystLoopOpts } from "./types-qsqfyQoY.js";
4
+ import { b as AgentCandidateExecutionClaimStore, f as PrepareAgentCandidateExecutionOptions, i as CreateProtectedAgentCandidateModelPortOptions, m as ExecutePreparedAgentCandidateOptions, u as parseAgentCandidateProfileActivation } from "./protected-model-port-IKqhTypD.js";
5
+ import { A as AgentProfileMeasuredSurface, C as verifyAgentImprovementProposal, D as AgentImprovementActivationTargetIdentity, E as AGENT_PROFILE_MEASURED_SURFACES, F as isAgentImprovementProfileSurface, I as isAgentProfileMeasuredSurface, M as agentImprovementProfileSurfaceDigest, N as agentImprovementProfileSurfaceInput, O as AgentImprovementProfileSurface, P as agentImprovementTargetProfileDiffs, S as verifyAgentImprovementActivationResult, T as AGENT_IMPROVEMENT_PROFILE_SURFACES, _ as createAgentImprovementActivationResult, _t as ImproveResult, a as AgentImprovementActivationTransitionInput, b as reviewAgentImprovementProposal, c as CreateAgentImprovementActivationOptions, d as ExecuteAgentImprovementActivationInput, f as ExecuteAgentImprovementActivationOptions, g as createAgentImprovementActivation, h as SealedCandidateActivationTransitionInput, j as agentImprovementProfileDiffs, k as AgentImprovementTargetProfileDiffOptions, l as CreateAgentImprovementActivationResultOptions, lt as ImproveMethodOptions, m as ReviewAgentImprovementInput, o as AgentProfileImprovementActivationOperation, p as ProfileImprovementActivationTransitionInput, pt as ImproveOptions, r as AgentImprovementActivationTargetPlan, s as AgentProfileImprovementActivationTargetPlan, u as CreateAgentImprovementProposalOptions, ut as ImproveMethodResult, v as createAgentImprovementProposal, w as verifyAgentImprovementReview, x as verifyAgentImprovementActivation, y as executeAgentImprovementActivation, yt as ImproveScenarioPartitions } from "./activation-BidzGkUQ.js";
6
6
  import { AgentCandidateBenchmarkCellRef, AgentCandidateEvaluationPolicy, AgentCandidateExperiment, AgentCandidateExperimentMaterial, AgentCandidateExperimentMeasurement, AgentCandidateLineage, AgentImprovementActivation, AgentImprovementActivationIntent, AgentImprovementActivationOutcome, AgentImprovementActivationResult, AgentImprovementActivationTargetState, AgentImprovementActivationTargetTransition, AgentImprovementEvaluation, AgentImprovementMeasuredComparison, AgentImprovementProposal, AgentImprovementProposal as AgentImprovementProposal$1, AgentImprovementReview, AgentImprovementReviewDecision, AgentImprovementSource, AgentProfile, AgentProfileDiff, AgentProfileImprovementExecutionRef, AgentProfileImprovementExperiment, AgentProfileImprovementMeasuredComparison, AgentProfileImprovementMeasurement, AgentProfileImprovementRunReceipt, AgentProfileImprovementTaskMaterial, CandidateExecutionEvidence, CandidateExecutionEvidence as CandidateExecutionEvidence$1, Sha256Digest } from "@tangle-network/agent-interface";
7
7
  import { CostLedgerHandle, TraceStore } from "@tangle-network/agent-eval";
8
8
  import { ProposalFinding as ProposalFinding$1 } from "@tangle-network/agent-eval/analyst";
9
9
  import { CampaignScenarioIdentity, OptimizationMethodComparison, OptimizationPackageSource, OptimizationTokenUsage } from "@tangle-network/agent-eval/campaign";
10
10
  import { AgentProfileImprovementExperimentExecutionInput, CandidateExperimentExecutionInput, CompareCandidateExperimentOptions, Scenario as Scenario$1 } from "@tangle-network/agent-eval/contract";
11
11
  import { AgentExactProcessResources } from "@tangle-network/agent-interface/environment-provider";
12
- //#region src/intelligence/effort.d.ts
13
12
  /**
14
13
  *
15
14
  * EffortPolicy — pure data, no execution. Resolves a named tier into a flat
@@ -69,7 +68,7 @@ type EffortOverrides = Partial<EffortSettings>;
69
68
  * caller explicitly overrides a field — overriding off is an opt-in the caller
70
69
  * owns, not a default the composer leaks.
71
70
  */
72
- declare function resolveEffort(tier: EffortTier, overrides?: EffortOverrides): EffortSettings;
71
+ export declare function resolveEffort(tier: EffortTier, overrides?: EffortOverrides): EffortSettings;
73
72
  /**
74
73
  * True when these settings admit NO intelligence spawn — the passthrough
75
74
  * predicate the wrapper branches on. Every intelligence axis must be off:
@@ -77,7 +76,7 @@ declare function resolveEffort(tier: EffortTier, overrides?: EffortOverrides): E
77
76
  * budget. A caller who overrides any one of these back on is no longer at the
78
77
  * OFF floor and the wrapper treats them as an intelligence-enabled run.
79
78
  */
80
- declare function isIntelligenceOff(settings: EffortSettings): boolean;
79
+ export declare function isIntelligenceOff(settings: EffortSettings): boolean;
81
80
  /**
82
81
  * The run-config overrides an `EffortSettings` compiles to — the bridge between the
83
82
  * pure effort policy and the orchestration entrypoints (`runPersonified` / the
@@ -117,9 +116,7 @@ interface EffortOverridesCompiled {
117
116
  * (no breadth) at `off`; `withLoops: false` no-ops the improvement cycle. `standard`+
118
117
  * compile to `withAnalyst: true`, the tier's `fanout`, and `withLoops: true`.
119
118
  */
120
- declare function compileEffort(settings: EffortSettings): EffortOverridesCompiled;
121
- //#endregion
122
- //#region src/intelligence/profile-activation.d.ts
119
+ export declare function compileEffort(settings: EffortSettings): EffortOverridesCompiled;
123
120
  type AgentImprovementProfileActivationTarget = Omit<AgentImprovementActivationTargetPlan, 'surface'> & {
124
121
  surface: AgentImprovementProfileSurface;
125
122
  };
@@ -175,9 +172,7 @@ type AgentImprovementProfileActivationPreparation = {
175
172
  * all-or-none replacements. The product owns locking, persistence, and retained
176
173
  * state; Runtime owns the profile diff semantics and digest checks.
177
174
  */
178
- declare function prepareAgentImprovementProfileActivation(input: AgentImprovementProfileActivationInput): AgentImprovementProfileActivationPreparation;
179
- //#endregion
180
- //#region src/intelligence/improvement-cycle.d.ts
175
+ export declare function prepareAgentImprovementProfileActivation(input: AgentImprovementProfileActivationInput): AgentImprovementProfileActivationPreparation;
181
176
  interface AgentCandidateExperimentCellPlacement {
182
177
  executionId: string;
183
178
  attempt?: number;
@@ -298,20 +293,18 @@ interface ProposeAgentProfileImprovementResult {
298
293
  proposal: AgentImprovementProposal$1;
299
294
  }
300
295
  /** Execute both arms of one immutable experiment and derive its paired result. */
301
- declare function runAgentCandidateExperiment(options: RunAgentCandidateExperimentOptions): Promise<RunAgentCandidateExperimentResult>;
296
+ export declare function runAgentCandidateExperiment(options: RunAgentCandidateExperimentOptions): Promise<RunAgentCandidateExperimentResult>;
302
297
  /** Execute one exact arm, task, repetition, seed, and attempt through Runtime. */
303
- declare function executeAgentCandidateExperimentCell(options: ExecuteAgentCandidateExperimentCellOptions): Promise<CandidateExecutionEvidence$1>;
298
+ export declare function executeAgentCandidateExperimentCell(options: ExecuteAgentCandidateExperimentCellOptions): Promise<CandidateExecutionEvidence$1>;
304
299
  /**
305
300
  * Analyze a product-owned profile, search one profile surface, then run the
306
301
  * exact baseline and candidate through the product executor before proposing.
307
302
  */
308
- declare function proposeAgentProfileImprovement<TScenario extends Scenario$1, TArtifact>(options: ProposeAgentProfileImprovementOptions<TScenario, TArtifact>): Promise<ProposeAgentProfileImprovementResult>;
303
+ export declare function proposeAgentProfileImprovement<TScenario extends Scenario$1, TArtifact>(options: ProposeAgentProfileImprovementOptions<TScenario, TArtifact>): Promise<ProposeAgentProfileImprovementResult>;
309
304
  /** Analyze, search, then remeasure the resulting exact candidate before proposing it. */
310
- declare function proposeAgentImprovement<TScenario extends Scenario$1, TArtifact>(options: ProposeAgentImprovementOptions<TScenario, TArtifact>): Promise<ProposeAgentImprovementResult<TScenario, TArtifact>>;
305
+ export declare function proposeAgentImprovement<TScenario extends Scenario$1, TArtifact>(options: ProposeAgentImprovementOptions<TScenario, TArtifact>): Promise<ProposeAgentImprovementResult<TScenario, TArtifact>>;
311
306
  /** Recheck one Runtime receipt against its exact signed experiment cell. */
312
- declare function verifyCandidateExecutionEvidence(input: unknown, options: VerifyCandidateExecutionEvidenceOptions): CandidateExecutionEvidence$1;
313
- //#endregion
314
- //#region src/intelligence/authored-profile-improvement.d.ts
307
+ export declare function verifyCandidateExecutionEvidence(input: unknown, options: VerifyCandidateExecutionEvidenceOptions): CandidateExecutionEvidence$1;
315
308
  /** Lineage accepted by the direct candidate path. Optimizer lineage belongs to `improve()`. */
316
309
  type AuthoredAgentProfileCandidateLineage = Omit<AgentCandidateLineage, 'source' | 'profileDiffIds'> & {
317
310
  source: Exclude<AgentCandidateLineage['source'], 'optimizer'>;
@@ -364,9 +357,7 @@ interface ProposeAuthoredAgentProfileImprovementResult {
364
357
  * Put a complete authored/imported profile through the canonical profile
365
358
  * experiment and proposal path without invoking `improve()`.
366
359
  */
367
- declare function proposeAuthoredAgentProfileImprovement(options: ProposeAuthoredAgentProfileImprovementOptions): Promise<ProposeAuthoredAgentProfileImprovementResult>;
368
- //#endregion
369
- //#region src/intelligence/delivery.d.ts
360
+ export declare function proposeAuthoredAgentProfileImprovement(options: ProposeAuthoredAgentProfileImprovementOptions): Promise<ProposeAuthoredAgentProfileImprovementResult>;
370
361
  /** A promoted, certified artifact (one entry in the composed profile). */
371
362
  interface CertifiedArtifact {
372
363
  path: string | null;
@@ -463,7 +454,7 @@ interface PullCertifiedOptions {
463
454
  * caller can run on its base surface when Intelligence is unreachable. A 404 is
464
455
  * the normal "nothing promoted yet" signal, carried as `status: 404`.
465
456
  */
466
- declare function pullCertified(opts: PullCertifiedOptions): Promise<PullOutcome>;
457
+ export declare function pullCertified(opts: PullCertifiedOptions): Promise<PullOutcome>;
467
458
  /**
468
459
  * Fold the certified prompt surface (and any certified prompt-folding artifacts:
469
460
  * `prompt-surface` / `skill` / `instructions`) into a base system prompt under a
@@ -473,7 +464,7 @@ declare function pullCertified(opts: PullCertifiedOptions): Promise<PullOutcome>
473
464
  * renders byte-identically each call. Returns `base` unchanged when there is no
474
465
  * usable certified content. Reads only the prompt-folding slice of a profile.
475
466
  */
476
- declare function composeCertifiedPrompt(base: string, certified: Pick<CertifiedProfile, 'promptSurface' | 'artifacts'> | null): string;
467
+ export declare function composeCertifiedPrompt(base: string, certified: Pick<CertifiedProfile, 'promptSurface' | 'artifacts'> | null): string;
477
468
  /** A cached, self-refreshing source of a target's certified prompt additions —
478
469
  * the prompt-only delivery lane for callers that assemble their OWN system
479
470
  * prompt (product chat routes) rather than wrapping an agent fn. Same
@@ -503,9 +494,7 @@ interface CertifiedPromptSourceOptions extends PullCertifiedOptions {
503
494
  * rather than hand-rolling the same lines around `pullCertified`. The
504
495
  * `withIntelligence` hook rides this same source for its prompt delivery.
505
496
  */
506
- declare function createCertifiedPromptSource(opts: CertifiedPromptSourceOptions): CertifiedPromptSource;
507
- //#endregion
508
- //#region src/intelligence/capability.d.ts
497
+ export declare function createCertifiedPromptSource(opts: CertifiedPromptSourceOptions): CertifiedPromptSource;
509
498
  /** A structural JSON Schema object describing a tool's parameters. */
510
499
  type JsonSchema = Record<string, unknown>;
511
500
  /**
@@ -694,7 +683,7 @@ interface CapabilityManifest {
694
683
  /**
695
684
  * A consumer rejected a binding that its executor does not admit.
696
685
  */
697
- declare class CapabilityNotAdmittedError extends Error {
686
+ export declare class CapabilityNotAdmittedError extends Error {
698
687
  readonly kind: DeliveryBindingKind;
699
688
  readonly capabilityId: string;
700
689
  constructor(kind: DeliveryBindingKind, capabilityId: string, reason: string);
@@ -707,11 +696,9 @@ declare class CapabilityNotAdmittedError extends Error {
707
696
  * `composeCertifiedPrompt` folds it before other prompt artifacts.
708
697
  * This delivers the spine against today's wire before the plane changes.
709
698
  */
710
- declare function manifestFromProfile(profile: CertifiedProfile): CapabilityManifest;
711
- //#endregion
712
- //#region src/intelligence/exact-process-candidate.d.ts
699
+ export declare function manifestFromProfile(profile: CertifiedProfile): CapabilityManifest;
713
700
  /** Candidate surfaces implemented by the neutral exact-process executor. */
714
- declare const exactProcessCandidateExperimentExecutionSupport: Readonly<{
701
+ export declare const exactProcessCandidateExperimentExecutionSupport: Readonly<{
715
702
  outcomes: readonly ["output"];
716
703
  outputMediaTypes: readonly ["text/*", "application/json", "*+json"];
717
704
  code: readonly ["disabled"];
@@ -773,11 +760,9 @@ interface ProtectedExactProcessCandidateExperimentExecutor extends ExactProcessC
773
760
  readonly recoveryPorts: Pick<AgentCandidateExecutionPorts, 'models' | 'memory'>;
774
761
  }
775
762
  /** Execute one signed experiment cell through any declared exact-process provider. */
776
- declare function createExactProcessCandidateExperimentExecutor(options: CreateExactProcessCandidateExperimentExecutorOptions): ExactProcessCandidateExperimentExecutor;
763
+ export declare function createExactProcessCandidateExperimentExecutor(options: CreateExactProcessCandidateExperimentExecutorOptions): ExactProcessCandidateExperimentExecutor;
777
764
  /** Compose host-owned execution ports with protected model access for one exact-process run. */
778
- declare function createProtectedExactProcessCandidateExperimentExecutor(options: CreateProtectedExactProcessCandidateExperimentExecutorOptions): ProtectedExactProcessCandidateExperimentExecutor;
779
- //#endregion
780
- //#region src/intelligence/optimization-receipt.d.ts
765
+ export declare function createProtectedExactProcessCandidateExperimentExecutor(options: CreateProtectedExactProcessCandidateExperimentExecutorOptions): ProtectedExactProcessCandidateExperimentExecutor;
781
766
  type OptimizationProvenance = NonNullable<OptimizationMethodComparison['best']['provenance']>;
782
767
  interface OptimizationActivationReceipt {
783
768
  kind: 'optimization-activation-receipt';
@@ -817,11 +802,9 @@ interface OptimizationReceiptCost {
817
802
  incompleteReasons: string[];
818
803
  }
819
804
  /** Build a detached receipt only for methods backed by an identified external optimizer. */
820
- declare function createOptimizationActivationReceipt(improvement: ImproveMethodResult): OptimizationActivationReceipt | undefined;
805
+ export declare function createOptimizationActivationReceipt(improvement: ImproveMethodResult): OptimizationActivationReceipt | undefined;
821
806
  /** Read and verify the optimizer evidence carried by a measured proposal. */
822
- declare function optimizationActivationReceiptFromMetadata(metadata: AgentImprovementMeasuredComparison['metadata']): OptimizationActivationReceipt | undefined;
823
- //#endregion
824
- //#region src/intelligence/with-intelligence.d.ts
807
+ export declare function optimizationActivationReceiptFromMetadata(metadata: AgentImprovementMeasuredComparison['metadata']): OptimizationActivationReceipt | undefined;
825
808
  /** What the hook hands the agent each run. Additive over the prompt-only
826
809
  * delivery: `composePrompt` folds the certified prompt surface (as before);
827
810
  * `proposals`/`applyProfile` surface the promoted profile DIFFS — never
@@ -884,15 +867,13 @@ type IntelligenceWrapped<I, O> = ((input: I) => Promise<O>) & {
884
867
  * best-effort — an export failure never fails the agent's turn — while an error
885
868
  * thrown by the agent itself propagates unchanged.
886
869
  */
887
- declare function withIntelligence<I, O>(agent: IntelligenceAgent<I, O>, config: IntelligenceHookConfig): IntelligenceWrapped<I, O>;
888
- //#endregion
889
- //#region src/intelligence/index.d.ts
870
+ export declare function withIntelligence<I, O>(agent: IntelligenceAgent<I, O>, config: IntelligenceHookConfig): IntelligenceWrapped<I, O>;
890
871
  /**
891
872
  * The per-class cost split carried by every trace and outcome. `off` ⇒
892
873
  * `intelligenceUsd: 0` by construction — there is no intelligence spawn to
893
874
  * bill. This is a classification on the trace, NOT a budget-pool split.
894
875
  */
895
- interface UsageSplit {
876
+ export interface UsageSplit {
896
877
  /** Observed base-stream spend in USD; a subtotal when `inferenceUsdKnown` is false. */
897
878
  inferenceUsd: number;
898
879
  /** Intelligence-spawn spend in USD. Provably `0` at the OFF tier. */
@@ -911,7 +892,7 @@ interface UsageSplit {
911
892
  * `loopEvents`, when present, export as the nested loop→round→iteration span
912
893
  * tree under the same `traceId`.
913
894
  */
914
- interface RunRecord {
895
+ export interface RunRecord {
915
896
  runId: string;
916
897
  traceId: string;
917
898
  project: string;
@@ -959,7 +940,7 @@ interface RunRecord {
959
940
  * with unknown usage, except for the OFF billing guarantee.
960
941
  * `costUsd` supplies inference spend when the split omits it.
961
942
  */
962
- interface RunReport {
943
+ export interface RunReport {
963
944
  success?: boolean;
964
945
  score?: number;
965
946
  usage?: Partial<UsageSplit>;
@@ -979,7 +960,7 @@ interface RunReport {
979
960
  /** Repo coordinates a product may declare for the (later) Gated-PR mode. The
980
961
  * Observe slice only records their PRESENCE for `doctor()`; it never touches
981
962
  * the repo. */
982
- interface RepoConfig {
963
+ export interface RepoConfig {
983
964
  owner: string;
984
965
  name: string;
985
966
  baseBranch: string;
@@ -987,7 +968,7 @@ interface RepoConfig {
987
968
  /** Client configuration. `project` + `apiKey` are the Observe minimum; the
988
969
  * rest tune effort, endpoint, redaction, and (for `doctor()` readiness)
989
970
  * declare the surfaces/checks/repo a later PR mode would need. */
990
- interface IntelligenceConfig {
971
+ export interface IntelligenceConfig {
991
972
  /** Stable project id — the tenant dimension every trace is tagged with. */
992
973
  project: string;
993
974
  /** Bearer key for the Intelligence ingest. Reads `TANGLE_API_KEY` when omitted. */
@@ -1032,7 +1013,7 @@ interface IntelligenceConfig {
1032
1013
  payloadAttributes?: 'metadata' | 'full';
1033
1014
  }
1034
1015
  /** Metadata describing one traced run. `runId`/`traceId` default to fresh ids. */
1035
- interface TraceMeta {
1016
+ export interface TraceMeta {
1036
1017
  /** The run's input — exported through the redactor. */
1037
1018
  input?: unknown;
1038
1019
  /** Stable run id. Defaults to a fresh id. */
@@ -1052,7 +1033,7 @@ interface TraceMeta {
1052
1033
  * outcome + the `{ inferenceUsd, intelligenceUsd }` split. Both are optional —
1053
1034
  * an un-recorded run still exports a span with whatever was set.
1054
1035
  */
1055
- interface TraceHandle {
1036
+ export interface TraceHandle {
1056
1037
  /** Capture the run's output. Exported through the redactor. */
1057
1038
  recordOutput(output: unknown): void;
1058
1039
  /**
@@ -1068,7 +1049,7 @@ interface TraceHandle {
1068
1049
  }): void;
1069
1050
  }
1070
1051
  /** Metadata for {@link IntelligenceClient.recordTrace}. */
1071
- interface RecordTraceMeta {
1052
+ export interface RecordTraceMeta {
1072
1053
  /** 32-hex trace id to anchor every span to. Defaults to a fresh id. */
1073
1054
  traceId?: string;
1074
1055
  /** Span id of an enclosing span the loop root should parent under (e.g. a
@@ -1076,7 +1057,7 @@ interface RecordTraceMeta {
1076
1057
  rootParentSpanId?: string;
1077
1058
  }
1078
1059
  /** The Observe-mode Intelligence client. */
1079
- interface IntelligenceClient {
1060
+ export interface IntelligenceClient {
1080
1061
  /** The resolved project id. */
1081
1062
  readonly project: string;
1082
1063
  /** The resolved effort settings. */
@@ -1125,13 +1106,13 @@ interface IntelligenceClient {
1125
1106
  exportStats(): OtelExportStats | undefined;
1126
1107
  }
1127
1108
  /** One mode's readiness verdict. */
1128
- interface ModeReadiness {
1109
+ export interface ModeReadiness {
1129
1110
  ready: boolean;
1130
1111
  /** Inputs this mode still needs, when not ready. Empty when ready. */
1131
1112
  missing: string[];
1132
1113
  }
1133
1114
  /** The `doctor()` readiness report — Mode-readiness without any network call. */
1134
- interface DoctorReport {
1115
+ export interface DoctorReport {
1135
1116
  project: string;
1136
1117
  effort: EffortSettings;
1137
1118
  /** True when an OTLP endpoint is configured (export will actually ship). */
@@ -1148,7 +1129,6 @@ interface DoctorReport {
1148
1129
  * `apiKey` is present (send becomes a no-op — the ingest requires a tenant key,
1149
1130
  * and best-effort export must never spam an unauthenticated plane).
1150
1131
  */
1151
- declare function createIntelligenceClient(config: IntelligenceConfig): IntelligenceClient;
1152
- //#endregion
1153
- export { type AGENT_IMPROVEMENT_PROFILE_SURFACES, type AGENT_PROFILE_MEASURED_SURFACES, type AgentCandidateExecutionHostPorts, type AgentCandidateExperimentCellPlacement, type AgentEnvironmentProviderRef, type AgentImprovementActivation, type AgentImprovementActivationIntent, type AgentImprovementActivationOutcome, type AgentImprovementActivationResult, type AgentImprovementActivationTargetIdentity, type AgentImprovementActivationTargetPlan, type AgentImprovementActivationTransitionInput, type AgentImprovementAnalysisOptions, type AgentImprovementEvaluation, type AgentImprovementExperimentMaterial, type AgentImprovementProfileActivationInput, type AgentImprovementProfileActivationPreparation, type AgentImprovementProfileActivationTarget, type AgentImprovementProfileReplacement, type AgentImprovementProfileStateDigest, type AgentImprovementProfileStateDigestInput, type AgentImprovementProfileStateResolver, type AgentImprovementProfileStateResolverInput, type AgentImprovementProfileSurface, type AgentImprovementProfileTargetState, type AgentImprovementProfileTargetTransition, type AgentImprovementProposal, type AgentImprovementReview, type AgentImprovementReviewDecision, type AgentImprovementTargetProfileDiffOptions, type AgentProfileCandidateMeasurementExecutor, type AgentProfileImprovementActivationOperation, type AgentProfileImprovementActivationTargetPlan, type AgentProfileImprovementBenchmark, type AgentProfileImprovementExecutor, type AgentProfileImprovementMethodOptions, type AgentProfileMeasuredSurface, type AppliedIntelligence, type AuthoredAgentProfileCandidateLineage, type CandidateExecutionEvidence, type CapabilityAuth, type CapabilityInterface, type CapabilityManifest, CapabilityNotAdmittedError, type CertProvenance, type CertifiedArtifact, type CertifiedCapability, type CertifiedCapabilitySummary, type CertifiedProfile, type CertifiedPromptSource, type CertifiedPromptSourceOptions, type CertifiedPromptSurface, type ContentRef, type CorpusAccess, type CreateAgentImprovementActivationOptions, type CreateAgentImprovementActivationResultOptions, type CreateAgentImprovementProposalOptions, type CreateExactProcessCandidateExperimentExecutorOptions, type CreateProtectedExactProcessCandidateExperimentExecutorOptions, type CredentialRef, type DeliveryBinding, type DiffProvenance, DoctorReport, type EffortOverridesCompiled, type EffortSettings, type EffortTier, type ExactProcessCandidateExperimentExecution, type ExactProcessCandidateExperimentExecutor, type ExecuteAgentCandidateExperimentCellOptions, type ExecuteAgentImprovementActivationInput, type ExecuteAgentImprovementActivationOptions, type HostSpec, type ImproveResult, type IntelligenceAgent, IntelligenceClient, IntelligenceConfig, type IntelligenceHookConfig, type IntelligenceWrapped, type JsonSchema, ModeReadiness, type OptimizationActivationReceipt, type OptimizationReceiptCost, type PrepareAgentCandidateExecutionOptions, type ProfileImprovementActivationTransitionInput, type ProposeAgentImprovementOptions, type ProposeAgentImprovementResult, type ProposeAgentProfileImprovementOptions, type ProposeAgentProfileImprovementResult, type ProposeAuthoredAgentProfileImprovementOptions, type ProposeAuthoredAgentProfileImprovementResult, type ProposedProfileDiff, type ProtectedExactProcessCandidateExperimentExecutor, type PullCertifiedOptions, type PullOutcome, RecordTraceMeta, type Redactor, RepoConfig, type ReviewAgentImprovementInput, type RunAgentCandidateExperimentOptions, type RunAgentCandidateExperimentResult, RunRecord, RunReport, type SealedCandidateActivationTransitionInput, TraceHandle, TraceMeta, UsageSplit, type VerifyCandidateExecutionEvidenceOptions, agentImprovementProfileDiffs, agentImprovementProfileSurfaceDigest, agentImprovementProfileSurfaceInput, agentImprovementTargetProfileDiffs, compileEffort, composeCertifiedPrompt, createAgentImprovementActivation, createAgentImprovementActivationResult, createAgentImprovementProposal, createCertifiedPromptSource, createExactProcessCandidateExperimentExecutor, createIntelligenceClient, createOptimizationActivationReceipt, createProtectedExactProcessCandidateExperimentExecutor, defaultRedactor, exactProcessCandidateExperimentExecutionSupport, executeAgentCandidateExperimentCell, executeAgentImprovementActivation, isAgentImprovementProfileSurface, isAgentProfileMeasuredSurface, isIntelligenceOff, manifestFromProfile, optimizationActivationReceiptFromMetadata, parseAgentCandidateProfileActivation as parseCandidateProfileMaterialization, prepareAgentImprovementProfileActivation, proposeAgentImprovement, proposeAgentProfileImprovement, proposeAuthoredAgentProfileImprovement, pullCertified, resolveEffort, reviewAgentImprovementProposal, runAgentCandidateExperiment, verifyAgentImprovementActivation, verifyAgentImprovementActivationResult, verifyAgentImprovementProposal, verifyAgentImprovementReview, verifyCandidateExecutionEvidence, withIntelligence };
1132
+ export declare function createIntelligenceClient(config: IntelligenceConfig): IntelligenceClient;
1133
+ export { type AGENT_IMPROVEMENT_PROFILE_SURFACES, type AGENT_PROFILE_MEASURED_SURFACES, type AgentCandidateExecutionHostPorts, type AgentCandidateExperimentCellPlacement, type AgentEnvironmentProviderRef, type AgentImprovementActivation, type AgentImprovementActivationIntent, type AgentImprovementActivationOutcome, type AgentImprovementActivationResult, type AgentImprovementActivationTargetIdentity, type AgentImprovementActivationTargetPlan, type AgentImprovementActivationTransitionInput, type AgentImprovementAnalysisOptions, type AgentImprovementEvaluation, type AgentImprovementExperimentMaterial, type AgentImprovementProfileActivationInput, type AgentImprovementProfileActivationPreparation, type AgentImprovementProfileActivationTarget, type AgentImprovementProfileReplacement, type AgentImprovementProfileStateDigest, type AgentImprovementProfileStateDigestInput, type AgentImprovementProfileStateResolver, type AgentImprovementProfileStateResolverInput, type AgentImprovementProfileSurface, type AgentImprovementProfileTargetState, type AgentImprovementProfileTargetTransition, type AgentImprovementProposal, type AgentImprovementReview, type AgentImprovementReviewDecision, type AgentImprovementTargetProfileDiffOptions, type AgentProfileCandidateMeasurementExecutor, type AgentProfileImprovementActivationOperation, type AgentProfileImprovementActivationTargetPlan, type AgentProfileImprovementBenchmark, type AgentProfileImprovementExecutor, type AgentProfileImprovementMethodOptions, type AgentProfileMeasuredSurface, type AppliedIntelligence, type AuthoredAgentProfileCandidateLineage, type CandidateExecutionEvidence, type CapabilityAuth, type CapabilityInterface, type CapabilityManifest, type CertProvenance, type CertifiedArtifact, type CertifiedCapability, type CertifiedCapabilitySummary, type CertifiedProfile, type CertifiedPromptSource, type CertifiedPromptSourceOptions, type CertifiedPromptSurface, type ContentRef, type CorpusAccess, type CreateAgentImprovementActivationOptions, type CreateAgentImprovementActivationResultOptions, type CreateAgentImprovementProposalOptions, type CreateExactProcessCandidateExperimentExecutorOptions, type CreateProtectedExactProcessCandidateExperimentExecutorOptions, type CredentialRef, type DeliveryBinding, type DiffProvenance, type EffortOverridesCompiled, type EffortSettings, type EffortTier, type ExactProcessCandidateExperimentExecution, type ExactProcessCandidateExperimentExecutor, type ExecuteAgentCandidateExperimentCellOptions, type ExecuteAgentImprovementActivationInput, type ExecuteAgentImprovementActivationOptions, type HostSpec, type ImproveResult, type IntelligenceAgent, type IntelligenceHookConfig, type IntelligenceWrapped, type JsonSchema, type OptimizationActivationReceipt, type OptimizationReceiptCost, type PrepareAgentCandidateExecutionOptions, type ProfileImprovementActivationTransitionInput, type ProposeAgentImprovementOptions, type ProposeAgentImprovementResult, type ProposeAgentProfileImprovementOptions, type ProposeAgentProfileImprovementResult, type ProposeAuthoredAgentProfileImprovementOptions, type ProposeAuthoredAgentProfileImprovementResult, type ProposedProfileDiff, type ProtectedExactProcessCandidateExperimentExecutor, type PullCertifiedOptions, type PullOutcome, type Redactor, type ReviewAgentImprovementInput, type RunAgentCandidateExperimentOptions, type RunAgentCandidateExperimentResult, type SealedCandidateActivationTransitionInput, type VerifyCandidateExecutionEvidenceOptions, agentImprovementProfileDiffs, agentImprovementProfileSurfaceDigest, agentImprovementProfileSurfaceInput, agentImprovementTargetProfileDiffs, createAgentImprovementActivation, createAgentImprovementActivationResult, createAgentImprovementProposal, defaultRedactor, executeAgentImprovementActivation, isAgentImprovementProfileSurface, isAgentProfileMeasuredSurface, parseAgentCandidateProfileActivation as parseCandidateProfileMaterialization, reviewAgentImprovementProposal, verifyAgentImprovementActivation, verifyAgentImprovementActivationResult, verifyAgentImprovementProposal, verifyAgentImprovementReview };
1154
1134
  //# sourceMappingURL=intelligence.d.ts.map
@@ -1,17 +1,18 @@
1
- import { An as toOtelAttributes, Ji as defaultRedactor, Sn as buildRuntimeEventOtelSpans, Tn as flatOtelSpan, Xi as resolveRedactor, Xt as resolveAgentEnvironmentProvider, bn as buildLoopOtelSpans, ii as authoredAgentIdentity, wn as createOtelExporter } from "./supervisor-wS9Ehz_x.js";
2
- import { F as canonicalCandidateDocument, N as canonicalCandidateBytes$1, P as canonicalCandidateDigest$1, R as immutableCandidateValue, V as verifyCanonicalCandidateDocument, z as omitTopLevelDigest } from "./sandbox-profile-compat-DtuJWFrM.js";
3
- import { a as assertProfileTrainingIsHeldOut, f as addRuntimeUsage, l as rethrowAfterCleanup, m as isUsageAmount, p as createRuntimeUsageTotals, t as improve } from "./improve-DwSahPi1.js";
4
- import { _ as agentImprovementTargetProfileDiffs, a as reviewAgentImprovementProposal, b as isAgentProfileMeasuredSurface, c as verifyAgentImprovementProposal, d as attachOptimizationActivationReceipt, f as createOptimizationActivationReceipt, g as agentImprovementProfileSurfaceInput, h as agentImprovementProfileSurfaceDigest, i as executeAgentImprovementActivation, l as verifyAgentImprovementReview, m as agentImprovementProfileDiffs, n as createAgentImprovementActivationResult, o as verifyAgentImprovementActivation, p as optimizationActivationReceiptFromMetadata, r as createAgentImprovementProposal, s as verifyAgentImprovementActivationResult, t as createAgentImprovementActivation, u as assertNoCallerOptimizationReceipt, v as assertProfileImprovementTargetsShareIdentity, y as isAgentImprovementProfileSurface } from "./activation-tNGW73Y9.js";
5
- import { _ as parseAgentCandidateProfileActivation, a as applyExactAgentProfileDiff, d as createAgentCandidateProfileActivation, g as omitUndefinedObjectFields, m as materializeAgentCandidateProfilePlan, o as assertCandidateProfileBinding, v as parseExactAgentProfile } from "./profile-JLJd2wFG.js";
6
- import { t as runAnalystLoop } from "./analyst-loop-DZw5QWT9.js";
7
- import { C as verifiedResourceTextByDigest, S as AGENT_CANDIDATE_EXECUTION_SUPPORT, n as executePreparedAgentCandidate, t as prepareAgentCandidateExecution, w as verifyAgentCandidateBundle, x as exactProcessProviderAsCandidateExecutor, y as createProtectedAgentCandidateModelPort } from "./prepare-B9wWffjO.js";
1
+ import { gt as defaultRedactor, vt as resolveRedactor } from "./journal-store-BJPMUydp.js";
2
+ import { Vt as resolveAgentEnvironmentProvider, Xr as authoredAgentIdentity, dn as buildLoopOtelSpans, gn as flatOtelSpan, hn as createOtelExporter, pn as buildRuntimeEventOtelSpans, xn as toOtelAttributes } from "./supervisor-rK5Y8en6.js";
3
+ import { a as assertProfileTrainingIsHeldOut, f as addRuntimeUsage, l as rethrowAfterCleanup, m as isUsageAmount, p as createRuntimeUsageTotals, t as improve } from "./improve-Dm5ZE8mr.js";
4
+ import { F as canonicalCandidateDocument, N as canonicalCandidateBytes$1, P as canonicalCandidateDigest$1, R as immutableCandidateValue, V as verifyCanonicalCandidateDocument, z as omitTopLevelDigest } from "./sandbox-profile-compat-CXjozdWL.js";
5
+ import { _ as agentImprovementTargetProfileDiffs, a as reviewAgentImprovementProposal, b as isAgentProfileMeasuredSurface, c as verifyAgentImprovementProposal, d as attachOptimizationActivationReceipt, f as createOptimizationActivationReceipt, g as agentImprovementProfileSurfaceInput, h as agentImprovementProfileSurfaceDigest, i as executeAgentImprovementActivation, l as verifyAgentImprovementReview, m as agentImprovementProfileDiffs, n as createAgentImprovementActivationResult, o as verifyAgentImprovementActivation, p as optimizationActivationReceiptFromMetadata, r as createAgentImprovementProposal, s as verifyAgentImprovementActivationResult, t as createAgentImprovementActivation, u as assertNoCallerOptimizationReceipt, v as assertProfileImprovementTargetsShareIdentity, y as isAgentImprovementProfileSurface } from "./activation-C6zNC2kx.js";
6
+ import { _ as parseAgentCandidateProfileActivation, a as applyExactAgentProfileDiff, d as createAgentCandidateProfileActivation, g as omitUndefinedObjectFields, m as materializeAgentCandidateProfilePlan, o as assertCandidateProfileBinding, v as parseExactAgentProfile } from "./profile-C01SQZKa.js";
7
+ import { t as runAnalystLoop } from "./analyst-loop-BZvXCDKy.js";
8
+ import { C as verifiedResourceTextByDigest, S as AGENT_CANDIDATE_EXECUTION_SUPPORT, n as executePreparedAgentCandidate, t as prepareAgentCandidateExecution, w as verifyAgentCandidateBundle, x as exactProcessProviderAsCandidateExecutor, y as createProtectedAgentCandidateModelPort } from "./prepare-XWwsOh8O.js";
8
9
  import { AGENT_IMPROVEMENT_SOURCE_METADATA_KEY, agentCandidateMaterializationReceiptSchema, agentCandidateRunReceiptSchema, agentImprovementSourceMetadata, agentImprovementSourceSchema, agentProfileImprovementArmSchema, applyAgentProfileDiff, candidateExecutionEvidenceSchema, numbersApproximatelyEqual } from "@tangle-network/agent-interface";
9
10
  import { CostLedger, contentHash } from "@tangle-network/agent-eval";
10
11
  import { ATTR, agentIdentityAttributes } from "@tangle-network/agent-trace-contract";
11
12
  import { assertProposalFindings } from "@tangle-network/agent-eval/analyst";
12
13
  import { campaignSplitDigestFromIdentities } from "@tangle-network/agent-eval/campaign";
13
14
  import { measuredComparisonFromAgentProfileImprovementExperiment, measuredComparisonFromCandidateExperiment, runAgentProfileImprovementExperiment, runCandidateExperiment, sealAgentProfileImprovementExperiment, sealAgentProfileImprovementSuite, sealAgentProfileImprovementTask, sealCandidateExperiment, verifyAgentProfileImprovementExperimentComparison, verifyCandidateExperiment, verifyCandidateExperimentComparison } from "@tangle-network/agent-eval/contract";
14
- //#region src/intelligence/delivery.ts
15
+ // src/intelligence/delivery.ts
15
16
  const defaultPlaneBaseUrl = "https://intelligence.tangle.tools";
16
17
  const defaultRefreshMs = 3e5;
17
18
  const defaultPlaneRequestTimeoutMs = 1e4;
@@ -208,8 +209,7 @@ function createCertifiedPromptSource(opts) {
208
209
  }
209
210
  };
210
211
  }
211
- //#endregion
212
- //#region src/intelligence/effort.ts
212
+ // src/intelligence/effort.ts
213
213
  const presets = {
214
214
  off: {
215
215
  analysts: false,
@@ -299,8 +299,7 @@ function compileEffort(settings) {
299
299
  intelligenceBudgetUsd: settings.intelligenceBudgetUsd
300
300
  };
301
301
  }
302
- //#endregion
303
- //#region src/intelligence/usage.ts
302
+ // src/intelligence/usage.ts
304
303
  /** Numeric reports replace subtotals; explicit or malformed missingness is irreversible. */
305
304
  function mergeReportedUsage(target, report) {
306
305
  const update = {
@@ -330,8 +329,7 @@ function normalizeReportedUsage(usage, intelligenceOff = false) {
330
329
  ...isUsageAmount(usage.estimatedInferenceUsd) ? { estimatedInferenceUsd: usage.estimatedInferenceUsd } : {}
331
330
  };
332
331
  }
333
- //#endregion
334
- //#region src/intelligence/otel-run-export.ts
332
+ // src/intelligence/otel-run-export.ts
335
333
  /**
336
334
  * The OTLP spans Tangle Intelligence receives for one traced run or run record.
337
335
  * Attribute keys are verbatim: the plane's session, model and cost readers
@@ -482,8 +480,7 @@ function withMissingAttributes(span, attributes) {
482
480
  attributes: [...span.attributes ?? [], ...toOtelAttributes(missing)]
483
481
  };
484
482
  }
485
- //#endregion
486
- //#region src/intelligence/profile-improvement-experiment.ts
483
+ // src/intelligence/profile-improvement-experiment.ts
487
484
  function createProfileImprovementCostLedger(budgetUsd, context = "profile improvement") {
488
485
  if (!Number.isFinite(budgetUsd) || budgetUsd < 0) throw new Error(`${context} budgetUsd must be a non-negative finite number`);
489
486
  return new CostLedger({ costCeilingUsd: budgetUsd });
@@ -546,8 +543,7 @@ function completeImprovementSearchAccounting(analysis, improvement) {
546
543
  searchDurationMs: analysis.durationMs + improvement.durationMs
547
544
  };
548
545
  }
549
- //#endregion
550
- //#region src/intelligence/authored-profile-improvement.ts
546
+ // src/intelligence/authored-profile-improvement.ts
551
547
  /**
552
548
  * Put a complete authored/imported profile through the canonical profile
553
549
  * experiment and proposal path without invoking `improve()`.
@@ -652,8 +648,7 @@ function assertDirectCandidateReleaseWorkIsFresh(benchmark, lineage, development
652
648
  const reused = benchmark.tasks.map(profileTaskScenarioIdentity).filter((scenario) => development.has(canonicalCandidateDigest$1(scenario))).map((scenario) => scenario.id);
653
649
  if (reused.length > 0) throw new Error(`authored profile release reuses development scenario(s): [${reused.join(", ")}]`);
654
650
  }
655
- //#endregion
656
- //#region src/intelligence/capability.ts
651
+ // src/intelligence/capability.ts
657
652
  /**
658
653
  * A consumer rejected a binding that its executor does not admit.
659
654
  */
@@ -828,8 +823,7 @@ function isStringRecord(v) {
828
823
  function isJsonSchema(v) {
829
824
  return typeof v === "object" && v !== null && !Array.isArray(v);
830
825
  }
831
- //#endregion
832
- //#region src/intelligence/improvement-cycle.ts
826
+ // src/intelligence/improvement-cycle.ts
833
827
  /** A failed baseline or candidate cell with its complete Runtime failure result. */
834
828
  var AgentCandidateExperimentCellExecutionError = class extends Error {
835
829
  finalization;
@@ -1028,7 +1022,8 @@ function assertProfileReleaseWorkIsFresh(benchmark, improvement) {
1028
1022
  */
1029
1023
  async function proposeAgentProfileImprovement(options) {
1030
1024
  const source = agentImprovementSourceSchema.parse(options.source);
1031
- if (!isAgentProfileMeasuredSurface(options.improvement.surface ?? "prompt")) throw new Error("measured profile improvement supports profile surfaces or a complete agent profile; use the sealed-candidate path for this surface");
1025
+ const surface = options.improvement.surface ?? "prompt";
1026
+ if (!isAgentProfileMeasuredSurface(surface)) throw new Error("measured profile improvement supports profile surfaces or a complete agent profile; use the sealed-candidate path for this surface");
1032
1027
  assertMeasuredAnalysisOptions(options.analysis);
1033
1028
  const inputFindings = assertProposalFindings(options.improvement.findings ?? [], "profile improvement input findings");
1034
1029
  const costLedger = createProfileImprovementCostLedger(options.budgetUsd);
@@ -1255,8 +1250,7 @@ function assertEvidenceMaterialDigest(evidence, label) {
1255
1250
  const bytes = canonicalCandidateBytes$1(evidence.material);
1256
1251
  if (canonicalCandidateDigest$1(evidence.material) !== evidence.digest || evidence.artifact.sha256 !== evidence.digest || evidence.artifact.byteLength !== bytes.byteLength) throw new Error(`${label} digest does not match its canonical material`);
1257
1252
  }
1258
- //#endregion
1259
- //#region src/intelligence/exact-process-candidate.ts
1253
+ // src/intelligence/exact-process-candidate.ts
1260
1254
  /** Candidate surfaces implemented by the neutral exact-process executor. */
1261
1255
  const exactProcessCandidateExperimentExecutionSupport = Object.freeze({
1262
1256
  outcomes: Object.freeze(["output"]),
@@ -1277,8 +1271,9 @@ const exactProcessCandidateExperimentExecutionSupport = Object.freeze({
1277
1271
  });
1278
1272
  /** Execute one signed experiment cell through any declared exact-process provider. */
1279
1273
  function createExactProcessCandidateExperimentExecutor(options) {
1274
+ const provider = resolveAgentEnvironmentProvider(options.provider, options.providerRegistry);
1280
1275
  const executor = exactProcessProviderAsCandidateExecutor({
1281
- provider: resolveAgentEnvironmentProvider(options.provider, options.providerRegistry),
1276
+ provider,
1282
1277
  resources: options.resources,
1283
1278
  ...options.providerOptions ? { providerOptions: options.providerOptions } : {},
1284
1279
  ...options.provisionTimeoutMs === void 0 ? {} : { provisionTimeoutMs: options.provisionTimeoutMs },
@@ -1327,8 +1322,7 @@ function createProtectedExactProcessCandidateExperimentExecutor(options) {
1327
1322
  })
1328
1323
  });
1329
1324
  }
1330
- //#endregion
1331
- //#region src/intelligence/profile-activation.ts
1325
+ // src/intelligence/profile-activation.ts
1332
1326
  /**
1333
1327
  * Compare product-owned profiles with an exact measured transition and prepare
1334
1328
  * all-or-none replacements. The product owns locking, persistence, and retained
@@ -1489,8 +1483,7 @@ function assertUniqueProfileTargets(targets) {
1489
1483
  const targetKeys = targets.map((target) => `${target.identity}\u0000${target.surface}`);
1490
1484
  if (new Set(targetKeys).size !== targetKeys.length) throw new Error("agent profile activation repeats a target");
1491
1485
  }
1492
- //#endregion
1493
- //#region src/intelligence/with-intelligence.ts
1486
+ // src/intelligence/with-intelligence.ts
1494
1487
  function summarizeRuntimeEvents(events) {
1495
1488
  const summary = createRuntimeUsageTotals();
1496
1489
  for (const event of events) {
@@ -1667,8 +1660,7 @@ function withIntelligence(agent, config) {
1667
1660
  wrapped.flush = client.flush;
1668
1661
  return wrapped;
1669
1662
  }
1670
- //#endregion
1671
- //#region src/intelligence/index.ts
1663
+ // src/intelligence/index.ts
1672
1664
  function resolveEffortConfig(effort) {
1673
1665
  if (effort === void 0) return resolveEffort(defaultEffortTier);
1674
1666
  if (typeof effort === "string") return resolveEffort(effort);
@@ -1829,7 +1821,6 @@ function createIntelligenceClient(config) {
1829
1821
  }
1830
1822
  };
1831
1823
  }
1832
- //#endregion
1833
1824
  export { CapabilityNotAdmittedError, agentImprovementProfileDiffs, agentImprovementProfileSurfaceDigest, agentImprovementProfileSurfaceInput, agentImprovementTargetProfileDiffs, compileEffort, composeCertifiedPrompt, createAgentImprovementActivation, createAgentImprovementActivationResult, createAgentImprovementProposal, createCertifiedPromptSource, createExactProcessCandidateExperimentExecutor, createIntelligenceClient, createOptimizationActivationReceipt, createProtectedExactProcessCandidateExperimentExecutor, defaultRedactor, exactProcessCandidateExperimentExecutionSupport, executeAgentCandidateExperimentCell, executeAgentImprovementActivation, isAgentImprovementProfileSurface, isAgentProfileMeasuredSurface, isIntelligenceOff, manifestFromProfile, optimizationActivationReceiptFromMetadata, parseAgentCandidateProfileActivation as parseCandidateProfileMaterialization, prepareAgentImprovementProfileActivation, proposeAgentImprovement, proposeAgentProfileImprovement, proposeAuthoredAgentProfileImprovement, pullCertified, resolveEffort, reviewAgentImprovementProposal, runAgentCandidateExperiment, verifyAgentImprovementActivation, verifyAgentImprovementActivationResult, verifyAgentImprovementProposal, verifyAgentImprovementReview, verifyCandidateExecutionEvidence, withIntelligence };
1834
1825
 
1835
1826
  //# sourceMappingURL=intelligence.js.map