opencode-apex 0.2.6 → 0.3.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 +13 -0
- package/README.md +10 -6
- package/core/config.ts +1 -1
- package/docs/BROWSER.md +14 -2
- package/docs/CONFIG.md +3 -2
- package/docs/TROUBLESHOOTING.md +5 -2
- package/index.ts +11 -4
- package/opencode-apex.jsonc +3 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ All notable changes to `opencode-apex`. Format based on
|
|
|
5
5
|
|
|
6
6
|
## [Unreleased]
|
|
7
7
|
|
|
8
|
+
## [0.3.0] — 2026-11-25
|
|
9
|
+
|
|
10
|
+
### Deprecated
|
|
11
|
+
|
|
12
|
+
- **The browser module is deprecated and now off by default.** OpenCode's own
|
|
13
|
+
[browse](https://opencode.ai/product/browse) (an MCP server plus a Chromium extension)
|
|
14
|
+
lets agents use your real browser: your tabs and logins, no remote debugging and no
|
|
15
|
+
consent prompt, handoffs for logins and 2FA, tab recordings. With both on, the agent
|
|
16
|
+
got two browser toolsets that overlapped. The module stays for what browse does not do:
|
|
17
|
+
serving OpenCode's `browser.*` tools from a headless or remote Chromium over CDP, and the
|
|
18
|
+
`browser.*` performance captures. Turn it back on with `"modules": { "browser": true }`;
|
|
19
|
+
it logs a deprecation warning. It may be removed in a later release.
|
|
20
|
+
|
|
8
21
|
## [0.2.6] — 2026-11-25
|
|
9
22
|
|
|
10
23
|
### Added
|
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
- event-driven automations (callbacks, webhooks, scheduled watchers that wake an agent up);
|
|
6
6
|
- AI-assisted permission decisions;
|
|
7
7
|
- per-agent meta-permissions;
|
|
8
|
-
-
|
|
8
|
+
- access to OpenCode's temporary directory without prompts;
|
|
9
|
+
- (deprecated) `browser.*` tools driven by a headless or remote Chromium over CDP. To let
|
|
10
|
+
agents use your own browser, use OpenCode's [browse](https://opencode.ai/product/browse).
|
|
9
11
|
|
|
10
12
|
> [!IMPORTANT]
|
|
11
13
|
> **OpenCode V2 only (OpenCode ≥ 2.1).** apex is written against the V2 plugin runtime
|
|
@@ -58,13 +60,13 @@ apex is one plugin with six independent modules. Each one can be switched on or
|
|
|
58
60
|
| **Events** | Lets programs outside OpenCode (scripts, cron jobs, webhooks, n8n…) notify an agent. **Subscriptions** decide which session receives what. `tools.run` lets those programs use OpenCode tools. | on | [docs/EVENTS.md](docs/EVENTS.md) |
|
|
59
61
|
| **Advisor** | When a tool call needs permission ("ask"), a small dedicated agent decides `allow` or `deny`, so you aren't asked about every step. For `kill`/`pkill` it is told whose process each target is (read from `/proc`). | on | [docs/ADVISOR.md](docs/ADVISOR.md) |
|
|
60
62
|
| **Guard** | Meta-permissions per agent, tool and path, with a report of what was attempted and decided. | **off** | [docs/GUARD.md](docs/GUARD.md) |
|
|
61
|
-
| **Browser** | Serves OpenCode's `browser.*` tools against an **external** Chromium over CDP
|
|
63
|
+
| **Browser** *(deprecated)* | Serves OpenCode's `browser.*` tools against an **external** Chromium over CDP. Superseded by OpenCode's [browse](https://opencode.ai/product/browse) for your own browser; kept for a headless or remote Chromium and for `browser.*` performance captures. | **off** | [docs/BROWSER.md](docs/BROWSER.md) |
|
|
62
64
|
| **Temp access** | Allows `external_directory` in OpenCode's temporary directory (`<tmpdir>/opencode`, `/tmp/opencode` on Linux) without asking. OpenCode tells the model to use it but no rule approves it. A deny you configure for that path still wins. | on | — |
|
|
63
65
|
|
|
64
66
|
Turn modules on or off in `modules`. That is the only switch: there is no `<module>.enabled`.
|
|
65
67
|
|
|
66
68
|
```jsonc
|
|
67
|
-
"modules": { "redact": true, "events": true, "advisor": true, "guard": false, "browser": true }
|
|
69
|
+
"modules": { "redact": true, "events": true, "advisor": true, "guard": false, "browser": false, "tempAccess": true }
|
|
68
70
|
```
|
|
69
71
|
|
|
70
72
|
## Requirements
|
|
@@ -72,7 +74,9 @@ Turn modules on or off in `modules`. That is the only switch: there is no `<modu
|
|
|
72
74
|
- **OpenCode ≥ 2.1** (V2). Nothing else: OpenCode downloads the plugin and its dependencies
|
|
73
75
|
itself.
|
|
74
76
|
- For the automation examples, a shell with `curl` and `sed`.
|
|
75
|
-
- Optional:
|
|
77
|
+
- Optional: `bun` if you want to hack on apex. For browsers, OpenCode's
|
|
78
|
+
[browse](https://opencode.ai/product/browse); apex's deprecated Browser module needs a
|
|
79
|
+
Chromium with remote debugging.
|
|
76
80
|
|
|
77
81
|
## Install
|
|
78
82
|
|
|
@@ -87,7 +91,7 @@ Add apex to the `plugins` list of your OpenCode config:
|
|
|
87
91
|
{
|
|
88
92
|
"package": "opencode-apex",
|
|
89
93
|
"options": {
|
|
90
|
-
"modules": { "redact": true, "events": true, "advisor": true, "guard": false
|
|
94
|
+
"modules": { "redact": true, "events": true, "advisor": true, "guard": false }
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
]
|
|
@@ -238,7 +242,7 @@ curl -sS -u "opencode:$PW" -H 'content-type: application/json' \
|
|
|
238
242
|
| `apex_set_callback_url` | events | Sets or clears the server's public URL (tunnel / reverse proxy), for senders on other machines |
|
|
239
243
|
| `apex_advisor_decide` | advisor | The advisor agent's only tool: `allow` / `deny` + reason |
|
|
240
244
|
| `apex_guard_report` | guard | Report of what each agent attempted and what was decided |
|
|
241
|
-
| `browser_target` | browser | Chooses which browser serves `browser.*`: `external` (CDP), `in-app` (desktop app) or `auto` |
|
|
245
|
+
| `browser_target` | browser (deprecated, off by default) | Chooses which browser serves `browser.*`: `external` (CDP), `in-app` (desktop app) or `auto` |
|
|
242
246
|
|
|
243
247
|
apex also registers two hidden agents: `apex-advisor` for the Advisor and `apex-runner`, the
|
|
244
248
|
technical session behind `tools.run`.
|
package/core/config.ts
CHANGED
|
@@ -262,7 +262,7 @@ export const apexConfigSchema = z.object({
|
|
|
262
262
|
events: z.boolean().optional(),
|
|
263
263
|
advisor: z.boolean().optional(),
|
|
264
264
|
guard: z.boolean().optional(),
|
|
265
|
-
//
|
|
265
|
+
// Obsoleto, desactivado por defecto: para tu navegador, `browse` de OpenCode.
|
|
266
266
|
browser: z.boolean().optional(),
|
|
267
267
|
// Activado por defecto: external_directory sin preguntar en <tmpdir>/opencode.
|
|
268
268
|
tempAccess: z.boolean().optional(),
|
package/docs/BROWSER.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Browser module — drive an external Chromium with OpenCode's `browser` tools
|
|
2
2
|
|
|
3
|
+
> [!WARNING]
|
|
4
|
+
> **Deprecated since 0.3.0, and off by default.** To let agents use **your own browser**,
|
|
5
|
+
> with its tabs and logins, use OpenCode's [browse](https://opencode.ai/product/browse): an
|
|
6
|
+
> MCP server and a Chromium extension made by the OpenCode team. It needs no remote
|
|
7
|
+
> debugging and no consent prompt, hands the tab back to you for logins and 2FA, and works
|
|
8
|
+
> in any MCP client.
|
|
9
|
+
>
|
|
10
|
+
> This module remains for what browse does not do: serving OpenCode's own `browser.*` tools
|
|
11
|
+
> from a **headless or remote Chromium over CDP** (a server, CI, a tunnel), and the
|
|
12
|
+
> `browser.*` performance captures (trace, CPU, heap). Turn it on with
|
|
13
|
+
> `"modules": { "browser": true }`. It may be removed in a later release.
|
|
14
|
+
|
|
3
15
|
> **OpenCode V2 only (2.1 or newer).** OpenCode V1 has a different plugin system and
|
|
4
16
|
> cannot load apex.
|
|
5
17
|
|
|
@@ -40,7 +52,7 @@ descriptions are still OpenCode's own. apex only provides the browser behind the
|
|
|
40
52
|
Port 9333 rather than the usual 9222: a stale `DevToolsActivePort` file from your
|
|
41
53
|
everyday Chrome often still claims 9222.
|
|
42
54
|
|
|
43
|
-
2.
|
|
55
|
+
2. Turn the module on (it is off by default since 0.3.0) and point it at that port:
|
|
44
56
|
|
|
45
57
|
```jsonc
|
|
46
58
|
// in the apex options (see docs/CONFIG.md)
|
|
@@ -205,7 +217,7 @@ fewer items, a shallower snapshot, or only the needed fields.
|
|
|
205
217
|
|
|
206
218
|
```jsonc
|
|
207
219
|
{
|
|
208
|
-
"modules": { "browser": true }, //
|
|
220
|
+
"modules": { "browser": true }, // off by default since 0.3.0
|
|
209
221
|
"browser": {
|
|
210
222
|
"mode": "auto", // in-app | external | auto
|
|
211
223
|
"cdpUrl": "auto", // "auto" | "9222" | "ws://…" | "wss://…"
|
package/docs/CONFIG.md
CHANGED
|
@@ -81,7 +81,7 @@ but are overridden by the local file.
|
|
|
81
81
|
Each module has exactly one switch, under `modules`:
|
|
82
82
|
|
|
83
83
|
```jsonc
|
|
84
|
-
"modules": { "redact": true, "events": true, "advisor": true, "guard": false, "browser": true }
|
|
84
|
+
"modules": { "redact": true, "events": true, "advisor": true, "guard": false, "browser": false, "tempAccess": true }
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
| Module | Default when the key is omitted |
|
|
@@ -90,7 +90,8 @@ Each module has exactly one switch, under `modules`:
|
|
|
90
90
|
| `events` | on |
|
|
91
91
|
| `advisor` | on |
|
|
92
92
|
| `guard` | **off** (it can block the agent if its rules are wrong, so you opt in) |
|
|
93
|
-
| `browser` |
|
|
93
|
+
| `browser` | **off** since 0.3.0 (deprecated: use OpenCode's [browse](https://opencode.ai/product/browse)) |
|
|
94
|
+
| `tempAccess` | on |
|
|
94
95
|
|
|
95
96
|
There is no `<module>.enabled` key. A legacy `events.enabled` is ignored and logs a
|
|
96
97
|
warning. So does `events.listener`: the HTTP listener was removed in 0.2.0, see
|
package/docs/TROUBLESHOOTING.md
CHANGED
|
@@ -181,8 +181,11 @@ apex merges three sources. Each one overrides the previous:
|
|
|
181
181
|
|
|
182
182
|
## The browser tools say "No desktop browser is connected"
|
|
183
183
|
|
|
184
|
-
|
|
185
|
-
|
|
184
|
+
To let agents use your own browser, install OpenCode's
|
|
185
|
+
[browse](https://opencode.ai/product/browse) and use its `browse` tools instead. For a
|
|
186
|
+
headless or remote Chromium, turn on apex's deprecated browser module (`"modules":
|
|
187
|
+
{ "browser": true }`, see [BROWSER.md](BROWSER.md)): a session only gets a browser after
|
|
188
|
+
`browser_target` or `/browser-target` asks for one.
|
|
186
189
|
|
|
187
190
|
---
|
|
188
191
|
|
package/index.ts
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
* - events: RPC event ingestion (callbacks/webhooks), subscriptions, delivery, tools.run
|
|
7
7
|
* - advisor: allow/deny permission decisions via a dedicated agent + side session
|
|
8
8
|
* - guard: meta-permissions per agent/tool/path (opt-in)
|
|
9
|
-
* - browser:
|
|
9
|
+
* - browser: (deprecated, off by default; OpenCode's browse replaces it) browser.* tools
|
|
10
|
+
* against a headless or remote Chromium over CDP (attach on request)
|
|
11
|
+
* - tempAccess: external_directory without prompts in OpenCode's temp directory
|
|
10
12
|
*
|
|
11
13
|
* Built on the official Effect plugin API: https://opencode.ai/v2/docs/build/plugins/effect/
|
|
12
14
|
*/
|
|
@@ -27,7 +29,7 @@ import { compatibilityWarnings } from "./core/compat.js"
|
|
|
27
29
|
import { registerTempAccess } from "./core/temp-access.js"
|
|
28
30
|
|
|
29
31
|
// Plugin version
|
|
30
|
-
const VERSION = "0.
|
|
32
|
+
const VERSION = "0.3.0"
|
|
31
33
|
|
|
32
34
|
interface ModuleConfigs {
|
|
33
35
|
redact: RedactConfig & { enabled: boolean }
|
|
@@ -55,11 +57,13 @@ function getModuleConfigs(userConfig: ApexConfig): ModuleConfigs {
|
|
|
55
57
|
agents: { ...createDefaultGuardConfig().agents, ...userConfig.guard?.agents },
|
|
56
58
|
enabled: userConfig.modules?.guard ?? false,
|
|
57
59
|
},
|
|
58
|
-
//
|
|
60
|
+
// Obsoleto desde 0.3.0, desactivado por defecto: para usar tu navegador está `browse`
|
|
61
|
+
// de OpenCode (https://opencode.ai/product/browse). Queda para Chromium headless o
|
|
62
|
+
// remoto por CDP y para las capturas de rendimiento de `browser.*`.
|
|
59
63
|
browser: {
|
|
60
64
|
...createDefaultBrowserConfig(),
|
|
61
65
|
...userConfig.browser,
|
|
62
|
-
enabled: userConfig.modules?.browser ??
|
|
66
|
+
enabled: userConfig.modules?.browser ?? false,
|
|
63
67
|
},
|
|
64
68
|
}
|
|
65
69
|
}
|
|
@@ -150,6 +154,9 @@ export default Plugin.define({
|
|
|
150
154
|
}
|
|
151
155
|
|
|
152
156
|
if (moduleConfigs.browser.enabled) {
|
|
157
|
+
yield* Effect.logWarning(
|
|
158
|
+
"[apex.browser] deprecated: use OpenCode's browse (https://opencode.ai/product/browse) to drive your browser; keep this module only for a headless or remote Chromium over CDP",
|
|
159
|
+
)
|
|
153
160
|
yield* registerBrowser(ctx, moduleConfigs.browser)
|
|
154
161
|
}
|
|
155
162
|
|
package/opencode-apex.jsonc
CHANGED
|
@@ -30,14 +30,15 @@
|
|
|
30
30
|
// --------------------------------------------------------------------------
|
|
31
31
|
// Modules: turn each one on or off.
|
|
32
32
|
// SINGLE SWITCH: it lives ONLY here — there is no <module>.enabled.
|
|
33
|
-
// An omitted key means the module's default: all ON except guard (OFF).
|
|
33
|
+
// An omitted key means the module's default: all ON except guard and browser (OFF).
|
|
34
34
|
// --------------------------------------------------------------------------
|
|
35
35
|
"modules": {
|
|
36
36
|
"redact": true,
|
|
37
37
|
"events": false,
|
|
38
38
|
"advisor": true,
|
|
39
39
|
"guard": false,
|
|
40
|
-
|
|
40
|
+
// Deprecated: use OpenCode's browse for your browser (docs/BROWSER.md)
|
|
41
|
+
"browser": false,
|
|
41
42
|
// external_directory without asking in <tmpdir>/opencode (OpenCode's temp dir)
|
|
42
43
|
"tempAccess": true
|
|
43
44
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-apex",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Modular plugin for OpenCode V2 (>= 2.1): secret redaction, RPC callbacks/webhooks/watchers that wake agents, tools.run, AI permission advisor, guard meta-permissions,
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Modular plugin for OpenCode V2 (>= 2.1): secret redaction, RPC callbacks/webhooks/watchers that wake agents, tools.run, AI permission advisor, guard meta-permissions, temp-directory access, (deprecated) headless browser over CDP",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Antonio Orizondo Leyva",
|
|
7
7
|
"repository": {
|