tribunal-kit 4.4.1 → 4.4.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.
Files changed (44) hide show
  1. package/.agent/history/architecture-graph.yaml +140 -0
  2. package/.agent/history/graph-cache.json +262 -0
  3. package/.agent/history/snapshots/bin__tribunal-kit.js.json +19 -0
  4. package/.agent/history/snapshots/eslint.config.js.json +9 -0
  5. package/.agent/history/snapshots/migrate_refs.js.json +11 -0
  6. package/.agent/history/snapshots/scripts__changelog.js.json +13 -0
  7. package/.agent/history/snapshots/scripts__sync-version.js.json +12 -0
  8. package/.agent/history/snapshots/scripts__validate-payload.js.json +12 -0
  9. package/.agent/history/snapshots/test__integration__bridges.test.js.json +14 -0
  10. package/.agent/history/snapshots/test__integration__init.test.js.json +14 -0
  11. package/.agent/history/snapshots/test__integration__routing.test.js.json +12 -0
  12. package/.agent/history/snapshots/test__integration__swarm_dispatcher.test.js.json +14 -0
  13. package/.agent/history/snapshots/test__integration__wave2.test.js.json +14 -0
  14. package/.agent/history/snapshots/test__unit__args.test.js.json +20 -0
  15. package/.agent/history/snapshots/test__unit__case_law_manager.test.js.json +11 -0
  16. package/.agent/history/snapshots/test__unit__context_broker.test.js.json +11 -0
  17. package/.agent/history/snapshots/test__unit__copyDir.test.js.json +23 -0
  18. package/.agent/history/snapshots/test__unit__graph_tools.test.js.json +12 -0
  19. package/.agent/history/snapshots/test__unit__inner_loop_validator.test.js.json +11 -0
  20. package/.agent/history/snapshots/test__unit__selfInstall.test.js.json +23 -0
  21. package/.agent/history/snapshots/test__unit__semver.test.js.json +20 -0
  22. package/.agent/history/snapshots/test__unit__swarm_dispatcher.test.js.json +12 -0
  23. package/.agent/scripts/_colors.js +170 -18
  24. package/.agent/scripts/_utils.js +244 -42
  25. package/.agent/scripts/bundle_analyzer.js +261 -290
  26. package/.agent/scripts/case_law_manager.js +1 -7
  27. package/.agent/scripts/checklist.js +278 -266
  28. package/.agent/scripts/colors.js +11 -17
  29. package/.agent/scripts/context_broker.js +1 -7
  30. package/.agent/scripts/dependency_analyzer.js +234 -272
  31. package/.agent/scripts/graph_builder.js +46 -18
  32. package/.agent/scripts/graph_visualizer.js +10 -4
  33. package/.agent/scripts/graph_zoom.js +6 -4
  34. package/.agent/scripts/inner_loop_validator.js +2 -8
  35. package/.agent/scripts/lint_runner.js +186 -187
  36. package/.agent/scripts/schema_validator.js +8 -25
  37. package/.agent/scripts/security_scan.js +276 -303
  38. package/.agent/scripts/session_manager.js +1 -7
  39. package/.agent/scripts/skill_evolution.js +1 -8
  40. package/.agent/scripts/skill_integrator.js +1 -7
  41. package/.agent/scripts/test_runner.js +186 -193
  42. package/.agent/scripts/utils.js +17 -32
  43. package/.agent/scripts/verify_all.js +248 -257
  44. package/package.json +1 -1
@@ -10,6 +10,8 @@
10
10
  const fs = require('fs');
11
11
  const path = require('path');
12
12
 
13
+ const { RED, GREEN, DIM, RESET } = require('./_colors');
14
+
13
15
  const AGENT_DIR = path.join(process.cwd(), '.agent');
14
16
  const HISTORY_DIR = path.join(AGENT_DIR, 'history');
15
17
  const CACHE_FILE = path.join(HISTORY_DIR, 'graph-cache.json');
@@ -17,7 +19,7 @@ const HTML_FILE = path.join(HISTORY_DIR, 'architecture-explorer.html');
17
19
 
18
20
  function main() {
19
21
  if (!fs.existsSync(CACHE_FILE)) {
20
- console.error('\x1b[31m✖ Error: graph-cache.json not found. Run graph_builder.js first.\x1b[0m');
22
+ console.error(`${RED}✖ Error: graph-cache.json not found. Run graph_builder.js first.${RESET}`);
21
23
  process.exit(1);
22
24
  }
23
25
 
@@ -377,8 +379,12 @@ function main() {
377
379
  </html>`;
378
380
 
379
381
  fs.writeFileSync(HTML_FILE, htmlContent);
380
- console.log(`\x1b[32m✔ Interactive visualizer generated.\x1b[0m`);
381
- console.log(` \x1b[2mSaved to: ${HTML_FILE}\x1b[0m`);
382
+ console.log(`${GREEN}✔ Interactive visualizer generated.${RESET}`);
383
+ console.log(` ${DIM}Saved to: ${HTML_FILE}${RESET}`);
382
384
  }
383
385
 
384
- main();
386
+ module.exports = { main };
387
+
388
+ if (require.main === module) {
389
+ main();
390
+ }
@@ -10,6 +10,8 @@
10
10
  const fs = require('fs');
11
11
  const path = require('path');
12
12
 
13
+ const { RED, CYAN, RESET } = require('./_colors');
14
+
13
15
  function getFlag(name) {
14
16
  const idx = process.argv.indexOf(name);
15
17
  return (idx !== -1 && process.argv[idx + 1]) ? process.argv[idx + 1] : null;
@@ -18,14 +20,14 @@ function getFlag(name) {
18
20
  const targetFile = getFlag('--focus');
19
21
 
20
22
  if (!targetFile) {
21
- console.error('\x1b[31m✖ Error: Provide a file to zoom into. Usage: node graph_zoom.js --focus <filepath>\x1b[0m');
23
+ console.error(`${RED}✖ Error: Provide a file to zoom into. Usage: node graph_zoom.js --focus <filepath>${RESET}`);
22
24
  process.exit(1);
23
25
  }
24
26
 
25
27
  const absolutePath = path.resolve(process.cwd(), targetFile);
26
28
 
27
29
  if (!fs.existsSync(absolutePath)) {
28
- console.error(`\x1b[31m✖ Error: File not found at ${absolutePath}\x1b[0m`);
30
+ console.error(`${RED}✖ Error: File not found at ${absolutePath}${RESET}`);
29
31
  process.exit(1);
30
32
  }
31
33
 
@@ -119,7 +121,7 @@ function extractSkeleton(content) {
119
121
  }
120
122
 
121
123
  function main() {
122
- console.log(`\x1b[96m✦ Zooming into: ${targetFile}\x1b[0m`);
124
+ console.log(`${CYAN}✦ Zooming into: ${targetFile}${RESET}`);
123
125
 
124
126
  try {
125
127
  const content = fs.readFileSync(absolutePath, 'utf8');
@@ -142,7 +144,7 @@ function main() {
142
144
  console.log('--- SKELETON END ---\n');
143
145
 
144
146
  } catch (e) {
145
- console.error(`\x1b[31m✖ Error parsing file: ${e.message}\x1b[0m`);
147
+ console.error(`${RED}✖ Error parsing file: ${e.message}${RESET}`);
146
148
  // Fallback Logic: Return truncated raw on hard failure
147
149
  const rawContent = fs.readFileSync(absolutePath, 'utf8').split('\n').slice(0, 100).join('\n');
148
150
  console.log('\n--- RAW FILE FALLBACK (100 lines) ---');
@@ -120,14 +120,8 @@ const SYNTAX_HEURISTICS = [
120
120
  },
121
121
  ];
122
122
 
123
- // ── ANSI colors (inline to avoid deps on colors.js path) ─────────────────
124
- const GREEN = '\x1b[92m';
125
- const YELLOW = '\x1b[93m';
126
- const RED = '\x1b[91m';
127
- const CYAN = '\x1b[96m';
128
- const BOLD = '\x1b[1m';
129
- const DIM = '\x1b[2m';
130
- const RESET = '\x1b[0m';
123
+ // ── ANSI colors (centralized via _colors.js) ─────────────────────────────
124
+ const { GREEN, YELLOW, RED, CYAN, BOLD, DIM, RESET } = require('./_colors');
131
125
 
132
126
  // ── Core scanning ─────────────────────────────────────────────────────────
133
127
 
@@ -1,187 +1,186 @@
1
- #!/usr/bin/env node
2
- /**
3
- * lint_runner.js — Standalone lint runner for the Tribunal Agent Kit.
4
- *
5
- * Usage:
6
- * node .agent/scripts/lint_runner.js .
7
- * node .agent/scripts/lint_runner.js . --fix
8
- * node .agent/scripts/lint_runner.js . --files src/index.ts src/utils.ts
9
- */
10
-
11
- 'use strict';
12
-
13
- const fs = require('fs');
14
- const path = require('path');
15
- const { spawnSync } = require('child_process');
16
-
17
- const { RED, GREEN, YELLOW, BLUE, BOLD, RESET } = require('./colors.js');
18
-
19
- function header(title) {
20
- console.log(`\n${BOLD}${BLUE}━━━ ${title} ━━━${RESET}`);
21
- }
22
-
23
- function ok(msg) {
24
- console.log(` ${GREEN}✅ ${msg}${RESET}`);
25
- }
26
-
27
- function fail(msg) {
28
- console.log(` ${RED}❌ ${msg}${RESET}`);
29
- }
30
-
31
- function skip(msg) {
32
- console.log(` ${YELLOW}⏭️ ${msg}${RESET}`);
33
- }
34
-
35
- function runLinter(label, cmd, cwd) {
36
- try {
37
- const executable = process.platform === 'win32' && cmd[0] === 'npx' ? 'npx.cmd' : cmd[0];
38
- const result = spawnSync(executable, cmd.slice(1), {
39
- cwd,
40
- encoding: 'utf8',
41
- timeout: 120000,
42
- shell: process.platform === 'win32'
43
- });
44
-
45
- if (result.status === 0) {
46
- ok(`${label} — clean`);
47
- return true;
48
- }
49
-
50
- fail(`${label} issues found`);
51
- if (result.error) {
52
- console.log(` Error: ${result.error.message}`);
53
- }
54
- const out = result.stdout ? result.stdout.toString() : '';
55
- const err = result.stderr ? result.stderr.toString() : '';
56
- const output = (out + "\n" + err).trim();
57
- if (output) {
58
- const lines = output.split('\n');
59
- for (const line of lines.slice(0, 15)) {
60
- console.log(` ${line}`);
61
- }
62
- if (lines.length > 15) {
63
- console.log(` ... and ${lines.length - 15} more lines`);
64
- }
65
- }
66
- return false;
67
- } catch {
68
- skip(`${label} — tool not installed`);
69
- return true;
70
- }
71
- }
72
-
73
- function detectLinters(projectRoot) {
74
- const available = {};
75
- const pkgJson = path.join(projectRoot, "package.json");
76
-
77
- if (fs.existsSync(pkgJson)) {
78
- const eslintFiles = [".eslintrc", ".eslintrc.js", ".eslintrc.json", ".eslintrc.yml", "eslint.config.js", "eslint.config.mjs"];
79
- available.eslint = eslintFiles.some(f => fs.existsSync(path.join(projectRoot, f)));
80
-
81
- const prettierFiles = [".prettierrc", ".prettierrc.js", ".prettierrc.json", "prettier.config.js"];
82
- available.prettier = prettierFiles.some(f => fs.existsSync(path.join(projectRoot, f)));
83
- }
84
-
85
- available.ruff = fs.existsSync(path.join(projectRoot, "pyproject.toml")) || fs.existsSync(path.join(projectRoot, "ruff.toml"));
86
- available.flake8 = fs.existsSync(path.join(projectRoot, ".flake8")) || fs.existsSync(path.join(projectRoot, "setup.cfg"));
87
-
88
- return available;
89
- }
90
-
91
- function main() {
92
- const args = process.argv.slice(2);
93
- let targetPath = null;
94
- let fixFlag = false;
95
- let fileArgs = [];
96
-
97
- let i = 0;
98
- while (i < args.length) {
99
- if (args[i] === '--fix') fixFlag = true;
100
- else if (args[i] === '--files') {
101
- i++;
102
- while (i < args.length && !args[i].startsWith('--')) {
103
- fileArgs.push(args[i++]);
104
- }
105
- continue;
106
- } else if (!targetPath && !args[i].startsWith('-')) {
107
- targetPath = args[i];
108
- }
109
- i++;
110
- }
111
-
112
- if (!targetPath) {
113
- console.log("Usage: node lint_runner.js <path> [--fix] [--files <file1> <file2> ...]");
114
- process.exit(1);
115
- }
116
-
117
- const projectRoot = path.resolve(targetPath);
118
- if (!fs.existsSync(projectRoot) || !fs.statSync(projectRoot).isDirectory()) {
119
- fail(`Directory not found: ${projectRoot}`);
120
- process.exit(1);
121
- }
122
-
123
- console.log(`${BOLD}Tribunal — lint_runner.js${RESET}`);
124
- console.log(`Project: ${projectRoot}`);
125
-
126
- const available = detectLinters(projectRoot);
127
- if (!Object.values(available).some(Boolean)) {
128
- skip("No linter configuration detected in this project");
129
- process.exit(0);
130
- }
131
-
132
- let failures = 0;
133
-
134
- if (available.eslint) {
135
- header("ESLint");
136
- const cmd = ["npx", "eslint"];
137
- if (fixFlag) cmd.push("--fix");
138
- if (fileArgs.length) cmd.push(...fileArgs);
139
- else cmd.push(".", "--max-warnings=0");
140
- if (!runLinter("ESLint", cmd, projectRoot)) failures++;
141
- }
142
-
143
- if (available.prettier) {
144
- header("Prettier");
145
- const cmd = ["npx", "prettier"];
146
- if (fixFlag) cmd.push("--write");
147
- else cmd.push("--check");
148
- if (fileArgs.length) cmd.push(...fileArgs);
149
- else cmd.push(".");
150
- if (!runLinter("Prettier", cmd, projectRoot)) failures++;
151
- }
152
-
153
- if (available.ruff) {
154
- header("Ruff (Python)");
155
- const cmd = ["ruff", "check"];
156
- if (fixFlag) cmd.push("--fix");
157
- if (fileArgs.length) cmd.push(...fileArgs);
158
- else cmd.push(".");
159
- if (!runLinter("Ruff", cmd, projectRoot)) failures++;
160
- }
161
-
162
- if (available.flake8 && !available.ruff) {
163
- header("Flake8 (Python)");
164
- const cmd = ["flake8"];
165
- if (fileArgs.length) cmd.push(...fileArgs);
166
- else cmd.push(".");
167
- if (!runLinter("Flake8", cmd, projectRoot)) failures++;
168
- }
169
-
170
- if (fs.existsSync(path.join(projectRoot, "tsconfig.json"))) {
171
- header("TypeScript");
172
- if (!runLinter("TypeScript", ["npx", "tsc", "--noEmit"], projectRoot)) failures++;
173
- }
174
-
175
- console.log(`\n${BOLD}━━━ Lint Summary ━━━${RESET}`);
176
- if (failures === 0) {
177
- ok("All linters passed");
178
- } else {
179
- fail(`${failures} linter(s) reported issues`);
180
- }
181
-
182
- process.exit(failures > 0 ? 1 : 0);
183
- }
184
-
185
- if (require.main === module) {
186
- main();
187
- }
1
+ #!/usr/bin/env node
2
+ /**
3
+ * lint_runner.js — Standalone lint runner for the Tribunal Agent Kit.
4
+ *
5
+ * Usage:
6
+ * node .agent/scripts/lint_runner.js .
7
+ * node .agent/scripts/lint_runner.js . --fix
8
+ * node .agent/scripts/lint_runner.js . --files src/index.ts src/utils.ts
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const fs = require('fs');
14
+ const path = require('path');
15
+ const { spawnSync } = require('child_process');
16
+
17
+ const {
18
+ RED, GREEN, YELLOW, BLUE, BOLD, DIM, CYAN, RESET,
19
+ banner, sectionHeader, summaryTable, timer, formatMs,
20
+ ok, fail, skip,
21
+ } = require('./_colors');
22
+
23
+ const RESULTS = [];
24
+
25
+ function runLinter(label, cmd, cwd) {
26
+ const elapsed = timer();
27
+ try {
28
+ const executable = process.platform === 'win32' && cmd[0] === 'npx' ? 'npx.cmd' : cmd[0];
29
+ const result = spawnSync(executable, cmd.slice(1), {
30
+ cwd,
31
+ encoding: 'utf8',
32
+ timeout: 120000,
33
+ shell: process.platform === 'win32'
34
+ });
35
+
36
+ const ms = elapsed();
37
+ if (result.status === 0) {
38
+ ok(`${label} clean ${DIM}(${formatMs(ms)})${RESET}`);
39
+ RESULTS.push({ name: label, status: 'pass', ms });
40
+ return true;
41
+ }
42
+
43
+ fail(`${label} — issues found ${DIM}(${formatMs(ms)})${RESET}`);
44
+ RESULTS.push({ name: label, status: 'fail', ms });
45
+ if (result.error) {
46
+ console.log(` Error: ${result.error.message}`);
47
+ }
48
+ const out = result.stdout ? result.stdout.toString() : '';
49
+ const err = result.stderr ? result.stderr.toString() : '';
50
+ const output = (out + "\n" + err).trim();
51
+ if (output) {
52
+ const lines = output.split('\n');
53
+ for (const line of lines.slice(0, 15)) {
54
+ console.log(` ${line}`);
55
+ }
56
+ if (lines.length > 15) {
57
+ console.log(` ... and ${lines.length - 15} more lines`);
58
+ }
59
+ }
60
+ return false;
61
+ } catch {
62
+ skip(`${label} tool not installed`);
63
+ RESULTS.push({ name: label, status: 'skip' });
64
+ return true;
65
+ }
66
+ }
67
+
68
+ function detectLinters(projectRoot) {
69
+ const available = {};
70
+ const pkgJson = path.join(projectRoot, "package.json");
71
+
72
+ if (fs.existsSync(pkgJson)) {
73
+ const eslintFiles = [".eslintrc", ".eslintrc.js", ".eslintrc.json", ".eslintrc.yml", "eslint.config.js", "eslint.config.mjs"];
74
+ available.eslint = eslintFiles.some(f => fs.existsSync(path.join(projectRoot, f)));
75
+
76
+ const prettierFiles = [".prettierrc", ".prettierrc.js", ".prettierrc.json", "prettier.config.js"];
77
+ available.prettier = prettierFiles.some(f => fs.existsSync(path.join(projectRoot, f)));
78
+ }
79
+
80
+ available.ruff = fs.existsSync(path.join(projectRoot, "pyproject.toml")) || fs.existsSync(path.join(projectRoot, "ruff.toml"));
81
+ available.flake8 = fs.existsSync(path.join(projectRoot, ".flake8")) || fs.existsSync(path.join(projectRoot, "setup.cfg"));
82
+
83
+ return available;
84
+ }
85
+
86
+ function main() {
87
+ const args = process.argv.slice(2);
88
+ let targetPath = null;
89
+ let fixFlag = false;
90
+ let fileArgs = [];
91
+
92
+ let i = 0;
93
+ while (i < args.length) {
94
+ if (args[i] === '--fix') fixFlag = true;
95
+ else if (args[i] === '--files') {
96
+ i++;
97
+ while (i < args.length && !args[i].startsWith('--')) {
98
+ fileArgs.push(args[i++]);
99
+ }
100
+ continue;
101
+ } else if (!targetPath && !args[i].startsWith('-')) {
102
+ targetPath = args[i];
103
+ }
104
+ i++;
105
+ }
106
+
107
+ if (!targetPath) {
108
+ console.log("Usage: node lint_runner.js <path> [--fix] [--files <file1> <file2> ...]");
109
+ process.exit(1);
110
+ }
111
+
112
+ const projectRoot = path.resolve(targetPath);
113
+ if (!fs.existsSync(projectRoot) || !fs.statSync(projectRoot).isDirectory()) {
114
+ fail(`Directory not found: ${projectRoot}`);
115
+ process.exit(1);
116
+ }
117
+
118
+ console.log(banner('lint_runner.js', { Project: projectRoot, Mode: fixFlag ? 'fix' : 'check' }));
119
+
120
+ const available = detectLinters(projectRoot);
121
+ if (!Object.values(available).some(Boolean)) {
122
+ skip("No linter configuration detected in this project");
123
+ process.exit(0);
124
+ }
125
+
126
+ RESULTS.length = 0;
127
+ let failures = 0;
128
+
129
+ if (available.eslint) {
130
+ console.log(sectionHeader('ESLint'));
131
+ const cmd = ["npx", "eslint"];
132
+ if (fixFlag) cmd.push("--fix");
133
+ if (fileArgs.length) cmd.push(...fileArgs);
134
+ else cmd.push(".", "--max-warnings=0");
135
+ if (!runLinter("ESLint", cmd, projectRoot)) failures++;
136
+ }
137
+
138
+ if (available.prettier) {
139
+ console.log(sectionHeader('Prettier'));
140
+ const cmd = ["npx", "prettier"];
141
+ if (fixFlag) cmd.push("--write");
142
+ else cmd.push("--check");
143
+ if (fileArgs.length) cmd.push(...fileArgs);
144
+ else cmd.push(".");
145
+ if (!runLinter("Prettier", cmd, projectRoot)) failures++;
146
+ }
147
+
148
+ if (available.ruff) {
149
+ console.log(sectionHeader('Ruff (Python)'));
150
+ const cmd = ["ruff", "check"];
151
+ if (fixFlag) cmd.push("--fix");
152
+ if (fileArgs.length) cmd.push(...fileArgs);
153
+ else cmd.push(".");
154
+ if (!runLinter("Ruff", cmd, projectRoot)) failures++;
155
+ }
156
+
157
+ if (available.flake8 && !available.ruff) {
158
+ console.log(sectionHeader('Flake8 (Python)'));
159
+ const cmd = ["flake8"];
160
+ if (fileArgs.length) cmd.push(...fileArgs);
161
+ else cmd.push(".");
162
+ if (!runLinter("Flake8", cmd, projectRoot)) failures++;
163
+ }
164
+
165
+ if (fs.existsSync(path.join(projectRoot, "tsconfig.json"))) {
166
+ console.log(sectionHeader('TypeScript'));
167
+ if (!runLinter("TypeScript", ["npx", "tsc", "--noEmit"], projectRoot)) failures++;
168
+ }
169
+
170
+ console.log(`\n${BOLD}${CYAN}━━━ Lint Summary ━━━${RESET}`);
171
+ if (RESULTS.length > 0) {
172
+ summaryTable(RESULTS);
173
+ }
174
+
175
+ if (failures === 0) {
176
+ console.log(`\n${GREEN}${BOLD} ✔ All linters passed.${RESET}\n`);
177
+ } else {
178
+ console.log(`\n${RED}${BOLD} ✖ ${failures} linter(s) reported issues.${RESET}\n`);
179
+ }
180
+
181
+ process.exit(failures > 0 ? 1 : 0);
182
+ }
183
+
184
+ if (require.main === module) {
185
+ main();
186
+ }
@@ -13,27 +13,10 @@
13
13
  const fs = require('fs');
14
14
  const path = require('path');
15
15
 
16
- const { RED, GREEN, YELLOW, BLUE, BOLD, RESET } = require('./colors.js');
17
-
18
- function header(title) {
19
- console.log(`\n${BOLD}${BLUE}━━━ ${title} ━━━${RESET}`);
20
- }
21
-
22
- function ok(msg) {
23
- console.log(` ${GREEN}✅ ${msg}${RESET}`);
24
- }
25
-
26
- function fail(msg) {
27
- console.log(` ${RED}❌ ${msg}${RESET}`);
28
- }
29
-
30
- function warn(msg) {
31
- console.log(` ${YELLOW}⚠️ ${msg}${RESET}`);
32
- }
33
-
34
- function skip(msg) {
35
- console.log(` ${YELLOW}⏭️ ${msg}${RESET}`);
36
- }
16
+ const {
17
+ RED, GREEN, YELLOW, BLUE, BOLD, DIM, CYAN, RESET,
18
+ sectionHeader: header, ok, fail, warn, skip,
19
+ } = require('./_colors');
37
20
 
38
21
  function detectOrm(projectRoot) {
39
22
  if (fs.existsSync(path.join(projectRoot, "prisma", "schema.prisma"))) {
@@ -221,7 +204,7 @@ function main() {
221
204
  let issuesCount = 0;
222
205
 
223
206
  if (fileArg) {
224
- header(`Validating: ${fileArg}`);
207
+ console.log(header(`Validating: ${fileArg}`));
225
208
  const filepath = path.isAbsolute(fileArg) ? fileArg : path.join(projectRoot, fileArg);
226
209
  let issues = [];
227
210
  if (filepath.endsWith(".prisma")) issues = validatePrisma(filepath);
@@ -239,7 +222,7 @@ function main() {
239
222
  } else if (ormType === "prisma") {
240
223
  const schemaPath = path.join(projectRoot, "prisma", "schema.prisma");
241
224
  if (fs.existsSync(schemaPath)) {
242
- header("Prisma Schema Validation");
225
+ console.log(header("Prisma Schema Validation"));
243
226
  const issues = validatePrisma(schemaPath);
244
227
  for (const [severity, message, line] of issues) {
245
228
  if (severity === "error") { fail(`L${line}: ${message}`); issuesCount++; }
@@ -250,7 +233,7 @@ function main() {
250
233
  skip(`Prisma schema not found at ${schemaPath}`);
251
234
  }
252
235
  } else if (ormType === "sql") {
253
- header("SQL Migration Validation");
236
+ console.log(header("SQL Migration Validation"));
254
237
  // Very basic recursion for migrations dir
255
238
  function findMigrations(dir) {
256
239
  let res = [];
@@ -281,7 +264,7 @@ function main() {
281
264
  }
282
265
  }
283
266
  } else if (ormType === "drizzle") {
284
- header("Drizzle Schema");
267
+ console.log(header("Drizzle Schema"));
285
268
  skip("Drizzle validation not yet implemented — validate manually");
286
269
  }
287
270