Merge lane-go: titles, verdicts, human stage, line result format, stale-client guard
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.
This commit is contained in:
+59
-7
@@ -23,10 +23,23 @@ 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`
|
||||
Plain `ping` also prints the server version/commit and, beside the local client
|
||||
build, the client/server relationship. `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.
|
||||
|
||||
`ping`, `connection`, `status` and every server command now check that relationship.
|
||||
The server stamps its `build` and integer `protocol` onto each response (the
|
||||
unsolicited welcome envelope too). The client compares this build against the
|
||||
server: a same-protocol build mismatch prints exactly one `warning:` on stderr
|
||||
(stdout JSON stays parseable) and a server speaking a newer protocol fails the
|
||||
command non-zero before it acts on the frame. If a response carries a top-level
|
||||
field this client does not model — for example an `artifacts` field from a newer
|
||||
server — the client prints a one-time `server sent unrecognized top-level field(s)
|
||||
...` notice instead of silently appearing to have no data. Rebuild or reinstall the
|
||||
CLI so it matches the server; the installer also warns when a different `pipelines`
|
||||
resolves earlier on PATH than the freshly installed binary.
|
||||
|
||||
|
||||
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,
|
||||
@@ -34,6 +47,14 @@ press `/` for fuzzy search, type to filter, and Enter to return to the results.
|
||||
Search includes pipeline name, version, status, outcome, stage and diagnostic;
|
||||
`#123` searches run-ID prefixes. Esc while searching clears the filter without
|
||||
closing the list. The filter survives inspection/back and live list refreshes.
|
||||
Home's `/` instead opens the omni popup, which searches pipelines, versions, runs,
|
||||
stages/visits, artifact names, and the text of stage inputs, outputs and evidence.
|
||||
A bare status word (`queued`, `running`, `succeeded`, `failed`, `canceled`,
|
||||
`interrupted`) or a date (`today`, `yesterday`, `this week`, or `YYYY-MM-DD`
|
||||
interpreted in UTC) selects runs, and a leading `pipeline:`/`version:`/`run:`/
|
||||
`step:`/`field:`/`artifact:`/`match:` prefix narrows the result kind. Enter opens
|
||||
the matched pipeline, run, stage visit, artifact or field; unrecognised words
|
||||
remain text.
|
||||
Wide terminals
|
||||
show runs and pipelines side by side, with stacked panels on narrow terminals.
|
||||
Home run cards prioritize reported results, status, completed visits and duration;
|
||||
@@ -235,8 +256,10 @@ Submitting activates included schedules, so review them before publishing.
|
||||
| Browse templates/source | `templates --json`, `template KEY --source` |
|
||||
| Create or edit a definition | `new`, `edit`, `drafts` |
|
||||
| Validate and publish | `validate FILE`, `submit FILE` |
|
||||
| Start a run | `run NAME PROMPT --yes --json` |
|
||||
| Start a run | `run NAME PROMPT [--title TITLE] --yes --json` |
|
||||
| Run history/inspection | `runs --json`, `inspect ID --json` |
|
||||
| Rename a run | `title ID "TITLE" --json` |
|
||||
| Decide a waiting human stage | `decide ID [STAGE] --option KEY [--feedback TEXT] --json` |
|
||||
| Cancel | `cancel ID --json` |
|
||||
| Connection and phone settings | `connection --json`, `ping --json` |
|
||||
| Server/ntfy status popup | `status --json` |
|
||||
@@ -254,14 +277,28 @@ printf '%s' '{"type":"get_pipeline","pipeline_id":1,"version":1}' | pipelines rp
|
||||
|
||||
Existing protocol commands: `ping`, `list_pipelines`, `get_pipeline`,
|
||||
`list_templates`, `validate`, `submit`, `run_pipeline`, `list_runs`, `get_run`,
|
||||
`cancel_run`, `retry_run`, `get_status`, `search`. `list_runs` also returns
|
||||
all-history `usage` aggregates. See `internal/protocol/message.go` for JSON
|
||||
envelopes. Mutating RPCs have real effects; they are not previews. TUI-only
|
||||
animation, scrolling, and transient client logs are presentation, not separate
|
||||
server capabilities.
|
||||
`cancel_run`, `retry_run`, `decide_run`, `set_run_title`, `get_run_evidence`,
|
||||
`get_status`, `search`. `search` takes `query` and an
|
||||
optional `kind` and `limit` and returns ranked typed `matches`, each with a stable
|
||||
`target` the client can open. `list_runs` also returns all-history `usage`
|
||||
aggregates. See `internal/protocol/message.go` for JSON envelopes. Mutating RPCs
|
||||
have real effects; they are not previews. TUI-only animation, scrolling, and
|
||||
transient client logs are presentation, not separate server capabilities.
|
||||
|
||||
## Scripted runs
|
||||
|
||||
Every run records a short, single-line `title` saying what it was for. `pipelines
|
||||
run --title "..."` sets it explicitly; otherwise the server generates it from the
|
||||
prompt with the configured default harness. It is never empty: when generation is
|
||||
unavailable or times out, the server derives the prompt's first line, and
|
||||
`title_source` (`model`, `fallback`, or `explicit` for an operator-set title) plus
|
||||
`title_model` record how it was produced so a diagnosis can tell them apart.
|
||||
`pipelines runs` shows the title beside the pipeline name and version, and
|
||||
`pipelines inspect` returns the title, name and version, so two runs of one
|
||||
pipeline are distinguishable. Rename after the fact with `pipelines title
|
||||
<run-id> "<title>"`; the run's input, steps and execution are unchanged. The
|
||||
stored prompt is unchanged, and listing/renaming never calls a model.
|
||||
|
||||
On either the runs list or run inspector, press `P` (or use `:pipeline`) to open
|
||||
the selected run's exact pipeline version. Navigation does not cancel the run.
|
||||
|
||||
@@ -282,6 +319,21 @@ Retry is hidden and rejected while a run is executing or agent cleanup remains
|
||||
active, even if a terminal status was already persisted. Run RPCs report
|
||||
`executing` alongside status so clients can distinguish cleanup from completion.
|
||||
|
||||
A pipeline may contain a `type=human` decision stage (see the authoring skill's
|
||||
`references/format.md`). Its step becomes `waiting`, the run reports that it is
|
||||
waiting on a person, and no later stage runs. `runs`/`inspect --json` show the
|
||||
`waiting` status, the stage and its recorded instructions and options. Answer it
|
||||
with `pipelines decide <run-id> [stage] --option KEY [--feedback TEXT] [--json]`
|
||||
or, in the run inspector, press `c` to open the option picker, choose with
|
||||
`↑/↓`, type optional feedback with `Tab`, and confirm with Enter. The choice and
|
||||
feedback are recorded as the step's evidence and the run resumes along
|
||||
`edges[KEY]`. An unknown option is refused with the valid list, a decision to a
|
||||
stage that is not waiting is refused, and a repeated decision for an
|
||||
already-decided visit does not double-apply. The wait is persisted in the run
|
||||
rows, so it survives a server restart and `decide` still works afterwards;
|
||||
`cancel` and `retry` keep working while waiting and after a decision, and a
|
||||
human stage is never killed by a stage timeout or `max_visits`.
|
||||
|
||||
The run inspector's upper half shows the entire graph from the run's immutable
|
||||
pinned version using the shared renderer and viewport. Executed stages and taken
|
||||
routes retain their colors; unexecuted stages, unchosen routes and unreached
|
||||
|
||||
Reference in New Issue
Block a user