@aiready/cli 0.12.8 → 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.
- package/.turbo/turbo-build.log +9 -7
- package/.turbo/turbo-test.log +18 -18
- package/dist/chunk-L4MJHD72.mjs +239 -0
- package/dist/cli.js +14 -9
- package/dist/cli.mjs +1 -1
- package/dist/index.js +14 -9
- package/dist/index.mjs +1 -1
- package/package.json +12 -12
- package/src/.aiready/aiready-report-20260307-132956.json +57041 -0
- package/src/index.ts +25 -8
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.12.
|
|
3
|
+
> @aiready/cli@0.12.8 build /Users/pengcao/projects/aiready/packages/cli
|
|
4
4
|
> tsup src/index.ts src/cli.ts --format cjs,esm
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
[34mCLI[39m Target: es2020
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
|
-
|
|
12
|
+
|
|
13
|
+
[90m[[90m1:29:18 PM[90m][39m [43m[30m WARN [39m[49m [33m▲ [43;33m[[43;30mWARNING[43;33m][0m [1m"import.meta" is not available with the "cjs" output format and will be empty[0m [empty-import-meta]
|
|
13
14
|
|
|
14
15
|
src/cli.ts:25:31:
|
|
15
16
|
[37m 25 │ return dirname(fileURLToPath([32mimport.meta[37m.url));
|
|
@@ -18,10 +19,11 @@
|
|
|
18
19
|
You need to set the output format to "esm" for "import.meta" to work correctly.
|
|
19
20
|
|
|
20
21
|
|
|
22
|
+
|
|
23
|
+
[32mCJS[39m [1mdist/index.js [22m[32m8.48 KB[39m
|
|
24
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m67.06 KB[39m
|
|
25
|
+
[32mCJS[39m ⚡️ Build success in 27ms
|
|
21
26
|
[32mESM[39m [1mdist/cli.mjs [22m[32m56.62 KB[39m
|
|
22
27
|
[32mESM[39m [1mdist/index.mjs [22m[32m170.00 B[39m
|
|
23
|
-
[32mESM[39m [1mdist/chunk-
|
|
24
|
-
[32mESM[39m ⚡️ Build success in
|
|
25
|
-
[32mCJS[39m [1mdist/cli.js [22m[32m67.00 KB[39m
|
|
26
|
-
[32mCJS[39m [1mdist/index.js [22m[32m8.42 KB[39m
|
|
27
|
-
[32mCJS[39m ⚡️ Build success in 82ms
|
|
28
|
+
[32mESM[39m [1mdist/chunk-L4MJHD72.mjs [22m[32m7.35 KB[39m
|
|
29
|
+
[32mESM[39m ⚡️ Build success in 27ms
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.12.
|
|
3
|
+
> @aiready/cli@0.12.8 test /Users/pengcao/projects/aiready/packages/cli
|
|
4
4
|
> vitest run
|
|
5
5
|
|
|
6
6
|
[?25l
|
|
7
7
|
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/Users/pengcao/projects/aiready/packages/cli[39m
|
|
8
8
|
|
|
9
9
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
10
|
-
[22m[39m[ToolRegistry#0.
|
|
10
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: pattern-detect (patterns, duplicates, duplication)
|
|
11
11
|
|
|
12
12
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
13
|
-
[22m[39m[ToolRegistry#0.
|
|
13
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: context-analyzer (context, fragmentation, budget)
|
|
14
14
|
|
|
15
15
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
16
|
-
[22m[39m[ToolRegistry#0.
|
|
16
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: naming-consistency (consistency, naming, standards)
|
|
17
17
|
|
|
18
18
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
19
|
-
[22m[39m[ToolRegistry#0.
|
|
19
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: ai-signal-clarity (ai-signal, clarity, hallucination)
|
|
20
20
|
|
|
21
21
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
22
|
-
[22m[39m[ToolRegistry#0.
|
|
22
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: agent-grounding (agent-grounding, grounding, navigation)
|
|
23
23
|
|
|
24
24
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
25
|
-
[22m[39m[ToolRegistry#0.
|
|
25
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: testability-index (testability, tests, verification)
|
|
26
26
|
|
|
27
27
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
28
|
-
[22m[39m[ToolRegistry#0.
|
|
28
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: doc-drift (doc-drift, docs, jsdoc)
|
|
29
29
|
|
|
30
30
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
31
|
-
[22m[39m[ToolRegistry#0.
|
|
31
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: dependency-health (deps, deps-health, packages)
|
|
32
32
|
|
|
33
33
|
[90mstdout[2m | src/__tests__/cli.test.ts
|
|
34
|
-
[22m[39m[ToolRegistry#0.
|
|
34
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: change-amplification (change-amp, change-amplification, coupling)
|
|
35
35
|
|
|
36
36
|
[90mstdout[2m | src/__tests__/cli.test.ts[2m > [22m[2mCLI Unified Analysis[2m > [22m[2mshould run unified analysis with both tools
|
|
37
|
-
[22m[39m[ToolRegistry#0.
|
|
38
|
-
[ToolRegistry#0.
|
|
37
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: pattern-detect (patterns)
|
|
38
|
+
[ToolRegistry#0.3730169166647759] Registering tool: context-analyzer (context)
|
|
39
39
|
|
|
40
40
|
[90mstdout[2m | src/__tests__/cli.test.ts[2m > [22m[2mCLI Unified Analysis[2m > [22m[2mshould run analysis with only patterns tool
|
|
41
|
-
[22m[39m[ToolRegistry#0.
|
|
42
|
-
[ToolRegistry#0.
|
|
41
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: pattern-detect (patterns)
|
|
42
|
+
[ToolRegistry#0.3730169166647759] Registering tool: context-analyzer (context)
|
|
43
43
|
|
|
44
44
|
[90mstdout[2m | src/__tests__/cli.test.ts[2m > [22m[2mCLI Unified Analysis[2m > [22m[2mshould run analysis with only context tool
|
|
45
|
-
[22m[39m[ToolRegistry#0.
|
|
46
|
-
[ToolRegistry#0.
|
|
45
|
+
[22m[39m[ToolRegistry#0.3730169166647759] Registering tool: pattern-detect (patterns)
|
|
46
|
+
[ToolRegistry#0.3730169166647759] Registering tool: context-analyzer (context)
|
|
47
47
|
|
|
48
48
|
[32m✓[39m src/__tests__/cli.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
49
49
|
|
|
50
50
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
51
51
|
[2m Tests [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
52
|
-
[2m Start at [22m 13:
|
|
53
|
-
[2m Duration [22m
|
|
52
|
+
[2m Start at [22m 13:29:35
|
|
53
|
+
[2m Duration [22m 402ms[2m (transform 106ms, setup 0ms, import 320ms, tests 3ms, environment 0ms)[22m
|
|
54
54
|
|
|
55
55
|
[?25h
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
// src/index.ts
|
|
9
|
+
import {
|
|
10
|
+
ToolRegistry,
|
|
11
|
+
ToolName,
|
|
12
|
+
calculateOverallScore,
|
|
13
|
+
calculateTokenBudget
|
|
14
|
+
} from "@aiready/core";
|
|
15
|
+
import "@aiready/pattern-detect";
|
|
16
|
+
import "@aiready/context-analyzer";
|
|
17
|
+
import "@aiready/consistency";
|
|
18
|
+
import "@aiready/ai-signal-clarity";
|
|
19
|
+
import "@aiready/agent-grounding";
|
|
20
|
+
import "@aiready/testability";
|
|
21
|
+
import "@aiready/doc-drift";
|
|
22
|
+
import "@aiready/deps";
|
|
23
|
+
import "@aiready/change-amplification";
|
|
24
|
+
var TOOL_PACKAGE_MAP = {
|
|
25
|
+
[ToolName.PatternDetect]: "@aiready/pattern-detect",
|
|
26
|
+
[ToolName.ContextAnalyzer]: "@aiready/context-analyzer",
|
|
27
|
+
[ToolName.NamingConsistency]: "@aiready/consistency",
|
|
28
|
+
[ToolName.AiSignalClarity]: "@aiready/ai-signal-clarity",
|
|
29
|
+
[ToolName.AgentGrounding]: "@aiready/agent-grounding",
|
|
30
|
+
[ToolName.TestabilityIndex]: "@aiready/testability",
|
|
31
|
+
[ToolName.DocDrift]: "@aiready/doc-drift",
|
|
32
|
+
[ToolName.DependencyHealth]: "@aiready/deps",
|
|
33
|
+
[ToolName.ChangeAmplification]: "@aiready/change-amplification",
|
|
34
|
+
// Aliases handled by registry
|
|
35
|
+
patterns: "@aiready/pattern-detect",
|
|
36
|
+
duplicates: "@aiready/pattern-detect",
|
|
37
|
+
context: "@aiready/context-analyzer",
|
|
38
|
+
fragmentation: "@aiready/context-analyzer",
|
|
39
|
+
consistency: "@aiready/consistency",
|
|
40
|
+
"ai-signal": "@aiready/ai-signal-clarity",
|
|
41
|
+
grounding: "@aiready/agent-grounding",
|
|
42
|
+
testability: "@aiready/testability",
|
|
43
|
+
"deps-health": "@aiready/deps",
|
|
44
|
+
"change-amp": "@aiready/change-amplification"
|
|
45
|
+
};
|
|
46
|
+
async function analyzeUnified(options) {
|
|
47
|
+
const startTime = Date.now();
|
|
48
|
+
const requestedTools = options.tools || [
|
|
49
|
+
"patterns",
|
|
50
|
+
"context",
|
|
51
|
+
"consistency"
|
|
52
|
+
];
|
|
53
|
+
const result = {
|
|
54
|
+
summary: {
|
|
55
|
+
totalIssues: 0,
|
|
56
|
+
criticalIssues: 0,
|
|
57
|
+
// Added as per instruction
|
|
58
|
+
majorIssues: 0,
|
|
59
|
+
// Added as per instruction
|
|
60
|
+
totalFiles: 0,
|
|
61
|
+
toolsRun: [],
|
|
62
|
+
executionTime: 0,
|
|
63
|
+
config: options
|
|
64
|
+
// Added as per instruction
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
for (const toolName of requestedTools) {
|
|
68
|
+
let provider = ToolRegistry.find(toolName);
|
|
69
|
+
if (!provider) {
|
|
70
|
+
const packageName = TOOL_PACKAGE_MAP[toolName] || (toolName.startsWith("@aiready/") ? toolName : `@aiready/${toolName}`);
|
|
71
|
+
try {
|
|
72
|
+
await import(packageName);
|
|
73
|
+
provider = ToolRegistry.find(toolName);
|
|
74
|
+
if (provider) {
|
|
75
|
+
console.log(
|
|
76
|
+
`\u2705 Successfully loaded tool provider: ${toolName} from ${packageName}`
|
|
77
|
+
);
|
|
78
|
+
} else {
|
|
79
|
+
console.log(
|
|
80
|
+
`\u26A0\uFE0F Loaded ${packageName} but provider ${toolName} still not found in registry.`
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
} catch (err) {
|
|
84
|
+
console.log(
|
|
85
|
+
`\u274C Failed to dynamically load tool ${toolName} (${packageName}):`,
|
|
86
|
+
err.message
|
|
87
|
+
);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (!provider) {
|
|
91
|
+
console.warn(
|
|
92
|
+
`\u26A0\uFE0F Warning: Tool provider for '${toolName}' not found. Skipping.`
|
|
93
|
+
);
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
try {
|
|
97
|
+
const sanitizedConfig = { ...options };
|
|
98
|
+
delete sanitizedConfig.onProgress;
|
|
99
|
+
delete sanitizedConfig.progressCallback;
|
|
100
|
+
const output = await provider.analyze({
|
|
101
|
+
...options,
|
|
102
|
+
onProgress: (processed, total, message) => {
|
|
103
|
+
if (options.progressCallback) {
|
|
104
|
+
options.progressCallback({
|
|
105
|
+
tool: provider.id,
|
|
106
|
+
processed,
|
|
107
|
+
total,
|
|
108
|
+
message
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
if (output.metadata) {
|
|
114
|
+
output.metadata.config = sanitizedConfig;
|
|
115
|
+
}
|
|
116
|
+
if (options.progressCallback) {
|
|
117
|
+
options.progressCallback({ tool: provider.id, data: output });
|
|
118
|
+
}
|
|
119
|
+
result[provider.id] = output;
|
|
120
|
+
result.summary.toolsRun.push(provider.id);
|
|
121
|
+
const toolFiles = output.summary?.totalFiles || output.summary?.filesAnalyzed || 0;
|
|
122
|
+
if (toolFiles > result.summary.totalFiles) {
|
|
123
|
+
result.summary.totalFiles = toolFiles;
|
|
124
|
+
}
|
|
125
|
+
const issueCount = output.results.reduce(
|
|
126
|
+
(sum, file) => sum + (file.issues?.length || 0),
|
|
127
|
+
0
|
|
128
|
+
);
|
|
129
|
+
result.summary.totalIssues += issueCount;
|
|
130
|
+
if (provider.alias && Array.isArray(provider.alias)) {
|
|
131
|
+
for (const alias of provider.alias) {
|
|
132
|
+
if (!result[alias]) {
|
|
133
|
+
result[alias] = output;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
const camelCaseId = provider.id.replace(
|
|
138
|
+
/-([a-z])/g,
|
|
139
|
+
(g) => g[1].toUpperCase()
|
|
140
|
+
);
|
|
141
|
+
if (camelCaseId !== provider.id && !result[camelCaseId]) {
|
|
142
|
+
result[camelCaseId] = output;
|
|
143
|
+
}
|
|
144
|
+
} catch (err) {
|
|
145
|
+
console.error(`\u274C Error running tool '${provider.id}':`, err);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
result.summary.executionTime = Date.now() - startTime;
|
|
149
|
+
return result;
|
|
150
|
+
}
|
|
151
|
+
async function scoreUnified(results, options) {
|
|
152
|
+
const toolScores = /* @__PURE__ */ new Map();
|
|
153
|
+
for (const toolId of results.summary.toolsRun) {
|
|
154
|
+
const provider = ToolRegistry.get(toolId);
|
|
155
|
+
if (!provider) continue;
|
|
156
|
+
const output = results[toolId];
|
|
157
|
+
if (!output) continue;
|
|
158
|
+
try {
|
|
159
|
+
const toolScore = provider.score(output, options);
|
|
160
|
+
if (!toolScore.tokenBudget) {
|
|
161
|
+
if (toolId === ToolName.PatternDetect && output.duplicates) {
|
|
162
|
+
const wastedTokens = output.duplicates.reduce(
|
|
163
|
+
(sum, d) => sum + (d.tokenCost || 0),
|
|
164
|
+
0
|
|
165
|
+
);
|
|
166
|
+
toolScore.tokenBudget = calculateTokenBudget({
|
|
167
|
+
totalContextTokens: wastedTokens * 2,
|
|
168
|
+
wastedTokens: {
|
|
169
|
+
duplication: wastedTokens,
|
|
170
|
+
fragmentation: 0,
|
|
171
|
+
chattiness: 0
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
} else if (toolId === ToolName.ContextAnalyzer && output.summary) {
|
|
175
|
+
toolScore.tokenBudget = calculateTokenBudget({
|
|
176
|
+
totalContextTokens: output.summary.totalTokens,
|
|
177
|
+
wastedTokens: {
|
|
178
|
+
duplication: 0,
|
|
179
|
+
fragmentation: output.summary.totalPotentialSavings || 0,
|
|
180
|
+
chattiness: 0
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
toolScores.set(toolId, toolScore);
|
|
186
|
+
} catch (err) {
|
|
187
|
+
console.error(`\u274C Error scoring tool '${toolId}':`, err);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
if (toolScores.size === 0) {
|
|
191
|
+
return {
|
|
192
|
+
overall: 0,
|
|
193
|
+
rating: "Critical",
|
|
194
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
195
|
+
toolsUsed: [],
|
|
196
|
+
breakdown: [],
|
|
197
|
+
calculation: {
|
|
198
|
+
formula: "0 / 0 = 0",
|
|
199
|
+
weights: {},
|
|
200
|
+
normalized: "0 / 0 = 0"
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
return calculateOverallScore(toolScores, options, void 0);
|
|
205
|
+
}
|
|
206
|
+
function generateUnifiedSummary(result) {
|
|
207
|
+
const { summary } = result;
|
|
208
|
+
let output = `\u{1F680} AIReady Analysis Complete
|
|
209
|
+
|
|
210
|
+
`;
|
|
211
|
+
output += `\u{1F4CA} Summary:
|
|
212
|
+
`;
|
|
213
|
+
output += ` Tools run: ${summary.toolsRun.join(", ")}
|
|
214
|
+
`;
|
|
215
|
+
output += ` Total issues found: ${summary.totalIssues}
|
|
216
|
+
`;
|
|
217
|
+
output += ` Execution time: ${(summary.executionTime / 1e3).toFixed(2)}s
|
|
218
|
+
|
|
219
|
+
`;
|
|
220
|
+
for (const provider of ToolRegistry.getAll()) {
|
|
221
|
+
const toolResult = result[provider.id];
|
|
222
|
+
if (toolResult) {
|
|
223
|
+
const issueCount = toolResult.results.reduce(
|
|
224
|
+
(sum, r) => sum + (r.issues?.length || 0),
|
|
225
|
+
0
|
|
226
|
+
);
|
|
227
|
+
output += `\u2022 ${provider.id}: ${issueCount} issues
|
|
228
|
+
`;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return output;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export {
|
|
235
|
+
__require,
|
|
236
|
+
analyzeUnified,
|
|
237
|
+
scoreUnified,
|
|
238
|
+
generateUnifiedSummary
|
|
239
|
+
};
|
package/dist/cli.js
CHANGED
|
@@ -62,18 +62,11 @@ var TOOL_PACKAGE_MAP = {
|
|
|
62
62
|
context: "@aiready/context-analyzer",
|
|
63
63
|
fragmentation: "@aiready/context-analyzer",
|
|
64
64
|
consistency: "@aiready/consistency",
|
|
65
|
-
"naming-consistency": "@aiready/consistency",
|
|
66
65
|
"ai-signal": "@aiready/ai-signal-clarity",
|
|
67
|
-
"ai-signal-clarity": "@aiready/ai-signal-clarity",
|
|
68
66
|
grounding: "@aiready/agent-grounding",
|
|
69
|
-
"agent-grounding": "@aiready/agent-grounding",
|
|
70
67
|
testability: "@aiready/testability",
|
|
71
|
-
"testability-index": "@aiready/testability",
|
|
72
|
-
"doc-drift": "@aiready/doc-drift",
|
|
73
68
|
"deps-health": "@aiready/deps",
|
|
74
|
-
"
|
|
75
|
-
"change-amp": "@aiready/change-amplification",
|
|
76
|
-
"change-amplification": "@aiready/change-amplification"
|
|
69
|
+
"change-amp": "@aiready/change-amplification"
|
|
77
70
|
};
|
|
78
71
|
async function analyzeUnified(options) {
|
|
79
72
|
const startTime = Date.now();
|
|
@@ -85,9 +78,15 @@ async function analyzeUnified(options) {
|
|
|
85
78
|
const result = {
|
|
86
79
|
summary: {
|
|
87
80
|
totalIssues: 0,
|
|
81
|
+
criticalIssues: 0,
|
|
82
|
+
// Added as per instruction
|
|
83
|
+
majorIssues: 0,
|
|
84
|
+
// Added as per instruction
|
|
88
85
|
totalFiles: 0,
|
|
89
86
|
toolsRun: [],
|
|
90
|
-
executionTime: 0
|
|
87
|
+
executionTime: 0,
|
|
88
|
+
config: options
|
|
89
|
+
// Added as per instruction
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
92
|
for (const toolName of requestedTools) {
|
|
@@ -120,6 +119,9 @@ async function analyzeUnified(options) {
|
|
|
120
119
|
continue;
|
|
121
120
|
}
|
|
122
121
|
try {
|
|
122
|
+
const sanitizedConfig = { ...options };
|
|
123
|
+
delete sanitizedConfig.onProgress;
|
|
124
|
+
delete sanitizedConfig.progressCallback;
|
|
123
125
|
const output = await provider.analyze({
|
|
124
126
|
...options,
|
|
125
127
|
onProgress: (processed, total, message) => {
|
|
@@ -133,6 +135,9 @@ async function analyzeUnified(options) {
|
|
|
133
135
|
}
|
|
134
136
|
}
|
|
135
137
|
});
|
|
138
|
+
if (output.metadata) {
|
|
139
|
+
output.metadata.config = sanitizedConfig;
|
|
140
|
+
}
|
|
136
141
|
if (options.progressCallback) {
|
|
137
142
|
options.progressCallback({ tool: provider.id, data: output });
|
|
138
143
|
}
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -51,18 +51,11 @@ 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
|
-
"
|
|
64
|
-
"change-amp": "@aiready/change-amplification",
|
|
65
|
-
"change-amplification": "@aiready/change-amplification"
|
|
58
|
+
"change-amp": "@aiready/change-amplification"
|
|
66
59
|
};
|
|
67
60
|
async function analyzeUnified(options) {
|
|
68
61
|
const startTime = Date.now();
|
|
@@ -74,9 +67,15 @@ async function analyzeUnified(options) {
|
|
|
74
67
|
const result = {
|
|
75
68
|
summary: {
|
|
76
69
|
totalIssues: 0,
|
|
70
|
+
criticalIssues: 0,
|
|
71
|
+
// Added as per instruction
|
|
72
|
+
majorIssues: 0,
|
|
73
|
+
// Added as per instruction
|
|
77
74
|
totalFiles: 0,
|
|
78
75
|
toolsRun: [],
|
|
79
|
-
executionTime: 0
|
|
76
|
+
executionTime: 0,
|
|
77
|
+
config: options
|
|
78
|
+
// Added as per instruction
|
|
80
79
|
}
|
|
81
80
|
};
|
|
82
81
|
for (const toolName of requestedTools) {
|
|
@@ -109,6 +108,9 @@ async function analyzeUnified(options) {
|
|
|
109
108
|
continue;
|
|
110
109
|
}
|
|
111
110
|
try {
|
|
111
|
+
const sanitizedConfig = { ...options };
|
|
112
|
+
delete sanitizedConfig.onProgress;
|
|
113
|
+
delete sanitizedConfig.progressCallback;
|
|
112
114
|
const output = await provider.analyze({
|
|
113
115
|
...options,
|
|
114
116
|
onProgress: (processed, total, message) => {
|
|
@@ -122,6 +124,9 @@ async function analyzeUnified(options) {
|
|
|
122
124
|
}
|
|
123
125
|
}
|
|
124
126
|
});
|
|
127
|
+
if (output.metadata) {
|
|
128
|
+
output.metadata.config = sanitizedConfig;
|
|
129
|
+
}
|
|
125
130
|
if (options.progressCallback) {
|
|
126
131
|
options.progressCallback({ tool: provider.id, data: output });
|
|
127
132
|
}
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.9",
|
|
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.
|
|
15
|
-
"@aiready/
|
|
16
|
-
"@aiready/
|
|
17
|
-
"@aiready/
|
|
18
|
-
"@aiready/
|
|
19
|
-
"@aiready/
|
|
20
|
-
"@aiready/
|
|
21
|
-
"@aiready/
|
|
22
|
-
"@aiready/
|
|
23
|
-
"@aiready/
|
|
24
|
-
"@aiready/
|
|
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"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.0.0",
|