acpus 0.0.1 → 0.1.0

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.
Files changed (45) hide show
  1. package/README.md +6 -90
  2. package/dist/catalog.d.ts +27 -0
  3. package/dist/catalog.d.ts.map +1 -0
  4. package/dist/catalog.js +189 -0
  5. package/dist/catalog.js.map +1 -0
  6. package/dist/follow.d.ts +23 -0
  7. package/dist/follow.d.ts.map +1 -0
  8. package/dist/follow.js +109 -0
  9. package/dist/follow.js.map +1 -0
  10. package/dist/index.d.ts +3 -0
  11. package/dist/index.d.ts.map +1 -0
  12. package/dist/index.js +414 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/io.d.ts +4 -0
  15. package/dist/io.d.ts.map +1 -0
  16. package/dist/io.js +38 -0
  17. package/dist/io.js.map +1 -0
  18. package/dist/observations.d.ts +26 -0
  19. package/dist/observations.d.ts.map +1 -0
  20. package/dist/observations.js +60 -0
  21. package/dist/observations.js.map +1 -0
  22. package/dist/output.d.ts +9 -0
  23. package/dist/output.d.ts.map +1 -0
  24. package/dist/output.js +51 -0
  25. package/dist/output.js.map +1 -0
  26. package/dist/runs-show.d.ts +5 -0
  27. package/dist/runs-show.d.ts.map +1 -0
  28. package/dist/runs-show.js +83 -0
  29. package/dist/runs-show.js.map +1 -0
  30. package/dist/supervisor-client.d.ts +9 -0
  31. package/dist/supervisor-client.d.ts.map +1 -0
  32. package/dist/supervisor-client.js +8 -0
  33. package/dist/supervisor-client.js.map +1 -0
  34. package/dist/supervisor.d.ts +18 -0
  35. package/dist/supervisor.d.ts.map +1 -0
  36. package/dist/supervisor.js +24 -0
  37. package/dist/supervisor.js.map +1 -0
  38. package/package.json +31 -45
  39. package/dist/cli.d.mts +0 -1
  40. package/dist/cli.mjs +0 -3860
  41. package/dist/index.d.mts +0 -2742
  42. package/dist/index.mjs +0 -2
  43. package/dist/monitor-app-CSjUPe9j.mjs +0 -434
  44. package/dist/run-workflow-CbxKhAqF.mjs +0 -13586
  45. package/schemas/workflow-spec.schema.json +0 -2042
package/README.md CHANGED
@@ -1,97 +1,13 @@
1
- <p align="center">
2
- <img src="page/logo/logo-opus-mark.svg" alt="Acpus mark" width="120">
3
- </p>
1
+ # acpus
4
2
 
5
- <h1 align="center">Acpus</h1>
6
- <p align="center" font-style="italic">Every run is an opus.</p>
3
+ The `acpus` package provides the Acpus CLI for local durable ACP agent workflows.
7
4
 
8
- 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*.
5
+ Install:
9
6
 
10
- ## Quick Start
11
-
12
- ```bash
13
- # Install
7
+ ```sh
14
8
  npm install -g acpus
15
-
16
- # Validate a workflow spec
17
- acpus validate --spec workflows/examples/simple-feature.workflow.spec.json
18
-
19
- # Preview the execution plan
20
- acpus preview --spec workflows/examples/simple-feature.workflow.spec.json
21
-
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>
27
9
  ```
28
10
 
29
- ## Skill
30
-
31
- ```bash
32
- npx skills add kelvinschen/acpus --skill acpus
33
- ```
34
-
35
- ## Commands
36
-
37
- Acpus commands are grouped by four verbs.
38
-
39
- ### Compose — validate, preview, save, generate
40
-
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 |
47
-
48
- ### Conduct — run, follow, monitor, resume
49
-
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 |
56
-
57
- ### Recover — recover, diagnose
58
-
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
-
64
- ### Catalogue — list, show
65
-
66
- | Command | Purpose |
67
- |---|---|
68
- | `acpus list` | List saved specs and historical runs |
69
- | `acpus show <id>` | Display details of a saved spec or past run |
70
-
71
- ## Architecture
72
-
73
- Acpus sits between the author and the acpx runtime. The main agent produces a *workflow spec*. Acpus reads it, validates it against the JSON schema, and compiles it into an *execution plan* — a deterministic sequence of stages, each containing parallel lanes that map to independent acpx sessions.
74
-
75
- Run directories live under `.acpus/runs/<id>/`. Each contains:
76
-
77
- - `workflow.spec.json` — the original workflow spec
78
- - `execution-plan.json` — the compiled plan
79
- - `input.json` — resolved inputs at launch time
80
- - `outputs/` — stage outputs and final artefacts
81
- - `attempts/` — raw attempt records with agent transcripts
82
- - `acpx-state/` — run-local acpx session state
83
- - `sessions/` — per-lane session logs
84
- - `events.ndjson` — timestamped event log for the entire run
85
-
86
- The orchestrator does not generate or execute ACPX flow files directly. It drives acpx through its runtime API.
87
-
88
- ## Documentation
89
-
90
- - [Developer documentation](docs/README.md)
91
- - [Design and implementation specifications](specs/INDEX.md)
92
- - [CLI guide](docs/cli.md)
93
- - [Error code guide](docs/error-codes.md)
94
-
95
- ## License
11
+ Use it to lint Workflow Specs, run Workflows, inspect Runs, control Runs, replay persisted Runs, and open the terminal visualizer.
96
12
 
97
- MIT
13
+ See the repository README for full usage: https://github.com/kelvinschen/acpus
@@ -0,0 +1,27 @@
1
+ import { type Diagnostic } from "@acpus/core";
2
+ export type WorkflowCatalogScope = "project" | "global";
3
+ export type WorkflowCatalogStatus = "ready" | "invalid" | "conflict";
4
+ export interface WorkflowCatalogEntry {
5
+ scope: WorkflowCatalogScope;
6
+ ref?: string;
7
+ name?: string;
8
+ description?: string;
9
+ input?: Record<string, unknown>;
10
+ inputKeys: string[];
11
+ path: string;
12
+ status: WorkflowCatalogStatus;
13
+ diagnostics: Diagnostic[];
14
+ }
15
+ export interface ResolvedWorkflowTarget {
16
+ sourcePath: string;
17
+ source: string;
18
+ workflowRef?: string;
19
+ }
20
+ export declare function projectWorkflowRoot(workspace?: string): string;
21
+ export declare function globalWorkflowRoot(): string;
22
+ export declare function listWorkflowCatalog(workspace?: string): WorkflowCatalogEntry[];
23
+ export declare function resolveWorkflowTarget(target: string, workspace?: string): ResolvedWorkflowTarget;
24
+ export declare function findWorkflowCatalogEntry(target: string, workspace?: string): WorkflowCatalogEntry;
25
+ export declare function looksLikeWorkflowPath(target: string): boolean;
26
+ export declare function resolveWorkflowPath(path: string): string;
27
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAIA,OAAO,EAAgB,KAAK,UAAU,EAAmB,MAAM,aAAa,CAAC;AAG7E,MAAM,MAAM,oBAAoB,GAAG,SAAS,GAAG,QAAQ,CAAC;AACxD,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAErE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,qBAAqB,CAAC;IAC9B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,mBAAmB,CAAC,SAAS,SAAgB,GAAG,MAAM,CAErE;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED,wBAAgB,mBAAmB,CAAC,SAAS,SAAgB,GAAG,oBAAoB,EAAE,CA+BrF;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAgB,GAAG,sBAAsB,CAyBvG;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAgB,GAAG,oBAAoB,CAUxG;AA+FD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAO7D;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQxD"}
@@ -0,0 +1,189 @@
1
+ import { existsSync, readdirSync, readFileSync, statSync } from "node:fs";
2
+ import { homedir } from "node:os";
3
+ import { join, resolve } from "node:path";
4
+ import { parse as parseYaml } from "yaml";
5
+ import { lintWorkflow } from "@acpus/core";
6
+ import { createIncludeResolver } from "./io.js";
7
+ export function projectWorkflowRoot(workspace = process.cwd()) {
8
+ return resolve(workspace, ".acpus", "workflows");
9
+ }
10
+ export function globalWorkflowRoot() {
11
+ return resolve(homedir(), ".acpus", "workflows");
12
+ }
13
+ export function listWorkflowCatalog(workspace = process.cwd()) {
14
+ const allowedSourceRoots = [resolve(workspace), globalWorkflowRoot()];
15
+ const entries = [
16
+ ...scanScope("project", projectWorkflowRoot(workspace), allowedSourceRoots),
17
+ ...scanScope("global", globalWorkflowRoot(), allowedSourceRoots)
18
+ ];
19
+ for (const scope of ["project", "global"]) {
20
+ const byName = new Map();
21
+ for (const entry of entries) {
22
+ if (entry.scope !== scope || !entry.name || entry.status === "invalid")
23
+ continue;
24
+ const group = byName.get(entry.name) ?? [];
25
+ group.push(entry);
26
+ byName.set(entry.name, group);
27
+ }
28
+ for (const [name, group] of byName) {
29
+ if (group.length <= 1)
30
+ continue;
31
+ for (const entry of group) {
32
+ entry.status = "conflict";
33
+ entry.ref = undefined;
34
+ entry.diagnostics = [{
35
+ severity: "error",
36
+ code: "CATALOG_CONFLICT",
37
+ message: `Workflow name '${name}' is duplicated in ${scope} catalog.`,
38
+ path: "$.name"
39
+ }];
40
+ }
41
+ }
42
+ }
43
+ return entries;
44
+ }
45
+ export function resolveWorkflowTarget(target, workspace = process.cwd()) {
46
+ if (looksLikeWorkflowPath(target)) {
47
+ const sourcePath = resolveWorkflowPath(target);
48
+ return { sourcePath, source: readFileSync(sourcePath, "utf8") };
49
+ }
50
+ const catalog = listWorkflowCatalog(workspace);
51
+ const matches = catalog.filter((entry) => entry.status === "ready" && matchesCatalogTarget(entry, target));
52
+ if (matches.length === 0) {
53
+ const blocked = catalog.find((entry) => matchesCatalogTarget(entry, target));
54
+ if (blocked) {
55
+ throw new Error(`Workflow '${target}' is ${blocked.status}: ${blocked.diagnostics.map((d) => d.message).join("; ")}`);
56
+ }
57
+ throw new Error(`Workflow '${target}' was not found in the Workflow Catalog.`);
58
+ }
59
+ if (matches.length > 1) {
60
+ throw new Error(`Workflow short name '${target}' is ambiguous; use a full ref such as ${matches.map((m) => m.ref).join(" or ")}.`);
61
+ }
62
+ const entry = matches[0];
63
+ return {
64
+ sourcePath: entry.path,
65
+ source: readFileSync(entry.path, "utf8"),
66
+ workflowRef: entry.ref
67
+ };
68
+ }
69
+ export function findWorkflowCatalogEntry(target, workspace = process.cwd()) {
70
+ const catalog = listWorkflowCatalog(workspace);
71
+ const matches = catalog.filter((entry) => matchesCatalogTarget(entry, target));
72
+ if (matches.length === 0) {
73
+ throw new Error(`Workflow '${target}' was not found in the Workflow Catalog.`);
74
+ }
75
+ if (matches.length > 1) {
76
+ throw new Error(`Workflow name '${target}' is ambiguous; use a full ref when available.`);
77
+ }
78
+ return matches[0];
79
+ }
80
+ function matchesCatalogTarget(entry, target) {
81
+ return entry.ref === target || entry.name === target || (entry.name !== undefined && `${entry.scope}:${entry.name}` === target);
82
+ }
83
+ function scanScope(scope, root, allowedSourceRoots) {
84
+ if (!existsSync(root))
85
+ return [];
86
+ const files = collectCandidateFiles(root);
87
+ return files.map((file) => entryFromFile(scope, file, allowedSourceRoots));
88
+ }
89
+ function collectCandidateFiles(root) {
90
+ const out = [];
91
+ const visit = (dir) => {
92
+ for (const entry of readdirSync(dir, { withFileTypes: true })) {
93
+ const path = join(dir, entry.name);
94
+ if (entry.isDirectory()) {
95
+ visit(path);
96
+ }
97
+ else if (entry.isFile() && isWorkflowCandidate(entry.name)) {
98
+ out.push(path);
99
+ }
100
+ }
101
+ };
102
+ visit(root);
103
+ return out.sort();
104
+ }
105
+ function entryFromFile(scope, path, allowedSourceRoots) {
106
+ const source = readFileSync(path, "utf8");
107
+ const parsed = parseSpecSummary(source);
108
+ const lint = lintCatalogEntry(source, path, allowedSourceRoots);
109
+ const name = parsed.name;
110
+ const status = lint.ok && name ? "ready" : "invalid";
111
+ return {
112
+ scope,
113
+ ref: status === "ready" ? `${scope}:${name}` : undefined,
114
+ name,
115
+ description: parsed.description,
116
+ input: parsed.input,
117
+ inputKeys: Object.keys(parsed.input ?? {}),
118
+ path,
119
+ status,
120
+ diagnostics: lint.ok && !name
121
+ ? [{ severity: "error", code: "CATALOG_NAME", message: "Workflow Spec must declare a string name.", path: "$.name" }]
122
+ : lint.diagnostics
123
+ };
124
+ }
125
+ function lintCatalogEntry(source, path, allowedSourceRoots) {
126
+ try {
127
+ return lintWorkflow(source, {
128
+ sourcePath: path,
129
+ includeResolver: createIncludeResolver(allowedSourceRoots)
130
+ });
131
+ }
132
+ catch (error) {
133
+ return {
134
+ ok: false,
135
+ diagnostics: [{
136
+ severity: "error",
137
+ code: "CATALOG_LINT",
138
+ message: error instanceof Error ? error.message : String(error),
139
+ path: "$"
140
+ }]
141
+ };
142
+ }
143
+ }
144
+ function parseSpecSummary(source) {
145
+ try {
146
+ const parsed = parseYaml(source);
147
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed))
148
+ return {};
149
+ const map = parsed;
150
+ return {
151
+ name: typeof map.name === "string" ? map.name : undefined,
152
+ description: typeof map.description === "string" ? map.description : undefined,
153
+ input: typeof map.input === "object" && map.input !== null && !Array.isArray(map.input)
154
+ ? map.input
155
+ : undefined
156
+ };
157
+ }
158
+ catch {
159
+ return {};
160
+ }
161
+ }
162
+ function isWorkflowCandidate(filename) {
163
+ return filename === "workflow.yaml"
164
+ || filename === "workflow.yml"
165
+ || filename.endsWith(".workflow.yaml")
166
+ || filename.endsWith(".workflow.yml")
167
+ || filename.endsWith(".workflow.spec.yaml")
168
+ || filename.endsWith(".workflow.spec.yml");
169
+ }
170
+ export function looksLikeWorkflowPath(target) {
171
+ return target.startsWith(".")
172
+ || target.startsWith("/")
173
+ || target.startsWith("~")
174
+ || target.includes("/")
175
+ || target.endsWith(".yaml")
176
+ || target.endsWith(".yml");
177
+ }
178
+ export function resolveWorkflowPath(path) {
179
+ if (path === "~")
180
+ return homedir();
181
+ if (path.startsWith("~/"))
182
+ return resolve(homedir(), path.slice(2));
183
+ const resolved = resolve(process.cwd(), path);
184
+ if (!existsSync(resolved) || !statSync(resolved).isFile()) {
185
+ throw new Error(`Workflow Spec path not found: ${path}`);
186
+ }
187
+ return resolved;
188
+ }
189
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../src/catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAoC,MAAM,aAAa,CAAC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acpus workflows run <spec>` (foreground follow mode) and
5
+ * `acpus workflows run <spec> --json`.
6
+ * Tracks node state changes and deduplicates: only emits when a node is first
7
+ * observed or when its state changes.
8
+ *
9
+ * Ctrl-C detaches (exit 0) without cancelling the Run.
10
+ */
11
+ import type { RunSupervisorClient, RunStatus } from "@acpus/runtime";
12
+ export interface FollowOptions {
13
+ /** Emit JSONL observations instead of human-readable glyphs */
14
+ json?: boolean;
15
+ /** Polling interval in milliseconds (default 400) */
16
+ intervalMs?: number;
17
+ }
18
+ /**
19
+ * Run a follow loop until the Run reaches a terminal state.
20
+ * Returns the terminal RunStatus for exit-code mapping.
21
+ */
22
+ export declare function followRun(client: RunSupervisorClient, runId: string, options?: FollowOptions): Promise<RunStatus>;
23
+ //# sourceMappingURL=follow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"follow.d.ts","sourceRoot":"","sources":["../src/follow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAgC,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGnG,MAAM,WAAW,aAAa;IAC5B,+DAA+D;IAC/D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,MAAM,EACb,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,SAAS,CAAC,CAuFpB"}
package/dist/follow.js ADDED
@@ -0,0 +1,109 @@
1
+ /**
2
+ * FollowLoop — polls a running Run and emits observations to stdout.
3
+ *
4
+ * Used by `acpus workflows run <spec>` (foreground follow mode) and
5
+ * `acpus workflows run <spec> --json`.
6
+ * Tracks node state changes and deduplicates: only emits when a node is first
7
+ * observed or when its state changes.
8
+ *
9
+ * Ctrl-C detaches (exit 0) without cancelling the Run.
10
+ */
11
+ import { formatObservation, formatTerminalSummary } from "./observations.js";
12
+ /**
13
+ * Run a follow loop until the Run reaches a terminal state.
14
+ * Returns the terminal RunStatus for exit-code mapping.
15
+ */
16
+ export async function followRun(client, runId, options = {}) {
17
+ const intervalMs = options.intervalMs ?? 400;
18
+ // Pin the supervisor alive while following
19
+ client.clientKind = "follow";
20
+ const lastObserved = new Map();
21
+ let lastRunStatus;
22
+ let runName = "";
23
+ // Register Ctrl-C handler: detach (exit 0) without cancelling
24
+ let detached = false;
25
+ const onSigint = () => {
26
+ detached = true;
27
+ process.off("SIGINT", onSigint);
28
+ // Don't call process.exit(0) here — it skips the finally block and
29
+ // prevents cleanup. Instead, set the flag and let the loop exit naturally.
30
+ };
31
+ process.on("SIGINT", onSigint);
32
+ try {
33
+ for (;;) {
34
+ if (detached) {
35
+ // Ctrl-C detach: the Run continues in the background supervisor.
36
+ // Return a non-terminal status so the caller maps to exit 0.
37
+ return "running";
38
+ }
39
+ let run;
40
+ let nodes;
41
+ try {
42
+ [run, nodes] = await Promise.all([
43
+ client.getRun(runId),
44
+ client.getNodeStates(runId)
45
+ ]);
46
+ }
47
+ catch (err) {
48
+ // Transient fetch error — retry after interval
49
+ if (!options.json) {
50
+ process.stderr.write(`⚠ poll error: ${err instanceof Error ? err.message : String(err)}\n`);
51
+ }
52
+ await new Promise((r) => setTimeout(r, intervalMs));
53
+ continue;
54
+ }
55
+ runName = run.workflowName;
56
+ // Emit Run-level observation on first poll or status change.
57
+ // Terminal states are handled by formatTerminalSummary below; skip here
58
+ // to avoid duplicate "Run ... completed" lines with different glyphs.
59
+ if (lastRunStatus === undefined || run.status !== lastRunStatus) {
60
+ if (!isTerminal(run.status)) {
61
+ const event = { type: "run", runId, status: run.status };
62
+ emit(formatObservation(event, runName, options.json));
63
+ }
64
+ lastRunStatus = run.status;
65
+ }
66
+ // Emit Node-level observations for new/changed nodes
67
+ for (const node of nodes) {
68
+ const prev = lastObserved.get(node.nodeKey);
69
+ if (!prev || prev.state !== node.state) {
70
+ const duration = computeDuration(node);
71
+ const event = {
72
+ type: "node",
73
+ nodeKey: node.nodeKey,
74
+ state: node.state,
75
+ duration,
76
+ error: node.error
77
+ };
78
+ emit(formatObservation(event, undefined, options.json));
79
+ }
80
+ lastObserved.set(node.nodeKey, node);
81
+ }
82
+ // Check if Run is terminal
83
+ if (isTerminal(run.status)) {
84
+ const summary = formatTerminalSummary(runId, run.status, runName, options.json);
85
+ emit(summary);
86
+ return run.status;
87
+ }
88
+ // Wait before next poll
89
+ await new Promise((r) => setTimeout(r, intervalMs));
90
+ }
91
+ }
92
+ finally {
93
+ process.off("SIGINT", onSigint);
94
+ }
95
+ }
96
+ function emit(line) {
97
+ process.stdout.write(line + "\n");
98
+ }
99
+ function isTerminal(status) {
100
+ return status === "completed" || status === "failed" || status === "cancelled" || status === "paused";
101
+ }
102
+ function computeDuration(node) {
103
+ if (!node.startedAt)
104
+ return undefined;
105
+ const start = Date.parse(node.startedAt);
106
+ const end = node.completedAt ? Date.parse(node.completedAt) : Date.now();
107
+ return end - start;
108
+ }
109
+ //# sourceMappingURL=follow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"follow.js","sourceRoot":"","sources":["../src/follow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAyB,MAAM,mBAAmB,CAAC;AASpG;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAC7B,MAA2B,EAC3B,KAAa,EACb,UAAyB,EAAE;IAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,GAAG,CAAC;IAE7C,2CAA2C;IAC3C,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC;IAE7B,MAAM,YAAY,GAAG,IAAI,GAAG,EAA8B,CAAC;IAC3D,IAAI,aAAoC,CAAC;IACzC,IAAI,OAAO,GAAG,EAAE,CAAC;IAEjB,8DAA8D;IAC9D,IAAI,QAAQ,GAAG,KAAK,CAAC;IACrB,MAAM,QAAQ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