@certscore/mcp 0.2.12 → 0.2.16
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/README.md +151 -45
- package/dist/certscore-mcp.mjs +4377 -3997
- package/dist/index.js +1 -1
- package/dist/server.d.ts +42 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +388 -124
- package/dist/tools.d.ts +43 -59
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +1303 -65
- package/package.json +13 -12
- package/server-light.json +21 -6
- package/server.json +2 -2
package/dist/tools.d.ts
CHANGED
|
@@ -1,8 +1,35 @@
|
|
|
1
1
|
import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
|
|
2
2
|
import { type FindingList, type JobStatus, type PreConsentCookiesTrackers, type PulseDetail, type PulseFormat, type PulseResult, type ScanResource, type TopFinding } from "@certscore/sdk";
|
|
3
3
|
export declare const MAX_EVIDENCE_PACKET_CHARS = 250000;
|
|
4
|
-
|
|
4
|
+
type ScanProvenanceMode = "new_scan_started" | "existing_completed_scan_reused" | "existing_scan_retrieved" | "unknown";
|
|
5
|
+
type ActionableError = {
|
|
6
|
+
code: string;
|
|
7
|
+
message: string;
|
|
8
|
+
retryable: boolean;
|
|
9
|
+
retryAfterSeconds: number | null;
|
|
10
|
+
recommendedNextAction: string;
|
|
11
|
+
field?: string;
|
|
12
|
+
mcpCode?: number;
|
|
13
|
+
};
|
|
14
|
+
export declare function toToolResult(payload: unknown, text?: string): CallToolResult;
|
|
5
15
|
export declare function toToolError(error: unknown): CallToolResult;
|
|
16
|
+
export declare function toInvalidArgumentsToolError(errorMessage: string): CallToolResult;
|
|
17
|
+
export declare function toInvalidScanIdToolError(): CallToolResult;
|
|
18
|
+
export declare function withMcpAgentGuidance<T extends Record<string, any>>(value: T, fallbackProvenanceMode?: ScanProvenanceMode): T & {
|
|
19
|
+
error: ActionableError | null;
|
|
20
|
+
observationOnlyDisclaimer: string;
|
|
21
|
+
};
|
|
22
|
+
export declare function withMcpScanProvenanceGuidance(value: Record<string, any>, fallbackProvenanceMode: ScanProvenanceMode): {
|
|
23
|
+
interpretationGuidance: {
|
|
24
|
+
scoreLabel: "CertScore score";
|
|
25
|
+
observableSignalsOnly: true;
|
|
26
|
+
doNotInferUnobservedTechnologies: true;
|
|
27
|
+
doNotInferLegalComplianceStatus: true;
|
|
28
|
+
statement: string;
|
|
29
|
+
};
|
|
30
|
+
error: ActionableError | null;
|
|
31
|
+
observationOnlyDisclaimer: string;
|
|
32
|
+
};
|
|
6
33
|
export declare function boundEvidencePacket<T>(payload: T, maxSerializedChars?: number): T | Record<string, unknown>;
|
|
7
34
|
export declare function normalizeDetail(detail: PulseDetail | undefined): PulseDetail;
|
|
8
35
|
export declare function normalizeFormat(format: PulseFormat | undefined): PulseFormat;
|
|
@@ -37,69 +64,25 @@ export declare function paginateFindingList<T extends Record<string, unknown>>(p
|
|
|
37
64
|
export declare function limitPreConsentRows<T extends Record<string, unknown>>(payload: T, options?: {
|
|
38
65
|
maxRows?: number;
|
|
39
66
|
}): T;
|
|
67
|
+
export declare function scanStatusText(value: Record<string, any>): string;
|
|
68
|
+
export declare function findingListText(value: Record<string, any>, label?: string): string;
|
|
69
|
+
export declare function preConsentInventoryText(value: Record<string, any>): string;
|
|
70
|
+
export declare function pulseReportText(value: Record<string, any>, label?: string): string;
|
|
71
|
+
export declare function markdownReportText(value: Record<string, any>): string;
|
|
72
|
+
export declare function scanBundleText(bundle: Record<string, any>): string;
|
|
40
73
|
export declare function buildScanBundle(input: {
|
|
41
|
-
evidence
|
|
74
|
+
detail?: "summary" | "findings" | "evidence" | "full";
|
|
75
|
+
evidence?: PulseResult | null;
|
|
42
76
|
findings: FindingList;
|
|
43
77
|
maxFindings?: number;
|
|
78
|
+
maxBytes?: number;
|
|
44
79
|
maxPreConsentRows?: number;
|
|
45
|
-
preConsentCookiesTrackers
|
|
46
|
-
report: PulseResult;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
type: string;
|
|
50
|
-
scanId: string;
|
|
51
|
-
status: import("packages/certscore-sdk/dist/types.js").PulseJobStatus;
|
|
52
|
-
resultDisposition: "no_go" | null;
|
|
53
|
-
noGo: import("@certscore/sdk").ScanNoGoResult | null;
|
|
80
|
+
preConsentCookiesTrackers?: PreConsentCookiesTrackers | null;
|
|
81
|
+
report: PulseResult | null;
|
|
82
|
+
requestedMaxBytes?: number;
|
|
83
|
+
responseCeilingBytes?: number;
|
|
54
84
|
scan: ScanResource;
|
|
55
|
-
|
|
56
|
-
summary: {} | null;
|
|
57
|
-
executiveSummary: {} | null;
|
|
58
|
-
counts: {} | null;
|
|
59
|
-
coverage: {} | null;
|
|
60
|
-
agentInterpretation: {} | null;
|
|
61
|
-
};
|
|
62
|
-
findings: import("packages/certscore-sdk/dist/types.js").FindingSummary[];
|
|
63
|
-
findingsMetadata: {
|
|
64
|
-
shown: number;
|
|
65
|
-
total: number;
|
|
66
|
-
truncated: boolean;
|
|
67
|
-
};
|
|
68
|
-
evidenceSummary: {
|
|
69
|
-
evidenceSafetyNotes: {} | null;
|
|
70
|
-
projectionDiagnostics: {} | null;
|
|
71
|
-
projectedFindings: unknown;
|
|
72
|
-
coverageDiagnostics: unknown;
|
|
73
|
-
policySurfaceCoverage: unknown;
|
|
74
|
-
};
|
|
75
|
-
preConsentCookiesTrackers: {
|
|
76
|
-
summary: {
|
|
77
|
-
[key: string]: unknown;
|
|
78
|
-
rowCount: number;
|
|
79
|
-
trackerCount: number;
|
|
80
|
-
cookieCount: number;
|
|
81
|
-
requestCount: number;
|
|
82
|
-
totalRowCount?: number;
|
|
83
|
-
truncated?: boolean;
|
|
84
|
-
};
|
|
85
|
-
rows: import("packages/certscore-sdk/dist/types.js").PreConsentCookiesTrackersRow[];
|
|
86
|
-
shown: number;
|
|
87
|
-
total: number;
|
|
88
|
-
truncated: boolean;
|
|
89
|
-
};
|
|
90
|
-
links: {
|
|
91
|
-
[key: string]: string | undefined;
|
|
92
|
-
self?: string;
|
|
93
|
-
status?: string;
|
|
94
|
-
findings?: string;
|
|
95
|
-
pulse?: string;
|
|
96
|
-
report?: string;
|
|
97
|
-
latestDomainScan?: string;
|
|
98
|
-
docs?: string;
|
|
99
|
-
};
|
|
100
|
-
recommendedNextTool: string | null;
|
|
101
|
-
disclaimer: string | null;
|
|
102
|
-
};
|
|
85
|
+
}): Record<string, any>;
|
|
103
86
|
export declare function explainFinding(report: PulseResult, findingId: string): {
|
|
104
87
|
type: string;
|
|
105
88
|
scanId: string | null;
|
|
@@ -143,4 +126,5 @@ export declare function explainFinding(report: PulseResult, findingId: string):
|
|
|
143
126
|
message?: undefined;
|
|
144
127
|
availableFindingIds?: undefined;
|
|
145
128
|
};
|
|
129
|
+
export {};
|
|
146
130
|
//# sourceMappingURL=tools.d.ts.map
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,yBAAyB,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5M,eAAO,MAAM,yBAAyB,SAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAkB,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,KAAK,yBAAyB,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5M,eAAO,MAA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