@1agh/maude 2.0.8 → 2.1.1

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.
Files changed (401) hide show
  1. package/README.md +2 -1
  2. package/apps/hub/src/project-transactions/kernel.mjs +13 -7
  3. package/apps/studio/access/closure.ts +86 -10
  4. package/apps/studio/access/filters.ts +18 -1
  5. package/apps/studio/access/request.ts +8 -0
  6. package/apps/studio/acp/design-write-verb.ts +12 -2
  7. package/apps/studio/acp/env.ts +7 -2
  8. package/apps/studio/acp/index.ts +15 -4
  9. package/apps/studio/acp/login-state.ts +22 -5
  10. package/apps/studio/acp/may-scope.ts +38 -1
  11. package/apps/studio/acp/plugin-bootstrap.ts +13 -1
  12. package/apps/studio/acp/probe.ts +11 -4
  13. package/apps/studio/actions/agents.ts +110 -28
  14. package/apps/studio/actions/canvas-keys.ts +4 -2
  15. package/apps/studio/actions/ctx.ts +3 -0
  16. package/apps/studio/actions/defs/annotation.ts +84 -2
  17. package/apps/studio/actions/defs/app.ts +28 -1
  18. package/apps/studio/actions/defs/edit.ts +13 -0
  19. package/apps/studio/actions/defs/export.ts +12 -0
  20. package/apps/studio/actions/defs/sync.ts +18 -0
  21. package/apps/studio/actions/defs/video.ts +9 -0
  22. package/apps/studio/actions/documents.ts +6 -1
  23. package/apps/studio/actions/keymap.gen.ts +147 -9
  24. package/apps/studio/actions/menu.ts +5 -1
  25. package/apps/studio/actions/types.ts +4 -2
  26. package/apps/studio/actions/verbs.ts +9 -0
  27. package/apps/studio/actions.manifest.json +300 -45
  28. package/apps/studio/actions.parity.json +19 -1
  29. package/apps/studio/ai/save-hold.ts +2 -1
  30. package/apps/studio/ai/write-claim-scope.ts +7 -1
  31. package/apps/studio/ai/write-claim.ts +154 -3
  32. package/apps/studio/annotations/ai-read.ts +42 -6
  33. package/apps/studio/annotations/ai-write.ts +145 -2
  34. package/apps/studio/annotations/board-ops.ts +34 -3
  35. package/apps/studio/annotations/checklist-ops.ts +374 -0
  36. package/apps/studio/annotations/elements/checkitem.model.ts +129 -0
  37. package/apps/studio/annotations/elements/sticky.model.ts +54 -2
  38. package/apps/studio/annotations/ops.ts +30 -0
  39. package/apps/studio/annotations/registry.ts +9 -1
  40. package/apps/studio/annotations/templates.ts +4 -2
  41. package/apps/studio/annotations/text-steps.ts +114 -10
  42. package/apps/studio/annotations/ui/checklist-wire.ts +129 -0
  43. package/apps/studio/annotations/ui/checklist.tsx +429 -0
  44. package/apps/studio/annotations/ui/element-node.tsx +48 -2
  45. package/apps/studio/annotations/ui/template-place.ts +11 -1
  46. package/apps/studio/annotations/v1-adapter.ts +22 -3
  47. package/apps/studio/annotations-context-toolbar.tsx +12 -0
  48. package/apps/studio/annotations-layer.tsx +442 -49
  49. package/apps/studio/annotations-model.ts +4 -2
  50. package/apps/studio/api.ts +148 -21
  51. package/apps/studio/artboard-live-gate.tsx +54 -17
  52. package/apps/studio/artboard-still-persist.ts +166 -0
  53. package/apps/studio/artboard-still-raster.ts +6 -2
  54. package/apps/studio/artboard-still.ts +390 -20
  55. package/apps/studio/asset-added.ts +154 -0
  56. package/apps/studio/asset-details.ts +46 -3
  57. package/apps/studio/asset-origins.ts +5 -3
  58. package/apps/studio/asset-trash.ts +6 -1
  59. package/apps/studio/bin/_agent-browser-safe.mjs +3 -4
  60. package/apps/studio/bin/_annotate-post.mjs +14 -5
  61. package/apps/studio/bin/_audio-search.mjs +8 -2
  62. package/apps/studio/bin/_curl-local.mjs +7 -4
  63. package/apps/studio/bin/_desktop-locate.sh +145 -0
  64. package/apps/studio/bin/_ds-check-live.mjs +2 -1
  65. package/apps/studio/bin/_exports.mjs +38 -2
  66. package/apps/studio/bin/_history.mjs +79 -8
  67. package/apps/studio/bin/_import-asset.mjs +14 -9
  68. package/apps/studio/bin/_import-figma.mjs +510 -98
  69. package/apps/studio/bin/_index-cli.mjs +10 -21
  70. package/apps/studio/bin/_ingest-footage.mjs +24 -6
  71. package/apps/studio/bin/_media-probe.mjs +232 -0
  72. package/apps/studio/bin/_perf-probe-open.mjs +6 -0
  73. package/apps/studio/bin/_perf-probe-safari.mjs +6 -0
  74. package/apps/studio/bin/_perf-probe-studio.mjs +6 -1
  75. package/apps/studio/bin/_perf-probe.mjs +8 -3
  76. package/apps/studio/bin/_perf-sweep-shared.mjs +789 -0
  77. package/apps/studio/bin/_perf-sweep.mjs +240 -0
  78. package/apps/studio/bin/_record-shot.sh +33 -8
  79. package/apps/studio/bin/_screenshot-playwright.mjs +45 -2
  80. package/apps/studio/bin/_studio-verb.mjs +8 -3
  81. package/apps/studio/bin/_thumb-route.mjs +21 -0
  82. package/apps/studio/bin/_thumbs-playwright.mjs +83 -1
  83. package/apps/studio/bin/_transcribe.mjs +22 -6
  84. package/apps/studio/bin/_unsynced-refs.mjs +22 -0
  85. package/apps/studio/bin/_url-guard.mjs +120 -5
  86. package/apps/studio/bin/_url-guard.sh +29 -7
  87. package/apps/studio/bin/_video-limits.mjs +104 -0
  88. package/apps/studio/bin/_video-playwright.mjs +119 -19
  89. package/apps/studio/bin/_video-proxy.mjs +130 -0
  90. package/apps/studio/bin/_write-claim.mjs +38 -16
  91. package/apps/studio/bin/annotate.mjs +12 -2
  92. package/apps/studio/bin/canvas-rects.sh +19 -4
  93. package/apps/studio/bin/chat-open.sh +7 -1
  94. package/apps/studio/bin/draw-proof.sh +6 -2
  95. package/apps/studio/bin/generate.sh +32 -10
  96. package/apps/studio/bin/handoff.sh +2 -2
  97. package/apps/studio/bin/perf.sh +96 -15
  98. package/apps/studio/bin/photo-adjust.sh +6 -3
  99. package/apps/studio/bin/photo-bg-remove.sh +2 -2
  100. package/apps/studio/bin/prep.sh +21 -4
  101. package/apps/studio/bin/read-annotations.mjs +3 -0
  102. package/apps/studio/bin/runtime-health.sh +27 -1
  103. package/apps/studio/bin/screenshot.sh +152 -12
  104. package/apps/studio/bin/server-up.sh +64 -6
  105. package/apps/studio/bin/smoke.sh +43 -8
  106. package/apps/studio/bin/to-lottie.sh +3 -2
  107. package/apps/studio/bin/video-proxy.sh +27 -0
  108. package/apps/studio/bin/visual-sanity.sh +3 -1
  109. package/apps/studio/bridge/dgn-protocol.ts +157 -1
  110. package/apps/studio/bridge/mode-shows.ts +8 -6
  111. package/apps/studio/bridge/still-webp.ts +233 -0
  112. package/apps/studio/build.ts +18 -0
  113. package/apps/studio/canvas-build.ts +93 -11
  114. package/apps/studio/canvas-comment-mount.tsx +53 -8
  115. package/apps/studio/canvas-edit.ts +34 -1
  116. package/apps/studio/canvas-lib-module.ts +210 -0
  117. package/apps/studio/canvas-lib.tsx +3 -12
  118. package/apps/studio/canvas-pipeline.ts +111 -5
  119. package/apps/studio/canvas-shell.tsx +8 -11
  120. package/apps/studio/canvas-theme-pill.tsx +5 -3
  121. package/apps/studio/check/index.ts +12 -5
  122. package/apps/studio/check/video.ts +18 -2
  123. package/apps/studio/client/app.jsx +65 -7
  124. package/apps/studio/client/clipboard-relay.ts +193 -16
  125. package/apps/studio/client/comments-overlay.css +18 -0
  126. package/apps/studio/client/export-center.jsx +30 -0
  127. package/apps/studio/client/generate-dialog.jsx +49 -4
  128. package/apps/studio/client/github.js +7 -0
  129. package/apps/studio/client/home/HomeAccountsRow.jsx +221 -0
  130. package/apps/studio/client/home/HomeConnection.jsx +111 -0
  131. package/apps/studio/client/home/home-accounts-model.js +110 -1
  132. package/apps/studio/client/home/home-api.js +9 -2
  133. package/apps/studio/client/home/home-app.jsx +126 -13
  134. package/apps/studio/client/home/home-model.js +69 -1
  135. package/apps/studio/client/home/home-where-model.js +105 -0
  136. package/apps/studio/client/home/home.css +239 -1
  137. package/apps/studio/client/hooks/use-canvas-bridge.jsx +173 -98
  138. package/apps/studio/client/hooks/use-palette-and-panels.jsx +5 -1
  139. package/apps/studio/client/hooks/use-tabs.jsx +11 -4
  140. package/apps/studio/client/panels/DiffView.jsx +7 -1
  141. package/apps/studio/client/panels/TeamProjects.jsx +137 -134
  142. package/apps/studio/client/panels/chat-context.js +2 -0
  143. package/apps/studio/client/panels/slash-commands.gen.js +13 -13
  144. package/apps/studio/client/selection-scope.js +16 -9
  145. package/apps/studio/client/share-link.js +12 -0
  146. package/apps/studio/client/shell/viewport.jsx +11 -1
  147. package/apps/studio/client/shell-events.js +8 -0
  148. package/apps/studio/client/styles/3-kit-maude-v2.css +16 -0
  149. package/apps/studio/client/styles/_index.css +4 -0
  150. package/apps/studio/client/v2/ai/Feed.jsx +1 -1
  151. package/apps/studio/client/v2/ai/OfferCard.jsx +34 -0
  152. package/apps/studio/client/v2/ai/activity-line.js +54 -1
  153. package/apps/studio/client/v2/ai/ai-offer.js +21 -1
  154. package/apps/studio/client/v2/ai/run-model.js +3 -1
  155. package/apps/studio/client/v2/annotations/vote-store.js +28 -4
  156. package/apps/studio/client/v2/assets/asset-drop-session.js +37 -2
  157. package/apps/studio/client/v2/assets/canvas-drop-catcher.jsx +7 -5
  158. package/apps/studio/client/v2/assets/details-model.js +1 -1
  159. package/apps/studio/client/v2/assets/details.jsx +5 -0
  160. package/apps/studio/client/v2/assets/tile-drag.js +11 -7
  161. package/apps/studio/client/v2/comments/comments-panel.jsx +22 -3
  162. package/apps/studio/client/v2/create/duplicate-done.js +6 -2
  163. package/apps/studio/client/v2/diagnostics/diagnostics-host.jsx +1 -0
  164. package/apps/studio/client/v2/diagnostics/diagnostics-model.js +32 -2
  165. package/apps/studio/client/v2/diagnostics/diagnostics-sheet.jsx +35 -8
  166. package/apps/studio/client/v2/diagnostics/diagnostics.css +34 -0
  167. package/apps/studio/client/v2/diagnostics/sync-details/sync-details-model.js +113 -3
  168. package/apps/studio/client/v2/diagnostics/sync-details/sync-details.jsx +343 -6
  169. package/apps/studio/client/v2/diagnostics/sync-details/unsynced-refs.js +55 -0
  170. package/apps/studio/client/v2/ds/review.css +1 -1
  171. package/apps/studio/client/v2/export/exports-model.js +7 -0
  172. package/apps/studio/client/v2/export/exports-panel.jsx +1 -0
  173. package/apps/studio/client/v2/export/job-row.jsx +32 -2
  174. package/apps/studio/client/v2/handoff/ready-card.jsx +1 -1
  175. package/apps/studio/client/v2/history/compare-view.jsx +1 -0
  176. package/apps/studio/client/v2/inspector/css-write.js +6 -1
  177. package/apps/studio/client/v2/inspector/frame.jsx +28 -4
  178. package/apps/studio/client/v2/inspector/kinds/clip-model.js +51 -0
  179. package/apps/studio/client/v2/inspector/kinds/clip.jsx +75 -2
  180. package/apps/studio/client/v2/inspector/model.js +21 -0
  181. package/apps/studio/client/v2/inspector/sections/fill.jsx +12 -3
  182. package/apps/studio/client/v2/inspector/sections/recent-colours.js +8 -5
  183. package/apps/studio/client/v2/inspector/view-mode.jsx +11 -1
  184. package/apps/studio/client/v2/link-server/LinkServerDialog.jsx +492 -0
  185. package/apps/studio/client/v2/link-server/LinkServerHost.jsx +42 -0
  186. package/apps/studio/client/v2/link-server/link-server-api.js +142 -0
  187. package/apps/studio/client/v2/link-server/link-server-model.js +438 -0
  188. package/apps/studio/client/v2/link-server/link-server.css +109 -0
  189. package/apps/studio/client/v2/onboarding/AdvancedSheets.jsx +31 -86
  190. package/apps/studio/client/v2/onboarding/onboarding-model.js +1 -18
  191. package/apps/studio/client/v2/preview/link-follow.js +4 -2
  192. package/apps/studio/client/v2/preview/preview-chrome-host.jsx +16 -6
  193. package/apps/studio/client/v2/search/help-model.js +2 -0
  194. package/apps/studio/client/v2/search/search-keywords.js +3 -2
  195. package/apps/studio/client/v2/settings/account.jsx +4 -2
  196. package/apps/studio/client/v2/settings/advanced-section.jsx +344 -137
  197. package/apps/studio/client/v2/settings/connection-row.jsx +3 -59
  198. package/apps/studio/client/v2/settings/connections-section.jsx +118 -425
  199. package/apps/studio/client/v2/settings/general-section.jsx +155 -24
  200. package/apps/studio/client/v2/settings/project-sync-settings.jsx +4 -3
  201. package/apps/studio/client/v2/settings/reset-section.jsx +14 -3
  202. package/apps/studio/client/v2/settings/settings-card.jsx +142 -0
  203. package/apps/studio/client/v2/settings/settings-cards.js +220 -0
  204. package/apps/studio/client/v2/settings/settings-handlers.js +7 -6
  205. package/apps/studio/client/v2/settings/settings-model.js +100 -31
  206. package/apps/studio/client/v2/settings/settings-sheet.jsx +25 -6
  207. package/apps/studio/client/v2/settings/settings.css +374 -64
  208. package/apps/studio/client/v2/settings/this-project-card.jsx +730 -0
  209. package/apps/studio/client/v2/settings/this-project-model.js +172 -0
  210. package/apps/studio/client/v2/settings/use-connections.js +3 -2
  211. package/apps/studio/client/v2/settings/use-open-card.js +37 -0
  212. package/apps/studio/client/v2/share/share-sheet.jsx +28 -11
  213. package/apps/studio/client/v2/shell/api-session-boot.js +6 -0
  214. package/apps/studio/client/v2/shell/api-session.js +126 -0
  215. package/apps/studio/client/v2/shell/connection-state.js +197 -0
  216. package/apps/studio/client/v2/shell/floating-panels.css +31 -1
  217. package/apps/studio/client/v2/shell/image-pick.js +61 -8
  218. package/apps/studio/client/v2/shell/menu-aim.js +43 -0
  219. package/apps/studio/client/v2/shell/menu-runner.js +25 -7
  220. package/apps/studio/client/v2/shell/occlusion-insets.js +18 -1
  221. package/apps/studio/client/v2/shell/project-account-bus.js +36 -0
  222. package/apps/studio/client/v2/shell/project-account-card.jsx +357 -148
  223. package/apps/studio/client/v2/shell/project-account-model.js +272 -149
  224. package/apps/studio/client/v2/shell/project-account-toast.js +66 -0
  225. package/apps/studio/client/v2/shell/project-account.css +237 -0
  226. package/apps/studio/client/v2/shell/project-pill.jsx +52 -6
  227. package/apps/studio/client/v2/shell/share-cluster-host.jsx +166 -83
  228. package/apps/studio/client/v2/shell/shell-parity.js +3 -2
  229. package/apps/studio/client/v2/shell/shell-parity.json +71 -36
  230. package/apps/studio/client/v2/shell/still-bridge.js +194 -0
  231. package/apps/studio/client/v2/shell/still-store.js +319 -0
  232. package/apps/studio/client/v2/shell/use-account.js +2 -0
  233. package/apps/studio/client/v2/shell/use-tool-panels.js +2 -1
  234. package/apps/studio/client/v2/signin/use-signin.js +1 -1
  235. package/apps/studio/client/v2/timeline/Timeline.jsx +15 -0
  236. package/apps/studio/client/v2/timeline/frame-handle-model.js +142 -0
  237. package/apps/studio/client/v2/timeline/frame-handle.jsx +151 -0
  238. package/apps/studio/clip-ops.ts +126 -8
  239. package/apps/studio/cloud/endpoints.ts +29 -4
  240. package/apps/studio/collab/ai-activity.ts +10 -8
  241. package/apps/studio/collab/awareness-bridge.ts +34 -9
  242. package/apps/studio/collab/index.ts +3 -0
  243. package/apps/studio/collab/registry.ts +41 -10
  244. package/apps/studio/comment-reattach.ts +149 -0
  245. package/apps/studio/comments/mine-stamp.ts +15 -7
  246. package/apps/studio/comments/ops.ts +52 -8
  247. package/apps/studio/comments-overlay.tsx +146 -9
  248. package/apps/studio/dist/client.bundle.js +892 -885
  249. package/apps/studio/dist/comment-mount.js +2 -2
  250. package/apps/studio/dist/styles.css +1 -1
  251. package/apps/studio/dom-selection.ts +87 -18
  252. package/apps/studio/ds/board/directions.css +8 -0
  253. package/apps/studio/ds/board/outline.tsx +16 -0
  254. package/apps/studio/ds/canvas-check.ts +6 -0
  255. package/apps/studio/edit-ops/clip/reframe.ts +19 -3
  256. package/apps/studio/edit-ops/clip-carry.ts +602 -0
  257. package/apps/studio/edit-ops/clipboard.ts +318 -23
  258. package/apps/studio/edit-ops/dispatch.ts +20 -2
  259. package/apps/studio/edit-ops/scope-names.ts +249 -40
  260. package/apps/studio/edit-ops/slot-defaults.ts +3 -0
  261. package/apps/studio/edit-ops/types.ts +6 -0
  262. package/apps/studio/editing/align-bar.tsx +33 -9
  263. package/apps/studio/editing/artboard-actions.ts +5 -0
  264. package/apps/studio/editing/artboard-menu.tsx +6 -2
  265. package/apps/studio/editing/click-to-type.ts +1 -1
  266. package/apps/studio/editing/clip-words.ts +48 -0
  267. package/apps/studio/editing/clipboard.ts +21 -6
  268. package/apps/studio/editing/declared-background.ts +25 -0
  269. package/apps/studio/editing/index.tsx +3 -0
  270. package/apps/studio/editing/object-keys.ts +4 -4
  271. package/apps/studio/editing/object-menu.tsx +13 -3
  272. package/apps/studio/editing/pen/points.tsx +61 -0
  273. package/apps/studio/editing/text-in-place.tsx +11 -0
  274. package/apps/studio/editing/video-frame-handle.tsx +425 -0
  275. package/apps/studio/exporters/capture-prepass.ts +374 -0
  276. package/apps/studio/exporters/degraded.ts +148 -0
  277. package/apps/studio/exporters/hub-render-door.ts +28 -2
  278. package/apps/studio/exporters/index.ts +3 -1
  279. package/apps/studio/exporters/job-budget.ts +93 -0
  280. package/apps/studio/exporters/jobs.ts +215 -28
  281. package/apps/studio/exporters/parity-check.ts +254 -0
  282. package/apps/studio/exporters/remote.ts +209 -15
  283. package/apps/studio/exporters/svg-inline.ts +87 -0
  284. package/apps/studio/exporters/video-render-lib.ts +88 -26
  285. package/apps/studio/exporters/video.ts +29 -6
  286. package/apps/studio/figma/assets.ts +58 -43
  287. package/apps/studio/figma/codegen-fonts.ts +100 -0
  288. package/apps/studio/figma/fig-decode.ts +390 -25
  289. package/apps/studio/figma/fig-kiwi.ts +18 -4
  290. package/apps/studio/figma/fig-vector.ts +59 -3
  291. package/apps/studio/figma/sanitize.ts +2 -0
  292. package/apps/studio/figma/style-map.ts +293 -48
  293. package/apps/studio/figma/to-artboard.ts +455 -69
  294. package/apps/studio/figma/to-strokes.ts +44 -11
  295. package/apps/studio/figma/types.ts +13 -0
  296. package/apps/studio/footage/schema.ts +3 -3
  297. package/apps/studio/generation/adapters/elevenlabs.ts +7 -1
  298. package/apps/studio/generation/adapters/groq.ts +8 -1
  299. package/apps/studio/generation/spend.ts +312 -0
  300. package/apps/studio/generation/types.ts +12 -0
  301. package/apps/studio/handoff/run.ts +1 -1
  302. package/apps/studio/handoff/targets.ts +2 -2
  303. package/apps/studio/handoff/write-scopes.ts +1 -1
  304. package/apps/studio/history/describe-annotations.ts +4 -0
  305. package/apps/studio/home/accounts.ts +30 -11
  306. package/apps/studio/home/cloud.ts +6 -1
  307. package/apps/studio/home/create-local.ts +32 -3
  308. package/apps/studio/home/hub-health.ts +76 -0
  309. package/apps/studio/home/routes.ts +15 -4
  310. package/apps/studio/http.ts +438 -86
  311. package/apps/studio/imported-module-ids.ts +91 -0
  312. package/apps/studio/inspect.ts +2 -0
  313. package/apps/studio/migrate/hub.ts +8 -1
  314. package/apps/studio/notifications.tsx +47 -5
  315. package/apps/studio/paths.ts +10 -1
  316. package/apps/studio/port.ts +3 -2
  317. package/apps/studio/preview/preview-camera.tsx +15 -382
  318. package/apps/studio/readiness.ts +10 -1
  319. package/apps/studio/release-build.ts +51 -0
  320. package/apps/studio/routes/agent.ts +188 -9
  321. package/apps/studio/routes/ai.ts +43 -11
  322. package/apps/studio/routes/annotations.ts +27 -1
  323. package/apps/studio/routes/assets.ts +18 -1
  324. package/apps/studio/routes/canvas-origin.ts +12 -9
  325. package/apps/studio/routes/cloud-move.ts +15 -0
  326. package/apps/studio/routes/edit.ts +3 -0
  327. package/apps/studio/routes/export.ts +51 -0
  328. package/apps/studio/routes/generate.ts +42 -12
  329. package/apps/studio/routes/hub-link-folder.ts +334 -0
  330. package/apps/studio/routes/hub-signin.ts +78 -1
  331. package/apps/studio/routes/index.ts +9 -1
  332. package/apps/studio/routes/shell.ts +217 -5
  333. package/apps/studio/routes/sync.ts +136 -8
  334. package/apps/studio/routes/votes.ts +2 -1
  335. package/apps/studio/schema/annotations.v2.schema.json +143 -1
  336. package/apps/studio/schema/beats.v1.schema.json +1 -1
  337. package/apps/studio/schema/edl.v1.schema.json +1 -1
  338. package/apps/studio/schema/formats.ts +3 -3
  339. package/apps/studio/schema/transcript.v1.schema.json +1 -1
  340. package/apps/studio/server.ts +142 -43
  341. package/apps/studio/shell/api-key.ts +503 -0
  342. package/apps/studio/shell/attest.ts +59 -0
  343. package/apps/studio/shell/capture-url.ts +20 -0
  344. package/apps/studio/shell/cli-yield.ts +276 -0
  345. package/apps/studio/shell/clip-transfer.ts +302 -0
  346. package/apps/studio/shell/key-file.ts +108 -0
  347. package/apps/studio/shell/server-json.ts +75 -0
  348. package/apps/studio/shell/worktree.ts +19 -0
  349. package/apps/studio/spoof-chars.ts +9 -0
  350. package/apps/studio/studio-page-host.ts +1 -1
  351. package/apps/studio/sync/accepted-cold-start.ts +144 -8
  352. package/apps/studio/sync/accepted-link.ts +76 -29
  353. package/apps/studio/sync/action-stage.ts +575 -44
  354. package/apps/studio/sync/adopt-held.ts +85 -0
  355. package/apps/studio/sync/ctl-heal.ts +58 -0
  356. package/apps/studio/sync/file-ledger.ts +38 -4
  357. package/apps/studio/sync/file-membership.ts +16 -1
  358. package/apps/studio/sync/file-plane.ts +289 -22
  359. package/apps/studio/sync/held-deletes.ts +86 -5
  360. package/apps/studio/sync/hub-link.ts +8 -0
  361. package/apps/studio/sync/index.ts +196 -12
  362. package/apps/studio/sync/journal-client.ts +50 -4
  363. package/apps/studio/sync/link-consent.ts +22 -75
  364. package/apps/studio/sync/link-survey.ts +252 -0
  365. package/apps/studio/sync/local-kernel.ts +296 -8
  366. package/apps/studio/sync/projection.ts +22 -3
  367. package/apps/studio/sync/seed-progress.ts +12 -0
  368. package/apps/studio/sync/source-recovery.ts +59 -3
  369. package/apps/studio/sync/status.ts +19 -2
  370. package/apps/studio/sync/unsynced-refs.ts +397 -0
  371. package/apps/studio/sync/writer-registry.ts +20 -0
  372. package/apps/studio/thumbs/service.ts +4 -1
  373. package/apps/studio/tool-palette.tsx +23 -0
  374. package/apps/studio/ui-prefs.ts +40 -0
  375. package/apps/studio/use-agent-presence.tsx +2 -2
  376. package/apps/studio/use-canvas-keys.ts +6 -1
  377. package/apps/studio/video/format-ids.ts +2 -2
  378. package/apps/studio/video/inject.ts +31 -0
  379. package/apps/studio/video/media-risk.ts +58 -0
  380. package/apps/studio/video/object-fit.ts +137 -0
  381. package/apps/studio/video/provider-transcript.ts +141 -0
  382. package/apps/studio/whats-new.json +137 -0
  383. package/apps/studio/workspace-mode.ts +1 -0
  384. package/apps/studio/ws.ts +5 -0
  385. package/cli/commands/design.mjs +119 -8
  386. package/cli/lib/bash-guard.mjs +366 -6
  387. package/cli/lib/confine-read.mjs +1 -0
  388. package/cli/lib/design-help.gen.mjs +3 -2
  389. package/cli/lib/design-hook.mjs +387 -81
  390. package/cli/lib/design-link.mjs +16 -1
  391. package/cli/lib/design-open.mjs +49 -3
  392. package/cli/lib/desktop-locate.mjs +770 -0
  393. package/cli/lib/handoff.mjs +1 -1
  394. package/cli/lib/hook-state.mjs +291 -0
  395. package/cli/lib/pkg-root.mjs +65 -13
  396. package/cli/lib/studio-locate.mjs +59 -16
  397. package/package.json +15 -8
  398. package/plugins/design/templates/_shell.html +13 -0
  399. package/apps/studio/client/v2/onboarding/HubSheet.jsx +0 -212
  400. package/apps/studio/client/v2/shell/account-card-model.js +0 -114
  401. package/apps/studio/client/v2/shell/account-card.jsx +0 -189
@@ -1,212 +0,0 @@
1
- // client/v2/onboarding/HubSheet.jsx — "Connect to your own hub" (02 ob-adv-sheets, S6.9). The sheet S11.14's
2
- // Settings › Connections mounts as "Add a team server…" (G0-D/D12), so it is a view: it owns its fields and
3
- // calls back; what Test connection and Sign in DO is the caller's (Home: `/_home/hub/{test,signin/*,prepare}`).
4
- //
5
- // <HubSheet onTest={(url) => {ok, version?, error?}}
6
- // onSignIn={({url, invite, onWaiting}) => {ok, error?, cancelled?}}
7
- // onAbortSignIn={() => void} onCancel />
8
- //
9
- // Issue #204 (decision maude/v2-michal-team-server-signin-via-hub-page): the app owns NO login method for a
10
- // team server. There is no email or password field here: Sign in opens the hub's OWN sign-in page in the
11
- // browser (with an invite, the hub's own invite page), the sheet waits (`onWaiting` → "Finish signing in in
12
- // your browser.", Cancel = `onAbortSignIn`) and the caller opens the project once the browser came back.
13
- // The invite key is a bearer secret: a masked field, read once on Sign in and emptied at once; an error
14
- // line is the server's own words, never an echo.
15
-
16
- import { useEffect, useRef, useState } from 'react';
17
-
18
- import { AdvModal, AdvSheet, Sw } from './AdvSheet.jsx';
19
- import { HUB_WORDS as W } from './onboarding-model.js';
20
-
21
- /** `https://hub.example/join/inv_…` → `https://hub.example` (the hub's own invite link); else null. */
22
- export function hubOfInviteLink(raw) {
23
- try {
24
- const u = new URL(String(raw ?? '').trim());
25
- if (u.protocol !== 'https:' && u.protocol !== 'http:') return null;
26
- const m = /^(.*)\/join\/[^/]+$/.exec(u.pathname);
27
- return m ? `${u.origin}${m[1]}` : null;
28
- } catch {
29
- return null;
30
- }
31
- }
32
-
33
- /**
34
- * @param {{ onTest: (url: string) => Promise<{ok: boolean, version?: string|null, error?: string}>,
35
- * onSignIn: (v: {url: string, invite: string, onWaiting: () => void}) =>
36
- * Promise<{ok: boolean, error?: string, cancelled?: boolean}>,
37
- * onAbortSignIn?: () => void,
38
- * onCancel: () => void, initialUrl?: string }} props
39
- */
40
- export function HubSheet({ onTest, onSignIn, onAbortSignIn, onCancel, initialUrl = '' }) {
41
- const [url, setUrl] = useState(initialUrl);
42
- const [invite, setInvite] = useState('');
43
- const [test, setTest] = useState({ phase: 'idle', version: null, error: null });
44
- const [busy, setBusy] = useState(false);
45
- const [waiting, setWaiting] = useState(false);
46
- const [error, setError] = useState(null);
47
- const alive = useRef(true);
48
- const seq = useRef(0); // an answer for an address that has since changed is dropped
49
- useEffect(() => {
50
- alive.current = true;
51
- return () => {
52
- alive.current = false;
53
- };
54
- }, []);
55
-
56
- const runTest = async () => {
57
- const id = ++seq.current;
58
- setTest({ phase: 'busy', version: null, error: null });
59
- let r;
60
- try {
61
- r = await onTest(url.trim());
62
- } catch {
63
- r = { ok: false, error: W.unreachable };
64
- }
65
- if (!alive.current || id !== seq.current) return;
66
- setTest(
67
- r?.ok
68
- ? { phase: 'ok', version: r.version ?? null, error: null }
69
- : { phase: 'bad', version: null, error: r?.error || W.unreachable }
70
- );
71
- };
72
-
73
- const signIn = async () => {
74
- // read once, empty the field now — an invite key never outlives this call in the page
75
- const key = invite.trim();
76
- setInvite('');
77
- setError(null);
78
- setBusy(true);
79
- let r;
80
- try {
81
- r = await onSignIn({
82
- url: url.trim(),
83
- invite: key,
84
- onWaiting: () => {
85
- if (alive.current) setWaiting(true);
86
- },
87
- });
88
- } catch {
89
- r = { ok: false, error: W.unreachable };
90
- }
91
- if (!alive.current) return;
92
- setBusy(false);
93
- setWaiting(false);
94
- if (!r?.ok && !r?.cancelled) setError(r?.error || W.unreachable);
95
- };
96
-
97
- const abort = () => {
98
- setWaiting(false);
99
- onAbortSignIn?.();
100
- };
101
-
102
- return (
103
- <AdvModal onCancel={waiting ? abort : onCancel}>
104
- <AdvSheet
105
- id="hub"
106
- title={W.title}
107
- verb={W.verb}
108
- busyVerb={W.busy}
109
- busy={busy}
110
- canSubmit={!!url.trim() && !busy}
111
- onSubmit={signIn}
112
- onCancel={waiting ? abort : onCancel}
113
- >
114
- <span className="ob-field">
115
- <label className="ob-field-label" htmlFor="onb-hub-url">
116
- {W.addressLabel}
117
- </label>
118
- <span className="ob-row2">
119
- <input
120
- id="onb-hub-url"
121
- className="ob-input ob-mono"
122
- data-testid="onb-hub-url"
123
- type="text"
124
- inputMode="url"
125
- autoComplete="off"
126
- spellCheck={false}
127
- placeholder="https://"
128
- // biome-ignore lint/a11y/noAutofocus: the sheet opens for this one field
129
- autoFocus
130
- disabled={busy}
131
- value={url}
132
- onChange={(e) => {
133
- seq.current += 1;
134
- setUrl(e.target.value);
135
- setTest({ phase: 'idle', version: null, error: null });
136
- }}
137
- />
138
- <button
139
- type="button"
140
- className="btn btn--sm"
141
- data-testid="onb-hub-test"
142
- disabled={!url.trim() || test.phase === 'busy' || busy}
143
- onClick={runTest}
144
- >
145
- {W.test}
146
- </button>
147
- </span>
148
- {test.phase === 'busy' ? (
149
- <span className="ob-ok" role="status">
150
- <Sw state="busy" testid="onb-hub-testing">
151
- {W.testing}
152
- </Sw>
153
- </span>
154
- ) : null}
155
- {test.phase === 'ok' ? (
156
- <span className="ob-ok" role="status">
157
- <Sw state="ok" testid="onb-hub-reachable">
158
- {W.reachable(test.version)}
159
- </Sw>
160
- </span>
161
- ) : null}
162
- {test.phase === 'bad' ? (
163
- <span className="ob-err" role="alert" data-testid="onb-hub-test-error">
164
- {test.error}
165
- </span>
166
- ) : null}
167
- </span>
168
-
169
- <span className="ob-field">
170
- <label className="ob-field-label" htmlFor="onb-hub-invite">
171
- {W.inviteLabel}
172
- </label>
173
- <input
174
- id="onb-hub-invite"
175
- className="ob-input"
176
- data-testid="onb-hub-invite"
177
- // a bearer secret: masked, never drawn back
178
- type="password"
179
- autoComplete="off"
180
- spellCheck={false}
181
- placeholder={W.invitePlaceholder}
182
- disabled={busy}
183
- value={invite}
184
- onChange={(e) => {
185
- const v = e.target.value;
186
- setInvite(v);
187
- // a pasted hub link names its hub: fill an empty address (the address is not secret)
188
- const at = url.trim() ? null : hubOfInviteLink(v);
189
- if (at) {
190
- seq.current += 1;
191
- setUrl(at);
192
- setTest({ phase: 'idle', version: null, error: null });
193
- }
194
- }}
195
- />
196
- </span>
197
-
198
- {waiting ? (
199
- <p className="ob-ok" role="status" data-testid="onb-hub-waiting">
200
- <Sw state="busy">{W.waiting}</Sw>
201
- </p>
202
- ) : null}
203
- {error ? (
204
- <p className="ai-conn-err" role="alert" data-testid="onb-hub-error">
205
- {error}
206
- </p>
207
- ) : null}
208
- <p className="ob-fine">{W.fine}</p>
209
- </AdvSheet>
210
- </AdvModal>
211
- );
212
- }
@@ -1,114 +0,0 @@
1
- // client/v2/shell/account-card-model.js — S1.22a: the account chip beside the faces and its card
2
- // (canvas 11 · pn-accounts, CONTRACT §6 "Accounts": each project tab is bound to one account).
3
- //
4
- // PURE: what the chip and the card SAY. The binding itself is the shell's (V2-3.1 / V2-3.8: a project
5
- // carries a profile, `/_config.profile` is `{ id, label? }`); this module only words it.
6
- //
7
- // Two inputs the page has and one it may have:
8
- // profile `/_config.profile` — which account THIS tab runs as (always known on the desktop)
9
- // email `/_api/cloud/status` — the signed-in address of that profile (absent when signed out)
10
- // accounts OPTIONAL — every account on this Mac, `[{ id, label, email, projects }]`: `projects` is
11
- // the project names for the caller's own account and a count (a number) for every other
12
- // one (S1.22b `accounts_list`, option B). A project page cannot read the shell's profile registry (the page
13
- // capability deliberately omits it), so this arrives only from a shell command that returns
14
- // it for the caller (patch request S1.22a-1). Without it the card still says everything that
15
- // is known and leaves out the lines that would need it — never an invented list.
16
- //
17
- // The canvas draws the chip "only when this Mac has two or more accounts". A tab on a profile other than
18
- // `default` proves a second account exists (the default profile always does); a tab on `default` needs the
19
- // list to say so.
20
-
21
- import { ACTIONS_BY_ID } from '../../../actions/index.ts';
22
- import { accountTone } from '../../shell/account-tone.js';
23
-
24
- const DEFAULT_ID = 'default';
25
-
26
- const labelOf = (p) => String(p?.label || p?.id || '').trim();
27
- const initialOf = (label) => (label ? Array.from(label)[0].toUpperCase() : '·');
28
- const plural = (n, one, many) => `${n} ${n === 1 ? one : many}`;
29
-
30
- /** "A" · "A and B" · "A, B and C" · "A, B and 4 more" — the canvas's project lists. */
31
- export function projectsPhrase(names) {
32
- const list = (names ?? []).filter((n) => typeof n === 'string' && n.trim());
33
- if (list.length === 0) return '';
34
- if (list.length === 1) return list[0];
35
- if (list.length <= 3) return `${list.slice(0, -1).join(', ')} and ${list[list.length - 1]}`;
36
- return `${list[0]}, ${list[1]} and ${list.length - 2} more`;
37
- }
38
-
39
- /** The account's tone: the one function every surface asks (shell/account-tone.js) — Work sky,
40
- * Personal yellow, anything else a stable object-palette tone. */
41
- const toneOf = (id, label) => accountTone(id, label);
42
-
43
- /**
44
- * The chip in the Share cluster, or null when there is nothing to show.
45
- * @param native the desktop app (a browser tab / cloud tab has no Mac accounts)
46
- * @param connected this profile holds a cloud sign-in (an account is what a sign-in IS)
47
- * @param cloud a cloud tab (its account is the hub's, not the Mac's)
48
- */
49
- export function accountChip({ native, connected, cloud = false, profile, email, accounts = null }) {
50
- if (!native || cloud || !connected) return null;
51
- const id = profile?.id || DEFAULT_ID;
52
- const twoOrMore = Array.isArray(accounts) ? accounts.length >= 2 : id !== DEFAULT_ID;
53
- if (!twoOrMore) return null;
54
- const label = labelOf(profile) || id;
55
- return {
56
- id,
57
- label,
58
- initial: initialOf(label),
59
- tone: toneOf(id, label),
60
- title: email ? `${label} · ${email}` : label,
61
- };
62
- }
63
-
64
- /** Everything the open card says. */
65
- export function accountCard({ project, profile, email, accounts = null }) {
66
- const id = profile?.id || DEFAULT_ID;
67
- const label = labelOf(profile) || id;
68
- const list = Array.isArray(accounts) ? accounts : null;
69
- const mine = list?.find((a) => a?.id === id) ?? null;
70
- const here = (Array.isArray(mine?.projects) ? mine.projects : []).filter(
71
- (n) => typeof n === 'string'
72
- );
73
- const who = email || label;
74
- const effect = 'Signs out every project on it';
75
- const named = projectsPhrase(here);
76
- return {
77
- current: {
78
- initial: initialOf(label),
79
- tone: toneOf(id, label),
80
- title: email ? `${label} · ${email}` : label,
81
- sub: project ? `${project} uses this account` : 'This project uses this account',
82
- },
83
- others: (list ?? [])
84
- .filter((a) => a && a.id !== id)
85
- .map((a) => {
86
- const l = labelOf(a) || a.id;
87
- return {
88
- id: a.id,
89
- initial: initialOf(l),
90
- tone: toneOf(a.id, l),
91
- title: a.email ? `${l} · ${a.email}` : l,
92
- // S1.22b `accounts_list` (option B): another account carries a COUNT, not names.
93
- sub: Array.isArray(a.projects)
94
- ? projectsPhrase(a.projects) || plural(a.projects.length, 'project', 'projects')
95
- : plural(Number(a.projects) || 0, 'project', 'projects'),
96
- };
97
- }),
98
- // The registry's own label — one label on every surface (CONTRACT §3).
99
- switchLabel: ACTIONS_BY_ID.get('account.switch')?.label ?? 'Sign in as another account…',
100
- signOut: {
101
- label: `Sign out of ${who}…`,
102
- sub: named ? `${effect}: ${named}.` : `${effect}.`,
103
- confirm: {
104
- title: `Sign out of ${who}?`,
105
- body: 'Every project on it is signed out. Your work stays on this Mac.',
106
- primary: 'Sign out',
107
- cancel: 'Cancel',
108
- },
109
- },
110
- foot: project
111
- ? `Kept on this Mac — ${project} opens as ${label} next time.`
112
- : `Kept on this Mac — this project opens as ${label} next time.`,
113
- };
114
- }
@@ -1,189 +0,0 @@
1
- // client/v2/shell/account-card.jsx — S1.22a: the account chip beside the faces and its card
2
- // (canvas 11 · pn-accounts: "The account belongs to the project, on this Mac. It sits by the faces.
3
- // Signing out signs out every project on that account.").
4
- //
5
- // PRESENTATIONAL. The words come from account-card-model.js, the handlers from the host
6
- // (share-cluster-host.jsx): "Sign in as another account…" is the shell's own `account.switch` handler,
7
- // and "Sign out of …" calls the EXISTING sign-out path (`POST /_api/cloud/signout`, the one Settings ›
8
- // Connections uses — V2-3.8: it clears the calling project's profile credential, and every project on
9
- // that profile is signed out with it). Nothing here signs anyone in or out by itself.
10
- //
11
- // The card is a popover under the chip (opaque, the largest shadow, no backdrop-filter — M1). Esc and a
12
- // press outside close it; the sign-out row asks first, with the verb its button carries (CONTRACT §4).
13
-
14
- import { useCallback, useEffect, useId, useRef, useState } from 'react';
15
- import { StIcon } from '../../shell/icons.jsx';
16
- import { onCanvasPointer } from './canvas-pointer.js';
17
-
18
- function Face({ initial, tone, size = 'md' }) {
19
- return (
20
- <span className={`sh-acct-face sh-acct-face--${size}`} data-tone={tone} aria-hidden="true">
21
- {initial}
22
- </span>
23
- );
24
- }
25
-
26
- /**
27
- * @param chip accountChip() — null renders nothing
28
- * @param card accountCard()
29
- * @param onSwitch () => void — the shell's `account.switch`
30
- * @param onSignOut () => Promise — the existing sign-out path
31
- */
32
- export function AccountChip({ chip, card, onSwitch, onSignOut, onOpen = null, opened = false }) {
33
- const [open, setOpen] = useState(false);
34
- const [asking, setAsking] = useState(false);
35
- const [busy, setBusy] = useState(false);
36
- const wrap = useRef(null);
37
- const btn = useRef(null);
38
- const titleId = useId();
39
-
40
- const close = useCallback((refocus) => {
41
- setOpen(false);
42
- setAsking(false);
43
- if (refocus) btn.current?.focus();
44
- }, []);
45
-
46
- useEffect(() => {
47
- if (!open) return undefined;
48
- const onDown = (e) => {
49
- if (wrap.current && !wrap.current.contains(e.target)) close(false);
50
- };
51
- document.addEventListener('pointerdown', onDown, true);
52
- // rc3 r4-12 — a press in the canvas closes it too (told over the dgn bridge; it never reaches this document)
53
- const offCanvas = onCanvasPointer(() => close(false));
54
- return () => {
55
- document.removeEventListener('pointerdown', onDown, true);
56
- offCanvas();
57
- };
58
- }, [open, close]);
59
-
60
- if (!chip || !card) return null;
61
-
62
- const signOut = async () => {
63
- setBusy(true);
64
- try {
65
- await onSignOut?.();
66
- } finally {
67
- setBusy(false);
68
- close(false);
69
- }
70
- };
71
-
72
- return (
73
- <div className="sh-acct" ref={wrap}>
74
- <button
75
- ref={btn}
76
- type="button"
77
- className={`sh-acct-chip${open || opened ? ' is-on' : ''}`}
78
- data-testid="share-cluster-account"
79
- data-account={chip.id}
80
- // 2.0.5 W4 — with `onOpen` the chip opens the project's account card (project-account-card.jsx)
81
- data-account-opener={onOpen ? 'true' : undefined}
82
- aria-haspopup="dialog"
83
- aria-expanded={open || opened ? 'true' : 'false'}
84
- aria-label={`Account: ${chip.title}`}
85
- title={chip.title}
86
- onClick={() => {
87
- if (onOpen) onOpen();
88
- else if (open) close(false);
89
- else setOpen(true);
90
- }}
91
- >
92
- <Face initial={chip.initial} tone={chip.tone} />
93
- <span className="sh-acct-name">{chip.label}</span>
94
- <StIcon name="chevron-down" size={12} />
95
- </button>
96
- {open ? (
97
- <div
98
- className="sh-acct-card"
99
- role="dialog"
100
- aria-labelledby={titleId}
101
- data-testid="account-card"
102
- onKeyDown={(e) => {
103
- if (e.key === 'Escape') {
104
- e.stopPropagation();
105
- close(true);
106
- }
107
- }}
108
- >
109
- <div className="sh-acct-row" data-testid="account-card-current">
110
- <Face initial={card.current.initial} tone={card.current.tone} size="lg" />
111
- <span className="sh-acct-txt">
112
- <strong id={titleId}>{card.current.title}</strong>
113
- <span>{card.current.sub}</span>
114
- </span>
115
- </div>
116
- {card.others.length > 0 ? (
117
- <>
118
- <hr className="sh-acct-sep" />
119
- <p className="sh-acct-gt">Also on this Mac</p>
120
- {card.others.map((o) => (
121
- <div
122
- key={o.id}
123
- className="sh-acct-row sh-acct-row--sm"
124
- data-testid={`account-card-other-${o.id}`}
125
- >
126
- <Face initial={o.initial} tone={o.tone} />
127
- <span className="sh-acct-txt">
128
- <strong>{o.title}</strong>
129
- <span>{o.sub}</span>
130
- </span>
131
- </div>
132
- ))}
133
- </>
134
- ) : null}
135
- <hr className="sh-acct-sep" />
136
- <button
137
- type="button"
138
- className="sh-acct-act"
139
- data-testid="account-card-switch"
140
- onClick={() => {
141
- close(false);
142
- onSwitch?.();
143
- }}
144
- >
145
- {card.switchLabel}
146
- </button>
147
- {asking ? (
148
- <div className="sh-acct-ask" role="alertdialog" data-testid="account-card-confirm">
149
- <strong>{card.signOut.confirm.title}</strong>
150
- <span>{card.signOut.confirm.body}</span>
151
- <span className="sh-acct-btns">
152
- <button
153
- type="button"
154
- className="btn btn--sm"
155
- data-testid="account-card-signout-cancel"
156
- onClick={() => setAsking(false)}
157
- >
158
- {card.signOut.confirm.cancel}
159
- </button>
160
- <button
161
- type="button"
162
- className="btn btn--sm btn--danger"
163
- data-testid="account-card-signout-confirm"
164
- disabled={busy}
165
- onClick={signOut}
166
- >
167
- {card.signOut.confirm.primary}
168
- </button>
169
- </span>
170
- </div>
171
- ) : (
172
- <button
173
- type="button"
174
- className="sh-acct-act sh-acct-act--two"
175
- data-testid="account-card-signout"
176
- onClick={() => setAsking(true)}
177
- >
178
- <span>{card.signOut.label}</span>
179
- <span className="sh-acct-sub">{card.signOut.sub}</span>
180
- </button>
181
- )}
182
- <p className="sh-acct-foot" data-testid="account-card-foot">
183
- {card.foot}
184
- </p>
185
- </div>
186
- ) : null}
187
- </div>
188
- );
189
- }