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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (354) hide show
  1. package/README.md +26 -26
  2. package/bin/moi.mjs +2 -2
  3. package/client/AGENTS.md +7 -3
  4. package/client/api/app-config.ts +5 -10
  5. package/client/api/workspace-keys.ts +3 -2
  6. package/client/app/app-provider.tsx +25 -0
  7. package/client/app/{AppRouter.tsx → app-router.tsx} +4 -4
  8. package/client/app/routes/{HomeRoute.tsx → home-route.tsx} +2 -2
  9. package/client/app/routes/{WorkspaceRoute.tsx → workspace-route.tsx} +22 -23
  10. package/client/app/shell/{SidebarLayout.tsx → sidebar-layout.tsx} +29 -23
  11. package/client/dev/index.html +43 -0
  12. package/client/dev/index.ts +15 -0
  13. package/client/features/applets/api.ts +1 -1
  14. package/client/features/applets/{AppletContainer.tsx → applet-container.tsx} +1 -1
  15. package/client/features/applets/applet-thumbnail.ts +1 -1
  16. package/client/features/applets/{useApplet.ts → use-applet.ts} +2 -2
  17. package/client/features/applets/{WidgetShell.tsx → widget-shell.tsx} +4 -4
  18. package/client/features/chat/applet-chat-intents.ts +4 -4
  19. package/client/features/chat/{ChatPanel.tsx → chat-panel.tsx} +11 -11
  20. package/client/features/chat/{ChatPopup.tsx → chat-popup.tsx} +1 -1
  21. package/client/features/chat/composer/attachments/{DrawingAttachmentChip.tsx → drawing-attachment-chip.tsx} +1 -1
  22. package/client/features/chat/composer/attachments/{FileAttachmentChip.tsx → file-attachment-chip.tsx} +1 -1
  23. package/client/features/chat/composer/attachments/{TextAttachmentChip.tsx → text-attachment-chip.tsx} +1 -1
  24. package/client/features/chat/composer/banners/{ComposerBanner.tsx → composer-banner.tsx} +0 -14
  25. package/client/features/chat/composer/banners/{ErrorBanner.tsx → error-banner.tsx} +1 -1
  26. package/client/features/chat/composer/banners/{SkillUpdateBanner.tsx → skill-update-banner.tsx} +3 -3
  27. package/client/features/chat/composer/{ChatComposer.tsx → chat-composer.tsx} +8 -7
  28. package/client/features/chat/composer/{ModelPicker.tsx → model-picker.tsx} +1 -1
  29. package/client/features/chat/composer/{useWorkspaceComposerState.tsx → use-workspace-composer-state.tsx} +12 -28
  30. package/client/features/chat/composer/{useWorkspaceSkillUpdates.ts → use-workspace-skill-updates.ts} +1 -1
  31. package/client/features/chat/connection/chat-frames.ts +3 -3
  32. package/client/features/chat/messages/{ChatEmptyState.tsx → chat-empty-state.tsx} +4 -4
  33. package/client/features/chat/messages/{MarkdownContent.tsx → markdown-content.tsx} +1 -1
  34. package/client/features/chat/messages/tool-group/index.ts +1 -1
  35. package/client/features/chat/messages/tool-group/{ReadImagePreview.tsx → read-image-preview.tsx} +2 -2
  36. package/client/features/chat/messages/tool-group/{SubagentCard.tsx → subagent-card.tsx} +3 -3
  37. package/client/features/chat/messages/tool-group/{TimelineRow.tsx → timeline-row.tsx} +1 -1
  38. package/client/features/chat/messages/tool-group/{ToolCallGroup.tsx → tool-call-group.tsx} +8 -8
  39. package/client/features/chat/messages/tool-group/{ToolOutput.tsx → tool-output.tsx} +1 -1
  40. package/client/features/chat/messages/{TurnView.tsx → turn-view.tsx} +4 -4
  41. package/client/features/chat/sessions/api.ts +3 -3
  42. package/client/features/chat/sessions/{ChatSelector.tsx → chat-selector.tsx} +2 -2
  43. package/client/features/chat/sessions/{useSelectedSession.ts → use-selected-session.ts} +2 -2
  44. package/client/features/chat/{useChat.ts → use-chat.ts} +4 -4
  45. package/client/features/collab/host-state.ts +24 -7
  46. package/client/features/collab/local-user.ts +1 -1
  47. package/client/features/collab/proxy-user.ts +4 -9
  48. package/client/features/connectors/mcp-icons.ts +1 -1
  49. package/client/features/connectors/{McpServerCards.tsx → mcp-server-cards.tsx} +1 -1
  50. package/client/features/{home/workspace-setup/DemoDialog.tsx → demo/demo-dialog.tsx} +26 -80
  51. package/client/features/dev/chat-states-fixtures.ts +4 -4
  52. package/client/features/dev/{ChatStatesPage.tsx → chat-states-page.tsx} +6 -6
  53. package/client/features/dev/collab/local-user-settings.tsx +4 -4
  54. package/client/features/dev/{DevIndexPage.tsx → dev-index-page.tsx} +7 -1
  55. package/client/features/dev/{DevRoutes.tsx → dev-routes.tsx} +8 -6
  56. package/client/features/dev/workspace-setup-mocks.ts +102 -0
  57. package/client/features/dev/workspace-setup-page.tsx +11 -0
  58. package/client/features/dev/workspace-setup-preview.tsx +253 -0
  59. package/client/features/drawings/{DrawingToolbar.tsx → drawing-toolbar.tsx} +1 -1
  60. package/client/features/drawings/{useChatAnnotation.ts → use-chat-annotation.ts} +29 -23
  61. package/client/features/drawings/{useDrawingLayer.ts → use-drawing-layer.ts} +1 -1
  62. package/client/features/drawings/{useViewSketch.ts → use-view-sketch.ts} +1 -1
  63. package/client/features/harness/api.ts +36 -0
  64. package/client/features/harness/device-login-steps.tsx +97 -0
  65. package/client/features/home/api.ts +29 -89
  66. package/client/features/home/{HomeLogo.tsx → home-logo.tsx} +1 -1
  67. package/client/features/home/{HomePage.tsx → home-page.tsx} +13 -14
  68. package/client/features/overview/api.ts +2 -2
  69. package/client/features/overview/default/registry.tsx +1 -1
  70. package/client/features/overview/default/{ViewsWidget.tsx → views-widget.tsx} +1 -1
  71. package/client/features/overview/{HiddenPanel.tsx → hidden-panel.tsx} +2 -2
  72. package/client/features/overview/{Overview.tsx → overview.tsx} +6 -6
  73. package/client/features/overview/{WidgetCanvas.tsx → widget-canvas.tsx} +1 -1
  74. package/client/features/overview/{WidgetFrame.tsx → widget-frame.tsx} +1 -1
  75. package/client/features/overview/workspace-name.tsx +55 -0
  76. package/client/features/scratchpad/{Scratchpad.tsx → scratchpad.tsx} +10 -13
  77. package/client/features/scratchpad/{useScratchpadSnapshot.tsx → use-scratchpad-snapshot.tsx} +3 -3
  78. package/client/features/settings/api.ts +15 -9
  79. package/client/features/settings/{ConnectorsSettings.tsx → connectors-settings.tsx} +3 -3
  80. package/client/features/settings/{EnvironmentSettings.tsx → environment-settings.tsx} +3 -3
  81. package/client/features/settings/{GeneralSettings.tsx → general-settings.tsx} +5 -5
  82. package/client/features/settings/{useEnvVars.ts → use-env-vars.ts} +1 -1
  83. package/client/features/settings/{WorkspaceIconPicker.tsx → workspace-icon-picker.tsx} +1 -1
  84. package/client/features/settings/{WorkspaceSettingsDialog.tsx → workspace-settings-dialog.tsx} +3 -3
  85. package/client/features/update/api.ts +1 -1
  86. package/client/features/views/api.ts +1 -1
  87. package/client/features/views/{PendingViewScreen.tsx → pending-view-screen.tsx} +7 -4
  88. package/client/features/views/{useViewActions.ts → use-view-actions.ts} +2 -2
  89. package/client/features/views/{useViewDrafts.ts → use-view-drafts.ts} +15 -6
  90. package/client/features/views/{ViewManager.tsx → view-manager.tsx} +3 -3
  91. package/client/features/views/view-submission.ts +1 -1
  92. package/client/features/workspace/add/api.ts +80 -0
  93. package/client/features/{home/workspace-setup/CreateWorkspaceDialog.tsx → workspace/add/create-workspace-dialog.tsx} +56 -42
  94. package/client/features/workspace/add/import-workspace-dialog.tsx +81 -0
  95. package/client/features/{home/workspace-setup/useWorkspaceImport.ts → workspace/add/use-workspace-import.ts} +1 -1
  96. package/client/features/workspace/add/workspace-agent-options.ts +53 -0
  97. package/client/features/{home/workspace-setup/WorkspaceAgentStep.tsx → workspace/add/workspace-agent-selector.tsx} +59 -98
  98. package/client/features/{home/workspace-setup/WorkspaceDialogContent.tsx → workspace/add/workspace-dialog-content.tsx} +1 -1
  99. package/client/features/workspace/api.ts +31 -26
  100. package/client/features/workspace/browser-tab-state.ts +1 -1
  101. package/client/features/workspace/moi-context.ts +1 -1
  102. package/client/features/workspace/setup/workspace-login-state.tsx +175 -0
  103. package/client/features/workspace/setup/workspace-recovery-states.tsx +125 -0
  104. package/client/features/workspace/setup/workspace-setup-panel.tsx +18 -0
  105. package/client/features/workspace/setup/workspace-setup.tsx +78 -0
  106. package/client/features/workspace/setup/workspace-welcome-state.tsx +81 -0
  107. package/client/features/workspace/{ThemePanel.tsx → theme-panel.tsx} +3 -3
  108. package/client/features/workspace/{useWorkspaceNavigation.ts → use-workspace-navigation.ts} +2 -2
  109. package/client/features/workspace/{WorkspaceScreen.tsx → workspace-content.tsx} +37 -80
  110. package/client/features/workspace/workspace-frame.tsx +76 -0
  111. package/client/features/workspace/workspace-identity.tsx +40 -0
  112. package/client/features/workspace/{WorkspaceLayoutContext.tsx → workspace-layout-context.tsx} +2 -0
  113. package/client/features/workspace/{WorkspaceMenu.tsx → workspace-menu.tsx} +3 -3
  114. package/client/features/workspace/workspace-pending-screen.tsx +26 -0
  115. package/client/features/{home → workspace}/workspace-presentation.tsx +10 -3
  116. package/client/features/workspace/workspace-screen.tsx +28 -0
  117. package/client/features/workspace/{WorkspaceSplitLayout.tsx → workspace-split-layout.tsx} +1 -1
  118. package/client/features/workspace/{WorkspaceTabs.tsx → workspace-tabs.tsx} +2 -2
  119. package/client/index.css +2 -2
  120. package/client/index.html +29 -10
  121. package/client/index.tsx +7 -2
  122. package/client/lib/agent-availability.ts +0 -5
  123. package/client/lib/browser-tab-id.ts +4 -0
  124. package/client/main.tsx +10 -7
  125. package/client/runtime/app-context.ts +20 -0
  126. package/client/runtime/use-workspace-events.ts +56 -0
  127. package/client/runtime/workspace-events.ts +151 -0
  128. package/dist/chunk-00rh9df4.js +2 -0
  129. package/dist/chunk-4nh7y1hq.css +1 -0
  130. package/dist/{chunk-vqpkqtdr.js → chunk-am4agx6v.js} +1 -1
  131. package/dist/{chunk-gps4qc38.js → chunk-d7cbm65e.js} +1 -1
  132. package/dist/chunk-hbpdv7vd.js +1 -0
  133. package/dist/chunk-hmka9rt5.js +2 -0
  134. package/dist/{chunk-j905va8r.js → chunk-hvh9f5h0.js} +1 -1
  135. package/dist/chunk-mjjregkn.js +10 -0
  136. package/dist/chunk-rt30jbcm.js +1 -0
  137. package/dist/chunk-vt6zybej.js +2 -0
  138. package/dist/chunk-wbkwf6cc.js +68 -0
  139. package/dist/chunk-xjyfyz64.js +1 -0
  140. package/dist/{chunk-hzwr8dp8.js → chunk-y8nbwp21.js} +71 -71
  141. package/dist/chunk-ysfdcew7.js +1 -0
  142. package/dist/index.html +30 -11
  143. package/lib/format.ts +1 -1
  144. package/lib/harness-instructions.ts +30 -0
  145. package/lib/ids.ts +3 -3
  146. package/lib/moi-context.ts +2 -2
  147. package/lib/scratchpad-skew.ts +3 -3
  148. package/lib/types.ts +28 -20
  149. package/lib/update.ts +1 -1
  150. package/package.json +5 -2
  151. package/server/AGENTS.md +10 -4
  152. package/server/README.md +102 -0
  153. package/server/api/harnesses.ts +56 -0
  154. package/server/{api.ts → api/index.ts} +125 -118
  155. package/server/app-config.ts +24 -12
  156. package/server/app-settings.ts +1 -1
  157. package/server/applets/applet-css.ts +1 -1
  158. package/server/applets/build-applet.ts +4 -4
  159. package/server/applets/build-worker.ts +1 -1
  160. package/server/applets/config.ts +1 -1
  161. package/server/{functions-worker.ts → applets/functions-worker.ts} +1 -1
  162. package/server/{functions.ts → applets/functions.ts} +2 -2
  163. package/server/applets/index.ts +2 -2
  164. package/server/{thumbnails.ts → applets/thumbnails.ts} +9 -6
  165. package/server/{applet-typecheck.ts → applets/typecheck.ts} +4 -4
  166. package/server/{ui-components.ts → applets/ui-components.ts} +2 -2
  167. package/server/{views.ts → applets/views.ts} +7 -7
  168. package/server/{widgets.ts → applets/widgets.ts} +2 -2
  169. package/server/cli/applet-selector.ts +19 -0
  170. package/server/cli/args.ts +5 -0
  171. package/server/{cli-colors.ts → cli/colors.ts} +1 -1
  172. package/server/cli/commands/bundle.ts +119 -0
  173. package/server/cli/commands/call-server-fn.ts +42 -0
  174. package/server/cli/commands/check.ts +53 -0
  175. package/server/cli/commands/config.ts +132 -0
  176. package/server/cli/commands/debug.ts +119 -0
  177. package/server/cli/commands/env.ts +162 -0
  178. package/server/cli/commands/hermes.ts +149 -0
  179. package/server/cli/commands/init.ts +286 -0
  180. package/server/cli/commands/navigate.ts +35 -0
  181. package/server/cli/commands/openclaw.ts +168 -0
  182. package/server/cli/commands/refresh.ts +39 -0
  183. package/server/cli/commands/scratch.ts +496 -0
  184. package/server/cli/commands/service.ts +298 -0
  185. package/server/cli/commands/skill.ts +122 -0
  186. package/server/cli/commands/start.ts +138 -0
  187. package/server/cli/commands/status.ts +80 -0
  188. package/server/cli/commands/tabs.ts +43 -0
  189. package/server/cli/commands/theme.ts +192 -0
  190. package/server/cli/commands/ui-components.ts +15 -0
  191. package/server/cli/commands/update.ts +192 -0
  192. package/server/cli/commands/version.ts +9 -0
  193. package/server/cli/commands/views.ts +87 -0
  194. package/server/cli/control.ts +89 -0
  195. package/server/{cli-env.ts → cli/env.ts} +9 -9
  196. package/server/cli/index.ts +171 -0
  197. package/server/{cli-pc.ts → cli/pc.ts} +1 -1
  198. package/server/cli/provider.ts +25 -0
  199. package/server/cli/server-version.ts +16 -0
  200. package/server/cli/server.ts +81 -0
  201. package/server/{cli-ui-components.ts → cli/ui-components.ts} +5 -5
  202. package/server/cli.ts +2 -3252
  203. package/server/collab/manager.ts +3 -3
  204. package/server/collab/skill/index.ts +2 -2
  205. package/server/control.ts +20 -20
  206. package/server/harness/README.md +47 -25
  207. package/server/harness/acp/NOTES.md +11 -11
  208. package/server/harness/acp/archived.ts +3 -3
  209. package/server/harness/acp/client.ts +2 -2
  210. package/server/harness/acp/run-durations.ts +1 -1
  211. package/server/harness/acp/session.ts +5 -5
  212. package/server/harness/auth.ts +303 -0
  213. package/server/harness/claude-code/NOTES.md +9 -7
  214. package/server/harness/claude-code/auth.ts +125 -17
  215. package/server/harness/claude-code/index.ts +2 -1
  216. package/server/harness/claude-code/mcp.ts +1 -1
  217. package/server/harness/claude-code/session.ts +10 -7
  218. package/server/harness/codex/NOTES.md +12 -12
  219. package/server/harness/codex/auth.ts +86 -19
  220. package/server/harness/codex/client.ts +17 -13
  221. package/server/harness/codex/index.ts +2 -1
  222. package/server/harness/codex/permissions.ts +3 -3
  223. package/server/harness/codex/probe.ts +3 -5
  224. package/server/harness/codex/session.ts +16 -13
  225. package/server/harness/codex/thread-list.ts +4 -0
  226. package/server/harness/codex/transport.ts +5 -5
  227. package/server/harness/executable.ts +42 -18
  228. package/server/harness/hermes/NOTES.md +70 -70
  229. package/server/harness/hermes/discovery.ts +1 -1
  230. package/server/harness/openclaw/NOTES.md +24 -24
  231. package/server/harness/openclaw/adapter.ts +1 -1
  232. package/server/harness/openclaw/compat.ts +1 -1
  233. package/server/harness/openclaw/session.ts +5 -2
  234. package/server/harness/registry.ts +1 -1
  235. package/server/harness/shell-path.ts +31 -21
  236. package/server/harness/types.ts +9 -2
  237. package/server/navigation-relay.ts +1 -1
  238. package/server/open-browser.ts +7 -0
  239. package/server/{scratchpad-assets.ts → scratchpad/assets.ts} +4 -4
  240. package/server/{scratchpad.ts → scratchpad/document.ts} +8 -8
  241. package/server/{scratchpad-executor.ts → scratchpad/executor.ts} +7 -7
  242. package/server/{scratchpad-relay.ts → scratchpad/relay.ts} +4 -5
  243. package/server/{scratchpad-shape-defaults.ts → scratchpad/shape-defaults.ts} +2 -2
  244. package/server/server-cwd.ts +1 -1
  245. package/server/service.ts +2 -2
  246. package/server/{session-archive.ts → sessions/archive.ts} +5 -5
  247. package/server/{attachment-message.ts → sessions/attachment-message.ts} +1 -1
  248. package/server/{session-config.ts → sessions/config.ts} +1 -1
  249. package/server/{session-lifecycle.ts → sessions/lifecycle.ts} +3 -3
  250. package/server/{pending-views.ts → sessions/pending-views.ts} +3 -3
  251. package/server/{selected-session.ts → sessions/selected.ts} +1 -1
  252. package/server/{session-store.ts → sessions/store.ts} +1 -1
  253. package/server/{view-sessions.ts → sessions/view-sessions.ts} +9 -9
  254. package/server/{skills-template.ts → skills/template.ts} +1 -1
  255. package/server/{skill-update.ts → skills/update.ts} +5 -5
  256. package/server/{skill-version.ts → skills/version.ts} +4 -4
  257. package/server/static.ts +5 -3
  258. package/server/status.ts +3 -3
  259. package/server/vendor.ts +23 -30
  260. package/server/web.ts +17 -9
  261. package/server/{env-apply.ts → workspaces/env-apply.ts} +5 -5
  262. package/server/{workspace-env.ts → workspaces/env.ts} +3 -3
  263. package/server/{workspace-import.ts → workspaces/import.ts} +4 -4
  264. package/server/{workspace-init.ts → workspaces/init.ts} +5 -5
  265. package/server/{layout.ts → workspaces/layout.ts} +13 -8
  266. package/server/{preview.ts → workspaces/preview.ts} +1 -1
  267. package/server/{registry.ts → workspaces/registry.ts} +3 -3
  268. package/server/{required-env.ts → workspaces/required-env.ts} +3 -3
  269. package/server/{moi-scaffold.ts → workspaces/scaffold.ts} +3 -3
  270. package/ui-components/button.tsx +1 -1
  271. package/ui-components/docs/attachment.md +2 -2
  272. package/ui-components/docs/button.md +1 -1
  273. package/ui-components/docs/calendar.md +1 -1
  274. package/ui-components/docs/chart.md +4 -4
  275. package/ui-components/docs/data-table.md +1 -1
  276. package/ui-components/docs/drawer.md +1 -1
  277. package/ui-components/docs/field.md +1 -1
  278. package/ui-components/docs/input.md +2 -2
  279. package/ui-components/docs/label.md +2 -2
  280. package/ui-components/docs/table.md +2 -2
  281. package/workspace/.claude/skills/moi-workspace/SKILL.md +12 -12
  282. package/workspace/.claude/skills/moi-workspace/references/COLLAB.md +2 -2
  283. package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +2 -2
  284. package/workspace/.claude/skills/moi-workspace/references/INTENTS.md +2 -2
  285. package/client/features/chat/composer/banners/AgentAvailabilityBanner.tsx +0 -101
  286. package/client/features/home/workspace-setup/ImportWorkspaceDialog.tsx +0 -92
  287. package/client/features/overview/WorkspaceName.tsx +0 -60
  288. package/client/runtime/useWorkspaceEvents.ts +0 -189
  289. package/dist/chunk-1zhnhy00.js +0 -1
  290. package/dist/chunk-27501vke.js +0 -1
  291. package/dist/chunk-9xtv6djt.js +0 -2
  292. package/dist/chunk-am1x230f.js +0 -2
  293. package/dist/chunk-darpsw65.js +0 -1
  294. package/dist/chunk-n33w9y38.js +0 -10
  295. package/dist/chunk-r63ks44z.js +0 -68
  296. package/dist/chunk-wd46nk26.css +0 -1
  297. package/dist/chunk-xgt7vxt9.js +0 -1
  298. package/dist/chunk-yvzhwtfa.js +0 -2
  299. package/server/agent.ts +0 -223
  300. /package/client/components/shared/{AgentBlobatar.tsx → agent-blobatar.tsx} +0 -0
  301. /package/client/components/shared/{BottomPanel.tsx → bottom-panel.tsx} +0 -0
  302. /package/client/components/shared/{Composer.tsx → composer.tsx} +0 -0
  303. /package/client/components/shared/{LedLogo.tsx → led-logo.tsx} +0 -0
  304. /package/client/components/shared/{PanelHeader.tsx → panel-header.tsx} +0 -0
  305. /package/client/components/shared/{ReorderableList.tsx → reorderable-list.tsx} +0 -0
  306. /package/client/components/shared/{WorkspaceIcon.tsx → workspace-icon.tsx} +0 -0
  307. /package/client/features/applets/{WidgetErrorBoundary.tsx → widget-error-boundary.tsx} +0 -0
  308. /package/client/features/chat/composer/attachments/{AttachmentChip.tsx → attachment-chip.tsx} +0 -0
  309. /package/client/features/chat/messages/{ChatPromptBubbles.tsx → chat-prompt-bubbles.tsx} +0 -0
  310. /package/client/features/chat/messages/{ShimmerText.tsx → shimmer-text.tsx} +0 -0
  311. /package/client/features/chat/messages/tool-group/{CodeBlock.tsx → code-block.tsx} +0 -0
  312. /package/client/features/chat/messages/tool-group/{Collapse.tsx → collapse.tsx} +0 -0
  313. /package/client/features/chat/messages/{useStickToBottom.ts → use-stick-to-bottom.ts} +0 -0
  314. /package/client/features/connectors/{IconMcp.tsx → icon-mcp.tsx} +0 -0
  315. /package/client/features/dev/{BlobatarShapesPage.tsx → blobatar-shapes-page.tsx} +0 -0
  316. /package/client/features/dev/{HarnessDebugPage.tsx → harness-debug-page.tsx} +0 -0
  317. /package/client/features/dev/{TextureLabPage.tsx → texture-lab-page.tsx} +0 -0
  318. /package/client/features/dev/{ToolCallsPage.tsx → tool-calls-page.tsx} +0 -0
  319. /package/client/features/drawings/{DrawingLayer.tsx → drawing-layer.tsx} +0 -0
  320. /package/client/features/home/{WorkspacePreview.tsx → workspace-preview.tsx} +0 -0
  321. /package/client/features/overview/{useGridReconcile.ts → use-grid-reconcile.ts} +0 -0
  322. /package/client/features/scratchpad/{ScratchpadControls.tsx → scratchpad-controls.tsx} +0 -0
  323. /package/client/features/settings/{SettingsLayout.tsx → settings-layout.tsx} +0 -0
  324. /package/client/features/update/{UpdateControl.tsx → update-control.tsx} +0 -0
  325. /package/client/features/workspace/{UnavailablePage.tsx → unavailable-page.tsx} +0 -0
  326. /package/client/features/workspace/{useFitsSplitLayout.ts → use-fits-split-layout.ts} +0 -0
  327. /package/client/features/workspace/{WorkspaceContext.tsx → workspace-context.tsx} +0 -0
  328. /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-dom-client.js +0 -0
  329. /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-dom.js +0 -0
  330. /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-jsx-dev-runtime.js +0 -0
  331. /package/client/vendor/react/{development → 19.2.4/development}/_impl/react-jsx-runtime.js +0 -0
  332. /package/client/vendor/react/{development → 19.2.4/development}/_impl/react.js +0 -0
  333. /package/client/vendor/react/{development → 19.2.4/development}/react-dom-client.js +0 -0
  334. /package/client/vendor/react/{development → 19.2.4/development}/react-dom.js +0 -0
  335. /package/client/vendor/react/{development → 19.2.4/development}/react-jsx-dev-runtime.js +0 -0
  336. /package/client/vendor/react/{development → 19.2.4/development}/react-jsx-runtime.js +0 -0
  337. /package/client/vendor/react/{development → 19.2.4/development}/react.js +0 -0
  338. /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-dom-client.js +0 -0
  339. /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-dom.js +0 -0
  340. /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-jsx-dev-runtime.js +0 -0
  341. /package/client/vendor/react/{production → 19.2.4/production}/_impl/react-jsx-runtime.js +0 -0
  342. /package/client/vendor/react/{production → 19.2.4/production}/_impl/react.js +0 -0
  343. /package/client/vendor/react/{production → 19.2.4/production}/react-dom-client.js +0 -0
  344. /package/client/vendor/react/{production → 19.2.4/production}/react-dom.js +0 -0
  345. /package/client/vendor/react/{production → 19.2.4/production}/react-jsx-dev-runtime.js +0 -0
  346. /package/client/vendor/react/{production → 19.2.4/production}/react-jsx-runtime.js +0 -0
  347. /package/client/vendor/react/{production → 19.2.4/production}/react.js +0 -0
  348. /package/server/{bundle-queue.ts → applets/bundle-queue.ts} +0 -0
  349. /package/server/{applet-log.ts → applets/log.ts} +0 -0
  350. /package/server/{cli-ui.ts → cli/ui.ts} +0 -0
  351. /package/server/{workspace-config.ts → workspaces/config.ts} +0 -0
  352. /package/server/{icon.ts → workspaces/icon.ts} +0 -0
  353. /package/server/{tabs.ts → workspaces/tabs.ts} +0 -0
  354. /package/server/{theme.ts → workspaces/theme.ts} +0 -0
@@ -1,10 +1,12 @@
1
1
  import { accessSync, constants, statSync } from 'node:fs'
2
+ import { delimiter, join, resolve } from 'node:path'
2
3
 
3
- import type { HarnessAvailability, WorkspaceType } from '@/lib/types'
4
+ import { harnessInstructionMessage } from '@/lib/harness-instructions'
5
+ import type { HarnessAvailability, HarnessInstallations, WorkspaceType } from '@/lib/types'
4
6
 
5
7
  import { cachedLoginShellPath, loginShellPath, mergeSearchPaths } from './shell-path'
6
8
 
7
- type PathWorkspaceType = Extract<WorkspaceType, 'claude-code' | 'codex' | 'hermes'>
9
+ const MOI_BIN_DIR = join(import.meta.dir, '..', '..', 'node_modules', '.bin')
8
10
 
9
11
  type ExecutableConfig = {
10
12
  command: string
@@ -14,11 +16,10 @@ type ExecutableConfig = {
14
16
  fallbackPaths?: readonly string[]
15
17
  }
16
18
 
17
- const executableConfig: Record<PathWorkspaceType, ExecutableConfig> = {
19
+ const executableConfig: Record<WorkspaceType, ExecutableConfig> = {
18
20
  'claude-code': {
19
21
  command: 'claude',
20
- unavailableReason:
21
- 'Run curl -fsSL https://claude.ai/install.sh | sh in your terminal to install Claude'
22
+ unavailableReason: harnessInstructionMessage('claude-code')
22
23
  },
23
24
  codex: {
24
25
  command: 'codex',
@@ -29,8 +30,11 @@ const executableConfig: Record<PathWorkspaceType, ExecutableConfig> = {
29
30
  '/Applications/ChatGPT.app/Contents/Resources/codex',
30
31
  '/Applications/Codex.app/Contents/Resources/codex'
31
32
  ],
32
- unavailableReason:
33
- 'Run curl -fsSL https://chatgpt.com/codex/install.sh | sh in your terminal to install Codex'
33
+ unavailableReason: harnessInstructionMessage('codex')
34
+ },
35
+ openclaw: {
36
+ command: 'openclaw',
37
+ unavailableReason: 'OpenClaw is not installed'
34
38
  },
35
39
  hermes: {
36
40
  command: 'hermes',
@@ -44,7 +48,7 @@ const executableConfig: Record<PathWorkspaceType, ExecutableConfig> = {
44
48
  '/usr/local/lib/hermes-agent/venv/bin/hermes'
45
49
  ],
46
50
  unavailableReason:
47
- 'Run curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash in your terminal to install Hermes'
51
+ 'Run in terminal to install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash'
48
52
  }
49
53
  }
50
54
 
@@ -67,24 +71,27 @@ export function firstExecutable(paths: readonly string[]): string | null {
67
71
 
68
72
  // `path` is a test seam: when given, only that PATH is searched — no
69
73
  // login-shell merge, no bundle fallbacks.
70
- export function findHarnessExecutable(type: PathWorkspaceType, path?: string): string | null {
74
+ export function findHarnessExecutable(type: WorkspaceType, path?: string): string | null {
71
75
  const config = executableConfig[type]
72
- if (path !== undefined) return Bun.which(config.command, { PATH: path })
73
- return (
74
- Bun.which(config.command, {
75
- PATH: mergeSearchPaths(cachedLoginShellPath(), process.env.PATH)
76
- }) ?? firstExecutable(config.fallbackPaths ?? [])
77
- )
76
+ // bun run adds our dependency commands to PATH; those are not user installs.
77
+ const searchPath = (path ?? mergeSearchPaths(cachedLoginShellPath(), process.env.PATH))
78
+ .split(delimiter)
79
+ .filter(directory => directory && resolve(directory) !== MOI_BIN_DIR)
80
+ .join(delimiter)
81
+ const executable = Bun.which(config.command, { PATH: searchPath })
82
+ return path !== undefined
83
+ ? executable
84
+ : (executable ?? firstExecutable(config.fallbackPaths ?? []))
78
85
  }
79
86
 
80
- export function requireHarnessExecutable(type: PathWorkspaceType, path?: string): string {
87
+ export function requireHarnessExecutable(type: WorkspaceType, path?: string): string {
81
88
  const executable = findHarnessExecutable(type, path)
82
89
  if (!executable) throw new Error(executableConfig[type].unavailableReason)
83
90
  return executable
84
91
  }
85
92
 
86
93
  export async function pathHarnessAvailability(
87
- type: PathWorkspaceType,
94
+ type: WorkspaceType,
88
95
  path?: string
89
96
  ): Promise<HarnessAvailability> {
90
97
  // Availability is asked per request (and long after startup), but await the
@@ -92,5 +99,22 @@ export async function pathHarnessAvailability(
92
99
  if (path === undefined) await loginShellPath()
93
100
  return findHarnessExecutable(type, path)
94
101
  ? { status: 'available' }
95
- : { status: 'unavailable', reason: executableConfig[type].unavailableReason }
102
+ : {
103
+ status: 'unavailable',
104
+ code: 'not-installed',
105
+ reason: executableConfig[type].unavailableReason
106
+ }
107
+ }
108
+
109
+ // Setup needs installation facts independently of auth, profiles, or gateway
110
+ // connectivity. Refresh the shell PATH to pick up installations made since
111
+ // the server started. A supplied PATH keeps tests independent of the host.
112
+ export async function detectInstalledHarnesses(path?: string): Promise<HarnessInstallations> {
113
+ if (path === undefined) await loginShellPath({ refresh: true })
114
+ return {
115
+ 'claude-code': Boolean(findHarnessExecutable('claude-code', path)),
116
+ codex: Boolean(findHarnessExecutable('codex', path)),
117
+ openclaw: Boolean(findHarnessExecutable('openclaw', path)),
118
+ hermes: Boolean(findHarnessExecutable('hermes', path))
119
+ }
96
120
  }
@@ -1,6 +1,6 @@
1
1
  # Hermes Agent — integration research
2
2
 
3
- Protocol notes behind moi's Hermes harness. The adapter **shipped** on the ACP
3
+ Protocol notes behind Moi's Hermes harness. The adapter **shipped** on the ACP
4
4
  path recommended below: the protocol lives in `../acp/` (provider-agnostic) and
5
5
  this folder holds only Hermes specifics — see §11 for what the implementation
6
6
  confirmed and corrected. Everything here was probed empirically against Hermes
@@ -9,12 +9,12 @@ confirmed and corrected. Everything here was probed empirically against Hermes
9
9
  `bun scripts/probe-hermes-acp.ts` (see §10).
10
10
 
11
11
  **Verdict up front:** Hermes speaks **ACP** (Agent Client Protocol) over
12
- stdio JSON-RPC, and ACP maps onto moi's `Harness` contract more cleanly than
12
+ stdio JSON-RPC, and ACP maps onto Moi's `Harness` contract more cleanly than
13
13
  either OpenClaw or Codex did. The adapter is a normal harness-sized job — a
14
- 12/13-passing end-to-end run of the full moi flow is in §9. Real streaming,
14
+ 12/13-passing end-to-end run of the full Moi flow is in §9. Real streaming,
15
15
  vision, MCP, env injection and multi-agent profiles all work (§3.7–§4).
16
16
 
17
- What actually needs care: Hermes is **user-global by default** where moi is
17
+ What actually needs care: Hermes is **user-global by default** where Moi is
18
18
  workspace-scoped (§5), it also ships a much richer **native gateway** whose
19
19
  features ACP does not expose (§6), and two live-stream bugs need client-side
20
20
  workarounds — file-tool completions are dropped (§3.4) and `set_model` silently
@@ -39,17 +39,17 @@ Scope is much wider than a coding CLI: ~70 tools across ~28 toolsets, a
39
39
  messaging gateway with 25+ platform adapters (Telegram/Discord/Slack/Signal/…),
40
40
  cron, a kanban board, voice mode, a skills marketplace, and 7 terminal
41
41
  backends (local, docker, ssh, modal, daytona, singularity, vercel sandbox).
42
- For moi, nearly all of that is out of scope — moi wants the agent loop and the
42
+ For Moi, nearly all of that is out of scope — Moi wants the agent loop and the
43
43
  ACP surface, not the gateway.
44
44
 
45
45
  Entry points sharing one `AIAgent` core:
46
46
 
47
- | Surface | Command | Shape | Fit for moi |
47
+ | Surface | Command | Shape | Fit for Moi |
48
48
  | -------------- | --------------------- | ------------------------------------------- | ------------------------------------------- |
49
49
  | CLI | `hermes`, `hermes -z` | interactive TUI / one-shot | one-shot is scriptable, but no event stream |
50
50
  | **ACP** | **`hermes acp`** | **stdio JSON-RPC, one process, N sessions** | **✅ this is the one** |
51
51
  | Backend server | `hermes serve` | HTTP + WebSocket JSON-RPC, port 9119 | ❌ machine-level singleton (§4) |
52
- | Gateway | `hermes gateway run` | long-running messaging daemon | ❌ not moi's model |
52
+ | Gateway | `hermes gateway run` | long-running messaging daemon | ❌ not Moi's model |
53
53
 
54
54
  ## 2. Provider configuration (and two traps)
55
55
 
@@ -109,14 +109,14 @@ stdout is reserved for JSON-RPC; logs go to stderr.
109
109
  }
110
110
  ```
111
111
 
112
- `authMethods` is directly usable by moi's `availability()` / `startLogin()`
112
+ `authMethods` is directly usable by Moi's `availability()` / `startLogin()`
113
113
  recovery loop — note `hermes-setup` is `type: terminal`, i.e. it wants a TTY,
114
114
  not a browser OAuth URL like Codex.
115
115
 
116
116
  ### 3.2 Sessions
117
117
 
118
118
  `session/new { cwd, mcpServers }` → `{ sessionId, models, modes, _meta }`.
119
- Two things moi's other backends make you fetch separately arrive **inline**:
119
+ Two things Moi's other backends make you fetch separately arrive **inline**:
120
120
 
121
121
  - `models.availableModels` — 52 entries in the probe, merged across every
122
122
  configured provider (`openai-api:gpt-5.4-mini`, `custom:kimi-k2.7-code`, …),
@@ -146,7 +146,7 @@ namespace. Not worth it.
146
146
  Three consequences, all handled in `./models.ts`:
147
147
 
148
148
  - **`description` is the provider, not a blurb** — the same string for all 34
149
- models behind it, with a ` • current` suffix on `currentModelId`'s row. moi's
149
+ models behind it, with a ` • current` suffix on `currentModelId`'s row. Moi's
150
150
  picker labels rows from the description headline, so passed through as-is it
151
151
  renders dozens of identical rows. It becomes the group heading instead.
152
152
  - **`name` repeats the provider — but not always.** Most rows are
@@ -155,9 +155,9 @@ Three consequences, all handled in `./models.ts`:
155
155
  `description` and only stripped off `name` when it is actually there.
156
156
  - **Configured providers are listed twice**, under `<provider>:<model>` and
157
157
  again `custom:<provider>:<model>`, same endpoint and model. Both ids work;
158
- moi keeps the first and drops the duplicate label.
158
+ Moi keeps the first and drops the duplicate label.
159
159
 
160
- moi also records `providerId` (`nous`, `xai-oauth`, `ollama-launch`) alongside
160
+ Moi also records `providerId` (`nous`, `xai-oauth`, `ollama-launch`) alongside
161
161
  the display heading, because the heading is Hermes-authored prose and the id is
162
162
  not — anything that needs to pin, order or persist a provider should key on the
163
163
  id. It is recovered by peeling the model label off the end of `modelId`, not by
@@ -168,17 +168,17 @@ and `custom:` occupies the first slot as a namespace (`custom:ollama-launch:…`
168
168
 
169
169
  `_meta.hermes.sessionProvenance` carries `rootHermesSessionId`,
170
170
  `parentHermesSessionId`, `sessionKind` and `compressionDepth` — session
171
- lineage across compaction, which moi has no concept of today.
171
+ lineage across compaction, which Moi has no concept of today.
172
172
 
173
173
  `session/list` returns `{ sessionId, title, cwd, updatedAt }[]` — including a
174
174
  **model-generated title** (e.g. "Create hello.txt and read back text").
175
- `cwd` on every record means moi filters by workspace path exactly the way the
175
+ `cwd` on every record means Moi filters by workspace path exactly the way the
176
176
  Codex harness filters `thread/list`. This covers `listSessions()` and
177
177
  `workspacePreview()`.
178
178
 
179
179
  Session state is one **global** SQLite DB at `$HERMES_HOME/state.db` (20
180
180
  tables, FTS5 trigram index over messages). The `sessions` table is richer than
181
- what moi's current backends expose — it already carries `cwd`, `git_branch`,
181
+ what Moi's current backends expose — it already carries `cwd`, `git_branch`,
182
182
  `git_repo_root`, `parent_session_id`, per-session token counts and
183
183
  `estimated_cost_usd`/`actual_cost_usd`.
184
184
 
@@ -193,11 +193,11 @@ Verified against v0.20.0 (`xai-oauth:grok-build-0.1`, 67 raw rows).
193
193
 
194
194
  The catalog only ever arrives on `session/new`, and every such call persists a
195
195
  zero-message row in `state.db` that `hermes sessions list` shows as a blank
196
- entry (moi's own list hides them). So the state is cached per workspace
196
+ entry (Moi's own list hides them). So the state is cached per workspace
197
197
  (`../acp/model-state.ts`): the first picker snapshot opens one throwaway
198
198
  session, every real chat start refreshes the cache from its own `session/new`,
199
199
  and the cache is stamped with the mtimes of the profile's `config.yaml` and
200
- `.env` (`hermesConfigFingerprint`) so a default changed outside moi is
200
+ `.env` (`hermesConfigFingerprint`) so a default changed outside Moi is
201
201
  rediscovered on the next snapshot instead of on every one.
202
202
 
203
203
  ### 3.3 The prompt stream
@@ -205,7 +205,7 @@ rediscovered on the next snapshot instead of on every one.
205
205
  `session/prompt` streams `session/update` notifications and resolves with
206
206
  `{ stopReason, usage }`. Observed update kinds:
207
207
 
208
- | `sessionUpdate` | Carries | moi display mapping |
208
+ | `sessionUpdate` | Carries | Moi display mapping |
209
209
  | --------------------------- | ----------------------------------------------------- | --------------------------------- |
210
210
  | `agent_message_chunk` | token deltas | `preview` frames + assistant text |
211
211
  | `agent_thought_chunk` | token deltas | thinking parts |
@@ -217,7 +217,7 @@ rediscovered on the next snapshot instead of on every one.
217
217
  | `user_message_chunk` | replayed user turns | history only (§3.6) |
218
218
 
219
219
  `kind` is semantic (`execute`, `edit`, `read`) with `locations: [{path}]`, so
220
- moi gets Codex-style semantic tool labels rather than Claude Code's raw
220
+ Moi gets Codex-style semantic tool labels rather than Claude Code's raw
221
221
  `tool_use` pairs. Terminal calls arrive pre-titled (`terminal: echo step1`).
222
222
 
223
223
  Final result:
@@ -235,7 +235,7 @@ Final result:
235
235
  }
236
236
  ```
237
237
 
238
- Token streaming is **always on** — there is no opt-in flag, so moi gates
238
+ Token streaming is **always on** — there is no opt-in flag, so Moi gates
239
239
  forwarding on its side exactly like it does for Codex.
240
240
 
241
241
  ### 3.4 ⚠️ Live file-tool completions are dropped
@@ -243,7 +243,7 @@ forwarding on its side exactly like it does for Codex.
243
243
  **Reproducible bug.** In the live stream, `terminal` tool calls always get
244
244
  their `tool_call_update` (3 starts → 3 completions), but `read_file` /
245
245
  `write_file` calls **never do** (4 starts → 0 completions, twice in a row).
246
- In moi's UI those tool cards would hang in `pending` forever.
246
+ In Moi's UI those tool cards would hang in `pending` forever.
247
247
 
248
248
  Cause is the pairing strategy: live completions are matched by **tool name**
249
249
  through a FIFO queue (`acp_adapter/events.py`, `make_tool_progress_cb` /
@@ -255,18 +255,18 @@ The same session replayed through `session/load` is **complete and correct** —
255
255
  4 `tool_call` + 4 `tool_call_update` with results — because the replay path
256
256
  (`server.py`) pairs by real `tool_call_id` from message history instead.
257
257
 
258
- Consequences for a moi adapter:
258
+ Consequences for a Moi adapter:
259
259
 
260
260
  - Tool-call ids are **not stable** between live and replay: live emits
261
261
  `tc-<hash>`, replay emits `functions.<tool>:<index>`. Never key persisted
262
262
  state on them across a reload.
263
263
  - Workaround without patching Hermes: on `stopReason`, mark any still-pending
264
- tool call as completed (moi already owns turn accounting), or re-read
264
+ tool call as completed (Moi already owns turn accounting), or re-read
265
265
  history. Upstream fix would be to pair by `tool_call_id` live too.
266
266
 
267
267
  ### 3.5 Permissions — a real approval flow
268
268
 
269
- Unlike every harness moi ships today, Hermes has a **working interactive
269
+ Unlike every harness Moi ships today, Hermes has a **working interactive
270
270
  approval flow**: `session/request_permission` arrives as an agent→client
271
271
  request with a proper diff payload and options
272
272
  (`allow_once` / `reject_once`), and a denial genuinely blocks the write.
@@ -278,9 +278,9 @@ A/B probe, denying every prompt:
278
278
  | `dont_ask` | 0 | ✅ yes |
279
279
  | `default` | 1 | ❌ no |
280
280
 
281
- So `session/set_mode { modeId: 'dont_ask' }` reproduces moi's
281
+ So `session/set_mode { modeId: 'dont_ask' }` reproduces Moi's
282
282
  bypass-permissions trust model in one call — that is the shipping path. But
283
- Hermes is also the first backend that would let moi build real approval UI
283
+ Hermes is also the first backend that would let Moi build real approval UI
284
284
  (README's "permission requests as events" wish-list item) without fighting the
285
285
  provider.
286
286
 
@@ -292,7 +292,7 @@ provider.
292
292
  the live stream.
293
293
  - `session/cancel` → the in-flight `session/prompt` resolves with
294
294
  `stopReason: "cancelled"` immediately (8.0s prompt cancelled at t+8.0s).
295
- Cleanly distinguishable from `end_turn`, which is what moi's contract needs
295
+ Cleanly distinguishable from `end_turn`, which is what Moi's contract needs
296
296
  to tell aborts from failures.
297
297
  - `session/set_model { modelId }` succeeds mid-session — **live model switch**,
298
298
  no teardown-and-resume dance (Claude Code's weak spot). ⚠️ but see §3.10.
@@ -314,7 +314,7 @@ shape, not a protocol limit, so an adapter should not assume ordering.
314
314
 
315
315
  The number to watch is **7.7s to first frame**. That is process spawn +
316
316
  `session/new` + prompt assembly, and Hermes assembles a very large prompt
317
- (~38k input tokens for a trivial task, ~24k on a warmed session). A moi
317
+ (~38k input tokens for a trivial task, ~24k on a warmed session). A Moi
318
318
  harness must hold the process open per workspace — spawn-per-turn would put
319
319
  that latency in front of every message.
320
320
 
@@ -324,7 +324,7 @@ that latency in front of every message.
324
324
  array is accepted (`promptCapabilities.image: true`). Against
325
325
  `openai-api:gpt-5.4-mini` the agent described a generated test image
326
326
  correctly — "a large red circle … a dark blue rectangle … plain white
327
- background, circle on the left". So moi's `imagesInline: 'base64'` capability
327
+ background, circle on the left". So Moi's `imagesInline: 'base64'` capability
328
328
  applies; no path-note fallback needed. Vision needs a vision-capable model —
329
329
  `kimi-k2.7-code` is not one, so this is a per-model capability the picker
330
330
  should reflect. Hermes also has an `auxiliary.vision` model slot that can
@@ -334,7 +334,7 @@ route image understanding to a _different_ model than the chat model.
334
334
 
335
335
  Env set on the `hermes acp` process reaches the agent's shell tools: a
336
336
  `MOI_TEST_ENV` set at spawn came back from `printenv` inside the agent's
337
- terminal tool. This is exactly moi's model — per-workspace env frozen at
337
+ terminal tool. This is exactly Moi's model — per-workspace env frozen at
338
338
  spawn, `onEnvChanged()` reaping idle processes to pick up changes.
339
339
 
340
340
  ### 3.10 MCP: works per-session, but `set_model` silently drops it ⚠️
@@ -344,7 +344,7 @@ register servers **per session**. A throwaway stdio MCP server exposing one
344
344
  tool was picked up as `mcp__mini__moi_secret_number` (Claude Code's
345
345
  namespacing convention), the tool surface refreshed to 28 tools, and the agent
346
346
  called it and returned the secret value. Per-session scoping is exactly what
347
- moi needs to give each workspace its own connectors.
347
+ Moi needs to give each workspace its own connectors.
348
348
 
349
349
  **But `session/set_model` destroys them.** Isolated A/B on the same MCP server:
350
350
 
@@ -360,7 +360,7 @@ Cause: `set_session_model` rebuilds the agent with
360
360
  (`acp_adapter/server.py`). The rebuilt agent comes back with no MCP tools and
361
361
  the model just reports it lacks them.
362
362
 
363
- This matters because moi offers a per-chat model picker. Workarounds: re-issue
363
+ This matters because Moi offers a per-chat model picker. Workarounds: re-issue
364
364
  `session/load` after every `set_model` (it re-registers), or treat model
365
365
  switches as teardown-and-resume when connectors are attached. The one-line
366
366
  upstream fix is to call `_register_session_mcp_servers` from
@@ -377,15 +377,15 @@ user-global, so per-workspace connectors should go through the ACP
377
377
  `db.list_sessions_rich(source="acp", …)` in `acp_adapter/session.py`. The
378
378
  `sessions` table tags every row with `source` (observed: `acp`, `cli`; the
379
379
  gateway writes `telegram`, `discord`, …) plus `chat_id` / `chat_type` /
380
- `user_id`. So a Telegram conversation **never** appears in moi's session list,
381
- and moi can never accidentally hijack one.
380
+ `user_id`. So a Telegram conversation **never** appears in Moi's session list,
381
+ and Moi can never accidentally hijack one.
382
382
 
383
- That is the right default, and it also means moi cannot show them without
383
+ That is the right default, and it also means Moi cannot show them without
384
384
  going around ACP: read `state.db` directly, or drive the gateway protocol
385
385
  (§5). Worth knowing that gateway sessions are keyed by
386
386
  `(platform, chat_id, user_id)` and run inside the long-lived gateway daemon
387
387
  with no meaningful `cwd` — they are not workspace-scoped at all, so they do
388
- not fit moi's workspace model even if surfaced.
388
+ not fit Moi's workspace model even if surfaced.
389
389
 
390
390
  `session/list` does support server-side filtering and pagination:
391
391
  `{ cwd, cursor }`. Verified cold (fresh process, no in-memory sessions):
@@ -395,8 +395,8 @@ recover their cwd from the `model_config` JSON blob, not the (often empty)
395
395
 
396
396
  ## 4. Multiple agents = profiles
397
397
 
398
- Hermes profiles are close to OpenClaw agents, and moi can use them the same
399
- way — except moi can also **create** them, which it cannot do for OpenClaw.
398
+ Hermes profiles are close to OpenClaw agents, and Moi can use them the same
399
+ way — except Moi can also **create** them, which it cannot do for OpenClaw.
400
400
 
401
401
  ```
402
402
  $ hermes profile list
@@ -416,7 +416,7 @@ real — the `research` profile's `session/list` returned `[]` while `default`
416
416
  had 19. The `--description` field exists specifically so an orchestrator can
417
417
  route work by role.
418
418
 
419
- So a moi harness has three viable shapes, and this is a product decision:
419
+ So a Moi harness has three viable shapes, and this is a product decision:
420
420
 
421
421
  1. **Import profiles as agents** (OpenClaw's model) — `hermes profile list`
422
422
  is the discovery call, `agentId` on `SendMessageInput` already exists for
@@ -432,7 +432,7 @@ So a moi harness has three viable shapes, and this is a product decision:
432
432
 
433
433
  This is the real integration cost, not the protocol.
434
434
 
435
- **moi is workspace-scoped.** Every workspace has its own settings in
435
+ **Moi is workspace-scoped.** Every workspace has its own settings in
436
436
  `.moi/.workspace.json`, its own env, its own agent config, and a workspace is
437
437
  shareable via git.
438
438
 
@@ -459,7 +459,7 @@ sharing one `$HERMES_HOME` ran simultaneously with correct isolation and **no
459
459
  SQLite contention** (Hermes detects the SQLite 3.45.1 WAL-reset bug and falls
460
460
  back to `journal_mode=DELETE`).
461
461
 
462
- Process topology matches moi's held-open model: **one process per workspace,
462
+ Process topology matches Moi's held-open model: **one process per workspace,
463
463
  N sessions inside it** — the same shape as `codex/client.ts`, so per-workspace
464
464
  env injection at spawn works unchanged.
465
465
 
@@ -507,36 +507,36 @@ Event vocabulary is richer too: `agent.token`, `agent.thinking`,
507
507
 
508
508
  **Recommendation: still ACP.** The gateway is an internal, undocumented,
509
509
  fast-moving protocol for Nous's own desktop app, and half its surface
510
- (billing, pets, messaging onboarding, cron) is irrelevant to moi. ACP gives
511
- moi ~90% of the chat plane against a stable public contract. The three
512
- gateway-only things moi would genuinely miss are **mid-turn steering**,
513
- **subagent lanes**, and **compaction visibility** — all of which moi renders
510
+ (billing, pets, messaging onboarding, cron) is irrelevant to Moi. ACP gives
511
+ Moi ~90% of the chat plane against a stable public contract. The three
512
+ gateway-only things Moi would genuinely miss are **mid-turn steering**,
513
+ **subagent lanes**, and **compaction visibility** — all of which Moi renders
514
514
  today for Codex/Claude Code, so expect a slightly flatter experience on
515
515
  Hermes. If those become blocking, the escape hatch is to run `hermes serve`
516
516
  alongside ACP and use it as a _control plane only_, keeping chat on ACP.
517
517
 
518
- ## 7. What Hermes has that moi has no concept of
518
+ ## 7. What Hermes has that Moi has no concept of
519
519
 
520
520
  Worth knowing before deciding how deep to integrate — these are the reasons
521
- someone picks Hermes, and moi currently models none of them:
521
+ someone picks Hermes, and Moi currently models none of them:
522
522
 
523
523
  - **Self-improving skills.** Hermes writes its own skills from experience and
524
- maintains them with a background "curator". moi's skills are authored
524
+ maintains them with a background "curator". Moi's skills are authored
525
525
  artifacts synced into the workspace; there is no notion of the agent
526
526
  editing its own skill library. 14 bundled skill packs ship with the repo.
527
527
  - **Persistent cross-session memory** with pluggable providers
528
528
  (`plugins/memory/`), retrieved during prompt assembly.
529
529
  - **`SOUL.md`** — a user-level agent identity/persona file, orthogonal to
530
- moi's per-workspace `AGENTS.md`.
530
+ Moi's per-workspace `AGENTS.md`.
531
531
  - **Context compression as a first-class lifecycle** with session lineage
532
532
  (`parentHermesSessionId`, `compressionDepth`) surviving compaction.
533
533
  - **Auxiliary model slots** — separate models for vision, compression and web
534
- extraction, independent of the chat model. moi has one model per chat.
535
- - **Non-local terminal backends** (docker/ssh/modal/daytona/…). moi assumes
534
+ extraction, independent of the chat model. Moi has one model per chat.
535
+ - **Non-local terminal backends** (docker/ssh/modal/daytona/…). Moi assumes
536
536
  the agent runs where the workspace is.
537
537
 
538
538
  None of these block an adapter; all of them are invisible through ACP unless
539
- moi chooses to surface them.
539
+ Moi chooses to surface them.
540
540
 
541
541
  ## 8. Adapter shape and effort
542
542
 
@@ -580,11 +580,11 @@ server/harness/hermes/
580
580
  Touch points outside the folder are small and already enumerated by the Codex
581
581
  precedent: `lib/types.ts` (`WorkspaceType` union), `lib/workspace-types.ts`
582
582
  (ordering), `lib/format.ts` (`provider` union), `server/harness/registry.ts`,
583
- `server/harness/executable.ts` (PATH lookup), `server/api.ts`
583
+ `server/harness/executable.ts` (PATH lookup), `server/api/index.ts`
584
584
  (`CREATABLE_TYPES`), and a handful of client files that branch on provider
585
585
  (`client/features/chat/messages/tool-group/format/index.ts`,
586
- `client/features/home/workspace-setup/WorkspaceAgentStep.tsx`,
587
- `client/features/dev/HarnessDebugPage.tsx`).
586
+ `client/features/workspace/setup/workspace-login-state.tsx`,
587
+ `client/features/dev/harness-debug-page.tsx`).
588
588
 
589
589
  **Effort: comparable to Codex, likely a little less.** ACP is a documented
590
590
  standard rather than a reverse-engineered protocol, the semantic tool vocabulary
@@ -662,7 +662,7 @@ interpreter).
662
662
 
663
663
  ## 11. Implementation notes (shipped)
664
664
 
665
- What driving the protocol through moi confirmed, beyond the probes:
665
+ What driving the protocol through Moi confirmed, beyond the probes:
666
666
 
667
667
  - **The `acp/` split is the deliverable.** `acp/{wire,client,adapter,session,discovery}.ts`
668
668
  is provider-agnostic; `hermes/` supplies an `AcpProviderConfig` (spawn spec,
@@ -689,7 +689,7 @@ What driving the protocol through moi confirmed, beyond the probes:
689
689
  - **Model catalog caching.** `listModels()` has no session to read from, so the
690
690
  catalog is cached per workspace off a throwaway `session/new`. Zero-history
691
691
  sessions are invisible to `session/list`, so this leaves no debris.
692
- - **MCP is not wired yet.** moi passes `mcpServers: []`, which sidesteps the
692
+ - **MCP is not wired yet.** Moi passes `mcpServers: []`, which sidesteps the
693
693
  §3.10 `set_model` regression. Per-workspace connectors are the next step and
694
694
  will need the re-register workaround.
695
695
 
@@ -697,7 +697,7 @@ Verified live against the running server: session rename, 130+ preview frames
697
697
  per turn, tool cards settling to success (including the file write Hermes never
698
698
  completes), `stopped` on interrupt with the partial answer preserved, cold
699
699
  `session/load` replay after a server restart, per-chat model switching, and
700
- image attachments through moi's upload pipeline.
700
+ image attachments through Moi's upload pipeline.
701
701
 
702
702
  ## 12. The official SDK, and the version skew it exposed
703
703
 
@@ -715,7 +715,7 @@ The protocol now lives in a vendor-neutral org; JetBrains maintains a repo too.
715
715
  **Types only, dev-only.** `dist/schema/types.gen.js` has no runtime code, so
716
716
  `import type` costs nothing and ships nothing. Importing _values_ instead
717
717
  (`AGENT_METHODS`, `ClientSideConnection`, `ndJsonStream`) would pull zod in as
718
- a real dependency for the sake of a few string constants, so moi keeps its own
718
+ a real dependency for the sake of a few string constants, so Moi keeps its own
719
719
  method strings — verified against the SDK's `AGENT_METHODS` at 1.3.0 — and its
720
720
  own transport, which already carries the `/dev/harness` wire tap, per-workspace
721
721
  process lifecycle and env injection at spawn.
@@ -731,12 +731,12 @@ _models_ are first-class. The current spec has **no model concept at all**:
731
731
 
732
732
  `session/set_model` and `models.availableModels` were replaced by
733
733
  `session/set_config_option` + `SessionConfigOption` (a select/boolean option
734
- list on `NewSessionResponse`). moi's per-chat model picker rides on the old
734
+ list on `NewSessionResponse`). Moi's per-chat model picker rides on the old
735
735
  shape, so `wire.ts` keeps a small, clearly-labelled "pre-1.0 additions" block
736
736
  (`AcpModelInfo`, `AcpModelState`, `AcpNewSessionResult`). **Delete it when
737
737
  Hermes moves to config options** — that is the whole migration.
738
738
 
739
- Everything else moi consumes is current: `session_info_update` and
739
+ Everything else Moi consumes is current: `session_info_update` and
740
740
  `usage_update` are both in the spec (`usage_update` requires `size`, which was
741
741
  optional in the hand-written version).
742
742
 
@@ -763,7 +763,7 @@ list in `config.yaml`. **There is no cwd-relative skill path.** Under
763
763
  `hermes -p <name>`, `$HERMES_HOME` is `<root>/profiles/<name>`, so the scanned
764
764
  directory is `<profile>/skills`.
765
765
 
766
- moi therefore installs its skills into the **profile home**, not the
766
+ Moi therefore installs its skills into the **profile home**, not the
767
767
  workspace, even though the workspace is `<profile>/workspace`. Installing into
768
768
  the workspace (the OpenClaw shape, where the workspace _is_ the agent root)
769
769
  leaves them invisible: `skills list` omits them and `skill view moi-workspace`
@@ -772,7 +772,7 @@ cwd, which is what made the bug look like it worked.
772
772
 
773
773
  `skillsDir` climbs back with `profileHomeFromWorkspace()` — the exact inverse
774
774
  of `profileWorkspace()`, kept beside it in `discovery.ts`, returning null for
775
- any path moi did not lay out so callers fall back instead of writing into an
775
+ any path Moi did not lay out so callers fall back instead of writing into an
776
776
  unrelated parent. `skillsDirFor` is the single resolver, so install, update and
777
777
  version-check all follow.
778
778
 
@@ -789,9 +789,9 @@ Verified against Hermes 0.20.0:
789
789
 
790
790
  **Consequences, accepted deliberately.** The skills are profile-global: every
791
791
  session on that profile sees them, including plain `hermes` runs and gateway
792
- (Telegram/Discord) chats — not just moi. Importing the _default_ profile puts
792
+ (Telegram/Discord) chats — not just Moi. Importing the _default_ profile puts
793
793
  them in `~/.hermes/skills`, the root install's own directory. They also outlive
794
- the workspace: removing the moi workspace leaves the skill in the profile's
794
+ the workspace: removing the Moi workspace leaves the skill in the profile's
795
795
  list. Nothing writes to `config.yaml`, `.env` or `SOUL.md` — this is the same
796
796
  directory `hermes skills install` targets.
797
797
 
@@ -815,19 +815,19 @@ table has an `archived` column, and `list_sessions_rich` takes
815
815
  archived session would drop out of `session/list` for free.
816
816
 
817
817
  The problem is reach: the only callers of `set_session_archived` are HTTP routes
818
- on `hermes serve` and the gateway API server, daemons moi deliberately does not
818
+ on `hermes serve` and the gateway API server, daemons Moi deliberately does not
819
819
  run (§6). The `hermes sessions archive` CLI is filter-based (age, source, title,
820
820
  cwd — no session id), and `hermes sessions delete <id>` is a real delete.
821
821
 
822
- So moi hides the chat on its own side, which is what the **Claude Code harness
822
+ So Moi hides the chat on its own side, which is what the **Claude Code harness
823
823
  already does** — it tags a session `moi:archived` and filters the list rather
824
824
  than deleting anything. `../acp/archived.ts` keeps a per-workspace id list in
825
- moi's data dir; `listAcpSessions` and the home-card preview filter against it,
825
+ Moi's data dir; `listAcpSessions` and the home-card preview filter against it,
826
826
  and `forgetAcpSession` drops the live record. Because it lives in the ACP layer,
827
827
  any future ACP provider inherits archiving without implementing anything.
828
828
 
829
829
  Consequence, and the correct boundary: the chat stays in Hermes's own store and
830
- is still visible to `hermes sessions list` and the gateway. moi hides a chat
831
- from moi, not from the user's agent. Nothing is destroyed, and the store is a
830
+ is still visible to `hermes sessions list` and the gateway. Moi hides a chat
831
+ from Moi, not from the user's agent. Nothing is destroyed, and the store is a
832
832
  plain id list, so unarchiving is a one-liner (`unarchiveAcpSession`) if a route
833
833
  ever wants it.
@@ -21,7 +21,7 @@ export type HermesProfile = {
21
21
  agentId: string
22
22
  // Profile home ($HERMES_HOME for default, else <home>/profiles/<id>).
23
23
  home: string
24
- // Workspace directory the agent runs in — the moi workspace path.
24
+ // Workspace directory the agent runs in — the Moi workspace path.
25
25
  path: string
26
26
  name?: string
27
27
  isDefault: boolean