@developerz.ai/ui-debugger-mcp 1.8.0 → 1.10.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/README.md +70 -52
- package/dist/adapters/android/adb.d.ts +19 -7
- package/dist/adapters/android/adb.js +50 -13
- package/dist/adapters/android/adb.js.map +1 -1
- package/dist/adapters/android/android-adapter.d.ts +42 -2
- package/dist/adapters/android/android-adapter.js +366 -36
- package/dist/adapters/android/android-adapter.js.map +1 -1
- package/dist/adapters/android/commands.js.map +1 -1
- package/dist/adapters/android/ports.js.map +1 -1
- package/dist/adapters/android/sdk.d.ts +65 -0
- package/dist/adapters/android/sdk.js +107 -0
- package/dist/adapters/android/sdk.js.map +1 -0
- package/dist/adapters/android/uiautomator.d.ts +23 -7
- package/dist/adapters/android/uiautomator.js +31 -7
- package/dist/adapters/android/uiautomator.js.map +1 -1
- package/dist/adapters/availability.d.ts +39 -0
- package/dist/adapters/availability.js +62 -0
- package/dist/adapters/availability.js.map +1 -0
- package/dist/adapters/browser/browser-adapter.d.ts +12 -22
- package/dist/adapters/browser/browser-adapter.js +133 -67
- package/dist/adapters/browser/browser-adapter.js.map +1 -1
- package/dist/adapters/browser/cdp.d.ts +15 -7
- package/dist/adapters/browser/cdp.js +25 -3
- package/dist/adapters/browser/cdp.js.map +1 -1
- package/dist/adapters/browser/filters.d.ts +1 -1
- package/dist/adapters/browser/filters.js.map +1 -1
- package/dist/adapters/browser/geometry.js.map +1 -1
- package/dist/adapters/browser/launch.d.ts +14 -5
- package/dist/adapters/browser/launch.js +14 -5
- package/dist/adapters/browser/launch.js.map +1 -1
- package/dist/adapters/browser/lifecycle.d.ts +58 -0
- package/dist/adapters/browser/lifecycle.js +98 -0
- package/dist/adapters/browser/lifecycle.js.map +1 -0
- package/dist/adapters/browser/log-filters.d.ts +2 -2
- package/dist/adapters/browser/log-filters.js.map +1 -1
- package/dist/adapters/browser/log-format.d.ts +14 -23
- package/dist/adapters/browser/log-format.js +16 -55
- package/dist/adapters/browser/log-format.js.map +1 -1
- package/dist/adapters/browser/tab-context.d.ts +30 -0
- package/dist/adapters/browser/tab-context.js +41 -0
- package/dist/adapters/browser/tab-context.js.map +1 -0
- package/dist/adapters/contract.d.ts +111 -5
- package/dist/adapters/contract.js +7 -2
- package/dist/adapters/contract.js.map +1 -1
- package/dist/adapters/desktop/atspi-busctl.d.ts +26 -0
- package/dist/adapters/desktop/atspi-busctl.js +330 -0
- package/dist/adapters/desktop/atspi-busctl.js.map +1 -0
- package/dist/adapters/desktop/atspi-parse.d.ts +39 -0
- package/dist/adapters/desktop/atspi-parse.js +155 -0
- package/dist/adapters/desktop/atspi-parse.js.map +1 -0
- package/dist/adapters/desktop/atspi.d.ts +75 -50
- package/dist/adapters/desktop/atspi.js +64 -285
- package/dist/adapters/desktop/atspi.js.map +1 -1
- package/dist/adapters/desktop/capture.d.ts +11 -20
- package/dist/adapters/desktop/capture.js +68 -37
- package/dist/adapters/desktop/capture.js.map +1 -1
- package/dist/adapters/desktop/desktop-adapter.d.ts +20 -2
- package/dist/adapters/desktop/desktop-adapter.js +91 -9
- package/dist/adapters/desktop/desktop-adapter.js.map +1 -1
- package/dist/adapters/desktop/input.d.ts +18 -4
- package/dist/adapters/desktop/input.js +15 -10
- package/dist/adapters/desktop/input.js.map +1 -1
- package/dist/adapters/desktop/proc.d.ts +32 -4
- package/dist/adapters/desktop/proc.js +33 -6
- package/dist/adapters/desktop/proc.js.map +1 -1
- package/dist/adapters/factory.d.ts +12 -5
- package/dist/adapters/factory.js +29 -3
- package/dist/adapters/factory.js.map +1 -1
- package/dist/adapters/log-format.d.ts +32 -0
- package/dist/adapters/log-format.js +39 -0
- package/dist/adapters/log-format.js.map +1 -0
- package/dist/agent/belt/act.d.ts +440 -21
- package/dist/agent/belt/act.js +43 -6
- package/dist/agent/belt/act.js.map +1 -1
- package/dist/agent/belt/look.d.ts +471 -14
- package/dist/agent/belt/look.js +74 -12
- package/dist/agent/belt/look.js.map +1 -1
- package/dist/agent/belt/observe.d.ts +663 -42
- package/dist/agent/belt/observe.js +76 -12
- package/dist/agent/belt/observe.js.map +1 -1
- package/dist/agent/belt/report.d.ts +754 -48
- package/dist/agent/belt/report.js +121 -38
- package/dist/agent/belt/report.js.map +1 -1
- package/dist/agent/belt/trail.d.ts +44 -16
- package/dist/agent/belt/trail.js +46 -11
- package/dist/agent/belt/trail.js.map +1 -1
- package/dist/agent/capabilities.js.map +1 -1
- package/dist/agent/fallback.d.ts +33 -0
- package/dist/agent/fallback.js +84 -0
- package/dist/agent/fallback.js.map +1 -0
- package/dist/agent/loop.d.ts +54 -52
- package/dist/agent/loop.js +173 -176
- package/dist/agent/loop.js.map +1 -1
- package/dist/agent/models.d.ts +10 -6
- package/dist/agent/models.js +15 -9
- package/dist/agent/models.js.map +1 -1
- package/dist/agent/prompts/compose.d.ts +1 -1
- package/dist/agent/prompts/debug-agent.js +45 -8
- package/dist/agent/prompts/debug-agent.js.map +1 -1
- package/dist/agent/prompts/web-addendum.d.ts +1 -1
- package/dist/agent/prompts/web-addendum.js +15 -3
- package/dist/agent/prompts/web-addendum.js.map +1 -1
- package/dist/agent/provider.d.ts +38 -0
- package/dist/agent/provider.js +55 -3
- package/dist/agent/provider.js.map +1 -1
- package/dist/boot.d.ts +64 -0
- package/dist/boot.js +145 -0
- package/dist/boot.js.map +1 -0
- package/dist/cli/chromium-libs.d.ts +262 -0
- package/dist/cli/chromium-libs.js +522 -0
- package/dist/cli/chromium-libs.js.map +1 -0
- package/dist/cli/control.js +51 -9
- package/dist/cli/control.js.map +1 -1
- package/dist/cli/help.js +1 -1
- package/dist/cli/init.d.ts +54 -3
- package/dist/cli/init.js +89 -24
- package/dist/cli/init.js.map +1 -1
- package/dist/config/fingerprint.d.ts +6 -1
- package/dist/config/fingerprint.js +8 -4
- package/dist/config/fingerprint.js.map +1 -1
- package/dist/config/load.d.ts +50 -10
- package/dist/config/load.js +93 -27
- package/dist/config/load.js.map +1 -1
- package/dist/config/schema.d.ts +18 -6
- package/dist/config/schema.js +22 -7
- package/dist/config/schema.js.map +1 -1
- package/dist/errors.d.ts +14 -0
- package/dist/errors.js +18 -0
- package/dist/errors.js.map +1 -1
- package/dist/findings/schema.d.ts +44 -6
- package/dist/findings/schema.js +39 -3
- package/dist/findings/schema.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.js +4 -76
- package/dist/main.js.map +1 -1
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/tools/describe.d.ts +5 -4
- package/dist/mcp/tools/describe.js +14 -10
- package/dist/mcp/tools/describe.js.map +1 -1
- package/dist/mcp/tools/end-session.d.ts +3 -1
- package/dist/mcp/tools/end-session.js +7 -3
- package/dist/mcp/tools/end-session.js.map +1 -1
- package/dist/mcp/tools/output.d.ts +5 -4
- package/dist/mcp/tools/output.js +10 -2
- package/dist/mcp/tools/output.js.map +1 -1
- package/dist/mcp/tools/result.d.ts +10 -1
- package/dist/mcp/tools/result.js +8 -6
- package/dist/mcp/tools/result.js.map +1 -1
- package/dist/mcp/tools/start-debug.js +7 -5
- package/dist/mcp/tools/start-debug.js.map +1 -1
- package/dist/redact.d.ts +28 -0
- package/dist/redact.js +51 -0
- package/dist/redact.js.map +1 -0
- package/dist/services/catalog.d.ts +28 -0
- package/dist/services/catalog.js +65 -0
- package/dist/services/catalog.js.map +1 -0
- package/dist/services/debug-api.d.ts +172 -0
- package/dist/services/debug-api.js +9 -0
- package/dist/services/debug-api.js.map +1 -0
- package/dist/services/debug-service.d.ts +25 -173
- package/dist/services/debug-service.js +108 -175
- package/dist/services/debug-service.js.map +1 -1
- package/dist/services/login.d.ts +7 -2
- package/dist/services/login.js +210 -10
- package/dist/services/login.js.map +1 -1
- package/dist/services/retained-snapshot.d.ts +36 -0
- package/dist/services/retained-snapshot.js +63 -0
- package/dist/services/retained-snapshot.js.map +1 -0
- package/dist/services/session-builder.d.ts +26 -0
- package/dist/services/session-builder.js +46 -19
- package/dist/services/session-builder.js.map +1 -1
- package/dist/services/start-guards.d.ts +32 -0
- package/dist/services/start-guards.js +50 -0
- package/dist/services/start-guards.js.map +1 -0
- package/dist/services/summarize.d.ts +12 -3
- package/dist/services/summarize.js +13 -5
- package/dist/services/summarize.js.map +1 -1
- package/dist/session/cleanup.js.map +1 -1
- package/dist/session/findings-store.d.ts +2 -1
- package/dist/session/findings-store.js +30 -2
- package/dist/session/findings-store.js.map +1 -1
- package/dist/session/live-pointer.d.ts +19 -0
- package/dist/session/live-pointer.js +41 -0
- package/dist/session/live-pointer.js.map +1 -0
- package/dist/session/manager.d.ts +11 -1
- package/dist/session/manager.js +46 -2
- package/dist/session/manager.js.map +1 -1
- package/dist/session/owner-lock.d.ts +208 -0
- package/dist/session/owner-lock.js +499 -0
- package/dist/session/owner-lock.js.map +1 -0
- package/dist/session/process-identity.js.map +1 -1
- package/dist/session/session.js +61 -7
- package/dist/session/session.js.map +1 -1
- package/dist/session/state-file.d.ts +74 -14
- package/dist/session/state-file.js +203 -21
- package/dist/session/state-file.js.map +1 -1
- package/package.json +7 -7
- package/dist/adapters/android/android-adapter.test-helpers.d.ts +0 -52
- package/dist/adapters/android/android-adapter.test-helpers.js +0 -115
- package/dist/adapters/android/android-adapter.test-helpers.js.map +0 -1
- package/dist/mcp/server.test-helpers.d.ts +0 -23
- package/dist/mcp/server.test-helpers.js +0 -49
- package/dist/mcp/server.test-helpers.js.map +0 -1
package/dist/adapters/factory.js
CHANGED
|
@@ -4,12 +4,37 @@
|
|
|
4
4
|
* Maps config targets (`web`, `desktop`, `mobile`, …) to their adapter protocols
|
|
5
5
|
* (CDP browser, X11-Wayland, ADB). Throws {@link TargetNotFoundError} if the target
|
|
6
6
|
* name doesn't exist in the config; throws {@link AdapterError} only for an unknown
|
|
7
|
-
* adapter kind. `browser` (CDP), `desktop`
|
|
7
|
+
* adapter kind. The dispatch below WIRES three kinds — `browser` (CDP), `desktop`
|
|
8
|
+
* (X11/Wayland) and `android` (ADB) — and {@link isAdapterWired} is the one place
|
|
9
|
+
* that says so. Whether a kind is usable also depends on the host platform; see
|
|
10
|
+
* `adapters/availability.ts`.
|
|
8
11
|
*/
|
|
9
12
|
import { AdapterError, TargetNotFoundError } from '../errors.js';
|
|
10
13
|
import { AndroidAdapter } from './android/android-adapter.js';
|
|
11
14
|
import { BrowserAdapter } from './browser/browser-adapter.js';
|
|
12
15
|
import { DesktopAdapter } from './desktop/desktop-adapter.js';
|
|
16
|
+
/**
|
|
17
|
+
* The adapter kinds this build wires — the exact set the dispatch switch below
|
|
18
|
+
* handles.
|
|
19
|
+
*
|
|
20
|
+
* `satisfies` (not `:`) ties the map to `Target['adapter']`: a kind added to the
|
|
21
|
+
* config schema without a wiring entry here is a TYPE error, and an entry here
|
|
22
|
+
* without a schema kind is an excess-property error. The switch's `never`
|
|
23
|
+
* default ties the dispatch to the same union — so the map, the dispatch and
|
|
24
|
+
* the schema cannot drift apart.
|
|
25
|
+
*/
|
|
26
|
+
const WIRED_ADAPTERS = {
|
|
27
|
+
browser: true,
|
|
28
|
+
desktop: true,
|
|
29
|
+
android: true,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Whether this build wires an adapter kind — a pure lookup that never throws
|
|
33
|
+
* on an unknown kind (it is simply not wired).
|
|
34
|
+
*/
|
|
35
|
+
export function isAdapterWired(kind) {
|
|
36
|
+
return Object.hasOwn(WIRED_ADAPTERS, kind);
|
|
37
|
+
}
|
|
13
38
|
/**
|
|
14
39
|
* Create an adapter for a named target from the resolved config.
|
|
15
40
|
*
|
|
@@ -41,9 +66,10 @@ export async function createAdapter(targetName, config, profileDir, onLog, timeo
|
|
|
41
66
|
return DesktopAdapter.create({ config: target });
|
|
42
67
|
case 'android':
|
|
43
68
|
// Managed (boot `emulator @avd`) unless `adbSerial` attaches — `create` reads that
|
|
44
|
-
// off the config. No page profile
|
|
69
|
+
// off the config. No page profile applies, but the capture sink does: the logcat
|
|
70
|
+
// rows reach the same redacting durable trail the browser writes.
|
|
45
71
|
// The emulator boots in `open`, which is where the run budget caps it.
|
|
46
|
-
return AndroidAdapter.create({ config: target });
|
|
72
|
+
return AndroidAdapter.create({ config: target, onLog });
|
|
47
73
|
default: {
|
|
48
74
|
const unreachable = target;
|
|
49
75
|
throw new AdapterError(`unknown adapter type: ${unreachable}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/adapters/factory.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"factory.js","sourceRoot":"","sources":["../../src/adapters/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D;;;;;;;;;GASG;AACH,MAAM,cAAc,GAAG;IACrB,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,IAAI;CAC4B,CAAC;AAE5C;;;GAGG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CACjC,UAAkB,EAClB,MAAc,EACd,UAAkB,EAClB,KAAmB,EACnB,SAAkB;IAElB,sEAAsE;IACtE,8EAA8E;IAC9E,gFAAgF;IAChF,kFAAkF;IAClF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAElG,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,mBAAmB,CAAC,WAAW,UAAU,+BAA+B,CAAC,CAAC;IACtF,CAAC;IAED,QAAQ,MAAM,CAAC,OAAO,EAAE,CAAC;QACvB,KAAK,SAAS;YACZ,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QAEjF,KAAK,SAAS;YACZ,mFAAmF;YACnF,+EAA+E;YAC/E,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;QAEnD,KAAK,SAAS;YACZ,mFAAmF;YACnF,iFAAiF;YACjF,kEAAkE;YAClE,uEAAuE;YACvE,OAAO,cAAc,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAE1D,SAAS,CAAC;YACR,MAAM,WAAW,GAAU,MAAM,CAAC;YAClC,MAAM,IAAI,YAAY,CAAC,yBAAyB,WAAW,EAAE,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared console-line rendering for every adapter that streams to the run's
|
|
3
|
+
* durable capture trail.
|
|
4
|
+
*
|
|
5
|
+
* Lives at the `src/adapters/` root (next to `budget.ts`, `limit.ts`) because
|
|
6
|
+
* TWO adapters render it: the browser's CDP capture and the android logcat
|
|
7
|
+
* drain. A helper shared by siblings belongs in a shared place — reaching into
|
|
8
|
+
* one adapter's folder for it couples the two for no reason.
|
|
9
|
+
*
|
|
10
|
+
* The line primitives themselves (`stamp`, `tabMarker`) are shared one step
|
|
11
|
+
* further: the browser's network renderer draws the same `<ISO> [tab]` prefix,
|
|
12
|
+
* so it imports them from here rather than keeping a second copy.
|
|
13
|
+
*/
|
|
14
|
+
import type { ConsoleEntry } from './contract.js';
|
|
15
|
+
/** ISO-8601 stamp from epoch ms; deterministic given the injected clock. */
|
|
16
|
+
export declare function stamp(ts: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* The tab marker, between the timestamp and the row — ` [tab-1]`.
|
|
19
|
+
*
|
|
20
|
+
* Empty when the entry carries no tab (a target without tabs — desktop,
|
|
21
|
+
* mobile): such a row renders byte-identically to the line it rendered before
|
|
22
|
+
* the marker existed.
|
|
23
|
+
*/
|
|
24
|
+
export declare function tabMarker(tab: string | undefined): string;
|
|
25
|
+
/**
|
|
26
|
+
* Render a {@link ConsoleEntry} as one greppable `logs/console.log` line.
|
|
27
|
+
*
|
|
28
|
+
* Shape: `<ISO stamp> [tab] <LEVEL> <text> @ <location>` — the `@ location`
|
|
29
|
+
* part is dropped when the entry has none, and so is the `[tab]` marker: a row
|
|
30
|
+
* from a target without tabs renders exactly as it did before markers existed.
|
|
31
|
+
*/
|
|
32
|
+
export declare function formatConsoleLine(entry: ConsoleEntry): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared console-line rendering for every adapter that streams to the run's
|
|
3
|
+
* durable capture trail.
|
|
4
|
+
*
|
|
5
|
+
* Lives at the `src/adapters/` root (next to `budget.ts`, `limit.ts`) because
|
|
6
|
+
* TWO adapters render it: the browser's CDP capture and the android logcat
|
|
7
|
+
* drain. A helper shared by siblings belongs in a shared place — reaching into
|
|
8
|
+
* one adapter's folder for it couples the two for no reason.
|
|
9
|
+
*
|
|
10
|
+
* The line primitives themselves (`stamp`, `tabMarker`) are shared one step
|
|
11
|
+
* further: the browser's network renderer draws the same `<ISO> [tab]` prefix,
|
|
12
|
+
* so it imports them from here rather than keeping a second copy.
|
|
13
|
+
*/
|
|
14
|
+
/** ISO-8601 stamp from epoch ms; deterministic given the injected clock. */
|
|
15
|
+
export function stamp(ts) {
|
|
16
|
+
return new Date(ts).toISOString();
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The tab marker, between the timestamp and the row — ` [tab-1]`.
|
|
20
|
+
*
|
|
21
|
+
* Empty when the entry carries no tab (a target without tabs — desktop,
|
|
22
|
+
* mobile): such a row renders byte-identically to the line it rendered before
|
|
23
|
+
* the marker existed.
|
|
24
|
+
*/
|
|
25
|
+
export function tabMarker(tab) {
|
|
26
|
+
return tab === undefined ? '' : ` [${tab}]`;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Render a {@link ConsoleEntry} as one greppable `logs/console.log` line.
|
|
30
|
+
*
|
|
31
|
+
* Shape: `<ISO stamp> [tab] <LEVEL> <text> @ <location>` — the `@ location`
|
|
32
|
+
* part is dropped when the entry has none, and so is the `[tab]` marker: a row
|
|
33
|
+
* from a target without tabs renders exactly as it did before markers existed.
|
|
34
|
+
*/
|
|
35
|
+
export function formatConsoleLine(entry) {
|
|
36
|
+
const where = entry.location ? ` @ ${entry.location}` : '';
|
|
37
|
+
return `${stamp(entry.timestamp)}${tabMarker(entry.tab)} ${entry.level.toUpperCase()} ${entry.text}${where}`;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=log-format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-format.js","sourceRoot":"","sources":["../../src/adapters/log-format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAIH,4EAA4E;AAC5E,MAAM,UAAU,KAAK,CAAC,EAAU;IAC9B,OAAO,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;AACpC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,GAAuB;IAC/C,OAAO,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,GAAG,CAAC;AAC9C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAAC,KAAmB;IACnD,MAAM,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3D,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,IAAI,KAAK,CAAC,IAAI,GAAG,KAAK,EAAE,CAAC;AAC/G,CAAC"}
|
package/dist/agent/belt/act.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ import type { Adapter, TabInfo } from '../../adapters/contract.js';
|
|
|
31
31
|
import type { LogChannel } from '../../session/findings-store.js';
|
|
32
32
|
import type { ActTrail } from './trail.js';
|
|
33
33
|
/** The action verbs `act` routes to the shared contract. */
|
|
34
|
-
export declare const ACT_ACTIONS: readonly [
|
|
34
|
+
export declare const ACT_ACTIONS: readonly ['click', 'type', 'key', 'scroll', 'navigate', 'wait', 'switch_tab'];
|
|
35
35
|
/**
|
|
36
36
|
* `act` input — ONE flat object the driver fills per call: `action` picks the
|
|
37
37
|
* verb, the rest are its (optional) operands, validated per-action in
|
|
@@ -39,30 +39,30 @@ export declare const ACT_ACTIONS: readonly ["click", "type", "key", "scroll", "n
|
|
|
39
39
|
*
|
|
40
40
|
* Flat on purpose. A `z.discriminatedUnion('action', …)` renders as a JSON-Schema
|
|
41
41
|
* `anyOf`, which several tool-calling models — including our default driver
|
|
42
|
-
* (
|
|
43
|
-
* churns without ever acting. A single flat object with an
|
|
44
|
-
* filled reliably, at the cost of moving "click needs a
|
|
45
|
-
* text" out of the schema and into a loud runtime check.
|
|
42
|
+
* (deepseek/deepseek-v4-flash) — fail to populate: they emit the call with empty
|
|
43
|
+
* `{}` args and the run churns without ever acting. A single flat object with an
|
|
44
|
+
* enum discriminant is filled reliably, at the cost of moving "click needs a
|
|
45
|
+
* target", "type needs text" out of the schema and into a loud runtime check.
|
|
46
46
|
*/
|
|
47
47
|
export declare const ActInputSchema: z.ZodObject<{
|
|
48
48
|
action: z.ZodEnum<{
|
|
49
|
-
type: "type";
|
|
50
|
-
key: "key";
|
|
51
49
|
click: "click";
|
|
52
|
-
|
|
50
|
+
key: "key";
|
|
53
51
|
navigate: "navigate";
|
|
54
|
-
|
|
52
|
+
scroll: "scroll";
|
|
55
53
|
switch_tab: "switch_tab";
|
|
54
|
+
type: "type";
|
|
55
|
+
wait: "wait";
|
|
56
56
|
}>;
|
|
57
57
|
target: z.ZodOptional<z.ZodString>;
|
|
58
58
|
text: z.ZodOptional<z.ZodString>;
|
|
59
59
|
clear: z.ZodOptional<z.ZodBoolean>;
|
|
60
60
|
key: z.ZodOptional<z.ZodString>;
|
|
61
61
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
62
|
-
up: "up";
|
|
63
62
|
down: "down";
|
|
64
63
|
left: "left";
|
|
65
64
|
right: "right";
|
|
65
|
+
up: "up";
|
|
66
66
|
}>>;
|
|
67
67
|
amount: z.ZodOptional<z.ZodNumber>;
|
|
68
68
|
networkIdle: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -93,6 +93,25 @@ export interface ActResult {
|
|
|
93
93
|
* nothing on the single-tab pages that are the norm.
|
|
94
94
|
*/
|
|
95
95
|
tabs?: TabInfo[];
|
|
96
|
+
/**
|
|
97
|
+
* URLs of full-document loads this act caused without being asked to — present
|
|
98
|
+
* ONLY when there were any.
|
|
99
|
+
*
|
|
100
|
+
* A new document resets the page: typed fields are empty, a cart counter is
|
|
101
|
+
* back to zero, a session may be gone. Nothing on screen distinguishes that
|
|
102
|
+
* from "my click did nothing", so a driver that cannot see it reports the
|
|
103
|
+
* reload-causing action as a success and then reasons about a page it has
|
|
104
|
+
* never observed. Measured on `dummy/web`: a Subscribe click reloaded the
|
|
105
|
+
* document and the run's summary called the newsletter working (#60).
|
|
106
|
+
*
|
|
107
|
+
* A navigation the driver ASKED for never lands here — {@link Adapter.open}
|
|
108
|
+
* drains its own load, so this is only ever the surprise.
|
|
109
|
+
*
|
|
110
|
+
* Credential-redacted at the adapter (see {@link Adapter.takeUnrequestedLoads}),
|
|
111
|
+
* so both this field and the trail note carry no query secret — the values reach
|
|
112
|
+
* the driver's context and the persisted findings.
|
|
113
|
+
*/
|
|
114
|
+
navigated?: string[];
|
|
96
115
|
}
|
|
97
116
|
/**
|
|
98
117
|
* The slice of the findings store `act` records through. {@link FindingsStore}
|
|
@@ -123,14 +142,414 @@ export declare function runAct(adapter: Adapter, recorder: StepRecorder, input:
|
|
|
123
142
|
* the ones that worked and the ones that threw — lands in the persisted findings.
|
|
124
143
|
* `origin` is the app under test's origin (web only); see {@link assertSameOrigin}.
|
|
125
144
|
*/
|
|
126
|
-
export declare function createActTool(adapter: Adapter, recorder: StepRecorder, trail?: ActTrail, origin?: string):
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
145
|
+
export declare function createActTool(adapter: Adapter, recorder: StepRecorder, trail?: ActTrail, origin?: string): ({
|
|
146
|
+
deferLoading?: boolean;
|
|
147
|
+
title?: string;
|
|
148
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
149
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
150
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
151
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
152
|
+
target?: string | undefined;
|
|
153
|
+
text?: string | undefined;
|
|
154
|
+
clear?: boolean | undefined;
|
|
155
|
+
key?: string | undefined;
|
|
156
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
157
|
+
amount?: number | undefined;
|
|
158
|
+
networkIdle?: boolean | undefined;
|
|
159
|
+
timeout?: number | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
162
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
163
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
164
|
+
target?: string | undefined;
|
|
165
|
+
text?: string | undefined;
|
|
166
|
+
clear?: boolean | undefined;
|
|
167
|
+
key?: string | undefined;
|
|
168
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
169
|
+
amount?: number | undefined;
|
|
170
|
+
networkIdle?: boolean | undefined;
|
|
171
|
+
timeout?: number | undefined;
|
|
172
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
173
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
174
|
+
onInputDelta?: ((options: {
|
|
175
|
+
inputTextDelta: string;
|
|
176
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
177
|
+
onInputAvailable?: ((options: {
|
|
178
|
+
input: {
|
|
179
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
180
|
+
target?: string | undefined;
|
|
181
|
+
text?: string | undefined;
|
|
182
|
+
clear?: boolean | undefined;
|
|
183
|
+
key?: string | undefined;
|
|
184
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
185
|
+
amount?: number | undefined;
|
|
186
|
+
networkIdle?: boolean | undefined;
|
|
187
|
+
timeout?: number | undefined;
|
|
188
|
+
};
|
|
189
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
190
|
+
toModelOutput?: ((options: {
|
|
191
|
+
toolCallId: string;
|
|
192
|
+
input: {
|
|
193
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
194
|
+
target?: string | undefined;
|
|
195
|
+
text?: string | undefined;
|
|
196
|
+
clear?: boolean | undefined;
|
|
197
|
+
key?: string | undefined;
|
|
198
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
199
|
+
amount?: number | undefined;
|
|
200
|
+
networkIdle?: boolean | undefined;
|
|
201
|
+
timeout?: number | undefined;
|
|
202
|
+
};
|
|
203
|
+
output: NoInfer<ActResult>;
|
|
204
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
205
|
+
} & {
|
|
206
|
+
outputSchema?: import("ai").FlexibleSchema<ActResult> | undefined;
|
|
207
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
208
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
209
|
+
target?: string | undefined;
|
|
210
|
+
text?: string | undefined;
|
|
211
|
+
clear?: boolean | undefined;
|
|
212
|
+
key?: string | undefined;
|
|
213
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
214
|
+
amount?: number | undefined;
|
|
215
|
+
networkIdle?: boolean | undefined;
|
|
216
|
+
timeout?: number | undefined;
|
|
217
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
218
|
+
} & {
|
|
219
|
+
description?: string | ((options: {
|
|
220
|
+
context: NoInfer<import("@ai-sdk/provider-utils").Context>;
|
|
221
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
222
|
+
}) => string) | undefined;
|
|
223
|
+
strict?: boolean;
|
|
224
|
+
inputExamples?: {
|
|
225
|
+
input: NoInfer<{
|
|
226
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
227
|
+
target?: string | undefined;
|
|
228
|
+
text?: string | undefined;
|
|
229
|
+
clear?: boolean | undefined;
|
|
230
|
+
key?: string | undefined;
|
|
231
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
232
|
+
amount?: number | undefined;
|
|
233
|
+
networkIdle?: boolean | undefined;
|
|
234
|
+
timeout?: number | undefined;
|
|
235
|
+
}>;
|
|
236
|
+
}[] | undefined;
|
|
237
|
+
id?: never;
|
|
238
|
+
isProviderExecuted?: never;
|
|
239
|
+
args?: never;
|
|
240
|
+
supportsDeferredResults?: never;
|
|
241
|
+
} & {
|
|
242
|
+
type?: undefined | 'function';
|
|
243
|
+
} & {
|
|
244
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
245
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
246
|
+
target?: string | undefined;
|
|
247
|
+
text?: string | undefined;
|
|
248
|
+
clear?: boolean | undefined;
|
|
249
|
+
key?: string | undefined;
|
|
250
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
251
|
+
amount?: number | undefined;
|
|
252
|
+
networkIdle?: boolean | undefined;
|
|
253
|
+
timeout?: number | undefined;
|
|
254
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
255
|
+
}) | ({
|
|
256
|
+
deferLoading?: boolean;
|
|
257
|
+
title?: string;
|
|
258
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
259
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
260
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
261
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
262
|
+
target?: string | undefined;
|
|
263
|
+
text?: string | undefined;
|
|
264
|
+
clear?: boolean | undefined;
|
|
265
|
+
key?: string | undefined;
|
|
266
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
267
|
+
amount?: number | undefined;
|
|
268
|
+
networkIdle?: boolean | undefined;
|
|
269
|
+
timeout?: number | undefined;
|
|
270
|
+
}>;
|
|
271
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
272
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
273
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
274
|
+
target?: string | undefined;
|
|
275
|
+
text?: string | undefined;
|
|
276
|
+
clear?: boolean | undefined;
|
|
277
|
+
key?: string | undefined;
|
|
278
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
279
|
+
amount?: number | undefined;
|
|
280
|
+
networkIdle?: boolean | undefined;
|
|
281
|
+
timeout?: number | undefined;
|
|
282
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
283
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
284
|
+
onInputDelta?: ((options: {
|
|
285
|
+
inputTextDelta: string;
|
|
286
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
287
|
+
onInputAvailable?: ((options: {
|
|
288
|
+
input: {
|
|
289
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
290
|
+
target?: string | undefined;
|
|
291
|
+
text?: string | undefined;
|
|
292
|
+
clear?: boolean | undefined;
|
|
293
|
+
key?: string | undefined;
|
|
294
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
295
|
+
amount?: number | undefined;
|
|
296
|
+
networkIdle?: boolean | undefined;
|
|
297
|
+
timeout?: number | undefined;
|
|
298
|
+
};
|
|
299
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
300
|
+
toModelOutput?: ((options: {
|
|
301
|
+
toolCallId: string;
|
|
302
|
+
input: {
|
|
303
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
304
|
+
target?: string | undefined;
|
|
305
|
+
text?: string | undefined;
|
|
306
|
+
clear?: boolean | undefined;
|
|
307
|
+
key?: string | undefined;
|
|
308
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
309
|
+
amount?: number | undefined;
|
|
310
|
+
networkIdle?: boolean | undefined;
|
|
311
|
+
timeout?: number | undefined;
|
|
312
|
+
};
|
|
313
|
+
output: NoInfer<ActResult>;
|
|
314
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
315
|
+
} & {
|
|
316
|
+
outputSchema?: import("ai").FlexibleSchema<ActResult> | undefined;
|
|
317
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
318
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
319
|
+
target?: string | undefined;
|
|
320
|
+
text?: string | undefined;
|
|
321
|
+
clear?: boolean | undefined;
|
|
322
|
+
key?: string | undefined;
|
|
323
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
324
|
+
amount?: number | undefined;
|
|
325
|
+
networkIdle?: boolean | undefined;
|
|
326
|
+
timeout?: number | undefined;
|
|
327
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
328
|
+
} & {
|
|
329
|
+
description?: string | ((options: {
|
|
330
|
+
context: NoInfer<import("@ai-sdk/provider-utils").Context>;
|
|
331
|
+
experimental_sandbox?: import("ai").Experimental_SandboxSession;
|
|
332
|
+
}) => string) | undefined;
|
|
333
|
+
strict?: boolean;
|
|
334
|
+
inputExamples?: {
|
|
335
|
+
input: NoInfer<{
|
|
336
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
337
|
+
target?: string | undefined;
|
|
338
|
+
text?: string | undefined;
|
|
339
|
+
clear?: boolean | undefined;
|
|
340
|
+
key?: string | undefined;
|
|
341
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
342
|
+
amount?: number | undefined;
|
|
343
|
+
networkIdle?: boolean | undefined;
|
|
344
|
+
timeout?: number | undefined;
|
|
345
|
+
}>;
|
|
346
|
+
}[] | undefined;
|
|
347
|
+
id?: never;
|
|
348
|
+
isProviderExecuted?: never;
|
|
349
|
+
args?: never;
|
|
350
|
+
supportsDeferredResults?: never;
|
|
351
|
+
} & {
|
|
352
|
+
type: 'dynamic';
|
|
353
|
+
} & {
|
|
354
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
355
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
356
|
+
target?: string | undefined;
|
|
357
|
+
text?: string | undefined;
|
|
358
|
+
clear?: boolean | undefined;
|
|
359
|
+
key?: string | undefined;
|
|
360
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
361
|
+
amount?: number | undefined;
|
|
362
|
+
networkIdle?: boolean | undefined;
|
|
363
|
+
timeout?: number | undefined;
|
|
364
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
365
|
+
}) | ({
|
|
366
|
+
deferLoading?: boolean;
|
|
367
|
+
title?: string;
|
|
368
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
369
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
370
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
371
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
372
|
+
target?: string | undefined;
|
|
373
|
+
text?: string | undefined;
|
|
374
|
+
clear?: boolean | undefined;
|
|
375
|
+
key?: string | undefined;
|
|
376
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
377
|
+
amount?: number | undefined;
|
|
378
|
+
networkIdle?: boolean | undefined;
|
|
379
|
+
timeout?: number | undefined;
|
|
380
|
+
}>;
|
|
381
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
382
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
383
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
384
|
+
target?: string | undefined;
|
|
385
|
+
text?: string | undefined;
|
|
386
|
+
clear?: boolean | undefined;
|
|
387
|
+
key?: string | undefined;
|
|
388
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
389
|
+
amount?: number | undefined;
|
|
390
|
+
networkIdle?: boolean | undefined;
|
|
391
|
+
timeout?: number | undefined;
|
|
392
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
393
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
394
|
+
onInputDelta?: ((options: {
|
|
395
|
+
inputTextDelta: string;
|
|
396
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
397
|
+
onInputAvailable?: ((options: {
|
|
398
|
+
input: {
|
|
399
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
400
|
+
target?: string | undefined;
|
|
401
|
+
text?: string | undefined;
|
|
402
|
+
clear?: boolean | undefined;
|
|
403
|
+
key?: string | undefined;
|
|
404
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
405
|
+
amount?: number | undefined;
|
|
406
|
+
networkIdle?: boolean | undefined;
|
|
407
|
+
timeout?: number | undefined;
|
|
408
|
+
};
|
|
409
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
410
|
+
toModelOutput?: ((options: {
|
|
411
|
+
toolCallId: string;
|
|
412
|
+
input: {
|
|
413
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
414
|
+
target?: string | undefined;
|
|
415
|
+
text?: string | undefined;
|
|
416
|
+
clear?: boolean | undefined;
|
|
417
|
+
key?: string | undefined;
|
|
418
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
419
|
+
amount?: number | undefined;
|
|
420
|
+
networkIdle?: boolean | undefined;
|
|
421
|
+
timeout?: number | undefined;
|
|
422
|
+
};
|
|
423
|
+
output: NoInfer<ActResult>;
|
|
424
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
425
|
+
} & {
|
|
426
|
+
outputSchema?: import("ai").FlexibleSchema<ActResult> | undefined;
|
|
427
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
428
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
429
|
+
target?: string | undefined;
|
|
430
|
+
text?: string | undefined;
|
|
431
|
+
clear?: boolean | undefined;
|
|
432
|
+
key?: string | undefined;
|
|
433
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
434
|
+
amount?: number | undefined;
|
|
435
|
+
networkIdle?: boolean | undefined;
|
|
436
|
+
timeout?: number | undefined;
|
|
437
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
438
|
+
} & {
|
|
439
|
+
type: 'provider';
|
|
440
|
+
id: `${string}.${string}`;
|
|
441
|
+
args: Record<string, unknown>;
|
|
442
|
+
description?: never;
|
|
443
|
+
strict?: never;
|
|
444
|
+
inputExamples?: never;
|
|
445
|
+
} & {
|
|
446
|
+
isProviderExecuted: false;
|
|
447
|
+
supportsDeferredResults?: never;
|
|
448
|
+
} & {
|
|
449
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
450
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
451
|
+
target?: string | undefined;
|
|
452
|
+
text?: string | undefined;
|
|
453
|
+
clear?: boolean | undefined;
|
|
454
|
+
key?: string | undefined;
|
|
455
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
456
|
+
amount?: number | undefined;
|
|
457
|
+
networkIdle?: boolean | undefined;
|
|
458
|
+
timeout?: number | undefined;
|
|
459
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
460
|
+
}) | ({
|
|
461
|
+
deferLoading?: boolean;
|
|
462
|
+
title?: string;
|
|
463
|
+
providerOptions?: import("@ai-sdk/provider-utils").ProviderOptions;
|
|
464
|
+
metadata?: import("@ai-sdk/provider").JSONObject;
|
|
465
|
+
inputSchema: import("ai").FlexibleSchema<{
|
|
466
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
467
|
+
target?: string | undefined;
|
|
468
|
+
text?: string | undefined;
|
|
469
|
+
clear?: boolean | undefined;
|
|
470
|
+
key?: string | undefined;
|
|
471
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
472
|
+
amount?: number | undefined;
|
|
473
|
+
networkIdle?: boolean | undefined;
|
|
474
|
+
timeout?: number | undefined;
|
|
475
|
+
}>;
|
|
476
|
+
contextSchema?: import("ai").FlexibleSchema<import("@ai-sdk/provider-utils").Context> | undefined;
|
|
477
|
+
needsApproval?: boolean | import("@ai-sdk/provider-utils").ToolNeedsApprovalFunction<{
|
|
478
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
479
|
+
target?: string | undefined;
|
|
480
|
+
text?: string | undefined;
|
|
481
|
+
clear?: boolean | undefined;
|
|
482
|
+
key?: string | undefined;
|
|
483
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
484
|
+
amount?: number | undefined;
|
|
485
|
+
networkIdle?: boolean | undefined;
|
|
486
|
+
timeout?: number | undefined;
|
|
487
|
+
}, NoInfer<import("@ai-sdk/provider-utils").Context>> | undefined;
|
|
488
|
+
onInputStart?: ((options: import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
489
|
+
onInputDelta?: ((options: {
|
|
490
|
+
inputTextDelta: string;
|
|
491
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
492
|
+
onInputAvailable?: ((options: {
|
|
493
|
+
input: {
|
|
494
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
495
|
+
target?: string | undefined;
|
|
496
|
+
text?: string | undefined;
|
|
497
|
+
clear?: boolean | undefined;
|
|
498
|
+
key?: string | undefined;
|
|
499
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
500
|
+
amount?: number | undefined;
|
|
501
|
+
networkIdle?: boolean | undefined;
|
|
502
|
+
timeout?: number | undefined;
|
|
503
|
+
};
|
|
504
|
+
} & import("ai").ToolExecutionOptions<NoInfer<import("@ai-sdk/provider-utils").Context>>) => void | PromiseLike<void>) | undefined;
|
|
505
|
+
toModelOutput?: ((options: {
|
|
506
|
+
toolCallId: string;
|
|
507
|
+
input: {
|
|
508
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
509
|
+
target?: string | undefined;
|
|
510
|
+
text?: string | undefined;
|
|
511
|
+
clear?: boolean | undefined;
|
|
512
|
+
key?: string | undefined;
|
|
513
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
514
|
+
amount?: number | undefined;
|
|
515
|
+
networkIdle?: boolean | undefined;
|
|
516
|
+
timeout?: number | undefined;
|
|
517
|
+
};
|
|
518
|
+
output: NoInfer<ActResult>;
|
|
519
|
+
}) => import("@ai-sdk/provider-utils").ToolResultOutput | PromiseLike<import("@ai-sdk/provider-utils").ToolResultOutput>) | undefined;
|
|
520
|
+
} & {
|
|
521
|
+
outputSchema?: import("ai").FlexibleSchema<ActResult> | undefined;
|
|
522
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
523
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
524
|
+
target?: string | undefined;
|
|
525
|
+
text?: string | undefined;
|
|
526
|
+
clear?: boolean | undefined;
|
|
527
|
+
key?: string | undefined;
|
|
528
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
529
|
+
amount?: number | undefined;
|
|
530
|
+
networkIdle?: boolean | undefined;
|
|
531
|
+
timeout?: number | undefined;
|
|
532
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
533
|
+
} & {
|
|
534
|
+
type: 'provider';
|
|
535
|
+
id: `${string}.${string}`;
|
|
536
|
+
args: Record<string, unknown>;
|
|
537
|
+
description?: never;
|
|
538
|
+
strict?: never;
|
|
539
|
+
inputExamples?: never;
|
|
540
|
+
} & {
|
|
541
|
+
isProviderExecuted: true;
|
|
542
|
+
supportsDeferredResults?: boolean;
|
|
543
|
+
} & {
|
|
544
|
+
execute: import("ai").ToolExecuteFunction<{
|
|
545
|
+
action: "click" | "key" | "navigate" | "scroll" | "switch_tab" | "type" | "wait";
|
|
546
|
+
target?: string | undefined;
|
|
547
|
+
text?: string | undefined;
|
|
548
|
+
clear?: boolean | undefined;
|
|
549
|
+
key?: string | undefined;
|
|
550
|
+
direction?: "down" | "left" | "right" | "up" | undefined;
|
|
551
|
+
amount?: number | undefined;
|
|
552
|
+
networkIdle?: boolean | undefined;
|
|
553
|
+
timeout?: number | undefined;
|
|
554
|
+
}, ActResult, NoInfer<import("@ai-sdk/provider-utils").Context>>;
|
|
555
|
+
});
|