@1agh/maude 2.0.3 → 2.0.6
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/README.md +6 -5
- package/apps/hub/src/project-transactions/kernel.mjs +10 -1
- package/apps/studio/access/filters.ts +12 -5
- package/apps/studio/access/known-canvases.ts +24 -1
- package/apps/studio/access/refused-inputs.ts +89 -0
- package/apps/studio/access/request.ts +0 -1
- package/apps/studio/acp/adapter-stderr.ts +43 -13
- package/apps/studio/acp/background-tasks.ts +155 -0
- package/apps/studio/acp/bridge.ts +44 -5
- package/apps/studio/acp/connected-fact.ts +15 -4
- package/apps/studio/acp/index.ts +14 -5
- package/apps/studio/actions/agents.ts +10 -0
- package/apps/studio/actions/defs/app.ts +12 -0
- package/apps/studio/actions/defs/view.ts +12 -0
- package/apps/studio/actions.manifest.json +25 -1
- package/apps/studio/actions.parity.json +13 -1
- package/apps/studio/annotations/ui/element-node.tsx +139 -54
- package/apps/studio/annotations/ui/lod.tsx +1 -1
- package/apps/studio/annotations/ui/text-style.ts +1 -1
- package/apps/studio/annotations-layer.tsx +0 -12
- package/apps/studio/api.ts +73 -24
- package/apps/studio/artboard-live-gate.tsx +267 -0
- package/apps/studio/artboard-live.ts +336 -0
- package/apps/studio/artboard-webgl.ts +668 -0
- package/apps/studio/bin/_agent-browser-bin.mjs +8 -0
- package/apps/studio/bin/_agent-browser-safe.mjs +2 -1
- package/apps/studio/bin/_canvas-reasons.mjs +34 -0
- package/apps/studio/bin/_ds-check-live.mjs +37 -0
- package/apps/studio/bin/_ds-check.mjs +4 -1
- package/apps/studio/bin/_ds-prove-judge.mjs +167 -0
- package/apps/studio/bin/_ds-prove-playwright.mjs +183 -105
- package/apps/studio/bin/_import-asset.mjs +2 -1
- package/apps/studio/bin/_perf-probe.mjs +2 -1
- package/apps/studio/bin/_png-playwright.mjs +10 -1
- package/apps/studio/bin/_pw-launch.mjs +14 -0
- package/apps/studio/bin/_studio-verb.mjs +24 -3
- package/apps/studio/bin/_thumb-blank.mjs +70 -0
- package/apps/studio/bin/_thumb-cover.mjs +35 -0
- package/apps/studio/bin/_thumbs-playwright.mjs +93 -13
- package/apps/studio/bin/ds-check.sh +5 -1
- package/apps/studio/bin/perf.sh +11 -1
- package/apps/studio/bin/server-up.sh +7 -2
- package/apps/studio/bin/smoke.sh +19 -0
- package/apps/studio/boot-progress.ts +31 -0
- package/apps/studio/canvas-build-sandbox.ts +275 -42
- package/apps/studio/canvas-build-worker.ts +10 -0
- package/apps/studio/canvas-create.ts +24 -0
- package/apps/studio/canvas-lib.tsx +131 -12
- package/apps/studio/canvas-module-cache.ts +93 -0
- package/apps/studio/canvas-source/errors.ts +39 -0
- package/apps/studio/canvas-source/waiting.ts +290 -0
- package/apps/studio/client/actions/shell-key-handlers.js +5 -0
- package/apps/studio/client/app.jsx +19 -9
- package/apps/studio/client/canvas-url.js +13 -0
- package/apps/studio/client/github.js +23 -3
- package/apps/studio/client/home/HomeAccounts.jsx +262 -0
- package/apps/studio/client/home/Shelves.jsx +4 -3
- package/apps/studio/client/home/home-accounts-model.js +121 -0
- package/apps/studio/client/home/home-api.js +36 -19
- package/apps/studio/client/home/home-app.jsx +141 -40
- package/apps/studio/client/home/home-model.js +172 -6
- package/apps/studio/client/home/home.css +169 -5
- package/apps/studio/client/home/shell-mode.js +8 -1
- package/apps/studio/client/hooks/use-git-actions.jsx +2 -1
- package/apps/studio/client/hooks/use-project-data.jsx +2 -0
- package/apps/studio/client/hooks/use-shell-core.jsx +3 -0
- package/apps/studio/client/hooks/use-tabs.jsx +64 -35
- package/apps/studio/client/index-loader.ts +23 -3
- package/apps/studio/client/panels/ChatPanel.jsx +49 -57
- package/apps/studio/client/panels/CreateProject.jsx +19 -5
- package/apps/studio/client/panels/DiffView.jsx +314 -248
- package/apps/studio/client/panels/TeamProjects.jsx +119 -69
- package/apps/studio/client/panels/acp-runtime.js +25 -0
- package/apps/studio/client/panels/caps-cache.js +46 -0
- package/apps/studio/client/panels/chat-finish.js +66 -0
- package/apps/studio/client/shell/frame-cap.js +53 -0
- package/apps/studio/client/shell/viewport.jsx +45 -8
- package/apps/studio/client/styles/_index.css +2 -0
- package/apps/studio/client/tree/tree.jsx +48 -21
- package/apps/studio/client/v2/access/access-client.js +2 -0
- package/apps/studio/client/v2/access/access-host.jsx +12 -1
- package/apps/studio/client/v2/access/trashed-banner.jsx +6 -3
- package/apps/studio/client/v2/ai/Advanced.jsx +12 -0
- package/apps/studio/client/v2/ai/BackgroundStrip.jsx +120 -0
- package/apps/studio/client/v2/ai/Composer.jsx +27 -10
- package/apps/studio/client/v2/ai/StoppedDivider.jsx +2 -1
- package/apps/studio/client/v2/ai/ai-run.css +87 -3
- package/apps/studio/client/v2/ai/background-model.js +113 -0
- package/apps/studio/client/v2/ai/needs-you-store.js +2 -1
- package/apps/studio/client/v2/ai/run-api.js +7 -3
- package/apps/studio/client/v2/ai/runs-store.js +2 -1
- package/apps/studio/client/v2/annotations/vote-store.js +11 -5
- package/apps/studio/client/v2/assets/asset-state-lane.js +6 -3
- package/apps/studio/client/v2/assets/assets-bus.js +10 -8
- package/apps/studio/client/v2/assets/browse-view.jsx +2 -0
- package/apps/studio/client/v2/assets/ds-library-view.jsx +47 -0
- package/apps/studio/client/v2/assets/spotlight-model.js +75 -0
- package/apps/studio/client/v2/assets/spotlight.css +153 -0
- package/apps/studio/client/v2/assets/spotlight.jsx +199 -0
- package/apps/studio/client/v2/assets/tile-menu.jsx +3 -1
- package/apps/studio/client/v2/assets/tile.jsx +3 -0
- package/apps/studio/client/v2/assets/use-assets.js +2 -1
- package/apps/studio/client/v2/canvases/canvases-panel.jsx +13 -2
- package/apps/studio/client/v2/canvases/covers.js +11 -5
- package/apps/studio/client/v2/canvases/folder-ask.js +139 -0
- package/apps/studio/client/v2/canvases/folder-dialogs.jsx +150 -0
- package/apps/studio/client/v2/canvases/trash-canvas.js +10 -2
- package/apps/studio/client/v2/canvases/trash-queue.js +152 -0
- package/apps/studio/client/v2/canvases/use-canvas-index.js +42 -18
- package/apps/studio/client/v2/canvases/use-pins.js +2 -1
- package/apps/studio/client/v2/code/canvas-error-card.jsx +70 -5
- package/apps/studio/client/v2/code/canvas-imports-card.jsx +15 -14
- package/apps/studio/client/v2/code/canvas-imports-words.js +44 -0
- package/apps/studio/client/v2/code/canvas-waiting-card.jsx +128 -0
- package/apps/studio/client/v2/code/canvas-waiting.js +164 -0
- package/apps/studio/client/v2/code/code-bus.js +5 -0
- package/apps/studio/client/v2/code/code.css +67 -0
- package/apps/studio/client/v2/code/use-canvas-source.js +19 -4
- package/apps/studio/client/v2/create/NameDialog.jsx +4 -2
- package/apps/studio/client/v2/create/name-dialog.css +10 -0
- package/apps/studio/client/v2/ds/advanced-host.jsx +11 -23
- package/apps/studio/client/v2/ds/ds-refresh.js +161 -0
- package/apps/studio/client/v2/ds/library-host.jsx +45 -45
- package/apps/studio/client/v2/ds/make-host.jsx +13 -12
- package/apps/studio/client/v2/ds/off-system-host.jsx +18 -16
- package/apps/studio/client/v2/ds/review-host.jsx +7 -1
- package/apps/studio/client/v2/ds/truth-host.jsx +15 -14
- package/apps/studio/client/v2/ds/upgrade-host.jsx +26 -10
- package/apps/studio/client/v2/empty/arriving.jsx +29 -12
- package/apps/studio/client/v2/empty/empty-host.jsx +8 -2
- package/apps/studio/client/v2/empty/not-local.jsx +31 -1
- package/apps/studio/client/v2/empty/use-empty-canvas.js +10 -1
- package/apps/studio/client/v2/export/last-finished.js +2 -1
- package/apps/studio/client/v2/history/branch-actions.js +13 -9
- package/apps/studio/client/v2/history/git-advanced.jsx +8 -1
- package/apps/studio/client/v2/history/git-model.js +21 -5
- package/apps/studio/client/v2/history/git-parts.jsx +76 -43
- package/apps/studio/client/v2/history/history.css +6 -0
- package/apps/studio/client/v2/left-panel/assets-panel.jsx +87 -10
- package/apps/studio/client/v2/left-panel/use-trash.js +2 -1
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +100 -33
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +51 -83
- package/apps/studio/client/v2/onboarding/onboarding-model.js +10 -6
- package/apps/studio/client/v2/presence/faces.jsx +42 -14
- package/apps/studio/client/v2/present/order-notes-artboards.js +2 -1
- package/apps/studio/client/v2/search/search-recent.js +3 -1
- package/apps/studio/client/v2/search/search-remote.js +6 -4
- package/apps/studio/client/v2/settings/connections-model.js +1 -1
- package/apps/studio/client/v2/shell/account-card.jsx +10 -4
- package/apps/studio/client/v2/shell/canvas-crash-guard.js +137 -0
- package/apps/studio/client/v2/shell/github-signin-host.jsx +42 -0
- package/apps/studio/client/v2/shell/menu-runner.js +12 -0
- package/apps/studio/client/v2/shell/occlusion-insets.js +14 -2
- package/apps/studio/client/v2/shell/project-account-card.jsx +203 -0
- package/apps/studio/client/v2/shell/project-account-model.js +182 -0
- package/apps/studio/client/v2/shell/recovery-store.js +2 -1
- package/apps/studio/client/v2/shell/served-routes.js +120 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +139 -11
- package/apps/studio/client/v2/shell/share-cluster.css +58 -0
- package/apps/studio/client/v2/shell/share-cluster.jsx +26 -7
- package/apps/studio/client/v2/shell/shell-activity.js +19 -0
- package/apps/studio/client/v2/shell/team-switch.js +94 -0
- package/apps/studio/client/v2/shell/too-heavy-card.jsx +38 -0
- package/apps/studio/client/v2/shell/use-account.js +8 -1
- package/apps/studio/client/v2/shell/use-occluded-insets.js +3 -0
- package/apps/studio/client/v2/sync-states/conflict-card.jsx +7 -2
- package/apps/studio/client/v2/undo/use-undo-projection.jsx +3 -1
- package/apps/studio/cloud/endpoints.ts +23 -1
- package/apps/studio/collab/persistence.ts +9 -1
- package/apps/studio/collab/registry.ts +32 -0
- package/apps/studio/collab/room.ts +8 -0
- package/apps/studio/config-reload-wire.ts +53 -0
- package/apps/studio/dist/client.bundle.js +1098 -1102
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/ds/board/specimen.tsx +12 -1
- package/apps/studio/ds/canvas-cli.ts +58 -2
- package/apps/studio/ds/check.ts +26 -1
- package/apps/studio/ds/cli.ts +7 -3
- package/apps/studio/ds/convert.ts +34 -6
- package/apps/studio/ds/ds-verb.ts +13 -0
- package/apps/studio/ds/post-build.ts +38 -0
- package/apps/studio/ds/upgrade-apply.ts +27 -5
- package/apps/studio/ds/upgrade-cli.ts +22 -2
- package/apps/studio/ds/upgrade-prove.ts +198 -15
- package/apps/studio/ds/upgrade-stage.ts +4 -1
- package/apps/studio/editing/minimap-context.tsx +3 -3
- package/apps/studio/editing/page-activity.ts +251 -0
- package/apps/studio/editing/rotate-handle.tsx +9 -5
- package/apps/studio/editing/sticky-name.tsx +4 -4
- package/apps/studio/history/restore-artboard-action.ts +40 -0
- package/apps/studio/history/trash.ts +6 -0
- package/apps/studio/home/accounts.ts +87 -0
- package/apps/studio/home/hub.ts +77 -175
- package/apps/studio/home/index-reader.ts +24 -2
- package/apps/studio/home/routes.ts +66 -8
- package/apps/studio/http.ts +131 -68
- package/apps/studio/index-flight.ts +40 -0
- package/apps/studio/managed-projects.ts +52 -24
- package/apps/studio/migrate/hub.ts +7 -1
- package/apps/studio/routes/canvas-source.ts +44 -2
- package/apps/studio/routes/ds-convert.ts +18 -0
- package/apps/studio/routes/history.ts +28 -5
- package/apps/studio/routes/hub-signin.ts +115 -0
- package/apps/studio/routes/index.ts +4 -0
- package/apps/studio/routes/table.ts +7 -0
- package/apps/studio/routes/trash.ts +19 -1
- package/apps/studio/server.ts +19 -10
- package/apps/studio/sync/accepted-cold-start.ts +54 -16
- package/apps/studio/sync/accepted-link.ts +9 -4
- package/apps/studio/sync/asset-push.ts +146 -23
- package/apps/studio/sync/asset-state.ts +3 -2
- package/apps/studio/sync/code-module-consent.ts +74 -0
- package/apps/studio/sync/file-ledger.ts +35 -0
- package/apps/studio/sync/file-membership.ts +28 -3
- package/apps/studio/sync/file-plane.ts +483 -86
- package/apps/studio/sync/file-pull.ts +304 -33
- package/apps/studio/sync/hub-browser-signin.ts +377 -0
- package/apps/studio/sync/hub-link.ts +1 -2
- package/apps/studio/sync/hub-text-undo.ts +30 -10
- package/apps/studio/sync/index.ts +381 -161
- package/apps/studio/sync/journal-client.ts +94 -5
- package/apps/studio/sync/pending-deletes.ts +100 -0
- package/apps/studio/sync/projection.ts +121 -14
- package/apps/studio/sync/pull-pacer.ts +160 -0
- package/apps/studio/sync/pull-priority.ts +119 -0
- package/apps/studio/sync/seed-progress.ts +58 -3
- package/apps/studio/sync/status.ts +3 -1
- package/apps/studio/sync/transaction-client.ts +71 -6
- package/apps/studio/sync/workspace-signin.ts +6 -256
- package/apps/studio/sync/writer-registry.ts +5 -1
- package/apps/studio/thumbs/service.ts +12 -2
- package/apps/studio/thumbs/validate.ts +7 -0
- package/apps/studio/ui-prefs-migrate.ts +4 -0
- package/apps/studio/video-comp.tsx +23 -0
- package/apps/studio/video-links-overlay.tsx +3 -2
- package/apps/studio/whats-new.json +126 -0
- package/cli/lib/bash-guard.mjs +13 -1
- package/cli/lib/design-help.gen.mjs +1 -1
- package/cli/lib/design-hook.mjs +20 -0
- package/cli/lib/studio-locate.mjs +35 -10
- package/cli/lib/workspace-plan.mjs +14 -0
- package/package.json +8 -8
|
@@ -145,6 +145,17 @@ export interface Registry {
|
|
|
145
145
|
* under the new slug via `get()`. No-op if no room is live for the slug.
|
|
146
146
|
*/
|
|
147
147
|
forceDrop(slug: string): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* fix/205 — throw away the room of a canvas that LEFT the project (deleted
|
|
150
|
+
* here, deleted in the project, moved away): no flush, and with
|
|
151
|
+
* `forgetCache` its `.ydoc.bin` goes too (`RoomCallbacks.forget`). Its Y.Doc is the deleted canvas's
|
|
152
|
+
* whole lineage; a canvas re-created at the same slug must start from a
|
|
153
|
+
* fresh doc, or the hub's new body merges onto the old one and the body
|
|
154
|
+
* doubles. Only an unpinned room with no browser connection is discarded —
|
|
155
|
+
* a connected browser's room is left to the last-browser-leaves `drop`.
|
|
156
|
+
* Returns whether a room was discarded.
|
|
157
|
+
*/
|
|
158
|
+
discard(slug: string, opts?: { forgetCache?: boolean }): Promise<boolean>;
|
|
148
159
|
/** Test/introspection. */
|
|
149
160
|
size(): number;
|
|
150
161
|
}
|
|
@@ -344,6 +355,26 @@ export function createRegistry(callbacks: RoomCallbacks): Registry {
|
|
|
344
355
|
await room.destroy();
|
|
345
356
|
}
|
|
346
357
|
|
|
358
|
+
async function discard(slug: string, opts: { forgetCache?: boolean } = {}): Promise<boolean> {
|
|
359
|
+
if (pinned.has(slug)) return false;
|
|
360
|
+
const room = rooms.get(slug);
|
|
361
|
+
if (room && room.size() > 0) return false;
|
|
362
|
+
if (opts.forgetCache) {
|
|
363
|
+
try {
|
|
364
|
+
await callbacks.forget?.(slug);
|
|
365
|
+
} catch (err) {
|
|
366
|
+
console.warn(`[collab/${slug}] could not drop the cached document:`, err);
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
if (!room) return false;
|
|
370
|
+
teardownBridge(slug);
|
|
371
|
+
rooms.delete(slug);
|
|
372
|
+
// destroy() marks the room destroyed BEFORE its final flush, so nothing of
|
|
373
|
+
// the deleted canvas is written back (comments, annotations, the cache).
|
|
374
|
+
await room.destroy();
|
|
375
|
+
return true;
|
|
376
|
+
}
|
|
377
|
+
|
|
347
378
|
async function destroyAll(): Promise<void> {
|
|
348
379
|
for (const slug of Array.from(bridges.keys())) teardownBridge(slug);
|
|
349
380
|
hubAwareness.clear();
|
|
@@ -375,6 +406,7 @@ export function createRegistry(callbacks: RoomCallbacks): Registry {
|
|
|
375
406
|
destroyAll,
|
|
376
407
|
drop,
|
|
377
408
|
forceDrop,
|
|
409
|
+
discard,
|
|
378
410
|
size: () => rooms.size,
|
|
379
411
|
};
|
|
380
412
|
}
|
|
@@ -130,6 +130,14 @@ export interface RoomCallbacks {
|
|
|
130
130
|
*/
|
|
131
131
|
seed(slug: string, doc: Y.Doc): Promise<void> | void;
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* fix/205 — the canvas left the project: drop whatever persistence caches
|
|
135
|
+
* for its doc (the `.ydoc.bin`), so a room re-created for the same slug can
|
|
136
|
+
* never seed from the deleted canvas's lineage. Optional; absent = nothing
|
|
137
|
+
* cached outside the room.
|
|
138
|
+
*/
|
|
139
|
+
forget?(slug: string): Promise<void> | void;
|
|
140
|
+
|
|
133
141
|
/**
|
|
134
142
|
* Accepted revisions (DDR-241 §7): while true, this room's document is a
|
|
135
143
|
* replica of the project's accepted state — no browser connection may write
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Config hot-reload wiring — `/design:setup-ds` (or a hand edit) rewrites
|
|
2
|
+
// `.design/config.json` mid-session; without a re-read the server keeps
|
|
3
|
+
// serving the boot snapshot and a newly added canvas group (`system`) never
|
|
4
|
+
// reaches /_index-data. On change: swap ctx.cfg in place (reloadConfig) and
|
|
5
|
+
// let the caller react (canvas-list refresh, `config-updated` to shells).
|
|
6
|
+
// RCA: .ai/logs/rca/issue-ds-scaffold-files-not-in-filetree-stale-config.md
|
|
7
|
+
//
|
|
8
|
+
// 2.0.5 (#205): a cell's studio child has no file watcher, so it never sees
|
|
9
|
+
// `fs:json`; the hub's journal heal announces a peer's write as `fs:any`
|
|
10
|
+
// only (sync/cell-file-events.ts). Listening on `fs:json` alone left a cell
|
|
11
|
+
// judging design-system boards with the config it booted with. Both events
|
|
12
|
+
// share ONE debounce, so a watcher's `fs:json` + `fs:any` pair (or a watcher
|
|
13
|
+
// event plus a heal event) for the same write reloads once.
|
|
14
|
+
|
|
15
|
+
import { type Context, reloadConfig } from './context.ts';
|
|
16
|
+
|
|
17
|
+
export const CONFIG_RELOAD_DEBOUNCE_MS = 150;
|
|
18
|
+
|
|
19
|
+
export interface ConfigReloadWire {
|
|
20
|
+
/** Drop a pending reload and stop listening. */
|
|
21
|
+
stop(): void;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function isConfigJson(rel: unknown): boolean {
|
|
25
|
+
return typeof rel === 'string' && rel.replace(/\\/g, '/').replace(/^\/+/, '') === 'config.json';
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function wireConfigReload(
|
|
29
|
+
ctx: Context,
|
|
30
|
+
opts: { onReloaded?: () => void; debounceMs?: number } = {}
|
|
31
|
+
): ConfigReloadWire {
|
|
32
|
+
const debounceMs = opts.debounceMs ?? CONFIG_RELOAD_DEBOUNCE_MS;
|
|
33
|
+
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
34
|
+
const onEvent = (rel: unknown) => {
|
|
35
|
+
if (!isConfigJson(rel)) return;
|
|
36
|
+
if (timer) clearTimeout(timer);
|
|
37
|
+
timer = setTimeout(() => {
|
|
38
|
+
timer = null;
|
|
39
|
+
if (!reloadConfig(ctx)) return;
|
|
40
|
+
opts.onReloaded?.();
|
|
41
|
+
}, debounceMs);
|
|
42
|
+
};
|
|
43
|
+
const offJson = ctx.bus.on('fs:json', onEvent);
|
|
44
|
+
const offAny = ctx.bus.on('fs:any', onEvent);
|
|
45
|
+
return {
|
|
46
|
+
stop() {
|
|
47
|
+
if (timer) clearTimeout(timer);
|
|
48
|
+
timer = null;
|
|
49
|
+
offJson();
|
|
50
|
+
offAny();
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|