moi-computer 0.12.1-next.0 → 0.12.1-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +26 -26
  2. package/bin/moi.mjs +2 -2
  3. package/client/AGENTS.md +5 -2
  4. package/client/api/app-config.ts +3 -2
  5. package/client/api/workspace-keys.ts +1 -1
  6. package/client/app/{AppRouter.tsx → app-router.tsx} +4 -4
  7. package/client/app/routes/{HomeRoute.tsx → home-route.tsx} +2 -2
  8. package/client/app/routes/{WorkspaceRoute.tsx → workspace-route.tsx} +18 -23
  9. package/client/app/shell/{SidebarLayout.tsx → sidebar-layout.tsx} +10 -10
  10. package/client/dev/index.html +43 -0
  11. package/client/dev/index.ts +15 -0
  12. package/client/features/applets/{AppletContainer.tsx → applet-container.tsx} +1 -1
  13. package/client/features/applets/applet-thumbnail.ts +1 -1
  14. package/client/features/applets/{useApplet.ts → use-applet.ts} +2 -2
  15. package/client/features/applets/{WidgetShell.tsx → widget-shell.tsx} +4 -4
  16. package/client/features/chat/applet-chat-intents.ts +4 -4
  17. package/client/features/chat/{ChatPanel.tsx → chat-panel.tsx} +11 -11
  18. package/client/features/chat/{ChatPopup.tsx → chat-popup.tsx} +1 -1
  19. package/client/features/chat/composer/attachments/{DrawingAttachmentChip.tsx → drawing-attachment-chip.tsx} +1 -1
  20. package/client/features/chat/composer/attachments/{FileAttachmentChip.tsx → file-attachment-chip.tsx} +1 -1
  21. package/client/features/chat/composer/attachments/{TextAttachmentChip.tsx → text-attachment-chip.tsx} +1 -1
  22. package/client/features/chat/composer/banners/{ComposerBanner.tsx → composer-banner.tsx} +0 -14
  23. package/client/features/chat/composer/banners/{ErrorBanner.tsx → error-banner.tsx} +1 -1
  24. package/client/features/chat/composer/banners/{SkillUpdateBanner.tsx → skill-update-banner.tsx} +3 -3
  25. package/client/features/chat/composer/{ChatComposer.tsx → chat-composer.tsx} +8 -7
  26. package/client/features/chat/composer/{ModelPicker.tsx → model-picker.tsx} +1 -1
  27. package/client/features/chat/composer/{useWorkspaceComposerState.tsx → use-workspace-composer-state.tsx} +12 -28
  28. package/client/features/chat/composer/{useWorkspaceSkillUpdates.ts → use-workspace-skill-updates.ts} +1 -1
  29. package/client/features/chat/connection/chat-frames.ts +1 -1
  30. package/client/features/chat/messages/{ChatEmptyState.tsx → chat-empty-state.tsx} +4 -4
  31. package/client/features/chat/messages/{MarkdownContent.tsx → markdown-content.tsx} +1 -1
  32. package/client/features/chat/messages/tool-group/index.ts +1 -1
  33. package/client/features/chat/messages/tool-group/{ReadImagePreview.tsx → read-image-preview.tsx} +2 -2
  34. package/client/features/chat/messages/tool-group/{SubagentCard.tsx → subagent-card.tsx} +3 -3
  35. package/client/features/chat/messages/tool-group/{TimelineRow.tsx → timeline-row.tsx} +1 -1
  36. package/client/features/chat/messages/tool-group/{ToolCallGroup.tsx → tool-call-group.tsx} +8 -8
  37. package/client/features/chat/messages/tool-group/{ToolOutput.tsx → tool-output.tsx} +1 -1
  38. package/client/features/chat/messages/{TurnView.tsx → turn-view.tsx} +4 -4
  39. package/client/features/chat/sessions/api.ts +2 -2
  40. package/client/features/chat/sessions/{ChatSelector.tsx → chat-selector.tsx} +2 -2
  41. package/client/features/chat/sessions/{useSelectedSession.ts → use-selected-session.ts} +2 -2
  42. package/client/features/chat/{useChat.ts → use-chat.ts} +3 -3
  43. package/client/features/collab/proxy-user.ts +1 -1
  44. package/client/features/connectors/mcp-icons.ts +1 -1
  45. package/client/features/connectors/{McpServerCards.tsx → mcp-server-cards.tsx} +1 -1
  46. package/client/features/{home/workspace-setup/DemoDialog.tsx → demo/demo-dialog.tsx} +6 -6
  47. package/client/features/dev/chat-states-fixtures.ts +4 -4
  48. package/client/features/dev/{ChatStatesPage.tsx → chat-states-page.tsx} +6 -6
  49. package/client/features/dev/collab/local-user-settings.tsx +4 -4
  50. package/client/features/dev/{DevIndexPage.tsx → dev-index-page.tsx} +7 -1
  51. package/client/features/dev/{DevRoutes.tsx → dev-routes.tsx} +8 -6
  52. package/client/features/dev/workspace-setup-mocks.ts +102 -0
  53. package/client/features/dev/workspace-setup-page.tsx +11 -0
  54. package/client/features/dev/workspace-setup-preview.tsx +226 -0
  55. package/client/features/drawings/{DrawingToolbar.tsx → drawing-toolbar.tsx} +1 -1
  56. package/client/features/drawings/{useChatAnnotation.ts → use-chat-annotation.ts} +29 -23
  57. package/client/features/drawings/{useDrawingLayer.ts → use-drawing-layer.ts} +1 -1
  58. package/client/features/drawings/{useViewSketch.ts → use-view-sketch.ts} +1 -1
  59. package/client/features/harness/api.ts +36 -0
  60. package/client/features/harness/device-login-steps.tsx +97 -0
  61. package/client/features/home/api.ts +1 -81
  62. package/client/features/home/{HomeLogo.tsx → home-logo.tsx} +1 -1
  63. package/client/features/home/{HomePage.tsx → home-page.tsx} +14 -18
  64. package/client/features/overview/api.ts +2 -2
  65. package/client/features/overview/default/registry.tsx +1 -1
  66. package/client/features/overview/default/{ViewsWidget.tsx → views-widget.tsx} +1 -1
  67. package/client/features/overview/{HiddenPanel.tsx → hidden-panel.tsx} +2 -2
  68. package/client/features/overview/{Overview.tsx → overview.tsx} +6 -6
  69. package/client/features/overview/{WidgetCanvas.tsx → widget-canvas.tsx} +1 -1
  70. package/client/features/overview/{WidgetFrame.tsx → widget-frame.tsx} +1 -1
  71. package/client/features/overview/workspace-name.tsx +55 -0
  72. package/client/features/scratchpad/{Scratchpad.tsx → scratchpad.tsx} +7 -7
  73. package/client/features/scratchpad/{useScratchpadSnapshot.tsx → use-scratchpad-snapshot.tsx} +3 -3
  74. package/client/features/settings/api.ts +1 -1
  75. package/client/features/settings/{ConnectorsSettings.tsx → connectors-settings.tsx} +3 -3
  76. package/client/features/settings/{EnvironmentSettings.tsx → environment-settings.tsx} +3 -3
  77. package/client/features/settings/{GeneralSettings.tsx → general-settings.tsx} +5 -5
  78. package/client/features/settings/{useEnvVars.ts → use-env-vars.ts} +1 -1
  79. package/client/features/settings/{WorkspaceIconPicker.tsx → workspace-icon-picker.tsx} +1 -1
  80. package/client/features/settings/{WorkspaceSettingsDialog.tsx → workspace-settings-dialog.tsx} +3 -3
  81. package/client/features/update/api.ts +1 -1
  82. package/client/features/views/api.ts +1 -1
  83. package/client/features/views/{PendingViewScreen.tsx → pending-view-screen.tsx} +7 -4
  84. package/client/features/views/{useViewActions.ts → use-view-actions.ts} +2 -2
  85. package/client/features/views/{useViewDrafts.ts → use-view-drafts.ts} +15 -6
  86. package/client/features/views/{ViewManager.tsx → view-manager.tsx} +3 -3
  87. package/client/features/views/view-submission.ts +1 -1
  88. package/client/features/workspace/add/api.ts +80 -0
  89. package/client/features/{home/workspace-setup/CreateWorkspaceDialog.tsx → workspace/add/create-workspace-dialog.tsx} +56 -42
  90. package/client/features/workspace/add/import-workspace-dialog.tsx +81 -0
  91. package/client/features/{home/workspace-setup/useWorkspaceImport.ts → workspace/add/use-workspace-import.ts} +1 -1
  92. package/client/features/workspace/add/workspace-agent-options.ts +53 -0
  93. package/client/features/{home/workspace-setup/WorkspaceAgentStep.tsx → workspace/add/workspace-agent-selector.tsx} +59 -98
  94. package/client/features/{home/workspace-setup/WorkspaceDialogContent.tsx → workspace/add/workspace-dialog-content.tsx} +1 -1
  95. package/client/features/workspace/api.ts +24 -15
  96. package/client/features/workspace/browser-tab-state.ts +1 -1
  97. package/client/features/workspace/moi-context.ts +1 -1
  98. package/client/features/workspace/setup/workspace-login-state.tsx +175 -0
  99. package/client/features/workspace/setup/workspace-recovery-states.tsx +125 -0
  100. package/client/features/workspace/setup/workspace-setup-panel.tsx +18 -0
  101. package/client/features/workspace/setup/workspace-setup.tsx +77 -0
  102. package/client/features/workspace/setup/workspace-welcome-state.tsx +81 -0
  103. package/client/features/workspace/{ThemePanel.tsx → theme-panel.tsx} +3 -3
  104. package/client/features/workspace/{useWorkspaceNavigation.ts → use-workspace-navigation.ts} +2 -2
  105. package/client/features/workspace/{WorkspaceScreen.tsx → workspace-content.tsx} +27 -30
  106. package/client/features/workspace/workspace-identity.tsx +40 -0
  107. package/client/features/workspace/{WorkspaceMenu.tsx → workspace-menu.tsx} +3 -3
  108. package/client/features/{home → workspace}/workspace-presentation.tsx +10 -3
  109. package/client/features/workspace/workspace-screen.tsx +28 -0
  110. package/client/features/workspace/{WorkspaceSplitLayout.tsx → workspace-split-layout.tsx} +1 -1
  111. package/client/features/workspace/{WorkspaceTabs.tsx → workspace-tabs.tsx} +2 -2
  112. package/client/index.css +2 -2
  113. package/client/index.html +1 -1
  114. package/client/lib/agent-availability.ts +0 -5
  115. package/client/main.tsx +1 -1
  116. package/client/runtime/{useWorkspaceEvents.ts → use-workspace-events.ts} +3 -12
  117. package/dist/chunk-08ndj2rg.js +2 -0
  118. package/dist/chunk-2x040tmg.js +68 -0
  119. package/dist/chunk-3smxq0ts.js +1 -0
  120. package/dist/{chunk-am1x230f.js → chunk-68ch5hs8.js} +1 -1
  121. package/dist/{chunk-yvzhwtfa.js → chunk-9vg3xa81.js} +2 -2
  122. package/dist/chunk-c2p00p9j.css +1 -0
  123. package/dist/chunk-cs833y9j.js +1 -0
  124. package/dist/{chunk-gps4qc38.js → chunk-d7cbm65e.js} +1 -1
  125. package/dist/{chunk-j905va8r.js → chunk-hvh9f5h0.js} +1 -1
  126. package/dist/{chunk-vqpkqtdr.js → chunk-jvyvwwv3.js} +1 -1
  127. package/dist/chunk-nwevqe86.js +10 -0
  128. package/dist/{chunk-hzwr8dp8.js → chunk-q0gbdts4.js} +3 -3
  129. package/dist/chunk-rt30jbcm.js +1 -0
  130. package/dist/chunk-y5y3kj67.js +1 -0
  131. package/dist/index.html +2 -2
  132. package/lib/format.ts +1 -1
  133. package/lib/harness-instructions.ts +30 -0
  134. package/lib/ids.ts +1 -1
  135. package/lib/moi-context.ts +2 -2
  136. package/lib/scratchpad-skew.ts +3 -3
  137. package/lib/types.ts +28 -20
  138. package/lib/update.ts +1 -1
  139. package/package.json +5 -2
  140. package/server/AGENTS.md +10 -4
  141. package/server/README.md +102 -0
  142. package/server/api/harnesses.ts +56 -0
  143. package/server/{api.ts → api/index.ts} +85 -97
  144. package/server/app-config.ts +24 -12
  145. package/server/app-settings.ts +1 -1
  146. package/server/applets/applet-css.ts +1 -1
  147. package/server/applets/build-applet.ts +4 -4
  148. package/server/applets/build-worker.ts +1 -1
  149. package/server/applets/config.ts +1 -1
  150. package/server/{functions-worker.ts → applets/functions-worker.ts} +1 -1
  151. package/server/{functions.ts → applets/functions.ts} +2 -2
  152. package/server/applets/index.ts +2 -2
  153. package/server/{thumbnails.ts → applets/thumbnails.ts} +1 -1
  154. package/server/{applet-typecheck.ts → applets/typecheck.ts} +4 -4
  155. package/server/{ui-components.ts → applets/ui-components.ts} +2 -2
  156. package/server/{views.ts → applets/views.ts} +7 -7
  157. package/server/{widgets.ts → applets/widgets.ts} +2 -2
  158. package/server/cli/applet-selector.ts +19 -0
  159. package/server/cli/args.ts +5 -0
  160. package/server/{cli-colors.ts → cli/colors.ts} +1 -1
  161. package/server/cli/commands/bundle.ts +119 -0
  162. package/server/cli/commands/call-server-fn.ts +42 -0
  163. package/server/cli/commands/check.ts +53 -0
  164. package/server/cli/commands/config.ts +132 -0
  165. package/server/cli/commands/debug.ts +119 -0
  166. package/server/cli/commands/env.ts +162 -0
  167. package/server/cli/commands/hermes.ts +149 -0
  168. package/server/cli/commands/init.ts +286 -0
  169. package/server/cli/commands/navigate.ts +35 -0
  170. package/server/cli/commands/openclaw.ts +168 -0
  171. package/server/cli/commands/refresh.ts +39 -0
  172. package/server/cli/commands/scratch.ts +496 -0
  173. package/server/cli/commands/service.ts +298 -0
  174. package/server/cli/commands/skill.ts +122 -0
  175. package/server/cli/commands/start.ts +138 -0
  176. package/server/cli/commands/status.ts +80 -0
  177. package/server/cli/commands/tabs.ts +43 -0
  178. package/server/cli/commands/theme.ts +192 -0
  179. package/server/cli/commands/ui-components.ts +15 -0
  180. package/server/cli/commands/update.ts +192 -0
  181. package/server/cli/commands/version.ts +9 -0
  182. package/server/cli/commands/views.ts +87 -0
  183. package/server/cli/control.ts +89 -0
  184. package/server/{cli-env.ts → cli/env.ts} +9 -9
  185. package/server/cli/index.ts +171 -0
  186. package/server/{cli-pc.ts → cli/pc.ts} +1 -1
  187. package/server/cli/provider.ts +25 -0
  188. package/server/cli/server-version.ts +16 -0
  189. package/server/cli/server.ts +81 -0
  190. package/server/{cli-ui-components.ts → cli/ui-components.ts} +5 -5
  191. package/server/cli.ts +2 -3252
  192. package/server/collab/manager.ts +3 -3
  193. package/server/collab/skill/index.ts +2 -2
  194. package/server/control.ts +20 -20
  195. package/server/harness/README.md +47 -25
  196. package/server/harness/acp/NOTES.md +11 -11
  197. package/server/harness/acp/archived.ts +3 -3
  198. package/server/harness/acp/client.ts +2 -2
  199. package/server/harness/acp/run-durations.ts +1 -1
  200. package/server/harness/acp/session.ts +5 -5
  201. package/server/harness/auth.ts +303 -0
  202. package/server/harness/claude-code/NOTES.md +9 -7
  203. package/server/harness/claude-code/auth.ts +125 -17
  204. package/server/harness/claude-code/index.ts +2 -1
  205. package/server/harness/claude-code/mcp.ts +1 -1
  206. package/server/harness/claude-code/session.ts +10 -7
  207. package/server/harness/codex/NOTES.md +12 -12
  208. package/server/harness/codex/auth.ts +86 -19
  209. package/server/harness/codex/client.ts +17 -13
  210. package/server/harness/codex/index.ts +2 -1
  211. package/server/harness/codex/permissions.ts +3 -3
  212. package/server/harness/codex/probe.ts +3 -5
  213. package/server/harness/codex/session.ts +16 -13
  214. package/server/harness/codex/transport.ts +5 -5
  215. package/server/harness/executable.ts +42 -18
  216. package/server/harness/hermes/NOTES.md +70 -70
  217. package/server/harness/hermes/discovery.ts +1 -1
  218. package/server/harness/openclaw/NOTES.md +24 -24
  219. package/server/harness/openclaw/adapter.ts +1 -1
  220. package/server/harness/openclaw/compat.ts +1 -1
  221. package/server/harness/openclaw/session.ts +5 -2
  222. package/server/harness/registry.ts +1 -1
  223. package/server/harness/shell-path.ts +31 -21
  224. package/server/harness/types.ts +9 -2
  225. package/server/navigation-relay.ts +1 -1
  226. package/server/open-browser.ts +7 -0
  227. package/server/{scratchpad-assets.ts → scratchpad/assets.ts} +4 -4
  228. package/server/{scratchpad.ts → scratchpad/document.ts} +8 -8
  229. package/server/{scratchpad-executor.ts → scratchpad/executor.ts} +7 -7
  230. package/server/{scratchpad-relay.ts → scratchpad/relay.ts} +4 -5
  231. package/server/{scratchpad-shape-defaults.ts → scratchpad/shape-defaults.ts} +2 -2
  232. package/server/server-cwd.ts +1 -1
  233. package/server/service.ts +2 -2
  234. package/server/{session-archive.ts → sessions/archive.ts} +5 -5
  235. package/server/{attachment-message.ts → sessions/attachment-message.ts} +1 -1
  236. package/server/{session-config.ts → sessions/config.ts} +1 -1
  237. package/server/{session-lifecycle.ts → sessions/lifecycle.ts} +3 -3
  238. package/server/{pending-views.ts → sessions/pending-views.ts} +3 -3
  239. package/server/{selected-session.ts → sessions/selected.ts} +1 -1
  240. package/server/{session-store.ts → sessions/store.ts} +1 -1
  241. package/server/{view-sessions.ts → sessions/view-sessions.ts} +9 -9
  242. package/server/{skills-template.ts → skills/template.ts} +1 -1
  243. package/server/{skill-update.ts → skills/update.ts} +5 -5
  244. package/server/{skill-version.ts → skills/version.ts} +4 -4
  245. package/server/static.ts +1 -1
  246. package/server/status.ts +3 -3
  247. package/server/web.ts +14 -7
  248. package/server/{env-apply.ts → workspaces/env-apply.ts} +5 -5
  249. package/server/{workspace-env.ts → workspaces/env.ts} +3 -3
  250. package/server/{workspace-import.ts → workspaces/import.ts} +4 -4
  251. package/server/{workspace-init.ts → workspaces/init.ts} +5 -5
  252. package/server/{layout.ts → workspaces/layout.ts} +2 -2
  253. package/server/{preview.ts → workspaces/preview.ts} +1 -1
  254. package/server/{registry.ts → workspaces/registry.ts} +3 -3
  255. package/server/{required-env.ts → workspaces/required-env.ts} +3 -3
  256. package/server/{moi-scaffold.ts → workspaces/scaffold.ts} +3 -3
  257. package/ui-components/button.tsx +1 -1
  258. package/ui-components/docs/attachment.md +2 -2
  259. package/ui-components/docs/button.md +1 -1
  260. package/ui-components/docs/calendar.md +1 -1
  261. package/ui-components/docs/chart.md +4 -4
  262. package/ui-components/docs/data-table.md +1 -1
  263. package/ui-components/docs/drawer.md +1 -1
  264. package/ui-components/docs/field.md +1 -1
  265. package/ui-components/docs/input.md +2 -2
  266. package/ui-components/docs/label.md +2 -2
  267. package/ui-components/docs/table.md +2 -2
  268. package/workspace/.claude/skills/moi-workspace/SKILL.md +12 -12
  269. package/workspace/.claude/skills/moi-workspace/references/COLLAB.md +2 -2
  270. package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +2 -2
  271. package/workspace/.claude/skills/moi-workspace/references/INTENTS.md +2 -2
  272. package/client/features/chat/composer/banners/AgentAvailabilityBanner.tsx +0 -101
  273. package/client/features/home/workspace-setup/ImportWorkspaceDialog.tsx +0 -92
  274. package/client/features/overview/WorkspaceName.tsx +0 -60
  275. package/dist/chunk-1zhnhy00.js +0 -1
  276. package/dist/chunk-27501vke.js +0 -1
  277. package/dist/chunk-9xtv6djt.js +0 -2
  278. package/dist/chunk-darpsw65.js +0 -1
  279. package/dist/chunk-n33w9y38.js +0 -10
  280. package/dist/chunk-r63ks44z.js +0 -68
  281. package/dist/chunk-wd46nk26.css +0 -1
  282. package/dist/chunk-xgt7vxt9.js +0 -1
  283. package/server/agent.ts +0 -223
  284. /package/client/components/shared/{AgentBlobatar.tsx → agent-blobatar.tsx} +0 -0
  285. /package/client/components/shared/{BottomPanel.tsx → bottom-panel.tsx} +0 -0
  286. /package/client/components/shared/{Composer.tsx → composer.tsx} +0 -0
  287. /package/client/components/shared/{LedLogo.tsx → led-logo.tsx} +0 -0
  288. /package/client/components/shared/{PanelHeader.tsx → panel-header.tsx} +0 -0
  289. /package/client/components/shared/{ReorderableList.tsx → reorderable-list.tsx} +0 -0
  290. /package/client/components/shared/{WorkspaceIcon.tsx → workspace-icon.tsx} +0 -0
  291. /package/client/features/applets/{WidgetErrorBoundary.tsx → widget-error-boundary.tsx} +0 -0
  292. /package/client/features/chat/composer/attachments/{AttachmentChip.tsx → attachment-chip.tsx} +0 -0
  293. /package/client/features/chat/messages/{ChatPromptBubbles.tsx → chat-prompt-bubbles.tsx} +0 -0
  294. /package/client/features/chat/messages/{ShimmerText.tsx → shimmer-text.tsx} +0 -0
  295. /package/client/features/chat/messages/tool-group/{CodeBlock.tsx → code-block.tsx} +0 -0
  296. /package/client/features/chat/messages/tool-group/{Collapse.tsx → collapse.tsx} +0 -0
  297. /package/client/features/chat/messages/{useStickToBottom.ts → use-stick-to-bottom.ts} +0 -0
  298. /package/client/features/connectors/{IconMcp.tsx → icon-mcp.tsx} +0 -0
  299. /package/client/features/dev/{BlobatarShapesPage.tsx → blobatar-shapes-page.tsx} +0 -0
  300. /package/client/features/dev/{HarnessDebugPage.tsx → harness-debug-page.tsx} +0 -0
  301. /package/client/features/dev/{TextureLabPage.tsx → texture-lab-page.tsx} +0 -0
  302. /package/client/features/dev/{ToolCallsPage.tsx → tool-calls-page.tsx} +0 -0
  303. /package/client/features/drawings/{DrawingLayer.tsx → drawing-layer.tsx} +0 -0
  304. /package/client/features/home/{WorkspacePreview.tsx → workspace-preview.tsx} +0 -0
  305. /package/client/features/overview/{useGridReconcile.ts → use-grid-reconcile.ts} +0 -0
  306. /package/client/features/scratchpad/{ScratchpadControls.tsx → scratchpad-controls.tsx} +0 -0
  307. /package/client/features/settings/{SettingsLayout.tsx → settings-layout.tsx} +0 -0
  308. /package/client/features/update/{UpdateControl.tsx → update-control.tsx} +0 -0
  309. /package/client/features/workspace/{UnavailablePage.tsx → unavailable-page.tsx} +0 -0
  310. /package/client/features/workspace/{useFitsSplitLayout.ts → use-fits-split-layout.ts} +0 -0
  311. /package/client/features/workspace/{WorkspaceContext.tsx → workspace-context.tsx} +0 -0
  312. /package/client/features/workspace/{WorkspaceLayoutContext.tsx → workspace-layout-context.tsx} +0 -0
  313. /package/server/{bundle-queue.ts → applets/bundle-queue.ts} +0 -0
  314. /package/server/{applet-log.ts → applets/log.ts} +0 -0
  315. /package/server/{cli-ui.ts → cli/ui.ts} +0 -0
  316. /package/server/{workspace-config.ts → workspaces/config.ts} +0 -0
  317. /package/server/{icon.ts → workspaces/icon.ts} +0 -0
  318. /package/server/{tabs.ts → workspaces/tabs.ts} +0 -0
  319. /package/server/{theme.ts → workspaces/theme.ts} +0 -0
@@ -1,7 +1,7 @@
1
1
  import { mkdir, rename } from 'node:fs/promises'
2
2
  import { join } from 'path'
3
3
 
4
- import { DATA_DIR } from './data-dir'
4
+ import { DATA_DIR } from '../data-dir'
5
5
  import type { WorkspaceSessionSelection, WorkspaceTabId } from '@/lib/types'
6
6
  import { isWorkspaceTabId } from '@/lib/workspace-tabs'
7
7
 
@@ -7,7 +7,7 @@ import type {
7
7
  SessionInfo,
8
8
  SessionSummary
9
9
  } from '@/lib/types'
10
- import { DATA_DIR } from './data-dir'
10
+ import { DATA_DIR } from '../data-dir'
11
11
 
12
12
  type Store = Record<string, Record<string, SessionRecord>>
13
13
  export const DEFAULT_SESSION_STORE_PATH = join(DATA_DIR, 'sessions.json')
@@ -2,15 +2,15 @@ import { APP_ICON_IDS } from '@/lib/app-icons'
2
2
  import { viewBuildDirectives } from '@/lib/view-build-directives'
3
3
  import { viewIdFromTab, viewTabId } from '@/lib/workspace-tabs'
4
4
  import type { PendingView, SelectedSessionScope, WorkspaceEntry, WorkspaceTabId } from '@/lib/types'
5
- import { getCollabReferencePath } from './collab/config'
6
- import { harnessFor } from './harness/registry'
7
- import type { SendMessageInput } from './harness/types'
8
- import { ForkUnsupportedError, inheritedHistoryBoundary } from './harness/fork'
9
- import { publishEvent } from './events'
10
- import { broadcast } from './state'
11
- import { getPinnedSession, saveSelectedSession, resolveRenamedSession } from './selected-session'
12
- import { getSessionRecord, patchSessionRecord } from './session-store'
13
- import { getSessionConfig, saveSessionConfig } from './session-config'
5
+ import { getCollabReferencePath } from '../collab/config'
6
+ import { harnessFor } from '../harness/registry'
7
+ import type { SendMessageInput } from '../harness/types'
8
+ import { ForkUnsupportedError, inheritedHistoryBoundary } from '../harness/fork'
9
+ import { publishEvent } from '../events'
10
+ import { broadcast } from '../state'
11
+ import { getPinnedSession, saveSelectedSession, resolveRenamedSession } from './selected'
12
+ import { getSessionRecord, patchSessionRecord } from './store'
13
+ import { getSessionConfig, saveSessionConfig } from './config'
14
14
  import {
15
15
  beginViewBuild,
16
16
  createPendingView,
@@ -7,7 +7,7 @@ import { join } from 'node:path'
7
7
 
8
8
  // Source directory for shipped templates. Resolved relative to this file so
9
9
  // symlinked CLI binaries still find the source tree.
10
- export const TEMPLATE_DIR = join(import.meta.dir, '..', 'workspace')
10
+ export const TEMPLATE_DIR = join(import.meta.dir, '..', '..', 'workspace')
11
11
 
12
12
  // The folder holding the skill packages this CLI ships. Each subdirectory is
13
13
  // one skill (e.g. `moi-workspace/`) with its own `SKILL.md`. Source of truth
@@ -1,10 +1,10 @@
1
1
  import type { WorkspaceSkillsStatus, WorkspaceSkillStatus, WorkspaceType } from '@/lib/types'
2
2
 
3
- import type { AppletDeclarationFile } from './applets/declarations'
4
- import { syncAppletDeclarations } from './applets/declarations'
5
- import { isBehind, skillStatuses } from './skill-version'
6
- import { installBundledSkills } from './skills-template'
7
- import { skillsDirFor } from './workspace-init'
3
+ import type { AppletDeclarationFile } from '../applets/declarations'
4
+ import { syncAppletDeclarations } from '../applets/declarations'
5
+ import { isBehind, skillStatuses } from './version'
6
+ import { installBundledSkills } from './template'
7
+ import { skillsDirFor } from '../workspaces/init'
8
8
 
9
9
  export type WorkspaceSkillUpdateResult = {
10
10
  before: WorkspaceSkillStatus[]
@@ -6,9 +6,9 @@ import { join } from 'node:path'
6
6
 
7
7
  import type { WorkspaceSkillStatus, WorkspaceType } from '@/lib/types'
8
8
 
9
- import { findWorkspaceForPath, liftToWorkspaceRoot, listWorkspaces } from './registry'
10
- import { BUNDLED_SKILLS_DIR } from './skills-template'
11
- import { skillsDirFor } from './workspace-init'
9
+ import { findWorkspaceForPath, liftToWorkspaceRoot, listWorkspaces } from '../workspaces/registry'
10
+ import { BUNDLED_SKILLS_DIR } from './template'
11
+ import { skillsDirFor } from '../workspaces/init'
12
12
 
13
13
  // The version is stamped as a self-contained marker in SKILL.md, e.g.
14
14
  // `<moi-skill version="0.1.0" />`, rather than in YAML frontmatter. SKILL.md
@@ -127,7 +127,7 @@ export async function staleSkillNotice(cwd: string): Promise<string | null> {
127
127
  )
128
128
  if (stale.length === 0) return null
129
129
  const parts = stale.map(s => `${s.name} (${s.installed ?? 'none'} → ${s.bundled})`)
130
- return `⚠ moi skill outdated: ${parts.join(', ')} — run \`moi skill update\` to refresh.`
130
+ return `⚠ Moi skill outdated: ${parts.join(', ')} — run \`moi skill update\` to refresh.`
131
131
  } catch {
132
132
  return null
133
133
  }
package/server/static.ts CHANGED
@@ -7,7 +7,7 @@ import { join } from 'node:path'
7
7
  // install tree. In dev there is no `dist/`, so web.ts falls back to the
8
8
  // imported HTML route + Bun.serve's live bundler (HMR). `import.meta.dir` is
9
9
  // server/, so `dist/` sits one level up. The Hono API serves files from here
10
- // via `serveStatic` (see api.ts).
10
+ // via `serveStatic` (see api/index.ts).
11
11
  export const DIST_DIR = join(import.meta.dir, '..', 'dist')
12
12
  const DIST_INDEX = join(DIST_DIR, 'index.html')
13
13
 
package/server/status.ts CHANGED
@@ -8,9 +8,9 @@
8
8
  import { getAppConfig } from './app-config'
9
9
  import { CONTROL_PORT, PORT } from './constants'
10
10
  import { debugEnabled } from './debug'
11
- import { WORKER_LIMITS, type WorkerDebugInfo, getWorkersDebugSnapshot } from './functions'
11
+ import { WORKER_LIMITS, type WorkerDebugInfo, getWorkersDebugSnapshot } from './applets/functions'
12
12
  import { allHarnesses } from './harness/registry'
13
- import { tildify } from './registry'
13
+ import { tildify } from './workspaces/registry'
14
14
  import { getClientCount } from './state'
15
15
  import { VERSION } from './version'
16
16
 
@@ -69,7 +69,7 @@ export function renderStatus(): string {
69
69
  const now = Date.now()
70
70
 
71
71
  const lines: string[] = []
72
- lines.push('moi server status')
72
+ lines.push('Moi server status')
73
73
  lines.push('=================')
74
74
  lines.push('')
75
75
  lines.push(`version ${VERSION}${process.env.MOI_SERVICE ? ' (service-managed)' : ''}`)
package/server/web.ts CHANGED
@@ -6,9 +6,11 @@ import { isMoiContext } from '@/lib/moi-context'
6
6
  import { rm } from 'node:fs/promises'
7
7
 
8
8
  import index from '../client/index.html'
9
+ import devSandbox from '../client/dev/index.html'
9
10
  import { api } from './api'
10
11
  import { getAppConfig } from './app-config'
11
- import { AttachmentUploadError } from './attachment-message'
12
+ import { harnessStore } from './harness/auth'
13
+ import { AttachmentUploadError } from './sessions/attachment-message'
12
14
  import { PORT } from './constants'
13
15
  import { control } from './control'
14
16
  import { proxyUserState } from './collab/cloudflare-access'
@@ -16,14 +18,14 @@ import { isCollabEnabled } from './collab/config'
16
18
  import { collabManager } from './collab/manager'
17
19
  import { EVENTS_TOPIC, setEventServer } from './events'
18
20
  import { killBuildWorkers } from './applets/build-worker'
19
- import { killAllWorkers } from './functions'
20
- import { startScratchpadSweeper } from './scratchpad'
21
+ import { killAllWorkers } from './applets/functions'
22
+ import { startScratchpadSweeper } from './scratchpad/document'
21
23
  import { navigationRelay } from './navigation-relay'
22
- import { resolveScratchOp } from './scratchpad-relay'
24
+ import { resolveScratchOp } from './scratchpad/relay'
23
25
  import { allHarnesses, harnessFor } from './harness/registry'
24
- import { getWorkspace, listWorkspaces } from './registry'
25
- import { failInterruptedViewStarts, sendWorkspaceMessage } from './view-sessions'
26
- import { PendingViewError } from './pending-views'
26
+ import { getWorkspace, listWorkspaces } from './workspaces/registry'
27
+ import { failInterruptedViewStarts, sendWorkspaceMessage } from './sessions/view-sessions'
28
+ import { PendingViewError } from './sessions/pending-views'
27
29
  import {
28
30
  addClient,
29
31
  broadcast,
@@ -149,6 +151,10 @@ export const app = Bun.serve<WsData>({
149
151
  '/': shell,
150
152
  '/dev': shell,
151
153
  '/dev/*': shell,
154
+ // Isolated sandboxes bypass app startup and share the client/dev entry point.
155
+ '/dev/workspace-setup/preview': prebuilt
156
+ ? new Response('Not found', { status: 404 })
157
+ : devSandbox,
152
158
  '/workspace/*': shell,
153
159
 
154
160
  // Chat websocket — app-wide (one per client, not per workspace). Each chat
@@ -304,6 +310,7 @@ async function shutdown() {
304
310
  try {
305
311
  control.stop(true)
306
312
  } catch {}
313
+ harnessStore.shutdown()
307
314
  for (const h of allHarnesses()) h.shutdown?.()
308
315
  killAllWorkers()
309
316
  killBuildWorkers()
@@ -3,10 +3,10 @@
3
3
  // relayed over the control port — the workspace's processes must be reaped and
4
4
  // every connected client told to refetch. Both entry points call this so the
5
5
  // side effects can never drift apart.
6
- import { agentStore } from './agent'
7
- import { publishEvent } from './events'
8
- import { restartWorker } from './functions'
9
- import { allHarnesses } from './harness/registry'
6
+ import { harnessStore } from '../harness/auth'
7
+ import { publishEvent } from '../events'
8
+ import { restartWorker } from '../applets/functions'
9
+ import { allHarnesses } from '../harness/registry'
10
10
 
11
11
  export function applyEnvChanged(workspace: { id: string; path: string }): void {
12
12
  // Kill the cached widget worker (next RPC respawns with fresh env) and tear
@@ -15,6 +15,6 @@ export function applyEnvChanged(workspace: { id: string; path: string }): void {
15
15
  for (const h of allHarnesses()) h.onEnvChanged?.(workspace.path)
16
16
  // Env can carry credentials (ANTHROPIC_API_KEY, provider config) — drop the
17
17
  // cached availability so the next agent snapshot re-probes.
18
- agentStore.invalidate(workspace.id)
18
+ harnessStore.invalidate(workspace)
19
19
  publishEvent({ type: 'env:updated', workspaceId: workspace.id })
20
20
  }
@@ -1,5 +1,5 @@
1
1
  // Per-workspace environment variables surfaced to both spawn sites: the widget
2
- // function workers (functions.ts) and the agent chat session (cc-session.ts).
2
+ // function workers (server/applets/functions.ts) and agent harness processes.
3
3
  //
4
4
  // Two sources feed a workspace's effective env:
5
5
  // 1. Discovered `.env` files in the workspace root (`.env`, then `.env.local`,
@@ -20,7 +20,7 @@ import { parseEnv } from 'node:util'
20
20
 
21
21
  import type { WorkspaceEnvVar, WorkspaceEnvView } from '@/lib/types'
22
22
 
23
- import { DATA_DIR } from './data-dir'
23
+ import { DATA_DIR } from '../data-dir'
24
24
 
25
25
  // Dotenv files scanned in the workspace root, low → high precedence. A later
26
26
  // file's keys override an earlier file's (base `.env`, machine-local `.env.local`).
@@ -299,7 +299,7 @@ async function loadWorkspaceEnvState(workspacePath: string): Promise<WorkspaceEn
299
299
 
300
300
  // The effective env: discovered `.env` (when inherited) overlaid with the
301
301
  // custom secrets. Injected at spawn — env is frozen once the process starts,
302
- // so changes require a restart (see functions.ts / cc-session.ts).
302
+ // so changes require a restart (see server/applets/functions.ts and server/harness/).
303
303
  export async function resolveWorkspaceEnv(workspacePath: string): Promise<Record<string, string>> {
304
304
  const { secrets, dotenv } = await loadWorkspaceEnvState(workspacePath)
305
305
  return { ...dotenv, ...secrets }
@@ -2,10 +2,10 @@ import { resolve } from 'node:path'
2
2
 
3
3
  import type { WorkspaceType } from '@/lib/types'
4
4
 
5
- import { discoverHermesProfiles } from './harness/hermes/discovery'
6
- import type { HermesProfile } from './harness/hermes/discovery'
7
- import { discoverOpenClawAgents } from './harness/openclaw/discovery'
8
- import type { OpenClawAgent } from './harness/openclaw/discovery'
5
+ import { discoverHermesProfiles } from '../harness/hermes/discovery'
6
+ import type { HermesProfile } from '../harness/hermes/discovery'
7
+ import { discoverOpenClawAgents } from '../harness/openclaw/discovery'
8
+ import type { OpenClawAgent } from '../harness/openclaw/discovery'
9
9
 
10
10
  export type WorkspaceImportMetadata = {
11
11
  name?: string
@@ -1,4 +1,4 @@
1
- // The one place that knows how to turn a directory into a moi workspace:
1
+ // The one place that knows how to turn a directory into a Moi workspace:
2
2
  // bundled skills + the `.moi/` scaffold, with the skills location keyed on the
3
3
  // agent backend. `moi init`, `moi openclaw init`, and the HTTP API (UI import /
4
4
  // create) all provision through here, so a workspace set up from the UI is
@@ -10,10 +10,10 @@ import { join } from 'node:path'
10
10
  import type { WorkspaceType } from '@/lib/types'
11
11
  export { validateWorkspaceFolderName } from '@/lib/workspace-name'
12
12
 
13
- import { getAppConfig } from './app-config'
14
- import { harnessFor } from './harness/registry'
15
- import { createDependencyInstallLogPath, scaffoldMoiDir } from './moi-scaffold'
16
- import { installBundledSkills } from './skills-template'
13
+ import { getAppConfig } from '../app-config'
14
+ import { harnessFor } from '../harness/registry'
15
+ import { createDependencyInstallLogPath, scaffoldMoiDir } from './scaffold'
16
+ import { installBundledSkills } from '../skills/template'
17
17
 
18
18
  // Where each backend loads skills from — the harness owns the answer
19
19
  // (Claude Code: `.claude/skills/`; OpenClaw: `<workspace>/skills/`; Codex:
@@ -9,7 +9,7 @@ import type {
9
9
  import { createDefaultWorkspaceLayout, normalizeWorkspaceTabs } from '@/lib/workspace-layout'
10
10
  import { isWorkspaceIcon } from '@/lib/workspace-icon'
11
11
 
12
- import { getCapturedThumbnails } from './thumbnails'
12
+ import { getCapturedThumbnails } from '../applets/thumbnails'
13
13
 
14
14
  function normalizeLayout(parsed: Record<string, unknown>): WorkspaceLayout {
15
15
  const defaults = createDefaultWorkspaceLayout()
@@ -24,7 +24,7 @@ function normalizeLayout(parsed: Record<string, unknown>): WorkspaceLayout {
24
24
  delete layout.icon
25
25
  }
26
26
  // Legacy thumbnail caches are intentionally dropped, not migrated — images
27
- // now live as files under `.moi/.cache/thumbnails` (server/thumbnails.ts)
27
+ // now live as files under `.moi/.cache/thumbnails` (server/applets/thumbnails.ts)
28
28
  // and applets are simply captured again there.
29
29
  delete layout.widgetThumbnails
30
30
  delete layout.viewThumbnails
@@ -14,7 +14,7 @@ import { statSync } from 'node:fs'
14
14
 
15
15
  import sharp from 'sharp'
16
16
 
17
- import { resolveWorkspaceMediaFile } from './applets'
17
+ import { resolveWorkspaceMediaFile } from '../applets'
18
18
 
19
19
  // Long edge of the rendered preview. 2× the ~300px display size keeps it crisp
20
20
  // on retina without shipping the original.
@@ -7,9 +7,9 @@ import { newWorkspaceId, validateWorkspaceId } from '@/lib/ids'
7
7
  import type { DiscoveredWorkspace, WorkspaceEntry, WorkspaceType } from '@/lib/types'
8
8
  import { orderWorkspaceTypes } from '@/lib/workspace-types'
9
9
 
10
- import { DATA_DIR } from './data-dir'
11
- import { allHarnesses } from './harness/registry'
12
- import type { DiscoveredWorkspaceCandidate } from './harness/types'
10
+ import { DATA_DIR } from '../data-dir'
11
+ import { allHarnesses } from '../harness/registry'
12
+ import type { DiscoveredWorkspaceCandidate } from '../harness/types'
13
13
 
14
14
  // Replace the home-dir prefix with `~` for display. Keeps the original
15
15
  // absolute path in place; callers should put the result in `displayPath`.
@@ -1,8 +1,8 @@
1
1
  // The env "required" view aggregates `config.requiredEnv` declared by both
2
2
  // widgets and views, each key mapped to the bundle ids that asked for it.
3
- // Shared by the env API (api.ts) and the `moi env` CLI (cli-env.ts).
4
- import { collectViewRequiredEnv } from './views'
5
- import { collectRequiredEnv } from './widgets'
3
+ // Shared by the env API (server/api/index.ts) and control-port handlers.
4
+ import { collectViewRequiredEnv } from '../applets/views'
5
+ import { collectRequiredEnv } from '../applets/widgets'
6
6
 
7
7
  export async function requiredEnvFor(workspacePath: string): Promise<Record<string, string[]>> {
8
8
  const [widgets, views] = await Promise.all([
@@ -6,8 +6,8 @@ import { appendFile, mkdir, open, stat } from 'node:fs/promises'
6
6
  import { tmpdir } from 'node:os'
7
7
  import { join, resolve, sep } from 'node:path'
8
8
 
9
- import { agentCommand } from './agent-launcher'
10
- import { syncAppletDeclarations } from './applets/declarations'
9
+ import { agentCommand } from '../agent-launcher'
10
+ import { syncAppletDeclarations } from '../applets/declarations'
11
11
 
12
12
  // Dependency set available to widgets. `react`/`react-dom` are stubs — at
13
13
  // runtime they resolve to moi's locally-vendored ESM via the browser importmap
@@ -95,7 +95,7 @@ async function runBunInstall(moiDir: string, logPath: string): Promise<number> {
95
95
  // package.json, and lockfile stay committable — they ARE the workspace.
96
96
  const REQUIRED_IGNORES = ['.build/', '.cache/', 'node_modules/'] as const
97
97
 
98
- export const MOI_GITIGNORE = `# moi internals — machine-local, re-creatable state
98
+ export const MOI_GITIGNORE = `# Moi internals — machine-local, re-creatable state
99
99
  ${REQUIRED_IGNORES.join('\n')}
100
100
  `
101
101
 
@@ -11,7 +11,7 @@ const buttonVariants = cva(
11
11
  default:
12
12
  'bg-primary text-primary-foreground inset-shadow-[0_0_8px_color-mix(in_oklab,var(--color-white)_20%,transparent)] hover:bg-primary/90 disabled:bg-accent disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-none',
13
13
  secondary:
14
- 'bg-accent text-accent-foreground hover:bg-[color-mix(in_oklch,var(--accent),var(--foreground)_3%)]',
14
+ 'bg-accent text-accent-foreground hover:bg-[color-mix(in_oklch,var(--accent),var(--foreground)_3%)] disabled:text-muted-foreground disabled:opacity-100',
15
15
  outline:
16
16
  'border bg-background text-foreground hover:bg-[color-mix(in_oklch,var(--background),var(--foreground)_3%)]',
17
17
  ghost: 'hover:bg-accent hover:text-accent-foreground',
@@ -112,7 +112,7 @@ moi ui-components add attachment
112
112
 
113
113
  <Steps className="mb-0 pt-2">
114
114
 
115
- <Step>Install the required moi component:</Step>
115
+ <Step>Install the required Moi component:</Step>
116
116
 
117
117
  ```bash
118
118
  moi ui-components add button
@@ -664,7 +664,7 @@ A container for one or more actions, aligned to the end of the attachment.
664
664
 
665
665
  ### AttachmentAction
666
666
 
667
- An action button. Renders a [`Button`](/docs/components/button) and accepts all of its props.
667
+ An action button. Renders a [`Button`](button.md) and accepts all of its props.
668
668
 
669
669
  | Prop | Type | Default | Description |
670
670
  | ---------- | ------------------------------------- | ----------- | ---------------------------------------- |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Button
3
- description: The shared button for moi and its views.
3
+ description: The shared button for Moi and its views.
4
4
  ---
5
5
 
6
6
  ## Add
@@ -95,7 +95,7 @@ The `Calendar` component is built on top of [React DayPicker](https://react-day-
95
95
 
96
96
  ## Date Picker
97
97
 
98
- You can use the `<Calendar>` component to build a date picker. See the [Date Picker](/docs/components/base/date-picker) page for more information.
98
+ You can use the `<Calendar>` component to build a date picker. See the [Date Picker](date-picker.md) page for more information.
99
99
 
100
100
  ## Persian / Hijri / Jalali Calendar
101
101
 
@@ -170,7 +170,7 @@ Introducing **Charts**. A collection of chart components that you can copy and p
170
170
 
171
171
  Charts are designed to look great out of the box. They work well with the other components and are fully customizable to fit your project.
172
172
 
173
- [Browse the Charts Library](/charts).
173
+ [Browse the Charts Library](https://ui.shadcn.com/charts).
174
174
 
175
175
  ## Component
176
176
 
@@ -697,9 +697,9 @@ export function ChartBarDemoLegend() {
697
697
 
698
698
  Done. You've built your first chart! What's next?
699
699
 
700
- - [Themes and Colors](/docs/components/chart#theming)
701
- - [Tooltip](/docs/components/chart#tooltip)
702
- - [Legend](/docs/components/chart#legend)
700
+ - [Themes and Colors](chart.md#theming)
701
+ - [Tooltip](chart.md#tooltip)
702
+ - [Legend](chart.md#legend)
703
703
 
704
704
  ## Chart Config
705
705
 
@@ -1122,7 +1122,7 @@ You can show the number of selected rows using the `table.getFilteredSelectedRow
1122
1122
 
1123
1123
  ## Reusable Components
1124
1124
 
1125
- Here are some components you can use to build your data tables. This is from the [Tasks](/examples/tasks) demo, which shares its features object (and the matching `TasksTableFeatures` type) across every component via a `data-table-features.ts` module — the same pattern we set up in [Set up Table Features](#set-up-table-features).
1125
+ Here are some components you can use to build your data tables. This is from the [Tasks](https://ui.shadcn.com/examples/tasks) demo, which shares its features object (and the matching `TasksTableFeatures` type) across every component via a `data-table-features.ts` module — the same pattern we set up in [Set up Table Features](#set-up-table-features).
1126
1126
 
1127
1127
  ### Column header
1128
1128
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Drawer
3
- description: A side panel scoped to the current moi view.
3
+ description: A side panel scoped to the current Moi view.
4
4
  ---
5
5
 
6
6
  ## Add
@@ -303,7 +303,7 @@ The `Field` family is designed for composing accessible forms. A typical field i
303
303
 
304
304
  ## Form
305
305
 
306
- See the [Form](/docs/forms) documentation for building forms with the `Field` component and [React Hook Form](/docs/forms/react-hook-form), [Tanstack Form](/docs/forms/tanstack-form), or [Formisch](/docs/forms/formisch).
306
+ See the [Form](https://ui.shadcn.com/docs/forms) documentation for building forms with the `Field` component and [React Hook Form](https://ui.shadcn.com/docs/forms/react-hook-form), [Tanstack Form](https://ui.shadcn.com/docs/forms/tanstack-form), or [Formisch](https://ui.shadcn.com/docs/forms/formisch).
307
307
 
308
308
  ## Input
309
309
 
@@ -276,7 +276,7 @@ export function InputBadge() {
276
276
 
277
277
  ## Input Group
278
278
 
279
- To add icons, text, or buttons inside an input, use the `InputGroup` component. See the [Input Group](/docs/components/input-group) component for more examples.
279
+ To add icons, text, or buttons inside an input, use the `InputGroup` component. See the [Input Group](input-group.md) component for more examples.
280
280
 
281
281
  ```tsx
282
282
  import { IconInfoCircle } from '@tabler/icons-react'
@@ -309,7 +309,7 @@ export function InputInputGroup() {
309
309
 
310
310
  ## Button Group
311
311
 
312
- To add buttons to an input, use the `ButtonGroup` component. See the [Button Group](/docs/components/button-group) component for more examples.
312
+ To add buttons to an input, use the `ButtonGroup` component. See the [Button Group](button-group.md) component for more examples.
313
313
 
314
314
  ```tsx
315
315
  import { Button } from '@/components/ui/button'
@@ -23,7 +23,7 @@ export function LabelDemo() {
23
23
  ```
24
24
 
25
25
  <Callout>
26
- For form fields, use the [Field](/docs/components/base/field) component which
26
+ For form fields, use the [Field](field.md) component which
27
27
  includes built-in label, description, and error handling.
28
28
  </Callout>
29
29
 
@@ -81,7 +81,7 @@ import { Label } from '@/components/ui/label'
81
81
 
82
82
  ## Label in Field
83
83
 
84
- For form fields, use the [Field](/docs/components/base/field) component which
84
+ For form fields, use the [Field](field.md) component which
85
85
  includes built-in `FieldLabel`, `FieldDescription`, and `FieldError` components.
86
86
 
87
87
  ```tsx
@@ -393,9 +393,9 @@ export function TableActions() {
393
393
 
394
394
  You can use the `<Table />` component to build more complex data tables. Combine it with [@tanstack/react-table](https://tanstack.com/table/latest) to create tables with sorting, filtering and pagination.
395
395
 
396
- See the [Data Table](/docs/components/data-table) documentation for more information.
396
+ See the [Data Table](data-table.md) documentation for more information.
397
397
 
398
- You can also see an example of a data table in the [Tasks](/examples/tasks) demo.
398
+ You can also see an example of a data table in the [Tasks](https://ui.shadcn.com/examples/tasks) demo.
399
399
 
400
400
  ## RTL
401
401
 
@@ -1,16 +1,16 @@
1
1
  ---
2
2
  name: moi-workspace
3
- description: The moi workspace — the web UI the user chats from, extended with agent-authored applets (widgets, views) plus theme & config. Read this FIRST when a message carries a hidden moi-context envelope or the user uses moi vocab such as workspace, applet, widget, view, scratchpad, dashboard, or a `moi` command, or asks to build, edit, customize, or theme the workspace UI or its layout.
3
+ description: The Moi workspace — the web UI the user chats from, extended with agent-authored applets (widgets, views) plus theme & config. Read this FIRST when a message carries a hidden moi-context envelope or the user uses Moi vocab such as workspace, applet, widget, view, scratchpad, dashboard, or a `moi` command, or asks to build, edit, customize, or theme the workspace UI or its layout.
4
4
  ---
5
5
 
6
- # moi workspace
6
+ # Moi workspace
7
7
 
8
8
  ## Glossary
9
9
 
10
10
  "Workspace" or "Moi Workspace" — the web UI that the user works in, talks/collaborates with you,
11
11
  sees and interacts with "Applets".
12
12
 
13
- "Project" - the primary working folder _you_ (as an agent) work in. Managed by your harness; moi
13
+ "Project" - the primary working folder _you_ (as an agent) work in. Managed by your harness; Moi
14
14
  does not have a clear definition, but assumes this is the root folder in which it stores its state
15
15
  files.
16
16
 
@@ -29,7 +29,7 @@ events to "Workspace".
29
29
 
30
30
  ## Overview
31
31
 
32
- You are working inside a **moi workspace**. It is a web UI that the user communicates with you
32
+ You are working inside a **Moi workspace**. It is a web UI that the user communicates with you
33
33
  through. It has regular chat (this one), as well as custom UI elements that you can define, write,
34
34
  and change to tailor the workspace to user needs. It starts with a simple chat, but evolves into a
35
35
  personal app equipped with a copilot (you). Workspace is a two-way communication: you can build the
@@ -89,7 +89,7 @@ my-agent-folder/
89
89
  ```
90
90
 
91
91
  Every dot-prefixed file or folder inside `.moi/` (`.build/`, `.cache/`, `.workspace.json`,
92
- `.scratchpad*`, `.gitignore`, …) is a moi internal: auto-generated and liable to change format
92
+ `.scratchpad*`, `.gitignore`, …) is a Moi internal: auto-generated and liable to change format
93
93
  without notice. Avoid them as much as possible — do not read, edit, or delete them, and never point
94
94
  tooling at them; go through the `moi` CLI instead. Version control needs no special handling: the
95
95
  scaffolded `.moi/.gitignore` already excludes the machine-local entries (`.build/`, `.cache/`,
@@ -97,12 +97,12 @@ scaffolded `.moi/.gitignore` already excludes the machine-local entries (`.build
97
97
  with the repo — commit them as-is, just never hand-edit them. Your surface is the non-dot files:
98
98
  `widgets/`, `views/`, `package.json`, and code you place under `.moi/` yourself.
99
99
 
100
- ### Using the moi CLI
100
+ ### Using the Moi CLI
101
101
 
102
102
  Treat `moi` as an external command — you cannot inspect or modify its sources. Use only the
103
103
  documented subcommands (`moi bundle`, `moi bundle --force`, etc.). Call `moi --help` for
104
104
  documentation. Run all `moi` commands from the **project root** — the folder that contains `.moi/`,
105
- never from inside `.moi/` itself. You don't pass paths; moi resolves the workspace from where it's run.
105
+ never from inside `.moi/` itself. You don't pass paths; Moi resolves the workspace from where it's run.
106
106
 
107
107
  Use the task-specific sections below for workflow guidance. The CLI will grow over time, so run
108
108
  `moi --help` to discover commands and `moi <command> --help` before using an unfamiliar command or option.
@@ -174,7 +174,7 @@ use `moi theme --help` if its options change.
174
174
 
175
175
  Each workspace has an effective env: keys from the project's `.env` / `.env.local` (when
176
176
  inheritance is enabled in settings) plus **custom secrets** the user manages in the workspace env
177
- settings. moi injects this env into:
177
+ settings. Moi injects this env into:
178
178
 
179
179
  - applet server functions — read it as `process.env` inside `.server.ts`
180
180
  - any command run via `moi env exec -- <cmd>`
@@ -236,11 +236,11 @@ Write normal React + Tailwind — below is only what's **moi-specific**.
236
236
 
237
237
  ### Build environment
238
238
 
239
- - Bun is the required dependency of moi, so it must be installed
239
+ - Bun is the required dependency of Moi, so it must be installed
240
240
  - For package management **always** use bun
241
241
  - package.json is scaffolded during init. You are free to install/remove/do whatever with packages.
242
242
  - if packages aren't installed, it's your responsibility to call `bun install`
243
- - `react` and `react-dom` are stubs — they're provided by moi at runtime via the browser importmap.
243
+ - `react` and `react-dom` are stubs — they're provided by Moi at runtime via the browser importmap.
244
244
  They're listed only so editors pick up the correct types.
245
245
  - `moi bundle` runs **Bun's bundler**, so standard Bun imports, loaders, and tricks apply (JSON,
246
246
  text, etc.) — see the Bun docs. The moi-specific imports are covered below.
@@ -495,7 +495,7 @@ persistence concepts.
495
495
 
496
496
  ### Message context
497
497
 
498
- Each message sent through moi includes a hidden `<moi-context>` block with the active tab and,
498
+ Each message sent through Moi includes a hidden `<moi-context>` block with the active tab and,
499
499
  when relevant, params, applet source, and message-specific instructions. Use only the newest
500
500
  block; don’t reply to it or include it in summaries.
501
501
 
@@ -509,7 +509,7 @@ as user-provided task data.
509
509
 
510
510
  ## Keeping this skill current
511
511
 
512
- This skill is installed with moi (via the CLI or the UI) and can fall behind when the moi CLI updates.
512
+ This skill is installed with Moi (via the CLI or the UI) and can fall behind when the Moi CLI updates.
513
513
 
514
514
  - **You'll know** — `moi` commands warn you when this skill is behind.
515
515
  - **To update** — if the user asks for current or updated guidance, run `moi skill update` before
@@ -1,7 +1,7 @@
1
1
  # Collab
2
2
 
3
- moi workspaces can be shared with multiple users. Use `moi/collab` in views and widgets to
4
- show users and share cursors, focus, selections, and custom presence. moi supplies identity,
3
+ Moi workspaces can be shared with multiple users. Use `moi/collab` in views and widgets to
4
+ show users and share cursors, focus, selections, and custom presence. Moi supplies identity,
5
5
  workspace membership, and the connection. Import the API directly; no provider or socket
6
6
  setup is needed.
7
7
 
@@ -1,8 +1,8 @@
1
- # moi applet design
1
+ # Moi applet design
2
2
 
3
3
  Applets should feel useful, clear, and at home in the workspace. Let their content give them character while keeping familiar typography, colors, and interactions.
4
4
 
5
- This guide is the highest-priority visual contract for widgets and views inside a moi workspace.
5
+ This guide is the highest-priority visual contract for widgets and views inside a Moi workspace.
6
6
  Follow generic design guidance only where it agrees with this guide.
7
7
 
8
8
  ## Content and layout