Configure full Docker setup and confirm consequential actions

This commit is contained in:
2026-10-09 21:34:47 +01:00
parent f60599230c
commit f700d1beb2
31 changed files with 587 additions and 49 deletions
+16 -5
View File
@@ -157,7 +157,7 @@ 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 `--json`, `--wait`, and
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.
@@ -212,7 +212,8 @@ published definition. Submission remains separate and explicit.
In the draft browser, `x` asks to delete the selected draft; `y` confirms and
Esc or `n` keeps it. The CLI equivalent, `pipelines draft-delete <draft.md>`, is
an explicit deletion command and needs no server connection; `--json` reports
the result. Only managed drafts inside the configured draft cache are accepted.
the result. It asks for confirmation; `--yes` explicitly approves scripted deletion.
Only managed drafts inside the configured draft cache are accepted.
Source and metadata symlinks/directories and external Markdown files are
rejected. Published definitions and run history are not deleted. Cleanup can
also remove orphaned metadata when a draft source was already removed.
@@ -230,14 +231,24 @@ an immutable version in JSON mode. Starting a run enables its stage-declared too
without a second approval. Editing supports all file types and new files within
the run directory; no file list is required. Shell commands use the repository's
actual tooling. `--write-paths` is an optional narrower scope, not a prerequisite.
`--yes` and `--allow-tools` remain compatibility flags but are not required.
`--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 starts immediately with a live inspector.
When a task is omitted, Enter inserts a newline and Ctrl+S runs the composed task.
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
user's authority: the run directory and tool policy are not an OS sandbox.
Run, retry, cancellation, CLI publication, and draft deletion require confirmation.
CLI prompts go to stderr and default to No; use `--yes` for non-interactive approval.
The TUI's run/retry/cancel popup accepts `y`; Enter does not implicitly approve,
and `n`/Esc cancels without sending the action. Retry restarts with new sessions
and original input/pwd, never the failed conversation; side effects may repeat.
Publication retains its explicit submission confirmation and version conflict guards.
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.
+14 -1
View File
@@ -1,5 +1,18 @@
# Pipeline server + ntfy in one Compose project (Android)
## Complete installer (recommended for both services in Docker)
Run `./install.sh --docker` from an interactive terminal. It handles Compose
configuration, ntfy users/permissions/token, image build, container skill install,
first-time container OpenCode provider login, startup, and an authenticated test
notification. Choose your own provider in OpenCode; signup/login credentials stay
in the Docker volume, not your host OpenCode account. Re-run to update while
preserving `.env`, tokens, histories and volumes. Use `--relogin` to connect another
provider. No fixed OpenCode Go login is required. Health/publishing checks do not
prove model inference or phone reception.
The steps below are for manual setup or a local Pipelines server with Docker ntfy.
## Local pipeline server, Docker ntfy
To reuse your host OpenCode login without container authentication:
@@ -91,7 +104,7 @@ docker compose up -d
docker compose logs -f pipelines
```
Select **OpenCode Go** and follow its authentication flow. Credentials are stored
Select your preferred provider and follow its authentication flow. Credentials are stored
in the dedicated `opencode-home` volume, separate from your host account. These
container commands are **not tested** here. The image includes Go/git for the
existing narrowly approved verification tools; the actual server runs as uid 10001.
+30 -5
View File
@@ -1,22 +1,46 @@
# Installation
Installation requires **Go only**. OpenCode is needed when authoring or executing
model stages. Docker/ntfy is optional and is configured separately.
The interactive installer offers **Docker server + ntfy** (default) or **native
binaries only**. Native installation requires Go; Docker setup requires Docker
Compose and Python 3, and includes OpenCode in the persistent server container.
```sh
git clone https://git.a-wan.net/alan/pipelines.git
cd pipelines
./install.sh
# Equivalent: go install ./cmd/... && pipelines skill install
# Explicit choices:
./install.sh --docker # complete server/ntfy setup, including provider login
./install.sh --native # binaries/skill only; honors GOBIN/GOPATH
```
This installs `pipelines`, `pipelines-server`, and `pipelines-tui`. Go chooses the
Native mode installs `pipelines`, `pipelines-server`, and `pipelines-tui`. Go chooses the
destination using `GOBIN`, or the usual `GOPATH/bin` default. Put that directory
on PATH. No privileged operations, private dependency installation, login prompts,
Docker provisioning, service registration, or background processes are involved.
Re-running installation updates the binaries and bundled OpenCode skill without
changing databases, login, or OpenCode configuration files.
Docker mode prompts for the phone-facing ntfy base URL, explicit bind IP, and
timezone if it cannot be detected. It preserves an existing `.env`, bootstraps
the publishing/phone accounts and publishing token, builds the server, installs
the skill inside the container, and opens **container OpenCode provider login**
on first setup. Choose any supported provider; signup is handled by that provider.
Provider credentials remain in the `opencode-home` volume. Reinstalls skip login
after completed setup; `./install.sh --docker --relogin` opens it again without
deleting accounts. The installer then starts/recreates the Compose services,
checks ntfy health through Pipelines, and sends an authenticated test notification.
It does not register an OS service, delete volumes, or seed pipeline definitions.
Phone reception/model inference are not verified by installation.
For fresh configuration you can supply `--ntfy-url https://ntfy.example.com
--bind-address 127.0.0.1 --timezone Europe/London --port 8081` after `--docker`.
Use a LAN/VPN interface IP instead of loopback for direct phone access; only use
plain HTTP on a trusted network. Existing `.env` settings are never silently
replaced. Without a terminal, no-argument installation remains binary-only and
prints that limitation; use an interactive terminal for first Docker/provider setup.
Install native mode as well if you want host CLI/TUI binaries; Docker mode installs
the server and CLI in its image. See [Docker setup](docker.md).
For a private repository, use your normal Git credentials and `GOPRIVATE`:
```sh
@@ -112,7 +136,8 @@ No login or provider credentials are copied or exported by Pipelines.
## Optional notifications
Use an existing ntfy server or the optional Docker setup in [docs/ntfy.md](ntfy.md).
Full Docker installation configures this automatically via `./install.sh --docker`.
For native mode, use an existing ntfy server or the Docker setup in [docs/ntfy.md](ntfy.md).
Configure `PIPELINES_NTFY_URL`, `PIPELINES_NTFY_PUBLIC_URL`, and a publishing token
via `PIPELINES_NTFY_TOKEN_FILE` in the server's environment. Keep secrets out of
pipeline definitions. Use HTTPS or an encrypted VPN for phone access; do not
+16 -1
View File
@@ -23,9 +23,24 @@ now references that skill directly instead of preloading instructions.
Native generation/assistant completion parsing is regression-tested against a
controlled HTTP server. Full live inference, permission enforcement by real model
tool calls, cancellation during inference, optional Docker deployment, privileged
tool calls, cancellation during inference, Docker provider authentication, privileged
system-wide copying, and OS service-manager registration are **not tested**.
The full Docker installer was exercised in an isolated Compose project with real
ntfy and Pipelines containers: image build, account/ACL/token bootstrap, Compose
health checks, authenticated notification publishing from the Pipelines container,
CLI status, reinstall preservation of `.env`/token, and an empty pipeline database.
Provider-account inspection/login completion was mocked in that installer test.
A separate real-container PTY invocation of `opencode auth login` displayed its
searchable provider choices and was canceled without credentials. Provider login,
model inference and phone delivery remain **not tested**.
Consequential-action regressions check run/retry/cancellation and CLI publication/
draft deletion confirmation, default-No behavior, JSON stdout cleanliness, and
`--yes` for explicit automation. The compiled CLI/TUI PTY check verified that `q`
does not exit, `:quit` exits, canceled retry prompts create no run, and an explicit
`y` starts a new retry with the original input/directory and pinned version.
Autostart regression tests exercise both service-definition formats, scoped
environment capture, escaping, private files, refusal to overwrite unmanaged
files/symlinks, preview without side effects, and lifecycle calls using a mock OS