/** Durable artifacts and provider-neutral helpers for v3 host execution. */ import type { RegisteredHostExecutor } from '../hostExecutors/registry.js'; import type { Manifest } from './contract.js'; export declare const V3_HOST_INPUT_SCHEMA_VERSION: 1; /** P0 gates render the complete redacted payload inline. Refuse larger inputs * before gate dispatch rather than asking a human to approve truncated bytes. */ export declare const V3_MAX_APPROVABLE_HOST_INPUT_BYTES = 8000; export interface V3PreparedHostInput { schemaVersion: typeof V3_HOST_INPUT_SCHEMA_VERSION; runId: string; nodeId: string; instanceId: string; attemptId: string; executor: string; provider: string; parsedInput: unknown; canonicalInput: unknown; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; approvalDigest: string; } export interface V3PreparedHostInputArtifact { prepared: V3PreparedHostInput; inputRef: { path: string; sha256: string; bytes: number; }; absolutePath: string; } export interface V3HostSuccessResult { schemaVersion: 1; runId: string; nodeId: string; instanceId: string; attemptId: string; executor: string; provider: string; idempotencyKey: string; inputHash: string; approvalDigest: string; output: unknown; externalRefs: Record; } export declare function prepareV3HostInputArtifact(input: { runDir: string; attemptDir: string; runId: string; nodeId: string; instanceId: string; attemptId: string; executorName: string; resolvedInput: unknown; registered: RegisteredHostExecutor; }): V3PreparedHostInputArtifact; /** * Adopt the durable sidecar left by a crash between file fsync and the * `hostInputPrepared` journal append. The sidecar is the freeze commit: never * resolve upstream bindings or parse relative time again in this window. * * This reader does not trust fields merely because they are self-consistent. * It re-derives the input hash, idempotency key and approval digest from the * expected run/attempt identity, then applies the same schema/provider drift * checks as normal journal-backed replay. */ export declare function readCrashLeftV3PreparedHostInput(input: { runDir: string; attemptDir: string; runId: string; nodeId: string; instanceId: string; attemptId: string; executorName: string; registered: RegisteredHostExecutor; }): V3PreparedHostInputArtifact | undefined; export declare function readAndVerifyV3PreparedHostInput(input: { runDir: string; inputRef: { path: string; sha256: string; bytes: number; }; expected: { runId: string; nodeId: string; instanceId: string; attemptId: string; executor: string; provider: string; inputHash: string; idempotencyKey: string; idempotencyTtlMs: number; approvalDigest: string; }; registered: RegisteredHostExecutor; }): V3PreparedHostInputArtifact; export declare function writeV3HostSuccessArtifacts(input: { runDir: string; attemptDir: string; runId: string; nodeId: string; instanceId: string; attemptId: string; executor: string; provider: string; idempotencyKey: string; inputHash: string; approvalDigest: string; output: unknown; externalRefs: Record; }): { manifestPath: string; resultPath: string; }; /** * Re-validate the schema/identity-bound host result wrapper after the generic manifest * validator has proved the file bytes. A generic goal manifest with a * coincidentally valid `result.json` is not close proof for a host intent: the * wrapper must remain bound to the complete durable effect identity. This is * crash/cross-attempt integrity, not an attestation against a same-UID writer. */ export declare function readAndVerifyV3HostSuccessResult(input: { runDir: string; attemptDir: string; manifest: Manifest; runId: string; nodeId: string; instanceId: string; attemptId: string; executor: string; provider: string; idempotencyKey: string; inputHash: string; approvalDigest: string; }): V3HostSuccessResult; export declare function validateHostInputRefShape(ref: { path: string; sha256: string; bytes: number; }): void; //# sourceMappingURL=host-execution.d.ts.map