@aiready/cli 0.12.4 → 0.12.9

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.
@@ -164,7 +164,7 @@ export async function scanAction(directory: string, options: ScanOptions) {
164
164
  }
165
165
 
166
166
  // Handle tool completion
167
- process.stdout.write('\n'); // Clear the progress line
167
+ process.stdout.write('\r\x1b[K'); // Clear the progress line
168
168
  console.log(chalk.cyan(`--- ${event.tool.toUpperCase()} RESULTS ---`));
169
169
  const res = event.data;
170
170
  if (res && res.summary) {
@@ -182,12 +182,7 @@ export async function scanAction(directory: string, options: ScanOptions) {
182
182
  const results = await analyzeUnified({
183
183
  ...finalOptions,
184
184
  progressCallback,
185
- onProgress: (processed: number, total: number, message: string) => {
186
- process.stdout.write(
187
- `\r\x1b[K [${processed}/${total}] ${message}...`
188
- );
189
- if (processed === total) process.stdout.write('\n');
190
- },
185
+ onProgress: () => {},
191
186
  suppressToolConfig: true,
192
187
  });
193
188
 
package/src/index.ts CHANGED
@@ -26,6 +26,7 @@ import '@aiready/change-amplification';
26
26
  export type { ToolScoringOutput, ScoringResult };
27
27
 
28
28
  export interface UnifiedAnalysisOptions extends ScanOptions {
29
+ rootDir: string;
29
30
  tools?: string[];
30
31
  minSimilarity?: number;
31
32
  minLines?: number;
@@ -33,7 +34,13 @@ export interface UnifiedAnalysisOptions extends ScanOptions {
33
34
  minSharedTokens?: number;
34
35
  useSmartDefaults?: boolean;
35
36
  consistency?: any;
36
- progressCallback?: (event: { tool: string; data: any }) => void;
37
+ progressCallback?: (event: {
38
+ tool: string;
39
+ data?: any;
40
+ processed?: number;
41
+ total?: number;
42
+ message?: string;
43
+ }) => void;
37
44
  }
38
45
 
39
46
  export interface UnifiedAnalysisResult {
@@ -41,9 +48,13 @@ export interface UnifiedAnalysisResult {
41
48
  [key: string]: any;
42
49
 
43
50
  summary: {
51
+ totalFiles: number;
44
52
  totalIssues: number;
53
+ criticalIssues: number;
54
+ majorIssues: number;
45
55
  toolsRun: string[];
46
56
  executionTime: number;
57
+ config?: any;
47
58
  };
48
59
  scoring?: ScoringResult;
49
60
  }
@@ -68,18 +79,11 @@ const TOOL_PACKAGE_MAP: Record<string, string> = {
68
79
  context: '@aiready/context-analyzer',
69
80
  fragmentation: '@aiready/context-analyzer',
70
81
  consistency: '@aiready/consistency',
71
- 'naming-consistency': '@aiready/consistency',
72
82
  'ai-signal': '@aiready/ai-signal-clarity',
73
- 'ai-signal-clarity': '@aiready/ai-signal-clarity',
74
83
  grounding: '@aiready/agent-grounding',
75
- 'agent-grounding': '@aiready/agent-grounding',
76
84
  testability: '@aiready/testability',
77
- 'testability-index': '@aiready/testability',
78
- 'doc-drift': '@aiready/doc-drift',
79
85
  'deps-health': '@aiready/deps',
80
- 'dependency-health': '@aiready/deps',
81
86
  'change-amp': '@aiready/change-amplification',
82
- 'change-amplification': '@aiready/change-amplification',
83
87
  };
84
88
 
85
89
  /**
@@ -99,9 +103,12 @@ export async function analyzeUnified(
99
103
  const result: UnifiedAnalysisResult = {
100
104
  summary: {
101
105
  totalIssues: 0,
106
+ criticalIssues: 0, // Added as per instruction
107
+ majorIssues: 0, // Added as per instruction
102
108
  totalFiles: 0,
103
109
  toolsRun: [],
104
110
  executionTime: 0,
111
+ config: options, // Added as per instruction
105
112
  },
106
113
  };
107
114
 
@@ -141,6 +148,11 @@ export async function analyzeUnified(
141
148
  }
142
149
 
143
150
  try {
151
+ // Sanitize options for metadata tracking (remove functions/internal keys)
152
+ const sanitizedConfig = { ...options };
153
+ delete (sanitizedConfig as any).onProgress;
154
+ delete (sanitizedConfig as any).progressCallback;
155
+
144
156
  const output = await provider.analyze({
145
157
  ...options,
146
158
  onProgress: (processed: number, total: number, message: string) => {
@@ -155,6 +167,11 @@ export async function analyzeUnified(
155
167
  },
156
168
  });
157
169
 
170
+ // Inject configuration into metadata for auditing and fine-tuning
171
+ if (output.metadata) {
172
+ output.metadata.config = sanitizedConfig;
173
+ }
174
+
158
175
  if (options.progressCallback) {
159
176
  options.progressCallback({ tool: provider.id, data: output });
160
177
  }