yaml-flow 3.1.1 → 5.0.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.
- package/README.md +81 -20
- package/board-live-cards-cli.js +37 -0
- package/browser/board-livegraph-runtime.js +1453 -0
- package/browser/board-livegraph-runtime.js.map +1 -0
- package/browser/card-compute.js +153 -433
- package/browser/live-cards.js +868 -115
- package/browser/live-cards.schema.json +90 -83
- package/dist/board-livegraph-runtime/index.cjs +1448 -0
- package/dist/board-livegraph-runtime/index.cjs.map +1 -0
- package/dist/board-livegraph-runtime/index.d.cts +101 -0
- package/dist/board-livegraph-runtime/index.d.ts +101 -0
- package/dist/board-livegraph-runtime/index.js +1441 -0
- package/dist/board-livegraph-runtime/index.js.map +1 -0
- package/dist/card-compute/index.cjs +266 -431
- package/dist/card-compute/index.cjs.map +1 -1
- package/dist/card-compute/index.d.cts +77 -49
- package/dist/card-compute/index.d.ts +77 -49
- package/dist/card-compute/index.js +263 -432
- package/dist/card-compute/index.js.map +1 -1
- package/dist/cli/board-live-cards-cli.cjs +2750 -0
- package/dist/cli/board-live-cards-cli.cjs.map +1 -0
- package/dist/cli/board-live-cards-cli.d.cts +205 -0
- package/dist/cli/board-live-cards-cli.d.ts +205 -0
- package/dist/cli/board-live-cards-cli.js +2702 -0
- package/dist/cli/board-live-cards-cli.js.map +1 -0
- package/dist/{constants-B2zqu10b.d.ts → constants-DuzE5n03.d.ts} +2 -2
- package/dist/{constants-DJZU1pwJ.d.cts → constants-ozjf1Ejw.d.cts} +2 -2
- package/dist/continuous-event-graph/index.cjs +258 -464
- package/dist/continuous-event-graph/index.cjs.map +1 -1
- package/dist/continuous-event-graph/index.d.cts +18 -358
- package/dist/continuous-event-graph/index.d.ts +18 -358
- package/dist/continuous-event-graph/index.js +255 -464
- package/dist/continuous-event-graph/index.js.map +1 -1
- package/dist/event-graph/index.cjs +4 -4
- package/dist/event-graph/index.cjs.map +1 -1
- package/dist/event-graph/index.d.cts +5 -5
- package/dist/event-graph/index.d.ts +5 -5
- package/dist/event-graph/index.js +4 -4
- package/dist/event-graph/index.js.map +1 -1
- package/dist/index.cjs +1684 -555
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -7
- package/dist/index.d.ts +26 -7
- package/dist/index.js +1678 -555
- package/dist/index.js.map +1 -1
- package/dist/inference/index.cjs +138 -19
- package/dist/inference/index.cjs.map +1 -1
- package/dist/inference/index.d.cts +2 -2
- package/dist/inference/index.d.ts +2 -2
- package/dist/inference/index.js +138 -19
- package/dist/inference/index.js.map +1 -1
- package/dist/journal-DRfJiheM.d.cts +28 -0
- package/dist/journal-NLYuqege.d.ts +28 -0
- package/dist/live-cards-bridge-Or7fdEJV.d.ts +316 -0
- package/dist/live-cards-bridge-vGJ6tMzN.d.cts +316 -0
- package/dist/schedule-CMcZe5Ny.d.ts +21 -0
- package/dist/schedule-CiucyCan.d.cts +21 -0
- package/dist/step-machine/index.cjs +18 -1
- package/dist/step-machine/index.cjs.map +1 -1
- package/dist/step-machine/index.d.cts +2 -2
- package/dist/step-machine/index.d.ts +2 -2
- package/dist/step-machine/index.js +18 -1
- package/dist/step-machine/index.js.map +1 -1
- package/dist/stores/file.d.cts +1 -1
- package/dist/stores/file.d.ts +1 -1
- package/dist/stores/index.d.cts +1 -1
- package/dist/stores/index.d.ts +1 -1
- package/dist/stores/localStorage.d.cts +1 -1
- package/dist/stores/localStorage.d.ts +1 -1
- package/dist/stores/memory.d.cts +1 -1
- package/dist/stores/memory.d.ts +1 -1
- package/dist/{types-BwvgvlOO.d.cts → types-BzLD8bjb.d.cts} +1 -1
- package/dist/{types-ClRA8hzC.d.ts → types-C2eJ7DAV.d.ts} +1 -1
- package/dist/{types-DEj7OakX.d.cts → types-CMFSIjpc.d.cts} +39 -4
- package/dist/{types-DEj7OakX.d.ts → types-CMFSIjpc.d.ts} +39 -4
- package/dist/{types-FZ_eyErS.d.cts → types-ycun84cq.d.cts} +1 -0
- package/dist/{types-FZ_eyErS.d.ts → types-ycun84cq.d.ts} +1 -0
- package/dist/{validate-DEZ2Ymdb.d.ts → validate-DJQTQ6bP.d.ts} +1 -1
- package/dist/{validate-DqKTZg_o.d.cts → validate-ke92Cleg.d.cts} +1 -1
- package/examples/browser/boards/portfolio-tracker/cards/holdings-table.json +22 -0
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-form.json +16 -0
- package/examples/browser/boards/portfolio-tracker/cards/portfolio-value.json +15 -0
- package/examples/browser/boards/portfolio-tracker/cards/price-fetch.json +15 -0
- package/examples/browser/boards/portfolio-tracker/fetch-prices.js +43 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker-task-executor.cjs +96 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.bat +7 -0
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.js +217 -0
- package/examples/browser/livecards-browser/index.html +41 -0
- package/examples/browser/{index.html → step-machine-browser/index.html} +53 -53
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/holdings-table.json +22 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/portfolio-form.json +43 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/portfolio-value.json +15 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/cards/price-fetch.json +15 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/fetch-prices.js +48 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +58 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/add-cards-cli.js +27 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/init-board-cli.js +25 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/reset-board-dir-cli.js +29 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/retrigger-cli.js +27 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/status-cli.js +25 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +37 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/wait-completed-cli.js +53 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/handlers/write-prices-cli.js +35 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml +227 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.input.json +38 -0
- package/examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +29 -0
- package/examples/cli/step-machine-demo/jsonata-init-board-cli.js +36 -0
- package/examples/cli/step-machine-demo/jsonata-init-board.flow.yaml +30 -0
- package/examples/cli/step-machine-demo/one-step-cli-only.flow.yaml +19 -0
- package/examples/cli/step-machine-demo/step-cli-echo-y.js +15 -0
- package/examples/cli/step-machine-demo/step2-double-cli.js +39 -0
- package/examples/cli/step-machine-demo/two-step-math-handlers.js +32 -0
- package/examples/cli/step-machine-demo/two-step-math.flow.yaml +31 -0
- package/examples/cli/step-machine-demo/two-step-mixed-handlers.js +24 -0
- package/examples/cli/step-machine-demo/two-step-mixed.flow.yaml +35 -0
- package/examples/example-board/board.yaml +23 -0
- package/examples/example-board/bootstrap_payload.json +1 -0
- package/examples/example-board/cards/card-chain-region-alert.json +39 -0
- package/examples/example-board/cards/card-chain-region-totals.json +26 -0
- package/examples/example-board/cards/card-chain-top-region.json +24 -0
- package/examples/example-board/cards/card-ex-actions.json +32 -0
- package/examples/example-board/cards/card-ex-chart.json +30 -0
- package/examples/example-board/cards/card-ex-filter.json +36 -0
- package/examples/example-board/cards/card-ex-filtered-by-preference.json +59 -0
- package/examples/example-board/cards/card-ex-form.json +91 -0
- package/examples/example-board/cards/card-ex-list.json +22 -0
- package/examples/example-board/cards/card-ex-markdown.json +17 -0
- package/examples/example-board/cards/card-ex-metric.json +19 -0
- package/examples/example-board/cards/card-ex-narrative.json +36 -0
- package/examples/example-board/cards/card-ex-source-http.json +28 -0
- package/examples/example-board/cards/card-ex-source.json +21 -0
- package/examples/example-board/cards/card-ex-status.json +35 -0
- package/examples/example-board/cards/card-ex-table.json +30 -0
- package/examples/example-board/cards/card-ex-todo.json +29 -0
- package/examples/example-board/demo-chat-handler.js +69 -0
- package/examples/example-board/demo-server.js +87 -0
- package/examples/example-board/demo-shell-browser.html +806 -0
- package/examples/example-board/demo-shell-with-server.html +280 -0
- package/examples/example-board/demo-shell.html +62 -0
- package/examples/example-board/demo-task-executor.js +255 -0
- package/examples/example-board/mock.db +15 -0
- package/examples/example-board/reusable-board-runtime-client.js +265 -0
- package/examples/example-board/reusable-runtime-artifacts-adapter.js +233 -0
- package/examples/example-board/reusable-server-runtime.js +1284 -0
- package/examples/index.html +799 -0
- package/examples/{batch → npm-libs/batch}/batch-step-machine.ts +1 -1
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/live-cards-board.ts +18 -18
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/live-portfolio-dashboard.ts +24 -24
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/portfolio-tracker.ts +1 -1
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/reactive-monitoring.ts +1 -1
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/reactive-pipeline.ts +1 -1
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/soc-incident-board.ts +1 -1
- package/examples/{continuous-event-graph → npm-libs/continuous-event-graph}/stock-dashboard.ts +1 -1
- package/examples/{event-graph → npm-libs/event-graph}/ci-cd-pipeline.ts +1 -1
- package/examples/{event-graph → npm-libs/event-graph}/executor-diamond.ts +1 -1
- package/examples/{event-graph → npm-libs/event-graph}/executor-pipeline.ts +1 -1
- package/examples/{event-graph → npm-libs/event-graph}/research-pipeline.ts +1 -1
- package/examples/{graph-of-graphs → npm-libs/graph-of-graphs}/multi-stage-etl.ts +1 -1
- package/examples/{graph-of-graphs → npm-libs/graph-of-graphs}/url-processing-pipeline.ts +1 -1
- package/examples/{inference → npm-libs/inference}/azure-deployment.ts +1 -1
- package/examples/{inference → npm-libs/inference}/copilot-cli.ts +1 -1
- package/examples/{inference → npm-libs/inference}/data-pipeline.ts +1 -1
- package/examples/{inference → npm-libs/inference}/pluggable-adapters.ts +1 -1
- package/examples/{node → npm-libs/node}/ai-conversation.ts +1 -1
- package/examples/{node → npm-libs/node}/simple-greeting.ts +2 -2
- package/examples/step-machine-cli/portfolio-tracker/cards/holdings-table.json +22 -0
- package/examples/step-machine-cli/portfolio-tracker/cards/portfolio-form.json +43 -0
- package/examples/step-machine-cli/portfolio-tracker/cards/portfolio-value.json +15 -0
- package/examples/step-machine-cli/portfolio-tracker/cards/price-fetch.json +15 -0
- package/examples/step-machine-cli/portfolio-tracker/fetch-prices.js +48 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/_board-cli.js +58 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/add-cards-cli.js +27 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/init-board-cli.js +25 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/reset-board-dir-cli.js +29 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/retrigger-cli.js +27 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/status-cli.js +25 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/update-holdings-cli.js +37 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/wait-completed-cli.js +53 -0
- package/examples/step-machine-cli/portfolio-tracker/handlers/write-prices-cli.js +35 -0
- package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker-task-executor.cjs +96 -0
- package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml +227 -0
- package/examples/step-machine-cli/portfolio-tracker/portfolio-tracker.input.json +38 -0
- package/examples/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat +29 -0
- package/package.json +27 -2
- package/schema/board-status.schema.json +118 -0
- package/schema/card-runtime.schema.json +25 -0
- package/schema/flow.schema.json +5 -0
- package/schema/live-cards.schema.json +90 -83
- package/step-machine-cli.js +674 -0
- package/browser/ingest-board.js +0 -296
- package/examples/ingest.js +0 -733
- /package/examples/{flows → npm-libs/flows}/ai-conversation.yaml +0 -0
- /package/examples/{flows → npm-libs/flows}/order-processing.yaml +0 -0
- /package/examples/{flows → npm-libs/flows}/simple-greeting.yaml +0 -0
package/README.md
CHANGED
|
@@ -9,6 +9,66 @@ Two workflow engines in one package. Pick the model that fits your problem.
|
|
|
9
9
|
npm install yaml-flow
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
+
## Public Surfaces
|
|
13
|
+
|
|
14
|
+
yaml-flow is not only a low-level npm library. It exposes three practical consumption surfaces:
|
|
15
|
+
|
|
16
|
+
1. **Library APIs**
|
|
17
|
+
Use the package imports when you want to embed workflow logic directly in your application.
|
|
18
|
+
The primary library APIs are `yaml-flow/step-machine`, `yaml-flow/continuous-event-graph`, and `yaml-flow/inference`.
|
|
19
|
+
`yaml-flow/batch` is also available as a convenience utility for concurrent processing of item collections using Step Machine, Live Event Graph, or graph-of-graphs execution patterns.
|
|
20
|
+
|
|
21
|
+
2. **Live-Cards / Boards Package Layer**
|
|
22
|
+
This is a reusable higher-level package pattern built from yaml-flow engines, schemas, browser runtime assets, and CLI orchestration.
|
|
23
|
+
It includes:
|
|
24
|
+
- `board-live-cards-cli`
|
|
25
|
+
- browser runtime assets under `browser/`
|
|
26
|
+
- `yaml-flow/card-compute`
|
|
27
|
+
|
|
28
|
+
3. **Step-machine CLI**
|
|
29
|
+
`step-machine-cli` is the standalone operational runner for YAML step-machine workflows with inline handlers, CLI handlers, and JSONata transforms.
|
|
30
|
+
For durable and operator-controlled runs, use `--store file --store-dir ...` plus `--pause`, `--resume`, and `--status`.
|
|
31
|
+
|
|
32
|
+
## Documentation Map
|
|
33
|
+
|
|
34
|
+
- Main orientation: `README.md`
|
|
35
|
+
- Runnable examples: `examples/index.html`
|
|
36
|
+
- Docs landing page: `docs/index.html`
|
|
37
|
+
- Board live-cards CLI reference: `docs/board-live-cards-cli.html`
|
|
38
|
+
- Step-machine CLI reference: `docs/step-machine-cli.html`
|
|
39
|
+
- Browser runtime guide: `docs/browser-runtime-livecards-boards.html`
|
|
40
|
+
- Schemas: `schema/` and `browser/live-cards.schema.json`
|
|
41
|
+
|
|
42
|
+
## Repository Organization
|
|
43
|
+
|
|
44
|
+
- `dist/` contains the built library output.
|
|
45
|
+
- `schema/` contains public config and contract schemas.
|
|
46
|
+
- `browser/` contains shipped browser-consumable runtime assets.
|
|
47
|
+
- `examples/` contains runnable examples for the public surfaces.
|
|
48
|
+
- `docs/` contains deeper reference and design material for repo/GitHub readers.
|
|
49
|
+
- `app/` is best treated as demo/showcase code, not as the primary public documentation surface.
|
|
50
|
+
|
|
51
|
+
## Board Live Cards CLI (Canonical External Path)
|
|
52
|
+
|
|
53
|
+
When installed from npm, use the package-exposed command:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx board-live-cards-cli --help
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If installed as a dependency in another project, invoke it the same way via your package runner:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
board-live-cards-cli --help
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
This is the canonical black-box entrypoint for external usage.
|
|
66
|
+
|
|
67
|
+
Command reference: `docs/board-live-cards-cli.html`
|
|
68
|
+
Status JSON schema: `schema/board-status.schema.json`
|
|
69
|
+
|
|
70
|
+
Step-machine CLI reference: `docs/step-machine-cli.html`
|
|
71
|
+
|
|
12
72
|
## Which Mode Do I Need?
|
|
13
73
|
|
|
14
74
|
yaml-flow ships two execution models. They solve fundamentally different problems.
|
|
@@ -152,6 +212,7 @@ const result = await machine.run({ message: 'I was double-charged' });
|
|
|
152
212
|
| Feature | Config |
|
|
153
213
|
|---|---|
|
|
154
214
|
| Transitions | `transitions: { success: next_step, failure: error_step }` |
|
|
215
|
+
| Failure transitions | `failure_transitions: { failure: error_step, timeout: timeout_step }` |
|
|
155
216
|
| Retry | `retry: { max_attempts: 3, delay_ms: 1000, backoff_multiplier: 2 }` |
|
|
156
217
|
| Circuit breaker | `circuit_breaker: { max_iterations: 5, on_open: fallback }` |
|
|
157
218
|
| Pause / resume | `await machine.pause(runId)` / `await machine.resume(runId)` |
|
|
@@ -790,7 +851,7 @@ while (true) {
|
|
|
790
851
|
- Every deployment customizes how sub-tasks execute: in-process, `execSync`, HTTP, serverless.
|
|
791
852
|
- The primitives (`batch` + `resolveVariables` + `resolveConfigTemplates` + both engines) compose without coupling.
|
|
792
853
|
|
|
793
|
-
See the [examples/graph-of-graphs/](./examples/graph-of-graphs/) directory for complete runnable examples.
|
|
854
|
+
See the [examples/npm-libs/graph-of-graphs/](./examples/npm-libs/graph-of-graphs/) directory for complete runnable examples.
|
|
794
855
|
|
|
795
856
|
---
|
|
796
857
|
|
|
@@ -1494,25 +1555,25 @@ See the [examples/](./examples) directory:
|
|
|
1494
1555
|
|
|
1495
1556
|
| Example | Mode | Demonstrates |
|
|
1496
1557
|
|---|---|---|
|
|
1497
|
-
| [Simple Greeting](./examples/node/simple-greeting.ts) | Step Machine | Basic flow with file store |
|
|
1498
|
-
| [AI Conversation](./examples/node/ai-conversation.ts) | Step Machine | Retry, circuit breakers, component injection |
|
|
1499
|
-
| [Research Pipeline](./examples/event-graph/research-pipeline.ts) | Event Graph | Parallel tasks, goal-based completion |
|
|
1500
|
-
| [CI/CD Pipeline](./examples/event-graph/ci-cd-pipeline.ts) | Event Graph | External events, conditional routing, failure tokens |
|
|
1501
|
-
| [Batch Tickets](./examples/batch/batch-step-machine.ts) | Batch | Concurrent processing, progress tracking |
|
|
1502
|
-
| [URL Pipeline](./examples/graph-of-graphs/url-processing-pipeline.ts) | Graph-of-Graphs | Outer event-graph → batch × inner event-graph per item |
|
|
1503
|
-
| [Multi-Stage ETL](./examples/graph-of-graphs/multi-stage-etl.ts) | Graph-of-Graphs | Mixed modes: event-graph outer → step-machine + event-graph subs |
|
|
1504
|
-
| [Stock Dashboard](./examples/continuous-event-graph/stock-dashboard.ts) | Continuous Event Graph | Runtime mutations, token drain, upstream/downstream, snapshot |
|
|
1505
|
-
| [Reactive Pipeline](./examples/continuous-event-graph/reactive-pipeline.ts) | Reactive Graph | Self-driving ETL — push once, 4 tasks complete automatically |
|
|
1506
|
-
| [Reactive Monitoring](./examples/continuous-event-graph/reactive-monitoring.ts) | Reactive Graph | Conditional routing, on_failure escalation, runtime addNode |
|
|
1507
|
-
| [Live Portfolio Dashboard](./examples/continuous-event-graph/live-portfolio-dashboard.ts) | Reactive Graph + Live Cards | 15+ cards, disk roundtrip, addRequires/removeRequires, addProvides/removeProvides, pushAll, retriggerAll |
|
|
1508
|
-
| [Executor Pipeline](./examples/event-graph/executor-pipeline.ts) | Event Graph (library) | You-drive-the-loop ETL with random async delays |
|
|
1509
|
-
| [Executor Diamond](./examples/event-graph/executor-diamond.ts) | Event Graph (library) | Parallel fan-out/fan-in diamond DAG with async executors |
|
|
1510
|
-
| [Azure Deployment](./examples/inference/azure-deployment.ts) | Inference | LLM analyzes deployment logs, auto-completes checkpoints |
|
|
1511
|
-
| [Data Pipeline](./examples/inference/data-pipeline.ts) | Inference | Iterative inference — evidence arrives in waves |
|
|
1512
|
-
| [Pluggable Adapters](./examples/inference/pluggable-adapters.ts) | Inference | OpenAI, Anthropic, Azure, CLI, HTTP adapter factories |
|
|
1513
|
-
| [Copilot CLI](./examples/inference/copilot-cli.ts) | Inference | GitHub Copilot CLI as inference adapter via `createCliAdapter` |
|
|
1514
|
-
| [Order Processing](./examples/flows/order-processing.yaml) | Step Machine | YAML flow definition |
|
|
1515
|
-
| [Browser Demo](./examples/browser/index.html) | Step Machine | In-browser usage |
|
|
1558
|
+
| [Simple Greeting](./examples/npm-libs/node/simple-greeting.ts) | Step Machine | Basic flow with file store |
|
|
1559
|
+
| [AI Conversation](./examples/npm-libs/node/ai-conversation.ts) | Step Machine | Retry, circuit breakers, component injection |
|
|
1560
|
+
| [Research Pipeline](./examples/npm-libs/event-graph/research-pipeline.ts) | Event Graph | Parallel tasks, goal-based completion |
|
|
1561
|
+
| [CI/CD Pipeline](./examples/npm-libs/event-graph/ci-cd-pipeline.ts) | Event Graph | External events, conditional routing, failure tokens |
|
|
1562
|
+
| [Batch Tickets](./examples/npm-libs/batch/batch-step-machine.ts) | Batch | Concurrent processing, progress tracking |
|
|
1563
|
+
| [URL Pipeline](./examples/npm-libs/graph-of-graphs/url-processing-pipeline.ts) | Graph-of-Graphs | Outer event-graph → batch × inner event-graph per item |
|
|
1564
|
+
| [Multi-Stage ETL](./examples/npm-libs/graph-of-graphs/multi-stage-etl.ts) | Graph-of-Graphs | Mixed modes: event-graph outer → step-machine + event-graph subs |
|
|
1565
|
+
| [Stock Dashboard](./examples/npm-libs/continuous-event-graph/stock-dashboard.ts) | Continuous Event Graph | Runtime mutations, token drain, upstream/downstream, snapshot |
|
|
1566
|
+
| [Reactive Pipeline](./examples/npm-libs/continuous-event-graph/reactive-pipeline.ts) | Reactive Graph | Self-driving ETL — push once, 4 tasks complete automatically |
|
|
1567
|
+
| [Reactive Monitoring](./examples/npm-libs/continuous-event-graph/reactive-monitoring.ts) | Reactive Graph | Conditional routing, on_failure escalation, runtime addNode |
|
|
1568
|
+
| [Live Portfolio Dashboard](./examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts) | Reactive Graph + Live Cards | 15+ cards, disk roundtrip, addRequires/removeRequires, addProvides/removeProvides, pushAll, retriggerAll |
|
|
1569
|
+
| [Executor Pipeline](./examples/npm-libs/event-graph/executor-pipeline.ts) | Event Graph (library) | You-drive-the-loop ETL with random async delays |
|
|
1570
|
+
| [Executor Diamond](./examples/npm-libs/event-graph/executor-diamond.ts) | Event Graph (library) | Parallel fan-out/fan-in diamond DAG with async executors |
|
|
1571
|
+
| [Azure Deployment](./examples/npm-libs/inference/azure-deployment.ts) | Inference | LLM analyzes deployment logs, auto-completes checkpoints |
|
|
1572
|
+
| [Data Pipeline](./examples/npm-libs/inference/data-pipeline.ts) | Inference | Iterative inference — evidence arrives in waves |
|
|
1573
|
+
| [Pluggable Adapters](./examples/npm-libs/inference/pluggable-adapters.ts) | Inference | OpenAI, Anthropic, Azure, CLI, HTTP adapter factories |
|
|
1574
|
+
| [Copilot CLI](./examples/npm-libs/inference/copilot-cli.ts) | Inference | GitHub Copilot CLI as inference adapter via `createCliAdapter` |
|
|
1575
|
+
| [Order Processing](./examples/npm-libs/flows/order-processing.yaml) | Step Machine | YAML flow definition |
|
|
1576
|
+
| [Browser Demo](./examples/browser/step-machine-browser/index.html) | Step Machine | In-browser usage |
|
|
1516
1577
|
|
|
1517
1578
|
---
|
|
1518
1579
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import * as fs from 'node:fs';
|
|
4
|
+
import * as path from 'node:path';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { spawnSync } from 'node:child_process';
|
|
7
|
+
|
|
8
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
const distCli = path.join(__dirname, 'dist', 'cli', 'board-live-cards-cli.js');
|
|
10
|
+
const srcCli = path.join(__dirname, 'src', 'cli', 'board-live-cards-cli.ts');
|
|
11
|
+
const tsxCli = path.join(__dirname, 'node_modules', 'tsx', 'dist', 'cli.mjs');
|
|
12
|
+
|
|
13
|
+
if (fs.existsSync(distCli)) {
|
|
14
|
+
const { cli } = await import(pathToFileUrl(distCli).href);
|
|
15
|
+
await cli(process.argv.slice(2));
|
|
16
|
+
} else if (fs.existsSync(srcCli)) {
|
|
17
|
+
const result = spawnSync(process.execPath, [tsxCli, srcCli, ...process.argv.slice(2)], {
|
|
18
|
+
stdio: 'inherit',
|
|
19
|
+
shell: false,
|
|
20
|
+
windowsHide: true,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
if (result.error) {
|
|
24
|
+
console.error(`[board-live-cards-cli] Failed to launch dev fallback: ${result.error.message}`);
|
|
25
|
+
process.exit(1);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
process.exit(result.status ?? 0);
|
|
29
|
+
} else {
|
|
30
|
+
console.error('[board-live-cards-cli] Could not find dist or src CLI entrypoint.');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function pathToFileUrl(filePath) {
|
|
35
|
+
const resolved = path.resolve(filePath).replace(/\\/g, '/');
|
|
36
|
+
return new URL(`file:///${resolved.startsWith('/') ? resolved.slice(1) : resolved}`);
|
|
37
|
+
}
|