@iowarp/clio-coder 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +407 -0
- package/CODE_OF_CONDUCT.md +21 -0
- package/CONTRIBUTING.md +224 -0
- package/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +798 -0
- package/SECURITY.md +72 -0
- package/assets/clio-coder-logo-128.webp +0 -0
- package/damage-control-rules.yaml +419 -0
- package/dist/acp-UMLFVA3F.js +92 -0
- package/dist/agents-Q4MYPMUW.js +91 -0
- package/dist/auth-O6HYIJ6J.js +521 -0
- package/dist/chunk-262G75JS.js +35 -0
- package/dist/chunk-26BZQOAD.js +1281 -0
- package/dist/chunk-2J63S4SF.js +508 -0
- package/dist/chunk-3DANZDGR.js +717 -0
- package/dist/chunk-4UQA7NCT.js +29 -0
- package/dist/chunk-527KG6XR.js +497 -0
- package/dist/chunk-5LDRNKX2.js +1063 -0
- package/dist/chunk-5N2FG33Q.js +25 -0
- package/dist/chunk-67MTHP2E.js +135 -0
- package/dist/chunk-6CWDTGUC.js +20 -0
- package/dist/chunk-7BHLZB3A.js +2115 -0
- package/dist/chunk-7RBKDI66.js +348 -0
- package/dist/chunk-AMFR5YA3.js +541 -0
- package/dist/chunk-BBUH4VAA.js +1224 -0
- package/dist/chunk-BYEU76JP.js +899 -0
- package/dist/chunk-CLJ5HLUD.js +458 -0
- package/dist/chunk-D5YD55AR.js +116 -0
- package/dist/chunk-DXQNI4PC.js +61 -0
- package/dist/chunk-E3NYWENM.js +1004 -0
- package/dist/chunk-GNGDQYDU.js +34688 -0
- package/dist/chunk-GOTUR54M.js +9 -0
- package/dist/chunk-HBU5MTAM.js +41 -0
- package/dist/chunk-HMYNFFY4.js +28 -0
- package/dist/chunk-JPOWPFCU.js +1010 -0
- package/dist/chunk-JWHCJDCI.js +1215 -0
- package/dist/chunk-KBR4MZZR.js +41 -0
- package/dist/chunk-KKKPTZLM.js +93 -0
- package/dist/chunk-ME6DNWIU.js +66 -0
- package/dist/chunk-NI4DEJMC.js +88 -0
- package/dist/chunk-O4EJEDHO.js +659 -0
- package/dist/chunk-PIDUD6M2.js +31 -0
- package/dist/chunk-PS4PFJQP.js +29459 -0
- package/dist/chunk-QV47YRF4.js +48 -0
- package/dist/chunk-RQDWMVRB.js +279 -0
- package/dist/chunk-TFSSEXL6.js +136 -0
- package/dist/chunk-TKHQ4DGZ.js +8290 -0
- package/dist/chunk-TPOCL34A.js +2876 -0
- package/dist/chunk-UGYAX5YI.js +565 -0
- package/dist/chunk-UHTSULZS.js +461 -0
- package/dist/chunk-UU3R62TT.js +128 -0
- package/dist/chunk-UWIJNAOB.js +3906 -0
- package/dist/chunk-VOO7NYPP.js +914 -0
- package/dist/chunk-VPAWTYLY.js +117 -0
- package/dist/chunk-WD6AJM35.js +1216 -0
- package/dist/chunk-X3BR7HWV.js +115 -0
- package/dist/chunk-X3NE4WVW.js +120 -0
- package/dist/chunk-XNISANGE.js +1395 -0
- package/dist/chunk-XV4ZJ6ZM.js +3177 -0
- package/dist/cli/index.js +236 -0
- package/dist/clio-KIQ5SNDS.js +53 -0
- package/dist/components-JVHMUBEB.js +653 -0
- package/dist/config-ZFCDBMDC.js +372 -0
- package/dist/configure-G4E3A2PG.js +27 -0
- package/dist/context-CDXTP2MP.js +293 -0
- package/dist/context-E3KIFVXI.js +185 -0
- package/dist/context-clear-3F4PLXOS.js +102 -0
- package/dist/context-index-Q7YSYTR3.js +106 -0
- package/dist/docs-YIETIWZI.js +280 -0
- package/dist/doctor-M5HJJZOL.js +61 -0
- package/dist/domains/agents/builtins/architect.md +33 -0
- package/dist/domains/agents/builtins/coder.md +31 -0
- package/dist/domains/agents/builtins/context-bootstrap.md +38 -0
- package/dist/domains/agents/builtins/debugger.md +30 -0
- package/dist/domains/agents/builtins/documenter.md +31 -0
- package/dist/domains/agents/builtins/git-master.md +30 -0
- package/dist/domains/agents/builtins/provenance.md +30 -0
- package/dist/domains/agents/builtins/researcher.md +71 -0
- package/dist/domains/agents/builtins/scout.md +42 -0
- package/dist/domains/agents/builtins/tester.md +31 -0
- package/dist/domains/agents/builtins/verifier.md +30 -0
- package/dist/domains/agents/builtins/wiki-writer.md +41 -0
- package/dist/eval-B3KZZESM.js +2674 -0
- package/dist/evidence-V67CHM35.js +233 -0
- package/dist/evolve-YDZSUQYA.js +518 -0
- package/dist/extensions-SRG7XCAH.js +207 -0
- package/dist/fleet-CA2CRTVG.js +760 -0
- package/dist/fleet-preflight-CLIAX7YR.js +21 -0
- package/dist/init-2OZDJE2D.js +227 -0
- package/dist/memory-3PIQQAKX.js +207 -0
- package/dist/models-DY35XI7Y.js +237 -0
- package/dist/paths-5OMXW7Z4.js +57 -0
- package/dist/preload-KZVHET2B.js +11 -0
- package/dist/reset-PIFYNOS3.js +216 -0
- package/dist/run-3VSPP24F.js +735 -0
- package/dist/share-D36RQCXM.js +241 -0
- package/dist/skills-F2MRLELY.js +445 -0
- package/dist/skills-eval-E2ZTW4PL.js +932 -0
- package/dist/targets-DZMEZAH4.js +977 -0
- package/dist/trace-7NYCUI2J.js +250 -0
- package/dist/uninstall-AD3JWHBB.js +322 -0
- package/dist/upgrade-WYYBKGDY.js +301 -0
- package/dist/usage-ULIDAGFF.js +755 -0
- package/dist/version-ROZ6CZKH.js +16 -0
- package/dist/wiki-generate-PKFIX6OB.js +377 -0
- package/dist/worker/entry.js +1739 -0
- package/docs/README.md +93 -0
- package/docs/acp.md +120 -0
- package/docs/alcf-provider.md +72 -0
- package/docs/architecture.md +172 -0
- package/docs/artifact-versions.md +54 -0
- package/docs/built-in-agents.md +265 -0
- package/docs/capacity-and-scheduling.md +97 -0
- package/docs/commands-and-modes.md +554 -0
- package/docs/config-knobs-audit.md +115 -0
- package/docs/configuration-and-targets.md +812 -0
- package/docs/context-engine.md +236 -0
- package/docs/dispatch-architecture-rationale.md +126 -0
- package/docs/documentation-coverage.md +46 -0
- package/docs/documentation-guide.md +166 -0
- package/docs/environment-variables.md +105 -0
- package/docs/eval-runner.md +205 -0
- package/docs/evals-internal.md +298 -0
- package/docs/evidence-and-memory.md +243 -0
- package/docs/evolution.md +143 -0
- package/docs/exit-codes-and-output.md +74 -0
- package/docs/extensions-and-sharing.md +306 -0
- package/docs/fleet-demo-runbook.md +179 -0
- package/docs/fleet-dispatch.md +591 -0
- package/docs/glossary.md +75 -0
- package/docs/html/agents_blueprint.html +936 -0
- package/docs/html/alcf_blueprint.html +324 -0
- package/docs/html/architecture_blueprint.html +850 -0
- package/docs/html/commands_blueprint.html +794 -0
- package/docs/html/config_knobs_audit_blueprint.html +178 -0
- package/docs/html/configuration_blueprint.html +1080 -0
- package/docs/html/context_blueprint.html +603 -0
- package/docs/html/documentation_blueprint.html +832 -0
- package/docs/html/environment_blueprint.html +404 -0
- package/docs/html/eval_blueprint.html +743 -0
- package/docs/html/evals_internal_blueprint.html +190 -0
- package/docs/html/evolution_blueprint.html +674 -0
- package/docs/html/extensions_blueprint.html +2065 -0
- package/docs/html/fleet_dispatch_blueprint.html +286 -0
- package/docs/html/index.html +919 -0
- package/docs/html/lifecycle_blueprint.html +723 -0
- package/docs/html/memory_blueprint.html +699 -0
- package/docs/html/middleware_blueprint.html +664 -0
- package/docs/html/models_blueprint.html +2366 -0
- package/docs/html/observability_blueprint.html +683 -0
- package/docs/html/provider_adapter_blueprint.html +245 -0
- package/docs/html/safety_blueprint.html +1386 -0
- package/docs/html/shared.css +571 -0
- package/docs/html/shared.js +143 -0
- package/docs/html/skills_blueprint.html +671 -0
- package/docs/html/soak_blueprint.html +182 -0
- package/docs/html/tool_usage_blueprint.html +350 -0
- package/docs/html/tools_blueprint.html +2249 -0
- package/docs/html/trace_blueprint.html +235 -0
- package/docs/html/tui_design_blueprint.html +314 -0
- package/docs/html/validation_blueprint.html +961 -0
- package/docs/html/worker_dispatch_blueprint.html +231 -0
- package/docs/installation-and-lifecycle.md +308 -0
- package/docs/middleware-and-components.md +148 -0
- package/docs/model-catalog.md +189 -0
- package/docs/observability.md +233 -0
- package/docs/proactive-memory.md +452 -0
- package/docs/prompt-envelope-and-tools.md +142 -0
- package/docs/provider-adapter-cookbook.md +148 -0
- package/docs/release-cut-checklist.md +138 -0
- package/docs/safety-model.md +357 -0
- package/docs/scientific-validation.md +105 -0
- package/docs/session-lifecycle.md +156 -0
- package/docs/skills-marketplace.md +46 -0
- package/docs/tool-usage.md +527 -0
- package/docs/trace-store.md +132 -0
- package/docs/troubleshooting.md +33 -0
- package/docs/tui-design.md +239 -0
- package/docs/worker-dispatch-mechanics.md +242 -0
- package/package.json +132 -0
- package/skills/README.md +408 -0
- package/skills/git/commit-crafting/SKILL.md +79 -0
- package/skills/git/commit-crafting/evals.md +92 -0
- package/skills/git/create-pr/SKILL.md +116 -0
- package/skills/git/create-pr/evals.md +114 -0
- package/skills/git/investigate-issue/SKILL.md +139 -0
- package/skills/git/investigate-issue/evals.md +94 -0
- package/skills/git/resolve-merge-conflicts/SKILL.md +96 -0
- package/skills/git/resolve-merge-conflicts/evals.md +58 -0
- package/skills/git/review-changes/SKILL.md +103 -0
- package/skills/git/review-changes/evals.md +85 -0
- package/skills/git/worktree-create/SKILL.md +92 -0
- package/skills/git/worktree-create/evals.md +97 -0
- package/skills/git/worktree-create/references/worktree-setup.md +66 -0
- package/skills/git/worktree-merge/SKILL.md +95 -0
- package/skills/git/worktree-merge/evals.md +114 -0
- package/skills/skill-marketplace.json +261 -0
- package/skills/workflow/cut-it/SKILL.md +86 -0
- package/skills/workflow/cut-it/evals.md +42 -0
- package/src/domains/agents/builtins/architect.md +33 -0
- package/src/domains/agents/builtins/coder.md +31 -0
- package/src/domains/agents/builtins/context-bootstrap.md +38 -0
- package/src/domains/agents/builtins/debugger.md +30 -0
- package/src/domains/agents/builtins/documenter.md +31 -0
- package/src/domains/agents/builtins/git-master.md +30 -0
- package/src/domains/agents/builtins/provenance.md +30 -0
- package/src/domains/agents/builtins/researcher.md +71 -0
- package/src/domains/agents/builtins/scout.md +42 -0
- package/src/domains/agents/builtins/tester.md +31 -0
- package/src/domains/agents/builtins/verifier.md +30 -0
- package/src/domains/agents/builtins/wiki-writer.md +41 -0
- package/src/domains/agents/fleets/build-review.md +34 -0
- package/src/domains/agents/fleets/build-test.md +35 -0
- package/src/domains/agents/fleets/sdlc.md +86 -0
- package/src/domains/prompts/fragments/identity/clio-worker.md +11 -0
- package/src/domains/prompts/fragments/identity/clio.md +26 -0
- package/src/domains/prompts/fragments/operating/contract.md +64 -0
- package/src/domains/prompts/fragments/safety/auto-edit.md +14 -0
- package/src/domains/prompts/fragments/safety/full-auto.md +14 -0
- package/src/domains/prompts/fragments/safety/read-only.md +13 -0
- package/src/domains/prompts/fragments/safety/suggest.md +13 -0
- package/src/domains/prompts/fragments/wiki/page.md +75 -0
- package/src/domains/prompts/fragments/wiki/plan.md +48 -0
- package/src/domains/providers/models/cloud-models/alcf.yaml +40 -0
- package/src/domains/providers/models/local-models/clio-local-coding-targets.yaml +993 -0
|
@@ -0,0 +1,812 @@
|
|
|
1
|
+
# Configuration, Targets, Runtimes, and Auth
|
|
2
|
+
|
|
3
|
+
> [!TIP]
|
|
4
|
+
> **Interactive Spec Available:** An interactive configuration validator, target resolver, and CLI command generator is located at [docs/html/configuration_blueprint.html](html/configuration_blueprint.html) (Version: 0.3.0).
|
|
5
|
+
|
|
6
|
+
Clio Coder is target-first: chat and fleet dispatch resolve through configured targets in `settings.yaml`, not through provider-specific ad hoc flags. Chat and print targets are HTTP/native/pi-ai-backed runtimes. Fleet dispatch can also target the sanctioned Claude Code subscription runtimes described below.
|
|
7
|
+
|
|
8
|
+
Clio is built on top of pi-ai. Broad provider/model support comes from pi-ai-backed descriptors and from the generic `openai-compat` and `anthropic-compat` targets. Clio adds orchestration, local/native runtime ergonomics, target configuration, dispatch, safety, and receipts rather than creating a first-class descriptor for every pi-ai provider.
|
|
9
|
+
|
|
10
|
+
Source of truth: `src/core/defaults.ts`, `src/core/config.ts`, `src/domains/providers/**`, `src/cli/configure.ts`, `src/cli/targets.ts`, `src/cli/models.ts`, and `src/cli/auth.ts`.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Directory locations
|
|
15
|
+
|
|
16
|
+
Clio resolves four directories (config, data, state, cache) from platform defaults, with environment overrides. The most specific override wins:
|
|
17
|
+
|
|
18
|
+
| Variable | Effect |
|
|
19
|
+
| --- | --- |
|
|
20
|
+
| `CLIO_CODER_HOME` | Single-tree override: all four roots become `$CLIO_CODER_HOME/config`, `$CLIO_CODER_HOME/data`, `$CLIO_CODER_HOME/state`, and `$CLIO_CODER_HOME/cache`. |
|
|
21
|
+
| `CLIO_CODER_CONFIG_DIR` | Overrides the config directory only (beats `CLIO_CODER_HOME`). |
|
|
22
|
+
| `CLIO_CODER_DATA_DIR` | Overrides the data directory only (beats `CLIO_CODER_HOME`). |
|
|
23
|
+
| `CLIO_CODER_STATE_DIR` | Overrides the state directory only (beats `CLIO_CODER_HOME`). |
|
|
24
|
+
| `CLIO_CODER_CACHE_DIR` | Overrides the cache directory only (beats `CLIO_CODER_HOME`). |
|
|
25
|
+
|
|
26
|
+
Default config file:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
<configDir>/settings.yaml
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Role contents: config holds user-authored files (settings, credentials, agents, skills, prompts, extensions, runtimes); data holds durable artifacts (memory, evidence, evals); state holds machine-produced session state (sessions, audit, receipts, runs.json, recent-models.json, install.json, interviews, scratch); cache holds disposable derived files.
|
|
33
|
+
|
|
34
|
+
`clio-coder paths --json` prints the resolved directories and is the single source of truth for scripts.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## First-run flow
|
|
39
|
+
|
|
40
|
+
From a source checkout:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git clone https://github.com/iowarp/clio-coder.git
|
|
44
|
+
cd clio-coder
|
|
45
|
+
npm run install:local
|
|
46
|
+
hash -r
|
|
47
|
+
clio-coder --version
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Then start from the repository you want Clio to work on:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
cd /path/to/your/repo
|
|
54
|
+
clio-coder doctor --fix
|
|
55
|
+
clio-coder configure --list
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Start one local runtime and register exactly one target first. Clio integrates with popular local inference engines:
|
|
59
|
+
- **[LM Studio](https://lmstudio.ai):** A desktop application to run LLMs locally. Target runtime ID: `lmstudio-native`.
|
|
60
|
+
- **[Ollama](https://ollama.com):** A lightweight, extensible framework for building and running LLMs locally. Target runtime ID: `ollama-native`.
|
|
61
|
+
- **[llama.cpp](https://github.com/ggerganov/llama.cpp):** A minimal C/C++ implementation for local LLM inference. Target runtime ID: `llamacpp`.
|
|
62
|
+
- **[vLLM](https://github.com/vllm-project/vllm):** A high-throughput and memory-efficient LLM serving engine. Target runtime ID: `vllm`.
|
|
63
|
+
- **[SGLang](https://github.com/sgl-project/sglang):** A fast serving framework for large language models. Target runtime ID: `sglang`.
|
|
64
|
+
|
|
65
|
+
Common local runtime IDs and default URLs are:
|
|
66
|
+
|
|
67
|
+
| Runtime | Target runtime id | Example local URL |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| LM Studio | `lmstudio-native` | `http://127.0.0.1:1234` |
|
|
70
|
+
| Ollama | `ollama-native` | `http://127.0.0.1:11434` |
|
|
71
|
+
| llama.cpp server | `llamacpp` | `http://127.0.0.1:8080` |
|
|
72
|
+
| vLLM | `vllm` | `http://127.0.0.1:8000` |
|
|
73
|
+
| SGLang | `sglang` | `http://127.0.0.1:30000` |
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
Example registration:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
clio-coder configure \
|
|
80
|
+
--id local-lmstudio \
|
|
81
|
+
--runtime lmstudio-native \
|
|
82
|
+
--url http://127.0.0.1:1234 \
|
|
83
|
+
--model your-model-id \
|
|
84
|
+
--set-orchestrator \
|
|
85
|
+
--set-fleet-default
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Use the id you chose, probe it, then launch the TUI:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
clio-coder targets use local-lmstudio
|
|
92
|
+
clio-coder targets --probe
|
|
93
|
+
clio-coder models --target local-lmstudio
|
|
94
|
+
clio-coder
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Inside the TUI, verify the local surface with:
|
|
98
|
+
|
|
99
|
+
```text
|
|
100
|
+
/targets
|
|
101
|
+
/agents
|
|
102
|
+
/skill
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
The `/targets` overlay is the interactive target hub. It shows one compact row per configured target, streams live probe updates, and keeps target actions on the selected row. Use `Enter` to show details, `u` to use the target for chat, `f` to set the target as the fleet default, `b` to set an eligible target as the background-memory default, `c` to connect or authorize it, `r` to probe the selected target, and `R` to probe all targets.
|
|
106
|
+
|
|
107
|
+
Only add `--context-window <tokens>`, `--max-tokens <tokens>`, or `--reasoning true` when you have runtime/model-specific values that should override live probe results.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Settings shape
|
|
112
|
+
|
|
113
|
+
On disk, configured model targets live under `targets:`. The in-memory shape uses the same name; there is no separate internal vocabulary.
|
|
114
|
+
|
|
115
|
+
Terminology used in code and receipts:
|
|
116
|
+
|
|
117
|
+
| Term | Meaning |
|
|
118
|
+
| --- | --- |
|
|
119
|
+
| `RuntimeDescriptor` | Executable adapter, transport, or protocol implementation, for example `openai-codex`, `anthropic`, `openai-compat`, `llamacpp`, `claude-sdk`, or `claude-code`. |
|
|
120
|
+
| Target / `TargetDescriptor` | Persisted user-configured target plus runtime id, model defaults, auth metadata, and capability overrides. |
|
|
121
|
+
| Resolved target | Target spec combined with the runtime descriptor, model catalog/probe data, wire model id, and effective capabilities. |
|
|
122
|
+
| Orchestrator target | Main chat/print target. HTTP/native/pi-ai-backed. |
|
|
123
|
+
| Background target | Optional proactive-memory model target. Unset means deterministic rules-only memory. |
|
|
124
|
+
| Worker target | Fleet dispatch target. HTTP/native/pi-ai-backed, or one of the sanctioned subscription worker runtimes such as `claude-sdk`, `claude-code`, or `antigravity-code`. |
|
|
125
|
+
|
|
126
|
+
```yaml
|
|
127
|
+
version: 1
|
|
128
|
+
identity: clio
|
|
129
|
+
autonomy: auto-edit # read-only | suggest | auto-edit | full-auto (enforced at tool admission; the safety net applies at every level)
|
|
130
|
+
|
|
131
|
+
targets:
|
|
132
|
+
- id: local-lmstudio
|
|
133
|
+
runtime: lmstudio-native
|
|
134
|
+
url: http://127.0.0.1:1234
|
|
135
|
+
defaultModel: your-model-id
|
|
136
|
+
capabilities:
|
|
137
|
+
reasoning: true # optional; only if your model/runtime supports it
|
|
138
|
+
|
|
139
|
+
runtimePlugins: []
|
|
140
|
+
|
|
141
|
+
orchestrator:
|
|
142
|
+
target: local-lmstudio
|
|
143
|
+
model: your-model-id
|
|
144
|
+
thinkingLevel: off
|
|
145
|
+
|
|
146
|
+
# Optional proactive-memory model. Leave null for the zero-cost rules tier.
|
|
147
|
+
background:
|
|
148
|
+
target: null
|
|
149
|
+
model: null
|
|
150
|
+
thinkingLevel: off
|
|
151
|
+
|
|
152
|
+
memory:
|
|
153
|
+
intervention:
|
|
154
|
+
enabled: true
|
|
155
|
+
everyNTools: 10
|
|
156
|
+
windowSteps: 8
|
|
157
|
+
maxTokens: 400
|
|
158
|
+
timeoutMs: 180000 # shipped operator default in src/core/defaults.ts; library fallback in task-memory-policy.ts is 20000 ms
|
|
159
|
+
|
|
160
|
+
workers:
|
|
161
|
+
default:
|
|
162
|
+
target: local-lmstudio
|
|
163
|
+
model: your-model-id
|
|
164
|
+
thinkingLevel: off
|
|
165
|
+
profiles: {}
|
|
166
|
+
agentBindings: {}
|
|
167
|
+
maxRetries: 2
|
|
168
|
+
onPermission: deny
|
|
169
|
+
escalation:
|
|
170
|
+
timeoutMs: 120000
|
|
171
|
+
fallback: deny
|
|
172
|
+
resilienceCooldownMs: 15000
|
|
173
|
+
|
|
174
|
+
# Measured route selection stays shadow-only while these lists are empty.
|
|
175
|
+
routing:
|
|
176
|
+
activeRoles: [] # researcher | verifier | reviewer | judge
|
|
177
|
+
activePostures: [] # quality | balanced | latency | economy
|
|
178
|
+
agentAutomation:
|
|
179
|
+
# Exact pairs only; this never authorizes an agents-by-roles cross-product.
|
|
180
|
+
activeAgentRoles: []
|
|
181
|
+
|
|
182
|
+
scope: []
|
|
183
|
+
modelSelector:
|
|
184
|
+
favorites: []
|
|
185
|
+
recentLimit: 12
|
|
186
|
+
budget:
|
|
187
|
+
sessionCeilingUsd: 5
|
|
188
|
+
concurrency: auto
|
|
189
|
+
|
|
190
|
+
defaults:
|
|
191
|
+
maxTokens: 32768 # global output budget; clamped per model at request time
|
|
192
|
+
|
|
193
|
+
theme: default
|
|
194
|
+
terminal:
|
|
195
|
+
showTerminalProgress: false
|
|
196
|
+
outputVerbosity: default
|
|
197
|
+
skills:
|
|
198
|
+
trustProjectCompatRoots: false
|
|
199
|
+
delegation:
|
|
200
|
+
defaults:
|
|
201
|
+
connectTimeoutMs: 30000
|
|
202
|
+
turnTimeoutMs: 300000
|
|
203
|
+
permissionTimeoutMs: 120000
|
|
204
|
+
toolGovernance: clio-policy
|
|
205
|
+
agents: []
|
|
206
|
+
keybindings: {}
|
|
207
|
+
compaction:
|
|
208
|
+
auto: true
|
|
209
|
+
threshold: 0.8
|
|
210
|
+
excludeLastTurns: 6
|
|
211
|
+
# model: provider/summary-model-id
|
|
212
|
+
# systemPrompt: ~/.config/clio-coder/prompts/compaction.md
|
|
213
|
+
retry:
|
|
214
|
+
enabled: true
|
|
215
|
+
maxRetries: 3
|
|
216
|
+
baseDelayMs: 2000
|
|
217
|
+
maxDelayMs: 60000
|
|
218
|
+
guardrails:
|
|
219
|
+
turnToolCallBudget: 60
|
|
220
|
+
workerToolCallCap: 150
|
|
221
|
+
maxDispatchRuns: 1000
|
|
222
|
+
readMaxBytes: 51200
|
|
223
|
+
observationTurnBudgetBytes: 196608
|
|
224
|
+
internalDispatchTimeoutMs: 900000
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Target capability overrides may include `chat`, `tools`, `toolCallFormat`, `reasoning`, `thinkingFormat`, `structuredOutputs`, `vision`, `audio`, `embeddings`, `rerank`, `fim`, `contextWindow`, and `maxTokens`.
|
|
228
|
+
|
|
229
|
+
`defaults.maxTokens` is a global output budget requested for every turn (default `32768`). At request time it is always clamped down to the model's known max-output cap and the remaining context window, so a model that supports less automatically gets less and no per-model tuning is required. A per-target `capabilities.maxTokens` override still records the model's true cap; the request never exceeds it. Set `defaults.maxTokens: 0` to disable the global default and fall back to per-model caps only.
|
|
230
|
+
|
|
231
|
+
The setting `workers.maxRetries` controls the maximum number of automated retries for retryable failures during fleet dispatch. Setting this value to `0` disables retries entirely.
|
|
232
|
+
|
|
233
|
+
The setting `workers.onPermission` decides how noninteractive workers handle a tool call that asks for permission. It supports three modes:
|
|
234
|
+
- `deny`: Immediately returns a structured denial to the model, and the run continues.
|
|
235
|
+
- `fail`: Finalizes the run as failed, exiting the worker subprocess with exit code 3 ([WORKER_EXIT_PERMISSION_REQUIRED](../src/worker/spec-contract.ts)).
|
|
236
|
+
- `escalate`: Parks the tool call, emits a `clio_permission_escalated` event, and waits for an operator decision on standard input (`stdin`). If no operator decision is received within the configured `workers.escalation.timeoutMs` duration, it applies the fallback posture. If the worker is running headlessly (no operator attached) or under runtimes like `claude-sdk` that lack a native stdin park loop, the system collapses the `escalate` posture to the non-stall fallback posture immediately.
|
|
237
|
+
|
|
238
|
+
The `workers.escalation` block defines parameters for the escalation mode:
|
|
239
|
+
- `timeoutMs` (default `120000`): The wall-clock budget in milliseconds before the parked call applies the fallback.
|
|
240
|
+
- `fallback` (default `deny`): The fallback posture (`deny` or `fail`) applied upon timeout.
|
|
241
|
+
|
|
242
|
+
The setting `workers.resilienceCooldownMs` specifies the cooldown duration in milliseconds between retries to allow target recovery.
|
|
243
|
+
|
|
244
|
+
The `routing` block controls the two independent activation boundaries for measured dispatch. Joint target/model/runtime/node selection becomes active only when both the assignment's execution role and requested posture appear in `activeRoles` and `activePostures`; otherwise the same resolver records a shadow recommendation without changing execution. Active mode also requires the route-readiness report to pass and fails closed when no candidate is ready. Manual pins and `failover: none` remain exact in every mode.
|
|
245
|
+
|
|
246
|
+
Agent automation is separately shadowed. Each `routing.agentAutomation.activeAgentRoles` item must be an exact `{agentId, executionRole}` pair, for example `{agentId: scout, executionRole: researcher}`. An `agent: auto` request may change agents only for a listed pair whose per-agent, per-role readiness report passes. Hard constraints eliminate candidates before scoring, and a Scout split or role transition carries typed bounded subtasks through coordinator-owned authority rather than silently broadening the original assignment.
|
|
247
|
+
|
|
248
|
+
The `guardrails` section holds the numeric backstops that bound runaway agent behavior. `turnToolCallBudget` (default `60`) is the orchestrator's per-turn soft tool-call budget: crossing it blocks every further call in the turn with a stop-and-summarize directive, and a hard ceiling 15 calls above it interrupts the turn outright. Separately, an identical-call loop guard trips when the same tool is called with identical arguments three times inside a 30s window; the first two blocks feed the model a strategy-change directive (and, when the looped call already returned a successful result earlier in the run, point it at that result instead), and reaching the second block per turn locks tool use for the rest of that turn so the model answers from what it already gathered, rather than cancelling a turn that may already hold the answer. Only a bounded backstop (two further tool calls after the lockout) falls back to the hard stop. This lockout is an orchestrator behavior (interactive, headless, and ACP alike). Dispatched workers use an agent-owned admitted-call phase for graceful synthesis and retain `workerToolCallCap` (default `150`) as the independent lifetime ceiling for one worker run. The cap bounds calls that execute: an attempt denied by policy or permission posture spends it, but one the harness itself refused as steering (a reserve-window block, a synthesis-lockout denial) never ran and never does. It is sized so the recipe's own budget is what normally binds, since admission resolves `min(declared, cap)` and only the recipe knows the shape of its job. Executed calls beyond it terminate the worker with `workerToolCallCap reached (...)` in receipt diagnostics; a model that keeps calling after a lockout instead ends on the bounded per-round synthesis backstop. `maxDispatchRuns` (default `1000`) caps dispatch run-ledger retention. `readMaxBytes` (default `51200`) caps one read-tool call, and `observationTurnBudgetBytes` (default `196608`) is the shared per-turn byte pool across all observation-producing tools. `internalDispatchTimeoutMs` (default `900000`, fifteen minutes) is the wall-clock cap for one internal generator dispatch (the wiki documenter and the bootstrap scout); it exists because a model that keeps streaming without finishing can spend no new tool attempts while satisfying the heartbeat watchdog indefinitely, and on timeout the run is aborted with the timeout cause recorded in its receipt. Each value also has a per-process env override intended for CI and one-off experiments (see [environment-variables.md](environment-variables.md)); the settings file is the durable home.
|
|
249
|
+
|
|
250
|
+
Agent recipe budgets define a normal admitted-call phase inside `workerToolCallCap`; they do not replace it. A declared phase boundary is clamped down to the cap, and when the two are equal the last call may complete and the graceful synthesis transition happens without requiring an over-cap call. The recipe's `readReserve` is the tail of that phase. It admits canonical `read` plus whatever mutation tools the agent was actually granted, because the reserve exists to end broad discovery rather than to stop an agent from delivering: a writer whose product is files has to be able to write them in its last calls. An agent with no mutation tools keeps a read-only reserve and the request-level `require_tool(read)` lock. The reserve becomes zero when `read` is absent from the admitted schema surface, and never installs a nonexistent read requirement. Calls the reserve refuses are steering rather than work: they neither run nor spend the cap, and a model that keeps calling discovery tools there reaches the same bounded synthesis lockout a spent budget ends in.
|
|
251
|
+
|
|
252
|
+
### Local model co-residency and scouts
|
|
253
|
+
|
|
254
|
+
Clio can use a small scout model beside a larger coding model when your local
|
|
255
|
+
runtime supports multiple resident instances. This is an operator capacity
|
|
256
|
+
decision, not a prompt setting. The safe rule is: after the main resident model
|
|
257
|
+
is loaded, any additional scout or worker model must still fit in the remaining
|
|
258
|
+
GPU memory together with its KV cache, context window, and parallel slots. If
|
|
259
|
+
the runtime spills weights or cache into CPU RAM, generation will be much
|
|
260
|
+
slower even though the target still responds.
|
|
261
|
+
|
|
262
|
+
For llama.cpp router targets, Clio observes `/v1/models` and `/props`. It can
|
|
263
|
+
tell which models are loaded and whether the resident count is within the
|
|
264
|
+
router's `max_instances`, so an allowed two-model setup is reported as an
|
|
265
|
+
informational co-residency notice. The router response does not expose free
|
|
266
|
+
VRAM or per-model loaded footprint, so Clio cannot prove the loaded set fits.
|
|
267
|
+
Use host tools such as `nvidia-smi`, `rocm-smi`, Vulkan memory telemetry, or
|
|
268
|
+
the runtime's own dashboard to confirm headroom after loading the main coding
|
|
269
|
+
model and the scout model. Lower `--ctx-size`, KV cache precision, parallel
|
|
270
|
+
slots, or unload the scout model if memory pressure pushes work into CPU RAM.
|
|
271
|
+
|
|
272
|
+
Workers dispatched to separate nodes or separate targets have their own memory
|
|
273
|
+
budgets. Workers routed to the same local target share that target's remaining
|
|
274
|
+
VRAM with the orchestrator and scout model, so the same co-residency rule
|
|
275
|
+
applies.
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
---
|
|
279
|
+
|
|
280
|
+
## Strict validation and lifecycle repair
|
|
281
|
+
|
|
282
|
+
Settings validation is strict. Unknown keys and type violations report exact
|
|
283
|
+
paths and stop startup so stale configuration does not silently change runtime
|
|
284
|
+
behavior.
|
|
285
|
+
|
|
286
|
+
Plain `clio-coder doctor` is read-only. `clio-coder doctor --fix` creates missing
|
|
287
|
+
directories and template files, repairs credential permissions, and refreshes
|
|
288
|
+
install metadata. It validates `settings.yaml` directly against the current
|
|
289
|
+
schema but never rewrites removed keys or migrates an old settings shape. Any
|
|
290
|
+
unknown or retired key remains a validation error for the operator to edit
|
|
291
|
+
deliberately.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Live routing vs saved defaults
|
|
296
|
+
|
|
297
|
+
The routing keys in `settings.yaml` (`orchestrator.*`, `background.*`, `workers.default.*`, `scope`) are **defaults**, not a live control surface. Each interactive session seeds its routing from them at launch and owns it from then on:
|
|
298
|
+
|
|
299
|
+
- Interactive changes (`/model`, Alt+L, `/settings`, Shift+Tab, `/thinking`, Alt+J / Alt+K, `/scoped-models`) apply to the current session immediately and are written back as the defaults for sessions launched later.
|
|
300
|
+
- Writes from other processes, such as a second Clio session, `clio-coder targets use`, `clio-coder configure`, or a manual edit, update the defaults and the shared target catalog. These writes never redirect a running session's chat or fleet routing. The running session shows a notice when the saved defaults diverge from its active routing.
|
|
301
|
+
- Non-routing settings (theme, keybindings, autonomy level, retry, compaction, target catalog entries) still hot-reload into running sessions as before.
|
|
302
|
+
- `/resume` and `/new` switch sessions, not routing: the terminal keeps its active target/model/thinking across session switches.
|
|
303
|
+
|
|
304
|
+
This is what makes several concurrent Clio terminals safe: each one routes through its own state, and `settings.yaml` only decides where the *next* session starts.
|
|
305
|
+
|
|
306
|
+
Supporting mechanics:
|
|
307
|
+
|
|
308
|
+
- **The `/settings` Center tracks live state.** Every editable row re-derives from the session's effective settings after each committed edit and whenever the shared snapshot reloads while the Center is open. Changing `orchestrator.target` rebases `orchestrator.model` on the new target's default model, matching Alt+L and `clio-coder targets use`, and the `orchestrator.thinkingLevel` row immediately offers the levels the new model supports. Cursor position and any open submenu are preserved across refreshes.
|
|
309
|
+
- **Saved-default writes are serialized across processes.** Every settings writer (interactive write-throughs, `clio-coder targets`, `clio-coder configure`) performs its read-modify-write under an advisory lock file (`settings.yaml.lock`) and lands the result via an atomic temp-file + rename. Two processes saving defaults at the same time can no longer drop each other's patches, readers never block and never see partial files, and a lock left behind by a dead process is taken over after a few seconds.
|
|
310
|
+
- **Recently selected models are runtime state, not configuration.** They live in the state dir (`recent-models.json`), so an Alt+L pick never rewrites `settings.yaml` and never pings the config watcher in other running sessions. Settings validation is strict: a `state.recentModels` key in `settings.yaml` is an unknown-key error during normal startup and must be removed deliberately. `modelSelector.favorites` stays in `settings.yaml` because favorites are deliberate user configuration.
|
|
311
|
+
- **ACP sessions get the notices through the session ledger.** Sessions served over the Agent Client Protocol (`clio-coder` in ACP mode) have the same routing isolation, but ACP v1 offers no agent-initiated advisory channel: its `session/update` union only carries prompt-turn content, and out-of-turn updates would break strict clients. The external-divergence and target-removed notices are therefore recorded as `custom` session-ledger entries (`customType: "clio.routing-notice"`), visible to `/resume` and session tooling.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Settings Center
|
|
316
|
+
|
|
317
|
+
Open `/settings` in the TUI to edit session-visible defaults in a full-screen Center. Wide terminals show sections on the left and the selected section's rows on the right. Narrow terminals stack the same sections inline. Each row shows a human label, a dim config path, the current value, and a bottom description with the edit affordance.
|
|
318
|
+
|
|
319
|
+
Targets are managed in `/targets`; keybindings are documented in `/help`.
|
|
320
|
+
|
|
321
|
+
| Section | Editable rows |
|
|
322
|
+
| --- | --- |
|
|
323
|
+
| Autonomy & Safety | Autonomy level, Worker permission asks, Delegation governance, Safety net (read-only) |
|
|
324
|
+
| Orchestrator | Thinking level, Target, Model |
|
|
325
|
+
| Fleet | Default target, Default model |
|
|
326
|
+
| Budget | Session ceiling (USD), Model cycle set |
|
|
327
|
+
| Compaction | Auto-compact, Protected recent turns, Compaction threshold |
|
|
328
|
+
| Retry | Retry transient errors, Max retries, Base delay (ms), Max delay (ms) |
|
|
329
|
+
| Terminal | Terminal progress badges |
|
|
330
|
+
|
|
331
|
+
Label to config path mapping:
|
|
332
|
+
|
|
333
|
+
| Label | Config path |
|
|
334
|
+
| --- | --- |
|
|
335
|
+
| Autonomy level | `autonomy` |
|
|
336
|
+
| Worker permission asks | `workers.onPermission` |
|
|
337
|
+
| Delegation governance | `delegation.defaults.toolGovernance` |
|
|
338
|
+
| Thinking level | `orchestrator.thinkingLevel` |
|
|
339
|
+
| Target | `orchestrator.target` |
|
|
340
|
+
| Model | `orchestrator.model` |
|
|
341
|
+
| Default target | `workers.default.target` |
|
|
342
|
+
| Default model | `workers.default.model` |
|
|
343
|
+
| Session ceiling (USD) | `budget.sessionCeilingUsd` |
|
|
344
|
+
| Model cycle set | `scope` |
|
|
345
|
+
| Auto-compact | `compaction.auto` |
|
|
346
|
+
| Protected recent turns | `compaction.excludeLastTurns` |
|
|
347
|
+
| Compaction threshold | `compaction.threshold` |
|
|
348
|
+
| Retry transient errors | `retry.enabled` |
|
|
349
|
+
| Max retries | `retry.maxRetries` |
|
|
350
|
+
| Base delay (ms) | `retry.baseDelayMs` |
|
|
351
|
+
| Max delay (ms) | `retry.maxDelayMs` |
|
|
352
|
+
| Terminal progress badges | `terminal.showTerminalProgress` |
|
|
353
|
+
| Transcript output detail | `terminal.outputVerbosity` (`minimal`, `default`, or `verbose`) |
|
|
354
|
+
|
|
355
|
+
---
|
|
356
|
+
|
|
357
|
+
## Settings inventory
|
|
358
|
+
|
|
359
|
+
Every key `settings.yaml` accepts, with its shipped default, what validation admits, and when a change takes effect. `DEFAULT_SETTINGS` in `src/core/defaults.ts` is the one place a default is written; validation lives in `src/core/config.ts`. A key absent from this table is an unknown-key error, not a silently ignored typo.
|
|
360
|
+
|
|
361
|
+
"When it applies" has four values. **Immediately** means a running session picks the change up from the config watcher. **Next turn** means the running turn finishes on the old value. **Next session** means `settings.yaml` is a saved default that a launched session copies and then owns, so writing it never redirects a session already running. **Restart** means the process reads it once at boot.
|
|
362
|
+
|
|
363
|
+
### Routing defaults
|
|
364
|
+
|
|
365
|
+
These are saved defaults, not a live control surface. See [Live routing vs saved defaults](#live-routing-vs-saved-defaults).
|
|
366
|
+
|
|
367
|
+
| Key | Default | Validation | When it applies |
|
|
368
|
+
| --- | --- | --- | --- |
|
|
369
|
+
| `orchestrator.target` | `null` | a target id present in `targets` | next session |
|
|
370
|
+
| `orchestrator.model` | `null` | string | next session |
|
|
371
|
+
| `orchestrator.thinkingLevel` | `off` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`; further narrowed to what the resolved model supports | next session |
|
|
372
|
+
| `background.target` | `null` | a target id present in `targets` | next session |
|
|
373
|
+
| `background.model` | `null` | string | next session |
|
|
374
|
+
| `background.thinkingLevel` | `off` | as above | next session |
|
|
375
|
+
| `workers.default.target` | `null` | a target id present in `targets` | next session |
|
|
376
|
+
| `workers.default.model` | `null` | string | next session |
|
|
377
|
+
| `workers.default.thinkingLevel` | `off` | as above | next session |
|
|
378
|
+
| `scope` | `[]` | list of strings | next session |
|
|
379
|
+
|
|
380
|
+
### Safety and worker policy
|
|
381
|
+
|
|
382
|
+
| Key | Default | Validation | When it applies |
|
|
383
|
+
| --- | --- | --- | --- |
|
|
384
|
+
| `autonomy` | `auto-edit` | `read-only`, `suggest`, `auto-edit`, `full-auto` | immediately |
|
|
385
|
+
| `workers.onPermission` | `deny` | `deny`, `escalate` | next dispatch |
|
|
386
|
+
| `workers.escalation.timeoutMs` | `120000` | integer ≥ 1 | next dispatch |
|
|
387
|
+
| `workers.escalation.fallback` | `deny` | `deny`, `fail` | next dispatch |
|
|
388
|
+
| `workers.maxRetries` | `2` | integer ≥ 0 | next dispatch |
|
|
389
|
+
| `workers.resilienceCooldownMs` | `15000` | integer ≥ 0 | next dispatch |
|
|
390
|
+
| `workers.profiles` | `{}` | map of profile name to a target/model/thinking choice | next dispatch |
|
|
391
|
+
| `workers.agentBindings` | `{}` | map of agent id to a key present in `workers.profiles` | next dispatch |
|
|
392
|
+
| `skills.trustProjectCompatRoots` | `false` | boolean | restart |
|
|
393
|
+
|
|
394
|
+
### Guardrails
|
|
395
|
+
|
|
396
|
+
Every one of these has an environment override for a single process; see [environment-variables.md](environment-variables.md). Resolution is env, then settings, then the built-in default.
|
|
397
|
+
|
|
398
|
+
| Key | Default | Validation | When it applies |
|
|
399
|
+
| --- | --- | --- | --- |
|
|
400
|
+
| `guardrails.turnToolCallBudget` | `60` | integer ≥ 1 | next turn |
|
|
401
|
+
| `guardrails.workerToolCallCap` | `150` | integer ≥ 1 | next dispatch |
|
|
402
|
+
| `guardrails.maxDispatchRuns` | `1000` | integer ≥ 1 | next dispatch |
|
|
403
|
+
| `guardrails.readMaxBytes` | `51200` | integer ≥ 1, floored at 1024 by the tool | next turn |
|
|
404
|
+
| `guardrails.observationTurnBudgetBytes` | `196608` | integer ≥ 1 | next turn |
|
|
405
|
+
| `guardrails.internalDispatchTimeoutMs` | `900000` | integer ≥ 1 | next dispatch |
|
|
406
|
+
|
|
407
|
+
### Context and cost
|
|
408
|
+
|
|
409
|
+
| Key | Default | Validation | When it applies |
|
|
410
|
+
| --- | --- | --- | --- |
|
|
411
|
+
| `compaction.auto` | `true` | boolean | next turn |
|
|
412
|
+
| `compaction.threshold` | `0.8` | number in 0 to 1 | next turn |
|
|
413
|
+
| `compaction.excludeLastTurns` | `6` | integer ≥ 1 | next turn |
|
|
414
|
+
| `defaults.maxTokens` | `32768` | integer ≥ 1 | next turn |
|
|
415
|
+
| `budget.sessionCeilingUsd` | `5` | number ≥ 0 | immediately |
|
|
416
|
+
| `budget.concurrency` | `auto` | `auto` or integer ≥ 1 | next dispatch |
|
|
417
|
+
| `retry.enabled` | `true` | boolean | next turn |
|
|
418
|
+
| `retry.maxRetries` | `3` | integer ≥ 0 | next turn |
|
|
419
|
+
| `retry.baseDelayMs` | `2000` | integer ≥ 0 | next turn |
|
|
420
|
+
| `retry.maxDelayMs` | `60000` | integer ≥ 0 | next turn |
|
|
421
|
+
|
|
422
|
+
### Proactive memory
|
|
423
|
+
|
|
424
|
+
| Key | Default | Validation | When it applies |
|
|
425
|
+
| --- | --- | --- | --- |
|
|
426
|
+
| `memory.intervention.enabled` | `true` | boolean | next turn |
|
|
427
|
+
| `memory.intervention.everyNTools` | `10` | integer ≥ 2 | next turn |
|
|
428
|
+
| `memory.intervention.windowSteps` | `8` | integer ≥ 1 | next turn |
|
|
429
|
+
| `memory.intervention.maxTokens` | `400` | integer ≥ 1 | next turn |
|
|
430
|
+
| `memory.intervention.timeoutMs` | `180000` | integer ≥ 1 | next turn |
|
|
431
|
+
|
|
432
|
+
### Delegation
|
|
433
|
+
|
|
434
|
+
| Key | Default | Validation | When it applies |
|
|
435
|
+
| --- | --- | --- | --- |
|
|
436
|
+
| `delegation.agents` | `[]` | list of agent definitions | next dispatch |
|
|
437
|
+
| `delegation.defaults.connectTimeoutMs` | `30000` | integer ≥ 1 | next dispatch |
|
|
438
|
+
| `delegation.defaults.turnTimeoutMs` | `300000` | integer ≥ 1 | next dispatch |
|
|
439
|
+
| `delegation.defaults.permissionTimeoutMs` | `120000` | integer ≥ 1 | next dispatch |
|
|
440
|
+
| `delegation.defaults.toolGovernance` | `clio-policy` | `clio-policy`, `runtime-native` | next dispatch |
|
|
441
|
+
|
|
442
|
+
### Interface
|
|
443
|
+
|
|
444
|
+
| Key | Default | Validation | When it applies |
|
|
445
|
+
| --- | --- | --- | --- |
|
|
446
|
+
| `theme` | `default` | string naming a registered theme | immediately |
|
|
447
|
+
| `terminal.showTerminalProgress` | `false` | boolean | immediately |
|
|
448
|
+
| `terminal.outputVerbosity` | `default` | `minimal`, `default`, `verbose` | immediately |
|
|
449
|
+
| `modelSelector.favorites` | `[]` | list of strings | immediately |
|
|
450
|
+
| `modelSelector.recentLimit` | `12` | integer ≥ 1 | immediately |
|
|
451
|
+
| `keybindings` | `{}` | map of binding id to a key string or list of them | restart |
|
|
452
|
+
|
|
453
|
+
Recently selected models are runtime state and live in `recent-models.json` under the state directory, not here. A `state.recentModels` key in `settings.yaml` is an unknown-key error.
|
|
454
|
+
|
|
455
|
+
### Structural and catalog keys
|
|
456
|
+
|
|
457
|
+
| Key | Default | Validation | When it applies |
|
|
458
|
+
| --- | --- | --- | --- |
|
|
459
|
+
| `version` | `1` | integer, currently `1` only | restart |
|
|
460
|
+
| `identity` | `clio` | string | restart |
|
|
461
|
+
| `targets` | `[]` | list of target descriptors, each with a unique id and a registered runtime | immediately for the catalog, next session for routing |
|
|
462
|
+
| `runtimePlugins` | `[]` | list of plugin descriptors | restart |
|
|
463
|
+
| `fleet.nodes` | `[]` | list of node descriptors | next dispatch |
|
|
464
|
+
| `routing.activeRoles` | `[]` | list of strings; empty keeps measured routing shadow-only | next dispatch |
|
|
465
|
+
| `routing.activePostures` | `[]` | list of strings | next dispatch |
|
|
466
|
+
| `routing.agentAutomation.activeAgentRoles` | `[]` | list of strings | next dispatch |
|
|
467
|
+
|
|
468
|
+
---
|
|
469
|
+
|
|
470
|
+
## Configure targets
|
|
471
|
+
|
|
472
|
+
Interactive wizard:
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
clio-coder configure
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
List runtimes:
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
clio-coder configure --list
|
|
482
|
+
clio-coder configure --list --all
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
`clio-coder configure --list` outputs every registered runtime across all categories (local, cloud, subscription, worker-only) along with its auth type and catalog status. For catalog-backed runtimes, it reports the catalog size (for example, `models=38 in pi-ai catalog`). It also includes a reference to `clio-coder auth list` for runtimes that require authentication.
|
|
486
|
+
|
|
487
|
+
When configuring a catalog-backed runtime non-interactively, `clio-coder configure` requires the `--model` flag to specify an explicit model from the catalog; it will not silently seed a generic default model.
|
|
488
|
+
|
|
489
|
+
Register non-interactively:
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
clio-coder configure \
|
|
493
|
+
--id local-llamacpp \
|
|
494
|
+
--runtime llamacpp \
|
|
495
|
+
--url http://127.0.0.1:8080 \
|
|
496
|
+
--model your-model-id \
|
|
497
|
+
--set-orchestrator \
|
|
498
|
+
--set-fleet-default
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
Add capability overrides such as `--context-window <tokens>`, `--max-tokens <tokens>`, or `--reasoning true` only when live probes cannot infer the right values for your runtime/model.
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
## Subscription-based Targets and Runtimes
|
|
505
|
+
|
|
506
|
+
Clio supports running on AI subscriptions rather than API keys, both for orchestrators and workers:
|
|
507
|
+
|
|
508
|
+
### 1. OAuth Subscription Runtimes (Orchestrator + Worker)
|
|
509
|
+
|
|
510
|
+
These runtimes use your personal subscription credentials via OAuth, minting tokens to power standard HTTP execution. They are eligible to run as both the main orchestrator (chat/print) and worker targets.
|
|
511
|
+
|
|
512
|
+
- **`openai-codex`**: Powers the orchestrator or workers using a ChatGPT Plus/Pro subscription.
|
|
513
|
+
- **`anthropic-max`**: Powers the orchestrator or workers using a Claude Pro/Max subscription.
|
|
514
|
+
- *Terms of Service Caveat:* During login (`clio-coder auth login anthropic-max`), Clio displays this warning notice:
|
|
515
|
+
> [!WARNING]
|
|
516
|
+
> Connects with your Claude Pro/Max subscription via OAuth (the same path Claude Code uses). Using subscription credentials outside Anthropic's first-party apps may not align with their terms of service; enable at your own discretion.
|
|
517
|
+
|
|
518
|
+
**Login and Configuration Examples:**
|
|
519
|
+
```bash
|
|
520
|
+
# Authenticate
|
|
521
|
+
clio-coder auth login openai-codex
|
|
522
|
+
clio-coder auth login anthropic-max
|
|
523
|
+
|
|
524
|
+
# Configure orchestrator targets
|
|
525
|
+
clio-coder configure --id chatgpt-sub --runtime openai-codex --model your-codex-model --set-orchestrator
|
|
526
|
+
clio-coder configure --id claude-sub --runtime anthropic-max --model claude-sonnet-5 --set-orchestrator
|
|
527
|
+
```
|
|
528
|
+
|
|
529
|
+
Choose model ids from `clio-coder configure --list` or from `clio-coder models --target <id>` after login.
|
|
530
|
+
|
|
531
|
+
### 2. ALCF Globus Runtime (Orchestrator + Worker)
|
|
532
|
+
|
|
533
|
+
The `alcf` runtime targets the inference gateway of the [Argonne Leadership Computing Facility (ALCF)](https://www.alcf.anl.gov), specifically accessing the Sophia and Metis clusters. Sophia runs vLLM on NVIDIA A100 GPU nodes while Metis serves model requests using SambaNova SN40L hardware. The authentication flow uses [Globus Auth](https://www.globus.org) PKCE OAuth. It is a scientific cloud target rather than a consumer subscription, but it uses the same `clio-coder auth login <runtime>` workflow:
|
|
534
|
+
|
|
535
|
+
|
|
536
|
+
```bash
|
|
537
|
+
clio-coder auth login alcf
|
|
538
|
+
|
|
539
|
+
clio-coder configure \
|
|
540
|
+
--id alcf-sophia \
|
|
541
|
+
--runtime alcf \
|
|
542
|
+
--url https://inference-api.alcf.anl.gov/resource_server/sophia/vllm/v1 \
|
|
543
|
+
--model openai/gpt-oss-120b \
|
|
544
|
+
--max-tokens 4096
|
|
545
|
+
|
|
546
|
+
clio-coder configure \
|
|
547
|
+
--id alcf-metis \
|
|
548
|
+
--runtime alcf \
|
|
549
|
+
--url https://inference-api.alcf.anl.gov/resource_server/metis/api/v1 \
|
|
550
|
+
--model gpt-oss-120b \
|
|
551
|
+
--max-tokens 4096
|
|
552
|
+
```
|
|
553
|
+
|
|
554
|
+
See [alcf-provider.md](alcf-provider.md) for the Globus login and ALCF discovery
|
|
555
|
+
details.
|
|
556
|
+
|
|
557
|
+
### 3. Sanctioned Claude Code Worker Runtimes (Worker-Only)
|
|
558
|
+
|
|
559
|
+
These runtimes drive your local `claude` installation to execute subagent tasks. They are worker-only targets: they can be selected for dispatch via fleet defaults or profiles, but chat/print orchestration requires an HTTP target (like `anthropic-max` or `openai-codex`). They rely on your authenticated `claude` CLI and store no credentials in Clio.
|
|
560
|
+
|
|
561
|
+
- **`claude-sdk`** (Claude Code SDK): The main worker runtime, usable alongside Clio's native subagent workers (e.g. `llama.cpp` or LM Studio fleet). It integrates with the official [@anthropic-ai/claude-agent-sdk](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) library and is the **strong safety path** because it routes every tool execution through Clio's safety contract and autonomy matrix.
|
|
562
|
+
- **`claude-code`**: Runs the CLI tool `claude -p --output-format stream-json` as a subprocess. Since the subprocess has no direct callback hook, it is restricted to command-line permission-mode gating.
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
**Configuration Examples:**
|
|
566
|
+
```bash
|
|
567
|
+
# 1. Authenticate outside Clio using the official CLI
|
|
568
|
+
claude auth login
|
|
569
|
+
|
|
570
|
+
# 2. Configure the SDK worker target (enforced safety)
|
|
571
|
+
clio-coder configure --id claude-sdk-worker --runtime claude-sdk --model sonnet --set-fleet-default
|
|
572
|
+
|
|
573
|
+
# 3. Configure the subprocess worker target (advisory/permission-mode gating)
|
|
574
|
+
clio-coder configure --id claude-code-worker --runtime claude-code --model sonnet
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
### 4. Claude Code over ACP (Delegation-Only)
|
|
578
|
+
|
|
579
|
+
You can drive Claude Code as an external delegation agent over the Agent Client Protocol (ACP). This relies on the Zed `@zed-industries/claude-code-acp` adapter to run over stdio under your existing Claude Code subscription.
|
|
580
|
+
- **Advisory Gating:** Under ACP, gating is **advisory** because Claude self-governs its tools; prefer `claude-sdk` for **enforced** per-tool safety where Clio's safety net intercepts every action class.
|
|
581
|
+
- **Configuration Recipe:** Configure by adding a delegation agent in `settings.yaml` (a commented recipe is included by default):
|
|
582
|
+
```yaml
|
|
583
|
+
delegation:
|
|
584
|
+
agents:
|
|
585
|
+
- id: claude-code
|
|
586
|
+
command: npx
|
|
587
|
+
args: ["-y", "@zed-industries/claude-code-acp"]
|
|
588
|
+
toolGovernance: clio-policy
|
|
589
|
+
```
|
|
590
|
+
Then invoke it using `/delegate claude-code <task>`.
|
|
591
|
+
|
|
592
|
+
### 5. Google Antigravity CLI Runtime (Worker-Only)
|
|
593
|
+
|
|
594
|
+
The `antigravity-code` runtime drives your local Google Antigravity CLI (`agy`) installation to execute subagent tasks. It runs the CLI as a subprocess using the `agy --print` command and maps Clio autonomy levels onto the CLI's permission flags.
|
|
595
|
+
|
|
596
|
+
Google Antigravity supports a context window of up to 1,000,000 tokens and is suitable for large-context codebase reasoning. Because `agy` emits plain text without structured events, Clio cannot perform fine-grained tool call interception. Gating is applied coarsely: read-only runs pass both `--mode plan` (the no-change agent posture) and `--sandbox` (terminal restrictions). Full-auto passes `--dangerously-skip-permissions` only when the environment variable `CLIO_CODER_ALLOW_EXTERNAL_FULL_ACCESS=1` is explicitly set.
|
|
597
|
+
|
|
598
|
+
Configured targets use your existing local `agy` login and credentials. Supported model names include `Gemini 3.5 Flash (High)` as the default tier, `Gemini 3.5 Flash (Medium)`, `Gemini 3.5 Flash (Low)`, `Gemini 3.1 Pro (High)`, `Gemini 3.1 Pro (Low)`, `Claude Sonnet 4.6 (Thinking)`, `Claude Opus 4.6 (Thinking)`, and `GPT-OSS 120B (Medium)`.
|
|
599
|
+
|
|
600
|
+
**Configuration Example:**
|
|
601
|
+
```bash
|
|
602
|
+
clio-coder configure --id agy-worker --runtime antigravity-code --model "Gemini 3.5 Flash (High)"
|
|
603
|
+
```
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
|
|
607
|
+
Useful flags:
|
|
608
|
+
|
|
609
|
+
| Flag | Meaning |
|
|
610
|
+
| --- | --- |
|
|
611
|
+
| `--id <targetId>` | Stable target id. |
|
|
612
|
+
| `--runtime <runtimeId>` | Runtime descriptor id. |
|
|
613
|
+
| `--url <host>` | Base URL for HTTP runtimes. Missing schemes default to `http://`; some runtimes get default ports. Give the server root or its `/v1` mount point; both name the same target, because runtimes whose request paths already carry `/v1` reduce the URL to the root before using it. |
|
|
614
|
+
| `--model <wireModelId>` | Target default wire model id. |
|
|
615
|
+
| `--orchestrator-model <id>` | Model to save for chat default. |
|
|
616
|
+
| `--fleet-model <id>` | Model to save for fleet default. |
|
|
617
|
+
| `--agent-profile <name>` | Save this target/model as a named fleet profile. |
|
|
618
|
+
| `--agent-profile-model <id>` | Model to save for the named fleet profile. |
|
|
619
|
+
| `--api-key-env <VAR>` | Read API key from the environment at call time. |
|
|
620
|
+
| `--api-key <literal>` | Store an API key in `credentials.yaml`. |
|
|
621
|
+
| `--force` | Allow model/capability choices outside the local catalog guardrails. |
|
|
622
|
+
| `--gateway` | Mark target as a gateway. |
|
|
623
|
+
| `--lifecycle <user-managed|clio-managed>` | Resident model lifecycle policy. An explicit `user-managed` makes Clio observe-only on this target (never load/unload models); unset means Clio manages residency. |
|
|
624
|
+
| `--set-orchestrator` | Use this target as the chat default. |
|
|
625
|
+
| `--set-fleet-default` | Use this target as the fleet default. |
|
|
626
|
+
| `--context-window <N>` | Override the target context-window capability. |
|
|
627
|
+
| `--max-tokens <N>` | Override the target output-token capability. |
|
|
628
|
+
| `--reasoning <true|false>` | Override the target reasoning capability. |
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
## Target management
|
|
633
|
+
|
|
634
|
+
```bash
|
|
635
|
+
clio-coder targets [--json] [--probe] [--target <id>]
|
|
636
|
+
clio-coder targets add [configure flags]
|
|
637
|
+
clio-coder targets use <id> [--model <id>] [--orchestrator-model <id>] [--background-model <id>]
|
|
638
|
+
[--fleet-target <id>] [--fleet-model <id>]
|
|
639
|
+
clio-coder targets fleet [--json]
|
|
640
|
+
clio-coder targets profile list [--json]
|
|
641
|
+
clio-coder targets profile set <name> <id> [--model <id>] [--thinking <level>]
|
|
642
|
+
clio-coder targets profile <name> <id> [--model <id>] [--thinking <level>]
|
|
643
|
+
clio-coder targets profile remove <name> [--force]
|
|
644
|
+
clio-coder targets profile rename <old> <new>
|
|
645
|
+
clio-coder targets profile bind <agentId> <profileName>
|
|
646
|
+
clio-coder targets profile unbind <agentId>
|
|
647
|
+
clio-coder targets profile bindings [--json]
|
|
648
|
+
clio-coder targets convert <id> --runtime <runtimeId>
|
|
649
|
+
clio-coder targets remove <id>
|
|
650
|
+
clio-coder targets rename <old> <new>
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
`clio-coder targets use <id>` sets the orchestrator target. It refuses any target whose runtime is not a registered HTTP/native runtime because the selected target must be valid for chat.
|
|
654
|
+
|
|
655
|
+
Without `--fleet-target` the default fleet target follows the orchestrator, which is the single-node case. Pass `--fleet-target <id>` to keep them apart when one node orchestrates and another runs the fleet. The fleet target is validated for fleet dispatch through the same check a fleet profile uses, so it can be a worker-only runtime such as `claude-sdk`, `claude-code`, or `antigravity-code`. Its model defaults to that target's own default rather than the orchestrator's, because a model id resolved against one target means nothing on another; `--fleet-model <id>` names it explicitly. `clio-coder configure --set-fleet-default` and `clio-coder targets profile` remain the routes for per-agent fleet routing.
|
|
656
|
+
|
|
657
|
+
`--worker-target` and `--worker-model` are accepted as aliases of `--fleet-target` and `--fleet-model`, carried over from before the worker/fleet rename.
|
|
658
|
+
|
|
659
|
+
### Target-Profile Subcommands
|
|
660
|
+
|
|
661
|
+
The command `clio-coder targets profile` supports several subcommands to manage fleet worker profiles and agent bindings:
|
|
662
|
+
|
|
663
|
+
- **list**: Show configured fleet profiles. Use `clio-coder targets profile list [--json]` to output details in JSON format.
|
|
664
|
+
- **set**: Create or update a named fleet profile. Use `clio-coder targets profile set <name> <id> [--model <id>] [--thinking <level>]`; the compatibility form `clio-coder targets profile <name> <id> ...` is also accepted.
|
|
665
|
+
- **remove**: Remove a profile from settings. Use `clio-coder targets profile remove <name> [--force]`. The `--force` flag is required if the profile has active agent bindings.
|
|
666
|
+
- **rename**: Rename a fleet profile. Use `clio-coder targets profile rename <old> <new>`. Active agent bindings are updated to point to the new profile name automatically.
|
|
667
|
+
- **bind**: Bind an agent to a fleet profile. Use `clio-coder targets profile bind <agentId> <profileName>`. Active ACP delegation agents are rejected.
|
|
668
|
+
- **unbind**: Unbind an agent from its profile. Use `clio-coder targets profile unbind <agentId>`.
|
|
669
|
+
- **bindings**: List active agent-to-profile bindings. Use `clio-coder targets profile bindings [--json]` to output details in JSON format.
|
|
670
|
+
|
|
671
|
+
Inside the TUI, `/targets` is the target management surface. The hub lists health, auth, runtime, model, capabilities, ready or unavailable reason, URL, and discovered models. Press `u` on a row to switch the active orchestrator target; the model is rebased to that target's default, matching `/settings` and `clio-coder targets use`. Press `f` to set the selected target as the fleet default. Press `c` on a row for the same API-key, OAuth, or no-auth connection flow used by the auth system.
|
|
672
|
+
|
|
673
|
+
### Context-Window Provenance
|
|
674
|
+
|
|
675
|
+
Target status resolution tracks provenance explicitly in `TargetStatus.contextWindowProvenance`. The provenance names which layer answered the context window query:
|
|
676
|
+
- `configured`: Explicitly set by the operator via `--context-window` or `capabilities.contextWindow`.
|
|
677
|
+
- `discovered`: Live target probe discovered the context limit directly from the endpoint.
|
|
678
|
+
- `catalog`: Resolved from the model catalog knowledge base.
|
|
679
|
+
- `runtime-default`: Unanswered placeholder fall-back provided by the runtime descriptor.
|
|
680
|
+
|
|
681
|
+
When a probed target reports no context window, Clio uses the runtime descriptor default as an unverified guess. In `clio-coder targets` text output, this renders as `ctx <N> (unverified runtime default)`. In JSON output, `contextWindowProvenance` is set to `"runtime-default"`. During target creation via `clio-coder configure`, Clio emits a warning: `warning: the target reported no context window; Clio will use the runtime default as a guess. Set one with --context-window.`. This design ensures that a number the operator never chose and the server never claimed will not read like a verified capability.
|
|
682
|
+
|
|
683
|
+
---
|
|
684
|
+
|
|
685
|
+
## Local Model Quirks
|
|
686
|
+
|
|
687
|
+
Local models often require specific engine configurations to perform optimally. Clio parses local model quirks from catalog entries and applies them during target execution. Keep target inventory in `settings.yaml` (`wireModels`, `defaultModel`, URL/auth), and keep per-model semantics in catalog YAML. For local experiments, use `$CLIO_CODER_CONFIG_DIR/model-catalog.d` or `.clio-coder/model-catalog.d`; promote entries into the bundled source catalog only after the model family is verified for broader Clio use.
|
|
688
|
+
|
|
689
|
+
### 1. KV-Cache Quantization
|
|
690
|
+
You can optimize the GPU memory usage of the key and value caches for local inference engines. Quirks parameters include:
|
|
691
|
+
- `kQuant`: Quantization type for the key cache. Supported values are `f32`, `f16`, `q8_0`, `q4_0`, `q4_1`, `iq4_nl`, `q5_0`, and `q5_1`. Set to `false` to disable quantization and run in full precision.
|
|
692
|
+
- `vQuant`: Quantization type for the value cache. This requires flash attention to take effect.
|
|
693
|
+
- `useFp16`: Force fp16 precision for key and value caches.
|
|
694
|
+
|
|
695
|
+
### 2. Sampling Profiles
|
|
696
|
+
You can configure different sampling settings for the subagent depending on whether thinking is active:
|
|
697
|
+
- `thinking`: Sampler profile applied when the thinking level is not `off`.
|
|
698
|
+
- `instruct`: Sampler profile applied when the thinking level is `off`.
|
|
699
|
+
|
|
700
|
+
Each profile can configure overrides for `temperature`, `topP`, `topK`, `minP`, `repeatPenalty` (or `repetitionPenalty`), `presencePenalty`, `frequencyPenalty`, and `maxTokens`.
|
|
701
|
+
|
|
702
|
+
### 3. Thinking Mechanisms
|
|
703
|
+
Local models use different mechanisms to control and parse reasoning steps. The supported mechanisms are:
|
|
704
|
+
- `effort-levels`: The engine accepts a discrete reasoning effort parameter.
|
|
705
|
+
- `budget-tokens`: The engine enforces a numeric thinking token budget.
|
|
706
|
+
- `on-off`: The chat template toggles thinking on or off.
|
|
707
|
+
- `always-on`: The model emits chain-of-thought tokens unconditionally.
|
|
708
|
+
- `none`: The model does not support thinking or reasoning states.
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
### Local reasoning-token budgets
|
|
712
|
+
|
|
713
|
+
Some local reasoning models can spend most of a small output budget on hidden
|
|
714
|
+
thinking before emitting visible text. If a smoke test finishes with reasoning
|
|
715
|
+
tokens and no visible answer, keep the configured `maxTokens`/output budget high
|
|
716
|
+
enough for both reasoning and final text, or set the orchestrator/fleet
|
|
717
|
+
`thinkingLevel` to `off` when a terse visible answer matters more than reasoning
|
|
718
|
+
traces.
|
|
719
|
+
|
|
720
|
+
---
|
|
721
|
+
|
|
722
|
+
## Model listing and refresh
|
|
723
|
+
|
|
724
|
+
```bash
|
|
725
|
+
clio-coder models [search] [--target <id>] [--json] [--offline]
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
Model rows combine:
|
|
729
|
+
|
|
730
|
+
1. configured `wireModels` and `defaultModel`;
|
|
731
|
+
2. runtime-discovered models from probes;
|
|
732
|
+
3. known models from bundled/provider catalogs.
|
|
733
|
+
|
|
734
|
+
Capability badges in CLI output are compact:
|
|
735
|
+
|
|
736
|
+
| Badge | Capability |
|
|
737
|
+
| --- | --- |
|
|
738
|
+
| `C` | chat |
|
|
739
|
+
| `T` | tool calling |
|
|
740
|
+
| `R` | reasoning/thinking |
|
|
741
|
+
| `V` | vision |
|
|
742
|
+
| `E` | embeddings |
|
|
743
|
+
| `K` | rerank |
|
|
744
|
+
| `F` | fill-in-middle |
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
## Built-in runtime categories
|
|
749
|
+
|
|
750
|
+
Representative built-in runtime IDs:
|
|
751
|
+
|
|
752
|
+
| Category | Runtime IDs |
|
|
753
|
+
| --- | --- |
|
|
754
|
+
| Protocol-compatible | `openai-compat`, `anthropic-compat` generic surfaces for additional OpenAI-compatible or Anthropic-compatible APIs, including APIs such as InceptionAI when configured with the appropriate base URL and credentials. |
|
|
755
|
+
| Cloud | `alcf`, `anthropic`, `bedrock`, `deepseek`, `google`, `groq`, `mistral`, `openai`, `openrouter` |
|
|
756
|
+
| Subscription and worker harnesses | `openai-codex` for ChatGPT OAuth, `anthropic-max` for Anthropic OAuth, `claude-sdk` for Claude Agent SDK workers, `claude-code` for `claude -p` subprocess workers, and `antigravity-code` for `agy --print` subprocess workers |
|
|
757
|
+
| Local native | `llamacpp`, `lmstudio-native`, `ollama-native`, `vllm`, `sglang`, `lemonade`, `lemonade-anthropic` |
|
|
758
|
+
|
|
759
|
+
Some hidden aliases exist for backward compatibility or special surfaces; use `clio-coder configure --list --all` to see them.
|
|
760
|
+
|
|
761
|
+
> [!NOTE]
|
|
762
|
+
> Chat and print targets are HTTP/native/pi-ai-backed adapters. Dispatch workers also admit the sanctioned subscription worker runtimes: `claude-sdk`, `claude-code`, and `antigravity-code`.
|
|
763
|
+
|
|
764
|
+
---
|
|
765
|
+
|
|
766
|
+
## Auth
|
|
767
|
+
|
|
768
|
+
Auth state is exposed via `providers.auth` and persisted through `openAuthStorage()`.
|
|
769
|
+
|
|
770
|
+
```bash
|
|
771
|
+
clio-coder auth list
|
|
772
|
+
clio-coder auth status [target-or-runtime]
|
|
773
|
+
clio-coder auth login [target-or-runtime] [--api-key <value>]
|
|
774
|
+
clio-coder auth logout [target-or-runtime]
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
`clio-coder auth list` lists the specific runtimes that Clio authenticates itself (runtimes using API keys, OAuth, AWS SDK, or Vertex ADC), alongside their authentication status and credential sources. For the complete list of all registered runtime adapters (including local and unauthenticated runtimes), see `clio-coder configure --list`.
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
Auth types come from runtime descriptors:
|
|
781
|
+
|
|
782
|
+
| Auth type | Behavior |
|
|
783
|
+
| --- | --- |
|
|
784
|
+
| `api-key` | Environment variable or stored credential. |
|
|
785
|
+
| `oauth` | Browser/manual OAuth flow where implemented. |
|
|
786
|
+
| `aws-sdk` / `vertex-adc` | Uses platform SDK/application credentials. |
|
|
787
|
+
| `claude-cli` | Uses the installed `claude` command's existing Claude Code login; Clio stores no credential. |
|
|
788
|
+
| `none` | No credential required. |
|
|
789
|
+
|
|
790
|
+
### Credential storage and its limits
|
|
791
|
+
|
|
792
|
+
You have two ways to give Clio an API key:
|
|
793
|
+
|
|
794
|
+
- **Environment variable** (`--api-key-env <VAR>`, or the env choice in `clio-coder configure`). Clio stores nothing and reads `$VAR` at call time. This is the recommended default. The wizard suggests it for new credentials and offers `keep` first when a stored credential already exists.
|
|
795
|
+
- **Stored credential** (`--api-key <literal>`, or `clio-coder auth login`). The key is written to `credentials.yaml` (see directory locations) as **plaintext**, protected only by file mode `0600`. There is no encryption and no OS-keychain integration. Any process running as your user, plus backups and dotfile sync, can read it. Clio prints a warning whenever it writes a literal key for this reason.
|
|
796
|
+
|
|
797
|
+
Prefer `--api-key-env` for shared machines, HPC login nodes, and CI. Avoid committing literal secrets in settings or share archives. Stored keys are never printed back by `clio-coder auth status`, `clio-coder targets`, or `clio-coder configure`; only the source (env var name or `stored-api-key`) is shown.
|
|
798
|
+
|
|
799
|
+
For interactive auth, open `/targets`, select the row, and press `c`. For a stored credential cleanup, use `clio-coder auth logout <target-or-runtime>`.
|
|
800
|
+
|
|
801
|
+
---
|
|
802
|
+
|
|
803
|
+
## Troubleshooting checklist
|
|
804
|
+
|
|
805
|
+
```bash
|
|
806
|
+
clio-coder doctor --json
|
|
807
|
+
clio-coder targets --probe
|
|
808
|
+
clio-coder models --target <id>
|
|
809
|
+
clio-coder auth status <target-or-runtime>
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
When opening issues, include the Clio version, Node version, target id/runtime, model id, whether the live model listing succeeds (or the target probe result), and a redacted receipt or command transcript.
|