@tangle-network/agent-runtime 0.300.0 → 0.306.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/{activation-DqWmWTyB.js → activation-C5wesfzd.js} +3 -3
  2. package/dist/{activation-DqWmWTyB.js.map → activation-C5wesfzd.js.map} +1 -1
  3. package/dist/{activation-Bhp8dYV5.d.ts → activation-wZ-8vOjV.d.ts} +88 -13
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{bundle-C9v5TH_H.js → bundle-C8EO05u3.js} +2 -2
  7. package/dist/{bundle-C9v5TH_H.js.map → bundle-C8EO05u3.js.map} +1 -1
  8. package/dist/candidate-execution/index.d.ts +3 -26
  9. package/dist/candidate-execution/index.js +6 -6
  10. package/dist/{coordination-driver-DzTvehd6.js → coordination-driver-yj9HPXef.js} +322 -223
  11. package/dist/coordination-driver-yj9HPXef.js.map +1 -0
  12. package/dist/{delegate-vJ2g76r6.js → delegate-KtrL9HWq.js} +5 -5
  13. package/dist/delegate-KtrL9HWq.js.map +1 -0
  14. package/dist/durable.d.ts +3 -15
  15. package/dist/durable.js +158 -124
  16. package/dist/durable.js.map +1 -1
  17. package/dist/{graph-BDQh3qry.js → graph-DcdyHbgf.js} +5 -6
  18. package/dist/graph-DcdyHbgf.js.map +1 -0
  19. package/dist/{improvement-cycle-D6cPLi6k.js → improvement-cycle-DsN-TVXR.js} +1129 -10
  20. package/dist/improvement-cycle-DsN-TVXR.js.map +1 -0
  21. package/dist/{index-sC6sl88d.d.ts → index-DflDZq_I.d.ts} +188 -748
  22. package/dist/index.d.ts +378 -12
  23. package/dist/index.js +223 -320
  24. package/dist/index.js.map +1 -1
  25. package/dist/intelligence.d.ts +5 -5
  26. package/dist/intelligence.js +7 -8
  27. package/dist/intelligence.js.map +1 -1
  28. package/dist/kernel.d.ts +4 -4
  29. package/dist/kernel.js +9 -9
  30. package/dist/{loop-runner-bin-DZglq4Cf.d.ts → loop-runner-bin-DZfRUVWy.d.ts} +3 -3
  31. package/dist/{loop-runner-bin-DQIHnCL0.js → loop-runner-bin-rVrSX5l1.js} +3 -3
  32. package/dist/{loop-runner-bin-DQIHnCL0.js.map → loop-runner-bin-rVrSX5l1.js.map} +1 -1
  33. package/dist/loop-runner-bin.d.ts +1 -1
  34. package/dist/loop-runner-bin.js +1 -1
  35. package/dist/mcp/bin.js +3 -3
  36. package/dist/mcp/index.d.ts +6 -35
  37. package/dist/mcp/index.js +311 -364
  38. package/dist/mcp/index.js.map +1 -1
  39. package/dist/model-policy-DydyWTQg.js.map +1 -1
  40. package/dist/{openai-tools-DvR82zEo.d.ts → openai-tools-YO30D2s3.d.ts} +2 -2
  41. package/dist/{prepare-CGVNMb1o.js → prepare--nWcazPr.js} +7 -13
  42. package/dist/prepare--nWcazPr.js.map +1 -0
  43. package/dist/{profile-BetOB4_Q.js → profile-h04LDjV6.js} +2 -2
  44. package/dist/{profile-BetOB4_Q.js.map → profile-h04LDjV6.js.map} +1 -1
  45. package/dist/profiles.d.ts +2 -94
  46. package/dist/profiles.js +2 -451
  47. package/dist/profiles.js.map +1 -1
  48. package/dist/{protected-model-port-CAa0t1MT.d.ts → protected-model-port-C9QtEf3y.d.ts} +2 -2
  49. package/dist/{protected-model-port-CuVHkhti.js → protected-model-port-wwalbyXM.js} +4 -4
  50. package/dist/{protected-model-port-CuVHkhti.js.map → protected-model-port-wwalbyXM.js.map} +1 -1
  51. package/dist/{provision-supervisor-IXBlLHE0.js → provision-supervisor-WxFEFQeJ.js} +14 -24
  52. package/dist/provision-supervisor-WxFEFQeJ.js.map +1 -0
  53. package/dist/{runtime-DpEt5v42.js → runtime-B9eBIyws.js} +86 -496
  54. package/dist/runtime-B9eBIyws.js.map +1 -0
  55. package/dist/{search-method-DvU-fc-f.js → search-executor-2tWr38Qw.js} +239 -1132
  56. package/dist/search-executor-2tWr38Qw.js.map +1 -0
  57. package/dist/{server-CIE8s4AN.js → server-CpKcrOPj.js} +5 -12
  58. package/dist/server-CpKcrOPj.js.map +1 -0
  59. package/dist/{stream-agent-turn-I3bb0eqF.d.ts → stream-agent-turn-B1giFgOg.d.ts} +4 -2
  60. package/dist/{substrate-UjsxukjZ.d.ts → substrate-L_sC7jCD.d.ts} +2 -2
  61. package/dist/{supervise-C5mktzrh.js → supervise-DllOHM4M.js} +206 -80
  62. package/dist/supervise-DllOHM4M.js.map +1 -0
  63. package/dist/{supervisor-CQSu5XGl.js → supervisor-gCfG6K1-.js} +1130 -1667
  64. package/dist/supervisor-gCfG6K1-.js.map +1 -0
  65. package/dist/testing.d.ts +2 -2
  66. package/dist/testing.js +14 -14
  67. package/dist/tui/index.d.ts +1 -1
  68. package/dist/tui/index.js +1 -1
  69. package/dist/{types-C73caP0U.d.ts → types-DeuEkBhI.d.ts} +167 -261
  70. package/dist/{workspace-archive-pz8YJ1fr.d.ts → workspace-streams-CpSmt3zx.d.ts} +67 -3
  71. package/dist/{workspace-streams-D5gHJdTb.js → workspace-streams-ILw0eWZ0.js} +694 -2
  72. package/dist/workspace-streams-ILw0eWZ0.js.map +1 -0
  73. package/package.json +8 -8
  74. package/skills/generate-eval/SKILL.md +1 -1
  75. package/skills/profile-authoring/SKILL.md +5 -5
  76. package/skills/supervise/SKILL.md +2 -2
  77. package/dist/coordination-driver-DzTvehd6.js.map +0 -1
  78. package/dist/delegate-vJ2g76r6.js.map +0 -1
  79. package/dist/graph-BDQh3qry.js.map +0 -1
  80. package/dist/improvement-cycle-D6cPLi6k.js.map +0 -1
  81. package/dist/prepare-CGVNMb1o.js.map +0 -1
  82. package/dist/provision-supervisor-IXBlLHE0.js.map +0 -1
  83. package/dist/runtime-DpEt5v42.js.map +0 -1
  84. package/dist/search-method-DvU-fc-f.js.map +0 -1
  85. package/dist/server-CIE8s4AN.js.map +0 -1
  86. package/dist/supervise-C5mktzrh.js.map +0 -1
  87. package/dist/supervisor-CQSu5XGl.js.map +0 -1
  88. package/dist/workspace-streams-D5gHJdTb.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- import { $a as AgentRuntimeEventSink, $t as RuntimeStreamEventCollector, Ba as RuntimeRunCost, Bt as OtelSpan, Ft as LoopSpanNode, Ga as RuntimeRunStatus, Gt as createOpenInferenceFileExporter, Ha as RuntimeRunOptions, Ht as buildLoopOtelSpans, It as OtelAttribute, Ja as AgentBackendContext, Jt as loopEventToOtelSpan, Ka as startRuntimeRun, Kt as createOtelExporter, Lt as OtelExportConfig, Qa as AgentRuntimeEvent, Qt as RuntimeEventCollector, Rt as OtelExportStats, Ua as RuntimeRunPersistenceAdapter, Ut as buildLoopSpanNodes, Va as RuntimeRunHandle, Vt as RuntimeEventOtelOptions, Wa as RuntimeRunRow, Wt as buildRuntimeEventOtelSpans, Xa as AgentExecutionBackend, Xt as padTraceId, Ya as AgentBackendInput, Yt as padSpanId, Za as AgentKnowledgeProvider, Zt as toOtelAttributes, _i as RuntimeRunStateError, an as createRuntimeEventCollector, ao as KnowledgeReadinessDecision, ci as BackendTransportError, cn as sanitizeKnowledgeReadinessReport, co as OpenAIChatToolChoice, di as NotFoundError, do as RuntimeCanonicalStreamEvent, en as RuntimeStreamEventSink, eo as AgentTaskContext, fi as PlannerError, fo as RuntimeSession, g as ExecutorFactory, gi as RetainedRunDispatchBindingError, hi as RetainedRunAdmissionError, i as Budget, in as SanitizedKnowledgeRequirement, io as BackendErrorDetail, li as ConfigError, ln as sanitizeRuntimeStreamEvent, lo as RunAgentTaskOptions, lt as SupervisedResult, mi as RetainedInteractiveBindingError, mo as RuntimeStreamEvent, nn as RuntimeTelemetryOptions, no as AgentTaskSpec, oi as AgentEvalError, on as createRuntimeStreamEventCollector, oo as OpenAIChatResponseFormat, pi as RetainedInteractiveAdmissionError, po as RuntimeSessionStore, qa as AgentAdapter, qt as generateSpanId, rn as SanitizedKnowledgeReadinessReport, ro as AgentTaskStatus, si as AgentEvalErrorCode, sn as sanitizeAgentRuntimeEvent, so as OpenAIChatTool, tn as RuntimeStreamEventSummary, to as AgentTaskRunResult, ui as JudgeError, uo as RunAgentTaskStreamOptions, vi as ValidationError, za as RuntimeRunCompleteInput, zt as OtelExporter } from "./types-C73caP0U.js";
1
+ import { $a as RuntimeSessionStore, $r as RetainedInteractiveAdmissionError, $t as RuntimeStreamEventSink, Aa as RuntimeRunRow, Ba as AgentTaskContext, Bt as RuntimeEventOtelOptions, Da as RuntimeRunHandle, Ea as RuntimeRunCost, Fa as AgentBackendInput, Ft as OtelAttribute, Ga as KnowledgeReadinessDecision, Gt as createOtelExporter, Ha as AgentTaskSpec, Ht as buildLoopSpanNodes, Ia as AgentExecutionBackend, It as OtelExportConfig, Ja as OpenAIChatToolChoice, Jr as BackendTransportError, Jt as padSpanId, Ka as OpenAIChatResponseFormat, Kr as AgentEvalError, Kt as generateSpanId, La as AgentKnowledgeProvider, Lt as OtelExportStats, Ma as startRuntimeRun, Na as AgentAdapter, Oa as RuntimeRunOptions, Pa as AgentBackendContext, Pt as LoopSpanNode, Qa as RuntimeSession, Qr as PlannerError, Qt as RuntimeStreamEventCollector, Ra as AgentRuntimeEvent, Rt as OtelExporter, Ta as RuntimeRunCompleteInput, Ua as AgentTaskStatus, Ut as buildRuntimeEventOtelSpans, Va as AgentTaskRunResult, Vt as buildLoopOtelSpans, Wa as BackendErrorDetail, Wt as createOpenInferenceFileExporter, Xa as RunAgentTaskStreamOptions, Xr as JudgeError, Xt as toOtelAttributes, Ya as RunAgentTaskOptions, Yr as ConfigError, Yt as padTraceId, Za as RuntimeCanonicalStreamEvent, Zr as NotFoundError, Zt as RuntimeEventCollector, an as createRuntimeStreamEventCollector, cn as sanitizeRuntimeStreamEvent, ei as RetainedInteractiveBindingError, en as RuntimeStreamEventSummary, eo as RuntimeStreamEvent, g as ExecutorFactory, i as Budget, ii as ValidationError, in as createRuntimeEventCollector, ja as RuntimeRunStatus, ka as RuntimeRunPersistenceAdapter, lt as SupervisedResult, ni as RetainedRunDispatchBindingError, nn as SanitizedKnowledgeReadinessReport, on as sanitizeAgentRuntimeEvent, qa as OpenAIChatTool, qr as AgentEvalErrorCode, qt as loopEventToOtelSpan, ri as RuntimeRunStateError, rn as SanitizedKnowledgeRequirement, sn as sanitizeKnowledgeReadinessReport, ti as RetainedRunAdmissionError, tn as RuntimeTelemetryOptions, za as AgentRuntimeEventSink, zt as OtelSpan } from "./types-DeuEkBhI.js";
2
2
  import { i as SurfaceImprovementEdit } from "./improvement-adapter-D5gwwoXQ.js";
3
3
  import { o as ImprovementProposalSource } from "./types-zWfqDjeL.js";
4
- import { $m as DeliverableSpec, Ah as BackendCallPolicy, Ch as ConversationTurn, Dh as HaltSignal, Eh as HaltReason, Hs as IsolatedCheckBoxEvidence, Mh as RetryBackoff, Nh as RetryableErrorPredicate, Oh as RunConversationOptions, Sh as ConversationStreamEvent, Th as HaltPredicate, Tl as SupervisorProfile, Ws as IsolatedCheckResult, _h as Conversation, bh as ConversationPolicy, ch as D1StmtLike, dh as d1ToSqlAdapter, fh as ConversationJournal, gh as AuthSource, hh as InMemoryConversationJournal, jh as CircuitBreakerConfig, kh as TurnOrder, lh as SqlAdapter, mh as FileConversationJournal, nr as StructuralRolloutPolicy, ph as ConversationJournalEntry, sh as D1DatabaseLike, uh as SqlConversationJournal, vh as ConversationDriveState, wh as HaltContext, xh as ConversationResult, yh as ConversationParticipant, zc as SuperviseOptions } from "./index-sC6sl88d.js";
4
+ import { Bm as d1ToSqlAdapter, Es as IsolatedCheckBoxEvidence, Gn as StructuralRolloutPolicy, Lm as D1DatabaseLike, Os as IsolatedCheckResult, Rm as D1StmtLike, hc as SuperviseOptions, km as DeliverableSpec, tl as SupervisorProfile, zm as SqlAdapter } from "./index-DflDZq_I.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 { E as AgentCandidateOutputArtifactPort } from "./workspace-archive-pz8YJ1fr.js";
7
- import { f as ExecutorConfig, fr as Redactor, ln as WorktreeCheckRunner } from "./stream-agent-turn-I3bb0eqF.js";
8
- import { $ as ImproveSearchMethod, A as ImproveCodeBaseOptions, At as commandVerifier, B as ImproveMethodOptions, C as ProfileTrainer, Ct as AgenticGeneratorOptions, D as createCommandProfileTrainer, Dt as Verifier, E as TrainingDatasetDocument, Et as AgenticGeneratorShotReceipt, F as ImproveCustomCodeGeneratorOptions, G as ImproveProfileAgent, H as ImproveMethodSource, I as ImproveLineage, J as ImproveResult, K as ImproveProfileComponents, L as ImproveMethodContext, M as ImproveCodeResult, Mt as CandidateGenerator, N as ImproveCodeRunOptions, O as ImproveCandidateValidationInput, Ot as VerifyResult, P as ImproveCost, Q as ImproveSearchIdentity, R as ImproveMethodFactory, S as ImproveTrainingResult, St as AgenticGeneratorExecutorForWorktree, T as TrainingBoundaryResult, Tt as AgenticGeneratorShotExecution, U as ImproveOptimizationRunOptions, V as ImproveMethodResult, W as ImproveOptions, X as ImproveScenarioPartitions, Y as ImproveRuntimeCodeGeneratorOptions, Z as ImproveSearchAgent, _ as SearchMethodOptions, _t as routerLane, at as ImprovementCodeCandidate, b as ControlledTrainingCommand, bt as DeepReadonly, ct as SearchCellContext, dt as SearchLaneKind, et as ImproveSearchOptions, ft as SearchLaneOptions, g as improve, gt as isSearchEnvironmentFault, ht as dedicatedLane, i as AgentImprovementActivationTransition, it as ImprovementCandidate, j as ImproveCodeOptions, jt as defaultBuildPrompt, k as ImproveCandidateValidator, kt as agenticGenerator, lt as SearchEnvironmentFault, mt as SharedBoxSearchLane, n as AgentImprovementActivationResultStore, nt as ImproveSkillsOptions, ot as ImprovementProfileCandidate, pt as SearchTraceOptions, q as ImproveProfileSurface, rt as ImproveSurface, st as SearchDispatchContext, t as AgentImprovementActivationReconciliation, tt as ImproveSearchResult, ut as SearchLane, v as searchMethod, vt as sharedBoxLane, w as ProfileTrainerRequest, wt as AgenticGeneratorShotDisposition, x as ImproveTrainingOptions, xt as ReadonlyAgentProfile, y as CheckpointServingPort, yt as subscriptionLane, z as ImproveMethodLineage } from "./activation-Bhp8dYV5.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-DZglq4Cf.js";
10
- import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "./openai-tools-DvR82zEo.js";
6
+ import { P as AgentCandidateOutputArtifactPort } from "./workspace-streams-CpSmt3zx.js";
7
+ import { f as ExecutorConfig, fr as Redactor, ln as WorktreeCheckRunner } from "./stream-agent-turn-B1giFgOg.js";
8
+ import { $ as ImproveScenarioPartitions, A as createCommandProfileTrainer, At as AgenticGeneratorShotReceipt, B as ImproveMethodContext, C as ControlledTrainingCommand, Ct as subscriptionLane, D as ProfileTrainerRequest, Dt as AgenticGeneratorOptions, E as ProfileTrainer, Et as AgenticGeneratorExecutorForWorktree, F as ImproveCodeResult, Ft as defaultBuildPrompt, G as ImproveMethodSource, H as ImproveMethodLineage, I as ImproveCodeRunOptions, It as CandidateGenerator, J as ImproveProfileAgent, K as ImproveOptimizationRunOptions, L as ImproveCost, M as ImproveCandidateValidator, Mt as VerifyResult, N as ImproveCodeBaseOptions, Nt as agenticGenerator, O as TrainingBoundaryResult, Ot as AgenticGeneratorShotDisposition, P as ImproveCodeOptions, Pt as commandVerifier, Q as ImproveRuntimeCodeGeneratorOptions, R as ImproveCustomCodeGeneratorOptions, S as CheckpointServingPort, St as sharedBoxLane, T as ImproveTrainingResult, Tt as ReadonlyAgentProfile, U as ImproveMethodOptions, V as ImproveMethodFactory, W as ImproveMethodResult, X as ImproveProfileSurface, Y as ImproveProfileComponents, Z as ImproveResult, _ as SearchMethodOptions, _t as SearchTraceOptions, at as ImproveSkillsOptions, b as SearchImprovementDecision, bt as isSearchEnvironmentFault, ct as ImprovementCodeCandidate, dt as SearchPromotion, et as ImproveSearchAgent, ft as SearchCellContext, g as improve, gt as SearchLaneOptions, ht as SearchLaneKind, i as AgentImprovementActivationTransition, it as ImproveSearchResult, j as ImproveCandidateValidationInput, jt as Verifier, k as TrainingDatasetDocument, kt as AgenticGeneratorShotExecution, lt as ImprovementProfileCandidate, mt as SearchLane, n as AgentImprovementActivationResultStore, nt as ImproveSearchMethod, ot as ImproveSurface, pt as SearchEnvironmentFault, q as ImproveOptions, rt as ImproveSearchOptions, st as ImprovementCandidate, t as AgentImprovementActivationReconciliation, tt as ImproveSearchIdentity, ut as SearchDispatchContext, v as searchMethod, vt as SharedBoxSearchLane, w as ImproveTrainingOptions, wt as DeepReadonly, x as decideSearchImprovement, xt as routerLane, y as DecideSearchImprovementOptions, yt as dedicatedLane, z as ImproveLineage } from "./activation-wZ-8vOjV.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-DZfRUVWy.js";
10
+ import { n as mcpToolsForRuntimeMcpSubset, t as mcpToolsForRuntimeMcp } from "./openai-tools-YO30D2s3.js";
11
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";
12
+ import { AgentProfile as AgentProfile$1, ControlBudget, ControlDecision, ControlEvalResult, ControlEvalResult as ControlEvalResult$1, ControlRunResult, ControlStep, CustomTokenPricing, DataAcquisitionPlan, KnowledgeReadinessReport, KnowledgeReadinessReport as KnowledgeReadinessReport$1, KnowledgeRequirement, MaximumCharge, ProposalFinding, RunRecord, RunRecord as RunRecord$1 } from "@tangle-network/agent-eval";
13
13
  import { ZodType } from "zod";
14
- import { GepaOptimizationMethodConfig, ProfileDispatchFn, Scenario, SkillOptOptimizationMethodConfig } from "@tangle-network/agent-eval/campaign";
15
- import { MutableSurface, Scenario as Scenario$1, SelfImproveOptions } from "@tangle-network/agent-eval/contract";
14
+ import { GepaOptimizationMethodConfig, MutableSurface, ProfileDispatchFn, Scenario, SearchScoredCell, SkillOptOptimizationMethodConfig, SurfaceProposer } from "@tangle-network/agent-eval/campaign";
15
+ import { MutableSurface as MutableSurface$1, Scenario as Scenario$1, SelfImproveOptions } from "@tangle-network/agent-eval/contract";
16
16
  import { BuildEvalKnowledgeBundleOptions, KnowledgeBaseQualityOptions, KnowledgeImprovementOptions, KnowledgeImprovementResult, KnowledgeReadinessSpec, PromoteKnowledgeCandidateOptions, RagKnowledgeUpdateResult } from "@tangle-network/agent-knowledge";
17
17
  //#region src/backends.d.ts
18
18
  /** Wrap any custom async-iterable stream into a typed `AgentExecutionBackend`. @stable */
@@ -49,6 +49,307 @@ declare function createProfileExecutionBackend(options: {
49
49
  executor: ExecutorFactory<unknown>;
50
50
  }): AgentExecutionBackend;
51
51
  //#endregion
52
+ //#region src/conversation/call-policy.d.ts
53
+ /**
54
+ *
55
+ * Per-call resilience policy for participant backends: deadline, retry with
56
+ * backoff, and a circuit breaker. Each policy is applied *around* a single
57
+ * turn's backend invocation, not across the whole conversation — the
58
+ * conversation-level credit cap and `maxTurns` bound the broader run.
59
+ *
60
+ * Deadlines abort the underlying backend stream via `AbortSignal` linkage so
61
+ * the OpenAI/SDK clients tear down their HTTP request cleanly instead of
62
+ * leaking sockets. Retries replay the same logical turn (same `turnId`) so
63
+ * any caching gateway can dedupe. Circuit breakers are *per participant*: A's
64
+ * failures don't open B's breaker.
65
+ *
66
+ * @stable
67
+ */
68
+ /** Pure judgment of whether an error is worth retrying. Defaults: TimeoutError, AbortError, fetch-level network errors. */
69
+ type RetryableErrorPredicate = (err: unknown) => boolean;
70
+ /** Backoff between attempts. Constant ms, or `(attempt: 1-indexed) => ms`. */
71
+ type RetryBackoff = number | ((attempt: number) => number);
72
+ /** Circuit-breaker tuning. `failuresToOpen` consecutive failures opens it; closed only after `cooldownMs`. */
73
+ interface CircuitBreakerConfig {
74
+ failuresToOpen: number;
75
+ cooldownMs: number;
76
+ }
77
+ interface BackendCallPolicy {
78
+ /** Per-attempt wall clock limit. Exceeding fires an AbortSignal and is treated as a retryable failure. */
79
+ perAttemptDeadlineMs?: number;
80
+ /** Number of retries after the first attempt; total attempts = 1 + maxRetries. Default 0. */
81
+ maxRetries?: number;
82
+ /** Backoff between attempts. Default 250ms with jitter. */
83
+ retryBackoffMs?: RetryBackoff;
84
+ /** Custom retry classifier. Defaults to retrying transport failures and retryable HTTP statuses. */
85
+ isRetryable?: RetryableErrorPredicate;
86
+ /** Circuit breaker that opens after N consecutive failures per participant. */
87
+ circuitBreaker?: CircuitBreakerConfig;
88
+ }
89
+ //#endregion
90
+ //#region src/conversation/headers.d.ts
91
+ /**
92
+ * Header bag carried through `AgentBackendContext.propagatedHeaders` so
93
+ * backends that opt in can merge them into their outbound HTTP requests.
94
+ * Distinct from `buildForwardHeaders` so callers can attach extra
95
+ * non-protocol headers (e.g. tracing) without colliding.
96
+ */
97
+ type PropagatedHeaders = Readonly<Record<string, string>>;
98
+ //#endregion
99
+ //#region src/conversation/types.d.ts
100
+ /** @stable */
101
+ interface ConversationParticipant {
102
+ /**
103
+ * Stable name used as the speaker label in the transcript. Must be unique
104
+ * within a `Conversation`.
105
+ */
106
+ name: string;
107
+ /**
108
+ * Backend that runs this participant's turn. Reuses the existing
109
+ * `AgentExecutionBackend` contract from `runAgentTaskStream`, so an iterable,
110
+ * sandbox, or profile-backed Runtime executor works through the same runner.
111
+ */
112
+ backend: AgentExecutionBackend;
113
+ /**
114
+ * Optional human label for traces / dashboards. Distinct from `name`, which
115
+ * is the addressing key.
116
+ */
117
+ label?: string;
118
+ /**
119
+ * Optional per-participant override of the conversation's default
120
+ * `callPolicy`. Use to tighten the deadline or raise the retry budget for
121
+ * a participant known to be slow or flaky.
122
+ */
123
+ callPolicy?: BackendCallPolicy;
124
+ /**
125
+ * Who pays for THIS participant's outbound calls?
126
+ *
127
+ * - `'forward-user'` (default) — propagate the caller's
128
+ * `X-Tangle-Forwarded-Authorization` so the downstream gateway bills the
129
+ * original user. Right for pass-through agents that aggregate/route
130
+ * without taking economic risk.
131
+ * - `'agent-owned'` — DO NOT forward the user's auth; the participant's
132
+ * backend uses its own credentials (typically a sk-tan-AGENT or x402
133
+ * wallet baked into the backend at construction). Downstream charges
134
+ * land on the agent, not the user. Right for resold-bundle agents that
135
+ * take margin between their inbound price and their sub-agent costs.
136
+ * - `(state) => AuthSource` — per-turn / per-condition decision, e.g. base
137
+ * sub-services are agent-owned but premium add-ons forward the user.
138
+ *
139
+ * The agent's own credentials live on its caller-owned backend or
140
+ * profile-bound Runtime executor; this field is purely about *whether to
141
+ * also forward the user's identity downstream*.
142
+ */
143
+ authSource?: AuthSource;
144
+ }
145
+ /** @stable */
146
+ type AuthSource = 'forward-user' | 'agent-owned' | ((state: ConversationDriveState) => 'forward-user' | 'agent-owned');
147
+ /** @stable */
148
+ type TurnOrder = 'alternate' | 'round-robin' | ((state: ConversationDriveState) => number);
149
+ /** @stable */
150
+ interface ConversationDriveState {
151
+ transcript: readonly ConversationTurn[];
152
+ turnIndex: number;
153
+ spentCreditsCents: number;
154
+ }
155
+ /** @stable */
156
+ interface HaltContext extends ConversationDriveState {
157
+ lastTurn: ConversationTurn;
158
+ }
159
+ /** @stable */
160
+ interface HaltSignal {
161
+ halted: true;
162
+ reason: string;
163
+ }
164
+ /** @stable */
165
+ type HaltPredicate = (ctx: HaltContext) => boolean | HaltSignal | Promise<boolean | HaltSignal>;
166
+ /** @stable */
167
+ type HaltReason = {
168
+ kind: 'max_turns';
169
+ turns: number;
170
+ } | {
171
+ kind: 'max_credits';
172
+ spentCents: number;
173
+ capCents: number;
174
+ } | {
175
+ kind: 'predicate';
176
+ reason: string;
177
+ } | {
178
+ kind: 'abort';
179
+ } | {
180
+ kind: 'participant_error';
181
+ participant: string;
182
+ message: string;
183
+ };
184
+ /** @stable */
185
+ interface ConversationPolicy {
186
+ /** Hard cap on speaker-turns. Each call into a participant's backend counts as 1. */
187
+ maxTurns: number;
188
+ /**
189
+ * Hard cap on aggregate credit spend across all participants, in cents.
190
+ * Computed by summing `llm_call.costUsd` from every participant's stream.
191
+ * Unset (`undefined`) means no credit ceiling — the run is bounded only by
192
+ * `maxTurns` and `haltOn`.
193
+ */
194
+ maxCreditsCents?: number;
195
+ /**
196
+ * Speaker selection. Defaults to `'alternate'` for two-participant
197
+ * conversations and `'round-robin'` for any other arity.
198
+ */
199
+ turnOrder?: TurnOrder;
200
+ /**
201
+ * Optional convergence / content-based halt. Called after every turn ends;
202
+ * returning truthy stops the loop with `{ kind: 'predicate', ... }`.
203
+ */
204
+ haltOn?: HaltPredicate;
205
+ /**
206
+ * Default per-turn resilience policy applied to every participant call
207
+ * (deadline, retries, circuit breaker). Individual participants may
208
+ * override via `ConversationParticipant.callPolicy`.
209
+ */
210
+ defaultCallPolicy?: BackendCallPolicy;
211
+ }
212
+ /** @stable */
213
+ interface ConversationTurn {
214
+ index: number;
215
+ speaker: string;
216
+ /**
217
+ * Deterministic turn identifier — stable across retries of the same logical
218
+ * turn so caching gateways and trace backends can dedupe. Shape:
219
+ * `${runId}.t${index}.${speakerSlug}`.
220
+ */
221
+ turnId: string;
222
+ /** Backend session used for this turn. Present on turns recorded by session-aware runners. */
223
+ sessionId?: string;
224
+ text: string;
225
+ /**
226
+ * Aggregated backend usage for this turn alone. Populated from any
227
+ * `llm_call` stream events the backend emitted; `undefined` when the
228
+ * backend reports no usage.
229
+ */
230
+ usage?: {
231
+ tokensIn?: number;
232
+ tokensOut?: number;
233
+ costUsd?: number;
234
+ latencyMs?: number;
235
+ model?: string;
236
+ };
237
+ /**
238
+ * Number of attempts that ran before this turn committed. `1` is the
239
+ * common case; higher means the call policy retried after transient
240
+ * failures.
241
+ */
242
+ attempts: number;
243
+ startedAt: string;
244
+ endedAt: string;
245
+ }
246
+ /** @stable */
247
+ interface Conversation {
248
+ participants: readonly ConversationParticipant[];
249
+ policy: ConversationPolicy;
250
+ }
251
+ /** @stable */
252
+ interface RunConversationOptions {
253
+ /** First message kicking off the conversation. Routes to the first speaker. */
254
+ seed: string;
255
+ /**
256
+ * Optional run identifier for cross-participant trace correlation and
257
+ * deterministic turn ids. Auto-generated when omitted. A conversation is
258
+ * in-process: durable multi-turn work belongs to Agent App's turn store or
259
+ * to `supervise` with a run context.
260
+ */
261
+ runId?: string;
262
+ /** Cancellation signal — aborts mid-stream and halts with `{ kind: 'abort' }`. */
263
+ signal?: AbortSignal;
264
+ /**
265
+ * Event sink for per-turn micro-events. Distinct from the result transcript:
266
+ * the sink fires for every text-delta, every turn-start/end, and the
267
+ * conversation-start/end markers. Used to drive SSE / dashboard updates
268
+ * without waiting for the conversation to finish.
269
+ */
270
+ onEvent?: (event: ConversationStreamEvent) => void | Promise<void>;
271
+ /**
272
+ * Stores each participant's backend session. The runner keeps an in-memory
273
+ * store for one invocation when omitted. Backends implementing `resume`
274
+ * continue their provider session; other backends receive the full transcript.
275
+ */
276
+ sessionStore?: RuntimeSessionStore;
277
+ /**
278
+ * Headers to forward verbatim to every participant backend call (gateway
279
+ * propagation: `X-Tangle-Forwarded-Authorization`, run/turn correlation,
280
+ * depth counter). Backends opt in by reading `propagatedHeaders` from
281
+ * their `AgentBackendContext`; backends that ignore the field still work.
282
+ */
283
+ propagatedHeaders?: PropagatedHeaders;
284
+ /**
285
+ * Inbound depth at the point this driver was invoked. The runner
286
+ * increments it on every outbound participant call; gateways refuse at
287
+ * `DEFAULT_MAX_DEPTH`. Default 0 (origin caller).
288
+ */
289
+ inboundDepth?: number;
290
+ /**
291
+ * Parent turn id when this conversation is *inside* another turn (i.e. the
292
+ * driver is itself a participant via `createConversationBackend`). The
293
+ * runner stamps each outbound call with this as `X-Tangle-Parent-TurnId`
294
+ * so trace stitching survives nested orchestration.
295
+ */
296
+ parentTurnId?: string;
297
+ }
298
+ /** @stable */
299
+ interface ConversationResult {
300
+ runId: string;
301
+ transcript: ConversationTurn[];
302
+ turns: number;
303
+ spentCreditsCents: number;
304
+ halted: HaltReason;
305
+ durationMs: number;
306
+ startedAt: string;
307
+ endedAt: string;
308
+ }
309
+ /** @stable */
310
+ type ConversationStreamEvent = {
311
+ type: 'conversation_start';
312
+ runId: string;
313
+ participants: readonly string[];
314
+ seed: string;
315
+ timestamp: string;
316
+ } | {
317
+ type: 'turn_start';
318
+ runId: string;
319
+ index: number;
320
+ speaker: string;
321
+ turnId: string;
322
+ attempt: number;
323
+ timestamp: string;
324
+ } | {
325
+ type: 'turn_text_delta';
326
+ runId: string;
327
+ index: number;
328
+ speaker: string;
329
+ turnId: string;
330
+ text: string;
331
+ timestamp?: string;
332
+ } | {
333
+ type: 'turn_retry';
334
+ runId: string;
335
+ index: number;
336
+ speaker: string;
337
+ turnId: string;
338
+ attempt: number;
339
+ reason: string;
340
+ timestamp: string;
341
+ } | {
342
+ type: 'turn_end';
343
+ runId: string;
344
+ turn: ConversationTurn;
345
+ timestamp: string;
346
+ } | {
347
+ type: 'conversation_end';
348
+ runId: string;
349
+ result: ConversationResult;
350
+ timestamp: string;
351
+ };
352
+ //#endregion
52
353
  //#region src/conversation/conversation-backend.d.ts
53
354
  /** Adapt a multi-participant conversation into the standard execution backend contract. */
54
355
  declare function createConversationBackend(options: {
@@ -370,13 +671,78 @@ interface ReflectiveGeneratorOptions {
370
671
  /** Cheap no-sandbox `CandidateGenerator` (the `shots=1` setting): draft surface edits via the improvement adapter and apply them as one coherent candidate. */
371
672
  declare function reflectiveGenerator(opts: ReflectiveGeneratorOptions): CandidateGenerator;
372
673
  //#endregion
674
+ //#region src/improvement/reflective-profile-proposer.d.ts
675
+ /** One chat completion, made by the caller's client. */
676
+ type ReflectiveProposerChat = (request: {
677
+ readonly messages: ReadonlyArray<{
678
+ readonly role: 'system' | 'user';
679
+ readonly content: string;
680
+ }>;
681
+ readonly maxOutputTokens: number;
682
+ /** Forward it as the provider's idempotency key, so a retried request is not billed twice. */
683
+ readonly callId: string;
684
+ readonly signal: AbortSignal;
685
+ }) => Promise<ReflectiveProposerReply>;
686
+ interface ReflectiveProposerReply {
687
+ /** The model's visible reply. */
688
+ readonly content: string;
689
+ /** Billed tokens as the provider reported them, or null when it reported none:
690
+ * the call's cost is then unknown and counts at its declared maximum. */
691
+ readonly usage: {
692
+ readonly inputTokens: number;
693
+ readonly outputTokens: number;
694
+ readonly reasoningTokens?: number;
695
+ readonly cachedTokens?: number;
696
+ } | null;
697
+ /** The model the provider says served the call. Default `model`. */
698
+ readonly model?: string;
699
+ }
700
+ /** One parent, as `evidence` receives it. */
701
+ interface ReflectiveProposerParent {
702
+ /** The parent's node; null for a proposal outside a search. */
703
+ readonly nodeId: string | null;
704
+ readonly surface: MutableSurface;
705
+ /** The parent's scored train cells. Unscored cells are absent, never zero. */
706
+ readonly trainCells: readonly SearchScoredCell[];
707
+ }
708
+ interface ReflectiveProfileProposerOptions {
709
+ /** Names the proposer in the search's identity and its receipts. Default
710
+ * `reflective-profile`. */
711
+ readonly kind?: string;
712
+ /** The model `chat` calls, recorded on its receipt. */
713
+ readonly model: string;
714
+ readonly chat: ReflectiveProposerChat;
715
+ /** Rates that price the call and its declared maximum. */
716
+ readonly pricing: CustomTokenPricing;
717
+ /** Output tokens the call may bill. Default 16,000. */
718
+ readonly maxOutputTokens?: number;
719
+ /**
720
+ * What the surface is and how it is measured, as the model should read it:
721
+ * the agent, its task, the score, and what transfers to unseen tasks. Runtime
722
+ * adds the method, the operator, the parents and the output contract.
723
+ */
724
+ readonly frame: string;
725
+ /**
726
+ * The caller's train-only evidence for one parent: for example each train
727
+ * task, its expected answer, the parent's answer and its error. Return text
728
+ * sections; Runtime places them under the parent. Never read selection or
729
+ * test data here. Default: each scored train unit and its score.
730
+ */
731
+ readonly evidence?: (parent: ReflectiveProposerParent) => Promise<readonly string[]> | readonly string[];
732
+ /** The longest surface text the proposer returns, in characters; a longer
733
+ * reply proposes nothing. Default 12,000. */
734
+ readonly maxSurfaceChars?: number;
735
+ }
736
+ /** Build the maintained reflective proposer for a profile text surface. */
737
+ declare function reflectiveProfileProposer(options: ReflectiveProfileProposerOptions): SurfaceProposer<ProposalFinding>;
738
+ //#endregion
373
739
  //#region src/improvement/rollout-policy.d.ts
374
740
  /** The profile extensions namespace the policy persists under. */
375
741
  declare const ROLLOUT_POLICY_EXTENSION = "structural-rollout";
376
742
  /** Parse a serialized policy surface. Returns `undefined` for non-strings,
377
743
  * malformed JSON, or values outside the policy invariants. Unknown fields are
378
744
  * dropped; supported optional fields are preserved. */
379
- declare function parseRolloutPolicy(surface: MutableSurface): StructuralRolloutPolicy | undefined;
745
+ declare function parseRolloutPolicy(surface: MutableSurface$1): StructuralRolloutPolicy | undefined;
380
746
  /** Normalize an untyped policy bag (a parsed surface or a profile extension) into
381
747
  * a full `StructuralRolloutPolicy`, defaults merged. Returns `undefined` when any
382
748
  * present dial violates the policy invariants (mirrors `resolvePolicy`: integer
@@ -672,5 +1038,5 @@ declare function readinessServerSentEvent(report: KnowledgeReadinessReport$1, op
672
1038
  /** Serialize a `RuntimeStreamEvent` as a Server-Sent Event string. @stable */
673
1039
  declare function runtimeStreamServerSentEvent(event: RuntimeStreamEvent, options?: RuntimeTelemetryOptions & ServerSentEventOptions): string;
674
1040
  //#endregion
675
- 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 CheckpointServingPort, type CircuitBreakerConfig, ConfigError, type ControlBudget, type ControlDecision, type ControlEvalResult, type ControlRunResult, type ControlStep, type ControlledTrainingCommand, 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, FileConversationJournal, type HaltContext, type HaltPredicate, type HaltReason, type HaltSignal, 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 ImproveSearchAgent, type ImproveSearchIdentity, type ImproveSearchMethod, type ImproveSearchOptions, type ImproveSearchResult, type ImproveSkillsOptions, type ImproveSurface, type ImproveTrainingOptions, type ImproveTrainingResult, type ImprovementCandidate, type ImprovementCodeCandidate, type ImprovementProfileCandidate, 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 OtelExportStats, type OtelExporter, type OtelSpan, PROMPT_INSTRUCTION_COMPONENT_PREFIX, type PersonaConversationResult, type PersonaDriver, PlannerError, type ProfileImprovementHarness, type ProfileImprovementHarnessRunOptions, type ProfileImprovementHarnessTrainOptions, type ProfileTrainer, type ProfileTrainerRequest, 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 SearchCellContext, type SearchDispatchContext, SearchEnvironmentFault, type SearchLane, type SearchLaneKind, type SearchLaneOptions, type SearchMethodOptions, type SearchTraceOptions, type ServerSentEventOptions, type SharedBoxSearchLane, type SqlAdapter, SqlConversationJournal, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, type TrainingBoundaryResult, type TrainingDatasetDocument, 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, createCommandProfileTrainer, createConversationBackend, createIterableBackend, createKnowledgeImprovementActivationExecutor, createOpenInferenceFileExporter, createOtelExporter, createProfileExecutionBackend, createProfileImprovementHarness, createRuntimeEventCollector, createRuntimeStreamEventCollector, createSandboxPromptBackend, createSupervisedKnowledgeUpdater, d1ToSqlAdapter, decideKnowledgeReadiness, dedicatedLane, defaultBuildPrompt, defineConversation, defineRuntimeHooks, findingLines, formatSupervisedKnowledgeTask, generateSpanId, getModels, improve, isDelegatedLoopMode, isSearchEnvironmentFault, isolatedCheckBoxEvidenceSchema, isolatedCheckResultSchema, knowledgeReadinessDeliverable, loopEventToOtelSpan, mcpBuildPrompt, mcpServeVerifier, mcpToolsForRuntimeMcp, mcpToolsForRuntimeMcpSubset, normalizeRolloutPolicy, notifyRuntimeDecisionPoint, notifyRuntimeHookEvent, officialGepa, officialSkillOpt, optimizerMethod, padSpanId, padTraceId, parseLoopRunnerArgv, parseRolloutPolicy, promptInstructionsProfileComponents, rawTraceDistiller, readinessServerSentEvent, reflectiveGenerator, researchLoopRunner, resolveChatModel, resolveRouterBaseUrl, routerLane, runAgentTask, runAgentTaskStream, runConversation, runConversationStream, runDelegatedLoop, runKnowledgeImprovementJob, runLoopRunnerCli, runPersonaConversation, runPersonaDispatch, runSupervisedKnowledgeUpdate, runtimeStreamServerSentEvent, sanitizeAgentRuntimeEvent, sanitizeKnowledgeReadinessReport, sanitizeRuntimeStreamEvent, searchMethod, serializeRolloutPolicy, sharedBoxLane, startRuntimeRun, strategyAuthorMethod, structuralRolloutPolicyFromProfile, subscriptionLane, toOtelAttributes, toolBuildPrompt, validateChatModelId, worktreeLoopRunner };
1041
+ 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 CheckpointServingPort, type CircuitBreakerConfig, ConfigError, type ControlBudget, type ControlDecision, type ControlEvalResult, type ControlRunResult, type ControlStep, type ControlledTrainingCommand, type Conversation, type ConversationDriveState, 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 DecideSearchImprovementOptions, type DeepReadonly, type DelegatedLoopMode, type DelegatedLoopRegistry, type DelegatedLoopResult, type DelegatedLoopRunner, type HaltContext, type HaltPredicate, type HaltReason, type HaltSignal, 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 ImproveSearchAgent, type ImproveSearchIdentity, type ImproveSearchMethod, type ImproveSearchOptions, type ImproveSearchResult, type ImproveSkillsOptions, type ImproveSurface, type ImproveTrainingOptions, type ImproveTrainingResult, type ImprovementCandidate, type ImprovementCodeCandidate, type ImprovementProfileCandidate, 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 OtelExportStats, type OtelExporter, type OtelSpan, PROMPT_INSTRUCTION_COMPONENT_PREFIX, type PersonaConversationResult, type PersonaDriver, PlannerError, type ProfileImprovementHarness, type ProfileImprovementHarnessRunOptions, type ProfileImprovementHarnessTrainOptions, type ProfileTrainer, type ProfileTrainerRequest, RESEARCH_SUPERVISOR_SYSTEM_PROMPT, ROLLOUT_POLICY_EXTENSION, type RawTraceDistillerOptions, type ReadonlyAgentProfile, type ReflectiveGeneratorOptions, type ReflectiveProfileProposerOptions, type ReflectiveProposerChat, type ReflectiveProposerParent, type ReflectiveProposerReply, 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 SearchCellContext, type SearchDispatchContext, SearchEnvironmentFault, type SearchImprovementDecision, type SearchLane, type SearchLaneKind, type SearchLaneOptions, type SearchMethodOptions, type SearchPromotion, type SearchTraceOptions, type ServerSentEventOptions, type SharedBoxSearchLane, type SqlAdapter, type SupervisedKnowledgeUpdateInput, type SupervisedKnowledgeUpdateOptions, type SupervisedKnowledgeUpdateResult, type SupervisedKnowledgeUpdater, type TrainingBoundaryResult, type TrainingDatasetDocument, 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, createCommandProfileTrainer, createConversationBackend, createIterableBackend, createKnowledgeImprovementActivationExecutor, createOpenInferenceFileExporter, createOtelExporter, createProfileExecutionBackend, createProfileImprovementHarness, createRuntimeEventCollector, createRuntimeStreamEventCollector, createSandboxPromptBackend, createSupervisedKnowledgeUpdater, d1ToSqlAdapter, decideKnowledgeReadiness, decideSearchImprovement, dedicatedLane, defaultBuildPrompt, defineConversation, defineRuntimeHooks, findingLines, formatSupervisedKnowledgeTask, generateSpanId, getModels, improve, isDelegatedLoopMode, isSearchEnvironmentFault, isolatedCheckBoxEvidenceSchema, isolatedCheckResultSchema, knowledgeReadinessDeliverable, loopEventToOtelSpan, mcpBuildPrompt, mcpServeVerifier, mcpToolsForRuntimeMcp, mcpToolsForRuntimeMcpSubset, normalizeRolloutPolicy, notifyRuntimeDecisionPoint, notifyRuntimeHookEvent, officialGepa, officialSkillOpt, optimizerMethod, padSpanId, padTraceId, parseLoopRunnerArgv, parseRolloutPolicy, promptInstructionsProfileComponents, rawTraceDistiller, readinessServerSentEvent, reflectiveGenerator, reflectiveProfileProposer, researchLoopRunner, resolveChatModel, resolveRouterBaseUrl, routerLane, runAgentTask, runAgentTaskStream, runConversation, runConversationStream, runDelegatedLoop, runKnowledgeImprovementJob, runLoopRunnerCli, runPersonaConversation, runPersonaDispatch, runSupervisedKnowledgeUpdate, runtimeStreamServerSentEvent, sanitizeAgentRuntimeEvent, sanitizeKnowledgeReadinessReport, sanitizeRuntimeStreamEvent, searchMethod, serializeRolloutPolicy, sharedBoxLane, startRuntimeRun, strategyAuthorMethod, structuralRolloutPolicyFromProfile, subscriptionLane, toOtelAttributes, toolBuildPrompt, validateChatModelId, worktreeLoopRunner };
676
1042
  //# sourceMappingURL=index.d.ts.map