/** * Per-agent model selection for the PTY runtimes. * * Every harness exposes a launch flag that pins the model for the session * (the in-process Crewly Agent runtime takes its model in code instead): * * | runtime | model flag | reasoning effort | * |--------------|-----------------------|-------------------------------------------| * | claude-code | `--model ` | `--effort low|medium|high|xhigh|max` | * | codex-cli | `-m ` | `-c model_reasoning_effort=""` | * | gemini-cli | `-m ` | — | * | opencode-cli | `--model `| — | * | antigravity-cli | `--model ` | `--effort low|medium|high|max` | * * `buildRuntimeModelFlags` turns a member's `modelId` / `reasoningEffort` * into those flags; `injectRuntimeFlags` places any flag list right after * the harness binary in a launch command (`codex resume …` included) and * drops a pre-existing copy of the same flag so the member override wins * without tripping clap's "cannot be used multiple times". * * @module utils/runtime-model-flags */ /** * Whether a model id is safe to put on a command line. * * @param modelId - Candidate model id * @returns True when it matches the allowed character set */ export declare function isSafeModelId(modelId: string | undefined): modelId is string; /** * Whether a reasoning-effort level is safe to put on a command line. * * @param effort - Candidate level * @returns True when it is a single lowercase word */ export declare function isSafeReasoningEffort(effort: string | undefined): effort is string; /** * Build the launch flags that pin a model (and optionally the reasoning * effort) for one runtime. Unknown runtimes and the in-process Crewly * Agent get no flags; unsafe values are ignored rather than quoted. * * @param runtimeType - The member's runtime * @param modelId - Model name as the harness expects it (`opus`, `gpt-5.6-sol`, `anthropic/claude-sonnet-4`) * @param reasoningEffort - Optional effort level (Claude Code / Codex / Antigravity only) * @returns Flags to insert after the binary, e.g. `['--model', 'opus']` * * @example * buildRuntimeModelFlags('codex-cli', 'gpt-5.6-sol', 'high') * // => ['-m', 'gpt-5.6-sol', '-c', 'model_reasoning_effort="high"'] */ export declare function buildRuntimeModelFlags(runtimeType: string, modelId?: string, reasoningEffort?: string): string[]; /** * Insert flags into a launch command right after the runtime binary * (`claude`, `codex`/`codex resume`, `gemini`, `opencode`, `agy`). A flag that is * already present in the command is replaced. When the binary is not found * (custom wrapper scripts), the flags go before * `--dangerously-skip-permissions` if present, else at the end. * * @param command - One launch command line (may carry a `VAR=1` prefix) * @param runtimeType - The runtime the command starts * @param flags - Flags to insert (already shell-safe) * @returns The rewritten command; unchanged when `flags` is empty * * @example * injectRuntimeFlags('codex -a never -s danger-full-access', 'codex-cli', ['-m', 'gpt-5.6-sol']) * // => 'codex -m gpt-5.6-sol -a never -s danger-full-access' */ export declare function injectRuntimeFlags(command: string, runtimeType: string, flags: string[]): string; //# sourceMappingURL=runtime-model-flags.utils.d.ts.map