gestalt-mobile 0.35.5 → 0.36.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 (47) hide show
  1. package/README.md +60 -3
  2. package/dist/client/assets/index-9XMv2BvD.js +38 -0
  3. package/dist/client/assets/{index-CPQBJDsg.css → index-Bxv5Z2w4.css} +1 -1
  4. package/dist/client/index.html +2 -2
  5. package/dist/server/client/features/chat/activity-summary.js +71 -0
  6. package/dist/server/client/features/chat/chat-projection.js +722 -0
  7. package/dist/server/client/features/chat/message-store.js +30 -0
  8. package/dist/server/server/app.js +1 -1
  9. package/dist/server/server/cli.js +8 -0
  10. package/dist/server/server/composition.contracts.js +158 -6
  11. package/dist/server/server/composition.js +266 -56
  12. package/dist/server/server/features/autopilot/register-routes.js +2 -2
  13. package/dist/server/server/features/autopilot/toggle/endpoint.js +5 -1
  14. package/dist/server/server/features/catalog/get-bootstrap/use-case.js +5 -3
  15. package/dist/server/server/features/sessions/get-session/endpoint.js +1 -1
  16. package/dist/server/server/features/sessions/list-models/endpoint.js +16 -0
  17. package/dist/server/server/features/sessions/list-recent-threads/endpoint.js +8 -3
  18. package/dist/server/server/features/sessions/list-sessions/endpoint.js +1 -1
  19. package/dist/server/server/features/sessions/model/relay-session.js +2 -0
  20. package/dist/server/server/features/sessions/promote-recent-thread/endpoint.js +6 -2
  21. package/dist/server/server/features/sessions/promote-recent-thread/use-case.js +7 -2
  22. package/dist/server/server/features/sessions/register-routes.js +8 -3
  23. package/dist/server/server/features/sessions/respond-interaction/endpoint.js +1 -1
  24. package/dist/server/server/features/sessions/select-model/endpoint.js +1 -1
  25. package/dist/server/server/features/sessions/start-session/request.js +1 -0
  26. package/dist/server/server/features/sessions/start-session/use-case.js +21 -7
  27. package/dist/server/server/features/skills/list-available/endpoint.js +4 -2
  28. package/dist/server/server/platform/catalog/provider-model-catalog.js +15 -0
  29. package/dist/server/server/platform/kimi/kimi-activity-facts.js +88 -0
  30. package/dist/server/server/platform/kimi/kimi-errors.js +30 -0
  31. package/dist/server/server/platform/kimi/kimi-model-catalog.js +63 -0
  32. package/dist/server/server/platform/kimi/kimi-normalizer.js +196 -0
  33. package/dist/server/server/platform/kimi/kimi-recent-session-lister.js +68 -0
  34. package/dist/server/server/platform/kimi/kimi-server-request.js +143 -0
  35. package/dist/server/server/platform/kimi/kimi-session-runtime.js +653 -0
  36. package/dist/server/server/platform/kimi/kimi-share-dir.js +65 -0
  37. package/dist/server/server/platform/kimi/kimi-skill-catalog.js +79 -0
  38. package/dist/server/server/platform/kimi/kimi-skills-materializer.js +41 -0
  39. package/dist/server/server/platform/kimi/kimi-web-client.js +63 -0
  40. package/dist/server/server/platform/kimi/kimi-web-server-manager.js +215 -0
  41. package/dist/server/server/platform/kimi/kimi-ws-client.js +154 -0
  42. package/dist/server/server/platform/persistence/migrate.js +2 -0
  43. package/dist/server/server/platform/persistence/sqlite-session-repository.js +3 -2
  44. package/dist/server/server/platform/skills/cached-skill-catalog.js +0 -0
  45. package/dist/server/shared/contracts/llm-provider.js +6 -0
  46. package/package.json +4 -3
  47. package/dist/client/assets/index-SZM7lpix.js +0 -38
package/README.md CHANGED
@@ -9,6 +9,8 @@ development with durable Codex sessions.
9
9
  - The `codex` CLI installed, available on `PATH`, and authenticated. Gestalt's
10
10
  launcher establishes the environment and Mobile starts `codex app-server --stdio`
11
11
  directly within it.
12
+ - Optionally, the `kimi` CLI installed and available on `PATH` to offer Kimi
13
+ as a second chat provider (see "Kimi provider" below).
12
14
 
13
15
  ## Install and run
14
16
 
@@ -30,6 +32,22 @@ The command prints the loopback URL when it is ready. Open that URL in a
30
32
  browser. Press Ctrl-C, or send SIGINT or SIGTERM, to stop the HTTP server,
31
33
  active Codex subprocesses, and database cleanly.
32
34
 
35
+ ### Run this checkout
36
+
37
+ `npm run start` builds and runs the current checkout with the same managed
38
+ `CODEX_HOME` and `GESTALT_HOME` defaults as `gestalt mobile`. Explicit overrides
39
+ remain authoritative. The wrapper also prepends the usual user command paths so
40
+ locally installed `codex` and `kimi` executables remain discoverable. It defaults
41
+ to port 3001 and isolated state under `.gestalt/start-state`, allowing the managed
42
+ instance to remain on port 3000; pass explicit `--port` or `--data-dir` options to
43
+ override either default.
44
+
45
+ For live development, run `npm run dev` and open `http://localhost:5173`.
46
+ Vite proxies API and WebSocket traffic to the source server on port 3001, so a
47
+ managed Gestalt Mobile instance can continue using port 3000. Development uses
48
+ repository-local relay state under `.gestalt/dev-state` and disables passkey
49
+ access control; it remains loopback-only and does not reuse production state.
50
+
33
51
  ## Skill profiles
34
52
 
35
53
  Global profiles live in `~/.gestalt/skill-profiles/<name>.yml` and use version 1 YAML:
@@ -58,6 +76,38 @@ added after a profile was saved. The editor labels them **Always advertised**
58
76
  and does not offer a disable control. Refresh discovery and start a new session
59
77
  after upgrading Gestalt Agents; running sessions retain their startup catalog.
60
78
 
79
+ ## Kimi provider
80
+
81
+ When the `kimi` CLI is found on `PATH`, the Session tab shows a **Provider**
82
+ picker next to the model selector, and the bootstrap catalog advertises Kimi's
83
+ available models next to the Codex ones. Picking **Kimi** adapts the form:
84
+ Codex-only controls (sandbox modes and approval policy) are hidden, since kimi
85
+ web governs permissions itself.
86
+
87
+ A Kimi session runs inside a dedicated `kimi web` process that Gestalt Mobile
88
+ spawns and owns (`kimi web --no-open` on a private loopback port). The session
89
+ workspace is matched against kimi web's workspace registry; chat turns,
90
+ steering while a turn is busy, interrupts, approvals, and questions all flow
91
+ through kimi web's REST and WebSocket API. Chat parity is exact: once a
92
+ session starts, `/model` in the composer offers only that session's own
93
+ provider models — a Codex chat switches between Codex models only, and a Kimi
94
+ chat between Kimi models only. The model cannot be switched across providers
95
+ inside a chat.
96
+
97
+ Skill profiles apply to Kimi sessions too. Because `kimi web` has no
98
+ `--skills-dir` flag, Gestalt Mobile materializes each skill profile as an
99
+ isolated kimi web state directory (a separate `kimi web` process per active
100
+ profile, keyed by the profile's skill selection) under
101
+ `~/.codex-gestalt/gestalt-mobile/kimi/`, so profiles with different skills
102
+ enabled never share a runtime. Authentication is shared by symlinking it from
103
+ `~/.kimi-code`; Gestalt never copies or rewrites kimi credentials.
104
+
105
+ Kimi sessions stay on core chat: org-plan/autopilot tooling (the Plan tab,
106
+ autopilot controls) remains Codex-only and is hidden for Kimi sessions.
107
+
108
+ Kimi threads have no CLI resume command, so recent Kimi threads offer **Open**
109
+ but no **Copy**, and the session card carries a **Kimi** badge instead.
110
+
61
111
  ## Themes
62
112
 
63
113
  Themes are registered once in `src/client/features/theme/theme-registry.ts`. Add a
@@ -159,6 +209,11 @@ keep it accessible only to the local relay user. Back up `auth.sqlite`
159
209
  with `auth.sqlite-wal` and `auth.sqlite-shm` only after **all** instances are
160
210
  stopped, or use SQLite backup tooling.
161
211
 
212
+ Kimi provider state lives apart from both: gestalt-owned `kimi web` servers
213
+ keep their isolated per-profile state under
214
+ `~/.codex-gestalt/gestalt-mobile/kimi/`, with authentication symlinked from
215
+ `~/.kimi-code`. Relay SQLite state never holds kimi credentials or chat state.
216
+
162
217
  Recovery after losing every passkey is deliberately local and manual: stop every
163
218
  instance, make a backup, remove only `auth.sqlite` and its `-wal`/`-shm`
164
219
  sidecars, restart into visibly open bootstrap mode, and immediately enroll a new
@@ -183,11 +238,13 @@ visible items; Enter or Space selects the focused directory. The selected path
183
238
  remains highlighted when branches are folded or the catalog is refreshed.
184
239
 
185
240
  At startup, Gestalt Mobile asks the installed Codex app-server for its available
186
- models. New sessions use `gpt-5.6-terra` by default; choose another discovered
187
- model from the Session tab before creating the session. The default is defined
241
+ models, and each running kimi web server for the Kimi catalog. New sessions use
242
+ `gpt-5.6-terra` by default for Codex; choose another discovered model from the
243
+ Session tab before creating the session. The default is defined
188
244
  centrally as `DEFAULT_SESSION_MODEL` in `src/server/features/sessions/application/start-settings.ts`
189
245
  so it can be changed in a future configuration surface. The selected model is
190
- stored with the relay session and shown in managed session entries.
246
+ stored with the relay session and shown in managed session entries; in chat,
247
+ `/model` lists only models of the session's own provider.
191
248
 
192
249
  Use **Open** to relaunch a released, stopped, or attention-required
193
250
  relay session from the browser.