@oar-sh/oar 0.9.17 → 0.9.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/.github/extensions/web-relay/skills/tool-activity.mjs +5 -4
  2. package/CHANGELOG.md +192 -0
  3. package/README.md +13 -12
  4. package/package.json +1 -1
  5. package/server/claude-api-worker/claude-api-backend.mjs +345 -0
  6. package/server/claude-api-worker/claude-api-session-worker.mjs +29 -0
  7. package/server/claude-worker/claude-cli-pinned-env.mjs +150 -0
  8. package/server/claude-worker/claude-remote-relay-tool.mjs +3 -3
  9. package/server/claude-worker/claude-sdk-adapter.mjs +35 -9
  10. package/server/claude-worker/claude-session-process.mjs +166 -21
  11. package/server/claude-worker/claude-session-worker-main.mjs +3 -0
  12. package/server/claude-worker/claude-subscription-key-check.mjs +64 -0
  13. package/server/claude-worker/claude-turn-publisher.mjs +117 -5
  14. package/server/claude-worker/claude-usage-totals.mjs +53 -0
  15. package/server/claude-worker/sdk-message-normalizer.mjs +1 -1
  16. package/server/copilot-worker/copilot-remote-relay-tool.mjs +2 -2
  17. package/server/copilot-worker/copilot-sdk-event-normalizer.mjs +1 -1
  18. package/server/copilot-worker/copilot-sdk-session-process.mjs +9 -9
  19. package/server/cursor-worker/cursor-remote-relay-tool.mjs +3 -3
  20. package/server/cursor-worker/cursor-turn-runner.mjs +4 -4
  21. package/server/cursor-worker/sdk-message-normalizer.mjs +2 -2
  22. package/server/db-schema.mjs +33 -1
  23. package/server/deepseek-worker/deepseek-claude-backend.mjs +14 -130
  24. package/server/grok-worker/acp-client.mjs +1 -1
  25. package/server/grok-worker/grok-turn-runner.mjs +4 -4
  26. package/server/grok-worker/sdk-message-normalizer.mjs +1 -1
  27. package/server/mcp/oar-mcp-server.mjs +11 -5
  28. package/server/migrations/0031-queue-provider.mjs +143 -0
  29. package/server/migrations/0032-runtime-session-billing-switch.mjs +94 -0
  30. package/server/migrations/0033-claude-api-usage-checkpoints.mjs +138 -0
  31. package/server/migrations/0034-claude-api-usage-totals.mjs +112 -0
  32. package/server/public/app/activity-replay-state.mjs +4 -3
  33. package/server/public/app/agent-sessions-settings-ui.js +1 -1
  34. package/server/public/app/agent-sessions-settings.mjs +1 -1
  35. package/server/public/app/api-client.js +52 -0
  36. package/server/public/app/bootstrap.js +153 -27
  37. package/server/public/app/claude-api-settings-ui.js +362 -0
  38. package/server/public/app/claude-billing-toggle-ui.js +224 -0
  39. package/server/public/app/claude-billing-toggle.mjs +112 -0
  40. package/server/public/app/context-tier-options.mjs +6 -2
  41. package/server/public/app/context-usage-view.mjs +1 -1
  42. package/server/public/app/conversation-provider-indicator.mjs +11 -0
  43. package/server/public/app/conversation-view.js +29 -3
  44. package/server/public/app/inbox-view.mjs +1 -1
  45. package/server/public/app/journal-view.js +127 -10
  46. package/server/public/app/model-selector-options.mjs +17 -1
  47. package/server/public/app/new-conversation-model-choice.mjs +21 -0
  48. package/server/public/app/provider-readiness.mjs +5 -2
  49. package/server/public/app/relay-error-ctas.mjs +50 -0
  50. package/server/public/app/relay-schedules-ui.js +1 -1
  51. package/server/public/app/settings-modal.js +11 -0
  52. package/server/public/app/settings-tabs.js +1 -1
  53. package/server/public/app/socket-handlers.js +18 -1
  54. package/server/public/app/tool-activity-emoji.mjs +4 -3
  55. package/server/public/app/usage-limit-ui.js +136 -5
  56. package/server/public/index.html +189 -3
  57. package/server/relay-tools.md +4 -4
  58. package/server/repositories/conversation-group-repository.mjs +1 -1
  59. package/server/repositories/message-repository.mjs +7 -0
  60. package/server/repositories/session-repository.mjs +8 -1
  61. package/server/routes/ask-user-routes.mjs +1 -1
  62. package/server/routes/conversation-group-routes.mjs +1 -1
  63. package/server/routes/messages-routes.mjs +645 -27
  64. package/server/routes/relay-ask-routes.mjs +3 -3
  65. package/server/routes/relay-event-routes.mjs +2 -2
  66. package/server/routes/relay-schedule-routes.mjs +1 -1
  67. package/server/routes/remote-relay-routes.mjs +3 -3
  68. package/server/routes/sessions-routes.mjs +327 -29
  69. package/server/server-runtime.mjs +363 -26
  70. package/server/services/about-service.mjs +1 -0
  71. package/server/services/background-work-view.mjs +2 -1
  72. package/server/services/claude-api-settings-service.mjs +575 -0
  73. package/server/services/claude-api-usage-service.mjs +361 -0
  74. package/server/services/claude-billing-swap-service.mjs +274 -0
  75. package/server/services/claude-billing-switch-service.mjs +343 -0
  76. package/server/services/plan-usage-claude-api.mjs +445 -0
  77. package/server/services/plan-usage-service.mjs +5 -0
  78. package/server/services/provider-model-selection.mjs +3 -2
  79. package/server/services/provider-reasoning-effort.mjs +9 -0
  80. package/server/services/relay-ask-service.mjs +1 -1
  81. package/server/services/relay-event-service.mjs +3 -2
  82. package/server/services/relay-schedule-service.mjs +1 -1
  83. package/server/services/remote-relay-caller-context.mjs +7 -0
  84. package/server/services/remote-relay-dispatcher.mjs +83 -14
  85. package/server/services/remote-relay-registry-service.mjs +1 -1
  86. package/server/services/session-worker-launch-service.mjs +61 -2
  87. package/server/services/session-worker-registry-service.mjs +28 -1
  88. package/server/services/session-worker-websocket-service.mjs +17 -0
  89. package/server/services/usage-limit-pause-service.mjs +55 -4
  90. package/server/services/worker-secret-redaction.mjs +2 -0
  91. package/shared/anthropic-api.mjs +202 -0
  92. package/shared/provider-routing.mjs +5 -3
  93. package/shared/relay-asks.mjs +11 -5
  94. package/shared/relay-events.mjs +2 -2
  95. package/shared/relay-schedules.mjs +2 -2
  96. package/shared/remote-relay-contract.mjs +29 -9
  97. package/shared/remote-relay-tool-core.mjs +23 -6
  98. package/shared/steer-settle-failure.mjs +1 -0
  99. package/shared/worker-runtime/api-client.mjs +2 -2
  100. package/shared/worker-runtime/heartbeat.mjs +5 -0
  101. package/shared/worker-runtime/worker-websocket-link.mjs +6 -0
@@ -3,7 +3,7 @@ import {
3
3
  formatToolResultActivity as formatSharedToolResultActivity,
4
4
  formatVoteMemoryActivity,
5
5
  } from "../../../../shared/tool-activity.mjs";
6
- import { isRemoteRelayToolName } from "../../../../shared/remote-relay-tool-core.mjs";
6
+ import { REMOTE_RELAY_TOOL_NAME, isRemoteRelayToolName } from "../../../../shared/remote-relay-tool-core.mjs";
7
7
  import { summarizeRemoteRelayCall } from "../../../../shared/remote-relay-contract.mjs";
8
8
 
9
9
  export function normalizeActivityText(value, maxToolDetailLength = 140) {
@@ -135,10 +135,11 @@ export function formatToolActivity(request, maxToolDetailLength = 140) {
135
135
  if (lower.includes("report_intent")) {
136
136
  return detail ? `● ${detail}` : "● Working…";
137
137
  }
138
- // The OAR MCP server's tool reaches the CLI as `oar-remote_relay`: show the
139
- // same line every other engine writes for it.
138
+ // The OAR MCP server's tool reaches the CLI as `oar-relay_tool` (up to
139
+ // 0.9.17 `oar-remote_relay`): show the same line every other engine writes
140
+ // for it.
140
141
  if (isRemoteRelayToolName(rawName)) {
141
- return `Tool (remote_relay): ${summarizeRemoteRelayCall(toolArgsSnapshot(request))}`;
142
+ return `Tool (${REMOTE_RELAY_TOOL_NAME}): ${summarizeRemoteRelayCall(toolArgsSnapshot(request))}`;
142
143
  }
143
144
  return detail ? `Tool (${rawName}): ${detail}` : `Tool (${rawName})`;
144
145
  }
package/CHANGELOG.md CHANGED
@@ -3,6 +3,198 @@
3
3
  All notable changes to OAR are documented here. The format follows
4
4
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow semver.
5
5
 
6
+ ## [0.9.18] — 2026-10-26
7
+
8
+ Highlights: Claude chats can run on a Claude Console API key. Claude API is
9
+ a provider beside your subscription, with an optional monthly spend cap and
10
+ a card in Check Usage with the estimated spend. A Claude chat can switch
11
+ between the subscription and the key and keep its Claude Code session, also
12
+ when it is paused at the usage limit. The relay's agent tool is now called
13
+ `relay_tool`. DeepSeek and Claude API chats start with all hooks off, and a
14
+ subscription chat no longer runs on an API key that Claude Code's settings
15
+ hand it.
16
+
17
+ ### Added
18
+
19
+ - **Claude API: Claude chats on a Claude Console API key.** A provider
20
+ beside Claude (your subscription), billed to the Console organisation
21
+ the key belongs to.
22
+ - Settings → Providers → Claude API holds the key, the switch, the
23
+ default model and an optional monthly spend cap in US dollars. The key
24
+ is stored on the relay host and never shown again: the tab only says
25
+ that one is saved. Any `sk-ant-` Console key is taken; Claude login
26
+ and session tokens and Admin keys are refused when you save. A key
27
+ Anthropic itself refuses stays saved, and the tab's status line says
28
+ so until a save or Refresh models goes through. A cap the field cannot
29
+ take is named under the field.
30
+ - The relay lists the key's models from Anthropic when the key is saved,
31
+ when Claude API is switched on again, and on Refresh models. Until
32
+ then it offers the Claude tab's models.
33
+ - Commit attribution, the background command limit, the effort levels
34
+ and the compaction window stay on the Claude tab, shared by both; the
35
+ Claude API tab links there.
36
+ - New Chat offers Claude API, Select Models has a Claude API tab, and
37
+ its chats show a gold "Claude API" pill and "🔒 Session locked to
38
+ Claude API models."
39
+ - A turn that Claude API refuses or could not run ends with buttons:
40
+ Claude API settings (at the cap field when the monthly cap is
41
+ reached), Switch to subscription, Add funds, Console billing or
42
+ Console limits, as fits the reason.
43
+ - When the relay refuses to start a Claude API chat (the monthly cap, no
44
+ key, switched off), New Chat stays open with the reason, Claude API
45
+ settings, and Start on subscription, which starts the same chat on
46
+ the Claude provider; on a phone the dialog scrolls to it.
47
+ - **Switch a Claude chat between your subscription and the Claude API
48
+ key.** `POST /api/conversation/:id/billing` moves a chat between
49
+ `claude` (the subscription) and `claude-api` (the saved key). It keeps
50
+ its Claude Code session.
51
+ - In the browser, a Claude chat has a `Subscription | API key` toggle
52
+ under the lock note while Claude API is on with a saved key. It says
53
+ what a pending switch waits for, and why a side cannot be chosen; at
54
+ the monthly cap it says the chat stays on the subscription, and so
55
+ does the usage-limit banner.
56
+ - The switch applies from the next turn: a running turn finishes on the
57
+ billing it started on. Messages already queued run on the new one.
58
+ - The relay restarts the chat's Claude Code between turns. It waits
59
+ while a turn, a question, a compaction or a background task is still
60
+ running.
61
+ - The transcript notes each switch. The first turn on the key has no
62
+ prompt cache and costs more.
63
+ - The switch is refused, with the reason, when the key is missing or
64
+ Claude API is off, when the monthly cap is reached, or when the
65
+ chat's model is not on the target's model list.
66
+ - **Switch this chat to API key at the usage limit.** When a subscription
67
+ chat is paused at the Claude usage limit, the banner offers the switch
68
+ if the chat may move to the key. The paused turn then carries on on
69
+ the key at once. Nothing switches by itself.
70
+ - **Agents can switch a Claude session's billing.** `relay_tool` `send`
71
+ takes `provider` (`claude` or `claude-api`) for a Claude session. The
72
+ other billing switches the session together with the message:
73
+ - in one call, so a refused switch sends nothing and a refused message
74
+ switches nothing;
75
+ - the approval card says "Switches billing to API key";
76
+ - a relay from before this version refuses it and sends nothing.
77
+ - **A Claude API card in Check Usage.** It shows what this relay's turns
78
+ on the Claude API key are estimated to have cost today and this month,
79
+ per model, with the tokens, and the monthly cap as a bar when one is set.
80
+ - The figures are Claude Code's own estimate from its price table, so
81
+ sub-agents, compaction and web search are in them. The Console's
82
+ billing page (linked) has the real figures and the balance.
83
+ - Days and the month follow the relay's time zone, and the cap starts
84
+ over at local midnight on the 1st.
85
+ - Tokens Claude Code has no price for show as "no price known" or
86
+ "estimate incomplete", never as $0.
87
+ - Turns paid from a Max or Team plan's subscriber API credit are counted
88
+ too; OAR cannot see that credit.
89
+ - The card stays while a key is saved, also with Claude API switched
90
+ off, so the month's spend stays in view (DeepSeek's card goes with the
91
+ provider).
92
+ - **A monthly cap for Claude API.** Once this month's estimate reaches the
93
+ cap set in Settings → Providers → Claude API:
94
+ - a new turn on the key does not run: the chat gets a note with the code
95
+ `relay.claude-api-cap-reached`. A turn Claude Code starts by itself,
96
+ when a background task reports back, gets the note and that chat's
97
+ background tasks are stopped as soon as the relay hears of the turn,
98
+ since each report would start another such turn; the turn itself is
99
+ stopped when the worker takes the stop. Its first request may already
100
+ be billed, and a short turn can end before the stop arrives. The note
101
+ also mentions tasks no stop reaches, since they can keep starting such
102
+ turns and keep a switch to the subscription waiting. The note comes
103
+ once per chat until the cap clears, a Claude API setting is saved, or a
104
+ turn of that chat runs on the key again. The same stop applies when
105
+ Claude API has no key or is switched off;
106
+ - a switch to the key is refused;
107
+ - an agent's send to a session on the key and a new Claude API chat (New
108
+ Chat or an agent's `create_session`) get 409 `CLAUDE_API_CAP_REACHED`,
109
+ and nothing is queued or created.
110
+
111
+ A turn that is already running finishes. A turn's cost is booked when it
112
+ ends, so running turns can take the month past the cap. The cap counts
113
+ only the priced part of the estimate. If the spend cannot be read, the cap counts as
114
+ reached. Console spend limits still apply on top.
115
+
116
+ ### Changed
117
+
118
+ - **A send does not switch a Claude chat's billing.** A message that
119
+ names the other billing gets 409 `CLAUDE_BILLING_SWITCH_REQUIRED`
120
+ (before, a Claude API chat ignored `provider: "claude"`). A message
121
+ from a page that still showed the other billing gets 409
122
+ `CLAUDE_BILLING_CHANGED`. Its text goes into the chat's draft, so the
123
+ page, and a send replayed from the offline outbox, lose nothing. The
124
+ outbox keeps the text only, not attachments.
125
+
126
+ - **No hooks or status line run in DeepSeek chats.** In 0.9.17, Claude Code
127
+ in a DeepSeek chat ran the hooks and the `statusLine` command of
128
+ DeepSeek's settings folder, of the chat folder's `.claude/settings.json`
129
+ and `settings.local.json`, and of plugins, as the relay's user with the
130
+ DeepSeek key in their environment; a folder's `SessionStart` hook ran
131
+ before the relay had pinned the endpoint and key. Now those chats start
132
+ with all hooks off, and so do Claude API chats. The setting is on Claude
133
+ Code's command line, so it is in force from the start, and a folder's
134
+ settings can't turn it back on (`scripts/claude-cli-hooks-proof.mjs`
135
+ shows it on the bundled Claude Code). Hooks in managed settings still
136
+ run. Chats on your Claude login keep their hooks and status line. The
137
+ agent's own commands can still read the key; the relay redacts it in
138
+ what it shows.
139
+ - **The relay's agent tool is now called `relay_tool`.** It was
140
+ `remote_relay`, and it is listed under the new name on every provider
141
+ (Claude's `mcp__relay__relay_tool`), with the same actions and fields; the
142
+ docs and the agents' instructions use it too. OAR's own MCP server, which
143
+ Grok and the Copilot extension engine use, still runs a call to
144
+ `remote_relay` but no longer lists it. Tool lines written under the old
145
+ name still show as this tool.
146
+ - If your own instructions, permission rules or hooks name `remote_relay`
147
+ or `mcp__relay__remote_relay`, change them to `relay_tool` or
148
+ `mcp__relay__relay_tool`: outside OAR's MCP server the old name is
149
+ refused.
150
+ - **A subscription chat never runs on an API key.** Claude Code takes an
151
+ API key over your Claude login when one of its settings hands it one:
152
+ - `env.ANTHROPIC_API_KEY` in `~/.claude/settings.json` or the chat
153
+ folder's `.claude/settings*.json`;
154
+ - an `apiKeyHelper`;
155
+ - a Console login.
156
+
157
+ Until now such a chat ran on that key and billed the key's owner. Now
158
+ the turn stops at Claude Code's start, with a note naming the source
159
+ and the setting to remove. At most one model request, sent a moment
160
+ after that start, can go out first.
161
+
162
+ - **The docs cover Claude API.** The providers guide has a Claude API
163
+ section: the key, the models, the shared `~/.claude`, the billing switch
164
+ and when it applies, what fails closed, the monthly cap and the
165
+ subscriber API credit. The web UI, configuration, security,
166
+ agents-together and troubleshooting pages, the README, the server
167
+ README and DEVELOPING.md (the worker and its live check) cover it too,
168
+ and the feature tracker has a Claude API page. Troubleshooting has two
169
+ known gaps:
170
+ - a key that is not tied to a workspace gets HTTP 400 from Anthropic;
171
+ for now, create the key inside a workspace (naming the workspace in
172
+ OAR is planned);
173
+ - a model Claude Code has no price for (currently Claude Haiku 5.5)
174
+ shows "no price known" on the Claude API card, and its tokens are left
175
+ out of the estimate.
176
+ - **Corrections to the 0.9.17 notes:**
177
+ - DeepSeek's budget bar changes colour at 50 % and 75 % of the budget
178
+ and turns red at 90 %; the notes said amber near it and red over it.
179
+ - The composer's context chip shows DeepSeek's 1M window (1,048,576
180
+ tokens) as `1.05M`.
181
+ - The `preview` tool's hint to bind a dev server to 127.0.0.1 reaches
182
+ only sessions that have the tool (Claude, Claude API, DeepSeek, Cursor,
183
+ and Grok and Copilot's Extension engine through OAR's MCP server), not
184
+ every provider. Copilot's SDK engine, and those two when the relay runs
185
+ with `OAR_MCP_SERVER=0`, are taught the preview API without it.
186
+
187
+ ### Upgrade notes
188
+
189
+ - **Downgrading to 0.9.17:** first switch Claude chats on the Claude API
190
+ key back to Subscription. 0.9.17 does not know Claude API, so a chat
191
+ left on the key runs as a Copilot chat there. That now includes a chat
192
+ that started on the subscription and was switched to the key. 0.9.17
193
+ ignores the new database columns and tables. The two triggers on the
194
+ queue table keep stamping its new column there, which does no harm.
195
+ - **Downgrading to 0.9.17 turns hooks back on in DeepSeek chats:** they
196
+ run the hooks and status line of their settings folders again.
197
+
6
198
  ## [0.9.17] — 2026-10-25
7
199
 
8
200
  Highlights: DeepSeek is a provider of its own. Paste a DeepSeek API key and
package/README.md CHANGED
@@ -27,7 +27,7 @@ flowchart LR
27
27
  end
28
28
  subgraph host["Your computer"]
29
29
  relay["OAR relay<br/>chats, queue, history, files"]
30
- agents["Copilot · OpenAI · Claude<br/>Cursor · Grok · DeepSeek"]
30
+ agents["Copilot · OpenAI · Claude · Claude API<br/>Cursor · Grok · DeepSeek"]
31
31
  end
32
32
  cloud["☁️ Claude Cloud<br/>sandbox at Anthropic"]
33
33
  phone <--> relay
@@ -36,7 +36,7 @@ flowchart LR
36
36
  relay <--> cloud
37
37
  ```
38
38
 
39
- - **Seven runtimes, one chat**: you pick the agent per conversation, and all of them share the same chat, queue, history, file browser, and question cards ([Runtimes](#runtimes)).
39
+ - **Eight runtimes, one chat**: you pick the agent per conversation, and all of them share the same chat, queue, history, file browser, and question cards ([Runtimes](#runtimes)).
40
40
  - **Yours**: the relay runs on your hardware, answers only on this machine until you change that, and collects no telemetry ([Security notes](#security-notes)).
41
41
  - **Under active development**: expect occasional rough edges, and some provider SDK features that are missing or incomplete.
42
42
 
@@ -45,29 +45,29 @@ flowchart LR
45
45
  <table>
46
46
  <tr>
47
47
  <td width="42%" rowspan="4" valign="top">
48
- <a href="https://oar.sh/assets/shots/cfmail-mobile.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-mobile.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/cfmail-mobile.png?v=0.9.17" alt="OAR on a phone: a finished agent turn in a conversation, with the composer below"></picture></a>
48
+ <a href="https://oar.sh/assets/shots/cfmail-mobile.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-mobile.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/cfmail-mobile.png?v=0.9.18" alt="OAR on a phone: a finished agent turn in a conversation, with the composer below"></picture></a>
49
49
  <br><sub>On a phone: the same conversations, installable as an app.</sub>
50
50
  </td>
51
51
  <td width="58%" valign="top">
52
- <a href="https://oar.sh/assets/shots/cfmail-agents.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-agents.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/cfmail-agents.png?v=0.9.17" alt="Background subagents running in parallel in the task panel, each with live token counts, elapsed time, and its own Stop button"></picture></a>
52
+ <a href="https://oar.sh/assets/shots/cfmail-agents.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-agents.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/cfmail-agents.png?v=0.9.18" alt="Background subagents running in parallel in the task panel, each with live token counts, elapsed time, and its own Stop button"></picture></a>
53
53
  <br><sub>Agents working in parallel, each with live token counts and its own Stop.</sub>
54
54
  </td>
55
55
  </tr>
56
56
  <tr>
57
57
  <td valign="top">
58
- <a href="https://oar.sh/assets/shots/cfmail-question.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-question.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/cfmail-question.png?v=0.9.17" alt="A question card in the middle of a turn: the agent offers several choices and a free-text reply"></picture></a>
58
+ <a href="https://oar.sh/assets/shots/cfmail-question.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-question.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/cfmail-question.png?v=0.9.18" alt="A question card in the middle of a turn: the agent offers several choices and a free-text reply"></picture></a>
59
59
  <br><sub>When the agent needs a decision, it asks, and waits for your answer.</sub>
60
60
  </td>
61
61
  </tr>
62
62
  <tr>
63
63
  <td valign="top">
64
- <a href="https://oar.sh/assets/shots/pingcf-thoughts.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/pingcf-thoughts.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/pingcf-thoughts.png?v=0.9.17" alt="An expanded Thoughts block showing the agent's reasoning above its reply"></picture></a>
64
+ <a href="https://oar.sh/assets/shots/pingcf-thoughts.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/pingcf-thoughts.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/pingcf-thoughts.png?v=0.9.18" alt="An expanded Thoughts block showing the agent's reasoning above its reply"></picture></a>
65
65
  <br><sub>Read the reasoning, not just the answer.</sub>
66
66
  </td>
67
67
  </tr>
68
68
  <tr>
69
69
  <td valign="top">
70
- <a href="https://oar.sh/assets/shots/pagewright-watching.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/pagewright-watching.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/pagewright-watching.png?v=0.9.17" alt="A session watching two other sessions: a finished reply arrives as a compact relay-event row, the watching 2 sessions list is open with Unsubscribe, and a request to also watch a session on a paired relay waits on an Allow / Deny card"></picture></a>
70
+ <a href="https://oar.sh/assets/shots/pagewright-watching.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/pagewright-watching.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/pagewright-watching.png?v=0.9.18" alt="A session watching two other sessions: a finished reply arrives as a compact relay-event row, the watching 2 sessions list is open with Unsubscribe, and a request to also watch a session on a paired relay waits on an Allow / Deny card"></picture></a>
71
71
  <br><sub>Agents that watch agents: woken by events, approving nothing.</sub>
72
72
  </td>
73
73
  </tr>
@@ -102,6 +102,7 @@ The runtime (the *provider* in the UI) is chosen in **New Chat** and stays fixed
102
102
  | [**OpenAI (BYOK)**](docs/providers.md#openai-byok-and-openai-image) | Copilot's agent against OpenAI or a compatible endpoint | Your own API key |
103
103
  | [**OpenAI Image**](docs/providers.md#openai-byok-and-openai-image) | A chat whose replies are images | The same key |
104
104
  | [**Claude**](docs/providers.md#claude-agent-sdk) | Claude Code on your machine | A Claude login, made from **⚙️ Settings** |
105
+ | [**Claude API**](docs/providers.md#claude-api) | Claude Code on your machine, billed to a Claude Console API key; a Claude chat can switch between the two | A Claude Console API key |
105
106
  | [**Claude Cloud**](docs/providers.md#claude-cloud) (experimental) | Claude Code in a sandbox at Anthropic, on a GitHub repository | A claude.ai account with GitHub connected |
106
107
  | [**Cursor**](docs/providers.md#cursor-agent-sdk) | Cursor's agent | A Cursor API key |
107
108
  | [**Grok**](docs/providers.md#grok-cli-acp) | xAI's Grok CLI | A Grok sign-in, made from **⚙️ Settings** |
@@ -117,11 +118,11 @@ API keys are entered in **⚙️ Settings** and stay on the relay host. The Clau
117
118
  <table>
118
119
  <tr>
119
120
  <td width="62%" valign="top">
120
- <a href="https://oar.sh/assets/shots/cfmail-steering.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-steering.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/cfmail-steering.png?v=0.9.17" alt="A running Claude turn with a message steered into it mid-turn, the reply streaming with its tool calls, and the Steer button in the composer"></picture></a>
121
+ <a href="https://oar.sh/assets/shots/cfmail-steering.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/cfmail-steering.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/cfmail-steering.png?v=0.9.18" alt="A running Claude turn with a message steered into it mid-turn, the reply streaming with its tool calls, and the Steer button in the composer"></picture></a>
121
122
  <br><sub>Send a message while the agent works, and it steers the running turn.</sub>
122
123
  </td>
123
124
  <td width="38%" valign="top">
124
- <a href="https://oar.sh/assets/shots/usage-copilot-compact.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/usage-copilot-compact.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/usage-copilot-compact.png?v=0.9.17" alt="The GitHub Copilot card in Check Usage: premium requests and plan quota with reset dates, and the cost of the last turn"></picture></a>
125
+ <a href="https://oar.sh/assets/shots/usage-copilot-compact.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/usage-copilot-compact.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/usage-copilot-compact.png?v=0.9.18" alt="The GitHub Copilot card in Check Usage: premium requests and plan quota with reset dates, and the cost of the last turn"></picture></a>
125
126
  <br><sub>What each plan has left, in one place.</sub>
126
127
  </td>
127
128
  </tr>
@@ -133,12 +134,12 @@ API keys are entered in **⚙️ Settings** and stay on the relay host. The Clau
133
134
  - **Background work**: a task panel lists the commands and sub-agents that outlive a reply, each with its own **Stop** and its full record; a command's console shows its output live, says when it has gone quiet and counts a test run's passes and failures; the panel and its consoles come back after a relay restart, and a queued restart shows what it waits for and asks after a maximum wait ([Background tasks](docs/web-ui.md#background-tasks), [After a relay restart](docs/web-ui.md#after-a-relay-restart)).
134
135
  - **Choose how the agent works**: `ask`, `plan`, `agent` or `autopilot`, plus model and reasoning effort, per message ([Relay modes](docs/web-ui.md#relay-modes)).
135
136
  - **Files and git**: browse the workspace, preview files, review git changes in a diff viewer, and publish a dev server as a preview link ([Files, git, and previews](docs/web-ui.md#files-git-and-previews), [preview servers](docs/preview-servers.md)).
136
- - **Usage and context**: plan limits and credits of every provider, and what fills the model's context window ([Usage and context](docs/web-ui.md#usage-and-context)).
137
+ - **Usage and context**: plan limits and credits of every provider, the estimated spend of DeepSeek and Claude API keys, and what fills the model's context window ([Usage and context](docs/web-ui.md#usage-and-context)).
137
138
  - **Your conversations everywhere**: the history lives on the relay, drafts follow you from device to device, and conversations can be searched, archived, grouped and pinned ([The conversation list](docs/web-ui.md#the-conversation-list), [drafts](docs/web-ui.md#drafts-across-devices), [session groups](docs/web-ui.md#session-groups), [pins](docs/web-ui.md#pinned-messages)).
138
139
  - **Share** a conversation as a read-only link, hide single messages and the host's paths from it, and see when it was opened ([Sharing](docs/web-ui.md#sharing)).
139
140
  - **On your phone**: install OAR as an app and get push notifications ([Notifications and the app](docs/web-ui.md#notifications-and-the-app)).
140
141
 
141
- The full tour is in [Using the web UI](docs/web-ui.md); every setting and config key is in [Settings and configuration](docs/configuration.md). What changed in each release is in the [changelog](CHANGELOG.md), with [0.9.17](CHANGELOG.md#0917--2026-10-25) as the latest.
142
+ The full tour is in [Using the web UI](docs/web-ui.md); every setting and config key is in [Settings and configuration](docs/configuration.md). What changed in each release is in the [changelog](CHANGELOG.md), with [0.9.18](CHANGELOG.md#0918--2026-10-26) as the latest.
142
143
 
143
144
  ## Remote access
144
145
 
@@ -189,7 +190,7 @@ flowchart LR
189
190
 
190
191
  You stay in charge: per paired relay you decide whether agents may only read, also prompt, or do everything, and in the `ask` and `plan` modes every write asks you first. A subscription only notifies; it approves nothing.
191
192
 
192
- <p><a href="https://oar.sh/assets/shots/pagewright-cross-relay.png?v=0.9.17"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/pagewright-cross-relay.light.png?v=0.9.17"><img src="https://oar.sh/assets/shots/pagewright-cross-relay.png?v=0.9.17" alt="A session watching two sessions on a paired relay: a reply arrives as a relay-event row, and after a short outage the events the other relay kept arrive as one replayed row" width="720"></picture></a></p>
193
+ <p><a href="https://oar.sh/assets/shots/pagewright-cross-relay.png?v=0.9.18"><picture><source media="(prefers-color-scheme: light)" srcset="https://oar.sh/assets/shots/pagewright-cross-relay.light.png?v=0.9.18"><img src="https://oar.sh/assets/shots/pagewright-cross-relay.png?v=0.9.18" alt="A session watching two sessions on a paired relay: a reply arrives as a relay-event row, and after a short outage the events the other relay kept arrive as one replayed row" width="720"></picture></a></p>
193
194
 
194
195
  How pairing, permissions and limits work is in [Agents working together](docs/agents-together.md).
195
196
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oar-sh/oar",
3
- "version": "0.9.17",
3
+ "version": "0.9.18",
4
4
  "type": "module",
5
5
  "description": "OAR — Open Agent Relay: drive your local coding agents from any browser",
6
6
  "license": "MIT",