@aiready/cli 0.12.9 → 0.12.11

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
@@ -57,6 +57,16 @@ var TOOL_PACKAGE_MAP = {
57
57
  "deps-health": "@aiready/deps",
58
58
  "change-amp": "@aiready/change-amplification"
59
59
  };
60
+ function sanitizeToolConfig(config) {
61
+ if (!config || typeof config !== "object") return config;
62
+ const sanitized = { ...config };
63
+ import_core.GLOBAL_INFRA_OPTIONS.forEach((key) => {
64
+ if (key !== "rootDir") {
65
+ delete sanitized[key];
66
+ }
67
+ });
68
+ return sanitized;
69
+ }
60
70
  async function analyzeUnified(options) {
61
71
  const startTime = Date.now();
62
72
  const requestedTools = options.tools || [
@@ -74,8 +84,8 @@ async function analyzeUnified(options) {
74
84
  totalFiles: 0,
75
85
  toolsRun: [],
76
86
  executionTime: 0,
77
- config: options
78
- // Added as per instruction
87
+ config: options,
88
+ toolConfigs: {}
79
89
  }
80
90
  };
81
91
  for (const toolName of requestedTools) {
@@ -111,27 +121,52 @@ async function analyzeUnified(options) {
111
121
  const sanitizedConfig = { ...options };
112
122
  delete sanitizedConfig.onProgress;
113
123
  delete sanitizedConfig.progressCallback;
114
- const output = await provider.analyze({
115
- ...options,
116
- onProgress: (processed, total, message) => {
117
- if (options.progressCallback) {
118
- options.progressCallback({
119
- tool: provider.id,
120
- processed,
121
- total,
122
- message
123
- });
124
+ const toolOptions = {
125
+ rootDir: options.rootDir
126
+ // Always include rootDir
127
+ };
128
+ [...import_core.GLOBAL_INFRA_OPTIONS, ...import_core.COMMON_FINE_TUNING_OPTIONS].forEach(
129
+ (key) => {
130
+ if (key in options && key !== "toolConfigs") {
131
+ toolOptions[key] = options[key];
124
132
  }
125
133
  }
126
- });
134
+ );
135
+ if (options.toolConfigs?.[provider.id]) {
136
+ Object.assign(toolOptions, options.toolConfigs[provider.id]);
137
+ } else if (options[provider.id]) {
138
+ Object.assign(toolOptions, options[provider.id]);
139
+ }
140
+ toolOptions.onProgress = (processed, total, message) => {
141
+ if (options.progressCallback) {
142
+ options.progressCallback({
143
+ tool: provider.id,
144
+ processed,
145
+ total,
146
+ message
147
+ });
148
+ }
149
+ };
150
+ const output = await provider.analyze(toolOptions);
127
151
  if (output.metadata) {
128
- output.metadata.config = sanitizedConfig;
152
+ output.metadata.config = sanitizeToolConfig(toolOptions);
129
153
  }
130
154
  if (options.progressCallback) {
131
155
  options.progressCallback({ tool: provider.id, data: output });
132
156
  }
133
157
  result[provider.id] = output;
134
158
  result.summary.toolsRun.push(provider.id);
159
+ if (output.summary?.config) {
160
+ result.summary.toolConfigs[provider.id] = sanitizeToolConfig(
161
+ output.summary.config
162
+ );
163
+ } else if (output.metadata?.config) {
164
+ result.summary.toolConfigs[provider.id] = sanitizeToolConfig(
165
+ output.metadata.config
166
+ );
167
+ } else {
168
+ result.summary.toolConfigs[provider.id] = sanitizeToolConfig(toolOptions);
169
+ }
135
170
  const toolFiles = output.summary?.totalFiles || output.summary?.filesAnalyzed || 0;
136
171
  if (toolFiles > result.summary.totalFiles) {
137
172
  result.summary.totalFiles = toolFiles;
@@ -159,6 +194,10 @@ async function analyzeUnified(options) {
159
194
  console.error(`\u274C Error running tool '${provider.id}':`, err);
160
195
  }
161
196
  }
197
+ result.summary.config = {
198
+ ...options,
199
+ toolConfigs: result.summary.toolConfigs
200
+ };
162
201
  result.summary.executionTime = Date.now() - startTime;
163
202
  return result;
164
203
  }
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  analyzeUnified,
3
3
  generateUnifiedSummary,
4
4
  scoreUnified
5
- } from "./chunk-L4MJHD72.mjs";
5
+ } from "./chunk-OOQTTRPG.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.9",
3
+ "version": "0.12.11",
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.9",
15
- "@aiready/consistency": "0.18.9",
16
- "@aiready/context-analyzer": "0.19.9",
17
- "@aiready/deps": "0.11.9",
18
- "@aiready/core": "0.21.9",
19
- "@aiready/doc-drift": "0.11.9",
20
- "@aiready/ai-signal-clarity": "0.11.9",
21
- "@aiready/visualizer": "0.4.9",
22
- "@aiready/pattern-detect": "0.14.9",
23
- "@aiready/change-amplification": "0.11.9",
24
- "@aiready/testability": "0.4.9"
14
+ "@aiready/agent-grounding": "0.11.11",
15
+ "@aiready/context-analyzer": "0.19.11",
16
+ "@aiready/core": "0.21.11",
17
+ "@aiready/deps": "0.11.11",
18
+ "@aiready/change-amplification": "0.11.11",
19
+ "@aiready/doc-drift": "0.11.11",
20
+ "@aiready/ai-signal-clarity": "0.11.11",
21
+ "@aiready/pattern-detect": "0.14.11",
22
+ "@aiready/visualizer": "0.4.11",
23
+ "@aiready/testability": "0.4.11",
24
+ "@aiready/consistency": "0.18.11"
25
25
  },
26
26
  "devDependencies": {
27
27
  "@types/node": "^24.0.0",