/** * Context-file and prompt-input loading for the resource loader. * * Reads AGENTS.md / CLAUDE.md context files from the user scopes and the cwd * ancestor chain (warning/truncating oversized ones, since they are injected * into the system prompt every turn), and resolves a system-prompt input that * may be either an inline string or a file path. Extracted from resource-loader.ts. * * Two user scopes are read, least specific first: `~/.agents/AGENTS.md` (the * cross-vendor convention, so rules written for one tool are seen by hoocode) * and `~/.hoocode/AGENTS.md` (the native home, which therefore wins on * conflict). Both are additive — neither shadows the other, and no migration * is needed for users who already have the native file. */ /** * A loaded context file plus the recurring-cost metadata the UI surfaces. * `tokens`/`size` are optional so callers that synthesize context files (SDK * overrides, tests) can keep passing plain `{ path, content }`. */ export interface ContextFile { path: string; content: string; /** Rough token estimate (bytes / 4) of the content as loaded. */ tokens?: number; /** Set only past the soft limit; "truncated" means the hard limit clipped it. */ size?: "large" | "truncated"; } /** * Resolve a prompt input that is either an inline string or a path to a file. * If the input names an existing file, its contents are returned; otherwise the * input is treated as the prompt text itself. */ export declare function resolvePromptInput(input: string | undefined, description: string): string | undefined; export interface LoadProjectContextFilesOptions { cwd: string; /** hoocode's native home, e.g. `~/.hoocode`. */ agentDir: string; /** * The cross-vendor user scope, e.g. `~/.agents`. Defaults to `~/.agents`; * injectable so tests do not read the real home directory. */ userAgentsDir?: string; } export declare function loadProjectContextFiles(options: LoadProjectContextFilesOptions): { agentsFiles: ContextFile[]; warnings: string[]; }; //# sourceMappingURL=context-files.d.ts.map