/** * Native agent config generators for Codex CLI. * Writes standalone TOML files under ~/.codex/agents/ or ./.codex/agents/. * * Model precedence for the written TOML `model` key (NOT written if neither applies): * 1. Per-agent override: .omx-config.json agentModels[role] → `model` key written * 2. exactModel + built-in provider: planner/architect/researcher → `model` key written (gpt-6-astra) * 3. Otherwise: NO `model` key written; agent inherits Codex config.toml model at runtime * * For instruction composition (resolved_model metadata), richer logic applies including configured * models and modelClass routing; see resolveAgentModel(). That richer resolution is informational only. * * IMPORTANT: OMX_DEFAULT_FRONTIER_MODEL, OMX_DEFAULT_STANDARD_MODEL, and OMX_DEFAULT_SPARK_MODEL * do not set the native TOML model field or change native runtime model selection. They configure * Team worker fallbacks and mode-specific resolution, and may affect resolved_model/model-table metadata. */ import { AgentDefinition } from "./definitions.js"; import type { CatalogManifest } from "../catalog/schema.js"; import { type PerAgentReasoningEffort } from "../config/models.js"; export declare const EXACT_GPT_5_6_TERRA_MODEL = "gpt-5.6-terra"; export interface GeneratedNativeAgentConfig { name: string; description: string; developerInstructions?: string; model?: string; modelProvider?: string; reasoningEffort?: PerAgentReasoningEffort; } interface AgentModelResolutionOptions { codexHomeOverride?: string; configTomlContent?: string; env?: NodeJS.ProcessEnv; } interface RoleInstructionMetadata { name: string; posture: AgentDefinition["posture"]; modelClass: AgentDefinition["modelClass"]; routingRole: AgentDefinition["routingRole"]; nativeSubagentDelegation?: AgentDefinition["nativeSubagentDelegation"]; exactModel?: AgentDefinition["exactModel"]; } interface ComposeRoleInstructionsOptions { nativeAgent?: boolean; /** * When true, suppress the exact-model overlay even if the agent has exactModel defined. * Used when the agent will inherit from a custom provider at runtime. */ suppressExactModelOverlay?: boolean; } export declare function composeRoleInstructions(promptContent: string, metadata: RoleInstructionMetadata | null, resolvedModel?: string, options?: ComposeRoleInstructionsOptions): string; export declare function composeRoleInstructionsForRole(roleName: string, promptContent: string, resolvedModel?: string): string; /** * Strip YAML frontmatter (between --- markers) from markdown content. */ export declare function stripFrontmatter(content: string): string; export declare function generateStandaloneAgentToml(config: GeneratedNativeAgentConfig): string; /** * Generate TOML content for a prompt-backed OMX role agent. * Includes model field for all agents for documentation and discoverability. * Only includes modelProvider field if there's an explicit per-agent override, * not when it merely mirrors the config default. This prevents agent TOMLs from * becoming stale when config.toml provider changes (fixes #3779). */ export declare function generateAgentToml(agent: AgentDefinition, promptContent: string, options?: AgentModelResolutionOptions): string; /** * Install prompt-backed native agent config .toml files to ~/.codex/agents/ * Returns the number of agent files written. */ export declare function installNativeAgentConfigs(pkgRoot: string, options?: { force?: boolean; dryRun?: boolean; verbose?: boolean; agentsDir?: string; catalogManifest?: CatalogManifest; allowUncatalogedDefinitions?: boolean; }): Promise; export {}; //# sourceMappingURL=native-config.d.ts.map