import { Type } from "typebox"; import type { ResourceClaim } from "./claims.js"; import type { ContextPackInput } from "./context.js"; export declare const OrchestrationRequestSchema: Type.TObject<{ id: Type.TOptional; batch_id: Type.TOptional; join: Type.TOptional, Type.TLiteral<"group">]>>; isolation: Type.TOptional>; schedule: Type.TOptional; at: Type.TOptional; timezone: Type.TOptional; max_runs: Type.TOptional; }>>; claims: Type.TOptional, Type.TLiteral<"test">, Type.TLiteral<"evidence">]>; resource: Type.TString; mode: Type.TUnion<[Type.TLiteral<"shared">, Type.TLiteral<"exclusive">]>; }>>>; lease_ttl_ms: Type.TOptional; context: Type.TOptional, Type.TLiteral<"write-approved">, Type.TLiteral<"sensitive-approved">]>; known_facts: Type.TOptional, Type.TLiteral<"repository">, Type.TLiteral<"delegated">, Type.TLiteral<"external">]>; reference: Type.TOptional; }>>>; unknowns: Type.TOptional>; decisions: Type.TOptional; unlock_condition: Type.TOptional; }>>>; references: Type.TOptional>>; evidence: Type.TOptional; claim: Type.TOptional; }>>>; claims: Type.TOptional>; learning_claims: Type.TOptional; kind: Type.TUnion<[Type.TLiteral<"pattern">, Type.TLiteral<"discovery">]>; claimId: Type.TString; statement: Type.TString; applicability: Type.TString; support: Type.TObject<{ mode: Type.TUnion<[Type.TLiteral<"direct-artifact">, Type.TLiteral<"task-outcome">]>; evidenceRefs: Type.TArray, Type.TLiteral<"repository-file">]>; ref: Type.TString; digest: Type.TString; }>>; }>; }>, Type.TObject<{ version: Type.TLiteral<2>; kind: Type.TUnion<[Type.TLiteral<"pattern">, Type.TLiteral<"discovery">]>; claimId: Type.TOptional; statement: Type.TString; applicability: Type.TString; }>]>>>; next_step: Type.TString; disclosure: Type.TOptional, Type.TLiteral<"blind-first">]>>; }>>; proof: Type.TOptional; max_evidence_age_ms: Type.TOptional; }>>; verifier: Type.TOptional; min_reviews: Type.TOptional; }>>; }>; export interface OrchestrationRequest { id?: string; batchId?: string; join?: "async" | "group"; isolation?: "worktree"; schedule?: { cron?: string; at?: string; timezone?: string; maxRuns?: number; }; claims?: ResourceClaim[]; leaseTtlMs?: number; context?: ContextPackInput; proof?: { mode: "evidence-only"; maxEvidenceAgeMs?: number; }; verifier?: { required: boolean; reviewerAgent?: string; minReviews?: number; }; } /** * Parse an untrusted orchestration request. * * `claims` is validated here rather than trusted. This function used to be a * bare cast, so a claim like `{kind:"bogus",mode:"wat"}` was accepted, written * to the lease store, and then made every subsequent read of that store throw — * one malformed request disabled all writes until the file was deleted by hand. * A request carrying an invalid claim is rejected outright: silently dropping * the claim would grant the task a lease weaker than it asked for. */ export declare function parseOrchestrationRequest(value: unknown): OrchestrationRequest | undefined;