@cejel/cejel 0.4.4 → 0.4.6

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.
@@ -4,7 +4,7 @@ const require = __cejelCreateRequire(import.meta.url);
4
4
  import {
5
5
  __export,
6
6
  init_esm_shims
7
- } from "./chunk-R4DPQLS2.js";
7
+ } from "./chunk-H55KECVT.js";
8
8
 
9
9
  // node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js
10
10
  var external_exports = {};
package/dist/index.js CHANGED
@@ -2,26 +2,30 @@
2
2
  import { createRequire as __cejelCreateRequire } from 'node:module';
3
3
  const require = __cejelCreateRequire(import.meta.url);
4
4
  import {
5
+ CALLER_CONTEXT_PRODUCT_IDENTITY_NOTICE,
5
6
  CERTIFICATE_GLOSSARY,
7
+ PROSPECTIVE_RUBRIC_NOTICE,
6
8
  WITAN_RUBRIC_VERSION_V22,
7
9
  WitanReportSchema,
10
+ assertSelectableRubricVersion,
8
11
  buildRelyingPartySummary,
9
12
  createWitanAttestation,
10
13
  formatCertificateMetricLabel,
11
14
  formatCertificateMetricValue,
12
15
  formatExternalSourceLine,
16
+ isProspectiveRubricVersion,
13
17
  renderWitanBadgeEndpoint,
14
18
  renderWitanBadgeSvg,
15
19
  renderWitanHtmlReport,
16
20
  runCejelScan,
17
21
  serializeWitanReport,
18
22
  verifyWitanAttestationBinding
19
- } from "./chunk-PJEKYFVM.js";
20
- import "./chunk-EPK7UTIK.js";
21
- import "./chunk-KGFGX3TP.js";
23
+ } from "./chunk-VEJLHO5F.js";
24
+ import "./chunk-BZXBLDCJ.js";
25
+ import "./chunk-Y6NO5HAI.js";
22
26
  import {
23
27
  init_esm_shims
24
- } from "./chunk-R4DPQLS2.js";
28
+ } from "./chunk-H55KECVT.js";
25
29
 
26
30
  // src/index.ts
27
31
  init_esm_shims();
@@ -65,10 +69,11 @@ function renderTerminalCertificate(summary, report) {
65
69
  ` Process trust: ${formatScore(summary.processTrustScore)}/4.0`,
66
70
  ""
67
71
  ];
72
+ lines.splice(1, 0, `Product identity: ${CALLER_CONTEXT_PRODUCT_IDENTITY_NOTICE}`);
68
73
  if (report) {
69
74
  const relyingPartySummary = buildRelyingPartySummary(report);
70
75
  lines.splice(
71
- 2,
76
+ 3,
72
77
  0,
73
78
  `What was examined: ${relyingPartySummary.examined}`,
74
79
  `What was established: ${relyingPartySummary.established}`,
@@ -155,6 +160,9 @@ function renderTerminalCertificate(summary, report) {
155
160
  for (const entry of CERTIFICATE_GLOSSARY) {
156
161
  lines.push(` ${entry.term} \u2014 ${entry.definition}`);
157
162
  }
163
+ if (report && isProspectiveRubricVersion(report.rubricVersion)) {
164
+ lines.unshift(`Rubric: ${report.rubricVersion}`, PROSPECTIVE_RUBRIC_NOTICE, "");
165
+ }
158
166
  return `${lines.join("\n")}
159
167
  `;
160
168
  }
@@ -178,10 +186,16 @@ var CLI_FLAG_SPECS = [
178
186
  description: "exit nonzero below this overall score",
179
187
  kind: "minScore"
180
188
  },
189
+ {
190
+ tokens: ["--product-name"],
191
+ value: "<name>",
192
+ description: "set caller-context slug and display name for reproducible certificates",
193
+ kind: "productName"
194
+ },
181
195
  {
182
196
  tokens: ["--name"],
183
197
  value: "<display>",
184
- description: "override the project name shown on the certificate",
198
+ description: "override only the displayed project name (legacy compatibility)",
185
199
  kind: "name"
186
200
  },
187
201
  {
@@ -190,6 +204,12 @@ var CLI_FLAG_SPECS = [
190
204
  description: "fold in a SARIF/JSON scanner report (repeatable)",
191
205
  kind: "ingest"
192
206
  },
207
+ {
208
+ tokens: ["--rubric-pin"],
209
+ value: "<version>",
210
+ description: "EXPLICIT OPT-IN: pin a rubric other than the calibrated default (see docs); prospective rubrics carry no calibration claim",
211
+ kind: "rubricPin"
212
+ },
193
213
  {
194
214
  tokens: ["--quiet"],
195
215
  description: "suppress the terminal summary",
@@ -287,10 +307,12 @@ async function runWitanCli(args, rubricVersion) {
287
307
  process.stdout.write(USAGE);
288
308
  return 0;
289
309
  }
310
+ const effectiveRubricVersion = options.rubricPin ?? rubricVersion;
290
311
  const { report, summary, generatedAt } = runCejelScan({
291
312
  repoPath: options.repoPath,
313
+ ...options.productName ? { productName: options.productName } : {},
292
314
  ...options.productDisplayName ? { productDisplayName: options.productDisplayName } : {},
293
- ...rubricVersion ? { rubricVersion } : {},
315
+ ...effectiveRubricVersion ? { rubricVersion: effectiveRubricVersion } : {},
294
316
  ingestPatterns: options.ingestPatterns,
295
317
  warnOnEmptyIngestMatch: !options.quiet
296
318
  });
@@ -425,10 +447,12 @@ function parseArgs(args) {
425
447
  let repoPath;
426
448
  let outDir = DEFAULT_OUT_DIR;
427
449
  let minScore;
450
+ let productName;
428
451
  let productDisplayName;
429
452
  let quiet = false;
430
453
  let showHelp = false;
431
454
  let showVersion = false;
455
+ let rubricPin;
432
456
  const ingestPatterns = [];
433
457
  for (let index = 0; index < args.length; index += 1) {
434
458
  const arg = args[index];
@@ -479,6 +503,19 @@ function parseArgs(args) {
479
503
  index += 1;
480
504
  break;
481
505
  }
506
+ case "productName": {
507
+ const value = args[index + 1];
508
+ if (!value) throw new Error("Missing value for --product-name");
509
+ const trimmed = value.trim();
510
+ if (trimmed.length === 0 || trimmed.length > 120 || hasUnsafeDisplayNameCharacter(trimmed)) {
511
+ throw new Error(
512
+ "--product-name must be a single printable line containing between 1 and 120 characters"
513
+ );
514
+ }
515
+ productName = trimmed;
516
+ index += 1;
517
+ break;
518
+ }
482
519
  case "ingest": {
483
520
  const value = args[index + 1];
484
521
  if (!value) throw new Error("Missing value for --ingest");
@@ -486,6 +523,14 @@ function parseArgs(args) {
486
523
  index += 1;
487
524
  break;
488
525
  }
526
+ case "rubricPin": {
527
+ const value = args[index + 1];
528
+ if (!value) throw new Error("Missing value for --rubric-pin");
529
+ assertSelectableRubricVersion(value);
530
+ rubricPin = value;
531
+ index += 1;
532
+ break;
533
+ }
489
534
  }
490
535
  continue;
491
536
  }
@@ -495,15 +540,20 @@ function parseArgs(args) {
495
540
  throw new Error(`Unexpected positional argument: ${arg}`);
496
541
  }
497
542
  }
543
+ if (productName && productDisplayName) {
544
+ throw new Error("--product-name and --name cannot be used together");
545
+ }
498
546
  return {
499
547
  repoPath: resolve(repoPath ?? "."),
500
548
  outDir,
501
549
  ...minScore != null ? { minScore } : {},
550
+ ...productName ? { productName } : {},
502
551
  ...productDisplayName ? { productDisplayName } : {},
503
552
  quiet,
504
553
  showHelp,
505
554
  showVersion,
506
- ingestPatterns
555
+ ingestPatterns,
556
+ ...rubricPin ? { rubricPin } : {}
507
557
  };
508
558
  }
509
559
  function hasUnsafeDisplayNameCharacter(value) {
package/dist/mcp/index.js CHANGED
@@ -5,20 +5,20 @@ import {
5
5
  renderWitanBadgeSvg,
6
6
  renderWitanHtmlReport,
7
7
  runCejelScan
8
- } from "../chunk-PJEKYFVM.js";
9
- import "../chunk-EPK7UTIK.js";
8
+ } from "../chunk-VEJLHO5F.js";
9
+ import "../chunk-BZXBLDCJ.js";
10
10
  import {
11
11
  ZodFirstPartyTypeKind,
12
12
  ZodOptional,
13
13
  external_exports,
14
14
  objectType
15
- } from "../chunk-KGFGX3TP.js";
15
+ } from "../chunk-Y6NO5HAI.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __export,
19
19
  __toESM,
20
20
  init_esm_shims
21
- } from "../chunk-R4DPQLS2.js";
21
+ } from "../chunk-H55KECVT.js";
22
22
 
23
23
  // node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
24
24
  var require_code = __commonJS({
@@ -3,18 +3,18 @@ import { createRequire as __cejelCreateRequire } from 'node:module';
3
3
  const require = __cejelCreateRequire(import.meta.url);
4
4
  import {
5
5
  listCejelLlmPackFiles
6
- } from "../../chunk-RW6YJVHZ.js";
6
+ } from "../../chunk-QRWLHTGR.js";
7
7
  import {
8
8
  execGit
9
- } from "../../chunk-EPK7UTIK.js";
9
+ } from "../../chunk-BZXBLDCJ.js";
10
10
  import {
11
11
  require_typescript
12
- } from "../../chunk-EW6NAHE4.js";
12
+ } from "../../chunk-2IBG5OBF.js";
13
13
  import {
14
14
  __toESM,
15
15
  init_esm_shims,
16
16
  readRepoText
17
- } from "../../chunk-R4DPQLS2.js";
17
+ } from "../../chunk-H55KECVT.js";
18
18
 
19
19
  // src/packs/d-series/index.ts
20
20
  init_esm_shims();
@@ -3,15 +3,15 @@ import { createRequire as __cejelCreateRequire } from 'node:module';
3
3
  const require = __cejelCreateRequire(import.meta.url);
4
4
  import {
5
5
  external_exports
6
- } from "../../chunk-KGFGX3TP.js";
6
+ } from "../../chunk-Y6NO5HAI.js";
7
7
  import {
8
8
  require_typescript
9
- } from "../../chunk-EW6NAHE4.js";
9
+ } from "../../chunk-2IBG5OBF.js";
10
10
  import {
11
11
  __toESM,
12
12
  init_esm_shims,
13
13
  readRepoText
14
- } from "../../chunk-R4DPQLS2.js";
14
+ } from "../../chunk-H55KECVT.js";
15
15
 
16
16
  // src/packs/decision-contracts/index.ts
17
17
  init_esm_shims();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cejel/cejel",
3
- "version": "0.4.4",
3
+ "version": "0.4.6",
4
4
  "mcpName": "io.github.BargLabs/cejel",
5
5
  "private": false,
6
6
  "publishConfig": {