/** * Governance config reader — facade over unified configs.json. * * Provides typed access to governance configuration via readConfigs().governance. * Backward compatible: same function signatures and return types. * * SR-05: Migrated from reading separate .hivemind/governance/config.json to * reading from the unified .hivemind/configs.json.governance via facade pattern. * HIVEMIND_GOVERNANCE_CONFIG_PATH env var removed per SPEC. * * @module governance-engine/config-reader */ import { z } from "zod"; /** Schema for the naming_standards section of the governance config. */ export declare const NamingStandardsSchema: z.ZodObject<{ allowed_frameworks: z.ZodArray; allowed_workflows: z.ZodOptional>; allowed_classifications: z.ZodArray; naming_format: z.ZodString; description: z.ZodOptional; }, z.core.$strip>; /** Schema for an individual agent config entry. */ declare const AgentConfigSchema: z.ZodObject<{ description: z.ZodString; model: z.ZodOptional>; allowedCommands: z.ZodOptional>; defaultBrief: z.ZodOptional; }, z.core.$strip>; /** Schema for a command config entry. */ declare const CommandConfigSchema: z.ZodObject<{ description: z.ZodOptional; agent: z.ZodOptional; template: z.ZodOptional; }, z.core.$strip>; /** Schema for the full governance config. */ export declare const GovernanceConfigSchema: z.ZodObject<{ version: z.ZodOptional; defaultAgent: z.ZodOptional; naming_standards: z.ZodOptional; allowed_workflows: z.ZodOptional>; allowed_classifications: z.ZodArray; naming_format: z.ZodString; description: z.ZodOptional; }, z.core.$strip>>; agents: z.ZodOptional>; allowedCommands: z.ZodOptional>; defaultBrief: z.ZodOptional; }, z.core.$strip>>>; agent_configs: z.ZodOptional>; allowedCommands: z.ZodOptional>; defaultBrief: z.ZodOptional; }, z.core.$strip>>>; commands: z.ZodOptional; agent: z.ZodOptional; template: z.ZodOptional; }, z.core.$strip>>>; command_agent_mappings: z.ZodOptional; agent: z.ZodOptional; template: z.ZodOptional; }, z.core.$strip>>>; templates: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; rules: z.ZodOptional>; }, z.core.$strip>; /** Typed governance configuration. */ export type GovernanceConfig = z.infer; /** Typed naming standards section. */ export type NamingStandardsConfig = z.infer; /** Typed agent config entry. */ export type AgentConfig = z.infer; /** Typed command config entry. */ export type CommandConfig = z.infer; /** * Reads governance configuration from the unified configs.json. * * SR-05: Facade pattern — reads from readConfigs().governance instead of * a separate governance/config.json file. Backward compatible: same * function signature and return type. * * @param projectRoot - Optional project root (defaults to `process.cwd()`). * @returns Validated governance configuration. * @throws {Error} When governance config is missing or invalid. */ export declare function readGovernanceConfig(projectRoot?: string): GovernanceConfig; /** * Resolves an agent name from a brief by keyword matching. * * Scans agent descriptions for case-insensitive keyword matches * in the brief. Returns the first matching agent name, or the * default agent if no match is found. * * @param brief - The governance brief text to scan. * @param config - The governance configuration. * @returns The resolved agent name. */ export declare function resolveAgentForBrief(brief: string, config: GovernanceConfig): string; /** * Validates a session title against naming standards. * * Parses the title using simple string splitting (not importing the naming * service — keeps config reader dependency-free) and verifies framework, * workflow, and classification against the allowed lists. * * @param title - The session title to validate. * @param standards - The naming standards configuration. * @returns `true` if the title conforms to the naming standards. */ export declare function validateNamingTitle(title: string, standards: NamingStandardsConfig): boolean; export {}; //# sourceMappingURL=config-reader.d.ts.map