import type { ExtensionContext } from "@earendil-works/pi-coding-agent"; export declare const FABRIC_PROVIDER_REGISTER_EVENT = "pi-fabric:provider:register:v1"; export declare const FABRIC_PROVIDER_DISCOVER_EVENT = "pi-fabric:provider:discover:v1"; /** Identifies host-side tool lifecycle events replayed for a nested Fabric call. */ export declare const FABRIC_NESTED_TOOL_CALL_ID_PREFIX = "fabric_"; /** Discriminant for the transient details envelope on a proxied provider result. */ export declare const FABRIC_TOOL_RESULT_PROXY_KIND = "pi-fabric.tool-result-proxy.v1"; /** * Host-only middleware details for non-Pi Fabric providers. `result` is the * exact value before maxNestedResultChars is enforced and is not persisted as * a separate Pi tool-result message. */ export interface FabricToolResultProxyDetailsV1 { kind: typeof FABRIC_TOOL_RESULT_PROXY_KIND; ref: string; result: unknown; } export declare const readFabricToolResultProxyDetailsV1: (value: unknown) => FabricToolResultProxyDetailsV1 | undefined; export type FabricRisk = "read" | "write" | "execute" | "network" | "agent"; export type FabricActivityEntityKind = "agent" | "actor" | "tool" | "extension" | "mcp" | "mesh" | "task" | "custom"; export type FabricInvocationActivityUpdate = { type: "progress"; message: string; } | { type: "entity"; id: string; kind: FabricActivityEntityKind; name?: string; } | { type: "metrics"; tokens?: number; toolCalls?: number; cost?: number; }; export interface FabricMediaBlock { type: "image"; data: string; mimeType: string; } export interface FabricActionDescriptor { name: string; description: string; inputSchema: Record; outputSchema?: Record; risk: FabricRisk; namespace?: string; } export interface FabricProviderListRequest { namespace?: string; query?: string; limit?: number; } export interface FabricInvocationContext { cwd: string; signal: AbortSignal | undefined; parentToolCallId: string; nestedToolCallId: string; extensionContext: ExtensionContext; update(message: string): void; activity?(update: FabricInvocationActivityUpdate): void; attachMedia?(blocks: FabricMediaBlock[], note?: string): void; attachPreview?(preview: unknown): void; } export interface FabricProvider { name: string; description: string; list(request: FabricProviderListRequest, context: FabricInvocationContext): Promise; describe(actionName: string, context: FabricInvocationContext): Promise; prepareArguments?(actionName: string, args: Record, context: FabricInvocationContext): Record | Promise>; invoke(actionName: string, args: Record, context: FabricInvocationContext): Promise; invocationEnded?(parentToolCallId: string): Promise; close?(): Promise; } export interface FabricProviderRegistration { version: 1; provider: FabricProvider; overwrite?: boolean; } export interface FabricProviderDiscovery { version: 1; register(provider: FabricProvider, options?: { overwrite?: boolean; }): void; } //# sourceMappingURL=protocol.d.ts.map