import { z } from "zod"; export declare const HIVEMIND_CONFIGS_SCHEMA_VERSION = "2.0.0"; /** * Supported language codes for agent conversation output and artifact generation. * * @example * ```typescript * const result = SupportedLanguageSchema.safeParse("en") * // result.success === true * ``` */ export declare const SupportedLanguageSchema: z.ZodEnum<{ id: "id"; en: "en"; vi: "vi"; zh: "zh"; fr: "fr"; ja: "ja"; ko: "ko"; de: "de"; es: "es"; th: "th"; }>; export type SupportedLanguage = z.infer; /** * Hivemind operation mode controlling guardrail intensity. * * - `expert-advisor`: Agent-led with TDD, spec-driven, research-first, systematic planning. * - `hivemind-powered`: Stricter guardrails, hierarchical tracking, cross-context persistence. * - `free-style`: Features only available if child control-panes are active or explicitly requested. * * @example * ```typescript * const result = HivemindModeSchema.safeParse("expert-advisor") * // result.success === true * ``` */ export declare const HivemindModeSchema: z.ZodEnum<{ "expert-advisor": "expert-advisor"; "hivemind-powered": "hivemind-powered"; "free-style": "free-style"; }>; export type HivemindMode = z.infer; /** * User proficiency level affecting agent output style, jargon level, and elaboration depth. * * @example * ```typescript * const result = UserExpertLevelSchema.safeParse("architecture-driven") * // result.success === true * ``` */ export declare const UserExpertLevelSchema: z.ZodEnum<{ "clumsy-vibecoder": "clumsy-vibecoder"; "beginner-friendly": "beginner-friendly"; "intermediate-high-level": "intermediate-high-level"; "architecture-driven": "architecture-driven"; "absolute-expert": "absolute-expert"; }>; export type UserExpertLevel = z.infer; /** * Phase discussion intensity controlling how the discuss-phase skill operates. * * - `sufficient-phase-discussion`: Gather enough context, then move on. * - `intensive-phase-discussion`: Deep exploration before planning. * - `skip-phase-discussion`: Skip discussion, go straight to planning. * * @example * ```typescript * const result = DiscussModeSchema.safeParse("sufficient-phase-discussion") * // result.success === true * ``` */ export declare const DiscussModeSchema: z.ZodEnum<{ "sufficient-phase-discussion": "sufficient-phase-discussion"; "intensive-phase-discussion": "intensive-phase-discussion"; "skip-phase-discussion": "skip-phase-discussion"; }>; export type DiscussMode = z.infer; /** * Workflow config schema with a factory default that produces * fully-resolved values (satisfies Zod v4 `.default()` type requirements). */ export declare const WorkflowConfigSchema: z.ZodDefault; cross_session_tasks_dependencies_validation: z.ZodDefault; trajectory_control: z.ZodDefault; advanced_continuity_validation: z.ZodDefault; task_plus_enabled: z.ZodDefault; plan_check: z.ZodDefault; verifier: z.ZodDefault; ui_phase: z.ZodDefault; ui_safety_gate: z.ZodDefault; ai_integration_phase: z.ZodDefault; research_before_questions: z.ZodDefault; discuss_mode: z.ZodDefault>; use_worktrees: z.ZodDefault; }, z.core.$strip>>; export type WorkflowConfig = z.infer; /** * Toggles for available delegation mechanisms. * * - `native_task`: OpenCode innate task tool (always available). * - `delegate_task`: Custom delegation via harness (f-06). * - `background_delegation`: Background/async delegation (f-06 advanced). * * @example * ```typescript * const result = DelegationSystemsSchema.safeParse({ * native_task: true, * delegate_task: true, * background_delegation: false, * }) * // result.success === true * ``` */ export declare const DelegationSystemsSchema: z.ZodDefault; delegate_task: z.ZodDefault; background_delegation: z.ZodDefault; }, z.core.$strip>>; export type DelegationSystems = z.infer; /** * Maps legacy camelCase JSON keys to canonical snake_case keys. * Applied during `readConfigs()` to support backward-compatible config files. * * @example * ```typescript * // Input: { "conversationLanguage": "en" } * // After migration: { "conversation_language": "en" } * ``` */ export declare const LEGACY_KEY_MAP: Record; /** * Applies legacy camelCase → snake_case key migration to a raw config object. * Mutates the input object in-place for efficiency. * * @param raw - The raw parsed JSON object from configs.json. * @returns The same object with legacy keys renamed to snake_case. */ export declare function migrateKeys(raw: Record): Record; /** * Schema for `.hivemind/configs.json` — the full skeleton v2 §9.1 runtime configuration. * Loaded at every front-facing session start and reloaded after each user prompt. * * Unknown fields are stripped (lenient parsing) to support forward-compatible * configs from future versions without rejecting the entire file. * * @see SKELETON-INTEGRATED-SYSTEMATIC-APPROACH-v2 §9.1 for the full schema specification. * * @example * ```typescript * import { HivemindConfigsSchema, readConfigs } from "./configs.js" * * // Validate a config object * const result = HivemindConfigsSchema.safeParse({ * conversation_language: "en", * mode: "expert-advisor", * workflow: { research: true, plan_check: true }, * }) * * // Read from disk * const configs = readConfigs("/path/to/project") * ``` */ /** * Schema for delegation depth conditions in governance rules. * Enables depth-based rule matching: rules fire only when session depth * falls within the specified min/max range (inclusive). */ export declare const DepthConditionSchema: z.ZodObject<{ min: z.ZodOptional; max: z.ZodOptional; }, z.core.$strip>; export declare const GovernanceRuleSchema: z.ZodObject<{ id: z.ZodString; condition: z.ZodObject<{ toolNames: z.ZodOptional>; sessionIDs: z.ZodOptional>; depth: z.ZodOptional; max: z.ZodOptional; }, z.core.$strip>>; }, z.core.$catchall>; action: z.ZodObject<{ type: z.ZodEnum<{ allow: "allow"; warn: "warn"; block: "block"; escalate: "escalate"; needs_jit_grant: "needs_jit_grant"; }>; escalation: z.ZodOptional>; }, z.core.$catchall>; enabled: z.ZodDefault; }, z.core.$strip>; /** * Schema for naming standards configuration. * Defines allowed frameworks, classifications, naming format, and title length limits. */ export declare const NamingStandardsSchema: z.ZodObject<{ allowed_frameworks: z.ZodOptional>; allowed_classifications: z.ZodOptional>; naming_format: z.ZodOptional; max_title_length: z.ZodOptional; }, z.core.$strip>; /** * Schema for per-agent configuration. * Defines agent description, allowed commands, tools, and temperature. */ export declare const AgentConfigSchema: z.ZodObject<{ description: z.ZodOptional; allowedCommands: z.ZodOptional>; tools: z.ZodOptional>; temperature: z.ZodOptional; }, z.core.$strip>; /** * Schema for command-to-agent mapping configuration. * Defines which agent handles a command and the associated workflow. */ export declare const CommandConfigSchema: z.ZodObject<{ agent: z.ZodOptional; workflow: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>; /** * Schema for template configuration. * Defines template description and content. */ export declare const TemplateConfigSchema: z.ZodObject<{ description: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>; /** * Schema for tool registry item configuration. * Defines tool name, description, and permissions. */ export declare const ToolRegistryItemSchema: z.ZodObject<{ name: z.ZodString; description: z.ZodString; permissions: z.ZodArray; }, z.core.$strip>; export declare const GovernanceConfigsSchema: z.ZodObject<{ rules: z.ZodDefault>; sessionIDs: z.ZodOptional>; depth: z.ZodOptional; max: z.ZodOptional; }, z.core.$strip>>; }, z.core.$catchall>; action: z.ZodObject<{ type: z.ZodEnum<{ allow: "allow"; warn: "warn"; block: "block"; escalate: "escalate"; needs_jit_grant: "needs_jit_grant"; }>; escalation: z.ZodOptional>; }, z.core.$catchall>; enabled: z.ZodDefault; }, z.core.$strip>>>; naming_standards: z.ZodOptional>; allowed_classifications: z.ZodOptional>; naming_format: z.ZodOptional; max_title_length: z.ZodOptional; }, z.core.$strip>>; agent_configs: z.ZodOptional; allowedCommands: z.ZodOptional>; tools: z.ZodOptional>; temperature: z.ZodOptional; }, z.core.$strip>>>; command_agent_mappings: z.ZodOptional; workflow: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; templates: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>>>; tool_registry: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>; export type GovernanceConfigs = z.infer; /** * Behavioral override enums for config-driven profile customization. * These fields allow per-project override of the static BehavioralProfiles lookup. */ export declare const GuardrailLevelSchema: z.ZodEnum<{ strict: "strict"; moderate: "moderate"; permissive: "permissive"; }>; export declare const DelegationModeSchema: z.ZodEnum<{ waiter: "waiter"; direct: "direct"; autonomous: "autonomous"; }>; export declare const ToolAccessPatternSchema: z.ZodEnum<{ restricted: "restricted"; standard: "standard"; full: "full"; }>; export declare const SkillFilterSchema: z.ZodEnum<{ full: "full"; curated: "curated"; domain: "domain"; }>; export declare const HivemindConfigsSchema: z.ZodObject<{ conversation_language: z.ZodDefault>; documents_and_artifacts_language: z.ZodDefault>; document_paths: z.ZodDefault>; mode: z.ZodDefault>; user_expert_level: z.ZodDefault>; delegation_systems: z.ZodDefault; delegate_task: z.ZodDefault; background_delegation: z.ZodDefault; }, z.core.$strip>>; parallelization: z.ZodDefault; atomic_commit: z.ZodDefault; commit_docs: z.ZodDefault; workflow: z.ZodDefault; cross_session_tasks_dependencies_validation: z.ZodDefault; trajectory_control: z.ZodDefault; advanced_continuity_validation: z.ZodDefault; task_plus_enabled: z.ZodDefault; plan_check: z.ZodDefault; verifier: z.ZodDefault; ui_phase: z.ZodDefault; ui_safety_gate: z.ZodDefault; ai_integration_phase: z.ZodDefault; research_before_questions: z.ZodDefault; discuss_mode: z.ZodDefault>; use_worktrees: z.ZodDefault; }, z.core.$strip>>; governance: z.ZodDefault>; sessionIDs: z.ZodOptional>; depth: z.ZodOptional; max: z.ZodOptional; }, z.core.$strip>>; }, z.core.$catchall>; action: z.ZodObject<{ type: z.ZodEnum<{ allow: "allow"; warn: "warn"; block: "block"; escalate: "escalate"; needs_jit_grant: "needs_jit_grant"; }>; escalation: z.ZodOptional>; }, z.core.$catchall>; enabled: z.ZodDefault; }, z.core.$strip>>>; naming_standards: z.ZodOptional>; allowed_classifications: z.ZodOptional>; naming_format: z.ZodOptional; max_title_length: z.ZodOptional; }, z.core.$strip>>; agent_configs: z.ZodOptional; allowedCommands: z.ZodOptional>; tools: z.ZodOptional>; temperature: z.ZodOptional; }, z.core.$strip>>>; command_agent_mappings: z.ZodOptional; workflow: z.ZodOptional; description: z.ZodOptional; }, z.core.$strip>>>; templates: z.ZodOptional; content: z.ZodOptional; }, z.core.$strip>>>; tool_registry: z.ZodOptional; }, z.core.$strip>>>; }, z.core.$strip>>; guardrail_level: z.ZodOptional>; delegation_mode: z.ZodOptional>; tool_access_pattern: z.ZodOptional>; skill_filter: z.ZodOptional>; }, z.core.$strip>; export type HivemindConfigs = z.infer; /** * Returns the default Hivemind configuration object. * Merges schema defaults with DEFAULT_GOVERNANCE_CONFIGS. * * @returns Default configuration with all fields set to their default values. * * @example * ```typescript * const defaults = getDefaultConfigs() * // defaults.conversationLanguage === "en" * // defaults.mode === "expert-advisor" * ``` */ export declare function getDefaultConfigs(): HivemindConfigs; /** * Resolves the canonical path to `.hivemind/configs.json` for a given project root. * * @param projectRoot - Absolute path to the project root directory. * @returns Absolute path to `.hivemind/configs.json`. */ export declare function getConfigsPath(projectRoot: string): string; /** * Reads and validates `.hivemind/configs.json` from disk. Returns defaults if * the file is missing or contains invalid JSON. Unknown fields are silently * stripped. * * @param projectRoot - Absolute path to the project root directory. * @returns Validated Hivemind configuration object. * * @example * ```typescript * const configs = readConfigs("/path/to/project") * console.log(configs.mode) // "expert-advisor" * ``` */ export declare function readConfigs(projectRoot: string): HivemindConfigs; export type ConfigFileValidationResult = { success: true; data: HivemindConfigs; } | { success: false; error: string; }; /** * Validate `.hivemind/configs.json` without silently falling back to defaults. * * This helper is intended for diagnostics such as `hivemind doctor`, where the * caller needs a precise success/failure result instead of the lenient runtime * fallback behavior used by {@link readConfigs}. * * @param projectRoot - Absolute path to the project root directory. * @returns Explicit validation success or a human-readable failure message. * * @example * ```typescript * const result = validateConfigsFile("/path/to/project") * if (!result.success) console.error(result.error) * ``` */ export declare function validateConfigsFile(projectRoot: string): ConfigFileValidationResult; /** * Validates and writes a Hivemind configuration object to `.hivemind/configs.json`. * Creates the parent directory if it does not exist. * * @param projectRoot - Absolute path to the project root directory. * @param config - Configuration object to validate and persist. * @returns The validated configuration that was written. * @throws {Error} If the config object fails Zod validation. * * @example * ```typescript * const written = writeConfigs("/path/to/project", { * conversationLanguage: "vi", * documentsLanguage: "en", * mode: "hivemind-powered", * userExpertLevel: "architecture-driven", * delegationSystems: { * native_task: true, * delegate_task: true, * background_delegation: true, * }, * }) * ``` */ export declare function writeConfigs(projectRoot: string, config: HivemindConfigs): HivemindConfigs; //# sourceMappingURL=hivemind-configs.schema.d.ts.map