@code-sentinel-cli/code-sentinel-cli 3.0.4 → 3.0.5

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/bin.js CHANGED
@@ -2386,7 +2386,7 @@ var getCliBuildMetadata = (version2) => ({
2386
2386
  "unknown"
2387
2387
  ),
2388
2388
  buildTimestamp: definedBuildValue(
2389
- "2026-08-10T06:50:57.435Z" ,
2389
+ "2026-08-10T07:21:32.211Z" ,
2390
2390
  "unknown"
2391
2391
  ),
2392
2392
  configSchemaRange: definedBuildValue(
@@ -13609,7 +13609,7 @@ var withAiApiKey = (config, credential, apiKey) => {
13609
13609
  };
13610
13610
  };
13611
13611
  var OLLAMA_DEFAULT_BASE = "http://localhost:11434";
13612
- var NETMIND_DEFAULT_BASE = "https://netmind.viettel.vn/gateway/v1";
13612
+ var NETMIND_DEFAULT_BASE = "https://example.invalid/netmind/v1";
13613
13613
  var OPENCODE_GO_DEFAULT_BASE = "https://opencode.ai/zen/go/v1";
13614
13614
  var stripTrailingSlash = (s) => s.replace(/\/+$/, "");
13615
13615
  var buildLanguageModel = (config, modelOverride) => {
@@ -23066,7 +23066,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23066
23066
  * default until M3 passes the repository's finding-quality gate.
23067
23067
  */
23068
23068
  viettelNetmind: external_exports.object({
23069
- baseUrl: external_exports.string().url().default("https://netmind.viettel.vn/gateway/v1"),
23069
+ baseUrl: external_exports.string().url().default("https://example.invalid/netmind/v1"),
23070
23070
  apiKey: external_exports.string().optional(),
23071
23071
  // Model access is team-scoped; `/models` is the source of truth.
23072
23072
  // M2.7 is the measured fast option but under-detected per-module
@@ -23074,7 +23074,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23074
23074
  // remains opt-in until the same gate has measured its recall.
23075
23075
  model: external_exports.string().default("zai-org/GLM-4.7-cc")
23076
23076
  }).default({
23077
- baseUrl: "https://netmind.viettel.vn/gateway/v1",
23077
+ baseUrl: "https://example.invalid/netmind/v1",
23078
23078
  model: "zai-org/GLM-4.7-cc"
23079
23079
  }),
23080
23080
  opencodeGo: external_exports.object({
@@ -23115,7 +23115,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23115
23115
  gemini: { model: "gemini-2.0-flash" },
23116
23116
  groq: { model: "llama-3.3-70b-versatile" },
23117
23117
  viettelNetmind: {
23118
- baseUrl: "https://netmind.viettel.vn/gateway/v1",
23118
+ baseUrl: "https://example.invalid/netmind/v1",
23119
23119
  model: "zai-org/GLM-4.7-cc"
23120
23120
  },
23121
23121
  opencodeGo: { baseUrl: "https://opencode.ai/zen/go/v1", model: "qwen3.6-plus" },
@@ -23420,7 +23420,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23420
23420
  * `${ENV_VAR}` interpolation for the token so secrets stay out of the file.
23421
23421
  */
23422
23422
  dashboard: external_exports.object({
23423
- /** Base URL of the @code-sentinel/server instance, e.g. `https://codesentinel.vtscloud.vn`. */
23423
+ /** Base URL of the @code-sentinel/server instance, e.g. `https://example.invalid/code-sentinel-dashboard`. */
23424
23424
  serverUrl: external_exports.string().url().optional(),
23425
23425
  /** Project-scoped bearer token for `POST /api/runs`. */
23426
23426
  token: external_exports.string().optional(),
@@ -23764,7 +23764,7 @@ var pathMatchesAnyGlob = (path, patterns) => {
23764
23764
  };
23765
23765
 
23766
23766
  // src/config/dashboard-defaults.ts
23767
- var DEFAULT_DASHBOARD_SERVER_URL = "https://codesentinel.vtscloud.vn";
23767
+ var DEFAULT_DASHBOARD_SERVER_URL = "https://example.invalid/code-sentinel-dashboard";
23768
23768
  var getDefaultDashboardServerUrl = () => process.env.CODE_SENTINEL_DASHBOARD_URL?.trim() || DEFAULT_DASHBOARD_SERVER_URL;
23769
23769
 
23770
23770
  // src/commands/push.command.ts
@@ -33427,7 +33427,7 @@ var providerDefaults = {
33427
33427
  },
33428
33428
  "viettel-netmind": {
33429
33429
  model: "zai-org/GLM-4.7-cc",
33430
- baseUrl: "https://netmind.viettel.vn/gateway/v1",
33430
+ baseUrl: "https://example.invalid/netmind/v1",
33431
33431
  apiKeyEnv: "LLM_API_KEY",
33432
33432
  needsApiKey: true,
33433
33433
  needsBaseUrl: true
package/dist/index.d.ts CHANGED
@@ -999,7 +999,7 @@ declare const codeReviewConfigSchema: z.ZodEffects<z.ZodObject<{
999
999
  * `${ENV_VAR}` interpolation for the token so secrets stay out of the file.
1000
1000
  */
1001
1001
  dashboard: z.ZodDefault<z.ZodObject<{
1002
- /** Base URL of the @code-sentinel/server instance, e.g. `https://codesentinel.vtscloud.vn`. */
1002
+ /** Base URL of the @code-sentinel/server instance, e.g. `https://example.invalid/code-sentinel-dashboard`. */
1003
1003
  serverUrl: z.ZodOptional<z.ZodString>;
1004
1004
  /** Project-scoped bearer token for `POST /api/runs`. */
1005
1005
  token: z.ZodOptional<z.ZodString>;
package/dist/index.js CHANGED
@@ -2386,7 +2386,7 @@ var getCliBuildMetadata = (version2) => ({
2386
2386
  "unknown"
2387
2387
  ),
2388
2388
  buildTimestamp: definedBuildValue(
2389
- "2026-08-10T06:50:57.435Z" ,
2389
+ "2026-08-10T07:21:32.211Z" ,
2390
2390
  "unknown"
2391
2391
  ),
2392
2392
  configSchemaRange: definedBuildValue(
@@ -13639,7 +13639,7 @@ var withAiApiKey = (config, credential, apiKey) => {
13639
13639
  };
13640
13640
  };
13641
13641
  var OLLAMA_DEFAULT_BASE = "http://localhost:11434";
13642
- var NETMIND_DEFAULT_BASE = "https://netmind.viettel.vn/gateway/v1";
13642
+ var NETMIND_DEFAULT_BASE = "https://example.invalid/netmind/v1";
13643
13643
  var OPENCODE_GO_DEFAULT_BASE = "https://opencode.ai/zen/go/v1";
13644
13644
  var stripTrailingSlash = (s) => s.replace(/\/+$/, "");
13645
13645
  var buildLanguageModel = (config, modelOverride) => {
@@ -23096,7 +23096,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23096
23096
  * default until M3 passes the repository's finding-quality gate.
23097
23097
  */
23098
23098
  viettelNetmind: external_exports.object({
23099
- baseUrl: external_exports.string().url().default("https://netmind.viettel.vn/gateway/v1"),
23099
+ baseUrl: external_exports.string().url().default("https://example.invalid/netmind/v1"),
23100
23100
  apiKey: external_exports.string().optional(),
23101
23101
  // Model access is team-scoped; `/models` is the source of truth.
23102
23102
  // M2.7 is the measured fast option but under-detected per-module
@@ -23104,7 +23104,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23104
23104
  // remains opt-in until the same gate has measured its recall.
23105
23105
  model: external_exports.string().default("zai-org/GLM-4.7-cc")
23106
23106
  }).default({
23107
- baseUrl: "https://netmind.viettel.vn/gateway/v1",
23107
+ baseUrl: "https://example.invalid/netmind/v1",
23108
23108
  model: "zai-org/GLM-4.7-cc"
23109
23109
  }),
23110
23110
  opencodeGo: external_exports.object({
@@ -23145,7 +23145,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23145
23145
  gemini: { model: "gemini-2.0-flash" },
23146
23146
  groq: { model: "llama-3.3-70b-versatile" },
23147
23147
  viettelNetmind: {
23148
- baseUrl: "https://netmind.viettel.vn/gateway/v1",
23148
+ baseUrl: "https://example.invalid/netmind/v1",
23149
23149
  model: "zai-org/GLM-4.7-cc"
23150
23150
  },
23151
23151
  opencodeGo: { baseUrl: "https://opencode.ai/zen/go/v1", model: "qwen3.6-plus" },
@@ -23450,7 +23450,7 @@ var codeReviewConfigObjectSchema = external_exports.object({
23450
23450
  * `${ENV_VAR}` interpolation for the token so secrets stay out of the file.
23451
23451
  */
23452
23452
  dashboard: external_exports.object({
23453
- /** Base URL of the @code-sentinel/server instance, e.g. `https://codesentinel.vtscloud.vn`. */
23453
+ /** Base URL of the @code-sentinel/server instance, e.g. `https://example.invalid/code-sentinel-dashboard`. */
23454
23454
  serverUrl: external_exports.string().url().optional(),
23455
23455
  /** Project-scoped bearer token for `POST /api/runs`. */
23456
23456
  token: external_exports.string().optional(),
@@ -23794,7 +23794,7 @@ var pathMatchesAnyGlob = (path, patterns) => {
23794
23794
  };
23795
23795
 
23796
23796
  // src/config/dashboard-defaults.ts
23797
- var DEFAULT_DASHBOARD_SERVER_URL = "https://codesentinel.vtscloud.vn";
23797
+ var DEFAULT_DASHBOARD_SERVER_URL = "https://example.invalid/code-sentinel-dashboard";
23798
23798
  var getDefaultDashboardServerUrl = () => process.env.CODE_SENTINEL_DASHBOARD_URL?.trim() || DEFAULT_DASHBOARD_SERVER_URL;
23799
23799
 
23800
23800
  // src/commands/push.command.ts
@@ -33457,7 +33457,7 @@ var providerDefaults = {
33457
33457
  },
33458
33458
  "viettel-netmind": {
33459
33459
  model: "zai-org/GLM-4.7-cc",
33460
- baseUrl: "https://netmind.viettel.vn/gateway/v1",
33460
+ baseUrl: "https://example.invalid/netmind/v1",
33461
33461
  apiKeyEnv: "LLM_API_KEY",
33462
33462
  needsApiKey: true,
33463
33463
  needsBaseUrl: true
@@ -0,0 +1,55 @@
1
+ const sortEdges = (a, b) => {
2
+ const ak = `${a.fromPath}\0${a.toPath}\0${a.kind}\0${a.symbol ?? ''}\0${a.alias ?? ''}`;
3
+ const bk = `${b.fromPath}\0${b.toPath}\0${b.kind}\0${b.symbol ?? ''}\0${b.alias ?? ''}`;
4
+ return ak.localeCompare(bk);
5
+ };
6
+
7
+ const canonicalCycleKey = (paths) => {
8
+ const body = paths.slice(0, -1);
9
+ if (body.length === 0) return '';
10
+ let best = body;
11
+ for (let i = 1; i < body.length; i++) {
12
+ const rotated = [...body.slice(i), ...body.slice(0, i)];
13
+ if (rotated.join('\0') < best.join('\0')) best = rotated;
14
+ }
15
+ return best.join('\0');
16
+ };
17
+
18
+ export const findDirectedCycles = (graph, options = {}) => {
19
+ const allowed = options.edgeKinds ? new Set(options.edgeKinds) : null;
20
+ const maxCycles = options.maxCycles ?? 50;
21
+ const cycles = [];
22
+ const seen = new Set();
23
+ const sortedPaths = graph.nodes.map((n) => n.path).sort();
24
+
25
+ const dfs = (start, current, path, edgeKinds, visiting) => {
26
+ if (cycles.length >= maxCycles) return;
27
+ const outgoing = graph
28
+ .outgoing(current)
29
+ .filter((edge) => !allowed || allowed.has(edge.kind))
30
+ .sort(sortEdges);
31
+
32
+ for (const edge of outgoing) {
33
+ if (edge.toPath === start) {
34
+ const cyclePaths = [...path, start];
35
+ const key = canonicalCycleKey(cyclePaths);
36
+ if (!seen.has(key)) {
37
+ seen.add(key);
38
+ cycles.push({ paths: cyclePaths, edgeKinds: [...edgeKinds, edge.kind] });
39
+ }
40
+ continue;
41
+ }
42
+ if (visiting.has(edge.toPath)) continue;
43
+ visiting.add(edge.toPath);
44
+ dfs(start, edge.toPath, [...path, edge.toPath], [...edgeKinds, edge.kind], visiting);
45
+ visiting.delete(edge.toPath);
46
+ }
47
+ };
48
+
49
+ for (const start of sortedPaths) {
50
+ dfs(start, start, [start], [], new Set([start]));
51
+ if (cycles.length >= maxCycles) break;
52
+ }
53
+
54
+ return cycles.sort((a, b) => a.paths.join('\0').localeCompare(b.paths.join('\0')));
55
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "@code-sentinel/core",
3
+ "version": "0.0.0-code-sentinel-shim",
4
+ "type": "module",
5
+ "exports": "./index.js"
6
+ }
@@ -0,0 +1,13 @@
1
+ export const asTreeSitterTree = (parsed) => {
2
+ if (parsed.layer !== 'syntactic') {
3
+ throw new Error(`asTreeSitterTree called on layer '${parsed.layer}' - expected 'syntactic'`);
4
+ }
5
+ return parsed.ast;
6
+ };
7
+
8
+ export const asTsMorphSourceFile = (parsed) => {
9
+ if (parsed.layer !== 'semantic-ts') {
10
+ throw new Error(`asTsMorphSourceFile called on layer '${parsed.layer}' - expected 'semantic-ts'`);
11
+ }
12
+ return parsed.ast;
13
+ };
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "@code-sentinel/parsers",
3
+ "version": "0.0.0-code-sentinel-shim",
4
+ "type": "module",
5
+ "exports": "./index.js"
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-sentinel-cli/code-sentinel-cli",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "AI-assisted code review CLI for Angular, Spring Boot, and Flutter projects.",
@@ -36,36 +36,40 @@
36
36
  "node": ">=22"
37
37
  },
38
38
  "dependencies": {
39
- "@ai-sdk/google": "^3.0.75",
40
- "@ai-sdk/groq": "^3.0.39",
41
- "@ai-sdk/openai-compatible": "^2.0.47",
42
- "@inquirer/prompts": "^7.2.1",
43
- "@libsql/client": "^0.14.0",
44
- "ai": "^6.0.185",
45
- "chokidar": "^5.0.0",
46
- "commander": "^12.1.0",
47
- "cosmiconfig": "^9.0.0",
48
- "dotenv": "^17.4.2",
49
- "drizzle-orm": "^0.36.4",
50
- "ink": "^7.0.3",
51
- "ink-spinner": "^5.0.0",
52
- "mariadb": "^3.5.3",
53
- "picocolors": "^1.1.1",
54
- "pino": "^9.5.0",
55
- "pino-pretty": "^13.0.0",
56
- "react": "^19.2.6",
57
- "tinyglobby": "^0.2.10",
58
- "tree-sitter-html": "^0.23.2",
59
- "tree-sitter-java": "^0.23.5",
60
- "tree-sitter-typescript": "^0.23.2",
61
- "ts-morph": "^24.0.0",
62
- "ulid": "^2.3.0",
63
- "web-tree-sitter": "^0.25.10",
64
- "yaml": "^2.6.1",
65
- "zod": "^3.24.1",
39
+ "@ai-sdk/google": "3.0.75",
40
+ "@ai-sdk/groq": "3.0.39",
41
+ "@ai-sdk/openai-compatible": "2.0.47",
42
+ "@inquirer/prompts": "7.10.1",
43
+ "@libsql/client": "0.14.0",
44
+ "ai": "6.0.185",
45
+ "chokidar": "5.0.0",
46
+ "commander": "12.1.0",
47
+ "cosmiconfig": "9.0.1",
48
+ "dotenv": "17.4.2",
49
+ "drizzle-orm": "0.36.4",
50
+ "ink": "7.0.3",
51
+ "ink-spinner": "5.0.0",
52
+ "mariadb": "3.5.3",
53
+ "picocolors": "1.1.1",
54
+ "pino": "9.14.0",
55
+ "pino-pretty": "13.1.3",
56
+ "react": "19.2.6",
57
+ "tinyglobby": "0.2.16",
58
+ "tree-sitter-html": "0.23.2",
59
+ "tree-sitter-java": "0.23.5",
60
+ "tree-sitter-typescript": "0.23.2",
61
+ "ts-morph": "24.0.0",
62
+ "ulid": "2.4.0",
63
+ "web-tree-sitter": "0.25.10",
64
+ "yaml": "2.9.0",
65
+ "zod": "3.25.76",
66
+ "@code-sentinel/core": "0.0.0-code-sentinel-shim",
67
+ "@code-sentinel/parsers": "0.0.0-code-sentinel-shim",
66
68
  "react-devtools-core": "0.0.0-code-sentinel-stub"
67
69
  },
68
70
  "bundledDependencies": [
71
+ "@code-sentinel/core",
72
+ "@code-sentinel/parsers",
69
73
  "react-devtools-core"
70
74
  ],
71
75
  "publishConfig": {