acpus 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,25 +5,28 @@
5
5
  <h1 align="center">Acpus</h1>
6
6
  <p align="center" font-style="italic">Every run is an opus.</p>
7
7
 
8
+ <p align="center">
9
+ <a href="https://www.npmjs.com/package/acpus"><img src="https://img.shields.io/npm/v/acpus?label=npm" alt="npm version"></a>
10
+ <a href="https://github.com/kelvinschen/acpus/actions/workflows/publish.yml"><img src="https://img.shields.io/github/actions/workflow/status/kelvinschen/acpus/publish.yml?label=publish" alt="Publish workflow status"></a>
11
+ <a href="LICENSE"><img src="https://img.shields.io/npm/l/acpus?label=license" alt="License"></a>
12
+ <img src="https://img.shields.io/node/v/acpus?label=node" alt="Node version">
13
+ </p>
14
+
15
+ > [!WARNING]
16
+ > Acpus is currently in alpha. CLI/runtime interfaces will change frequently.
17
+
8
18
  Acpus is a runtime-driven workflow orchestrator for ACP agents, built on the acpx agent runtime. You hand it a *workflow spec*; Acpus validates it, compiles a deterministic execution plan, conducts heterogeneous fanout across lanes, and tracks every run as a numbered, replayable execution, or say, an *opus*.
9
19
 
10
20
  ## Quick Start
11
21
 
12
22
  ```bash
13
- # Install
14
23
  npm install -g acpus
15
24
 
16
- # Validate a workflow spec
17
- acpus validate --spec workflows/examples/simple-feature.workflow.spec.json
25
+ acpus plan workflows/examples/simple-feature.workflow.spec.yaml
18
26
 
19
- # Preview the execution plan
20
- acpus preview --spec workflows/examples/simple-feature.workflow.spec.json
27
+ acpus run workflows/examples/simple-feature.workflow.spec.yaml
21
28
 
22
- # Run the workflow
23
- acpus run --spec workflows/examples/simple-feature.workflow.spec.json
24
-
25
- # Follow a running workflow in real time
26
- acpus follow <logical-run-id>
29
+ acpus monitor
27
30
  ```
28
31
 
29
32
  ## Skill
@@ -34,39 +37,49 @@ npx skills add kelvinschen/acpus --skill acpus
34
37
 
35
38
  ## Commands
36
39
 
37
- Acpus commands are grouped by four verbs.
40
+ Acpus commands are grouped by workflow phase. Optional parameters are shown in brackets.
38
41
 
39
- ### Compose — validate, preview, save, generate
42
+ ### Compose — plan, save
40
43
 
41
- | Command | Purpose |
42
- |---|---|
43
- | `acpus validate --spec <path>` | Validate a workflow spec against the schema |
44
- | `acpus preview --spec <path>` | Render the compiled execution plan without running |
45
- | `acpus save <name> --spec <path>` | Save a spec to the local store |
46
- | `acpus generate` | Scaffold a new workflow spec from a template |
44
+ | Command | Options | Purpose |
45
+ |---|---|---|
46
+ | `acpus plan <spec>` | `--global`, `--quiet`, `--json` | Validate a spec file or saved workflow name and preview the compiled execution plan |
47
+ | `acpus save <name> <spec>` | `--overwrite`, `--global`, `--json` | Save a workflow spec to the workflow store |
48
+
49
+ `plan --json` emits a structured plan preview for automation. `save --json` emits `{ok, workflow, path}` so scripts can capture the saved workflow path.
47
50
 
48
51
  ### Conduct — run, follow, monitor, resume
49
52
 
50
- | Command | Purpose |
51
- |---|---|
52
- | `acpus run --spec <path>` | Execute a workflow spec end-to-end |
53
- | `acpus follow <run-id>` | Attach to a running workflow and stream output |
54
- | `acpus monitor <run-id>` | Open the terminal UI for run inspection |
55
- | `acpus resume <run-id>` | Resume an interrupted or failed run from last checkpoint |
53
+ | Command | Options | Purpose |
54
+ |---|---|---|
55
+ | `acpus run [spec]` | `--global`, `--input <json-or-yaml-or-path>`, `--wait`, `--json` | Prepare and start a workflow from a spec file or saved workflow name |
56
+ | `acpus follow [run]` | `--json` | Select or attach to a run and stream events in real time |
57
+ | `acpus monitor [run]` | `--json` | Select or open a run in the terminal UI, or print the monitor view as JSON |
58
+ | `acpus monitor detail <run> <task-id>` | `--json` | Show bounded detail for one stage task |
59
+ | `acpus resume <run>` | `--allow-partial-fanout <stage...>`, `--max-fanout-items <stage=count...>`, `--skip-fanout-item <stage=index...>`, `--force`, `--wait`, `--json` | Resume a blocked or failed run, or recover a stale running/pending run with `--force` |
56
60
 
57
- ### Recover recover, diagnose
61
+ `--input` accepts an inline JSON object or a JSON/YAML file path, for example `--input input.yaml`.
58
62
 
59
- | Command | Purpose |
60
- |---|---|
61
- | `acpus recover <run-id>` | Attempt automatic repair of a failed run |
62
- | `acpus diagnose <run-id> [--wait]` | Produce a structured diagnosis of a completed or running run |
63
+ <figure align="center">
64
+ <img src="page/img/monitor_basic.webp" alt="Acpus monitor TUI — real-time run inspection with stage progress, lane status, and event stream" width="720">
65
+ <br>
66
+ <sup><em>Real-time run inspection stages, lanes, and the event stream at a glance.</em></sup>
67
+ </figure>
63
68
 
64
69
  ### Catalogue — list, show
65
70
 
71
+ | Command | Options | Purpose |
72
+ |---|---|---|
73
+ | `acpus list workflows` | `--global`, `--json` | List saved workflows |
74
+ | `acpus list runs` | `--json` | List project runs |
75
+ | `acpus show workflow <name>` | `--global`, `--json` | Display a saved workflow |
76
+ | `acpus show run <id>` | `--json` | Display a run by logical run id or run directory |
77
+
78
+ ### Internal
79
+
66
80
  | Command | Purpose |
67
81
  |---|---|
68
- | `acpus list` | List saved specs and historical runs |
69
- | `acpus show <id>` | Display details of a saved spec or past run |
82
+ | `acpus _run-worker <run>` | Hidden background worker entry point used by `run` and `resume`; not intended for direct use |
70
83
 
71
84
  ## Architecture
72
85
 
@@ -74,7 +87,7 @@ Acpus sits between the author and the acpx runtime. The main agent produces a *w
74
87
 
75
88
  Run directories live under `.acpus/runs/<id>/`. Each contains:
76
89
 
77
- - `workflow.spec.json` — the original workflow spec
90
+ - `workflow.spec.yaml` — the original workflow spec
78
91
  - `execution-plan.json` — the compiled plan
79
92
  - `input.json` — resolved inputs at launch time
80
93
  - `outputs/` — stage outputs and final artefacts