@tangle-network/agent-runtime 0.266.0 → 0.271.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 (66) hide show
  1. package/dist/{activation-VpxSbDKJ.d.ts → activation-BrJmwTLB.d.ts} +4 -4
  2. package/dist/{activation-BERiJjx5.js → activation-DGbFPGR3.js} +2 -2
  3. package/dist/{activation-BERiJjx5.js.map → activation-DGbFPGR3.js.map} +1 -1
  4. package/dist/agent.d.ts +2 -2
  5. package/dist/agent.js +2 -2
  6. package/dist/{coordination-driver-DdZ-nh_4.js → coordination-driver-iBGMKDvB.js} +20 -14
  7. package/dist/coordination-driver-iBGMKDvB.js.map +1 -0
  8. package/dist/{delegate-Ajx_PVyu.js → delegate-DOqUvaIz.js} +2 -2
  9. package/dist/{delegate-Ajx_PVyu.js.map → delegate-DOqUvaIz.js.map} +1 -1
  10. package/dist/durable.d.ts +5 -4
  11. package/dist/durable.js +3 -3
  12. package/dist/durable.js.map +1 -1
  13. package/dist/{graph-CK50N9vG.js → graph-DnMcepkN.js} +8 -5
  14. package/dist/graph-DnMcepkN.js.map +1 -0
  15. package/dist/{improvement-cycle-GRPoHLm1.js → improvement-cycle-1IyRJo5h.js} +9 -9
  16. package/dist/improvement-cycle-1IyRJo5h.js.map +1 -0
  17. package/dist/{index-CU2mlMfc.d.ts → index-CL1dduJd.d.ts} +70 -6
  18. package/dist/index.d.ts +7 -7
  19. package/dist/index.js +7 -7
  20. package/dist/intelligence.d.ts +9 -3
  21. package/dist/intelligence.js +11 -5
  22. package/dist/intelligence.js.map +1 -1
  23. package/dist/kernel.d.ts +4 -4
  24. package/dist/kernel.js +9 -9
  25. package/dist/{loop-runner-bin-cC16EPUq.js → loop-runner-bin-BPZ9tt1W.js} +3 -3
  26. package/dist/{loop-runner-bin-cC16EPUq.js.map → loop-runner-bin-BPZ9tt1W.js.map} +1 -1
  27. package/dist/{loop-runner-bin-XKZXM08Q.d.ts → loop-runner-bin-O_vM1w8Y.d.ts} +3 -3
  28. package/dist/loop-runner-bin.d.ts +1 -1
  29. package/dist/loop-runner-bin.js +1 -1
  30. package/dist/mcp/bin.js +3 -3
  31. package/dist/mcp/index.d.ts +12 -6
  32. package/dist/mcp/index.js +7 -7
  33. package/dist/mcp/memory-bin.js +1 -1
  34. package/dist/{memory-server-Cn8LbAxO.js → memory-server-DXQ8IxGR.js} +2 -2
  35. package/dist/{memory-server-Cn8LbAxO.js.map → memory-server-DXQ8IxGR.js.map} +1 -1
  36. package/dist/{openai-tools-D3ajI_D2.d.ts → openai-tools-DWHxpwx2.d.ts} +2 -2
  37. package/dist/profiles.d.ts +2 -2
  38. package/dist/{provision-supervisor-Bf_bPaCv.js → provision-supervisor-Cy8pqE95.js} +3 -3
  39. package/dist/{provision-supervisor-Bf_bPaCv.js.map → provision-supervisor-Cy8pqE95.js.map} +1 -1
  40. package/dist/{runtime-hOLlAc1i.js → runtime-DVjIH1eo.js} +233 -11
  41. package/dist/runtime-DVjIH1eo.js.map +1 -0
  42. package/dist/{server-DOb67ohd.js → server-CN9vzbSe.js} +4 -4
  43. package/dist/{server-DOb67ohd.js.map → server-CN9vzbSe.js.map} +1 -1
  44. package/dist/{stream-agent-turn-Gw9hLpBn.d.ts → stream-agent-turn-DbEsKgb_.d.ts} +21 -3
  45. package/dist/{structural-rollout-DV9YoQF6.js → structural-rollout-I92sIfNl.js} +2 -2
  46. package/dist/{structural-rollout-DV9YoQF6.js.map → structural-rollout-I92sIfNl.js.map} +1 -1
  47. package/dist/{substrate-CLt9S9ym.d.ts → substrate-CbC03Vzo.d.ts} +2 -2
  48. package/dist/{supervise--njTtSL3.js → supervise-DJ_1i9vj.js} +13 -8
  49. package/dist/{supervise--njTtSL3.js.map → supervise-DJ_1i9vj.js.map} +1 -1
  50. package/dist/{supervisor-B8UMAXya.js → supervisor-Cvd5mf7x.js} +285 -86
  51. package/dist/supervisor-Cvd5mf7x.js.map +1 -0
  52. package/dist/testing.d.ts +2 -2
  53. package/dist/testing.js +14 -14
  54. package/dist/testing.js.map +1 -1
  55. package/dist/{tool-server-x9NEhvHZ.js → tool-server-Dqer2M4_.js} +30 -12
  56. package/dist/tool-server-Dqer2M4_.js.map +1 -0
  57. package/dist/tui/index.d.ts +1 -1
  58. package/dist/tui/index.js +1 -1
  59. package/dist/{types-CrnwLVYQ.d.ts → types-Bo7z5aG5.d.ts} +109 -43
  60. package/package.json +2 -1
  61. package/dist/coordination-driver-DdZ-nh_4.js.map +0 -1
  62. package/dist/graph-CK50N9vG.js.map +0 -1
  63. package/dist/improvement-cycle-GRPoHLm1.js.map +0 -1
  64. package/dist/runtime-hOLlAc1i.js.map +0 -1
  65. package/dist/supervisor-B8UMAXya.js.map +0 -1
  66. package/dist/tool-server-x9NEhvHZ.js.map +0 -1
package/dist/testing.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { $a as SuperviseTestOptions, Ao as supervisorAgentWithTestBrain, Tn as driverAgent, Zt as RunGraphTestOptions, tn as runGraphWithTestBrain, to as superviseWithTestBrain, wn as DriverAgentOptions, xo as SupervisorAgentTestDeps } from "./index-CU2mlMfc.js";
2
- import { Hn as ToolLoopChat, Vn as ToolLoopCallContext } from "./stream-agent-turn-Gw9hLpBn.js";
1
+ import { $t as RunGraphTestOptions, Co as SupervisorAgentTestDeps, Dn as driverAgent, En as DriverAgentOptions, Mo as supervisorAgentWithTestBrain, rn as runGraphWithTestBrain, ro as superviseWithTestBrain, to as SuperviseTestOptions } from "./index-CL1dduJd.js";
2
+ import { Hn as ToolLoopChat, Vn as ToolLoopCallContext } from "./stream-agent-turn-DbEsKgb_.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 { C as canonicalCandidateDigest$1, D as immutableCandidateValue } from "./workspace-archive-C9lgf77y.js";
2
- import { f as verifyAgentImprovementProposal } from "./improvement-cycle-GRPoHLm1.js";
2
+ import { f as verifyAgentImprovementProposal } from "./improvement-cycle-1IyRJo5h.js";
3
3
  import { i as applyExactAgentProfileDiff, p as parseExactAgentProfile } from "./profile-D3eXNBQV.js";
4
- import { r as driverAgent } from "./coordination-driver-DdZ-nh_4.js";
5
- import { a as superviseWithTestBrain, h as supervisorAgentWithTestBrain } from "./supervise--njTtSL3.js";
6
- import { i as runGraphWithTestBrain } from "./graph-CK50N9vG.js";
7
- import { SANDBOX_SIZE_PRESET_NAMES } from "@tangle-network/agent-interface";
4
+ import { r as driverAgent } from "./coordination-driver-iBGMKDvB.js";
5
+ import { a as superviseWithTestBrain, h as supervisorAgentWithTestBrain } from "./supervise-DJ_1i9vj.js";
6
+ import { i as runGraphWithTestBrain } from "./graph-DnMcepkN.js";
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:b4ce9950c510d96ecccbb6b3134cca32fe0dcf821aef326e0b34010471dc5fc1",
11
+ digest: "sha256:413fe1dbf8ef096c3466ce18d419991ee6cedc8a52db4ffe2bd0dec92cea08a9",
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.266.0"
4582
+ "runtimeVersion": "0.271.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:38b07934c181f4f92d397194fd50a1ddf303fe599d53feccced96ee75e3f0299",
4694
- "runId": "agent-runtime-0.266.0-proposal-fixture",
4693
+ "recordDigest": "sha256:af7f71837ca1fe6a313b9148c03c2a7b392bd78850a1f50b3cff812bb6c38edf",
4694
+ "runId": "agent-runtime-0.271.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.266.0-proposal-fixture"
4717
+ runId: "agent-runtime-0.271.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:6320cd1100f5e0b06dd69176b4aa65ca738ab573b79edef05673db16357a4547",
4723
+ digest: "sha256:3b05c402ea2f3e11b27026a375a54dde3d992f741c3821c35cae65e342993dfd",
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.266.0"
6357
+ "runtimeVersion": "0.271.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:76a0368ba73c6f3e5e4c18daab0019ef6b95e634fcffc4601d2436c4c8471db6",
6468
+ "recordDigest": "sha256:8c5ca0d396134ff0e55451baf5a0c439375ac64a7533526723a42d4fe5fc7b81",
6469
6469
  "runId": "profile-improvement-1",
6470
6470
  "schema": "agent-profile-improvement-experiment"
6471
6471
  }
@@ -6521,7 +6521,7 @@ function loadAgentProfileImprovementFixture() {
6521
6521
  const baselineStateDigest = profileStateDigest(state.baselineProfile, state.recommendedSize);
6522
6522
  const candidateStateDigest = profileStateDigest(state.candidateProfile, state.recommendedSize);
6523
6523
  if (baselineStateDigest !== experiment.baseline.stateDigest || candidateStateDigest !== experiment.candidate.stateDigest) throw new Error("profile improvement fixture state does not match its proposal");
6524
- if (canonicalCandidateDigest$1(experiment.change.reduce((profile, change, index) => applyExactAgentProfileDiff(profile, change, `profile improvement fixture change ${index}`), state.baselineProfile)) !== canonicalCandidateDigest$1(state.candidateProfile)) throw new Error("profile improvement fixture candidate does not match its proposal changes");
6524
+ if (canonicalAgentProfileDigest(experiment.change.reduce((profile, change, index) => applyExactAgentProfileDiff(profile, change, `profile improvement fixture change ${index}`), state.baselineProfile)) !== canonicalAgentProfileDigest(state.candidateProfile)) throw new Error("profile improvement fixture candidate does not match its proposal changes");
6525
6525
  return immutableCandidateValue({
6526
6526
  proposal,
6527
6527
  ...state
@@ -1 +1 @@
1
- {"version":3,"file":"testing.js","names":["canonicalAgentImprovementProposalFixture","canonicalAgentProfileImprovementProposalFixture","canonicalAgentProfileImprovementStateFixture","canonicalCandidateDigest"],"sources":["../src/testing/fixtures/agent-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-state.json","../src/testing/index.ts"],"sourcesContent":["","","","import {\n type AgentImprovementProposal,\n type AgentProfile,\n type AgentProfileImprovementMeasuredComparison,\n SANDBOX_SIZE_PRESET_NAMES,\n type SandboxSizePreset,\n} from '@tangle-network/agent-interface'\n\nimport { canonicalCandidateDigest, immutableCandidateValue } from '../candidate-execution/digest'\nimport { applyExactAgentProfileDiff, parseExactAgentProfile } from '../candidate-execution/profile'\nimport { verifyAgentImprovementProposal } from '../intelligence/improvement-cycle'\nimport canonicalAgentImprovementProposalFixture from './fixtures/agent-improvement-proposal.json'\nimport canonicalAgentProfileImprovementProposalFixture from './fixtures/agent-profile-improvement-proposal.json'\nimport canonicalAgentProfileImprovementStateFixture from './fixtures/agent-profile-improvement-state.json'\n\nexport {\n type DriverAgentOptions,\n driverAgent,\n} from '../runtime/supervise/coordination-driver'\nexport {\n type RunGraphTestOptions,\n runGraphWithTestBrain,\n} from '../runtime/supervise/graph'\nexport {\n type SuperviseTestOptions,\n superviseWithTestBrain,\n} from '../runtime/supervise/supervise'\nexport {\n type SupervisorAgentTestDeps,\n supervisorAgentWithTestBrain,\n} from '../runtime/supervise/supervisor-agent'\nexport type { ToolLoopCallContext, ToolLoopChat } from '../runtime/tool-loop'\n\nconst serializedAgentImprovementProposalFixture = JSON.stringify(\n canonicalAgentImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementProposalFixture = JSON.stringify(\n canonicalAgentProfileImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementStateFixture = JSON.stringify(\n canonicalAgentProfileImprovementStateFixture,\n)\n\n/** A proposal produced by Runtime's opaque profile-improvement path. */\nexport type AgentProfileImprovementProposalFixture = Omit<\n AgentImprovementProposal,\n 'evaluation'\n> & {\n evaluation: AgentProfileImprovementMeasuredComparison\n}\n\n/** Complete private state for exercising profile activation and restore in consumer tests. */\nexport interface AgentProfileImprovementFixture {\n proposal: AgentProfileImprovementProposalFixture\n baselineProfile: AgentProfile\n candidateProfile: AgentProfile\n recommendedSize: SandboxSizePreset\n}\n\n/** Load an isolated, production-validated Runtime proposal for consumer tests. */\nexport function loadAgentImprovementProposalFixture(): AgentImprovementProposal {\n return verifyAgentImprovementProposal(JSON.parse(serializedAgentImprovementProposalFixture))\n}\n\n/** Load an isolated profile proposal and its private activation state for consumer tests. */\nexport function loadAgentProfileImprovementFixture(): AgentProfileImprovementFixture {\n const proposal = loadAgentProfileImprovementProposal()\n const state = parseAgentProfileImprovementState(\n JSON.parse(serializedAgentProfileImprovementStateFixture),\n )\n const experiment = proposal.evaluation.experiment\n const baselineStateDigest = profileStateDigest(state.baselineProfile, state.recommendedSize)\n const candidateStateDigest = profileStateDigest(state.candidateProfile, state.recommendedSize)\n if (\n baselineStateDigest !== experiment.baseline.stateDigest ||\n candidateStateDigest !== experiment.candidate.stateDigest\n ) {\n throw new Error('profile improvement fixture state does not match its proposal')\n }\n const appliedCandidate = experiment.change.reduce(\n (profile, change, index) =>\n applyExactAgentProfileDiff(profile, change, `profile improvement fixture change ${index}`),\n state.baselineProfile,\n )\n if (\n canonicalCandidateDigest(appliedCandidate) !== canonicalCandidateDigest(state.candidateProfile)\n ) {\n throw new Error('profile improvement fixture candidate does not match its proposal changes')\n }\n return immutableCandidateValue({ proposal, ...state })\n}\n\nfunction loadAgentProfileImprovementProposal(): AgentProfileImprovementProposalFixture {\n const proposal = verifyAgentImprovementProposal(\n JSON.parse(serializedAgentProfileImprovementProposalFixture),\n )\n if (proposal.evaluation.kind !== 'agent-profile-improvement-measured-comparison') {\n throw new Error('profile improvement fixture contains a sealed candidate comparison')\n }\n return { ...proposal, evaluation: proposal.evaluation }\n}\n\nfunction parseAgentProfileImprovementState(\n input: unknown,\n): Omit<AgentProfileImprovementFixture, 'proposal'> {\n if (typeof input !== 'object' || input === null || Array.isArray(input)) {\n throw new Error('profile improvement fixture state must be an object')\n }\n const record = input as Record<string, unknown>\n const fields = Object.keys(record).sort()\n const expectedFields = ['baselineProfile', 'candidateProfile', 'recommendedSize']\n if (\n fields.length !== expectedFields.length ||\n fields.some((field, i) => field !== expectedFields[i])\n ) {\n throw new Error('profile improvement fixture state contains unsupported fields')\n }\n const recommendedSize = SANDBOX_SIZE_PRESET_NAMES.find((size) => size === record.recommendedSize)\n if (!recommendedSize) {\n throw new Error('profile improvement fixture has an invalid recommended size')\n }\n return {\n baselineProfile: parseExactAgentProfile(\n record.baselineProfile,\n 'profile improvement fixture baseline',\n ),\n candidateProfile: parseExactAgentProfile(\n record.candidateProfile,\n 'profile improvement fixture candidate',\n ),\n recommendedSize,\n }\n}\n\nfunction profileStateDigest(\n profile: AgentProfile,\n recommendedSize: SandboxSizePreset,\n): ReturnType<typeof canonicalCandidateDigest> {\n return canonicalCandidateDigest({ definition: profile, recommendedSize })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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posalFixture","canonicalAgentProfileImprovementProposalFixture","canonicalAgentProfileImprovementStateFixture","canonicalCandidateDigest"],"sources":["../src/testing/fixtures/agent-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-proposal.json","../src/testing/fixtures/agent-profile-improvement-state.json","../src/testing/index.ts"],"sourcesContent":["","","","import {\n type AgentImprovementProposal,\n type AgentProfile,\n type AgentProfileImprovementMeasuredComparison,\n canonicalAgentProfileDigest,\n SANDBOX_SIZE_PRESET_NAMES,\n type SandboxSizePreset,\n} from '@tangle-network/agent-interface'\n\nimport { canonicalCandidateDigest, immutableCandidateValue } from '../candidate-execution/digest'\nimport { applyExactAgentProfileDiff, parseExactAgentProfile } from '../candidate-execution/profile'\nimport { verifyAgentImprovementProposal } from '../intelligence/improvement-cycle'\nimport canonicalAgentImprovementProposalFixture from './fixtures/agent-improvement-proposal.json'\nimport canonicalAgentProfileImprovementProposalFixture from './fixtures/agent-profile-improvement-proposal.json'\nimport canonicalAgentProfileImprovementStateFixture from './fixtures/agent-profile-improvement-state.json'\n\nexport {\n type DriverAgentOptions,\n driverAgent,\n} from '../runtime/supervise/coordination-driver'\nexport {\n type RunGraphTestOptions,\n runGraphWithTestBrain,\n} from '../runtime/supervise/graph'\nexport {\n type SuperviseTestOptions,\n superviseWithTestBrain,\n} from '../runtime/supervise/supervise'\nexport {\n type SupervisorAgentTestDeps,\n supervisorAgentWithTestBrain,\n} from '../runtime/supervise/supervisor-agent'\nexport type { ToolLoopCallContext, ToolLoopChat } from '../runtime/tool-loop'\n\nconst serializedAgentImprovementProposalFixture = JSON.stringify(\n canonicalAgentImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementProposalFixture = JSON.stringify(\n canonicalAgentProfileImprovementProposalFixture,\n)\nconst serializedAgentProfileImprovementStateFixture = JSON.stringify(\n canonicalAgentProfileImprovementStateFixture,\n)\n\n/** A proposal produced by Runtime's opaque profile-improvement path. */\nexport type AgentProfileImprovementProposalFixture = Omit<\n AgentImprovementProposal,\n 'evaluation'\n> & {\n evaluation: AgentProfileImprovementMeasuredComparison\n}\n\n/** Complete private state for exercising profile activation and restore in consumer tests. */\nexport interface AgentProfileImprovementFixture {\n proposal: AgentProfileImprovementProposalFixture\n baselineProfile: AgentProfile\n candidateProfile: AgentProfile\n recommendedSize: SandboxSizePreset\n}\n\n/** Load an isolated, production-validated Runtime proposal for consumer tests. */\nexport function loadAgentImprovementProposalFixture(): AgentImprovementProposal {\n return verifyAgentImprovementProposal(JSON.parse(serializedAgentImprovementProposalFixture))\n}\n\n/** Load an isolated profile proposal and its private activation state for consumer tests. */\nexport function loadAgentProfileImprovementFixture(): AgentProfileImprovementFixture {\n const proposal = loadAgentProfileImprovementProposal()\n const state = parseAgentProfileImprovementState(\n JSON.parse(serializedAgentProfileImprovementStateFixture),\n )\n const experiment = proposal.evaluation.experiment\n const baselineStateDigest = profileStateDigest(state.baselineProfile, state.recommendedSize)\n const candidateStateDigest = profileStateDigest(state.candidateProfile, state.recommendedSize)\n if (\n baselineStateDigest !== experiment.baseline.stateDigest ||\n candidateStateDigest !== experiment.candidate.stateDigest\n ) {\n throw new Error('profile improvement fixture state does not match its proposal')\n }\n const appliedCandidate = experiment.change.reduce(\n (profile, change, index) =>\n applyExactAgentProfileDiff(profile, change, `profile improvement fixture change ${index}`),\n state.baselineProfile,\n )\n if (\n canonicalAgentProfileDigest(appliedCandidate) !==\n canonicalAgentProfileDigest(state.candidateProfile)\n ) {\n throw new Error('profile improvement fixture candidate does not match its proposal changes')\n }\n return immutableCandidateValue({ proposal, ...state })\n}\n\nfunction loadAgentProfileImprovementProposal(): AgentProfileImprovementProposalFixture {\n const proposal = verifyAgentImprovementProposal(\n JSON.parse(serializedAgentProfileImprovementProposalFixture),\n )\n if (proposal.evaluation.kind !== 'agent-profile-improvement-measured-comparison') {\n throw new Error('profile improvement fixture contains a sealed candidate comparison')\n }\n return { ...proposal, evaluation: proposal.evaluation }\n}\n\nfunction parseAgentProfileImprovementState(\n input: unknown,\n): Omit<AgentProfileImprovementFixture, 'proposal'> {\n if (typeof input !== 'object' || input === null || Array.isArray(input)) {\n throw new Error('profile improvement fixture state must be an object')\n }\n const record = input as Record<string, unknown>\n const fields = Object.keys(record).sort()\n const expectedFields = ['baselineProfile', 'candidateProfile', 'recommendedSize']\n if (\n fields.length !== expectedFields.length ||\n fields.some((field, i) => field !== expectedFields[i])\n ) {\n throw new Error('profile improvement fixture state contains unsupported fields')\n }\n const recommendedSize = SANDBOX_SIZE_PRESET_NAMES.find((size) => size === record.recommendedSize)\n if (!recommendedSize) {\n throw new Error('profile improvement fixture has an invalid recommended size')\n }\n return {\n baselineProfile: parseExactAgentProfile(\n record.baselineProfile,\n 'profile improvement fixture baseline',\n ),\n candidateProfile: parseExactAgentProfile(\n record.candidateProfile,\n 'profile improvement fixture candidate',\n ),\n recommendedSize,\n }\n}\n\nfunction profileStateDigest(\n profile: AgentProfile,\n recommendedSize: SandboxSizePreset,\n): ReturnType<typeof canonicalCandidateDigest> {\n return canonicalCandidateDigest({ definition: profile, recommendedSize })\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,eAAe;CAChG,IAAI,CAAC,iBACH,MAAM,IAAI,MAAM,6DAA6D;CAE/E,OAAO;EACL,iBAAiB,uBACf,OAAO,iBACP,sCACF;EACA,kBAAkB,uBAChB,OAAO,kBACP,uCACF;EACA;CACF;AACF;AAEA,SAAS,mBACP,SACA,iBAC6C;CAC7C,OAAOC,2BAAyB;EAAE,YAAY;EAAS;CAAgB,CAAC;AAC1E"}
@@ -4,7 +4,9 @@ import { createInterface } from "node:readline";
4
4
  /**
5
5
  * `createStdioToolServer` — the generic newline-delimited JSON-RPC 2.0 MCP
6
6
  * server core: `initialize` / `notifications/initialized` / `tools/list` /
7
- * `tools/call` over a stdio-shaped transport, protocol 2024-11-05.
7
+ * `ping` / `tools/call` over a stdio-shaped transport. It answers the
8
+ * client's protocol version when listed in `SUPPORTED_PROTOCOL_VERSIONS`,
9
+ * else 2024-11-05, and publishes tool annotations when a tool declares them.
8
10
  *
9
11
  * Extracted from `createMcpServer` (server.ts) so every in-repo MCP server —
10
12
  * the delegation server, the memory server — serves the ONE wire protocol the
@@ -15,6 +17,17 @@ import { createInterface } from "node:readline";
15
17
  * @experimental
16
18
  */
17
19
  const PROTOCOL_VERSION = "2024-11-05";
20
+ /**
21
+ * Protocol versions this server speaks, newest first. `initialize` answers with
22
+ * the client's requested version when it is listed here, and otherwise with
23
+ * `PROTOCOL_VERSION` (2024-11-05), which every client that speaks 2024-11-05 accepts.
24
+ */
25
+ const SUPPORTED_PROTOCOL_VERSIONS = [
26
+ "2025-11-25",
27
+ "2025-06-18",
28
+ "2025-03-26",
29
+ PROTOCOL_VERSION
30
+ ];
18
31
  /** Build the generic stdio JSON-RPC tool server. */
19
32
  function createStdioToolServer(options) {
20
33
  const tools = /* @__PURE__ */ new Map();
@@ -26,19 +39,24 @@ function createStdioToolServer(options) {
26
39
  let activeReadline;
27
40
  async function handle(message) {
28
41
  if (stopped) return rpcError(message.id ?? null, -32099, "server stopped");
29
- if (message.method === "initialize") return rpcResult(message.id ?? null, {
30
- protocolVersion: PROTOCOL_VERSION,
31
- capabilities: { tools: {} },
32
- serverInfo: {
33
- name: options.serverName,
34
- version: options.serverVersion
35
- }
36
- });
42
+ if (message.method === "initialize") {
43
+ const requested = message.params?.protocolVersion;
44
+ return rpcResult(message.id ?? null, {
45
+ protocolVersion: typeof requested === "string" && SUPPORTED_PROTOCOL_VERSIONS.includes(requested) ? requested : PROTOCOL_VERSION,
46
+ capabilities: { tools: {} },
47
+ serverInfo: {
48
+ name: options.serverName,
49
+ version: options.serverVersion
50
+ }
51
+ });
52
+ }
37
53
  if (message.method === "notifications/initialized") return null;
54
+ if (message.method === "ping") return rpcResult(message.id ?? null, {});
38
55
  if (message.method === "tools/list") return rpcResult(message.id ?? null, { tools: [...tools.values()].map((tool) => ({
39
56
  name: tool.name,
40
57
  description: tool.description,
41
- inputSchema: tool.inputSchema
58
+ inputSchema: tool.inputSchema,
59
+ ...tool.annotations ? { annotations: tool.annotations } : {}
42
60
  })) });
43
61
  if (message.method === "tools/call") {
44
62
  const params = message.params ?? {};
@@ -149,6 +167,6 @@ function writeResponse(output, response) {
149
167
  output.write(`${JSON.stringify(response)}\n`);
150
168
  }
151
169
  //#endregion
152
- export { createStdioToolServer as n, PROTOCOL_VERSION as t };
170
+ export { SUPPORTED_PROTOCOL_VERSIONS as n, createStdioToolServer as r, PROTOCOL_VERSION as t };
153
171
 
154
- //# sourceMappingURL=tool-server-x9NEhvHZ.js.map
172
+ //# sourceMappingURL=tool-server-Dqer2M4_.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-server-Dqer2M4_.js","names":[],"sources":["../src/mcp/tool-server.ts"],"sourcesContent":["/**\n * `createStdioToolServer` — the generic newline-delimited JSON-RPC 2.0 MCP\n * server core: `initialize` / `notifications/initialized` / `tools/list` /\n * `ping` / `tools/call` over a stdio-shaped transport. It answers the\n * client's protocol version when listed in `SUPPORTED_PROTOCOL_VERSIONS`,\n * else 2024-11-05, and publishes tool annotations when a tool declares them.\n *\n * Extracted from `createMcpServer` (server.ts) so every in-repo MCP server —\n * the delegation server, the memory server — serves the ONE wire protocol the\n * same-host client (`connectStdioMcp`, runtime/stdio-mcp-client.ts) speaks.\n * A second hand-rolled serve loop could drift from what the client expects;\n * this core makes that impossible by construction.\n *\n * @experimental\n */\n\nimport { createInterface, type Interface as ReadlineInterface } from 'node:readline'\nimport { ValidationError } from '../errors'\nimport type { JsonRpcMessage, JsonRpcResponse, McpToolDescriptor, McpTransport } from './protocol'\n\nexport type {\n JsonRpcMessage,\n JsonRpcResponse,\n McpToolAnnotations,\n McpToolDescriptor,\n McpTransport,\n} from './protocol'\n\nexport const PROTOCOL_VERSION = '2024-11-05'\n\n/**\n * Protocol versions this server speaks, newest first. `initialize` answers with\n * the client's requested version when it is listed here, and otherwise with\n * `PROTOCOL_VERSION` (2024-11-05), which every client that speaks 2024-11-05 accepts.\n */\nexport const SUPPORTED_PROTOCOL_VERSIONS: readonly string[] = [\n '2025-11-25',\n '2025-06-18',\n '2025-03-26',\n PROTOCOL_VERSION,\n]\n\n/** @experimental */\nexport interface StdioToolServerOptions {\n /** Server display name surfaced via `initialize`. */\n serverName: string\n /** Server version surfaced via `initialize`. */\n serverVersion: string\n /** The tools to serve. Duplicate names throw — a silent shadow would hide a tool. */\n tools: readonly McpToolDescriptor[]\n}\n\n/** @experimental */\nexport interface StdioToolServer {\n /** Tools currently registered, keyed by name. */\n readonly tools: ReadonlyMap<string, McpToolDescriptor>\n /** Handle a single parsed JSON-RPC message. Returns the response object (or `null` for notifications). */\n handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null>\n /** Drive the server on a stdio-shaped transport until `stop()` is called. */\n serve(transport?: McpTransport): Promise<void>\n /** Stop a `serve` call. Subsequent requests are rejected. */\n stop(): void\n}\n\n/** Build the generic stdio JSON-RPC tool server. */\nexport function createStdioToolServer(options: StdioToolServerOptions): StdioToolServer {\n const tools = new Map<string, McpToolDescriptor>()\n for (const tool of options.tools) {\n if (tools.has(tool.name)) {\n throw new ValidationError(`createStdioToolServer: duplicate tool name \"${tool.name}\"`)\n }\n tools.set(tool.name, tool)\n }\n\n let stopped = false\n let activeReadline: ReadlineInterface | undefined\n\n async function handle(message: JsonRpcMessage): Promise<JsonRpcResponse | null> {\n if (stopped) {\n return rpcError(message.id ?? null, -32099, 'server stopped')\n }\n if (message.method === 'initialize') {\n const requested = (message.params as { protocolVersion?: unknown } | undefined)\n ?.protocolVersion\n return rpcResult(message.id ?? null, {\n protocolVersion:\n typeof requested === 'string' && SUPPORTED_PROTOCOL_VERSIONS.includes(requested)\n ? requested\n : PROTOCOL_VERSION,\n capabilities: { tools: {} },\n serverInfo: { name: options.serverName, version: options.serverVersion },\n })\n }\n if (message.method === 'notifications/initialized') {\n // MCP clients send this after the handshake; it has no id and expects\n // no response.\n return null\n }\n if (message.method === 'ping') {\n return rpcResult(message.id ?? null, {})\n }\n if (message.method === 'tools/list') {\n return rpcResult(message.id ?? null, {\n tools: [...tools.values()].map((tool) => ({\n name: tool.name,\n description: tool.description,\n inputSchema: tool.inputSchema,\n ...(tool.annotations ? { annotations: tool.annotations } : {}),\n })),\n })\n }\n if (message.method === 'tools/call') {\n const params = (message.params ?? {}) as { name?: unknown; arguments?: unknown }\n const name = typeof params.name === 'string' ? params.name : ''\n const tool = tools.get(name)\n if (!tool) {\n return rpcError(message.id ?? null, -32601, `unknown tool: ${name}`)\n }\n try {\n const output = await tool.handler(params.arguments ?? {})\n return rpcResult(message.id ?? null, toolCallResult(output))\n } catch (err) {\n const reason = err instanceof Error ? err.message : String(err)\n const code = err instanceof TypeError || err instanceof RangeError ? -32602 : -32000\n return rpcError(message.id ?? null, code, reason)\n }\n }\n if (message.id === undefined || message.id === null) return null\n return rpcError(message.id, -32601, `unknown method: ${message.method}`)\n }\n\n async function serve(transport?: McpTransport): Promise<void> {\n const input = transport?.input ?? process.stdin\n const output = transport?.output ?? process.stdout\n const rl = createInterface({ input, crlfDelay: Number.POSITIVE_INFINITY })\n activeReadline = rl\n return new Promise<void>((resolve, reject) => {\n rl.on('line', (line) => {\n const trimmed = line.trim()\n if (!trimmed) return\n let parsed: JsonRpcMessage | undefined\n try {\n parsed = JSON.parse(trimmed) as JsonRpcMessage\n } catch (err) {\n writeResponse(output, rpcError(null, -32700, `parse error: ${(err as Error).message}`))\n return\n }\n if (parsed?.jsonrpc !== '2.0' || typeof parsed.method !== 'string') {\n writeResponse(output, rpcError(parsed?.id ?? null, -32600, 'invalid request'))\n return\n }\n void handle(parsed).then((response) => {\n if (response) writeResponse(output, response)\n })\n })\n rl.on('close', () => resolve())\n rl.on('error', (err) => reject(err))\n if (stopped) {\n rl.close()\n resolve()\n }\n })\n }\n\n function stop(): void {\n stopped = true\n activeReadline?.close()\n activeReadline = undefined\n }\n\n return { tools, handle, serve, stop }\n}\n\nfunction toolCallResult(output: unknown): {\n content: [{ type: 'text'; text: string }]\n structuredContent?: Record<string, unknown>\n isError: false\n} {\n let json: string | undefined\n try {\n json = JSON.stringify(output)\n } catch (err) {\n const reason = err instanceof Error ? `: ${err.message}` : ''\n throw new TypeError(`MCP tool result must be JSON-serializable${reason}`, { cause: err })\n }\n if (json === undefined) {\n throw new TypeError('MCP tool result must be JSON-serializable')\n }\n\n const serialized = JSON.parse(json) as unknown\n // Preserve string content verbatim. MCP clients pass this text directly to the calling agent.\n const result: {\n content: [{ type: 'text'; text: string }]\n structuredContent?: Record<string, unknown>\n isError: false\n } = {\n content: [{ type: 'text', text: typeof serialized === 'string' ? serialized : json }],\n isError: false,\n }\n if (serialized !== null && typeof serialized === 'object' && !Array.isArray(serialized)) {\n result.structuredContent = serialized as Record<string, unknown>\n }\n return result\n}\n\nfunction rpcResult(id: number | string | null, result: unknown): JsonRpcResponse {\n return { jsonrpc: '2.0', id, result }\n}\n\nfunction rpcError(\n id: number | string | null,\n code: number,\n message: string,\n data?: unknown,\n): JsonRpcResponse {\n return {\n jsonrpc: '2.0',\n id,\n error: data === undefined ? { code, message } : { code, message, data },\n }\n}\n\nfunction writeResponse(output: NodeJS.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 @@
1
- import { Ct as ProvisionSupervisorConnection, Dt as provisionSupervisor, Et as SupervisorCleanupReceipt, Tt as ProvisionedSupervisor, wt as ProvisionSupervisorRequest } from "../index-CU2mlMfc.js";
1
+ import { Dt as ProvisionedSupervisor, Et as ProvisionSupervisorRequest, Ot as SupervisorCleanupReceipt, Tt as ProvisionSupervisorConnection, kt as provisionSupervisor } from "../index-CL1dduJd.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-Bf_bPaCv.js";
1
+ import { t as provisionSupervisor } from "../provision-supervisor-Cy8pqE95.js";
2
2
  import { a as renderTopFrameWithLayout, i as renderTopFrame, n as runTopApp, r as loadTopSnapshot, t as renderTopOnce } from "../top-app-VAOrBskv.js";
3
3
  export { loadTopSnapshot, provisionSupervisor, renderTopFrame, renderTopFrameWithLayout, renderTopOnce, runTopApp };
@@ -2921,18 +2921,45 @@ interface OtelExportConfig {
2921
2921
  batchSize?: number;
2922
2922
  /** Flush interval ms. Default 5000. */
2923
2923
  flushIntervalMs?: number;
2924
+ /**
2925
+ * Most spans held at once, queued plus in flight. Default 2048, the OpenTelemetry batch
2926
+ * processor's own default. A span that arrives when the queue is full is dropped and counted in
2927
+ * {@link OtelExportStats.dropped}, so a stalled collector costs a bounded amount of memory.
2928
+ */
2929
+ maxQueueSize?: number;
2930
+ /** Milliseconds one POST may take before it is abandoned and its spans count as dropped. Default 10000. */
2931
+ timeoutMs?: number;
2924
2932
  /** Resource attributes stamped on every export. */
2925
2933
  resourceAttributes?: Record<string, string | number | boolean>;
2926
2934
  /** Service name. Default 'agent-runtime'. */
2927
2935
  serviceName?: string;
2928
2936
  }
2929
2937
  interface OtelExporter {
2930
- /** Export a span. */
2938
+ /** Export a span. Never throws: a sink that cannot take the span counts it as dropped. */
2931
2939
  exportSpan(span: OtelSpan): void;
2932
- /** Force flush pending spans. */
2940
+ /**
2941
+ * Deliver everything queued so far. Rejects when spans were dropped since the previous `flush`,
2942
+ * naming how many and the last error, because a caller that awaits delivery is owed the answer.
2943
+ */
2933
2944
  flush(): Promise<void>;
2934
- /** Shutdown cleanly. */
2945
+ /** Stop accepting spans and deliver what is queued. Never rejects. */
2935
2946
  shutdown(): Promise<void>;
2947
+ /** What this sink has delivered and lost so far. */
2948
+ stats(): OtelExportStats;
2949
+ }
2950
+ /**
2951
+ * Delivery accounting for one exporter. `written + dropped + pending` covers every span handed to
2952
+ * `exportSpan`, so a trace that arrives short can be told apart from a run that emitted less.
2953
+ */
2954
+ interface OtelExportStats {
2955
+ /** Spans the sink confirmed: a 2xx collector response, or a completed file append. */
2956
+ written: number;
2957
+ /** Spans lost: refused by the collector, failed in transit, over the queue bound, or unwritable. */
2958
+ dropped: number;
2959
+ /** Spans accepted and not yet written or dropped. */
2960
+ pending: number;
2961
+ /** The most recent failure, when there has been one. */
2962
+ lastError?: string;
2936
2963
  }
2937
2964
  interface OtelSpan {
2938
2965
  traceId: string;
@@ -2978,7 +3005,13 @@ interface OtelAttribute {
2978
3005
  */
2979
3006
  declare function createOpenInferenceFileExporter(filePath: string): OtelExporter;
2980
3007
  /**
2981
- * Create an OTEL exporter. Returns undefined when no endpoint is configured.
3008
+ * Create an OTLP/HTTP exporter. Returns undefined when no endpoint is configured.
3009
+ *
3010
+ * One batch is in flight at a time; spans that arrive meanwhile wait in a queue bounded by
3011
+ * `maxQueueSize`. Every span ends in exactly one of `written` or `dropped`: a non-2xx response, a
3012
+ * network error, a timeout, an OTLP `partialSuccess.rejectedSpans` count and a full queue each count
3013
+ * as drops and set `lastError`. Nothing here throws into the caller's run; `flush()` reports the
3014
+ * loss, the same rule {@link createOpenInferenceFileExporter} follows.
2982
3015
  */
2983
3016
  declare function createOtelExporter(config?: OtelExportConfig): OtelExporter | undefined;
2984
3017
  /**
@@ -4029,10 +4062,14 @@ interface SpawnOpts {
4029
4062
  * idempotent per key: once a child spawned under a key settles `done` — in this process or in a
4030
4063
  * journaled prior one — spawning the same key returns that committed result (`prior.state:
4031
4064
  * 'completed'`) instead of paying for the work again. A key whose prior attempt settled `down`
4032
- * spawns fresh and says so explicitly (`prior.state: 'retried'`). A key whose prior attempt was
4033
- * journaled as started but never settled is refused (`'in-doubt'`): the remote execution may
4034
- * still exist and must be recovered before replacement. A key that is currently LIVE is refused
4035
- * (`'duplicate-key'`). Unkeyed spawns (the default) are position-identified and always run.
4065
+ * spawns fresh and says so explicitly (`prior.state: 'retried'`); a resume DERIVES that same
4066
+ * `down` for an interrupted `inline` attempt, because an in-process execution cannot outlive
4067
+ * its process — so a worker killed mid-flight under a plain in-process executor retries under
4068
+ * its own key instead of wedging. A key whose un-settled prior attempt may still exist
4069
+ * elsewhere (`sandbox`/`cli`/`router` runtimes) is refused (`'in-doubt'`): the remote execution
4070
+ * may still be running and must be recovered before replacement. A key that is currently LIVE
4071
+ * is refused (`'duplicate-key'`). Unkeyed spawns (the default) are position-identified and
4072
+ * always run.
4036
4073
  */
4037
4074
  readonly key?: string;
4038
4075
  /** The settled sibling node this spawn replaces, so a run's record names which worker took over
@@ -4149,8 +4186,9 @@ type Settled<Out> = {
4149
4186
  budgetViolation?: BudgetViolation;
4150
4187
  /** Present only when this child's provider execution was RETAINED (see
4151
4188
  * `RetainedExecutionState`); absent on an ordinary down. `'pending'` on the settlement the
4152
- * driver receives at the reconcile; `'released'` on the replayed settlement of a node the
4153
- * release sweep closed. The driver and every replay reader see the fact the journal
4189
+ * driver receives at the reconcile; `'released'` or `'release-unconfirmed'` on the
4190
+ * replayed settlement of a node a final settlement closed. The driver and every replay
4191
+ * reader see the fact the journal
4154
4192
  * states, so a reader never splits this population on `reason` text — which is identical
4155
4193
  * on every one of these children. */
4156
4194
  retainedExecution?: RetainedExecutionState;
@@ -4419,8 +4457,12 @@ interface ResumedKeyState<Out = unknown> {
4419
4457
  /** Identity recorded when this key was first admitted. Every reuse must match it exactly. */
4420
4458
  readonly identity?: NodeExecutionIdentity;
4421
4459
  readonly state: 'completed' | 'down' | 'in-doubt';
4422
- /** The rehydrated settlement; absent exactly when `state` is `'in-doubt'`. */
4460
+ /** The rehydrated settlement; absent when `state` is `'in-doubt'`, and when `'down'` was
4461
+ * *derived* — the resume itself proved the execution dead (an `inline` runtime cannot outlive
4462
+ * its process), so there is no settlement to rehydrate and `reason` says how it died. */
4423
4463
  readonly settled?: Settled<Out>;
4464
+ /** Why a derived `'down'` state exists. Absent on every state backed by a settlement. */
4465
+ readonly reason?: string;
4424
4466
  }
4425
4467
  interface NodeSnapshot {
4426
4468
  readonly id: NodeId;
@@ -4467,10 +4509,10 @@ interface NodeSnapshot {
4467
4509
  readonly trace?: WorkerTraceEvidence;
4468
4510
  /** Present once a settled node's measured spend exceeded its reservation. */
4469
4511
  readonly budgetViolation?: BudgetViolation;
4470
- /** Present on a retained child: `'pending'` while its cursor slot is open, `'released'` once
4471
- * the release sweep closed it. The live view (`makeTreeView`) and the journal view
4472
- * (`materializeTreeView`) state the same fact, so a settle record's `tree` answers the
4473
- * retained-vs-down question without the observer journal. */
4512
+ /** Present on a retained child: `'pending'` while its cursor slot is open, `'released'` or
4513
+ * `'release-unconfirmed'` once a final settlement closed it. The live view (`makeTreeView`)
4514
+ * and the journal view (`materializeTreeView`) state the same fact, so a settle record's
4515
+ * `tree` answers the retained-vs-down question without the observer journal. */
4474
4516
  readonly retainedExecution?: RetainedExecutionState;
4475
4517
  /** Why a retained child has no accepted result; see `RetainedPendingCause`. */
4476
4518
  readonly retainedPendingCause?: RetainedPendingCause;
@@ -4585,13 +4627,15 @@ type SpawnEvent = {
4585
4627
  harnessTranscript?: HarnessTranscriptEvidence;
4586
4628
  /** Present when the reconciled spend exceeded the reservation, on either status. */
4587
4629
  budgetViolation?: BudgetViolation;
4588
- /** Written by the release sweep in the settling process, on the same tree, after every
4589
- * `environment-teardown` receipt for the node reads `destroyed: true` and the executor's
4590
- * own teardown confirmed — or by `healReleasedSlots` on the next resume, when that process
4591
- * died between the last `destroyed: true` receipt and this record: the same builder, `seq`
4592
- * and `at`, read from the `reconciled` record, so the bytes are identical either way. A
4593
- * `destroyed: false` receipt, an empty receipt set, or a `reconciled` record without
4594
- * `settledSeq` leaves the slot open.
4630
+ /** `'released'` is written by the release sweep in the settling process, on the same tree,
4631
+ * after every `environment-teardown` receipt for the node reads `destroyed: true` and the
4632
+ * executor's own teardown confirmed — or by `healReleasedSlots` on the next resume, when
4633
+ * that process died between the last `destroyed: true` receipt and this record: the same
4634
+ * builder, `seq` and `at`, read from the `reconciled` record, so the bytes are identical
4635
+ * either way. `'release-unconfirmed'` is written by the same builder at the end of a final
4636
+ * settlement for every retained node the release could not confirm: a `destroyed: false`
4637
+ * receipt, an empty receipt set, or a refused teardown probe. Only a crash before that point
4638
+ * or a `reconciled` record without `settledSeq` leaves the slot open.
4595
4639
  * `spent` is this node's child-work component of the reconcile the pool committed — for
4596
4640
  * a leaf the streamed floor itself, for a recursive executor its `accounting().reported`
4597
4641
  * split with the remainder on its `metered` records — never the reservation ceiling.
@@ -4600,7 +4644,7 @@ type SpawnEvent = {
4600
4644
  * delivery, so replay yields it at the position the driver saw it; `at` is the settlement
4601
4645
  * instant, and the release instant is on the receipt immediately before it. Typed so a
4602
4646
  * `'pending'` can never be journaled: the journal states that as `reconciled`. */
4603
- retainedExecution?: Extract<RetainedExecutionState, 'released'>;
4647
+ retainedExecution?: Exclude<RetainedExecutionState, 'pending'>;
4604
4648
  retainedPendingCause?: RetainedPendingCause;
4605
4649
  /** The bounded account of the team this child led, when it led one. */
4606
4650
  subtree?: SubtreeSummary;
@@ -4622,7 +4666,7 @@ type SpawnEvent = {
4622
4666
  budgetViolation?: BudgetViolation;
4623
4667
  /** As on `settled`: a retained child that was cancelled settles `cancelled`, and the one
4624
4668
  * builder writes whichever kind the settlement had. */
4625
- retainedExecution?: Extract<RetainedExecutionState, 'released'>;
4669
+ retainedExecution?: Exclude<RetainedExecutionState, 'pending'>;
4626
4670
  retainedPendingCause?: RetainedPendingCause;
4627
4671
  /** The bounded account of the team this child led, when it led one. */
4628
4672
  subtree?: SubtreeSummary;
@@ -4729,12 +4773,14 @@ type SpawnEvent = {
4729
4773
  * observed, while its cursor slot stays OPEN so a resume can recover the execution. It stands
4730
4774
  * in for the `settled` record an open node cannot carry: cost readers and a restored pool
4731
4775
  * charge this floor for the node instead of its declared ceiling, and a later `settled` or
4732
- * `cancelled` record for the same node supersedes it. That record has three writers: a
4776
+ * `cancelled` record for the same node supersedes it. That record has four writers: a
4733
4777
  * resumed process's recovered settlement, the release sweep's terminal record marked
4734
- * `retainedExecution: 'released'`, or `healReleasedSlots` on the next resume when the
4735
- * process died between the last `environment-teardown` receipt and that record. The last
4736
- * two write the same bytes, because both read the settlement from THIS record: it is
4737
- * literally the settlement it stands in for, minus the cursor position it cannot hold. A
4778
+ * `retainedExecution: 'released'`, the final settlement's record marked
4779
+ * `'release-unconfirmed'` for a node whose release it could not confirm, or
4780
+ * `healReleasedSlots` on the next resume when the process died between the last
4781
+ * `environment-teardown` receipt and the released record. The last three carry the same
4782
+ * settlement, because each reads it from THIS record or from the live child it mirrors: it
4783
+ * is literally the settlement it stands in for, minus the cursor position it cannot hold. A
4738
4784
  * driver's own inference travels on its `metered` record as on every other path, so
4739
4785
  * `reconciled + metered` is what the pool committed. Its `seq` lives outside the
4740
4786
  * cursor-uniqueness namespace; `settledSeq` is the cursor seq. */
@@ -4836,8 +4882,10 @@ type SpawnEvent = {
4836
4882
  * terminal `settled`/`cancelled` record with `retainedExecution: 'released'` follows on
4837
4883
  * the same tree and closes the cursor slot; when the settling process dies between this
4838
4884
  * receipt and that record, `healReleasedSlots` writes the same record on the next resume
4839
- * from the `reconciled` record. A `destroyed: false` receipt, an empty receipt set, or an
4840
- * unconfirmed teardown leaves the slot open because the environment may still exist.
4885
+ * from the `reconciled` record. After a `destroyed: false` receipt, an empty receipt set, or
4886
+ * an unconfirmed teardown, the environment may still exist: the node is journaled as
4887
+ * `teardown-unconfirmed`, and its slot closes with `retainedExecution:
4888
+ * 'release-unconfirmed'` instead, because the settlement is final either way.
4841
4889
  * Informational: replay, `materializeTreeView`, and cost readers skip it, and its `seq` is
4842
4890
  * per node, outside the cursor-uniqueness namespace. */
4843
4891
  kind: 'environment-teardown';
@@ -5041,10 +5089,16 @@ interface SupervisorOpts {
5041
5089
  * Sandbox fleet for 19 to 37 hours without it. It then closes each released child's cursor
5042
5090
  * slot with a terminal record marked `retainedExecution: 'released'`, so `spendGaps` names
5043
5091
  * it `unreported` (a floor) rather than `never-settled` (a ceiling) and
5044
- * `fleetYield.releasedUnrecovered` counts it; a refused release leaves the slot open and
5045
- * the node in `teardownUnconfirmed`. A process that dies between the last `destroyed: true`
5046
- * receipt and that record leaves the slot open only until the next resume, whose
5047
- * `healReleasedSlots` writes the identical record from the `reconciled` record.
5092
+ * `fleetYield.releasedUnrecovered` counts it. A release that is refused or cannot be
5093
+ * confirmed names the node in `teardownUnconfirmed` and its `teardown-unconfirmed` record,
5094
+ * and after the retry window closes its slot with `retainedExecution: 'release-unconfirmed'`,
5095
+ * counted by `fleetYield.releaseUnconfirmed`: the settlement is final, so the slot closes
5096
+ * whether or not the environment is confirmed gone. Measured 2026-09-23/24 on the Discovery
5097
+ * fleet (Runtime 0.249.1 to 0.261.0): 338 of 1,620 agents never settled, and 179 of the
5098
+ * retained ones had an admission that never named an environment. A process that dies
5099
+ * between the last `destroyed: true` receipt and the released record leaves the slot open
5100
+ * only until the next resume, whose `healReleasedSlots` writes the identical record from the
5101
+ * `reconciled` record.
5048
5102
  * - `'keep'`: a later process may resume this run, so the environments stay for its recovery.
5049
5103
  *
5050
5104
  * Default: `'keep'` when `resume` is true (a durable run a later process may continue), else
@@ -5169,13 +5223,20 @@ interface SpendGap {
5169
5223
  * `destroyed: true` receipt and the record (same builder, `seq` and `at`, from the
5170
5224
  * `reconciled` record). The pool's own admission fault, if the reconcile raised one, is not
5171
5225
  * on this record.
5226
+ * - `'release-unconfirmed'`: root settlement under `retainedAtSettlement: 'release'` ended with
5227
+ * the execution unrecovered and its environment NOT confirmed destroyed: the provider refused
5228
+ * the delete, the executor could not confirm it, or the admission never named an environment
5229
+ * (a create that timed out). The settlement is final, so no process will recover the execution
5230
+ * and the slot closes anyway, with the same builder, `seq` and `at` as `'released'`. What the
5231
+ * node may still hold stays named by its `teardown-unconfirmed` record and in
5232
+ * `teardownUnconfirmed`, for a sweeper.
5172
5233
  *
5173
5234
  * Absent = an ordinary child. The live `Settled` a driver branched on carried `'pending'` where
5174
- * replay yields `'released'` for the same seq, so a resume-aware driver must not branch on the
5175
- * two values. No `'recovered'` value exists yet: a live-adopted recovery settles on the ordinary
5176
- * path and the recorded-result path writes no marker.
5235
+ * replay yields `'released'` or `'release-unconfirmed'` for the same seq, so a resume-aware driver
5236
+ * must not branch on these values. No `'recovered'` value exists yet: a live-adopted recovery
5237
+ * settles on the ordinary path and the recorded-result path writes no marker.
5177
5238
  */
5178
- type RetainedExecutionState = 'pending' | 'released';
5239
+ type RetainedExecutionState = 'pending' | 'released' | 'release-unconfirmed';
5179
5240
  /**
5180
5241
  * How this run's spawned CHILDREN ended, counted by node id off the complete journal FOREST at
5181
5242
  * root settlement — after the join barrier and the release sweep, so the terminal records the
@@ -5194,13 +5255,18 @@ interface FleetYield {
5194
5255
  /** `settled` records with `status: 'down'`, released records included. */
5195
5256
  readonly down: number;
5196
5257
  readonly cancelled: number;
5197
- /** Spawned with no terminal record: a crash-orphaned child, a refused release, or a retained
5198
- * executor with nothing to release. Named after `SpendGap`'s `never-settled`. */
5258
+ /** Spawned with no terminal record: a crash-orphaned child, or a retained child of a run that
5259
+ * keeps its environments for a resume (`retainedAtSettlement: 'keep'`). Named after
5260
+ * `SpendGap`'s `never-settled`. */
5199
5261
  readonly neverSettled: number;
5200
5262
  /** Terminal records marked `retainedExecution: 'released'` — a subset of `down + cancelled`.
5201
5263
  * A nested manager whose OWN retained execution was released counts here beside the
5202
5264
  * grandchildren it released, because its execution was destroyed unrecovered too. */
5203
5265
  readonly releasedUnrecovered: number;
5266
+ /** Terminal records marked `retainedExecution: 'release-unconfirmed'` — a subset of
5267
+ * `down + cancelled`, disjoint from `releasedUnrecovered`: executions a final settlement left
5268
+ * unrecovered without confirming their environment destroyed. */
5269
+ readonly releaseUnconfirmed: number;
5204
5270
  }
5205
5271
  /**
5206
5272
  * One channel on which a settled reservation's measured spend exceeded what it reserved.
@@ -5433,5 +5499,5 @@ interface WidenGate<Out> {
5433
5499
  readonly judgeExempt?: boolean;
5434
5500
  }
5435
5501
  //#endregion
5436
- export { SpawnJournal as $, LoopWinner as $i, HarnessTranscriptEvidence as $n, RetainedInteractiveEnvironmentAdmission as $r, padSpanId as $t, NodeExecutionIdentity as A, OpenAIChatTool as Aa, ReserveOptions as Ai, createPushTraceSource as An, AgentEvalErrorCode as Ar, createPropagatingTraceEmitter as At, ResultBlobStore as B, LoopIterationDispatchPayload as Bi, TeamProgress as Bn, RuntimeRunStateError as Br, OtelAttribute as Bt, ExecutorToolCall as C, AgentTaskContext as Ca, ReservationFloor as Ci, timerAt as Cn, OnUnmetContract as Cr, WorkerTraceResolver as Ct, MaterializedExecutionIdentity as D, BackendErrorDetail as Da, ReservationStage as Di, SessionTraceBox as Dn, upstreamUnavailableSignal as Dr, workerTraceHeaders as Dt, HeldEnvironment as E, AgentTaskStatus as Ea, ReservationShortfall as Ei, SessionMessageLike as En, summarizeDriverAttempts as Er, workerTraceEnv as Et, ProviderModelAttemptEvidence as F, RuntimeSession as Fa, Driver as Fi, ActivityLog as Fn, PlannerError as Fr, EvalRunGeneration as Ft, RootMaterialization as G, LoopPlanPayload as Gi, RecoverRetainedInteractiveRunOptions as Gn, NativeContextContinuationExecution as Gr, buildLoopOtelSpans as Gt, ResumedWork as H, LoopIterationStartedPayload as Hi, createActivityLog as Hn, SlotPermit as Hr, OtelExporter as Ht, ProviderModelExecutionEvidence as I, RuntimeSessionStore as Ia, ExecCtx as Ii, ActivityNote as In, RetainedInteractiveAdmissionError as Ir, EvalRunsExportConfig as It, RootStreamReceipt as J, LoopStartedPayload as Ji, RetainedInteractiveRunHandle as Jn, ReconnectRetainedRunOptions as Jr, createOpenInferenceFileExporter as Jt, RootProviderModelEvidence as K, LoopResult as Ki, RetainedInteractiveAdmissionHook as Kn, NativeContextContinuationHandle as Kr, buildLoopSpanNodes as Kt, RecursiveReservationPolicy as L, RuntimeStreamEvent as La, Iteration as Li, DEFAULT_STALL_AFTER_MS as Ln, RetainedInteractiveBindingError as Lr, EvalRunsExportResult as Lt, NodeSnapshot as M, RunAgentTaskOptions as Ma, spendFromUsageEvents as Mi, sandboxSessionTraceSource as Mn, ConfigError as Mr, readTraceContextFromEnv as Mt, NodeStatus as N, RunAgentTaskStreamOptions as Na, AgentRunSpec as Ni, RetainedChildRecovery as Nn, JudgeError as Nr, traceContextToEnv as Nt, MaterializedModelIdentity as O, KnowledgeReadinessDecision as Oa, ReservationTicket as Oi, ToolStepInput as On, UnavailablePausePolicy as Or, workerTraceSeamKey as Ot, ProfileMaterializationReceipt as P, RuntimeCanonicalStreamEvent as Pa, DefaultVerdict$1 as Pi, RetainedPendingCause as Pn, NotFoundError as Pr, EvalRunEvent as Pt, SpawnEvent as Q, LoopTraceEvent as Qi, HarnessTranscriptCapture as Qn, RetainedInteractiveAdmission as Qr, loopEventToOtelSpan as Qt, ResourceLimit as R, LoopDecisionPayload as Ri, ExecutorProgress as Rn, RetainedRunAdmissionError as Rr, INTELLIGENCE_WIRE_VERSION as Rt, ExecutorTeardownWarning as S, AgentRuntimeEventSink as Sa, LeakedReservation as Si, pollFor as Sn, DriverUnmetContractDecision as Sr, WorkerTraceUnavailableReason as St, Handle as T, AgentTaskSpec as Ta, ReservationRejection as Ti, waitUntil as Tn, defaultUnmetContractSteer as Tr, readWorkerTraceContext as Tt, RetainedExecutionState as U, LoopLineageOptions as Ui, readWorkerProgress as Un, WorkerSlots as Ur, OtelSpan as Ut, ResumedKeyState as V, LoopIterationEndedPayload as Vi, WorkerProgress as Vn, ValidationError as Vr, OtelExportConfig as Vt, RootHandle as W, LoopPlanDescription as Wi, ReconnectRetainedInteractiveRunOptions as Wn, createWorkerSlots as Wr, RuntimeEventOtelOptions as Wt, Scope as X, LoopTokenUsage as Xi, StartRetainedInteractiveRunOptions as Xn, RecoverRetainedRunOptions as Xr, exportEvalRuns as Xt, Runtime as Y, LoopTeardownFailedPayload as Yi, RetainedInteractiveStartMaterial as Yn, RecoverRetainedRunIntentOptions as Yr, createOtelExporter as Yt, Settled as Z, LoopTraceEmitter as Zi, HarnessTranscriptArtifact as Zn, RecoverRetainedRunResult as Zr, generateSpanId as Zt, ExecutorMaterialization as _, AgentBackendContext as _a, StartRetainedRunOptions as _i, WaitProbeRegistry as _n, DriverReentry as _r, WaitOpts as _t, BudgetOverspend as a, SelectionReceipt as aa, RetainedRunCancellation as ai, RuntimeStreamEventSummary as an, harnessTranscriptArtifact as ar, SpendGap as at, ExecutorRegistry as b, AgentKnowledgeProvider as ba, BudgetReadout as bi, createWaitProbes as bn, DriverRetryPolicy as br, WorkerInteractiveUnavailableReason as bt, EnvironmentTeardownReceipt as c, RuntimeRunCompleteInput as ca, RetainedRunEnvironmentAdmission as ci, SanitizedKnowledgeRequirement as cn, DriverAttemptRecord as cr, SubtreeSummary as ct, ExecutorAccounting as d, RuntimeRunOptions as da, RetainedRunIntentAdmission as di, sanitizeAgentRuntimeEvent as dn, DriverBudgetReadout as dr, SupervisorOpts as dt, MountManifestEntry as ea, RetainedInteractiveIntentAdmission as ei, padTraceId as en, HarnessTranscriptFile as er, SpawnOpts as et, ExecutorCancellation as f, RuntimeRunPersistenceAdapter as fa, RetainedRunReplayPoint as fi, sanitizeKnowledgeReadinessReport as fn, DriverContinuationRecord as fr, TokenUsageProvenance as ft, ExecutorFactory as g, AgentAdapter as ga, StartRetainedRunInEnvironmentOptions as gi, WaitProbe as gn, DriverProgressMark as gr, UsageEvent as gt, ExecutorExecutionBinding as h, startRuntimeRun as ha, RetainedRunTurnInput as hi, WaitOutcome as hn, DriverLoopRecord as hr, UnknownMaterializationReason as ht, Budget as i, SandboxClient as ia, RetainedRunCancelOptions as ii, RuntimeStreamEventSink as in, captureHarnessTranscript as ir, SpendChannel as it, NodeId as j, OpenAIChatToolChoice as ja, createBudgetPool as ji, decodeToolPart as jn, BackendTransportError as jr, mergeTraceEnv as jt, NoWinnerError as k, OpenAIChatResponseFormat as ka, ReservationWaitRefused as ki, TraceSource as kn, AgentEvalError$1 as kr, TraceContext as kt, ExecutionBindingReceipt as l, RuntimeRunCost as la, RetainedRunEventOptions as li, createRuntimeEventCollector as ln, DriverAttemptStop as lr, SupervisedResult as lt, ExecutorContext as m, RuntimeRunStatus as ma, RetainedRunStartMaterial as mi, PendingWait as mn, DriverFailureClass as mr, UnconfirmedTeardown as mt, AgentExecutionRef as n, OutputAdapter as na, RetainedRunAdmission as ni, RuntimeEventCollector as nn, HarnessTranscriptUnavailableReason as nr, SpawnRejection as nt, BudgetViolation as o, ValidationCtx as oa, RetainedRunDispatchedAdmission as oi, RuntimeTelemetryOptions as on, persistHarnessTranscript as or, SteerableRootHandle as ot, ExecutorCancellationRequest as p, RuntimeRunRow as pa, RetainedRunSnapshot as pi, sanitizeRuntimeStreamEvent as pn, DriverContractState as pr, TreeView as pt, RootSignal as q, LoopSandboxPlacement as qi, RetainedInteractiveEnvironmentInput as qn, NativeContextContinuationInput as qr, buildRuntimeEventOtelSpans as qt, AgentSpec as r, RunProvenance as ra, RetainedRunAdmissionHook as ri, RuntimeStreamEventCollector as rn, ReadableEnvironment as rr, Spend as rt, DefaultVerdict as s, Validator as sa, RetainedRunEffect as si, SanitizedKnowledgeReadinessReport as sn, DEFAULT_MAX_BARREN_REPROMPTS as sr, SubtreeResult as st, Agent as t, MountRecorder as ta, RetainedInteractiveStartedAdmission as ti, toOtelAttributes as tn, HarnessTranscriptUnavailable as tr, SpawnPrior as tt, Executor as u, RuntimeRunHandle as ua, RetainedRunHandle as ui, createRuntimeStreamEventCollector as un, DriverAttemptsExhaustedError as ur, Supervisor as ut, ExecutorNodeContext as v, AgentBackendInput as va, BudgetPool as vi, WaitRejection as vn, DriverRepromptPolicy as vr, WidenGate as vt, FleetYield as w, AgentTaskRunResult as wa, ReservationHolder as wi, validateWaitSpec as wn, classifyDriverFailure as wr, WorkerTraceSeamCarrier as wt, ExecutorResult as x, AgentRuntimeEvent as xa, BudgetReconcileFault as xi, isWaitOutcome as xn, DriverUnmetContractContext as xr, WorkerTraceEvidence as xt, ExecutorProgressEvent as y, AgentExecutionBackend as ya, BudgetPoolRestore as yi, WaitSpec as yn, DriverRepromptRefusal as yr, WorkerInteractiveSession as yt, ResourceSpend as z, LoopEndedPayload as zi, ScopeProgressInput as zn, RetainedRunDispatchBindingError as zr, LoopSpanNode as zt };
5437
- //# sourceMappingURL=types-CrnwLVYQ.d.ts.map
5502
+ export { SpawnJournal as $, LoopTraceEvent as $i, HarnessTranscriptCapture as $n, RetainedInteractiveAdmission as $r, loopEventToOtelSpan as $t, NodeExecutionIdentity as A, OpenAIChatResponseFormat as Aa, ReservationWaitRefused as Ai, TraceSource as An, AgentEvalError$1 as Ar, createPropagatingTraceEmitter as At, ResultBlobStore as B, LoopEndedPayload as Bi, ScopeProgressInput as Bn, RetainedRunDispatchBindingError as Br, OtelAttribute as Bt, ExecutorToolCall as C, AgentRuntimeEventSink as Ca, LeakedReservation as Ci, pollFor as Cn, DriverUnmetContractDecision as Cr, WorkerTraceResolver as Ct, MaterializedExecutionIdentity as D, AgentTaskStatus as Da, ReservationShortfall as Di, SessionMessageLike as Dn, summarizeDriverAttempts as Dr, workerTraceHeaders as Dt, HeldEnvironment as E, AgentTaskSpec as Ea, ReservationRejection as Ei, waitUntil as En, defaultUnmetContractSteer as Er, workerTraceEnv as Et, ProviderModelAttemptEvidence as F, RuntimeCanonicalStreamEvent as Fa, DefaultVerdict$1 as Fi, RetainedPendingCause as Fn, NotFoundError as Fr, EvalRunGeneration as Ft, RootMaterialization as G, LoopPlanDescription as Gi, ReconnectRetainedInteractiveRunOptions as Gn, createWorkerSlots as Gr, RuntimeEventOtelOptions as Gt, ResumedWork as H, LoopIterationEndedPayload as Hi, WorkerProgress as Hn, ValidationError as Hr, OtelExportStats as Ht, ProviderModelExecutionEvidence as I, RuntimeSession as Ia, Driver as Ii, ActivityLog as In, PlannerError as Ir, EvalRunsExportConfig as It, RootStreamReceipt as J, LoopSandboxPlacement as Ji, RetainedInteractiveEnvironmentInput as Jn, NativeContextContinuationInput as Jr, buildRuntimeEventOtelSpans as Jt, RootProviderModelEvidence as K, LoopPlanPayload as Ki, RecoverRetainedInteractiveRunOptions as Kn, NativeContextContinuationExecution as Kr, buildLoopOtelSpans as Kt, RecursiveReservationPolicy as L, RuntimeSessionStore as La, ExecCtx as Li, ActivityNote as Ln, RetainedInteractiveAdmissionError as Lr, EvalRunsExportResult as Lt, NodeSnapshot as M, OpenAIChatToolChoice as Ma, createBudgetPool as Mi, decodeToolPart as Mn, BackendTransportError as Mr, readTraceContextFromEnv as Mt, NodeStatus as N, RunAgentTaskOptions as Na, spendFromUsageEvents as Ni, sandboxSessionTraceSource as Nn, ConfigError as Nr, traceContextToEnv as Nt, MaterializedModelIdentity as O, BackendErrorDetail as Oa, ReservationStage as Oi, SessionTraceBox as On, upstreamUnavailableSignal as Or, workerTraceSeamKey as Ot, ProfileMaterializationReceipt as P, RunAgentTaskStreamOptions as Pa, AgentRunSpec as Pi, RetainedChildRecovery as Pn, JudgeError as Pr, EvalRunEvent as Pt, SpawnEvent as Q, LoopTraceEmitter as Qi, HarnessTranscriptArtifact as Qn, RecoverRetainedRunResult as Qr, generateSpanId as Qt, ResourceLimit as R, RuntimeStreamEvent as Ra, Iteration as Ri, DEFAULT_STALL_AFTER_MS as Rn, RetainedInteractiveBindingError as Rr, INTELLIGENCE_WIRE_VERSION as Rt, ExecutorTeardownWarning as S, AgentRuntimeEvent as Sa, BudgetReconcileFault as Si, isWaitOutcome as Sn, DriverUnmetContractContext as Sr, WorkerTraceUnavailableReason as St, Handle as T, AgentTaskRunResult as Ta, ReservationHolder as Ti, validateWaitSpec as Tn, classifyDriverFailure as Tr, readWorkerTraceContext as Tt, RetainedExecutionState as U, LoopIterationStartedPayload as Ui, createActivityLog as Un, SlotPermit as Ur, OtelExporter as Ut, ResumedKeyState as V, LoopIterationDispatchPayload as Vi, TeamProgress as Vn, RuntimeRunStateError as Vr, OtelExportConfig as Vt, RootHandle as W, LoopLineageOptions as Wi, readWorkerProgress as Wn, WorkerSlots as Wr, OtelSpan as Wt, Scope as X, LoopTeardownFailedPayload as Xi, RetainedInteractiveStartMaterial as Xn, RecoverRetainedRunIntentOptions as Xr, createOtelExporter as Xt, Runtime as Y, LoopStartedPayload as Yi, RetainedInteractiveRunHandle as Yn, ReconnectRetainedRunOptions as Yr, createOpenInferenceFileExporter as Yt, Settled as Z, LoopTokenUsage as Zi, StartRetainedInteractiveRunOptions as Zn, RecoverRetainedRunOptions as Zr, exportEvalRuns as Zt, ExecutorMaterialization as _, AgentAdapter as _a, StartRetainedRunInEnvironmentOptions as _i, WaitProbe as _n, DriverProgressMark as _r, WaitOpts as _t, BudgetOverspend as a, SandboxClient as aa, RetainedRunCancelOptions as ai, RuntimeStreamEventSink as an, captureHarnessTranscript as ar, SpendGap as at, ExecutorRegistry as b, AgentExecutionBackend as ba, BudgetPoolRestore as bi, WaitSpec as bn, DriverRepromptRefusal as br, WorkerInteractiveUnavailableReason as bt, EnvironmentTeardownReceipt as c, Validator as ca, RetainedRunEffect as ci, SanitizedKnowledgeReadinessReport as cn, DEFAULT_MAX_BARREN_REPROMPTS as cr, SubtreeSummary as ct, ExecutorAccounting as d, RuntimeRunHandle as da, RetainedRunHandle as di, createRuntimeStreamEventCollector as dn, DriverAttemptsExhaustedError as dr, SupervisorOpts as dt, LoopWinner as ea, RetainedInteractiveEnvironmentAdmission as ei, padSpanId as en, HarnessTranscriptEvidence as er, SpawnOpts as et, ExecutorCancellation as f, RuntimeRunOptions as fa, RetainedRunIntentAdmission as fi, sanitizeAgentRuntimeEvent as fn, DriverBudgetReadout as fr, TokenUsageProvenance as ft, ExecutorFactory as g, startRuntimeRun as ga, RetainedRunTurnInput as gi, WaitOutcome as gn, DriverLoopRecord as gr, UsageEvent as gt, ExecutorExecutionBinding as h, RuntimeRunStatus as ha, RetainedRunStartMaterial as hi, PendingWait as hn, DriverFailureClass as hr, UnknownMaterializationReason as ht, Budget as i, RunProvenance as ia, RetainedRunAdmissionHook as ii, RuntimeStreamEventCollector as in, ReadableEnvironment as ir, SpendChannel as it, NodeId as j, OpenAIChatTool as ja, ReserveOptions as ji, createPushTraceSource as jn, AgentEvalErrorCode as jr, mergeTraceEnv as jt, NoWinnerError as k, KnowledgeReadinessDecision as ka, ReservationTicket as ki, ToolStepInput as kn, UnavailablePausePolicy as kr, TraceContext as kt, ExecutionBindingReceipt as l, RuntimeRunCompleteInput as la, RetainedRunEnvironmentAdmission as li, SanitizedKnowledgeRequirement as ln, DriverAttemptRecord as lr, SupervisedResult as lt, ExecutorContext as m, RuntimeRunRow as ma, RetainedRunSnapshot as mi, sanitizeRuntimeStreamEvent as mn, DriverContractState as mr, UnconfirmedTeardown as mt, AgentExecutionRef as n, MountRecorder as na, RetainedInteractiveStartedAdmission as ni, toOtelAttributes as nn, HarnessTranscriptUnavailable as nr, SpawnRejection as nt, BudgetViolation as o, SelectionReceipt as oa, RetainedRunCancellation as oi, RuntimeStreamEventSummary as on, harnessTranscriptArtifact as or, SteerableRootHandle as ot, ExecutorCancellationRequest as p, RuntimeRunPersistenceAdapter as pa, RetainedRunReplayPoint as pi, sanitizeKnowledgeReadinessReport as pn, DriverContinuationRecord as pr, TreeView as pt, RootSignal as q, LoopResult as qi, RetainedInteractiveAdmissionHook as qn, NativeContextContinuationHandle as qr, buildLoopSpanNodes as qt, AgentSpec as r, OutputAdapter as ra, RetainedRunAdmission as ri, RuntimeEventCollector as rn, HarnessTranscriptUnavailableReason as rr, Spend as rt, DefaultVerdict as s, ValidationCtx as sa, RetainedRunDispatchedAdmission as si, RuntimeTelemetryOptions as sn, persistHarnessTranscript as sr, SubtreeResult as st, Agent as t, MountManifestEntry as ta, RetainedInteractiveIntentAdmission as ti, padTraceId as tn, HarnessTranscriptFile as tr, SpawnPrior as tt, Executor as u, RuntimeRunCost as ua, RetainedRunEventOptions as ui, createRuntimeEventCollector as un, DriverAttemptStop as ur, Supervisor as ut, ExecutorNodeContext as v, AgentBackendContext as va, StartRetainedRunOptions as vi, WaitProbeRegistry as vn, DriverReentry as vr, WidenGate as vt, FleetYield as w, AgentTaskContext as wa, ReservationFloor as wi, timerAt as wn, OnUnmetContract as wr, WorkerTraceSeamCarrier as wt, ExecutorResult as x, AgentKnowledgeProvider as xa, BudgetReadout as xi, createWaitProbes as xn, DriverRetryPolicy as xr, WorkerTraceEvidence as xt, ExecutorProgressEvent as y, AgentBackendInput as ya, BudgetPool as yi, WaitRejection as yn, DriverRepromptPolicy as yr, WorkerInteractiveSession as yt, ResourceSpend as z, LoopDecisionPayload as zi, ExecutorProgress as zn, RetainedRunAdmissionError as zr, LoopSpanNode as zt };
5503
+ //# sourceMappingURL=types-Bo7z5aG5.d.ts.map