@tangle-network/agent-runtime 0.349.0 → 0.350.2

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 (126) hide show
  1. package/dist/{activation-tNGW73Y9.js → activation-CfJMyzEs.js} +12 -14
  2. package/dist/{activation-tNGW73Y9.js.map → activation-CfJMyzEs.js.map} +1 -1
  3. package/dist/{activation-wBipBkCf.d.ts → activation-DyiHrTlS.d.ts} +2 -24
  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-Ze8pd07a.js} +3 -4
  12. package/dist/{bundle-1xaJEgjq.js.map → bundle-Ze8pd07a.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/{coordination-manager-B2Z_MmL9.js → coordination-manager-BkVfWlMz.js} +101 -132
  17. package/dist/{coordination-manager-B2Z_MmL9.js.map → coordination-manager-BkVfWlMz.js.map} +1 -1
  18. package/dist/{delegate-Dr-63jFl.js → delegate-DgEie4ad.js} +19 -21
  19. package/dist/delegate-DgEie4ad.js.map +1 -0
  20. package/dist/durable.d.ts +13 -23
  21. package/dist/durable.js +48 -43
  22. package/dist/durable.js.map +1 -1
  23. package/dist/{errors-DodWX-cb.js → errors-wuhGvpE3.js} +2 -3
  24. package/dist/{errors-DodWX-cb.js.map → errors-wuhGvpE3.js.map} +1 -1
  25. package/dist/{graph-DPejYB3C.js → graph-Cx0FhKSE.js} +191 -14
  26. package/dist/graph-Cx0FhKSE.js.map +1 -0
  27. package/dist/{improve-DwSahPi1.js → improve-i0HU1-aa.js} +35 -53
  28. package/dist/{improve-DwSahPi1.js.map → improve-i0HU1-aa.js.map} +1 -1
  29. package/dist/{improvement-adapter-sIthWkcN.d.ts → improvement-adapter-D5GRU1eY.d.ts} +2 -6
  30. package/dist/index.d.ts +41 -89
  31. package/dist/index.js +43 -61
  32. package/dist/index.js.map +1 -1
  33. package/dist/intelligence.d.ts +39 -59
  34. package/dist/intelligence.js +23 -33
  35. package/dist/intelligence.js.map +1 -1
  36. package/dist/kernel.d.ts +5 -5
  37. package/dist/kernel.js +11 -11
  38. package/dist/{loop-runner-CP6MfO1b.js → loop-runner-BwN9MhdP.js} +5 -6
  39. package/dist/{loop-runner-CP6MfO1b.js.map → loop-runner-BwN9MhdP.js.map} +1 -1
  40. package/dist/{loop-runner-C6pGq-2l.d.ts → loop-runner-DvfOXVx9.d.ts} +3 -5
  41. package/dist/loop-runner-bin.d.ts +5 -8
  42. package/dist/loop-runner-bin.js +2 -3
  43. package/dist/mcp/bin.js +6 -8
  44. package/dist/mcp/bin.js.map +1 -1
  45. package/dist/mcp/index.d.ts +8 -18
  46. package/dist/mcp/index.js +17 -25
  47. package/dist/mcp/index.js.map +1 -1
  48. package/dist/mcp/memory-bin.js +4 -6
  49. package/dist/mcp/memory-bin.js.map +1 -1
  50. package/dist/{model-policy-CyCUwHed.js → model-policy-GSxWwP-b.js} +11 -13
  51. package/dist/{model-policy-CyCUwHed.js.map → model-policy-GSxWwP-b.js.map} +1 -1
  52. package/dist/placement.d.ts +12 -14
  53. package/dist/placement.js +1 -2
  54. package/dist/platform.d.ts +7 -13
  55. package/dist/platform.js +3 -6
  56. package/dist/platform.js.map +1 -1
  57. package/dist/{prepare-B9wWffjO.js → prepare-DE8TQnLu.js} +49 -69
  58. package/dist/{prepare-B9wWffjO.js.map → prepare-DE8TQnLu.js.map} +1 -1
  59. package/dist/{profile-JLJd2wFG.js → profile-CAhZDW2T.js} +58 -92
  60. package/dist/profile-CAhZDW2T.js.map +1 -0
  61. package/dist/{profile-materialization-bPm0gGLO.d.ts → profile-materialization-BRY22Oh8.d.ts} +1 -3
  62. package/dist/profiles.d.ts +25 -12
  63. package/dist/profiles.js +52 -11
  64. package/dist/profiles.js.map +1 -1
  65. package/dist/{protected-model-port-DVVh-hEk.d.ts → protected-model-port-IKqhTypD.d.ts} +2 -14
  66. package/dist/{protected-redaction-DFCeo4vg.js → protected-redaction-DilFZch5.js} +2 -3
  67. package/dist/{protected-redaction-DFCeo4vg.js.map → protected-redaction-DilFZch5.js.map} +1 -1
  68. package/dist/{provision-supervisor-C4v2vqDo.js → provision-supervisor-Bde_FF0R.js} +11 -15
  69. package/dist/{provision-supervisor-C4v2vqDo.js.map → provision-supervisor-Bde_FF0R.js.map} +1 -1
  70. package/dist/{record-events-D93DkpAx.js → record-events-B2GUgYdz.js} +12 -14
  71. package/dist/{record-events-D93DkpAx.js.map → record-events-B2GUgYdz.js.map} +1 -1
  72. package/dist/{run-cancellation-CzFhQGMa.js → run-cancellation-BLy_Zz-w.js} +6 -7
  73. package/dist/{run-cancellation-CzFhQGMa.js.map → run-cancellation-BLy_Zz-w.js.map} +1 -1
  74. package/dist/{runtime-CsvGCQpl.js → runtime-6Ec9sHRe.js} +648 -215
  75. package/dist/runtime-6Ec9sHRe.js.map +1 -0
  76. package/dist/{runtime-hooks-tXpAarhW.js → runtime-hooks-CsW2pfFk.js} +2 -3
  77. package/dist/{runtime-hooks-tXpAarhW.js.map → runtime-hooks-CsW2pfFk.js.map} +1 -1
  78. package/dist/{runtime-hooks-nsqxSUFL.d.ts → runtime-hooks-ZQqPw-0g.d.ts} +1 -3
  79. package/dist/{sandbox-profile-compat-DtuJWFrM.js → sandbox-profile-compat-BxMQ1VXv.js} +61 -43
  80. package/dist/sandbox-profile-compat-BxMQ1VXv.js.map +1 -0
  81. package/dist/{search-executor-CCb82Umc.js → search-executor-B7g_5Wjl.js} +10 -15
  82. package/dist/{search-executor-CCb82Umc.js.map → search-executor-B7g_5Wjl.js.map} +1 -1
  83. package/dist/{server-CKPwZU-I.js → server-fvEMwGMQ.js} +19 -30
  84. package/dist/{server-CKPwZU-I.js.map → server-fvEMwGMQ.js.map} +1 -1
  85. package/dist/{structural-rollout-DylC_fwU.js → structural-rollout-B86bSixU.js} +69 -70
  86. package/dist/structural-rollout-B86bSixU.js.map +1 -0
  87. package/dist/{substrate-CGDFTSRh.js → substrate-Db2pp6y3.js} +2 -3
  88. package/dist/{substrate-CGDFTSRh.js.map → substrate-Db2pp6y3.js.map} +1 -1
  89. package/dist/{supervise-BGfm2GlY.js → supervise-CaeZcgAW.js} +460 -195
  90. package/dist/supervise-CaeZcgAW.js.map +1 -0
  91. package/dist/{supervisor-wS9Ehz_x.js → supervisor-C1OePYE-.js} +511 -626
  92. package/dist/supervisor-C1OePYE-.js.map +1 -0
  93. package/dist/{task-queue-0fKkoweu.d.ts → task-queue-kefGy79U.d.ts} +1 -3
  94. package/dist/task-queue.d.ts +1 -1
  95. package/dist/task-queue.js +1 -2
  96. package/dist/testing.d.ts +7 -15
  97. package/dist/testing.js +241 -244
  98. package/dist/testing.js.map +1 -1
  99. package/dist/tool-loop.d.ts +16 -19
  100. package/dist/tool-loop.js +2 -3
  101. package/dist/{tool-server-XV4aJwoQ.js → tool-server-CwuYeW_Z.js} +3 -4
  102. package/dist/{tool-server-XV4aJwoQ.js.map → tool-server-CwuYeW_Z.js.map} +1 -1
  103. package/dist/{top-snapshot-CflmaDgk.js → top-snapshot-ChwpTr7A.js} +4 -5
  104. package/dist/{top-snapshot-CflmaDgk.js.map → top-snapshot-ChwpTr7A.js.map} +1 -1
  105. package/dist/tui/bin.js +7 -9
  106. package/dist/tui/bin.js.map +1 -1
  107. package/dist/tui/index.d.ts +3 -5
  108. package/dist/tui/index.js +2 -2
  109. package/dist/{types-C8BGOCBn.d.ts → types-Fowuwdz2.d.ts} +364 -483
  110. package/dist/{types-Cwrea-bU.d.ts → types-qsqfyQoY.d.ts} +1 -3
  111. package/dist/workspace-store/index.d.ts +12 -22
  112. package/dist/workspace-store/index.js +4 -7
  113. package/dist/workspace-store/index.js.map +1 -1
  114. package/dist/{workspace-streams-BiS4ABah.d.ts → workspace-streams-Dq2Fzk3c.d.ts} +1 -11
  115. package/package.json +25 -25
  116. package/skills/agent-graphs/SKILL.md +17 -4
  117. package/skills/be-ambitious/SKILL.md +46 -0
  118. package/skills/graph-designer/SKILL.md +9 -2
  119. package/dist/delegate-Dr-63jFl.js.map +0 -1
  120. package/dist/graph-DPejYB3C.js.map +0 -1
  121. package/dist/profile-JLJd2wFG.js.map +0 -1
  122. package/dist/runtime-CsvGCQpl.js.map +0 -1
  123. package/dist/sandbox-profile-compat-DtuJWFrM.js.map +0 -1
  124. package/dist/structural-rollout-DylC_fwU.js.map +0 -1
  125. package/dist/supervise-BGfm2GlY.js.map +0 -1
  126. package/dist/supervisor-wS9Ehz_x.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-Fowuwdz2.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-DyiHrTlS.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,17 @@
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 { An as toOtelAttributes, Qi as resolveRedactor, Sn as buildRuntimeEventOtelSpans, Tn as flatOtelSpan, Xi as defaultRedactor, Xt as resolveAgentEnvironmentProvider, ai as authoredAgentIdentity, bn as buildLoopOtelSpans, wn as createOtelExporter } from "./supervisor-C1OePYE-.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-BxMQ1VXv.js";
3
+ import { a as assertProfileTrainingIsHeldOut, f as addRuntimeUsage, l as rethrowAfterCleanup, m as isUsageAmount, p as createRuntimeUsageTotals, t as improve } from "./improve-i0HU1-aa.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-CfJMyzEs.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-CAhZDW2T.js";
6
+ import { t as runAnalystLoop } from "./analyst-loop-BZvXCDKy.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-DE8TQnLu.js";
8
8
  import { AGENT_IMPROVEMENT_SOURCE_METADATA_KEY, agentCandidateMaterializationReceiptSchema, agentCandidateRunReceiptSchema, agentImprovementSourceMetadata, agentImprovementSourceSchema, agentProfileImprovementArmSchema, applyAgentProfileDiff, candidateExecutionEvidenceSchema, numbersApproximatelyEqual } from "@tangle-network/agent-interface";
9
9
  import { CostLedger, contentHash } from "@tangle-network/agent-eval";
10
10
  import { ATTR, agentIdentityAttributes } from "@tangle-network/agent-trace-contract";
11
11
  import { assertProposalFindings } from "@tangle-network/agent-eval/analyst";
12
12
  import { campaignSplitDigestFromIdentities } from "@tangle-network/agent-eval/campaign";
13
13
  import { measuredComparisonFromAgentProfileImprovementExperiment, measuredComparisonFromCandidateExperiment, runAgentProfileImprovementExperiment, runCandidateExperiment, sealAgentProfileImprovementExperiment, sealAgentProfileImprovementSuite, sealAgentProfileImprovementTask, sealCandidateExperiment, verifyAgentProfileImprovementExperimentComparison, verifyCandidateExperiment, verifyCandidateExperimentComparison } from "@tangle-network/agent-eval/contract";
14
- //#region src/intelligence/delivery.ts
14
+ // src/intelligence/delivery.ts
15
15
  const defaultPlaneBaseUrl = "https://intelligence.tangle.tools";
16
16
  const defaultRefreshMs = 3e5;
17
17
  const defaultPlaneRequestTimeoutMs = 1e4;
@@ -208,8 +208,7 @@ function createCertifiedPromptSource(opts) {
208
208
  }
209
209
  };
210
210
  }
211
- //#endregion
212
- //#region src/intelligence/effort.ts
211
+ // src/intelligence/effort.ts
213
212
  const presets = {
214
213
  off: {
215
214
  analysts: false,
@@ -299,8 +298,7 @@ function compileEffort(settings) {
299
298
  intelligenceBudgetUsd: settings.intelligenceBudgetUsd
300
299
  };
301
300
  }
302
- //#endregion
303
- //#region src/intelligence/usage.ts
301
+ // src/intelligence/usage.ts
304
302
  /** Numeric reports replace subtotals; explicit or malformed missingness is irreversible. */
305
303
  function mergeReportedUsage(target, report) {
306
304
  const update = {
@@ -330,8 +328,7 @@ function normalizeReportedUsage(usage, intelligenceOff = false) {
330
328
  ...isUsageAmount(usage.estimatedInferenceUsd) ? { estimatedInferenceUsd: usage.estimatedInferenceUsd } : {}
331
329
  };
332
330
  }
333
- //#endregion
334
- //#region src/intelligence/otel-run-export.ts
331
+ // src/intelligence/otel-run-export.ts
335
332
  /**
336
333
  * The OTLP spans Tangle Intelligence receives for one traced run or run record.
337
334
  * Attribute keys are verbatim: the plane's session, model and cost readers
@@ -482,8 +479,7 @@ function withMissingAttributes(span, attributes) {
482
479
  attributes: [...span.attributes ?? [], ...toOtelAttributes(missing)]
483
480
  };
484
481
  }
485
- //#endregion
486
- //#region src/intelligence/profile-improvement-experiment.ts
482
+ // src/intelligence/profile-improvement-experiment.ts
487
483
  function createProfileImprovementCostLedger(budgetUsd, context = "profile improvement") {
488
484
  if (!Number.isFinite(budgetUsd) || budgetUsd < 0) throw new Error(`${context} budgetUsd must be a non-negative finite number`);
489
485
  return new CostLedger({ costCeilingUsd: budgetUsd });
@@ -546,8 +542,7 @@ function completeImprovementSearchAccounting(analysis, improvement) {
546
542
  searchDurationMs: analysis.durationMs + improvement.durationMs
547
543
  };
548
544
  }
549
- //#endregion
550
- //#region src/intelligence/authored-profile-improvement.ts
545
+ // src/intelligence/authored-profile-improvement.ts
551
546
  /**
552
547
  * Put a complete authored/imported profile through the canonical profile
553
548
  * experiment and proposal path without invoking `improve()`.
@@ -652,8 +647,7 @@ function assertDirectCandidateReleaseWorkIsFresh(benchmark, lineage, development
652
647
  const reused = benchmark.tasks.map(profileTaskScenarioIdentity).filter((scenario) => development.has(canonicalCandidateDigest$1(scenario))).map((scenario) => scenario.id);
653
648
  if (reused.length > 0) throw new Error(`authored profile release reuses development scenario(s): [${reused.join(", ")}]`);
654
649
  }
655
- //#endregion
656
- //#region src/intelligence/capability.ts
650
+ // src/intelligence/capability.ts
657
651
  /**
658
652
  * A consumer rejected a binding that its executor does not admit.
659
653
  */
@@ -828,8 +822,7 @@ function isStringRecord(v) {
828
822
  function isJsonSchema(v) {
829
823
  return typeof v === "object" && v !== null && !Array.isArray(v);
830
824
  }
831
- //#endregion
832
- //#region src/intelligence/improvement-cycle.ts
825
+ // src/intelligence/improvement-cycle.ts
833
826
  /** A failed baseline or candidate cell with its complete Runtime failure result. */
834
827
  var AgentCandidateExperimentCellExecutionError = class extends Error {
835
828
  finalization;
@@ -1028,7 +1021,8 @@ function assertProfileReleaseWorkIsFresh(benchmark, improvement) {
1028
1021
  */
1029
1022
  async function proposeAgentProfileImprovement(options) {
1030
1023
  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");
1024
+ const surface = options.improvement.surface ?? "prompt";
1025
+ 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
1026
  assertMeasuredAnalysisOptions(options.analysis);
1033
1027
  const inputFindings = assertProposalFindings(options.improvement.findings ?? [], "profile improvement input findings");
1034
1028
  const costLedger = createProfileImprovementCostLedger(options.budgetUsd);
@@ -1255,8 +1249,7 @@ function assertEvidenceMaterialDigest(evidence, label) {
1255
1249
  const bytes = canonicalCandidateBytes$1(evidence.material);
1256
1250
  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
1251
  }
1258
- //#endregion
1259
- //#region src/intelligence/exact-process-candidate.ts
1252
+ // src/intelligence/exact-process-candidate.ts
1260
1253
  /** Candidate surfaces implemented by the neutral exact-process executor. */
1261
1254
  const exactProcessCandidateExperimentExecutionSupport = Object.freeze({
1262
1255
  outcomes: Object.freeze(["output"]),
@@ -1277,8 +1270,9 @@ const exactProcessCandidateExperimentExecutionSupport = Object.freeze({
1277
1270
  });
1278
1271
  /** Execute one signed experiment cell through any declared exact-process provider. */
1279
1272
  function createExactProcessCandidateExperimentExecutor(options) {
1273
+ const provider = resolveAgentEnvironmentProvider(options.provider, options.providerRegistry);
1280
1274
  const executor = exactProcessProviderAsCandidateExecutor({
1281
- provider: resolveAgentEnvironmentProvider(options.provider, options.providerRegistry),
1275
+ provider,
1282
1276
  resources: options.resources,
1283
1277
  ...options.providerOptions ? { providerOptions: options.providerOptions } : {},
1284
1278
  ...options.provisionTimeoutMs === void 0 ? {} : { provisionTimeoutMs: options.provisionTimeoutMs },
@@ -1327,8 +1321,7 @@ function createProtectedExactProcessCandidateExperimentExecutor(options) {
1327
1321
  })
1328
1322
  });
1329
1323
  }
1330
- //#endregion
1331
- //#region src/intelligence/profile-activation.ts
1324
+ // src/intelligence/profile-activation.ts
1332
1325
  /**
1333
1326
  * Compare product-owned profiles with an exact measured transition and prepare
1334
1327
  * all-or-none replacements. The product owns locking, persistence, and retained
@@ -1489,8 +1482,7 @@ function assertUniqueProfileTargets(targets) {
1489
1482
  const targetKeys = targets.map((target) => `${target.identity}\u0000${target.surface}`);
1490
1483
  if (new Set(targetKeys).size !== targetKeys.length) throw new Error("agent profile activation repeats a target");
1491
1484
  }
1492
- //#endregion
1493
- //#region src/intelligence/with-intelligence.ts
1485
+ // src/intelligence/with-intelligence.ts
1494
1486
  function summarizeRuntimeEvents(events) {
1495
1487
  const summary = createRuntimeUsageTotals();
1496
1488
  for (const event of events) {
@@ -1667,8 +1659,7 @@ function withIntelligence(agent, config) {
1667
1659
  wrapped.flush = client.flush;
1668
1660
  return wrapped;
1669
1661
  }
1670
- //#endregion
1671
- //#region src/intelligence/index.ts
1662
+ // src/intelligence/index.ts
1672
1663
  function resolveEffortConfig(effort) {
1673
1664
  if (effort === void 0) return resolveEffort(defaultEffortTier);
1674
1665
  if (typeof effort === "string") return resolveEffort(effort);
@@ -1829,7 +1820,6 @@ function createIntelligenceClient(config) {
1829
1820
  }
1830
1821
  };
1831
1822
  }
1832
- //#endregion
1833
1823
  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
1824
 
1835
1825
  //# sourceMappingURL=intelligence.js.map