@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
|
@@ -115,14 +115,16 @@ export interface JamNote {
|
|
|
115
115
|
frame?: string; frameTitle?: string; intent?: string
|
|
116
116
|
kind?: 'mention' | 'reply' // absent = the agent pill
|
|
117
117
|
author?: { name?: string; avatar?: string; id?: string; email?: string }
|
|
118
|
-
/**
|
|
119
|
-
|
|
120
|
-
/**
|
|
118
|
+
/** the jam batch this notice is about - its later questions fold into it, whenever they arrive */
|
|
119
|
+
batch?: string
|
|
120
|
+
/** jam cards of one batch that failed (spec 27): the notice carries Retry, for all of them */
|
|
121
|
+
failed?: { card: string; rev: number }[]
|
|
122
|
+
/** earlier notices folded under this one - View walks through them */
|
|
121
123
|
stack?: JamNote[]
|
|
122
124
|
}
|
|
123
125
|
export interface Toast { id: number; text: string; jam?: JamNote }
|
|
124
126
|
|
|
125
|
-
export const CONFIG: { viewports: Record<string, { width: number; height: number }>; themes: string[]; zoomSpeed?: number; noTheme: boolean; setup?: boolean; projectName?: string; branding?: boolean } = shConfig
|
|
127
|
+
export const CONFIG: { viewports: Record<string, { width: number; height: number }>; themes: string[]; zoomSpeed?: number; noTheme: boolean; setup?: boolean; projectName?: string; branding?: boolean; jam?: { chime: boolean; capture: 'confirm' | 'at-once'; names?: boolean } | null; workspace?: string } = shConfig
|
|
126
128
|
|
|
127
129
|
/** Invariant: `branding: false` strips every Marver mention - new chrome included. */
|
|
128
130
|
export const BRANDING = CONFIG.branding !== false
|
|
@@ -502,7 +504,10 @@ interface State {
|
|
|
502
504
|
* name and no canvas door (presentation default of the link, 04 §2.35). */
|
|
503
505
|
play: { at: string; device: string; theme: string; focus?: boolean; deep?: boolean; slides?: boolean } | null
|
|
504
506
|
gesture: boolean // a frame drag/resize is in progress - canvas panning is disabled
|
|
505
|
-
|
|
507
|
+
/** the node a person resized last (a new object each time) - a measurement never sets it */
|
|
508
|
+
resized: { key: string } | null
|
|
509
|
+
laser: boolean // laser mode: a pointer - the element under the cursor lit, a click copies its path
|
|
510
|
+
laserInspect: boolean // the laser as inspect (⌥L): every element outlined, as the laser was before 0.26.1
|
|
506
511
|
board: string // active board name; UNPLACED is the Not on a board view
|
|
507
512
|
boardAuto: boolean // auto boards gain new frames on arrival; curated boards never do
|
|
508
513
|
deviceView: string | null // board-wide device preview (viewport name), null = free-form layout
|
|
@@ -552,7 +557,9 @@ interface State {
|
|
|
552
557
|
setInteract(key: string | null): void
|
|
553
558
|
setPlay(p: State['play']): void
|
|
554
559
|
setGesture(g: boolean): void
|
|
555
|
-
setLaser(on: boolean): void
|
|
560
|
+
setLaser(on: boolean, inspect?: boolean): void
|
|
561
|
+
/** L (`inspect` false) or ⌥L (true): the same mode again turns the laser off; the other switches to it */
|
|
562
|
+
toggleLaser(inspect: boolean): void
|
|
556
563
|
invalidateFrames(frameIds: string[], revision: string, docs?: { epoch?: string; docs?: Record<string, number> }): void
|
|
557
564
|
setExternalLease(nodeKey: string, reason: 'laser' | 'comment', on: boolean): void
|
|
558
565
|
/** A safe point (a lease ended, a gesture ended): stale nodes may reload now. */
|
|
@@ -588,6 +595,8 @@ interface State {
|
|
|
588
595
|
runTidy(): void
|
|
589
596
|
toast(text: string): void
|
|
590
597
|
jamToast(note: JamNote): void
|
|
598
|
+
/** a jam card failed - one notice, with Retry (spec 27: only a question or a failure interrupts) */
|
|
599
|
+
jamFailed(cards: { id: string; rev: number; board: string; thread?: string; frames: string[]; note?: string; batch?: string }[]): void
|
|
591
600
|
dismissToast(id: number): void
|
|
592
601
|
/** View on a notice: a round's notice moves to its next reply, any other one goes. */
|
|
593
602
|
advanceToast(id: number): void
|
|
@@ -1029,7 +1038,7 @@ export const useStore = create<State>((set, get) => {
|
|
|
1029
1038
|
}
|
|
1030
1039
|
|
|
1031
1040
|
return {
|
|
1032
|
-
manifest: null, nodes: [], selection: [], interact: null, viewTheme: initialViewTheme(), play: null, gesture: false, laser: false,
|
|
1041
|
+
manifest: null, nodes: [], selection: [], interact: null, viewTheme: initialViewTheme(), play: null, gesture: false, resized: null, laser: false, laserInspect: false,
|
|
1033
1042
|
board: DATA?.default ?? UNPLACED, boardAuto: false, deviceView: null, sceneRows: null, layout: null, layoutRaw: undefined, baseLayout: null, laidOut: null, baseLaidOut: null,
|
|
1034
1043
|
panelOpen: true, scale: 1, toasts: [], working: [], workingSince: {}, workingBoards: [], workingSeq: -1, boardHash: null, dirty: false, boardTitles: DATA?.titles ?? {}, boardMeta: DATA?.meta ?? {},
|
|
1035
1044
|
externalLeases: {}, playUpdateRevision: null, stageShown: null, playNav: 0, pathPulse: 0, imagePulse: 0, imageBusy: false,
|
|
@@ -1366,6 +1375,7 @@ export const useStore = create<State>((set, get) => {
|
|
|
1366
1375
|
const content = !!s.manifest?.frames.find((x) => x.id === cur?.frame)?.contentWidth
|
|
1367
1376
|
return {
|
|
1368
1377
|
nodes: s.nodes.map((n) => (n.key === key ? { ...n, w: W, h: H, ...(content ? { sizeMode: 'manual' as const } : {}) } : n)),
|
|
1378
|
+
resized: { key },
|
|
1369
1379
|
dirty: true,
|
|
1370
1380
|
deviceView: null,
|
|
1371
1381
|
baseLayout: s.baseLayout && cur
|
|
@@ -1566,12 +1576,18 @@ export const useStore = create<State>((set, get) => {
|
|
|
1566
1576
|
get().flushFrameUpdates() // A6: the frame just left interact is no longer leased
|
|
1567
1577
|
},
|
|
1568
1578
|
setPlay(play) { set({ play }) },
|
|
1569
|
-
|
|
1570
|
-
|
|
1579
|
+
toggleLaser(inspect) {
|
|
1580
|
+
const s = get()
|
|
1581
|
+
if (s.laser && s.laserInspect === inspect) s.setLaser(false)
|
|
1582
|
+
else s.setLaser(true, inspect)
|
|
1583
|
+
},
|
|
1584
|
+
setLaser(laser, inspect = false) {
|
|
1585
|
+
if (laser) { set({ laser, laserInspect: inspect }); return }
|
|
1571
1586
|
// leaving laser mode drops every laser engagement lease (the bridge stops reporting), but
|
|
1572
1587
|
// keeps comment engagement; the freed frames may now flush a deferred update
|
|
1573
1588
|
set((s) => ({
|
|
1574
1589
|
laser,
|
|
1590
|
+
laserInspect: false,
|
|
1575
1591
|
externalLeases: Object.fromEntries(
|
|
1576
1592
|
Object.entries(s.externalLeases).filter(([, v]) => v.comment).map(([k]) => [k, { comment: true as const }])),
|
|
1577
1593
|
}))
|
|
@@ -1662,6 +1678,7 @@ export const useStore = create<State>((set, get) => {
|
|
|
1662
1678
|
const CI = (globalThis as { ClipboardItem?: typeof ClipboardItem }).ClipboardItem
|
|
1663
1679
|
if (!CI || !navigator.clipboard?.write || (CI.supports && !CI.supports('image/png'))) { s.toast("this browser can't put images on the clipboard - use Chrome, Edge or Safari"); return }
|
|
1664
1680
|
set({ imageBusy: true })
|
|
1681
|
+
void import('./jam-capture.ts').then(({ recordCopy }) => recordCopy('image', frame.id)) // a capture notes that it happened
|
|
1665
1682
|
const done = () => set({ imageBusy: false })
|
|
1666
1683
|
const qs = new URLSearchParams({ frame: frame.id, theme: node.theme, scale: String(scale), w: String(Math.round(node.w)), h: String(Math.round(node.h)), format: 'png' })
|
|
1667
1684
|
// the render is serialized server-side behind any CLI/jam shots; a minute is the ceiling
|
|
@@ -1731,29 +1748,42 @@ export const useStore = create<State>((set, get) => {
|
|
|
1731
1748
|
* supersedes), capped so the stack stays small. */
|
|
1732
1749
|
jamToast(note) {
|
|
1733
1750
|
const id = ++toastSeq
|
|
1734
|
-
const text = note.kind === 'mention' ? 'You were mentioned' : note.kind === 'reply' ? 'New reply' : 'Marver
|
|
1751
|
+
const text = note.kind === 'mention' ? 'You were mentioned' : note.kind === 'reply' ? 'New reply' : note.failed ? 'Marver failed' : 'Marver asks'
|
|
1735
1752
|
set((s) => {
|
|
1736
|
-
// one notice per
|
|
1737
|
-
|
|
1738
|
-
const
|
|
1739
|
-
const jam = prev ? { ...note, stack: [...(prev.jam!.stack ?? []), { ...prev.jam!, stack: undefined }].filter((n) => n.threadId !== note.threadId) } : note
|
|
1753
|
+
// one notice per batch (spec 27): a batch's question arriving later folds into its open notice
|
|
1754
|
+
const prev = note.batch ? s.toasts.find((t) => t.jam?.batch === note.batch && !t.jam?.failed === !note.failed) : undefined
|
|
1755
|
+
const jam = prev ? { ...note, stack: [...(prev.jam!.stack ?? []), { ...prev.jam!, stack: undefined }, ...(note.stack ?? [])].filter((n) => n.threadId !== note.threadId) } : note
|
|
1740
1756
|
// a notice whose top reply is this thread steps down to the replies under it, never loses them
|
|
1741
1757
|
const others = s.toasts.flatMap((t) => {
|
|
1742
1758
|
if (t === prev) return []
|
|
1743
1759
|
const rest = (t.jam?.stack ?? []).filter((n) => n.threadId !== note.threadId)
|
|
1744
1760
|
if (t.jam?.threadId !== note.threadId) return [t.jam?.stack ? { ...t, jam: { ...t.jam, stack: rest } } : t]
|
|
1745
|
-
return rest.length ? [{ ...t, jam: { ...rest[rest.length - 1], stack: rest.slice(0, -1) } }] : []
|
|
1761
|
+
return rest.length ? [{ ...t, jam: { ...rest[rest.length - 1], ...(t.jam?.batch ? { batch: t.jam.batch } : {}), stack: rest.slice(0, -1) } }] : []
|
|
1746
1762
|
})
|
|
1747
1763
|
return { toasts: [...others, { id, text, jam }].slice(-8) }
|
|
1748
1764
|
})
|
|
1749
1765
|
},
|
|
1766
|
+
jamFailed(cards) {
|
|
1767
|
+
const card = cards[0]
|
|
1768
|
+
if (!card) return
|
|
1769
|
+
const frame = card.frames[0]
|
|
1770
|
+
const entry = frame ? get().manifest?.frames.find((f) => f.id === frame) : undefined
|
|
1771
|
+
get().jamToast({
|
|
1772
|
+
threadId: card.thread ?? '', board: card.board, ts: Date.now(),
|
|
1773
|
+
preview: (cards.length > 1 ? `${cards.length} asks - ` : '') + (card.note ?? 'the agent could not finish'),
|
|
1774
|
+
frame, frameTitle: entry?.title ?? frame, intent: entry?.intent,
|
|
1775
|
+
failed: cards.map((c) => ({ card: c.id, rev: c.rev })),
|
|
1776
|
+
...(card.batch ? { batch: card.batch } : {}),
|
|
1777
|
+
})
|
|
1778
|
+
},
|
|
1750
1779
|
dismissToast(id) { set((s) => ({ toasts: s.toasts.filter((t) => t.id !== id) })) },
|
|
1751
1780
|
advanceToast(id) {
|
|
1752
|
-
// a
|
|
1781
|
+
// a folded notice steps to its next question; any other notice goes
|
|
1753
1782
|
set((s) => ({ toasts: s.toasts.flatMap((t) => {
|
|
1754
1783
|
if (t.id !== id) return [t]
|
|
1755
1784
|
const rest = t.jam?.stack ?? []
|
|
1756
|
-
|
|
1785
|
+
// the next one keeps the notice's batch, so a later question of that batch still folds in
|
|
1786
|
+
return rest.length ? [{ ...t, jam: { ...rest[rest.length - 1], ...(t.jam?.batch ? { batch: t.jam.batch } : {}), stack: rest.slice(0, -1) } }] : []
|
|
1757
1787
|
}) }))
|
|
1758
1788
|
},
|
|
1759
1789
|
clearJamToasts() { set((s) => ({ toasts: s.toasts.filter((t) => !t.jam) })) },
|