/** * Cross-tool sync intent drainer (Model B, local executor side). * * The web UI (local or SaaS) enqueues intents on the server. This runs on the * user's machine — where the actual `~/.claude` / `~/.config/opencode` dirs * live — polls each logged-in server for pending intents, performs the * filesystem copy via the engine executor, and acks status back. * * Invoked on a short interval from the watch daemon, and once via the * `chat-recall toolkit drain` command. */ export interface PendingIntent { id: string; kind: 'copy' | 'sync_all' | 'pull' | 'code_apply' | 'recheck_session'; artifact_type: string | null; name: string | null; from_tool: string | null; to_tool: string | null; } /** * Every instruction file a recommendation rule should reach. * * This used to be CLAUDE.md and nothing else, in both scopes. A rule is * guidance for whatever agent is about to edit the repo, and the filename is * per tool — CLAUDE.md for Claude Code, AGENTS.md for Codex, Cursor and * OpenCode, GEMINI.md for Gemini and Antigravity — so a Codex user got the * rule written into a file their tool never opens, and silently kept the * behaviour the rule existed to stop. * * Project scope: every one of those files the project ALREADY has. Writing to * a file that exists is never a surprise. Only when the project has none do we * create, and then only for the tools installed on this machine. * * Global scope: the user-level file of each installed tool. * * Claude is the fallback in both, for a machine where nothing is detected. */ export declare function instructionTargets(rootPath: string | undefined, isGlobal: boolean): string[]; /** Apply a code recommendation locally: append a rule to every instruction * file the relevant tools read (idempotent — a file that already contains the * exact rule is skipped). */ export declare function applyCodeRecommendation(intent: PendingIntent): { status: 'done' | 'error'; result: string; }; export interface DrainResult { processed: number; done: number; errored: number; } /** * Poll every logged-in server once, execute pending intents locally, ack each. * Best-effort: network failures are swallowed (the intent stays pending and is * retried on the next drain since it was never acked). */ export declare function drainSyncIntents(opts?: { verbose?: boolean; }): Promise; //# sourceMappingURL=intent-drain.d.ts.map