/** * Roo Code adapter for subagent rendering. * * For: Roo Code. * Produces a mode entry for `.roomodes` (project scope) or * `settings/custom_modes.yaml` (user scope). * * The mode entry is a data structure — the actual file read-modify-write * is handled separately. The user's frontmatter passes through verbatim, * with structural Roo fields layered on top: `slug` is always * `input.name`, the body splits into `roleDefinition` / `customInstructions`, * and `groups` falls back to a sane default when not provided. Then * `agentOverrides[roo]` is merged on top. * * @experimental This API is unstable and may change without notice. */ import type { LossyRenderingWarning } from "../types.js"; import type { SubagentRenderInput } from "../types.js"; /** * A Roo Code custom mode entry. * * @experimental This API is unstable and may change without notice. */ export interface RooModeEntry { readonly slug: string; readonly name: string; readonly roleDefinition: string; readonly customInstructions?: string | undefined; readonly groups: ReadonlyArray; readonly [key: string]: unknown; } /** * Result of building a Roo mode entry. * * @experimental This API is unstable and may change without notice. */ export interface RooModeResult { readonly entry: RooModeEntry; readonly warnings: ReadonlyArray; } /** * Split a body into roleDefinition (first paragraph) and customInstructions (rest). * * The first paragraph is everything up to the first blank line (two consecutive newlines). * If there is no blank line, the entire body becomes roleDefinition and * customInstructions is empty. * * @experimental This API is unstable and may change without notice. */ export declare const splitBody: (body: string) => { roleDefinition: string; customInstructions: string; }; /** * Build a Roo Code mode entry from a subagent render input. * * This is a pure function that produces the data structure. * The caller is responsible for merging it into `.roomodes` or * `settings/custom_modes.yaml`. * * @experimental This API is unstable and may change without notice. */ export declare const buildRooModeEntry: (input: SubagentRenderInput) => RooModeResult; /** * Merge a mode entry into an existing modes array by slug. * * Replaces any existing entry with the same slug and preserves entries * with different slugs. * * @experimental This API is unstable and may change without notice. */ export declare const mergeRooModes: (existingModes: ReadonlyArray>, managedEntry: RooModeEntry) => ReadonlyArray>; /** * Remove a mode entry by slug from a modes array. * * @experimental This API is unstable and may change without notice. */ export declare const removeRooMode: (existingModes: ReadonlyArray>, slug: string) => ReadonlyArray>; //# sourceMappingURL=roo.d.ts.map