moi-computer 0.12.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.
- package/README.md +27 -27
- package/bin/moi.mjs +2 -2
- package/client/AGENTS.md +7 -4
- package/client/api/app-config.ts +3 -2
- package/client/api/app-ui-keys.ts +1 -1
- package/client/api/workspace-keys.ts +2 -4
- package/client/app/{AppRouter.tsx → app-router.tsx} +4 -4
- package/client/app/routes/{HomeRoute.tsx → home-route.tsx} +2 -2
- package/client/app/routes/{WorkspaceRoute.tsx → workspace-route.tsx} +20 -31
- package/client/app/shell/{SidebarLayout.tsx → sidebar-layout.tsx} +10 -10
- package/client/dev/index.html +43 -0
- package/client/dev/index.ts +15 -0
- package/client/features/applets/{AppletContainer.tsx → applet-container.tsx} +1 -1
- package/client/features/applets/applet-runtime.ts +11 -13
- package/client/features/applets/applet-thumbnail.ts +1 -1
- package/client/features/applets/{useApplet.ts → use-applet.ts} +2 -2
- package/client/features/applets/{WidgetShell.tsx → widget-shell.tsx} +4 -4
- package/client/features/chat/applet-chat-intents.ts +33 -14
- package/client/features/chat/{ChatPanel.tsx → chat-panel.tsx} +80 -59
- package/client/features/chat/chat-popup.tsx +171 -0
- package/client/features/chat/chat-send.ts +33 -1
- package/client/features/chat/chat-store.ts +10 -0
- package/client/features/chat/composer/attachments/{DrawingAttachmentChip.tsx → drawing-attachment-chip.tsx} +1 -1
- package/client/features/chat/composer/attachments/{FileAttachmentChip.tsx → file-attachment-chip.tsx} +1 -1
- package/client/features/chat/composer/attachments/{TextAttachmentChip.tsx → text-attachment-chip.tsx} +1 -1
- package/client/features/chat/composer/banners/{ComposerBanner.tsx → composer-banner.tsx} +0 -14
- package/client/features/chat/composer/banners/{ErrorBanner.tsx → error-banner.tsx} +1 -1
- package/client/features/chat/composer/banners/{SkillUpdateBanner.tsx → skill-update-banner.tsx} +3 -3
- package/client/features/chat/composer/{ChatComposer.tsx → chat-composer.tsx} +31 -33
- package/client/features/chat/composer/{ModelPicker.tsx → model-picker.tsx} +4 -4
- package/client/features/chat/composer/{useWorkspaceComposerState.tsx → use-workspace-composer-state.tsx} +14 -30
- package/client/features/chat/composer/{useWorkspaceSkillUpdates.ts → use-workspace-skill-updates.ts} +1 -1
- package/client/features/chat/connection/chat-frames.ts +15 -8
- package/client/features/chat/messages/{ChatEmptyState.tsx → chat-empty-state.tsx} +37 -23
- package/client/features/chat/messages/fork-history.ts +14 -0
- package/client/features/chat/messages/{MarkdownContent.tsx → markdown-content.tsx} +4 -4
- package/client/features/chat/messages/tool-group/index.ts +1 -1
- package/client/features/chat/messages/tool-group/{ReadImagePreview.tsx → read-image-preview.tsx} +2 -2
- package/client/features/chat/messages/tool-group/{SubagentCard.tsx → subagent-card.tsx} +3 -3
- package/client/features/chat/messages/tool-group/{TimelineRow.tsx → timeline-row.tsx} +1 -1
- package/client/features/chat/messages/tool-group/{ToolCallGroup.tsx → tool-call-group.tsx} +8 -8
- package/client/features/chat/messages/tool-group/{ToolOutput.tsx → tool-output.tsx} +1 -1
- package/client/features/chat/messages/{TurnView.tsx → turn-view.tsx} +4 -4
- package/client/features/chat/sessions/api.ts +109 -19
- package/client/features/chat/sessions/browser-tab-state.ts +30 -7
- package/client/features/chat/sessions/{ChatSelector.tsx → chat-selector.tsx} +139 -80
- package/client/features/chat/sessions/use-selected-session.ts +351 -0
- package/client/features/chat/{useChat.ts → use-chat.ts} +46 -48
- package/client/features/collab/client.ts +10 -11
- package/client/features/collab/hooks.tsx +6 -11
- package/client/features/collab/host-state.ts +57 -128
- package/client/features/collab/provider.tsx +3 -3
- package/client/features/collab/proxy-user.ts +1 -1
- package/client/features/collab/testing/fake-engine.ts +6 -27
- package/client/features/collab/workspace-users-menu.tsx +3 -7
- package/client/features/connectors/mcp-icons.ts +1 -1
- package/client/features/connectors/{McpServerCards.tsx → mcp-server-cards.tsx} +1 -1
- package/client/features/{home/workspace-setup/DemoDialog.tsx → demo/demo-dialog.tsx} +6 -6
- package/client/features/dev/chat-states-fixtures.ts +4 -4
- package/client/features/dev/{ChatStatesPage.tsx → chat-states-page.tsx} +6 -6
- package/client/features/dev/collab/local-user-settings.tsx +4 -4
- package/client/features/dev/{DevIndexPage.tsx → dev-index-page.tsx} +7 -1
- package/client/features/dev/{DevRoutes.tsx → dev-routes.tsx} +8 -6
- package/client/features/dev/workspace-setup-mocks.ts +102 -0
- package/client/features/dev/workspace-setup-page.tsx +11 -0
- package/client/features/dev/workspace-setup-preview.tsx +226 -0
- package/client/features/drawings/{DrawingToolbar.tsx → drawing-toolbar.tsx} +1 -1
- package/client/features/drawings/{useChatAnnotation.ts → use-chat-annotation.ts} +29 -23
- package/client/features/drawings/{useDrawingLayer.ts → use-drawing-layer.ts} +1 -1
- package/client/features/drawings/{useViewBuilderSketch.ts → use-view-sketch.ts} +8 -8
- package/client/features/harness/api.ts +36 -0
- package/client/features/harness/device-login-steps.tsx +97 -0
- package/client/features/home/api.ts +1 -81
- package/client/features/home/{HomeLogo.tsx → home-logo.tsx} +1 -1
- package/client/features/home/{HomePage.tsx → home-page.tsx} +16 -20
- package/client/features/overview/api.ts +2 -2
- package/client/features/overview/default/registry.tsx +3 -5
- package/client/features/overview/default/{ViewsWidget.tsx → views-widget.tsx} +6 -13
- package/client/features/overview/{HiddenPanel.tsx → hidden-panel.tsx} +2 -2
- package/client/features/overview/{Overview.tsx → overview.tsx} +9 -12
- package/client/features/overview/{WidgetCanvas.tsx → widget-canvas.tsx} +1 -1
- package/client/features/overview/{WidgetFrame.tsx → widget-frame.tsx} +1 -1
- package/client/features/overview/workspace-name.tsx +55 -0
- package/client/features/scratchpad/{Scratchpad.tsx → scratchpad.tsx} +7 -7
- package/client/features/scratchpad/{useScratchpadSnapshot.tsx → use-scratchpad-snapshot.tsx} +3 -3
- package/client/features/settings/api.ts +1 -1
- package/client/features/settings/{ConnectorsSettings.tsx → connectors-settings.tsx} +3 -3
- package/client/features/settings/{EnvironmentSettings.tsx → environment-settings.tsx} +3 -3
- package/client/features/settings/{GeneralSettings.tsx → general-settings.tsx} +5 -5
- package/client/features/settings/{useEnvVars.ts → use-env-vars.ts} +1 -1
- package/client/features/settings/{WorkspaceIconPicker.tsx → workspace-icon-picker.tsx} +1 -1
- package/client/features/settings/{WorkspaceSettingsDialog.tsx → workspace-settings-dialog.tsx} +3 -3
- package/client/features/update/api.ts +1 -1
- package/client/features/views/api.ts +64 -131
- package/client/features/views/pending-view-screen.tsx +282 -0
- package/client/features/views/use-view-actions.ts +151 -0
- package/client/features/views/use-view-drafts.ts +88 -0
- package/client/features/views/{ViewManager.tsx → view-manager.tsx} +13 -13
- package/client/features/views/view-presentation.ts +4 -5
- package/client/features/views/view-submission.ts +88 -0
- package/client/features/workspace/add/api.ts +80 -0
- package/client/features/{home/workspace-setup/CreateWorkspaceDialog.tsx → workspace/add/create-workspace-dialog.tsx} +56 -42
- package/client/features/workspace/add/import-workspace-dialog.tsx +81 -0
- package/client/features/{home/workspace-setup/useWorkspaceImport.ts → workspace/add/use-workspace-import.ts} +1 -1
- package/client/features/workspace/add/workspace-agent-options.ts +53 -0
- package/client/features/{home/workspace-setup/WorkspaceAgentStep.tsx → workspace/add/workspace-agent-selector.tsx} +59 -98
- package/client/features/{home/workspace-setup/WorkspaceDialogContent.tsx → workspace/add/workspace-dialog-content.tsx} +1 -1
- package/client/features/workspace/api.ts +24 -15
- package/client/features/workspace/browser-tab-state.ts +16 -9
- package/client/features/workspace/moi-context.ts +14 -16
- package/client/features/workspace/setup/workspace-login-state.tsx +175 -0
- package/client/features/workspace/setup/workspace-recovery-states.tsx +125 -0
- package/client/features/workspace/setup/workspace-setup-panel.tsx +18 -0
- package/client/features/workspace/setup/workspace-setup.tsx +77 -0
- package/client/features/workspace/setup/workspace-welcome-state.tsx +81 -0
- package/client/features/workspace/tab-resolution.ts +16 -29
- package/client/features/workspace/{ThemePanel.tsx → theme-panel.tsx} +3 -3
- package/client/features/workspace/use-workspace-navigation.ts +245 -0
- package/client/features/workspace/workspace-content.tsx +641 -0
- package/client/features/workspace/workspace-identity.tsx +40 -0
- package/client/features/workspace/workspace-menu.tsx +63 -0
- package/client/features/{home → workspace}/workspace-presentation.tsx +10 -3
- package/client/features/workspace/workspace-screen.tsx +28 -0
- package/client/features/workspace/{WorkspaceSplitLayout.tsx → workspace-split-layout.tsx} +1 -1
- package/client/features/workspace/{WorkspaceTabs.tsx → workspace-tabs.tsx} +2 -2
- package/client/index.css +2 -2
- package/client/index.html +1 -1
- package/client/index.tsx +5 -1
- package/client/lib/agent-availability.ts +0 -5
- package/client/main.tsx +1 -1
- package/client/runtime/{useWorkspaceEvents.ts → use-workspace-events.ts} +10 -18
- package/client/store/ui.ts +25 -29
- package/dist/chunk-08ndj2rg.js +2 -0
- package/dist/chunk-2x040tmg.js +68 -0
- package/dist/chunk-3smxq0ts.js +1 -0
- package/dist/chunk-68ch5hs8.js +2 -0
- package/dist/{chunk-z3byfve5.js → chunk-9vg3xa81.js} +2 -2
- package/dist/chunk-c2p00p9j.css +1 -0
- package/dist/chunk-cs833y9j.js +1 -0
- package/dist/{chunk-97eg9mjn.js → chunk-d7cbm65e.js} +1 -1
- package/dist/{chunk-efdyz6xp.js → chunk-hvh9f5h0.js} +1 -1
- package/dist/{chunk-vfpsc75k.js → chunk-jvyvwwv3.js} +1 -1
- package/dist/chunk-nwevqe86.js +10 -0
- package/dist/{chunk-3a48fyf7.js → chunk-q0gbdts4.js} +4 -4
- package/dist/chunk-rt30jbcm.js +1 -0
- package/dist/chunk-y5y3kj67.js +1 -0
- package/dist/index.html +2 -2
- package/lib/format.ts +1 -1
- package/lib/harness-instructions.ts +30 -0
- package/lib/ids.ts +3 -6
- package/lib/moi-context.ts +102 -75
- package/lib/navigation.ts +48 -87
- package/lib/scratchpad-skew.ts +3 -3
- package/lib/session-drafts.ts +10 -0
- package/lib/types.ts +92 -51
- package/lib/update.ts +1 -1
- package/lib/view-build-directives.ts +12 -0
- package/lib/workspace-layout.ts +1 -1
- package/lib/workspace-tabs.ts +12 -7
- package/package.json +7 -2
- package/server/AGENTS.md +10 -4
- package/server/README.md +102 -0
- package/server/agent-launcher.ts +27 -0
- package/server/api/harnesses.ts +56 -0
- package/server/{api.ts → api/index.ts} +197 -299
- package/server/app-config.ts +45 -14
- package/server/app-settings.ts +1 -1
- package/server/applets/applet-css.ts +1 -1
- package/server/applets/build-applet.ts +4 -4
- package/server/applets/build-worker.ts +3 -2
- package/server/applets/config.ts +1 -1
- package/server/{functions-worker.ts → applets/functions-worker.ts} +1 -1
- package/server/{functions.ts → applets/functions.ts} +3 -2
- package/server/applets/index.ts +2 -2
- package/server/{thumbnails.ts → applets/thumbnails.ts} +1 -1
- package/server/{applet-typecheck.ts → applets/typecheck.ts} +4 -4
- package/server/{ui-components.ts → applets/ui-components.ts} +2 -2
- package/server/applets/view-source.ts +7 -1
- package/server/{views.ts → applets/views.ts} +35 -46
- package/server/{widgets.ts → applets/widgets.ts} +2 -2
- package/server/cli/applet-selector.ts +19 -0
- package/server/cli/args.ts +5 -0
- package/server/{cli-colors.ts → cli/colors.ts} +1 -1
- package/server/cli/commands/bundle.ts +119 -0
- package/server/cli/commands/call-server-fn.ts +42 -0
- package/server/cli/commands/check.ts +53 -0
- package/server/cli/commands/config.ts +132 -0
- package/server/cli/commands/debug.ts +119 -0
- package/server/cli/commands/env.ts +162 -0
- package/server/cli/commands/hermes.ts +149 -0
- package/server/cli/commands/init.ts +286 -0
- package/server/cli/commands/navigate.ts +35 -0
- package/server/cli/commands/openclaw.ts +168 -0
- package/server/cli/commands/refresh.ts +39 -0
- package/server/cli/commands/scratch.ts +496 -0
- package/server/cli/commands/service.ts +298 -0
- package/server/cli/commands/skill.ts +122 -0
- package/server/cli/commands/start.ts +138 -0
- package/server/cli/commands/status.ts +80 -0
- package/server/cli/commands/tabs.ts +43 -0
- package/server/cli/commands/theme.ts +192 -0
- package/server/cli/commands/ui-components.ts +15 -0
- package/server/cli/commands/update.ts +192 -0
- package/server/cli/commands/version.ts +9 -0
- package/server/cli/commands/views.ts +87 -0
- package/server/cli/control.ts +89 -0
- package/server/{cli-env.ts → cli/env.ts} +78 -56
- package/server/cli/index.ts +171 -0
- package/server/{cli-pc.ts → cli/pc.ts} +1 -1
- package/server/cli/provider.ts +25 -0
- package/server/cli/server-version.ts +16 -0
- package/server/cli/server.ts +81 -0
- package/server/{cli-ui-components.ts → cli/ui-components.ts} +5 -5
- package/server/cli.ts +2 -3215
- package/server/collab/manager.ts +3 -3
- package/server/collab/skill/index.ts +2 -2
- package/server/control.ts +97 -78
- package/server/data-dir.ts +13 -0
- package/server/harness/README.md +55 -25
- package/server/harness/acp/NOTES.md +11 -11
- package/server/harness/acp/adapter.ts +2 -2
- package/server/harness/acp/archived.ts +3 -3
- package/server/harness/acp/client.ts +4 -3
- package/server/harness/acp/discovery.ts +3 -3
- package/server/harness/acp/run-durations.ts +1 -1
- package/server/harness/acp/session.ts +9 -12
- package/server/harness/auth.ts +303 -0
- package/server/harness/claude-code/NOTES.md +9 -7
- package/server/harness/claude-code/adapter.ts +13 -8
- package/server/harness/claude-code/auth.ts +127 -18
- package/server/harness/claude-code/cli.ts +3 -1
- package/server/harness/claude-code/git-worktree.ts +5 -2
- package/server/harness/claude-code/index.ts +7 -1
- package/server/harness/claude-code/mcp.ts +3 -1
- package/server/harness/claude-code/models.ts +2 -0
- package/server/harness/claude-code/session.ts +13 -39
- package/server/harness/claude-code/sessions.ts +8 -12
- package/server/harness/codex/NOTES.md +35 -16
- package/server/harness/codex/adapter.ts +5 -3
- package/server/harness/codex/auth.ts +86 -19
- package/server/harness/codex/client.ts +30 -34
- package/server/harness/codex/index.ts +20 -1
- package/server/harness/codex/permissions.ts +3 -3
- package/server/harness/codex/probe.ts +3 -5
- package/server/harness/codex/session.ts +20 -25
- package/server/harness/codex/thread-list.ts +74 -0
- package/server/harness/codex/transport.ts +5 -5
- package/server/harness/executable.ts +42 -18
- package/server/harness/fork.ts +12 -0
- package/server/harness/hermes/NOTES.md +70 -70
- package/server/harness/hermes/discovery.ts +1 -1
- package/server/harness/openclaw/NOTES.md +24 -24
- package/server/harness/openclaw/adapter.ts +4 -4
- package/server/harness/openclaw/compat.ts +1 -1
- package/server/harness/openclaw/session.ts +6 -31
- package/server/harness/registry.ts +1 -1
- package/server/harness/session-title.ts +12 -3
- package/server/harness/shell-path.ts +31 -21
- package/server/harness/types.ts +17 -5
- package/server/navigation-relay.ts +1 -1
- package/server/open-browser.ts +7 -0
- package/server/{scratchpad-assets.ts → scratchpad/assets.ts} +4 -4
- package/server/{scratchpad.ts → scratchpad/document.ts} +8 -8
- package/server/{scratchpad-executor.ts → scratchpad/executor.ts} +7 -7
- package/server/{scratchpad-relay.ts → scratchpad/relay.ts} +4 -5
- package/server/{scratchpad-shape-defaults.ts → scratchpad/shape-defaults.ts} +2 -2
- package/server/server-cwd.ts +1 -1
- package/server/service.ts +18 -4
- package/server/sessions/archive.ts +32 -0
- package/server/{attachment-message.ts → sessions/attachment-message.ts} +1 -1
- package/server/sessions/config.ts +41 -0
- package/server/sessions/lifecycle.ts +17 -0
- package/server/sessions/pending-views.ts +164 -0
- package/server/sessions/selected.ts +199 -0
- package/server/sessions/store.ts +127 -0
- package/server/sessions/view-sessions.ts +267 -0
- package/server/{skills-template.ts → skills/template.ts} +1 -1
- package/server/{skill-update.ts → skills/update.ts} +5 -5
- package/server/{skill-version.ts → skills/version.ts} +4 -4
- package/server/static.ts +1 -1
- package/server/status.ts +6 -4
- package/server/web.ts +58 -49
- package/server/{env-apply.ts → workspaces/env-apply.ts} +5 -5
- package/server/{workspace-env.ts → workspaces/env.ts} +30 -3
- package/server/{workspace-import.ts → workspaces/import.ts} +4 -4
- package/server/{workspace-init.ts → workspaces/init.ts} +10 -6
- package/server/{layout.ts → workspaces/layout.ts} +2 -2
- package/server/{preview.ts → workspaces/preview.ts} +1 -1
- package/server/{registry.ts → workspaces/registry.ts} +17 -7
- package/server/{required-env.ts → workspaces/required-env.ts} +3 -3
- package/server/{moi-scaffold.ts → workspaces/scaffold.ts} +4 -3
- package/server/{tabs.ts → workspaces/tabs.ts} +7 -10
- package/ui-components/button.tsx +1 -1
- package/ui-components/docs/attachment.md +2 -2
- package/ui-components/docs/button.md +1 -1
- package/ui-components/docs/calendar.md +1 -1
- package/ui-components/docs/chart.md +4 -4
- package/ui-components/docs/data-table.md +1 -1
- package/ui-components/docs/drawer.md +1 -1
- package/ui-components/docs/field.md +1 -1
- package/ui-components/docs/input.md +2 -2
- package/ui-components/docs/label.md +2 -2
- package/ui-components/docs/table.md +2 -2
- package/workspace/.claude/skills/moi-workspace/SKILL.md +61 -32
- package/workspace/.claude/skills/moi-workspace/references/COLLAB.md +4 -7
- package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +2 -2
- package/workspace/.claude/skills/moi-workspace/references/INTENTS.md +2 -2
- package/client/features/chat/ChatPopup.tsx +0 -98
- package/client/features/chat/composer/banners/AgentAvailabilityBanner.tsx +0 -101
- package/client/features/chat/sessions/useSelectedSession.ts +0 -185
- package/client/features/home/workspace-setup/ImportWorkspaceDialog.tsx +0 -92
- package/client/features/overview/WorkspaceName.tsx +0 -60
- package/client/features/views/ViewBuilder.tsx +0 -239
- package/client/features/views/useViewBuilderActions.ts +0 -103
- package/client/features/views/useViewBuilderDrafts.ts +0 -68
- package/client/features/workspace/WorkspaceScreen.tsx +0 -839
- package/client/features/workspace/useWorkspaceNavigation.ts +0 -203
- package/dist/chunk-2jncyq65.js +0 -1
- package/dist/chunk-e2q5ken7.js +0 -68
- package/dist/chunk-h2kj1ysj.js +0 -1
- package/dist/chunk-jf6czgrz.js +0 -2
- package/dist/chunk-nez8sdta.js +0 -1
- package/dist/chunk-nzwgm8vc.css +0 -1
- package/dist/chunk-ph0h6h86.js +0 -1
- package/dist/chunk-ryg9z3kn.js +0 -10
- package/dist/chunk-tpn177bt.js +0 -2
- package/lib/view-builder-directives.ts +0 -16
- package/server/agent.ts +0 -223
- package/server/chat-selection.ts +0 -22
- package/server/selected-session.ts +0 -152
- package/server/session-config.ts +0 -136
- package/server/view-builders.ts +0 -453
- /package/client/components/shared/{AgentBlobatar.tsx → agent-blobatar.tsx} +0 -0
- /package/client/components/shared/{BottomPanel.tsx → bottom-panel.tsx} +0 -0
- /package/client/components/shared/{Composer.tsx → composer.tsx} +0 -0
- /package/client/components/shared/{LedLogo.tsx → led-logo.tsx} +0 -0
- /package/client/components/shared/{PanelHeader.tsx → panel-header.tsx} +0 -0
- /package/client/components/shared/{ReorderableList.tsx → reorderable-list.tsx} +0 -0
- /package/client/components/shared/{WorkspaceIcon.tsx → workspace-icon.tsx} +0 -0
- /package/client/features/applets/{WidgetErrorBoundary.tsx → widget-error-boundary.tsx} +0 -0
- /package/client/features/chat/composer/attachments/{AttachmentChip.tsx → attachment-chip.tsx} +0 -0
- /package/client/features/chat/messages/{ChatPromptBubbles.tsx → chat-prompt-bubbles.tsx} +0 -0
- /package/client/features/chat/messages/{ShimmerText.tsx → shimmer-text.tsx} +0 -0
- /package/client/features/chat/messages/tool-group/{CodeBlock.tsx → code-block.tsx} +0 -0
- /package/client/features/chat/messages/tool-group/{Collapse.tsx → collapse.tsx} +0 -0
- /package/client/features/chat/messages/{useStickToBottom.ts → use-stick-to-bottom.ts} +0 -0
- /package/client/features/connectors/{IconMcp.tsx → icon-mcp.tsx} +0 -0
- /package/client/features/dev/{BlobatarShapesPage.tsx → blobatar-shapes-page.tsx} +0 -0
- /package/client/features/dev/{HarnessDebugPage.tsx → harness-debug-page.tsx} +0 -0
- /package/client/features/dev/{TextureLabPage.tsx → texture-lab-page.tsx} +0 -0
- /package/client/features/dev/{ToolCallsPage.tsx → tool-calls-page.tsx} +0 -0
- /package/client/features/drawings/{DrawingLayer.tsx → drawing-layer.tsx} +0 -0
- /package/client/features/home/{WorkspacePreview.tsx → workspace-preview.tsx} +0 -0
- /package/client/features/overview/{useGridReconcile.ts → use-grid-reconcile.ts} +0 -0
- /package/client/features/scratchpad/{ScratchpadControls.tsx → scratchpad-controls.tsx} +0 -0
- /package/client/features/settings/{SettingsLayout.tsx → settings-layout.tsx} +0 -0
- /package/client/features/update/{UpdateControl.tsx → update-control.tsx} +0 -0
- /package/client/features/workspace/{UnavailablePage.tsx → unavailable-page.tsx} +0 -0
- /package/client/features/workspace/{useFitsSplitLayout.ts → use-fits-split-layout.ts} +0 -0
- /package/client/features/workspace/{WorkspaceContext.tsx → workspace-context.tsx} +0 -0
- /package/client/features/workspace/{WorkspaceLayoutContext.tsx → workspace-layout-context.tsx} +0 -0
- /package/server/{bundle-queue.ts → applets/bundle-queue.ts} +0 -0
- /package/server/{applet-log.ts → applets/log.ts} +0 -0
- /package/server/{cli-ui.ts → cli/ui.ts} +0 -0
- /package/server/{workspace-config.ts → workspaces/config.ts} +0 -0
- /package/server/{icon.ts → workspaces/icon.ts} +0 -0
- /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
|
|
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
|
-
|
|
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<
|
|
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
|
-
|
|
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
|
|
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:
|
|
74
|
+
export function findHarnessExecutable(type: WorkspaceType, path?: string): string | null {
|
|
71
75
|
const config = executableConfig[type]
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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:
|
|
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:
|
|
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
|
-
: {
|
|
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
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { StreamEvent } from '@/lib/types'
|
|
2
|
+
import { applyEvents } from '@/lib/format'
|
|
3
|
+
|
|
4
|
+
export class ForkUnsupportedError extends Error {}
|
|
5
|
+
|
|
6
|
+
export function inheritedHistoryBoundary(events: StreamEvent[]) {
|
|
7
|
+
const view = applyEvents(events)
|
|
8
|
+
return {
|
|
9
|
+
forkedThroughMessageId: view.turns.at(-1)?.id,
|
|
10
|
+
forkedNoticeIds: view.notices.map(notice => notice.id)
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Hermes Agent — integration research
|
|
2
2
|
|
|
3
|
-
Protocol notes behind
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
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
|
-
|
|
158
|
+
Moi keeps the first and drops the duplicate label.
|
|
159
159
|
|
|
160
|
-
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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
|
|
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 |
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
381
|
-
and
|
|
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
|
|
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
|
|
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
|
|
399
|
-
way — except
|
|
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
|
|
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
|
-
**
|
|
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
|
|
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
|
|
511
|
-
|
|
512
|
-
gateway-only things
|
|
513
|
-
**subagent lanes**, and **compaction visibility** — all of which
|
|
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
|
|
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
|
|
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".
|
|
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
|
-
|
|
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.
|
|
535
|
-
- **Non-local terminal backends** (docker/ssh/modal/daytona/…).
|
|
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
|
-
|
|
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/
|
|
587
|
-
`client/features/dev/
|
|
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
|
|
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.**
|
|
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
|
|
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
|
|
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`).
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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.
|
|
831
|
-
from
|
|
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
|
|
24
|
+
// Workspace directory the agent runs in — the Moi workspace path.
|
|
25
25
|
path: string
|
|
26
26
|
name?: string
|
|
27
27
|
isDefault: boolean
|