/** * nico-overrides.ts — Read and apply agent overrides from `npm:pi-subagents`-style * `settings.json` (`subagents.agentOverrides`). * * Priority (after `@tintinweb/pi-subagents` has resolved its own .md chain): * 1. Local JSON (.pi/settings.json) ← highest * 2. Global JSON (~/.pi/agent/settings.json) * * Overrides are applied to matching agents in the registry. If an agent name * from the overrides does not exist in the registry, it is auto-registered * using the override fields as the full definition (no .md file needed). * * Skill mapping (Nico string[] → tintinweb true | string[] | false): * ["*"] → true (all skills) * ["foo"] → ["foo"] (only listed) * [] | false → false (none) * omitted → true (all, fallback) */ import type { AgentConfig } from "./types.js"; export interface NicoAgentOverride { model?: string | false; thinking?: string | false; fallbackModels?: string[]; systemPrompt?: string; systemPromptMode?: "append" | "replace"; inheritProjectContext?: boolean; inheritSkills?: boolean; defaultContext?: "fresh" | "fork" | false; disabled?: boolean; skills?: string[] | false; tools?: string[] | false; completionGuard?: boolean; toolBudget?: Record; } /** * Read subagents.agentOverrides and subagents.defaultModel from both local * and global Nico-style settings.json. Local overrides global on key collision. */ export declare function readNicoAgentOverrides(cwd: string): { overrides: Record; defaultModel: string | undefined; }; export declare function resolveNicoSkills(skills: string[] | false | undefined): true | string[] | false; /** * Apply a Nico-style override to an existing tintinweb AgentConfig. * JSON values directly overwrite the config (highest priority). */ export declare function applyNicoOverride(agent: AgentConfig, override: NicoAgentOverride, nicoDefaultModel?: string): AgentConfig; /** * Apply all Nico overrides to a map of agents (mutating in-place). * Agents that don't exist yet are auto-registered from the override. */ export declare function applyNicoOverridesToMap(agents: Map, overrides: Record, defaultModel?: string): void; //# sourceMappingURL=nico-overrides.d.ts.map