import type { FabricActorInfo, FabricActorRequest } from "../actors/types.js"; import type { FabricAgentLog, AgentHandleInfo, AgentRunRecord, AgentRunRequest, AgentRunResult } from "../agents/types.js"; import type { FabricOwnedModelGuidance } from "../components/model-guidance.js"; import type { FabricMainAgentTarget } from "../main-agent.js"; import { MeshStore } from "../mesh/store.js"; import type { FabricParticipantSource } from "../topology/types.js"; import { type FabricScope } from "../scope.js"; import { type ResidentHostConfig, type ResidentHostOwner, type ResidentPiModelState } from "./protocol.js"; export interface ResidencyClientOptions { config: ResidentHostConfig; mesh: MeshStore; participants: FabricParticipantSource; mainAgent: FabricMainAgentTarget; piModelState?: () => ResidentPiModelState; onBackgroundComplete?: (result: AgentRunResult, delivered: () => void) => void; onResultConsumed?: (id: string) => void; hostPath?: string; /** This session's scope; defaults to the issued session scope. */ callerScope?: () => FabricScope | undefined; } export declare class ResidencyClient { #private; readonly options: ResidencyClientOptions; readonly hostId: string; constructor(options: ResidencyClientOptions); start(): void; close(): Promise; syncPiModels(): void; updateModelGuidance(guidance: readonly FabricOwnedModelGuidance[]): void; ensureHost(): Promise; ensureActor(id: string): Promise; createActor(request: FabricActorRequest): Promise; spawnAgent(request: AgentRunRequest, signal?: AbortSignal): Promise; hasAgent(id: string): boolean; /** * True for a durable run that another root session of this project spawned * and that this session may read. See `#projectAgent` for the boundary. */ hasProjectAgent(id: string): boolean; statusAgent(id: string): AgentRunRecord | AgentHandleInfo; listAgents(): Array; acknowledgeCompletion(id: string): void; waitAgent(id: string, signal?: AbortSignal): Promise; /** * Wait for a durable run another root session of this project spawned. Only * that session's resident host settles the run, so the wait fails when the * host is not running. It reads only: the completion receipt stays with the * owning session. */ waitProjectAgent(id: string, signal?: AbortSignal): Promise; readAgentLog(id: string, options?: { lines?: number; before?: number; }): FabricAgentLog; removeActor(id: string): Promise<{ removed: boolean; }>; cleanupAgent(id: string, deleteBranch?: boolean): Promise<{ cleaned: boolean; }>; } //# sourceMappingURL=client.d.ts.map