@tangle-network/agent-runtime 0.197.1 → 0.198.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/dist/{activation-BxMZybuo.js → activation-CwdO0ml2.js} +2 -2
- package/dist/{activation-BxMZybuo.js.map → activation-CwdO0ml2.js.map} +1 -1
- package/dist/{improve-DZs0KXhK.d.ts → activation-DFRTurvU.d.ts} +99 -5
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +2 -2
- package/dist/candidate-execution/index.d.ts +370 -2
- package/dist/candidate-execution/index.js +828 -4
- package/dist/candidate-execution/index.js.map +1 -0
- package/dist/{coordination-driver-zkCrfEbS.js → coordination-driver-Cf638-6q.js} +2 -5
- package/dist/{coordination-driver-zkCrfEbS.js.map → coordination-driver-Cf638-6q.js.map} +1 -1
- package/dist/{delegate-DHeUYU5E.js → delegate-Bez07Dlh.js} +2 -2
- package/dist/{delegate-DHeUYU5E.js.map → delegate-Bez07Dlh.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +4 -5
- package/dist/durable.js.map +1 -1
- package/dist/{graph-51SJOEcw.js → graph-DBk3Unto.js} +3 -3
- package/dist/{graph-51SJOEcw.js.map → graph-DBk3Unto.js.map} +1 -1
- package/dist/{improvement-cycle-Tw5nYT5R.js → improvement-cycle-Bma8TJs-.js} +8 -10
- package/dist/{improvement-cycle-Tw5nYT5R.js.map → improvement-cycle-Bma8TJs-.js.map} +1 -1
- package/dist/{index-CYOJsxSg.d.ts → index-D8LWK3Ha.d.ts} +6 -7
- package/dist/index.d.ts +694 -16
- package/dist/index.js +1780 -17
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +3 -7
- package/dist/intelligence.js +5 -6
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +2 -5
- package/dist/kernel.js +8 -10
- package/dist/{loop-runner-bin-2LQSjRTB.js → loop-runner-bin-Bd3dHQuw.js} +3 -3
- package/dist/{loop-runner-bin-2LQSjRTB.js.map → loop-runner-bin-Bd3dHQuw.js.map} +1 -1
- package/dist/{loop-runner-bin-DwrSB04m.d.ts → loop-runner-bin-Bn-0o_4k.d.ts} +3 -3
- 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 +2 -3
- package/dist/mcp/index.js +4 -5
- package/dist/mcp/index.js.map +1 -1
- package/dist/{prepare-DDGp0-rW.js → prepare-CAO1yXov.js} +2407 -2407
- package/dist/prepare-CAO1yXov.js.map +1 -0
- package/dist/{protected-model-port-DxFN8DLS.js → protected-model-port-B5avcRiQ.js} +2 -2
- package/dist/{protected-model-port-DxFN8DLS.js.map → protected-model-port-B5avcRiQ.js.map} +1 -1
- package/dist/{provision-supervisor-CpMMShE_.js → provision-supervisor-C97q5NN_.js} +3 -6
- package/dist/{provision-supervisor-CpMMShE_.js.map → provision-supervisor-C97q5NN_.js.map} +1 -1
- package/dist/{redact-Cbl2O-4N.js → redact-CVyxp2AU.js} +5232 -2525
- package/dist/redact-CVyxp2AU.js.map +1 -0
- package/dist/{runtime-BSFz2z7h.js → runtime-BrTBBSfC.js} +427 -23
- package/dist/runtime-BrTBBSfC.js.map +1 -0
- package/dist/{server-COXa19sp.js → server-CO4bvAwe.js} +4 -4
- package/dist/{server-COXa19sp.js.map → server-CO4bvAwe.js.map} +1 -1
- package/dist/{types-DFLZMaeh.d.ts → stream-agent-turn-CLOQr497.d.ts} +1986 -6
- package/dist/{structural-rollout-DPbZWgEm.js → structural-rollout-D__lmWXe.js} +1101 -8
- package/dist/structural-rollout-D__lmWXe.js.map +1 -0
- package/dist/{supervise-b93YUaka.js → supervise-KSe4JEcg.js} +3 -5
- package/dist/{supervise-b93YUaka.js.map → supervise-KSe4JEcg.js.map} +1 -1
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +13 -13
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{workspace-archive-Ybomp7AN.js → workspace-archive-BMOnloFf.js} +3 -3
- package/dist/{workspace-archive-Ybomp7AN.js.map → workspace-archive-BMOnloFf.js.map} +1 -1
- package/package.json +1 -28
- package/dist/activation-DyWB0K6E.d.ts +0 -98
- package/dist/authored-code-URmkdgjv.js +0 -37
- package/dist/authored-code-URmkdgjv.js.map +0 -1
- package/dist/candidate-execution-nvqVIMyS.js +0 -829
- package/dist/candidate-execution-nvqVIMyS.js.map +0 -1
- package/dist/conversation-BxJ0SIBM.js +0 -1363
- package/dist/conversation-BxJ0SIBM.js.map +0 -1
- package/dist/conversation.d.ts +0 -2
- package/dist/conversation.js +0 -2
- package/dist/environment-provider-1fKZh2zl.js +0 -2281
- package/dist/environment-provider-1fKZh2zl.js.map +0 -1
- package/dist/environment-provider-B-I2jlQy.d.ts +0 -143
- package/dist/environment-provider.d.ts +0 -2
- package/dist/environment-provider.js +0 -2
- package/dist/graph.d.ts +0 -753
- package/dist/graph.js +0 -2111
- package/dist/graph.js.map +0 -1
- package/dist/index-CUosKU4N.d.ts +0 -372
- package/dist/index-D9mb6fn2.d.ts +0 -691
- package/dist/index-ZnxSe6iK.d.ts +0 -138
- package/dist/jsonl-file-BEpaEYjT.js +0 -141
- package/dist/jsonl-file-BEpaEYjT.js.map +0 -1
- package/dist/knowledge-B_MsOtDG.js +0 -428
- package/dist/knowledge-B_MsOtDG.js.map +0 -1
- package/dist/knowledge.d.ts +0 -2
- package/dist/knowledge.js +0 -2
- package/dist/materialization-Cy0oM8tb.js +0 -672
- package/dist/materialization-Cy0oM8tb.js.map +0 -1
- package/dist/prepare-DDGp0-rW.js.map +0 -1
- package/dist/primeintellect/index.d.ts +0 -218
- package/dist/primeintellect/index.js +0 -739
- package/dist/primeintellect/index.js.map +0 -1
- package/dist/redact-Cbl2O-4N.js.map +0 -1
- package/dist/runtime-0xNaV6TJ.d.ts +0 -1699
- package/dist/runtime-BSFz2z7h.js.map +0 -1
- package/dist/stream-agent-turn-Dt5mZpc3.js +0 -1103
- package/dist/stream-agent-turn-Dt5mZpc3.js.map +0 -1
- package/dist/stream-agent-turn-urHpmO_Z.d.ts +0 -160
- package/dist/structural-rollout-DPbZWgEm.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import { $ as OpenAIChatToolChoice, A as RuntimeRunCompleteInput, B as AgentBackendInput, F as RuntimeRunRow, G as AgentTaskContext, H as AgentKnowledgeProvider, I as RuntimeRunStatus, J as AgentTaskStatus, K as AgentTaskRunResult, L as startRuntimeRun, M as RuntimeRunHandle, N as RuntimeRunOptions, P as RuntimeRunPersistenceAdapter, Q as OpenAIChatTool, R as AgentAdapter, U as AgentRuntimeEvent, V as AgentExecutionBackend, W as AgentRuntimeEventSink, X as KnowledgeReadinessDecision, Y as BackendErrorDetail, Z as OpenAIChatResponseFormat, at as RuntimeStreamEvent, et as RunAgentTaskOptions, it as RuntimeSessionStore, j as RuntimeRunCost,
|
|
1
|
+
import { $ as OpenAIChatToolChoice, A as RuntimeRunCompleteInput, B as AgentBackendInput, F as RuntimeRunRow, G as AgentTaskContext, H as AgentKnowledgeProvider, I as RuntimeRunStatus, J as AgentTaskStatus, K as AgentTaskRunResult, L as startRuntimeRun, M as RuntimeRunHandle, N as RuntimeRunOptions, P as RuntimeRunPersistenceAdapter, Q as OpenAIChatTool, R as AgentAdapter, U as AgentRuntimeEvent, V as AgentExecutionBackend, W as AgentRuntimeEventSink, X as KnowledgeReadinessDecision, Y as BackendErrorDetail, Z as OpenAIChatResponseFormat, at as RuntimeStreamEvent, et as RunAgentTaskOptions, it as RuntimeSessionStore, j as RuntimeRunCost, nt as RuntimeCanonicalStreamEvent, q as AgentTaskSpec, rt as RuntimeSession, tt as RunAgentTaskStreamOptions, z as AgentBackendContext } from "./types-Q0PMagdm.js";
|
|
2
2
|
import { i as SurfaceImprovementEdit } from "./improvement-adapter-D5gwwoXQ.js";
|
|
3
3
|
import { o as ImprovementProposalSource } from "./types-zWfqDjeL.js";
|
|
4
|
-
import { Ap as PlannerError, Dp as ConfigError, Ep as BackendTransportError, Fp as RuntimeRunStateError,
|
|
4
|
+
import { Ap as PlannerError, Dp as ConfigError, Ep as BackendTransportError, Fp as RuntimeRunStateError, Ip as ValidationError, Kr as StructuralRolloutPolicy, Mp as RetainedInteractiveBindingError, Np as RetainedRunAdmissionError, Op as JudgeError, Pp as RetainedRunDispatchBindingError, Tp as AgentEvalErrorCode, jp as RetainedInteractiveAdmissionError, kp as NotFoundError, ps as SupervisorProfile, qp as DeliverableSpec, wp as AgentEvalError, zo as SuperviseOptions } from "./index-D8LWK3Ha.js";
|
|
5
5
|
import { a as RuntimeHookErrorContext, c as RuntimeHookTarget, d as defineRuntimeHooks, f as notifyRuntimeDecisionPoint, i as RuntimeHookContext, l as RuntimeHooks, n as RuntimeDecisionKind, o as RuntimeHookEvent, p as notifyRuntimeHookEvent, r as RuntimeDecisionPoint, s as RuntimeHookPhase, t as RuntimeDecisionEvidenceRef, u as composeRuntimeHooks } from "./runtime-hooks-Bj6wJHlH.js";
|
|
6
|
-
import { $
|
|
7
|
-
import {
|
|
8
|
-
import { ct as
|
|
9
|
-
import {
|
|
10
|
-
import { A as ExactProcessCandidateExecutorOptions, B as buildAgentCandidateBundle, C as RunProtectedAgentCandidateModelGrantOptions, D as CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV, E as persistCandidateOutputArtifact, F as FileAgentCandidateExecutionClaimStoreOptions, G as candidateWorkspaceManifest, H as sealAgentCandidateBundle, I as AgentCandidateCodeSource, K as scanMaterializedWorkspaceManifest, L as AgentCandidateCodeSurfaceSource, M as DisposePreparedAgentCandidateOptions, N as disposePreparedAgentCandidateExecution, O as CANDIDATE_KNOWLEDGE_ROOT_ENV, P as FileAgentCandidateExecutionClaimStore, R as AgentCandidateProfileSource, S as ProtectedAgentCandidateModelGrantContext, T as runProtectedAgentCandidateModelGrant, U as WorkspaceScanLimits, V as AgentCandidateBundleInput, W as WorkspaceScanOptions, _ as AGENT_CANDIDATE_EXECUTION_SUPPORT, a as WorkspaceTreeEntryPolicy, b as recoverExpiredAgentCandidateExecution, c as describeWorkspaceTree, d as CaptureAgentCandidateWorkspaceOptions, f as CapturedAgentCandidateWorkspace, g as createAgentCandidateWorkspacePort, h as captureAgentCandidateWorkspaceFiles, i as WorkspaceTreeDescriptor, j as exactProcessProviderAsCandidateExecutor, k as candidateKnowledgeExecutionPaths, l as seedWorkspaceTree, m as captureAgentCandidateWorkspace, n as SeedWorkspaceTreeInput, o as WorkspaceTreeExclusion, p as CreateAgentCandidateWorkspacePortOptions, q as verifyMaterializedWorkspace, r as WorkspaceTreeAlgorithm, s as WorkspaceTreeExclusionReason, t as DescribeWorkspaceTreeOptions, u as AgentCandidateWorkspaceArchiveLimits, v as verifyAgentCandidateBundle, w as RunProtectedAgentCandidateModelGrantResult, x as AgentCandidateModelGrantRunReservationInput, y as RecoverExpiredAgentCandidateOptions, z as BuildAgentCandidateBundleInput } from "./index-CUosKU4N.js";
|
|
11
|
-
import { A as AgentCandidateExecutionPhase, B as AgentCandidatePreparationEvidence, C as AgentCandidateExecutionClaim, D as AgentCandidateExecutionFailureClass, E as AgentCandidateExecutionCleanupHandles, F as AgentCandidateExecutionTerminalResult, I as AgentCandidateRetryRejection, L as InMemoryAgentCandidateExecutionClaimStore, M as AgentCandidateExecutionRecoveryEvidence, N as AgentCandidateExecutionStageResult, O as AgentCandidateExecutionFinishResult, P as AgentCandidateExecutionTerminalRecord, R as InMemoryAgentCandidateExecutionClaimStoreOptions, S as AgentCandidateExecutionAttemptRef, T as AgentCandidateExecutionClaimStore, _ as PrepareAgentCandidateExecutionOptions, a as AgentCandidateModelGrantSettleInput, b as executePreparedAgentCandidate, c as agentCandidateProfileAsAgentProfile, d as freezeGenericAgentCandidateProfile, f as omitUndefinedObjectFields, g as parseExactCandidateProfile, h as parseExactAgentProfileDiff, i as AgentCandidateModelGrantReserveInput, j as AgentCandidateExecutionPhaseResult, k as AgentCandidateExecutionLease, l as applyExactAgentProfileDiff, m as parseExactAgentProfile, n as AgentCandidateModelGrantClient, o as CreateProtectedAgentCandidateModelPortOptions, r as AgentCandidateModelGrantReservation, s as createProtectedAgentCandidateModelPort, t as AgentCandidateModelGrantActivateInput, u as assertCandidateProfileBinding, v as prepareAgentCandidateExecution, w as AgentCandidateExecutionClaimResult, x as AgentCandidateExecutionAttemptRecord, y as ExecutePreparedAgentCandidateOptions, z as candidateExecutionClaim } from "./protected-model-port-BtXp2dUY.js";
|
|
12
|
-
import { $ as sleep, A as RunConversationOptions, B as buildForwardHeaders, C as ConversationResult, D as HaltPredicate, E as HaltContext, F as InMemoryConversationJournal, G as CircuitBreakerState, H as readDepth, I as DEFAULT_MAX_DEPTH, J as RetryBackoff, K as CircuitOpenError, L as FORWARD_HEADERS, M as ConversationJournal, N as ConversationJournalEntry, O as HaltReason, P as FileConversationJournal, Q as makePerAttemptSignal, R as ForwardHeaderName, S as ConversationPolicy, T as ConversationTurn, U as BackendCallPolicy, V as isDepthExceeded, W as CircuitBreakerConfig, X as computeBackoff, Y as RetryableErrorPredicate, Z as defaultIsRetryable, _ as createConversationBackend, a as RunPersonaConfig, b as ConversationDriveState, c as runPersonaDispatch, d as D1DatabaseLike, et as createProfileExecutionBackend, f as D1StmtLike, g as defineConversation, h as d1ToSqlAdapter, i as PersonaDriver, j as TurnOrder, k as HaltSignal, l as runConversation, m as SqlConversationJournal, n as turnId, o as RunPersonaConversationOptions, p as SqlAdapter, q as DeadlineExceededError, r as PersonaConversationResult, s as runPersonaConversation, t as slugifySpeaker, u as runConversationStream, v as AuthSource, w as ConversationStreamEvent, x as ConversationParticipant, y as Conversation, z as PropagatedHeaders } from "./index-D9mb6fn2.js";
|
|
13
|
-
import { $ as CandidateGenerator, A as ImprovementProfileCandidate, B as ImprovementRefusedProfilePopulationCandidate, C as ImproveRuntimeCodeGeneratorOptions, D as ImprovementCandidate, E as ImproveSurface, F as ImprovementProfilePopulationCandidate, G as AgenticGeneratorShotDisposition, H as ReadonlyAgentProfile, I as ImprovementProfilePopulationCandidateSource, J as Verifier, K as AgenticGeneratorShotExecution, L as ImprovementProfilePopulationLineage, M as ImprovementProfileCandidatePopulationAvailable, N as ImprovementProfileCandidatePopulationUnavailable, O as ImprovementCodeCandidate, P as ImprovementProfilePopulationArtifactSource, Q as defaultBuildPrompt, R as ImprovementProfilePopulationLineageNode, S as ImproveResult, T as ImproveSkillsOptions, U as AgenticGeneratorExecutorForWorktree, V as DeepReadonly, W as AgenticGeneratorOptions, X as agenticGenerator, Y as VerifyResult, Z as commandVerifier, _ as ImproveOptimizationRunOptions, a as ImproveCodeOptions, b as ImproveProfileComponents, c as ImproveCost, d as ImproveMethodContext, f as ImproveMethodFactory, g as ImproveMethodSource, h as ImproveMethodResult, i as ImproveCodeBaseOptions, j as ImprovementProfileCandidatePopulation, k as ImprovementMaterializedProfilePopulationCandidate, l as ImproveCustomCodeGeneratorOptions, m as ImproveMethodOptions, n as ImproveCandidateValidationInput, o as ImproveCodeResult, p as ImproveMethodLineage, q as AgenticGeneratorShotReceipt, r as ImproveCandidateValidator, s as ImproveCodeRunOptions, t as improve, u as ImproveLineage, v as ImproveOptions, w as ImproveScenarioPartitions, x as ImproveProfileSurface, y as ImproveProfileAgent, z as ImprovementProfilePopulationObservationSource } from "./improve-DZs0KXhK.js";
|
|
14
|
-
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-ZnxSe6iK.js";
|
|
15
|
-
import { _ as researchLoopRunner, a as DELEGATED_LOOP_MODES, c as DelegatedLoopResult, d as ResearchLoopRunnerOptions, f as RunDelegatedLoopOptions, g as isDelegatedLoopMode, h as auditLoopRunner, i as runLoopRunnerCli, l as DelegatedLoopRunner, m as WorktreeLoopRunnerOptions, n as LoopRunnerCliResult, o as DelegatedLoopMode, p as VetoedFact, r as parseLoopRunnerArgv, s as DelegatedLoopRegistry, t as LoopRunnerCliArgs, u as ResearchLoopResult, v as runDelegatedLoop, y as worktreeLoopRunner } from "./loop-runner-bin-DwrSB04m.js";
|
|
6
|
+
import { $i as sanitizeAgentRuntimeEvent, Ai as OtelExporter, Bi as loopEventToOtelSpan, Ci as EvalRunGeneration, Di as LoopSpanNode, Ei as INTELLIGENCE_WIRE_VERSION, Fi as buildRuntimeEventOtelSpans, Gi as RuntimeStreamEventCollector, Hi as padTraceId, Ii as createOpenInferenceFileExporter, Ji as RuntimeTelemetryOptions, Ki as RuntimeStreamEventSink, Li as createOtelExporter, Mi as RuntimeEventOtelOptions, Ni as buildLoopOtelSpans, Oi as OtelAttribute, Pi as buildLoopSpanNodes, Qi as createRuntimeStreamEventCollector, Qn as Redactor, Ri as exportEvalRuns, Si as EvalRunEvent, Ti as EvalRunsExportResult, Ui as toOtelAttributes, Vi as padSpanId, Wi as RuntimeEventCollector, Xi as SanitizedKnowledgeRequirement, Yi as SanitizedKnowledgeReadinessReport, Zi as createRuntimeEventCollector, Zr as SupervisedResult, Zt as WorktreeCheckRunner, ea as sanitizeKnowledgeReadinessReport, h as ExecutorConfig, ir as Budget, ji as OtelSpan, ki as OtelExportConfig, pr as ExecutorFactory, qi as RuntimeStreamEventSummary, ta as sanitizeRuntimeStreamEvent, wi as EvalRunsExportConfig, zi as generateSpanId } from "./stream-agent-turn-CLOQr497.js";
|
|
7
|
+
import { y as AgentCandidateOutputArtifactPort } from "./types-1s_29INY.js";
|
|
8
|
+
import { $ as ImprovementProfilePopulationLineageNode, A as ImproveMethodResult, B as ImproveSkillsOptions, C as ImproveCost, D as ImproveMethodFactory, E as ImproveMethodContext, F as ImproveProfileComponents, G as ImprovementProfileCandidate, H as ImprovementCandidate, I as ImproveProfileSurface, J as ImprovementProfileCandidatePopulationUnavailable, K as ImprovementProfileCandidatePopulation, L as ImproveResult, M as ImproveOptimizationRunOptions, N as ImproveOptions, O as ImproveMethodLineage, P as ImproveProfileAgent, Q as ImprovementProfilePopulationLineage, R as ImproveRuntimeCodeGeneratorOptions, S as ImproveCodeRunOptions, T as ImproveLineage, U as ImprovementCodeCandidate, V as ImproveSurface, W as ImprovementMaterializedProfilePopulationCandidate, X as ImprovementProfilePopulationCandidate, Y as ImprovementProfilePopulationArtifactSource, Z as ImprovementProfilePopulationCandidateSource, _ as ImproveCandidateValidationInput, at as AgenticGeneratorOptions, b as ImproveCodeOptions, ct as AgenticGeneratorShotReceipt, dt as agenticGenerator, et as ImprovementProfilePopulationObservationSource, ft as commandVerifier, g as improve, i as AgentImprovementActivationTransition, it as AgenticGeneratorExecutorForWorktree, j as ImproveMethodSource, k as ImproveMethodOptions, lt as Verifier, mt as CandidateGenerator, n as AgentImprovementActivationResultStore, nt as DeepReadonly, ot as AgenticGeneratorShotDisposition, pt as defaultBuildPrompt, q as ImprovementProfileCandidatePopulationAvailable, rt as ReadonlyAgentProfile, st as AgenticGeneratorShotExecution, t as AgentImprovementActivationReconciliation, tt as ImprovementRefusedProfilePopulationCandidate, ut as VerifyResult, v as ImproveCandidateValidator, w as ImproveCustomCodeGeneratorOptions, x as ImproveCodeResult, y as ImproveCodeBaseOptions, z as ImproveScenarioPartitions } from "./activation-DFRTurvU.js";
|
|
9
|
+
import { _ as researchLoopRunner, a as DELEGATED_LOOP_MODES, c as DelegatedLoopResult, d as ResearchLoopRunnerOptions, f as RunDelegatedLoopOptions, g as isDelegatedLoopMode, h as auditLoopRunner, i as runLoopRunnerCli, l as DelegatedLoopRunner, m as WorktreeLoopRunnerOptions, n as LoopRunnerCliResult, o as DelegatedLoopMode, p as VetoedFact, r as parseLoopRunnerArgv, s as DelegatedLoopRegistry, t as LoopRunnerCliArgs, u as ResearchLoopResult, v as runDelegatedLoop, y as worktreeLoopRunner } from "./loop-runner-bin-Bn-0o_4k.js";
|
|
16
10
|
import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "./openai-tools-CRQhVT_V.js";
|
|
17
|
-
import { AgentProfile, Sha256Digest } from "@tangle-network/agent-interface";
|
|
18
|
-
import { ControlBudget, ControlDecision, ControlEvalResult, ControlEvalResult as ControlEvalResult$1, ControlRunResult, ControlStep, DataAcquisitionPlan, KnowledgeReadinessReport, KnowledgeReadinessReport as KnowledgeReadinessReport$1, KnowledgeRequirement, ProposalFinding, RunRecord, RunRecord as RunRecord$1 } from "@tangle-network/agent-eval";
|
|
19
|
-
import { GepaOptimizationMethodConfig, SkillOptOptimizationMethodConfig } from "@tangle-network/agent-eval/campaign";
|
|
11
|
+
import { AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateKnowledge, AgentProfile, Sha256Digest } from "@tangle-network/agent-interface";
|
|
12
|
+
import { AgentProfile as AgentProfile$1, ControlBudget, ControlDecision, ControlEvalResult, ControlEvalResult as ControlEvalResult$1, ControlRunResult, ControlStep, DataAcquisitionPlan, KnowledgeReadinessReport, KnowledgeReadinessReport as KnowledgeReadinessReport$1, KnowledgeRequirement, MaximumCharge, ProposalFinding, RunRecord, RunRecord as RunRecord$1 } from "@tangle-network/agent-eval";
|
|
13
|
+
import { GepaOptimizationMethodConfig, ProfileDispatchFn, Scenario, SkillOptOptimizationMethodConfig } from "@tangle-network/agent-eval/campaign";
|
|
20
14
|
import { MutableSurface, Scenario as Scenario$1, SelfImproveOptions } from "@tangle-network/agent-eval/contract";
|
|
15
|
+
import { BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementOptions, KnowledgeImprovementResult, KnowledgeReadinessSpec, PromoteKnowledgeCandidateOptions, RagKnowledgeUpdateResult } from "@tangle-network/agent-knowledge";
|
|
21
16
|
//#region src/backends.d.ts
|
|
22
17
|
/** Wrap any custom async-iterable stream into a typed `AgentExecutionBackend`. @stable */
|
|
23
18
|
declare function createIterableBackend<TInput extends AgentBackendInput>(options: {
|
|
@@ -36,6 +31,560 @@ declare function createSandboxPromptBackend<TBox, TInput extends AgentBackendInp
|
|
|
36
31
|
getSessionId?: (box: TBox, input: TInput) => string | undefined;
|
|
37
32
|
}): AgentExecutionBackend<TInput>;
|
|
38
33
|
//#endregion
|
|
34
|
+
//#region src/runtime/profile-execution-backend.d.ts
|
|
35
|
+
/**
|
|
36
|
+
* Bind one exact profile and Runtime executor to the stable `AgentExecutionBackend` contract used
|
|
37
|
+
* by `runAgentTaskStream` and conversations.
|
|
38
|
+
*
|
|
39
|
+
* Runtime still owns the model call through `streamAgentTurn`.
|
|
40
|
+
* The adapter only translates the two stream protocols and carries the caller's request headers
|
|
41
|
+
* into `ExecutorContext` so an HTTP executor can preserve authorization, recursion depth, and
|
|
42
|
+
* trace identity.
|
|
43
|
+
*
|
|
44
|
+
* @stable
|
|
45
|
+
*/
|
|
46
|
+
declare function createProfileExecutionBackend(options: {
|
|
47
|
+
profile: AgentProfile;
|
|
48
|
+
executor: ExecutorFactory<unknown>;
|
|
49
|
+
}): AgentExecutionBackend;
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/conversation/call-policy.d.ts
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* Per-call resilience policy for participant backends: deadline, retry with
|
|
55
|
+
* backoff, and a circuit breaker. Each policy is applied *around* a single
|
|
56
|
+
* turn's backend invocation, not across the whole conversation — the
|
|
57
|
+
* conversation-level credit cap and `maxTurns` bound the broader run.
|
|
58
|
+
*
|
|
59
|
+
* Deadlines abort the underlying backend stream via `AbortSignal` linkage so
|
|
60
|
+
* the OpenAI/SDK clients tear down their HTTP request cleanly instead of
|
|
61
|
+
* leaking sockets. Retries replay the same logical turn (same `turnId`) so
|
|
62
|
+
* any caching gateway can dedupe. Circuit breakers are *per participant*: A's
|
|
63
|
+
* failures don't open B's breaker.
|
|
64
|
+
*
|
|
65
|
+
* @stable
|
|
66
|
+
*/
|
|
67
|
+
/** Pure judgment of whether an error is worth retrying. Defaults: TimeoutError, AbortError, fetch-level network errors. */
|
|
68
|
+
type RetryableErrorPredicate = (err: unknown) => boolean;
|
|
69
|
+
/** Backoff between attempts. Constant ms, or `(attempt: 1-indexed) => ms`. */
|
|
70
|
+
type RetryBackoff = number | ((attempt: number) => number);
|
|
71
|
+
/** Circuit-breaker tuning. `failuresToOpen` consecutive failures opens it; closed only after `cooldownMs`. */
|
|
72
|
+
interface CircuitBreakerConfig {
|
|
73
|
+
failuresToOpen: number;
|
|
74
|
+
cooldownMs: number;
|
|
75
|
+
}
|
|
76
|
+
interface BackendCallPolicy {
|
|
77
|
+
/** Per-attempt wall clock limit. Exceeding fires an AbortSignal and is treated as a retryable failure. */
|
|
78
|
+
perAttemptDeadlineMs?: number;
|
|
79
|
+
/** Number of retries after the first attempt; total attempts = 1 + maxRetries. Default 0. */
|
|
80
|
+
maxRetries?: number;
|
|
81
|
+
/** Backoff between attempts. Default 250ms with jitter. */
|
|
82
|
+
retryBackoffMs?: RetryBackoff;
|
|
83
|
+
/** Custom retry classifier. Defaults to retrying transport failures and retryable HTTP statuses. */
|
|
84
|
+
isRetryable?: RetryableErrorPredicate;
|
|
85
|
+
/** Circuit breaker that opens after N consecutive failures per participant. */
|
|
86
|
+
circuitBreaker?: CircuitBreakerConfig;
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/conversation/headers.d.ts
|
|
90
|
+
/**
|
|
91
|
+
* Header bag carried through `AgentBackendContext.propagatedHeaders` so
|
|
92
|
+
* backends that opt in can merge them into their outbound HTTP requests.
|
|
93
|
+
* Distinct from `buildForwardHeaders` so callers can attach extra
|
|
94
|
+
* non-protocol headers (e.g. tracing) without colliding.
|
|
95
|
+
*/
|
|
96
|
+
type PropagatedHeaders = Readonly<Record<string, string>>;
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/conversation/journal.d.ts
|
|
99
|
+
interface ConversationJournalEntry {
|
|
100
|
+
runId: string;
|
|
101
|
+
startedAt: string;
|
|
102
|
+
/** Set when the run reaches a terminal state. */
|
|
103
|
+
halted?: HaltReason;
|
|
104
|
+
endedAt?: string;
|
|
105
|
+
turns: ConversationTurn[];
|
|
106
|
+
}
|
|
107
|
+
interface ConversationJournal {
|
|
108
|
+
/**
|
|
109
|
+
* Load any prior state for `runId`. Returns `undefined` for a fresh run.
|
|
110
|
+
* Implementations MUST NOT mutate the returned object — the runner clones
|
|
111
|
+
* before continuing — but the runtime treats absence and emptiness
|
|
112
|
+
* identically, so a journal with zero turns is equivalent to "fresh."
|
|
113
|
+
*/
|
|
114
|
+
loadRun(runId: string): Promise<ConversationJournalEntry | undefined>;
|
|
115
|
+
/**
|
|
116
|
+
* Initialise journal state for a fresh run. Called once per run, before any
|
|
117
|
+
* `appendTurn`. Idempotent: calling with an existing runId is a no-op if
|
|
118
|
+
* the entry already exists with the same `startedAt`.
|
|
119
|
+
*/
|
|
120
|
+
beginRun(runId: string, startedAt: string): Promise<void>;
|
|
121
|
+
/**
|
|
122
|
+
* Append a committed turn. The runner only calls this AFTER the turn's
|
|
123
|
+
* backend stream completed and the credit total has been updated, so an
|
|
124
|
+
* appended turn is observed-committed and never speculative.
|
|
125
|
+
*/
|
|
126
|
+
appendTurn(runId: string, turn: ConversationTurn): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Record the run's terminal halt reason + end time. Once called, the run
|
|
129
|
+
* is observed-final; subsequent `loadRun` returns the same halt.
|
|
130
|
+
*/
|
|
131
|
+
recordHalt(runId: string, halt: HaltReason, endedAt: string): Promise<void>;
|
|
132
|
+
}
|
|
133
|
+
/** In-memory `ConversationJournal` — suitable for testing and single-process runs. */
|
|
134
|
+
declare class InMemoryConversationJournal implements ConversationJournal {
|
|
135
|
+
private readonly entries;
|
|
136
|
+
loadRun(runId: string): Promise<ConversationJournalEntry | undefined>;
|
|
137
|
+
beginRun(runId: string, startedAt: string): Promise<void>;
|
|
138
|
+
appendTurn(runId: string, turn: ConversationTurn): Promise<void>;
|
|
139
|
+
recordHalt(runId: string, halt: HaltReason, endedAt: string): Promise<void>;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* JSONL on disk. One line per record; first line is the `begin`, subsequent
|
|
143
|
+
* lines are `turn` records, terminal line is `halt`. Replays the whole file
|
|
144
|
+
* on `loadRun` — cheap for the conversation sizes this is designed for
|
|
145
|
+
* (thousands of turns, not millions). For huge runs, plug in a real DB
|
|
146
|
+
* adapter; the interface is small.
|
|
147
|
+
*
|
|
148
|
+
* Reads and appends over the shared append-only spine (`durable/jsonl-file`): each
|
|
149
|
+
* `appendTurn` / `recordHalt` finishes a short write and calls `fsync`, so a process
|
|
150
|
+
* crash between writes never loses an acknowledged turn, and a crash DURING one leaves
|
|
151
|
+
* an uncommitted final line that the next read skips and the next append truncates.
|
|
152
|
+
*/
|
|
153
|
+
declare class FileConversationJournal implements ConversationJournal {
|
|
154
|
+
private readonly path;
|
|
155
|
+
constructor(path: string);
|
|
156
|
+
loadRun(runId: string): Promise<ConversationJournalEntry | undefined>;
|
|
157
|
+
beginRun(runId: string, startedAt: string): Promise<void>;
|
|
158
|
+
appendTurn(runId: string, turn: ConversationTurn): Promise<void>;
|
|
159
|
+
recordHalt(runId: string, halt: HaltReason, endedAt: string): Promise<void>;
|
|
160
|
+
private appendRecord;
|
|
161
|
+
}
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/conversation/types.d.ts
|
|
164
|
+
/** @stable */
|
|
165
|
+
interface ConversationParticipant {
|
|
166
|
+
/**
|
|
167
|
+
* Stable name used as the speaker label in the transcript. Must be unique
|
|
168
|
+
* within a `Conversation`.
|
|
169
|
+
*/
|
|
170
|
+
name: string;
|
|
171
|
+
/**
|
|
172
|
+
* Backend that runs this participant's turn. Reuses the existing
|
|
173
|
+
* `AgentExecutionBackend` contract from `runAgentTaskStream`, so an iterable,
|
|
174
|
+
* sandbox, or profile-backed Runtime executor works through the same runner.
|
|
175
|
+
*/
|
|
176
|
+
backend: AgentExecutionBackend;
|
|
177
|
+
/**
|
|
178
|
+
* Optional human label for traces / dashboards. Distinct from `name`, which
|
|
179
|
+
* is the addressing key.
|
|
180
|
+
*/
|
|
181
|
+
label?: string;
|
|
182
|
+
/**
|
|
183
|
+
* Optional per-participant override of the conversation's default
|
|
184
|
+
* `callPolicy`. Use to tighten the deadline or raise the retry budget for
|
|
185
|
+
* a participant known to be slow or flaky.
|
|
186
|
+
*/
|
|
187
|
+
callPolicy?: BackendCallPolicy;
|
|
188
|
+
/**
|
|
189
|
+
* Who pays for THIS participant's outbound calls?
|
|
190
|
+
*
|
|
191
|
+
* - `'forward-user'` (default) — propagate the caller's
|
|
192
|
+
* `X-Tangle-Forwarded-Authorization` so the downstream gateway bills the
|
|
193
|
+
* original user. Right for pass-through agents that aggregate/route
|
|
194
|
+
* without taking economic risk.
|
|
195
|
+
* - `'agent-owned'` — DO NOT forward the user's auth; the participant's
|
|
196
|
+
* backend uses its own credentials (typically a sk-tan-AGENT or x402
|
|
197
|
+
* wallet baked into the backend at construction). Downstream charges
|
|
198
|
+
* land on the agent, not the user. Right for resold-bundle agents that
|
|
199
|
+
* take margin between their inbound price and their sub-agent costs.
|
|
200
|
+
* - `(state) => AuthSource` — per-turn / per-condition decision, e.g. base
|
|
201
|
+
* sub-services are agent-owned but premium add-ons forward the user.
|
|
202
|
+
*
|
|
203
|
+
* The agent's own credentials live on its caller-owned backend or
|
|
204
|
+
* profile-bound Runtime executor; this field is purely about *whether to
|
|
205
|
+
* also forward the user's identity downstream*.
|
|
206
|
+
*/
|
|
207
|
+
authSource?: AuthSource;
|
|
208
|
+
}
|
|
209
|
+
/** @stable */
|
|
210
|
+
type AuthSource = 'forward-user' | 'agent-owned' | ((state: ConversationDriveState) => 'forward-user' | 'agent-owned');
|
|
211
|
+
/** @stable */
|
|
212
|
+
type TurnOrder = 'alternate' | 'round-robin' | ((state: ConversationDriveState) => number);
|
|
213
|
+
/** @stable */
|
|
214
|
+
interface ConversationDriveState {
|
|
215
|
+
transcript: readonly ConversationTurn[];
|
|
216
|
+
turnIndex: number;
|
|
217
|
+
spentCreditsCents: number;
|
|
218
|
+
}
|
|
219
|
+
/** @stable */
|
|
220
|
+
interface HaltContext extends ConversationDriveState {
|
|
221
|
+
lastTurn: ConversationTurn;
|
|
222
|
+
}
|
|
223
|
+
/** @stable */
|
|
224
|
+
interface HaltSignal {
|
|
225
|
+
halted: true;
|
|
226
|
+
reason: string;
|
|
227
|
+
}
|
|
228
|
+
/** @stable */
|
|
229
|
+
type HaltPredicate = (ctx: HaltContext) => boolean | HaltSignal | Promise<boolean | HaltSignal>;
|
|
230
|
+
/** @stable */
|
|
231
|
+
type HaltReason = {
|
|
232
|
+
kind: 'max_turns';
|
|
233
|
+
turns: number;
|
|
234
|
+
} | {
|
|
235
|
+
kind: 'max_credits';
|
|
236
|
+
spentCents: number;
|
|
237
|
+
capCents: number;
|
|
238
|
+
} | {
|
|
239
|
+
kind: 'predicate';
|
|
240
|
+
reason: string;
|
|
241
|
+
} | {
|
|
242
|
+
kind: 'abort';
|
|
243
|
+
} | {
|
|
244
|
+
kind: 'participant_error';
|
|
245
|
+
participant: string;
|
|
246
|
+
message: string;
|
|
247
|
+
};
|
|
248
|
+
/** @stable */
|
|
249
|
+
interface ConversationPolicy {
|
|
250
|
+
/** Hard cap on speaker-turns. Each call into a participant's backend counts as 1. */
|
|
251
|
+
maxTurns: number;
|
|
252
|
+
/**
|
|
253
|
+
* Hard cap on aggregate credit spend across all participants, in cents.
|
|
254
|
+
* Computed by summing `llm_call.costUsd` from every participant's stream.
|
|
255
|
+
* Unset (`undefined`) means no credit ceiling — the run is bounded only by
|
|
256
|
+
* `maxTurns` and `haltOn`.
|
|
257
|
+
*/
|
|
258
|
+
maxCreditsCents?: number;
|
|
259
|
+
/**
|
|
260
|
+
* Speaker selection. Defaults to `'alternate'` for two-participant
|
|
261
|
+
* conversations and `'round-robin'` for any other arity.
|
|
262
|
+
*/
|
|
263
|
+
turnOrder?: TurnOrder;
|
|
264
|
+
/**
|
|
265
|
+
* Optional convergence / content-based halt. Called after every turn ends;
|
|
266
|
+
* returning truthy stops the loop with `{ kind: 'predicate', ... }`.
|
|
267
|
+
*/
|
|
268
|
+
haltOn?: HaltPredicate;
|
|
269
|
+
/**
|
|
270
|
+
* Default per-turn resilience policy applied to every participant call
|
|
271
|
+
* (deadline, retries, circuit breaker). Individual participants may
|
|
272
|
+
* override via `ConversationParticipant.callPolicy`.
|
|
273
|
+
*/
|
|
274
|
+
defaultCallPolicy?: BackendCallPolicy;
|
|
275
|
+
}
|
|
276
|
+
/** @stable */
|
|
277
|
+
interface ConversationTurn {
|
|
278
|
+
index: number;
|
|
279
|
+
speaker: string;
|
|
280
|
+
/**
|
|
281
|
+
* Deterministic turn identifier — stable across retries of the same logical
|
|
282
|
+
* turn so caching gateways and trace backends can dedupe. Shape:
|
|
283
|
+
* `${runId}.t${index}.${speakerSlug}`.
|
|
284
|
+
*/
|
|
285
|
+
turnId: string;
|
|
286
|
+
/** Backend session used for this turn. Present on turns recorded by session-aware runners. */
|
|
287
|
+
sessionId?: string;
|
|
288
|
+
text: string;
|
|
289
|
+
/**
|
|
290
|
+
* Aggregated backend usage for this turn alone. Populated from any
|
|
291
|
+
* `llm_call` stream events the backend emitted; `undefined` when the
|
|
292
|
+
* backend reports no usage.
|
|
293
|
+
*/
|
|
294
|
+
usage?: {
|
|
295
|
+
tokensIn?: number;
|
|
296
|
+
tokensOut?: number;
|
|
297
|
+
costUsd?: number;
|
|
298
|
+
latencyMs?: number;
|
|
299
|
+
model?: string;
|
|
300
|
+
};
|
|
301
|
+
/**
|
|
302
|
+
* Number of attempts that ran before this turn committed. `1` is the
|
|
303
|
+
* common case; higher means the call policy retried after transient
|
|
304
|
+
* failures.
|
|
305
|
+
*/
|
|
306
|
+
attempts: number;
|
|
307
|
+
startedAt: string;
|
|
308
|
+
endedAt: string;
|
|
309
|
+
}
|
|
310
|
+
/** @stable */
|
|
311
|
+
interface Conversation {
|
|
312
|
+
participants: readonly ConversationParticipant[];
|
|
313
|
+
policy: ConversationPolicy;
|
|
314
|
+
}
|
|
315
|
+
/** @stable */
|
|
316
|
+
interface RunConversationOptions {
|
|
317
|
+
/** First message kicking off the conversation. Routes to the first speaker. */
|
|
318
|
+
seed: string;
|
|
319
|
+
/**
|
|
320
|
+
* Optional run identifier for cross-participant trace correlation. Auto-
|
|
321
|
+
* generated when omitted. Reusing a runId against the same `journal`
|
|
322
|
+
* resumes the prior run — the runner replays the persisted transcript and
|
|
323
|
+
* continues from the first un-recorded turn.
|
|
324
|
+
*/
|
|
325
|
+
runId?: string;
|
|
326
|
+
/** Cancellation signal — aborts mid-stream and halts with `{ kind: 'abort' }`. */
|
|
327
|
+
signal?: AbortSignal;
|
|
328
|
+
/**
|
|
329
|
+
* Event sink for per-turn micro-events. Distinct from the result transcript:
|
|
330
|
+
* the sink fires for every text-delta, every turn-start/end, and the
|
|
331
|
+
* conversation-start/end markers. Used to drive SSE / dashboard updates
|
|
332
|
+
* without waiting for the conversation to finish.
|
|
333
|
+
*/
|
|
334
|
+
onEvent?: (event: ConversationStreamEvent) => void | Promise<void>;
|
|
335
|
+
/**
|
|
336
|
+
* Optional durable transcript. When set, the runner persists every
|
|
337
|
+
* committed turn before yielding `turn_end`. Reusing the same `runId`
|
|
338
|
+
* against the same journal resumes from the last committed turn — so a
|
|
339
|
+
* driver process crash mid-run loses zero acknowledged turns.
|
|
340
|
+
*/
|
|
341
|
+
journal?: ConversationJournal;
|
|
342
|
+
/**
|
|
343
|
+
* Stores each participant's backend session. The runner keeps an in-memory
|
|
344
|
+
* store for one invocation when omitted. Reuse a durable store with the same
|
|
345
|
+
* `runId` and journal after a process restart. Backends implementing `resume`
|
|
346
|
+
* continue their provider session; other backends receive the full transcript.
|
|
347
|
+
*/
|
|
348
|
+
sessionStore?: RuntimeSessionStore;
|
|
349
|
+
/**
|
|
350
|
+
* Headers to forward verbatim to every participant backend call (gateway
|
|
351
|
+
* propagation: `X-Tangle-Forwarded-Authorization`, run/turn correlation,
|
|
352
|
+
* depth counter). Backends opt in by reading `propagatedHeaders` from
|
|
353
|
+
* their `AgentBackendContext`; backends that ignore the field still work.
|
|
354
|
+
*/
|
|
355
|
+
propagatedHeaders?: PropagatedHeaders;
|
|
356
|
+
/**
|
|
357
|
+
* Inbound depth at the point this driver was invoked. The runner
|
|
358
|
+
* increments it on every outbound participant call; gateways refuse at
|
|
359
|
+
* `DEFAULT_MAX_DEPTH`. Default 0 (origin caller).
|
|
360
|
+
*/
|
|
361
|
+
inboundDepth?: number;
|
|
362
|
+
/**
|
|
363
|
+
* Parent turn id when this conversation is *inside* another turn (i.e. the
|
|
364
|
+
* driver is itself a participant via `createConversationBackend`). The
|
|
365
|
+
* runner stamps each outbound call with this as `X-Tangle-Parent-TurnId`
|
|
366
|
+
* so trace stitching survives nested orchestration.
|
|
367
|
+
*/
|
|
368
|
+
parentTurnId?: string;
|
|
369
|
+
}
|
|
370
|
+
/** @stable */
|
|
371
|
+
interface ConversationResult {
|
|
372
|
+
runId: string;
|
|
373
|
+
transcript: ConversationTurn[];
|
|
374
|
+
turns: number;
|
|
375
|
+
spentCreditsCents: number;
|
|
376
|
+
halted: HaltReason;
|
|
377
|
+
durationMs: number;
|
|
378
|
+
startedAt: string;
|
|
379
|
+
endedAt: string;
|
|
380
|
+
}
|
|
381
|
+
/** @stable */
|
|
382
|
+
type ConversationStreamEvent = {
|
|
383
|
+
type: 'conversation_start';
|
|
384
|
+
runId: string;
|
|
385
|
+
participants: readonly string[];
|
|
386
|
+
seed: string;
|
|
387
|
+
timestamp: string;
|
|
388
|
+
} | {
|
|
389
|
+
type: 'conversation_resumed';
|
|
390
|
+
runId: string;
|
|
391
|
+
participants: readonly string[];
|
|
392
|
+
transcript: readonly ConversationTurn[];
|
|
393
|
+
timestamp: string;
|
|
394
|
+
} | {
|
|
395
|
+
type: 'turn_start';
|
|
396
|
+
runId: string;
|
|
397
|
+
index: number;
|
|
398
|
+
speaker: string;
|
|
399
|
+
turnId: string;
|
|
400
|
+
attempt: number;
|
|
401
|
+
timestamp: string;
|
|
402
|
+
} | {
|
|
403
|
+
type: 'turn_text_delta';
|
|
404
|
+
runId: string;
|
|
405
|
+
index: number;
|
|
406
|
+
speaker: string;
|
|
407
|
+
turnId: string;
|
|
408
|
+
text: string;
|
|
409
|
+
timestamp?: string;
|
|
410
|
+
} | {
|
|
411
|
+
type: 'turn_retry';
|
|
412
|
+
runId: string;
|
|
413
|
+
index: number;
|
|
414
|
+
speaker: string;
|
|
415
|
+
turnId: string;
|
|
416
|
+
attempt: number;
|
|
417
|
+
reason: string;
|
|
418
|
+
timestamp: string;
|
|
419
|
+
} | {
|
|
420
|
+
type: 'turn_end';
|
|
421
|
+
runId: string;
|
|
422
|
+
turn: ConversationTurn;
|
|
423
|
+
timestamp: string;
|
|
424
|
+
} | {
|
|
425
|
+
type: 'conversation_end';
|
|
426
|
+
runId: string;
|
|
427
|
+
result: ConversationResult;
|
|
428
|
+
timestamp: string;
|
|
429
|
+
};
|
|
430
|
+
//#endregion
|
|
431
|
+
//#region src/conversation/conversation-backend.d.ts
|
|
432
|
+
/** Adapt a multi-participant conversation into the standard execution backend contract. */
|
|
433
|
+
declare function createConversationBackend(options: {
|
|
434
|
+
conversation: Conversation;
|
|
435
|
+
/** Optional backend kind label. Defaults to `'conversation'`. */
|
|
436
|
+
kind?: string;
|
|
437
|
+
}): AgentExecutionBackend;
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/conversation/define-conversation.d.ts
|
|
440
|
+
/** Validate and define a conversation before execution. */
|
|
441
|
+
declare function defineConversation(input: {
|
|
442
|
+
participants: ConversationParticipant[];
|
|
443
|
+
policy: ConversationPolicy;
|
|
444
|
+
}): Conversation;
|
|
445
|
+
//#endregion
|
|
446
|
+
//#region src/conversation/journal-sql.d.ts
|
|
447
|
+
/**
|
|
448
|
+
* Minimal SQL driver shape. Implementations forward to whichever client the
|
|
449
|
+
* deployment already uses; agent-runtime takes no opinion on which.
|
|
450
|
+
*
|
|
451
|
+
* Parameter placeholders MUST be `?` (positional). All adapters listed in the
|
|
452
|
+
* file header accept this convention.
|
|
453
|
+
*/
|
|
454
|
+
interface SqlAdapter {
|
|
455
|
+
/** Execute a write statement (INSERT/UPDATE/DELETE/DDL). */
|
|
456
|
+
exec(sql: string, params?: readonly unknown[]): Promise<{
|
|
457
|
+
rowsAffected: number;
|
|
458
|
+
}>;
|
|
459
|
+
/** Execute a read statement (SELECT). Returns rows as plain objects. */
|
|
460
|
+
query<TRow = Record<string, unknown>>(sql: string, params?: readonly unknown[]): Promise<TRow[]>;
|
|
461
|
+
}
|
|
462
|
+
/**
|
|
463
|
+
* Adapt a Cloudflare D1 binding to the SqlAdapter shape. Lives here so D1
|
|
464
|
+
* consumers don't have to write the wrapper themselves; the runtime never
|
|
465
|
+
* imports `@cloudflare/workers-types` directly (peer-style typing).
|
|
466
|
+
*/
|
|
467
|
+
declare function d1ToSqlAdapter(db: D1DatabaseLike): SqlAdapter;
|
|
468
|
+
/**
|
|
469
|
+
* Structural type matching the surface of `D1Database` we depend on, so the
|
|
470
|
+
* SDK never imports `@cloudflare/workers-types`. Consumers pass their real
|
|
471
|
+
* `D1Database` from `env.DB` and TS structural compatibility lines it up.
|
|
472
|
+
*/
|
|
473
|
+
interface D1DatabaseLike {
|
|
474
|
+
prepare(sql: string): D1StmtLike;
|
|
475
|
+
}
|
|
476
|
+
interface D1StmtLike {
|
|
477
|
+
bind(...params: unknown[]): D1StmtLike;
|
|
478
|
+
run(): Promise<unknown>;
|
|
479
|
+
all<TRow = unknown>(): Promise<{
|
|
480
|
+
results?: TRow[];
|
|
481
|
+
}>;
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
* SQL-backed ConversationJournal. Two tables — runs (one row per runId, holds
|
|
485
|
+
* start/halt timestamps + halt reason) and turns (one row per committed turn,
|
|
486
|
+
* payload is the ConversationTurn JSON). Replays the turns table on
|
|
487
|
+
* `loadRun` and writes append-only per `appendTurn`.
|
|
488
|
+
*/
|
|
489
|
+
declare class SqlConversationJournal implements ConversationJournal {
|
|
490
|
+
private readonly db;
|
|
491
|
+
private readonly table;
|
|
492
|
+
/**
|
|
493
|
+
* @param db SQL adapter (D1, postgres, sqlite, libSQL — all work)
|
|
494
|
+
* @param table Table-name prefix; the journal creates `${table}_runs` and
|
|
495
|
+
* `${table}_turns`. Lets multiple journals share a database
|
|
496
|
+
* without colliding (e.g. one per product surface).
|
|
497
|
+
*/
|
|
498
|
+
constructor(db: SqlAdapter, table?: string);
|
|
499
|
+
/**
|
|
500
|
+
* Create the journal's tables if absent. Idempotent. Call once at deploy
|
|
501
|
+
* (or at app boot) — running on every request is harmless but adds latency.
|
|
502
|
+
*/
|
|
503
|
+
migrate(): Promise<void>;
|
|
504
|
+
loadRun(runId: string): Promise<ConversationJournalEntry | undefined>;
|
|
505
|
+
beginRun(runId: string, startedAt: string): Promise<void>;
|
|
506
|
+
appendTurn(runId: string, turn: ConversationTurn): Promise<void>;
|
|
507
|
+
recordHalt(runId: string, halt: HaltReason, endedAt: string): Promise<void>;
|
|
508
|
+
}
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region src/conversation/run-conversation.d.ts
|
|
511
|
+
/** Run a conversation to completion and return its terminal result. */
|
|
512
|
+
declare function runConversation(conversation: Conversation, options: RunConversationOptions): Promise<ConversationResult>;
|
|
513
|
+
/** Streaming conversation orchestrator: drives N participants in turn through their own backends, enforcing `maxTurns` / `maxCreditsCents` / `haltOn`, yielding per-event stream markers. */
|
|
514
|
+
declare function runConversationStream(conversation: Conversation, options: RunConversationOptions): AsyncIterable<ConversationStreamEvent>;
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region src/conversation/run-persona.d.ts
|
|
517
|
+
/** A persona that drives the conversation: either a full driver `AgentProfile`
|
|
518
|
+
* (an LLM user-sim) or a deterministic script of user turns (the fast-path). */
|
|
519
|
+
type PersonaDriver = {
|
|
520
|
+
kind: 'profile';
|
|
521
|
+
profile: AgentProfile$1;
|
|
522
|
+
} | {
|
|
523
|
+
kind: 'scripted';
|
|
524
|
+
turns: string[];
|
|
525
|
+
};
|
|
526
|
+
interface RunPersonaConversationOptions {
|
|
527
|
+
/** The agent under test. Metered; its rendered prompt leads its turns. */
|
|
528
|
+
worker: AgentProfile$1;
|
|
529
|
+
/** The simulated user driving the dialogue. */
|
|
530
|
+
persona: PersonaDriver;
|
|
531
|
+
/** Resolve transport/executable ports for the exact profile. Runtime still materializes the
|
|
532
|
+
* profile and owns every model call. Applied to the worker and a profile-driven persona. */
|
|
533
|
+
executorFor: (profile: AgentProfile$1, role: 'worker' | 'persona') => ExecutorFactory<unknown>;
|
|
534
|
+
/** Speaker-turn cap. Default for a scripted persona = `2 * turns.length`
|
|
535
|
+
* (worker answers each user turn). REQUIRED for a `profile` persona. */
|
|
536
|
+
maxTurns?: number;
|
|
537
|
+
/** Kickoff message routed to the first speaker (the persona). Default 'Begin.' */
|
|
538
|
+
seed?: string;
|
|
539
|
+
/** Content-based "until satisfied" halt, called after every turn. `maxTurns` is the
|
|
540
|
+
* hard ceiling; this is the early stop (the persona declares the goal met / unreachable). */
|
|
541
|
+
haltOn?: HaltPredicate;
|
|
542
|
+
signal?: AbortSignal;
|
|
543
|
+
/** Worker participant / transcript speaker label. Default 'agent'. */
|
|
544
|
+
workerName?: string;
|
|
545
|
+
}
|
|
546
|
+
interface PersonaConversationResult {
|
|
547
|
+
transcript: ConversationTurn[];
|
|
548
|
+
turns: number;
|
|
549
|
+
halted: HaltReason;
|
|
550
|
+
/** Worker-only spend (the side under test). */
|
|
551
|
+
costUsd: number;
|
|
552
|
+
tokensIn: number;
|
|
553
|
+
tokensOut: number;
|
|
554
|
+
/** Absent means every worker call reported complete token usage. */
|
|
555
|
+
tokensKnown?: false;
|
|
556
|
+
/** Absent means every worker call reported provider-billed cost, including a known zero. */
|
|
557
|
+
costUsdKnown?: false;
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Run one worker profile against one persona as a multi-round conversation.
|
|
561
|
+
* The persona leads (participant 0): it speaks, the worker answers, repeat,
|
|
562
|
+
* until `maxTurns`. Returns the persistent transcript + worker-only usage.
|
|
563
|
+
*/
|
|
564
|
+
declare function runPersonaConversation(opts: RunPersonaConversationOptions): Promise<PersonaConversationResult>;
|
|
565
|
+
interface RunPersonaConfig<TScenario extends Scenario, TArtifact> {
|
|
566
|
+
/** Resolve transport/executable ports for each exact profile. */
|
|
567
|
+
executorFor: (profile: AgentProfile$1, role: 'worker' | 'persona') => ExecutorFactory<unknown>;
|
|
568
|
+
/** The persona driving each scenario — a driver profile or scripted turns. */
|
|
569
|
+
personaOf: (scenario: TScenario) => PersonaDriver;
|
|
570
|
+
/** Build the scored artifact from the finished transcript. */
|
|
571
|
+
artifactOf: (transcript: ConversationTurn[], scenario: TScenario) => TArtifact;
|
|
572
|
+
/** Speaker-turn cap (required when a persona is profile-driven). */
|
|
573
|
+
maxTurns?: (scenario: TScenario) => number;
|
|
574
|
+
seed?: (scenario: TScenario) => string;
|
|
575
|
+
workerName?: string;
|
|
576
|
+
/** Provider- or executor-enforced maximum for the whole worker conversation.
|
|
577
|
+
* Required before execution when the enclosing campaign is cost-capped. */
|
|
578
|
+
maximumCharge?: MaximumCharge | ((worker: AgentProfile$1, scenario: TScenario) => MaximumCharge | undefined);
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Wrap {@link runPersonaConversation} as a `ProfileDispatchFn` for
|
|
582
|
+
* `runProfileMatrix`: the profile axis is the worker-under-test, the scenario
|
|
583
|
+
* axis is the persona, and the runner is the cell. Meters the worker through
|
|
584
|
+
* `ctx.cost` so the matrix's backend-integrity guard sees real usage.
|
|
585
|
+
*/
|
|
586
|
+
declare function runPersonaDispatch<TScenario extends Scenario, TArtifact>(config: RunPersonaConfig<TScenario, TArtifact>): ProfileDispatchFn<TScenario, TArtifact>;
|
|
587
|
+
//#endregion
|
|
39
588
|
//#region src/improvement/build-prompts.d.ts
|
|
40
589
|
/** Evidence supplied to a generated tool or MCP build instruction. */
|
|
41
590
|
interface BuildPromptFindingsInput {
|
|
@@ -280,6 +829,135 @@ declare function structuralRolloutPolicyFromProfile(profile: ReadonlyAgentProfil
|
|
|
280
829
|
/** Persist a detached policy under the profile extension without mutating the input. */
|
|
281
830
|
declare function applyRolloutPolicyToProfile(profile: ReadonlyAgentProfile, policy: StructuralRolloutPolicy): AgentProfile;
|
|
282
831
|
//#endregion
|
|
832
|
+
//#region src/knowledge/activation.d.ts
|
|
833
|
+
interface CreateKnowledgeImprovementActivationExecutorOptions extends Omit<PromoteKnowledgeCandidateOptions, 'root' | 'candidate'> {
|
|
834
|
+
root: string;
|
|
835
|
+
identity: string;
|
|
836
|
+
results: AgentImprovementActivationResultStore;
|
|
837
|
+
}
|
|
838
|
+
interface KnowledgeImprovementActivationExecutor {
|
|
839
|
+
transition: AgentImprovementActivationTransition;
|
|
840
|
+
reconcile: AgentImprovementActivationReconciliation;
|
|
841
|
+
}
|
|
842
|
+
/** Apply or restore one local knowledge candidate through the shared activation contract. */
|
|
843
|
+
declare function createKnowledgeImprovementActivationExecutor(options: CreateKnowledgeImprovementActivationExecutorOptions): KnowledgeImprovementActivationExecutor;
|
|
844
|
+
//#endregion
|
|
845
|
+
//#region src/knowledge/supervised-update.d.ts
|
|
846
|
+
/** Standing prompt for a supervisor that grows a shared knowledge base through spawned researchers. */
|
|
847
|
+
declare const RESEARCH_SUPERVISOR_SYSTEM_PROMPT: string;
|
|
848
|
+
interface KnowledgeReadinessCheckInput {
|
|
849
|
+
root: string;
|
|
850
|
+
goal: string;
|
|
851
|
+
readinessSpecs?: readonly unknown[];
|
|
852
|
+
readinessTaskId?: string;
|
|
853
|
+
readiness?: unknown;
|
|
854
|
+
}
|
|
855
|
+
type KnowledgeReadinessCheckResult = boolean | {
|
|
856
|
+
ready: boolean;
|
|
857
|
+
summary?: string;
|
|
858
|
+
metadata?: Record<string, unknown>;
|
|
859
|
+
};
|
|
860
|
+
type KnowledgeReadinessCheck = (input: KnowledgeReadinessCheckInput) => Promise<KnowledgeReadinessCheckResult> | KnowledgeReadinessCheckResult;
|
|
861
|
+
interface SupervisedKnowledgeUpdateInput {
|
|
862
|
+
goal?: string;
|
|
863
|
+
root?: string;
|
|
864
|
+
candidateRoot?: string;
|
|
865
|
+
findings?: readonly unknown[];
|
|
866
|
+
metadata?: Record<string, unknown>;
|
|
867
|
+
}
|
|
868
|
+
interface SupervisedKnowledgeUpdateResult {
|
|
869
|
+
applied: boolean;
|
|
870
|
+
summary: string;
|
|
871
|
+
supervised: SupervisedResult<unknown>;
|
|
872
|
+
metadata: NonNullable<RagKnowledgeUpdateResult['metadata']>;
|
|
873
|
+
}
|
|
874
|
+
interface SupervisedKnowledgeUpdateOptions {
|
|
875
|
+
root: string;
|
|
876
|
+
goal: string;
|
|
877
|
+
readiness: KnowledgeReadinessCheck;
|
|
878
|
+
readinessSpecs?: readonly unknown[];
|
|
879
|
+
readinessTaskId?: string;
|
|
880
|
+
readinessOptions?: unknown;
|
|
881
|
+
findings?: readonly unknown[];
|
|
882
|
+
metadata?: Record<string, unknown>;
|
|
883
|
+
budget: Budget;
|
|
884
|
+
backend?: ExecutorConfig;
|
|
885
|
+
makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
|
|
886
|
+
/** Caller-owned exact supervisor harness/provider/model identity. */
|
|
887
|
+
supervisorProfile: SupervisorProfile;
|
|
888
|
+
superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
|
|
889
|
+
allowedModels?: readonly string[];
|
|
890
|
+
runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
|
|
891
|
+
}
|
|
892
|
+
type SupervisedKnowledgeUpdater = (input: SupervisedKnowledgeUpdateInput) => Promise<SupervisedKnowledgeUpdateResult>;
|
|
893
|
+
/** Build the completion check a supervised KB update uses to stop only when the KB is ready. */
|
|
894
|
+
declare function knowledgeReadinessDeliverable(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readiness' | 'readinessSpecs' | 'readinessTaskId' | 'readinessOptions'>): DeliverableSpec<unknown>;
|
|
895
|
+
/** Create an `improveKnowledgeBase` update callback backed by runtime supervision. */
|
|
896
|
+
declare function createSupervisedKnowledgeUpdater(options: SupervisedKnowledgeUpdateOptions): SupervisedKnowledgeUpdater;
|
|
897
|
+
/** Run a runtime supervisor that updates one candidate knowledge base and stops on readiness. */
|
|
898
|
+
declare function runSupervisedKnowledgeUpdate(options: SupervisedKnowledgeUpdateOptions): Promise<SupervisedKnowledgeUpdateResult>;
|
|
899
|
+
/** Format the supervisor task with the KB root, readiness requirements, current findings, and metadata. */
|
|
900
|
+
declare function formatSupervisedKnowledgeTask(options: Pick<SupervisedKnowledgeUpdateOptions, 'root' | 'goal' | 'readinessSpecs' | 'readinessTaskId' | 'findings' | 'metadata'>): string;
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region src/knowledge/improvement-job.d.ts
|
|
903
|
+
interface RunKnowledgeImprovementJobOptions extends Omit<KnowledgeImprovementOptions, 'updateKnowledge'> {
|
|
904
|
+
budget: Budget;
|
|
905
|
+
readinessCheck?: KnowledgeReadinessCheck;
|
|
906
|
+
backend?: ExecutorConfig;
|
|
907
|
+
makeWorkerAgent?: SuperviseOptions['makeWorkerAgent'];
|
|
908
|
+
supervisorProfile: SupervisorProfile;
|
|
909
|
+
superviseOptions?: Partial<Omit<SuperviseOptions, 'budget' | 'backend' | 'deliverable' | 'makeWorkerAgent' | 'allowedModels'>>;
|
|
910
|
+
allowedModels?: readonly string[];
|
|
911
|
+
runSupervised?: (profile: SupervisorProfile, task: unknown, opts: SuperviseOptions) => Promise<SupervisedResult<unknown>>;
|
|
912
|
+
candidateArtifacts?: AgentCandidateOutputArtifactPort;
|
|
913
|
+
onMeasurement?: (measurement: KnowledgeImprovementJobMeasurement) => Promise<void> | void;
|
|
914
|
+
}
|
|
915
|
+
interface KnowledgeImprovementJobMeasurement {
|
|
916
|
+
startedAt: string;
|
|
917
|
+
finishedAt: string;
|
|
918
|
+
durationMs: number;
|
|
919
|
+
updateCalls: number;
|
|
920
|
+
updateDurationMs: number;
|
|
921
|
+
supervisedSpent: {
|
|
922
|
+
iterations: number;
|
|
923
|
+
inputTokens: number;
|
|
924
|
+
outputTokens: number;
|
|
925
|
+
usdKnown: boolean;
|
|
926
|
+
usd: number;
|
|
927
|
+
ms: number;
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
interface KnowledgeImprovementJobResult {
|
|
931
|
+
improvement: KnowledgeImprovementResult;
|
|
932
|
+
knowledge?: KnowledgeImprovementCandidatePair;
|
|
933
|
+
measurement: KnowledgeImprovementJobMeasurement;
|
|
934
|
+
blocked: boolean;
|
|
935
|
+
}
|
|
936
|
+
interface KnowledgeImprovementCandidatePair {
|
|
937
|
+
reference: AgentCandidateKnowledge['candidate'];
|
|
938
|
+
evaluation: AgentCandidateCapturedArtifact;
|
|
939
|
+
baseline: AgentCandidateKnowledge['snapshot'];
|
|
940
|
+
candidate: AgentCandidateKnowledge['snapshot'];
|
|
941
|
+
}
|
|
942
|
+
interface KnowledgeImprovementExperimentBundles {
|
|
943
|
+
baseline: AgentCandidateBundle;
|
|
944
|
+
candidate: AgentCandidateBundle;
|
|
945
|
+
}
|
|
946
|
+
interface AgentKnowledgeReadinessCheckOptions {
|
|
947
|
+
goal: string;
|
|
948
|
+
readinessSpecs?: readonly KnowledgeReadinessSpec[];
|
|
949
|
+
readinessTaskId?: string;
|
|
950
|
+
readiness?: Omit<BuildEvalKnowledgeBundleOptions, 'taskId' | 'index' | 'specs'>;
|
|
951
|
+
strict?: boolean;
|
|
952
|
+
kbQuality?: KnowledgeBaseQualityOptions;
|
|
953
|
+
}
|
|
954
|
+
/** Build the default readiness check backed by `@tangle-network/agent-knowledge` validation and scoring. */
|
|
955
|
+
declare function createAgentKnowledgeReadinessCheck(options: AgentKnowledgeReadinessCheckOptions): KnowledgeReadinessCheck;
|
|
956
|
+
/** Produce a frozen KB candidate while leaving live knowledge content unchanged. */
|
|
957
|
+
declare function runKnowledgeImprovementJob(options: RunKnowledgeImprovementJobOptions): Promise<KnowledgeImprovementJobResult>;
|
|
958
|
+
/** Attach both frozen knowledge inputs to one otherwise-identical bundle pair. */
|
|
959
|
+
declare function buildKnowledgeImprovementExperimentBundles(bundle: AgentCandidateBundle, knowledge: KnowledgeImprovementCandidatePair): KnowledgeImprovementExperimentBundles;
|
|
960
|
+
//#endregion
|
|
283
961
|
//#region src/model-resolution.d.ts
|
|
284
962
|
/**
|
|
285
963
|
*
|
|
@@ -425,5 +1103,5 @@ declare function readinessServerSentEvent(report: KnowledgeReadinessReport$1, op
|
|
|
425
1103
|
/** Serialize a `RuntimeStreamEvent` as a Server-Sent Event string. @stable */
|
|
426
1104
|
declare function runtimeStreamServerSentEvent(event: RuntimeStreamEvent, options?: RuntimeTelemetryOptions & ServerSentEventOptions): string;
|
|
427
1105
|
//#endregion
|
|
428
|
-
export { AGENT_CANDIDATE_EXECUTION_SUPPORT, type AgentAdapter, type AgentBackendContext, type AgentBackendInput, type AgentCandidateArtifactPort, type AgentCandidateBenchmarkGraderIdentity, type AgentCandidateBenchmarkGraderPort, type AgentCandidateBundleInput, type AgentCandidateCodeSource, type AgentCandidateCodeSurfaceSource, type AgentCandidateContainerPort, type AgentCandidateExecutionAttemptRecord, type AgentCandidateExecutionAttemptRef, type AgentCandidateExecutionClaim, type AgentCandidateExecutionClaimResult, type AgentCandidateExecutionClaimStore, type AgentCandidateExecutionCleanupHandles, type AgentCandidateExecutionFailureClass, type AgentCandidateExecutionFinishResult, type AgentCandidateExecutionLease, type AgentCandidateExecutionPhase, type AgentCandidateExecutionPhaseResult, type AgentCandidateExecutionPorts, type AgentCandidateExecutionRecoveryEvidence, type AgentCandidateExecutionRoots, type AgentCandidateExecutionStageResult, type AgentCandidateExecutionTerminalRecord, type AgentCandidateExecutionTerminalResult, type AgentCandidateExecutorFinalCapture, type AgentCandidateExecutorMemoryCapture, type AgentCandidateExecutorPort, type AgentCandidateExecutorProfileFile, type AgentCandidateExecutorRequest, type AgentCandidateExecutorStopRequest, type AgentCandidateExecutorTaskOutcomeCapture, type AgentCandidateExecutorWorkspaceFile, type AgentCandidateExecutorWorkspaceInput, type AgentCandidateMemoryPort, type AgentCandidateMemoryResetResult, type AgentCandidateModelGrantActivateInput, type AgentCandidateModelGrantClient, type AgentCandidateModelGrantReservation, type AgentCandidateModelGrantReserveInput, type AgentCandidateModelGrantRunReservationInput, type AgentCandidateModelGrantSettleInput, type AgentCandidateModelLimits, type AgentCandidateModelPort, type AgentCandidateOutputArtifactPort, type AgentCandidateOutputPurpose, type AgentCandidatePreparationEvidence, type AgentCandidateProfileSource, type AgentCandidateProtectedModelActivation, type AgentCandidateProtectedModelReservation, type AgentCandidateProtectedModelSettlement, type AgentCandidateProtectedModelSettlementCall, type AgentCandidateProtectedRunCapture, type AgentCandidateRepositoryPort, type AgentCandidateRetryRejection, type AgentCandidateRunFinalization, type AgentCandidateTaskExecution, type AgentCandidateVerificationPorts, type AgentCandidateWorkspaceArchiveLimits, type AgentCandidateWorkspacePort, AgentEvalError, type AgentEvalErrorCode, type AgentExecutionBackend, type AgentKnowledgeProvider, type AgentKnowledgeReadinessCheckOptions, type AgentRuntimeEvent, type AgentRuntimeEventSink, type AgentSpec, type AgentTaskContext, type AgentTaskRunResult, type AgentTaskSpec, type AgentTaskStatus, type AgenticGeneratorExecutorForWorktree, type AgenticGeneratorOptions, type AgenticGeneratorShotDisposition, type AgenticGeneratorShotExecution, type AgenticGeneratorShotReceipt, type AnalystKind, type AnalystRegistry, type AuthSource, type AuthoredAnalystDefinition, type BackendCallPolicy, type BackendErrorDetail, BackendTransportError, type Budget, type BuildAgentCandidateBundleInput, type BuildPromptFindingsInput, CANDIDATE_KNOWLEDGE_RETRIEVAL_CONFIG_ENV, CANDIDATE_KNOWLEDGE_ROOT_ENV, CANDIDATE_TRACE_ENV, CANDIDATE_TRACE_TAGS, type CandidateGenerator, type CanonicalCandidateDocument, type CaptureAgentCandidateWorkspaceOptions, type CapturedAgentCandidateWorkspace, type ChatModelCandidate, type ChatModelValidation, type CircuitBreakerConfig, CircuitBreakerState, CircuitOpenError, ConfigError, type ControlBudget, type ControlDecision, type ControlEvalResult, type ControlRunResult, type ControlStep, type Conversation, type ConversationDriveState, type ConversationJournal, type ConversationJournalEntry, type ConversationParticipant, type ConversationPolicy, type ConversationResult, type ConversationStreamEvent, type ConversationTurn, type CoordinationEvent, type CreateAgentCandidateWorkspacePortOptions, type CreateKnowledgeImprovementActivationExecutorOptions, type CreateProfileImprovementHarnessOptions, type CreateProtectedAgentCandidateModelPortOptions, type D1DatabaseLike, type D1StmtLike, DEFAULT_MAX_DEPTH, DEFAULT_ROUTER_BASE_URL, DELEGATED_LOOP_MODES, type DataAcquisitionPlan, DeadlineExceededError, type DeepReadonly, type DelegatedLoopMode, type DelegatedLoopRegistry, type DelegatedLoopResult, type DelegatedLoopRunner, type DescribeWorkspaceTreeOptions, type DisposePreparedAgentCandidateOptions, type Driver, type EvalRunEvent, type EvalRunGeneration, type EvalRunsExportConfig, type EvalRunsExportResult, type ExactProcessCandidateExecutorOptions, type ExecutePreparedAgentCandidateOptions, type Executor, type ExecutorRegistry, FORWARD_HEADERS, FileAgentCandidateExecutionClaimStore, type FileAgentCandidateExecutionClaimStoreOptions, FileConversationJournal, type FinalizeContext, type ForwardHeaderName, type HaltContext, type HaltPredicate, type HaltReason, type HaltSignal, INTELLIGENCE_WIRE_VERSION, type ImproveCandidateValidationInput, type ImproveCandidateValidator, type ImproveCodeBaseOptions, type ImproveCodeOptions, type ImproveCodeResult, type ImproveCodeRunOptions, type ImproveCost, type ImproveCustomCodeGeneratorOptions, type ImproveLineage, type ImproveMethodContext, type ImproveMethodFactory, type ImproveMethodLineage, type ImproveMethodOptions, type ImproveMethodResult, type ImproveMethodSource, type ImproveOptimizationRunOptions, type ImproveOptions, type ImproveProfileAgent, type ImproveProfileComponents, type ImproveProfileSurface, type ImproveResult, type ImproveRuntimeCodeGeneratorOptions, type ImproveScenarioPartitions, type ImproveSkillsOptions, type ImproveSurface, type ImprovementCandidate, type ImprovementCodeCandidate, type ImprovementMaterializedProfilePopulationCandidate, type ImprovementProfileCandidate, type ImprovementProfileCandidatePopulation, type ImprovementProfileCandidatePopulationAvailable, type ImprovementProfileCandidatePopulationUnavailable, type ImprovementProfilePopulationArtifactSource, type ImprovementProfilePopulationCandidate, type ImprovementProfilePopulationCandidateSource, type ImprovementProfilePopulationLineage, type ImprovementProfilePopulationLineageNode, type ImprovementProfilePopulationObservationSource, type ImprovementRefusedProfilePopulationCandidate, InMemoryAgentCandidateExecutionClaimStore, type InMemoryAgentCandidateExecutionClaimStoreOptions, InMemoryConversationJournal, InMemoryRuntimeSessionStore, JudgeError, type KnowledgeImprovementActivationExecutor, type KnowledgeImprovementCandidatePair, type KnowledgeImprovementExperimentBundles, type KnowledgeImprovementJobMeasurement, type KnowledgeImprovementJobResult, type KnowledgeReadinessCheck, type KnowledgeReadinessCheckInput, type KnowledgeReadinessCheckResult, type KnowledgeReadinessDecision, type KnowledgeReadinessReport, type KnowledgeRequirement, type LoopResult, type LoopRunnerCliArgs, type LoopRunnerCliResult, type LoopSpanNode, type McpServeSpec, type ModelInfo, NotFoundError, type OfficialGepaOptions, type OfficialOptimizerContextOptions, OfficialOptimizerUnavailableError, type OfficialSensitiveCandidateInput, type OfficialSkillOptOptions, type OpenAIChatResponseFormat, type OpenAIChatTool, type OpenAIChatToolChoice, type OtelAttribute, type OtelExportConfig, type OtelExporter, type OtelSpan, PROMPT_INSTRUCTION_COMPONENT_PREFIX, type PersistedTaskOutcomeEvidence, type PersonaConversationResult, type PersonaDriver, PlannerError, type PrepareAgentCandidateExecutionOptions, type PreparedAgentCandidateExecution, type PreparedAgentCandidateInstruction, type PreparedAgentCandidateKnowledge, type PreparedAgentCandidateLaunch, type PreparedAgentCandidateTrace, type ProfileImprovementHarness, type ProfileImprovementHarnessRunOptions, type PropagatedHeaders, type ProtectedAgentCandidateModelGrantContext, type ProviderModelAttemptEvidence, type ProviderModelExecutionEvidence, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, ROLLOUT_POLICY_EXTENSION, type RawTraceDistillerOptions, type ReadonlyAgentProfile, type RecoverExpiredAgentCandidateOptions, type ReflectiveGeneratorOptions, type ResearchLoopResult, type ResearchLoopRunnerOptions, type ResolvedAgentCandidateContainer, type ResolvedChatModel, RetainedInteractiveAdmissionError, RetainedInteractiveBindingError, RetainedRunAdmissionError, RetainedRunDispatchBindingError, type RetryBackoff, type RetryableErrorPredicate, type RootProviderModelEvidence, type RouterEnv, type RunAgentTaskOptions, type RunAgentTaskStreamOptions, type RunConversationOptions, type RunDelegatedLoopOptions, type RunKnowledgeImprovementJobOptions, type RunPersonaConfig, type RunPersonaConversationOptions, type RunProtectedAgentCandidateModelGrantOptions, type RunProtectedAgentCandidateModelGrantResult, type RunRecord, type RuntimeCanonicalStreamEvent, type RuntimeDecisionEvidenceRef, type RuntimeDecisionKind, type RuntimeDecisionPoint, type RuntimeEventCollector, type RuntimeEventOtelOptions, type RuntimeHookContext, type RuntimeHookErrorContext, type RuntimeHookEvent, type RuntimeHookPhase, type RuntimeHookTarget, type RuntimeHooks, type RuntimeRunCompleteInput, type RuntimeRunCost, type RuntimeRunHandle, type RuntimeRunOptions, type RuntimeRunPersistenceAdapter, type RuntimeRunRow, RuntimeRunStateError, type RuntimeRunStatus, type RuntimeSession, type RuntimeSessionStore, type RuntimeStreamEvent, type RuntimeStreamEventCollector, type RuntimeStreamEventSink, type RuntimeStreamEventSummary, type RuntimeTelemetryOptions, type SanitizedKnowledgeReadinessReport, type SanitizedKnowledgeRequirement, type Scope, type SeedWorkspaceTreeInput, type ServerSentEventOptions, type Settled, type Spend, type SpendChannel, type SpendGap, type SqlAdapter, SqlConversationJournal, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, type SupervisedResult, type Supervisor, type SupervisorFinalizer, type TokenUsageProvenance, type TurnOrder, ValidationError, type VerifiedAgentCandidate, type VerifiedAgentCandidateTaskOutcome, type Verifier, type VerifyResult, type VetoedFact, type WorkerTraceEvidence, type WorkerTraceUnavailableReason, type WorkspaceScanLimits, type WorkspaceScanOptions, type WorkspaceTreeAlgorithm, type WorkspaceTreeDescriptor, type WorkspaceTreeEntryPolicy, type WorkspaceTreeExclusion, type WorkspaceTreeExclusionReason, type WorktreeCheckRunner, type WorktreeLoopRunnerOptions, agentCandidateProfileAsAgentProfile, agenticGenerator, applyExactAgentProfileDiff, applyRolloutPolicyToProfile, applyRunRecordDefaults, assertCandidateProfileBinding, auditLoopRunner, buildAgentCandidateBundle, buildForwardHeaders, buildKnowledgeImprovementExperimentBundles, buildLoopOtelSpans, buildLoopSpanNodes, buildRuntimeEventOtelSpans, candidateExecutionClaim, candidateKnowledgeExecutionPaths, candidateWorkspaceManifest, captureAgentCandidateWorkspace, captureAgentCandidateWorkspaceFiles, cleanModelId, commandVerifier, composeRuntimeHooks, computeBackoff, createAgentCandidateWorkspacePort, createAgentKnowledgeReadinessCheck, createConversationBackend, createIterableBackend, createKnowledgeImprovementActivationExecutor, createOpenInferenceFileExporter, createOtelExporter, createProfileExecutionBackend, createProfileImprovementHarness, createProtectedAgentCandidateModelPort, createRuntimeEventCollector, createRuntimeStreamEventCollector, createSandboxPromptBackend, createSupervisedKnowledgeUpdater, d1ToSqlAdapter, decideKnowledgeReadiness, defaultBuildPrompt, defaultIsRetryable, defineConversation, defineRuntimeHooks, describeWorkspaceTree, disposePreparedAgentCandidateExecution, exactProcessProviderAsCandidateExecutor, executePreparedAgentCandidate, exportEvalRuns, findingLines, formatSupervisedKnowledgeTask, freezeGenericAgentCandidateProfile, generateSpanId, getModels, improve, isDelegatedLoopMode, isDepthExceeded, knowledgeReadinessDeliverable, loopEventToOtelSpan, makePerAttemptSignal, mcpBuildPrompt, mcpServeVerifier, mcpToolsForRuntimeMcp, mcpToolsForRuntimeMcpSubset, normalizeRolloutPolicy, notifyRuntimeDecisionPoint, notifyRuntimeHookEvent, officialGepa, officialSkillOpt, omitUndefinedObjectFields, optimizerMethod, padSpanId, padTraceId, parseExactAgentProfile, parseExactAgentProfileDiff, parseExactCandidateProfile, parseLoopRunnerArgv, parseRolloutPolicy, persistCandidateOutputArtifact, prepareAgentCandidateExecution, promptInstructionsProfileComponents, rawTraceDistiller, readDepth, readinessServerSentEvent, recoverExpiredAgentCandidateExecution, reflectiveGenerator, researchLoopRunner, resolveChatModel, resolveRouterBaseUrl, runAgentTask, runAgentTaskStream, runConversation, runConversationStream, runDelegatedLoop, runKnowledgeImprovementJob, runLoopRunnerCli, runPersonaConversation, runPersonaDispatch, runProtectedAgentCandidateModelGrant, runSupervisedKnowledgeUpdate, runtimeStreamServerSentEvent, sanitizeAgentRuntimeEvent, sanitizeKnowledgeReadinessReport, sanitizeRuntimeStreamEvent, scanMaterializedWorkspaceManifest, sealAgentCandidateBundle, seedWorkspaceTree, serializeRolloutPolicy, sleep, slugifySpeaker, startRuntimeRun, strategyAuthorMethod, structuralRolloutPolicyFromProfile, toOtelAttributes, toolBuildPrompt, turnId, validateChatModelId, verifyAgentCandidateBundle, verifyMaterializedWorkspace, worktreeLoopRunner };
|
|
1106
|
+
export { type AgentAdapter, type AgentBackendContext, type AgentBackendInput, AgentEvalError, type AgentEvalErrorCode, type AgentExecutionBackend, type AgentKnowledgeProvider, type AgentKnowledgeReadinessCheckOptions, type AgentRuntimeEvent, type AgentRuntimeEventSink, type AgentTaskContext, type AgentTaskRunResult, type AgentTaskSpec, type AgentTaskStatus, type AgenticGeneratorExecutorForWorktree, type AgenticGeneratorOptions, type AgenticGeneratorShotDisposition, type AgenticGeneratorShotExecution, type AgenticGeneratorShotReceipt, type AuthSource, type BackendCallPolicy, type BackendErrorDetail, BackendTransportError, type BuildPromptFindingsInput, type CandidateGenerator, type ChatModelCandidate, type ChatModelValidation, type CircuitBreakerConfig, ConfigError, type ControlBudget, type ControlDecision, type ControlEvalResult, type ControlRunResult, type ControlStep, type Conversation, type ConversationDriveState, type ConversationJournal, type ConversationJournalEntry, type ConversationParticipant, type ConversationPolicy, type ConversationResult, type ConversationStreamEvent, type ConversationTurn, type CreateKnowledgeImprovementActivationExecutorOptions, type CreateProfileImprovementHarnessOptions, type D1DatabaseLike, type D1StmtLike, DEFAULT_ROUTER_BASE_URL, DELEGATED_LOOP_MODES, type DataAcquisitionPlan, type DeepReadonly, type DelegatedLoopMode, type DelegatedLoopRegistry, type DelegatedLoopResult, type DelegatedLoopRunner, type EvalRunEvent, type EvalRunGeneration, type EvalRunsExportConfig, type EvalRunsExportResult, FileConversationJournal, type HaltContext, type HaltPredicate, type HaltReason, type HaltSignal, INTELLIGENCE_WIRE_VERSION, type ImproveCandidateValidationInput, type ImproveCandidateValidator, type ImproveCodeBaseOptions, type ImproveCodeOptions, type ImproveCodeResult, type ImproveCodeRunOptions, type ImproveCost, type ImproveCustomCodeGeneratorOptions, type ImproveLineage, type ImproveMethodContext, type ImproveMethodFactory, type ImproveMethodLineage, type ImproveMethodOptions, type ImproveMethodResult, type ImproveMethodSource, type ImproveOptimizationRunOptions, type ImproveOptions, type ImproveProfileAgent, type ImproveProfileComponents, type ImproveProfileSurface, type ImproveResult, type ImproveRuntimeCodeGeneratorOptions, type ImproveScenarioPartitions, type ImproveSkillsOptions, type ImproveSurface, type ImprovementCandidate, type ImprovementCodeCandidate, type ImprovementMaterializedProfilePopulationCandidate, type ImprovementProfileCandidate, type ImprovementProfileCandidatePopulation, type ImprovementProfileCandidatePopulationAvailable, type ImprovementProfileCandidatePopulationUnavailable, type ImprovementProfilePopulationArtifactSource, type ImprovementProfilePopulationCandidate, type ImprovementProfilePopulationCandidateSource, type ImprovementProfilePopulationLineage, type ImprovementProfilePopulationLineageNode, type ImprovementProfilePopulationObservationSource, type ImprovementRefusedProfilePopulationCandidate, InMemoryConversationJournal, InMemoryRuntimeSessionStore, JudgeError, type KnowledgeImprovementActivationExecutor, type KnowledgeImprovementCandidatePair, type KnowledgeImprovementExperimentBundles, type KnowledgeImprovementJobMeasurement, type KnowledgeImprovementJobResult, type KnowledgeReadinessCheck, type KnowledgeReadinessCheckInput, type KnowledgeReadinessCheckResult, type KnowledgeReadinessDecision, type KnowledgeReadinessReport, type KnowledgeRequirement, type LoopRunnerCliArgs, type LoopRunnerCliResult, type LoopSpanNode, type McpServeSpec, type ModelInfo, NotFoundError, type OfficialGepaOptions, type OfficialOptimizerContextOptions, OfficialOptimizerUnavailableError, type OfficialSensitiveCandidateInput, type OfficialSkillOptOptions, type OpenAIChatResponseFormat, type OpenAIChatTool, type OpenAIChatToolChoice, type OtelAttribute, type OtelExportConfig, type OtelExporter, type OtelSpan, PROMPT_INSTRUCTION_COMPONENT_PREFIX, type PersonaConversationResult, type PersonaDriver, PlannerError, type ProfileImprovementHarness, type ProfileImprovementHarnessRunOptions, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, ROLLOUT_POLICY_EXTENSION, type RawTraceDistillerOptions, type ReadonlyAgentProfile, type ReflectiveGeneratorOptions, type ResearchLoopResult, type ResearchLoopRunnerOptions, type ResolvedChatModel, RetainedInteractiveAdmissionError, RetainedInteractiveBindingError, RetainedRunAdmissionError, RetainedRunDispatchBindingError, type RetryBackoff, type RetryableErrorPredicate, type RouterEnv, type RunAgentTaskOptions, type RunAgentTaskStreamOptions, type RunConversationOptions, type RunDelegatedLoopOptions, type RunKnowledgeImprovementJobOptions, type RunPersonaConfig, type RunPersonaConversationOptions, type RunRecord, type RuntimeCanonicalStreamEvent, type RuntimeDecisionEvidenceRef, type RuntimeDecisionKind, type RuntimeDecisionPoint, type RuntimeEventCollector, type RuntimeEventOtelOptions, type RuntimeHookContext, type RuntimeHookErrorContext, type RuntimeHookEvent, type RuntimeHookPhase, type RuntimeHookTarget, type RuntimeHooks, type RuntimeRunCompleteInput, type RuntimeRunCost, type RuntimeRunHandle, type RuntimeRunOptions, type RuntimeRunPersistenceAdapter, type RuntimeRunRow, RuntimeRunStateError, type RuntimeRunStatus, type RuntimeSession, type RuntimeSessionStore, type RuntimeStreamEvent, type RuntimeStreamEventCollector, type RuntimeStreamEventSink, type RuntimeStreamEventSummary, type RuntimeTelemetryOptions, type SanitizedKnowledgeReadinessReport, type SanitizedKnowledgeRequirement, type ServerSentEventOptions, type SqlAdapter, SqlConversationJournal, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, type TurnOrder, ValidationError, type Verifier, type VerifyResult, type VetoedFact, type WorktreeCheckRunner, type WorktreeLoopRunnerOptions, agenticGenerator, applyRolloutPolicyToProfile, applyRunRecordDefaults, auditLoopRunner, buildKnowledgeImprovementExperimentBundles, buildLoopOtelSpans, buildLoopSpanNodes, buildRuntimeEventOtelSpans, cleanModelId, commandVerifier, composeRuntimeHooks, createAgentKnowledgeReadinessCheck, createConversationBackend, createIterableBackend, createKnowledgeImprovementActivationExecutor, createOpenInferenceFileExporter, createOtelExporter, createProfileExecutionBackend, createProfileImprovementHarness, createRuntimeEventCollector, createRuntimeStreamEventCollector, createSandboxPromptBackend, createSupervisedKnowledgeUpdater, d1ToSqlAdapter, decideKnowledgeReadiness, defaultBuildPrompt, defineConversation, defineRuntimeHooks, exportEvalRuns, findingLines, formatSupervisedKnowledgeTask, generateSpanId, getModels, improve, isDelegatedLoopMode, knowledgeReadinessDeliverable, loopEventToOtelSpan, mcpBuildPrompt, mcpServeVerifier, mcpToolsForRuntimeMcp, mcpToolsForRuntimeMcpSubset, normalizeRolloutPolicy, notifyRuntimeDecisionPoint, notifyRuntimeHookEvent, officialGepa, officialSkillOpt, optimizerMethod, padSpanId, padTraceId, parseLoopRunnerArgv, parseRolloutPolicy, promptInstructionsProfileComponents, rawTraceDistiller, readinessServerSentEvent, reflectiveGenerator, researchLoopRunner, resolveChatModel, resolveRouterBaseUrl, runAgentTask, runAgentTaskStream, runConversation, runConversationStream, runDelegatedLoop, runKnowledgeImprovementJob, runLoopRunnerCli, runPersonaConversation, runPersonaDispatch, runSupervisedKnowledgeUpdate, runtimeStreamServerSentEvent, sanitizeAgentRuntimeEvent, sanitizeKnowledgeReadinessReport, sanitizeRuntimeStreamEvent, serializeRolloutPolicy, startRuntimeRun, strategyAuthorMethod, structuralRolloutPolicyFromProfile, toOtelAttributes, toolBuildPrompt, validateChatModelId, worktreeLoopRunner };
|
|
429
1107
|
//# sourceMappingURL=index.d.ts.map
|