@1agh/maude 1.7.1 → 1.9.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/apps/studio/acp/bridge.ts +15 -2
- package/apps/studio/acp/login-state.ts +1 -0
- package/apps/studio/acp/probe.ts +52 -1
- package/apps/studio/api.ts +431 -39
- package/apps/studio/asset-upload.ts +174 -0
- package/apps/studio/assets-s3.ts +37 -2
- package/apps/studio/bin/_curl-local.mjs +7 -0
- package/apps/studio/bin/_pdf-playwright.mjs +22 -1
- package/apps/studio/bin/_png-playwright.mjs +20 -1
- package/apps/studio/bin/_region.mjs +92 -0
- package/apps/studio/bin/annotate.mjs +16 -7
- package/apps/studio/bin/read-annotations.mjs +62 -4
- package/apps/studio/canvas-build.ts +59 -4
- package/apps/studio/canvas-lib.tsx +48 -1
- package/apps/studio/canvas-shell.tsx +28 -4
- package/apps/studio/client/app.jsx +441 -15903
- package/apps/studio/client/canvas-url.js +9 -0
- package/apps/studio/client/dialogs/asset-picker.jsx +331 -0
- package/apps/studio/client/dialogs/command-palette.jsx +112 -0
- package/apps/studio/client/dialogs/export-dialog.jsx +782 -0
- package/apps/studio/client/dialogs/help-modal.jsx +324 -0
- package/apps/studio/client/dialogs/shortcuts-overlay.jsx +144 -0
- package/apps/studio/client/embed-view.jsx +284 -0
- package/apps/studio/client/embed.js +101 -0
- package/apps/studio/client/export-center.jsx +2 -0
- package/apps/studio/client/github.js +36 -3
- package/apps/studio/client/hooks/use-canvas-bridge.jsx +2150 -0
- package/apps/studio/client/hooks/use-git-actions.jsx +236 -0
- package/apps/studio/client/hooks/use-keyboard-shortcuts.jsx +297 -0
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +474 -0
- package/apps/studio/client/hooks/use-photo-and-timeline.jsx +901 -0
- package/apps/studio/client/hooks/use-project-data.jsx +90 -0
- package/apps/studio/client/hooks/use-shell-core.jsx +1212 -0
- package/apps/studio/client/hooks/use-tabs.jsx +723 -0
- package/apps/studio/client/hooks/use-web-socket.jsx +13 -0
- package/apps/studio/client/inspector/artboard-knobs.jsx +456 -0
- package/apps/studio/client/inspector/color-picker.jsx +196 -0
- package/apps/studio/client/inspector/color.js +92 -0
- package/apps/studio/client/inspector/css-knobs.jsx +1720 -0
- package/apps/studio/client/inspector/css-vocab.jsx +131 -0
- package/apps/studio/client/inspector/ds-tokens.js +90 -0
- package/apps/studio/client/inspector/grid-tracks-editor.jsx +97 -0
- package/apps/studio/client/inspector/inspect-computed.jsx +68 -0
- package/apps/studio/client/inspector/inspector-panel.jsx +769 -0
- package/apps/studio/client/inspector/layers.jsx +322 -0
- package/apps/studio/client/inspector/selection.js +65 -0
- package/apps/studio/client/inspector/token-popover.jsx +301 -0
- package/apps/studio/client/menus/menubar.jsx +856 -0
- package/apps/studio/client/report-bug.jsx +8 -2
- package/apps/studio/client/selection-scope.js +40 -0
- package/apps/studio/client/shell/banners.jsx +272 -0
- package/apps/studio/client/shell/collapsed-rail.jsx +23 -0
- package/apps/studio/client/shell/comments-panel.jsx +177 -0
- package/apps/studio/client/shell/constants.js +60 -0
- package/apps/studio/client/shell/dock.jsx +131 -0
- package/apps/studio/client/shell/icons.jsx +370 -0
- package/apps/studio/client/shell/status-bar.jsx +215 -0
- package/apps/studio/client/shell/util.js +332 -0
- package/apps/studio/client/shell/viewport.jsx +254 -0
- package/apps/studio/client/system/system-view.jsx +255 -0
- package/apps/studio/client/tree/tree.jsx +1243 -0
- package/apps/studio/comments-overlay.tsx +6 -4
- package/apps/studio/config.schema.json +5 -0
- package/apps/studio/context.ts +20 -0
- package/apps/studio/dist/client.bundle.js +2728 -2728
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/embed-origins.ts +52 -0
- package/apps/studio/export-dialog.tsx +55 -3
- package/apps/studio/exporters/_browser-bundles.ts +21 -2
- package/apps/studio/exporters/format-scopes.ts +11 -3
- package/apps/studio/exporters/index.ts +17 -2
- package/apps/studio/exporters/jobs.ts +91 -23
- package/apps/studio/exporters/pdf.ts +10 -2
- package/apps/studio/exporters/png.ts +10 -2
- package/apps/studio/exporters/scope.ts +89 -15
- package/apps/studio/format.ts +296 -0
- package/apps/studio/generation/runtime-probe.ts +1 -1
- package/apps/studio/git/service.ts +1 -0
- package/apps/studio/http.ts +399 -36
- package/apps/studio/input-router.tsx +7 -1
- package/apps/studio/path-containment.ts +72 -0
- package/apps/studio/paths.ts +14 -1
- package/apps/studio/read-only-mode.ts +53 -0
- package/apps/studio/server.ts +123 -25
- package/apps/studio/sync/accepted-link.ts +6 -0
- package/apps/studio/sync/agent.ts +9 -1
- package/apps/studio/sync/cold-start-apply.ts +29 -4
- package/apps/studio/sync/cold-start.ts +78 -0
- package/apps/studio/sync/file-plane.ts +61 -1
- package/apps/studio/sync/format-sync.ts +160 -0
- package/apps/studio/sync/index.ts +208 -23
- package/apps/studio/sync/journal-client.ts +25 -5
- package/apps/studio/sync/migrate-seed.ts +8 -1
- package/apps/studio/sync/park.ts +39 -0
- package/apps/studio/sync/presentation.ts +9 -3
- package/apps/studio/sync/status.ts +2 -0
- package/apps/studio/sync/transaction-client.ts +130 -13
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/ui-prefs.ts +95 -10
- package/apps/studio/use-canvas-media-drop.tsx +8 -28
- package/apps/studio/whats-new.json +36 -0
- package/apps/studio/ws.ts +19 -4
- package/cli/bin/claude-design-server.mjs +0 -0
- package/cli/commands/design.mjs +9 -2
- package/cli/commands/hub-workspace.mjs +25 -0
- package/cli/lib/workspace-plan.mjs +51 -0
- package/package.json +11 -9
- package/plugins/design/templates/_shell.html +58 -0
|
@@ -177,6 +177,48 @@ export function validateWorkspaceConfig(raw = {}) {
|
|
|
177
177
|
cfg.canvasDomain = null;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
+
// DDR-247 — apps allowed to FRAME the studio for its read-only `?embed=1`
|
|
181
|
+
// view (orbit showing a design next to a task). A FRAMING list, never a
|
|
182
|
+
// writing one: the hub keeps it out of the canvas door's write allowlist,
|
|
183
|
+
// which is why it is not more MAUDE_EXTRA_SHELL_ORIGINS. Each entry is
|
|
184
|
+
// normalized to an origin; a wildcard or a non-https origin (other than a
|
|
185
|
+
// loopback dev app) is an error here rather than a silently dropped entry
|
|
186
|
+
// on the server.
|
|
187
|
+
cfg.embedOrigins = [];
|
|
188
|
+
const embedRaw = Array.isArray(raw.embedOrigins)
|
|
189
|
+
? raw.embedOrigins
|
|
190
|
+
: String(raw.embedOrigins ?? '').split(/[\s,]+/);
|
|
191
|
+
for (const entry of embedRaw.map((e) => String(e ?? '').trim()).filter(Boolean)) {
|
|
192
|
+
let url = null;
|
|
193
|
+
try {
|
|
194
|
+
url = new URL(entry);
|
|
195
|
+
} catch {
|
|
196
|
+
/* reported below */
|
|
197
|
+
}
|
|
198
|
+
if (
|
|
199
|
+
!url ||
|
|
200
|
+
entry.includes('*') ||
|
|
201
|
+
url.username ||
|
|
202
|
+
url.password ||
|
|
203
|
+
!/^https?:$/.test(url.protocol)
|
|
204
|
+
) {
|
|
205
|
+
errors.push(`embedOrigin "${entry}" is not an origin (https://app.example.com)`);
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
const loopback =
|
|
209
|
+
url.hostname === 'localhost' ||
|
|
210
|
+
url.hostname.endsWith('.localhost') ||
|
|
211
|
+
url.hostname === '127.0.0.1' ||
|
|
212
|
+
url.hostname === '[::1]';
|
|
213
|
+
if (url.protocol === 'http:' && !loopback) {
|
|
214
|
+
errors.push(
|
|
215
|
+
`embedOrigin "${entry}" must be https — only a loopback dev app may be plain http`
|
|
216
|
+
);
|
|
217
|
+
continue;
|
|
218
|
+
}
|
|
219
|
+
if (!cfg.embedOrigins.includes(url.origin)) cfg.embedOrigins.push(url.origin);
|
|
220
|
+
}
|
|
221
|
+
|
|
180
222
|
cfg.acmeEmail = String(raw.acmeEmail ?? '').trim();
|
|
181
223
|
if (!cfg.acmeEmail) {
|
|
182
224
|
if (!cfg.local) errors.push('acmeEmail is required (Let’s Encrypt expiry notices)');
|
|
@@ -429,6 +471,14 @@ export function envEntries(cfg, { hubSecret, adminPassword, renderSecret }) {
|
|
|
429
471
|
}
|
|
430
472
|
);
|
|
431
473
|
}
|
|
474
|
+
if (cfg.embedOrigins?.length) {
|
|
475
|
+
entries.push({
|
|
476
|
+
key: 'MAUDE_EMBED_ORIGINS',
|
|
477
|
+
value: cfg.embedOrigins.join(' '),
|
|
478
|
+
comment:
|
|
479
|
+
'apps that may FRAME the studio read-only (?embed=1) — framing only, never write access',
|
|
480
|
+
});
|
|
481
|
+
}
|
|
432
482
|
if (cfg.render) {
|
|
433
483
|
entries.push(
|
|
434
484
|
{
|
|
@@ -543,6 +593,7 @@ export function renderCompose(cfg) {
|
|
|
543
593
|
// S3 block above, same failure mode when they drift (M7: the origin was
|
|
544
594
|
// supported end to end and no deployment path ever set it).
|
|
545
595
|
...(cfg.canvasDomain ? ['MAUDE_PUBLIC_CANVAS_ORIGIN'] : []),
|
|
596
|
+
...(cfg.embedOrigins?.length ? ['MAUDE_EMBED_ORIGINS'] : []),
|
|
546
597
|
...(cfg.render ? ['MAUDE_RENDER_SECRET', 'MAUDE_RENDER_URL', 'MAUDE_RENDER_CANVAS_BASE'] : []),
|
|
547
598
|
];
|
|
548
599
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1agh/maude",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Marketplace of Claude Code plugins by Michal Dovrtěl: `design` (canvas-first design iteration) + `flow` (generic agentic workflow loop with .ai second brain). Ships the `maude` CLI (with `mdcc` legacy alias) to scaffold workspace, run the design dev server, and manage configs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"build:binary": "bun run apps/studio/build.ts --release",
|
|
32
32
|
"test": "node --test --test-reporter=spec cli/**/*.test.mjs && pnpm --filter @maude/hub test && pnpm run test:harness",
|
|
33
33
|
"test:harness": "node --test $(find scripts/dev/sync-e2e -maxdepth 1 -name 'surface-*.test.mjs' ! -name 'surface-source-audit.test.mjs') && bun test scripts/dev/sync-e2e/surface-source-audit.test.mjs",
|
|
34
|
-
"test:dev-server": "cd apps/studio && bun test --timeout 20000",
|
|
34
|
+
"test:dev-server": "cd apps/studio && bun test --isolate --timeout 20000",
|
|
35
35
|
"lint": "biome check .",
|
|
36
36
|
"format": "biome format --write .",
|
|
37
37
|
"changeset": "changeset",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"test:e2e:desktop:parity:cloud": "pnpm --filter @maude/desktop-e2e e2e:parity:cloud"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@1agh/maude-darwin-arm64": "1.
|
|
62
|
-
"@1agh/maude-darwin-x64": "1.
|
|
63
|
-
"@1agh/maude-linux-arm64": "1.
|
|
64
|
-
"@1agh/maude-linux-arm64-musl": "1.
|
|
65
|
-
"@1agh/maude-linux-x64": "1.
|
|
66
|
-
"@1agh/maude-linux-x64-musl": "1.
|
|
67
|
-
"@1agh/maude-win32-x64": "1.
|
|
61
|
+
"@1agh/maude-darwin-arm64": "1.9.0",
|
|
62
|
+
"@1agh/maude-darwin-x64": "1.9.0",
|
|
63
|
+
"@1agh/maude-linux-arm64": "1.9.0",
|
|
64
|
+
"@1agh/maude-linux-arm64-musl": "1.9.0",
|
|
65
|
+
"@1agh/maude-linux-x64": "1.9.0",
|
|
66
|
+
"@1agh/maude-linux-x64-musl": "1.9.0",
|
|
67
|
+
"@1agh/maude-win32-x64": "1.9.0"
|
|
68
68
|
},
|
|
69
69
|
"files": [
|
|
70
70
|
"cli",
|
|
@@ -87,6 +87,8 @@
|
|
|
87
87
|
"!apps/studio/**/*.test.*",
|
|
88
88
|
"!apps/studio/**/*.spec.*",
|
|
89
89
|
"!apps/studio/**/.DS_Store",
|
|
90
|
+
"!apps/studio/client/TESTIDS.md",
|
|
91
|
+
"!apps/studio/client/testids.json",
|
|
90
92
|
"plugins/design/dependencies.json",
|
|
91
93
|
"plugins/design/dependencies.schema.json",
|
|
92
94
|
"plugins/design/templates",
|
|
@@ -222,6 +222,48 @@
|
|
|
222
222
|
const abs = u.startsWith('/') ? base + u : u;
|
|
223
223
|
return cap ? abs + (abs.includes('?') ? '&' : '?') + 't=' + encodeURIComponent(cap) : abs;
|
|
224
224
|
};
|
|
225
|
+
// DDR-247 — THE AMBIENT COOKIE READS, IT NEVER WRITES. The hub's canvas
|
|
226
|
+
// door authorises a write (POST/PUT/PATCH/DELETE) or a live socket only
|
|
227
|
+
// from an EXPLICIT `?t=`, because the `maude_canvas` cookie is one per
|
|
228
|
+
// canvas origin: inside an embed another tab's full capability would ride
|
|
229
|
+
// it. So every same-origin write and socket this document's code opens
|
|
230
|
+
// carries the capability THIS frame was given — read live, so a re-minted
|
|
231
|
+
// one (`canvas-cap` below) applies at once. In an embed that capability is
|
|
232
|
+
// read-only and the door refuses the write, which is the point. Canvas
|
|
233
|
+
// code could always read `?t=` from its own URL; this exposes nothing new.
|
|
234
|
+
// Cloud only: a desktop canvas has no capability and nothing is wrapped.
|
|
235
|
+
if (cap) {
|
|
236
|
+
const withLiveCap = (u) => {
|
|
237
|
+
try {
|
|
238
|
+
const url = new URL(u, location.href);
|
|
239
|
+
if (url.host !== location.host) return null;
|
|
240
|
+
url.searchParams.set('t', cap);
|
|
241
|
+
return url.toString();
|
|
242
|
+
} catch {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
const nativeFetch = window.fetch.bind(window);
|
|
247
|
+
window.fetch = function (input, init) {
|
|
248
|
+
const isReq = typeof Request !== 'undefined' && input instanceof Request;
|
|
249
|
+
const method = String((init && init.method) || (isReq ? input.method : 'GET')).toUpperCase();
|
|
250
|
+
if (method !== 'GET' && method !== 'HEAD') {
|
|
251
|
+
const next = withLiveCap(isReq ? input.url : String(input));
|
|
252
|
+
if (next) input = isReq ? new Request(next, input) : next;
|
|
253
|
+
}
|
|
254
|
+
return nativeFetch(input, init);
|
|
255
|
+
};
|
|
256
|
+
const NativeWebSocket = window.WebSocket;
|
|
257
|
+
const CapWebSocket = function (url, protocols) {
|
|
258
|
+
const next = withLiveCap(String(url)) || url;
|
|
259
|
+
return protocols === undefined
|
|
260
|
+
? new NativeWebSocket(next)
|
|
261
|
+
: new NativeWebSocket(next, protocols);
|
|
262
|
+
};
|
|
263
|
+
CapWebSocket.prototype = NativeWebSocket.prototype;
|
|
264
|
+
Object.setPrototypeOf(CapWebSocket, NativeWebSocket);
|
|
265
|
+
window.WebSocket = CapWebSocket;
|
|
266
|
+
}
|
|
225
267
|
const canvasQuery = shaParam ? ('?sha=' + encodeURIComponent(shaParam)) : '';
|
|
226
268
|
let canvasUrl = canvasRel ? withCap('/' + designRel + '/' + canvasRel + canvasQuery) : null;
|
|
227
269
|
const myFileKey = canvasRel ? (designRel + '/' + canvasRel) : null;
|
|
@@ -333,6 +375,22 @@
|
|
|
333
375
|
if (params.get('hide-chrome') === '1') {
|
|
334
376
|
const styleEl = document.getElementById('canvas-hide-chrome');
|
|
335
377
|
if (styleEl) styleEl.media = 'all';
|
|
378
|
+
// Issue #125 — an export that opted into annotations paints the
|
|
379
|
+
// annotation scene back in (more specific + !important beats the
|
|
380
|
+
// block above). Comment pins + selection chrome stay hidden.
|
|
381
|
+
if (params.get('annotations') === '1') {
|
|
382
|
+
const show = document.createElement('style');
|
|
383
|
+
show.id = 'canvas-export-annotations';
|
|
384
|
+
// `.dc-annot-svg` also owns the <defs> the scene references (the
|
|
385
|
+
// sticky drop-shadow filter) — a filter inside a display:none SVG
|
|
386
|
+
// makes Chromium skip the filtered element entirely, so keep the
|
|
387
|
+
// SVG laid out and hide only its selection chrome.
|
|
388
|
+
show.textContent =
|
|
389
|
+
'.dc-world [data-mdcc-annotations] { display: block !important; }' +
|
|
390
|
+
'html .dc-annot-svg { display: block !important; }' +
|
|
391
|
+
'html .dc-annot-svg > :not(defs) { display: none !important; }';
|
|
392
|
+
document.head.appendChild(show);
|
|
393
|
+
}
|
|
336
394
|
}
|
|
337
395
|
// Shell-owned comment layer toggle. Gallery thumbnails pass `?comments=0`
|
|
338
396
|
// so the comment chrome is suppressed in previews; opened tabs omit it
|