import { type SegmentFold } from './policy-paths.js'; /** Files in an org dir that record a human's decisions. */ export declare const DECISION_FILES: string[]; /** The other files the daemon keeps in an org dir: the resume checkpoint, * the decision trace, run history, the idle deadline and the log of dead * runs closed out by a liveness check (#573). */ export declare const ORG_STATE_FILES: string[]; /** Files in an org dir that `org serve` acts on (org-poll.ts): `run` starts * the org, the others stop, pause or reload it. */ export declare const CONTROL_FILES: string[]; /** Files in a run dir: the run's event log, which records every approval and * gate decision and which checkpoint replay reads, and its session ledger. */ export declare const RUN_STATE_FILES: string[]; /** The dir in an org dir holding each role's git guard (role-sandbox.ts). */ export declare const GIT_GUARD_DIR = "git-guard"; export declare const orgsDir: (orgRoot: string) => string; /** * Whether a path, given as its normalized segments below `.monomind/orgs/`, * is an authority file: * - any file directly in the orgs dir (org definitions and the org * artifacts beside them: `-state`, `-secrets`, `-runstate`, …); * - any file directly in an org dir (decision, state and control files); * in an org memory dir only those named in the lists above; * - a run dir's bus.jsonl and sessions.json, and anything in git-guard/. */ export declare function isAuthorityBelowOrgs(below: string[], isMemory: (org: string) => boolean): boolean; /** * #498: is `target` a file no role may write with a file tool, whatever its * scope, roots or allowWrite? Pass the resolved and the as-written absolute * path (a plain string is taken as both); both are classified, below each * of `orgRoots`. An existing file with more than one link is also compared * with the authority files by inode, so a hard link to one is refused. * `fold` (#496): how segments compare — the policy passes the target's * `pathFolds().deny`; by default, case-folded on darwin and win32. */ export declare function isAuthorityFile(target: string | { real: string; lexical: string; }, orgRoots: string | string[], platform?: NodeJS.Platform, fold?: SegmentFold): boolean; /** * Existing authority files under `orgRoot`, as real paths (a symlinked entry * gives its target): what the SDK sandbox makes read-only with `denyWrite`. * Run-state files only of the current run (`current`); git-guard is left to * the role's own guard dir, which the caller denies already. A file created * after the role started is not in the list. */ export declare function authorityFilePaths(orgRoot: string | undefined, current?: { org: string; run?: string; }): string[]; /** * `.monomind`, the orgs dir, every dir directly in it and every dir directly * in an org dir, as real paths: the SDK sandbox binds each one writable onto * itself (it lies under the writable org root anyway), which makes it a * mount point that cannot be renamed — so no role can move the tree, or an * org's `reports/`, aside and plant a symlink or a forged copy in its place. */ export declare function orgsMountPoints(orgRoot: string | undefined): string[]; /** Every org's guard dir (real dirs only): the SDK sandbox denies each one * whole, so no role rewrites another role's hooks. */ export declare function gitGuardDirs(orgRoot: string | undefined): string[]; /** The dirs in an org dir roles work in, created before a masked role * starts: the mask binds only existing dirs read-write, and the orgs dir * around them is read-only (a worktree added under `work/src` needs * `work/` to exist). */ export declare const ORG_WORK_DIRS: string[]; /** * `mkdir -p` each org's work dirs (ORG_WORK_DIRS), plus the `` of every * `fileWrite` glob of the form `.monomind/orgs///…` (relative to * `cwd`, or absolute) — only for orgs that exist, never the guard dir or a * run dir. */ export declare function ensureOrgWorkDirs(orgRoot: string | undefined, fileWrite?: string[], cwd?: string | undefined): void; /** * The layout the bubblewrap mask needs (authority-mask.ts): the orgs dir and * every symlinked org dir to bind read-only, then the dirs roles write in to * bind back read-write — each real subdirectory of an org dir except the * guard dir and the run dirs, and each org memory dir — then the authority * files inside those (a memory dir's decision, state and control files, and * symlink targets that live outside the read-only dirs) read-only again. * All real paths; empty when there is no orgs dir. * * A symlinked org or memory entry is skipped when its target is `/`, the org * root, `.monomind`, the orgs dir or one of `protectedDirs` ($HOME, the * authority dirs), or holds one of them, or lies inside the orgs tree: a * planted `ln -s .. orgs/foo` must not bind the tree read-write, nor * `ln -s $HOME orgs/foo` bind over the hidden credentials. No writable dir * may hold the orgs dir or a protected dir either. */ export declare function orgsMaskLayout(orgRoot: string | undefined, protectedDirs?: string[]): { readOnly: string[]; writable: string[]; files: string[]; }; //# sourceMappingURL=org-authority-files.d.ts.map