Drop the resource allocation feature end to end: store tables and migration, runner scheduling and cleanup, protocol types and commands, CLI commands, TUI screens, tests and docs. Existing databases open cleanly and definitions carrying a retired resources block still validate.
Add local operator inspection and reconciliation for quarantined resource leases, including atomic audit-backed FIFO handoff and recovery protocol support.\n\nPreserve capability tokens in the authoritative store and reject non-loopback or ordinary client transport for recovery mutations.\n\nChecked packaged templates and packaged authoring skill references; none need updating. The task-owned docs note records shared README and skill reference follow-up for docs-fold.
The harness resumes a session when a background command finishes, so "tell me
when this run is done" needs one command that blocks and exits rather than a
polling script.
- `pipelines wait <run-id> [run-id ...]` resolves every id up front (an unknown
run is a fast client error), then polls each run to a terminal status -
`succeeded`, `failed`, `canceled` or `interrupted`, blocking through a run
parked on a human decision - and prints one line per run as it finishes with
id, status and outcome, stage and duration.
- A finished-but-unsuccessful run is still a finished run: it is reported and
the command exits 0. The exit is non-zero only for a client-side failure: an
unknown id, a connection that cannot be established, or `--timeout` expiring
while a run is still active. A timeout reports the still-active runs,
changes nothing, and is never treated as a run's outcome.
- Reuses the existing `run --wait` polling machinery: the per-second `get_run`
reattachment is factored into `awaitRuns`, used by `finishRun` too. No
subscription or new protocol message. `--url`/`--timeout` follow the existing
client conventions; `--timeout` is the overall client limit (default 0).
- Read-only: sends only `get_run`, resolves no workspace, is not refused by the
workspace guard and writes nothing. `--json` prints the final run envelope
(one envelope for one id, an array for several).
- `commands.go` and `help.go` add it to the usage inventory and EXECUTE help.
Tests: `wait_test.go` (line format, batch reporting, wait-until-terminal,
unknown id, timeout leaves the run active, `--json` shape) and
`wait_command_test.go` (real CLI against the real websocket server and store).
Packaged assets checked: no packaged template changes. No authoring skill
reference file is added, so `internal/author/install.go`'s managed inventory
needs no change. `internal/author/skill/references/operations.md` (the
"inspect results first" run-operations list) and `docs/cli.md` (the scripted-runs
`--wait` paragraph and the CLI/TUI capability-map row) are now stale and are
recorded - not edited - in `docs/notes/wait-command.md` for the `docs-fold`
writer. `SKILL.md` stays a task-directed index; no shared document is edited
here.
No protocol, server, store, TUI or Android change; no new dependency; no run
started. Committed locally only, not pushed or deployed.
Add an opt-in way to broker chat from an operator-supplied OpenCode service
instead of the instance the server spawns for itself, and a way to adopt a
session that already exists on that endpoint so it appears in chat_sessions and
can be continued from the app.
- Endpoint selection: the `-opencode-endpoint` server flag (defaulting to
`PIPELINES_OPENCODE_ENDPOINT`) opts in; precedence is explicit flag >
explicit environment > the endpoint recorded on a previous run, with the
spawned instance as the default. opencode.OpenEndpoint validates the
reference once (http(s), host, no userinfo/query/fragment/path), detects the
backend from its own /api/info (v2) or /global/health (v1) contract, and
requires a streamable text/event-stream event path. It owns no process
(Close is a no-op) and never calls startServe; every failure names the
endpoint and disables chat rather than silently falling back. An
authenticated endpoint takes an optional password only through the private
file PIPELINES_OPENCODE_ENDPOINT_PASSWORD_FILE, with
PIPELINES_OPENCODE_ENDPOINT_USERNAME overriding the detected default.
- Persistence: the validated choice is recorded in an additive single-row
server_settings table so a restart with no flag/environment reuses it; an
unreachable recorded endpoint disables chat with a clear message and no
fallback.
- chat_adopt: a new protocol request (ChatAdoptRequest) with handleChatAdopt in
internal/server/chat.go. It refuses a nil broker/registry/payload and a
blank or foreign-shaped id before any endpoint call, reads the endpoint via
the shared Chat.Session (which reuses Sessions/decodeChatSessions), records
through the existing RecordOperatorSession with the endpoint's directory and
title verbatim, and echoes the adopted session plus its registry row like
chat_create. A missing id is refused naming the id and records nothing; an
endpoint record with an empty directory is refused rather than substituting
the server's working directory or home.
- CLI: `pipelines chat-adopt <session-id> [--json]` (usage, notes, help
inventory, dispatch) with docs/cli.md updated under Chat sessions.
- Autostart preserves the endpoint variables (and the password-file reference,
never an inline secret) via serviceEnvironmentKeys.
Checks before committing:
- Package location: the change is user-facing chat behaviour, so the packaged
authoring skill reference internal/author/skill/references/operations.md is
updated in the same change (Brokered OpenCode chat section) with a dated
verification-evidence entry and the not-deployed state. No new reference file
is added, so internal/author/install.go's managed inventory is unchanged.
- Packaged templates: this repository packages no template set for this
behaviour and none references the chat endpoint, so no template needs
updating.
- Verification: `go build ./...`, `go vet` on the touched packages, `gofmt -l`
clean and `go test ./...` all pass. The unit tests cover the endpoint
validation/precedence, the adopt happy path and refusals, the recorded
endpoint round-trip, the protocol round-trip and the CLI dispatch. The live
scratch-server check against the operator's real endpoint was not run in this
change.
Nothing unrelated is staged; docs left stale (README and other shared documents)
are not edited here and are for a single folding writer.
Combines lane-go's typed omni search, launch-time model overrides, TUI
artifacts view, run-state websocket push, and the "reflect the change where
it belongs" committer rule with the Templates gallery, chat/omni-search and
other reviewed work already on main. The 12 files both sides touched keep
both intents composed rather than dropping either side: the omni search keeps
the typed search contract (CLI `pipelines search` and the TUI popup with type
badges and marked snippets) alongside the run-list quick filter; cli.md and
ui-ux-review.md document both the search rework and the artifacts view;
orchestration.md, harnesses.md and operations.md keep the model-override and
reflect-where-it-belongs guidance; and the protocol/CLI/server/TUI code keeps
the new search, run-event, override and artifacts paths alongside the existing
run, title and help surfaces.
Checks before committing:
- go build ./... -- pass
- go vet ./... -- pass
- go test -count=1 ./internal/... ./cmd/... -- all pass
Doc check before committing: nothing needs updating. The lane's own docs and
references (docs/cli.md, docs/ui-ux-review.md, and the orchestration,
harnesses and operations skill references) already carry the new features.
format.md and the packaged templates already describe the line-oriented result
format and the human decision stage from the earlier lane-go merge. The root
README already describes the omni search popup. Model overrides, the search
command, run events and the artifacts view are runtime/CLI/TUI surfaces that
cli.md documents; no template, README or topic-doc edit is required by this
merge.
Protocol: replace the loose Query/Kind/Matches/Limit search fields with a Search request object and a SearchResults response, and have the server answer search from Store.Search over the shared run projections (runFrom/runStamps).
CLI: add the read-only 'pipelines search QUERY [--type KIND] [--limit N] [--json]' command with usage/help, and document the typed targets, ranking and bounds in docs/cli.md.
TUI: the '/' popup keeps type-to-search, up/down, Enter and Esc, renders one ranked list with kind badges and a bracketed (non-colour) match snippet, and Enter opens the matched pipeline, run, step, artifact or field; footer text updated to match.
TUI: add a dedicated run artifacts view ('A') with open/copy of recorded files, and move artifacts out of the run-detail File changes section (artifactCaptureNotes).
Tests: add Store.OpenReadOnly for read-only inspection of a live database plus pipeline/server/TUI search tests and artifacts tests, including env-gated live checks.
Add `pipelines run --model PROVIDER/MODEL` and repeatable
`--stage-model STAGE=PROVIDER/MODEL`, resolved with precedence
per-stage > whole-run > the model pinned in the pipeline version.
- A shared pure resolver (`pipeline.ParseModelOverride` /
`pipeline.EffectiveModels`) owns the precedence and validation: every value
must be a `provider/model` pair (`stage.ValidModel`), every stage key must
exist in the pinned graph, an unknown key fails naming the valid keys, and a
per-stage key that names a non-model stage is refused.
- The server validates against the pinned version before admission (no run row
is ever inserted for an invalid request), persists `model`/`stage_models` on
the run and `provider`/`model` on each step, applies the effective pair to a
clone of the stage definition so the stage and its repair/formatter path share
it, overlays the returned run graph with the effective pair (presentation
only), and reuses the recorded overrides on retry.
- The run record echoes the overrides it was launched with and each step records
the provider/model it actually ran with; the TUI Evidence pane renders that
effective pair. The pinned pipeline version and `show --version N` are never
modified.
- CLI help, `docs/cli.md` and the packaged authoring skill references document
the flags and the precedence. A TUI override picker remains a documented
follow-up; the CLI is the deliverable.
Tests: pure precedence/validation table tests, store round-trip and
request-key-mismatch plus migration, server admission/application/overlay/retry
with a controlled executor, CLI flag/help/malformed-value tests, and a TUI
evidence test.
Integrates nine commits of reviewed work from the lane-go branch after the
automated resolver failed on this merge five times (each attempt dying on the
malformed-result defect whose fix is contained in this same merge).
Integration decisions:
- Search: kept main's shipped design (Store.Search + SearchResponse.Results) and
dropped lane-go's parallel, older attempt (an unused Message.Matches field, an
absent runs.search, and two partial TUI plumbing blocks). lane-go itself did not
compile: protocol.SearchMatch was undefined and model.go referenced searchNav,
requestSearch and applyRunNav, which exist nowhere. Those partial TUI blocks are
removed; the queued TUI omni-search item will implement the surface properly on
main's design.
- Both sides' additions are kept where they are independent: run titles and
provenance, the human decision stage and its CLI/TUI surface, the derived stage
verdict, the stale-client guard, the line-oriented result format, and main's
search command.
- The search key's help label is now "/ omni search"; the two tests asserting the
old label are updated rather than the label reverted.
- docs/cli.md and the packaged operations reference carry both sides' text.
Verified: go build ./... , go vet ./... and the full go test ./... suite pass.
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).
One query now finds anything in the system over the wire and from the CLI.
- protocol: add Search/SearchResults message types and a SearchRequest
(query, optional kind filter, optional limit) / SearchResponse (typed,
ranked matches plus truncation and scan-bound counters) pair, with typed
payloads for pipeline, version, run, step/visit, field text and artifact.
- store: add Store.Search, a read-only query over pipelines,
pipeline_versions, pipeline_runs, run_steps (+step_control) and
step_artifacts. Ranks exact name (3) > name substring (2) > body text (1),
breaks ties by recency then a stable kind/target order, and reports the
matched field. Bounds work with a 50-default/200-max result cap, a 2000-row
per-kind scan limit and a 2000-step / 1 MiB field-text scan budget.
- terms: a bare status word or lone date expression (today, yesterday, this
week, YYYY-MM-DD) selects runs; anything else stays free text.
- server: dispatch protocol.Search to stores[0].Search; read-only and
unconfirmed.
- cli: add `pipelines search QUERY [--type KIND] [--limit N] [--json]`, help
text and a BROWSE line.
- store: add OpenReadOnly so the live-database check never runs DDL.
- docs: document the grammar, kinds, ranking and bounds in docs/cli.md,
scope the TUI omnisearch to pipelines in docs/ui-ux-review.md, and add a
search bullet to the packaged operations reference.
- tests: protocol round trip, store/ranking/term-parsing/limit/scan-bound
unit tests, a server end-to-end test, and an env-guarded live check.
No new dependencies; go.mod/go.sum unchanged.
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.
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.