/** * Canonical subagent registry and policy boundary. * * Agent Markdown files are user-facing configuration. They are not the * authority for role, model, tools, effects, budgets, or output contracts. * The registry is rebuilt from immutable definitions on every load; callers * may cache diagnostics, but a cache can never create authority. */ export declare const ANALYTICAL_PROVIDER: "openrouter"; export declare const ANALYTICAL_MODEL: "deepseek/deepseek-v4-flash-latest"; export declare const WORKER_PROVIDER: "openrouter"; export declare const WORKER_MODEL: "openai/gpt-5.6-luna"; export type SubagentRole = "exploration" | "investigation" | "planning" | "implementation" | "review" | "security" | "research" | "testing"; export type SubagentExecutionMode = "observe" | "plan" | "execute"; export type ModelResolutionPolicy = "strict" | "configured_fallback"; export interface SubagentBudget { maxModelTurns?: number; maxToolCalls?: number; maxWallTimeMs?: number; maxInputTokens?: number; maxOutputTokens?: number; maxCostUsd?: number; maxAffectedFiles?: number; } export interface SubagentDefinition { name: string; aliases: string[]; version: number; description: string; role: SubagentRole; provider: string; model: string; modelResolutionPolicy: ModelResolutionPolicy; executionMode: SubagentExecutionMode; allowedTools: string[]; deniedTools: string[]; deniedEffects: string[]; requiredCapabilities: string[]; budget: SubagentBudget; concurrency: { parallelSafe: boolean; maximumInstances: number; }; recursion: { maySpawnSubagents: boolean; maximumDepth: number; }; inputSchema: string; outputSchema: string; fallbackAgents: string[]; resultCompression?: { enabled: boolean; maximumCharacters?: number; }; /** Workspace retrieval policy (1.7.0). */ retrieval?: SubagentRetrievalPolicy; } /** * Retrieval permissions and budget for a subagent. Child permission is always * the intersection of parent authorization, policy, agent, skill and retrieval * policy; retrieval can never expand workspace scope. */ export interface SubagentRetrievalPolicy { allowed: boolean; mode: "lexical" | "hybrid" | "semantic"; maxResults: number; maxContextTokens: number; revalidateBeforeMutation: boolean; } export declare const DEFAULT_RETRIEVAL_POLICY: SubagentRetrievalPolicy; /** Resolve the retrieval policy declared by a built-in subagent, if any. */ export declare function subagentRetrievalPolicy(name: string): SubagentRetrievalPolicy | undefined; export interface SubagentModelResolution { agent: string; configuredProvider: string; configuredModel: string; resolvedProvider: string; resolvedModel: string; resolutionKind: "exact" | "provider_alias" | "configured_fallback"; reasonCode: string; recordedAt: string; } export type SubagentResolutionErrorCode = "SUBAGENT_NOT_REGISTERED" | "SUBAGENT_ALIAS_AMBIGUOUS" | "SUBAGENT_DISABLED" | "SUBAGENT_MODEL_UNAVAILABLE" | "SUBAGENT_PERMISSION_CONFLICT" | "SUBAGENT_OUTPUT_SCHEMA_INVALID"; export interface SubagentResolutionError { code: SubagentResolutionErrorCode; requestedAgent: string; referencingSkill?: string; availableAgents: string[]; compatibleAgents?: string[]; automaticFallbackAttempted: false; } export interface RegistryDiagnostic { code: string; message: string; agent?: string; path?: string; } export interface SkillDependencyDiagnostic { code: "SKILL_DEPENDENCY_INVALID"; skillName: string; skillSource: string; missingAgent?: string; invalidFallback?: string; invalidModel?: string; permissionConflict?: string; schemaError?: string; recommendedRemediation: string; } export interface ResolvedSubagent { definition: SubagentDefinition; model: SubagentModelResolution; } export declare const BUILTIN_SUBAGENT_DEFINITIONS: readonly SubagentDefinition[]; export declare class SubagentRegistry { private readonly definitions; private readonly aliases; private readonly diagnostics; private constructor(); static create(definitions?: readonly SubagentDefinition[]): SubagentRegistry; list(): SubagentDefinition[]; aliasesList(): Array<{ alias: string; name: string; }>; diagnosticsList(): RegistryDiagnostic[]; validate(): { valid: boolean; diagnostics: RegistryDiagnostic[]; }; resolve(requestedAgent: string, options?: { referencingSkill?: string; availableModels?: readonly string[]; }): ResolvedSubagent | SubagentResolutionError; } export declare function resolveSubagentModel(definition: SubagentDefinition, availableModels?: readonly string[]): { ok: true; value: SubagentModelResolution; } | { ok: false; error: SubagentResolutionError; }; export declare function validateSubagentOutput(schema: string, output: unknown): { valid: true; value: Record; } | { valid: false; error: SubagentResolutionError; }; export declare function validateSkillAgentReferences(skillName: string, skillSource: string, content: string, registry?: SubagentRegistry): SkillDependencyDiagnostic[]; export declare function getCanonicalSubagentRegistry(): SubagentRegistry; export declare function assertCanonicalProductionAgents(agentNames: readonly string[]): void; export declare const SUBAGENT_POLICY_EFFECTS: { readonly observe: readonly string[]; readonly plan: readonly string[]; readonly execute: readonly string[]; }; //# sourceMappingURL=subagent-registry.d.ts.map