19 Commits
Author SHA1 Message Date
Aleksander DygońandClaude Opus 5.5 03c2ff34c2 Remove code comments and add the no-comments rule (#12604)
* Remove code comments and add the no-comments rule

Remove the comments from first-party code and configuration files:
TS/JS, JSX, CSS, SQL migrations, Swift, Kotlin, Gradle, shell,
Docker, systemd, Nix, YAML, TOML, JSONC and GritQL.

Keep only what a tool reads: license headers, shebangs, compiler
and lint directives, JSDoc types in plain .js files, generated file
headers, GritQL scope lines, the install-server.sh help text and the
openbot-boat-pre-stop marker. Vendored code, fixtures and released
schemas keep their comments.

Add the rule to AGENTS.md, and change the docs that asked for
comments. Add two i18n keys that only comments named to
RELEASED_SOURCE_KEYS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep comments that are data in strings

The benchmark task files in opencode-free-models-bench.ts tell the
model what each function must do. The sample file and HTML page in
the two stories are display content. Put their comments back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep released migrations and mobile native inputs unchanged

check:migrations compares each released migration with v0.73.0 byte
for byte, so restore src/backend/migrations. A change to a native
build input of apps/mobile makes a new runtime version, so restore
those files and the extra fingerprint sources.

List these files and the comment markers that a tool reads in
AGENTS.md. Remove the last requests for comments in
src/renderer/AGENTS.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 12:19:28 +01:00
NB 253a21a915 Run Gemini on the Antigravity CLI 1.5.4 (#6849)
* Run Gemini on the Antigravity CLI 1.5.4

Gemini now runs on the Antigravity CLI from its GitHub releases, not on agy_acp_server 1.4.5.
OpenBot copies the 1.4 refresh token to the new token file once, so users do not sign in again.
The usage reading comes from Google's quota service, because the CLI has no /usage command.

* Show the refused-key message when Gemini refuses a session

With a saved Gemini API key, an authRequired answer to session/new now gives the refused-key
message, as at the client's start. Document that the CLI's tools get WSL_DISTRO_NAME, and that
Linux still opens the sign-in page with xdg-open.

* Remove exports that only their own file uses

* Refuse a remote Gemini sign-in on a Windows host, and remove the 1.3 sign-in prompt code

On Windows the Antigravity CLI opens the Google page on the host with
rundll32, so a sign-in from another device opened it there. OpenBot now
refuses that sign-in before the process starts, so a Reconnect does not
sign the account out first. The interactive sign-in prompt of the 1.3
server and the private prompt of readRateLimits had no user.

* Ask GitHub to read the branch again after its pull request outage
2026-11-10 19:18:29 +01:00
NBandClaude Opus 5.5 e97dec3003 Add Mistral as a built-in provider through Mistral Vibe (#5582)
* Add Mistral as a built-in provider through Mistral Vibe

OpenBot downloads Mistral Vibe 3.1.0 as a managed runtime and runs
vibe-acp over ACP. Users sign in with the browser or set
MISTRAL_API_KEY. Disconnect signs the CLI out with _auth/signOut.
The sandbox keeps Vibe state in VIBE_HOME and trusts the workspace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix two comments about ACP settings and additional directories

Move the timeout comment back to #timed, and say in the comment that
a flavor can also send additionalDirectories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 18:00:30 +01:00
NBandClaude Opus 5.5 6f15ac4d08 Add GitHub Copilot as a provider (#4951)
* Add GitHub Copilot as a provider

OpenBot downloads the GitHub Copilot CLI 1.0.105 as a managed runtime and
runs it with `copilot --acp`. Sign-in uses `copilot login` in the browser,
or `copilot login --device-code`. Disconnect sends the ACP `logout` call,
because the CLI has no sign-out command. Workspace only agents cannot
change the Copilot settings, hooks, skills and plugins in `~/.copilot`.

Team API peers below protocol 8 do not see the new provider.

Closes #4637

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix the Copilot review findings

- Seatbelt: a confined process cannot make, remove or rename `.github`, so a folder
  renamed into its place cannot bring a protected path.
- Make the Copilot `config.json` with `firstLaunchAt` when it is missing. Without it,
  a confined first start stops with no message.
- Show the reason of a refused ACP sign-out, such as a token that Copilot does not manage.
- Watch the Copilot `config.json` for sign-in changes.
- Use one resolver for the latest GitHub release asset of Pi and Copilot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 15:20:06 +01:00
NBandClaude Opus 5.5 d3db817a1e Add Devin as a built-in provider (#4766)
* Add Devin as a built-in provider

OpenBot downloads the Devin CLI as a managed runtime and starts it over
ACP. The user signs in with a Devin account in the browser. Devin agents
use the models of the Devin plan. Add the logo, i18n keys in all
languages, the lock and blocklist rows, process confinement paths, the
conformance case, and the documentation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep the Devin documentation and report Devin sign-in in analytics

- Stage `share/` beside `bin/`: Devin CLI has a skill that reads its
  documentation in `share/devin/docs`. Set `installedBytes` to the size
  of both folders.
- Report a signed-in Devin agent as `subscription` in analytics.
- Use one helper for the Kimi and Devin state folders, and one map of
  native CLI version parsers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Extract the Windows Devin zip in one pass

`extractZipTree` refuses each entry outside its root, so a call for
`bin/` refused the `share/` entries of the Windows Devin zip. It now
takes a list of roots, and Devin extracts `bin/` and `share/` in one
call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Remove the unused exports of the native version parsers

`NATIVE_VERSION_PARSERS` is now the only user of the Pi, Muse and Devin
version parsers outside `cli.ts`, so knip reports their exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 19:46:41 +01:00
NBandClaude Opus 5.5 a90cce7cc3 Add Kimi as a provider (#4450)
* Add Kimi as a provider

OpenBot downloads the Kimi Code CLI as a managed runtime and runs it
over ACP. You sign in with your Kimi Code account in the browser or
with a device code. Kimi agents use the Kimi models of your account.

- Accept relative in-tree links in the Kimi runtime archive, the
  install record and the fingerprint. The PyInstaller archive needs
  them for the macOS framework signature.
- Detect the Kimi "Session not found" error, so that a lost session
  starts a new one.
- Protect the Kimi config, hooks and plugins in Workspace only mode.
  Because of this, a confined Kimi agent cannot change its model.
- Show Kimi in Team API v8. Protocols 1-7 hide it.

Fixes #3121

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Keep a Kimi model change when the CLI cannot save it

Kimi CLI 1.52.0 moves the session to the new model, and then saves the
model in config.toml. In a Workspace only process that file is
protected, so session/set_model fails with -32603 after the change.
The Kimi flavor now reads that failure as a change that applied.

A confined Kimi process also reads KIMI_SHARE_DIR from the agent's own
environment. The docs give the shared default model and the Windows
code sign-in limits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Raise the tool schema budget for the kimi provider value

The agent tools that take a provider list each provider id, so the
kimi value adds 35 bytes to the tool schemas. Without it an agent
cannot make or filter Kimi agents.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 12:13:20 +01:00
NBandClaude Opus 5.5 1eea1d0adf Install OpenCode 2 as the managed OpenCode CLI (#2605)
* Install OpenCode 2 as the managed OpenCode CLI

Pin @opencode/cli 2.1.1 and read its releases. Show a clear message when an
OpenCode 1 CLI cannot open a database that OpenCode 2 created. Resume an
OpenCode 2 session again when its service is still starting, and treat its
"session not found" error as a missing session. Show model groups by name.
Let the seed script list models without a background OpenCode service.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Report a stopped OpenCode as a provider error in the resume retry

The OpenCode 2 startup retry read the connection outside a typed
failure, so a process that stopped during the wait became a defect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 23:29:05 +02:00
NB 2457960917 Refactor ACP and add native Pi and Muse providers (#1715)
* Refactor ACP and add native Pi and Muse providers

* Fix provider secrets, usage, and live settings updates

* Name each provider setting reset action

* Allow retry when provider settings are not ready

* Remove unused provider exports and declare the Linux terminal

* Fix provider redaction, v7 creation, and saved ACP settings
2026-10-09 23:01:56 +02:00
Aleksander DygońandClaude Opus 5.5 c163f616d3 Install the OpenCode CLI from npm only and name failed requests (#1642)
* Install the OpenCode CLI from npm only and name failed requests (#1632)

- Get the OpenCode LICENSE from the opencode-ai npm tarball, not from
  GitHub. The SHA-256 is the same as the lock value. The pin script
  hashes the same file.
- When a runtime request gets no answer, show the URL and the network
  reason, not only "fetch failed".
- When a complete download passes its digest check, a Retry installs it
  and does not download it again.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Offer an OpenCode release only when its opencode-ai package exists

- The release check reads opencode-ai/latest and gets the platform
  package at that version. Staging needs the LICENSE from that package.
- Get the small LICENSE tarball before the platform tarball is unpacked,
  so a failed request stops early.
- The pin script checks the name and version of the opencode-ai package.
- PRIVACY.md and docs/RELEASING.md name npm as the LICENSE source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 09:53:17 +02:00
NBandClaude Opus 5.5 a473713a14 Add Cline as a provider (#1271)
* feat(providers): add Cline as a provider (#1253)

Add Cline as a built-in, managed ACP provider that stays on this
computer. OpenBot downloads Cline CLI 3.0.68 from npm, checks it against
the lock, and starts it with `cline --acp`.

- Start each Cline process in local session mode with no self-update, so
  no hub process stays after OpenBot stops.
- In the macOS sandbox, let Cline write only its data folder. Block its
  settings, MCP settings, connectors, schedules, hooks, skills and the
  project `.cline` and `.clinerules` folders.
- Add migration 26, which lets provider sessions store `cline`.
- Hide Cline from team members in the Team API, as Cursor.
- Send the ACP SDK copy of an error reply to the log, not to a toast.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(providers): read the whole ACP SDK error echo, and log no request body

The ACP SDK writes its copy of an error reply over several stderr lines.
A line in it, such as `message: "Internal error",`, still showed a
"Provider error" toast. Follow the brackets to the end of the echo, and
log only the method and the error text: the request body holds MCP
headers and environment values.

Also correct the `resolveClineCli` comment about the minimum version,
and wrap two long comments in the Team API provider filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(providers): keep a long ACP SDK error echo out of the toast

The echo reader stopped after 64 lines, so the error lines of a request
with many MCP servers became a toast. The echo now ends only when its
brackets close or when the next echo starts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 12:41:15 +02:00
NBandClaude Opus 5.5 37b75bf488 Add Cursor CLI as a built-in provider (#1214)
* Add Cursor CLI as a built-in provider

OpenBot downloads and pins the Cursor CLI and starts `cursor-agent acp`.
Sign-in is the ACP `cursor_login` method in the browser, or
CURSOR_API_KEY. A system `cursor-agent` is used until a download exists.

- The runtime manager pins build 2026.09.28-64d2043 for five targets,
  checks each file hash, and finds new builds in the ACP registry. The
  Windows zip must stay in its `dist-package` folder.
- A confined process gets its own CURSOR_CONFIG_DIR, because the CLI
  writes cli-config.json when a session starts. The user's settings,
  hooks, rules and MCP files stay protected.
- Migration 24 adds `cursor` to projection_provider_sessions.
- No Team API protocol shows Cursor to a peer.
- The Cursor preset for custom ACP agents is removed. Saved agents with
  the id `cursor` stay valid.
- Cursor gets a row in More providers, a logo, and i18n text. README,
  ARCHITECTURE, RELEASING and PRIVACY describe it.

Fixes #1209

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix the review findings for the Cursor provider

- Confinement: protect `.workspace-trusted` and `mcp-approvals.json` in
  each project folder of `~/.cursor/projects`.
- Team API: refuse a new agent (create, template, marketplace, import)
  that the host would start on a hidden provider. Hide a body agent ID,
  the skills-changed event and the status CLI version of a hidden agent
  or provider.
- Setup on a joined server shows no Cursor row, as Settings does.
- Sign-in stops the whole process tree on Windows.
- Accept Cursor's `YYYY.MM.DD-HH-MM-SS-<commit>` build form, and order
  builds by date and time.
- Docs and changelog corrections.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Do not export parseCursorVersion

Only cli.ts uses it. The knip check in CI failed on the unused export.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 15:26:14 +02:00
NB 1bcd679adb Add an Intel (x64) macOS build (#1087)
* Add an Intel (x64) macOS build

Fixes #1070.

- Build ARM64 on macos-14 and x64 on macos-15-intel in release.yml. The Host PKG stays ARM64 only.
- Merge the two latest-mac.yml files in the publish job, so each Mac gets the update for its
  architecture. The ARM64 path and sha512 stay the default.
- Add darwin-x64 to the provider runtimes, cua-driver and the remote desktop runtime.
- Increase the remote desktop recipeVersion to 13 and remove the old pin. The branch must pin the
  new runtime release before merge.
- Remove the arch list from the mac targets in electron-builder.yml, so --x64 builds x64.
- Send /download/macos?arch=x64 to the Intel DMG.

* Link the compiler runtime into the Intel Moonlight streamer

rustc links with -nodefaultlibs, so libclang_rt.osx.a is not on the link line. On x86_64,
moonlight-common-c calls __builtin_cpu_supports, and the streamer link fails with an undefined
___cpu_model.

* Pin the remote desktop runtime with the Intel macOS build

Pin remote-desktop-runtime-29cff66db32af6debc1ff179dd754e953c6fb750b5155e17015cd7e54e66eb78 from
workflow run 36442402655. It has darwin-arm64, darwin-x64 and win32-x64 artifacts.

* Keep the release token in the publish step and build Whisper for macOS 13

- Set GH_TOKEN only on the step that publishes the release. The earlier
  steps now run dependency code.
- Build whisper-cli with a macOS 13.0 deployment target. Without it,
  clang uses the runner's macOS version.
- Tell users to install the runtime on any Mac, not only Apple silicon.
- List all provider targets in docs/ARCHITECTURE.md.
2026-09-28 18:31:41 +02:00
NB 1a991d5483 Add Gemini as a provider, and show more providers in onboarding (#921)
* Add Gemini as a provider, and show more providers in onboarding

Gemini uses a Google AI Pro or Ultra plan through Google's Antigravity ACP
server. OpenBot downloads the server on the user's computer, because its
license does not let OpenBot include it. Sign in is an ACP authenticate call
in a separate process. The server runs confined. Team peers do not see
Gemini agents or rows on any protocol.

Onboarding shows ChatGPT, Claude, Grok and OpenCode. A "More providers"
button opens a short dialog with Gemini and the custom provider.

Migration 22 adds antigravity to the agents provider CHECK and keeps all rows.

Closes #904

* Fix CI: remove unused exports, add Gemini to two test fixtures

* Fix the exactOptionalPropertyTypes ratchet for Gemini

* Keep saved endpoints named antigravity, and hide Gemini in remote settings

A custom endpoint saved with the id antigravity before this release made
the whole endpoint list fail after the upgrade. A saved id is now valid
when it was valid at release. A new endpoint still cannot use the name
of a built-in provider.

The settings of a joined server no longer list Gemini, because the Team
API does not carry it.
2026-09-26 21:50:45 +02:00
NB 7f85a67111 Add Linux arm64 builds and managed runtimes (#746)
Add the linux-arm64 target to the runtime lock, the pin and install
scripts, and the provider runtime manager. Build an arm64 AppImage on a
native arm64 runner in the release workflow, with its own updater
manifest, checksums, SBOM and attestation.

Refs #689
2026-09-23 15:54:37 +02:00
NBandClaude Opus 5 87f4888049 Make MCP work on a clean machine: report every drop, ship Bun, close the second config door, sign in natively (#635)
* Make MCP work on a clean machine: report every drop, ship Bun, close the second config door, sign in natively

An MCP server that OpenBot could not hand over used to disappear without a word, and on a machine
with no Node none of them could start at all. Four stages, each shippable alone.

1. Every drop is now a shape, not a `continue`. The three adapters return `McpHandoff<T>` with the
   servers they left out, and `AgentService` reports each new one once: a warning in the log and one
   deduped `mcp_server_not_started` toast with no `agentId`, because the MCP list is machine-scoped.
   `resolveMcpCommand` is memoized per `PATH` and command, so a thread start no longer runs one login
   shell per stdio server, and the Test button clears that cache because it asks about now.

2. Bun 1.4.2 ships as a managed tool runtime, downloaded and sha256-verified by the existing runtime
   manager under its own id space (`toolRuntimes`), not as a fifth provider. Its bin directory is
   appended *last* to the lookup and launch `PATH`, so a user's own Node still wins and no machine
   that works today changes behaviour. `bun run pin:bun-runtime` refreshes the pin at release prep.

3. The panel is authoritative. Claude gets `strictMcpConfig: true`, which drops project `.mcp.json`,
   user settings, plugins and agent frontmatter for MCP only, and the Codex disabled-name sweep moves
   into every thread. Those names join the manifest fingerprint and `CODEX_MCP_ADAPTER_VERSION` is 3,
   so a stale session is replaced once rather than resumed with tools the panel does not show.

4. OpenBot holds the OAuth client itself. A `safeStorage`-encrypted store, an `OAuthClientProvider`
   on the pinned SDK, and a third `openbot://mcp-auth` deep-link variant replace `mcp-remote`, whose
   refresh tokens sat outside `safeStorage` and outside redaction. The token is injected at hand-off
   and never written to a row, and it is recorded in `McpHandoffLog`, which is the point: a CLI that
   quotes the request it failed on no longer prints it. All six bridge listings are now `transport:
   "http"`; Linear's address is corrected to `/mcp`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Close four MCP hand-off gaps the review found

Serialize the OAuth store's read-modify-write, so two servers refreshing in
one hand-off cannot write each other's rotated token away or race the same
temporary file.

Keep the inherited PATH when the managed runtime directory is appended and
there is no login shell to ask. Windows is always that case, and the user's
own npx, python and uvx would otherwise disappear behind the managed one.

Give the OpenCode driver mcpAuthorization, which every other driver already
had: without it a completed native sign-in reached OpenCode with no token.

Redact the token a probe mints between its two attempts. It is on no row, so
only the sign-in provider can name it, and a server that quotes the
credential it refused would otherwise put it on the panel.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Keep one refresh per server, and never delete a sign-in file this build cannot read

A refresh token is single use where the authorization server rotates it, so two
hand-offs refreshing the same server side by side spend the same one twice and
can lose the whole grant. Callers now wait on the exchange already running.

A `clear` while the envelope is unreadable committed an empty map, and an empty
map is a delete: one keychain refusal plus one removed row cost the user every
sign-in on the machine. Both changes now read the file again first, and a clear
that still cannot read it leaves the file alone.

The provider runtime snapshot carries the tool runtimes, so the preload decoder
test has to send them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Refuse an MCP registration while encrypted sign-ins cannot be read

saveClientInformation runs before the user signs in and carries no
tokens. When the envelope holds records this build cannot decrypt,
storing it replaced the file and deleted unrelated credentials even
if the user cancelled. The store now keeps the raw encrypted records
from a failed read and refuses the write, so the file stays as it is
until the keychain answers again. A corrupt file still takes the
replacement path, since it holds nothing worth keeping.

* Fix the four remaining review findings on MCP setup

Migrate catalog bridge rows: rows that still match the six shipped
mcp-remote definitions become native http rows on startup. Exact
matches only; renamed rows and edited arguments stay untouched, and
every other column is kept. The next Test on a converted row signs in
through the browser like a new installation.

Wait for the runtime download in the connection test: the local stdio
test path now awaits ensureToolRuntimesReady before probing, so a
first plugin no longer answers Command not found on a machine that
only needs the Bun download. A failed download still runs the probe.

Spend stored OAuth tokens in remote tests: the Team API route passes
storedCredentials, and the service builds a silent authority whose
signIn stays null. A remote administrator gets the host's working
token instead of a false 401, and no browser opens on the host.

Fold tool runtimes into the Codex fingerprint: a session started
before Bun was ready no longer reads as current once its servers can
start, so the next turn replaces it. Adapter version rides to 4.

* Fix the three new review findings on MCP setup

Bound the OAuth exchanges: a silent refresh now waits at most
MCP_TOKEN_TIMEOUT_MS for the authorization server, then the stored
token answers instead of the thread start or test hanging with it.
The token trade after a browser grant gets the same bound and reports
a timeout instead of holding the test past its deadline. Both bounds
are injectable as refreshTimeoutMs, like signInTimeoutMs.

Launch with the looked-up PATH: mcpLaunchEnvironment applies the
resolved server.path after the configured pairs, so the managed
directories the lookup appended survive into the spawn. The user's
own directories still come first, and a configured PATH still stands
when the lookup answered nothing.

Match the rendered note in the MCP story: the play queries read
Claude only, like mcpProviderLimitNote renders.

* Fix the two new review findings on MCP setup

Wait for Bun only when the test needs it: the local stdio test
resolves the configured command first and downloads only when nothing
names it, so installed interpreters and the user's own npx probe at
once. The wait is bounded at sixty seconds; a stalled transfer keeps
downloading for the next attempt while the probe reports what this
machine starts.

Refuse writes from forgotten OAuth runs: forget counts a generation
per server, and every provider built from then on carries it. A
refresh or sign-in already running when the row is removed finishes
with a refused write instead of restoring the account, so removal
reads complete and re-adding the URL cannot reuse it.

* Fix the three review findings on MCP setup

Wait for the download only when the command needs it: the local
test resolves the configured command first and downloads only when
nothing names it, so installed commands and the user's own npx probe
at once. The wait is bounded at sixty seconds, and failure reaches
the probe instead of replacing it: the download rejection is caught
before the race, so a failed transfer still tests the command on its
own merits.

Compare normalized URLs before deleting shared credentials: removing
a row forgets its sign-in only when no remaining http row normalizes
to the same resource, so https://mcp.stripe.com and
https://mcp.stripe.com/ keep sharing one credential until the last
row goes.

Refresh loaded sessions when Bun becomes ready: the tool runtime's
ready event marks every agent for a runtime refresh, spent through
the existing deferred mechanism before each agent's next turn. Only
Codex needed the fingerprint; Claude, OpenCode and Grok sessions now
pick up newly resolvable servers the same way.

* Share the runtime preparation with the remote MCP routes

The host's Team API routes called AgentService directly and bypassed
every runtime preparation the local branches do: on a host with no
Node, a first server saved, enabled, or tested remotely left npx
unavailable. The IPC handlers' preparation now travels as one shape,
McpToolRuntimePreparation, through the host into the Team API
options, and the save, enable, and test routes share it: fire and
forget on save and enable, the bounded wait for a command nothing
names on test.

* Cover the host preparation in the remote test deadline

The host may wait out the bounded runtime download before its own
probe deadline even starts, so a remote Test carries an explicit
deadline of preparation plus probe plus margin. Without it the
caller's 15-second request limit reported a timeout for a download
that was still running, before the host probed anything.

* Fix the three OAuth review findings on MCP setup

Open the browser only for web pages: the authorization endpoint
arrives in the server's own discovery document, and the SDK accepts
more than web pages, so redirectToAuthorization now requires https
(loopback http for a sign-in server on the user's own machine) and
refuses anything else before openExternal. A file or installed
protocol handler named by a malicious metadata document no longer
opens.

Retain the discovered authorization server: the client provider now
implements the SDK discovery-state members per resource, so a refresh
or a later sign-in reuses the authorization server a previous
exchange found instead of rediscovering at the default locations and
falling back to the MCP origin's token endpoint. Invalidation clears
the retained state with the credentials it belongs to.

Never open a browser for an abandoned sign-in: abandon marks the
run, and a discovery slow enough to outlast the probe finds no
browser to open and no grant to wait out when it finishes.

* Persist OAuth discovery and bound stalled refreshes

Persist the authorization server a sign-in found with the encrypted
credentials: the client provider keeps the server and metadata URLs
in the record, so a refresh or sign-in after a restart reuses them
instead of rediscovering at the default locations and falling back
to the MCP origin's token endpoint. Invalidation clears the retained
state with the credentials it belongs to.

Bound stalled refreshes: the exchange carries an abort tied to the
same deadline as the wait, and a cancelled entry is cleared, so the
next caller starts a fresh exchange instead of joining a request
that never answers and receiving the expired token again.

* Keep OAuth discovery across the sign-in and cancel timed-out trades

Keep discovery-only records: the SDK saves discovery state before
it registers, when the record holds no client and no tokens yet.
The store no longer deletes that write, so the code exchange reuses
the advertised authorization server instead of falling back to
default discovery. An actually empty record still deletes.

Cancel a token trade that outlasts its deadline: the code exchange
carries an abort tied to the same bound as its wait, and writes from
an abandoned run are refused, so a late response cannot store
credentials a later sign-in already replaced.

* Keep OAuth credentials on TLS and out of the failures they cause

Send a credential only over https, or to loopback. `normalizeResource`
cleared the MCP server's own address and `isAuthorizationUrlSafe` cleared
where the browser goes, but neither covered where the code, the PKCE
verifier and the refresh token are posted: discovery names that endpoint,
and an https server naming `http://auth.example.com/token` put all three
in clear text. One fetch guard now covers the refresh and the code
exchange, and checks every redirect hop rather than the first address
alone, so a redirect cannot reach what the document could not name.

Redact every secret an attempt spent, not only its access token. A token
endpoint states a refusal in `error_description`, the SDK makes that text
the error it throws, and the probe puts that text on the panel - so a
server quoting back the code, the verifier, the refresh token or the
client secret leaked it. The sign-in keeps a ledger of what it handled as
it goes, because reading the store after the failure is too late: a
recoverable refusal has already cleared the value that was spent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Guard the transport's own OAuth, its redirects, and its removals

Give the probe transport the same fetch. A 401 on a stored token the
probe believed was still valid makes the transport call `auth()` itself,
through a fetch of its own - so the refresh token and the client secret
went to the discovered token endpoint unchecked, including a plain-text
one. A provider is only attached to a URL that already passed
`normalizeResource`, so the guard refuses nothing the probe could
otherwise reach.

Drop the credentials when a redirect leaves the origin. Following
redirects by hand took over a job `fetch` had been doing: it strips
`Authorization` across origins, and the SDK sends
`Authorization: Basic` for a client with a secret. A token endpoint
redirecting elsewhere would have handed that origin the secret, and the
body holding the code or the refresh token with it. Discovery carries
neither, so an issuer may still point at the server that answers for it.

Guard removals as writes are guarded. The SDK answers `invalid_client`
by invalidating everything, and `clear` had neither the generation nor
the abandonment check - so a refusal arriving after a probe timed out
could delete the account a later sign-in had already stored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 18:43:02 +02:00
NBandClaude Opus 5 8beb0a9866 feat: ship a Linux x64 AppImage (#459)
* feat: ship a Linux x64 AppImage

OpenBot shipped macOS and Windows only. This adds the third target as an
AppImage, the one Linux format electron-updater can update in place.

- Pin `linux-x64` artifacts for codex, claude, opencode, and grok, so the
  in-app provider download works as it does on macOS.
- Discover a CLI through `$SHELL` on Linux instead of `/bin/zsh`, which most
  distributions do not install, and look in `/usr/bin` as well.
- Register the `openbot://` scheme on Linux, and update in place only when
  `APPIMAGE` says the app runs from an AppImage.
- Report voice transcription as unavailable when the build carries no whisper
  binary, rather than failing at transcribe time. The composer offers no
  microphone on Linux.
- Move the whisper and remote-desktop resources out of the shared
  `extraResources` list, because neither is built for Linux.
- Ship an AppArmor profile for the Ubuntu 23.10 and Debian 13 user-namespace
  restriction. `--no-sandbox` stays out of the product and the documentation.
- Add the release job, the package verifier, the download route, and the
  install and troubleshooting sections.

Remote desktop stays unavailable on Linux, and the AppImage is unsigned, as
the Windows installer is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(linux): install a desktop entry and keep the sandbox on in CI

The protocol registration on Linux goes through `xdg-settings`, which can only
name a desktop entry that already exists. An AppImage has none, so the first
start now writes `~/.local/share/applications/openbot.desktop` with an `Exec`
that points at the running AppImage and accepts `%U`, and a failed registration
is logged instead of ignored.

Ubuntu 24.04 restricts unprivileged user namespaces through AppArmor, so the
release job loads a narrow profile for the verification executable and gives the
SUID helper the ownership a package manager would give it. `--no-sandbox` stays
out of the tree: the launch check must prove what a real install does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(linux): keep the launcher icon after the AppImage unmounts

An AppImage mounts its resources in a temporary directory the runtime removes on
exit, so a desktop entry that names the packaged icon loses it as soon as OpenBot
is not running. The first start now copies the icon to `<data home>/icons` and
names the copy. A copy that fails still leaves the entry, because the entry is
what registers the invitation scheme.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-12 15:55:50 +02:00
NBandClaude Opus 5 59542e1ae6 feat: download OpenCode, run its free models without an account (#405)
* feat: download OpenCode, run its free models without an account

OpenCode was the only provider OpenBot did not manage: Install opened
opencode.ai/docs and left the user to install a CLI by hand, and every
provider row told them to run `opencode auth login`.

- Pin and download the OpenCode CLI like the other three providers, with
  sha256 and byte sizes in native-runtime.lock.json plus a
  `pin:opencode-runtime` refresh script. The Install button is gone.
- Run the free models with no account and no sign-in. `opencode acp`
  initializes, lists 7 free OpenCode Zen models and completes a turn with
  zero credentials, so `#signedIn` is derived from the models
  `session/new` returns rather than from a credential.
- Add an optional OpenCode Zen key, encrypted by safeStorage in a 0o600
  envelope under userData. Only a boolean crosses IPC; no getter returns
  the key, and it is excluded from every export, log, and diagnostics
  report. `AcpProviderOptions.extraEnv` is read at each spawn so a key
  saved in Settings reaches the next process.
- Keep an OpenCode CLI the user installed themselves, with an update
  offer and never a forced download.
- Leave the `opencode-go/` models out of the picker while OpenBot is the
  one supplying the key. OpenCode reports Zen and Go as one catalog on
  two endpoints, and a Zen key does not buy Go, so those models answered
  every prompt with "Invalid API key.".

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: default a new OpenCode agent to a free model

OpenCode reports the third-party services the user signed in to before its
own, and a provider with no `defaultProviderModel` runs the first model of
its catalog. So a new agent picked `openai/gpt-5.3-codex-spark` and its
first message failed with "Token refresh failed: 401" while the free models
sat further down the list, behind no account at all.

`opencodeModelRank` orders the catalog in four tiers: free with Muse first,
the rest of the free tier, OpenCode's own paid models, then anything behind
a separate sign-in whose token OpenBot can neither see nor refresh. The sort
is stable, so the CLI's own order survives inside one tier.

Free is a display name ending in "Free": `model/list` carries no price and
neither Zen endpoint authenticates, so the name is the only signal. That was
already how the picker badge worked, so `isFreeOpencodeModelName` now holds
it once and both callers share it -- a badge and a default cannot disagree
about what costs money.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: keep the OpenCode key consistent with the process that uses it

- Startup survives an unreadable key file. The store reports it as
  `unreadable`, OpenCode runs keyless, Settings says so, and the file
  stays until the user saves or removes a key.
- The store writes a change to disk before it changes memory, so a
  failed write changes neither and a retry runs again.
- A key change runs inside the provider's serialized connection
  command. It refuses a busy provider before it writes, holds
  deliveries while it writes, and reports success only after a new
  process runs with the new key.
- `ProviderApiKeyState` carries a status instead of a boolean.
- Add `opencode` to the preload runtime-snapshot test fixture.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix: start a managed Windows CLI without a shell

A managed CLI lives under userData, which holds a space for a user such as
C:\Users\Jane Doe and for the OpenBot Dev profile. AcpAgentClient spawned it
with shell: true on Windows, so cmd.exe split the unquoted path and the
downloaded OpenCode or Grok CLI never connected.

cliSpawnTarget now starts a native executable with no shell, and runs a .cmd
or .bat shim through cmd.exe with the verbatim quoting readCliVersion uses.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 13:39:09 +02:00
NB 8221ce8461 Add lazy provider runtime downloads for 0.3.5 (#51)
* Add lazy provider runtime downloads for 0.3.5

* Keep provider reconnect action visible
2026-08-27 13:52:34 +02:00
NB 2e0ca2561c Bundle provider CLIs and harden onboarding (#35)
* feat: bundle agent providers and improve onboarding

* fix: isolate agent runtime lock validation

* chore: restart CI

* chore: retrigger CI
2026-08-26 18:20:56 +02:00