somora 2026.1026.10 → 2026.1111.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/README.md +4 -4
- package/config.example.yaml +22 -14
- package/docs/a2a.md +4 -1
- package/docs/agents.md +18 -9
- package/docs/api.md +171 -22
- package/docs/builder.md +288 -46
- package/docs/compaction.md +40 -5
- package/docs/external-agents.md +3 -1
- package/docs/files.md +4 -3
- package/docs/memory.md +2 -2
- package/docs/mobile.md +115 -10
- package/docs/models.md +18 -2
- package/docs/realtime-voice.md +87 -24
- package/docs/security.md +19 -3
- package/docs/sentinel.md +5 -2
- package/docs/setup.md +18 -6
- package/docs/skills.md +1 -1
- package/docs/thinking.md +1 -1
- package/docs/tools.md +116 -23
- package/docs/videogen.md +2 -2
- package/docs/web.md +74 -4
- package/docs/wiki.md +3 -2
- package/package.json +12 -12
- package/src/a2a/client.ts +11 -0
- package/src/a2a/files.ts +2 -1
- package/src/a2a/server.ts +5 -2
- package/src/acp/somora-agent.ts +49 -7
- package/src/acp/translate.ts +4 -1
- package/src/attachments/store.ts +19 -2
- package/src/cli/acp.ts +3 -6
- package/src/cli/help-args.ts +21 -0
- package/src/cli/lsp.ts +1 -1
- package/src/cli/server-base.ts +4 -1
- package/src/cli/somora.ts +8 -1
- package/src/cli/team.ts +1 -1
- package/src/cli/tui/app.tsx +4 -2
- package/src/cli/tui/stream.ts +1 -0
- package/src/cli/tui/types.ts +2 -0
- package/src/compaction/index.ts +1 -1
- package/src/compaction/midturn.ts +35 -2
- package/src/compaction/summarize.ts +29 -0
- package/src/compaction/types.ts +9 -0
- package/src/config/loader.ts +35 -0
- package/src/config/reload.ts +2 -0
- package/src/config/settings/catalog/agents.ts +339 -0
- package/src/config/settings/catalog/automation.ts +104 -0
- package/src/config/settings/catalog/engines.ts +156 -0
- package/src/config/settings/catalog/general.ts +206 -0
- package/src/config/settings/catalog/images.ts +657 -0
- package/src/config/settings/catalog/index.ts +129 -0
- package/src/config/settings/catalog/interfaces.ts +174 -0
- package/src/config/settings/catalog/memory.ts +557 -0
- package/src/config/settings/catalog/models.ts +366 -0
- package/src/config/settings/catalog/tools-a.ts +298 -0
- package/src/config/settings/catalog/tools-b.ts +339 -0
- package/src/config/settings/catalog/voice.ts +325 -0
- package/src/config/settings/fields.ts +193 -0
- package/src/config/settings/refs.ts +76 -0
- package/src/config/settings/yaml-edit.ts +530 -0
- package/src/config/types.ts +75 -16
- package/src/dream/deep-actions.ts +3 -2
- package/src/dream/deep-runner.ts +5 -4
- package/src/dream/deep-worker.ts +9 -4
- package/src/dream/lucid-actions.ts +20 -8
- package/src/dream/lucid-storage.ts +12 -3
- package/src/dream/lucid-worker.ts +9 -4
- package/src/dream/scheduler-state.ts +10 -0
- package/src/dream/wiki-file.ts +24 -0
- package/src/engine/a2a-external.ts +9 -7
- package/src/engine/acp-external.ts +1 -1
- package/src/engine/claude-cli.ts +56 -10
- package/src/engine/codex-app-server-client.ts +9 -1
- package/src/engine/codex-cli.ts +34 -9
- package/src/engine/codex-thread-config.ts +4 -0
- package/src/engine/engine-meta-labels.ts +25 -1
- package/src/engine/grok-cli.ts +72 -10
- package/src/engine/grok-home.ts +44 -18
- package/src/engine/openai-compatible.ts +587 -178
- package/src/engine/thinking-params.ts +8 -2
- package/src/engine/tool-concurrency.ts +62 -0
- package/src/external/connection.ts +64 -37
- package/src/external/transport.ts +13 -1
- package/src/external/unprompted.ts +1 -1
- package/src/lsp/client.ts +8 -1
- package/src/mcp/config.ts +7 -12
- package/src/mcp/hub/credentials.ts +5 -1
- package/src/mcp/server.ts +17 -0
- package/src/memory/manager.ts +5 -2
- package/src/persona/loader.ts +1 -1
- package/src/sentinel/check-store.ts +4 -3
- package/src/sentinel/schedule.ts +22 -7
- package/src/sentinel/scheduler.ts +58 -14
- package/src/sentinel/store.ts +27 -6
- package/src/server/activity-stream.ts +13 -0
- package/src/server/async-questions.ts +25 -6
- package/src/server/auth-key.ts +11 -1
- package/src/server/builder-acceptance.ts +190 -0
- package/src/server/builder-busy.ts +6 -3
- package/src/server/builder-facts.ts +225 -0
- package/src/server/builder-prompt.ts +69 -31
- package/src/server/builder-questions.ts +8 -0
- package/src/server/builder-session.ts +20 -7
- package/src/server/builder-turn-end.ts +134 -0
- package/src/server/env-file.ts +82 -1
- package/src/server/index.ts +125 -25
- package/src/server/logger.ts +39 -0
- package/src/server/prompt-assembly.ts +7 -1
- package/src/server/routes/attachments.ts +5 -1
- package/src/server/routes/builder.ts +121 -6
- package/src/server/routes/chat.ts +18 -3
- package/src/server/routes/external.ts +2 -2
- package/src/server/routes/mcp.ts +2 -2
- package/src/server/routes/server.ts +13 -3
- package/src/server/routes/sessions.ts +8 -0
- package/src/server/routes/settings.ts +421 -0
- package/src/server/routes/terminals.ts +14 -0
- package/src/server/run-external-turn.ts +1 -1
- package/src/server/run-turn-fallback.ts +67 -5
- package/src/server/run-turn-types.ts +8 -0
- package/src/server/run-turn.ts +45 -41
- package/src/server/session-export.ts +3 -1
- package/src/server/session-queue.ts +10 -1
- package/src/server/sse-serializer.ts +3 -1
- package/src/server/start-turn.ts +170 -2
- package/src/server/work-ledger.ts +1 -0
- package/src/testing/own-home.mts +10 -1
- package/src/tools/agents/ask-result.ts +10 -0
- package/src/tools/agents/ask.ts +9 -0
- package/src/tools/agents/builder-dispatch.ts +64 -10
- package/src/tools/agents/builder-review.ts +176 -0
- package/src/tools/agents/index.ts +2 -0
- package/src/tools/agents/session-list.ts +2 -0
- package/src/tools/agents/status.ts +6 -0
- package/src/tools/builder/short-descriptions.ts +9 -4
- package/src/tools/builder/tools.ts +102 -4
- package/src/tools/docs/tools.ts +4 -0
- package/src/tools/dream/tools.ts +9 -3
- package/src/tools/exec/job-store.ts +21 -2
- package/src/tools/exec/local.ts +53 -4
- package/src/tools/exec/systemd-scope.ts +53 -0
- package/src/tools/exec/timeout-repeats.ts +138 -0
- package/src/tools/exec/tools.ts +30 -3
- package/src/tools/file/analyze.ts +2 -0
- package/src/tools/file/remote.ts +32 -8
- package/src/tools/file/tools.ts +6 -0
- package/src/tools/file/write-scope.ts +52 -3
- package/src/tools/gating.ts +5 -4
- package/src/tools/image/tools.ts +8 -2
- package/src/tools/memory/tools.ts +6 -0
- package/src/tools/projects/tools.ts +6 -0
- package/src/tools/resources/tools.ts +2 -0
- package/src/tools/sentinel/tools.ts +3 -1
- package/src/tools/skill/tools.ts +13 -9
- package/src/tools/time/tools.ts +2 -0
- package/src/tools/tmux/local.ts +7 -0
- package/src/tools/types.ts +9 -0
- package/src/tools/video/tools.ts +4 -0
- package/src/tools/web/fetch.ts +2 -0
- package/src/tools/web/tools.ts +2 -0
- package/src/types/events.ts +22 -3
- package/src/videogen/generate.ts +47 -0
- package/src/videogen/jobs.ts +2 -0
- package/src/voice/realtime/call.ts +302 -18
- package/src/voice/realtime/manager.ts +106 -17
- package/src/voice/realtime/openai-provider.ts +104 -7
- package/src/voice/realtime/persona.ts +6 -0
- package/src/voice/realtime/types.ts +5 -1
- package/templates/skills/builder-handover/SKILL.md +22 -0
- package/web/dist/assets/index-4Y3UWgKl.css +1 -0
- package/web/dist/assets/index-DaK5Ia6s.js +71 -0
- package/web/dist/assets/index-DaK5Ia6s.js.map +1 -0
- package/web/dist/index.html +2 -2
- package/web-mobile/dist/assets/index-CuFyR52B.js +50 -0
- package/web-mobile/dist/assets/index-CuFyR52B.js.map +1 -0
- package/web-mobile/dist/assets/{index-B8UJVJ7V.css → index-LxDshn5l.css} +1 -1
- package/web-mobile/dist/index.html +2 -2
- package/web/dist/assets/index-D0hm3iJz.js +0 -68
- package/web/dist/assets/index-D0hm3iJz.js.map +0 -1
- package/web/dist/assets/index-hdBR7ObT.css +0 -1
- package/web-mobile/dist/assets/index-BFmhLylV.js +0 -47
- package/web-mobile/dist/assets/index-BFmhLylV.js.map +0 -1
package/README.md
CHANGED
|
@@ -110,8 +110,8 @@ one you give a repository to.
|
|
|
110
110
|
| **Tools** | The whole programme, gated per agent | A short coding set: files, shell, task list, questions, helpers, colleagues, search |
|
|
111
111
|
| **Turns** | A few rounds; on an OpenAI-compatible model the loop stops at 30 tool calls (the CLI engines run their own loop) | Hours; hundreds of rounds, compaction mid-turn, a task list you watch |
|
|
112
112
|
| **Memory** | Notices facts, dreams them into notes and the wiki | Reads memory, never writes it; does not dream |
|
|
113
|
-
| **Works in** | Its workspace | The pinned project's folder, and
|
|
114
|
-
| **Window** | Chat | Chat plus a task panel: mode, plan → Go, tasks, questions, running time |
|
|
113
|
+
| **Works in** | Its workspace | The pinned project's folder, and folders an order allows besides it |
|
|
114
|
+
| **Window** | Chat | Chat plus a task panel, in the web client and on the phone: mode, plan → Go, tasks, acceptance list, questions, running time |
|
|
115
115
|
| **Made how** | `somora setup agent`, or a folder with an `AGENTS.md` and an `agent.yaml` | A folder whose `agent.yaml` says `kind: builder` — fixed for life |
|
|
116
116
|
|
|
117
117
|
You can talk to a builder directly — describe the project, let it plan,
|
|
@@ -134,7 +134,7 @@ On top of chat and memory, each optional and off until configured:
|
|
|
134
134
|
prompt, hand back, and the agent continues in the same tab
|
|
135
135
|
([docs/browser.md](docs/browser.md)).
|
|
136
136
|
- **Talking to an agent** — a standing, interruptible voice call in the
|
|
137
|
-
web client: a realtime model does the talking, the agent does the
|
|
137
|
+
web client or on the phone: a realtime model does the talking, the agent does the
|
|
138
138
|
knowing, and a long answer is read out when it lands
|
|
139
139
|
([docs/realtime-voice.md](docs/realtime-voice.md)). Separate from
|
|
140
140
|
dictation and spoken replies ([docs/voice.md](docs/voice.md)).
|
|
@@ -373,7 +373,7 @@ Three first-party clients, all hitting the same local server:
|
|
|
373
373
|
|---|---|---|
|
|
374
374
|
| **TUI** | `somora tui` | Terminal multi-agent chat with full keyboard control, the session's queue (`/queue`), memory and tool detail toggles. |
|
|
375
375
|
| **Web** | `https://<host>.<tailnet>.ts.net:18737/web/` | A browser desktop: one window per agent, drag-and-drop attachments and screenshots, tmux app and shell terminal, Wiki Explorer with link graph, Media gallery, Sessions browser, the agent's Chromium window, server log, an inbox for updates and things that need you, a light or dark theme plus the bundled Ocean theme, or themes of your own (colours and wallpaper, [docs/web.md#themes](docs/web.md#themes)), Abilities matrix (which tools and skills each agent may use), Team and Agent windows, a queue badge per session (what runs, what waits, what is arriving — take back or stop from there), dictation and spoken replies, and a voice window for a live call. HTTPS recommended (needed from other devices and for the microphone); sign in once with the server's key (`somora key link`). [docs/web.md](docs/web.md) |
|
|
376
|
-
| **Mobile (PWA)** | `…:18737/mobile/`, then "Add to Home Screen" | The phone app: avatar row to switch agent, a sheet in the header to switch session and model or restore an archived session, the same queue sheet with steering, the thinking level per session, voice input and spoken replies, photo/PDF attachments via the native picker. Signs in once by scanning the QR code from `somora key link`. [docs/mobile.md](docs/mobile.md) |
|
|
376
|
+
| **Mobile (PWA)** | `…:18737/mobile/`, then "Add to Home Screen" | The phone app: avatar row to switch agent, a sheet in the header to switch session and model or restore an archived session, the same queue sheet with steering, the thinking level per session, a tools switch that shows a turn's tool calls, a builder's panel (mode, phase, Go, task and acceptance lists), voice input and spoken replies, a live voice call with an agent, photo/PDF attachments via the native picker. Signs in once by scanning the QR code from `somora key link`. [docs/mobile.md](docs/mobile.md) |
|
|
377
377
|
|
|
378
378
|
Anything else can talk to the server the same way the clients do, with
|
|
379
379
|
the server's key in an `Authorization: Bearer` header:
|
package/config.example.yaml
CHANGED
|
@@ -520,6 +520,9 @@ providers:
|
|
|
520
520
|
# compaction:
|
|
521
521
|
# triggerRatio: 0.8 # compact at 80% of the input budget (window minus the answer)
|
|
522
522
|
# safetyCushionPairs: 4 # keep N most-recent user/assistant pairs uncompacted
|
|
523
|
+
# builderTargetRatio: 0.6 # builders only: a turn starts with at most 60% of the input
|
|
524
|
+
# # budget used; the compaction keeps only the newest exchanges
|
|
525
|
+
# # that fit below it (0.2 to 0.9)
|
|
523
526
|
# modelOverride: opus # force a specific worker model (alias or provider/id)
|
|
524
527
|
# workers: [small-local, big-local, opus] # who may summarise, in the order they are tried.
|
|
525
528
|
# # A model that is not listed is never a worker. Without the list
|
|
@@ -540,13 +543,15 @@ providers:
|
|
|
540
543
|
# # google has no adapter yet (different protocol entirely).
|
|
541
544
|
# model: gpt-realtime-2.1-mini
|
|
542
545
|
# apiKeyFile: ~/.somora/secrets/openai-realtime.key # a FILE (chmod 600), never the key itself
|
|
543
|
-
# # url: ws
|
|
546
|
+
# # url: ws://<host>:8766/v1/realtime # where to connect. Omitted = OpenAI. Required for
|
|
544
547
|
# # provider: local. The model id is appended as ?model=…, and a
|
|
545
548
|
# # service without a credential needs no apiKeyFile.
|
|
546
|
-
# transport: websocket # audio goes browser -> somora -> provider
|
|
547
549
|
# defaultVoice: alloy # alloy ash ballad coral echo sage shimmer verse marin cedar
|
|
550
|
+
# # provider: local -> defaultVoice: <set-name>, a set on the service
|
|
548
551
|
# consultPolicy: always # auto | substantive | always — when the voice must ask the agent
|
|
549
552
|
# maxCallMinutes: 20 # hard stop; the meter runs while nobody speaks
|
|
553
|
+
# keepTranscript: true # one folded call record per call in the session; the agent's
|
|
554
|
+
# # context, memory and dreams never read it
|
|
550
555
|
# allowAgentSwitch: false # let a call move to another agent or session mid-conversation
|
|
551
556
|
# consult: # how long a spoken question waits on the agent. It queues on
|
|
552
557
|
# # the session like any turn, but a conversation cannot wait on
|
|
@@ -571,7 +576,7 @@ providers:
|
|
|
571
576
|
# back to the parent as a follow-up (an echo). docs/agents.md.
|
|
572
577
|
# subagents:
|
|
573
578
|
# tools:
|
|
574
|
-
# deny: [agent_ask, agent_ask_result, agent_ask_cancel]
|
|
579
|
+
# deny: [agent_ask, agent_ask_result, agent_ask_cancel, builder_review]
|
|
575
580
|
|
|
576
581
|
# Agent-loop tunables. Apply to engines that run
|
|
577
582
|
# their own tool-call loop — currently openai-compatible — for the per-
|
|
@@ -598,9 +603,9 @@ providers:
|
|
|
598
603
|
#
|
|
599
604
|
# maxTurnMs: 28800000 # optional wall-clock cap per turn (ms).
|
|
600
605
|
# # Unset = none. Builder agents (agent.yaml
|
|
601
|
-
# # kind: builder) default to
|
|
602
|
-
# # 2000 tool calls and 8 h per turn
|
|
603
|
-
# # may override all three per agent
|
|
606
|
+
# # kind: builder) default to no round
|
|
607
|
+
# # cap, 2000 tool calls and 8 h per turn
|
|
608
|
+
# # and may override all three per agent
|
|
604
609
|
# # (agent.yaml agentLoop, docs/builder.md).
|
|
605
610
|
#
|
|
606
611
|
# toolCallTimeoutMs: 30000 # 30 sec — fast tools (memory_search,
|
|
@@ -627,6 +632,13 @@ providers:
|
|
|
627
632
|
# # the background (capped by its own
|
|
628
633
|
# # agentLoop.maxRounds), so this is
|
|
629
634
|
# # really just a per-call ceiling.
|
|
635
|
+
# # Raise for exceptionally slow setups
|
|
636
|
+
# # (CPU-only inference, huge models).
|
|
637
|
+
# # claudeCli.mcpToolTimeoutMs and
|
|
638
|
+
# # codexCli.toolTimeoutSec MUST be ≥
|
|
639
|
+
# # this — the CLI's MCP layer sits
|
|
640
|
+
# # above us and will cut us off
|
|
641
|
+
# # otherwise.
|
|
630
642
|
#
|
|
631
643
|
# wakeGraceMs: 3000 # 3 sec — when work an agent started and
|
|
632
644
|
# # walked away from finishes (a late
|
|
@@ -637,13 +649,6 @@ providers:
|
|
|
637
649
|
# # (agent_ask_result, subagent_result,
|
|
638
650
|
# # video_status) within this grace.
|
|
639
651
|
# # 0..60000.
|
|
640
|
-
# # Raise for exceptionally slow setups
|
|
641
|
-
# # (CPU-only inference, huge models).
|
|
642
|
-
# # claudeCli.mcpToolTimeoutMs and
|
|
643
|
-
# # codexCli.toolTimeoutSec MUST be ≥
|
|
644
|
-
# # this — the CLI's MCP layer sits
|
|
645
|
-
# # above us and will cut us off
|
|
646
|
-
# # otherwise.
|
|
647
652
|
|
|
648
653
|
|
|
649
654
|
# Engine watchdog — idle-event timeout per engine. If an engine produces
|
|
@@ -800,6 +805,9 @@ providers:
|
|
|
800
805
|
# # 384 dim, ~30MB), all-mpnet-base-v2 (768 dim,
|
|
801
806
|
# # ~110MB), paraphrase-multilingual-MiniLM-L12-v2
|
|
802
807
|
# # (multilingual, 384 dim, ~120MB)
|
|
808
|
+
# # choose it BEFORE memory is first indexed: a
|
|
809
|
+
# # change later mixes old and new vectors, and a
|
|
810
|
+
# # different vector size stops memory from starting
|
|
803
811
|
# chunking:
|
|
804
812
|
# targetTokens: 400
|
|
805
813
|
# overlapTokens: 80
|
|
@@ -984,7 +992,7 @@ providers:
|
|
|
984
992
|
# maxMessageChars: 64000 # longest task text
|
|
985
993
|
# archiveAfterDays: 7 # quiet conversations with peers are archived
|
|
986
994
|
# tools:
|
|
987
|
-
# deny: [agent_ask, agent_ask_result, agent_ask_cancel, spawn_subagent, spawn_subagents, builder_dispatch, session_model, sentinel]
|
|
995
|
+
# deny: [agent_ask, agent_ask_result, agent_ask_cancel, spawn_subagent, spawn_subagents, builder_dispatch, builder_review, session_model, sentinel]
|
|
988
996
|
|
|
989
997
|
# Web-tools credentials. Per-provider keys — tools whose provider isn't
|
|
990
998
|
# configured are hidden from the agent (the `available()` probe on the
|
package/docs/a2a.md
CHANGED
|
@@ -407,7 +407,7 @@ curl https://<host>.<tailnet>.ts.net:18737/a2a/agents/<agent>/.well-known/agent-
|
|
|
407
407
|
| `a2a.replyTimeoutSeconds` | `300` | How long a waiting request waits for the answer before it returns the task as still working. |
|
|
408
408
|
| `a2a.maxMessageChars` | `64000` | Longest task text. |
|
|
409
409
|
| `a2a.archiveAfterDays` | `7` | A conversation with a peer is archived after this many days without activity. `0` keeps them. |
|
|
410
|
-
| `a2a.tools.deny` | `agent_ask`, `agent_ask_result`, `agent_ask_cancel`, `spawn_subagent`, `spawn_subagents`, `builder_dispatch`, `session_model`, `sentinel` | Tools a task from outside may not use, as in `subagents.tools.deny`. |
|
|
410
|
+
| `a2a.tools.deny` | `agent_ask`, `agent_ask_result`, `agent_ask_cancel`, `spawn_subagent`, `spawn_subagents`, `builder_dispatch`, `builder_review`, `session_model`, `sentinel` | Tools a task from outside may not use, as in `subagents.tools.deny`. |
|
|
411
411
|
|
|
412
412
|
The address of an agent is `<publicUrl>/a2a/agents/<agent>`. somora
|
|
413
413
|
needs no extra port: the A2A endpoint is part of its server, reachable
|
|
@@ -551,6 +551,9 @@ logged as `a2a.inbound_refused`.
|
|
|
551
551
|
minute. A right token always passes. The cards are public, as the standard wants: anyone who
|
|
552
552
|
reaches the server sees which agents are switched on and their
|
|
553
553
|
descriptions.
|
|
554
|
+
- **Tokens go only where they belong.** somora sends a peer's token
|
|
555
|
+
only to an endpoint on the same host as the peer's agent card, the
|
|
556
|
+
`a2a.url` you configured. A card that names another host is refused.
|
|
554
557
|
- **The login key stays apart.** A peer's token opens the A2A endpoint
|
|
555
558
|
and nothing else in somora. The A2A paths are the only ones the login
|
|
556
559
|
key does not guard, and they check the peer tokens themselves.
|
package/docs/agents.md
CHANGED
|
@@ -72,9 +72,9 @@ and is set up in `config.yaml`, not in an agent folder.
|
|
|
72
72
|
| **Its prompt** | Its persona files, your team, the wiki map, memory recall | Harness rules, an environment block, the repository's own `AGENTS.md` or `CLAUDE.md`. No persona prose, no memory recall |
|
|
73
73
|
| **Tools** | Everything configured, minus what you hide | A short coding set, plus what you allow |
|
|
74
74
|
| **Skills** | All, minus what you hide | None, plus what you allow |
|
|
75
|
-
| **Turn limits** | The server's `agentLoop` values: 8 rounds, 30 tool calls |
|
|
76
|
-
| **Memory** | Notices facts, dreams them into notes and the wiki | Reads memory, never writes it, does not dream |
|
|
77
|
-
| **Works in** | Its workspace | The pinned project's folder |
|
|
75
|
+
| **Turn limits** | The server's `agentLoop` values: 8 rounds, 30 tool calls | No round cap, 2000 tool calls, 8 hours |
|
|
76
|
+
| **Memory** | Notices facts, dreams them into notes and the wiki | Reads memory, never writes it, does not dream unless `dreams: true` |
|
|
77
|
+
| **Works in** | Its workspace | The pinned project's folder, and folders an order allows |
|
|
78
78
|
| **Window** | Chat | Chat plus a task panel |
|
|
79
79
|
|
|
80
80
|
## The agent folder
|
|
@@ -439,14 +439,14 @@ The sub keeps running and the parent is woken when it finishes.
|
|
|
439
439
|
|
|
440
440
|
A session started as a sub-agent never gets the tools listed under
|
|
441
441
|
`subagents.tools.deny` in `config.yaml`, whatever persona and model it
|
|
442
|
-
runs with. By default these are `agent_ask`, `agent_ask_result
|
|
443
|
-
`agent_ask_cancel`. A sub's final answer reaches its parent on its own,
|
|
442
|
+
runs with. By default these are `agent_ask`, `agent_ask_result`,
|
|
443
|
+
`agent_ask_cancel` and `builder_review`. A sub's final answer reaches its parent on its own,
|
|
444
444
|
so it has nothing to send that way.
|
|
445
445
|
|
|
446
446
|
```yaml
|
|
447
447
|
subagents:
|
|
448
448
|
tools:
|
|
449
|
-
deny: [agent_ask, agent_ask_result, agent_ask_cancel] # the default
|
|
449
|
+
deny: [agent_ask, agent_ask_result, agent_ask_cancel, builder_review] # the default
|
|
450
450
|
```
|
|
451
451
|
|
|
452
452
|
- The entries take the same forms as `tools.deny` in `agent.yaml`: a
|
|
@@ -703,6 +703,13 @@ How the fallback chain works:
|
|
|
703
703
|
- **Refusals as text.** Some providers send their refusal, such as a
|
|
704
704
|
quota notice, as answer text and then report an error. That text is
|
|
705
705
|
not an answer, so the chain still runs.
|
|
706
|
+
- **A conversation too big is not a failure.** When it does not fit
|
|
707
|
+
the model's window even after compacting twice, the chain skips
|
|
708
|
+
every backup whose window is no larger. A smaller model cannot hold
|
|
709
|
+
what a bigger one could not.
|
|
710
|
+
- **The asking agent sees it.** An agent that asked this one gets the
|
|
711
|
+
model that answered (`model`) and, after a switch, `fallback` with
|
|
712
|
+
the model it asked for and why. Its wake-up says so too.
|
|
706
713
|
- **You see it.** The turn carries a fallback chip and the web client
|
|
707
714
|
shows a notice.
|
|
708
715
|
- **Dead models are remembered.** A model that was unreachable is
|
|
@@ -722,8 +729,8 @@ How the fallback chain works:
|
|
|
722
729
|
| `a2a` | boolean | `false` | Other agent systems may send this agent tasks over [A2A](a2a.md#taking-work-in), if `config.yaml` lists them under `a2a.peers`. Also the A2A switch in the Agent window. Never for a builder. |
|
|
723
730
|
| `steering` | boolean | `false` | Default for a message typed in the web client while a turn runs. `true` hands it into the running turn before its next step. `false` queues it as its own turn. The toggle next to Send flips it per message. Steering works on every engine: `openai-compatible`, `claude-cli`, `codex-cli` and `grok-cli`. |
|
|
724
731
|
| `imageReview` | `never`, `always` | `never` | `always` feeds each generated image back to the agent so it can judge it, about 2k tokens per image. Not a lock: the agent can set `return_image` per call either way. |
|
|
725
|
-
| `agentLoop.maxRounds` | integer | server value (8) | Rounds per turn on the `openai-compatible` engine. Builders
|
|
726
|
-
| `agentLoop.maxToolCallsPerTurn` | integer | server value (30) | Tool calls per turn, across all rounds. Builders default to 2000. |
|
|
732
|
+
| `agentLoop.maxRounds` | integer | server value (8) | Rounds per turn on the `openai-compatible` engine. Builders have none unless set. |
|
|
733
|
+
| `agentLoop.maxToolCallsPerTurn` | integer | server value (30) | Tool calls per turn, across all rounds. Builders default to 2000. A hard limit: calls in a reply beyond it are refused, not run, and the model is asked to answer. |
|
|
727
734
|
| `agentLoop.maxTurnMs` | integer | none | Time limit per turn in milliseconds. Builders default to 8 hours. |
|
|
728
735
|
|
|
729
736
|
### Workspace and visibility
|
|
@@ -806,11 +813,13 @@ an `openai-compatible` provider.
|
|
|
806
813
|
| `fallback.retryUnavailableMinutes` | `60` | How long an unreachable model is skipped. 1 to 1440. |
|
|
807
814
|
| `agentLoop.maxRounds` | `8` | Rounds per turn, `openai-compatible` engine. |
|
|
808
815
|
| `agentLoop.maxToolCallsPerTurn` | `30` | Tool calls per turn. |
|
|
816
|
+
| `agentLoop.maxParallelTools` | `8` | Calls of one reply that run at the same time, for tools that change nothing. See [Tools](tools.md#results-limits-and-timeouts). |
|
|
817
|
+
| `agentLoop.parallelToolHint` | `false` | Tells a model with `parallelToolCalls: true` that independent calls can go in one reply. |
|
|
809
818
|
| `agentLoop.longTaskDefaultTimeoutMs` | `300000` | Default wait of `agent_ask` and the result tools. |
|
|
810
819
|
| `agentLoop.longTaskMaxTimeoutMs` | `1800000` | Longest wait. |
|
|
811
820
|
| `agentLoop.wakeGraceMs` | `3000` | Delay before a wake turn. 0 to 60000. |
|
|
812
821
|
| `agentLoop.toolUsageReminder` | `true` | The tool reminder in the prompt. |
|
|
813
|
-
| `subagents.tools.deny` | `[agent_ask, agent_ask_result, agent_ask_cancel]` | Tools a sub-agent session never gets. See [What a sub does not get](#what-a-sub-does-not-get). |
|
|
822
|
+
| `subagents.tools.deny` | `[agent_ask, agent_ask_result, agent_ask_cancel, builder_review]` | Tools a sub-agent session never gets. See [What a sub does not get](#what-a-sub-does-not-get). |
|
|
814
823
|
| `promptBudgets.personaFileChars` | `8000` | Budget for each of `AGENTS.md`, `SOUL.md`, `USER.md`. |
|
|
815
824
|
| `promptBudgets.personaTotalChars` | `14000` | Budget for the three together. |
|
|
816
825
|
| `promptBudgets.teamBlockChars` | `3000` | Budget for the team block. |
|
package/docs/api.md
CHANGED
|
@@ -64,7 +64,7 @@ the turn and returns the reply in the response.
|
|
|
64
64
|
| Base URL | `https://<your-host>.<your-tailnet>.ts.net:18737` with HTTPS set up, else `http://127.0.0.1:18737`. The web client is under `/web/`, the mobile app under `/mobile/`. |
|
|
65
65
|
| Bodies | JSON in, JSON out (`Content-Type: application/json`), unless a route says otherwise. Uploads are raw bytes or `multipart/form-data`, as noted per route. |
|
|
66
66
|
| Errors | A non-2xx response carries `{ "error": "<message>" }`. The message is written for a person. Some routes add fields, noted per route. |
|
|
67
|
-
| Unknown agent or session | `404` on every route that takes one, except `POST /chat/abort
|
|
67
|
+
| Unknown agent or session | `404` on every route that takes one, except `POST /chat/abort`. |
|
|
68
68
|
| Agent being renamed | `409` with `error: "agent '<name>' is being renamed — try again in a moment"` on every route under `/agents/:agent/` except reads (`GET`), and on `POST /chat/send` and `POST /chat/send-sync`, for the old and the new name. Retry in a moment. |
|
|
69
69
|
| Times | Epoch milliseconds as numbers, or ISO 8601 strings. The examples show which. |
|
|
70
70
|
| Streams | Server-Sent Events with named events. `data` is always JSON. |
|
|
@@ -214,7 +214,7 @@ the day, a `subagents.tools.deny` entry that names no tool).
|
|
|
214
214
|
| Field | Meaning |
|
|
215
215
|
|---|---|
|
|
216
216
|
| `key` | Stable per thing, e.g. `update:<version>`, `news:<hash>`, `config`, `login:claude-cli`, `login:openai-compatible:<provider>`, `login:mcp:<server>`, `tls`, `rem:<agent>`, `deep:<agent>/<slug>`, `lucid`, `mcp:<server>`, `model:<provider/id>`, `sentinel:<triggerId>`, `config:subagents-deny`, `config:rem-model` (agents that dream without a REM model), `dream:switch` (the one-time rewrite to the dreams switch). |
|
|
217
|
-
| `kind` | `update`, `news`, `config`, `login`, `tls`, `dream`, `mcp`, `model`, `sentinel`. |
|
|
217
|
+
| `kind` | `update`, `news`, `config`, `login`, `tls`, `dream`, `mcp`, `model`, `sentinel`, `a2a`. |
|
|
218
218
|
| `level` | `info`, `warning`, `important`. |
|
|
219
219
|
| `title`, `text`, `url?` | Plain text. `url` is `https://` only. |
|
|
220
220
|
| `firstSeen`, `lastSeen`, `count` | Epoch ms; `count` counts events, a checked state stays `1`. |
|
|
@@ -439,7 +439,7 @@ whether the file is valid, and whether the server can restart itself.
|
|
|
439
439
|
"loadedAt": "2026-05-14T11:09:08.429Z",
|
|
440
440
|
"changedOnDisk": false,
|
|
441
441
|
"restartRequiredSections": ["server", "memory", "obsidian", "wiki", "mcp",
|
|
442
|
-
"claudeCli", "codexCli", "stt", "tts", "sentinel", "updateCheck",
|
|
442
|
+
"browser", "claudeCli", "codexCli", "stt", "tts", "sentinel", "updateCheck",
|
|
443
443
|
"tmux", "web", "mobile"],
|
|
444
444
|
"restartAvailable": true }
|
|
445
445
|
```
|
|
@@ -469,6 +469,80 @@ A reload also forgets every "model unavailable" mark, like
|
|
|
469
469
|
`POST /models/availability/reset`, and every cached provider catalog
|
|
470
470
|
of image and video models: the next request reads them fresh.
|
|
471
471
|
|
|
472
|
+
### Settings
|
|
473
|
+
|
|
474
|
+
The settings window's routes (web.md "The settings window"). Keys and
|
|
475
|
+
passwords never leave the server: in `values` they are
|
|
476
|
+
`{secret: true, set}`, in the YAML text `•••• (set)`.
|
|
477
|
+
|
|
478
|
+
#### `GET /settings`
|
|
479
|
+
|
|
480
|
+
`{path, hash, valid, issues?, groups, restartSections, fields, values, inFile, envSet, refOptions?}`.
|
|
481
|
+
|
|
482
|
+
| Field | Content |
|
|
483
|
+
|---|---|
|
|
484
|
+
| `hash` | The file's state; `POST /settings/apply` needs it back. |
|
|
485
|
+
| `groups` | `{id, title, icon, sections, ready}`. A group that is not `ready` is read only. |
|
|
486
|
+
| `fields` | One per setting: `{path, kind, section, default?, enum?, min?, max?, minExclusive?, nullable?, required?, valueKind?, info?}`. `kind` is `boolean`, `integer`, `number`, `string`, `enum`, `strings`, `one-or-many`, `boolean-or-strings` (on, off or a list of names), `object`, `map` or `list`. `*` in `path` stands for an entry name. `valueKind` belongs to a `map` of plain values and says what each value is (`string`, `number`, `integer` or `boolean`; a header is a `string`). `info` is `{label, help, more?, level, sensitive?, unit?, docs?, placeholder?, locked?, retired?, ref?}`: `locked` gives the reason a setting is not changed here, `retired` marks one somora no longer reads. |
|
|
487
|
+
| `values` | The configuration in force, defaults filled in; `null` when the file does not validate. |
|
|
488
|
+
| `inFile` | Dotted paths the file itself sets, entries of lists by index. |
|
|
489
|
+
| `envSet` | Settings an environment variable overrides, as `{path: variable}`. They cannot be changed here. |
|
|
490
|
+
| `refOptions` | The names a reference can take, by kind: `model` (aliases and `provider/id`), `provider`, `image-model`, `video-model`, `decision-model`. A field's `info.ref` names its kind. Sent only when the file validates. |
|
|
491
|
+
|
|
492
|
+
#### `POST /settings/test-model`
|
|
493
|
+
|
|
494
|
+
Body `{provider, model}` (the model's id); without both, 400. Asks an
|
|
495
|
+
openai-compatible model of the saved configuration one short question,
|
|
496
|
+
with the model's saved reasoning default and sampling, as a chat turn
|
|
497
|
+
sends them: `{ok, ms, reply?, error?}`. A provider or model that is not
|
|
498
|
+
in the saved configuration gives `{ok: false, error}` without `ms`. For
|
|
499
|
+
a model on another engine `{ok: false, note}`; it is not asked.
|
|
500
|
+
|
|
501
|
+
#### `GET /settings/yaml`
|
|
502
|
+
|
|
503
|
+
`{path, hash, text}`: the file as it is on disk, keys blanked.
|
|
504
|
+
|
|
505
|
+
#### `POST /settings/apply`
|
|
506
|
+
|
|
507
|
+
Body `{hash, changes: [...]}`, each change `{path, value}`, `{path,
|
|
508
|
+
reset: true}` (back to the default: the line is removed) or `{path,
|
|
509
|
+
secret}`.
|
|
510
|
+
|
|
511
|
+
A path may name an entry of a map or list
|
|
512
|
+
(`mcp.servers.<name>`, `imageGen.models.3`) to add it with an object
|
|
513
|
+
value or remove it with `reset`, or a field inside one
|
|
514
|
+
(`mcp.servers.<name>.headers.Authorization`). List indexes mean the
|
|
515
|
+
entries as the file has them; a name with a dot of its own is
|
|
516
|
+
written with `%2E` (`toolCatalog.models.gpt-5%2E5`).
|
|
517
|
+
|
|
518
|
+
A value carrying `{secret: true, set}` is refused, and so is a change that removes a model, provider or
|
|
519
|
+
named model still in use (an agent's model, fallback or own REM worker models, or a setting
|
|
520
|
+
that names it); `issues` says who uses it.
|
|
521
|
+
|
|
522
|
+
Only the changed lines are written; comments and layout
|
|
523
|
+
stay. Before writing, the file is saved to `~/.somora/config-backups/`
|
|
524
|
+
(the last 20 stay); after it, the configuration is reloaded as by
|
|
525
|
+
`POST /config/reload`.
|
|
526
|
+
|
|
527
|
+
| Status | Body |
|
|
528
|
+
|---|---|
|
|
529
|
+
| `200` | `{ok: true, hash, backup, reload}`. `reload` is the answer of the reload. Changes that leave the file as it was give `{ok: true, hash, unchanged: true}`: nothing written, no backup. |
|
|
530
|
+
| `400` | `{error, issues: [{path, message}]}`: an unknown setting, one of a group that is not ready, one an environment variable sets, a locked setting (also when its whole block is sent), a retired setting changed other than by `reset`, a change with none of `value`, `reset` or `secret`, a value the schema refuses, or the removal of a name still in use. An edit the file cannot take gives `{error}` alone. Nothing was written. |
|
|
531
|
+
| `409` | `{error, hash}`: the file changed since `hash`. Nothing was written. |
|
|
532
|
+
|
|
533
|
+
#### `GET /settings/backups`
|
|
534
|
+
|
|
535
|
+
`{backups: [{name, at, bytes}], keep}`, newest first.
|
|
536
|
+
|
|
537
|
+
#### `POST /settings/restore`
|
|
538
|
+
|
|
539
|
+
Body `{name, hash}`, both required. Writes that backup back after the
|
|
540
|
+
same checks as `apply`, keeps the current file as a backup too, and
|
|
541
|
+
reloads. `400` for a missing hash, a name that is not a backup, a
|
|
542
|
+
version that does not validate, or one that would change a locked
|
|
543
|
+
setting or remove a model or provider still in use; `404` for a backup
|
|
544
|
+
that is not there, `409` as above.
|
|
545
|
+
|
|
472
546
|
### `POST /server/restart`
|
|
473
547
|
|
|
474
548
|
Restarts the server through its service manager: the systemd user unit
|
|
@@ -654,8 +728,10 @@ Response `200`, the turn result:
|
|
|
654
728
|
|---|---|
|
|
655
729
|
| `finalText` | The reply. |
|
|
656
730
|
| `outcome` | `completed`, `partial`, `degraded` or `failed`. `outcome_reason` and `error` explain the last three. |
|
|
657
|
-
| `tool_calls`, `rounds`, `ms` | How much work the turn was. |
|
|
731
|
+
| `tool_calls`, `rounds`, `ms` | How much work the turn was. For a builder sent back to open work, `tool_calls`, `files_written` and `tools_used` cover the follow-up turns too, and `finalText` is the last turn's report ([Builder](builder.md#when-the-builder-wants-to-stop)). |
|
|
658
732
|
| `files_written`, `media` | Files and generated media of the turn, when there are any. |
|
|
733
|
+
| `tools_used` | The tools the turn called, each once, by their registry name. |
|
|
734
|
+
| `engine`, `agentKind` | The engine that ran the turn (`claude-cli`, `codex-cli`, `grok-cli`, `openai-compatible`) and the agent's kind (`chat` or `builder`). |
|
|
659
735
|
| `follow_ups` | Texts that reached the caller after the report. See `GET /spawn-result`. |
|
|
660
736
|
| `usage`, `contextWindow`, `provider`, `model` | Tokens and the model that answered. `fallback` is added when a backup model answered. |
|
|
661
737
|
| `thinkingActive`, `thinkingLevel` | Whether a thinking level was applied. |
|
|
@@ -786,7 +862,7 @@ Every event has `kind` and `ts`. The kinds:
|
|
|
786
862
|
| `model_fallback` | A backup model answered. Stands before the assistant message it produced. |
|
|
787
863
|
| `assistant_audio`, `assistant_media` | Spoken audio and generated media of a turn, paired by `turnId`. |
|
|
788
864
|
| `project_switched` | The session's project changed. |
|
|
789
|
-
| `error` | An error text. |
|
|
865
|
+
| `error` | An error text. `contextOverflow: true` when the conversation did not fit the model's window even after compacting; a backup model with a window no larger is then skipped. |
|
|
790
866
|
| `turn_start`, `turn_end` | Bookkeeping around a turn. |
|
|
791
867
|
|
|
792
868
|
`400` when `agent` or `session` is missing or `before` is not a number.
|
|
@@ -894,7 +970,7 @@ All events:
|
|
|
894
970
|
| `memory` | After `agent` start: what recall put into the turn | `{count, topScore?, refs, fullText}` |
|
|
895
971
|
| `thinking` | The model's reasoning text | `{state: "delta"\|"final", text, truncated?}` |
|
|
896
972
|
| `chat` | The reply text | `{state: "delta"\|"final", text}` |
|
|
897
|
-
| `tool` | A tool is called, returns or fails | `{phase: "call"\|"result"\|"error", tool, summary?, details?, error?}` |
|
|
973
|
+
| `tool` | A tool is called, returns or fails | `{phase: "call"\|"result"\|"error", tool, callId, summary?, details?, error?}`. `callId` pairs a result with its call. |
|
|
898
974
|
| `engine_meta` | A side note of the engine or of somora | `{engine, itemType, label, summary?, payload}` |
|
|
899
975
|
| `model_fallback` | A backup model takes over the turn | `{requested, actual, reason, hops?}` |
|
|
900
976
|
| `turn_error` | The turn ended with an error | `{turnId?, message, engine}` |
|
|
@@ -904,7 +980,8 @@ All events:
|
|
|
904
980
|
| `project` | The session's project changed | `{from, to, via}` |
|
|
905
981
|
| `builder_state` | A builder session's mode, phase or plan file changed | `{mode, phase, planPath}` |
|
|
906
982
|
| `todo_updated` | A builder replaced its task list | `{todos: [{content, status, priority?}], by?}` |
|
|
907
|
-
| `
|
|
983
|
+
| `acceptance_updated` | A builder wrote its acceptance list, an item was reviewed, or the list became required or optional | `{items: [{id, requirement, status, evidence?, updatedAt, review?}], required, by?}`. `by` is the builder, `person` or the reviewing agent; absent when only `required` changed. |
|
|
984
|
+
| `question_asked` | An agent asks the person | `{questionId, question, header?, options, multiple, expiresAt, kind?, from?, async?, parts?, source?, details?}`. `kind: "permission"` and `from: "external"` mark an external agent asking to run something; each option's `description` is then its kind (`allow_once`, `reject_once`, …). `async: true` marks a question that does not wait (`expiresAt` is `0`); `parts` lists several questions asked at once, `source` is `ask_user`, or `codex` for Codex's own question tool. `details` is what the person decides on, in full (markdown), shown on the card. |
|
|
908
985
|
| `question_answered` | The open question was answered, replaced or ran out of time | `{questionId?, answered, choice?, by?}`. `by: "message"`: a question that does not wait, answered by writing something else. |
|
|
909
986
|
|
|
910
987
|
Details where the table is not enough:
|
|
@@ -977,12 +1054,12 @@ HTTPS the connection is also pinged (`sse.h2PingIntervalMs`,
|
|
|
977
1054
|
|---|---|
|
|
978
1055
|
| `text` | The message as it is kept: what a person typed, what an agent asked, what a trigger's prompt says, or the one-line statement of a wake-up. |
|
|
979
1056
|
| `ts` | Epoch ms. |
|
|
980
|
-
| `turnId` | The id from `POST /chat/send`. Match it to the bubble you drew. |
|
|
1057
|
+
| `turnId` | Live event only. The id from `POST /chat/send`. Match it to the bubble you drew. |
|
|
981
1058
|
| `origin` | Where the turn came from. See below. |
|
|
982
1059
|
| `input` | `{modality?: "text"\|"voice", source?: "stt"\|"realtime"}` when the turn was not typed. `stt` is dictation, `realtime` a sentence from a call. |
|
|
983
1060
|
| `steer`, `steer_id` | `steer: true` marks a message that went into the running turn `turnId`. `steer_id` matches the `steer_queued` event. |
|
|
984
1061
|
| `from_agent`, `from_session`, `agent_ask_call_id` | Older fields, derived from an `agent` origin. |
|
|
985
|
-
| `attachments` | `{hash, name, mime, size}` of the files sent with the message. |
|
|
1062
|
+
| `attachments` | Stored row only. `{hash, name, mime, size}` of the files sent with the message. |
|
|
986
1063
|
| `attachment_descriptions` | Stored row only. The vision worker's description of each attachment the model could not see, one string per file. |
|
|
987
1064
|
| `from_system` | Older field, derived from the origin: `sentinel`, `tmux`, `browser`, `voice`, `peer`, or for a wake its `about` (`a2a`, `subagent`, `job`, `system`). The shipped clients draw these as a divider, not as a bubble. |
|
|
988
1065
|
|
|
@@ -1033,12 +1110,17 @@ most notes have a readable `payload.text`.
|
|
|
1033
1110
|
| `thread_recreated` | The Codex thread was gone. A new one was started with the history replayed. |
|
|
1034
1111
|
| `tools_changed` | The agent's tool set changed, so a new Codex thread was started with the history replayed. |
|
|
1035
1112
|
| `mcp_server_renamed` | The engine session was rebuilt (label `session restarted`). |
|
|
1036
|
-
| `context_compacted` | The history was compacted: by somora before a turn (`payload.reason: "auto"`, with `contextBefore`, `contextAfter` and `contextWindow` in tokens), during a turn, after the backend refused the prompt (`"context_overflow"`), or by the engine itself (`"engine_side"`). A compaction by hand has engine `somora`, see below. |
|
|
1113
|
+
| `context_compacted` | The history was compacted: by somora before a turn (`payload.reason: "auto"`, with `contextBefore`, `contextAfter` and `contextWindow` in tokens; for a builder also `builderTarget`, `reachedTarget` and `freeTokens`), during a turn, after the backend refused the prompt (`"context_overflow"`), when the first request did not fit even trimmed and the turn starts over on the same model (`"context_budget"`), or by the engine itself (`"engine_side"`). A compaction by hand has engine `somora`, see below. |
|
|
1037
1114
|
| `context_trimmed` | The oldest tool results of the running turn were shortened to fit the window. The turn goes on. |
|
|
1038
1115
|
| `attachments_unsupported` | The engine cannot pass attachments on. |
|
|
1039
1116
|
| `session_model` | An agent switched this session's model (label `model switched`). |
|
|
1040
1117
|
| `voice_handover`, `voice_spoken` | A call was handed to or from another agent. What a call said out loud, in older sessions. |
|
|
1118
|
+
| `voice_call_record` | One realtime voice call (engine `voice`, label `call record`), written when the call ends and, for the part before a move, into the session it left. Off with `realtimeVoice.keepTranscript: false`. `payload` has `text` (one line: length, line count, reason), `startedAt`, `endedAt` (ms), `reason`, `voice` and `lines`: `{at, who, text}` with `at` in ms since the call started and `who` `caller`, `voice` or `event` (interruptions, questions to the agent, notices, errors). A `voice` line of an interrupted answer ends in ` (cut off)`. |
|
|
1041
1119
|
| `reasoning_effort_adjusted`, `sampling_dropped` | The backend refused a parameter and the turn was retried without it. |
|
|
1120
|
+
| `doom_loop_notice`, `doom_loop_stop` | The same tool calls three rounds in a row: the model was told to change course (label `loop noticed`). Five rounds: the turn was stopped (`loop stopped`). |
|
|
1121
|
+
| `budget_checkpoint` | A builder used 75 % of its turn budget and was told to save its progress and keep working. `payload` has `round`, `toolCalls`, `maxRounds` (`null` without a round cap) and `maxToolCallsPerTurn`. |
|
|
1122
|
+
| `open_tasks_notice` | A builder on openai-compatible wanted to end its turn with open items on its task list and was told to continue or to name the blocker (label `open tasks`). Also when acceptance items are open or the required list is missing. `payload` has `round`, `open` (task items), `acceptanceOpen`, `acceptanceMissing` (only when true) and `attempt` (1 or 2). On claude-cli, codex-cli and grok-cli the builder gets a follow-up turn instead: a `user_message` with `origin` `{kind: "wake", about: "system", cause: "open items"}`. |
|
|
1123
|
+
| `answer_cut_off` | A builder's answer was cut off by the output limit and it was told to continue where it stopped (label `answer cut off`). `payload` has `round` and `attempt` (1 or 2). |
|
|
1042
1124
|
|
|
1043
1125
|
An unknown `itemType` keeps its raw name as label.
|
|
1044
1126
|
|
|
@@ -1056,7 +1138,7 @@ curl -H "Authorization: Bearer $KEY" -N $BASE/activity/stream
|
|
|
1056
1138
|
|---|---|---|
|
|
1057
1139
|
| `status` | On connect | `{msg: "connected"}` |
|
|
1058
1140
|
| `heartbeat` | Every `sse.heartbeatMs` | The current time in ms |
|
|
1059
|
-
| `streaming` | A turn starts or ends on any session | `{agent, session, phase: "start"\|"end"}` |
|
|
1141
|
+
| `streaming` | A turn starts or ends on any session. Right after `status`, one `start` for every session already working. | `{agent, session, phase: "start"\|"end"}` |
|
|
1060
1142
|
| `turn` | Something a person should read arrived in a session | `{agent, session, unreadAt}` |
|
|
1061
1143
|
| `seen` | A client marked a session as seen | `{agent, session, seenAt}` |
|
|
1062
1144
|
|
|
@@ -1120,7 +1202,7 @@ The sessions of one agent.
|
|
|
1120
1202
|
|
|
1121
1203
|
| Field | Meaning |
|
|
1122
1204
|
|---|---|
|
|
1123
|
-
| `dreamCoverageTs`, `dreamLagEvents` | How far REM has read this session, and how many events it has not read yet. `null` when
|
|
1205
|
+
| `dreamCoverageTs`, `dreamLagEvents` | How far REM has read this session, and how many events it has not read yet. `dreamCoverageTs` is `null` when REM never ran; `dreamLagEvents` is always a number (then all of the session's events). |
|
|
1124
1206
|
| `unreadAt`, `seenAt` | Unread state, see `GET /activity/stream`. |
|
|
1125
1207
|
| `archivedAt`, `archiveReason` | Present on archived sessions. |
|
|
1126
1208
|
| `projectSlug` | Present when a project is pinned. |
|
|
@@ -1546,7 +1628,7 @@ every client edits the same way. Body:
|
|
|
1546
1628
|
|
|
1547
1629
|
Returns `{ok: true, gating}` with the rules now in `agent.yaml`. Only
|
|
1548
1630
|
the named entries change state. `400` for a wrong body, an unknown
|
|
1549
|
-
name, or a builder-only tool (`todo_write`, `plan_write`) for a chat
|
|
1631
|
+
name, or a builder-only tool (`todo_write`, `plan_write`, `acceptance_write`) for a chat
|
|
1550
1632
|
agent. `409` with `lockedBy: "dreams"` for a tool that
|
|
1551
1633
|
follows the dreams switch. `404` for an unknown agent. Clicks on one agent run
|
|
1552
1634
|
one after another, and each write keeps the previous `agent.yaml` as a
|
|
@@ -1672,13 +1754,15 @@ The outcome of one agent's question to another, by call id.
|
|
|
1672
1754
|
{ "call_id": "…", "state": "done", "target_agent": "<other-agent>",
|
|
1673
1755
|
"target_session": "20260906-172957_research", "started_at": 1788000000000,
|
|
1674
1756
|
"finished_at": 1788000042000, "response": "…", "outcome": "completed",
|
|
1675
|
-
"source": "registry" }
|
|
1757
|
+
"model": "<provider>/<model>", "source": "registry" }
|
|
1676
1758
|
```
|
|
1677
1759
|
|
|
1678
1760
|
| Field | Meaning |
|
|
1679
1761
|
|---|---|
|
|
1680
1762
|
| `state` | `queued`, `running`, `done` or `failed`. Read from history it can also be `unknown`: the turn never ended. |
|
|
1681
1763
|
| `response`, `outcome` | The reply and the turn's outcome, once done. |
|
|
1764
|
+
| `model` | `provider/model` that produced the reply. Read from history, it comes from the turn's end. |
|
|
1765
|
+
| `fallback` | `{requested, reason}` when a backup model answered instead of the one asked for. Absent otherwise. |
|
|
1682
1766
|
| `error` | Why it failed. `stopped by the user` and `removed from the queue by the user before it started` mean a person intervened. An agent should not retry those by itself. |
|
|
1683
1767
|
| `source` | `registry` (in memory) or `history` (read from the target session). |
|
|
1684
1768
|
|
|
@@ -1809,7 +1893,7 @@ that had already ended are skipped. `404` for an unknown id.
|
|
|
1809
1893
|
Agents of kind `builder` keep a mode, a phase, a plan file and a task
|
|
1810
1894
|
list per session, and at most one open question to the person. The web
|
|
1811
1895
|
client's task panel uses these routes, and so do the builder's own
|
|
1812
|
-
tools `todo_write` and `
|
|
1896
|
+
tools `todo_write`, `plan_write` and `acceptance_write`.
|
|
1813
1897
|
|
|
1814
1898
|
`POST …/ask` (the `ask_user` tool) serves every agent. A builder waits,
|
|
1815
1899
|
30 minutes by default. For a chat agent: in a turn nobody watches it
|
|
@@ -1826,6 +1910,11 @@ The builder state of a session.
|
|
|
1826
1910
|
"state": { "mode": "attended", "phase": "plan",
|
|
1827
1911
|
"planPath": "/home/me/code/acme/PLAN.md",
|
|
1828
1912
|
"todos": [ { "content": "Write the parser", "status": "pending" } ] },
|
|
1913
|
+
"acceptance": { "required": true,
|
|
1914
|
+
"items": [ { "id": "A01", "requirement": "A rejected result is never shown as completed",
|
|
1915
|
+
"status": "passed", "evidence": "npm test gate.test: rejected → failed",
|
|
1916
|
+
"updatedAt": 1789299998000 } ] },
|
|
1917
|
+
"writeAllow": [],
|
|
1829
1918
|
"question": null,
|
|
1830
1919
|
"turn": { "turnId": "…", "startedAt": 1789299991000, "toolCalls": 7,
|
|
1831
1920
|
"lastTool": "file_write", "lastToolAt": 1789299999000 } }
|
|
@@ -1834,19 +1923,24 @@ The builder state of a session.
|
|
|
1834
1923
|
| Field | Meaning |
|
|
1835
1924
|
|---|---|
|
|
1836
1925
|
| `state` | `{mode, phase, planPath, todos, orderer?}`, or `null` before the session's first turn. `mode` is `attended` or `unattended`, `phase` is `plan` or `build`. |
|
|
1926
|
+
| `acceptance` | `{items, required}`: the acceptance list (see below) and whether the session requires it. |
|
|
1927
|
+
| `writeAllow` | Folders the builder may write in besides the project: set by the orderer or by "Allow this folder for the session". |
|
|
1837
1928
|
| `question` | `{questionId, question, header?, options: [{label, description?}], multiple, askedAt, expiresAt}` or `null`. Also carries the question a builder raises before writing outside its project folder. |
|
|
1838
1929
|
| `turn` | Progress of the running turn, else `null`. |
|
|
1839
1930
|
|
|
1840
1931
|
### `PATCH /agents/:agent/sessions/:session/builder`
|
|
1841
1932
|
|
|
1842
|
-
Changes mode, phase or plan file. Sends `builder_state
|
|
1933
|
+
Changes mode, phase or plan file. Sends `builder_state`, and
|
|
1934
|
+
`acceptance_updated` when `acceptanceRequired` is in the body.
|
|
1843
1935
|
|
|
1844
1936
|
| Body field | Meaning |
|
|
1845
1937
|
|---|---|
|
|
1846
1938
|
| `mode` | `attended` or `unattended`. |
|
|
1847
1939
|
| `phase` | `plan` or `build`. |
|
|
1848
1940
|
| `planPath` | An absolute path, or `null` to clear it. |
|
|
1849
|
-
| `orderer` | `{agent, session?}`: the agent that handed the order over. Set by `builder_dispatch
|
|
1941
|
+
| `orderer` | `{agent, session?}`: the agent that handed the order over. Set by `builder_dispatch`, or else by the first agent that writes into the session. |
|
|
1942
|
+
| `acceptanceRequired` | `true` makes the acceptance list required for this session, `false` optional. The panel's list switch sends it. A message from another agent turns it on by itself (`agent_ask`, `builder_dispatch`, an A2A peer). |
|
|
1943
|
+
| `writeAllow` | Absolute folders the builder may also write in, added to those already allowed. At most 4 per request. Each must exist and be narrow: not `/`, not the home folder, not a folder holding the project, not inside somora's home. Needs a pinned project. Set by `builder_dispatch` `write_allow`. |
|
|
1850
1944
|
|
|
1851
1945
|
Returns `{agent, session, state}`. `400` for a value outside these.
|
|
1852
1946
|
|
|
@@ -1876,6 +1970,49 @@ Replaces the whole task list. Sends `todo_updated`.
|
|
|
1876
1970
|
|
|
1877
1971
|
Returns `{agent, session, todos}`.
|
|
1878
1972
|
|
|
1973
|
+
### `GET /agents/:agent/sessions/:session/acceptance`
|
|
1974
|
+
|
|
1975
|
+
The acceptance list: `{agent, session, items, required}`. Each item is
|
|
1976
|
+
`{id, requirement, status, evidence?, updatedAt, review?}`. `status` is
|
|
1977
|
+
`open`, `passed`, `failed` or `not_run`. `review` is `{verdict:
|
|
1978
|
+
"accepted" | "rejected", by, note?, at}`.
|
|
1979
|
+
|
|
1980
|
+
### `PUT /agents/:agent/sessions/:session/acceptance`
|
|
1981
|
+
|
|
1982
|
+
Writes the list. Used by `acceptance_write`, sends `acceptance_updated`.
|
|
1983
|
+
|
|
1984
|
+
| Body field | Meaning |
|
|
1985
|
+
|---|---|
|
|
1986
|
+
| `items` | `[{id, requirement?, status, evidence?}]`, at most 60. A new item needs `requirement`. |
|
|
1987
|
+
| `by_agent` | Who writes it. Another agent than the builder gets `403`. |
|
|
1988
|
+
|
|
1989
|
+
The answer is `{items, required, warnings}`. The merge keeps the list
|
|
1990
|
+
whole:
|
|
1991
|
+
|
|
1992
|
+
- an item left out stays,
|
|
1993
|
+
- an existing requirement keeps its first wording,
|
|
1994
|
+
- `accepted` or `rejected` as a status is refused,
|
|
1995
|
+
- a new status or new evidence clears the item's review,
|
|
1996
|
+
- when `required` is true, `passed` or `failed` without `evidence`, or
|
|
1997
|
+
`not_run` without the reason in `evidence`, is refused: the item keeps
|
|
1998
|
+
its status and evidence.
|
|
1999
|
+
- an item sent again with the same status and no `evidence` keeps its
|
|
2000
|
+
evidence and its review.
|
|
2001
|
+
|
|
2002
|
+
`warnings` names each of these. Without `required`, `passed` or
|
|
2003
|
+
`failed` without evidence is only a warning. `400` for a chat agent.
|
|
2004
|
+
|
|
2005
|
+
### `POST /agents/:agent/sessions/:session/acceptance/review`
|
|
2006
|
+
|
|
2007
|
+
Reviews one item. Sends `acceptance_updated`.
|
|
2008
|
+
|
|
2009
|
+
| Body field | Meaning |
|
|
2010
|
+
|---|---|
|
|
2011
|
+
| `id` | The item. `404` when the list has no such item. |
|
|
2012
|
+
| `verdict` | `accepted` or `rejected`. |
|
|
2013
|
+
| `note` | Optional, up to 1000 characters. |
|
|
2014
|
+
| `by_agent` | Optional. Without it the review is the person's (`by: "person"`). With it, it must be the session's orderer; the builder itself and any other agent get `403`. An item the person reviewed gets `409` until the builder sends new evidence. |
|
|
2015
|
+
|
|
1879
2016
|
### `PUT /agents/:agent/sessions/:session/plan`
|
|
1880
2017
|
|
|
1881
2018
|
Writes the session's plan file. Body `{content}`.
|
|
@@ -1903,6 +2040,7 @@ turn a person started does not block: it returns at once with
|
|
|
1903
2040
|
| `options` | yes | 2 to 6 of `{label, description?}`. |
|
|
1904
2041
|
| `header` | no | A short title, at most 40 characters. |
|
|
1905
2042
|
| `multiple` | no | `true` allows several answers. |
|
|
2043
|
+
| `details` | no | What the person decides on, in full (markdown, at most 8000 characters): the text to approve, the drafts to pick from. Shown on the card; blank is left out. |
|
|
1906
2044
|
| `timeout_ms` | no | Default 30 minutes for a builder, 10 for a chat agent; at most 4 hours. |
|
|
1907
2045
|
|
|
1908
2046
|
Returns `{answered, answers: string[], text?}`. A second question on
|
|
@@ -2416,7 +2554,9 @@ upload in `attachments` on `POST /chat/send` or `POST /chat/send-sync`.
|
|
|
2416
2554
|
### `POST /attachments`
|
|
2417
2555
|
|
|
2418
2556
|
Uploads one file as the raw request body. The file name goes into the
|
|
2419
|
-
`X-Somora-Filename` header, URL-encoded.
|
|
2557
|
+
`X-Somora-Filename` header, URL-encoded. An upload larger than the
|
|
2558
|
+
largest accepted file (50 MB, the size an image may have before it is
|
|
2559
|
+
scaled) is stopped while it streams, with `400`.
|
|
2420
2560
|
|
|
2421
2561
|
```bash
|
|
2422
2562
|
curl -H "Authorization: Bearer $KEY" -X POST $BASE/attachments \
|
|
@@ -2710,7 +2850,8 @@ route did not use is listed in `job.warnings` as `ignored: <field>`.
|
|
|
2710
2850
|
## Voice
|
|
2711
2851
|
|
|
2712
2852
|
Dictation and spoken replies. Each route answers `503` when its part,
|
|
2713
|
-
`stt` or `tts`, is not enabled in the config
|
|
2853
|
+
`stt` or `tts`, is not enabled in the config, except `GET /stt/config`
|
|
2854
|
+
and `GET /tts/config`, which answer `{enabled: false}`.
|
|
2714
2855
|
|
|
2715
2856
|
### `GET /stt/config`
|
|
2716
2857
|
|
|
@@ -2873,7 +3014,7 @@ Server to client:
|
|
|
2873
3014
|
| `{"type": "ready", "call", "rateHz": 24000}` | The call is up. |
|
|
2874
3015
|
| `{"type": "audio", "base64", "rateHz"}` | Speech to play. |
|
|
2875
3016
|
| `{"type": "state", "call"}` | The call's state changed. |
|
|
2876
|
-
| `{"type": "event", "event", "call"}` | Something happened. `event.kind` is `user_speech`, `user_transcript`, `model_speech`, `model_transcript`, `tool_call`, `interrupted`, `usage`, `closed` or `error
|
|
3017
|
+
| `{"type": "event", "event", "call"}` | Something happened. `event.kind` is `ready` (the provider session is up), `user_speech`, `user_transcript`, `model_speech`, `model_transcript`, `tool_call`, `interrupted`, `usage`, `notice` (`message`: a warning from the voice service, each once), `closed` or `error` (`message`, `fatal`). `model_transcript` carries `responseId` when the service names its answers. |
|
|
2877
3018
|
|
|
2878
3019
|
`call` is `{id, target, state, startedAt, consults, spokenTurns, handoverTo?, lastError?}`.
|
|
2879
3020
|
`state` is `connecting`, `listening`, `consulting`, `speaking` or
|
|
@@ -3415,6 +3556,8 @@ question that does not wait. That last kind carries `async: true` and
|
|
|
3415
3556
|
`expiresAt: 0`, and with several questions asked at once `parts`
|
|
3416
3557
|
(`[{question, header?, options, multiple}]`, the first repeated at the
|
|
3417
3558
|
top). It stays open between turns, after a reload and a restart.
|
|
3559
|
+
`details`, when the agent gave it, is what the person decides on, in
|
|
3560
|
+
full (markdown).
|
|
3418
3561
|
|
|
3419
3562
|
```json
|
|
3420
3563
|
{ "question": { "id": "…", "question": "claw asks for permission: exec: rm -rf /tmp/x",
|
|
@@ -3435,8 +3578,14 @@ A question that does not wait takes the same body, or `parts` with one
|
|
|
3435
3578
|
`{answers?, text?}` per question. The answer is sent as the person's
|
|
3436
3579
|
next message, the way `POST /chat/send` sends a typed one: the chosen
|
|
3437
3580
|
labels for one question, each question with its answer for several.
|
|
3438
|
-
|
|
3439
|
-
|
|
3581
|
+
`400` when nothing was chosen or typed.
|
|
3582
|
+
|
|
3583
|
+
While a turn of the session is running, usually the one that asked,
|
|
3584
|
+
the answer goes into that turn the way a steered message does (`POST /chat/send` with `steer:
|
|
3585
|
+
true`): every client gets `steer_queued`, and the response is
|
|
3586
|
+
`{ ok: true, sent: true, steered: true, steerId, turnId, text }` with
|
|
3587
|
+
the running turn's id. Otherwise it starts a turn of its own: `{ ok:
|
|
3588
|
+
true, sent: true, steered: false, turnId, text }`. Any message the person sends to the session with
|
|
3440
3589
|
`POST /chat/send` answers such a question too and removes it.
|
|
3441
3590
|
|
|
3442
3591
|
## External MCP servers
|