@taodigital/crawler 0.0.0-stage → 1.2.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.
Files changed (494) hide show
  1. package/Dockerfile +82 -0
  2. package/README.md +10 -2
  3. package/dist/accessibility-auditor.d.ts +29 -0
  4. package/dist/accessibility-auditor.js +57 -0
  5. package/dist/accessibility-auditor.js.map +7 -0
  6. package/dist/accessibility-tree-crawler.d.ts +44 -0
  7. package/dist/accessibility-tree-crawler.js +156 -0
  8. package/dist/accessibility-tree-crawler.js.map +7 -0
  9. package/dist/advanced-ui-probes.d.ts +47 -0
  10. package/dist/advanced-ui-probes.js +310 -0
  11. package/dist/advanced-ui-probes.js.map +7 -0
  12. package/dist/ai-login.d.ts +32 -0
  13. package/dist/ai-login.js +250 -0
  14. package/dist/ai-login.js.map +7 -0
  15. package/dist/auth-token-rotator.d.ts +47 -0
  16. package/dist/auth-token-rotator.js +58 -0
  17. package/dist/auth-token-rotator.js.map +7 -0
  18. package/dist/auth.d.ts +20 -0
  19. package/dist/auth.js +348 -0
  20. package/dist/auth.js.map +7 -0
  21. package/dist/browser-extension.d.ts +37 -0
  22. package/dist/browser-extension.js +113 -0
  23. package/dist/browser-extension.js.map +7 -0
  24. package/dist/captcha-solver.d.ts +16 -0
  25. package/dist/captcha-solver.js +105 -0
  26. package/dist/captcha-solver.js.map +7 -0
  27. package/dist/color-contrast.d.ts +30 -0
  28. package/dist/color-contrast.js +78 -0
  29. package/dist/color-contrast.js.map +7 -0
  30. package/dist/content-chunker.d.ts +18 -0
  31. package/dist/content-chunker.js +152 -0
  32. package/dist/content-chunker.js.map +7 -0
  33. package/dist/content-dedup.d.ts +23 -0
  34. package/dist/content-dedup.js +60 -0
  35. package/dist/content-dedup.js.map +7 -0
  36. package/dist/cookie-consent.d.ts +25 -0
  37. package/dist/cookie-consent.js +78 -0
  38. package/dist/cookie-consent.js.map +7 -0
  39. package/dist/cookie-jar.d.ts +20 -0
  40. package/dist/cookie-jar.js +61 -0
  41. package/dist/cookie-jar.js.map +7 -0
  42. package/dist/crawl-session-manager.d.ts +44 -0
  43. package/dist/crawl-session-manager.js +145 -0
  44. package/dist/crawl-session-manager.js.map +7 -0
  45. package/dist/crawler.d.ts +233 -0
  46. package/dist/crawler.js +6239 -0
  47. package/dist/crawler.js.map +7 -0
  48. package/dist/crud-interaction.d.ts +31 -0
  49. package/dist/crud-interaction.js +264 -0
  50. package/dist/crud-interaction.js.map +7 -0
  51. package/dist/custom-js-injector.d.ts +42 -0
  52. package/dist/custom-js-injector.js +50 -0
  53. package/dist/custom-js-injector.js.map +7 -0
  54. package/dist/dark-mode-capture.d.ts +23 -0
  55. package/dist/dark-mode-capture.js +75 -0
  56. package/dist/dark-mode-capture.js.map +7 -0
  57. package/dist/dead-link-detector.d.ts +37 -0
  58. package/dist/dead-link-detector.js +50 -0
  59. package/dist/dead-link-detector.js.map +7 -0
  60. package/dist/dropdown-enumerator.d.ts +20 -0
  61. package/dist/dropdown-enumerator.js +230 -0
  62. package/dist/dropdown-enumerator.js.map +7 -0
  63. package/dist/element-hash.d.ts +9 -0
  64. package/dist/element-hash.js +9 -0
  65. package/dist/element-hash.js.map +7 -0
  66. package/dist/email-otp.d.ts +42 -0
  67. package/dist/email-otp.js +177 -0
  68. package/dist/email-otp.js.map +7 -0
  69. package/dist/engine-router.d.ts +47 -0
  70. package/dist/engine-router.js +94 -0
  71. package/dist/engine-router.js.map +7 -0
  72. package/dist/export/bulk-export.d.ts +26 -0
  73. package/dist/export/bulk-export.js +76 -0
  74. package/dist/export/bulk-export.js.map +7 -0
  75. package/dist/export/vector-export.d.ts +76 -0
  76. package/dist/export/vector-export.js +85 -0
  77. package/dist/export/vector-export.js.map +7 -0
  78. package/dist/extractors/advanced.d.ts +64 -0
  79. package/dist/extractors/advanced.js +265 -0
  80. package/dist/extractors/advanced.js.map +7 -0
  81. package/dist/extractors/artifact-envelope.d.ts +63 -0
  82. package/dist/extractors/artifact-envelope.js +63 -0
  83. package/dist/extractors/artifact-envelope.js.map +7 -0
  84. package/dist/extractors/branding-extractor.d.ts +46 -0
  85. package/dist/extractors/branding-extractor.js +104 -0
  86. package/dist/extractors/branding-extractor.js.map +7 -0
  87. package/dist/extractors/summary-extractor.d.ts +10 -0
  88. package/dist/extractors/summary-extractor.js +36 -0
  89. package/dist/extractors/summary-extractor.js.map +7 -0
  90. package/dist/failure-analysis-agent.d.ts +16 -0
  91. package/dist/failure-analysis-agent.js +42 -0
  92. package/dist/failure-analysis-agent.js.map +7 -0
  93. package/dist/feature-flag-detector.d.ts +30 -0
  94. package/dist/feature-flag-detector.js +55 -0
  95. package/dist/feature-flag-detector.js.map +7 -0
  96. package/dist/filter-pagination-crawler.d.ts +52 -0
  97. package/dist/filter-pagination-crawler.js +299 -0
  98. package/dist/filter-pagination-crawler.js.map +7 -0
  99. package/dist/form-detector.d.ts +34 -0
  100. package/dist/form-detector.js +58 -0
  101. package/dist/form-detector.js.map +7 -0
  102. package/dist/frontier.d.ts +40 -0
  103. package/dist/frontier.js +103 -0
  104. package/dist/frontier.js.map +7 -0
  105. package/dist/gap-pass.d.ts +36 -0
  106. package/dist/gap-pass.js +115 -0
  107. package/dist/gap-pass.js.map +7 -0
  108. package/dist/graphql-detector.d.ts +39 -0
  109. package/dist/graphql-detector.js +86 -0
  110. package/dist/graphql-detector.js.map +7 -0
  111. package/dist/http-engine.d.ts +80 -0
  112. package/dist/http-engine.js +318 -0
  113. package/dist/http-engine.js.map +7 -0
  114. package/dist/incremental-diff.d.ts +116 -0
  115. package/dist/incremental-diff.js +137 -0
  116. package/dist/incremental-diff.js.map +7 -0
  117. package/dist/index.d.ts +52 -0
  118. package/dist/index.js +83 -0
  119. package/dist/index.js.map +7 -0
  120. package/dist/input-fuzzer.d.ts +30 -0
  121. package/dist/input-fuzzer.js +105 -0
  122. package/dist/input-fuzzer.js.map +7 -0
  123. package/dist/interactive-probe.d.ts +144 -0
  124. package/dist/interactive-probe.js +865 -0
  125. package/dist/interactive-probe.js.map +7 -0
  126. package/dist/job-queue.d.ts +297 -0
  127. package/dist/job-queue.js +3812 -0
  128. package/dist/job-queue.js.map +7 -0
  129. package/dist/js-coverage.d.ts +29 -0
  130. package/dist/js-coverage.js +56 -0
  131. package/dist/js-coverage.js.map +7 -0
  132. package/dist/js-router-detector.d.ts +17 -0
  133. package/dist/js-router-detector.js +90 -0
  134. package/dist/js-router-detector.js.map +7 -0
  135. package/dist/language-detector.d.ts +22 -0
  136. package/dist/language-detector.js +57 -0
  137. package/dist/language-detector.js.map +7 -0
  138. package/dist/link-classifier.d.ts +23 -0
  139. package/dist/link-classifier.js +40 -0
  140. package/dist/link-classifier.js.map +7 -0
  141. package/dist/live-view.d.ts +36 -0
  142. package/dist/live-view.js +105 -0
  143. package/dist/live-view.js.map +7 -0
  144. package/dist/locator-extractor.d.ts +46 -0
  145. package/dist/locator-extractor.js +220 -0
  146. package/dist/locator-extractor.js.map +7 -0
  147. package/dist/logger.d.ts +2 -0
  148. package/dist/logger.js +10 -0
  149. package/dist/logger.js.map +7 -0
  150. package/dist/markdown-extract.d.ts +8 -0
  151. package/dist/markdown-extract.js +54 -0
  152. package/dist/markdown-extract.js.map +7 -0
  153. package/dist/multi-context-handler.d.ts +55 -0
  154. package/dist/multi-context-handler.js +182 -0
  155. package/dist/multi-context-handler.js.map +7 -0
  156. package/dist/native-crawler.d.ts +69 -0
  157. package/dist/native-crawler.js +839 -0
  158. package/dist/native-crawler.js.map +7 -0
  159. package/dist/nested-window-crawler.d.ts +41 -0
  160. package/dist/nested-window-crawler.js +172 -0
  161. package/dist/nested-window-crawler.js.map +7 -0
  162. package/dist/network-action-correlator.d.ts +47 -0
  163. package/dist/network-action-correlator.js +209 -0
  164. package/dist/network-action-correlator.js.map +7 -0
  165. package/dist/network-observer.d.ts +49 -0
  166. package/dist/network-observer.js +149 -0
  167. package/dist/network-observer.js.map +7 -0
  168. package/dist/network-throttle.d.ts +25 -0
  169. package/dist/network-throttle.js +34 -0
  170. package/dist/network-throttle.js.map +7 -0
  171. package/dist/openapi-generator.d.ts +49 -0
  172. package/dist/openapi-generator.js +89 -0
  173. package/dist/openapi-generator.js.map +7 -0
  174. package/dist/pdf-extractor.d.ts +28 -0
  175. package/dist/pdf-extractor.js +81 -0
  176. package/dist/pdf-extractor.js.map +7 -0
  177. package/dist/performance-metrics-collector.d.ts +50 -0
  178. package/dist/performance-metrics-collector.js +155 -0
  179. package/dist/performance-metrics-collector.js.map +7 -0
  180. package/dist/performance-metrics.d.ts +52 -0
  181. package/dist/performance-metrics.js +83 -0
  182. package/dist/performance-metrics.js.map +7 -0
  183. package/dist/phash.d.ts +50 -0
  184. package/dist/phash.js +136 -0
  185. package/dist/phash.js.map +7 -0
  186. package/dist/pii-scrubber.d.ts +21 -0
  187. package/dist/pii-scrubber.js +75 -0
  188. package/dist/pii-scrubber.js.map +7 -0
  189. package/dist/playwright-recorder.d.ts +39 -0
  190. package/dist/playwright-recorder.js +123 -0
  191. package/dist/playwright-recorder.js.map +7 -0
  192. package/dist/policies/crawl-safety.d.ts +9 -0
  193. package/dist/policies/crawl-safety.js +41 -0
  194. package/dist/policies/crawl-safety.js.map +7 -0
  195. package/dist/profiles/domain-profile.d.ts +19 -0
  196. package/dist/profiles/domain-profile.js +160 -0
  197. package/dist/profiles/domain-profile.js.map +7 -0
  198. package/dist/proxy.d.ts +50 -0
  199. package/dist/proxy.js +165 -0
  200. package/dist/proxy.js.map +7 -0
  201. package/dist/rate-limiter.d.ts +31 -0
  202. package/dist/rate-limiter.js +64 -0
  203. package/dist/rate-limiter.js.map +7 -0
  204. package/dist/redirect-tracker.d.ts +37 -0
  205. package/dist/redirect-tracker.js +65 -0
  206. package/dist/redirect-tracker.js.map +7 -0
  207. package/dist/redis-frontier.d.ts +48 -0
  208. package/dist/redis-frontier.js +126 -0
  209. package/dist/redis-frontier.js.map +7 -0
  210. package/dist/redis-queue.d.ts +48 -0
  211. package/dist/redis-queue.js +165 -0
  212. package/dist/redis-queue.js.map +7 -0
  213. package/dist/response-cache.d.ts +38 -0
  214. package/dist/response-cache.js +140 -0
  215. package/dist/response-cache.js.map +7 -0
  216. package/dist/responsive-detector.d.ts +29 -0
  217. package/dist/responsive-detector.js +46 -0
  218. package/dist/responsive-detector.js.map +7 -0
  219. package/dist/retry-policy.d.ts +20 -0
  220. package/dist/retry-policy.js +54 -0
  221. package/dist/retry-policy.js.map +7 -0
  222. package/dist/robots-txt.d.ts +9 -0
  223. package/dist/robots-txt.js +77 -0
  224. package/dist/robots-txt.js.map +7 -0
  225. package/dist/screen-reader.d.ts +15 -0
  226. package/dist/screen-reader.js +48 -0
  227. package/dist/screen-reader.js.map +7 -0
  228. package/dist/screenshot-masker.d.ts +28 -0
  229. package/dist/screenshot-masker.js +62 -0
  230. package/dist/screenshot-masker.js.map +7 -0
  231. package/dist/seo-checker.d.ts +33 -0
  232. package/dist/seo-checker.js +91 -0
  233. package/dist/seo-checker.js.map +7 -0
  234. package/dist/service-worker-interceptor.d.ts +36 -0
  235. package/dist/service-worker-interceptor.js +136 -0
  236. package/dist/service-worker-interceptor.js.map +7 -0
  237. package/dist/session-capture.d.ts +39 -0
  238. package/dist/session-capture.js +274 -0
  239. package/dist/session-capture.js.map +7 -0
  240. package/dist/session-export.d.ts +49 -0
  241. package/dist/session-export.js +117 -0
  242. package/dist/session-export.js.map +7 -0
  243. package/dist/shadow-dom-crawler.d.ts +35 -0
  244. package/dist/shadow-dom-crawler.js +132 -0
  245. package/dist/shadow-dom-crawler.js.map +7 -0
  246. package/dist/sitemap-writer.d.ts +21 -0
  247. package/dist/sitemap-writer.js +47 -0
  248. package/dist/sitemap-writer.js.map +7 -0
  249. package/dist/sitemap.d.ts +51 -0
  250. package/dist/sitemap.js +160 -0
  251. package/dist/sitemap.js.map +7 -0
  252. package/dist/skyvern.d.ts +56 -0
  253. package/dist/skyvern.js +129 -0
  254. package/dist/skyvern.js.map +7 -0
  255. package/dist/sqs-queue.d.ts +13 -0
  256. package/dist/sqs-queue.js +115 -0
  257. package/dist/sqs-queue.js.map +7 -0
  258. package/dist/sso-token.d.ts +29 -0
  259. package/dist/sso-token.js +76 -0
  260. package/dist/sso-token.js.map +7 -0
  261. package/dist/state-graph.d.ts +59 -0
  262. package/dist/state-graph.js +193 -0
  263. package/dist/state-graph.js.map +7 -0
  264. package/dist/stealth/human-behavior.d.ts +20 -0
  265. package/dist/stealth/human-behavior.js +202 -0
  266. package/dist/stealth/human-behavior.js.map +7 -0
  267. package/dist/telemetry.d.ts +34 -0
  268. package/dist/telemetry.js +77 -0
  269. package/dist/telemetry.js.map +7 -0
  270. package/dist/test-executor.d.ts +81 -0
  271. package/dist/test-executor.js +443 -0
  272. package/dist/test-executor.js.map +7 -0
  273. package/dist/tls-fingerprint.d.ts +50 -0
  274. package/dist/tls-fingerprint.js +81 -0
  275. package/dist/tls-fingerprint.js.map +7 -0
  276. package/dist/url-pattern-completer.d.ts +28 -0
  277. package/dist/url-pattern-completer.js +122 -0
  278. package/dist/url-pattern-completer.js.map +7 -0
  279. package/dist/visual-diff-verdict.d.ts +40 -0
  280. package/dist/visual-diff-verdict.js +27 -0
  281. package/dist/visual-diff-verdict.js.map +7 -0
  282. package/dist/webhook-notifier.d.ts +30 -0
  283. package/dist/webhook-notifier.js +76 -0
  284. package/dist/webhook-notifier.js.map +7 -0
  285. package/dist/websocket-detector.d.ts +24 -0
  286. package/dist/websocket-detector.js +60 -0
  287. package/dist/websocket-detector.js.map +7 -0
  288. package/dist/worker.d.ts +1 -0
  289. package/dist/worker.js +33 -0
  290. package/dist/worker.js.map +7 -0
  291. package/package.json +49 -4
  292. package/src/accessibility-auditor.ts +102 -0
  293. package/src/accessibility-tree-crawler.ts +246 -0
  294. package/src/advanced-ui-probes.ts +470 -0
  295. package/src/ai-login.ts +298 -0
  296. package/src/auth-token-rotator.ts +89 -0
  297. package/src/auth.ts +418 -0
  298. package/src/browser-extension.ts +186 -0
  299. package/src/captcha-solver.ts +143 -0
  300. package/src/color-contrast.ts +116 -0
  301. package/src/content-chunker.ts +170 -0
  302. package/src/content-dedup.ts +99 -0
  303. package/src/cookie-consent.ts +106 -0
  304. package/src/cookie-jar.ts +91 -0
  305. package/src/crawl-session-manager.ts +231 -0
  306. package/src/crawler.ts +7123 -0
  307. package/src/crawler.ts.rej +12 -0
  308. package/src/crud-interaction.ts +386 -0
  309. package/src/custom-js-injector.ts +93 -0
  310. package/src/dark-mode-capture.ts +110 -0
  311. package/src/dead-link-detector.ts +76 -0
  312. package/src/dropdown-enumerator.ts +312 -0
  313. package/src/element-hash.ts +16 -0
  314. package/src/email-otp.ts +252 -0
  315. package/src/engine-router.ts +141 -0
  316. package/src/export/bulk-export.ts +85 -0
  317. package/src/export/vector-export.ts +160 -0
  318. package/src/extractors/advanced.ts +309 -0
  319. package/src/extractors/artifact-envelope.ts +111 -0
  320. package/src/extractors/branding-extractor.ts +159 -0
  321. package/src/extractors/summary-extractor.ts +49 -0
  322. package/src/failure-analysis-agent.ts +51 -0
  323. package/src/feature-flag-detector.ts +97 -0
  324. package/src/filter-pagination-crawler.ts +500 -0
  325. package/src/form-detector.ts +103 -0
  326. package/src/frontier.test.ts +64 -0
  327. package/src/frontier.ts +144 -0
  328. package/src/gap-pass.ts +165 -0
  329. package/src/graphql-detector.ts +129 -0
  330. package/src/http-engine.ts +453 -0
  331. package/src/incremental-diff.ts +259 -0
  332. package/src/index.ts +52 -0
  333. package/src/input-fuzzer.ts +129 -0
  334. package/src/interactive-probe.ts +1136 -0
  335. package/src/job-queue.test.ts +187 -0
  336. package/src/job-queue.ts +4504 -0
  337. package/src/js-coverage.ts +87 -0
  338. package/src/js-router-detector.ts +112 -0
  339. package/src/language-detector.ts +82 -0
  340. package/src/link-classifier.ts +65 -0
  341. package/src/live-view.ts +146 -0
  342. package/src/locator-extractor.ts +309 -0
  343. package/src/logger.ts +9 -0
  344. package/src/markdown-extract.test.ts +73 -0
  345. package/src/markdown-extract.ts +76 -0
  346. package/src/multi-context-handler.ts +296 -0
  347. package/src/native-crawler.ts +1108 -0
  348. package/src/nested-window-crawler.ts +310 -0
  349. package/src/network-action-correlator.ts +320 -0
  350. package/src/network-observer.ts +204 -0
  351. package/src/network-throttle.ts +69 -0
  352. package/src/openapi-generator.ts +135 -0
  353. package/src/pdf-extractor.ts +123 -0
  354. package/src/performance-metrics-collector.ts +243 -0
  355. package/src/performance-metrics.ts +134 -0
  356. package/src/phash.ts +184 -0
  357. package/src/pii-scrubber.ts +99 -0
  358. package/src/playwright-recorder.ts +170 -0
  359. package/src/policies/crawl-safety.ts +52 -0
  360. package/src/profiles/domain-profile.ts +190 -0
  361. package/src/proxy.ts +238 -0
  362. package/src/rate-limiter.ts +87 -0
  363. package/src/redirect-tracker.ts +97 -0
  364. package/src/redis-frontier.ts +143 -0
  365. package/src/redis-queue.ts +208 -0
  366. package/src/response-cache.ts +150 -0
  367. package/src/responsive-detector.ts +92 -0
  368. package/src/retry-policy.ts +87 -0
  369. package/src/robots-txt.ts +96 -0
  370. package/src/screen-reader.ts +98 -0
  371. package/src/screenshot-masker.ts +98 -0
  372. package/src/seo-checker.ts +134 -0
  373. package/src/service-worker-interceptor.ts +185 -0
  374. package/src/session-capture.ts +335 -0
  375. package/src/session-export.test.ts +75 -0
  376. package/src/session-export.ts +172 -0
  377. package/src/shadow-dom-crawler.ts +198 -0
  378. package/src/sitemap-writer.ts +65 -0
  379. package/src/sitemap.test.ts +127 -0
  380. package/src/sitemap.ts +233 -0
  381. package/src/skyvern.ts +199 -0
  382. package/src/sqs-queue.ts +129 -0
  383. package/src/sso-token.ts +120 -0
  384. package/src/state-graph.ts +280 -0
  385. package/src/stealth/human-behavior.ts +227 -0
  386. package/src/telemetry.ts +122 -0
  387. package/src/test-executor.test.ts +72 -0
  388. package/src/test-executor.ts +578 -0
  389. package/src/tls-fingerprint.ts +111 -0
  390. package/src/url-pattern-completer.ts +161 -0
  391. package/src/vendor.d.ts +20 -0
  392. package/src/visual-diff-verdict.test.ts +80 -0
  393. package/src/visual-diff-verdict.ts +59 -0
  394. package/src/webhook-notifier.ts +109 -0
  395. package/src/websocket-detector.ts +83 -0
  396. package/src/worker.ts +50 -0
  397. package/tsconfig.json +13 -0
  398. package/types/accessibility-auditor.d.ts +29 -0
  399. package/types/accessibility-tree-crawler.d.ts +44 -0
  400. package/types/advanced-ui-probes.d.ts +47 -0
  401. package/types/ai-login.d.ts +32 -0
  402. package/types/auth-token-rotator.d.ts +47 -0
  403. package/types/auth.d.ts +20 -0
  404. package/types/browser-extension.d.ts +37 -0
  405. package/types/bull-worker.d.ts +6 -0
  406. package/types/captcha-solver.d.ts +16 -0
  407. package/types/color-contrast.d.ts +30 -0
  408. package/types/content-chunker.d.ts +18 -0
  409. package/types/content-dedup.d.ts +23 -0
  410. package/types/cookie-consent.d.ts +25 -0
  411. package/types/cookie-jar.d.ts +20 -0
  412. package/types/crawl-session-manager.d.ts +44 -0
  413. package/types/crawler.d.ts +233 -0
  414. package/types/crud-interaction.d.ts +31 -0
  415. package/types/custom-js-injector.d.ts +42 -0
  416. package/types/dark-mode-capture.d.ts +23 -0
  417. package/types/dead-link-detector.d.ts +37 -0
  418. package/types/dropdown-enumerator.d.ts +20 -0
  419. package/types/element-hash.d.ts +9 -0
  420. package/types/email-otp.d.ts +42 -0
  421. package/types/engine-router.d.ts +47 -0
  422. package/types/export/bulk-export.d.ts +26 -0
  423. package/types/export/vector-export.d.ts +76 -0
  424. package/types/extractors/advanced.d.ts +64 -0
  425. package/types/extractors/artifact-envelope.d.ts +63 -0
  426. package/types/extractors/branding-extractor.d.ts +46 -0
  427. package/types/extractors/summary-extractor.d.ts +10 -0
  428. package/types/failure-analysis-agent.d.ts +16 -0
  429. package/types/feature-flag-detector.d.ts +30 -0
  430. package/types/filter-pagination-crawler.d.ts +52 -0
  431. package/types/form-detector.d.ts +34 -0
  432. package/types/frontier.d.ts +40 -0
  433. package/types/gap-pass.d.ts +36 -0
  434. package/types/graphql-detector.d.ts +39 -0
  435. package/types/http-engine.d.ts +80 -0
  436. package/types/incremental-diff.d.ts +116 -0
  437. package/types/index.d.ts +52 -0
  438. package/types/input-fuzzer.d.ts +30 -0
  439. package/types/interactive-probe.d.ts +144 -0
  440. package/types/job-queue.d.ts +308 -0
  441. package/types/js-coverage.d.ts +29 -0
  442. package/types/js-router-detector.d.ts +17 -0
  443. package/types/language-detector.d.ts +22 -0
  444. package/types/link-classifier.d.ts +23 -0
  445. package/types/live-view.d.ts +36 -0
  446. package/types/locator-extractor.d.ts +46 -0
  447. package/types/logger.d.ts +2 -0
  448. package/types/markdown-extract.d.ts +8 -0
  449. package/types/multi-context-handler.d.ts +55 -0
  450. package/types/native-crawler.d.ts +69 -0
  451. package/types/nested-window-crawler.d.ts +41 -0
  452. package/types/network-action-correlator.d.ts +47 -0
  453. package/types/network-observer.d.ts +49 -0
  454. package/types/network-throttle.d.ts +25 -0
  455. package/types/openapi-generator.d.ts +49 -0
  456. package/types/pdf-extractor.d.ts +28 -0
  457. package/types/performance-metrics-collector.d.ts +50 -0
  458. package/types/performance-metrics.d.ts +52 -0
  459. package/types/phash.d.ts +50 -0
  460. package/types/pii-scrubber.d.ts +21 -0
  461. package/types/playwright-recorder.d.ts +39 -0
  462. package/types/policies/crawl-safety.d.ts +9 -0
  463. package/types/profiles/domain-profile.d.ts +19 -0
  464. package/types/proxy.d.ts +50 -0
  465. package/types/rate-limiter.d.ts +31 -0
  466. package/types/redirect-tracker.d.ts +37 -0
  467. package/types/redis-frontier.d.ts +48 -0
  468. package/types/redis-queue.d.ts +48 -0
  469. package/types/response-cache.d.ts +38 -0
  470. package/types/responsive-detector.d.ts +29 -0
  471. package/types/retry-policy.d.ts +20 -0
  472. package/types/robots-txt.d.ts +9 -0
  473. package/types/screen-reader.d.ts +15 -0
  474. package/types/screenshot-masker.d.ts +28 -0
  475. package/types/seo-checker.d.ts +33 -0
  476. package/types/service-worker-interceptor.d.ts +36 -0
  477. package/types/session-capture.d.ts +39 -0
  478. package/types/session-export.d.ts +49 -0
  479. package/types/shadow-dom-crawler.d.ts +35 -0
  480. package/types/sitemap-writer.d.ts +21 -0
  481. package/types/sitemap.d.ts +51 -0
  482. package/types/skyvern.d.ts +56 -0
  483. package/types/sqs-queue.d.ts +13 -0
  484. package/types/sso-token.d.ts +29 -0
  485. package/types/state-graph.d.ts +59 -0
  486. package/types/stealth/human-behavior.d.ts +20 -0
  487. package/types/telemetry.d.ts +34 -0
  488. package/types/test-executor.d.ts +84 -0
  489. package/types/tls-fingerprint.d.ts +50 -0
  490. package/types/url-pattern-completer.d.ts +28 -0
  491. package/types/visual-diff-verdict.d.ts +40 -0
  492. package/types/webhook-notifier.d.ts +30 -0
  493. package/types/websocket-detector.d.ts +24 -0
  494. package/types/worker.d.ts +1 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Advanced UI probes — detect and exercise drag-drop, date pickers, sliders,
3
+ * and typeahead/autocomplete widgets on a crawled page.
4
+ *
5
+ * Results feed ZeTa's test generator so it can emit interaction-level test
6
+ * cases for these widget families instead of falling back to generic clicks.
7
+ *
8
+ * Each probe is independently try/caught so a broken widget does not abort
9
+ * the others. All browser-side code runs inside page.evaluate / page.$$eval
10
+ * to avoid serialisation issues with DOM handles.
11
+ */
12
+ import type { Page } from 'playwright';
13
+ export interface DragDropCapture {
14
+ library: 'html5' | 'dnd-kit' | 'react-beautiful-dnd' | 'sortablejs' | 'pointer-event' | 'none';
15
+ draggableCount: number;
16
+ dropZoneCount: number;
17
+ testAttempted: boolean;
18
+ testCompleted: boolean;
19
+ }
20
+ export interface DatePickerCapture {
21
+ fieldLabel: string;
22
+ pickerType: 'calendar-popup' | 'native-date' | 'native-datetime' | 'none';
23
+ minDate?: string;
24
+ maxDate?: string;
25
+ disabledDatesFound: boolean;
26
+ sampleSelectedValue?: string;
27
+ }
28
+ export interface SliderCapture {
29
+ label: string;
30
+ min: number;
31
+ max: number;
32
+ step: number;
33
+ currentValue: number;
34
+ }
35
+ export interface TypeaheadCapture {
36
+ label: string;
37
+ minCharsToTrigger: number;
38
+ sampleSuggestions: string[];
39
+ noResultsText: string | null;
40
+ }
41
+ export interface AdvancedProbeResult {
42
+ dragDrop: DragDropCapture;
43
+ datePickers: DatePickerCapture[];
44
+ sliders: SliderCapture[];
45
+ typeaheads: TypeaheadCapture[];
46
+ }
47
+ export declare function probeAdvancedUI(page: Page): Promise<AdvancedProbeResult>;
@@ -0,0 +1,32 @@
1
+ import type { Stagehand } from '@browserbasehq/stagehand';
2
+ import type { Credentials } from './auth.js';
3
+ /**
4
+ * Recorded login step from the Chrome extension's step recorder.
5
+ * {username} and {password} in `value` are substituted at replay time.
6
+ */
7
+ export interface LoginStep {
8
+ action: 'fill' | 'click' | 'wait';
9
+ selector: string;
10
+ value?: string;
11
+ ms?: number;
12
+ }
13
+ /**
14
+ * AI-guided login using Stagehand act/extract.
15
+ *
16
+ * @param loginInstructions - Optional natural language description of the login flow.
17
+ * When provided, an initial stagehand.act() is called with these instructions to
18
+ * navigate the UI (e.g. "click Sign In in the nav, fill email, click Continue").
19
+ * The standard 3-step credential fill follows immediately after.
20
+ * @param opts - Optional tenant/project/job IDs for writing AUTH_STEP CrawlEvidence.
21
+ */
22
+ export declare function loginWithStagehand(stagehand: Stagehand, creds: Credentials, startUrl: string, captchaOpts?: {
23
+ apiKey?: string;
24
+ provider?: '2captcha' | 'capsolver';
25
+ }, emailOtpOpts?: {
26
+ apiKey?: string;
27
+ inboxId?: string;
28
+ }, loginInstructions?: string, opts?: {
29
+ tenantId?: string;
30
+ projectId?: string;
31
+ jobId?: string;
32
+ }): Promise<boolean>;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Auth token rotator — manage a pool of authenticated sessions for multi-account crawls.
3
+ *
4
+ * Use case: crawl the same app as admin+user+guest in one crawl job to discover
5
+ * role-specific screens that only appear when authenticated with different privileges.
6
+ * Each session is a Playwright storageState JSON string.
7
+ *
8
+ * Sessions are checked out (locked) before use and returned after the page is done.
9
+ * Round-robin assignment with stale-session eviction after maxAgeMs.
10
+ */
11
+ export interface SessionEntry {
12
+ id: string;
13
+ role: string;
14
+ storageState: string;
15
+ createdAt: number;
16
+ checkedOutAt: number | null;
17
+ requestCount: number;
18
+ }
19
+ export interface SessionPoolOpts {
20
+ sessions: Array<{
21
+ role: string;
22
+ storageState: string;
23
+ }>;
24
+ maxAgeMs?: number;
25
+ maxRequestsPerSession?: number;
26
+ }
27
+ export declare class AuthTokenRotator {
28
+ private pool;
29
+ private readonly maxAgeMs;
30
+ private readonly maxRequests;
31
+ constructor(opts: SessionPoolOpts);
32
+ /** Get the next available session. Returns null if all are checked out. */
33
+ checkout(): SessionEntry | null;
34
+ /** Return a session to the pool after use. */
35
+ checkin(sessionId: string, updatedStorageState?: string): void;
36
+ /** Get all available sessions (for parallel crawl setup). */
37
+ getAll(): ReadonlyArray<SessionEntry>;
38
+ /** Stats for monitoring. */
39
+ stats(): {
40
+ total: number;
41
+ available: number;
42
+ checkedOut: number;
43
+ stale: number;
44
+ };
45
+ /** Add a new session to the pool at runtime. */
46
+ addSession(role: string, storageState: string): string;
47
+ }
@@ -0,0 +1,20 @@
1
+ import type { Page } from 'playwright';
2
+ export interface Credentials {
3
+ username: string;
4
+ password: string;
5
+ oneTimeCode?: string;
6
+ getOneTimeCode?: () => Promise<string>;
7
+ }
8
+ /**
9
+ * Recorded login step captured by the Chrome extension.
10
+ * {username} and {password} in `value` are substituted at replay time.
11
+ */
12
+ export interface LoginStep {
13
+ action: 'fill' | 'click' | 'wait';
14
+ selector: string;
15
+ value?: string;
16
+ ms?: number;
17
+ }
18
+ export declare function login(page: Page, appUrl: string, creds: Credentials & {
19
+ loginRecipe?: LoginStep[];
20
+ }): Promise<boolean>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Browser extension injection support.
3
+ *
4
+ * Chrome extensions require a persistent profile directory — incompatible
5
+ * with headless Docker by default. This module handles:
6
+ * 1. Persistent profile directory per extension set
7
+ * 2. Extension download from .crx URL or load from local path
8
+ * 3. Launch args for Playwright / Stagehand
9
+ *
10
+ * Usage:
11
+ * const profile = await prepareExtensionProfile(['/path/to/ext.crx']);
12
+ * // pass profile.userDataDir and profile.args to browser launch
13
+ */
14
+ export interface ExtensionSource {
15
+ /** Local .crx file path or https:// URL to download from */
16
+ source: string;
17
+ /** Friendly name for logging */
18
+ name?: string;
19
+ }
20
+ export interface ExtensionProfile {
21
+ /** Chrome user-data-dir containing Preferences + extension unpacked dirs */
22
+ userDataDir: string;
23
+ /** Args to append to chromium launch — includes --load-extension and --disable-extensions-except */
24
+ args: string[];
25
+ /** Cleanup the profile directory when done */
26
+ cleanup: () => Promise<void>;
27
+ }
28
+ /**
29
+ * Prepare a Chrome user-data-dir with the given extensions loaded.
30
+ * Returns profile info + cleanup function.
31
+ */
32
+ export declare function prepareExtensionProfile(extensions: ExtensionSource[]): Promise<ExtensionProfile>;
33
+ /**
34
+ * Ad-blocker extension profile using the uBlock Origin CRX.
35
+ * Reduces noise from ad networks during crawls.
36
+ */
37
+ export declare function adBlockerProfile(): Promise<ExtensionProfile>;
@@ -0,0 +1,6 @@
1
+ import { Worker } from 'bullmq';
2
+ export declare function startBullWorker(redisUrl?: string): Worker<{
3
+ jobId: string;
4
+ tenantId: string;
5
+ config: any;
6
+ }, any, string>;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * CAPTCHA auto-solving via 2captcha or CapSolver APIs.
3
+ * Supports reCAPTCHA v2, hCaptcha, and Cloudflare Turnstile.
4
+ */
5
+ export type CaptchaSolverProvider = '2captcha' | 'capsolver';
6
+ interface SolveResult {
7
+ token: string;
8
+ provider: CaptchaSolverProvider;
9
+ }
10
+ /**
11
+ * Detect CAPTCHA type and sitekey on the page, then solve it.
12
+ * Returns null if no CAPTCHA found or solver not configured.
13
+ * Throws on solve failure.
14
+ */
15
+ export declare function solveCaptcha(page: any, pageUrl: string, apiKey: string, provider?: CaptchaSolverProvider): Promise<SolveResult | null>;
16
+ export {};
@@ -0,0 +1,30 @@
1
+ /**
2
+ * WCAG color contrast checker.
3
+ *
4
+ * Evaluates text contrast ratios against backgrounds for all visible text elements.
5
+ * Reports elements that fail WCAG 2.1 AA (4.5:1 for normal text, 3:1 for large text)
6
+ * or AAA (7:1 for normal, 4.5:1 for large text) requirements.
7
+ *
8
+ * Uses computedStyle to get actual rendered colors — accounts for CSS variables
9
+ * and inheritance.
10
+ */
11
+ import type { Page } from 'playwright';
12
+ export interface ContrastViolation {
13
+ selector: string;
14
+ text: string;
15
+ foreground: string;
16
+ background: string;
17
+ ratio: number;
18
+ required: number;
19
+ level: 'AA' | 'AAA';
20
+ isLargeText: boolean;
21
+ severity: 'fail' | 'warn';
22
+ }
23
+ export interface ContrastAuditResult {
24
+ url: string;
25
+ violations: ContrastViolation[];
26
+ passCount: number;
27
+ score: number;
28
+ auditedAt: string;
29
+ }
30
+ export declare function auditColorContrast(page: Page, url: string): Promise<ContrastAuditResult>;
@@ -0,0 +1,18 @@
1
+ export type ChunkingStrategy = 'fixed' | 'overlap' | 'sentence' | 'paragraph' | 'markdown-heading' | 'semantic' | 'recursive';
2
+ export interface ChunkOpts {
3
+ strategy: ChunkingStrategy;
4
+ chunkSize?: number;
5
+ overlap?: number;
6
+ separators?: string[];
7
+ }
8
+ export interface Chunk {
9
+ index: number;
10
+ text: string;
11
+ tokenEstimate: number;
12
+ startChar: number;
13
+ endChar: number;
14
+ heading?: string;
15
+ }
16
+ export declare function estimateTokens(text: string): number;
17
+ export declare function chunkContent(text: string, opts: ChunkOpts): Chunk[];
18
+ export declare function mergeSmallChunks(chunks: Chunk[], minTokens: number): Chunk[];
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Content deduplication — detect near-duplicate pages during crawl.
3
+ *
4
+ * Uses MinHash-inspired approach: instead of full MinHash (needs many hash functions),
5
+ * we use 8 structural fingerprints extracted from the markdown to detect pages that
6
+ * share the same layout/template even if the data differs.
7
+ *
8
+ * Typical duplicates: /products?page=1 vs /products?page=2 (same template, different data).
9
+ * These waste crawl budget and generate redundant test cases.
10
+ */
11
+ export interface DedupResult {
12
+ isDuplicate: boolean;
13
+ similarUrl?: string;
14
+ similarityScore: number;
15
+ }
16
+ export declare class ContentDeduplicator {
17
+ private seen;
18
+ private readonly threshold;
19
+ constructor(threshold?: number);
20
+ check(url: string, markdown: string): DedupResult;
21
+ size(): number;
22
+ reset(): void;
23
+ }
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Cookie consent auto-acceptor.
3
+ *
4
+ * Detects and clicks "Accept" on common cookie consent banners before the
5
+ * crawler proceeds. Without this, many EU sites show a consent wall that
6
+ * blocks content or shows a different layout, making crawl results unreliable.
7
+ *
8
+ * Supports: Cookiebot, OneTrust, TrustArc, Usercentrics, GDPR Cookie Compliance,
9
+ * generic "Accept All" / "Accept Cookies" buttons.
10
+ *
11
+ * Strategy: try known selectors first, then fall back to text-based button search.
12
+ * Non-blocking — if no banner is found or click fails, crawl proceeds normally.
13
+ */
14
+ import type { Page } from 'playwright';
15
+ export interface ConsentResult {
16
+ found: boolean;
17
+ clicked: boolean;
18
+ method?: string;
19
+ error?: string;
20
+ }
21
+ export declare function acceptCookieConsent(page: Page, opts?: {
22
+ waitMs?: number;
23
+ }): Promise<ConsentResult>;
24
+ /** Check if a consent banner is still visible after attempted dismissal */
25
+ export declare function isConsentBannerVisible(page: Page): Promise<boolean>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Cookie jar — persist and restore Playwright storageState cookies between
3
+ * crawl segments and restarts. Enables continuous auth across session boundaries
4
+ * (e.g. segment 1 logs in, segment 2–N inherit the session without re-login).
5
+ *
6
+ * Storage: JSON file per project in the crawl cache dir.
7
+ * Format: Playwright's storageState shape (cookies + origins).
8
+ */
9
+ export interface CookieJarEntry {
10
+ projectId: string;
11
+ tenantId: string;
12
+ storageState: string;
13
+ savedAt: string;
14
+ domain: string;
15
+ }
16
+ export declare function saveCookieJar(cacheDir: string, projectId: string, tenantId: string, storageState: string, domain: string): Promise<void>;
17
+ export declare function loadCookieJar(cacheDir: string, projectId: string, maxAgeMs?: number): Promise<string | null>;
18
+ export declare function clearCookieJar(cacheDir: string, projectId: string): Promise<void>;
19
+ /** Merge two storageState JSON strings — second takes priority for same-domain cookies. */
20
+ export declare function mergeStorageStates(base: string, overlay: string): string;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Session management for authenticated crawl sessions.
3
+ * Detects auth expiry via HTTP status codes and login-page redirects,
4
+ * then attempts recovery via a token refresh endpoint or re-login flow.
5
+ * Designed to keep long-running crawls alive without manual intervention.
6
+ */
7
+ import type { Page } from 'playwright';
8
+ export interface SessionConfig {
9
+ loginUrl?: string;
10
+ email?: string;
11
+ password?: string;
12
+ healthCheckUrl?: string;
13
+ refreshEndpoint?: string;
14
+ tokenLocalStorageKey?: string;
15
+ maxRefreshAttempts?: number;
16
+ }
17
+ export type SessionEventType = 'HEALTHY' | 'EXPIRY_DETECTED' | 'REFRESH_ATTEMPT' | 'REFRESH_SUCCESS' | 'REFRESH_FAILED' | 'AUTH_FAILURE';
18
+ export interface SessionEvent {
19
+ type: SessionEventType;
20
+ isoTimestamp: string;
21
+ url?: string;
22
+ strategy?: string;
23
+ attemptCount?: number;
24
+ }
25
+ export interface SessionManager {
26
+ onResponse(url: string, status: number): void;
27
+ onNavigation(url: string): void;
28
+ isHealthy(): boolean;
29
+ needsRefresh(): boolean;
30
+ markHealthy(isoTimestamp: string): void;
31
+ refresh(page: Page, isoTimestamp: string): Promise<boolean>;
32
+ getEvents(): SessionEvent[];
33
+ getStats(): {
34
+ healthy: boolean;
35
+ refreshAttempts: number;
36
+ authFailure: boolean;
37
+ };
38
+ }
39
+ export declare function createSessionManager(config: SessionConfig): SessionManager;
40
+ /**
41
+ * Attaches a Playwright response listener to feed HTTP status codes into the
42
+ * session manager. Returns a cleanup function to remove the listener.
43
+ */
44
+ export declare function attachSessionWatcher(page: Page, manager: SessionManager): () => void;
@@ -0,0 +1,233 @@
1
+ /**
2
+ * ZeTa-AI Crawler — Stagehand hybrid architecture
3
+ *
4
+ * Three-layer stack:
5
+ * Layer 1 — Playwright (deterministic): navigation, screenshots, DOM fallbacks
6
+ * Layer 2 — Stagehand act/extract (AI): login, element understanding, smart link discovery
7
+ * Layer 3 — Skyvern (vision): fallback for CAPTCHAs, legacy apps, visual-only flows
8
+ *
9
+ * enableCaching: true → repeat crawls of the same site cost ~zero AI tokens after first run.
10
+ */
11
+ import type { Credentials } from './auth.js';
12
+ import { type SkyvernConfig } from './skyvern.js';
13
+ import { type TraversalStrategy } from './frontier.js';
14
+ import { type ApiEndpointObservationInput } from './network-observer.js';
15
+ import type { ProxyTierConfig } from './proxy.js';
16
+ interface PerformanceMetric {
17
+ url: string;
18
+ screenName: string;
19
+ lcp?: number;
20
+ fcp?: number;
21
+ ttfb?: number;
22
+ cls?: number;
23
+ }
24
+ export interface DiscoveredLinkMeta {
25
+ url: string;
26
+ text?: string;
27
+ landmark?: string;
28
+ source: 'DOM' | 'AI' | 'INTERACTIVE';
29
+ }
30
+ export declare function getNonHeadlessUserAgent(executablePath?: string): Promise<string>;
31
+ /**
32
+ * Lightweight pre-crawl link discovery: loads the app URL in a headless (proxy-aware) browser
33
+ * and returns same-site `<a href>` links. Complements sitemap discovery for SPA/app sites that
34
+ * have no sitemap.xml. Best-effort — returns [] on any failure (bot wall, timeout, etc.).
35
+ * chromium.launch({ proxy }) handles proxy 407 auth itself (same client), so no CDP handler needed.
36
+ */
37
+ export declare function discoverLinksViaBrowser(appUrl: string, opts?: {
38
+ proxyUrl?: string;
39
+ maxLinks?: number;
40
+ }): Promise<string[]>;
41
+ export declare function crawlProject(opts: {
42
+ tenantId: string;
43
+ projectId: string;
44
+ appUrl: string;
45
+ /** The viewport used for this crawl pass */
46
+ viewport?: 'DESKTOP' | 'MOBILE_PORTRAIT' | 'TABLET';
47
+ credentials?: Credentials;
48
+ /** Playwright storageState JSON string — if present, session is restored and AI login is skipped. */
49
+ storageState?: string;
50
+ screenshotDir?: string;
51
+ /** Cloud storage config for immediate screenshot upload. If set, screenshots are uploaded to cloud immediately after capture and cloudUrl is persisted. */
52
+ storageConfig?: {
53
+ provider: string;
54
+ bucket: string;
55
+ region?: string;
56
+ accountId?: string;
57
+ endpointUrl?: string;
58
+ accessKeyId?: string;
59
+ secretAccessKey?: string;
60
+ prefix?: string;
61
+ publicUrl?: string;
62
+ } | null;
63
+ /** When true, run a fast URL-only discovery crawl — skips screenshots, DB saves, and AI element extraction. Returns discoveredUrls in the result object. */
64
+ discoveryMode?: boolean;
65
+ maxScreens?: number;
66
+ /** Seed URLs added to the initial crawl queue — link discovery still runs from each page. */
67
+ startUrls?: string[];
68
+ /** When provided, crawl ONLY these exact URLs (no link-following, no full screen clear). Used for selected-screen recrawl. */
69
+ selectiveUrls?: string[];
70
+ /**
71
+ * URL path patterns that bypass the CUID/UUID generated-ID filter during BFS link discovery.
72
+ * Use {id} as a placeholder for any generated path segment (CUID, UUID, numeric ID, etc.).
73
+ * Example: ['/projects/{id}/tests', '/workspaces/{id}/settings']
74
+ * Without this, all URLs containing generated IDs are silently skipped by the BFS.
75
+ */
76
+ seedPathPatterns?: string[];
77
+ /** When true, run the interactive probe after static crawl to capture real validation errors, toasts, and modals. */
78
+ interactive?: boolean;
79
+ /** Optional abort signal — abort() cancels the crawl between page navigations. */
80
+ abortSignal?: AbortSignal;
81
+ /** Platform job ID — stored on screens so we can diff which were found in each crawl. */
82
+ jobId?: string;
83
+ /** Device profiles to capture screenshots for after the main DESKTOP crawl.
84
+ * Values: 'MOBILE_PORTRAIT' | 'TABLET'
85
+ * The main crawl always runs as DESKTOP. Extra profiles trigger a screenshot-only pass.
86
+ */
87
+ deviceProfiles?: string[];
88
+ /** HTTP Basic Auth credentials — injected as Authorization header on same-origin requests. */
89
+ httpBasicUsername?: string;
90
+ httpBasicPassword?: string;
91
+ /** Bearer/API token — injected as a request header and into localStorage. Skips AI login. */
92
+ authToken?: string;
93
+ /** Header name for authToken (default: 'Authorization'). */
94
+ authTokenHeader?: string;
95
+ /** Prefix for authToken value (default: 'Bearer '). */
96
+ authTokenPrefix?: string;
97
+ /** CAPTCHA solving API key (2captcha or CapSolver). */
98
+ captchaSolverApiKey?: string;
99
+ /** CAPTCHA solving service provider (default: '2captcha'). */
100
+ captchaSolverProvider?: '2captcha' | 'capsolver';
101
+ /**
102
+ * Path to a Chrome user data directory for profile inheritance.
103
+ * When set, the crawler exports the existing session from this profile and injects it,
104
+ * so the agent is already logged in. Works for local/self-hosted deployments only.
105
+ * Ignored on cloud/Docker (headless env cannot open another Chrome instance safely).
106
+ */
107
+ chromeProfilePath?: string;
108
+ /** MailSlurp API key for email OTP auto-retrieval (GAP 5). */
109
+ mailslurpApiKey?: string;
110
+ /** MailSlurp inbox ID to poll for OTP emails (GAP 5). */
111
+ mailslurpInboxId?: string;
112
+ /** SSO provider for ROPC token flow — 'okta' | 'azure_ad' | 'generic_oidc' (GAP 18). */
113
+ ssoProvider?: string;
114
+ /** SSO domain or Azure tenant ID (GAP 18). */
115
+ ssoDomain?: string;
116
+ /** SSO OAuth2 client ID (GAP 18). */
117
+ ssoClientId?: string;
118
+ /** SSO OAuth2 client secret (GAP 18). */
119
+ ssoClientSecret?: string;
120
+ /** SSO scopes (space-separated, default: 'openid profile') (GAP 18). */
121
+ ssoScope?: string;
122
+ /** HTTP/HTTPS/SOCKS5 proxy URL — e.g. 'http://user:pass@proxy.example.com:8080' or 'socks5://proxy:1080'.
123
+ * Useful for sites that block datacenter IPs (Akamai, Cloudflare Bot Manager). */
124
+ proxyUrl?: string;
125
+ /** Tiered proxy configuration for automatic per-domain escalation (free → datacenter → residential → premium). */
126
+ proxyTiers?: ProxyTierConfig[];
127
+ /** Use Camoufox (Firefox) as a cookie bootstrapper before the main Chromium crawl.
128
+ * Camoufox visits the URL first to solve Cloudflare JS challenges and extract session
129
+ * cookies, which are then injected into the Chromium crawl as storageState.
130
+ * Enable via Project Settings → Crawl Config → useFirefox: true. */
131
+ useFirefox?: boolean;
132
+ /** Natural language login instructions for Stagehand AI login. E.g. "Click Sign In in the nav, fill email, click Continue". */
133
+ loginInstructions?: string;
134
+ /** Skyvern vision fallback config from workspace settings (overrides SKYVERN_API_URL/KEY env vars). */
135
+ skyvernConfig?: SkyvernConfig;
136
+ /**
137
+ * Max screens to crawl per segment (default 50).
138
+ * After this limit the crawl pauses and remaining URLs are saved so the
139
+ * next job can continue. Total crawl is unlimited — just runs in multiple jobs.
140
+ */
141
+ segmentSize?: number;
142
+ /** URLs still queued from a previous segment — injected by the job-queue auto-continuation. */
143
+ resumeUrls?: string[];
144
+ /** Segment number (1-based) — used for progress display only. */
145
+ segmentIndex?: number;
146
+ /** Seed the crawl queue from the project's sitemap.xml, in addition to link-following. */
147
+ useSitemap?: boolean;
148
+ /** Explicit sitemap URL override — defaults to `${origin}/sitemap.xml` when useSitemap is set. */
149
+ sitemapUrl?: string;
150
+ /** Crawl queue traversal order. Default BFS — unchanged behavior from before this option existed. */
151
+ traversalStrategy?: TraversalStrategy;
152
+ /** BEST_FIRST only: URLs containing any of these (case-insensitive) are prioritized. */
153
+ bestFirstKeywords?: string[];
154
+ /** When true, skip URLs disallowed by the site's robots.txt. Default false. */
155
+ respectRobotsTxt?: boolean;
156
+ /** When true, dynamically slow crawl speed when server response latency is high (Scrapy-style AutoThrottle). Default false. */
157
+ autoThrottle?: boolean;
158
+ /** Regex pattern — only crawl URLs whose path+query match this pattern. */
159
+ urlFilter?: string;
160
+ /** Glob patterns — only enqueue URLs whose pathname matches at least one (supports * and **). */
161
+ includePatterns?: string[];
162
+ /** Glob patterns — skip URLs whose pathname matches any of these (supports * and **). */
163
+ excludePatterns?: string[];
164
+ /** Already-captured URLs from a previous failed job — pre-seeded into visited map so they're never re-crawled. */
165
+ skipUrls?: string[];
166
+ /** DOM hashes collected in a prior segment — prevents re-screenshotting structurally identical pages across segments. */
167
+ knownDomHashes?: string[];
168
+ /** When false, disables the puppeteer-extra stealth plugin (playwright-extra) for this crawl.
169
+ * Default true — stealth is applied unless explicitly set to false. */
170
+ stealth?: boolean;
171
+ /** Desktop viewport width in pixels (default: 1440). */
172
+ viewportWidth?: number;
173
+ /** Desktop viewport height in pixels (default: 900). */
174
+ viewportHeight?: number;
175
+ /** Called every 10 successful screen captures with current visited URLs and remaining queue — used for checkpoint persistence. */
176
+ onCheckpoint?: (visitedUrls: string[], pendingQueue: string[]) => Promise<void>;
177
+ /** Discovery mode only: called after each page with the current set of discovered original URLs — enables streaming partial results to callers. */
178
+ onUrlsDiscovered?: (urls: string[]) => Promise<void>;
179
+ }, onProgress?: (pct: number, step: string) => Promise<void>): Promise<{
180
+ discoveredUrls: string[];
181
+ screensFound: number;
182
+ screensErrored: number;
183
+ screensSkippedToNextSegment: number;
184
+ isPartial: boolean;
185
+ discovered: never[];
186
+ apiEndpoints: never[];
187
+ performanceMetrics: never[];
188
+ pendingUrls: never[];
189
+ segmentIndex: number;
190
+ hasMoreSegments: boolean;
191
+ domHashes: string[];
192
+ visitedUrls?: undefined;
193
+ wasTimeout?: undefined;
194
+ crawlWarnings?: undefined;
195
+ } | {
196
+ screensFound: number;
197
+ screensErrored: number;
198
+ screensSkippedToNextSegment: number;
199
+ isPartial: boolean;
200
+ discovered: {
201
+ url: string;
202
+ screenId?: string;
203
+ elements?: number;
204
+ elementFacts?: Array<{
205
+ meaning: string;
206
+ role: string;
207
+ expectedData?: string;
208
+ }>;
209
+ screenshotPath?: string;
210
+ version?: number;
211
+ error?: string;
212
+ }[];
213
+ apiEndpoints: ApiEndpointObservationInput[];
214
+ performanceMetrics: PerformanceMetric[];
215
+ pendingUrls: string[];
216
+ visitedUrls: string[];
217
+ wasTimeout: boolean;
218
+ segmentIndex: number;
219
+ hasMoreSegments: boolean;
220
+ domHashes: string[];
221
+ crawlWarnings: string[] | undefined;
222
+ discoveredUrls?: undefined;
223
+ }>;
224
+ export declare function domFallbackElements(page: any, rawPage?: any): Promise<Array<{
225
+ meaning: string;
226
+ role: string;
227
+ expectedData?: string;
228
+ notes?: string;
229
+ boundingRect?: Record<string, number>;
230
+ ariaState?: Record<string, string>;
231
+ parentLandmark?: string;
232
+ }>>;
233
+ export {};
@@ -0,0 +1,31 @@
1
+ import type { Page } from 'playwright';
2
+ export type EditFlowType = 'inline' | 'modal' | 'navigation' | 'unknown';
3
+ export interface CrudFlowCapture {
4
+ entityName: string;
5
+ createTrigger?: string;
6
+ editFlowType: EditFlowType;
7
+ editFields: Array<{
8
+ name: string;
9
+ type: string;
10
+ prefilledValue?: string;
11
+ }>;
12
+ deleteConfirmation?: {
13
+ message: string;
14
+ confirmLabel: string;
15
+ cancelLabel: string;
16
+ };
17
+ createSuccessToast?: string;
18
+ editSuccessToast?: string;
19
+ rowCount: number;
20
+ hasDeleteButton: boolean;
21
+ hasEditButton: boolean;
22
+ }
23
+ export interface CrudProbeResult {
24
+ flows: CrudFlowCapture[];
25
+ toastsObserved: Array<{
26
+ action: string;
27
+ text: string;
28
+ role: string;
29
+ }>;
30
+ }
31
+ export declare function probeCrudFlows(page: Page, entityName?: string): Promise<CrudProbeResult>;