@aiready/context-analyzer 0.21.7 → 0.21.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.
@@ -1,6 +1,6 @@
1
1
 
2
2
  
3
- > @aiready/context-analyzer@0.21.7 build /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.21.9 build /Users/pengcao/projects/aiready/packages/context-analyzer
4
4
  > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
5
 
6
6
  CLI Building entry: src/cli.ts, src/index.ts
@@ -9,17 +9,17 @@
9
9
  CLI Target: es2020
10
10
  CJS Build start
11
11
  ESM Build start
12
- ESM dist/index.mjs 9.27 KB
13
- ESM dist/chunk-D25B5LZR.mjs 57.60 KB
12
+ CJS dist/cli.js 65.97 KB
13
+ CJS dist/index.js 77.31 KB
14
+ CJS ⚡️ Build success in 164ms
14
15
  ESM dist/cli.mjs 4.20 KB
15
16
  ESM dist/python-context-3GZKN3LR.mjs 4.47 KB
16
17
  ESM dist/chunk-64U3PNO3.mjs 2.65 KB
17
- ESM ⚡️ Build success in 214ms
18
- CJS dist/cli.js 65.97 KB
19
- CJS dist/index.js 77.31 KB
20
- CJS ⚡️ Build success in 215ms
18
+ ESM dist/chunk-D25B5LZR.mjs 57.60 KB
19
+ ESM dist/index.mjs 9.27 KB
20
+ ESM ⚡️ Build success in 165ms
21
21
  DTS Build start
22
- DTS ⚡️ Build success in 3979ms
22
+ DTS ⚡️ Build success in 4595ms
23
23
  DTS dist/cli.d.ts 20.00 B
24
24
  DTS dist/index.d.ts 15.68 KB
25
25
  DTS dist/cli.d.mts 20.00 B
@@ -1,41 +1,41 @@
1
1
 
2
2
  
3
- > @aiready/context-analyzer@0.21.6 test /Users/pengcao/projects/aiready/packages/context-analyzer
3
+ > @aiready/context-analyzer@0.21.7 test /Users/pengcao/projects/aiready/packages/context-analyzer
4
4
  > vitest run
5
5
 
6
6
  [?25l
7
7
   RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/context-analyzer
8
8
 
9
- ✓ dist/__tests__/scoring.test.js (15 tests) 5ms
10
- ✓ dist/__tests__/fragmentation-coupling.test.js (2 tests) 16ms
11
- ✓ dist/__tests__/file-classification.test.js (63 tests) 7ms
12
- ✓ dist/__tests__/auto-detection.test.js (8 tests) 103ms
13
- ✓ dist/__tests__/contract.test.js (1 test) 31ms
14
- ✓ dist/__tests__/analyzer.test.js (14 tests) 127ms
15
- ✓ src/__tests__/remediation.test.ts (6 tests) 16ms
16
- ✓ src/__tests__/provider.test.ts (2 tests) 3ms
17
- ✓ src/__tests__/analyzer.test.ts (14 tests) 35ms
18
- ✓ src/__tests__/contract.test.ts (1 test) 80ms
19
- ✓ src/__tests__/fragmentation-coupling.test.ts (2 tests) 86ms
20
- ✓ src/__tests__/auto-detection.test.ts (8 tests) 80ms
21
- ✓ dist/__tests__/remediation.test.js (6 tests) 83ms
22
- ✓ src/__tests__/file-classification.test.ts (63 tests) 94ms
23
- ✓ src/__tests__/scoring.test.ts (15 tests) 78ms
24
- ✓ src/__tests__/cluster-detector.test.ts (3 tests) 16ms
25
- ✓ dist/__tests__/provider.test.js (2 tests) 9ms
9
+ ✓ dist/__tests__/remediation.test.js (6 tests) 3ms
10
+ ✓ src/__tests__/remediation.test.ts (6 tests) 2ms
11
+ ✓ src/__tests__/scoring.test.ts (15 tests) 3ms
12
+ ✓ dist/__tests__/contract.test.js (1 test) 12ms
13
+ ✓ dist/__tests__/fragmentation-coupling.test.js (2 tests) 15ms
14
+ ✓ dist/__tests__/analyzer.test.js (14 tests) 25ms
15
+ ✓ dist/__tests__/auto-detection.test.js (8 tests) 23ms
16
+ ✓ src/__tests__/cluster-detector.test.ts (3 tests) 6ms
17
+ ✓ src/__tests__/file-classification.test.ts (63 tests) 7ms
18
+ ✓ src/__tests__/fragmentation-coupling.test.ts (2 tests) 12ms
19
+ ✓ src/__tests__/auto-detection.test.ts (8 tests) 17ms
20
+ ✓ src/__tests__/contract.test.ts (1 test) 50ms
21
+ ✓ src/__tests__/analyzer.test.ts (14 tests) 23ms
22
+ ✓ dist/__tests__/provider.test.js (2 tests) 3ms
23
+ ✓ dist/__tests__/file-classification.test.js (63 tests) 6ms
26
24
  ✓ dist/__tests__/cluster-detector.test.js (3 tests) 6ms
27
- ✓ dist/__tests__/fragmentation-log.test.js (3 tests) 2ms
28
- ✓ src/__tests__/fragmentation-advanced.test.ts (3 tests) 2ms
29
- ✓ dist/__tests__/enhanced-cohesion.test.js (6 tests) 2ms
30
- ✓ src/__tests__/fragmentation-log.test.ts (3 tests) 1ms
31
- ✓ src/__tests__/structural-cohesion.test.ts (4 tests) 5ms
32
- ✓ src/__tests__/enhanced-cohesion.test.ts (6 tests) 2ms
33
- ✓ dist/__tests__/fragmentation-advanced.test.js (3 tests) 2ms
25
+ ✓ src/__tests__/structural-cohesion.test.ts (4 tests) 2ms
26
+ ✓ dist/__tests__/scoring.test.js (15 tests) 8ms
27
+ ✓ src/__tests__/provider.test.ts (2 tests) 7ms
34
28
  ✓ dist/__tests__/structural-cohesion.test.js (4 tests) 2ms
29
+ ✓ dist/__tests__/fragmentation-log.test.js (3 tests) 3ms
30
+ ✓ dist/__tests__/fragmentation-advanced.test.js (3 tests) 2ms
31
+ ✓ dist/__tests__/enhanced-cohesion.test.js (6 tests) 3ms
32
+ ✓ src/__tests__/enhanced-cohesion.test.ts (6 tests) 2ms
33
+ ✓ src/__tests__/fragmentation-advanced.test.ts (3 tests) 1ms
34
+ ✓ src/__tests__/fragmentation-log.test.ts (3 tests) 1ms
35
35
 
36
36
   Test Files  26 passed (26)
37
37
   Tests  260 passed (260)
38
-  Start at  22:22:02
39
-  Duration  5.35s (transform 8.27s, setup 0ms, import 37.71s, tests 892ms, environment 2ms)
38
+  Start at  10:36:29
39
+  Duration  1.74s (transform 2.12s, setup 0ms, import 11.15s, tests 244ms, environment 2ms)
40
40
 
41
41
  [?25h
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aiready/context-analyzer",
3
- "version": "0.21.7",
3
+ "version": "0.21.9",
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.3"
52
+ "@aiready/core": "0.23.6"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@types/node": "^24.0.0",
@@ -102,26 +102,3 @@ export function detectModuleClusters(
102
102
 
103
103
  return clusters;
104
104
  }
105
-
106
- function generateSuggestedStructure(
107
- files: string[],
108
- tokens: number,
109
- fragmentation: number
110
- ) {
111
- const targetFiles = Math.max(1, Math.ceil(tokens / 10000));
112
- const plan: string[] = [];
113
-
114
- if (fragmentation > 0.5) {
115
- plan.push(
116
- `Consolidate ${files.length} files scattered across multiple directories into ${targetFiles} core module(s)`
117
- );
118
- }
119
-
120
- if (tokens > 20000) {
121
- plan.push(
122
- `Domain logic is very large (${Math.round(tokens / 1000)}k tokens). Ensure clear sub-domain boundaries.`
123
- );
124
- }
125
-
126
- return { targetFiles, consolidationPlan: plan };
127
- }