webmcp-cli 1.0.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (347) hide show
  1. package/dist/agent/features/agent-simulator.d.ts +67 -0
  2. package/dist/agent/features/agent-simulator.js +368 -0
  3. package/dist/agent/features/agent-simulator.js.map +1 -0
  4. package/dist/agent/features/index.d.ts +8 -0
  5. package/dist/agent/features/index.js +9 -0
  6. package/dist/agent/features/index.js.map +1 -0
  7. package/dist/agent/features/simulation-judge.d.ts +78 -0
  8. package/dist/agent/features/simulation-judge.js +276 -0
  9. package/dist/agent/features/simulation-judge.js.map +1 -0
  10. package/dist/agent/features/test-case-generator.d.ts +35 -0
  11. package/dist/agent/features/test-case-generator.js +257 -0
  12. package/dist/agent/features/test-case-generator.js.map +1 -0
  13. package/dist/agent/index.d.ts +7 -0
  14. package/dist/agent/index.js +10 -0
  15. package/dist/agent/index.js.map +1 -0
  16. package/dist/agent/llm-client.d.ts +76 -0
  17. package/dist/agent/llm-client.js +198 -0
  18. package/dist/agent/llm-client.js.map +1 -0
  19. package/dist/audit/run-single-page-audit.d.ts +41 -0
  20. package/dist/audit/run-single-page-audit.js +103 -0
  21. package/dist/audit/run-single-page-audit.js.map +1 -0
  22. package/dist/bin/webmcp.d.ts +5 -0
  23. package/dist/bin/webmcp.js +14 -0
  24. package/dist/bin/webmcp.js.map +1 -0
  25. package/dist/browser/audit-runner.d.ts +30 -0
  26. package/dist/browser/audit-runner.js +77 -0
  27. package/dist/browser/audit-runner.js.map +1 -0
  28. package/dist/browser/index.d.ts +6 -0
  29. package/dist/browser/index.js +7 -0
  30. package/dist/browser/index.js.map +1 -0
  31. package/dist/browser/interceptor.d.ts +68 -0
  32. package/dist/browser/interceptor.js +257 -0
  33. package/dist/browser/interceptor.js.map +1 -0
  34. package/dist/browser/playwright.d.ts +98 -0
  35. package/dist/browser/playwright.js +158 -0
  36. package/dist/browser/playwright.js.map +1 -0
  37. package/dist/cli/commands/audit.d.ts +12 -0
  38. package/dist/cli/commands/audit.js +349 -0
  39. package/dist/cli/commands/audit.js.map +1 -0
  40. package/dist/cli/commands/interactive.d.ts +10 -0
  41. package/dist/cli/commands/interactive.js +34 -0
  42. package/dist/cli/commands/interactive.js.map +1 -0
  43. package/dist/cli/index.d.ts +17 -0
  44. package/dist/cli/index.js +84 -0
  45. package/dist/cli/index.js.map +1 -0
  46. package/dist/cli/options/parse-audit-options.d.ts +12 -0
  47. package/dist/cli/options/parse-audit-options.js +64 -0
  48. package/dist/cli/options/parse-audit-options.js.map +1 -0
  49. package/dist/core/constants.d.ts +102 -0
  50. package/dist/core/constants.js +214 -0
  51. package/dist/core/constants.js.map +1 -0
  52. package/dist/core/types/audit.d.ts +260 -0
  53. package/dist/core/types/audit.js +5 -0
  54. package/dist/core/types/audit.js.map +1 -0
  55. package/dist/core/types/index.d.ts +6 -0
  56. package/dist/core/types/index.js +7 -0
  57. package/dist/core/types/index.js.map +1 -0
  58. package/dist/core/types/rule.d.ts +190 -0
  59. package/dist/core/types/rule.js +26 -0
  60. package/dist/core/types/rule.js.map +1 -0
  61. package/dist/core/types/tool.d.ts +312 -0
  62. package/dist/core/types/tool.js +6 -0
  63. package/dist/core/types/tool.js.map +1 -0
  64. package/dist/detection/declarative.d.ts +27 -0
  65. package/dist/detection/declarative.js +343 -0
  66. package/dist/detection/declarative.js.map +1 -0
  67. package/dist/detection/imperative.d.ts +38 -0
  68. package/dist/detection/imperative.js +99 -0
  69. package/dist/detection/imperative.js.map +1 -0
  70. package/dist/detection/index.d.ts +5 -0
  71. package/dist/detection/index.js +6 -0
  72. package/dist/detection/index.js.map +1 -0
  73. package/dist/index.d.ts +12 -0
  74. package/dist/index.js +19 -0
  75. package/dist/index.js.map +1 -0
  76. package/dist/llm/advice-service.d.ts +38 -0
  77. package/dist/llm/advice-service.js +243 -0
  78. package/dist/llm/advice-service.js.map +1 -0
  79. package/dist/llm/evaluator.d.ts +89 -0
  80. package/dist/llm/evaluator.js +274 -0
  81. package/dist/llm/evaluator.js.map +1 -0
  82. package/dist/llm/index.d.ts +11 -0
  83. package/dist/llm/index.js +15 -0
  84. package/dist/llm/index.js.map +1 -0
  85. package/dist/llm/json-response.d.ts +12 -0
  86. package/dist/llm/json-response.js +67 -0
  87. package/dist/llm/json-response.js.map +1 -0
  88. package/dist/llm/providers/mock.d.ts +29 -0
  89. package/dist/llm/providers/mock.js +324 -0
  90. package/dist/llm/providers/mock.js.map +1 -0
  91. package/dist/llm/providers/openrouter.d.ts +53 -0
  92. package/dist/llm/providers/openrouter.js +321 -0
  93. package/dist/llm/providers/openrouter.js.map +1 -0
  94. package/dist/llm/request-cache.d.ts +28 -0
  95. package/dist/llm/request-cache.js +99 -0
  96. package/dist/llm/request-cache.js.map +1 -0
  97. package/dist/llm/types.d.ts +233 -0
  98. package/dist/llm/types.js +7 -0
  99. package/dist/llm/types.js.map +1 -0
  100. package/dist/rules/best-practices/BP-001.d.ts +11 -0
  101. package/dist/rules/best-practices/BP-001.js +56 -0
  102. package/dist/rules/best-practices/BP-001.js.map +1 -0
  103. package/dist/rules/best-practices/BP-002.d.ts +11 -0
  104. package/dist/rules/best-practices/BP-002.js +63 -0
  105. package/dist/rules/best-practices/BP-002.js.map +1 -0
  106. package/dist/rules/best-practices/BP-003.d.ts +11 -0
  107. package/dist/rules/best-practices/BP-003.js +68 -0
  108. package/dist/rules/best-practices/BP-003.js.map +1 -0
  109. package/dist/rules/coverage/COV-001.d.ts +8 -0
  110. package/dist/rules/coverage/COV-001.js +51 -0
  111. package/dist/rules/coverage/COV-001.js.map +1 -0
  112. package/dist/rules/description/DESC-003.d.ts +13 -0
  113. package/dist/rules/description/DESC-003.js +96 -0
  114. package/dist/rules/description/DESC-003.js.map +1 -0
  115. package/dist/rules/description/DESC-004.d.ts +8 -0
  116. package/dist/rules/description/DESC-004.js +61 -0
  117. package/dist/rules/description/DESC-004.js.map +1 -0
  118. package/dist/rules/description/DESC-005.d.ts +12 -0
  119. package/dist/rules/description/DESC-005.js +70 -0
  120. package/dist/rules/description/DESC-005.js.map +1 -0
  121. package/dist/rules/description/index.d.ts +4 -0
  122. package/dist/rules/description/index.js +5 -0
  123. package/dist/rules/description/index.js.map +1 -0
  124. package/dist/rules/implementation/IMP-001.d.ts +10 -0
  125. package/dist/rules/implementation/IMP-001.js +36 -0
  126. package/dist/rules/implementation/IMP-001.js.map +1 -0
  127. package/dist/rules/implementation/IMP-003.d.ts +9 -0
  128. package/dist/rules/implementation/IMP-003.js +45 -0
  129. package/dist/rules/implementation/IMP-003.js.map +1 -0
  130. package/dist/rules/implementation/IMP-004.d.ts +9 -0
  131. package/dist/rules/implementation/IMP-004.js +48 -0
  132. package/dist/rules/implementation/IMP-004.js.map +1 -0
  133. package/dist/rules/implementation/IMP-005.d.ts +9 -0
  134. package/dist/rules/implementation/IMP-005.js +54 -0
  135. package/dist/rules/implementation/IMP-005.js.map +1 -0
  136. package/dist/rules/implementation/IMP-007.d.ts +8 -0
  137. package/dist/rules/implementation/IMP-007.js +79 -0
  138. package/dist/rules/implementation/IMP-007.js.map +1 -0
  139. package/dist/rules/implementation/IMP-013.d.ts +9 -0
  140. package/dist/rules/implementation/IMP-013.js +55 -0
  141. package/dist/rules/implementation/IMP-013.js.map +1 -0
  142. package/dist/rules/implementation/index.d.ts +9 -0
  143. package/dist/rules/implementation/index.js +10 -0
  144. package/dist/rules/implementation/index.js.map +1 -0
  145. package/dist/rules/index.d.ts +51 -0
  146. package/dist/rules/index.js +100 -0
  147. package/dist/rules/index.js.map +1 -0
  148. package/dist/rules/llm/LLM-001.d.ts +14 -0
  149. package/dist/rules/llm/LLM-001.js +78 -0
  150. package/dist/rules/llm/LLM-001.js.map +1 -0
  151. package/dist/rules/llm/LLM-002.d.ts +14 -0
  152. package/dist/rules/llm/LLM-002.js +77 -0
  153. package/dist/rules/llm/LLM-002.js.map +1 -0
  154. package/dist/rules/llm/LLM-003.d.ts +16 -0
  155. package/dist/rules/llm/LLM-003.js +82 -0
  156. package/dist/rules/llm/LLM-003.js.map +1 -0
  157. package/dist/rules/llm/LLM-004.d.ts +14 -0
  158. package/dist/rules/llm/LLM-004.js +87 -0
  159. package/dist/rules/llm/LLM-004.js.map +1 -0
  160. package/dist/rules/llm/LLM-005.d.ts +16 -0
  161. package/dist/rules/llm/LLM-005.js +105 -0
  162. package/dist/rules/llm/LLM-005.js.map +1 -0
  163. package/dist/rules/llm/index.d.ts +10 -0
  164. package/dist/rules/llm/index.js +11 -0
  165. package/dist/rules/llm/index.js.map +1 -0
  166. package/dist/rules/runner.d.ts +54 -0
  167. package/dist/rules/runner.js +138 -0
  168. package/dist/rules/runner.js.map +1 -0
  169. package/dist/rules/schema/SCHEMA-001.d.ts +9 -0
  170. package/dist/rules/schema/SCHEMA-001.js +57 -0
  171. package/dist/rules/schema/SCHEMA-001.js.map +1 -0
  172. package/dist/rules/schema/SCHEMA-002.d.ts +9 -0
  173. package/dist/rules/schema/SCHEMA-002.js +59 -0
  174. package/dist/rules/schema/SCHEMA-002.js.map +1 -0
  175. package/dist/rules/schema/SCHEMA-003.d.ts +10 -0
  176. package/dist/rules/schema/SCHEMA-003.js +66 -0
  177. package/dist/rules/schema/SCHEMA-003.js.map +1 -0
  178. package/dist/rules/schema/SCHEMA-011.d.ts +10 -0
  179. package/dist/rules/schema/SCHEMA-011.js +62 -0
  180. package/dist/rules/schema/SCHEMA-011.js.map +1 -0
  181. package/dist/rules/security/SEC-001.d.ts +12 -0
  182. package/dist/rules/security/SEC-001.js +66 -0
  183. package/dist/rules/security/SEC-001.js.map +1 -0
  184. package/dist/rules/utils/keywords.d.ts +35 -0
  185. package/dist/rules/utils/keywords.js +100 -0
  186. package/dist/rules/utils/keywords.js.map +1 -0
  187. package/dist/scoring/calculator.d.ts +27 -0
  188. package/dist/scoring/calculator.js +194 -0
  189. package/dist/scoring/calculator.js.map +1 -0
  190. package/dist/scoring/grades.d.ts +34 -0
  191. package/dist/scoring/grades.js +167 -0
  192. package/dist/scoring/grades.js.map +1 -0
  193. package/dist/scoring/index.d.ts +5 -0
  194. package/dist/scoring/index.js +6 -0
  195. package/dist/scoring/index.js.map +1 -0
  196. package/dist/ui/banner.d.ts +21 -0
  197. package/dist/ui/banner.js +60 -0
  198. package/dist/ui/banner.js.map +1 -0
  199. package/dist/ui/design-tokens.d.ts +23 -0
  200. package/dist/ui/design-tokens.js +58 -0
  201. package/dist/ui/design-tokens.js.map +1 -0
  202. package/dist/ui/findings.d.ts +23 -0
  203. package/dist/ui/findings.js +190 -0
  204. package/dist/ui/findings.js.map +1 -0
  205. package/dist/ui/index.d.ts +9 -0
  206. package/dist/ui/index.js +10 -0
  207. package/dist/ui/index.js.map +1 -0
  208. package/dist/ui/ink/App.d.ts +14 -0
  209. package/dist/ui/ink/App.js +113 -0
  210. package/dist/ui/ink/App.js.map +1 -0
  211. package/dist/ui/ink/FullScreenLayout.d.ts +16 -0
  212. package/dist/ui/ink/FullScreenLayout.js +29 -0
  213. package/dist/ui/ink/FullScreenLayout.js.map +1 -0
  214. package/dist/ui/ink/InteractiveApp.d.ts +28 -0
  215. package/dist/ui/ink/InteractiveApp.js +229 -0
  216. package/dist/ui/ink/InteractiveApp.js.map +1 -0
  217. package/dist/ui/ink/RealAuditApp.d.ts +19 -0
  218. package/dist/ui/ink/RealAuditApp.js +170 -0
  219. package/dist/ui/ink/RealAuditApp.js.map +1 -0
  220. package/dist/ui/ink/components/AnimatedProgressBar.d.ts +20 -0
  221. package/dist/ui/ink/components/AnimatedProgressBar.js +46 -0
  222. package/dist/ui/ink/components/AnimatedProgressBar.js.map +1 -0
  223. package/dist/ui/ink/components/AsciiLogo.d.ts +12 -0
  224. package/dist/ui/ink/components/AsciiLogo.js +35 -0
  225. package/dist/ui/ink/components/AsciiLogo.js.map +1 -0
  226. package/dist/ui/ink/components/CategoryBars.d.ts +18 -0
  227. package/dist/ui/ink/components/CategoryBars.js +18 -0
  228. package/dist/ui/ink/components/CategoryBars.js.map +1 -0
  229. package/dist/ui/ink/components/FindingsTable.d.ts +18 -0
  230. package/dist/ui/ink/components/FindingsTable.js +19 -0
  231. package/dist/ui/ink/components/FindingsTable.js.map +1 -0
  232. package/dist/ui/ink/components/Footer.d.ts +15 -0
  233. package/dist/ui/ink/components/Footer.js +20 -0
  234. package/dist/ui/ink/components/Footer.js.map +1 -0
  235. package/dist/ui/ink/components/Header.d.ts +11 -0
  236. package/dist/ui/ink/components/Header.js +12 -0
  237. package/dist/ui/ink/components/Header.js.map +1 -0
  238. package/dist/ui/ink/components/LinkList.d.ts +17 -0
  239. package/dist/ui/ink/components/LinkList.js +44 -0
  240. package/dist/ui/ink/components/LinkList.js.map +1 -0
  241. package/dist/ui/ink/components/Navigation.d.ts +26 -0
  242. package/dist/ui/ink/components/Navigation.js +62 -0
  243. package/dist/ui/ink/components/Navigation.js.map +1 -0
  244. package/dist/ui/ink/components/ProgressBar.d.ts +15 -0
  245. package/dist/ui/ink/components/ProgressBar.js +14 -0
  246. package/dist/ui/ink/components/ProgressBar.js.map +1 -0
  247. package/dist/ui/ink/components/ScoreCard.d.ts +30 -0
  248. package/dist/ui/ink/components/ScoreCard.js +26 -0
  249. package/dist/ui/ink/components/ScoreCard.js.map +1 -0
  250. package/dist/ui/ink/components/SimulationResults.d.ts +33 -0
  251. package/dist/ui/ink/components/SimulationResults.js +23 -0
  252. package/dist/ui/ink/components/SimulationResults.js.map +1 -0
  253. package/dist/ui/ink/components/Spinner.d.ts +11 -0
  254. package/dist/ui/ink/components/Spinner.js +12 -0
  255. package/dist/ui/ink/components/Spinner.js.map +1 -0
  256. package/dist/ui/ink/components/ToolCard.d.ts +23 -0
  257. package/dist/ui/ink/components/ToolCard.js +20 -0
  258. package/dist/ui/ink/components/ToolCard.js.map +1 -0
  259. package/dist/ui/ink/components/shared/Badge.d.ts +21 -0
  260. package/dist/ui/ink/components/shared/Badge.js +39 -0
  261. package/dist/ui/ink/components/shared/Badge.js.map +1 -0
  262. package/dist/ui/ink/components/shared/Card.d.ts +18 -0
  263. package/dist/ui/ink/components/shared/Card.js +11 -0
  264. package/dist/ui/ink/components/shared/Card.js.map +1 -0
  265. package/dist/ui/ink/components/shared/HelpOverlay.d.ts +10 -0
  266. package/dist/ui/ink/components/shared/HelpOverlay.js +28 -0
  267. package/dist/ui/ink/components/shared/HelpOverlay.js.map +1 -0
  268. package/dist/ui/ink/components/shared/LoadingWithTimeout.d.ts +11 -0
  269. package/dist/ui/ink/components/shared/LoadingWithTimeout.js +21 -0
  270. package/dist/ui/ink/components/shared/LoadingWithTimeout.js.map +1 -0
  271. package/dist/ui/ink/components/shared/Menu.d.ts +23 -0
  272. package/dist/ui/ink/components/shared/Menu.js +43 -0
  273. package/dist/ui/ink/components/shared/Menu.js.map +1 -0
  274. package/dist/ui/ink/components/shared/Table.d.ts +23 -0
  275. package/dist/ui/ink/components/shared/Table.js +40 -0
  276. package/dist/ui/ink/components/shared/Table.js.map +1 -0
  277. package/dist/ui/ink/components/views/CrawlingView.d.ts +12 -0
  278. package/dist/ui/ink/components/views/CrawlingView.js +34 -0
  279. package/dist/ui/ink/components/views/CrawlingView.js.map +1 -0
  280. package/dist/ui/ink/components/views/DashboardView.d.ts +21 -0
  281. package/dist/ui/ink/components/views/DashboardView.js +51 -0
  282. package/dist/ui/ink/components/views/DashboardView.js.map +1 -0
  283. package/dist/ui/ink/components/views/FindingDetailView.d.ts +16 -0
  284. package/dist/ui/ink/components/views/FindingDetailView.js +34 -0
  285. package/dist/ui/ink/components/views/FindingDetailView.js.map +1 -0
  286. package/dist/ui/ink/components/views/FindingsView.d.ts +16 -0
  287. package/dist/ui/ink/components/views/FindingsView.js +79 -0
  288. package/dist/ui/ink/components/views/FindingsView.js.map +1 -0
  289. package/dist/ui/ink/components/views/OnboardingView.d.ts +12 -0
  290. package/dist/ui/ink/components/views/OnboardingView.js +40 -0
  291. package/dist/ui/ink/components/views/OnboardingView.js.map +1 -0
  292. package/dist/ui/ink/components/views/SimulationView.d.ts +17 -0
  293. package/dist/ui/ink/components/views/SimulationView.js +53 -0
  294. package/dist/ui/ink/components/views/SimulationView.js.map +1 -0
  295. package/dist/ui/ink/components/views/TestCaseDetailView.d.ts +11 -0
  296. package/dist/ui/ink/components/views/TestCaseDetailView.js +53 -0
  297. package/dist/ui/ink/components/views/TestCaseDetailView.js.map +1 -0
  298. package/dist/ui/ink/components/views/ToolDetailView.d.ts +15 -0
  299. package/dist/ui/ink/components/views/ToolDetailView.js +25 -0
  300. package/dist/ui/ink/components/views/ToolDetailView.js.map +1 -0
  301. package/dist/ui/ink/components/views/ToolsView.d.ts +15 -0
  302. package/dist/ui/ink/components/views/ToolsView.js +43 -0
  303. package/dist/ui/ink/components/views/ToolsView.js.map +1 -0
  304. package/dist/ui/ink/demo.d.ts +6 -0
  305. package/dist/ui/ink/demo.js +254 -0
  306. package/dist/ui/ink/demo.js.map +1 -0
  307. package/dist/ui/ink/hooks/useAnimation.d.ts +29 -0
  308. package/dist/ui/ink/hooks/useAnimation.js +89 -0
  309. package/dist/ui/ink/hooks/useAnimation.js.map +1 -0
  310. package/dist/ui/ink/hooks/useAudit.d.ts +69 -0
  311. package/dist/ui/ink/hooks/useAudit.js +99 -0
  312. package/dist/ui/ink/hooks/useAudit.js.map +1 -0
  313. package/dist/ui/ink/hooks/useCrawlAnimation.d.ts +19 -0
  314. package/dist/ui/ink/hooks/useCrawlAnimation.js +204 -0
  315. package/dist/ui/ink/hooks/useCrawlAnimation.js.map +1 -0
  316. package/dist/ui/ink/hooks/useKeyboardNav.d.ts +23 -0
  317. package/dist/ui/ink/hooks/useKeyboardNav.js +81 -0
  318. package/dist/ui/ink/hooks/useKeyboardNav.js.map +1 -0
  319. package/dist/ui/ink/hooks/useNavigation.d.ts +16 -0
  320. package/dist/ui/ink/hooks/useNavigation.js +42 -0
  321. package/dist/ui/ink/hooks/useNavigation.js.map +1 -0
  322. package/dist/ui/ink/hooks/useTerminalSize.d.ts +10 -0
  323. package/dist/ui/ink/hooks/useTerminalSize.js +29 -0
  324. package/dist/ui/ink/hooks/useTerminalSize.js.map +1 -0
  325. package/dist/ui/ink/index.d.ts +43 -0
  326. package/dist/ui/ink/index.js +50 -0
  327. package/dist/ui/ink/index.js.map +1 -0
  328. package/dist/ui/ink/render.d.ts +24 -0
  329. package/dist/ui/ink/render.js +14 -0
  330. package/dist/ui/ink/render.js.map +1 -0
  331. package/dist/ui/ink/theme.d.ts +37 -0
  332. package/dist/ui/ink/theme.js +38 -0
  333. package/dist/ui/ink/theme.js.map +1 -0
  334. package/dist/ui/ink/types.d.ts +77 -0
  335. package/dist/ui/ink/types.js +5 -0
  336. package/dist/ui/ink/types.js.map +1 -0
  337. package/dist/ui/score-display.d.ts +16 -0
  338. package/dist/ui/score-display.js +201 -0
  339. package/dist/ui/score-display.js.map +1 -0
  340. package/dist/ui/spinner.d.ts +45 -0
  341. package/dist/ui/spinner.js +112 -0
  342. package/dist/ui/spinner.js.map +1 -0
  343. package/dist/ui/utils.d.ts +13 -0
  344. package/dist/ui/utils.js +25 -0
  345. package/dist/ui/utils.js.map +1 -0
  346. package/package.json +61 -9
  347. package/index.js +0 -105
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Constants for AgentReady CLI
3
+ */
4
+ /**
5
+ * WebMCP HTML attributes
6
+ */
7
+ export declare const WEBMCP_ATTRIBUTES: {
8
+ readonly TOOL_NAME: "toolname";
9
+ readonly TOOL_DESCRIPTION: "tooldescription";
10
+ readonly TOOL_AUTO_SUBMIT: "toolautosubmit";
11
+ readonly PARAM_TITLE: "toolparamtitle";
12
+ readonly PARAM_DESCRIPTION: "toolparamdescription";
13
+ };
14
+ /**
15
+ * WebMCP API methods
16
+ */
17
+ export declare const WEBMCP_API: {
18
+ readonly REGISTER_TOOL: "registerTool";
19
+ readonly PROVIDE_CONTEXT: "provideContext";
20
+ readonly UNREGISTER_TOOL: "unregisterTool";
21
+ readonly CLEAR_CONTEXT: "clearContext";
22
+ };
23
+ /**
24
+ * WebMCP events
25
+ */
26
+ export declare const WEBMCP_EVENTS: {
27
+ readonly TOOL_ACTIVATED: "toolactivated";
28
+ readonly TOOL_CANCEL: "toolcancel";
29
+ };
30
+ /**
31
+ * WebMCP CSS pseudo-classes
32
+ */
33
+ export declare const WEBMCP_CSS: {
34
+ readonly TOOL_FORM_ACTIVE: ":tool-form-active";
35
+ readonly TOOL_SUBMIT_ACTIVE: ":tool-submit-active";
36
+ };
37
+ /**
38
+ * Grade thresholds
39
+ */
40
+ export declare const GRADE_THRESHOLDS: {
41
+ readonly 'A+': 95;
42
+ readonly A: 85;
43
+ readonly 'B+': 80;
44
+ readonly B: 70;
45
+ readonly 'C+': 65;
46
+ readonly C: 55;
47
+ readonly D: 40;
48
+ readonly F: 0;
49
+ };
50
+ /**
51
+ * Default audit configuration
52
+ */
53
+ export declare const DEFAULT_AUDIT_CONFIG: {
54
+ timeout: number;
55
+ visible: boolean;
56
+ noSimulation: boolean;
57
+ ci: boolean;
58
+ minScore: number;
59
+ promptsPerTool: number;
60
+ maxRounds: number;
61
+ maxCost: number;
62
+ };
63
+ /**
64
+ * Recommended tool name verbs (from spec)
65
+ */
66
+ export declare const RECOMMENDED_VERBS: string[];
67
+ /**
68
+ * Discouraged tool name verbs
69
+ */
70
+ export declare const DISCOURAGED_VERBS: string[];
71
+ /**
72
+ * Prompt injection patterns to detect
73
+ */
74
+ export declare const INJECTION_PATTERNS: RegExp[];
75
+ /**
76
+ * Sensitive parameter patterns (for over-parameterization detection)
77
+ */
78
+ export declare const SENSITIVE_PARAM_PATTERNS: {
79
+ critical: RegExp[];
80
+ high: RegExp[];
81
+ medium: RegExp[];
82
+ };
83
+ /**
84
+ * Payment-related keywords
85
+ */
86
+ export declare const PAYMENT_KEYWORDS: string[];
87
+ /**
88
+ * Authentication-related keywords
89
+ */
90
+ export declare const AUTH_KEYWORDS: string[];
91
+ /**
92
+ * Input type to JSON Schema type mapping
93
+ */
94
+ export declare const INPUT_TYPE_MAP: Record<string, string>;
95
+ /**
96
+ * CLI package info
97
+ */
98
+ export declare const CLI_INFO: {
99
+ name: string;
100
+ fullName: string;
101
+ description: string;
102
+ };
@@ -0,0 +1,214 @@
1
+ /**
2
+ * Constants for AgentReady CLI
3
+ */
4
+ /**
5
+ * WebMCP HTML attributes
6
+ */
7
+ export const WEBMCP_ATTRIBUTES = {
8
+ // Form-level attributes
9
+ TOOL_NAME: 'toolname',
10
+ TOOL_DESCRIPTION: 'tooldescription',
11
+ TOOL_AUTO_SUBMIT: 'toolautosubmit',
12
+ // Input-level attributes
13
+ PARAM_TITLE: 'toolparamtitle',
14
+ PARAM_DESCRIPTION: 'toolparamdescription',
15
+ };
16
+ /**
17
+ * WebMCP API methods
18
+ */
19
+ export const WEBMCP_API = {
20
+ REGISTER_TOOL: 'registerTool',
21
+ PROVIDE_CONTEXT: 'provideContext',
22
+ UNREGISTER_TOOL: 'unregisterTool',
23
+ CLEAR_CONTEXT: 'clearContext',
24
+ };
25
+ /**
26
+ * WebMCP events
27
+ */
28
+ export const WEBMCP_EVENTS = {
29
+ TOOL_ACTIVATED: 'toolactivated',
30
+ TOOL_CANCEL: 'toolcancel',
31
+ };
32
+ /**
33
+ * WebMCP CSS pseudo-classes
34
+ */
35
+ export const WEBMCP_CSS = {
36
+ TOOL_FORM_ACTIVE: ':tool-form-active',
37
+ TOOL_SUBMIT_ACTIVE: ':tool-submit-active',
38
+ };
39
+ /**
40
+ * Grade thresholds
41
+ */
42
+ export const GRADE_THRESHOLDS = {
43
+ 'A+': 95,
44
+ 'A': 85,
45
+ 'B+': 80,
46
+ 'B': 70,
47
+ 'C+': 65,
48
+ 'C': 55,
49
+ 'D': 40,
50
+ 'F': 0,
51
+ };
52
+ /**
53
+ * Default audit configuration
54
+ */
55
+ export const DEFAULT_AUDIT_CONFIG = {
56
+ timeout: 30000,
57
+ visible: false,
58
+ noSimulation: false, // Enable simulation by default when API key available
59
+ ci: false,
60
+ minScore: 60,
61
+ // Simulation defaults
62
+ promptsPerTool: 10,
63
+ maxRounds: 5,
64
+ maxCost: 2.0,
65
+ };
66
+ /**
67
+ * Recommended tool name verbs (from spec)
68
+ */
69
+ export const RECOMMENDED_VERBS = [
70
+ 'search',
71
+ 'create',
72
+ 'delete',
73
+ 'update',
74
+ 'get',
75
+ 'list',
76
+ 'submit',
77
+ 'book',
78
+ 'filter',
79
+ 'add',
80
+ 'remove',
81
+ 'find',
82
+ 'check',
83
+ 'calculate',
84
+ 'validate',
85
+ 'send',
86
+ 'fetch',
87
+ 'load',
88
+ 'save',
89
+ 'cancel',
90
+ 'confirm',
91
+ 'select',
92
+ 'set',
93
+ 'clear',
94
+ ];
95
+ /**
96
+ * Discouraged tool name verbs
97
+ */
98
+ export const DISCOURAGED_VERBS = [
99
+ 'handle',
100
+ 'process',
101
+ 'do',
102
+ 'manage',
103
+ 'run',
104
+ 'execute',
105
+ 'perform',
106
+ ];
107
+ /**
108
+ * Prompt injection patterns to detect
109
+ */
110
+ export const INJECTION_PATTERNS = [
111
+ /SYSTEM\s*:/i,
112
+ /IGNORE\s*(ALL\s*)?PREVIOUS/i,
113
+ /<important>/i,
114
+ /---\s*END/i,
115
+ /\[INST\]/i,
116
+ /\[\/INST\]/i,
117
+ /<\|im_start\|>/i,
118
+ /<\|im_end\|>/i,
119
+ /\{\{.*\}\}/,
120
+ /base64[:\s]/i,
121
+ ];
122
+ /**
123
+ * Sensitive parameter patterns (for over-parameterization detection)
124
+ */
125
+ export const SENSITIVE_PARAM_PATTERNS = {
126
+ critical: [
127
+ /^(ssn|social.?security|tax.?id)$/i,
128
+ /^(credit.?card|card.?number|cvv|cvc|ccv)$/i,
129
+ /^(bank.?account|routing.?number|iban|swift)$/i,
130
+ /^(password|passwd|pwd|secret)$/i,
131
+ ],
132
+ high: [
133
+ /^(email|e-mail|phone|mobile|cell)$/i,
134
+ /^(address|street|city|state|zip|postal)$/i,
135
+ /^(birth.?date|dob|age)$/i,
136
+ /^(full.?name|first.?name|last.?name|surname)$/i,
137
+ ],
138
+ medium: [
139
+ /^(username|user.?id|account.?id)$/i,
140
+ /^(ip.?address|device.?id|fingerprint)$/i,
141
+ /^(gender|sex|race|ethnicity)$/i,
142
+ ],
143
+ };
144
+ /**
145
+ * Payment-related keywords
146
+ */
147
+ export const PAYMENT_KEYWORDS = [
148
+ 'checkout',
149
+ 'payment',
150
+ 'pay',
151
+ 'purchase',
152
+ 'buy',
153
+ 'order',
154
+ 'transaction',
155
+ 'billing',
156
+ 'invoice',
157
+ 'card',
158
+ 'credit',
159
+ 'debit',
160
+ ];
161
+ /**
162
+ * Authentication-related keywords
163
+ */
164
+ export const AUTH_KEYWORDS = [
165
+ 'login',
166
+ 'signin',
167
+ 'sign-in',
168
+ 'sign_in',
169
+ 'logout',
170
+ 'signout',
171
+ 'sign-out',
172
+ 'register',
173
+ 'signup',
174
+ 'sign-up',
175
+ 'password',
176
+ 'authentication',
177
+ 'auth',
178
+ 'session',
179
+ 'token',
180
+ ];
181
+ /**
182
+ * Input type to JSON Schema type mapping
183
+ */
184
+ export const INPUT_TYPE_MAP = {
185
+ text: 'string',
186
+ email: 'string', // format: email
187
+ url: 'string', // format: uri
188
+ tel: 'string',
189
+ password: 'string',
190
+ search: 'string',
191
+ number: 'number',
192
+ range: 'number',
193
+ date: 'string', // format: date
194
+ 'datetime-local': 'string', // format: date-time
195
+ time: 'string', // format: time
196
+ month: 'string',
197
+ week: 'string',
198
+ color: 'string',
199
+ checkbox: 'boolean',
200
+ radio: 'string', // enum
201
+ file: 'string', // format: binary
202
+ hidden: 'string',
203
+ textarea: 'string',
204
+ select: 'string', // enum if has options
205
+ };
206
+ /**
207
+ * CLI package info
208
+ */
209
+ export const CLI_INFO = {
210
+ name: 'webmcp',
211
+ fullName: 'webmcp-cli',
212
+ description: 'Audit any website for AI agent readiness (WebMCP)',
213
+ };
214
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB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IACT,OAAO;CACR,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAA2B;IACpD,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ,EAAE,gBAAgB;IACjC,GAAG,EAAE,QAAQ,EAAE,cAAc;IAC7B,GAAG,EAAE,QAAQ;IACb,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ,EAAE,eAAe;IAC/B,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB;IAChD,IAAI,EAAE,QAAQ,EAAE,eAAe;IAC/B,KAAK,EAAE,QAAQ;IACf,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,QAAQ,EAAE,OAAO;IACxB,IAAI,EAAE,QAAQ,EAAE,iBAAiB;IACjC,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,QAAQ,EAAE,sBAAsB;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE,mDAAmD;CACjE,CAAC"}
@@ -0,0 +1,260 @@
1
+ /**
2
+ * Audit Result Types
3
+ */
4
+ import type { DetectedTool, UnregisteredForm } from './tool.js';
5
+ import type { RuleResult, Finding } from './rule.js';
6
+ /**
7
+ * Grade letters from A+ to F
8
+ */
9
+ export type Grade = 'A+' | 'A' | 'B+' | 'B' | 'C+' | 'C' | 'D' | 'F';
10
+ /**
11
+ * Information about a crawled page
12
+ */
13
+ export interface PageInfo {
14
+ /**
15
+ * URL of the page
16
+ */
17
+ url: string;
18
+ /**
19
+ * Page title
20
+ */
21
+ title: string;
22
+ /**
23
+ * HTTP status code
24
+ */
25
+ statusCode: number;
26
+ /**
27
+ * Time taken to load the page (ms)
28
+ */
29
+ loadTime: number;
30
+ /**
31
+ * Whether WebMCP is supported on this page
32
+ */
33
+ hasWebMCP: boolean;
34
+ /**
35
+ * Number of tools found on this page
36
+ */
37
+ toolCount: number;
38
+ /**
39
+ * Number of forms found on this page
40
+ */
41
+ formCount: number;
42
+ /**
43
+ * Number of unregistered forms (opportunities)
44
+ */
45
+ opportunityCount: number;
46
+ /**
47
+ * Crawl depth from the starting URL
48
+ */
49
+ depth: number;
50
+ /**
51
+ * Screenshot path (if captured)
52
+ */
53
+ screenshotPath?: string;
54
+ }
55
+ /**
56
+ * Score breakdown by category
57
+ */
58
+ export interface CategoryScore {
59
+ /**
60
+ * Category name
61
+ */
62
+ name: string;
63
+ /**
64
+ * Category ID
65
+ */
66
+ id: 'implementation' | 'description' | 'schema' | 'security' | 'best-practices' | 'coverage';
67
+ /**
68
+ * Score achieved in this category
69
+ */
70
+ score: number;
71
+ /**
72
+ * Maximum possible score in this category
73
+ */
74
+ maxScore: number;
75
+ /**
76
+ * Percentage (0-100)
77
+ */
78
+ percentage: number;
79
+ }
80
+ /**
81
+ * Overall score and grade
82
+ */
83
+ export interface ScoreSummary {
84
+ /**
85
+ * Total score (0-100)
86
+ */
87
+ total: number;
88
+ /**
89
+ * Letter grade
90
+ */
91
+ grade: Grade;
92
+ /**
93
+ * Score breakdown by category
94
+ */
95
+ categories: CategoryScore[];
96
+ /**
97
+ * Issue counts by severity
98
+ */
99
+ issueCount: {
100
+ critical: number;
101
+ warning: number;
102
+ info: number;
103
+ };
104
+ }
105
+ /**
106
+ * Recommendation for improvement
107
+ */
108
+ export interface Recommendation {
109
+ /**
110
+ * Priority order (1 = highest)
111
+ */
112
+ priority: number;
113
+ /**
114
+ * Action to take
115
+ */
116
+ action: string;
117
+ /**
118
+ * Expected score improvement
119
+ */
120
+ scoreImpact: number;
121
+ /**
122
+ * Effort required
123
+ */
124
+ effort: 'low' | 'medium' | 'high';
125
+ /**
126
+ * Related rule ID
127
+ */
128
+ ruleId: string;
129
+ /**
130
+ * Affected tools (if any)
131
+ */
132
+ affectedTools?: string[];
133
+ }
134
+ /**
135
+ * Complete audit result
136
+ */
137
+ export interface AuditResult {
138
+ /**
139
+ * Unique audit ID
140
+ */
141
+ id: string;
142
+ /**
143
+ * Audited URL
144
+ */
145
+ url: string;
146
+ /**
147
+ * Timestamp when the audit started
148
+ */
149
+ startedAt: Date;
150
+ /**
151
+ * Timestamp when the audit completed
152
+ */
153
+ completedAt: Date;
154
+ /**
155
+ * Total duration (ms)
156
+ */
157
+ duration: number;
158
+ /**
159
+ * CLI version used
160
+ */
161
+ cliVersion: string;
162
+ /**
163
+ * Score summary
164
+ */
165
+ score: ScoreSummary;
166
+ /**
167
+ * All detected tools (imperative + declarative)
168
+ */
169
+ tools: DetectedTool[];
170
+ /**
171
+ * Unregistered forms (opportunities)
172
+ */
173
+ opportunities: UnregisteredForm[];
174
+ /**
175
+ * Pages crawled
176
+ */
177
+ pages: PageInfo[];
178
+ /**
179
+ * All rule results
180
+ */
181
+ ruleResults: Map<string, RuleResult>;
182
+ /**
183
+ * All findings (issues)
184
+ */
185
+ findings: Finding[];
186
+ /**
187
+ * Top recommendations
188
+ */
189
+ recommendations: Recommendation[];
190
+ /**
191
+ * Whether WebMCP is supported at all
192
+ */
193
+ hasWebMCP: boolean;
194
+ /**
195
+ * Browser used for the audit
196
+ */
197
+ browser: {
198
+ name: string;
199
+ version: string;
200
+ };
201
+ /**
202
+ * Audit configuration used
203
+ */
204
+ config: AuditConfig;
205
+ }
206
+ /**
207
+ * Configuration for an audit run
208
+ */
209
+ export interface AuditConfig {
210
+ /**
211
+ * Per-page timeout (ms)
212
+ */
213
+ timeout: number;
214
+ /**
215
+ * Whether to run in visible (non-headless) mode
216
+ */
217
+ visible: boolean;
218
+ /**
219
+ * Whether to skip LLM prompt simulation
220
+ */
221
+ noSimulation: boolean;
222
+ /**
223
+ * LLM model for simulation
224
+ */
225
+ model?: string;
226
+ /**
227
+ * Whether running in CI mode
228
+ */
229
+ ci: boolean;
230
+ /**
231
+ * Minimum score for CI mode
232
+ */
233
+ minScore: number;
234
+ /**
235
+ * Number of test prompts per tool for simulation
236
+ */
237
+ promptsPerTool: number;
238
+ /**
239
+ * Maximum conversation rounds for simulation
240
+ */
241
+ maxRounds: number;
242
+ /**
243
+ * Maximum cost in USD for simulation
244
+ */
245
+ maxCost: number;
246
+ }
247
+ /**
248
+ * Options passed to the audit command
249
+ */
250
+ export interface AuditOptions {
251
+ timeout?: string;
252
+ visible?: boolean;
253
+ noSimulation?: boolean;
254
+ model?: string;
255
+ ci?: boolean;
256
+ minScore?: string;
257
+ promptsPerTool?: string;
258
+ maxRounds?: string;
259
+ maxCost?: string;
260
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Audit Result Types
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=audit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/core/types/audit.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Core Types
3
+ */
4
+ export * from './tool.js';
5
+ export * from './audit.js';
6
+ export * from './rule.js';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Core Types
3
+ */
4
+ export * from './tool.js';
5
+ export * from './audit.js';
6
+ export * from './rule.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}