(args, ctx)
| 245 | description: "Debug plugin loading and connection status.", |
| 246 | args: {}, |
| 247 | async execute(args, ctx) { |
| 248 | if (ctx?.client?.app?.log) { |
| 249 | await ctx.client.app.log({ |
| 250 | service: "opencode-browser", |
| 251 | level: "info", |
| 252 | message: "browser_debug called", |
| 253 | extra: { sessionId, pid: process.pid }, |
| 254 | }); |
| 255 | } |
| 256 | return JSON.stringify({ |
| 257 | loaded: true, |
| 258 | sessionId, |
| 259 | pid: process.pid, |
| 260 | backend: USE_AGENT_BACKEND ? "agent-browser" : "extension", |
| 261 | agentSession: agentBackend?.session ?? null, |
| 262 | agentConnection: agentBackend?.connection ?? null, |
| 263 | agentBrowserVersion: agentBackend?.getVersion?.() ?? null, |
| 264 | pluginVersion: getPackageVersion(), |
| 265 | timestamp: new Date().toISOString(), |
| 266 | }); |
| 267 | }, |
| 268 | }), |
| 269 | |
| 270 | browser_version: tool({ |
nothing calls this directly
no test coverage detected