@xoxoai/checkmate 0.4.27 → 0.5.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 (397) hide show
  1. package/README.md +259 -224
  2. package/bin/checkmate.js +1 -1
  3. package/dist/ai/client.d.ts +45 -30
  4. package/dist/ai/client.d.ts.map +1 -1
  5. package/dist/ai/client.js +198 -129
  6. package/dist/ai/client.js.map +1 -1
  7. package/dist/ai/message-handler.d.ts +5 -7
  8. package/dist/ai/message-handler.d.ts.map +1 -1
  9. package/dist/ai/message-handler.js +38 -21
  10. package/dist/ai/message-handler.js.map +1 -1
  11. package/dist/ai/message-history.d.ts +4 -6
  12. package/dist/ai/message-history.d.ts.map +1 -1
  13. package/dist/ai/message-history.js +18 -21
  14. package/dist/ai/message-history.js.map +1 -1
  15. package/dist/ai/rate-limit-policy.d.ts +5 -3
  16. package/dist/ai/rate-limit-policy.d.ts.map +1 -1
  17. package/dist/ai/rate-limit-policy.js +24 -7
  18. package/dist/ai/rate-limit-policy.js.map +1 -1
  19. package/dist/ai/tool-response-handler.d.ts +11 -16
  20. package/dist/ai/tool-response-handler.d.ts.map +1 -1
  21. package/dist/ai/tool-response-handler.js +59 -28
  22. package/dist/ai/tool-response-handler.js.map +1 -1
  23. package/dist/ai/turn-processor.d.ts +34 -0
  24. package/dist/ai/turn-processor.d.ts.map +1 -0
  25. package/dist/ai/turn-processor.js +107 -0
  26. package/dist/ai/turn-processor.js.map +1 -0
  27. package/dist/api/allocate-run-identity.d.ts +8 -0
  28. package/dist/api/allocate-run-identity.d.ts.map +1 -0
  29. package/dist/api/allocate-run-identity.js +10 -0
  30. package/dist/api/allocate-run-identity.js.map +1 -0
  31. package/dist/api/execute-prepared-run.d.ts +22 -0
  32. package/dist/api/execute-prepared-run.d.ts.map +1 -0
  33. package/dist/api/execute-prepared-run.js +160 -0
  34. package/dist/api/execute-prepared-run.js.map +1 -0
  35. package/dist/api/index.d.ts +25 -0
  36. package/dist/api/index.d.ts.map +1 -0
  37. package/dist/api/index.js +69 -0
  38. package/dist/api/index.js.map +1 -0
  39. package/dist/api/prepare-run.d.ts +44 -0
  40. package/dist/api/prepare-run.d.ts.map +1 -0
  41. package/dist/api/prepare-run.js +261 -0
  42. package/dist/api/prepare-run.js.map +1 -0
  43. package/dist/cli/diagnostic-relay.d.ts +6 -0
  44. package/dist/cli/diagnostic-relay.d.ts.map +1 -0
  45. package/dist/cli/diagnostic-relay.js +6 -0
  46. package/dist/cli/diagnostic-relay.js.map +1 -0
  47. package/dist/cli/main.d.ts +21 -0
  48. package/dist/cli/main.d.ts.map +1 -0
  49. package/dist/cli/main.js +166 -0
  50. package/dist/cli/main.js.map +1 -0
  51. package/dist/cli/protocol.d.ts +57 -0
  52. package/dist/cli/protocol.d.ts.map +1 -0
  53. package/dist/cli/protocol.js +116 -0
  54. package/dist/cli/protocol.js.map +1 -0
  55. package/dist/cli/reconcile-result.d.ts +13 -0
  56. package/dist/cli/reconcile-result.d.ts.map +1 -0
  57. package/dist/cli/reconcile-result.js +300 -0
  58. package/dist/cli/reconcile-result.js.map +1 -0
  59. package/dist/cli/run-parent.d.ts +37 -0
  60. package/dist/cli/run-parent.d.ts.map +1 -0
  61. package/dist/cli/run-parent.js +491 -0
  62. package/dist/cli/run-parent.js.map +1 -0
  63. package/dist/cli/signals.d.ts +36 -0
  64. package/dist/cli/signals.d.ts.map +1 -0
  65. package/dist/cli/signals.js +85 -0
  66. package/dist/cli/signals.js.map +1 -0
  67. package/dist/cli/static-commands.d.ts +11 -0
  68. package/dist/cli/static-commands.d.ts.map +1 -0
  69. package/dist/cli/static-commands.js +83 -0
  70. package/dist/cli/static-commands.js.map +1 -0
  71. package/dist/cli/worker-stream-guard.d.ts +20 -0
  72. package/dist/cli/worker-stream-guard.d.ts.map +1 -0
  73. package/dist/cli/worker-stream-guard.js +41 -0
  74. package/dist/cli/worker-stream-guard.js.map +1 -0
  75. package/dist/cli/worker.d.ts +3 -0
  76. package/dist/cli/worker.d.ts.map +1 -0
  77. package/dist/cli/worker.js +111 -0
  78. package/dist/cli/worker.js.map +1 -0
  79. package/dist/config/ingestion.d.ts +58 -0
  80. package/dist/config/ingestion.d.ts.map +1 -0
  81. package/dist/config/ingestion.js +283 -0
  82. package/dist/config/ingestion.js.map +1 -0
  83. package/dist/config/manifest.d.ts +20 -0
  84. package/dist/config/manifest.d.ts.map +1 -0
  85. package/dist/config/manifest.js +91 -0
  86. package/dist/config/manifest.js.map +1 -0
  87. package/dist/config/model-egress.d.ts +10 -0
  88. package/dist/config/model-egress.d.ts.map +1 -0
  89. package/dist/config/model-egress.js +62 -0
  90. package/dist/config/model-egress.js.map +1 -0
  91. package/dist/config/package-resolution.d.ts +4 -0
  92. package/dist/config/package-resolution.d.ts.map +1 -0
  93. package/dist/config/package-resolution.js +24 -0
  94. package/dist/config/package-resolution.js.map +1 -0
  95. package/dist/config/policy.d.ts +44 -0
  96. package/dist/config/policy.d.ts.map +1 -0
  97. package/dist/config/policy.js +141 -0
  98. package/dist/config/policy.js.map +1 -0
  99. package/dist/config/record.d.ts +4 -0
  100. package/dist/config/record.d.ts.map +1 -0
  101. package/dist/config/record.js +10 -0
  102. package/dist/config/record.js.map +1 -0
  103. package/dist/config/secrets.d.ts +11 -0
  104. package/dist/config/secrets.d.ts.map +1 -0
  105. package/dist/config/secrets.js +42 -0
  106. package/dist/config/secrets.js.map +1 -0
  107. package/dist/contracts/diagnostics.d.ts +4 -0
  108. package/dist/contracts/diagnostics.d.ts.map +1 -0
  109. package/dist/contracts/diagnostics.js +31 -0
  110. package/dist/contracts/diagnostics.js.map +1 -0
  111. package/dist/contracts/serialize.d.ts +2 -0
  112. package/dist/contracts/serialize.d.ts.map +1 -0
  113. package/dist/contracts/serialize.js +90 -0
  114. package/dist/contracts/serialize.js.map +1 -0
  115. package/dist/contracts/types.d.ts +316 -0
  116. package/dist/contracts/types.d.ts.map +1 -0
  117. package/dist/contracts/types.js +74 -0
  118. package/dist/contracts/types.js.map +1 -0
  119. package/dist/contracts/validator.d.ts +8 -0
  120. package/dist/contracts/validator.d.ts.map +1 -0
  121. package/dist/contracts/validator.js +71 -0
  122. package/dist/contracts/validator.js.map +1 -0
  123. package/dist/driver.d.ts +97 -0
  124. package/dist/driver.d.ts.map +1 -0
  125. package/dist/driver.js +24 -0
  126. package/dist/driver.js.map +1 -0
  127. package/dist/drivers/descriptor.d.ts +15 -0
  128. package/dist/drivers/descriptor.d.ts.map +1 -0
  129. package/dist/drivers/descriptor.js +122 -0
  130. package/dist/drivers/descriptor.js.map +1 -0
  131. package/dist/drivers/loader.d.ts +18 -0
  132. package/dist/drivers/loader.d.ts.map +1 -0
  133. package/dist/drivers/loader.js +97 -0
  134. package/dist/drivers/loader.js.map +1 -0
  135. package/dist/drivers/web/checkmate-driver.json +44 -0
  136. package/dist/drivers/web/index.d.ts +6 -0
  137. package/dist/drivers/web/index.d.ts.map +1 -0
  138. package/dist/drivers/web/index.js +27 -0
  139. package/dist/drivers/web/index.js.map +1 -0
  140. package/dist/drivers/web/session.d.ts +22 -0
  141. package/dist/drivers/web/session.d.ts.map +1 -0
  142. package/dist/drivers/web/session.js +130 -0
  143. package/dist/drivers/web/session.js.map +1 -0
  144. package/dist/drivers/web/tools/network-request-recorder.d.ts +46 -0
  145. package/dist/drivers/web/tools/network-request-recorder.d.ts.map +1 -0
  146. package/dist/drivers/web/tools/network-request-recorder.js +164 -0
  147. package/dist/drivers/web/tools/network-request-recorder.js.map +1 -0
  148. package/dist/{tools/browser → drivers/web/tools}/screenshot-service.d.ts +1 -1
  149. package/dist/drivers/web/tools/screenshot-service.d.ts.map +1 -0
  150. package/dist/drivers/web/tools/screenshot-service.js.map +1 -0
  151. package/dist/drivers/web/tools/snapshot-filter/index.d.ts.map +1 -0
  152. package/dist/drivers/web/tools/snapshot-filter/index.js.map +1 -0
  153. package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.d.ts.map +1 -0
  154. package/dist/drivers/web/tools/snapshot-filter/semantic-scorer.js.map +1 -0
  155. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.d.ts +5 -0
  156. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.d.ts.map +1 -0
  157. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.js +56 -0
  158. package/dist/drivers/web/tools/snapshot-filter/snapshot-filter.js.map +1 -0
  159. package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.d.ts.map +1 -0
  160. package/dist/drivers/web/tools/snapshot-filter/tree-reconstructor.js.map +1 -0
  161. package/dist/drivers/web/tools/snapshot-service.d.ts +31 -0
  162. package/dist/drivers/web/tools/snapshot-service.d.ts.map +1 -0
  163. package/dist/{tools/browser → drivers/web/tools}/snapshot-service.js +36 -7
  164. package/dist/drivers/web/tools/snapshot-service.js.map +1 -0
  165. package/dist/drivers/web/tools/tool.d.ts +76 -0
  166. package/dist/drivers/web/tools/tool.d.ts.map +1 -0
  167. package/dist/drivers/web/tools/tool.js +562 -0
  168. package/dist/drivers/web/tools/tool.js.map +1 -0
  169. package/dist/drivers/web/tools/transient-state-tracker.d.ts +26 -0
  170. package/dist/drivers/web/tools/transient-state-tracker.d.ts.map +1 -0
  171. package/dist/{tools/browser → drivers/web/tools}/transient-state-tracker.js +54 -19
  172. package/dist/drivers/web/tools/transient-state-tracker.js.map +1 -0
  173. package/dist/drivers/web/tools/types.d.ts +11 -0
  174. package/dist/drivers/web/tools/types.d.ts.map +1 -0
  175. package/dist/drivers/web/tools/types.js +2 -0
  176. package/dist/drivers/web/tools/types.js.map +1 -0
  177. package/dist/evidence/atomic-file.d.ts +23 -0
  178. package/dist/evidence/atomic-file.d.ts.map +1 -0
  179. package/dist/evidence/atomic-file.js +104 -0
  180. package/dist/evidence/atomic-file.js.map +1 -0
  181. package/dist/evidence/layout.d.ts +30 -0
  182. package/dist/evidence/layout.d.ts.map +1 -0
  183. package/dist/evidence/layout.js +152 -0
  184. package/dist/evidence/layout.js.map +1 -0
  185. package/dist/evidence/retention.d.ts +5 -0
  186. package/dist/evidence/retention.d.ts.map +1 -0
  187. package/dist/evidence/retention.js +10 -0
  188. package/dist/evidence/retention.js.map +1 -0
  189. package/dist/evidence/store.d.ts +101 -0
  190. package/dist/evidence/store.d.ts.map +1 -0
  191. package/dist/evidence/store.js +375 -0
  192. package/dist/evidence/store.js.map +1 -0
  193. package/dist/evidence/terminal-finalizer.d.ts +19 -0
  194. package/dist/evidence/terminal-finalizer.d.ts.map +1 -0
  195. package/dist/evidence/terminal-finalizer.js +56 -0
  196. package/dist/evidence/terminal-finalizer.js.map +1 -0
  197. package/dist/index.d.ts +8 -1
  198. package/dist/index.d.ts.map +1 -1
  199. package/dist/index.js +11 -1
  200. package/dist/index.js.map +1 -1
  201. package/dist/logging/invocation-logger.d.ts +4 -0
  202. package/dist/logging/invocation-logger.d.ts.map +1 -0
  203. package/dist/logging/invocation-logger.js +25 -0
  204. package/dist/logging/invocation-logger.js.map +1 -0
  205. package/dist/logging/types.d.ts +8 -0
  206. package/dist/logging/types.d.ts.map +1 -0
  207. package/dist/logging/types.js +7 -0
  208. package/dist/logging/types.js.map +1 -0
  209. package/dist/redaction/diagnostic-sanitizer.d.ts +7 -0
  210. package/dist/redaction/diagnostic-sanitizer.d.ts.map +1 -0
  211. package/dist/redaction/diagnostic-sanitizer.js +42 -0
  212. package/dist/redaction/diagnostic-sanitizer.js.map +1 -0
  213. package/dist/redaction/redactor.d.ts +40 -0
  214. package/dist/redaction/redactor.d.ts.map +1 -0
  215. package/dist/redaction/redactor.js +176 -0
  216. package/dist/redaction/redactor.js.map +1 -0
  217. package/dist/redaction/scrub.d.ts +29 -0
  218. package/dist/redaction/scrub.d.ts.map +1 -0
  219. package/dist/redaction/scrub.js +54 -0
  220. package/dist/redaction/scrub.js.map +1 -0
  221. package/dist/runtime/config.d.ts +15 -0
  222. package/dist/runtime/config.d.ts.map +1 -0
  223. package/dist/runtime/config.js +2 -0
  224. package/dist/runtime/config.js.map +1 -0
  225. package/dist/runtime/driver-boundary.d.ts +16 -0
  226. package/dist/runtime/driver-boundary.d.ts.map +1 -0
  227. package/dist/runtime/driver-boundary.js +71 -0
  228. package/dist/runtime/driver-boundary.js.map +1 -0
  229. package/dist/runtime/driver-session.d.ts +9 -0
  230. package/dist/runtime/driver-session.d.ts.map +1 -0
  231. package/dist/runtime/driver-session.js +64 -0
  232. package/dist/runtime/driver-session.js.map +1 -0
  233. package/dist/runtime/internal-step-evidence.d.ts +30 -0
  234. package/dist/runtime/internal-step-evidence.d.ts.map +1 -0
  235. package/dist/runtime/internal-step-evidence.js +82 -0
  236. package/dist/runtime/internal-step-evidence.js.map +1 -0
  237. package/dist/runtime/result-adapter.d.ts +9 -0
  238. package/dist/runtime/result-adapter.d.ts.map +1 -0
  239. package/dist/runtime/result-adapter.js +77 -0
  240. package/dist/runtime/result-adapter.js.map +1 -0
  241. package/dist/runtime/runner.d.ts +35 -88
  242. package/dist/runtime/runner.d.ts.map +1 -1
  243. package/dist/runtime/runner.js +60 -74
  244. package/dist/runtime/runner.js.map +1 -1
  245. package/dist/runtime/scenario-control.d.ts +40 -0
  246. package/dist/runtime/scenario-control.d.ts.map +1 -0
  247. package/dist/runtime/scenario-control.js +94 -0
  248. package/dist/runtime/scenario-control.js.map +1 -0
  249. package/dist/runtime/scenario-runner.d.ts +39 -0
  250. package/dist/runtime/scenario-runner.d.ts.map +1 -0
  251. package/dist/runtime/scenario-runner.js +273 -0
  252. package/dist/runtime/scenario-runner.js.map +1 -0
  253. package/dist/runtime/scenario-state.d.ts +55 -0
  254. package/dist/runtime/scenario-state.d.ts.map +1 -0
  255. package/dist/runtime/scenario-state.js +128 -0
  256. package/dist/runtime/scenario-state.js.map +1 -0
  257. package/dist/runtime/step-execution.d.ts +24 -14
  258. package/dist/runtime/step-execution.d.ts.map +1 -1
  259. package/dist/runtime/step-execution.js +130 -36
  260. package/dist/runtime/step-execution.js.map +1 -1
  261. package/dist/runtime/text.d.ts +10 -0
  262. package/dist/runtime/text.d.ts.map +1 -0
  263. package/dist/runtime/text.js +25 -0
  264. package/dist/runtime/text.js.map +1 -0
  265. package/dist/runtime/types.d.ts +50 -76
  266. package/dist/runtime/types.d.ts.map +1 -1
  267. package/dist/runtime/usage-tracker.d.ts +37 -0
  268. package/dist/runtime/usage-tracker.d.ts.map +1 -0
  269. package/dist/runtime/usage-tracker.js +110 -0
  270. package/dist/runtime/usage-tracker.js.map +1 -0
  271. package/dist/tools/define-agent-tool.d.ts +3 -28
  272. package/dist/tools/define-agent-tool.d.ts.map +1 -1
  273. package/dist/tools/define-agent-tool.js +3 -28
  274. package/dist/tools/define-agent-tool.js.map +1 -1
  275. package/dist/tools/dispatcher.d.ts +11 -3
  276. package/dist/tools/dispatcher.d.ts.map +1 -1
  277. package/dist/tools/dispatcher.js +50 -8
  278. package/dist/tools/dispatcher.js.map +1 -1
  279. package/dist/tools/registry.d.ts +8 -10
  280. package/dist/tools/registry.d.ts.map +1 -1
  281. package/dist/tools/registry.js +19 -11
  282. package/dist/tools/registry.js.map +1 -1
  283. package/dist/tools/step/result-tool.d.ts.map +1 -1
  284. package/dist/tools/step/result-tool.js +8 -6
  285. package/dist/tools/step/result-tool.js.map +1 -1
  286. package/dist/tools/tool-contract.d.ts +1 -1
  287. package/dist/tools/tool-contract.d.ts.map +1 -1
  288. package/dist/tools/tool-contract.js.map +1 -1
  289. package/dist/tools/types.d.ts +77 -6
  290. package/dist/tools/types.d.ts.map +1 -1
  291. package/dist/tools/types.js.map +1 -1
  292. package/docs/CLI.md +59 -0
  293. package/docs/CONFIGURATION.md +91 -0
  294. package/docs/DRIVERS.md +75 -0
  295. package/docs/EVIDENCE.md +62 -0
  296. package/package.json +51 -59
  297. package/schemas/checkmate-config.v1.json +176 -0
  298. package/schemas/describe-result.v1.json +414 -0
  299. package/schemas/driver-descriptor.v1.json +66 -0
  300. package/schemas/run-request.v1.json +67 -0
  301. package/schemas/run-result.v1.json +333 -0
  302. package/schemas/validation-result.v1.json +86 -0
  303. package/dist/ai/response-processor.d.ts +0 -20
  304. package/dist/ai/response-processor.d.ts.map +0 -1
  305. package/dist/ai/response-processor.js +0 -62
  306. package/dist/ai/response-processor.js.map +0 -1
  307. package/dist/ai/token-pricing.d.ts +0 -13
  308. package/dist/ai/token-pricing.d.ts.map +0 -1
  309. package/dist/ai/token-pricing.js +0 -348
  310. package/dist/ai/token-pricing.js.map +0 -1
  311. package/dist/ai/token-tracker.d.ts +0 -33
  312. package/dist/ai/token-tracker.d.ts.map +0 -1
  313. package/dist/ai/token-tracker.js +0 -138
  314. package/dist/ai/token-tracker.js.map +0 -1
  315. package/dist/cli/create-examples.d.ts +0 -21
  316. package/dist/cli/create-examples.d.ts.map +0 -1
  317. package/dist/cli/create-examples.js +0 -116
  318. package/dist/cli/create-examples.js.map +0 -1
  319. package/dist/cli.d.ts +0 -15
  320. package/dist/cli.d.ts.map +0 -1
  321. package/dist/cli.js +0 -69
  322. package/dist/cli.js.map +0 -1
  323. package/dist/config/runtime-config.d.ts +0 -21
  324. package/dist/config/runtime-config.d.ts.map +0 -1
  325. package/dist/config/runtime-config.js +0 -98
  326. package/dist/config/runtime-config.js.map +0 -1
  327. package/dist/core.d.ts +0 -8
  328. package/dist/core.d.ts.map +0 -1
  329. package/dist/core.js +0 -4
  330. package/dist/core.js.map +0 -1
  331. package/dist/integrations/salesforce/authenticator.d.ts +0 -27
  332. package/dist/integrations/salesforce/authenticator.d.ts.map +0 -1
  333. package/dist/integrations/salesforce/authenticator.js +0 -27
  334. package/dist/integrations/salesforce/authenticator.js.map +0 -1
  335. package/dist/integrations/salesforce/cli-handler.d.ts +0 -14
  336. package/dist/integrations/salesforce/cli-handler.d.ts.map +0 -1
  337. package/dist/integrations/salesforce/cli-handler.js +0 -50
  338. package/dist/integrations/salesforce/cli-handler.js.map +0 -1
  339. package/dist/logging/index.d.ts +0 -2
  340. package/dist/logging/index.d.ts.map +0 -1
  341. package/dist/logging/index.js +0 -4
  342. package/dist/logging/index.js.map +0 -1
  343. package/dist/logging/logger.d.ts +0 -5
  344. package/dist/logging/logger.d.ts.map +0 -1
  345. package/dist/logging/logger.js +0 -15
  346. package/dist/logging/logger.js.map +0 -1
  347. package/dist/playwright.d.ts +0 -102
  348. package/dist/playwright.d.ts.map +0 -1
  349. package/dist/playwright.js +0 -116
  350. package/dist/playwright.js.map +0 -1
  351. package/dist/runtime/extension.d.ts +0 -274
  352. package/dist/runtime/extension.d.ts.map +0 -1
  353. package/dist/runtime/extension.js +0 -171
  354. package/dist/runtime/extension.js.map +0 -1
  355. package/dist/salesforce.d.ts +0 -71
  356. package/dist/salesforce.d.ts.map +0 -1
  357. package/dist/salesforce.js +0 -73
  358. package/dist/salesforce.js.map +0 -1
  359. package/dist/tools/browser/screenshot-service.d.ts.map +0 -1
  360. package/dist/tools/browser/screenshot-service.js.map +0 -1
  361. package/dist/tools/browser/snapshot-filter/index.d.ts.map +0 -1
  362. package/dist/tools/browser/snapshot-filter/index.js.map +0 -1
  363. package/dist/tools/browser/snapshot-filter/semantic-scorer.d.ts.map +0 -1
  364. package/dist/tools/browser/snapshot-filter/semantic-scorer.js.map +0 -1
  365. package/dist/tools/browser/snapshot-filter/snapshot-filter.d.ts +0 -4
  366. package/dist/tools/browser/snapshot-filter/snapshot-filter.d.ts.map +0 -1
  367. package/dist/tools/browser/snapshot-filter/snapshot-filter.js +0 -57
  368. package/dist/tools/browser/snapshot-filter/snapshot-filter.js.map +0 -1
  369. package/dist/tools/browser/snapshot-filter/tree-reconstructor.d.ts.map +0 -1
  370. package/dist/tools/browser/snapshot-filter/tree-reconstructor.js.map +0 -1
  371. package/dist/tools/browser/snapshot-service.d.ts +0 -19
  372. package/dist/tools/browser/snapshot-service.d.ts.map +0 -1
  373. package/dist/tools/browser/snapshot-service.js.map +0 -1
  374. package/dist/tools/browser/tool.d.ts +0 -34
  375. package/dist/tools/browser/tool.d.ts.map +0 -1
  376. package/dist/tools/browser/tool.js +0 -226
  377. package/dist/tools/browser/tool.js.map +0 -1
  378. package/dist/tools/browser/transient-state-tracker.d.ts +0 -16
  379. package/dist/tools/browser/transient-state-tracker.d.ts.map +0 -1
  380. package/dist/tools/browser/transient-state-tracker.js.map +0 -1
  381. package/dist/tools/salesforce/login-tool.d.ts +0 -7
  382. package/dist/tools/salesforce/login-tool.d.ts.map +0 -1
  383. package/dist/tools/salesforce/login-tool.js +0 -25
  384. package/dist/tools/salesforce/login-tool.js.map +0 -1
  385. package/docs/EXTENSIONS.md +0 -232
  386. package/docs/GUIDE.md +0 -465
  387. package/docs/ROADMAP.md +0 -47
  388. package/playwright.config.ts +0 -39
  389. package/test/examples/salesforce/trial-dev-org.spec.ts +0 -82
  390. package/test/examples/web/website-testing.spec.ts +0 -281
  391. /package/dist/{tools/browser → drivers/web/tools}/screenshot-service.js +0 -0
  392. /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/index.d.ts +0 -0
  393. /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/index.js +0 -0
  394. /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/semantic-scorer.d.ts +0 -0
  395. /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/semantic-scorer.js +0 -0
  396. /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/tree-reconstructor.d.ts +0 -0
  397. /package/dist/{tools/browser → drivers/web/tools}/snapshot-filter/tree-reconstructor.js +0 -0
package/docs/GUIDE.md DELETED
@@ -1,465 +0,0 @@
1
- # **_checkmate_** docs
2
-
3
- Technical documentation for **_checkmate_** - AI test automation with Playwright.
4
-
5
- ## Table of Contents
6
-
7
- - [Core Concepts](#core-concepts)
8
- - [Configuration Reference](#configuration-reference)
9
- - [Writing Effective Tests](#writing-effective-tests)
10
- - [Cost Management](#cost-management)
11
- - [Web Extension](#web-extension)
12
- - [Salesforce Extension](#salesforce-extension)
13
- - [Test Reports](#test-reports)
14
- - [Troubleshooting](#troubleshooting)
15
- - [Architecture](#architecture)
16
- - [Advanced Topics](#advanced-topics)
17
-
18
- ## Core Concepts
19
-
20
- **_checkmate_** is an AI-driven test runner. You describe a step in natural language, **_checkmate_** runs a tool loop, and the step passes or fails based on the observed result.
21
-
22
- Main building blocks:
23
-
24
- - **Runner**: The object that executes steps. The main API entry point is `createRunner()` from `@xoxoai/checkmate/core`.
25
- - **Step**: A plain object with `action` and `expect`. This is the main unit of execution.
26
- - **Extensions**: Composable modules that add tools and runtime behavior. Built-ins include `web()` and `salesforce()`.
27
- - **Fixtures**: Convenience [Playwright](https://playwright.dev/docs/test-fixtures) entry points that provide an `ai` runner in tests.
28
-
29
- Published entry points:
30
-
31
- - `@xoxoai/checkmate/core`: Build your own runner with extensions.
32
- - `@xoxoai/checkmate/playwright`: Use the built-in web extension with Playwright `test` and `expect`.
33
- - `@xoxoai/checkmate/salesforce`: Use the built-in web + Salesforce extensions with the same `ai` fixture shape.
34
-
35
- Most users start here:
36
-
37
- ```typescript
38
- import { test } from '@xoxoai/checkmate/playwright'
39
-
40
- test('search flow', async ({ ai }) => {
41
- await ai.run({
42
- action: `Type 'documentation' in the search bar and press Enter`,
43
- expect: `At least 5 search results are displayed`,
44
- })
45
- })
46
- ```
47
-
48
- ## Configuration Reference
49
-
50
- Tests are managed in [Playwright's](https://playwright.dev/docs/test-configuration) standard [config](playwright.config.ts).
51
-
52
- ### AI API Settings
53
-
54
- | Variable | Default | Description |
55
- | --------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
56
- | `OPENAI_API_KEY` | - | **Required** - Your OpenAI API key (or compatible provider) |
57
- | `OPENAI_BASE_URL` | - | Optional - Override for compatible providers (Claude, Gemini, local LLMs) |
58
- | `OPENAI_MODEL` | `gpt-5-mini` | Model: gpt-5, gemini-2.5-flash, claude-4-5-sonnet etc. |
59
- | `OPENAI_TEMPERATURE` | `1.0` | Creativity (below 0.5 = deterministic, above 0.5 = creative) |
60
- | `OPENAI_REASONING_EFFORT` | - | Optional - Reasoning effort for models: low, medium, high |
61
- | `OPENAI_TIMEOUT_SECONDS` | `60` | API request timeout in seconds |
62
- | `OPENAI_API_RATE_LIMIT_DELAY_SECONDS` | `0` | Optional fixed delay before each API call, useful when your provider is sensitive to burst traffic |
63
- | `OPENAI_RETRY_MAX_ATTEMPTS` | `3` | Max retries with backoff (1s, 10s, 60s) for rate limits and server errors |
64
- | `OPENAI_TOOL_CHOICE` | `required` | Tool choice: auto, required, none |
65
- | `OPENAI_ALLOWED_TOOLS` | - | Comma-separated list of allowed tools (if not set, all tools available) |
66
- | `OPENAI_INCLUDE_SCREENSHOT_IN_SNAPSHOT` | `false` | Include compressed screenshots in snapshot responses |
67
- | `OPENAI_API_TOKEN_BUDGET_USD` | - | Optional - USD budget for total OpenAI API spend per test run. Only positive decimal values are enforced. |
68
- | `OPENAI_API_TOKEN_BUDGET_COUNT` | - | Optional - Token count limit for total tokens per test run. Only positive integers are enforced. |
69
- | `OPENAI_LOOP_MAX_REPETITIONS` | `5` | Number of repetitive tool call patterns to detect before triggering loop recovery with random temperature |
70
- | `CHECKMATE_LOG_LEVEL` | `off` | Logging verbosity: debug, info, warn, error, off |
71
- | `CHECKMATE_SNAPSHOT_FILTERING` | `false` | Enable semantic page snapshot filtering before requests are sent to the model |
72
-
73
- ## Writing Effective Tests
74
-
75
- ### Best Practices
76
-
77
- 1. **Be Specific** - Clear expectations help the AI validate success
78
- 2. **One Action Per Step** - Break complex flows into discrete steps
79
- 3. **Include Context** - Mention relevant UI elements and expected behavior
80
- 4. **Add Timing Hints** - For slow operations, mention expected wait times
81
- 5. **Handle Popups** - Explicitly mention consent dialogs or modals
82
-
83
- ### Basic Example
84
-
85
- ```typescript
86
- import { expect, test } from '@xoxoai/checkmate/playwright'
87
-
88
- test('search for playwright documentation', async ({ page, ai }) => {
89
- await test.step('Navigate to Google', async () => {
90
- await ai.run({
91
- action: `Open the browser and navigate to google.com`,
92
- expect: `google.com is loaded and the search bar is visible`,
93
- })
94
- })
95
-
96
- await test.step('Search for Playwright', async () => {
97
- await ai.run({
98
- action: `Type 'playwright test automation' in the search bar and press Enter`,
99
- expect: `Search results contain the playwright.dev link`,
100
- })
101
- })
102
-
103
- await expect(page.getByRole('link', { name: /playwright/i }).first()).toBeVisible()
104
- })
105
- ```
106
-
107
- ### Complex Interactions
108
-
109
- ```typescript
110
- await test.step('Fill form and submit', async () => {
111
- await ai.run({
112
- action: `
113
- Wait for the newsletter popup (takes ~30 seconds),
114
- then close it by clicking the X button.
115
- Scroll to the comment section and click to activate it.
116
- Type 'Great article!' into the comment textarea.
117
- Click the Submit button.
118
- `,
119
- expect: `
120
- The comment is submitted,
121
- and either a success message appears
122
- or a login form is displayed if not authenticated.
123
- `,
124
- })
125
- })
126
- ```
127
-
128
- ### Programmatic Composition
129
-
130
- Use `@xoxoai/checkmate/core` when you want to build your own runner explicitly:
131
-
132
- ```typescript
133
- import { createRunner } from '@xoxoai/checkmate/core'
134
- import { web } from '@xoxoai/checkmate/playwright'
135
- import { jira, notion, database } from 'your-own-extension-examples'
136
-
137
- const ai = createRunner({
138
- extensions: [web({ page }), jira(), notion(), database()],
139
- })
140
- ```
141
-
142
- ## Cost Management
143
-
144
- **_checkmate_** includes built-in token usage monitoring:
145
-
146
- ```json
147
- {
148
- "response input": "2543 @ $0.00$",
149
- "response output": "456 @ $0.00$",
150
- "history (estimated)": 45234,
151
- "step input": "5123 @ $0.00$",
152
- "step output": "892 @ $0.00$",
153
- "test input": "25678 @ $0.01$",
154
- "test output": "4521 @ $0.01$"
155
- }
156
- ```
157
-
158
- ### Cost Optimization Features
159
-
160
- 1. **Smart Snapshots** - Instead of full HTML, only the ARIA accessibility tree is sent to the AI
161
- 2. **History Filtering** - Continuously filters old page snapshots (reduces token usage by up to 50%)
162
- 3. **Snapshot Minification** - Removes unnecessary whitespace and quotes from ARIA snapshots
163
- 4. **Snapshot Filtering** - Local semantic filtering of page snapshots using the current step description (reduces token usage by up to 90%)
164
- 5. **Screenshots** - Normalized and compressed locally, helps vision models understand UI better
165
- 6. **Chat Recycling** - New session per step to prevent context bloat and isolation
166
- 7. **Token Counting** - Real-time usage tracking per step and test with budgets
167
- 8. **Loop Detection** - Detects and mitigates repetitive tool call patterns, preventing AI runaway costs
168
-
169
- ### Budgeting & Cost Limits
170
-
171
- You can set one or both token budget environment variables to enforce limits during a single test run.
172
-
173
- - `OPENAI_API_TOKEN_BUDGET_USD` — Sets a USD budget (e.g. 0.50) per test execution. The framework checks the current estimated cost (input+output tokens) and throws an error if the budget is exceeded.
174
- - `OPENAI_API_TOKEN_BUDGET_COUNT` — Sets a token limit (e.g. 100000). The framework tracks input and output tokens across the test and throws an error when the total exceeds this limit.
175
-
176
- Notes:
177
-
178
- - Only positive numbers are enforced; `0` or non-positive values are effectively treated as disabled.
179
- - If the env var is unset or invalid (non-number), it is ignored.
180
-
181
- ### Using Snapshot Filtering for Token Optimization
182
-
183
- When snapshot filtering is enabled, **_checkmate_** scores the page snapshot locally with a semantic embedding model and keeps the most relevant branches of the accessibility tree.
184
-
185
- Default behavior:
186
-
187
- - Build one query from `action + expect`
188
- - Score snapshot keys and string leaves against that query
189
- - If `search` is provided on the step, use those keywords instead of semantic `action + expect`
190
- - Keep the top `10%` of scored elements by default
191
- - If top-percent selection yields nothing, fall back to hard threshold `0.3`
192
-
193
- **This feature significantly reduces the payload size, minimizing costs while improving AI determinism, reliability and speed.**
194
-
195
- ```typescript
196
- await ai.run({
197
- action: `Click on the link that leads to playwright.dev`,
198
- expect: `The playwright.dev homepage is displayed`,
199
-
200
- // optional snapshot filtering override
201
- topPercent: 20,
202
- })
203
- ```
204
-
205
- ```
206
- debug: Scored 107 elements
207
- debug: Filtered to 21 elements from top 20%
208
- debug: Reduced snapshot from 4283 to 326 chars (92% reduction)
209
- ```
210
-
211
- Feature is controlled by the `CHECKMATE_SNAPSHOT_FILTERING` environment variable (default: `false`). Set it explicitly to `true` to enable filtering. `search` is now an explicit keyword query override, and `topPercent` lets you tune how much of the scored snapshot should be kept for a specific step.
212
-
213
- The model can still request a full snapshot with the browser snapshot tool if the filtered tree is insufficient, so steps should not fail just because the initial snapshot was compact.
214
-
215
- For optimal results, write concrete `action` and `expect` text. Use `topPercent` as a real percentage from `1` to `100` when you need to keep more or less of the scored snapshot. Optional `search` terms still help when you want direct keyword control.
216
-
217
- **Tips for effective step text:**
218
-
219
- - Include relevant UI element types (button, input, link, checkbox, etc.)
220
- - Include key text that appears on the page
221
- - Include action-related terms (search, filter, submit, etc.)
222
- - Keep the step focused on one user intent
223
- - Use `topPercent` only when you need to tune how aggressively snapshot content is pruned
224
-
225
- ### Estimated Costs
226
-
227
- **Gemini-2.5-flash / GPT-5-mini**:
228
-
229
- - Simple test (~5 steps): ~$0.01 - $0.05
230
- - Complex test (~20 steps): ~$0.10 - $0.40
231
- - Full E2E suite (~50 complex tests): ~$5.00 - $20.00
232
-
233
- **GPT-OSS-20B via groq**:
234
-
235
- - Simple test (~5 steps): ~$0.001 - $0.01
236
- - Complex test (~20 steps): ~$0.01 - $0.05
237
- - Full E2E suite (~50 complex tests): ~$1.00 - $2.00
238
-
239
- _Costs vary based on model, screenshot size and count, and page complexity_
240
-
241
- ## Web Extension
242
-
243
- `@xoxoai/checkmate/playwright` is the pre-built web entry point. It composes the core runner with the built-in `web()` extension and exposes a Playwright-friendly `ai` fixture.
244
-
245
- What it adds:
246
-
247
- - browser tools for navigation and interaction
248
- - initial page snapshots and optional screenshots
249
- - `test`, `expect`, `web()`, and `createPlaywrightRunner(page)` exports
250
-
251
- ```typescript
252
- import { test } from '@xoxoai/checkmate/playwright'
253
-
254
- test('search flow', async ({ ai }) => {
255
- await ai.run({
256
- action: 'Search for playwright documentation',
257
- expect: 'Search results are displayed',
258
- })
259
- })
260
- ```
261
-
262
- ## Salesforce Extension
263
-
264
- `@xoxoai/checkmate/salesforce` builds on the web extension. It adds Salesforce-specific tools and keeps the same `ai` fixture shape as the Playwright entry point.
265
-
266
- What it adds:
267
-
268
- - the built-in `salesforce()` extension
269
- - `test`, `expect`, and `createSalesforceRunner(page)` exports
270
- - the `login_to_salesforce_org` tool backed by the Salesforce CLI
271
-
272
- Prerequisites:
273
-
274
- ```bash
275
- # Install Salesforce CLI
276
- npm install -g @salesforce/cli
277
-
278
- # Authenticate to your org and set is as default
279
- sf org login web --alias my-checkmate-org --set-default
280
- ```
281
-
282
- ```typescript
283
- import { test } from '@xoxoai/checkmate/salesforce'
284
-
285
- test('create and configure itinerary', async ({ ai }) => {
286
- await test.step('Login to Salesforce', async () => {
287
- await ai.run({
288
- action: 'Login to Salesforce org and open Test QA Application',
289
- expect: 'Test QA homepage is displayed',
290
- })
291
- })
292
- })
293
- ```
294
-
295
- The `login_to_salesforce_org` tool handles the authentication flow by retrieving a front-door URL from the authenticated SF CLI session and navigating the browser for you.
296
-
297
- ## Test Reports
298
-
299
- Multiple report formats are generated after each run:
300
-
301
- - **HTML Report**: `test-reports/html/index.html` (interactive - no screenshots/video yet though)
302
- - **JUnit XML**: `test-reports/junit/results.xml` (CI/CD integration)
303
- - **Console Output**: Real-time step results and token usage
304
-
305
- ```bash
306
- # Open HTML report in browser
307
- npx playwright show-report test-reports/html
308
- ```
309
-
310
- ## Troubleshooting
311
-
312
- ### AI makes incorrect decisions
313
-
314
- **Symptoms**: The AI clicks wrong elements, misinterprets the page, or fails to complete actions correctly.
315
-
316
- **Solutions**:
317
-
318
- - Provide more precise descriptions in `action` and more focused assertions in `expect`
319
- - Reference specific element identifiers and roles (for example: text, label, button, list)
320
- - Break complex workflows into single-action steps; use a step-by-step approach
321
-
322
- ### Tests loop during step execution
323
-
324
- **Symptoms**: The AI repeats the same actions or gets stuck in a loop, consuming tokens unnecessarily.
325
-
326
- **Solutions**:
327
-
328
- - Increase `OPENAI_TEMPERATURE` to encourage exploration
329
- - Use a reasoning/thinking model (if available) to improve planning and avoid repetitive loops
330
-
331
- ### High token costs
332
-
333
- **Symptoms**: Tests consume more tokens than expected, leading to high API costs.
334
-
335
- **Solutions**:
336
-
337
- - Set a lower reasoning effort: `OPENAI_REASONING_EFFORT`
338
- - Consider disabling `OPENAI_INCLUDE_SCREENSHOT_IN_SNAPSHOT`
339
- - Use a cheaper model, lower-end models often perform well (e.g., `gemini-2.5-flash-lite` or `gpt-5-nano`)
340
-
341
- ### Rate limiting errors
342
-
343
- **Symptoms**: API calls fail with 429 errors or rate limit messages.
344
-
345
- **Solutions**:
346
-
347
- - The framework automatically retries with backoff (1s, 10s, 60s)
348
- - Upgrade your API plan with your provider
349
- - Reduce concurrent test execution
350
- - Increase `OPENAI_TIMEOUT_SECONDS` if needed
351
-
352
- ### Timeout errors
353
-
354
- **Symptoms**: Tests fail with timeout errors before completing actions.
355
-
356
- **Solutions**:
357
-
358
- - Increase `OPENAI_TIMEOUT_SECONDS` in your `.env` file
359
- - Mention expected wait times in your action descriptions
360
- - Break long-running actions into smaller steps
361
-
362
- ## Architecture
363
-
364
- **_checkmate_** combines multiple components to enable AI-driven test automation:
365
-
366
- ```
367
- @xoxoai/checkmate/core
368
- │
369
- ├── createRunner({ extensions })
370
- ├── runtime/
371
- │ ├── CheckmateRunner
372
- │ ├── StepExecution
373
- │ └── ExtensionHost
374
- │
375
- ├── ai/
376
- │ ├── AiClient
377
- │ ├── ResponseProcessor
378
- │ ├── MessageHistory
379
- │ └── TokenTracker
380
- │
381
- ├── tools/
382
- │ └── step/
383
- │ └── StepResultTools
384
- │
385
- ├── @xoxoai/checkmate/playwright
386
- │ └── web()
387
- │ ├── BrowserToolRuntime
388
- │ ├── SnapshotService
389
- │ └── Browser tools
390
- │
391
- └── @xoxoai/checkmate/salesforce
392
- └── salesforce()
393
- ├── SalesforceTools
394
- └── Salesforce CLI integration
395
- ```
396
-
397
- ### Key Components
398
-
399
- **Test Layer**
400
-
401
- - Playwright Test framework manages test execution, reporting, and fixtures
402
- - Tests written in natural language via `ai.run()` fixtures
403
-
404
- **Core Engine**
405
-
406
- - **createRunner**: Public composition entry point for building runners from extensions
407
- - **CheckmateRunner**: Runtime instance returned by `createRunner`
408
- - **AiClient**: Manages model interactions, retries, and tool-calling requests
409
- - **Response Processor**: Handles tool responses, append-only history, and retries through the step loop
410
- - **ExtensionHost**: Registers tools, instructions, step context builders, and post-tool hooks from extensions
411
- - **Tool Registry**: Owns Zod-defined tool declarations and explicit tool resolution
412
-
413
- **Tools**
414
-
415
- - **Core Tools**: Step control (pass/fail step assertions)
416
- - **Web Extension**: Playwright-powered browser tools, snapshots, and screenshots
417
- - **Salesforce Extension**: SF CLI login flow layered on top of the web extension
418
-
419
- **Cost Optimization**
420
-
421
- - Token tracking with budget enforcement
422
- - History filtering (removes old snapshots)
423
- - Snapshot minification and screenshot compression
424
- - Loop detection and mitigation
425
-
426
- **Configuration**
427
-
428
- - Test, Reporting and Browser settings: [playwright.config.ts](../playwright.config.ts)
429
- - API & AI settings: `.env` file
430
-
431
- ## Advanced Topics
432
-
433
- ### Custom Tool Integration
434
-
435
- For custom tools, extensions, built-in extension composition, and custom runners, see the dedicated [Extensions guide](./EXTENSIONS.md).
436
-
437
- ### Performance Optimization
438
-
439
- For large test suites:
440
-
441
- - Use faster models for simple tests (e.g., `gemini-3-flash-preview` or `gpt-5-mini`)
442
- - Set token budgets to prevent runaway costs
443
- - Disable screenshots in snapshots when visual context isn't needed
444
- - Consider parallel test execution with Playwright's workers
445
-
446
- ### CI/CD Integration
447
-
448
- **_checkmate_** generates JUnit XML reports compatible with most CI/CD systems:
449
-
450
- ```yaml
451
- # Example GitHub Actions
452
- - name: Run Tests
453
- run: npm test
454
-
455
- - name: Upload Reports
456
- uses: actions/upload-artifact@v3
457
- with:
458
- name: test-reports
459
- path: test-reports/
460
- ```
461
-
462
- ## See Also
463
-
464
- - [EXTENSIONS](./EXTENSIONS.md)
465
- - [README](../README.md)
package/docs/ROADMAP.md DELETED
@@ -1,47 +0,0 @@
1
- # Roadmap
2
-
3
- ## Current State:
4
-
5
- - ✅ Extension-composed runtime via `createRunner({ extensions })`
6
- - ✅ Clear top-level module boundaries: `runtime`, `ai`, `tools`, `integrations`, `config`, `logging`
7
- - ✅ Explicit tool registration and dispatch
8
- - ✅ Browser snapshot filtering with semantic scoring
9
- - ✅ Token tracking, retry handling, loop detection, and screenshot support
10
- - ✅ Salesforce login integration through the SF CLI
11
- - ✅ Published subpath entry points for `@xoxoai/checkmate/core`, `@xoxoai/checkmate/playwright`, and `@xoxoai/checkmate/salesforce`
12
-
13
- ## Near Term
14
-
15
- Focus: Stability, extension points, and better contributor ergonomics.
16
-
17
- - ✅ Custom tool registration API for external integrations
18
- - ✅ Better public examples for programmatic runner usage
19
- - ✅ Publishable npm package layout with dedicated `core`, `playwright`, and `salesforce` entry points
20
- - [ ] Visual interactions (click, drag, etc.) in the Playwright extension
21
- - [ ] Snapshot filtering tuning hooks beyond top-percent selection
22
- - [ ] Better reporting around filtered snapshot size and selected branches
23
-
24
- ## Mid Term
25
-
26
- Focus: Product usability and broader workflow support.
27
-
28
- - [ ] UI layer for recording, editing, and replaying AI-driven steps
29
- - [ ] Flow-level execution mode for multi-step business journeys
30
- - [ ] Richer debugging output for model/tool reasoning failures
31
- - [ ] Better parallel execution support across large suites
32
-
33
- ## Long Term
34
-
35
- Focus: Production hardening and ecosystem.
36
-
37
- - [ ] Stronger observability and explainable AI
38
- - [ ] Test generation from specs and recorded user behavior
39
- - [ ] Advanced reporting with AI-assisted failure summaries
40
- - [ ] Enterprise-focused environment and secret management support
41
-
42
- ## Ongoing Research
43
-
44
- - 🔄 Faster local retrieval/filtering for very large page snapshots
45
- - 🔄 Hybrid semantic plus structural ranking for element selection
46
- - 🔄 Multi-agent execution models for planning and validation
47
- - 🔄 Confidence signals for tool selection and assertions
@@ -1,39 +0,0 @@
1
- import { defineConfig } from '@playwright/test'
2
- import { config as envConfig } from 'dotenv'
3
-
4
- envConfig({ quiet: true })
5
-
6
- export default defineConfig({
7
- projects: [
8
- {
9
- name: 'salesforce',
10
- testDir: './test/examples/salesforce',
11
- },
12
- {
13
- name: 'web',
14
- testDir: './test/examples/web',
15
- },
16
- ],
17
- outputDir: process.env.CI ? undefined : './test-reports/results',
18
- reporter: [
19
- ['junit', { outputFile: './test-reports/junit/results.xml' }],
20
- ['html', { outputFolder: './test-reports/html' }],
21
- ['list'],
22
- ],
23
- timeout: 10 * 60000,
24
- repeatEach: 1,
25
- retries: 1,
26
- workers: 1,
27
- expect: {
28
- timeout: 1 * 10000,
29
- },
30
- use: {
31
- viewport: { width: 1360, height: 768 },
32
- browserName: 'chromium',
33
- actionTimeout: 1 * 5000,
34
- navigationTimeout: 1 * 30000,
35
- screenshot: 'only-on-failure',
36
- trace: 'retain-on-failure',
37
- video: 'on',
38
- },
39
- })
@@ -1,82 +0,0 @@
1
- /**
2
- * @fileoverview
3
- * Playwright E2E test for Salesforce Developer org.
4
- *
5
- * @summary
6
- * Example of a multi-step test that creates a new Account record in the Sales app.
7
- *
8
- * @description
9
- * This test automates the following user journey in a Salesforce Developer or trial org:
10
- * 1. Log in to the Salesforce org.
11
- * 2. Open the Sales app via the App Launcher.
12
- * 3. Navigate to the Accounts tab.
13
- * 4. Create a new Account with a random name.
14
- * 5. Save the new Account record.
15
- *
16
- * @preconditions
17
- * - A Salesforce Developer or trial org is required. Sign-up: https://www.salesforce.com/form/developer-signup/
18
- * - Salesforce CLI is recommended for authorizing the org: https://developer.salesforce.com/tools/salesforcecli
19
- * - The org must be authorized (for example: `sf org login web --set-default`) before running the test.
20
- * - The user executing the test should have access to the Sales app and the Accounts tab in Lightning Experience.
21
- *
22
- * @see {@link https://developer.salesforce.com/tools/salesforcecli} - Salesforce CLI installation and documentation.
23
- * @see {@link https://www.salesforce.com/form/developer-signup/} - Sign up for a Salesforce Developer org.
24
- *
25
- * @note
26
- * All tests use the `ai` fixture and call `ai.run({ action, expect })`
27
- * to describe actions and assert visible outcomes.
28
- */
29
- import { test } from '@xoxoai/checkmate/salesforce'
30
-
31
- test.describe('trial dev org', async () => {
32
- test('creating new account in sales app', async ({ ai }) => {
33
- await test.step('Login to Salesforce Org', async () => {
34
- await ai.run({
35
- action: `
36
- Login to Salesforce org`,
37
- expect: `
38
- Salesforce org loads successfully and user is authenticated/not on the login page.`,
39
- })
40
- })
41
-
42
- await test.step('Open Sales App from App Launcher', async () => {
43
- await ai.run({
44
- action: `
45
- Click the App Launcher icon (nine dots) in the top left corner.
46
- Type 'Sales' into the App Launcher 'Search apps and items' search bar.
47
- Click on the app that is named exactly the 'Sales' app from the results.`,
48
- expect: `
49
- Sales app opens successfully in Lightning context.`,
50
- })
51
- })
52
-
53
- await test.step('Switch to Accounts tab', async () => {
54
- await ai.run({
55
- action: `
56
- Click the 'Accounts' tab within the Sales app.`,
57
- expect: `
58
- The Accounts tab is active and a list of accounts is displayed.`,
59
- })
60
- })
61
-
62
- await test.step('Start creating a new Account', async () => {
63
- await ai.run({
64
- action: `
65
- Click the 'New' button on the Accounts tab to create a new Account record.
66
- Fill 'Account Name' field with 'Agentic Test Account' followed by space and some random alphanumeric string
67
- Don't save the record or fill any other fields.`,
68
- expect: `
69
- 'New Account' form is displayed and filled with random data`,
70
- })
71
- })
72
-
73
- await test.step('Save new Account record', async () => {
74
- await ai.run({
75
- action: `
76
- Click the 'Save' button on the 'New Account' form.`,
77
- expect: `
78
- Account record was saved successfully and details view is displayed.`,
79
- })
80
- })
81
- })
82
- })