@opencode/plugin-browser 0.0.0-dev-20783 → 0.0.0-dev-20786

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.
@@ -61,7 +61,7 @@ export declare const make: (ctx: Pick<Context, "location" | "rpc" | "agent" | "e
61
61
  readonly type: "click";
62
62
  readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
63
63
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
64
- readonly count?: 2 | 1 | undefined;
64
+ readonly count?: 1 | 2 | undefined;
65
65
  readonly button?: "left" | "right" | "middle" | undefined;
66
66
  readonly modifiers?: readonly ("Alt" | "Control" | "Meta" | "Shift")[] | undefined;
67
67
  } | {
@@ -159,7 +159,7 @@ export declare const make: (ctx: Pick<Context, "location" | "rpc" | "agent" | "e
159
159
  readonly type: "network.list";
160
160
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
161
161
  readonly limit?: number | undefined;
162
- readonly resourceType?: "websocket" | "image" | "media" | "document" | "other" | "fetch" | "stylesheet" | "font" | "script" | "xhr" | "eventsource" | "manifest" | undefined;
162
+ readonly resourceType?: "websocket" | "image" | "media" | "document" | "other" | "stylesheet" | "font" | "script" | "xhr" | "fetch" | "eventsource" | "manifest" | undefined;
163
163
  readonly urlContains?: string | undefined;
164
164
  } | {
165
165
  readonly id: string;
package/dist/rpc.js CHANGED
@@ -15,13 +15,13 @@ const limit = optional(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum:
15
15
  const timeoutMs = optional(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 30_000 }))).annotate({
16
16
  description: "Timeout in milliseconds, 1–30000. Default 10000.",
17
17
  });
18
- export const TabID = Schema.String.check(Schema.isPattern(/^tab_[a-f0-9-]{36}$/))
18
+ export const TabID = Schema.String.check(Schema.isPattern(/^tab_[a-f0-9-]{36}$/u))
19
19
  .pipe(Schema.brand("Browser.TabID"))
20
20
  .annotate({ identifier: "Browser.TabID" });
21
- export const Ref = Schema.String.check(Schema.isPattern(/^@?e[1-9][0-9]*$/))
21
+ export const Ref = Schema.String.check(Schema.isPattern(/^@?e[1-9][0-9]*$/u))
22
22
  .pipe(Schema.brand("Browser.Ref"))
23
23
  .annotate({ identifier: "Browser.Ref" });
24
- export const FileID = Schema.String.check(Schema.isPattern(/^file_[a-f0-9-]{36}$/))
24
+ export const FileID = Schema.String.check(Schema.isPattern(/^file_[a-f0-9-]{36}$/u))
25
25
  .pipe(Schema.brand("Browser.FileID"))
26
26
  .annotate({ identifier: "Browser.FileID" });
27
27
  const tab = {
@@ -294,7 +294,7 @@ export const Outcome = Schema.Union([
294
294
  const attachment = { sessionID: Session.ID, connectionID: Schema.String };
295
295
  const request = { ...attachment, requestID: Schema.String };
296
296
  export const TunnelTarget = Schema.Struct({
297
- host: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(253), Schema.isPattern(/^[a-zA-Z0-9._:%-]+$/)),
297
+ host: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(253), Schema.isPattern(/^[a-zA-Z0-9._:%-]+$/u)),
298
298
  port: Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 65_535 })),
299
299
  });
300
300
  const tunnel = { ...attachment, tunnelID: short };
package/dist/tools.d.ts CHANGED
@@ -60,7 +60,7 @@ export declare const register: (ctx: Pick<Context, "location" | "tool">, connect
60
60
  readonly type: "click";
61
61
  readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
62
62
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
63
- readonly count?: 2 | 1 | undefined;
63
+ readonly count?: 1 | 2 | undefined;
64
64
  readonly button?: "left" | "right" | "middle" | undefined;
65
65
  readonly modifiers?: readonly ("Alt" | "Control" | "Meta" | "Shift")[] | undefined;
66
66
  } | {
@@ -158,7 +158,7 @@ export declare const register: (ctx: Pick<Context, "location" | "tool">, connect
158
158
  readonly type: "network.list";
159
159
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
160
160
  readonly limit?: number | undefined;
161
- readonly resourceType?: "websocket" | "image" | "media" | "document" | "other" | "fetch" | "stylesheet" | "font" | "script" | "xhr" | "eventsource" | "manifest" | undefined;
161
+ readonly resourceType?: "websocket" | "image" | "media" | "document" | "other" | "stylesheet" | "font" | "script" | "xhr" | "fetch" | "eventsource" | "manifest" | undefined;
162
162
  readonly urlContains?: string | undefined;
163
163
  } | {
164
164
  readonly id: string;
package/dist/tools.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * as BrowserTools from "./tools.js";
2
2
  import { Tool } from "@opencode/schema/tool";
3
- import { Effect, Encoding, Result, Schema } from "effect";
3
+ import { Effect, Result, Schema } from "effect";
4
+ import { Base64 } from "effect/encoding";
4
5
  import { BrowserFiles } from "./files.js";
5
6
  import { Browser } from "./rpc.js";
6
7
  export const register = Effect.fn("BrowserTools.register")(function* (ctx, connection) {
@@ -77,7 +78,7 @@ function exportResult(output, files) {
77
78
  .filter((file) => file.mime.startsWith("image/"))
78
79
  .map((file) => ({
79
80
  type: "file",
80
- uri: `data:${file.mime};base64,${Encoding.encodeBase64(file.data)}`,
81
+ uri: `data:${file.mime};base64,${Base64.encode(file.data)}`,
81
82
  mime: file.mime,
82
83
  name: file.name,
83
84
  })),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "@opencode/plugin-browser",
4
- "version": "0.0.0-dev-20783",
4
+ "version": "0.0.0-dev-20786",
5
5
  "description": "OpenCode's desktop browser plugin",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -36,9 +36,9 @@
36
36
  "test": "bun test"
37
37
  },
38
38
  "dependencies": {
39
- "@opencode/plugin": "0.0.0-dev-20783",
40
- "@opencode/schema": "0.0.0-dev-20783",
41
- "effect": "4.0.0-rc.112"
39
+ "@opencode/plugin": "0.0.0-dev-20786",
40
+ "@opencode/schema": "0.0.0-dev-20786",
41
+ "effect": "4.0.0-rc.118"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@tsconfig/bun": "1.0.9",