openclaw-cascade-plugin 1.0.12 → 1.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/grpc-client.d.ts +17 -0
  2. package/dist/grpc-client.d.ts.map +1 -0
  3. package/dist/grpc-client.js +154 -0
  4. package/dist/grpc-client.js.map +1 -0
  5. package/dist/index.d.ts +2 -3
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +14 -54
  8. package/dist/index.js.map +1 -1
  9. package/dist/test-utils/mocks.d.ts +6 -4
  10. package/dist/test-utils/mocks.d.ts.map +1 -1
  11. package/dist/test-utils/mocks.js +24 -14
  12. package/dist/test-utils/mocks.js.map +1 -1
  13. package/dist/tools/desktop-automation.d.ts +2 -7
  14. package/dist/tools/desktop-automation.d.ts.map +1 -1
  15. package/dist/tools/desktop-automation.js +64 -123
  16. package/dist/tools/desktop-automation.js.map +1 -1
  17. package/dist/tools/index.d.ts +3 -10
  18. package/dist/tools/index.d.ts.map +1 -1
  19. package/dist/tools/index.js +3 -17
  20. package/dist/tools/index.js.map +1 -1
  21. package/openclaw.plugin.json +1 -1
  22. package/package.json +13 -2
  23. package/proto/cascade.proto +297 -0
  24. package/PHASE1_SUMMARY.md +0 -191
  25. package/PHASE3_SUMMARY.md +0 -195
  26. package/dist/cascade-client.d.ts +0 -53
  27. package/dist/cascade-client.d.ts.map +0 -1
  28. package/dist/cascade-client.js +0 -179
  29. package/dist/cascade-client.js.map +0 -1
  30. package/dist/python-manager.d.ts +0 -59
  31. package/dist/python-manager.d.ts.map +0 -1
  32. package/dist/python-manager.js +0 -190
  33. package/dist/python-manager.js.map +0 -1
  34. package/dist/tools/api-tools.d.ts +0 -9
  35. package/dist/tools/api-tools.d.ts.map +0 -1
  36. package/dist/tools/api-tools.js +0 -102
  37. package/dist/tools/api-tools.js.map +0 -1
  38. package/dist/tools/sandbox-tools.d.ts +0 -9
  39. package/dist/tools/sandbox-tools.d.ts.map +0 -1
  40. package/dist/tools/sandbox-tools.js +0 -79
  41. package/dist/tools/sandbox-tools.js.map +0 -1
  42. package/dist/tools/web-automation.d.ts +0 -9
  43. package/dist/tools/web-automation.d.ts.map +0 -1
  44. package/dist/tools/web-automation.js +0 -471
  45. package/dist/tools/web-automation.js.map +0 -1
  46. package/jest.setup.js +0 -19
  47. package/openclaw-cascade-plugin-1.0.0.tgz +0 -0
  48. package/openclaw-cascade-plugin-1.0.10.tgz +0 -0
  49. package/openclaw-cascade-plugin-1.0.11.tgz +0 -0
  50. package/openclaw-cascade-plugin-1.0.12.tgz +0 -0
  51. package/openclaw-cascade-plugin-1.0.4.tgz +0 -0
  52. package/openclaw-cascade-plugin-1.0.6.tgz +0 -0
  53. package/openclaw-cascade-plugin-1.0.7.tgz +0 -0
  54. package/openclaw-cascade-plugin-1.0.8.tgz +0 -0
  55. package/openclaw-cascade-plugin-1.0.9.tgz +0 -0
  56. package/scripts/postinstall.js +0 -84
  57. package/src/a2a-client.ts +0 -66
  58. package/src/cascade-client.test.ts +0 -400
  59. package/src/cascade-client.ts +0 -198
  60. package/src/config.test.ts +0 -189
  61. package/src/config.ts +0 -137
  62. package/src/index.ts +0 -202
  63. package/src/python-manager.test.ts +0 -187
  64. package/src/python-manager.ts +0 -230
  65. package/src/test-utils/helpers.ts +0 -107
  66. package/src/test-utils/index.ts +0 -2
  67. package/src/test-utils/mocks.ts +0 -101
  68. package/src/tools/a2a-tools.ts +0 -162
  69. package/src/tools/api-tools.ts +0 -110
  70. package/src/tools/desktop-automation.test.ts +0 -308
  71. package/src/tools/desktop-automation.ts +0 -366
  72. package/src/tools/index.ts +0 -13
  73. package/src/tools/response-helpers.ts +0 -78
  74. package/src/tools/sandbox-tools.ts +0 -83
  75. package/src/tools/tool-registry.ts +0 -51
  76. package/src/tools/web-automation.test.ts +0 -177
  77. package/src/tools/web-automation.ts +0 -518
  78. package/src/types/index.ts +0 -133
  79. package/src/wsl.ts +0 -53
  80. package/tsconfig.json +0 -27
@@ -1,79 +0,0 @@
1
- "use strict";
2
- /**
3
- * Sandbox Tools
4
- *
5
- * 1 tool for executing Python code in sandbox
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.registerSandboxTools = registerSandboxTools;
9
- const response_helpers_1 = require("./response-helpers");
10
- function registerSandboxTools(registry, getClient) {
11
- registry.register({
12
- name: 'cascade_execute_sandbox_skill',
13
- description: 'Execute a Python sandbox skill for programmatic file automation',
14
- inputSchema: {
15
- type: 'object',
16
- properties: {
17
- skill_id: {
18
- type: 'string',
19
- description: 'Skill ID to execute'
20
- },
21
- task: {
22
- type: 'string',
23
- description: 'Task description to guide execution'
24
- },
25
- inputs: {
26
- type: 'object',
27
- description: 'Runtime inputs for the operation',
28
- additionalProperties: true
29
- },
30
- files: {
31
- type: 'array',
32
- description: 'Files to copy in/out of sandbox',
33
- items: {
34
- type: 'object',
35
- properties: {
36
- name: { type: 'string' },
37
- local_path: { type: 'string' },
38
- sandbox_path: { type: 'string' },
39
- mode: { type: 'string', enum: ['input', 'output', 'inout'] }
40
- },
41
- required: ['name', 'local_path', 'mode']
42
- }
43
- },
44
- local_path: {
45
- type: 'string',
46
- description: 'Primary file path (convenience when using single file)'
47
- },
48
- python_code: {
49
- type: 'string',
50
- description: 'Optional Python code to execute (auto-generated if not provided)'
51
- }
52
- },
53
- required: ['skill_id', 'task']
54
- },
55
- handler: async (args) => {
56
- try {
57
- if (!args.skill_id) {
58
- return (0, response_helpers_1.errorResponse)('skill_id is required');
59
- }
60
- if (!args.task) {
61
- return (0, response_helpers_1.errorResponse)('task is required');
62
- }
63
- const result = await (await getClient()).callTool('execute_sandbox_skill', {
64
- skill_id: args.skill_id,
65
- task: args.task,
66
- inputs: args.inputs || {},
67
- files: args.files || [],
68
- local_path: args.local_path,
69
- python_code: args.python_code
70
- });
71
- return (0, response_helpers_1.formatSuccess)(result);
72
- }
73
- catch (error) {
74
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to execute sandbox skill', 'Check that the skill exists and E2B_API_KEY is set');
75
- }
76
- }
77
- });
78
- }
79
- //# sourceMappingURL=sandbox-tools.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sandbox-tools.js","sourceRoot":"","sources":["../../src/tools/sandbox-tools.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAOH,oDAuEC;AAzED,yDAAkE;AAElE,SAAgB,oBAAoB,CAAC,QAAsB,EAAE,SAA0C;IACrG,QAAQ,CAAC,QAAQ,CAAC;QAChB,IAAI,EAAE,+BAA+B;QACrC,WAAW,EAAE,iEAAiE;QAC9E,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qBAAqB;iBACnC;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,qCAAqC;iBACnD;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kCAAkC;oBAC/C,oBAAoB,EAAE,IAAI;iBAC3B;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,OAAO;oBACb,WAAW,EAAE,iCAAiC;oBAC9C,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BACxB,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAC9B,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAChC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE;yBAC7D;wBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,CAAC;qBACzC;iBACF;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wDAAwD;iBACtE;gBACD,WAAW,EAAE;oBACX,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kEAAkE;iBAChF;aACF;YACD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;SAC/B;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAyB,EAAE;YAC7C,IAAI,CAAC;gBACH,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;oBACnB,OAAO,IAAA,gCAAa,EAAC,sBAAsB,CAAC,CAAC;gBAC/C,CAAC;gBACD,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;oBACf,OAAO,IAAA,gCAAa,EAAC,kBAAkB,CAAC,CAAC;gBAC3C,CAAC;gBAED,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,uBAAuB,EAAE;oBACzE,QAAQ,EAAE,IAAI,CAAC,QAAQ;oBACvB,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE;oBACzB,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,EAAE;oBACvB,UAAU,EAAE,IAAI,CAAC,UAAU;oBAC3B,WAAW,EAAE,IAAI,CAAC,WAAW;iBAC9B,CAAC,CAAC;gBACH,OAAO,IAAA,gCAAa,EAAC,MAAM,CAAC,CAAC;YAC/B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,gCAAa,EAClB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,iCAAiC,EAC1E,oDAAoD,CACrD,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -1,9 +0,0 @@
1
- /**
2
- * Web Automation Tools (Playwright)
3
- *
4
- * 14 tools for web browser automation
5
- */
6
- import { ToolRegistry } from './tool-registry';
7
- import { CascadeMcpClient } from '../cascade-client';
8
- export declare function registerWebTools(registry: ToolRegistry, getClient: () => Promise<CascadeMcpClient>): void;
9
- //# sourceMappingURL=web-automation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-automation.d.ts","sourceRoot":"","sources":["../../src/tools/web-automation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIrD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,gBAAgB,CAAC,GAAG,IAAI,CA0fzG"}
@@ -1,471 +0,0 @@
1
- "use strict";
2
- /**
3
- * Web Automation Tools (Playwright)
4
- *
5
- * 14 tools for web browser automation
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.registerWebTools = registerWebTools;
9
- const response_helpers_1 = require("./response-helpers");
10
- function registerWebTools(registry, getClient) {
11
- // Navigation Tools (5)
12
- // 1. cascade_pw_goto
13
- registry.register({
14
- name: 'cascade_pw_goto',
15
- description: 'Navigate to a URL in the browser',
16
- inputSchema: {
17
- type: 'object',
18
- properties: {
19
- url: {
20
- type: 'string',
21
- description: 'URL to navigate to'
22
- },
23
- wait_until: {
24
- type: 'string',
25
- enum: ['load', 'domcontentloaded', 'networkidle'],
26
- default: 'networkidle',
27
- description: 'When to consider navigation complete'
28
- }
29
- },
30
- required: ['url']
31
- },
32
- handler: async (args) => {
33
- try {
34
- if (!args.url) {
35
- return (0, response_helpers_1.errorResponse)('url is required');
36
- }
37
- const result = await (await getClient()).callTool('pw_goto', {
38
- url: args.url,
39
- wait_until: args.wait_until || 'networkidle'
40
- });
41
- return (0, response_helpers_1.formatSuccess)(result);
42
- }
43
- catch (error) {
44
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to navigate', 'Check that the URL is valid and accessible');
45
- }
46
- }
47
- });
48
- // 2. cascade_pw_back
49
- registry.register({
50
- name: 'cascade_pw_back',
51
- description: 'Go back to the previous page in browser history',
52
- inputSchema: {
53
- type: 'object',
54
- properties: { _placeholder: { type: "boolean", description: "Ignore this field" } }
55
- },
56
- handler: async () => {
57
- try {
58
- const result = await (await getClient()).callTool('pw_back', {});
59
- return (0, response_helpers_1.formatSuccess)(result);
60
- }
61
- catch (error) {
62
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to go back');
63
- }
64
- }
65
- });
66
- // 3. cascade_pw_forward
67
- registry.register({
68
- name: 'cascade_pw_forward',
69
- description: 'Go forward to the next page in browser history',
70
- inputSchema: {
71
- type: 'object',
72
- properties: { _placeholder: { type: "boolean", description: "Ignore this field" } }
73
- },
74
- handler: async () => {
75
- try {
76
- const result = await (await getClient()).callTool('pw_forward', {});
77
- return (0, response_helpers_1.formatSuccess)(result);
78
- }
79
- catch (error) {
80
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to go forward');
81
- }
82
- }
83
- });
84
- // 4. cascade_pw_reload
85
- registry.register({
86
- name: 'cascade_pw_reload',
87
- description: 'Reload the current page',
88
- inputSchema: {
89
- type: 'object',
90
- properties: {
91
- wait_until: {
92
- type: 'string',
93
- enum: ['load', 'domcontentloaded', 'networkidle'],
94
- default: 'networkidle'
95
- }
96
- }
97
- },
98
- handler: async (args) => {
99
- try {
100
- const result = await (await getClient()).callTool('pw_reload', {
101
- wait_until: args.wait_until || 'networkidle'
102
- });
103
- return (0, response_helpers_1.formatSuccess)(result);
104
- }
105
- catch (error) {
106
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to reload page');
107
- }
108
- }
109
- });
110
- // 5. cascade_pw_wait_for_url
111
- registry.register({
112
- name: 'cascade_pw_wait_for_url',
113
- description: 'Wait for the current URL to match a pattern',
114
- inputSchema: {
115
- type: 'object',
116
- properties: {
117
- url: {
118
- type: 'string',
119
- description: 'URL pattern to wait for (glob or regex)'
120
- },
121
- timeout_ms: {
122
- type: 'integer',
123
- default: 10000,
124
- description: 'Timeout in milliseconds'
125
- }
126
- },
127
- required: ['url']
128
- },
129
- handler: async (args) => {
130
- try {
131
- if (!args.url) {
132
- return (0, response_helpers_1.errorResponse)('url is required');
133
- }
134
- const result = await (await getClient()).callTool('pw_wait_for_url', {
135
- url: args.url,
136
- timeout_ms: args.timeout_ms || 10000
137
- });
138
- return (0, response_helpers_1.formatSuccess)(result);
139
- }
140
- catch (error) {
141
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to wait for URL', 'The page may be loading slowly or the URL pattern may not match');
142
- }
143
- }
144
- });
145
- // Locator Tools (2)
146
- // 6. cascade_pw_locator_count
147
- registry.register({
148
- name: 'cascade_pw_locator_count',
149
- description: 'Count elements matching a selector',
150
- inputSchema: {
151
- type: 'object',
152
- properties: {
153
- selector: {
154
- type: 'string',
155
- description: 'CSS selector or Playwright locator'
156
- }
157
- },
158
- required: ['selector']
159
- },
160
- handler: async (args) => {
161
- try {
162
- if (!args.selector) {
163
- return (0, response_helpers_1.errorResponse)('selector is required');
164
- }
165
- const result = await (await getClient()).callTool('pw_locator_count', {
166
- selector: args.selector
167
- });
168
- return (0, response_helpers_1.formatSuccess)({ count: result.count });
169
- }
170
- catch (error) {
171
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to count elements');
172
- }
173
- }
174
- });
175
- // 7. cascade_pw_locator_text
176
- registry.register({
177
- name: 'cascade_pw_locator_text',
178
- description: 'Get text content of the first matching element',
179
- inputSchema: {
180
- type: 'object',
181
- properties: {
182
- selector: {
183
- type: 'string',
184
- description: 'CSS selector or Playwright locator'
185
- },
186
- timeout_ms: {
187
- type: 'integer',
188
- default: 8000,
189
- description: 'Timeout in milliseconds'
190
- }
191
- },
192
- required: ['selector']
193
- },
194
- handler: async (args) => {
195
- try {
196
- if (!args.selector) {
197
- return (0, response_helpers_1.errorResponse)('selector is required');
198
- }
199
- const result = await (await getClient()).callTool('pw_locator_text', {
200
- selector: args.selector,
201
- timeout_ms: args.timeout_ms || 8000
202
- });
203
- return (0, response_helpers_1.formatSuccess)({ text: result.text });
204
- }
205
- catch (error) {
206
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to get element text');
207
- }
208
- }
209
- });
210
- // Interaction Tools (5)
211
- // 8. cascade_pw_click
212
- registry.register({
213
- name: 'cascade_pw_click',
214
- description: 'Click on an element',
215
- inputSchema: {
216
- type: 'object',
217
- properties: {
218
- selector: {
219
- type: 'string',
220
- description: 'CSS selector or Playwright locator'
221
- },
222
- timeout_ms: {
223
- type: 'integer',
224
- default: 8000
225
- }
226
- },
227
- required: ['selector']
228
- },
229
- handler: async (args) => {
230
- try {
231
- if (!args.selector) {
232
- return (0, response_helpers_1.errorResponse)('selector is required');
233
- }
234
- const result = await (await getClient()).callTool('pw_click', {
235
- selector: args.selector,
236
- timeout_ms: args.timeout_ms || 8000
237
- });
238
- return (0, response_helpers_1.formatSuccess)(result);
239
- }
240
- catch (error) {
241
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to click element', 'Make sure the element exists and is visible');
242
- }
243
- }
244
- });
245
- // 9. cascade_pw_fill
246
- registry.register({
247
- name: 'cascade_pw_fill',
248
- description: 'Fill a form field with text',
249
- inputSchema: {
250
- type: 'object',
251
- properties: {
252
- selector: {
253
- type: 'string',
254
- description: 'CSS selector or Playwright locator'
255
- },
256
- text: {
257
- type: 'string',
258
- description: 'Text to fill'
259
- },
260
- timeout_ms: {
261
- type: 'integer',
262
- default: 8000
263
- }
264
- },
265
- required: ['selector', 'text']
266
- },
267
- handler: async (args) => {
268
- try {
269
- if (!args.selector) {
270
- return (0, response_helpers_1.errorResponse)('selector is required');
271
- }
272
- if (!args.text) {
273
- return (0, response_helpers_1.errorResponse)('text is required');
274
- }
275
- const result = await (await getClient()).callTool('pw_fill', {
276
- selector: args.selector,
277
- text: args.text,
278
- timeout_ms: args.timeout_ms || 8000
279
- });
280
- return (0, response_helpers_1.formatSuccess)(result);
281
- }
282
- catch (error) {
283
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to fill field');
284
- }
285
- }
286
- });
287
- // 10. cascade_pw_press
288
- registry.register({
289
- name: 'cascade_pw_press',
290
- description: 'Press a key on an element',
291
- inputSchema: {
292
- type: 'object',
293
- properties: {
294
- selector: {
295
- type: 'string',
296
- description: 'CSS selector or Playwright locator'
297
- },
298
- key: {
299
- type: 'string',
300
- description: 'Key to press (e.g., Enter, Tab, Escape)'
301
- },
302
- timeout_ms: {
303
- type: 'integer',
304
- default: 8000
305
- }
306
- },
307
- required: ['selector', 'key']
308
- },
309
- handler: async (args) => {
310
- try {
311
- if (!args.selector) {
312
- return (0, response_helpers_1.errorResponse)('selector is required');
313
- }
314
- if (!args.key) {
315
- return (0, response_helpers_1.errorResponse)('key is required');
316
- }
317
- const result = await (await getClient()).callTool('pw_press', {
318
- selector: args.selector,
319
- key: args.key,
320
- timeout_ms: args.timeout_ms || 8000
321
- });
322
- return (0, response_helpers_1.formatSuccess)(result);
323
- }
324
- catch (error) {
325
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to press key');
326
- }
327
- }
328
- });
329
- // 11. cascade_pw_select_option
330
- registry.register({
331
- name: 'cascade_pw_select_option',
332
- description: 'Select option(s) in a dropdown',
333
- inputSchema: {
334
- type: 'object',
335
- properties: {
336
- selector: {
337
- type: 'string',
338
- description: 'CSS selector for select element'
339
- },
340
- values: {
341
- type: 'array',
342
- items: { type: 'string' },
343
- description: 'Values to select'
344
- }
345
- },
346
- required: ['selector', 'values']
347
- },
348
- handler: async (args) => {
349
- try {
350
- if (!args.selector) {
351
- return (0, response_helpers_1.errorResponse)('selector is required');
352
- }
353
- if (!args.values || !Array.isArray(args.values)) {
354
- return (0, response_helpers_1.errorResponse)('values is required and must be an array');
355
- }
356
- const result = await (await getClient()).callTool('pw_select_option', {
357
- selector: args.selector,
358
- values: args.values
359
- });
360
- return (0, response_helpers_1.formatSuccess)({ selected: result.selected });
361
- }
362
- catch (error) {
363
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to select option');
364
- }
365
- }
366
- });
367
- // Evaluation Tools (3)
368
- // 12. cascade_pw_eval
369
- registry.register({
370
- name: 'cascade_pw_eval',
371
- description: 'Evaluate JavaScript in the page context',
372
- inputSchema: {
373
- type: 'object',
374
- properties: {
375
- expression: {
376
- type: 'string',
377
- description: 'JavaScript expression to evaluate'
378
- }
379
- },
380
- required: ['expression']
381
- },
382
- handler: async (args) => {
383
- try {
384
- if (!args.expression) {
385
- return (0, response_helpers_1.errorResponse)('expression is required');
386
- }
387
- const result = await (await getClient()).callTool('pw_eval', {
388
- expression: args.expression
389
- });
390
- return (0, response_helpers_1.formatSuccess)({ result: result.result });
391
- }
392
- catch (error) {
393
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to evaluate expression');
394
- }
395
- }
396
- });
397
- // 13. cascade_pw_eval_on_selector
398
- registry.register({
399
- name: 'cascade_pw_eval_on_selector',
400
- description: 'Evaluate JavaScript on a specific element',
401
- inputSchema: {
402
- type: 'object',
403
- properties: {
404
- selector: {
405
- type: 'string',
406
- description: 'CSS selector for target element'
407
- },
408
- expression: {
409
- type: 'string',
410
- description: 'JavaScript function body (receives element as argument)'
411
- }
412
- },
413
- required: ['selector', 'expression']
414
- },
415
- handler: async (args) => {
416
- try {
417
- if (!args.selector) {
418
- return (0, response_helpers_1.errorResponse)('selector is required');
419
- }
420
- if (!args.expression) {
421
- return (0, response_helpers_1.errorResponse)('expression is required');
422
- }
423
- const result = await (await getClient()).callTool('pw_eval_on_selector', {
424
- selector: args.selector,
425
- expression: args.expression
426
- });
427
- return (0, response_helpers_1.formatSuccess)({ result: result.result });
428
- }
429
- catch (error) {
430
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to evaluate on element');
431
- }
432
- }
433
- });
434
- // 14. cascade_pw_list_frames
435
- registry.register({
436
- name: 'cascade_pw_list_frames',
437
- description: 'List all frames (iframes) on the current page',
438
- inputSchema: {
439
- type: 'object',
440
- properties: { _placeholder: { type: "boolean", description: "Ignore this field" } }
441
- },
442
- handler: async () => {
443
- try {
444
- const result = await (await getClient()).callTool('pw_list_frames', {});
445
- return (0, response_helpers_1.formatSuccess)({ frames: result.frames });
446
- }
447
- catch (error) {
448
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to list frames');
449
- }
450
- }
451
- });
452
- // 15. cascade_pw_get_cookies
453
- registry.register({
454
- name: 'cascade_pw_get_cookies',
455
- description: 'Get all cookies for the current context',
456
- inputSchema: {
457
- type: 'object',
458
- properties: { _placeholder: { type: "boolean", description: "Ignore this field" } }
459
- },
460
- handler: async () => {
461
- try {
462
- const result = await (await getClient()).callTool('pw_get_cookies', {});
463
- return (0, response_helpers_1.formatSuccess)({ cookies: result.cookies });
464
- }
465
- catch (error) {
466
- return (0, response_helpers_1.errorResponse)(error instanceof Error ? error.message : 'Failed to get cookies');
467
- }
468
- }
469
- });
470
- }
471
- //# sourceMappingURL=web-automation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-automation.js","sourceRoot":"","sources":["../../src/tools/web-automation.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAOH,4CA0fC;AA5fD,yDAAkE;AAElE,SAAgB,gBAAgB,CAAC,QAAsB,EAAE,SAA0C;IACjG,uBAAuB;IAEvB,qBAAqB;IACrB,QAAQ,CAAC,QAAQ,CAAC;QAChB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,kCAAkC;QAC/C,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,GAAG,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,oBAAoB;iBAClC;gBACD,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,MAAM,EAAE,kBAAkB,EAA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AAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,yCAAyC;QACtD,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE,EAAE,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,mBAAmB,EAAE,EAAE;SACpF;QACD,OAAO,EAAE,KAAK,IAA2B,EAAE;YACzC,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;gBACxE,OAAO,IAAA,gCAAa,EAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YACpD,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,IAAA,gCAAa,EAClB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CACjE,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
package/jest.setup.js DELETED
@@ -1,19 +0,0 @@
1
- // Jest setup file
2
-
3
- // Mock console methods to reduce noise during tests
4
- global.console = {
5
- ...console,
6
- log: jest.fn(),
7
- debug: jest.fn(),
8
- info: jest.fn(),
9
- warn: jest.fn(),
10
- error: jest.fn()
11
- };
12
-
13
- // Set default test timeout
14
- jest.setTimeout(10000);
15
-
16
- // Cleanup after each test
17
- afterEach(() => {
18
- jest.clearAllMocks();
19
- });
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file