Releases: coolrazor007/cli-router
Releases · coolrazor007/cli-router
Release list
v0.3.2
Highlights
- Added fail-closed conditional fallback policies with per-tool
onfailure allowlists, actual-attemptmax_fallback_attemptscaps, transport-failure classification, and complete original-primary/immediate-trigger provenance. - Added schema-versioned JSON receipts for
--version,check,plan,run,implement, andtools test, with immutable source/effective configuration checksums and provider reasoning effort. - Added tool-level working-directory, environment allowlisting/overrides/unsets, closed stdin, and configured environment-value redaction.
- Added config schema v2 with mandatory
requires_cli_router: ">=0.3.2,<0.4.0", while retaining version 1 compatibility.
Fixes
- Conditional fallback selection now scans past nonmatching policies without consuming the attempt cap.
- A failed fallback's classification becomes the immediate trigger for later policies while unsafe failures remain terminal.
- Receipts remain bound to the exact configuration loaded even if the source file changes during execution.
v0.3.1
CLI-Router 0.3.1 is a patch release focused on correctness, process cleanup, configuration safety, provider command compatibility, and release hardening.
- Made workflow outcomes fail closed:
runandimplementnow reject empty resolved stage lists, andstop_on_failure: falsepreserves the first failed stage as the overall result even when later stages succeed. - Terminate the full subprocess process group on command timeout so provider helper processes do not survive an exit
124. - Restored home-config-only TUI persistence; project-local and explicit configuration files are no longer silently rewritten.
- Updated generated Hermes commands to the current non-interactive
hermes --oneshotinterface and corrected Grok--singleargument ordering. - Hardened Doctor repair backends to run tool-free/read-only from an isolated temporary directory without GitHub repository tokens; providers without a safe tool-free mode are excluded.
- Changed model drift removals to require explicit maintainer confirmation, isolated the patch agent from GitHub credentials, added a strict patch-file allowlist, and removed auto-merge from the watchdog.
- Added release identity validation, Python 3.14 CI, Ruff, mypy, actionlint, branch-aware coverage, package checks, script tests, and Dependabot configuration.
v0.3.0
- Added a
doctorfeature (cli-router doctor,--repair) to catch agent-CLI drift over time.doctorreports each provider's discovery health (CLI present? live model list parses?). With--repair, when a provider's CLI is installed and responding but its model list no longer parses, Doctor uses a working agent as an LLM parser — it runs the sick provider's own list command itself, hands only the raw text to the agent, and expects back a JSON array of model ids (LLM-as-parser, never LLM-as-operator). Recovered lists are written to~/.cli-router/model-cache.yaml(cli_router.modelcache.ModelCache), which layers between live discovery and the staticDEFAULT_MODELSfallback, so the fix survives across runs without editing source. Model discovery and the TUI model pickers now consult that cache. - Made Doctor resilient to broken agents via a modular backend-failover chain. Instead of trusting one "healthy" provider, Doctor builds an ordered chain of
(provider, model)backends — installed providers alphabetically, each provider's models cache-first thenDEFAULT_MODELS— and walks it until one actually answers, pinning the winner and reusing it for the remaining repairs. As long as one provider+model works, Doctor can heal the rest. A stale model (e.g. a retiredgpt-5) simply fails and falls through to the next candidate. The LLM call (run_agent) is an isolated seam so future Doctor tasks can reuse the same selection logic. Repairs are cancellable (acancelledhook, or Ctrl-C), stopping gracefully with partial results preserved. - Lengthened Doctor's discovery timeout to 10s (vs. the interactive picker's 1.5s, now a
probe_models(..., timeout=)parameter) so slow-cold-starting CLIs are diagnosed instead of timing out. - Stopped probing providers that have no safe, machine-readable model-list command.
claude modelshangs andclaude model listwould start a billable agent turn;hermes modelis an interactive login/selector. These are removed from discovery, so Claude and Hermes now resolve straight to their static/cached model lists without ever shelling out, and Doctor reports them honestly asstaticrather than cryingdrift. (Codex and Grok keep live discovery.) - Hardened
_parse_model_catalogto decode the JSON object at each{(viaraw_decode), tolerating a banner before the catalog and a log line printed after it — the exact format-drift Doctor exists to weather. - Hardened Grok/text model-list parsing against banner drift:
_parse_model_outputis now section-aware (only trusts aDefault model:line and entries underAvailable models:, falling back to scanning all lines only when there is no header) and requires each token to look like a model id (no spaces, carries a digit or-). This replaces the old prefix-denylist noise filter, which leaked banner words likeYouwhen the login/status wording drifted — a latent glitch that became load-bearing once the model is passed as-m. - Routed the selected model and reasoning effort to the underlying CLI:
provider_tool_confignow bakes both into the command (codex exec -c model_reasoning_effort=<effort> -m <model>,claude -p --model <model> --effort <effort>,grok --single -m <model> --reasoning-effort <effort>), and editing a provider model config in the TUI regenerates the command. Previously themodelandeffortfields were stored but never passed, so every model config ran the tool's default model at its default effort. Custom/generic tools keep their hand-written commands; Hermes (single auto-routing model) takes neither flag. - Refreshed the Codex static fallback model list to the current catalog (
gpt-5.6-sol,gpt-5.6-terra,gpt-5.6-luna,gpt-5.5), replacing the retiredgpt-5.1/gpt-5slugs. Livecodex debug modelsdiscovery already surfaces the GPT-5.6 Sol/Terra/Luna models; the Claude list already includesclaude-fable-5. - Added per-stage output between stages instead of a bare
exit 0: the plain CLI and the TUI end-of-run summary now print each stage's extracted answer condensed to a half-page preview, and the TUI live view shows a one-line result teaser per finished stage. - Streamed provider progress live:
stream_toolnow delivers stderr lines through a newon_stderr_linecallback (both streams funnelled through one dispatch loop), and the TUI renders that progress as dimmed, ANSI-stripped secondary output — so long stages (e.g. Codex, which streams to stderr) are no longer a silent wait. - Added
condense_extracted,first_meaningful_line, andstrip_ansihelpers instreamfmt. - Added
grokas a built-in provider: default model list,grok modelsdiscovery, agrok --singlecommand template, a packagedgrok.yamlpreset, and ANSI/noise stripping in model-list parsing so discovery output stays clean. - Added
stage_libraryconfig validation: it must be a list of mappings, each withid,tool, andinput_template, referencing a known tool. - Made
[previous stage output]a real variable: it now injects the immediately preceding stage's final extracted text ({previous_output}), not the plan file path. Previously it was aliased to{plan_path}, so downstream stages (QA, Summary) never saw prior stage output and could report stale or contradictory results. - Added
[all stage outputs]({all_stage_outputs}): every completed stage's final output so far, labeled by stage id — useful for QA and Summary stages. - Added
[plan file]({plan_path}) as a distinct variable for referencing the plan file path. - Slimmed the run manifest (
run.yaml): per-stage records no longer embed fullstdout/stderr(already saved as sidecar.stdout/.stderrfiles). Each stage now records byte counts plus the artifact filenames, keeping the renderedcommandfor diagnostics. A run that dumped ~800 KB of duplicated streams now writes a ~4 KB manifest.runs showreads the flattenedexit_codeand still renders older manifests. - Updated packaged presets and first-run TUI seed prompts: planner and QA stages now instruct "do not edit any files; respond only in Markdown", coder references the plan file, QA reviews the previous stage's output, and Summary consumes all stage outputs.
- Fixed TUI stage reordering (
U/D) so the new order is written to the workflow config instead of only the on-screen list; reordered stages now run in the chosen order and survive add/remove and plaincli-router run. - Persisted TUI edits back to whichever config is in use — a project-local
cli-router.yamlor an explicit--configpath, not just the home config — so reorders, stage add/remove, and Model Config changes survive across runs.
v0.2.0
- Added modular workflow stages.
- Added a
stage_libraryconfig section for reusable TUI stage templates. - Added TUI stage-library insertion and selected-stage removal from Workflow and Stage configuration screens.
- Added duplicate stage insertion with unique auto-suffixed ids such as
coder-2. - Added
enabled: falsefor opt-in stages. - Added
--stagesto run explicit stage selections in explicit order. - Added
cli-router tuifor interactive stage selection, toggling, and ordering. - Made bare
cli-routeropen the TUI by default. - Changed bare
cli-routerto open the TUI main menu before prompting. - Changed the TUI Prompt menu item to ask for a prompt and immediately run the enabled workflow.
- Added a TUI main menu with Workflow, Stage configuration, and Model and providers sections.
- Replaced the workflow State column with stage Prompt previews and Unicode checkbox selectors.
- Moved prompt editing into its own TUI menu section and added back navigation from Workflow.
- Moved Prompt to the top of the TUI main menu.
- Added official TUI prompt variables and validation for
[user prompt]and[previous stage output]. - Reworded Stage configuration controls to explicit “Press A...” style instructions.
- Standardized TUI navigation:
Bis back andQis quit. - Renamed TUI tool/provider display to Model Config and added editable provider/model/effort metadata.
- Linked stage configuration to Model Config entries instead of raw tool labels.
- Added row selection and Model Config pickers to Stage Configuration so users no longer type stage IDs or model config names from memory.
- Made Esc cancel TUI text entry and Stage Configuration add/edit flows without applying partial changes.
- Added immediate "Running workflow" feedback when Prompt or Workflow starts external tool execution.
- Stream condensed stage output in the TUI and collapse verbose thinking/diff output by default.
- Added
defaults.tui_verbosity: fullto restore raw TUI stdout/stderr summaries when needed. - Added
~/.cli-router/config.yamlpersistence for first-run setup and TUI edits. - Added
auth_requiredfailure classification and included provider error snippets in nonzero stage failure messages. - Added first-run provider selection for
codex,claude, andhermes. - Added provider model discovery through provider CLIs with built-in fallbacks.
- Added Grok provider support, including first-run TUI selection,
grok modelsdiscovery, and agrok --singlepreset. - Added Model Config menu support for adding providers after first-run onboarding.
- Prevented accidental Enter on Model Config from entering edit mode.
- Added a multiline Stage Configuration prompt editor that keeps prompt variables visible and saves with Ctrl+D.
- Made provider model discovery close stdin and use a short timeout before falling back.
- Changed Codex model discovery to parse
codex debug modelsso newly available Codex models are selectable without a package update. - Updated the static Claude fallback model list to current Claude Code model IDs: Fable 5, Opus 4.8, Sonnet 5, and Haiku 4.5.
- Made Ctrl+C cancel immediately from TUI screens, nested pickers, and prompt input with exit code
130. - Added
cli-router runsandcli-router runs show <id>to inspect saved run artifacts. - Added persistent diagnostics under
~/.cli-router/logs/, including rotating workflow logs, JSONL run metrics, and stage duration metrics inrun.yaml.