import { KVState } from '../../state/kv-state.js'; import { ProjectIndex } from '../../state/project-index.js'; import { ModeManager } from '../../state/mode-manager.js'; import type { MemoryRegistry } from '../../state/memory-registry.js'; import { HookDispatcher } from '../../hooks/dispatcher.js'; import { TelemetryDB } from '../../state/telemetry.js'; import type { Tool } from '../../types/tools.js'; export interface StateToolOptions { readonly memoryDir: string; readonly hookDispatcher?: HookDispatcher | undefined; readonly modeManager?: ModeManager | undefined; readonly telemetryDB?: TelemetryDB | undefined; /** * Current working directory at session start. Exposed as the well-known * read-only key `runtime.workingDir` via `mode=get`. * Updated dynamically via WorkspaceSwapManager on workspace swap. */ readonly workingDir?: string | undefined; /** * Daemon home directory (immutable after startup). Exposed as the well-known * read-only key `daemon.homeDir` via `mode=get`. */ readonly daemonHomeDir?: string | undefined; /** * Workspace swap manager. When provided, `set({values: {'runtime.workingDir': '/new/path'}})` * will trigger a real workspace swap via `requestSwap()` instead of returning an error. * Swap failures are surfaced as `success: false` with the error reason. */ readonly swapManager?: { requestSwap(newDir: string): Promise<{ ok: boolean; reason?: string; code?: string; }>; }; /** * Project memory registry. When provided, `mode=memory action=set` mirrors the written * preference into a retrievable `memory_records` row (deduped per key) so passive per-turn * knowledge injection can surface it, closing the gap where a distilled preference lived only * as a flat `.goodvibes/memory/*.json` file that retrieval never read. Best-effort: a registry * write that fails never fails the file write itself. */ readonly memoryRegistry?: MemoryRegistry | undefined; } /** * Create the `state` tool bound to the given KVState and ProjectIndex. * * Returns a Tool object conforming to the Tool interface. * Never throws from execute(). */ export declare function createStateTool(kvState: KVState, projectIndex: ProjectIndex, options: StateToolOptions): Tool; //# sourceMappingURL=index.d.ts.map