interface SubmoduleStatus { name: string; branch: string; ahead: number; behind: number; dirty: boolean; modifiedFiles: number; untrackedFiles: number; } /** * `harn context`: one-shot orientation snapshot for session start / post-compaction * recovery / subagent dispatch. Aggregates self / time / repo / commits / submodules * / peers, plus opt-in services. Fail-open per section so a missing dependency * never blocks the rest from rendering. * * No process spawns for default sections except git; every other source is * filesystem-direct via existing lib helpers. */ export type SectionName = "self" | "time" | "repo" | "commits" | "submodules" | "peers" | "services"; export declare const DEFAULT_SECTIONS: SectionName[]; export declare const OPT_IN_SECTIONS: SectionName[]; export interface ContextOptions { sections?: SectionName[]; include?: SectionName[]; showClean?: boolean; /** Monorepo root for git ops. Defaults to process.cwd() when omitted. */ repoRoot?: string; /** Submodule names relative to repoRoot. When omitted, submodules section reports an error. */ submodules?: readonly string[]; } export interface ContextReport { self?: SelfSection | { error: string; }; time?: TimeSection; repo?: RepoSection | { error: string; }; commits?: CommitsSection | { error: string; }; submodules?: SubmodulesSection | { error: string; }; peers?: PeersSection | { error: string; }; services?: ServicesSection | { error: string; }; meta: { elapsed_ms: number; sections_requested: SectionName[]; }; } export interface SelfSection { name: string | null; instance_id: string; session_age_secs: number; task: string | null; files_held: string[]; } export interface TimeSection { chicago: string; utc: string; } export interface RepoSection { cwd: string; branch: string; ahead: number; behind: number; modified: number; untracked: number; staged: number; } export interface CommitsSection { rows: { sha: string; subject: string; }[]; } export interface SubmodulesSection { rows: SubmoduleStatus[]; clean_omitted: number; } export interface PeersSection { rows: { name: string; instance_id_short: string; age_min: number; files: number; task: string | null; }[]; } export interface ServicesSection { docker_compose: { project: string; service: string; status: string; }[]; } export declare function buildContext(opts?: ContextOptions): Promise; export {}; //# sourceMappingURL=index.d.ts.map