moi-computer 0.11.1-dev.1c52199 → 0.11.1-dev.be1ed10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/client/api/app-config.ts +1 -2
  2. package/client/app/routes/WorkspaceRoute.tsx +19 -27
  3. package/client/features/applets/AppletMount.tsx +1 -4
  4. package/client/features/applets/applet-runtime.ts +2 -13
  5. package/client/features/chat/applet-chat-intents.ts +6 -15
  6. package/client/features/chat/sessions/useSelectedSession.ts +20 -64
  7. package/client/features/chat/useChat.ts +0 -4
  8. package/client/features/dev/DevIndexPage.tsx +0 -5
  9. package/client/features/dev/DevRoutes.tsx +1 -14
  10. package/client/features/views/ViewManager.tsx +1 -4
  11. package/client/features/views/api.ts +2 -2
  12. package/client/features/views/useViewBuilderActions.ts +0 -3
  13. package/client/features/workspace/WorkspaceLayoutContext.tsx +3 -18
  14. package/client/features/workspace/WorkspaceScreen.tsx +11 -19
  15. package/client/features/workspace/api.ts +1 -3
  16. package/client/features/workspace/moi-context.ts +2 -7
  17. package/client/features/workspace/useWorkspaceNavigation.ts +3 -12
  18. package/client/index.tsx +3 -4
  19. package/dist/chunk-691pqsj6.js +2 -0
  20. package/dist/chunk-7a5nm4k9.css +1 -0
  21. package/dist/chunk-amb8y04y.js +1 -0
  22. package/dist/chunk-cf3pgy7j.js +546 -0
  23. package/dist/{chunk-wnmf38ta.js → chunk-mzrgr577.js} +1 -1
  24. package/dist/chunk-q6a0g26x.js +1 -0
  25. package/dist/chunk-twgdemkc.js +74 -0
  26. package/dist/chunk-x90k0f5c.js +2 -0
  27. package/dist/chunk-yq00csvd.js +2 -0
  28. package/dist/index.html +1 -1
  29. package/lib/moi-context.ts +0 -7
  30. package/lib/types.ts +6 -12
  31. package/package.json +1 -3
  32. package/server/api.ts +2 -23
  33. package/server/app-config.ts +34 -127
  34. package/server/applet-typecheck.ts +1 -6
  35. package/server/applets/build-applet.ts +0 -10
  36. package/server/cli.ts +12 -57
  37. package/server/layout.ts +3 -16
  38. package/server/skills-template.ts +2 -14
  39. package/server/web.ts +17 -62
  40. package/ui-components/avatar.tsx +4 -5
  41. package/ui-components/docs/avatar.md +5 -5
  42. package/client/features/collab/DevCollabIdentity.tsx +0 -170
  43. package/client/features/collab/DevCollabKit.tsx +0 -501
  44. package/client/features/collab/DevCollabPage.tsx +0 -25
  45. package/client/features/collab/WorkspaceCollabControls.tsx +0 -313
  46. package/client/features/collab/client.ts +0 -146
  47. package/client/features/collab/components.tsx +0 -307
  48. package/client/features/collab/dev-persona.ts +0 -66
  49. package/client/features/collab/engine.ts +0 -96
  50. package/client/features/collab/entry.tsx +0 -35
  51. package/client/features/collab/facehash-avatar.ts +0 -132
  52. package/client/features/collab/fake-engine.ts +0 -130
  53. package/client/features/collab/hooks.tsx +0 -253
  54. package/client/features/collab/identity.ts +0 -305
  55. package/client/features/collab/index.ts +0 -45
  56. package/client/features/collab/people.ts +0 -102
  57. package/client/features/collab/personal-state.ts +0 -61
  58. package/client/features/collab/presence-publisher.ts +0 -29
  59. package/client/features/collab/presence-target.ts +0 -10
  60. package/client/features/collab/primitives.tsx +0 -398
  61. package/client/features/collab/proxy-identity.ts +0 -24
  62. package/client/features/collab/store.ts +0 -156
  63. package/client/features/workspace/layout-save.ts +0 -13
  64. package/dist/chunk-1ftessc8.js +0 -2
  65. package/dist/chunk-3802vh2p.js +0 -2
  66. package/dist/chunk-542a2m9m.js +0 -1
  67. package/dist/chunk-5745d83v.js +0 -2
  68. package/dist/chunk-5zxdsjym.js +0 -1
  69. package/dist/chunk-7r4z77ry.js +0 -2
  70. package/dist/chunk-9cm0wjah.js +0 -79
  71. package/dist/chunk-cvgdm1hq.js +0 -2
  72. package/dist/chunk-gptm4jpd.js +0 -546
  73. package/dist/chunk-xaehhr1j.css +0 -1
  74. package/dist/chunk-xpt063fx.js +0 -1
  75. package/lib/collab/colors.ts +0 -24
  76. package/lib/collab/protocol.ts +0 -83
  77. package/lib/collab/types.ts +0 -63
  78. package/lib/experimental.ts +0 -14
  79. package/server/chat-selection.ts +0 -23
  80. package/server/collab/applet-module.ts +0 -50
  81. package/server/collab/cloudflare-access.ts +0 -77
  82. package/server/collab/config.ts +0 -18
  83. package/server/collab/ipc.ts +0 -10
  84. package/server/collab/manager.ts +0 -407
  85. package/server/collab/service.ts +0 -137
  86. package/server/collab/skill/collab-env.d.ts +0 -92
  87. package/server/collab/skill/index.ts +0 -59
  88. package/server/collab/worker.ts +0 -52
  89. package/workspace/.claude/skills/moi-workspace/references/COLLABORATIVE.md +0 -151
@@ -1,4 +1,3 @@
1
- import { WorkspaceLayoutContext } from './WorkspaceLayoutContext'
2
1
  // Central assembly of the moi context sent with every chat message — the one
3
2
  // place that snapshots the workspace's primary UI state (active tab, view
4
3
  // titles) and drains queued one-shot directives. The structured `MoiContext`
@@ -22,9 +21,8 @@ import { WorkspaceLayoutContext } from './WorkspaceLayoutContext'
22
21
  // Adding a new ambient field (e.g. scratchpad selection): extend the
23
22
  // `MoiContext` type and its renderer in lib/moi-context.ts, then supply
24
23
  // the field in `useMoiUserMessageContext`'s builder below.
25
- import { useCallback, useContext } from 'react'
24
+ import { useCallback } from 'react'
26
25
 
27
- import { useAppConfig } from '@/client/api/app-config'
28
26
  import { useViewBuilders, useViews } from '@/client/features/views/api'
29
27
  import { useWorkspaceId } from '@/client/features/workspace/WorkspaceContext'
30
28
  import type { MoiAppletMessage, MoiContext } from '@/lib/moi-context'
@@ -113,8 +111,6 @@ export function useMoiUserMessageContext({
113
111
  appletParams
114
112
  }: WorkspaceTabAddress): (options?: MoiUserMessageOptions) => MoiContext {
115
113
  const workspaceId = useWorkspaceId()
116
- const { experimental } = useAppConfig()
117
- const collabReference = useContext(WorkspaceLayoutContext)?.collabReference
118
114
  const views = useViews(workspaceId).data
119
115
  const builders = useViewBuilders(workspaceId).data
120
116
  return useCallback(
@@ -123,13 +119,12 @@ export function useMoiUserMessageContext({
123
119
  const tabParams = envelopeTabParams(activeTab, appletParams)
124
120
  return {
125
121
  activeTab,
126
- ...(experimental.collab && collabReference ? { collabReference } : {}),
127
122
  tabTitle: activeTabTitle(activeTab, views, builders),
128
123
  ...(tabParams ? { tabParams } : {}),
129
124
  ...(options.applet ? { applet: options.applet } : {}),
130
125
  ...(directives.length > 0 ? { directives } : {})
131
126
  }
132
127
  },
133
- [workspaceId, activeTab, appletParams, views, builders, experimental.collab, collabReference]
128
+ [workspaceId, activeTab, appletParams, views, builders]
134
129
  )
135
130
  }
@@ -6,8 +6,6 @@ import { usePathname, useSearch } from 'wouter/use-browser-location'
6
6
  import { toast } from '@/client/components/ui/toast'
7
7
  import { reportAppletError } from '@/client/features/applets/applet-log'
8
8
  import { useAppletEvent } from '@/client/features/applets/applet-runtime'
9
- import { useCollabIdentityEnabled } from '@/client/features/collab/entry'
10
- import { usePersonalTabs } from '@/client/features/collab/personal-state'
11
9
  import { normalizeTabsState, resolveActiveTab, tabAvailable } from './tab-resolution'
12
10
  import { useWorkspaceLayoutCtx } from './WorkspaceLayoutContext'
13
11
  import { useLatestRef } from '@/client/lib/use-latest-ref'
@@ -33,7 +31,6 @@ type UseWorkspaceNavigationOptions = { views: ViewInfo[]; builders: ViewBuilder[
33
31
 
34
32
  export function useWorkspaceNavigation({ views, builders, split }: UseWorkspaceNavigationOptions) {
35
33
  const { layout, setLayout, workspaceId } = useWorkspaceLayoutCtx()
36
- const personal = useCollabIdentityEnabled()
37
34
  const [, navigate] = useLocation()
38
35
  const router = useRouter()
39
36
  const { base } = router
@@ -42,12 +39,7 @@ export function useWorkspaceNavigation({ views, builders, split }: UseWorkspaceN
42
39
  const path = usePathname(router).slice(workspacePath(workspaceId, base).length + 1)
43
40
  const search = canonicalSearch(useSearch(router))
44
41
  const appletParams = useMemo(() => readViewParams(search), [search])
45
- const [personalTabs, setPersonalTabs] = usePersonalTabs(
46
- workspaceId,
47
- personal,
48
- normalizeTabsState(layout.tabs)
49
- )
50
- const tabsState = normalizeTabsState(personalTabs)
42
+ const tabsState = normalizeTabsState(layout.tabs)
51
43
  const tabsStateRef = useLatestRef(tabsState)
52
44
  const remembered = useMemo(() => {
53
45
  let entries = rememberedAddresses.get(workspaceId)
@@ -64,10 +56,9 @@ export function useWorkspaceNavigation({ views, builders, split }: UseWorkspaceN
64
56
  const setTabs = useCallback(
65
57
  (tabs: WorkspaceTabsState) => {
66
58
  tabsStateRef.current = tabs
67
- if (personal) setPersonalTabs(tabs)
68
- else setLayout({ tabs })
59
+ setLayout({ tabs })
69
60
  },
70
- [setLayout, tabsStateRef, personal, setPersonalTabs]
61
+ [setLayout, tabsStateRef]
71
62
  )
72
63
 
73
64
  const go = useCallback(
package/client/index.tsx CHANGED
@@ -22,12 +22,11 @@ if (import.meta.hot) {
22
22
  }
23
23
 
24
24
  export async function init(el: HTMLElement) {
25
- // Startup config and any proxy-verified identity load in parallel with the
26
- // main chunk, so both are available synchronously from the first render.
25
+ // Startup config loads in parallel with the main chunk, so it is available
26
+ // synchronously to every component from the first render.
27
27
  const [{ mount }] = await Promise.all([
28
28
  import('./main'),
29
- import('./api/app-config').then(m => m.loadAppConfig()),
30
- import('./features/collab/proxy-identity').then(m => m.loadProxyIdentity())
29
+ import('./api/app-config').then(m => m.loadAppConfig())
31
30
  ])
32
31
  mount(el)
33
32
  }
@@ -0,0 +1,2 @@
1
+ var f=Object.create;var{getPrototypeOf:k,defineProperty:v,getOwnPropertyNames:y}=Object;var u=Object.prototype.hasOwnProperty;function z(a){return this[a]}var _,j,e=(a,r,t)=>{var l=a!=null&&typeof a==="object";if(l){var n=r?_??=new WeakMap:j??=new WeakMap,o=n.get(a);if(o)return o}t=a!=null?f(k(a)):{};let s=r||!a||!a.__esModule||!u.call(a,"default")?v(t,"default",{value:a,enumerable:!0}):t;if(a&&typeof a==="object"||typeof a==="function"){for(let i of y(a))if(!u.call(s,i))v(s,i,{get:z.bind(a,i),enumerable:!0})}if(l)n.set(a,s);return s};var x=(a,r)=>()=>(r||a((r={exports:{}}).exports,r),r.exports);var C=(a)=>a;function E(a,r){this[a]=C.bind(null,r)}var Z=(a,r)=>{for(var t in r)v(a,t,{get:r[t],enumerable:!0,configurable:!0,set:E.bind(r,t)})};var Ie=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(r,t)=>(typeof require<"u"?require:r)[t]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var b,w,h,H=(a,r)=>{for(var[t,l,n]of b||[])for(var o=[a],s=globalThis,i=s.document,m,p,g,c,d;p=o.pop();)if(!w[p]&&(g=l[p])){w[p]=1;for(c=1;c<g.length;c++)o.push(n[g[c]]);if(!r&&p!==a&&(m=i&&i.head)){if(h===void 0)h=(c=i.querySelector("meta[property=csp-nonce]"))&&(c.nonce||c.getAttribute("nonce"))||"";if(d=i.createElement("link"),d.rel="modulepreload",d.crossOrigin="",h)d.nonce=h;d.href=new s.URL(g[0],t),m.appendChild(d)}}},q=(a,r,t,l)=>{for(var n={},o=0;o<r.length;o++)n[r[o]]=t[o];(b||=[]).push([a,n,r]),w||={},H(r[l],1)};q(import.meta.url,["691pqsj6","twgdemkc","q6a0g26x","nf2wkvf9","cf3pgy7j","x90k0f5c","yq00csvd","amb8y04y","mzrgr577"],[["/chunk-691pqsj6.js"],["/chunk-twgdemkc.js",5,6,0],["/chunk-q6a0g26x.js",6],["/chunk-nf2wkvf9.js"],["/chunk-cf3pgy7j.js",8,5,6,0],["/chunk-x90k0f5c.js",0,6],["/chunk-yq00csvd.js",0],["/chunk-amb8y04y.js",8],["/chunk-mzrgr577.js"]],0);
2
+ if(typeof globalThis.structuredClone==="function")globalThis.structuredClone=globalThis.structuredClone.bind(globalThis);async function A(a){let[{mount:r}]=await Promise.all([(H("twgdemkc"),import("/chunk-twgdemkc.js")),(H("q6a0g26x"),import("/chunk-q6a0g26x.js")).then((t)=>t.loadAppConfig())]);r(a)}globalThis.__init=A;export{e,x,Z,Ie,H};