@marver-design/marver 0.30.1 → 0.32.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/CHANGELOG.md +70 -0
- package/README.md +12 -8
- package/dist/{anchor-check-Bv4o-R2T.mjs → anchor-check-DZtX13ly.mjs} +1 -1
- package/dist/{board-tree-BXR8dw4b.mjs → board-tree-DGj0HhEE.mjs} +6 -2
- package/dist/{boards-EH2onUXM.mjs → boards-Cim1GTKc.mjs} +32 -2
- package/dist/{boards-BeWtjGUM.mjs → boards-jHmEPLV7.mjs} +7 -7
- package/dist/{build-zWGXSzly.mjs → build-D2dHEWX-.mjs} +14 -17
- package/dist/{capture-DEtM4qm5.mjs → capture-HaS-1or8.mjs} +1 -1
- package/dist/cli.mjs +38 -20
- package/dist/{collab-BEAcXrBb.mjs → collab-D2NcrOB8.mjs} +53 -14
- package/dist/comment-actions-Bxf9Ld4g.mjs +351 -0
- package/dist/{comments-XNhMmSSu.mjs → comments-ocvsnt2j.mjs} +85 -10
- package/dist/config-B0YcFtqS.mjs +510 -0
- package/dist/{context-BUnFiyA3.mjs → context-Cj2TcC0H.mjs} +3 -3
- package/dist/{daemon-CChgWJNq.mjs → daemon-D6TrdgMi.mjs} +268 -28
- package/dist/deep-link-DYtuT740.mjs +163 -0
- package/dist/{dev-DOgIITpT.mjs → dev-DMQYbw-2.mjs} +23 -16
- package/dist/devices-uJZ2inMq.mjs +155 -0
- package/dist/{events-CLH4ijKP.mjs → events-Dieo1482.mjs} +49 -4
- package/dist/{init-CYlFaRzG.mjs → init-BgusplYn.mjs} +40 -10
- package/dist/{jam-Cj5gBvwD.mjs → jam-CkuLL8A8.mjs} +1 -1
- package/dist/{link-BFFRgrMt.mjs → link-aZq5cExV.mjs} +54 -7
- package/dist/{logo-CXY-1yrn.mjs → logo-C9s7-Cy9.mjs} +89 -66
- package/dist/{ls-NqmePKOf.mjs → ls-DGVIW-Io.mjs} +1 -1
- package/dist/{manifest-DPZ3WNg_.mjs → manifest-CK8Qh4Nq.mjs} +255 -13
- package/dist/{marks-BnNANic9.mjs → marks-C8oX8kbE.mjs} +3 -3
- package/dist/{marks-DBp3h1Mc.mjs → marks-Dt-5JXCp.mjs} +18 -5
- package/dist/{marver-id-gate-vBLb_Icb.mjs → marver-id-gate-BAeuMeaU.mjs} +11 -7
- package/dist/md-B9_13Q0R.mjs +105 -0
- package/dist/notes-CRAX4wgk.mjs +148 -0
- package/dist/own-C8Mq0Hnf.mjs +128 -0
- package/dist/pdf-Cf9GIoIM.mjs +2299 -0
- package/dist/pdf-HB0prF75.mjs +117 -0
- package/dist/{perf-6MOTHxay.mjs → perf-9ZEF5KLO.mjs} +5 -5
- package/dist/{perf-BCxAo0IS.mjs → perf-BA_NDarr.mjs} +2 -1
- package/dist/{plugin-CFWBcAba.mjs → plugin-DesQP9L5.mjs} +565 -107
- package/dist/{poster-DPPpQiva.mjs → poster-Bb6WraCA.mjs} +1 -1
- package/dist/{profile-B1FKOM1e.mjs → profile-cdmSer1k.mjs} +1 -1
- package/dist/{publish-bakes-_Zx8crP3.mjs → publish-bakes-EjMmukJB.mjs} +3 -3
- package/dist/{queue-DeSQm24g.mjs → queue-BLLfdlDw.mjs} +156 -11
- package/dist/{recover-mDUVsnPd.mjs → recover-B3dmatx4.mjs} +2 -2
- package/dist/{serve-DQv3Ti6X.mjs → serve-kcF6-H8V.mjs} +4 -4
- package/dist/{session-VDJfXEEm.mjs → session-DBF-nQvq.mjs} +29 -3
- package/dist/{share-Bu_kuOKL.mjs → share-CS2mg27O.mjs} +1 -1
- package/dist/{shot-d4h_hJi9.mjs → shot-Bjt2MQe3.mjs} +4 -4
- package/dist/{shot-DBWN8hPP.mjs → shot-BuUCG46-.mjs} +1 -1
- package/dist/show-DhmiUu01.mjs +101 -0
- package/dist/{sizes-wjXDev3b.mjs → sizes-BckcL4Zz.mjs} +1 -1
- package/dist/{slots-Dn4Onb0V.mjs → slots-BOcfIqxy.mjs} +15 -3
- package/dist/{summary-Y8MY1Wuc.mjs → summary-cPmRDGpX.mjs} +1 -1
- package/dist/{sync-CMozOwZ0.mjs → sync-BNWwh8OF.mjs} +205 -7
- package/dist/{work-DJxH7cCX.mjs → work-B4tydWnf.mjs} +38 -2
- package/dist/{work-BYWD_1Zf.mjs → work-CzIXp7n1.mjs} +3 -3
- package/docs/app.md +143 -6
- package/docs/boards-and-folders.md +41 -7
- package/docs/jam-session.md +5 -0
- package/docs/live-jam.md +9 -0
- package/docs/pdf.md +108 -0
- package/docs/publish.md +9 -9
- package/docs/sharing.md +11 -0
- package/docs/slides.md +11 -1
- package/package.json +3 -1
- package/src/client/content/index.tsx +4 -2
- package/src/client/frame-host/main.tsx +3 -0
- package/src/client/shell/App.tsx +71 -24
- package/src/client/shell/BoardList.tsx +16 -7
- package/src/client/shell/Comments.tsx +77 -16
- package/src/client/shell/Play.tsx +104 -27
- package/src/client/shell/Toolbar.tsx +4 -3
- package/src/client/shell/app-bridge.ts +40 -5
- package/src/client/shell/canvas/Canvas.tsx +30 -8
- package/src/client/shell/canvas/FrameNode.tsx +3 -1
- package/src/client/shell/canvas/ctl.ts +16 -0
- package/src/client/shell/commands.ts +20 -0
- package/src/client/shell/comments-store.ts +81 -2
- package/src/client/shell/devices.tsx +42 -0
- package/src/client/shell/goto.ts +56 -9
- package/src/client/shell/icons.tsx +11 -4
- package/src/client/shell/immersive.ts +123 -0
- package/src/client/shell/inset.ts +29 -3
- package/src/client/shell/jam-lines.ts +5 -3
- package/src/client/shell/jam-panel.tsx +17 -5
- package/src/client/shell/marks-ui.tsx +54 -0
- package/src/client/shell/notes.ts +21 -0
- package/src/client/shell/pdf-export.tsx +154 -0
- package/src/client/shell/pdf-notes.ts +20 -0
- package/src/client/shell/recorder-signals.ts +5 -2
- package/src/client/shell/show.ts +250 -0
- package/src/client/shell/store.ts +23 -38
- package/src/client/shell/styles.css +68 -6
- package/src/shared/app-api.ts +90 -4
- package/src/shared/auto-place.ts +32 -0
- package/src/shared/board-tree.ts +3 -0
- package/src/shared/board-types.ts +6 -2
- package/src/shared/deep-link.ts +212 -0
- package/src/shared/devices.ts +89 -0
- package/src/shared/events.ts +48 -5
- package/src/shared/export-plan.ts +98 -0
- package/src/shared/immersive.ts +13 -0
- package/src/shared/perf-records.ts +1 -1
- package/templates/AGENTS-embedded.md +76 -12
- package/templates/AGENTS-studio.md +76 -12
- package/templates/instructions/boards.md +6 -5
- package/templates/instructions/configure.md +32 -2
- package/templates/instructions/iterate.md +8 -0
- package/templates/instructions/jam.md +9 -0
- package/templates/instructions/publish.md +14 -4
- package/templates/instructions/review.md +4 -0
- package/templates/instructions/slides.md +67 -1
- package/templates/instructions/welcome.md +9 -5
- package/templates/playbooks/publish-canvas/PLAYBOOK.md +1 -1
- package/dist/config-BezZTiov.mjs +0 -182
|
@@ -56,7 +56,7 @@ Code means the motion is yours: CSS keyframes and transitions, SVG
|
|
|
56
56
|
animation, a JS library the project already uses. Three habits make it play
|
|
57
57
|
well:
|
|
58
58
|
|
|
59
|
-
- **At rest, the finished slide.** On the canvas, in `marver shot`, in a
|
|
59
|
+
- **At rest, the finished slide.** On the canvas, in `marver shot`, in a PDF, in a
|
|
60
60
|
thumbnail, the slide shows its final composition. Animate while the deck
|
|
61
61
|
plays: the stage puts `data-sl-play` on `<html>` for the whole show and adds
|
|
62
62
|
`data-sl-entered` once each slide has arrived. Key motion off them:
|
|
@@ -269,6 +269,9 @@ are stuck.
|
|
|
269
269
|
slide, a card around everything, a tiny uppercase kicker over every
|
|
270
270
|
headline, filler numbers, the same composition three slides running with no
|
|
271
271
|
reason. Delete before you add.
|
|
272
|
+
- **Hand it over** with what `npx marver link <deck>` prints (the deck's
|
|
273
|
+
scene), on its own line, as printed. `npx marver show <deck board>` only when
|
|
274
|
+
they ask to be shown.
|
|
272
275
|
|
|
273
276
|
## Publishing a deck
|
|
274
277
|
|
|
@@ -283,6 +286,69 @@ The board is the deck. Publish with:
|
|
|
283
286
|
standard prototype toolbar and walker), `minimal` (a progress strip +
|
|
284
287
|
comments) or `none`. Add `"lock": true` for a share that is ONLY the deck.
|
|
285
288
|
|
|
289
|
+
## A deck as a PDF
|
|
290
|
+
|
|
291
|
+
When the human asks for a PDF of a deck or of any board ("make a PDF of the
|
|
292
|
+
deck", "send me the slides", to attach or print), run `npx marver pdf <board>`
|
|
293
|
+
and give them the path it prints. It needs `marver dev` running for this
|
|
294
|
+
folder: `npx marver ls` first; none running, see "Keeping the canvas up" in
|
|
295
|
+
design/AGENTS.md. It writes `design/exports/<board>.pdf` (kept out of git);
|
|
296
|
+
`--out <file>` writes it elsewhere ("on my Desktop": `--out
|
|
297
|
+
~/Desktop/<board>.pdf`). `--json` prints the report as JSON, with the file's
|
|
298
|
+
absolute path in `file`.
|
|
299
|
+
|
|
300
|
+
- **What prints.** A board whose `design/publish.json` row says
|
|
301
|
+
`"type": "slides"` (or `"open": "slides"`) prints its deck: its `slide: true`
|
|
302
|
+
frames in reading order, one page each at the stage size. Any other board
|
|
303
|
+
prints every frame in the board file's order (Play's), each at the device
|
|
304
|
+
Play shows it at. So before you export a deck, give its board that publish
|
|
305
|
+
row (Publishing a deck, above). A board file's own `"type"` does not count:
|
|
306
|
+
without the row the pages follow the board file's order, non-slide frames
|
|
307
|
+
included.
|
|
308
|
+
- `--notes` makes a handout instead (`<board>-notes.pdf`) - what the human
|
|
309
|
+
calls "with speaker notes": each page's picture and title beside its whole
|
|
310
|
+
`.note.md` (all four parts, Say among them), "No notes" when it has none,
|
|
311
|
+
Letter landscape (`--paper a4` for A4). Its pages are the deck's, chosen the
|
|
312
|
+
same way: give the board its publish row first here too.
|
|
313
|
+
`--theme dark` prints every page in one theme; without it each slide prints
|
|
314
|
+
in its own.
|
|
315
|
+
- One PDF at a time per canvas: "a PDF of ... is being made" means wait for
|
|
316
|
+
it, then run again.
|
|
317
|
+
- The human can do the same on the canvas: Export PDF in the board's menu,
|
|
318
|
+
the export button in slides and present mode, or File > Export PDF in the
|
|
319
|
+
Mac app. A published canvas cannot export.
|
|
320
|
+
|
|
321
|
+
Read the report before you hand it over. Its first line is the file, pages,
|
|
322
|
+
size and time; each line under it names slides that need a look:
|
|
323
|
+
|
|
324
|
+
- **patched** slides are fine - glass, filters, blends, masks and big soft
|
|
325
|
+
shadows were fixed and checked against the screen;
|
|
326
|
+
- **raster** slides printed as pictures (no searchable text), with the reason:
|
|
327
|
+
say so. An effect on the page itself (`body` or `html`) or under a transform
|
|
328
|
+
is the usual cause - move it onto an inner element and export again;
|
|
329
|
+
- **unsettled**: an image or chart was still loading after 10 s - fix the
|
|
330
|
+
slide (a missing asset, a slow chart) and export again;
|
|
331
|
+
- **clipped**: the slide is taller or wider than its stage - fix the layout;
|
|
332
|
+
- **spilled**: the page ran onto a second printed page and only the first was
|
|
333
|
+
kept - check that nothing is missing;
|
|
334
|
+
- **changed while printing**: its files changed during the export (an edit
|
|
335
|
+
landed) - export again once edits stop;
|
|
336
|
+
- **printed differently from the screen (kept: --vector)**: only with
|
|
337
|
+
`--vector` - those pages print as Chrome prints them, unlike the screen. Look
|
|
338
|
+
at them in the PDF, or export again without `--vector`;
|
|
339
|
+
- **skipped**: a frame the board names but the manifest no longer lists, or a
|
|
340
|
+
non-slide frame on a slides board - name it to the human;
|
|
341
|
+
- **failed**: the frame threw or never rendered, and the export stops with no
|
|
342
|
+
file - `npx marver shot` it, fix it, export again. With `--keep-going` the
|
|
343
|
+
PDF is written with that page blank and the command exits 1: never hand it
|
|
344
|
+
over without saying which page is blank.
|
|
345
|
+
- The last line says `every page print-certified` or `screen-certified only`
|
|
346
|
+
(no rasteriser on this machine): both are fine to hand over. `not
|
|
347
|
+
print-certified` follows the "printed differently" line above.
|
|
348
|
+
|
|
349
|
+
The PDF is the finished slide, as at rest: another reason every slide must
|
|
350
|
+
show its final composition without `data-sl-play` (Motion, above).
|
|
351
|
+
|
|
286
352
|
## design/slides.md - this project's deck look
|
|
287
353
|
|
|
288
354
|
The project's own file: the deck look (master, tones, type, mark, imagery,
|
|
@@ -64,7 +64,9 @@ without narrating into the void; your next message is the reveal.
|
|
|
64
64
|
execution - assume, mark UNCONFIRMED, surface it first.) Once they confirm,
|
|
65
65
|
write that understanding as one sentence into `description` in
|
|
66
66
|
design/config.ts - the project's line in design/manifest.json, the first
|
|
67
|
-
thing every later session reads
|
|
67
|
+
thing every later session reads - and set `name` there to the product's
|
|
68
|
+
name as they say it (init's guess reads "Tms broker"; configure.md step 6
|
|
69
|
+
also gives the canvas its real logo).
|
|
68
70
|
2. **Confirm the stack aloud - what detection ACTUALLY found.** Read AGENTS.md's
|
|
69
71
|
UI line and design/theme.css and narrate the reality, for example: "Tailwind
|
|
70
72
|
+ shadcn/ui; brand tokens in <file>; design/theme.css imports them." No
|
|
@@ -110,10 +112,12 @@ Deliver conversationally when the first draft is ready - a short guided
|
|
|
110
112
|
message, not a manual. The canvas must be running: `npx marver ls` lists it.
|
|
111
113
|
Not yet? Ask the person to run `npx marver dev` in their own terminal - a
|
|
112
114
|
canvas you start dies with your job - or start it detached, as design/AGENTS.md
|
|
113
|
-
says ("Keeping the canvas up"); never with a port. ALWAYS
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
says ("Keeping the canvas up"); never with a port. ALWAYS end with what
|
|
116
|
+
`npx marver link <scene ...> --board <board>` prints for the board you prepared
|
|
117
|
+
(its scenes selected and in view), or the `on the canvas:` line `work done`
|
|
118
|
+
printed - a `marver://` link when the Mac app has this canvas open, else a
|
|
119
|
+
localhost one. Give it as printed: never a link you wrote, never the bare root
|
|
120
|
+
URL. The link goes
|
|
117
121
|
at the BOTTOM of the message, on its own line: the human reads through, then
|
|
118
122
|
clicks. The human has already played with the hosted tour by now, so keep it
|
|
119
123
|
short - let their own product carry the moment. The highlights, all real
|
|
@@ -24,7 +24,7 @@ project's values (which account, which domain, which gate) and every run in the
|
|
|
24
24
|
- The three decisions are made: **which boards ship** (`design/publish.json` - publishing is
|
|
25
25
|
default-closed), **who gets in** (Marver Sign In by default; the canvas password when nothing
|
|
26
26
|
external may be in the sign-in path), **collaboration** (a persistent volume for comments, or none).
|
|
27
|
-
- The canvas has a name: `
|
|
27
|
+
- The canvas has a name: `name: "..."` in `design/config.ts` (or `share: { name }`).
|
|
28
28
|
|
|
29
29
|
## Steps
|
|
30
30
|
|
package/dist/config-BezZTiov.mjs
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
-
import { h as readDescription } from "./board-tree-BXR8dw4b.mjs";
|
|
3
|
-
import { i as onPath, n as AGENT_NAMES, r as detectAgent, t as AGENT_BIN } from "./agent-BsieQGTD.mjs";
|
|
4
|
-
import { existsSync } from "node:fs";
|
|
5
|
-
import { join } from "node:path";
|
|
6
|
-
import { pathToFileURL } from "node:url";
|
|
7
|
-
//#region src/server/config.ts
|
|
8
|
-
var config_exports = /* @__PURE__ */ __exportAll({
|
|
9
|
-
DEFAULTS: () => DEFAULTS,
|
|
10
|
-
loadConfig: () => loadConfig
|
|
11
|
-
});
|
|
12
|
-
const DEFAULTS = {
|
|
13
|
-
mode: "studio",
|
|
14
|
-
theme: null,
|
|
15
|
-
viewports: {
|
|
16
|
-
mobile: {
|
|
17
|
-
width: 390,
|
|
18
|
-
height: 844
|
|
19
|
-
},
|
|
20
|
-
tablet: {
|
|
21
|
-
width: 768,
|
|
22
|
-
height: 1024
|
|
23
|
-
},
|
|
24
|
-
laptop: {
|
|
25
|
-
width: 1280,
|
|
26
|
-
height: 800
|
|
27
|
-
},
|
|
28
|
-
monitor: {
|
|
29
|
-
width: 1920,
|
|
30
|
-
height: 1080
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
themes: ["light", "dark"],
|
|
34
|
-
port: 5199,
|
|
35
|
-
zoomSpeed: 1,
|
|
36
|
-
share: { branding: true }
|
|
37
|
-
};
|
|
38
|
-
/** Load design/config.ts via native TS import (Node >= 22.18). Missing or broken fields fall back to defaults. */
|
|
39
|
-
async function loadConfig(root) {
|
|
40
|
-
const file = join(root, "design", "config.ts");
|
|
41
|
-
if (!existsSync(file)) return {
|
|
42
|
-
...DEFAULTS,
|
|
43
|
-
...jamFields(void 0)
|
|
44
|
-
};
|
|
45
|
-
try {
|
|
46
|
-
const user = (await import(`${pathToFileURL(file).href}?t=${Date.now()}`)).default ?? {};
|
|
47
|
-
return {
|
|
48
|
-
...DEFAULTS,
|
|
49
|
-
...user,
|
|
50
|
-
viewports: validViewports(user.viewports) ?? DEFAULTS.viewports,
|
|
51
|
-
themes: Array.isArray(user.themes) && user.themes.length ? user.themes.map(String) : DEFAULTS.themes,
|
|
52
|
-
port: validPort(user.port) ?? DEFAULTS.port,
|
|
53
|
-
zoomSpeed: validZoom(user.zoomSpeed) ?? DEFAULTS.zoomSpeed,
|
|
54
|
-
description: readDescription(user.description),
|
|
55
|
-
share: {
|
|
56
|
-
branding: user.share?.branding !== false,
|
|
57
|
-
name: typeof user.share?.name === "string" ? user.share.name : void 0,
|
|
58
|
-
logo: typeof user.share?.logo === "string" ? user.share.logo : void 0,
|
|
59
|
-
frontDoor: user.share?.frontDoor !== false && user.share?.front_door !== false,
|
|
60
|
-
notify: user.share?.notify !== false
|
|
61
|
-
},
|
|
62
|
-
...jamFields(user.jam)
|
|
63
|
-
};
|
|
64
|
-
} catch (err) {
|
|
65
|
-
console.error(`[marver] design/config.ts failed to load, using defaults and leaving Live Jam OFF:\n ${err.message}`);
|
|
66
|
-
return {
|
|
67
|
-
...DEFAULTS,
|
|
68
|
-
jamOff: "unreadable"
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
const validDim = (n) => typeof n === "number" && Number.isFinite(n) && n >= 1 && n <= 2e4;
|
|
73
|
-
function validPort(n) {
|
|
74
|
-
return typeof n === "number" && Number.isInteger(n) && n > 0 && n < 65536 ? n : null;
|
|
75
|
-
}
|
|
76
|
-
function validZoom(n) {
|
|
77
|
-
return typeof n === "number" && Number.isFinite(n) && n >= .1 && n <= 10 ? n : null;
|
|
78
|
-
}
|
|
79
|
-
/** Six frames at once is what a jam actually feels like - at 3, half of a multi-frame
|
|
80
|
-
* ask sat waiting on the other half while the human watched. */
|
|
81
|
-
const DEFAULT_CONCURRENCY = 6;
|
|
82
|
-
/** A config value, printable in a warning. Never throws - a formatter that can crash inside an
|
|
83
|
-
* error path (JSON.stringify does, on a BigInt) turns a clear message into a mystery. */
|
|
84
|
-
const show = (v) => {
|
|
85
|
-
try {
|
|
86
|
-
return JSON.stringify(v) ?? String(v);
|
|
87
|
-
} catch {
|
|
88
|
-
return String(v);
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
/** A `{...}` written by hand, not a Date/Map/class instance that merely types as "object". */
|
|
92
|
-
const plainObject = (v) => {
|
|
93
|
-
if (!v || typeof v !== "object") return false;
|
|
94
|
-
const proto = Object.getPrototypeOf(v);
|
|
95
|
-
return proto === Object.prototype || proto === null;
|
|
96
|
-
};
|
|
97
|
-
/** The agent to arm with - or, when the human NAMED one we cannot use, why not (said once,
|
|
98
|
-
* here, because a bad `jam.agent` is a config-file error like any other).
|
|
99
|
-
*
|
|
100
|
-
* A named agent is never quietly swapped for another: running a different tool than the one
|
|
101
|
-
* asked for is worse than not running. Nor is one armed that cannot be spawned - that would
|
|
102
|
-
* claim every @marver mention, fail it, and never retry. */
|
|
103
|
-
function resolveAgent(named) {
|
|
104
|
-
if (named === void 0) return detectAgent() ?? "no-agent";
|
|
105
|
-
if (typeof named !== "string" || !Object.hasOwn(AGENT_BIN, named)) {
|
|
106
|
-
console.warn(`[marver] design/config.ts: jam.agent ${show(named)} is not an agent marver can spawn - Live Jam is off. Use ${AGENT_NAMES}.`);
|
|
107
|
-
return "bad-agent";
|
|
108
|
-
}
|
|
109
|
-
const agent = named;
|
|
110
|
-
if (!onPath(AGENT_BIN[agent])) {
|
|
111
|
-
console.warn(`[marver] design/config.ts names jam.agent "${agent}", but \`${AGENT_BIN[agent]}\` is not on PATH - Live Jam is off until it is installed.`);
|
|
112
|
-
return "bad-agent";
|
|
113
|
-
}
|
|
114
|
-
return agent;
|
|
115
|
-
}
|
|
116
|
-
/** Resolve the jam block. Live Jam is ON by default: an absent or partial `jam` resolves
|
|
117
|
-
* to whatever agent CLI this machine has, so a fresh workspace jams with nothing
|
|
118
|
-
* configured and an old one needs no re-init. `jam: false` is the off switch. */
|
|
119
|
-
function resolveJam(v) {
|
|
120
|
-
if (v === false) return "opted-out";
|
|
121
|
-
const shape = v === void 0 || v === true ? {} : typeof v === "string" ? { agent: v } : plainObject(v) ? v : null;
|
|
122
|
-
if (!shape) {
|
|
123
|
-
console.warn(`[marver] design/config.ts: jam must be false, an agent name, or an options object - got ${show(v)}. Live Jam is off.`);
|
|
124
|
-
return "bad-agent";
|
|
125
|
-
}
|
|
126
|
-
const j = shape;
|
|
127
|
-
const agent = resolveAgent(j.agent);
|
|
128
|
-
if (agent === "no-agent" || agent === "bad-agent") return agent;
|
|
129
|
-
const c = j.concurrency;
|
|
130
|
-
const pick = (key, v, ok, fallback, want) => {
|
|
131
|
-
if (v === void 0) return fallback;
|
|
132
|
-
if (ok(v)) return v;
|
|
133
|
-
console.warn(`[marver] design/config.ts: jam.${key} must be ${want} - got ${show(v)}. Using ${JSON.stringify(fallback)}.`);
|
|
134
|
-
return fallback;
|
|
135
|
-
};
|
|
136
|
-
const bool = (v) => typeof v === "boolean";
|
|
137
|
-
return {
|
|
138
|
-
agent,
|
|
139
|
-
concurrency: typeof c === "number" && Number.isInteger(c) && c >= 1 && c <= 16 ? c : DEFAULT_CONCURRENCY,
|
|
140
|
-
subagents: j.subagents !== false,
|
|
141
|
-
proactive: j.proactive === true,
|
|
142
|
-
chime: pick("chime", j.chime, bool, true, "true or false"),
|
|
143
|
-
capture: pick("capture", j.capture, (v) => v === "confirm" || v === "at-once", "confirm", `'confirm' or 'at-once'`),
|
|
144
|
-
loc: pick("loc", j.loc, bool, true, "true or false"),
|
|
145
|
-
names: pick("names", j.names, bool, true, "true or false"),
|
|
146
|
-
runner: pick("runner", j.runner, (v) => v === "auto" || v === "session" || v === "background", "auto", `'auto', 'session' or 'background'`),
|
|
147
|
-
session: pick("session", j.session, bool, true, "true or false"),
|
|
148
|
-
context: pick("context", j.context, (v) => v === "fork" || v === "fresh", "fork", `'fork' or 'fresh'`),
|
|
149
|
-
mcp: pick("mcp", j.mcp, bool, true, "true or false"),
|
|
150
|
-
skills: pick("skills", j.skills, bool, true, "true or false"),
|
|
151
|
-
others: pick("others", j.others, bool, false, "true or false"),
|
|
152
|
-
...((sm) => sm === void 0 ? {} : { sessionMax: sm })(pick("sessionMax", j.sessionMax, (v) => typeof v === "number" && Number.isInteger(v) && v >= 1 && v <= 8, void 0, "a whole number from 1 to 8"))
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
/** Exactly one of `jam` (armed) or `jamOff` (why not) - so the dev server can speak up about
|
|
156
|
-
* the one off-state nothing has reported yet, and stay quiet about the rest. BOTH keys are
|
|
157
|
-
* always written: these spread over the user's own `jam`, and a raw `jam: false` reaching the
|
|
158
|
-
* server as config would arm the daemon against a truthy object check. */
|
|
159
|
-
function jamFields(v) {
|
|
160
|
-
const r = resolveJam(v);
|
|
161
|
-
return typeof r === "string" ? {
|
|
162
|
-
jam: void 0,
|
|
163
|
-
jamOff: r
|
|
164
|
-
} : {
|
|
165
|
-
jam: r,
|
|
166
|
-
jamOff: void 0
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
function validViewports(v) {
|
|
170
|
-
if (!v || typeof v !== "object") return null;
|
|
171
|
-
const out = {};
|
|
172
|
-
for (const [k, val] of Object.entries(v)) {
|
|
173
|
-
const vp = val;
|
|
174
|
-
if (validDim(vp?.width) && validDim(vp?.height)) out[k] = {
|
|
175
|
-
width: Math.round(vp.width),
|
|
176
|
-
height: Math.round(vp.height)
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
return Object.keys(out).length ? out : null;
|
|
180
|
-
}
|
|
181
|
-
//#endregion
|
|
182
|
-
export { loadConfig as n, config_exports as t };
|