@aiready/context-analyzer 0.21.17 → 0.21.22
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 +8 -8
- package/.turbo/turbo-test.log +26 -26
- package/dist/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +2 -2
- package/src/defaults.ts +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @aiready/context-analyzer@0.21.
|
|
2
|
+
> @aiready/context-analyzer@0.21.22 build /Users/pengcao/projects/aiready/packages/context-analyzer
|
|
3
3
|
> tsup src/index.ts src/cli.ts --format cjs,esm --dts
|
|
4
4
|
|
|
5
5
|
CLI Building entry: src/cli.ts, src/index.ts
|
|
@@ -8,17 +8,17 @@ CLI tsup v8.5.1
|
|
|
8
8
|
CLI Target: es2020
|
|
9
9
|
CJS Build start
|
|
10
10
|
ESM Build start
|
|
11
|
-
|
|
11
|
+
CJS dist/cli.js 69.82 KB
|
|
12
|
+
CJS dist/index.js 83.72 KB
|
|
13
|
+
CJS ⚡️ Build success in 495ms
|
|
12
14
|
ESM dist/index.mjs 12.40 KB
|
|
13
15
|
ESM dist/python-context-3GZKN3LR.mjs 4.47 KB
|
|
14
|
-
ESM dist/cli.mjs 4.38 KB
|
|
15
16
|
ESM dist/chunk-CBWM3EK5.mjs 60.62 KB
|
|
16
|
-
ESM
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
CJS ⚡️ Build success in 604ms
|
|
17
|
+
ESM dist/chunk-64U3PNO3.mjs 2.65 KB
|
|
18
|
+
ESM dist/cli.mjs 4.38 KB
|
|
19
|
+
ESM ⚡️ Build success in 504ms
|
|
20
20
|
DTS Build start
|
|
21
|
-
DTS ⚡️ Build success in
|
|
21
|
+
DTS ⚡️ Build success in 13528ms
|
|
22
22
|
DTS dist/cli.d.ts 20.00 B
|
|
23
23
|
DTS dist/index.d.ts 25.70 KB
|
|
24
24
|
DTS dist/cli.d.mts 20.00 B
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
|
|
2
|
-
> @aiready/context-analyzer@0.21.
|
|
2
|
+
> @aiready/context-analyzer@0.21.18 test /Users/pengcao/projects/aiready/packages/context-analyzer
|
|
3
3
|
> vitest run
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
[1m[46m RUN [49m[22m [36mv4.0.18 [39m[90m/Users/pengcao/projects/aiready/packages/context-analyzer[39m
|
|
7
7
|
|
|
8
|
-
[32m✓[39m src/__tests__/scoring.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
9
8
|
Sourcemap for "/Users/pengcao/projects/aiready/packages/context-analyzer/dist/semantic-analysis.js" points to missing source files
|
|
10
|
-
[32m✓[39m dist/__tests__/
|
|
11
|
-
[32m✓[39m
|
|
12
|
-
[32m✓[39m dist/__tests__/
|
|
13
|
-
[32m✓[39m dist/__tests__/auto-detection.test.js [2m([22m[2m8 tests[22m[2m)[22m[32m
|
|
14
|
-
[32m✓[39m dist/__tests__/
|
|
15
|
-
[32m✓[39m
|
|
16
|
-
[32m✓[39m src/__tests__/
|
|
17
|
-
[32m✓[39m src/__tests__/
|
|
18
|
-
[32m✓[39m src/__tests__/
|
|
19
|
-
[32m✓[39m src/__tests__/
|
|
20
|
-
[32m✓[39m src/__tests__/
|
|
9
|
+
[32m✓[39m dist/__tests__/cluster-detector.test.js [2m([22m[2m3 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
10
|
+
[32m✓[39m dist/__tests__/contract.test.js [2m([22m[2m1 test[22m[2m)[22m[32m 146[2mms[22m[39m
|
|
11
|
+
[32m✓[39m dist/__tests__/fragmentation-coupling.test.js [2m([22m[2m2 tests[22m[2m)[22m[32m 25[2mms[22m[39m
|
|
12
|
+
[32m✓[39m dist/__tests__/auto-detection.test.js [2m([22m[2m8 tests[22m[2m)[22m[32m 139[2mms[22m[39m
|
|
13
|
+
[32m✓[39m dist/__tests__/analyzer.test.js [2m([22m[2m14 tests[22m[2m)[22m[32m 186[2mms[22m[39m
|
|
14
|
+
[32m✓[39m src/__tests__/structural-cohesion.test.ts [2m([22m[2m4 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
15
|
+
[32m✓[39m src/__tests__/fragmentation-log.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
16
|
+
[32m✓[39m src/__tests__/fragmentation-coupling.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
17
|
+
[32m✓[39m src/__tests__/contract.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 37[2mms[22m[39m
|
|
18
|
+
[32m✓[39m src/__tests__/auto-detection.test.ts [2m([22m[2m8 tests[22m[2m)[22m[32m 96[2mms[22m[39m
|
|
19
|
+
[32m✓[39m src/__tests__/analyzer.test.ts [2m([22m[2m14 tests[22m[2m)[22m[32m 162[2mms[22m[39m
|
|
20
|
+
[32m✓[39m dist/__tests__/file-classification.test.js [2m([22m[2m63 tests[22m[2m)[22m[32m 9[2mms[22m[39m
|
|
21
|
+
[32m✓[39m src/__tests__/scoring.test.ts [2m([22m[2m15 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
22
|
+
[32m✓[39m src/__tests__/file-classification.test.ts [2m([22m[2m63 tests[22m[2m)[22m[32m 7[2mms[22m[39m
|
|
23
|
+
[32m✓[39m dist/__tests__/provider.test.js [2m([22m[2m2 tests[22m[2m)[22m[32m 11[2mms[22m[39m
|
|
24
|
+
[32m✓[39m src/__tests__/provider.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
21
25
|
[32m✓[39m dist/__tests__/remediation.test.js [2m([22m[2m6 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
22
|
-
[32m✓[39m src/__tests__/provider.test.ts [2m([22m[2m2 tests[22m[2m)[22m[32m 6[2mms[22m[39m
|
|
23
|
-
[32m✓[39m dist/__tests__/scoring.test.js [2m([22m[2m15 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
24
26
|
[32m✓[39m src/__tests__/cluster-detector.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
25
|
-
[32m✓[39m
|
|
26
|
-
[32m✓[39m dist/__tests__/provider.test.js [2m([22m[2m2 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
27
|
-
[32m✓[39m src/__tests__/boilerplate-barrel.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 51[2mms[22m[39m
|
|
27
|
+
[32m✓[39m dist/__tests__/scoring.test.js [2m([22m[2m15 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
28
28
|
[32m✓[39m dist/__tests__/enhanced-cohesion.test.js [2m([22m[2m6 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
29
|
-
[32m✓[39m
|
|
30
|
-
[32m✓[39m src/__tests__/fragmentation-advanced.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m
|
|
31
|
-
[32m✓[39m src/__tests__/
|
|
32
|
-
[32m✓[39m
|
|
33
|
-
[32m✓[39m dist/__tests__/fragmentation-log.test.js [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
29
|
+
[32m✓[39m src/__tests__/remediation.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
30
|
+
[32m✓[39m src/__tests__/fragmentation-advanced.test.ts [2m([22m[2m3 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
31
|
+
[32m✓[39m src/__tests__/enhanced-cohesion.test.ts [2m([22m[2m6 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
32
|
+
[32m✓[39m src/__tests__/boilerplate-barrel.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 5[2mms[22m[39m
|
|
34
33
|
[32m✓[39m dist/__tests__/fragmentation-advanced.test.js [2m([22m[2m3 tests[22m[2m)[22m[32m 2[2mms[22m[39m
|
|
35
|
-
[32m✓[39m
|
|
34
|
+
[32m✓[39m dist/__tests__/fragmentation-log.test.js [2m([22m[2m3 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
35
|
+
[32m✓[39m dist/__tests__/structural-cohesion.test.js [2m([22m[2m4 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
36
36
|
|
|
37
37
|
[2m Test Files [22m [1m[32m27 passed[39m[22m[90m (27)[39m
|
|
38
38
|
[2m Tests [22m [1m[32m267 passed[39m[22m[90m (267)[39m
|
|
39
|
-
[2m Start at [22m
|
|
40
|
-
[2m Duration [22m
|
|
39
|
+
[2m Start at [22m 12:24:37
|
|
40
|
+
[2m Duration [22m 7.87s[2m (transform 17.15s, setup 0ms, import 59.83s, tests 906ms, environment 19ms)[22m
|
|
41
41
|
|
package/dist/index.js
CHANGED
|
@@ -2069,22 +2069,22 @@ async function getSmartDefaults(directory, userOptions) {
|
|
|
2069
2069
|
let minCohesion;
|
|
2070
2070
|
let maxFragmentation;
|
|
2071
2071
|
if (estimatedBlocks < 100) {
|
|
2072
|
-
maxDepth =
|
|
2072
|
+
maxDepth = 5;
|
|
2073
2073
|
maxContextBudget = 8e3;
|
|
2074
2074
|
minCohesion = 0.5;
|
|
2075
2075
|
maxFragmentation = 0.5;
|
|
2076
2076
|
} else if (estimatedBlocks < 500) {
|
|
2077
|
-
maxDepth =
|
|
2077
|
+
maxDepth = 6;
|
|
2078
2078
|
maxContextBudget = 15e3;
|
|
2079
2079
|
minCohesion = 0.45;
|
|
2080
2080
|
maxFragmentation = 0.6;
|
|
2081
2081
|
} else if (estimatedBlocks < 2e3) {
|
|
2082
|
-
maxDepth =
|
|
2082
|
+
maxDepth = 8;
|
|
2083
2083
|
maxContextBudget = 25e3;
|
|
2084
2084
|
minCohesion = 0.4;
|
|
2085
2085
|
maxFragmentation = 0.7;
|
|
2086
2086
|
} else {
|
|
2087
|
-
maxDepth =
|
|
2087
|
+
maxDepth = 12;
|
|
2088
2088
|
maxContextBudget = 4e4;
|
|
2089
2089
|
minCohesion = 0.35;
|
|
2090
2090
|
maxFragmentation = 0.8;
|
package/dist/index.mjs
CHANGED
|
@@ -311,22 +311,22 @@ async function getSmartDefaults(directory, userOptions) {
|
|
|
311
311
|
let minCohesion;
|
|
312
312
|
let maxFragmentation;
|
|
313
313
|
if (estimatedBlocks < 100) {
|
|
314
|
-
maxDepth =
|
|
314
|
+
maxDepth = 5;
|
|
315
315
|
maxContextBudget = 8e3;
|
|
316
316
|
minCohesion = 0.5;
|
|
317
317
|
maxFragmentation = 0.5;
|
|
318
318
|
} else if (estimatedBlocks < 500) {
|
|
319
|
-
maxDepth =
|
|
319
|
+
maxDepth = 6;
|
|
320
320
|
maxContextBudget = 15e3;
|
|
321
321
|
minCohesion = 0.45;
|
|
322
322
|
maxFragmentation = 0.6;
|
|
323
323
|
} else if (estimatedBlocks < 2e3) {
|
|
324
|
-
maxDepth =
|
|
324
|
+
maxDepth = 8;
|
|
325
325
|
maxContextBudget = 25e3;
|
|
326
326
|
minCohesion = 0.4;
|
|
327
327
|
maxFragmentation = 0.7;
|
|
328
328
|
} else {
|
|
329
|
-
maxDepth =
|
|
329
|
+
maxDepth = 12;
|
|
330
330
|
maxContextBudget = 4e4;
|
|
331
331
|
minCohesion = 0.35;
|
|
332
332
|
maxFragmentation = 0.8;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/context-analyzer",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.22",
|
|
4
4
|
"description": "AI context window cost analysis - detect fragmented code, deep import chains, and expensive context budgets",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"commander": "^14.0.0",
|
|
50
50
|
"chalk": "^5.3.0",
|
|
51
51
|
"prompts": "^2.4.2",
|
|
52
|
-
"@aiready/core": "0.23.
|
|
52
|
+
"@aiready/core": "0.23.19"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/node": "^24.0.0",
|
package/src/defaults.ts
CHANGED
|
@@ -27,22 +27,22 @@ export async function getSmartDefaults(
|
|
|
27
27
|
let maxFragmentation: number;
|
|
28
28
|
|
|
29
29
|
if (estimatedBlocks < 100) {
|
|
30
|
-
maxDepth =
|
|
30
|
+
maxDepth = 5;
|
|
31
31
|
maxContextBudget = 8000;
|
|
32
32
|
minCohesion = 0.5;
|
|
33
33
|
maxFragmentation = 0.5;
|
|
34
34
|
} else if (estimatedBlocks < 500) {
|
|
35
|
-
maxDepth =
|
|
35
|
+
maxDepth = 6;
|
|
36
36
|
maxContextBudget = 15000;
|
|
37
37
|
minCohesion = 0.45;
|
|
38
38
|
maxFragmentation = 0.6;
|
|
39
39
|
} else if (estimatedBlocks < 2000) {
|
|
40
|
-
maxDepth =
|
|
40
|
+
maxDepth = 8;
|
|
41
41
|
maxContextBudget = 25000;
|
|
42
42
|
minCohesion = 0.4;
|
|
43
43
|
maxFragmentation = 0.7;
|
|
44
44
|
} else {
|
|
45
|
-
maxDepth =
|
|
45
|
+
maxDepth = 12;
|
|
46
46
|
maxContextBudget = 40000;
|
|
47
47
|
minCohesion = 0.35;
|
|
48
48
|
maxFragmentation = 0.8;
|