yaml-flow 5.4.0 → 5.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/board-livecards-server-runtime.js +2 -4
- package/browser/board-livecards-runtime-client.js +0 -6
- package/dist/cli/board-live-cards-cli.cjs +11 -5
- package/dist/cli/board-live-cards-cli.cjs.map +1 -1
- package/dist/cli/board-live-cards-cli.js +11 -5
- package/dist/cli/board-live-cards-cli.js.map +1 -1
- package/examples/browser/boards/portfolio-tracker/portfolio-tracker.js +1 -1
- package/examples/example-board/demo-server.js +5 -27
- package/examples/example-board/demo-shell-browser.html +3 -3
- package/examples/example-board/demo-shell-with-server.html +8 -5
- package/package.json +1 -1
|
@@ -113,7 +113,7 @@ function statusText() {
|
|
|
113
113
|
return runCli(['status', '--rg', BOARD], true) ?? '';
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
async function waitForAllCompleted(label, timeoutMs =
|
|
116
|
+
async function waitForAllCompleted(label, timeoutMs = 90000, pollMs = 500) {
|
|
117
117
|
const start = Date.now();
|
|
118
118
|
const includeInferenceCards = fs.existsSync(path.join(CARDS, 'portfolio-risk-assessment.json'))
|
|
119
119
|
&& fs.existsSync(path.join(CARDS, 'rebalancing-strategy.json'));
|
|
@@ -128,44 +128,22 @@ function jsonReply(res, status, payload) {
|
|
|
128
128
|
|
|
129
129
|
// ---------------------------------------------------------------------------
|
|
130
130
|
// Card preparation — host-level concern, not a reusable runtime concern.
|
|
131
|
-
//
|
|
132
|
-
//
|
|
133
|
-
// The runtime's bootstrap operations assume cards are already in tmpCardsDir;
|
|
134
|
-
// the host (this file) decides how and when they get there.
|
|
131
|
+
// Writes the concatenated copilot-instructions.md at the board setup root.
|
|
132
|
+
// Cards are served directly from cardsDir (no tmp copy needed).
|
|
135
133
|
// ---------------------------------------------------------------------------
|
|
136
134
|
|
|
137
135
|
const _demoPrepSetupDone = new Map(); // boardId → true
|
|
138
136
|
|
|
139
137
|
function isDemoSetupDone(boardId, service) {
|
|
140
|
-
return _demoPrepSetupDone.get(boardId) === true && fs.existsSync(service.
|
|
138
|
+
return _demoPrepSetupDone.get(boardId) === true && fs.existsSync(service.cardsDir);
|
|
141
139
|
}
|
|
142
140
|
|
|
143
141
|
function demoPrepSetup(boardId, service) {
|
|
144
|
-
const {
|
|
145
|
-
|
|
146
|
-
fs.mkdirSync(tmpSurfaceDir, { recursive: true });
|
|
147
|
-
fs.rmSync(tmpCardsDir, { recursive: true, force: true });
|
|
148
|
-
fs.mkdirSync(tmpCardsDir, { recursive: true });
|
|
149
|
-
|
|
150
|
-
const entries = fs.readdirSync(cardsDir, { withFileTypes: true });
|
|
151
|
-
for (const entry of entries) {
|
|
152
|
-
if (!entry.isFile()) continue;
|
|
153
|
-
if (!entry.name.toLowerCase().endsWith('.json')) continue;
|
|
154
|
-
fs.copyFileSync(path.join(cardsDir, entry.name), path.join(tmpCardsDir, entry.name));
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
// Copy gandalf-card templates if gandalfCardsDir is configured.
|
|
158
|
-
if (gandalfCardsDir && fs.existsSync(gandalfCardsDir)) {
|
|
159
|
-
fs.rmSync(tmpGandalfCardsDir, { recursive: true, force: true });
|
|
160
|
-
fs.mkdirSync(tmpGandalfCardsDir, { recursive: true });
|
|
161
|
-
for (const entry of fs.readdirSync(gandalfCardsDir, { withFileTypes: true })) {
|
|
162
|
-
if (!entry.isFile() || !entry.name.toLowerCase().endsWith('.json')) continue;
|
|
163
|
-
fs.copyFileSync(path.join(gandalfCardsDir, entry.name), path.join(tmpGandalfCardsDir, entry.name));
|
|
164
|
-
}
|
|
165
|
-
}
|
|
142
|
+
const { cardsDir, gandalfCardsDir, boardDir } = service;
|
|
166
143
|
|
|
167
144
|
// Concatenate agent-instructions*.md into copilot-instructions.md at boardSetupRoot.
|
|
168
145
|
const boardSetupRoot = path.dirname(boardDir);
|
|
146
|
+
fs.mkdirSync(boardSetupRoot, { recursive: true });
|
|
169
147
|
const srcDir = path.dirname(cardsDir);
|
|
170
148
|
const agentInstructionFiles = ['agent-instructions.md', 'agent-instructions-cardlayout.md'];
|
|
171
149
|
const parts = [];
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
<title>Example Board Demo (Browser Runtime)</title>
|
|
7
7
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" />
|
|
8
8
|
<script src="https://cdn.jsdelivr.net/npm/jsonata/jsonata.min.js"></script>
|
|
9
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
10
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
11
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
9
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/card-compute.js"></script>
|
|
10
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/live-cards.js"></script>
|
|
11
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/board-livegraph-engine.js"></script>
|
|
12
12
|
</head>
|
|
13
13
|
<body class="bg-light">
|
|
14
14
|
<div class="container-fluid py-3">
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
</style>
|
|
17
17
|
<script src="https://cdn.jsdelivr.net/npm/jsonata/jsonata.min.js"></script>
|
|
18
18
|
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
|
|
19
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
20
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
21
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
22
|
-
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.
|
|
19
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/card-compute.js"></script>
|
|
20
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/live-cards.js"></script>
|
|
21
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/board-livegraph-engine.js"></script>
|
|
22
|
+
<script src="https://cdn.jsdelivr.net/npm/yaml-flow@5.4.2/browser/board-livecards-runtime-client.js"></script>
|
|
23
23
|
</head>
|
|
24
24
|
<body class="bg-light">
|
|
25
25
|
<div class="container-fluid py-3">
|
|
@@ -192,11 +192,14 @@
|
|
|
192
192
|
document.getElementById('boardTitle').textContent = bid + ' (Server Runtime)';
|
|
193
193
|
document.getElementById('boardDesc').textContent = '';
|
|
194
194
|
|
|
195
|
+
// Demo-setup is a host-level concern; call it explicitly before bootstrapping.
|
|
196
|
+
const setupRes = await fetch(boardPaths(bid).demoSetup);
|
|
197
|
+
if (!setupRes.ok) throw new Error(`demo-setup failed (${setupRes.status})`);
|
|
198
|
+
|
|
195
199
|
await runtimeClient.bootstrapBoard({
|
|
196
200
|
boardId: bid,
|
|
197
201
|
taskExecutorPath: resolveTaskExecutorPathParam(),
|
|
198
202
|
rootElement: document.getElementById('boardRoot'),
|
|
199
|
-
runDemoSetup: true,
|
|
200
203
|
mode: currentMode,
|
|
201
204
|
});
|
|
202
205
|
|