@aiready/cli 0.12.8 → 0.12.10

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/index.js CHANGED
@@ -51,19 +51,22 @@ var TOOL_PACKAGE_MAP = {
51
51
  context: "@aiready/context-analyzer",
52
52
  fragmentation: "@aiready/context-analyzer",
53
53
  consistency: "@aiready/consistency",
54
- "naming-consistency": "@aiready/consistency",
55
54
  "ai-signal": "@aiready/ai-signal-clarity",
56
- "ai-signal-clarity": "@aiready/ai-signal-clarity",
57
55
  grounding: "@aiready/agent-grounding",
58
- "agent-grounding": "@aiready/agent-grounding",
59
56
  testability: "@aiready/testability",
60
- "testability-index": "@aiready/testability",
61
- "doc-drift": "@aiready/doc-drift",
62
57
  "deps-health": "@aiready/deps",
63
- "dependency-health": "@aiready/deps",
64
- "change-amp": "@aiready/change-amplification",
65
- "change-amplification": "@aiready/change-amplification"
58
+ "change-amp": "@aiready/change-amplification"
66
59
  };
60
+ function sanitizeToolConfig(config) {
61
+ if (!config || typeof config !== "object") return config;
62
+ const sanitized = { ...config };
63
+ import_core.GLOBAL_SCAN_OPTIONS.forEach((key) => {
64
+ if (key !== "rootDir") {
65
+ delete sanitized[key];
66
+ }
67
+ });
68
+ return sanitized;
69
+ }
67
70
  async function analyzeUnified(options) {
68
71
  const startTime = Date.now();
69
72
  const requestedTools = options.tools || [
@@ -74,9 +77,15 @@ async function analyzeUnified(options) {
74
77
  const result = {
75
78
  summary: {
76
79
  totalIssues: 0,
80
+ criticalIssues: 0,
81
+ // Added as per instruction
82
+ majorIssues: 0,
83
+ // Added as per instruction
77
84
  totalFiles: 0,
78
85
  toolsRun: [],
79
- executionTime: 0
86
+ executionTime: 0,
87
+ config: options,
88
+ toolConfigs: {}
80
89
  }
81
90
  };
82
91
  for (const toolName of requestedTools) {
@@ -109,24 +118,53 @@ async function analyzeUnified(options) {
109
118
  continue;
110
119
  }
111
120
  try {
112
- const output = await provider.analyze({
113
- ...options,
114
- onProgress: (processed, total, message) => {
115
- if (options.progressCallback) {
116
- options.progressCallback({
117
- tool: provider.id,
118
- processed,
119
- total,
120
- message
121
- });
122
- }
121
+ const sanitizedConfig = { ...options };
122
+ delete sanitizedConfig.onProgress;
123
+ delete sanitizedConfig.progressCallback;
124
+ const toolOptions = {
125
+ rootDir: options.rootDir
126
+ // Always include rootDir
127
+ };
128
+ import_core.GLOBAL_SCAN_OPTIONS.forEach((key) => {
129
+ if (key in options && key !== "toolConfigs") {
130
+ toolOptions[key] = options[key];
123
131
  }
124
132
  });
133
+ if (options.toolConfigs?.[provider.id]) {
134
+ Object.assign(toolOptions, options.toolConfigs[provider.id]);
135
+ } else if (options[provider.id]) {
136
+ Object.assign(toolOptions, options[provider.id]);
137
+ }
138
+ toolOptions.onProgress = (processed, total, message) => {
139
+ if (options.progressCallback) {
140
+ options.progressCallback({
141
+ tool: provider.id,
142
+ processed,
143
+ total,
144
+ message
145
+ });
146
+ }
147
+ };
148
+ const output = await provider.analyze(toolOptions);
149
+ if (output.metadata) {
150
+ output.metadata.config = sanitizeToolConfig(toolOptions);
151
+ }
125
152
  if (options.progressCallback) {
126
153
  options.progressCallback({ tool: provider.id, data: output });
127
154
  }
128
155
  result[provider.id] = output;
129
156
  result.summary.toolsRun.push(provider.id);
157
+ if (output.summary?.config) {
158
+ result.summary.toolConfigs[provider.id] = sanitizeToolConfig(
159
+ output.summary.config
160
+ );
161
+ } else if (output.metadata?.config) {
162
+ result.summary.toolConfigs[provider.id] = sanitizeToolConfig(
163
+ output.metadata.config
164
+ );
165
+ } else {
166
+ result.summary.toolConfigs[provider.id] = sanitizeToolConfig(toolOptions);
167
+ }
130
168
  const toolFiles = output.summary?.totalFiles || output.summary?.filesAnalyzed || 0;
131
169
  if (toolFiles > result.summary.totalFiles) {
132
170
  result.summary.totalFiles = toolFiles;
@@ -154,6 +192,10 @@ async function analyzeUnified(options) {
154
192
  console.error(`\u274C Error running tool '${provider.id}':`, err);
155
193
  }
156
194
  }
195
+ result.summary.config = {
196
+ ...options,
197
+ toolConfigs: result.summary.toolConfigs
198
+ };
157
199
  result.summary.executionTime = Date.now() - startTime;
158
200
  return result;
159
201
  }
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  analyzeUnified,
3
3
  generateUnifiedSummary,
4
4
  scoreUnified
5
- } from "./chunk-7K3CNS6C.mjs";
5
+ } from "./chunk-YNGTO2UX.mjs";
6
6
  export {
7
7
  analyzeUnified,
8
8
  generateUnifiedSummary,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/cli",
3
- "version": "0.12.8",
3
+ "version": "0.12.10",
4
4
  "description": "Unified CLI for AIReady analysis tools",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -11,17 +11,17 @@
11
11
  "dependencies": {
12
12
  "chalk": "^5.3.0",
13
13
  "commander": "^14.0.0",
14
- "@aiready/agent-grounding": "0.11.8",
15
- "@aiready/deps": "0.11.8",
16
- "@aiready/doc-drift": "0.11.8",
17
- "@aiready/change-amplification": "0.11.8",
18
- "@aiready/pattern-detect": "0.14.8",
19
- "@aiready/context-analyzer": "0.19.8",
20
- "@aiready/core": "0.21.8",
21
- "@aiready/ai-signal-clarity": "0.11.8",
22
- "@aiready/testability": "0.4.8",
23
- "@aiready/visualizer": "0.4.8",
24
- "@aiready/consistency": "0.18.8"
14
+ "@aiready/agent-grounding": "0.11.10",
15
+ "@aiready/context-analyzer": "0.19.10",
16
+ "@aiready/deps": "0.11.10",
17
+ "@aiready/consistency": "0.18.10",
18
+ "@aiready/doc-drift": "0.11.10",
19
+ "@aiready/core": "0.21.10",
20
+ "@aiready/pattern-detect": "0.14.10",
21
+ "@aiready/ai-signal-clarity": "0.11.10",
22
+ "@aiready/testability": "0.4.10",
23
+ "@aiready/change-amplification": "0.11.10",
24
+ "@aiready/visualizer": "0.4.10"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^24.0.0",