@tangle-network/agent-runtime 0.306.2 → 0.308.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/dist/{activation-wZ-8vOjV.d.ts → activation-5Usfsfzr.d.ts} +3 -3
- package/dist/{activation-kaJzXM7Y.js → activation-DbnacUhI.js} +2 -2
- package/dist/{activation-kaJzXM7Y.js.map → activation-DbnacUhI.js.map} +1 -1
- package/dist/agent.d.ts +2 -2
- package/dist/agent.js +2 -2
- package/dist/{coordination-driver-Y2gf8pBT.js → coordination-driver-BYIjecHz.js} +2 -2
- package/dist/{coordination-driver-Y2gf8pBT.js.map → coordination-driver-BYIjecHz.js.map} +1 -1
- package/dist/{delegate-B7bwEFQl.js → delegate-KCK7WdZv.js} +2 -2
- package/dist/{delegate-B7bwEFQl.js.map → delegate-KCK7WdZv.js.map} +1 -1
- package/dist/durable.d.ts +2 -2
- package/dist/durable.js +55 -4
- package/dist/durable.js.map +1 -1
- package/dist/{graph-VUwNFYff.js → graph-BUu0KQVW.js} +5 -4
- package/dist/graph-BUu0KQVW.js.map +1 -0
- package/dist/{improvement-cycle-DuIGusyA.js → improvement-cycle-BylwWCcl.js} +7 -3
- package/dist/{improvement-cycle-DuIGusyA.js.map → improvement-cycle-BylwWCcl.js.map} +1 -1
- package/dist/{index-DflDZq_I.d.ts → index-EibbsKsH.d.ts} +72 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/intelligence.d.ts +3 -3
- package/dist/intelligence.js +3 -3
- package/dist/kernel.d.ts +4 -4
- package/dist/kernel.js +8 -8
- package/dist/{loop-runner-bin-Dp1V3P2W.js → loop-runner-bin-DcF6ZEWi.js} +3 -3
- package/dist/{loop-runner-bin-Dp1V3P2W.js.map → loop-runner-bin-DcF6ZEWi.js.map} +1 -1
- package/dist/{loop-runner-bin-DZfRUVWy.d.ts → loop-runner-bin-jST1hm-z.d.ts} +3 -3
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +5 -5
- package/dist/mcp/index.js +4 -4
- package/dist/{openai-tools-YO30D2s3.d.ts → openai-tools-BuFqhp5i.d.ts} +2 -2
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-CfK8fla-.js → provision-supervisor-Cvp4Nm-y.js} +3 -3
- package/dist/{provision-supervisor-CfK8fla-.js.map → provision-supervisor-Cvp4Nm-y.js.map} +1 -1
- package/dist/{runtime-D452tieK.js → runtime-Y46Lwt_d.js} +8 -8
- package/dist/{runtime-D452tieK.js.map → runtime-Y46Lwt_d.js.map} +1 -1
- package/dist/{search-executor-D3AT8_hb.js → search-executor-BPpfxu9c.js} +2 -2
- package/dist/{search-executor-D3AT8_hb.js.map → search-executor-BPpfxu9c.js.map} +1 -1
- package/dist/{server-D1Tfxo-v.js → server-DIrQYUnn.js} +3 -3
- package/dist/{server-D1Tfxo-v.js.map → server-DIrQYUnn.js.map} +1 -1
- package/dist/{stream-agent-turn-B1giFgOg.d.ts → stream-agent-turn-op3m9IEY.d.ts} +2 -2
- package/dist/{substrate-L_sC7jCD.d.ts → substrate-B1VzcyoB.d.ts} +2 -2
- package/dist/{supervise-CtewGpxh.js → supervise-CmeN8ipv.js} +164 -190
- package/dist/supervise-CmeN8ipv.js.map +1 -0
- package/dist/{supervisor-DYKPbcZa.js → supervisor-CSMb8HBU.js} +1796 -1038
- package/dist/supervisor-CSMb8HBU.js.map +1 -0
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +12 -12
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +1 -1
- package/dist/{types-DeuEkBhI.d.ts → types-B2IOlN8R.d.ts} +152 -67
- package/package.json +3 -3
- package/skills/profile-authoring/SKILL.md +6 -0
- package/dist/graph-VUwNFYff.js.map +0 -1
- package/dist/supervise-CtewGpxh.js.map +0 -1
- package/dist/supervisor-DYKPbcZa.js.map +0 -1
package/dist/testing.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Bt as RunGraphTestOptions,
|
|
2
|
-
import { Ln as ToolLoopCallContext, Rn as ToolLoopChat } from "./stream-agent-turn-
|
|
1
|
+
import { Bt as RunGraphTestOptions, Wt as runGraphWithTestBrain, bc as superviseWithTestBrain, fl as supervisorAgentWithTestBrain, mn as driverAgent, pn as DriverAgentOptions, rl as SupervisorAgentTestDeps, vc as SuperviseTestOptions } from "./index-EibbsKsH.js";
|
|
2
|
+
import { Ln as ToolLoopCallContext, Rn as ToolLoopChat } from "./stream-agent-turn-op3m9IEY.js";
|
|
3
3
|
import { AgentImprovementProposal, AgentProfile, AgentProfileImprovementMeasuredComparison, SandboxSizePreset } from "@tangle-network/agent-interface";
|
|
4
4
|
//#region src/testing/index.d.ts
|
|
5
5
|
/** A proposal produced by Runtime's opaque profile-improvement path. */
|
package/dist/testing.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { F as immutableCandidateValue, j as canonicalCandidateDigest$1 } from "./workspace-streams-DaQceg2p.js";
|
|
2
|
-
import { f as verifyAgentImprovementProposal } from "./improvement-cycle-
|
|
2
|
+
import { f as verifyAgentImprovementProposal } from "./improvement-cycle-BylwWCcl.js";
|
|
3
3
|
import { i as applyExactAgentProfileDiff, p as parseExactAgentProfile } from "./profile-DY9lT3gH.js";
|
|
4
|
-
import { r as driverAgent } from "./coordination-driver-
|
|
5
|
-
import { a as superviseWithTestBrain,
|
|
6
|
-
import { i as runGraphWithTestBrain } from "./graph-
|
|
4
|
+
import { r as driverAgent } from "./coordination-driver-BYIjecHz.js";
|
|
5
|
+
import { a as superviseWithTestBrain, m as supervisorAgentWithTestBrain } from "./supervise-CmeN8ipv.js";
|
|
6
|
+
import { i as runGraphWithTestBrain } from "./graph-BUu0KQVW.js";
|
|
7
7
|
import { SANDBOX_SIZE_PRESET_NAMES, canonicalAgentProfileDigest } from "@tangle-network/agent-interface";
|
|
8
8
|
//#region src/testing/fixtures/agent-improvement-proposal.json
|
|
9
9
|
var agent_improvement_proposal_default = {
|
|
10
10
|
changedSurfaces: ["prompt"],
|
|
11
|
-
digest: "sha256:
|
|
11
|
+
digest: "sha256:5d294755838fbeea2ed7e94b32f3e97bf6589d373af5ebe1519c4801aacee08f",
|
|
12
12
|
evaluation: {
|
|
13
13
|
"decision": {
|
|
14
14
|
"contributingChecks": [
|
|
@@ -4579,7 +4579,7 @@ var agent_improvement_proposal_default = {
|
|
|
4579
4579
|
],
|
|
4580
4580
|
"metadata": {
|
|
4581
4581
|
"fixture": "agent-improvement-proposal",
|
|
4582
|
-
"runtimeVersion": "0.
|
|
4582
|
+
"runtimeVersion": "0.308.0"
|
|
4583
4583
|
},
|
|
4584
4584
|
"objectives": [
|
|
4585
4585
|
{
|
|
@@ -4690,8 +4690,8 @@ var agent_improvement_proposal_default = {
|
|
|
4690
4690
|
"baselineContentHash": "sha256:5c21ee53e513fc604cb09754e21c392b24a424da0ef37dbf8f1ee4a8a0b08f09",
|
|
4691
4691
|
"candidateContentHash": "sha256:60fcbb1c728194bd51d7d19cb732d1c3f1881dce7e0a6266b41c8b98cfd65693",
|
|
4692
4692
|
"kind": "agent-eval-loop",
|
|
4693
|
-
"recordDigest": "sha256:
|
|
4694
|
-
"runId": "agent-runtime-0.
|
|
4693
|
+
"recordDigest": "sha256:b2675f02c03fafc34d7d30d3ed46ac20a829b71a1d30ae0ab1bf994c4f5e60c3",
|
|
4694
|
+
"runId": "agent-runtime-0.308.0-proposal-fixture",
|
|
4695
4695
|
"schema": "agent-candidate-experiment"
|
|
4696
4696
|
}
|
|
4697
4697
|
},
|
|
@@ -4714,13 +4714,13 @@ var agent_improvement_proposal_default = {
|
|
|
4714
4714
|
}],
|
|
4715
4715
|
kind: "agent-improvement-proposal",
|
|
4716
4716
|
proposedAt: "2026-07-10T01:00:00.000Z",
|
|
4717
|
-
runId: "agent-runtime-0.
|
|
4717
|
+
runId: "agent-runtime-0.308.0-proposal-fixture"
|
|
4718
4718
|
};
|
|
4719
4719
|
//#endregion
|
|
4720
4720
|
//#region src/testing/fixtures/agent-profile-improvement-proposal.json
|
|
4721
4721
|
var agent_profile_improvement_proposal_default = {
|
|
4722
4722
|
changedSurfaces: ["prompt", "skills"],
|
|
4723
|
-
digest: "sha256:
|
|
4723
|
+
digest: "sha256:b4f721396bb8eb0fb1e0f7dda90e30846ccaf803cdf6407c271ab79e5885bfe5",
|
|
4724
4724
|
evaluation: {
|
|
4725
4725
|
"decision": {
|
|
4726
4726
|
"contributingChecks": [
|
|
@@ -6354,7 +6354,7 @@ var agent_profile_improvement_proposal_default = {
|
|
|
6354
6354
|
],
|
|
6355
6355
|
"metadata": {
|
|
6356
6356
|
"fixture": "agent-profile-improvement-proposal",
|
|
6357
|
-
"runtimeVersion": "0.
|
|
6357
|
+
"runtimeVersion": "0.308.0"
|
|
6358
6358
|
},
|
|
6359
6359
|
"objectives": [
|
|
6360
6360
|
{
|
|
@@ -6465,7 +6465,7 @@ var agent_profile_improvement_proposal_default = {
|
|
|
6465
6465
|
"baselineContentHash": "sha256:21c495a37c418c10bde64fbaa188beddeed31f1f051ea60a6a6582a9ee0db704",
|
|
6466
6466
|
"candidateContentHash": "sha256:103f77bc8481601eef1ad5fe6ba84a40dffabc3a44f421f8c8559121edab84e9",
|
|
6467
6467
|
"kind": "agent-eval-loop",
|
|
6468
|
-
"recordDigest": "sha256:
|
|
6468
|
+
"recordDigest": "sha256:16a3e90c68150ccbf71be9a5443027eb2cf69ebe9e33fc77dae510decddd5f39",
|
|
6469
6469
|
"runId": "profile-improvement-1",
|
|
6470
6470
|
"schema": "agent-profile-improvement-experiment"
|
|
6471
6471
|
}
|
package/dist/tui/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _t as SupervisorCleanupReceipt, gt as ProvisionedSupervisor, ht as ProvisionSupervisorRequest, mt as ProvisionSupervisorConnection, vt as provisionSupervisor } from "../index-
|
|
1
|
+
import { _t as SupervisorCleanupReceipt, gt as ProvisionedSupervisor, ht as ProvisionSupervisorRequest, mt as ProvisionSupervisorConnection, vt as provisionSupervisor } from "../index-EibbsKsH.js";
|
|
2
2
|
//#region src/tui/top-app.d.ts
|
|
3
3
|
/**
|
|
4
4
|
* The interactive side of the supervisor-run TUI: a keypress/mouse loop over the frames
|
package/dist/tui/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as provisionSupervisor } from "../provision-supervisor-
|
|
1
|
+
import { t as provisionSupervisor } from "../provision-supervisor-Cvp4Nm-y.js";
|
|
2
2
|
import { a as renderTopFrameWithLayout, i as renderTopFrame, n as runTopApp, r as loadTopSnapshot, t as renderTopOnce } from "../top-app-DaiR4LXM.js";
|
|
3
3
|
export { loadTopSnapshot, provisionSupervisor, renderTopFrame, renderTopFrameWithLayout, renderTopOnce, runTopApp };
|
|
@@ -2312,6 +2312,73 @@ interface ContinuationContext {
|
|
|
2312
2312
|
readonly signal: AbortSignal;
|
|
2313
2313
|
}
|
|
2314
2314
|
//#endregion
|
|
2315
|
+
//#region src/runtime/supervise/retained-executor.d.ts
|
|
2316
|
+
/**
|
|
2317
|
+
* Why a retained execution has no accepted terminal result, classified where the cause is still
|
|
2318
|
+
* a typed value rather than a string in a journal.
|
|
2319
|
+
*
|
|
2320
|
+
* One reason string used to cover two situations that call for opposite operator responses
|
|
2321
|
+
* (#1204): an execution whose status genuinely cannot be determined — refusing to replace it is
|
|
2322
|
+
* correct, and the operator must reconcile before retrying or pay twice for one turn — and a
|
|
2323
|
+
* provider that broke its contract, where the reader or provider needs repair before the original
|
|
2324
|
+
* execution can be reconciled. Six exhibits in three days wore the first name for the second fault.
|
|
2325
|
+
*
|
|
2326
|
+
* - `'unobservable'`: the execution may have run and nothing local can say. The safety refusal.
|
|
2327
|
+
* Anything unclassifiable lands here, and so does a 4xx, a not-found, or a client deadline hit
|
|
2328
|
+
* AFTER admission: the provider cannot resolve what it admitted, which is exactly the case the
|
|
2329
|
+
* refusal exists for, not a rejected request.
|
|
2330
|
+
* - `'provider-contract'`: the provider answered with something its own contract forbids — a
|
|
2331
|
+
* `RetainedRunProviderContractError` naming a broken answer (an `*_INVALID`, `*_CHANGED`,
|
|
2332
|
+
* `*_DUPLICATE`, `*_MISSING` code), an event bound to another run.
|
|
2333
|
+
* - `'request-rejected'`: the request itself was refused BEFORE it ran — a schema violation
|
|
2334
|
+
* (`ZodError`), an HTTP 4xx at admission, or a capacity refusal at admission that carries an
|
|
2335
|
+
* upstream capacity `code` and no HTTP status: the account owner's credential command refused a
|
|
2336
|
+
* fresh dispatch before the dispatch request existed. Never named after admission.
|
|
2337
|
+
* - `'transport'`: the provider or a gateway in front of it failed — an HTTP 5xx, a socket
|
|
2338
|
+
* error, a platform service answering with a server error. Status is in doubt only because
|
|
2339
|
+
* the transport was.
|
|
2340
|
+
* - `'nested-recovery'`: a nested manager's own recovery could not be reconstructed. Stated by
|
|
2341
|
+
* the thrower, never inferred.
|
|
2342
|
+
*
|
|
2343
|
+
* Classification reads the cause's structure — class name, `code`, HTTP `status`, a Zod issue
|
|
2344
|
+
* list — never its message text, because the provider is not a dependency of this package and
|
|
2345
|
+
* its messages are not a contract. #1204's exhibit 3 (an event without a stable id) is delivered
|
|
2346
|
+
* rather than thrown since agent-provider-tangle 1.4.0, so it no longer reaches this path; its
|
|
2347
|
+
* exhibit 6 is typed as `JsonBoundError` (`code: 'JSON_BOUND_VIOLATION'`) since 1.5.0 and lands
|
|
2348
|
+
* with the schema violations. A provider still throwing plain `Error`s lands on `'unobservable'`,
|
|
2349
|
+
* which is the safe side.
|
|
2350
|
+
*
|
|
2351
|
+
* One `RetainedRunProviderContractError` is NOT one meaning. The runtime mints it both when the
|
|
2352
|
+
* provider answered wrongly and when a READ of the provider failed (`RETAINED_RESULT_READ_FAILED`,
|
|
2353
|
+
* `RETAINED_CONTROL_REF_READ_FAILED`). The second kind is a wrapper: what it wraps decides, in a
|
|
2354
|
+
* post-admission context, and a wrapper around nothing classifiable is exhibit 4.
|
|
2355
|
+
*/
|
|
2356
|
+
type RetainedPendingCause = 'unobservable' | 'provider-contract' | 'request-rejected' | 'transport' | 'nested-recovery';
|
|
2357
|
+
/** @internal Validated original invocation selected for live adoption by the supervisor. */
|
|
2358
|
+
interface RetainedChildRecovery {
|
|
2359
|
+
readonly spawned: Extract<SpawnEvent, {
|
|
2360
|
+
kind: 'spawned';
|
|
2361
|
+
}>;
|
|
2362
|
+
readonly spec: AgentSpec;
|
|
2363
|
+
/** The node's original task, which its admitted identity digests. */
|
|
2364
|
+
readonly task: unknown;
|
|
2365
|
+
/** The admissions of the invocation being recovered. */
|
|
2366
|
+
readonly admissions: readonly RetainedRunAdmission[];
|
|
2367
|
+
readonly factory: ExecutorFactory<unknown>;
|
|
2368
|
+
readonly priorMaterialization?: ProfileMaterializationReceipt;
|
|
2369
|
+
/** The invocation being recovered, when it is a leaf's continuation rather than its first. */
|
|
2370
|
+
readonly continuation?: RetainedLeafContinuation;
|
|
2371
|
+
}
|
|
2372
|
+
/** @internal A leaf's later invocation: its own task, input and execution identity, and the
|
|
2373
|
+
* environment admission of the invocation it continues. */
|
|
2374
|
+
interface RetainedLeafContinuation {
|
|
2375
|
+
readonly task: unknown;
|
|
2376
|
+
readonly inputSeq: number;
|
|
2377
|
+
readonly executionId: string;
|
|
2378
|
+
readonly priorSession: RetainedRunEnvironmentAdmission;
|
|
2379
|
+
readonly priorSpent: Spend;
|
|
2380
|
+
}
|
|
2381
|
+
//#endregion
|
|
2315
2382
|
//#region src/runtime/supervise/upstream-unavailable.d.ts
|
|
2316
2383
|
/** How long an agent waits after its upstream refused a turn for capacity: the codes and
|
|
2317
2384
|
* statuses `upstreamUnavailableSignal` reads. A pause is not a failure: a driver spends neither
|
|
@@ -2372,6 +2439,9 @@ interface DriverAttemptRecord {
|
|
|
2372
2439
|
readonly madeProgress: boolean;
|
|
2373
2440
|
/** Set when this attempt ended the loop. */
|
|
2374
2441
|
readonly stop?: DriverAttemptStop;
|
|
2442
|
+
/** True when this attempt's pending invocation was abandoned rather than retried: see
|
|
2443
|
+
* `DriverRetryRun.resolvePending`. */
|
|
2444
|
+
readonly abandoned?: boolean;
|
|
2375
2445
|
/** Set when another attempt follows. For an `unavailable` attempt this is the pause, which is
|
|
2376
2446
|
* infrastructure time: together with `durationMs` it is what the outage cost this driver. */
|
|
2377
2447
|
readonly retryInMs?: number;
|
|
@@ -2600,6 +2670,12 @@ interface ProviderWorkspaceRetentionPort {
|
|
|
2600
2670
|
* Captures run on their own queue of {@link maxConcurrentCaptures} slots, under {@link timeoutMs}.
|
|
2601
2671
|
*/
|
|
2602
2672
|
captureCheckpoint?(context: ProviderCheckpointCaptureContext): Promise<AgentCandidateWorkspaceTree>;
|
|
2673
|
+
/** Capture a running environment's workspace without waiting for its turn to settle. */
|
|
2674
|
+
captureLive?(context: ProviderWorkspaceRetentionContext): Promise<AgentCandidateWorkspaceTree>;
|
|
2675
|
+
/** Time between live workspace captures. Omit to leave live capture disabled. */
|
|
2676
|
+
readonly liveIntervalMs?: number;
|
|
2677
|
+
/** Bound on one live capture and verification, including queue wait. Defaults to timeoutMs. */
|
|
2678
|
+
readonly liveTimeoutMs?: number;
|
|
2603
2679
|
/** Milliseconds between native captures of a running turn. Default 120,000. */
|
|
2604
2680
|
readonly nativeIntervalMs?: number;
|
|
2605
2681
|
/** Bound on one native capture, including its queue wait. Default 120,000. */
|
|
@@ -3174,71 +3250,6 @@ interface ScopeProgressInput {
|
|
|
3174
3250
|
* caller supplies `now`, so a test can observe a stall without waiting for one. */
|
|
3175
3251
|
declare function readWorkerProgress(scope: ScopeProgressInput, executor: ExecutorProgress | undefined, now: number, stallAfterMs?: number): WorkerProgress;
|
|
3176
3252
|
//#endregion
|
|
3177
|
-
//#region src/runtime/supervise/retained-executor.d.ts
|
|
3178
|
-
/**
|
|
3179
|
-
* Why a retained execution has no accepted terminal result, classified where the cause is still
|
|
3180
|
-
* a typed value rather than a string in a journal.
|
|
3181
|
-
*
|
|
3182
|
-
* One reason string used to cover two situations that call for opposite operator responses
|
|
3183
|
-
* (#1204): an execution whose status genuinely cannot be determined — refusing to replace it is
|
|
3184
|
-
* correct, and the operator must reconcile before retrying or pay twice for one turn — and a
|
|
3185
|
-
* provider that broke its contract, where the reader or provider needs repair before the original
|
|
3186
|
-
* execution can be reconciled. Six exhibits in three days wore the first name for the second fault.
|
|
3187
|
-
*
|
|
3188
|
-
* - `'unobservable'`: the execution may have run and nothing local can say. The safety refusal.
|
|
3189
|
-
* Anything unclassifiable lands here, and so does a 4xx, a not-found, or a client deadline hit
|
|
3190
|
-
* AFTER admission: the provider cannot resolve what it admitted, which is exactly the case the
|
|
3191
|
-
* refusal exists for, not a rejected request.
|
|
3192
|
-
* - `'provider-contract'`: the provider answered with something its own contract forbids — a
|
|
3193
|
-
* `RetainedRunProviderContractError` naming a broken answer (an `*_INVALID`, `*_CHANGED`,
|
|
3194
|
-
* `*_DUPLICATE`, `*_MISSING` code), an event bound to another run.
|
|
3195
|
-
* - `'request-rejected'`: the request itself was refused BEFORE it ran — a schema violation
|
|
3196
|
-
* (`ZodError`), an HTTP 4xx at admission. Never named after admission.
|
|
3197
|
-
* - `'transport'`: the provider or a gateway in front of it failed — an HTTP 5xx, a socket
|
|
3198
|
-
* error, a platform service answering with a server error. Status is in doubt only because
|
|
3199
|
-
* the transport was.
|
|
3200
|
-
* - `'nested-recovery'`: a nested manager's own recovery could not be reconstructed. Stated by
|
|
3201
|
-
* the thrower, never inferred.
|
|
3202
|
-
*
|
|
3203
|
-
* Classification reads the cause's structure — class name, `code`, HTTP `status`, a Zod issue
|
|
3204
|
-
* list — never its message text, because the provider is not a dependency of this package and
|
|
3205
|
-
* its messages are not a contract. #1204's exhibit 3 (an event without a stable id) is delivered
|
|
3206
|
-
* rather than thrown since agent-provider-tangle 1.4.0, so it no longer reaches this path; its
|
|
3207
|
-
* exhibit 6 is typed as `JsonBoundError` (`code: 'JSON_BOUND_VIOLATION'`) since 1.5.0 and lands
|
|
3208
|
-
* with the schema violations. A provider still throwing plain `Error`s lands on `'unobservable'`,
|
|
3209
|
-
* which is the safe side.
|
|
3210
|
-
*
|
|
3211
|
-
* One `RetainedRunProviderContractError` is NOT one meaning. The runtime mints it both when the
|
|
3212
|
-
* provider answered wrongly and when a READ of the provider failed (`RETAINED_RESULT_READ_FAILED`,
|
|
3213
|
-
* `RETAINED_CONTROL_REF_READ_FAILED`). The second kind is a wrapper: what it wraps decides, in a
|
|
3214
|
-
* post-admission context, and a wrapper around nothing classifiable is exhibit 4.
|
|
3215
|
-
*/
|
|
3216
|
-
type RetainedPendingCause = 'unobservable' | 'provider-contract' | 'request-rejected' | 'transport' | 'nested-recovery';
|
|
3217
|
-
/** @internal Validated original invocation selected for live adoption by the supervisor. */
|
|
3218
|
-
interface RetainedChildRecovery {
|
|
3219
|
-
readonly spawned: Extract<SpawnEvent, {
|
|
3220
|
-
kind: 'spawned';
|
|
3221
|
-
}>;
|
|
3222
|
-
readonly spec: AgentSpec;
|
|
3223
|
-
/** The node's original task, which its admitted identity digests. */
|
|
3224
|
-
readonly task: unknown;
|
|
3225
|
-
/** The admissions of the invocation being recovered. */
|
|
3226
|
-
readonly admissions: readonly RetainedRunAdmission[];
|
|
3227
|
-
readonly factory: ExecutorFactory<unknown>;
|
|
3228
|
-
readonly priorMaterialization?: ProfileMaterializationReceipt;
|
|
3229
|
-
/** The invocation being recovered, when it is a leaf's continuation rather than its first. */
|
|
3230
|
-
readonly continuation?: RetainedLeafContinuation;
|
|
3231
|
-
}
|
|
3232
|
-
/** @internal A leaf's later invocation: its own task, input and execution identity, and the
|
|
3233
|
-
* environment admission of the invocation it continues. */
|
|
3234
|
-
interface RetainedLeafContinuation {
|
|
3235
|
-
readonly task: unknown;
|
|
3236
|
-
readonly inputSeq: number;
|
|
3237
|
-
readonly executionId: string;
|
|
3238
|
-
readonly priorSession: RetainedRunEnvironmentAdmission;
|
|
3239
|
-
readonly priorSpent: Spend;
|
|
3240
|
-
}
|
|
3241
|
-
//#endregion
|
|
3242
3253
|
//#region src/runtime/supervise/trace-source.d.ts
|
|
3243
3254
|
interface ToolStepInput {
|
|
3244
3255
|
readonly toolName: string;
|
|
@@ -5023,6 +5034,39 @@ type SpawnEvent = {
|
|
|
5023
5034
|
verdict?: DefaultVerdict;
|
|
5024
5035
|
seq: number;
|
|
5025
5036
|
at: string;
|
|
5037
|
+
} | {
|
|
5038
|
+
/**
|
|
5039
|
+
* Runtime stopped reconciling this node's unfinished retained invocation: it failed
|
|
5040
|
+
* reconciliation with the same pending cause on consecutive drives, or once when that
|
|
5041
|
+
* failure would otherwise have ended the run, so the next drive starts a new invocation
|
|
5042
|
+
* instead of repeating the refusal. Written only for an invocation with no committed result. No admission or result of the abandoned
|
|
5043
|
+
* invocation is accepted afterwards, so an execution that does finish later can never be
|
|
5044
|
+
* accepted beside its replacement.
|
|
5045
|
+
*/
|
|
5046
|
+
kind: 'execution-abandoned';
|
|
5047
|
+
id: NodeId;
|
|
5048
|
+
/** The `execution-input` sequence of the abandoned invocation. */
|
|
5049
|
+
inputSeq: number;
|
|
5050
|
+
/** The cause every one of the consecutive reconciliation failures carried. */
|
|
5051
|
+
pendingCause: RetainedPendingCause;
|
|
5052
|
+
/** How many consecutive drives failed reconciliation with that cause. */
|
|
5053
|
+
failures: number;
|
|
5054
|
+
/** The last failure, as recorded. */
|
|
5055
|
+
detail: string;
|
|
5056
|
+
/**
|
|
5057
|
+
* What the provider confirmed about the abandoned execution. `stopped`: the provider
|
|
5058
|
+
* stopped it or reported it not live, so nothing of it still runs. `uncertain`: nothing
|
|
5059
|
+
* could be confirmed; it may have run, may still be running, and its spend is unknown.
|
|
5060
|
+
*/
|
|
5061
|
+
outcome: 'stopped' | 'uncertain';
|
|
5062
|
+
/** The provider's answer to the stop Runtime requested, when the invocation had dispatched. */
|
|
5063
|
+
stop?: {
|
|
5064
|
+
executionId: string;
|
|
5065
|
+
effect: RetainedRunEffect;
|
|
5066
|
+
error?: string;
|
|
5067
|
+
};
|
|
5068
|
+
seq: number;
|
|
5069
|
+
at: string;
|
|
5026
5070
|
} | {
|
|
5027
5071
|
/** Capture output retained independently of terminal outcome, spend, and recovery state. */
|
|
5028
5072
|
kind: 'execution-evidence';
|
|
@@ -5284,6 +5328,17 @@ type SpawnEvent = {
|
|
|
5284
5328
|
id: NodeId;
|
|
5285
5329
|
seq: number;
|
|
5286
5330
|
at: string;
|
|
5331
|
+
} | {
|
|
5332
|
+
/** The provider still has this environment's record, but authoritatively reports its
|
|
5333
|
+
* compute terminal. A new invocation may restore its checkpoint in another environment;
|
|
5334
|
+
* the source still needs a separate teardown receipt at settlement. */
|
|
5335
|
+
kind: 'environment-terminal';
|
|
5336
|
+
id: NodeId;
|
|
5337
|
+
provider: string;
|
|
5338
|
+
environmentId: string;
|
|
5339
|
+
status: 'failed' | 'expired';
|
|
5340
|
+
seq: number;
|
|
5341
|
+
at: string;
|
|
5287
5342
|
} | {
|
|
5288
5343
|
/** One provider environment a settled retained-pending child held, released at root
|
|
5289
5344
|
* settlement — or not. The run had reached a terminal outcome no later process resumes, so
|
|
@@ -5499,6 +5554,29 @@ type SpawnEvent = {
|
|
|
5499
5554
|
reason: 'no-env-channel' | 'no-worker-process' | 'caller-omitted';
|
|
5500
5555
|
seq: number;
|
|
5501
5556
|
at: string;
|
|
5557
|
+
} | {
|
|
5558
|
+
/** A subscription segment boundary. Informational: execution and cost replay skip it.
|
|
5559
|
+
* The open and close records share a segment index, and never contain credentials. */
|
|
5560
|
+
kind: 'seat-segment';
|
|
5561
|
+
id: NodeId;
|
|
5562
|
+
segmentIndex: number;
|
|
5563
|
+
stageIndex: number;
|
|
5564
|
+
phase: 'started' | 'ended';
|
|
5565
|
+
seat: string;
|
|
5566
|
+
harness: string;
|
|
5567
|
+
provider: string;
|
|
5568
|
+
model: string;
|
|
5569
|
+
reason?: 'usage-limit' | 'completed' | 'failed' | 'cancelled' | 'paused';
|
|
5570
|
+
seq: number;
|
|
5571
|
+
at: string;
|
|
5572
|
+
} | {
|
|
5573
|
+
/** Exact materialization for a later, authorized subscription segment. */
|
|
5574
|
+
kind: 'seat-materialized';
|
|
5575
|
+
id: NodeId;
|
|
5576
|
+
segmentIndex: number;
|
|
5577
|
+
receipt: ProfileMaterializationReceipt;
|
|
5578
|
+
seq: number;
|
|
5579
|
+
at: string;
|
|
5502
5580
|
} | {
|
|
5503
5581
|
/** One completed manager driver attempt, recorded before retry or observer callbacks.
|
|
5504
5582
|
* Errors are redacted and bounded. Informational: replay and cost readers skip it.
|
|
@@ -5510,6 +5588,13 @@ type SpawnEvent = {
|
|
|
5510
5588
|
attemptId?: string;
|
|
5511
5589
|
seq: number;
|
|
5512
5590
|
at: string;
|
|
5591
|
+
} | {
|
|
5592
|
+
/** Every authored seat was unavailable. The agent holds no model turn until this reset. */
|
|
5593
|
+
kind: 'seat-paused';
|
|
5594
|
+
id: NodeId;
|
|
5595
|
+
resumeAt: string;
|
|
5596
|
+
seq: number;
|
|
5597
|
+
at: string;
|
|
5513
5598
|
} | {
|
|
5514
5599
|
/** A manager's driver turn was refused by an unavailable upstream (an exhausted quota, a
|
|
5515
5600
|
* rate limit, an overload), and the driver paused before re-entering instead of failing.
|
|
@@ -6073,5 +6158,5 @@ interface WidenGate<Out> {
|
|
|
6073
6158
|
readonly judgeExempt?: boolean;
|
|
6074
6159
|
}
|
|
6075
6160
|
//#endregion
|
|
6076
|
-
export { SpawnJournal as $, RuntimeSessionStore as $a, ExecCtx as $i,
|
|
6077
|
-
//# sourceMappingURL=types-
|
|
6161
|
+
export { SpawnJournal as $, RuntimeSessionStore as $a, ExecCtx as $i, ProviderWorkspaceCaptureReceipt as $n, RetainedInteractiveAdmissionError as $r, RuntimeStreamEventSink as $t, NodeExecutionIdentity as A, RuntimeRunRow as Aa, RetainedRunSnapshot as Ai, RetainedInteractiveStartMaterial as An, ContinuationNoteInput as Ar, createPropagatingTraceEmitter as At, ResultBlobStore as B, AgentTaskContext as Ba, ReservationFloor as Bi, harnessTranscriptArtifact as Bn, checkVerdictOf as Br, RuntimeEventOtelOptions as Bt, ExecutorToolCall as C, ValidationCtx as Ca, RetainedRunDispatchedAdmission as Ci, createActivityLog as Cn, CONTINUATION_FACTS as Cr, WorkerTraceResolver as Ct, MaterializedExecutionIdentity as D, RuntimeRunHandle as Da, RetainedRunHandle as Di, RetainedInteractiveAdmissionHook as Dn, ContinuationAppend as Dr, workerTraceHeaders as Dt, HeldEnvironment as E, RuntimeRunCost as Ea, RetainedRunEventOptions as Ei, RecoverRetainedInteractiveRunOptions as En, CheckVerdict as Er, workerTraceEnv as Et, ProviderModelAttemptEvidence as F, AgentBackendInput as Fa, BudgetPool as Fi, HarnessTranscriptFile as Fn, ContinuationProfile as Fr, OtelAttribute as Ft, RootMaterialization as G, KnowledgeReadinessDecision as Ga, ReservationTicket as Gi, RetainedHarnessTranscriptCapture as Gn, verdictFromJudgeScore as Gr, createOtelExporter as Gt, ResumedWork as H, AgentTaskSpec as Ha, ReservationRejection as Hi, HarnessTranscriptMetadata as Hn, expandQuestions as Hr, buildLoopSpanNodes as Ht, ProviderModelExecutionEvidence as I, AgentExecutionBackend as Ia, BudgetPoolRestore as Ii, HarnessTranscriptUnavailable as In, PanelFinding as Ir, OtelExportConfig as It, RootStreamReceipt as J, OpenAIChatToolChoice as Ja, createBudgetPool as Ji, retainHarnessTranscript as Jn, BackendTransportError as Jr, padSpanId as Jt, RootProviderModelEvidence as K, OpenAIChatResponseFormat as Ka, ReservationWaitRefused as Ki, RetainedHarnessTranscriptDescriptor as Kn, AgentEvalError$1 as Kr, generateSpanId as Kt, RecursiveReservationPolicy as L, AgentKnowledgeProvider as La, BudgetReadout as Li, HarnessTranscriptUnavailableReason as Ln, VerdictSummary as Lr, OtelExportStats as Lt, NodeSnapshot as M, startRuntimeRun as Ma, RetainedRunTurnInput as Mi, HarnessTranscriptArtifact as Mn, ContinuationPanelInput as Mr, readTraceContextFromEnv as Mt, NodeStatus as N, AgentAdapter as Na, StartRetainedRunInEnvironmentOptions as Ni, HarnessTranscriptCapture as Nn, ContinuationPanelResult as Nr, traceContextToEnv as Nt, MaterializedModelIdentity as O, RuntimeRunOptions as Oa, RetainedRunIntentAdmission as Oi, RetainedInteractiveEnvironmentInput as On, ContinuationContext as Or, workerTraceSeamKey as Ot, ProfileMaterializationReceipt as P, AgentBackendContext as Pa, StartRetainedRunOptions as Pi, HarnessTranscriptEvidence as Pn, ContinuationPolicy as Pr, LoopSpanNode as Pt, SpawnEvent as Q, RuntimeSession as Qa, Driver as Qi, ProviderWorkspaceCaptureProvenance as Qn, PlannerError as Qr, RuntimeStreamEventCollector as Qt, ResourceLimit as R, AgentRuntimeEvent as Ra, BudgetReconcileFault as Ri, ReadableEnvironment as Rn, admitContinuationPolicy as Rr, OtelExporter as Rt, ExecutorTeardownWarning as S, SelectionReceipt as Sa, RetainedRunCancellation as Si, WorkerProgress as Sn, AdmittedFinding as Sr, WorkspaceCheckpointMarker as St, Handle as T, RuntimeRunCompleteInput as Ta, RetainedRunEnvironmentAdmission as Ti, ReconnectRetainedInteractiveRunOptions as Tn, CheckUnavailableError as Tr, readWorkerTraceContext as Tt, RetainedExecutionState as U, AgentTaskStatus as Ua, ReservationShortfall as Ui, HarnessTranscriptReadLimits as Un, failedItems as Ur, buildRuntimeEventOtelSpans as Ut, ResumedKeyState as V, AgentTaskRunResult as Va, ReservationHolder as Vi, persistHarnessTranscript as Vn, distillFindings as Vr, buildLoopOtelSpans as Vt, RootHandle as W, BackendErrorDetail as Wa, ReservationStage as Wi, HarnessTranscriptReadOptions as Wn, passedItems as Wr, createOpenInferenceFileExporter as Wt, Scope as X, RunAgentTaskStreamOptions as Xa, AgentRunSpec as Xi, ProviderNativeCapturePhase as Xn, JudgeError as Xr, toOtelAttributes as Xt, Runtime as Y, RunAgentTaskOptions as Ya, spendFromUsageEvents as Yi, ProviderCheckpointCaptureContext as Yn, ConfigError as Yr, padTraceId as Yt, Settled as Z, RuntimeCanonicalStreamEvent as Za, DefaultVerdict$1 as Zi, ProviderWorkspaceAttemptProvenance as Zn, NotFoundError as Zr, RuntimeEventCollector as Zt, ExecutorMaterialization as _, MountManifestEntry as _a, RetainedInteractiveIntentAdmission as _i, ActivityNote as _n, summarizeDriverAttempts as _r, WidenGate as _t, BudgetOverspend as a, LoopIterationStartedPayload as aa, SlotPermit as ai, createRuntimeStreamEventCollector as an, DriverAttemptStop as ar, SpendGap as at, ExecutorRegistry as b, RunProvenance as ba, RetainedRunAdmissionHook as bi, ScopeProgressInput as bn, RetainedChildRecovery as br, WorkerTraceEvidence as bt, EnvironmentTeardownReceipt as c, LoopPlanPayload as ca, NativeContextContinuationExecution as ci, sanitizeRuntimeStreamEvent as cn, DriverContinuationRecord as cr, SubtreeSummary as ct, ExecutorAccounting as d, LoopStartedPayload as da, ReconnectRetainedRunOptions as di, ToolStepInput as dn, DriverLoopRecord as dr, SupervisorOpts as dt, Iteration as ea, RetainedInteractiveBindingError as ei, RuntimeStreamEventSummary as en, RuntimeStreamEvent as eo, ProviderWorkspaceCaptureResult as er, SpawnOpts as et, ExecutorCancellation as f, LoopTeardownFailedPayload as fa, RecoverRetainedRunIntentOptions as fi, TraceSource as fn, DriverProgressMark as fr, TokenUsageProvenance as ft, ExecutorFactory as g, LoopWinner as ga, RetainedInteractiveEnvironmentAdmission as gi, ActivityLog as gn, classifyDriverFailure as gr, UsageEvent as gt, ExecutorExecutionBinding as h, LoopTraceEvent as ha, RetainedInteractiveAdmission as hi, sandboxSessionTraceSource as hn, DriverRetryPolicy as hr, UnknownMaterializationReason as ht, Budget as i, LoopIterationEndedPayload as ia, ValidationError as ii, createRuntimeEventCollector as in, DriverAttemptRecord as ir, SpendChannel as it, NodeId as j, RuntimeRunStatus as ja, RetainedRunStartMaterial as ji, StartRetainedInteractiveRunOptions as jn, ContinuationPanel as jr, mergeTraceEnv as jt, NoWinnerError as k, RuntimeRunPersistenceAdapter as ka, RetainedRunReplayPoint as ki, RetainedInteractiveRunHandle as kn, ContinuationEntry as kr, TraceContext as kt, ExecutionBindingReceipt as l, LoopResult as la, NativeContextContinuationHandle as li, SessionMessageLike as ln, DriverContractState as lr, SupervisedResult as lt, ExecutorContext as m, LoopTraceEmitter as ma, RecoverRetainedRunResult as mi, decodeToolPart as mn, DriverRepromptRefusal as mr, UnconfirmedTeardown as mt, AgentExecutionRef as n, LoopEndedPayload as na, RetainedRunDispatchBindingError as ni, SanitizedKnowledgeReadinessReport as nn, ProviderWorkspaceRetentionContext as nr, SpawnRejection as nt, BudgetViolation as o, LoopLineageOptions as oa, WorkerSlots as oi, sanitizeAgentRuntimeEvent as on, DriverAttemptsExhaustedError as or, SteerableRootHandle as ot, ExecutorCancellationRequest as p, LoopTokenUsage as pa, RecoverRetainedRunOptions as pi, createPushTraceSource as pn, DriverReentry as pr, TreeView as pt, RootSignal as q, OpenAIChatTool as qa, ReserveOptions as qi, resolveHarnessTranscriptCapture as qn, AgentEvalErrorCode as qr, loopEventToOtelSpan as qt, AgentSpec as r, LoopIterationDispatchPayload as ra, RuntimeRunStateError as ri, SanitizedKnowledgeRequirement as rn, ProviderWorkspaceRetentionPort as rr, Spend as rt, DefaultVerdict as s, LoopPlanDescription as sa, createWorkerSlots as si, sanitizeKnowledgeReadinessReport as sn, DriverBudgetReadout as sr, SubtreeResult as st, Agent as t, LoopDecisionPayload as ta, RetainedRunAdmissionError as ti, RuntimeTelemetryOptions as tn, ProviderWorkspaceEntryMetadata as tr, SpawnPrior as tt, Executor as u, LoopSandboxPlacement as ua, NativeContextContinuationInput as ui, SessionTraceBox as un, DriverFailureClass as ur, Supervisor as ut, ExecutorNodeContext as v, MountRecorder as va, RetainedInteractiveStartedAdmission as vi, DEFAULT_STALL_AFTER_MS as vn, upstreamUnavailableSignal as vr, WorkerInteractiveSession as vt, FleetYield as w, Validator as wa, RetainedRunEffect as wi, readWorkerProgress as wn, CheckRead as wr, WorkerTraceSeamCarrier as wt, ExecutorResult as x, SandboxClient as xa, RetainedRunCancelOptions as xi, TeamProgress as xn, RetainedPendingCause as xr, WorkerTraceUnavailableReason as xt, ExecutorProgressEvent as y, OutputAdapter as ya, RetainedRunAdmission as yi, ExecutorProgress as yn, UnavailablePausePolicy as yr, WorkerInteractiveUnavailableReason as yt, ResourceSpend as z, AgentRuntimeEventSink as za, LeakedReservation as zi, captureHarnessTranscript as zn, admitFinding as zr, OtelSpan as zt };
|
|
6162
|
+
//# sourceMappingURL=types-B2IOlN8R.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/agent-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.308.0",
|
|
4
4
|
"description": "Shared task-lifecycle skeleton for agents: a recursive loop kernel for chat turns, one-shot tasks, and multi-attempt loops, with trace capture and eval-gated self-improvement. Domain behavior lives in adapters; scoring and ship-gates in @tangle-network/agent-eval.",
|
|
5
5
|
"homepage": "https://github.com/tangle-network/agent-runtime#readme",
|
|
6
6
|
"repository": {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@biomejs/biome": "^2.5.11",
|
|
105
105
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
106
106
|
"@tangle-network/agent-eval": "0.209.1",
|
|
107
|
-
"@tangle-network/agent-interface": "^3.
|
|
107
|
+
"@tangle-network/agent-interface": "^3.1.1",
|
|
108
108
|
"@tangle-network/agent-provider-tangle": "2.0.0",
|
|
109
109
|
"@tangle-network/sandbox": "^0.60.0",
|
|
110
110
|
"@types/node": "26.4.0",
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"license": "MIT",
|
|
129
129
|
"peerDependencies": {
|
|
130
130
|
"@tangle-network/agent-eval": ">=0.209.1 <0.210.0",
|
|
131
|
-
"@tangle-network/agent-interface": "^3.
|
|
131
|
+
"@tangle-network/agent-interface": "^3.1.1",
|
|
132
132
|
"@tangle-network/sandbox": ">=0.58.4 <0.61.0"
|
|
133
133
|
},
|
|
134
134
|
"dependencies": {
|
|
@@ -45,6 +45,11 @@ Grade only outputs that the rerun reproduces.
|
|
|
45
45
|
A parent that promotes children on proxy passes alone selects for the gap; have the referee attack a result before anyone builds on it.
|
|
46
46
|
Keep the headline gate fixed for the whole task; report a stricter bar as a second line.
|
|
47
47
|
|
|
48
|
+
For a customer commission, the bar is the first deliverable.
|
|
49
|
+
Author the root to spend its first milestone as the expert team for the domain: 50 to 100 concrete, checkable expectations across mechanics, domain substance, finance, risk, plan, evidence and presentation, the deliverable spec, and a workplan.
|
|
50
|
+
An engagement partner outside the authoring lineage raises the bar against named exemplars and adds what it misses; part of its additions stay held back.
|
|
51
|
+
A hygiene bar (present, reproduces, calculates) is the proxy, not the audience; directors optimise to whatever bar they are given.
|
|
52
|
+
|
|
48
53
|
## 4. Choose roles and a model for each
|
|
49
54
|
|
|
50
55
|
Proposers: cheap, high-throughput models where an exact checker exists, with an occasional strong model.
|
|
@@ -209,6 +214,7 @@ Null certificate: space, rows, calibration; registered reproducer, sha256, sourc
|
|
|
209
214
|
Credited exit, in the agents' words:
|
|
210
215
|
Served completion tools and observed materialization:
|
|
211
216
|
Development progress measurement, calibration, and feedback cadence:
|
|
217
|
+
Commission bar: engagement spec, partner, template it starts from:
|
|
212
218
|
Stop: installed check/continuation policy, deadline, maxBarren, budget, cancellation:
|
|
213
219
|
Known traps handed to agents:
|
|
214
220
|
Budget, caps, key and its dollar cap:
|