Move harness profiles between host and Docker and stop silent draft retargeting

Native installs left Docker-era harness profiles in harnesses.json, so every
authoring launch failed trying to reach a Docker service, and a retained draft
bound to the old Docker server was silently projected onto the configured one.

- harness: add Profile.Mode and VerifyDockerLink as the single mode/verification
  helpers. `harness setup --host` configures or converts a host profile and
  clears docker_directory; reconfiguring a Docker-linked profile re-verifies the
  recorded directory still owns compose.yaml and fails naming it instead of
  saving a link that cannot launch. Setup's summary and `harness list` (via the
  new List/ListView shape) report the resulting mode and, for Docker, the
  directory, without changing the stored Config schema.
- setup-native.py: after build/install-skill it writes host (no docker_directory)
  profiles for the detected harnesses, defaulting to the detected OpenCode profile
  rather than a stale pi default, taking models from --model or the existing valid
  profile and never inventing one; it clears a stale Docker link and preserves
  unrelated keys/profiles. Detection-only: no harness install, upgrade or download.
- draft: add Draft.Resolve, the shared mismatch helper, which projects a draft
  onto the configured server and returns a dual-URL notice. CLI validate/submit
  and the TUI draft browser use it so a foreign draft is never silently
  retargeted; the TUI pre-wraps the notice to the panel width.
- Tests cover the Docker->host and host->host transitions, the missing-directory
  failure, installer write/migration (Python), and the CLI/TUI notice, using the
  real config file path in a temp dir.
- Update help text, README, docs and the packaged authoring skill reference to
  describe host as the default and the Docker-linked case.
This commit is contained in:
2026-10-15 19:53:10 +01:00
parent d00bd37833
commit 914345cb31
21 changed files with 732 additions and 141 deletions
+12 -2
View File
@@ -65,7 +65,10 @@ the last verified Dockerfile fallback pins); they never guess, fall back to a ho
runtime or install a stale pin.
Without a Docker installation, `./install --opencode`/`--pi` stop and require an
existing Docker setup; the native installation reuses the host OpenCode
configuration. Container and host credentials and accounts remain independent and
configuration, writes **host** (non-Docker) profiles for the harnesses it detects
into XDG config home's `pipelines/harnesses.json`, and clears a stale Docker link
so a Docker-era profile is not left Docker-linked. It never installs, upgrades or
downloads a harness. Container and host credentials and accounts remain independent and
are reused on reinstall/reconfigure. `./install` installs natively by default
(`--native` is equivalent); explicit `./install --docker` selects the Docker
server + ntfy installation.
@@ -74,7 +77,14 @@ login. Existing setup can configure either harness independently. Pi setup does
not run a generation check; `provider-check --harness pi --model PROVIDER/MODEL`
is a separate confirmed, potentially chargeable check.
Profiles live in XDG config home's `pipelines/harnesses.json`, store preferences
only, and preserve unrelated configuration. Harness CLI setup/default commands
only, and preserve unrelated configuration. A profile launches a native host
harness unless it records a Docker checkout directory, in which case it launches
through that installation's Compose service. `harness setup <opencode|pi> --host`
configures or converts a host profile and clears any Docker link; without
`--host`, reconfiguring a Docker-linked profile re-verifies that the recorded
directory still has `compose.yaml` and fails naming it rather than saving a link
that cannot launch. Setup's summary and `harness list` report the resulting mode
(and, for Docker, the directory). Harness CLI setup/default commands
always configure the local execution user, not a remote `--url` server.
OpenCode interactive launch uses
`mini --model`: verified V2 full CLI lacks a model flag. Pi uses its CLI with the