@different-ai/opencode-browser 4.0.1 → 4.0.2

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/plugin.ts +32 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@different-ai/opencode-browser",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "Browser automation plugin for OpenCode (native messaging + per-tab ownership).",
5
5
  "type": "module",
6
6
  "bin": {
package/src/plugin.ts CHANGED
@@ -7,6 +7,8 @@ import { dirname, join } from "path";
7
7
  import { spawn } from "child_process";
8
8
  import { fileURLToPath } from "url";
9
9
 
10
+ console.log("[opencode-browser] Plugin loading...", { pid: process.pid });
11
+
10
12
  const __filename = fileURLToPath(import.meta.url);
11
13
  const __dirname = dirname(__filename);
12
14
  const PACKAGE_JSON_PATH = join(__dirname, "..", "package.json");
@@ -165,6 +167,36 @@ const plugin: Plugin = {
165
167
  name: "opencode-browser",
166
168
  tools: [
167
169
 
170
+ tool(
171
+ "browser_debug",
172
+ "Debug plugin loading and connection status.",
173
+ {},
174
+ async () => {
175
+ console.log("[opencode-browser] browser_debug called", { sessionId, pid: process.pid });
176
+ return JSON.stringify({
177
+ loaded: true,
178
+ sessionId,
179
+ pid: process.pid,
180
+ tools: plugin.tools.map(t => t.name),
181
+ timestamp: new Date().toISOString(),
182
+ });
183
+ }
184
+ ),
185
+
186
+ tool(
187
+ "browser_version",
188
+ "Return the installed @different-ai/opencode-browser plugin version.",
189
+ {},
190
+ async () => {
191
+ return JSON.stringify({
192
+ name: "@different-ai/opencode-browser",
193
+ version: getPackageVersion(),
194
+ sessionId,
195
+ pid: process.pid,
196
+ });
197
+ }
198
+ ),
199
+
168
200
  tool(
169
201
  "browser_status",
170
202
  "Check broker/native-host connection status and current tab claims.",