/** * Rewrite file_changed event paths to mounts-relative form. * * The bridge normalizer forwards tool filePaths verbatim — for Claude SDK * Write/Edit they are cwd-relative (e.g. "workspace/foo/bar.py" when cwd * is /skaile and the file lives at /skaile/workspace/foo/bar.py). The * frontend's file-change listener treats the path as relative to the * currently-selected mount, which double-prefixes when the workspace * mount sits under cwd. * * This helper resolves the path against cwd, locates the mount it falls * inside, and re-expresses the path relative to that mount with the * matching mountId attached. * * Events that already carry a mountId (watcher-originated) and events * whose path resolves outside every mount are passed through unchanged. */ import type { AgentEvent } from "@skaile/workspaces/types"; /** * Describes a filesystem mount point for path rewriting. * * @docLink packages/runner/dev-guide#flow-execution-turn-based-model */ export interface MountPoint { id: string; /** Absolute mount path on the agent's filesystem. */ mountPath: string; } /** * Rewrite a single file_changed event. Non-file_changed events and events * already tagged with a mountId are returned unchanged. * @docLink packages/runner/dev-guide#flow-execution-turn-based-model */ export declare function rewriteFileChangedPath(event: AgentEvent, cwd: string, mounts: readonly MountPoint[]): AgentEvent; //# sourceMappingURL=file-changed-rewriter.d.ts.map