import * as clack from "@clack/prompts"; import type { PromptApi } from "../pick.ts"; import type { RoleModelEntry } from "../model-utils.ts"; /** * Split a role's scanned `role.yaml` entries into its primary (the root * `{roleDir}/role.yaml`) and its subagents (every other entry). * * Matching is separator-insensitive via {@link samePath}: fast-glob returns * forward-slash absolute paths while `join` builds native-separator paths, so a * strict `===` comparison could misclassify the primary as a subagent on win32. * When no entry matches the root, `primary` is undefined and every entry is * returned as a subagent. */ export declare function partitionRoleEntries(entries: RoleModelEntry[], roleDir: string): { primary?: RoleModelEntry; subagents: RoleModelEntry[]; }; /** * The clack surface the interactive flow needs: the shared {@link PromptApi} * plus `text` and the full `log` namespace. Defaults to the real module; tests * inject a scripted fake (same seam as {@link configInteractive}). */ export type ConfigPrompts = Omit & { text: typeof clack.text; log: typeof clack.log; }; export declare function runInteractive(roleDir: string, target: string, prompts?: ConfigPrompts): Promise; /** * Interactive flow for `rolebox config` without a role: pick a synced role * and return its name, or undefined when the user cancels. `prompts` is * injectable for tests. */ export declare function configInteractive(prompts?: PromptApi, hint?: string, target?: string): Promise; /** * Resolve which sync target `rolebox config` should operate on. * * Behavior (registry-driven — the picker derives its choices from * `PLATFORM_REGISTRY`, with no per-platform branches): * - An explicit `--target`/`-t` always wins and never prompts. * - Interactive mode (no `--model`) with `--target` omitted prompts for a * target. When the role is already known, targets where it is synced are * surfaced first — falling back to every valid target when none have it — * so the user is not led to a target where `config` would immediately * fail with "no roles synced". * - Non-interactive mode (`--model` given) with `--target` omitted keeps the * historical opencode default and never blocks on a prompt. * * Returns the target id, or undefined when the user cancels the menu. */ export declare function resolveConfigTarget(opts: { explicitTarget?: string; role?: string; interactive: boolean; prompts?: PromptApi; }): Promise; export declare function runNonInteractive(roleDir: string, model: string, primaryOnly: boolean): Promise; declare const _default: import("citty").CommandDef<{ readonly role: { readonly type: "positional"; readonly description: "Role name to configure (must be synced). Omit for interactive selection"; readonly required: false; }; readonly model: { readonly type: "string"; readonly description: "Model ID to apply (non-interactive mode)"; readonly alias: "m"; }; readonly "primary-only": { readonly type: "boolean"; readonly description: "Only update the top-level role.yaml"; readonly alias: "p"; }; readonly target: { readonly type: "string"; readonly description: "Sync target: opencode, pi, or dsh (default: opencode)"; readonly alias: "t"; }; }>; export default _default; //# sourceMappingURL=config.d.ts.map