@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.
- package/dist/{activation-wBipBkCf.d.ts → activation-BidzGkUQ.d.ts} +2 -24
- package/dist/{activation-tNGW73Y9.js → activation-C6zNC2kx.js} +12 -14
- package/dist/{activation-tNGW73Y9.js.map → activation-C6zNC2kx.js.map} +1 -1
- package/dist/agent.d.ts +8 -12
- package/dist/agent.js +9 -12
- package/dist/agent.js.map +1 -1
- package/dist/{analyst-loop-DZw5QWT9.js → analyst-loop-BZvXCDKy.js} +2 -3
- package/dist/{analyst-loop-DZw5QWT9.js.map → analyst-loop-BZvXCDKy.js.map} +1 -1
- package/dist/analyst-loop.d.ts +3 -5
- package/dist/analyst-loop.js +1 -2
- package/dist/{bundle-1xaJEgjq.js → bundle-DeDkJbsr.js} +3 -4
- package/dist/{bundle-1xaJEgjq.js.map → bundle-DeDkJbsr.js.map} +1 -1
- package/dist/candidate-execution/index.d.ts +13 -33
- package/dist/candidate-execution/index.js +16 -18
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/chat-turn.d.ts +2 -0
- package/dist/chat-turn.js +1 -0
- package/dist/{coordination-manager-B2Z_MmL9.js → coordination-manager-B7QadgrI.js} +101 -132
- package/dist/{coordination-manager-B2Z_MmL9.js.map → coordination-manager-B7QadgrI.js.map} +1 -1
- package/dist/{delegate-Dr-63jFl.js → delegate-CoscoyEo.js} +19 -21
- package/dist/delegate-CoscoyEo.js.map +1 -0
- package/dist/durable.d.ts +16 -149
- package/dist/durable.js +57 -980
- package/dist/durable.js.map +1 -1
- package/dist/{errors-DodWX-cb.js → errors-AzSuGI23.js} +5 -3
- package/dist/errors-AzSuGI23.js.map +1 -0
- package/dist/execution-handle-Bd2_nUB6.js +167 -0
- package/dist/execution-handle-Bd2_nUB6.js.map +1 -0
- package/dist/execution-handle-CujvqgCn.d.ts +130 -0
- package/dist/{graph-DPejYB3C.js → graph-mojMML8e.js} +192 -14
- package/dist/graph-mojMML8e.js.map +1 -0
- package/dist/{improve-DwSahPi1.js → improve-Dm5ZE8mr.js} +36 -53
- package/dist/{improve-DwSahPi1.js.map → improve-Dm5ZE8mr.js.map} +1 -1
- package/dist/{improvement-adapter-sIthWkcN.d.ts → improvement-adapter-D5GRU1eY.d.ts} +2 -6
- package/dist/index.d.ts +41 -89
- package/dist/index.js +45 -61
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +39 -59
- package/dist/intelligence.js +24 -33
- package/dist/intelligence.js.map +1 -1
- package/dist/journal-store-BJPMUydp.js +3925 -0
- package/dist/journal-store-BJPMUydp.js.map +1 -0
- package/dist/kernel.d.ts +5 -5
- package/dist/kernel.js +12 -11
- package/dist/{loop-runner-CP6MfO1b.js → loop-runner-5cL_vZi0.js} +5 -6
- package/dist/{loop-runner-CP6MfO1b.js.map → loop-runner-5cL_vZi0.js.map} +1 -1
- package/dist/{loop-runner-C6pGq-2l.d.ts → loop-runner-DyLD-aNb.d.ts} +3 -5
- package/dist/loop-runner-bin.d.ts +5 -8
- package/dist/loop-runner-bin.js +2 -3
- package/dist/mcp/bin.js +6 -8
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +8 -18
- package/dist/mcp/index.js +17 -25
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +4 -6
- package/dist/mcp/memory-bin.js.map +1 -1
- package/dist/{model-policy-CyCUwHed.js → model-policy-C-RGAUW4.js} +11 -13
- package/dist/{model-policy-CyCUwHed.js.map → model-policy-C-RGAUW4.js.map} +1 -1
- package/dist/placement.d.ts +12 -14
- package/dist/placement.js +1 -2
- package/dist/platform.d.ts +7 -13
- package/dist/platform.js +3 -6
- package/dist/platform.js.map +1 -1
- package/dist/{prepare-B9wWffjO.js → prepare-XWwsOh8O.js} +50 -69
- package/dist/{prepare-B9wWffjO.js.map → prepare-XWwsOh8O.js.map} +1 -1
- package/dist/{profile-JLJd2wFG.js → profile-C01SQZKa.js} +58 -92
- package/dist/profile-C01SQZKa.js.map +1 -0
- package/dist/{profile-materialization-bPm0gGLO.d.ts → profile-materialization-BRY22Oh8.d.ts} +1 -3
- package/dist/profiles.d.ts +25 -12
- package/dist/profiles.js +52 -11
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-DVVh-hEk.d.ts → protected-model-port-IKqhTypD.d.ts} +2 -14
- package/dist/{protected-redaction-DFCeo4vg.js → protected-redaction-DilFZch5.js} +2 -3
- package/dist/{protected-redaction-DFCeo4vg.js.map → protected-redaction-DilFZch5.js.map} +1 -1
- package/dist/{provision-supervisor-C4v2vqDo.js → provision-supervisor-D9pO-iPl.js} +11 -15
- package/dist/{provision-supervisor-C4v2vqDo.js.map → provision-supervisor-D9pO-iPl.js.map} +1 -1
- package/dist/{run-cancellation-CzFhQGMa.js → run-cancellation-CoJRKvih.js} +6 -7
- package/dist/{run-cancellation-CzFhQGMa.js.map → run-cancellation-CoJRKvih.js.map} +1 -1
- package/dist/{runtime-CsvGCQpl.js → runtime-BJPXHWbc.js} +652 -215
- package/dist/runtime-BJPXHWbc.js.map +1 -0
- package/dist/{runtime-hooks-tXpAarhW.js → runtime-hooks-CsW2pfFk.js} +2 -3
- package/dist/{runtime-hooks-tXpAarhW.js.map → runtime-hooks-CsW2pfFk.js.map} +1 -1
- package/dist/{runtime-hooks-nsqxSUFL.d.ts → runtime-hooks-ZQqPw-0g.d.ts} +1 -3
- package/dist/{sandbox-profile-compat-DtuJWFrM.js → sandbox-profile-compat-CXjozdWL.js} +52 -653
- package/dist/sandbox-profile-compat-CXjozdWL.js.map +1 -0
- package/dist/{search-executor-CCb82Umc.js → search-executor-CQEHMXoT.js} +12 -15
- package/dist/{search-executor-CCb82Umc.js.map → search-executor-CQEHMXoT.js.map} +1 -1
- package/dist/{server-CKPwZU-I.js → server-U9NGgudQ.js} +19 -30
- package/dist/{server-CKPwZU-I.js.map → server-U9NGgudQ.js.map} +1 -1
- package/dist/{structural-rollout-DylC_fwU.js → structural-rollout-wMSxE7bn.js} +71 -70
- package/dist/structural-rollout-wMSxE7bn.js.map +1 -0
- package/dist/{substrate-CGDFTSRh.js → substrate-Db2pp6y3.js} +2 -3
- package/dist/{substrate-CGDFTSRh.js.map → substrate-Db2pp6y3.js.map} +1 -1
- package/dist/{supervise-BGfm2GlY.js → supervise-CNNhX0ab.js} +460 -195
- package/dist/supervise-CNNhX0ab.js.map +1 -0
- package/dist/supervision-discovery-CewADdEs.js +772 -0
- package/dist/supervision-discovery-CewADdEs.js.map +1 -0
- package/dist/{supervisor-wS9Ehz_x.js → supervisor-rK5Y8en6.js} +521 -4320
- package/dist/supervisor-rK5Y8en6.js.map +1 -0
- package/dist/{task-queue-0fKkoweu.d.ts → task-queue-kefGy79U.d.ts} +1 -3
- package/dist/task-queue.d.ts +1 -1
- package/dist/task-queue.js +1 -2
- package/dist/testing.d.ts +7 -15
- package/dist/testing.js +241 -244
- package/dist/testing.js.map +1 -1
- package/dist/tool-loop.d.ts +16 -19
- package/dist/tool-loop.js +2 -3
- package/dist/{tool-server-XV4aJwoQ.js → tool-server-CZWd_Opp.js} +3 -4
- package/dist/{tool-server-XV4aJwoQ.js.map → tool-server-CZWd_Opp.js.map} +1 -1
- package/dist/{top-snapshot-CflmaDgk.js → top-snapshot-DcV7VG4m.js} +179 -163
- package/dist/top-snapshot-DcV7VG4m.js.map +1 -0
- package/dist/tui/bin.js +50 -81
- package/dist/tui/bin.js.map +1 -1
- package/dist/tui/index.d.ts +27 -58
- package/dist/tui/index.js +2 -2
- package/dist/{types-C8BGOCBn.d.ts → types-0uzVKtFW.d.ts} +388 -484
- package/dist/{types-Cwrea-bU.d.ts → types-qsqfyQoY.d.ts} +1 -3
- package/dist/util-ebWMWzY0.js +624 -0
- package/dist/util-ebWMWzY0.js.map +1 -0
- package/dist/workspace-store/index.d.ts +12 -22
- package/dist/workspace-store/index.js +13 -10
- package/dist/workspace-store/index.js.map +1 -1
- package/dist/{workspace-streams-BiS4ABah.d.ts → workspace-streams-Dq2Fzk3c.d.ts} +1 -11
- package/package.json +31 -26
- package/skills/agent-graphs/SKILL.md +17 -4
- package/skills/be-ambitious/SKILL.md +46 -0
- package/skills/graph-designer/SKILL.md +9 -2
- package/dist/delegate-Dr-63jFl.js.map +0 -1
- package/dist/errors-DodWX-cb.js.map +0 -1
- package/dist/graph-DPejYB3C.js.map +0 -1
- package/dist/profile-JLJd2wFG.js.map +0 -1
- package/dist/record-events-D93DkpAx.js +0 -263
- package/dist/record-events-D93DkpAx.js.map +0 -1
- package/dist/runtime-CsvGCQpl.js.map +0 -1
- package/dist/sandbox-profile-compat-DtuJWFrM.js.map +0 -1
- package/dist/structural-rollout-DylC_fwU.js.map +0 -1
- package/dist/supervise-BGfm2GlY.js.map +0 -1
- package/dist/supervisor-wS9Ehz_x.js.map +0 -1
- package/dist/top-snapshot-CflmaDgk.js.map +0 -1
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
1062
|
+
//# sourceMappingURL=activation-BidzGkUQ.d.ts.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as defaultStructuralRolloutPolicy } from "./structural-rollout-
|
|
2
|
-
import { F as canonicalCandidateDocument, P as canonicalCandidateDigest$1, R as immutableCandidateValue, V as verifyCanonicalCandidateDocument, z as omitTopLevelDigest } from "./sandbox-profile-compat-
|
|
3
|
-
import { a as applyExactAgentProfileDiff, g as omitUndefinedObjectFields, i as agentCandidateProfileAsAgentProfile, v as parseExactAgentProfile } from "./profile-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
874
|
+
//# sourceMappingURL=activation-C6zNC2kx.js.map
|