moi-computer 0.11.1-next.4 → 0.12.0
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/client/api/app-config.ts +7 -4
- package/client/app/AppRouter.tsx +2 -2
- package/client/app/routes/WorkspaceRoute.tsx +27 -19
- package/client/features/applets/{AppletMount.tsx → AppletContainer.tsx} +7 -5
- package/client/features/applets/WidgetShell.tsx +3 -3
- package/client/features/applets/applet-cache.ts +3 -5
- package/client/features/applets/applet-runtime.ts +27 -12
- package/client/features/applets/applet-thumbnail.ts +2 -1
- package/client/features/chat/applet-chat-intents.ts +14 -6
- package/client/features/chat/composer/attachments/draft-attachments.ts +21 -4
- package/client/features/chat/messages/MarkdownContent.tsx +5 -2
- package/client/features/chat/sessions/browser-tab-state.ts +18 -0
- package/client/features/chat/sessions/useSelectedSession.ts +55 -21
- package/client/features/chat/useChat.ts +4 -0
- package/client/features/collab/applet-api.ts +34 -0
- package/client/features/collab/client.ts +239 -0
- package/client/features/collab/components/cursors.tsx +199 -0
- package/client/features/collab/components/presence-avatars.tsx +61 -0
- package/client/features/collab/components/presence-frame.tsx +126 -0
- package/client/features/collab/components/presence-group.tsx +23 -0
- package/client/features/collab/components/presence-helpers.ts +50 -0
- package/client/features/collab/components/user-avatar-group.tsx +22 -0
- package/client/features/collab/components/user-avatar.tsx +40 -0
- package/client/features/collab/components/user.tsx +50 -0
- package/client/features/collab/hooks.tsx +164 -0
- package/client/features/collab/host-state.ts +254 -0
- package/client/features/collab/index.ts +5 -0
- package/client/features/collab/local-user.ts +46 -0
- package/client/features/collab/presence-publisher.ts +30 -0
- package/client/features/collab/presence-target.ts +8 -0
- package/client/features/collab/provider.tsx +79 -0
- package/client/features/collab/proxy-user.ts +35 -0
- package/client/features/collab/store.ts +156 -0
- package/client/features/collab/testing/component-fixtures.tsx +54 -0
- package/client/features/collab/testing/fake-engine.ts +129 -0
- package/client/features/collab/users.ts +106 -0
- package/client/features/collab/workspace-users-menu.tsx +194 -0
- package/client/features/connectors/mcp-icons.ts +0 -2
- package/client/features/dev/DevIndexPage.tsx +5 -0
- package/client/features/dev/DevRoutes.tsx +16 -4
- package/client/features/dev/collab/collab-page.tsx +24 -0
- package/client/features/dev/collab/collab-playground.tsx +614 -0
- package/client/features/dev/collab/local-user-settings.tsx +166 -0
- package/client/features/dev/collab/playground-room.ts +33 -0
- package/client/features/dev/{UiComponentsPage.tsx → ui-components/ui-components-page.tsx} +1 -1
- package/client/features/overview/WidgetCanvas.tsx +3 -1
- package/client/features/views/ViewManager.tsx +12 -7
- package/client/features/views/api.ts +2 -2
- package/client/features/views/useViewBuilderActions.ts +3 -0
- package/client/features/workspace/WorkspaceContext.tsx +1 -1
- package/client/features/workspace/WorkspaceLayoutContext.tsx +8 -2
- package/client/features/workspace/WorkspaceScreen.tsx +19 -11
- package/client/features/workspace/WorkspaceTabs.tsx +3 -3
- package/client/features/workspace/api.ts +2 -1
- package/client/features/workspace/browser-tab-state.ts +44 -0
- package/client/features/workspace/layout-save.ts +13 -0
- package/client/features/workspace/moi-context.ts +2 -1
- package/client/features/workspace/useWorkspaceNavigation.ts +20 -8
- package/client/index.css +45 -0
- package/client/index.tsx +9 -4
- package/client/main.tsx +1 -11
- package/client/theme.css +4 -1
- package/dist/chunk-2jncyq65.js +1 -0
- package/dist/{chunk-brr0zbeh.js → chunk-3a48fyf7.js} +2 -2
- package/dist/{chunk-tzz101ea.js → chunk-97eg9mjn.js} +1 -1
- package/dist/chunk-e2q5ken7.js +68 -0
- package/dist/{chunk-zs4mte79.js → chunk-efdyz6xp.js} +1 -1
- package/dist/chunk-h2kj1ysj.js +1 -0
- package/dist/chunk-jf6czgrz.js +2 -0
- package/dist/chunk-nez8sdta.js +1 -0
- package/dist/chunk-nzwgm8vc.css +1 -0
- package/dist/chunk-ph0h6h86.js +1 -0
- package/dist/chunk-ryg9z3kn.js +10 -0
- package/dist/chunk-tpn177bt.js +2 -0
- package/dist/chunk-vfpsc75k.js +2 -0
- package/dist/{chunk-m1fvqssh.js → chunk-z3byfve5.js} +2 -2
- package/dist/index.html +1 -1
- package/lib/collab/colors.ts +30 -0
- package/lib/collab/protocol.ts +84 -0
- package/lib/collab/types.ts +52 -0
- package/lib/experimental.ts +14 -0
- package/lib/moi-context.ts +11 -3
- package/lib/navigation.ts +25 -5
- package/lib/types.ts +20 -33
- package/package.json +2 -2
- package/server/AGENTS.md +1 -1
- package/server/api.ts +28 -5
- package/server/app-config.ts +127 -34
- package/server/applet-typecheck.ts +8 -3
- package/server/applets/applet-css.ts +1 -1
- package/server/applets/build-applet.ts +9 -3
- package/server/applets/declarations/base.d.ts +75 -0
- package/server/applets/declarations/collab.d.ts +88 -0
- package/server/applets/declarations.ts +46 -0
- package/server/applets/index.ts +8 -8
- package/server/applets/runtime/collab.ts +94 -0
- package/server/applets/runtime/moi.ts +12 -19
- package/server/applets/runtime/rpc.ts +2 -4
- package/server/chat-selection.ts +22 -0
- package/server/cli.ts +86 -21
- package/server/collab/cloudflare-access.ts +78 -0
- package/server/collab/config.ts +18 -0
- package/server/collab/manager.ts +407 -0
- package/server/collab/service.ts +136 -0
- package/server/collab/skill/index.ts +53 -0
- package/server/collab/worker-messages.ts +10 -0
- package/server/collab/worker.ts +52 -0
- package/server/layout.ts +10 -3
- package/server/moi-scaffold.ts +55 -84
- package/server/preview.ts +1 -1
- package/server/skill-update.ts +7 -9
- package/server/skills-template.ts +14 -2
- package/server/web.ts +65 -17
- package/server/workspace-init.ts +6 -3
- package/ui-components/avatar.tsx +24 -11
- package/ui-components/button.tsx +9 -9
- package/ui-components/docs/avatar.md +11 -30
- package/workspace/.claude/skills/moi-workspace/SKILL.md +14 -11
- package/workspace/.claude/skills/moi-workspace/references/COLLAB.md +262 -0
- package/workspace/.claude/skills/moi-workspace/references/INTENTS.md +10 -7
- package/client/assets/mcp/agentation.png +0 -0
- package/dist/agentation-4s0nn45p.png +0 -0
- package/dist/chunk-2gs8jjx4.css +0 -1
- package/dist/chunk-7vvg5fyz.js +0 -68
- package/dist/chunk-94m3q9ce.js +0 -1
- package/dist/chunk-by2wqgak.js +0 -1
- package/dist/chunk-p34hvqt3.js +0 -1
- package/dist/chunk-p83f0jnj.js +0 -2
- package/dist/chunk-xg01f6pn.js +0 -10
- /package/client/features/dev/{UiComponentPreviews.tsx → ui-components/ui-component-previews.tsx} +0 -0
- /package/server/applets/{runtime/base.ts → api-base.ts} +0 -0
package/client/index.css
CHANGED
|
@@ -180,6 +180,51 @@
|
|
|
180
180
|
corner-shape: superellipse(1.2);
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
[data-collab-color] {
|
|
184
|
+
--collab: var(--muted-foreground);
|
|
185
|
+
--collab-foreground: var(--background);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[data-collab-color='pink'] {
|
|
189
|
+
--collab: var(--color-pink-500);
|
|
190
|
+
--collab-foreground: white;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
[data-collab-color='orange'] {
|
|
194
|
+
--collab: var(--color-orange-500);
|
|
195
|
+
--collab-foreground: black;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
[data-collab-color='amber'] {
|
|
199
|
+
--collab: var(--color-amber-500);
|
|
200
|
+
--collab-foreground: black;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
[data-collab-color='lime'] {
|
|
204
|
+
--collab: var(--color-lime-500);
|
|
205
|
+
--collab-foreground: black;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-collab-color='emerald'] {
|
|
209
|
+
--collab: var(--color-emerald-500);
|
|
210
|
+
--collab-foreground: black;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
[data-collab-color='cyan'] {
|
|
214
|
+
--collab: var(--color-cyan-500);
|
|
215
|
+
--collab-foreground: black;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
[data-collab-color='blue'] {
|
|
219
|
+
--collab: var(--color-blue-500);
|
|
220
|
+
--collab-foreground: white;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
[data-collab-color='violet'] {
|
|
224
|
+
--collab: var(--color-violet-500);
|
|
225
|
+
--collab-foreground: white;
|
|
226
|
+
}
|
|
227
|
+
|
|
183
228
|
.hljs {
|
|
184
229
|
background: transparent;
|
|
185
230
|
padding: 0;
|
package/client/index.tsx
CHANGED
|
@@ -4,6 +4,8 @@ import './structured-clone-shim'
|
|
|
4
4
|
import 'blobatar/motion.css'
|
|
5
5
|
import './index.css'
|
|
6
6
|
|
|
7
|
+
import { initializeLocalUser, installHostApi } from './features/collab/host-state'
|
|
8
|
+
|
|
7
9
|
import { startHmrWatchdog } from './runtime/hmr-watchdog'
|
|
8
10
|
|
|
9
11
|
// React Fast Refresh works here despite React being externalized to the
|
|
@@ -22,12 +24,15 @@ if (import.meta.hot) {
|
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export async function init(el: HTMLElement) {
|
|
25
|
-
|
|
26
|
-
//
|
|
27
|
-
|
|
27
|
+
installHostApi()
|
|
28
|
+
// Startup config and any proxy-verified user load in parallel with the
|
|
29
|
+
// main chunk, so both are available synchronously from the first render.
|
|
30
|
+
const [{ mount }, config, proxyUser] = await Promise.all([
|
|
28
31
|
import('./main'),
|
|
29
|
-
import('./api/app-config').then(m => m.loadAppConfig())
|
|
32
|
+
import('./api/app-config').then(m => m.loadAppConfig()),
|
|
33
|
+
import('./features/collab/proxy-user').then(m => m.loadProxyUser())
|
|
30
34
|
])
|
|
35
|
+
initializeLocalUser(config?.experimental.collab === true, proxyUser)
|
|
31
36
|
mount(el)
|
|
32
37
|
}
|
|
33
38
|
|
package/client/main.tsx
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
2
|
-
import { Agentation } from 'agentation'
|
|
3
2
|
import { createRoot } from 'react-dom/client'
|
|
4
|
-
import { Router
|
|
3
|
+
import { Router } from 'wouter'
|
|
5
4
|
|
|
6
5
|
import { Toaster } from '@/client/components/ui/toast'
|
|
7
6
|
import { TooltipProvider } from '@/client/components/ui/tooltip'
|
|
@@ -11,14 +10,6 @@ import { AppRouter } from './app/AppRouter'
|
|
|
11
10
|
|
|
12
11
|
const queryClient = new QueryClient()
|
|
13
12
|
|
|
14
|
-
// Agentation has no built-in route filter (checked v2.3.3 props), so gate the
|
|
15
|
-
// mount ourselves: the harness debug page is a raw log surface where the
|
|
16
|
-
// annotation toolbar just overlaps the panes.
|
|
17
|
-
function DevAgentation() {
|
|
18
|
-
const [onHarnessDebug] = useRoute('/dev/harness')
|
|
19
|
-
return onHarnessDebug ? null : <Agentation />
|
|
20
|
-
}
|
|
21
|
-
|
|
22
13
|
// Open the single app-wide chat WebSocket once and hand it the query client so
|
|
23
14
|
// live frames fold into the RQ transcript cache. Lives for the page's lifetime.
|
|
24
15
|
initConnection(queryClient)
|
|
@@ -37,7 +28,6 @@ export function mount(el: HTMLElement) {
|
|
|
37
28
|
<AppRouter />
|
|
38
29
|
</Router>
|
|
39
30
|
<Toaster />
|
|
40
|
-
{process.env.NODE_ENV === 'development' && <DevAgentation />}
|
|
41
31
|
</TooltipProvider>
|
|
42
32
|
</QueryClientProvider>
|
|
43
33
|
)
|
package/client/theme.css
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* The actual CSS variables (`--sans`, `--mono`, `--background`, etc.)
|
|
7
7
|
* are owned by the host and declared on `:root` / `.dark` in
|
|
8
|
-
* `client/index.css`.
|
|
8
|
+
* `client/index.css`. Collaboration colors are scoped to `[data-collab-color]`
|
|
9
|
+
* elements. This file only maps Tailwind's `--font-*` /
|
|
9
10
|
* `--color-*` / `--radius-*` tokens onto those host-owned variables via
|
|
10
11
|
* `@theme inline`,
|
|
11
12
|
* which:
|
|
@@ -39,6 +40,8 @@
|
|
|
39
40
|
--color-border: var(--border);
|
|
40
41
|
--color-input: var(--input);
|
|
41
42
|
--color-ring: var(--ring);
|
|
43
|
+
--color-collab: var(--collab);
|
|
44
|
+
--color-collab-foreground: var(--collab-foreground);
|
|
42
45
|
|
|
43
46
|
/* shadcn compatibility: secondary surfaces and chart palettes. */
|
|
44
47
|
--color-secondary: var(--secondary);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Dc as a,Ec as b}from"/chunk-jf6czgrz.js";import"/chunk-vfpsc75k.js";import"/chunk-z3byfve5.js";import"/chunk-97eg9mjn.js";export{b as useAppConfig,a as loadAppConfig};
|