@tangle-network/agent-runtime 9.0.9 → 9.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/{activation-CjS7d4_x.js → activation-B_10QJ3D.js} +4 -4
- package/dist/{activation-CjS7d4_x.js.map → activation-B_10QJ3D.js.map} +1 -1
- package/dist/{activation-OSYxeVWi.d.ts → activation-emYXDX7T.d.ts} +2 -2
- package/dist/agent.d.ts +1 -1
- package/dist/agent.js +4 -4
- package/dist/{bundle-CcpL2lfr.js → bundle-9NLb1WO3.js} +2 -2
- package/dist/{bundle-CcpL2lfr.js.map → bundle-9NLb1WO3.js.map} +1 -1
- package/dist/candidate-execution/index.js +5 -4
- package/dist/candidate-execution/index.js.map +1 -1
- package/dist/{continuation-DDPfLw2w.js → continuation-CZaeHEzQ.js} +2 -2
- package/dist/{continuation-DDPfLw2w.js.map → continuation-CZaeHEzQ.js.map} +1 -1
- package/dist/{coordination-manager-C0OJ1T9V.js → coordination-manager-BUct8qFe.js} +6 -6
- package/dist/{coordination-manager-C0OJ1T9V.js.map → coordination-manager-BUct8qFe.js.map} +1 -1
- package/dist/deadline-CySmJ_0S.js +134 -0
- package/dist/deadline-CySmJ_0S.js.map +1 -0
- package/dist/{delegate-Ct_KCtwW.js → delegate-DHtsLCyr.js} +2 -2
- package/dist/{delegate-Ct_KCtwW.js.map → delegate-DHtsLCyr.js.map} +1 -1
- package/dist/durable.d.ts +1 -1
- package/dist/durable.js +13 -13
- package/dist/{failure-cause-W0o778qO.js → failure-cause-WifbY42M.js} +2 -2
- package/dist/{failure-cause-W0o778qO.js.map → failure-cause-WifbY42M.js.map} +1 -1
- package/dist/{graph-DHvP4C1q.js → graph-D6KJ6wxN.js} +239 -306
- package/dist/graph-D6KJ6wxN.js.map +1 -0
- package/dist/{graph-registry-Dbm8QhbA.js → graph-registry-B_1C7qye.js} +1 -1
- package/dist/{graph-registry-D0FE9VpR.js → graph-registry-BbZN5deo.js} +282 -6
- package/dist/graph-registry-BbZN5deo.js.map +1 -0
- package/dist/{improve-DIsur006.js → improve-CUqmH45C.js} +8 -9
- package/dist/{improve-DIsur006.js.map → improve-CUqmH45C.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +15 -102
- package/dist/index.js.map +1 -1
- package/dist/intelligence.d.ts +2 -2
- package/dist/intelligence.js +7 -7
- package/dist/{jsonl-file-DsxVI0E_.js → jsonl-file-BhuxeejY.js} +114 -2
- package/dist/jsonl-file-BhuxeejY.js.map +1 -0
- package/dist/kernel.d.ts +2 -2
- package/dist/kernel.js +17 -16
- package/dist/{loop-runner-ku4_lGxf.js → loop-runner-CCeBurqG.js} +2 -2
- package/dist/{loop-runner-ku4_lGxf.js.map → loop-runner-CCeBurqG.js.map} +1 -1
- package/dist/{loop-runner-CCdQ1pmE.d.ts → loop-runner-Q9nlHcEH.d.ts} +2 -2
- package/dist/loop-runner-bin.d.ts +1 -1
- package/dist/loop-runner-bin.js +1 -1
- package/dist/mcp/bin.js +3 -3
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +7 -7
- package/dist/mcp/memory-bin.js +1 -1
- package/dist/output-artifacts-AqkZ8lO2.js +331 -0
- package/dist/output-artifacts-AqkZ8lO2.js.map +1 -0
- package/dist/{prepare-D7WwIddG.js → prepare-Cw4ZaN01.js} +5 -4
- package/dist/{prepare-D7WwIddG.js.map → prepare-Cw4ZaN01.js.map} +1 -1
- package/dist/{profile-BT0X-dm5.js → profile-Cxl_Ajl2.js} +2 -2
- package/dist/{profile-BT0X-dm5.js.map → profile-Cxl_Ajl2.js.map} +1 -1
- package/dist/profiles.d.ts +1 -1
- package/dist/{provision-supervisor-la7aXbs3.js → provision-supervisor-CNTBbuDV.js} +8 -6
- package/dist/{provision-supervisor-la7aXbs3.js.map → provision-supervisor-CNTBbuDV.js.map} +1 -1
- package/dist/{run-cancellation-CfwQmkeG.js → run-cancellation-Cy9ie5cQ.js} +3 -3
- package/dist/{run-cancellation-CfwQmkeG.js.map → run-cancellation-Cy9ie5cQ.js.map} +1 -1
- package/dist/{run-state-BCfmjm6a.js → run-state-C0nr4O7P.js} +6 -6
- package/dist/{run-state-BCfmjm6a.js.map → run-state-C0nr4O7P.js.map} +1 -1
- package/dist/{runtime-DXkdY7VT.js → runtime-C5yB7Vkk.js} +50 -25
- package/dist/{runtime-DXkdY7VT.js.map → runtime-C5yB7Vkk.js.map} +1 -1
- package/dist/{search-executor-DQH_PWxu.js → search-executor-BgEY5MKQ.js} +6 -6
- package/dist/{search-executor-DQH_PWxu.js.map → search-executor-BgEY5MKQ.js.map} +1 -1
- package/dist/{server-D4nCyP5N.js → server-X67SS4r8.js} +5 -5
- package/dist/{server-D4nCyP5N.js.map → server-X67SS4r8.js.map} +1 -1
- package/dist/{settle-record-soq9tzaX.js → settle-record-tgpwk6QF.js} +3 -3
- package/dist/{settle-record-soq9tzaX.js.map → settle-record-tgpwk6QF.js.map} +1 -1
- package/dist/{structural-rollout-D5rtwNgB.js → structural-rollout-BSzN8a0T.js} +7 -6
- package/dist/{structural-rollout-D5rtwNgB.js.map → structural-rollout-BSzN8a0T.js.map} +1 -1
- package/dist/{supervise-G9tWVS7d.js → supervise-RJG2ruTF.js} +189 -210
- package/dist/supervise-RJG2ruTF.js.map +1 -0
- package/dist/{supervision-discovery-DgkhVixZ.js → supervision-discovery-Hekh50FG.js} +5 -5
- package/dist/{supervision-discovery-DgkhVixZ.js.map → supervision-discovery-Hekh50FG.js.map} +1 -1
- package/dist/{supervisor-ByKjr-4D.js → supervisor-DbtgkJyr.js} +24 -12
- package/dist/supervisor-DbtgkJyr.js.map +1 -0
- package/dist/{supervisor-accounting-CvpkFhZU.js → supervisor-accounting-us4w7tG6.js} +8 -118
- package/dist/supervisor-accounting-us4w7tG6.js.map +1 -0
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +13 -13
- package/dist/{tool-server-Df-Uy99W.js → tool-server-CirrqFlr.js} +2 -2
- package/dist/{tool-server-Df-Uy99W.js.map → tool-server-CirrqFlr.js.map} +1 -1
- package/dist/{top-web-Cg5nyWlg.js → top-web-xSGEh02D.js} +7 -7
- package/dist/{top-web-Cg5nyWlg.js.map → top-web-xSGEh02D.js.map} +1 -1
- package/dist/tui/bin.js +3 -3
- package/dist/tui/index.d.ts +1 -1
- package/dist/tui/index.js +2 -2
- package/dist/{types-KQkbyDmn.d.ts → types-DMqr8Tmx.d.ts} +204 -165
- package/dist/{util-fcckrkKp.js → util-qsH5cC9S.js} +3 -132
- package/dist/util-qsH5cC9S.js.map +1 -0
- package/dist/{workspace-streams-DA9R3j-p.js → workspace-streams-BakRr-Pl.js} +9 -330
- package/dist/workspace-streams-BakRr-Pl.js.map +1 -0
- package/package.json +1 -1
- package/dist/graph-DHvP4C1q.js.map +0 -1
- package/dist/graph-registry-D0FE9VpR.js.map +0 -1
- package/dist/jsonl-file-DsxVI0E_.js.map +0 -1
- package/dist/supervise-G9tWVS7d.js.map +0 -1
- package/dist/supervisor-ByKjr-4D.js.map +0 -1
- package/dist/supervisor-accounting-CvpkFhZU.js.map +0 -1
- package/dist/util-fcckrkKp.js.map +0 -1
- package/dist/workspace-streams-DA9R3j-p.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Ay as
|
|
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-
|
|
1
|
+
import { Ay as OtelSpan, By as SanitizedKnowledgeRequirement, C as RuntimeFailureCause, CC as NotFoundError, Dy as OtelExportConfig, Ey as OtelAttribute, Fy as RuntimeStreamEventCollector, Gu as IsolatedCheckBoxEvidence, Hy as createRuntimeStreamEventCollector, Iy as RuntimeStreamEventSink, Ju as IsolatedCheckResult, Ly as RuntimeStreamEventSummary, My as createOtelExporter, Ny as loopEventToOtelSpan, Oy as OtelExportStats, Py as RuntimeEventCollector, Qy as Budget, Ry as RuntimeTelemetryOptions, S as RuntimeStreamEvent, SC as JudgeError, T as RuntimeFailureOwner, Uy as sanitizeKnowledgeReadinessReport, Vy as createRuntimeEventCollector, Xd as SupervisorProfile, _ as RunAgentTaskOptions, _u as SuperviseOptions, a as AgentKnowledgeProvider, b as RuntimeSession, bC as BackendTransportError, c as AgentTaskContext, cC as RuntimeRunCost, cp as ExecutorConfig, d as AgentTaskStatus, dC as RuntimeRunPersistenceAdapter, fC as RuntimeRunRow, g as OpenAIChatToolChoice, gC as Redactor, h as OpenAIChatTool, i as AgentExecutionBackend, jy as buildLoopOtelSpans, ky as OtelExporter, l as AgentTaskRunResult, lC as RuntimeRunHandle, m as OpenAIChatResponseFormat, mC as startRuntimeRun, n as AgentBackendContext, o as AgentRuntimeEvent, p as KnowledgeReadinessDecision, pC as RuntimeRunStatus, r as AgentBackendInput, rx as ExecutorFactory, s as AgentRuntimeEventSink, sC as RuntimeRunCompleteInput, t as AgentAdapter, u as AgentTaskSpec, uC as RuntimeRunOptions, v as RunAgentTaskStreamOptions, vC as AgentEvalError, w as RuntimeFailureCode, wC as ValidationError, wb as SupervisedResult, x as RuntimeSessionStore, xC as ConfigError, y as RuntimeCanonicalStreamEvent, yC as AgentEvalErrorCode, zy as SanitizedKnowledgeReadinessReport } from "./types-DMqr8Tmx.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-emYXDX7T.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-
|
|
6
|
+
import { i as auditLoopRunner, r as DelegatedLoopRunner } from "./loop-runner-Q9nlHcEH.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-
|
|
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-BSzN8a0T.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,
|
|
4
|
-
import { v as sleep } from "./util-
|
|
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-
|
|
6
|
-
import {
|
|
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-CUqmH45C.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-
|
|
9
|
-
import { t as sealAgentCandidateBundle } from "./bundle-
|
|
8
|
+
import { n as createAgentImprovementActivationResult } from "./activation-B_10QJ3D.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-
|
|
12
|
-
import { n as auditLoopRunner } from "./loop-runner-
|
|
13
|
-
import { l as sharedBoxLane, o as routerLane, r as dedicatedLane, t as SearchEnvironmentFault, u as subscriptionLane, y as decideSearchImprovement } from "./search-executor-
|
|
14
|
-
import { Tt as ROUTER_PRICE_SOURCE, wt as priceTokens } from "./supervisor-
|
|
15
|
-
import { n as runtimeFailureCause } from "./failure-cause-
|
|
16
|
-
import {
|
|
12
|
+
import { t as supervise } from "./supervise-RJG2ruTF.js";
|
|
13
|
+
import { n as auditLoopRunner } from "./loop-runner-CCeBurqG.js";
|
|
14
|
+
import { l as sharedBoxLane, o as routerLane, r as dedicatedLane, t as SearchEnvironmentFault, u as subscriptionLane, y as decideSearchImprovement } from "./search-executor-BgEY5MKQ.js";
|
|
15
|
+
import { Tt as ROUTER_PRICE_SOURCE, wt as priceTokens } from "./supervisor-DbtgkJyr.js";
|
|
16
|
+
import { n as runtimeFailureCause } from "./failure-cause-WifbY42M.js";
|
|
17
|
+
import { a as isolatedCheckBoxEvidenceSchema, o as isolatedCheckResultSchema } from "./graph-D6KJ6wxN.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 {
|
|
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
|
*
|