export interface WorkspaceMemoryConfig { workspaceDir: string; /** * Optional process cwd. When under workspaceDir (or under the discovered * git root), instruction files are collected along the path from the project * root down to cwd — Codex `agents_md.rs` hierarchical loading parity. */ cwd?: string; /** * Optional global user instruction files (e.g. ~/.config/moss/AGENTS.md). * Loaded first so project rules can refine them. */ globalInstructionPaths?: readonly string[]; /** * Project-instruction filenames to look for, in priority order within a * single directory. Defaults include AGENTS.override.md (Codex local override) * then AGENTS.md / CLAUDE.md / MOSS.md. */ projectInstructionFiles?: readonly string[]; /** * When true (default), walk ancestor directories up to the git root and merge * instruction files found there (and along root→cwd when cwd is set). */ walkAncestors?: boolean; /** Max ancestor hops when walkAncestors is enabled (default 8). */ maxAncestorHops?: number; /** * When true (default), append the hierarchical-AGENTS policy note so the * model knows deeper files override parent scope (Codex hierarchical.md). */ includeHierarchicalPolicy?: boolean; } export interface WorkspaceMemoryContext { agentRules: string | null; agentRulesSource: string | null; agentRulesSources?: string[]; } /** * Codex-style candidates: AGENTS.override.md wins within a directory, then * AGENTS.md / Claude Code / Moss names. All present non-override files merge; * override replaces same-dir AGENTS.md content when both exist. */ export declare const DEFAULT_PROJECT_INSTRUCTION_FILES: string[]; /** Codex hierarchical.md distilled for the model. */ export declare const HIERARCHICAL_AGENTS_POLICY: string; export declare class WorkspaceMemory { private readonly dir; private readonly cwd; private readonly globalPaths; private readonly candidates; private readonly walkAncestors; private readonly maxAncestorHops; private readonly includeHierarchicalPolicy; constructor(config: WorkspaceMemoryConfig); private hasGitMarker; /** * Collect directories farthest-first: * 1) path from git root (or workspace) down to cwd when cwd is nested * 2) otherwise ancestors of workspace up to git root */ private collectSearchDirs; private isUnder; private displaySource; private tryLoadFile; loadContext(): Promise; buildPromptLayer(ctx: WorkspaceMemoryContext): string; } //# sourceMappingURL=workspace-memory.d.ts.map