@tangle-network/agent-runtime 0.289.2 → 0.291.0

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 (61) hide show
  1. package/dist/{activation-ClgRxMQ9.js → activation-BPZL1WCG.js} +2 -2
  2. package/dist/{activation-ClgRxMQ9.js.map → activation-BPZL1WCG.js.map} +1 -1
  3. package/dist/{activation-BH2oPn09.d.ts → activation-D8DOMMZc.d.ts} +3 -3
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-CrsMoYmK.js → coordination-driver-CUnF7gfN.js} +3 -2
  7. package/dist/coordination-driver-CUnF7gfN.js.map +1 -0
  8. package/dist/{delegate-BtA5G0Zi.js → delegate-B0j4915d.js} +2 -2
  9. package/dist/{delegate-BtA5G0Zi.js.map → delegate-B0j4915d.js.map} +1 -1
  10. package/dist/durable.d.ts +2 -2
  11. package/dist/durable.js +2 -2
  12. package/dist/{graph-9xDBu--o.js → graph-ByPZb_xc.js} +5 -5
  13. package/dist/{graph-9xDBu--o.js.map → graph-ByPZb_xc.js.map} +1 -1
  14. package/dist/{improvement-cycle-Rq1wYTxJ.js → improvement-cycle-DipoyAM3.js} +4 -4
  15. package/dist/{improvement-cycle-Rq1wYTxJ.js.map → improvement-cycle-DipoyAM3.js.map} +1 -1
  16. package/dist/{index-w7xjlAcL.d.ts → index-D-5e8mss.d.ts} +16 -18
  17. package/dist/index.d.ts +7 -7
  18. package/dist/index.js +9 -9
  19. package/dist/intelligence.d.ts +3 -3
  20. package/dist/intelligence.js +4 -4
  21. package/dist/kernel.d.ts +4 -4
  22. package/dist/kernel.js +10 -10
  23. package/dist/{loop-runner-bin-DxZdgqD5.d.ts → loop-runner-bin-Bkw-_LkG.d.ts} +3 -3
  24. package/dist/{loop-runner-bin-D6vu3zKo.js → loop-runner-bin-DhPBdCux.js} +3 -3
  25. package/dist/{loop-runner-bin-D6vu3zKo.js.map → loop-runner-bin-DhPBdCux.js.map} +1 -1
  26. package/dist/loop-runner-bin.d.ts +1 -1
  27. package/dist/loop-runner-bin.js +1 -1
  28. package/dist/mcp/bin.js +3 -3
  29. package/dist/mcp/index.d.ts +5 -5
  30. package/dist/mcp/index.js +5 -5
  31. package/dist/{model-policy-CA5d1YUP.js → model-policy-DydyWTQg.js} +186 -2
  32. package/dist/model-policy-DydyWTQg.js.map +1 -0
  33. package/dist/{openai-tools-CWp4nc4r.d.ts → openai-tools-De6m7S4Y.d.ts} +2 -2
  34. package/dist/profiles.d.ts +2 -2
  35. package/dist/profiles.js +1 -1
  36. package/dist/{provision-supervisor-43_bsO7n.js → provision-supervisor-DvEpuocs.js} +9 -26
  37. package/dist/provision-supervisor-DvEpuocs.js.map +1 -0
  38. package/dist/{runtime-Coi8gH_G.js → runtime-Ba7oK4M1.js} +9 -9
  39. package/dist/{runtime-Coi8gH_G.js.map → runtime-Ba7oK4M1.js.map} +1 -1
  40. package/dist/{search-method-Dooo6JxE.js → search-method-Cs6SLt8I.js} +87 -49
  41. package/dist/search-method-Cs6SLt8I.js.map +1 -0
  42. package/dist/{server-xIUtcV4x.js → server-CVRFM3ZF.js} +3 -3
  43. package/dist/{server-xIUtcV4x.js.map → server-CVRFM3ZF.js.map} +1 -1
  44. package/dist/{stream-agent-turn-DJqcRoxP.d.ts → stream-agent-turn-n3kOukD_.d.ts} +22 -48
  45. package/dist/{substrate-C9cGwDJ5.d.ts → substrate-DFWtsdNI.d.ts} +2 -2
  46. package/dist/{supervise-B_GnmIw0.js → supervise-dYioyGT-.js} +27 -7
  47. package/dist/supervise-dYioyGT-.js.map +1 -0
  48. package/dist/{supervisor-CDsr_sZD.js → supervisor-DpUCJtKC.js} +162 -696
  49. package/dist/supervisor-DpUCJtKC.js.map +1 -0
  50. package/dist/testing.d.ts +2 -2
  51. package/dist/testing.js +12 -12
  52. package/dist/tui/index.d.ts +1 -1
  53. package/dist/tui/index.js +1 -1
  54. package/dist/{types-BPO06pPv.d.ts → types-BFcLI8Ge.d.ts} +5 -1
  55. package/package.json +5 -5
  56. package/dist/coordination-driver-CrsMoYmK.js.map +0 -1
  57. package/dist/model-policy-CA5d1YUP.js.map +0 -1
  58. package/dist/provision-supervisor-43_bsO7n.js.map +0 -1
  59. package/dist/search-method-Dooo6JxE.js.map +0 -1
  60. package/dist/supervise-B_GnmIw0.js.map +0 -1
  61. package/dist/supervisor-CDsr_sZD.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { $a as RuntimeStreamEvent, C as ExecutorToolCall, Ca as Validator, Ha as AgentTaskStatus, Pn as ExecutorProgress, Qi as ExecCtx, Tn as TraceSource, Ua as BackendErrorDetail, X as Scope, Y as Runtime, b as ExecutorRegistry, ba as SandboxClient, f as ExecutorCancellation, fa as LoopTokenUsage, g as ExecutorFactory, gt as UsageEvent, p as ExecutorCancellationRequest, rt as Spend, s as DefaultVerdict, v as ExecutorNodeContext, vr as UnavailablePausePolicy, y as ExecutorProgressEvent } from "./types-BPO06pPv.js";
1
+ import { $a as RuntimeStreamEvent, C as ExecutorToolCall, Ca as Validator, Ha as AgentTaskStatus, Pn as ExecutorProgress, Qi as ExecCtx, Tn as TraceSource, Ua as BackendErrorDetail, X as Scope, Y as Runtime, b as ExecutorRegistry, ba as SandboxClient, f as ExecutorCancellation, fa as LoopTokenUsage, g as ExecutorFactory, gt as UsageEvent, p as ExecutorCancellationRequest, rt as Spend, s as DefaultVerdict, v as ExecutorNodeContext, vr as UnavailablePausePolicy, y as ExecutorProgressEvent } from "./types-BFcLI8Ge.js";
2
2
  import { c as AgentCandidateArtifactPort, t as AgentCandidateWorkspaceArchiveLimits } from "./workspace-archive-DpyZV2Cj.js";
3
- import { AgentCandidateWorkspaceSnapshotEvidence, AgentExactRunControlRef, AgentProfile, AgentProfileMcpServer, AgentProfileValidationResult, HarnessType, ReasoningEffort, StreamEvent } from "@tangle-network/agent-interface";
3
+ import { AgentCandidateWorkspaceSnapshotEvidence, AgentExactRunControlRef, AgentProfile, AgentProfileMcpServer, HarnessType, ReasoningEffort, StreamEvent } from "@tangle-network/agent-interface";
4
4
  import { AgentRunOutcome } from "@tangle-network/sandbox/runtime";
5
5
  import { ChildProcess } from "node:child_process";
6
6
  import { WorkspacePlanReceipt } from "@tangle-network/agent-profile-materialize";
7
7
  import { BackendType, CreateSandboxOptions, PromptOptions, Sandbox, SandboxEvent, SandboxInstance } from "@tangle-network/sandbox";
8
- import { AgentEnvironment, AgentEnvironment as AgentEnvironment$1, AgentEnvironmentCapabilities, AgentEnvironmentCapabilities as AgentEnvironmentCapabilities$1, AgentEnvironmentEvent, AgentEnvironmentEvent as AgentEnvironmentEvent$1, AgentEnvironmentProvider, AgentEnvironmentProvider as AgentEnvironmentProvider$1, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentProfileRef as AgentProfileRef$1, AgentSession, AgentSessionRef, AgentSessionStatus as AgentSessionStatus$1, AgentTurnInput, AgentTurnInput as AgentTurnInput$1, AgentTurnResult as AgentTurnResult$2, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, CreateAgentEnvironmentInput as CreateAgentEnvironmentInput$1, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from "@tangle-network/agent-interface/environment-provider";
8
+ import { AgentEnvironment, AgentEnvironment as AgentEnvironment$1, AgentEnvironmentCapabilities, AgentEnvironmentCapabilities as AgentEnvironmentCapabilities$1, AgentEnvironmentEvent, AgentEnvironmentEvent as AgentEnvironmentEvent$1, AgentEnvironmentProvider, AgentEnvironmentProvider as AgentEnvironmentProvider$1, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentSession, AgentSessionRef, AgentSessionStatus as AgentSessionStatus$1, AgentTurnInput, AgentTurnInput as AgentTurnInput$1, AgentTurnResult as AgentTurnResult$2, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, CreateAgentEnvironmentInput as CreateAgentEnvironmentInput$1, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from "@tangle-network/agent-interface/environment-provider";
9
9
  //#region src/redact.d.ts
10
10
  /**
11
11
  * Redaction for values that may leave the Runtime process. The built-in
@@ -405,6 +405,21 @@ interface RouterConfig extends RouterTransportConfig {
405
405
  */
406
406
  stream?: boolean;
407
407
  }
408
+ /** Exact buffered HTTP evidence. Authentication and cookie headers are excluded. */
409
+ interface RouterResponseReceipt {
410
+ readonly endpoint: string;
411
+ readonly callId: string;
412
+ readonly attempt: number;
413
+ readonly startedAt: string;
414
+ readonly endedAt: string;
415
+ readonly status: number | null;
416
+ readonly error?: {
417
+ readonly name: string;
418
+ readonly message: string;
419
+ };
420
+ readonly headers: Readonly<Record<string, string>>;
421
+ readonly body: string | null;
422
+ }
408
423
  interface ToolSpec {
409
424
  type: 'function';
410
425
  function: {
@@ -1044,49 +1059,6 @@ interface ProviderAsSandboxClientOptions {
1044
1059
  /** Adapt a neutral environment provider to the `SandboxClient` interface used by existing loop paths.
1045
1060
  * @experimental */
1046
1061
  declare function providerAsSandboxClient(provider: AgentEnvironmentProvider, options?: ProviderAsSandboxClientOptions): SandboxClient;
1047
- /** Options for wrapping the current Tangle sandbox client as an environment provider.
1048
- * @experimental */
1049
- interface SandboxClientProviderOptions {
1050
- name?: string;
1051
- defaultBackend?: BackendType;
1052
- capabilities?: AgentEnvironmentCapabilities | (() => AgentEnvironmentCapabilities | Promise<AgentEnvironmentCapabilities>);
1053
- validateProfile?: (profile: AgentProfileRef) => AgentProfileValidationResult | Promise<AgentProfileValidationResult>;
1054
- /** Resolve a named profile before calling Sandbox, which accepts inline profiles only. */
1055
- resolveProfile?: (profileId: string) => AgentProfile | Promise<AgentProfile>;
1056
- /** Map portable creation into a supported SDK or deployment contract. Runtime attachments
1057
- * require this explicit mapper until the maintained Sandbox SDK transports them. */
1058
- mapCreateInput?: (input: CreateAgentEnvironmentInput) => CreateSandboxOptions;
1059
- /**
1060
- * `idleTimeoutSeconds` sent on every Sandbox create this adapter makes (a mapped create, a
1061
- * `mapCreateInput` result, or a fork), unless those create options already name one. Defaults to
1062
- * {@link DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS}; a positive whole number of seconds.
1063
- */
1064
- idleTimeoutSeconds?: number;
1065
- }
1066
- /**
1067
- * The idle timeout this adapter sends when nothing else names one: 1,800 seconds.
1068
- *
1069
- * Sandbox substitutes no value of its own: an omitted field falls back to the platform's global
1070
- * idle timeout, documented as 30 minutes unless an operator changed it, and Runtime sent none. Idle
1071
- * means inactivity to Sandbox, which suspends the sandbox (the container stops; the workspace is
1072
- * kept) rather than deleting it. The SDK does not define inactivity further. A request in flight
1073
- * counts as activity: a Discovery Lab seat created with `idleTimeoutSeconds: 1800` ran one request
1074
- * to 2,252 seconds, ended by a per-request cap, not by idling (fleet-launch-2026-08-22).
1075
- *
1076
- * The value restates the documented default, so it can tighten a longer operator setting but never
1077
- * loosen the default. It is 3.8 times the longest gap between frames recorded across a healthy
1078
- * fleet run (469 seconds, same report), and a supervised provider child is observed through an open
1079
- * stream for its whole turn. It is a backstop for a process that dies holding an environment; the
1080
- * settlement barrier releases retained environments itself (`Executor.releaseRetained`). It does
1081
- * nothing on a driver with a create/delete-only lifecycle, which the SDK says skips suspension.
1082
- */
1083
- declare const DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS = 1800;
1084
- /**
1085
- * Adapt a `SandboxClient` into the shared `AgentEnvironmentProvider` contract.
1086
- * The provider declares the public SDK contract before it creates an environment.
1087
- * Each environment exposes interactive methods only when its deployment declares every required capability.
1088
- * @experimental */
1089
- declare function sandboxClientAsProvider(client: SandboxClient, options?: SandboxClientProviderOptions): AgentEnvironmentProvider;
1090
1062
  /**
1091
1063
  * What one provider-executed turn settles on: the visible answer plus the event archive the
1092
1064
  * environment streamed. It is the value a `ProviderExecutorOptions.validator` scores.
@@ -2242,6 +2214,8 @@ interface RouterToolsSeam {
2242
2214
  executeToolCall: (name: string, args: Record<string, unknown>, task: unknown) => Promise<string>;
2243
2215
  /** Exact conversation to continue. Runtime validates its system message against the profile. */
2244
2216
  initialMessages?: ReadonlyArray<Readonly<Record<string, unknown>>>;
2217
+ /** Persist each buffered HTTP attempt, including failed responses, before the next turn. */
2218
+ onProviderResponse?: (receipt: RouterResponseReceipt) => void | Promise<void>;
2245
2219
  /** Observe the detached final conversation for session persistence. */
2246
2220
  onMessages?: (messages: ReadonlyArray<Readonly<Record<string, unknown>>>) => void | Promise<void>;
2247
2221
  /** Online observer of each tool step — the seam a `DetectorMonitor` taps to watch the live pipe
@@ -2433,5 +2407,5 @@ declare function streamAgentTurn(backend: AgentTurnBackend, input: AgentTurnInpu
2433
2407
  */
2434
2408
  declare function collectAgentTurn(stream: AsyncIterable<RuntimeStreamEvent>): Promise<CollectedAgentTurn>;
2435
2409
  //#endregion
2436
- export { decodeHarnessUsage as $, DEFAULT_PEER_MAIL_LIMITS as $n, ResourceRequest as $t, createInbox as A, createWorktree as An, AgentEnvironmentProvider$1 as At, secretEnvOfMcpServer as B, harnessSupportsReasoningEffort as Bn, AgentTurnResult$2 as Bt, SteerableSandboxArgs as C, CreateWorktreeOptions as Cn, resolveRedactor as Cr, mapSandboxToolEvent as Ct, Inbox as D, RemoveWorktreeOptions as Dn, AgentEnvironment$1 as Dt, AuthorityInboxMessage as E, GitRunner as En, sumSandboxUsage as Et, ResolvedMcpServerLaunch as F, DEFAULT_LOCAL_HARNESS as Fn, AgentEnvironmentSummary as Ft, CodexRolloutStoreRef as G, ToolSpec as Gn, ExecRequest as Gt, CodexRolloutIdentity as H, parseCodexTokenUsage as Hn, CheckpointRequest as Ht, envKeyProvider as I, LOCAL_HARNESSES as In, AgentProfileRef$1 as It, addHarnessUsage as J, ToolLoopCompaction as Jn, PlacementInfo as Jt, CodexRolloutTurn as K, ToolLoopCallContext as Kn, ExecResult as Kt, mcpSecretEnvMetadataKey as L, LocalHarness as Ln, AgentSession as Lt, BridgeModelCredential as M, CodexExecutionEvidence as Mn, AgentEnvironmentProviderRegistry as Mt, BridgeSeam as N, CodexExecutionPolicy as Nn, AgentEnvironmentQuery as Nt, InboxMessage as O, WorktreeHandle as On, AgentEnvironmentCapabilities$1 as Ot, KeyProvider as P, CodexTokenUsage as Pn, AgentEnvironmentStatus as Pt, HarnessUsage as Q, AUTHORITY_MARKERS as Qn, ProviderPromptOptions as Qt, resolveMcpServerLaunch as R, LocalHarnessResult as Rn, AgentSessionRef as Rt, SandboxSteeringOptions as S, WorktreeProfileMaterializationReceipt as Sn, defaultRedactor as Sr, mapSandboxEvent as St, createSteerableSandboxSession as T, DiffResult as Tn, sandboxProgressEvents as Tt, CodexRolloutSession as U, runLocalHarness as Un, CreateAgentEnvironmentInput$1 as Ut, CodexForkBoundary as V, localHarnessExecutable as Vn, CheckpointRef as Vt, CodexRolloutStoreReader as W, RouterTransportConfig as Wn, DEFAULT_SANDBOX_IDLE_TIMEOUT_SECONDS as Wt, harnessUsageIsEmpty as X, ToolLoopMessageRecord as Xn, ProviderExecutorOptions as Xt, createCodexRolloutStoreReader as Y, ToolLoopCompactionOptions as Yn, ProviderAsSandboxClientOptions as Yt, readCodexRolloutSession as Z, ToolLoopToolCall as Zn, ProviderLeafOut as Zt, cliInPlaceExecutor as _, ProviderPlacement as _n, JsonRpcResponse as _r, SandboxUsageLedger as _t, StreamAgentTurnOptions as a, resolveAgentEnvironmentProvider as an, PeerMailOutcome as ar, SharedBoxPlacement as at, createExecutorRegistry as b, WorktreeCommandResult as bn, McpTransport as br, createSandboxUsageLedger as bt, CliInPlaceSeam as c, SandboxControlClient as cn, PeerMailSendInput as cr, SharedBoxStats as ct, CliWorktreeSeam as d, ProviderWorkspaceCaptureProvenance as dn, claimsAuthority as dr, sharedBoxRefusal as dt, SandboxClientProviderOptions as en, PEER_MAIL_WIRE_KEY as er, DEFAULT_SHARED_BOX_RESOURCES as et, ExecutorConfig as f, ProviderWorkspaceCaptureReceipt as fn, createPeerMailbox as fr, sharedWorkerClientName as ft, SandboxSeam as g, ProviderWorkspaceRetentionPort as gn, JsonRpcMessage as gr, SandboxToolPartState as gt, RouterToolsSeam as h, ProviderWorkspaceRetentionContext as hn, peerMailVerbNames as hr, SandboxServedBackend as ht, CollectedAgentTurn as i, providerAsSandboxClient as in, PeerMailLimits as ir, SharedBoxHandle as it, BridgeHarnessStore as j, removeWorktree as jn, AgentEnvironmentProviderRef as jt, PeerInboxMessage as k, captureWorktreeDiff as kn, AgentEnvironmentEvent$1 as kt, CliSeam as l, createTangleSandboxExactProcessProvider as ln, PeerMailbox as lr, SharedWorkerIdentity as lt, RouterSeam as m, ProviderWorkspaceEntryMetadata as mn, peerMailTools as mr, SandboxOutputMarker as mt, AgentTurnInput$1 as n, createAgentEnvironmentProviderRegistry as nn, PeerMailEvent as nr, ROUTER_CLIENT_HEADER as nt, collectAgentTurn as o, sandboxClientAsProvider as on, PeerMailReadout as or, SharedBoxPlacementOptions as ot, ProviderSeam as p, ProviderWorkspaceCaptureResult as pn, isPeerMailEnvelope as pr, SandboxLeafOut as pt, CodexStoreDelta as q, ToolLoopChat as qn, ForkRequest as qt, AgentTurnUsage as r, providerAsExecutor as rn, PeerMailKind as rr, SharedBoxCloseReceipt as rt, streamAgentTurn as s, CreateTangleSandboxExactProcessProviderOptions as sn, PeerMailRefusal as sr, SharedBoxProcess as st, AgentTurnBackend as t, WorkspaceRequest as tn, PeerMailEnvelope as tr, DEFAULT_SHARED_BOX_WORKERS as tt, CliWorktreeBridgeSeam as u, ProviderWorkspaceAttemptProvenance as un, PeerMailboxOptions as ur, sharedBoxPlacement as ut, cliWorktreeExecutor as v, InPlaceHarnessResult as vn, McpToolAnnotations as vr, assertSandboxServedModel as vt, SteerableSandboxSession as w, DiffOptions as wn, sandboxEventServedBackend as wt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as x, WorktreeHarnessResult as xn, Redactor as xr, extractLlmCallEvent as xt, createExecutor as y, WorktreeCheckRunner as yn, McpToolDescriptor as yr, createSandboxToolPartState as yt, resolveSecretEnv as z, RunLocalHarnessOptions as zn, AgentSessionStatus$1 as zt };
2437
- //# sourceMappingURL=stream-agent-turn-DJqcRoxP.d.ts.map
2410
+ export { decodeHarnessUsage as $, PeerMailEnvelope as $n, WorkspaceRequest as $t, createInbox as A, CodexExecutionPolicy as An, AgentEnvironmentProvider$1 as At, secretEnvOfMcpServer as B, runLocalHarness as Bn, AgentTurnResult$2 as Bt, SteerableSandboxArgs as C, GitRunner as Cn, mapSandboxToolEvent as Ct, Inbox as D, createWorktree as Dn, AgentEnvironment$1 as Dt, AuthorityInboxMessage as E, captureWorktreeDiff as En, sumSandboxUsage as Et, ResolvedMcpServerLaunch as F, LocalHarnessResult as Fn, AgentEnvironmentSummary as Ft, CodexRolloutStoreRef as G, ToolLoopChat as Gn, ExecResult as Gt, CodexRolloutIdentity as H, RouterTransportConfig as Hn, CheckpointRequest as Ht, envKeyProvider as I, RunLocalHarnessOptions as In, AgentProfileRef as It, addHarnessUsage as J, ToolLoopMessageRecord as Jn, ProviderAsSandboxClientOptions as Jt, CodexRolloutTurn as K, ToolLoopCompaction as Kn, ForkRequest as Kt, mcpSecretEnvMetadataKey as L, harnessSupportsReasoningEffort as Ln, AgentSession as Lt, BridgeModelCredential as M, DEFAULT_LOCAL_HARNESS as Mn, AgentEnvironmentProviderRegistry as Mt, BridgeSeam as N, LOCAL_HARNESSES as Nn, AgentEnvironmentQuery as Nt, InboxMessage as O, removeWorktree as On, AgentEnvironmentCapabilities$1 as Ot, KeyProvider as P, LocalHarness as Pn, AgentEnvironmentStatus as Pt, HarnessUsage as Q, PEER_MAIL_WIRE_KEY as Qn, ResourceRequest as Qt, resolveMcpServerLaunch as R, localHarnessExecutable as Rn, AgentSessionRef as Rt, SandboxSteeringOptions as S, DiffResult as Sn, mapSandboxEvent as St, createSteerableSandboxSession as T, WorktreeHandle as Tn, sandboxProgressEvents as Tt, CodexRolloutSession as U, ToolSpec as Un, CreateAgentEnvironmentInput$1 as Ut, CodexForkBoundary as V, RouterResponseReceipt as Vn, CheckpointRef as Vt, CodexRolloutStoreReader as W, ToolLoopCallContext as Wn, ExecRequest as Wt, harnessUsageIsEmpty as X, AUTHORITY_MARKERS as Xn, ProviderLeafOut as Xt, createCodexRolloutStoreReader as Y, ToolLoopToolCall as Yn, ProviderExecutorOptions as Yt, readCodexRolloutSession as Z, DEFAULT_PEER_MAIL_LIMITS as Zn, ProviderPromptOptions as Zt, cliInPlaceExecutor as _, WorktreeCommandResult as _n, McpToolDescriptor as _r, SandboxUsageLedger as _t, StreamAgentTurnOptions as a, SandboxControlClient as an, PeerMailRefusal as ar, SharedBoxPlacement as at, createExecutorRegistry as b, CreateWorktreeOptions as bn, defaultRedactor as br, createSandboxUsageLedger as bt, CliInPlaceSeam as c, ProviderWorkspaceCaptureProvenance as cn, PeerMailboxOptions as cr, SharedBoxStats as ct, CliWorktreeSeam as d, ProviderWorkspaceEntryMetadata as dn, isPeerMailEnvelope as dr, sharedBoxRefusal as dt, createAgentEnvironmentProviderRegistry as en, PeerMailEvent as er, DEFAULT_SHARED_BOX_RESOURCES as et, ExecutorConfig as f, ProviderWorkspaceRetentionContext as fn, peerMailTools as fr, sharedWorkerClientName as ft, SandboxSeam as g, WorktreeCheckRunner as gn, McpToolAnnotations as gr, SandboxToolPartState as gt, RouterToolsSeam as h, InPlaceHarnessResult as hn, JsonRpcResponse as hr, SandboxServedBackend as ht, CollectedAgentTurn as i, CreateTangleSandboxExactProcessProviderOptions as in, PeerMailReadout as ir, SharedBoxHandle as it, BridgeHarnessStore as j, CodexTokenUsage as jn, AgentEnvironmentProviderRef as jt, PeerInboxMessage as k, CodexExecutionEvidence as kn, AgentEnvironmentEvent$1 as kt, CliSeam as l, ProviderWorkspaceCaptureReceipt as ln, claimsAuthority as lr, SharedWorkerIdentity as lt, RouterSeam as m, ProviderPlacement as mn, JsonRpcMessage as mr, SandboxOutputMarker as mt, AgentTurnInput$1 as n, providerAsSandboxClient as nn, PeerMailLimits as nr, ROUTER_CLIENT_HEADER as nt, collectAgentTurn as o, createTangleSandboxExactProcessProvider as on, PeerMailSendInput as or, SharedBoxPlacementOptions as ot, ProviderSeam as p, ProviderWorkspaceRetentionPort as pn, peerMailVerbNames as pr, SandboxLeafOut as pt, CodexStoreDelta as q, ToolLoopCompactionOptions as qn, PlacementInfo as qt, AgentTurnUsage as r, resolveAgentEnvironmentProvider as rn, PeerMailOutcome as rr, SharedBoxCloseReceipt as rt, streamAgentTurn as s, ProviderWorkspaceAttemptProvenance as sn, PeerMailbox as sr, SharedBoxProcess as st, AgentTurnBackend as t, providerAsExecutor as tn, PeerMailKind as tr, DEFAULT_SHARED_BOX_WORKERS as tt, CliWorktreeBridgeSeam as u, ProviderWorkspaceCaptureResult as un, createPeerMailbox as ur, sharedBoxPlacement as ut, cliWorktreeExecutor as v, WorktreeHarnessResult as vn, McpTransport as vr, assertSandboxServedModel as vt, SteerableSandboxSession as w, RemoveWorktreeOptions as wn, sandboxEventServedBackend as wt, DEFAULT_SANDBOX_STEERING_MAX_TURNS as x, DiffOptions as xn, resolveRedactor as xr, extractLlmCallEvent as xt, createExecutor as y, WorktreeProfileMaterializationReceipt as yn, Redactor as yr, createSandboxToolPartState as yt, resolveSecretEnv as z, parseCodexTokenUsage as zn, AgentSessionStatus$1 as zt };
2411
+ //# sourceMappingURL=stream-agent-turn-n3kOukD_.d.ts.map
@@ -1,4 +1,4 @@
1
- import { Ca as Validator, Yi as AgentRunSpec, Zi as Driver, va as OutputAdapter } from "./types-BPO06pPv.js";
1
+ import { Ca as Validator, Yi as AgentRunSpec, Zi as Driver, va as OutputAdapter } from "./types-BFcLI8Ge.js";
2
2
  import { AgentProfile } from "@tangle-network/agent-interface";
3
3
  //#region src/profiles/coder.d.ts
4
4
  /**
@@ -281,4 +281,4 @@ interface UiFinding {
281
281
  }
282
282
  //#endregion
283
283
  export { CoderTask as _, UiFindingSeverity as a, KnowledgeUpdate as c, ResearchSource as d, ResearchTask as f, researcherProfile as g, multiHarnessResearcherFanout as h, UiFindingScreenshot as i, MultiHarnessResearcherFanoutOptions as l, createResearcherValidator as m, UI_LENSES as n, UiLens as o, ResearcherProfileOptions as p, UiFinding as r, KnowledgeItem as s, UI_FINDING_SEVERITIES as t, ResearchOutput as u, coderTaskToPrompt as v };
284
- //# sourceMappingURL=substrate-C9cGwDJ5.d.ts.map
284
+ //# sourceMappingURL=substrate-DFWtsdNI.d.ts.map
@@ -1,9 +1,9 @@
1
- import { A as driverExecutorFactory, Aa as withTimeout, Ai as worktreeCliProfileMaterialization, Ar as persistHarnessTranscript, B as recordScopeOwnerDriverAttempt, Ba as teardownExecutor, Bt as WORKER_TRACE_PROPAGATION, C as createContinuationKeeper, Dr as runAbortable, Ei as renderUnsupported, En as routerBrain, Er as linkAbort, F as beginScopeOwnerAttempt, Fn as resolveAgentEnvironmentProvider, Gi as runtimeOwnedDriveHarnessProviderEvidence, H as recordScopeOwnerPause, Hn as registerRetainedExecutorPreparation, Ii as attestRuntimeOwnedScopeOwner, Ji as runtimeOwnedExecutorProviderEvidence, Ki as runtimeOwnedExecutorExecutionBinding, Kr as generateSpanId, L as deriveNodeExecutionIdentity, Ma as addResourceSpend, Mi as prepareJsonlAppend, Mr as contentAddress, Mt as createExecutor, Na as resourceTelemetry, Ni as readCommittedJsonLines, Oi as unsupportedProfileDimensions, Ot as bindReusableExecutorExecutionId, P as assertRecursiveReservationPolicy, Pa as withBudgetResources, Pt as snapshotExecutorConfig, R as meterRuntimeOwnedAccounting, Ra as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Rt as createRouterTranscript, Si as promptModelProfileMaterialization, Ta as sleep, U as restoreScopeOwnerAcceptedExecution, Ui as providerAttemptEvidence, Un as retainedExecutorSeamKey, V as recordScopeOwnerMaterialization, Va as teardownSurfaces, W as scopeOwnerExecutorNodeContext, Wi as recordRuntimeOwnedDriveHarnessProviderEvidence, Wr as createOtelExporter, Xi as runtimeOwnedScopeOwnerRuntime, Xr as toOtelAttributes, Yi as runtimeOwnedPendingExecutorMaterialization, Yt as createInbox, _ as CheckUnavailableError, _a as addSpend, _i as controlProfileMaterialization, ar as parseWorkerToolTraceArtifact, at as reconcileScopeRetainedOwnerEnvironment, b as bestComposite, bi as profileMaterializationAxes$1, c as runTree, ct as scopeRetainedOwnerResourceReader, et as bindScopeRetainedOwnerEnvironmentId, f as runDriverWithRetry, fn as bridgeRuntimeAttachmentsKey, fr as meterUsageEvent, gi as assertProfileMaterialization, gr as errMessage, h as CONTINUATIONS_DIR, hr as spendFromUsageTotals, i as bestDelivered, it as prepareScopeRetainedOwnerTask, j as isDriverSpec, ja as zeroSpend, ji as isNoEntError, jr as readHarnessTranscript, k as driverChild, ka as unmeteredSpend, kt as captureReusableExecutorConfig, lt as scopeRetainedOwnerRestorePoint, n as createRootHandle, na as detachedSnapshot, nt as consumeScopeRetainedOwnerResult, on as bridgeAdmissionRefusal, ot as scopeRetainedOwnerContext, p as summarizeDriverAttempts, pn as bridgeStopSignalKey, pr as newUsageTotals, qi as runtimeOwnedExecutorMaterialization, r as createSupervisor, rt as noteScopeRetainedOwnerCoordination, s as runFinalizer, sn as bridgeModelRouteRefusal, sr as executorFailure, st as scopeRetainedOwnerPriorSpend, tt as bindScopeRetainedOwnerProvider, u as HarnessTurnFailedError, ur as assertValidBudget, ut as scopeRetainedOwnerResult, v as admitContinuationPolicy, vi as defineProfileMaterializationContract, wr as RunCancellationReason, x as checkVerdictOf, xi as promptControlProfileMaterialization, yi as fullProfileMaterialization, z as meterRuntimeOwnedProviderAttempt, zi as inheritRuntimeOwnedExecutorAttestation } from "./supervisor-CDsr_sZD.js";
1
+ import { A as driverExecutorFactory, Aa as withBudgetResources, B as recordScopeOwnerDriverAttempt, Bi as recordRuntimeOwnedDriveHarnessProviderEvidence, Br as createOtelExporter, Bt as WORKER_TRACE_PROPAGATION, C as createContinuationKeeper, Cr as runAbortable, Da as zeroSpend, Di as isNoEntError, Dr as readHarnessTranscript, Ea as withTimeout, Ei as worktreeCliProfileMaterialization, En as routerBrain, Er as persistHarnessTranscript, F as beginScopeOwnerAttempt, Fi as inheritRuntimeOwnedExecutorAttestation, Gi as runtimeOwnedPendingExecutorMaterialization, H as recordScopeOwnerPause, Hi as runtimeOwnedExecutorExecutionBinding, Hr as generateSpanId, Ia as teardownExecutor, Ki as runtimeOwnedScopeOwnerRuntime, Kr as toOtelAttributes, L as deriveNodeExecutionIdentity, La as teardownSurfaces, Mi as attestRuntimeOwnedScopeOwner, Mn as resolveAgentEnvironmentProvider, Mt as createExecutor, Oa as addResourceSpend, Oi as prepareJsonlAppend, Or as contentAddress, Ot as bindReusableExecutorExecutionId, P as assertRecursiveReservationPolicy, Pa as DEFAULT_SUCCESSFUL_SHUTDOWN_MS, Pt as snapshotExecutorConfig, Qi as detachedSnapshot, R as meterRuntimeOwnedAccounting, Rn as registerRetainedExecutorPreparation, Rt as createRouterTranscript, Si as renderUnsupported, Sr as linkAbort, Ta as unmeteredSpend, U as restoreScopeOwnerAcceptedExecution, Ui as runtimeOwnedExecutorMaterialization, V as recordScopeOwnerMaterialization, Vi as runtimeOwnedDriveHarnessProviderEvidence, W as scopeOwnerExecutorNodeContext, Wi as runtimeOwnedExecutorProviderEvidence, Yt as createInbox, _ as CheckUnavailableError, _i as promptControlProfileMaterialization, at as reconcileScopeRetainedOwnerEnvironment, b as bestComposite, br as RunCancellationReason, c as runTree, cr as meterUsageEvent, ct as scopeRetainedOwnerResourceReader, dr as spendFromUsageTotals, et as bindScopeRetainedOwnerEnvironmentId, f as runDriverWithRetry, fi as assertProfileMaterialization, fn as bridgeRuntimeAttachmentsKey, fr as errMessage, gi as profileMaterializationAxes$1, h as CONTINUATIONS_DIR, hi as fullProfileMaterialization, i as bestDelivered, it as prepareScopeRetainedOwnerTask, j as isDriverSpec, k as driverChild, ka as resourceTelemetry, ki as readCommittedJsonLines, kt as captureReusableExecutorConfig, lr as newUsageTotals, lt as scopeRetainedOwnerRestorePoint, mi as defineProfileMaterializationContract, n as createRootHandle, nt as consumeScopeRetainedOwnerResult, on as bridgeAdmissionRefusal, or as assertValidBudget, ot as scopeRetainedOwnerContext, p as summarizeDriverAttempts, pa as addSpend, pi as controlProfileMaterialization, pn as bridgeStopSignalKey, r as createSupervisor, rr as executorFailure, rt as noteScopeRetainedOwnerCoordination, s as runFinalizer, sn as bridgeModelRouteRefusal, st as scopeRetainedOwnerPriorSpend, tr as parseWorkerToolTraceArtifact, tt as bindScopeRetainedOwnerProvider, u as HarnessTurnFailedError, ut as scopeRetainedOwnerResult, v as admitContinuationPolicy, vi as promptModelProfileMaterialization, wi as unsupportedProfileDimensions, x as checkVerdictOf, xa as sleep, z as meterRuntimeOwnedProviderAttempt, zi as providerAttemptEvidence, zn as retainedExecutorSeamKey } from "./supervisor-DpUCJtKC.js";
2
2
  import { f as RuntimeRunStateError, i as ConfigError, m as ValidationError } from "./errors-DodWX-cb.js";
3
- import { a as concreteProfileModel, c as profileModelExecutionSettings, d as agentHarness, f as harnessRunsAgent, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile } from "./model-policy-CA5d1YUP.js";
3
+ import { _ as agentHarness, a as concreteProfileModel, c as profileModelExecutionSettings, n as assertModelAllowed, o as enforceTokenLimits, r as assertProfileModelsAllowed, s as profileBridgeWireModel, t as assertExecutableAgentProfile, v as harnessRunsAgent } from "./model-policy-DydyWTQg.js";
4
4
  import { n as assertNoSymlinkDescendant } from "./durable-file-DWQA4ooo.js";
5
5
  import { t as composeRuntimeHooks } from "./runtime-hooks-tXpAarhW.js";
6
- import { C as applyRunCancellation, E as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, b as withRunContext, c as createProgressTracker, d as progressStop, j as createCoordinationToolsForManager, k as coordinationVerbNames, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, u as plateau, v as createFileRunContext, w as watchRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-CrsMoYmK.js";
6
+ import { C as applyRunCancellation, E as DEFAULT_AWAIT_EVENT_TIMEOUT_MS, b as withRunContext, c as createProgressTracker, d as progressStop, j as createCoordinationToolsForManager, k as coordinationVerbNames, n as createSteerAcknowledger, r as driverAgent, t as createCancelAcknowledger, u as plateau, v as createFileRunContext, w as watchRunCancellation, y as createInMemoryRunContext } from "./coordination-driver-CUnF7gfN.js";
7
7
  import { r as createStdioToolServer, t as PROTOCOL_VERSION } from "./tool-server-Dqer2M4_.js";
8
8
  import { k as writeRunCancellation, o as readRunCancelRequest, s as readRunCancellation } from "./run-layout-DSCWdbX2.js";
9
9
  import { agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, canonicalCandidateJson, validateAgentProfileSecurity } from "@tangle-network/agent-interface";
@@ -1746,7 +1746,7 @@ function observeWorkerControls(options) {
1746
1746
  * relay or tunnel. The harness IS the brain.
1747
1747
  *
1748
1748
  * Both arms spawn children through the SAME `makeWorkerAgent` seam and apply the SAME independent
1749
- * deliverable check to direct submissions. Raw driver prose is never eligible.
1749
+ * deliverable check to direct submissions. Raw driver prose is never quality-accepted.
1750
1750
  */
1751
1751
  /** Runtime-owned coordination is mounted under this MCP alias. */
1752
1752
  const coordinationMcpAlias = "agent-runtime-coordination";
@@ -2324,7 +2324,15 @@ function buildSupervisorAgent(profile, deps, testBrain) {
2324
2324
  deps.onAcceptedSubmission?.(submitted.result);
2325
2325
  return submitted.result;
2326
2326
  }
2327
- return contractDeclared ? candidate : await finalize();
2327
+ if (contractDeclared) return candidate;
2328
+ const finalized = await finalize();
2329
+ if (finalized !== void 0) return finalized;
2330
+ const harnessResult = driveHarness.resultArtifact?.();
2331
+ if (nodeContextSeed !== void 0 && nodeContextSeed.depth > 0 && harnessResult?.out !== void 0 && harnessResult.out !== null) {
2332
+ deps.onUnassessedOutput?.(harnessResult.out);
2333
+ return harnessResult.out;
2334
+ }
2335
+ return;
2328
2336
  } finally {
2329
2337
  coordinationLifetime.abort(/* @__PURE__ */ new Error("supervisor manager stopped"));
2330
2338
  try {
@@ -3080,7 +3088,9 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3080
3088
  const ownerRuntime = boundBackend.backend === "provider" ? boundBackend.runtime ?? resolveAgentEnvironmentProvider(boundBackend.provider, boundBackend.registry).name : "cli";
3081
3089
  let activeExecutor;
3082
3090
  let managerTranscript;
3091
+ let managerArtifact;
3083
3092
  const drive = async ({ profile, authoredProfile, task, scope, coordinationMcpUrl, coordinationMcpHeaders, stopSignal, coordinationTools, reentry }) => {
3093
+ managerArtifact = void 0;
3084
3094
  const retainedOwner = boundBackend.backend === "provider" ? scopeRetainedOwnerContext(scope) : void 0;
3085
3095
  if (retainedOwner && boundBackend.backend === "provider") {
3086
3096
  bindScopeRetainedOwnerProvider(scope, resolveAgentEnvironmentProvider(boundBackend.provider, boundBackend.registry));
@@ -3103,6 +3113,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3103
3113
  consumeScopeRetainedOwnerResult(scope);
3104
3114
  const replayedFailure = executorFailure(acceptedOwner);
3105
3115
  if (replayedFailure !== void 0) throw new HarnessTurnFailedError(ownerRuntime, replayedFailure);
3116
+ managerArtifact = acceptedOwner;
3106
3117
  return;
3107
3118
  }
3108
3119
  const initialBudget = scope.budget;
@@ -3259,6 +3270,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3259
3270
  let failed = false;
3260
3271
  let failure;
3261
3272
  let turnFailure;
3273
+ let terminalArtifact;
3262
3274
  let ownerMaterializationPublished = false;
3263
3275
  const ownerDeclaration = (exactDeclaration) => ({
3264
3276
  ...exactDeclaration,
@@ -3335,6 +3347,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3335
3347
  else pendingUsage.push(event);
3336
3348
  await meterPending();
3337
3349
  const artifact = executor.resultArtifact();
3350
+ terminalArtifact = artifact;
3338
3351
  const terminalResources = withBudgetResources({
3339
3352
  ...artifact.spent,
3340
3353
  ...resourceTelemetry(observedOwnerSpend, artifact.spent)
@@ -3364,6 +3377,7 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3364
3377
  if (reported !== void 0) turnFailure = new HarnessTurnFailedError(executor.runtime, reported);
3365
3378
  } else {
3366
3379
  const artifact = await run;
3380
+ terminalArtifact = artifact;
3367
3381
  await meterRuntimeOwnedProviderAttempt(scope, withBudgetResources({
3368
3382
  ...artifact.spent,
3369
3383
  iterations: 0
@@ -3449,7 +3463,9 @@ function driveHarnessFromBackend(backend, executionId, now = Date.now, maxTurns,
3449
3463
  }
3450
3464
  if (failed) throw failure;
3451
3465
  if (turnFailure !== void 0) throw turnFailure;
3466
+ managerArtifact = terminalArtifact;
3452
3467
  };
3468
+ drive.resultArtifact = () => managerArtifact;
3453
3469
  drive.deliver = (message) => {
3454
3470
  const deliver = activeExecutor?.deliver;
3455
3471
  if (!deliver) return false;
@@ -4231,8 +4247,12 @@ function superviseInternal(profile, task, opts, testBrain) {
4231
4247
  const nestedPerWorker = defaultPerWorker(spawnContext.budget, ownerShare);
4232
4248
  const authorizeNestedMessage = authorizeDownFor(authorized, depth + 1);
4233
4249
  let acceptedSubmission = false;
4250
+ let unassessedOutput = false;
4234
4251
  return driverChild(authorized, supervisorAgent(authorized, {
4235
4252
  blobs,
4253
+ onUnassessedOutput: () => {
4254
+ unassessedOutput = true;
4255
+ },
4236
4256
  ...spawnResourceRoot === void 0 ? {} : { spawnResourceRoot },
4237
4257
  makeWorkerAgent: childFactory,
4238
4258
  ...authorizeNestedMessage ? { authorizeDownMessage: authorizeNestedMessage } : {},
@@ -4291,7 +4311,7 @@ function superviseInternal(profile, task, opts, testBrain) {
4291
4311
  },
4292
4312
  ...options.steerDir === void 0 ? {} : { steerDir: resolve(options.steerDir) },
4293
4313
  ...options.runDir === void 0 && options.steerDir === void 0 ? {} : { controlScope: "subtree" }
4294
- }), journal, childExecution.ref, () => acceptedSubmission, recoveryFactories.get(childFactory));
4314
+ }), journal, childExecution.ref, () => acceptedSubmission, recoveryFactories.get(childFactory), () => unassessedOutput);
4295
4315
  };
4296
4316
  if (options.makeLeafAgent === void 0 && options.backend?.backend === "provider" && !options.backend.steering) {
4297
4317
  const factory = registerRetainedExecutorPreparation(createExecutor(options.backend), ({ spawned, profile, task }) => {
@@ -4522,4 +4542,4 @@ function rootProviderModelEvidenceFromExecution(evidence) {
4522
4542
  //#endregion
4523
4543
  export { gateOnDeliverable as C, serveCoordinationMcp as S, readRootStream as _, superviseWithTestBrain as a, composeReentryTask as b, resolveWorkerSpawnRetry as c, assertCoordinationBinding as d, coordinationProfileToolPrefix as f, ROOT_STREAM_FILE as g, supervisorAgentWithTestBrain as h, superviseRootProfile as i, retryPreSpawnRefusals as l, supervisorAgent as m, profileGuidanceComposer as n, workerFromBackend as o, resolveSupervisorProfile as p, supervise as r, isPreSpawnExecutorFailure as s, DEFAULT_AUTHORED_PROFILE_SECURITY_POLICY as t, withWorkerSpawnRetry as u, readRootStreamReceipt as v, mapExecutorResult as w, createSupervisorSpanRecorder as x, UNPROVEN_CONTINUITY as y };
4524
4544
 
4525
- //# sourceMappingURL=supervise-B_GnmIw0.js.map
4545
+ //# sourceMappingURL=supervise-dYioyGT-.js.map