/** * Briefing — System Section Builder * * Assembles system-level metadata for the briefing resource: * server version, tool/resource/prompt surface area counts, * local time, unreleased change summary, test health indicators, * active filter state, and operational configuration context. * * Heavy operations (file reads) are cached at module load to avoid * repeated I/O on every briefing read. */ import type { ToolFilterConfig } from '../../../../filtering/tool-filter.js'; import type { BriefingConfig } from '../../shared.js'; export interface GitHistorySummary { stats?: { total: number; highImpact: number; lowImpact: number; avgConfidence: number; }; commits: { hash: string; type?: string; size?: string; significance?: number | string; confidence?: number | string; isBreaking?: boolean; message: string; isPushed?: boolean; associatedIssues?: string[]; }[]; } export interface TestHealth { unitTests: number; e2eTests: number; coverage: number; } export interface SystemContext { version: string; toolCount: number; resourceCount: number; promptCount: number; localTime: string; gitHistory: GitHistorySummary | null; testHealth: TestHealth | null; /** Compact filter summary, e.g. "codemode (1/70)", or null when all tools exposed */ filterSummary: string | null; /** Whether the system is in a read-only state (admin tools disabled) */ isReadonly: boolean; /** Count of ALLOWED_IO_ROOTS entries */ ioRootCount: number; /** Whether code-map.md exists in the project root */ hasCodeMap: boolean; /** Days elapsed since the last tagged release in CHANGELOG.md */ lastReleaseDaysAgo: number | null; /** Status of the local lint/tsc check, if available */ localCheck: boolean | null; /** The active workspace ID if configured */ workspaceId?: string; } export interface BuildSystemContextOptions { config?: BriefingConfig; filterConfig?: ToolFilterConfig | null; targetRepoPath?: string; } /** * Parse README.md badge lines for test counts and coverage. * * Looks for shields.io badge patterns: * - `Tests-(\d+)_passed` or `Tests-(\d+)%20passed` * - `E2E_Tests-(\d+)_passed` or `E2E%20Tests-(\d+)_passed` * - `Coverage-([0-9.]+)%25` */ export declare function parseTestHealth(content: string): TestHealth | null; export declare function parseLastReleaseAge(content: string): number | null; /** * Build system-level context for the briefing. * * Version, tool count, and prompt count are derived from live registries. * Unreleased summary and test health are startup-cached from project files. * localTime provides chronological grounding for date-relative agent queries. * Filter, instruction level, and registry state are derived from runtime config. */ export declare function buildSystemContext(config?: BriefingConfig, filterConfig?: ToolFilterConfig | null, targetRepoPath?: string, resourceCount?: number): SystemContext; //# sourceMappingURL=system-section.d.ts.map