Make Pipelines Docker-only with OpenCode and Pi

Install current verified harness releases inside Docker, preserve persistent accounts and settings, and provide separate interactive and pipeline model defaults with terminal onboarding and fuzzy pickers.

Add Docker-aware authoring transport, Pi stage execution, bounded workflow controls, reliable final-result readback and usage settlement, and finite short-lived CLI pipe draining. Keep dated installation evidence and packaged authoring guidance consistent.

Verified with a real Docker installation, both harness stages and interactive authors, the built-in plan/implement/review starter, independent host race/vet checks, installer tests, and packaged skill tests. Generated release receipts stay ignored in clean checkouts.
This commit is contained in:
2026-10-11 23:00:25 +01:00
parent c42a19f7d3
commit 05ae530442
131 changed files with 9297 additions and 355 deletions
+88 -47
View File
@@ -18,6 +18,16 @@ separately. Set `PIPELINES_URL` or pass `--url` to select another server.
## Dashboard and status
`pipelines --url ws://HOST:PORT/connect ping --json` returns `pong` with the
running server's compiled `build.version`, full Git `build.commit`, and
`build.dirty`. Uncommitted builds have a `-dirty` suffix. Missing metadata is
explicit (`commit: "unknown"`, `dirty: null`); older servers omit `build`.
This identifies the server binary, not the CLI or files mounted into the container.
Plain `ping` also prints the server version/commit. `pipelines version --json`
(or `pipelines --version`) identifies the local client without connecting to a
server. Include both identities when reporting a problem; they can differ.
Home's `r` opens **all** runs, not only failures or the newest 50. Inside a pipeline,
`r` and `:runs` show only that pipeline's runs across its versions. In any run list,
press `/` for fuzzy search, type to filter, and Enter to return to the results.
@@ -51,26 +61,37 @@ ntfy hosts are not misrepresented as local. Publishing URLs and credentials are
never returned. Missing public phone configuration is labeled explicitly.
`pipelines service status` remains the separate OS autostart status command.
## Draft-first OpenCode workflow
## Draft-first harness workflow
```sh
pipelines new # OpenCode asks what to build and names it
pipelines new # the configured harness asks what to build and names it
pipelines edit # fuzzy pipeline selection
pipelines edit "bug fix" # ask OpenCode what to change
pipelines edit "bug fix" # ask the harness what to change
pipelines edit "bug fix" "Add a review step"
pipelines new "release notes" "Summarize changes and notify my phone"
pipelines new "Text summary" --template summary
```
`new` opens OpenCode immediately when its name/request is omitted. The skill asks
only for missing decisions and records the chosen name in draft metadata. `edit`
accepts an exact name or ID, with names taking precedence over numeric IDs.
Both retain private drafts and launch the host interface once with a short
`@pipelines` reference and context-file path. There is no preliminary OpenCode
API call, temporary service, session creation, or instruction preload.
`install.sh` installs/updates the global skill and format reference. Plain
`new` opens the configured harness (Pi or OpenCode; Docker-linked by default)
immediately when its name/request is omitted. The skill asks only for missing
decisions and records the chosen name in draft metadata. `edit` accepts an exact
name or ID, with names taking precedence over numeric IDs. Both retain private
drafts and launch the harness once with a short `@pipelines` reference and
context-file path. There is no preliminary harness API call, temporary service,
session creation, or instruction preload. The prompt's CLI prefix is
Docker-aware: a Docker-linked profile embeds the in-container `pipelines`
executable and, for this Compose service's own loopback endpoint, scoped
transport aliases. Loopback is recognized only for parsed IP literals and the
exact `localhost` name (case-insensitive), so a remote DNS name such as
`127.remote.example` stays remote with no Docker probe. The single bounded
`docker compose port` probe must return a complete `host:port` binding that
covers the requested loopback address and port (wildcard or matching family);
malformed or non-matching bindings fail clearly, and a loopback `wss` endpoint
is rejected as having no supported local TLS mapping rather than downgraded to
plaintext. nvim remains a client-side editor.
`./install` installs/updates the global skill and format reference. Plain
`go install` users run `pipelines skill install` separately. Shared login/config
and user-modified skills are preserved; OpenCode permissions remain in effect.
and user-modified skills are preserved; harness permissions remain in effect.
The skill encourages editing only the draft, running server validation, summarizing
the changes, and leaving submission to the user. This is an instruction, not a
@@ -88,15 +109,15 @@ instead. Both paths inherit the configured default model and preserve existing
pipelines/history. The research starter requires configured web search support.
Home's `n` / `:new` and **Customize** (`e`) on a template first ask how to author the new
pipeline: **nvim** opens a retained Markdown draft file, or **OpenCode** opens
the collaborative harness with `@pipelines`. Tab/Shift+Tab or arrows select;
typing fuzzy-searches the choices; Enter launches and Esc cancels without
creating a draft. The choice overrides `VISUAL`/`EDITOR`. New drafts preserve
pipeline: **nvim** opens a retained Markdown draft file, or a configured harness
(Pi/OpenCode) opens the collaborative session with `@pipelines`. Tab/Shift+Tab or
arrows select; typing fuzzy-searches the choices; Enter launches and Esc cancels
without creating a draft. The choice overrides `VISUAL`/`EDITOR`. New drafts preserve
the create-only publication guard and still require explicit submission unless
you already published them from OpenCode. OpenCode can ask for a missing name;
for an unnamed nvim draft, `pipelines submit <draft.md> --name NAME` names and
publishes it. CLI `pipelines new` retains its existing direct-OpenCode behavior;
`--no-open` creates the file without launching an editor.
you already published them from the harness. The configured harness can ask for a
missing name; for an unnamed nvim draft, `pipelines submit <draft.md> --name NAME`
names and publishes it. CLI `pipelines new` retains its existing direct-harness
behavior; `--no-open` creates the file without launching an editor.
Press `d` on the dashboard or use `:drafts` to browse the same retained drafts as
`pipelines drafts`. Use `n/p` to select, `j/k` to scroll source, `e`/Enter to reopen
@@ -119,8 +140,10 @@ and reloads the latest pipeline/page and Home list. Local-only changes still nee
explicit submission. A failed check retains the draft and says publication could
not be verified; it never assumes publication from an editor's exit code. Original
draft conflict guards and retained draft files remain unchanged.
New unnamed drafts open OpenCode so the skill can name them. For named drafts,
the default editor is OpenCode; explicit `VISUAL`/`EDITOR` overrides remain.
New/edit drafts open the configured default harness; `--harness opencode|pi|nvim`
selects another configured harness or nvim. TUI pickers show only configured
harnesses, default first, plus nvim. See [harnesses and runtime control](harnesses-and-control.md)
for fuzzy model setup, separate defaults, shared memory and runner-owned limits.
For agents or scripts that should not open a terminal:
@@ -188,10 +211,10 @@ you invoked Pipelines from), alongside the task and any custom input fields.
It is recorded by the server and shown in the run's Input section.
Press `r` or use `:retry` on a failed run to restart it from the first stage.
CLI equivalent: `pipelines retry <run-id>` (optional `--yes`, `--json`, `--wait`, and
`--request-key`). The new attempt retains the initial input, directory, pinned
pipeline version, and edit scope, and records `retry_of`. Original history is
unchanged. Legacy runs gain `pwd` from their recorded workspace on retry.
CLI equivalent: `pipelines retry <run-id>` (optional `--yes`, `--json`, `--wait`,
`--wait-timeout`, and `--request-key`). The new attempt retains the initial input,
directory, pinned pipeline version, and edit scope, and records `retry_of`. Original
history is unchanged. Legacy runs gain `pwd` from their recorded workspace on retry.
Retry replays the entire workflow; earlier edits or notifications are not undone
and may happen again. A missing original directory blocks retry rather than
silently using your current directory.
@@ -244,33 +267,41 @@ keep both labels readable. Failure-bound error exits remain at the bottom.
Pipeline and run graph panes both center horizontally and vertically when the
diagram fits, and clamp scroll/pan offsets on resize or graph changes.
Press `a` to select the active/latest retained OpenCode agent session and open its
tool evidence. Session ID is available during execution; tool transcripts appear
when persisted (currently after generation). This does not attach a live OpenCode
client or stream its messages. Supporting live attachment consistently across the
shared and privately owned OpenCode backends is deliberately deferred.
Press `a` to select the active/latest retained configured-harness agent session and
open its tool evidence. Session ID is available during execution; tool transcripts
appear when persisted (currently after generation). This does not attach a live
harness client or stream its messages. Supporting live attachment consistently
across the shared and privately owned harness backends is deliberately deferred.
## Investigating runs in OpenCode
## Investigating runs with a configured harness
On the runs list or inspector, press `D` or use `:debug`; CLI equivalent:
`pipelines debug <run-id>`. This opens a fresh normal OpenCode conversation, not
the implementing session. It supplies exact commands for `inspect <run-id>
--json` (including stage history, inputs/outputs, diagnostics, notifications,
session IDs and transcripts), `show <pipeline-id> --version N --json`, and
`runs --pipeline <pipeline-id> --json`. All retrieval remains available through
the CLI and can be repeated while execution is active. No new model API or
live attachment integration is required.
`pipelines debug <run-id>`. This opens a fresh conversation in the configured
harness (Pi or OpenCode), not the implementing session. It supplies exact
commands for `inspect <run-id> --json` (including stage history, exact outputs,
diagnostics, notifications, session IDs and bounded transcript previews),
`show <pipeline-id> --version N --json`, and `runs --pipeline <pipeline-id>
--json`. The commands reuse the same Docker-aware CLI prefix as authoring, so a
Docker-linked profile runs them in-container against the original logical
endpoint. All retrieval remains available through the CLI and can be repeated
while execution is active. No new model API or live attachment integration is
required. The injected server-side session evidence is the latest bounded,
credential-redacted evidence for up to the 3 most recent session-bearing steps;
when a preview is bounded or omitted, inspect the retained session itself rather
than assuming a complete tool history.
`debug --json` returns the context and prompt without launching OpenCode;
`--no-open` prints the prompt. `--opencode` selects the executable. Debugging
`debug --json` returns the context and prompt without launching the harness;
`--no-open` prints the prompt. `--harness opencode|pi|nvim` selects a configured
harness or nvim; `--opencode` selects the host executable. Debugging
works for active and terminal runs and does not automatically retry, cancel,
or resume them. If the recorded directory is unavailable, OpenCode launches
or resume them. If the recorded directory is unavailable, the harness launches
from your current directory and retrieves historical evidence through the CLI.
## Editor choice and draft cleanup
On the pipeline detail page, `e` / `:edit` opens an editor picker: **nvim** or
**OpenCode**. Type to fuzzy-search; Tab/Shift+Tab (or arrows) choose; Enter opens;
the configured harness (Pi/OpenCode, default first). Type to fuzzy-search;
Tab/Shift+Tab (or arrows) choose; Enter opens;
Esc cancels without creating a draft. Explicit choice overrides VISUAL/EDITOR.
Both choices edit a retained copy with the normal version guard, never the
published definition. Submission remains separate and explicit.
@@ -287,7 +318,7 @@ also remove orphaned metadata when a draft source was already removed.
```sh
cd ~/repos/project
pipelines run "bug fix" "Fix the layout" --json
pipelines run "bug fix" "Fix the layout" --json --wait --timeout 10m
pipelines run "bug fix" "Fix the layout" --json --wait --wait-timeout 10m
pipelines run "bug fix" "Fix the layout" --json --request-key my-unique-task
```
@@ -300,8 +331,13 @@ actual tooling. `--write-paths` is an optional narrower scope, not a prerequisit
`--yes` skips action confirmation for explicitly approved automation;
`--allow-tools` remains a compatibility flag and is not required.
`--wait` polls until terminal status, returns nonzero on failure/cancellation,
and does not cancel a run when waiting times out. Reuse `--request-key` to prevent
duplicate work. A supplied pipeline/task opens an action-confirmation popup before
and does not cancel a run when waiting times out. `--wait-timeout` bounds only the
client wait after admission and is independent of the per-request `--timeout`; a
reached wait limit leaves the admitted run active and never cancels or replays it.
When it is reached, inspect read-only with `pipelines inspect <run-id> --json`, or
keep waiting by rerunning `--wait` and reusing the original `--request-key` rather
than starting a duplicate run. Reuse `--request-key` to prevent duplicate work.
A supplied pipeline/task opens an action-confirmation popup before
starting with a live inspector (unless `--yes` was supplied). When a task is omitted,
Enter inserts a newline and Ctrl+S opens the confirmation for the composed task.
There is no file-list question or typed RUN confirmation. Shell runs with your
@@ -317,8 +353,9 @@ Quit with `:quit`, not `q`; Ctrl+C remains an interrupt.
JSON results go to stdout, errors to stderr (JSON error envelopes when requested),
and failures exit nonzero. Export/template `--source` deliberately prints raw
Markdown. `--timeout` bounds each server request and the optional wait duration.
It does not change the stage execution timeout.
Markdown. `--timeout` bounds each server request; `--wait-timeout` bounds the
optional client wait independently and, when reached, leaves admitted work active.
Neither changes the stage execution timeout.
### Stage limits
@@ -350,6 +387,10 @@ retry potentially delivered notifications and do not accept model budgets.
Pinned definitions contain the configured limits. Run transcripts retain limits,
attempt counts and reported budget usage, also shown in the TUI's Evidence pane.
Exact stage outputs are authoritative; a transcript over the 32 KiB retained
bound is stored as a valid, credential-redacted preview envelope that preserves
available stage limits and failure/format diagnostics and names the retained
session instead of slicing to malformed JSON.
### Result-first views