@cejel/cejel 0.6.1 → 0.6.2
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 +52 -6
- package/dist/calibration/llm-detector.js +1 -1
- package/dist/{chunk-UBU3PP7P.js → chunk-KG62JCJZ.js} +25 -2
- package/dist/chunk-QDP7QWA7.js +17358 -0
- package/dist/index.js +30 -1
- package/dist/mcp/index.js +7 -17332
- package/dist/packs/d-series/index.js +6 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __cejelCreateRequire } from 'node:module';
|
|
3
3
|
const require = __cejelCreateRequire(import.meta.url);
|
|
4
|
+
import {
|
|
5
|
+
serveCejelMcpOverStdio
|
|
6
|
+
} from "./chunk-QDP7QWA7.js";
|
|
4
7
|
import {
|
|
5
8
|
CALLER_CONTEXT_PRODUCT_IDENTITY_NOTICE,
|
|
6
9
|
CERTIFICATE_GLOSSARY,
|
|
@@ -26,7 +29,7 @@ import {
|
|
|
26
29
|
runCejelScan,
|
|
27
30
|
serializeWitanReport,
|
|
28
31
|
verifyWitanAttestationBinding
|
|
29
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-KG62JCJZ.js";
|
|
30
33
|
import "./chunk-63XQDYQ5.js";
|
|
31
34
|
import {
|
|
32
35
|
external_exports
|
|
@@ -603,6 +606,13 @@ function renderTerminalCertificate(summary, report) {
|
|
|
603
606
|
""
|
|
604
607
|
);
|
|
605
608
|
}
|
|
609
|
+
if (summary.historyLimitations?.length) {
|
|
610
|
+
lines.push(
|
|
611
|
+
"HISTORY LIMITATION \u2014 scored as usual, but some criteria read truncated history:",
|
|
612
|
+
...summary.historyLimitations.map((limitation) => ` - ${limitation}`),
|
|
613
|
+
""
|
|
614
|
+
);
|
|
615
|
+
}
|
|
606
616
|
if (summary.contentReadSummary && summary.contentReadSummary.skipped > 0) {
|
|
607
617
|
const reads = summary.contentReadSummary;
|
|
608
618
|
const errnoCounts = Object.entries(reads.unreadableByErrno).map(([errno, count]) => `${errno}: ${count}`).join(", ");
|
|
@@ -812,6 +822,7 @@ Usage:
|
|
|
812
822
|
npx ${NPX_PACKAGE_NAME} scan [path] [options]
|
|
813
823
|
npx ${NPX_PACKAGE_NAME} verify <report.json> <attestation.json> [issuance.json issuance.json.sig]
|
|
814
824
|
npx ${NPX_PACKAGE_NAME} export gitlab-codequality <report.json> [-o gl-code-quality-report.json]
|
|
825
|
+
npx ${NPX_PACKAGE_NAME} mcp
|
|
815
826
|
npx ${NPX_PACKAGE_NAME} issue [path] --report <report.json> --attestation <attestation.json> --key <key.pub> --engagement-ref <ref>
|
|
816
827
|
|
|
817
828
|
Commands:
|
|
@@ -819,6 +830,7 @@ Commands:
|
|
|
819
830
|
verify verify the report/attestation binding; with an issuance pair, also check the issuer
|
|
820
831
|
signature against docs/security/${ISSUER_SIGNERS_FILE} and docs/security/${ISSUER_REVOCATIONS_FILE}
|
|
821
832
|
export write report.json's located findings as a GitLab Code Quality report (offline)
|
|
833
|
+
mcp serve the MCP server over stdio (the same server as the cejel-mcp bin)
|
|
822
834
|
issue re-run this version at the certificate's revision and, only if report.json reproduces
|
|
823
835
|
byte for byte, write an unsigned issuance.json for the issuer to sign through ssh-agent
|
|
824
836
|
|
|
@@ -857,6 +869,10 @@ async function runWitanV22CalibrationCli(args) {
|
|
|
857
869
|
}
|
|
858
870
|
async function runWitanCli(args, rubricVersion) {
|
|
859
871
|
const invocation = parseCliInvocation(args);
|
|
872
|
+
if (invocation.command === "mcp") {
|
|
873
|
+
await serveCejelMcpOverStdio({ packageName: NPX_PACKAGE_NAME, version: cliVersion() });
|
|
874
|
+
return 0;
|
|
875
|
+
}
|
|
860
876
|
if (invocation.command === "verify") {
|
|
861
877
|
return runVerifyBinding(invocation);
|
|
862
878
|
}
|
|
@@ -974,6 +990,19 @@ function parseCliInvocation(args) {
|
|
|
974
990
|
}
|
|
975
991
|
return parseExportArgs(exportArgs);
|
|
976
992
|
}
|
|
993
|
+
if (command === "mcp") {
|
|
994
|
+
const mcpArgs = args.slice(1);
|
|
995
|
+
if (mcpArgs.some((arg) => arg === "-h" || arg === "--help")) {
|
|
996
|
+
return { command: "scan", options: parseArgs(["--help"]) };
|
|
997
|
+
}
|
|
998
|
+
if (mcpArgs.some((arg) => arg === "-v" || arg === "--version")) {
|
|
999
|
+
return { command: "scan", options: parseArgs(["--version"]) };
|
|
1000
|
+
}
|
|
1001
|
+
if (mcpArgs.length > 0) {
|
|
1002
|
+
throw new Error(`cejel mcp takes no arguments; got ${mcpArgs.join(" ")}`);
|
|
1003
|
+
}
|
|
1004
|
+
return { command: "mcp" };
|
|
1005
|
+
}
|
|
977
1006
|
if (command === "issue") {
|
|
978
1007
|
const issueArgs = args.slice(1);
|
|
979
1008
|
if (issueArgs.some((arg) => arg === "-h" || arg === "--help")) {
|