@tangle-network/agent-runtime 9.0.9 → 9.0.10

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 (99) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{activation-CjS7d4_x.js → activation-BuKAzxZB.js} +4 -4
  3. package/dist/{activation-CjS7d4_x.js.map → activation-BuKAzxZB.js.map} +1 -1
  4. package/dist/{activation-OSYxeVWi.d.ts → activation-CVVpVGyG.d.ts} +2 -2
  5. package/dist/agent.d.ts +1 -1
  6. package/dist/agent.js +4 -4
  7. package/dist/{bundle-CcpL2lfr.js → bundle-9NLb1WO3.js} +2 -2
  8. package/dist/{bundle-CcpL2lfr.js.map → bundle-9NLb1WO3.js.map} +1 -1
  9. package/dist/candidate-execution/index.js +5 -4
  10. package/dist/candidate-execution/index.js.map +1 -1
  11. package/dist/{continuation-DDPfLw2w.js → continuation-CZaeHEzQ.js} +2 -2
  12. package/dist/{continuation-DDPfLw2w.js.map → continuation-CZaeHEzQ.js.map} +1 -1
  13. package/dist/{coordination-manager-C0OJ1T9V.js → coordination-manager-B-Ugh18D.js} +6 -6
  14. package/dist/{coordination-manager-C0OJ1T9V.js.map → coordination-manager-B-Ugh18D.js.map} +1 -1
  15. package/dist/deadline-CySmJ_0S.js +134 -0
  16. package/dist/deadline-CySmJ_0S.js.map +1 -0
  17. package/dist/{delegate-Ct_KCtwW.js → delegate-Dizy-1ZC.js} +2 -2
  18. package/dist/{delegate-Ct_KCtwW.js.map → delegate-Dizy-1ZC.js.map} +1 -1
  19. package/dist/durable.d.ts +1 -1
  20. package/dist/durable.js +13 -13
  21. package/dist/{failure-cause-W0o778qO.js → failure-cause-WifbY42M.js} +2 -2
  22. package/dist/{failure-cause-W0o778qO.js.map → failure-cause-WifbY42M.js.map} +1 -1
  23. package/dist/{graph-DHvP4C1q.js → graph-Bf3axJxp.js} +210 -300
  24. package/dist/graph-Bf3axJxp.js.map +1 -0
  25. package/dist/{graph-registry-Dbm8QhbA.js → graph-registry-B_1C7qye.js} +1 -1
  26. package/dist/{graph-registry-D0FE9VpR.js → graph-registry-BbZN5deo.js} +282 -6
  27. package/dist/graph-registry-BbZN5deo.js.map +1 -0
  28. package/dist/{improve-DIsur006.js → improve-JThdxpGB.js} +8 -9
  29. package/dist/{improve-DIsur006.js.map → improve-JThdxpGB.js.map} +1 -1
  30. package/dist/index.d.ts +3 -3
  31. package/dist/index.js +15 -102
  32. package/dist/index.js.map +1 -1
  33. package/dist/intelligence.d.ts +2 -2
  34. package/dist/intelligence.js +7 -7
  35. package/dist/{jsonl-file-DsxVI0E_.js → jsonl-file-BhuxeejY.js} +114 -2
  36. package/dist/jsonl-file-BhuxeejY.js.map +1 -0
  37. package/dist/kernel.d.ts +2 -2
  38. package/dist/kernel.js +17 -16
  39. package/dist/{loop-runner-CCdQ1pmE.d.ts → loop-runner-40_tD2d4.d.ts} +2 -2
  40. package/dist/{loop-runner-ku4_lGxf.js → loop-runner-D8FP4oEN.js} +2 -2
  41. package/dist/{loop-runner-ku4_lGxf.js.map → loop-runner-D8FP4oEN.js.map} +1 -1
  42. package/dist/loop-runner-bin.d.ts +1 -1
  43. package/dist/loop-runner-bin.js +1 -1
  44. package/dist/mcp/bin.js +3 -3
  45. package/dist/mcp/index.d.ts +1 -1
  46. package/dist/mcp/index.js +7 -7
  47. package/dist/mcp/memory-bin.js +1 -1
  48. package/dist/output-artifacts-AqkZ8lO2.js +331 -0
  49. package/dist/output-artifacts-AqkZ8lO2.js.map +1 -0
  50. package/dist/{prepare-D7WwIddG.js → prepare-Cw4ZaN01.js} +5 -4
  51. package/dist/{prepare-D7WwIddG.js.map → prepare-Cw4ZaN01.js.map} +1 -1
  52. package/dist/{profile-BT0X-dm5.js → profile-Cxl_Ajl2.js} +2 -2
  53. package/dist/{profile-BT0X-dm5.js.map → profile-Cxl_Ajl2.js.map} +1 -1
  54. package/dist/profiles.d.ts +1 -1
  55. package/dist/{provision-supervisor-la7aXbs3.js → provision-supervisor-BDAXc65B.js} +8 -6
  56. package/dist/{provision-supervisor-la7aXbs3.js.map → provision-supervisor-BDAXc65B.js.map} +1 -1
  57. package/dist/{run-cancellation-CfwQmkeG.js → run-cancellation-Cy9ie5cQ.js} +3 -3
  58. package/dist/{run-cancellation-CfwQmkeG.js.map → run-cancellation-Cy9ie5cQ.js.map} +1 -1
  59. package/dist/{run-state-BCfmjm6a.js → run-state-9FP-wBWK.js} +6 -6
  60. package/dist/{run-state-BCfmjm6a.js.map → run-state-9FP-wBWK.js.map} +1 -1
  61. package/dist/{runtime-DXkdY7VT.js → runtime-Czu2SSMy.js} +50 -25
  62. package/dist/{runtime-DXkdY7VT.js.map → runtime-Czu2SSMy.js.map} +1 -1
  63. package/dist/{search-executor-DQH_PWxu.js → search-executor-Dl_WUQeH.js} +6 -6
  64. package/dist/{search-executor-DQH_PWxu.js.map → search-executor-Dl_WUQeH.js.map} +1 -1
  65. package/dist/{server-D4nCyP5N.js → server-Dbge7VDj.js} +5 -5
  66. package/dist/{server-D4nCyP5N.js.map → server-Dbge7VDj.js.map} +1 -1
  67. package/dist/{settle-record-soq9tzaX.js → settle-record-tgpwk6QF.js} +3 -3
  68. package/dist/{settle-record-soq9tzaX.js.map → settle-record-tgpwk6QF.js.map} +1 -1
  69. package/dist/{structural-rollout-D5rtwNgB.js → structural-rollout-DUMYWwZ3.js} +7 -6
  70. package/dist/{structural-rollout-D5rtwNgB.js.map → structural-rollout-DUMYWwZ3.js.map} +1 -1
  71. package/dist/{supervise-G9tWVS7d.js → supervise-BpcWjDMr.js} +12 -10
  72. package/dist/{supervise-G9tWVS7d.js.map → supervise-BpcWjDMr.js.map} +1 -1
  73. package/dist/{supervision-discovery-DgkhVixZ.js → supervision-discovery-Hekh50FG.js} +5 -5
  74. package/dist/{supervision-discovery-DgkhVixZ.js.map → supervision-discovery-Hekh50FG.js.map} +1 -1
  75. package/dist/{supervisor-ByKjr-4D.js → supervisor-CdrDXnOJ.js} +9 -8
  76. package/dist/{supervisor-ByKjr-4D.js.map → supervisor-CdrDXnOJ.js.map} +1 -1
  77. package/dist/{supervisor-accounting-CvpkFhZU.js → supervisor-accounting-us4w7tG6.js} +8 -118
  78. package/dist/supervisor-accounting-us4w7tG6.js.map +1 -0
  79. package/dist/testing.d.ts +1 -1
  80. package/dist/testing.js +13 -13
  81. package/dist/{tool-server-Df-Uy99W.js → tool-server-CirrqFlr.js} +2 -2
  82. package/dist/{tool-server-Df-Uy99W.js.map → tool-server-CirrqFlr.js.map} +1 -1
  83. package/dist/{top-web-Cg5nyWlg.js → top-web-xSGEh02D.js} +7 -7
  84. package/dist/{top-web-Cg5nyWlg.js.map → top-web-xSGEh02D.js.map} +1 -1
  85. package/dist/tui/bin.js +3 -3
  86. package/dist/tui/index.d.ts +1 -1
  87. package/dist/tui/index.js +2 -2
  88. package/dist/{types-KQkbyDmn.d.ts → types-DRijOelA.d.ts} +189 -164
  89. package/dist/{util-fcckrkKp.js → util-qsH5cC9S.js} +3 -132
  90. package/dist/util-qsH5cC9S.js.map +1 -0
  91. package/dist/{workspace-streams-DA9R3j-p.js → workspace-streams-BakRr-Pl.js} +9 -330
  92. package/dist/workspace-streams-BakRr-Pl.js.map +1 -0
  93. package/package.json +1 -1
  94. package/dist/graph-DHvP4C1q.js.map +0 -1
  95. package/dist/graph-registry-D0FE9VpR.js.map +0 -1
  96. package/dist/jsonl-file-DsxVI0E_.js.map +0 -1
  97. package/dist/supervisor-accounting-CvpkFhZU.js.map +0 -1
  98. package/dist/util-fcckrkKp.js.map +0 -1
  99. package/dist/workspace-streams-DA9R3j-p.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Ay as loopEventToOtelSpan, By as sanitizeKnowledgeReadinessReport, C as RuntimeFailureCause, Cy as OtelAttribute, Dy as OtelSpan, Ey as OtelExporter, Fy as RuntimeTelemetryOptions, Gu as IsolatedCheckResult, Iy as SanitizedKnowledgeReadinessReport, Ly as SanitizedKnowledgeRequirement, My as RuntimeStreamEventCollector, Ny as RuntimeStreamEventSink, Oy as buildLoopOtelSpans, Py as RuntimeStreamEventSummary, Ry as createRuntimeEventCollector, S as RuntimeStreamEvent, T as RuntimeFailureOwner, Ty as OtelExportStats, Uu as IsolatedCheckBoxEvidence, Yy as Budget, _ as RunAgentTaskOptions, _C as BackendTransportError, a as AgentKnowledgeProvider, aC as RuntimeRunCost, ap as ExecutorConfig, b as RuntimeSession, bC as NotFoundError, c as AgentTaskContext, cC as RuntimeRunPersistenceAdapter, d as AgentTaskStatus, dC as startRuntimeRun, ex as ExecutorFactory, g as OpenAIChatToolChoice, gC as AgentEvalErrorCode, h as OpenAIChatTool, hC as AgentEvalError, hu as SuperviseOptions, i as AgentExecutionBackend, iC as RuntimeRunCompleteInput, jy as RuntimeEventCollector, ky as createOtelExporter, l as AgentTaskRunResult, lC as RuntimeRunRow, m as OpenAIChatResponseFormat, n as AgentBackendContext, o as AgentRuntimeEvent, oC as RuntimeRunHandle, p as KnowledgeReadinessDecision, pC as Redactor, qd as SupervisorProfile, r as AgentBackendInput, s as AgentRuntimeEventSink, sC as RuntimeRunOptions, t as AgentAdapter, u as AgentTaskSpec, uC as RuntimeRunStatus, v as RunAgentTaskStreamOptions, vC as ConfigError, w as RuntimeFailureCode, wy as OtelExportConfig, x as RuntimeSessionStore, xC as ValidationError, xb as SupervisedResult, y as RuntimeCanonicalStreamEvent, yC as JudgeError, zy as createRuntimeStreamEventCollector } from "./types-KQkbyDmn.js";
2
- import { $ as ImproveCodeBaseOptions, $t as CandidateGenerator, At as SearchPromotion, B as DecideSearchImprovementOptions, Bt as sharedBoxLane, Ct as ImproveSearchOptions, Dt as ImprovementCodeCandidate, Et as ImproveSurface, Ft as SearchLaneOptions, G as ImproveTrainingOptions, Gt as AgenticGeneratorOptions, H as decideSearchImprovement, Ht as DeepReadonly, It as SearchTraceOptions, J as ProfileTrainerRequest, Jt as AgenticGeneratorShotReceipt, K as ImproveTrainingResult, Kt as AgenticGeneratorShotDisposition, L as improve, Lt as SharedBoxSearchLane, Mt as SearchEnvironmentFault, Nt as SearchLane, Ot as ImprovementProfileCandidate, Pt as SearchLaneKind, Q as ImproveCandidateValidator, Qt as commandVerifier, R as SearchMethodOptions, Rt as dedicatedLane, St as ImproveSearchMethod, Tt as ImproveSkillsOptions, U as CheckpointServingPort, Ut as ReadonlyAgentProfile, V as SearchImprovementDecision, Vt as subscriptionLane, W as ControlledTrainingCommand, Wt as AgenticGeneratorExecutorForWorktree, X as createCommandProfileTrainer, Xt as VerifyResult, Y as TrainingBoundaryResult, Yt as Verifier, Z as ImproveCandidateValidationInput, Zt as agenticGenerator, at as ImproveLineage, bt as ImproveSearchAgent, ct as ImproveMethodLineage, dt as ImproveMethodSource, et as ImproveCodeOptions, ft as ImproveOptimizationRunOptions, gt as ImproveProfileSurface, ht as ImproveProfileComponents, i as AgentImprovementActivationTransition, it as ImproveCustomCodeGeneratorOptions, jt as SearchCellContext, kt as SearchDispatchContext, lt as ImproveMethodOptions, mt as ImproveProfileAgent, n as AgentImprovementActivationResultStore, nt as ImproveCodeRunOptions, ot as ImproveMethodContext, q as ProfileTrainer, qt as AgenticGeneratorShotExecution, rt as ImproveCost, st as ImproveMethodFactory, t as AgentImprovementActivationReconciliation, tt as ImproveCodeResult, ut as ImproveMethodResult, vt as ImproveRuntimeCodeGeneratorOptions, wt as ImproveSearchResult, xt as ImproveSearchIdentity, yt as ImproveScenarioPartitions, z as searchMethod, zt as routerLane } from "./activation-OSYxeVWi.js";
1
+ import { Ay as buildLoopOtelSpans, By as createRuntimeEventCollector, C as RuntimeFailureCause, CC as ValidationError, Cb as SupervisedResult, Dy as OtelExportStats, Ey as OtelExportConfig, Fy as RuntimeStreamEventSink, Gu as IsolatedCheckBoxEvidence, Hy as sanitizeKnowledgeReadinessReport, Iy as RuntimeStreamEventSummary, Ly as RuntimeTelemetryOptions, My as loopEventToOtelSpan, Ny as RuntimeEventCollector, Oy as OtelExporter, Py as RuntimeStreamEventCollector, Ry as SanitizedKnowledgeReadinessReport, S as RuntimeStreamEvent, SC as NotFoundError, T as RuntimeFailureOwner, Ty as OtelAttribute, Vy as createRuntimeStreamEventCollector, Yd as SupervisorProfile, Zy as Budget, _ as RunAgentTaskOptions, _C as AgentEvalError, _u as SuperviseOptions, a as AgentKnowledgeProvider, b as RuntimeSession, bC as ConfigError, c as AgentTaskContext, cC as RuntimeRunHandle, d as AgentTaskStatus, dC as RuntimeRunRow, fC as RuntimeRunStatus, g as OpenAIChatToolChoice, h as OpenAIChatTool, hC as Redactor, i as AgentExecutionBackend, jy as createOtelExporter, ky as OtelSpan, l as AgentTaskRunResult, lC as RuntimeRunOptions, m as OpenAIChatResponseFormat, n as AgentBackendContext, nx as ExecutorFactory, o as AgentRuntimeEvent, oC as RuntimeRunCompleteInput, p as KnowledgeReadinessDecision, pC as startRuntimeRun, qu as IsolatedCheckResult, r as AgentBackendInput, s as AgentRuntimeEventSink, sC as RuntimeRunCost, sp as ExecutorConfig, t as AgentAdapter, u as AgentTaskSpec, uC as RuntimeRunPersistenceAdapter, v as RunAgentTaskStreamOptions, vC as AgentEvalErrorCode, w as RuntimeFailureCode, x as RuntimeSessionStore, xC as JudgeError, y as RuntimeCanonicalStreamEvent, yC as BackendTransportError, zy as SanitizedKnowledgeRequirement } from "./types-DRijOelA.js";
2
+ import { $ as ImproveCodeBaseOptions, $t as CandidateGenerator, At as SearchPromotion, B as DecideSearchImprovementOptions, Bt as sharedBoxLane, Ct as ImproveSearchOptions, Dt as ImprovementCodeCandidate, Et as ImproveSurface, Ft as SearchLaneOptions, G as ImproveTrainingOptions, Gt as AgenticGeneratorOptions, H as decideSearchImprovement, Ht as DeepReadonly, It as SearchTraceOptions, J as ProfileTrainerRequest, Jt as AgenticGeneratorShotReceipt, K as ImproveTrainingResult, Kt as AgenticGeneratorShotDisposition, L as improve, Lt as SharedBoxSearchLane, Mt as SearchEnvironmentFault, Nt as SearchLane, Ot as ImprovementProfileCandidate, Pt as SearchLaneKind, Q as ImproveCandidateValidator, Qt as commandVerifier, R as SearchMethodOptions, Rt as dedicatedLane, St as ImproveSearchMethod, Tt as ImproveSkillsOptions, U as CheckpointServingPort, Ut as ReadonlyAgentProfile, V as SearchImprovementDecision, Vt as subscriptionLane, W as ControlledTrainingCommand, Wt as AgenticGeneratorExecutorForWorktree, X as createCommandProfileTrainer, Xt as VerifyResult, Y as TrainingBoundaryResult, Yt as Verifier, Z as ImproveCandidateValidationInput, Zt as agenticGenerator, at as ImproveLineage, bt as ImproveSearchAgent, ct as ImproveMethodLineage, dt as ImproveMethodSource, et as ImproveCodeOptions, ft as ImproveOptimizationRunOptions, gt as ImproveProfileSurface, ht as ImproveProfileComponents, i as AgentImprovementActivationTransition, it as ImproveCustomCodeGeneratorOptions, jt as SearchCellContext, kt as SearchDispatchContext, lt as ImproveMethodOptions, mt as ImproveProfileAgent, n as AgentImprovementActivationResultStore, nt as ImproveCodeRunOptions, ot as ImproveMethodContext, q as ProfileTrainer, qt as AgenticGeneratorShotExecution, rt as ImproveCost, st as ImproveMethodFactory, t as AgentImprovementActivationReconciliation, tt as ImproveCodeResult, ut as ImproveMethodResult, vt as ImproveRuntimeCodeGeneratorOptions, wt as ImproveSearchResult, xt as ImproveSearchIdentity, yt as ImproveScenarioPartitions, z as searchMethod, zt as routerLane } from "./activation-CVVpVGyG.js";
3
3
  import { i as SurfaceImprovementEdit } from "./improvement-adapter-D5GRU1eY.js";
4
4
  import { a as ImprovementProposalSource } from "./types-qsqfyQoY.js";
5
5
  import { T as AgentCandidateOutputArtifactPort } from "./workspace-archive-DS9E9tUr.js";
6
- import { i as auditLoopRunner, r as DelegatedLoopRunner } from "./loop-runner-CCdQ1pmE.js";
6
+ import { i as auditLoopRunner, r as DelegatedLoopRunner } from "./loop-runner-40_tD2d4.js";
7
7
  import { a as RuntimeHookContext, c as RuntimeHookPhase, d as composeRuntimeHooks, f as defineRuntimeHooks, i as RuntimeExecutionAdmittedPayload, l as RuntimeHookTarget, o as RuntimeHookErrorContext, s as RuntimeHookEvent, u as RuntimeHooks } from "./runtime-hooks-DPghSHV7.js";
8
8
  import { toW3CSpanId as padSpanId, toW3CTraceId as padTraceId } from "@tangle-network/agent-trace-contract";
9
9
  import { AgentCandidateBundle, AgentCandidateCapturedArtifact, AgentCandidateKnowledge, AgentProfile, Sha256Digest } from "@tangle-network/agent-interface";
package/dist/index.js CHANGED
@@ -1,24 +1,24 @@
1
- import { B as InMemoryRuntimeSessionStore, C as optimizerMethod, H as nowIso, I as streamAgentTurn, L as createIterableBackend, R as createSandboxPromptBackend, U as startOrResumeRuntimeSession, V as newRuntimeSession, W as touchSession, z as normalizeBackendStreamEvent } from "./structural-rollout-D5rtwNgB.js";
1
+ import { B as InMemoryRuntimeSessionStore, C as optimizerMethod, H as nowIso, I as streamAgentTurn, L as createIterableBackend, R as createSandboxPromptBackend, U as startOrResumeRuntimeSession, V as newRuntimeSession, W as touchSession, z as normalizeBackendStreamEvent } from "./structural-rollout-DUMYWwZ3.js";
2
2
  import { a as JudgeError, f as RuntimeRunStateError, i as ConfigError, m as ValidationError, o as NotFoundError, r as BackendTransportError, t as AgentEvalError } from "./errors-DG8yufqX.js";
3
- import { Jn as createRuntimeStreamEventCollector, Kn as loopEventToOtelSpan, Un as createOtelExporter, Xn as sanitizeRuntimeStreamEvent, Yn as sanitizeKnowledgeReadinessReport, pi as providerMessageText, qn as createRuntimeEventCollector, qr as executableAgentProfileSnapshot, zn as buildLoopOtelSpans } from "./supervisor-accounting-CvpkFhZU.js";
4
- import { v as sleep } from "./util-fcckrkKp.js";
5
- import { c as withMethodRuntimeControls, d as commandVerifier, f as addRuntimeUsage, i as assertCandidateValidator, m as isUsageAmount, n as createCommandProfileTrainer, o as parseExecutionRef, p as createRuntimeUsageTotals, r as searchMethod, s as privateValuePaths, t as improve, u as agenticGenerator } from "./improve-DIsur006.js";
6
- import { I as embeddedCandidateArtifact, L as immutableCandidateValue, M as canonicalCandidateBytes$1, N as canonicalCandidateDigest$1, R as omitTopLevelDigest, g as persistCandidateOutputArtifact, s as captureAgentCandidateWorkspace } from "./workspace-streams-DA9R3j-p.js";
3
+ import { Jn as createRuntimeStreamEventCollector, Kn as loopEventToOtelSpan, Un as createOtelExporter, Xn as sanitizeRuntimeStreamEvent, Yn as sanitizeKnowledgeReadinessReport, ci as providerMessageText, qn as createRuntimeEventCollector, qr as executableAgentProfileSnapshot, zn as buildLoopOtelSpans } from "./supervisor-accounting-us4w7tG6.js";
4
+ import { v as sleep } from "./util-qsH5cC9S.js";
5
+ import { c as withMethodRuntimeControls, d as commandVerifier, f as addRuntimeUsage, i as assertCandidateValidator, m as isUsageAmount, n as createCommandProfileTrainer, o as parseExecutionRef, p as createRuntimeUsageTotals, r as searchMethod, s as privateValuePaths, t as improve, u as agenticGenerator } from "./improve-JThdxpGB.js";
6
+ import { _ as embeddedCandidateArtifact, m as canonicalCandidateDigest$1, p as canonicalCandidateBytes$1, t as persistCandidateOutputArtifact, v as immutableCandidateValue, y as omitTopLevelDigest } from "./output-artifacts-AqkZ8lO2.js";
7
7
  import { d as defaultRedactorIdentityMaterial, f as resolveRedactor } from "./snapshot-BKI_w3JD.js";
8
- import { n as createAgentImprovementActivationResult } from "./activation-CjS7d4_x.js";
9
- import { t as sealAgentCandidateBundle } from "./bundle-CcpL2lfr.js";
8
+ import { n as createAgentImprovementActivationResult } from "./activation-BuKAzxZB.js";
9
+ import { t as sealAgentCandidateBundle } from "./bundle-9NLb1WO3.js";
10
+ import { s as captureAgentCandidateWorkspace } from "./workspace-streams-BakRr-Pl.js";
10
11
  import { t as assertExecutableAgentProfile } from "./model-policy-CZwhXp8O.js";
11
- import { t as supervise } from "./supervise-G9tWVS7d.js";
12
- import { n as auditLoopRunner } from "./loop-runner-ku4_lGxf.js";
13
- import { l as sharedBoxLane, o as routerLane, r as dedicatedLane, t as SearchEnvironmentFault, u as subscriptionLane, y as decideSearchImprovement } from "./search-executor-DQH_PWxu.js";
14
- import { Tt as ROUTER_PRICE_SOURCE, wt as priceTokens } from "./supervisor-ByKjr-4D.js";
15
- import { n as runtimeFailureCause } from "./failure-cause-W0o778qO.js";
16
- import { s as validateIsolatedCheckOutputs } from "./graph-DHvP4C1q.js";
12
+ import { t as supervise } from "./supervise-BpcWjDMr.js";
13
+ import { n as auditLoopRunner } from "./loop-runner-D8FP4oEN.js";
14
+ import { l as sharedBoxLane, o as routerLane, r as dedicatedLane, t as SearchEnvironmentFault, u as subscriptionLane, y as decideSearchImprovement } from "./search-executor-Dl_WUQeH.js";
15
+ import { Tt as ROUTER_PRICE_SOURCE, wt as priceTokens } from "./supervisor-CdrDXnOJ.js";
16
+ import { n as runtimeFailureCause } from "./failure-cause-WifbY42M.js";
17
+ import { a as isolatedCheckBoxEvidenceSchema, o as isolatedCheckResultSchema } from "./graph-Bf3axJxp.js";
17
18
  import { n as defineRuntimeHooks, t as composeRuntimeHooks } from "./runtime-hooks-CsW2pfFk.js";
18
19
  import { toW3CSpanId as padSpanId, toW3CTraceId as padTraceId } from "@tangle-network/agent-trace-contract";
19
- import { agentCandidateArtifactRefSchema, agentCandidateKnowledgeSchema, agentCandidateWorkspaceManifestMaterialSchema, agentProfileSchema, canonicalAgentProfileDigest, canonicalCandidateDigest, sha256DigestSchema } from "@tangle-network/agent-interface";
20
+ import { agentCandidateKnowledgeSchema, agentProfileSchema, canonicalAgentProfileDigest, sha256DigestSchema } from "@tangle-network/agent-interface";
20
21
  import { FAILURE_CLASSES, acquisitionPlansForKnowledgeGaps, blockingKnowledgeEval, canonicalJson, runAgentControlLoop, scoreKnowledgeReadiness, userQuestionsForKnowledgeGaps } from "@tangle-network/agent-eval";
21
- import { z } from "zod";
22
22
  import { createHash } from "node:crypto";
23
23
  import { readFileSync, realpathSync } from "node:fs";
24
24
  import { isAbsolute, relative, resolve, sep } from "node:path";
@@ -2662,93 +2662,6 @@ function toAgentContext(task, knowledge, ctx) {
2662
2662
  abortSignal: ctx.abortSignal
2663
2663
  };
2664
2664
  }
2665
- // src/runtime/isolated-check-result.ts
2666
- const isolatedCheckOutputEvidenceSchema = z.object({
2667
- executionId: z.string().max(200).refine((value) => value.trim() !== "" && !/\p{Cc}/u.test(value)),
2668
- inputDigest: sha256DigestSchema,
2669
- status: z.enum(["retained", "incomplete"]),
2670
- files: z.array(z.object({
2671
- path: z.string(),
2672
- artifact: agentCandidateArtifactRefSchema
2673
- }).strict()).max(16),
2674
- missing: z.array(z.object({
2675
- path: z.string(),
2676
- reason: z.enum([
2677
- "missing",
2678
- "unsafe-path",
2679
- "size-limit",
2680
- "capture-failed",
2681
- "store-failed",
2682
- "timeout"
2683
- ])
2684
- }).strict()).max(16),
2685
- source: z.discriminatedUnion("kind", [z.object({
2686
- kind: z.literal("local"),
2687
- path: z.string().min(1)
2688
- }).strict(), z.object({
2689
- kind: z.literal("sandbox"),
2690
- sandboxId: z.string().min(1),
2691
- state: z.literal("stopped")
2692
- }).strict()]).optional()
2693
- }).strict().superRefine((value, context) => {
2694
- try {
2695
- validateIsolatedCheckOutputs({
2696
- paths: [...value.files, ...value.missing].map((file) => file.path),
2697
- maxFileBytes: 67108864,
2698
- maxTotalBytes: 67108864
2699
- });
2700
- } catch {
2701
- context.addIssue({
2702
- code: "custom",
2703
- message: "Check output evidence has invalid paths"
2704
- });
2705
- }
2706
- if (value.status === "retained" !== (value.missing.length === 0) || value.status === "retained" && value.source !== void 0 || value.files.reduce((bytes, file) => bytes + file.artifact.byteLength, 0) > 67108864) context.addIssue({
2707
- code: "custom",
2708
- message: "Check output evidence is inconsistent"
2709
- });
2710
- });
2711
- /** Decode the existing execution contract without widening or reinterpreting its evidence. */
2712
- const isolatedCheckBoxEvidenceSchema = z.object({
2713
- sandboxId: z.string().min(1),
2714
- account: z.string().min(1),
2715
- memoryMB: z.number().finite().positive().optional(),
2716
- input: agentCandidateWorkspaceManifestMaterialSchema,
2717
- inputDigest: sha256DigestSchema
2718
- }).strict().superRefine((value, context) => {
2719
- if (canonicalCandidateDigest(value.input) !== value.inputDigest) context.addIssue({
2720
- code: "custom",
2721
- message: "Check input digest does not match its manifest"
2722
- });
2723
- });
2724
- /** Execution evidence, not a verdict about task correctness or permission to execute again. */
2725
- const isolatedCheckResultSchema = z.discriminatedUnion("succeeded", [z.object({
2726
- succeeded: z.literal(true),
2727
- value: z.object({
2728
- stdout: z.string(),
2729
- stderr: z.string()
2730
- }).strict(),
2731
- box: isolatedCheckBoxEvidenceSchema.optional(),
2732
- outputs: isolatedCheckOutputEvidenceSchema.optional()
2733
- }).strict(), z.object({
2734
- succeeded: z.literal(false),
2735
- reason: z.enum([
2736
- "refused",
2737
- "failed",
2738
- "timeout",
2739
- "cancelled",
2740
- "output-limit",
2741
- "input-limit",
2742
- "cleanup-failed"
2743
- ]),
2744
- diagnostic: z.string(),
2745
- stdout: z.string().optional(),
2746
- stderr: z.string().optional(),
2747
- exitCode: z.number().int().nullable().optional(),
2748
- cleanupDiagnostic: z.string().optional(),
2749
- box: isolatedCheckBoxEvidenceSchema.optional(),
2750
- outputs: isolatedCheckOutputEvidenceSchema.optional()
2751
- }).strict()]);
2752
2665
  // src/runtime-run.ts
2753
2666
  /**
2754
2667
  *