@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,42 @@
1
+ /**
2
+ * Custom JS injector — run user-provided JavaScript in the context of each crawled page.
3
+ *
4
+ * Use cases:
5
+ * - Extract custom data points not captured by standard extractors
6
+ * - Set localStorage/sessionStorage values before crawl
7
+ * - Override fetch() to intercept API calls
8
+ * - Simulate user events (keydown, focus, etc.)
9
+ * - Bypass specific anti-bot checks
10
+ *
11
+ * Security: scripts run in the page context (sandboxed by Chromium's renderer).
12
+ * They cannot access the Node.js process or file system.
13
+ * ZeTa validates scripts are strings before injection.
14
+ */
15
+ import type { Page } from 'playwright';
16
+ export interface JsInjectionOpts {
17
+ /** Script to run on every page BEFORE navigation (via page.addInitScript) */
18
+ initScript?: string;
19
+ /** Script to run on every page AFTER navigation completes (via page.evaluate) */
20
+ postLoadScript?: string;
21
+ /** Key-value pairs to set in localStorage before page load */
22
+ localStorage?: Record<string, string>;
23
+ /** Key-value pairs to set in sessionStorage before page load */
24
+ sessionStorage?: Record<string, string>;
25
+ /** Cookie key-value pairs to add before page load */
26
+ cookies?: Array<{
27
+ name: string;
28
+ value: string;
29
+ domain?: string;
30
+ path?: string;
31
+ }>;
32
+ }
33
+ export interface JsInjectionResult {
34
+ initScriptApplied: boolean;
35
+ postLoadResult: unknown;
36
+ storageSet: boolean;
37
+ cookiesSet: number;
38
+ error?: string;
39
+ }
40
+ export declare function injectCustomJs(page: Page, opts: JsInjectionOpts): Promise<JsInjectionResult>;
41
+ /** Safe string validator — ensures script is a string, not an object/function reference */
42
+ export declare function validateScript(script: unknown): string;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Dark mode capture — screenshot pages in both light and dark color schemes.
3
+ *
4
+ * Uses Playwright's page.emulateMedia({ colorScheme: 'dark' }) to force dark mode,
5
+ * then captures a screenshot. Compares with light mode to determine if dark mode
6
+ * is supported (significant visual difference).
7
+ *
8
+ * Also detects prefers-color-scheme media query support in CSS.
9
+ */
10
+ import type { Page } from 'playwright';
11
+ export interface DarkModeCapture {
12
+ url: string;
13
+ lightScreenshot?: Buffer;
14
+ darkScreenshot?: Buffer;
15
+ hasDarkMode: boolean;
16
+ hasCssDarkMode: boolean;
17
+ backgroundColorLight?: string;
18
+ backgroundColorDark?: string;
19
+ capturedAt: string;
20
+ }
21
+ export declare function captureDarkMode(page: Page, url: string, opts?: {
22
+ takeScreenshots?: boolean;
23
+ }): Promise<DarkModeCapture>;
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Dead link detector — tracks broken links discovered during crawl.
3
+ *
4
+ * A "dead link" is a URL that:
5
+ * - Returns 404, 410, or other 4xx/5xx responses
6
+ * - Times out after maxRetries
7
+ * - Redirects to an error page (detected by title heuristic)
8
+ *
9
+ * Results: list of broken links with source page, status code, and anchor text.
10
+ * Used for: SEO audit export, test report enrichment.
11
+ */
12
+ export interface DeadLink {
13
+ url: string;
14
+ statusCode: number;
15
+ sourceUrl?: string;
16
+ anchorText?: string;
17
+ checkedAt: string;
18
+ reason: 'http-error' | 'timeout' | 'dns-error';
19
+ }
20
+ export declare class DeadLinkTracker {
21
+ private deadLinks;
22
+ private checked;
23
+ record(url: string, statusCode: number, source?: {
24
+ sourceUrl?: string;
25
+ anchorText?: string;
26
+ }): void;
27
+ recordTimeout(url: string, sourceUrl?: string): void;
28
+ getDeadLinks(): DeadLink[];
29
+ isKnownBroken(url: string): boolean;
30
+ stats(): {
31
+ total: number;
32
+ by404: number;
33
+ by5xx: number;
34
+ byTimeout: number;
35
+ };
36
+ toCsv(): string;
37
+ }
@@ -0,0 +1,20 @@
1
+ import type { Page } from 'playwright';
2
+ export interface DropdownOption {
3
+ value: string;
4
+ label: string;
5
+ disabled?: boolean;
6
+ }
7
+ export interface DropdownDef {
8
+ kind: 'native-select' | 'combobox' | 'listbox' | 'multiselect';
9
+ label: string;
10
+ locatorHint: string;
11
+ options: DropdownOption[];
12
+ defaultValue?: string;
13
+ cascadesFrom?: string;
14
+ }
15
+ export interface DropdownEnumerationResult {
16
+ dropdowns: DropdownDef[];
17
+ conditionalRevealMap: Record<string, string[]>;
18
+ totalOptionsFound: number;
19
+ }
20
+ export declare function enumerateDropdowns(page: Page): Promise<DropdownEnumerationResult>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Compute a stable fingerprint of a screen's element set.
3
+ * Sorted so insertion-order changes (React re-renders) don't produce false positives.
4
+ * Returns first 16 hex chars of SHA-256.
5
+ */
6
+ export declare function computeElementHash(elements: Array<{
7
+ role: string;
8
+ meaning: string;
9
+ }>): string;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Email OTP retrieval — supports 3 providers:
3
+ * mailslurp — managed SaaS (existing, no self-hosting)
4
+ * imap — any real IMAP mailbox (Gmail, Outlook, custom domain catch-all)
5
+ * mailpit — self-hosted SMTP trap (dev/staging only)
6
+ *
7
+ * Use mailslurp or imap for production apps.
8
+ * Use mailpit only when you can point the app's SMTP at the trap server.
9
+ */
10
+ export type EmailOTPProvider = 'mailslurp' | 'imap' | 'mailpit';
11
+ export interface EmailContent {
12
+ /** 4-8 digit OTP code, if found. */
13
+ otp?: string;
14
+ /** Magic link URL to navigate to, if found. */
15
+ magicLink?: string;
16
+ }
17
+ export interface EmailOTPConfig {
18
+ provider: EmailOTPProvider;
19
+ apiKey?: string;
20
+ inboxId?: string;
21
+ imapHost?: string;
22
+ imapPort?: number;
23
+ imapUser?: string;
24
+ imapPass?: string;
25
+ imapTls?: boolean;
26
+ mailpitBaseUrl?: string;
27
+ }
28
+ /**
29
+ * Wait for an email and return its OTP code or magic link URL.
30
+ * Prefer this over waitForEmailOTP when the app may send passwordless magic links.
31
+ */
32
+ export declare function waitForEmailContent(config: EmailOTPConfig, since: string | Date): Promise<EmailContent | null>;
33
+ /**
34
+ * Wait for an OTP email and extract the code.
35
+ * @deprecated Use waitForEmailContent which also handles magic links.
36
+ */
37
+ export declare function waitForEmailOTP(config: EmailOTPConfig, since: string | Date): Promise<string | null>;
38
+ /**
39
+ * Get the email address for a MailSlurp inbox (used to display in UI).
40
+ * Returns null for IMAP/Mailpit providers — use imapUser directly.
41
+ */
42
+ export declare function getInboxEmail(configOrApiKey: EmailOTPConfig | string, inboxId?: string): Promise<string | null>;
@@ -0,0 +1,47 @@
1
+ import type { DomainProfile } from './profiles/domain-profile.js';
2
+ export type CrawlEngineName = 'http' | 'browser' | 'browser-stealth' | 'stagehand' | 'vision' | 'recorded-session' | 'native';
3
+ export interface CrawlRouteDecisionInput {
4
+ appUrl: string;
5
+ appType?: string | null;
6
+ hasCredentials: boolean;
7
+ hasStorageState: boolean;
8
+ hasAuthToken: boolean;
9
+ hasSkyvern: boolean;
10
+ hasProxy: boolean;
11
+ profile: DomainProfile;
12
+ previousFailureReason?: string;
13
+ }
14
+ export interface CrawlRouteDecision {
15
+ engines: CrawlEngineName[];
16
+ reasons: string[];
17
+ confidence: number;
18
+ }
19
+ /**
20
+ * Per-domain rendering predictor — learns whether a domain requires a full browser
21
+ * or can be served by the fast HTTP engine. Implements adaptive crawlee-python pattern.
22
+ *
23
+ * Strategy:
24
+ * 1. On first encounter of a domain, classify the HTTP response body.
25
+ * 2. Store the decision in memory (Map). All future URLs on same domain skip re-testing.
26
+ * 3. "Requires browser" signals: React/Vue/Angular root with no content, tiny body (<500 chars meaningful text).
27
+ */
28
+ export declare class RenderingTypePredictor {
29
+ private cache;
30
+ /** Return cached decision if available, undefined if unknown. */
31
+ getCached(url: string): 'http' | 'browser' | undefined;
32
+ /**
33
+ * Analyze an HTTP response body to predict if JS rendering is required.
34
+ * Returns 'browser' if JS-heavy signals detected, 'http' otherwise.
35
+ */
36
+ predict(url: string, htmlBody: string, statusCode: number): 'http' | 'browser';
37
+ /** Force a domain to use a specific engine (e.g. after observing crawl errors). */
38
+ set(url: string, engine: 'http' | 'browser'): void;
39
+ stats(): {
40
+ cached: number;
41
+ browserDomains: string[];
42
+ httpDomains: string[];
43
+ };
44
+ }
45
+ /** Singleton predictor — shared across crawl jobs in the same process. */
46
+ export declare const renderingPredictor: RenderingTypePredictor;
47
+ export declare function chooseCrawlEngines(input: CrawlRouteDecisionInput): CrawlRouteDecision;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Bulk export — export crawled screens to CSV / JSON / Markdown digest.
3
+ *
4
+ * Outputs:
5
+ * - CSV: url, name, wordCount, screenshotPath, markdownPath, createdAt — for spreadsheet analysis
6
+ * - JSON: full screen records array — for API integration
7
+ * - Markdown digest: concatenated markdown of all screens — for LLM context windows
8
+ */
9
+ export interface ExportScreen {
10
+ id: string;
11
+ name: string;
12
+ url: string;
13
+ projectId: string;
14
+ wordCount?: number;
15
+ screenshotPath?: string | null;
16
+ markdownPath?: string | null;
17
+ markdown?: string | null;
18
+ createdAt?: Date;
19
+ updatedAt?: Date;
20
+ }
21
+ export declare function exportToCsv(screens: ExportScreen[], outputPath: string): Promise<void>;
22
+ export declare function exportToJson(screens: ExportScreen[], outputPath: string): Promise<void>;
23
+ export declare function exportToMarkdownDigest(screens: ExportScreen[], outputPath: string, opts?: {
24
+ readMarkdownFromPath?: boolean;
25
+ maxScreens?: number;
26
+ }): Promise<void>;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Vector DB export — convert crawled screens to embedding-ready chunks.
3
+ *
4
+ * Produces a JSONL file where each line is one chunk ready for upsert into
5
+ * Pinecone, Qdrant, Weaviate, or any vector store. The embedding itself is
6
+ * NOT generated here (requires an embedding model at the user's end) — we
7
+ * produce the text chunks + metadata, and the caller embeds them.
8
+ *
9
+ * Format per line (JSONL):
10
+ * {
11
+ * "id": "<screenId>-<chunkIndex>",
12
+ * "text": "<chunk text>",
13
+ * "metadata": {
14
+ * "screenId": "...",
15
+ * "projectId": "...",
16
+ * "tenantId": "...",
17
+ * "url": "...",
18
+ * "screenName": "...",
19
+ * "chunkIndex": 0,
20
+ * "totalChunks": 3,
21
+ * "crawledAt": "2026-...",
22
+ * "wordCount": 142
23
+ * }
24
+ * }
25
+ */
26
+ export interface VectorChunk {
27
+ id: string;
28
+ text: string;
29
+ metadata: {
30
+ screenId: string;
31
+ projectId: string;
32
+ tenantId: string;
33
+ url: string;
34
+ screenName: string;
35
+ chunkIndex: number;
36
+ totalChunks: number;
37
+ crawledAt: string;
38
+ wordCount: number;
39
+ };
40
+ }
41
+ export interface ScreenRecord {
42
+ id: string;
43
+ name: string;
44
+ url: string;
45
+ projectId: string;
46
+ tenantId: string;
47
+ markdown?: string | null;
48
+ markdownPath?: string | null;
49
+ updatedAt?: Date;
50
+ }
51
+ export declare function exportScreensToVectorJsonl(screens: ScreenRecord[], outputPath: string, opts?: {
52
+ maxChunkWords?: number;
53
+ readMarkdownFromPath?: boolean;
54
+ }): Promise<{
55
+ totalChunks: number;
56
+ skipped: number;
57
+ }>;
58
+ /**
59
+ * Pinecone-compatible upsert batch format.
60
+ * Call this after generating embeddings to produce the final upsert payload.
61
+ */
62
+ export declare function toPineconeUpsert(chunks: VectorChunk[], embeddings: number[][], namespace?: string): Array<{
63
+ id: string;
64
+ values: number[];
65
+ metadata: VectorChunk['metadata'];
66
+ }>;
67
+ /**
68
+ * Qdrant-compatible point format.
69
+ */
70
+ export declare function toQdrantPoints(chunks: VectorChunk[], embeddings: number[][]): Array<{
71
+ id: string;
72
+ vector: number[];
73
+ payload: VectorChunk['metadata'] & {
74
+ text: string;
75
+ };
76
+ }>;
@@ -0,0 +1,64 @@
1
+ export interface ExtractionResult {
2
+ matches: string[];
3
+ count: number;
4
+ method: string;
5
+ }
6
+ export type TableRow = Record<string, string>;
7
+ export interface PageMetadata {
8
+ title: string | null;
9
+ description: string | null;
10
+ keywords: string | null;
11
+ ogTitle: string | null;
12
+ ogDescription: string | null;
13
+ ogImage: string | null;
14
+ ogUrl: string | null;
15
+ ogType: string | null;
16
+ ogSiteName: string | null;
17
+ ogLocale: string | null;
18
+ twitterCard: string | null;
19
+ twitterTitle: string | null;
20
+ twitterDescription: string | null;
21
+ twitterImage: string | null;
22
+ twitterSite: string | null;
23
+ canonical: string | null;
24
+ robots: string | null;
25
+ hreflang: Array<{
26
+ lang: string;
27
+ href: string;
28
+ }>;
29
+ themeColor: string | null;
30
+ favicon: string | null;
31
+ jsonLd: object[];
32
+ schemaTypes: string[];
33
+ lang: string | null;
34
+ }
35
+ export declare function extractByCssSelector(html: string, selector: string, attr?: string): ExtractionResult;
36
+ export declare function extractByXPath(html: string, xpath: string): ExtractionResult;
37
+ export declare function extractByRegex(text: string, pattern: string, flags?: string): ExtractionResult;
38
+ export declare function extractTables(html: string): TableRow[][];
39
+ export declare function extractMetadata(html: string, url: string): PageMetadata;
40
+ export interface ProductData {
41
+ name: string | null;
42
+ description: string | null;
43
+ brand: string | null;
44
+ sku: string | null;
45
+ price: number | null;
46
+ priceCurrency: string | null;
47
+ availability: string | null;
48
+ rating: number | null;
49
+ reviewCount: number | null;
50
+ image: string | null;
51
+ url: string | null;
52
+ }
53
+ export declare function extractStructuredProduct(jsonLd: object[]): ProductData | null;
54
+ export declare function extractImages(html: string, baseUrl: string): Array<{
55
+ src: string;
56
+ alt: string;
57
+ width?: number;
58
+ height?: number;
59
+ }>;
60
+ export declare function extractMediaFiles(html: string, baseUrl: string): Array<{
61
+ url: string;
62
+ type: 'image' | 'video' | 'audio' | 'document';
63
+ tag: string;
64
+ }>;
@@ -0,0 +1,63 @@
1
+ import type { RawElement } from '../screen-reader.js';
2
+ export interface CrawlEvidenceFact {
3
+ type: string;
4
+ payload: unknown;
5
+ }
6
+ export interface CrawlArtifactEnvelope {
7
+ tenantId: string;
8
+ projectId: string;
9
+ jobId?: string;
10
+ url: string;
11
+ canonicalUrl: string;
12
+ screenId?: string;
13
+ status: 'ok' | 'blocked' | 'auth_expired' | 'error' | 'skipped';
14
+ outputs: {
15
+ screenshot?: string;
16
+ html?: string;
17
+ markdown?: string;
18
+ fitMarkdown?: string;
19
+ accessibilityTree?: string;
20
+ structuredJson?: unknown;
21
+ networkTrace?: string;
22
+ consoleLog?: string;
23
+ };
24
+ fingerprints: {
25
+ textHash?: string;
26
+ domHash?: string;
27
+ accessibilityHash?: string;
28
+ urlCanonicalHash: string;
29
+ };
30
+ evidence: CrawlEvidenceFact[];
31
+ }
32
+ export declare function sha256(input: string): string;
33
+ export declare function buildFitMarkdown(markdown: string, keywords?: string[]): string;
34
+ export declare function summarizeStructuredElements(elements: RawElement[]): {
35
+ elementCount: number;
36
+ formFieldCount: number;
37
+ actionCount: number;
38
+ fields: {
39
+ label: string;
40
+ role: string;
41
+ expectedData: string | undefined;
42
+ }[];
43
+ actions: {
44
+ label: string;
45
+ role: string;
46
+ }[];
47
+ };
48
+ export declare function buildCrawlArtifactEnvelope(input: {
49
+ tenantId: string;
50
+ projectId: string;
51
+ jobId?: string;
52
+ url: string;
53
+ canonicalUrl: string;
54
+ screenId?: string;
55
+ screenshotPath?: string;
56
+ domPath?: string;
57
+ domContent?: string;
58
+ markdown?: string;
59
+ fitMarkdown?: string;
60
+ accessibilityElements?: RawElement[];
61
+ structuredJson?: unknown;
62
+ evidence?: CrawlEvidenceFact[];
63
+ }): CrawlArtifactEnvelope;
@@ -0,0 +1,46 @@
1
+ import type { Page } from 'playwright';
2
+ export interface BrandingColors {
3
+ primary?: string;
4
+ accent?: string;
5
+ background?: string;
6
+ textPrimary?: string;
7
+ link?: string;
8
+ }
9
+ export interface BrandingFont {
10
+ family: string;
11
+ role: 'heading' | 'body';
12
+ }
13
+ export interface BrandingImages {
14
+ logo?: string;
15
+ favicon?: string;
16
+ ogImage?: string;
17
+ }
18
+ export interface BrandingPersonality {
19
+ tone?: string;
20
+ energy?: 'high' | 'medium' | 'low';
21
+ targetAudience?: string;
22
+ }
23
+ export interface BrandingResult {
24
+ colorScheme: 'light' | 'dark';
25
+ colors: BrandingColors;
26
+ fonts: BrandingFont[];
27
+ images: BrandingImages;
28
+ personality?: BrandingPersonality;
29
+ designSystem?: {
30
+ framework?: string;
31
+ componentLibrary?: string;
32
+ };
33
+ metadata?: {
34
+ title?: string;
35
+ description?: string;
36
+ themeColor?: string;
37
+ language?: string;
38
+ };
39
+ confidence: {
40
+ colors: number;
41
+ fonts: number;
42
+ images: number;
43
+ overall: number;
44
+ };
45
+ }
46
+ export declare function extractBranding(page: Page): Promise<BrandingResult>;
@@ -0,0 +1,10 @@
1
+ export interface SummaryResult {
2
+ summary: string;
3
+ wordCount: number;
4
+ method: 'llm' | 'truncated';
5
+ model?: string;
6
+ }
7
+ export declare function extractSummary(markdown: string, options?: {
8
+ model?: string;
9
+ maxTokens?: number;
10
+ }): Promise<SummaryResult>;
@@ -0,0 +1,16 @@
1
+ export interface FailureContext {
2
+ tenantId?: string;
3
+ error: string;
4
+ stepDescription?: string;
5
+ consoleLogs?: Array<{
6
+ type: string;
7
+ text: string;
8
+ }>;
9
+ networkErrors?: Array<{
10
+ url: string;
11
+ status: number;
12
+ method: string;
13
+ }>;
14
+ screenshotPath?: string;
15
+ }
16
+ export declare function analyzeFailure(ctx: FailureContext): Promise<string | null>;
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Feature flag + A/B test detector.
3
+ *
4
+ * Detects popular feature flag / experiment SDKs loaded on the page:
5
+ * LaunchDarkly, Optimizely, Split.io, Unleash, GrowthBook, Statsig, Flagsmith, Amplitude Experiment.
6
+ *
7
+ * Also detects common A/B test patterns: data-testid attributes, gtm.js experiment layers,
8
+ * Optimizely variation IDs, VWO, etc.
9
+ *
10
+ * Why: ZeTa needs to know when a page shows different content to different users
11
+ * so test generation can account for variants and not generate flaky tests.
12
+ */
13
+ import type { Page } from 'playwright';
14
+ export interface FeatureFlagInfo {
15
+ sdk: string;
16
+ confidence: 'high' | 'medium' | 'low';
17
+ details?: string;
18
+ }
19
+ export interface AbTestInfo {
20
+ tool: string;
21
+ experiments?: string[];
22
+ }
23
+ export interface FeatureFlagDetectionResult {
24
+ url: string;
25
+ flagSdks: FeatureFlagInfo[];
26
+ abTools: AbTestInfo[];
27
+ hasAnyFlags: boolean;
28
+ detectedAt: string;
29
+ }
30
+ export declare function detectFeatureFlags(page: Page, url: string): Promise<FeatureFlagDetectionResult>;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Filter state crawling and pagination capture.
3
+ *
4
+ * Discovers filter controls (select, checkbox-group, radio-group, search),
5
+ * applies each meaningful option and records result counts and first-row
6
+ * values, then detects and walks pagination (numbered, load-more, infinite
7
+ * scroll). Also captures sort column behaviour.
8
+ *
9
+ * All per-filter / per-page errors are caught and skipped so one bad control
10
+ * never aborts the full crawl.
11
+ */
12
+ import type { Page } from 'playwright';
13
+ export interface FilterOption {
14
+ value: string;
15
+ label: string;
16
+ }
17
+ export interface FilterDef {
18
+ kind: 'select' | 'checkbox-group' | 'radio-group' | 'search';
19
+ label: string;
20
+ locatorHint: string;
21
+ options: FilterOption[];
22
+ }
23
+ export interface FilterState {
24
+ filterLabel: string;
25
+ filterValue: string;
26
+ resultCount: number | null;
27
+ firstRowValues: string[];
28
+ }
29
+ export interface PaginationCapture {
30
+ kind: 'numbered' | 'load-more' | 'infinite-scroll' | 'none';
31
+ totalPages?: number;
32
+ totalItems?: number;
33
+ pageSizes?: number[];
34
+ pages: Array<{
35
+ pageNum: number;
36
+ rowValues: string[];
37
+ }>;
38
+ }
39
+ export interface FilterPaginationResult {
40
+ filters: FilterDef[];
41
+ filterStates: FilterState[];
42
+ pagination: PaginationCapture;
43
+ sortColumns: Array<{
44
+ header: string;
45
+ ariaSortAfterClick: string | null;
46
+ }>;
47
+ searchCapture?: {
48
+ noResultsText: string | null;
49
+ sampleSuggestions: string[];
50
+ };
51
+ }
52
+ export declare function crawlFiltersAndPagination(page: Page): Promise<FilterPaginationResult>;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Form detector — extract form metadata from crawled pages.
3
+ *
4
+ * For each form found on a page, captures: action URL, method, all input fields
5
+ * with their types/names/required/validation constraints, and submit button text.
6
+ *
7
+ * This data feeds ZeTa's test generator to create form validation test cases
8
+ * automatically (happy path + boundary/error cases per field type).
9
+ */
10
+ import type { Page } from 'playwright';
11
+ export interface FormField {
12
+ name: string;
13
+ type: string;
14
+ label?: string;
15
+ required: boolean;
16
+ placeholder?: string;
17
+ minLength?: number;
18
+ maxLength?: number;
19
+ min?: string;
20
+ max?: string;
21
+ pattern?: string;
22
+ options?: string[];
23
+ autocomplete?: string;
24
+ }
25
+ export interface DetectedForm {
26
+ index: number;
27
+ action?: string;
28
+ method: string;
29
+ fields: FormField[];
30
+ submitText?: string;
31
+ hasFileUpload: boolean;
32
+ purpose: 'login' | 'search' | 'registration' | 'contact' | 'checkout' | 'settings' | 'unknown';
33
+ }
34
+ export declare function detectForms(page: Page): Promise<DetectedForm[]>;