@tangle-network/agent-runtime 0.131.5 → 0.131.7
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/README.md +2 -2
- package/dist/{activation-D-gsrgSq.js → activation-CDKatOlp.js} +3 -3
- package/dist/{activation-D-gsrgSq.js.map → activation-CDKatOlp.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/{authoring-DI778qK7.js → authoring-B-Oe8VUf.js} +2 -2
- package/dist/{authoring-DI778qK7.js.map → authoring-B-Oe8VUf.js.map} +1 -1
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-BNxKr-Bu.js → candidate-execution-DxL_I3xx.js} +4 -4
- package/dist/{candidate-execution-BNxKr-Bu.js.map → candidate-execution-DxL_I3xx.js.map} +1 -1
- package/dist/conversation.d.ts +1 -1
- package/dist/{environment-provider-CxvSd1W6.d.ts → environment-provider-DZihBZx6.d.ts} +3 -3
- package/dist/{environment-provider-Dyg8DtLK.js → environment-provider-mDsjfGjY.js} +2 -2
- package/dist/{environment-provider-Dyg8DtLK.js.map → environment-provider-mDsjfGjY.js.map} +1 -1
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/{graph-CoN60QtH.js → graph-DOfL9TLn.js} +3 -3
- package/dist/{graph-CoN60QtH.js.map → graph-DOfL9TLn.js.map} +1 -1
- package/dist/{improvement-cycle-BGF0osPC.js → improvement-cycle-XtFD7dCv.js} +4 -4
- package/dist/{improvement-cycle-BGF0osPC.js.map → improvement-cycle-XtFD7dCv.js.map} +1 -1
- package/dist/{index-DwGtu9nc.d.ts → index-C-IJR7pR.d.ts} +4 -4
- package/dist/{index-CoO7atyo.d.ts → index-D7UJIX2x.d.ts} +3087 -3064
- package/dist/{index-qYHpsmG2.d.ts → index-qKm5g7mI.d.ts} +3 -3
- package/dist/index.d.ts +9 -9
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +5 -5
- package/dist/intelligence.js +6 -6
- package/dist/kernel.d.ts +7 -7
- package/dist/kernel.js +9 -9
- package/dist/{knowledge-D4zNvxw5.js → knowledge-DPDhKnOz.js} +5 -5
- package/dist/{knowledge-D4zNvxw5.js.map → knowledge-DPDhKnOz.js.map} +1 -1
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-BwgZ8m_7.d.ts → loop-runner-bin-B6g4vOil.d.ts} +3 -3
- package/dist/{loop-runner-bin-CI9Y0sxT.js → loop-runner-bin-DCBho3GJ.js} +3 -3
- package/dist/{loop-runner-bin-CI9Y0sxT.js.map → loop-runner-bin-DCBho3GJ.js.map} +1 -1
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/index.js +5 -5
- package/dist/{openai-tools-CupeHJEv.js → openai-tools-BeVFVJlX.js} +2 -2
- package/dist/{openai-tools-CupeHJEv.js.map → openai-tools-BeVFVJlX.js.map} +1 -1
- package/dist/{openai-tools-D3oMyVGl.d.ts → openai-tools-CzEiSbPW.d.ts} +2 -2
- package/dist/{prepare-DYWjVcPx.js → prepare-BQ82nG06.js} +2 -2
- package/dist/{prepare-DYWjVcPx.js.map → prepare-BQ82nG06.js.map} +1 -1
- package/dist/primeintellect/index.d.ts +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{protected-model-port-48ALLGxT.js → protected-model-port-BAOj4gQN.js} +2 -2
- package/dist/{protected-model-port-48ALLGxT.js.map → protected-model-port-BAOj4gQN.js.map} +1 -1
- package/dist/{redact-9_Gf-8m3.d.ts → redact-CwupS9H2.d.ts} +3 -3
- package/dist/{runtime-ZNVnT8h1.js → runtime-BVKEU5jc.js} +131 -28
- package/dist/runtime-BVKEU5jc.js.map +1 -0
- package/dist/{runtime-D-QfLbSd.d.ts → runtime-DgJZUxql.d.ts} +4 -4
- package/dist/{spawn-journal-saHQzqYi.js → spawn-journal-Cd5L-Ie9.js} +20 -9
- package/dist/spawn-journal-Cd5L-Ie9.js.map +1 -0
- package/dist/{stream-agent-turn-C852AgMT.d.ts → stream-agent-turn-DcDznEnq.d.ts} +3 -3
- package/dist/{structural-rollout-n089ZP33.js → structural-rollout-v8o_EO8_.js} +3 -3
- package/dist/{structural-rollout-n089ZP33.js.map → structural-rollout-v8o_EO8_.js.map} +1 -1
- package/dist/{supervise-msTRhTN7.js → supervise-DzLi985l.js} +24 -6
- package/dist/supervise-DzLi985l.js.map +1 -0
- package/dist/{supervisor-C16p9KqO.js → supervisor-CMtutocL.js} +92 -81
- package/dist/supervisor-CMtutocL.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/{types-ebIY0dMG.d.ts → types-6zHo67jn.d.ts} +13 -1
- package/dist/{types-C6Q-J0Dt.d.ts → types-CIg5DBNF.d.ts} +12 -3
- package/dist/{util-Bw6srryQ.js → util-Dr--8wAL.js} +32 -3
- package/dist/util-Dr--8wAL.js.map +1 -0
- package/dist/{workspace-archive-aOfJ47ms.js → workspace-archive-CGcXL3zA.js} +2 -2
- package/dist/{workspace-archive-aOfJ47ms.js.map → workspace-archive-CGcXL3zA.js.map} +1 -1
- package/package.json +4 -4
- package/dist/runtime-ZNVnT8h1.js.map +0 -1
- package/dist/spawn-journal-saHQzqYi.js.map +0 -1
- package/dist/supervise-msTRhTN7.js.map +0 -1
- package/dist/supervisor-C16p9KqO.js.map +0 -1
- package/dist/util-Bw6srryQ.js.map +0 -1
package/dist/intelligence.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { b as LoopTraceEvent, it as RuntimeStreamEvent } from "./types-
|
|
1
|
+
import { b as LoopTraceEvent, it as RuntimeStreamEvent } from "./types-6zHo67jn.js";
|
|
2
2
|
import { d as RunAnalystLoopOpts, f as RunAnalystLoopResult } from "./types-zWfqDjeL.js";
|
|
3
|
-
import { Pt as RuntimeTelemetryOptions } from "./types-
|
|
4
|
-
import { q as ToolSpec } from "./runtime-
|
|
5
|
-
import { a as AgentEnvironmentProviderRef, o as AgentEnvironmentProviderRegistry } from "./environment-provider-
|
|
3
|
+
import { Pt as RuntimeTelemetryOptions } from "./types-CIg5DBNF.js";
|
|
4
|
+
import { q as ToolSpec } from "./runtime-DgJZUxql.js";
|
|
5
|
+
import { a as AgentEnvironmentProviderRef, o as AgentEnvironmentProviderRegistry } from "./environment-provider-DZihBZx6.js";
|
|
6
6
|
import { T as AgentCandidateExecutionClaimStore, _ as PrepareAgentCandidateExecutionOptions, o as CreateProtectedAgentCandidateModelPortOptions, p as parseAgentCandidateProfileActivation, y as ExecutePreparedAgentCandidateOptions } from "./protected-model-port-CoJOiINX.js";
|
|
7
7
|
import { D as AgentCandidateTaskExecution, E as AgentCandidateRunFinalization, a as AgentCandidateExecutionPorts, c as AgentCandidateExecutorPort, r as AgentCandidateBenchmarkGraderPort, y as AgentCandidateOutputArtifactPort } from "./types-BaIpb0XT.js";
|
|
8
|
-
import { D as ImproveScenarioPartitions, T as ImproveResult, _ as ImproveMethodOptions, n as defaultRedactor, r as resolveRedactor, t as Redactor, v as ImproveMethodResult, x as ImproveOptions } from "./redact-
|
|
8
|
+
import { D as ImproveScenarioPartitions, T as ImproveResult, _ as ImproveMethodOptions, n as defaultRedactor, r as resolveRedactor, t as Redactor, v as ImproveMethodResult, x as ImproveOptions } from "./redact-CwupS9H2.js";
|
|
9
9
|
import { a as AgentImprovementActivationTransitionInput, c as CreateAgentImprovementActivationResultOptions, d as ProfileImprovementActivationTransitionInput, f as SealedCandidateActivationTransitionInput, h as verifyAgentImprovementActivationResult, i as AgentImprovementActivationTransition, l as ExecuteAgentImprovementActivationInput, m as executeAgentImprovementActivation, n as AgentImprovementActivationResultStore, o as AgentProfileImprovementActivationOperation, p as createAgentImprovementActivationResult, r as AgentImprovementActivationTargetPlan, s as AgentProfileImprovementActivationTargetPlan, t as AgentImprovementActivationReconciliation, u as ExecuteAgentImprovementActivationOptions } from "./activation-DyWB0K6E.js";
|
|
10
10
|
import { CostLedgerHandle, TraceStore } from "@tangle-network/agent-eval";
|
|
11
11
|
import { OptimizationMethodComparison, OptimizationPackageSource, OptimizationTokenUsage } from "@tangle-network/agent-eval/campaign";
|
package/dist/intelligence.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { $ as parseExactAgentProfile, K as applyExactAgentProfileDiff, Q as parseAgentCandidateProfileActivation, Z as omitUndefinedObjectFields, rt as canonicalCandidateDigest$1, st as immutableCandidateValue, u as AGENT_CANDIDATE_EXECUTION_SUPPORT } from "./prepare-
|
|
2
|
-
import { n as exactProcessProviderAsCandidateExecutor, t as createProtectedAgentCandidateModelPort } from "./protected-model-port-
|
|
3
|
-
import { dt as buildRuntimeEventOtelSpans, ht as flatOtelSpan, lt as buildLoopOtelSpans, pt as createOtelExporter } from "./supervisor-
|
|
4
|
-
import { i as resolveAgentEnvironmentProvider } from "./environment-provider-
|
|
5
|
-
import { D as buildAgentImprovementActivationTargets, E as assertProfileImprovementTargetsShareIdentity, O as isAgentImprovementProfileSurface, _ as AGENT_IMPROVEMENT_PROFILE_SURFACES, a as executeAgentCandidateExperimentCell, b as agentImprovementProfileSurfaceDigest, d as verifyAgentImprovementActivation, f as verifyAgentImprovementProposal, g as optimizationActivationReceiptFromMetadata, h as createOptimizationActivationReceipt, i as createAgentImprovementProposal, k as isAgentProfileMeasuredSurface, l as reviewAgentImprovementProposal, m as verifyCandidateExecutionEvidence, n as createAgentImprovementActivation, o as proposeAgentImprovement, p as verifyAgentImprovementReview, r as createAgentImprovementMeasuredComparison, s as proposeAgentProfileImprovement, t as AgentCandidateExperimentCellExecutionError, u as runAgentCandidateExperiment, v as AGENT_PROFILE_MEASURED_SURFACES, w as agentImprovementTargetProfileDiffs, x as agentImprovementProfileSurfaceInput, y as agentImprovementProfileDiffs } from "./improvement-cycle-
|
|
1
|
+
import { $ as parseExactAgentProfile, K as applyExactAgentProfileDiff, Q as parseAgentCandidateProfileActivation, Z as omitUndefinedObjectFields, rt as canonicalCandidateDigest$1, st as immutableCandidateValue, u as AGENT_CANDIDATE_EXECUTION_SUPPORT } from "./prepare-BQ82nG06.js";
|
|
2
|
+
import { n as exactProcessProviderAsCandidateExecutor, t as createProtectedAgentCandidateModelPort } from "./protected-model-port-BAOj4gQN.js";
|
|
3
|
+
import { dt as buildRuntimeEventOtelSpans, ht as flatOtelSpan, lt as buildLoopOtelSpans, pt as createOtelExporter } from "./supervisor-CMtutocL.js";
|
|
4
|
+
import { i as resolveAgentEnvironmentProvider } from "./environment-provider-mDsjfGjY.js";
|
|
5
|
+
import { D as buildAgentImprovementActivationTargets, E as assertProfileImprovementTargetsShareIdentity, O as isAgentImprovementProfileSurface, _ as AGENT_IMPROVEMENT_PROFILE_SURFACES, a as executeAgentCandidateExperimentCell, b as agentImprovementProfileSurfaceDigest, d as verifyAgentImprovementActivation, f as verifyAgentImprovementProposal, g as optimizationActivationReceiptFromMetadata, h as createOptimizationActivationReceipt, i as createAgentImprovementProposal, k as isAgentProfileMeasuredSurface, l as reviewAgentImprovementProposal, m as verifyCandidateExecutionEvidence, n as createAgentImprovementActivation, o as proposeAgentImprovement, p as verifyAgentImprovementReview, r as createAgentImprovementMeasuredComparison, s as proposeAgentProfileImprovement, t as AgentCandidateExperimentCellExecutionError, u as runAgentCandidateExperiment, v as AGENT_PROFILE_MEASURED_SURFACES, w as agentImprovementTargetProfileDiffs, x as agentImprovementProfileSurfaceInput, y as agentImprovementProfileDiffs } from "./improvement-cycle-XtFD7dCv.js";
|
|
6
6
|
import { r as resolveRedactor, t as defaultRedactor } from "./redact-D-u-rrcn.js";
|
|
7
|
-
import { n as executeAgentImprovementActivation, r as verifyAgentImprovementActivationResult, t as createAgentImprovementActivationResult } from "./activation-
|
|
7
|
+
import { n as executeAgentImprovementActivation, r as verifyAgentImprovementActivationResult, t as createAgentImprovementActivationResult } from "./activation-CDKatOlp.js";
|
|
8
8
|
import { contentHash } from "@tangle-network/agent-eval";
|
|
9
9
|
import { agentProfileImprovementArmSchema, applyAgentProfileDiff, defineAgentProfilePublicConfig } from "@tangle-network/agent-interface";
|
|
10
10
|
//#region src/intelligence/delivery.ts
|
package/dist/kernel.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as MountRecorder, D as SelectionReceipt, E as SandboxClient, O as ValidationCtx, S as MountManifestEntry, T as RunProvenance, _ as LoopTeardownFailedPayload, a as Iteration, b as LoopTraceEvent, c as LoopIterationDispatchPayload, d as LoopLineageOptions, f as LoopPlanDescription, g as LoopStartedPayload, h as LoopSandboxPlacement, i as ExecCtx, k as Validator, l as LoopIterationEndedPayload, m as LoopResult, n as DefaultVerdict, o as LoopDecisionPayload, p as LoopPlanPayload, r as Driver, s as LoopEndedPayload, t as AgentRunSpec, u as LoopIterationStartedPayload, v as LoopTokenUsage, w as OutputAdapter, x as LoopWinner, y as LoopTraceEmitter } from "./types-
|
|
2
|
-
import { $ as legacySupervisorRunsRoot, $a as sanitizeMcpToolSchema, $c as areaUnderCurve, $d as DeliverableSpec, $i as openSandboxRun, $n as ProgressTrackerOptions, $o as InProcessSandboxClientOptions, $r as RepairStop, $s as LoopShape, $t as delegatesWorkerBriefPrompt, A as GitWorkspaceOptions, Aa as registerShape, Ac as Interval, Ai as runStrategyEvolution, An as SupervisorProfile, Ao as runAgentic, Ar as chatWorkerSeam, As as PanelSpec, At as runGraph, B as analyzeTrace, Ba as pipeline, Bc as renderLeaderboardHtml, Bi as McpSpawnFault, Bn as DriverProgressMark, Bo as runAgentRounds, Br as ProfileRichness, Bs as TrajectoryNode, Bt as supervise, C as closingWorkerNote, Ca as profileOptimizerModelCall, Cc as CompletionVerdict, Ci as EvolutionCandidate, Cn as ResolveDriveHarness, Co as StrategyShotResult, Cr as PriorCoordination, Cs as FanoutWinnerSelector, Ct as GraphEdgeCapError, D as UntrackedCopyStats, Da as trajectoryReport, Dc as stopSentinel, Di as StrategyEvolutionConfig, Do as defineStrategy, Dr as ChatTransportTool, Ds as LoopUntilState, E as CopyOptions, Ea as equalKOnCost, Ec as sentinelCompletion, Ei as ReproductionCheck, En as SupervisorAgentDeps, Eo as breadthStrategy, Er as ChatTransportExecutorOptions, Es as LoopUntilSpec, Et as RunGraphOptions, F as gitWorkspace, Fa as renderCorpusToInstructions, Fc as PairwiseVerdict, Fi as authorStrategy, Fn as supervisorAgent, Fo as LoopOptionsForDispatch, Fr as ReservationRejection, Fs as RenderCorpusToInstructionsOptions, Ft as DeliverableResolutionInput, G as workerTraceAnalysisStore, Ga as RegistryAnalyzeProjection, Gc as AuditIntentOptions, Gd as BusRecord, Gi as materializeLocalMcp, Go as envKeyProvider, Gr as profileRichnessFinding, Gs as VerifySpec, Gt as SupervisorSpanOutcome, H as WorkerToolTraceArtifact, Ha as verify, Hc as renderLeaderboardSvg, Hi as StdioMcpConnection, Hn as classifyDriverFailure, Ho as localSandboxClient, Hr as asAuthoredProfile, Hs as TrajectoryReportFn, Ht as workerFromBackend, I as jjWorkspace, Ia as fanout, Ic as ProfileKeyOf, Ii as strategyAuthorContract, Il as normalizeAnalyzeOnSettle, Io as loopCampaignDispatch, Ir as ReservationTicket, Is as ScopeAnalyst, It as SuperviseOptions, J as ScopeArgs, Ja as createScopeAnalyst, Jc as defaultAuditorInstruction, Jd as PublishOptions, Ji as OpenSandboxRunOptions, Jn as AllWorkersStalledOptions, Jo as resolveSecretEnv, Jr as CheckOutcome, Js as WidenLineage, Jt as PromptHandle, K as createRootHandle, Ka as assertTraceDerivedFindings, Kc as IntentAudit, Kd as BusStats, Ki as Deliverable, Ko as mcpSecretEnvMetadataKey, Kr as supervisorInstructions, Ks as Widen, Kt as SupervisorSpanRecorder, L as localShell, La as flatWidenGate, Lc as ScoreOf, Li as strategyAuthorSystemPrompt, Ln as DriverAttemptRecord, Lo as loopDispatch, Lr as createBudgetPool, Ls as ScopeAnalyzeInput, Lt as SuperviseRegistry, M as Workspace, Ma as runPersonified, Mc as LeaderboardOptions, Mi as AuthorStrategyOptions, Ml as WorkerSpawnContext, Mn as SupervisorToolInvocationContext, Mo as sampleThenRefine, Mr as BudgetPool, Ms as Pipeline, Mt as AuthorizedSpawn, N as WorkspaceCommit, Na as FileCorpus, Nc as LeaderboardRow, Ni as AuthoredStrategy, Nl as WorkerWatchOptions, Nn as assertCoordinationBinding, No as LoopCampaignDispatchOptions, Nr as BudgetPoolRestore, Ns as PipelineStage, Nt as AuthorizedSpawnContext, O as copyUntrackedIntoClone, Oa as builtinShapes, Oc as AxisScoresOf, Oi as discriminatingMeans, On as SupervisorNodeContext, Oo as depthStrategy, Or as ChatWorkerSeamOptions, Os as Panel, Ot as TraversalContinuity, P as WorkspaceRun, Pa as InMemoryCorpus, Pc as PairwiseOptions, Pi as assertStrategyContract, Pl as canonicalFindingEvent, Pn as resolveSupervisorProfile, Po as LoopDispatchOptions, Pr as BudgetReadout, Ps as RenderCorpusToInstructions, Pt as DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, Q as legacySupervisorRunDir, Qa as createMcpEnvironment, Qc as anytimeReport, Qd as watchTrace, Qi as TurnResult, Qn as ProgressTracker, Qo as InProcessPromptCtx, Qr as CheckSourceCtx, Qs as DefinePersonaInput, Qt as createPromptRegistry, R as runInWorkspace, Ra as loopUntil, Rc as leaderboard, Ri as LocalMcpMaterialization, Rn as DriverAttemptStop, Ro as RunAgentRoundsOptions, Rr as spendFromUsageEvents, Rs as ScopeWidenGate, Rt as SuperviseRegistryTable, S as WorkerEvidenceInput, Sa as profileChatClient, Sc as CompletionPolicy, Si as EvolutionBandInfo, Sl as MakeWorkerAgent, Sn as ObserveSupervisorNodeEvent, So as StrategyResult, Sr as FileCoordinationLog, Ss as FanoutSynthesis, St as GraphEdge, T as settledWorkerOut, Ta as assertProfileModelsAllowed, Tc as deterministicCompletion, Ti as EvolutionReport, Tn as ResolvedSupervisorProfile, To as adaptiveRefine, Tr as ChatSessionStore, Ts as LoopUntil, Tt as GraphResult, U as captureWorkerTraceEvidence, Ua as widen, Uc as renderPairwiseMarkdown, Ui as StdioMcpServerSpec, Un as CoordinationMcpHandle, Uo as KeyProvider, Ur as assessAuthoredProfile, Us as TrajectoryReportOptions, Ut as SupervisorSpanAttributes, V as WORKER_TOOL_TRACE_SCHEMA_VERSION, Va as selectValidWinner, Vc as renderLeaderboardMarkdown, Vi as McpToolDescriptor, Vn as DriverRetryPolicy, Vo as LocalSandboxClientOptions, Vr as ProfileRichnessThresholds, Vs as TrajectoryReport, W as parseWorkerToolTraceArtifact, Wa as CreateScopeAnalystOptions, Wc as AuditIntentInput, Wd as BusEvent, Wi as connectStdioMcp, Wn as serveCoordinationMcp, Wo as ResolvedMcpServerLaunch, Wr as defaultProfileRichnessThresholds, Ws as Verify, Wt as SupervisorSpanOptions, X as settledToIteration, Xa as McpEndpoint, Xc as AnytimeStrategySummary, Xd as WatchTraceOptions, Xi as SandboxRun, Xn as PlateauOptions, Xo as inlineSandboxClient, Xr as CheckRunner, Xs as WinnerStrategy, Xt as RegisteredPrompt, Y as createScope, Ya as registryScopeAnalyst, Yc as AnytimeReport, Yd as createEventBus, Yi as OpenSandboxRunPromptOptions, Yn as NoProgressForOptions, Yo as secretEnvOfMcpServer, Yr as CheckRunContext, Ys as WidenSpec, Yt as PromptRegistry, Z as WorkerSteerRequest, Za as McpEnvironmentOptions, Zc as AnytimeTaskCurve, Zd as defaultToolDetectors, Zi as SandboxRunAbortError, Zn as ProgressSample, Zo as InProcessOnPrompt, Zr as CheckSource, Zs as DefinePersona, Zt as analyzesFindingsReportPrompt, _ as WorktreeFanoutOptions, _a as ResolveSandboxClientOptions, _c as LeaderboardScore, _f as contentAddress, _i as visibleCheckScore, _l as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, _n as defaultDelegateBudget, _o as ShotSpec, _r as runFinalizer, _s as EqualKOnCost, _t as WorktreePatchArtifact, a as SandboxInstance, aa as createSandboxLineage, ac as RunPersonifiedOptions, af as InMemoryResultBlobStore, ai as canDisplace, al as WaterfallSpan, an as promptHandle, ao as BenchmarkTaskRow, ar as anyOf, as as Observation, at as workerControlLogFile, b as NOTE_MAX_CHARS, ba as PromotionVerdict, bc as CompletionAnalyst, bi as EvolutionArchiveNode, bl as DownMessageDeliveryOutcome, bn as DriveHarness, bo as StrategyCtx, br as CoordinationLog, bs as Fanout, bt as EdgeDeliveryOutcome, c as VerifierEnvironmentOptions, ca as extractLlmCallEvent, cc as ShapeRegistry, cf as SpawnForestEvent, ci as defaultExtractCandidate, cl as AnalystRegistry, cn as DispatchReport, co as runBenchmark, cr as plateau, cs as defaultAnalystInstruction, ct as writeWorkerSteer, d as SuperviseSurfaceResult, da as sumSandboxUsage, dc as LeaderboardBenchTask, df as SpawnForestNode, di as modelAuthoredChecks, dl as AuthorizedDownMessage, dn as RollingDispatchOptions, do as AgenticSurface, dr as FinalizeContext, ds as AssertTraceDerivedFindings, dt as RunContext, ea as CheckpointCapableBox, ec as Outcome, ef as ExecutorResultMapping, ei as StructuralRolloutConfig, el as bestSoFar, en as dumbContinuationFailPrompt, eo as BenchmarkCell, er as ProgressView, es as inProcessSandboxClient, et as readWorkerSteerRequests, f as SurfaceWorkerConfig, fa as CriuCapableClient, fc as LeaderboardBenchmarkAdapter, ff as SpawnForestTree, fi as officialChecksFromMeta, fl as ContinuationInstruction, fn as effectiveConcurrency, fo as AgenticTask, fr as FinalizerSettled, fs as CombinatorShape, ft as createFileRunContext, g as AuthoredHarness, ga as acquireSandbox, gc as LeaderboardScenario, gf as replaySpawnTree, gi as structuralRollout, gn as DelegateOptions, go as RunAgenticOptions, gr as pickBestDelivered, gs as EqualKArm, gt as WorktreeCliExecutorOptions, h as superviseSurface, ha as AcquireOptions, hc as LeaderboardRunContext, hf as pendingWaits, hi as selectBestIndex, hn as rollingDispatch, ho as CorpusReadbackOptions, hr as collectDelivered, hs as CorpusRecord, ht as patchDelivered, i as SandboxEvent, ia as SessionCapableBox, ic as RunPersonified, if as FileSpawnJournal, ii as VisibleCheck, il as WaterfallReport, in as naiveContinuationPrompt, io as BenchmarkStrategySummary, ir as allWorkersStalled, is as harvestCorpus, it as supervisorWorkersDir, j as Shell, ja as definePersona, jc as Leaderboard, ji as selectChampion, jl as WorkerResumeContext, jn as SupervisorToolDescriptor, jo as sample, jr as createChatSessionStore, js as PanelVerdict, k as withUntrackedArtifacts, ka as createShapeRegistry, kc as GroupOf, ki as pickChampion, kn as SupervisorNodeContextSeed, ko as refine, kr as chatTransportExecutor, ks as PanelJudge, kt as defaultEdgeTraversalCap, l as createVerifierEnvironment, la as mapSandboxEvent, lc as DefinedLeaderboard, lf as SpawnForestInDoubtNode, li as defaultStructuralRolloutPolicy, ll as AnalyzeOnSettleRoute, ln as DispatchStopReason, lo as AgenticOptions, lr as sampleFromSettled, ls as observe, lt as InMemoryRunContext, m as failuresAnalyst, ma as probeSandboxCapabilities, mc as LeaderboardIterationInfo, mf as materializeTreeView, mi as sandboxCheckRunner, ml as CoordinationEvent, mn as queueOf, mo as ArtifactHandle, mr as bestDelivered, ms as CorpusFilter, mt as PatchDeliverableOptions, n as AnalystFinding, na as SandboxLineage, nc as PersonaContext, nf as mapExecutorResult, ni as StructuralRolloutPolicy, nl as renderAnytimeTable, nn as formatPromptHandle, no as BenchmarkLift, nr as StopRule, ns as HarvestFailure, nt as supervisorRunDir, o as computeFindingId, oa as SandboxToolPartState, oc as ShapeBudget, of as InMemorySpawnJournal, oi as compareCheckOutcomes, ol as createWaterfallCollector, on as supervisorPolicyPrompt, oo as Environment, or as createProgressTracker, os as ObserveInput, ot as workerInboxFile, p as SurfaceWorkerOut, pa as SandboxCapabilities, pc as LeaderboardFlagSpec, pf as loadSpawnForest, pi as resolveEntrySymbol, pl as ContinuityMode, pn as freeSlots, po as AgenticTool, pr as SupervisorFinalizer, ps as Corpus, pt as createInMemoryRunContext, q as createSupervisor, qa as buildSteerContext, qc as auditIntent, qd as EventBus, qi as OpenSandboxRunBeforeStartContext, qn as finalizeBestDelivered, qo as resolveMcpServerLaunch, qr as CheckExecChannel, qs as WidenDecision, qt as createSupervisorSpanRecorder, r as CreateSandboxOptions, ra as SandboxLineageHandle, rc as PersonaExecutors, rf as FileResultBlobStore, ri as StructuralRolloutResult, rl as WaterfallCollector, rn as kernelPromptRegistry, ro as BenchmarkReport, rr as allOf, rs as HarvestReport, rt as supervisorRunsRoot, s as makeFinding, sa as createSandboxToolPartState, sc as ShapeContext, sf as SpawnForest, si as composeCheckSources, sl as AnalystFindingEvent, sn as ConcurrencyCaps, so as printBenchmarkReport, sr as noProgressFor, ss as ObserveOptions, st as workerInboxFileFromEventDir, t as AgentProfile, ta as ForkCapableBox, tc as Persona, tf as gateOnDeliverable, ti as StructuralRolloutMessage, tl as plateauLength, tn as dumbContinuationPassPrompt, to as BenchmarkConfig, tr as StopDecision, ts as HarvestCorpusOptions, tt as safeWorkerFile, u as SuperviseSurfaceOptions, ua as mapSandboxToolEvent, uc as LeaderboardBenchScore, uf as SpawnForestMissingTree, ui as filterAuthoredAsserts, ul as AuthorizeDownMessage, un as DispatchUnit, uo as AgenticRunResult, ur as DeliveredOutput, us as renderReport, ut as InMemoryRunContextOptions, v as worktreeFanout, va as resolveSandboxClient, vc as LeaderboardSpec, vi as ChampionPick, vl as DownMessageAuthorizationInput, vn as delegate, vo as Strategy, vr as runTree, vs as EqualKOnCostOptions, vt as createWorktreeCliExecutor, w as composeWorkerEvidence, wa as assertModelAllowed, wc as completionAuthorizes, wi as EvolutionGeneration, wn as ResolveSupervisorTools, wo as SurfaceScore, wr as ChatCompletionsTransport, ws as FlatWidenGate, wt as GraphNode, x as VERIFY_TAIL_CHARS, xa as promotionGate, xc as CompletionEvidence, xi as EvolutionAuthor, xl as DownMessageEvent, xn as DriveHarnessOwnerContext, xo as StrategyMessage, xr as CoordinationOwnerId, xs as FanoutOptions, xt as EdgeTraversal, y as EVIDENCE_MAX_CHARS, ya as PromotionGateOptions, yc as defineLeaderboard, yi as ChampionPolicy, yl as DownMessageDeliveryAttempt, yn as CoordinationBinding, yo as StrategyArtifacts, yr as CoordinationDeliveryEvidence, ys as EqualKVerdict, yt as AgentGraph, z as TrajectoryAnalysis, za as panel, zc as pairwiseSignificance, zi as MaterializeLocalMcpOptions, zn as DriverAttemptsExhaustedError, zo as defaultSelectWinner, zr as AuthoredProfile, zs as SteerContext } from "./index-CoO7atyo.js";
|
|
3
|
-
import { $ as WorkerTraceSeamCarrier, $t as waitUntil, A as RootMaterialization, B as Spend, C as NodeStatus, Ct as createOtelExporter, D as ResumedKeyState, E as ResultBlobStore, F as SpawnEvent, G as TreeView, Gt as WaitProbeRegistry, H as SupervisedResult, Ht as PendingWait, I as SpawnJournal, J as WaitOpts, Jt as createWaitProbes, K as UnknownMaterializationReason, Kt as WaitRejection, L as SpawnOpts, M as Runtime, N as Scope, O as ResumedWork, P as Settled, Q as WorkerTraceResolver, Qt as validateWaitSpec, R as SpawnPrior, S as NodeSnapshot, St as createOpenInferenceFileExporter, T as Restart, U as Supervisor, Ut as WaitOutcome, V as SteerableRootHandle, W as SupervisorOpts, Wt as WaitProbe, X as WorkerTraceEvidence, Xt as pollFor, Y as WidenGate, Yt as isWaitOutcome, Z as WorkerTraceUnavailableReason, Zt as timerAt, _ as MaterializedExecutionIdentity, an as decodeToolPart, b as NodeExecutionIdentity, c as ExecutorAccounting, cn as ActivityNote, d as ExecutorFactory, dn as ScopeProgressInput, en as SessionMessageLike, et as readWorkerTraceContext, f as ExecutorMaterialization, fn as WorkerProgress, g as Handle, h as ExecutorResult, i as Budget, in as createPushTraceSource, j as RootSignal, k as RootHandle, l as ExecutorContext, ln as DEFAULT_STALL_AFTER_MS, m as ExecutorRegistry, mn as readWorkerProgress, n as AgentExecutionRef, nn as ToolStepInput, nt as workerTraceSeamKey, o as ExecutionBindingReceipt, on as sandboxSessionTraceSource, p as ExecutorNodeContext, pn as createActivityLog, q as UsageEvent, qt as WaitSpec, r as AgentSpec, rn as TraceSource, s as Executor, sn as ActivityLog, t as Agent, tn as SessionTraceBox, tt as workerTraceEnv, u as ExecutorExecutionBinding, un as ExecutorProgress, v as MaterializedModelIdentity, w as ProfileMaterializationReceipt, x as NodeId, y as NoWinnerError, z as SpawnRejection } from "./types-
|
|
4
|
-
import { $ as ToolLoopToolCall, C as WorktreeHarnessResult, K as RouterTransportConfig, Q as ToolLoopMessageRecord, S as WorktreeCommandResult, X as ToolLoopCompaction, Z as ToolLoopCompactionOptions, _ as createSteerableSandboxSession, a as ExecutorConfig, b as createInbox, c as RouterToolsSeam, d as createExecutor, f as createExecutorRegistry, g as SteerableSandboxSession, h as SteerableSandboxArgs, i as CliWorktreeSeam, l as SandboxSeam, m as SandboxSteeringOptions, n as CliSeam, o as ProviderSeam, p as DEFAULT_SANDBOX_STEERING_MAX_TURNS, q as ToolSpec, r as CliWorktreeBridgeSeam, s as RouterSeam, t as BridgeSeam, u as cliWorktreeExecutor, v as Inbox, w as WorktreeProfileMaterializationReceipt, x as WorktreeCheckRunner, y as InboxMessage } from "./runtime-
|
|
5
|
-
import { A as providerAsSandboxClient, C as ProviderAsSandboxClientOptions, D as WorkspaceRequest, E as SandboxClientProviderOptions, F as createTangleSandboxExactProcessProvider, M as sandboxClientAsProvider, N as CreateTangleSandboxExactProcessProviderOptions, O as createAgentEnvironmentProviderRegistry, P as SandboxControlClient, S as PlacementInfo, T as ResourceRequest, _ as CheckpointRequest, a as AgentEnvironmentProviderRef, b as ExecResult, c as AgentEnvironmentStatus, d as AgentSession, f as AgentSessionRef, g as CheckpointRef, h as AgentTurnResult, i as AgentEnvironmentProvider, j as resolveAgentEnvironmentProvider, k as providerAsExecutor, l as AgentEnvironmentSummary, n as AgentEnvironmentCapabilities, o as AgentEnvironmentProviderRegistry, p as AgentSessionStatus, r as AgentEnvironmentEvent, s as AgentEnvironmentQuery, t as AgentEnvironment, u as AgentProfileRef, v as CreateAgentEnvironmentInput, w as ProviderExecutorOptions, x as ForkRequest, y as ExecRequest } from "./environment-provider-
|
|
6
|
-
import { a as StreamAgentTurnOptions, i as CollectedAgentTurn, n as AgentTurnInput, o as collectAgentTurn, r as AgentTurnUsage, s as streamAgentTurn, t as AgentTurnBackend } from "./stream-agent-turn-
|
|
7
|
-
export { type AcquireOptions, type ActivityLog, type ActivityNote, type Agent, type AgentEnvironment, type AgentEnvironmentCapabilities, type AgentEnvironmentEvent, type AgentEnvironmentProvider, type AgentEnvironmentProviderRef, type AgentEnvironmentProviderRegistry, type AgentEnvironmentQuery, type AgentEnvironmentStatus, type AgentEnvironmentSummary, type AgentExecutionRef, type AgentGraph, type AgentProfile, type AgentProfileRef, type AgentRunSpec, type AgentSession, type AgentSessionRef, type AgentSessionStatus, type AgentSpec, type AgentTurnBackend, type AgentTurnInput, type AgentTurnResult, type AgentTurnUsage, type AgenticOptions, type AgenticRunResult, type AgenticSurface, type AgenticTask, type AgenticTool, type AllWorkersStalledOptions, type AnalystFinding, type AnalystFindingEvent, type AnalystRegistry, type AnalyzeOnSettleRoute, type AnytimeReport, type AnytimeStrategySummary, type AnytimeTaskCurve, type ArtifactHandle, type AssertTraceDerivedFindings, type AuditIntentInput, type AuditIntentOptions, type AuthorStrategyOptions, type AuthoredHarness, type AuthoredProfile, type AuthoredStrategy, type AuthorizeDownMessage, type AuthorizedDownMessage, type AuthorizedSpawn, type AuthorizedSpawnContext, type AxisScoresOf, type BenchmarkCell, type BenchmarkConfig, type BenchmarkLift, type BenchmarkReport, type BenchmarkStrategySummary, type BenchmarkTaskRow, type BridgeSeam, type Budget, type BudgetPool, type BudgetPoolRestore, type BudgetReadout, type BusEvent, type BusRecord, type BusStats, type ChampionPick, type ChampionPolicy, type ChatCompletionsTransport, type ChatSessionStore, type ChatTransportExecutorOptions, type ChatTransportTool, type ChatWorkerSeamOptions, type CheckExecChannel, type CheckOutcome, type CheckRunContext, type CheckRunner, type CheckSource, type CheckSourceCtx, type CheckpointCapableBox, type CheckpointRef, type CheckpointRequest, type CliSeam, type CliWorktreeBridgeSeam, type CliWorktreeSeam, type CollectedAgentTurn, type CombinatorShape, type CompletionAnalyst, type CompletionEvidence, type CompletionPolicy, type CompletionVerdict, type ConcurrencyCaps, type ContinuationInstruction, type ContinuityMode, type CoordinationBinding, type CoordinationDeliveryEvidence, type CoordinationEvent, type CoordinationLog, type CoordinationMcpHandle, type CoordinationOwnerId, type CopyOptions, type Corpus, type CorpusFilter, type CorpusReadbackOptions, type CorpusRecord, type CreateAgentEnvironmentInput, type CreateSandboxOptions, type CreateScopeAnalystOptions, type CreateTangleSandboxExactProcessProviderOptions, type CriuCapableClient, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, DEFAULT_AWAIT_EVENT_TIMEOUT_MS, DEFAULT_SANDBOX_STEERING_MAX_TURNS, DEFAULT_STALL_AFTER_MS, type DefaultVerdict, type DefinePersona, type DefinePersonaInput, type DefinedLeaderboard, type DelegateOptions, type Deliverable, type DeliverableResolutionInput, type DeliverableSpec, type DeliveredOutput, type DispatchReport, type DispatchStopReason, type DispatchUnit, type DownMessageAuthorizationInput, type DownMessageDeliveryAttempt, type DownMessageDeliveryOutcome, type DownMessageEvent, type DriveHarness, type DriveHarnessOwnerContext, type Driver, type DriverAttemptRecord, type DriverAttemptStop, DriverAttemptsExhaustedError, type DriverProgressMark, type DriverRetryPolicy, EVIDENCE_MAX_CHARS, type EdgeDeliveryOutcome, type EdgeTraversal, type Environment, type EqualKArm, type EqualKOnCost, type EqualKOnCostOptions, type EqualKVerdict, type EventBus, type EvolutionArchiveNode, type EvolutionAuthor, type EvolutionBandInfo, type EvolutionCandidate, type EvolutionGeneration, type EvolutionReport, type ExecCtx, type ExecRequest, type ExecResult, type ExecutionBindingReceipt, type Executor, type ExecutorAccounting, type ExecutorConfig, type ExecutorContext, type ExecutorExecutionBinding, type ExecutorFactory, type ExecutorMaterialization, type ExecutorNodeContext, type ExecutorProgress, type ExecutorRegistry, type ExecutorResult, type ExecutorResultMapping, type Fanout, type FanoutOptions, type FanoutSynthesis, type FanoutWinnerSelector, FileCoordinationLog, FileCorpus, FileResultBlobStore, FileSpawnJournal, type FinalizeContext, type FinalizerSettled, type FlatWidenGate, type ForkCapableBox, type ForkRequest, type GitWorkspaceOptions, type GraphEdge, GraphEdgeCapError, type GraphNode, type GraphResult, type GroupOf, type Handle, type HarvestCorpusOptions, type HarvestFailure, type HarvestReport, InMemoryCorpus, InMemoryResultBlobStore, type InMemoryRunContext, type InMemoryRunContextOptions, InMemorySpawnJournal, type InProcessOnPrompt, type InProcessPromptCtx, type InProcessSandboxClientOptions, type Inbox, type InboxMessage, type IntentAudit, type Interval, type Iteration, type KeyProvider, type Leaderboard, type LeaderboardBenchScore, type LeaderboardBenchTask, type LeaderboardBenchmarkAdapter, type LeaderboardFlagSpec, type LeaderboardIterationInfo, type LeaderboardOptions, type LeaderboardRow, type LeaderboardRunContext, type LeaderboardScenario, type LeaderboardScore, type LeaderboardSpec, type LocalMcpMaterialization, type LocalSandboxClientOptions, type LoopCampaignDispatchOptions, type LoopDecisionPayload, type LoopDispatchOptions, type LoopEndedPayload, type LoopIterationDispatchPayload, type LoopIterationEndedPayload, type LoopIterationStartedPayload, type LoopLineageOptions, type LoopOptionsForDispatch, type LoopPlanDescription, type LoopPlanPayload, type LoopResult, type LoopSandboxPlacement, type LoopShape, type LoopStartedPayload, type LoopTeardownFailedPayload, type LoopTokenUsage, type LoopTraceEmitter, type LoopTraceEvent, type LoopUntil, type LoopUntilSpec, type LoopUntilState, type LoopWinner, type MakeWorkerAgent, type MaterializeLocalMcpOptions, type MaterializedExecutionIdentity, type MaterializedModelIdentity, type McpEndpoint, type McpEnvironmentOptions, McpSpawnFault, type McpToolDescriptor, type MountManifestEntry, type MountRecorder, NOTE_MAX_CHARS, type NoProgressForOptions, type NoWinnerError, type NodeExecutionIdentity, type NodeId, type NodeSnapshot, type NodeStatus, type Observation, type ObserveInput, type ObserveOptions, type ObserveSupervisorNodeEvent, type OpenSandboxRunBeforeStartContext, type OpenSandboxRunOptions, type OpenSandboxRunPromptOptions, type Outcome, type OutputAdapter, type PairwiseOptions, type PairwiseVerdict, type Panel, type PanelJudge, type PanelSpec, type PanelVerdict, type PatchDeliverableOptions, type PendingWait, type Persona, type PersonaContext, type PersonaExecutors, type Pipeline, type PipelineStage, type PlacementInfo, type PlateauOptions, type PriorCoordination, type ProfileKeyOf, type ProfileMaterializationReceipt, type ProfileRichness, type ProfileRichnessThresholds, type ProgressSample, type ProgressTracker, type ProgressTrackerOptions, type ProgressView, type PromotionGateOptions, type PromotionVerdict, type PromptHandle, type PromptRegistry, type ProviderAsSandboxClientOptions, type ProviderExecutorOptions, type ProviderSeam, type PublishOptions, type RegisteredPrompt, type RegistryAnalyzeProjection, type RenderCorpusToInstructions, type RenderCorpusToInstructionsOptions, type RepairStop, type ReproductionCheck, type ReservationRejection, type ReservationTicket, type ResolveDriveHarness, type ResolveSandboxClientOptions, type ResolveSupervisorTools, type ResolvedMcpServerLaunch, type ResolvedSupervisorProfile, type ResourceRequest, type Restart, type ResultBlobStore, type ResumedKeyState, type ResumedWork, type RollingDispatchOptions, type RootHandle, type RootMaterialization, type RootSignal, type RouterSeam, type RouterToolsSeam, type RouterTransportConfig, type RunAgentRoundsOptions, type RunAgenticOptions, type RunContext, type RunGraphOptions, type RunPersonified, type RunPersonifiedOptions, type RunProvenance, type Runtime, type SandboxCapabilities, type SandboxClient, type SandboxClientProviderOptions, type SandboxControlClient, type SandboxEvent, type SandboxInstance, type SandboxLineage, type SandboxLineageHandle, type SandboxRun, SandboxRunAbortError, type SandboxSeam, type SandboxSteeringOptions, type SandboxToolPartState, type Scope, type ScopeAnalyst, type ScopeAnalyzeInput, type ScopeArgs, type ScopeProgressInput, type ScopeWidenGate, type ScoreOf, type SelectionReceipt, type SessionCapableBox, type SessionMessageLike, type SessionTraceBox, type Settled, type ShapeBudget, type ShapeContext, type ShapeRegistry, type Shell, type ShotSpec, type SpawnEvent, type SpawnForest, type SpawnForestEvent, type SpawnForestInDoubtNode, type SpawnForestMissingTree, type SpawnForestNode, type SpawnForestTree, type SpawnJournal, type SpawnOpts, type SpawnPrior, type SpawnRejection, type Spend, type StdioMcpConnection, type StdioMcpServerSpec, type SteerContext, type SteerableRootHandle, type SteerableSandboxArgs, type SteerableSandboxSession, type StopDecision, type StopRule, type Strategy, type StrategyArtifacts, type StrategyCtx, type StrategyEvolutionConfig, type StrategyMessage, type StrategyResult, type StrategyShotResult, type StreamAgentTurnOptions, type StructuralRolloutConfig, type StructuralRolloutMessage, type StructuralRolloutPolicy, type StructuralRolloutResult, type SuperviseOptions, type SuperviseRegistry, type SuperviseRegistryTable, type SuperviseSurfaceOptions, type SuperviseSurfaceResult, type SupervisedResult, type Supervisor, type SupervisorAgentDeps, type SupervisorFinalizer, type SupervisorNodeContext, type SupervisorNodeContextSeed, type SupervisorOpts, type SupervisorProfile, type SupervisorSpanAttributes, type SupervisorSpanOptions, type SupervisorSpanOutcome, type SupervisorSpanRecorder, type SupervisorToolDescriptor, type SupervisorToolInvocationContext, type SurfaceScore, type SurfaceWorkerConfig, type SurfaceWorkerOut, type ToolLoopCompaction, type ToolLoopCompactionOptions, type ToolLoopMessageRecord, type ToolLoopToolCall, type ToolSpec, type ToolStepInput, type TraceSource, type TrajectoryAnalysis, type TrajectoryNode, type TrajectoryReport, type TrajectoryReportFn, type TrajectoryReportOptions, type TraversalContinuity, type TreeView, type TurnResult, type UnknownMaterializationReason, type UntrackedCopyStats, type UsageEvent, VERIFY_TAIL_CHARS, type ValidationCtx, type Validator, type VerifierEnvironmentOptions, type Verify, type VerifySpec, type VisibleCheck, WORKER_TOOL_TRACE_SCHEMA_VERSION, type WaitOpts, type WaitOutcome, type WaitProbe, type WaitProbeRegistry, type WaitRejection, type WaitSpec, type WatchTraceOptions, type WaterfallCollector, type WaterfallReport, type WaterfallSpan, type Widen, type WidenDecision, type WidenGate, type WidenLineage, type WidenSpec, type WinnerStrategy, type WorkerEvidenceInput, type WorkerProgress, type WorkerResumeContext, type WorkerSpawnContext, type WorkerSteerRequest, type WorkerToolTraceArtifact, type WorkerTraceEvidence, type WorkerTraceResolver, type WorkerTraceSeamCarrier, type WorkerTraceUnavailableReason, type WorkerWatchOptions, type Workspace, type WorkspaceCommit, type WorkspaceRequest, type WorkspaceRun, type WorktreeCheckRunner, type WorktreeCliExecutorOptions, type WorktreeCommandResult, type WorktreeFanoutOptions, type WorktreeHarnessResult, type WorktreePatchArtifact, type WorktreeProfileMaterializationReceipt, acquireSandbox, adaptiveRefine, allOf, allWorkersStalled, analyzeTrace, analyzesFindingsReportPrompt, anyOf, anytimeReport, areaUnderCurve, asAuthoredProfile, assertCoordinationBinding, assertModelAllowed, assertProfileModelsAllowed, assertStrategyContract, assertTraceDerivedFindings, assessAuthoredProfile, auditIntent, authorStrategy, bestDelivered, bestSoFar, breadthStrategy, buildSteerContext, builtinShapes, canDisplace, canonicalFindingEvent, captureWorkerTraceEvidence, chatTransportExecutor, chatWorkerSeam, classifyDriverFailure, cliWorktreeExecutor, closingWorkerNote, collectAgentTurn, collectDelivered, compareCheckOutcomes, completionAuthorizes, composeCheckSources, composeWorkerEvidence, computeFindingId, connectStdioMcp, contentAddress, copyUntrackedIntoClone, createActivityLog, createAgentEnvironmentProviderRegistry, createBudgetPool, createChatSessionStore, createEventBus, createExecutor, createExecutorRegistry, createFileRunContext, createInMemoryRunContext, createInbox, createMcpEnvironment, createOpenInferenceFileExporter, createOtelExporter, createProgressTracker, createPromptRegistry, createPushTraceSource, createRootHandle, createSandboxLineage, createSandboxToolPartState, createScope, createScopeAnalyst, createShapeRegistry, createSteerableSandboxSession, createSupervisor, createSupervisorSpanRecorder, createTangleSandboxExactProcessProvider, createVerifierEnvironment, createWaitProbes, createWaterfallCollector, createWorktreeCliExecutor, decodeToolPart, defaultAnalystInstruction, defaultAuditorInstruction, defaultDelegateBudget, defaultEdgeTraversalCap, defaultExtractCandidate, defaultProfileRichnessThresholds, defaultSelectWinner, defaultStructuralRolloutPolicy, defaultToolDetectors, defineLeaderboard, definePersona, defineStrategy, delegate, delegatesWorkerBriefPrompt, depthStrategy, deterministicCompletion, discriminatingMeans, dumbContinuationFailPrompt, dumbContinuationPassPrompt, effectiveConcurrency, envKeyProvider, equalKOnCost, extractLlmCallEvent, failuresAnalyst, fanout, filterAuthoredAsserts, finalizeBestDelivered, flatWidenGate, formatPromptHandle, freeSlots, gateOnDeliverable, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, isWaitOutcome, jjWorkspace, kernelPromptRegistry, leaderboard, legacySupervisorRunDir, legacySupervisorRunsRoot, loadSpawnForest, localSandboxClient, localShell, loopCampaignDispatch, loopDispatch, loopUntil, makeFinding, mapExecutorResult, mapSandboxEvent, mapSandboxToolEvent, materializeLocalMcp, materializeTreeView, mcpSecretEnvMetadataKey, modelAuthoredChecks, naiveContinuationPrompt, noProgressFor, normalizeAnalyzeOnSettle, observe, officialChecksFromMeta, openSandboxRun, pairwiseSignificance, panel, parseWorkerToolTraceArtifact, patchDelivered, pendingWaits, pickBestDelivered, pickChampion, pipeline, plateau, plateauLength, pollFor, printBenchmarkReport, probeSandboxCapabilities, profileChatClient, profileOptimizerModelCall, profileRichnessFinding, promotionGate, promptHandle, providerAsExecutor, providerAsSandboxClient, queueOf, readWorkerProgress, readWorkerSteerRequests, readWorkerTraceContext, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderLeaderboardHtml, renderLeaderboardMarkdown, renderLeaderboardSvg, renderPairwiseMarkdown, renderReport, replaySpawnTree, resolveAgentEnvironmentProvider, resolveEntrySymbol, resolveMcpServerLaunch, resolveSandboxClient, resolveSecretEnv, resolveSupervisorProfile, rollingDispatch, runAgentRounds, runAgentic, runBenchmark, runFinalizer, runGraph, runInWorkspace, runPersonified, runStrategyEvolution, runTree, safeWorkerFile, sample, sampleFromSettled, sampleThenRefine, sandboxCheckRunner, sandboxClientAsProvider, sandboxSessionTraceSource, sanitizeMcpToolSchema, secretEnvOfMcpServer, selectBestIndex, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, settledWorkerOut, spendFromUsageEvents, stopSentinel, strategyAuthorContract, strategyAuthorSystemPrompt, streamAgentTurn, structuralRollout, sumSandboxUsage, supervise, superviseSurface, supervisorAgent, supervisorInstructions, supervisorPolicyPrompt, supervisorRunDir, supervisorRunsRoot, supervisorWorkersDir, timerAt, trajectoryReport, validateWaitSpec, verify, visibleCheckScore, waitUntil, watchTrace, widen, withUntrackedArtifacts, workerControlLogFile, workerFromBackend, workerInboxFile, workerInboxFileFromEventDir, workerTraceAnalysisStore, workerTraceEnv, workerTraceSeamKey, worktreeFanout, writeWorkerSteer };
|
|
1
|
+
import { C as MountRecorder, D as SelectionReceipt, E as SandboxClient, O as ValidationCtx, S as MountManifestEntry, T as RunProvenance, _ as LoopTeardownFailedPayload, a as Iteration, b as LoopTraceEvent, c as LoopIterationDispatchPayload, d as LoopLineageOptions, f as LoopPlanDescription, g as LoopStartedPayload, h as LoopSandboxPlacement, i as ExecCtx, k as Validator, l as LoopIterationEndedPayload, m as LoopResult, n as DefaultVerdict, o as LoopDecisionPayload, p as LoopPlanPayload, r as Driver, s as LoopEndedPayload, t as AgentRunSpec, u as LoopIterationStartedPayload, v as LoopTokenUsage, w as OutputAdapter, x as LoopWinner, y as LoopTraceEmitter } from "./types-6zHo67jn.js";
|
|
2
|
+
import { $ as legacySupervisorRunsRoot, $c as AnytimeStrategySummary, $d as WatchTraceOptions, $i as CorpusReadbackOptions, $n as selectBestIndex, $o as inlineSandboxClient, $r as AcquireOptions, $s as WinnerStrategy, $t as rollingDispatch, A as GitWorkspaceOptions, Aa as SuperviseRegistry, Ac as stopSentinel, Ai as assertTraceDerivedFindings, An as supervisorInstructions, Ao as bestDelivered, Ar as Deliverable, As as LoopUntilState, At as runGraph, B as analyzeTrace, Ba as ResolveDriveHarness, Bc as ScoreOf, Bi as BenchmarkLift, Bn as StructuralRolloutPolicy, Bo as classifyDriverFailure, Br as SandboxLineage, Bs as ScopeAnalyzeInput, Bt as formatPromptHandle, C as closingWorkerNote, Ca as loopDispatch, Cc as CompletionAnalyst, Ci as panel, Cl as DownMessageDeliveryOutcome, Cn as AuthoredProfile, Co as SupervisorSpanOutcome, Cr as MaterializeLocalMcpOptions, Cs as Fanout, Ct as GraphEdgeCapError, D as UntrackedCopyStats, Da as DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, Dc as completionAuthorizes, Di as widen, Dn as assessAuthoredProfile, Do as FinalizeContext, Dr as StdioMcpServerSpec, Ds as FlatWidenGate, E as CopyOptions, Ea as AuthorizedSpawnContext, Ec as CompletionVerdict, Ei as verify, En as asAuthoredProfile, Eo as DeliveredOutput, Er as StdioMcpConnection, Es as FanoutWinnerSelector, Et as RunGraphOptions, F as gitWorkspace, Fa as workerFromBackend, Fc as LeaderboardOptions, Fi as McpEnvironmentOptions, Fl as WorkerSpawnContext, Fn as CheckSource, Fo as DriverAttemptRecord, Fr as SandboxRunAbortError, Fs as Pipeline, Ft as analyzesFindingsReportPrompt, G as workerTraceAnalysisStore, Ga as SupervisorNodeContext, Gc as renderLeaderboardSvg, Gi as printBenchmarkReport, Gn as composeCheckSources, Go as localSandboxClient, Gr as createSandboxToolPartState, Gs as TrajectoryReportFn, Gt as ConcurrencyCaps, H as WorkerToolTraceArtifact, Ha as ResolvedSupervisorProfile, Hc as pairwiseSignificance, Hi as BenchmarkStrategySummary, Hn as VisibleCheck, Ho as defaultSelectWinner, Hr as SessionCapableBox, Hs as SteerContext, Ht as naiveContinuationPrompt, I as jjWorkspace, Ia as CoordinationBinding, Ic as LeaderboardRow, Ii as createMcpEnvironment, Il as WorkerWatchOptions, In as CheckSourceCtx, Io as DriverAttemptStop, Ir as TurnResult, Is as PipelineStage, It as createPromptRegistry, J as ScopeArgs, Ja as SupervisorToolDescriptor, Jc as AuditIntentOptions, Jd as BusRecord, Ji as AgenticRunResult, Jn as filterAuthoredAsserts, Jo as envKeyProvider, Jr as mapSandboxToolEvent, Js as VerifySpec, Jt as DispatchUnit, K as createRootHandle, Ka as SupervisorNodeContextSeed, Kc as renderPairwiseMarkdown, Ki as runBenchmark, Kn as defaultExtractCandidate, Ko as KeyProvider, Kr as extractLlmCallEvent, Ks as TrajectoryReportOptions, Kt as DispatchReport, L as localShell, La as DriveHarness, Lc as PairwiseOptions, Li as sanitizeMcpToolSchema, Ll as canonicalFindingEvent, Ln as RepairStop, Lo as DriverAttemptsExhaustedError, Lr as openSandboxRun, Ls as RenderCorpusToInstructions, Lt as delegatesWorkerBriefPrompt, M as Workspace, Mc as GroupOf, Mi as createScopeAnalyst, Mn as CheckOutcome, Mo as pickBestDelivered, Mr as OpenSandboxRunOptions, Ms as PanelJudge, Mt as PromptHandle, N as WorkspaceCommit, Na as supervise, Nc as Interval, Ni as registryScopeAnalyst, Nn as CheckRunContext, No as runFinalizer, Nr as OpenSandboxRunPromptOptions, Ns as PanelSpec, Nt as PromptRegistry, O as copyUntrackedIntoClone, Oa as DeliverableResolutionInput, Oc as deterministicCompletion, Oi as CreateScopeAnalystOptions, On as defaultProfileRichnessThresholds, Oo as FinalizerSettled, Or as connectStdioMcp, Os as LoopUntil, Ot as TraversalContinuity, P as WorkspaceRun, Pc as Leaderboard, Pi as McpEndpoint, Pl as WorkerResumeContext, Pn as CheckRunner, Po as runTree, Pr as SandboxRun, Ps as PanelVerdict, Pt as RegisteredPrompt, Q as legacySupervisorRunDir, Qa as supervisorAgent, Qc as AnytimeReport, Qd as createEventBus, Qi as ArtifactHandle, Qn as sandboxCheckRunner, Qo as secretEnvOfMcpServer, Qr as probeSandboxCapabilities, Qs as WidenSpec, Qt as queueOf, R as runInWorkspace, Ra as DriveHarnessOwnerContext, Rc as PairwiseVerdict, Ri as BenchmarkCell, Rn as StructuralRolloutConfig, Ro as DriverProgressMark, Rr as CheckpointCapableBox, Rs as RenderCorpusToInstructionsOptions, Rt as dumbContinuationFailPrompt, S as WorkerEvidenceInput, Sa as loopCampaignDispatch, Sc as defineLeaderboard, Si as loopUntil, Sl as DownMessageDeliveryAttempt, Sn as spendFromUsageEvents, So as SupervisorSpanOptions, Sr as LocalMcpMaterialization, Ss as EqualKVerdict, St as GraphEdge, T as settledWorkerOut, Ta as AuthorizedSpawn, Tc as CompletionPolicy, Ti as selectValidWinner, Tl as MakeWorkerAgent, Tn as ProfileRichnessThresholds, To as createSupervisorSpanRecorder, Tr as McpToolDescriptor, Ts as FanoutSynthesis, Tt as GraphResult, U as captureWorkerTraceEvidence, Ua as SupervisorAgentDeps, Uc as renderLeaderboardHtml, Ui as BenchmarkTaskRow, Un as canDisplace, Uo as runAgentRounds, Ur as createSandboxLineage, Us as TrajectoryNode, Ut as promptHandle, V as WORKER_TOOL_TRACE_SCHEMA_VERSION, Va as ResolveSupervisorTools, Vc as leaderboard, Vi as BenchmarkReport, Vn as StructuralRolloutResult, Vo as RunAgentRoundsOptions, Vr as SandboxLineageHandle, Vs as ScopeWidenGate, Vt as kernelPromptRegistry, W as parseWorkerToolTraceArtifact, Wc as renderLeaderboardMarkdown, Wi as Environment, Wn as compareCheckOutcomes, Wo as LocalSandboxClientOptions, Wr as SandboxToolPartState, Ws as TrajectoryReport, Wt as supervisorPolicyPrompt, X as settledToIteration, Xa as assertCoordinationBinding, Xc as auditIntent, Xd as EventBus, Xi as AgenticTask, Xn as officialChecksFromMeta, Xo as resolveMcpServerLaunch, Xr as CriuCapableClient, Xs as WidenDecision, Xt as effectiveConcurrency, Y as createScope, Ya as SupervisorToolInvocationContext, Yc as IntentAudit, Yd as BusStats, Yi as AgenticSurface, Yn as modelAuthoredChecks, Yo as mcpSecretEnvMetadataKey, Yr as sumSandboxUsage, Ys as Widen, Yt as RollingDispatchOptions, Z as WorkerSteerRequest, Za as resolveSupervisorProfile, Zc as defaultAuditorInstruction, Zd as PublishOptions, Zi as AgenticTool, Zn as resolveEntrySymbol, Zo as resolveSecretEnv, Zr as SandboxCapabilities, Zs as WidenLineage, Zt as freeSlots, _ as WorktreeFanoutOptions, _a as LoopCampaignDispatchOptions, _c as LeaderboardIterationInfo, _f as materializeTreeView, _i as FileCorpus, _l as CoordinationEvent, _n as BudgetPoolRestore, _o as createProgressTracker, _r as AuthoredStrategy, _s as CorpusFilter, _t as WorktreePatchArtifact, a as SandboxInstance, aa as StrategyMessage, ac as PersonaContext, af as mapExecutorResult, ai as promotionGate, al as renderAnytimeTable, ao as AllWorkersStalledOptions, ar as EvolutionAuthor, as as HarvestFailure, at as workerControlLogFile, b as NOTE_MAX_CHARS, ba as SuperviseDispatchOptions, bc as LeaderboardScore, bf as contentAddress, bi as fanout, bl as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, bn as ReservationTicket, bo as sampleFromSettled, br as strategyAuthorContract, bs as EqualKOnCost, bt as EdgeDeliveryOutcome, c as VerifierEnvironmentOptions, ca as SurfaceScore, cc as RunPersonifiedOptions, cf as InMemoryResultBlobStore, ci as assertModelAllowed, cl as WaterfallSpan, cn as ChatCompletionsTransport, co as ProgressSample, cr as EvolutionGeneration, cs as Observation, ct as writeWorkerSteer, d as SuperviseSurfaceResult, da as defineStrategy, dc as ShapeRegistry, df as SpawnForestEvent, di as trajectoryReport, dl as AnalystRegistry, dn as ChatTransportTool, do as ProgressView, dr as StrategyEvolutionConfig, ds as defaultAnalystInstruction, dt as RunContext, ea as RunAgenticOptions, ec as DefinePersona, ef as defaultToolDetectors, ei as acquireSandbox, el as AnytimeTaskCurve, en as DelegateOptions, eo as CoordinationDeliveryEvidence, er as structuralRollout, es as InProcessOnPrompt, et as readWorkerSteerRequests, f as SurfaceWorkerConfig, fa as depthStrategy, fc as DefinedLeaderboard, ff as SpawnForestInDoubtNode, fi as builtinShapes, fl as AnalyzeOnSettleRoute, fn as ChatWorkerSeamOptions, fo as StopDecision, fr as discriminatingMeans, fs as observe, ft as createFileRunContext, g as AuthoredHarness, ga as sampleThenRefine, gc as LeaderboardFlagSpec, gf as loadSpawnForest, gi as runPersonified, gl as ContinuityMode, gn as BudgetPool, go as anyOf, gr as AuthorStrategyOptions, gs as Corpus, gt as WorktreeCliExecutorOptions, h as superviseSurface, ha as sample, hc as LeaderboardBenchmarkAdapter, hf as SpawnForestTree, hi as definePersona, hl as ContinuationInstruction, hn as createChatSessionStore, ho as allWorkersStalled, hr as selectChampion, hs as CombinatorShape, ht as patchDelivered, i as SandboxEvent, ia as StrategyCtx, ic as Persona, if as gateOnDeliverable, ii as PromotionVerdict, il as plateauLength, in as serveCoordinationMcp, io as PriorCoordination, ir as EvolutionArchiveNode, is as HarvestCorpusOptions, it as supervisorWorkersDir, j as Shell, ja as SuperviseRegistryTable, jc as AxisScoresOf, ji as buildSteerContext, jn as CheckExecChannel, jo as collectDelivered, jr as OpenSandboxRunBeforeStartContext, js as Panel, k as withUntrackedArtifacts, ka as SuperviseOptions, kc as sentinelCompletion, ki as RegistryAnalyzeProjection, kn as profileRichnessFinding, ko as SupervisorFinalizer, kr as materializeLocalMcp, ks as LoopUntilSpec, kt as defaultEdgeTraversalCap, l as createVerifierEnvironment, la as adaptiveRefine, lc as ShapeBudget, lf as InMemorySpawnJournal, li as assertProfileModelsAllowed, ll as createWaterfallCollector, ln as ChatSessionStore, lo as ProgressTracker, lr as EvolutionReport, ls as ObserveInput, lt as InMemoryRunContext, m as failuresAnalyst, ma as runAgentic, mc as LeaderboardBenchTask, mf as SpawnForestNode, mi as registerShape, ml as AuthorizedDownMessage, mn as chatWorkerSeam, mo as allOf, mr as runStrategyEvolution, ms as AssertTraceDerivedFindings, mt as PatchDeliverableOptions, n as AnalystFinding, na as Strategy, nc as LoopShape, nf as DeliverableSpec, ni as resolveSandboxClient, nl as areaUnderCurve, nn as delegate, no as CoordinationOwnerId, nr as ChampionPick, ns as InProcessSandboxClientOptions, nt as supervisorRunDir, o as computeFindingId, oa as StrategyResult, oc as PersonaExecutors, of as FileResultBlobStore, oi as profileChatClient, ol as WaterfallCollector, oo as NoProgressForOptions, or as EvolutionBandInfo, os as HarvestReport, ot as workerInboxFile, p as SurfaceWorkerOut, pa as refine, pc as LeaderboardBenchScore, pf as SpawnForestMissingTree, pi as createShapeRegistry, pl as AuthorizeDownMessage, pn as chatTransportExecutor, po as StopRule, pr as pickChampion, ps as renderReport, pt as createInMemoryRunContext, q as createSupervisor, qa as SupervisorProfile, qc as AuditIntentInput, qd as BusEvent, qi as AgenticOptions, qn as defaultStructuralRolloutPolicy, qo as ResolvedMcpServerLaunch, qr as mapSandboxEvent, qs as Verify, qt as DispatchStopReason, r as CreateSandboxOptions, ra as StrategyArtifacts, rc as Outcome, rf as ExecutorResultMapping, ri as PromotionGateOptions, rl as bestSoFar, rn as CoordinationMcpHandle, ro as FileCoordinationLog, rr as ChampionPolicy, rs as inProcessSandboxClient, rt as supervisorRunsRoot, s as makeFinding, sa as StrategyShotResult, sc as RunPersonified, sf as FileSpawnJournal, si as profileOptimizerModelCall, sl as WaterfallReport, sn as finalizeBestDelivered, so as PlateauOptions, sr as EvolutionCandidate, ss as harvestCorpus, st as workerInboxFileFromEventDir, t as AgentProfile, ta as ShotSpec, tc as DefinePersonaInput, tf as watchTrace, ti as ResolveSandboxClientOptions, tl as anytimeReport, tn as defaultDelegateBudget, to as CoordinationLog, tr as visibleCheckScore, ts as InProcessPromptCtx, tt as safeWorkerFile, u as SuperviseSurfaceOptions, ua as breadthStrategy, uc as ShapeContext, uf as SpawnForest, ui as equalKOnCost, ul as AnalystFindingEvent, un as ChatTransportExecutorOptions, uo as ProgressTrackerOptions, ur as ReproductionCheck, us as ObserveOptions, ut as InMemoryRunContextOptions, v as worktreeFanout, va as LoopDispatchOptions, vc as LeaderboardRunContext, vf as pendingWaits, vi as InMemoryCorpus, vn as BudgetReadout, vo as noProgressFor, vr as assertStrategyContract, vs as CorpusRecord, vt as createWorktreeCliExecutor, w as composeWorkerEvidence, wa as superviseDispatch, wc as CompletionEvidence, wi as pipeline, wl as DownMessageEvent, wn as ProfileRichness, wo as SupervisorSpanRecorder, wr as McpSpawnFault, ws as FanoutOptions, wt as GraphNode, x as VERIFY_TAIL_CHARS, xa as SuperviseOptionsForDispatch, xc as LeaderboardSpec, xi as flatWidenGate, xl as DownMessageAuthorizationInput, xn as createBudgetPool, xo as SupervisorSpanAttributes, xr as strategyAuthorSystemPrompt, xs as EqualKOnCostOptions, xt as EdgeTraversal, y as EVIDENCE_MAX_CHARS, ya as LoopOptionsForDispatch, yc as LeaderboardScenario, yf as replaySpawnTree, yi as renderCorpusToInstructions, yn as ReservationRejection, yo as plateau, yr as authorStrategy, ys as EqualKArm, yt as AgentGraph, z as TrajectoryAnalysis, za as ObserveSupervisorNodeEvent, zc as ProfileKeyOf, zi as BenchmarkConfig, zl as normalizeAnalyzeOnSettle, zn as StructuralRolloutMessage, zo as DriverRetryPolicy, zr as ForkCapableBox, zs as ScopeAnalyst, zt as dumbContinuationPassPrompt } from "./index-D7UJIX2x.js";
|
|
3
|
+
import { $ as WorkerTraceSeamCarrier, $t as waitUntil, A as RootMaterialization, B as Spend, C as NodeStatus, Ct as createOtelExporter, D as ResumedKeyState, E as ResultBlobStore, F as SpawnEvent, G as TreeView, Gt as WaitProbeRegistry, H as SupervisedResult, Ht as PendingWait, I as SpawnJournal, J as WaitOpts, Jt as createWaitProbes, K as UnknownMaterializationReason, Kt as WaitRejection, L as SpawnOpts, M as Runtime, N as Scope, O as ResumedWork, P as Settled, Q as WorkerTraceResolver, Qt as validateWaitSpec, R as SpawnPrior, S as NodeSnapshot, St as createOpenInferenceFileExporter, T as Restart, U as Supervisor, Ut as WaitOutcome, V as SteerableRootHandle, W as SupervisorOpts, Wt as WaitProbe, X as WorkerTraceEvidence, Xt as pollFor, Y as WidenGate, Yt as isWaitOutcome, Z as WorkerTraceUnavailableReason, Zt as timerAt, _ as MaterializedExecutionIdentity, an as decodeToolPart, b as NodeExecutionIdentity, c as ExecutorAccounting, cn as ActivityNote, d as ExecutorFactory, dn as ScopeProgressInput, en as SessionMessageLike, et as readWorkerTraceContext, f as ExecutorMaterialization, fn as WorkerProgress, g as Handle, h as ExecutorResult, i as Budget, in as createPushTraceSource, j as RootSignal, k as RootHandle, l as ExecutorContext, ln as DEFAULT_STALL_AFTER_MS, m as ExecutorRegistry, mn as readWorkerProgress, n as AgentExecutionRef, nn as ToolStepInput, nt as workerTraceSeamKey, o as ExecutionBindingReceipt, on as sandboxSessionTraceSource, p as ExecutorNodeContext, pn as createActivityLog, q as UsageEvent, qt as WaitSpec, r as AgentSpec, rn as TraceSource, s as Executor, sn as ActivityLog, t as Agent, tn as SessionTraceBox, tt as workerTraceEnv, u as ExecutorExecutionBinding, un as ExecutorProgress, v as MaterializedModelIdentity, w as ProfileMaterializationReceipt, x as NodeId, y as NoWinnerError, z as SpawnRejection } from "./types-CIg5DBNF.js";
|
|
4
|
+
import { $ as ToolLoopToolCall, C as WorktreeHarnessResult, K as RouterTransportConfig, Q as ToolLoopMessageRecord, S as WorktreeCommandResult, X as ToolLoopCompaction, Z as ToolLoopCompactionOptions, _ as createSteerableSandboxSession, a as ExecutorConfig, b as createInbox, c as RouterToolsSeam, d as createExecutor, f as createExecutorRegistry, g as SteerableSandboxSession, h as SteerableSandboxArgs, i as CliWorktreeSeam, l as SandboxSeam, m as SandboxSteeringOptions, n as CliSeam, o as ProviderSeam, p as DEFAULT_SANDBOX_STEERING_MAX_TURNS, q as ToolSpec, r as CliWorktreeBridgeSeam, s as RouterSeam, t as BridgeSeam, u as cliWorktreeExecutor, v as Inbox, w as WorktreeProfileMaterializationReceipt, x as WorktreeCheckRunner, y as InboxMessage } from "./runtime-DgJZUxql.js";
|
|
5
|
+
import { A as providerAsSandboxClient, C as ProviderAsSandboxClientOptions, D as WorkspaceRequest, E as SandboxClientProviderOptions, F as createTangleSandboxExactProcessProvider, M as sandboxClientAsProvider, N as CreateTangleSandboxExactProcessProviderOptions, O as createAgentEnvironmentProviderRegistry, P as SandboxControlClient, S as PlacementInfo, T as ResourceRequest, _ as CheckpointRequest, a as AgentEnvironmentProviderRef, b as ExecResult, c as AgentEnvironmentStatus, d as AgentSession, f as AgentSessionRef, g as CheckpointRef, h as AgentTurnResult, i as AgentEnvironmentProvider, j as resolveAgentEnvironmentProvider, k as providerAsExecutor, l as AgentEnvironmentSummary, n as AgentEnvironmentCapabilities, o as AgentEnvironmentProviderRegistry, p as AgentSessionStatus, r as AgentEnvironmentEvent, s as AgentEnvironmentQuery, t as AgentEnvironment, u as AgentProfileRef, v as CreateAgentEnvironmentInput, w as ProviderExecutorOptions, x as ForkRequest, y as ExecRequest } from "./environment-provider-DZihBZx6.js";
|
|
6
|
+
import { a as StreamAgentTurnOptions, i as CollectedAgentTurn, n as AgentTurnInput, o as collectAgentTurn, r as AgentTurnUsage, s as streamAgentTurn, t as AgentTurnBackend } from "./stream-agent-turn-DcDznEnq.js";
|
|
7
|
+
export { type AcquireOptions, type ActivityLog, type ActivityNote, type Agent, type AgentEnvironment, type AgentEnvironmentCapabilities, type AgentEnvironmentEvent, type AgentEnvironmentProvider, type AgentEnvironmentProviderRef, type AgentEnvironmentProviderRegistry, type AgentEnvironmentQuery, type AgentEnvironmentStatus, type AgentEnvironmentSummary, type AgentExecutionRef, type AgentGraph, type AgentProfile, type AgentProfileRef, type AgentRunSpec, type AgentSession, type AgentSessionRef, type AgentSessionStatus, type AgentSpec, type AgentTurnBackend, type AgentTurnInput, type AgentTurnResult, type AgentTurnUsage, type AgenticOptions, type AgenticRunResult, type AgenticSurface, type AgenticTask, type AgenticTool, type AllWorkersStalledOptions, type AnalystFinding, type AnalystFindingEvent, type AnalystRegistry, type AnalyzeOnSettleRoute, type AnytimeReport, type AnytimeStrategySummary, type AnytimeTaskCurve, type ArtifactHandle, type AssertTraceDerivedFindings, type AuditIntentInput, type AuditIntentOptions, type AuthorStrategyOptions, type AuthoredHarness, type AuthoredProfile, type AuthoredStrategy, type AuthorizeDownMessage, type AuthorizedDownMessage, type AuthorizedSpawn, type AuthorizedSpawnContext, type AxisScoresOf, type BenchmarkCell, type BenchmarkConfig, type BenchmarkLift, type BenchmarkReport, type BenchmarkStrategySummary, type BenchmarkTaskRow, type BridgeSeam, type Budget, type BudgetPool, type BudgetPoolRestore, type BudgetReadout, type BusEvent, type BusRecord, type BusStats, type ChampionPick, type ChampionPolicy, type ChatCompletionsTransport, type ChatSessionStore, type ChatTransportExecutorOptions, type ChatTransportTool, type ChatWorkerSeamOptions, type CheckExecChannel, type CheckOutcome, type CheckRunContext, type CheckRunner, type CheckSource, type CheckSourceCtx, type CheckpointCapableBox, type CheckpointRef, type CheckpointRequest, type CliSeam, type CliWorktreeBridgeSeam, type CliWorktreeSeam, type CollectedAgentTurn, type CombinatorShape, type CompletionAnalyst, type CompletionEvidence, type CompletionPolicy, type CompletionVerdict, type ConcurrencyCaps, type ContinuationInstruction, type ContinuityMode, type CoordinationBinding, type CoordinationDeliveryEvidence, type CoordinationEvent, type CoordinationLog, type CoordinationMcpHandle, type CoordinationOwnerId, type CopyOptions, type Corpus, type CorpusFilter, type CorpusReadbackOptions, type CorpusRecord, type CreateAgentEnvironmentInput, type CreateSandboxOptions, type CreateScopeAnalystOptions, type CreateTangleSandboxExactProcessProviderOptions, type CriuCapableClient, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, DEFAULT_AWAIT_EVENT_TIMEOUT_MS, DEFAULT_SANDBOX_STEERING_MAX_TURNS, DEFAULT_STALL_AFTER_MS, type DefaultVerdict, type DefinePersona, type DefinePersonaInput, type DefinedLeaderboard, type DelegateOptions, type Deliverable, type DeliverableResolutionInput, type DeliverableSpec, type DeliveredOutput, type DispatchReport, type DispatchStopReason, type DispatchUnit, type DownMessageAuthorizationInput, type DownMessageDeliveryAttempt, type DownMessageDeliveryOutcome, type DownMessageEvent, type DriveHarness, type DriveHarnessOwnerContext, type Driver, type DriverAttemptRecord, type DriverAttemptStop, DriverAttemptsExhaustedError, type DriverProgressMark, type DriverRetryPolicy, EVIDENCE_MAX_CHARS, type EdgeDeliveryOutcome, type EdgeTraversal, type Environment, type EqualKArm, type EqualKOnCost, type EqualKOnCostOptions, type EqualKVerdict, type EventBus, type EvolutionArchiveNode, type EvolutionAuthor, type EvolutionBandInfo, type EvolutionCandidate, type EvolutionGeneration, type EvolutionReport, type ExecCtx, type ExecRequest, type ExecResult, type ExecutionBindingReceipt, type Executor, type ExecutorAccounting, type ExecutorConfig, type ExecutorContext, type ExecutorExecutionBinding, type ExecutorFactory, type ExecutorMaterialization, type ExecutorNodeContext, type ExecutorProgress, type ExecutorRegistry, type ExecutorResult, type ExecutorResultMapping, type Fanout, type FanoutOptions, type FanoutSynthesis, type FanoutWinnerSelector, FileCoordinationLog, FileCorpus, FileResultBlobStore, FileSpawnJournal, type FinalizeContext, type FinalizerSettled, type FlatWidenGate, type ForkCapableBox, type ForkRequest, type GitWorkspaceOptions, type GraphEdge, GraphEdgeCapError, type GraphNode, type GraphResult, type GroupOf, type Handle, type HarvestCorpusOptions, type HarvestFailure, type HarvestReport, InMemoryCorpus, InMemoryResultBlobStore, type InMemoryRunContext, type InMemoryRunContextOptions, InMemorySpawnJournal, type InProcessOnPrompt, type InProcessPromptCtx, type InProcessSandboxClientOptions, type Inbox, type InboxMessage, type IntentAudit, type Interval, type Iteration, type KeyProvider, type Leaderboard, type LeaderboardBenchScore, type LeaderboardBenchTask, type LeaderboardBenchmarkAdapter, type LeaderboardFlagSpec, type LeaderboardIterationInfo, type LeaderboardOptions, type LeaderboardRow, type LeaderboardRunContext, type LeaderboardScenario, type LeaderboardScore, type LeaderboardSpec, type LocalMcpMaterialization, type LocalSandboxClientOptions, type LoopCampaignDispatchOptions, type LoopDecisionPayload, type LoopDispatchOptions, type LoopEndedPayload, type LoopIterationDispatchPayload, type LoopIterationEndedPayload, type LoopIterationStartedPayload, type LoopLineageOptions, type LoopOptionsForDispatch, type LoopPlanDescription, type LoopPlanPayload, type LoopResult, type LoopSandboxPlacement, type LoopShape, type LoopStartedPayload, type LoopTeardownFailedPayload, type LoopTokenUsage, type LoopTraceEmitter, type LoopTraceEvent, type LoopUntil, type LoopUntilSpec, type LoopUntilState, type LoopWinner, type MakeWorkerAgent, type MaterializeLocalMcpOptions, type MaterializedExecutionIdentity, type MaterializedModelIdentity, type McpEndpoint, type McpEnvironmentOptions, McpSpawnFault, type McpToolDescriptor, type MountManifestEntry, type MountRecorder, NOTE_MAX_CHARS, type NoProgressForOptions, type NoWinnerError, type NodeExecutionIdentity, type NodeId, type NodeSnapshot, type NodeStatus, type Observation, type ObserveInput, type ObserveOptions, type ObserveSupervisorNodeEvent, type OpenSandboxRunBeforeStartContext, type OpenSandboxRunOptions, type OpenSandboxRunPromptOptions, type Outcome, type OutputAdapter, type PairwiseOptions, type PairwiseVerdict, type Panel, type PanelJudge, type PanelSpec, type PanelVerdict, type PatchDeliverableOptions, type PendingWait, type Persona, type PersonaContext, type PersonaExecutors, type Pipeline, type PipelineStage, type PlacementInfo, type PlateauOptions, type PriorCoordination, type ProfileKeyOf, type ProfileMaterializationReceipt, type ProfileRichness, type ProfileRichnessThresholds, type ProgressSample, type ProgressTracker, type ProgressTrackerOptions, type ProgressView, type PromotionGateOptions, type PromotionVerdict, type PromptHandle, type PromptRegistry, type ProviderAsSandboxClientOptions, type ProviderExecutorOptions, type ProviderSeam, type PublishOptions, type RegisteredPrompt, type RegistryAnalyzeProjection, type RenderCorpusToInstructions, type RenderCorpusToInstructionsOptions, type RepairStop, type ReproductionCheck, type ReservationRejection, type ReservationTicket, type ResolveDriveHarness, type ResolveSandboxClientOptions, type ResolveSupervisorTools, type ResolvedMcpServerLaunch, type ResolvedSupervisorProfile, type ResourceRequest, type Restart, type ResultBlobStore, type ResumedKeyState, type ResumedWork, type RollingDispatchOptions, type RootHandle, type RootMaterialization, type RootSignal, type RouterSeam, type RouterToolsSeam, type RouterTransportConfig, type RunAgentRoundsOptions, type RunAgenticOptions, type RunContext, type RunGraphOptions, type RunPersonified, type RunPersonifiedOptions, type RunProvenance, type Runtime, type SandboxCapabilities, type SandboxClient, type SandboxClientProviderOptions, type SandboxControlClient, type SandboxEvent, type SandboxInstance, type SandboxLineage, type SandboxLineageHandle, type SandboxRun, SandboxRunAbortError, type SandboxSeam, type SandboxSteeringOptions, type SandboxToolPartState, type Scope, type ScopeAnalyst, type ScopeAnalyzeInput, type ScopeArgs, type ScopeProgressInput, type ScopeWidenGate, type ScoreOf, type SelectionReceipt, type SessionCapableBox, type SessionMessageLike, type SessionTraceBox, type Settled, type ShapeBudget, type ShapeContext, type ShapeRegistry, type Shell, type ShotSpec, type SpawnEvent, type SpawnForest, type SpawnForestEvent, type SpawnForestInDoubtNode, type SpawnForestMissingTree, type SpawnForestNode, type SpawnForestTree, type SpawnJournal, type SpawnOpts, type SpawnPrior, type SpawnRejection, type Spend, type StdioMcpConnection, type StdioMcpServerSpec, type SteerContext, type SteerableRootHandle, type SteerableSandboxArgs, type SteerableSandboxSession, type StopDecision, type StopRule, type Strategy, type StrategyArtifacts, type StrategyCtx, type StrategyEvolutionConfig, type StrategyMessage, type StrategyResult, type StrategyShotResult, type StreamAgentTurnOptions, type StructuralRolloutConfig, type StructuralRolloutMessage, type StructuralRolloutPolicy, type StructuralRolloutResult, type SuperviseDispatchOptions, type SuperviseOptions, type SuperviseOptionsForDispatch, type SuperviseRegistry, type SuperviseRegistryTable, type SuperviseSurfaceOptions, type SuperviseSurfaceResult, type SupervisedResult, type Supervisor, type SupervisorAgentDeps, type SupervisorFinalizer, type SupervisorNodeContext, type SupervisorNodeContextSeed, type SupervisorOpts, type SupervisorProfile, type SupervisorSpanAttributes, type SupervisorSpanOptions, type SupervisorSpanOutcome, type SupervisorSpanRecorder, type SupervisorToolDescriptor, type SupervisorToolInvocationContext, type SurfaceScore, type SurfaceWorkerConfig, type SurfaceWorkerOut, type ToolLoopCompaction, type ToolLoopCompactionOptions, type ToolLoopMessageRecord, type ToolLoopToolCall, type ToolSpec, type ToolStepInput, type TraceSource, type TrajectoryAnalysis, type TrajectoryNode, type TrajectoryReport, type TrajectoryReportFn, type TrajectoryReportOptions, type TraversalContinuity, type TreeView, type TurnResult, type UnknownMaterializationReason, type UntrackedCopyStats, type UsageEvent, VERIFY_TAIL_CHARS, type ValidationCtx, type Validator, type VerifierEnvironmentOptions, type Verify, type VerifySpec, type VisibleCheck, WORKER_TOOL_TRACE_SCHEMA_VERSION, type WaitOpts, type WaitOutcome, type WaitProbe, type WaitProbeRegistry, type WaitRejection, type WaitSpec, type WatchTraceOptions, type WaterfallCollector, type WaterfallReport, type WaterfallSpan, type Widen, type WidenDecision, type WidenGate, type WidenLineage, type WidenSpec, type WinnerStrategy, type WorkerEvidenceInput, type WorkerProgress, type WorkerResumeContext, type WorkerSpawnContext, type WorkerSteerRequest, type WorkerToolTraceArtifact, type WorkerTraceEvidence, type WorkerTraceResolver, type WorkerTraceSeamCarrier, type WorkerTraceUnavailableReason, type WorkerWatchOptions, type Workspace, type WorkspaceCommit, type WorkspaceRequest, type WorkspaceRun, type WorktreeCheckRunner, type WorktreeCliExecutorOptions, type WorktreeCommandResult, type WorktreeFanoutOptions, type WorktreeHarnessResult, type WorktreePatchArtifact, type WorktreeProfileMaterializationReceipt, acquireSandbox, adaptiveRefine, allOf, allWorkersStalled, analyzeTrace, analyzesFindingsReportPrompt, anyOf, anytimeReport, areaUnderCurve, asAuthoredProfile, assertCoordinationBinding, assertModelAllowed, assertProfileModelsAllowed, assertStrategyContract, assertTraceDerivedFindings, assessAuthoredProfile, auditIntent, authorStrategy, bestDelivered, bestSoFar, breadthStrategy, buildSteerContext, builtinShapes, canDisplace, canonicalFindingEvent, captureWorkerTraceEvidence, chatTransportExecutor, chatWorkerSeam, classifyDriverFailure, cliWorktreeExecutor, closingWorkerNote, collectAgentTurn, collectDelivered, compareCheckOutcomes, completionAuthorizes, composeCheckSources, composeWorkerEvidence, computeFindingId, connectStdioMcp, contentAddress, copyUntrackedIntoClone, createActivityLog, createAgentEnvironmentProviderRegistry, createBudgetPool, createChatSessionStore, createEventBus, createExecutor, createExecutorRegistry, createFileRunContext, createInMemoryRunContext, createInbox, createMcpEnvironment, createOpenInferenceFileExporter, createOtelExporter, createProgressTracker, createPromptRegistry, createPushTraceSource, createRootHandle, createSandboxLineage, createSandboxToolPartState, createScope, createScopeAnalyst, createShapeRegistry, createSteerableSandboxSession, createSupervisor, createSupervisorSpanRecorder, createTangleSandboxExactProcessProvider, createVerifierEnvironment, createWaitProbes, createWaterfallCollector, createWorktreeCliExecutor, decodeToolPart, defaultAnalystInstruction, defaultAuditorInstruction, defaultDelegateBudget, defaultEdgeTraversalCap, defaultExtractCandidate, defaultProfileRichnessThresholds, defaultSelectWinner, defaultStructuralRolloutPolicy, defaultToolDetectors, defineLeaderboard, definePersona, defineStrategy, delegate, delegatesWorkerBriefPrompt, depthStrategy, deterministicCompletion, discriminatingMeans, dumbContinuationFailPrompt, dumbContinuationPassPrompt, effectiveConcurrency, envKeyProvider, equalKOnCost, extractLlmCallEvent, failuresAnalyst, fanout, filterAuthoredAsserts, finalizeBestDelivered, flatWidenGate, formatPromptHandle, freeSlots, gateOnDeliverable, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, isWaitOutcome, jjWorkspace, kernelPromptRegistry, leaderboard, legacySupervisorRunDir, legacySupervisorRunsRoot, loadSpawnForest, localSandboxClient, localShell, loopCampaignDispatch, loopDispatch, loopUntil, makeFinding, mapExecutorResult, mapSandboxEvent, mapSandboxToolEvent, materializeLocalMcp, materializeTreeView, mcpSecretEnvMetadataKey, modelAuthoredChecks, naiveContinuationPrompt, noProgressFor, normalizeAnalyzeOnSettle, observe, officialChecksFromMeta, openSandboxRun, pairwiseSignificance, panel, parseWorkerToolTraceArtifact, patchDelivered, pendingWaits, pickBestDelivered, pickChampion, pipeline, plateau, plateauLength, pollFor, printBenchmarkReport, probeSandboxCapabilities, profileChatClient, profileOptimizerModelCall, profileRichnessFinding, promotionGate, promptHandle, providerAsExecutor, providerAsSandboxClient, queueOf, readWorkerProgress, readWorkerSteerRequests, readWorkerTraceContext, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderLeaderboardHtml, renderLeaderboardMarkdown, renderLeaderboardSvg, renderPairwiseMarkdown, renderReport, replaySpawnTree, resolveAgentEnvironmentProvider, resolveEntrySymbol, resolveMcpServerLaunch, resolveSandboxClient, resolveSecretEnv, resolveSupervisorProfile, rollingDispatch, runAgentRounds, runAgentic, runBenchmark, runFinalizer, runGraph, runInWorkspace, runPersonified, runStrategyEvolution, runTree, safeWorkerFile, sample, sampleFromSettled, sampleThenRefine, sandboxCheckRunner, sandboxClientAsProvider, sandboxSessionTraceSource, sanitizeMcpToolSchema, secretEnvOfMcpServer, selectBestIndex, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, settledWorkerOut, spendFromUsageEvents, stopSentinel, strategyAuthorContract, strategyAuthorSystemPrompt, streamAgentTurn, structuralRollout, sumSandboxUsage, supervise, superviseDispatch, superviseSurface, supervisorAgent, supervisorInstructions, supervisorPolicyPrompt, supervisorRunDir, supervisorRunsRoot, supervisorWorkersDir, timerAt, trajectoryReport, validateWaitSpec, verify, visibleCheckScore, waitUntil, watchTrace, widen, withUntrackedArtifacts, workerControlLogFile, workerFromBackend, workerInboxFile, workerInboxFileFromEventDir, workerTraceAnalysisStore, workerTraceEnv, workerTraceSeamKey, worktreeFanout, writeWorkerSteer };
|
package/dist/kernel.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { n as streamAgentTurn, t as collectAgentTurn } from "./stream-agent-turn-DE8_alvm.js";
|
|
2
|
-
import { _ as captureWorkerTraceEvidence, a as loadSpawnForest, b as workerTraceAnalysisStore, c as replaySpawnTree, g as WORKER_TOOL_TRACE_SCHEMA_VERSION, i as InMemorySpawnJournal, n as FileSpawnJournal, o as materializeTreeView, r as InMemoryResultBlobStore, s as pendingWaits, t as FileResultBlobStore, x as contentAddress, y as parseWorkerToolTraceArtifact } from "./spawn-journal-
|
|
2
|
+
import { _ as captureWorkerTraceEvidence, a as loadSpawnForest, b as workerTraceAnalysisStore, c as replaySpawnTree, g as WORKER_TOOL_TRACE_SCHEMA_VERSION, i as InMemorySpawnJournal, n as FileSpawnJournal, o as materializeTreeView, r as InMemoryResultBlobStore, s as pendingWaits, t as FileResultBlobStore, x as contentAddress, y as parseWorkerToolTraceArtifact } from "./spawn-journal-Cd5L-Ie9.js";
|
|
3
3
|
import { i as mapSandboxToolEvent, n as extractLlmCallEvent, o as sumSandboxUsage, r as mapSandboxEvent, t as createSandboxToolPartState } from "./sandbox-events-CRDwc5WN.js";
|
|
4
4
|
import { n as assertModelAllowed, r as assertProfileModelsAllowed } from "./model-policy-mWSoToiQ.js";
|
|
5
|
-
import { $ as createSandboxLineage, B as workerTraceSeamKey, C as queueOf, G as sandboxSessionTraceSource, H as createSteerableSandboxSession, I as createWorktreeCliExecutor, J as readWorkerProgress, K as DEFAULT_STALL_AFTER_MS, M as cliWorktreeExecutor, N as createExecutor, O as createBudgetPool, P as createExecutorRegistry, Q as runAgentRounds, R as readWorkerTraceContext, S as freeSlots, U as createPushTraceSource, V as DEFAULT_SANDBOX_STEERING_MAX_TURNS, W as decodeToolPart, Y as createInbox, Z as defaultSelectWinner, _ as pollFor, a as pickBestDelivered, b as waitUntil, et as probeSandboxCapabilities, ft as createOpenInferenceFileExporter, g as isWaitOutcome, h as createWaitProbes, i as collectDelivered, k as spendFromUsageEvents, m as settledToIteration, n as createSupervisor, o as runFinalizer, pt as createOtelExporter, q as createActivityLog, r as bestDelivered, s as runTree, t as createRootHandle, tt as acquireSandbox, u as createScope, v as timerAt, w as rollingDispatch, x as effectiveConcurrency, y as validateWaitSpec, z as workerTraceEnv } from "./supervisor-
|
|
6
|
-
import { a as sandboxClientAsProvider, i as resolveAgentEnvironmentProvider, n as providerAsExecutor, o as createTangleSandboxExactProcessProvider, r as providerAsSandboxClient, t as createAgentEnvironmentProviderRegistry } from "./environment-provider-
|
|
7
|
-
import { C as observe, E as profileOptimizerModelCall, S as defaultAnalystInstruction, T as profileChatClient, _ as depthStrategy, a as defaultStructuralRolloutPolicy, b as sample, c as officialChecksFromMeta, d as selectBestIndex, f as structuralRollout, g as defineStrategy, h as breadthStrategy, i as defaultExtractCandidate, l as resolveEntrySymbol, m as adaptiveRefine, n as compareCheckOutcomes, o as filterAuthoredAsserts, p as visibleCheckScore, r as composeCheckSources, s as modelAuthoredChecks, t as canDisplace, u as sandboxCheckRunner, v as refine, w as renderReport, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-
|
|
8
|
-
import { $ as pipeline, A as assertStrategyContract, At as
|
|
9
|
-
import { At as defaultToolDetectors, Ct as plateauLength, Et as canonicalFindingEvent, Ft as createSupervisorSpanRecorder, It as gateOnDeliverable, Lt as mapExecutorResult, Mt as createFileRunContext, Nt as createInMemoryRunContext, Ot as normalizeAnalyzeOnSettle, Pt as FileCoordinationLog, St as bestSoFar, Tt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, X as delegate, Y as defaultDelegateBudget, _ as promptHandle, _t as noProgressFor, a as assertCoordinationBinding, b as classifyDriverFailure, bt as anytimeReport, d as delegatesWorkerBriefPrompt, f as dumbContinuationFailPrompt, ft as finalizeBestDelivered, g as naiveContinuationPrompt, gt as createProgressTracker, h as kernelPromptRegistry, ht as anyOf, i as workerFromBackend, jt as watchTrace, kt as createEventBus, l as analyzesFindingsReportPrompt, m as formatPromptHandle, mt as allWorkersStalled, n as supervise, o as resolveSupervisorProfile, p as dumbContinuationPassPrompt, pt as allOf, s as supervisorAgent, t as DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, u as createPromptRegistry, v as supervisorPolicyPrompt, vt as plateau, wt as renderAnytimeTable, x as serveCoordinationMcp, xt as areaUnderCurve, y as DriverAttemptsExhaustedError, yt as sampleFromSettled } from "./supervise-
|
|
10
|
-
import { a as supervisorInstructions, i as profileRichnessFinding, n as assessAuthoredProfile, r as defaultProfileRichnessThresholds, t as asAuthoredProfile } from "./authoring-
|
|
11
|
-
import { n as defaultEdgeTraversalCap, r as runGraph, t as GraphEdgeCapError } from "./graph-
|
|
5
|
+
import { $ as createSandboxLineage, B as workerTraceSeamKey, C as queueOf, G as sandboxSessionTraceSource, H as createSteerableSandboxSession, I as createWorktreeCliExecutor, J as readWorkerProgress, K as DEFAULT_STALL_AFTER_MS, M as cliWorktreeExecutor, N as createExecutor, O as createBudgetPool, P as createExecutorRegistry, Q as runAgentRounds, R as readWorkerTraceContext, S as freeSlots, U as createPushTraceSource, V as DEFAULT_SANDBOX_STEERING_MAX_TURNS, W as decodeToolPart, Y as createInbox, Z as defaultSelectWinner, _ as pollFor, a as pickBestDelivered, b as waitUntil, et as probeSandboxCapabilities, ft as createOpenInferenceFileExporter, g as isWaitOutcome, h as createWaitProbes, i as collectDelivered, k as spendFromUsageEvents, m as settledToIteration, n as createSupervisor, o as runFinalizer, pt as createOtelExporter, q as createActivityLog, r as bestDelivered, s as runTree, t as createRootHandle, tt as acquireSandbox, u as createScope, v as timerAt, w as rollingDispatch, x as effectiveConcurrency, y as validateWaitSpec, z as workerTraceEnv } from "./supervisor-CMtutocL.js";
|
|
6
|
+
import { a as sandboxClientAsProvider, i as resolveAgentEnvironmentProvider, n as providerAsExecutor, o as createTangleSandboxExactProcessProvider, r as providerAsSandboxClient, t as createAgentEnvironmentProviderRegistry } from "./environment-provider-mDsjfGjY.js";
|
|
7
|
+
import { C as observe, E as profileOptimizerModelCall, S as defaultAnalystInstruction, T as profileChatClient, _ as depthStrategy, a as defaultStructuralRolloutPolicy, b as sample, c as officialChecksFromMeta, d as selectBestIndex, f as structuralRollout, g as defineStrategy, h as breadthStrategy, i as defaultExtractCandidate, l as resolveEntrySymbol, m as adaptiveRefine, n as compareCheckOutcomes, o as filterAuthoredAsserts, p as visibleCheckScore, r as composeCheckSources, s as modelAuthoredChecks, t as canDisplace, u as sandboxCheckRunner, v as refine, w as renderReport, x as sampleThenRefine, y as runAgentic } from "./structural-rollout-v8o_EO8_.js";
|
|
8
|
+
import { $ as pipeline, A as assertStrategyContract, At as materializeLocalMcp, B as trajectoryReport, C as chatTransportExecutor, Ct as renderLeaderboardMarkdown, D as pickChampion, Dt as defaultAuditorInstruction, E as discriminatingMeans, Et as auditIntent, F as openSandboxRun, Ft as resolveMcpServerLaunch, G as registerShape, H as runPersonified, I as printBenchmarkReport, It as resolveSecretEnv, J as renderCorpusToInstructions, K as FileCorpus, L as runBenchmark, Lt as secretEnvOfMcpServer, M as strategyAuthorContract, Mt as sanitizeMcpToolSchema, N as strategyAuthorSystemPrompt, Nt as envKeyProvider, O as runStrategyEvolution, Ot as McpSpawnFault, P as SandboxRunAbortError, Pt as mcpSecretEnvMetadataKey, Q as panel, R as promotionGate, St as renderLeaderboardHtml, T as createChatSessionStore, Tt as renderPairwiseMarkdown, U as builtinShapes, V as definePersona, W as createShapeRegistry, X as flatWidenGate, Y as fanout, Z as loopUntil, _ as settledWorkerOut, _t as deterministicCompletion, a as localShell, at as createScopeAnalyst, b as analyzeTrace, bt as leaderboard, c as createVerifierEnvironment, ct as harvestCorpus, d as worktreeFanout, dt as localSandboxClient, et as selectValidWinner, f as EVIDENCE_MAX_CHARS, ft as inlineSandboxClient, g as composeWorkerEvidence, gt as completionAuthorizes, h as closingWorkerNote, ht as superviseDispatch, i as jjWorkspace, it as buildSteerContext, j as authorStrategy, jt as createMcpEnvironment, k as selectChampion, kt as connectStdioMcp, l as failuresAnalyst, lt as defineLeaderboard, m as VERIFY_TAIL_CHARS, mt as loopDispatch, n as makeFinding, nt as widen, o as runInWorkspace, ot as registryScopeAnalyst, p as NOTE_MAX_CHARS, pt as loopCampaignDispatch, q as InMemoryCorpus, r as gitWorkspace, rt as assertTraceDerivedFindings, s as createWaterfallCollector, st as inProcessSandboxClient, t as computeFindingId, tt as verify, u as superviseSurface, ut as resolveSandboxClient, v as copyUntrackedIntoClone, vt as sentinelCompletion, w as chatWorkerSeam, wt as renderLeaderboardSvg, x as patchDelivered, xt as pairwiseSignificance, y as withUntrackedArtifacts, yt as stopSentinel, z as equalKOnCost } from "./runtime-BVKEU5jc.js";
|
|
9
|
+
import { At as defaultToolDetectors, Ct as plateauLength, Et as canonicalFindingEvent, Ft as createSupervisorSpanRecorder, It as gateOnDeliverable, Lt as mapExecutorResult, Mt as createFileRunContext, Nt as createInMemoryRunContext, Ot as normalizeAnalyzeOnSettle, Pt as FileCoordinationLog, St as bestSoFar, Tt as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, X as delegate, Y as defaultDelegateBudget, _ as promptHandle, _t as noProgressFor, a as assertCoordinationBinding, b as classifyDriverFailure, bt as anytimeReport, d as delegatesWorkerBriefPrompt, f as dumbContinuationFailPrompt, ft as finalizeBestDelivered, g as naiveContinuationPrompt, gt as createProgressTracker, h as kernelPromptRegistry, ht as anyOf, i as workerFromBackend, jt as watchTrace, kt as createEventBus, l as analyzesFindingsReportPrompt, m as formatPromptHandle, mt as allWorkersStalled, n as supervise, o as resolveSupervisorProfile, p as dumbContinuationPassPrompt, pt as allOf, s as supervisorAgent, t as DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, u as createPromptRegistry, v as supervisorPolicyPrompt, vt as plateau, wt as renderAnytimeTable, x as serveCoordinationMcp, xt as areaUnderCurve, y as DriverAttemptsExhaustedError, yt as sampleFromSettled } from "./supervise-DzLi985l.js";
|
|
10
|
+
import { a as supervisorInstructions, i as profileRichnessFinding, n as assessAuthoredProfile, r as defaultProfileRichnessThresholds, t as asAuthoredProfile } from "./authoring-B-Oe8VUf.js";
|
|
11
|
+
import { n as defaultEdgeTraversalCap, r as runGraph, t as GraphEdgeCapError } from "./graph-DOfL9TLn.js";
|
|
12
12
|
import { a as supervisorRunDir, c as workerControlLogFile, d as writeWorkerSteer, i as safeWorkerFile, l as workerInboxFile, n as legacySupervisorRunsRoot, o as supervisorRunsRoot, r as readWorkerSteerRequests, s as supervisorWorkersDir, t as legacySupervisorRunDir, u as workerInboxFileFromEventDir } from "./run-layout-CeJsEAom.js";
|
|
13
|
-
export { DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, DEFAULT_AWAIT_EVENT_TIMEOUT_MS, DEFAULT_SANDBOX_STEERING_MAX_TURNS, DEFAULT_STALL_AFTER_MS, DriverAttemptsExhaustedError, EVIDENCE_MAX_CHARS, FileCoordinationLog, FileCorpus, FileResultBlobStore, FileSpawnJournal, GraphEdgeCapError, InMemoryCorpus, InMemoryResultBlobStore, InMemorySpawnJournal, McpSpawnFault, NOTE_MAX_CHARS, SandboxRunAbortError, VERIFY_TAIL_CHARS, WORKER_TOOL_TRACE_SCHEMA_VERSION, acquireSandbox, adaptiveRefine, allOf, allWorkersStalled, analyzeTrace, analyzesFindingsReportPrompt, anyOf, anytimeReport, areaUnderCurve, asAuthoredProfile, assertCoordinationBinding, assertModelAllowed, assertProfileModelsAllowed, assertStrategyContract, assertTraceDerivedFindings, assessAuthoredProfile, auditIntent, authorStrategy, bestDelivered, bestSoFar, breadthStrategy, buildSteerContext, builtinShapes, canDisplace, canonicalFindingEvent, captureWorkerTraceEvidence, chatTransportExecutor, chatWorkerSeam, classifyDriverFailure, cliWorktreeExecutor, closingWorkerNote, collectAgentTurn, collectDelivered, compareCheckOutcomes, completionAuthorizes, composeCheckSources, composeWorkerEvidence, computeFindingId, connectStdioMcp, contentAddress, copyUntrackedIntoClone, createActivityLog, createAgentEnvironmentProviderRegistry, createBudgetPool, createChatSessionStore, createEventBus, createExecutor, createExecutorRegistry, createFileRunContext, createInMemoryRunContext, createInbox, createMcpEnvironment, createOpenInferenceFileExporter, createOtelExporter, createProgressTracker, createPromptRegistry, createPushTraceSource, createRootHandle, createSandboxLineage, createSandboxToolPartState, createScope, createScopeAnalyst, createShapeRegistry, createSteerableSandboxSession, createSupervisor, createSupervisorSpanRecorder, createTangleSandboxExactProcessProvider, createVerifierEnvironment, createWaitProbes, createWaterfallCollector, createWorktreeCliExecutor, decodeToolPart, defaultAnalystInstruction, defaultAuditorInstruction, defaultDelegateBudget, defaultEdgeTraversalCap, defaultExtractCandidate, defaultProfileRichnessThresholds, defaultSelectWinner, defaultStructuralRolloutPolicy, defaultToolDetectors, defineLeaderboard, definePersona, defineStrategy, delegate, delegatesWorkerBriefPrompt, depthStrategy, deterministicCompletion, discriminatingMeans, dumbContinuationFailPrompt, dumbContinuationPassPrompt, effectiveConcurrency, envKeyProvider, equalKOnCost, extractLlmCallEvent, failuresAnalyst, fanout, filterAuthoredAsserts, finalizeBestDelivered, flatWidenGate, formatPromptHandle, freeSlots, gateOnDeliverable, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, isWaitOutcome, jjWorkspace, kernelPromptRegistry, leaderboard, legacySupervisorRunDir, legacySupervisorRunsRoot, loadSpawnForest, localSandboxClient, localShell, loopCampaignDispatch, loopDispatch, loopUntil, makeFinding, mapExecutorResult, mapSandboxEvent, mapSandboxToolEvent, materializeLocalMcp, materializeTreeView, mcpSecretEnvMetadataKey, modelAuthoredChecks, naiveContinuationPrompt, noProgressFor, normalizeAnalyzeOnSettle, observe, officialChecksFromMeta, openSandboxRun, pairwiseSignificance, panel, parseWorkerToolTraceArtifact, patchDelivered, pendingWaits, pickBestDelivered, pickChampion, pipeline, plateau, plateauLength, pollFor, printBenchmarkReport, probeSandboxCapabilities, profileChatClient, profileOptimizerModelCall, profileRichnessFinding, promotionGate, promptHandle, providerAsExecutor, providerAsSandboxClient, queueOf, readWorkerProgress, readWorkerSteerRequests, readWorkerTraceContext, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderLeaderboardHtml, renderLeaderboardMarkdown, renderLeaderboardSvg, renderPairwiseMarkdown, renderReport, replaySpawnTree, resolveAgentEnvironmentProvider, resolveEntrySymbol, resolveMcpServerLaunch, resolveSandboxClient, resolveSecretEnv, resolveSupervisorProfile, rollingDispatch, runAgentRounds, runAgentic, runBenchmark, runFinalizer, runGraph, runInWorkspace, runPersonified, runStrategyEvolution, runTree, safeWorkerFile, sample, sampleFromSettled, sampleThenRefine, sandboxCheckRunner, sandboxClientAsProvider, sandboxSessionTraceSource, sanitizeMcpToolSchema, secretEnvOfMcpServer, selectBestIndex, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, settledWorkerOut, spendFromUsageEvents, stopSentinel, strategyAuthorContract, strategyAuthorSystemPrompt, streamAgentTurn, structuralRollout, sumSandboxUsage, supervise, superviseSurface, supervisorAgent, supervisorInstructions, supervisorPolicyPrompt, supervisorRunDir, supervisorRunsRoot, supervisorWorkersDir, timerAt, trajectoryReport, validateWaitSpec, verify, visibleCheckScore, waitUntil, watchTrace, widen, withUntrackedArtifacts, workerControlLogFile, workerFromBackend, workerInboxFile, workerInboxFileFromEventDir, workerTraceAnalysisStore, workerTraceEnv, workerTraceSeamKey, worktreeFanout, writeWorkerSteer };
|
|
13
|
+
export { DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY, DEFAULT_AWAIT_EVENT_TIMEOUT_MS, DEFAULT_SANDBOX_STEERING_MAX_TURNS, DEFAULT_STALL_AFTER_MS, DriverAttemptsExhaustedError, EVIDENCE_MAX_CHARS, FileCoordinationLog, FileCorpus, FileResultBlobStore, FileSpawnJournal, GraphEdgeCapError, InMemoryCorpus, InMemoryResultBlobStore, InMemorySpawnJournal, McpSpawnFault, NOTE_MAX_CHARS, SandboxRunAbortError, VERIFY_TAIL_CHARS, WORKER_TOOL_TRACE_SCHEMA_VERSION, acquireSandbox, adaptiveRefine, allOf, allWorkersStalled, analyzeTrace, analyzesFindingsReportPrompt, anyOf, anytimeReport, areaUnderCurve, asAuthoredProfile, assertCoordinationBinding, assertModelAllowed, assertProfileModelsAllowed, assertStrategyContract, assertTraceDerivedFindings, assessAuthoredProfile, auditIntent, authorStrategy, bestDelivered, bestSoFar, breadthStrategy, buildSteerContext, builtinShapes, canDisplace, canonicalFindingEvent, captureWorkerTraceEvidence, chatTransportExecutor, chatWorkerSeam, classifyDriverFailure, cliWorktreeExecutor, closingWorkerNote, collectAgentTurn, collectDelivered, compareCheckOutcomes, completionAuthorizes, composeCheckSources, composeWorkerEvidence, computeFindingId, connectStdioMcp, contentAddress, copyUntrackedIntoClone, createActivityLog, createAgentEnvironmentProviderRegistry, createBudgetPool, createChatSessionStore, createEventBus, createExecutor, createExecutorRegistry, createFileRunContext, createInMemoryRunContext, createInbox, createMcpEnvironment, createOpenInferenceFileExporter, createOtelExporter, createProgressTracker, createPromptRegistry, createPushTraceSource, createRootHandle, createSandboxLineage, createSandboxToolPartState, createScope, createScopeAnalyst, createShapeRegistry, createSteerableSandboxSession, createSupervisor, createSupervisorSpanRecorder, createTangleSandboxExactProcessProvider, createVerifierEnvironment, createWaitProbes, createWaterfallCollector, createWorktreeCliExecutor, decodeToolPart, defaultAnalystInstruction, defaultAuditorInstruction, defaultDelegateBudget, defaultEdgeTraversalCap, defaultExtractCandidate, defaultProfileRichnessThresholds, defaultSelectWinner, defaultStructuralRolloutPolicy, defaultToolDetectors, defineLeaderboard, definePersona, defineStrategy, delegate, delegatesWorkerBriefPrompt, depthStrategy, deterministicCompletion, discriminatingMeans, dumbContinuationFailPrompt, dumbContinuationPassPrompt, effectiveConcurrency, envKeyProvider, equalKOnCost, extractLlmCallEvent, failuresAnalyst, fanout, filterAuthoredAsserts, finalizeBestDelivered, flatWidenGate, formatPromptHandle, freeSlots, gateOnDeliverable, gitWorkspace, harvestCorpus, inProcessSandboxClient, inlineSandboxClient, isWaitOutcome, jjWorkspace, kernelPromptRegistry, leaderboard, legacySupervisorRunDir, legacySupervisorRunsRoot, loadSpawnForest, localSandboxClient, localShell, loopCampaignDispatch, loopDispatch, loopUntil, makeFinding, mapExecutorResult, mapSandboxEvent, mapSandboxToolEvent, materializeLocalMcp, materializeTreeView, mcpSecretEnvMetadataKey, modelAuthoredChecks, naiveContinuationPrompt, noProgressFor, normalizeAnalyzeOnSettle, observe, officialChecksFromMeta, openSandboxRun, pairwiseSignificance, panel, parseWorkerToolTraceArtifact, patchDelivered, pendingWaits, pickBestDelivered, pickChampion, pipeline, plateau, plateauLength, pollFor, printBenchmarkReport, probeSandboxCapabilities, profileChatClient, profileOptimizerModelCall, profileRichnessFinding, promotionGate, promptHandle, providerAsExecutor, providerAsSandboxClient, queueOf, readWorkerProgress, readWorkerSteerRequests, readWorkerTraceContext, refine, registerShape, registryScopeAnalyst, renderAnytimeTable, renderCorpusToInstructions, renderLeaderboardHtml, renderLeaderboardMarkdown, renderLeaderboardSvg, renderPairwiseMarkdown, renderReport, replaySpawnTree, resolveAgentEnvironmentProvider, resolveEntrySymbol, resolveMcpServerLaunch, resolveSandboxClient, resolveSecretEnv, resolveSupervisorProfile, rollingDispatch, runAgentRounds, runAgentic, runBenchmark, runFinalizer, runGraph, runInWorkspace, runPersonified, runStrategyEvolution, runTree, safeWorkerFile, sample, sampleFromSettled, sampleThenRefine, sandboxCheckRunner, sandboxClientAsProvider, sandboxSessionTraceSource, sanitizeMcpToolSchema, secretEnvOfMcpServer, selectBestIndex, selectChampion, selectValidWinner, sentinelCompletion, serveCoordinationMcp, settledToIteration, settledWorkerOut, spendFromUsageEvents, stopSentinel, strategyAuthorContract, strategyAuthorSystemPrompt, streamAgentTurn, structuralRollout, sumSandboxUsage, supervise, superviseDispatch, superviseSurface, supervisorAgent, supervisorInstructions, supervisorPolicyPrompt, supervisorRunDir, supervisorRunsRoot, supervisorWorkersDir, timerAt, trajectoryReport, validateWaitSpec, verify, visibleCheckScore, waitUntil, watchTrace, widen, withUntrackedArtifacts, workerControlLogFile, workerFromBackend, workerInboxFile, workerInboxFileFromEventDir, workerTraceAnalysisStore, workerTraceEnv, workerTraceSeamKey, worktreeFanout, writeWorkerSteer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as persistCandidateOutputArtifact, ct as omitTopLevelDigest, nt as canonicalCandidateBytes, ot as embeddedCandidateArtifact } from "./prepare-
|
|
2
|
-
import { i as sealAgentCandidateBundle, t as captureAgentCandidateWorkspace } from "./workspace-archive-
|
|
1
|
+
import { a as persistCandidateOutputArtifact, ct as omitTopLevelDigest, nt as canonicalCandidateBytes, ot as embeddedCandidateArtifact } from "./prepare-BQ82nG06.js";
|
|
2
|
+
import { i as sealAgentCandidateBundle, t as captureAgentCandidateWorkspace } from "./workspace-archive-CGcXL3zA.js";
|
|
3
3
|
import { t as assertExecutableAgentProfile } from "./model-policy-mWSoToiQ.js";
|
|
4
|
-
import { t as createAgentImprovementActivationResult } from "./activation-
|
|
4
|
+
import { t as createAgentImprovementActivationResult } from "./activation-CDKatOlp.js";
|
|
5
5
|
import { t as RESEARCHER_SYSTEM_PROMPT } from "./researcher-CYmr4VJy.js";
|
|
6
|
-
import { n as supervise } from "./supervise-
|
|
6
|
+
import { n as supervise } from "./supervise-DzLi985l.js";
|
|
7
7
|
import { agentCandidateKnowledgeSchema, agentProfileSchema, sha256DigestSchema } from "@tangle-network/agent-interface";
|
|
8
8
|
import { realpath } from "node:fs/promises";
|
|
9
9
|
import { evaluateKnowledgeBaseReadiness, fromAgentCandidateKnowledgeRef, improveKnowledgeBase, knowledgeImprovementCandidateRef, loadKnowledgeImprovementActivationResult, promoteKnowledgeCandidate, restoreKnowledgeCandidateBaseline, toAgentCandidateKnowledgeRef, withKnowledgeImprovementComparison } from "@tangle-network/agent-knowledge";
|
|
@@ -432,4 +432,4 @@ function addSpent(target, result) {
|
|
|
432
432
|
//#endregion
|
|
433
433
|
export { createSupervisedKnowledgeUpdater as a, runSupervisedKnowledgeUpdate as c, RESEARCH_SUPERVISOR_SYSTEM_PROMPT as i, createKnowledgeImprovementActivationExecutor as l, createAgentKnowledgeReadinessCheck as n, formatSupervisedKnowledgeTask as o, runKnowledgeImprovementJob as r, knowledgeReadinessDeliverable as s, buildKnowledgeImprovementExperimentBundles as t };
|
|
434
434
|
|
|
435
|
-
//# sourceMappingURL=knowledge-
|
|
435
|
+
//# sourceMappingURL=knowledge-DPDhKnOz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"knowledge-D4zNvxw5.js","names":[],"sources":["../src/knowledge/activation.ts","../src/knowledge/supervised-update.ts","../src/knowledge/improvement-job.ts"],"sourcesContent":["import type {\n AgentImprovementActivationOutcome,\n AgentImprovementActivationResult,\n AgentImprovementActivationTarget,\n Sha256Digest,\n} from '@tangle-network/agent-interface'\nimport { sha256DigestSchema } from '@tangle-network/agent-interface'\nimport {\n fromAgentCandidateKnowledgeRef,\n type KnowledgeImprovementMutationReceipt,\n loadKnowledgeImprovementActivationResult,\n type PromoteKnowledgeCandidateOptions,\n promoteKnowledgeCandidate,\n restoreKnowledgeCandidateBaseline,\n} from '@tangle-network/agent-knowledge'\n\nimport {\n type AgentImprovementActivationReconciliation,\n type AgentImprovementActivationResultStore,\n type AgentImprovementActivationTransition,\n type AgentImprovementActivationTransitionInput,\n createAgentImprovementActivationResult,\n} from '../intelligence/activation'\n\nexport interface CreateKnowledgeImprovementActivationExecutorOptions\n extends Omit<PromoteKnowledgeCandidateOptions, 'root' | 'candidate'> {\n root: string\n identity: string\n results: AgentImprovementActivationResultStore\n}\n\nexport interface KnowledgeImprovementActivationExecutor {\n transition: AgentImprovementActivationTransition\n reconcile: AgentImprovementActivationReconciliation\n}\n\n/** Apply or restore one local knowledge candidate through the shared activation contract. */\nexport function createKnowledgeImprovementActivationExecutor(\n options: CreateKnowledgeImprovementActivationExecutorOptions,\n): KnowledgeImprovementActivationExecutor {\n if (!options.identity.trim()) throw new Error('knowledge activation identity is required')\n return {\n reconcile: async (transition) => {\n const inspected = await inspectKnowledgeActivation(options, transition)\n return inspected.settled ? inspected.result : undefined\n },\n transition: async (transition) => {\n if (transition.expired) {\n throw new Error('knowledge write transition cannot run after authorization expires')\n }\n const inspected = await inspectKnowledgeActivation(options, transition)\n if (inspected.settled) return inspected.result\n\n const mutationOptions = {\n root: options.root,\n candidate: inspected.candidate,\n activation: {\n activation: transition.activation,\n attemptedAt: transition.attemptedAt,\n identity: options.identity,\n createResult: (receipt: KnowledgeImprovementMutationReceipt) =>\n inspected.create(\n knowledgeMutationOutcome(receipt, inspected, transition.activation.intent),\n ),\n },\n ...(options.ownerId ? { ownerId: options.ownerId } : {}),\n ...(options.leaseTtlMs === undefined ? {} : { leaseTtlMs: options.leaseTtlMs }),\n ...(options.now ? { now: options.now } : {}),\n ...(options.onState ? { onState: options.onState } : {}),\n }\n const improvement =\n transition.activation.intent === 'activate-candidate'\n ? await promoteKnowledgeCandidate(mutationOptions)\n : await restoreKnowledgeCandidateBaseline(mutationOptions)\n if (!improvement.activationResult) {\n throw new Error('knowledge mutation did not persist its shared activation result')\n }\n return options.results.putIfAbsent(improvement.activationResult)\n },\n }\n}\n\ntype CreateKnowledgeActivation = (\n outcome: AgentImprovementActivationOutcome,\n) => AgentImprovementActivationResult\n\ntype InspectedKnowledgeActivation =\n | { settled: true; result: unknown | undefined }\n | {\n settled: false\n target: AgentImprovementActivationTransitionInput['targets'][number]\n candidate: PromoteKnowledgeCandidateOptions['candidate']\n expectedDigest: Sha256Digest\n desiredDigest: Sha256Digest\n create: CreateKnowledgeActivation\n }\n\nasync function inspectKnowledgeActivation(\n options: CreateKnowledgeImprovementActivationExecutorOptions,\n transition: AgentImprovementActivationTransitionInput,\n): Promise<InspectedKnowledgeActivation> {\n const stored = await options.results.load(transition.activation.digest)\n if (stored !== undefined) return { settled: true, result: stored }\n\n const create: CreateKnowledgeActivation = (outcome) =>\n createAgentImprovementActivationResult(transition, {\n completedAt: completionTime(transition, options.now),\n outcome,\n })\n const store = (outcome: AgentImprovementActivationOutcome) =>\n options.results.putIfAbsent(create(outcome))\n if (transition.kind !== 'sealed-candidate') {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'unsupported',\n code: 'KNOWLEDGE_PROFILE_TRANSITION_UNSUPPORTED',\n message: 'The knowledge adapter accepts only sealed knowledge candidates.',\n }),\n }\n }\n const target = supportedKnowledgeTarget(transition, options.identity)\n if (!target) {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'unsupported',\n code: 'KNOWLEDGE_TARGET_SET_UNSUPPORTED',\n message: 'The knowledge adapter requires exactly one matching knowledge target.',\n }),\n }\n }\n const knowledge = transition.candidateBundle.knowledge\n if (!knowledge) {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'unsupported',\n code: 'KNOWLEDGE_CANDIDATE_MISSING',\n message: 'The measured candidate bundle does not contain a knowledge candidate.',\n }),\n }\n }\n const candidate = fromAgentCandidateKnowledgeRef(knowledge.candidate)\n const expectedDigest =\n transition.activation.intent === 'activate-candidate'\n ? knowledge.candidate.baseHash\n : knowledge.candidate.candidateHash\n const desiredDigest =\n transition.activation.intent === 'activate-candidate'\n ? knowledge.candidate.candidateHash\n : knowledge.candidate.baseHash\n if (target.expectedBaseDigest !== expectedDigest || target.desiredDigest !== desiredDigest) {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'failed',\n code: 'KNOWLEDGE_TARGET_MISMATCH',\n message: 'The activation target does not match the measured knowledge candidate.',\n }),\n }\n }\n\n const durable = await loadKnowledgeImprovementActivationResult({\n root: options.root,\n candidate,\n activation: transition.activation,\n identity: options.identity,\n })\n if (durable) {\n return {\n settled: true,\n result: await options.results.putIfAbsent(durable),\n }\n }\n if (transition.expired) return { settled: true, result: undefined }\n return { settled: false, target, candidate, expectedDigest, desiredDigest, create }\n}\n\nfunction supportedKnowledgeTarget(\n transition: AgentImprovementActivationTransitionInput,\n identity: string,\n): AgentImprovementActivationTransitionInput['targets'][number] | undefined {\n if (transition.targets.length !== 1) return undefined\n const target = transition.targets[0]\n return target.surface === 'knowledge' && target.identity === identity ? target : undefined\n}\n\nfunction knowledgeMutationOutcome(\n receipt: KnowledgeImprovementMutationReceipt,\n inspected: Extract<InspectedKnowledgeActivation, { settled: false }>,\n intent: AgentImprovementActivationTransitionInput['activation']['intent'],\n): AgentImprovementActivationOutcome {\n const expectedTarget = intent === 'activate-candidate' ? 'candidate' : 'baseline'\n const beforeDigest = prefixedDigest(receipt.beforeHash)\n const afterDigest = prefixedDigest(receipt.afterHash)\n if (\n receipt.target !== expectedTarget ||\n receipt.changed !== (beforeDigest !== afterDigest) ||\n (!receipt.changed && (receipt.transactionId !== null || receipt.recovered))\n ) {\n throw new Error('knowledge mutation returned inconsistent state evidence')\n }\n if (receipt.changed) {\n if (\n receipt.transactionId === null ||\n beforeDigest !== inspected.expectedDigest ||\n afterDigest !== inspected.desiredDigest\n ) {\n throw new Error('knowledge activation did not apply its authorized content transition')\n }\n return {\n status: 'applied',\n transactionId: receipt.transactionId,\n targets: [\n {\n surface: inspected.target.surface,\n identity: inspected.target.identity,\n beforeDigest,\n afterDigest,\n },\n ],\n }\n }\n if (afterDigest === inspected.desiredDigest) {\n return {\n status: 'already-applied',\n targets: [targetState(inspected.target, afterDigest)],\n }\n }\n if (afterDigest === inspected.expectedDigest) {\n throw new Error('knowledge activation did not attempt its authorized content transition')\n }\n return {\n status: 'conflict',\n targets: [targetState(inspected.target, afterDigest)],\n }\n}\n\nfunction targetState(target: AgentImprovementActivationTarget, currentDigest: Sha256Digest) {\n return {\n surface: target.surface,\n identity: target.identity,\n currentDigest,\n }\n}\n\nfunction prefixedDigest(hash: string): Sha256Digest {\n return sha256DigestSchema.parse(`sha256:${hash}`)\n}\n\nfunction completionTime(\n transition: AgentImprovementActivationTransitionInput,\n now: (() => Date) | undefined,\n): string {\n const completedAt = (now ?? (() => new Date()))().toISOString()\n return Date.parse(completedAt) < Date.parse(transition.attemptedAt)\n ? transition.attemptedAt\n : completedAt\n}\n","import { agentProfileSchema } from '@tangle-network/agent-interface'\nimport type { RagKnowledgeUpdateResult } from '@tangle-network/agent-knowledge'\nimport { RESEARCHER_SYSTEM_PROMPT } from '../profiles/researcher'\nimport type { DeliverableSpec } from '../runtime/supervise/completion-gate'\nimport { assertExecutableAgentProfile } from '../runtime/supervise/model-policy'\nimport type { ExecutorConfig } from '../runtime/supervise/runtime'\nimport { type SuperviseOptions, supervise } from '../runtime/supervise/supervise'\nimport type { SupervisorProfile } from '../runtime/supervise/supervisor-agent'\nimport type { Budget, SupervisedResult } from '../runtime/supervise/types'\n\n/** Standing prompt for a supervisor that grows a shared knowledge base through spawned researchers. */\nexport const RESEARCH_SUPERVISOR_SYSTEM_PROMPT = [\n 'You are a research supervisor. You do not answer the research question yourself.',\n 'You create and manage researcher workers that improve one shared knowledge base until it is ready.',\n '',\n 'Each round:',\n '1. Read the goal and the gaps the readiness check still reports.',\n '2. Decompose the open work into independent sub-topics.',\n '3. Spawn one researcher per sub-topic; split by sub-topic, never duplicate work.',\n '4. Wait for researchers to settle, steer or re-spawn thin sub-topics, then stop when the check passes.',\n '',\n 'Conserve the shared budget. Prefer a small number of well-scoped researchers over a large fanout that re-covers the same ground.',\n].join('\\n')\n\nexport interface KnowledgeReadinessCheckInput {\n root: string\n goal: string\n readinessSpecs?: readonly unknown[]\n readinessTaskId?: string\n readiness?: unknown\n}\n\nexport type KnowledgeReadinessCheckResult =\n | boolean\n | {\n ready: boolean\n summary?: string\n metadata?: Record<string, unknown>\n }\n\nexport type KnowledgeReadinessCheck = (\n input: KnowledgeReadinessCheckInput,\n) => Promise<KnowledgeReadinessCheckResult> | KnowledgeReadinessCheckResult\n\nexport interface SupervisedKnowledgeUpdateInput {\n goal?: string\n root?: string\n candidateRoot?: string\n findings?: readonly unknown[]\n metadata?: Record<string, unknown>\n}\n\nexport interface SupervisedKnowledgeUpdateResult {\n applied: boolean\n summary: string\n supervised: SupervisedResult<unknown>\n metadata: NonNullable<RagKnowledgeUpdateResult['metadata']>\n}\n\nexport interface SupervisedKnowledgeUpdateOptions {\n root: string\n goal: string\n readiness: KnowledgeReadinessCheck\n readinessSpecs?: readonly unknown[]\n readinessTaskId?: string\n readinessOptions?: unknown\n findings?: readonly unknown[]\n metadata?: Record<string, unknown>\n budget: Budget\n backend?: ExecutorConfig\n makeWorkerAgent?: SuperviseOptions['makeWorkerAgent']\n /** Caller-owned exact supervisor harness/provider/model identity. */\n supervisorProfile: SupervisorProfile\n superviseOptions?: Partial<\n Omit<\n SuperviseOptions,\n 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'\n >\n >\n allowedModels?: readonly string[]\n runSupervised?: (\n profile: SupervisorProfile,\n task: unknown,\n opts: SuperviseOptions,\n ) => Promise<SupervisedResult<unknown>>\n}\n\nexport type SupervisedKnowledgeUpdater = (\n input: SupervisedKnowledgeUpdateInput,\n) => Promise<SupervisedKnowledgeUpdateResult>\n\n/** Build the completion check a supervised KB update uses to stop only when the KB is ready. */\nexport function knowledgeReadinessDeliverable(\n options: Pick<\n SupervisedKnowledgeUpdateOptions,\n 'root' | 'goal' | 'readiness' | 'readinessSpecs' | 'readinessTaskId' | 'readinessOptions'\n >,\n): DeliverableSpec<unknown> {\n return {\n describe: `knowledge base at ${options.root} is ready for: ${options.goal}`,\n async check() {\n const result = await options.readiness({\n root: options.root,\n goal: options.goal,\n readinessSpecs: options.readinessSpecs,\n readinessTaskId: options.readinessTaskId,\n readiness: options.readinessOptions,\n })\n return typeof result === 'boolean' ? result : result.ready\n },\n }\n}\n\n/** Create an `improveKnowledgeBase` update callback backed by runtime supervision. */\nexport function createSupervisedKnowledgeUpdater(\n options: SupervisedKnowledgeUpdateOptions,\n): SupervisedKnowledgeUpdater {\n return (input) =>\n runSupervisedKnowledgeUpdate({\n ...options,\n root: input.candidateRoot ?? input.root ?? options.root,\n goal: input.goal ?? options.goal,\n findings: input.findings ?? options.findings,\n metadata: { ...options.metadata, ...input.metadata },\n })\n}\n\n/** Run a runtime supervisor that updates one candidate knowledge base and stops on readiness. */\nexport async function runSupervisedKnowledgeUpdate(\n options: SupervisedKnowledgeUpdateOptions,\n): Promise<SupervisedKnowledgeUpdateResult> {\n const exactSupervisor = agentProfileSchema.parse(options.supervisorProfile) as SupervisorProfile\n assertExecutableAgentProfile(exactSupervisor, 'runSupervisedKnowledgeUpdate')\n const baseInstructions = exactSupervisor.prompt?.systemPrompt ?? RESEARCH_SUPERVISOR_SYSTEM_PROMPT\n const workerContract = RESEARCHER_SYSTEM_PROMPT\n const systemPrompt = workerContract\n ? `${baseInstructions}\\n\\nEach researcher worker you spawn follows this contract:\\n${workerContract}`\n : baseInstructions\n\n const profile: SupervisorProfile = {\n ...exactSupervisor,\n prompt: { ...exactSupervisor.prompt, systemPrompt },\n }\n const run = options.runSupervised ?? supervise\n const task = formatSupervisedKnowledgeTask(options)\n const supervised = await run(profile, task, {\n ...options.superviseOptions,\n budget: options.budget,\n backend: options.backend,\n deliverable: knowledgeReadinessDeliverable(options),\n makeWorkerAgent: options.makeWorkerAgent,\n allowedModels: options.allowedModels,\n })\n return {\n applied: supervised.kind === 'winner',\n summary:\n supervised.kind === 'winner'\n ? 'research supervisor completed and the knowledge base passed readiness'\n : `research supervisor stopped without a ready knowledge base: ${supervised.reason}`,\n supervised,\n metadata: {\n supervised: true,\n root: options.root,\n goal: options.goal,\n result: supervised.kind,\n },\n }\n}\n\n/** Format the supervisor task with the KB root, readiness requirements, current findings, and metadata. */\nexport function formatSupervisedKnowledgeTask(\n options: Pick<\n SupervisedKnowledgeUpdateOptions,\n 'root' | 'goal' | 'readinessSpecs' | 'readinessTaskId' | 'findings' | 'metadata'\n >,\n): string {\n const sections = [\n `Goal: ${options.goal}`,\n `Knowledge base root: ${options.root}`,\n options.readinessTaskId ? `Readiness task id: ${options.readinessTaskId}` : undefined,\n options.readinessSpecs?.length\n ? `Readiness specs:\\n${JSON.stringify(options.readinessSpecs, null, 2)}`\n : undefined,\n options.findings?.length\n ? `Current findings:\\n${JSON.stringify(options.findings, null, 2)}`\n : undefined,\n options.metadata && Object.keys(options.metadata).length > 0\n ? `Metadata:\\n${JSON.stringify(options.metadata, null, 2)}`\n : undefined,\n ].filter((section): section is string => Boolean(section))\n return `${sections.join('\\n\\n')}\\n\\nUpdate files under the knowledge base root only. Stop when the readiness check passes.`\n}\n","import { realpath } from 'node:fs/promises'\nimport {\n type AgentCandidateBundle,\n type AgentCandidateCapturedArtifact,\n type AgentCandidateKnowledge,\n agentCandidateKnowledgeSchema,\n} from '@tangle-network/agent-interface'\nimport {\n type BuildEvalKnowledgeBundleOptions,\n evaluateKnowledgeBaseReadiness,\n improveKnowledgeBase,\n type KnowledgeBaseQualityOptions,\n type KnowledgeImprovementOptions,\n type KnowledgeImprovementResult,\n type KnowledgeReadinessSpec,\n knowledgeImprovementCandidateRef,\n toAgentCandidateKnowledgeRef,\n withKnowledgeImprovementComparison,\n} from '@tangle-network/agent-knowledge'\nimport { sealAgentCandidateBundle } from '../candidate-execution/bundle'\nimport {\n canonicalCandidateBytes,\n embeddedCandidateArtifact,\n omitTopLevelDigest,\n} from '../candidate-execution/digest'\nimport { persistCandidateOutputArtifact } from '../candidate-execution/output-artifacts'\nimport type { AgentCandidateOutputArtifactPort } from '../candidate-execution/types'\nimport { captureAgentCandidateWorkspace } from '../candidate-execution/workspace-archive'\nimport type { ExecutorConfig } from '../runtime/supervise/runtime'\nimport type { SuperviseOptions } from '../runtime/supervise/supervise'\nimport type { SupervisorProfile } from '../runtime/supervise/supervisor-agent'\nimport type { Budget, SupervisedResult } from '../runtime/supervise/types'\nimport {\n createSupervisedKnowledgeUpdater,\n type KnowledgeReadinessCheck,\n type KnowledgeReadinessCheckResult,\n type SupervisedKnowledgeUpdateOptions,\n} from './supervised-update'\n\nexport interface RunKnowledgeImprovementJobOptions\n extends Omit<KnowledgeImprovementOptions, 'updateKnowledge'> {\n budget: Budget\n readinessCheck?: KnowledgeReadinessCheck\n backend?: ExecutorConfig\n makeWorkerAgent?: SuperviseOptions['makeWorkerAgent']\n supervisorProfile: SupervisorProfile\n superviseOptions?: Partial<\n Omit<\n SuperviseOptions,\n 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'\n >\n >\n allowedModels?: readonly string[]\n runSupervised?: (\n profile: SupervisorProfile,\n task: unknown,\n opts: SuperviseOptions,\n ) => Promise<SupervisedResult<unknown>>\n candidateArtifacts?: AgentCandidateOutputArtifactPort\n onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void\n}\n\nexport interface KnowledgeImprovementJobMeasurement {\n startedAt: string\n finishedAt: string\n durationMs: number\n updateCalls: number\n updateDurationMs: number\n supervisedSpent: {\n iterations: number\n inputTokens: number\n outputTokens: number\n usdKnown: boolean\n usd: number\n ms: number\n }\n}\n\nexport interface KnowledgeImprovementJobResult {\n improvement: KnowledgeImprovementResult\n knowledge?: KnowledgeImprovementCandidatePair\n measurement: KnowledgeImprovementJobMeasurement\n blocked: boolean\n}\n\nexport interface KnowledgeImprovementCandidatePair {\n reference: AgentCandidateKnowledge['candidate']\n evaluation: AgentCandidateCapturedArtifact\n baseline: AgentCandidateKnowledge['snapshot']\n candidate: AgentCandidateKnowledge['snapshot']\n}\n\nexport interface KnowledgeImprovementExperimentBundles {\n baseline: AgentCandidateBundle\n candidate: AgentCandidateBundle\n}\n\nexport interface AgentKnowledgeReadinessCheckOptions {\n goal: string\n readinessSpecs?: readonly KnowledgeReadinessSpec[]\n readinessTaskId?: string\n readiness?: Omit<BuildEvalKnowledgeBundleOptions, 'taskId' | 'index' | 'specs'>\n strict?: boolean\n kbQuality?: KnowledgeBaseQualityOptions\n}\n\n/** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */\nexport function createAgentKnowledgeReadinessCheck(\n options: AgentKnowledgeReadinessCheckOptions,\n): KnowledgeReadinessCheck {\n return async (input): Promise<KnowledgeReadinessCheckResult> => {\n const readiness = await evaluateKnowledgeBaseReadiness({\n root: input.root,\n goal: input.goal ?? options.goal,\n readinessSpecs:\n (input.readinessSpecs as readonly KnowledgeReadinessSpec[] | undefined) ??\n options.readinessSpecs,\n readinessTaskId: input.readinessTaskId ?? options.readinessTaskId,\n readiness:\n (input.readiness as AgentKnowledgeReadinessCheckOptions['readiness'] | undefined) ??\n options.readiness,\n strict: options.strict,\n kbQuality: options.kbQuality,\n })\n return {\n ready: readiness.ready,\n summary: readiness.summary,\n metadata: {\n dimensions: readiness.dimensions,\n validationOk: readiness.validation.ok,\n kbQualityOk: readiness.kbQuality.ok,\n blockingMissing: readiness.readiness?.report.blockingMissingRequirements.length ?? 0,\n },\n }\n }\n}\n\n/** Produce a frozen KB candidate while leaving live knowledge content unchanged. */\nexport async function runKnowledgeImprovementJob(\n options: RunKnowledgeImprovementJobOptions,\n): Promise<KnowledgeImprovementJobResult> {\n const {\n allowedModels,\n backend,\n budget,\n candidateArtifacts,\n makeWorkerAgent,\n onMeasurement,\n readinessCheck,\n runSupervised,\n supervisorProfile,\n superviseOptions,\n ...knowledgeOptions\n } = options\n const startedAtMs = Date.now()\n const startedAt = new Date(startedAtMs).toISOString()\n const supervisedSpent = emptySpent()\n let updateCalls = 0\n let updateDurationMs = 0\n\n const readiness = readinessCheck ?? createAgentKnowledgeReadinessCheck(options)\n const updateKnowledge = createSupervisedKnowledgeUpdater({\n root: options.root,\n goal: options.goal,\n readiness,\n readinessSpecs: options.readinessSpecs,\n readinessTaskId: options.readinessTaskId,\n readinessOptions: options.readiness,\n budget,\n backend,\n makeWorkerAgent,\n supervisorProfile,\n superviseOptions,\n allowedModels,\n runSupervised,\n } satisfies SupervisedKnowledgeUpdateOptions)\n\n const instrumentedUpdateKnowledge: KnowledgeImprovementOptions['updateKnowledge'] = async (\n input,\n ) => {\n const updateStartedAt = Date.now()\n updateCalls += 1\n const result = await updateKnowledge(input)\n updateDurationMs += Date.now() - updateStartedAt\n addSpent(supervisedSpent, result.supervised)\n return result\n }\n const resolvedImprovement = await improveKnowledgeBase({\n ...knowledgeOptions,\n updateKnowledge: instrumentedUpdateKnowledge,\n })\n let knowledge: KnowledgeImprovementCandidatePair | undefined\n if (\n resolvedImprovement.candidate?.status === 'candidate-ready' ||\n resolvedImprovement.candidate?.status === 'promoted'\n ) {\n knowledge = await freezeKnowledgeCandidatePair(\n options.root,\n resolvedImprovement,\n candidateArtifacts,\n knowledgeOptions.signal,\n )\n }\n const finishedAtMs = Date.now()\n const measurement: KnowledgeImprovementJobMeasurement = {\n startedAt,\n finishedAt: new Date(finishedAtMs).toISOString(),\n durationMs: finishedAtMs - startedAtMs,\n updateCalls,\n updateDurationMs,\n supervisedSpent,\n }\n await onMeasurement?.(measurement)\n return {\n improvement: resolvedImprovement,\n ...(knowledge ? { knowledge } : {}),\n measurement,\n blocked: resolvedImprovement.blocked,\n }\n}\n\n/** Attach both frozen knowledge inputs to one otherwise-identical bundle pair. */\nexport function buildKnowledgeImprovementExperimentBundles(\n bundle: AgentCandidateBundle,\n knowledge: KnowledgeImprovementCandidatePair,\n): KnowledgeImprovementExperimentBundles {\n const input = omitTopLevelDigest(bundle)\n const withSnapshot = (snapshot: AgentCandidateKnowledge['snapshot']) =>\n agentCandidateKnowledgeSchema.parse({\n candidate: knowledge.reference,\n snapshot,\n evaluation: knowledge.evaluation,\n })\n return Object.freeze({\n baseline: sealAgentCandidateBundle({ ...input, knowledge: withSnapshot(knowledge.baseline) }),\n candidate: sealAgentCandidateBundle({ ...input, knowledge: withSnapshot(knowledge.candidate) }),\n })\n}\n\nasync function freezeKnowledgeCandidatePair(\n root: string,\n improvement: KnowledgeImprovementResult,\n artifacts: AgentCandidateOutputArtifactPort | undefined,\n signal: AbortSignal | undefined,\n): Promise<KnowledgeImprovementCandidatePair> {\n const candidate = knowledgeImprovementCandidateRef(improvement)\n const candidateRef = toAgentCandidateKnowledgeRef(candidate)\n return withKnowledgeImprovementComparison({ root, candidate }, async (comparison) => {\n const freeze = async (\n target: 'baseline' | 'candidate',\n ): Promise<AgentCandidateKnowledge['snapshot']> => {\n const executionId = `knowledge-${candidate.candidateId}-${target}`\n const captured = await captureAgentCandidateWorkspace(\n await realpath(comparison[target].root),\n {\n ...(artifacts\n ? {\n artifactPersistence: {\n executionId,\n outputArtifacts: artifacts,\n ...(signal ? { signal } : {}),\n },\n }\n : {}),\n },\n )\n return captured.snapshot\n }\n const evaluation = await captureKnowledgeEvidence(\n canonicalCandidateBytes({\n kind: 'agent-knowledge-candidate-evaluation',\n candidate: candidateRef,\n metric: comparison.evaluation,\n }),\n 'knowledge-evaluation',\n `knowledge-${candidate.candidateId}`,\n artifacts,\n signal,\n )\n const baseline = await freeze('baseline')\n const proposed = await freeze('candidate')\n return Object.freeze({\n reference: candidateRef,\n evaluation,\n baseline,\n candidate: proposed,\n })\n })\n}\n\nasync function captureKnowledgeEvidence(\n bytes: Uint8Array,\n purpose: 'knowledge-evaluation',\n executionId: string,\n artifacts: AgentCandidateOutputArtifactPort | undefined,\n signal: AbortSignal | undefined,\n): Promise<AgentCandidateCapturedArtifact> {\n if (!artifacts) return embeddedCandidateArtifact(bytes)\n return persistCandidateOutputArtifact(artifacts, {\n executionId,\n purpose,\n bytes,\n ...(signal ? { signal } : {}),\n })\n}\n\nfunction emptySpent(): KnowledgeImprovementJobMeasurement['supervisedSpent'] {\n return { iterations: 0, inputTokens: 0, outputTokens: 0, usdKnown: true, usd: 0, ms: 0 }\n}\n\nfunction addSpent(\n target: KnowledgeImprovementJobMeasurement['supervisedSpent'],\n result: SupervisedResult<unknown>,\n): void {\n const spent = result.spentTotal\n target.iterations += spent.iterations\n target.inputTokens += spent.tokens.input\n target.outputTokens += spent.tokens.output\n target.usdKnown = target.usdKnown && spent.usdKnown !== false\n target.usd += spent.usd\n target.ms += spent.ms\n}\n"],"mappings":";;;;;;;;;;;AAqCA,SAAgB,6CACd,SACwC;CACxC,IAAI,CAAC,QAAQ,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,2CAA2C;CACzF,OAAO;EACL,WAAW,OAAO,eAAe;GAC/B,MAAM,YAAY,MAAM,2BAA2B,SAAS,UAAU;GACtE,OAAO,UAAU,UAAU,UAAU,SAAS,KAAA;EAChD;EACA,YAAY,OAAO,eAAe;GAChC,IAAI,WAAW,SACb,MAAM,IAAI,MAAM,mEAAmE;GAErF,MAAM,YAAY,MAAM,2BAA2B,SAAS,UAAU;GACtE,IAAI,UAAU,SAAS,OAAO,UAAU;GAExC,MAAM,kBAAkB;IACtB,MAAM,QAAQ;IACd,WAAW,UAAU;IACrB,YAAY;KACV,YAAY,WAAW;KACvB,aAAa,WAAW;KACxB,UAAU,QAAQ;KAClB,eAAe,YACb,UAAU,OACR,yBAAyB,SAAS,WAAW,WAAW,WAAW,MAAM,CAC3E;IACJ;IACA,GAAI,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;IACtD,GAAI,QAAQ,eAAe,KA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B"}
|
|
1
|
+
{"version":3,"file":"knowledge-DPDhKnOz.js","names":[],"sources":["../src/knowledge/activation.ts","../src/knowledge/supervised-update.ts","../src/knowledge/improvement-job.ts"],"sourcesContent":["import type {\n AgentImprovementActivationOutcome,\n AgentImprovementActivationResult,\n AgentImprovementActivationTarget,\n Sha256Digest,\n} from '@tangle-network/agent-interface'\nimport { sha256DigestSchema } from '@tangle-network/agent-interface'\nimport {\n fromAgentCandidateKnowledgeRef,\n type KnowledgeImprovementMutationReceipt,\n loadKnowledgeImprovementActivationResult,\n type PromoteKnowledgeCandidateOptions,\n promoteKnowledgeCandidate,\n restoreKnowledgeCandidateBaseline,\n} from '@tangle-network/agent-knowledge'\n\nimport {\n type AgentImprovementActivationReconciliation,\n type AgentImprovementActivationResultStore,\n type AgentImprovementActivationTransition,\n type AgentImprovementActivationTransitionInput,\n createAgentImprovementActivationResult,\n} from '../intelligence/activation'\n\nexport interface CreateKnowledgeImprovementActivationExecutorOptions\n extends Omit<PromoteKnowledgeCandidateOptions, 'root' | 'candidate'> {\n root: string\n identity: string\n results: AgentImprovementActivationResultStore\n}\n\nexport interface KnowledgeImprovementActivationExecutor {\n transition: AgentImprovementActivationTransition\n reconcile: AgentImprovementActivationReconciliation\n}\n\n/** Apply or restore one local knowledge candidate through the shared activation contract. */\nexport function createKnowledgeImprovementActivationExecutor(\n options: CreateKnowledgeImprovementActivationExecutorOptions,\n): KnowledgeImprovementActivationExecutor {\n if (!options.identity.trim()) throw new Error('knowledge activation identity is required')\n return {\n reconcile: async (transition) => {\n const inspected = await inspectKnowledgeActivation(options, transition)\n return inspected.settled ? inspected.result : undefined\n },\n transition: async (transition) => {\n if (transition.expired) {\n throw new Error('knowledge write transition cannot run after authorization expires')\n }\n const inspected = await inspectKnowledgeActivation(options, transition)\n if (inspected.settled) return inspected.result\n\n const mutationOptions = {\n root: options.root,\n candidate: inspected.candidate,\n activation: {\n activation: transition.activation,\n attemptedAt: transition.attemptedAt,\n identity: options.identity,\n createResult: (receipt: KnowledgeImprovementMutationReceipt) =>\n inspected.create(\n knowledgeMutationOutcome(receipt, inspected, transition.activation.intent),\n ),\n },\n ...(options.ownerId ? { ownerId: options.ownerId } : {}),\n ...(options.leaseTtlMs === undefined ? {} : { leaseTtlMs: options.leaseTtlMs }),\n ...(options.now ? { now: options.now } : {}),\n ...(options.onState ? { onState: options.onState } : {}),\n }\n const improvement =\n transition.activation.intent === 'activate-candidate'\n ? await promoteKnowledgeCandidate(mutationOptions)\n : await restoreKnowledgeCandidateBaseline(mutationOptions)\n if (!improvement.activationResult) {\n throw new Error('knowledge mutation did not persist its shared activation result')\n }\n return options.results.putIfAbsent(improvement.activationResult)\n },\n }\n}\n\ntype CreateKnowledgeActivation = (\n outcome: AgentImprovementActivationOutcome,\n) => AgentImprovementActivationResult\n\ntype InspectedKnowledgeActivation =\n | { settled: true; result: unknown | undefined }\n | {\n settled: false\n target: AgentImprovementActivationTransitionInput['targets'][number]\n candidate: PromoteKnowledgeCandidateOptions['candidate']\n expectedDigest: Sha256Digest\n desiredDigest: Sha256Digest\n create: CreateKnowledgeActivation\n }\n\nasync function inspectKnowledgeActivation(\n options: CreateKnowledgeImprovementActivationExecutorOptions,\n transition: AgentImprovementActivationTransitionInput,\n): Promise<InspectedKnowledgeActivation> {\n const stored = await options.results.load(transition.activation.digest)\n if (stored !== undefined) return { settled: true, result: stored }\n\n const create: CreateKnowledgeActivation = (outcome) =>\n createAgentImprovementActivationResult(transition, {\n completedAt: completionTime(transition, options.now),\n outcome,\n })\n const store = (outcome: AgentImprovementActivationOutcome) =>\n options.results.putIfAbsent(create(outcome))\n if (transition.kind !== 'sealed-candidate') {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'unsupported',\n code: 'KNOWLEDGE_PROFILE_TRANSITION_UNSUPPORTED',\n message: 'The knowledge adapter accepts only sealed knowledge candidates.',\n }),\n }\n }\n const target = supportedKnowledgeTarget(transition, options.identity)\n if (!target) {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'unsupported',\n code: 'KNOWLEDGE_TARGET_SET_UNSUPPORTED',\n message: 'The knowledge adapter requires exactly one matching knowledge target.',\n }),\n }\n }\n const knowledge = transition.candidateBundle.knowledge\n if (!knowledge) {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'unsupported',\n code: 'KNOWLEDGE_CANDIDATE_MISSING',\n message: 'The measured candidate bundle does not contain a knowledge candidate.',\n }),\n }\n }\n const candidate = fromAgentCandidateKnowledgeRef(knowledge.candidate)\n const expectedDigest =\n transition.activation.intent === 'activate-candidate'\n ? knowledge.candidate.baseHash\n : knowledge.candidate.candidateHash\n const desiredDigest =\n transition.activation.intent === 'activate-candidate'\n ? knowledge.candidate.candidateHash\n : knowledge.candidate.baseHash\n if (target.expectedBaseDigest !== expectedDigest || target.desiredDigest !== desiredDigest) {\n if (transition.expired) return { settled: true, result: undefined }\n return {\n settled: true,\n result: await store({\n status: 'failed',\n code: 'KNOWLEDGE_TARGET_MISMATCH',\n message: 'The activation target does not match the measured knowledge candidate.',\n }),\n }\n }\n\n const durable = await loadKnowledgeImprovementActivationResult({\n root: options.root,\n candidate,\n activation: transition.activation,\n identity: options.identity,\n })\n if (durable) {\n return {\n settled: true,\n result: await options.results.putIfAbsent(durable),\n }\n }\n if (transition.expired) return { settled: true, result: undefined }\n return { settled: false, target, candidate, expectedDigest, desiredDigest, create }\n}\n\nfunction supportedKnowledgeTarget(\n transition: AgentImprovementActivationTransitionInput,\n identity: string,\n): AgentImprovementActivationTransitionInput['targets'][number] | undefined {\n if (transition.targets.length !== 1) return undefined\n const target = transition.targets[0]\n return target.surface === 'knowledge' && target.identity === identity ? target : undefined\n}\n\nfunction knowledgeMutationOutcome(\n receipt: KnowledgeImprovementMutationReceipt,\n inspected: Extract<InspectedKnowledgeActivation, { settled: false }>,\n intent: AgentImprovementActivationTransitionInput['activation']['intent'],\n): AgentImprovementActivationOutcome {\n const expectedTarget = intent === 'activate-candidate' ? 'candidate' : 'baseline'\n const beforeDigest = prefixedDigest(receipt.beforeHash)\n const afterDigest = prefixedDigest(receipt.afterHash)\n if (\n receipt.target !== expectedTarget ||\n receipt.changed !== (beforeDigest !== afterDigest) ||\n (!receipt.changed && (receipt.transactionId !== null || receipt.recovered))\n ) {\n throw new Error('knowledge mutation returned inconsistent state evidence')\n }\n if (receipt.changed) {\n if (\n receipt.transactionId === null ||\n beforeDigest !== inspected.expectedDigest ||\n afterDigest !== inspected.desiredDigest\n ) {\n throw new Error('knowledge activation did not apply its authorized content transition')\n }\n return {\n status: 'applied',\n transactionId: receipt.transactionId,\n targets: [\n {\n surface: inspected.target.surface,\n identity: inspected.target.identity,\n beforeDigest,\n afterDigest,\n },\n ],\n }\n }\n if (afterDigest === inspected.desiredDigest) {\n return {\n status: 'already-applied',\n targets: [targetState(inspected.target, afterDigest)],\n }\n }\n if (afterDigest === inspected.expectedDigest) {\n throw new Error('knowledge activation did not attempt its authorized content transition')\n }\n return {\n status: 'conflict',\n targets: [targetState(inspected.target, afterDigest)],\n }\n}\n\nfunction targetState(target: AgentImprovementActivationTarget, currentDigest: Sha256Digest) {\n return {\n surface: target.surface,\n identity: target.identity,\n currentDigest,\n }\n}\n\nfunction prefixedDigest(hash: string): Sha256Digest {\n return sha256DigestSchema.parse(`sha256:${hash}`)\n}\n\nfunction completionTime(\n transition: AgentImprovementActivationTransitionInput,\n now: (() => Date) | undefined,\n): string {\n const completedAt = (now ?? (() => new Date()))().toISOString()\n return Date.parse(completedAt) < Date.parse(transition.attemptedAt)\n ? transition.attemptedAt\n : completedAt\n}\n","import { agentProfileSchema } from '@tangle-network/agent-interface'\nimport type { RagKnowledgeUpdateResult } from '@tangle-network/agent-knowledge'\nimport { RESEARCHER_SYSTEM_PROMPT } from '../profiles/researcher'\nimport type { DeliverableSpec } from '../runtime/supervise/completion-gate'\nimport { assertExecutableAgentProfile } from '../runtime/supervise/model-policy'\nimport type { ExecutorConfig } from '../runtime/supervise/runtime'\nimport { type SuperviseOptions, supervise } from '../runtime/supervise/supervise'\nimport type { SupervisorProfile } from '../runtime/supervise/supervisor-agent'\nimport type { Budget, SupervisedResult } from '../runtime/supervise/types'\n\n/** Standing prompt for a supervisor that grows a shared knowledge base through spawned researchers. */\nexport const RESEARCH_SUPERVISOR_SYSTEM_PROMPT = [\n 'You are a research supervisor. You do not answer the research question yourself.',\n 'You create and manage researcher workers that improve one shared knowledge base until it is ready.',\n '',\n 'Each round:',\n '1. Read the goal and the gaps the readiness check still reports.',\n '2. Decompose the open work into independent sub-topics.',\n '3. Spawn one researcher per sub-topic; split by sub-topic, never duplicate work.',\n '4. Wait for researchers to settle, steer or re-spawn thin sub-topics, then stop when the check passes.',\n '',\n 'Conserve the shared budget. Prefer a small number of well-scoped researchers over a large fanout that re-covers the same ground.',\n].join('\\n')\n\nexport interface KnowledgeReadinessCheckInput {\n root: string\n goal: string\n readinessSpecs?: readonly unknown[]\n readinessTaskId?: string\n readiness?: unknown\n}\n\nexport type KnowledgeReadinessCheckResult =\n | boolean\n | {\n ready: boolean\n summary?: string\n metadata?: Record<string, unknown>\n }\n\nexport type KnowledgeReadinessCheck = (\n input: KnowledgeReadinessCheckInput,\n) => Promise<KnowledgeReadinessCheckResult> | KnowledgeReadinessCheckResult\n\nexport interface SupervisedKnowledgeUpdateInput {\n goal?: string\n root?: string\n candidateRoot?: string\n findings?: readonly unknown[]\n metadata?: Record<string, unknown>\n}\n\nexport interface SupervisedKnowledgeUpdateResult {\n applied: boolean\n summary: string\n supervised: SupervisedResult<unknown>\n metadata: NonNullable<RagKnowledgeUpdateResult['metadata']>\n}\n\nexport interface SupervisedKnowledgeUpdateOptions {\n root: string\n goal: string\n readiness: KnowledgeReadinessCheck\n readinessSpecs?: readonly unknown[]\n readinessTaskId?: string\n readinessOptions?: unknown\n findings?: readonly unknown[]\n metadata?: Record<string, unknown>\n budget: Budget\n backend?: ExecutorConfig\n makeWorkerAgent?: SuperviseOptions['makeWorkerAgent']\n /** Caller-owned exact supervisor harness/provider/model identity. */\n supervisorProfile: SupervisorProfile\n superviseOptions?: Partial<\n Omit<\n SuperviseOptions,\n 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'\n >\n >\n allowedModels?: readonly string[]\n runSupervised?: (\n profile: SupervisorProfile,\n task: unknown,\n opts: SuperviseOptions,\n ) => Promise<SupervisedResult<unknown>>\n}\n\nexport type SupervisedKnowledgeUpdater = (\n input: SupervisedKnowledgeUpdateInput,\n) => Promise<SupervisedKnowledgeUpdateResult>\n\n/** Build the completion check a supervised KB update uses to stop only when the KB is ready. */\nexport function knowledgeReadinessDeliverable(\n options: Pick<\n SupervisedKnowledgeUpdateOptions,\n 'root' | 'goal' | 'readiness' | 'readinessSpecs' | 'readinessTaskId' | 'readinessOptions'\n >,\n): DeliverableSpec<unknown> {\n return {\n describe: `knowledge base at ${options.root} is ready for: ${options.goal}`,\n async check() {\n const result = await options.readiness({\n root: options.root,\n goal: options.goal,\n readinessSpecs: options.readinessSpecs,\n readinessTaskId: options.readinessTaskId,\n readiness: options.readinessOptions,\n })\n return typeof result === 'boolean' ? result : result.ready\n },\n }\n}\n\n/** Create an `improveKnowledgeBase` update callback backed by runtime supervision. */\nexport function createSupervisedKnowledgeUpdater(\n options: SupervisedKnowledgeUpdateOptions,\n): SupervisedKnowledgeUpdater {\n return (input) =>\n runSupervisedKnowledgeUpdate({\n ...options,\n root: input.candidateRoot ?? input.root ?? options.root,\n goal: input.goal ?? options.goal,\n findings: input.findings ?? options.findings,\n metadata: { ...options.metadata, ...input.metadata },\n })\n}\n\n/** Run a runtime supervisor that updates one candidate knowledge base and stops on readiness. */\nexport async function runSupervisedKnowledgeUpdate(\n options: SupervisedKnowledgeUpdateOptions,\n): Promise<SupervisedKnowledgeUpdateResult> {\n const exactSupervisor = agentProfileSchema.parse(options.supervisorProfile) as SupervisorProfile\n assertExecutableAgentProfile(exactSupervisor, 'runSupervisedKnowledgeUpdate')\n const baseInstructions = exactSupervisor.prompt?.systemPrompt ?? RESEARCH_SUPERVISOR_SYSTEM_PROMPT\n const workerContract = RESEARCHER_SYSTEM_PROMPT\n const systemPrompt = workerContract\n ? `${baseInstructions}\\n\\nEach researcher worker you spawn follows this contract:\\n${workerContract}`\n : baseInstructions\n\n const profile: SupervisorProfile = {\n ...exactSupervisor,\n prompt: { ...exactSupervisor.prompt, systemPrompt },\n }\n const run = options.runSupervised ?? supervise\n const task = formatSupervisedKnowledgeTask(options)\n const supervised = await run(profile, task, {\n ...options.superviseOptions,\n budget: options.budget,\n backend: options.backend,\n deliverable: knowledgeReadinessDeliverable(options),\n makeWorkerAgent: options.makeWorkerAgent,\n allowedModels: options.allowedModels,\n })\n return {\n applied: supervised.kind === 'winner',\n summary:\n supervised.kind === 'winner'\n ? 'research supervisor completed and the knowledge base passed readiness'\n : `research supervisor stopped without a ready knowledge base: ${supervised.reason}`,\n supervised,\n metadata: {\n supervised: true,\n root: options.root,\n goal: options.goal,\n result: supervised.kind,\n },\n }\n}\n\n/** Format the supervisor task with the KB root, readiness requirements, current findings, and metadata. */\nexport function formatSupervisedKnowledgeTask(\n options: Pick<\n SupervisedKnowledgeUpdateOptions,\n 'root' | 'goal' | 'readinessSpecs' | 'readinessTaskId' | 'findings' | 'metadata'\n >,\n): string {\n const sections = [\n `Goal: ${options.goal}`,\n `Knowledge base root: ${options.root}`,\n options.readinessTaskId ? `Readiness task id: ${options.readinessTaskId}` : undefined,\n options.readinessSpecs?.length\n ? `Readiness specs:\\n${JSON.stringify(options.readinessSpecs, null, 2)}`\n : undefined,\n options.findings?.length\n ? `Current findings:\\n${JSON.stringify(options.findings, null, 2)}`\n : undefined,\n options.metadata && Object.keys(options.metadata).length > 0\n ? `Metadata:\\n${JSON.stringify(options.metadata, null, 2)}`\n : undefined,\n ].filter((section): section is string => Boolean(section))\n return `${sections.join('\\n\\n')}\\n\\nUpdate files under the knowledge base root only. Stop when the readiness check passes.`\n}\n","import { realpath } from 'node:fs/promises'\nimport {\n type AgentCandidateBundle,\n type AgentCandidateCapturedArtifact,\n type AgentCandidateKnowledge,\n agentCandidateKnowledgeSchema,\n} from '@tangle-network/agent-interface'\nimport {\n type BuildEvalKnowledgeBundleOptions,\n evaluateKnowledgeBaseReadiness,\n improveKnowledgeBase,\n type KnowledgeBaseQualityOptions,\n type KnowledgeImprovementOptions,\n type KnowledgeImprovementResult,\n type KnowledgeReadinessSpec,\n knowledgeImprovementCandidateRef,\n toAgentCandidateKnowledgeRef,\n withKnowledgeImprovementComparison,\n} from '@tangle-network/agent-knowledge'\nimport { sealAgentCandidateBundle } from '../candidate-execution/bundle'\nimport {\n canonicalCandidateBytes,\n embeddedCandidateArtifact,\n omitTopLevelDigest,\n} from '../candidate-execution/digest'\nimport { persistCandidateOutputArtifact } from '../candidate-execution/output-artifacts'\nimport type { AgentCandidateOutputArtifactPort } from '../candidate-execution/types'\nimport { captureAgentCandidateWorkspace } from '../candidate-execution/workspace-archive'\nimport type { ExecutorConfig } from '../runtime/supervise/runtime'\nimport type { SuperviseOptions } from '../runtime/supervise/supervise'\nimport type { SupervisorProfile } from '../runtime/supervise/supervisor-agent'\nimport type { Budget, SupervisedResult } from '../runtime/supervise/types'\nimport {\n createSupervisedKnowledgeUpdater,\n type KnowledgeReadinessCheck,\n type KnowledgeReadinessCheckResult,\n type SupervisedKnowledgeUpdateOptions,\n} from './supervised-update'\n\nexport interface RunKnowledgeImprovementJobOptions\n extends Omit<KnowledgeImprovementOptions, 'updateKnowledge'> {\n budget: Budget\n readinessCheck?: KnowledgeReadinessCheck\n backend?: ExecutorConfig\n makeWorkerAgent?: SuperviseOptions['makeWorkerAgent']\n supervisorProfile: SupervisorProfile\n superviseOptions?: Partial<\n Omit<\n SuperviseOptions,\n 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'\n >\n >\n allowedModels?: readonly string[]\n runSupervised?: (\n profile: SupervisorProfile,\n task: unknown,\n opts: SuperviseOptions,\n ) => Promise<SupervisedResult<unknown>>\n candidateArtifacts?: AgentCandidateOutputArtifactPort\n onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void\n}\n\nexport interface KnowledgeImprovementJobMeasurement {\n startedAt: string\n finishedAt: string\n durationMs: number\n updateCalls: number\n updateDurationMs: number\n supervisedSpent: {\n iterations: number\n inputTokens: number\n outputTokens: number\n usdKnown: boolean\n usd: number\n ms: number\n }\n}\n\nexport interface KnowledgeImprovementJobResult {\n improvement: KnowledgeImprovementResult\n knowledge?: KnowledgeImprovementCandidatePair\n measurement: KnowledgeImprovementJobMeasurement\n blocked: boolean\n}\n\nexport interface KnowledgeImprovementCandidatePair {\n reference: AgentCandidateKnowledge['candidate']\n evaluation: AgentCandidateCapturedArtifact\n baseline: AgentCandidateKnowledge['snapshot']\n candidate: AgentCandidateKnowledge['snapshot']\n}\n\nexport interface KnowledgeImprovementExperimentBundles {\n baseline: AgentCandidateBundle\n candidate: AgentCandidateBundle\n}\n\nexport interface AgentKnowledgeReadinessCheckOptions {\n goal: string\n readinessSpecs?: readonly KnowledgeReadinessSpec[]\n readinessTaskId?: string\n readiness?: Omit<BuildEvalKnowledgeBundleOptions, 'taskId' | 'index' | 'specs'>\n strict?: boolean\n kbQuality?: KnowledgeBaseQualityOptions\n}\n\n/** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */\nexport function createAgentKnowledgeReadinessCheck(\n options: AgentKnowledgeReadinessCheckOptions,\n): KnowledgeReadinessCheck {\n return async (input): Promise<KnowledgeReadinessCheckResult> => {\n const readiness = await evaluateKnowledgeBaseReadiness({\n root: input.root,\n goal: input.goal ?? options.goal,\n readinessSpecs:\n (input.readinessSpecs as readonly KnowledgeReadinessSpec[] | undefined) ??\n options.readinessSpecs,\n readinessTaskId: input.readinessTaskId ?? options.readinessTaskId,\n readiness:\n (input.readiness as AgentKnowledgeReadinessCheckOptions['readiness'] | undefined) ??\n options.readiness,\n strict: options.strict,\n kbQuality: options.kbQuality,\n })\n return {\n ready: readiness.ready,\n summary: readiness.summary,\n metadata: {\n dimensions: readiness.dimensions,\n validationOk: readiness.validation.ok,\n kbQualityOk: readiness.kbQuality.ok,\n blockingMissing: readiness.readiness?.report.blockingMissingRequirements.length ?? 0,\n },\n }\n }\n}\n\n/** Produce a frozen KB candidate while leaving live knowledge content unchanged. */\nexport async function runKnowledgeImprovementJob(\n options: RunKnowledgeImprovementJobOptions,\n): Promise<KnowledgeImprovementJobResult> {\n const {\n allowedModels,\n backend,\n budget,\n candidateArtifacts,\n makeWorkerAgent,\n onMeasurement,\n readinessCheck,\n runSupervised,\n supervisorProfile,\n superviseOptions,\n ...knowledgeOptions\n } = options\n const startedAtMs = Date.now()\n const startedAt = new Date(startedAtMs).toISOString()\n const supervisedSpent = emptySpent()\n let updateCalls = 0\n let updateDurationMs = 0\n\n const readiness = readinessCheck ?? createAgentKnowledgeReadinessCheck(options)\n const updateKnowledge = createSupervisedKnowledgeUpdater({\n root: options.root,\n goal: options.goal,\n readiness,\n readinessSpecs: options.readinessSpecs,\n readinessTaskId: options.readinessTaskId,\n readinessOptions: options.readiness,\n budget,\n backend,\n makeWorkerAgent,\n supervisorProfile,\n superviseOptions,\n allowedModels,\n runSupervised,\n } satisfies SupervisedKnowledgeUpdateOptions)\n\n const instrumentedUpdateKnowledge: KnowledgeImprovementOptions['updateKnowledge'] = async (\n input,\n ) => {\n const updateStartedAt = Date.now()\n updateCalls += 1\n const result = await updateKnowledge(input)\n updateDurationMs += Date.now() - updateStartedAt\n addSpent(supervisedSpent, result.supervised)\n return result\n }\n const resolvedImprovement = await improveKnowledgeBase({\n ...knowledgeOptions,\n updateKnowledge: instrumentedUpdateKnowledge,\n })\n let knowledge: KnowledgeImprovementCandidatePair | undefined\n if (\n resolvedImprovement.candidate?.status === 'candidate-ready' ||\n resolvedImprovement.candidate?.status === 'promoted'\n ) {\n knowledge = await freezeKnowledgeCandidatePair(\n options.root,\n resolvedImprovement,\n candidateArtifacts,\n knowledgeOptions.signal,\n )\n }\n const finishedAtMs = Date.now()\n const measurement: KnowledgeImprovementJobMeasurement = {\n startedAt,\n finishedAt: new Date(finishedAtMs).toISOString(),\n durationMs: finishedAtMs - startedAtMs,\n updateCalls,\n updateDurationMs,\n supervisedSpent,\n }\n await onMeasurement?.(measurement)\n return {\n improvement: resolvedImprovement,\n ...(knowledge ? { knowledge } : {}),\n measurement,\n blocked: resolvedImprovement.blocked,\n }\n}\n\n/** Attach both frozen knowledge inputs to one otherwise-identical bundle pair. */\nexport function buildKnowledgeImprovementExperimentBundles(\n bundle: AgentCandidateBundle,\n knowledge: KnowledgeImprovementCandidatePair,\n): KnowledgeImprovementExperimentBundles {\n const input = omitTopLevelDigest(bundle)\n const withSnapshot = (snapshot: AgentCandidateKnowledge['snapshot']) =>\n agentCandidateKnowledgeSchema.parse({\n candidate: knowledge.reference,\n snapshot,\n evaluation: knowledge.evaluation,\n })\n return Object.freeze({\n baseline: sealAgentCandidateBundle({ ...input, knowledge: withSnapshot(knowledge.baseline) }),\n candidate: sealAgentCandidateBundle({ ...input, knowledge: withSnapshot(knowledge.candidate) }),\n })\n}\n\nasync function freezeKnowledgeCandidatePair(\n root: string,\n improvement: KnowledgeImprovementResult,\n artifacts: AgentCandidateOutputArtifactPort | undefined,\n signal: AbortSignal | undefined,\n): Promise<KnowledgeImprovementCandidatePair> {\n const candidate = knowledgeImprovementCandidateRef(improvement)\n const candidateRef = toAgentCandidateKnowledgeRef(candidate)\n return withKnowledgeImprovementComparison({ root, candidate }, async (comparison) => {\n const freeze = async (\n target: 'baseline' | 'candidate',\n ): Promise<AgentCandidateKnowledge['snapshot']> => {\n const executionId = `knowledge-${candidate.candidateId}-${target}`\n const captured = await captureAgentCandidateWorkspace(\n await realpath(comparison[target].root),\n {\n ...(artifacts\n ? {\n artifactPersistence: {\n executionId,\n outputArtifacts: artifacts,\n ...(signal ? { signal } : {}),\n },\n }\n : {}),\n },\n )\n return captured.snapshot\n }\n const evaluation = await captureKnowledgeEvidence(\n canonicalCandidateBytes({\n kind: 'agent-knowledge-candidate-evaluation',\n candidate: candidateRef,\n metric: comparison.evaluation,\n }),\n 'knowledge-evaluation',\n `knowledge-${candidate.candidateId}`,\n artifacts,\n signal,\n )\n const baseline = await freeze('baseline')\n const proposed = await freeze('candidate')\n return Object.freeze({\n reference: candidateRef,\n evaluation,\n baseline,\n candidate: proposed,\n })\n })\n}\n\nasync function captureKnowledgeEvidence(\n bytes: Uint8Array,\n purpose: 'knowledge-evaluation',\n executionId: string,\n artifacts: AgentCandidateOutputArtifactPort | undefined,\n signal: AbortSignal | undefined,\n): Promise<AgentCandidateCapturedArtifact> {\n if (!artifacts) return embeddedCandidateArtifact(bytes)\n return persistCandidateOutputArtifact(artifacts, {\n executionId,\n purpose,\n bytes,\n ...(signal ? { signal } : {}),\n })\n}\n\nfunction emptySpent(): KnowledgeImprovementJobMeasurement['supervisedSpent'] {\n return { iterations: 0, inputTokens: 0, outputTokens: 0, usdKnown: true, usd: 0, ms: 0 }\n}\n\nfunction addSpent(\n target: KnowledgeImprovementJobMeasurement['supervisedSpent'],\n result: SupervisedResult<unknown>,\n): void {\n const spent = result.spentTotal\n target.iterations += spent.iterations\n target.inputTokens += spent.tokens.input\n target.outputTokens += spent.tokens.output\n target.usdKnown = target.usdKnown && spent.usdKnown !== false\n target.usd += spent.usd\n target.ms += spent.ms\n}\n"],"mappings":";;;;;;;;;;;AAqCA,SAAgB,6CACd,SACwC;CACxC,IAAI,CAAC,QAAQ,SAAS,KAAK,GAAG,MAAM,IAAI,MAAM,2CAA2C;CACzF,OAAO;EACL,WAAW,OAAO,eAAe;GAC/B,MAAM,YAAY,MAAM,2BAA2B,SAAS,UAAU;GACtE,OAAO,UAAU,UAAU,UAAU,SAAS,KAAA;EAChD;EACA,YAAY,OAAO,eAAe;GAChC,IAAI,WAAW,SACb,MAAM,IAAI,MAAM,mEAAmE;GAErF,MAAM,YAAY,MAAM,2BAA2B,SAAS,UAAU;GACtE,IAAI,UAAU,SAAS,OAAO,UA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Aa;EAAG,cAAc;EAAG,UAAU;EAAM,KAAK;EAAG,IAAI;CAAE;AACzF;AAEA,SAAS,SACP,QACA,QACM;CACN,MAAM,QAAQ,OAAO;CACrB,OAAO,cAAc,MAAM;CAC3B,OAAO,eAAe,MAAM,OAAO;CACnC,OAAO,gBAAgB,MAAM,OAAO;CACpC,OAAO,WAAW,OAAO,YAAY,MAAM,aAAa;CACxD,OAAO,OAAO,MAAM;CACpB,OAAO,MAAM,MAAM;AACrB"}
|
package/dist/knowledge.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as KnowledgeImprovementActivationExecutor, S as CreateKnowledgeImprovementActivationExecutorOptions, _ as SupervisedKnowledgeUpdater, a as KnowledgeImprovementJobResult, b as knowledgeReadinessDeliverable, c as createAgentKnowledgeReadinessCheck, d as KnowledgeReadinessCheckInput, f as KnowledgeReadinessCheckResult, g as SupervisedKnowledgeUpdateResult, h as SupervisedKnowledgeUpdateOptions, i as KnowledgeImprovementJobMeasurement, l as runKnowledgeImprovementJob, m as SupervisedKnowledgeUpdateInput, n as KnowledgeImprovementCandidatePair, o as RunKnowledgeImprovementJobOptions, p as RESEARCH_SUPERVISOR_SYSTEM_PROMPT, r as KnowledgeImprovementExperimentBundles, s as buildKnowledgeImprovementExperimentBundles, t as AgentKnowledgeReadinessCheckOptions, u as KnowledgeReadinessCheck, v as createSupervisedKnowledgeUpdater, w as createKnowledgeImprovementActivationExecutor, x as runSupervisedKnowledgeUpdate, y as formatSupervisedKnowledgeTask } from "./index-
|
|
1
|
+
import { C as KnowledgeImprovementActivationExecutor, S as CreateKnowledgeImprovementActivationExecutorOptions, _ as SupervisedKnowledgeUpdater, a as KnowledgeImprovementJobResult, b as knowledgeReadinessDeliverable, c as createAgentKnowledgeReadinessCheck, d as KnowledgeReadinessCheckInput, f as KnowledgeReadinessCheckResult, g as SupervisedKnowledgeUpdateResult, h as SupervisedKnowledgeUpdateOptions, i as KnowledgeImprovementJobMeasurement, l as runKnowledgeImprovementJob, m as SupervisedKnowledgeUpdateInput, n as KnowledgeImprovementCandidatePair, o as RunKnowledgeImprovementJobOptions, p as RESEARCH_SUPERVISOR_SYSTEM_PROMPT, r as KnowledgeImprovementExperimentBundles, s as buildKnowledgeImprovementExperimentBundles, t as AgentKnowledgeReadinessCheckOptions, u as KnowledgeReadinessCheck, v as createSupervisedKnowledgeUpdater, w as createKnowledgeImprovementActivationExecutor, x as runSupervisedKnowledgeUpdate, y as formatSupervisedKnowledgeTask } from "./index-C-IJR7pR.js";
|
|
2
2
|
export { type AgentKnowledgeReadinessCheckOptions, type CreateKnowledgeImprovementActivationExecutorOptions, type KnowledgeImprovementActivationExecutor, type KnowledgeImprovementCandidatePair, type KnowledgeImprovementExperimentBundles, type KnowledgeImprovementJobMeasurement, type KnowledgeImprovementJobResult, type KnowledgeReadinessCheck, type KnowledgeReadinessCheckInput, type KnowledgeReadinessCheckResult, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, type RunKnowledgeImprovementJobOptions, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, buildKnowledgeImprovementExperimentBundles, createAgentKnowledgeReadinessCheck, createKnowledgeImprovementActivationExecutor, createSupervisedKnowledgeUpdater, formatSupervisedKnowledgeTask, knowledgeReadinessDeliverable, runKnowledgeImprovementJob, runSupervisedKnowledgeUpdate };
|
package/dist/knowledge.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as createSupervisedKnowledgeUpdater, c as runSupervisedKnowledgeUpdate, i as RESEARCH_SUPERVISOR_SYSTEM_PROMPT, l as createKnowledgeImprovementActivationExecutor, n as createAgentKnowledgeReadinessCheck, o as formatSupervisedKnowledgeTask, r as runKnowledgeImprovementJob, s as knowledgeReadinessDeliverable, t as buildKnowledgeImprovementExperimentBundles } from "./knowledge-
|
|
1
|
+
import { a as createSupervisedKnowledgeUpdater, c as runSupervisedKnowledgeUpdate, i as RESEARCH_SUPERVISOR_SYSTEM_PROMPT, l as createKnowledgeImprovementActivationExecutor, n as createAgentKnowledgeReadinessCheck, o as formatSupervisedKnowledgeTask, r as runKnowledgeImprovementJob, s as knowledgeReadinessDeliverable, t as buildKnowledgeImprovementExperimentBundles } from "./knowledge-DPDhKnOz.js";
|
|
2
2
|
export { RESEARCH_SUPERVISOR_SYSTEM_PROMPT, buildKnowledgeImprovementExperimentBundles, createAgentKnowledgeReadinessCheck, createKnowledgeImprovementActivationExecutor, createSupervisedKnowledgeUpdater, formatSupervisedKnowledgeTask, knowledgeReadinessDeliverable, runKnowledgeImprovementJob, runSupervisedKnowledgeUpdate };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { d as RunAnalystLoopOpts, f as RunAnalystLoopResult } from "./types-zWfqDjeL.js";
|
|
2
|
-
import {
|
|
3
|
-
import { i as Budget } from "./types-
|
|
2
|
+
import { $s as WinnerStrategy, _ as WorktreeFanoutOptions, _t as WorktreePatchArtifact, g as AuthoredHarness } from "./index-D7UJIX2x.js";
|
|
3
|
+
import { i as Budget } from "./types-CIg5DBNF.js";
|
|
4
4
|
import { n as FactCandidate, t as CreateKbGateOptions } from "./kb-gate-C8z2juK8.js";
|
|
5
5
|
import { AgentProfile } from "@tangle-network/agent-interface";
|
|
6
6
|
//#region src/loop-runner.d.ts
|
|
@@ -162,4 +162,4 @@ declare function parseLoopRunnerArgv(argv: string[]): {
|
|
|
162
162
|
};
|
|
163
163
|
//#endregion
|
|
164
164
|
export { researchLoopRunner as _, DELEGATED_LOOP_MODES as a, DelegatedLoopResult as c, ResearchLoopRunnerOptions as d, RunDelegatedLoopOptions as f, isDelegatedLoopMode as g, auditLoopRunner as h, runLoopRunnerCli as i, DelegatedLoopRunner as l, WorktreeLoopRunnerOptions as m, LoopRunnerCliResult as n, DelegatedLoopMode as o, VetoedFact as p, parseLoopRunnerArgv as r, DelegatedLoopRegistry as s, LoopRunnerCliArgs as t, ResearchLoopResult as u, runDelegatedLoop as v, worktreeLoopRunner as y };
|
|
165
|
-
//# sourceMappingURL=loop-runner-bin-
|
|
165
|
+
//# sourceMappingURL=loop-runner-bin-B6g4vOil.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as ConfigError } from "./errors-DEAvWQPy.js";
|
|
2
|
-
import { P as createExecutorRegistry } from "./supervisor-
|
|
3
|
-
import { H as runPersonified, V as definePersona, d as worktreeFanout } from "./runtime-
|
|
2
|
+
import { P as createExecutorRegistry } from "./supervisor-CMtutocL.js";
|
|
3
|
+
import { H as runPersonified, V as definePersona, d as worktreeFanout } from "./runtime-BVKEU5jc.js";
|
|
4
4
|
import { t as runAnalystLoop } from "./analyst-loop-BE8cDs5Q.js";
|
|
5
5
|
import { t as createKbGate } from "./kb-gate-DpaSwXVx.js";
|
|
6
6
|
//#region src/loop-runner.ts
|
|
@@ -243,4 +243,4 @@ if (invokedScript && /loop-runner-bin\.(js|ts|mjs)$/.test(invokedScript)) main()
|
|
|
243
243
|
//#endregion
|
|
244
244
|
export { isDelegatedLoopMode as a, worktreeLoopRunner as c, auditLoopRunner as i, runLoopRunnerCli as n, researchLoopRunner as o, DELEGATED_LOOP_MODES as r, runDelegatedLoop as s, parseLoopRunnerArgv as t };
|
|
245
245
|
|
|
246
|
-
//# sourceMappingURL=loop-runner-bin-
|
|
246
|
+
//# sourceMappingURL=loop-runner-bin-DCBho3GJ.js.map
|