Archive pipelines: hide unused ones while keeping their history
archived_at on pipelines (migrated in place). archive_pipeline and unarchive_pipeline by id or name with an expected-version guard; list_pipelines hides archived unless include_archived. Archived pipelines refuse runs, retries, new versions and name reuse, and cannot be archived while an enabled schedule points at them. CLI archive/unarchive and list --archived/--all, docs and skill note.
This commit is contained in:
+41
-1
@@ -316,6 +316,7 @@ Submitting activates included schedules, so review them before publishing.
|
||||
| Server/ntfy status popup | `status --json` |
|
||||
| Usage statistics/charts | `stats --json` |
|
||||
| Run-history retention | `retention report --keep N --json`, `retention apply --keep N --yes` |
|
||||
| Retire an unused pipeline | `archive NAME --yes`, `unarchive NAME`, `list --archived` |
|
||||
| Legacy operational diagnostics | managed `logs`, `doctor` |
|
||||
|
||||
The TUI does not spawn CLI processes for each request. Both front ends share
|
||||
@@ -327,7 +328,8 @@ exposes the full protocol as an escape hatch, so no server command is TUI-only:
|
||||
printf '%s' '{"type":"get_pipeline","pipeline_id":1,"version":1}' | pipelines rpc -
|
||||
```
|
||||
|
||||
Existing protocol commands: `ping`, `list_pipelines`, `get_pipeline`,
|
||||
Existing protocol commands: `ping`, `list_pipelines` (optional `include_archived`),
|
||||
`get_pipeline`, `archive_pipeline`, `unarchive_pipeline`,
|
||||
`list_templates`, `validate`, `submit`, `run_pipeline`, `list_runs`, `get_run`,
|
||||
`cancel_run`, `retry_run`, `decide_run`, `set_run_title`, `get_run_evidence`,
|
||||
`get_status`, `search`. `search` takes a `search` request object (`query`, with an
|
||||
@@ -369,6 +371,44 @@ whose scope covers the runs receive the `runs_removed` push. `pipelines runs rm
|
||||
have real effects; they are not previews. TUI-only animation, scrolling, and
|
||||
transient client logs are presentation, not separate server capabilities.
|
||||
|
||||
## Archiving pipelines
|
||||
|
||||
There is no pipeline deletion: an unused pipeline is archived instead.
|
||||
|
||||
```sh
|
||||
pipelines archive "old flow" --yes # hide it; history is kept
|
||||
pipelines list --archived # only archived ones (--all lists both)
|
||||
pipelines unarchive "old flow"
|
||||
```
|
||||
|
||||
Archiving sets `archived_at` on the pipeline and nothing else. Its versions,
|
||||
runs, artifacts, `inspect`, `runs --pipeline` and search history keep working and
|
||||
keep showing its name. While archived:
|
||||
|
||||
- `list_pipelines` omits it unless the request sets `include_archived`; then the
|
||||
summary carries `archived_at` (RFC 3339). The TUI and the app's main list hide it;
|
||||
the app's Archived filter shows and unarchives it.
|
||||
- `run_pipeline` and `retry_run` are refused: `pipeline "X" is archived; unarchive
|
||||
it first`.
|
||||
- Its name stays reserved: `new`, `submit` (with or without `--create-only`) and
|
||||
import are refused with the same message rather than creating a second pipeline.
|
||||
- Archiving is refused while an enabled schedule points at it, naming each
|
||||
schedule; pause or repoint them first. Enabling a schedule for an archived
|
||||
pipeline is refused too. Refusing is deliberate rather than pausing schedules
|
||||
implicitly: the operator sees exactly which timers stop, and unarchiving never
|
||||
needs to guess which schedules to turn back on.
|
||||
|
||||
| Command | Payload | Reply |
|
||||
| --- | --- | --- |
|
||||
| `archive_pipeline` | `pipeline_id` or `name`, optional `expected_version` | `pipeline_archived` with `detail` |
|
||||
| `unarchive_pipeline` | `pipeline_id` or `name`, optional `expected_version` | `pipeline_unarchived` with `detail` |
|
||||
|
||||
`name` matches exactly first and then as a numeric ID, as in the CLI. A positive
|
||||
`expected_version` refuses the change when the latest version differs (the CLI
|
||||
sends the version it resolved). Repeating a request already in effect succeeds
|
||||
without change. Like schedule saves, these are lifecycle controls and are not
|
||||
gated by authoring being disabled.
|
||||
|
||||
## Saved run schedules
|
||||
|
||||
Schedules are independent pipeline/version + run-information + timer records,
|
||||
|
||||
Reference in New Issue
Block a user