somora 2026.930.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.
- package/LICENSE +21 -0
- package/README.md +364 -0
- package/bin/node-version.d.mts +3 -0
- package/bin/node-version.mjs +45 -0
- package/bin/somora.mjs +77 -0
- package/config.example.yaml +896 -0
- package/docs/agents.md +677 -0
- package/docs/api.md +3194 -0
- package/docs/browser.md +317 -0
- package/docs/builder.md +331 -0
- package/docs/cache-strategy.md +373 -0
- package/docs/compaction.md +253 -0
- package/docs/display.md +154 -0
- package/docs/dream-phases.md +891 -0
- package/docs/files.md +387 -0
- package/docs/imagegen.md +366 -0
- package/docs/images/somora-hero.png +0 -0
- package/docs/images/somora-mobile-2026-05-23.png +0 -0
- package/docs/images/somora-tui-2026-05-23.png +0 -0
- package/docs/images/somora-web-2026-05-23.png +0 -0
- package/docs/index.md +178 -0
- package/docs/lsp.md +93 -0
- package/docs/mcp.md +332 -0
- package/docs/memory.md +407 -0
- package/docs/mobile.md +310 -0
- package/docs/models.md +379 -0
- package/docs/projects.md +425 -0
- package/docs/realtime-voice.md +293 -0
- package/docs/resources.md +230 -0
- package/docs/sampling.md +128 -0
- package/docs/security.md +189 -0
- package/docs/sentinel.md +295 -0
- package/docs/setup.md +1217 -0
- package/docs/skills.md +501 -0
- package/docs/team.md +189 -0
- package/docs/thinking.md +463 -0
- package/docs/tmux.md +399 -0
- package/docs/tools.md +117 -0
- package/docs/videogen.md +191 -0
- package/docs/voice.md +288 -0
- package/docs/web.md +893 -0
- package/docs/wiki.md +583 -0
- package/npm-shrinkwrap.json +5670 -0
- package/package.json +116 -0
- package/src/attachments/store.ts +196 -0
- package/src/browser/change-stream.ts +31 -0
- package/src/browser/display.ts +108 -0
- package/src/browser/policy.ts +121 -0
- package/src/browser/screencast.ts +374 -0
- package/src/browser/service.ts +1337 -0
- package/src/browser/session.ts +15 -0
- package/src/browser/snapshot.ts +40 -0
- package/src/cli/auth.ts +117 -0
- package/src/cli/codex.ts +41 -0
- package/src/cli/lsp.ts +71 -0
- package/src/cli/resolvers/clawhub.ts +400 -0
- package/src/cli/setup.ts +835 -0
- package/src/cli/skill.ts +619 -0
- package/src/cli/somora.ts +548 -0
- package/src/cli/systemd-unit.ts +72 -0
- package/src/cli/team.ts +148 -0
- package/src/cli/tui/activity-stream.ts +121 -0
- package/src/cli/tui/api.ts +479 -0
- package/src/cli/tui/app.tsx +1169 -0
- package/src/cli/tui/autocomplete.tsx +55 -0
- package/src/cli/tui/commands.ts +913 -0
- package/src/cli/tui/dream-glyphs.ts +22 -0
- package/src/cli/tui/footer.tsx +15 -0
- package/src/cli/tui/format.ts +28 -0
- package/src/cli/tui/header.tsx +279 -0
- package/src/cli/tui/index.tsx +120 -0
- package/src/cli/tui/markdown.tsx +63 -0
- package/src/cli/tui/sampling.ts +162 -0
- package/src/cli/tui/separator.tsx +13 -0
- package/src/cli/tui/state.ts +42 -0
- package/src/cli/tui/stream.ts +330 -0
- package/src/cli/tui/thinking-text.ts +54 -0
- package/src/cli/tui/turn-views.tsx +499 -0
- package/src/cli/tui/types.ts +410 -0
- package/src/cli/tui/work-queue.ts +161 -0
- package/src/cli/update-args.ts +55 -0
- package/src/cli/wiki.ts +406 -0
- package/src/compaction/index.ts +28 -0
- package/src/compaction/midturn.ts +210 -0
- package/src/compaction/policy.ts +154 -0
- package/src/compaction/summarize.ts +691 -0
- package/src/compaction/template.ts +90 -0
- package/src/compaction/types.ts +148 -0
- package/src/config/loader.ts +276 -0
- package/src/config/reload.ts +43 -0
- package/src/config/types.ts +2292 -0
- package/src/dream/deep-actions.ts +324 -0
- package/src/dream/deep-dispatcher.ts +237 -0
- package/src/dream/deep-llm.ts +388 -0
- package/src/dream/deep-prompts.ts +106 -0
- package/src/dream/deep-runner.ts +757 -0
- package/src/dream/deep-skip-cache.ts +199 -0
- package/src/dream/deep-worker.ts +229 -0
- package/src/dream/json-salvage.ts +34 -0
- package/src/dream/judge.ts +188 -0
- package/src/dream/loop-state.ts +286 -0
- package/src/dream/lucid-actions.ts +303 -0
- package/src/dream/lucid-batches.ts +94 -0
- package/src/dream/lucid-prompt.ts +82 -0
- package/src/dream/lucid-runner.ts +744 -0
- package/src/dream/lucid-storage.ts +277 -0
- package/src/dream/lucid-structure.ts +102 -0
- package/src/dream/lucid-types.ts +137 -0
- package/src/dream/lucid-worker.ts +224 -0
- package/src/dream/rem-dedup.ts +502 -0
- package/src/dream/rem-extract.ts +782 -0
- package/src/dream/rem-reset-run.ts +67 -0
- package/src/dream/rem-runner.ts +696 -0
- package/src/dream/rem-worker.ts +527 -0
- package/src/dream/review-window.ts +71 -0
- package/src/dream/scheduler-state.ts +129 -0
- package/src/dream/storage.ts +497 -0
- package/src/dream/types.ts +133 -0
- package/src/dream/wiki-context.ts +133 -0
- package/src/engine/a2a.ts +33 -0
- package/src/engine/availability.ts +63 -0
- package/src/engine/claude-cli.ts +969 -0
- package/src/engine/codex-app-server-client.ts +294 -0
- package/src/engine/codex-bin.ts +49 -0
- package/src/engine/codex-cli.ts +1014 -0
- package/src/engine/codex-dynamic-tools.ts +239 -0
- package/src/engine/codex-home.ts +63 -0
- package/src/engine/codex-thread-config.ts +74 -0
- package/src/engine/context-budget.ts +257 -0
- package/src/engine/engine-meta-labels.ts +211 -0
- package/src/engine/grok-cli.ts +941 -0
- package/src/engine/inline-think.ts +59 -0
- package/src/engine/model-availability.ts +105 -0
- package/src/engine/openai-compatible.ts +2464 -0
- package/src/engine/reasoning-retry.ts +83 -0
- package/src/engine/registry.ts +13 -0
- package/src/engine/replay.ts +195 -0
- package/src/engine/sampling.ts +90 -0
- package/src/engine/thinking-params.ts +264 -0
- package/src/engine/types.ts +269 -0
- package/src/engine/user-tag.ts +24 -0
- package/src/imagegen/aspect.ts +128 -0
- package/src/imagegen/generate.ts +642 -0
- package/src/imagegen/references.ts +75 -0
- package/src/imagegen/types.ts +154 -0
- package/src/lsp/client.ts +183 -0
- package/src/lsp/fake-server.helper.mjs +42 -0
- package/src/lsp/format.ts +29 -0
- package/src/lsp/index.ts +21 -0
- package/src/lsp/manager.ts +238 -0
- package/src/lsp/registry.ts +151 -0
- package/src/mcp/config.ts +117 -0
- package/src/mcp/hub/audit.ts +55 -0
- package/src/mcp/hub/bridge.ts +115 -0
- package/src/mcp/hub/catalog.ts +69 -0
- package/src/mcp/hub/credentials.ts +406 -0
- package/src/mcp/hub/env-expand.ts +14 -0
- package/src/mcp/hub/manager.ts +770 -0
- package/src/mcp/hub/normalize.ts +213 -0
- package/src/mcp/server.ts +368 -0
- package/src/mcp/tool-schema.ts +20 -0
- package/src/media/capabilities.ts +392 -0
- package/src/media/records.ts +175 -0
- package/src/media/store.ts +217 -0
- package/src/media/types.ts +69 -0
- package/src/memory/chunking.ts +168 -0
- package/src/memory/embeddings.ts +262 -0
- package/src/memory/index.ts +15 -0
- package/src/memory/inject.ts +197 -0
- package/src/memory/manager.ts +996 -0
- package/src/memory/registry.ts +176 -0
- package/src/memory/rescan.ts +101 -0
- package/src/memory/retrieval.ts +586 -0
- package/src/memory/shared-index.ts +372 -0
- package/src/memory/slug.ts +39 -0
- package/src/memory/storage.ts +385 -0
- package/src/memory/watcher.ts +134 -0
- package/src/multimodal/blocks.ts +101 -0
- package/src/multimodal/dimensions.ts +214 -0
- package/src/multimodal/load.ts +86 -0
- package/src/multimodal/mime.ts +135 -0
- package/src/multimodal/pdf-render.ts +80 -0
- package/src/multimodal/user-content.ts +266 -0
- package/src/persona/files.ts +144 -0
- package/src/persona/loader.ts +598 -0
- package/src/persona/skill-gating-store.ts +59 -0
- package/src/persona/tool-gating-store.ts +113 -0
- package/src/projects/focus.ts +186 -0
- package/src/projects/prompt-block.ts +106 -0
- package/src/projects/scheme.ts +107 -0
- package/src/projects/store.ts +144 -0
- package/src/projects/types.ts +73 -0
- package/src/sentinel/dispatcher.ts +97 -0
- package/src/sentinel/schedule.ts +271 -0
- package/src/sentinel/scheduler.ts +840 -0
- package/src/sentinel/store.ts +259 -0
- package/src/sentinel/types.ts +221 -0
- package/src/server/activity-stream.ts +160 -0
- package/src/server/ask-calls.ts +137 -0
- package/src/server/ask-wait-graph.ts +171 -0
- package/src/server/async-tasks.ts +199 -0
- package/src/server/builder-busy.ts +86 -0
- package/src/server/builder-prompt.ts +204 -0
- package/src/server/builder-questions.ts +117 -0
- package/src/server/builder-session.ts +249 -0
- package/src/server/chat-aborts.ts +83 -0
- package/src/server/claude-config-dir.ts +71 -0
- package/src/server/claude-credential-sync.ts +454 -0
- package/src/server/env-file.ts +100 -0
- package/src/server/env.ts +115 -0
- package/src/server/heal-session.ts +151 -0
- package/src/server/history-page.ts +46 -0
- package/src/server/index.ts +7244 -0
- package/src/server/lockfile.ts +89 -0
- package/src/server/logger.ts +67 -0
- package/src/server/logs.ts +187 -0
- package/src/server/loopback-fetch.ts +130 -0
- package/src/server/openai-client.ts +89 -0
- package/src/server/prompt-assembly.ts +334 -0
- package/src/server/restart-reconcile.ts +139 -0
- package/src/server/run-turn-fallback.ts +275 -0
- package/src/server/run-turn-types.ts +91 -0
- package/src/server/run-turn.ts +1474 -0
- package/src/server/sanitize-assistant-text.ts +112 -0
- package/src/server/session-export.ts +220 -0
- package/src/server/session-queue.ts +376 -0
- package/src/server/session-workdir.ts +49 -0
- package/src/server/sse-h2-safe.ts +61 -0
- package/src/server/sse-liveness.ts +162 -0
- package/src/server/sse-serializer.ts +161 -0
- package/src/server/start-turn.ts +249 -0
- package/src/server/steer-inbox.ts +107 -0
- package/src/server/tls-keeper.ts +153 -0
- package/src/server/tool-format.ts +167 -0
- package/src/server/turn-framing.ts +52 -0
- package/src/server/turn-origin-kind.ts +74 -0
- package/src/server/turn-origin.ts +40 -0
- package/src/server/work-ledger.ts +975 -0
- package/src/server/workspace.ts +114 -0
- package/src/setup/config-edit.ts +201 -0
- package/src/setup/presets.ts +71 -0
- package/src/setup/prompt.ts +163 -0
- package/src/setup/tailscale.ts +44 -0
- package/src/skills/bin-checks.ts +227 -0
- package/src/skills/bootstrap.ts +347 -0
- package/src/skills/env-scope.ts +175 -0
- package/src/skills/gating.ts +71 -0
- package/src/skills/lint.ts +202 -0
- package/src/skills/load.ts +368 -0
- package/src/skills/path-helpers.ts +102 -0
- package/src/skills/registry.ts +178 -0
- package/src/ssh/exec.ts +142 -0
- package/src/ssh/index.ts +12 -0
- package/src/ssh/known-hosts.ts +109 -0
- package/src/ssh/pool.ts +307 -0
- package/src/storage/sessions.ts +602 -0
- package/src/team/render.ts +149 -0
- package/src/team/resolve.ts +122 -0
- package/src/team/store.ts +124 -0
- package/src/team/types.ts +111 -0
- package/src/team/write.ts +95 -0
- package/src/testing/isolated-home.mts +46 -0
- package/src/tmux/attention-watcher.ts +272 -0
- package/src/tmux/attention.ts +336 -0
- package/src/tmux/list.ts +91 -0
- package/src/tmux/origin-store.ts +102 -0
- package/src/tmux/tui-markers.ts +267 -0
- package/src/tools/agents/ask-cancel.ts +94 -0
- package/src/tools/agents/ask-result.ts +235 -0
- package/src/tools/agents/ask.ts +704 -0
- package/src/tools/agents/builder-dispatch.ts +217 -0
- package/src/tools/agents/images.ts +104 -0
- package/src/tools/agents/index.ts +42 -0
- package/src/tools/agents/long-task-timeouts.ts +39 -0
- package/src/tools/agents/session-list.ts +136 -0
- package/src/tools/agents/session-model.ts +106 -0
- package/src/tools/agents/spawn.ts +845 -0
- package/src/tools/agents/status.ts +589 -0
- package/src/tools/browser/index.ts +6 -0
- package/src/tools/browser/ops.ts +145 -0
- package/src/tools/browser/tools.ts +184 -0
- package/src/tools/builder/short-descriptions.ts +80 -0
- package/src/tools/builder/tools.ts +222 -0
- package/src/tools/docs/index.ts +1 -0
- package/src/tools/docs/tools.ts +228 -0
- package/src/tools/dream/index.ts +11 -0
- package/src/tools/dream/tools.ts +1002 -0
- package/src/tools/exec/allowlist.ts +233 -0
- package/src/tools/exec/background-detach.helper.mts +27 -0
- package/src/tools/exec/blacklist.ts +336 -0
- package/src/tools/exec/concurrency.ts +150 -0
- package/src/tools/exec/fit-output.ts +82 -0
- package/src/tools/exec/index.ts +7 -0
- package/src/tools/exec/internal-env.ts +89 -0
- package/src/tools/exec/job-store.ts +403 -0
- package/src/tools/exec/local.ts +649 -0
- package/src/tools/exec/remote.ts +399 -0
- package/src/tools/exec/tools.ts +934 -0
- package/src/tools/file/analyze.ts +378 -0
- package/src/tools/file/index.ts +2 -0
- package/src/tools/file/local.ts +707 -0
- package/src/tools/file/lsp-hook.ts +72 -0
- package/src/tools/file/persona-guard.ts +61 -0
- package/src/tools/file/policy.ts +292 -0
- package/src/tools/file/read-format.ts +129 -0
- package/src/tools/file/remote.ts +680 -0
- package/src/tools/file/replace.ts +507 -0
- package/src/tools/file/search-window.ts +224 -0
- package/src/tools/file/tools.ts +658 -0
- package/src/tools/file/write-scope.ts +182 -0
- package/src/tools/gating.ts +106 -0
- package/src/tools/image/budget.ts +82 -0
- package/src/tools/image/index.ts +7 -0
- package/src/tools/image/tools.ts +601 -0
- package/src/tools/index.ts +99 -0
- package/src/tools/memory/index.ts +12 -0
- package/src/tools/memory/tools.ts +399 -0
- package/src/tools/projects/index.ts +1 -0
- package/src/tools/projects/tools.ts +643 -0
- package/src/tools/registry.ts +427 -0
- package/src/tools/resources/index.ts +8 -0
- package/src/tools/resources/tools.ts +176 -0
- package/src/tools/resources/visibility.ts +60 -0
- package/src/tools/sentinel/index.ts +1 -0
- package/src/tools/sentinel/tools.ts +592 -0
- package/src/tools/skill/index.ts +4 -0
- package/src/tools/skill/tools.ts +285 -0
- package/src/tools/time/index.ts +5 -0
- package/src/tools/time/tools.ts +123 -0
- package/src/tools/tmux/index.ts +1 -0
- package/src/tools/tmux/local.ts +277 -0
- package/src/tools/tmux/remote.ts +168 -0
- package/src/tools/tmux/tools.ts +1064 -0
- package/src/tools/tool-output.ts +97 -0
- package/src/tools/types.ts +227 -0
- package/src/tools/video/index.ts +1 -0
- package/src/tools/video/tools.ts +425 -0
- package/src/tools/web/fetch.ts +337 -0
- package/src/tools/web/index.ts +4 -0
- package/src/tools/web/tools.ts +186 -0
- package/src/tools/wiki/index.ts +1 -0
- package/src/tools/wiki/tools.ts +445 -0
- package/src/tts/cache-gc.ts +128 -0
- package/src/tts/prepare-for-tts.ts +114 -0
- package/src/tts/service.ts +332 -0
- package/src/types/events.ts +695 -0
- package/src/types/turn-origin.ts +53 -0
- package/src/version.ts +21 -0
- package/src/videogen/dialects.ts +222 -0
- package/src/videogen/generate.ts +484 -0
- package/src/videogen/jobs.ts +178 -0
- package/src/videogen/runner.ts +125 -0
- package/src/videogen/wake.ts +119 -0
- package/src/voice/realtime/call.ts +948 -0
- package/src/voice/realtime/consult.ts +293 -0
- package/src/voice/realtime/fake-provider.ts +134 -0
- package/src/voice/realtime/manager.ts +384 -0
- package/src/voice/realtime/openai-provider.ts +471 -0
- package/src/voice/realtime/persona.ts +227 -0
- package/src/voice/realtime/session-match.ts +116 -0
- package/src/voice/realtime/types.ts +182 -0
- package/src/wiki/conflict.ts +113 -0
- package/src/wiki/explorer.ts +578 -0
- package/src/wiki/index-builder.ts +172 -0
- package/src/wiki/language.ts +134 -0
- package/src/wiki/log-builder.ts +150 -0
- package/src/wiki/map.ts +258 -0
- package/src/wiki/migration/analyze.ts +304 -0
- package/src/wiki/migration/execute.ts +689 -0
- package/src/wiki/migration/refine.ts +402 -0
- package/src/wiki/migration/store.ts +100 -0
- package/src/wiki/move-page.ts +57 -0
- package/src/wiki/structure-file.ts +192 -0
- package/src/wiki/taxonomy.ts +140 -0
- package/src/wiki/templates.ts +163 -0
- package/src/wiki/types.ts +133 -0
- package/templates/skills/README.md +24 -0
- package/templates/skills/_templates/api-wrapper/SKILL.md +26 -0
- package/templates/skills/_templates/cli-wrapper/BOOTSTRAP.md +32 -0
- package/templates/skills/_templates/cli-wrapper/SKILL.md +24 -0
- package/templates/skills/_templates/default/SKILL.md +25 -0
- package/templates/skills/builder-handover/SKILL.md +96 -0
- package/templates/skills/builder-handover/assets/ORDER.md +12 -0
- package/templates/skills/skill-author/SKILL.md +110 -0
- package/tsconfig.json +22 -0
- package/web/dist/assets/index-BaVv6pB2.js +631 -0
- package/web/dist/assets/index-BaVv6pB2.js.map +1 -0
- package/web/dist/assets/index-V3FV3Z25.css +32 -0
- package/web/dist/favicon.svg +8 -0
- package/web/dist/index.html +20 -0
- package/web/package.json +36 -0
- package/web/tsconfig.json +25 -0
- package/web-mobile/dist/apple-touch-icon.png +0 -0
- package/web-mobile/dist/assets/index-BqKt7IMx.css +1 -0
- package/web-mobile/dist/assets/index-X_vRr6cd.js +88 -0
- package/web-mobile/dist/assets/index-X_vRr6cd.js.map +1 -0
- package/web-mobile/dist/favicon.svg +8 -0
- package/web-mobile/dist/icon-192.png +0 -0
- package/web-mobile/dist/icon-512.png +0 -0
- package/web-mobile/dist/index.html +27 -0
- package/web-mobile/dist/manifest.webmanifest +32 -0
- package/web-mobile/dist/service-worker.js +90 -0
- package/web-mobile/package.json +28 -0
- package/web-mobile/tsconfig.json +25 -0
package/docs/mobile.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# somora mobile — PWA chat client
|
|
2
|
+
|
|
3
|
+
A second web app shipped with somora, mounted at `/mobile`. Designed
|
|
4
|
+
for chatting with your agents from a phone over Tailscale. Minimal-
|
|
5
|
+
scope by intent: no tmux terminals, no file viewer, no multi-window
|
|
6
|
+
layout — just chat, switch between agents, send + receive.
|
|
7
|
+
|
|
8
|
+
## Installing on your phone
|
|
9
|
+
|
|
10
|
+
Prerequisites:
|
|
11
|
+
|
|
12
|
+
1. Tailscale installed and connected on your phone.
|
|
13
|
+
2. somora running with TLS via Tailscale-cert (see [setup.md](setup.md)
|
|
14
|
+
→ "HTTPS via Tailscale"). Plain HTTP works for testing but PWAs need
|
|
15
|
+
a secure context to install.
|
|
16
|
+
|
|
17
|
+
Then:
|
|
18
|
+
|
|
19
|
+
1. On the phone, open the somora URL in Safari (iOS) or Chrome
|
|
20
|
+
(Android): `https://<your-host>.<your-tailnet>.ts.net:18737/mobile/`
|
|
21
|
+
2. **iOS:** tap the share icon (square + up arrow) → "Add to Home
|
|
22
|
+
Screen". Confirm.
|
|
23
|
+
3. **Android:** Chrome surfaces an "install" prompt automatically (or
|
|
24
|
+
tap menu → "Install app").
|
|
25
|
+
|
|
26
|
+
The icon (the somora koala) lands on your home screen. Tapping it
|
|
27
|
+
opens somora in standalone PWA mode — no browser chrome, full screen,
|
|
28
|
+
own app switcher entry.
|
|
29
|
+
|
|
30
|
+
## Using it
|
|
31
|
+
|
|
32
|
+
- **Avatar row at the top** lists every agent registered on the
|
|
33
|
+
server. Tap to switch the active agent. The last-selected agent is
|
|
34
|
+
remembered across reloads — opening the PWA again drops you straight
|
|
35
|
+
back into your last conversation.
|
|
36
|
+
- **Chat area** shows the running history of the active agent's `main`
|
|
37
|
+
session. Markdown rendering for code blocks, links, lists, etc.
|
|
38
|
+
Pinch-to-zoom is disabled; a wide code block scrolls horizontally.
|
|
39
|
+
- **Input bar** at the bottom: paperclip (attachments), mic (voice),
|
|
40
|
+
textarea, send. Enter sends, Shift+Enter inserts a newline. The
|
|
41
|
+
textarea stays editable while a turn is streaming — sending during
|
|
42
|
+
a running turn enqueues the message rather than blocking it (see
|
|
43
|
+
"Queueing & Stop" below).
|
|
44
|
+
- **Stop buttons** (two, same abort) while a turn is in flight: a red
|
|
45
|
+
square **in the composer next to Send**, plus a small one pinned to
|
|
46
|
+
the streaming bubble's bottom-right corner. Both always visible (no
|
|
47
|
+
hover state on touch). Send stays tappable the whole time — Stop is
|
|
48
|
+
additive, so queued sends keep working mid-turn. A failed or no-op
|
|
49
|
+
abort shows a short notice instead of silently doing nothing.
|
|
50
|
+
- **Voice input:** tap the mic — it goes red and pulses while
|
|
51
|
+
recording. Tap again to stop; the transcript lands in the textarea
|
|
52
|
+
ready for you to edit before sending. Never auto-sends. Requires
|
|
53
|
+
`stt.enabled: true` in the server config and a browser that
|
|
54
|
+
supports `getUserMedia` + `MediaRecorder` (every modern phone
|
|
55
|
+
browser does). The button is hidden when either prerequisite is
|
|
56
|
+
missing.
|
|
57
|
+
- **Keep the screen awake:** the top bar carries a `☀️`/`🌙` toggle.
|
|
58
|
+
With it on, the phone's display stays lit while the app is open —
|
|
59
|
+
no more falling asleep mid-conversation. The lock is re-taken every
|
|
60
|
+
time you come back to the app, because browsers drop it whenever the
|
|
61
|
+
page is hidden, and it is released when you leave. The setting is
|
|
62
|
+
sticky per browser and off by default.
|
|
63
|
+
|
|
64
|
+
**iOS needs 18.4 or newer.** Apple's Safari accepted the request
|
|
65
|
+
inside a home-screen web app long before it honoured it; the screen
|
|
66
|
+
slept anyway until the fix in Safari 18.4 (WebKit bug 254545). On an
|
|
67
|
+
older iPhone the toggle still switches, and its tooltip says the
|
|
68
|
+
system may ignore it — there is no other way to tell, since the
|
|
69
|
+
request itself succeeds. The button is hidden entirely in browsers
|
|
70
|
+
without the API.
|
|
71
|
+
- **Spoken replies** (when TTS is configured in `tts.*`): the top-bar
|
|
72
|
+
shows a `🔊`/`🔇` toggle. When on AND you submit a turn via the
|
|
73
|
+
mic, the assistant's text reply is also played as audio. Toggle is
|
|
74
|
+
sticky per agent. A Play-button appears on bubbles that have audio
|
|
75
|
+
so you can replay any time. Full details in
|
|
76
|
+
[voice.md](voice.md).
|
|
77
|
+
- **Attachments:** tap the paperclip to open the phone's native file
|
|
78
|
+
picker — iOS / Android both let you choose Camera, Photo Library, or
|
|
79
|
+
Files there. Pictures (`image/*`) and PDFs are accepted. Picked
|
|
80
|
+
files upload to the server immediately and appear as chips above
|
|
81
|
+
the textarea; tap the × on a chip to drop it before sending. You
|
|
82
|
+
can send with attachments only (no text).
|
|
83
|
+
- **Fallback marker:** a reply produced by the persona's `fallback:`
|
|
84
|
+
model (or one of a fallback chain) carries a small `⇄ fallback ·
|
|
85
|
+
<model>` pill under the bubble; its tooltip names the models that
|
|
86
|
+
failed and why. Same data the desktop chip uses, so a reload keeps it.
|
|
87
|
+
- **Typing indicator:** when you've sent and the agent is still
|
|
88
|
+
thinking / running tools, a three-dot pulse appears in an agent
|
|
89
|
+
bubble. It's replaced by the actual streaming response as soon as
|
|
90
|
+
the model starts emitting text.
|
|
91
|
+
- **Thinking line:** when the engine surfaces its reasoning (see
|
|
92
|
+
[thinking.md](thinking.md) for which engines do and how the server
|
|
93
|
+
captures it), the agent bubble gets a single `🧠 thinking` row at
|
|
94
|
+
the top with a chevron. While the model is still thinking and has
|
|
95
|
+
not written any reply text, the newest line of its reasoning peeks
|
|
96
|
+
underneath, muted and cut to one line — no big open block on a
|
|
97
|
+
phone. Once reply text arrives or the turn finishes, only the row
|
|
98
|
+
remains. Tap it to expand the full text (plain, scrollable, capped
|
|
99
|
+
at half the screen; a `(truncated by the server)` note appears
|
|
100
|
+
when the server cut it) and tap again to collapse — your tap wins
|
|
101
|
+
for that message. History reloads keep the reasoning on the reply
|
|
102
|
+
it belongs to. There is no client toggle: the line only exists when
|
|
103
|
+
the server sends the content, so `thinkingContent.capture: false`
|
|
104
|
+
in `config.yaml` hides it everywhere.
|
|
105
|
+
- **Connection-lost banner** appears when the SSE stream drops (e.g.
|
|
106
|
+
Tailscale wakes up, server briefly down). The browser auto-reconnects
|
|
107
|
+
the EventSource; the banner clears once the stream is back, and the
|
|
108
|
+
client then asks the server what it missed while it was away — the
|
|
109
|
+
answer that was streaming during the drop is restored instead of
|
|
110
|
+
being lost. The same reconciliation runs in the web client.
|
|
111
|
+
- **Background sleep recovery.** iOS Safari aggressively freezes TCP
|
|
112
|
+
sockets while the PWA is in the background — the stream looks alive
|
|
113
|
+
but no bytes flow, and no error fires. When you return to the app,
|
|
114
|
+
the client checks how long since the last server event (heartbeats
|
|
115
|
+
arrive every 20 s); if the gap is wider than 45 s it tears down the
|
|
116
|
+
EventSource and reopens it, re-hydrating from `/chat/history` so
|
|
117
|
+
anything broadcast while you were gone shows up without a reload.
|
|
118
|
+
|
|
119
|
+
## Activity feed (multi-agent dots + unread)
|
|
120
|
+
|
|
121
|
+
The avatar strip shows two passive markers per agent that come from a
|
|
122
|
+
single app-wide SSE on `/activity/stream`:
|
|
123
|
+
|
|
124
|
+
- **Streaming dot** — pulses on every agent whose any session is mid-
|
|
125
|
+
turn, not just the one you're chatting with. When a sentinel job
|
|
126
|
+
wakes agent B while you're chatting with agent A, B's avatar lights up so you
|
|
127
|
+
notice the background activity.
|
|
128
|
+
- **Unread dot** — a different-colour dot appears when an agent has
|
|
129
|
+
movement since you last looked. Counts: peer-to-peer A2A inbounds,
|
|
130
|
+
sentinel-triggered messages, and assistant final replies. Your own
|
|
131
|
+
typed messages don't trigger it (even from a different client).
|
|
132
|
+
|
|
133
|
+
Tap an avatar to open that session; the badge clears the moment the
|
|
134
|
+
session becomes active and the server broadcasts the cleared state so
|
|
135
|
+
the web tab and TUI also drop their badge. When you return to the PWA
|
|
136
|
+
from the background, the visibility change re-fires the "seen" ping
|
|
137
|
+
on the current agent. State persists across server restarts.
|
|
138
|
+
|
|
139
|
+
See [api.md](api.md#get-activitystream) for the underlying endpoint.
|
|
140
|
+
|
|
141
|
+
## Queueing & Stop
|
|
142
|
+
|
|
143
|
+
Submits during a running turn don't block. The optimistic user-bubble
|
|
144
|
+
appears immediately with a small hourglass next to its timestamp
|
|
145
|
+
(`⌛ queued`, or `⌛ queued · N ahead` when other turns sit in front)
|
|
146
|
+
and the marker clears as soon as the server starts that turn. The
|
|
147
|
+
queue serialises on the server side — turns execute in order, no
|
|
148
|
+
preemption. See [api.md](api.md#queuing) for the lock semantics.
|
|
149
|
+
|
|
150
|
+
While a bubble still shows the marker, **↩ edit** next to it takes the
|
|
151
|
+
message back into the composer (`DELETE /chat/queue/:id`) so you
|
|
152
|
+
can change it and send again; it then joins the end of the queue. If
|
|
153
|
+
the turn started meanwhile, the marker just clears and a notice says
|
|
154
|
+
so.
|
|
155
|
+
|
|
156
|
+
The header badge (`waiting 3 · running · 1 arriving`, `2 sub-agents`,
|
|
157
|
+
`1 ask`) counts every turn on the session, whoever started it. Tap it for the same four
|
|
158
|
+
sections the desktop shows — Running, Waiting, Arriving, From here —
|
|
159
|
+
as a sheet. **×** on a waiting entry removes it, whoever queued it:
|
|
160
|
+
your own message comes back into the composer, another agent's
|
|
161
|
+
question is reported to that agent as failed with the reason, a
|
|
162
|
+
sub-agent brief as cancelled, a sentinel fire as skipped. Under From
|
|
163
|
+
here, **×** removes a sub-agent or question that has not started yet
|
|
164
|
+
and **■** stops one that runs — the sub-agent with everything it
|
|
165
|
+
started.
|
|
166
|
+
|
|
167
|
+
Stop (composer or bubble — same action) cancels the
|
|
168
|
+
**currently-running** turn only, whatever started it — your message,
|
|
169
|
+
another agent's, a sentinel fire or any other wake. Anything still
|
|
170
|
+
queued behind it keeps its slot and executes when the lock frees.
|
|
171
|
+
|
|
172
|
+
A turn that ends in an error shows a compact **⚠** block inside the
|
|
173
|
+
turn (from the `turn_error` SSE event, and from `error` rows on
|
|
174
|
+
reload), with the media marker under it when the turn produced a
|
|
175
|
+
picture before failing.
|
|
176
|
+
|
|
177
|
+
## Scope: what's in vs what's not
|
|
178
|
+
|
|
179
|
+
**In the mobile client:**
|
|
180
|
+
- One agent at a time, one main session per agent
|
|
181
|
+
- Live streaming of agent responses with a typing-cursor indicator
|
|
182
|
+
- Streaming-state dot on **every** agent currently mid-turn (not just
|
|
183
|
+
the active one), plus a dream-phase pulse (REM / DEEP / LUCID) and
|
|
184
|
+
a REM pending-review counter mirroring the desktop dock; a trailing
|
|
185
|
+
violet **wiki chip** appears in the avatar row when lucid runs are
|
|
186
|
+
waiting for review (platform-wide, mirrors the desktop wiki-tile
|
|
187
|
+
badge)
|
|
188
|
+
- Per-agent unread dot — sentinel fires, A2A inbounds, and assistant
|
|
189
|
+
replies arriving on inactive agents leave a marker that clears
|
|
190
|
+
when you tap that agent (cross-client synced)
|
|
191
|
+
- Markdown rendering of agent replies
|
|
192
|
+
- localStorage-persisted last-agent
|
|
193
|
+
- Voice input via STT (mic-button → record → transcript editable in
|
|
194
|
+
input → send manually)
|
|
195
|
+
- Spoken replies via TTS (optional, gated by per-agent auto-play
|
|
196
|
+
toggle; replay button on past bubbles when audio is cached)
|
|
197
|
+
- Camera / photo-roll attachments via the native picker
|
|
198
|
+
- Keeping the display awake while the app is open (iOS 18.4+)
|
|
199
|
+
- A marker on any reply that produced media (a generated image, say):
|
|
200
|
+
one line naming what exists, pointing at the web app. The PWA renders
|
|
201
|
+
no images or video itself — but staying silent would make a turn that
|
|
202
|
+
produced a picture read as an empty-handed answer
|
|
203
|
+
- Typing-indicator while the agent is working
|
|
204
|
+
- Type-during-streaming with queued indicator + Stop on the streaming
|
|
205
|
+
bubble (parity with the web client)
|
|
206
|
+
- Background sleep recovery — reconnects automatically when the PWA
|
|
207
|
+
returns from the home-screen after a long pause
|
|
208
|
+
|
|
209
|
+
**Not in the mobile client (use `/web` from a real screen):**
|
|
210
|
+
- tmux session attach / shell terminal
|
|
211
|
+
- File viewer windows
|
|
212
|
+
- Pin-note windows
|
|
213
|
+
- Multi-window layout, drag/resize
|
|
214
|
+
- Dream-runner-controls UI (manually triggering REM / DEEP / LUCID)
|
|
215
|
+
- Project switcher (still works if you preset projects server-side)
|
|
216
|
+
- The builder task panel (plan, Go, task list, questions) and the steer
|
|
217
|
+
toggle — a builder can be chatted with from the phone, but its plan is
|
|
218
|
+
approved and its questions answered in the web client
|
|
219
|
+
|
|
220
|
+
## Configuration
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
mobile:
|
|
224
|
+
show:
|
|
225
|
+
tools: false # default off — toggle on to render `[tool call · …]`
|
|
226
|
+
# and `[tool result · …]` rows inline in the mobile
|
|
227
|
+
# chat. Cluttery on small screens, hence default off.
|
|
228
|
+
memory: false # default off — toggle on to render `[memory · …]`
|
|
229
|
+
# inject rows.
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
`GET /mobile-config` reports both flags; the mobile client does not
|
|
233
|
+
render tool or memory rows, so they change nothing on the phone today —
|
|
234
|
+
the desktop's `/show` and `/verbose` toggles are where that detail is.
|
|
235
|
+
|
|
236
|
+
## Authentication / security
|
|
237
|
+
|
|
238
|
+
Same posture as `/web`: LAN-trust on the tailnet. The PWA only works
|
|
239
|
+
when the phone is on the same Tailscale net as the somora server. No
|
|
240
|
+
external public access. There's no login screen — Tailscale is your
|
|
241
|
+
auth boundary. Auth credentials (Anthropic OAuth, OpenAI Codex login)
|
|
242
|
+
stay server-side; the phone just speaks to the somora HTTP API.
|
|
243
|
+
|
|
244
|
+
## Troubleshooting
|
|
245
|
+
|
|
246
|
+
**"Couldn't install" / no install prompt on iOS:**
|
|
247
|
+
- iOS only offers "Add to Home Screen" via the share menu, not via a
|
|
248
|
+
banner. Tap share → scroll → "Add to Home Screen".
|
|
249
|
+
- The page must be served over HTTPS. Plain HTTP-served somora won't
|
|
250
|
+
qualify as a PWA.
|
|
251
|
+
|
|
252
|
+
**Chat is blank / agents don't load:**
|
|
253
|
+
- Check that Tailscale is connected on the phone (Tailscale app, status
|
|
254
|
+
should say "Connected" and list your nodes).
|
|
255
|
+
- `curl -k https://<your-host>.<your-tailnet>.ts.net:18737/healthz`
|
|
256
|
+
from a laptop on the same tailnet should return `ok`.
|
|
257
|
+
|
|
258
|
+
**Service-worker stuck on old version after deploy:**
|
|
259
|
+
- The service-worker bumps cache name on each release, but if you saw
|
|
260
|
+
a bug fixed in a new release: pull-to-refresh the PWA twice (first
|
|
261
|
+
refresh swaps the worker, second sees the new cache).
|
|
262
|
+
- Hard reset: long-press the home-screen icon → "Remove app" → reinstall
|
|
263
|
+
via the share menu.
|
|
264
|
+
|
|
265
|
+
**Voice input greyed out:**
|
|
266
|
+
- The button is permanently disabled when `stt.enabled` is `false`
|
|
267
|
+
in the server's `config.yaml`. Flip to `true`, configure the
|
|
268
|
+
provider + model (see [setup.md](setup.md) → "Speech-to-Text"),
|
|
269
|
+
and restart somora.
|
|
270
|
+
- iOS Safari needs explicit microphone permission the first time —
|
|
271
|
+
tap the mic, accept the prompt. Once accepted, the permission
|
|
272
|
+
sticks for the PWA.
|
|
273
|
+
- If you see the mic spinner forever after stopping a recording:
|
|
274
|
+
`/stt/transcribe` is timing out (the worker model might be down
|
|
275
|
+
or overloaded). Check the somora server logs for the request.
|
|
276
|
+
|
|
277
|
+
**Attachment upload fails / chip never appears:**
|
|
278
|
+
- Big files: somora caps per-kind upload sizes (see
|
|
279
|
+
`src/attachments/store.ts`). If the picker accepted a file but
|
|
280
|
+
the upload errors out, the server's response message appears
|
|
281
|
+
briefly above the input — it tells you what limit was hit.
|
|
282
|
+
- HEIC photos from iOS: most somora pipelines accept HEIC fine, but
|
|
283
|
+
if an agent reports inability to read the image, set your iPhone's
|
|
284
|
+
Camera setting to "Most Compatible" (Settings → Camera → Formats)
|
|
285
|
+
so it captures JPEG instead.
|
|
286
|
+
|
|
287
|
+
## Building from source
|
|
288
|
+
|
|
289
|
+
The mobile PWA lives under `web-mobile/` in the somora repo:
|
|
290
|
+
|
|
291
|
+
```text
|
|
292
|
+
web-mobile/
|
|
293
|
+
├── package.json # vite + react, isolated from web/
|
|
294
|
+
├── vite.config.ts # base: '/mobile/', dev-server :5174
|
|
295
|
+
├── src/
|
|
296
|
+
│ ├── components/
|
|
297
|
+
│ ├── hooks/
|
|
298
|
+
│ └── main.tsx
|
|
299
|
+
└── public/
|
|
300
|
+
├── manifest.webmanifest
|
|
301
|
+
├── service-worker.js
|
|
302
|
+
├── favicon.svg
|
|
303
|
+
└── icon-{192,512}.png
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Built via root `package.json`'s `build:mobile` script, which runs `cd
|
|
307
|
+
web-mobile && npm ci && npm run build`. `npm pack`'s `prepack` hook
|
|
308
|
+
runs `build:all` so the tarball always contains both `web/dist` and
|
|
309
|
+
`web-mobile/dist`. `somora update` picks this up automatically — no
|
|
310
|
+
manual step needed for end users.
|