@dexhq/canvas 0.0.0-stage → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1281) hide show
  1. package/CHANGELOG.md +928 -0
  2. package/LICENSE +21 -0
  3. package/README.md +526 -2
  4. package/app/app.tsx +194 -0
  5. package/app/base.ts +99 -0
  6. package/app/canvas/activity-bar.tsx +223 -0
  7. package/app/canvas/activity-model.ts +461 -0
  8. package/app/canvas/activity-parts.tsx +237 -0
  9. package/app/canvas/activity.tsx +947 -0
  10. package/app/canvas/add-to-spec.ts +131 -0
  11. package/app/canvas/agent-changes.ts +122 -0
  12. package/app/canvas/anchoring.ts +439 -0
  13. package/app/canvas/canvas-chrome.tsx +531 -0
  14. package/app/canvas/canvas-clipboard.ts +172 -0
  15. package/app/canvas/canvas-commands.ts +542 -0
  16. package/app/canvas/canvas-context-menu.tsx +54 -0
  17. package/app/canvas/canvas-context.tsx +151 -0
  18. package/app/canvas/canvas-corners.tsx +86 -0
  19. package/app/canvas/canvas-document.ts +1024 -0
  20. package/app/canvas/canvas-input.ts +554 -0
  21. package/app/canvas/canvas-keys.ts +360 -0
  22. package/app/canvas/canvas-menus.tsx +289 -0
  23. package/app/canvas/canvas-merge.ts +547 -0
  24. package/app/canvas/canvas-model.ts +1048 -0
  25. package/app/canvas/canvas-panels.ts +187 -0
  26. package/app/canvas/canvas-scene.ts +679 -0
  27. package/app/canvas/canvas-ui.ts +119 -0
  28. package/app/canvas/canvas.css +1017 -0
  29. package/app/canvas/change-notice.tsx +133 -0
  30. package/app/canvas/command-menu.tsx +154 -0
  31. package/app/canvas/comment-layer.tsx +449 -0
  32. package/app/canvas/comments.tsx +2210 -0
  33. package/app/canvas/device-edits.ts +207 -0
  34. package/app/canvas/device-icons.ts +26 -0
  35. package/app/canvas/device-picker.tsx +117 -0
  36. package/app/canvas/devices-panel.tsx +287 -0
  37. package/app/canvas/draw-layer.tsx +373 -0
  38. package/app/canvas/draw-model.ts +105 -0
  39. package/app/canvas/editable-text.tsx +167 -0
  40. package/app/canvas/element-picker.ts +577 -0
  41. package/app/canvas/engine/camera.ts +263 -0
  42. package/app/canvas/engine/canvas-gestures.ts +816 -0
  43. package/app/canvas/engine/canvas-store.ts +407 -0
  44. package/app/canvas/engine/canvas-view.tsx +345 -0
  45. package/app/canvas/engine/engine.css +97 -0
  46. package/app/canvas/floating-panel.tsx +155 -0
  47. package/app/canvas/flow-canvas.tsx +808 -0
  48. package/app/canvas/flow-naming.ts +23 -0
  49. package/app/canvas/flow-renames.ts +118 -0
  50. package/app/canvas/follow-pin.ts +49 -0
  51. package/app/canvas/forced-states.ts +219 -0
  52. package/app/canvas/frame-choices.tsx +85 -0
  53. package/app/canvas/frame-context-menu.tsx +554 -0
  54. package/app/canvas/frame-copies.ts +538 -0
  55. package/app/canvas/frame-drops.ts +159 -0
  56. package/app/canvas/frame-node.tsx +1536 -0
  57. package/app/canvas/frame-pictures.ts +573 -0
  58. package/app/canvas/frame-resize.tsx +193 -0
  59. package/app/canvas/frame-shown.ts +31 -0
  60. package/app/canvas/frame-source.ts +107 -0
  61. package/app/canvas/frame-thumb.tsx +69 -0
  62. package/app/canvas/grid-overlay.tsx +50 -0
  63. package/app/canvas/grid-panel.tsx +379 -0
  64. package/app/canvas/imported-reviews.tsx +843 -0
  65. package/app/canvas/insert-hint.tsx +163 -0
  66. package/app/canvas/inspect-layer.tsx +66 -0
  67. package/app/canvas/inspect-tools.ts +134 -0
  68. package/app/canvas/jpeg-pdf.ts +141 -0
  69. package/app/canvas/label-action.tsx +50 -0
  70. package/app/canvas/large-canvas-notice.tsx +51 -0
  71. package/app/canvas/layout.ts +1253 -0
  72. package/app/canvas/live-page.ts +416 -0
  73. package/app/canvas/measure-box.tsx +23 -0
  74. package/app/canvas/new-frame.ts +279 -0
  75. package/app/canvas/note-placing.ts +110 -0
  76. package/app/canvas/number-field.tsx +89 -0
  77. package/app/canvas/open-page.ts +50 -0
  78. package/app/canvas/page-heights.tsx +134 -0
  79. package/app/canvas/page-scroll.ts +66 -0
  80. package/app/canvas/pass-wheel.ts +48 -0
  81. package/app/canvas/pasted-cuts.ts +38 -0
  82. package/app/canvas/person-busy.ts +32 -0
  83. package/app/canvas/picks-menu.tsx +178 -0
  84. package/app/canvas/picks.ts +139 -0
  85. package/app/canvas/point-menu.tsx +77 -0
  86. package/app/canvas/props-model.ts +123 -0
  87. package/app/canvas/props-panel.tsx +371 -0
  88. package/app/canvas/quick-bar.tsx +149 -0
  89. package/app/canvas/removed-views-panel.tsx +500 -0
  90. package/app/canvas/review-marker.tsx +74 -0
  91. package/app/canvas/review-panel.tsx +1422 -0
  92. package/app/canvas/row-node.tsx +59 -0
  93. package/app/canvas/scene-context.tsx +74 -0
  94. package/app/canvas/section-node.tsx +278 -0
  95. package/app/canvas/selection.ts +49 -0
  96. package/app/canvas/server-notice.tsx +71 -0
  97. package/app/canvas/size-label.tsx +31 -0
  98. package/app/canvas/sketch-boxes.css +57 -0
  99. package/app/canvas/sketch-boxes.tsx +407 -0
  100. package/app/canvas/sketch-layer.tsx +448 -0
  101. package/app/canvas/sketch-model.ts +542 -0
  102. package/app/canvas/slide-frame.tsx +165 -0
  103. package/app/canvas/slide-full-screen.tsx +201 -0
  104. package/app/canvas/slide-page.tsx +197 -0
  105. package/app/canvas/slide-pdf.tsx +222 -0
  106. package/app/canvas/snapping.ts +182 -0
  107. package/app/canvas/spec-copies.ts +117 -0
  108. package/app/canvas/spec-frame.tsx +440 -0
  109. package/app/canvas/spec-full-screen.tsx +351 -0
  110. package/app/canvas/spec-margin.tsx +323 -0
  111. package/app/canvas/spec-mode.tsx +147 -0
  112. package/app/canvas/spec-placing.tsx +273 -0
  113. package/app/canvas/spec-threads.ts +63 -0
  114. package/app/canvas/spec-title.tsx +63 -0
  115. package/app/canvas/spot-pins.tsx +67 -0
  116. package/app/canvas/stack-node.tsx +92 -0
  117. package/app/canvas/state-store.ts +52 -0
  118. package/app/canvas/sticker-model.ts +124 -0
  119. package/app/canvas/sticker-sheet.tsx +545 -0
  120. package/app/canvas/stored-viewport.ts +64 -0
  121. package/app/canvas/styles-layer.tsx +301 -0
  122. package/app/canvas/tell-open-page.tsx +76 -0
  123. package/app/canvas/text-layer.tsx +274 -0
  124. package/app/canvas/thread-focus.tsx +75 -0
  125. package/app/canvas/thread-place.ts +77 -0
  126. package/app/canvas/tip.tsx +118 -0
  127. package/app/canvas/tool-cursors.ts +170 -0
  128. package/app/canvas/tool-icons.tsx +68 -0
  129. package/app/canvas/toolbar-parts.tsx +173 -0
  130. package/app/canvas/toolbar.tsx +345 -0
  131. package/app/canvas/tools.ts +61 -0
  132. package/app/canvas/typing.ts +47 -0
  133. package/app/canvas/unknown-frame.tsx +70 -0
  134. package/app/canvas/use-activity.ts +293 -0
  135. package/app/canvas/use-agent-changes.tsx +327 -0
  136. package/app/canvas/use-canvas-clipboard.tsx +401 -0
  137. package/app/canvas/use-canvas-commands.ts +91 -0
  138. package/app/canvas/use-canvas-editor.ts +267 -0
  139. package/app/canvas/use-component-drops.ts +161 -0
  140. package/app/canvas/use-spec-copies.ts +102 -0
  141. package/app/canvas/viewports.ts +21 -0
  142. package/app/canvas/wireframe-panel.tsx +330 -0
  143. package/app/canvas/xray.ts +28 -0
  144. package/app/client.d.ts +27 -0
  145. package/app/content.d.ts +17 -0
  146. package/app/design-system/components-address.ts +6 -0
  147. package/app/design-system/components-canvas.ts +379 -0
  148. package/app/design-system/components-prototype.tsx +468 -0
  149. package/app/design-system/pseudo-states.ts +187 -0
  150. package/app/editor/annotations.ts +250 -0
  151. package/app/editor/blocks.ts +570 -0
  152. package/app/editor/document-context.tsx +75 -0
  153. package/app/editor/embed-arrange.tsx +405 -0
  154. package/app/editor/embed-box.ts +301 -0
  155. package/app/editor/extensions.ts +56 -0
  156. package/app/editor/markdown-source.ts +245 -0
  157. package/app/editor/node-views.tsx +376 -0
  158. package/app/editor/quote-bubble.tsx +84 -0
  159. package/app/editor/two-versions.ts +82 -0
  160. package/app/flags.ts +14 -0
  161. package/app/frame/file-errors.ts +39 -0
  162. package/app/frame/frame-app.tsx +147 -0
  163. package/app/frame/frame-history.ts +58 -0
  164. package/app/frame/frame-links.ts +66 -0
  165. package/app/frame/hold-window-focus.ts +45 -0
  166. package/app/frame/left-view.tsx +57 -0
  167. package/app/frame/studio-view.tsx +36 -0
  168. package/app/frame/view-files.ts +13 -0
  169. package/app/frame/views.ts +161 -0
  170. package/app/frame.css +14 -0
  171. package/app/frame.html +31 -0
  172. package/app/frame.tsx +40 -0
  173. package/app/git/branch-panel.tsx +831 -0
  174. package/app/git/change-list.tsx +119 -0
  175. package/app/git/clash.tsx +114 -0
  176. package/app/git/git-controls.tsx +424 -0
  177. package/app/git/git-state.ts +206 -0
  178. package/app/git/git-toasts.tsx +507 -0
  179. package/app/git/paused.tsx +192 -0
  180. package/app/git/saved-list.tsx +96 -0
  181. package/app/git/sync-panel.tsx +334 -0
  182. package/app/i18n/locales/en/messages.po +4924 -0
  183. package/app/i18n/locales/en/messages.ts +1 -0
  184. package/app/i18n/locales/pseudo/messages.po +4924 -0
  185. package/app/i18n/locales/pseudo/messages.ts +1 -0
  186. package/app/i18n/locales.ts +41 -0
  187. package/app/i18n/provider.tsx +27 -0
  188. package/app/icons/glyphs.tsx +251 -0
  189. package/app/icons/index.tsx +38 -0
  190. package/app/icons/types.ts +12 -0
  191. package/app/index.html +46 -0
  192. package/app/kit/inspect-runtime.ts +292 -0
  193. package/app/kit/sample-people.ts +77 -0
  194. package/app/kit/use-flow.ts +23 -0
  195. package/app/kit/use-simulated-load.ts +24 -0
  196. package/app/kit/use-simulated-stream.ts +50 -0
  197. package/app/kit/use-view-control.ts +31 -0
  198. package/app/kit/use-view-param.ts +9 -0
  199. package/app/live/deployed-preview.ts +34 -0
  200. package/app/live/focus-reporter.ts +96 -0
  201. package/app/live/guest-review.ts +515 -0
  202. package/app/live/restart-wait.ts +68 -0
  203. package/app/live/server-connection.ts +98 -0
  204. package/app/live/studio-action.ts +42 -0
  205. package/app/live/studio-api.ts +769 -0
  206. package/app/live/studio-data.ts +177 -0
  207. package/app/live/studio-live.ts +343 -0
  208. package/app/live/studio-request.ts +133 -0
  209. package/app/live/thread-state.ts +59 -0
  210. package/app/live/use-devices.ts +92 -0
  211. package/app/live/use-focus.ts +39 -0
  212. package/app/live/use-last-edited.ts +31 -0
  213. package/app/live/use-show-requests.ts +27 -0
  214. package/app/live/use-workspace.ts +88 -0
  215. package/app/main.tsx +50 -0
  216. package/app/next/fonts.ts +34 -0
  217. package/app/next/image.tsx +117 -0
  218. package/app/next/navigation.ts +64 -0
  219. package/app/next/router.ts +41 -0
  220. package/app/pages/agent-settings.tsx +57 -0
  221. package/app/pages/ask-the-agent.tsx +40 -0
  222. package/app/pages/canvas-settings.tsx +35 -0
  223. package/app/pages/canvas.tsx +789 -0
  224. package/app/pages/chrome-extension.tsx +132 -0
  225. package/app/pages/commands-settings.tsx +709 -0
  226. package/app/pages/deployment-settings.tsx +190 -0
  227. package/app/pages/doc.tsx +31 -0
  228. package/app/pages/file-sort.ts +49 -0
  229. package/app/pages/git-checks.tsx +174 -0
  230. package/app/pages/guidelines.tsx +202 -0
  231. package/app/pages/home.tsx +515 -0
  232. package/app/pages/host.tsx +21 -0
  233. package/app/pages/markup-demo.jpg +0 -0
  234. package/app/pages/markup-settings.tsx +274 -0
  235. package/app/pages/not-found.tsx +18 -0
  236. package/app/pages/people.tsx +115 -0
  237. package/app/pages/play-bar.tsx +433 -0
  238. package/app/pages/play-size.ts +86 -0
  239. package/app/pages/play.tsx +992 -0
  240. package/app/pages/profile.tsx +57 -0
  241. package/app/pages/prototype.tsx +136 -0
  242. package/app/pages/render.tsx +162 -0
  243. package/app/pages/settings.tsx +37 -0
  244. package/app/pages/workspace-general.tsx +323 -0
  245. package/app/pages/workspace-git.tsx +385 -0
  246. package/app/pages/your-guidelines.tsx +77 -0
  247. package/app/pages/your-picture.tsx +205 -0
  248. package/app/public/dex-192.png +0 -0
  249. package/app/public/dex-512.png +0 -0
  250. package/app/public/dex-apple-touch-icon.png +0 -0
  251. package/app/public/dex-icon-32.png +0 -0
  252. package/app/public/dex-icon.svg +1 -0
  253. package/app/public/dex-maskable-512.png +0 -0
  254. package/app/registry-files.ts +53 -0
  255. package/app/registry.ts +243 -0
  256. package/app/renamed-storage.ts +42 -0
  257. package/app/save-file.ts +13 -0
  258. package/app/shell/about.tsx +126 -0
  259. package/app/shell/agent-logos.tsx +98 -0
  260. package/app/shell/agent-manual.tsx +172 -0
  261. package/app/shell/avatar-pictures.ts +131 -0
  262. package/app/shell/avatar.tsx +128 -0
  263. package/app/shell/bell.tsx +382 -0
  264. package/app/shell/broke.tsx +46 -0
  265. package/app/shell/chrome-theme.tsx +91 -0
  266. package/app/shell/connect-agent.tsx +538 -0
  267. package/app/shell/copy-text.tsx +53 -0
  268. package/app/shell/deployed-preview-bar.tsx +23 -0
  269. package/app/shell/desktop-app.tsx +290 -0
  270. package/app/shell/empty-state.tsx +35 -0
  271. package/app/shell/feedback-details.ts +111 -0
  272. package/app/shell/feedback-form.tsx +630 -0
  273. package/app/shell/feedback-link.tsx +82 -0
  274. package/app/shell/file-bytes.ts +11 -0
  275. package/app/shell/host.ts +96 -0
  276. package/app/shell/info-tip.tsx +15 -0
  277. package/app/shell/install-prompt.ts +55 -0
  278. package/app/shell/instructions-editor.tsx +842 -0
  279. package/app/shell/instructions.tsx +114 -0
  280. package/app/shell/main-sidebar.tsx +346 -0
  281. package/app/shell/markdown.tsx +9 -0
  282. package/app/shell/open-agent.tsx +90 -0
  283. package/app/shell/page-header.tsx +154 -0
  284. package/app/shell/page-title.ts +129 -0
  285. package/app/shell/presence-style.ts +59 -0
  286. package/app/shell/presence.tsx +503 -0
  287. package/app/shell/prototype-menu.tsx +293 -0
  288. package/app/shell/quick-start.tsx +311 -0
  289. package/app/shell/recents.ts +113 -0
  290. package/app/shell/report-issue.ts +130 -0
  291. package/app/shell/restart-toast.tsx +258 -0
  292. package/app/shell/save-state.tsx +45 -0
  293. package/app/shell/scaled-frame.tsx +151 -0
  294. package/app/shell/settings-sections.ts +202 -0
  295. package/app/shell/settings-sidebar.tsx +81 -0
  296. package/app/shell/settings-ui.tsx +185 -0
  297. package/app/shell/shell-bar.ts +16 -0
  298. package/app/shell/sidebar.tsx +88 -0
  299. package/app/shell/skeleton.ts +376 -0
  300. package/app/shell/status-badge.tsx +29 -0
  301. package/app/shell/studio-shell.tsx +217 -0
  302. package/app/shell/thread-list.tsx +217 -0
  303. package/app/shell/time-ago.ts +45 -0
  304. package/app/shell/toasts.tsx +119 -0
  305. package/app/shell/update-notice.tsx +883 -0
  306. package/app/shell/use-copied.ts +26 -0
  307. package/app/shell/use-space.ts +27 -0
  308. package/app/shell/watch-switch.tsx +32 -0
  309. package/app/shell/welcome.tsx +205 -0
  310. package/app/shell/window-buttons.tsx +103 -0
  311. package/app/shell/working-on.tsx +35 -0
  312. package/app/shell/workspace-mark.tsx +278 -0
  313. package/app/shell/workspace-tile.jpg +0 -0
  314. package/app/studio-ui.d.ts +97 -0
  315. package/app/styles.css +571 -0
  316. package/app/types.ts +257 -0
  317. package/app/ui/boundary.tsx +48 -0
  318. package/app/ui/prompt-editor.tsx +474 -0
  319. package/app/ui/reference.tsx +114 -0
  320. package/app/ui/segmented.tsx +73 -0
  321. package/app/ui/shadcn/attachment.tsx +207 -0
  322. package/app/ui/shadcn/badge.tsx +51 -0
  323. package/app/ui/shadcn/button.tsx +62 -0
  324. package/app/ui/shadcn/card.tsx +102 -0
  325. package/app/ui/shadcn/checkbox.tsx +28 -0
  326. package/app/ui/shadcn/dialog.tsx +157 -0
  327. package/app/ui/shadcn/dropdown-menu.tsx +276 -0
  328. package/app/ui/shadcn/input-group.tsx +158 -0
  329. package/app/ui/shadcn/input.tsx +19 -0
  330. package/app/ui/shadcn/kbd.tsx +26 -0
  331. package/app/ui/shadcn/native-select.tsx +65 -0
  332. package/app/ui/shadcn/popover.tsx +89 -0
  333. package/app/ui/shadcn/separator.tsx +24 -0
  334. package/app/ui/shadcn/sheet.tsx +135 -0
  335. package/app/ui/shadcn/spinner.tsx +17 -0
  336. package/app/ui/shadcn/switch.tsx +31 -0
  337. package/app/ui/shadcn/tabs.tsx +82 -0
  338. package/app/ui/shadcn/textarea.tsx +17 -0
  339. package/app/ui/shadcn/toggle-group.tsx +89 -0
  340. package/app/ui/shadcn/toggle.tsx +44 -0
  341. package/app/ui/shadcn/tooltip.tsx +67 -0
  342. package/app/ui/theme-provider.tsx +31 -0
  343. package/app/ui/theme-switch.tsx +27 -0
  344. package/app/ui/theme.css +715 -0
  345. package/bin/dex.mjs +44 -0
  346. package/bin/sudio.mjs +9 -0
  347. package/dist/cli/banner.d.mts +75 -0
  348. package/dist/cli/banner.mjs +206 -0
  349. package/dist/cli/command.d.mts +47 -0
  350. package/dist/cli/command.mjs +40 -0
  351. package/dist/cli/commands/agents/add.d.mts +11 -0
  352. package/dist/cli/commands/agents/add.mjs +24 -0
  353. package/dist/cli/commands/agents.d.mts +5 -0
  354. package/dist/cli/commands/agents.mjs +13 -0
  355. package/dist/cli/commands/app.d.mts +5 -0
  356. package/dist/cli/commands/app.mjs +104 -0
  357. package/dist/cli/commands/build.d.mts +4 -0
  358. package/dist/cli/commands/build.mjs +33 -0
  359. package/dist/cli/commands/claude.d.mts +10 -0
  360. package/dist/cli/commands/claude.mjs +44 -0
  361. package/dist/cli/commands/cloud/args.d.mts +17 -0
  362. package/dist/cli/commands/cloud/args.mjs +18 -0
  363. package/dist/cli/commands/cloud/link.d.mts +15 -0
  364. package/dist/cli/commands/cloud/link.mjs +20 -0
  365. package/dist/cli/commands/cloud/live.d.mts +38 -0
  366. package/dist/cli/commands/cloud/live.mjs +29 -0
  367. package/dist/cli/commands/cloud/login.d.mts +15 -0
  368. package/dist/cli/commands/cloud/login.mjs +19 -0
  369. package/dist/cli/commands/cloud/publish.d.mts +5 -0
  370. package/dist/cli/commands/cloud/publish.mjs +51 -0
  371. package/dist/cli/commands/cloud/push.d.mts +4 -0
  372. package/dist/cli/commands/cloud/push.mjs +15 -0
  373. package/dist/cli/commands/cloud/status.d.mts +4 -0
  374. package/dist/cli/commands/cloud/status.mjs +15 -0
  375. package/dist/cli/commands/cloud/unlink.d.mts +4 -0
  376. package/dist/cli/commands/cloud/unlink.mjs +15 -0
  377. package/dist/cli/commands/cloud.d.mts +5 -0
  378. package/dist/cli/commands/cloud.mjs +21 -0
  379. package/dist/cli/commands/components.d.mts +14 -0
  380. package/dist/cli/commands/components.mjs +26 -0
  381. package/dist/cli/commands/create.d.mts +245 -0
  382. package/dist/cli/commands/create.mjs +153 -0
  383. package/dist/cli/commands/dev.d.mts +24 -0
  384. package/dist/cli/commands/dev.mjs +134 -0
  385. package/dist/cli/commands/doctor.d.mts +9 -0
  386. package/dist/cli/commands/doctor.mjs +24 -0
  387. package/dist/cli/commands/extension.d.mts +10 -0
  388. package/dist/cli/commands/extension.mjs +32 -0
  389. package/dist/cli/commands/hook.d.mts +19 -0
  390. package/dist/cli/commands/hook.mjs +72 -0
  391. package/dist/cli/commands/init.d.mts +99 -0
  392. package/dist/cli/commands/init.mjs +22 -0
  393. package/dist/cli/commands/mcp.d.mts +15 -0
  394. package/dist/cli/commands/mcp.mjs +48 -0
  395. package/dist/cli/commands/merge-contributors.d.mts +24 -0
  396. package/dist/cli/commands/merge-contributors.mjs +43 -0
  397. package/dist/cli/commands/merge-spec.d.mts +32 -0
  398. package/dist/cli/commands/merge-spec.mjs +75 -0
  399. package/dist/cli/commands/preview.d.mts +4 -0
  400. package/dist/cli/commands/preview.mjs +15 -0
  401. package/dist/cli/commands/stop.d.mts +4 -0
  402. package/dist/cli/commands/stop.mjs +21 -0
  403. package/dist/cli/commands/upgrade.d.mts +14 -0
  404. package/dist/cli/commands/upgrade.mjs +47 -0
  405. package/dist/cli/commands/work/args.d.mts +33 -0
  406. package/dist/cli/commands/work/args.mjs +34 -0
  407. package/dist/cli/commands/work/check.d.mts +4 -0
  408. package/dist/cli/commands/work/check.mjs +19 -0
  409. package/dist/cli/commands/work/contributor.d.mts +25 -0
  410. package/dist/cli/commands/work/contributor.mjs +36 -0
  411. package/dist/cli/commands/work/new.d.mts +30 -0
  412. package/dist/cli/commands/work/new.mjs +33 -0
  413. package/dist/cli/commands/work/presence.d.mts +34 -0
  414. package/dist/cli/commands/work/presence.mjs +38 -0
  415. package/dist/cli/commands/work/scope.d.mts +21 -0
  416. package/dist/cli/commands/work/scope.mjs +25 -0
  417. package/dist/cli/commands/work/snapshot.d.mts +20 -0
  418. package/dist/cli/commands/work/snapshot.mjs +28 -0
  419. package/dist/cli/commands/work/thread.d.mts +36 -0
  420. package/dist/cli/commands/work/thread.mjs +40 -0
  421. package/dist/cli/commands/work/threads.d.mts +14 -0
  422. package/dist/cli/commands/work/threads.mjs +25 -0
  423. package/dist/cli/commands/work/whoami.d.mts +4 -0
  424. package/dist/cli/commands/work/whoami.mjs +14 -0
  425. package/dist/cli/help.d.mts +9 -0
  426. package/dist/cli/help.mjs +161 -0
  427. package/dist/cli/main.d.mts +473 -0
  428. package/dist/cli/main.mjs +113 -0
  429. package/dist/cli/mcp-relay.d.mts +60 -0
  430. package/dist/cli/mcp-relay.mjs +342 -0
  431. package/dist/cli/recovery-server.d.mts +25 -0
  432. package/dist/cli/recovery-server.mjs +68 -0
  433. package/dist/cli/strict-flags.d.mts +30 -0
  434. package/dist/cli/strict-flags.mjs +115 -0
  435. package/dist/cli/supervise.d.mts +42 -0
  436. package/dist/cli/supervise.mjs +300 -0
  437. package/dist/cli/ui.d.mts +109 -0
  438. package/dist/cli/ui.mjs +240 -0
  439. package/dist/config/design-system.d.mts +75 -0
  440. package/dist/config/design-system.mjs +202 -0
  441. package/dist/config/index.d.mts +261 -0
  442. package/dist/config/index.mjs +20 -0
  443. package/dist/config/load.d.mts +55 -0
  444. package/dist/config/load.mjs +121 -0
  445. package/dist/config/package-manager.d.mts +15 -0
  446. package/dist/config/package-manager.mjs +61 -0
  447. package/dist/config/project-files.d.mts +91 -0
  448. package/dist/config/project-files.mjs +504 -0
  449. package/dist/config/renamed.d.mts +22 -0
  450. package/dist/config/renamed.mjs +34 -0
  451. package/dist/config/schema.d.mts +235 -0
  452. package/dist/config/schema.mjs +167 -0
  453. package/dist/content/biome.d.mts +10 -0
  454. package/dist/content/biome.mjs +35 -0
  455. package/dist/content/capture.d.mts +81 -0
  456. package/dist/content/capture.mjs +723 -0
  457. package/dist/content/commands.d.mts +67 -0
  458. package/dist/content/commands.mjs +180 -0
  459. package/dist/content/comments-log.d.mts +61 -0
  460. package/dist/content/comments-log.mjs +161 -0
  461. package/dist/content/component-props.d.mts +17 -0
  462. package/dist/content/component-props.mjs +354 -0
  463. package/dist/content/content.d.mts +581 -0
  464. package/dist/content/content.mjs +1366 -0
  465. package/dist/content/devices.d.mts +17 -0
  466. package/dist/content/devices.mjs +49 -0
  467. package/dist/content/file-turns.d.mts +9 -0
  468. package/dist/content/file-turns.mjs +35 -0
  469. package/dist/content/first-run.d.mts +9 -0
  470. package/dist/content/first-run.mjs +45 -0
  471. package/dist/content/flow-specs.d.mts +68 -0
  472. package/dist/content/flow-specs.mjs +161 -0
  473. package/dist/content/insert-edit.d.mts +24 -0
  474. package/dist/content/insert-edit.mjs +139 -0
  475. package/dist/content/jsx-source.d.mts +9 -0
  476. package/dist/content/jsx-source.mjs +30 -0
  477. package/dist/content/last-edited.d.mts +10 -0
  478. package/dist/content/last-edited.mjs +34 -0
  479. package/dist/content/layout.d.mts +10 -0
  480. package/dist/content/layout.mjs +23 -0
  481. package/dist/content/merge-rules.d.mts +16 -0
  482. package/dist/content/merge-rules.mjs +61 -0
  483. package/dist/content/prop-edit.d.mts +45 -0
  484. package/dist/content/prop-edit.mjs +151 -0
  485. package/dist/content/prototype-checks.d.mts +30 -0
  486. package/dist/content/prototype-checks.mjs +117 -0
  487. package/dist/content/prototype-summary.d.mts +93 -0
  488. package/dist/content/prototype-summary.mjs +86 -0
  489. package/dist/content/prototypes.d.mts +117 -0
  490. package/dist/content/prototypes.mjs +232 -0
  491. package/dist/content/read-text.d.mts +4 -0
  492. package/dist/content/read-text.mjs +12 -0
  493. package/dist/content/review-import.d.mts +13 -0
  494. package/dist/content/review-import.mjs +54 -0
  495. package/dist/content/review-pages.d.mts +26 -0
  496. package/dist/content/review-pages.mjs +240 -0
  497. package/dist/content/screenshot.d.mts +60 -0
  498. package/dist/content/screenshot.mjs +274 -0
  499. package/dist/content/snapshot-client.d.mts +25 -0
  500. package/dist/content/snapshot-client.mjs +60 -0
  501. package/dist/content/store.d.mts +52 -0
  502. package/dist/content/store.mjs +123 -0
  503. package/dist/content/text-edit.d.mts +24 -0
  504. package/dist/content/text-edit.mjs +92 -0
  505. package/dist/content/thread-module.d.mts +79 -0
  506. package/dist/content/thread-module.mjs +201 -0
  507. package/dist/content/threads.d.mts +29 -0
  508. package/dist/content/threads.mjs +193 -0
  509. package/dist/content/trash.d.mts +69 -0
  510. package/dist/content/trash.mjs +206 -0
  511. package/dist/paste/figma/appearance.d.mts +7 -0
  512. package/dist/paste/figma/appearance.mjs +156 -0
  513. package/dist/paste/figma/captures.d.mts +14 -0
  514. package/dist/paste/figma/captures.mjs +112 -0
  515. package/dist/paste/figma/decode.d.mts +376 -0
  516. package/dist/paste/figma/decode.mjs +235 -0
  517. package/dist/paste/figma/document.d.mts +70 -0
  518. package/dist/paste/figma/document.mjs +323 -0
  519. package/dist/paste/figma/layout.d.mts +19 -0
  520. package/dist/paste/figma/layout.mjs +190 -0
  521. package/dist/paste/figma/paint.d.mts +9 -0
  522. package/dist/paste/figma/paint.mjs +198 -0
  523. package/dist/paste/figma/render.d.mts +8 -0
  524. package/dist/paste/figma/render.mjs +102 -0
  525. package/dist/paste/figma/styles.d.mts +52 -0
  526. package/dist/paste/figma/styles.mjs +53 -0
  527. package/dist/paste/figma/text.d.mts +6 -0
  528. package/dist/paste/figma/text.mjs +282 -0
  529. package/dist/paste/figma/vector.d.mts +15 -0
  530. package/dist/paste/figma/vector.mjs +254 -0
  531. package/dist/paste/fonts.d.mts +9 -0
  532. package/dist/paste/fonts.mjs +81 -0
  533. package/dist/paste/paste.d.mts +27 -0
  534. package/dist/paste/paste.mjs +131 -0
  535. package/dist/paths.d.mts +66 -0
  536. package/dist/paths.mjs +138 -0
  537. package/dist/server/agent-env.d.mts +12 -0
  538. package/dist/server/agent-env.mjs +47 -0
  539. package/dist/server/agent-session.d.mts +62 -0
  540. package/dist/server/agent-session.mjs +131 -0
  541. package/dist/server/agents.d.mts +133 -0
  542. package/dist/server/agents.mjs +771 -0
  543. package/dist/server/allowed-request.d.mts +31 -0
  544. package/dist/server/allowed-request.mjs +54 -0
  545. package/dist/server/avatars.d.mts +18 -0
  546. package/dist/server/avatars.mjs +60 -0
  547. package/dist/server/brief.d.mts +37 -0
  548. package/dist/server/brief.mjs +242 -0
  549. package/dist/server/briefing.d.mts +97 -0
  550. package/dist/server/briefing.mjs +99 -0
  551. package/dist/server/build-pictures.d.mts +55 -0
  552. package/dist/server/build-pictures.mjs +209 -0
  553. package/dist/server/build-settings.d.mts +13 -0
  554. package/dist/server/build-settings.mjs +30 -0
  555. package/dist/server/changelog.d.mts +10 -0
  556. package/dist/server/changelog.mjs +39 -0
  557. package/dist/server/channel.d.mts +250 -0
  558. package/dist/server/channel.mjs +669 -0
  559. package/dist/server/claimed-presence.d.mts +17 -0
  560. package/dist/server/claimed-presence.mjs +50 -0
  561. package/dist/server/close-check.d.mts +31 -0
  562. package/dist/server/close-check.mjs +129 -0
  563. package/dist/server/cloud.d.mts +89 -0
  564. package/dist/server/cloud.mjs +229 -0
  565. package/dist/server/command-settings.d.mts +23 -0
  566. package/dist/server/command-settings.mjs +59 -0
  567. package/dist/server/component-catalogue.d.mts +47 -0
  568. package/dist/server/component-catalogue.mjs +166 -0
  569. package/dist/server/config-settings.d.mts +19 -0
  570. package/dist/server/config-settings.mjs +44 -0
  571. package/dist/server/content-type.d.mts +3 -0
  572. package/dist/server/content-type.mjs +25 -0
  573. package/dist/server/dependency-clash.d.mts +23 -0
  574. package/dist/server/dependency-clash.mjs +225 -0
  575. package/dist/server/dev-server.d.mts +11 -0
  576. package/dist/server/dev-server.mjs +198 -0
  577. package/dist/server/features.d.mts +29 -0
  578. package/dist/server/features.mjs +34 -0
  579. package/dist/server/file-errors.d.mts +22 -0
  580. package/dist/server/file-errors.mjs +111 -0
  581. package/dist/server/file-lock.d.mts +18 -0
  582. package/dist/server/file-lock.mjs +68 -0
  583. package/dist/server/git-asks.d.mts +23 -0
  584. package/dist/server/git-asks.mjs +57 -0
  585. package/dist/server/git-host.d.mts +38 -0
  586. package/dist/server/git-host.mjs +182 -0
  587. package/dist/server/git-paused.d.mts +19 -0
  588. package/dist/server/git-paused.mjs +163 -0
  589. package/dist/server/git-settings.d.mts +18 -0
  590. package/dist/server/git-settings.mjs +64 -0
  591. package/dist/server/git-sync.d.mts +67 -0
  592. package/dist/server/git-sync.mjs +499 -0
  593. package/dist/server/git.d.mts +148 -0
  594. package/dist/server/git.mjs +652 -0
  595. package/dist/server/instructions.d.mts +27 -0
  596. package/dist/server/instructions.mjs +71 -0
  597. package/dist/server/live-mirror.d.mts +60 -0
  598. package/dist/server/live-mirror.mjs +319 -0
  599. package/dist/server/live.d.mts +10 -0
  600. package/dist/server/live.mjs +155 -0
  601. package/dist/server/machine-update.d.mts +77 -0
  602. package/dist/server/machine-update.mjs +486 -0
  603. package/dist/server/mcp-handover.d.mts +37 -0
  604. package/dist/server/mcp-handover.mjs +76 -0
  605. package/dist/server/mcp.d.mts +63 -0
  606. package/dist/server/mcp.mjs +156 -0
  607. package/dist/server/me.d.mts +30 -0
  608. package/dist/server/me.mjs +43 -0
  609. package/dist/server/next.d.mts +21 -0
  610. package/dist/server/next.mjs +96 -0
  611. package/dist/server/notices.d.mts +84 -0
  612. package/dist/server/notices.mjs +281 -0
  613. package/dist/server/open-page.d.mts +58 -0
  614. package/dist/server/open-page.mjs +101 -0
  615. package/dist/server/own-copies.d.mts +64 -0
  616. package/dist/server/own-copies.mjs +260 -0
  617. package/dist/server/people.d.mts +19 -0
  618. package/dist/server/people.mjs +57 -0
  619. package/dist/server/personal-folder.d.mts +7 -0
  620. package/dist/server/personal-folder.mjs +32 -0
  621. package/dist/server/pictures.d.mts +39 -0
  622. package/dist/server/pictures.mjs +248 -0
  623. package/dist/server/port.d.mts +60 -0
  624. package/dist/server/port.mjs +106 -0
  625. package/dist/server/preferences.d.mts +7 -0
  626. package/dist/server/preferences.mjs +22 -0
  627. package/dist/server/presence.d.mts +40 -0
  628. package/dist/server/presence.mjs +98 -0
  629. package/dist/server/project-id.d.mts +4 -0
  630. package/dist/server/project-id.mjs +13 -0
  631. package/dist/server/project-public.d.mts +4 -0
  632. package/dist/server/project-public.mjs +53 -0
  633. package/dist/server/prototype-brief.d.mts +26 -0
  634. package/dist/server/prototype-brief.mjs +117 -0
  635. package/dist/server/push-notice.d.mts +23 -0
  636. package/dist/server/push-notice.mjs +43 -0
  637. package/dist/server/quiet-run.d.mts +25 -0
  638. package/dist/server/quiet-run.mjs +47 -0
  639. package/dist/server/registry.d.mts +23 -0
  640. package/dist/server/registry.mjs +113 -0
  641. package/dist/server/requests.d.mts +63 -0
  642. package/dist/server/requests.mjs +1483 -0
  643. package/dist/server/response-budget.d.mts +66 -0
  644. package/dist/server/response-budget.mjs +78 -0
  645. package/dist/server/restart.d.mts +77 -0
  646. package/dist/server/restart.mjs +115 -0
  647. package/dist/server/roster.d.mts +76 -0
  648. package/dist/server/roster.mjs +191 -0
  649. package/dist/server/saved.d.mts +18 -0
  650. package/dist/server/saved.mjs +46 -0
  651. package/dist/server/source-stamp.d.mts +19 -0
  652. package/dist/server/source-stamp.mjs +120 -0
  653. package/dist/server/spec-decisions.d.mts +31 -0
  654. package/dist/server/spec-decisions.mjs +59 -0
  655. package/dist/server/spec-suggestions.d.mts +21 -0
  656. package/dist/server/spec-suggestions.mjs +59 -0
  657. package/dist/server/state.d.mts +118 -0
  658. package/dist/server/state.mjs +165 -0
  659. package/dist/server/stop-studio.d.mts +17 -0
  660. package/dist/server/stop-studio.mjs +37 -0
  661. package/dist/server/studio-for.d.mts +58 -0
  662. package/dist/server/studio-for.mjs +73 -0
  663. package/dist/server/sync-install.d.mts +44 -0
  664. package/dist/server/sync-install.mjs +66 -0
  665. package/dist/server/thread-forms.d.mts +50 -0
  666. package/dist/server/thread-forms.mjs +159 -0
  667. package/dist/server/thread-place.d.mts +39 -0
  668. package/dist/server/thread-place.mjs +87 -0
  669. package/dist/server/thread-source.d.mts +60 -0
  670. package/dist/server/thread-source.mjs +197 -0
  671. package/dist/server/tools/close-reply.d.mts +6 -0
  672. package/dist/server/tools/close-reply.mjs +138 -0
  673. package/dist/server/tools/comment.d.mts +6 -0
  674. package/dist/server/tools/comment.mjs +49 -0
  675. package/dist/server/tools/context.d.mts +67 -0
  676. package/dist/server/tools/context.mjs +66 -0
  677. package/dist/server/tools/describe.d.mts +18 -0
  678. package/dist/server/tools/describe.mjs +35 -0
  679. package/dist/server/tools/feedback.d.mts +7 -0
  680. package/dist/server/tools/feedback.mjs +142 -0
  681. package/dist/server/tools/place-frame.d.mts +6 -0
  682. package/dist/server/tools/place-frame.mjs +104 -0
  683. package/dist/server/tools/prototype-name.d.mts +12 -0
  684. package/dist/server/tools/prototype-name.mjs +20 -0
  685. package/dist/server/tools/reading.d.mts +10 -0
  686. package/dist/server/tools/reading.mjs +152 -0
  687. package/dist/server/tools/result.d.mts +16 -0
  688. package/dist/server/tools/result.mjs +35 -0
  689. package/dist/server/tools/show.d.mts +7 -0
  690. package/dist/server/tools/show.mjs +87 -0
  691. package/dist/server/tools/snapshot.d.mts +10 -0
  692. package/dist/server/tools/snapshot.mjs +72 -0
  693. package/dist/server/tools/thread-list.d.mts +6 -0
  694. package/dist/server/tools/thread-list.mjs +105 -0
  695. package/dist/server/tools/watch.d.mts +6 -0
  696. package/dist/server/tools/watch.mjs +286 -0
  697. package/dist/server/unresolved-imports.d.mts +5 -0
  698. package/dist/server/unresolved-imports.mjs +82 -0
  699. package/dist/server/update-branch.d.mts +14 -0
  700. package/dist/server/update-branch.mjs +153 -0
  701. package/dist/server/update-studio.d.mts +38 -0
  702. package/dist/server/update-studio.mjs +101 -0
  703. package/dist/server/updates.d.mts +81 -0
  704. package/dist/server/updates.mjs +187 -0
  705. package/dist/server/vite.d.mts +115 -0
  706. package/dist/server/vite.mjs +751 -0
  707. package/dist/server/web-app.d.mts +24 -0
  708. package/dist/server/web-app.mjs +182 -0
  709. package/dist/server/welcome.d.mts +7 -0
  710. package/dist/server/welcome.mjs +43 -0
  711. package/dist/server/work-groups.d.mts +50 -0
  712. package/dist/server/work-groups.mjs +247 -0
  713. package/dist/server/workspace-settings.d.mts +55 -0
  714. package/dist/server/workspace-settings.mjs +340 -0
  715. package/dist/server/zip.d.mts +29 -0
  716. package/dist/server/zip.mjs +124 -0
  717. package/dist/setup/apply.d.mts +76 -0
  718. package/dist/setup/apply.mjs +458 -0
  719. package/dist/setup/commit-lint.d.mts +71 -0
  720. package/dist/setup/commit-lint.mjs +286 -0
  721. package/dist/setup/components.d.mts +27 -0
  722. package/dist/setup/components.mjs +67 -0
  723. package/dist/setup/config-choices.d.mts +14 -0
  724. package/dist/setup/config-choices.mjs +32 -0
  725. package/dist/setup/config-source.d.mts +58 -0
  726. package/dist/setup/config-source.mjs +384 -0
  727. package/dist/setup/create.d.mts +50 -0
  728. package/dist/setup/create.mjs +1015 -0
  729. package/dist/setup/design-md-setup.d.mts +91 -0
  730. package/dist/setup/design-md-setup.mjs +164 -0
  731. package/dist/setup/design-md.d.mts +144 -0
  732. package/dist/setup/design-md.mjs +773 -0
  733. package/dist/setup/design-system-checks.d.mts +39 -0
  734. package/dist/setup/design-system-checks.mjs +264 -0
  735. package/dist/setup/design-system-guide.d.mts +10 -0
  736. package/dist/setup/design-system-guide.mjs +41 -0
  737. package/dist/setup/desktop-app-script.d.mts +28 -0
  738. package/dist/setup/desktop-app-script.mjs +774 -0
  739. package/dist/setup/desktop-app-start.d.mts +59 -0
  740. package/dist/setup/desktop-app-start.mjs +114 -0
  741. package/dist/setup/desktop-app.d.mts +166 -0
  742. package/dist/setup/desktop-app.mjs +535 -0
  743. package/dist/setup/detect/workspace.d.mts +207 -0
  744. package/dist/setup/detect/workspace.mjs +747 -0
  745. package/dist/setup/detect.d.mts +90 -0
  746. package/dist/setup/detect.mjs +394 -0
  747. package/dist/setup/doctor.d.mts +48 -0
  748. package/dist/setup/doctor.mjs +288 -0
  749. package/dist/setup/existing-setup.d.mts +58 -0
  750. package/dist/setup/existing-setup.mjs +322 -0
  751. package/dist/setup/findings.d.mts +16 -0
  752. package/dist/setup/findings.mjs +9 -0
  753. package/dist/setup/git-checks.d.mts +41 -0
  754. package/dist/setup/git-checks.mjs +247 -0
  755. package/dist/setup/hints.d.mts +20 -0
  756. package/dist/setup/hints.mjs +171 -0
  757. package/dist/setup/host-format.d.mts +13 -0
  758. package/dist/setup/host-format.mjs +89 -0
  759. package/dist/setup/migrate/agent-files.d.mts +23 -0
  760. package/dist/setup/migrate/agent-files.mjs +112 -0
  761. package/dist/setup/migrate/config-name.d.mts +21 -0
  762. package/dist/setup/migrate/config-name.mjs +68 -0
  763. package/dist/setup/migrate/design-system.d.mts +62 -0
  764. package/dist/setup/migrate/design-system.mjs +484 -0
  765. package/dist/setup/migrate/explorations.d.mts +5 -0
  766. package/dist/setup/migrate/explorations.mjs +31 -0
  767. package/dist/setup/migrate/files-folder.d.mts +43 -0
  768. package/dist/setup/migrate/files-folder.mjs +293 -0
  769. package/dist/setup/migrate/guides.d.mts +5 -0
  770. package/dist/setup/migrate/guides.mjs +55 -0
  771. package/dist/setup/migrate/migration.d.mts +67 -0
  772. package/dist/setup/migrate/migration.mjs +7 -0
  773. package/dist/setup/migrate/migrations.d.mts +22 -0
  774. package/dist/setup/migrate/migrations.mjs +52 -0
  775. package/dist/setup/migrate/people-folders.d.mts +26 -0
  776. package/dist/setup/migrate/people-folders.mjs +206 -0
  777. package/dist/setup/migrate/project-files.d.mts +5 -0
  778. package/dist/setup/migrate/project-files.mjs +28 -0
  779. package/dist/setup/migrate/row-titles.d.mts +5 -0
  780. package/dist/setup/migrate/row-titles.mjs +35 -0
  781. package/dist/setup/migrate/studio-state.d.mts +22 -0
  782. package/dist/setup/migrate/studio-state.mjs +130 -0
  783. package/dist/setup/own-app.d.mts +68 -0
  784. package/dist/setup/own-app.mjs +258 -0
  785. package/dist/setup/placement.d.mts +32 -0
  786. package/dist/setup/placement.mjs +249 -0
  787. package/dist/setup/plan.d.mts +159 -0
  788. package/dist/setup/plan.mjs +413 -0
  789. package/dist/setup/project.d.mts +140 -0
  790. package/dist/setup/project.mjs +255 -0
  791. package/dist/setup/prompts.d.mts +78 -0
  792. package/dist/setup/prompts.mjs +753 -0
  793. package/dist/setup/provider.d.mts +19 -0
  794. package/dist/setup/provider.mjs +118 -0
  795. package/dist/setup/questions.d.mts +148 -0
  796. package/dist/setup/questions.mjs +217 -0
  797. package/dist/setup/starters.d.mts +68 -0
  798. package/dist/setup/starters.mjs +177 -0
  799. package/dist/setup/templates.d.mts +75 -0
  800. package/dist/setup/templates.mjs +148 -0
  801. package/dist/setup/workspace-setup.d.mts +37 -0
  802. package/dist/setup/workspace-setup.mjs +157 -0
  803. package/dist/setup/write.d.mts +127 -0
  804. package/dist/setup/write.mjs +231 -0
  805. package/dist/shared/agent-prompts.d.mts +10 -0
  806. package/dist/shared/agent-prompts.mjs +11 -0
  807. package/dist/shared/annotations-core.d.mts +158 -0
  808. package/dist/shared/annotations-core.mjs +263 -0
  809. package/dist/shared/avatar-file.d.mts +11 -0
  810. package/dist/shared/avatar-file.mjs +12 -0
  811. package/dist/shared/block-merge.d.mts +28 -0
  812. package/dist/shared/block-merge.mjs +176 -0
  813. package/dist/shared/build-settings.d.mts +13 -0
  814. package/dist/shared/build-settings.mjs +9 -0
  815. package/dist/shared/built-pictures.d.mts +29 -0
  816. package/dist/shared/built-pictures.mjs +34 -0
  817. package/dist/shared/canvas-core.d.mts +478 -0
  818. package/dist/shared/canvas-core.mjs +859 -0
  819. package/dist/shared/checks.d.mts +8 -0
  820. package/dist/shared/checks.mjs +9 -0
  821. package/dist/shared/commands-core.d.mts +117 -0
  822. package/dist/shared/commands-core.mjs +90 -0
  823. package/dist/shared/contributors-merge.d.mts +8 -0
  824. package/dist/shared/contributors-merge.mjs +54 -0
  825. package/dist/shared/design-system.d.mts +89 -0
  826. package/dist/shared/design-system.mjs +1 -0
  827. package/dist/shared/devices.d.mts +59 -0
  828. package/dist/shared/devices.mjs +172 -0
  829. package/dist/shared/element-steps.d.mts +38 -0
  830. package/dist/shared/element-steps.mjs +40 -0
  831. package/dist/shared/feedback.d.mts +79 -0
  832. package/dist/shared/feedback.mjs +192 -0
  833. package/dist/shared/file-errors.d.mts +25 -0
  834. package/dist/shared/file-errors.mjs +25 -0
  835. package/dist/shared/fix-prompt.d.mts +30 -0
  836. package/dist/shared/fix-prompt.mjs +43 -0
  837. package/dist/shared/frame-grids.d.mts +43 -0
  838. package/dist/shared/frame-grids.mjs +107 -0
  839. package/dist/shared/front-matter.d.mts +37 -0
  840. package/dist/shared/front-matter.mjs +74 -0
  841. package/dist/shared/generated-sections.d.mts +29 -0
  842. package/dist/shared/generated-sections.mjs +117 -0
  843. package/dist/shared/git-core.d.mts +207 -0
  844. package/dist/shared/git-core.mjs +122 -0
  845. package/dist/shared/json-style.d.mts +11 -0
  846. package/dist/shared/json-style.mjs +50 -0
  847. package/dist/shared/listing.d.mts +4 -0
  848. package/dist/shared/listing.mjs +10 -0
  849. package/dist/shared/live-core.d.mts +59 -0
  850. package/dist/shared/live-core.mjs +157 -0
  851. package/dist/shared/live-presence.d.mts +75 -0
  852. package/dist/shared/live-presence.mjs +128 -0
  853. package/dist/shared/markup-prompt.d.mts +17 -0
  854. package/dist/shared/markup-prompt.mjs +56 -0
  855. package/dist/shared/open-page-core.d.mts +38 -0
  856. package/dist/shared/open-page-core.mjs +39 -0
  857. package/dist/shared/page-messages.d.mts +68 -0
  858. package/dist/shared/page-messages.mjs +66 -0
  859. package/dist/shared/page-review.d.mts +100 -0
  860. package/dist/shared/page-review.mjs +138 -0
  861. package/dist/shared/paste-arrangement.d.mts +20 -0
  862. package/dist/shared/paste-arrangement.mjs +31 -0
  863. package/dist/shared/pasted-image.d.mts +16 -0
  864. package/dist/shared/pasted-image.mjs +11 -0
  865. package/dist/shared/people-core.d.mts +158 -0
  866. package/dist/shared/people-core.mjs +469 -0
  867. package/dist/shared/presence-core.d.mts +22 -0
  868. package/dist/shared/presence-core.mjs +7 -0
  869. package/dist/shared/product.d.mts +3 -0
  870. package/dist/shared/product.mjs +4 -0
  871. package/dist/shared/prototypes-core.d.mts +168 -0
  872. package/dist/shared/prototypes-core.mjs +270 -0
  873. package/dist/shared/references-core.d.mts +30 -0
  874. package/dist/shared/references-core.mjs +46 -0
  875. package/dist/shared/removed-views-core.d.mts +101 -0
  876. package/dist/shared/removed-views-core.mjs +115 -0
  877. package/dist/shared/review-file.d.mts +101 -0
  878. package/dist/shared/review-file.mjs +97 -0
  879. package/dist/shared/server-page.d.mts +74 -0
  880. package/dist/shared/server-page.mjs +300 -0
  881. package/dist/shared/signup.d.mts +42 -0
  882. package/dist/shared/signup.mjs +97 -0
  883. package/dist/shared/sketch-core.d.mts +61 -0
  884. package/dist/shared/sketch-core.mjs +329 -0
  885. package/dist/shared/snapshot-clipboard.d.mts +90 -0
  886. package/dist/shared/snapshot-clipboard.mjs +50 -0
  887. package/dist/shared/snapshot-images.d.mts +23 -0
  888. package/dist/shared/snapshot-images.mjs +80 -0
  889. package/dist/shared/spec-quote.d.mts +25 -0
  890. package/dist/shared/spec-quote.mjs +100 -0
  891. package/dist/shared/studio-events.d.mts +136 -0
  892. package/dist/shared/studio-events.mjs +95 -0
  893. package/dist/shared/studio-files.d.mts +50 -0
  894. package/dist/shared/studio-files.mjs +58 -0
  895. package/dist/shared/studio-routes.d.mts +844 -0
  896. package/dist/shared/studio-routes.mjs +137 -0
  897. package/dist/shared/threads-core.d.mts +455 -0
  898. package/dist/shared/threads-core.mjs +678 -0
  899. package/dist/shared/unzip.d.mts +9 -0
  900. package/dist/shared/unzip.mjs +56 -0
  901. package/dist/shared/update-core.d.mts +111 -0
  902. package/dist/shared/update-core.mjs +21 -0
  903. package/dist/shared/word-diff.d.mts +33 -0
  904. package/dist/shared/word-diff.mjs +118 -0
  905. package/dist/shared/workspace.d.mts +26 -0
  906. package/dist/shared/workspace.mjs +17 -0
  907. package/extension/dist/background.js +1 -0
  908. package/extension/dist/feedback.html +19 -0
  909. package/extension/dist/feedback.js +699 -0
  910. package/extension/dist/icons/128.png +0 -0
  911. package/extension/dist/icons/16.png +0 -0
  912. package/extension/dist/icons/32.png +0 -0
  913. package/extension/dist/icons/48.png +0 -0
  914. package/extension/dist/inter.woff2 +0 -0
  915. package/extension/dist/manifest.json +54 -0
  916. package/extension/dist/offscreen.html +9 -0
  917. package/extension/dist/offscreen.js +1 -0
  918. package/extension/dist/picker.js +678 -0
  919. package/package.json +190 -4
  920. package/src/cli/banner.ts +374 -0
  921. package/src/cli/command.ts +87 -0
  922. package/src/cli/commands/agents/add.ts +31 -0
  923. package/src/cli/commands/agents.ts +13 -0
  924. package/src/cli/commands/app.ts +128 -0
  925. package/src/cli/commands/build.ts +33 -0
  926. package/src/cli/commands/claude.ts +65 -0
  927. package/src/cli/commands/cloud/args.ts +19 -0
  928. package/src/cli/commands/cloud/link.ts +19 -0
  929. package/src/cli/commands/cloud/live.ts +26 -0
  930. package/src/cli/commands/cloud/login.ts +14 -0
  931. package/src/cli/commands/cloud/publish.ts +63 -0
  932. package/src/cli/commands/cloud/push.ts +16 -0
  933. package/src/cli/commands/cloud/status.ts +17 -0
  934. package/src/cli/commands/cloud/unlink.ts +17 -0
  935. package/src/cli/commands/cloud.ts +20 -0
  936. package/src/cli/commands/components.ts +25 -0
  937. package/src/cli/commands/create.ts +191 -0
  938. package/src/cli/commands/dev.ts +231 -0
  939. package/src/cli/commands/doctor.ts +34 -0
  940. package/src/cli/commands/extension.ts +33 -0
  941. package/src/cli/commands/hook.ts +99 -0
  942. package/src/cli/commands/init.ts +24 -0
  943. package/src/cli/commands/mcp.ts +58 -0
  944. package/src/cli/commands/merge-contributors.ts +39 -0
  945. package/src/cli/commands/merge-spec.ts +54 -0
  946. package/src/cli/commands/preview.ts +18 -0
  947. package/src/cli/commands/stop.ts +27 -0
  948. package/src/cli/commands/upgrade.ts +76 -0
  949. package/src/cli/commands/work/args.ts +38 -0
  950. package/src/cli/commands/work/check.ts +21 -0
  951. package/src/cli/commands/work/contributor.ts +34 -0
  952. package/src/cli/commands/work/new.ts +28 -0
  953. package/src/cli/commands/work/presence.ts +37 -0
  954. package/src/cli/commands/work/scope.ts +23 -0
  955. package/src/cli/commands/work/snapshot.ts +27 -0
  956. package/src/cli/commands/work/thread.ts +40 -0
  957. package/src/cli/commands/work/threads.ts +20 -0
  958. package/src/cli/commands/work/whoami.ts +12 -0
  959. package/src/cli/help.ts +213 -0
  960. package/src/cli/main.ts +140 -0
  961. package/src/cli/mcp-relay.ts +538 -0
  962. package/src/cli/recovery-server.ts +123 -0
  963. package/src/cli/strict-flags.ts +208 -0
  964. package/src/cli/supervise.ts +416 -0
  965. package/src/cli/ui.ts +402 -0
  966. package/src/config/design-system.ts +349 -0
  967. package/src/config/index.ts +289 -0
  968. package/src/config/load.ts +201 -0
  969. package/src/config/package-manager.ts +93 -0
  970. package/src/config/project-files.ts +851 -0
  971. package/src/config/renamed.ts +59 -0
  972. package/src/config/schema.ts +194 -0
  973. package/src/content/biome.ts +51 -0
  974. package/src/content/capture.ts +1114 -0
  975. package/src/content/commands.ts +288 -0
  976. package/src/content/comments-log.ts +288 -0
  977. package/src/content/component-props.ts +642 -0
  978. package/src/content/content.ts +2467 -0
  979. package/src/content/devices.ts +63 -0
  980. package/src/content/file-turns.ts +60 -0
  981. package/src/content/first-run.ts +62 -0
  982. package/src/content/flow-specs.ts +267 -0
  983. package/src/content/insert-edit.ts +225 -0
  984. package/src/content/jsx-source.ts +54 -0
  985. package/src/content/last-edited.ts +58 -0
  986. package/src/content/layout.ts +32 -0
  987. package/src/content/merge-rules.ts +77 -0
  988. package/src/content/prop-edit.ts +262 -0
  989. package/src/content/prototype-checks.ts +239 -0
  990. package/src/content/prototype-summary.ts +216 -0
  991. package/src/content/prototypes.ts +413 -0
  992. package/src/content/read-text.ts +12 -0
  993. package/src/content/review-import.ts +77 -0
  994. package/src/content/review-pages.ts +329 -0
  995. package/src/content/screenshot.ts +457 -0
  996. package/src/content/snapshot-client.ts +99 -0
  997. package/src/content/store.ts +237 -0
  998. package/src/content/text-edit.ts +134 -0
  999. package/src/content/thread-module.ts +368 -0
  1000. package/src/content/threads.ts +328 -0
  1001. package/src/content/trash.ts +350 -0
  1002. package/src/paste/figma/appearance.ts +253 -0
  1003. package/src/paste/figma/captures.ts +175 -0
  1004. package/src/paste/figma/decode.ts +604 -0
  1005. package/src/paste/figma/document.ts +541 -0
  1006. package/src/paste/figma/layout.ts +233 -0
  1007. package/src/paste/figma/paint.ts +327 -0
  1008. package/src/paste/figma/render.ts +149 -0
  1009. package/src/paste/figma/styles.ts +119 -0
  1010. package/src/paste/figma/text.ts +439 -0
  1011. package/src/paste/figma/vector.ts +405 -0
  1012. package/src/paste/fonts.ts +119 -0
  1013. package/src/paste/paste.ts +202 -0
  1014. package/src/paths.ts +208 -0
  1015. package/src/server/agent-env.ts +60 -0
  1016. package/src/server/agent-session.ts +209 -0
  1017. package/src/server/agents.ts +1220 -0
  1018. package/src/server/allowed-request.ts +95 -0
  1019. package/src/server/avatars.ts +87 -0
  1020. package/src/server/brief.ts +511 -0
  1021. package/src/server/briefing.ts +235 -0
  1022. package/src/server/build-pictures.ts +302 -0
  1023. package/src/server/build-settings.ts +47 -0
  1024. package/src/server/changelog.ts +59 -0
  1025. package/src/server/channel.ts +1119 -0
  1026. package/src/server/claimed-presence.ts +77 -0
  1027. package/src/server/close-check.ts +218 -0
  1028. package/src/server/cloud.ts +404 -0
  1029. package/src/server/command-settings.ts +100 -0
  1030. package/src/server/component-catalogue.ts +294 -0
  1031. package/src/server/config-settings.ts +63 -0
  1032. package/src/server/content-type.ts +25 -0
  1033. package/src/server/dependency-clash.ts +345 -0
  1034. package/src/server/dev-server.ts +356 -0
  1035. package/src/server/features.ts +58 -0
  1036. package/src/server/file-errors.ts +201 -0
  1037. package/src/server/file-lock.ts +114 -0
  1038. package/src/server/git-asks.ts +91 -0
  1039. package/src/server/git-host.ts +263 -0
  1040. package/src/server/git-paused.ts +204 -0
  1041. package/src/server/git-settings.ts +88 -0
  1042. package/src/server/git-sync.ts +729 -0
  1043. package/src/server/git.ts +991 -0
  1044. package/src/server/instructions.ts +124 -0
  1045. package/src/server/live-mirror.ts +483 -0
  1046. package/src/server/live.ts +275 -0
  1047. package/src/server/machine-update.ts +780 -0
  1048. package/src/server/mcp-handover.ts +147 -0
  1049. package/src/server/mcp.ts +294 -0
  1050. package/src/server/me.ts +68 -0
  1051. package/src/server/next.ts +135 -0
  1052. package/src/server/notices.ts +580 -0
  1053. package/src/server/open-page.ts +192 -0
  1054. package/src/server/own-copies.ts +419 -0
  1055. package/src/server/people.ts +98 -0
  1056. package/src/server/personal-folder.ts +34 -0
  1057. package/src/server/pictures.ts +365 -0
  1058. package/src/server/port.ts +178 -0
  1059. package/src/server/preferences.ts +34 -0
  1060. package/src/server/presence.ts +175 -0
  1061. package/src/server/project-id.ts +17 -0
  1062. package/src/server/project-public.ts +73 -0
  1063. package/src/server/prototype-brief.ts +208 -0
  1064. package/src/server/push-notice.ts +69 -0
  1065. package/src/server/quiet-run.ts +85 -0
  1066. package/src/server/registry.ts +161 -0
  1067. package/src/server/requests.ts +2387 -0
  1068. package/src/server/response-budget.ts +109 -0
  1069. package/src/server/restart.ts +187 -0
  1070. package/src/server/roster.ts +302 -0
  1071. package/src/server/saved.ts +77 -0
  1072. package/src/server/source-stamp.ts +194 -0
  1073. package/src/server/spec-decisions.ts +113 -0
  1074. package/src/server/spec-suggestions.ts +87 -0
  1075. package/src/server/state.ts +287 -0
  1076. package/src/server/stop-studio.ts +44 -0
  1077. package/src/server/studio-for.ts +161 -0
  1078. package/src/server/sync-install.ts +87 -0
  1079. package/src/server/thread-forms.ts +246 -0
  1080. package/src/server/thread-place.ts +160 -0
  1081. package/src/server/thread-source.ts +328 -0
  1082. package/src/server/tools/close-reply.ts +271 -0
  1083. package/src/server/tools/comment.ts +96 -0
  1084. package/src/server/tools/context.ts +179 -0
  1085. package/src/server/tools/describe.ts +53 -0
  1086. package/src/server/tools/feedback.ts +225 -0
  1087. package/src/server/tools/place-frame.ts +167 -0
  1088. package/src/server/tools/prototype-name.ts +50 -0
  1089. package/src/server/tools/reading.ts +271 -0
  1090. package/src/server/tools/result.ts +32 -0
  1091. package/src/server/tools/show.ts +159 -0
  1092. package/src/server/tools/snapshot.ts +114 -0
  1093. package/src/server/tools/thread-list.ts +185 -0
  1094. package/src/server/tools/watch.ts +436 -0
  1095. package/src/server/unresolved-imports.ts +103 -0
  1096. package/src/server/update-branch.ts +226 -0
  1097. package/src/server/update-studio.ts +164 -0
  1098. package/src/server/updates.ts +360 -0
  1099. package/src/server/vite.ts +1183 -0
  1100. package/src/server/web-app.ts +235 -0
  1101. package/src/server/welcome.ts +57 -0
  1102. package/src/server/work-groups.ts +373 -0
  1103. package/src/server/workspace-settings.ts +508 -0
  1104. package/src/server/zip.ts +151 -0
  1105. package/src/setup/apply.ts +796 -0
  1106. package/src/setup/commit-lint.ts +403 -0
  1107. package/src/setup/components.ts +124 -0
  1108. package/src/setup/config-choices.ts +56 -0
  1109. package/src/setup/config-source.ts +660 -0
  1110. package/src/setup/create.ts +1737 -0
  1111. package/src/setup/design-md-setup.ts +319 -0
  1112. package/src/setup/design-md.ts +1293 -0
  1113. package/src/setup/design-system-checks.ts +487 -0
  1114. package/src/setup/design-system-guide.ts +106 -0
  1115. package/src/setup/desktop-app-script.ts +814 -0
  1116. package/src/setup/desktop-app-start.ts +152 -0
  1117. package/src/setup/desktop-app.ts +828 -0
  1118. package/src/setup/detect/workspace.ts +1487 -0
  1119. package/src/setup/detect.ts +598 -0
  1120. package/src/setup/doctor.ts +526 -0
  1121. package/src/setup/existing-setup.ts +565 -0
  1122. package/src/setup/findings.ts +27 -0
  1123. package/src/setup/git-checks.ts +434 -0
  1124. package/src/setup/hints.ts +308 -0
  1125. package/src/setup/host-format.ts +153 -0
  1126. package/src/setup/migrate/agent-files.ts +161 -0
  1127. package/src/setup/migrate/config-name.ts +109 -0
  1128. package/src/setup/migrate/design-system.ts +888 -0
  1129. package/src/setup/migrate/explorations.ts +49 -0
  1130. package/src/setup/migrate/files-folder.ts +470 -0
  1131. package/src/setup/migrate/guides.ts +93 -0
  1132. package/src/setup/migrate/migration.ts +80 -0
  1133. package/src/setup/migrate/migrations.ts +82 -0
  1134. package/src/setup/migrate/people-folders.ts +347 -0
  1135. package/src/setup/migrate/project-files.ts +35 -0
  1136. package/src/setup/migrate/row-titles.ts +56 -0
  1137. package/src/setup/migrate/studio-state.ts +186 -0
  1138. package/src/setup/own-app.ts +439 -0
  1139. package/src/setup/placement.ts +408 -0
  1140. package/src/setup/plan.ts +792 -0
  1141. package/src/setup/project.ts +518 -0
  1142. package/src/setup/prompts.ts +1189 -0
  1143. package/src/setup/provider.ts +180 -0
  1144. package/src/setup/questions.ts +424 -0
  1145. package/src/setup/starters.ts +290 -0
  1146. package/src/setup/templates.ts +280 -0
  1147. package/src/setup/workspace-setup.ts +257 -0
  1148. package/src/setup/write.ts +380 -0
  1149. package/src/shared/agent-prompts.ts +14 -0
  1150. package/src/shared/annotations-core.ts +478 -0
  1151. package/src/shared/avatar-file.ts +22 -0
  1152. package/src/shared/block-merge.ts +271 -0
  1153. package/src/shared/build-settings.ts +22 -0
  1154. package/src/shared/built-pictures.ts +62 -0
  1155. package/src/shared/canvas-core.ts +1408 -0
  1156. package/src/shared/checks.ts +16 -0
  1157. package/src/shared/commands-core.ts +237 -0
  1158. package/src/shared/contributors-merge.ts +93 -0
  1159. package/src/shared/design-system.ts +136 -0
  1160. package/src/shared/devices.ts +292 -0
  1161. package/src/shared/element-steps.ts +99 -0
  1162. package/src/shared/feedback.ts +284 -0
  1163. package/src/shared/file-errors.ts +57 -0
  1164. package/src/shared/fix-prompt.ts +85 -0
  1165. package/src/shared/frame-grids.ts +182 -0
  1166. package/src/shared/front-matter.ts +119 -0
  1167. package/src/shared/generated-sections.ts +185 -0
  1168. package/src/shared/git-core.ts +398 -0
  1169. package/src/shared/json-style.ts +74 -0
  1170. package/src/shared/listing.ts +13 -0
  1171. package/src/shared/live-core.ts +255 -0
  1172. package/src/shared/live-presence.ts +217 -0
  1173. package/src/shared/markup-prompt.ts +69 -0
  1174. package/src/shared/open-page-core.ts +89 -0
  1175. package/src/shared/page-messages.ts +156 -0
  1176. package/src/shared/page-review.ts +287 -0
  1177. package/src/shared/paste-arrangement.ts +52 -0
  1178. package/src/shared/pasted-image.ts +23 -0
  1179. package/src/shared/people-core.ts +826 -0
  1180. package/src/shared/presence-core.ts +30 -0
  1181. package/src/shared/product.ts +4 -0
  1182. package/src/shared/prototypes-core.ts +450 -0
  1183. package/src/shared/references-core.ts +89 -0
  1184. package/src/shared/removed-views-core.ts +223 -0
  1185. package/src/shared/review-file.ts +216 -0
  1186. package/src/shared/server-page.ts +393 -0
  1187. package/src/shared/signup.ts +103 -0
  1188. package/src/shared/sketch-core.ts +425 -0
  1189. package/src/shared/snapshot-clipboard.ts +139 -0
  1190. package/src/shared/snapshot-images.ts +130 -0
  1191. package/src/shared/spec-quote.ts +153 -0
  1192. package/src/shared/studio-events.ts +215 -0
  1193. package/src/shared/studio-files.ts +131 -0
  1194. package/src/shared/studio-routes.ts +684 -0
  1195. package/src/shared/threads-core.ts +1485 -0
  1196. package/src/shared/unzip.ts +95 -0
  1197. package/src/shared/update-core.ts +126 -0
  1198. package/src/shared/word-diff.ts +163 -0
  1199. package/src/shared/workspace.ts +38 -0
  1200. package/templates/DESIGN.md +0 -0
  1201. package/templates/context/.gitkeep +0 -0
  1202. package/templates/feedback-workflow.md +1 -0
  1203. package/templates/mcp-instructions.md +1 -0
  1204. package/templates/methods/component-examples.md +75 -0
  1205. package/templates/methods/components.md +78 -0
  1206. package/templates/methods/critique.md +54 -0
  1207. package/templates/methods/design-md.md +92 -0
  1208. package/templates/methods/explore.md +101 -0
  1209. package/templates/methods/handoff.md +40 -0
  1210. package/templates/methods/hifi.md +24 -0
  1211. package/templates/methods/review.md +156 -0
  1212. package/templates/rules/always.md +38 -0
  1213. package/templates/rules/canvas-frames.md +104 -0
  1214. package/templates/rules/canvas.md +173 -0
  1215. package/templates/rules/commands.md +30 -0
  1216. package/templates/rules/prototypes.md +171 -0
  1217. package/templates/rules/scope.md +41 -0
  1218. package/templates/rules/snapshots.md +52 -0
  1219. package/templates/rules/studio.md +89 -0
  1220. package/templates/skills/break/SKILL.md +16 -0
  1221. package/templates/skills/connect-frames/SKILL.md +9 -0
  1222. package/templates/skills/duplicate-and-refine/SKILL.md +9 -0
  1223. package/templates/skills/polish-responsive/SKILL.md +9 -0
  1224. package/templates/skills/remember-as-guideline/SKILL.md +9 -0
  1225. package/templates/skills/remove/SKILL.md +8 -0
  1226. package/templates/skills/tighten-copy/SKILL.md +8 -0
  1227. package/templates/skills/use-design-system/SKILL.md +10 -0
  1228. package/templates/starter-prototype/welcome.tsx +47 -0
  1229. package/templates/starters/standalone/README.md +21 -0
  1230. package/templates/starters/standalone/components.json +25 -0
  1231. package/templates/starters/standalone/gitignore +4 -0
  1232. package/templates/starters/standalone/package.json +23 -0
  1233. package/templates/starters/standalone/tsconfig.json +14 -0
  1234. package/templates/starters/turborepo/README.md +22 -0
  1235. package/templates/starters/turborepo/apps/web/components.json +25 -0
  1236. package/templates/starters/turborepo/apps/web/index.html +12 -0
  1237. package/templates/starters/turborepo/apps/web/package.json +27 -0
  1238. package/templates/starters/turborepo/apps/web/src/app.tsx +43 -0
  1239. package/templates/starters/turborepo/apps/web/src/index.css +5 -0
  1240. package/templates/starters/turborepo/apps/web/src/main.tsx +13 -0
  1241. package/templates/starters/turborepo/apps/web/tsconfig.json +11 -0
  1242. package/templates/starters/turborepo/apps/web/vite.config.ts +11 -0
  1243. package/templates/starters/turborepo/gitignore +5 -0
  1244. package/templates/starters/turborepo/package.json +19 -0
  1245. package/templates/starters/turborepo/packages/ui/components.json +25 -0
  1246. package/templates/starters/turborepo/packages/ui/package.json +32 -0
  1247. package/templates/starters/turborepo/packages/ui/src/hooks/.gitkeep +0 -0
  1248. package/templates/starters/turborepo/packages/ui/tsconfig.json +7 -0
  1249. package/templates/starters/turborepo/tsconfig.json +14 -0
  1250. package/templates/starters/turborepo/turbo.json +19 -0
  1251. package/templates/starters/vite/README.md +19 -0
  1252. package/templates/starters/vite/components.json +25 -0
  1253. package/templates/starters/vite/gitignore +4 -0
  1254. package/templates/starters/vite/index.html +12 -0
  1255. package/templates/starters/vite/package.json +31 -0
  1256. package/templates/starters/vite/src/app.tsx +42 -0
  1257. package/templates/starters/vite/src/components/ui/accordion.tsx +71 -0
  1258. package/templates/starters/vite/src/components/ui/attachment.tsx +207 -0
  1259. package/templates/starters/vite/src/components/ui/badge.tsx +51 -0
  1260. package/templates/starters/vite/src/components/ui/button.tsx +62 -0
  1261. package/templates/starters/vite/src/components/ui/card.tsx +102 -0
  1262. package/templates/starters/vite/src/components/ui/checkbox.tsx +28 -0
  1263. package/templates/starters/vite/src/components/ui/dialog.tsx +157 -0
  1264. package/templates/starters/vite/src/components/ui/dropdown-menu.tsx +267 -0
  1265. package/templates/starters/vite/src/components/ui/field.tsx +238 -0
  1266. package/templates/starters/vite/src/components/ui/input-group.tsx +158 -0
  1267. package/templates/starters/vite/src/components/ui/input.tsx +19 -0
  1268. package/templates/starters/vite/src/components/ui/label.tsx +19 -0
  1269. package/templates/starters/vite/src/components/ui/native-select.tsx +60 -0
  1270. package/templates/starters/vite/src/components/ui/popover.tsx +89 -0
  1271. package/templates/starters/vite/src/components/ui/separator.tsx +24 -0
  1272. package/templates/starters/vite/src/components/ui/spinner.tsx +10 -0
  1273. package/templates/starters/vite/src/components/ui/switch.tsx +31 -0
  1274. package/templates/starters/vite/src/components/ui/textarea.tsx +17 -0
  1275. package/templates/starters/vite/src/components/ui/toggle-group.tsx +89 -0
  1276. package/templates/starters/vite/src/components/ui/toggle.tsx +44 -0
  1277. package/templates/starters/vite/src/index.css +552 -0
  1278. package/templates/starters/vite/src/lib/utils.ts +1 -0
  1279. package/templates/starters/vite/src/main.tsx +13 -0
  1280. package/templates/starters/vite/tsconfig.json +15 -0
  1281. package/templates/starters/vite/vite.config.ts +11 -0
@@ -0,0 +1,72 @@
1
+ import { framePage } from "../../shared/prototypes-core.mjs";
2
+ import { prototypeTitle } from "../../content/prototypes.mjs";
3
+ import { notRunning } from "../studio-for.mjs";
4
+ import { SnapshotError, snapshotView } from "../../content/snapshot-client.mjs";
5
+ import { PROTOTYPE, prototypeFor } from "./prototype-name.mjs";
6
+ import { z } from "zod";
7
+ //#region src/server/tools/snapshot.ts
8
+ /**
9
+ * Register `snapshot` on `server`: `findStudio` says which Dex serves this
10
+ * checkout (studio-for.ts), never only the configured port.
11
+ */
12
+ function registerSnapshotTool(server, { refuse, root, withNotice }, findStudio) {
13
+ server.registerTool("snapshot", {
14
+ annotations: { readOnlyHint: true },
15
+ title: "Snapshot a view",
16
+ description: "A snapshot of one view as Dex renders it, to look at your work, with what a picture hides (errors on the page, overflow) in `problems`: take one after each meaningful change and check it as a designer would (spacing, type hierarchy, contrast, alignment across repeated rows, nothing clipped or overflowing), then fix what you find in place. Pass a state's params to see that state, and scheme for dark. Needs Dex running (`npx dex dev`). Use it to check, never as the source of values: read those from the code.",
17
+ inputSchema: {
18
+ prototype: PROTOTYPE.optional(),
19
+ view: z.string().min(1).describe("The view's name, as in views/<name>.tsx."),
20
+ params: z.record(z.string(), z.string()).optional().describe("The state to show, as a frame's params: { \"state\": \"empty\" }."),
21
+ viewport: z.enum([
22
+ "desktop",
23
+ "tablet",
24
+ "mobile"
25
+ ]).default("desktop"),
26
+ scheme: z.enum(["light", "dark"]).default("light")
27
+ }
28
+ }, async (input) => {
29
+ const found = await prototypeFor(root, input.prototype);
30
+ if ("problem" in found) return refuse(found.problem);
31
+ const search = new URLSearchParams(input.params ?? {});
32
+ const href = framePage(found.slug, input.view, search.size > 0 ? `?${search}` : "");
33
+ if (!href) return refuse(`"${input.view}" is not a view name.`);
34
+ let studio;
35
+ try {
36
+ studio = await findStudio();
37
+ } catch (error) {
38
+ return refuse(`Which Dex serves this checkout could not be found: ${error.message}`);
39
+ }
40
+ if (studio.kind !== "running") return refuse(notRunning(studio));
41
+ const { url } = studio;
42
+ let shot;
43
+ try {
44
+ shot = await snapshotView(url, {
45
+ href,
46
+ viewport: input.viewport,
47
+ scheme: input.scheme,
48
+ scale: 1
49
+ });
50
+ } catch (error) {
51
+ if (!(error instanceof SnapshotError)) throw error;
52
+ return refuse(error.status === void 0 ? error.message : `No snapshot of ${input.view} (${error.status}): ${error.message}`);
53
+ }
54
+ return withNotice({ content: [{
55
+ type: "image",
56
+ data: shot.image.toString("base64"),
57
+ mimeType: "image/png"
58
+ }, {
59
+ type: "text",
60
+ text: JSON.stringify({
61
+ prototype: found.slug,
62
+ title: await prototypeTitle(root, found.slug),
63
+ view: input.view,
64
+ viewport: input.viewport,
65
+ scheme: input.scheme,
66
+ problems: shot.problems
67
+ })
68
+ }] });
69
+ });
70
+ }
71
+ //#endregion
72
+ export { registerSnapshotTool };
@@ -0,0 +1,6 @@
1
+ import { ToolContext } from "./context.mjs";
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ //#region src/server/tools/thread-list.d.ts
4
+ /** Register `threads` on `server`. */
5
+ export declare function registerThreadsTool(server: McpServer, context: ToolContext): void;
6
+ //#endregion
@@ -0,0 +1,105 @@
1
+ import { shownFrom } from "../../paths.mjs";
2
+ import { prepareState, readFocus, studioState } from "../state.mjs";
3
+ import { claimOf } from "../../shared/threads-core.mjs";
4
+ import { RESPONSE_BUDGETS, plural } from "../response-budget.mjs";
5
+ import { fitThreads, shapedWithin } from "../thread-forms.mjs";
6
+ import { json, noted } from "./result.mjs";
7
+ import { ALWAYS_LOADED } from "./context.mjs";
8
+ import { describeForWork, releaseGone } from "./describe.mjs";
9
+ import { PROTOTYPE } from "./prototype-name.mjs";
10
+ import { openPageFirst } from "../open-page.mjs";
11
+ import { writeFile } from "node:fs/promises";
12
+ import { z } from "zod";
13
+ //#region src/server/tools/thread-list.ts
14
+ /** Room kept in a thread's result for the file that holds all of it. */
15
+ const WHOLE_ROOM = 300;
16
+ /**
17
+ * A thread as `threads` lists it: marked when it is on the page the
18
+ * person has open (open-page.ts), beside its names and before its
19
+ * messages. An acknowledged one also says who holds it and since when,
20
+ * and whether that is this session.
21
+ */
22
+ const describeListed = async (context, thread, onOpenPage = false) => {
23
+ const { session } = context;
24
+ const { id, prototype, fileTitle, ...rest } = await describeForWork(context, thread);
25
+ const described = {
26
+ id,
27
+ prototype,
28
+ ...fileTitle === void 0 ? {} : { fileTitle },
29
+ ...onOpenPage ? { onOpenPage: true } : {},
30
+ ...rest
31
+ };
32
+ const claim = claimOf(thread);
33
+ return claim ? {
34
+ ...described,
35
+ held: {
36
+ by: claim.by,
37
+ since: claim.at,
38
+ ...claim.session === session.id ? { yours: true } : {}
39
+ }
40
+ } : described;
41
+ };
42
+ /**
43
+ * One thread by its id, with more of it than a list gives. When that
44
+ * still cuts it, all of it is written to a file for the agent to open
45
+ * (state.ts), and the result names the file.
46
+ */
47
+ const oneThread = async (context, thread) => {
48
+ const { from, ok, root, withNotice } = context;
49
+ const described = await describeListed(context, thread);
50
+ const { cut, thread: given } = shapedWithin(described, RESPONSE_BUDGETS.threads - WHOLE_ROOM);
51
+ if (!cut) return ok(given);
52
+ const state = studioState(root);
53
+ const file = state.thread(thread.id);
54
+ await prepareState(root, state.threads);
55
+ await writeFile(file, `${JSON.stringify(described, null, 2)}\n`);
56
+ const whole = shownFrom(from, file);
57
+ return withNotice(noted(json({
58
+ ...given,
59
+ whole
60
+ }), `This thread is shortened to fit: all of it, every message whole, is in \`${whole}\`.`));
61
+ };
62
+ /** Register `threads` on `server`. */
63
+ function registerThreadsTool(server, context) {
64
+ const { ok, refuse, root, threads, withNotice } = context;
65
+ server.registerTool("threads", {
66
+ _meta: ALWAYS_LOADED,
67
+ annotations: { readOnlyHint: true },
68
+ title: "Studio comments and requests",
69
+ description: "Comments people left in Dex and their requests for new views: by default the ones that still need an agent, waiting or acknowledged (👀, with `held`: by whom, since when, and `yours`). Those on the page the person has open come first (`onOpenPage`), then the open file's, then other files'. Each names its file and element. `flowSpec` is a spec to read before answering; `commands` are skills the comment runs: follow each one's SKILL.md (`follow`), the comment's words its arguments; a target of kind \"view\" asks for a new view in that cell; a \"wireframe\" is boxes people drew, to build from the design system. `status` lists others: \"waiting\", \"open\" (discussions among people too), \"acknowledged\", \"resolved\", \"dismissed\" or \"all\". A long list comes shortened and says how to get the rest: `offset`, `limit`, or `id` for one thread with more of it.",
70
+ inputSchema: {
71
+ prototype: PROTOTYPE.optional(),
72
+ status: z.enum([
73
+ "unfinished",
74
+ "waiting",
75
+ "open",
76
+ "acknowledged",
77
+ "resolved",
78
+ "dismissed",
79
+ "all"
80
+ ]).default("unfinished"),
81
+ id: z.string().optional().describe("One thread, by its id, with more of its messages and the code around its element; all of it in a file when it is long."),
82
+ offset: z.number().int().min(0).default(0).describe("Leave out this many from the start: the next ones, when a list said there are more."),
83
+ limit: z.number().int().min(1).optional().describe("List at most this many.")
84
+ }
85
+ }, async ({ id, limit, offset, ...filter }) => {
86
+ await releaseGone(context);
87
+ if (id) {
88
+ const thread = await threads.find(id);
89
+ return thread ? oneThread(context, thread) : refuse(`No thread ${id}. List them with \`threads\`.`);
90
+ }
91
+ const placed = openPageFirst(await threads.list(filter), await readFocus(root));
92
+ const onOpenPage = new Set(placed.filter((each) => each.onOpenPage).map(({ thread }) => thread.id));
93
+ const found = placed.map(({ thread }) => thread);
94
+ const asked = found.slice(offset, limit === void 0 ? void 0 : offset + limit);
95
+ const fit = await fitThreads(asked, (thread) => describeListed(context, thread, onOpenPage.has(thread.id)), RESPONSE_BUDGETS.threads);
96
+ const shown = fit.threads.length;
97
+ const rest = found.length - offset - shown;
98
+ if (rest <= 0 && fit.short === 0) return ok(fit.threads);
99
+ const short = fit.short > 0 ? `, the last ${fit.short.toLocaleString("en")} of them short (what was asked and what was last said, cut, and no code)` : "";
100
+ const more = rest > 0 ? ` \`offset: ${offset + shown}\` gives the next ones; a \`prototype\`, a narrower \`status\` or a \`limit\` gives fewer.` : "";
101
+ return withNotice(noted(json(fit.threads), `${shown.toLocaleString("en")} of ${plural(found.length, "thread")}${offset > 0 ? `, from the one after the first ${offset.toLocaleString("en")}` : ""}${short}. \`id\` gives one thread with more of its messages and the code around it.${more}`));
102
+ });
103
+ }
104
+ //#endregion
105
+ export { registerThreadsTool };
@@ -0,0 +1,6 @@
1
+ import { ToolContext } from "./context.mjs";
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ //#region src/server/tools/watch.d.ts
4
+ /** Register `watch` on `server`. */
5
+ export declare function registerWatchTool(server: McpServer, context: ToolContext): void;
6
+ //#endregion
@@ -0,0 +1,286 @@
1
+ import { groupSummary, groupWork, splitLine } from "../work-groups.mjs";
2
+ import { yoursGroups } from "../own-copies.mjs";
3
+ import { RESPONSE_BUDGETS, plural, sizeOf } from "../response-budget.mjs";
4
+ import { SHORT, fitThreads, shaped } from "../thread-forms.mjs";
5
+ import { FEEDBACK_WORKFLOW, isWatching } from "../channel.mjs";
6
+ import { LOOP_HOW, WATCH_HOW } from "../push-notice.mjs";
7
+ import { someOf } from "./result.mjs";
8
+ import { ALWAYS_LOADED } from "./context.mjs";
9
+ import { describeForWork, releaseGone } from "./describe.mjs";
10
+ import { PROTOTYPE } from "./prototype-name.mjs";
11
+ import { z } from "zod";
12
+ //#region src/server/tools/watch.ts
13
+ const DEFAULT_WATCH_SECONDS = 300;
14
+ const MAX_WATCH_SECONDS = 1800;
15
+ /**
16
+ * Room `watch` keeps for what is not a thread in its result: how to
17
+ * split the groups, each group's files, and what is left waiting.
18
+ */
19
+ const WATCH_ROOM = 3e3;
20
+ /** How many groups too large to fit `watch` passes over before it stops looking. */
21
+ const MAX_PASSED = 3;
22
+ /** The most threads a result names by id alone, beside those it describes. */
23
+ const MAX_IDS = 60;
24
+ /**
25
+ * What `watch` says of the threads it could not describe for work:
26
+ * nothing when it could describe them all.
27
+ */
28
+ const watchLeftOut = (short, left) => {
29
+ const parts = [];
30
+ if (short > 0) parts.push(`${plural(short, "thread")} here ${short === 1 ? "is" : "are"} short`);
31
+ if (left > 0) parts.push(`${plural(left, "thread")} ${left === 1 ? "is" : "are"} yours too and only named, in ${left === 1 ? "its" : "their"} group's \`more\``);
32
+ return parts.length > 0 ? `${parts.join(", and ")}: \`threads\` with \`id\` gives one with its messages and the code around it.` : "";
33
+ };
34
+ /**
35
+ * Each group with its threads as described: `shown` holds the first of all
36
+ * the groups' threads, in order, and a thread past them is named by its id
37
+ * in its group's `more`. A group's files are as `show` gives them.
38
+ */
39
+ const groupsWith = (groups, shown, show) => {
40
+ let at = 0;
41
+ return groups.map((group) => {
42
+ const from = at;
43
+ at += group.threads.length;
44
+ const described = shown.slice(from, at);
45
+ const named = group.threads.slice(described.length).map(({ id }) => id);
46
+ return {
47
+ ...group,
48
+ files: someOf(group.files.map(show)),
49
+ threads: described,
50
+ ...named.length > 0 ? { more: {
51
+ threads: named.length,
52
+ ids: named.slice(0, MAX_IDS)
53
+ } } : {}
54
+ };
55
+ });
56
+ };
57
+ /**
58
+ * Claim each thread for this session, in turn: the ones it won, as they
59
+ * are after. One another session holds, or gone, is left out.
60
+ */
61
+ const claimAll = async ({ session }, found) => {
62
+ const claimed = [];
63
+ for (const thread of found) {
64
+ const result = await session.claim(thread.id);
65
+ if (result?.thread) claimed.push(result.thread);
66
+ }
67
+ return claimed;
68
+ };
69
+ /** What threads come to in `watch`'s result, as they sit in a group. */
70
+ const inGroups = (shown) => sizeOf({ groups: [{ threads: shown }] }) - sizeOf({ groups: [{ threads: [] }] });
71
+ /** The least a group's threads take there: each given short. */
72
+ const costShort = async (context, found) => {
73
+ const described = await Promise.all(found.map((thread) => describeForWork(context, thread)));
74
+ return inGroups(described.map((each) => shaped(each, SHORT).thread));
75
+ };
76
+ /**
77
+ * Groups as `watch` returns them: how to split them first, when they
78
+ * can run side by side, then each group, then what is left waiting. Within
79
+ * the tool's budget: a thread there is no room for is given short, and
80
+ * after that by its id alone, in its group's `more`.
81
+ */
82
+ const describeGroups = async (context, groups, more) => {
83
+ const { inRoot } = context;
84
+ const side = groups.filter((group) => group.parallel).length;
85
+ const next = more.length > 0 ? `${more.length} more ${more.length === 1 ? "group is" : "groups are"} waiting (${more.length > 8 ? `the first 8 ` : ""}in \`waiting\`): call \`watch\` again to take them.` : "Nothing else is waiting. When these are done, call `watch` again to keep listening.";
86
+ const all = groups.flatMap((group) => group.threads);
87
+ const known = /* @__PURE__ */ new Map();
88
+ const describe = (thread) => {
89
+ const described = known.get(thread.id) ?? describeForWork(context, thread);
90
+ known.set(thread.id, described);
91
+ return described;
92
+ };
93
+ const build = async (room) => {
94
+ const fit = await fitThreads(all, describe, room, inGroups);
95
+ const leftOut = watchLeftOut(fit.short, fit.left);
96
+ return {
97
+ ...side > 1 ? { split: splitLine(side) } : {},
98
+ groups: groupsWith(groups, fit.threads, inRoot),
99
+ ...leftOut ? { leftOut } : {},
100
+ waiting: more.slice(0, 8).map(groupSummary),
101
+ next
102
+ };
103
+ };
104
+ const budget = RESPONSE_BUDGETS.watch;
105
+ let room = budget - sizeOf(await build(0));
106
+ let result = await build(room);
107
+ for (let turn = 0; turn < 6 && sizeOf(result) > budget; turn += 1) {
108
+ room -= sizeOf(result) - budget;
109
+ result = await build(Math.max(0, room));
110
+ }
111
+ return result;
112
+ };
113
+ /**
114
+ * What `watch` hands out in one session: groups claimed for it as
115
+ * they wait, and threads taken by id.
116
+ */
117
+ function openHandOut(context) {
118
+ const { root, threads } = context;
119
+ /**
120
+ * Threads `watch` has handed out in this session, as they were then:
121
+ * one a person answers since waits again, and goes out again.
122
+ */
123
+ const handedOut = /* @__PURE__ */ new Set();
124
+ const handOutStamp = (thread) => `${thread.id}:${thread.messages.length}`;
125
+ /** Claim a group's threads, handed out as they are: the ones it won. */
126
+ const claimGroup = async (group) => {
127
+ for (const thread of group.threads) handedOut.add(handOutStamp(thread));
128
+ const claimed = await claimAll(context, group.threads);
129
+ const claimedIds = new Set(claimed.map((thread) => thread.id));
130
+ for (const thread of group.threads) if (!claimedIds.has(thread.id)) handedOut.delete(handOutStamp(thread));
131
+ return claimed;
132
+ };
133
+ /**
134
+ * Claim up to `max` groups of `found` (work-groups.ts), in order, skipping
135
+ * any this session cannot win, with the groups after them left waiting:
136
+ * and no more groups than the result has room to describe (always one at
137
+ * least, and passing over one too large to go beside the others), so one
138
+ * call never takes more than an agent can be told of. Undefined when it
139
+ * won none.
140
+ */
141
+ const claimGroups = async (found, max) => {
142
+ const groups = (await groupWork(root, found)).map((group) => ({
143
+ ...group,
144
+ threads: group.threads.filter((thread) => !handedOut.has(handOutStamp(thread)))
145
+ })).filter((group) => group.threads.length > 0);
146
+ const won = [];
147
+ const passed = [];
148
+ const room = RESPONSE_BUDGETS.watch - WATCH_ROOM;
149
+ let used = 0;
150
+ let index = 0;
151
+ for (; index < groups.length && won.length < max && passed.length < MAX_PASSED; index += 1) {
152
+ const group = groups[index];
153
+ const cost = await costShort(context, group.threads);
154
+ if (won.length > 0 && used + cost > room) {
155
+ passed.push(group);
156
+ continue;
157
+ }
158
+ const claimed = await claimGroup(group);
159
+ if (claimed.length > 0) {
160
+ used += cost;
161
+ won.push({
162
+ ...group,
163
+ threads: claimed
164
+ });
165
+ }
166
+ }
167
+ return won.length > 0 ? {
168
+ groups: await yoursGroups(root, won),
169
+ more: [...passed, ...groups.slice(index)]
170
+ } : void 0;
171
+ };
172
+ /**
173
+ * The threads named, claimed for this session now and grouped as
174
+ * `watch` returns them, with those it could not take and why.
175
+ */
176
+ const takeThreads = async (ids) => {
177
+ const found = [];
178
+ const refused = [];
179
+ for (const id of ids) {
180
+ const thread = await threads.find(id);
181
+ if (thread) found.push(thread);
182
+ else refused.push(`No thread ${id}.`);
183
+ }
184
+ const won = await claimAll(context, found);
185
+ const wonIds = new Set(won.map((thread) => thread.id));
186
+ for (const thread of found) if (wonIds.has(thread.id)) handedOut.add(handOutStamp(thread));
187
+ else refused.push(`${thread.id}: another agent is on this thread, or it is closed.`);
188
+ const taken = await describeGroups(context, await yoursGroups(root, await groupWork(root, won)), []);
189
+ return refused.length > 0 ? {
190
+ ...taken,
191
+ refused: someOf(refused, MAX_IDS)
192
+ } : taken;
193
+ };
194
+ return {
195
+ claimGroups,
196
+ takeThreads
197
+ };
198
+ }
199
+ /** Register `watch` on `server`. */
200
+ function registerWatchTool(server, context) {
201
+ const { ok, onUpdateReady, receipt, root, threads } = context;
202
+ const { claimGroups, takeThreads } = openHandOut(context);
203
+ server.registerTool("watch", {
204
+ _meta: ALWAYS_LOADED,
205
+ annotations: {
206
+ readOnlyHint: false,
207
+ destructiveHint: false
208
+ },
209
+ title: "Wait for studio feedback",
210
+ description: `Wait for comments or requests that need an agent and take them: each thread returned is yours (👀). They come in groups, each with the files it may change: one view's threads, one request for a new view, or comments on the whole file. Returns at once when some are waiting; takes as many groups as it has room to describe and says how many are left, for the next call. With \`split\`, give each group to its own sub-agent, all at once, where you can. ${FEEDBACK_WORKFLOW} Where one has \`commands\`, it runs skills: do what each \`follow\` (a SKILL.md, files beside it) says, the comment's words its arguments. \`groups: 1\` takes one group; \`ids\` takes threads by id. It keeps waiting while Dex's Watch switch is off. ${WATCH_HOW} ${LOOP_HOW}`,
211
+ inputSchema: {
212
+ prototype: PROTOTYPE.optional(),
213
+ timeout_seconds: z.number().int().min(1).max(MAX_WATCH_SECONDS).default(DEFAULT_WATCH_SECONDS),
214
+ groups: z.number().int().min(1).optional().describe("Take at most this many groups, leaving the rest waiting: 1 for a sub-agent taking its own share. Default: every group waiting."),
215
+ ids: z.array(z.string()).min(1).optional().describe("Take these threads now, found with `threads`, without waiting."),
216
+ receipt: z.string().optional().describe("The word a channel event gave to take its threads with, when one did.")
217
+ }
218
+ }, async ({ prototype, timeout_seconds, groups: max, ids, receipt: word }, extra) => {
219
+ receipt.confirm(word);
220
+ await releaseGone(context);
221
+ if (ids) return ok(await takeThreads(ids));
222
+ const filter = {
223
+ prototype,
224
+ status: "waiting"
225
+ };
226
+ let watching = true;
227
+ let taken;
228
+ let claiming = Promise.resolve();
229
+ const looks = [];
230
+ const claim = (found) => {
231
+ const look = (async () => {
232
+ const listed = await found;
233
+ const running = claiming.then(async () => {
234
+ if (taken) return;
235
+ taken = await claimGroups(listed, max ?? Number.POSITIVE_INFINITY);
236
+ if (taken) heard();
237
+ });
238
+ claiming = running.catch(() => void 0);
239
+ await running;
240
+ })();
241
+ looks.push(look);
242
+ return look;
243
+ };
244
+ let heard = () => void 0;
245
+ let answered = false;
246
+ const arrived = new Promise((done) => {
247
+ heard = () => {
248
+ answered = true;
249
+ done();
250
+ };
251
+ });
252
+ const timeout = setTimeout(heard, timeout_seconds * 1e3);
253
+ const cancel = () => heard();
254
+ extra.signal.addEventListener("abort", cancel);
255
+ if (extra.signal.aborted) cancel();
256
+ const stopHearing = onUpdateReady(cancel);
257
+ let stop;
258
+ const waited = receipt.watch();
259
+ try {
260
+ stop = await threads.subscribe(async (changed) => {
261
+ const was = watching;
262
+ watching = await isWatching(root);
263
+ if (!watching || answered) return;
264
+ await claim(was ? changed : threads.list(filter));
265
+ }, filter);
266
+ watching = await isWatching(root);
267
+ if (watching) await claim(threads.list(filter));
268
+ if (!taken) await arrived;
269
+ answered = true;
270
+ await Promise.allSettled(looks);
271
+ if (taken) return ok(await describeGroups(context, taken.groups, taken.more));
272
+ } finally {
273
+ clearTimeout(timeout);
274
+ extra.signal.removeEventListener("abort", cancel);
275
+ stopHearing();
276
+ stop?.();
277
+ waited();
278
+ }
279
+ return ok({
280
+ groups: [],
281
+ note: watching ? "Nothing new. Call `watch` again to keep listening." : "Watch is off in the studio: new feedback waits until someone turns it back on. Call `watch` again to keep listening."
282
+ });
283
+ });
284
+ }
285
+ //#endregion
286
+ export { registerWatchTool };
@@ -0,0 +1,5 @@
1
+ import { StudioProject } from "./vite.mjs";
2
+ //#region src/server/unresolved-imports.d.ts
3
+ /** Problem lines ("files/deep/views/home.tsx:1: imports …"), and any other error the build stops at. */
4
+ export declare function unresolvedImports(project: StudioProject): Promise<string[]>;
5
+ //#endregion
@@ -0,0 +1,82 @@
1
+ import { PROTOTYPES_FOLDER } from "../shared/prototypes-core.mjs";
2
+ import { sourceFiles } from "../content/prototype-checks.mjs";
3
+ import { viteConfig } from "./vite.mjs";
4
+ import { isAbsolute, join, relative } from "node:path";
5
+ import { readFile } from "node:fs/promises";
6
+ import { build } from "vite";
7
+ //#region src/server/unresolved-imports.ts
8
+ /**
9
+ * Two plugins that note each import the build can't resolve and leave it
10
+ * out, so the build goes on: the first catches a resolver that throws (a path
11
+ * a package's exports don't have), the last takes one no resolver found. A
12
+ * path a resolver tries on the way (the baseUrl's) fails, so it tries the next.
13
+ */
14
+ function noteUnresolved(unresolved) {
15
+ const note = (importer, specifier) => {
16
+ unresolved.push({
17
+ importer,
18
+ specifier
19
+ });
20
+ return {
21
+ id: specifier,
22
+ external: true
23
+ };
24
+ };
25
+ return [{
26
+ name: "dex:unresolved-thrown",
27
+ enforce: "pre",
28
+ async resolveId(source, importer, options) {
29
+ if (!importer) return null;
30
+ try {
31
+ return await this.resolve(source, importer, {
32
+ ...options,
33
+ skipSelf: true
34
+ });
35
+ } catch {
36
+ return note(importer, source);
37
+ }
38
+ }
39
+ }, {
40
+ name: "dex:unresolved",
41
+ enforce: "post",
42
+ resolveId: (source, importer) => importer && !isAbsolute(source) && !source.startsWith("\0") ? note(importer, source) : null
43
+ }];
44
+ }
45
+ async function lineOf(file, specifier) {
46
+ const text = await readFile(file, "utf8").catch(() => "");
47
+ const at = [`"${specifier}"`, `'${specifier}'`].map((quoted) => text.indexOf(quoted)).filter((index) => index !== -1);
48
+ return at.length === 0 ? 1 : text.slice(0, Math.min(...at)).split("\n").length;
49
+ }
50
+ /** Problem lines ("files/deep/views/home.tsx:1: imports …"), and any other error the build stops at. */
51
+ async function unresolvedImports(project) {
52
+ const files = await sourceFiles(join(project.content, PROTOTYPES_FOLDER));
53
+ if (files.length === 0) return [];
54
+ const config = await viteConfig(project, "production");
55
+ const unresolved = [];
56
+ const shown = (file) => relative(project.content, file);
57
+ const [thrown, unfound] = noteUnresolved(unresolved);
58
+ try {
59
+ await build({
60
+ ...config,
61
+ logLevel: "silent",
62
+ plugins: [
63
+ thrown,
64
+ ...config.plugins ?? [],
65
+ unfound
66
+ ],
67
+ build: {
68
+ ...config.build,
69
+ write: false,
70
+ minify: false,
71
+ rollupOptions: { input: files }
72
+ }
73
+ });
74
+ } catch (error) {
75
+ const { id, message } = error;
76
+ const first = message?.split("\n")[0] ?? String(error);
77
+ return [id ? `${shown(id)}: ${first}` : first];
78
+ }
79
+ return await Promise.all(unresolved.map(async ({ importer, specifier }) => `${shown(importer)}:${await lineOf(importer, specifier)}: imports "${specifier}", which dex build can't resolve. Import what the design system exports (npx dex components lists it), or a file that is there.`));
80
+ }
81
+ //#endregion
82
+ export { unresolvedImports };
@@ -0,0 +1,14 @@
1
+ import { UpdatePullRequest } from "../shared/update-core.mjs";
2
+ import { StepRunner } from "./updates.mjs";
3
+ import { SyncPlace } from "./sync-install.mjs";
4
+ //#region src/server/update-branch.d.ts
5
+ /**
6
+ * Move the project to Dex `version` on a branch of its own from the base
7
+ * as just fetched, push it and open its pull request, changing nothing in
8
+ * the person's checkout or node_modules. Throws GitError when it refuses or
9
+ * stops. Run it inside the repository's turn.
10
+ */
11
+ export declare function updateOnBranch(place: SyncPlace, version: string, { run }?: {
12
+ run?: StepRunner;
13
+ }): Promise<UpdatePullRequest>;
14
+ //#endregion