@1agh/maude 0.53.1 → 0.54.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/api.ts +13 -7
- package/apps/studio/bin/screenshot.sh +173 -17
- package/apps/studio/build.ts +37 -3
- package/apps/studio/canvas-build-sandbox.ts +385 -0
- package/apps/studio/canvas-build-worker.ts +85 -0
- package/apps/studio/client/app.jsx +308 -21
- package/apps/studio/client/canvas-url.js +7 -0
- package/apps/studio/client/export-center.jsx +10 -2
- package/apps/studio/client/panels/SettingsPanel.jsx +37 -12
- package/apps/studio/client/report-bug.jsx +125 -30
- package/apps/studio/client/styles/4-components-maude.css +5 -0
- package/apps/studio/client/styles/4-components.css +75 -0
- package/apps/studio/cloud-build.ts +208 -0
- package/apps/studio/collab/room.ts +43 -7
- package/apps/studio/context.ts +12 -5
- package/apps/studio/dist/client.bundle.js +910 -910
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/git/repo-lock.ts +305 -0
- package/apps/studio/git/service.ts +171 -21
- package/apps/studio/http.ts +383 -31
- package/apps/studio/inspect.ts +66 -6
- package/apps/studio/paths.ts +8 -0
- package/apps/studio/server.ts +216 -53
- package/apps/studio/session-scope.ts +101 -0
- package/apps/studio/sync/autocommit.ts +84 -46
- package/apps/studio/sync/index.ts +20 -0
- package/apps/studio/test/canvas-build-sandbox.test.ts +69 -0
- package/apps/studio/test/canvas-origin-gate.test.ts +66 -0
- package/apps/studio/test/canvas-shell-base.test.ts +107 -0
- package/apps/studio/test/canvas-url.test.ts +26 -0
- package/apps/studio/test/cloud-build.test.ts +95 -0
- package/apps/studio/test/cloud-session-role.test.ts +131 -0
- package/apps/studio/test/cloud-shell-surfaces.test.ts +119 -0
- package/apps/studio/test/collab-readonly-gate.test.ts +194 -0
- package/apps/studio/test/config-projection.test.ts +104 -0
- package/apps/studio/test/git-system-engine.test.ts +135 -0
- package/apps/studio/test/read-only-gate.test.ts +58 -0
- package/apps/studio/test/repo-concurrency.test.ts +146 -0
- package/apps/studio/test/repo-lock.test.ts +350 -0
- package/apps/studio/test/server-lifecycle.test.ts +11 -1
- package/apps/studio/test/session-runtime-state.test.ts +226 -0
- package/apps/studio/test/session-scope.test.ts +100 -0
- package/apps/studio/test/shell-importmap.test.ts +8 -1
- package/apps/studio/test/sync-autocommit.test.ts +76 -0
- package/apps/studio/test/sync-hardening.test.ts +75 -0
- package/apps/studio/test/workspace-containment.test.ts +90 -11
- package/apps/studio/use-collab.tsx +21 -1
- package/apps/studio/whats-new.json +47 -2
- package/apps/studio/workspace-mode.ts +161 -28
- package/apps/studio/ws.ts +74 -8
- package/cli/commands/kg.mjs +49 -19
- package/cli/lib/gitignore-block.mjs +3 -0
- package/package.json +11 -9
- package/plugins/design/dependencies.json +1 -1
- package/plugins/design/templates/_shell.html +66 -32
- package/plugins/flow/.claude-plugin/config.schema.json +1 -1
- package/plugins/flow/dependencies.json +1 -1
|
@@ -133,30 +133,30 @@
|
|
|
133
133
|
<script type="importmap">
|
|
134
134
|
{
|
|
135
135
|
"imports": {
|
|
136
|
-
"react": "
|
|
137
|
-
"react-dom": "
|
|
138
|
-
"react-dom/client": "
|
|
139
|
-
"react/jsx-runtime": "
|
|
140
|
-
"react/jsx-dev-runtime": "
|
|
141
|
-
"pixi.js": "
|
|
142
|
-
"@imgly/background-removal": "
|
|
143
|
-
"motion": "
|
|
144
|
-
"motion/react": "
|
|
145
|
-
"yjs": "
|
|
146
|
-
"y-protocols/sync": "
|
|
147
|
-
"y-protocols/awareness": "
|
|
148
|
-
"lib0/decoding": "
|
|
149
|
-
"lib0/encoding": "
|
|
150
|
-
"remotion": "
|
|
151
|
-
"@remotion/media": "
|
|
152
|
-
"@remotion/player": "
|
|
153
|
-
"@remotion/transitions": "
|
|
154
|
-
"@remotion/transitions/fade": "
|
|
155
|
-
"@remotion/transitions/slide": "
|
|
156
|
-
"@remotion/transitions/wipe": "
|
|
157
|
-
"@remotion/transitions/flip": "
|
|
158
|
-
"@remotion/transitions/clock-wipe": "
|
|
159
|
-
"@remotion/transitions/none": "
|
|
136
|
+
"react": "./_canvas-runtime/react.js",
|
|
137
|
+
"react-dom": "./_canvas-runtime/react-dom.js",
|
|
138
|
+
"react-dom/client": "./_canvas-runtime/react-dom_client.js",
|
|
139
|
+
"react/jsx-runtime": "./_canvas-runtime/react_jsx-runtime.js",
|
|
140
|
+
"react/jsx-dev-runtime": "./_canvas-runtime/react_jsx-dev-runtime.js",
|
|
141
|
+
"pixi.js": "./_canvas-runtime/pixi-js.js",
|
|
142
|
+
"@imgly/background-removal": "./_canvas-runtime/@imgly_background-removal.js",
|
|
143
|
+
"motion": "./_canvas-runtime/motion.js",
|
|
144
|
+
"motion/react": "./_canvas-runtime/motion_react.js",
|
|
145
|
+
"yjs": "./_canvas-runtime/yjs.js",
|
|
146
|
+
"y-protocols/sync": "./_canvas-runtime/y-protocols_sync.js",
|
|
147
|
+
"y-protocols/awareness": "./_canvas-runtime/y-protocols_awareness.js",
|
|
148
|
+
"lib0/decoding": "./_canvas-runtime/lib0_decoding.js",
|
|
149
|
+
"lib0/encoding": "./_canvas-runtime/lib0_encoding.js",
|
|
150
|
+
"remotion": "./_canvas-runtime/remotion.js",
|
|
151
|
+
"@remotion/media": "./_canvas-runtime/@remotion_media.js",
|
|
152
|
+
"@remotion/player": "./_canvas-runtime/@remotion_player.js",
|
|
153
|
+
"@remotion/transitions": "./_canvas-runtime/@remotion_transitions.js",
|
|
154
|
+
"@remotion/transitions/fade": "./_canvas-runtime/@remotion_transitions_fade.js",
|
|
155
|
+
"@remotion/transitions/slide": "./_canvas-runtime/@remotion_transitions_slide.js",
|
|
156
|
+
"@remotion/transitions/wipe": "./_canvas-runtime/@remotion_transitions_wipe.js",
|
|
157
|
+
"@remotion/transitions/flip": "./_canvas-runtime/@remotion_transitions_flip.js",
|
|
158
|
+
"@remotion/transitions/clock-wipe": "./_canvas-runtime/@remotion_transitions_clock-wipe.js",
|
|
159
|
+
"@remotion/transitions/none": "./_canvas-runtime/@remotion_transitions_none.js"
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
</script>
|
|
@@ -190,8 +190,38 @@
|
|
|
190
190
|
// `git show <sha>:<path>`). Baked into the module URL so both the initial
|
|
191
191
|
// import and the HMR soft-reload carry it.
|
|
192
192
|
const shaParam = params.get('sha');
|
|
193
|
+
// Cloud Phase 27 (DDR-209) — THE CAPABILITY TRAVELS WITH EVERY REQUEST.
|
|
194
|
+
//
|
|
195
|
+
// On a desktop the canvas origin is loopback and needs none, so `cap` is
|
|
196
|
+
// empty and every URL below is byte-identical to what it has always been.
|
|
197
|
+
//
|
|
198
|
+
// In the cloud the canvas origin is a cookieless hostname on the public
|
|
199
|
+
// internet: a cookie able to reach it would be readable by the canvas
|
|
200
|
+
// content itself, which is exactly what the DDR-054 split exists to
|
|
201
|
+
// prevent. So the capability rides in the URL — and it has to ride in
|
|
202
|
+
// EVERY url, not just this document's, because the shell then fetches its
|
|
203
|
+
// module, its tokens, its components CSS and its meta as separate
|
|
204
|
+
// requests. Getting the document through and nothing else is what
|
|
205
|
+
// "refused to connect" looks like from the outside.
|
|
206
|
+
const cap = params.get('t') || '';
|
|
207
|
+
// THE BASE THIS DOCUMENT WAS SERVED FROM, not the origin root.
|
|
208
|
+
//
|
|
209
|
+
// The fleet's canvas origin puts the project in the PATH
|
|
210
|
+
// (`canvas.<zone>/<project>/…`), so an absolute `/…` URL built here
|
|
211
|
+
// resolves against the origin and loses the project — the browser then
|
|
212
|
+
// asks for `canvas.<zone>/.design/…`, the data plane reads `.design` as a
|
|
213
|
+
// project name, and every dynamic import fails. Derived from where this
|
|
214
|
+
// document actually is rather than passed in, so it is right by
|
|
215
|
+
// construction in all three shells: on a desktop the shell is served at
|
|
216
|
+
// `/_canvas-shell.html` and the base is empty, leaving every URL below
|
|
217
|
+
// byte-identical to what it has always been.
|
|
218
|
+
const base = location.pathname.replace(/\/_canvas-shell(\.html)?$/, '');
|
|
219
|
+
const withCap = (u) => {
|
|
220
|
+
const abs = u.startsWith('/') ? base + u : u;
|
|
221
|
+
return cap ? abs + (abs.includes('?') ? '&' : '?') + 't=' + encodeURIComponent(cap) : abs;
|
|
222
|
+
};
|
|
193
223
|
const canvasQuery = shaParam ? ('?sha=' + encodeURIComponent(shaParam)) : '';
|
|
194
|
-
const canvasUrl = canvasRel ? ('/' + designRel + '/' + canvasRel + canvasQuery) : null;
|
|
224
|
+
const canvasUrl = canvasRel ? withCap('/' + designRel + '/' + canvasRel + canvasQuery) : null;
|
|
195
225
|
const myFileKey = canvasRel ? (designRel + '/' + canvasRel) : null;
|
|
196
226
|
// True while an `ai-activity` entry is live for THIS canvas (an agent is
|
|
197
227
|
// running /design:edit|new on it). Mirrors ai-banner's gate: parent relays
|
|
@@ -274,7 +304,11 @@
|
|
|
274
304
|
// The WS connection retries on close (dev-server restart resilience).
|
|
275
305
|
function connectHmr() {
|
|
276
306
|
const proto = location.protocol === 'https:' ? 'wss' : 'ws';
|
|
277
|
-
|
|
307
|
+
// `base` for the same reason every other URL here carries it: on the
|
|
308
|
+
// fleet's canvas origin the project is in the path. (A cell's HMR socket
|
|
309
|
+
// is a separate matter — it has no cookie to authenticate with, so it
|
|
310
|
+
// simply does not connect there; a canvas still renders.)
|
|
311
|
+
const ws = new WebSocket(proto + '://' + location.host + base + '/_ws');
|
|
278
312
|
ws.addEventListener('message', (ev) => {
|
|
279
313
|
try {
|
|
280
314
|
const msg = JSON.parse(ev.data);
|
|
@@ -417,7 +451,7 @@
|
|
|
417
451
|
// listens for `maude:meta-refreshed` and re-applies layout +
|
|
418
452
|
// viewport in-place (no full reload — preserves tool / undo state).
|
|
419
453
|
const metaFileParam = encodeURIComponent(designRel + '/' + canvasRel);
|
|
420
|
-
fetch('/_api/canvas-meta?file=' + metaFileParam, {
|
|
454
|
+
fetch(withCap('/_api/canvas-meta?file=' + metaFileParam), {
|
|
421
455
|
headers: { 'Cache-Control': 'no-store' },
|
|
422
456
|
})
|
|
423
457
|
.then((r) => (r.ok ? r.json() : null))
|
|
@@ -444,13 +478,13 @@
|
|
|
444
478
|
if (!canvasRel) {
|
|
445
479
|
showError('Missing ?canvas= query parameter. Add ?canvas=ui/<slug>.tsx.');
|
|
446
480
|
} else {
|
|
447
|
-
if (tokensRel) document.getElementById('canvas-tokens').href = '/' + designRel + '/' + tokensRel;
|
|
448
|
-
if (componentsRel) document.getElementById('canvas-components').href = '/' + designRel + '/' + componentsRel;
|
|
481
|
+
if (tokensRel) document.getElementById('canvas-tokens').href = withCap('/' + designRel + '/' + tokensRel);
|
|
482
|
+
if (componentsRel) document.getElementById('canvas-components').href = withCap('/' + designRel + '/' + componentsRel);
|
|
449
483
|
if (layoutRel) {
|
|
450
484
|
// Inject a third <link> for the DS layout chrome (specimens load this).
|
|
451
485
|
const layoutLink = document.createElement('link');
|
|
452
486
|
layoutLink.rel = 'stylesheet';
|
|
453
|
-
layoutLink.href = '/' + designRel + '/' + layoutRel;
|
|
487
|
+
layoutLink.href = withCap('/' + designRel + '/' + layoutRel);
|
|
454
488
|
layoutLink.dataset.canvasCss = 'layout';
|
|
455
489
|
document.head.appendChild(layoutLink);
|
|
456
490
|
}
|
|
@@ -466,7 +500,7 @@
|
|
|
466
500
|
// server-side api.fileSlug (which trims paths.designRel).
|
|
467
501
|
window.__canvas_design_rel__ = designRel;
|
|
468
502
|
window.__canvas_rel__ = canvasRel;
|
|
469
|
-
const metaFetch = fetch('/_api/canvas-meta?file=' + metaFileParam, {
|
|
503
|
+
const metaFetch = fetch(withCap('/_api/canvas-meta?file=' + metaFileParam), {
|
|
470
504
|
headers: { 'Cache-Control': 'no-store' },
|
|
471
505
|
})
|
|
472
506
|
.then((r) => (r.ok ? r.json() : null))
|
|
@@ -484,7 +518,7 @@
|
|
|
484
518
|
// the importmap so the canvas module and the comment layer share one
|
|
485
519
|
// React singleton (inlining a second React would break hooks).
|
|
486
520
|
const [{ mountCanvas }, mod] = await Promise.all([
|
|
487
|
-
import('/_client/comment-mount.js'),
|
|
521
|
+
import(withCap('/_client/comment-mount.js')),
|
|
488
522
|
import(canvasUrl),
|
|
489
523
|
metaFetch,
|
|
490
524
|
]);
|
|
@@ -324,7 +324,7 @@
|
|
|
324
324
|
},
|
|
325
325
|
"engineVersion": {
|
|
326
326
|
"type": "string",
|
|
327
|
-
"default": "
|
|
327
|
+
"default": "v1.0.0",
|
|
328
328
|
"description": "PINNED kgai release the CLI + desktop bundle target. Advance deliberately (harness-verified via `maude kg check-upstream`), never float — auto-tracking `latest` would let an upstream change silently alter behavior mid-rollout and is a supply-chain surface (DDR-054/056 reasoning: the bundled `kg` is third-party)."
|
|
329
329
|
},
|
|
330
330
|
"store": {
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
},
|
|
106
106
|
"install": {
|
|
107
107
|
"preferred": "See docs/kgai-onboarding.md — download the pinned kgai release binary (kgai is capability-gated + opt-out; nothing to install to use classic .ai/ mode)",
|
|
108
|
-
"darwin": "curl -fsSL https://github.com/kgaidev/kgai/releases/download/
|
|
108
|
+
"darwin": "curl -fsSL https://github.com/kgaidev/kgai/releases/download/v1.0.0/kg-darwin-arm64 -o /usr/local/bin/kg && chmod +x /usr/local/bin/kg"
|
|
109
109
|
},
|
|
110
110
|
"autoInstall": false,
|
|
111
111
|
"fallbackBehavior": "flow/design fall back to the classic .ai/decisions/ + STATE.md file path (no regression). The kgai knowledge-graph backend (kg context/ingest/sync, cross-repo company memory) is inactive.",
|