import type { HarnessOptions, ModelRef, Registry, Storage } from "@earendil-works/pi-durable"; import type { FabricHostedRunner } from "./agents/runner-registry.js"; import { type PiDurableMessageOptions } from "./durable-controls.js"; export type { PiDurableMessageOptions } from "./durable-controls.js"; /** The host must hold exclusive ownership until release, including across processes. */ export interface PiDurableStorageLease { storage: Storage; release(): void | Promise; } export type PiDurableStorageOptions = { kind: "jsonl"; directory: string; } | { kind: "factory"; identity: string; acquire(runId: string): Promise; }; export interface PiDurableRunnerOptions { id?: string; label?: string; residentModule?: string; models: HarnessOptions["models"]; registry: Registry; env: NonNullable; allowedModels: readonly ModelRef[]; /** Optional host-selected model, which must also appear in allowedModels. */ defaultModel?: ModelRef; storage: PiDurableStorageOptions; } export interface PiDurableRunner extends FabricHostedRunner { steer(locator: unknown, message: string, options?: PiDurableMessageOptions): Promise; followUp(locator: unknown, message: string, options?: PiDurableMessageOptions): Promise; /** Seal this instance, join invocations and release storage; never abort work. Create a new runner to reopen. */ close(): Promise; } export interface PiDurableLocator { version: 1; backend: "pi-durable"; storage: string; runId: string; } /** Opt-in hosted adapter. No registration or runtime package loading occurs at factory creation. */ export declare function createPiDurableRunner(options: PiDurableRunnerOptions): PiDurableRunner; //# sourceMappingURL=durable.d.ts.map