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.
- package/dist/agent/features/agent-simulator.d.ts +67 -0
- package/dist/agent/features/agent-simulator.js +368 -0
- package/dist/agent/features/agent-simulator.js.map +1 -0
- package/dist/agent/features/index.d.ts +8 -0
- package/dist/agent/features/index.js +9 -0
- package/dist/agent/features/index.js.map +1 -0
- package/dist/agent/features/simulation-judge.d.ts +78 -0
- package/dist/agent/features/simulation-judge.js +276 -0
- package/dist/agent/features/simulation-judge.js.map +1 -0
- package/dist/agent/features/test-case-generator.d.ts +35 -0
- package/dist/agent/features/test-case-generator.js +257 -0
- package/dist/agent/features/test-case-generator.js.map +1 -0
- package/dist/agent/index.d.ts +7 -0
- package/dist/agent/index.js +10 -0
- package/dist/agent/index.js.map +1 -0
- package/dist/agent/llm-client.d.ts +76 -0
- package/dist/agent/llm-client.js +198 -0
- package/dist/agent/llm-client.js.map +1 -0
- package/dist/audit/run-single-page-audit.d.ts +41 -0
- package/dist/audit/run-single-page-audit.js +103 -0
- package/dist/audit/run-single-page-audit.js.map +1 -0
- package/dist/bin/webmcp.d.ts +5 -0
- package/dist/bin/webmcp.js +14 -0
- package/dist/bin/webmcp.js.map +1 -0
- package/dist/browser/audit-runner.d.ts +30 -0
- package/dist/browser/audit-runner.js +77 -0
- package/dist/browser/audit-runner.js.map +1 -0
- package/dist/browser/index.d.ts +6 -0
- package/dist/browser/index.js +7 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/interceptor.d.ts +68 -0
- package/dist/browser/interceptor.js +257 -0
- package/dist/browser/interceptor.js.map +1 -0
- package/dist/browser/playwright.d.ts +98 -0
- package/dist/browser/playwright.js +158 -0
- package/dist/browser/playwright.js.map +1 -0
- package/dist/cli/commands/audit.d.ts +12 -0
- package/dist/cli/commands/audit.js +349 -0
- package/dist/cli/commands/audit.js.map +1 -0
- package/dist/cli/commands/interactive.d.ts +10 -0
- package/dist/cli/commands/interactive.js +34 -0
- package/dist/cli/commands/interactive.js.map +1 -0
- package/dist/cli/index.d.ts +17 -0
- package/dist/cli/index.js +84 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/options/parse-audit-options.d.ts +12 -0
- package/dist/cli/options/parse-audit-options.js +64 -0
- package/dist/cli/options/parse-audit-options.js.map +1 -0
- package/dist/core/constants.d.ts +102 -0
- package/dist/core/constants.js +214 -0
- package/dist/core/constants.js.map +1 -0
- package/dist/core/types/audit.d.ts +260 -0
- package/dist/core/types/audit.js +5 -0
- package/dist/core/types/audit.js.map +1 -0
- package/dist/core/types/index.d.ts +6 -0
- package/dist/core/types/index.js +7 -0
- package/dist/core/types/index.js.map +1 -0
- package/dist/core/types/rule.d.ts +190 -0
- package/dist/core/types/rule.js +26 -0
- package/dist/core/types/rule.js.map +1 -0
- package/dist/core/types/tool.d.ts +312 -0
- package/dist/core/types/tool.js +6 -0
- package/dist/core/types/tool.js.map +1 -0
- package/dist/detection/declarative.d.ts +27 -0
- package/dist/detection/declarative.js +343 -0
- package/dist/detection/declarative.js.map +1 -0
- package/dist/detection/imperative.d.ts +38 -0
- package/dist/detection/imperative.js +99 -0
- package/dist/detection/imperative.js.map +1 -0
- package/dist/detection/index.d.ts +5 -0
- package/dist/detection/index.js +6 -0
- package/dist/detection/index.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/advice-service.d.ts +38 -0
- package/dist/llm/advice-service.js +243 -0
- package/dist/llm/advice-service.js.map +1 -0
- package/dist/llm/evaluator.d.ts +89 -0
- package/dist/llm/evaluator.js +274 -0
- package/dist/llm/evaluator.js.map +1 -0
- package/dist/llm/index.d.ts +11 -0
- package/dist/llm/index.js +15 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/json-response.d.ts +12 -0
- package/dist/llm/json-response.js +67 -0
- package/dist/llm/json-response.js.map +1 -0
- package/dist/llm/providers/mock.d.ts +29 -0
- package/dist/llm/providers/mock.js +324 -0
- package/dist/llm/providers/mock.js.map +1 -0
- package/dist/llm/providers/openrouter.d.ts +53 -0
- package/dist/llm/providers/openrouter.js +321 -0
- package/dist/llm/providers/openrouter.js.map +1 -0
- package/dist/llm/request-cache.d.ts +28 -0
- package/dist/llm/request-cache.js +99 -0
- package/dist/llm/request-cache.js.map +1 -0
- package/dist/llm/types.d.ts +233 -0
- package/dist/llm/types.js +7 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/rules/best-practices/BP-001.d.ts +11 -0
- package/dist/rules/best-practices/BP-001.js +56 -0
- package/dist/rules/best-practices/BP-001.js.map +1 -0
- package/dist/rules/best-practices/BP-002.d.ts +11 -0
- package/dist/rules/best-practices/BP-002.js +63 -0
- package/dist/rules/best-practices/BP-002.js.map +1 -0
- package/dist/rules/best-practices/BP-003.d.ts +11 -0
- package/dist/rules/best-practices/BP-003.js +68 -0
- package/dist/rules/best-practices/BP-003.js.map +1 -0
- package/dist/rules/coverage/COV-001.d.ts +8 -0
- package/dist/rules/coverage/COV-001.js +51 -0
- package/dist/rules/coverage/COV-001.js.map +1 -0
- package/dist/rules/description/DESC-003.d.ts +13 -0
- package/dist/rules/description/DESC-003.js +96 -0
- package/dist/rules/description/DESC-003.js.map +1 -0
- package/dist/rules/description/DESC-004.d.ts +8 -0
- package/dist/rules/description/DESC-004.js +61 -0
- package/dist/rules/description/DESC-004.js.map +1 -0
- package/dist/rules/description/DESC-005.d.ts +12 -0
- package/dist/rules/description/DESC-005.js +70 -0
- package/dist/rules/description/DESC-005.js.map +1 -0
- package/dist/rules/description/index.d.ts +4 -0
- package/dist/rules/description/index.js +5 -0
- package/dist/rules/description/index.js.map +1 -0
- package/dist/rules/implementation/IMP-001.d.ts +10 -0
- package/dist/rules/implementation/IMP-001.js +36 -0
- package/dist/rules/implementation/IMP-001.js.map +1 -0
- package/dist/rules/implementation/IMP-003.d.ts +9 -0
- package/dist/rules/implementation/IMP-003.js +45 -0
- package/dist/rules/implementation/IMP-003.js.map +1 -0
- package/dist/rules/implementation/IMP-004.d.ts +9 -0
- package/dist/rules/implementation/IMP-004.js +48 -0
- package/dist/rules/implementation/IMP-004.js.map +1 -0
- package/dist/rules/implementation/IMP-005.d.ts +9 -0
- package/dist/rules/implementation/IMP-005.js +54 -0
- package/dist/rules/implementation/IMP-005.js.map +1 -0
- package/dist/rules/implementation/IMP-007.d.ts +8 -0
- package/dist/rules/implementation/IMP-007.js +79 -0
- package/dist/rules/implementation/IMP-007.js.map +1 -0
- package/dist/rules/implementation/IMP-013.d.ts +9 -0
- package/dist/rules/implementation/IMP-013.js +55 -0
- package/dist/rules/implementation/IMP-013.js.map +1 -0
- package/dist/rules/implementation/index.d.ts +9 -0
- package/dist/rules/implementation/index.js +10 -0
- package/dist/rules/implementation/index.js.map +1 -0
- package/dist/rules/index.d.ts +51 -0
- package/dist/rules/index.js +100 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/rules/llm/LLM-001.d.ts +14 -0
- package/dist/rules/llm/LLM-001.js +78 -0
- package/dist/rules/llm/LLM-001.js.map +1 -0
- package/dist/rules/llm/LLM-002.d.ts +14 -0
- package/dist/rules/llm/LLM-002.js +77 -0
- package/dist/rules/llm/LLM-002.js.map +1 -0
- package/dist/rules/llm/LLM-003.d.ts +16 -0
- package/dist/rules/llm/LLM-003.js +82 -0
- package/dist/rules/llm/LLM-003.js.map +1 -0
- package/dist/rules/llm/LLM-004.d.ts +14 -0
- package/dist/rules/llm/LLM-004.js +87 -0
- package/dist/rules/llm/LLM-004.js.map +1 -0
- package/dist/rules/llm/LLM-005.d.ts +16 -0
- package/dist/rules/llm/LLM-005.js +105 -0
- package/dist/rules/llm/LLM-005.js.map +1 -0
- package/dist/rules/llm/index.d.ts +10 -0
- package/dist/rules/llm/index.js +11 -0
- package/dist/rules/llm/index.js.map +1 -0
- package/dist/rules/runner.d.ts +54 -0
- package/dist/rules/runner.js +138 -0
- package/dist/rules/runner.js.map +1 -0
- package/dist/rules/schema/SCHEMA-001.d.ts +9 -0
- package/dist/rules/schema/SCHEMA-001.js +57 -0
- package/dist/rules/schema/SCHEMA-001.js.map +1 -0
- package/dist/rules/schema/SCHEMA-002.d.ts +9 -0
- package/dist/rules/schema/SCHEMA-002.js +59 -0
- package/dist/rules/schema/SCHEMA-002.js.map +1 -0
- package/dist/rules/schema/SCHEMA-003.d.ts +10 -0
- package/dist/rules/schema/SCHEMA-003.js +66 -0
- package/dist/rules/schema/SCHEMA-003.js.map +1 -0
- package/dist/rules/schema/SCHEMA-011.d.ts +10 -0
- package/dist/rules/schema/SCHEMA-011.js +62 -0
- package/dist/rules/schema/SCHEMA-011.js.map +1 -0
- package/dist/rules/security/SEC-001.d.ts +12 -0
- package/dist/rules/security/SEC-001.js +66 -0
- package/dist/rules/security/SEC-001.js.map +1 -0
- package/dist/rules/utils/keywords.d.ts +35 -0
- package/dist/rules/utils/keywords.js +100 -0
- package/dist/rules/utils/keywords.js.map +1 -0
- package/dist/scoring/calculator.d.ts +27 -0
- package/dist/scoring/calculator.js +194 -0
- package/dist/scoring/calculator.js.map +1 -0
- package/dist/scoring/grades.d.ts +34 -0
- package/dist/scoring/grades.js +167 -0
- package/dist/scoring/grades.js.map +1 -0
- package/dist/scoring/index.d.ts +5 -0
- package/dist/scoring/index.js +6 -0
- package/dist/scoring/index.js.map +1 -0
- package/dist/ui/banner.d.ts +21 -0
- package/dist/ui/banner.js +60 -0
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/design-tokens.d.ts +23 -0
- package/dist/ui/design-tokens.js +58 -0
- package/dist/ui/design-tokens.js.map +1 -0
- package/dist/ui/findings.d.ts +23 -0
- package/dist/ui/findings.js +190 -0
- package/dist/ui/findings.js.map +1 -0
- package/dist/ui/index.d.ts +9 -0
- package/dist/ui/index.js +10 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink/App.d.ts +14 -0
- package/dist/ui/ink/App.js +113 -0
- package/dist/ui/ink/App.js.map +1 -0
- package/dist/ui/ink/FullScreenLayout.d.ts +16 -0
- package/dist/ui/ink/FullScreenLayout.js +29 -0
- package/dist/ui/ink/FullScreenLayout.js.map +1 -0
- package/dist/ui/ink/InteractiveApp.d.ts +28 -0
- package/dist/ui/ink/InteractiveApp.js +229 -0
- package/dist/ui/ink/InteractiveApp.js.map +1 -0
- package/dist/ui/ink/RealAuditApp.d.ts +19 -0
- package/dist/ui/ink/RealAuditApp.js +170 -0
- package/dist/ui/ink/RealAuditApp.js.map +1 -0
- package/dist/ui/ink/components/AnimatedProgressBar.d.ts +20 -0
- package/dist/ui/ink/components/AnimatedProgressBar.js +46 -0
- package/dist/ui/ink/components/AnimatedProgressBar.js.map +1 -0
- package/dist/ui/ink/components/AsciiLogo.d.ts +12 -0
- package/dist/ui/ink/components/AsciiLogo.js +35 -0
- package/dist/ui/ink/components/AsciiLogo.js.map +1 -0
- package/dist/ui/ink/components/CategoryBars.d.ts +18 -0
- package/dist/ui/ink/components/CategoryBars.js +18 -0
- package/dist/ui/ink/components/CategoryBars.js.map +1 -0
- package/dist/ui/ink/components/FindingsTable.d.ts +18 -0
- package/dist/ui/ink/components/FindingsTable.js +19 -0
- package/dist/ui/ink/components/FindingsTable.js.map +1 -0
- package/dist/ui/ink/components/Footer.d.ts +15 -0
- package/dist/ui/ink/components/Footer.js +20 -0
- package/dist/ui/ink/components/Footer.js.map +1 -0
- package/dist/ui/ink/components/Header.d.ts +11 -0
- package/dist/ui/ink/components/Header.js +12 -0
- package/dist/ui/ink/components/Header.js.map +1 -0
- package/dist/ui/ink/components/LinkList.d.ts +17 -0
- package/dist/ui/ink/components/LinkList.js +44 -0
- package/dist/ui/ink/components/LinkList.js.map +1 -0
- package/dist/ui/ink/components/Navigation.d.ts +26 -0
- package/dist/ui/ink/components/Navigation.js +62 -0
- package/dist/ui/ink/components/Navigation.js.map +1 -0
- package/dist/ui/ink/components/ProgressBar.d.ts +15 -0
- package/dist/ui/ink/components/ProgressBar.js +14 -0
- package/dist/ui/ink/components/ProgressBar.js.map +1 -0
- package/dist/ui/ink/components/ScoreCard.d.ts +30 -0
- package/dist/ui/ink/components/ScoreCard.js +26 -0
- package/dist/ui/ink/components/ScoreCard.js.map +1 -0
- package/dist/ui/ink/components/SimulationResults.d.ts +33 -0
- package/dist/ui/ink/components/SimulationResults.js +23 -0
- package/dist/ui/ink/components/SimulationResults.js.map +1 -0
- package/dist/ui/ink/components/Spinner.d.ts +11 -0
- package/dist/ui/ink/components/Spinner.js +12 -0
- package/dist/ui/ink/components/Spinner.js.map +1 -0
- package/dist/ui/ink/components/ToolCard.d.ts +23 -0
- package/dist/ui/ink/components/ToolCard.js +20 -0
- package/dist/ui/ink/components/ToolCard.js.map +1 -0
- package/dist/ui/ink/components/shared/Badge.d.ts +21 -0
- package/dist/ui/ink/components/shared/Badge.js +39 -0
- package/dist/ui/ink/components/shared/Badge.js.map +1 -0
- package/dist/ui/ink/components/shared/Card.d.ts +18 -0
- package/dist/ui/ink/components/shared/Card.js +11 -0
- package/dist/ui/ink/components/shared/Card.js.map +1 -0
- package/dist/ui/ink/components/shared/HelpOverlay.d.ts +10 -0
- package/dist/ui/ink/components/shared/HelpOverlay.js +28 -0
- package/dist/ui/ink/components/shared/HelpOverlay.js.map +1 -0
- package/dist/ui/ink/components/shared/LoadingWithTimeout.d.ts +11 -0
- package/dist/ui/ink/components/shared/LoadingWithTimeout.js +21 -0
- package/dist/ui/ink/components/shared/LoadingWithTimeout.js.map +1 -0
- package/dist/ui/ink/components/shared/Menu.d.ts +23 -0
- package/dist/ui/ink/components/shared/Menu.js +43 -0
- package/dist/ui/ink/components/shared/Menu.js.map +1 -0
- package/dist/ui/ink/components/shared/Table.d.ts +23 -0
- package/dist/ui/ink/components/shared/Table.js +40 -0
- package/dist/ui/ink/components/shared/Table.js.map +1 -0
- package/dist/ui/ink/components/views/CrawlingView.d.ts +12 -0
- package/dist/ui/ink/components/views/CrawlingView.js +34 -0
- package/dist/ui/ink/components/views/CrawlingView.js.map +1 -0
- package/dist/ui/ink/components/views/DashboardView.d.ts +21 -0
- package/dist/ui/ink/components/views/DashboardView.js +51 -0
- package/dist/ui/ink/components/views/DashboardView.js.map +1 -0
- package/dist/ui/ink/components/views/FindingDetailView.d.ts +16 -0
- package/dist/ui/ink/components/views/FindingDetailView.js +34 -0
- package/dist/ui/ink/components/views/FindingDetailView.js.map +1 -0
- package/dist/ui/ink/components/views/FindingsView.d.ts +16 -0
- package/dist/ui/ink/components/views/FindingsView.js +79 -0
- package/dist/ui/ink/components/views/FindingsView.js.map +1 -0
- package/dist/ui/ink/components/views/OnboardingView.d.ts +12 -0
- package/dist/ui/ink/components/views/OnboardingView.js +40 -0
- package/dist/ui/ink/components/views/OnboardingView.js.map +1 -0
- package/dist/ui/ink/components/views/SimulationView.d.ts +17 -0
- package/dist/ui/ink/components/views/SimulationView.js +53 -0
- package/dist/ui/ink/components/views/SimulationView.js.map +1 -0
- package/dist/ui/ink/components/views/TestCaseDetailView.d.ts +11 -0
- package/dist/ui/ink/components/views/TestCaseDetailView.js +53 -0
- package/dist/ui/ink/components/views/TestCaseDetailView.js.map +1 -0
- package/dist/ui/ink/components/views/ToolDetailView.d.ts +15 -0
- package/dist/ui/ink/components/views/ToolDetailView.js +25 -0
- package/dist/ui/ink/components/views/ToolDetailView.js.map +1 -0
- package/dist/ui/ink/components/views/ToolsView.d.ts +15 -0
- package/dist/ui/ink/components/views/ToolsView.js +43 -0
- package/dist/ui/ink/components/views/ToolsView.js.map +1 -0
- package/dist/ui/ink/demo.d.ts +6 -0
- package/dist/ui/ink/demo.js +254 -0
- package/dist/ui/ink/demo.js.map +1 -0
- package/dist/ui/ink/hooks/useAnimation.d.ts +29 -0
- package/dist/ui/ink/hooks/useAnimation.js +89 -0
- package/dist/ui/ink/hooks/useAnimation.js.map +1 -0
- package/dist/ui/ink/hooks/useAudit.d.ts +69 -0
- package/dist/ui/ink/hooks/useAudit.js +99 -0
- package/dist/ui/ink/hooks/useAudit.js.map +1 -0
- package/dist/ui/ink/hooks/useCrawlAnimation.d.ts +19 -0
- package/dist/ui/ink/hooks/useCrawlAnimation.js +204 -0
- package/dist/ui/ink/hooks/useCrawlAnimation.js.map +1 -0
- package/dist/ui/ink/hooks/useKeyboardNav.d.ts +23 -0
- package/dist/ui/ink/hooks/useKeyboardNav.js +81 -0
- package/dist/ui/ink/hooks/useKeyboardNav.js.map +1 -0
- package/dist/ui/ink/hooks/useNavigation.d.ts +16 -0
- package/dist/ui/ink/hooks/useNavigation.js +42 -0
- package/dist/ui/ink/hooks/useNavigation.js.map +1 -0
- package/dist/ui/ink/hooks/useTerminalSize.d.ts +10 -0
- package/dist/ui/ink/hooks/useTerminalSize.js +29 -0
- package/dist/ui/ink/hooks/useTerminalSize.js.map +1 -0
- package/dist/ui/ink/index.d.ts +43 -0
- package/dist/ui/ink/index.js +50 -0
- package/dist/ui/ink/index.js.map +1 -0
- package/dist/ui/ink/render.d.ts +24 -0
- package/dist/ui/ink/render.js +14 -0
- package/dist/ui/ink/render.js.map +1 -0
- package/dist/ui/ink/theme.d.ts +37 -0
- package/dist/ui/ink/theme.js +38 -0
- package/dist/ui/ink/theme.js.map +1 -0
- package/dist/ui/ink/types.d.ts +77 -0
- package/dist/ui/ink/types.js +5 -0
- package/dist/ui/ink/types.js.map +1 -0
- package/dist/ui/score-display.d.ts +16 -0
- package/dist/ui/score-display.js +201 -0
- package/dist/ui/score-display.js.map +1 -0
- package/dist/ui/spinner.d.ts +45 -0
- package/dist/ui/spinner.js +112 -0
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/utils.d.ts +13 -0
- package/dist/ui/utils.js +25 -0
- package/dist/ui/utils.js.map +1 -0
- package/package.json +61 -9
- 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":"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"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../../src/core/types/audit.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -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"}
|