yaml-flow 8.2.5 → 8.4.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/browser/asset-integrity.json +3 -3
- package/browser/board-livecards-client.js +1 -1
- package/browser/board-livecards-localstorage.js +6 -4
- package/browser/live-cards.js +19 -25
- package/cli/{board-live-cards-lib-Iq_XAC09.d.ts → board-live-cards-lib-tjYsPt5U.d.ts} +1 -1
- package/cli/browser-api/board-live-cards-browser-adapter.d.ts +3 -3
- package/cli/browser-api/board-live-cards-browser-adapter.js +3 -2
- package/cli/browser-api/card-store-browser-api.d.ts +1 -1
- package/cli/browser-api/card-store-browser-api.js +1 -1
- package/cli/{execution-interface-ftO1W7Po.d.ts → execution-interface-DCFBy4L8.d.ts} +151 -2
- package/cli/node/artifacts-store-cli.js +5 -5
- package/cli/node/batch-runner-cli.d.ts +3 -0
- package/cli/node/batch-runner-cli.js +2 -1
- package/cli/node/board-live-cards-cli.js +14 -8
- package/cli/node/card-store-cli.js +6 -6
- package/cli/node/chat-store-cli.d.ts +23 -0
- package/cli/node/chat-store-cli.js +8 -0
- package/cli/node/execution-adapter.d.ts +4 -2
- package/cli/node/execution-adapter.js +2 -2
- package/cli/node/fs-board-adapter.d.ts +75 -75
- package/cli/node/fs-board-adapter.js +14 -10
- package/cli/node/source-cli-task-executor.js +4 -4
- package/cli/node/step-machine-cli.js +3 -3
- package/cli/{types--rXGWbSR.d.ts → types-Dc2VRMUw.d.ts} +27 -124
- package/examples/board/demo-shell-with-server.html +3 -196
- package/examples/board/doc.html +465 -0
- package/examples/board/server/board-server.js +30 -82
- package/examples/board/server/board-worker/source_def_flows.json +2 -2
- package/examples/board/server/chat-flow/copilot-chat/assistant.js +44 -185
- package/examples/board/server/chat-flow/copilot-chat/copilot_wrapper.bat +157 -0
- package/examples/board/server/chat-flow/copilot-chat/copilot_wrapper_helper.ps1 +190 -0
- package/examples/board/server/chat-flow/flow-steps.json +122 -56
- package/examples/board/test/server-http-test.js +252 -220
- package/examples/board-local/demo-shell-localstorage.html +3 -3
- package/lib/{artifacts-store-lib-public-GD4H-fFp.d.ts → artifacts-store-lib-454TAuov.d.ts} +2 -32
- package/lib/{artifacts-store-lib-public-C5UL5tyG.d.cts → artifacts-store-lib-zsGFbBV8.d.cts} +2 -32
- package/lib/artifacts-store-public.d.cts +34 -3
- package/lib/artifacts-store-public.d.ts +34 -3
- package/lib/board-live-cards-node.cjs +14 -10
- package/lib/board-live-cards-node.d.cts +42 -21
- package/lib/board-live-cards-node.d.ts +42 -21
- package/lib/board-live-cards-node.js +14 -10
- package/lib/{board-live-cards-public-BLXbcBNk.d.cts → board-live-cards-public-BM6jCEIa.d.cts} +25 -5
- package/lib/{board-live-cards-public-BZaNb2mi.d.ts → board-live-cards-public-Bz07XKRK.d.ts} +25 -5
- package/lib/board-live-cards-public.cjs +2 -2
- package/lib/board-live-cards-public.d.cts +2 -2
- package/lib/board-live-cards-public.d.ts +2 -2
- package/lib/board-live-cards-public.js +2 -2
- package/lib/board-live-cards-server-runtime.cjs +4 -4
- package/lib/board-live-cards-server-runtime.d.cts +5 -3
- package/lib/board-live-cards-server-runtime.d.ts +5 -3
- package/lib/board-live-cards-server-runtime.js +4 -4
- package/lib/board-worker-adapter.cjs +2 -2
- package/lib/board-worker-adapter.js +2 -2
- package/lib/card-store-public.d.cts +2 -2
- package/lib/card-store-public.d.ts +2 -2
- package/lib/chat-storage-lib-DGaKrjVe.d.ts +53 -0
- package/lib/chat-storage-lib-OX0Q_Ttf.d.cts +53 -0
- package/lib/chat-store-public.cjs +2 -0
- package/lib/chat-store-public.d.cts +128 -0
- package/lib/chat-store-public.d.ts +128 -0
- package/lib/chat-store-public.js +2 -0
- package/lib/execution-refs.cjs +1 -1
- package/lib/execution-refs.d.cts +10 -1
- package/lib/execution-refs.d.ts +10 -1
- package/lib/execution-refs.js +1 -1
- package/lib/index.d.cts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/server-runtime/index.cjs +4 -4
- package/lib/server-runtime/index.d.cts +6 -4
- package/lib/server-runtime/index.d.ts +6 -4
- package/lib/server-runtime/index.js +4 -4
- package/lib/step-machine-public/index.cjs +3 -3
- package/lib/step-machine-public/index.d.cts +1 -1
- package/lib/step-machine-public/index.d.ts +1 -1
- package/lib/step-machine-public/index.js +3 -3
- package/lib/{storage-interface-B6ecOulj.d.ts → storage-interface-B-7pDHwD.d.cts} +36 -1
- package/lib/{storage-interface-B6ecOulj.d.cts → storage-interface-B-7pDHwD.d.ts} +36 -1
- package/lib/stores/index.d.cts +1 -1
- package/lib/stores/index.d.ts +1 -1
- package/lib/stores/kv.d.cts +1 -1
- package/lib/stores/kv.d.ts +1 -1
- package/lib/{types-D-xVWPdY.d.ts → types-Cn0b8G-i.d.ts} +16 -65
- package/lib/{types-Bztd1KoK.d.cts → types-Dszjwfud.d.cts} +16 -65
- package/package.json +8 -2
- package/examples/board/.board-ws/cards/store/_index.json +0 -17
- package/examples/board/.board-ws/cards/store/card-market-prices.json +0 -80
- package/examples/board/.board-ws/cards/store/card-portfolio-value.json +0 -90
- package/examples/board/.board-ws/cards/store/card-portfolio.json +0 -78
- package/examples/board/server/chat-flow/chat-clear-processing.js +0 -41
- package/examples/board/server/chat-flow/chat-open-turn.js +0 -144
- package/examples/board/server/chat-flow/chat-write-assistant.js +0 -44
- package/examples/board/server/chat-flow/echo-probe/assistant.js +0 -28
|
@@ -14,31 +14,13 @@
|
|
|
14
14
|
.lc-result p { font-size: 0.8rem; margin: 0 0 0.25rem; }
|
|
15
15
|
.lc-result ul, .lc-result ol { font-size: 0.8rem; margin: 0 0 0.25rem; padding-left: 1.2rem; }
|
|
16
16
|
.lc-result li { margin-bottom: 0.15rem; }
|
|
17
|
-
.demo-docs pre {
|
|
18
|
-
background: #0f172a;
|
|
19
|
-
border-radius: 0.75rem;
|
|
20
|
-
color: #e2e8f0;
|
|
21
|
-
font-size: 0.8rem;
|
|
22
|
-
margin: 0;
|
|
23
|
-
overflow-x: auto;
|
|
24
|
-
padding: 0.9rem 1rem;
|
|
25
|
-
white-space: pre-wrap;
|
|
26
|
-
}
|
|
27
|
-
.demo-docs code {
|
|
28
|
-
color: inherit;
|
|
29
|
-
font-size: inherit;
|
|
30
|
-
}
|
|
31
|
-
.demo-docs .list-inline-item {
|
|
32
|
-
margin-right: 0.35rem;
|
|
33
|
-
margin-bottom: 0.35rem;
|
|
34
|
-
}
|
|
35
17
|
</style>
|
|
36
18
|
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
|
37
19
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
38
20
|
<script src="https://cdn.jsdelivr.net/npm/dompurify/dist/purify.min.js"></script>
|
|
39
21
|
<script src="https://cdn.jsdelivr.net/npm/leader-line/leader-line.min.js"></script>
|
|
40
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@8.
|
|
41
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@8.
|
|
22
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@8.4.0/browser/live-cards.js"></script>
|
|
23
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@8.4.0/browser/board-livecards-client.js"></script>
|
|
42
24
|
</head>
|
|
43
25
|
<body class="bg-light">
|
|
44
26
|
<div class="container-fluid py-3">
|
|
@@ -72,153 +54,6 @@
|
|
|
72
54
|
Source execution and event processing happen on the server side.
|
|
73
55
|
</div>
|
|
74
56
|
|
|
75
|
-
<div class="card shadow-sm border-0 mb-3 demo-docs">
|
|
76
|
-
<div class="card-body">
|
|
77
|
-
<div class="d-flex flex-wrap justify-content-between gap-3 mb-3">
|
|
78
|
-
<div>
|
|
79
|
-
<h2 class="h6 mb-1">Advanced Composition Model</h2>
|
|
80
|
-
<p class="small text-muted mb-0">
|
|
81
|
-
This demo still mounts the full board, but the same client now exposes the shared runtime session
|
|
82
|
-
needed for filtered or projected live views. Host applications do not need to reimplement SSE,
|
|
83
|
-
client identity, notification reduction, or card chat subscribe or unsubscribe.
|
|
84
|
-
</p>
|
|
85
|
-
</div>
|
|
86
|
-
<div class="small text-muted text-end">
|
|
87
|
-
<div><strong>Active board:</strong> <span id="docActiveBoard">default</span></div>
|
|
88
|
-
<div><strong>Shared client id:</strong> <span id="docClientId">pending</span></div>
|
|
89
|
-
<div><strong>Session state:</strong> <span id="docSessionState">not connected</span></div>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
|
|
93
|
-
<div class="row g-3">
|
|
94
|
-
<div class="col-lg-4">
|
|
95
|
-
<div class="border rounded-3 p-3 h-100 bg-white">
|
|
96
|
-
<h3 class="h6 mb-2">What is public now</h3>
|
|
97
|
-
<ul class="list-inline small mb-0">
|
|
98
|
-
<li class="list-inline-item badge text-bg-light">createBoardRuntimeSession()</li>
|
|
99
|
-
<li class="list-inline-item badge text-bg-light">createDerivedBoardRuntime()</li>
|
|
100
|
-
<li class="list-inline-item badge text-bg-light">applyBoardNotifications()</li>
|
|
101
|
-
<li class="list-inline-item badge text-bg-light">serverPayloadToBoardState()</li>
|
|
102
|
-
<li class="list-inline-item badge text-bg-light">pickBoardState()</li>
|
|
103
|
-
<li class="list-inline-item badge text-bg-light">subtractBoardState()</li>
|
|
104
|
-
<li class="list-inline-item badge text-bg-light">deriveBoardState()</li>
|
|
105
|
-
<li class="list-inline-item badge text-bg-light">session.attachProvidedState()</li>
|
|
106
|
-
<li class="list-inline-item badge text-bg-light">session.subscribeCardChats()</li>
|
|
107
|
-
<li class="list-inline-item badge text-bg-light">session.unsubscribeCardChats()</li>
|
|
108
|
-
</ul>
|
|
109
|
-
</div>
|
|
110
|
-
</div>
|
|
111
|
-
<div class="col-lg-4">
|
|
112
|
-
<div class="border rounded-3 p-3 h-100 bg-white">
|
|
113
|
-
<h3 class="h6 mb-2">Recommended shape</h3>
|
|
114
|
-
<ol class="small mb-0 ps-3">
|
|
115
|
-
<li>Create one shared runtime session per logical board.</li>
|
|
116
|
-
<li>Mount the full board or any number of derived views from that same session.</li>
|
|
117
|
-
<li>Reuse the shared client id for all chat subscribe or unsubscribe calls.</li>
|
|
118
|
-
<li>Use the public reducer helpers instead of mutating projected state by hand.</li>
|
|
119
|
-
</ol>
|
|
120
|
-
</div>
|
|
121
|
-
</div>
|
|
122
|
-
<div class="col-lg-4">
|
|
123
|
-
<div class="border rounded-3 p-3 h-100 bg-white">
|
|
124
|
-
<h3 class="h6 mb-2">When to use this</h3>
|
|
125
|
-
<ul class="small mb-0 ps-3">
|
|
126
|
-
<li>split views over one board</li>
|
|
127
|
-
<li>plugin or secondary mounts</li>
|
|
128
|
-
<li>filtered card subsets</li>
|
|
129
|
-
<li>provided-state boot with live SSE attached afterward</li>
|
|
130
|
-
</ul>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
</div>
|
|
134
|
-
|
|
135
|
-
<div class="row g-3 mt-1">
|
|
136
|
-
<div class="col-xl-4">
|
|
137
|
-
<div class="border rounded-3 overflow-hidden bg-white h-100">
|
|
138
|
-
<div class="px-3 py-2 border-bottom small fw-semibold">1. Share one session</div>
|
|
139
|
-
<pre><code>const client = BoardLiveCardsClient.createBoardRuntimeClient({
|
|
140
|
-
fetchServer,
|
|
141
|
-
boardPaths,
|
|
142
|
-
getServerOrigin,
|
|
143
|
-
});
|
|
144
|
-
|
|
145
|
-
await client.bootstrapBoard({
|
|
146
|
-
boardId: 'default',
|
|
147
|
-
rootElement: boardRoot,
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
const session = client.getRuntimeSession();</code></pre>
|
|
151
|
-
</div>
|
|
152
|
-
</div>
|
|
153
|
-
<div class="col-xl-4">
|
|
154
|
-
<div class="border rounded-3 overflow-hidden bg-white h-100">
|
|
155
|
-
<div class="px-3 py-2 border-bottom small fw-semibold">2. Mount derived live views</div>
|
|
156
|
-
<pre><code>const alertsView = client.createDerivedRuntime({
|
|
157
|
-
includeCard: (model) => model.id.startsWith('alert-'),
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
alertsView.mountBoard({
|
|
161
|
-
rootElement: alertsRoot,
|
|
162
|
-
mode: 'board',
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// shares SSE + chat session with the main board</code></pre>
|
|
166
|
-
</div>
|
|
167
|
-
</div>
|
|
168
|
-
<div class="col-xl-4">
|
|
169
|
-
<div class="border rounded-3 overflow-hidden bg-white h-100">
|
|
170
|
-
<div class="px-3 py-2 border-bottom small fw-semibold">3. Start from provided state</div>
|
|
171
|
-
<pre><code>const session = BoardLiveCardsClient.createBoardRuntimeSession({
|
|
172
|
-
fetchServer,
|
|
173
|
-
boardPaths,
|
|
174
|
-
getServerOrigin,
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
session.attachProvidedState({ boardId, payload });
|
|
178
|
-
await session.bootstrap({ boardId, skipInitBoard: true });
|
|
179
|
-
|
|
180
|
-
const view = BoardLiveCardsClient.createDerivedBoardRuntime({
|
|
181
|
-
session,
|
|
182
|
-
includeCard: (model) => model.id !== 'hidden-card',
|
|
183
|
-
});</code></pre>
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
</div>
|
|
187
|
-
|
|
188
|
-
<div class="row g-3 mt-1">
|
|
189
|
-
<div class="col-xl-6">
|
|
190
|
-
<div class="border rounded-3 overflow-hidden bg-white h-100">
|
|
191
|
-
<div class="px-3 py-2 border-bottom small fw-semibold">Reducer helpers for host-managed state</div>
|
|
192
|
-
<pre><code>const state = BoardLiveCardsClient.serverPayloadToBoardState(payload);
|
|
193
|
-
|
|
194
|
-
const nextState = BoardLiveCardsClient.applyBoardNotifications(
|
|
195
|
-
state,
|
|
196
|
-
notifications,
|
|
197
|
-
() => payload,
|
|
198
|
-
);
|
|
199
|
-
|
|
200
|
-
const leftPane = BoardLiveCardsClient.pickBoardState(nextState, ['card-a']);
|
|
201
|
-
const rightPane = BoardLiveCardsClient.subtractBoardState(nextState, ['card-a']);</code></pre>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
<div class="col-xl-6">
|
|
205
|
-
<div class="border rounded-3 overflow-hidden bg-white h-100">
|
|
206
|
-
<div class="px-3 py-2 border-bottom small fw-semibold">Chat lifecycle stays with the session</div>
|
|
207
|
-
<pre><code>const session = client.getRuntimeSession();
|
|
208
|
-
|
|
209
|
-
await session.subscribeCardChats(cardId);
|
|
210
|
-
await session.unsubscribeCardChats(cardId);
|
|
211
|
-
|
|
212
|
-
// same shared client id is reused automatically
|
|
213
|
-
console.log(session.getClientId());
|
|
214
|
-
|
|
215
|
-
// incoming notifications keep mounted chat UIs synchronized</code></pre>
|
|
216
|
-
</div>
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
</div>
|
|
221
|
-
|
|
222
57
|
<div id="boardRoot">
|
|
223
58
|
<div class="d-flex align-items-center justify-content-center" style="height: 72vh;">
|
|
224
59
|
<div class="text-center">
|
|
@@ -242,34 +77,9 @@ console.log(session.getClientId());
|
|
|
242
77
|
}
|
|
243
78
|
let currentMode = 'canvas';
|
|
244
79
|
let bootstrapCompleted = false;
|
|
245
|
-
let activeBoardId = '
|
|
80
|
+
let activeBoardId = 'live';
|
|
246
81
|
let runtimeClient = null;
|
|
247
82
|
|
|
248
|
-
function refreshDocsRuntimeState() {
|
|
249
|
-
const boardEl = document.getElementById('docActiveBoard');
|
|
250
|
-
const clientIdEl = document.getElementById('docClientId');
|
|
251
|
-
const sessionStateEl = document.getElementById('docSessionState');
|
|
252
|
-
const session = runtimeClient && typeof runtimeClient.getRuntimeSession === 'function'
|
|
253
|
-
? runtimeClient.getRuntimeSession()
|
|
254
|
-
: null;
|
|
255
|
-
|
|
256
|
-
if (boardEl) boardEl.textContent = activeBoardId || 'default';
|
|
257
|
-
if (!session) {
|
|
258
|
-
if (clientIdEl) clientIdEl.textContent = 'unavailable';
|
|
259
|
-
if (sessionStateEl) sessionStateEl.textContent = 'not connected';
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
if (clientIdEl) clientIdEl.textContent = session.getClientId();
|
|
264
|
-
if (sessionStateEl) {
|
|
265
|
-
const state = session.getState();
|
|
266
|
-
const status = session.isConnected()
|
|
267
|
-
? `connected, ${Array.isArray(state && state.cardIds) ? state.cardIds.length : 0} cards in session state`
|
|
268
|
-
: 'not connected';
|
|
269
|
-
sessionStateEl.textContent = status;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
|
|
273
83
|
function boardPaths(boardId) {
|
|
274
84
|
return defaultBoardPaths(boardId || activeBoardId || 'default');
|
|
275
85
|
}
|
|
@@ -352,7 +162,6 @@ console.log(session.getClientId());
|
|
|
352
162
|
runtimeClient.dispose();
|
|
353
163
|
bootstrapCompleted = false;
|
|
354
164
|
activeBoardId = boardId;
|
|
355
|
-
refreshDocsRuntimeState();
|
|
356
165
|
document.getElementById('boardRoot').innerHTML =
|
|
357
166
|
'<div class="d-flex align-items-center justify-content-center" style="height:72vh">'
|
|
358
167
|
+ '<div class="text-center"><div class="spinner-border mb-3" role="status">'
|
|
@@ -378,7 +187,6 @@ console.log(session.getClientId());
|
|
|
378
187
|
});
|
|
379
188
|
|
|
380
189
|
bootstrapCompleted = true;
|
|
381
|
-
refreshDocsRuntimeState();
|
|
382
190
|
}
|
|
383
191
|
|
|
384
192
|
document.getElementById('modeBoard').addEventListener('click', function () {
|
|
@@ -448,7 +256,6 @@ console.log(session.getClientId());
|
|
|
448
256
|
});
|
|
449
257
|
|
|
450
258
|
loadBoardList().then(function () {
|
|
451
|
-
refreshDocsRuntimeState();
|
|
452
259
|
return bootstrap(activeBoardId);
|
|
453
260
|
}).catch(function (err) {
|
|
454
261
|
console.error(err);
|