docks-kit 0.20.10 → 0.21.1

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/AGENTS.md CHANGED
@@ -32,8 +32,11 @@ launcher can fall back to Bun source.
32
32
  | `cli/build-binaries.sh` | Compiles the six release binaries. It checksums the six known artifact names rather than globbing `docks-kit-*`, so a packed `docks-kit-<version>.tgz` is never attested as a release binary. It stamps `cli/dist/VERSION` only when the directory holds one version, and on the next build discards every artifact that stamp attributes to a different version, because a launcher refuses to run one and keeping it makes `SHA256SUMS` span two versions. An artifact with no stamp has unknown provenance and may be a hand-built or downloaded recovery binary, so the script keeps it and warns; `--prune` discards those too. Nothing here removes an artifact the stamp vouches for. |
33
33
  | `cli/src/engine-native/` | EngineNative implementation for `sync`, `model`, and `toolchain`; idempotent, flag-gated for destructive reconciliation |
34
34
  | `cli/src/engine-native/ompSync.ts` | omp sync orchestration and summary |
35
- | `cli/src/commands/omp.ts` | `docks-kit omp` session launcher: renders the free-model run overlay and forwards args to omp |
36
- | `cli/src/engine-native/ompOverlay.ts` | Free-model overlay render plus catalog parse and thinking-ceiling helpers |
35
+ | `cli/src/commands/omp.ts` | `docks-kit omp` session launcher: rejects model-selecting forwarded flags, checks the free catalog of each candidate profile, renders the free-model run overlay, and starts `omp launch` |
36
+ | `cli/src/engine-native/ompOverlay.ts` | Free-model overlay render, omp argv and child environment, plus catalog parse and thinking-ceiling helpers |
37
+ | `cli/src/engine-native/scratch.ts` / `cli/src/commands/scratch.ts` | `docks-kit scratch new\|remove`: private agent temporary directories under `~/.cache/docks-kit/scratch/`; removal accepts only a real path strictly inside the scratch root, the system temporary directory, or `/var/tmp` |
38
+ | `cli/src/engine-native/tidy.ts` / `tidyReport.ts` / `cli/src/commands/tidy.ts` | `docks-kit tidy [--apply] [--repo <path>] [--report]`: plan and apply the safe leftover sweep (merged idle worktrees and their containers, orphaned processes in agent directories, idle scratch); Docker calls run only against a verified local endpoint (`unix:///…` or `npipe:////./pipe/…`); the report is read-only |
39
+ | `cli/src/engine-native/ompKitPlugin.ts` | Materializes the `SoT/.omp/plugin/` payload to `~/.docks-kit/omp-plugin` with the kit version; `ompPlugins.ts syncPlugins` links it |
37
40
  | `cli/src/engine-native/<axis>.ts` | One change axis per file: `codexConfig`/`codexHooks`/`codexPlugins`/`codexStatus`, `claudeSettings`/`claudeRemovals`/`claudePluginPasses`/`claudeOptionalPlugins`/`claudeLsp`, `parseModifiers`/`parseHelp`, `ompFileDeploy`/`ompMarketplace`/`ompPlugins`, `skillsManifest`/`skillsLinks`/`skillsInstall`/`skillsPrune`, `engineCtx`/`syncConcurrency`/`syncDispatch`; orchestrators keep prior exports |
38
41
  | `cli/src/engine-native/sharedTypes.d.ts` | Single definition per shared shape (manifest records, settings edits, omp session model, scalar modifier flags, resolved model catalog) |
39
42
  | `cli/src/engine-native/kitDb.ts` | Only opener of the SQLite store `~/.docks-kit/kit.db`: append-only migrations, one-time `state.json` import, TTL cache |
@@ -74,7 +77,7 @@ omp SoT notes:
74
77
  - `SoT/.omp/AGENTS.md`, `config.yml`, `models.yml`, and `mcp.json` deploy to `~/.omp/agent/`.
75
78
  - `SoT/.omp/intercom.json` deploys to `$PI_CODING_AGENT_DIR/intercom/config.json`. The default root is `~/.pi/agent`. Under a named omp profile (`OMP_PROFILE` or `PI_PROFILE`), it deploys to `<profile agentDir>/intercom/config.json`, because omp exports `PI_CODING_AGENT_DIR` as the profile agent directory.
76
79
  - `ompFileDeploy.ts syncMergedYaml` deep-merges `config.yml` through `ompYaml.ts mergeOmpConfig` and `models.yml` through `mergeOmpModels`. Both wrap one generic mapping merge; only the config wrapper prunes stale `retry.fallbackChains` wildcards and merges `bash.patterns`.
77
- - `SoT/.omp/config.yml` `bash.patterns` holds the destructive-command guards. omp's `CRITICAL_BASH_PATTERNS` check returns a bare safety override before a matching prompt rule, and `tools.approvalMode: yolo` ignores a bare override, so a prompt on a critical command becomes an allow, in subagents too (`omp://approval-mode.md`). Every `rm` shape that check can flag is therefore a deny: recursive `rm`, `sudo` anywhere before `rm` (also by path), any `rm` with an `r` or `f` option before an absolute path, and `--no-preserve-root`. By owner decision (0.20.9), the recursive-`rm` deny also covers any prefix (a `* rm ` copy of each bare cluster rule, so `env X=1 rm -rf b`, `xargs rm -rf`, `find . -exec rm -rf {} +`, and `git rm -r dir` are denied) and the `-ri`, `-ir`, `-Ri`, and `-iR` clusters for bare `rm`, `*/rm`, and `* rm`. By the same decision, omp does not prompt for file removal: a non-denied `rm`, `find -delete`, `git rm`, `git worktree remove`, and `gio trash` run without a prompt. The prompts left are the history-loss commands: `git clean`, `git reset --hard`, and every `git push` form that could force. The list order is deny, then prompts, then `trash *`. omp takes the first match. `ompYaml.ts mergeBashPatterns, exception-aware rule merge` keeps user rules and groups all rules as kit deny, user deny, user prompt, kit exception (a kit allow listed before the first kit prompt; the kit currently ships none), kit prompt, other user rules, kit allow, so a user deny or prompt precedes every kit allow. It treats a deployed rule equal to a kit rule (approval case-folded, `match` whitespace collapsed) as the kit copy, so a re-sync is a no-op. A rule the kit stops shipping stays as a user rule, so retire one through `ompRemovals.ts OMP_RETIRED_BASH_RULES`. `cli/test/lib/ompBashPatterns.ts` ports omp 18.11.1's matcher, critical patterns, and yolo resolution; `cli/test/unit/ompBashPatterns.test.ts` asserts each command's final outcome and the merge. omp subagents reject every `prompt`, and the `eval` tool stays unrestricted by owner decision.
80
+ - `SoT/.omp/config.yml` `bash.patterns` holds the destructive-command guards. omp's `CRITICAL_BASH_PATTERNS` check returns a bare safety override before a matching prompt rule, and `tools.approvalMode: yolo` ignores a bare override, so a prompt on a critical command becomes an allow, in subagents too (`omp://approval-mode.md`). Every `rm` shape that check can flag is therefore a deny: recursive `rm`, `sudo` anywhere before `rm` (also by path), any `rm` with an `r` or `f` option before an absolute path, and `--no-preserve-root`. By owner decision (0.20.9), the recursive-`rm` deny also covers any prefix (a `* rm ` copy of each bare cluster rule, so `env X=1 rm -rf b`, `xargs rm -rf`, `find . -exec rm -rf {} +`, and `git rm -r dir` are denied) and the `-ri`, `-ir`, `-Ri`, and `-iR` clusters for bare `rm`, `*/rm`, and `* rm`. By owner decision (0.21.0), 17 more denies cover bulk removal that can empty the home directory: `find -delete` (bare, `*/find`, `* find`), `-exec`, `-execdir`, `-ok`, and `-okdir` with `rm` or `*/rm`, and `xargs rm` in six shapes. No glob can express "inside the temporary directory", so `docks-kit scratch remove` checks that path in code. By the 0.20.9 decision, omp does not prompt for other file removal: a non-denied `rm`, `git rm`, `git worktree remove`, `gio trash`, and `docks-kit scratch remove` run without a prompt. The prompts left are the history-loss commands: `git clean`, `git reset --hard`, and every `git push` form that could force. The list order is deny, then prompts, then `trash *`. omp takes the first match. `ompYaml.ts mergeBashPatterns, exception-aware rule merge` keeps user rules and groups all rules as kit deny, user deny, user prompt, kit exception (a kit allow listed before the first kit prompt; the kit currently ships none), kit prompt, other user rules, kit allow, so a user deny or prompt precedes every kit allow. It treats a deployed rule equal to a kit rule (approval case-folded, `match` whitespace collapsed) as the kit copy, so a re-sync is a no-op. A rule the kit stops shipping stays as a user rule, so retire one through `ompRemovals.ts OMP_RETIRED_BASH_RULES`. `cli/test/lib/ompBashPatterns.ts` ports omp 18.11.1's matcher, critical patterns, and yolo resolution; `cli/test/unit/ompBashPatterns.test.ts` asserts each command's final outcome and the merge. omp subagents reject every `prompt`, and the `eval` tool stays unrestricted by owner decision.
78
81
  - `ompSync.ts` runs `ompRemovals.ts syncOmpRemovals, retired-key inventory` right after the config merge, and that pass force-prunes retired kit-owned keys from `~/.omp/agent/config.yml` on every sync, without `--reconcile`. The pass is required because `mergeOmpConfig` is additive, so removing a key from the SoT alone never removes it from a deployed file. A key retired with a recorded value is pruned only while the deployed value still matches that value, so a user edit survives; a key retired outright, such as `providers.webSearchOrder`, is pruned at any value. The same pass removes each `bash.patterns` rule listed in `OMP_RETIRED_BASH_RULES` (the 39 file-removal rules retired in 0.20.9). It compares with the merge's kit-rule normalization (approval case-folded, `match` whitespace collapsed), so a user rule with a different `match` or `approval` survives.
79
82
  - `cycleOrder` ends with `astra` as its fifth stop. `modelRoles.astra` is `openai-codex/gpt-6-astra:xhigh`, and `modelTags.astra` is visible. Astra and Fable fall back to each other through concrete selectors. `modelRoles.fable` remains `anthropic/claude-fable-5-1:medium`, with visible `modelTags.fable`. The hidden `switch_fable` role uses the same Fable selector and keeps an empty fallback chain.
80
83
  - `modelRoles.task` is `anthropic/claude-opus-5-5:high`, and `retry.fallbackChains.task` falls back to `openai-codex/gpt-6.1-sol:high`. `task.maxEffort` is `xhigh`: a caller `effort: hi` outranks the role's `:high` suffix and maps to the top of the model ladder, so the cap keeps `hi` at `xhigh` instead of `max`. `advisor` is `anthropic/claude-opus-5-5:medium` with an empty fallback chain, because a GPT-6 Sol advisor looped on repeated reads under an Opus 5.5 session. Never put any GPT model (`openai-codex/gpt-*`, including GPT-6.1 Sol and GPT-6 Astra) in the advisor role or chain; Astra also costs too much for this role. `smol`, `commit`, and `tiny` use `openai-codex/gpt-6-luna`. The kit-defined hidden `reviewer` role is `openai-codex/gpt-6.1-sol:xhigh` with `anthropic/claude-opus-5-5:xhigh` as its retry fallback, and all four reviewer entries in `task.agentModelOverrides` point to `@reviewer`. `ompOverlay.ts ROLE_ORDER, FALLBACK_ORDER` list `reviewer`, so a free session also replaces it. Only bundled `reviewer` and `security-reviewer` are discoverable OMP agents; `code-reviewer` and `plan-reviewer` stay dormant. The `SoT/toolchain.json` omp floor is 18.4.4, the oldest release the kit tested with `gpt-6.1-sol`. That release lists and serves the model through the `openai-codex` provider. `cli/docs/omp-models.md` records the checks.
@@ -86,9 +89,13 @@ omp SoT notes:
86
89
  - `SoT/.omp/config.yml` sets `compaction.thresholdTokens` to `-1`, omp's schema default sentinel selecting reserve-based behavior: the trigger becomes `contextWindow` minus `max(floor(contextWindow * 0.15), 16384)`, which is 231,200 on the 272,000-token Codex window and 850,000 on the 1,000,000-token Anthropic window. The key ships as `-1` rather than being deleted because `ompYaml.ts mergeOmpConfig` is additive, so removing a key from SoT never removes it from a deployed file. `cli/docs/omp-context.md` (topic `omp-context`) carries the derivation and the measured evidence, so update that topic in the same commit as any compaction-setting change.
87
90
  - Sync registers the `docks` marketplace. It installs or upgrades `docks@docks` and `plan-lifecycle@docks` at user scope.
88
91
  - Sync installs `pi-intercom` at the verified version from `SoT/toolchain.json`.
92
+ - Sync materializes the kit omp plugin `docks-kit-omp` from `SoT/.omp/plugin/` to `~/.docks-kit/omp-plugin` (`ompKitPlugin.ts syncKitPlugin`: directories 0700, files 0600, `package.json` `version` set to the kit version, stale files removed, no backups because the directory is kit-owned). `ompPlugins.ts syncPlugins, kit plugin link` then runs `omp plugin link <dir>` unless the `omp plugin list --json` npm row `docks-kit-omp` already has a `path` that resolves to that directory; `--skip-plugin-refresh` does not skip the link. The plugin extension registers `scratch_new`, `scratch_remove`, and `tidy_report`, adds a reminder after each bash command that created a resource, checks at session stop that those resources are gone, and at a main-session start claims `~/.cache/docks-kit/tidy.stamp.claim` and runs `docks-kit tidy --apply` in the background at most once per 12 hours. Every extension subprocess runs without a shell. The plugin also ships the `workspace-hygiene` skill and the `/cleanup` command. The plugin, the deployed rules, and the sweep call `docks-kit scratch` and `docks-kit tidy`, so a checkout sync must not run before the global `docks-kit` carries those commands.
93
+ - `task.agentIdleTtlMs` is `120000`, so omp parks an idle subagent after 2 minutes instead of 7. `browser.idleCloseSec` is `600`.
94
+ - By owner decision (0.21.0), resources on the workstation are always development, so `docks-kit tidy` sweeps them without a question. The omp prompt rules, the `workspace-hygiene` skill, `/cleanup`, and the extension reminders limit the cleanup of a remote resource (reached through SSH or a provider CLI such as `wrangler`, `vercel`, `kubectl`, or a remote Docker host) to targets named local, development, dev, test, homolog, homologation, staging, or preview, the plan-lifecycle non-production definition. A production cleanup needs an `ask` immediately before it, must be rare, and a `yolo` invocation does not answer that ask. Prompt rules cannot force an agent to ask, so this rule has no `bash.patterns` guard.
89
95
  - The omp CLI is upstream-owned. It updates through `omp update`, or through the external manager that owns the install, such as Tern or Nix. `omp update` refuses to run on an install that an external manager owns. Sync never installs or upgrades the CLI.
90
- - `docks-kit omp [--model <selector>|--pick] [args...]` starts one interactive omp session. The overlay sets the 16 roles in `ompOverlay.ts ROLE_ORDER`, `judge` and `memory` included, to one free model and empties the 13 retry chains in `FALLBACK_ORDER`. Every other deployed chain stays as deployed. In particular, `modelRoles.web` and `retry.fallbackChains.web` keep the deployed web-search provider order. Thus a web search that falls through the `web/*` providers can reach the paid `openai-codex/gpt-6-luna` entry. Higher-precedence model selection can replace those overlay values. It renders the overlay to `~/.cache/docks-kit/omp-free-<model>-<digest>.yml` (mode 0600) and passes it through omp's repeatable `--config` flag. `ompOverlay.ts overlayFileName` gives each distinct model-and-level combination its own file, and the digest covers the selector and both levels. omp can re-read the overlay during a live session, so a second launcher with another model or level must not rewrite it. Deployed `~/.omp/agent/` files stay untouched, so the next plain `omp` run uses the paid configuration again. Remaining arguments forward verbatim to omp.
91
- - The session model persists per machine in `~/.docks-kit/kit.db` (table `omp_session`), next to the harness selection. The default is `opencode-zen/muse-spark-1.3-contributor-free` at `xhigh`. Every launch, a plain launch included, runs `omp models --json` (as `omp --profile <name> models --json` when the forwarded arguments select a profile) and checks the remembered or default model against the live free catalog. When that model is not in the catalog, the launcher stops with an error and does not start omp. `ompOverlay.ts ladderCeiling, advisorLevelFor` derive both levels from the ladder of the chosen model for the `--model` path, and `ompOverlay.ts planEffortChoice` drives the `--pick` wizard, which asks whether every role shares one level and otherwise takes one level for the main roles and one for the advisor from that model's own ladder. Levels never come from a fixed list: free ladders are not uniform, three free models publish no `medium`, and two publish no ladder, which the overlay renders as bare selectors. The picker lists only catalog models at zero input and output cost with `pricingStatus` free or unknown.
96
+ - `docks-kit omp [--model <selector>|--pick] [args...]` starts one interactive omp session. The overlay sets the 16 roles in `ompOverlay.ts ROLE_ORDER`, `judge` and `memory` included, to one free model, empties the 13 retry chains in `FALLBACK_ORDER`, and empties the chains keyed by the free model (bare, `off`, and every `THINKING_LADDER` level). Every other deployed chain stays as deployed. In particular, `modelRoles.web` and `retry.fallbackChains.web` keep the deployed web-search provider order. Thus a web search that falls through the `web/*` providers can reach the paid `openai-codex/gpt-6-luna` entry. It renders the overlay to `~/.cache/docks-kit/omp-free-<model>-<digest>.yml` (mode 0600). `ompOverlay.ts overlayFileName` gives each distinct model-and-level combination its own file, and the digest covers the selector and both levels. omp can re-read the overlay during a live session, so a second launcher with another model or level must not rewrite it. Deployed `~/.omp/agent/` files stay untouched, so the next plain `omp` run uses the paid configuration again.
97
+ - The launcher enforces the free model before omp starts. `omp.ts rejectedForwardedFlag` rejects a forwarded `--config`, `--model`, `--smol`, `--slow`, `--plan`, `--models`, `--provider`, `--prewalk-into`, or `--plan-yolo-into`, in both forms and also after a `--`, with exit 2 and a message that names the recoveries. `ompOverlay.ts buildOmpArgs` starts omp as `omp launch --config <overlay> --model <selector>[:<level>] [args...]`, so every forwarded word is message text, no omp subcommand runs through the launcher, and `--continue` or `--resume` keeps the free model. `ompOverlay.ts ompChildEnvironment` sets `PI_SMOL_MODEL`, `PI_SLOW_MODEL`, and `PI_PLAN_MODEL` to the free role values, and appends the overlay to `PI_CONFIG_FILES` so an `omp` that the bash tool of the session starts loads it too. The launcher prints one warning for each exported model variable that it replaces. In-session selection (`Alt+M`, `Alt+P`, `/switch`, `/model`, `/modelpreset`, `/resume`, a seance subagent), the `web` role, the model-kind roles `image`, `speech`, and `dictation`, and extensions and hooks stay outside the launcher. An `Alt+M` assignment of `default` writes `modelRoles.default` to the deployed `~/.omp/agent/config.yml`. `cli/docs/omp-models.md` lists these paths.
98
+ - The session model persists per machine in `~/.docks-kit/kit.db` (table `omp_session`), next to the harness selection. The default is `opencode-zen/muse-spark-1.3-contributor-free` at `xhigh`. Every launch, a plain launch included, runs `omp models --json` for the profile of the environment and `omp --profile <name> models --json` for each forwarded `--profile` value, and checks the remembered or default model against each live free catalog. When that model is not free in every one of these catalogs, the launcher stops with an error and does not start omp. `--model` and `--pick` resolve against the catalog of the last forwarded profile. `ompOverlay.ts ladderCeiling, advisorLevelFor` derive both levels from the ladder of the chosen model for the `--model` path, and `ompOverlay.ts planEffortChoice` drives the `--pick` wizard, which asks whether every role shares one level and otherwise takes one level for the main roles and one for the advisor from that model's own ladder. Levels never come from a fixed list: free ladders are not uniform, three free models publish no `medium`, and two publish no ladder, which the overlay renders as bare selectors. The picker lists only catalog models at zero input and output cost with `pricingStatus` free or unknown.
92
99
  - `docks-kit omp --fast` toggles `tier.openai` in the deployed `~/.omp/agent/config.yml` between `priority` (omp's `/fast on` tier for OpenAI and OpenAI-Codex models) and `none`, prints the change, and exits. `ompFastMode.ts toggleOpenAiFast` edits only that key. `SoT/.omp/config.yml` does not declare `tier.openai`, so the additive merge keeps the toggled value across sync. There is no Ultrafast flag: omp ignores `ultrafast` for a Codex model whose catalog `serviceTiers` omits it, and the current GPT models omit it.
93
100
 
94
101
  For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`, `SoT/.omp/`), see the matching SoT directory.
@@ -98,7 +105,7 @@ For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`, `SoT/.omp/`), see the m
98
105
  - **Idempotent operations.** Every EngineNative sync step must be safe to re-run. Settings merges, plugin installs, and marketplace adds are all idempotent — re-running with no SoT changes is a no-op.
99
106
  - **Failed harness-CLI operations fail the sync.** A kit-managed marketplace or plugin command that exits non-zero is recorded through `failures.ts recordFailure` — it still warns in place, and `syncDispatch.ts engineSync, failure ledger` lists every entry under `--- Failures ---` after the summary, then returns exit 1. A skip is not a failure: a missing harness CLI, missing git, and a missing `SoT/toolchain.json` pin stay warn-only with exit 0; an unavailable plugin inventory warns without a ledger row and falls back to the full refresh, whose failed commands are recorded. `ompMarketplace.ts syncMarketplace, probe guard` returns before spawning so a host without omp never records one. Aggregate roll-up warnings (`N plugin operation(s) failed`) stay warns, because each counted site already records itself.
100
107
  - **Removed bash engine.** The bash engine was removed after the `bash-engine-final` tag. `DOCKS_KIT_ENGINE=bash` must fail with the removed-engine message; engine bugs are fixed forward in EngineNative.
101
- - **Effect 4 CLI stack.** The CLI pins `effect@4.0.0-rc.115` (including `effect/unstable/cli`), `@effect/platform-bun@4.0.0-rc.115` (`BunServices.layer`, `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.115`, and `vitest@5.0.0` (inside the `@effect/vitest` peer range `>=5.0.0 <6.0.0`; 5.0.0 is past the 5.x patch point for GHSA-82fw-gwwq-j7x9, fixed in 5.0.0-rc.2). `@effect/cli` and `@effect/platform` are removed and must not be reintroduced.
108
+ - **Effect 4 CLI stack.** The CLI pins `effect@4.0.0-rc.115` (including `effect/unstable/cli`), `@effect/platform-bun@4.0.0-rc.115` (`BunServices.layer`, `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.115`, and `vitest@5.0.3` (inside the `@effect/vitest` peer range `>=5.0.0 <6.0.0`; 5.0.3 fixes GHSA-qxg6-89mg-rqv8 and GHSA-xp26-3454-mjgp, and is past the 5.x patch point for GHSA-82fw-gwwq-j7x9, fixed in 5.0.0-rc.2). The lockfile resolves the `vite` peer of `@vitest/mocker` to 7.3.7, which fixes the launch-editor and `server.fs.allow` advisories up to 7.3.6. `@effect/cli` and `@effect/platform` are removed and must not be reintroduced.
102
109
  - **Effect skill routing.** Effect work in this checkout must verify migration and API call shapes against the installed declarations under `node_modules/effect/dist/unstable/cli/`, never from memory or a mutable dist-tag. The `effect-ts-setup`, `effect-ts-port`, and `effect-ts-specialist` skills target Effect 3.x and do not apply.
103
110
  - **Targeted syncs.** `./docks-kit sync` accepts positional targets: `claude`, `codex`, `agents`, and `omp`. Use the narrowest target that matches the SoT change (for example, `./docks-kit sync omp` for omp-only config edits); targets can be combined with `--dry-run`, `--skip-bubblewrap` (skip optional bubblewrap bootstrap for the Codex Linux sandbox), `--skip-plugin-refresh` (install missing plugins without refreshing existing caches), `--reconcile`, `--prune`, and the deploy-time modifiers `--claude-compact-window=<tokens>` / `--claude-permissive` / `--claude-model=<m>` / `--claude-effort=<level>` / `--claude-advisor=<on|off|default>` / `--codex-model=<m>` / `--codex-effort=<level>` (see `CLAUDE.md` § Deploy-time modifiers).
104
111
  - **Per-machine harness selection.** The SQLite store `~/.docks-kit/kit.db` drives a flag-less sync. A missing selection selects `claude`, `codex`, and `agents`; it never selects `omp` implicitly. `sync` never prompts and never writes the selection. `docks-kit harnesses` is the only command that writes the `harness_selection` table. With no stored selection, its picker pre-ticks all four harnesses, `omp` included, so a new machine opts out of omp instead of opting in; nothing changes until the picker saves. The same store holds the independent `omp_session` table, which only `docks-kit omp` writes, and a TTL cache (`cache_entry`) for the live Anthropic model list and `toolchain outdated` lookups. `kitDb.ts withKitDb` is the only opener: it runs the append-only `MIGRATIONS`, imports a legacy `state.json` once and renames it to `state.json.migrated`, and refuses a store from a newer schema. Cache rows carry the kit version as fingerprint, so a new release refetches them.
@@ -125,7 +132,7 @@ For per-tool SoT layouts (`SoT/.claude/`, `SoT/.codex/`, `SoT/.omp/`), see the m
125
132
  - **One exemption: the kit's own package.** `install.sh` and `install.ps1` end with `bun add -g docks-kit@latest`, because a global installer that pinned itself would install a fixed old kit forever, and pinning it to `package.json` would request an unpublished version between the release-prep commit and the npm publish. The exemption covers `docks-kit` alone. Both installers still pin the Bun installer they download to the manifest's verified version. `cli/test/unit/hostTargets.test.ts` asserts that pin in all four launcher and installer scripts, and `cli/test/unit/install.test.ts` proves `install.sh` passes it to the Bun installer.
126
133
  ## Testing
127
134
 
128
- Run `bun run check` before and after each change: oxlint, `oxfmt --check`, `tsc --noEmit`, unit tests, and both golden suites. Scripts: `lint`, `format:check`, `typecheck`, `test:unit`, `test:integration` (goldens), `test`, `format`; CI runs `check` on push and pull request with Bun 1.4.2. Prove-red modes must exit non-zero after detecting planted mismatches. The golden writer emits two-space JSON that `oxfmt` re-serializes, so run `bun run format` after `--update-goldens` or `format:check` fails. Also verify user-facing changes via `./docks-kit sync --dry-run`, per-tool sanity (`/doctor`, `/plugin`, etc.), `bun run test:runtime:posix`, and `diff <(jq -S . <SoT>) <(jq -S . <deployed>)` recipes from the per-tool file.
135
+ Run `bun run check` before and after each change: oxlint, `oxfmt --check`, `bun check`, unit tests, and both golden suites. Scripts: `lint`, `format:check`, `typecheck`, `test:unit`, `test:integration` (goldens), `test`, `format`; CI runs `check` on push and pull request with Bun 1.4.4. Prove-red modes must exit non-zero after detecting planted mismatches. The golden writer emits two-space JSON that `oxfmt` re-serializes, so run `bun run format` after `--update-goldens` or `format:check` fails. Also verify user-facing changes via `./docks-kit sync --dry-run`, per-tool sanity (`/doctor`, `/plugin`, etc.), `bun run test:runtime:posix`, and `diff <(jq -S . <SoT>) <(jq -S . <deployed>)` recipes from the per-tool file.
129
136
 
130
137
  Use direct acceptance and focused regressions while iterating, then run the full unit/golden gate once at the pre-commit or release boundary. Reuse still-matching evidence; a later relevant edit invalidates only the affected rung and final gate, not every prior check.
131
138
 
package/README.md CHANGED
@@ -64,7 +64,7 @@ EngineNative in `cli/src/engine-native/`, with golden-regression coverage for
64
64
  dry-run output, mutation snapshots, and argv logs. Its dependency graph is
65
65
  `effect@4.0.0-rc.115` (including `effect/unstable/cli`),
66
66
  `@effect/platform-bun@4.0.0-rc.115` (`BunServices.layer` and
67
- `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.115`, and `vitest@5.0.0`
67
+ `BunRuntime.runMain`), `@effect/vitest@4.0.0-rc.115`, and `vitest@5.0.3`
68
68
  (inside the `@effect/vitest` peer range `>=5.0.0 <6.0.0`). `@effect/cli` and
69
69
  `@effect/platform` are removed: neither has a 4.x release, the CLI API moved
70
70
  into core, and the standalone platform package was unused here.
@@ -112,14 +112,23 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
112
112
  working legacy hook/statusline setup and reports that migration is deferred.
113
113
  - **Command guards** — omp, Claude Code, and Codex share one fail-closed
114
114
  policy for destructive shell commands; to remove, agents use the trash
115
- (`gio trash -- <path>`, or `trash <path>` on macOS). `rm` of the home
116
- directory or `/` and `HOME` reassignment are denied. omp also denies every
117
- recursive `rm` and asks before any other `rm`. `find -delete`, `git clean`,
118
- `git reset --hard`, any `git push` that could force, and `git rm` other
119
- than `git rm -- <path>` ask; Claude Code and Codex also ask before a
120
- recursive `rm` and every `git rm`. An omp subagent cannot answer an ask, so
121
- omp rejects it; a Codex ask can go to its `auto_review` reviewer. Details,
122
- per-tool differences, and gaps: `docks-kit docs command-guards`.
115
+ (`gio trash -- <path>`, or `trash <path>` on macOS); omp agents remove a
116
+ temporary file or directory with `docks-kit scratch remove`. `rm` of the
117
+ home directory or `/` and `HOME` reassignment are denied. omp also denies
118
+ every recursive `rm`, `find -delete`, `find -exec rm`, and `xargs rm`, and
119
+ runs any other `rm` without a prompt. In omp, `git clean`,
120
+ `git reset --hard`, and any `git push` that could force ask; Claude Code and
121
+ Codex also ask before `find -delete`, a recursive `rm`, and every `git rm`.
122
+ An omp subagent cannot answer an ask, so omp rejects it; a Codex ask can go
123
+ to its `auto_review` reviewer. Details, per-tool differences, and gaps:
124
+ `docks-kit docs command-guards`.
125
+ - **Agent cleanup (omp)** — `docks-kit scratch` creates agent temporary
126
+ directories and removes agent temporary files and directories with checked
127
+ paths, and `docks-kit tidy` removes merged idle worktrees, their containers,
128
+ orphaned processes, and idle scratch directories; `--report` lists other
129
+ disk and memory use. The kit omp plugin `docks-kit-omp` exposes these as
130
+ tools, reminds the agent of what it created, and runs the sweep at most
131
+ once per 12 hours.
123
132
 
124
133
  ## Repository map
125
134
 
@@ -127,7 +136,7 @@ and a later flag-less sync reverts them. Full reference: `docks-kit docs flags`
127
136
  |------|---------|
128
137
  | `SoT/.claude/` | Claude Code SoT (settings template, Bun runtime programs, CLAUDE.md) |
129
138
  | `SoT/.codex/` | Codex SoT (config.toml, rules, AGENTS.md, marketplace) |
130
- | `SoT/.omp/` | omp SoT (AGENTS.md, config.yml, models.yml, mcp.json, intercom.json) |
139
+ | `SoT/.omp/` | omp SoT (AGENTS.md, config.yml, models.yml, mcp.json, intercom.json, and the `plugin/` source of `docks-kit-omp`) |
131
140
  | `SoT/.agents/` | Universal-skill manifest |
132
141
  | `SoT/models.json` | Curated aliases, notes, and offline Claude/Codex fallback |
133
142
  | `SoT/toolchain.json` | Verified-version floors |
@@ -2,8 +2,9 @@
2
2
 
3
3
  The kit ships one destructive-command policy to omp, Claude Code, and Codex.
4
4
  The short rule for agents: **to remove, use the trash**. Run
5
- `gio trash -- <path>` on Linux or `trash <path>` on macOS. To remove a path
6
- from the git index, run `git rm -- <path>`.
5
+ `gio trash -- <path>` on Linux or `trash <path>` on macOS. In omp, remove a
6
+ temporary file or directory with `docks-kit scratch remove <path>` instead.
7
+ To remove a path from the git index, run `git rm -- <path>`.
7
8
 
8
9
  The policy follows one principle: **fail closed**. A command is allowed only
9
10
  in a canonical form that is safe by construction. Every other form that could
@@ -40,10 +41,12 @@ that `eval` starts.
40
41
  | Recursive `rm` (`-r`, `-R`, `-rf`, `-fr`, `-rfv`, `-ri`, `-ir`, `-Ri`, `-iR`, `--recursive`, other listed clusters) | deny, also behind any prefix (`env`, `xargs`, `nice`, `find -exec`, `git rm -r`) | ask | ask (every `rm` asks) |
41
42
  | `rm` with an `r` or `f` option before an absolute path, `--no-preserve-root` | deny | ask if recursive, else classifier | ask |
42
43
  | Any other `rm`: one file, several files, a glob, `-f` | allow | glob asks; the rest goes to the classifier | ask |
43
- | `find ... -delete`, `find ... -exec rm` without a recursive option | allow | ask | ask (every `find` asks) |
44
+ | `find ... -delete`, `find ... -exec rm` (also `-execdir`, `-ok`, `-okdir`), `xargs rm` | deny, in every position and by path | ask | ask (every `find` asks) |
44
45
  | `git clean`, `git reset --hard` | ask | ask | ask |
45
46
  | `git push` that could force: see below | ask | ask | ask (every `git push` asks) |
46
47
  | `git rm -- <path>`, `git worktree remove -- <path>` | allow | ask | ask |
48
+ | `git worktree remove --force -- <path>` | allow; the omp prompt permits it once, after the commits are on the remote | ask | ask |
49
+ | `docks-kit scratch remove <path>` | allow; the command removes only a path inside the scratch root, the system temporary directory, or `/var/tmp` | no rule | no rule |
47
50
  | Any other non-recursive `git rm` or `git worktree remove` | allow | ask | ask |
48
51
  | `gio trash -- <path>` | allow | allow | ask |
49
52
  | Any other `gio trash` | allow | ask with `--empty` or `--restore`; the rest goes to the classifier | ask |
@@ -79,16 +82,23 @@ it shares the `--f` prefix.
79
82
 
80
83
  ## How an agent removes files
81
84
 
82
- 1. Move a file or a directory to the trash with `gio trash -- <path>` on Linux
83
- or `trash <path>` on macOS. The `--` ends option parsing, so `gio` reads
84
- every later argument as a path, and a path such as `--empty` cannot empty
85
- the trash.
86
- 2. `gio trash` does not trash on a system internal mount, such as a `tmpfs`
87
- `/tmp`. Leave a temporary file in `/tmp`; the system clears it.
85
+ 1. In omp, remove a temporary file or directory with the `scratch_remove`
86
+ tool or `docks-kit scratch remove <path>`. The command removes only a path
87
+ inside the scratch root, the system temporary directory, or `/var/tmp`.
88
+ `gio trash` does not trash on a system internal mount, such as a `tmpfs`
89
+ `/tmp`.
90
+ 2. Move every other file or directory to the trash with `gio trash -- <path>`
91
+ on Linux or `trash <path>` on macOS. The `--` ends option parsing, so `gio`
92
+ reads every later argument as a path, and a path such as `--empty` cannot
93
+ empty the trash. In Claude Code and Codex, leave a temporary file in
94
+ `/tmp`; the system clears it.
88
95
  3. To remove a path from the git index, run `git rm -- <path>`. To remove a
89
- worktree, run `git worktree remove -- <path>`. Never pass `--force`.
90
- 4. In omp, do not use `rm`. omp denies a recursive `rm`. It runs any other
91
- `rm` without a prompt.
96
+ worktree, run `git worktree remove -- <path>`. In omp, when git refuses
97
+ because the worktree has changes, the agent may pass `--force` once, after
98
+ each commit is on the remote and `git status --porcelain` lists only
99
+ generated files. Never pass `--force` two times.
100
+ 4. In omp, do not use `rm`. omp denies a recursive `rm`, `find -delete`,
101
+ `find -exec rm`, and `xargs rm`. It runs any other `rm` without a prompt.
92
102
  5. In Claude Code and Codex, use `rm <file>` without flags only for one file
93
103
  that the agent created.
94
104
  6. For a recursive or bulk deletion, ask the user in the main session. A
@@ -131,6 +141,11 @@ The kit therefore denies every `rm` shape that the check can flag:
131
141
  - `sudo` anywhere before `rm`;
132
142
  - `--no-preserve-root`.
133
143
 
144
+ The kit also denies bulk removal through `find -delete`, `find -exec rm`, and
145
+ `xargs rm`. omp's critical check does not flag these forms, but they can empty
146
+ the home directory, and no glob can express "inside the temporary directory".
147
+ `docks-kit scratch remove` checks the path in code instead.
148
+
134
149
  ## Matching rules per tool
135
150
 
136
151
  - **omp**:
@@ -178,6 +193,9 @@ The kit therefore denies every `rm` shape that the check can flag:
178
193
  such as `env X=1 rm -rf b`, `xargs rm -rf`, `find . -exec rm -rf {} +`, or
179
194
  `git rm -r dir`. A `* rm ` rule also matches text, so a line such as
180
195
  `echo do not rm -rf b` is denied too.
196
+ - **omp, bulk-removal text**: the `* find *-delete*`, `*-exec rm *`, and
197
+ `*xargs rm` rules also match text, so a line such as
198
+ `echo use find with -delete` is denied. Write such text to a file instead.
181
199
  - **Recursive `rm` clusters**: omp and Claude Code match only the listed
182
200
  recursive-`rm` clusters. In omp, these are `r` or `R` alone or with `f` and
183
201
  `v`, plus `-ri`, `-ir`, `-Ri`, and `-iR`. In Claude Code, they are `r` or `R`
package/cli/docs/flags.md CHANGED
@@ -62,9 +62,26 @@ ignored with a warning; Claude modifiers never touch Codex config and vice versa
62
62
  | `--pick` | Interactive picker over free catalog models; records the choice the same way |
63
63
  | `--fast` | Toggle `tier.openai` between `priority` and `none` in the deployed `~/.omp/agent/config.yml`, print the change, and exit; the same tier omp's `/fast on` selects for OpenAI and Codex models |
64
64
 
65
- Remaining arguments forward verbatim to omp after the launcher flags.
66
- `docks-kit omp -p "..."` runs one prompt. `docks-kit omp --continue` resumes
67
- the previous session. A bare `docks-kit omp` opens an interactive session.
65
+ The launcher starts omp as
66
+ `omp launch --config <overlay> --model <selector>[:<level>]`, followed by the
67
+ remaining arguments in the same order. `docks-kit omp -p "..."` runs one
68
+ prompt. `docks-kit omp --continue` resumes the previous session on the free
69
+ model. A bare `docks-kit omp` opens an interactive session. `launch` makes omp
70
+ read every forwarded word as message text, so no omp subcommand runs through
71
+ the launcher; run `omp` directly for a subcommand.
72
+
73
+ The launcher rejects a forwarded `--config`, `--model`, `--smol`, `--slow`,
74
+ `--plan`, `--models`, `--provider`, `--prewalk-into`, or `--plan-yolo-into`,
75
+ in the `--flag value` and the `--flag=value` form and also after a `--`. It
76
+ exits with code 2 before omp starts. The error names the flag and the
77
+ recoveries: `--model <selector>` before the other arguments or `--pick` for a
78
+ free model, `omp` directly for a paid model, and `PI_CONFIG_FILES` for another
79
+ config file. The launcher sets `PI_SMOL_MODEL`, `PI_SLOW_MODEL`, and
80
+ `PI_PLAN_MODEL` to the free role values, warns once for each exported value
81
+ that it replaces, and appends the overlay to `PI_CONFIG_FILES`. See
82
+ [omp-models.md](omp-models.md#free-session-launcher-docks-kit-omp) for the
83
+ full policy and the paths that stay outside the launcher.
84
+
68
85
  The launcher changes no deployed file and never invokes `sync`, except for
69
86
  `--fast`, which changes only `tier.openai` and launches nothing. `--fast` over
70
87
  `ultrafast` selects `priority`.
@@ -75,8 +92,20 @@ never reach omp:
75
92
  - `--model`, `--pick`, `--fast`
76
93
  - `--help`, `--version`, `--log-level`, `--wizard`, `--completions`
77
94
 
78
- The same names on omp stay reachable behind an explicit delimiter. Use
79
- `docks-kit omp -- --help` to ask omp for help.
95
+ The same names, except `--model`, stay reachable on omp behind an explicit
96
+ delimiter. `docks-kit omp -- --help` prints the help of `omp launch`. A
97
+ forwarded `--model` stops the launcher with exit 2, also behind `--`.
98
+
99
+ ## `scratch` and `tidy`
100
+
101
+ | Command | Effect |
102
+ |------|--------|
103
+ | `scratch new <label>` | Create a private directory (mode 0700) `~/.cache/docks-kit/scratch/<label>-XXXXXX` and print its path; the label matches `^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$` |
104
+ | `scratch remove <path>...` | Remove each path whose real path is strictly inside the scratch root, the system temporary directory, or `/var/tmp`; print `removed <path>` or `refused <path>: <reason>`; exit 1 when any path is refused |
105
+ | `tidy` | List the safe leftover actions (`remove`, `stop`) and the kept candidates (`keep`) with reasons; change nothing |
106
+ | `tidy --apply` | Perform those actions under the lock `~/.cache/docks-kit/tidy.lock` and append the outcomes to `~/.cache/docks-kit/tidy.log`; exit 1 when an action fails |
107
+ | `tidy --repo <path>` | Take the worktree candidates only from that repository, at any location |
108
+ | `tidy --report` | After the plan, print read-only sections on memory, temporary directories, processes, Docker, caches, Trash, git, agent histories, scheduled jobs, and global installs |
80
109
 
81
110
  ## Renamed legacy flags (pre-CLI sync.sh)
82
111
 
@@ -423,13 +423,17 @@ overlay sets the 16 chat-model roles in `ompOverlay.ts ROLE_ORDER` to that
423
423
  model and empties the 13 retry fallback chains in `ompOverlay.ts
424
424
  FALLBACK_ORDER`. These roles include `memory` and `judge`. The SoT does
425
425
  not set them, but omp otherwise uses its built-in priority chain for them,
426
- and that chain can name a paid model. The overlay does not set the `web` role
427
- or its retry chain. The deployed web-search provider order therefore applies,
428
- and that order includes the paid `openai-codex/gpt-6-luna` entry. omp merges
429
- the overlay key by key. Each other deployed retry chain, such as a `plan`,
430
- `slow`, or `designer` chain, therefore stays as deployed. Such a chain can name
431
- a paid model. Higher-precedence model selection can replace the overlay
432
- values.
426
+ and that chain can name a paid model. The overlay also empties the retry
427
+ chains keyed by the free model: the bare selector, `<selector>:off`, and
428
+ `<selector>:<level>` for every level in `ompOverlay.ts THINKING_LADDER`. omp
429
+ uses a chain keyed by the model before a role chain, so a project or
430
+ `PI_CONFIG_FILES` chain for the free model could otherwise reach a paid model.
431
+ The overlay does not set the `web` role or its retry chain. The deployed
432
+ web-search provider order therefore applies, and that order includes the paid
433
+ `openai-codex/gpt-6-luna` entry. omp merges the overlay key by key. Each other
434
+ deployed retry chain, such as a `plan`, `slow`, or `designer` chain, therefore
435
+ stays in the merged config. A retry of the free model does not reach such a
436
+ chain, because omp uses the empty chain keyed by the free model first.
433
437
  The overlay also sets `defaultThinkingLevel` and `task.maxEffort`, except for
434
438
  a model that publishes no thinking ladder, where both keys are omitted and the
435
439
  deployed values apply.
@@ -447,31 +451,70 @@ apart. A session launch never reads or writes `~/.omp/agent/config.yml` or
447
451
  never touches the SoT. The next plain `omp` run uses the paid configuration
448
452
  again.
449
453
 
450
- Every argument after the launcher flags forwards verbatim to omp. `docks-kit
451
- omp -p "..."` runs one prompt. `docks-kit omp --continue` resumes the
452
- previous session. A bare `docks-kit omp` opens an interactive session.
454
+ The launcher starts omp as
455
+ `omp launch --config <overlay> --model <selector>[:<level>] [args...]`, where
456
+ `[args...]` are the arguments after the launcher flags, in the same order.
457
+ `docks-kit omp -p "..."` runs one prompt. `docks-kit omp --continue` resumes
458
+ the previous session. A bare `docks-kit omp` opens an interactive session.
459
+
460
+ `launch` makes omp read every forwarded word as message text. So `docks-kit
461
+ omp commit` sends `commit` to the free model as a prompt, and no omp
462
+ subcommand runs through the launcher. To run an omp subcommand such as
463
+ `commit`, `bench`, or `search`, run `omp` directly. The explicit `--model`
464
+ outranks the model that omp restores from a stored session. So `--continue`,
465
+ `--resume`, and `autoResume` keep the free model and its level.
466
+
467
+ ### Model selection that the launcher controls
453
468
 
454
469
  The overlay ranks above the deployed global and project configuration, and
455
- below runtime overrides and later overlay files. Each input below therefore
456
- selects a model that the overlay does not control:
457
-
458
- - A forwarded later config overlay. The launcher passes its own `--config`
459
- first, and omp applies a later overlay file over an earlier one.
460
- - The runtime model flags `--model`, `--smol`, `--slow`, and `--plan`. The
461
- legacy `--provider` flag selects a provider. `--models` sets the model
462
- patterns that `Ctrl+P` cycling can reach, so cycling can leave the free
463
- model.
470
+ below runtime overrides and later overlay files. The launcher handles each
471
+ known input that can select a model above the overlay:
472
+
473
+ - Forwarded model flags. The launcher rejects `--config`, `--model`,
474
+ `--smol`, `--slow`, `--plan`, `--models`, `--provider`, `--prewalk-into`,
475
+ and `--plan-yolo-into`, in the `--flag value` and the `--flag=value` form.
476
+ It exits with code 2 and starts no omp process. It checks every forwarded
477
+ argument, also after a `--`, because omp can read that `--` as the value of
478
+ a flag such as `--api-key` and then read the next flag. The error names the
479
+ flag and the recoveries. For a free model, put `--model <selector>` before
480
+ the other arguments or use `--pick`. For a paid model, run `omp` directly.
481
+ For another config file, list it in `PI_CONFIG_FILES`.
482
+ - A restored session model. The explicit `--model` keeps the free model.
483
+ - An omp subcommand. `launch` makes it message text.
464
484
  - The model environment variables `PI_SMOL_MODEL`, `PI_SLOW_MODEL`, and
465
- `PI_PLAN_MODEL`. `PI_CONFIG_FILES` is not in this set, because those files
466
- load before `--config` overlays.
467
- - The in-session model selector. `Alt+M` sets the roles, and `Alt+P` picks a
468
- model for the current session only.
469
- - A restored persisted session model. `--continue`, `--resume`, and
470
- `autoResume` restore the model of the session they open, so a session that
471
- started under the paid configuration returns to its paid model.
472
-
473
- This list names the known selection paths. It is not a closed set. The
474
- launcher does not reject these inputs today.
485
+ `PI_PLAN_MODEL`. The launcher sets each one to the overlay value of its
486
+ role in the omp environment, and prints one warning for each exported value
487
+ that it replaces. omp fills an unset or empty variable from its `.env`
488
+ files, so the launcher sets the variables instead of removing them.
489
+ - `PI_CONFIG_FILES`. The launcher appends the overlay path to the exported
490
+ entries, so an `omp` that the bash tool of the session starts loads the
491
+ overlay too. omp loads these files below `--config` overlays, so an exported
492
+ entry still applies below the overlay. A `PI_CONFIG_FILES` value in an omp
493
+ `.env` file does not apply in a launcher session, because the launcher
494
+ always sets the variable.
495
+ - The omp profile. The catalog check below covers every profile that the
496
+ launch can select.
497
+
498
+ ### Model selection outside the launcher
499
+
500
+ These paths act after omp starts or outside the chat roles. The launcher does
501
+ not control them:
502
+
503
+ - In-session selection. `Alt+M` (model hub), `Alt+P` (session-only picker),
504
+ `/switch <selector>`, `/model`, and `/modelpreset` can select any catalog
505
+ model. `/resume` and a session switch restore the model of the target
506
+ session. A seance subagent runs on the models of its source session. An
507
+ `Alt+M` assignment of the `default` role writes `modelRoles.default` to the
508
+ deployed `~/.omp/agent/config.yml`, so later plain `omp` runs use it too.
509
+ - The `web` role and its retry chain. By owner decision they keep the
510
+ deployed web-search provider order, which can reach the paid
511
+ `openai-codex/gpt-6-luna` entry.
512
+ - The model-kind roles `image`, `speech`, and `dictation`. A chat model
513
+ cannot serve them, so the overlay does not set them.
514
+ - Extensions and hooks. `-e`, `--hook`, and `--plugin-dir` run arbitrary
515
+ code, and that code can select any model.
516
+
517
+ These lists name the known paths. They are not a closed set.
475
518
 
476
519
  The default model is `opencode-zen/muse-spark-1.3-contributor-free` ("Muse
477
520
  Spark 1.3 Free", 1,048,576-token context) at `xhigh`. `xhigh` is the ceiling
@@ -500,11 +543,11 @@ zero input and output cost with `pricingStatus` `free` or `unknown` (26
500
543
  entries on 2026-09-11). A zero-cost row with another status, such as
501
544
  `variable` or `included`, is billed outside the token price, so the picker
502
545
  leaves it out. The resulting overlay sets the 16 `ROLE_ORDER` roles to the
503
- chosen free model and empties the 13 `FALLBACK_ORDER` chains. The `web` role,
504
- its chain, and each other deployed chain keep the deployed values.
505
- Higher-precedence model selection can replace those values. The catalog can
506
- advertise a free model that the account cannot call; omp reports that
507
- provider error unchanged.
546
+ chosen free model and empties the 13 `FALLBACK_ORDER` chains and the chains
547
+ keyed by that model. The `web` role, its chain, and each other deployed chain
548
+ keep the deployed values. The
549
+ catalog can advertise a free model that the account cannot call; omp reports
550
+ that provider error unchanged.
508
551
 
509
552
  After the model, the wizard asks about thinking levels. `ompOverlay.ts
510
553
  planEffortChoice` decides which questions apply, because omp accepts a
@@ -527,16 +570,25 @@ A session whose advisor differs from the other roles reports both on the
527
570
  launch line.
528
571
 
529
572
  An omp login is required. The kit owns no login flow. Every launch reads the
530
- live free catalog once. A plain launch checks the remembered model, or the
531
- default model, against that catalog. When the model is not there, the
532
- launcher stops before omp starts. The model can be renamed, repriced, or on a
533
- provider that is not logged in. Without this check, omp silently starts the
534
- default model of the first logged-in provider, which can be paid. When the
535
- forwarded arguments include `--profile <name>` or `--profile=<name>`, the
536
- catalog check queries that same omp profile with
537
- `omp --profile <name> models --json`. As in omp, the last such flag before a
538
- `--` wins, and a `--profile` without a name stops the launcher before omp
539
- starts.
573
+ live free catalog of each candidate profile. A plain launch checks the
574
+ remembered model, or the default model, against those catalogs. When the
575
+ model is not there, the launcher stops before omp starts. The model can be
576
+ renamed, repriced, or on a provider that is not logged in. Without this
577
+ check, omp silently starts the default model of the first logged-in
578
+ provider, which can be paid.
579
+
580
+ Each omp profile has its own login and `models.yml`, so a selector can be
581
+ free in one profile and missing or paid in another. The candidate profiles
582
+ are the profile of the environment (`OMP_PROFILE`, `PI_PROFILE`, or the
583
+ default) and each forwarded `--profile <name>` or `--profile=<name>` value.
584
+ The launcher reads every forwarded argument, also after a `--`, because omp
585
+ can read that `--` as a flag value and then select a later profile. It runs
586
+ `omp models --json` for the profile of the environment and
587
+ `omp --profile <name> models --json` for each forwarded name. The session
588
+ model must be free in every one of these catalogs. `--model` and `--pick`
589
+ choose from the catalog of the last forwarded profile, or of the profile of
590
+ the environment when the arguments name none. A `--profile` without a name
591
+ stops the launcher before omp starts.
540
592
 
541
593
  When the catalog renames the free variant, change only the default selector
542
594
  constant. Until then, a plain launch on that default stops with an error. A
package/cli/src/argv.ts CHANGED
@@ -10,6 +10,8 @@ import { syncCommand } from "./commands/sync";
10
10
  import { toolchainCommand } from "./commands/toolchain";
11
11
  import { updateCommand } from "./commands/update";
12
12
  import { ompCommand } from "./commands/omp";
13
+ import { scratchCommand } from "./commands/scratch";
14
+ import { tidyCommand } from "./commands/tidy";
13
15
  import {
14
16
  buildSurfaces,
15
17
  normalizeArgv,
@@ -37,6 +39,8 @@ const COMMANDS: ReadonlyArray<CommandValue> = [
37
39
  skillsCommand,
38
40
  docsCommand,
39
41
  ompCommand,
42
+ scratchCommand,
43
+ tidyCommand,
40
44
  ];
41
45
 
42
46
  const SURFACES: ArgvSurfaces = buildSurfaces(COMMANDS, GlobalFlag.BuiltIns);