@marver-design/marver 0.25.1 → 0.26.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 +62 -0
- package/README.md +3 -1
- package/dist/{anchor-DVV732zR.mjs → anchor-5H1vnoLu.mjs} +6 -1
- package/dist/{anchor-check-DGZnYviN.mjs → anchor-check-Dg5xpNnU.mjs} +1 -1
- package/dist/audio-CmSRYFEs.mjs +429 -0
- package/dist/{auth-DdUKeVKt.mjs → auth-Dix8wrXV.mjs} +1 -1
- package/dist/{bake-BpxMZfij.mjs → bake-DtVlm0_F.mjs} +1 -1
- package/dist/{boards-Csxj2WJn.mjs → boards-DYG22tOe.mjs} +2 -2
- package/dist/{build-DKaGhoVN.mjs → build-C_gUgcdC.mjs} +16 -9
- package/dist/capture-CrqvU_jh.mjs +729 -0
- package/dist/cli.mjs +23 -17
- 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-DZo6o3rU.mjs +2445 -0
- package/dist/{dev-Diqx1Rt8.mjs → dev-_Nlsc6v9.mjs} +189 -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-NQi0wZJ4.mjs} +23 -5
- package/dist/{marver-id-gate-DGANtVyC.mjs → marver-id-gate-BjF6v4bT.mjs} +4 -4
- package/dist/{perf-QJIWtTw1.mjs → perf-D6VmmJ2q.mjs} +1 -1
- package/dist/{perf-CCisg-ny.mjs → perf-DPbLGhhO.mjs} +1 -1
- package/dist/{plugin-dTF5reck.mjs → plugin-CTD0rydA.mjs} +277 -37
- package/dist/{poster-D-zjYpgk.mjs → poster-ChjXGTS5.mjs} +1 -1
- package/dist/{profile-Do0nGkXO.mjs → profile-WU9qcbIo.mjs} +1 -1
- package/dist/{publish-bakes-C_9VZ-Mq.mjs → publish-bakes-CEP_2NRc.mjs} +3 -3
- package/dist/queue-BuiCKSX1.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-qZWKt_VA.mjs +191 -0
- package/dist/{share-ScamJcks.mjs → share--oFJ1bCI.mjs} +2 -2
- package/dist/{shot-jdO_B6Qw.mjs → shot-CNbHoZ6H.mjs} +1 -1
- package/dist/{shot-CUlmkqFX.mjs → shot-DqcxJibP.mjs} +4 -3
- package/dist/speech-models-DomiLQcY.mjs +299 -0
- package/dist/speech-worker.mjs +319 -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 +177 -0
- package/docs/live-jam.md +21 -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 +88 -3
- package/src/client/frame-host/keys.d.ts +6 -0
- package/src/client/frame-host/keys.js +55 -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 +45 -5
- package/src/client/shell/Comments.tsx +20 -6
- package/src/client/shell/JamSurface.tsx +340 -0
- package/src/client/shell/Play.tsx +22 -3
- package/src/client/shell/Tip.tsx +8 -3
- package/src/client/shell/canvas/Canvas.tsx +12 -2
- package/src/client/shell/canvas/FrameNode.tsx +11 -2
- package/src/client/shell/comments-store.ts +23 -16
- package/src/client/shell/icons.tsx +15 -0
- package/src/client/shell/jam-capture.ts +939 -0
- package/src/client/shell/jam-keys.ts +329 -0
- package/src/client/shell/jam-lane.tsx +208 -0
- package/src/client/shell/jam-lines.ts +115 -0
- package/src/client/shell/jam-panel.tsx +506 -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 +61 -0
- package/src/client/shell/jam-surface-parts.tsx +102 -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 +34 -13
- package/src/client/shell/styles.css +544 -2
- package/src/client/stage/main.tsx +16 -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 +129 -59
- package/dist/daemon-Cl8KXGW4.mjs +0 -1523
|
@@ -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,6 +504,8 @@ 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
|
|
507
|
+
/** the node a person resized last (a new object each time) - a measurement never sets it */
|
|
508
|
+
resized: { key: string } | null
|
|
505
509
|
laser: boolean // laser/inspect mode: frames outline their structure
|
|
506
510
|
board: string // active board name; UNPLACED is the Not on a board view
|
|
507
511
|
boardAuto: boolean // auto boards gain new frames on arrival; curated boards never do
|
|
@@ -588,6 +592,8 @@ interface State {
|
|
|
588
592
|
runTidy(): void
|
|
589
593
|
toast(text: string): void
|
|
590
594
|
jamToast(note: JamNote): void
|
|
595
|
+
/** a jam card failed - one notice, with Retry (spec 27: only a question or a failure interrupts) */
|
|
596
|
+
jamFailed(cards: { id: string; rev: number; board: string; thread?: string; frames: string[]; note?: string; batch?: string }[]): void
|
|
591
597
|
dismissToast(id: number): void
|
|
592
598
|
/** View on a notice: a round's notice moves to its next reply, any other one goes. */
|
|
593
599
|
advanceToast(id: number): void
|
|
@@ -1029,7 +1035,7 @@ export const useStore = create<State>((set, get) => {
|
|
|
1029
1035
|
}
|
|
1030
1036
|
|
|
1031
1037
|
return {
|
|
1032
|
-
manifest: null, nodes: [], selection: [], interact: null, viewTheme: initialViewTheme(), play: null, gesture: false, laser: false,
|
|
1038
|
+
manifest: null, nodes: [], selection: [], interact: null, viewTheme: initialViewTheme(), play: null, gesture: false, resized: null, laser: false,
|
|
1033
1039
|
board: DATA?.default ?? UNPLACED, boardAuto: false, deviceView: null, sceneRows: null, layout: null, layoutRaw: undefined, baseLayout: null, laidOut: null, baseLaidOut: null,
|
|
1034
1040
|
panelOpen: true, scale: 1, toasts: [], working: [], workingSince: {}, workingBoards: [], workingSeq: -1, boardHash: null, dirty: false, boardTitles: DATA?.titles ?? {}, boardMeta: DATA?.meta ?? {},
|
|
1035
1041
|
externalLeases: {}, playUpdateRevision: null, stageShown: null, playNav: 0, pathPulse: 0, imagePulse: 0, imageBusy: false,
|
|
@@ -1366,6 +1372,7 @@ export const useStore = create<State>((set, get) => {
|
|
|
1366
1372
|
const content = !!s.manifest?.frames.find((x) => x.id === cur?.frame)?.contentWidth
|
|
1367
1373
|
return {
|
|
1368
1374
|
nodes: s.nodes.map((n) => (n.key === key ? { ...n, w: W, h: H, ...(content ? { sizeMode: 'manual' as const } : {}) } : n)),
|
|
1375
|
+
resized: { key },
|
|
1369
1376
|
dirty: true,
|
|
1370
1377
|
deviceView: null,
|
|
1371
1378
|
baseLayout: s.baseLayout && cur
|
|
@@ -1662,6 +1669,7 @@ export const useStore = create<State>((set, get) => {
|
|
|
1662
1669
|
const CI = (globalThis as { ClipboardItem?: typeof ClipboardItem }).ClipboardItem
|
|
1663
1670
|
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
1671
|
set({ imageBusy: true })
|
|
1672
|
+
void import('./jam-capture.ts').then(({ recordCopy }) => recordCopy('image', frame.id)) // a capture notes that it happened
|
|
1665
1673
|
const done = () => set({ imageBusy: false })
|
|
1666
1674
|
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
1675
|
// the render is serialized server-side behind any CLI/jam shots; a minute is the ceiling
|
|
@@ -1731,29 +1739,42 @@ export const useStore = create<State>((set, get) => {
|
|
|
1731
1739
|
* supersedes), capped so the stack stays small. */
|
|
1732
1740
|
jamToast(note) {
|
|
1733
1741
|
const id = ++toastSeq
|
|
1734
|
-
const text = note.kind === 'mention' ? 'You were mentioned' : note.kind === 'reply' ? 'New reply' : 'Marver
|
|
1742
|
+
const text = note.kind === 'mention' ? 'You were mentioned' : note.kind === 'reply' ? 'New reply' : note.failed ? 'Marver failed' : 'Marver asks'
|
|
1735
1743
|
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
|
|
1744
|
+
// one notice per batch (spec 27): a batch's question arriving later folds into its open notice
|
|
1745
|
+
const prev = note.batch ? s.toasts.find((t) => t.jam?.batch === note.batch && !t.jam?.failed === !note.failed) : undefined
|
|
1746
|
+
const jam = prev ? { ...note, stack: [...(prev.jam!.stack ?? []), { ...prev.jam!, stack: undefined }, ...(note.stack ?? [])].filter((n) => n.threadId !== note.threadId) } : note
|
|
1740
1747
|
// a notice whose top reply is this thread steps down to the replies under it, never loses them
|
|
1741
1748
|
const others = s.toasts.flatMap((t) => {
|
|
1742
1749
|
if (t === prev) return []
|
|
1743
1750
|
const rest = (t.jam?.stack ?? []).filter((n) => n.threadId !== note.threadId)
|
|
1744
1751
|
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) } }] : []
|
|
1752
|
+
return rest.length ? [{ ...t, jam: { ...rest[rest.length - 1], ...(t.jam?.batch ? { batch: t.jam.batch } : {}), stack: rest.slice(0, -1) } }] : []
|
|
1746
1753
|
})
|
|
1747
1754
|
return { toasts: [...others, { id, text, jam }].slice(-8) }
|
|
1748
1755
|
})
|
|
1749
1756
|
},
|
|
1757
|
+
jamFailed(cards) {
|
|
1758
|
+
const card = cards[0]
|
|
1759
|
+
if (!card) return
|
|
1760
|
+
const frame = card.frames[0]
|
|
1761
|
+
const entry = frame ? get().manifest?.frames.find((f) => f.id === frame) : undefined
|
|
1762
|
+
get().jamToast({
|
|
1763
|
+
threadId: card.thread ?? '', board: card.board, ts: Date.now(),
|
|
1764
|
+
preview: (cards.length > 1 ? `${cards.length} asks - ` : '') + (card.note ?? 'the agent could not finish'),
|
|
1765
|
+
frame, frameTitle: entry?.title ?? frame, intent: entry?.intent,
|
|
1766
|
+
failed: cards.map((c) => ({ card: c.id, rev: c.rev })),
|
|
1767
|
+
...(card.batch ? { batch: card.batch } : {}),
|
|
1768
|
+
})
|
|
1769
|
+
},
|
|
1750
1770
|
dismissToast(id) { set((s) => ({ toasts: s.toasts.filter((t) => t.id !== id) })) },
|
|
1751
1771
|
advanceToast(id) {
|
|
1752
|
-
// a
|
|
1772
|
+
// a folded notice steps to its next question; any other notice goes
|
|
1753
1773
|
set((s) => ({ toasts: s.toasts.flatMap((t) => {
|
|
1754
1774
|
if (t.id !== id) return [t]
|
|
1755
1775
|
const rest = t.jam?.stack ?? []
|
|
1756
|
-
|
|
1776
|
+
// the next one keeps the notice's batch, so a later question of that batch still folds in
|
|
1777
|
+
return rest.length ? [{ ...t, jam: { ...rest[rest.length - 1], ...(t.jam?.batch ? { batch: t.jam.batch } : {}), stack: rest.slice(0, -1) } }] : []
|
|
1757
1778
|
}) }))
|
|
1758
1779
|
},
|
|
1759
1780
|
clearJamToasts() { set((s) => ({ toasts: s.toasts.filter((t) => !t.jam) })) },
|