/** * Deterministic parsing and host-side validation for AI-generated agent systems. * The architect returns JSON only; it never receives write access. */ import type { ThinkingLevel } from "../types.js"; export type AgentArchitectureMode = "auto" | "single" | "skill" | "chain" | "loop" | "scheduled" | "full"; export type AgentAutonomyProfile = "safe" | "read-only" | "implementation" | "full"; export type SkillGenerationPolicy = "auto" | "always" | "never"; export type ScheduleRequestMode = "none" | "optional" | "required" | "exact"; export interface ScheduleRequest { mode: ScheduleRequestMode; hint: string; expectedExpression?: string; } export interface AgentBlueprintFile { name: string; content: string; primary: boolean; } export interface SkillBlueprintFile { name: string; content: string; } export interface ScheduleBlueprint { name: string; description: string; schedule: string; prompt: string; model?: string; thinking?: ThinkingLevel; max_turns?: number; isolated?: boolean; isolation?: "worktree"; } export interface AgentSystemBlueprint { summary: string; warnings: string[]; agents: AgentBlueprintFile[]; skills: SkillBlueprintFile[]; schedule?: ScheduleBlueprint; } export interface GenerationPromptInput { requestedName: string; description: string; architecture: AgentArchitectureMode; autonomy: AgentAutonomyProfile; skillPolicy: SkillGenerationPolicy; scheduleRequest: ScheduleRequest; targetAgentDir: string; targetSkillDir: string; } export interface BlueprintSelectionContext { architecture: AgentArchitectureMode; autonomy: AgentAutonomyProfile; skillPolicy: SkillGenerationPolicy; scheduleRequest: ScheduleRequest; } export interface AgentDefinitionInspection { frontmatter: Record; tools?: string[]; disallowedTools: string[]; extensions?: boolean | string; isolated?: boolean; isolation?: "worktree"; handoff: boolean; validators: readonly { agentId: string; criteria: readonly string[]; }[]; } export declare function inspectAgentDefinition(content: string, field?: string): AgentDefinitionInspection; /** Remove terminal control characters (including DEL/backspace leakage) and validate the filename. */ export declare function normalizeWizardName(raw: string): string; export declare function parseAgentSystemBlueprint(raw: string, requestedName: string): AgentSystemBlueprint; export declare function validateBlueprintForSelections(blueprint: AgentSystemBlueprint, selection: BlueprintSelectionContext): string | undefined; export declare function buildAgentSystemPrompt(input: GenerationPromptInput): string;