@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,11 +1,10 @@
1
- import { Ja as AgentTurnUsage, Jp as ExecutorConfig, Sd as WorkerSlots, W_ as OtelExportConfig, Ya as CollectedAgentTurn, _m as SharedBoxPlacement, af as BudgetPool, vm as SharedBoxPlacementOptions } from "./types-C8BGOCBn.js";
1
+ import { Fm as SharedBoxPlacement, Im as SharedBoxPlacementOptions, Sf as BudgetPool, fm as ExecutorConfig, lo as AgentTurnUsage, lv as OtelExportConfig, uo as CollectedAgentTurn, zd as WorkerSlots } from "./types-0uzVKtFW.js";
2
2
  import { AgentCandidateBundle, AgentCandidateExperiment, AgentImprovementActivation, AgentImprovementActivationIntent, AgentImprovementActivationOutcome, AgentImprovementActivationResult, AgentImprovementActivationTarget, AgentImprovementEvaluation, AgentImprovementProposal, AgentImprovementReview, AgentImprovementReviewDecision, AgentImprovementSurface, AgentProfile, AgentProfileDiff, AgentProfileImprovementChange, AgentProfileImprovementExecutionRef, AgentProfileImprovementExperiment, AgentTrainingReceipt, HarnessType, ReasoningEffort, Sha256Digest } from "@tangle-network/agent-interface";
3
3
  import { CostLedgerHandle, CostReceiptInput, MaximumCharge, PairedPromotionDecision, PendingCostCallView, ProposalFinding, RunRecord } from "@tangle-network/agent-eval";
4
4
  import { ProposalFinding as ProposalFinding$1 } from "@tangle-network/agent-eval/analyst";
5
5
  import { CampaignCellResult, CampaignScenarioIdentity, CampaignStorage, CompareOptimizationMethodsOptions, OptimizationMethod, OptimizationMethodComparison, Scenario, SearchAllocator, SearchCellResult, SearchCellStage, SearchClaim, SearchClaimVerification, SearchHistoryReceipt, SearchLane, SearchModelIdentity, SearchPolicy, SearchSourceRef, SearchSplit, SearchStateView, SurfaceProposer, WorktreeAdapter } from "@tangle-network/agent-eval/campaign";
6
6
  import { DispatchContext, MutableSurface as MutableSurface$1, Scenario as Scenario$1, SelfImproveBudget, SelfImproveOptions, SelfImproveProposerResult } from "@tangle-network/agent-eval/contract";
7
7
  import { EvaluationClaim, SealedExperiment } from "@tangle-network/agent-eval/experiment";
8
- //#region src/improvement/improvement-driver.d.ts
9
8
  /** The byte-producing path that differs between the cheap
10
9
  * reflective path and the full agentic path. A generator makes (uncommitted)
11
10
  * changes inside `worktreePath`; the driver commits them via the worktree
@@ -48,8 +47,6 @@ interface CandidateGenerator {
48
47
  rationale?: string;
49
48
  }>;
50
49
  }
51
- //#endregion
52
- //#region src/improvement/agentic-generator.d.ts
53
50
  /**
54
51
  * Outcome of verifying a candidate worktree.
55
52
  *
@@ -204,13 +201,9 @@ declare function agenticGenerator(opts: AgenticGeneratorOptions): CandidateGener
204
201
  * binary or spawn fault throws (a setup bug, not a failed candidate — no
205
202
  * silent fallback). */
206
203
  declare function commandVerifier(command: string, args?: string[], timeoutMs?: number): Verifier;
207
- //#endregion
208
- //#region src/improvement/profile-types.d.ts
209
204
  type DeepReadonly<T> = T extends ((...args: never[]) => unknown) ? T : T extends readonly (infer TItem)[] ? readonly DeepReadonly<TItem>[] : T extends object ? { readonly [TKey in keyof T]: DeepReadonly<T[TKey]>; } : T;
210
205
  /** Complete immutable profile value used during measured execution. */
211
206
  type ReadonlyAgentProfile = DeepReadonly<AgentProfile>;
212
- //#endregion
213
- //#region src/improvement/search-executor.d.ts
214
207
  /** What a lane's slots are. */
215
208
  type SearchLaneKind = 'shared-box' | 'dedicated' | 'subscription' | 'router';
216
209
  /** An execution lane: slots that share one cost rule, and the profiles they cannot run. */
@@ -312,8 +305,6 @@ interface SearchCellContext {
312
305
  type SearchTraceOptions = 'off' | {
313
306
  readonly otlp: OtelExportConfig;
314
307
  };
315
- //#endregion
316
- //#region src/improvement/improve-types.d.ts
317
308
  /** The executable agent lever `improve` optimizes — every surface a proposal can name
318
309
  * (`AgentImprovementSurface`) except `knowledge`, which the corpus lane owns and `improve`
319
310
  * does not produce. Deriving it means every surface `improve` produces can also be reported, which
@@ -694,8 +685,6 @@ interface ImproveCodeResult<TScenario extends Scenario$1, TArtifact> extends Imp
694
685
  raw: SelfImproveProposerResult<TScenario, TArtifact>;
695
686
  }
696
687
  type ImproveResult<TScenario extends Scenario$1, TArtifact> = ImproveMethodResult | ImproveSearchResult | ImproveCodeResult<TScenario, TArtifact>;
697
- //#endregion
698
- //#region src/improvement/training.d.ts
699
688
  interface ProfileTrainerRequest {
700
689
  version: 1;
701
690
  invocationId: string;
@@ -791,8 +780,6 @@ interface ControlledTrainingCommand {
791
780
  }
792
781
  /** Execute one pinned command without a shell, in the runtime-owned job directory. POSIX only. */
793
782
  declare function createCommandProfileTrainer(input: ControlledTrainingCommand): ProfileTrainer;
794
- //#endregion
795
- //#region src/improvement/search-decision.d.ts
796
783
  /** What Runtime decided about a closed search. */
797
784
  interface SearchShipDecision {
798
785
  decision: 'ship' | 'hold';
@@ -838,8 +825,6 @@ interface SearchImprovementDecision extends SearchShipDecision {
838
825
  * a registry promotion, or to re-decide one that an earlier rule held.
839
826
  */
840
827
  declare function decideSearchImprovement(options: DecideSearchImprovementOptions): Promise<SearchImprovementDecision>;
841
- //#endregion
842
- //#region src/improvement/search-method.d.ts
843
828
  interface SearchMethodOptions {
844
829
  /** Writes each child surface from the parents the policy chose. It reads the
845
830
  * train split only (`ProposeContext.train` and `summary`); `history` is empty. */
@@ -879,8 +864,6 @@ interface SearchMethodOptions {
879
864
  }
880
865
  /** Build Runtime's native search for `improve(profile, { method })`. */
881
866
  declare function searchMethod(options: SearchMethodOptions): ImproveSearchMethod;
882
- //#endregion
883
- //#region src/improvement/improve.d.ts
884
867
  /** Train and serve a checkpoint without implying that it improved held-out quality. */
885
868
  declare function improve(profile: ReadonlyAgentProfile, opts: ImproveTrainingOptions): Promise<ImproveTrainingResult>;
886
869
  /**
@@ -899,8 +882,6 @@ declare function improve<TScenario extends Scenario$1, TArtifact>(profile: Reado
899
882
  * Optimize repository code through Runtime's isolated worktree path.
900
883
  */
901
884
  declare function improve<TScenario extends Scenario$1, TArtifact>(opts: ImproveCodeRunOptions<TScenario, TArtifact>): Promise<ImproveCodeResult<TScenario, TArtifact>>;
902
- //#endregion
903
- //#region src/intelligence/improvement-surfaces.d.ts
904
885
  /** Agent improvement surfaces delivered as exact `AgentProfileDiff` replacements. */
905
886
  declare const AGENT_IMPROVEMENT_PROFILE_SURFACES: readonly ["prompt", "skills", "tools", "mcp", "hooks", "subagents"];
906
887
  type AgentImprovementProfileSurface = (typeof AGENT_IMPROVEMENT_PROFILE_SURFACES)[number];
@@ -944,8 +925,6 @@ declare function agentImprovementTargetProfileDiffs(target: {
944
925
  * another, then prove the patch preserves the complete candidate state.
945
926
  */
946
927
  declare function agentImprovementProfileDiffs(baselineInput: AgentProfile, candidateInput: AgentProfile, options: AgentImprovementTargetProfileDiffOptions): [AgentProfileDiff, ...AgentProfileDiff[]];
947
- //#endregion
948
- //#region src/intelligence/activation.d.ts
949
928
  interface CreateAgentImprovementActivationResultOptions {
950
929
  completedAt: string;
951
930
  outcome: AgentImprovementActivationOutcome;
@@ -1079,6 +1058,5 @@ declare function verifyAgentImprovementActivation(input: {
1079
1058
  review: unknown;
1080
1059
  activation: unknown;
1081
1060
  }): AgentImprovementActivation;
1082
- //#endregion
1083
1061
  export { ImproveCodeBaseOptions as $, CandidateGenerator as $t, AgentProfileMeasuredSurface as A, SearchPromotion as At, DecideSearchImprovementOptions as B, sharedBoxLane as Bt, verifyAgentImprovementProposal as C, ImproveSearchOptions as Ct, AgentImprovementActivationTargetIdentity as D, ImprovementCodeCandidate as Dt, AGENT_PROFILE_MEASURED_SURFACES as E, ImproveSurface as Et, isAgentImprovementProfileSurface as F, SearchLaneOptions as Ft, ImproveTrainingOptions as G, AgenticGeneratorOptions as Gt, decideSearchImprovement as H, DeepReadonly as Ht, isAgentProfileMeasuredSurface as I, SearchTraceOptions as It, ProfileTrainerRequest as J, AgenticGeneratorShotReceipt as Jt, ImproveTrainingResult as K, AgenticGeneratorShotDisposition as Kt, improve as L, SharedBoxSearchLane as Lt, agentImprovementProfileSurfaceDigest as M, SearchEnvironmentFault as Mt, agentImprovementProfileSurfaceInput as N, SearchLane$1 as Nt, AgentImprovementProfileSurface as O, ImprovementProfileCandidate as Ot, agentImprovementTargetProfileDiffs as P, SearchLaneKind as Pt, ImproveCandidateValidator as Q, commandVerifier as Qt, SearchMethodOptions as R, dedicatedLane as Rt, verifyAgentImprovementActivationResult as S, ImproveSearchMethod as St, AGENT_IMPROVEMENT_PROFILE_SURFACES as T, ImproveSkillsOptions as Tt, CheckpointServingPort as U, ReadonlyAgentProfile as Ut, SearchImprovementDecision as V, subscriptionLane as Vt, ControlledTrainingCommand as W, AgenticGeneratorExecutorForWorktree as Wt, createCommandProfileTrainer as X, VerifyResult as Xt, TrainingBoundaryResult as Y, Verifier as Yt, ImproveCandidateValidationInput as Z, agenticGenerator as Zt, createAgentImprovementActivationResult as _, ImproveResult as _t, AgentImprovementActivationTransitionInput as a, ImproveLineage as at, reviewAgentImprovementProposal as b, ImproveSearchAgent as bt, CreateAgentImprovementActivationOptions as c, ImproveMethodLineage as ct, ExecuteAgentImprovementActivationInput as d, ImproveMethodSource as dt, ImproveCodeOptions as et, ExecuteAgentImprovementActivationOptions as f, ImproveOptimizationRunOptions as ft, createAgentImprovementActivation as g, ImproveProfileSurface as gt, SealedCandidateActivationTransitionInput as h, ImproveProfileComponents as ht, AgentImprovementActivationTransition as i, ImproveCustomCodeGeneratorOptions as it, agentImprovementProfileDiffs as j, SearchCellContext as jt, AgentImprovementTargetProfileDiffOptions as k, SearchDispatchContext as kt, CreateAgentImprovementActivationResultOptions as l, ImproveMethodOptions as lt, ReviewAgentImprovementInput as m, ImproveProfileAgent as mt, AgentImprovementActivationResultStore as n, ImproveCodeRunOptions as nt, AgentProfileImprovementActivationOperation as o, ImproveMethodContext as ot, ProfileImprovementActivationTransitionInput as p, ImproveOptions as pt, ProfileTrainer as q, AgenticGeneratorShotExecution as qt, AgentImprovementActivationTargetPlan as r, ImproveCost as rt, AgentProfileImprovementActivationTargetPlan as s, ImproveMethodFactory as st, AgentImprovementActivationReconciliation as t, ImproveCodeResult as tt, CreateAgentImprovementProposalOptions as u, ImproveMethodResult as ut, createAgentImprovementProposal as v, ImproveRuntimeCodeGeneratorOptions as vt, verifyAgentImprovementReview as w, ImproveSearchResult as wt, verifyAgentImprovementActivation as x, ImproveSearchIdentity as xt, executeAgentImprovementActivation as y, ImproveScenarioPartitions as yt, searchMethod as z, routerLane as zt };
1084
- //# sourceMappingURL=activation-wBipBkCf.d.ts.map
1062
+ //# sourceMappingURL=activation-BidzGkUQ.d.ts.map
@@ -1,11 +1,11 @@
1
- import { a as defaultStructuralRolloutPolicy } from "./structural-rollout-DylC_fwU.js";
2
- import { F as canonicalCandidateDocument, P as canonicalCandidateDigest$1, R as immutableCandidateValue, V as verifyCanonicalCandidateDocument, z as omitTopLevelDigest } from "./sandbox-profile-compat-DtuJWFrM.js";
3
- import { a as applyExactAgentProfileDiff, g as omitUndefinedObjectFields, i as agentCandidateProfileAsAgentProfile, v as parseExactAgentProfile } from "./profile-JLJd2wFG.js";
1
+ import { a as defaultStructuralRolloutPolicy } from "./structural-rollout-wMSxE7bn.js";
2
+ import { F as canonicalCandidateDocument, P as canonicalCandidateDigest$1, R as immutableCandidateValue, V as verifyCanonicalCandidateDocument, z as omitTopLevelDigest } from "./sandbox-profile-compat-CXjozdWL.js";
3
+ import { a as applyExactAgentProfileDiff, g as omitUndefinedObjectFields, i as agentCandidateProfileAsAgentProfile, v as parseExactAgentProfile } from "./profile-C01SQZKa.js";
4
4
  import { agentImprovementActivationResultSchema, agentImprovementActivationSchema, agentImprovementProposalSchema, agentImprovementReviewSchema, agentProfileDiffSchema, agentProfileImprovementExecutionRefSchema, agentProfileImprovementExperimentSchema, agentProfileModelHintsSchema, agentProfileSchema, canonicalAgentProfileDigest, changedProfileImprovementSurfaces, defineAgentProfileDiff, diffAgentProfiles } from "@tangle-network/agent-interface";
5
5
  import { assertProposalFindings } from "@tangle-network/agent-eval/analyst";
6
6
  import { campaignSplitDigestFromIdentities } from "@tangle-network/agent-eval/campaign";
7
7
  import { verifyAgentProfileImprovementExperimentComparison, verifyCandidateExperimentComparison } from "@tangle-network/agent-eval/contract";
8
- //#region src/improvement/rollout-policy.ts
8
+ // src/improvement/rollout-policy.ts
9
9
  /** The profile extensions namespace the policy persists under. */
10
10
  const ROLLOUT_POLICY_EXTENSION = "structural-rollout";
11
11
  const isBoundedInt = (v, min) => typeof v === "number" && Number.isInteger(v) && v >= min;
@@ -61,8 +61,7 @@ function applyRolloutPolicyToProfile(profile, policy) {
61
61
  }
62
62
  };
63
63
  }
64
- //#endregion
65
- //#region src/intelligence/improvement-surfaces.ts
64
+ // src/intelligence/improvement-surfaces.ts
66
65
  const changedSurfaceOrder = [
67
66
  "prompt",
68
67
  "skills",
@@ -178,7 +177,8 @@ function isAgentProfileMeasuredSurface(surface) {
178
177
  * same profile inside a candidate bundle.
179
178
  */
180
179
  function agentImprovementProfileSurfaceInput(profile, surface) {
181
- return immutableCandidateValue(profileSurfaceInput(parseExactAgentProfile(omitUndefinedObjectFields(profile, "agent improvement profile"), "agent improvement profile"), surface));
180
+ const parsed = parseExactAgentProfile(omitUndefinedObjectFields(profile, "agent improvement profile"), "agent improvement profile");
181
+ return immutableCandidateValue(profileSurfaceInput(parsed, surface));
182
182
  }
183
183
  function profileSurfaceInput(profile, surface) {
184
184
  switch (surface) {
@@ -238,7 +238,8 @@ function agentImprovementProfileDiffs(baselineInput, candidateInput, options) {
238
238
  const candidate = parseExactAgentProfile(omitUndefinedObjectFields(candidateInput, "profile improvement candidate"), "profile improvement candidate");
239
239
  if (canonicalAgentProfileDigest(baseline) === canonicalAgentProfileDigest(candidate)) throw new Error("profile improvement candidate does not change the profile");
240
240
  const completeChanges = completeAgentProfileReplacementDiffs(baseline, candidate, options);
241
- if (canonicalAgentProfileDigest(completeChanges.reduce((profile, change) => applyExactAgentProfileDiff(profile, change, "complete profile improvement candidate change"), baseline)) !== canonicalAgentProfileDigest(candidate)) throw new Error("complete profile improvement change did not reproduce the candidate");
241
+ const applied = completeChanges.reduce((profile, change) => applyExactAgentProfileDiff(profile, change, "complete profile improvement candidate change"), baseline);
242
+ if (canonicalAgentProfileDigest(applied) !== canonicalAgentProfileDigest(candidate)) throw new Error("complete profile improvement change did not reproduce the candidate");
242
243
  return completeChanges;
243
244
  }
244
245
  function completeAgentProfileReplacementDiffs(baseline, candidate, options) {
@@ -388,8 +389,7 @@ function opaqueProfileSlice(profile) {
388
389
  ...Object.keys(opaqueResources).length > 0 ? { resources: opaqueResources } : {}
389
390
  };
390
391
  }
391
- //#endregion
392
- //#region src/intelligence/optimization-receipt.ts
392
+ // src/intelligence/optimization-receipt.ts
393
393
  const optimizationReceiptMetadataKey = "optimizationReceipt";
394
394
  /** Build a detached receipt only for methods backed by an identified external optimizer. */
395
395
  function createOptimizationActivationReceipt(improvement) {
@@ -550,8 +550,7 @@ function isOptionalNonNegativeInteger(value) {
550
550
  function isSha256Digest(value) {
551
551
  return typeof value === "string" && /^sha256:[0-9a-f]{64}$/.test(value);
552
552
  }
553
- //#endregion
554
- //#region src/intelligence/activation.ts
553
+ // src/intelligence/activation.ts
555
554
  /** Create the exact result a product stores in the same transaction as its target write. */
556
555
  function createAgentImprovementActivationResult(transition, options) {
557
556
  const activation = verifyCanonicalCandidateDocument(agentImprovementActivationSchema.parse(transition.activation), "agent improvement activation");
@@ -870,7 +869,6 @@ function verifyAgentImprovementActivation(input) {
870
869
  function sameOrderedValues(left, right) {
871
870
  return left.length === right.length && left.every((value, index) => value === right[index]);
872
871
  }
873
- //#endregion
874
872
  export { serializeRolloutPolicy as C, normalizeRolloutPolicy as S, agentImprovementTargetProfileDiffs as _, reviewAgentImprovementProposal as a, isAgentProfileMeasuredSurface as b, verifyAgentImprovementProposal as c, attachOptimizationActivationReceipt as d, createOptimizationActivationReceipt as f, agentImprovementProfileSurfaceInput as g, agentImprovementProfileSurfaceDigest as h, executeAgentImprovementActivation as i, verifyAgentImprovementReview as l, agentImprovementProfileDiffs as m, createAgentImprovementActivationResult as n, verifyAgentImprovementActivation as o, optimizationActivationReceiptFromMetadata as p, createAgentImprovementProposal as r, verifyAgentImprovementActivationResult as s, createAgentImprovementActivation as t, assertNoCallerOptimizationReceipt as u, assertProfileImprovementTargetsShareIdentity as v, structuralRolloutPolicyFromProfile as w, applyRolloutPolicyToProfile as x, isAgentImprovementProfileSurface as y };
875
873
 
876
- //# sourceMappingURL=activation-tNGW73Y9.js.map
874
+ //# sourceMappingURL=activation-C6zNC2kx.js.map