@1agh/maude 2.1.1 → 2.1.2
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/actions/agents.ts +18 -42
- package/apps/studio/actions/verbs.ts +49 -0
- package/apps/studio/actions.manifest.json +103 -19
- package/apps/studio/ai/create-claim.ts +1 -1
- package/apps/studio/bin/_asset-file.mjs +117 -0
- package/apps/studio/bin/_canvas-file.mjs +146 -0
- package/apps/studio/bin/_footage.mjs +123 -0
- package/apps/studio/bin/_pdf-playwright.mjs +14 -0
- package/apps/studio/bin/_png-playwright.mjs +15 -1
- package/apps/studio/bin/_pw-launch.mjs +98 -0
- package/apps/studio/bin/_retry-save.mjs +49 -0
- package/apps/studio/bin/_sync.mjs +145 -2
- package/apps/studio/bin/asset-rename.sh +12 -0
- package/apps/studio/bin/asset-trash.sh +12 -0
- package/apps/studio/bin/canvas-move.sh +12 -0
- package/apps/studio/bin/canvas-new.sh +12 -0
- package/apps/studio/bin/footage.sh +12 -0
- package/apps/studio/bin/generate.sh +7 -0
- package/apps/studio/bin/retry-save.sh +13 -0
- package/apps/studio/bridge/canvas-mode-store.ts +11 -2
- package/apps/studio/bridge/dgn-protocol.ts +8 -3
- package/apps/studio/bridge/occlusion.ts +45 -0
- package/apps/studio/canvas-theme-pill.tsx +169 -26
- package/apps/studio/client/export-center.jsx +32 -3
- package/apps/studio/client/home/HomeAccountBanner.jsx +61 -0
- package/apps/studio/client/home/HomeAccountsChip.jsx +404 -0
- package/apps/studio/client/home/HomeConnection.jsx +4 -3
- package/apps/studio/client/home/ProjectRows.jsx +514 -0
- package/apps/studio/client/home/home-accounts-model.js +148 -99
- package/apps/studio/client/home/home-api.js +4 -0
- package/apps/studio/client/home/home-app.jsx +127 -432
- package/apps/studio/client/home/home-icons.jsx +8 -0
- package/apps/studio/client/home/home-model.js +109 -0
- package/apps/studio/client/home/home.css +447 -111
- package/apps/studio/client/home/use-account-fix.js +123 -0
- package/apps/studio/client/v2/assets/generate-ask.jsx +3 -1
- package/apps/studio/client/v2/export/done-toast.jsx +2 -5
- package/apps/studio/client/v2/export/export-sheet.jsx +9 -2
- package/apps/studio/client/v2/export/export.css +9 -0
- package/apps/studio/client/v2/export/exports-model.js +16 -3
- package/apps/studio/client/v2/export/file-rows.jsx +81 -5
- package/apps/studio/client/v2/export/native-save.js +33 -0
- package/apps/studio/client/v2/export/sections/print-copy.js +3 -0
- package/apps/studio/client/v2/export/sections/print.jsx +37 -20
- package/apps/studio/client/v2/shell/occlusion-insets.js +37 -9
- package/apps/studio/client/v2/shell/use-occluded-insets.js +13 -3
- package/apps/studio/collab/room.ts +21 -7
- package/apps/studio/dist/client.bundle.js +692 -692
- package/apps/studio/dist/comment-mount.js +2 -2
- package/apps/studio/dist/styles.css +1 -1
- package/apps/studio/exporters/ghostscript.ts +78 -1
- package/apps/studio/exporters/pdf-fonts.ts +31 -4
- package/apps/studio/generation/jobs.ts +6 -0
- package/apps/studio/http.ts +6 -2
- package/apps/studio/routes/agent.ts +6 -2
- package/apps/studio/routes/project-undo.ts +10 -0
- package/apps/studio/server.ts +25 -0
- package/apps/studio/shell/cli-yield.ts +48 -11
- package/apps/studio/whats-new.json +18 -0
- package/cli/commands/design.mjs +74 -16
- package/cli/lib/bash-guard.mjs +4 -4
- package/cli/lib/confine-read.mjs +2 -0
- package/cli/lib/design-help.gen.mjs +15 -2
- package/cli/lib/design-hook.mjs +1 -1
- package/cli/lib/desktop-locate.mjs +36 -8
- package/cli/lib/studio-locate.mjs +8 -2
- package/cli/lib/sub-verbs.mjs +13 -1
- package/package.json +8 -8
- package/apps/studio/client/home/HomeAccounts.jsx +0 -262
- package/apps/studio/client/home/HomeAccountsRow.jsx +0 -221
|
@@ -132,9 +132,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
132
132
|
// An agent's own writes go straight to the files; it frees space and may press Retry the same way.
|
|
133
133
|
'save.retry-held': {
|
|
134
134
|
effect: 'project',
|
|
135
|
-
agent: cli(
|
|
136
|
-
'maude design curl-local -X POST http://127.0.0.1:<port>/_api/diagnostics/disk-retry'
|
|
137
|
-
),
|
|
135
|
+
agent: cli('maude design retry-save'),
|
|
138
136
|
minRole: 'edit',
|
|
139
137
|
server: { route: '/_api/diagnostics/disk-retry', method: 'POST' },
|
|
140
138
|
},
|
|
@@ -145,23 +143,17 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
145
143
|
// S11.12 — Sync details (06 ad-syncd). A held SOURCE conflict's three picks; the slug is the
|
|
146
144
|
// `source-conflict-<slug>` notice id `maude design sync status` lists. Keep both writes this Mac's
|
|
147
145
|
// version as a new canvas "<name> this Mac" (ONE doc.create — one undo step) + a history aside.
|
|
146
|
+
// fix-bulk 2026-11-10: taught as the `sync` sub-verbs of the same names, which send the studio's key
|
|
147
|
+
// (the old `curl-local` recipes were answered 401 by a keyed studio); still prompt (`sync` is shared).
|
|
148
148
|
...Object.fromEntries(
|
|
149
|
-
(
|
|
150
|
-
[
|
|
151
|
-
['keep-mine', 'mine'],
|
|
152
|
-
['use-theirs', 'theirs'],
|
|
153
|
-
['keep-both', 'keep-both'],
|
|
154
|
-
] as const
|
|
155
|
-
).map(([k, choice]) => [
|
|
149
|
+
(['keep-mine', 'use-theirs', 'keep-both'] as const).map((k) => [
|
|
156
150
|
`sync.${k}`,
|
|
157
151
|
{
|
|
158
152
|
effect: 'shared',
|
|
159
153
|
minRole: 'edit',
|
|
160
154
|
undo: 'step',
|
|
161
155
|
server: { route: '/_api/project/conflict', method: 'POST' },
|
|
162
|
-
agent: cli(
|
|
163
|
-
`maude design curl-local -X POST http://127.0.0.1:<port>/_api/project/conflict -d '{"file":"<slug>","choice":"${choice}"}'`
|
|
164
|
-
),
|
|
156
|
+
agent: cli(`maude design sync ${k} <slug>`),
|
|
165
157
|
} satisfies ActionDefAI,
|
|
166
158
|
])
|
|
167
159
|
),
|
|
@@ -172,9 +164,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
172
164
|
effect: 'shared',
|
|
173
165
|
minRole: 'edit',
|
|
174
166
|
server: { route: '/_api/project/ai-action', method: 'POST' },
|
|
175
|
-
agent: cli(
|
|
176
|
-
`maude design curl-local -X POST http://127.0.0.1:<port>/_api/project/ai-action -d '{"choice":"${choice}"}'`
|
|
177
|
-
),
|
|
167
|
+
agent: cli(`maude design sync ${choice}-ai-edit`),
|
|
178
168
|
} satisfies ActionDefAI,
|
|
179
169
|
])
|
|
180
170
|
),
|
|
@@ -182,7 +172,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
182
172
|
effect: 'none',
|
|
183
173
|
minRole: 'edit',
|
|
184
174
|
server: { route: '/_api/sync/cancel-assets', method: 'POST' },
|
|
185
|
-
agent: cli('maude design
|
|
175
|
+
agent: cli('maude design sync cancel-transfer'),
|
|
186
176
|
},
|
|
187
177
|
// Issue #207 — which folders a project syncs is the person's choice (a versioned config write
|
|
188
178
|
// that changes what reaches the team), so the AI is never taught it.
|
|
@@ -255,9 +245,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
255
245
|
// No `server`: the action itself only opens a sheet; the read under it is Sync details' own GET.
|
|
256
246
|
'sync.compare': {
|
|
257
247
|
effect: 'none',
|
|
258
|
-
agent: cli(
|
|
259
|
-
'maude design curl-local "http://127.0.0.1:<port>/_api/project/conflict?file=<slug>"'
|
|
260
|
-
),
|
|
248
|
+
agent: cli('maude design sync compare <slug>'),
|
|
261
249
|
},
|
|
262
250
|
'sync.get-latest': GIT('/_api/git/pull', 'git pull'),
|
|
263
251
|
// fix/207 — the person's yes / no to shared code (.ts/.js) from the project's hub: it runs on this
|
|
@@ -292,36 +280,30 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
292
280
|
// records it in Version history and claims it for the chat's run — runForCreate), then edited. The
|
|
293
281
|
// design hook refuses a hand-written new canvas (new-canvas); test/ai-parity-hook-crosscheck.test.ts.
|
|
294
282
|
'canvas.new': TSX(
|
|
295
|
-
|
|
283
|
+
'Create it with `maude design canvas-new "<name>"` (it prints the file it made), then Edit that .tsx: a DCArtboard per screen'
|
|
296
284
|
),
|
|
297
285
|
'canvas.new-brief': TSX(
|
|
298
|
-
|
|
286
|
+
'Create it with `maude design canvas-new "<name>" --kind brief-board` (it prints the file it made), then Edit that brief .tsx'
|
|
299
287
|
),
|
|
300
288
|
// S6.3 — a canvas from one sentence (V2-1.1 §5.9: `file:'canvas-tsx'`). From Home the server has already made
|
|
301
289
|
// the file from the sentence; otherwise the agent makes it with the app's create first (V2-8.16).
|
|
302
290
|
'home.ask': TSX(
|
|
303
|
-
`The canvas exists when Home asks (the server made it from the sentence); otherwise create it with \`maude design
|
|
291
|
+
`The canvas exists when Home asks (the server made it from the sentence); otherwise create it with \`maude design canvas-new\` (it prints the file it made). Then Edit it: add every artboard empty with kind and size first, then fill big before small, words last (SKILL.md § A first draft from Home)`
|
|
304
292
|
),
|
|
305
293
|
// V2-8.16 — whole-file ops go through the studio's own routes: the design hook refuses an agent's
|
|
306
294
|
// mv / cp / rm of a versioned design file (bash-guard use-verb · not-a-writer · use-trash), and the
|
|
307
295
|
// route is what records the move / create in Version history. test/ai-parity-hook-crosscheck.test.ts.
|
|
308
296
|
'canvas.duplicate': {
|
|
309
297
|
effect: 'project',
|
|
310
|
-
agent: cli(
|
|
311
|
-
`maude design curl-local http://127.0.0.1:<port>/_api/canvas --method POST --header "Content-Type: application/json" --data '{"duplicateOf":"<canvas path>"}'`
|
|
312
|
-
),
|
|
298
|
+
agent: cli('maude design canvas-new --duplicate <canvas path>'),
|
|
313
299
|
},
|
|
314
300
|
'canvas.rename': {
|
|
315
301
|
effect: 'project',
|
|
316
|
-
agent: cli(
|
|
317
|
-
`maude design curl-local http://127.0.0.1:<port>/_api/fs-move --method POST --header "Content-Type: application/json" --data '{"file":"<canvas path>","toName":"<new name>"}'`
|
|
318
|
-
),
|
|
302
|
+
agent: cli('maude design canvas-move <canvas path> --name "<new name>"'),
|
|
319
303
|
},
|
|
320
304
|
'canvas.move': {
|
|
321
305
|
effect: 'project',
|
|
322
|
-
agent: cli(
|
|
323
|
-
`maude design curl-local http://127.0.0.1:<port>/_api/fs-move --method POST --header "Content-Type: application/json" --data '{"file":"<canvas path>","toDir":"<folder>"}'`
|
|
324
|
-
),
|
|
306
|
+
agent: cli('maude design canvas-move <canvas path> --to <folder>'),
|
|
325
307
|
},
|
|
326
308
|
// S11.7 — the code view and the broken-canvas card. The agent reads the same two routes through verbs
|
|
327
309
|
// (S11.6): `canvas-source` is the code (or one artboard's lines), `canvas-errors` the structured errors.
|
|
@@ -353,9 +335,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
353
335
|
'canvas.copy-file-path': { effect: 'none', agent: cli('maude design index') },
|
|
354
336
|
'canvas.rename-file': {
|
|
355
337
|
effect: 'project',
|
|
356
|
-
agent: cli(
|
|
357
|
-
`maude design curl-local http://127.0.0.1:<port>/_api/fs-move --method POST --header "Content-Type: application/json" --data '{"file":"<canvas path>","toName":"<new name>"}'`
|
|
358
|
-
),
|
|
338
|
+
agent: cli('maude design canvas-move <canvas path> --name "<new name>"'),
|
|
359
339
|
},
|
|
360
340
|
'canvas.copy-link': {
|
|
361
341
|
effect: 'none',
|
|
@@ -396,7 +376,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
396
376
|
'view.advanced-close-all': PREF('folds every panel’s Advanced section; a UI preference'),
|
|
397
377
|
'canvas.reload': PREF('reloads the user’s view; the studio reloads on every file change'),
|
|
398
378
|
'canvas.new-video': TSX(
|
|
399
|
-
|
|
379
|
+
'Create it with `maude design canvas-new "<name>" --kind video-comp` (it prints the file it made), then Edit that video-comp .tsx',
|
|
400
380
|
'design-video:video-comp'
|
|
401
381
|
),
|
|
402
382
|
'canvas.close': PREF('closes the user’s tab'),
|
|
@@ -1019,9 +999,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
1019
999
|
server: { route: '/_api/assets/trash', method: 'POST' },
|
|
1020
1000
|
// V2-8.16 — the route, not mv: it refuses a picture a canvas uses or an older version shows and
|
|
1021
1001
|
// answers per item (moved, or used | kept-by-versions | checking); `assets --not-used` lists them.
|
|
1022
|
-
agent: cli(
|
|
1023
|
-
`maude design curl-local http://127.0.0.1:<port>/_api/assets/trash --method POST --header "Content-Type: application/json" --data '{"assets":["assets/<name>"]}'`
|
|
1024
|
-
),
|
|
1002
|
+
agent: cli('maude design asset-trash assets/<name>'),
|
|
1025
1003
|
},
|
|
1026
1004
|
// P8 round 7 — Rename… an asset: assets/<name>.<ext> and its sidecars take the new name (asset-rename.ts). Never a
|
|
1027
1005
|
// picture a canvas uses or an older version shows — their references would break — so nothing else is rewritten.
|
|
@@ -1032,9 +1010,7 @@ export const AGENT_PATHS: Readonly<Record<ActionId, ActionDefAI>> = {
|
|
|
1032
1010
|
server: { route: '/_api/assets/rename', method: 'POST' },
|
|
1033
1011
|
// V2-8.16 — the route, not mv: {ok, to} or 409 {reason: used | kept-by-versions | checking | exists |
|
|
1034
1012
|
// same | bad-name | invalid | missing}.
|
|
1035
|
-
agent: cli(
|
|
1036
|
-
`maude design curl-local http://127.0.0.1:<port>/_api/assets/rename --method POST --header "Content-Type: application/json" --data '{"asset":"assets/<name>.<ext>","name":"<new name>"}'`
|
|
1037
|
-
),
|
|
1013
|
+
agent: cli('maude design asset-rename assets/<name>.<ext> "<new name>"'),
|
|
1038
1014
|
},
|
|
1039
1015
|
'tool.create-default': TSX(
|
|
1040
1016
|
'Add the element’s JSX at its default size: a frame or rectangle is 100 × 100 (see object.insert-shape), a text is a <p> with the words “Text”'
|
|
@@ -48,6 +48,10 @@ const t = (verb: string, effect: VerbEffect, extra: Partial<VerbDef> = {}): Verb
|
|
|
48
48
|
const KG_LOG =
|
|
49
49
|
'writes the versioned .kgai log (repo-tracked, merge=union) — lead: keeps prompting (decision:maude/v2-2.4b-held-and-prompting-verbs)';
|
|
50
50
|
|
|
51
|
+
// fix-bulk 2026-11-10 follow-up (lead brief: "keep each family's tier; do NOT widen").
|
|
52
|
+
const HELD_AT_RECIPE_TIER =
|
|
53
|
+
'replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier';
|
|
54
|
+
|
|
51
55
|
export const MAUDE_VERBS: readonly VerbDef[] = [
|
|
52
56
|
// ── `maude design`, effect none (reads, computes, runtime `_*` state) ────────────────────
|
|
53
57
|
d('prep', 'none'),
|
|
@@ -116,6 +120,12 @@ export const MAUDE_VERBS: readonly VerbDef[] = [
|
|
|
116
120
|
// ── `maude design`, effect project (writes versioned files of this project) ──────────────
|
|
117
121
|
d('annotate', 'project'),
|
|
118
122
|
d('canvas-edit', 'project'),
|
|
123
|
+
// fix-bulk W1 follow-up — the app's own create / duplicate and rename / move (POST /_api/canvas,
|
|
124
|
+
// /_api/fs-move), the registry actions canvas.new / duplicate / rename / move already rate `project`.
|
|
125
|
+
d('canvas-new', 'project', { note: 'one new canvas file, recorded in Version history' }),
|
|
126
|
+
d('canvas-move', 'project', {
|
|
127
|
+
note: 'renames or moves one canvas, recorded in Version history as one canvas',
|
|
128
|
+
}),
|
|
119
129
|
d('handoff', 'project'),
|
|
120
130
|
d('import-asset', 'project'),
|
|
121
131
|
d('import-tokens', 'project'),
|
|
@@ -152,6 +162,45 @@ export const MAUDE_VERBS: readonly VerbDef[] = [
|
|
|
152
162
|
hold: '/design:export documents `--out ~/Downloads/…` — lead: keeps prompting (decision:maude/v2-2.4b-held-and-prompting-verbs)',
|
|
153
163
|
}),
|
|
154
164
|
d('ds-check', 'project', { note: '--fix=mechanical / --emit write canvases / tokens.json' }),
|
|
165
|
+
// fix-bulk 2026-11-10 follow-up — the verbs that replaced the last `curl-local` recipes (a keyed studio
|
|
166
|
+
// answered those 401, sec-loopback-bearer §7). Each keeps its action's effect (actions/agents.ts) and
|
|
167
|
+
// the prompt tier the recipe had: a key fix widens nothing. The Sync details answers are shared
|
|
168
|
+
// (they change the project for everyone), so they prompt by their effect.
|
|
169
|
+
d('asset-trash', 'project', {
|
|
170
|
+
hold: HELD_AT_RECIPE_TIER,
|
|
171
|
+
note: 'Assets › Move to trash: pictures and sidecars to _trash/; one a canvas uses stays',
|
|
172
|
+
}),
|
|
173
|
+
d('asset-rename', 'project', {
|
|
174
|
+
hold: HELD_AT_RECIPE_TIER,
|
|
175
|
+
note: 'Assets › Rename…: a picture and its sidecars; one a canvas uses keeps its name',
|
|
176
|
+
}),
|
|
177
|
+
d('retry-save', 'project', {
|
|
178
|
+
hold: HELD_AT_RECIPE_TIER,
|
|
179
|
+
note: 'Retry on Not saved: lands the canvas writes a full disk held',
|
|
180
|
+
}),
|
|
181
|
+
d('footage', 'project', {
|
|
182
|
+
hold: HELD_AT_RECIPE_TIER,
|
|
183
|
+
note: '`show` reads a clip’s analysis / a cut’s EDL; `save` writes assets/<sha8>.footage.json or the EDL',
|
|
184
|
+
}),
|
|
185
|
+
d('sync compare', 'none', {
|
|
186
|
+
hold: HELD_AT_RECIPE_TIER,
|
|
187
|
+
note: 'a held source conflict’s two versions, read only',
|
|
188
|
+
}),
|
|
189
|
+
d('sync cancel-transfer', 'none', {
|
|
190
|
+
hold: HELD_AT_RECIPE_TIER,
|
|
191
|
+
note: 'stops the running picture / video transfer; it starts again on the next sync',
|
|
192
|
+
}),
|
|
193
|
+
d('sync keep-mine', 'shared', { note: 'a held source conflict: this Mac’s version wins' }),
|
|
194
|
+
d('sync use-theirs', 'shared', { note: 'a held source conflict: the project’s version wins' }),
|
|
195
|
+
d('sync keep-both', 'shared', {
|
|
196
|
+
note: 'a held source conflict: the project’s version, and this Mac’s as a new canvas',
|
|
197
|
+
}),
|
|
198
|
+
d('sync publish-ai-edit', 'shared', {
|
|
199
|
+
note: 'an unfinished AI edit held from the project goes out',
|
|
200
|
+
}),
|
|
201
|
+
d('sync discard-ai-edit', 'shared', {
|
|
202
|
+
note: 'an unfinished AI edit held from the project is undone',
|
|
203
|
+
}),
|
|
155
204
|
// ── `maude design`, prompt ────────────────────────────────────────────────────────────────
|
|
156
205
|
d('curl-local', 'external', { note: 'any method/body against any loopback port: every route' }),
|
|
157
206
|
d('draw-build', 'external', { note: 'runs model-authored code (Q2)' }),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"generated": "scripts/gen-actions.mjs — do not edit by hand",
|
|
3
3
|
"format": "maude.actions-manifest",
|
|
4
4
|
"v": 1,
|
|
5
|
-
"manifestVersion": "
|
|
5
|
+
"manifestVersion": "924d3acafe2c",
|
|
6
6
|
"actions": [
|
|
7
7
|
{
|
|
8
8
|
"id": "search.open",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"path": "file",
|
|
108
108
|
"format": "canvas-tsx",
|
|
109
109
|
"skill": "design:design",
|
|
110
|
-
"how": "Create it with `maude design
|
|
110
|
+
"how": "Create it with `maude design canvas-new \"<name>\"` (it prints the file it made), then Edit that .tsx: a DCArtboard per screen"
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
{
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"path": "file",
|
|
121
121
|
"format": "canvas-tsx",
|
|
122
122
|
"skill": "design:design",
|
|
123
|
-
"how": "Create it with `maude design
|
|
123
|
+
"how": "Create it with `maude design canvas-new \"<name>\" --kind brief-board` (it prints the file it made), then Edit that brief .tsx"
|
|
124
124
|
}
|
|
125
125
|
},
|
|
126
126
|
{
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
"path": "file",
|
|
134
134
|
"format": "canvas-tsx",
|
|
135
135
|
"skill": "design:design",
|
|
136
|
-
"how": "The canvas exists when Home asks (the server made it from the sentence); otherwise create it with `maude design
|
|
136
|
+
"how": "The canvas exists when Home asks (the server made it from the sentence); otherwise create it with `maude design canvas-new` (it prints the file it made). Then Edit it: add every artboard empty with kind and size first, then fill big before small, words last (SKILL.md § A first draft from Home)"
|
|
137
137
|
}
|
|
138
138
|
},
|
|
139
139
|
{
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"path": "file",
|
|
160
160
|
"format": "canvas-tsx",
|
|
161
161
|
"skill": "design-video:video-comp",
|
|
162
|
-
"how": "Create it with `maude design
|
|
162
|
+
"how": "Create it with `maude design canvas-new \"<name>\" --kind video-comp` (it prints the file it made), then Edit that video-comp .tsx"
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
{
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
"effect": "project",
|
|
183
183
|
"agent": {
|
|
184
184
|
"path": "cli",
|
|
185
|
-
"verb": "maude design
|
|
185
|
+
"verb": "maude design canvas-new --duplicate <canvas path>"
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
188
|
{
|
|
@@ -193,7 +193,7 @@
|
|
|
193
193
|
"effect": "project",
|
|
194
194
|
"agent": {
|
|
195
195
|
"path": "cli",
|
|
196
|
-
"verb": "maude design
|
|
196
|
+
"verb": "maude design canvas-move <canvas path> --name \"<new name>\""
|
|
197
197
|
}
|
|
198
198
|
},
|
|
199
199
|
{
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
"effect": "project",
|
|
205
205
|
"agent": {
|
|
206
206
|
"path": "cli",
|
|
207
|
-
"verb": "maude design
|
|
207
|
+
"verb": "maude design canvas-move <canvas path> --to <folder>"
|
|
208
208
|
}
|
|
209
209
|
},
|
|
210
210
|
{
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
"effect": "project",
|
|
287
287
|
"agent": {
|
|
288
288
|
"path": "cli",
|
|
289
|
-
"verb": "maude design
|
|
289
|
+
"verb": "maude design canvas-move <canvas path> --name \"<new name>\""
|
|
290
290
|
}
|
|
291
291
|
},
|
|
292
292
|
{
|
|
@@ -2087,7 +2087,7 @@
|
|
|
2087
2087
|
},
|
|
2088
2088
|
"agent": {
|
|
2089
2089
|
"path": "cli",
|
|
2090
|
-
"verb": "maude design
|
|
2090
|
+
"verb": "maude design asset-trash assets/<name>"
|
|
2091
2091
|
}
|
|
2092
2092
|
},
|
|
2093
2093
|
{
|
|
@@ -2104,7 +2104,7 @@
|
|
|
2104
2104
|
},
|
|
2105
2105
|
"agent": {
|
|
2106
2106
|
"path": "cli",
|
|
2107
|
-
"verb": "maude design
|
|
2107
|
+
"verb": "maude design asset-rename assets/<name>.<ext> \"<new name>\""
|
|
2108
2108
|
}
|
|
2109
2109
|
},
|
|
2110
2110
|
{
|
|
@@ -6352,7 +6352,7 @@
|
|
|
6352
6352
|
"effect": "project",
|
|
6353
6353
|
"agent": {
|
|
6354
6354
|
"path": "cli",
|
|
6355
|
-
"verb": "maude design
|
|
6355
|
+
"verb": "maude design retry-save"
|
|
6356
6356
|
},
|
|
6357
6357
|
"minRole": "edit",
|
|
6358
6358
|
"server": {
|
|
@@ -6374,7 +6374,7 @@
|
|
|
6374
6374
|
},
|
|
6375
6375
|
"agent": {
|
|
6376
6376
|
"path": "cli",
|
|
6377
|
-
"verb": "maude design
|
|
6377
|
+
"verb": "maude design sync keep-mine <slug>"
|
|
6378
6378
|
}
|
|
6379
6379
|
},
|
|
6380
6380
|
{
|
|
@@ -6391,7 +6391,7 @@
|
|
|
6391
6391
|
},
|
|
6392
6392
|
"agent": {
|
|
6393
6393
|
"path": "cli",
|
|
6394
|
-
"verb": "maude design
|
|
6394
|
+
"verb": "maude design sync use-theirs <slug>"
|
|
6395
6395
|
}
|
|
6396
6396
|
},
|
|
6397
6397
|
{
|
|
@@ -6408,7 +6408,7 @@
|
|
|
6408
6408
|
},
|
|
6409
6409
|
"agent": {
|
|
6410
6410
|
"path": "cli",
|
|
6411
|
-
"verb": "maude design
|
|
6411
|
+
"verb": "maude design sync keep-both <slug>"
|
|
6412
6412
|
}
|
|
6413
6413
|
},
|
|
6414
6414
|
{
|
|
@@ -6419,7 +6419,7 @@
|
|
|
6419
6419
|
"effect": "none",
|
|
6420
6420
|
"agent": {
|
|
6421
6421
|
"path": "cli",
|
|
6422
|
-
"verb": "maude design
|
|
6422
|
+
"verb": "maude design sync compare <slug>"
|
|
6423
6423
|
}
|
|
6424
6424
|
},
|
|
6425
6425
|
{
|
|
@@ -6435,7 +6435,7 @@
|
|
|
6435
6435
|
},
|
|
6436
6436
|
"agent": {
|
|
6437
6437
|
"path": "cli",
|
|
6438
|
-
"verb": "maude design
|
|
6438
|
+
"verb": "maude design sync publish-ai-edit"
|
|
6439
6439
|
}
|
|
6440
6440
|
},
|
|
6441
6441
|
{
|
|
@@ -6451,7 +6451,7 @@
|
|
|
6451
6451
|
},
|
|
6452
6452
|
"agent": {
|
|
6453
6453
|
"path": "cli",
|
|
6454
|
-
"verb": "maude design
|
|
6454
|
+
"verb": "maude design sync discard-ai-edit"
|
|
6455
6455
|
}
|
|
6456
6456
|
},
|
|
6457
6457
|
{
|
|
@@ -6467,7 +6467,7 @@
|
|
|
6467
6467
|
},
|
|
6468
6468
|
"agent": {
|
|
6469
6469
|
"path": "cli",
|
|
6470
|
-
"verb": "maude design
|
|
6470
|
+
"verb": "maude design sync cancel-transfer"
|
|
6471
6471
|
}
|
|
6472
6472
|
},
|
|
6473
6473
|
{
|
|
@@ -7576,6 +7576,18 @@
|
|
|
7576
7576
|
"effect": "project",
|
|
7577
7577
|
"tier": "auto"
|
|
7578
7578
|
},
|
|
7579
|
+
{
|
|
7580
|
+
"scope": "design",
|
|
7581
|
+
"verb": "design canvas-new",
|
|
7582
|
+
"effect": "project",
|
|
7583
|
+
"tier": "auto"
|
|
7584
|
+
},
|
|
7585
|
+
{
|
|
7586
|
+
"scope": "design",
|
|
7587
|
+
"verb": "design canvas-move",
|
|
7588
|
+
"effect": "project",
|
|
7589
|
+
"tier": "auto"
|
|
7590
|
+
},
|
|
7579
7591
|
{
|
|
7580
7592
|
"scope": "design",
|
|
7581
7593
|
"verb": "design handoff",
|
|
@@ -7680,6 +7692,78 @@
|
|
|
7680
7692
|
"effect": "project",
|
|
7681
7693
|
"tier": "auto"
|
|
7682
7694
|
},
|
|
7695
|
+
{
|
|
7696
|
+
"scope": "design",
|
|
7697
|
+
"verb": "design asset-trash",
|
|
7698
|
+
"effect": "project",
|
|
7699
|
+
"tier": "prompt",
|
|
7700
|
+
"hold": "replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier"
|
|
7701
|
+
},
|
|
7702
|
+
{
|
|
7703
|
+
"scope": "design",
|
|
7704
|
+
"verb": "design asset-rename",
|
|
7705
|
+
"effect": "project",
|
|
7706
|
+
"tier": "prompt",
|
|
7707
|
+
"hold": "replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier"
|
|
7708
|
+
},
|
|
7709
|
+
{
|
|
7710
|
+
"scope": "design",
|
|
7711
|
+
"verb": "design retry-save",
|
|
7712
|
+
"effect": "project",
|
|
7713
|
+
"tier": "prompt",
|
|
7714
|
+
"hold": "replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier"
|
|
7715
|
+
},
|
|
7716
|
+
{
|
|
7717
|
+
"scope": "design",
|
|
7718
|
+
"verb": "design footage",
|
|
7719
|
+
"effect": "project",
|
|
7720
|
+
"tier": "prompt",
|
|
7721
|
+
"hold": "replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier"
|
|
7722
|
+
},
|
|
7723
|
+
{
|
|
7724
|
+
"scope": "design",
|
|
7725
|
+
"verb": "design sync compare",
|
|
7726
|
+
"effect": "none",
|
|
7727
|
+
"tier": "prompt",
|
|
7728
|
+
"hold": "replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier"
|
|
7729
|
+
},
|
|
7730
|
+
{
|
|
7731
|
+
"scope": "design",
|
|
7732
|
+
"verb": "design sync cancel-transfer",
|
|
7733
|
+
"effect": "none",
|
|
7734
|
+
"tier": "prompt",
|
|
7735
|
+
"hold": "replaced a `curl-local` recipe (prompt) that a keyed studio answered 401 — lead: keeps prompting, a key fix widens no tier"
|
|
7736
|
+
},
|
|
7737
|
+
{
|
|
7738
|
+
"scope": "design",
|
|
7739
|
+
"verb": "design sync keep-mine",
|
|
7740
|
+
"effect": "shared",
|
|
7741
|
+
"tier": "prompt"
|
|
7742
|
+
},
|
|
7743
|
+
{
|
|
7744
|
+
"scope": "design",
|
|
7745
|
+
"verb": "design sync use-theirs",
|
|
7746
|
+
"effect": "shared",
|
|
7747
|
+
"tier": "prompt"
|
|
7748
|
+
},
|
|
7749
|
+
{
|
|
7750
|
+
"scope": "design",
|
|
7751
|
+
"verb": "design sync keep-both",
|
|
7752
|
+
"effect": "shared",
|
|
7753
|
+
"tier": "prompt"
|
|
7754
|
+
},
|
|
7755
|
+
{
|
|
7756
|
+
"scope": "design",
|
|
7757
|
+
"verb": "design sync publish-ai-edit",
|
|
7758
|
+
"effect": "shared",
|
|
7759
|
+
"tier": "prompt"
|
|
7760
|
+
},
|
|
7761
|
+
{
|
|
7762
|
+
"scope": "design",
|
|
7763
|
+
"verb": "design sync discard-ai-edit",
|
|
7764
|
+
"effect": "shared",
|
|
7765
|
+
"tier": "prompt"
|
|
7766
|
+
},
|
|
7683
7767
|
{
|
|
7684
7768
|
"scope": "design",
|
|
7685
7769
|
"verb": "design curl-local",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// create-claim.ts — a canvas an AI session creates is that run's AI write (S12.16, live journey S1).
|
|
2
2
|
//
|
|
3
|
-
// The AI chat makes a canvas the documented way: `maude design
|
|
3
|
+
// The AI chat makes a canvas the documented way: `maude design canvas-new` → `POST /_api/canvas`.
|
|
4
4
|
// That call is an HTTP write with no tool-call behind it, so the chat tracker (acp/index.ts) never
|
|
5
5
|
// saw a path to claim, and with more than one run open the stage could not tell whose file the
|
|
6
6
|
// watcher had imported: Version history recorded the create as `outside`.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// Internal shim behind asset-trash.sh / asset-rename.sh (`maude design asset-trash`, `asset-rename`).
|
|
2
|
+
//
|
|
3
|
+
// The Assets panel's own Move to trash and Rename… on a picture, for the AI chat and a terminal
|
|
4
|
+
// (fix-bulk 2026-11-10 follow-up):
|
|
5
|
+
// trash POST /_api/assets/trash { assets: [...] } per item: moved, or used | kept-by-versions | checking
|
|
6
|
+
// rename POST /_api/assets/rename { asset, name } the new base name; the extension is kept
|
|
7
|
+
// Both refuse a picture a canvas uses or an older version still shows (asset-trash.ts, asset-rename.ts):
|
|
8
|
+
// `maude design assets --not-used` lists the ones that can go.
|
|
9
|
+
//
|
|
10
|
+
// Why verbs and not `curl-local`: since 2.1.0 the studio's main origin needs its key from every caller
|
|
11
|
+
// (contract sec-loopback-bearer §7). `curl-local` sends none, by design, so the recipes it carried
|
|
12
|
+
// answered 401 against the app. These find the studio and its key the way every verb does
|
|
13
|
+
// (studio-locate.mjs) and send it with each request (`call`).
|
|
14
|
+
|
|
15
|
+
import { call, clean, connect, field, parseWords, runVerb, UsageError } from './_studio-verb.mjs';
|
|
16
|
+
|
|
17
|
+
export const TRASH_USAGE = `usage: maude design asset-trash <asset>... [--json] [--root <project>]
|
|
18
|
+
Moves pictures (and their sidecars) to the Trash, as Assets › Move to trash does. Trash brings
|
|
19
|
+
them back. A picture a canvas uses, or an older version still shows, stays where it is:
|
|
20
|
+
\`maude design assets --not-used\` lists the ones that can go.
|
|
21
|
+
<asset> assets/<name>.<ext> (or .design/assets/<name>.<ext>), up to 500
|
|
22
|
+
Exit 0 every one moved · 1 one or more stayed / refused · 2 usage · 3 no studio running.
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
export const RENAME_USAGE = `usage: maude design asset-rename <asset> <new name> [--json] [--root <project>]
|
|
26
|
+
Renames a picture and its sidecars, as Assets › Rename… does; the extension is kept. A picture a
|
|
27
|
+
canvas uses, or an older version still shows, keeps its name (its references would break).
|
|
28
|
+
<asset> assets/<name>.<ext> (or .design/assets/<name>.<ext>)
|
|
29
|
+
<new name> the new name, without the extension
|
|
30
|
+
Exit 0 renamed · 1 refused · 2 usage · 3 no studio running.
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
const MAX_ASSETS = 500;
|
|
34
|
+
|
|
35
|
+
/** `assets/x.png`, `.design/assets/x.png` or `./assets/x.png` → `assets/x.png`, or a UsageError. */
|
|
36
|
+
export function assetOperand(word) {
|
|
37
|
+
const rel = String(word)
|
|
38
|
+
.replace(/^\.\//, '')
|
|
39
|
+
.replace(/^\.design\//, '');
|
|
40
|
+
if (!rel.startsWith('assets/') || rel.split('/').includes('..') || rel.length <= 7)
|
|
41
|
+
throw new UsageError(`${clean(word)} is not an asset path (assets/<name>.<ext>)`);
|
|
42
|
+
return rel;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** The words after `asset-trash` → the `/_api/assets/trash` body. Pure; throws UsageError. */
|
|
46
|
+
export function trashBody(words) {
|
|
47
|
+
const { flags, pos } = parseWords(words, { bool: ['--json'], value: ['--root'] });
|
|
48
|
+
if (!pos.length) throw new UsageError('name at least one asset');
|
|
49
|
+
if (pos.length > MAX_ASSETS) throw new UsageError(`at most ${MAX_ASSETS} assets at once`);
|
|
50
|
+
return { flags, body: { assets: pos.map(assetOperand) } };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** The words after `asset-rename` → the `/_api/assets/rename` body. Pure; throws UsageError. */
|
|
54
|
+
export function renameBody(words) {
|
|
55
|
+
const { flags, pos } = parseWords(words, { bool: ['--json'], value: ['--root'] });
|
|
56
|
+
if (pos.length !== 2) throw new UsageError('name one asset and its new name');
|
|
57
|
+
const name = String(pos[1]).trim();
|
|
58
|
+
if (!name) throw new UsageError('the new name is empty');
|
|
59
|
+
return { flags, body: { asset: assetOperand(pos[0]), name } };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
function refused(name, r) {
|
|
63
|
+
const b = r?.body ?? {};
|
|
64
|
+
const why = clean(
|
|
65
|
+
b.reason ?? b.error ?? (r ? r.text?.trim() || `HTTP ${r.status}` : 'no answer')
|
|
66
|
+
);
|
|
67
|
+
process.stderr.write(`maude design ${name}: refused — ${why}\n`);
|
|
68
|
+
return 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function runTrash(words) {
|
|
72
|
+
const { flags, body } = trashBody(words);
|
|
73
|
+
const c = await connect('asset-trash', flags['--root']);
|
|
74
|
+
if (c.exit) return c.exit;
|
|
75
|
+
const r = await call(c.studio, '/_api/assets/trash', { method: 'POST', json: body });
|
|
76
|
+
const b = r?.body ?? {};
|
|
77
|
+
if (r?.status !== 200 || !b.ok || !Array.isArray(b.results)) return refused('asset-trash', r);
|
|
78
|
+
if (flags['--json']) process.stdout.write(`${JSON.stringify(b)}\n`);
|
|
79
|
+
else
|
|
80
|
+
for (const it of b.results)
|
|
81
|
+
process.stdout.write(
|
|
82
|
+
it.ok
|
|
83
|
+
? `→ moved ${field(it.rel)} to the Trash\n`
|
|
84
|
+
: `· kept ${field(it.rel)} — ${field(it.reason)}\n`
|
|
85
|
+
);
|
|
86
|
+
return b.results.every((it) => it.ok) ? 0 : 1;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async function runRename(words) {
|
|
90
|
+
const { flags, body } = renameBody(words);
|
|
91
|
+
const c = await connect('asset-rename', flags['--root']);
|
|
92
|
+
if (c.exit) return c.exit;
|
|
93
|
+
const r = await call(c.studio, '/_api/assets/rename', { method: 'POST', json: body });
|
|
94
|
+
const b = r?.body ?? {};
|
|
95
|
+
if (r?.status === 200 && b.ok) {
|
|
96
|
+
if (flags['--json']) process.stdout.write(`${JSON.stringify(b)}\n`);
|
|
97
|
+
else process.stdout.write(`→ renamed ${field(b.rel ?? body.asset)} to ${field(b.to)}\n`);
|
|
98
|
+
return 0;
|
|
99
|
+
}
|
|
100
|
+
return refused('asset-rename', r);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
if (import.meta.main) {
|
|
104
|
+
const sub = process.argv[2];
|
|
105
|
+
if (sub === 'trash') {
|
|
106
|
+
process.argv.splice(2, 1);
|
|
107
|
+
runVerb('asset-trash', TRASH_USAGE, runTrash);
|
|
108
|
+
} else if (sub === 'rename') {
|
|
109
|
+
process.argv.splice(2, 1);
|
|
110
|
+
runVerb('asset-rename', RENAME_USAGE, runRename);
|
|
111
|
+
} else {
|
|
112
|
+
process.stderr.write(
|
|
113
|
+
'_asset-file.mjs: run it through `maude design asset-trash|asset-rename`\n'
|
|
114
|
+
);
|
|
115
|
+
process.exit(2);
|
|
116
|
+
}
|
|
117
|
+
}
|