@1agh/maude 2.1.0 → 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/access/request.ts +1 -0
- package/apps/studio/actions/agents.ts +45 -42
- package/apps/studio/actions/defs/app.ts +28 -1
- package/apps/studio/actions/defs/sync.ts +4 -0
- package/apps/studio/actions/verbs.ts +49 -0
- package/apps/studio/actions.manifest.json +162 -20
- package/apps/studio/actions.parity.json +13 -1
- 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/_curl-local.mjs +7 -4
- 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/app.jsx +16 -4
- 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 +112 -0
- package/apps/studio/client/home/ProjectRows.jsx +514 -0
- package/apps/studio/client/home/home-accounts-model.js +234 -76
- package/apps/studio/client/home/home-api.js +10 -2
- package/apps/studio/client/home/home-app.jsx +151 -394
- package/apps/studio/client/home/home-icons.jsx +8 -0
- package/apps/studio/client/home/home-model.js +149 -1
- package/apps/studio/client/home/home-where-model.js +105 -0
- package/apps/studio/client/home/home.css +621 -53
- package/apps/studio/client/home/use-account-fix.js +123 -0
- package/apps/studio/client/hooks/use-palette-and-panels.jsx +3 -1
- package/apps/studio/client/hooks/use-tabs.jsx +11 -4
- package/apps/studio/client/panels/TeamProjects.jsx +137 -134
- package/apps/studio/client/share-link.js +12 -0
- package/apps/studio/client/styles/_index.css +4 -0
- package/apps/studio/client/v2/assets/generate-ask.jsx +3 -1
- package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +1 -0
- package/apps/studio/client/v2/diagnostics/diagnostics-model.js +32 -2
- package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +35 -8
- package/apps/studio/client/v2/diagnostics/diagnostics.css +34 -0
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +94 -3
- package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +187 -4
- 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/link-server/LinkServerDialog.jsx +492 -0
- package/apps/studio/client/v2/link-server/LinkServerHost.jsx +42 -0
- package/apps/studio/client/v2/link-server/link-server-api.js +142 -0
- package/apps/studio/client/v2/link-server/link-server-model.js +438 -0
- package/apps/studio/client/v2/link-server/link-server.css +109 -0
- package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +31 -86
- package/apps/studio/client/v2/onboarding/onboarding-model.js +1 -18
- package/apps/studio/client/v2/search/search-keywords.js +3 -2
- package/apps/studio/client/v2/settings/account.jsx +4 -2
- package/apps/studio/client/v2/settings/advanced-section.jsx +245 -148
- package/apps/studio/client/v2/settings/connection-row.jsx +3 -59
- package/apps/studio/client/v2/settings/connections-section.jsx +118 -425
- package/apps/studio/client/v2/settings/general-section.jsx +138 -43
- package/apps/studio/client/v2/settings/project-sync-settings.jsx +4 -3
- package/apps/studio/client/v2/settings/reset-section.jsx +14 -3
- package/apps/studio/client/v2/settings/settings-card.jsx +142 -0
- package/apps/studio/client/v2/settings/settings-cards.js +220 -0
- package/apps/studio/client/v2/settings/settings-handlers.js +7 -6
- package/apps/studio/client/v2/settings/settings-model.js +91 -31
- package/apps/studio/client/v2/settings/settings-sheet.jsx +25 -6
- package/apps/studio/client/v2/settings/settings.css +374 -64
- package/apps/studio/client/v2/settings/this-project-card.jsx +730 -0
- package/apps/studio/client/v2/settings/this-project-model.js +172 -0
- package/apps/studio/client/v2/settings/use-connections.js +3 -2
- package/apps/studio/client/v2/settings/use-open-card.js +37 -0
- package/apps/studio/client/v2/shell/connection-state.js +197 -0
- package/apps/studio/client/v2/shell/menu-runner.js +7 -2
- package/apps/studio/client/v2/shell/occlusion-insets.js +37 -9
- package/apps/studio/client/v2/shell/project-account-bus.js +36 -0
- package/apps/studio/client/v2/shell/project-account-card.jsx +357 -148
- package/apps/studio/client/v2/shell/project-account-model.js +272 -149
- package/apps/studio/client/v2/shell/project-account-toast.js +66 -0
- package/apps/studio/client/v2/shell/project-account.css +237 -0
- package/apps/studio/client/v2/shell/share-cluster-host.jsx +166 -83
- package/apps/studio/client/v2/shell/shell-parity.js +3 -2
- package/apps/studio/client/v2/shell/shell-parity.json +40 -26
- package/apps/studio/client/v2/shell/use-account.js +2 -0
- package/apps/studio/client/v2/shell/use-occluded-insets.js +13 -3
- package/apps/studio/client/v2/signin/use-signin.js +1 -1
- package/apps/studio/cloud/endpoints.ts +29 -4
- package/apps/studio/collab/room.ts +21 -7
- package/apps/studio/dist/client.bundle.js +886 -886
- 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/home/accounts.ts +30 -11
- package/apps/studio/home/cloud.ts +6 -1
- package/apps/studio/home/hub-health.ts +76 -0
- package/apps/studio/home/routes.ts +9 -3
- package/apps/studio/http.ts +14 -2
- package/apps/studio/migrate/hub.ts +8 -1
- package/apps/studio/routes/agent.ts +6 -2
- package/apps/studio/routes/hub-link-folder.ts +334 -0
- package/apps/studio/routes/hub-signin.ts +78 -1
- package/apps/studio/routes/index.ts +4 -0
- package/apps/studio/routes/project-undo.ts +10 -0
- package/apps/studio/routes/sync.ts +22 -4
- package/apps/studio/server.ts +25 -0
- package/apps/studio/shell/api-key.ts +11 -0
- package/apps/studio/shell/cli-yield.ts +48 -11
- package/apps/studio/sync/accepted-cold-start.ts +144 -8
- package/apps/studio/sync/action-stage.ts +18 -1
- package/apps/studio/sync/ctl-heal.ts +58 -0
- package/apps/studio/sync/file-ledger.ts +38 -4
- package/apps/studio/sync/file-plane.ts +226 -19
- package/apps/studio/sync/held-deletes.ts +86 -5
- package/apps/studio/sync/hub-link.ts +8 -0
- package/apps/studio/sync/index.ts +68 -4
- package/apps/studio/sync/link-consent.ts +22 -75
- package/apps/studio/sync/link-survey.ts +252 -0
- package/apps/studio/sync/local-kernel.ts +16 -1
- package/apps/studio/sync/seed-progress.ts +12 -0
- package/apps/studio/sync/source-recovery.ts +18 -2
- package/apps/studio/sync/status.ts +11 -1
- package/apps/studio/sync/writer-registry.ts +5 -0
- package/apps/studio/whats-new.json +36 -0
- package/cli/commands/design.mjs +74 -16
- package/cli/lib/bash-guard.mjs +23 -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 +9 -8
- package/apps/studio/client/home/HomeAccounts.jsx +0 -262
- package/apps/studio/client/v2/onboarding/HubSheet.jsx +0 -212
- package/apps/studio/client/v2/shell/account-card-model.js +0 -114
- package/apps/studio/client/v2/shell/account-card.jsx +0 -189
|
@@ -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
|
{
|
|
@@ -4457,7 +4457,7 @@
|
|
|
4457
4457
|
},
|
|
4458
4458
|
{
|
|
4459
4459
|
"id": "account.switch",
|
|
4460
|
-
"label": "
|
|
4460
|
+
"label": "Switch account…",
|
|
4461
4461
|
"kind": "command",
|
|
4462
4462
|
"exec": "shell",
|
|
4463
4463
|
"effect": "none",
|
|
@@ -4467,6 +4467,30 @@
|
|
|
4467
4467
|
"note": "the desktop app’s profiles; an agent never picks an account"
|
|
4468
4468
|
}
|
|
4469
4469
|
},
|
|
4470
|
+
{
|
|
4471
|
+
"id": "account.add-cloud",
|
|
4472
|
+
"label": "Add a Maude Cloud account…",
|
|
4473
|
+
"kind": "command",
|
|
4474
|
+
"exec": "shell",
|
|
4475
|
+
"effect": "none",
|
|
4476
|
+
"agent": {
|
|
4477
|
+
"path": "human",
|
|
4478
|
+
"because": "native-window",
|
|
4479
|
+
"note": "Maude Cloud’s sign-in page; an agent never signs anyone in"
|
|
4480
|
+
}
|
|
4481
|
+
},
|
|
4482
|
+
{
|
|
4483
|
+
"id": "account.link-server",
|
|
4484
|
+
"label": "Link your server…",
|
|
4485
|
+
"kind": "command",
|
|
4486
|
+
"exec": "shell",
|
|
4487
|
+
"effect": "none",
|
|
4488
|
+
"agent": {
|
|
4489
|
+
"path": "human",
|
|
4490
|
+
"because": "native-window",
|
|
4491
|
+
"note": "the server’s sign-in page; an agent never signs anyone in"
|
|
4492
|
+
}
|
|
4493
|
+
},
|
|
4470
4494
|
{
|
|
4471
4495
|
"id": "account.github-signin",
|
|
4472
4496
|
"label": "Sign in with GitHub…",
|
|
@@ -6328,7 +6352,7 @@
|
|
|
6328
6352
|
"effect": "project",
|
|
6329
6353
|
"agent": {
|
|
6330
6354
|
"path": "cli",
|
|
6331
|
-
"verb": "maude design
|
|
6355
|
+
"verb": "maude design retry-save"
|
|
6332
6356
|
},
|
|
6333
6357
|
"minRole": "edit",
|
|
6334
6358
|
"server": {
|
|
@@ -6350,7 +6374,7 @@
|
|
|
6350
6374
|
},
|
|
6351
6375
|
"agent": {
|
|
6352
6376
|
"path": "cli",
|
|
6353
|
-
"verb": "maude design
|
|
6377
|
+
"verb": "maude design sync keep-mine <slug>"
|
|
6354
6378
|
}
|
|
6355
6379
|
},
|
|
6356
6380
|
{
|
|
@@ -6367,7 +6391,7 @@
|
|
|
6367
6391
|
},
|
|
6368
6392
|
"agent": {
|
|
6369
6393
|
"path": "cli",
|
|
6370
|
-
"verb": "maude design
|
|
6394
|
+
"verb": "maude design sync use-theirs <slug>"
|
|
6371
6395
|
}
|
|
6372
6396
|
},
|
|
6373
6397
|
{
|
|
@@ -6384,7 +6408,7 @@
|
|
|
6384
6408
|
},
|
|
6385
6409
|
"agent": {
|
|
6386
6410
|
"path": "cli",
|
|
6387
|
-
"verb": "maude design
|
|
6411
|
+
"verb": "maude design sync keep-both <slug>"
|
|
6388
6412
|
}
|
|
6389
6413
|
},
|
|
6390
6414
|
{
|
|
@@ -6395,7 +6419,7 @@
|
|
|
6395
6419
|
"effect": "none",
|
|
6396
6420
|
"agent": {
|
|
6397
6421
|
"path": "cli",
|
|
6398
|
-
"verb": "maude design
|
|
6422
|
+
"verb": "maude design sync compare <slug>"
|
|
6399
6423
|
}
|
|
6400
6424
|
},
|
|
6401
6425
|
{
|
|
@@ -6411,7 +6435,7 @@
|
|
|
6411
6435
|
},
|
|
6412
6436
|
"agent": {
|
|
6413
6437
|
"path": "cli",
|
|
6414
|
-
"verb": "maude design
|
|
6438
|
+
"verb": "maude design sync publish-ai-edit"
|
|
6415
6439
|
}
|
|
6416
6440
|
},
|
|
6417
6441
|
{
|
|
@@ -6427,7 +6451,7 @@
|
|
|
6427
6451
|
},
|
|
6428
6452
|
"agent": {
|
|
6429
6453
|
"path": "cli",
|
|
6430
|
-
"verb": "maude design
|
|
6454
|
+
"verb": "maude design sync discard-ai-edit"
|
|
6431
6455
|
}
|
|
6432
6456
|
},
|
|
6433
6457
|
{
|
|
@@ -6443,7 +6467,7 @@
|
|
|
6443
6467
|
},
|
|
6444
6468
|
"agent": {
|
|
6445
6469
|
"path": "cli",
|
|
6446
|
-
"verb": "maude design
|
|
6470
|
+
"verb": "maude design sync cancel-transfer"
|
|
6447
6471
|
}
|
|
6448
6472
|
},
|
|
6449
6473
|
{
|
|
@@ -6548,6 +6572,40 @@
|
|
|
6548
6572
|
"note": "which deleted files stay on the hub is the person’s choice"
|
|
6549
6573
|
}
|
|
6550
6574
|
},
|
|
6575
|
+
{
|
|
6576
|
+
"id": "sync.remove-held-here",
|
|
6577
|
+
"label": "Remove here too",
|
|
6578
|
+
"kind": "command",
|
|
6579
|
+
"exec": "shell",
|
|
6580
|
+
"effect": "project",
|
|
6581
|
+
"minRole": "edit",
|
|
6582
|
+
"server": {
|
|
6583
|
+
"route": "/_api/sync/held-deletes",
|
|
6584
|
+
"method": "POST"
|
|
6585
|
+
},
|
|
6586
|
+
"agent": {
|
|
6587
|
+
"path": "human",
|
|
6588
|
+
"because": "hub-link",
|
|
6589
|
+
"note": "removing a batch of the project’s files from this Mac is the person’s choice"
|
|
6590
|
+
}
|
|
6591
|
+
},
|
|
6592
|
+
{
|
|
6593
|
+
"id": "sync.keep-held-here",
|
|
6594
|
+
"label": "Keep them here",
|
|
6595
|
+
"kind": "command",
|
|
6596
|
+
"exec": "shell",
|
|
6597
|
+
"effect": "none",
|
|
6598
|
+
"minRole": "edit",
|
|
6599
|
+
"server": {
|
|
6600
|
+
"route": "/_api/sync/held-deletes",
|
|
6601
|
+
"method": "POST"
|
|
6602
|
+
},
|
|
6603
|
+
"agent": {
|
|
6604
|
+
"path": "human",
|
|
6605
|
+
"because": "hub-link",
|
|
6606
|
+
"note": "which deleted files stay on this Mac is the person’s choice"
|
|
6607
|
+
}
|
|
6608
|
+
},
|
|
6551
6609
|
{
|
|
6552
6610
|
"id": "sync.adopt-as-code",
|
|
6553
6611
|
"label": "Adopt as code",
|
|
@@ -7518,6 +7576,18 @@
|
|
|
7518
7576
|
"effect": "project",
|
|
7519
7577
|
"tier": "auto"
|
|
7520
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
|
+
},
|
|
7521
7591
|
{
|
|
7522
7592
|
"scope": "design",
|
|
7523
7593
|
"verb": "design handoff",
|
|
@@ -7622,6 +7692,78 @@
|
|
|
7622
7692
|
"effect": "project",
|
|
7623
7693
|
"tier": "auto"
|
|
7624
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
|
+
},
|
|
7625
7767
|
{
|
|
7626
7768
|
"scope": "design",
|
|
7627
7769
|
"verb": "design curl-local",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "Lead-owned (contract V2-1.11 §5.7). humanMax/pendingMax may only be lowered; raising either, or adding a humanDecisions reason, is a lead change citing a decision id.",
|
|
3
|
-
"humanMax":
|
|
3
|
+
"humanMax": 192,
|
|
4
4
|
"pendingMax": 0,
|
|
5
5
|
"pending": [],
|
|
6
6
|
"humanDecisions": {
|
|
@@ -304,6 +304,18 @@
|
|
|
304
304
|
"from": 186,
|
|
305
305
|
"by": "decision:maude/v2-T5.3-held-row-actions-human",
|
|
306
306
|
"why": "#167 T5.3 registers sync.adopt-as-code and sync.open-canvas-folders (Sync details › a file the hub holds back from the code lane). Human 'hub-link' for Adopt as code: adopting teammate bytes as the owner's code is the owner's call (implicit adoption was rejected, v2-p8-holds-fix-no-implicit-owner-adoption). Human 'native-window' for Open canvas folders: it opens the person's editor on config.json, like canvas.open-in-editor. Two human rows."
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"to": 190,
|
|
310
|
+
"from": 188,
|
|
311
|
+
"by": "decision:maude/v2-2.1.1-t13-incoming-held-delete-answers",
|
|
312
|
+
"why": "2.1.1 T13 registers sync.remove-held-here and sync.keep-held-here (Sync details › Deleted by the project, held: Remove here too / Keep them here). Human 'hub-link': removing a batch of the project's files from this Mac, and which deleted files stay on it, is the person's choice. Two human rows."
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"to": 192,
|
|
316
|
+
"from": 190,
|
|
317
|
+
"by": "decision:maude/v2-211-t4-switch-account-existing-profile",
|
|
318
|
+
"why": "2.1.1 B1/B2 register account.add-cloud (a new Maude Cloud account signs in in the person's browser) and account.link-server (a server sign-in on that server's page). Human 'native-window': an agent never signs anyone in. Two human rows."
|
|
307
319
|
}
|
|
308
320
|
],
|
|
309
321
|
"humanMaxRaisedNote": "V2-5 A1 integration: the three slice raises stack on 86 (84 -> 86 by decision:maude/v2-4-gate-github-doors, human 'accounts'). S4.1/S4.3/S4.4 and S2.2-S2.4 add no human row. 86 + 4 + 6 + 4 = 100 human actions in the merged registry. V2-5 A2 integration: S5.4 builds `maude design runs list|stop`, so ai.runs.list and ai.stop turn cli (decision:maude/v2-S5.3-run-actions-human-until-s5.4 resolved by decision:maude/v2-S5.4-runs-fallback-prompts) and the cap lowers 100 -> 98; S3.1, S4.2, S4.5, S9.4, S2.5 and S1.4 add no human row. V2-5 A4 integration: measured 107 human actions in the merged registry (98 on feat + tool.pointer from S3.2b + 7 chat.advanced.* from S5.12 + object.select-matching from S2.6); every other A4 slice adds no human row. V2-5 A5 integration: measured 113 human actions in the merged registry (107 on feat + trash.clear from S1.7b + four ai.attach-* from S5.10 + present.presenter-view from S3.6b); every other A5 slice adds no human row. V2-5 A6a integration: measured 118 human actions in the merged registry (113 on feat + artboard.ask-ai S2.10 + element.set-id S2.2b/lead + edit.undo-history S2.20 + history.filter S1.12b − view.trash S1.17 (cli) + tab.overview + tab.rename S1.22b); every other A6a slice adds no human row."
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
// Internal shim behind canvas-new.sh / canvas-move.sh (`maude design canvas-new`, `canvas-move`).
|
|
2
|
+
//
|
|
3
|
+
// The app's own whole-file canvas operations, for the AI chat and a terminal (fix-bulk W1 follow-up):
|
|
4
|
+
// new POST /_api/canvas { kind, name?, group?, clips? } (effect project → auto)
|
|
5
|
+
// POST /_api/canvas { duplicateOf } (--duplicate; the same route)
|
|
6
|
+
// move POST /_api/fs-move { file, toName?, toDir? } (effect project → auto)
|
|
7
|
+
// The same routes Canvases › New canvas / Duplicate / Rename / Move to… call, so Version history
|
|
8
|
+
// records the create or move, and a create in a chat is claimed for that chat's live run
|
|
9
|
+
// (X-Maude-Chat, ai/create-claim.ts — `call` adds it on a write).
|
|
10
|
+
//
|
|
11
|
+
// Why verbs and not `curl-local`: since 2.1.0 the studio's main origin needs its key from every
|
|
12
|
+
// caller (contract sec-loopback-bearer §7). `curl-local` sends none, by design — it is a plain
|
|
13
|
+
// loopback curl and stays one. These verbs find the studio and its key the one way every verb does
|
|
14
|
+
// (studio-locate.mjs: the app's attested server, else a terminal server whose `/_health` names this
|
|
15
|
+
// project) and send it with each request (`studioHeaders`, via `call`).
|
|
16
|
+
|
|
17
|
+
import { call, clean, connect, field, parseWords, runVerb, UsageError } from './_studio-verb.mjs';
|
|
18
|
+
|
|
19
|
+
export const NEW_USAGE = `usage: maude design canvas-new [<name>] [--kind blank|brief-board|video-comp] [--group <folder>]
|
|
20
|
+
[--ds <design system>] [--from-prompt <sentence>] [--json] [--root <project>]
|
|
21
|
+
maude design canvas-new --duplicate <canvas path> [--json] [--root <project>]
|
|
22
|
+
Makes a canvas the way Canvases › New canvas does, and prints the file it made (.design/…tsx);
|
|
23
|
+
then Edit that file. No name: the app picks one ("Untitled", or the next free one).
|
|
24
|
+
--kind blank (default) · brief-board (a brief to annotate) · video-comp (an empty video)
|
|
25
|
+
--group one of the project's canvas folders (default: the new-canvas folder, usually ui)
|
|
26
|
+
--ds the canvas's design system (default: what New canvas picks; an unknown one → the default)
|
|
27
|
+
--from-prompt with no name, a blank canvas is named from this sentence ("A poster for…" → Poster)
|
|
28
|
+
--duplicate a copy of that canvas next to it, as Canvases › Duplicate does
|
|
29
|
+
Exit 0 made · 1 refused · 2 usage · 3 no studio running.
|
|
30
|
+
`;
|
|
31
|
+
|
|
32
|
+
export const MOVE_USAGE = `usage: maude design canvas-move <canvas path> [--name <new name>] [--to <folder>]
|
|
33
|
+
[--json] [--root <project>]
|
|
34
|
+
Renames or moves a canvas (the .tsx and everything that belongs to it) the way Canvases › Rename
|
|
35
|
+
and Move to… do, so Version history keeps it one canvas. Give --name, --to, or both.
|
|
36
|
+
--name the new name, without .tsx
|
|
37
|
+
--to the design-root-relative folder to move it to (ui/archive)
|
|
38
|
+
Exit 0 moved · 1 refused · 2 usage · 3 no studio running.
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
const KINDS = new Set(['blank', 'brief-board', 'video-comp']);
|
|
42
|
+
|
|
43
|
+
/** `ui/home.tsx`, `.design/ui/home.tsx` or `./ui/home.tsx` → `ui/home.tsx`, or a UsageError. */
|
|
44
|
+
export function canvasOperand(word) {
|
|
45
|
+
const path = String(word)
|
|
46
|
+
.replace(/^\.\//, '')
|
|
47
|
+
.replace(/^\.design\//, '');
|
|
48
|
+
if (!/\.tsx$/i.test(path) || path.split('/').includes('..') || path.startsWith('/'))
|
|
49
|
+
throw new UsageError(`${clean(word)} is not a canvas path (ui/<name>.tsx)`);
|
|
50
|
+
return path;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** The words after `canvas-new` → the `/_api/canvas` body. Pure; throws UsageError. */
|
|
54
|
+
export function newBody(words) {
|
|
55
|
+
const { flags, pos } = parseWords(words, {
|
|
56
|
+
bool: ['--json'],
|
|
57
|
+
value: ['--kind', '--group', '--ds', '--from-prompt', '--duplicate', '--root'],
|
|
58
|
+
});
|
|
59
|
+
if (pos.length > 1) throw new UsageError('give at most one name');
|
|
60
|
+
if (flags['--duplicate'] !== undefined) {
|
|
61
|
+
if (pos.length || ['--kind', '--group', '--ds', '--from-prompt'].some((f) => f in flags))
|
|
62
|
+
throw new UsageError('--duplicate takes no name, --kind, --group, --ds or --from-prompt');
|
|
63
|
+
return { flags, body: { duplicateOf: canvasOperand(flags['--duplicate']) } };
|
|
64
|
+
}
|
|
65
|
+
const kind = flags['--kind'] ?? 'blank';
|
|
66
|
+
if (!KINDS.has(kind)) throw new UsageError(`--kind must be blank, brief-board or video-comp`);
|
|
67
|
+
if (kind !== 'blank' && !pos.length) throw new UsageError(`a ${kind} needs a name`);
|
|
68
|
+
const body = { kind };
|
|
69
|
+
if (pos.length) body.name = pos[0];
|
|
70
|
+
if (flags['--group'] !== undefined) body.group = flags['--group'];
|
|
71
|
+
if (flags['--ds'] !== undefined) body.designSystem = flags['--ds'];
|
|
72
|
+
if (flags['--from-prompt'] !== undefined) {
|
|
73
|
+
if (pos.length || kind !== 'blank')
|
|
74
|
+
throw new UsageError('--from-prompt names an unnamed blank canvas: give it without a name');
|
|
75
|
+
body.fromPrompt = flags['--from-prompt'];
|
|
76
|
+
}
|
|
77
|
+
if (kind === 'video-comp') body.clips = [];
|
|
78
|
+
return { flags, body };
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** The words after `canvas-move` → the `/_api/fs-move` body. Pure; throws UsageError. */
|
|
82
|
+
export function moveBody(words) {
|
|
83
|
+
const { flags, pos } = parseWords(words, {
|
|
84
|
+
bool: ['--json'],
|
|
85
|
+
value: ['--name', '--to', '--root'],
|
|
86
|
+
});
|
|
87
|
+
if (pos.length !== 1) throw new UsageError('name one canvas path');
|
|
88
|
+
const to = flags['--to'];
|
|
89
|
+
if (flags['--name'] === undefined && to === undefined)
|
|
90
|
+
throw new UsageError('give --name, --to, or both');
|
|
91
|
+
const body = { file: canvasOperand(pos[0]) };
|
|
92
|
+
if (flags['--name'] !== undefined) body.toName = String(flags['--name']).replace(/\.tsx$/i, '');
|
|
93
|
+
if (to !== undefined) body.toDir = to;
|
|
94
|
+
return { flags, body };
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function refused(name, r) {
|
|
98
|
+
const b = r?.body ?? {};
|
|
99
|
+
const why = clean(b.error ?? (r ? r.text?.trim() || `HTTP ${r.status}` : 'no answer'));
|
|
100
|
+
process.stderr.write(`maude design ${name}: refused — ${why}\n`);
|
|
101
|
+
return 1;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
async function runNew(words) {
|
|
105
|
+
const { flags, body } = newBody(words);
|
|
106
|
+
const c = await connect('canvas-new', flags['--root']);
|
|
107
|
+
if (c.exit) return c.exit;
|
|
108
|
+
const r = await call(c.studio, '/_api/canvas', { method: 'POST', json: body });
|
|
109
|
+
const b = r?.body ?? {};
|
|
110
|
+
if (r?.status === 201 && b.ok) {
|
|
111
|
+
if (flags['--json']) process.stdout.write(`${JSON.stringify(b)}\n`);
|
|
112
|
+
else process.stdout.write(`→ made ${field(b.file ?? b.rel)} — Edit that file\n`);
|
|
113
|
+
return 0;
|
|
114
|
+
}
|
|
115
|
+
return refused('canvas-new', r);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async function runMove(words) {
|
|
119
|
+
const { flags, body } = moveBody(words);
|
|
120
|
+
const c = await connect('canvas-move', flags['--root']);
|
|
121
|
+
if (c.exit) return c.exit;
|
|
122
|
+
const r = await call(c.studio, '/_api/fs-move', { method: 'POST', json: body });
|
|
123
|
+
const b = r?.body ?? {};
|
|
124
|
+
if (r?.status === 200 && b.ok) {
|
|
125
|
+
if (flags['--json']) process.stdout.write(`${JSON.stringify(b)}\n`);
|
|
126
|
+
else process.stdout.write(`→ moved ${field(b.fromRel)} to ${field(b.toRel)}\n`);
|
|
127
|
+
return 0;
|
|
128
|
+
}
|
|
129
|
+
return refused('canvas-move', r);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
if (import.meta.main) {
|
|
133
|
+
const sub = process.argv[2];
|
|
134
|
+
if (sub === 'new') {
|
|
135
|
+
process.argv.splice(2, 1);
|
|
136
|
+
runVerb('canvas-new', NEW_USAGE, runNew);
|
|
137
|
+
} else if (sub === 'move') {
|
|
138
|
+
process.argv.splice(2, 1);
|
|
139
|
+
runVerb('canvas-move', MOVE_USAGE, runMove);
|
|
140
|
+
} else {
|
|
141
|
+
process.stderr.write(
|
|
142
|
+
'_canvas-file.mjs: run it through `maude design canvas-new|canvas-move`\n'
|
|
143
|
+
);
|
|
144
|
+
process.exit(2);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -467,9 +467,12 @@ async function main() {
|
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
// Run only when invoked directly (not when imported by the test). This shim
|
|
470
|
-
// runs under real `node` on a real on-disk path
|
|
471
|
-
//
|
|
472
|
-
//
|
|
473
|
-
|
|
470
|
+
// runs under real `node` on a real on-disk path; since 2.1.1 the server also imports its loopback
|
|
471
|
+
// refusals (the address check), so the module is reachable inside `bun --compile` too. There the
|
|
472
|
+
// argv[1] compare is unreliable — `import.meta.main` is the entry flag under bun, and the compare
|
|
473
|
+
// stays only for plain `node` (Node <24 leaves it undefined).
|
|
474
|
+
const runDirectly =
|
|
475
|
+
import.meta.main ?? (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href);
|
|
476
|
+
if (runDirectly) {
|
|
474
477
|
main();
|
|
475
478
|
}
|