@tangle-network/agent-runtime 0.233.1 → 0.235.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 (54) hide show
  1. package/dist/{activation-D0_qcEXf.js → activation-BJakmnI1.js} +2 -2
  2. package/dist/{activation-D0_qcEXf.js.map → activation-BJakmnI1.js.map} +1 -1
  3. package/dist/{activation-C8fPmjWa.d.ts → activation-BqEP6ExG.d.ts} +2 -2
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-BR52Rt39.js → coordination-driver-mujMubUb.js} +2 -2
  7. package/dist/{coordination-driver-BR52Rt39.js.map → coordination-driver-mujMubUb.js.map} +1 -1
  8. package/dist/{delegate-CA-Tnr1_.js → delegate-BqN82j4Z.js} +2 -2
  9. package/dist/{delegate-CA-Tnr1_.js.map → delegate-BqN82j4Z.js.map} +1 -1
  10. package/dist/durable.d.ts +4 -2
  11. package/dist/durable.js +4 -2
  12. package/dist/durable.js.map +1 -1
  13. package/dist/{graph-BtMQMQin.js → graph-B-Sbq3QW.js} +3 -3
  14. package/dist/{graph-BtMQMQin.js.map → graph-B-Sbq3QW.js.map} +1 -1
  15. package/dist/{improvement-cycle-WJJALdil.js → improvement-cycle-DpX5QVx0.js} +3 -3
  16. package/dist/{improvement-cycle-WJJALdil.js.map → improvement-cycle-DpX5QVx0.js.map} +1 -1
  17. package/dist/{index-BwWBXoyq.d.ts → index-DgFsQnzq.d.ts} +4 -17
  18. package/dist/index.d.ts +6 -6
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence.d.ts +3 -3
  21. package/dist/intelligence.js +3 -3
  22. package/dist/kernel.d.ts +4 -4
  23. package/dist/kernel.js +8 -8
  24. package/dist/{loop-runner-bin-DaOd42mA.d.ts → loop-runner-bin-3H3Iq9iY.d.ts} +3 -3
  25. package/dist/{loop-runner-bin-7cS9NAmk.js → loop-runner-bin-Dyc1IS0f.js} +3 -3
  26. package/dist/{loop-runner-bin-7cS9NAmk.js.map → loop-runner-bin-Dyc1IS0f.js.map} +1 -1
  27. package/dist/loop-runner-bin.d.ts +1 -1
  28. package/dist/loop-runner-bin.js +1 -1
  29. package/dist/mcp/bin.js +3 -3
  30. package/dist/mcp/index.d.ts +5 -5
  31. package/dist/mcp/index.js +4 -4
  32. package/dist/{openai-tools-BdFqNlha.d.ts → openai-tools-CoAfqfko.d.ts} +2 -2
  33. package/dist/profiles.d.ts +2 -2
  34. package/dist/{provision-supervisor-BME3OgTk.js → provision-supervisor-Wh8JAo-o.js} +3 -3
  35. package/dist/{provision-supervisor-BME3OgTk.js.map → provision-supervisor-Wh8JAo-o.js.map} +1 -1
  36. package/dist/{runtime-CcfA_ElB.js → runtime-Dffe3FZC.js} +8 -8
  37. package/dist/{runtime-CcfA_ElB.js.map → runtime-Dffe3FZC.js.map} +1 -1
  38. package/dist/{server-DU3nDuDb.js → server-BdKJxqUd.js} +3 -3
  39. package/dist/{server-DU3nDuDb.js.map → server-BdKJxqUd.js.map} +1 -1
  40. package/dist/{stream-agent-turn-aXpd9b_N.d.ts → stream-agent-turn-r1mtjn0i.d.ts} +2 -2
  41. package/dist/{structural-rollout-YlkrevWE.js → structural-rollout-BLTQRy-B.js} +2 -2
  42. package/dist/{structural-rollout-YlkrevWE.js.map → structural-rollout-BLTQRy-B.js.map} +1 -1
  43. package/dist/{substrate-B2Os0b0f.d.ts → substrate-BfNaAM8h.d.ts} +2 -2
  44. package/dist/{supervise-CAJWyXQ-.js → supervise-DMiJQB2_.js} +3 -3
  45. package/dist/{supervise-CAJWyXQ-.js.map → supervise-DMiJQB2_.js.map} +1 -1
  46. package/dist/{supervisor-C2xWmESG.js → supervisor-CBtuIoqP.js} +354 -96
  47. package/dist/supervisor-CBtuIoqP.js.map +1 -0
  48. package/dist/testing.d.ts +2 -2
  49. package/dist/testing.js +12 -12
  50. package/dist/tui/index.d.ts +1 -1
  51. package/dist/tui/index.js +1 -1
  52. package/dist/{types-F5MG_7Qq.d.ts → types-BxjpKpb-.d.ts} +112 -13
  53. package/package.json +1 -1
  54. package/dist/supervisor-C2xWmESG.js.map +0 -1
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $a as SuperviseTestOptions, $t as runGraphWithTestBrain, Ao as supervisorAgentWithTestBrain, Tn as driverAgent, Yt as RunGraphTestOptions, to as superviseWithTestBrain, wn as DriverAgentOptions, xo as SupervisorAgentTestDeps } from "./index-BwWBXoyq.js";
2
- import { Dn as ToolLoopChat, En as ToolLoopCallContext } from "./stream-agent-turn-aXpd9b_N.js";
1
+ import { $a as SuperviseTestOptions, $t as runGraphWithTestBrain, Ao as supervisorAgentWithTestBrain, Tn as driverAgent, Yt as RunGraphTestOptions, to as superviseWithTestBrain, wn as DriverAgentOptions, xo as SupervisorAgentTestDeps } from "./index-DgFsQnzq.js";
2
+ import { Dn as ToolLoopChat, En as ToolLoopCallContext } from "./stream-agent-turn-r1mtjn0i.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
- import { f as verifyAgentImprovementProposal } from "./improvement-cycle-WJJALdil.js";
1
+ import { f as verifyAgentImprovementProposal } from "./improvement-cycle-DpX5QVx0.js";
2
2
  import { o as canonicalCandidateDigest$1, u as immutableCandidateValue } from "./protected-redaction-wGo44k2K.js";
3
3
  import { M as parseExactAgentProfile, w as applyExactAgentProfileDiff } from "./prepare-Dc30WRB0.js";
4
- import { p as supervisorAgentWithTestBrain, r as superviseWithTestBrain } from "./supervise-CAJWyXQ-.js";
5
- import { r as driverAgent } from "./coordination-driver-BR52Rt39.js";
6
- import { i as runGraphWithTestBrain } from "./graph-BtMQMQin.js";
4
+ import { p as supervisorAgentWithTestBrain, r as superviseWithTestBrain } from "./supervise-DMiJQB2_.js";
5
+ import { r as driverAgent } from "./coordination-driver-mujMubUb.js";
6
+ import { i as runGraphWithTestBrain } from "./graph-B-Sbq3QW.js";
7
7
  import { SANDBOX_SIZE_PRESET_NAMES } 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:fcda921d124e3a3c3ffd35d6c762f2863dcc29960b7098b9ca889a4a3842b79d",
11
+ digest: "sha256:1796588e4afa2c014ab97ea9f0bd890cfb52fe252a0368658701e76d30c13d5c",
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.233.1"
4582
+ "runtimeVersion": "0.235.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:b13fd55539afd15bdff24e2b258fb8793d103a629511f433758c32eeedc68182",
4694
- "runId": "agent-runtime-0.233.1-proposal-fixture",
4693
+ "recordDigest": "sha256:6354241d7ef4a495c5f49fa308f1e197d198d03d9b13f81bf95bc81cf23dedf4",
4694
+ "runId": "agent-runtime-0.235.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.233.1-proposal-fixture"
4717
+ runId: "agent-runtime-0.235.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:820acd9c859c559efd8d38971a9b54772e4198d96f4cba32a094cf9859476699",
4723
+ digest: "sha256:abe63493ef0f10236a6a77c5eee3cf4ea771e02bd085735fd57eb6180c086c09",
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.233.1"
6357
+ "runtimeVersion": "0.235.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:e8e375b262bf2dbaa895afcf863ffb4ffe09c383988a66aa08e09c017d949809",
6468
+ "recordDigest": "sha256:dbc8aa9c080c23a0b1cf3ca9116767beb27f75f9b8313574942b6c5d33e8a78b",
6469
6469
  "runId": "profile-improvement-1",
6470
6470
  "schema": "agent-profile-improvement-experiment"
6471
6471
  }
@@ -1,4 +1,4 @@
1
- import { Ct as ProvisionedSupervisor, St as ProvisionSupervisorRequest, Tt as provisionSupervisor, wt as SupervisorCleanupReceipt, xt as ProvisionSupervisorConnection } from "../index-BwWBXoyq.js";
1
+ import { Ct as ProvisionedSupervisor, St as ProvisionSupervisorRequest, Tt as provisionSupervisor, wt as SupervisorCleanupReceipt, xt as ProvisionSupervisorConnection } from "../index-DgFsQnzq.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-BME3OgTk.js";
1
+ import { t as provisionSupervisor } from "../provision-supervisor-Wh8JAo-o.js";
2
2
  import { a as renderTopFrameWithLayout, i as renderTopFrame, n as runTopApp, r as loadTopSnapshot, t as renderTopOnce } from "../top-app-CMMd8DgR.js";
3
3
  export { loadTopSnapshot, provisionSupervisor, renderTopFrame, renderTopFrameWithLayout, renderTopOnce, runTopApp };
@@ -2015,6 +2015,56 @@ interface ScopeProgressInput {
2015
2015
  * caller supplies `now`, so a test can observe a stall without waiting for one. */
2016
2016
  declare function readWorkerProgress(scope: ScopeProgressInput, executor: ExecutorProgress | undefined, now: number, stallAfterMs?: number): WorkerProgress;
2017
2017
  //#endregion
2018
+ //#region src/runtime/supervise/retained-executor.d.ts
2019
+ /**
2020
+ * Why a retained execution has no accepted terminal result, classified where the cause is still
2021
+ * a typed value rather than a string in a journal.
2022
+ *
2023
+ * One reason string used to cover two situations that call for opposite operator responses
2024
+ * (#1204): an execution whose status genuinely cannot be determined — refusing to replace it is
2025
+ * correct, and the operator must reconcile before retrying or pay twice for one turn — and a
2026
+ * provider that broke its contract, where nothing needs reconciling and the right response is to
2027
+ * fix or report the provider. Six exhibits in three days wore the first name for the second fault.
2028
+ *
2029
+ * - `'unobservable'`: the execution may have run and nothing local can say. The safety refusal.
2030
+ * Anything unclassifiable lands here, and so does a 4xx, a not-found, or a client deadline hit
2031
+ * AFTER admission: the provider cannot resolve what it admitted, which is exactly the case the
2032
+ * refusal exists for, not a rejected request.
2033
+ * - `'provider-contract'`: the provider answered with something its own contract forbids — a
2034
+ * `RetainedRunProviderContractError` naming a broken answer (an `*_INVALID`, `*_CHANGED`,
2035
+ * `*_DUPLICATE`, `*_MISSING` code), an event bound to another run.
2036
+ * - `'request-rejected'`: the request itself was refused BEFORE it ran — a schema violation
2037
+ * (`ZodError`), an HTTP 4xx at admission. Never named after admission.
2038
+ * - `'transport'`: the provider or a gateway in front of it failed — an HTTP 5xx, a socket
2039
+ * error, a platform service answering with a server error. Status is in doubt only because
2040
+ * the transport was.
2041
+ * - `'nested-recovery'`: a nested manager's own recovery could not be reconstructed. Stated by
2042
+ * the thrower, never inferred.
2043
+ *
2044
+ * Classification reads the cause's structure — class name, `code`, HTTP `status`, a Zod issue
2045
+ * list — never its message text, because the provider is not a dependency of this package and
2046
+ * its messages are not a contract. Two exhibits (#1204's 3 and 6) are thrown by the provider as
2047
+ * plain `Error`s with no code, so a structure-only classifier cannot name them until the provider
2048
+ * types them; they land on `'unobservable'`, which is the safe side.
2049
+ *
2050
+ * One `RetainedRunProviderContractError` is NOT one meaning. The runtime mints it both when the
2051
+ * provider answered wrongly and when a READ of the provider failed (`RETAINED_RESULT_READ_FAILED`,
2052
+ * `RETAINED_CONTROL_REF_READ_FAILED`). The second kind is a wrapper: what it wraps decides, in a
2053
+ * post-admission context, and a wrapper around nothing classifiable is exhibit 4.
2054
+ */
2055
+ type RetainedPendingCause = 'unobservable' | 'provider-contract' | 'request-rejected' | 'transport' | 'nested-recovery';
2056
+ /** @internal Validated original invocation selected for live adoption by the supervisor. */
2057
+ interface RetainedChildRecovery {
2058
+ readonly spawned: Extract<SpawnEvent, {
2059
+ kind: 'spawned';
2060
+ }>;
2061
+ readonly spec: AgentSpec;
2062
+ readonly task: unknown;
2063
+ readonly admissions: readonly RetainedRunAdmission[];
2064
+ readonly factory: ExecutorFactory<unknown>;
2065
+ readonly priorMaterialization?: ProfileMaterializationReceipt;
2066
+ }
2067
+ //#endregion
2018
2068
  //#region src/runtime/supervise/trace-source.d.ts
2019
2069
  interface ToolStepInput {
2020
2070
  readonly toolName: string;
@@ -3517,6 +3567,12 @@ type Settled<Out> = {
3517
3567
  * states, so a reader never splits this population on `reason` text — which is identical
3518
3568
  * on every one of these children. */
3519
3569
  retainedExecution?: RetainedExecutionState;
3570
+ /** WHY the retained execution has no accepted result, as a value: the safety refusal
3571
+ * (`'unobservable'`) against a provider contract violation, a rejected request, a lost
3572
+ * transport, or a nested recovery that could not be reconstructed. Present iff
3573
+ * `retainedExecution` is; the `reason` text names the same thing, but a reader must never
3574
+ * have to parse it (#1204). */
3575
+ retainedPendingCause?: RetainedPendingCause;
3520
3576
  /** Epoch ms parsed from the durable settlement/cancellation record when available. */
3521
3577
  settledAt?: number;
3522
3578
  seq: number;
@@ -3762,6 +3818,8 @@ interface NodeSnapshot {
3762
3818
  * (`materializeTreeView`) state the same fact, so a settle record's `tree` answers the
3763
3819
  * retained-vs-down question without the observer journal. */
3764
3820
  readonly retainedExecution?: RetainedExecutionState;
3821
+ /** Why a retained child has no accepted result; see `RetainedPendingCause`. */
3822
+ readonly retainedPendingCause?: RetainedPendingCause;
3765
3823
  }
3766
3824
  /** The live tree — what `scope.view` / `RootHandle.view()` materialize for a viewer. */
3767
3825
  interface TreeView {
@@ -3862,8 +3920,13 @@ type SpawnEvent = {
3862
3920
  harnessTranscript?: HarnessTranscriptEvidence;
3863
3921
  /** Present when the reconciled spend exceeded the reservation, on either status. */
3864
3922
  budgetViolation?: BudgetViolation;
3865
- /** Written only by the release sweep, on the same tree, after every `environment-teardown`
3866
- * receipt for the node reads `destroyed: true` and the executor's own teardown confirmed.
3923
+ /** Written by the release sweep in the settling process, on the same tree, after every
3924
+ * `environment-teardown` receipt for the node reads `destroyed: true` and the executor's
3925
+ * own teardown confirmed — or by `healReleasedSlots` on the next resume, when that process
3926
+ * died between the last `destroyed: true` receipt and this record: the same builder, `seq`
3927
+ * and `at`, read from the `reconciled` record, so the bytes are identical either way. A
3928
+ * `destroyed: false` receipt, an empty receipt set, or a `reconciled` record without
3929
+ * `settledSeq` leaves the slot open.
3867
3930
  * `spent` is this node's child-work component of the reconcile the pool committed — for
3868
3931
  * a leaf the streamed floor itself, for a recursive executor its `accounting().reported`
3869
3932
  * split with the remainder on its `metered` records — never the reservation ceiling.
@@ -3873,6 +3936,7 @@ type SpawnEvent = {
3873
3936
  * instant, and the release instant is on the receipt immediately before it. Typed so a
3874
3937
  * `'pending'` can never be journaled: the journal states that as `reconciled`. */
3875
3938
  retainedExecution?: Extract<RetainedExecutionState, 'released'>;
3939
+ retainedPendingCause?: RetainedPendingCause;
3876
3940
  seq: number;
3877
3941
  at: string;
3878
3942
  } | {
@@ -3892,6 +3956,7 @@ type SpawnEvent = {
3892
3956
  /** As on `settled`: a retained child that was cancelled settles `cancelled`, and the one
3893
3957
  * builder writes whichever kind the settlement had. */
3894
3958
  retainedExecution?: Extract<RetainedExecutionState, 'released'>;
3959
+ retainedPendingCause?: RetainedPendingCause;
3895
3960
  seq: number;
3896
3961
  at: string;
3897
3962
  } | {
@@ -3995,11 +4060,15 @@ type SpawnEvent = {
3995
4060
  * observed, while its cursor slot stays OPEN so a resume can recover the execution. It stands
3996
4061
  * in for the `settled` record an open node cannot carry: cost readers and a restored pool
3997
4062
  * charge this floor for the node instead of its declared ceiling, and a later `settled` or
3998
- * `cancelled` record for the same node supersedes it. That record has two writers: a
3999
- * resumed process's recovered settlement, or the release sweep's terminal record marked
4000
- * `retainedExecution: 'released'`. A driver's own inference travels on its
4001
- * `metered` record as on every other path, so `reconciled + metered` is what the pool
4002
- * committed. Its `seq` lives outside the cursor-uniqueness namespace. */
4063
+ * `cancelled` record for the same node supersedes it. That record has three writers: a
4064
+ * resumed process's recovered settlement, the release sweep's terminal record marked
4065
+ * `retainedExecution: 'released'`, or `healReleasedSlots` on the next resume when the
4066
+ * process died between the last `environment-teardown` receipt and that record. The last
4067
+ * two write the same bytes, because both read the settlement from THIS record: it is
4068
+ * literally the settlement it stands in for, minus the cursor position it cannot hold. A
4069
+ * driver's own inference travels on its `metered` record as on every other path, so
4070
+ * `reconciled + metered` is what the pool committed. Its `seq` lives outside the
4071
+ * cursor-uniqueness namespace; `settledSeq` is the cursor seq. */
4003
4072
  kind: 'reconciled';
4004
4073
  id: NodeId;
4005
4074
  spent: Spend;
@@ -4008,6 +4077,29 @@ type SpawnEvent = {
4008
4077
  * #1244 children exactly — dropped mid-run with a live box the capture read. A later
4009
4078
  * terminal record for the node carries the same receipt forward. */
4010
4079
  harnessTranscript?: HarnessTranscriptEvidence;
4080
+ /** The cursor seq `next()` stamped on the delivery this floor stands in for — what
4081
+ * `finalizeSettlement` holds as `child.settledSeq` and the release sweep writes the
4082
+ * terminal record under. A resume that heals a crashed sweep reads the seq back from here,
4083
+ * so a record without it cannot be healed. Optional only so journals written before this
4084
+ * field existed remain replayable. */
4085
+ settledSeq?: number;
4086
+ /** The settlement the driver received, verbatim, as `settled`/`cancelled` carry it. Optional
4087
+ * only so journals written before these fields existed remain replayable. */
4088
+ reason?: string;
4089
+ retainedPendingCause?: RetainedPendingCause;
4090
+ infra?: boolean;
4091
+ trace?: WorkerTraceEvidence;
4092
+ outRef?: string;
4093
+ providerModel?: ProviderModelExecutionEvidence;
4094
+ /** The overspend the RETAINED reconcile returned, which the open-slot surfaces withhold
4095
+ * (`materializeTreeView` folds only `spent` from this record); journaled so the released
4096
+ * record carries it without recomputation. */
4097
+ budgetViolation?: BudgetViolation;
4098
+ /** Present iff the child had a `RunCancellationReason` when it settled; decides `settled`
4099
+ * vs `cancelled` and its `source` on the released record. */
4100
+ cancellation?: {
4101
+ readonly source: string;
4102
+ };
4011
4103
  seq: number;
4012
4104
  at: string;
4013
4105
  } | {
@@ -4033,8 +4125,10 @@ type SpawnEvent = {
4033
4125
  * in `detail`, and the node is then also journaled as `teardown-unconfirmed`. When every
4034
4126
  * receipt for a node is `destroyed: true` and the executor confirms teardown, the node's
4035
4127
  * terminal `settled`/`cancelled` record with `retainedExecution: 'released'` follows on
4036
- * the same tree and closes the cursor slot; a `destroyed: false` receipt or an unconfirmed
4037
- * teardown leaves the slot open because the environment may still exist.
4128
+ * the same tree and closes the cursor slot; when the settling process dies between this
4129
+ * receipt and that record, `healReleasedSlots` writes the same record on the next resume
4130
+ * from the `reconciled` record. A `destroyed: false` receipt, an empty receipt set, or an
4131
+ * unconfirmed teardown leaves the slot open because the environment may still exist.
4038
4132
  * Informational: replay, `materializeTreeView`, and cost readers skip it, and its `seq` is
4039
4133
  * per node, outside the cursor-uniqueness namespace. */
4040
4134
  kind: 'environment-teardown';
@@ -4190,7 +4284,9 @@ interface SupervisorOpts {
4190
4284
  * slot with a terminal record marked `retainedExecution: 'released'`, so `spendGaps` names
4191
4285
  * it `unreported` (a floor) rather than `never-settled` (a ceiling) and
4192
4286
  * `fleetYield.releasedUnrecovered` counts it; a refused release leaves the slot open and
4193
- * the node in `teardownUnconfirmed`.
4287
+ * the node in `teardownUnconfirmed`. A process that dies between the last `destroyed: true`
4288
+ * receipt and that record leaves the slot open only until the next resume, whose
4289
+ * `healReleasedSlots` writes the identical record from the `reconciled` record.
4194
4290
  * - `'keep'`: a later process may resume this run, so the environments stay for its recovery.
4195
4291
  *
4196
4292
  * Default: `'keep'` when `resume` is true (a durable run a later process may continue), else
@@ -4308,7 +4404,10 @@ interface SpendGap {
4308
4404
  * that nothing could be released.
4309
4405
  * - `'released'`: root settlement under `retainedAtSettlement: 'release'` destroyed the
4310
4406
  * environment (executor-confirmed) before any process recovered the execution; this is the
4311
- * node's terminal record. The pool's own admission fault, if the reconcile raised one, is not
4407
+ * node's terminal record, written by the release sweep in the settling process or by
4408
+ * `healReleasedSlots` on the next resume when that process died between the last
4409
+ * `destroyed: true` receipt and the record (same builder, `seq` and `at`, from the
4410
+ * `reconciled` record). The pool's own admission fault, if the reconcile raised one, is not
4312
4411
  * on this record.
4313
4412
  *
4314
4413
  * Absent = an ordinary child. The live `Settled` a driver branched on carried `'pending'` where
@@ -4542,5 +4641,5 @@ interface WidenGate<Out> {
4542
4641
  readonly judgeExempt?: boolean;
4543
4642
  }
4544
4643
  //#endregion
4545
- export { SpawnPrior as $, persistHarnessTranscript as $n, LoopStartedPayload as $r, RuntimeStreamEventCollector as $t, NodeId as A, AgentTaskSpec as Ai, ActivityNote as An, BudgetReconcileFault as Ar, EvalRunEvent as At, ResumedWork as B, RuntimeSession as Bi, RetainedInteractiveEnvironmentInput as Bn, Driver as Br, RuntimeEventOtelOptions as Bt, ExecutorToolCall as C, AgentBackendInput as Ci, SessionTraceBox as Cn, RetainedRunStartMaterial as Cr, workerTraceHeaders as Ct, MaterializedModelIdentity as D, AgentRuntimeEventSink as Di, decodeToolPart as Dn, BudgetPool as Dr, mergeTraceEnv as Dt, MaterializedExecutionIdentity as E, AgentRuntimeEvent as Ei, createPushTraceSource as En, StartRetainedRunOptions as Er, createPropagatingTraceEmitter as Et, ProviderModelExecutionEvidence as F, OpenAIChatTool as Fi, createActivityLog as Fn, ReservationTicket as Fr, LoopSpanNode as Ft, RootSignal as G, HarnessTranscriptCapture as Gn, LoopIterationDispatchPayload as Gr, createOtelExporter as Gt, RootHandle as H, RuntimeStreamEvent as Hi, RetainedInteractiveStartMaterial as Hn, Iteration as Hr, buildLoopSpanNodes as Ht, ResourceLimit as I, OpenAIChatToolChoice as Ii, readWorkerProgress as In, createBudgetPool as Ir, OtelAttribute as It, Scope as J, HarnessTranscriptUnavailable as Jn, LoopLineageOptions as Jr, loopEventToOtelSpan as Jt, RootStreamReceipt as K, HarnessTranscriptEvidence as Kn, LoopIterationEndedPayload as Kr, exportEvalRuns as Kt, ResourceSpend as L, RunAgentTaskOptions as Li, ReconnectRetainedInteractiveRunOptions as Ln, spendFromUsageEvents as Lr, OtelExportConfig as Lt, NodeStatus as M, BackendErrorDetail as Mi, ExecutorProgress as Mn, ReservationHolder as Mr, EvalRunsExportConfig as Mt, ProfileMaterializationReceipt as N, KnowledgeReadinessDecision as Ni, ScopeProgressInput as Nn, ReservationRejection as Nr, EvalRunsExportResult as Nt, NoWinnerError as O, AgentTaskContext as Oi, sandboxSessionTraceSource as On, BudgetPoolRestore as Or, readTraceContextFromEnv as Ot, ProviderModelAttemptEvidence as P, OpenAIChatResponseFormat as Pi, WorkerProgress as Pn, ReservationStage as Pr, INTELLIGENCE_WIRE_VERSION as Pt, SpawnOpts as Q, harnessTranscriptArtifact as Qn, LoopSandboxPlacement as Qr, RuntimeEventCollector as Qt, ResultBlobStore as R, RunAgentTaskStreamOptions as Ri, RecoverRetainedInteractiveRunOptions as Rn, AgentRunSpec as Rr, OtelExporter as Rt, ExecutorTeardownWarning as S, AgentBackendContext as Si, SessionMessageLike as Sn, RetainedRunSnapshot as Sr, workerTraceEnv as St, Handle as T, AgentKnowledgeProvider as Ti, TraceSource as Tn, StartRetainedRunInEnvironmentOptions as Tr, TraceContext as Tt, RootMaterialization as U, StartRetainedInteractiveRunOptions as Un, LoopDecisionPayload as Ur, buildRuntimeEventOtelSpans as Ut, RetainedExecutionState as V, RuntimeSessionStore as Vi, RetainedInteractiveRunHandle as Vn, ExecCtx as Vr, buildLoopOtelSpans as Vt, RootProviderModelEvidence as W, HarnessTranscriptArtifact as Wn, LoopEndedPayload as Wr, createOpenInferenceFileExporter as Wt, SpawnEvent as X, ReadableEnvironment as Xn, LoopPlanPayload as Xr, padTraceId as Xt, Settled as Y, HarnessTranscriptUnavailableReason as Yn, LoopPlanDescription as Yr, padSpanId as Yt, SpawnJournal as Z, captureHarnessTranscript as Zn, LoopResult as Zr, toOtelAttributes as Zt, ExecutorMaterialization as _, RuntimeRunPersistenceAdapter as _i, isWaitOutcome as _n, RetainedRunEnvironmentAdmission as _r, WorkerTraceEvidence as _t, BudgetOverspend as a, MountManifestEntry as ai, createRuntimeEventCollector as an, RecoverRetainedRunOptions as ar, SupervisedResult as at, ExecutorRegistry as b, startRuntimeRun as bi, validateWaitSpec as bn, RetainedRunIntentAdmission as br, WorkerTraceSeamCarrier as bt, EnvironmentTeardownReceipt as c, RunProvenance as ci, sanitizeKnowledgeReadinessReport as cn, RetainedInteractiveEnvironmentAdmission as cr, TokenUsageProvenance as ct, ExecutorAccounting as d, ValidationCtx as di, WaitOutcome as dn, RetainedRunAdmission as dr, UnknownMaterializationReason as dt, LoopTeardownFailedPayload as ei, RuntimeStreamEventSink as en, NativeContextContinuationExecution as er, SpawnRejection as et, ExecutorCancellation as f, Validator as fi, WaitProbe as fn, RetainedRunAdmissionHook as fr, UsageEvent as ft, ExecutorFactory as g, RuntimeRunOptions as gi, createWaitProbes as gn, RetainedRunEffect as gr, WorkerInteractiveUnavailableReason as gt, ExecutorExecutionBinding as h, RuntimeRunHandle as hi, WaitSpec as hn, RetainedRunDispatchedAdmission as hr, WorkerInteractiveSession as ht, Budget as i, LoopWinner as ii, SanitizedKnowledgeRequirement as in, RecoverRetainedRunIntentOptions as ir, SteerableRootHandle as it, NodeSnapshot as j, AgentTaskStatus as ji, DEFAULT_STALL_AFTER_MS as jn, LeakedReservation as jr, EvalRunGeneration as jt, NodeExecutionIdentity as k, AgentTaskRunResult as ki, ActivityLog as kn, BudgetReadout as kr, traceContextToEnv as kt, ExecutionBindingReceipt as l, SandboxClient as li, sanitizeRuntimeStreamEvent as ln, RetainedInteractiveIntentAdmission as lr, TreeView as lt, ExecutorContext as m, RuntimeRunCost as mi, WaitRejection as mn, RetainedRunCancellation as mr, WidenGate as mt, AgentExecutionRef as n, LoopTraceEmitter as ni, RuntimeTelemetryOptions as nn, NativeContextContinuationInput as nr, SpendChannel as nt, BudgetViolation as o, MountRecorder as oi, createRuntimeStreamEventCollector as on, RecoverRetainedRunResult as or, Supervisor as ot, ExecutorCancellationRequest as p, RuntimeRunCompleteInput as pi, WaitProbeRegistry as pn, RetainedRunCancelOptions as pr, WaitOpts as pt, Runtime as q, HarnessTranscriptFile as qn, LoopIterationStartedPayload as qr, generateSpanId as qt, AgentSpec as r, LoopTraceEvent as ri, SanitizedKnowledgeReadinessReport as rn, ReconnectRetainedRunOptions as rr, SpendGap as rt, DefaultVerdict as s, OutputAdapter as si, sanitizeAgentRuntimeEvent as sn, RetainedInteractiveAdmission as sr, SupervisorOpts as st, Agent as t, LoopTokenUsage as ti, RuntimeStreamEventSummary as tn, NativeContextContinuationHandle as tr, Spend as tt, Executor as u, SelectionReceipt as ui, PendingWait as un, RetainedInteractiveStartedAdmission as ur, UnconfirmedTeardown as ut, ExecutorNodeContext as v, RuntimeRunRow as vi, pollFor as vn, RetainedRunEventOptions as vr, WorkerTraceUnavailableReason as vt, FleetYield as w, AgentExecutionBackend as wi, ToolStepInput as wn, RetainedRunTurnInput as wr, workerTraceSeamKey as wt, ExecutorResult as x, AgentAdapter as xi, waitUntil as xn, RetainedRunReplayPoint as xr, readWorkerTraceContext as xt, ExecutorProgressEvent as y, RuntimeRunStatus as yi, timerAt as yn, RetainedRunHandle as yr, WorkerTraceResolver as yt, ResumedKeyState as z, RuntimeCanonicalStreamEvent as zi, RetainedInteractiveAdmissionHook as zn, DefaultVerdict$1 as zr, OtelSpan as zt };
4546
- //# sourceMappingURL=types-F5MG_7Qq.d.ts.map
4644
+ export { SpawnPrior as $, captureHarnessTranscript as $n, LoopResult as $r, RuntimeStreamEventCollector as $t, NodeId as A, AgentTaskContext as Ai, RetainedPendingCause as An, BudgetPoolRestore as Ar, EvalRunEvent as At, ResumedWork as B, RunAgentTaskStreamOptions as Bi, RecoverRetainedInteractiveRunOptions as Bn, AgentRunSpec as Br, RuntimeEventOtelOptions as Bt, ExecutorToolCall as C, AgentAdapter as Ci, SessionTraceBox as Cn, RetainedRunReplayPoint as Cr, workerTraceHeaders as Ct, MaterializedModelIdentity as D, AgentKnowledgeProvider as Di, decodeToolPart as Dn, StartRetainedRunInEnvironmentOptions as Dr, mergeTraceEnv as Dt, MaterializedExecutionIdentity as E, AgentExecutionBackend as Ei, createPushTraceSource as En, RetainedRunTurnInput as Er, createPropagatingTraceEmitter as Et, ProviderModelExecutionEvidence as F, KnowledgeReadinessDecision as Fi, ScopeProgressInput as Fn, ReservationRejection as Fr, LoopSpanNode as Ft, RootSignal as G, StartRetainedInteractiveRunOptions as Gn, LoopDecisionPayload as Gr, createOtelExporter as Gt, RootHandle as H, RuntimeSession as Hi, RetainedInteractiveEnvironmentInput as Hn, Driver as Hr, buildLoopSpanNodes as Ht, ResourceLimit as I, OpenAIChatResponseFormat as Ii, WorkerProgress as In, ReservationStage as Ir, OtelAttribute as It, Scope as J, HarnessTranscriptEvidence as Jn, LoopIterationEndedPayload as Jr, loopEventToOtelSpan as Jt, RootStreamReceipt as K, HarnessTranscriptArtifact as Kn, LoopEndedPayload as Kr, exportEvalRuns as Kt, ResourceSpend as L, OpenAIChatTool as Li, createActivityLog as Ln, ReservationTicket as Lr, OtelExportConfig as Lt, NodeStatus as M, AgentTaskSpec as Mi, ActivityNote as Mn, BudgetReconcileFault as Mr, EvalRunsExportConfig as Mt, ProfileMaterializationReceipt as N, AgentTaskStatus as Ni, DEFAULT_STALL_AFTER_MS as Nn, LeakedReservation as Nr, EvalRunsExportResult as Nt, NoWinnerError as O, AgentRuntimeEvent as Oi, sandboxSessionTraceSource as On, StartRetainedRunOptions as Or, readTraceContextFromEnv as Ot, ProviderModelAttemptEvidence as P, BackendErrorDetail as Pi, ExecutorProgress as Pn, ReservationHolder as Pr, INTELLIGENCE_WIRE_VERSION as Pt, SpawnOpts as Q, ReadableEnvironment as Qn, LoopPlanPayload as Qr, RuntimeEventCollector as Qt, ResultBlobStore as R, OpenAIChatToolChoice as Ri, readWorkerProgress as Rn, createBudgetPool as Rr, OtelExporter as Rt, ExecutorTeardownWarning as S, startRuntimeRun as Si, SessionMessageLike as Sn, RetainedRunIntentAdmission as Sr, workerTraceEnv as St, Handle as T, AgentBackendInput as Ti, TraceSource as Tn, RetainedRunStartMaterial as Tr, TraceContext as Tt, RootMaterialization as U, RuntimeSessionStore as Ui, RetainedInteractiveRunHandle as Un, ExecCtx as Ur, buildRuntimeEventOtelSpans as Ut, RetainedExecutionState as V, RuntimeCanonicalStreamEvent as Vi, RetainedInteractiveAdmissionHook as Vn, DefaultVerdict$1 as Vr, buildLoopOtelSpans as Vt, RootProviderModelEvidence as W, RuntimeStreamEvent as Wi, RetainedInteractiveStartMaterial as Wn, Iteration as Wr, createOpenInferenceFileExporter as Wt, SpawnEvent as X, HarnessTranscriptUnavailable as Xn, LoopLineageOptions as Xr, padTraceId as Xt, Settled as Y, HarnessTranscriptFile as Yn, LoopIterationStartedPayload as Yr, padSpanId as Yt, SpawnJournal as Z, HarnessTranscriptUnavailableReason as Zn, LoopPlanDescription as Zr, toOtelAttributes as Zt, ExecutorMaterialization as _, RuntimeRunHandle as _i, isWaitOutcome as _n, RetainedRunDispatchedAdmission as _r, WorkerTraceEvidence as _t, BudgetOverspend as a, LoopTraceEvent as ai, createRuntimeEventCollector as an, ReconnectRetainedRunOptions as ar, SupervisedResult as at, ExecutorRegistry as b, RuntimeRunRow as bi, validateWaitSpec as bn, RetainedRunEventOptions as br, WorkerTraceSeamCarrier as bt, EnvironmentTeardownReceipt as c, MountRecorder as ci, sanitizeKnowledgeReadinessReport as cn, RecoverRetainedRunResult as cr, TokenUsageProvenance as ct, ExecutorAccounting as d, SandboxClient as di, WaitOutcome as dn, RetainedInteractiveIntentAdmission as dr, UnknownMaterializationReason as dt, LoopSandboxPlacement as ei, RuntimeStreamEventSink as en, harnessTranscriptArtifact as er, SpawnRejection as et, ExecutorCancellation as f, SelectionReceipt as fi, WaitProbe as fn, RetainedInteractiveStartedAdmission as fr, UsageEvent as ft, ExecutorFactory as g, RuntimeRunCost as gi, createWaitProbes as gn, RetainedRunCancellation as gr, WorkerInteractiveUnavailableReason as gt, ExecutorExecutionBinding as h, RuntimeRunCompleteInput as hi, WaitSpec as hn, RetainedRunCancelOptions as hr, WorkerInteractiveSession as ht, Budget as i, LoopTraceEmitter as ii, SanitizedKnowledgeRequirement as in, NativeContextContinuationInput as ir, SteerableRootHandle as it, NodeSnapshot as j, AgentTaskRunResult as ji, ActivityLog as jn, BudgetReadout as jr, EvalRunGeneration as jt, NodeExecutionIdentity as k, AgentRuntimeEventSink as ki, RetainedChildRecovery as kn, BudgetPool as kr, traceContextToEnv as kt, ExecutionBindingReceipt as l, OutputAdapter as li, sanitizeRuntimeStreamEvent as ln, RetainedInteractiveAdmission as lr, TreeView as lt, ExecutorContext as m, Validator as mi, WaitRejection as mn, RetainedRunAdmissionHook as mr, WidenGate as mt, AgentExecutionRef as n, LoopTeardownFailedPayload as ni, RuntimeTelemetryOptions as nn, NativeContextContinuationExecution as nr, SpendChannel as nt, BudgetViolation as o, LoopWinner as oi, createRuntimeStreamEventCollector as on, RecoverRetainedRunIntentOptions as or, Supervisor as ot, ExecutorCancellationRequest as p, ValidationCtx as pi, WaitProbeRegistry as pn, RetainedRunAdmission as pr, WaitOpts as pt, Runtime as q, HarnessTranscriptCapture as qn, LoopIterationDispatchPayload as qr, generateSpanId as qt, AgentSpec as r, LoopTokenUsage as ri, SanitizedKnowledgeReadinessReport as rn, NativeContextContinuationHandle as rr, SpendGap as rt, DefaultVerdict as s, MountManifestEntry as si, sanitizeAgentRuntimeEvent as sn, RecoverRetainedRunOptions as sr, SupervisorOpts as st, Agent as t, LoopStartedPayload as ti, RuntimeStreamEventSummary as tn, persistHarnessTranscript as tr, Spend as tt, Executor as u, RunProvenance as ui, PendingWait as un, RetainedInteractiveEnvironmentAdmission as ur, UnconfirmedTeardown as ut, ExecutorNodeContext as v, RuntimeRunOptions as vi, pollFor as vn, RetainedRunEffect as vr, WorkerTraceUnavailableReason as vt, FleetYield as w, AgentBackendContext as wi, ToolStepInput as wn, RetainedRunSnapshot as wr, workerTraceSeamKey as wt, ExecutorResult as x, RuntimeRunStatus as xi, waitUntil as xn, RetainedRunHandle as xr, readWorkerTraceContext as xt, ExecutorProgressEvent as y, RuntimeRunPersistenceAdapter as yi, timerAt as yn, RetainedRunEnvironmentAdmission as yr, WorkerTraceResolver as yt, ResumedKeyState as z, RunAgentTaskOptions as zi, ReconnectRetainedInteractiveRunOptions as zn, spendFromUsageEvents as zr, OtelSpan as zt };
4645
+ //# sourceMappingURL=types-BxjpKpb-.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-runtime",
3
- "version": "0.233.1",
3
+ "version": "0.235.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": {