ccjk 9.6.1 → 9.8.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.
Files changed (56) hide show
  1. package/dist/chunks/boost.mjs +246 -7
  2. package/dist/chunks/ccjk-mcp.mjs +1 -1
  3. package/dist/chunks/ccr.mjs +25 -28
  4. package/dist/chunks/check-updates.mjs +4 -3
  5. package/dist/chunks/claude-code-config-manager.mjs +1 -1
  6. package/dist/chunks/claude-code-incremental-manager.mjs +1 -1
  7. package/dist/chunks/claude-config.mjs +1 -1
  8. package/dist/chunks/codex-config-switch.mjs +3 -4
  9. package/dist/chunks/codex-provider-manager.mjs +1 -2
  10. package/dist/chunks/codex.mjs +204 -3
  11. package/dist/chunks/config-switch.mjs +2 -3
  12. package/dist/chunks/config.mjs +1 -1
  13. package/dist/chunks/doctor.mjs +1 -1
  14. package/dist/chunks/features.mjs +24 -15
  15. package/dist/chunks/hook-installer.mjs +44 -0
  16. package/dist/chunks/index3.mjs +32 -32
  17. package/dist/chunks/init.mjs +129 -87
  18. package/dist/chunks/installer2.mjs +1 -1
  19. package/dist/chunks/interview.mjs +1 -1
  20. package/dist/chunks/mcp.mjs +1058 -17
  21. package/dist/chunks/menu.mjs +140 -56
  22. package/dist/chunks/package.mjs +2 -210
  23. package/dist/chunks/platform.mjs +1 -1
  24. package/dist/chunks/quick-setup.mjs +35 -18
  25. package/dist/chunks/simple-config.mjs +1 -1
  26. package/dist/{shared/ccjk.q1koQxEE.mjs → chunks/smart-defaults.mjs} +77 -79
  27. package/dist/chunks/status.mjs +208 -101
  28. package/dist/chunks/thinking.mjs +1 -1
  29. package/dist/chunks/uninstall.mjs +6 -4
  30. package/dist/chunks/update.mjs +4 -7
  31. package/dist/chunks/version-checker.mjs +1 -1
  32. package/dist/cli.mjs +4 -80
  33. package/dist/index.d.mts +17 -1482
  34. package/dist/index.d.ts +17 -1482
  35. package/dist/index.mjs +12 -4191
  36. package/dist/shared/{ccjk.CSkyCZIM.mjs → ccjk.Bndhan7G.mjs} +4 -242
  37. package/dist/shared/ccjk.CeE8RLG2.mjs +62 -0
  38. package/dist/shared/ccjk.DKojSRzw.mjs +266 -0
  39. package/dist/shared/{ccjk.CItD1fpl.mjs → ccjk.DvIrK0wz.mjs} +1 -1
  40. package/dist/shared/ccjk.LsPZ2PYo.mjs +1048 -0
  41. package/package.json +1 -1
  42. package/dist/chunks/api-adapter.mjs +0 -180
  43. package/dist/chunks/cli.mjs +0 -2227
  44. package/dist/chunks/context-menu.mjs +0 -913
  45. package/dist/chunks/hooks-sync.mjs +0 -1627
  46. package/dist/chunks/mcp-market.mjs +0 -1077
  47. package/dist/chunks/mcp-server.mjs +0 -776
  48. package/dist/chunks/project-detector.mjs +0 -131
  49. package/dist/chunks/provider-registry.mjs +0 -92
  50. package/dist/chunks/setup-wizard.mjs +0 -362
  51. package/dist/chunks/tools.mjs +0 -143
  52. package/dist/chunks/workflows2.mjs +0 -232
  53. package/dist/shared/ccjk.C0pb50xH.mjs +0 -347
  54. package/dist/shared/ccjk.ChMkBmdL.mjs +0 -490
  55. package/dist/shared/ccjk.CtSfXUSh.mjs +0 -209
  56. package/dist/shared/ccjk.xfAjmbJp.mjs +0 -75
package/dist/index.d.ts CHANGED
@@ -1,1129 +1,3 @@
1
- import { EventEmitter } from 'node:events';
2
-
3
- /**
4
- * Precomputation Engine Type Definitions
5
- *
6
- * Provides type definitions for AST nodes, symbol tables, call graphs,
7
- * complexity metrics, and precomputed data structures.
8
- */
9
- /**
10
- * Precomputed data for a single file
11
- */
12
- interface PrecomputedData {
13
- filePath: string;
14
- ast: ASTNode;
15
- symbols: SymbolTable;
16
- callGraph: CallGraph;
17
- complexity: ComplexityMetrics;
18
- patterns: Pattern[];
19
- lastModified: number;
20
- checksum: string;
21
- }
22
- /**
23
- * Cache entry structure for LevelDB storage
24
- */
25
- interface CacheEntry {
26
- key: string;
27
- type: 'ast' | 'symbol' | 'call-graph' | 'complexity' | 'patterns';
28
- data: any;
29
- checksum: string;
30
- timestamp: number;
31
- compressed: boolean;
32
- }
33
- /**
34
- * Generic AST node representation
35
- */
36
- interface ASTNode {
37
- type: string;
38
- name?: string;
39
- range: Range;
40
- children: ASTNode[];
41
- metadata: Record<string, any>;
42
- }
43
- /**
44
- * Source code range
45
- */
46
- interface Range {
47
- start: Position;
48
- end: Position;
49
- }
50
- /**
51
- * Position in source file
52
- */
53
- interface Position {
54
- line: number;
55
- column: number;
56
- offset?: number;
57
- }
58
- /**
59
- * Symbol table containing all symbols in a file
60
- */
61
- interface SymbolTable {
62
- filePath: string;
63
- symbols: Symbol[];
64
- exports: Symbol[];
65
- imports: Import[];
66
- scopes: Scope[];
67
- }
68
- /**
69
- * Individual symbol definition
70
- */
71
- interface Symbol {
72
- id: string;
73
- name: string;
74
- kind: SymbolKind;
75
- range: Range;
76
- definingScope: string;
77
- references: Reference[];
78
- metadata: Record<string, any>;
79
- }
80
- /**
81
- * Symbol kinds
82
- */
83
- type SymbolKind = 'function' | 'class' | 'interface' | 'type' | 'variable' | 'constant' | 'parameter' | 'method' | 'property' | 'enum' | 'enumMember' | 'module' | 'namespace';
84
- /**
85
- * Reference to a symbol
86
- */
87
- interface Reference {
88
- filePath: string;
89
- range: Range;
90
- context: string;
91
- }
92
- /**
93
- * Import statement
94
- */
95
- interface Import {
96
- module: string;
97
- imports: ImportSpecifier[];
98
- range: Range;
99
- isDynamic: boolean;
100
- }
101
- /**
102
- * Import specifier
103
- */
104
- interface ImportSpecifier {
105
- name: string;
106
- alias?: string;
107
- kind: 'named' | 'default' | 'namespace';
108
- }
109
- /**
110
- * Scope definition
111
- */
112
- interface Scope {
113
- id: string;
114
- kind: 'module' | 'function' | 'class' | 'block';
115
- range: Range;
116
- parent?: string;
117
- children: string[];
118
- symbols: string[];
119
- }
120
- /**
121
- * Call graph for a file
122
- */
123
- interface CallGraph {
124
- filePath: string;
125
- nodes: CallNode[];
126
- edges: CallEdge[];
127
- entryPoints: string[];
128
- }
129
- /**
130
- * Call graph node (function/method)
131
- */
132
- interface CallNode {
133
- id: string;
134
- name: string;
135
- kind: 'function' | 'method' | 'constructor' | 'arrow';
136
- range: Range;
137
- isAsync: boolean;
138
- isGenerator: boolean;
139
- }
140
- /**
141
- * Call graph edge (function call relationship)
142
- */
143
- interface CallEdge {
144
- from: string;
145
- to: string;
146
- range: Range;
147
- isDynamic: boolean;
148
- callCount: number;
149
- }
150
- /**
151
- * Complexity metrics for code analysis
152
- */
153
- interface ComplexityMetrics {
154
- cyclomatic: number;
155
- cognitive: number;
156
- halstead: HalsteadMetrics;
157
- maintainabilityIndex: number;
158
- linesOfCode: number;
159
- commentRatio: number;
160
- }
161
- /**
162
- * Halstead complexity metrics
163
- */
164
- interface HalsteadMetrics {
165
- n1: number;
166
- n2: number;
167
- N1: number;
168
- N2: number;
169
- vocabulary: number;
170
- difficulty: number;
171
- effort: number;
172
- bugs: number;
173
- time: number;
174
- }
175
- /**
176
- * Code pattern detected during analysis
177
- */
178
- interface Pattern {
179
- id: string;
180
- type: PatternType;
181
- name: string;
182
- range: Range;
183
- description: string;
184
- suggestions: string[];
185
- severity: 'info' | 'warning' | 'error';
186
- }
187
- /**
188
- * Pattern types
189
- */
190
- type PatternType = 'anti-pattern' | 'code-smell' | 'security-risk' | 'performance-issue' | 'best-practice' | 'architecture-pattern';
191
- /**
192
- * Query API interface
193
- */
194
- interface QueryAPI {
195
- queryAST: (filePath: string, offset?: number) => Promise<ASTNode | null>;
196
- querySymbols: (filePath: string) => Promise<SymbolTable | null>;
197
- queryCallGraph: (filePath: string) => Promise<CallGraph | null>;
198
- queryComplexity: (filePath: string) => Promise<ComplexityMetrics | null>;
199
- queryPatterns: (filePath: string) => Promise<Pattern[] | null>;
200
- }
201
- /**
202
- * Cache statistics
203
- */
204
- interface CacheStats {
205
- hits: number;
206
- misses: number;
207
- size: number;
208
- hitRate: number;
209
- }
210
- /**
211
- * Indexing statistics
212
- */
213
- interface IndexingStats {
214
- filesIndexed: number;
215
- totalFiles: number;
216
- errors: string[];
217
- duration: number;
218
- }
219
-
220
- /**
221
- * Query API - AST
222
- *
223
- * Query interface for AST data.
224
- */
225
-
226
- /**
227
- * Query AST for a file
228
- */
229
- declare function queryAST(filePath: string, offset?: number): Promise<ASTNode | null>;
230
- /**
231
- * Query AST node at specific position
232
- */
233
- declare function queryASTAtPosition(filePath: string, line: number, column: number): Promise<ASTNode | null>;
234
- /**
235
- * Query all AST nodes of a specific type
236
- */
237
- declare function queryASTByType(filePath: string, nodeType: string): Promise<ASTNode[]>;
238
- /**
239
- * Query AST nodes with a specific name
240
- */
241
- declare function queryASTByName(filePath: string, name: string): Promise<ASTNode[]>;
242
-
243
- declare const astQueries_queryAST: typeof queryAST;
244
- declare const astQueries_queryASTAtPosition: typeof queryASTAtPosition;
245
- declare const astQueries_queryASTByName: typeof queryASTByName;
246
- declare const astQueries_queryASTByType: typeof queryASTByType;
247
- declare namespace astQueries {
248
- export {
249
- astQueries_queryAST as queryAST,
250
- astQueries_queryASTAtPosition as queryASTAtPosition,
251
- astQueries_queryASTByName as queryASTByName,
252
- astQueries_queryASTByType as queryASTByType,
253
- };
254
- }
255
-
256
- /**
257
- * Query API - Call Graph
258
- *
259
- * Query interface for call graph data.
260
- */
261
-
262
- /**
263
- * Query call graph for a file
264
- */
265
- declare function queryCallGraph(filePath: string): Promise<CallGraph | null>;
266
- /**
267
- * Query entry points (functions not called by others)
268
- */
269
- declare function queryEntryPoints(filePath: string): Promise<CallNode[]>;
270
- /**
271
- * Query function by name
272
- */
273
- declare function queryFunction(filePath: string, name: string): Promise<CallNode | null>;
274
- /**
275
- * Query callers of a function
276
- */
277
- declare function queryCallers(filePath: string, functionName: string): Promise<CallEdge[]>;
278
- /**
279
- * Query callees of a function
280
- */
281
- declare function queryCallees(filePath: string, functionName: string): Promise<CallEdge[]>;
282
- /**
283
- * Query call chain between two functions
284
- */
285
- declare function queryCallChain(filePath: string, from: string, to: string): Promise<string[]>;
286
- /**
287
- * Query recursive functions
288
- */
289
- declare function queryRecursiveFunctions(filePath: string): Promise<CallNode[]>;
290
- /**
291
- * Query call frequency
292
- */
293
- declare function queryCallFrequency(filePath: string): Promise<Map<string, number>>;
294
- /**
295
- * Query most called functions
296
- */
297
- declare function queryMostCalledFunctions(filePath: string, limit?: number): Promise<Array<{
298
- name: string;
299
- count: number;
300
- }>>;
301
- /**
302
- * Query function depth (how deep in call tree)
303
- */
304
- declare function queryFunctionDepth(filePath: string, functionName: string): Promise<number>;
305
- /**
306
- * Query dynamic calls
307
- */
308
- declare function queryDynamicCalls(filePath: string): Promise<CallEdge[]>;
309
- /**
310
- * Query async functions
311
- */
312
- declare function queryAsyncFunctions(filePath: string): Promise<CallNode[]>;
313
-
314
- declare const callGraphQueries_queryAsyncFunctions: typeof queryAsyncFunctions;
315
- declare const callGraphQueries_queryCallChain: typeof queryCallChain;
316
- declare const callGraphQueries_queryCallFrequency: typeof queryCallFrequency;
317
- declare const callGraphQueries_queryCallGraph: typeof queryCallGraph;
318
- declare const callGraphQueries_queryCallees: typeof queryCallees;
319
- declare const callGraphQueries_queryCallers: typeof queryCallers;
320
- declare const callGraphQueries_queryDynamicCalls: typeof queryDynamicCalls;
321
- declare const callGraphQueries_queryEntryPoints: typeof queryEntryPoints;
322
- declare const callGraphQueries_queryFunction: typeof queryFunction;
323
- declare const callGraphQueries_queryFunctionDepth: typeof queryFunctionDepth;
324
- declare const callGraphQueries_queryMostCalledFunctions: typeof queryMostCalledFunctions;
325
- declare const callGraphQueries_queryRecursiveFunctions: typeof queryRecursiveFunctions;
326
- declare namespace callGraphQueries {
327
- export {
328
- callGraphQueries_queryAsyncFunctions as queryAsyncFunctions,
329
- callGraphQueries_queryCallChain as queryCallChain,
330
- callGraphQueries_queryCallFrequency as queryCallFrequency,
331
- callGraphQueries_queryCallGraph as queryCallGraph,
332
- callGraphQueries_queryCallees as queryCallees,
333
- callGraphQueries_queryCallers as queryCallers,
334
- callGraphQueries_queryDynamicCalls as queryDynamicCalls,
335
- callGraphQueries_queryEntryPoints as queryEntryPoints,
336
- callGraphQueries_queryFunction as queryFunction,
337
- callGraphQueries_queryFunctionDepth as queryFunctionDepth,
338
- callGraphQueries_queryMostCalledFunctions as queryMostCalledFunctions,
339
- callGraphQueries_queryRecursiveFunctions as queryRecursiveFunctions,
340
- };
341
- }
342
-
343
- /**
344
- * Query API - Symbols
345
- *
346
- * Query interface for symbol table data.
347
- */
348
-
349
- /**
350
- * Query symbol table for a file
351
- */
352
- declare function querySymbols(filePath: string): Promise<SymbolTable | null>;
353
- /**
354
- * Query all exported symbols
355
- */
356
- declare function queryExports(filePath: string): Promise<Symbol[]>;
357
- /**
358
- * Query all imported symbols
359
- */
360
- declare function queryImports(filePath: string): Promise<Import[]>;
361
- /**
362
- * Query symbol by name
363
- */
364
- declare function querySymbolByName(filePath: string, name: string): Promise<Symbol | null>;
365
- /**
366
- * Query symbols by kind
367
- */
368
- declare function querySymbolsByKind(filePath: string, kind: string): Promise<Symbol[]>;
369
- /**
370
- * Query symbol at position
371
- */
372
- declare function querySymbolAtPosition(filePath: string, line: number, column: number): Promise<Symbol | null>;
373
- /**
374
- * Query all functions
375
- */
376
- declare function queryFunctions(filePath: string): Promise<Symbol[]>;
377
- /**
378
- * Query all classes
379
- */
380
- declare function queryClasses(filePath: string): Promise<Symbol[]>;
381
- /**
382
- * Query all interfaces
383
- */
384
- declare function queryInterfaces(filePath: string): Promise<Symbol[]>;
385
- /**
386
- * Query all types
387
- */
388
- declare function queryTypes(filePath: string): Promise<Symbol[]>;
389
- /**
390
- * Query all variables
391
- */
392
- declare function queryVariables(filePath: string): Promise<Symbol[]>;
393
- /**
394
- * Query scope at position
395
- */
396
- declare function queryScopeAtPosition(filePath: string, line: number, column: number): Promise<string | null>;
397
- /**
398
- * Query symbols in scope
399
- */
400
- declare function querySymbolsInScope(filePath: string, scopeId: string): Promise<Symbol[]>;
401
-
402
- declare const symbolQueries_queryClasses: typeof queryClasses;
403
- declare const symbolQueries_queryExports: typeof queryExports;
404
- declare const symbolQueries_queryFunctions: typeof queryFunctions;
405
- declare const symbolQueries_queryImports: typeof queryImports;
406
- declare const symbolQueries_queryInterfaces: typeof queryInterfaces;
407
- declare const symbolQueries_queryScopeAtPosition: typeof queryScopeAtPosition;
408
- declare const symbolQueries_querySymbolAtPosition: typeof querySymbolAtPosition;
409
- declare const symbolQueries_querySymbolByName: typeof querySymbolByName;
410
- declare const symbolQueries_querySymbols: typeof querySymbols;
411
- declare const symbolQueries_querySymbolsByKind: typeof querySymbolsByKind;
412
- declare const symbolQueries_querySymbolsInScope: typeof querySymbolsInScope;
413
- declare const symbolQueries_queryTypes: typeof queryTypes;
414
- declare const symbolQueries_queryVariables: typeof queryVariables;
415
- declare namespace symbolQueries {
416
- export {
417
- symbolQueries_queryClasses as queryClasses,
418
- symbolQueries_queryExports as queryExports,
419
- symbolQueries_queryFunctions as queryFunctions,
420
- symbolQueries_queryImports as queryImports,
421
- symbolQueries_queryInterfaces as queryInterfaces,
422
- symbolQueries_queryScopeAtPosition as queryScopeAtPosition,
423
- symbolQueries_querySymbolAtPosition as querySymbolAtPosition,
424
- symbolQueries_querySymbolByName as querySymbolByName,
425
- symbolQueries_querySymbols as querySymbols,
426
- symbolQueries_querySymbolsByKind as querySymbolsByKind,
427
- symbolQueries_querySymbolsInScope as querySymbolsInScope,
428
- symbolQueries_queryTypes as queryTypes,
429
- symbolQueries_queryVariables as queryVariables,
430
- };
431
- }
432
-
433
- /**
434
- * Query API Router
435
- *
436
- * Main API router that combines all query interfaces.
437
- */
438
-
439
- /**
440
- * Query API implementation
441
- */
442
- declare class QueryAPIRouter implements QueryAPI {
443
- /**
444
- * Query AST for a file
445
- */
446
- queryAST(filePath: string, offset?: number): Promise<ASTNode | null>;
447
- /**
448
- * Query symbol table for a file
449
- */
450
- querySymbols(filePath: string): Promise<SymbolTable | null>;
451
- /**
452
- * Query call graph for a file
453
- */
454
- queryCallGraph(filePath: string): Promise<CallGraph | null>;
455
- /**
456
- * Query complexity metrics for a file
457
- */
458
- queryComplexity(filePath: string): Promise<ComplexityMetrics | null>;
459
- /**
460
- * Query patterns for a file
461
- */
462
- queryPatterns(filePath: string): Promise<Pattern[] | null>;
463
- /**
464
- * Query all precomputed data for a file
465
- */
466
- queryAll(filePath: string): Promise<{
467
- ast: ASTNode | null;
468
- symbols: SymbolTable | null;
469
- callGraph: CallGraph | null;
470
- complexity: ComplexityMetrics | null;
471
- patterns: Pattern[] | null;
472
- }>;
473
- /**
474
- * Get cache statistics
475
- */
476
- getStats(): Promise<{
477
- l1: {
478
- hits: number;
479
- misses: number;
480
- size: number;
481
- hitRate: number;
482
- };
483
- l2: {
484
- size: number;
485
- };
486
- combined: {
487
- hitRate: number;
488
- };
489
- }>;
490
- /**
491
- * Clear all caches
492
- */
493
- clear(): Promise<void>;
494
- /**
495
- * Warm up cache for a file
496
- */
497
- warmup(filePath: string): Promise<void>;
498
- }
499
- /**
500
- * Get or create global query API
501
- */
502
- declare function getQueryAPI(): QueryAPIRouter;
503
- /**
504
- * Export individual query functions for convenience
505
- */
506
- declare const ast: typeof astQueries;
507
- declare const symbols: typeof symbolQueries;
508
- declare const callGraph: typeof callGraphQueries;
509
-
510
- /**
511
- * Memory Cache (LRU)
512
- *
513
- * In-memory LRU cache for fast access to frequently used data.
514
- * Integrates with LevelDB storage for two-tier caching.
515
- */
516
-
517
- /**
518
- * LRU memory cache class
519
- */
520
- declare class MemoryCache {
521
- private cache;
522
- private head;
523
- private tail;
524
- private maxSize;
525
- private ttl;
526
- private hits;
527
- private misses;
528
- constructor(maxSize?: number);
529
- /**
530
- * Get entry from cache
531
- */
532
- get(key: string): CacheEntry | undefined;
533
- /**
534
- * Set entry in cache
535
- */
536
- set(key: string, entry: CacheEntry): void;
537
- /**
538
- * Check if key exists
539
- */
540
- has(key: string): boolean;
541
- /**
542
- * Delete entry from cache
543
- */
544
- delete(key: string): boolean;
545
- /**
546
- * Clear all entries
547
- */
548
- clear(): void;
549
- /**
550
- * Get cache statistics
551
- */
552
- getStats(): CacheStats;
553
- /**
554
- * Get cache size
555
- */
556
- getSize(): number;
557
- /**
558
- * Check if cache is empty
559
- */
560
- isEmpty(): boolean;
561
- /**
562
- * Get all keys
563
- */
564
- keys(): string[];
565
- /**
566
- * Get all values
567
- */
568
- values(): CacheEntry[];
569
- /**
570
- * Dump cache contents (for debugging)
571
- */
572
- dump(): Map<string, CacheEntry>;
573
- /**
574
- * Load multiple entries into cache
575
- */
576
- loadMany(entries: [string, CacheEntry][]): void;
577
- /**
578
- * Delete multiple entries
579
- */
580
- deleteMany(keys: string[]): number;
581
- /**
582
- * Reset statistics
583
- */
584
- resetStats(): void;
585
- /**
586
- * Get estimated memory usage
587
- */
588
- getEstimatedSize(): number;
589
- /**
590
- * Prune cache (remove expired entries)
591
- */
592
- prune(): void;
593
- /**
594
- * Set cache size limit
595
- */
596
- setMaxSize(maxSize: number): void;
597
- /**
598
- * Get cache configuration
599
- */
600
- getConfig(): {
601
- maxSize: number;
602
- ttl: number;
603
- };
604
- /**
605
- * Move node to front of list
606
- */
607
- private moveToFront;
608
- /**
609
- * Add node to front of list
610
- */
611
- private addToFront;
612
- /**
613
- * Remove node from list
614
- */
615
- private removeNode;
616
- /**
617
- * Evict least recently used entry
618
- */
619
- private evictLRU;
620
- }
621
-
622
- /**
623
- * Multi-Level Index
624
- *
625
- * Two-tier caching system with L1 memory cache and L2 LevelDB storage.
626
- * Provides intelligent cache management with automatic promotion/demotion.
627
- */
628
-
629
- /**
630
- * Cache level configuration
631
- */
632
- interface CacheLevelConfig {
633
- name: string;
634
- maxSize: number;
635
- ttl: number;
636
- }
637
- /**
638
- * Cache entry with metadata for multi-level indexing
639
- */
640
- interface IndexedEntry extends CacheEntry {
641
- accessCount: number;
642
- lastAccess: number;
643
- level: 1 | 2;
644
- }
645
- /**
646
- * Multi-level index class
647
- */
648
- declare class MultiLevelIndex {
649
- private l1;
650
- private l2;
651
- private config;
652
- constructor(dbPath: string, config?: {
653
- l1?: Partial<CacheLevelConfig>;
654
- l2?: Partial<CacheLevelConfig>;
655
- });
656
- /**
657
- * Get entry from cache (L1 first, then L2)
658
- */
659
- get(key: string): Promise<IndexedEntry | null>;
660
- /**
661
- * Set entry in cache (writes to both levels)
662
- */
663
- set(key: string, entry: CacheEntry): Promise<void>;
664
- /**
665
- * Delete entry from both levels
666
- */
667
- delete(key: string): Promise<void>;
668
- /**
669
- * Check if key exists
670
- */
671
- has(key: string): Promise<boolean>;
672
- /**
673
- * Get all entries for a file path
674
- */
675
- getByFilePath(filePath: string): Promise<IndexedEntry[]>;
676
- /**
677
- * Promote entry to L1 cache
678
- */
679
- promoteToL1(key: string, entry: IndexedEntry): Promise<void>;
680
- /**
681
- * Demote entry from L1 to L2
682
- */
683
- demoteToL2(key: string): Promise<void>;
684
- /**
685
- * Get combined statistics
686
- */
687
- getStats(): Promise<{
688
- l1: ReturnType<MemoryCache['getStats']>;
689
- l2: {
690
- size: number;
691
- };
692
- combined: {
693
- hitRate: number;
694
- };
695
- }>;
696
- /**
697
- * Clear all caches
698
- */
699
- clear(): Promise<void>;
700
- /**
701
- * Warm up L1 cache with frequently accessed entries
702
- */
703
- warmup(filePath: string): Promise<void>;
704
- /**
705
- * Evict stale entries from L1
706
- */
707
- evictStale(): Promise<void>;
708
- /**
709
- * Close cache system
710
- */
711
- close(): Promise<void>;
712
- /**
713
- * Compact L2 storage
714
- */
715
- compact(): Promise<void>;
716
- /**
717
- * Get cache configuration
718
- */
719
- getConfig(): typeof this.config;
720
- /**
721
- * Update cache configuration
722
- */
723
- updateConfig(config: {
724
- l1?: Partial<CacheLevelConfig>;
725
- l2?: Partial<CacheLevelConfig>;
726
- }): void;
727
- }
728
- /**
729
- * Get or create global multi-level index
730
- */
731
- declare function getGlobalIndex(dbPath?: string): MultiLevelIndex;
732
- /**
733
- * Close global index
734
- */
735
- declare function closeGlobalIndex(): Promise<void>;
736
-
737
- /**
738
- * Dependency Tracker
739
- *
740
- * Tracks dependencies between files and enables efficient incremental updates.
741
- * Maintains a bidirectional dependency graph for cascade updates.
742
- */
743
-
744
- /**
745
- * Dependency node
746
- */
747
- interface DependencyNode {
748
- filePath: string;
749
- dependencies: Set<string>;
750
- dependents: Set<string>;
751
- lastIndexed: number;
752
- }
753
- /**
754
- * Dependency graph
755
- */
756
- interface DependencyGraph {
757
- nodes: Map<string, DependencyNode>;
758
- edges: Map<string, Set<string>>;
759
- }
760
- /**
761
- * Dependency tracker class
762
- */
763
- declare class DependencyTracker {
764
- private graph;
765
- private watchMode;
766
- constructor();
767
- /**
768
- * Track dependencies from symbol table
769
- */
770
- trackDependencies(filePath: string, symbols: SymbolTable): void;
771
- /**
772
- * Get dependents of a file (files that import this file)
773
- */
774
- getDependents(filePath: string): Set<string>;
775
- /**
776
- * Get dependencies of a file (files this file imports)
777
- */
778
- getDependencies(filePath: string): Set<string>;
779
- /**
780
- * Get transitive dependents (all files that indirectly depend on this file)
781
- */
782
- getTransitiveDependents(filePath: string): Set<string>;
783
- /**
784
- * Get transitive dependencies (all files this file indirectly depends on)
785
- */
786
- getTransitiveDependencies(filePath: string): Set<string>;
787
- /**
788
- * Detect circular dependencies
789
- */
790
- detectCircularDependencies(): Array<Array<string>>;
791
- /**
792
- * Get files affected by a change (need reindexing)
793
- */
794
- getAffectedFiles(filePath: string): Set<string>;
795
- /**
796
- * Remove file from graph
797
- */
798
- removeFile(filePath: string): void;
799
- /**
800
- * Clear entire graph
801
- */
802
- clear(): void;
803
- /**
804
- * Get graph statistics
805
- */
806
- getStats(): {
807
- nodeCount: number;
808
- edgeCount: number;
809
- avgDependencies: number;
810
- avgDependents: number;
811
- };
812
- /**
813
- * Serialize graph to JSON
814
- */
815
- toJSON(): object;
816
- /**
817
- * Load graph from JSON
818
- */
819
- fromJSON(json: any): void;
820
- /**
821
- * Resolve import path to absolute file path
822
- */
823
- private resolveImportPath;
824
- /**
825
- * Get or create node in graph
826
- */
827
- private getOrCreateNode;
828
- /**
829
- * Enable watch mode
830
- */
831
- enableWatchMode(): void;
832
- /**
833
- * Disable watch mode
834
- */
835
- disableWatchMode(): void;
836
- /**
837
- * Check if watch mode is enabled
838
- */
839
- isWatchModeEnabled(): boolean;
840
- }
841
- /**
842
- * Get or create global dependency tracker
843
- */
844
- declare function getGlobalTracker(): DependencyTracker;
845
- /**
846
- * Reset global dependency tracker
847
- */
848
- declare function resetGlobalTracker(): void;
849
-
850
- /**
851
- * Incremental Indexer
852
- *
853
- * Handles incremental indexing of changed files.
854
- * Only reindexes changed files and their dependencies.
855
- */
856
-
857
- /**
858
- * Incremental indexer class
859
- */
860
- declare class IncrementalIndexer {
861
- private index;
862
- private storage;
863
- private dependencyGraph;
864
- private reverseDependencyGraph;
865
- constructor();
866
- /**
867
- * Index a single file
868
- */
869
- indexFile(filePath: string): Promise<PrecomputedData | null>;
870
- /**
871
- * Index multiple files
872
- */
873
- indexFiles(filePaths: string[]): Promise<IndexingStats>;
874
- /**
875
- * Remove file from index
876
- */
877
- removeFile(filePath: string): Promise<void>;
878
- /**
879
- * Remove multiple files
880
- */
881
- removeFiles(filePaths: string[]): Promise<void>;
882
- /**
883
- * Reindex file and its dependents
884
- */
885
- reindexFile(filePath: string): Promise<IndexingStats>;
886
- /**
887
- * Check if file needs reindexing
888
- */
889
- needsReindex(filePath: string): Promise<boolean>;
890
- /**
891
- * Store precomputed data in cache
892
- */
893
- private storePrecomputedData;
894
- /**
895
- * Update dependency graph based on imports
896
- */
897
- private updateDependencies;
898
- /**
899
- * Resolve import path to absolute file path
900
- */
901
- private resolveImportPath;
902
- /**
903
- * Generate checksum for source code
904
- */
905
- private generateChecksum;
906
- /**
907
- * Get dependency graph
908
- */
909
- getDependencyGraph(): Map<string, Set<string>>;
910
- /**
911
- * Get reverse dependency graph
912
- */
913
- getReverseDependencyGraph(): Map<string, Set<string>>;
914
- /**
915
- * Clear all indexes
916
- */
917
- clear(): Promise<void>;
918
- }
919
- /**
920
- * Get or create global incremental indexer
921
- */
922
- declare function getGlobalIndexer(): IncrementalIndexer;
923
- /**
924
- * Reset global incremental indexer
925
- */
926
- declare function resetGlobalIndexer(): void;
927
-
928
- /**
929
- * File Watcher
930
- *
931
- * Monitors file system changes and triggers incremental indexing.
932
- * Uses chokidar for efficient cross-platform file watching.
933
- */
934
-
935
- /**
936
- * File change event
937
- */
938
- interface FileChangeEvent {
939
- type: 'add' | 'change' | 'unlink' | 'addDir' | 'unlinkDir';
940
- path: string;
941
- timestamp: number;
942
- }
943
- /**
944
- * File watcher options
945
- */
946
- interface FileWatcherOptions {
947
- ignoreInitial?: boolean;
948
- persistent?: boolean;
949
- ignorePermissionErrors?: boolean;
950
- awaitWriteFinish?: {
951
- stabilityThreshold: number;
952
- pollInterval: number;
953
- };
954
- }
955
- /**
956
- * File watcher class
957
- */
958
- declare class FileWatcher extends EventEmitter {
959
- private watcher;
960
- private indexer;
961
- private watchedPaths;
962
- private changeQueue;
963
- private flushTimer;
964
- private readonly FLUSH_DELAY;
965
- constructor(indexer: IncrementalIndexer);
966
- /**
967
- * Start watching a path
968
- */
969
- watch(path: string, options?: FileWatcherOptions): void;
970
- /**
971
- * Stop watching a path
972
- */
973
- unwatch(path: string): Promise<void>;
974
- /**
975
- * Stop all watching
976
- */
977
- close(): Promise<void>;
978
- /**
979
- * Handle file change event
980
- */
981
- private handleFileChange;
982
- /**
983
- * Schedule flushing the change queue
984
- */
985
- private scheduleFlush;
986
- /**
987
- * Flush queued changes to indexer
988
- */
989
- private flushChanges;
990
- /**
991
- * Get list of watched paths
992
- */
993
- getWatchedPaths(): string[];
994
- /**
995
- * Check if path is being watched
996
- */
997
- isWatching(path: string): boolean;
998
- /**
999
- * Get current change queue size
1000
- */
1001
- getQueueSize(): number;
1002
- }
1003
- /**
1004
- * Get or create global file watcher
1005
- */
1006
- declare function getGlobalWatcher(): FileWatcher;
1007
- /**
1008
- * Close global file watcher
1009
- */
1010
- declare function closeGlobalWatcher(): Promise<void>;
1011
-
1012
- /**
1013
- * Actionbook Precomputation Engine
1014
- *
1015
- * Main entry point for the actionbook precomputation engine.
1016
- * Provides high-level API for indexing, querying, and managing precomputed data.
1017
- */
1018
-
1019
- /**
1020
- * Actionbook engine configuration
1021
- */
1022
- interface ActionbookConfig {
1023
- cachePath?: string;
1024
- watchMode?: boolean;
1025
- compressionEnabled?: boolean;
1026
- maxMemoryCacheSize?: number;
1027
- logLevel?: 'debug' | 'info' | 'warn' | 'error';
1028
- }
1029
- /**
1030
- * Actionbook engine class
1031
- */
1032
- declare class ActionbookEngine {
1033
- private config;
1034
- private queryAPI;
1035
- private indexer;
1036
- private watcher;
1037
- private tracker;
1038
- private isInitialized;
1039
- constructor(config?: ActionbookConfig);
1040
- /**
1041
- * Initialize the engine
1042
- */
1043
- initialize(): Promise<void>;
1044
- /**
1045
- * Index a single file
1046
- */
1047
- indexFile(filePath: string): Promise<PrecomputedData | null>;
1048
- /**
1049
- * Index multiple files
1050
- */
1051
- indexFiles(filePaths: string[]): Promise<IndexingStats>;
1052
- /**
1053
- * Index a directory recursively
1054
- */
1055
- indexDirectory(dirPath: string, extensions?: string[]): Promise<IndexingStats>;
1056
- /**
1057
- * Watch a directory for changes
1058
- */
1059
- watchDirectory(dirPath: string): Promise<void>;
1060
- /**
1061
- * Query precomputed data
1062
- */
1063
- get query(): QueryAPI;
1064
- /**
1065
- * Get cache statistics
1066
- */
1067
- getCacheStats(): Promise<{
1068
- l1: {
1069
- hits: number;
1070
- misses: number;
1071
- size: number;
1072
- hitRate: number;
1073
- };
1074
- l2: {
1075
- size: number;
1076
- };
1077
- combined: {
1078
- hitRate: number;
1079
- };
1080
- }>;
1081
- /**
1082
- * Get dependency graph
1083
- */
1084
- getDependencyGraph(): Map<string, Set<string>>;
1085
- /**
1086
- * Get circular dependencies
1087
- */
1088
- getCircularDependencies(): Array<Array<string>>;
1089
- /**
1090
- * Warm up cache for specific files
1091
- */
1092
- warmup(files: string[]): Promise<void>;
1093
- /**
1094
- * Clear all caches
1095
- */
1096
- clearCache(): Promise<void>;
1097
- /**
1098
- * Shutdown the engine
1099
- */
1100
- shutdown(): Promise<void>;
1101
- /**
1102
- * Setup file watcher
1103
- */
1104
- private setupWatcher;
1105
- /**
1106
- * Get files recursively
1107
- */
1108
- private getFilesRecursively;
1109
- /**
1110
- * Check if directory should be ignored
1111
- */
1112
- private shouldIgnoreDirectory;
1113
- /**
1114
- * Ensure engine is initialized
1115
- */
1116
- private ensureInitialized;
1117
- /**
1118
- * Log message
1119
- */
1120
- private log;
1121
- }
1122
- /**
1123
- * Create actionbook engine instance
1124
- */
1125
- declare function createEngine(config?: ActionbookConfig): ActionbookEngine;
1126
-
1127
1
  /**
1128
2
  * Core types for the code tool abstraction layer
1129
3
  */
@@ -1709,360 +583,6 @@ declare class ToolFactory {
1709
583
  */
1710
584
  declare function createTool(name: string, config?: Partial<ToolConfig>): ICodeTool;
1711
585
 
1712
- /**
1713
- * CCJK 混合模式 CLI 入口
1714
- *
1715
- * 支持两种使用方式:
1716
- * 1. 交互式菜单模式:ccjk menu
1717
- * 2. 直接命令模式:ccjk <command> [options]
1718
- *
1719
- * 设计原则:
1720
- * - 新用户友好:默认进入交互式菜单
1721
- * - 高级用户高效:支持直接命令执行
1722
- * - 智能检测:根据上下文自动选择模式
1723
- */
1724
- /**
1725
- * 运行 CLI
1726
- */
1727
- declare function runCli(): Promise<void>;
1728
-
1729
- declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
1730
- type SupportedLang = (typeof SUPPORTED_LANGS)[number];
1731
- declare const AI_OUTPUT_LANGUAGES: {
1732
- readonly 'zh-CN': {
1733
- readonly directive: "Always respond in Chinese-simplified";
1734
- };
1735
- readonly en: {
1736
- readonly directive: "Always respond in English";
1737
- };
1738
- readonly custom: {
1739
- readonly directive: "";
1740
- };
1741
- };
1742
- type AiOutputLanguage = keyof typeof AI_OUTPUT_LANGUAGES;
1743
-
1744
- /**
1745
- * CCJK 交互式菜单系统 - 类型定义
1746
- */
1747
-
1748
- type Locale = SupportedLang;
1749
- /**
1750
- * 菜单项优先级
1751
- */
1752
- type MenuPriority = 'core' | 'feature' | 'setting' | 'help';
1753
- /**
1754
- * 菜单动作类型
1755
- */
1756
- type MenuActionType = 'command' | 'function' | 'submenu' | 'external';
1757
- /**
1758
- * 菜单动作定义
1759
- */
1760
- interface MenuAction {
1761
- type: MenuActionType;
1762
- handler: string | (() => Promise<void> | void);
1763
- options?: Record<string, unknown>;
1764
- }
1765
- /**
1766
- * 菜单项定义
1767
- */
1768
- interface MenuItem {
1769
- id: string;
1770
- label: string | Record<Locale, string>;
1771
- description?: string | Record<Locale, string>;
1772
- icon?: string;
1773
- shortcut?: string;
1774
- action?: MenuAction;
1775
- submenu?: MenuItem[];
1776
- condition?: () => boolean | Promise<boolean>;
1777
- badge?: () => string | null | Promise<string | null>;
1778
- priority?: MenuPriority;
1779
- separator?: boolean;
1780
- }
1781
- /**
1782
- * 菜单分组
1783
- */
1784
- interface MenuGroup {
1785
- id: string;
1786
- label: string | Record<Locale, string>;
1787
- icon?: string;
1788
- items: MenuItem[];
1789
- priority?: MenuPriority;
1790
- }
1791
- /**
1792
- * 菜单配置
1793
- */
1794
- interface MenuConfig {
1795
- title: string | Record<Locale, string>;
1796
- groups: MenuGroup[];
1797
- footer?: MenuItem[];
1798
- }
1799
- /**
1800
- * 菜单状态
1801
- */
1802
- interface MenuState {
1803
- currentPath: string[];
1804
- history: string[][];
1805
- searchQuery?: string;
1806
- projectInfo?: ProjectInfo;
1807
- apiStatus?: ApiStatus;
1808
- }
1809
- /**
1810
- * 项目信息
1811
- */
1812
- interface ProjectInfo {
1813
- name: string;
1814
- type?: string;
1815
- language?: string;
1816
- skillsCount?: number;
1817
- mcpCount?: number;
1818
- agentsCount?: number;
1819
- }
1820
- /**
1821
- * API 配置状态
1822
- */
1823
- interface ApiStatus {
1824
- configured: boolean;
1825
- mode?: 'official' | 'custom' | 'ccr' | 'none';
1826
- provider?: string;
1827
- baseUrl?: string;
1828
- }
1829
- /**
1830
- * 菜单渲染选项
1831
- */
1832
- interface MenuRenderOptions {
1833
- showStatusBar?: boolean;
1834
- showBreadcrumb?: boolean;
1835
- showShortcuts?: boolean;
1836
- locale?: Locale;
1837
- }
1838
- /**
1839
- * 菜单选择结果
1840
- */
1841
- interface MenuSelection {
1842
- item: MenuItem;
1843
- action: 'select' | 'back' | 'exit' | 'search' | 'help';
1844
- }
1845
- /**
1846
- * 快捷键定义
1847
- */
1848
- interface Shortcut {
1849
- key: string;
1850
- label: string;
1851
- action: () => void | Promise<void>;
1852
- }
1853
-
1854
- /**
1855
- * 主菜单配置
1856
- * API 配置管理作为核心卖点放在第一位置
1857
- */
1858
-
1859
- /**
1860
- * 主菜单配置
1861
- */
1862
- declare const mainMenuConfig$1: MenuConfig;
1863
-
1864
- /**
1865
- * CCJK 交互式菜单系统 - 菜单配置
1866
- */
1867
-
1868
- /**
1869
- * API 配置管理菜单项(核心卖点)
1870
- */
1871
- declare const apiConfigMenu: MenuItem;
1872
- /**
1873
- * 快速开始菜单组
1874
- */
1875
- declare const quickStartGroup: MenuGroup;
1876
- /**
1877
- * 项目管理菜单组
1878
- */
1879
- declare const projectManagementGroup: MenuGroup;
1880
- /**
1881
- * 会话管理菜单组
1882
- */
1883
- declare const sessionManagementGroup: MenuGroup;
1884
- /**
1885
- * 系统设置菜单组
1886
- */
1887
- declare const settingsGroup: MenuGroup;
1888
- /**
1889
- * 帮助文档菜单组
1890
- */
1891
- declare const helpGroup: MenuGroup;
1892
- /**
1893
- * 主菜单配置
1894
- */
1895
- declare const mainMenuConfig: MenuConfig;
1896
- /**
1897
- * 获取本地化标签
1898
- */
1899
- declare function getLocalizedLabel(label: string | Record<string, string>, locale?: string): string;
1900
-
1901
- /**
1902
- * CCJK 交互式菜单系统 - 菜单引擎
1903
- */
1904
-
1905
- /**
1906
- * 菜单引擎类
1907
- */
1908
- declare class MenuEngine {
1909
- private renderer;
1910
- private state;
1911
- private config;
1912
- private commandHandlers;
1913
- constructor(options?: MenuRenderOptions);
1914
- /**
1915
- * 注册命令处理器
1916
- */
1917
- registerHandler(command: string, handler: () => Promise<void> | void): void;
1918
- /**
1919
- * 批量注册命令处理器
1920
- */
1921
- registerHandlers(handlers: Record<string, () => Promise<void> | void>): void;
1922
- /**
1923
- * 设置项目信息
1924
- */
1925
- setProjectInfo(info: ProjectInfo): void;
1926
- /**
1927
- * 设置 API 状态
1928
- */
1929
- setApiStatus(status: ApiStatus): void;
1930
- /**
1931
- * 刷新项目信息(按需分析)
1932
- */
1933
- refreshProjectInfo(): Promise<void>;
1934
- /**
1935
- * 刷新 API 状态
1936
- */
1937
- refreshApiStatus(): Promise<void>;
1938
- /**
1939
- * 执行菜单动作
1940
- */
1941
- private executeAction;
1942
- /**
1943
- * 处理菜单选择
1944
- */
1945
- private handleSelection;
1946
- /**
1947
- * 启动菜单
1948
- */
1949
- start(): Promise<void>;
1950
- /**
1951
- * 导航到指定菜单
1952
- */
1953
- navigate(path: string[]): Promise<void>;
1954
- /**
1955
- * 返回上级
1956
- */
1957
- back(): Promise<void>;
1958
- /**
1959
- * 退出菜单
1960
- */
1961
- exit(): void;
1962
- /**
1963
- * 获取当前状态
1964
- */
1965
- getState(): MenuState;
1966
- /**
1967
- * 设置语言
1968
- */
1969
- setLocale(locale: string): void;
1970
- }
1971
- /**
1972
- * 创建菜单引擎实例
1973
- */
1974
- declare function createMenuEngine(options?: MenuRenderOptions): MenuEngine;
1975
-
1976
- /**
1977
- * CCJK 交互式菜单系统 - 菜单渲染器
1978
- */
1979
-
1980
- /**
1981
- * 菜单渲染器类
1982
- */
1983
- declare class MenuRenderer {
1984
- private locale;
1985
- private showStatusBar;
1986
- private showBreadcrumb;
1987
- private showShortcuts;
1988
- constructor(options?: MenuRenderOptions);
1989
- /**
1990
- * 渲染状态栏
1991
- */
1992
- renderStatusBar(projectInfo?: ProjectInfo, apiStatus?: ApiStatus): string;
1993
- /**
1994
- * 渲染面包屑导航
1995
- */
1996
- renderBreadcrumb(path: string[]): string;
1997
- /**
1998
- * 渲染菜单项
1999
- */
2000
- private formatMenuItem;
2001
- /**
2002
- * 渲染菜单组分隔符
2003
- */
2004
- private renderGroupSeparator;
2005
- /**
2006
- * 渲染主菜单
2007
- */
2008
- renderMainMenu(config: MenuConfig, projectInfo?: ProjectInfo, apiStatus?: ApiStatus): Promise<MenuSelection>;
2009
- /**
2010
- * 渲染子菜单
2011
- */
2012
- renderSubmenu(item: MenuItem, breadcrumb: string[]): Promise<MenuSelection>;
2013
- /**
2014
- * 设置语言
2015
- */
2016
- setLocale(locale: string): void;
2017
- /**
2018
- * 获取当前语言
2019
- */
2020
- getLocale(): string;
2021
- }
2022
- /**
2023
- * 创建菜单渲染器实例
2024
- */
2025
- declare function createMenuRenderer(options?: MenuRenderOptions): MenuRenderer;
2026
-
2027
- /**
2028
- * CCJK 交互式菜单系统
2029
- *
2030
- * 提供用户友好的交互式菜单界面,整合 CCJK 的全部功能。
2031
- *
2032
- * 核心特性:
2033
- * - 🔑 API 配置管理(核心卖点)- 一键配置 API
2034
- * - 🚀 快速开始 - 初始化项目、安装技能
2035
- * - 🛠️ 项目管理 - Skills、MCP、Agents、Hooks
2036
- * - 💬 会话管理 - Session、Context 管理
2037
- * - ⚙️ 系统设置 - 语言、主题、高级设置
2038
- * - 📚 帮助文档 - 命令参考、教程、关于
2039
- */
2040
-
2041
- /**
2042
- * 显示交互式菜单(新版本)
2043
- */
2044
- declare function showMenu(): Promise<void>;
2045
- /**
2046
- * 快速启动交互式菜单
2047
- *
2048
- * @example
2049
- * ```typescript
2050
- * import { startMenu } from './menu'
2051
- *
2052
- * // 启动菜单
2053
- * await startMenu()
2054
- *
2055
- * // 带选项启动
2056
- * await startMenu({ locale: 'en' })
2057
- * ```
2058
- */
2059
- declare function startMenu(options?: {
2060
- locale?: string;
2061
- showStatusBar?: boolean;
2062
- showBreadcrumb?: boolean;
2063
- showShortcuts?: boolean;
2064
- }): Promise<void>;
2065
-
2066
586
  /**
2067
587
  * Array Utilities
2068
588
  * Array manipulation and transformation functions
@@ -2597,6 +1117,21 @@ declare namespace index$4 {
2597
1117
  export type { index$4_CommandOptions as CommandOptions, index$4_CommandResult as CommandResult };
2598
1118
  }
2599
1119
 
1120
+ declare const SUPPORTED_LANGS: readonly ["zh-CN", "en"];
1121
+ type SupportedLang = (typeof SUPPORTED_LANGS)[number];
1122
+ declare const AI_OUTPUT_LANGUAGES: {
1123
+ readonly 'zh-CN': {
1124
+ readonly directive: "Always respond in Chinese-simplified";
1125
+ };
1126
+ readonly en: {
1127
+ readonly directive: "Always respond in English";
1128
+ };
1129
+ readonly custom: {
1130
+ readonly directive: "";
1131
+ };
1132
+ };
1133
+ type AiOutputLanguage = keyof typeof AI_OUTPUT_LANGUAGES;
1134
+
2600
1135
  /**
2601
1136
  * API configuration for Claude Code
2602
1137
  */
@@ -4145,5 +2680,5 @@ declare function assertDefined<T>(value: T | null | undefined, message?: string)
4145
2680
  */
4146
2681
  declare function assert(condition: boolean, message?: string): asserts condition;
4147
2682
 
4148
- export { ActionbookEngine, AiderTool, BaseCodeTool, BaseError, ClaudeCodeTool, ClineTool, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, DependencyTracker, FileWatcher, IncrementalIndexer, InternalError, Logger, MenuEngine, MenuRenderer, MultiLevelIndex, Mutex, NotFoundError, QueryAPIRouter, Semaphore, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, apiConfigMenu, index$6 as array, assert, assertDefined, ast, index$5 as async, batchProcessFiles, callGraph, camelCase, capitalize, chunk, closeGlobalIndex, closeGlobalWatcher, index$4 as command, commandExists$1 as commandExists, config, copyFile, countLines, createConfigManager, createEngine, createLogger, createMenuEngine, createMenuRenderer, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractDisplayName, extractString, flatten, flatten$1 as flattenArray, formatError, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCommandPath, getCommandVersion, getConfigDir, getDataDir, getErrorMessage, getFileInfo, getFileSize, getGlobalIndex, getGlobalIndexer, getGlobalTracker, getGlobalWatcher, getHomeDir, getLocalizedLabel, getPlatform, getPlatformInfo, getQueryAPI, getRegistry, getTempDir, has, helpGroup, i18nHelpers, intersection, isArray, isBoolean, isDefined, isDirectory, isEmail, isFile, isLargeFile, isLinux, isMacOS, isNumber, isObject, isString, isURL, isUnix, isWindows, kebabCase, listDirs, listFiles, logger, logger$2 as loggerUtils, mainMenuConfig, moveFile, mainMenuConfig$1 as newMainMenuConfig, normalizeRecommendation, normalizeRecommendations, index$1 as object, omit, parallelLimit, partition, pascalCase, pick, platform, processLargeFile, processLineByLine, projectManagementGroup, quickStartGroup, readFile, readJSON, resetGlobalIndexer, resetGlobalTracker, retry, runCli, scanCapabilities, sequence, sessionManagementGroup, set, settingsGroup, showMenu, shuffle, sleep, slugify, snakeCase, startMenu, streamJSON, streamWriteJSON, index as string, symbols, template, throttle, timeout, truncate, tryCatch, tryCatchAsync, unflatten, union, unique, validation, validators, waitFor, wrapError, writeFile, writeJSON };
4149
- export type { ASTNode, ActionbookConfig, ApiStatus, CacheEntry, CacheStats, CallEdge, CallGraph, CallNode, Capability, CapabilityScanResult, CapabilityStatus, CapabilityType, ChunkProcessorOptions, ComplexityMetrics, DependencyGraph, DependencyNode, ExecutionResult, FileChangeEvent, FileInfo, FileWatcherOptions, HalsteadMetrics, IChatTool, ICodeGenTool, ICodeTool, IFileEditTool, Import, ImportSpecifier, IndexingStats, InstallStatus, Locale, MenuAction, MenuActionType, MenuConfig, MenuGroup, MenuItem, MenuPriority, MenuRenderOptions, MenuSelection, MenuState, MultilingualString, Pattern, PatternType, Position, PrecomputedData, ProjectInfo, QueryAPI, Range, Reference, Scope, Shortcut, StreamProcessorOptions, Symbol, SymbolKind, SymbolTable, ToolCapabilities, ToolConfig, ToolMetadata, WelcomeOptions };
2683
+ export { AiderTool, BaseCodeTool, BaseError, ClaudeCodeTool, ClineTool, CodexTool, ConfigManager, ConfigValidator, ConfigurationError, ContinueTool, CursorTool, InternalError, Logger, Mutex, NotFoundError, Semaphore, TimeoutError, ToolFactory, ToolRegistry, UnauthorizedError, ValidationError, index$6 as array, assert, assertDefined, index$5 as async, batchProcessFiles, camelCase, capitalize, chunk, index$4 as command, commandExists$1 as commandExists, config, copyFile, countLines, createConfigManager, createLogger, createTool, createValidator, debounce, deepClone, deepMerge, deleteDir, deleteFile, difference, ensureDir, index$3 as error, executeCommand, executeCommandStream, exists, extractDisplayName, extractString, flatten, flatten$1 as flattenArray, formatError, index$2 as fs, generateCompactWelcome, generateRecommendations, generateWelcome, get, getArchitecture, getCacheDir, getCapabilitiesByType, getCapability, getCommandPath, getCommandVersion, getConfigDir, getDataDir, getErrorMessage, getFileInfo, getFileSize, getHomeDir, getPlatform, getPlatformInfo, getRegistry, getTempDir, has, i18nHelpers, intersection, isArray, isBoolean, isDefined, isDirectory, isEmail, isFile, isLargeFile, isLinux, isMacOS, isNumber, isObject, isString, isURL, isUnix, isWindows, kebabCase, listDirs, listFiles, logger, logger$2 as loggerUtils, moveFile, normalizeRecommendation, normalizeRecommendations, index$1 as object, omit, parallelLimit, partition, pascalCase, pick, platform, processLargeFile, processLineByLine, readFile, readJSON, retry, scanCapabilities, sequence, set, shuffle, sleep, slugify, snakeCase, streamJSON, streamWriteJSON, index as string, template, throttle, timeout, truncate, tryCatch, tryCatchAsync, unflatten, union, unique, validation, validators, waitFor, wrapError, writeFile, writeJSON };
2684
+ export type { Capability, CapabilityScanResult, CapabilityStatus, CapabilityType, ChunkProcessorOptions, ExecutionResult, FileInfo, IChatTool, ICodeGenTool, ICodeTool, IFileEditTool, InstallStatus, MultilingualString, StreamProcessorOptions, ToolCapabilities, ToolConfig, ToolMetadata, WelcomeOptions };