@aiready/cli 0.3.7 → 0.3.8
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 +6 -6
- package/dist/cli.js +12 -1
- package/dist/cli.mjs +12 -1
- package/package.json +4 -4
- package/src/cli.ts +16 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @aiready/cli@0.3.
|
|
3
|
+
> @aiready/cli@0.3.8 build /Users/pengcao/projects/aiready/packages/cli
|
|
4
4
|
> tsup src/index.ts src/cli.ts --format cjs,esm --dts
|
|
5
5
|
|
|
6
6
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
[34mCJS[39m Build start
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[32mCJS[39m [1mdist/index.js [22m[32m2.57 KB[39m
|
|
13
|
-
[32mCJS[39m [1mdist/cli.js [22m[
|
|
14
|
-
[32mCJS[39m ⚡️ Build success in
|
|
13
|
+
[32mCJS[39m [1mdist/cli.js [22m[32m11.46 KB[39m
|
|
14
|
+
[32mCJS[39m ⚡️ Build success in 53ms
|
|
15
15
|
[32mESM[39m [1mdist/index.mjs [22m[32m138.00 B[39m
|
|
16
|
-
[32mESM[39m [1mdist/cli.mjs [22m[
|
|
16
|
+
[32mESM[39m [1mdist/cli.mjs [22m[32m8.61 KB[39m
|
|
17
17
|
[32mESM[39m [1mdist/chunk-KZKXZKES.mjs [22m[32m1.45 KB[39m
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 54ms
|
|
19
19
|
DTS Build start
|
|
20
|
-
DTS ⚡️ Build success in
|
|
20
|
+
DTS ⚡️ Build success in 538ms
|
|
21
21
|
DTS dist/cli.d.ts 20.00 B
|
|
22
22
|
DTS dist/index.d.ts 880.00 B
|
|
23
23
|
DTS dist/cli.d.mts 20.00 B
|
package/dist/cli.js
CHANGED
|
@@ -195,12 +195,23 @@ program.command("context").description("Run context window cost analysis").argum
|
|
|
195
195
|
file: void 0
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
|
-
|
|
198
|
+
let baseOptions = (0, import_core.loadMergedConfig)(directory, defaults, {
|
|
199
199
|
maxDepth: options.maxDepth ? parseInt(options.maxDepth) : void 0,
|
|
200
200
|
maxContextBudget: options.maxContext ? parseInt(options.maxContext) : void 0,
|
|
201
201
|
include: options.include?.split(","),
|
|
202
202
|
exclude: options.exclude?.split(",")
|
|
203
203
|
});
|
|
204
|
+
let finalOptions = { ...baseOptions };
|
|
205
|
+
const { getSmartDefaults } = await import("@aiready/context-analyzer");
|
|
206
|
+
const contextSmartDefaults = await getSmartDefaults(directory, baseOptions);
|
|
207
|
+
finalOptions = { ...contextSmartDefaults, ...finalOptions };
|
|
208
|
+
console.log("\u{1F4CB} Configuration:");
|
|
209
|
+
console.log(` Max depth: ${finalOptions.maxDepth}`);
|
|
210
|
+
console.log(` Max context budget: ${finalOptions.maxContextBudget}`);
|
|
211
|
+
console.log(` Min cohesion: ${(finalOptions.minCohesion * 100).toFixed(1)}%`);
|
|
212
|
+
console.log(` Max fragmentation: ${(finalOptions.maxFragmentation * 100).toFixed(1)}%`);
|
|
213
|
+
console.log(` Analysis focus: ${finalOptions.focus}`);
|
|
214
|
+
console.log("");
|
|
204
215
|
const { analyzeContext: analyzeContext2, generateSummary } = await import("@aiready/context-analyzer");
|
|
205
216
|
const results = await analyzeContext2(finalOptions);
|
|
206
217
|
const elapsedTime = (0, import_core.getElapsedTime)(startTime);
|
package/dist/cli.mjs
CHANGED
|
@@ -124,12 +124,23 @@ program.command("context").description("Run context window cost analysis").argum
|
|
|
124
124
|
file: void 0
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
|
|
127
|
+
let baseOptions = loadMergedConfig(directory, defaults, {
|
|
128
128
|
maxDepth: options.maxDepth ? parseInt(options.maxDepth) : void 0,
|
|
129
129
|
maxContextBudget: options.maxContext ? parseInt(options.maxContext) : void 0,
|
|
130
130
|
include: options.include?.split(","),
|
|
131
131
|
exclude: options.exclude?.split(",")
|
|
132
132
|
});
|
|
133
|
+
let finalOptions = { ...baseOptions };
|
|
134
|
+
const { getSmartDefaults } = await import("@aiready/context-analyzer");
|
|
135
|
+
const contextSmartDefaults = await getSmartDefaults(directory, baseOptions);
|
|
136
|
+
finalOptions = { ...contextSmartDefaults, ...finalOptions };
|
|
137
|
+
console.log("\u{1F4CB} Configuration:");
|
|
138
|
+
console.log(` Max depth: ${finalOptions.maxDepth}`);
|
|
139
|
+
console.log(` Max context budget: ${finalOptions.maxContextBudget}`);
|
|
140
|
+
console.log(` Min cohesion: ${(finalOptions.minCohesion * 100).toFixed(1)}%`);
|
|
141
|
+
console.log(` Max fragmentation: ${(finalOptions.maxFragmentation * 100).toFixed(1)}%`);
|
|
142
|
+
console.log(` Analysis focus: ${finalOptions.focus}`);
|
|
143
|
+
console.log("");
|
|
133
144
|
const { analyzeContext, generateSummary } = await import("@aiready/context-analyzer");
|
|
134
145
|
const results = await analyzeContext(finalOptions);
|
|
135
146
|
const elapsedTime = getElapsedTime(startTime);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.8",
|
|
4
4
|
"description": "Unified CLI for AIReady analysis tools",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"commander": "^12.1.0",
|
|
13
13
|
"chalk": "^5.3.0",
|
|
14
|
-
"@aiready/core": "0.3.
|
|
15
|
-
"@aiready/
|
|
16
|
-
"@aiready/
|
|
14
|
+
"@aiready/core": "0.3.7",
|
|
15
|
+
"@aiready/pattern-detect": "0.7.12",
|
|
16
|
+
"@aiready/context-analyzer": "0.3.8"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"tsup": "^8.3.5",
|
package/src/cli.ts
CHANGED
|
@@ -200,13 +200,28 @@ program
|
|
|
200
200
|
};
|
|
201
201
|
|
|
202
202
|
// Load and merge config with CLI options
|
|
203
|
-
|
|
203
|
+
let baseOptions = loadMergedConfig(directory, defaults, {
|
|
204
204
|
maxDepth: options.maxDepth ? parseInt(options.maxDepth) : undefined,
|
|
205
205
|
maxContextBudget: options.maxContext ? parseInt(options.maxContext) : undefined,
|
|
206
206
|
include: options.include?.split(','),
|
|
207
207
|
exclude: options.exclude?.split(','),
|
|
208
208
|
});
|
|
209
209
|
|
|
210
|
+
// Apply smart defaults for context analysis (always for individual context command)
|
|
211
|
+
let finalOptions: any = { ...baseOptions };
|
|
212
|
+
const { getSmartDefaults } = await import('@aiready/context-analyzer');
|
|
213
|
+
const contextSmartDefaults = await getSmartDefaults(directory, baseOptions);
|
|
214
|
+
finalOptions = { ...contextSmartDefaults, ...finalOptions };
|
|
215
|
+
|
|
216
|
+
// Display configuration
|
|
217
|
+
console.log('📋 Configuration:');
|
|
218
|
+
console.log(` Max depth: ${finalOptions.maxDepth}`);
|
|
219
|
+
console.log(` Max context budget: ${finalOptions.maxContextBudget}`);
|
|
220
|
+
console.log(` Min cohesion: ${(finalOptions.minCohesion * 100).toFixed(1)}%`);
|
|
221
|
+
console.log(` Max fragmentation: ${(finalOptions.maxFragmentation * 100).toFixed(1)}%`);
|
|
222
|
+
console.log(` Analysis focus: ${finalOptions.focus}`);
|
|
223
|
+
console.log('');
|
|
224
|
+
|
|
210
225
|
const { analyzeContext, generateSummary } = await import('@aiready/context-analyzer');
|
|
211
226
|
|
|
212
227
|
const results = await analyzeContext(finalOptions);
|