@code-sentinel-cli/code-sentinel-cli 3.0.12 → 4.0.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 (4) hide show
  1. package/dist/bin.js +46899 -40932
  2. package/dist/index.d.ts +35 -11
  3. package/dist/index.js +47148 -41174
  4. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -390,6 +390,12 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
390
390
  * ADR-0011.
391
391
  */
392
392
  provider: z.ZodDefault<z.ZodEnum<["ollama", "gemini", "groq", "viettel-netmind", "opencode-go", "openai-compatible", "none"]>>;
393
+ /**
394
+ * Fallback providers are opt-in. Keeping a fallback list in config is
395
+ * harmless, but it must not silently route source code to another
396
+ * provider unless this switch is explicitly enabled.
397
+ */
398
+ fallbackEnabled: z.ZodDefault<z.ZodBoolean>;
393
399
  fallback: z.ZodDefault<z.ZodArray<z.ZodEnum<["ollama", "gemini", "groq", "viettel-netmind", "opencode-go", "openai-compatible"]>, "many">>;
394
400
  temperature: z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]> | z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
395
401
  timeoutMs: z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]> | z.ZodDefault<z.ZodUnion<[z.ZodNumber, z.ZodPipeline<z.ZodEffects<z.ZodString, number, string>, z.ZodNumber>]>>;
@@ -478,16 +484,28 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
478
484
  apiKey?: string | undefined;
479
485
  }>>;
480
486
  /**
481
- * Viettel internal AI gateway. OpenAI-compatible endpoint. Default
482
- * baseUrl + model match the live netmind deployment. As of 2026-08-04
483
- * the gateway exposes `MiniMax/MiniMax-M3`, `MiniMax/MiniMax-M2.7`,
484
- * and `zai-org/GLM-4.7-cc`. MiniMax M3 is the default for the
485
- * NetMind-backed server queue; GLM remains available as an option.
487
+ * Viettel internal AI gateway. OpenAI-compatible endpoint.
488
+ *
489
+ * ⚠️ **Model access is TEAM-SCOPED and it MOVES. `/models` is the only source of truth** —
490
+ * never write an id here from memory or from a vendor page. MEASURED 2026-09-02 against the
491
+ * live gateway, the team is entitled to exactly TWO: `MiniMax/MiniMax-M3` and
492
+ * `zai-org/GLM-5.3-Flash`. The 2026-08-04 line-up in this comment (`M2.7`, `GLM-4.7-cc`) is
493
+ * already gone, which is the point. Casing is part of the id — `GLM-5.3-Flash`, not
494
+ * `-flash`; this project has twice paid for a guessed id, once on the `-cc` suffix
495
+ * (`zai-org/GLM-4.7` → `team_model_access_denied`) and once on a key written as the literal
496
+ * `{all-team-models}`. Probe with `node scripts/probe-netmind.mjs` before changing it.
497
+ *
498
+ * ⚠️ **Changing this default changes what the eval-gated AI rules run under.**
499
+ * `docs/security/AI-RULE-PRECISION.md` measured `spring-boot/security-authorization-risk`
500
+ * under `MiniMax/MiniMax-M3`, and `ai-signal-fold` gates on the model FAILING CLOSED — so
501
+ * `cs assess --fold-ai-findings` correctly reports `INCONCLUSIVE` for #18/#25/#45/#46 until
502
+ * that eval is re-run under this model. That is the gate working, not a regression, but it
503
+ * does turn a shipped capability off until someone re-measures.
486
504
  */
487
505
  viettelNetmind: z.ZodDefault<z.ZodObject<{
488
506
  baseUrl: z.ZodDefault<z.ZodString>;
489
507
  apiKey: z.ZodOptional<z.ZodString>;
490
- model: z.ZodDefault<z.ZodString>;
508
+ model: z.ZodDefault<z.ZodEffects<z.ZodString, string, string>>;
491
509
  }, "strip", z.ZodTypeAny, {
492
510
  model: string;
493
511
  baseUrl: string;
@@ -547,6 +565,7 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
547
565
  apiKey?: string | undefined;
548
566
  };
549
567
  provider: "ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible" | "none";
568
+ fallbackEnabled: boolean;
550
569
  fallback: ("ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible")[];
551
570
  temperature: number;
552
571
  timeoutMs: number;
@@ -598,6 +617,7 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
598
617
  apiKey?: string | undefined;
599
618
  } | undefined;
600
619
  provider?: "ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible" | "none" | undefined;
620
+ fallbackEnabled?: boolean | undefined;
601
621
  fallback?: ("ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible")[] | undefined;
602
622
  temperature?: string | number | undefined;
603
623
  timeoutMs?: string | number | undefined;
@@ -1234,6 +1254,7 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1234
1254
  apiKey?: string | undefined;
1235
1255
  };
1236
1256
  provider: "ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible" | "none";
1257
+ fallbackEnabled: boolean;
1237
1258
  fallback: ("ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible")[];
1238
1259
  temperature: number;
1239
1260
  timeoutMs: number;
@@ -1419,6 +1440,7 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1419
1440
  apiKey?: string | undefined;
1420
1441
  } | undefined;
1421
1442
  provider?: "ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible" | "none" | undefined;
1443
+ fallbackEnabled?: boolean | undefined;
1422
1444
  fallback?: ("ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible")[] | undefined;
1423
1445
  temperature?: string | number | undefined;
1424
1446
  timeoutMs?: string | number | undefined;
@@ -1604,6 +1626,7 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
1604
1626
  apiKey?: string | undefined;
1605
1627
  };
1606
1628
  provider: "ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible" | "none";
1629
+ fallbackEnabled: boolean;
1607
1630
  fallback: ("ollama" | "gemini" | "groq" | "viettel-netmind" | "opencode-go" | "openai-compatible")[];
1608
1631
  temperature: number;
1609
1632
  timeoutMs: number;
@@ -1989,11 +2012,12 @@ declare const runQuickstart: (options?: LocalReadinessOptions) => Promise<number
1989
2012
  * - balanced: 12–24 GB RAM. Default for most laptops.
1990
2013
  * - performance: ≥24 GB RAM. Larger workloads + parallel AI calls.
1991
2014
  *
1992
- * Returns a config object the review pipeline can consume. Today only
1993
- * `aiConcurrency` is wired (AI rule dispatch parallelism within a file
1994
- * via Promise.allSettled). `workers` is informational — kept for the
1995
- * future Piscina worker-pool integration, deliberately deferred until
1996
- * dogfood data justifies the complexity (see JOURNAL Phase 9.3 entry).
2015
+ * Returns a config object the review pipeline can consume. `aiConcurrency`
2016
+ * is a bounded global cap: AI requests from different files (and multiple
2017
+ * rules in one file) may overlap up to this limit. `workers` is informational
2018
+ * — kept for the future Piscina worker-pool integration, deliberately
2019
+ * deferred until dogfood data justifies the complexity (see JOURNAL Phase
2020
+ * 9.3 entry).
1997
2021
  */
1998
2022
  type Mode = 'economy' | 'balanced' | 'performance';
1999
2023