fae1005962
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.
86 lines
4.9 KiB
Go
86 lines
4.9 KiB
Go
package cli
|
|
|
|
const help = `PIPELINES — reusable workflows for your repositories
|
|
|
|
Usage: pipelines <command> [arguments] [options]
|
|
|
|
AUTHOR
|
|
new [name] [prompt] Create a draft and open the configured harness
|
|
edit [name|id] [prompt] Pick a pipeline, draft changes, open a configured harness
|
|
drafts List retained draft files (including TUI drafts)
|
|
validate <draft.md> Check a draft using the server's validator
|
|
submit <draft.md> Explicitly publish a new immutable version
|
|
|
|
BROWSE
|
|
list List registered pipelines
|
|
show <name|id> Inspect graph, settings, source and history
|
|
versions <name|id> List immutable versions
|
|
export [name|id ...] Select/export definitions as ZIP; one name prints Markdown
|
|
import [FILE.zip] Select/import definitions; explicitly resolve conflicts
|
|
templates List optional templates (never seeds the DB)
|
|
template <key> Inspect a template; --source prints Markdown
|
|
|
|
EXECUTE
|
|
provider-check Validate a provider/model with a tool-free response
|
|
run [name] [prompt] Fuzzy selection, multiline prompt, live inspector
|
|
runs List audited runs; --pipeline filters results
|
|
inspect <run-id> Inspect stages, outputs, errors and status
|
|
cancel <run-id> Cancel a run; changes are NOT rolled back
|
|
decide <run-id> [stage] Choose an option for a run waiting on a person
|
|
retry <run-id> Restart a failed run with its original input and directory
|
|
title <run-id> "<title>" Rename a run after the fact; input/steps unchanged
|
|
debug <run-id> Investigate a run with a configured harness or nvim
|
|
draft-delete <draft.md> Delete a selected retained draft and its metadata
|
|
connection Server and public phone connection (no secrets)
|
|
status Server/ntfy health, ports and server computer IPs
|
|
stats All-history usage, pipeline counts and daily activity
|
|
ping Check connection and identify the running server build
|
|
version Identify this CLI build without connecting (--version)
|
|
rpc <request.json|-> Send any protocol command (automation escape hatch)
|
|
|
|
SERVER / INTERFACE
|
|
harness [opencode|pi] Launch the configured default harness in this directory
|
|
harness setup opencode|pi Login/select separate harness and new-pipeline defaults
|
|
tui Open the dashboard (default with no command)
|
|
serve Start native server in the foreground (Ctrl+C stops it)
|
|
service enable Configure user autostart
|
|
service disable | status Stop/remove autostart, or inspect OS service status
|
|
skill install Install/update the shared Pi/OpenCode authoring skill
|
|
uninstall [--yes] Remove verified Go binaries; retain data and drafts
|
|
|
|
Legacy managed installs: select PIPELINES_PREFIX explicitly for start/stop,
|
|
restart/doctor/logs and retained-data or --purge uninstallation.
|
|
|
|
Options: --url ws://127.0.0.1:8080/connect --json --help
|
|
Use pipelines help <command> for its flags. Names with spaces must be quoted.
|
|
|
|
Examples:
|
|
pipelines edit "bug fix" "Add a review step"
|
|
pipelines new "release notes" "Summarize changes and notify my phone"
|
|
pipelines new "Text summary" --template summary --no-open --json --yes
|
|
pipelines validate /path/to/draft.md --json
|
|
pipelines submit /path/to/draft.md
|
|
pipelines run "bug fix" "Fix the layout" --json
|
|
pipelines run "bug fix" "Fix the layout" --model openai/gpt-5 --stage-model review=openai/o4 --json
|
|
|
|
Launch-time model overrides: 'pipelines run --model P/M' covers every model stage;
|
|
'--stage-model STAGE=P/M' (repeatable; a repeated key is last-wins) overrides one
|
|
stage and wins over --model, which wins over the model pinned in the pipeline
|
|
version. Overrides apply to that run only, are recorded on the run, and are
|
|
validated before the run starts (an unknown stage key names the valid keys).
|
|
|
|
Draft-first: the configured harness (Pi/OpenCode; host by default, or Docker-linked
|
|
when a checkout is linked) edits a private draft; nvim remains a client editor.
|
|
Nothing is published automatically.
|
|
Every submission is validated server-side. Submission activates any schedules.
|
|
JSON mode never launches an editor or picker; supply explicit arguments.
|
|
|
|
Search: the TUI '/' popup and the protocol 'search' command (via 'pipelines rpc')
|
|
find 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. A leading prefix pipeline:, version:,
|
|
run:, step:, field:, artifact: or match: (a field alias) narrows the result kind;
|
|
unrecognised words stay text.
|
|
`
|