moi-computer 0.12.1-next.0 → 0.12.1-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -26
- package/bin/moi.mjs +2 -2
- package/client/AGENTS.md +5 -2
- package/client/api/app-config.ts +3 -2
- package/client/api/workspace-keys.ts +1 -1
- 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} +18 -23
- 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-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 +4 -4
- package/client/features/chat/{ChatPanel.tsx → chat-panel.tsx} +11 -11
- package/client/features/chat/{ChatPopup.tsx → chat-popup.tsx} +1 -1
- 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} +8 -7
- package/client/features/chat/composer/{ModelPicker.tsx → model-picker.tsx} +1 -1
- package/client/features/chat/composer/{useWorkspaceComposerState.tsx → use-workspace-composer-state.tsx} +12 -28
- package/client/features/chat/composer/{useWorkspaceSkillUpdates.ts → use-workspace-skill-updates.ts} +1 -1
- package/client/features/chat/connection/chat-frames.ts +1 -1
- package/client/features/chat/messages/{ChatEmptyState.tsx → chat-empty-state.tsx} +4 -4
- package/client/features/chat/messages/{MarkdownContent.tsx → markdown-content.tsx} +1 -1
- 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 +2 -2
- package/client/features/chat/sessions/{ChatSelector.tsx → chat-selector.tsx} +2 -2
- package/client/features/chat/sessions/{useSelectedSession.ts → use-selected-session.ts} +2 -2
- package/client/features/chat/{useChat.ts → use-chat.ts} +3 -3
- package/client/features/collab/proxy-user.ts +1 -1
- 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/{useViewSketch.ts → use-view-sketch.ts} +1 -1
- 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} +14 -18
- package/client/features/overview/api.ts +2 -2
- package/client/features/overview/default/registry.tsx +1 -1
- package/client/features/overview/default/{ViewsWidget.tsx → views-widget.tsx} +1 -1
- package/client/features/overview/{HiddenPanel.tsx → hidden-panel.tsx} +2 -2
- package/client/features/overview/{Overview.tsx → overview.tsx} +6 -6
- 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 +1 -1
- package/client/features/views/{PendingViewScreen.tsx → pending-view-screen.tsx} +7 -4
- package/client/features/views/{useViewActions.ts → use-view-actions.ts} +2 -2
- package/client/features/views/{useViewDrafts.ts → use-view-drafts.ts} +15 -6
- package/client/features/views/{ViewManager.tsx → view-manager.tsx} +3 -3
- package/client/features/views/view-submission.ts +1 -1
- 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 +1 -1
- package/client/features/workspace/moi-context.ts +1 -1
- 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/{ThemePanel.tsx → theme-panel.tsx} +3 -3
- package/client/features/workspace/{useWorkspaceNavigation.ts → use-workspace-navigation.ts} +2 -2
- package/client/features/workspace/{WorkspaceScreen.tsx → workspace-content.tsx} +27 -30
- package/client/features/workspace/workspace-identity.tsx +40 -0
- package/client/features/workspace/{WorkspaceMenu.tsx → workspace-menu.tsx} +3 -3
- 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/lib/agent-availability.ts +0 -5
- package/client/main.tsx +1 -1
- package/client/runtime/{useWorkspaceEvents.ts → use-workspace-events.ts} +3 -12
- package/dist/chunk-08ndj2rg.js +2 -0
- package/dist/chunk-2x040tmg.js +68 -0
- package/dist/chunk-3smxq0ts.js +1 -0
- package/dist/{chunk-am1x230f.js → chunk-68ch5hs8.js} +1 -1
- package/dist/{chunk-yvzhwtfa.js → chunk-9vg3xa81.js} +2 -2
- package/dist/chunk-c2p00p9j.css +1 -0
- package/dist/chunk-cs833y9j.js +1 -0
- package/dist/{chunk-gps4qc38.js → chunk-d7cbm65e.js} +1 -1
- package/dist/{chunk-j905va8r.js → chunk-hvh9f5h0.js} +1 -1
- package/dist/{chunk-vqpkqtdr.js → chunk-jvyvwwv3.js} +1 -1
- package/dist/chunk-nwevqe86.js +10 -0
- package/dist/{chunk-hzwr8dp8.js → chunk-q0gbdts4.js} +3 -3
- 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 +1 -1
- package/lib/moi-context.ts +2 -2
- package/lib/scratchpad-skew.ts +3 -3
- package/lib/types.ts +28 -20
- package/lib/update.ts +1 -1
- package/package.json +5 -2
- package/server/AGENTS.md +10 -4
- package/server/README.md +102 -0
- package/server/api/harnesses.ts +56 -0
- package/server/{api.ts → api/index.ts} +85 -97
- package/server/app-config.ts +24 -12
- 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 +1 -1
- 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} +2 -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/{views.ts → applets/views.ts} +7 -7
- 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} +9 -9
- 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 -3252
- package/server/collab/manager.ts +3 -3
- package/server/collab/skill/index.ts +2 -2
- package/server/control.ts +20 -20
- package/server/harness/README.md +47 -25
- package/server/harness/acp/NOTES.md +11 -11
- package/server/harness/acp/archived.ts +3 -3
- package/server/harness/acp/client.ts +2 -2
- package/server/harness/acp/run-durations.ts +1 -1
- package/server/harness/acp/session.ts +5 -5
- package/server/harness/auth.ts +303 -0
- package/server/harness/claude-code/NOTES.md +9 -7
- package/server/harness/claude-code/auth.ts +125 -17
- package/server/harness/claude-code/index.ts +2 -1
- package/server/harness/claude-code/mcp.ts +1 -1
- package/server/harness/claude-code/session.ts +10 -7
- package/server/harness/codex/NOTES.md +12 -12
- package/server/harness/codex/auth.ts +86 -19
- package/server/harness/codex/client.ts +17 -13
- package/server/harness/codex/index.ts +2 -1
- package/server/harness/codex/permissions.ts +3 -3
- package/server/harness/codex/probe.ts +3 -5
- package/server/harness/codex/session.ts +16 -13
- package/server/harness/codex/transport.ts +5 -5
- package/server/harness/executable.ts +42 -18
- 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 +1 -1
- package/server/harness/openclaw/compat.ts +1 -1
- package/server/harness/openclaw/session.ts +5 -2
- package/server/harness/registry.ts +1 -1
- package/server/harness/shell-path.ts +31 -21
- package/server/harness/types.ts +9 -2
- 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 +2 -2
- package/server/{session-archive.ts → sessions/archive.ts} +5 -5
- package/server/{attachment-message.ts → sessions/attachment-message.ts} +1 -1
- package/server/{session-config.ts → sessions/config.ts} +1 -1
- package/server/{session-lifecycle.ts → sessions/lifecycle.ts} +3 -3
- package/server/{pending-views.ts → sessions/pending-views.ts} +3 -3
- package/server/{selected-session.ts → sessions/selected.ts} +1 -1
- package/server/{session-store.ts → sessions/store.ts} +1 -1
- package/server/{view-sessions.ts → sessions/view-sessions.ts} +9 -9
- 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 +3 -3
- package/server/web.ts +14 -7
- package/server/{env-apply.ts → workspaces/env-apply.ts} +5 -5
- package/server/{workspace-env.ts → workspaces/env.ts} +3 -3
- package/server/{workspace-import.ts → workspaces/import.ts} +4 -4
- package/server/{workspace-init.ts → workspaces/init.ts} +5 -5
- 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} +3 -3
- package/server/{required-env.ts → workspaces/required-env.ts} +3 -3
- package/server/{moi-scaffold.ts → workspaces/scaffold.ts} +3 -3
- 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 +12 -12
- package/workspace/.claude/skills/moi-workspace/references/COLLAB.md +2 -2
- 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/composer/banners/AgentAvailabilityBanner.tsx +0 -101
- package/client/features/home/workspace-setup/ImportWorkspaceDialog.tsx +0 -92
- package/client/features/overview/WorkspaceName.tsx +0 -60
- package/dist/chunk-1zhnhy00.js +0 -1
- package/dist/chunk-27501vke.js +0 -1
- package/dist/chunk-9xtv6djt.js +0 -2
- package/dist/chunk-darpsw65.js +0 -1
- package/dist/chunk-n33w9y38.js +0 -10
- package/dist/chunk-r63ks44z.js +0 -68
- package/dist/chunk-wd46nk26.css +0 -1
- package/dist/chunk-xgt7vxt9.js +0 -1
- package/server/agent.ts +0 -223
- /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/{tabs.ts → workspaces/tabs.ts} +0 -0
- /package/server/{theme.ts → workspaces/theme.ts} +0 -0
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
An extendable visual workspace where your AI agents build their own UI.
|
|
12
12
|
See [moi.computer](https://moi.computer) for what it is and how it works.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Moi gives your agent of choice a UI it can reshape on the fly and grow into your
|
|
15
15
|
personal software. Under the hood, the agent writes and embeds live components
|
|
16
16
|
wired to real data: APIs, local files and commands, MCP servers.
|
|
17
17
|
|
|
@@ -28,7 +28,7 @@ Works with the harness you already use:
|
|
|
28
28
|
|
|
29
29
|
- **Bring your own agent**. Connect the agent you already use.
|
|
30
30
|
- **Workspace**. The folder where your agent (e.g. Claude Code) runs and keeps
|
|
31
|
-
its data. It gets a special skill that teaches it how to communicate with
|
|
31
|
+
its data. It gets a special skill that teaches it how to communicate with Moi.
|
|
32
32
|
- **Theme**. The agent can modify the appearance of the workspace for you:
|
|
33
33
|
fonts, color scheme and more.
|
|
34
34
|
- **Scratchpad**. A shared canvas where you ideate together with the agent: ask
|
|
@@ -59,7 +59,7 @@ Works with the harness you already use:
|
|
|
59
59
|
|
|
60
60
|
# Quick start
|
|
61
61
|
|
|
62
|
-
Make sure [Bun](https://bun.sh) 1.3 or newer is installed.
|
|
62
|
+
Make sure [Bun](https://bun.sh) 1.3 or newer is installed. Moi uses it to run the web server and bundle the dynamic UI.
|
|
63
63
|
|
|
64
64
|
Install the `moi-computer` package from npm and start the web UI:
|
|
65
65
|
|
|
@@ -73,12 +73,12 @@ Then connect your agent: [Claude Code and Codex](#claude-code-and-codex),
|
|
|
73
73
|
|
|
74
74
|
Learn how to:
|
|
75
75
|
|
|
76
|
-
- [Run
|
|
77
|
-
- [Update
|
|
76
|
+
- [Run Moi as a service](#run-moi-as-a-service)
|
|
77
|
+
- [Update Moi](#update-moi)
|
|
78
78
|
|
|
79
79
|
# How it works
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
Moi runs locally as a CLI and web UI connected to your agent. The workspace
|
|
82
82
|
skill teaches the agent how to call the CLI, which updates the UI using your
|
|
83
83
|
files, commands, APIs, and MCP servers.
|
|
84
84
|
|
|
@@ -95,21 +95,21 @@ flowchart LR
|
|
|
95
95
|
Moi also stores the all widgets and views as code to keep the workspace filesystem
|
|
96
96
|
as a source of truth.
|
|
97
97
|
|
|
98
|
-
Updates installed from the UI restart
|
|
98
|
+
Updates installed from the UI restart Moi and reload the browser automatically.
|
|
99
99
|
The app checks npm at most once an hour while it is open, retrying in five
|
|
100
100
|
minutes if the registry could not be reached; a closed app makes no network
|
|
101
101
|
calls of its own.
|
|
102
102
|
|
|
103
103
|
# Connect an agent
|
|
104
104
|
|
|
105
|
-
A workspace is the folder where your agent runs and stores its data.
|
|
105
|
+
A workspace is the folder where your agent runs and stores its data. Moi adds
|
|
106
106
|
a `.moi/` folder and the skills the agent needs to work with the UI.
|
|
107
107
|
|
|
108
108
|
You can connect a workspace in either of these ways:
|
|
109
109
|
|
|
110
110
|
- Open [http://localhost:13337](http://localhost:13337) and create a workspace
|
|
111
|
-
or import one that
|
|
112
|
-
- Run `moi init` in a folder.
|
|
111
|
+
or import one that Moi found on your computer.
|
|
112
|
+
- Run `moi init` in a folder. Moi detects the harness from the folder's Hermes
|
|
113
113
|
profile, OpenClaw agent, or Claude Code or Codex history. If detection is
|
|
114
114
|
ambiguous, it asks you to choose a harness.
|
|
115
115
|
|
|
@@ -118,14 +118,14 @@ You can connect a workspace in either of these ways:
|
|
|
118
118
|
Open Claude Code or Codex in your project folder and paste this prompt:
|
|
119
119
|
|
|
120
120
|
```
|
|
121
|
-
Set up the
|
|
121
|
+
Set up the Moi workspace for this project. Fetch https://moi.computer/INSTALL.md, and follow the steps.
|
|
122
122
|
```
|
|
123
123
|
|
|
124
124
|
To set it up manually, run:
|
|
125
125
|
|
|
126
126
|
```sh
|
|
127
127
|
moi init --harness=claude-code # or --harness=codex
|
|
128
|
-
moi start # or run
|
|
128
|
+
moi start # or run Moi as a service
|
|
129
129
|
```
|
|
130
130
|
|
|
131
131
|
The project folder becomes the workspace. You can create as many workspaces as
|
|
@@ -137,17 +137,17 @@ you need.
|
|
|
137
137
|
more always-on agents. Its channels connect agents to Slack and other
|
|
138
138
|
messaging services.
|
|
139
139
|
|
|
140
|
-
|
|
140
|
+
Moi connects each OpenClaw agent to one workspace. See the
|
|
141
141
|
[OpenClaw documentation](https://docs.openclaw.ai/cli/agents) to add or manage
|
|
142
142
|
agents.
|
|
143
143
|
|
|
144
|
-
Run `moi openclaw init` to connect your agent. If
|
|
144
|
+
Run `moi openclaw init` to connect your agent. If Moi finds more than one, it
|
|
145
145
|
lists them so you can rerun the command with the agent you want:
|
|
146
146
|
|
|
147
147
|
```sh
|
|
148
148
|
moi openclaw init
|
|
149
149
|
moi openclaw init <agent> # only needed when you have multiple agents
|
|
150
|
-
moi start # or run
|
|
150
|
+
moi start # or run Moi as a service
|
|
151
151
|
```
|
|
152
152
|
|
|
153
153
|
Your agent's workspace will show up at `http://localhost:13337`.
|
|
@@ -157,31 +157,31 @@ Your agent's workspace will show up at `http://localhost:13337`.
|
|
|
157
157
|
[Hermes](https://hermes-agent.nousresearch.com/) is a self-hosted personal
|
|
158
158
|
agent from Nous Research.
|
|
159
159
|
|
|
160
|
-
|
|
160
|
+
Moi connects each Hermes profile to one workspace. A profile is a separate
|
|
161
161
|
agent identity with its own model, keys, persona, skills, and memories.
|
|
162
162
|
|
|
163
|
-
Run `moi hermes init` to connect your profile. If
|
|
163
|
+
Run `moi hermes init` to connect your profile. If Moi finds more than one, it
|
|
164
164
|
lists them so you can rerun the command with the profile you want:
|
|
165
165
|
|
|
166
166
|
```sh
|
|
167
167
|
moi hermes init
|
|
168
168
|
moi hermes init <profile> # only needed when you have multiple profiles
|
|
169
|
-
moi start # or run
|
|
169
|
+
moi start # or run Moi as a service
|
|
170
170
|
```
|
|
171
171
|
|
|
172
172
|
The profile's workspace appears at `http://localhost:13337`. To add another,
|
|
173
173
|
create it with `hermes profile create <name>`, then run `moi hermes init` again.
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
Moi connects to Hermes through its built-in
|
|
176
176
|
[Agent Client Protocol](https://agentclientprotocol.com/) server. It starts a
|
|
177
177
|
`hermes -p <profile> acp` process and communicates over stdio, so there is no
|
|
178
178
|
gateway, port, or additional API key to configure.
|
|
179
179
|
|
|
180
|
-
# Manage
|
|
180
|
+
# Manage Moi
|
|
181
181
|
|
|
182
|
-
## Run
|
|
182
|
+
## Run Moi as a service
|
|
183
183
|
|
|
184
|
-
Instead of keeping `moi start` in a terminal, install
|
|
184
|
+
Instead of keeping `moi start` in a terminal, install Moi as a user-level
|
|
185
185
|
service. It starts on login, restarts on crash, and survives reboots
|
|
186
186
|
(launchd on macOS, a systemd user unit on Linux; no root needed):
|
|
187
187
|
|
|
@@ -198,10 +198,10 @@ Anything your agents need belongs in the workspace env (`moi env set` or
|
|
|
198
198
|
`moi service install --env MY_TOKEN,OTHER`.
|
|
199
199
|
Rerun `moi service install` after changing captured vars (or moving bun). On
|
|
200
200
|
macOS the first install may show a "background item added" notification for
|
|
201
|
-
"moi"; that is the
|
|
201
|
+
"moi"; that is the Moi service. On headless Linux, lingering is enabled
|
|
202
202
|
automatically when possible so the service outlives your SSH session.
|
|
203
203
|
|
|
204
|
-
## Update
|
|
204
|
+
## Update Moi
|
|
205
205
|
|
|
206
206
|
```sh
|
|
207
207
|
moi update # update to the latest release
|
|
@@ -218,8 +218,8 @@ the update happened.
|
|
|
218
218
|
|
|
219
219
|
# No crypto token
|
|
220
220
|
|
|
221
|
-
|
|
222
|
-
any chain, and never will. Any token using the
|
|
221
|
+
Moi has **no** cryptocurrency, token, coin, or NFT, official or otherwise, on
|
|
222
|
+
any chain, and never will. Any token using the Moi name, logo, or the
|
|
223
223
|
maintainer's name (on pump.fun, Solana, or anywhere else) is an unauthorized
|
|
224
224
|
scam with no affiliation to, endorsement from, or benefit to this project.
|
|
225
225
|
The maintainer will never announce, endorse, or accept proceeds from a token.
|
package/bin/moi.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// dynamic import placed AFTER the Bun guard below: a static import would be
|
|
6
6
|
// hoisted and fail before the guard ever runs.
|
|
7
7
|
if (!process.versions.bun) {
|
|
8
|
-
console.error('
|
|
8
|
+
console.error('Moi requires Bun (Node is not supported).')
|
|
9
9
|
console.error('Install Bun: curl -fsSL https://bun.sh/install | bash')
|
|
10
10
|
console.error('Then run: bun i -g moi-computer')
|
|
11
11
|
process.exit(1)
|
|
@@ -17,7 +17,7 @@ if (!process.versions.bun) {
|
|
|
17
17
|
// `?.` because a Bun without `Bun.semver` is old enough to reject anyway.
|
|
18
18
|
const MIN_BUN = '1.3.0'
|
|
19
19
|
if (!Bun.semver?.satisfies(Bun.version, `>=${MIN_BUN}`)) {
|
|
20
|
-
console.error(`
|
|
20
|
+
console.error(`Moi requires Bun ${MIN_BUN} or newer (this is Bun ${Bun.version}).`)
|
|
21
21
|
console.error('Upgrade Bun: bun upgrade')
|
|
22
22
|
process.exit(1)
|
|
23
23
|
}
|
package/client/AGENTS.md
CHANGED
|
@@ -12,12 +12,14 @@ Before editing host-app UI, read `../DESIGN.md` and the relevant rules in `../.a
|
|
|
12
12
|
|
|
13
13
|
## Conventions
|
|
14
14
|
|
|
15
|
-
-
|
|
15
|
+
- Follow the [repo file naming rules](../AGENTS.md#file-naming-and-references): component, hook, and test filenames use kebab-case.
|
|
16
|
+
|
|
17
|
+
- UI components in `components/ui/` are host facades over the shared Moi registry components built on Base UI React. Local compatibility copies explain why they cannot re-export yet.
|
|
16
18
|
- `lib/cn.ts` is `clsx` + `tailwind-merge`.
|
|
17
19
|
|
|
18
20
|
## Vendored React
|
|
19
21
|
|
|
20
|
-
React is not bundled into the app. It ships as locally-vendored ESM in `vendor/react/` (development and production builds, generated by `scripts/build-vendor.ts`) and is served at `/vendor/react/*`, so
|
|
22
|
+
React is not bundled into the app. It ships as locally-vendored ESM in `vendor/react/` (development and production builds, generated by `scripts/build-vendor.ts`) and is served at `/vendor/react/*`, so Moi runs fully offline — no CDN fetch.
|
|
21
23
|
|
|
22
24
|
- An importmap in `index.html` maps `react`, `react-dom`, and the jsx runtimes to the `/vendor/react/*` URLs. A preload script in the same file imports them, stores the modules on `globalThis.__esm`, and only then calls `__init` to mount the app — this load order is load-bearing.
|
|
23
25
|
- `externalize-react.ts` is a Bun bundler plugin that replaces those specifiers in bundled code with reads from `globalThis.__esm`. The point is ONE shared React instance across the host app and every applet/widget bundle (which resolve the same importmap); bundling React in would give each its own copy and break hooks.
|
|
@@ -27,6 +29,7 @@ React is not bundled into the app. It ships as locally-vendored ESM in `vendor/r
|
|
|
27
29
|
## Frontend boundaries
|
|
28
30
|
|
|
29
31
|
- `app/` owns routes and the app shell. Route files load data and compose features; keep feature UI out of them.
|
|
32
|
+
- `dev/` is the separate entrypoint for isolated sandboxes. `dev/index.ts` selects the sandbox by pathname; each sandbox installs its own mocks before loading config or mounting. Register its HTML route in `server/web.ts` and keep mocks out of normal app startup.
|
|
30
33
|
- `features/<name>/` owns that feature's components, hooks, state, API hooks, and nearby tests.
|
|
31
34
|
- `components/ui/` contains host facades for shared UI primitives. `components/shared/` contains reusable app components with no feature knowledge.
|
|
32
35
|
- `api/` contains shared request helpers, query keys, and query policies. Feature endpoints stay in the feature's `api.ts`.
|
package/client/api/app-config.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { useSyncExternalStore } from 'react'
|
|
|
3
3
|
import type { ClientAppConfig } from '@/lib/types'
|
|
4
4
|
import { EXPERIMENTAL_DEFAULTS } from '@/lib/experimental'
|
|
5
5
|
|
|
6
|
-
import { onWorkspaceEventsReconnect } from '@/client/runtime/
|
|
6
|
+
import { onWorkspaceEventsReconnect } from '@/client/runtime/use-workspace-events'
|
|
7
7
|
|
|
8
8
|
import { requestJson } from './http'
|
|
9
9
|
|
|
@@ -14,7 +14,8 @@ import { requestJson } from './http'
|
|
|
14
14
|
// reconnecting is that signal, so the store re-fetches there.
|
|
15
15
|
|
|
16
16
|
const DEFAULTS: ClientAppConfig = {
|
|
17
|
-
|
|
17
|
+
environment: 'local',
|
|
18
|
+
demo: false,
|
|
18
19
|
experimental: { ...EXPERIMENTAL_DEFAULTS },
|
|
19
20
|
demoInstallUrl: 'https://moi.computer'
|
|
20
21
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const workspaceKeys = {
|
|
2
2
|
all: ['workspaces'] as const,
|
|
3
3
|
discover: ['workspaces', 'discover'] as const,
|
|
4
|
-
|
|
4
|
+
creationInfo: ['workspaces', 'creation-info'] as const,
|
|
5
5
|
preview: (id: string) => ['workspaces', 'preview', id] as const,
|
|
6
6
|
layout: (id: string) => ['workspaces', 'layout', id] as const,
|
|
7
7
|
widgets: (id: string) => ['workspaces', 'widgets', id] as const,
|
|
@@ -4,8 +4,8 @@ import { Redirect, Route, Switch, useLocation } from 'wouter'
|
|
|
4
4
|
|
|
5
5
|
import { setWorkspaceSwitchHandler } from '@/client/features/chat/connection/chat-connection'
|
|
6
6
|
|
|
7
|
-
import { HomeRoute } from './routes/
|
|
8
|
-
import { WorkspaceRoute } from './routes/
|
|
7
|
+
import { HomeRoute } from './routes/home-route'
|
|
8
|
+
import { WorkspaceRoute } from './routes/workspace-route'
|
|
9
9
|
|
|
10
10
|
// Dev-only playground routes: colocated in features/dev and loaded as a
|
|
11
11
|
// separate lazy chunk. The NODE_ENV gate is statically false in the prod
|
|
@@ -14,7 +14,7 @@ import { WorkspaceRoute } from './routes/WorkspaceRoute'
|
|
|
14
14
|
// In prod /dev redirects home.
|
|
15
15
|
const DevRoutes =
|
|
16
16
|
process.env.NODE_ENV === 'development'
|
|
17
|
-
? lazy(() => import('@/client/features/dev/
|
|
17
|
+
? lazy(() => import('@/client/features/dev/dev-routes'))
|
|
18
18
|
: null
|
|
19
19
|
|
|
20
20
|
function DevLazy() {
|
|
@@ -39,8 +39,8 @@ export function AppRouter() {
|
|
|
39
39
|
|
|
40
40
|
return (
|
|
41
41
|
<Switch>
|
|
42
|
-
<Route path="/" component={HomeRoute} />
|
|
43
42
|
<Route path="/dev/*?" component={DevLazy} />
|
|
43
|
+
<Route path="/" component={HomeRoute} />
|
|
44
44
|
{/* The wildcard is the destination path (`views/orders`, `overview`, …) —
|
|
45
45
|
the URL is the tab address, read downstream with `useParams`. This
|
|
46
46
|
pattern is its only definition. Keyed by workspace id only, so tab
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SidebarLayout } from '@/client/app/shell/
|
|
2
|
-
import { HomePage } from '@/client/features/home/
|
|
1
|
+
import { SidebarLayout } from '@/client/app/shell/sidebar-layout'
|
|
2
|
+
import { HomePage } from '@/client/features/home/home-page'
|
|
3
3
|
|
|
4
4
|
// The `/` route: the app shell wrapping the workspaces view.
|
|
5
5
|
export function HomeRoute() {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
+
import { useWorkspaceTheme } from '@/client/runtime/workspace-theme'
|
|
1
2
|
import { CollabProvider, useCollabEnabled } from '@/client/features/collab'
|
|
2
3
|
import { useQueryClient } from '@tanstack/react-query'
|
|
3
4
|
|
|
4
5
|
import { workspaceKeys } from '@/client/api/workspace-keys'
|
|
5
6
|
import { useAppConfig } from '@/client/api/app-config'
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Workspace } from '@/client/features/workspace/WorkspaceContext'
|
|
7
|
+
import { SidebarLayout } from '@/client/app/shell/sidebar-layout'
|
|
8
|
+
import { useSelectedSession } from '@/client/features/chat/sessions/use-selected-session'
|
|
9
|
+
import { useAppletCacheInvalidation } from '@/client/features/applets/use-applet'
|
|
10
|
+
import { Workspace } from '@/client/features/workspace/workspace-context'
|
|
11
11
|
import {
|
|
12
12
|
WorkspaceLayoutProvider,
|
|
13
13
|
useWorkspaceLayoutCtx
|
|
14
|
-
} from '@/client/features/workspace/
|
|
15
|
-
import { WorkspaceScreen } from '@/client/features/workspace/
|
|
14
|
+
} from '@/client/features/workspace/workspace-layout-context'
|
|
15
|
+
import { WorkspaceScreen } from '@/client/features/workspace/workspace-screen'
|
|
16
16
|
import { useViews } from '@/client/features/views/api'
|
|
17
17
|
import { useWidgets } from '@/client/features/overview/api'
|
|
18
|
-
import { useWorkspaceEvent } from '@/client/runtime/
|
|
18
|
+
import { useWorkspaceEvent } from '@/client/runtime/use-workspace-events'
|
|
19
19
|
|
|
20
20
|
type WorkspaceRouteProps = {
|
|
21
21
|
id: string
|
|
@@ -41,7 +41,8 @@ function WorkspaceContent({ id }: WorkspaceRouteProps) {
|
|
|
41
41
|
const collabEnabled = useCollabEnabled()
|
|
42
42
|
const queryClient = useQueryClient()
|
|
43
43
|
const [selectedSessionId] = useSelectedSession()
|
|
44
|
-
const { isLoading: layoutLoading } = useWorkspaceLayoutCtx()
|
|
44
|
+
const { isLoading: layoutLoading, layout } = useWorkspaceLayoutCtx()
|
|
45
|
+
useWorkspaceTheme(layout.theme)
|
|
45
46
|
const widgets = useWidgets(id)
|
|
46
47
|
const views = useViews(id)
|
|
47
48
|
useAppletCacheInvalidation()
|
|
@@ -60,24 +61,18 @@ function WorkspaceContent({ id }: WorkspaceRouteProps) {
|
|
|
60
61
|
}
|
|
61
62
|
})
|
|
62
63
|
|
|
63
|
-
const
|
|
64
|
+
const contentPending =
|
|
64
65
|
layoutLoading || selectedSessionId === undefined || widgets.isLoading || views.isLoading
|
|
65
66
|
|
|
66
67
|
return (
|
|
67
68
|
<SidebarLayout>
|
|
68
|
-
{
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<WorkspaceScreen
|
|
76
|
-
key={collabEnabled ? 'browser-tab' : 'shared'}
|
|
77
|
-
widgets={widgets.data}
|
|
78
|
-
views={views.data ?? []}
|
|
79
|
-
/>
|
|
80
|
-
)}
|
|
69
|
+
{/* Reset the screen when switching between shared and browser tab state. */}
|
|
70
|
+
<WorkspaceScreen
|
|
71
|
+
key={collabEnabled ? 'browser-tab' : 'shared'}
|
|
72
|
+
contentPending={contentPending}
|
|
73
|
+
widgets={widgets.data}
|
|
74
|
+
views={views.data ?? []}
|
|
75
|
+
/>
|
|
81
76
|
</SidebarLayout>
|
|
82
77
|
)
|
|
83
78
|
}
|
|
@@ -11,14 +11,14 @@ import { Link, useLocation } from 'wouter'
|
|
|
11
11
|
|
|
12
12
|
import { useAppConfig } from '@/client/api/app-config'
|
|
13
13
|
import { useReorderWorkspaces, useWorkspaces } from '@/client/features/home/api'
|
|
14
|
-
import { UpdateButton, useUpdateControl } from '@/client/features/update/
|
|
14
|
+
import { UpdateButton, useUpdateControl } from '@/client/features/update/update-control'
|
|
15
15
|
import { workspaceKeys } from '@/client/api/workspace-keys'
|
|
16
|
-
import { useWorkspaceEvent } from '@/client/runtime/
|
|
17
|
-
import { CreateWorkspaceDialog } from '@/client/features/
|
|
18
|
-
import { DemoDialog } from '@/client/features/
|
|
19
|
-
import { ReorderableList } from '@/client/components/shared/
|
|
20
|
-
import type { ReorderableRenderState } from '@/client/components/shared/
|
|
21
|
-
import { WorkspaceIcon } from '@/client/components/shared/
|
|
16
|
+
import { useWorkspaceEvent } from '@/client/runtime/use-workspace-events'
|
|
17
|
+
import { CreateWorkspaceDialog } from '@/client/features/workspace/add/create-workspace-dialog'
|
|
18
|
+
import { DemoDialog } from '@/client/features/demo/demo-dialog'
|
|
19
|
+
import { ReorderableList } from '@/client/components/shared/reorderable-list'
|
|
20
|
+
import type { ReorderableRenderState } from '@/client/components/shared/reorderable-list'
|
|
21
|
+
import { WorkspaceIcon } from '@/client/components/shared/workspace-icon'
|
|
22
22
|
import { Button, buttonVariants } from '@/client/components/ui/button'
|
|
23
23
|
import {
|
|
24
24
|
Tooltip,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
TooltipProvider,
|
|
27
27
|
TooltipTrigger
|
|
28
28
|
} from '@/client/components/ui/tooltip'
|
|
29
|
-
import { workspaceDisplayName } from '@/client/features/
|
|
29
|
+
import { workspaceDisplayName } from '@/client/features/workspace/workspace-presentation'
|
|
30
30
|
import { cn } from '@/client/lib/cn'
|
|
31
31
|
import type { WorkspaceEntry } from '@/lib/types'
|
|
32
32
|
|
|
@@ -147,10 +147,10 @@ function Sidebar({ workspaces }: SidebarProps) {
|
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
function SidebarFooterAction() {
|
|
150
|
-
const {
|
|
150
|
+
const { demo } = useAppConfig()
|
|
151
151
|
const updateControl = useUpdateControl()
|
|
152
152
|
|
|
153
|
-
if (
|
|
153
|
+
if (demo) {
|
|
154
154
|
return (
|
|
155
155
|
<DemoDialog
|
|
156
156
|
trigger={
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="color-scheme" content="light" />
|
|
7
|
+
<title>Dev sandbox · Moi</title>
|
|
8
|
+
<link rel="icon" type="image/png" href="../assets/favicon.png" />
|
|
9
|
+
<script type="importmap">
|
|
10
|
+
{
|
|
11
|
+
"imports": {
|
|
12
|
+
"react": "/vendor/react/react.js",
|
|
13
|
+
"react/jsx-runtime": "/vendor/react/react-jsx-runtime.js",
|
|
14
|
+
"react/jsx-dev-runtime": "/vendor/react/react-jsx-dev-runtime.js",
|
|
15
|
+
"react-dom": "/vendor/react/react-dom.js",
|
|
16
|
+
"react-dom/client": "/vendor/react/react-dom-client.js"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
<link rel="stylesheet" href="../index.css" />
|
|
21
|
+
</head>
|
|
22
|
+
<body>
|
|
23
|
+
<div id="root"></div>
|
|
24
|
+
<script type="module" src="./index.ts"></script>
|
|
25
|
+
<script type="module">
|
|
26
|
+
const [react, jsxRuntime, jsxDevRuntime, reactDom, reactDomClient] = await Promise.all([
|
|
27
|
+
import('react'),
|
|
28
|
+
import('react/jsx-runtime'),
|
|
29
|
+
import('react/jsx-dev-runtime'),
|
|
30
|
+
import('react-dom'),
|
|
31
|
+
import('react-dom/client')
|
|
32
|
+
])
|
|
33
|
+
globalThis.__esm = {
|
|
34
|
+
react,
|
|
35
|
+
'react/jsx-runtime': jsxRuntime,
|
|
36
|
+
'react/jsx-dev-runtime': jsxDevRuntime,
|
|
37
|
+
'react-dom': reactDom,
|
|
38
|
+
'react-dom/client': reactDomClient
|
|
39
|
+
}
|
|
40
|
+
globalThis.__init(document.getElementById('root'))
|
|
41
|
+
</script>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import '../structured-clone-shim'
|
|
2
|
+
import 'blobatar/motion.css'
|
|
3
|
+
|
|
4
|
+
// Load only the selected sandbox. Each sandbox installs its own mocks.
|
|
5
|
+
globalThis.__init = async element => {
|
|
6
|
+
switch (location.pathname) {
|
|
7
|
+
case '/dev/workspace-setup/preview': {
|
|
8
|
+
const { mountSetupPreview } = await import('../features/dev/workspace-setup-preview')
|
|
9
|
+
await mountSetupPreview(element)
|
|
10
|
+
break
|
|
11
|
+
}
|
|
12
|
+
default:
|
|
13
|
+
element.textContent = 'Unknown dev sandbox'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type ReactNode } from 'react'
|
|
2
2
|
|
|
3
3
|
import { AppletPresenceProvider } from '@/client/features/collab'
|
|
4
|
-
import { useWorkspaceId } from '@/client/features/workspace/
|
|
4
|
+
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
|
|
5
5
|
|
|
6
6
|
import { type AppletSegment, appletId, appletStyleKey } from './applet-cache'
|
|
7
7
|
import { useAppletStyle } from './applet-styles'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react'
|
|
2
2
|
|
|
3
3
|
import { useAppletThumbnailRecords, useSaveAppletThumbnails } from '@/client/features/applets/api'
|
|
4
|
-
import { useWorkspaceId } from '@/client/features/workspace/
|
|
4
|
+
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
|
|
5
5
|
import { useLatestRef } from '@/client/lib/use-latest-ref'
|
|
6
6
|
import type { AppletKind, AppletThumbnail, AppletThumbnailUpdate } from '@/lib/types'
|
|
7
7
|
import { appletId } from './applet-cache'
|
|
@@ -13,8 +13,8 @@ import {
|
|
|
13
13
|
} from '@/client/features/applets/applet-cache'
|
|
14
14
|
import { attachAppletBridge } from '@/client/features/applets/applet-runtime'
|
|
15
15
|
import { reportAppletError } from '@/client/features/applets/applet-log'
|
|
16
|
-
import { useWorkspaceId } from '@/client/features/workspace/
|
|
17
|
-
import { type WorkspaceEvent, useWorkspaceEvent } from '@/client/runtime/
|
|
16
|
+
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
|
|
17
|
+
import { type WorkspaceEvent, useWorkspaceEvent } from '@/client/runtime/use-workspace-events'
|
|
18
18
|
import type { AppletKind } from '@/lib/types'
|
|
19
19
|
|
|
20
20
|
// Views receive URL query params. Widgets mount without params; applets must
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AnimatePresence, motion } from 'motion/react'
|
|
2
2
|
|
|
3
|
-
import { AppletContainer } from '@/client/features/applets/
|
|
4
|
-
import { useWidget } from '@/client/features/applets/
|
|
5
|
-
import { useWorkspaceId } from '@/client/features/workspace/
|
|
3
|
+
import { AppletContainer } from '@/client/features/applets/applet-container'
|
|
4
|
+
import { useWidget } from '@/client/features/applets/use-applet'
|
|
5
|
+
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
|
|
6
6
|
|
|
7
|
-
import { WidgetErrorBoundary } from './
|
|
7
|
+
import { WidgetErrorBoundary } from './widget-error-boundary'
|
|
8
8
|
|
|
9
9
|
type WidgetShellProps = {
|
|
10
10
|
name: string
|
|
@@ -16,12 +16,12 @@ import { toast } from '@/client/components/ui/toast'
|
|
|
16
16
|
import {
|
|
17
17
|
selectedSessionForTab,
|
|
18
18
|
selectedSessionKey
|
|
19
|
-
} from '@/client/features/chat/sessions/
|
|
19
|
+
} from '@/client/features/chat/sessions/use-selected-session'
|
|
20
20
|
import { useCollabEnabled } from '@/client/features/collab'
|
|
21
21
|
import { useLatestRef } from '@/client/lib/use-latest-ref'
|
|
22
22
|
import type { SelectedSessionScope, WorkspaceSessionSelection, WorkspaceTabId } from '@/lib/types'
|
|
23
|
-
import { useCurrentTabId } from './sessions/
|
|
24
|
-
import { useWorkspaceId } from '@/client/features/workspace/
|
|
23
|
+
import { useCurrentTabId } from './sessions/use-selected-session'
|
|
24
|
+
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
|
|
25
25
|
import type { AgentAvailability } from '@/client/lib/agent-availability'
|
|
26
26
|
|
|
27
27
|
type UseAppletChatMessageOptions = {
|
|
@@ -44,7 +44,7 @@ export function appletSendBlockedReason(availability: AgentAvailability): string
|
|
|
44
44
|
if (availability.status === 'checking') {
|
|
45
45
|
return 'The agent is still connecting'
|
|
46
46
|
}
|
|
47
|
-
if (availability.status === 'disconnected') return 'This workspace is disconnected from
|
|
47
|
+
if (availability.status === 'disconnected') return 'This workspace is disconnected from Moi'
|
|
48
48
|
if (availability.status === 'login-required') {
|
|
49
49
|
return 'Sign in to the agent to send this message'
|
|
50
50
|
}
|
|
@@ -4,32 +4,32 @@ import { useRouter } from 'wouter'
|
|
|
4
4
|
import { IconArrowBackUp, IconChevronDown, IconChevronsRight, IconX } from '@tabler/icons-react'
|
|
5
5
|
import { draftSessionId } from '@/lib/session-drafts'
|
|
6
6
|
import { resolveUrl } from '@/lib/navigation'
|
|
7
|
-
import { useCurrentTabId } from './sessions/
|
|
7
|
+
import { useCurrentTabId } from './sessions/use-selected-session'
|
|
8
8
|
|
|
9
|
-
import { canSubmitComposerAction, focusComposer } from '@/client/components/shared/
|
|
10
|
-
import { AgentBlobatar } from '@/client/components/shared/
|
|
11
|
-
import { useStickToBottom } from '@/client/features/chat/messages/
|
|
9
|
+
import { canSubmitComposerAction, focusComposer } from '@/client/components/shared/composer'
|
|
10
|
+
import { AgentBlobatar } from '@/client/components/shared/agent-blobatar'
|
|
11
|
+
import { useStickToBottom } from '@/client/features/chat/messages/use-stick-to-bottom'
|
|
12
12
|
import { appendPreviewTurn, groupTurns } from '@/client/features/chat/messages/group-turns'
|
|
13
13
|
import {
|
|
14
14
|
chatNoticeLabel,
|
|
15
15
|
interleaveNotices
|
|
16
16
|
} from '@/client/features/chat/messages/interleave-notices'
|
|
17
17
|
import { attachmentKey, useLive } from '@/client/features/chat/chat-store'
|
|
18
|
-
import type { ChatPromptBubble } from '@/client/features/chat/messages/
|
|
18
|
+
import type { ChatPromptBubble } from '@/client/features/chat/messages/chat-prompt-bubbles'
|
|
19
19
|
import type { ChatSendOptions } from '@/client/features/chat/chat-send'
|
|
20
|
-
import { useWorkspaceId } from '@/client/features/workspace/
|
|
20
|
+
import { useWorkspaceId } from '@/client/features/workspace/workspace-context'
|
|
21
21
|
import type { AgentTheme, SystemNotice, Turn, ViewState } from '@/lib/types'
|
|
22
22
|
|
|
23
|
-
import type { ComposerBanner } from './composer/banners/
|
|
24
|
-
import { ChatComposer, type ComposerAnnotationControls } from './composer/
|
|
23
|
+
import type { ComposerBanner } from './composer/banners/composer-banner'
|
|
24
|
+
import { ChatComposer, type ComposerAnnotationControls } from './composer/chat-composer'
|
|
25
25
|
import {
|
|
26
26
|
ChatEmptyState,
|
|
27
27
|
type WelcomeDestination,
|
|
28
28
|
resolveChatEmptyState
|
|
29
|
-
} from './messages/
|
|
30
|
-
import { ChatSelector } from './sessions/
|
|
29
|
+
} from './messages/chat-empty-state'
|
|
30
|
+
import { ChatSelector } from './sessions/chat-selector'
|
|
31
31
|
import { useWorkspaceSessions } from './sessions/api'
|
|
32
|
-
import { TurnView } from './messages/
|
|
32
|
+
import { TurnView } from './messages/turn-view'
|
|
33
33
|
import { Button } from '@/client/components/ui/button'
|
|
34
34
|
import { Tooltip, TooltipContent, TooltipTrigger } from '@/client/components/ui/tooltip'
|
|
35
35
|
import { cn } from '@/client/lib/cn'
|
|
@@ -4,7 +4,7 @@ import type { ComponentProps, ReactNode } from 'react'
|
|
|
4
4
|
import { motion } from 'motion/react'
|
|
5
5
|
import { Resizable } from 'react-resizable'
|
|
6
6
|
|
|
7
|
-
import { AgentBlobatar } from '@/client/components/shared/
|
|
7
|
+
import { AgentBlobatar } from '@/client/components/shared/agent-blobatar'
|
|
8
8
|
import { Popover, PopoverContent, PopoverTrigger } from '@/client/components/ui/popover'
|
|
9
9
|
import { cn } from '@/client/lib/cn'
|
|
10
10
|
import { useUiStore } from '@/client/store/ui'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconScribble } from '@tabler/icons-react'
|
|
2
2
|
import { HoverCard, HoverCardContent, HoverCardTrigger } from '@/client/components/ui/hover-card'
|
|
3
3
|
import type { StagedAttachment } from './types'
|
|
4
|
-
import { AttachmentChip } from './
|
|
4
|
+
import { AttachmentChip } from './attachment-chip'
|
|
5
5
|
|
|
6
6
|
type DrawingAttachmentChipProps = {
|
|
7
7
|
attachment: Extract<StagedAttachment, { kind: 'drawing' }>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IconFile } from '@tabler/icons-react'
|
|
2
2
|
import type { StagedAttachment } from './types'
|
|
3
|
-
import { AttachmentChip } from './
|
|
3
|
+
import { AttachmentChip } from './attachment-chip'
|
|
4
4
|
|
|
5
5
|
type FileAttachmentChipProps = {
|
|
6
6
|
attachment: Extract<StagedAttachment, { kind: 'file' }>
|