@cbxss/eoka 0.1.0-beta.1 → 0.1.0-beta.10

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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export { Browser } from "./browser.js";
2
2
  export type { BrowserOptions, LaunchOptions, ConnectOptions } from "./browser.js";
3
+ export type { CloudflareOptions } from "./cloudflare.js";
3
4
  export { installBrowser } from "./browser-install.js";
4
5
  export type { InstallBrowserOptions, InstallProgress, BrowserInstallation } from "./browser-install.js";
5
6
  export { InstallationError } from "./install-errors.js";
package/dist/page.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Buffer } from 'node:buffer';
2
2
  import type { CallOptions, InvokeClient } from './client.js';
3
- import type { Action, ActionOptions, ActionReceipt, AgentAction, AgentMode, AgentObservation, AgentStepResult, BrowserState, Expectation, LocatorSpec, MethodName, MethodParams, MethodResults, OperationRecord } from './generated/protocol.js';
3
+ import type { Action, ActionOptions, ActionReceipt, AgentAction, AgentMode, AgentObservation, AgentStepResult, BrowserState, Expectation, LocatorSpec, MethodName, MethodParams, MethodResults, OperationRecord, InputMode, Destination } from './generated/protocol.js';
4
4
  import { Operation } from './operations.js';
5
5
  import { Recording } from './recording.js';
6
6
  export type LocatorInput = string | LocatorSpec;
@@ -14,10 +14,14 @@ export interface PageWaitOptions extends CallOptions {
14
14
  waitTimeoutMs?: number;
15
15
  }
16
16
  export interface AgentObserveOptions extends CallOptions {
17
+ cursor?: string;
18
+ role?: string;
19
+ name?: string;
17
20
  observationTimeoutMs?: number;
18
21
  maxControls?: number;
19
22
  }
20
23
  export interface AgentStepOptions extends AgentObserveOptions {
24
+ destination?: Destination;
21
25
  expect?: Expectation;
22
26
  mode?: AgentMode;
23
27
  actionTimeoutMs?: number;
@@ -42,11 +46,15 @@ export declare class Page implements InvokeClient {
42
46
  perform(action: Action, options?: PerformOptions): Promise<Operation>;
43
47
  private verified;
44
48
  goto(url: string, options?: PerformOptions): Promise<ActionReceipt>;
45
- fill(target: LocatorInput, value: string, options?: PerformOptions): Promise<ActionReceipt>;
49
+ fill(target: LocatorInput, value: string, options?: PerformOptions & {
50
+ inputMode?: InputMode;
51
+ }): Promise<ActionReceipt>;
46
52
  select(target: LocatorInput, value: string | string[], options?: PerformOptions): Promise<ActionReceipt>;
47
53
  hover(target: LocatorInput, options?: PerformOptions): Promise<ActionReceipt>;
48
54
  click(target: LocatorInput, options?: PerformOptions): Promise<ActionReceipt>;
49
- type(target: LocatorInput, text: string, options?: PerformOptions): Promise<ActionReceipt>;
55
+ type(target: LocatorInput, text: string, options?: PerformOptions & {
56
+ inputMode?: InputMode;
57
+ }): Promise<ActionReceipt>;
50
58
  pressKey(key: string, options?: PerformOptions): Promise<ActionReceipt>;
51
59
  submit(target: LocatorInput, options?: PerformOptions): Promise<ActionReceipt>;
52
60
  drag(target: LocatorInput, dx: number, dy: number, options?: PerformOptions): Promise<ActionReceipt>;
@@ -60,8 +68,30 @@ export declare class Page implements InvokeClient {
60
68
  waitFor(selector: string, options?: PageWaitOptions): Promise<void>;
61
69
  waitForVisible(selector: string, options?: PageWaitOptions): Promise<void>;
62
70
  waitForText(text: string, options?: PageWaitOptions): Promise<void>;
63
- evaluate(js: string, options?: CallOptions): Promise<unknown>;
64
- execute(js: string, options?: CallOptions): Promise<void>;
71
+ evaluate(fn: string, args?: unknown[], options?: CallOptions): Promise<unknown>;
72
+ evaluateRaw(js: string, options?: CallOptions): Promise<unknown>;
73
+ execute(fn: string, args?: unknown[], options?: CallOptions): Promise<void>;
74
+ executeRaw(js: string, options?: CallOptions): Promise<void>;
75
+ /** List every frame in the page, including cross-origin OOPIFs. */
76
+ frames(options?: CallOptions): Promise<MethodResults['page.frames']>;
77
+ /**
78
+ * Click an element inside a closed shadow root in the top frame or a child
79
+ * frame. `frameId` comes from `frames()`. The selector is searched through
80
+ * the frame's light DOM and every shadow root; the node's center is mapped
81
+ * to viewport coordinates and clicked with human-like movement.
82
+ */
83
+ clickShadow(selector: string, options?: {
84
+ frameId?: string;
85
+ resolveTimeoutMs?: number;
86
+ } & CallOptions): Promise<MethodResults['page.click_shadow']>;
87
+ /**
88
+ * Best-effort helper for interactive Cloudflare challenge pages: the server
89
+ * clicks the Turnstile checkbox through its closed shadow root until the page
90
+ * leaves the challenge. Resolves with zero clicks on a normal page.
91
+ */
92
+ solveTurnstile(options?: {
93
+ timeoutMs?: number;
94
+ } & CallOptions): Promise<MethodResults['page.solve_turnstile']>;
65
95
  captureState(options?: CallOptions): Promise<BrowserState>;
66
96
  restoreState(state: BrowserState, options?: CallOptions): Promise<void>;
67
97
  fetch(url: string, fetchOptions?: FetchOptions, options?: CallOptions): Promise<MethodResults['page.fetch']>;
package/dist/page.js CHANGED
@@ -67,15 +67,15 @@ export class Page {
67
67
  throw new OperationError('DeadlineExceeded', 'The local action deadline elapsed; recover the operation by ID to learn its outcome.', operation.id, record, { requestState: 'acknowledged' });
68
68
  }
69
69
  if (record.state !== 'finished' || record.outcome !== 'verified_complete' || record.receipt?.outcome !== 'verified_complete' || record.error_code != null) {
70
- throw new OperationError(record.error_code ?? (record.state === 'running' ? 'OperationRunning' : record.outcome), `Operation ${operation.id} is ${record.state} with outcome ${record.outcome}; verified completion was not established.`, operation.id, record, { requestState: 'acknowledged' });
70
+ throw new OperationError(record.error_code ?? (record.state === 'running' ? 'OperationRunning' : record.outcome), record.error?.message ?? `Operation ${operation.id} is ${record.state} with outcome ${record.outcome}; verified completion was not established.`, operation.id, record, { requestState: 'acknowledged' });
71
71
  }
72
72
  return record.receipt;
73
73
  }
74
74
  goto(url, options) {
75
75
  return this.verified({ kind: 'navigate', url }, options);
76
76
  }
77
- fill(target, value, options) {
78
- return this.verified({ kind: 'fill', target: locator(target), value }, options);
77
+ fill(target, value, options = {}) {
78
+ return this.verified({ kind: 'fill', target: locator(target), value, input_mode: options.inputMode ?? 'sequential' }, options);
79
79
  }
80
80
  select(target, value, options) {
81
81
  return this.verified({ kind: 'select', target: locator(target), values: typeof value === 'string' ? [value] : value }, options);
@@ -86,8 +86,8 @@ export class Page {
86
86
  click(target, options) {
87
87
  return this.verified({ kind: 'click', target: locator(target) }, options);
88
88
  }
89
- type(target, text, options) {
90
- return this.verified({ kind: 'type', target: locator(target), text }, options);
89
+ type(target, text, options = {}) {
90
+ return this.verified({ kind: 'type', target: locator(target), text, input_mode: options.inputMode ?? 'sequential' }, options);
91
91
  }
92
92
  pressKey(key, options) {
93
93
  return this.verified({ kind: 'press_key', key }, options);
@@ -131,11 +131,52 @@ export class Page {
131
131
  const { waitTimeoutMs = 30_000, ...localOptions } = options;
132
132
  await this.invoke('page.wait_for_text', { pageId: this.id, text, timeoutMs: waitTimeoutMs }, localOptions);
133
133
  }
134
- async evaluate(js, options) {
135
- return (await this.invoke('page.evaluate', { pageId: this.id, js }, options)).result;
136
- }
137
- async execute(js, options) {
138
- await this.invoke('page.execute', { pageId: this.id, js }, options);
134
+ async evaluate(fn, args = [], options) {
135
+ return (await this.invoke('page.evaluate', { pageId: this.id, function: fn, arguments: args }, options)).result;
136
+ }
137
+ async evaluateRaw(js, options) {
138
+ return (await this.invoke('page.evaluate_raw', { pageId: this.id, js }, options)).result;
139
+ }
140
+ async execute(fn, args = [], options) {
141
+ await this.invoke('page.execute', { pageId: this.id, function: fn, arguments: args }, options);
142
+ }
143
+ async executeRaw(js, options) {
144
+ await this.invoke('page.execute_raw', { pageId: this.id, js }, options);
145
+ }
146
+ /** List every frame in the page, including cross-origin OOPIFs. */
147
+ async frames(options) {
148
+ return this.invoke('page.frames', { pageId: this.id }, options);
149
+ }
150
+ /**
151
+ * Click an element inside a closed shadow root in the top frame or a child
152
+ * frame. `frameId` comes from `frames()`. The selector is searched through
153
+ * the frame's light DOM and every shadow root; the node's center is mapped
154
+ * to viewport coordinates and clicked with human-like movement.
155
+ */
156
+ async clickShadow(selector, options = {}) {
157
+ const { frameId, resolveTimeoutMs, ...callOptions } = options;
158
+ // `CallOptions.timeoutMs` is the RPC deadline; `resolveTimeoutMs` is the
159
+ // server-side resolution deadline. Derive an RPC deadline that cannot
160
+ // outlive a long resolution when the caller did not set one explicitly.
161
+ if (callOptions.timeoutMs === undefined && resolveTimeoutMs !== undefined) {
162
+ callOptions.timeoutMs = resolveTimeoutMs + 10_000;
163
+ }
164
+ return this.invoke('page.click_shadow', {
165
+ pageId: this.id,
166
+ selector,
167
+ ...(frameId === undefined ? {} : { frameId }),
168
+ ...(resolveTimeoutMs === undefined ? {} : { timeoutMs: resolveTimeoutMs }),
169
+ }, callOptions);
170
+ }
171
+ /**
172
+ * Best-effort helper for interactive Cloudflare challenge pages: the server
173
+ * clicks the Turnstile checkbox through its closed shadow root until the page
174
+ * leaves the challenge. Resolves with zero clicks on a normal page.
175
+ */
176
+ solveTurnstile(options = {}) {
177
+ const { timeoutMs = 30_000, ...callOptions } = options;
178
+ // The local deadline outlasts the server's solve deadline so its error wins.
179
+ return this.invoke('page.solve_turnstile', { pageId: this.id, timeoutMs }, { ...callOptions, timeoutMs: timeoutMs + 10_000 });
139
180
  }
140
181
  async captureState(options) {
141
182
  return (await this.invoke('page.capture_state', { pageId: this.id }, options)).state;
@@ -208,8 +249,14 @@ export class Page {
208
249
  await this.invoke('page.reset_viewport', { pageId: this.id }, options);
209
250
  }
210
251
  observe(options = {}) {
211
- const { observationTimeoutMs, maxControls, ...localOptions } = options;
252
+ const { observationTimeoutMs, maxControls, cursor, role, name, ...localOptions } = options;
212
253
  const params = { pageId: this.id };
254
+ if (cursor !== undefined)
255
+ params.cursor = cursor;
256
+ if (role !== undefined)
257
+ params.role = role;
258
+ if (name !== undefined)
259
+ params.name = name;
213
260
  if (observationTimeoutMs !== undefined)
214
261
  params.timeout_ms = observationTimeoutMs;
215
262
  if (maxControls !== undefined)
@@ -217,13 +264,15 @@ export class Page {
217
264
  return this.invoke('agent.observe', params, localOptions);
218
265
  }
219
266
  async step(action, options = {}) {
220
- const { operationId = randomUUID(), observationTimeoutMs, maxControls, actionTimeoutMs, expect, mode, ...localOptions } = options;
267
+ const { operationId = randomUUID(), observationTimeoutMs, maxControls, actionTimeoutMs, expect, mode, destination, ...localOptions } = options;
221
268
  try {
222
269
  const params = { pageId: this.id, action, operation_id: operationId };
223
270
  if (expect !== undefined)
224
271
  params.expect = expect;
225
272
  if (mode !== undefined)
226
273
  params.mode = mode;
274
+ if (destination !== undefined)
275
+ params.destination = destination;
227
276
  if (actionTimeoutMs !== undefined)
228
277
  params.action_timeout_ms = actionTimeoutMs;
229
278
  if (observationTimeoutMs !== undefined)
@@ -1,99 +1,99 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "sdkVersion": "0.1.0-beta.1",
3
+ "sdkVersion": "0.1.0-beta.10",
4
4
  "installerVersion": "3.2.4",
5
5
  "server": {
6
- "version": "0.5.0",
7
- "protocolVersion": "1.3",
6
+ "version": "0.9.1",
7
+ "protocolVersion": "2.0",
8
8
  "platforms": {
9
9
  "linux-x64-gnu": {
10
10
  "packageName": "@cbxss/eoka-server-linux-x64-gnu",
11
- "packageVersion": "0.1.0-beta.1",
11
+ "packageVersion": "0.1.0-beta.10",
12
12
  "target": "x86_64-unknown-linux-gnu",
13
13
  "asset": "eoka-server-linux-amd64",
14
14
  "executablePath": "bin/eoka-server",
15
- "sha256": "5eb3ba769d92389626d78f8e6d9917fecfdbb9690da37a6e327cee05818884e3",
16
- "size": 16897520,
15
+ "sha256": "3bb103939ad60ac7ae63c3488cda7292c95cdff40ca2396c1e3b5a5ddce2d744",
16
+ "size": 23111648,
17
17
  "minimumGlibc": "2.35",
18
18
  "development": false
19
19
  },
20
20
  "linux-arm64-gnu": {
21
21
  "packageName": "@cbxss/eoka-server-linux-arm64-gnu",
22
- "packageVersion": "0.1.0-beta.1",
22
+ "packageVersion": "0.1.0-beta.10",
23
23
  "target": "aarch64-unknown-linux-gnu",
24
24
  "asset": "eoka-server-linux-arm64",
25
25
  "executablePath": "bin/eoka-server",
26
- "sha256": "10497b7fe4cdd460ee0c6bb0a54675e3cb3e716e066d895c8533b547107460b8",
27
- "size": 16210368,
26
+ "sha256": "ae106d7ba0736be0d7729ce3a4f74f403752f1e92fd65d7a200b42965db5c05a",
27
+ "size": 21284176,
28
28
  "minimumGlibc": "2.35",
29
29
  "development": false
30
30
  },
31
31
  "darwin-x64": {
32
32
  "packageName": "@cbxss/eoka-server-darwin-x64",
33
- "packageVersion": "0.1.0-beta.1",
33
+ "packageVersion": "0.1.0-beta.10",
34
34
  "target": "x86_64-apple-darwin",
35
35
  "asset": "eoka-server-darwin-amd64",
36
36
  "executablePath": "bin/eoka-server",
37
- "sha256": "d5570334ed5f0cc927ec8ad5cebf4fd81b756eee2a6bdde903f75eb706725169",
38
- "size": 14995968,
37
+ "sha256": "22b46bad53f9b7307055d0546d4826a1cb7429d1cb1cfd38cdc72b16af7d6878",
38
+ "size": 20720944,
39
39
  "minimumGlibc": null,
40
40
  "development": false
41
41
  },
42
42
  "darwin-arm64": {
43
43
  "packageName": "@cbxss/eoka-server-darwin-arm64",
44
- "packageVersion": "0.1.0-beta.1",
44
+ "packageVersion": "0.1.0-beta.10",
45
45
  "target": "aarch64-apple-darwin",
46
46
  "asset": "eoka-server-darwin-arm64",
47
47
  "executablePath": "bin/eoka-server",
48
- "sha256": "2437c1d3835ef9bd3f4cce5f9f6c0120000e791023cffcf552e8ac89d28683f3",
49
- "size": 14543216,
48
+ "sha256": "0ea3e903a4f682be5e8e2dc307e436646a231436d421197684d0b2d24f377fd9",
49
+ "size": 19281424,
50
50
  "minimumGlibc": null,
51
51
  "development": false
52
52
  },
53
53
  "win32-x64": {
54
54
  "packageName": "@cbxss/eoka-server-win32-x64",
55
- "packageVersion": "0.1.0-beta.1",
55
+ "packageVersion": "0.1.0-beta.10",
56
56
  "target": "x86_64-pc-windows-msvc",
57
57
  "asset": "eoka-server-windows-amd64.exe",
58
58
  "executablePath": "bin/eoka-server.exe",
59
- "sha256": "e3a13dcdedaba1ad4d1fb85c6a1a71ab5dab7a906d4d980161541fc2afe9f743",
60
- "size": 14008320,
59
+ "sha256": "c4366d2d54b184a0c67240977a7355f9c7431f66b916151867dfda17bee182d1",
60
+ "size": 18283008,
61
61
  "minimumGlibc": null,
62
62
  "development": false
63
63
  }
64
64
  }
65
65
  },
66
66
  "chrome": {
67
- "buildId": "155.0.8059.39",
67
+ "buildId": "156.0.8078.80",
68
68
  "platforms": {
69
69
  "linux-x64-gnu": {
70
70
  "platform": "linux",
71
- "url": "https://storage.googleapis.com/chrome-for-testing-public/155.0.8059.39/linux64/chrome-linux64.zip",
72
- "sha256": "55672d1f392fd3e7b7a08621b6e804e6bcb39d40cf155504abb74b3a021ea8ea",
71
+ "url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/linux64/chrome-linux64.zip",
72
+ "sha256": "b711c720f774be355197f32edf37e0651418ba036d92446ee2da19ac017540a7",
73
73
  "executablePath": "chrome-linux64/chrome"
74
74
  },
75
75
  "linux-arm64-gnu": {
76
76
  "platform": "linux_arm",
77
- "url": "https://storage.googleapis.com/chrome-for-testing-public/155.0.8059.39/linux-arm64/chrome-linux-arm64.zip",
78
- "sha256": "b9d44e5d183260ca941a4c4d8d21c8a437d81ef778a489047ef98968b0475dc5",
77
+ "url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/linux-arm64/chrome-linux-arm64.zip",
78
+ "sha256": "1f496a826c9ba4d6a5f5bf2de686145fe718528c2cc3dbeb96b5893b89653724",
79
79
  "executablePath": "chrome-linux-arm64/chrome"
80
80
  },
81
81
  "darwin-x64": {
82
82
  "platform": "mac",
83
- "url": "https://storage.googleapis.com/chrome-for-testing-public/155.0.8059.39/mac-x64/chrome-mac-x64.zip",
84
- "sha256": "9e4da7961d4a426078f02e89ecfa569a7926ada2dc88aa53c0bd9ed0d46c3bb7",
83
+ "url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/mac-x64/chrome-mac-x64.zip",
84
+ "sha256": "672b79dc79fdf28bb2ec9787b7fa33810c2b3cfd946a0fb4d3b72775f4e6fd9a",
85
85
  "executablePath": "chrome-mac-x64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
86
86
  },
87
87
  "darwin-arm64": {
88
88
  "platform": "mac_arm",
89
- "url": "https://storage.googleapis.com/chrome-for-testing-public/155.0.8059.39/mac-arm64/chrome-mac-arm64.zip",
90
- "sha256": "529a71bd61aaa2ef266a4d4bd300ae9572ba6a3468a8d55c3023ffeffb5b6b4e",
89
+ "url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/mac-arm64/chrome-mac-arm64.zip",
90
+ "sha256": "8bc590d1b1acac042a000234c768f31830f25a3983a83ed5e067114c87c4cad1",
91
91
  "executablePath": "chrome-mac-arm64/Google Chrome for Testing.app/Contents/MacOS/Google Chrome for Testing"
92
92
  },
93
93
  "win32-x64": {
94
94
  "platform": "win64",
95
- "url": "https://storage.googleapis.com/chrome-for-testing-public/155.0.8059.39/win64/chrome-win64.zip",
96
- "sha256": "59ab2a6e99bde9c0bc180414988394f9f5355a0d3764c704151ee8ecea235c7e",
95
+ "url": "https://storage.googleapis.com/chrome-for-testing-public/156.0.8078.80/win64/chrome-win64.zip",
96
+ "sha256": "16edb57d6107bf1c48a7c149b8d78b155fe614410093796dd72441fd6640540f",
97
97
  "executablePath": "chrome-win64/chrome.exe"
98
98
  }
99
99
  }
package/dist/release.js CHANGED
@@ -29,7 +29,7 @@ export function validateReleaseManifest(value) {
29
29
  const chrome = object(manifest.chrome);
30
30
  const servers = object(server.platforms);
31
31
  const browsers = object(chrome.platforms);
32
- if (manifest.schemaVersion !== 1 || !exactNpmVersion(manifest.sdkVersion) || manifest.installerVersion !== '3.2.4' || server.version !== '0.5.0' || server.protocolVersion !== `${protocolVersion.major}.${protocolVersion.minor}` || chrome.buildId !== '155.0.8059.39')
32
+ if (manifest.schemaVersion !== 1 || !exactNpmVersion(manifest.sdkVersion) || manifest.installerVersion !== '3.2.4' || !exactNpmVersion(server.version) || server.protocolVersion !== `${protocolVersion.major}.${protocolVersion.minor}` || typeof chrome.buildId !== 'string' || !/^\d+\.\d+\.\d+\.\d+$/.test(chrome.buildId))
33
33
  throw new Error('Incompatible release versions');
34
34
  if (Object.keys(servers).length !== platformIds.length || Object.keys(browsers).length !== platformIds.length)
35
35
  throw new Error('Incomplete platform mapping');
@@ -8,4 +8,5 @@ export interface ServerBinaryResolution {
8
8
  source: 'explicit' | 'environment' | 'package';
9
9
  expectedServerVersion?: string;
10
10
  }
11
+ export declare function nodeEngineMismatch(range: string, version: string): boolean;
11
12
  export declare function resolveServerBinary(options?: ServerBinaryOptions): Promise<ServerBinaryResolution>;
@@ -14,6 +14,29 @@ function checkAbort(signal) {
14
14
  function isSingleton(value, expected) {
15
15
  return Array.isArray(value) && value.length === 1 && value[0] === expected;
16
16
  }
17
+ // npm skips an optional dependency whose engines range rejects the running
18
+ // Node, so a missing platform package often means the wrong Node version.
19
+ export function nodeEngineMismatch(range, version) {
20
+ const required = /^\^(\d+)\.(\d+)\.(\d+)$/.exec(range)?.slice(1).map(Number);
21
+ const current = /^v?(\d+)\.(\d+)\.(\d+)/.exec(version)?.slice(1).map(Number);
22
+ if (!required || !current || required[0] === 0)
23
+ return false;
24
+ if (current[0] !== required[0])
25
+ return true;
26
+ return current[1] < required[1] || (current[1] === required[1] && current[2] < required[2]);
27
+ }
28
+ function unsupportedNodeHint() {
29
+ let range;
30
+ try {
31
+ range = createRequire(import.meta.url)('../package.json').engines?.node;
32
+ }
33
+ catch {
34
+ return '';
35
+ }
36
+ if (typeof range !== 'string' || !nodeEngineMismatch(range, process.versions.node))
37
+ return '';
38
+ return ` npm skips it on unsupported Node versions: this is Node ${process.versions.node}, but @cbxss/eoka requires ${range}. Switch Node (for example \`mise use node@24\` or \`nvm install 24\`) and reinstall.`;
39
+ }
17
40
  export async function resolveServerBinary(options = {}) {
18
41
  const { signal } = options;
19
42
  checkAbort(signal);
@@ -41,7 +64,7 @@ export async function resolveServerBinary(options = {}) {
41
64
  packagePath = createRequire(import.meta.url).resolve(`${pin.packageName}/package.json`);
42
65
  }
43
66
  catch (cause) {
44
- throw new InstallationError('ServerPackageMissing', `The exact optional dependency ${pin.packageName}@${pin.packageVersion} is missing. Reinstall @cbxss/eoka with optional dependencies enabled (do not use --omit=optional), or install that exact platform package. There is no Cargo, PATH or network fallback.`, { cause });
67
+ throw new InstallationError('ServerPackageMissing', `The exact optional dependency ${pin.packageName}@${pin.packageVersion} is missing.${unsupportedNodeHint()} Reinstall @cbxss/eoka with optional dependencies enabled (do not use --omit=optional), or install that exact platform package. There is no Cargo, PATH or network fallback.`, { cause });
45
68
  }
46
69
  if (pin.sha256 === null || pin.size === null)
47
70
  throw new InstallationError('ReleaseNotPrepared', `The SDK has no staged server integrity pin for ${platform}. Use a prepared SDK plus its matching platform package, or set serverPath explicitly.`);
@@ -24,7 +24,7 @@ try {
24
24
  actionOptions: { expect: { kind: "value", target, value: "Ada" }, timeout_ms: 5000 },
25
25
  });
26
26
  console.log(JSON.stringify({ ownership: browser.ownership, browserVersion: browser.browserVersion, operationId, receipt }, null, 2));
27
- console.log(JSON.stringify(await page.invoke("page.evaluate", { pageId: page.id, js: '({name: document.querySelector("#name").value})' })));
27
+ console.log(JSON.stringify(await page.invoke("page.evaluate", { pageId: page.id, function: '()=>({name: document.querySelector("#name").value})' })));
28
28
  } catch (error) {
29
29
  const primary = error instanceof AggregateError ? error.cause : error;
30
30
  if (primary instanceof EokaError && primary.operationId) {
@@ -9,7 +9,7 @@ const browser = await Browser.launch({
9
9
  });
10
10
  try {
11
11
  const page = await browser.newPage("data:text/html,%3Ctitle%3Eeoka%20offline%3C/title%3E");
12
- const result = await page.invoke("page.evaluate", { pageId: page.id, js: "document.title" });
12
+ const result = await page.invoke("page.evaluate", { pageId: page.id, function: "()=>document.title" });
13
13
  console.log(JSON.stringify({
14
14
  title: result.result,
15
15
  ownership: browser.ownership,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cbxss/eoka",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.10",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Node.js SDK with pinned Chrome installation and verified eoka sidecar resolution",
@@ -58,11 +58,11 @@
58
58
  "typescript": "5.9.3"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@cbxss/eoka-server-linux-x64-gnu": "0.1.0-beta.1",
62
- "@cbxss/eoka-server-linux-arm64-gnu": "0.1.0-beta.1",
63
- "@cbxss/eoka-server-darwin-x64": "0.1.0-beta.1",
64
- "@cbxss/eoka-server-darwin-arm64": "0.1.0-beta.1",
65
- "@cbxss/eoka-server-win32-x64": "0.1.0-beta.1"
61
+ "@cbxss/eoka-server-linux-x64-gnu": "0.1.0-beta.10",
62
+ "@cbxss/eoka-server-linux-arm64-gnu": "0.1.0-beta.10",
63
+ "@cbxss/eoka-server-darwin-x64": "0.1.0-beta.10",
64
+ "@cbxss/eoka-server-darwin-arm64": "0.1.0-beta.10",
65
+ "@cbxss/eoka-server-win32-x64": "0.1.0-beta.10"
66
66
  },
67
67
  "repository": {
68
68
  "type": "git",