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
|
@@ -0,0 +1,799 @@
|
|
|
1
|
+
<div class="command"><code>node step-machine-cli.js <flow.yaml> [--initial-data <json>]</code><button class="copy-btn" data-copy="node step-machine-cli.js <flow.yaml>">Copy</button></div>
|
|
2
|
+
<!doctype html>
|
|
3
|
+
<html lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="UTF-8" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<title>yaml-flow Examples Catalog</title>
|
|
8
|
+
<style>
|
|
9
|
+
:root {
|
|
10
|
+
--bg: #f4f7fb;
|
|
11
|
+
--card: #ffffff;
|
|
12
|
+
--ink: #122036;
|
|
13
|
+
--muted: #51607a;
|
|
14
|
+
--line: #d9e1ef;
|
|
15
|
+
--accent: #0f6bff;
|
|
16
|
+
--accent-soft: #e8f0ff;
|
|
17
|
+
--success-soft: #e9fbf2;
|
|
18
|
+
--warm-soft: #fff6e7;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
* { box-sizing: border-box; }
|
|
22
|
+
|
|
23
|
+
body {
|
|
24
|
+
margin: 0;
|
|
25
|
+
font-family: "Segoe UI", Tahoma, sans-serif;
|
|
26
|
+
color: var(--ink);
|
|
27
|
+
background:
|
|
28
|
+
radial-gradient(circle at 10% 10%, #e8f2ff 0, transparent 30%),
|
|
29
|
+
radial-gradient(circle at 90% 0%, #e4fff6 0, transparent 28%),
|
|
30
|
+
var(--bg);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
a { color: var(--accent); text-decoration: none; }
|
|
34
|
+
a:hover { text-decoration: underline; }
|
|
35
|
+
|
|
36
|
+
.wrap {
|
|
37
|
+
max-width: 1240px;
|
|
38
|
+
margin: 24px auto;
|
|
39
|
+
padding: 0 16px 32px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.hero {
|
|
43
|
+
background: linear-gradient(120deg, #083a7a, #0f6bff 60%, #18a4ff);
|
|
44
|
+
color: #fff;
|
|
45
|
+
border-radius: 14px;
|
|
46
|
+
padding: 22px;
|
|
47
|
+
box-shadow: 0 10px 24px rgba(15, 107, 255, 0.22);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.hero h1 {
|
|
51
|
+
margin: 0 0 8px;
|
|
52
|
+
font-size: 1.7rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.hero p {
|
|
56
|
+
margin: 0;
|
|
57
|
+
opacity: 0.95;
|
|
58
|
+
max-width: 980px;
|
|
59
|
+
line-height: 1.55;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.hero a {
|
|
63
|
+
color: #fff;
|
|
64
|
+
font-weight: 700;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.panel,
|
|
68
|
+
.section,
|
|
69
|
+
.howto,
|
|
70
|
+
details.catalog {
|
|
71
|
+
margin-top: 16px;
|
|
72
|
+
background: var(--card);
|
|
73
|
+
border: 1px solid var(--line);
|
|
74
|
+
border-radius: 12px;
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.panel-body,
|
|
79
|
+
.section-body,
|
|
80
|
+
.howto-body,
|
|
81
|
+
.catalog-body {
|
|
82
|
+
padding: 14px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.section-head,
|
|
86
|
+
.howto-head,
|
|
87
|
+
.catalog summary {
|
|
88
|
+
padding: 12px 14px;
|
|
89
|
+
background: #f7faff;
|
|
90
|
+
border-bottom: 1px solid var(--line);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.section-head h2,
|
|
94
|
+
.howto-head h2,
|
|
95
|
+
.catalog summary {
|
|
96
|
+
margin: 0;
|
|
97
|
+
font-size: 1rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.section-head p,
|
|
101
|
+
.howto-head p {
|
|
102
|
+
margin: 6px 0 0;
|
|
103
|
+
color: var(--muted);
|
|
104
|
+
font-size: 13px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.catalog summary {
|
|
108
|
+
cursor: pointer;
|
|
109
|
+
font-weight: 700;
|
|
110
|
+
list-style: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.catalog summary::-webkit-details-marker { display: none; }
|
|
114
|
+
|
|
115
|
+
.tools {
|
|
116
|
+
display: grid;
|
|
117
|
+
grid-template-columns: 2fr 1fr 1fr;
|
|
118
|
+
gap: 10px;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
input,
|
|
122
|
+
select {
|
|
123
|
+
width: 100%;
|
|
124
|
+
padding: 10px 12px;
|
|
125
|
+
border: 1px solid var(--line);
|
|
126
|
+
border-radius: 8px;
|
|
127
|
+
font-size: 14px;
|
|
128
|
+
background: #fff;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.subtle {
|
|
132
|
+
margin: 0 0 12px;
|
|
133
|
+
color: var(--muted);
|
|
134
|
+
font-size: 13px;
|
|
135
|
+
line-height: 1.5;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.quickstart-grid,
|
|
139
|
+
.example-grid,
|
|
140
|
+
.howto-grid {
|
|
141
|
+
display: grid;
|
|
142
|
+
gap: 12px;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.quickstart-grid {
|
|
146
|
+
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.quickstart-grid .card {
|
|
150
|
+
border: 2px solid #bfd6ff;
|
|
151
|
+
background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
|
|
152
|
+
box-shadow: 0 10px 24px rgba(15, 107, 255, 0.08);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.quickstart-grid .card h3 {
|
|
156
|
+
font-size: 1.05rem;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.quickstart-grid .command code {
|
|
160
|
+
background: #eaf2ff;
|
|
161
|
+
border-color: #cfe0ff;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.example-grid {
|
|
165
|
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.howto-grid {
|
|
169
|
+
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.card,
|
|
173
|
+
.example-card,
|
|
174
|
+
.howto-card {
|
|
175
|
+
border: 1px solid var(--line);
|
|
176
|
+
border-radius: 12px;
|
|
177
|
+
padding: 14px;
|
|
178
|
+
background: #fff;
|
|
179
|
+
min-height: 100%;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.card { background: linear-gradient(180deg, #ffffff, #fbfdff); }
|
|
183
|
+
|
|
184
|
+
.example-card h3,
|
|
185
|
+
.howto-card h3,
|
|
186
|
+
.card h3 {
|
|
187
|
+
margin: 8px 0 6px;
|
|
188
|
+
font-size: 1rem;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.example-card p,
|
|
192
|
+
.howto-card p,
|
|
193
|
+
.card p {
|
|
194
|
+
margin: 0;
|
|
195
|
+
color: var(--muted);
|
|
196
|
+
font-size: 13px;
|
|
197
|
+
line-height: 1.5;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.chip-row {
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-wrap: wrap;
|
|
203
|
+
gap: 6px;
|
|
204
|
+
margin-bottom: 8px;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.chip {
|
|
208
|
+
display: inline-block;
|
|
209
|
+
border-radius: 999px;
|
|
210
|
+
padding: 3px 9px;
|
|
211
|
+
font-size: 11px;
|
|
212
|
+
border: 1px solid #cfe0ff;
|
|
213
|
+
background: var(--accent-soft);
|
|
214
|
+
color: #1e4c99;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.chip.starter {
|
|
218
|
+
background: var(--success-soft);
|
|
219
|
+
border-color: #c7edd8;
|
|
220
|
+
color: #13683a;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.quickstart-grid .chip.starter {
|
|
224
|
+
background: #dff6e8;
|
|
225
|
+
border-color: #bde7cb;
|
|
226
|
+
color: #0f6a36;
|
|
227
|
+
font-weight: 700;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.chip.advanced {
|
|
231
|
+
background: var(--warm-soft);
|
|
232
|
+
border-color: #ffe3af;
|
|
233
|
+
color: #8a5c00;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.command {
|
|
237
|
+
margin-top: 12px;
|
|
238
|
+
display: flex;
|
|
239
|
+
align-items: center;
|
|
240
|
+
gap: 8px;
|
|
241
|
+
flex-wrap: wrap;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
code {
|
|
245
|
+
background: #f3f7ff;
|
|
246
|
+
border: 1px solid #dde8ff;
|
|
247
|
+
border-radius: 6px;
|
|
248
|
+
padding: 1px 5px;
|
|
249
|
+
font-family: Consolas, monospace;
|
|
250
|
+
font-size: 12px;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.command code {
|
|
254
|
+
display: inline-block;
|
|
255
|
+
padding: 6px 8px;
|
|
256
|
+
max-width: 100%;
|
|
257
|
+
word-break: break-word;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.copy-btn {
|
|
261
|
+
border: 1px solid #cdd8ef;
|
|
262
|
+
background: #fff;
|
|
263
|
+
border-radius: 6px;
|
|
264
|
+
padding: 5px 8px;
|
|
265
|
+
font-size: 11px;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.copy-btn:hover {
|
|
270
|
+
border-color: var(--accent);
|
|
271
|
+
color: var(--accent);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.meta-links {
|
|
275
|
+
margin-top: 10px;
|
|
276
|
+
font-size: 13px;
|
|
277
|
+
color: var(--muted);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.hidden { display: none !important; }
|
|
281
|
+
|
|
282
|
+
.table-wrap {
|
|
283
|
+
overflow-x: auto;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
table {
|
|
287
|
+
width: 100%;
|
|
288
|
+
border-collapse: collapse;
|
|
289
|
+
min-width: 920px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
th,
|
|
293
|
+
td {
|
|
294
|
+
text-align: left;
|
|
295
|
+
vertical-align: top;
|
|
296
|
+
padding: 10px;
|
|
297
|
+
border-bottom: 1px solid var(--line);
|
|
298
|
+
font-size: 13px;
|
|
299
|
+
line-height: 1.45;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
th {
|
|
303
|
+
background: #fcfdff;
|
|
304
|
+
position: sticky;
|
|
305
|
+
top: 0;
|
|
306
|
+
z-index: 1;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@media (max-width: 980px) {
|
|
310
|
+
.tools { grid-template-columns: 1fr; }
|
|
311
|
+
}
|
|
312
|
+
</style>
|
|
313
|
+
</head>
|
|
314
|
+
<body>
|
|
315
|
+
<div class="wrap">
|
|
316
|
+
<section class="hero">
|
|
317
|
+
<h1>yaml-flow Examples Catalog</h1>
|
|
318
|
+
<p>Discovery-first guide to runnable yaml-flow examples across browser demos, CLI-driven workflows, and npm library surfaces. Start with a small number of recommended examples, then drill into the full catalog only if you need the exhaustive inventory. See <a href="../docs/index.html">docs</a> for architecture and reference material.</p>
|
|
319
|
+
</section>
|
|
320
|
+
|
|
321
|
+
<section class="panel">
|
|
322
|
+
<div class="panel-body">
|
|
323
|
+
<p class="subtle">Use search and filters across the example cards and the full catalog. Supporting docs: <a href="../docs/index.html">Docs index</a>, <a href="../docs/browser-runtime-livecards-boards.html">browser runtime</a>, <a href="../docs/board-live-cards-cli.html">board-live-cards CLI</a>, <a href="../docs/step-machine-cli.html">step-machine CLI</a>.</p>
|
|
324
|
+
<div class="tools">
|
|
325
|
+
<input id="search" placeholder="Search by example name, path, command, or what it demonstrates" />
|
|
326
|
+
<select id="surfaceFilter">
|
|
327
|
+
<option value="all">All surfaces</option>
|
|
328
|
+
<option value="browser">Browser</option>
|
|
329
|
+
<option value="cli">CLI</option>
|
|
330
|
+
<option value="npm-lib">npm library</option>
|
|
331
|
+
</select>
|
|
332
|
+
<select id="modelFilter">
|
|
333
|
+
<option value="all">All models</option>
|
|
334
|
+
<option value="livecards">LiveCards / Boards</option>
|
|
335
|
+
<option value="step-machine">Step Machine</option>
|
|
336
|
+
<option value="event-graph">Event Graph</option>
|
|
337
|
+
<option value="reactive">Reactive / Continuous Event Graph</option>
|
|
338
|
+
<option value="inference">Inference</option>
|
|
339
|
+
<option value="graph-of-graphs">Graph-of-Graphs</option>
|
|
340
|
+
<option value="batch">Batch / Scenario</option>
|
|
341
|
+
</select>
|
|
342
|
+
</div>
|
|
343
|
+
</div>
|
|
344
|
+
</section>
|
|
345
|
+
|
|
346
|
+
<section class="section" data-role="examples">
|
|
347
|
+
<div class="section-head">
|
|
348
|
+
<h2>Start Here</h2>
|
|
349
|
+
<p>Recommended first stops depending on what you want to understand quickly.</p>
|
|
350
|
+
</div>
|
|
351
|
+
<div class="section-body">
|
|
352
|
+
<div class="quickstart-grid">
|
|
353
|
+
<article class="card example-card" data-surface="browser" data-model="livecards" data-search="livecards example board demo shell board canvas interactive renderer open example-board/demo-shell.html">
|
|
354
|
+
<div class="chip-row">
|
|
355
|
+
<span class="chip">Browser</span>
|
|
356
|
+
<span class="chip">LiveCards</span>
|
|
357
|
+
<span class="chip starter">Starter</span>
|
|
358
|
+
</div>
|
|
359
|
+
<h3><a href="example-board/demo-shell.html">LiveCards example board demo</a></h3>
|
|
360
|
+
<p>Fastest way to see the maintained LiveCards browser renderer, board/canvas views, refresh flows, and JSONata-backed example cards in one place.</p>
|
|
361
|
+
<div class="command"><code>Open example-board/demo-shell.html</code><button class="copy-btn" data-copy="example-board/demo-shell.html">Copy path</button></div>
|
|
362
|
+
</article>
|
|
363
|
+
|
|
364
|
+
<article class="card example-card" data-surface="browser" data-model="step-machine" data-search="step machine browser demo flowengine open browser/step-machine-browser/index.html">
|
|
365
|
+
<div class="chip-row">
|
|
366
|
+
<span class="chip">Browser</span>
|
|
367
|
+
<span class="chip">Step Machine</span>
|
|
368
|
+
<span class="chip starter">Starter</span>
|
|
369
|
+
</div>
|
|
370
|
+
<h3><a href="browser/step-machine-browser/index.html">Step Machine Browser Demo</a></h3>
|
|
371
|
+
<p>Fastest way to understand the basic step-machine mental model directly in the browser.</p>
|
|
372
|
+
<div class="command"><code>Open browser/step-machine-browser/index.html</code><button class="copy-btn" data-copy="browser/step-machine-browser/index.html">Copy path</button></div>
|
|
373
|
+
</article>
|
|
374
|
+
|
|
375
|
+
<article class="card example-card" data-surface="npm-lib" data-model="step-machine" data-search="simple greeting createEngine loadFlow FileStore npx tsx examples/npm-libs/node/simple-greeting.ts">
|
|
376
|
+
<div class="chip-row">
|
|
377
|
+
<span class="chip">npm library</span>
|
|
378
|
+
<span class="chip">Step Machine</span>
|
|
379
|
+
<span class="chip starter">Starter</span>
|
|
380
|
+
</div>
|
|
381
|
+
<h3>Simple Greeting</h3>
|
|
382
|
+
<p>Best first TypeScript example for understanding the core step-machine APIs outside the browser demos.</p>
|
|
383
|
+
<div class="command"><code>npx tsx examples/npm-libs/node/simple-greeting.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/node/simple-greeting.ts">Copy</button></div>
|
|
384
|
+
</article>
|
|
385
|
+
|
|
386
|
+
<article class="card example-card" data-surface="npm-lib" data-model="reactive" data-search="reactive pipeline self-driving graph createReactiveGraph npx tsx examples/npm-libs/continuous-event-graph/reactive-pipeline.ts">
|
|
387
|
+
<div class="chip-row">
|
|
388
|
+
<span class="chip">npm library</span>
|
|
389
|
+
<span class="chip">Reactive Graph</span>
|
|
390
|
+
<span class="chip starter">Starter</span>
|
|
391
|
+
</div>
|
|
392
|
+
<h3>Reactive Pipeline</h3>
|
|
393
|
+
<p>Best first example for push-driven orchestration and automatic downstream execution in the reactive runtime.</p>
|
|
394
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/reactive-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/reactive-pipeline.ts">Copy</button></div>
|
|
395
|
+
</article>
|
|
396
|
+
</div>
|
|
397
|
+
</div>
|
|
398
|
+
</section>
|
|
399
|
+
|
|
400
|
+
<section class="howto">
|
|
401
|
+
<div class="howto-head">
|
|
402
|
+
<h2>Execution Shortcuts</h2>
|
|
403
|
+
<p>Keep this page lightweight. Only the essential execution entrypoints are listed here; deeper operational detail lives in the linked docs.</p>
|
|
404
|
+
</div>
|
|
405
|
+
<div class="howto-body">
|
|
406
|
+
<div class="howto-grid">
|
|
407
|
+
<article class="howto-card">
|
|
408
|
+
<h3>TypeScript examples</h3>
|
|
409
|
+
<p>Most library examples under <code>examples/npm-libs</code> use the same runner.</p>
|
|
410
|
+
<div class="command"><code>npx tsx <example-file.ts></code><button class="copy-btn" data-copy="npx tsx <example-file.ts>">Copy</button></div>
|
|
411
|
+
</article>
|
|
412
|
+
|
|
413
|
+
<article class="howto-card">
|
|
414
|
+
<h3>JavaScript scripts</h3>
|
|
415
|
+
<p>Used for browser-support scripts and example wrappers.</p>
|
|
416
|
+
<div class="command"><code>node <example-file.js></code><button class="copy-btn" data-copy="node <example-file.js>">Copy</button></div>
|
|
417
|
+
</article>
|
|
418
|
+
|
|
419
|
+
<article class="howto-card">
|
|
420
|
+
<h3>step-machine CLI</h3>
|
|
421
|
+
<p>Use the root CLI when you want YAML-driven flow execution rather than embedding the library APIs.</p>
|
|
422
|
+
<div class="command"><code>node step-machine-cli.js <flow.yaml> [--initial-data <json>]</code><button class="copy-btn" data-copy="node step-machine-cli.js <flow.yaml>">Copy</button></div>
|
|
423
|
+
<div class="meta-links"><a href="../docs/step-machine-cli.html">CLI reference</a></div>
|
|
424
|
+
</article>
|
|
425
|
+
|
|
426
|
+
<article class="howto-card">
|
|
427
|
+
<h3>board-live-cards CLI</h3>
|
|
428
|
+
<p>Use the board runtime CLI for orchestration, status, retriggering, and source lifecycle operations.</p>
|
|
429
|
+
<div class="command"><code>node board-live-cards-cli.js <command></code><button class="copy-btn" data-copy="node board-live-cards-cli.js help">Copy</button></div>
|
|
430
|
+
<div class="meta-links"><a href="../docs/board-live-cards-cli.html">CLI reference</a></div>
|
|
431
|
+
</article>
|
|
432
|
+
</div>
|
|
433
|
+
</div>
|
|
434
|
+
</section>
|
|
435
|
+
|
|
436
|
+
<section class="section" data-role="examples">
|
|
437
|
+
<div class="section-head">
|
|
438
|
+
<h2>Browser Demos</h2>
|
|
439
|
+
<p>Open these directly in the browser to understand the client-side runtime and visual behavior.</p>
|
|
440
|
+
</div>
|
|
441
|
+
<div class="section-body">
|
|
442
|
+
<div class="example-grid">
|
|
443
|
+
<article class="example-card" data-surface="browser" data-model="livecards" data-search="livecards example board demo shell interactive board canvas showcase">
|
|
444
|
+
<div class="chip-row"><span class="chip">Browser</span><span class="chip">LiveCards</span></div>
|
|
445
|
+
<h3><a href="example-board/demo-shell.html">LiveCards Example Board Demo</a></h3>
|
|
446
|
+
<p>Interactive example-board shell for the browser runtime, including board/canvas views, refresh flows, and compute-backed example cards.</p>
|
|
447
|
+
<div class="command"><code>Open example-board/demo-shell.html</code><button class="copy-btn" data-copy="example-board/demo-shell.html">Copy path</button></div>
|
|
448
|
+
</article>
|
|
449
|
+
|
|
450
|
+
<article class="example-card" data-surface="browser" data-model="step-machine" data-search="step machine browser greeting demo flowengine inlined">
|
|
451
|
+
<div class="chip-row"><span class="chip">Browser</span><span class="chip">Step Machine</span></div>
|
|
452
|
+
<h3><a href="browser/step-machine-browser/index.html">Step Machine Browser Demo</a></h3>
|
|
453
|
+
<p>Simple greeting flow rendered entirely in the browser using an inlined FlowEngine-style implementation.</p>
|
|
454
|
+
<div class="command"><code>Open browser/step-machine-browser/index.html</code><button class="copy-btn" data-copy="browser/step-machine-browser/index.html">Copy path</button></div>
|
|
455
|
+
</article>
|
|
456
|
+
|
|
457
|
+
<article class="example-card" data-surface="browser" data-model="livecards" data-search="portfolio tracker browser boards portfolio-tracker node javascript board-live-cards cli">
|
|
458
|
+
<div class="chip-row"><span class="chip">Browser support</span><span class="chip">LiveCards</span><span class="chip advanced">Advanced</span></div>
|
|
459
|
+
<h3>Portfolio Tracker Board Driver</h3>
|
|
460
|
+
<p>Node-driven portfolio tracker demo that exercises end-to-end board-live-cards orchestration for a browser-facing board workflow.</p>
|
|
461
|
+
<div class="command"><code>node examples/browser/boards/portfolio-tracker/portfolio-tracker.js</code><button class="copy-btn" data-copy="node examples/browser/boards/portfolio-tracker/portfolio-tracker.js">Copy</button></div>
|
|
462
|
+
</article>
|
|
463
|
+
|
|
464
|
+
<article class="example-card" data-surface="browser" data-model="livecards" data-search="portfolio tracker task-executor external source cli delegation custom">
|
|
465
|
+
<div class="chip-row"><span class="chip">Browser support</span><span class="chip">LiveCards</span><span class="chip">Task-Executor</span></div>
|
|
466
|
+
<h3>Portfolio Tracker with Task-Executor</h3>
|
|
467
|
+
<p>Portfolio tracker with external source execution via task-executor. Demonstrates delegating source.cli execution to a custom executor script.</p>
|
|
468
|
+
<div class="command"><code>node examples/browser/boards/portfolio-tracker/portfolio-tracker.js --task-executor "node C:\path\to\portfolio-tracker-task-executor.cjs"</code><button class="copy-btn" data-copy="node examples/browser/boards/portfolio-tracker/portfolio-tracker.js --task-executor "node C:\path\to\portfolio-tracker-task-executor.cjs"">Copy</button></div>
|
|
469
|
+
</article>
|
|
470
|
+
</div>
|
|
471
|
+
</div>
|
|
472
|
+
</section>
|
|
473
|
+
|
|
474
|
+
<section class="section" data-role="examples">
|
|
475
|
+
<div class="section-head">
|
|
476
|
+
<h2>CLI Workflows</h2>
|
|
477
|
+
<p>Use these when you want orchestration behavior driven by YAML flows, CLI handlers, or reusable scenario inputs.</p>
|
|
478
|
+
</div>
|
|
479
|
+
<div class="section-body">
|
|
480
|
+
<div class="example-grid">
|
|
481
|
+
<article class="example-card" data-surface="cli" data-model="step-machine" data-search="portfolio tracker flow yaml step-machine cli run-portfolio-tracker.bat failure transitions jsonata">
|
|
482
|
+
<div class="chip-row"><span class="chip">CLI</span><span class="chip">Step Machine</span></div>
|
|
483
|
+
<h3>Portfolio Tracker Flow</h3>
|
|
484
|
+
<p>YAML-driven step-machine workflow with JSONata transforms, handler variables, and explicit failure transitions.</p>
|
|
485
|
+
<div class="command"><code>run-portfolio-tracker.bat</code><button class="copy-btn" data-copy="run-portfolio-tracker.bat">Copy</button></div>
|
|
486
|
+
</article>
|
|
487
|
+
|
|
488
|
+
<article class="example-card" data-surface="cli" data-model="step-machine" data-search="portfolio tracker baseline direct step-machine cli initial-data">
|
|
489
|
+
<div class="chip-row"><span class="chip">CLI</span><span class="chip">Step Machine</span></div>
|
|
490
|
+
<h3>Portfolio Tracker: Baseline Direct</h3>
|
|
491
|
+
<p>Runs the portfolio tracker flow directly through step-machine-cli with the baseline input payload inline.</p>
|
|
492
|
+
<div class="command"><code>node step-machine-cli.js examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml --initial-data '{...baseline...}'</code><button class="copy-btn" data-copy="node step-machine-cli.js examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml --initial-data '{"runtime_root":"./runtime","board_name":"portfolio-tracker-board","cards_template_dir":"./cards","completion_tasks":["portfolio-form","price-fetch","holdings-table","portfolio-value"],"price_fetch_task":"price-fetch","prices_t1":{"AAPL":198.5,"MSFT":425.3,"GOOG":178.9,"AMZN":192.4,"TSLA":168.75},"holdings_t2":[{"symbol":"AAPL","qty":50},{"symbol":"MSFT","qty":30},{"symbol":"GOOG","qty":100}],"prices_t2":{"AAPL":198.5,"MSFT":425.3,"GOOG":178.9,"AMZN":192.4,"TSLA":168.75},"prices_t3":{"AAPL":205,"MSFT":425.3,"GOOG":178.9,"AMZN":192.4,"TSLA":168.75}}'">Copy</button></div>
|
|
493
|
+
</article>
|
|
494
|
+
|
|
495
|
+
<article class="example-card" data-surface="cli" data-model="step-machine" data-search="portfolio tracker price shock direct step-machine cli initial-data">
|
|
496
|
+
<div class="chip-row"><span class="chip">CLI</span><span class="chip">Step Machine</span></div>
|
|
497
|
+
<h3>Portfolio Tracker: Price Shock Direct</h3>
|
|
498
|
+
<p>Runs the same portfolio flow directly with a shock payload so you can test the alternate market path without a harness layer.</p>
|
|
499
|
+
<div class="command"><code>node step-machine-cli.js examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml --initial-data '{...price-shock...}'</code><button class="copy-btn" data-copy="node step-machine-cli.js examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml --initial-data '{"runtime_root":"./runtime","board_name":"portfolio-tracker-board","cards_template_dir":"./cards","completion_tasks":["portfolio-form","price-fetch","holdings-table","portfolio-value"],"price_fetch_task":"price-fetch","prices_t1":{"AAPL":198.5,"MSFT":425.3,"GOOG":178.9,"AMZN":192.4,"TSLA":168.75},"holdings_t2":[{"symbol":"AAPL","qty":50},{"symbol":"MSFT","qty":30},{"symbol":"GOOG","qty":100}],"prices_t2":{"AAPL":155,"MSFT":390,"GOOG":132,"AMZN":171,"TSLA":143},"prices_t3":{"AAPL":148,"MSFT":365,"GOOG":125,"AMZN":160,"TSLA":129}}'">Copy</button></div>
|
|
500
|
+
</article>
|
|
501
|
+
</div>
|
|
502
|
+
</div>
|
|
503
|
+
</section>
|
|
504
|
+
|
|
505
|
+
<section class="section" data-role="examples">
|
|
506
|
+
<div class="section-head">
|
|
507
|
+
<h2>npm Library Examples: Step Machine</h2>
|
|
508
|
+
<p>Library-level usage for explicit flow control, stateful execution, and conversational loops.</p>
|
|
509
|
+
</div>
|
|
510
|
+
<div class="section-body">
|
|
511
|
+
<div class="example-grid">
|
|
512
|
+
<article class="example-card" data-surface="npm-lib" data-model="step-machine" data-search="simple greeting step machine file persistence">
|
|
513
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Step Machine</span></div>
|
|
514
|
+
<h3>Simple Greeting</h3>
|
|
515
|
+
<p>Basic step-machine flow with file persistence. Best first TypeScript example for the core flow APIs.</p>
|
|
516
|
+
<div class="command"><code>npx tsx examples/npm-libs/node/simple-greeting.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/node/simple-greeting.ts">Copy</button></div>
|
|
517
|
+
</article>
|
|
518
|
+
|
|
519
|
+
<article class="example-card" data-surface="npm-lib" data-model="step-machine" data-search="ai conversation retries transition handling memory store">
|
|
520
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Step Machine</span></div>
|
|
521
|
+
<h3>AI Conversation</h3>
|
|
522
|
+
<p>Conversation loop with retry and transition handling. Good for multi-step conversational control flow.</p>
|
|
523
|
+
<div class="command"><code>npx tsx examples/npm-libs/node/ai-conversation.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/node/ai-conversation.ts">Copy</button></div>
|
|
524
|
+
</article>
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
</section>
|
|
528
|
+
|
|
529
|
+
<section class="section" data-role="examples">
|
|
530
|
+
<div class="section-head">
|
|
531
|
+
<h2>npm Library Examples: Inference</h2>
|
|
532
|
+
<p>Examples where LLM inference complements graph execution rather than replacing it.</p>
|
|
533
|
+
</div>
|
|
534
|
+
<div class="section-body">
|
|
535
|
+
<div class="example-grid">
|
|
536
|
+
<article class="example-card" data-surface="npm-lib" data-model="inference" data-search="pluggable adapters inference cli adapter http adapter">
|
|
537
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Inference</span></div>
|
|
538
|
+
<h3>Pluggable Adapters</h3>
|
|
539
|
+
<p>Shows swappable LLM adapters and the inference extension points used for completion detection.</p>
|
|
540
|
+
<div class="command"><code>npx tsx examples/npm-libs/inference/pluggable-adapters.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/inference/pluggable-adapters.ts">Copy</button></div>
|
|
541
|
+
</article>
|
|
542
|
+
|
|
543
|
+
<article class="example-card" data-surface="npm-lib" data-model="inference" data-search="data pipeline iterative evidence accumulation inferAndApply">
|
|
544
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Inference</span></div>
|
|
545
|
+
<h3>Data Pipeline</h3>
|
|
546
|
+
<p>Demonstrates iterative evidence accumulation and repeated inference rounds over a live graph.</p>
|
|
547
|
+
<div class="command"><code>npx tsx examples/npm-libs/inference/data-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/inference/data-pipeline.ts">Copy</button></div>
|
|
548
|
+
</article>
|
|
549
|
+
|
|
550
|
+
<article class="example-card" data-surface="npm-lib" data-model="inference" data-search="copilot cli inference backend github copilot">
|
|
551
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Inference</span></div>
|
|
552
|
+
<h3>Copilot CLI</h3>
|
|
553
|
+
<p>Uses GitHub Copilot CLI as the inference backend for completion suggestions.</p>
|
|
554
|
+
<div class="command"><code>npx tsx examples/npm-libs/inference/copilot-cli.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/inference/copilot-cli.ts">Copy</button></div>
|
|
555
|
+
</article>
|
|
556
|
+
|
|
557
|
+
<article class="example-card" data-surface="npm-lib" data-model="inference" data-search="azure deployment logs checkpoint inference">
|
|
558
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Inference</span></div>
|
|
559
|
+
<h3>Azure Deployment</h3>
|
|
560
|
+
<p>Deployment checkpoint inference from logs, showing how evidence becomes completion recommendations.</p>
|
|
561
|
+
<div class="command"><code>npx tsx examples/npm-libs/inference/azure-deployment.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/inference/azure-deployment.ts">Copy</button></div>
|
|
562
|
+
</article>
|
|
563
|
+
</div>
|
|
564
|
+
</div>
|
|
565
|
+
</section>
|
|
566
|
+
|
|
567
|
+
<section class="section" data-role="examples">
|
|
568
|
+
<div class="section-head">
|
|
569
|
+
<h2>npm Library Examples: Event Graph</h2>
|
|
570
|
+
<p>Explicit DAG scheduling and state transitions without the long-lived reactive runtime.</p>
|
|
571
|
+
</div>
|
|
572
|
+
<div class="section-body">
|
|
573
|
+
<div class="example-grid">
|
|
574
|
+
<article class="example-card" data-surface="npm-lib" data-model="event-graph" data-search="research pipeline fan out fan in manual event graph driver">
|
|
575
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Event Graph</span></div>
|
|
576
|
+
<h3>Research Pipeline</h3>
|
|
577
|
+
<p>Manual event-graph driver with fan-out and fan-in behavior for multi-branch research tasks.</p>
|
|
578
|
+
<div class="command"><code>npx tsx examples/npm-libs/event-graph/research-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/event-graph/research-pipeline.ts">Copy</button></div>
|
|
579
|
+
</article>
|
|
580
|
+
|
|
581
|
+
<article class="example-card" data-surface="npm-lib" data-model="event-graph" data-search="executor pipeline validations next apply createInitialExecutionState">
|
|
582
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Event Graph</span></div>
|
|
583
|
+
<h3>Executor Pipeline</h3>
|
|
584
|
+
<p>Library-mode execution loop with runtime and static validation layered into the event graph.</p>
|
|
585
|
+
<div class="command"><code>npx tsx examples/npm-libs/event-graph/executor-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/event-graph/executor-pipeline.ts">Copy</button></div>
|
|
586
|
+
</article>
|
|
587
|
+
|
|
588
|
+
<article class="example-card" data-surface="npm-lib" data-model="event-graph" data-search="executor diamond parallel branch execution">
|
|
589
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Event Graph</span></div>
|
|
590
|
+
<h3>Executor Diamond</h3>
|
|
591
|
+
<p>Diamond DAG with parallel branches to show how multiple downstream tasks can become eligible together.</p>
|
|
592
|
+
<div class="command"><code>npx tsx examples/npm-libs/event-graph/executor-diamond.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/event-graph/executor-diamond.ts">Copy</button></div>
|
|
593
|
+
</article>
|
|
594
|
+
|
|
595
|
+
<article class="example-card" data-surface="npm-lib" data-model="event-graph" data-search="ci cd pipeline approval gates retries failure routing">
|
|
596
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Event Graph</span></div>
|
|
597
|
+
<h3>CI/CD Pipeline</h3>
|
|
598
|
+
<p>Approval gates, retries, and conditional failure routing using the event-graph execution model.</p>
|
|
599
|
+
<div class="command"><code>npx tsx examples/npm-libs/event-graph/ci-cd-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/event-graph/ci-cd-pipeline.ts">Copy</button></div>
|
|
600
|
+
</article>
|
|
601
|
+
</div>
|
|
602
|
+
</div>
|
|
603
|
+
</section>
|
|
604
|
+
|
|
605
|
+
<section class="section" data-role="examples">
|
|
606
|
+
<div class="section-head">
|
|
607
|
+
<h2>npm Library Examples: Reactive and Continuous Event Graph</h2>
|
|
608
|
+
<p>Long-lived graphs, automatic downstream execution, runtime mutation, and LiveCards bridge examples.</p>
|
|
609
|
+
</div>
|
|
610
|
+
<div class="section-body">
|
|
611
|
+
<div class="example-grid">
|
|
612
|
+
<article class="example-card" data-surface="npm-lib" data-model="reactive" data-search="reactive pipeline self-driving etl createReactiveGraph">
|
|
613
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Reactive</span></div>
|
|
614
|
+
<h3>Reactive Pipeline</h3>
|
|
615
|
+
<p>Self-driving pipeline where one push triggers a complete downstream execution cascade.</p>
|
|
616
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/reactive-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/reactive-pipeline.ts">Copy</button></div>
|
|
617
|
+
</article>
|
|
618
|
+
|
|
619
|
+
<article class="example-card" data-surface="npm-lib" data-model="reactive" data-search="reactive monitoring runtime changes callback handler fire and forget">
|
|
620
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Reactive</span></div>
|
|
621
|
+
<h3>Reactive Monitoring</h3>
|
|
622
|
+
<p>Continuous monitoring topology with runtime changes, escalation paths, and side-effect handlers.</p>
|
|
623
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/reactive-monitoring.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/reactive-monitoring.ts">Copy</button></div>
|
|
624
|
+
</article>
|
|
625
|
+
|
|
626
|
+
<article class="example-card" data-surface="npm-lib" data-model="reactive" data-search="stock dashboard dynamic graph mutation snapshot restore lineage queries">
|
|
627
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Reactive</span></div>
|
|
628
|
+
<h3>Stock Dashboard</h3>
|
|
629
|
+
<p>Runtime graph mutation, snapshots, restore, and lineage queries in a continuous event graph.</p>
|
|
630
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/stock-dashboard.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/stock-dashboard.ts">Copy</button></div>
|
|
631
|
+
</article>
|
|
632
|
+
|
|
633
|
+
<article class="example-card" data-surface="npm-lib" data-model="reactive" data-search="soc incident board side effect handlers">
|
|
634
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Reactive</span></div>
|
|
635
|
+
<h3>SOC Incident Board</h3>
|
|
636
|
+
<p>Security-operations workflow with side-effect handlers in the reactive execution model.</p>
|
|
637
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/soc-incident-board.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/soc-incident-board.ts">Copy</button></div>
|
|
638
|
+
</article>
|
|
639
|
+
|
|
640
|
+
<article class="example-card" data-surface="npm-lib" data-model="reactive" data-search="portfolio tracker external pushes retrigger">
|
|
641
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Reactive</span></div>
|
|
642
|
+
<h3>Portfolio Tracker</h3>
|
|
643
|
+
<p>Portfolio workflow that mixes external pushes with retrigger behavior.</p>
|
|
644
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/portfolio-tracker.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/portfolio-tracker.ts">Copy</button></div>
|
|
645
|
+
</article>
|
|
646
|
+
|
|
647
|
+
<article class="example-card" data-surface="npm-lib" data-model="livecards" data-search="live cards board bridge definitions to reactive graph">
|
|
648
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">LiveCards</span></div>
|
|
649
|
+
<h3>Live Cards Board</h3>
|
|
650
|
+
<p>Bridges LiveCards definitions into the reactive graph runtime.</p>
|
|
651
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/live-cards-board.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/live-cards-board.ts">Copy</button></div>
|
|
652
|
+
</article>
|
|
653
|
+
|
|
654
|
+
<article class="example-card" data-surface="npm-lib" data-model="livecards" data-search="live portfolio dashboard large live card portfolio">
|
|
655
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">LiveCards</span><span class="chip advanced">Advanced</span></div>
|
|
656
|
+
<h3>Live Portfolio Dashboard</h3>
|
|
657
|
+
<p>Large LiveCards portfolio dashboard backed by reactive task handlers.</p>
|
|
658
|
+
<div class="command"><code>npx tsx examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts">Copy</button></div>
|
|
659
|
+
</article>
|
|
660
|
+
</div>
|
|
661
|
+
</div>
|
|
662
|
+
</section>
|
|
663
|
+
|
|
664
|
+
<section class="section" data-role="examples">
|
|
665
|
+
<div class="section-head">
|
|
666
|
+
<h2>npm Library Examples: Graph-of-Graphs and Batch</h2>
|
|
667
|
+
<p>Nested orchestration and concurrent item processing patterns.</p>
|
|
668
|
+
</div>
|
|
669
|
+
<div class="section-body">
|
|
670
|
+
<div class="example-grid">
|
|
671
|
+
<article class="example-card" data-surface="npm-lib" data-model="graph-of-graphs" data-search="url processing pipeline outer dag inner dag batched">
|
|
672
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Graph-of-Graphs</span></div>
|
|
673
|
+
<h3>URL Processing Pipeline</h3>
|
|
674
|
+
<p>Outer DAG orchestrates batched inner DAGs, demonstrating nested orchestration layers.</p>
|
|
675
|
+
<div class="command"><code>npx tsx examples/npm-libs/graph-of-graphs/url-processing-pipeline.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/graph-of-graphs/url-processing-pipeline.ts">Copy</button></div>
|
|
676
|
+
</article>
|
|
677
|
+
|
|
678
|
+
<article class="example-card" data-surface="npm-lib" data-model="graph-of-graphs" data-search="multi stage etl mixed event graph step machine nested">
|
|
679
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Graph-of-Graphs</span></div>
|
|
680
|
+
<h3>Multi-stage ETL</h3>
|
|
681
|
+
<p>Mixed event-graph plus step-machine nested orchestration for multi-stage ETL.</p>
|
|
682
|
+
<div class="command"><code>npx tsx examples/npm-libs/graph-of-graphs/multi-stage-etl.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/graph-of-graphs/multi-stage-etl.ts">Copy</button></div>
|
|
683
|
+
</article>
|
|
684
|
+
|
|
685
|
+
<article class="example-card" data-surface="npm-lib" data-model="batch" data-search="batch processing per item step machine flow">
|
|
686
|
+
<div class="chip-row"><span class="chip">npm library</span><span class="chip">Batch</span></div>
|
|
687
|
+
<h3>Batch Step Machine</h3>
|
|
688
|
+
<p>Concurrent processing with a per-item step-machine flow.</p>
|
|
689
|
+
<div class="command"><code>npx tsx examples/npm-libs/batch/batch-step-machine.ts</code><button class="copy-btn" data-copy="npx tsx examples/npm-libs/batch/batch-step-machine.ts">Copy</button></div>
|
|
690
|
+
</article>
|
|
691
|
+
</div>
|
|
692
|
+
</div>
|
|
693
|
+
</section>
|
|
694
|
+
|
|
695
|
+
<details class="catalog">
|
|
696
|
+
<summary>Full Catalog</summary>
|
|
697
|
+
<div class="catalog-body table-wrap">
|
|
698
|
+
<table>
|
|
699
|
+
<thead>
|
|
700
|
+
<tr>
|
|
701
|
+
<th>Example</th>
|
|
702
|
+
<th>Surface</th>
|
|
703
|
+
<th>Model</th>
|
|
704
|
+
<th>Run / Open</th>
|
|
705
|
+
<th>Demonstrates</th>
|
|
706
|
+
</tr>
|
|
707
|
+
</thead>
|
|
708
|
+
<tbody>
|
|
709
|
+
<tr data-surface="browser" data-model="livecards"><td><a href="example-board/demo-shell.html"><code>examples/example-board/demo-shell.html</code></a></td><td>Browser</td><td>LiveCards</td><td><code>Open example-board/demo-shell.html</code></td><td>Maintained example-board browser demo for board/canvas rendering and compute-backed cards</td></tr>
|
|
710
|
+
<tr data-surface="browser" data-model="step-machine"><td><a href="browser/step-machine-browser/index.html"><code>examples/browser/step-machine-browser/index.html</code></a></td><td>Browser</td><td>Step Machine</td><td><code>Open browser/step-machine-browser/index.html</code></td><td>Simple browser-side step-machine demo</td></tr>
|
|
711
|
+
<tr data-surface="browser" data-model="livecards"><td><code>examples/browser/boards/portfolio-tracker/portfolio-tracker.js</code></td><td>Browser support</td><td>LiveCards</td><td><code>node examples/browser/boards/portfolio-tracker/portfolio-tracker.js</code></td><td>End-to-end board-live-cards portfolio driver</td></tr>
|
|
712
|
+
<tr data-surface="cli" data-model="step-machine"><td><code>examples/cli/step-machine-cli/portfolio-tracker/run-portfolio-tracker.bat</code></td><td>CLI</td><td>Step Machine</td><td><code>run-portfolio-tracker.bat</code></td><td>Portfolio tracker YAML flow orchestration</td></tr>
|
|
713
|
+
<tr data-surface="cli" data-model="step-machine"><td><code>examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml</code></td><td>CLI</td><td>Step Machine</td><td><code>node step-machine-cli.js examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml --initial-data '{...baseline...}'</code></td><td>Direct baseline portfolio tracker invocation</td></tr>
|
|
714
|
+
<tr data-surface="cli" data-model="step-machine"><td><code>examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml</code></td><td>CLI</td><td>Step Machine</td><td><code>node step-machine-cli.js examples/cli/step-machine-cli/portfolio-tracker/portfolio-tracker.flow.yaml --initial-data '{...price-shock...}'</code></td><td>Direct price-shock portfolio tracker invocation</td></tr>
|
|
715
|
+
<tr data-surface="npm-lib" data-model="step-machine"><td><code>examples/npm-libs/node/simple-greeting.ts</code></td><td>npm library</td><td>Step Machine</td><td><code>npx tsx examples/npm-libs/node/simple-greeting.ts</code></td><td>Basic step-machine flow with file persistence</td></tr>
|
|
716
|
+
<tr data-surface="npm-lib" data-model="step-machine"><td><code>examples/npm-libs/node/ai-conversation.ts</code></td><td>npm library</td><td>Step Machine</td><td><code>npx tsx examples/npm-libs/node/ai-conversation.ts</code></td><td>Conversation loop with retries</td></tr>
|
|
717
|
+
<tr data-surface="npm-lib" data-model="inference"><td><code>examples/npm-libs/inference/pluggable-adapters.ts</code></td><td>npm library</td><td>Inference</td><td><code>npx tsx examples/npm-libs/inference/pluggable-adapters.ts</code></td><td>Swappable LLM adapters</td></tr>
|
|
718
|
+
<tr data-surface="npm-lib" data-model="inference"><td><code>examples/npm-libs/inference/data-pipeline.ts</code></td><td>npm library</td><td>Inference</td><td><code>npx tsx examples/npm-libs/inference/data-pipeline.ts</code></td><td>Iterative evidence accumulation</td></tr>
|
|
719
|
+
<tr data-surface="npm-lib" data-model="inference"><td><code>examples/npm-libs/inference/copilot-cli.ts</code></td><td>npm library</td><td>Inference</td><td><code>npx tsx examples/npm-libs/inference/copilot-cli.ts</code></td><td>Copilot CLI inference backend</td></tr>
|
|
720
|
+
<tr data-surface="npm-lib" data-model="inference"><td><code>examples/npm-libs/inference/azure-deployment.ts</code></td><td>npm library</td><td>Inference</td><td><code>npx tsx examples/npm-libs/inference/azure-deployment.ts</code></td><td>Deployment checkpoint inference</td></tr>
|
|
721
|
+
<tr data-surface="npm-lib" data-model="event-graph"><td><code>examples/npm-libs/event-graph/research-pipeline.ts</code></td><td>npm library</td><td>Event Graph</td><td><code>npx tsx examples/npm-libs/event-graph/research-pipeline.ts</code></td><td>Manual fan-out/fan-in driver</td></tr>
|
|
722
|
+
<tr data-surface="npm-lib" data-model="event-graph"><td><code>examples/npm-libs/event-graph/executor-pipeline.ts</code></td><td>npm library</td><td>Event Graph</td><td><code>npx tsx examples/npm-libs/event-graph/executor-pipeline.ts</code></td><td>Validated event-graph loop</td></tr>
|
|
723
|
+
<tr data-surface="npm-lib" data-model="event-graph"><td><code>examples/npm-libs/event-graph/executor-diamond.ts</code></td><td>npm library</td><td>Event Graph</td><td><code>npx tsx examples/npm-libs/event-graph/executor-diamond.ts</code></td><td>Diamond DAG execution</td></tr>
|
|
724
|
+
<tr data-surface="npm-lib" data-model="event-graph"><td><code>examples/npm-libs/event-graph/ci-cd-pipeline.ts</code></td><td>npm library</td><td>Event Graph</td><td><code>npx tsx examples/npm-libs/event-graph/ci-cd-pipeline.ts</code></td><td>Approval gates and failure routing</td></tr>
|
|
725
|
+
<tr data-surface="npm-lib" data-model="reactive"><td><code>examples/npm-libs/continuous-event-graph/reactive-pipeline.ts</code></td><td>npm library</td><td>Reactive</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/reactive-pipeline.ts</code></td><td>Self-driving reactive pipeline</td></tr>
|
|
726
|
+
<tr data-surface="npm-lib" data-model="reactive"><td><code>examples/npm-libs/continuous-event-graph/reactive-monitoring.ts</code></td><td>npm library</td><td>Reactive</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/reactive-monitoring.ts</code></td><td>Continuous monitoring with runtime changes</td></tr>
|
|
727
|
+
<tr data-surface="npm-lib" data-model="reactive"><td><code>examples/npm-libs/continuous-event-graph/stock-dashboard.ts</code></td><td>npm library</td><td>Reactive</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/stock-dashboard.ts</code></td><td>Mutation, snapshots, lineage</td></tr>
|
|
728
|
+
<tr data-surface="npm-lib" data-model="reactive"><td><code>examples/npm-libs/continuous-event-graph/soc-incident-board.ts</code></td><td>npm library</td><td>Reactive</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/soc-incident-board.ts</code></td><td>SOC workflow with side effects</td></tr>
|
|
729
|
+
<tr data-surface="npm-lib" data-model="reactive"><td><code>examples/npm-libs/continuous-event-graph/portfolio-tracker.ts</code></td><td>npm library</td><td>Reactive</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/portfolio-tracker.ts</code></td><td>Portfolio workflow with external pushes</td></tr>
|
|
730
|
+
<tr data-surface="npm-lib" data-model="livecards"><td><code>examples/npm-libs/continuous-event-graph/live-cards-board.ts</code></td><td>npm library</td><td>LiveCards</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/live-cards-board.ts</code></td><td>LiveCards definitions bridged to reactive graph</td></tr>
|
|
731
|
+
<tr data-surface="npm-lib" data-model="livecards"><td><code>examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts</code></td><td>npm library</td><td>LiveCards</td><td><code>npx tsx examples/npm-libs/continuous-event-graph/live-portfolio-dashboard.ts</code></td><td>Large live-card portfolio dashboard</td></tr>
|
|
732
|
+
<tr data-surface="npm-lib" data-model="graph-of-graphs"><td><code>examples/npm-libs/graph-of-graphs/url-processing-pipeline.ts</code></td><td>npm library</td><td>Graph-of-Graphs</td><td><code>npx tsx examples/npm-libs/graph-of-graphs/url-processing-pipeline.ts</code></td><td>Outer DAG orchestrating inner DAGs</td></tr>
|
|
733
|
+
<tr data-surface="npm-lib" data-model="graph-of-graphs"><td><code>examples/npm-libs/graph-of-graphs/multi-stage-etl.ts</code></td><td>npm library</td><td>Graph-of-Graphs</td><td><code>npx tsx examples/npm-libs/graph-of-graphs/multi-stage-etl.ts</code></td><td>Mixed nested orchestration</td></tr>
|
|
734
|
+
<tr data-surface="npm-lib" data-model="batch"><td><code>examples/npm-libs/batch/batch-step-machine.ts</code></td><td>npm library</td><td>Batch</td><td><code>npx tsx examples/npm-libs/batch/batch-step-machine.ts</code></td><td>Batch processing with step-machine per item</td></tr>
|
|
735
|
+
</tbody>
|
|
736
|
+
</table>
|
|
737
|
+
</div>
|
|
738
|
+
</details>
|
|
739
|
+
</div>
|
|
740
|
+
|
|
741
|
+
<script>
|
|
742
|
+
const searchEl = document.getElementById('search');
|
|
743
|
+
const surfaceFilterEl = document.getElementById('surfaceFilter');
|
|
744
|
+
const modelFilterEl = document.getElementById('modelFilter');
|
|
745
|
+
|
|
746
|
+
function matchesFilters(text, surface, model) {
|
|
747
|
+
const q = (searchEl.value || '').toLowerCase().trim();
|
|
748
|
+
const wantedSurface = surfaceFilterEl.value;
|
|
749
|
+
const wantedModel = modelFilterEl.value;
|
|
750
|
+
|
|
751
|
+
const qMatch = !q || text.includes(q);
|
|
752
|
+
const surfaceMatch = wantedSurface === 'all' || surface === wantedSurface;
|
|
753
|
+
const modelMatch = wantedModel === 'all' || model === wantedModel;
|
|
754
|
+
return qMatch && surfaceMatch && modelMatch;
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
function applyFilters() {
|
|
758
|
+
document.querySelectorAll('.example-card').forEach(card => {
|
|
759
|
+
const text = (card.dataset.search || card.innerText || '').toLowerCase();
|
|
760
|
+
const surface = card.dataset.surface || '';
|
|
761
|
+
const model = card.dataset.model || '';
|
|
762
|
+
card.classList.toggle('hidden', !matchesFilters(text, surface, model));
|
|
763
|
+
});
|
|
764
|
+
|
|
765
|
+
document.querySelectorAll('section[data-role="examples"]').forEach(section => {
|
|
766
|
+
const visibleCards = section.querySelectorAll('.example-card:not(.hidden)').length;
|
|
767
|
+
section.classList.toggle('hidden', visibleCards === 0);
|
|
768
|
+
});
|
|
769
|
+
|
|
770
|
+
document.querySelectorAll('.catalog tbody tr').forEach(row => {
|
|
771
|
+
const text = row.innerText.toLowerCase();
|
|
772
|
+
const surface = row.dataset.surface || '';
|
|
773
|
+
const model = row.dataset.model || '';
|
|
774
|
+
row.classList.toggle('hidden', !matchesFilters(text, surface, model));
|
|
775
|
+
});
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
document.querySelectorAll('.copy-btn').forEach(btn => {
|
|
779
|
+
btn.addEventListener('click', async () => {
|
|
780
|
+
const text = btn.getAttribute('data-copy') || '';
|
|
781
|
+
try {
|
|
782
|
+
await navigator.clipboard.writeText(text);
|
|
783
|
+
const prev = btn.textContent;
|
|
784
|
+
btn.textContent = 'Copied';
|
|
785
|
+
setTimeout(() => { btn.textContent = prev; }, 1000);
|
|
786
|
+
} catch {
|
|
787
|
+
const prev = btn.textContent;
|
|
788
|
+
btn.textContent = 'Copy failed';
|
|
789
|
+
setTimeout(() => { btn.textContent = prev; }, 1200);
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
});
|
|
793
|
+
|
|
794
|
+
searchEl.addEventListener('input', applyFilters);
|
|
795
|
+
surfaceFilterEl.addEventListener('change', applyFilters);
|
|
796
|
+
modelFilterEl.addEventListener('change', applyFilters);
|
|
797
|
+
</script>
|
|
798
|
+
</body>
|
|
799
|
+
</html>
|