donobu 2.14.0 → 2.14.1

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 (59) hide show
  1. package/dist/assets/donobu-virtual-mouse.svg +11 -0
  2. package/dist/assets/donobu.css +62 -0
  3. package/dist/assets/generated/parameter-schemas.json +139 -240
  4. package/dist/assets/generated/version +1 -1
  5. package/dist/esm/assets/donobu-virtual-mouse.svg +11 -0
  6. package/dist/esm/assets/donobu.css +62 -0
  7. package/dist/esm/assets/generated/parameter-schemas.json +139 -240
  8. package/dist/esm/assets/generated/version +1 -1
  9. package/dist/esm/managers/DonobuFlow.d.ts.map +1 -1
  10. package/dist/esm/managers/DonobuFlow.js +13 -17
  11. package/dist/esm/managers/DonobuFlow.js.map +1 -1
  12. package/dist/esm/managers/DonobuFlowsManager.d.ts.map +1 -1
  13. package/dist/esm/managers/DonobuFlowsManager.js +77 -74
  14. package/dist/esm/managers/DonobuFlowsManager.js.map +1 -1
  15. package/dist/esm/managers/InteractionVisualizer.d.ts +10 -2
  16. package/dist/esm/managers/InteractionVisualizer.d.ts.map +1 -1
  17. package/dist/esm/managers/InteractionVisualizer.js +26 -38
  18. package/dist/esm/managers/InteractionVisualizer.js.map +1 -1
  19. package/dist/esm/playwrightTestExtensions.d.ts.map +1 -1
  20. package/dist/esm/playwrightTestExtensions.js +1 -12
  21. package/dist/esm/playwrightTestExtensions.js.map +1 -1
  22. package/dist/esm/tools/ClickTool.d.ts +1 -1
  23. package/dist/esm/tools/ClickTool.d.ts.map +1 -1
  24. package/dist/esm/tools/ClickTool.js +8 -5
  25. package/dist/esm/tools/ClickTool.js.map +1 -1
  26. package/dist/esm/utils/Logger.d.ts +2 -0
  27. package/dist/esm/utils/Logger.d.ts.map +1 -1
  28. package/dist/esm/utils/Logger.js +23 -14
  29. package/dist/esm/utils/Logger.js.map +1 -1
  30. package/dist/esm/utils/PlaywrightUtils.d.ts +8 -20
  31. package/dist/esm/utils/PlaywrightUtils.d.ts.map +1 -1
  32. package/dist/esm/utils/PlaywrightUtils.js +51 -168
  33. package/dist/esm/utils/PlaywrightUtils.js.map +1 -1
  34. package/dist/managers/DonobuFlow.d.ts.map +1 -1
  35. package/dist/managers/DonobuFlow.js +13 -17
  36. package/dist/managers/DonobuFlow.js.map +1 -1
  37. package/dist/managers/DonobuFlowsManager.d.ts.map +1 -1
  38. package/dist/managers/DonobuFlowsManager.js +77 -74
  39. package/dist/managers/DonobuFlowsManager.js.map +1 -1
  40. package/dist/managers/InteractionVisualizer.d.ts +10 -2
  41. package/dist/managers/InteractionVisualizer.d.ts.map +1 -1
  42. package/dist/managers/InteractionVisualizer.js +26 -38
  43. package/dist/managers/InteractionVisualizer.js.map +1 -1
  44. package/dist/playwrightTestExtensions.d.ts.map +1 -1
  45. package/dist/playwrightTestExtensions.js +1 -12
  46. package/dist/playwrightTestExtensions.js.map +1 -1
  47. package/dist/tools/ClickTool.d.ts +1 -1
  48. package/dist/tools/ClickTool.d.ts.map +1 -1
  49. package/dist/tools/ClickTool.js +8 -5
  50. package/dist/tools/ClickTool.js.map +1 -1
  51. package/dist/utils/Logger.d.ts +2 -0
  52. package/dist/utils/Logger.d.ts.map +1 -1
  53. package/dist/utils/Logger.js +23 -14
  54. package/dist/utils/Logger.js.map +1 -1
  55. package/dist/utils/PlaywrightUtils.d.ts +8 -20
  56. package/dist/utils/PlaywrightUtils.d.ts.map +1 -1
  57. package/dist/utils/PlaywrightUtils.js +51 -168
  58. package/dist/utils/PlaywrightUtils.js.map +1 -1
  59. package/package.json +1 -1
@@ -150,32 +150,87 @@
150
150
  "additionalProperties": false,
151
151
  "required": ["annotation", "rationale", "whyThisAnnotation"]
152
152
  },
153
- "HandleBrowserDialogToolCoreParameters": {
154
- "description": "The parameters for handling browser dialogs",
153
+ "InputTextToolCoreParameters": {
155
154
  "type": "object",
156
155
  "properties": {
157
156
  "text": {
158
- "description": "If this is a \"confirm\" dialog, a string of \"true\" will accept the dialog and a string of \"false\" will dismiss it.\nHowever, if this is a \"prompt\" dialog, any non-null string will accept it, and a null value will dismiss it.",
159
- "type": ["string", "null"]
157
+ "description": "The text to input.",
158
+ "type": "string"
159
+ },
160
+ "finalizeWithSubmit": {
161
+ "description": "Attempt to submit the data after inputting the text (i.e. hitting 'Enter' at the end).\nThis can be useful if doing something like using a webpage's search box, etc.",
162
+ "type": "boolean"
160
163
  }
161
164
  },
162
165
  "additionalProperties": false,
163
- "required": ["text"]
166
+ "required": ["finalizeWithSubmit", "text"]
164
167
  },
165
- "HandleBrowserDialogToolGptParameters": {
168
+ "SelectorBasedInputTextToolParameters": {
166
169
  "type": "object",
167
170
  "properties": {
171
+ "selector": {
172
+ "description": "A query structure used to resolve specific a HTML element in a webpage.",
173
+ "type": "object",
174
+ "properties": {
175
+ "element": {
176
+ "description": "An prioritized list of element selectors to use to attempt to resolve the\ndesired element, going from most specific to least specific. The first\nelement selector that is successfully used, wins, and the rest are ignored.",
177
+ "type": "array",
178
+ "items": {
179
+ "type": "string"
180
+ }
181
+ },
182
+ "frame": {
183
+ "description": "A selector for the corresponding frame of the element to select.\nIf null, this means the primary frame of the page is used.",
184
+ "type": "string"
185
+ }
186
+ },
187
+ "additionalProperties": false,
188
+ "required": ["element", "frame"]
189
+ },
190
+ "text": {
191
+ "description": "The text to input.",
192
+ "type": "string"
193
+ },
194
+ "finalizeWithSubmit": {
195
+ "description": "Attempt to submit the data after inputting the text (i.e. hitting 'Enter' at the end).\nThis can be useful if doing something like using a webpage's search box, etc.",
196
+ "type": "boolean"
197
+ }
198
+ },
199
+ "additionalProperties": false,
200
+ "required": ["finalizeWithSubmit", "selector", "text"]
201
+ },
202
+ "AnnotationBasedInputTextToolParameters": {
203
+ "type": "object",
204
+ "properties": {
205
+ "whyThisAnnotation": {
206
+ "description": "The reason why this particular numbered annotation was chosen.",
207
+ "type": "string"
208
+ },
209
+ "annotation": {
210
+ "description": "The numbered annotation of the element to click.",
211
+ "type": "string"
212
+ },
168
213
  "rationale": {
169
214
  "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
170
215
  "type": "string"
171
216
  },
172
217
  "text": {
173
- "description": "If this is a \"confirm\" dialog, a string of \"true\" will accept the dialog and a string of \"false\" will dismiss it.\nHowever, if this is a \"prompt\" dialog, any non-null string will accept it, and a null value will dismiss it.",
174
- "type": ["string", "null"]
218
+ "description": "The text to input.",
219
+ "type": "string"
220
+ },
221
+ "finalizeWithSubmit": {
222
+ "description": "Attempt to submit the data after inputting the text (i.e. hitting 'Enter' at the end).\nThis can be useful if doing something like using a webpage's search box, etc.",
223
+ "type": "boolean"
175
224
  }
176
225
  },
177
226
  "additionalProperties": false,
178
- "required": ["rationale", "text"]
227
+ "required": [
228
+ "annotation",
229
+ "finalizeWithSubmit",
230
+ "rationale",
231
+ "text",
232
+ "whyThisAnnotation"
233
+ ]
179
234
  },
180
235
  "InputRandomizedEmailAddressToolCoreParameters": {
181
236
  "type": "object",
@@ -259,55 +314,6 @@
259
314
  "whyThisAnnotation"
260
315
  ]
261
316
  },
262
- "MarkObjectiveCompleteToolCoreParameters": {
263
- "description": "Parameters for marking an objective as complete",
264
- "type": "object",
265
- "additionalProperties": false,
266
- "required": [],
267
- "properties": {}
268
- },
269
- "MarkObjectiveCompleteToolGptParameters": {
270
- "description": "Parameters for marking an objective as complete",
271
- "type": "object",
272
- "properties": {
273
- "details": {
274
- "description": "Relevant details for the completed objective.",
275
- "type": "string"
276
- },
277
- "rationale": {
278
- "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
279
- "type": "string"
280
- }
281
- },
282
- "additionalProperties": false,
283
- "required": ["details", "rationale"]
284
- },
285
- "GoToWebpageToolCoreParameters": {
286
- "type": "object",
287
- "properties": {
288
- "url": {
289
- "description": "The URL to navigate to. Must use the http or https (example is https://google.com).",
290
- "type": "string"
291
- }
292
- },
293
- "additionalProperties": false,
294
- "required": ["url"]
295
- },
296
- "GoToWebpageToolGptParameters": {
297
- "type": "object",
298
- "properties": {
299
- "rationale": {
300
- "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
301
- "type": "string"
302
- },
303
- "url": {
304
- "description": "The URL to navigate to. Must use the http or https (example is https://google.com).",
305
- "type": "string"
306
- }
307
- },
308
- "additionalProperties": false,
309
- "required": ["rationale", "url"]
310
- },
311
317
  "PressKeyToolCoreParameters": {
312
318
  "type": "object",
313
319
  "properties": {
@@ -372,158 +378,152 @@
372
378
  "additionalProperties": false,
373
379
  "required": ["annotation", "key", "rationale", "whyThisAnnotation"]
374
380
  },
375
- "RunAccessibilityTestToolCoreParameters": {
381
+ "HandleBrowserDialogToolCoreParameters": {
382
+ "description": "The parameters for handling browser dialogs",
383
+ "type": "object",
384
+ "properties": {
385
+ "text": {
386
+ "description": "If this is a \"confirm\" dialog, a string of \"true\" will accept the dialog and a string of \"false\" will dismiss it.\nHowever, if this is a \"prompt\" dialog, any non-null string will accept it, and a null value will dismiss it.",
387
+ "type": ["string", "null"]
388
+ }
389
+ },
390
+ "additionalProperties": false,
391
+ "required": ["text"]
392
+ },
393
+ "HandleBrowserDialogToolGptParameters": {
394
+ "type": "object",
395
+ "properties": {
396
+ "rationale": {
397
+ "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
398
+ "type": "string"
399
+ },
400
+ "text": {
401
+ "description": "If this is a \"confirm\" dialog, a string of \"true\" will accept the dialog and a string of \"false\" will dismiss it.\nHowever, if this is a \"prompt\" dialog, any non-null string will accept it, and a null value will dismiss it.",
402
+ "type": ["string", "null"]
403
+ }
404
+ },
405
+ "additionalProperties": false,
406
+ "required": ["rationale", "text"]
407
+ },
408
+ "MarkObjectiveCompleteToolCoreParameters": {
409
+ "description": "Parameters for marking an objective as complete",
376
410
  "type": "object",
377
411
  "additionalProperties": false,
378
412
  "required": [],
379
413
  "properties": {}
380
414
  },
381
- "RunAccessibilityTestToolGptParameters": {
415
+ "MarkObjectiveCompleteToolGptParameters": {
416
+ "description": "Parameters for marking an objective as complete",
382
417
  "type": "object",
383
418
  "properties": {
419
+ "details": {
420
+ "description": "Relevant details for the completed objective.",
421
+ "type": "string"
422
+ },
384
423
  "rationale": {
385
424
  "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
386
425
  "type": "string"
387
426
  }
388
427
  },
389
428
  "additionalProperties": false,
390
- "required": ["rationale"]
429
+ "required": ["details", "rationale"]
391
430
  },
392
- "ScrollPageToolCoreParameters": {
431
+ "GoToWebpageToolCoreParameters": {
393
432
  "type": "object",
394
433
  "properties": {
395
- "direction": {
396
- "description": "The direction to scroll - either UP or DOWN",
397
- "enum": ["DOWN", "UP"],
434
+ "url": {
435
+ "description": "The URL to navigate to. Must use the http or https (example is https://google.com).",
398
436
  "type": "string"
399
437
  }
400
438
  },
401
439
  "additionalProperties": false,
402
- "required": ["direction"]
440
+ "required": ["url"]
403
441
  },
404
- "ScrollPageToolGptParameters": {
442
+ "GoToWebpageToolGptParameters": {
405
443
  "type": "object",
406
444
  "properties": {
407
445
  "rationale": {
408
446
  "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
409
447
  "type": "string"
410
448
  },
411
- "direction": {
412
- "description": "The direction to scroll - either UP or DOWN",
413
- "enum": ["DOWN", "UP"],
449
+ "url": {
450
+ "description": "The URL to navigate to. Must use the http or https (example is https://google.com).",
414
451
  "type": "string"
415
452
  }
416
453
  },
417
454
  "additionalProperties": false,
418
- "required": ["direction", "rationale"]
455
+ "required": ["rationale", "url"]
419
456
  },
420
- "AssertToolCoreParameters": {
457
+ "RunAccessibilityTestToolCoreParameters": {
458
+ "type": "object",
459
+ "additionalProperties": false,
460
+ "required": [],
461
+ "properties": {}
462
+ },
463
+ "RunAccessibilityTestToolGptParameters": {
421
464
  "type": "object",
422
465
  "properties": {
423
- "assertionToTestFor": {
424
- "description": "The assertion that will be tested for, using plain English.\n\nExamples:\n- 'Assert that this webpage includes a product summary.'\n- 'Assert there are more than 3 search results.'\n- 'Assert that the webpage title is \"Hello World\".'\n- 'Assert that the theme of the website is in dark mode.'\n\nThe raw assertion text should avoid embedding state about the webpage\nsince the assertion is being evaluated by the tool itself, and the tool\nwill have access to the webpage's content, title, URL, etc.\n\nExamples of bad assertions:\n- 'Assert that the 3 search results is greater than 2.'\n- 'Assert that the first search result (\"banana\") is not \"strawberry\".'\n\nExamples of the bad assertions being rephrased as good assertions:\n- 'Assert that there are more than 2 search results.'\n- 'Assert that the first search result is not \"strawberry\".'",
466
+ "rationale": {
467
+ "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
425
468
  "type": "string"
426
469
  }
427
470
  },
428
471
  "additionalProperties": false,
429
- "required": ["assertionToTestFor"]
472
+ "required": ["rationale"]
430
473
  },
431
- "AssertToolGptParameters": {
474
+ "ScrollPageToolCoreParameters": {
432
475
  "type": "object",
433
476
  "properties": {
434
- "rationale": {
435
- "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
436
- "type": "string"
437
- },
438
- "assertionToTestFor": {
439
- "description": "The assertion that will be tested for, using plain English.\n\nExamples:\n- 'Assert that this webpage includes a product summary.'\n- 'Assert there are more than 3 search results.'\n- 'Assert that the webpage title is \"Hello World\".'\n- 'Assert that the theme of the website is in dark mode.'\n\nThe raw assertion text should avoid embedding state about the webpage\nsince the assertion is being evaluated by the tool itself, and the tool\nwill have access to the webpage's content, title, URL, etc.\n\nExamples of bad assertions:\n- 'Assert that the 3 search results is greater than 2.'\n- 'Assert that the first search result (\"banana\") is not \"strawberry\".'\n\nExamples of the bad assertions being rephrased as good assertions:\n- 'Assert that there are more than 2 search results.'\n- 'Assert that the first search result is not \"strawberry\".'",
477
+ "direction": {
478
+ "description": "The direction to scroll - either UP or DOWN",
479
+ "enum": ["DOWN", "UP"],
440
480
  "type": "string"
441
481
  }
442
482
  },
443
483
  "additionalProperties": false,
444
- "required": ["assertionToTestFor", "rationale"]
484
+ "required": ["direction"]
445
485
  },
446
- "InputTextToolCoreParameters": {
486
+ "ScrollPageToolGptParameters": {
447
487
  "type": "object",
448
488
  "properties": {
449
- "text": {
450
- "description": "The text to input.",
489
+ "rationale": {
490
+ "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
451
491
  "type": "string"
452
492
  },
453
- "finalizeWithSubmit": {
454
- "description": "Attempt to submit the data after inputting the text (i.e. hitting 'Enter' at the end).\nThis can be useful if doing something like using a webpage's search box, etc.",
455
- "type": "boolean"
493
+ "direction": {
494
+ "description": "The direction to scroll - either UP or DOWN",
495
+ "enum": ["DOWN", "UP"],
496
+ "type": "string"
456
497
  }
457
498
  },
458
499
  "additionalProperties": false,
459
- "required": ["finalizeWithSubmit", "text"]
500
+ "required": ["direction", "rationale"]
460
501
  },
461
- "SelectorBasedInputTextToolParameters": {
502
+ "AssertToolCoreParameters": {
462
503
  "type": "object",
463
504
  "properties": {
464
- "selector": {
465
- "description": "A query structure used to resolve specific a HTML element in a webpage.",
466
- "type": "object",
467
- "properties": {
468
- "element": {
469
- "description": "An prioritized list of element selectors to use to attempt to resolve the\ndesired element, going from most specific to least specific. The first\nelement selector that is successfully used, wins, and the rest are ignored.",
470
- "type": "array",
471
- "items": {
472
- "type": "string"
473
- }
474
- },
475
- "frame": {
476
- "description": "A selector for the corresponding frame of the element to select.\nIf null, this means the primary frame of the page is used.",
477
- "type": "string"
478
- }
479
- },
480
- "additionalProperties": false,
481
- "required": ["element", "frame"]
482
- },
483
- "text": {
484
- "description": "The text to input.",
505
+ "assertionToTestFor": {
506
+ "description": "The assertion that will be tested for, using plain English.\n\nExamples:\n- 'Assert that this webpage includes a product summary.'\n- 'Assert there are more than 3 search results.'\n- 'Assert that the webpage title is \"Hello World\".'\n- 'Assert that the theme of the website is in dark mode.'\n\nThe raw assertion text should avoid embedding state about the webpage\nsince the assertion is being evaluated by the tool itself, and the tool\nwill have access to the webpage's content, title, URL, etc.\n\nExamples of bad assertions:\n- 'Assert that the 3 search results is greater than 2.'\n- 'Assert that the first search result (\"banana\") is not \"strawberry\".'\n\nExamples of the bad assertions being rephrased as good assertions:\n- 'Assert that there are more than 2 search results.'\n- 'Assert that the first search result is not \"strawberry\".'",
485
507
  "type": "string"
486
- },
487
- "finalizeWithSubmit": {
488
- "description": "Attempt to submit the data after inputting the text (i.e. hitting 'Enter' at the end).\nThis can be useful if doing something like using a webpage's search box, etc.",
489
- "type": "boolean"
490
508
  }
491
509
  },
492
510
  "additionalProperties": false,
493
- "required": ["finalizeWithSubmit", "selector", "text"]
511
+ "required": ["assertionToTestFor"]
494
512
  },
495
- "AnnotationBasedInputTextToolParameters": {
513
+ "AssertToolGptParameters": {
496
514
  "type": "object",
497
515
  "properties": {
498
- "whyThisAnnotation": {
499
- "description": "The reason why this particular numbered annotation was chosen.",
500
- "type": "string"
501
- },
502
- "annotation": {
503
- "description": "The numbered annotation of the element to click.",
504
- "type": "string"
505
- },
506
516
  "rationale": {
507
517
  "description": "The reason why this particular action is being taken. It MUST relate to the overall objective.",
508
518
  "type": "string"
509
519
  },
510
- "text": {
511
- "description": "The text to input.",
520
+ "assertionToTestFor": {
521
+ "description": "The assertion that will be tested for, using plain English.\n\nExamples:\n- 'Assert that this webpage includes a product summary.'\n- 'Assert there are more than 3 search results.'\n- 'Assert that the webpage title is \"Hello World\".'\n- 'Assert that the theme of the website is in dark mode.'\n\nThe raw assertion text should avoid embedding state about the webpage\nsince the assertion is being evaluated by the tool itself, and the tool\nwill have access to the webpage's content, title, URL, etc.\n\nExamples of bad assertions:\n- 'Assert that the 3 search results is greater than 2.'\n- 'Assert that the first search result (\"banana\") is not \"strawberry\".'\n\nExamples of the bad assertions being rephrased as good assertions:\n- 'Assert that there are more than 2 search results.'\n- 'Assert that the first search result is not \"strawberry\".'",
512
522
  "type": "string"
513
- },
514
- "finalizeWithSubmit": {
515
- "description": "Attempt to submit the data after inputting the text (i.e. hitting 'Enter' at the end).\nThis can be useful if doing something like using a webpage's search box, etc.",
516
- "type": "boolean"
517
523
  }
518
524
  },
519
525
  "additionalProperties": false,
520
- "required": [
521
- "annotation",
522
- "finalizeWithSubmit",
523
- "rationale",
524
- "text",
525
- "whyThisAnnotation"
526
- ]
526
+ "required": ["assertionToTestFor", "rationale"]
527
527
  },
528
528
  "AnalyzePageTextToolCoreParameters": {
529
529
  "type": "object",
@@ -1962,107 +1962,6 @@
1962
1962
  "additionalProperties": false,
1963
1963
  "required": ["rationale", "text"]
1964
1964
  },
1965
- "ToolParameters": {
1966
- "anyOf": [
1967
- {
1968
- "type": "object",
1969
- "properties": {
1970
- "_type": {},
1971
- "_output": {},
1972
- "_input": {},
1973
- "_def": {},
1974
- "description": {
1975
- "type": "string"
1976
- },
1977
- "~standard": {
1978
- "description": "The Standard Schema properties interface.",
1979
- "type": "object",
1980
- "properties": {
1981
- "version": {
1982
- "description": "The version number of the standard.",
1983
- "type": "number",
1984
- "const": 1
1985
- },
1986
- "vendor": {
1987
- "description": "The vendor name of the schema library.",
1988
- "type": "string"
1989
- },
1990
- "validate": {
1991
- "description": "Validates unknown input values.",
1992
- "type": "object",
1993
- "additionalProperties": false
1994
- },
1995
- "types": {
1996
- "description": "Inferred types associated with the schema.",
1997
- "type": "object",
1998
- "properties": {
1999
- "input": {
2000
- "description": "The input type of the schema."
2001
- },
2002
- "output": {
2003
- "description": "The output type of the schema."
2004
- }
2005
- },
2006
- "additionalProperties": false,
2007
- "required": ["input", "output"]
2008
- }
2009
- },
2010
- "additionalProperties": false,
2011
- "required": ["validate", "vendor", "version"]
2012
- },
2013
- "spa": {
2014
- "description": "Alias of safeParseAsync",
2015
- "type": "object",
2016
- "additionalProperties": false
2017
- }
2018
- },
2019
- "additionalProperties": false,
2020
- "required": [
2021
- "_def",
2022
- "_input",
2023
- "_output",
2024
- "_type",
2025
- "description",
2026
- "spa",
2027
- "~standard"
2028
- ]
2029
- },
2030
- {
2031
- "additionalProperties": false,
2032
- "type": "object",
2033
- "properties": {
2034
- "validate": {
2035
- "description": "Optional. Validates that the structure of a value matches this schema,\nand returns a typed version of the value if it does.",
2036
- "type": "object",
2037
- "additionalProperties": false
2038
- },
2039
- "__@validatorSymbol@19388": {
2040
- "description": "Used to mark validator functions so we can support both Zod and custom schemas.",
2041
- "type": "boolean",
2042
- "const": true
2043
- },
2044
- "_type": {
2045
- "description": "Schema type for inference."
2046
- },
2047
- "jsonSchema": {
2048
- "$ref": "#/definitions/JSONSchema7",
2049
- "description": "The JSON Schema for the schema. It is passed to the providers."
2050
- },
2051
- "__@schemaSymbol@19393": {
2052
- "description": "Used to mark schemas so we can support both Zod and custom schemas.",
2053
- "type": "boolean",
2054
- "const": true
2055
- }
2056
- },
2057
- "required": [
2058
- "__@schemaSymbol@19393",
2059
- "__@validatorSymbol@19388",
2060
- "_type",
2061
- "jsonSchema"
2062
- ]
2063
- }
2064
- ]
2065
- },
2066
1965
  "AggregateExtractedStreetviewDataToolCoreParameters": {
2067
1966
  "type": "object",
2068
1967
  "additionalProperties": false,
@@ -1 +1 @@
1
- 1087
1
+ 1105
@@ -1 +1 @@
1
- {"version":3,"file":"DonobuFlow.d.ts","sourceRoot":"","sources":["../../../src/managers/DonobuFlow.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0B,IAAI,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAc,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAqB,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EACL,UAAU,EAEV,uBAAuB,EAGxB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAqBpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAM1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA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AAE,EAC5B,WAAW,EAAE,UAAU,EAAE,EACzB,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,YAAY;IAG3B,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IAyDjC;;;;OAIG;YACW,mBAAmB;IAkBjC;;;OAGG;YACW,sBAAsB;IAepC;;;OAGG;YACW,qBAAqB;IASnC;;OAEG;YACW,UAAU;IAsBxB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,0BAA0B;YA+B3B,QAAQ;YA2OR,uBAAuB;IAerC,OAAO,CAAC,sBAAsB;IAsB9B;;;;OAIG;YACW,eAAe;YAmHf,4BAA4B;IAc1C,OAAO,CAAC,UAAU;YAOJ,2BAA2B;IAgEzC;;;;;;;;;;;;;OAaG;YACW,gBAAgB;IAqC9B;;OAEG;YACW,WAAW;IAIzB;;;OAGG;YACW,cAAc;YA0Bd,eAAe;YAiDf,0BAA0B;YAqB1B,6BAA6B;YAY7B,QAAQ;YAgBR,UAAU;YAIV,QAAQ;YAQR,SAAS;IAQvB,OAAO,CAAC,yCAAyC;YAoFnC,4BAA4B;IAyI1C;;;OAGG;YACW,iBAAiB;IAoC/B,OAAO,CAAC,iBAAiB;IAQzB;;;;;;;OAOG;YACW,yBAAyB;IA+CvC,OAAO,CAAC,MAAM,CAAC,sCAAsC;IA4CrD,OAAO,CAAC,MAAM,CAAC,qBAAqB;IA0BpC,OAAO,CAAC,MAAM,CAAC,gCAAgC;YA2BjC,uBAAuB;CAYtC"}
@@ -11,7 +11,6 @@ const GptPlatformInternalErrorException_1 = require("../exceptions/GptPlatformIn
11
11
  const ToolCallResult_1 = require("../models/ToolCallResult");
12
12
  const HandleBrowserDialogTool_1 = require("../tools/HandleBrowserDialogTool");
13
13
  const MarkObjectiveCompleteTool_1 = require("../tools/MarkObjectiveCompleteTool");
14
- const RunAccessibilityTestTool_1 = require("../tools/RunAccessibilityTestTool");
15
14
  const MiscUtils_1 = require("../utils/MiscUtils");
16
15
  const FocusPage_1 = require("../bindings/FocusPage");
17
16
  const PageInteractionTracker_1 = require("../bindings/PageInteractionTracker");
@@ -167,9 +166,9 @@ class DonobuFlow {
167
166
  this.focusedPage.current = null;
168
167
  // There are no other pages to bring into focus, so we fail the run.
169
168
  this.metadata.state = 'FAILED';
170
- Logger_1.appLogger.error(`Browser closed before flow ended for flow ${this.metadata.id}`);
169
+ Logger_1.appLogger.error('Browser closed before flow ended');
171
170
  this.metadata.result = {
172
- failed: `Stopped flow due to the browser unexpectedly closing!`,
171
+ failed: 'Stopped flow due to the browser unexpectedly closing!',
173
172
  };
174
173
  await this.persistence.saveMetadata(this.metadata);
175
174
  }
@@ -184,7 +183,7 @@ class DonobuFlow {
184
183
  */
185
184
  async onPersistentGptFailure(error) {
186
185
  this.metadata.state = 'FAILED';
187
- Logger_1.appLogger.error(`Stopped flow '${this.metadata.id}' due to the ${this.gptClient?.config.type} GPT platform throwing an internal error!`, error);
186
+ Logger_1.appLogger.error(`Stopped flow due to the ${this.gptClient?.config.type} GPT platform throwing an internal error!`, error);
188
187
  this.metadata.result = {
189
188
  failed: `Stopped flow due to the ${this.gptClient?.config.type} GPT platform throwing an internal error!`,
190
189
  context: error.message,
@@ -197,7 +196,7 @@ class DonobuFlow {
197
196
  */
198
197
  async onUnexpectedException(error) {
199
198
  this.metadata.state = 'FAILED';
200
- Logger_1.appLogger.error(`Stopped flow '${this.metadata.id}' due to exception!`, error);
199
+ Logger_1.appLogger.error('Stopped flow due to exception!', error);
201
200
  this.metadata.result = {
202
201
  failed: 'Internal error 🙈',
203
202
  };
@@ -214,7 +213,7 @@ class DonobuFlow {
214
213
  await this.persistence.setBrowserState(this.metadata.id, browserState);
215
214
  }
216
215
  catch (error) {
217
- Logger_1.appLogger.error(`Failed to persist browser state when completing flow ${this.metadata.id}`, error);
216
+ Logger_1.appLogger.error('Failed to persist browser state when completing flow', error);
218
217
  }
219
218
  }
220
219
  DonobuFlow.invokeFlowFinishedCallback(this.metadata.callbackUrl, this.metadata.id);
@@ -238,11 +237,11 @@ class DonobuFlow {
238
237
  id: flowId,
239
238
  }),
240
239
  }).catch((error) => {
241
- Logger_1.appLogger.error(`Failed to invoke flow completion callback at ${callbackUrl} for flow: ${flowId}`, error);
240
+ Logger_1.appLogger.error(`Failed to invoke flow completion callback at ${callbackUrl}`, error);
242
241
  });
243
242
  }
244
243
  catch (error) {
245
- Logger_1.appLogger.error(`Failed to invoke flow completion callback at ${callbackUrl} for flow: ${flowId}`, error);
244
+ Logger_1.appLogger.error(`Failed to invoke flow completion callback at ${callbackUrl}`, error);
246
245
  }
247
246
  }
248
247
  async onDialog(dialog) {
@@ -565,7 +564,7 @@ Message: ${dialog.message()}`;
565
564
  this.metadata.nextState = null;
566
565
  await this.persistence.saveMetadata(this.metadata);
567
566
  if (lastState !== nextState) {
568
- Logger_1.appLogger.info(`Transitioned state for flow '${this.metadata.id}' from ${lastState} to ${nextState}`);
567
+ Logger_1.appLogger.info(`Transitioned flow state from ${lastState} to ${nextState}`);
569
568
  }
570
569
  await this.maybeForceEnableControlPanel();
571
570
  }
@@ -586,13 +585,10 @@ Message: ${dialog.message()}`;
586
585
  : false;
587
586
  }
588
587
  async setupInitScriptsAndBindings(browserContext) {
588
+ // Do the basic browser setup followed by additional initializations that
589
+ // are specific to this flow.
590
+ await PlaywrightUtils_1.PlaywrightUtils.setupBasicBrowserContext(browserContext);
589
591
  browserContext.on('dialog', this.onDialog.bind(this));
590
- if (this.toolManager.tools.some((tool) => tool instanceof RunAccessibilityTestTool_1.RunAccessibilityTestTool)) {
591
- await browserContext.addInitScript(PlaywrightUtils_1.PlaywrightUtils.accessibilityTestInitScript());
592
- }
593
- await browserContext.addInitScript(PlaywrightUtils_1.PlaywrightUtils.clickableElementsTrackerInitScript());
594
- await browserContext.addInitScript(PlaywrightUtils_1.PlaywrightUtils.dialogPromptTrackerInitScript());
595
- await browserContext.addInitScript(PlaywrightUtils_1.PlaywrightUtils.smartSelectorGeneratorInitScript());
596
592
  browserContext.on('page', async (page) => {
597
593
  // Update the currently focused page if new tabs or pop-ups occur.
598
594
  this.focusedPage.current = page;
@@ -785,13 +781,13 @@ Message: ${dialog.message()}`;
785
781
  this.metadata.completedAt = new Date().getTime();
786
782
  this.metadata.nextState = null;
787
783
  await this.persistence.saveMetadata(this.metadata);
788
- Logger_1.appLogger.error(`Completed flow '${this.metadata.id}' with state: ${this.metadata.state}`);
784
+ Logger_1.appLogger.error(`Completed flow with state: ${this.metadata.state}`);
789
785
  }
790
786
  async onSuccess() {
791
787
  this.metadata.completedAt = new Date().getTime();
792
788
  this.metadata.nextState = null;
793
789
  await this.persistence.saveMetadata(this.metadata);
794
- Logger_1.appLogger.info(`Completed flow '${this.metadata.id}' with state: ${this.metadata.state}`);
790
+ Logger_1.appLogger.info(`Completed flow with state: ${this.metadata.state}`);
795
791
  }
796
792
  updateGptMessagesWithUserProposedToolCall(proposedToolCall) {
797
793
  let hasUpdated = false;