Verification: 1d265df3cfae49026ec4202fe88e9cce83ad1ca9 and accompanying changes;
upstream inspected at v1.18.34 (aec0b9a6d8898f68f923aaf08b7306d931fd9d76).
Re-read cited sources when changing behavior.
[FACT] The embedded opencode profile requires opencode and github, launches
opencode --auto, and uses opencode-ai for npm versions/update commands.
--auto approves requests not explicitly denied by OpenCode configuration;
OpenShell supplies confinement. The existing tab icon is OC.
1 2 3 4
[FACT] The feature installs ripgrep and opencode-ai@latest at the managed npm
prefix. Upstream postinstall selects the platform/CPU package and copies or
hardlinks its native binary to opencode-ai/bin/opencode.exe, including Linux.
Consequently network.opencode attributes egress to that executable, not Node.
The compiled Bun binary can also execute JavaScript with BUN_BE_BUN=1: this
is a process-path grant, not an assertion that only trusted agent code can use it.
5 6 7 8
[FACT] The capability grants HTTPS to registry.npmjs.org, opencode.ai, api.anthropic.com,
api.openai.com, auth.openai.com, chatgpt.com,
generativelanguage.googleapis.com and openrouter.ai. This covers Zen and
common provider APIs, ChatGPT OAuth and npm plugins; it is not arbitrary
web egress. Custom registries/providers require explicit capabilities. Shell PTYs
remain opt-in. Policy goldens cover isolated, GitHub and read-only compositions.
7 8 9 10
[FACT] The account's OpenCode leaf binds at
/home/sandbox/.local/share/opencode. XDG data retains that conventional path;
launch overrides place config, cache, state and npm's download cache beneath that leaf. Config
is config/opencode/opencode.json there. Credentials (auth.json), SQLite
sessions and agent settings therefore use the account mount. Temporary files
under /tmp/opencode are disposable. Import copies only the entire credential
file, including all stored providers; it does not copy host configuration.
1 11 12 13 23
[FACT] Optional auth.import_home_dir chooses the host directory relative to
home; absent it, import retains ~/<basename(state_container_path)>. Preferred
import_files still precede credential_file, with duplicates removed.
OpenCode selects .local/share/opencode; custom host XDG roots require --file.
Validation rejects absolute/escaping directories. Active consumers prevent
import; status establishes native-file presence, not provider acceptance.
2 13 14
[FACT] Declared account secrets are OPENCODE_API_KEY, ANTHROPIC_API_KEY,
OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY and OPENROUTER_API_KEY.
They use supervisor environment delivery, never launch argv. Changed secrets
need box recreation. ChatGPT offers a headless device method through
opencode auth login --provider openai --method 'ChatGPT Pro/Plus (headless)';
yoloctl box create opencode-login --agent opencode --account NAME --no-attach
prepares a named box; box exec opencode-login -- opencode auth login ... runs
that explicit login and writes native state. Exec forwards the supplied argv;
managed-session profile environment is not implicitly added.
1 9 15 16
[FACT] Managed launch disables self-updates, model-catalog fetching and automatic
LSP downloads, configures sharing disabled, and exempts loopback from proxies.
The bundled model catalog remains available and updates with the CLI. Embedded
auth plugins stay enabled. Operator guidance is discovered through the existing
~/.agents/skills mount. These settings do not grant more network destinations.
1 17 18 19 21 22
[FACT] Upstream installs @opencode-ai/plugin in configuration directories and
resolves configured npm plugins through bundled Arborist in the native process.
The registry grant permits encoded slashes used by scoped package URLs. npm
lifecycle scripts remain disabled by upstream's ignoreScripts: true; loaded
plugin hooks run within the agent's existing authority. NPM_CONFIG_CACHE keeps
downloads in the account leaf. The fixture requires SDK installation and a local
plugin hook. 1 20 24 25 26 27
[FACT] smoke-opencode tests installation, attributed HTTPS, secret replacement,
import refusal and native state across box/VM replacement. Its local provider
fixture runs the real CLI, checks plugin loading, a shell tool without new PTYs, operator skill
discovery and saved-session resumption. Optional OpenAI credentials enable a real
provider request. These definitions do not establish live image/VM or OAuth
validation; first login, token refresh and interactive terminal behavior require
separate checks. 8 20
- Embedded profile — launch, state and secrets.
- Adapter tests — launch, install, import and completion.
- Upstream TUI CLI — auto approval.
- Icon table — OpenCode defaults.
- Feature recipe — installation.
- Upstream installer — native selection and target.
- Capabilities — network.opencode.
- Isolated smoke — binary/runtime/persistence checks.
- Upstream ChatGPT auth — headless device flow and endpoints.
- Policy tests — compositions and attribution.
- Upstream XDG paths — persistent and temporary directories.
- Upstream auth storage — credential file.
- Import implementation — defaultHostAuthPaths and import.
- Profile validation — validateAuth.
- Secret projection tests — declared keys and argv/label isolation.
- Confined exec — explicit argv through OpenShell SSH.
- Upstream catalog — snapshot and fetch control.
- Upstream skills — external skills.
- Upstream config — inline config merge.
- Local provider fixture — real CLI/tool/session checks without real keys.
- Upstream runtime flags — default plugins and LSP control.
- Upstream flag parsing — update and model-fetch flags.
- Upstream database path — SQLite under data.
- Upstream dependency bootstrap — background plugin-SDK installation.
- Upstream npm service — Arborist, script suppression, package resolution and dependency installation.
- Endpoint compiler — REST configuration and encoded slash permission.
- Upstream npm configuration — environment and npm settings.