The template catalog is now Example 1-4: one stage, two stages (handoff),
feedback loop (runner-owned limits, retries, timeout) and human decision
(type=human approve/revise/abort with notify hooks). All read-only or leave
changes uncommitted; none commits, pushes or deploys.
A brand-new database (schema created by this Open) gets the examples once at
server start, bound to the configured default model and harness. A
server_settings marker records the decision, so removed examples never come
back and existing installs are marked without any pipeline being added or
rewritten.
Adds the copy-paste prerequisites for Linux (Docker group, Go from go.dev,
OpenCode), the PATH line for the installed CLI, and enable-linger so the
systemd --user service survives logout.
Checks the CLI on the server's PATH (install command when missing), signs in
with the harness's own login only when needed (--login forces it), keeps the
OpenCode/Pi model pickers, and verifies with the server's check. Works on
native and Docker installs (Docker delegates to the container setup); --host
is a hidden compatibility alias. harness list shows all four harnesses'
installed/signed-in/configured/default status. ./install --opencode|--pi now
point to the command; ./install ends with the next-step hint.
Rewrite the README around the server, web/Android app and CLI, and
replace docs/install.md with the current native install (all-or-nothing
Docker web build, flags from setup-native.py, lifecycle commands, data
locations, password, upgrading). Add docs/harnesses.md and
docs/notifications.md; point ntfy.md at the new overview and fix its
topic name.
Each model visit now gets <run>/stages/<seq>-<stage>/ with input.md,
memory.md, output.md, private/ and a shared run-level public/. The model
reads the two input files, follows the stage's instructions verbatim and
returns complete markdown; only the # outcome section is parsed.
- add internal/turn layout, render and output parsing
- write input.md/memory.md before a visit and output.md from the final
message; inventory all turn files as stage artifacts
- accumulate completed turns and system-written public file additions in
memory, including across retries and resume
- remove the JSON envelope, strict field validation, line format and the
repair ladder for model stages
- republish pipeline authoring prompts and docs in the new style
Checks: go build ./..., go vet ./..., go test -count=1 ./..., gofmt -l .
Keeps this branch's advisory review edge, bounded blocked_retryable implementer
edge and their tests alongside main's run-attention/ntfy notification work, the
split of the Android chat conversation screen, and the retention/history changes.
No conflicts: the two sides touch disjoint files.
Nothing told the operator that a run was waiting for a person or had failed; they
found out by going looking. A run that needs attention now reaches the ntfy they
already run, and the app answers "what needs me now" in one live, ordered surface.
Server (smallest change, reusing the existing publisher):
- internal/server/notify.go adds notifyRun, called from finishRunState (failed)
and when a run parks on a human (runner.go runLoop). It publishes to the same
already-configured `system` destination through the unchanged stage.PublishNtfy,
so there is no second publisher, topic or service and the token handling is the
stage's own. runAttentionEvent maps only waiting and failed; queued, running,
succeeded, canceled and interrupted publish nothing.
- No storms: runner.attentionSent records sequence:event per run before publishing,
so a run that stays waiting is never republished on a re-request or restart, and
a stage notify policy that already covers the same event marks it first so the
run-level default is suppressed. The set is dropped when the run is terminal. A
delivery failure is logged, never fails the run, and is not retried.
- The payload names the run and pipeline and carries a click action
pipelines://run/<id> (validated: absolute URL, no userinfo, no fragment, no
credentials). PublishNtfy gained the optional click parameter; existing callers
pass "".
App:
- AndroidManifest/MainActivity declare the pipelines://run/<id> deep link
(singleTop); runIdFromDeepLink parses it and PipelinesApp opens that run once,
clearing the link. It opens a run; it starts nothing.
- ui/Attention.kt is the pure model (status -> Decision/Failed/Finished or
nothing, ordered by kind then newest-first) and ui/components/AttentionSurface.kt
is the floating indicator plus bottom sheet. It is derived from the same run
events the server already pushes, so an entry appears with no refresh and clears
when resolved; a finished run clears once looked at, and any entry can be
dismissed, persisted in SettingsRepository. The existing destinations, pill and
bottom strip are untouched and no competing navigation surface is added.
Checked before committing:
- Packaged authoring skill references: internal/author/skill/references/
notifications.md documents the automatic run-attention notifications and the
app surface. The only packaged "template" carrying notify is that reference; no
pipeline definition template exists to update and install.go's managed file list
is unchanged (notifications.md already existed).
- Repository guidelines: docs/ntfy.md gains an "Automatic run-attention
notifications" section and no longer claims "No block means no notifications";
the top-level README phone-notifications note now says a waiting/failed run
notifies automatically; android/README.md gains the dated feature section and
supersedes the previous section's note that the attention surface was absent.
- docker.md, install docs and the CLI/TUI docs describe mechanisms this change
does not alter; left as they are.
Tests: go test ./internal/server/... ./internal/stage/... ./internal/author/...
all ok; notify_test.go covers the event mapping and the real HTTP delivery
(destination, topic, click, no duplicate). Android :app:testDebugUnitTest ->
BUILD SUCCESSFUL, 58 suites / 531 tests / 0 failures (new AttentionTest, 13 cases,
covering ordering, appearing from a push, clearing on resolution, dismissal, the
empty case, persistence and the deep link). Device screenshots and the phone's own
notification are visual review's per the brief's device policy.
Scope: android/ plus the smallest server change; no new dependency, no run started
from the app, no installer or Docker change.
Bring the packaged starters and the pipelines skill up to the guidelines the
project now works to.
Templates:
- task and three-stage now end in a committer stage that stages the union of the
runner's captured input.server_changed_files and the producer's declared
changed_files, runs the repository's checks, commits locally and never pushes;
their producers no longer commit.
- Every model/agent prompt states the line-oriented result contract (outcome on the
first non-empty line, "# output" JSON map, other "# <heading>" sections kept
verbatim as evidence) and an "# evidence" section for exact commands and results,
with proportionate verification and no fabricated checks.
- Stages that can write save their reports, logs and screenshots into the runtime
artifacts directory.
- Remove the summary starter: a tool-free single-prompt text transform with no
repository interaction, artifact or commit is a format demonstration, not a
reusable workflow. No starter invents a pretend approval stage; a decision point
is a type=human stage.
Skill:
- references/format.md gains a Result format section (line form, legacy JSON
precedence, result_parse, raw-output.md, artifacts) and a Committer stages
section with the pre-commit checklist; the role-split and envelope notes mention
the line form and the committer.
- orchestration.md points at the checklist and records that a genuine gate is a
human stage; operations.md and the SKILL.md index drop the removed starter and
name the result format and committer. No new reference, so the managed inventory
is unchanged.
Docs/tests: examples/README, README, docs/cli, docs/first-version-testing, the CLI
help example and the smoke script track the four starters; catalog, tool-role,
server, tui and pipeline tests are updated, with a new test pinning the committer
ending and server-captured change set.
Commands run: go build ./...; go vet ./...; go test ./...; python3 -m unittest
discover -s scripts -p 'test_*.py'; python3 scripts/smoke-first-install.py. All
passed. Templates inspected through an isolated CLI server (pipelines templates;
pipelines template KEY --source). No server, service or device was restarted, and
nothing was pushed.
Exchange a build/protocol identity so an older CLI can no longer talk to a
newer native server silently:
- protocol carries ProtocolVersion and every server frame (including the
unsolicited welcome) is stamped with the server build and protocol, so a
client that never pings still learns the server identity.
- buildinfo.Compare classifies the relationship as InSync/Warn/Refuse and
names both builds; the client Watch reports one warning per connection and
returns a hard error when the server speaks a newer, uninterpretable
protocol so the caller never acts on the frame.
- client.ReceiveNotice decodes the raw frame so an unmodeled top-level field
produces a one-time "unrecognized field(s)" notice instead of being dropped
silently (the case that hid the artifacts field).
- CLI routes warnings to stderr, keeps machine JSON stdout clean and fails
non-zero on a refused mismatch; ping/connection print the client/server
relationship. The TUI surfaces the same notices through the shared log.
- scripts/setup-native.py now warns when an older `pipelines` earlier on PATH
shadows prefix/bin/pipelines, naming both paths and versions, without
installing or modifying anything else.
- Docs, the packaged debugging skill reference and README no longer imply the
installed CLI always matches the server.
Tests cover the comparison table, unknown-field detection and caching, the
server identity stamping on pong and welcome, the CLI/TUI reporting paths and
the installer PATH shadowing warning.
A new registered stage type `human` (internal/stage/human.go) has no model,
agent, tools or configs: its required `prompt` block carries the operator
instructions and its non-error edges are the selectable options. It parses,
validates, renders, exports and imports like every other type (no parser
special-case, no config keys).
At runtime the runner parks the run instead of executing: the step and the run
persist `waiting` with self-contained {prompt, options} evidence, and the run
returns without starting later stages, capturing file diffs, scanning artifacts,
holding a goroutine/timer or applying a stage timeout. The wait is durable: a
restart leaves the waiting rows untouched (RecoverRuns excludes them) and a
rebuilt runtime over the same database still accepts the decision.
`pipelines decide <run-id> [stage] --option KEY [--feedback TEXT] [--json]` and
the TUI `c` picker resolve the decision from the pinned graph in one store
transaction, record the choice and feedback as the step's evidence and resume
along edges[KEY]. An unknown option is refused with the valid list, a stage that
is not waiting is refused, and a repeated decision for an already-decided visit
does not double-apply. Cancel and retry keep working while waiting and after a
decision; a human stage is never killed by a stage timeout or max_visits, and a
`notify` policy can fire an `on=waiting` event.
Docs: the authoring skill references (format.md, operations.md), docs/cli.md and
README describe the stage, the command and the TUI picker. Tests cover stage
validation, the parsing round-trip, the store transitions, a websocket wait/decide
integration, cancel/retry, waiting notifications and a persistence-layer rebuild
(second Open + newRunner over one database, no process restart).
Add a bounded, never-empty title to every run. `pipelines run --title "..."`
sets it explicitly and skips model generation; otherwise the server generates
it from the prompt through the shared summariser and falls back to the prompt's
first line, recording title_source (model/fallback/explicit) and title_model.
- protocol/store: RunSummary.Title plus Label(), a set_run_title message, title
columns with an idempotent migration, CreateRunTitled, and SetRunTitle renames.
- summarise: Title/GenerateTitle/DeriveTitle/ExplicitTitle bounded to TitleCap.
- runner: generate the title outside the admission lock and only for a request
that starts a run; a replay reuses the stored title and an explicit title
skips the model entirely.
- CLI: `--title` on run and a `title <run-id> "<title>"` rename command; human
`runs` and `inspect` show the title beside the pipeline name and version.
- TUI: the run list row, run detail header, Home run cards and last-run line,
and the pipeline Results line show the title via Label().
Tests cover storage/migration/fallback, explicit-title and rename, the
end-to-end CLI flow, and title rendering; CLI and operations docs updated.
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.
Every agent stage now writes into a per-run/step artifacts directory under
the data dir (<data>/artifacts/<run>/<step>), passed to Pi as
PIPELINES_ARTIFACTS_DIR, exposed on the OpenCode client env seam, and stated
in the agent prompt boilerplate so agents save images, screenshots, reports
and logs there.
After each step the server scans that directory with a bounded, symlink- and
traversal-safe inventory (os.OpenRoot + Lstat + O_NOFOLLOW) recording name,
size_bytes, content type (extension then 512-byte sniff fallback) and URL,
enforcing max files, per-file bytes and total bytes while counting skipped
and truncated entries. A missing, unreadable or oversized directory yields
only a best-effort diagnostic and never changes the step outcome.
The list is carried on protocol.RunStep as Artifacts []StageArtifact plus
skipped/truncated counters (omitempty, backwards compatible), persisted in a
new step_artifacts table keyed (run_id, sequence) alongside the
notifications/file-changes tables and loaded by GetRun.
GET /artifacts/{run}/{step}/{name} on the existing handler serves the bytes
with http.ServeContent, so Content-Type, Content-Length, HEAD and Range
(206/416) come from the stdlib; unknown runs/steps, absolute paths,
traversal, symlink escapes and non-regular files are refused.
The TUI lists each selected step's artifacts (name + human size) in the
retained-evidence section and adds an artifacts summary in the style of the
file-changes summary. Adds docs/stage-artifacts.md linked from README and an
artifacts subsection to the packaged operations skill reference.
Tests cover the scan records and caps, missing/oversized directories,
HTTP HEAD/Range/traversal/symlink/unknown refusals and protocol round-trips.
Add scripts/setup-native.py and make ./install (and --native) build the server, the CLI
and ntfy from source into ~/.local/share/pipelines, detect an existing host OpenCode
and Pi instead of installing them, install the packaged authoring skill, migrate an
existing Docker database and ntfy auth store, save the host client default and start
both services. ./install --docker keeps the previous Docker server + ntfy
installation unchanged.
ntfy is compiled from its pinned Go module on every host because upstream publishes
no macOS server binary (its darwin asset is built with -tags noserver); its cgo
SQLite driver is why a C compiler is now required natively. The ntfy credential
bootstrap and the client default writer are shared by both installers,
installation.Load resolves symlinked prefixes, the Docker migration copies the
SQLite write-ahead log so the newest definitions and runs are not lost, and the
account subcommands read the generated configuration through NTFY_CONFIG_FILE.
Verified on macOS: 115 Python tests, go build/vet/test, and scratch installs that
migrate 9 pipelines and 31 runs, build ntfy v2.30.0 and start both services healthy
on spare ports before stopping them.
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.
Make OpenCode authoring responsive and expand the managed skill references. Add conflict-aware import/export, real-provider reference workflows, and tracked V2 generation for reliable budget accounting.