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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, rename } from 'node:fs/promises'
|
|
2
2
|
import { join } from 'path'
|
|
3
3
|
|
|
4
|
-
import { DATA_DIR } from '
|
|
4
|
+
import { DATA_DIR } from '../data-dir'
|
|
5
5
|
import type { WorkspaceSessionSelection, WorkspaceTabId } from '@/lib/types'
|
|
6
6
|
import { isWorkspaceTabId } from '@/lib/workspace-tabs'
|
|
7
7
|
|
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
SessionInfo,
|
|
8
8
|
SessionSummary
|
|
9
9
|
} from '@/lib/types'
|
|
10
|
-
import { DATA_DIR } from '
|
|
10
|
+
import { DATA_DIR } from '../data-dir'
|
|
11
11
|
|
|
12
12
|
type Store = Record<string, Record<string, SessionRecord>>
|
|
13
13
|
export const DEFAULT_SESSION_STORE_PATH = join(DATA_DIR, 'sessions.json')
|
|
@@ -2,15 +2,15 @@ import { APP_ICON_IDS } from '@/lib/app-icons'
|
|
|
2
2
|
import { viewBuildDirectives } from '@/lib/view-build-directives'
|
|
3
3
|
import { viewIdFromTab, viewTabId } from '@/lib/workspace-tabs'
|
|
4
4
|
import type { PendingView, SelectedSessionScope, WorkspaceEntry, WorkspaceTabId } from '@/lib/types'
|
|
5
|
-
import { getCollabReferencePath } from '
|
|
6
|
-
import { harnessFor } from '
|
|
7
|
-
import type { SendMessageInput } from '
|
|
8
|
-
import { ForkUnsupportedError, inheritedHistoryBoundary } from '
|
|
9
|
-
import { publishEvent } from '
|
|
10
|
-
import { broadcast } from '
|
|
11
|
-
import { getPinnedSession, saveSelectedSession, resolveRenamedSession } from './selected
|
|
12
|
-
import { getSessionRecord, patchSessionRecord } from './
|
|
13
|
-
import { getSessionConfig, saveSessionConfig } from './
|
|
5
|
+
import { getCollabReferencePath } from '../collab/config'
|
|
6
|
+
import { harnessFor } from '../harness/registry'
|
|
7
|
+
import type { SendMessageInput } from '../harness/types'
|
|
8
|
+
import { ForkUnsupportedError, inheritedHistoryBoundary } from '../harness/fork'
|
|
9
|
+
import { publishEvent } from '../events'
|
|
10
|
+
import { broadcast } from '../state'
|
|
11
|
+
import { getPinnedSession, saveSelectedSession, resolveRenamedSession } from './selected'
|
|
12
|
+
import { getSessionRecord, patchSessionRecord } from './store'
|
|
13
|
+
import { getSessionConfig, saveSessionConfig } from './config'
|
|
14
14
|
import {
|
|
15
15
|
beginViewBuild,
|
|
16
16
|
createPendingView,
|
|
@@ -7,7 +7,7 @@ import { join } from 'node:path'
|
|
|
7
7
|
|
|
8
8
|
// Source directory for shipped templates. Resolved relative to this file so
|
|
9
9
|
// symlinked CLI binaries still find the source tree.
|
|
10
|
-
export const TEMPLATE_DIR = join(import.meta.dir, '..', 'workspace')
|
|
10
|
+
export const TEMPLATE_DIR = join(import.meta.dir, '..', '..', 'workspace')
|
|
11
11
|
|
|
12
12
|
// The folder holding the skill packages this CLI ships. Each subdirectory is
|
|
13
13
|
// one skill (e.g. `moi-workspace/`) with its own `SKILL.md`. Source of truth
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { WorkspaceSkillsStatus, WorkspaceSkillStatus, WorkspaceType } from '@/lib/types'
|
|
2
2
|
|
|
3
|
-
import type { AppletDeclarationFile } from '
|
|
4
|
-
import { syncAppletDeclarations } from '
|
|
5
|
-
import { isBehind, skillStatuses } from './
|
|
6
|
-
import { installBundledSkills } from './
|
|
7
|
-
import { skillsDirFor } from '
|
|
3
|
+
import type { AppletDeclarationFile } from '../applets/declarations'
|
|
4
|
+
import { syncAppletDeclarations } from '../applets/declarations'
|
|
5
|
+
import { isBehind, skillStatuses } from './version'
|
|
6
|
+
import { installBundledSkills } from './template'
|
|
7
|
+
import { skillsDirFor } from '../workspaces/init'
|
|
8
8
|
|
|
9
9
|
export type WorkspaceSkillUpdateResult = {
|
|
10
10
|
before: WorkspaceSkillStatus[]
|
|
@@ -6,9 +6,9 @@ import { join } from 'node:path'
|
|
|
6
6
|
|
|
7
7
|
import type { WorkspaceSkillStatus, WorkspaceType } from '@/lib/types'
|
|
8
8
|
|
|
9
|
-
import { findWorkspaceForPath, liftToWorkspaceRoot, listWorkspaces } from '
|
|
10
|
-
import { BUNDLED_SKILLS_DIR } from './
|
|
11
|
-
import { skillsDirFor } from '
|
|
9
|
+
import { findWorkspaceForPath, liftToWorkspaceRoot, listWorkspaces } from '../workspaces/registry'
|
|
10
|
+
import { BUNDLED_SKILLS_DIR } from './template'
|
|
11
|
+
import { skillsDirFor } from '../workspaces/init'
|
|
12
12
|
|
|
13
13
|
// The version is stamped as a self-contained marker in SKILL.md, e.g.
|
|
14
14
|
// `<moi-skill version="0.1.0" />`, rather than in YAML frontmatter. SKILL.md
|
|
@@ -127,7 +127,7 @@ export async function staleSkillNotice(cwd: string): Promise<string | null> {
|
|
|
127
127
|
)
|
|
128
128
|
if (stale.length === 0) return null
|
|
129
129
|
const parts = stale.map(s => `${s.name} (${s.installed ?? 'none'} → ${s.bundled})`)
|
|
130
|
-
return `⚠
|
|
130
|
+
return `⚠ Moi skill outdated: ${parts.join(', ')} — run \`moi skill update\` to refresh.`
|
|
131
131
|
} catch {
|
|
132
132
|
return null
|
|
133
133
|
}
|
package/server/static.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { join } from 'node:path'
|
|
|
7
7
|
// install tree. In dev there is no `dist/`, so web.ts falls back to the
|
|
8
8
|
// imported HTML route + Bun.serve's live bundler (HMR). `import.meta.dir` is
|
|
9
9
|
// server/, so `dist/` sits one level up. The Hono API serves files from here
|
|
10
|
-
// via `serveStatic` (see api.ts).
|
|
10
|
+
// via `serveStatic` (see api/index.ts).
|
|
11
11
|
export const DIST_DIR = join(import.meta.dir, '..', 'dist')
|
|
12
12
|
const DIST_INDEX = join(DIST_DIR, 'index.html')
|
|
13
13
|
|
package/server/status.ts
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
import { getAppConfig } from './app-config'
|
|
9
9
|
import { CONTROL_PORT, PORT } from './constants'
|
|
10
10
|
import { debugEnabled } from './debug'
|
|
11
|
-
import { WORKER_LIMITS, type WorkerDebugInfo, getWorkersDebugSnapshot } from './functions'
|
|
11
|
+
import { WORKER_LIMITS, type WorkerDebugInfo, getWorkersDebugSnapshot } from './applets/functions'
|
|
12
12
|
import { allHarnesses } from './harness/registry'
|
|
13
|
-
import { tildify } from './registry'
|
|
13
|
+
import { tildify } from './workspaces/registry'
|
|
14
14
|
import { getClientCount } from './state'
|
|
15
15
|
import { VERSION } from './version'
|
|
16
16
|
|
|
@@ -69,7 +69,7 @@ export function renderStatus(): string {
|
|
|
69
69
|
const now = Date.now()
|
|
70
70
|
|
|
71
71
|
const lines: string[] = []
|
|
72
|
-
lines.push('
|
|
72
|
+
lines.push('Moi server status')
|
|
73
73
|
lines.push('=================')
|
|
74
74
|
lines.push('')
|
|
75
75
|
lines.push(`version ${VERSION}${process.env.MOI_SERVICE ? ' (service-managed)' : ''}`)
|
package/server/web.ts
CHANGED
|
@@ -6,9 +6,11 @@ import { isMoiContext } from '@/lib/moi-context'
|
|
|
6
6
|
import { rm } from 'node:fs/promises'
|
|
7
7
|
|
|
8
8
|
import index from '../client/index.html'
|
|
9
|
+
import devSandbox from '../client/dev/index.html'
|
|
9
10
|
import { api } from './api'
|
|
10
11
|
import { getAppConfig } from './app-config'
|
|
11
|
-
import {
|
|
12
|
+
import { harnessStore } from './harness/auth'
|
|
13
|
+
import { AttachmentUploadError } from './sessions/attachment-message'
|
|
12
14
|
import { PORT } from './constants'
|
|
13
15
|
import { control } from './control'
|
|
14
16
|
import { proxyUserState } from './collab/cloudflare-access'
|
|
@@ -16,14 +18,14 @@ import { isCollabEnabled } from './collab/config'
|
|
|
16
18
|
import { collabManager } from './collab/manager'
|
|
17
19
|
import { EVENTS_TOPIC, setEventServer } from './events'
|
|
18
20
|
import { killBuildWorkers } from './applets/build-worker'
|
|
19
|
-
import { killAllWorkers } from './functions'
|
|
20
|
-
import { startScratchpadSweeper } from './scratchpad'
|
|
21
|
+
import { killAllWorkers } from './applets/functions'
|
|
22
|
+
import { startScratchpadSweeper } from './scratchpad/document'
|
|
21
23
|
import { navigationRelay } from './navigation-relay'
|
|
22
|
-
import { resolveScratchOp } from './scratchpad
|
|
24
|
+
import { resolveScratchOp } from './scratchpad/relay'
|
|
23
25
|
import { allHarnesses, harnessFor } from './harness/registry'
|
|
24
|
-
import { getWorkspace, listWorkspaces } from './registry'
|
|
25
|
-
import { failInterruptedViewStarts, sendWorkspaceMessage } from './view-sessions'
|
|
26
|
-
import { PendingViewError } from './pending-views'
|
|
26
|
+
import { getWorkspace, listWorkspaces } from './workspaces/registry'
|
|
27
|
+
import { failInterruptedViewStarts, sendWorkspaceMessage } from './sessions/view-sessions'
|
|
28
|
+
import { PendingViewError } from './sessions/pending-views'
|
|
27
29
|
import {
|
|
28
30
|
addClient,
|
|
29
31
|
broadcast,
|
|
@@ -149,6 +151,10 @@ export const app = Bun.serve<WsData>({
|
|
|
149
151
|
'/': shell,
|
|
150
152
|
'/dev': shell,
|
|
151
153
|
'/dev/*': shell,
|
|
154
|
+
// Isolated sandboxes bypass app startup and share the client/dev entry point.
|
|
155
|
+
'/dev/workspace-setup/preview': prebuilt
|
|
156
|
+
? new Response('Not found', { status: 404 })
|
|
157
|
+
: devSandbox,
|
|
152
158
|
'/workspace/*': shell,
|
|
153
159
|
|
|
154
160
|
// Chat websocket — app-wide (one per client, not per workspace). Each chat
|
|
@@ -304,6 +310,7 @@ async function shutdown() {
|
|
|
304
310
|
try {
|
|
305
311
|
control.stop(true)
|
|
306
312
|
} catch {}
|
|
313
|
+
harnessStore.shutdown()
|
|
307
314
|
for (const h of allHarnesses()) h.shutdown?.()
|
|
308
315
|
killAllWorkers()
|
|
309
316
|
killBuildWorkers()
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
// relayed over the control port — the workspace's processes must be reaped and
|
|
4
4
|
// every connected client told to refetch. Both entry points call this so the
|
|
5
5
|
// side effects can never drift apart.
|
|
6
|
-
import {
|
|
7
|
-
import { publishEvent } from '
|
|
8
|
-
import { restartWorker } from '
|
|
9
|
-
import { allHarnesses } from '
|
|
6
|
+
import { harnessStore } from '../harness/auth'
|
|
7
|
+
import { publishEvent } from '../events'
|
|
8
|
+
import { restartWorker } from '../applets/functions'
|
|
9
|
+
import { allHarnesses } from '../harness/registry'
|
|
10
10
|
|
|
11
11
|
export function applyEnvChanged(workspace: { id: string; path: string }): void {
|
|
12
12
|
// Kill the cached widget worker (next RPC respawns with fresh env) and tear
|
|
@@ -15,6 +15,6 @@ export function applyEnvChanged(workspace: { id: string; path: string }): void {
|
|
|
15
15
|
for (const h of allHarnesses()) h.onEnvChanged?.(workspace.path)
|
|
16
16
|
// Env can carry credentials (ANTHROPIC_API_KEY, provider config) — drop the
|
|
17
17
|
// cached availability so the next agent snapshot re-probes.
|
|
18
|
-
|
|
18
|
+
harnessStore.invalidate(workspace)
|
|
19
19
|
publishEvent({ type: 'env:updated', workspaceId: workspace.id })
|
|
20
20
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Per-workspace environment variables surfaced to both spawn sites: the widget
|
|
2
|
-
// function workers (functions.ts) and
|
|
2
|
+
// function workers (server/applets/functions.ts) and agent harness processes.
|
|
3
3
|
//
|
|
4
4
|
// Two sources feed a workspace's effective env:
|
|
5
5
|
// 1. Discovered `.env` files in the workspace root (`.env`, then `.env.local`,
|
|
@@ -20,7 +20,7 @@ import { parseEnv } from 'node:util'
|
|
|
20
20
|
|
|
21
21
|
import type { WorkspaceEnvVar, WorkspaceEnvView } from '@/lib/types'
|
|
22
22
|
|
|
23
|
-
import { DATA_DIR } from '
|
|
23
|
+
import { DATA_DIR } from '../data-dir'
|
|
24
24
|
|
|
25
25
|
// Dotenv files scanned in the workspace root, low → high precedence. A later
|
|
26
26
|
// file's keys override an earlier file's (base `.env`, machine-local `.env.local`).
|
|
@@ -299,7 +299,7 @@ async function loadWorkspaceEnvState(workspacePath: string): Promise<WorkspaceEn
|
|
|
299
299
|
|
|
300
300
|
// The effective env: discovered `.env` (when inherited) overlaid with the
|
|
301
301
|
// custom secrets. Injected at spawn — env is frozen once the process starts,
|
|
302
|
-
// so changes require a restart (see functions.ts /
|
|
302
|
+
// so changes require a restart (see server/applets/functions.ts and server/harness/).
|
|
303
303
|
export async function resolveWorkspaceEnv(workspacePath: string): Promise<Record<string, string>> {
|
|
304
304
|
const { secrets, dotenv } = await loadWorkspaceEnvState(workspacePath)
|
|
305
305
|
return { ...dotenv, ...secrets }
|
|
@@ -2,10 +2,10 @@ import { resolve } from 'node:path'
|
|
|
2
2
|
|
|
3
3
|
import type { WorkspaceType } from '@/lib/types'
|
|
4
4
|
|
|
5
|
-
import { discoverHermesProfiles } from '
|
|
6
|
-
import type { HermesProfile } from '
|
|
7
|
-
import { discoverOpenClawAgents } from '
|
|
8
|
-
import type { OpenClawAgent } from '
|
|
5
|
+
import { discoverHermesProfiles } from '../harness/hermes/discovery'
|
|
6
|
+
import type { HermesProfile } from '../harness/hermes/discovery'
|
|
7
|
+
import { discoverOpenClawAgents } from '../harness/openclaw/discovery'
|
|
8
|
+
import type { OpenClawAgent } from '../harness/openclaw/discovery'
|
|
9
9
|
|
|
10
10
|
export type WorkspaceImportMetadata = {
|
|
11
11
|
name?: string
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// The one place that knows how to turn a directory into a
|
|
1
|
+
// The one place that knows how to turn a directory into a Moi workspace:
|
|
2
2
|
// bundled skills + the `.moi/` scaffold, with the skills location keyed on the
|
|
3
3
|
// agent backend. `moi init`, `moi openclaw init`, and the HTTP API (UI import /
|
|
4
4
|
// create) all provision through here, so a workspace set up from the UI is
|
|
@@ -10,10 +10,10 @@ import { join } from 'node:path'
|
|
|
10
10
|
import type { WorkspaceType } from '@/lib/types'
|
|
11
11
|
export { validateWorkspaceFolderName } from '@/lib/workspace-name'
|
|
12
12
|
|
|
13
|
-
import { getAppConfig } from '
|
|
14
|
-
import { harnessFor } from '
|
|
15
|
-
import { createDependencyInstallLogPath, scaffoldMoiDir } from './
|
|
16
|
-
import { installBundledSkills } from '
|
|
13
|
+
import { getAppConfig } from '../app-config'
|
|
14
|
+
import { harnessFor } from '../harness/registry'
|
|
15
|
+
import { createDependencyInstallLogPath, scaffoldMoiDir } from './scaffold'
|
|
16
|
+
import { installBundledSkills } from '../skills/template'
|
|
17
17
|
|
|
18
18
|
// Where each backend loads skills from — the harness owns the answer
|
|
19
19
|
// (Claude Code: `.claude/skills/`; OpenClaw: `<workspace>/skills/`; Codex:
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
import { createDefaultWorkspaceLayout, normalizeWorkspaceTabs } from '@/lib/workspace-layout'
|
|
10
10
|
import { isWorkspaceIcon } from '@/lib/workspace-icon'
|
|
11
11
|
|
|
12
|
-
import { getCapturedThumbnails } from '
|
|
12
|
+
import { getCapturedThumbnails } from '../applets/thumbnails'
|
|
13
13
|
|
|
14
14
|
function normalizeLayout(parsed: Record<string, unknown>): WorkspaceLayout {
|
|
15
15
|
const defaults = createDefaultWorkspaceLayout()
|
|
@@ -24,7 +24,7 @@ function normalizeLayout(parsed: Record<string, unknown>): WorkspaceLayout {
|
|
|
24
24
|
delete layout.icon
|
|
25
25
|
}
|
|
26
26
|
// Legacy thumbnail caches are intentionally dropped, not migrated — images
|
|
27
|
-
// now live as files under `.moi/.cache/thumbnails` (server/thumbnails.ts)
|
|
27
|
+
// now live as files under `.moi/.cache/thumbnails` (server/applets/thumbnails.ts)
|
|
28
28
|
// and applets are simply captured again there.
|
|
29
29
|
delete layout.widgetThumbnails
|
|
30
30
|
delete layout.viewThumbnails
|
|
@@ -14,7 +14,7 @@ import { statSync } from 'node:fs'
|
|
|
14
14
|
|
|
15
15
|
import sharp from 'sharp'
|
|
16
16
|
|
|
17
|
-
import { resolveWorkspaceMediaFile } from '
|
|
17
|
+
import { resolveWorkspaceMediaFile } from '../applets'
|
|
18
18
|
|
|
19
19
|
// Long edge of the rendered preview. 2× the ~300px display size keeps it crisp
|
|
20
20
|
// on retina without shipping the original.
|
|
@@ -7,9 +7,9 @@ import { newWorkspaceId, validateWorkspaceId } from '@/lib/ids'
|
|
|
7
7
|
import type { DiscoveredWorkspace, WorkspaceEntry, WorkspaceType } from '@/lib/types'
|
|
8
8
|
import { orderWorkspaceTypes } from '@/lib/workspace-types'
|
|
9
9
|
|
|
10
|
-
import { DATA_DIR } from '
|
|
11
|
-
import { allHarnesses } from '
|
|
12
|
-
import type { DiscoveredWorkspaceCandidate } from '
|
|
10
|
+
import { DATA_DIR } from '../data-dir'
|
|
11
|
+
import { allHarnesses } from '../harness/registry'
|
|
12
|
+
import type { DiscoveredWorkspaceCandidate } from '../harness/types'
|
|
13
13
|
|
|
14
14
|
// Replace the home-dir prefix with `~` for display. Keeps the original
|
|
15
15
|
// absolute path in place; callers should put the result in `displayPath`.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// The env "required" view aggregates `config.requiredEnv` declared by both
|
|
2
2
|
// widgets and views, each key mapped to the bundle ids that asked for it.
|
|
3
|
-
// Shared by the env API (api.ts) and
|
|
4
|
-
import { collectViewRequiredEnv } from '
|
|
5
|
-
import { collectRequiredEnv } from '
|
|
3
|
+
// Shared by the env API (server/api/index.ts) and control-port handlers.
|
|
4
|
+
import { collectViewRequiredEnv } from '../applets/views'
|
|
5
|
+
import { collectRequiredEnv } from '../applets/widgets'
|
|
6
6
|
|
|
7
7
|
export async function requiredEnvFor(workspacePath: string): Promise<Record<string, string[]>> {
|
|
8
8
|
const [widgets, views] = await Promise.all([
|
|
@@ -6,8 +6,8 @@ import { appendFile, mkdir, open, stat } from 'node:fs/promises'
|
|
|
6
6
|
import { tmpdir } from 'node:os'
|
|
7
7
|
import { join, resolve, sep } from 'node:path'
|
|
8
8
|
|
|
9
|
-
import { agentCommand } from '
|
|
10
|
-
import { syncAppletDeclarations } from '
|
|
9
|
+
import { agentCommand } from '../agent-launcher'
|
|
10
|
+
import { syncAppletDeclarations } from '../applets/declarations'
|
|
11
11
|
|
|
12
12
|
// Dependency set available to widgets. `react`/`react-dom` are stubs — at
|
|
13
13
|
// runtime they resolve to moi's locally-vendored ESM via the browser importmap
|
|
@@ -95,7 +95,7 @@ async function runBunInstall(moiDir: string, logPath: string): Promise<number> {
|
|
|
95
95
|
// package.json, and lockfile stay committable — they ARE the workspace.
|
|
96
96
|
const REQUIRED_IGNORES = ['.build/', '.cache/', 'node_modules/'] as const
|
|
97
97
|
|
|
98
|
-
export const MOI_GITIGNORE = `#
|
|
98
|
+
export const MOI_GITIGNORE = `# Moi internals — machine-local, re-creatable state
|
|
99
99
|
${REQUIRED_IGNORES.join('\n')}
|
|
100
100
|
`
|
|
101
101
|
|
package/ui-components/button.tsx
CHANGED
|
@@ -11,7 +11,7 @@ const buttonVariants = cva(
|
|
|
11
11
|
default:
|
|
12
12
|
'bg-primary text-primary-foreground inset-shadow-[0_0_8px_color-mix(in_oklab,var(--color-white)_20%,transparent)] hover:bg-primary/90 disabled:bg-accent disabled:text-muted-foreground disabled:opacity-100 disabled:shadow-none',
|
|
13
13
|
secondary:
|
|
14
|
-
'bg-accent text-accent-foreground hover:bg-[color-mix(in_oklch,var(--accent),var(--foreground)_3%)]',
|
|
14
|
+
'bg-accent text-accent-foreground hover:bg-[color-mix(in_oklch,var(--accent),var(--foreground)_3%)] disabled:text-muted-foreground disabled:opacity-100',
|
|
15
15
|
outline:
|
|
16
16
|
'border bg-background text-foreground hover:bg-[color-mix(in_oklch,var(--background),var(--foreground)_3%)]',
|
|
17
17
|
ghost: 'hover:bg-accent hover:text-accent-foreground',
|
|
@@ -112,7 +112,7 @@ moi ui-components add attachment
|
|
|
112
112
|
|
|
113
113
|
<Steps className="mb-0 pt-2">
|
|
114
114
|
|
|
115
|
-
<Step>Install the required
|
|
115
|
+
<Step>Install the required Moi component:</Step>
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
118
|
moi ui-components add button
|
|
@@ -664,7 +664,7 @@ A container for one or more actions, aligned to the end of the attachment.
|
|
|
664
664
|
|
|
665
665
|
### AttachmentAction
|
|
666
666
|
|
|
667
|
-
An action button. Renders a [`Button`](
|
|
667
|
+
An action button. Renders a [`Button`](button.md) and accepts all of its props.
|
|
668
668
|
|
|
669
669
|
| Prop | Type | Default | Description |
|
|
670
670
|
| ---------- | ------------------------------------- | ----------- | ---------------------------------------- |
|
|
@@ -95,7 +95,7 @@ The `Calendar` component is built on top of [React DayPicker](https://react-day-
|
|
|
95
95
|
|
|
96
96
|
## Date Picker
|
|
97
97
|
|
|
98
|
-
You can use the `<Calendar>` component to build a date picker. See the [Date Picker](
|
|
98
|
+
You can use the `<Calendar>` component to build a date picker. See the [Date Picker](date-picker.md) page for more information.
|
|
99
99
|
|
|
100
100
|
## Persian / Hijri / Jalali Calendar
|
|
101
101
|
|
|
@@ -170,7 +170,7 @@ Introducing **Charts**. A collection of chart components that you can copy and p
|
|
|
170
170
|
|
|
171
171
|
Charts are designed to look great out of the box. They work well with the other components and are fully customizable to fit your project.
|
|
172
172
|
|
|
173
|
-
[Browse the Charts Library](/charts).
|
|
173
|
+
[Browse the Charts Library](https://ui.shadcn.com/charts).
|
|
174
174
|
|
|
175
175
|
## Component
|
|
176
176
|
|
|
@@ -697,9 +697,9 @@ export function ChartBarDemoLegend() {
|
|
|
697
697
|
|
|
698
698
|
Done. You've built your first chart! What's next?
|
|
699
699
|
|
|
700
|
-
- [Themes and Colors](
|
|
701
|
-
- [Tooltip](
|
|
702
|
-
- [Legend](
|
|
700
|
+
- [Themes and Colors](chart.md#theming)
|
|
701
|
+
- [Tooltip](chart.md#tooltip)
|
|
702
|
+
- [Legend](chart.md#legend)
|
|
703
703
|
|
|
704
704
|
## Chart Config
|
|
705
705
|
|
|
@@ -1122,7 +1122,7 @@ You can show the number of selected rows using the `table.getFilteredSelectedRow
|
|
|
1122
1122
|
|
|
1123
1123
|
## Reusable Components
|
|
1124
1124
|
|
|
1125
|
-
Here are some components you can use to build your data tables. This is from the [Tasks](/examples/tasks) demo, which shares its features object (and the matching `TasksTableFeatures` type) across every component via a `data-table-features.ts` module — the same pattern we set up in [Set up Table Features](#set-up-table-features).
|
|
1125
|
+
Here are some components you can use to build your data tables. This is from the [Tasks](https://ui.shadcn.com/examples/tasks) demo, which shares its features object (and the matching `TasksTableFeatures` type) across every component via a `data-table-features.ts` module — the same pattern we set up in [Set up Table Features](#set-up-table-features).
|
|
1126
1126
|
|
|
1127
1127
|
### Column header
|
|
1128
1128
|
|
|
@@ -303,7 +303,7 @@ The `Field` family is designed for composing accessible forms. A typical field i
|
|
|
303
303
|
|
|
304
304
|
## Form
|
|
305
305
|
|
|
306
|
-
See the [Form](/docs/forms) documentation for building forms with the `Field` component and [React Hook Form](/docs/forms/react-hook-form), [Tanstack Form](/docs/forms/tanstack-form), or [Formisch](/docs/forms/formisch).
|
|
306
|
+
See the [Form](https://ui.shadcn.com/docs/forms) documentation for building forms with the `Field` component and [React Hook Form](https://ui.shadcn.com/docs/forms/react-hook-form), [Tanstack Form](https://ui.shadcn.com/docs/forms/tanstack-form), or [Formisch](https://ui.shadcn.com/docs/forms/formisch).
|
|
307
307
|
|
|
308
308
|
## Input
|
|
309
309
|
|
|
@@ -276,7 +276,7 @@ export function InputBadge() {
|
|
|
276
276
|
|
|
277
277
|
## Input Group
|
|
278
278
|
|
|
279
|
-
To add icons, text, or buttons inside an input, use the `InputGroup` component. See the [Input Group](
|
|
279
|
+
To add icons, text, or buttons inside an input, use the `InputGroup` component. See the [Input Group](input-group.md) component for more examples.
|
|
280
280
|
|
|
281
281
|
```tsx
|
|
282
282
|
import { IconInfoCircle } from '@tabler/icons-react'
|
|
@@ -309,7 +309,7 @@ export function InputInputGroup() {
|
|
|
309
309
|
|
|
310
310
|
## Button Group
|
|
311
311
|
|
|
312
|
-
To add buttons to an input, use the `ButtonGroup` component. See the [Button Group](
|
|
312
|
+
To add buttons to an input, use the `ButtonGroup` component. See the [Button Group](button-group.md) component for more examples.
|
|
313
313
|
|
|
314
314
|
```tsx
|
|
315
315
|
import { Button } from '@/components/ui/button'
|
|
@@ -23,7 +23,7 @@ export function LabelDemo() {
|
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
<Callout>
|
|
26
|
-
For form fields, use the [Field](
|
|
26
|
+
For form fields, use the [Field](field.md) component which
|
|
27
27
|
includes built-in label, description, and error handling.
|
|
28
28
|
</Callout>
|
|
29
29
|
|
|
@@ -81,7 +81,7 @@ import { Label } from '@/components/ui/label'
|
|
|
81
81
|
|
|
82
82
|
## Label in Field
|
|
83
83
|
|
|
84
|
-
For form fields, use the [Field](
|
|
84
|
+
For form fields, use the [Field](field.md) component which
|
|
85
85
|
includes built-in `FieldLabel`, `FieldDescription`, and `FieldError` components.
|
|
86
86
|
|
|
87
87
|
```tsx
|
|
@@ -393,9 +393,9 @@ export function TableActions() {
|
|
|
393
393
|
|
|
394
394
|
You can use the `<Table />` component to build more complex data tables. Combine it with [@tanstack/react-table](https://tanstack.com/table/latest) to create tables with sorting, filtering and pagination.
|
|
395
395
|
|
|
396
|
-
See the [Data Table](
|
|
396
|
+
See the [Data Table](data-table.md) documentation for more information.
|
|
397
397
|
|
|
398
|
-
You can also see an example of a data table in the [Tasks](/examples/tasks) demo.
|
|
398
|
+
You can also see an example of a data table in the [Tasks](https://ui.shadcn.com/examples/tasks) demo.
|
|
399
399
|
|
|
400
400
|
## RTL
|
|
401
401
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: moi-workspace
|
|
3
|
-
description: The
|
|
3
|
+
description: The Moi workspace — the web UI the user chats from, extended with agent-authored applets (widgets, views) plus theme & config. Read this FIRST when a message carries a hidden moi-context envelope or the user uses Moi vocab such as workspace, applet, widget, view, scratchpad, dashboard, or a `moi` command, or asks to build, edit, customize, or theme the workspace UI or its layout.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Moi workspace
|
|
7
7
|
|
|
8
8
|
## Glossary
|
|
9
9
|
|
|
10
10
|
"Workspace" or "Moi Workspace" — the web UI that the user works in, talks/collaborates with you,
|
|
11
11
|
sees and interacts with "Applets".
|
|
12
12
|
|
|
13
|
-
"Project" - the primary working folder _you_ (as an agent) work in. Managed by your harness;
|
|
13
|
+
"Project" - the primary working folder _you_ (as an agent) work in. Managed by your harness; Moi
|
|
14
14
|
does not have a clear definition, but assumes this is the root folder in which it stores its state
|
|
15
15
|
files.
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ events to "Workspace".
|
|
|
29
29
|
|
|
30
30
|
## Overview
|
|
31
31
|
|
|
32
|
-
You are working inside a **
|
|
32
|
+
You are working inside a **Moi workspace**. It is a web UI that the user communicates with you
|
|
33
33
|
through. It has regular chat (this one), as well as custom UI elements that you can define, write,
|
|
34
34
|
and change to tailor the workspace to user needs. It starts with a simple chat, but evolves into a
|
|
35
35
|
personal app equipped with a copilot (you). Workspace is a two-way communication: you can build the
|
|
@@ -89,7 +89,7 @@ my-agent-folder/
|
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Every dot-prefixed file or folder inside `.moi/` (`.build/`, `.cache/`, `.workspace.json`,
|
|
92
|
-
`.scratchpad*`, `.gitignore`, …) is a
|
|
92
|
+
`.scratchpad*`, `.gitignore`, …) is a Moi internal: auto-generated and liable to change format
|
|
93
93
|
without notice. Avoid them as much as possible — do not read, edit, or delete them, and never point
|
|
94
94
|
tooling at them; go through the `moi` CLI instead. Version control needs no special handling: the
|
|
95
95
|
scaffolded `.moi/.gitignore` already excludes the machine-local entries (`.build/`, `.cache/`,
|
|
@@ -97,12 +97,12 @@ scaffolded `.moi/.gitignore` already excludes the machine-local entries (`.build
|
|
|
97
97
|
with the repo — commit them as-is, just never hand-edit them. Your surface is the non-dot files:
|
|
98
98
|
`widgets/`, `views/`, `package.json`, and code you place under `.moi/` yourself.
|
|
99
99
|
|
|
100
|
-
### Using the
|
|
100
|
+
### Using the Moi CLI
|
|
101
101
|
|
|
102
102
|
Treat `moi` as an external command — you cannot inspect or modify its sources. Use only the
|
|
103
103
|
documented subcommands (`moi bundle`, `moi bundle --force`, etc.). Call `moi --help` for
|
|
104
104
|
documentation. Run all `moi` commands from the **project root** — the folder that contains `.moi/`,
|
|
105
|
-
never from inside `.moi/` itself. You don't pass paths;
|
|
105
|
+
never from inside `.moi/` itself. You don't pass paths; Moi resolves the workspace from where it's run.
|
|
106
106
|
|
|
107
107
|
Use the task-specific sections below for workflow guidance. The CLI will grow over time, so run
|
|
108
108
|
`moi --help` to discover commands and `moi <command> --help` before using an unfamiliar command or option.
|
|
@@ -174,7 +174,7 @@ use `moi theme --help` if its options change.
|
|
|
174
174
|
|
|
175
175
|
Each workspace has an effective env: keys from the project's `.env` / `.env.local` (when
|
|
176
176
|
inheritance is enabled in settings) plus **custom secrets** the user manages in the workspace env
|
|
177
|
-
settings.
|
|
177
|
+
settings. Moi injects this env into:
|
|
178
178
|
|
|
179
179
|
- applet server functions — read it as `process.env` inside `.server.ts`
|
|
180
180
|
- any command run via `moi env exec -- <cmd>`
|
|
@@ -236,11 +236,11 @@ Write normal React + Tailwind — below is only what's **moi-specific**.
|
|
|
236
236
|
|
|
237
237
|
### Build environment
|
|
238
238
|
|
|
239
|
-
- Bun is the required dependency of
|
|
239
|
+
- Bun is the required dependency of Moi, so it must be installed
|
|
240
240
|
- For package management **always** use bun
|
|
241
241
|
- package.json is scaffolded during init. You are free to install/remove/do whatever with packages.
|
|
242
242
|
- if packages aren't installed, it's your responsibility to call `bun install`
|
|
243
|
-
- `react` and `react-dom` are stubs — they're provided by
|
|
243
|
+
- `react` and `react-dom` are stubs — they're provided by Moi at runtime via the browser importmap.
|
|
244
244
|
They're listed only so editors pick up the correct types.
|
|
245
245
|
- `moi bundle` runs **Bun's bundler**, so standard Bun imports, loaders, and tricks apply (JSON,
|
|
246
246
|
text, etc.) — see the Bun docs. The moi-specific imports are covered below.
|
|
@@ -495,7 +495,7 @@ persistence concepts.
|
|
|
495
495
|
|
|
496
496
|
### Message context
|
|
497
497
|
|
|
498
|
-
Each message sent through
|
|
498
|
+
Each message sent through Moi includes a hidden `<moi-context>` block with the active tab and,
|
|
499
499
|
when relevant, params, applet source, and message-specific instructions. Use only the newest
|
|
500
500
|
block; don’t reply to it or include it in summaries.
|
|
501
501
|
|
|
@@ -509,7 +509,7 @@ as user-provided task data.
|
|
|
509
509
|
|
|
510
510
|
## Keeping this skill current
|
|
511
511
|
|
|
512
|
-
This skill is installed with
|
|
512
|
+
This skill is installed with Moi (via the CLI or the UI) and can fall behind when the Moi CLI updates.
|
|
513
513
|
|
|
514
514
|
- **You'll know** — `moi` commands warn you when this skill is behind.
|
|
515
515
|
- **To update** — if the user asks for current or updated guidance, run `moi skill update` before
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Collab
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
show users and share cursors, focus, selections, and custom presence.
|
|
3
|
+
Moi workspaces can be shared with multiple users. Use `moi/collab` in views and widgets to
|
|
4
|
+
show users and share cursors, focus, selections, and custom presence. Moi supplies identity,
|
|
5
5
|
workspace membership, and the connection. Import the API directly; no provider or socket
|
|
6
6
|
setup is needed.
|
|
7
7
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Moi applet design
|
|
2
2
|
|
|
3
3
|
Applets should feel useful, clear, and at home in the workspace. Let their content give them character while keeping familiar typography, colors, and interactions.
|
|
4
4
|
|
|
5
|
-
This guide is the highest-priority visual contract for widgets and views inside a
|
|
5
|
+
This guide is the highest-priority visual contract for widgets and views inside a Moi workspace.
|
|
6
6
|
Follow generic design guidance only where it agrees with this guide.
|
|
7
7
|
|
|
8
8
|
## Content and layout
|