@pi-oxide/extension-js 0.12.4 → 0.13.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.
Files changed (145) hide show
  1. package/content-script/action-result.d.ts +4 -0
  2. package/content-script/dom-tree.d.ts +28 -0
  3. package/content-script/dom-utils.d.ts +37 -0
  4. package/content-script/file-resolution.d.ts +22 -0
  5. package/content-script/form-validation.d.ts +12 -0
  6. package/content-script/handlers.d.ts +3 -0
  7. package/content-script/index.d.ts +6 -0
  8. package/content-script/listbox.d.ts +7 -0
  9. package/content-script/logger.d.ts +12 -0
  10. package/content-script/message-router.d.ts +1 -0
  11. package/content-script/observation-lease.d.ts +55 -0
  12. package/content-script/registry.d.ts +24 -0
  13. package/content-script/schemas.d.ts +5 -0
  14. package/content-script/snapshot.d.ts +3 -0
  15. package/content-script.js +3 -3
  16. package/extension_js.d.ts +11 -3
  17. package/extension_js.js +25785 -16587
  18. package/index.js +2227 -1774
  19. package/main/index.d.ts +8 -0
  20. package/main/runner/chrome/internals.d.ts +9 -0
  21. package/main/runner/chrome/native.d.ts +6 -0
  22. package/main/runner/command.d.ts +3 -0
  23. package/main/runner/dom/snapshot.d.ts +8 -0
  24. package/main/runner/fetch.d.ts +4 -0
  25. package/main/runner/host.d.ts +3 -0
  26. package/main/runner/index.d.ts +2 -0
  27. package/main/runner/lib/constants.d.ts +14 -0
  28. package/main/runner/lib/host-registry.d.ts +6 -0
  29. package/main/runner/lib/network-tracker.d.ts +16 -0
  30. package/main/runner/lib/params-helpers.d.ts +2 -0
  31. package/main/runner/lib/params.d.ts +5 -0
  32. package/main/runner/lib/types.d.ts +116 -0
  33. package/main/runner/runtime.d.ts +15 -0
  34. package/main/runner/sidepanel/dom.d.ts +6 -0
  35. package/main/runner/snapshot-merge.d.ts +8 -0
  36. package/main/runner/tab/execute.d.ts +24 -0
  37. package/main/runner/tools/aliases.d.ts +1 -0
  38. package/main/runner/tools/chrome/action.d.ts +1 -0
  39. package/main/runner/tools/chrome/alarms.d.ts +1 -0
  40. package/main/runner/tools/chrome/bookmarks.d.ts +1 -0
  41. package/main/runner/tools/chrome/browsing-data.d.ts +1 -0
  42. package/main/runner/tools/chrome/capability.d.ts +30 -0
  43. package/main/runner/tools/chrome/context-menus.d.ts +1 -0
  44. package/main/runner/tools/chrome/cookies.d.ts +1 -0
  45. package/main/runner/tools/chrome/declarative-net-request.d.ts +1 -0
  46. package/main/runner/tools/chrome/desktop-capture.d.ts +1 -0
  47. package/main/runner/tools/chrome/downloads.d.ts +1 -0
  48. package/main/runner/tools/chrome/history.d.ts +1 -0
  49. package/main/runner/tools/chrome/identity.d.ts +1 -0
  50. package/main/runner/tools/chrome/idle.d.ts +1 -0
  51. package/main/runner/tools/chrome/index.d.ts +1 -0
  52. package/main/runner/tools/chrome/management.d.ts +1 -0
  53. package/main/runner/tools/chrome/notifications.d.ts +1 -0
  54. package/main/runner/tools/chrome/offscreen.d.ts +1 -0
  55. package/main/runner/tools/chrome/page-capture.d.ts +1 -0
  56. package/main/runner/tools/chrome/permissions.d.ts +1 -0
  57. package/main/runner/tools/chrome/register-helpers.d.ts +9 -0
  58. package/main/runner/tools/chrome/runtime.d.ts +1 -0
  59. package/main/runner/tools/chrome/scripting.d.ts +1 -0
  60. package/main/runner/tools/chrome/sessions.d.ts +1 -0
  61. package/main/runner/tools/chrome/side-panel.d.ts +1 -0
  62. package/main/runner/tools/chrome/system.d.ts +1 -0
  63. package/main/runner/tools/chrome/tab-groups.d.ts +1 -0
  64. package/main/runner/tools/chrome/tabs.d.ts +1 -0
  65. package/main/runner/tools/chrome/top-sites.d.ts +1 -0
  66. package/main/runner/tools/chrome/windows.d.ts +1 -0
  67. package/main/runner/tools/chrome-storage.d.ts +1 -0
  68. package/main/runner/tools/clipboard.d.ts +1 -0
  69. package/main/runner/tools/dom.d.ts +1 -0
  70. package/main/runner/tools/host-call.d.ts +1 -0
  71. package/main/runner/tools/network.d.ts +1 -0
  72. package/main/runner/tools/page.d.ts +1 -0
  73. package/main/runner/tools/sidepanel.d.ts +1 -0
  74. package/main/runner/tools/storage.d.ts +1 -0
  75. package/main/runner/tools/tab.d.ts +1 -0
  76. package/main/session/extension-session.d.ts +106 -0
  77. package/main/tab-context.d.ts +12 -0
  78. package/package.json +5 -2
  79. package/shared/array-buffer.d.ts +4 -0
  80. package/shared/collect-inline-snapshot.d.ts +50 -0
  81. package/shared/cross/agent-errors.d.ts +28 -0
  82. package/shared/cross/array-buffer.d.ts +4 -0
  83. package/shared/cross/collect-inline-snapshot.d.ts +58 -0
  84. package/shared/cross/content-script-actions.d.ts +7 -0
  85. package/shared/cross/content-script-tools.d.ts +3 -0
  86. package/shared/cross/dispatch.d.ts +5 -0
  87. package/shared/cross/fetch-response.d.ts +12 -0
  88. package/shared/cross/format-types.d.ts +43 -0
  89. package/shared/cross/fs-types.d.ts +81 -0
  90. package/shared/cross/generated.d.ts +328 -0
  91. package/shared/cross/manifest.d.ts +130 -0
  92. package/shared/cross/normalize-agent-error.d.ts +17 -0
  93. package/shared/cross/page-specs.d.ts +7 -0
  94. package/shared/cross/schemas/chrome.d.ts +56 -0
  95. package/shared/cross/schemas/clipboard.d.ts +19 -0
  96. package/shared/cross/schemas/fs.d.ts +65 -0
  97. package/shared/cross/schemas/helpers.d.ts +71 -0
  98. package/shared/cross/schemas/host.d.ts +15 -0
  99. package/shared/cross/schemas/network.d.ts +34 -0
  100. package/shared/cross/schemas/page.d.ts +494 -0
  101. package/shared/cross/schemas/returns.d.ts +8791 -0
  102. package/shared/cross/schemas/sidepanel.d.ts +284 -0
  103. package/shared/cross/schemas/snapshot.d.ts +272 -0
  104. package/shared/cross/schemas/storage.d.ts +60 -0
  105. package/shared/cross/schemas/tab.d.ts +597 -0
  106. package/shared/cross/schemas.d.ts +12 -0
  107. package/shared/cross/snapshot-filter.d.ts +15 -0
  108. package/shared/cross/tab-specs.d.ts +3 -0
  109. package/shared/cross/types.d.ts +12 -0
  110. package/shared/cross/zod-to-docs.d.ts +28 -0
  111. package/shared/cs/ref-id.d.ts +5 -0
  112. package/shared/cs/snapshot-dom.d.ts +47 -0
  113. package/shared/fetch-response.d.ts +12 -0
  114. package/shared/fs-types.d.ts +81 -0
  115. package/shared/generated.d.ts +241 -0
  116. package/shared/log-levels.d.ts +5 -0
  117. package/shared/logger.d.ts +18 -0
  118. package/shared/main/content-script-response.d.ts +5 -0
  119. package/shared/main/define-content-script-tool.d.ts +7 -0
  120. package/shared/main/log-levels.d.ts +5 -0
  121. package/shared/main/logger.d.ts +18 -0
  122. package/shared/main/routes.d.ts +14 -0
  123. package/shared/main/tool-registry.d.ts +19 -0
  124. package/shared/ref-id.d.ts +5 -0
  125. package/shared/registry/agent-errors.d.ts +27 -0
  126. package/shared/registry/content-script-actions.d.ts +7 -0
  127. package/shared/registry/content-script-response.d.ts +5 -0
  128. package/shared/registry/content-script-tools.d.ts +13 -0
  129. package/shared/registry/define-content-script-tool.d.ts +7 -0
  130. package/shared/registry/dispatch.d.ts +5 -0
  131. package/shared/registry/manifest.d.ts +130 -0
  132. package/shared/registry/normalize-agent-error.d.ts +17 -0
  133. package/shared/registry/routes.d.ts +14 -0
  134. package/shared/registry/types.d.ts +12 -0
  135. package/shared/registry/zod-to-docs.d.ts +28 -0
  136. package/shared/schemas.d.ts +10663 -0
  137. package/shared/snapshot-dom.d.ts +47 -0
  138. package/shared/snapshot-filter.d.ts +15 -0
  139. package/shared/tool-registry.d.ts +19 -0
  140. package/worker/binary-blob-store.d.ts +12 -0
  141. package/worker/fetch-store.d.ts +1 -0
  142. package/worker/resolve-set-files.d.ts +22 -0
  143. package/worker/vfs-write-cache.d.ts +3 -0
  144. package/worker/worker.d.ts +84 -0
  145. package/worker.js +1756 -1615
@@ -0,0 +1,50 @@
1
+ export type InlineSnapshotNode = {
2
+ refId: string;
3
+ role: string;
4
+ tag: string;
5
+ controlType?: string;
6
+ actionable?: boolean;
7
+ forControl?: string;
8
+ recommendedAction?: string;
9
+ controls?: string;
10
+ expanded?: boolean;
11
+ name?: string;
12
+ text?: string;
13
+ value?: string;
14
+ checked?: boolean;
15
+ disabled?: boolean;
16
+ readOnly?: boolean;
17
+ selected?: boolean;
18
+ required?: boolean;
19
+ valid?: boolean;
20
+ invalid?: boolean;
21
+ validationMessage?: string;
22
+ errorMessage?: string;
23
+ href?: string;
24
+ src?: string;
25
+ alt?: string;
26
+ title?: string;
27
+ parentRefId?: string;
28
+ postId?: string;
29
+ permalink?: string;
30
+ imageUrls?: string[];
31
+ accept?: string;
32
+ filesCount?: number;
33
+ };
34
+ export type FormErrorEntry = {
35
+ field: string;
36
+ error: string;
37
+ refId: string;
38
+ };
39
+ export type InlineSnapshotResult = {
40
+ text: string;
41
+ nodes: InlineSnapshotNode[];
42
+ formErrors: FormErrorEntry[];
43
+ url: string;
44
+ title: string;
45
+ viewport: {
46
+ width: number;
47
+ height: number;
48
+ };
49
+ };
50
+ export declare function collectInlineSnapshot(maxNodes: number): InlineSnapshotResult;
@@ -0,0 +1,28 @@
1
+ import { AsyncError } from './manifest.js';
2
+
3
+ export declare function contentScriptMissingError(tabId?: number, url?: string): AsyncError;
4
+ export declare function noTabError(action: string): AsyncError;
5
+ export type StaleRefCandidate = {
6
+ refId: string;
7
+ role?: string;
8
+ name?: string;
9
+ };
10
+ export declare function staleRefError(refId: string, options?: {
11
+ label?: string;
12
+ candidates?: StaleRefCandidate[];
13
+ snapshot?: unknown;
14
+ }): AsyncError;
15
+ export declare function notInteractableError(action: string, refId: string, details?: Record<string, unknown>): AsyncError;
16
+ export declare function observationRequiredError(action: string): AsyncError;
17
+ export declare function ambiguousTargetError(label: string): AsyncError;
18
+ export declare function isContentScriptConnectionError(msg: string): boolean;
19
+ export declare function throwStructuredAgentError(error: AsyncError): never;
20
+ export declare function labelNotFoundError(label: string, candidates?: StaleRefCandidate[], extra?: {
21
+ searchedIds?: string[];
22
+ ignoredIds?: string[];
23
+ targetRefId?: string;
24
+ targetName?: string;
25
+ ariaControlsBefore?: string | null;
26
+ ariaControlsAfter?: string | null;
27
+ isDropdown?: boolean;
28
+ }): AsyncError;
@@ -0,0 +1,4 @@
1
+ /** Decode a base64 string into bytes. Throws on invalid input. */
2
+ export declare function base64ToUint8Array(base64: string): Uint8Array;
3
+ /** Convert Uint8Array to base64 without spread-arg limits on large buffers. */
4
+ export declare function arrayBufferToBase64(bytes: Uint8Array): string;
@@ -0,0 +1,58 @@
1
+ export type InlineSnapshotNode = {
2
+ refId: string;
3
+ role: string;
4
+ tag: string;
5
+ controlType?: string;
6
+ actionable?: boolean;
7
+ forControl?: string;
8
+ recommendedAction?: string;
9
+ controls?: string;
10
+ expanded?: boolean;
11
+ name?: string;
12
+ text?: string;
13
+ value?: string;
14
+ checked?: boolean;
15
+ disabled?: boolean;
16
+ readOnly?: boolean;
17
+ selected?: boolean;
18
+ required?: boolean;
19
+ valid?: boolean;
20
+ invalid?: boolean;
21
+ validationMessage?: string;
22
+ errorMessage?: string;
23
+ href?: string;
24
+ src?: string;
25
+ alt?: string;
26
+ title?: string;
27
+ parentRefId?: string;
28
+ postId?: string;
29
+ permalink?: string;
30
+ imageUrls?: string[];
31
+ accept?: string;
32
+ filesCount?: number;
33
+ };
34
+ export type FormErrorEntry = {
35
+ field: string;
36
+ error: string;
37
+ refId: string;
38
+ };
39
+ export type InlineSnapshotResult = {
40
+ text: string;
41
+ nodes: InlineSnapshotNode[];
42
+ formErrors: FormErrorEntry[];
43
+ url: string;
44
+ title: string;
45
+ viewport: {
46
+ width: number;
47
+ height: number;
48
+ };
49
+ };
50
+ export declare const enrichDropdown: (el: Element, node: {
51
+ role?: string;
52
+ tag: string;
53
+ controlType?: string;
54
+ recommendedAction?: string;
55
+ controls?: string;
56
+ expanded?: boolean;
57
+ }) => void;
58
+ export declare function collectInlineSnapshot(maxNodes: number): InlineSnapshotResult;
@@ -0,0 +1,7 @@
1
+ export declare function addContentScriptAction(action: string): void;
2
+ export declare function isContentScriptAction(action: string): boolean;
3
+ export declare function getContentScriptActions(): string[];
4
+ /** Test-only helper: clear the dynamic content-script action set. */
5
+ export declare function clearContentScriptActions(): void;
6
+ /** Map registry action (page_click) to content-script handler key (click). */
7
+ export declare function toHandlerAction(action: string): string;
@@ -0,0 +1,3 @@
1
+ export type { ContentScriptToolSpec } from './page-specs.js';
2
+ export { AWAIT_PROMISE_NOTE } from './page-specs.js';
3
+ export declare const CONTENT_SCRIPT_TOOL_SPECS: readonly (import('./page-specs.js').ContentScriptToolSpec<unknown, unknown> | import('./page-specs.js').ContentScriptToolSpec)[];
@@ -0,0 +1,5 @@
1
+ import { z } from 'zod';
2
+ import { AsyncResponse } from './manifest.js';
3
+
4
+ export declare function formatValidationError(action: string, schema: z.ZodTypeAny, issues: z.ZodIssue[], params?: unknown): string;
5
+ export declare function dispatchValidated<P, R>(paramsSchema: z.ZodSchema<P>, returnsSchema: z.ZodSchema<R>, handler: (params: P) => Promise<R> | R, params: unknown, action: string): Promise<AsyncResponse<R>>;
@@ -0,0 +1,12 @@
1
+ export type FetchValue = {
2
+ status: number;
3
+ ok: boolean;
4
+ headers: Record<string, string>;
5
+ body: string;
6
+ bodyEncoding: "text" | "base64";
7
+ byteLength: number;
8
+ contentType: string;
9
+ finalUrl: string;
10
+ };
11
+ /** Encode a fetch Response for page.fetch / web.fetch with binary-safe handling. */
12
+ export declare function encodeFetchResponse(resp: Response): Promise<FetchValue>;
@@ -0,0 +1,43 @@
1
+ import { FsPathParams, FsStringResult } from '../../../pkg/extension_js.js';
2
+
3
+ export type CsvAction = "parse";
4
+ export type CsvActionMap = {
5
+ parse: {
6
+ params: FsPathParams;
7
+ result: FsStringResult;
8
+ };
9
+ };
10
+ export type ZipAction = "list";
11
+ export type ZipActionMap = {
12
+ list: {
13
+ params: FsPathParams;
14
+ result: FsStringResult;
15
+ };
16
+ };
17
+ export type XlsxAction = "read";
18
+ export type XlsxActionMap = {
19
+ read: {
20
+ params: FsPathParams;
21
+ result: FsStringResult;
22
+ };
23
+ };
24
+ export type PdfAction = "text";
25
+ export type PdfActionMap = {
26
+ text: {
27
+ params: FsPathParams;
28
+ result: FsStringResult;
29
+ };
30
+ };
31
+ export type FormatCallMessage<TType extends string, TMap extends Record<string, {
32
+ params: unknown;
33
+ result: unknown;
34
+ }>> = {
35
+ type: TType;
36
+ id: string;
37
+ action: keyof TMap & string;
38
+ params: TMap[keyof TMap]["params"];
39
+ };
40
+ export type CsvCallMessage = FormatCallMessage<"csvCall", CsvActionMap>;
41
+ export type ZipCallMessage = FormatCallMessage<"zipCall", ZipActionMap>;
42
+ export type XlsxCallMessage = FormatCallMessage<"xlsxCall", XlsxActionMap>;
43
+ export type PdfCallMessage = FormatCallMessage<"pdfCall", PdfActionMap>;
@@ -0,0 +1,81 @@
1
+ import { FsBoolResult, FsCopyParams, FsExistsResult, FsHashParams, FsHashResult, FsListResult, FsPathParams, FsReadRangeDataParams, FsReadRangeParams, FsStatResult, FsStringResult, FsWriteParams, FsWriteResult } from '../../../pkg/extension_js.js';
2
+
3
+ export type FsActionMap = {
4
+ exists: {
5
+ params: FsPathParams;
6
+ result: FsExistsResult;
7
+ };
8
+ stat: {
9
+ params: FsPathParams;
10
+ result: FsStatResult;
11
+ };
12
+ read: {
13
+ params: FsPathParams;
14
+ result: FsStringResult;
15
+ };
16
+ readText: {
17
+ params: FsPathParams;
18
+ result: FsStringResult;
19
+ };
20
+ readBase64: {
21
+ params: FsPathParams;
22
+ result: FsStringResult;
23
+ };
24
+ list: {
25
+ params: FsPathParams;
26
+ result: FsListResult;
27
+ };
28
+ mkdir: {
29
+ params: FsPathParams;
30
+ result: FsBoolResult;
31
+ };
32
+ delete: {
33
+ params: FsPathParams;
34
+ result: FsBoolResult;
35
+ };
36
+ copy: {
37
+ params: FsCopyParams;
38
+ result: FsBoolResult;
39
+ };
40
+ move: {
41
+ params: FsCopyParams;
42
+ result: FsBoolResult;
43
+ };
44
+ write: {
45
+ params: FsWriteParams;
46
+ result: FsWriteResult;
47
+ };
48
+ writeText: {
49
+ params: FsWriteParams;
50
+ result: FsWriteResult;
51
+ };
52
+ writeBase64: {
53
+ params: FsWriteParams;
54
+ result: FsWriteResult;
55
+ };
56
+ append: {
57
+ params: FsWriteParams;
58
+ result: FsWriteResult;
59
+ };
60
+ appendText: {
61
+ params: FsWriteParams;
62
+ result: FsWriteResult;
63
+ };
64
+ appendBase64: {
65
+ params: FsWriteParams;
66
+ result: FsWriteResult;
67
+ };
68
+ readRange: {
69
+ params: FsReadRangeParams;
70
+ result: FsStringResult;
71
+ };
72
+ update: {
73
+ params: FsReadRangeDataParams;
74
+ result: FsBoolResult;
75
+ };
76
+ hash: {
77
+ params: FsHashParams;
78
+ result: FsHashResult;
79
+ };
80
+ };
81
+ export type FsAction = keyof FsActionMap;
@@ -0,0 +1,328 @@
1
+ export type TreeSnapshot = {
2
+ version: string;
3
+ url: string | null;
4
+ title: string | null;
5
+ viewport: {
6
+ width: number;
7
+ height: number;
8
+ scrollX: number;
9
+ scrollY: number;
10
+ } | null;
11
+ nodes: SemanticNode[];
12
+ outline?: OutlineNode[];
13
+ };
14
+ export type SemanticNode = {
15
+ refId: string;
16
+ role: string;
17
+ name?: string;
18
+ description?: string;
19
+ tag: string;
20
+ id?: string;
21
+ classes?: string[];
22
+ value?: string;
23
+ placeholder?: string;
24
+ href?: string;
25
+ states: Record<string, boolean | undefined>;
26
+ inputType?: string;
27
+ rect?: {
28
+ x: number;
29
+ y: number;
30
+ width: number;
31
+ height: number;
32
+ top: number;
33
+ right: number;
34
+ bottom: number;
35
+ left: number;
36
+ };
37
+ inViewport: boolean;
38
+ visible: boolean;
39
+ path?: string;
40
+ };
41
+ export type OutlineNode = {
42
+ role: string;
43
+ name: string;
44
+ ref_id: string;
45
+ };
46
+ export type CommandParams = FetchParams | SleepParams | PageClickParams | PageDblClickParams | PageFillParams | PageSetFilesParams | PageTypeParams | PagePressParams | PageSelectParams | PageSelectOptionParams | PageCheckParams | PageHoverParams | PageScrollParams | PageScrollToParams | PageGotoParams | PageFindParams | PageWaitForParams | PageExtractParams | PageAppendParams | PageWaitParams | StorageGetParams | StorageSetParams | StorageDeleteParams | DomSnapshotParams | DomFormatParams | TabClickParams | TabFillParams | TabSetFilesParams | TabEvaluateParams | TabBackParams | TabWaitForLoadParams | TabScrollToParams | TabTypeParams | TabPressParams | TabSelectParams | TabSelectOptionParams | TabCheckParams | TabHoverParams | TabUnhoverParams | TabScrollParams | TabDblClickParams | FsWriteParams | FsPathParams | FsCopyParams | FsUpdateParams | FsHashParams | FsReadRangeParams;
47
+ export type AsyncCommand = {
48
+ call_id: number;
49
+ action: string;
50
+ params: CommandParams;
51
+ };
52
+ export type CellError = {
53
+ kind: "compile";
54
+ name: string | null;
55
+ message: string;
56
+ line: number | null;
57
+ } | {
58
+ kind: "runtime";
59
+ name: string | null;
60
+ message: string;
61
+ line: number | null;
62
+ action: string | null;
63
+ code: string | null;
64
+ stack: string | null;
65
+ } | {
66
+ kind: "fuel_exhausted";
67
+ } | {
68
+ kind: "internal";
69
+ message: string;
70
+ };
71
+ export type CellStatus = "done" | "async_pending";
72
+ export type DomSnapshotParams = {
73
+ interactive_only: boolean;
74
+ max_nodes: bigint;
75
+ };
76
+ export type DomFormatParams = {
77
+ snapshot: TreeSnapshot;
78
+ format?: string;
79
+ };
80
+ export type FetchParams = {
81
+ url: string;
82
+ method: string;
83
+ headers: Record<string, string>;
84
+ body: string | null;
85
+ timeout: bigint;
86
+ store?: boolean;
87
+ };
88
+ export type FsCopyParams = {
89
+ from: string;
90
+ to: string;
91
+ };
92
+ export type FsHashParams = {
93
+ path: string;
94
+ algo: string;
95
+ };
96
+ export type FsPathParams = {
97
+ path: string;
98
+ };
99
+ export type FsReadRangeParams = {
100
+ path: string;
101
+ offset: bigint;
102
+ len: number;
103
+ };
104
+ export type FsUpdateParams = {
105
+ path: string;
106
+ offset: bigint;
107
+ data: string;
108
+ };
109
+ export type FsWriteParams = {
110
+ path: string;
111
+ data: string;
112
+ };
113
+ export type PageAppendParams = {
114
+ refId?: string;
115
+ label?: string;
116
+ text: string;
117
+ };
118
+ export type PageCheckParams = {
119
+ refId?: string;
120
+ label?: string;
121
+ checked: boolean;
122
+ };
123
+ export type PageClickParams = {
124
+ refId?: string;
125
+ label?: string;
126
+ };
127
+ export type PageDblClickParams = {
128
+ refId?: string;
129
+ label?: string;
130
+ };
131
+ export type PageExtractParams = {
132
+ fields: string[];
133
+ };
134
+ export type PageFillParams = {
135
+ refId?: string;
136
+ label?: string;
137
+ value: string;
138
+ };
139
+ export type SetFileSource = {
140
+ name?: string;
141
+ mimeType?: string;
142
+ url?: string;
143
+ path?: string;
144
+ handle?: string;
145
+ };
146
+ export type PageSetFilesParams = {
147
+ refId?: string;
148
+ label?: string;
149
+ files: SetFileSource[];
150
+ };
151
+ export type PageFindParams = {
152
+ selector: string;
153
+ };
154
+ export type PageDomParams = {
155
+ selector: string;
156
+ depth: number;
157
+ includeHidden: boolean;
158
+ };
159
+ export type PageGotoParams = {
160
+ url: string;
161
+ timeout?: bigint;
162
+ waitUntil?: "load" | "networkidle";
163
+ };
164
+ export type SnapshotFilter = {
165
+ role?: string | string[];
166
+ tag?: string | string[];
167
+ text?: string;
168
+ name?: string;
169
+ interactiveOnly?: boolean;
170
+ href?: string;
171
+ src?: string;
172
+ limit?: number;
173
+ };
174
+ export type PageSnapshotQueryParams = {
175
+ filter?: SnapshotFilter;
176
+ max_nodes?: number;
177
+ };
178
+ export type TabSnapshotQueryParams = {
179
+ filter?: SnapshotFilter;
180
+ max_nodes?: number;
181
+ tabId: number;
182
+ };
183
+ export type PageHoverParams = {
184
+ refId?: string;
185
+ label?: string;
186
+ };
187
+ export type PageSubmitParams = {
188
+ refId?: string;
189
+ label?: string;
190
+ };
191
+ export type PageCheckRadioParams = {
192
+ name: string;
193
+ value: string;
194
+ };
195
+ export type PagePressParams = {
196
+ refId?: string;
197
+ label?: string;
198
+ key: string;
199
+ };
200
+ export type PageScrollParams = {
201
+ direction: string;
202
+ amount: number;
203
+ };
204
+ export type PageScrollToParams = {
205
+ refId?: string;
206
+ label?: string;
207
+ x?: number;
208
+ y?: number;
209
+ };
210
+ export type PageSelectParams = {
211
+ refId?: string;
212
+ label?: string;
213
+ value: string | string[];
214
+ };
215
+ export type PageSelectOptionParams = {
216
+ refId?: string;
217
+ label?: string;
218
+ value: string;
219
+ };
220
+ export type PageTypeParams = {
221
+ refId?: string;
222
+ label?: string;
223
+ text: string;
224
+ };
225
+ export type PageWaitForParams = {
226
+ selector: string;
227
+ timeout: bigint;
228
+ };
229
+ export type PageWaitParams = {
230
+ duration: bigint;
231
+ };
232
+ export type RunResult = {
233
+ stdout: string[];
234
+ stderr: string[];
235
+ result: string | null;
236
+ error: CellError | null;
237
+ commands: CommandParams[];
238
+ fuel_exhausted: boolean;
239
+ execution_count: number;
240
+ status: CellStatus;
241
+ pending_commands: AsyncCommand[];
242
+ };
243
+ export type SleepParams = {
244
+ duration: bigint;
245
+ };
246
+ export type StorageDeleteParams = {
247
+ key: string;
248
+ };
249
+ export type StorageGetParams = {
250
+ key: string;
251
+ };
252
+ export type StorageSetParams = {
253
+ key: string;
254
+ value: string;
255
+ };
256
+ export type TabBackParams = {
257
+ tabId: bigint;
258
+ };
259
+ export type TabCheckParams = {
260
+ tabId: bigint;
261
+ refId: string;
262
+ checked: boolean;
263
+ };
264
+ export type TabClickParams = {
265
+ tabId: bigint;
266
+ refId: string;
267
+ };
268
+ export type TabDblClickParams = {
269
+ tabId: bigint;
270
+ refId: string;
271
+ };
272
+ export type TabEvaluateParams = {
273
+ tabId: bigint;
274
+ script: string;
275
+ };
276
+ export type TabFillParams = {
277
+ tabId: bigint;
278
+ refId: string;
279
+ value: string;
280
+ };
281
+ export type TabSetFilesParams = {
282
+ tabId?: number;
283
+ refId?: string;
284
+ label?: string;
285
+ files: SetFileSource[];
286
+ };
287
+ export type TabHoverParams = {
288
+ tabId: bigint;
289
+ refId: string;
290
+ };
291
+ export type TabPressParams = {
292
+ tabId: bigint;
293
+ key: string;
294
+ };
295
+ export type TabScrollParams = {
296
+ tabId: bigint;
297
+ direction: string;
298
+ amount: number;
299
+ };
300
+ export type TabScrollToParams = {
301
+ tabId: bigint;
302
+ x?: number;
303
+ y?: number;
304
+ refId?: string;
305
+ label?: string;
306
+ };
307
+ export type TabSelectParams = {
308
+ tabId: bigint;
309
+ refId: string;
310
+ value: string;
311
+ };
312
+ export type TabSelectOptionParams = {
313
+ tabId: bigint;
314
+ refId: string;
315
+ value: string;
316
+ };
317
+ export type TabTypeParams = {
318
+ tabId: bigint;
319
+ refId: string;
320
+ text: string;
321
+ };
322
+ export type TabUnhoverParams = {
323
+ tabId: bigint;
324
+ };
325
+ export type TabWaitForLoadParams = {
326
+ tabId: bigint;
327
+ timeout: bigint;
328
+ };