tomo-ai 0.6.1 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +85 -4
- package/defaults/skills/system/CONFIG.md +54 -4
- package/defaults/skills/system/SKILL.md +8 -3
- package/dist/agent/live-session.d.ts +1 -0
- package/dist/agent/live-session.d.ts.map +1 -1
- package/dist/agent/live-session.js +37 -9
- package/dist/agent/live-session.js.map +1 -1
- package/dist/agent/sdk-options.d.ts +19 -12
- package/dist/agent/sdk-options.d.ts.map +1 -1
- package/dist/agent/sdk-options.js +69 -9
- package/dist/agent/sdk-options.js.map +1 -1
- package/dist/agent.d.ts +6 -2
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +148 -20
- package/dist/agent.js.map +1 -1
- package/dist/channels/telegram.js +1 -1
- package/dist/channels/telegram.js.map +1 -1
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js +4 -0
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/config/litellm.d.ts +2 -0
- package/dist/cli/config/litellm.d.ts.map +1 -0
- package/dist/cli/config/litellm.js +108 -0
- package/dist/cli/config/litellm.js.map +1 -0
- package/dist/cli/config/model-picker.d.ts +2 -0
- package/dist/cli/config/model-picker.d.ts.map +1 -0
- package/dist/cli/config/model-picker.js +51 -0
- package/dist/cli/config/model-picker.js.map +1 -0
- package/dist/cli/config/model.d.ts.map +1 -1
- package/dist/cli/config/model.js +5 -11
- package/dist/cli/config/model.js.map +1 -1
- package/dist/cli/config/sessions.d.ts.map +1 -1
- package/dist/cli/config/sessions.js +4 -10
- package/dist/cli/config/sessions.js.map +1 -1
- package/dist/cli/config/shared.d.ts +2 -1
- package/dist/cli/config/shared.d.ts.map +1 -1
- package/dist/cli/config/shared.js +3 -13
- package/dist/cli/config/shared.js.map +1 -1
- package/dist/cli/init.d.ts.map +1 -1
- package/dist/cli/init.js +3 -1
- package/dist/cli/init.js.map +1 -1
- package/dist/config.d.ts +16 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -1
- package/dist/config.js.map +1 -1
- package/dist/litellm.d.ts +12 -0
- package/dist/litellm.d.ts.map +1 -0
- package/dist/litellm.js +28 -0
- package/dist/litellm.js.map +1 -0
- package/dist/mcp/external-config.d.ts +18 -0
- package/dist/mcp/external-config.d.ts.map +1 -0
- package/dist/mcp/external-config.js +121 -0
- package/dist/mcp/external-config.js.map +1 -0
- package/dist/mcp/oauth.d.ts +45 -0
- package/dist/mcp/oauth.d.ts.map +1 -0
- package/dist/mcp/oauth.js +366 -0
- package/dist/mcp/oauth.js.map +1 -0
- package/dist/mcp/pet-scheduler.d.ts.map +1 -1
- package/dist/mcp/pet-scheduler.js +7 -0
- package/dist/mcp/pet-scheduler.js.map +1 -1
- package/dist/mcp/pet-store.d.ts +13 -1
- package/dist/mcp/pet-store.d.ts.map +1 -1
- package/dist/mcp/pet-store.js +140 -16
- package/dist/mcp/pet-store.js.map +1 -1
- package/dist/mcp/pet-tools.d.ts.map +1 -1
- package/dist/mcp/pet-tools.js +67 -4
- package/dist/mcp/pet-tools.js.map +1 -1
- package/dist/models.d.ts +7 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +45 -0
- package/dist/models.js.map +1 -0
- package/dist/sessions/repair.d.ts +13 -0
- package/dist/sessions/repair.d.ts.map +1 -0
- package/dist/sessions/repair.js +171 -0
- package/dist/sessions/repair.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0 (2026-06-03)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- **LiteLLM gateway / ChatGPT subscription support (experimental)** (#126). Tomo still runs on the Claude Agent SDK, but `~/.tomo/config.json` can now include a `litellm` gateway block that points the SDK child process at a LiteLLM proxy via `ANTHROPIC_BASE_URL` / `ANTHROPIC_API_KEY` (also overridable with `TOMO_LITELLM_BASE_URL` / `_API_KEY` / `_MODE`), keeping sessions, memory, workspace, MCP tools, and LCM behavior intact while routing model calls through the proxy. The config UI offers a first-class `chatgpt-subscription` mode (including the tested `chatgpt/gpt-5.5` path and proxy setup notes) alongside generic Anthropic-compatible proxies; `/model` and the config model pickers accept LiteLLM `provider/model` names, and `/status` shows the active gateway/mode. Model alias/label resolution moved out of the `Agent` class into `src/models.ts`, and `buildSdkEnv` (`src/agent/sdk-options.ts`) composes the gateway env cleanly with the existing `DISABLE_AUTO_COMPACT` logic. Two guardrails added during review: `/model` and the config picker reject/hide LiteLLM model names when no gateway is configured (instead of silently saving an override the real Anthropic endpoint can't serve), and routing is mode-aware — an `anthropic-compatible` proxy routes all models, while a `chatgpt-subscription` proxy routes only LiteLLM models and lets Claude-model sessions hit Anthropic directly (so an Opus request never lands on a chatgpt-only proxy). The current model is now surfaced in the system prompt.
|
|
8
|
+
- **Virtual pet growth & recovery overhaul** (#124). New pets now start as an actual `egg` and hatch into `baby` after 1 day, with slower stage gates: `child` at 7 days, `teen` at 14, `adult` at 30, and `elder` at 180. Care quality — not just raw affection — now drives evolution: a new `care_mistakes` counter feeds an `effective_affection` value (each mistake subtracts 5) that evolution checks read instead of raw affection. When health reaches 0 the pet enters a recovery state where it can't play or evolve until health climbs back to 25, and feed-based affection farming is blocked (food above 90 hunger is ignored; feed affection is only granted below 50 hunger and never while recovering). Recovery state, effective affection, and care mistakes are surfaced through `pet_status`.
|
|
9
|
+
|
|
10
|
+
### Bug fixes
|
|
11
|
+
|
|
12
|
+
- **Prevent thinking blocks from leaking to chat** (#128). Tomo streamed SDK partial text deltas straight to Telegram/iMessage without tracking the active content-block type, so thinking-like content exposed through a text-shaped partial event could be delivered as public reply text. Adaptive-thinking display is now omitted for supported Claude Sonnet/Opus models, live streaming forwards only deltas from active `text` blocks, and final assistant aggregation accepts explicit `type: "text"` blocks only — with regression coverage for thinking-block leakage.
|
|
13
|
+
|
|
14
|
+
### Other
|
|
15
|
+
|
|
16
|
+
- Bump `@anthropic-ai/claude-agent-sdk` 0.3.150 → 0.3.158 → 0.3.161 (#121, #127).
|
|
17
|
+
- Bump `@clack/prompts` 1.4.0 → 1.5.0 (#122).
|
|
18
|
+
- npm audit lockfile remediation: resolve vulnerable transitive packages to patched versions (#125).
|
|
19
|
+
- Bump dev-dependencies group (#120): `eslint` 10.4.0 → 10.4.1, `typescript-eslint` 8.59.4 → 8.60.0.
|
|
20
|
+
|
|
21
|
+
## 0.7.0 (2026-05-29)
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
- **External MCP server support with harness-managed OAuth** (#114, #115). Users can declare additional MCP servers in `~/.tomo/config.json` under `mcpServers` (also accepted as `mcp.servers`) for stdio, HTTP, streamable HTTP, and SSE transports; optional `mcpAllowedTools` restricts the surface, otherwise all configured tools are exposed. For OAuth-protected remotes (GitHub Copilot MCP, Robinhood MCP, etc.), a per-server `oauth` block drives authorization-code + PKCE with dynamic client registration and a localhost callback; the harness refreshes near-expiry tokens and injects `Authorization: Bearer …` into HTTP/SSE headers at session-build time. Tokens live in `~/.tomo/workspace/secrets/mcp-oauth.json` (mode `0600`), kept separate from `keychain.json` so keychain rewrites don't wipe MCP auth, and never reach the agent. Auth failures are isolated per server — a broken server is omitted with a one-line notice and the session still starts. Discovery follows RFC 9728 `WWW-Authenticate` challenges with a `/.well-known/oauth-protected-resource/...` fallback for POST-only endpoints like Robinhood MCP. The bundled `tomo-system` skill now tells the agent that user-configured tools appear as `mcp__<server>__<tool>` and that it should never ask users for tokens.
|
|
26
|
+
- **1M context model options** (#116). New `/model` aliases `sonnet-1m` and `opus-1m` map to `claude-sonnet-4-6[1m]` and `claude-opus-4-8[1m]`. `claude-sonnet-4-6[1m]` is now the default for new/fallback configs. Init/config UI labels, the Telegram command description, README, and `tomo-system/CONFIG.md` are updated to match.
|
|
27
|
+
|
|
3
28
|
## 0.6.1 (2026-05-28)
|
|
4
29
|
|
|
5
30
|
### Other
|
package/README.md
CHANGED
|
@@ -32,7 +32,7 @@ That's it. Open Telegram and message your bot.
|
|
|
32
32
|
## Requirements
|
|
33
33
|
|
|
34
34
|
- Node.js 22+
|
|
35
|
-
- [Claude Code](https://claude.com/claude-code) installed
|
|
35
|
+
- [Claude Code](https://claude.com/claude-code) installed. Authenticate Claude Code for direct Claude models, or configure a LiteLLM gateway for non-Claude backends.
|
|
36
36
|
- At least one channel:
|
|
37
37
|
- **Telegram** — bot token from [@BotFather](https://t.me/BotFather)
|
|
38
38
|
- **iMessage** — [BlueBubbles](https://bluebubbles.app) server running on a Mac with iMessage signed in
|
|
@@ -41,7 +41,7 @@ That's it. Open Telegram and message your bot.
|
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
43
|
tomo init # First-time setup
|
|
44
|
-
tomo config # Interactive settings (model, channels, identities, groups)
|
|
44
|
+
tomo config # Interactive settings (model, LiteLLM, channels, identities, groups)
|
|
45
45
|
tomo start # Start in background (daemon)
|
|
46
46
|
tomo start -f # Start in foreground (for dev)
|
|
47
47
|
tomo stop # Stop the daemon
|
|
@@ -58,7 +58,7 @@ tomo sessions clear # Reset all sessions
|
|
|
58
58
|
| Command | Description |
|
|
59
59
|
|---------|-------------|
|
|
60
60
|
| `/new` | Start a new conversation (resets session) |
|
|
61
|
-
| `/model` | Switch model (
|
|
61
|
+
| `/model` | Switch model (Claude aliases or LiteLLM `provider/model` names) |
|
|
62
62
|
| `/restore` | Restore `config.json` from `config.json.bak` and restart |
|
|
63
63
|
| `/status` | Show session info (model, channel, message count) |
|
|
64
64
|
|
|
@@ -119,6 +119,46 @@ Tomo has access to Claude's built-in tools:
|
|
|
119
119
|
| `send_message` (MCP) | Proactively send a message to another session/identity |
|
|
120
120
|
| `list_sessions` (MCP) | List active identities and group sessions |
|
|
121
121
|
|
|
122
|
+
### External MCP Servers
|
|
123
|
+
|
|
124
|
+
Add remote or local MCP servers directly to `~/.tomo/config.json` under `mcpServers`. Tomo passes them through to the Claude Agent SDK and, by default, auto-allows all tools from each configured server with `mcp__<server>__*`.
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"mcpServers": {
|
|
129
|
+
"docs": {
|
|
130
|
+
"type": "http",
|
|
131
|
+
"url": "https://code.claude.com/docs/mcp"
|
|
132
|
+
},
|
|
133
|
+
"github": {
|
|
134
|
+
"type": "sse",
|
|
135
|
+
"url": "https://api.example.com/mcp/sse",
|
|
136
|
+
"headers": {
|
|
137
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"github-copilot": {
|
|
141
|
+
"type": "http",
|
|
142
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
143
|
+
"oauth": {
|
|
144
|
+
"scopes": ["read:user"],
|
|
145
|
+
"tokenStoreKey": "github-copilot"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"filesystem": {
|
|
149
|
+
"command": "npx",
|
|
150
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${HOME}/Projects"]
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Use `type: "http"` for streamable HTTP, `type: "sse"` for SSE, or omit `type` for stdio servers. Environment variables in `url`, `headers`, `env`, and `args` are expanded at runtime. To restrict auto-approval, set top-level `mcpAllowedTools`, for example `["mcp__github__list_issues"]`.
|
|
157
|
+
|
|
158
|
+
Remote HTTP/SSE servers can also use harness-managed OAuth by adding an `oauth` block. Tomo discovers the authorization server from the MCP server's RFC 9728 `WWW-Authenticate` challenge unless `authorizationServer` is set explicitly, uses authorization-code + PKCE, registers a dynamic client when needed, stores tokens in `~/.tomo/workspace/secrets/mcp-oauth.json` with mode `0600`, silently refreshes near-expiry tokens, and injects `Authorization: Bearer <token>` into MCP headers. The agent never sees the tokens.
|
|
159
|
+
|
|
160
|
+
If browser login is needed, Tomo forwards the authorize URL to your private chat and waits for the localhost callback before starting the agent session.
|
|
161
|
+
|
|
122
162
|
### Scheduled Tasks
|
|
123
163
|
|
|
124
164
|
Tomo can create scheduled tasks on its own — just ask "remind me in 30 minutes to stretch" or "check the weather every morning at 9am." Supports one-shot reminders, recurring intervals, and cron expressions.
|
|
@@ -177,7 +217,12 @@ Run `tomo config` for interactive setup, or edit `~/.tomo/config.json` directly:
|
|
|
177
217
|
"replyPolicy": "last-active"
|
|
178
218
|
}
|
|
179
219
|
],
|
|
180
|
-
"model": "claude-sonnet-4-6",
|
|
220
|
+
"model": "claude-sonnet-4-6[1m]",
|
|
221
|
+
"litellm": {
|
|
222
|
+
"mode": "chatgpt-subscription",
|
|
223
|
+
"baseUrl": "http://localhost:4000",
|
|
224
|
+
"apiKey": "sk-tomo-local"
|
|
225
|
+
},
|
|
181
226
|
"maxTurns": 50,
|
|
182
227
|
"saveInboundImages": true,
|
|
183
228
|
"groupSecret": "tomo-xxxxxxxx",
|
|
@@ -196,10 +241,46 @@ Environment variables override config file values:
|
|
|
196
241
|
| `TELEGRAM_BOT_TOKEN` | Override Telegram token |
|
|
197
242
|
| `IMESSAGE_URL` | Override BlueBubbles URL |
|
|
198
243
|
| `CLAUDE_MODEL` | Override model |
|
|
244
|
+
| `TOMO_LITELLM_BASE_URL` | Route Claude Agent SDK model calls through a LiteLLM proxy |
|
|
245
|
+
| `TOMO_LITELLM_API_KEY` | API key sent to the LiteLLM proxy as `ANTHROPIC_API_KEY` |
|
|
246
|
+
| `TOMO_LITELLM_MODE` | Optional LiteLLM mode: `anthropic-compatible` or `chatgpt-subscription` |
|
|
199
247
|
| `TOMO_WORKSPACE` | Override workspace directory |
|
|
200
248
|
| `TOMO_MAX_TURNS` | Override per-turn tool-use ceiling (default: `50`) |
|
|
201
249
|
| `LOG_LEVEL` | Log level (default: `debug`) |
|
|
202
250
|
|
|
251
|
+
### LiteLLM / ChatGPT Subscription Models
|
|
252
|
+
|
|
253
|
+
Tomo still runs through Claude Agent SDK, but you can point the SDK at a local LiteLLM proxy and select a LiteLLM model name such as `chatgpt/gpt-5.5`. This keeps Tomo's Claude SDK sessions, memory, workspace, MCP tools, and LCM behavior while LiteLLM translates Anthropic `/v1/messages` streaming calls to the ChatGPT subscription backend.
|
|
254
|
+
|
|
255
|
+
```yaml
|
|
256
|
+
# ~/litellm-chatgpt.yaml
|
|
257
|
+
environment_variables:
|
|
258
|
+
CHATGPT_DEFAULT_INSTRUCTIONS: >-
|
|
259
|
+
Follow the instructions supplied in this request.
|
|
260
|
+
|
|
261
|
+
model_list:
|
|
262
|
+
- model_name: chatgpt/gpt-5.5
|
|
263
|
+
model_info:
|
|
264
|
+
mode: responses
|
|
265
|
+
litellm_params:
|
|
266
|
+
model: chatgpt/gpt-5.5
|
|
267
|
+
|
|
268
|
+
litellm_settings:
|
|
269
|
+
drop_params: true
|
|
270
|
+
|
|
271
|
+
general_settings:
|
|
272
|
+
master_key: sk-tomo-local
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
litellm --config ~/litellm-chatgpt.yaml
|
|
277
|
+
tomo config # LiteLLM gateway -> ChatGPT subscription
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
Then set the default model to `chatgpt/gpt-5.5` from `tomo config`, or use `/model chatgpt/gpt-5.5` in a chat. LiteLLM owns the ChatGPT OAuth device flow and token storage; Tomo only sends Anthropic-compatible requests to the local proxy.
|
|
281
|
+
|
|
282
|
+
If LiteLLM returns `System messages are not allowed`, use a LiteLLM build that includes ChatGPT system-role normalization. If non-streaming curl checks fail while streaming `/v1/messages` works, that is still compatible with Tomo because Claude Agent SDK uses streaming.
|
|
283
|
+
|
|
203
284
|
## Development
|
|
204
285
|
|
|
205
286
|
```bash
|
|
@@ -8,7 +8,7 @@ Before direct edits, copy `~/.tomo/config.json` to `~/.tomo/config.json.bak`. Ch
|
|
|
8
8
|
|
|
9
9
|
```json
|
|
10
10
|
{
|
|
11
|
-
"model": "claude-sonnet-4-6",
|
|
11
|
+
"model": "claude-sonnet-4-6[1m]",
|
|
12
12
|
"city": "Seattle",
|
|
13
13
|
"continuity": false,
|
|
14
14
|
"groupSecret": "tomo-a1b2c3d4",
|
|
@@ -36,9 +36,28 @@ Before direct edits, copy `~/.tomo/config.json` to `~/.tomo/config.json.bak`. Ch
|
|
|
36
36
|
}
|
|
37
37
|
],
|
|
38
38
|
"sessionModelOverrides": {
|
|
39
|
-
"dm:alice": "claude-opus-4-8"
|
|
39
|
+
"dm:alice": "claude-opus-4-8[1m]"
|
|
40
|
+
},
|
|
41
|
+
"litellm": {
|
|
42
|
+
"mode": "chatgpt-subscription",
|
|
43
|
+
"baseUrl": "http://localhost:4000",
|
|
44
|
+
"apiKey": "sk-tomo-local"
|
|
40
45
|
},
|
|
41
46
|
"maxTurns": 50,
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"github-copilot": {
|
|
49
|
+
"type": "http",
|
|
50
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
51
|
+
"oauth": {
|
|
52
|
+
"scopes": ["read:user"],
|
|
53
|
+
"tokenStoreKey": "github-copilot"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"filesystem": {
|
|
57
|
+
"command": "npx",
|
|
58
|
+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "${HOME}/Projects"]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
42
61
|
"lcm": {
|
|
43
62
|
"nudgeAtPct": 70,
|
|
44
63
|
"nudgeResetPct": 60,
|
|
@@ -52,7 +71,7 @@ Before direct edits, copy `~/.tomo/config.json` to `~/.tomo/config.json.bak`. Ch
|
|
|
52
71
|
|
|
53
72
|
| Field | Type | Allowed values / notes |
|
|
54
73
|
|---|---|---|
|
|
55
|
-
| `model` | string |
|
|
74
|
+
| `model` | string | Claude model IDs/aliases, or a LiteLLM `provider/model` name such as `chatgpt/gpt-5.5`. Default model for every session. |
|
|
56
75
|
| `city` | string \| null | Any city name (e.g. `"Seattle"`). Used for weather in continuity pings. `null` or missing = no weather. |
|
|
57
76
|
| `continuity` | boolean | `true` / `false`. Enables periodic proactive heartbeats. Off by default. |
|
|
58
77
|
| `groupSecret` | string \| null | Passphrase users send in a group chat to activate Tomo there. `null` disables group chats entirely. |
|
|
@@ -67,14 +86,45 @@ Before direct edits, copy `~/.tomo/config.json` to `~/.tomo/config.json.bak`. Ch
|
|
|
67
86
|
| `identities[].channels` | object | `{ channelName: chatId }` — maps each channel the identity uses to its chatId. |
|
|
68
87
|
| `identities[].replyPolicy` | string | `"last-active"` (reply on whichever channel the identity last messaged from) or a fixed channel name like `"telegram"` / `"imessage"` (always reply there). |
|
|
69
88
|
| `sessionModelOverrides` | object | `{ sessionKey: modelId }` — per-session model override, takes precedence over top-level `model`. Keys are session keys (`dm:alice`, `telegram:12345`, etc.). Written by `/model <name>` for the current chat and by the `tomo config` Sessions menu. |
|
|
89
|
+
| `litellm.mode` | string | Optional mode label. `"anthropic-compatible"` (default) is a generic proxy; `"chatgpt-subscription"` is the tested OpenAI/ChatGPT subscription path through LiteLLM. Also settable with `TOMO_LITELLM_MODE`. |
|
|
90
|
+
| `litellm.baseUrl` | string | Optional LiteLLM proxy base URL, e.g. `http://localhost:4000`. When set, Tomo still uses Claude Agent SDK but sends SDK model calls to the proxy via `ANTHROPIC_BASE_URL`. |
|
|
91
|
+
| `litellm.apiKey` | string | LiteLLM proxy key sent as `ANTHROPIC_API_KEY`. This is the proxy key, not an Anthropic key. For ChatGPT subscription models, LiteLLM owns the OAuth device flow and token storage. |
|
|
70
92
|
| `maxTurns` | number | Max agent turns per single user message (one turn ≈ one tool-use round). Default `50`. Raise if you see "max turns exceeded" on long tool chains. |
|
|
93
|
+
| `mcpServers` | object | External MCP servers keyed by server name. Supports stdio (`command`, `args`, `env`), HTTP (`type: "http"`, `url`, `headers`), and SSE (`type: "sse"`, `url`, `headers`). Environment variables like `${HOME}` expand in `url`, `headers`, `env`, and `args`. |
|
|
94
|
+
| `mcpServers.<name>.oauth` | object | Optional harness-managed OAuth for HTTP/SSE MCP servers. Supports `authorizationServer` (optional; omitted = discover from the MCP server), `clientId` (optional if dynamic registration is available), `scopes`, `tokenStoreKey`, `redirectUri`, and `clientName`. Tokens are stored outside agent context in `workspace/secrets/mcp-oauth.json` (`0600`). |
|
|
95
|
+
| `mcpAllowedTools` | string[] | Auto-allowed external MCP tools. If omitted, Tomo defaults to `mcp__<server>__*` for every configured external server. Set this to narrow tool access, e.g. `["mcp__github__list_issues"]`. |
|
|
71
96
|
| `lcm.nudgeAtPct` | number | Context-usage % at which the harness nudges the agent to run `tomo lcm daily`. Default `70`. Lower = compact earlier and more often. |
|
|
72
97
|
| `lcm.nudgeResetPct` | number | Hysteresis reset threshold — the "already nudged" flag clears once usage drops below this %. Default `60`. Must be less than `nudgeAtPct`; invalid values fall back to defaults. |
|
|
73
98
|
| `lcm.groupCompactStyle` | string | `"sdk"` (default) or `"lcm"`. `"sdk"` lets the SDK auto-compact group sessions; `"lcm"` opts groups into the same hierarchical LCM flow as DMs (disables SDK auto-compact and fires all three harness nudges: 70% daily, 80% safety net, and the periodic rollup runner). DMs always use LCM regardless. |
|
|
74
99
|
| `lcm.dailyFreshTail` | number | Number of most-recent raw user/assistant events kept outside today's daily rollup so mid-day compacts don't wipe warm short-term texture. Default `32`. Counts SDK events (one tool round = multiple events), not user-typed messages. Set to `0` to compact every event into today's block. Past days are always compacted in full regardless of this value. |
|
|
75
100
|
|
|
101
|
+
## ChatGPT subscription via LiteLLM
|
|
102
|
+
|
|
103
|
+
For `litellm.mode: "chatgpt-subscription"`, the matching LiteLLM proxy config should include:
|
|
104
|
+
|
|
105
|
+
```yaml
|
|
106
|
+
environment_variables:
|
|
107
|
+
CHATGPT_DEFAULT_INSTRUCTIONS: >-
|
|
108
|
+
Follow the instructions supplied in this request.
|
|
109
|
+
|
|
110
|
+
model_list:
|
|
111
|
+
- model_name: chatgpt/gpt-5.5
|
|
112
|
+
model_info:
|
|
113
|
+
mode: responses
|
|
114
|
+
litellm_params:
|
|
115
|
+
model: chatgpt/gpt-5.5
|
|
116
|
+
|
|
117
|
+
litellm_settings:
|
|
118
|
+
drop_params: true
|
|
119
|
+
|
|
120
|
+
general_settings:
|
|
121
|
+
master_key: sk-tomo-local
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Start it with `litellm --config ~/litellm-chatgpt.yaml`, then set Tomo's model to `chatgpt/gpt-5.5`. If LiteLLM rejects system messages, use a build with ChatGPT system-role normalization. Tomo uses streaming Anthropic `/v1/messages`, so non-streaming LiteLLM test requests can still fail while Tomo works.
|
|
125
|
+
|
|
76
126
|
## Requirements and overrides
|
|
77
127
|
|
|
78
128
|
- **At least one channel must be configured** — either `channels.telegram.token` or `channels.imessage.url`. Startup fails otherwise.
|
|
79
|
-
- **Env vars override file values** where they exist: `TELEGRAM_BOT_TOKEN`, `IMESSAGE_URL`, `IMESSAGE_PASSWORD`, `IMESSAGE_WEBHOOK_PORT`, `CLAUDE_MODEL`, `TOMO_CITY`, `TOMO_CONTINUITY`, `TOMO_WORKSPACE`, `SESSIONS_DIR`, `HISTORY_LIMIT`, `TOMO_MAX_TURNS`.
|
|
129
|
+
- **Env vars override file values** where they exist: `TELEGRAM_BOT_TOKEN`, `IMESSAGE_URL`, `IMESSAGE_PASSWORD`, `IMESSAGE_WEBHOOK_PORT`, `CLAUDE_MODEL`, `TOMO_LITELLM_BASE_URL`, `TOMO_LITELLM_API_KEY`, `TOMO_LITELLM_MODE`, `TOMO_CITY`, `TOMO_CONTINUITY`, `TOMO_WORKSPACE`, `SESSIONS_DIR`, `HISTORY_LIMIT`, `TOMO_MAX_TURNS`.
|
|
80
130
|
- `workspaceDir`, `sessionsDir`, `historyLimit` are env-only — they're not read from the JSON file.
|
|
@@ -29,7 +29,7 @@ Session stats show:
|
|
|
29
29
|
|
|
30
30
|
**Note:** Context stats come from the SDK API and reflect the state at the end of the *previous* query. After compacting or other changes, you need to wait for a new query to complete before the numbers update.
|
|
31
31
|
|
|
32
|
-
Per-session model overrides live in `sessionModelOverrides` in `~/.tomo/config.json`. Users can set them from chat with `/model <name>`; Tomo persists the override for the current session, closes the live SDK process, and uses the selected model on the next turn. `tomo config` can also set or clear model overrides from the Sessions menu.
|
|
32
|
+
Per-session model overrides live in `sessionModelOverrides` in `~/.tomo/config.json`. Users can set them from chat with `/model <name>`; Tomo persists the override for the current session, closes the live SDK process, and uses the selected model on the next turn. Claude aliases and LiteLLM provider/model names such as `chatgpt/gpt-5.5` are accepted. `tomo config` can also set or clear model overrides from the Sessions menu.
|
|
33
33
|
|
|
34
34
|
When context crosses the nudge threshold (default 70%, set via `lcm.nudgeAtPct` in config.json), the harness sends a system message asking you to run `tomo lcm daily` — see the `tomo-lcm` skill. A second nudge at 80% asks you to use the `lcm compact` skill before the next user message. A periodic rollup runner also nudges you when daily/weekly/monthly/yearly blocks are due. Group sessions default to SDK auto-compact instead (override with `lcm.groupCompactStyle: "lcm"` to enroll groups in all three nudges).
|
|
35
35
|
|
|
@@ -49,7 +49,7 @@ The `tomo cron list / add / remove` CLI is still here for human debugging (audit
|
|
|
49
49
|
|
|
50
50
|
| Path | Purpose |
|
|
51
51
|
|------|---------|
|
|
52
|
-
| `~/.tomo/config.json` | Configuration (channels, identities, model, session model overrides) |
|
|
52
|
+
| `~/.tomo/config.json` | Configuration (channels, identities, model, LiteLLM gateway, session model overrides) |
|
|
53
53
|
| `~/.tomo/workspace/` | Agent working directory (cwd) |
|
|
54
54
|
| `~/.tomo/workspace/memory/` | Persistent memory files |
|
|
55
55
|
| `~/.tomo/workspace/memory/MEMORY.md` | Memory index (loaded every conversation) |
|
|
@@ -63,7 +63,7 @@ The `tomo cron list / add / remove` CLI is still here for human debugging (audit
|
|
|
63
63
|
|
|
64
64
|
## Config file
|
|
65
65
|
|
|
66
|
-
`~/.tomo/config.json` holds model, channels, identities, allowlists, session model overrides, and other settings. Prefer editing via `tomo config`; for the full field list, example JSON, and env-var overrides see [CONFIG.md](CONFIG.md). Manual edits require `tomo restart` to take effect; `/model <name>` persists and applies the current session override without a restart.
|
|
66
|
+
`~/.tomo/config.json` holds model, channels, identities, allowlists, LiteLLM gateway settings, session model overrides, and other settings. Prefer editing via `tomo config`; for the full field list, example JSON, ChatGPT subscription LiteLLM config, and env-var overrides see [CONFIG.md](CONFIG.md). Manual edits require `tomo restart` to take effect; `/model <name>` persists and applies the current session override without a restart.
|
|
67
67
|
|
|
68
68
|
Before changing `~/.tomo/config.json` directly, copy the current file to `~/.tomo/config.json.bak`, then write the updated config. If the new config breaks Tomo while the harness is still reachable, the user can send `/restore` to copy `config.json.bak` back to `config.json` and restart.
|
|
69
69
|
|
|
@@ -107,6 +107,11 @@ In-process MCP tools let you message outside the current conversation:
|
|
|
107
107
|
|
|
108
108
|
Pass identity name (`"alice"`) or session key (`"telegram:-1001234567"`) as `target`. Call `list_sessions` first if unsure. Tool result lines (with `is_error` flag) appear in `tomo logs` immediately after the corresponding tool call.
|
|
109
109
|
|
|
110
|
+
### External MCP tools
|
|
111
|
+
Users may configure additional MCP servers in `~/.tomo/config.json`; their tools appear as `mcp__<server>__<tool>`. Use them normally when relevant.
|
|
112
|
+
|
|
113
|
+
OAuth/token handling is harness-managed. Never ask the user for bearer tokens, OAuth codes, refresh tokens, or MCP auth headers. If a configured MCP server needs login, Tomo sends the user a private login link and injects tokens outside your context. If a server is unavailable, continue with other tools and explain the limitation only if it affects the answer.
|
|
114
|
+
|
|
110
115
|
## Skills
|
|
111
116
|
|
|
112
117
|
### Built-in skills (`tomo-*`)
|
|
@@ -42,6 +42,7 @@ export declare class LiveSession {
|
|
|
42
42
|
private sessionKey;
|
|
43
43
|
private turnBudget;
|
|
44
44
|
private pendingToolNames;
|
|
45
|
+
private activeStreamBlockTypes;
|
|
45
46
|
constructor(options: ReturnType<typeof sdkOptions>, sessionKey?: string, turnBudget?: TurnBudget);
|
|
46
47
|
private messageGenerator;
|
|
47
48
|
private consumeEvents;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-session.d.ts","sourceRoot":"","sources":["../../src/agent/live-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAmB,MAAM,gCAAgC,CAAC;AAEzG,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAErF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC;;;;;;OAMG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,OAAO,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACvD;
|
|
1
|
+
{"version":3,"file":"live-session.d.ts","sourceRoot":"","sources":["../../src/agent/live-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,cAAc,EAAmB,MAAM,gCAAgC,CAAC;AAEzG,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAErF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,CAAC,IAAI,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aAAa;YAeb,WAAW;YAyIX,eAAe;IA6CvB,IAAI,CACR,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,EAC/B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,EACnD,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,EACxD,SAAS,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GACxE,OAAO,CAAC,MAAM,CAAC;IA2DlB,YAAY,IAAI,MAAM,GAAG,IAAI;IAI7B,OAAO,IAAI,OAAO;IAIlB,KAAK,IAAI,IAAI;CAId"}
|
|
@@ -40,6 +40,15 @@ function summarizeToolInput(name, input) {
|
|
|
40
40
|
default: return `${name}: ${JSON.stringify(input).slice(0, 500)}`;
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
+
function isObject(value) {
|
|
44
|
+
return typeof value === "object" && value !== null;
|
|
45
|
+
}
|
|
46
|
+
function isTextBlock(block) {
|
|
47
|
+
return isObject(block) && block.type === "text" && typeof block.text === "string";
|
|
48
|
+
}
|
|
49
|
+
function isToolUseBlock(block) {
|
|
50
|
+
return isObject(block) && block.type === "tool_use" && typeof block.name === "string";
|
|
51
|
+
}
|
|
43
52
|
export class LiveSession {
|
|
44
53
|
q;
|
|
45
54
|
pendingMessage = null;
|
|
@@ -56,6 +65,7 @@ export class LiveSession {
|
|
|
56
65
|
// Maps tool_use_id → tool name so we can label tool_result log lines
|
|
57
66
|
// (the result event only carries the use id, not the original name).
|
|
58
67
|
pendingToolNames = new Map();
|
|
68
|
+
activeStreamBlockTypes = new Map();
|
|
59
69
|
constructor(options, sessionKey, turnBudget) {
|
|
60
70
|
this.sessionKey = sessionKey;
|
|
61
71
|
this.turnBudget = turnBudget;
|
|
@@ -90,16 +100,33 @@ export class LiveSession {
|
|
|
90
100
|
const req = this.currentRequest;
|
|
91
101
|
if (event.type === "stream_event") {
|
|
92
102
|
const se = event;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
103
|
+
const streamEvent = se.event;
|
|
104
|
+
if (streamEvent?.type === "content_block_start" && typeof streamEvent.index === "number") {
|
|
105
|
+
const blockType = streamEvent.content_block?.type;
|
|
106
|
+
if (blockType)
|
|
107
|
+
this.activeStreamBlockTypes.set(streamEvent.index, blockType);
|
|
108
|
+
}
|
|
109
|
+
if (streamEvent?.type === "content_block_delta" && streamEvent.delta?.type === "text_delta" && streamEvent.delta.text) {
|
|
110
|
+
const blockType = typeof streamEvent.index === "number"
|
|
111
|
+
? this.activeStreamBlockTypes.get(streamEvent.index)
|
|
112
|
+
: undefined;
|
|
113
|
+
if (blockType === "text") {
|
|
114
|
+
this.streamingText += streamEvent.delta.text;
|
|
115
|
+
req?.onText?.(this.streamingText);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (streamEvent?.type === "content_block_stop" && typeof streamEvent.index === "number") {
|
|
119
|
+
this.activeStreamBlockTypes.delete(streamEvent.index);
|
|
120
|
+
}
|
|
121
|
+
else if (streamEvent?.type === "message_start" || streamEvent?.type === "message_stop") {
|
|
122
|
+
this.activeStreamBlockTypes.clear();
|
|
96
123
|
}
|
|
97
124
|
}
|
|
98
125
|
if (event.type === "assistant" && event.message?.content) {
|
|
99
126
|
const hadStreamDeltas = this.streamingText.length > 0;
|
|
100
127
|
this.streamingText = "";
|
|
101
128
|
for (const block of event.message.content) {
|
|
102
|
-
if (
|
|
129
|
+
if (isTextBlock(block)) {
|
|
103
130
|
this.parts.push(block.text);
|
|
104
131
|
// Some SDK-originated errors arrive as an assistant text block
|
|
105
132
|
// without preceding stream deltas. Push the full block into the
|
|
@@ -112,11 +139,10 @@ export class LiveSession {
|
|
|
112
139
|
await req.onBlockComplete(block.text);
|
|
113
140
|
}
|
|
114
141
|
}
|
|
115
|
-
else if (
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
log.info({ tool: tool.name }, summarizeToolInput(tool.name, tool.input));
|
|
142
|
+
else if (isToolUseBlock(block)) {
|
|
143
|
+
if (block.id)
|
|
144
|
+
this.pendingToolNames.set(block.id, block.name);
|
|
145
|
+
log.info({ tool: block.name }, summarizeToolInput(block.name, block.input));
|
|
120
146
|
}
|
|
121
147
|
}
|
|
122
148
|
}
|
|
@@ -172,6 +198,7 @@ export class LiveSession {
|
|
|
172
198
|
const response = trimmed.join("\n").trim() || "I'm not sure how to respond to that.";
|
|
173
199
|
this.parts = [];
|
|
174
200
|
this.streamingText = "";
|
|
201
|
+
this.activeStreamBlockTypes.clear();
|
|
175
202
|
req?.resolve(response);
|
|
176
203
|
this.currentRequest = null;
|
|
177
204
|
}
|
|
@@ -257,6 +284,7 @@ export class LiveSession {
|
|
|
257
284
|
};
|
|
258
285
|
this.parts = [];
|
|
259
286
|
this.streamingText = "";
|
|
287
|
+
this.activeStreamBlockTypes.clear();
|
|
260
288
|
if (this.pendingMessage && this.currentRequest) {
|
|
261
289
|
this.pendingMessage(this.currentRequest.message);
|
|
262
290
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-session.js","sourceRoot":"","sources":["../../src/agent/live-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAoD,MAAM,gCAAgC,CAAC;AACzG,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,eAAe,EAAoC,MAAM,kBAAkB,CAAC;AA6BrF,SAAS,mBAAmB,CAAC,OAAgB;IAC3C,uEAAuE;IACvE,0EAA0E;IAC1E,kEAAkE;IAClE,IAAI,OAAO,IAAI,IAAI;QAAE,OAAO,SAAS,CAAC;IACtC,IAAI,OAAO,OAAO,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type { ElicitationRequest, ElicitationResult, McpSdkServerConfigWithInstance, McpServerConfig } from "@anthropic-ai/claude-agent-sdk";
|
|
2
2
|
import { skillsCanUseTool } from "./permissions.js";
|
|
3
3
|
/** True when the session uses our custom LCM compaction (DMs always; groups
|
|
4
4
|
* unless config.lcm.groupCompactStyle="sdk"). When false, SDK auto-compact is
|
|
@@ -27,13 +27,19 @@ export interface SessionContext {
|
|
|
27
27
|
* config.passiveGroups. Drives the "stay silent unless useful" rule. */
|
|
28
28
|
isPassive: boolean;
|
|
29
29
|
};
|
|
30
|
+
onMcpElicitation?: (request: ElicitationRequest) => Promise<ElicitationResult>;
|
|
30
31
|
}
|
|
31
|
-
export declare function sdkOptions(internalMcpServer: McpSdkServerConfigWithInstance, resumeSessionId?: string, model?: string, sessionContext?: SessionContext, turnBudget?: TurnBudget): {
|
|
32
|
-
env?:
|
|
33
|
-
DISABLE_AUTO_COMPACT: string;
|
|
34
|
-
} | undefined;
|
|
32
|
+
export declare function sdkOptions(internalMcpServer: McpSdkServerConfigWithInstance, resumeSessionId?: string, model?: string, sessionContext?: SessionContext, turnBudget?: TurnBudget, externalMcpServersOverride?: Record<string, McpServerConfig>): {
|
|
33
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
35
34
|
resume?: string | undefined;
|
|
36
35
|
hooks: Record<string, unknown>;
|
|
36
|
+
maxTurns: number;
|
|
37
|
+
thinking?: {
|
|
38
|
+
type: "adaptive";
|
|
39
|
+
display: "omitted";
|
|
40
|
+
} | undefined;
|
|
41
|
+
includePartialMessages: boolean;
|
|
42
|
+
onElicitation?: ((request: ElicitationRequest) => Promise<ElicitationResult>) | undefined;
|
|
37
43
|
model: string;
|
|
38
44
|
cwd: string;
|
|
39
45
|
systemPrompt: string;
|
|
@@ -52,14 +58,17 @@ export declare function sdkOptions(internalMcpServer: McpSdkServerConfigWithInst
|
|
|
52
58
|
};
|
|
53
59
|
};
|
|
54
60
|
canUseTool: typeof skillsCanUseTool;
|
|
55
|
-
includePartialMessages: boolean;
|
|
56
|
-
maxTurns: number;
|
|
57
61
|
} | {
|
|
58
|
-
env?:
|
|
59
|
-
DISABLE_AUTO_COMPACT: string;
|
|
60
|
-
} | undefined;
|
|
62
|
+
env?: NodeJS.ProcessEnv | undefined;
|
|
61
63
|
resume?: string | undefined;
|
|
62
64
|
hooks?: undefined;
|
|
65
|
+
maxTurns: number;
|
|
66
|
+
thinking?: {
|
|
67
|
+
type: "adaptive";
|
|
68
|
+
display: "omitted";
|
|
69
|
+
} | undefined;
|
|
70
|
+
includePartialMessages: boolean;
|
|
71
|
+
onElicitation?: ((request: ElicitationRequest) => Promise<ElicitationResult>) | undefined;
|
|
63
72
|
model: string;
|
|
64
73
|
cwd: string;
|
|
65
74
|
systemPrompt: string;
|
|
@@ -78,7 +87,5 @@ export declare function sdkOptions(internalMcpServer: McpSdkServerConfigWithInst
|
|
|
78
87
|
};
|
|
79
88
|
};
|
|
80
89
|
canUseTool: typeof skillsCanUseTool;
|
|
81
|
-
includePartialMessages: boolean;
|
|
82
|
-
maxTurns: number;
|
|
83
90
|
};
|
|
84
91
|
//# sourceMappingURL=sdk-options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk-options.d.ts","sourceRoot":"","sources":["../../src/agent/sdk-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"sdk-options.d.ts","sourceRoot":"","sources":["../../src/agent/sdk-options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAQ7I,OAAO,EAA2B,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAS7E;;6DAE6D;AAC7D,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAG1D;AAED;;;;6EAI6E;AAC7E,MAAM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