@opencode/plugin-browser 2.0.32 → 2.1.1

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/dist/tools.d.ts CHANGED
@@ -7,77 +7,76 @@ export declare const register: (ctx: Pick<Context, "location" | "tool">, connect
7
7
  target: (sessionID: string & import("effect/Brand").Brand<"SessionID">, action: {
8
8
  readonly type: "tabs.list";
9
9
  } | {
10
- readonly type: "tabs.open";
11
- readonly url?: string | undefined;
12
- readonly focus?: boolean | undefined;
13
- } | {
14
- readonly type: "tabs.focus";
15
10
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
11
+ readonly type: "back";
16
12
  } | {
17
- readonly type: "tabs.close";
18
13
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
14
+ readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
15
+ readonly type: "check";
16
+ readonly checked: boolean;
19
17
  } | {
20
- readonly type: "preview";
21
- readonly path: string;
22
- } | {
23
- readonly type: "navigate";
24
- readonly url: string;
25
18
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
19
+ readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
20
+ readonly type: "click";
21
+ readonly button?: "left" | "middle" | "right" | undefined;
22
+ readonly count?: 1 | 2 | undefined;
23
+ readonly modifiers?: readonly ("Alt" | "Control" | "Meta" | "Shift")[] | undefined;
26
24
  } | {
27
- readonly type: "back";
28
25
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
26
+ readonly type: "console";
27
+ readonly level?: "debug" | "error" | "info" | "warning" | undefined;
28
+ readonly limit?: number | undefined;
29
29
  } | {
30
- readonly type: "forward";
31
30
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
31
+ readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
32
+ readonly type: "cpu.analyze";
33
+ readonly limit?: number | undefined;
32
34
  } | {
33
- readonly type: "reload";
34
35
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
36
+ readonly type: "cpu.start";
35
37
  } | {
36
- readonly type: "stop";
37
38
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
39
+ readonly type: "cpu.stop";
38
40
  } | {
39
- readonly type: "frames";
40
41
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
42
+ readonly type: "dialog";
43
+ readonly action: "accept" | "dismiss" | "get";
44
+ readonly promptText?: string | undefined;
41
45
  } | {
42
- readonly type: "snapshot";
43
46
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
44
- readonly ref?: (string & import("effect/Brand").Brand<"Browser.Ref">) | undefined;
45
- readonly depth?: number | undefined;
46
- readonly boxes?: boolean | undefined;
47
- readonly frameID?: string | undefined;
47
+ readonly type: "drag";
48
+ readonly from: string & import("effect/Brand").Brand<"Browser.Ref">;
49
+ readonly to: string & import("effect/Brand").Brand<"Browser.Ref">;
48
50
  } | {
49
- readonly type: "find";
50
- readonly text: string;
51
51
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
52
52
  readonly frameID?: string | undefined;
53
- } | {
54
53
  readonly type: "evaluate";
55
- readonly script: string;
56
- readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
57
54
  readonly ref?: (string & import("effect/Brand").Brand<"Browser.Ref">) | undefined;
58
- readonly frameID?: string | undefined;
55
+ readonly script: string;
59
56
  } | {
60
- readonly type: "click";
57
+ readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
61
58
  readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
59
+ readonly type: "files.drop";
60
+ readonly paths: readonly string[];
61
+ } | {
62
62
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
63
- readonly count?: 1 | 2 | undefined;
64
- readonly button?: "left" | "right" | "middle" | undefined;
65
- readonly modifiers?: readonly ("Alt" | "Control" | "Meta" | "Shift")[] | undefined;
63
+ readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
64
+ readonly type: "files.get";
66
65
  } | {
67
- readonly type: "hover";
68
- readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
69
66
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
67
+ readonly type: "files.list";
70
68
  } | {
71
- readonly type: "drag";
72
- readonly from: string & import("effect/Brand").Brand<"Browser.Ref">;
73
- readonly to: string & import("effect/Brand").Brand<"Browser.Ref">;
74
69
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
70
+ readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
71
+ readonly type: "files.upload";
72
+ readonly paths: readonly string[];
75
73
  } | {
74
+ readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
75
+ readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
76
76
  readonly type: "fill";
77
77
  readonly text: string;
78
- readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
79
- readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
80
78
  } | {
79
+ readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
81
80
  readonly type: "fill_form";
82
81
  readonly fields: readonly ({
83
82
  readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
@@ -92,142 +91,143 @@ export declare const register: (ctx: Pick<Context, "location" | "tool">, connect
92
91
  readonly type: "check";
93
92
  readonly checked: boolean;
94
93
  })[];
95
- readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
96
94
  } | {
97
- readonly type: "select";
98
- readonly values: readonly string[];
99
- readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
100
95
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
96
+ readonly frameID?: string | undefined;
97
+ readonly type: "find";
98
+ readonly text: string;
101
99
  } | {
102
- readonly type: "check";
103
- readonly checked: boolean;
104
- readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
105
100
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
101
+ readonly type: "forward";
106
102
  } | {
107
- readonly type: "press";
108
- readonly key: string;
109
103
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
104
+ readonly type: "frames";
110
105
  } | {
111
- readonly type: "scroll";
112
106
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
113
- readonly deltaY: number;
114
- readonly deltaX?: number | undefined;
107
+ readonly type: "heap.compare";
108
+ readonly before: string & import("effect/Brand").Brand<"Browser.FileID">;
109
+ readonly after: string & import("effect/Brand").Brand<"Browser.FileID">;
110
+ readonly limit?: number | undefined;
115
111
  } | {
116
- readonly type: "wait";
117
112
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
118
- readonly condition: "text" | "load" | "textGone";
119
- readonly text?: string | undefined;
120
- readonly timeoutMs?: number | undefined;
121
- readonly frameID?: string | undefined;
113
+ readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
114
+ readonly type: "heap.object";
115
+ readonly id: number;
116
+ readonly limit?: number | undefined;
122
117
  } | {
123
- readonly type: "screenshot";
124
118
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
125
- readonly format?: "png" | "jpeg" | "webp" | undefined;
126
- readonly ref?: (string & import("effect/Brand").Brand<"Browser.Ref">) | undefined;
127
- readonly fullPage?: boolean | undefined;
128
- readonly quality?: number | undefined;
129
- readonly maxWidth?: number | undefined;
119
+ readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
120
+ readonly type: "heap.query";
121
+ readonly name?: string | undefined;
122
+ readonly limit?: number | undefined;
130
123
  } | {
131
- readonly type: "dialog";
132
- readonly action: "get" | "accept" | "dismiss";
133
124
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
134
- readonly promptText?: string | undefined;
125
+ readonly type: "heap.snapshot";
135
126
  } | {
136
- readonly type: "files.upload";
137
- readonly paths: readonly string[];
138
- readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
139
127
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
128
+ readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
129
+ readonly type: "heap.summary";
130
+ readonly limit?: number | undefined;
140
131
  } | {
141
- readonly type: "files.drop";
142
- readonly paths: readonly string[];
143
- readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
144
132
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
133
+ readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
134
+ readonly type: "hover";
145
135
  } | {
146
- readonly type: "files.list";
147
136
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
137
+ readonly type: "lighthouse";
148
138
  } | {
149
- readonly type: "files.get";
150
- readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
151
139
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
140
+ readonly type: "navigate";
141
+ readonly url: string;
152
142
  } | {
153
- readonly type: "console";
154
143
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
155
- readonly limit?: number | undefined;
156
- readonly level?: "error" | "info" | "warning" | "debug" | undefined;
144
+ readonly type: "network.get";
145
+ readonly id: string;
146
+ readonly includeBody?: boolean | undefined;
147
+ readonly maxBodyChars?: number | undefined;
157
148
  } | {
158
- readonly type: "network.list";
159
149
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
160
- readonly limit?: number | undefined;
161
- readonly resourceType?: "websocket" | "image" | "media" | "document" | "other" | "stylesheet" | "font" | "script" | "xhr" | "fetch" | "eventsource" | "manifest" | undefined;
150
+ readonly type: "network.list";
162
151
  readonly urlContains?: string | undefined;
152
+ readonly resourceType?: "document" | "eventsource" | "fetch" | "font" | "image" | "manifest" | "media" | "other" | "script" | "stylesheet" | "websocket" | "xhr" | undefined;
153
+ readonly limit?: number | undefined;
163
154
  } | {
164
- readonly id: string;
165
- readonly type: "network.get";
166
155
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
167
- readonly includeBody?: boolean | undefined;
168
- readonly maxBodyChars?: number | undefined;
156
+ readonly type: "press";
157
+ readonly key: string;
158
+ } | {
159
+ readonly type: "preview";
160
+ readonly path: string;
169
161
  } | {
170
- readonly type: "trace.start";
171
162
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
172
- readonly durationMs?: number | undefined;
163
+ readonly type: "reload";
173
164
  } | {
174
- readonly type: "trace.stop";
175
165
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
166
+ readonly type: "screenshot";
167
+ readonly ref?: (string & import("effect/Brand").Brand<"Browser.Ref">) | undefined;
168
+ readonly fullPage?: boolean | undefined;
169
+ readonly format?: "jpeg" | "png" | "webp" | undefined;
170
+ readonly quality?: number | undefined;
171
+ readonly maxWidth?: number | undefined;
176
172
  } | {
177
- readonly type: "trace.analyze";
178
173
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
179
- readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
180
- readonly limit?: number | undefined;
174
+ readonly type: "scroll";
175
+ readonly deltaX?: number | undefined;
176
+ readonly deltaY: number;
181
177
  } | {
182
- readonly type: "cpu.start";
183
178
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
179
+ readonly ref: string & import("effect/Brand").Brand<"Browser.Ref">;
180
+ readonly type: "select";
181
+ readonly values: readonly string[];
184
182
  } | {
185
- readonly type: "cpu.stop";
186
183
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
184
+ readonly frameID?: string | undefined;
185
+ readonly type: "snapshot";
186
+ readonly ref?: (string & import("effect/Brand").Brand<"Browser.Ref">) | undefined;
187
+ readonly depth?: number | undefined;
188
+ readonly boxes?: boolean | undefined;
187
189
  } | {
188
- readonly type: "cpu.analyze";
189
190
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
190
- readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
191
- readonly limit?: number | undefined;
191
+ readonly type: "stop";
192
192
  } | {
193
- readonly type: "heap.snapshot";
194
193
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
194
+ readonly type: "tabs.close";
195
195
  } | {
196
- readonly type: "heap.summary";
197
196
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
198
- readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
199
- readonly limit?: number | undefined;
197
+ readonly type: "tabs.focus";
198
+ } | {
199
+ readonly type: "tabs.open";
200
+ readonly url?: string | undefined;
201
+ readonly focus?: boolean | undefined;
200
202
  } | {
201
- readonly type: "heap.query";
202
203
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
203
204
  readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
204
- readonly name?: string | undefined;
205
+ readonly type: "trace.analyze";
205
206
  readonly limit?: number | undefined;
206
207
  } | {
207
- readonly id: number;
208
- readonly type: "heap.object";
209
208
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
210
- readonly fileID: string & import("effect/Brand").Brand<"Browser.FileID">;
211
- readonly limit?: number | undefined;
209
+ readonly type: "trace.start";
210
+ readonly durationMs?: number | undefined;
212
211
  } | {
213
- readonly type: "heap.compare";
214
- readonly before: string & import("effect/Brand").Brand<"Browser.FileID">;
215
- readonly after: string & import("effect/Brand").Brand<"Browser.FileID">;
216
212
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
217
- readonly limit?: number | undefined;
213
+ readonly type: "trace.stop";
218
214
  } | {
219
- readonly type: "lighthouse";
220
215
  readonly tabID: string & import("effect/Brand").Brand<"Browser.TabID">;
216
+ readonly frameID?: string | undefined;
217
+ readonly type: "wait";
218
+ readonly condition: "load" | "text" | "textGone";
219
+ readonly text?: string | undefined;
220
+ readonly timeoutMs?: number | undefined;
221
221
  }) => Effect.Effect<{
222
222
  tab: {
223
223
  readonly id: string & import("effect/Brand").Brand<"Browser.TabID">;
224
- readonly title: string;
225
224
  readonly url: string;
226
- readonly generation: number;
225
+ readonly title: string;
227
226
  readonly loading: boolean;
227
+ readonly loadError?: string | undefined;
228
228
  readonly canGoBack: boolean;
229
229
  readonly canGoForward: boolean;
230
- readonly loadError?: string | undefined;
230
+ readonly generation: number;
231
231
  } | undefined;
232
232
  inspect: () => Effect.Effect<{
233
233
  readonly resources: readonly string[];
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": "2.0.32",
4
+ "version": "2.1.1",
5
5
  "description": "OpenCode's desktop browser plugin",
6
6
  "type": "module",
7
7
  "license": "MIT",
@@ -32,18 +32,18 @@
32
32
  },
33
33
  "scripts": {
34
34
  "build": "tsc -p tsconfig.build.json",
35
- "typecheck": "tsgo --noEmit -p tsconfig.test.json",
35
+ "typecheck": "tsc --noEmit -p tsconfig.test.json",
36
36
  "test": "bun test"
37
37
  },
38
38
  "dependencies": {
39
- "@opencode/plugin": "2.0.32",
40
- "@opencode/schema": "2.0.32",
39
+ "@opencode/plugin": "2.1.1",
40
+ "@opencode/schema": "2.1.1",
41
41
  "effect": "4.0.1"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@tsconfig/bun": "1.0.9",
45
45
  "@types/bun": "1.4.0",
46
- "@typescript/native-preview": "7.0.0-dev.20251207.1",
47
- "typescript": "5.8.2"
46
+ "@typescript/native": "npm:typescript@7.0.2",
47
+ "typescript": "npm:@typescript/typescript6@6.0.2"
48
48
  }
49
49
  }