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
+8 -4
View File
@@ -64,7 +64,9 @@ cd pipelines
```
Native setup reuses your existing host OpenCode login and never installs,
upgrades or downloads OpenCode/Pi. Start it with
upgrades or downloads OpenCode/Pi. It writes host harness profiles (no Docker
link) for the harnesses it detects, so authoring works immediately, and clears a
stale Docker link when migrating a Docker install. Start it with
`PIPELINES_PREFIX=~/.local/share/pipelines ~/.local/share/pipelines/bin/pipelines start`.
When Docker volumes are present it migrates the existing database and ntfy auth
store (never overwriting newer native data; use `--replace-data` to opt in). See
@@ -319,8 +321,9 @@ pipelines ping --json # running server identity
pipelines help edit
```
CLI `new`/`edit` open the configured harness (**OpenCode** or **Pi**) directly with
the Pipelines skill. The installed skill asks
CLI `new`/`edit` open the configured harness (**OpenCode** or **Pi**, native host
by default; a profile is Docker-linked only when a checkout is explicitly linked)
directly with the Pipelines skill. The installed skill asks
missing questions; `pipelines new` needs no preliminary questionnaire. Changes stay
as drafts by default; CLI and TUI share validation and draft storage. Most
commands support `--json` for agents and scripts.
@@ -330,7 +333,8 @@ CLI-created ones. **e** reopens a draft, **v** validates it, and **s** opens exp
submission confirmation, asking for a name first if needed. Drafts remain retained
after submission. Drafts are portable: submit to the currently connected server.
When that differs from the origin, submission creates a new pipeline rather than
applying the origin's version number to an existing destination pipeline.
applying the origin's version number to an existing destination pipeline, and a
notice names both server URLs instead of silently retargeting the draft.
From a run, press **P** / **:pipeline** to open the pipeline version it used.
Initial run input also records `pwd`. Press **r** / **:retry** on a failed run