/** Root of the global canvas home (`~/.crouter/canvas` unless `CRTR_HOME` is set). * Nested under the `.crouter` scope root so the whole runtime lives in one * visible top-level dir; `canvas/` keeps node-graph runtime state separate from * durable user content (memory/plugins/marketplaces/config) at the scope root. */ export declare function crtrHome(): string; /** Absolute path to the SQLite canvas db file — always `canvas.db` under the * canvas home, beside the node data it indexes. Guest deployments (Blaxel * volumes, local-docker mounts) put the whole canvas home on durable * block storage, which supports SQLite's advisory fcntl/WAL locking like any * local disk — so the db shares the node data's location and survives a * sandbox recreate together with `nodes/`. */ export declare function canvasDbPath(): string; /** Absolute path to a node's broker `view.sock` — always `view.sock` under the * node dir. Stale socket files (a host reboot, a sandbox recreate on a * durable volume) are harmless: the broker unlinks any existing socket before * it binds. */ export declare function viewSocketPath(nodeId: string): string; export declare function nodesRoot(): string; /** Absolute path to crtrd's API listener unix socket, a sibling of * `canvasDbPath()` under the canvas home (`~/.crouter/canvas/crtrd.sock` unless * `CRTR_HOME` is set). Pure path builder — no db reach — so both the daemon * (which binds it) and a CLI-side resolver can import it freely. `src/api`'s * `CrtrClient.forLocalSocket()` deliberately re-derives this same path from a * Node-builtin `join(crtrHome-equivalent, 'crtrd.sock')` rather than importing * here, to keep the exported `/api` contract dependency-light; the two must * agree. */ export declare function apiSocketPath(): string; /** Global, cwd-agnostic broker cache of per-session picker metadata, keyed by * absolute `.jsonl` path. Shared across every node's broker (paths are absolute) * and survives broker restarts so the first `/resume` open after a restart is * also fast. Machine-local performance state — safe to delete; rebuilt on demand. */ export declare function sessionListCachePath(): string; /** Whether a persisted node ID is safe as a single filesystem path segment. */ export declare function isSafeNodeId(nodeId: string): boolean; export declare function nodeDir(nodeId: string): string; export declare function contextDir(nodeId: string): string; /** Replace the literal env-var tokens `$CRTR_CONTEXT_DIR` / `$CRTR_NODE_ID` in * agent-facing doc text with the node's real values, so a doc surfaced INTO a * node hands it a concrete absolute path instead of a shell-only string. The * env vars only expand in bash; an agent that pastes `$CRTR_CONTEXT_DIR/x.md` * into the (non-expanding) Write tool creates a literal `$CRTR_CONTEXT_DIR/` * dir under the project repo. The resolved absolute path works in both bash and * Write, so this substitution is strictly safer. Callers must only apply it * when they have a concrete node to render for (never on generic, node-less * output). Pure string work — no I/O. */ export declare function interpolateNodePaths(text: string, nodeId: string): string; export declare function jobDir(nodeId: string): string; export declare function reportsDir(nodeId: string): string; /** Overflow store for inbox entries whose inline body exceeds the digest's * bounded preview (a direct `node message send` or a close/cancel doctrine * wake) — the full body spills here, mirroring how a * push's body always lives in a file, never inline; the inbox entry then * carries `ref` at this path, same as a push pointer. */ export declare function messagesDir(nodeId: string): string; export declare function nodeMetaPath(nodeId: string): string; export declare function inboxPath(nodeId: string): string; /** The node-owned ambient "current situation" sidecar — the latest hidden * `` text injected into bearings/kickoff (see * `runtime/situational-context.ts`), upserted in place rather than appended so * only the newest applet/situation state is ever carried. Lives beside * meta.json/inbox.jsonl (node-runtime state) rather than under context/ (the * user-authored artifact store), because it is ambient machine state, not a * document a human wrote. */ export declare function situationalContextPath(nodeId: string): string; /** Passive-subscription accumulator. Pushes from publishers this node subscribes * to PASSIVELY land here instead of inbox.jsonl — the inbox-watcher never polls * it, so they never wake the node. Drained as XML pre-text on the next message. */ export declare function passivePath(nodeId: string): string; export declare function transcriptPath(nodeId: string): string; export declare function sessionPtrPath(nodeId: string): string; /** On-read injection dedup set — the doc realpaths already surfaced on-read in * this node's CURRENT conversation transcript. Persisted so the once-per- * transcript dedup survives a dormancy → revive(resume) cycle: a resume reuses * the same .jsonl transcript in a NEW pi process, so the in-memory set would * otherwise start empty and re-inject docs already present in the transcript. * Deleted by the launch paths that start a FRESH transcript. */ export declare function injectedDocsPath(nodeId: string): string; /** Create the full directory skeleton for a node. Idempotent. */ export declare function ensureNodeDirs(nodeId: string): void; /** Ensure the canvas home exists. Idempotent. */ export declare function ensureHome(): void;