moi-computer 0.12.1-next.3 → 0.13.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.
Files changed (236) hide show
  1. package/bunfig.toml +1 -5
  2. package/client/api/app-config.ts +1 -2
  3. package/client/api/app-ui-keys.ts +3 -1
  4. package/client/api/http.ts +4 -1
  5. package/client/api/workspace-keys.ts +3 -3
  6. package/client/app/app-provider.tsx +22 -2
  7. package/client/app/app-router.tsx +4 -0
  8. package/client/app/routes/home-route.tsx +14 -0
  9. package/client/app/routes/onboarding-route.tsx +11 -0
  10. package/client/app/routes/settings-route.tsx +1 -1
  11. package/client/app/routes/workspace-route.tsx +21 -19
  12. package/client/components/shared/screen-shell.tsx +23 -0
  13. package/client/components/shared/ultrafast-icon.tsx +61 -0
  14. package/client/components/shared/workspace-icon.tsx +2 -2
  15. package/client/features/account/account-test-utils.tsx +4 -3
  16. package/client/features/app-settings/api.ts +33 -0
  17. package/client/features/app-settings/general-settings.tsx +39 -0
  18. package/client/features/{settings → app-settings}/settings-page.tsx +5 -1
  19. package/client/features/chat/applet-chat-intents.ts +4 -20
  20. package/client/features/chat/chat-send.ts +17 -13
  21. package/client/features/chat/composer/model-order.ts +8 -4
  22. package/client/features/chat/composer/model-picker.tsx +88 -34
  23. package/client/features/chat/composer/use-workspace-composer-state.tsx +11 -3
  24. package/client/features/chat/composer/use-workspace-skill-updates.ts +1 -1
  25. package/client/features/chat/connection/chat-frames.ts +3 -15
  26. package/client/features/chat/messages/chat-empty-state.tsx +1 -4
  27. package/client/features/chat/messages/fork-history.ts +5 -5
  28. package/client/features/chat/messages/tool-group/subagent-card.tsx +1 -0
  29. package/client/features/chat/messages/turn-view.tsx +3 -12
  30. package/client/features/chat/messages/user-message-bubble.tsx +63 -0
  31. package/client/features/chat/sessions/api.ts +121 -80
  32. package/client/features/chat/sessions/browser-tab-state.ts +14 -12
  33. package/client/features/chat/sessions/chat-selector.tsx +5 -6
  34. package/client/features/chat/sessions/use-selected-session.ts +172 -257
  35. package/client/features/chat/use-chat.ts +14 -19
  36. package/client/features/collab/components/user-avatar.tsx +4 -10
  37. package/client/features/collab/workspace-users-menu.tsx +1 -1
  38. package/client/features/connectors/api.ts +12 -4
  39. package/client/features/connectors/mcp-server-cards.tsx +17 -7
  40. package/client/features/connectors/read-connectors.ts +35 -0
  41. package/client/features/demo/demo-dialog.tsx +11 -3
  42. package/client/features/dev/collab/local-user-settings.tsx +1 -1
  43. package/client/features/dev/dev-index-page.tsx +5 -0
  44. package/client/features/dev/dev-routes.tsx +2 -0
  45. package/client/features/dev/harness-debug-page.tsx +3 -3
  46. package/client/features/dev/onboarding-preview-page.tsx +76 -0
  47. package/client/features/dev/workspace-setup-mocks.ts +16 -14
  48. package/client/features/dev/workspace-setup-preview.tsx +11 -17
  49. package/client/features/harness/api.ts +45 -15
  50. package/client/features/harness/device-login-steps.tsx +9 -3
  51. package/client/features/harness/harness-login-panel.tsx +228 -0
  52. package/client/features/harness/harness-presentation.ts +15 -0
  53. package/client/features/harness/harness-selector.tsx +119 -0
  54. package/client/features/harness/use-harness-login.ts +77 -0
  55. package/client/features/home/home-page.tsx +7 -7
  56. package/client/features/onboarding/agent-setup-step.tsx +57 -0
  57. package/client/features/onboarding/api.ts +42 -0
  58. package/client/features/onboarding/onboarding-idea-disk.tsx +129 -0
  59. package/client/features/onboarding/onboarding-page.tsx +32 -0
  60. package/client/features/onboarding/onboarding-screen.tsx +20 -0
  61. package/client/features/onboarding/onboarding-status.tsx +24 -0
  62. package/client/features/onboarding/workspace-setup-step.tsx +239 -0
  63. package/client/features/overview/default/registry.tsx +2 -2
  64. package/client/features/overview/default/views-widget.tsx +6 -5
  65. package/client/features/overview/overview.tsx +9 -11
  66. package/client/features/overview/widget-canvas.tsx +1 -1
  67. package/client/features/overview/workspace-name.tsx +2 -2
  68. package/client/features/views/api.ts +69 -16
  69. package/client/features/views/pending-view-screen.tsx +30 -9
  70. package/client/features/views/use-view-actions.ts +19 -20
  71. package/client/features/views/view-presentation.ts +2 -2
  72. package/client/features/views/view-submission.ts +28 -41
  73. package/client/features/workspace/add/api.ts +3 -23
  74. package/client/features/workspace/add/create-workspace-dialog.tsx +6 -5
  75. package/client/features/workspace/add/import-workspace-dialog.tsx +3 -3
  76. package/client/features/workspace/add/workspace-agent-options.ts +11 -12
  77. package/client/features/workspace/add/workspace-agent-selector.tsx +3 -132
  78. package/client/features/workspace/api.ts +32 -36
  79. package/client/features/workspace/harness-transition.ts +89 -0
  80. package/client/features/{settings → workspace/settings}/api.ts +1 -34
  81. package/client/features/{settings → workspace/settings}/connectors-settings.tsx +31 -10
  82. package/client/features/workspace/settings/general-settings.tsx +180 -0
  83. package/client/features/{settings → workspace/settings}/use-env-vars.ts +1 -1
  84. package/client/features/{settings → workspace/settings}/workspace-icon-picker.tsx +3 -3
  85. package/client/features/workspace/setup/workspace-login-state.tsx +37 -156
  86. package/client/features/workspace/setup/workspace-recovery-states.tsx +0 -12
  87. package/client/features/workspace/setup/workspace-setup.tsx +34 -14
  88. package/client/features/workspace/setup/workspace-welcome-state.tsx +2 -2
  89. package/client/features/workspace/use-workspace-navigation.ts +25 -9
  90. package/client/features/workspace/workspace-content.tsx +11 -8
  91. package/client/features/workspace/workspace-frame.tsx +2 -1
  92. package/client/features/workspace/workspace-layout-context.tsx +5 -2
  93. package/client/features/workspace/workspace-menu.tsx +12 -8
  94. package/client/features/workspace/workspace-pending-screen.tsx +10 -10
  95. package/client/features/workspace/workspace-presentation.tsx +5 -13
  96. package/client/features/workspace/workspace-state.ts +169 -0
  97. package/client/features/workspace/workspace-tabs.tsx +22 -2
  98. package/client/index.css +2 -0
  99. package/client/index.tsx +3 -3
  100. package/client/lib/flags.ts +1 -1
  101. package/client/lib/{app-icon-registry.ts → identity-icon-registry.ts} +10 -14
  102. package/client/runtime/workspace-events.ts +21 -4
  103. package/client/runtime/workspace-theme.ts +9 -0
  104. package/client/tailwind-config.ts +43 -0
  105. package/dist/chunk-2y59vrxg.js +5 -0
  106. package/dist/chunk-58dyt9bk.js +2 -0
  107. package/dist/{chunk-tqd3pkg8.css → chunk-60q353jq.css} +1 -1
  108. package/dist/chunk-bncc7heg.js +1 -0
  109. package/dist/{chunk-11cab5dq.css → chunk-cq2r11fg.css} +1 -1
  110. package/dist/chunk-cqt3s31j.js +546 -0
  111. package/dist/chunk-dcmks9sm.js +75 -0
  112. package/dist/chunk-md45evr2.css +1 -0
  113. package/dist/chunk-n0nab26d.js +1 -0
  114. package/dist/chunk-nf2wkvf9.js +14 -0
  115. package/dist/chunk-nmzhgyp9.js +2 -0
  116. package/dist/chunk-q37knr3m.js +2 -0
  117. package/dist/chunk-s90m4qkz.js +1 -0
  118. package/dist/chunk-wjvd4byz.js +2 -0
  119. package/dist/index.html +1 -1
  120. package/lib/harness-instructions.ts +1 -1
  121. package/lib/{app-icons.ts → identity-icons.ts} +6 -7
  122. package/lib/onboarding.ts +41 -0
  123. package/lib/speed-mode.ts +5 -0
  124. package/lib/types.ts +75 -64
  125. package/lib/view-build-directives.ts +1 -2
  126. package/lib/workspace-icon.ts +2 -2
  127. package/lib/workspace-layout.ts +1 -1
  128. package/lib/workspace-name.ts +15 -12
  129. package/package.json +11 -8
  130. package/server/README.md +27 -25
  131. package/server/api/harnesses.ts +31 -8
  132. package/server/api/index.ts +189 -127
  133. package/server/api/onboarding.ts +46 -0
  134. package/server/app-config.ts +16 -24
  135. package/server/app-settings.ts +6 -2
  136. package/server/applets/config.ts +5 -5
  137. package/server/applets/views.ts +19 -17
  138. package/server/cli/commands/init.ts +3 -3
  139. package/server/cli/commands/skill.ts +16 -17
  140. package/server/cli/commands/start.ts +8 -34
  141. package/server/cli/server.ts +18 -6
  142. package/server/collab/config.ts +1 -2
  143. package/server/collab/manager.ts +4 -1
  144. package/server/collab/skill/index.ts +1 -1
  145. package/server/control.ts +3 -3
  146. package/server/data-dir.ts +1 -1
  147. package/server/harness/README.md +24 -8
  148. package/server/harness/acp/session.ts +8 -4
  149. package/server/harness/auth.ts +14 -17
  150. package/server/harness/claude-code/NOTES.md +4 -3
  151. package/server/harness/claude-code/index.ts +5 -6
  152. package/server/harness/claude-code/mcp.ts +17 -0
  153. package/server/harness/claude-code/models.ts +2 -20
  154. package/server/harness/claude-code/run-action.ts +123 -0
  155. package/server/harness/claude-code/session-title.ts +5 -7
  156. package/server/harness/claude-code/session.ts +24 -16
  157. package/server/harness/codex/NOTES.md +22 -10
  158. package/server/harness/codex/adapter.ts +14 -17
  159. package/server/harness/codex/client.ts +8 -5
  160. package/server/harness/codex/connectors.ts +92 -0
  161. package/server/harness/codex/index.ts +4 -1
  162. package/server/harness/codex/pagination.ts +8 -5
  163. package/server/harness/codex/run-action.ts +93 -0
  164. package/server/harness/codex/session-title.ts +6 -8
  165. package/server/harness/codex/session.ts +11 -11
  166. package/server/harness/codex/transport.ts +13 -6
  167. package/server/harness/command.ts +45 -0
  168. package/server/harness/executable.ts +5 -0
  169. package/server/harness/fork.ts +6 -4
  170. package/server/harness/install.ts +49 -0
  171. package/server/harness/openclaw/session.ts +1 -2
  172. package/server/harness/run-action.ts +85 -0
  173. package/server/harness/session-title.ts +0 -46
  174. package/server/harness/types.ts +30 -3
  175. package/server/onboarding/brief.ts +29 -0
  176. package/server/onboarding/ideas.ts +48 -0
  177. package/server/onboarding/jobs.ts +291 -0
  178. package/server/onboarding/prompt.md +49 -0
  179. package/server/sessions/archive.ts +5 -14
  180. package/server/sessions/config.ts +17 -16
  181. package/server/sessions/lifecycle.ts +15 -13
  182. package/server/sessions/pending-views.ts +79 -108
  183. package/server/sessions/selected.ts +75 -161
  184. package/server/sessions/store.ts +40 -113
  185. package/server/sessions/view-sessions.ts +128 -111
  186. package/server/skills/locations.ts +82 -0
  187. package/server/skills/lock.ts +29 -0
  188. package/server/skills/template.ts +36 -25
  189. package/server/skills/update.ts +52 -5
  190. package/server/skills/version.ts +17 -22
  191. package/server/skills/workspace.ts +121 -0
  192. package/server/web.ts +22 -8
  193. package/server/workspace-state/file.ts +177 -0
  194. package/server/workspace-state/index.ts +162 -0
  195. package/server/workspace-state/legacy-migration.ts +79 -0
  196. package/server/workspace-state/lock.ts +42 -0
  197. package/server/workspace-state/types.ts +16 -0
  198. package/server/workspaces/change-harness.ts +88 -0
  199. package/server/workspaces/harness-transition.ts +29 -0
  200. package/server/workspaces/init.ts +29 -6
  201. package/server/workspaces/layout.ts +3 -0
  202. package/server/workspaces/registry.ts +27 -1
  203. package/{workspace/.claude/skills/moi-workspace → skill}/SKILL.md +7 -5
  204. package/{workspace/.claude/skills/moi-workspace → skill}/references/COLLAB.md +4 -8
  205. package/skill/references/DESIGN.md +167 -0
  206. package/{workspace/.claude/skills/moi-workspace → skill}/references/SCRATCHPAD.md +2 -2
  207. package/{workspace/.claude/skills/moi-workspace → skill}/references/UI-COMPONENTS.md +3 -0
  208. package/ui-components/badge.tsx +1 -1
  209. package/client/accept-hmr-dependencies.ts +0 -22
  210. package/client/features/settings/general-settings.tsx +0 -103
  211. package/client/features/workspace/setup/workspace-setup-panel.tsx +0 -18
  212. package/dist/chunk-20ynagd4.js +0 -2
  213. package/dist/chunk-42tde9a6.js +0 -1
  214. package/dist/chunk-9w543s0r.js +0 -2
  215. package/dist/chunk-a5372n61.js +0 -546
  216. package/dist/chunk-aja9y1vn.js +0 -68
  217. package/dist/chunk-fvcvrh3d.css +0 -1
  218. package/dist/chunk-gtfjw3nx.js +0 -1
  219. package/dist/chunk-j39y2aky.js +0 -14
  220. package/dist/chunk-pcnahct1.js +0 -5
  221. package/dist/chunk-pja30km3.js +0 -1
  222. package/dist/chunk-rm894bc2.js +0 -2
  223. package/dist/chunk-tevvtfbk.js +0 -10
  224. package/dist/chunk-tgt9zd0r.js +0 -2
  225. package/dist/chunk-tv5k5z00.js +0 -1
  226. package/dist/chunk-zq2ae5dx.js +0 -2
  227. package/lib/experimental.ts +0 -14
  228. package/workspace/.claude/skills/moi-workspace/references/DESIGN.md +0 -157
  229. /package/client/features/{settings → app-settings}/profile-settings.tsx +0 -0
  230. /package/client/features/{settings → app-settings}/settings-section.tsx +0 -0
  231. /package/client/features/{settings → app-settings}/users-settings.tsx +0 -0
  232. /package/client/features/{settings → workspace/settings}/environment-settings.tsx +0 -0
  233. /package/client/features/{settings → workspace/settings}/icon-picker-options.ts +0 -0
  234. /package/client/features/{settings → workspace/settings}/settings-layout.tsx +0 -0
  235. /package/client/features/{settings → workspace/settings}/workspace-settings-dialog.tsx +0 -0
  236. /package/{workspace/.claude/skills/moi-workspace → skill}/references/INTENTS.md +0 -0
@@ -1,10 +1,15 @@
1
- import { detectInstalledHarnesses } from '../harness/executable'
1
+ import { resolveWorkspaceEnv } from '../workspaces/env'
2
+ import { changeWorkspaceHarness } from '../workspaces/change-harness'
3
+ import { HarnessTransitionError, reserveWorkspaceOperation } from '../workspaces/harness-transition'
4
+ import { onboarding } from './onboarding'
5
+ import type { SpeedMode } from '@/lib/types'
6
+ import { isSpeedMode } from '@/lib/speed-mode'
2
7
  import { isMessageAttachments } from '@/lib/message-attachments'
3
8
  import { Hono } from 'hono'
4
9
  import { serveStatic } from 'hono/bun'
5
10
  import { createMiddleware } from 'hono/factory'
6
11
  import { existsSync } from 'node:fs'
7
- import { basename, join, resolve } from 'node:path'
12
+ import { basename, resolve } from 'node:path'
8
13
 
9
14
  import { UPDATE_ACTIVE_AGENT_MESSAGE } from '@/lib/update'
10
15
  import { resolveWorkspaceTheme } from '@/lib/themes'
@@ -16,7 +21,7 @@ import type {
16
21
  HarnessAvailability,
17
22
  SelectedSessionScope,
18
23
  UploadInfo,
19
- WorkspaceAgent,
24
+ WorkspaceHarness,
20
25
  WorkspaceEntry,
21
26
  WorkspaceType
22
27
  } from '@/lib/types'
@@ -60,17 +65,16 @@ import {
60
65
  import { loadScratchpadDoc, saveScratchpadDoc } from '../scratchpad/document'
61
66
  import { MAX_ASSET_BYTES, scratchpadAssetFile, storeScratchpadAsset } from '../scratchpad/assets'
62
67
  import {
68
+ deselectSession,
63
69
  getPinnedSession,
64
- getSelectedSession,
65
- getWorkspaceSessionSelection,
66
70
  pinSession,
67
- saveSelectedSession
71
+ saveSelectedSession,
72
+ unpinSession
68
73
  } from '../sessions/selected'
69
- import type { SelectedSessionUpdate } from '../sessions/selected'
70
74
  import { saveSessionConfig } from '../sessions/config'
71
75
  import type { SessionConfigPatch } from '../sessions/config'
72
- import { getSessionRecord, withSessionRecords } from '../sessions/store'
73
76
  import { archiveWorkspaceSession } from '../sessions/archive'
77
+ import { getWorkspaceState } from '../workspace-state'
74
78
  import { DIST_DIR, prebuilt } from '../static'
75
79
  import { getWorkspaceSkillsStatus, updateWorkspaceSkills } from '../skills/update'
76
80
  import { serveWorkspaceImagePreview } from '../workspaces/preview'
@@ -94,7 +98,8 @@ import {
94
98
  import { submitView, ViewStartupError } from '../sessions/view-sessions'
95
99
  import { listWidgets, serveWidget } from '../applets/widgets'
96
100
  import { getWorkspaceConfig, setWorkspaceConfig } from '../workspaces/config'
97
- import { provisionWorkspace, validateWorkspaceFolderName } from '../workspaces/init'
101
+ import { createWorkspaceDirectory, provisionWorkspace } from '../workspaces/init'
102
+ import { validateWorkspaceName } from '@/lib/workspace-name'
98
103
  import { resolveWorkspaceImportMetadata } from '../workspaces/import'
99
104
  import type { WorkspaceImportMetadata } from '../workspaces/import'
100
105
  import { getWorkspaceEnvView, parseEnvUpdate, updateWorkspaceEnv } from '../workspaces/env'
@@ -117,15 +122,6 @@ function eventOrigin(value: unknown): string | undefined {
117
122
  return typeof value === 'string' ? value : undefined
118
123
  }
119
124
 
120
- function publishSelectedSession(workspaceId: string, update: SelectedSessionUpdate): void {
121
- if (!update.changed) return
122
- publishEvent({
123
- type: 'selected-session:updated',
124
- workspaceId,
125
- sessionId: update.sessionId
126
- })
127
- }
128
-
129
125
  async function handleFunctionCall(
130
126
  req: Request,
131
127
  tail: string,
@@ -170,15 +166,37 @@ async function handleFunctionCall(
170
166
  const withWorkspace = createMiddleware<ApiEnv>(async (c, next) => {
171
167
  const id = c.req.param('id')
172
168
  if (!id) return c.text('Workspace not found', 404)
173
- const ws = await getWorkspace(id)
174
- if (!ws) return c.text('Workspace not found', 404)
175
- c.set('ws', ws)
176
- await next()
169
+ let release: (() => void) | undefined
170
+ try {
171
+ if (c.req.method !== 'GET' && !c.req.path.endsWith('/harness'))
172
+ release = reserveWorkspaceOperation(id)
173
+ const ws = await getWorkspace(id)
174
+ if (!ws) return c.text('Workspace not found', 404)
175
+ c.set('ws', ws)
176
+ await next()
177
+ } catch (error) {
178
+ if (error instanceof HarnessTransitionError) return c.text(error.message, 409)
179
+ throw error
180
+ } finally {
181
+ release?.()
182
+ }
177
183
  })
178
184
 
179
185
  // ---- single workspace: /api/workspaces/:id/* --------------------------------
180
186
  const one = new Hono<ApiEnv>()
181
187
  one.use('*', withWorkspace)
188
+ one.patch('/harness', async c => {
189
+ if (getAppConfig().demo) return c.text('Changing agents is unavailable in the demo', 403)
190
+ const body = await c.req.json().catch(() => null)
191
+ if (!body || !['claude-code', 'codex'].includes(body.type))
192
+ return c.text('Invalid agent selection', 400)
193
+ try {
194
+ return c.json(await changeWorkspaceHarness(c.get('ws'), body.type))
195
+ } catch (error) {
196
+ if (error instanceof HarnessTransitionError) return c.text(error.message, 409)
197
+ throw error
198
+ }
199
+ })
182
200
 
183
201
  one.get('/widgets', c => listWidgets(c.get('ws').path))
184
202
 
@@ -200,7 +218,7 @@ one.get('/views', c => listViews(c.get('ws').path))
200
218
  one.patch('/views/:viewId', async c => {
201
219
  const ws = c.get('ws')
202
220
  const body = await c.req.json().catch(() => null)
203
- if (await getPendingView(ws.path, c.req.param('viewId'))) {
221
+ if (await getPendingView(ws, c.req.param('viewId'))) {
204
222
  try {
205
223
  if (
206
224
  typeof body?.requirements !== 'string' &&
@@ -209,7 +227,7 @@ one.patch('/views/:viewId', async c => {
209
227
  )
210
228
  return c.text('Expected requirements, title, or icon', 400)
211
229
  return c.json(
212
- await updatePendingView(ws.id, ws.path, c.req.param('viewId'), {
230
+ await updatePendingView(ws, c.req.param('viewId'), {
213
231
  requirements: typeof body.requirements === 'string' ? body.requirements : undefined,
214
232
  title: typeof body.title === 'string' ? body.title.trim() : undefined,
215
233
  icon: typeof body.icon === 'string' ? body.icon : undefined
@@ -236,7 +254,7 @@ one.delete('/views/:viewId', async c => {
236
254
  const ws = c.get('ws')
237
255
  try {
238
256
  const viewId = c.req.param('viewId')
239
- if (await getPendingView(ws.path, viewId)) {
257
+ if (await getPendingView(ws, viewId)) {
240
258
  const active = new Set(
241
259
  harnessFor(ws)
242
260
  .activeSessions()
@@ -262,7 +280,7 @@ one.get('/views/*', c => {
262
280
 
263
281
  one.post('/views', async c => {
264
282
  const ws = c.get('ws')
265
- return c.json(await createPendingView(ws.id, ws.path), 201)
283
+ return c.json(await createPendingView(ws), 201)
266
284
  })
267
285
 
268
286
  one.post('/views/:viewId/submit', async c => {
@@ -274,7 +292,7 @@ one.post('/views/:viewId/submit', async c => {
274
292
  selectedSessionScope?: SelectedSessionScope
275
293
  model?: string
276
294
  effort?: string
277
- fastMode?: boolean
295
+ speedMode?: SpeedMode
278
296
  stream?: boolean
279
297
  attachments?: unknown
280
298
  }>()
@@ -310,7 +328,7 @@ one.post('/views/:viewId/submit', async c => {
310
328
  optimisticId: body.optimisticId,
311
329
  model: typeof body.model === 'string' ? body.model : undefined,
312
330
  effort: typeof body.effort === 'string' ? body.effort : undefined,
313
- fastMode: typeof body.fastMode === 'boolean' ? body.fastMode : undefined,
331
+ speedMode: isSpeedMode(body.speedMode) ? body.speedMode : undefined,
314
332
  stream: body.stream === true ? true : undefined
315
333
  })
316
334
  return c.json(result)
@@ -478,64 +496,94 @@ one.get('/uploads/:uploadId', c => {
478
496
  })
479
497
  })
480
498
 
499
+ // Per-user chat state: pin, the chat each tab shows, per-chat settings and
500
+ // fork history, and views being built. Every write below answers with the new
501
+ // state; other clients get it as `state:changed`.
502
+ one.get('/state', async c => c.json(await getWorkspaceState(c.get('ws'))))
503
+
504
+ // The agent's chats. Tab ownership and settings come from `/state`.
481
505
  one.get('/sessions', async c => {
482
506
  const ws = c.get('ws')
483
- return c.json(await withSessionRecords(ws.path, await harnessFor(ws).listSessions(ws)))
507
+ return c.json(await harnessFor(ws).listSessions(ws))
484
508
  })
485
509
 
486
- one.get('/selected-session', async c => {
487
- return c.json(await getWorkspaceSessionSelection(c.get('ws').path))
510
+ one.put('/sessions/:sessionId/pin', async c => {
511
+ const ws = c.get('ws')
512
+ const sessionId = c.req.param('sessionId')
513
+ const harness = harnessFor(ws)
514
+ const found = (await harness.listSessions(ws)).some(session => session.sessionId === sessionId)
515
+ const active = harness
516
+ .activeSessions()
517
+ .some(session => session.workspaceId === ws.id && session.sessionId === sessionId)
518
+ if (!found && !active) return c.text('Chat not found', 404)
519
+ await pinSession(ws, sessionId)
520
+ return c.json(await getWorkspaceState(ws))
488
521
  })
489
522
 
490
- one.put('/pinned-session', async c => {
523
+ one.delete('/sessions/:sessionId/pin', async c => {
491
524
  const ws = c.get('ws')
492
- const body = await c.req.json<{ sessionId: string | null }>()
493
- if (body.sessionId !== null && typeof body.sessionId !== 'string')
494
- return c.text('Invalid chat', 400)
495
- if (body.sessionId) {
496
- const harness = harnessFor(ws)
497
- const found = (await harness.listSessions(ws)).some(
498
- session => session.sessionId === body.sessionId
499
- )
500
- const active = harness
501
- .activeSessions()
502
- .some(session => session.workspaceId === ws.id && session.sessionId === body.sessionId)
503
- if (!found && !active) return c.text('Chat not found', 404)
504
- }
505
- await pinSession(ws.path, body.sessionId)
506
- publishEvent({
507
- type: 'selected-session:updated',
508
- workspaceId: ws.id,
509
- sessionId: (await getSelectedSession(ws.path)) ?? null
510
- })
511
- return c.json({ pinnedSessionId: body.sessionId })
525
+ await unpinSession(ws, c.req.param('sessionId'))
526
+ return c.json(await getWorkspaceState(ws))
512
527
  })
513
528
 
514
- one.put('/selected-session', async c => {
529
+ // Show the chat in a tab. `ifMatch` (a chat id, or null for none) applies the
530
+ // change only while the tab still shows that chat.
531
+ one.put('/sessions/:sessionId/selection', async c => {
515
532
  const ws = c.get('ws')
516
533
  const body: unknown = await c.req.json().catch(() => null)
517
534
  if (!body || typeof body !== 'object') return c.text('Bad request', 400)
535
+ const input = body as { tabId?: unknown; ifMatch?: unknown }
536
+ if (!isWorkspaceTabId(input.tabId)) return c.text('Invalid chat tab', 400)
537
+ const hasIfMatch = Object.prototype.hasOwnProperty.call(input, 'ifMatch')
538
+ if (hasIfMatch && input.ifMatch !== null && typeof input.ifMatch !== 'string')
539
+ return c.text('ifMatch must be a chat id or null', 400)
540
+ if (await getPinnedSession(ws)) return c.text('Unpin chat before switching', 409)
541
+ await saveSelectedSession(
542
+ ws,
543
+ c.req.param('sessionId'),
544
+ input.tabId,
545
+ hasIfMatch ? (input.ifMatch as string | null) : undefined
546
+ )
547
+ return c.json(await getWorkspaceState(ws))
548
+ })
518
549
 
519
- const input = body as { sessionId?: unknown; previousSessionId?: unknown; tabId?: unknown }
520
- const tabId = input.tabId ?? 'overview'
550
+ // Stop showing the chat in a tab, which then opens a new chat. A tab showing
551
+ // another chat is left alone.
552
+ one.delete('/sessions/:sessionId/selection', async c => {
553
+ const ws = c.get('ws')
554
+ const body: unknown = await c.req.json().catch(() => null)
555
+ const tabId = (body as { tabId?: unknown } | null)?.tabId
521
556
  if (!isWorkspaceTabId(tabId)) return c.text('Invalid chat tab', 400)
522
- if (await getPinnedSession(ws.path)) return c.text('Unpin chat before switching', 409)
523
- const validSessionId = input.sessionId === null || typeof input.sessionId === 'string'
524
- const hasPreviousSessionId = Object.prototype.hasOwnProperty.call(input, 'previousSessionId')
525
- const validPreviousSessionId =
526
- !hasPreviousSessionId ||
527
- input.previousSessionId === null ||
528
- typeof input.previousSessionId === 'string'
529
- if (!validSessionId || !validPreviousSessionId) return c.text('Bad request', 400)
530
-
531
- const update = await saveSelectedSession(
532
- ws.path,
533
- input.sessionId as string | null,
534
- hasPreviousSessionId ? (input.previousSessionId as string | null) : undefined,
535
- tabId
536
- )
537
- publishSelectedSession(ws.id, update)
538
- return c.json({ sessionId: update.sessionId })
557
+ await deselectSession(ws, c.req.param('sessionId'), tabId)
558
+ return c.json(await getWorkspaceState(ws))
559
+ })
560
+
561
+ // Change run settings. Omitted fields stay; null clears one.
562
+ one.patch('/sessions/:sessionId/config', async c => {
563
+ const body = await c.req.json().catch(() => null)
564
+ if (typeof body !== 'object' || body === null) {
565
+ return c.text('Expected a JSON object', 400)
566
+ }
567
+ const patch: SessionConfigPatch = {}
568
+ const record = body as Record<string, unknown>
569
+ for (const key of ['model', 'effort'] as const) {
570
+ if (!(key in record)) continue
571
+ const value = record[key]
572
+ if (value !== null && typeof value !== 'string') {
573
+ return c.text(`${key} must be a string or null`, 400)
574
+ }
575
+ patch[key] = value
576
+ }
577
+ if ('speedMode' in record) {
578
+ const value = record.speedMode
579
+ if (value !== null && !isSpeedMode(value)) {
580
+ return c.text('speedMode must be "normal", "fast", "ultrafast", or null', 400)
581
+ }
582
+ patch.speedMode = value
583
+ }
584
+ const ws = c.get('ws')
585
+ await saveSessionConfig(ws, c.req.param('sessionId'), patch)
586
+ return c.json(await getWorkspaceState(ws))
539
587
  })
540
588
 
541
589
  one.post('/sessions/:sessionId/archive', async c => {
@@ -546,7 +594,7 @@ one.post('/sessions/:sessionId/archive', async c => {
546
594
 
547
595
  try {
548
596
  await archiveWorkspaceSession(ws, sessionId)
549
- return c.body(null, 204)
597
+ return c.json(await getWorkspaceState(ws))
550
598
  } catch (error) {
551
599
  console.error(`[api] archive chat failed for ${harness.id}`, error)
552
600
  // Harnesses translate backend refusals into actionable one-liners (e.g.
@@ -563,42 +611,34 @@ one.get('/sessions/:sessionId/events', async c => {
563
611
  return c.json(await harnessFor(ws).sessionEvents(ws, sessionId))
564
612
  })
565
613
 
566
- one.get('/sessions/:sessionId', async c => {
567
- return c.json(await getSessionRecord(c.get('ws').path, c.req.param('sessionId')))
568
- })
569
-
570
- // Patch run settings and return the complete session record. null clears a setting.
571
- one.put('/sessions/:sessionId/config', async c => {
572
- const body = await c.req.json().catch(() => null)
573
- if (typeof body !== 'object' || body === null) {
574
- return c.text('Expected a JSON object', 400)
575
- }
576
- const patch: SessionConfigPatch = {}
577
- const record = body as Record<string, unknown>
578
- for (const key of ['model', 'effort'] as const) {
579
- if (!(key in record)) continue
580
- const value = record[key]
581
- if (value !== null && typeof value !== 'string') {
582
- return c.text(`${key} must be a string or null`, 400)
583
- }
584
- patch[key] = value
585
- }
586
- if ('fastMode' in record) {
587
- const value = record.fastMode
588
- if (value !== null && typeof value !== 'boolean') {
589
- return c.text('fastMode must be a boolean or null', 400)
590
- }
591
- patch.fastMode = value
592
- }
593
- const workspacePath = c.get('ws').path
594
- const sessionId = c.req.param('sessionId')
595
- await saveSessionConfig(workspacePath, sessionId, patch)
596
- return c.json(await getSessionRecord(workspacePath, sessionId))
597
- })
598
-
599
614
  one.get('/mcp', async c => {
600
615
  const ws = c.get('ws')
601
- return c.json((await harnessFor(ws).mcpStatus?.(ws)) ?? [])
616
+ const harness = harnessFor(ws)
617
+ if (c.req.query('stream') !== 'true') return c.json((await harness.mcpStatus?.(ws)) ?? [])
618
+ let cancelled = false
619
+ const encoder = new TextEncoder()
620
+ return new Response(
621
+ new ReadableStream({
622
+ async start(controller) {
623
+ const emit = (frame: unknown) => {
624
+ if (!cancelled) controller.enqueue(encoder.encode(JSON.stringify(frame) + '\n'))
625
+ }
626
+ try {
627
+ const connectors =
628
+ (await harness.mcpStatus?.(ws, connectors => emit({ connectors }))) ?? []
629
+ emit({ connectors, done: true })
630
+ } catch {
631
+ emit({ error: 'Could not load connectors' })
632
+ } finally {
633
+ if (!cancelled) controller.close()
634
+ }
635
+ },
636
+ cancel() {
637
+ cancelled = true
638
+ }
639
+ }),
640
+ { headers: { 'Content-Type': 'application/x-ndjson', 'Cache-Control': 'no-store' } }
641
+ )
602
642
  })
603
643
 
604
644
  // Harness debug tap for /dev/harness: the backend's native wire frames
@@ -660,10 +700,9 @@ one.post('/skills/update', async c => {
660
700
  return c.json(result.status)
661
701
  })
662
702
 
663
- // The workspace's agent backend in one snapshot: provider, availability
664
- // (runtime presence + auth), the model catalog, and capabilities.
665
- // Workspace readiness stays fresh via `harness:updated` events and refetches.
666
- one.get('/agent', async c => {
703
+ // Workspace configuration and models. Shared account status is served by
704
+ // /harnesses/status; only workspace overrides and gateways are probed here.
705
+ one.get('/harness', async c => {
667
706
  const ws = c.get('ws')
668
707
  const harness = harnessFor(ws)
669
708
  const capabilities = {
@@ -674,18 +713,35 @@ one.get('/agent', async c => {
674
713
  if (!existsSync(ws.path)) {
675
714
  return c.json({
676
715
  ...capabilities,
677
- workspaceFolderMissing: true,
716
+ isFolderMissing: true,
678
717
  availability: { status: 'unavailable', reason: 'Workspace folder not found' },
679
718
  models: []
680
- } satisfies WorkspaceAgent)
719
+ } satisfies WorkspaceHarness)
681
720
  }
721
+ const authEnv =
722
+ harness.id === 'codex'
723
+ ? /^(OPENAI_|CODEX_)/
724
+ : /^(ANTHROPIC_|CLAUDE_|AWS_|GOOGLE_|AZURE_|CLOUD_ML_)/
725
+ const hasAuthOverrides =
726
+ harness.authStatus &&
727
+ Object.entries(await resolveWorkspaceEnv(ws.path)).some(
728
+ ([key, value]) =>
729
+ value !== process.env[key] &&
730
+ (authEnv.test(key) || /^(HOME|USERPROFILE|XDG_CONFIG_HOME)$/.test(key))
731
+ )
682
732
  const refresh = c.req.query('refresh') === 'true'
683
733
  if (refresh) await loginShellPath({ refresh: true })
684
734
  // A backend that can't answer (codex CLI missing, gateway down) degrades to
685
735
  // an empty catalog — the picker hides and chat surfaces the real problem via
686
736
  // workspace setup, instead of this endpoint failing on page load.
687
737
  const [availability, models] = await Promise.all([
688
- refresh ? harnessStore.refresh(ws) : harnessStore.getAvailability(ws),
738
+ // Shared account status comes from /harnesses/status.
739
+ // Gateway-backed harnesses still have workspace-specific readiness.
740
+ harness.authStatus && !hasAuthOverrides
741
+ ? Promise.resolve({ status: 'available' as const })
742
+ : refresh
743
+ ? harnessStore.refresh(ws)
744
+ : harnessStore.getAvailability(ws),
689
745
  harness.listModels(ws).catch(err => {
690
746
  console.error(`[api] listModels failed for ${harness.id}`, err)
691
747
  return []
@@ -694,8 +750,9 @@ one.get('/agent', async c => {
694
750
  return c.json({
695
751
  ...capabilities,
696
752
  availability,
753
+ hasAuthOverrides: Boolean(hasAuthOverrides),
697
754
  models
698
- } satisfies WorkspaceAgent)
755
+ } satisfies WorkspaceHarness)
699
756
  })
700
757
 
701
758
  // Workspace identity. Uploads use the image route below.
@@ -881,11 +938,16 @@ one.put('/', async c => {
881
938
  const body = await c.req.json()
882
939
  if (!body || body.version !== 1) return c.text('Bad request', 400)
883
940
  // `origin` is the writing tab's id, echoed so that tab skips its own event.
884
- const { origin, ...layout } = body
941
+ const { origin, harness, ...layout } = body
885
942
  // Preserve server-owned identity (name/icon) across a grid/theme save so the
886
943
  // client's PUT can't erase a `moi config`-set name. See mergeLayoutForSave.
887
944
  const existing = await loadLayout(ws.path)
888
945
  const next = mergeLayoutForSave(existing, layout)
946
+ if (harness !== undefined && harness !== (ws.type ?? 'claude-code')) {
947
+ next.selectedModel = existing.selectedModel
948
+ next.selectedEffort = existing.selectedEffort
949
+ next.selectedSpeedMode = existing.selectedSpeedMode
950
+ }
889
951
  await saveLayout(next, ws.path)
890
952
  if (
891
953
  JSON.stringify(resolveWorkspaceTheme(existing.theme)) !==
@@ -1017,12 +1079,6 @@ async function workspaceTypeAvailability(type: WorkspaceType): Promise<HarnessAv
1017
1079
  return (await harnessFor(type).availability?.()) ?? { status: 'available' }
1018
1080
  }
1019
1081
 
1020
- // Both workspace dialogs only need installation facts to offer agent choices.
1021
- workspaces.get('/create', async c => {
1022
- c.header('Cache-Control', 'no-store')
1023
- return c.json({ installed: await detectInstalledHarnesses() })
1024
- })
1025
-
1026
1082
  // Create a brand-new workspace: a fresh folder under createdWorkspacesRoot(),
1027
1083
  // provisioned (skills + `.moi/` scaffold) and registered.
1028
1084
  workspaces.post('/create', async c => {
@@ -1038,18 +1094,23 @@ workspaces.post('/create', async c => {
1038
1094
  }
1039
1095
  const availability = await workspaceTypeAvailability(type)
1040
1096
  if (availability.status !== 'available') return c.text(availability.reason, 400)
1041
- const name = typeof body?.name === 'string' ? body.name.trim() : ''
1042
- const invalid = validateWorkspaceFolderName(name)
1097
+ const name =
1098
+ body?.name === undefined
1099
+ ? 'My workspace'
1100
+ : typeof body.name === 'string'
1101
+ ? body.name.trim()
1102
+ : ''
1103
+ const invalid = validateWorkspaceName(name)
1043
1104
  if (invalid) return c.text(invalid, 400)
1044
- const path = join(createdWorkspacesRoot(), name)
1045
- if (existsSync(path)) return c.text('A folder with that name already exists', 409)
1105
+ const path = await createWorkspaceDirectory(name, createdWorkspacesRoot())
1046
1106
  try {
1047
1107
  await provisionWorkspace(path, type)
1048
1108
  } catch (err) {
1049
1109
  const message = err instanceof Error ? err.message : String(err)
1050
1110
  return c.text(`Could not create workspace: ${message}`, 500)
1051
1111
  }
1052
- const entry = await registerWorkspace(path, { type })
1112
+ await setWorkspaceConfig(path, { name })
1113
+ const entry = await registerWorkspace(path, { id: basename(path), type, name })
1053
1114
  // Nudge every connected client (the sidebar list) to refetch.
1054
1115
  publishEvent({ type: 'workspaces-list:updated' })
1055
1116
  return c.json(entry, 201)
@@ -1065,6 +1126,7 @@ export const api = new Hono()
1065
1126
 
1066
1127
  api.route('/api/workspaces', workspaces)
1067
1128
  api.route('/api/harnesses', harnesses)
1129
+ api.route('/api/onboarding', onboarding)
1068
1130
 
1069
1131
  // Startup config (config.json in the data dir + MOI_* env), client-safe
1070
1132
  // subset. Immutable for the process lifetime — clients cache it forever.
@@ -0,0 +1,46 @@
1
+ import { Hono } from 'hono'
2
+ import { z } from 'zod'
3
+ import { getAppConfig } from '../app-config'
4
+ import { getAppSettings } from '../app-settings'
5
+ import { cancelIdeas, createFromIdea, discoverIdeas } from '../onboarding/jobs'
6
+
7
+ const discoverySchema = z.object({
8
+ harness: z.enum(['claude-code', 'codex']),
9
+ runId: z.string().uuid()
10
+ })
11
+ const buildSchema = discoverySchema.extend({
12
+ ideaId: z.string().uuid(),
13
+ operationId: z.string().uuid(),
14
+ retry: z.boolean().optional()
15
+ })
16
+ export const onboarding = new Hono()
17
+ onboarding.use('*', async (c, next) => {
18
+ if (getAppConfig().demo || !getAppSettings().showOnboarding)
19
+ return c.json({ error: 'Onboarding is not enabled' }, 403)
20
+ c.header('Cache-Control', 'no-store')
21
+ await next()
22
+ })
23
+ onboarding.post('/discover', async c => {
24
+ const parsed = discoverySchema.safeParse(await c.req.json().catch(() => undefined))
25
+ if (!parsed.success) return c.json({ error: 'Invalid discovery request' }, 400)
26
+ return c.json(await discoverIdeas(parsed.data))
27
+ })
28
+ onboarding.post('/cancel', async c => {
29
+ const parsed = z
30
+ .object({ runId: z.string().uuid() })
31
+ .safeParse(await c.req.json().catch(() => undefined))
32
+ if (!parsed.success) return c.json({ error: 'Invalid discovery request' }, 400)
33
+ await cancelIdeas(parsed.data.runId)
34
+ return c.json({ status: 'done' })
35
+ })
36
+ onboarding.post('/create', async c => {
37
+ const parsed = buildSchema.safeParse(await c.req.json().catch(() => undefined))
38
+ if (!parsed.success) return c.json({ error: 'Invalid workspace request' }, 400)
39
+ const { harness, runId, ideaId, operationId, retry } = parsed.data
40
+ // Use the validated server result, never a browser-supplied workspace plan.
41
+ const discovery = await discoverIdeas({ harness, runId })
42
+ const idea = discovery.ideas?.find(idea => idea.id === ideaId)
43
+ if (discovery.status !== 'done' || !idea)
44
+ return c.json({ error: 'Choose an available idea' }, 409)
45
+ return c.json(await createFromIdea({ harness, operationId, idea }, retry))
46
+ })
@@ -2,8 +2,7 @@ import { readFileSync } from 'node:fs'
2
2
  import { homedir } from 'node:os'
3
3
  import { isAbsolute, join } from 'path'
4
4
 
5
- import type { AppEnvironment, ClientAppConfig, ExperimentalFeatures } from '@/lib/types'
6
- import { EXPERIMENTAL_DEFAULTS } from '@/lib/experimental'
5
+ import type { AppEnvironment, ClientAppConfig } from '@/lib/types'
7
6
 
8
7
  import { DATA_DIR } from './data-dir'
9
8
 
@@ -13,17 +12,16 @@ import { DATA_DIR } from './data-dir'
13
12
  // runtime): config.json describes the deployment itself — nothing here changes
14
13
  // without a server restart, and no API writes it.
15
14
  //
16
- // Resolution: defaults < config.json < env. Experimental features are enabled
17
- // only by explicit CLI flags.
15
+ // Resolution: defaults < config.json < env.
18
16
  // A missing file is the normal local case; a malformed file or wrong-typed key
19
17
  // warns on stderr and falls back per-key, so a broken config never takes the
20
18
  // CLI or server down with it.
21
19
  export type AppConfig = {
22
20
  environment: AppEnvironment
21
+ collab: boolean
23
22
  // Demo mode: workspace creation is blocked (UI shows the
24
23
  // cloud-demo promo dialog instead) and `moi` system commands are disabled.
25
24
  demo: boolean
26
- experimental: ExperimentalFeatures
27
25
  // Link target for the cloud-demo promo dialog.
28
26
  demoInstallUrl: string
29
27
  // Cloudflare Access (Zero Trust) in front of this deployment: each viewer
@@ -48,12 +46,11 @@ export type CloudflareAccessConfig = {
48
46
  audience: readonly string[]
49
47
  }
50
48
 
51
- type DeploymentConfig = Omit<AppConfig, 'experimental'>
52
-
53
49
  const DEFAULTS: AppConfig = {
54
50
  environment: 'local',
51
+ // Temporarily disabled while collaboration is being reconsidered.
52
+ collab: false,
55
53
  demo: false,
56
- experimental: { ...EXPERIMENTAL_DEFAULTS },
57
54
  demoInstallUrl: 'https://moi.computer',
58
55
  cloudflareAccess: null,
59
56
  workspacesDir: null,
@@ -197,8 +194,8 @@ function readConfigFile(file: string): Record<string, unknown> {
197
194
  return parsed as Record<string, unknown>
198
195
  }
199
196
 
200
- function fileValues(raw: Record<string, unknown>): Partial<DeploymentConfig> {
201
- const out: Partial<DeploymentConfig> = {}
197
+ function fileValues(raw: Record<string, unknown>): Partial<AppConfig> {
198
+ const out: Partial<AppConfig> = {}
202
199
  const environment = parseEnvironment(raw.environment)
203
200
  if (environment !== undefined) out.environment = environment
204
201
  if (raw.demo !== undefined) {
@@ -221,33 +218,28 @@ function fileValues(raw: Record<string, unknown>): Partial<DeploymentConfig> {
221
218
  // Pure resolver, exported for tests. `getAppConfig` is the cached entrypoint.
222
219
  export function loadAppConfig(
223
220
  file: string = APP_CONFIG_FILE,
224
- env: Record<string, string | undefined> = process.env,
225
- cliExperimental: Partial<ExperimentalFeatures> = {}
221
+ env: Record<string, string | undefined> = process.env
226
222
  ): AppConfig {
227
223
  const raw = readConfigFile(file)
228
224
  const fromFile = fileValues(raw)
229
- const fromEnv: Partial<DeploymentConfig> = {
225
+ const fromEnv: Partial<AppConfig> = {
230
226
  environment: parseEnvironment(env.MOI_ENVIRONMENT),
231
227
  demo: parseBool(env.MOI_DEMO),
232
228
  demoInstallUrl: parseString(env.MOI_DEMO_INSTALL_URL)
233
229
  }
234
230
  const merged = { ...DEFAULTS, ...fromFile }
235
- for (const key of Object.keys(fromEnv) as (keyof DeploymentConfig)[]) {
231
+ for (const key of Object.keys(fromEnv) as (keyof AppConfig)[]) {
236
232
  if (fromEnv[key] === undefined) delete fromEnv[key]
237
233
  }
238
234
  const cloudflareAccess = resolveCloudflareAccess(raw.cloudflareAccess, env)
239
- const experimental = Object.freeze({
240
- ...DEFAULTS.experimental,
241
- ...cliExperimental
242
- })
243
- return Object.freeze({ ...merged, ...fromEnv, cloudflareAccess, experimental })
235
+ return Object.freeze({ ...merged, ...fromEnv, cloudflareAccess })
244
236
  }
245
237
 
246
238
  let _config: AppConfig | null = null
247
239
 
248
- // The CLI supplies explicit startup flags before importing the web server.
249
- export function initializeAppConfig(experimental: Partial<ExperimentalFeatures> = {}): void {
250
- _config = loadAppConfig(undefined, undefined, experimental)
240
+ // Resolve deployment settings before importing the web server.
241
+ export function initializeAppConfig(): void {
242
+ _config = loadAppConfig()
251
243
  }
252
244
 
253
245
  export function getAppConfig(): AppConfig {
@@ -270,6 +262,6 @@ export function resetAppConfig(): void {
270
262
  // The only shape that reaches the browser (GET /api/config). Server-only keys
271
263
  // added to AppConfig later stay out unless explicitly forwarded here.
272
264
  export function clientAppConfig(): ClientAppConfig {
273
- const { environment, demo, experimental, demoInstallUrl } = getAppConfig()
274
- return { environment, demo, experimental: { ...experimental }, demoInstallUrl }
265
+ const { environment, collab, demo, demoInstallUrl } = getAppConfig()
266
+ return { environment, collab, demo, demoInstallUrl }
275
267
  }