import type { PlanReceipt, DelegateHandoff } from "../../plan/types.js"; import type { FabricWorkerResult } from "../../status/types.js"; import type { DispatchCacheOutcome, DispatchIndeterminate, DispatchTarget, FabricDispatchReceipt } from "../types.js"; export interface FabricReceiptInput { readonly plan: PlanReceipt; readonly target: DispatchTarget; /** Untrusted terminal Fabric AgentRunRecord, not the transport envelope. */ readonly value: unknown; readonly workerResult?: FabricWorkerResult; readonly createdAt?: string; } /** Named source bytes retained for independent digest recomputation. */ export interface FabricDigestInputs { readonly briefPath: string; readonly task: string; readonly handoff?: DelegateHandoff; } /** Re-read the brief and recompute each namespace, without trusting recorded hashes. */ export declare function verifyFabricDispatchDigests(receipt: FabricDispatchReceipt, plan: PlanReceipt | FabricDigestInputs): Promise; export interface FabricDispatchOwnership { readonly dispatchId: string; readonly specPath: string; readonly address: readonly string[]; } /** Tree-local accounting travels with worktree moves; no absolute tree path is hashed. */ export declare function fabricOwnershipPath(cachePath: string, address: readonly string[], worktreePath: string): Promise; export declare function readFabricOwnership(cachePath: string, address: readonly string[], worktreePath: string): Promise; /** Resolve ownership before any publication; invalid worker trees are not success receipts. */ export declare function resolveFabricReceiptOwnership(plan: PlanReceipt, target: DispatchTarget, workerCwd: string): Promise; /** Adapt Fabric into the existing receipt and status-cache protocol, not a parallel history. */ export declare function recordFabricDispatchReceipt(input: FabricReceiptInput): Promise<{ readonly receipt: FabricDispatchReceipt; readonly cacheWrite: DispatchCacheOutcome; } | DispatchIndeterminate>;