@marver-design/marver 0.23.1 → 0.24.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.
Files changed (30) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +2 -0
  3. package/dist/{bake-DQtnDB8-.mjs → bake-ZhXq-X9f.mjs} +1 -1
  4. package/dist/{build-_ndp_dXn.mjs → build-ckcinlWH.mjs} +4 -4
  5. package/dist/cli.mjs +7 -7
  6. package/dist/{comments-BlqyZh3D.mjs → comments-Dx1hCVOT.mjs} +1 -1
  7. package/dist/{context-CdkNiKdJ.mjs → context-BncTXjLB.mjs} +1 -1
  8. package/dist/{daemon-BvMPdQ3k.mjs → daemon-CQv73-jM.mjs} +1 -1
  9. package/dist/{dev-Cf-4eqaC.mjs → dev-gv4NS6Fk.mjs} +5 -5
  10. package/dist/{init-hfZV7TwY.mjs → init--3Moc4J7.mjs} +1 -1
  11. package/dist/{link-BodAbIQz.mjs → link-vXjxMHTG.mjs} +1 -1
  12. package/dist/{manifest-TpfDWldB.mjs → manifest-cyG3kbhk.mjs} +1 -1
  13. package/dist/{plugin-DoXql0ZZ.mjs → plugin-Sa08E7wO.mjs} +182 -12
  14. package/dist/{poster-XBmUvQiL.mjs → poster-B2QPvKOq.mjs} +1 -1
  15. package/dist/{publish-bakes-KKTHWqq3.mjs → publish-bakes-BJR3huhu.mjs} +2 -2
  16. package/dist/{shot-DOD8v6fJ.mjs → shot-Cw96h5Kk.mjs} +2 -2
  17. package/dist/{work-ClFFq0Qh.mjs → work-CBUfsOOT.mjs} +1 -1
  18. package/docs/boards-and-folders.md +25 -0
  19. package/docs/live-jam.md +4 -1
  20. package/package.json +1 -1
  21. package/src/client/shell/App.tsx +35 -11
  22. package/src/client/shell/BoardList.tsx +22 -7
  23. package/src/client/shell/Play.tsx +2 -0
  24. package/src/client/shell/canvas/Canvas.tsx +2 -0
  25. package/src/client/shell/canvas/FrameNode.tsx +6 -1
  26. package/src/client/shell/comments-store.ts +2 -0
  27. package/src/client/shell/marks-ui.tsx +119 -0
  28. package/src/client/shell/store.ts +91 -1
  29. package/src/client/shell/styles.css +22 -0
  30. package/src/shared/marks.ts +65 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,29 @@
2
2
 
3
3
  Notable changes to `@marver-design/marver`. Format follows [Keep a Changelog](https://keepachangelog.com); versions follow semver.
4
4
 
5
+ ## 0.24.0 - 2026-10-14
6
+
7
+ ### Added
8
+
9
+ - **The sidebar shows where to look.** A frame that changed since you looked turns blue - icon,
10
+ title and a dot - in the sidebar and on its title above the card; one where Marver asked you
11
+ something turns orange, with a bubble holding how many questions are open, hollow once you have
12
+ answered, gone when the thread is resolved. Every row keeps the one item at its right edge it has
13
+ today, and what matters most takes it, so nothing shifts or truncates further: a board you are not
14
+ on turns blue or wears the bubble in place of its status, a closed folder or folded scene turns its
15
+ count blue or shows the bubble. Selecting a frame, opening it from the sidebar, a link, focus or
16
+ play, two seconds on screen at a readable zoom, or **Mark all as seen** on a scene, board or folder clears
17
+ it. `u` goes to the next frame that needs you, then the next new one. A change is the frame's
18
+ file or sticky note changing, a `git pull`, or an agent's `npx marver work done`; the day you
19
+ upgrade, everything already there counts as seen. Marks are kept in `design/.local/seen.json` on
20
+ your machine ([What is new, what needs you](docs/boards-and-folders.md#what-is-new-what-needs-you)).
21
+
22
+ ### Changed
23
+
24
+ - **One notice per round.** Marver's replies on a board fold into one notice that counts them
25
+ ("directions · 4 replies") instead of a stack of eight, and View walks through them one by one; a
26
+ new note, or a reply that asks a question, still raises its own.
27
+
5
28
  ## 0.23.1 - 2026-10-14
6
29
 
7
30
  ### Fixed
package/README.md CHANGED
@@ -130,6 +130,8 @@ The same glow, driven from the terminal. When your agent takes a request, it cre
130
130
 
131
131
  **Selection** - click selects · shift+click (canvas or sidebar) builds a multi-selection · `⌘A` selects every frame on the board · `⇧P` copies the selected frames' paths (board, frame, and file) · `i` copies the selected frame to the clipboard as a 2x PNG (`⇧i` for 4x; also the images-square button in the floating toolbar - dev canvases only, the renderer is the dev server's headless Chrome) · double-click enters interact mode (`esc` or click outside leaves) · drag the title bar to move, edges to resize (widths snap to devices).
132
132
 
133
+ **Where to look** - `u` goes to the next frame that needs you (an orange question bubble), then the next new one (blue) - see [what is new, what needs you](docs/boards-and-folders.md#what-is-new-what-needs-you).
134
+
133
135
  **Modes** - `c` comment mode · `l` laser mode · `⇧C` hide/show comment pins · `⇧L` laser comment (spotlight a thread's element) · `p` play (present, or slides on a slides board) · `h` hide all chrome.
134
136
 
135
137
  **In play** - `←` `→` step (Space and click advance a deck) · `[` `]` cycle variants · `d` cycles the theme · digits pick a device, the digit after your last one fills the window · `esc` exits, unless the board is locked to that view.
@@ -1,4 +1,4 @@
1
- import { AREA, SURFACE, pool, shotConcurrency, withBrowser } from "./shot-DOD8v6fJ.mjs";
1
+ import { AREA, SURFACE, pool, shotConcurrency, withBrowser } from "./shot-Cw96h5Kk.mjs";
2
2
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, utimesSync, writeFileSync } from "node:fs";
3
3
  import { join, sep } from "node:path";
4
4
  import { createHash } from "node:crypto";
@@ -1,9 +1,9 @@
1
1
  import { a as ROUTE, r as NAME } from "./cli.mjs";
2
2
  import { h as flatten, i as checkBoardsDir, k as PROPOSED_PUBLISH, m as buildTree, r as boardFields, s as listBoardFiles, u as readRegistry, y as isBoardName } from "./boards-BRLnoTC3.mjs";
3
3
  import { c as publishableStatus, o as PUBLISHABLE } from "./board-status-BZSzc9Hp.mjs";
4
- import { o as scanFrames } from "./manifest-TpfDWldB.mjs";
4
+ import { s as scanFrames } from "./manifest-cyG3kbhk.mjs";
5
5
  import { n as loadConfig, r as detectHost } from "./config-BUKprFAp.mjs";
6
- import { a as autoWidthOf, c as readSizes, n as tailwind3Css, o as keptSizes, r as tailwind4Plugin, s as measuringFrames, t as marverPlugin } from "./plugin-DoXql0ZZ.mjs";
6
+ import { a as autoWidthOf, c as readSizes, n as tailwind3Css, o as keptSizes, r as tailwind4Plugin, s as measuringFrames, t as marverPlugin } from "./plugin-Sa08E7wO.mjs";
7
7
  import { cpSync, existsSync, mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
8
8
  import { basename, dirname, join, sep } from "node:path";
9
9
  import { fileURLToPath } from "node:url";
@@ -762,7 +762,7 @@ async function buildSite(root, boardsFlag, allBoardsFlag, embedSeeds, textures =
762
762
  const realAssets = existsSync(assetsDir) ? realpathSync(assetsDir) : null;
763
763
  for (const r of refs) {
764
764
  if (!isLocalAssetRef(r) || !r.endsWith(".poster.png") || existsSync(join(assetsDir, r))) continue;
765
- const { ensurePoster } = await import("./poster-XBmUvQiL.mjs");
765
+ const { ensurePoster } = await import("./poster-B2QPvKOq.mjs");
766
766
  const g = await ensurePoster(assetsDir, r.slice(0, -11));
767
767
  if (!g.ok) throw new Error(`design/assets/${r}: ${g.error}`);
768
768
  console.log(` poster: rendered design/assets/${r} (${g.width}×${g.height})`);
@@ -829,7 +829,7 @@ async function buildSite(root, boardsFlag, allBoardsFlag, embedSeeds, textures =
829
829
  }));
830
830
  let textureLine = " textures: skipped (--no-textures)";
831
831
  if (textures && bakeGen) {
832
- const { bakePublished } = await import("./publish-bakes-KKTHWqq3.mjs");
832
+ const { bakePublished } = await import("./publish-bakes-BJR3huhu.mjs");
833
833
  const pubFrameFile = new Map(pubFrames.map((f) => [f.id, f]));
834
834
  const r = await bakePublished({
835
835
  root,
package/dist/cli.mjs CHANGED
@@ -82,7 +82,7 @@ cli.command("init", "Scaffold design/ in this repo").option("--mode <mode>", "st
82
82
  console.error(`[${NAME}] --kind ${opts.kind}: use product or knowledge`);
83
83
  process.exit(1);
84
84
  }
85
- const { init } = await import("./init-hfZV7TwY.mjs");
85
+ const { init } = await import("./init--3Moc4J7.mjs");
86
86
  init(resolve$1(opts.root), {
87
87
  mode: opts.mode === "embedded" ? "embedded" : "studio",
88
88
  demo: opts.demo !== false,
@@ -90,7 +90,7 @@ cli.command("init", "Scaffold design/ in this repo").option("--mode <mode>", "st
90
90
  });
91
91
  });
92
92
  for (const [name, desc] of [["dev", "Start the local canvas (everything on: hot reload, comments, Live Jam)"], ["canvas", "Start the local canvas - same as dev"]]) cli.command(name, desc).option("--root <dir>", "Host repo root", { default: "." }).option("--port <port>", "Port (default 5199)").action(async (opts) => {
93
- const { dev } = await import("./dev-Cf-4eqaC.mjs");
93
+ const { dev } = await import("./dev-gv4NS6Fk.mjs");
94
94
  let port;
95
95
  if (opts.port !== void 0) {
96
96
  const n = Number(opts.port);
@@ -100,7 +100,7 @@ for (const [name, desc] of [["dev", "Start the local canvas (everything on: hot
100
100
  await dev(resolve$1(opts.root), port);
101
101
  });
102
102
  cli.command("build", "Static export → design/.dist (what ships comes from design/publish.json - publishing is default-closed)").option("--boards <names>", "Publish only these boards (comma-separated); overrides the publish policy").option("--all-boards", "Publish every board - the loud override for the default-closed policy").option("--embed-seeds", "Copy comment history INTO the web root (identifying - every event carries its author's email)").option("--no-textures", "Skip compiling the glass textures the published frames rest under (needs Chrome; a CI without one skips on its own)").option("--root <dir>", "Host repo root", { default: "." }).action(async (opts) => {
103
- const { buildSite } = await import("./build-_ndp_dXn.mjs");
103
+ const { buildSite } = await import("./build-ckcinlWH.mjs");
104
104
  try {
105
105
  const boards = opts.boards === void 0 ? void 0 : typeof opts.boards === "string" ? opts.boards : "";
106
106
  await buildSite(resolve$1(opts.root), boards, opts.allBoards === true, opts.embedSeeds === true, opts.textures !== false && !process.env.MARVER_NO_TEXTURES);
@@ -119,7 +119,7 @@ cli.command("serve", "Serve design/.dist (set MARVER_PASSWORD to gate it)").opti
119
119
  serve(resolve$1(opts.root), port);
120
120
  });
121
121
  cli.command("comments <action> [value]", "Comment collaboration: connect <url> · sync · list · new <scene/frame> · reply <thread> · resolve <thread> · invite <email> · revoke <email>").option("--root <dir>", "Host repo root", { default: "." }).option("--token <token>", "connect: the canvas's MARVER_CLI_TOKEN (default $MARVER_CLI_TOKEN) - the identity-mode path").option("--invite <token>", "connect: claim this invite instead of signing in").option("--canvas-password <password>", "connect: the canvas gate password (default $MARVER_PASSWORD or prompt)").option("--email <email>", "connect: account email (skips the prompt)").option("--password <password>", "connect: account password (skips the prompt - mind your shell history)").option("--name <name>", "connect --invite: display name for the new account").option("--open", "list: only unresolved threads").option("--json", "list: machine-readable output").option("--board <board>", "list: scope to one board · new: the board to pin on (default: the one its link opens)").option("--body <text>", "new / reply: the text").option("--on <text>", "new: pin on the element showing this text (default: the frame, top right)").option("--addressed-in <frame>", "resolve: the variant frame that answered the feedback").action(async (action, value, opts) => {
122
- const { commentsCommand } = await import("./comments-BlqyZh3D.mjs");
122
+ const { commentsCommand } = await import("./comments-Dx1hCVOT.mjs");
123
123
  try {
124
124
  await commentsCommand(resolve$1(opts.root), action, value, opts);
125
125
  } catch (err) {
@@ -137,7 +137,7 @@ cli.command("share <action> [value]", "Sharing roster (owner): add <who> · remo
137
137
  }
138
138
  });
139
139
  cli.command("work <action> [...frames]", "Working state on the canvas: start <scene/frame ...> · done <scene/frame ...> | --all · list").option("--root <dir>", "Host repo root", { default: "." }).option("--ttl <minutes>", "start: minutes before the glow self-expires (default 10, max 30)").option("--all", "done: clear every working frame").action(async (action, frames, opts) => {
140
- const { workCommand } = await import("./work-ClFFq0Qh.mjs");
140
+ const { workCommand } = await import("./work-CBUfsOOT.mjs");
141
141
  try {
142
142
  await workCommand(resolve$1(opts.root), action, frames ?? [], opts);
143
143
  } catch (err) {
@@ -146,7 +146,7 @@ cli.command("work <action> [...frames]", "Working state on the canvas: start <sc
146
146
  }
147
147
  });
148
148
  cli.command("link [...targets]", "The canvas link that lands on frames: link <scene/frame | scene ...> - their board, in canvas mode, selected and fitted").option("--root <dir>", "Host repo root", { default: "." }).option("--board <board>", "The board to open (default: the first board that shows them all, else all-scenes)").action(async (targets, opts) => {
149
- const { linkCommand } = await import("./link-BodAbIQz.mjs");
149
+ const { linkCommand } = await import("./link-vXjxMHTG.mjs");
150
150
  try {
151
151
  await linkCommand(resolve$1(opts.root), targets ?? [], opts);
152
152
  } catch (err) {
@@ -183,7 +183,7 @@ cli.command("folders <action> [...modules]", "The shared sidebar's typed folders
183
183
  }
184
184
  });
185
185
  cli.command("context <action>", "The project's context/ (spec 19) · init: create it · check: keep it true (exit 0 pass, 1 fail, 2 cannot determine) · index: regenerate the index's capability table").option("--root <dir>", "Host repo root", { default: "." }).option("--base <ref>", "check: the pull request's base - a change to a contracted capability's code must change its contract or say why (in ci, read from the event)").option("--head <ref>", "check: the pull request's head (default HEAD)").option("--body-file <file>", "check: the pull request's body, for `no-contract-change: <capability> - <why>`").option("--json", "check: the findings as JSON ({ exit, failures, unsure, notes })").option("--kind <kind>", "init: product (a shipped record) or knowledge (a delivered record)", { default: "product" }).action(async (action, opts) => {
186
- const ctx = await import("./context-CdkNiKdJ.mjs");
186
+ const ctx = await import("./context-BncTXjLB.mjs");
187
187
  const root = resolve$1(opts.root);
188
188
  try {
189
189
  if (action === "init") {
@@ -124,7 +124,7 @@ async function commentsCommand(root, action, value, opts) {
124
124
  }
125
125
  case "new": {
126
126
  if (!value || !opts.body) throw new Error("usage: comments new <scene/frame> --body \"...\" [--on \"<text on screen>\"] [--board <board>]");
127
- const { resolveLink, devOrigin } = await import("./link-BodAbIQz.mjs");
127
+ const { resolveLink, devOrigin } = await import("./link-vXjxMHTG.mjs");
128
128
  const r = resolveLink(root, [value], opts.board);
129
129
  if (r.exact.length !== 1) throw new Error(`"${value}" is a folder of frames - pin a note on one frame: comments new <scene/frame>`);
130
130
  const frame = r.exact[0];
@@ -3,7 +3,7 @@ import { N as readStatusWord, a as checkRealDirs } from "./boards-BRLnoTC3.mjs";
3
3
  import { C as parseMap, E as wordCount, S as looseTables, T as tables, _ as globRe, b as levelsIn, d as EVIDENCE_COLUMN, f as GENERATED, g as frontMatter, h as capabilityTable, l as CITATION, m as availableLevels, p as LEVEL, u as CITED_FILE, v as hasGlob, w as proseLines, x as lf, y as isRecordTable } from "./board-status-BZSzc9Hp.mjs";
4
4
  import { pkgDir } from "./managed-HwHVNI3h.mjs";
5
5
  import { t as writeManaged } from "./managed-write-Bo-oPc-i.mjs";
6
- import { o as scanFrames } from "./manifest-TpfDWldB.mjs";
6
+ import { s as scanFrames } from "./manifest-cyG3kbhk.mjs";
7
7
  import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, statSync, writeFileSync } from "node:fs";
8
8
  import { basename, dirname, join, normalize, relative, sep } from "node:path";
9
9
  import { execFileSync } from "node:child_process";
@@ -1,7 +1,7 @@
1
1
  import { n as replay } from "./events-B3LBn74P.mjs";
2
2
  import { i as readLog, r as listBoards, t as appendEvents } from "./comments-DZyobpxG.mjs";
3
3
  import { n as localProfile } from "./profile-CrZohD6g.mjs";
4
- import { c as toFrameId } from "./manifest-TpfDWldB.mjs";
4
+ import { l as toFrameId } from "./manifest-cyG3kbhk.mjs";
5
5
  import { a as workActivity } from "./work-ayuL_9Kk.mjs";
6
6
  import { has, t as deviceId } from "./ledger-BNXW14Xw.mjs";
7
7
  import { closeSync, existsSync, fsyncSync, mkdirSync, openSync, readFileSync, readdirSync, renameSync, rmSync, statSync, unlinkSync, watch, writeFileSync, writeSync } from "node:fs";
@@ -1,6 +1,6 @@
1
1
  import { i as PKG, r as NAME } from "./cli.mjs";
2
2
  import { n as loadConfig, r as detectHost } from "./config-BUKprFAp.mjs";
3
- import { n as tailwind3Css, r as tailwind4Plugin, t as marverPlugin } from "./plugin-DoXql0ZZ.mjs";
3
+ import { n as tailwind3Css, r as tailwind4Plugin, t as marverPlugin } from "./plugin-Sa08E7wO.mjs";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, statSync, watch } from "node:fs";
5
5
  import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
6
6
  import { fileURLToPath } from "node:url";
@@ -454,12 +454,12 @@ async function dev(root, portFlag) {
454
454
  console.log(`\n ${NAME} · ${projectName} → http://localhost:${port}/\n`);
455
455
  setTimeout(async () => {
456
456
  try {
457
- await (await import("./shot-DOD8v6fJ.mjs")).sweepGhosts((m) => console.log(` ${m}`));
457
+ await (await import("./shot-Cw96h5Kk.mjs")).sweepGhosts((m) => console.log(` ${m}`));
458
458
  } catch {}
459
459
  }, 0);
460
460
  try {
461
461
  const { staleManagedInstructions } = await import("./managed-HwHVNI3h.mjs");
462
- const { installedVersion } = await import("./plugin-DoXql0ZZ.mjs").then((n) => n.i);
462
+ const { installedVersion } = await import("./plugin-Sa08E7wO.mjs").then((n) => n.i);
463
463
  const stale = staleManagedInstructions(root);
464
464
  if (stale.length) {
465
465
  const shown = stale.slice(0, 4).join(", ") + (stale.length > 4 ? `, +${stale.length - 4} more` : "");
@@ -469,7 +469,7 @@ async function dev(root, portFlag) {
469
469
  } catch {}
470
470
  try {
471
471
  if (!existsSync(join(root, "context"))) {
472
- const n = (await import("./manifest-TpfDWldB.mjs").then((n) => n.i)).statusBoards(root).length;
472
+ const n = (await import("./manifest-cyG3kbhk.mjs").then((n) => n.i)).statusBoards(root).length;
473
473
  if (n) console.log(` ${n} feature/project board${n === 1 ? "" : "s"}, no context/ - every status reads Backlog. To start it, tell your agent: "Set up our context."\n`);
474
474
  }
475
475
  } catch {}
@@ -543,7 +543,7 @@ async function dev(root, portFlag) {
543
543
  } catch {}
544
544
  }
545
545
  if (config.jam) {
546
- const { startJam } = await import("./daemon-BvMPdQ3k.mjs");
546
+ const { startJam } = await import("./daemon-CQv73-jM.mjs");
547
547
  const jam = startJam(root, config.jam, (m) => console.log(m), (board) => server.ws.send("sh:jam-comment", { board }));
548
548
  if (jam) {
549
549
  const close = server.close.bind(server);
@@ -3,7 +3,7 @@ import { E as FOLDER_MODULES, O as KIND_FOLDERS, n as addFolders } from "./board
3
3
  import { r as detectAgent } from "./agent-BsieQGTD.mjs";
4
4
  import { MANAGED_PREFIX, enumerateInstructionTemplates, hashBody, pkgDir } from "./managed-HwHVNI3h.mjs";
5
5
  import { t as writeManaged } from "./managed-write-Bo-oPc-i.mjs";
6
- import { l as writeManifest, o as scanFrames } from "./manifest-TpfDWldB.mjs";
6
+ import { s as scanFrames, u as writeManifest } from "./manifest-cyG3kbhk.mjs";
7
7
  import { i as readJson, r as detectHost, t as DEFAULTS } from "./config-BUKprFAp.mjs";
8
8
  import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
9
9
  import { basename, dirname, join, relative } from "node:path";
@@ -1,6 +1,6 @@
1
1
  import { r as NAME } from "./cli.mjs";
2
2
  import { F as resolveType, _ as folderMap, h as flatten, i as checkBoardsDir, m as buildTree, r as boardFields, s as listBoardFiles, u as readRegistry, y as isBoardName } from "./boards-BRLnoTC3.mjs";
3
- import { o as scanFrames } from "./manifest-TpfDWldB.mjs";
3
+ import { s as scanFrames } from "./manifest-cyG3kbhk.mjs";
4
4
  import { i as readDevInfo } from "./work-ayuL_9Kk.mjs";
5
5
  import { join } from "node:path";
6
6
  //#region src/cli/link.ts
@@ -525,4 +525,4 @@ function writeManifest(root, manifest) {
525
525
  return true;
526
526
  }
527
527
  //#endregion
528
- export { rendersDoc as a, toFrameId as c, manifest_exports as i, writeManifest as l, isNoteFile as n, scanFrames as o, layoutDocSource as r, setSceneTitle as s, affectedFrameIds as t };
528
+ export { noteFileFor as a, setSceneTitle as c, manifest_exports as i, toFrameId as l, isNoteFile as n, rendersDoc as o, layoutDocSource as r, scanFrames as s, affectedFrameIds as t, writeManifest as u };
@@ -1,12 +1,12 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.mjs";
2
2
  import { a as ROUTE, i as PKG, r as NAME } from "./cli.mjs";
3
- import { C as wireKids, D as HAS_STATUS, F as resolveType, I as settableStatuses, L as hash, M as readReason, N as readStatusWord, P as readType, S as validateWire, _ as folderMap, b as readDescription, c as nodeExists, d as withRegistryLock, f as BOARD_NAME, i as checkBoardsDir, j as readCapability, l as parseBoard, m as buildTree, o as isRegularFile, p as FOLDERS_FILE, r as boardFields, s as listBoardFiles, t as AUTHOR_FIELDS, u as readRegistry, x as readTitle } from "./boards-BRLnoTC3.mjs";
3
+ import { C as wireKids, D as HAS_STATUS, F as resolveType, I as settableStatuses, L as hash, M as readReason, N as readStatusWord, P as readType, S as validateWire, _ as folderMap, a as checkRealDirs, b as readDescription, c as nodeExists, d as withRegistryLock, f as BOARD_NAME, i as checkBoardsDir, j as readCapability, l as parseBoard, m as buildTree, o as isRegularFile, p as FOLDERS_FILE, r as boardFields, s as listBoardFiles, t as AUTHOR_FIELDS, u as readRegistry, x as readTitle } from "./boards-BRLnoTC3.mjs";
4
4
  import { i as readContextFacts, n as planNames, r as planWithStage, t as annotateBoards } from "./board-status-BZSzc9Hp.mjs";
5
5
  import { n as localProfile, t as isConnected } from "./profile-CrZohD6g.mjs";
6
- import { a as rendersDoc, l as writeManifest, n as isNoteFile, o as scanFrames, r as layoutDocSource, s as setSceneTitle, t as affectedFrameIds } from "./manifest-TpfDWldB.mjs";
6
+ import { a as noteFileFor, c as setSceneTitle, n as isNoteFile, o as rendersDoc, r as layoutDocSource, s as scanFrames, t as affectedFrameIds, u as writeManifest } from "./manifest-cyG3kbhk.mjs";
7
7
  import { n as loadConfig } from "./config-BUKprFAp.mjs";
8
8
  import { r as boardsChanged } from "./work-ayuL_9Kk.mjs";
9
- import { closeSync, copyFileSync, existsSync, linkSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, watch, writeFileSync } from "node:fs";
9
+ import { closeSync, copyFileSync, existsSync, linkSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
10
10
  import { basename, dirname, join, resolve, sep } from "node:path";
11
11
  import { fileURLToPath } from "node:url";
12
12
  import { randomBytes } from "node:crypto";
@@ -15,6 +15,127 @@ import { randomBytes } from "node:crypto";
15
15
  * only an app frame does (#4). Empty counts as not content-only: the warning still helps there. */
16
16
  const contentOnly = (frames) => frames.length > 0 && frames.every((f) => !!f.intent);
17
17
  //#endregion
18
+ //#region src/server/marks.ts
19
+ /**
20
+ * Sidebar marks, the dev server's half (spec 25): when each frame last changed, and which change
21
+ * you have seen. Local only - `design/.local/` is never committed and never published.
22
+ *
23
+ * Changed = the latest of the frame file's mtime, its sticky note's, and `changes.json` - an agent
24
+ * naming the frame in `work done` (an edit to a shared kit it imports), or the frame first appearing
25
+ * under a new id (a rename keeps the file's old mtime). A git pull moves mtimes too.
26
+ * Seen = `seen.json`: { version, baseline, ids, frames: { id: the change stamp you saw } }. Its first
27
+ * read sets the baseline to now, so everything already on the canvas that day counts as seen.
28
+ * A "seen" is the stamp the page displayed, never a clock: an edit landing after you looked is new.
29
+ */
30
+ var marks_exports = /* @__PURE__ */ __exportAll({
31
+ markSeen: () => markSeen,
32
+ readMarks: () => readMarks,
33
+ readSeen: () => readSeen,
34
+ recordChanged: () => recordChanged
35
+ });
36
+ const dir = (root) => join(root, "design", ".local");
37
+ const read = (file) => {
38
+ try {
39
+ return JSON.parse(readFileSync(file, "utf8"));
40
+ } catch {
41
+ return null;
42
+ }
43
+ };
44
+ /** Writes stay inside the project: a symlinked design/ or .local is refused (as boards.ts refuses). */
45
+ const write = (root, name, data) => {
46
+ if (checkRealDirs(root, [[join(root, "design"), "design"], [dir(root), "design/.local"]])) return;
47
+ mkdirSync(dir(root), { recursive: true });
48
+ const file = join(dir(root), name), tmp = `${file}.${randomBytes(6).toString("hex")}.tmp`;
49
+ writeFileSync(tmp, JSON.stringify(data) + "\n");
50
+ renameSync(tmp, file);
51
+ };
52
+ const stamps = (o) => o && typeof o === "object" ? Object.fromEntries(Object.entries(o).filter(([, v]) => typeof v === "number" && Number.isFinite(v))) : {};
53
+ function readSeen(root) {
54
+ const f = read(join(dir(root), "seen.json"));
55
+ const strs = (v) => Array.isArray(v) ? v.filter((i) => typeof i === "string") : null;
56
+ if (f && typeof f.baseline === "number") return {
57
+ version: 1,
58
+ baseline: f.baseline,
59
+ ids: strs(f.ids),
60
+ notes: strs(f.notes) ?? [],
61
+ frames: stamps(f.frames)
62
+ };
63
+ const fresh = {
64
+ version: 1,
65
+ baseline: Date.now(),
66
+ ids: null,
67
+ frames: {}
68
+ };
69
+ write(root, "seen.json", fresh);
70
+ return fresh;
71
+ }
72
+ /** You saw these frames at these change stamps. Never lowers a stamp; drops ids the canvas no longer has. */
73
+ function markSeen(root, seen, known) {
74
+ const s = readSeen(root);
75
+ for (const [id, at] of Object.entries(stamps(seen))) if (known.has(id)) s.frames[id] = Math.max(s.frames[id] ?? 0, at);
76
+ for (const id of Object.keys(s.frames)) if (!known.has(id)) delete s.frames[id];
77
+ write(root, "seen.json", s);
78
+ }
79
+ const readChanges = (root) => stamps(read(join(dir(root), "changes.json"))?.frames);
80
+ /** These frames changed now, whatever their files say (`work done`, or a frame new under its id). */
81
+ function recordChanged(root, ids, known) {
82
+ const c = readChanges(root), now = Date.now();
83
+ for (const id of ids) c[id] = now;
84
+ if (known) {
85
+ for (const id of Object.keys(c)) if (!known.has(id)) delete c[id];
86
+ }
87
+ write(root, "changes.json", {
88
+ version: 1,
89
+ frames: c
90
+ });
91
+ }
92
+ const mtime = (abs) => {
93
+ try {
94
+ return statSync(abs).mtimeMs;
95
+ } catch {
96
+ return 0;
97
+ }
98
+ };
99
+ function readMarks(root, manifest) {
100
+ const all = manifest.frames.map((f) => f.id);
101
+ const known = new Set(all);
102
+ const seen = readSeen(root);
103
+ const noteAt = {};
104
+ for (const f of manifest.frames) noteAt[f.id] = mtime(noteFileFor(join(root, f.file)));
105
+ const notes = all.filter((id) => noteAt[id] > 0);
106
+ const had = seen.ids ? new Set(seen.ids) : null;
107
+ const added = had ? all.filter((id) => !had.has(id)) : [];
108
+ const noteGone = had ? (seen.notes ?? []).filter((id) => known.has(id) && !noteAt[id]) : [];
109
+ const removed = had ? [...had].some((id) => !known.has(id)) : false;
110
+ if (added.length || noteGone.length || removed) recordChanged(root, [...added, ...noteGone], known);
111
+ if (!had || had.size !== all.length || added.length || noteGone.length || notes.length !== (seen.notes ?? []).length) {
112
+ const frames = Object.fromEntries(Object.entries(seen.frames).filter(([id]) => known.has(id)));
113
+ write(root, "seen.json", {
114
+ ...seen,
115
+ ids: all,
116
+ notes,
117
+ frames
118
+ });
119
+ seen.frames = frames;
120
+ }
121
+ const done = readChanges(root);
122
+ const changed = {};
123
+ for (const f of manifest.frames) changed[f.id] = Math.max(mtime(join(root, f.file)), noteAt[f.id], done[f.id] ?? 0);
124
+ const boards = { "all-scenes": all };
125
+ const boardsDir = join(root, "design", "boards");
126
+ if (existsSync(boardsDir) && !checkBoardsDir(root, boardsDir)) for (const b of listBoardFiles(boardsDir).boards) {
127
+ const j = b.json;
128
+ if (!j || b.name === "all-scenes") continue;
129
+ boards[b.name] = j.auto === true ? all : Array.isArray(j.nodes) ? j.nodes.map((n) => n?.frame).filter((f) => typeof f === "string" && known.has(f)) : [];
130
+ }
131
+ return {
132
+ changed,
133
+ seen: seen.frames,
134
+ baseline: seen.baseline,
135
+ boards
136
+ };
137
+ }
138
+ //#endregion
18
139
  //#region src/server/sizes.ts
19
140
  /**
20
141
  * Content-frame heights - `design/boards/_sizes.json`, committed.
@@ -841,7 +962,7 @@ function apiMiddleware(root, opts = {}) {
841
962
  };
842
963
  const asPng = url.searchParams.get("format") === "png";
843
964
  const origin = opts.origin?.() ?? `http://${req.headers.host ?? "localhost"}`;
844
- const { shootFrame } = await import("./shot-DOD8v6fJ.mjs");
965
+ const { shootFrame } = await import("./shot-Cw96h5Kk.mjs");
845
966
  const r = await shootFrame({
846
967
  root,
847
968
  viewports: opts.viewports ?? {},
@@ -891,7 +1012,7 @@ function apiMiddleware(root, opts = {}) {
891
1012
  if (typeof theme !== "string" || !/^[a-z0-9-]+$/i.test(theme)) return json(res, 400, { error: "invalid theme" });
892
1013
  const scale = body.scale === void 0 ? void 0 : body.scale;
893
1014
  if (scale !== void 0 && !(Number.isInteger(scale) && scale >= 1 && scale <= 4)) return json(res, 400, { error: "invalid scale" });
894
- const { resolveFrames, shootBatch } = await import("./shot-DOD8v6fJ.mjs");
1015
+ const { resolveFrames, shootBatch } = await import("./shot-Cw96h5Kk.mjs");
895
1016
  const sel = resolveFrames(root, body);
896
1017
  if (!sel.ok) return json(res, sel.status, { error: sel.error });
897
1018
  const origin = opts.origin?.() ?? `http://${req.headers.host ?? "localhost"}`;
@@ -919,7 +1040,7 @@ function apiMiddleware(root, opts = {}) {
919
1040
  return json(res, 400, { error: "malformed JSON" });
920
1041
  }
921
1042
  if (!body || typeof body !== "object" || !Array.isArray(body.asks) || !body.asks.length || body.asks.length > 200) return json(res, 400, { error: "asks must list 1-200 frames" });
922
- const { bakeBatch, ASK_MAX } = await import("./bake-DQtnDB8-.mjs");
1043
+ const { bakeBatch, ASK_MAX } = await import("./bake-ZhXq-X9f.mjs");
923
1044
  let manifest = {};
924
1045
  try {
925
1046
  manifest = JSON.parse(readFileSync(join(root, "design", "manifest.json"), "utf8"));
@@ -963,8 +1084,8 @@ function apiMiddleware(root, opts = {}) {
963
1084
  if (path === "poster" && req.method === "GET") {
964
1085
  if (!ownerGated(req)) return json(res, 403, { error: "forbidden" });
965
1086
  const src = url.searchParams.get("src") ?? "";
966
- const { ensurePoster, isLocalClip } = await import("./poster-XBmUvQiL.mjs");
967
- const { isLocalAssetRef } = await import("./build-_ndp_dXn.mjs");
1087
+ const { ensurePoster, isLocalClip } = await import("./poster-B2QPvKOq.mjs");
1088
+ const { isLocalAssetRef } = await import("./build-ckcinlWH.mjs");
968
1089
  if (!isLocalAssetRef(src) || !isLocalClip(src)) return json(res, 400, { error: "src must be a clip under design/assets/" });
969
1090
  const r = await ensurePoster(join(root, "design", "assets"), src);
970
1091
  if (!r.ok) return json(res, r.error.includes("does not exist") ? 404 : 503, { error: r.error });
@@ -1005,6 +1126,32 @@ function apiMiddleware(root, opts = {}) {
1005
1126
  atomicWrite(join(dir, "profile.json"), JSON.stringify(prof, null, 2) + "\n");
1006
1127
  return json(res, 200, { user: localProfile(root) });
1007
1128
  }
1129
+ if (path === "marks" || path === "marks/seen") {
1130
+ if (!ownerGated(req)) return json(res, 403, { error: "forbidden" });
1131
+ const { readMarks, markSeen } = await Promise.resolve().then(() => marks_exports);
1132
+ let manifest;
1133
+ try {
1134
+ manifest = JSON.parse(readFileSync(join(root, "design", "manifest.json"), "utf8"));
1135
+ } catch {
1136
+ manifest = scanFrames(root);
1137
+ }
1138
+ if (path === "marks" && req.method === "GET") return json(res, 200, readMarks(root, manifest));
1139
+ if (path === "marks/seen" && req.method === "POST") {
1140
+ const raw = await readBody(req);
1141
+ if (raw == null) return json(res, 400, { error: "body too large" });
1142
+ let b;
1143
+ try {
1144
+ b = JSON.parse(raw);
1145
+ } catch {
1146
+ return json(res, 400, { error: "malformed JSON" });
1147
+ }
1148
+ if (!b?.frames || typeof b.frames !== "object" || Array.isArray(b.frames)) return json(res, 400, { error: "frames: { id: stamp } required" });
1149
+ markSeen(root, b.frames, new Set(manifest.frames.map((f) => f.id)));
1150
+ opts.notify?.("sh:marks");
1151
+ return json(res, 200, { ok: true });
1152
+ }
1153
+ return json(res, 405, { error: "method not allowed" });
1154
+ }
1008
1155
  if (path === "work") {
1009
1156
  const { workActivity, readDevInfo, WORK_TTL_DEFAULT, WORK_TTL_MAX } = await import("./work-ayuL_9Kk.mjs").then((n) => n.o);
1010
1157
  const tokenOk = () => {
@@ -1034,13 +1181,22 @@ function apiMiddleware(root, opts = {}) {
1034
1181
  const frames = Array.isArray(b.frames) ? b.frames.filter((f) => typeof f === "string" && f) : [];
1035
1182
  const on = b.on !== false;
1036
1183
  if (!on && b.all === true) {
1184
+ const done = workActivity.active().filter((f) => workActivity.has(f, "cli"));
1185
+ if (done.length) {
1186
+ (await Promise.resolve().then(() => marks_exports)).recordChanged(root, done);
1187
+ opts.notify?.("sh:marks");
1188
+ }
1037
1189
  workActivity.clearAll("cli");
1038
1190
  return json(res, 200, { frames: workActivity.active() });
1039
1191
  }
1040
1192
  if (!frames.length) return json(res, 400, { error: "frames required" });
1041
1193
  const ttl = Math.min(Math.max(Number(b.ttlMs) || WORK_TTL_DEFAULT, 1e4), WORK_TTL_MAX);
1042
1194
  for (const f of frames) on ? workActivity.mark(f, ttl, "cli") : workActivity.clear(f, "cli");
1043
- if (!on) return json(res, 200, { frames: workActivity.active() });
1195
+ if (!on) {
1196
+ (await Promise.resolve().then(() => marks_exports)).recordChanged(root, frames);
1197
+ opts.notify?.("sh:marks");
1198
+ return json(res, 200, { frames: workActivity.active() });
1199
+ }
1044
1200
  let behind = [];
1045
1201
  let contextPresent = false;
1046
1202
  try {
@@ -1438,7 +1594,8 @@ function marverPlugin(ctx) {
1438
1594
  server.middlewares.use(apiMiddleware(root, {
1439
1595
  viewports: config.viewports,
1440
1596
  origin: listeningOrigin,
1441
- bakeGen: () => bakeGen
1597
+ bakeGen: () => bakeGen,
1598
+ notify: (event) => server.ws.send(event, {})
1442
1599
  }));
1443
1600
  server.middlewares.use(routesMiddleware(server, clientDir));
1444
1601
  devServer = server;
@@ -1484,7 +1641,7 @@ function marverPlugin(ctx) {
1484
1641
  };
1485
1642
  const prune = () => setTimeout(async () => {
1486
1643
  try {
1487
- (await import("./bake-DQtnDB8-.mjs")).pruneBakes(root, bakeGen);
1644
+ (await import("./bake-ZhXq-X9f.mjs")).pruneBakes(root, bakeGen);
1488
1645
  } catch {}
1489
1646
  }, 500);
1490
1647
  prune();
@@ -1517,6 +1674,19 @@ function marverPlugin(ctx) {
1517
1674
  server.watcher.on("unlink", restatus);
1518
1675
  server.watcher.on("change", restatus);
1519
1676
  server.watcher.on("change", (f) => inScope(f) && (/\.(tsx|jsx)$/.test(f) || f.endsWith("_brief.md") || isNoteFile(f)) && regen());
1677
+ const marksChanged = debounce(() => server.ws.send("sh:marks", {}), 300);
1678
+ for (const ev of [
1679
+ "add",
1680
+ "change",
1681
+ "unlink"
1682
+ ]) server.watcher.on(ev, (f) => {
1683
+ if (inScope(f) && (/\.(tsx|jsx|html)$/.test(f) || isNoteFile(f))) marksChanged();
1684
+ });
1685
+ server.watcher.on("unlink", (f) => {
1686
+ if (!inScope(f) || !isNoteFile(f)) return;
1687
+ const fr = manifest.frames.find((x) => noteFileFor(join(root, x.file)) === f);
1688
+ if (fr) recordChanged(root, [fr.id]);
1689
+ });
1520
1690
  const configFile = join(root, "design", "config.ts");
1521
1691
  server.watcher.on("change", (f) => {
1522
1692
  if (f !== configFile) return;
@@ -1655,7 +1825,7 @@ function marverPlugin(ctx) {
1655
1825
  });
1656
1826
  return;
1657
1827
  }
1658
- const { shootFrame, shootBatch, resolveFrames } = await import("./shot-DOD8v6fJ.mjs");
1828
+ const { shootFrame, shootBatch, resolveFrames } = await import("./shot-Cw96h5Kk.mjs");
1659
1829
  if (ways[0] === "frame") {
1660
1830
  if (typeof spec.frame !== "string") {
1661
1831
  write({
@@ -1,4 +1,4 @@
1
- import { capture, t as findChrome } from "./shot-DOD8v6fJ.mjs";
1
+ import { capture, t as findChrome } from "./shot-Cw96h5Kk.mjs";
2
2
  import { constants, copyFileSync, existsSync, mkdtempSync, realpathSync, rmSync, writeFileSync } from "node:fs";
3
3
  import { basename, dirname, join, sep } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
@@ -1,6 +1,6 @@
1
1
  import { o as slideSize } from "./cli.mjs";
2
- import { planShot, t as findChrome } from "./shot-DOD8v6fJ.mjs";
3
- import { ASK_MAX, bakeBatch } from "./bake-DQtnDB8-.mjs";
2
+ import { planShot, t as findChrome } from "./shot-Cw96h5Kk.mjs";
3
+ import { ASK_MAX, bakeBatch } from "./bake-ZhXq-X9f.mjs";
4
4
  import { MIME } from "./serve-z5qtj_wJ.mjs";
5
5
  import { copyFileSync, lstatSync, mkdirSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync } from "node:fs";
6
6
  import { extname, isAbsolute, join, relative, resolve } from "node:path";
@@ -337,8 +337,8 @@ async function shootFrame(opts) {
337
337
  };
338
338
  const plan = planShot(frame, viewports, size);
339
339
  if (frame.kind !== "html") try {
340
- const { scanAssetRefs } = await import("./build-_ndp_dXn.mjs");
341
- const { ensurePoster } = await import("./poster-XBmUvQiL.mjs");
340
+ const { scanAssetRefs } = await import("./build-ckcinlWH.mjs");
341
+ const { ensurePoster } = await import("./poster-B2QPvKOq.mjs");
342
342
  const refs = scanAssetRefs(readFileSync(join(root, frame.file), "utf8"), frame.file);
343
343
  for (const r of refs) if (r.endsWith(".poster.png")) await ensurePoster(join(root, "design", "assets"), r.slice(0, -11));
344
344
  } catch {}
@@ -66,7 +66,7 @@ async function workCommand(root, action, frames, opts) {
66
66
  });
67
67
  console.log(active.length ? `still working: ${active.join(", ")}` : "nothing working - all clear");
68
68
  const done = before.filter((f) => !active.includes(f));
69
- const link = done.length ? await (await import("./link-BodAbIQz.mjs")).linkLine(root, done) : null;
69
+ const link = done.length ? await (await import("./link-vXjxMHTG.mjs")).linkLine(root, done) : null;
70
70
  if (link) console.log(`on the canvas: ${link}`);
71
71
  return;
72
72
  }
@@ -43,6 +43,31 @@ you can drop into the sub-folder, after it in its folder, or after the folder at
43
43
  hold the pointer decides - over the row above, its indent picks the level; over the row below, the
44
44
  seam takes that row's level.
45
45
 
46
+ ## What is new, what needs you
47
+
48
+ The sidebar shows where to look.
49
+
50
+ - **New** - a frame that changed since you looked: its icon and title turn blue, with a dot at the
51
+ right of its row. On the canvas, its title above the card does the same.
52
+ - **Needs you** - Marver asked you something on a frame (a note from your agent, or a jam reply that
53
+ asks): its icon turns orange, and an orange bubble at the right holds how many questions are open -
54
+ `1`, `2`. Answer in the thread and the bubble goes hollow while the agent works; it is gone once
55
+ the thread is resolved, and the frame turns blue if the agent changed it.
56
+ - **One slot per row.** Every row keeps the one item at its right edge it has today, and what matters
57
+ most takes it: a question's bubble first, then the row's own count or status, then a frame's dot. A
58
+ board you are not on turns blue when its frames hold something new, and a question there takes its
59
+ status glyph's place until answered. A closed folder or a folded scene changes only its count: blue
60
+ when something inside is new, the bubble when something inside needs you.
61
+ - **`U`** goes to the next frame that needs you, then the next new one.
62
+
63
+ "Changed" means the frame's file or its sticky note changed - an edit, your agent, a `git pull` - or
64
+ an agent named the frame in `npx marver work done`. "Looked at" means you selected it, opened it from
65
+ the sidebar or a link, opened it in focus or play, kept it on screen at a readable zoom (50 % or more)
66
+ for two seconds, or chose **Mark all as seen** on a scene, board or folder. An edit still waiting to
67
+ load (behind **Update** in focus or play) counts as seen only once it is on screen. Your marks live in `design/.local/seen.json`, on
68
+ this machine only; the day you upgrade, everything already on the canvas counts as seen. A published
69
+ canvas shows no marks.
70
+
46
71
  ## In the files
47
72
 
48
73
  Two files carry it, and they are the truth.
package/docs/live-jam.md CHANGED
@@ -158,7 +158,10 @@ Live Jam answers comments; the same voice works the other way. An agent you are
158
158
  a note where it needs you - `npx marver comments new <scene/frame> --body "..." [--on "<words on
159
159
  screen>"]` pins it on the frame, or on the element showing those words - and answers your threads
160
160
  with `npx marver comments reply`. Both post as Marver, with the same provenance, land on your canvas
161
- at once, and raise the bottom-right pill with a ping. Reply in a note and it is a jam job like any
161
+ at once, and raise the bottom-right pill with a ping - Marver's replies on one board fold into a
162
+ single notice ("2 replies", View walks through them), a new note or a reply that asks stands on its
163
+ own, and the frame wears the orange question
164
+ bubble in the sidebar until the thread is resolved. Reply in a note and it is a jam job like any
162
165
  reply to Marver - no tag needed; while the chat agent still has that frame lit (`marver work
163
166
  start`), the job waits for it. Notes stay on your machine for now, like jam replies; a reply to a
164
167
  collaborator's thread keeps your voice, the one that reaches them on the published canvas.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marver-design/marver",
3
- "version": "0.23.1",
3
+ "version": "0.24.0",
4
4
  "description": "The agent-native design canvas. A design/ folder, one command, a canvas of live frames built from your repo's real components - comment @marver and your own coding agent does the work. The tool ships no AI.",
5
5
  "type": "module",
6
6
  "private": false,