@tickernelz/paperclip-pro-shared 2026.1018.0 → 2026.1022.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/dist/.paperclip-build-complete +1 -1
- package/dist/app-definitions/local-browser.json +32 -0
- package/dist/app-definitions-url.test.js +6 -3
- package/dist/app-definitions-url.test.js.map +1 -1
- package/dist/app-definitions.d.ts.map +1 -1
- package/dist/app-definitions.generated.d.ts.map +1 -1
- package/dist/app-definitions.generated.js +3 -2
- package/dist/app-definitions.generated.js.map +1 -1
- package/dist/app-definitions.js +1 -0
- package/dist/app-definitions.js.map +1 -1
- package/dist/app-definitions.test.js +22 -1
- package/dist/app-definitions.test.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/local-browser.d.ts +497 -0
- package/dist/local-browser.d.ts.map +1 -0
- package/dist/local-browser.js +615 -0
- package/dist/local-browser.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const LOCAL_BROWSER_PROTOCOL_VERSION = 1;
|
|
3
|
+
export declare const LOCAL_BROWSER_CONNECTOR_KEY = "local-browser";
|
|
4
|
+
export declare const LOCAL_BROWSER_SKILL_NAME = "local-browser";
|
|
5
|
+
export declare const LOCAL_BROWSER_PAIRING_TTL_MS: number;
|
|
6
|
+
export declare const LOCAL_BROWSER_CALL_TIMEOUT_MS = 30000;
|
|
7
|
+
export declare const LOCAL_BROWSER_SNAPSHOT_DEFAULT_NODES = 120;
|
|
8
|
+
export declare const LOCAL_BROWSER_SNAPSHOT_MAX_NODES = 400;
|
|
9
|
+
export declare const LOCAL_BROWSER_TEXT_DEFAULT_CHARS = 8000;
|
|
10
|
+
export declare const LOCAL_BROWSER_TEXT_MAX_CHARS = 40000;
|
|
11
|
+
export declare const LOCAL_BROWSER_SCREENSHOT_MAX_BYTES: number;
|
|
12
|
+
export declare const LOCAL_BROWSER_VIEWER_FRAME_INTERVAL_MS = 1000;
|
|
13
|
+
/** Viewer frame and input coordinates are CSS pixels of the page viewport, never device pixels. */
|
|
14
|
+
export declare const LOCAL_BROWSER_VIEWER_COORDINATE_SPACE = "css-pixels";
|
|
15
|
+
export declare const LOCAL_BROWSER_TIERS: readonly ["refine", "full"];
|
|
16
|
+
export type LocalBrowserTier = (typeof LOCAL_BROWSER_TIERS)[number];
|
|
17
|
+
export declare const localBrowserTierSchema: z.ZodEnum<{
|
|
18
|
+
full: "full";
|
|
19
|
+
refine: "refine";
|
|
20
|
+
}>;
|
|
21
|
+
export declare const LOCAL_BROWSER_CLIENTS: readonly ["chromium", "firefox"];
|
|
22
|
+
export type LocalBrowserClient = (typeof LOCAL_BROWSER_CLIENTS)[number];
|
|
23
|
+
export declare const localBrowserClientSchema: z.ZodEnum<{
|
|
24
|
+
chromium: "chromium";
|
|
25
|
+
firefox: "firefox";
|
|
26
|
+
}>;
|
|
27
|
+
export declare const LOCAL_BROWSER_ERROR_CODES: readonly ["local_browser_not_paired", "local_browser_extension_unavailable", "local_browser_origin_denied", "local_browser_tier_denied", "local_browser_tab_missing", "local_browser_ref_stale", "local_browser_element_missing", "local_browser_timeout", "local_browser_navigation_blocked", "local_browser_protocol_error", "local_browser_result_too_large", "local_browser_unsupported"];
|
|
28
|
+
export type LocalBrowserErrorCode = (typeof LOCAL_BROWSER_ERROR_CODES)[number];
|
|
29
|
+
export declare const localBrowserToolErrorSchema: z.ZodObject<{
|
|
30
|
+
code: z.ZodEnum<{
|
|
31
|
+
local_browser_element_missing: "local_browser_element_missing";
|
|
32
|
+
local_browser_extension_unavailable: "local_browser_extension_unavailable";
|
|
33
|
+
local_browser_navigation_blocked: "local_browser_navigation_blocked";
|
|
34
|
+
local_browser_not_paired: "local_browser_not_paired";
|
|
35
|
+
local_browser_origin_denied: "local_browser_origin_denied";
|
|
36
|
+
local_browser_protocol_error: "local_browser_protocol_error";
|
|
37
|
+
local_browser_ref_stale: "local_browser_ref_stale";
|
|
38
|
+
local_browser_result_too_large: "local_browser_result_too_large";
|
|
39
|
+
local_browser_tab_missing: "local_browser_tab_missing";
|
|
40
|
+
local_browser_tier_denied: "local_browser_tier_denied";
|
|
41
|
+
local_browser_timeout: "local_browser_timeout";
|
|
42
|
+
local_browser_unsupported: "local_browser_unsupported";
|
|
43
|
+
}>;
|
|
44
|
+
message: z.ZodString;
|
|
45
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
46
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
47
|
+
}, z.core.$strict>;
|
|
48
|
+
export type LocalBrowserToolError = z.infer<typeof localBrowserToolErrorSchema>;
|
|
49
|
+
export declare const LOCAL_BROWSER_CURSOR_PATTERN: RegExp;
|
|
50
|
+
export declare const localBrowserCursorSchema: z.ZodString;
|
|
51
|
+
export declare const localBrowserRefSchema: z.ZodString;
|
|
52
|
+
export declare const localBrowserTabSchema: z.ZodObject<{
|
|
53
|
+
tabId: z.ZodNumber;
|
|
54
|
+
windowId: z.ZodOptional<z.ZodNumber>;
|
|
55
|
+
title: z.ZodString;
|
|
56
|
+
url: z.ZodString;
|
|
57
|
+
active: z.ZodBoolean;
|
|
58
|
+
status: z.ZodOptional<z.ZodString>;
|
|
59
|
+
}, z.core.$strict>;
|
|
60
|
+
export type LocalBrowserTab = z.infer<typeof localBrowserTabSchema>;
|
|
61
|
+
export declare const localBrowserSessionSchema: z.ZodObject<{
|
|
62
|
+
sessionId: z.ZodString;
|
|
63
|
+
connectionId: z.ZodString;
|
|
64
|
+
client: z.ZodEnum<{
|
|
65
|
+
chromium: "chromium";
|
|
66
|
+
firefox: "firefox";
|
|
67
|
+
}>;
|
|
68
|
+
clientVersion: z.ZodString;
|
|
69
|
+
label: z.ZodString;
|
|
70
|
+
profileName: z.ZodNullable<z.ZodString>;
|
|
71
|
+
ownerUserId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
72
|
+
tier: z.ZodEnum<{
|
|
73
|
+
full: "full";
|
|
74
|
+
refine: "refine";
|
|
75
|
+
}>;
|
|
76
|
+
connectedAt: z.ZodString;
|
|
77
|
+
lastSeenAt: z.ZodString;
|
|
78
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
79
|
+
tabId: z.ZodNumber;
|
|
80
|
+
windowId: z.ZodOptional<z.ZodNumber>;
|
|
81
|
+
title: z.ZodString;
|
|
82
|
+
url: z.ZodString;
|
|
83
|
+
active: z.ZodBoolean;
|
|
84
|
+
status: z.ZodOptional<z.ZodString>;
|
|
85
|
+
}, z.core.$strict>>;
|
|
86
|
+
controlledByViewer: z.ZodBoolean;
|
|
87
|
+
}, z.core.$strict>;
|
|
88
|
+
export type LocalBrowserSession = z.infer<typeof localBrowserSessionSchema>;
|
|
89
|
+
export declare const localBrowserTargetSchema: z.ZodObject<{
|
|
90
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
91
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
}, z.core.$strict>;
|
|
93
|
+
export declare const localBrowserOpenInputSchema: z.ZodObject<{
|
|
94
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
95
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
96
|
+
url: z.ZodOptional<z.ZodString>;
|
|
97
|
+
newTab: z.ZodOptional<z.ZodBoolean>;
|
|
98
|
+
active: z.ZodOptional<z.ZodBoolean>;
|
|
99
|
+
}, z.core.$strict>;
|
|
100
|
+
export declare const localBrowserNavigateInputSchema: z.ZodObject<{
|
|
101
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
102
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
103
|
+
url: z.ZodOptional<z.ZodString>;
|
|
104
|
+
back: z.ZodOptional<z.ZodBoolean>;
|
|
105
|
+
forward: z.ZodOptional<z.ZodBoolean>;
|
|
106
|
+
reload: z.ZodOptional<z.ZodBoolean>;
|
|
107
|
+
waitUntil: z.ZodOptional<z.ZodEnum<{
|
|
108
|
+
domcontentloaded: "domcontentloaded";
|
|
109
|
+
load: "load";
|
|
110
|
+
networkidle: "networkidle";
|
|
111
|
+
}>>;
|
|
112
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
}, z.core.$strict>;
|
|
114
|
+
export declare const localBrowserSnapshotInputSchema: z.ZodObject<{
|
|
115
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
116
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
117
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
118
|
+
maxNodes: z.ZodOptional<z.ZodNumber>;
|
|
119
|
+
includeText: z.ZodOptional<z.ZodBoolean>;
|
|
120
|
+
includeHidden: z.ZodOptional<z.ZodBoolean>;
|
|
121
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
122
|
+
}, z.core.$strict>;
|
|
123
|
+
export declare const LOCAL_BROWSER_ACTIONS: readonly ["click", "dblclick", "type", "press", "hover", "focus", "check", "uncheck", "select", "scroll", "scroll_into_view"];
|
|
124
|
+
export type LocalBrowserAction = (typeof LOCAL_BROWSER_ACTIONS)[number];
|
|
125
|
+
export declare const localBrowserActInputSchema: z.ZodObject<{
|
|
126
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
127
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
128
|
+
action: z.ZodEnum<{
|
|
129
|
+
check: "check";
|
|
130
|
+
click: "click";
|
|
131
|
+
dblclick: "dblclick";
|
|
132
|
+
focus: "focus";
|
|
133
|
+
hover: "hover";
|
|
134
|
+
press: "press";
|
|
135
|
+
scroll: "scroll";
|
|
136
|
+
scroll_into_view: "scroll_into_view";
|
|
137
|
+
select: "select";
|
|
138
|
+
type: "type";
|
|
139
|
+
uncheck: "uncheck";
|
|
140
|
+
}>;
|
|
141
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
142
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
143
|
+
text: z.ZodOptional<z.ZodString>;
|
|
144
|
+
key: z.ZodOptional<z.ZodString>;
|
|
145
|
+
value: z.ZodOptional<z.ZodString>;
|
|
146
|
+
values: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
147
|
+
deltaY: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
deltaX: z.ZodOptional<z.ZodNumber>;
|
|
149
|
+
submit: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
151
|
+
}, z.core.$strict>;
|
|
152
|
+
export declare const localBrowserReadInputSchema: z.ZodObject<{
|
|
153
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
154
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
156
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
157
|
+
html: "html";
|
|
158
|
+
markdown: "markdown";
|
|
159
|
+
text: "text";
|
|
160
|
+
}>>;
|
|
161
|
+
maxChars: z.ZodOptional<z.ZodNumber>;
|
|
162
|
+
}, z.core.$strict>;
|
|
163
|
+
export declare const localBrowserScreenshotInputSchema: z.ZodObject<{
|
|
164
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
165
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
166
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
167
|
+
fullPage: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
}, z.core.$strict>;
|
|
169
|
+
export declare const localBrowserWaitInputSchema: z.ZodObject<{
|
|
170
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
171
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
172
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
173
|
+
text: z.ZodOptional<z.ZodString>;
|
|
174
|
+
urlIncludes: z.ZodOptional<z.ZodString>;
|
|
175
|
+
idle: z.ZodOptional<z.ZodBoolean>;
|
|
176
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
177
|
+
}, z.core.$strict>;
|
|
178
|
+
export declare const localBrowserEvaluateInputSchema: z.ZodObject<{
|
|
179
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
180
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
181
|
+
expression: z.ZodString;
|
|
182
|
+
world: z.ZodOptional<z.ZodEnum<{
|
|
183
|
+
isolated: "isolated";
|
|
184
|
+
main: "main";
|
|
185
|
+
}>>;
|
|
186
|
+
awaitPromise: z.ZodOptional<z.ZodBoolean>;
|
|
187
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
188
|
+
}, z.core.$strict>;
|
|
189
|
+
export declare const localBrowserStorageInputSchema: z.ZodObject<{
|
|
190
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
191
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
192
|
+
kind: z.ZodEnum<{
|
|
193
|
+
cookies: "cookies";
|
|
194
|
+
local: "local";
|
|
195
|
+
session: "session";
|
|
196
|
+
}>;
|
|
197
|
+
op: z.ZodEnum<{
|
|
198
|
+
clear: "clear";
|
|
199
|
+
get: "get";
|
|
200
|
+
set: "set";
|
|
201
|
+
}>;
|
|
202
|
+
url: z.ZodOptional<z.ZodString>;
|
|
203
|
+
name: z.ZodOptional<z.ZodString>;
|
|
204
|
+
entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
205
|
+
name: z.ZodString;
|
|
206
|
+
value: z.ZodString;
|
|
207
|
+
}, z.core.$strict>>>;
|
|
208
|
+
}, z.core.$strict>;
|
|
209
|
+
export declare const localBrowserNetworkInputSchema: z.ZodObject<{
|
|
210
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
211
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
op: z.ZodEnum<{
|
|
213
|
+
clear: "clear";
|
|
214
|
+
list: "list";
|
|
215
|
+
}>;
|
|
216
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
217
|
+
includeBodies: z.ZodOptional<z.ZodBoolean>;
|
|
218
|
+
urlIncludes: z.ZodOptional<z.ZodString>;
|
|
219
|
+
method: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strict>;
|
|
221
|
+
export declare const localBrowserUploadInputSchema: z.ZodObject<{
|
|
222
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
223
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
224
|
+
ref: z.ZodOptional<z.ZodString>;
|
|
225
|
+
selector: z.ZodOptional<z.ZodString>;
|
|
226
|
+
attachmentIds: z.ZodArray<z.ZodString>;
|
|
227
|
+
}, z.core.$strict>;
|
|
228
|
+
export declare const localBrowserDownloadInputSchema: z.ZodObject<{
|
|
229
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
230
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
op: z.ZodEnum<{
|
|
232
|
+
list: "list";
|
|
233
|
+
save: "save";
|
|
234
|
+
}>;
|
|
235
|
+
downloadId: z.ZodOptional<z.ZodNumber>;
|
|
236
|
+
}, z.core.$strict>;
|
|
237
|
+
export declare const localBrowserCloseInputSchema: z.ZodObject<{
|
|
238
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
239
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
closeSession: z.ZodOptional<z.ZodBoolean>;
|
|
241
|
+
}, z.core.$strict>;
|
|
242
|
+
export interface LocalBrowserToolDefinition {
|
|
243
|
+
name: string;
|
|
244
|
+
description: string;
|
|
245
|
+
inputSchema: Record<string, unknown>;
|
|
246
|
+
tier: LocalBrowserTier;
|
|
247
|
+
}
|
|
248
|
+
export declare const LOCAL_BROWSER_TOOLS: readonly LocalBrowserToolDefinition[];
|
|
249
|
+
export declare const LOCAL_BROWSER_TOOL_NAMES: string[];
|
|
250
|
+
export declare const LOCAL_BROWSER_FULL_TIER_TOOL_NAMES: string[];
|
|
251
|
+
export declare function localBrowserToolRequiresFullTier(name: string): boolean;
|
|
252
|
+
export declare const localBrowserSettingsSchema: z.ZodObject<{
|
|
253
|
+
tier: z.ZodDefault<z.ZodEnum<{
|
|
254
|
+
full: "full";
|
|
255
|
+
refine: "refine";
|
|
256
|
+
}>>;
|
|
257
|
+
allowedOrigins: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
258
|
+
}, z.core.$strict>;
|
|
259
|
+
export type LocalBrowserSettings = z.infer<typeof localBrowserSettingsSchema>;
|
|
260
|
+
export declare function localBrowserOriginOf(rawUrl: string): string | null;
|
|
261
|
+
export declare function localBrowserOriginAllowed(settings: LocalBrowserSettings, rawUrl: string): boolean;
|
|
262
|
+
export declare const LOCAL_BROWSER_MOUSE_ACTIONS: readonly ["move", "down", "up"];
|
|
263
|
+
export declare const LOCAL_BROWSER_KEY_ACTIONS: readonly ["down", "up"];
|
|
264
|
+
export declare const localBrowserInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
265
|
+
kind: z.ZodLiteral<"mouse">;
|
|
266
|
+
action: z.ZodEnum<{
|
|
267
|
+
down: "down";
|
|
268
|
+
move: "move";
|
|
269
|
+
up: "up";
|
|
270
|
+
}>;
|
|
271
|
+
x: z.ZodNumber;
|
|
272
|
+
y: z.ZodNumber;
|
|
273
|
+
button: z.ZodOptional<z.ZodEnum<{
|
|
274
|
+
left: "left";
|
|
275
|
+
middle: "middle";
|
|
276
|
+
right: "right";
|
|
277
|
+
}>>;
|
|
278
|
+
clickCount: z.ZodOptional<z.ZodNumber>;
|
|
279
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
280
|
+
kind: z.ZodLiteral<"wheel">;
|
|
281
|
+
deltaX: z.ZodNumber;
|
|
282
|
+
deltaY: z.ZodNumber;
|
|
283
|
+
x: z.ZodNumber;
|
|
284
|
+
y: z.ZodNumber;
|
|
285
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
286
|
+
kind: z.ZodLiteral<"key">;
|
|
287
|
+
action: z.ZodEnum<{
|
|
288
|
+
down: "down";
|
|
289
|
+
up: "up";
|
|
290
|
+
}>;
|
|
291
|
+
key: z.ZodString;
|
|
292
|
+
code: z.ZodOptional<z.ZodString>;
|
|
293
|
+
text: z.ZodOptional<z.ZodString>;
|
|
294
|
+
alt: z.ZodOptional<z.ZodBoolean>;
|
|
295
|
+
ctrl: z.ZodOptional<z.ZodBoolean>;
|
|
296
|
+
meta: z.ZodOptional<z.ZodBoolean>;
|
|
297
|
+
shift: z.ZodOptional<z.ZodBoolean>;
|
|
298
|
+
}, z.core.$strict>], "kind">;
|
|
299
|
+
export type LocalBrowserInput = z.infer<typeof localBrowserInputSchema>;
|
|
300
|
+
export declare const localBrowserViewerFrameEventSchema: z.ZodObject<{
|
|
301
|
+
type: z.ZodLiteral<"frame">;
|
|
302
|
+
dataUrl: z.ZodString;
|
|
303
|
+
width: z.ZodNumber;
|
|
304
|
+
height: z.ZodNumber;
|
|
305
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
export declare const localBrowserViewerStateEventSchema: z.ZodObject<{
|
|
308
|
+
type: z.ZodLiteral<"state">;
|
|
309
|
+
state: z.ZodEnum<{
|
|
310
|
+
agent_idle: "agent_idle";
|
|
311
|
+
agent_streaming: "agent_streaming";
|
|
312
|
+
connected: "connected";
|
|
313
|
+
disconnected: "disconnected";
|
|
314
|
+
viewer_unavailable: "viewer_unavailable";
|
|
315
|
+
}>;
|
|
316
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
317
|
+
message: z.ZodOptional<z.ZodString>;
|
|
318
|
+
}, z.core.$strict>;
|
|
319
|
+
export declare const localBrowserViewerEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
320
|
+
type: z.ZodLiteral<"frame">;
|
|
321
|
+
dataUrl: z.ZodString;
|
|
322
|
+
width: z.ZodNumber;
|
|
323
|
+
height: z.ZodNumber;
|
|
324
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
326
|
+
type: z.ZodLiteral<"state">;
|
|
327
|
+
state: z.ZodEnum<{
|
|
328
|
+
agent_idle: "agent_idle";
|
|
329
|
+
agent_streaming: "agent_streaming";
|
|
330
|
+
connected: "connected";
|
|
331
|
+
disconnected: "disconnected";
|
|
332
|
+
viewer_unavailable: "viewer_unavailable";
|
|
333
|
+
}>;
|
|
334
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
335
|
+
message: z.ZodOptional<z.ZodString>;
|
|
336
|
+
}, z.core.$strict>], "type">;
|
|
337
|
+
export type LocalBrowserViewerEvent = z.infer<typeof localBrowserViewerEventSchema>;
|
|
338
|
+
export declare const localBrowserTabsEventSchema: z.ZodObject<{
|
|
339
|
+
type: z.ZodLiteral<"event">;
|
|
340
|
+
event: z.ZodLiteral<"tabs">;
|
|
341
|
+
data: z.ZodObject<{
|
|
342
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
343
|
+
tabId: z.ZodNumber;
|
|
344
|
+
windowId: z.ZodOptional<z.ZodNumber>;
|
|
345
|
+
title: z.ZodString;
|
|
346
|
+
url: z.ZodString;
|
|
347
|
+
active: z.ZodBoolean;
|
|
348
|
+
status: z.ZodOptional<z.ZodString>;
|
|
349
|
+
}, z.core.$strict>>;
|
|
350
|
+
}, z.core.$strict>;
|
|
351
|
+
}, z.core.$strict>;
|
|
352
|
+
export declare const localBrowserFrameEventSchema: z.ZodObject<{
|
|
353
|
+
type: z.ZodLiteral<"event">;
|
|
354
|
+
event: z.ZodLiteral<"frame">;
|
|
355
|
+
data: z.ZodObject<{
|
|
356
|
+
dataUrl: z.ZodString;
|
|
357
|
+
width: z.ZodNumber;
|
|
358
|
+
height: z.ZodNumber;
|
|
359
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
}, z.core.$strict>;
|
|
361
|
+
}, z.core.$strict>;
|
|
362
|
+
export declare const localBrowserStateEventSchema: z.ZodObject<{
|
|
363
|
+
type: z.ZodLiteral<"event">;
|
|
364
|
+
event: z.ZodLiteral<"state">;
|
|
365
|
+
data: z.ZodObject<{
|
|
366
|
+
state: z.ZodEnum<{
|
|
367
|
+
agent_idle: "agent_idle";
|
|
368
|
+
agent_streaming: "agent_streaming";
|
|
369
|
+
connected: "connected";
|
|
370
|
+
disconnected: "disconnected";
|
|
371
|
+
viewer_unavailable: "viewer_unavailable";
|
|
372
|
+
}>;
|
|
373
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
374
|
+
message: z.ZodOptional<z.ZodString>;
|
|
375
|
+
}, z.core.$strict>;
|
|
376
|
+
}, z.core.$strict>;
|
|
377
|
+
export declare const localBrowserExtensionEventFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
378
|
+
type: z.ZodLiteral<"event">;
|
|
379
|
+
event: z.ZodLiteral<"tabs">;
|
|
380
|
+
data: z.ZodObject<{
|
|
381
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
382
|
+
tabId: z.ZodNumber;
|
|
383
|
+
windowId: z.ZodOptional<z.ZodNumber>;
|
|
384
|
+
title: z.ZodString;
|
|
385
|
+
url: z.ZodString;
|
|
386
|
+
active: z.ZodBoolean;
|
|
387
|
+
status: z.ZodOptional<z.ZodString>;
|
|
388
|
+
}, z.core.$strict>>;
|
|
389
|
+
}, z.core.$strict>;
|
|
390
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
391
|
+
type: z.ZodLiteral<"event">;
|
|
392
|
+
event: z.ZodLiteral<"frame">;
|
|
393
|
+
data: z.ZodObject<{
|
|
394
|
+
dataUrl: z.ZodString;
|
|
395
|
+
width: z.ZodNumber;
|
|
396
|
+
height: z.ZodNumber;
|
|
397
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
398
|
+
}, z.core.$strict>;
|
|
399
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
400
|
+
type: z.ZodLiteral<"event">;
|
|
401
|
+
event: z.ZodLiteral<"state">;
|
|
402
|
+
data: z.ZodObject<{
|
|
403
|
+
state: z.ZodEnum<{
|
|
404
|
+
agent_idle: "agent_idle";
|
|
405
|
+
agent_streaming: "agent_streaming";
|
|
406
|
+
connected: "connected";
|
|
407
|
+
disconnected: "disconnected";
|
|
408
|
+
viewer_unavailable: "viewer_unavailable";
|
|
409
|
+
}>;
|
|
410
|
+
tabId: z.ZodOptional<z.ZodNumber>;
|
|
411
|
+
message: z.ZodOptional<z.ZodString>;
|
|
412
|
+
}, z.core.$strict>;
|
|
413
|
+
}, z.core.$strict>], "event">;
|
|
414
|
+
export type LocalBrowserExtensionEventFrame = z.infer<typeof localBrowserExtensionEventFrameSchema>;
|
|
415
|
+
export declare const LOCAL_BROWSER_PAIRING_CODE_LENGTH = 8;
|
|
416
|
+
export declare const localBrowserPairingStartSchema: z.ZodObject<{
|
|
417
|
+
client: z.ZodOptional<z.ZodEnum<{
|
|
418
|
+
chromium: "chromium";
|
|
419
|
+
firefox: "firefox";
|
|
420
|
+
}>>;
|
|
421
|
+
label: z.ZodOptional<z.ZodString>;
|
|
422
|
+
}, z.core.$strict>;
|
|
423
|
+
export declare const localBrowserPairingStartResultSchema: z.ZodObject<{
|
|
424
|
+
code: z.ZodString;
|
|
425
|
+
expiresAt: z.ZodString;
|
|
426
|
+
connectUrls: z.ZodArray<z.ZodString>;
|
|
427
|
+
}, z.core.$strict>;
|
|
428
|
+
export type LocalBrowserPairingStartResult = z.infer<typeof localBrowserPairingStartResultSchema>;
|
|
429
|
+
export declare const localBrowserBridgeFrameSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
430
|
+
type: z.ZodLiteral<"hello">;
|
|
431
|
+
protocol: z.ZodNumber;
|
|
432
|
+
client: z.ZodEnum<{
|
|
433
|
+
chromium: "chromium";
|
|
434
|
+
firefox: "firefox";
|
|
435
|
+
}>;
|
|
436
|
+
clientVersion: z.ZodString;
|
|
437
|
+
label: z.ZodString;
|
|
438
|
+
profileName: z.ZodNullable<z.ZodString>;
|
|
439
|
+
tabs: z.ZodArray<z.ZodObject<{
|
|
440
|
+
tabId: z.ZodNumber;
|
|
441
|
+
windowId: z.ZodOptional<z.ZodNumber>;
|
|
442
|
+
title: z.ZodString;
|
|
443
|
+
url: z.ZodString;
|
|
444
|
+
active: z.ZodBoolean;
|
|
445
|
+
status: z.ZodOptional<z.ZodString>;
|
|
446
|
+
}, z.core.$strict>>;
|
|
447
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
448
|
+
type: z.ZodLiteral<"hello_ack">;
|
|
449
|
+
sessionId: z.ZodString;
|
|
450
|
+
sessionToken: z.ZodString;
|
|
451
|
+
tier: z.ZodEnum<{
|
|
452
|
+
full: "full";
|
|
453
|
+
refine: "refine";
|
|
454
|
+
}>;
|
|
455
|
+
allowedOrigins: z.ZodArray<z.ZodString>;
|
|
456
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
457
|
+
type: z.ZodLiteral<"call">;
|
|
458
|
+
id: z.ZodString;
|
|
459
|
+
tool: z.ZodString;
|
|
460
|
+
args: z.ZodUnknown;
|
|
461
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
462
|
+
type: z.ZodLiteral<"result">;
|
|
463
|
+
id: z.ZodString;
|
|
464
|
+
ok: z.ZodBoolean;
|
|
465
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
466
|
+
error: z.ZodOptional<z.ZodObject<{
|
|
467
|
+
code: z.ZodEnum<{
|
|
468
|
+
local_browser_element_missing: "local_browser_element_missing";
|
|
469
|
+
local_browser_extension_unavailable: "local_browser_extension_unavailable";
|
|
470
|
+
local_browser_navigation_blocked: "local_browser_navigation_blocked";
|
|
471
|
+
local_browser_not_paired: "local_browser_not_paired";
|
|
472
|
+
local_browser_origin_denied: "local_browser_origin_denied";
|
|
473
|
+
local_browser_protocol_error: "local_browser_protocol_error";
|
|
474
|
+
local_browser_ref_stale: "local_browser_ref_stale";
|
|
475
|
+
local_browser_result_too_large: "local_browser_result_too_large";
|
|
476
|
+
local_browser_tab_missing: "local_browser_tab_missing";
|
|
477
|
+
local_browser_tier_denied: "local_browser_tier_denied";
|
|
478
|
+
local_browser_timeout: "local_browser_timeout";
|
|
479
|
+
local_browser_unsupported: "local_browser_unsupported";
|
|
480
|
+
}>;
|
|
481
|
+
message: z.ZodString;
|
|
482
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
483
|
+
retryable: z.ZodOptional<z.ZodBoolean>;
|
|
484
|
+
}, z.core.$strict>>;
|
|
485
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
486
|
+
type: z.ZodLiteral<"event">;
|
|
487
|
+
event: z.ZodString;
|
|
488
|
+
data: z.ZodUnknown;
|
|
489
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
490
|
+
type: z.ZodLiteral<"ping">;
|
|
491
|
+
at: z.ZodString;
|
|
492
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
493
|
+
type: z.ZodLiteral<"pong">;
|
|
494
|
+
at: z.ZodString;
|
|
495
|
+
}, z.core.$strict>], "type">;
|
|
496
|
+
export type LocalBrowserBridgeFrame = z.infer<typeof localBrowserBridgeFrameSchema>;
|
|
497
|
+
//# sourceMappingURL=local-browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-browser.d.ts","sourceRoot":"","sources":["../src/local-browser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,2BAA2B,kBAAkB,CAAC;AAC3D,eAAO,MAAM,wBAAwB,kBAAkB,CAAC;AACxD,eAAO,MAAM,4BAA4B,QAAiB,CAAC;AAC3D,eAAO,MAAM,6BAA6B,QAAS,CAAC;AACpD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,gCAAgC,MAAM,CAAC;AACpD,eAAO,MAAM,gCAAgC,OAAQ,CAAC;AACtD,eAAO,MAAM,4BAA4B,QAAS,CAAC;AACnD,eAA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