@aiready/context-analyzer 0.21.18 → 0.21.23

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.
Files changed (61) hide show
  1. package/.turbo/turbo-build.log +26 -25
  2. package/.turbo/turbo-lint.log +5 -5
  3. package/.turbo/turbo-test.log +104 -41
  4. package/coverage/clover.xml +2615 -1242
  5. package/coverage/coverage-final.json +30 -13
  6. package/coverage/dist/chunk-64U3PNO3.mjs.html +367 -0
  7. package/coverage/dist/chunk-J3MUOWHC.mjs.html +5326 -0
  8. package/coverage/dist/index.html +146 -0
  9. package/coverage/{classifier.ts.html → dist/index.mjs.html} +537 -912
  10. package/coverage/index.html +84 -189
  11. package/coverage/src/analyzer.ts.html +88 -0
  12. package/coverage/src/analyzers/index.html +116 -0
  13. package/coverage/src/analyzers/python-context.ts.html +910 -0
  14. package/coverage/{ast-utils.ts.html → src/ast-utils.ts.html} +84 -54
  15. package/coverage/src/classifier.ts.html +892 -0
  16. package/coverage/src/classify/classification-patterns.ts.html +307 -0
  17. package/coverage/src/classify/file-classifiers.ts.html +973 -0
  18. package/coverage/src/classify/index.html +131 -0
  19. package/coverage/{cluster-detector.ts.html → src/cluster-detector.ts.html} +154 -91
  20. package/coverage/{defaults.ts.html → src/defaults.ts.html} +74 -65
  21. package/coverage/{graph-builder.ts.html → src/graph-builder.ts.html} +268 -229
  22. package/coverage/src/index.html +341 -0
  23. package/coverage/{index.ts.html → src/index.ts.html} +70 -13
  24. package/coverage/{scoring.ts.html → src/issue-analyzer.ts.html} +201 -261
  25. package/coverage/src/mapper.ts.html +439 -0
  26. package/coverage/{metrics.ts.html → src/metrics.ts.html} +201 -132
  27. package/coverage/src/orchestrator.ts.html +493 -0
  28. package/coverage/{provider.ts.html → src/provider.ts.html} +21 -21
  29. package/coverage/{remediation.ts.html → src/remediation.ts.html} +112 -52
  30. package/coverage/src/report/console-report.ts.html +415 -0
  31. package/coverage/src/report/html-report.ts.html +361 -0
  32. package/coverage/src/report/index.html +146 -0
  33. package/coverage/src/report/interactive-setup.ts.html +373 -0
  34. package/coverage/src/scoring.ts.html +895 -0
  35. package/coverage/src/semantic/co-usage.ts.html +340 -0
  36. package/coverage/src/semantic/consolidation.ts.html +223 -0
  37. package/coverage/src/semantic/domain-inference.ts.html +859 -0
  38. package/coverage/src/semantic/index.html +161 -0
  39. package/coverage/src/semantic/type-graph.ts.html +163 -0
  40. package/coverage/{summary.ts.html → src/summary.ts.html} +155 -275
  41. package/coverage/{types.ts.html → src/types.ts.html} +133 -31
  42. package/coverage/src/utils/dependency-graph-utils.ts.html +463 -0
  43. package/coverage/src/utils/index.html +131 -0
  44. package/coverage/src/utils/string-utils.ts.html +148 -0
  45. package/dist/chunk-J3MUOWHC.mjs +1747 -0
  46. package/dist/cli.js +59 -171
  47. package/dist/cli.mjs +1 -1
  48. package/dist/index.js +55 -167
  49. package/dist/index.mjs +1 -1
  50. package/package.json +2 -2
  51. package/src/__tests__/consolidation.test.ts +247 -0
  52. package/src/__tests__/defaults.test.ts +121 -0
  53. package/src/__tests__/domain-inference.test.ts +420 -0
  54. package/src/__tests__/issue-analyzer.test.ts +155 -0
  55. package/src/__tests__/orchestrator.test.ts +143 -0
  56. package/src/__tests__/python-context.test.ts +98 -0
  57. package/src/__tests__/report/console-report.test.ts +292 -0
  58. package/src/__tests__/report/html-report.test.ts +232 -0
  59. package/src/report/html-report.ts +58 -174
  60. package/coverage/analyzer.ts.html +0 -1369
  61. package/coverage/semantic-analysis.ts.html +0 -1201
@@ -1,25 +1,26 @@
1
-
2
- > @aiready/context-analyzer@0.21.18 build /Users/pengcao/projects/aiready/packages/context-analyzer
3
- > tsup src/index.ts src/cli.ts --format cjs,esm --dts
4
-
5
- CLI Building entry: src/cli.ts, src/index.ts
6
- CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.5.1
8
- CLI Target: es2020
9
- CJS Build start
10
- ESM Build start
11
- ESM dist/index.mjs 12.40 KB
12
- ESM dist/cli.mjs 4.38 KB
13
- ESM dist/chunk-CBWM3EK5.mjs 60.62 KB
14
- ESM dist/python-context-3GZKN3LR.mjs 4.47 KB
15
- ESM dist/chunk-64U3PNO3.mjs 2.65 KB
16
- ESM ⚡️ Build success in 503ms
17
- CJS dist/cli.js 69.82 KB
18
- CJS dist/index.js 83.72 KB
19
- CJS ⚡️ Build success in 530ms
20
- DTS Build start
21
- DTS ⚡️ Build success in 17045ms
22
- DTS dist/cli.d.ts 20.00 B
23
- DTS dist/index.d.ts 25.70 KB
24
- DTS dist/cli.d.mts 20.00 B
25
- DTS dist/index.d.mts 25.70 KB
1
+
2
+ 
3
+ > @aiready/context-analyzer@0.21.23 build /Users/pengcao/projects/aiready/packages/context-analyzer
4
+ > tsup src/index.ts src/cli.ts --format cjs,esm --dts
5
+
6
+ CLI Building entry: src/cli.ts, src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v8.5.1
9
+ CLI Target: es2020
10
+ CJS Build start
11
+ ESM Build start
12
+ ESM dist/cli.mjs 4.38 KB
13
+ ESM dist/chunk-64U3PNO3.mjs 2.65 KB
14
+ ESM dist/python-context-3GZKN3LR.mjs 4.47 KB
15
+ ESM dist/index.mjs 12.40 KB
16
+ ESM dist/chunk-J3MUOWHC.mjs 58.58 KB
17
+ ESM ⚡️ Build success in 197ms
18
+ CJS dist/cli.js 67.80 KB
19
+ CJS dist/index.js 81.71 KB
20
+ CJS ⚡️ Build success in 199ms
21
+ DTS Build start
22
+ DTS ⚡️ Build success in 6374ms
23
+ DTS dist/cli.d.ts 20.00 B
24
+ DTS dist/index.d.ts 25.70 KB
25
+ DTS dist/cli.d.mts 20.00 B
26
+ DTS dist/index.d.mts 25.70 KB
@@ -1,5 +1,5 @@
1
-
2
- > @aiready/context-analyzer@0.21.6 lint /Users/pengcao/projects/aiready/packages/context-analyzer
3
- > eslint src
4
-
5
-  ELIFECYCLE  Command failed.
1
+
2
+ 
3
+ > @aiready/context-analyzer@0.21.22 lint /Users/pengcao/projects/aiready/packages/context-analyzer
4
+ > eslint src
5
+
@@ -1,41 +1,104 @@
1
-
2
- > @aiready/context-analyzer@0.21.17 test /Users/pengcao/projects/aiready/packages/context-analyzer
3
- > vitest run
4
-
5
-
6
-  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/context-analyzer
7
-
8
- Sourcemap for "/Users/pengcao/projects/aiready/packages/context-analyzer/dist/semantic-analysis.js" points to missing source files
9
- ✓ dist/__tests__/contract.test.js (1 test) 21ms
10
- ✓ dist/__tests__/fragmentation-advanced.test.js (3 tests) 2ms
11
- ✓ dist/__tests__/fragmentation-coupling.test.js (2 tests) 21ms
12
- ✓ dist/__tests__/auto-detection.test.js (8 tests) 22ms
13
- ✓ dist/__tests__/analyzer.test.js (14 tests) 30ms
14
- ✓ dist/__tests__/provider.test.js (2 tests) 7ms
15
- ✓ src/__tests__/provider.test.ts (2 tests) 7ms
16
- ✓ src/__tests__/contract.test.ts (1 test) 13ms
17
- ✓ src/__tests__/auto-detection.test.ts (8 tests) 23ms
18
- ✓ src/__tests__/fragmentation-coupling.test.ts (2 tests) 15ms
19
- ✓ src/__tests__/analyzer.test.ts (14 tests) 29ms
20
- ✓ src/__tests__/remediation.test.ts (6 tests) 2ms
21
- ✓ dist/__tests__/remediation.test.js (6 tests) 2ms
22
- ✓ dist/__tests__/scoring.test.js (15 tests) 4ms
23
- ✓ dist/__tests__/file-classification.test.js (63 tests) 10ms
24
- ✓ src/__tests__/cluster-detector.test.ts (3 tests) 5ms
25
- ✓ src/__tests__/scoring.test.ts (15 tests) 7ms
26
- ✓ dist/__tests__/enhanced-cohesion.test.js (6 tests) 3ms
27
- ✓ dist/__tests__/cluster-detector.test.js (3 tests) 35ms
28
- ✓ src/__tests__/file-classification.test.ts (63 tests) 8ms
29
- ✓ src/__tests__/fragmentation-log.test.ts (3 tests) 37ms
30
- ✓ src/__tests__/boilerplate-barrel.test.ts (7 tests) 4ms
31
- ✓ dist/__tests__/structural-cohesion.test.js (4 tests) 2ms
32
- ✓ src/__tests__/enhanced-cohesion.test.ts (6 tests) 4ms
33
- ✓ dist/__tests__/fragmentation-log.test.js (3 tests) 2ms
34
- ✓ src/__tests__/fragmentation-advanced.test.ts (3 tests) 3ms
35
- ✓ src/__tests__/structural-cohesion.test.ts (4 tests) 13ms
36
-
37
-  Test Files  27 passed (27)
38
-  Tests  267 passed (267)
39
-  Start at  12:14:15
40
-  Duration  9.54s (transform 14.31s, setup 0ms, import 69.20s, tests 330ms, environment 3ms)
41
-
1
+
2
+ 
3
+ > @aiready/context-analyzer@0.21.22 test /Users/pengcao/projects/aiready/packages/context-analyzer
4
+ > vitest run
5
+
6
+ [?25l
7
+  RUN  v4.0.18 /Users/pengcao/projects/aiready/packages/context-analyzer
8
+
9
+ ✓ src/__tests__/report/console-report.test.ts (8 tests) 79ms
10
+ ✓ src/__tests__/report/html-report.test.ts (11 tests) 26ms
11
+ ✓ src/__tests__/issue-analyzer.test.ts (17 tests) 367ms
12
+ ✓ should detect high context budget as critical when 50% over limit  360ms
13
+ Sourcemap for "/Users/pengcao/projects/aiready/packages/context-analyzer/dist/semantic-analysis.js" points to missing source files
14
+ ✓ dist/__tests__/analyzer.test.js (14 tests) 67ms
15
+ ✓ dist/__tests__/fragmentation-coupling.test.js (2 tests) 174ms
16
+ stderr | src/__tests__/orchestrator.test.ts > analyzeContext > should filter Python files when not present
17
+ Failed to analyze src/file2.py: Error: ENOENT: no such file or directory, open 'src/file2.py'
18
+  at open (node:internal/fs/promises:636:25)
19
+  at Object.readFile (node:internal/fs/promises:1273:14)
20
+ at analyzePythonContext (/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts:75:20)
21
+ at Module.analyzeContext (/Users/pengcao/projects/aiready/packages/context-analyzer/src/orchestrator.ts:79:27)
22
+ at /Users/pengcao/projects/aiready/packages/context-analyzer/src/__tests__/orchestrator.test.ts:68:21
23
+ at file:///Users/pengcao/projects/aiready/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:20 {
24
+ errno: -2,
25
+ code: 'ENOENT',
26
+ syscall: 'open',
27
+ path: 'src/file2.py'
28
+ }
29
+
30
+ ✓ src/__tests__/orchestrator.test.ts (8 tests) 148ms
31
+ ✓ dist/__tests__/auto-detection.test.js (8 tests) 151ms
32
+ ✓ src/__tests__/contract.test.ts (1 test) 23ms
33
+ ✓ dist/__tests__/contract.test.js (1 test) 186ms
34
+ ✓ src/__tests__/auto-detection.test.ts (8 tests) 153ms
35
+ ✓ src/__tests__/analyzer.test.ts (14 tests) 204ms
36
+ ✓ src/__tests__/fragmentation-coupling.test.ts (2 tests) 328ms
37
+ ✓ src/__tests__/defaults.test.ts (7 tests) 5ms
38
+ stderr | src/__tests__/python-context.test.ts > python-context > analyzePythonContext > should filter for Python files only
39
+ Failed to analyze src/file2.py: Error: [vitest] No "default" export is defined on the "fs" mock. Did you forget to return it from "vi.mock"?
40
+ If you need to partially mock a module, you can use "importOriginal" helper inside:
41
+
42
+ at VitestMocker.createError (file:///Users/pengcao/projects/aiready/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@24.12.0_jiti@2.6.1_jsdom@29.0.1_ligh_31f3b106720f26894d735ccbd020532a/node_modules/vitest/dist/chunks/startModuleRunner.DEj0jb3e.js:311:17)
43
+ at Object.get (file:///Users/pengcao/projects/aiready/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@24.12.0_jiti@2.6.1_jsdom@29.0.1_ligh_31f3b106720f26894d735ccbd020532a/node_modules/vitest/dist/chunks/startModuleRunner.DEj0jb3e.js:384:16)
44
+ at Module.analyzePythonContext (/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts:75:26)
45
+  at processTicksAndRejections (node:internal/process/task_queues:104:5)
46
+ at /Users/pengcao/projects/aiready/packages/context-analyzer/src/__tests__/python-context.test.ts:55:23
47
+ at file:///Users/pengcao/projects/aiready/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:20 {
48
+ codeFrame: 'vi.mock(import("fs"), async (importOriginal) => {\n' +
49
+ ' const actual = await importOriginal()\n' +
50
+ ' return {\n' +
51
+ ' ...actual,\n' +
52
+ ' // your mocked methods\n' +
53
+ ' }\n' +
54
+ '})'
55
+ }
56
+
57
+ stderr | src/__tests__/python-context.test.ts > python-context > analyzePythonContext > should analyze Python files and return metrics
58
+ Failed to analyze src/test.py: Error: [vitest] No "default" export is defined on the "fs" mock. Did you forget to return it from "vi.mock"?
59
+ If you need to partially mock a module, you can use "importOriginal" helper inside:
60
+
61
+ at VitestMocker.createError (file:///Users/pengcao/projects/aiready/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@24.12.0_jiti@2.6.1_jsdom@29.0.1_ligh_31f3b106720f26894d735ccbd020532a/node_modules/vitest/dist/chunks/startModuleRunner.DEj0jb3e.js:311:17)
62
+ at Object.get (file:///Users/pengcao/projects/aiready/node_modules/.pnpm/vitest@4.0.18_@opentelemetry+api@1.9.0_@types+node@24.12.0_jiti@2.6.1_jsdom@29.0.1_ligh_31f3b106720f26894d735ccbd020532a/node_modules/vitest/dist/chunks/startModuleRunner.DEj0jb3e.js:384:16)
63
+ at Module.analyzePythonContext (/Users/pengcao/projects/aiready/packages/context-analyzer/src/analyzers/python-context.ts:75:26)
64
+  at processTicksAndRejections (node:internal/process/task_queues:104:5)
65
+ at /Users/pengcao/projects/aiready/packages/context-analyzer/src/__tests__/python-context.test.ts:76:23
66
+ at file:///Users/pengcao/projects/aiready/node_modules/.pnpm/@vitest+runner@4.0.18/node_modules/@vitest/runner/dist/index.js:915:20 {
67
+ codeFrame: 'vi.mock(import("fs"), async (importOriginal) => {\n' +
68
+ ' const actual = await importOriginal()\n' +
69
+ ' return {\n' +
70
+ ' ...actual,\n' +
71
+ ' // your mocked methods\n' +
72
+ ' }\n' +
73
+ '})'
74
+ }
75
+
76
+ ✓ src/__tests__/python-context.test.ts (4 tests) 11ms
77
+ ✓ src/__tests__/domain-inference.test.ts (26 tests) 8ms
78
+ ✓ src/__tests__/consolidation.test.ts (6 tests) 19ms
79
+ ✓ src/__tests__/scoring.test.ts (15 tests) 9ms
80
+ ✓ dist/__tests__/file-classification.test.js (63 tests) 7ms
81
+ ✓ src/__tests__/file-classification.test.ts (63 tests) 10ms
82
+ ✓ src/__tests__/structural-cohesion.test.ts (4 tests) 3ms
83
+ ✓ src/__tests__/provider.test.ts (2 tests) 9ms
84
+ ✓ src/__tests__/boilerplate-barrel.test.ts (7 tests) 4ms
85
+ ✓ dist/__tests__/cluster-detector.test.js (3 tests) 7ms
86
+ ✓ dist/__tests__/scoring.test.js (15 tests) 9ms
87
+ ✓ src/__tests__/remediation.test.ts (6 tests) 3ms
88
+ ✓ src/__tests__/enhanced-cohesion.test.ts (6 tests) 4ms
89
+ ✓ dist/__tests__/remediation.test.js (6 tests) 9ms
90
+ ✓ dist/__tests__/fragmentation-advanced.test.js (3 tests) 4ms
91
+ ✓ dist/__tests__/provider.test.js (2 tests) 7ms
92
+ ✓ src/__tests__/cluster-detector.test.ts (3 tests) 5ms
93
+ ✓ dist/__tests__/enhanced-cohesion.test.js (6 tests) 3ms
94
+ ✓ src/__tests__/fragmentation-advanced.test.ts (3 tests) 3ms
95
+ ✓ dist/__tests__/structural-cohesion.test.js (4 tests) 3ms
96
+ ✓ src/__tests__/fragmentation-log.test.ts (3 tests) 2ms
97
+ ✓ dist/__tests__/fragmentation-log.test.js (3 tests) 2ms
98
+
99
+  Test Files  35 passed (35)
100
+  Tests  354 passed (354)
101
+  Start at  13:03:38
102
+  Duration  9.84s (transform 7.86s, setup 0ms, import 64.77s, tests 2.05s, environment 12ms)
103
+
104
+ [?25h