@1agh/maude 1.2.0 → 1.3.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/README.md +3 -1
- package/apps/studio/acp/index.ts +43 -7
- package/apps/studio/annotations-layer.tsx +191 -116
- package/apps/studio/annotations-model.ts +39 -0
- package/apps/studio/annotations-sync.ts +50 -0
- package/apps/studio/api.ts +689 -36
- package/apps/studio/bin/annotate.mjs +3 -1
- package/apps/studio/bin/server-up.sh +17 -2
- package/apps/studio/canvas-edit.ts +391 -7
- package/apps/studio/canvas-lib.tsx +82 -18
- package/apps/studio/canvas-notice-message.ts +16 -0
- package/apps/studio/canvas-notifications.tsx +19 -0
- package/apps/studio/canvas-shell.tsx +57 -6
- package/apps/studio/client/app.jsx +686 -241
- package/apps/studio/client/apply-edit-request.ts +55 -0
- package/apps/studio/client/export-center.jsx +111 -61
- package/apps/studio/client/github.js +38 -1
- package/apps/studio/client/index-loader.ts +76 -0
- package/apps/studio/client/panels/CloudBar.jsx +52 -6
- package/apps/studio/client/panels/GitPanel.jsx +103 -0
- package/apps/studio/client/panels/OnboardingWizard.jsx +36 -7
- package/apps/studio/client/panels/RepoBranchSwitcher.jsx +92 -27
- package/apps/studio/client/panels/SourceConflictPanel.jsx +166 -0
- package/apps/studio/client/panels/SyncPanel.jsx +113 -0
- package/apps/studio/client/panels/TeamProjects.jsx +376 -0
- package/apps/studio/client/panels/file-deep-link-dialog.jsx +54 -0
- package/apps/studio/client/photo-knobs.jsx +3 -0
- package/apps/studio/client/share-dialog.jsx +91 -0
- package/apps/studio/client/share-link.js +94 -0
- package/apps/studio/client/styles/3-shell-maude.css +35 -18
- package/apps/studio/client/styles/4-components.css +18 -1
- package/apps/studio/client/tree-row-menu.jsx +48 -3
- package/apps/studio/client/whats-new.jsx +26 -32
- package/apps/studio/cloud/endpoints.ts +132 -0
- package/apps/studio/collab/index.ts +4 -0
- package/apps/studio/collab/persistence.ts +5 -1
- package/apps/studio/collab/registry.ts +9 -3
- package/apps/studio/collab/room.ts +13 -2
- package/apps/studio/context.ts +59 -0
- package/apps/studio/dist/client.bundle.js +1586 -1554
- package/apps/studio/dist/runtime/.min-sizes.json +1 -0
- package/apps/studio/dist/runtime/sonner.js +1 -0
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/http.ts +289 -18
- package/apps/studio/inspect.ts +19 -0
- package/apps/studio/managed-projects.ts +150 -0
- package/apps/studio/notifications.tsx +292 -0
- package/apps/studio/runtime-bundle.ts +2 -0
- package/apps/studio/server.ts +59 -3
- package/apps/studio/sync/accepted-cold-start.ts +225 -0
- package/apps/studio/sync/accepted-link.ts +320 -0
- package/apps/studio/sync/action-stage.ts +343 -0
- package/apps/studio/sync/agent.ts +12 -60
- package/apps/studio/sync/cell-file-events.ts +3 -0
- package/apps/studio/sync/codec.ts +73 -6
- package/apps/studio/sync/ctl-provider.ts +15 -2
- package/apps/studio/sync/document-discovery.ts +81 -0
- package/apps/studio/sync/file-membership.ts +10 -2
- package/apps/studio/sync/file-plane.ts +309 -26
- package/apps/studio/sync/index.ts +1078 -19
- package/apps/studio/sync/migrate-seed.ts +110 -19
- package/apps/studio/sync/poke.ts +4 -2
- package/apps/studio/sync/presentation.ts +285 -2
- package/apps/studio/sync/projection.ts +820 -23
- package/apps/studio/sync/repeated-module.ts +73 -0
- package/apps/studio/sync/revision-barrier.ts +129 -0
- package/apps/studio/sync/seed-repair.ts +46 -0
- package/apps/studio/sync/source-merge.ts +100 -0
- package/apps/studio/sync/source-ops.ts +289 -0
- package/apps/studio/sync/source-recovery.ts +70 -0
- package/apps/studio/sync/source-validation.ts +56 -0
- package/apps/studio/sync/status.ts +79 -1
- package/apps/studio/sync/transaction-client.ts +460 -0
- package/apps/studio/sync/writer-registry.ts +236 -0
- package/apps/studio/text-caret.ts +35 -0
- package/apps/studio/undo-hud.tsx +9 -87
- package/apps/studio/use-canvas-media-drop.tsx +4 -39
- package/apps/studio/whats-new.json +101 -0
- package/cli/lib/harness/codex-runtime.mjs +4 -1
- package/package.json +9 -8
- package/plugins/design/dependencies.json +3 -3
- package/plugins/design/templates/_shell.html +47 -0
- package/plugins/flow/dependencies.json +3 -3
|
@@ -77,6 +77,15 @@ export interface RoomCallbacks {
|
|
|
77
77
|
* the seeded state.
|
|
78
78
|
*/
|
|
79
79
|
seed(slug: string, doc: Y.Doc): Promise<void> | void;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Accepted revisions (DDR-241 §7): while true, this room's document is a
|
|
83
|
+
* replica of the project's accepted state — no browser connection may write
|
|
84
|
+
* a persistent lane into it (the hub would drop it and the replica would
|
|
85
|
+
* diverge). Comments and annotations go through the API as proposals.
|
|
86
|
+
* Awareness is unaffected. Optional; absent means false.
|
|
87
|
+
*/
|
|
88
|
+
acceptedMode?: () => boolean;
|
|
80
89
|
}
|
|
81
90
|
|
|
82
91
|
export interface Room {
|
|
@@ -216,6 +225,8 @@ export function createRoom(slug: string, callbacks: RoomCallbacks): Room {
|
|
|
216
225
|
*/
|
|
217
226
|
function refusedLanes(conn: RoomConn, roots: ReadonlySet<string>): string[] {
|
|
218
227
|
const refused: string[] = [];
|
|
228
|
+
// Accepted revisions: every persistent lane is the hub's to change.
|
|
229
|
+
if (callbacks.acceptedMode?.()) return [...roots];
|
|
219
230
|
for (const r of roots) {
|
|
220
231
|
if (conn.realm === 'canvas' && (isBodyLane(r) || r === '<unresolved>')) {
|
|
221
232
|
refused.push(r);
|
|
@@ -255,7 +266,7 @@ export function createRoom(slug: string, callbacks: RoomCallbacks): Room {
|
|
|
255
266
|
gateRefusalCount += 1;
|
|
256
267
|
discardMirror();
|
|
257
268
|
console.warn(
|
|
258
|
-
`[collab/${slug}] origin gate REFUSED a ${conn.readOnly ? 'read-only' : 'canvas-realm'} ` +
|
|
269
|
+
`[collab/${slug}] origin gate REFUSED a ${callbacks.acceptedMode?.() ? 'accepted-replica' : conn.readOnly ? 'read-only' : 'canvas-realm'} ` +
|
|
259
270
|
`sync frame (lanes: ${refused.join(', ') || 'unclassifiable'}). ` +
|
|
260
271
|
(conn.readOnly
|
|
261
272
|
? 'A viewer-role socket may only write comments — role matrix, cloud collab lane.'
|
|
@@ -351,7 +362,7 @@ export function createRoom(slug: string, callbacks: RoomCallbacks): Room {
|
|
|
351
362
|
}
|
|
352
363
|
|
|
353
364
|
function receive(conn: RoomConn, payload: Uint8Array): void {
|
|
354
|
-
if (conn.realm === 'canvas' || conn.readOnly === true) {
|
|
365
|
+
if (conn.realm === 'canvas' || conn.readOnly === true || callbacks.acceptedMode?.()) {
|
|
355
366
|
receiveGated(conn, payload);
|
|
356
367
|
return;
|
|
357
368
|
}
|
package/apps/studio/context.ts
CHANGED
|
@@ -259,6 +259,65 @@ export interface Context {
|
|
|
259
259
|
current?(): {
|
|
260
260
|
cancelAssetSweep(): boolean;
|
|
261
261
|
retireForMove?(fromSlug: string, toRel: string): Promise<boolean>;
|
|
262
|
+
/** Accepted-revisions mode (DDR-241) — see SyncRuntime.proposeLane. */
|
|
263
|
+
proposeLane?(
|
|
264
|
+
slug: string,
|
|
265
|
+
lane: 'comments' | 'annotations' | 'meta',
|
|
266
|
+
text: string,
|
|
267
|
+
opts?: { baseText?: string; writeId?: string }
|
|
268
|
+
): Promise<{ status: 'accepted' | 'rejected'; code?: string }> | null;
|
|
269
|
+
/** Accepted-revisions mode (DDR-241) — see SyncRuntime.proposeFolder. */
|
|
270
|
+
proposeFolder?(
|
|
271
|
+
op:
|
|
272
|
+
| { op: 'dir.create'; path: string }
|
|
273
|
+
| { op: 'dir.delete'; path: string }
|
|
274
|
+
| { op: 'dir.move'; from: string; to: string }
|
|
275
|
+
): Promise<{ status: 'accepted' | 'rejected'; code?: string; queued?: boolean }> | null;
|
|
276
|
+
acceptedMode?(): boolean;
|
|
277
|
+
acceptedHistory?(q: {
|
|
278
|
+
limit?: number;
|
|
279
|
+
before?: number | null;
|
|
280
|
+
path?: string | null;
|
|
281
|
+
}): Promise<unknown[] | null>;
|
|
282
|
+
acceptedVersion?(repoRel: string, revision: number): Promise<string | null>;
|
|
283
|
+
acceptedRestore?(
|
|
284
|
+
repoRel: string,
|
|
285
|
+
revision: number
|
|
286
|
+
): Promise<{ status: 'accepted' | 'rejected'; code?: string; queued?: boolean } | null>;
|
|
287
|
+
acceptedUndo?(
|
|
288
|
+
actionId: string,
|
|
289
|
+
redo?: boolean
|
|
290
|
+
): Promise<{
|
|
291
|
+
status: 'accepted' | 'rejected';
|
|
292
|
+
code?: string;
|
|
293
|
+
queued?: boolean;
|
|
294
|
+
actionId?: string;
|
|
295
|
+
} | null>;
|
|
296
|
+
acceptedActionForContent?(repoRel: string, content: string): string | null;
|
|
297
|
+
prepareOffline?(): Promise<{
|
|
298
|
+
complete: boolean;
|
|
299
|
+
pulled: number;
|
|
300
|
+
passes: number;
|
|
301
|
+
failed: number;
|
|
302
|
+
} | null>;
|
|
303
|
+
conflictVersions?(
|
|
304
|
+
repoRel: string
|
|
305
|
+
): { slug: string; mine: string | null; theirs: string } | null;
|
|
306
|
+
resolveConflict?(
|
|
307
|
+
repoRel: string,
|
|
308
|
+
choice: 'mine' | 'theirs'
|
|
309
|
+
): Promise<{ status: 'accepted' | 'rejected' | 'taken'; code?: string } | null>;
|
|
310
|
+
/** T16 — AI action boundaries (see sync/action-stage.ts). */
|
|
311
|
+
beginAiAction?(key: string, label: string): void;
|
|
312
|
+
endAiAction?(
|
|
313
|
+
key: string,
|
|
314
|
+
outcome: 'done' | 'failed'
|
|
315
|
+
): Promise<{ status: 'accepted' | 'rejected'; code?: string } | null>;
|
|
316
|
+
resolveAiAction?(choice: 'publish' | 'discard'): Promise<{
|
|
317
|
+
status: 'accepted' | 'rejected' | 'discarded';
|
|
318
|
+
code?: string;
|
|
319
|
+
canvases?: number;
|
|
320
|
+
} | null>;
|
|
262
321
|
} | null;
|
|
263
322
|
};
|
|
264
323
|
}
|