import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; import type { FabricHostPolicy } from "./core/host-policy.js"; import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"; import { FabricActivityStore } from "./activity/store.js"; import { ActorDirectory } from "./actors/directory.js"; import { FabricShellJobStore } from "./core/shell-jobs.js"; import { GlobalActorRegistry } from "./actors/global-registry.js"; import type { FabricActorHostEvent } from "./actors/types.js"; import { CapturedToolCatalog } from "./capture/catalog.js"; import { FabricComponentCatalog } from "./components/catalog.js"; import { FabricComponentLoader } from "./components/loader.js"; import { type FabricOwnedModelGuidance } from "./components/model-guidance.js"; import type { FabricComponentDefinition, FabricComponentGraph } from "./components/types.js"; import { type FabricConfig, type FabricResultFormat, type FabricSchemaMode } from "./config.js"; import { ActionRegistry } from "./core/action-registry.js"; import { FabricSessionApprovals } from "./core/approval-controller.js"; import type { FabricActionPolicyHooks } from "./core/action-policy-hooks.js"; import type { FabricQuestionRenderers } from "./fabric-state.js"; import { CompactController } from "./core/compact-controller.js"; import type { ActiveCompactionOwner } from "./compaction/claim.js"; import { FabricExecutionService, type FabricExecutionResult } from "./execution-service.js"; import { RepairCompiler } from "./repairs/compiler.js"; import type { FabricSpeculationStreamTap } from "./speculation/stream-tap.js"; import { MeshStore } from "./mesh/store.js"; import { DecisionStore } from "./decisions/store.js"; import type { FabricLifecycleEventType } from "./lifecycle/types.js"; import type { FabricParticipantInfo, FabricParticipantListOptions, FabricPeerInfo } from "./topology/types.js"; import { PrewalkController } from "./prewalk/controller.js"; import { PrewalkDriftTracker } from "./prewalk/fs-drift.js"; import { type PendingFabricHandoff } from "./prewalk/handoff.js"; import type { AgentToolResultMessage } from "./agents/types.js"; import { type FabricAgentMessageDelivery, type FabricAgentMessageResult, type FabricMainAgentInfo } from "./main-agent.js"; import { FabricThinkingController } from "./thinking-control.js"; import { type FabricProvider } from "./protocol.js"; import { AgentManager } from "./agents/manager.js"; import type { FabricRuntimePaths } from "./runtime-paths.js"; import type { FabricManagedHost } from "./managed-host.js"; import { type FabricLoadedFileIdentity } from "./build-identity.js"; export interface FabricRuntimeStateOptions { managedHost?: FabricManagedHost; activity?: FabricActivityStore; prewalk?: PrewalkController; prewalkDrift?: PrewalkDriftTracker; sessionApprovals?: FabricSessionApprovals; actionPolicyHooks?: FabricActionPolicyHooks; questionRenderers?: FabricQuestionRenderers; thinking?: FabricThinkingController; paths?: FabricRuntimePaths; entryIdentity?: FabricLoadedFileIdentity; /** Foreground tools declared beside fabric_exec; fences cache holds. */ foregroundTools?: () => readonly string[]; /** The extension holding the compaction owner claim; compact.* routes there. */ compactionOwner?: (() => ActiveCompactionOwner | undefined) | undefined; /** Restrictions the embedding host applied through FABRIC_HOST_POLICY_EVENT. */ hostPolicy?: FabricHostPolicy; } export declare class FabricRuntimeState { #private; readonly pi: ExtensionAPI; readonly capturedTools: CapturedToolCatalog; readonly componentCatalog: FabricComponentCatalog; readonly activity: FabricActivityStore; get shellJobs(): FabricShellJobStore; readonly prewalk: PrewalkController; readonly prewalkDrift: PrewalkDriftTracker; readonly sessionApprovals: FabricSessionApprovals; readonly thinking: FabricThinkingController; constructor(pi: ExtensionAPI, capturedTools: CapturedToolCatalog, options?: FabricRuntimeStateOptions); get initialized(): boolean; get widgetDismissedAt(): number; set widgetDismissedAt(value: number); get cwd(): string | undefined; get config(): FabricConfig; /** Stream tap for speculative PTC; undefined when speculation is disabled. */ get speculationTap(): FabricSpeculationStreamTap | undefined; /** Turn-boundary backstop: tap state and unserved entries never outlive a turn. */ resetSpeculation(): void; get registry(): ActionRegistry; get components(): FabricComponentLoader; get execution(): FabricExecutionService; get agents(): AgentManager; get actors(): ActorDirectory; get globalActors(): GlobalActorRegistry; get mesh(): MeshStore; mainAgentInfo(context?: ExtensionContext): FabricMainAgentInfo; peerInfos(): FabricPeerInfo[]; /** The project decision store, or undefined when the mesh is disabled. */ decisionStore(): DecisionStore | undefined; componentGraph(): FabricComponentGraph; modelGuidance(): FabricOwnedModelGuidance[]; participantInfos(options?: FabricParticipantListOptions): FabricParticipantInfo[]; /** Read only this root's resident run metadata; never start or control the host. */ residentAgentForUi(id: string): import("./agents/types.js").AgentRunRecord | import("./agents/types.js").AgentHandleInfo | undefined; /** A root session's own peer label, such as `FAB-3`, while `ui.sessionLabel.footer` shows it. */ sessionLabel(): string | undefined; /** True while a root session waits for the directory to mint the label it will show. */ sessionLabelPending(): boolean; queueUserMessage(targetId: string, message: string, delivery: FabricAgentMessageDelivery): Promise; stopParticipant(targetId: string): Promise; get compact(): CompactController; get repairs(): RepairCompiler; initialize(context: ExtensionContext, bootstrapConfig?: FabricConfig): Promise; ensure(context: ExtensionContext): Promise; setSchemaMode(mode: FabricSchemaMode, executorRuntime: FabricConfig["executor"]["runtime"]): void; /** Updates the active owner's defaults, never a managed program's captured target. */ setDecisionProfile(profile: string | null | undefined): void; reloadConfig(context: ExtensionContext, next: FabricConfig): void; claimHandoff(execution: FabricExecutionResult, sessionId: string, resultFormat: FabricResultFormat, outerToolCallId: string): Promise; runHandoffAtBoundary(pending: PendingFabricHandoff, outerToolResult: AgentToolResultMessage, context: ExtensionContext): Promise>; get advisorsHalted(): boolean; haltAdvisors(): number; noteMainActivity(context: ExtensionContext): void; dispatchHostEvent(event: FabricActorHostEvent, payload: unknown, context: ExtensionContext): number; publishHostLifecycle(event: FabricLifecycleEventType, payload: unknown): Promise; registerExternal(provider: FabricProvider, options?: { overwrite?: boolean; }): void; /** Withdraw a direct registration through the same retire/release path a * component lease uses. The host owns the instance, so it is not closed. */ withdrawExternal(name: string, generation?: number | string): boolean; registerExternalComponent(component: FabricComponentDefinition, options?: { overwrite?: boolean; }): void; settleComponents(): Promise; shutdown(): Promise; } //# sourceMappingURL=fabric-runtime-state.d.ts.map