moi-computer 0.13.1-next.0 → 0.13.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.
Files changed (82) hide show
  1. package/client/api/app-config.ts +0 -1
  2. package/client/app/routes/workspace-route.tsx +4 -7
  3. package/client/features/account/account-test-utils.tsx +13 -5
  4. package/client/features/account/api.ts +4 -2
  5. package/client/features/account/profile-actions.ts +1 -1
  6. package/client/features/app-settings/avatar-upload.tsx +62 -0
  7. package/client/features/app-settings/profile-settings.tsx +10 -0
  8. package/client/features/chat/applet-chat-intents.ts +4 -4
  9. package/client/features/chat/sessions/api.ts +5 -5
  10. package/client/features/chat/sessions/use-selected-session.ts +3 -3
  11. package/client/features/chat/use-chat.ts +4 -4
  12. package/client/features/collab/applet-api.ts +1 -1
  13. package/client/features/collab/components/cursors.tsx +6 -1
  14. package/client/features/collab/components/presence-avatars.tsx +1 -1
  15. package/client/features/collab/components/presence-frame.tsx +1 -1
  16. package/client/features/collab/components/presence-group.tsx +1 -1
  17. package/client/features/collab/components/presence-helpers.ts +2 -2
  18. package/client/features/collab/components/user-avatar-group.tsx +1 -1
  19. package/client/features/collab/components/user-avatar.tsx +1 -1
  20. package/client/features/collab/components/user.tsx +1 -1
  21. package/client/features/collab/index.ts +3 -3
  22. package/client/features/{workspace-members → collab/members}/api.ts +6 -3
  23. package/client/features/{workspace-members → collab/members}/hooks.ts +11 -35
  24. package/client/features/{workspace-members → collab/members}/store.ts +4 -4
  25. package/client/features/{workspace-members → collab/members}/types.ts +2 -2
  26. package/client/features/collab/{client.ts → presence/client.ts} +2 -2
  27. package/client/features/collab/{provider.tsx → presence/provider.tsx} +1 -12
  28. package/client/features/collab/{users.ts → presence/users.ts} +19 -21
  29. package/client/features/collab/sharing/agent-invite.tsx +30 -0
  30. package/client/features/collab/sharing/workspace-members.tsx +277 -0
  31. package/client/features/collab/sharing/workspace-sharing-menu.tsx +179 -0
  32. package/client/features/collab/testing/component-fixtures.tsx +3 -3
  33. package/client/features/collab/testing/fake-engine.ts +2 -2
  34. package/client/features/dev/collab/collab-playground.tsx +2 -2
  35. package/client/features/dev/dev-index-page.tsx +0 -6
  36. package/client/features/dev/dev-routes.tsx +0 -2
  37. package/client/features/dev/workspace-setup-mocks.ts +0 -1
  38. package/client/features/identity/host-api.ts +2 -2
  39. package/client/features/identity/store.ts +1 -1
  40. package/client/features/views/use-view-actions.ts +3 -3
  41. package/client/features/workspace/browser-tab-state.ts +6 -6
  42. package/client/features/workspace/workspace-content.tsx +10 -6
  43. package/dist/{chunk-00s35r33.js → chunk-3smkkcfw.js} +76 -76
  44. package/dist/chunk-47h9c2qy.js +2 -0
  45. package/dist/chunk-8qed2gqp.js +75 -0
  46. package/dist/{chunk-7rz6g7g7.js → chunk-8zy3vesm.js} +1 -1
  47. package/dist/{chunk-s5s1vzdw.js → chunk-a47zy276.js} +2 -2
  48. package/dist/chunk-g4c1nte9.css +1 -0
  49. package/dist/chunk-kcactdr4.js +2 -0
  50. package/dist/chunk-m8bhx6tw.js +1 -0
  51. package/dist/{chunk-svxhxfeq.js → chunk-pf19zcrn.js} +2 -2
  52. package/dist/{chunk-kdgk4dac.js → chunk-th91xfnp.js} +1 -1
  53. package/dist/chunk-ygzxah0e.js +1 -0
  54. package/dist/index.html +1 -1
  55. package/lib/types.ts +0 -1
  56. package/package.json +1 -1
  57. package/server/app-config.ts +2 -7
  58. package/server/applets/declarations.ts +6 -7
  59. package/server/cli/commands/init.ts +0 -11
  60. package/server/collab/config.ts +1 -5
  61. package/server/collab/manager.ts +5 -2
  62. package/server/collab/skill/index.ts +1 -47
  63. package/server/skills/template.ts +3 -2
  64. package/server/skills/update.ts +1 -1
  65. package/server/skills/workspace.ts +0 -2
  66. package/server/web.ts +1 -2
  67. package/server/workspaces/scaffold.ts +1 -0
  68. package/skill/SKILL.md +1 -1
  69. package/client/features/collab/workspace-users-menu.tsx +0 -190
  70. package/client/features/dev/cloud-avatar-upload.tsx +0 -58
  71. package/client/features/dev/cloud-page.tsx +0 -363
  72. package/dist/chunk-af2jyddf.js +0 -2
  73. package/dist/chunk-cekekc3f.css +0 -1
  74. package/dist/chunk-ep5vh16c.js +0 -75
  75. package/dist/chunk-t0r0bds1.js +0 -1
  76. package/dist/chunk-vp2qzc0d.js +0 -1
  77. package/dist/chunk-wz5qv1bn.js +0 -2
  78. /package/client/features/{workspace-members → collab/members}/keys.ts +0 -0
  79. /package/client/features/collab/{hooks.tsx → presence/hooks.tsx} +0 -0
  80. /package/client/features/collab/{presence-publisher.ts → presence/presence-publisher.ts} +0 -0
  81. /package/client/features/collab/{presence-target.ts → presence/presence-target.ts} +0 -0
  82. /package/client/features/collab/{store.ts → presence/store.ts} +0 -0
@@ -2,7 +2,7 @@ import { useCallback, useMemo, useState } from 'react'
2
2
 
3
3
  import type { WorkspaceTabsState } from '@/lib/types'
4
4
  import { normalizeWorkspaceTabs } from '@/lib/workspace-layout'
5
- import { useCollabEnabled } from '@/client/features/collab'
5
+ import { useAppConfig } from '@/client/api/app-config'
6
6
  import { useWorkspaceLayoutCtx } from './workspace-layout-context'
7
7
 
8
8
  const keyFor = (workspaceId: string) => `moi:collab:${workspaceId}:tabs`
@@ -29,15 +29,15 @@ export function writeWorkspaceTabs(workspaceId: string, tabs: WorkspaceTabsState
29
29
 
30
30
  export function useWorkspaceTabs() {
31
31
  const { workspaceId, layout, setLayout } = useWorkspaceLayoutCtx()
32
- const enabled = useCollabEnabled()
32
+ const cloud = useAppConfig().environment === 'cloud'
33
33
  const defaults = useMemo(() => normalizeWorkspaceTabs(layout.tabs), [layout.tabs])
34
34
  const [local, setLocal] = useState<WorkspaceTabsState>(() =>
35
- enabled ? readWorkspaceTabs(workspaceId, defaults) : defaults
35
+ cloud ? readWorkspaceTabs(workspaceId, defaults) : defaults
36
36
  )
37
37
  const setTabs = useCallback(
38
38
  (tabs: WorkspaceTabsState) => {
39
39
  const next = normalizeWorkspaceTabs(tabs)
40
- if (enabled) {
40
+ if (cloud) {
41
41
  setLocal(next)
42
42
  writeWorkspaceTabs(workspaceId, next)
43
43
  } else {
@@ -45,7 +45,7 @@ export function useWorkspaceTabs() {
45
45
  }
46
46
  return next
47
47
  },
48
- [enabled, setLayout, workspaceId]
48
+ [cloud, setLayout, workspaceId]
49
49
  )
50
- return [enabled ? local : defaults, setTabs] as const
50
+ return [cloud ? local : defaults, setTabs] as const
51
51
  }
@@ -17,7 +17,8 @@ import type { WelcomeDestination } from '@/client/features/chat/messages/chat-em
17
17
  import { ChatPopup } from '@/client/features/chat/chat-popup'
18
18
  import { ThemePanel } from '@/client/features/workspace/theme-panel'
19
19
  import { Overview } from '@/client/features/overview/overview'
20
- import { WorkspaceUsersMenu } from '@/client/features/collab'
20
+ import { useAppConfig } from '@/client/api/app-config'
21
+ import { WorkspaceSharingMenu } from '@/client/features/collab'
21
22
  import { PanelHeader } from '@/client/components/shared/panel-header'
22
23
  import { Button } from '@/client/components/ui/button'
23
24
  import { Tooltip, TooltipContent, TooltipTrigger } from '@/client/components/ui/tooltip'
@@ -117,6 +118,7 @@ function tabItemFor(
117
118
  }
118
119
 
119
120
  export function WorkspaceContent({ widgets, views: allViews }: WorkspaceContentProps) {
121
+ const { environment } = useAppConfig()
120
122
  const { layout, workspaceId } = useWorkspaceLayoutCtx()
121
123
  const theme = resolveWorkspaceTheme(layout.theme)
122
124
  const viewActions = useViewActions()
@@ -543,11 +545,13 @@ export function WorkspaceContent({ widgets, views: allViews }: WorkspaceContentP
543
545
  onReorder={reorderTabs}
544
546
  />
545
547
  </div>
546
- <WorkspaceUsersMenu
547
- workspaceId={workspaceId}
548
- describeTab={tab => tabItemFor(tab, allViews, false, () => false)}
549
- onOpenTab={openTab}
550
- />
548
+ {environment === 'cloud' && (
549
+ <WorkspaceSharingMenu
550
+ workspaceId={workspaceId}
551
+ describeTab={tab => tabItemFor(tab, allViews, false, () => false)}
552
+ onOpenTab={openTab}
553
+ />
554
+ )}
551
555
  {canUseSplit && mode === 'fullscreen' && (
552
556
  <Tooltip>
553
557
  <TooltipTrigger