waygraph 0.12.40 → 0.12.41
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/dist/cli.d.ts +1 -1
- package/dist/cli.js +56 -25
- package/package.json +1 -1
package/dist/cli.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Primary verbs (less is more):
|
|
6
6
|
* auto Explore picker; `.flow.ts` / `--blocks From To` = run that path
|
|
7
|
-
* demo Watch (step overlay); `--blocks` `--data` `--auto-next` `--fast` `--full` `--ff-expand` `--ff-disabled`
|
|
7
|
+
* demo Watch (step overlay); `--blocks` `--data` `--auto-next` `--fast` `--full` `--mini` `--ff-expand` `--ff-disabled`
|
|
8
8
|
* run Execute; `--blocks` `--data` `--non-headless` `--video`
|
|
9
9
|
*
|
|
10
10
|
* Also: list / nav / validate / check / graph / init / agent-dive / traverse / try
|
package/dist/cli.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Primary verbs (less is more):
|
|
6
6
|
* auto Explore picker; `.flow.ts` / `--blocks From To` = run that path
|
|
7
|
-
* demo Watch (step overlay); `--blocks` `--data` `--auto-next` `--fast` `--full` `--ff-expand` `--ff-disabled`
|
|
7
|
+
* demo Watch (step overlay); `--blocks` `--data` `--auto-next` `--fast` `--full` `--mini` `--ff-expand` `--ff-disabled`
|
|
8
8
|
* run Execute; `--blocks` `--data` `--non-headless` `--video`
|
|
9
9
|
*
|
|
10
10
|
* Also: list / nav / validate / check / graph / init / agent-dive / traverse / try
|
|
@@ -1047,8 +1047,9 @@ async function installOverlay(page, title) {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
if (iconLink.href !== favicon) iconLink.href = favicon;
|
|
1049
1049
|
// Hide/Show for #wg-panel - call after every panel.innerHTML refresh.
|
|
1050
|
-
// Collapsed title shows "N / M · block" (compact progress).
|
|
1051
|
-
//
|
|
1050
|
+
// Collapsed title shows "N / M · block" (compact progress).
|
|
1051
|
+
// forceCollapsed:true = force mini (--mini / --video). Omit otherwise so
|
|
1052
|
+
// the user's Hide preference (localStorage) wins. Never pass false.
|
|
1052
1053
|
window.__wgWirePanelChrome = (panel, storageKey, chromeTitle, opts) => {
|
|
1053
1054
|
if (!panel) return;
|
|
1054
1055
|
opts = opts || {};
|
|
@@ -1095,8 +1096,6 @@ async function installOverlay(page, title) {
|
|
|
1095
1096
|
let hidden = false;
|
|
1096
1097
|
if (opts.forceCollapsed === true) {
|
|
1097
1098
|
hidden = true;
|
|
1098
|
-
} else if (opts.forceCollapsed === false) {
|
|
1099
|
-
hidden = false;
|
|
1100
1099
|
} else {
|
|
1101
1100
|
try {
|
|
1102
1101
|
hidden = localStorage.getItem(storageKey) === "1";
|
|
@@ -1104,6 +1103,7 @@ async function installOverlay(page, title) {
|
|
|
1104
1103
|
/* ignore */
|
|
1105
1104
|
}
|
|
1106
1105
|
}
|
|
1106
|
+
// force mini does not overwrite Hide preference in storage.
|
|
1107
1107
|
apply(hidden, opts.forceCollapsed === true ? false : true);
|
|
1108
1108
|
const toggle = panel.querySelector("[data-wg-toggle]");
|
|
1109
1109
|
if (toggle && !toggle.dataset.wgWired) {
|
|
@@ -1145,6 +1145,8 @@ async function renderBeforeStep(page, info) {
|
|
|
1145
1145
|
if (window.__wgHideCursor) window.__wgHideCursor();
|
|
1146
1146
|
})
|
|
1147
1147
|
.catch(() => {});
|
|
1148
|
+
// miniStepLabel is Node-only — compute before evaluate (browser has no closure).
|
|
1149
|
+
const payload = { ...info, stepLabel: miniStepLabel(info) };
|
|
1148
1150
|
await page
|
|
1149
1151
|
.evaluate((info) => {
|
|
1150
1152
|
// Reused in place, not removed + recreated, every step - the old
|
|
@@ -1277,8 +1279,8 @@ async function renderBeforeStep(page, info) {
|
|
|
1277
1279
|
}
|
|
1278
1280
|
if (window.__wgWirePanelChrome) {
|
|
1279
1281
|
window.__wgWirePanelChrome(panel, "wg-panel-hidden", "waygraph demo", {
|
|
1280
|
-
stepLabel:
|
|
1281
|
-
forceCollapsed: info.forceCollapsed === true ? true :
|
|
1282
|
+
stepLabel: info.stepLabel || "",
|
|
1283
|
+
forceCollapsed: info.forceCollapsed === true ? true : undefined,
|
|
1282
1284
|
});
|
|
1283
1285
|
}
|
|
1284
1286
|
// Live, human-readable preview of what a MemKey's raw JSON will
|
|
@@ -1350,7 +1352,7 @@ async function renderBeforeStep(page, info) {
|
|
|
1350
1352
|
if (auto) auto.style.display = cb.checked ? "" : "none";
|
|
1351
1353
|
});
|
|
1352
1354
|
}
|
|
1353
|
-
},
|
|
1355
|
+
}, payload)
|
|
1354
1356
|
.catch(() => {});
|
|
1355
1357
|
}
|
|
1356
1358
|
|
|
@@ -1696,7 +1698,9 @@ async function renderAfterStep(page, info) {
|
|
|
1696
1698
|
// 900ms / 200ms holds when set.
|
|
1697
1699
|
await cycleHighlightRings(page, highlights, gatesFast, {
|
|
1698
1700
|
pace: info.pace,
|
|
1701
|
+
stepLabel: miniStepLabel(info),
|
|
1699
1702
|
});
|
|
1703
|
+
const afterPayload = { ...info, stepLabel: miniStepLabel(info) };
|
|
1700
1704
|
await page
|
|
1701
1705
|
.evaluate((info) => {
|
|
1702
1706
|
// Reused in place - see renderBeforeStep's own comment on this.
|
|
@@ -1815,8 +1819,8 @@ async function renderAfterStep(page, info) {
|
|
|
1815
1819
|
}
|
|
1816
1820
|
if (window.__wgWirePanelChrome) {
|
|
1817
1821
|
window.__wgWirePanelChrome(panel, "wg-panel-hidden", "waygraph demo", {
|
|
1818
|
-
stepLabel:
|
|
1819
|
-
forceCollapsed: info.forceCollapsed === true ? true :
|
|
1822
|
+
stepLabel: info.stepLabel || "",
|
|
1823
|
+
forceCollapsed: info.forceCollapsed === true ? true : undefined,
|
|
1820
1824
|
});
|
|
1821
1825
|
}
|
|
1822
1826
|
panel.querySelectorAll(".wg-toggle-btn").forEach((btn) => {
|
|
@@ -1845,7 +1849,7 @@ async function renderAfterStep(page, info) {
|
|
|
1845
1849
|
if (auto) auto.style.display = cb.checked ? "" : "none";
|
|
1846
1850
|
});
|
|
1847
1851
|
}
|
|
1848
|
-
},
|
|
1852
|
+
}, afterPayload)
|
|
1849
1853
|
.catch(() => {});
|
|
1850
1854
|
}
|
|
1851
1855
|
|
|
@@ -1857,6 +1861,7 @@ async function renderAfterStep(page, info) {
|
|
|
1857
1861
|
*/
|
|
1858
1862
|
async function renderStepError(page, info) {
|
|
1859
1863
|
await installOverlay(page, info.title);
|
|
1864
|
+
const errorPayload = { ...info, stepLabel: miniStepLabel(info) };
|
|
1860
1865
|
await page
|
|
1861
1866
|
.evaluate((info) => {
|
|
1862
1867
|
// Reused in place - see renderBeforeStep's own comment on this.
|
|
@@ -1917,15 +1922,15 @@ async function renderStepError(page, info) {
|
|
|
1917
1922
|
}
|
|
1918
1923
|
if (window.__wgWirePanelChrome) {
|
|
1919
1924
|
window.__wgWirePanelChrome(panel, "wg-panel-hidden", "waygraph demo", {
|
|
1920
|
-
stepLabel:
|
|
1921
|
-
forceCollapsed: info.forceCollapsed === true ? true :
|
|
1925
|
+
stepLabel: info.stepLabel || "",
|
|
1926
|
+
forceCollapsed: info.forceCollapsed === true ? true : undefined,
|
|
1922
1927
|
});
|
|
1923
1928
|
}
|
|
1924
1929
|
const runBtn = document.getElementById("wg-run");
|
|
1925
1930
|
if (runBtn) runBtn.addEventListener("click", () => window.__wgNext({}));
|
|
1926
1931
|
const retryBtn = document.getElementById("wg-error-retry");
|
|
1927
1932
|
if (retryBtn) retryBtn.addEventListener("click", () => window.__wgNext({ __wgRetry: "1" }));
|
|
1928
|
-
},
|
|
1933
|
+
}, errorPayload)
|
|
1929
1934
|
.catch(() => {});
|
|
1930
1935
|
}
|
|
1931
1936
|
|
|
@@ -2168,7 +2173,9 @@ async function presentSlides(page, slides, _gate, opts) {
|
|
|
2168
2173
|
panel = document.createElement("div");
|
|
2169
2174
|
panel.id = "wg-panel";
|
|
2170
2175
|
}
|
|
2171
|
-
panel.classList.remove("wg-
|
|
2176
|
+
panel.classList.remove("wg-error", "wg-expected");
|
|
2177
|
+
// Do not clear wg-collapsed here - WirePanelChrome honors Hide (localStorage)
|
|
2178
|
+
// unless forceCollapsed:true (--mini / --video).
|
|
2172
2179
|
const esc = (t) =>
|
|
2173
2180
|
String(t).replace(/&/g, "&").replace(/</g, "<").replace(/"/g, """);
|
|
2174
2181
|
const episodeLine =
|
|
@@ -2247,7 +2254,8 @@ async function presentSlides(page, slides, _gate, opts) {
|
|
|
2247
2254
|
" / " +
|
|
2248
2255
|
info.total +
|
|
2249
2256
|
(info.blockName ? " \\u00b7 " + info.blockName : ""),
|
|
2250
|
-
|
|
2257
|
+
// Video / --mini stays on the mini stepper (Ep N · step · block pill).
|
|
2258
|
+
forceCollapsed: info.forceCollapsed === true ? true : undefined,
|
|
2251
2259
|
});
|
|
2252
2260
|
}
|
|
2253
2261
|
let autoNow = false;
|
|
@@ -2317,6 +2325,12 @@ async function presentSlides(page, slides, _gate, opts) {
|
|
|
2317
2325
|
paceBadge: formatDemoPaceBadge(demoPace, baseAutoplay),
|
|
2318
2326
|
paceLabel: formatDemoPaceLabel(demoPace, baseAutoplay),
|
|
2319
2327
|
paceKind: demoPaceKind(demoPace),
|
|
2328
|
+
forceCollapsed:
|
|
2329
|
+
!!process.env.WAYGRAPH_VIDEO ||
|
|
2330
|
+
process.env.WAYGRAPH_MINI === "1" ||
|
|
2331
|
+
process.env.WAYGRAPH_STEPPER_MINI === "1"
|
|
2332
|
+
? true
|
|
2333
|
+
: undefined,
|
|
2320
2334
|
},
|
|
2321
2335
|
);
|
|
2322
2336
|
const started = Date.now();
|
|
@@ -3020,10 +3034,15 @@ async function runStepMode(engine, start, end, context, page, mem, resolved, slo
|
|
|
3020
3034
|
const stubBeforeTodos = stubBeforePhase.todos || [];
|
|
3021
3035
|
const isNavBlock = r.block.__waygraphKind === "nav";
|
|
3022
3036
|
const autoNow = await currentAutoplay();
|
|
3023
|
-
// Video
|
|
3024
|
-
//
|
|
3025
|
-
//
|
|
3026
|
-
const forceCollapsed =
|
|
3037
|
+
// Video / --mini: compact "Ep N · step · block" pill only.
|
|
3038
|
+
// Otherwise omit (undefined) so Hide/localStorage is honored - never pass false.
|
|
3039
|
+
// WAYGRAPH_STEPPER_MINI=1 remains a compat env alias for WAYGRAPH_MINI.
|
|
3040
|
+
const forceCollapsed =
|
|
3041
|
+
!!process.env.WAYGRAPH_VIDEO ||
|
|
3042
|
+
process.env.WAYGRAPH_MINI === "1" ||
|
|
3043
|
+
process.env.WAYGRAPH_STEPPER_MINI === "1"
|
|
3044
|
+
? true
|
|
3045
|
+
: undefined;
|
|
3027
3046
|
const requires = r.block.requires ?? [];
|
|
3028
3047
|
const keys = requires.map((k) => {
|
|
3029
3048
|
let value = "<not yet set>";
|
|
@@ -3204,7 +3223,7 @@ async function runStepMode(engine, start, end, context, page, mem, resolved, slo
|
|
|
3204
3223
|
episodeTitle: r.episodeTitle,
|
|
3205
3224
|
expectedFailureReason: r.expectedFailureReason,
|
|
3206
3225
|
stepperMode,
|
|
3207
|
-
forceCollapsed
|
|
3226
|
+
// Omit forceCollapsed on errors so Hide preference is not stomped.
|
|
3208
3227
|
});
|
|
3209
3228
|
const errEdits = await gate();
|
|
3210
3229
|
if (errEdits && errEdits.__wgRetry) {
|
|
@@ -3300,7 +3319,12 @@ async function runStepMode(engine, start, end, context, page, mem, resolved, slo
|
|
|
3300
3319
|
episodeTitle: r.episodeTitle,
|
|
3301
3320
|
stepperMode,
|
|
3302
3321
|
todos: stubAfterTodos,
|
|
3303
|
-
forceCollapsed:
|
|
3322
|
+
forceCollapsed:
|
|
3323
|
+
!!process.env.WAYGRAPH_VIDEO ||
|
|
3324
|
+
process.env.WAYGRAPH_MINI === "1" ||
|
|
3325
|
+
process.env.WAYGRAPH_STEPPER_MINI === "1"
|
|
3326
|
+
? true
|
|
3327
|
+
: undefined,
|
|
3304
3328
|
});
|
|
3305
3329
|
await gate();
|
|
3306
3330
|
}
|
|
@@ -4315,6 +4339,9 @@ function parseRunFlags(argv) {
|
|
|
4315
4339
|
else if (a === "--full") {
|
|
4316
4340
|
out.fullStepper = true;
|
|
4317
4341
|
}
|
|
4342
|
+
else if (a === "--mini" || a === "--stepper-mini") {
|
|
4343
|
+
out.miniStepper = true;
|
|
4344
|
+
}
|
|
4318
4345
|
else if (a === "--ff-expand") {
|
|
4319
4346
|
out.ffExpand = true;
|
|
4320
4347
|
}
|
|
@@ -4435,8 +4462,8 @@ function applyRunFlags(flags, opts) {
|
|
|
4435
4462
|
process.env.WAYGRAPH_HEADED = "0";
|
|
4436
4463
|
}
|
|
4437
4464
|
}
|
|
4438
|
-
if ((flags.fast || flags.fullStepper) && !opts?.allowDemoUi) {
|
|
4439
|
-
console.error("waygraph: --fast / --full are demo-only flags");
|
|
4465
|
+
if ((flags.fast || flags.fullStepper || flags.miniStepper) && !opts?.allowDemoUi) {
|
|
4466
|
+
console.error("waygraph: --fast / --full / --mini are demo-only flags");
|
|
4440
4467
|
process.exit(1);
|
|
4441
4468
|
}
|
|
4442
4469
|
if (flags.step === true) {
|
|
@@ -4480,6 +4507,9 @@ function applyRunFlags(flags, opts) {
|
|
|
4480
4507
|
if (flags.fullStepper) {
|
|
4481
4508
|
process.env.WAYGRAPH_STEPPER = "full";
|
|
4482
4509
|
}
|
|
4510
|
+
if (flags.miniStepper) {
|
|
4511
|
+
process.env.WAYGRAPH_MINI = "1";
|
|
4512
|
+
}
|
|
4483
4513
|
if (flags.ffExpand) {
|
|
4484
4514
|
process.env.WAYGRAPH_FF_EXPAND = "1";
|
|
4485
4515
|
}
|
|
@@ -4644,6 +4674,7 @@ Primary (less is more):
|
|
|
4644
4674
|
--auto-next Auto-advance steps (alias: --autoplay)
|
|
4645
4675
|
--fast Shorter auto-next / Next gates (keeps smooth cursor)
|
|
4646
4676
|
--full Classic wrap-all block chips (default: carousel)
|
|
4677
|
+
--mini Force compact mini panel (Hide pill); alias --stepper-mini
|
|
4647
4678
|
--ff-expand Expand fastForwardComposeBlock inners as separate steps
|
|
4648
4679
|
--ff-disabled Dispute: expand FF (alias --no-ff); blitz kept on those inners
|
|
4649
4680
|
--auto-play-video Unattended + recorded: --auto-next + --video (+ step); headless by default
|
|
@@ -5038,7 +5069,7 @@ Agents shipped: waygraph-planner, waygraph-author, waygraph-healer.
|
|
|
5038
5069
|
console.error("waygraph demo: missing flow/spec — e.g.\n" +
|
|
5039
5070
|
" waygraph demo src/flows/shop.flow.ts\n" +
|
|
5040
5071
|
" waygraph demo --blocks shopFlow\n" +
|
|
5041
|
-
" Flags: --blocks --data --auto-next --fast --full --ff-expand --ff-disabled --auto-play-video --title --base-url --video");
|
|
5072
|
+
" Flags: --blocks --data --auto-next --fast --full --mini --ff-expand --ff-disabled --auto-play-video --title --base-url --video");
|
|
5042
5073
|
process.exit(1);
|
|
5043
5074
|
}
|
|
5044
5075
|
const proj = flags.blocks
|