@kritchoff/agent-browser 0.9.2
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/LICENSE +201 -0
- package/README.md +903 -0
- package/README.sdk.md +77 -0
- package/bin/agent-browser-linux-x64 +0 -0
- package/bin/agent-browser.js +109 -0
- package/dist/actions.d.ts +17 -0
- package/dist/actions.d.ts.map +1 -0
- package/dist/actions.js +1427 -0
- package/dist/actions.js.map +1 -0
- package/dist/browser.d.ts +474 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js +1566 -0
- package/dist/browser.js.map +1 -0
- package/dist/cdp-client.d.ts +103 -0
- package/dist/cdp-client.d.ts.map +1 -0
- package/dist/cdp-client.js +223 -0
- package/dist/cdp-client.js.map +1 -0
- package/dist/daemon.d.ts +60 -0
- package/dist/daemon.d.ts.map +1 -0
- package/dist/daemon.js +401 -0
- package/dist/daemon.js.map +1 -0
- package/dist/dualmode-config.d.ts +37 -0
- package/dist/dualmode-config.d.ts.map +1 -0
- package/dist/dualmode-config.js +44 -0
- package/dist/dualmode-config.js.map +1 -0
- package/dist/dualmode-fetcher.d.ts +60 -0
- package/dist/dualmode-fetcher.d.ts.map +1 -0
- package/dist/dualmode-fetcher.js +449 -0
- package/dist/dualmode-fetcher.js.map +1 -0
- package/dist/dualmode-types.d.ts +183 -0
- package/dist/dualmode-types.d.ts.map +1 -0
- package/dist/dualmode-types.js +8 -0
- package/dist/dualmode-types.js.map +1 -0
- package/dist/ios-actions.d.ts +11 -0
- package/dist/ios-actions.d.ts.map +1 -0
- package/dist/ios-actions.js +228 -0
- package/dist/ios-actions.js.map +1 -0
- package/dist/ios-manager.d.ts +266 -0
- package/dist/ios-manager.d.ts.map +1 -0
- package/dist/ios-manager.js +1073 -0
- package/dist/ios-manager.js.map +1 -0
- package/dist/protocol.d.ts +26 -0
- package/dist/protocol.d.ts.map +1 -0
- package/dist/protocol.js +832 -0
- package/dist/protocol.js.map +1 -0
- package/dist/snapshot.d.ts +83 -0
- package/dist/snapshot.d.ts.map +1 -0
- package/dist/snapshot.js +653 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/stream-server.d.ts +117 -0
- package/dist/stream-server.d.ts.map +1 -0
- package/dist/stream-server.js +305 -0
- package/dist/stream-server.js.map +1 -0
- package/dist/types.d.ts +742 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/docker-compose.sdk.yml +45 -0
- package/package.json +85 -0
- package/scripts/benchmark.sh +80 -0
- package/scripts/build-all-platforms.sh +68 -0
- package/scripts/check-version-sync.js +39 -0
- package/scripts/copy-native.js +36 -0
- package/scripts/fast_reset.sh +108 -0
- package/scripts/postinstall.js +235 -0
- package/scripts/publish_images.sh +55 -0
- package/scripts/snapshot_manager.sh +293 -0
- package/scripts/start-android-agent.sh +49 -0
- package/scripts/sync-version.js +69 -0
- package/scripts/vaccine-run +26 -0
- package/sdk.sh +153 -0
- package/skills/agent-browser/SKILL.md +217 -0
- package/skills/agent-browser/references/authentication.md +202 -0
- package/skills/agent-browser/references/commands.md +259 -0
- package/skills/agent-browser/references/proxy-support.md +188 -0
- package/skills/agent-browser/references/session-management.md +193 -0
- package/skills/agent-browser/references/snapshot-refs.md +194 -0
- package/skills/agent-browser/references/video-recording.md +173 -0
- package/skills/agent-browser/templates/authenticated-session.sh +97 -0
- package/skills/agent-browser/templates/capture-workflow.sh +69 -0
- package/skills/agent-browser/templates/form-automation.sh +62 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +356 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +303 -0
- package/skills/skill-creator/scripts/package_skill.py +113 -0
- package/skills/skill-creator/scripts/quick_validate.py +95 -0
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DualMode Accessibility Tree Fetcher
|
|
3
|
+
*
|
|
4
|
+
* Fetches enhanced accessibility tree from WootzApp Android browser via CDP.
|
|
5
|
+
* Transforms flat node list into hierarchical tree structure with refs.
|
|
6
|
+
*/
|
|
7
|
+
import { CDPClient } from './cdp-client.js';
|
|
8
|
+
import * as fs from 'fs';
|
|
9
|
+
/**
|
|
10
|
+
* DualMode AXTree fetcher
|
|
11
|
+
*/
|
|
12
|
+
export class DualModeAXTreeFetcher {
|
|
13
|
+
host;
|
|
14
|
+
port;
|
|
15
|
+
constructor(host = 'localhost', port = 9224) {
|
|
16
|
+
this.host = host;
|
|
17
|
+
this.port = port;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Clear Chrome app data using pm clear command
|
|
21
|
+
*/
|
|
22
|
+
async clearBrowserData() {
|
|
23
|
+
try {
|
|
24
|
+
console.log('[DualMode] Clearing browser data...');
|
|
25
|
+
const { exec } = await import('child_process');
|
|
26
|
+
const { promisify } = await import('util');
|
|
27
|
+
const execAsync = promisify(exec);
|
|
28
|
+
// Clear Chrome app data using pm clear
|
|
29
|
+
console.log('[DualMode] Clearing app data with pm clear...');
|
|
30
|
+
await execAsync('docker exec android-world adb shell pm clear org.chromium.chrome');
|
|
31
|
+
await new Promise(resolve => setTimeout(resolve, 1000));
|
|
32
|
+
console.log('[DualMode] ✓ Browser cleared successfully');
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.warn('[DualMode] Failed to clear browser:', error.message);
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Fetch DualMode AXTree for a URL
|
|
41
|
+
*/
|
|
42
|
+
async fetchTree(url) {
|
|
43
|
+
// EXACT FLOW AS REQUESTED:
|
|
44
|
+
// 1. Connect to CDP
|
|
45
|
+
// 2. Get current URL from Playwright (passed as parameter)
|
|
46
|
+
// 3. Load URL in emulator browser and wait till completely loaded
|
|
47
|
+
// 4. Call getDualModeAXTree through CDP
|
|
48
|
+
// 5. Clear chromium app data using pm clear
|
|
49
|
+
const { exec } = await import('child_process');
|
|
50
|
+
const { promisify } = await import('util');
|
|
51
|
+
const execAsync = promisify(exec);
|
|
52
|
+
// Create a new CDP client for this fetch
|
|
53
|
+
const cdpClient = new CDPClient({
|
|
54
|
+
timeout: 30000,
|
|
55
|
+
commandTimeout: 15000,
|
|
56
|
+
});
|
|
57
|
+
try {
|
|
58
|
+
// Step 1: Connect to CDP
|
|
59
|
+
console.log('[DualMode] Step 1: Getting WebSocket debugger URL...');
|
|
60
|
+
const wsUrl = await CDPClient.getWebSocketDebuggerUrl(this.host, this.port);
|
|
61
|
+
console.log('[DualMode] Step 1: Connecting to CDP...');
|
|
62
|
+
await cdpClient.connect(wsUrl);
|
|
63
|
+
console.log('[DualMode] ✓ Connected to CDP');
|
|
64
|
+
// Enable Page domain
|
|
65
|
+
await cdpClient.send('Page.enable');
|
|
66
|
+
// Step 2: URL is already from Playwright (passed as parameter)
|
|
67
|
+
console.log(`[DualMode] Step 2: URL from Playwright: ${url}`);
|
|
68
|
+
// Step 3: Load URL in emulator browser and wait till completely loaded
|
|
69
|
+
console.log(`[DualMode] Step 3: Navigating Android browser to: ${url}`);
|
|
70
|
+
await cdpClient.send('Page.navigate', { url });
|
|
71
|
+
console.log('[DualMode] Step 3: Waiting for page load event...');
|
|
72
|
+
await cdpClient.waitForEvent('Page.loadEventFired', 30000);
|
|
73
|
+
// Wait for accessibility tree to fully build
|
|
74
|
+
console.log('[DualMode] Step 3: Waiting for accessibility tree to settle (3s)...');
|
|
75
|
+
await new Promise(resolve => setTimeout(resolve, 3000));
|
|
76
|
+
console.log('[DualMode] ✓ Page completely loaded');
|
|
77
|
+
// Step 4: Call getDualModeAXTree through CDP
|
|
78
|
+
console.log('[DualMode] Step 4: Enabling Accessibility domain...');
|
|
79
|
+
await cdpClient.send('Accessibility.enable');
|
|
80
|
+
console.log('[DualMode] Step 4: Calling getDualModeAXTree...');
|
|
81
|
+
const result = await cdpClient.send('Accessibility.getDualModeAXTree', {});
|
|
82
|
+
fs.appendFileSync('/tmp/debug.log', `[DualMode] Raw Response: ${JSON.stringify(result, null, 2)}\n`);
|
|
83
|
+
console.log('[DualMode] Raw AXTree response:', JSON.stringify(result, null, 2));
|
|
84
|
+
console.log(`[DualMode] ✓ Successfully fetched tree with ${result.nodes?.length || 0} nodes`);
|
|
85
|
+
// Disable Accessibility domain (cleanup)
|
|
86
|
+
await cdpClient.send('Accessibility.disable');
|
|
87
|
+
// Step 5: Clear chromium app data using pm clear
|
|
88
|
+
console.log('[DualMode] Step 5: Clearing chromium app data...');
|
|
89
|
+
await execAsync('docker exec android-world adb shell pm clear org.chromium.chrome');
|
|
90
|
+
console.log('[DualMode] ✓ Chromium app data cleared');
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
finally {
|
|
94
|
+
// Always close CDP connection
|
|
95
|
+
await cdpClient.close();
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Convert standard CDP accessibility tree to DualMode format
|
|
100
|
+
*/
|
|
101
|
+
convertStandardTreeToDualMode(standardTree) {
|
|
102
|
+
const nodes = [];
|
|
103
|
+
if (!standardTree.nodes || !Array.isArray(standardTree.nodes)) {
|
|
104
|
+
console.warn('[DualMode] No nodes in standard tree response');
|
|
105
|
+
return { nodes: [] };
|
|
106
|
+
}
|
|
107
|
+
console.log(`[DualMode] Converting ${standardTree.nodes.length} nodes...`);
|
|
108
|
+
for (const node of standardTree.nodes) {
|
|
109
|
+
// Skip ignored nodes
|
|
110
|
+
if (node.ignored)
|
|
111
|
+
continue;
|
|
112
|
+
const nodeId = this.parseNodeId(node.nodeId);
|
|
113
|
+
const backendNodeId = node.backendDomNodeId;
|
|
114
|
+
// Extract role
|
|
115
|
+
const role = node.role?.value || 'unknown';
|
|
116
|
+
// Extract name
|
|
117
|
+
const name = node.name?.value || '';
|
|
118
|
+
// Build child IDs
|
|
119
|
+
const childrenIds = [];
|
|
120
|
+
if (node.childIds && Array.isArray(node.childIds)) {
|
|
121
|
+
childrenIds.push(...node.childIds.map((id) => this.parseNodeId(id)));
|
|
122
|
+
}
|
|
123
|
+
// Determine parent (we'll set this in a second pass)
|
|
124
|
+
const parentId = null;
|
|
125
|
+
// Convert to DualMode format
|
|
126
|
+
const dualModeNode = {
|
|
127
|
+
core: {
|
|
128
|
+
nodeId,
|
|
129
|
+
backendNodeId,
|
|
130
|
+
className: role, // Use role as className for now
|
|
131
|
+
childrenIds,
|
|
132
|
+
parentId,
|
|
133
|
+
text: name,
|
|
134
|
+
contentDescription: node.description?.value,
|
|
135
|
+
focusable: node.focusable,
|
|
136
|
+
clickable: node.properties?.some((p) => p.name === 'clickable') || false,
|
|
137
|
+
enabled: !node.disabled,
|
|
138
|
+
},
|
|
139
|
+
xrayMode: {
|
|
140
|
+
semantics: {
|
|
141
|
+
role,
|
|
142
|
+
name,
|
|
143
|
+
description: node.description?.value,
|
|
144
|
+
},
|
|
145
|
+
dom: {
|
|
146
|
+
tagName: node.properties?.find((p) => p.name === 'htmlTag')?.value?.value,
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
nodes.push(dualModeNode);
|
|
151
|
+
}
|
|
152
|
+
// Second pass: set parent IDs
|
|
153
|
+
const nodeMap = new Map(nodes.map(n => [n.core.nodeId, n]));
|
|
154
|
+
for (const node of nodes) {
|
|
155
|
+
for (const childId of node.core.childrenIds) {
|
|
156
|
+
const child = nodeMap.get(childId);
|
|
157
|
+
if (child) {
|
|
158
|
+
child.core.parentId = node.core.nodeId;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
console.log(`[DualMode] Conversion complete: ${nodes.length} nodes`);
|
|
163
|
+
return { nodes };
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Parse node ID (handle string or number)
|
|
167
|
+
*/
|
|
168
|
+
parseNodeId(nodeId) {
|
|
169
|
+
if (typeof nodeId === 'number')
|
|
170
|
+
return nodeId;
|
|
171
|
+
const parsed = parseInt(nodeId, 10);
|
|
172
|
+
return isNaN(parsed) ? 0 : parsed;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Fetch tree for current page (no navigation)
|
|
176
|
+
*/
|
|
177
|
+
async fetchCurrentPageTree() {
|
|
178
|
+
// Create a new CDP client for each fetch
|
|
179
|
+
const cdpClient = new CDPClient({
|
|
180
|
+
timeout: 30000,
|
|
181
|
+
commandTimeout: 15000,
|
|
182
|
+
});
|
|
183
|
+
try {
|
|
184
|
+
// Get WebSocket URL
|
|
185
|
+
const wsUrl = await CDPClient.getWebSocketDebuggerUrl(this.host, this.port);
|
|
186
|
+
// Connect to CDP
|
|
187
|
+
await cdpClient.connect(wsUrl);
|
|
188
|
+
// Enable Accessibility domain
|
|
189
|
+
await cdpClient.send('Accessibility.enable');
|
|
190
|
+
// Fetch DualMode tree
|
|
191
|
+
const result = await cdpClient.send('Accessibility.getDualModeAXTree');
|
|
192
|
+
// Disable Accessibility domain (cleanup)
|
|
193
|
+
await cdpClient.send('Accessibility.disable');
|
|
194
|
+
return result;
|
|
195
|
+
}
|
|
196
|
+
finally {
|
|
197
|
+
await cdpClient.close();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Build hierarchical tree from flat node list
|
|
202
|
+
*/
|
|
203
|
+
buildTree(response) {
|
|
204
|
+
const nodes = response.nodes;
|
|
205
|
+
const nodeMap = new Map();
|
|
206
|
+
// First pass: populate nodeMap
|
|
207
|
+
for (const node of nodes) {
|
|
208
|
+
nodeMap.set(node.core.nodeId, { ...node, children: [] });
|
|
209
|
+
}
|
|
210
|
+
// Second pass: build parent-child relationships
|
|
211
|
+
let root = null;
|
|
212
|
+
for (const node of nodeMap.values()) {
|
|
213
|
+
if (node.core.parentId === null) {
|
|
214
|
+
root = node;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
const parent = nodeMap.get(node.core.parentId);
|
|
218
|
+
if (parent) {
|
|
219
|
+
parent.children = parent.children || [];
|
|
220
|
+
parent.children.push(node);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
if (!root) {
|
|
225
|
+
throw new Error('No root node found in DualMode tree');
|
|
226
|
+
}
|
|
227
|
+
// Collect interactive elements
|
|
228
|
+
const interactiveElements = [];
|
|
229
|
+
let refCounter = 0;
|
|
230
|
+
const collectInteractive = (node) => {
|
|
231
|
+
const isInteractive = node.core.clickable ||
|
|
232
|
+
node.core.focusable ||
|
|
233
|
+
this.isInteractiveRole(node.xrayMode?.semantics?.role);
|
|
234
|
+
if (isInteractive) {
|
|
235
|
+
interactiveElements.push({
|
|
236
|
+
node,
|
|
237
|
+
ref: `e${++refCounter}`,
|
|
238
|
+
selector: this.generateSelector(node),
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (node.children) {
|
|
242
|
+
for (const child of node.children) {
|
|
243
|
+
collectInteractive(child);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
collectInteractive(root);
|
|
248
|
+
return {
|
|
249
|
+
root,
|
|
250
|
+
nodeMap,
|
|
251
|
+
interactiveElements,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Check if role is interactive
|
|
256
|
+
*/
|
|
257
|
+
isInteractiveRole(role) {
|
|
258
|
+
if (!role)
|
|
259
|
+
return false;
|
|
260
|
+
const interactiveRoles = [
|
|
261
|
+
'button', 'link', 'textbox', 'checkbox', 'radio',
|
|
262
|
+
'combobox', 'listbox', 'menuitem', 'searchbox',
|
|
263
|
+
'slider', 'spinbutton', 'switch', 'tab',
|
|
264
|
+
];
|
|
265
|
+
return interactiveRoles.includes(role.toLowerCase());
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Generate selector for node (best effort)
|
|
269
|
+
*/
|
|
270
|
+
generateSelector(node) {
|
|
271
|
+
const dom = node.xrayMode?.dom;
|
|
272
|
+
// Prefer ID selector
|
|
273
|
+
if (dom?.id) {
|
|
274
|
+
return `#${dom.id}`;
|
|
275
|
+
}
|
|
276
|
+
// Use role and name for Playwright-style selector
|
|
277
|
+
const role = node.xrayMode?.semantics?.role;
|
|
278
|
+
const name = node.xrayMode?.semantics?.name || node.core.text;
|
|
279
|
+
if (role && name) {
|
|
280
|
+
return `role=${role}[name="${name}"]`;
|
|
281
|
+
}
|
|
282
|
+
if (role) {
|
|
283
|
+
return `role=${role}`;
|
|
284
|
+
}
|
|
285
|
+
// Fallback to CSS selector
|
|
286
|
+
if (dom?.selector) {
|
|
287
|
+
return dom.selector;
|
|
288
|
+
}
|
|
289
|
+
// Last resort: use text content
|
|
290
|
+
const text = node.core.text || node.core.contentDescription;
|
|
291
|
+
if (text) {
|
|
292
|
+
return `text="${text.substring(0, 50)}"`;
|
|
293
|
+
}
|
|
294
|
+
return `node-${node.core.nodeId}`;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* Generate text tree representation
|
|
298
|
+
*/
|
|
299
|
+
generateTextTree(tree, options = {}) {
|
|
300
|
+
const lines = [];
|
|
301
|
+
const refMap = new Map();
|
|
302
|
+
// Build ref map
|
|
303
|
+
for (const elem of tree.interactiveElements) {
|
|
304
|
+
refMap.set(elem.node.core.nodeId, elem.ref);
|
|
305
|
+
}
|
|
306
|
+
const traverse = (node, depth = 0) => {
|
|
307
|
+
// Check depth limit
|
|
308
|
+
if (options.maxDepth !== undefined && depth > options.maxDepth) {
|
|
309
|
+
return;
|
|
310
|
+
}
|
|
311
|
+
// Check if should include node
|
|
312
|
+
if (options.interactive && !refMap.has(node.core.nodeId)) {
|
|
313
|
+
// Skip non-interactive nodes in interactive mode
|
|
314
|
+
// but still traverse children
|
|
315
|
+
if (node.children) {
|
|
316
|
+
for (const child of node.children) {
|
|
317
|
+
traverse(child, depth);
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
// Check intent filter
|
|
323
|
+
if (options.intentFilter && options.intentFilter.length > 0) {
|
|
324
|
+
const intentTags = node.xrayMode?.semantics?.intentTags || [];
|
|
325
|
+
const hasMatchingIntent = options.intentFilter.some(filter => intentTags.includes(filter));
|
|
326
|
+
if (!hasMatchingIntent) {
|
|
327
|
+
return;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// Check importance threshold
|
|
331
|
+
if (options.minImportance !== undefined) {
|
|
332
|
+
const importance = node.xrayMode?.insights?.importance ?? 0;
|
|
333
|
+
if (importance < options.minImportance) {
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
// Build node line
|
|
338
|
+
const indent = ' '.repeat(depth);
|
|
339
|
+
const role = node.xrayMode?.semantics?.role || node.core.className;
|
|
340
|
+
const name = node.xrayMode?.semantics?.name ||
|
|
341
|
+
node.core.text ||
|
|
342
|
+
node.core.contentDescription || '';
|
|
343
|
+
const ref = refMap.get(node.core.nodeId);
|
|
344
|
+
const refPart = ref ? ` [ref=${ref}]` : '';
|
|
345
|
+
let line = `${indent}- ${role}`;
|
|
346
|
+
if (name) {
|
|
347
|
+
line += ` "${name}"`;
|
|
348
|
+
}
|
|
349
|
+
line += refPart;
|
|
350
|
+
// Add metadata if requested
|
|
351
|
+
if (options.includeMetadata && node.xrayMode) {
|
|
352
|
+
const tags = node.xrayMode.semantics?.intentTags;
|
|
353
|
+
if (tags && tags.length > 0) {
|
|
354
|
+
line += ` [intent:${tags.join(',')}]`;
|
|
355
|
+
}
|
|
356
|
+
const importance = node.xrayMode.insights?.importance;
|
|
357
|
+
if (importance !== undefined) {
|
|
358
|
+
line += ` [importance:${importance.toFixed(2)}]`;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
lines.push(line);
|
|
362
|
+
// Traverse children
|
|
363
|
+
if (node.children) {
|
|
364
|
+
for (const child of node.children) {
|
|
365
|
+
traverse(child, depth + 1);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
traverse(tree.root);
|
|
370
|
+
return lines.join('\n');
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* Get enhanced snapshot with refs
|
|
374
|
+
*/
|
|
375
|
+
async getEnhancedSnapshot(url, options = {}) {
|
|
376
|
+
const response = await this.fetchTree(url);
|
|
377
|
+
const tree = this.buildTree(response);
|
|
378
|
+
const textTree = this.generateTextTree(tree, options);
|
|
379
|
+
// Build refs map
|
|
380
|
+
const refs = {};
|
|
381
|
+
for (const elem of tree.interactiveElements) {
|
|
382
|
+
refs[elem.ref] = {
|
|
383
|
+
selector: elem.selector || '',
|
|
384
|
+
role: elem.node.xrayMode?.semantics?.role || elem.node.core.className,
|
|
385
|
+
name: elem.node.xrayMode?.semantics?.name || elem.node.core.text,
|
|
386
|
+
nodeId: elem.node.core.nodeId,
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
return {
|
|
390
|
+
tree: textTree,
|
|
391
|
+
refs,
|
|
392
|
+
dualModeTree: tree,
|
|
393
|
+
metadata: {
|
|
394
|
+
engine: 'wootzapp',
|
|
395
|
+
timestamp: Date.now(),
|
|
396
|
+
url,
|
|
397
|
+
nodeCount: tree.nodeMap.size,
|
|
398
|
+
interactiveCount: tree.interactiveElements.length,
|
|
399
|
+
},
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* Get current page snapshot (no navigation)
|
|
404
|
+
*/
|
|
405
|
+
async getCurrentPageSnapshot(options = {}) {
|
|
406
|
+
const response = await this.fetchCurrentPageTree();
|
|
407
|
+
const tree = this.buildTree(response);
|
|
408
|
+
const textTree = this.generateTextTree(tree, options);
|
|
409
|
+
// Build refs map
|
|
410
|
+
const refs = {};
|
|
411
|
+
for (const elem of tree.interactiveElements) {
|
|
412
|
+
refs[elem.ref] = {
|
|
413
|
+
selector: elem.selector || '',
|
|
414
|
+
role: elem.node.xrayMode?.semantics?.role || elem.node.core.className,
|
|
415
|
+
name: elem.node.xrayMode?.semantics?.name || elem.node.core.text,
|
|
416
|
+
nodeId: elem.node.core.nodeId,
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
// Get current URL from CDP
|
|
420
|
+
let currentUrl = '';
|
|
421
|
+
try {
|
|
422
|
+
const cdpClient = new CDPClient({
|
|
423
|
+
timeout: 5000,
|
|
424
|
+
commandTimeout: 5000,
|
|
425
|
+
});
|
|
426
|
+
const wsUrl = await CDPClient.getWebSocketDebuggerUrl(this.host, this.port);
|
|
427
|
+
await cdpClient.connect(wsUrl);
|
|
428
|
+
const target = await cdpClient.send('Target.getTargetInfo');
|
|
429
|
+
currentUrl = target.targetInfo?.url || '';
|
|
430
|
+
await cdpClient.close();
|
|
431
|
+
}
|
|
432
|
+
catch {
|
|
433
|
+
// Ignore errors, URL is optional
|
|
434
|
+
}
|
|
435
|
+
return {
|
|
436
|
+
tree: textTree,
|
|
437
|
+
refs,
|
|
438
|
+
dualModeTree: tree,
|
|
439
|
+
metadata: {
|
|
440
|
+
engine: 'wootzapp',
|
|
441
|
+
timestamp: Date.now(),
|
|
442
|
+
url: currentUrl,
|
|
443
|
+
nodeCount: tree.nodeMap.size,
|
|
444
|
+
interactiveCount: tree.interactiveElements.length,
|
|
445
|
+
},
|
|
446
|
+
};
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
//# sourceMappingURL=dualmode-fetcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dualmode-fetcher.js","sourceRoot":"","sources":["../src/dualmode-fetcher.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AASzB;;GAEG;AACH,MAAM,OAAO,qBAAqB;IACxB,IAAI,CAAS;IACb,IAAI,CAAS;IAErB,YAAY,OAAe,WAAW,EAAE,OAAe,IAAI;QACzD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QAC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gBAC5B,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,CAAC,MAAM;aAClD;SACF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for DualMode Accessibility Tree
|
|
3
|
+
*
|
|
4
|
+
* DualMode AXTree combines Android-like semantics with web accessibility,
|
|
5
|
+
* providing rich context for AI agents.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Core accessibility node properties (Android-like structure)
|
|
9
|
+
*/
|
|
10
|
+
export interface DualModeAXNodeCore {
|
|
11
|
+
/** Unique node identifier */
|
|
12
|
+
nodeId: number;
|
|
13
|
+
/** Backend DOM node ID (links to browser DOM) */
|
|
14
|
+
backendNodeId?: number;
|
|
15
|
+
/** Android class name (e.g., "android.widget.Button", "android.view.View") */
|
|
16
|
+
className: string;
|
|
17
|
+
/** Array of child node IDs */
|
|
18
|
+
childrenIds: number[];
|
|
19
|
+
/** Parent node ID (null for root) */
|
|
20
|
+
parentId: number | null;
|
|
21
|
+
/** Text content of the node */
|
|
22
|
+
text?: string;
|
|
23
|
+
/** Content description (accessibility label) */
|
|
24
|
+
contentDescription?: string;
|
|
25
|
+
/** Whether the node is focusable */
|
|
26
|
+
focusable?: boolean;
|
|
27
|
+
/** Whether the node is clickable */
|
|
28
|
+
clickable?: boolean;
|
|
29
|
+
/** Whether the node is enabled */
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
/** Whether the node is checked (for checkboxes) */
|
|
32
|
+
checked?: boolean;
|
|
33
|
+
/** Whether the node is selected */
|
|
34
|
+
selected?: boolean;
|
|
35
|
+
/** Bounding box coordinates */
|
|
36
|
+
bounds?: {
|
|
37
|
+
left: number;
|
|
38
|
+
top: number;
|
|
39
|
+
right: number;
|
|
40
|
+
bottom: number;
|
|
41
|
+
};
|
|
42
|
+
/** Whether the node is visible to user */
|
|
43
|
+
visibleToUser?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Enhanced semantic metadata for AI understanding
|
|
47
|
+
*/
|
|
48
|
+
export interface DualModeXRaySemantics {
|
|
49
|
+
/** Web accessibility role (button, link, textbox, etc.) */
|
|
50
|
+
role: string;
|
|
51
|
+
/** Computed accessible name */
|
|
52
|
+
name?: string;
|
|
53
|
+
/** Element description */
|
|
54
|
+
description?: string;
|
|
55
|
+
/** Intent tags for agent decision-making */
|
|
56
|
+
intentTags?: string[];
|
|
57
|
+
/** Semantic category (navigation, form, content, etc.) */
|
|
58
|
+
category?: string;
|
|
59
|
+
/** Interaction hints */
|
|
60
|
+
interactions?: string[];
|
|
61
|
+
/** Visual context */
|
|
62
|
+
visualContext?: {
|
|
63
|
+
isAboveFold?: boolean;
|
|
64
|
+
isPrimary?: boolean;
|
|
65
|
+
prominence?: 'high' | 'medium' | 'low';
|
|
66
|
+
};
|
|
67
|
+
/** Form context */
|
|
68
|
+
formContext?: {
|
|
69
|
+
fieldType?: string;
|
|
70
|
+
required?: boolean;
|
|
71
|
+
validation?: string;
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* XRayMode metadata - enhanced perception layer
|
|
76
|
+
*/
|
|
77
|
+
export interface DualModeXRayMode {
|
|
78
|
+
/** Enhanced semantics */
|
|
79
|
+
semantics?: DualModeXRaySemantics;
|
|
80
|
+
/** ML-generated insights */
|
|
81
|
+
insights?: {
|
|
82
|
+
/** Element importance score (0-1) */
|
|
83
|
+
importance?: number;
|
|
84
|
+
/** Predicted user intent */
|
|
85
|
+
predictedIntent?: string;
|
|
86
|
+
/** Task relevance tags */
|
|
87
|
+
taskTags?: string[];
|
|
88
|
+
};
|
|
89
|
+
/** Accessibility properties */
|
|
90
|
+
accessibility?: {
|
|
91
|
+
/** ARIA role */
|
|
92
|
+
ariaRole?: string;
|
|
93
|
+
/** ARIA attributes */
|
|
94
|
+
ariaAttributes?: Record<string, string>;
|
|
95
|
+
/** Landmark role */
|
|
96
|
+
landmark?: string;
|
|
97
|
+
};
|
|
98
|
+
/** DOM metadata */
|
|
99
|
+
dom?: {
|
|
100
|
+
/** HTML tag name */
|
|
101
|
+
tagName?: string;
|
|
102
|
+
/** ID attribute */
|
|
103
|
+
id?: string;
|
|
104
|
+
/** Class names */
|
|
105
|
+
classNames?: string[];
|
|
106
|
+
/** CSS selector path */
|
|
107
|
+
selector?: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Complete DualMode AX Node
|
|
112
|
+
*/
|
|
113
|
+
export interface DualModeAXNode {
|
|
114
|
+
/** Core Android-like properties */
|
|
115
|
+
core: DualModeAXNodeCore;
|
|
116
|
+
/** Enhanced XRayMode metadata */
|
|
117
|
+
xrayMode?: DualModeXRayMode;
|
|
118
|
+
/** Child nodes (populated when building tree) */
|
|
119
|
+
children?: DualModeAXNode[];
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* CDP response for getDualModeAXTree command
|
|
123
|
+
*/
|
|
124
|
+
export interface GetDualModeAXTreeResponse {
|
|
125
|
+
/** Flat array of nodes */
|
|
126
|
+
nodes: DualModeAXNode[];
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Processed tree structure
|
|
130
|
+
*/
|
|
131
|
+
export interface DualModeTree {
|
|
132
|
+
/** Root node */
|
|
133
|
+
root: DualModeAXNode;
|
|
134
|
+
/** Flat node lookup by nodeId */
|
|
135
|
+
nodeMap: Map<number, DualModeAXNode>;
|
|
136
|
+
/** Interactive elements with refs */
|
|
137
|
+
interactiveElements: Array<{
|
|
138
|
+
node: DualModeAXNode;
|
|
139
|
+
ref: string;
|
|
140
|
+
selector?: string;
|
|
141
|
+
}>;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* DualMode snapshot options
|
|
145
|
+
*/
|
|
146
|
+
export interface DualModeSnapshotOptions {
|
|
147
|
+
/** Only include interactive elements */
|
|
148
|
+
interactive?: boolean;
|
|
149
|
+
/** Maximum tree depth */
|
|
150
|
+
maxDepth?: number;
|
|
151
|
+
/** Include XRayMode metadata in output */
|
|
152
|
+
includeMetadata?: boolean;
|
|
153
|
+
/** Filter by intent tags */
|
|
154
|
+
intentFilter?: string[];
|
|
155
|
+
/** Minimum importance score (0-1) */
|
|
156
|
+
minImportance?: number;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Enhanced snapshot with DualMode tree
|
|
160
|
+
*/
|
|
161
|
+
export interface DualModeEnhancedSnapshot {
|
|
162
|
+
/** Text tree representation */
|
|
163
|
+
tree: string;
|
|
164
|
+
/** Reference map for element interaction */
|
|
165
|
+
refs: Record<string, {
|
|
166
|
+
selector: string;
|
|
167
|
+
role: string;
|
|
168
|
+
name?: string;
|
|
169
|
+
nth?: number;
|
|
170
|
+
nodeId?: number;
|
|
171
|
+
}>;
|
|
172
|
+
/** Full DualMode tree structure */
|
|
173
|
+
dualModeTree?: DualModeTree;
|
|
174
|
+
/** Metadata */
|
|
175
|
+
metadata?: {
|
|
176
|
+
engine: 'wootzapp' | 'playwright';
|
|
177
|
+
timestamp: number;
|
|
178
|
+
url: string;
|
|
179
|
+
nodeCount: number;
|
|
180
|
+
interactiveCount: number;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
//# sourceMappingURL=dualmode-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dualmode-types.d.ts","sourceRoot":"","sources":["../src/dualmode-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,6BAA6B;IAC7B,MAAM,EAAE,MAAM,CAAC;IAEf,iDAAiD;IACjD,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,CAAC;IAElB,8BAA8B;IAC9B,WAAW,EAAE,MAAM,EAAE,CAAC;IAEtB,qCAAqC;IACrC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IAExB,+BA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