@tangle-network/agent-runtime 0.128.0 → 0.131.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.
- package/README.md +70 -20
- package/dist/{activation-DhWJ3p8N.js → activation-BCzMOTaV.js} +3 -3
- package/dist/{activation-DhWJ3p8N.js.map → activation-BCzMOTaV.js.map} +1 -1
- package/dist/agent.d.ts +2 -3
- package/dist/agent.js +4 -5
- package/dist/agent.js.map +1 -1
- package/dist/{analyst-loop-DvSciOfB.js → analyst-loop-BE8cDs5Q.js} +2 -2
- package/dist/{analyst-loop-DvSciOfB.js.map → analyst-loop-BE8cDs5Q.js.map} +1 -1
- package/dist/analyst-loop.d.ts +1 -1
- package/dist/analyst-loop.js +1 -1
- package/dist/authoring-CvHwo1oW.js +163 -0
- package/dist/authoring-CvHwo1oW.js.map +1 -0
- package/dist/candidate-execution/index.js +4 -4
- package/dist/{candidate-execution-BFpq-Xi6.js → candidate-execution-BNxKr-Bu.js} +5 -5
- package/dist/{candidate-execution-BFpq-Xi6.js.map → candidate-execution-BNxKr-Bu.js.map} +1 -1
- package/dist/{conversation-BpLQZGPH.js → conversation-DNtxaJ1Z.js} +113 -31
- package/dist/conversation-DNtxaJ1Z.js.map +1 -0
- package/dist/conversation.d.ts +2 -2
- package/dist/conversation.js +2 -2
- package/dist/environment-provider-CxvSd1W6.d.ts +86 -0
- package/dist/{environment-provider-DqFS6FSZ.js → environment-provider-Dyg8DtLK.js} +8 -4
- package/dist/environment-provider-Dyg8DtLK.js.map +1 -0
- package/dist/environment-provider.d.ts +1 -1
- package/dist/environment-provider.js +1 -1
- package/dist/graph-BJTxGOFB.js +471 -0
- package/dist/graph-BJTxGOFB.js.map +1 -0
- package/dist/{improvement-cycle-IJgCbKWQ.js → improvement-cycle-Csp38cWg.js} +133 -224
- package/dist/improvement-cycle-Csp38cWg.js.map +1 -0
- package/dist/{index-BhZhQw77.d.ts → index-CoO7atyo.d.ts} +556 -1278
- package/dist/{index-BhuzfG2r.d.ts → index-DwGtu9nc.d.ts} +7 -9
- package/dist/{index-Efjb3nrQ.d.ts → index-qYHpsmG2.d.ts} +36 -18
- package/dist/index.d.ts +353 -11
- package/dist/index.js +111 -354
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +6 -6
- package/dist/intelligence.js +9 -8
- package/dist/intelligence.js.map +1 -1
- package/dist/kernel.d.ts +7 -5
- package/dist/kernel.js +13 -9
- package/dist/{knowledge-DF63xPr4.js → knowledge-ce0_uKCl.js} +19 -17
- package/dist/knowledge-ce0_uKCl.js.map +1 -0
- package/dist/knowledge.d.ts +1 -1
- package/dist/knowledge.js +1 -1
- package/dist/{loop-runner-bin-Ckp_9tmD.d.ts → loop-runner-bin-BwgZ8m_7.d.ts} +6 -3
- package/dist/{loop-runner-bin-CWqOpCEw.js → loop-runner-bin-DSbuDDqM.js} +5 -27
- package/dist/loop-runner-bin-DSbuDDqM.js.map +1 -0
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/materialization-COJ1UYQ-.js +272 -0
- package/dist/materialization-COJ1UYQ-.js.map +1 -0
- package/dist/mcp/bin.js +39 -47
- package/dist/mcp/bin.js.map +1 -1
- package/dist/mcp/index.d.ts +24 -26
- package/dist/mcp/index.js +66 -83
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/{memory-server-DL6cE2Ag.js → memory-server-5HEJH672.js} +2 -2
- package/dist/{memory-server-DL6cE2Ag.js.map → memory-server-5HEJH672.js.map} +1 -1
- package/dist/model-policy-CqziaqS1.js +232 -0
- package/dist/model-policy-CqziaqS1.js.map +1 -0
- package/dist/{openai-tools-B68JaOCx.d.ts → openai-tools-D3oMyVGl.d.ts} +2 -2
- package/dist/{openai-tools-D3XfrrQ6.js → openai-tools-ru75mLjq.js} +2 -2
- package/dist/openai-tools-ru75mLjq.js.map +1 -0
- package/dist/{prepare--8EvLqCr.js → prepare-DYWjVcPx.js} +169 -153
- package/dist/prepare-DYWjVcPx.js.map +1 -0
- package/dist/primeintellect/index.d.ts +7 -6
- package/dist/primeintellect/index.js +9 -11
- package/dist/primeintellect/index.js.map +1 -1
- package/dist/profiles.d.ts +21 -174
- package/dist/profiles.js +67 -276
- package/dist/profiles.js.map +1 -1
- package/dist/{protected-model-port-CXVfOUu_.js → protected-model-port-48ALLGxT.js} +2 -2
- package/dist/{protected-model-port-CXVfOUu_.js.map → protected-model-port-48ALLGxT.js.map} +1 -1
- package/dist/{redact-PQzmE1Jn.d.ts → redact-9_Gf-8m3.d.ts} +58 -69
- package/dist/{researcher-CoVqNhfI.js → researcher-Skz5-Uc8.js} +50 -26
- package/dist/researcher-Skz5-Uc8.js.map +1 -0
- package/dist/{run-layout-C2FGmZ3v.js → run-layout-CeJsEAom.js} +2 -2
- package/dist/{run-layout-C2FGmZ3v.js.map → run-layout-CeJsEAom.js.map} +1 -1
- package/dist/runtime-D-QfLbSd.d.ts +893 -0
- package/dist/{runtime-5uDVVfER.js → runtime-hiAABiTk.js} +315 -1191
- package/dist/runtime-hiAABiTk.js.map +1 -0
- package/dist/{sandbox-events-Yhd1GYWl.js → sandbox-events-CRDwc5WN.js} +42 -5
- package/dist/sandbox-events-CRDwc5WN.js.map +1 -0
- package/dist/snapshot-CXiiuHhL.js +21 -0
- package/dist/snapshot-CXiiuHhL.js.map +1 -0
- package/dist/{spawn-journal-DsZKDqeh.js → spawn-journal-saHQzqYi.js} +15 -21
- package/dist/spawn-journal-saHQzqYi.js.map +1 -0
- package/dist/stream-agent-turn-C852AgMT.d.ts +128 -0
- package/dist/stream-agent-turn-rYgaOLO0.js +910 -0
- package/dist/stream-agent-turn-rYgaOLO0.js.map +1 -0
- package/dist/{structural-rollout-zY0oqQzO.js → structural-rollout-3uxVGcg2.js} +459 -235
- package/dist/structural-rollout-3uxVGcg2.js.map +1 -0
- package/dist/{supervise-CsTKbH9R.js → supervise-iPN27pO0.js} +864 -4785
- package/dist/supervise-iPN27pO0.js.map +1 -0
- package/dist/{supervisor-DpjO0Gmy.js → supervisor-CV6Jh28D.js} +7439 -2897
- package/dist/supervisor-CV6Jh28D.js.map +1 -0
- package/dist/testing.d.ts +3 -1
- package/dist/testing.js +271 -221
- package/dist/testing.js.map +1 -1
- package/dist/{top-app-5unxqovu.js → top-app-G4M18b6i.js} +3 -3
- package/dist/{top-app-5unxqovu.js.map → top-app-G4M18b6i.js.map} +1 -1
- package/dist/tui/bin.js +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{environment-provider-CUFsyymu.d.ts → types-C6Q-J0Dt.d.ts} +51 -114
- package/dist/{types-DnNGJ5Gz.d.ts → types-ebIY0dMG.d.ts} +556 -30
- package/dist/{util-MVgdwuIS.js → util-Bw6srryQ.js} +3 -2
- package/dist/{util-MVgdwuIS.js.map → util-Bw6srryQ.js.map} +1 -1
- package/dist/{workspace-archive-BQxvkypI.js → workspace-archive-aOfJ47ms.js} +3 -3
- package/dist/{workspace-archive-BQxvkypI.js.map → workspace-archive-aOfJ47ms.js.map} +1 -1
- package/package.json +12 -15
- package/skills/agent-graphs/IMPROVE.md +3 -3
- package/skills/agent-graphs/SKILL.md +4 -5
- package/skills/agent-graphs/cases/review-pipeline.json +1 -2
- package/skills/agent-graphs/cases/unmeasured-harness.json +2 -4
- package/dist/backends-CiOCyRHb.js +0 -743
- package/dist/backends-CiOCyRHb.js.map +0 -1
- package/dist/conversation-BpLQZGPH.js.map +0 -1
- package/dist/environment-provider-DqFS6FSZ.js.map +0 -1
- package/dist/improvement-cycle-IJgCbKWQ.js.map +0 -1
- package/dist/index-DLM0W1h1.d.ts +0 -545
- package/dist/knowledge-DF63xPr4.js.map +0 -1
- package/dist/local-harness-BIajef4A.d.ts +0 -465
- package/dist/loop-runner-bin-CWqOpCEw.js.map +0 -1
- package/dist/model-resolution-Btd9iIKV.js +0 -98
- package/dist/model-resolution-Btd9iIKV.js.map +0 -1
- package/dist/openai-tools-D3XfrrQ6.js.map +0 -1
- package/dist/prepare--8EvLqCr.js.map +0 -1
- package/dist/researcher-CoVqNhfI.js.map +0 -1
- package/dist/runtime-5uDVVfER.js.map +0 -1
- package/dist/sandbox-events-Yhd1GYWl.js.map +0 -1
- package/dist/spawn-journal-DsZKDqeh.js.map +0 -1
- package/dist/structural-rollout-zY0oqQzO.js.map +0 -1
- package/dist/supervise-CsTKbH9R.js.map +0 -1
- package/dist/supervisor-DpjO0Gmy.js.map +0 -1
- package/dist/types-C9j4qg6l.d.ts +0 -500
- package/skills/agent-graphs/cases/floor-trap-pi.json +0 -11
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as AgentTaskStatus, U as AgentRuntimeEvent, it as RuntimeStreamEvent, v as LoopTokenUsage, y as LoopTraceEmitter } from "./types-ebIY0dMG.js";
|
|
2
2
|
import { l as RuntimeHooks } from "./runtime-hooks-sbRpjStq.js";
|
|
3
|
-
import { E as SandboxClient, v as LoopTokenUsage, y as LoopTraceEmitter } from "./types-DnNGJ5Gz.js";
|
|
4
3
|
import { ControlEvalResult, DefaultVerdict, KnowledgeReadinessReport, KnowledgeRequirement, ToolSpan } from "@tangle-network/agent-eval";
|
|
5
|
-
import { AgentProfile as AgentProfile$1,
|
|
6
|
-
import { BackendType
|
|
7
|
-
import { AgentEnvironment, AgentEnvironmentCapabilities, AgentEnvironmentCapabilities as AgentEnvironmentCapabilities$1, AgentEnvironmentEvent, AgentEnvironmentProvider, AgentEnvironmentProvider as AgentEnvironmentProvider$1, AgentEnvironmentQuery, AgentEnvironmentStatus, AgentEnvironmentSummary, AgentProfileRef, AgentProfileRef as AgentProfileRef$1, AgentSession, AgentSessionRef, AgentSessionStatus, AgentTurnInput, AgentTurnInput as AgentTurnInput$1, AgentTurnResult, CheckpointRef, CheckpointRequest, CreateAgentEnvironmentInput, CreateAgentEnvironmentInput as CreateAgentEnvironmentInput$1, ExecRequest, ExecResult, ForkRequest, PlacementInfo, ResourceRequest, WorkspaceRequest } from "@tangle-network/agent-interface/environment-provider";
|
|
4
|
+
import { AgentProfile as AgentProfile$1, Sha256Digest } from "@tangle-network/agent-interface";
|
|
5
|
+
import { BackendType } from "@tangle-network/sandbox";
|
|
8
6
|
//#region src/runtime/supervise/progress.d.ts
|
|
9
7
|
/** How long a worker may produce no metered activity before a `progress()` read calls it stalled.
|
|
10
8
|
* Deliberately generous: a coding harness routinely spends minutes inside one tool call, and a
|
|
@@ -876,18 +874,14 @@ interface ExecutorResult<Out> {
|
|
|
876
874
|
* conserved pool meters all runtimes identically. `tokens` carries `LoopTokenUsage`'s
|
|
877
875
|
* `{ input, output }`; `usd` is a SEPARATE channel (never folded into tokens).
|
|
878
876
|
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
* upstream of `foldStream` (`scope.ts`) can ever set it, so a STREAMING executor whose provider
|
|
883
|
-
* omitted usage reports the turn as costing zero tokens rather than as unmeasured. Only the
|
|
884
|
-
* non-streaming path, which returns a whole `Spend`, can carry the marker today. Closing it means
|
|
885
|
-
* widening this union (a `tokensKnown: false` field on `tokens`, or an `unknown` variant) and
|
|
886
|
-
* threading it through `foldStream` — a change to the metering contract every executor implements,
|
|
887
|
-
* which is why it is not folded into a streaming-transport fix. Filed separately.
|
|
877
|
+
* Either channel can explicitly say its numeric subtotal is incomplete. A missing provider receipt
|
|
878
|
+
* therefore remains unknown through live metering and terminal reconciliation instead of becoming
|
|
879
|
+
* a fabricated zero.
|
|
888
880
|
*/
|
|
889
881
|
type UsageEvent = {
|
|
890
882
|
kind: 'tokens';
|
|
883
|
+
/** Known token subtotal. When false, these counts are only the observed/estimated floor. */
|
|
884
|
+
tokensKnown?: false;
|
|
891
885
|
input: number;
|
|
892
886
|
output: number;
|
|
893
887
|
} | {
|
|
@@ -902,9 +896,11 @@ type UsageEvent = {
|
|
|
902
896
|
* External executors can register additional runtime strings without widening this type. */
|
|
903
897
|
type Runtime = 'router' | 'inline' | 'sandbox' | 'cli' | (string & {});
|
|
904
898
|
/**
|
|
905
|
-
* `AgentProfile
|
|
906
|
-
*
|
|
907
|
-
*
|
|
899
|
+
* `AgentProfile` is the complete execution authority. Scope parses and snapshots it before calling
|
|
900
|
+
* any registry, including one that resolves caller-supplied executors and factories. The default
|
|
901
|
+
* registry enforces the same rule when called directly. `AgentSpec.harness` records routing for one
|
|
902
|
+
* concrete run; where a backend consumes both fields, it must agree with `AgentProfile.harness` and
|
|
903
|
+
* cannot fill or override it.
|
|
908
904
|
*
|
|
909
905
|
* Resolution (in `runtime.ts`):
|
|
910
906
|
* - `executorFactory` present → BYO: build it after admission with the live context.
|
|
@@ -923,7 +919,7 @@ interface AgentSpec {
|
|
|
923
919
|
/** Per-spawn factory carrying caller configuration. Constructed only after admission, with the
|
|
924
920
|
* real child signal and nested-scope context. */
|
|
925
921
|
readonly executorFactory?: ExecutorFactory<unknown>;
|
|
926
|
-
/** Bring-your-own executor:
|
|
922
|
+
/** Bring-your-own executor: highest routing precedence after exact-profile intake validation. */
|
|
927
923
|
readonly executor?: Executor<unknown>;
|
|
928
924
|
}
|
|
929
925
|
/** Caller-owned identity beyond the exact profile/task bytes Scope can compute itself. */
|
|
@@ -978,7 +974,7 @@ interface ExecutorExecutionBinding {
|
|
|
978
974
|
readonly descriptor: Readonly<Record<string, string | number | boolean | null>>;
|
|
979
975
|
}
|
|
980
976
|
/** Why exact materialization evidence is unavailable for a node. */
|
|
981
|
-
type UnknownMaterializationReason = 'executor-did-not-report' | 'invalid-executor-report' | 'root-agent-did-not-report';
|
|
977
|
+
type UnknownMaterializationReason = 'executor-did-not-report' | 'executor-receipt-pending' | 'invalid-executor-report' | 'root-agent-did-not-report';
|
|
982
978
|
/** What the kernel can prove about one node's actual execution plan. */
|
|
983
979
|
type ProfileMaterializationReceipt = {
|
|
984
980
|
readonly status: 'known';
|
|
@@ -1033,9 +1029,9 @@ interface ExecutorNodeContext {
|
|
|
1033
1029
|
readonly identity?: NodeExecutionIdentity;
|
|
1034
1030
|
}
|
|
1035
1031
|
/**
|
|
1036
|
-
* Builds a fresh `Executor` for one spawn from the resolved spec. Per-spawn (not
|
|
1037
|
-
*
|
|
1038
|
-
*
|
|
1032
|
+
* Builds a fresh `Executor` for one spawn from the resolved, immutable spec. Per-spawn (not shared)
|
|
1033
|
+
* so each child owns its own box/abort/teardown lifecycle. A BYO factory lets a user supply
|
|
1034
|
+
* construction args without pre-instantiating; it never bypasses exact-profile validation.
|
|
1039
1035
|
*/
|
|
1040
1036
|
type ExecutorFactory<Out> = (spec: AgentSpec, ctx: ExecutorContext) => Executor<Out>;
|
|
1041
1037
|
/** Construction context handed to a `ExecutorFactory` — the seams a built-in needs
|
|
@@ -1043,16 +1039,22 @@ type ExecutorFactory<Out> = (spec: AgentSpec, ctx: ExecutorContext) => Executor<
|
|
|
1043
1039
|
* the factory reaching into module globals. */
|
|
1044
1040
|
interface ExecutorContext {
|
|
1045
1041
|
readonly signal: AbortSignal;
|
|
1042
|
+
/**
|
|
1043
|
+
* Request headers inherited from an enclosing task or conversation.
|
|
1044
|
+
* Network executors forward these after their own connection headers so caller authorization,
|
|
1045
|
+
* recursion depth, and trace identity survive the profile-to-executor boundary.
|
|
1046
|
+
*/
|
|
1047
|
+
readonly propagatedHeaders?: Readonly<Record<string, string>>;
|
|
1046
1048
|
/** Present when Scope constructs the executor for a supervised node. */
|
|
1047
1049
|
readonly node?: ExecutorNodeContext;
|
|
1048
1050
|
/** Opaque seams the registry threads through; a built-in narrows what it needs. */
|
|
1049
1051
|
readonly seams: Readonly<Record<string, unknown>>;
|
|
1050
1052
|
}
|
|
1051
1053
|
/**
|
|
1052
|
-
* The OPEN resolver
|
|
1053
|
-
*
|
|
1054
|
-
*
|
|
1055
|
-
*
|
|
1054
|
+
* The OPEN resolver maps an already-admitted `AgentSpec` to an `ExecutorFactory`. Scope validates
|
|
1055
|
+
* before invoking any implementation; the default registry repeats validation for direct callers,
|
|
1056
|
+
* resolves the three built-ins, and accepts a BYO `executor`/factory. Callers may register more
|
|
1057
|
+
* runtimes by name, but registration does not waive exact-profile validation.
|
|
1056
1058
|
*/
|
|
1057
1059
|
interface ExecutorRegistry {
|
|
1058
1060
|
/** Register a factory for a named runtime. Throws on a duplicate name (fail loud). */
|
|
@@ -1130,14 +1132,10 @@ interface SpawnOpts {
|
|
|
1130
1132
|
* no dollars, an exceeded recursion ceiling, a full tree-wide worker allocation, or a `key` that
|
|
1131
1133
|
* is still LIVE in this scope (the same assignment may not run twice concurrently).
|
|
1132
1134
|
*
|
|
1133
|
-
*
|
|
1135
|
+
* `usd-unbudgeted` is separate from `budget-exhausted` because the two call for opposite
|
|
1134
1136
|
* responses: an exhausted pool may admit a smaller request, while an unbudgeted dollar channel
|
|
1135
|
-
*
|
|
1136
|
-
|
|
1137
|
-
* `below-runtime-floor` is separate for the same reason and points the opposite way from
|
|
1138
|
-
* `budget-exhausted`: the request is under what that harness spends before it reads its task, so
|
|
1139
|
-
* it is unsatisfiable at that SIZE and the fix is to RAISE it, never to retry smaller. */
|
|
1140
|
-
type SpawnRejection = 'budget-exhausted' | 'usd-unbudgeted' | 'below-runtime-floor' | 'depth-exceeded' | 'duplicate-key' | 'invalid-identity' | 'key-conflict' | 'max-live-workers' | 'scope-aborted';
|
|
1137
|
+
* refuses every amount until the ROOT budget names a `maxUsd`. */
|
|
1138
|
+
type SpawnRejection = 'budget-exhausted' | 'usd-unbudgeted' | 'depth-exceeded' | 'duplicate-key' | 'invalid-identity' | 'key-conflict' | 'max-live-workers' | 'scope-aborted';
|
|
1141
1139
|
/**
|
|
1142
1140
|
* What a KEYED spawn resolved to when the key had a prior attempt. Absent on a fresh key (and on
|
|
1143
1141
|
* every unkeyed spawn). `'completed'` is the exactly-once path: NOTHING was spawned — the handle
|
|
@@ -1220,6 +1218,8 @@ type Settled<Out> = {
|
|
|
1220
1218
|
* budget atomically from the shared pool and fails closed when the pool cannot cover it.
|
|
1221
1219
|
* `next()` waits for one settlement from this scope's live set; `view` reads live state,
|
|
1222
1220
|
* not the replay log.
|
|
1221
|
+
*
|
|
1222
|
+
* @stable
|
|
1223
1223
|
*/
|
|
1224
1224
|
interface Scope<Out> {
|
|
1225
1225
|
/**
|
|
@@ -1328,6 +1328,9 @@ interface Scope<Out> {
|
|
|
1328
1328
|
* re-spawning committed work. A resume-blind driver simply ignores it and re-spawns — correct
|
|
1329
1329
|
* but redundant. The scope's spawn ordinal + cursor seq are already advanced past the recorded
|
|
1330
1330
|
* maxima, so any NEW spawn appends without colliding with a journaled event.
|
|
1331
|
+
*
|
|
1332
|
+
* @experimental Same-process replay only — live supervised-tree recovery after a
|
|
1333
|
+
* coordinator restart is not implemented (docs/agent-managed-compute/README.md).
|
|
1331
1334
|
*/
|
|
1332
1335
|
readonly resume?: ResumedWork<Out>;
|
|
1333
1336
|
/** The live tree — reads the in-memory nursery, not the journal. */
|
|
@@ -1598,6 +1601,8 @@ interface ResultBlobStore {
|
|
|
1598
1601
|
* Owns the conserved pool, the spawn log, the abort cascade, the OTP intensity breaker,
|
|
1599
1602
|
* and the root handle. `run` executes the root `Agent` to completion; `attach` wires a
|
|
1600
1603
|
* live `RootHandle` (the Q2 substrate the chat/pi-viz client later consumes).
|
|
1604
|
+
*
|
|
1605
|
+
* @stable
|
|
1601
1606
|
*/
|
|
1602
1607
|
interface Supervisor<Task, Out> {
|
|
1603
1608
|
run(root: Agent<Task, Out>, task: Task, opts: SupervisorOpts): Promise<SupervisedResult<Out>>;
|
|
@@ -1634,6 +1639,14 @@ interface SupervisorOpts {
|
|
|
1634
1639
|
*/
|
|
1635
1640
|
readonly maxRestarts?: number;
|
|
1636
1641
|
readonly withinMs?: number;
|
|
1642
|
+
/**
|
|
1643
|
+
* How long live children may keep running after the ROOT DRIVER FAILED, before the join barrier
|
|
1644
|
+
* cascades the abort into them (#741). A root that dies did not make its children unhealthy: a
|
|
1645
|
+
* child mid-unit holds work already paid for, and killing it instantly discards everything it has
|
|
1646
|
+
* not yet written. The window applies ONLY to a driver failure on an un-cancelled run, and never
|
|
1647
|
+
* extends past the run's own deadline. Omit/`0` = the historical immediate teardown.
|
|
1648
|
+
*/
|
|
1649
|
+
readonly childSettleGraceMs?: number;
|
|
1637
1650
|
/**
|
|
1638
1651
|
* Opt into RESUME-FIRST: read any prior journal tree for this `runId` BEFORE beginning a fresh
|
|
1639
1652
|
* one, and when a non-empty tree exists rehydrate its committed work onto `Scope.resume`
|
|
@@ -1643,6 +1656,9 @@ interface SupervisorOpts {
|
|
|
1643
1656
|
*
|
|
1644
1657
|
* Default `false` — a run always begins a fresh tree, which is the behavior every existing
|
|
1645
1658
|
* consumer has. Resume is a durability contract the caller opts into, never a silent default.
|
|
1659
|
+
*
|
|
1660
|
+
* @experimental Rehydrates committed settlements only; live supervised-tree recovery after a
|
|
1661
|
+
* coordinator restart is not implemented (docs/agent-managed-compute/README.md).
|
|
1646
1662
|
*/
|
|
1647
1663
|
readonly resume?: boolean;
|
|
1648
1664
|
readonly now?: () => number;
|
|
@@ -1783,84 +1799,5 @@ interface WidenGate<Out> {
|
|
|
1783
1799
|
readonly judgeExempt?: boolean;
|
|
1784
1800
|
}
|
|
1785
1801
|
//#endregion
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
interface CreateTangleSandboxExactProcessProviderOptions {
|
|
1789
|
-
name?: string;
|
|
1790
|
-
}
|
|
1791
|
-
/**
|
|
1792
|
-
* Adapt Tangle Sandbox's managed control runtime to Runtime's exact-process provider.
|
|
1793
|
-
*
|
|
1794
|
-
* The adapter deliberately exposes no ordinary agent environment: an exact experiment
|
|
1795
|
-
* must start a fresh Sandbox with no managed agent and launch its declared argv directly.
|
|
1796
|
-
*/
|
|
1797
|
-
declare function createTangleSandboxExactProcessProvider(client: SandboxControlClient, options?: CreateTangleSandboxExactProcessProviderOptions): AgentEnvironmentProvider;
|
|
1798
|
-
//#endregion
|
|
1799
|
-
//#region src/runtime/environment-provider.d.ts
|
|
1800
|
-
/** Provider object or registry name accepted by runtime provider adapters.
|
|
1801
|
-
* @experimental */
|
|
1802
|
-
type AgentEnvironmentProviderRef = AgentEnvironmentProvider | string;
|
|
1803
|
-
/** In-memory registry for named `AgentEnvironmentProvider` instances.
|
|
1804
|
-
* @experimental */
|
|
1805
|
-
interface AgentEnvironmentProviderRegistry {
|
|
1806
|
-
register(provider: AgentEnvironmentProvider, options?: {
|
|
1807
|
-
replace?: boolean;
|
|
1808
|
-
}): void;
|
|
1809
|
-
has(name: string): boolean;
|
|
1810
|
-
get(name: string): AgentEnvironmentProvider | undefined;
|
|
1811
|
-
require(name: string): AgentEnvironmentProvider;
|
|
1812
|
-
names(): string[];
|
|
1813
|
-
providers(): AgentEnvironmentProvider[];
|
|
1814
|
-
capabilities(name: string): Promise<AgentEnvironmentCapabilities>;
|
|
1815
|
-
}
|
|
1816
|
-
/** Create a registry that resolves provider names to concrete provider instances.
|
|
1817
|
-
* @experimental */
|
|
1818
|
-
declare function createAgentEnvironmentProviderRegistry(providers?: Iterable<AgentEnvironmentProvider>): AgentEnvironmentProviderRegistry;
|
|
1819
|
-
/** Resolve a provider instance or registry name, failing loudly when a name is unknown.
|
|
1820
|
-
* @experimental */
|
|
1821
|
-
declare function resolveAgentEnvironmentProvider(provider: AgentEnvironmentProviderRef, registry?: AgentEnvironmentProviderRegistry): AgentEnvironmentProvider;
|
|
1822
|
-
/** Options for exposing an `AgentEnvironmentProvider` through the legacy sandbox client port.
|
|
1823
|
-
* @experimental */
|
|
1824
|
-
interface ProviderAsSandboxClientOptions {
|
|
1825
|
-
defaults?: Partial<CreateAgentEnvironmentInput>;
|
|
1826
|
-
requireTerminalEvent?: boolean;
|
|
1827
|
-
/** Require declared live continuation plus concrete session controls. */
|
|
1828
|
-
requireSession?: boolean;
|
|
1829
|
-
mapCreateOptions?: (options: CreateSandboxOptions | undefined) => Partial<CreateAgentEnvironmentInput>;
|
|
1830
|
-
}
|
|
1831
|
-
/** Adapt a neutral environment provider to the `SandboxClient` interface used by existing loop paths.
|
|
1832
|
-
* @experimental */
|
|
1833
|
-
declare function providerAsSandboxClient(provider: AgentEnvironmentProvider, options?: ProviderAsSandboxClientOptions): SandboxClient;
|
|
1834
|
-
/** Options for wrapping the current Tangle sandbox client as an environment provider.
|
|
1835
|
-
* @experimental */
|
|
1836
|
-
interface SandboxClientProviderOptions {
|
|
1837
|
-
name?: string;
|
|
1838
|
-
defaultBackend?: BackendType;
|
|
1839
|
-
capabilities?: AgentEnvironmentCapabilities | (() => AgentEnvironmentCapabilities | Promise<AgentEnvironmentCapabilities>);
|
|
1840
|
-
validateProfile?: (profile: AgentProfileRef) => AgentProfileValidationResult | Promise<AgentProfileValidationResult>;
|
|
1841
|
-
/** Resolve a named profile before calling Sandbox, which accepts inline profiles only. */
|
|
1842
|
-
resolveProfile?: (profileId: string) => AgentProfile$1 | Promise<AgentProfile$1>;
|
|
1843
|
-
mapCreateInput?: (input: CreateAgentEnvironmentInput) => CreateSandboxOptions;
|
|
1844
|
-
}
|
|
1845
|
-
/** Adapt a `SandboxClient` into the shared `AgentEnvironmentProvider` contract.
|
|
1846
|
-
* @experimental */
|
|
1847
|
-
declare function sandboxClientAsProvider(client: SandboxClient, options?: SandboxClientProviderOptions): AgentEnvironmentProvider;
|
|
1848
|
-
/** Options for running a provider as a supervise-mode executor.
|
|
1849
|
-
* @experimental */
|
|
1850
|
-
interface ProviderExecutorOptions {
|
|
1851
|
-
defaults?: Partial<CreateAgentEnvironmentInput>;
|
|
1852
|
-
runtime?: Runtime;
|
|
1853
|
-
destroyOnSettle?: boolean;
|
|
1854
|
-
requireTerminalEvent?: boolean;
|
|
1855
|
-
/** Transform only the profile sent to `provider.create`. The original profile
|
|
1856
|
-
* remains the input to `taskToTurn`, so execution-only normalization cannot
|
|
1857
|
-
* rewrite the caller's task mapping. */
|
|
1858
|
-
profileForCreate?: (profile: AgentProfile$1) => AgentProfile$1;
|
|
1859
|
-
taskToTurn?: (task: unknown, specProfile: AgentProfile$1) => AgentTurnInput;
|
|
1860
|
-
}
|
|
1861
|
-
/** Adapt an environment provider into an `ExecutorFactory` for `createExecutor`.
|
|
1862
|
-
* @experimental */
|
|
1863
|
-
declare function providerAsExecutor(provider: AgentEnvironmentProvider, options?: ProviderExecutorOptions): ExecutorFactory<unknown>;
|
|
1864
|
-
//#endregion
|
|
1865
|
-
export { MaterializedModelIdentity as $, RuntimeEventOtelOptions as $t, providerAsSandboxClient as A, isWaitOutcome as An, WidenGate as At, DefaultVerdict as B, decodeToolPart as Bn, mergeTraceEnv as Bt, ProviderAsSandboxClientOptions as C, PendingWait as Cn, SupervisedResult as Ct, WorkspaceRequest as D, WaitRejection as Dn, UnknownMaterializationReason as Dt, SandboxClientProviderOptions as E, WaitProbeRegistry as En, TreeView as Et, createTangleSandboxExactProcessProvider as F, SessionMessageLike as Fn, readWorkerTraceContext as Ft, ExecutorExecutionBinding as G, ExecutorProgress as Gn, EvalRunsExportConfig as Gt, Executor as H, ActivityLog as Hn, traceContextToEnv as Ht, Agent as I, SessionTraceBox as In, workerTraceEnv as It, ExecutorNodeContext as J, createActivityLog as Jn, LoopSpanNode as Jt, ExecutorFactory as K, ScopeProgressInput as Kn, EvalRunsExportResult as Kt, AgentExecutionRef as L, ToolStepInput as Ln, workerTraceSeamKey as Lt, sandboxClientAsProvider as M, timerAt as Mn, WorkerTraceUnavailableReason as Mt, CreateTangleSandboxExactProcessProviderOptions as N, validateWaitSpec as Nn, WorkerTraceResolver as Nt, createAgentEnvironmentProviderRegistry as O, WaitSpec as On, UsageEvent as Ot, SandboxControlClient as P, waitUntil as Pn, WorkerTraceSeamCarrier as Pt, MaterializedExecutionIdentity as Q, OtelSpan as Qt, AgentSpec as R, TraceSource as Rn, TraceContext as Rt, PlacementInfo as S, sanitizeRuntimeStreamEvent as Sn, SteerableRootHandle as St, ResourceRequest as T, WaitProbe as Tn, SupervisorOpts as Tt, ExecutorAccounting as U, ActivityNote as Un, EvalRunEvent as Ut, ExecutionBindingReceipt as V, sandboxSessionTraceSource as Vn, readTraceContextFromEnv as Vt, ExecutorContext as W, DEFAULT_STALL_AFTER_MS as Wn, EvalRunGeneration as Wt, ExecutorResult as X, OtelExportConfig as Xt, ExecutorRegistry as Y, readWorkerProgress as Yn, OtelAttribute as Yt, Handle as Z, OtelExporter as Zt, CheckpointRequest as _, SanitizedKnowledgeRequirement as _n, SpawnJournal as _t, AgentEnvironmentProviderRef as a, exportEvalRuns as an, ProfileMaterializationReceipt as at, ExecResult as b, sanitizeAgentRuntimeEvent as bn, SpawnRejection as bt, AgentEnvironmentStatus as c, padSpanId as cn, ResumedKeyState as ct, AgentSession as d, RuntimeEventCollector as dn, RootMaterialization as dt, buildLoopOtelSpans as en, NoWinnerError as et, AgentSessionRef as f, RuntimeStreamEventCollector as fn, RootSignal as ft, CheckpointRef as g, SanitizedKnowledgeReadinessReport as gn, SpawnEvent as gt, AgentTurnResult as h, RuntimeTelemetryOptions as hn, Settled as ht, AgentEnvironmentProvider$1 as i, createOtelExporter as in, NodeStatus as it, resolveAgentEnvironmentProvider as j, pollFor as jn, WorkerTraceEvidence as jt, providerAsExecutor as k, createWaitProbes as kn, WaitOpts as kt, AgentEnvironmentSummary as l, padTraceId as ln, ResumedWork as lt, AgentTurnInput$1 as m, RuntimeStreamEventSummary as mn, Scope as mt, AgentEnvironmentCapabilities$1 as n, buildRuntimeEventOtelSpans as nn, NodeId as nt, AgentEnvironmentProviderRegistry as o, generateSpanId as on, Restart as ot, AgentSessionStatus as p, RuntimeStreamEventSink as pn, Runtime as pt, ExecutorMaterialization as q, WorkerProgress as qn, INTELLIGENCE_WIRE_VERSION as qt, AgentEnvironmentEvent as r, createOpenInferenceFileExporter as rn, NodeSnapshot as rt, AgentEnvironmentQuery as s, loopEventToOtelSpan as sn, ResultBlobStore as st, AgentEnvironment as t, buildLoopSpanNodes as tn, NodeExecutionIdentity as tt, AgentProfileRef$1 as u, toOtelAttributes as un, RootHandle as ut, CreateAgentEnvironmentInput$1 as v, createRuntimeEventCollector as vn, SpawnOpts as vt, ProviderExecutorOptions as w, WaitOutcome as wn, Supervisor as wt, ForkRequest as x, sanitizeKnowledgeReadinessReport as xn, Spend as xt, ExecRequest as y, createRuntimeStreamEventCollector as yn, SpawnPrior as yt, Budget as z, createPushTraceSource as zn, createPropagatingTraceEmitter as zt };
|
|
1866
|
-
//# sourceMappingURL=environment-provider-CUFsyymu.d.ts.map
|
|
1802
|
+
export { WorkerTraceSeamCarrier as $, waitUntil as $t, RootMaterialization as A, RuntimeEventCollector as At, Spend as B, sanitizeKnowledgeReadinessReport as Bt, NodeStatus as C, createOtelExporter as Ct, ResumedKeyState as D, padSpanId as Dt, ResultBlobStore as E, loopEventToOtelSpan as Et, SpawnEvent as F, SanitizedKnowledgeReadinessReport as Ft, TreeView as G, WaitProbeRegistry as Gt, SupervisedResult as H, PendingWait as Ht, SpawnJournal as I, SanitizedKnowledgeRequirement as It, WaitOpts as J, createWaitProbes as Jt, UnknownMaterializationReason as K, WaitRejection as Kt, SpawnOpts as L, createRuntimeEventCollector as Lt, Runtime as M, RuntimeStreamEventSink as Mt, Scope as N, RuntimeStreamEventSummary as Nt, ResumedWork as O, padTraceId as Ot, Settled as P, RuntimeTelemetryOptions as Pt, WorkerTraceResolver as Q, validateWaitSpec as Qt, SpawnPrior as R, createRuntimeStreamEventCollector as Rt, NodeSnapshot as S, createOpenInferenceFileExporter as St, Restart as T, generateSpanId as Tt, Supervisor as U, WaitOutcome as Ut, SteerableRootHandle as V, sanitizeRuntimeStreamEvent as Vt, SupervisorOpts as W, WaitProbe as Wt, WorkerTraceEvidence as X, pollFor as Xt, WidenGate as Y, isWaitOutcome as Yt, WorkerTraceUnavailableReason as Z, timerAt as Zt, MaterializedExecutionIdentity as _, OtelSpan as _t, DefaultVerdict as a, decodeToolPart as an, mergeTraceEnv as at, NodeExecutionIdentity as b, buildLoopSpanNodes as bt, ExecutorAccounting as c, ActivityNote as cn, EvalRunEvent as ct, ExecutorFactory as d, ScopeProgressInput as dn, EvalRunsExportResult as dt, SessionMessageLike as en, readWorkerTraceContext as et, ExecutorMaterialization as f, WorkerProgress as fn, INTELLIGENCE_WIRE_VERSION as ft, Handle as g, OtelExporter as gt, ExecutorResult as h, OtelExportConfig as ht, Budget as i, createPushTraceSource as in, createPropagatingTraceEmitter as it, RootSignal as j, RuntimeStreamEventCollector as jt, RootHandle as k, toOtelAttributes as kt, ExecutorContext as l, DEFAULT_STALL_AFTER_MS as ln, EvalRunGeneration as lt, ExecutorRegistry as m, readWorkerProgress as mn, OtelAttribute as mt, AgentExecutionRef as n, ToolStepInput as nn, workerTraceSeamKey as nt, ExecutionBindingReceipt as o, sandboxSessionTraceSource as on, readTraceContextFromEnv as ot, ExecutorNodeContext as p, createActivityLog as pn, LoopSpanNode as pt, UsageEvent as q, WaitSpec as qt, AgentSpec as r, TraceSource as rn, TraceContext as rt, Executor as s, ActivityLog as sn, traceContextToEnv as st, Agent as t, SessionTraceBox as tn, workerTraceEnv as tt, ExecutorExecutionBinding as u, ExecutorProgress as un, EvalRunsExportConfig as ut, MaterializedModelIdentity as v, RuntimeEventOtelOptions as vt, ProfileMaterializationReceipt as w, exportEvalRuns as wt, NodeId as x, buildRuntimeEventOtelSpans as xt, NoWinnerError as y, buildLoopOtelSpans as yt, SpawnRejection as z, sanitizeAgentRuntimeEvent as zt };
|
|
1803
|
+
//# sourceMappingURL=types-C6Q-J0Dt.d.ts.map
|