import { acquireWorkRun, assertPortablePathSegment, boundedWorkRetention, createWorkRunId, getProcessWorkRun, getWorkRoot, getWorkRunDir, getWorkTenantDir, hasActiveWorkRunLease, pruneWorkTenant } from "../utils/work-directory.ts"; import { getReloadCoordinationDir } from "./reload-blockers.ts"; /** Root entries reserved for user-authored configuration and memory. */ export declare const AGENT_ROOT_FILE_NAMES: readonly ["auth.json", "settings.json", "models.json", "keybindings.json", "MEMORY.md", "USER.md", "SYSTEM.md", "APPEND_SYSTEM.md"]; /** Root entries reserved for user resources and machine-managed storage classes. */ export declare const AGENT_ROOT_DIRECTORY_NAMES: readonly ["okf-memory", "skills", "extensions", "prompts", "themes", "profiles", "pipelines", "state", "cache", "bin", "work", "runtimes", "models", "sessions", "npm", "git", "worktrees"]; export declare function isCanonicalAgentRootEntry(name: string): boolean; /** `/` -- a root-level user config/memory file (auth.json, settings.json, MEMORY.md, …). */ export declare function configFile(agentDir: string, name: string): string; /** `/okf-memory` -- user-authored durable OKF memory documents. */ export declare function okfMemoryDir(agentDir: string): string; /** `/okf-memory/projects/` -- managed project-isolated OKF records. */ export declare function okfProjectMemoryDir(agentDir: string, projectKey: string): string; /** `/state` -- durable machine-managed state. Deleting it loses real history, not just cache. */ export declare function stateDir(agentDir: string): string; /** `/state/` */ export declare function stateFile(agentDir: string, ...segments: string[]): string; export type ManagedMemoryFileName = "MEMORY.md" | "USER.md"; /** `/state/memory/file-store/.pi-managed.json` -- file-store ownership metadata. */ export declare function managedMemoryStateFile(agentDir: string, name: ManagedMemoryFileName): string; /** `/state/attachments` -- bounded, session-keyed clipboard image attachments. */ export declare function attachmentsDir(agentDir: string): string; /** Retired local-secret state root. Current credential storage is provider-backed and never writes here. */ export declare function secretsDir(agentDir: string): string; /** Retired local vault path retained only so model-facing file access stays denied. */ export declare function secretVaultFile(agentDir: string): string; /** Retired plaintext materialization root retained only so model-facing file access stays denied. */ export declare function managedSecretEnvDir(agentDir: string): string; /** Cross-process lock target for Bitwarden Secrets Manager profile mutations and bootstrap. */ export declare function bitwardenSecretsManagerCoordinationFile(agentDir: string): string; /** `/state/extensions/` -- durable state owned by one extension. */ export declare function extensionStateDir(agentDir: string, namespace: string): string; /** `/state/backups/config` -- explicit user-requested configuration snapshots. */ export declare function configBackupsDir(agentDir: string): string; /** `/cache` -- rebuildable; safe to delete (the next run just re-probes/recomputes). */ export declare function cacheDir(agentDir: string): string; /** `/cache/` */ export declare function cacheFile(agentDir: string, ...segments: string[]): string; /** `/cache/extensions/` -- rebuildable cache owned by one extension. */ export declare function extensionCacheDir(agentDir: string, namespace: string): string; /** `/bin` -- managed executable helpers (fd, rg, jq, uv). */ export declare function binDir(agentDir: string): string; /** `/runtimes/` -- a managed runtime install (ollama, python, prism-llamacpp, needle, …). */ export declare function runtimesDir(kind: string, agentDir: string): string; /** `/models/` -- downloaded model weights, grouped by provider/runtime. */ export declare function modelsDir(kind: string, agentDir: string): string; /** `/sessions` -- session transcript storage (large, established; not a "loose file"). */ export declare function sessionsDir(agentDir: string): string; /** * `/state/orchestration/sessions/` -- the one durable control-plane * bundle owned by a foreground session. Event state, worker mailboxes, mutation journals, and * worker transcripts must stay beneath this boundary so explicit session deletion can remove * exactly its companion artifacts without scanning global state. */ export declare function orchestrationSessionsDir(agentDir: string): string; /** * `/state/orchestration/sessions/` -- the one durable control-plane * bundle owned by a foreground session. */ export declare function orchestrationSessionDir(agentDir: string, parentSessionId: string): string; /** `/events` -- append-only event tail, snapshot, cursor, and idempotency state. */ export declare function orchestrationEventStoreDir(agentDir: string, parentSessionId: string): string; /** * `/worker-conversations` -- durable Pi worker transcripts owned by one * foreground session. Worker conversations remain in SessionManager's established JSONL format, * but are intentionally outside the foreground session picker namespace. */ export declare function workerConversationSessionsDir(agentDir: string, parentSessionId: string): string; /** `/worker-context-forks` -- immutable sanitized worker birth snapshots. */ export declare function workerContextForksDir(agentDir: string, parentSessionId: string): string; /** * `/-.json` -- one immutable, * content-addressed sanitized worker birth snapshot. */ export declare function workerContextForkFile(agentDir: string, parentSessionId: string, identityDigest: string, contentDigest: string): string; /** `/worker-output-artifacts` -- lossless terminal worker reports. */ export declare function workerOutputArtifactsDir(agentDir: string, parentSessionId: string): string; /** One immutable, content-addressed terminal worker report. */ export declare function workerTerminalOutputArtifactFile(agentDir: string, parentSessionId: string, attemptDigest: string, contentDigest: string): string; /** * `/worker-mailboxes/.json` -- durable bounded control * messages for one logical worker. Identity stays hashed so neither agent ids nor project paths * become path segments. */ export declare function workerAgentMailboxFile(agentDir: string, parentSessionId: string, scopeDigest: string): string; /** * `/session-root-mailbox.json` -- the bounded durable reply inbox for the * owning foreground session. The parent session identity is already encoded in the enclosing * session directory, so this fixed filename cannot collide with another session root. */ export declare function sessionRootMailboxFile(agentDir: string, parentSessionId: string): string; /** * `/worker-actions/.json` -- durable, bounded mutation * intents and receipts for one fenced worker attempt. The opaque digest intentionally keeps task * identifiers out of filesystem path segments and works on Windows and WSL. */ export declare function workerActionJournalFile(agentDir: string, parentSessionId: string, scopeDigest: string): string; /** `/npm` -- managed npm package installs. */ export declare function npmDir(agentDir: string): string; /** * `/worktrees` -- lane worktree checkouts for the worktree-sync subsystem * (`core/worktree-sync/`), grouped as `worktrees//`. These hold REAL * uncommitted agent work, so they are durable like `state/` -- never under transient `work/`, * whose retention would silently eat in-progress code. */ export declare function worktreesDir(agentDir: string): string; /** `/git` -- managed git-sourced package installs. */ export declare function gitDir(agentDir: string): string; export type AgentResourceKind = "skills" | "prompts" | "themes" | "extensions" | "profiles" | "pipelines"; /** `/` -- a user-managed resource directory. Root, kept: moving it breaks users. */ export declare function resourceDir(kind: AgentResourceKind, agentDir: string): string; /** `/profiles/directories` -- durable per-directory resource-profile overlays. */ export declare function directoryProfilesDir(agentDir: string): string; /** * `work/` is a mature transient/scratch root with its own tenant/run/lease/retention machinery * (`utils/work-directory.ts`). The SSOT delegates to it wholesale instead of reimplementing -- these * are straight re-exports so every category (state/cache/work/runtimes/models/…) is reachable from one * module without duplicating `work-directory.ts`'s logic. */ export { getWorkRoot, assertPortablePathSegment, boundedWorkRetention, getWorkTenantDir, getWorkRunDir, getProcessWorkRun, hasActiveWorkRunLease, acquireWorkRun, createWorkRunId, pruneWorkTenant, }; export type { AcquireWorkRunOptions, WorkRetentionOptions, WorkRunLease } from "../utils/work-directory.ts"; /** * `work/reload-coordination` -- cross-process reload/live-op coordination state. Already correctly * work-scoped (defined in `reload-blockers.ts`, its natural home given the surrounding reload-gate * logic there); re-exported here under the taxonomy's canonical name for SSOT discoverability. */ export declare const reloadCoordinationDir: typeof getReloadCoordinationDir; //# sourceMappingURL=agent-paths.d.ts.map