@git.zone/tsdoc 1.5.1 → 1.6.0
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/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/aidocs_classes/commit.js +2 -2
- package/dist_ts/context/config-manager.d.ts +22 -1
- package/dist_ts/context/config-manager.js +114 -4
- package/dist_ts/context/context-analyzer.d.ts +73 -0
- package/dist_ts/context/context-analyzer.js +311 -0
- package/dist_ts/context/context-cache.d.ts +73 -0
- package/dist_ts/context/context-cache.js +238 -0
- package/dist_ts/context/context-trimmer.d.ts +8 -0
- package/dist_ts/context/context-trimmer.js +60 -1
- package/dist_ts/context/enhanced-context.d.ts +12 -1
- package/dist_ts/context/enhanced-context.js +201 -33
- package/dist_ts/context/index.d.ts +6 -3
- package/dist_ts/context/index.js +5 -2
- package/dist_ts/context/lazy-file-loader.d.ts +60 -0
- package/dist_ts/context/lazy-file-loader.js +164 -0
- package/dist_ts/context/types.d.ts +143 -0
- package/package.json +12 -13
- package/readme.md +441 -587
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/aidocs_classes/commit.ts +2 -2
- package/ts/context/config-manager.ts +147 -15
- package/ts/context/context-analyzer.ts +391 -0
- package/ts/context/context-cache.ts +285 -0
- package/ts/context/context-trimmer.ts +64 -0
- package/ts/context/enhanced-context.ts +246 -40
- package/ts/context/index.ts +31 -5
- package/ts/context/lazy-file-loader.ts +191 -0
- package/ts/context/types.ts +153 -0
|
@@ -54,6 +54,68 @@ export interface IContextConfig {
|
|
|
54
54
|
};
|
|
55
55
|
/** Trimming configuration */
|
|
56
56
|
trimming?: ITrimConfig;
|
|
57
|
+
/** Cache configuration */
|
|
58
|
+
cache?: ICacheConfig;
|
|
59
|
+
/** Analyzer configuration */
|
|
60
|
+
analyzer?: IAnalyzerConfig;
|
|
61
|
+
/** Prioritization weights */
|
|
62
|
+
prioritization?: IPrioritizationWeights;
|
|
63
|
+
/** Tier configuration for adaptive trimming */
|
|
64
|
+
tiers?: ITierConfig;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Cache configuration
|
|
68
|
+
*/
|
|
69
|
+
export interface ICacheConfig {
|
|
70
|
+
/** Whether caching is enabled */
|
|
71
|
+
enabled?: boolean;
|
|
72
|
+
/** Time-to-live in seconds */
|
|
73
|
+
ttl?: number;
|
|
74
|
+
/** Maximum cache size in MB */
|
|
75
|
+
maxSize?: number;
|
|
76
|
+
/** Cache directory path */
|
|
77
|
+
directory?: string;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Analyzer configuration
|
|
81
|
+
*/
|
|
82
|
+
export interface IAnalyzerConfig {
|
|
83
|
+
/** Whether analyzer is enabled */
|
|
84
|
+
enabled?: boolean;
|
|
85
|
+
/** Whether to use AI refinement for selection */
|
|
86
|
+
useAIRefinement?: boolean;
|
|
87
|
+
/** AI model to use for refinement */
|
|
88
|
+
aiModel?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Weights for file prioritization
|
|
92
|
+
*/
|
|
93
|
+
export interface IPrioritizationWeights {
|
|
94
|
+
/** Weight for dependency centrality */
|
|
95
|
+
dependencyWeight?: number;
|
|
96
|
+
/** Weight for task relevance */
|
|
97
|
+
relevanceWeight?: number;
|
|
98
|
+
/** Weight for token efficiency */
|
|
99
|
+
efficiencyWeight?: number;
|
|
100
|
+
/** Weight for file recency */
|
|
101
|
+
recencyWeight?: number;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Tier configuration for adaptive trimming
|
|
105
|
+
*/
|
|
106
|
+
export interface ITierConfig {
|
|
107
|
+
essential?: ITierSettings;
|
|
108
|
+
important?: ITierSettings;
|
|
109
|
+
optional?: ITierSettings;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Settings for a single tier
|
|
113
|
+
*/
|
|
114
|
+
export interface ITierSettings {
|
|
115
|
+
/** Minimum score to qualify for this tier */
|
|
116
|
+
minScore: number;
|
|
117
|
+
/** Trimming level to apply */
|
|
118
|
+
trimLevel: 'none' | 'light' | 'aggressive';
|
|
57
119
|
}
|
|
58
120
|
/**
|
|
59
121
|
* Basic file information interface
|
|
@@ -87,3 +149,84 @@ export interface IContextResult {
|
|
|
87
149
|
/** Token savings from trimming */
|
|
88
150
|
tokenSavings: number;
|
|
89
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* File metadata without contents (for lazy loading)
|
|
154
|
+
*/
|
|
155
|
+
export interface IFileMetadata {
|
|
156
|
+
/** The file path */
|
|
157
|
+
path: string;
|
|
158
|
+
/** The file's relative path from the project root */
|
|
159
|
+
relativePath: string;
|
|
160
|
+
/** File size in bytes */
|
|
161
|
+
size: number;
|
|
162
|
+
/** Last modified time (Unix timestamp) */
|
|
163
|
+
mtime: number;
|
|
164
|
+
/** Estimated token count (without loading full contents) */
|
|
165
|
+
estimatedTokens: number;
|
|
166
|
+
/** The file's importance score */
|
|
167
|
+
importanceScore?: number;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Cache entry for a file
|
|
171
|
+
*/
|
|
172
|
+
export interface ICacheEntry {
|
|
173
|
+
/** File path */
|
|
174
|
+
path: string;
|
|
175
|
+
/** File contents */
|
|
176
|
+
contents: string;
|
|
177
|
+
/** Token count */
|
|
178
|
+
tokenCount: number;
|
|
179
|
+
/** Last modified time when cached */
|
|
180
|
+
mtime: number;
|
|
181
|
+
/** When this cache entry was created */
|
|
182
|
+
cachedAt: number;
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Dependency information for a file
|
|
186
|
+
*/
|
|
187
|
+
export interface IFileDependencies {
|
|
188
|
+
/** File path */
|
|
189
|
+
path: string;
|
|
190
|
+
/** Files this file imports */
|
|
191
|
+
imports: string[];
|
|
192
|
+
/** Files that import this file */
|
|
193
|
+
importedBy: string[];
|
|
194
|
+
/** Centrality score (0-1) - how central this file is in the dependency graph */
|
|
195
|
+
centrality: number;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Analysis result for a file
|
|
199
|
+
*/
|
|
200
|
+
export interface IFileAnalysis {
|
|
201
|
+
/** File path */
|
|
202
|
+
path: string;
|
|
203
|
+
/** Task relevance score (0-1) */
|
|
204
|
+
relevanceScore: number;
|
|
205
|
+
/** Dependency centrality score (0-1) */
|
|
206
|
+
centralityScore: number;
|
|
207
|
+
/** Token efficiency score (0-1) */
|
|
208
|
+
efficiencyScore: number;
|
|
209
|
+
/** Recency score (0-1) */
|
|
210
|
+
recencyScore: number;
|
|
211
|
+
/** Combined importance score (0-1) */
|
|
212
|
+
importanceScore: number;
|
|
213
|
+
/** Assigned tier */
|
|
214
|
+
tier: 'essential' | 'important' | 'optional' | 'excluded';
|
|
215
|
+
/** Reason for the score */
|
|
216
|
+
reason?: string;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Result of context analysis
|
|
220
|
+
*/
|
|
221
|
+
export interface IAnalysisResult {
|
|
222
|
+
/** Task type being analyzed */
|
|
223
|
+
taskType: TaskType;
|
|
224
|
+
/** Analyzed files with scores */
|
|
225
|
+
files: IFileAnalysis[];
|
|
226
|
+
/** Dependency graph */
|
|
227
|
+
dependencyGraph: Map<string, IFileDependencies>;
|
|
228
|
+
/** Total files analyzed */
|
|
229
|
+
totalFiles: number;
|
|
230
|
+
/** Analysis duration in ms */
|
|
231
|
+
analysisDuration: number;
|
|
232
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@git.zone/tsdoc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A comprehensive TypeScript documentation tool that leverages AI to generate and enhance project documentation, including dynamic README creation, API docs via TypeDoc, and smart commit message generation.",
|
|
6
6
|
"type": "module",
|
|
@@ -13,30 +13,29 @@
|
|
|
13
13
|
"tsdoc": "cli.js"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@git.zone/tsbuild": "^2.6.
|
|
16
|
+
"@git.zone/tsbuild": "^2.6.8",
|
|
17
17
|
"@git.zone/tsrun": "^1.2.46",
|
|
18
|
-
"@git.zone/tstest": "^2.3.
|
|
19
|
-
"@push.rocks/tapbundle": "^6.0.3",
|
|
18
|
+
"@git.zone/tstest": "^2.3.6",
|
|
20
19
|
"@types/node": "^22.15.17"
|
|
21
20
|
},
|
|
22
21
|
"dependencies": {
|
|
23
|
-
"@git.zone/tspublish": "^1.10.
|
|
22
|
+
"@git.zone/tspublish": "^1.10.3",
|
|
24
23
|
"@push.rocks/early": "^4.0.3",
|
|
25
|
-
"@push.rocks/npmextra": "^5.3.
|
|
26
|
-
"@push.rocks/qenv": "^6.1.
|
|
24
|
+
"@push.rocks/npmextra": "^5.3.3",
|
|
25
|
+
"@push.rocks/qenv": "^6.1.3",
|
|
27
26
|
"@push.rocks/smartai": "^0.5.11",
|
|
28
27
|
"@push.rocks/smartcli": "^4.0.11",
|
|
29
28
|
"@push.rocks/smartdelay": "^3.0.5",
|
|
30
|
-
"@push.rocks/smartfile": "^11.2.
|
|
29
|
+
"@push.rocks/smartfile": "^11.2.7",
|
|
31
30
|
"@push.rocks/smartgit": "^3.2.1",
|
|
32
31
|
"@push.rocks/smartinteract": "^2.0.15",
|
|
33
|
-
"@push.rocks/smartlog": "^3.1.
|
|
32
|
+
"@push.rocks/smartlog": "^3.1.9",
|
|
34
33
|
"@push.rocks/smartlog-destination-local": "^9.0.2",
|
|
35
34
|
"@push.rocks/smartpath": "^6.0.0",
|
|
36
|
-
"@push.rocks/smartshell": "^3.
|
|
35
|
+
"@push.rocks/smartshell": "^3.3.0",
|
|
37
36
|
"@push.rocks/smarttime": "^4.0.6",
|
|
38
|
-
"gpt-tokenizer": "^
|
|
39
|
-
"typedoc": "^0.28.
|
|
37
|
+
"gpt-tokenizer": "^3.0.1",
|
|
38
|
+
"typedoc": "^0.28.12",
|
|
40
39
|
"typescript": "^5.9.2"
|
|
41
40
|
},
|
|
42
41
|
"files": [
|
|
@@ -76,7 +75,7 @@
|
|
|
76
75
|
},
|
|
77
76
|
"homepage": "https://gitlab.com/gitzone/tsdoc#readme",
|
|
78
77
|
"scripts": {
|
|
79
|
-
"test": "(tstest test/) && npm run testCli",
|
|
78
|
+
"test": "(tstest test/ --verbose --logfile --timeout 600) && npm run testCli",
|
|
80
79
|
"testCli": "(node ./cli.ts.js) && (node ./cli.ts.js aidocs)",
|
|
81
80
|
"build": "(tsbuild --web --allowimplicitany)",
|
|
82
81
|
"buildDocs": "tsdoc"
|