c700b28e6a
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.
70 lines
3.8 KiB
Go
70 lines
3.8 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
|
|
search QUERY Search pipelines, versions, runs, steps, field text, artifacts
|
|
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
|
|
retry <run-id> Restart a failed run with its original input and directory
|
|
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
|
|
|
|
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.
|
|
`
|