@marver-design/marver 0.25.1 → 0.26.1
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/CHANGELOG.md +116 -0
- package/README.md +5 -3
- package/dist/{anchor-DVV732zR.mjs → anchor-5H1vnoLu.mjs} +6 -1
- package/dist/{anchor-check-DGZnYviN.mjs → anchor-check-l-ny3UzH.mjs} +1 -1
- package/dist/audio-Dw1lfMdb.mjs +443 -0
- package/dist/{auth-DdUKeVKt.mjs → auth-Dix8wrXV.mjs} +1 -1
- package/dist/{bake-BpxMZfij.mjs → bake-C-awKgLA.mjs} +1 -1
- package/dist/{boards-Csxj2WJn.mjs → boards-DYG22tOe.mjs} +2 -2
- package/dist/{build-DKaGhoVN.mjs → build-BDRiO_mP.mjs} +16 -9
- package/dist/capture-vadKjuCo.mjs +730 -0
- package/dist/cli.mjs +24 -18
- package/dist/{collab-gqNdScUE.mjs → collab-Dxg2trOK.mjs} +4 -3
- package/dist/{comments-Zoch254k.mjs → comments-0BSbb04K.mjs} +14 -3
- package/dist/{comments-pTLlhjh4.mjs → comments-BqXua-XL.mjs} +7 -7
- package/dist/{config-cKgZBRj0.mjs → config-Cf7EjAMf.mjs} +12 -1
- package/dist/{context-D2ugHqwO.mjs → context-HQ4Giw58.mjs} +1 -1
- package/dist/daemon-DL6Fwq6D.mjs +2569 -0
- package/dist/{dev-Diqx1Rt8.mjs → dev-Bw_qYWWq.mjs} +202 -18
- package/dist/dev-lock-DWSpa6nj.mjs +179 -0
- package/dist/{events-DnK_AnrW.mjs → events-CLH4ijKP.mjs} +14 -4
- package/dist/{init-DO4DhUt_.mjs → init-D8DtrK_F.mjs} +2 -2
- package/dist/{ledger-BNXW14Xw.mjs → ledger-D54iROST.mjs} +17 -1
- package/dist/{link-C-qUIuKU.mjs → link-BNzLvdhI.mjs} +2 -2
- package/dist/live-Cgzsicwi.mjs +4 -0
- package/dist/{manifest-DnAte_fB.mjs → manifest-Nl3KSVOk.mjs} +1 -1
- package/dist/{marks-koRsbHfe.mjs → marks-CKgzucHZ.mjs} +2 -2
- package/dist/{marks-DFuintmJ.mjs → marks-DyWMv_Z1.mjs} +23 -5
- package/dist/{marver-id-gate-DGANtVyC.mjs → marver-id-gate-BjF6v4bT.mjs} +4 -4
- package/dist/perf-C75MZ73h.mjs +167 -0
- package/dist/{perf-CCisg-ny.mjs → perf-DPbLGhhO.mjs} +1 -1
- package/dist/perf-jam-BU3TVrZu.mjs +239 -0
- package/dist/{plugin-dTF5reck.mjs → plugin-DkGmZs_r.mjs} +298 -38
- package/dist/{poster-D-zjYpgk.mjs → poster-BdtSKMDm.mjs} +2 -1
- package/dist/{profile-Do0nGkXO.mjs → profile-WU9qcbIo.mjs} +1 -1
- package/dist/{publish-bakes-C_9VZ-Mq.mjs → publish-bakes-9RzRToXV.mjs} +3 -3
- package/dist/queue-29ok5_eZ.mjs +1319 -0
- package/dist/reserve-BURNQ2Y3.mjs +53 -0
- package/dist/{rolldown-runtime-D7D4PA-g.mjs → rolldown-runtime-8H4AJuhK.mjs} +1 -0
- package/dist/{serve-wv2QWdxB.mjs → serve-C8rVheYk.mjs} +12 -12
- package/dist/session-BAaJsK5c.mjs +191 -0
- package/dist/{share-ScamJcks.mjs → share--oFJ1bCI.mjs} +2 -2
- package/dist/{shot-CUlmkqFX.mjs → shot-DQeR_Pfn.mjs} +339 -20
- package/dist/shot-XQV7HC9A.mjs +139 -0
- package/dist/speech-models-DomiLQcY.mjs +299 -0
- package/dist/speech-worker.mjs +354 -0
- package/dist/{summary-CrW88e3q.mjs → summary-Y8MY1Wuc.mjs} +2 -2
- package/dist/{sync-C3035OnJ.mjs → sync-DKk-yT1V.mjs} +9 -8
- package/dist/{work-GE88wb_3.mjs → work-F5u-twpJ.mjs} +28 -5
- package/dist/{work-CpJn1gwY.mjs → work-VvX_JIgl.mjs} +2 -2
- package/docs/jam-session.md +194 -0
- package/docs/live-jam.md +29 -3
- package/package.json +7 -1
- package/src/client/frame-host/bridge.js +20 -2
- package/src/client/frame-host/inspect.d.ts +4 -0
- package/src/client/frame-host/inspect.js +96 -6
- package/src/client/frame-host/keys.d.ts +6 -0
- package/src/client/frame-host/keys.js +59 -0
- package/src/client/frame-host/trail.d.ts +7 -0
- package/src/client/frame-host/trail.js +204 -0
- package/src/client/shell/App.tsx +52 -8
- package/src/client/shell/Comments.tsx +20 -6
- package/src/client/shell/JamSurface.tsx +346 -0
- package/src/client/shell/Play.tsx +32 -9
- package/src/client/shell/Tip.tsx +8 -3
- package/src/client/shell/Toolbar.tsx +5 -4
- package/src/client/shell/canvas/Canvas.tsx +12 -2
- package/src/client/shell/canvas/FrameNode.tsx +14 -4
- package/src/client/shell/comments-store.ts +23 -16
- package/src/client/shell/icons.tsx +17 -0
- package/src/client/shell/jam-capture.ts +1005 -0
- package/src/client/shell/jam-keys.ts +358 -0
- package/src/client/shell/jam-lane.tsx +249 -0
- package/src/client/shell/jam-lines.ts +115 -0
- package/src/client/shell/jam-panel.tsx +556 -0
- package/src/client/shell/jam-queue.ts +126 -0
- package/src/client/shell/jam-session.tsx +389 -0
- package/src/client/shell/jam-state.ts +103 -0
- package/src/client/shell/jam-surface-parts.tsx +106 -0
- package/src/client/shell/jam-ui.tsx +104 -0
- package/src/client/shell/jam-voice.ts +479 -0
- package/src/client/shell/sound.ts +22 -0
- package/src/client/shell/stage-size.ts +11 -0
- package/src/client/shell/store.ts +47 -17
- package/src/client/shell/styles.css +564 -2
- package/src/client/stage/main.tsx +18 -2
- package/src/shared/capture-frames.ts +41 -0
- package/src/shared/events.ts +19 -4
- package/src/shared/speech.ts +16 -0
- package/templates/AGENTS-embedded.md +10 -2
- package/templates/AGENTS-studio.md +10 -2
- package/templates/instructions/iterate.md +8 -6
- package/templates/instructions/jam.md +131 -59
- package/dist/daemon-Cl8KXGW4.mjs +0 -1523
- package/dist/perf-QJIWtTw1.mjs +0 -68
- package/dist/shot-jdO_B6Qw.mjs +0 -86
package/dist/perf-QJIWtTw1.mjs
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { r as readReloads } from "./perf-CCisg-ny.mjs";
|
|
2
|
-
//#region src/cli/perf.ts
|
|
3
|
-
/**
|
|
4
|
-
* `marver perf` (spec 26 Part 1): the reload log read back - per edited file, the frames it reached
|
|
5
|
-
* and how; every page-wide reload (sent or dropped) and every time the canvas page itself booted,
|
|
6
|
-
* with what came just before; the slowest frames to settle. Reads design/.local/perf/reloads.jsonl.
|
|
7
|
-
*/
|
|
8
|
-
function perfCommand(root, opts) {
|
|
9
|
-
const minutes = Number(opts.minutes) > 0 ? Number(opts.minutes) : 60;
|
|
10
|
-
const log = readReloads(root, Date.now() - minutes * 6e4);
|
|
11
|
-
const files = /* @__PURE__ */ new Map();
|
|
12
|
-
for (const e of log) if (e.kind === "update") {
|
|
13
|
-
const f = files.get(e.file ?? "(no file)") ?? {
|
|
14
|
-
edits: 0,
|
|
15
|
-
reload: /* @__PURE__ */ new Set(),
|
|
16
|
-
inPlace: /* @__PURE__ */ new Set()
|
|
17
|
-
};
|
|
18
|
-
f.edits++;
|
|
19
|
-
for (const id of e.reload ?? []) f.reload.add(id);
|
|
20
|
-
for (const id of e.inPlace ?? []) f.inPlace.add(id);
|
|
21
|
-
files.set(e.file ?? "(no file)", f);
|
|
22
|
-
}
|
|
23
|
-
const reloads = log.filter((e) => e.kind === "full-reload");
|
|
24
|
-
const boots = log.flatMap((e, i) => e.kind === "shell-boot" ? [{
|
|
25
|
-
ts: e.ts,
|
|
26
|
-
before: log.slice(Math.max(0, i - 3), i).filter((x) => x.kind !== "ready" && x.kind !== "settled")
|
|
27
|
-
}] : []);
|
|
28
|
-
const slow = log.filter((e) => e.kind === "settled" && typeof e.ms === "number").sort((a, b) => b.ms - a.ms).slice(0, 5);
|
|
29
|
-
const booted = log.filter((e) => e.kind === "ready");
|
|
30
|
-
const by = (c) => booted.filter((e) => e.cause === c).length;
|
|
31
|
-
const reloaded = by("job");
|
|
32
|
-
if (opts.json) {
|
|
33
|
-
console.log(JSON.stringify({
|
|
34
|
-
minutes,
|
|
35
|
-
files: Object.fromEntries([...files].map(([k, v]) => [k, {
|
|
36
|
-
edits: v.edits,
|
|
37
|
-
reached: [...v.reload],
|
|
38
|
-
inPlace: [...v.inPlace]
|
|
39
|
-
}])),
|
|
40
|
-
documents: {
|
|
41
|
-
afterEdit: reloaded,
|
|
42
|
-
byHand: by("manual"),
|
|
43
|
-
retried: by("retry"),
|
|
44
|
-
self: by("self"),
|
|
45
|
-
first: by("first")
|
|
46
|
-
},
|
|
47
|
-
reloads,
|
|
48
|
-
boots,
|
|
49
|
-
slow
|
|
50
|
-
}, null, 2));
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
const t = (ts) => new Date(ts).toLocaleTimeString();
|
|
54
|
-
console.log(`last ${minutes} min - design/.local/perf/reloads.jsonl`);
|
|
55
|
-
console.log(`\nedits (${files.size} files)`);
|
|
56
|
-
for (const [file, f] of [...files].sort((a, b) => b[1].edits - a[1].edits)) console.log(` ${file} ${f.edits}x reached ${f.reload.size} frame${f.reload.size === 1 ? "" : "s"}${f.inPlace.size ? `, ${f.inPlace.size} updated in place` : ""}`);
|
|
57
|
-
console.log(`\nframe documents booted: ${reloaded} after an edit (a frame off screen reloads when it comes into view), ${by("first")} first loads, ${by("manual")} by hand, ${by("retry")} watchdog retries, ${by("self")} reloaded themselves`);
|
|
58
|
-
console.log(`\npage-wide reloads: ${reloads.filter((r) => r.passed).length} sent (dependency rebuilds), ${reloads.filter((r) => !r.passed).length} dropped`);
|
|
59
|
-
for (const r of reloads) console.log(` ${t(r.ts)} ${r.passed ? "sent " : "dropped"} ${r.triggeredBy ?? "no file named"}`);
|
|
60
|
-
console.log(`\ncanvas page loads: ${boots.length}`);
|
|
61
|
-
for (const b of boots) console.log(` ${t(b.ts)}${b.before.length ? ` after: ${b.before.map((x) => x.kind + (x.file ? ` ${x.file}` : "")).join(", ")}` : ""}`);
|
|
62
|
-
if (slow.length) {
|
|
63
|
-
console.log("\nslowest to settle");
|
|
64
|
-
for (const s of slow) console.log(` ${s.frame} ${s.ms} ms`);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
//#endregion
|
|
68
|
-
export { perfCommand };
|
package/dist/shot-jdO_B6Qw.mjs
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { r as NAME } from "./cli.mjs";
|
|
2
|
-
import { i as readDevInfo } from "./work-GE88wb_3.mjs";
|
|
3
|
-
//#region src/cli/shot.ts
|
|
4
|
-
/**
|
|
5
|
-
* `marver shot <scene/frame> [...]`, `--scene <name>`, `--all` - render frames headless and
|
|
6
|
-
* print the PNG paths, one per line, in the order asked.
|
|
7
|
-
*
|
|
8
|
-
* The shell-ful agents' door into the same verify loop jam teaches: build, shoot, LOOK. One
|
|
9
|
-
* frame goes through /api/shot; several, a scene or everything go through /api/shots as ONE
|
|
10
|
-
* operation (one browser, several frames at a time), so shooting a scene costs about what
|
|
11
|
-
* shooting a frame did. shot.ts (server) has the capture story.
|
|
12
|
-
*/
|
|
13
|
-
async function shotCommand(root, frames, opts) {
|
|
14
|
-
const usage = `${NAME} shot <scene/frame ...> | --scene <name> | --all [--theme <name>] [--scale 1-4] [--json]`;
|
|
15
|
-
if ([
|
|
16
|
-
frames.length > 0,
|
|
17
|
-
!!opts.scene,
|
|
18
|
-
!!opts.all
|
|
19
|
-
].filter(Boolean).length !== 1) throw new Error(`name the frames, one way: ${usage}`);
|
|
20
|
-
const info = readDevInfo(root);
|
|
21
|
-
if (!info) throw new Error(`\`${NAME} dev\` is not running in this repo (design/.local/dev.json not found) - start it first.`);
|
|
22
|
-
const scale = opts.scale != null ? Number(opts.scale) : void 0;
|
|
23
|
-
const theme = opts.theme;
|
|
24
|
-
const single = frames.length === 1 && !opts.scene && !opts.all;
|
|
25
|
-
let res;
|
|
26
|
-
try {
|
|
27
|
-
if (single) {
|
|
28
|
-
const qs = new URLSearchParams({
|
|
29
|
-
frame: frames[0],
|
|
30
|
-
...theme ? { theme } : {},
|
|
31
|
-
...scale != null ? { scale: String(scale) } : {}
|
|
32
|
-
});
|
|
33
|
-
res = await fetch(`http://localhost:${info.port}/__mv/api/shot?${qs}`, { headers: { "x-mv-work": info.token } });
|
|
34
|
-
} else {
|
|
35
|
-
const sel = opts.all ? { all: true } : opts.scene ? { scene: opts.scene } : { frames };
|
|
36
|
-
res = await fetch(`http://localhost:${info.port}/__mv/api/shots`, {
|
|
37
|
-
method: "POST",
|
|
38
|
-
headers: {
|
|
39
|
-
"x-mv-work": info.token,
|
|
40
|
-
"content-type": "application/json"
|
|
41
|
-
},
|
|
42
|
-
body: JSON.stringify({
|
|
43
|
-
...sel,
|
|
44
|
-
...theme ? { theme } : {},
|
|
45
|
-
...scale != null ? { scale } : {}
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
} catch {
|
|
50
|
-
throw new Error(`could not reach \`${NAME} dev\` on port ${info.port} - is it still running?`);
|
|
51
|
-
}
|
|
52
|
-
const data = await res.json().catch(() => ({}));
|
|
53
|
-
if (!res.ok) throw new Error(data.error ?? `shot failed (${res.status})`);
|
|
54
|
-
const one = data;
|
|
55
|
-
const results = single ? [one.path ? {
|
|
56
|
-
frame: frames[0],
|
|
57
|
-
ok: true,
|
|
58
|
-
path: one.path,
|
|
59
|
-
width: one.width,
|
|
60
|
-
height: one.height,
|
|
61
|
-
scale: one.scale,
|
|
62
|
-
...one.truncated ? { truncated: true } : {},
|
|
63
|
-
...one.unsettled ? { unsettled: true } : {},
|
|
64
|
-
...one.note ? { note: one.note } : {}
|
|
65
|
-
} : {
|
|
66
|
-
frame: frames[0],
|
|
67
|
-
ok: false,
|
|
68
|
-
error: one.error ?? "shot failed"
|
|
69
|
-
}] : data.results ?? [];
|
|
70
|
-
if (opts.json) {
|
|
71
|
-
console.log(JSON.stringify({ results }, null, 2));
|
|
72
|
-
if (results.some((r) => !r.ok)) process.exitCode = 1;
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
let failed = false;
|
|
76
|
-
for (const r of results) if (r.ok) {
|
|
77
|
-
console.log(r.path);
|
|
78
|
-
if (r.note) console.error(`${r.frame}: ${r.note}`);
|
|
79
|
-
} else {
|
|
80
|
-
failed = true;
|
|
81
|
-
console.error(`${r.frame}: ${r.error}`);
|
|
82
|
-
}
|
|
83
|
-
if (failed) process.exitCode = 1;
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
export { shotCommand };
|