mirror of
https://github.com/nightly-labs/openbot.git
synced 2026-12-02 02:33:10 +08:00
56401c104f34c186ad9f952a5e37381ebebb63cd
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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> |