import type { ConnectorManager } from "@skaile/workspaces/connectors"; import { PluginStore } from "./store.js"; /** * Construction options for {@link WorkspacePlugin}. * * At minimum `projectDir` must be supplied. All other fields are optional * and are pre-resolved by the caller when available (e.g. the runner already * knows `driver`/`provider`/`model` from its own settings resolution). * * @docLink packages/workspace-plugin/concepts#workspaceplugin-lifecycle */ export interface WorkspacePluginOpts { projectDir: string; /** * Active connector manager. The unified `ConnectorManager` owns both * filesystem-face (mountable) and tool-face connectors. */ connectorManager?: ConnectorManager; bootOwned?: boolean; onLog?: (msg: string) => void; /** Pre-resolved driver type (avoids needing boot() to read settings). */ driver?: string; /** Pre-resolved provider. */ provider?: string; /** Pre-resolved model. */ model?: string; } /** * Shared runtime core for the skaile workspace plugin. * * Manages the full lifecycle (`boot` → tools available → `shutdown`) and * surfaces workspace capabilities — mounts, connectors, flows, skills, * sessions, and config validation — through two adapter backends: * * - **MCP, in-process** (runner): call {@link buildWorkspaceMcpServer} for the * Claude Agent SDK server the runner embeds into its `query()` call. * - **MCP, stdio** (`skaile mcp-server`): call {@link runMcpServerStdio} for a * raw `@modelcontextprotocol/sdk` server — no Claude Agent SDK. * - **OMP**: call {@link buildOmpToolSet} for the 13-tool native subset and * {@link buildOmpExtensionSource} for the generated extension file. * * Two boot modes are supported via {@link WorkspacePluginOpts.bootOwned}: * - `bootOwned: false` (default) — managers injected externally by the runner. * - `bootOwned: true` — plugin owns the full manager lifecycle (standalone MCP * subprocess or OMP extension). * * @docLink packages/workspace-plugin/concepts#workspaceplugin-lifecycle */ export declare class WorkspacePlugin { readonly projectDir: string; connectorManager: ConnectorManager | null; readonly store: PluginStore; private readonly bootOwned; private readonly onLog; private readonly log; driver?: string; provider?: string; model?: string; constructor(opts: WorkspacePluginOpts); boot(): Promise; reload(): Promise; shutdown(): Promise; buildSystemPromptSection(driver?: string): string; /** * Build the in-process Claude Agent SDK MCP server (runner embedding). * Returns `null` when `@anthropic-ai/claude-agent-sdk` is unavailable. */ buildWorkspaceMcpServer(): Promise; /** * Build the raw `@modelcontextprotocol/sdk` stdio MCP server — no Claude * Agent SDK. Used by the `skaile mcp-server` subprocess. The returned * server is not yet connected to a transport. */ buildWorkspaceMcpStdioServer(): Promise; /** * Build and run the stdio MCP server: builds the raw * `@modelcontextprotocol/sdk` server and connects a `StdioServerTransport`. * Used by the `skaile mcp-server` subprocess. */ runMcpServerStdio(): Promise; buildOmpToolSet(): Promise; buildOmpExtensionSource(): Promise; handleSlashCommand(group: string, args: string[]): Promise; } //# sourceMappingURL=plugin.d.ts.map