@marver-design/marver 0.27.0 → 0.28.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 +195 -0
- package/README.md +9 -4
- package/dist/{anchor-check-ChdDqL5z.mjs → anchor-check-PHUOFj1N.mjs} +1 -1
- package/dist/{audio-Dw1lfMdb.mjs → audio-DX4POHAj.mjs} +39 -4
- package/dist/{board-tree-DRioF94d.mjs → board-tree-BXR8dw4b.mjs} +3 -1
- package/dist/{boards-DlTcpF47.mjs → boards-BeWtjGUM.mjs} +50 -5
- package/dist/boards-EH2onUXM.mjs +995 -0
- package/dist/{build-DZnFysGU.mjs → build-BsAyLMT1.mjs} +9 -22
- package/dist/{capture-vadKjuCo.mjs → capture-DdZ6xgoz.mjs} +92 -30
- package/dist/cli.mjs +56 -21
- package/dist/{collab-Dxg2trOK.mjs → collab-BEAcXrBb.mjs} +1 -1
- package/dist/{comments-DxOkCSNE.mjs → comments-CrBHPEQl.mjs} +4 -4
- package/dist/config-BezZTiov.mjs +182 -0
- package/dist/conn-BMiHS42T.mjs +222 -0
- package/dist/connectors-MR9d-EBP.mjs +290 -0
- package/dist/{context-HQ4Giw58.mjs → context-BUnFiyA3.mjs} +3 -3
- package/dist/{daemon-BSA0lV8d.mjs → daemon-C5dg2R-V.mjs} +2188 -183
- package/dist/{dev-eQJhWsqg.mjs → dev-D7YS7iT2.mjs} +25 -14
- package/dist/{init-COD0x48i.mjs → init-WE5lQkQL.mjs} +8 -3
- package/dist/jam-Cj5gBvwD.mjs +373 -0
- package/dist/{link-DDXZVGtv.mjs → link-BFFRgrMt.mjs} +4 -4
- package/dist/listener-DdLEM79A.mjs +80 -0
- package/dist/{ls-D7O1G505.mjs → ls-BZ5TAtd5.mjs} +1 -1
- package/dist/{manifest-Nl3KSVOk.mjs → manifest-DPZ3WNg_.mjs} +2 -2
- package/dist/{marks-CWM3WJjc.mjs → marks-Dyn6tmjp.mjs} +3 -3
- package/dist/{marks-CKgzucHZ.mjs → marks-Kmdab_5w.mjs} +3 -3
- package/dist/{marver-id-gate-BjF6v4bT.mjs → marver-id-gate-D-R0hSt_.mjs} +1 -1
- package/dist/perf-Cn5LiRaY.mjs +1319 -0
- package/dist/perf-jam-QxD_UnzN.mjs +635 -0
- package/dist/permit-DDa6wqOs.mjs +187 -0
- package/dist/plugin-C_0yb-Fq.mjs +5089 -0
- package/dist/{poster-Bx83ZYVK.mjs → poster-DHi6I1fO.mjs} +1 -1
- package/dist/{profile-Bh5Y5zpW.mjs → profile-jIS6BcAs.mjs} +1 -1
- package/dist/{publish-bakes-aljgm45S.mjs → publish-bakes-r4PEZuPl.mjs} +3 -3
- package/dist/{queue-CAM_vNmX.mjs → queue-c-6aTHEz.mjs} +164 -25
- package/dist/{recover-t9Pno3u9.mjs → recover-nrLEVLyJ.mjs} +2 -2
- package/dist/{serve-C8rVheYk.mjs → serve-Dp3nHstu.mjs} +3 -3
- package/dist/{session-BAaJsK5c.mjs → session-DyVE7cCk.mjs} +1 -1
- package/dist/{share-W5H3BNvP.mjs → share-Ce4tP7ji.mjs} +1 -1
- package/dist/{shot-LFhC-WYD.mjs → shot-BrRtqaiS.mjs} +34 -8
- package/dist/{shot-DoHLl6ig.mjs → shot-DBWN8hPP.mjs} +1 -1
- package/dist/sizes-wjXDev3b.mjs +139 -0
- package/dist/{slots-DCDo3N0x.mjs → slots-CFNnegCc.mjs} +8 -1
- package/dist/speech-worker.mjs +23 -3
- package/dist/{sync-BQVlHZpx.mjs → sync-CQdGARJ9.mjs} +1 -1
- package/dist/transport-C5FnY9ni.mjs +203 -0
- package/dist/{work-BroFwnup.mjs → work-BYWD_1Zf.mjs} +3 -3
- package/dist/{work-Bp1p39kq.mjs → work-DJxH7cCX.mjs} +1 -1
- package/docs/jam-session.md +42 -16
- package/docs/live-jam.md +92 -10
- package/docs/performance.md +197 -35
- package/package.json +1 -1
- package/src/client/content/video.tsx +10 -2
- package/src/client/shell/App.tsx +10 -3
- package/src/client/shell/Comments.tsx +5 -3
- package/src/client/shell/ContextMenu.tsx +5 -3
- package/src/client/shell/JamSurface.tsx +56 -21
- package/src/client/shell/LockedApp.tsx +3 -0
- package/src/client/shell/Play.tsx +4 -2
- package/src/client/shell/Tip.tsx +3 -1
- package/src/client/shell/api.ts +47 -20
- package/src/client/shell/app-bridge.ts +254 -0
- package/src/client/shell/app-perf.ts +92 -0
- package/src/client/shell/canvas/Canvas.tsx +115 -22
- package/src/client/shell/canvas/FrameNode.tsx +10 -6
- package/src/client/shell/canvas/admission.ts +23 -8
- package/src/client/shell/canvas/ctl.ts +6 -0
- package/src/client/shell/canvas/sleep.ts +57 -17
- package/src/client/shell/canvas/updates.ts +2 -1
- package/src/client/shell/icons.tsx +1 -0
- package/src/client/shell/inset.ts +44 -0
- package/src/client/shell/jam-capture.ts +113 -33
- package/src/client/shell/jam-keys.ts +40 -9
- package/src/client/shell/jam-lane.tsx +14 -5
- package/src/client/shell/jam-lines.ts +66 -9
- package/src/client/shell/jam-panel.tsx +61 -6
- package/src/client/shell/jam-queue.ts +50 -8
- package/src/client/shell/jam-session.tsx +53 -4
- package/src/client/shell/jam-surface-parts.tsx +6 -3
- package/src/client/shell/jam-ui.tsx +6 -1
- package/src/client/shell/jam-voice-wait.ts +21 -0
- package/src/client/shell/jam-voice.ts +62 -15
- package/src/client/shell/main.tsx +14 -1
- package/src/client/shell/marks-ui.tsx +5 -3
- package/src/client/shell/marver-app.ts +21 -0
- package/src/client/shell/perf-run-probe.ts +34 -0
- package/src/client/shell/perf-run.ts +70 -0
- package/src/client/shell/perf.ts +11 -0
- package/src/client/shell/recorder.ts +45 -3
- package/src/client/shell/store.ts +52 -24
- package/src/client/shell/styles.css +65 -17
- package/src/client/shell/tidy.ts +3 -2
- package/src/client/shell/unsaved.ts +81 -0
- package/src/client/shell/whiteout-probes.ts +141 -0
- package/src/shared/app-api.ts +205 -0
- package/src/shared/app-perf.ts +308 -0
- package/src/shared/approval.ts +20 -0
- package/src/shared/events.ts +1 -1
- package/src/shared/logo-sniff.ts +86 -0
- package/src/shared/machine.ts +132 -0
- package/src/shared/perf-run.ts +177 -0
- package/templates/AGENTS-embedded.md +31 -1
- package/templates/AGENTS-studio.md +31 -1
- package/templates/instructions/boards.md +10 -2
- package/templates/instructions/jam.md +90 -0
- package/dist/bake-DM_uWgAA.mjs +0 -786
- package/dist/boards-CGg6piKF.mjs +0 -342
- package/dist/perf-BWzQwZqj.mjs +0 -369
- package/dist/perf-BoDSkbEb.mjs +0 -429
- package/dist/perf-jam-D55U3FZK.mjs +0 -242
- package/dist/plugin-C-E7omsh.mjs +0 -2762
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-8H4AJuhK.mjs";
|
|
2
|
+
import { realpathSync } from "node:fs";
|
|
3
|
+
import { basename, dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
4
|
+
import { createInterface } from "node:readline";
|
|
5
|
+
//#region src/server/jam/permit.ts
|
|
6
|
+
/**
|
|
7
|
+
* `marver jam permit` - the permission tool of a background Claude Code run (spec 29b, Part 1).
|
|
8
|
+
*
|
|
9
|
+
* Claude Code refuses a wildcard over every MCP server in `--allowedTools`, and a headless run that
|
|
10
|
+
* meets a permission question just says no - so a background agent could never use your MCP servers.
|
|
11
|
+
* Instead the daemon adds this small stdio MCP server with `--mcp-config` and names its one tool with
|
|
12
|
+
* `--permission-prompt-tool`: every question the run would have asked you comes here, and is answered
|
|
13
|
+
* by the policy below. Nothing is ever asked of anyone; what is not allowed is refused, with a reason
|
|
14
|
+
* the agent reads.
|
|
15
|
+
*
|
|
16
|
+
* Edits inside the repo and Bash inside the sandbox never get here (acceptEdits and
|
|
17
|
+
* autoAllowBashIfSandboxed answer them first). What does: MCP tools, skills, web, subagents - and
|
|
18
|
+
* anything outside those lines, which is refused.
|
|
19
|
+
*/
|
|
20
|
+
var permit_exports = /* @__PURE__ */ __exportAll({
|
|
21
|
+
PROTECTED_GLOBS: () => PROTECTED_GLOBS,
|
|
22
|
+
decide: () => decide,
|
|
23
|
+
permitCommand: () => permitCommand
|
|
24
|
+
});
|
|
25
|
+
/** Tools a Jam run may use when they ask (reads, web, its own planning and helpers). */
|
|
26
|
+
const ALWAYS = /* @__PURE__ */ new Set([
|
|
27
|
+
"Read",
|
|
28
|
+
"Glob",
|
|
29
|
+
"Grep",
|
|
30
|
+
"LS",
|
|
31
|
+
"WebFetch",
|
|
32
|
+
"WebSearch",
|
|
33
|
+
"Task",
|
|
34
|
+
"Agent",
|
|
35
|
+
"TodoWrite",
|
|
36
|
+
"TodoRead",
|
|
37
|
+
"NotebookRead",
|
|
38
|
+
"ToolSearch",
|
|
39
|
+
"BashOutput",
|
|
40
|
+
"KillShell",
|
|
41
|
+
"TaskOutput",
|
|
42
|
+
"TaskStop",
|
|
43
|
+
"Monitor"
|
|
44
|
+
]);
|
|
45
|
+
const EDITS = /* @__PURE__ */ new Set([
|
|
46
|
+
"Edit",
|
|
47
|
+
"Write",
|
|
48
|
+
"MultiEdit",
|
|
49
|
+
"NotebookEdit"
|
|
50
|
+
]);
|
|
51
|
+
/** The path an edit would touch, resolved through any link that exists: inside the repo, or not. */
|
|
52
|
+
function insideRoot(root, p) {
|
|
53
|
+
if (typeof p !== "string" || !p) return false;
|
|
54
|
+
let at = isAbsolute(p) ? p : resolve(root, p);
|
|
55
|
+
const tail = [];
|
|
56
|
+
for (;;) try {
|
|
57
|
+
at = realpathSync(at);
|
|
58
|
+
break;
|
|
59
|
+
} catch {
|
|
60
|
+
const up = dirname(at);
|
|
61
|
+
if (up === at) return false;
|
|
62
|
+
tail.unshift(basename(at));
|
|
63
|
+
at = up;
|
|
64
|
+
}
|
|
65
|
+
let base;
|
|
66
|
+
try {
|
|
67
|
+
base = realpathSync(root);
|
|
68
|
+
} catch {
|
|
69
|
+
base = root;
|
|
70
|
+
}
|
|
71
|
+
const rel = relative(base, join(at, ...tail));
|
|
72
|
+
return !!rel && !rel.startsWith("..") && !isAbsolute(rel) && !PROTECTED.some((r) => r.test(rel));
|
|
73
|
+
}
|
|
74
|
+
/** The same protected paths as Claude Code permission globs, relative to the repo - installed as `Edit(...)` deny
|
|
75
|
+
* rules, which also bound the sandbox's writes: an edit inside the repo is accepted before this tool is asked, so
|
|
76
|
+
* the rules must hold on their own. */
|
|
77
|
+
const PROTECTED_GLOBS = [
|
|
78
|
+
".git/**",
|
|
79
|
+
".claude/**",
|
|
80
|
+
".codex/**",
|
|
81
|
+
".cursor/**",
|
|
82
|
+
".grok/**",
|
|
83
|
+
".opencode/**",
|
|
84
|
+
".vscode/**",
|
|
85
|
+
".idea/**",
|
|
86
|
+
".husky/**",
|
|
87
|
+
".mcp.json",
|
|
88
|
+
"node_modules/**",
|
|
89
|
+
"**/node_modules/**",
|
|
90
|
+
"design/.local/**",
|
|
91
|
+
".envrc",
|
|
92
|
+
".env",
|
|
93
|
+
".env.*"
|
|
94
|
+
];
|
|
95
|
+
/** Inside the repo but never a Jam run's to edit: what runs commands outside its sandbox or speaks for the owner -
|
|
96
|
+
* git, the tools' settings and hooks, MCP configuration, the installed packages, Marver's own Jam state (the
|
|
97
|
+
* sessions' keys, the journal, the ledger). Matched on the resolved path, any case. */
|
|
98
|
+
const PROTECTED = [
|
|
99
|
+
/^\.git(\/|$)/i,
|
|
100
|
+
/^\.(claude|codex|cursor|grok|opencode|vscode|idea|husky)(\/|$)/i,
|
|
101
|
+
/^\.mcp\.json$/i,
|
|
102
|
+
/(^|\/)node_modules(\/|$)/i,
|
|
103
|
+
/^design\/\.local(\/|$)/i,
|
|
104
|
+
/^\.envrc$/i,
|
|
105
|
+
/^\.env(\.|$)/i
|
|
106
|
+
];
|
|
107
|
+
function decide(p, tool, input) {
|
|
108
|
+
const allow = () => ({
|
|
109
|
+
behavior: "allow",
|
|
110
|
+
updatedInput: input
|
|
111
|
+
});
|
|
112
|
+
const deny = (message) => ({
|
|
113
|
+
behavior: "deny",
|
|
114
|
+
message
|
|
115
|
+
});
|
|
116
|
+
if (tool.startsWith("mcp__")) return p.mcp ? allow() : deny("MCP servers are turned off for Jam runs on this canvas");
|
|
117
|
+
if (tool === "Skill") return p.skills ? allow() : deny("skills are turned off for Jam runs on this canvas");
|
|
118
|
+
if (ALWAYS.has(tool)) return allow();
|
|
119
|
+
if (EDITS.has(tool)) return insideRoot(p.root, input.file_path ?? input.notebook_path) ? allow() : deny("a Jam run edits only inside this repo");
|
|
120
|
+
if (tool === "Bash") return deny("a Jam run runs commands inside the sandbox only - do it inside it, or say what is left to do in your reply");
|
|
121
|
+
return deny(`a Jam run cannot use ${tool}`);
|
|
122
|
+
}
|
|
123
|
+
/** The stdio MCP server: initialize, tools/list (one tool, `decide`), tools/call. */
|
|
124
|
+
function permitCommand() {
|
|
125
|
+
let p;
|
|
126
|
+
try {
|
|
127
|
+
p = JSON.parse(process.env.MARVER_JAM_PERMIT ?? "");
|
|
128
|
+
} catch {
|
|
129
|
+
process.exit(1);
|
|
130
|
+
}
|
|
131
|
+
if (!p || typeof p.root !== "string") process.exit(1);
|
|
132
|
+
const send = (o) => process.stdout.write(JSON.stringify(o) + "\n");
|
|
133
|
+
createInterface({ input: process.stdin }).on("line", (line) => {
|
|
134
|
+
let m;
|
|
135
|
+
try {
|
|
136
|
+
m = JSON.parse(line);
|
|
137
|
+
} catch {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
if (m?.method === "initialize") send({
|
|
141
|
+
jsonrpc: "2.0",
|
|
142
|
+
id: m.id,
|
|
143
|
+
result: {
|
|
144
|
+
protocolVersion: m.params?.protocolVersion ?? "2025-06-18",
|
|
145
|
+
capabilities: { tools: {} },
|
|
146
|
+
serverInfo: {
|
|
147
|
+
name: "marver-jam",
|
|
148
|
+
version: "1"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
else if (m?.method === "tools/list") send({
|
|
153
|
+
jsonrpc: "2.0",
|
|
154
|
+
id: m.id,
|
|
155
|
+
result: { tools: [{
|
|
156
|
+
name: "decide",
|
|
157
|
+
description: "Marver Jam answers the permission questions of a background run. Not for use by the agent.",
|
|
158
|
+
inputSchema: {
|
|
159
|
+
type: "object",
|
|
160
|
+
properties: {
|
|
161
|
+
tool_name: { type: "string" },
|
|
162
|
+
input: { type: "object" }
|
|
163
|
+
},
|
|
164
|
+
required: ["tool_name", "input"]
|
|
165
|
+
}
|
|
166
|
+
}] }
|
|
167
|
+
});
|
|
168
|
+
else if (m?.method === "tools/call") {
|
|
169
|
+
const a = m.params?.arguments ?? {};
|
|
170
|
+
const out = decide(p, String(a.tool_name ?? ""), a.input && typeof a.input === "object" ? a.input : {});
|
|
171
|
+
send({
|
|
172
|
+
jsonrpc: "2.0",
|
|
173
|
+
id: m.id,
|
|
174
|
+
result: { content: [{
|
|
175
|
+
type: "text",
|
|
176
|
+
text: JSON.stringify(out)
|
|
177
|
+
}] }
|
|
178
|
+
});
|
|
179
|
+
} else if (m?.id !== void 0) send({
|
|
180
|
+
jsonrpc: "2.0",
|
|
181
|
+
id: m.id,
|
|
182
|
+
result: {}
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
export { permit_exports as n, PROTECTED_GLOBS as t };
|