cmp-standards 3.1.1 → 3.3.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 (80) hide show
  1. package/dist/cli/index.js +488 -1
  2. package/dist/cli/index.js.map +1 -1
  3. package/dist/db/migrations.d.ts +1 -1
  4. package/dist/db/migrations.d.ts.map +1 -1
  5. package/dist/db/migrations.js +102 -2
  6. package/dist/db/migrations.js.map +1 -1
  7. package/dist/eslint/ast-types.d.ts +235 -0
  8. package/dist/eslint/ast-types.d.ts.map +1 -0
  9. package/dist/eslint/ast-types.js +9 -0
  10. package/dist/eslint/ast-types.js.map +1 -0
  11. package/dist/eslint/rules/consistent-error-handling.d.ts.map +1 -1
  12. package/dist/eslint/rules/consistent-error-handling.js +2 -1
  13. package/dist/eslint/rules/consistent-error-handling.js.map +1 -1
  14. package/dist/eslint/rules/no-async-useeffect.js.map +1 -1
  15. package/dist/events/EventBus.js.map +1 -1
  16. package/dist/events/types.d.ts +174 -4
  17. package/dist/events/types.d.ts.map +1 -1
  18. package/dist/events/types.js +15 -0
  19. package/dist/events/types.js.map +1 -1
  20. package/dist/hooks/session-start.js +3 -3
  21. package/dist/hooks/session-start.js.map +1 -1
  22. package/dist/index.d.ts +11 -0
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/index.js +21 -0
  25. package/dist/index.js.map +1 -1
  26. package/dist/mcp/server.d.ts.map +1 -1
  27. package/dist/mcp/server.js +8 -4
  28. package/dist/mcp/server.js.map +1 -1
  29. package/dist/patterns/feedback-loop.d.ts +2 -2
  30. package/dist/patterns/lifecycle.d.ts.map +1 -1
  31. package/dist/patterns/lifecycle.js +11 -13
  32. package/dist/patterns/lifecycle.js.map +1 -1
  33. package/dist/patterns/registry.d.ts +2 -2
  34. package/dist/plugins/PluginManager.d.ts.map +1 -1
  35. package/dist/plugins/PluginManager.js +4 -1
  36. package/dist/plugins/PluginManager.js.map +1 -1
  37. package/dist/schema/codewiki-types.d.ts +1899 -0
  38. package/dist/schema/codewiki-types.d.ts.map +1 -0
  39. package/dist/schema/codewiki-types.js +585 -0
  40. package/dist/schema/codewiki-types.js.map +1 -0
  41. package/dist/schema/expert-types.d.ts +2 -2
  42. package/dist/schema/opportunity-types.d.ts +505 -0
  43. package/dist/schema/opportunity-types.d.ts.map +1 -0
  44. package/dist/schema/opportunity-types.js +255 -0
  45. package/dist/schema/opportunity-types.js.map +1 -0
  46. package/dist/services/AuditLog.d.ts.map +1 -1
  47. package/dist/services/AuditLog.js +4 -1
  48. package/dist/services/AuditLog.js.map +1 -1
  49. package/dist/services/CodeWikiIndexer.d.ts +145 -0
  50. package/dist/services/CodeWikiIndexer.d.ts.map +1 -0
  51. package/dist/services/CodeWikiIndexer.js +664 -0
  52. package/dist/services/CodeWikiIndexer.js.map +1 -0
  53. package/dist/services/HookVerifier.d.ts +8 -3
  54. package/dist/services/HookVerifier.d.ts.map +1 -1
  55. package/dist/services/HookVerifier.js +29 -22
  56. package/dist/services/HookVerifier.js.map +1 -1
  57. package/dist/services/OpportunityDiscovery.d.ts +84 -0
  58. package/dist/services/OpportunityDiscovery.d.ts.map +1 -0
  59. package/dist/services/OpportunityDiscovery.js +754 -0
  60. package/dist/services/OpportunityDiscovery.js.map +1 -0
  61. package/dist/services/ProjectScanner.d.ts.map +1 -1
  62. package/dist/services/ProjectScanner.js +1 -1
  63. package/dist/services/ProjectScanner.js.map +1 -1
  64. package/dist/services/index.d.ts +1 -0
  65. package/dist/services/index.d.ts.map +1 -1
  66. package/dist/services/index.js +2 -0
  67. package/dist/services/index.js.map +1 -1
  68. package/dist/utils/env.d.ts +149 -0
  69. package/dist/utils/env.d.ts.map +1 -0
  70. package/dist/utils/env.js +223 -0
  71. package/dist/utils/env.js.map +1 -0
  72. package/dist/utils/index.d.ts +3 -0
  73. package/dist/utils/index.d.ts.map +1 -1
  74. package/dist/utils/index.js +6 -0
  75. package/dist/utils/index.js.map +1 -1
  76. package/dist/utils/logger.d.ts +126 -0
  77. package/dist/utils/logger.d.ts.map +1 -0
  78. package/dist/utils/logger.js +231 -0
  79. package/dist/utils/logger.js.map +1 -0
  80. package/package.json +1 -1
@@ -0,0 +1,1899 @@
1
+ /**
2
+ * @file CodeWiki Types Schema - cmp-standards v3.3
3
+ * @description Type definitions for automated code knowledge graph system
4
+ *
5
+ * This module provides schemas for:
6
+ * - File metadata and content hashing
7
+ * - Code structure (symbols, imports, exports)
8
+ * - Dependency relationships
9
+ * - Documentation extraction
10
+ * - Expert analysis results
11
+ * - Cross-project references
12
+ */
13
+ import { z } from 'zod';
14
+ /**
15
+ * Programming language detection
16
+ */
17
+ export declare const LanguageSchema: z.ZodEnum<["typescript", "javascript", "tsx", "jsx", "json", "markdown", "css", "scss", "html", "yaml", "sql", "shell", "unknown"]>;
18
+ export type Language = z.infer<typeof LanguageSchema>;
19
+ /**
20
+ * Symbol kind (what type of code entity)
21
+ */
22
+ export declare const SymbolKindSchema: z.ZodEnum<["class", "interface", "type", "enum", "function", "arrow_function", "const", "let", "var", "namespace", "module", "component", "hook", "method", "property", "parameter", "import", "export"]>;
23
+ export type SymbolKind = z.infer<typeof SymbolKindSchema>;
24
+ export declare const FileMetadataContentSchema: z.ZodObject<{
25
+ /** Absolute file path */
26
+ filePath: z.ZodString;
27
+ /** Relative path from project root */
28
+ relativePath: z.ZodString;
29
+ /** File name with extension */
30
+ fileName: z.ZodString;
31
+ /** File extension (without dot) */
32
+ extension: z.ZodString;
33
+ /** Detected programming language */
34
+ language: z.ZodEnum<["typescript", "javascript", "tsx", "jsx", "json", "markdown", "css", "scss", "html", "yaml", "sql", "shell", "unknown"]>;
35
+ /** File size in bytes */
36
+ size: z.ZodNumber;
37
+ /** Lines of code */
38
+ loc: z.ZodNumber;
39
+ /** Non-empty lines */
40
+ locNonEmpty: z.ZodNumber;
41
+ /** Comment lines */
42
+ locComments: z.ZodNumber;
43
+ /** SHA-256 content hash for change detection */
44
+ hash: z.ZodString;
45
+ /** Last modified timestamp (ISO) */
46
+ lastModified: z.ZodString;
47
+ /** Project identifier */
48
+ projectId: z.ZodString;
49
+ /** Git branch (if in repo) */
50
+ branch: z.ZodOptional<z.ZodString>;
51
+ /** Git commit hash (if in repo) */
52
+ commit: z.ZodOptional<z.ZodString>;
53
+ /** First indexed timestamp */
54
+ firstIndexedAt: z.ZodString;
55
+ /** Last indexed timestamp */
56
+ lastIndexedAt: z.ZodString;
57
+ }, "strip", z.ZodTypeAny, {
58
+ filePath: string;
59
+ language: "unknown" | "json" | "sql" | "typescript" | "javascript" | "tsx" | "jsx" | "markdown" | "css" | "scss" | "html" | "yaml" | "shell";
60
+ hash: string;
61
+ relativePath: string;
62
+ fileName: string;
63
+ extension: string;
64
+ size: number;
65
+ loc: number;
66
+ locNonEmpty: number;
67
+ locComments: number;
68
+ lastModified: string;
69
+ projectId: string;
70
+ firstIndexedAt: string;
71
+ lastIndexedAt: string;
72
+ branch?: string | undefined;
73
+ commit?: string | undefined;
74
+ }, {
75
+ filePath: string;
76
+ language: "unknown" | "json" | "sql" | "typescript" | "javascript" | "tsx" | "jsx" | "markdown" | "css" | "scss" | "html" | "yaml" | "shell";
77
+ hash: string;
78
+ relativePath: string;
79
+ fileName: string;
80
+ extension: string;
81
+ size: number;
82
+ loc: number;
83
+ locNonEmpty: number;
84
+ locComments: number;
85
+ lastModified: string;
86
+ projectId: string;
87
+ firstIndexedAt: string;
88
+ lastIndexedAt: string;
89
+ branch?: string | undefined;
90
+ commit?: string | undefined;
91
+ }>;
92
+ export type FileMetadataContent = z.infer<typeof FileMetadataContentSchema>;
93
+ export declare const CodeSymbolSchema: z.ZodObject<{
94
+ /** Symbol name */
95
+ name: z.ZodString;
96
+ /** Full qualified name (e.g., ClassName.methodName) */
97
+ qualifiedName: z.ZodOptional<z.ZodString>;
98
+ /** Symbol kind */
99
+ kind: z.ZodEnum<["class", "interface", "type", "enum", "function", "arrow_function", "const", "let", "var", "namespace", "module", "component", "hook", "method", "property", "parameter", "import", "export"]>;
100
+ /** Start line number (1-based) */
101
+ lineStart: z.ZodNumber;
102
+ /** End line number (1-based) */
103
+ lineEnd: z.ZodNumber;
104
+ /** Column start */
105
+ columnStart: z.ZodOptional<z.ZodNumber>;
106
+ /** Column end */
107
+ columnEnd: z.ZodOptional<z.ZodNumber>;
108
+ /** Is exported */
109
+ isExported: z.ZodDefault<z.ZodBoolean>;
110
+ /** Is default export */
111
+ isDefault: z.ZodDefault<z.ZodBoolean>;
112
+ /** Is async (for functions) */
113
+ isAsync: z.ZodOptional<z.ZodBoolean>;
114
+ /** Is generator (for functions) */
115
+ isGenerator: z.ZodOptional<z.ZodBoolean>;
116
+ /** Type signature */
117
+ signature: z.ZodOptional<z.ZodString>;
118
+ /** Return type (for functions) */
119
+ returnType: z.ZodOptional<z.ZodString>;
120
+ /** Parameters (for functions) */
121
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
122
+ name: z.ZodString;
123
+ type: z.ZodOptional<z.ZodString>;
124
+ optional: z.ZodDefault<z.ZodBoolean>;
125
+ defaultValue: z.ZodOptional<z.ZodString>;
126
+ }, "strip", z.ZodTypeAny, {
127
+ name: string;
128
+ optional: boolean;
129
+ type?: string | undefined;
130
+ defaultValue?: string | undefined;
131
+ }, {
132
+ name: string;
133
+ type?: string | undefined;
134
+ optional?: boolean | undefined;
135
+ defaultValue?: string | undefined;
136
+ }>, "many">>;
137
+ /** Generic type parameters */
138
+ generics: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
139
+ /** Decorators */
140
+ decorators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
141
+ /** Modifiers (public, private, protected, static, readonly, abstract) */
142
+ modifiers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
143
+ /** JSDoc documentation */
144
+ jsdoc: z.ZodOptional<z.ZodString>;
145
+ /** Parent symbol (for nested symbols) */
146
+ parentSymbol: z.ZodOptional<z.ZodString>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ name: string;
149
+ lineStart: number;
150
+ lineEnd: number;
151
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
152
+ isExported: boolean;
153
+ isDefault: boolean;
154
+ generics: string[];
155
+ decorators: string[];
156
+ modifiers: string[];
157
+ parameters?: {
158
+ name: string;
159
+ optional: boolean;
160
+ type?: string | undefined;
161
+ defaultValue?: string | undefined;
162
+ }[] | undefined;
163
+ jsdoc?: string | undefined;
164
+ qualifiedName?: string | undefined;
165
+ columnStart?: number | undefined;
166
+ columnEnd?: number | undefined;
167
+ isAsync?: boolean | undefined;
168
+ isGenerator?: boolean | undefined;
169
+ signature?: string | undefined;
170
+ returnType?: string | undefined;
171
+ parentSymbol?: string | undefined;
172
+ }, {
173
+ name: string;
174
+ lineStart: number;
175
+ lineEnd: number;
176
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
177
+ parameters?: {
178
+ name: string;
179
+ type?: string | undefined;
180
+ optional?: boolean | undefined;
181
+ defaultValue?: string | undefined;
182
+ }[] | undefined;
183
+ jsdoc?: string | undefined;
184
+ qualifiedName?: string | undefined;
185
+ columnStart?: number | undefined;
186
+ columnEnd?: number | undefined;
187
+ isExported?: boolean | undefined;
188
+ isDefault?: boolean | undefined;
189
+ isAsync?: boolean | undefined;
190
+ isGenerator?: boolean | undefined;
191
+ signature?: string | undefined;
192
+ returnType?: string | undefined;
193
+ generics?: string[] | undefined;
194
+ decorators?: string[] | undefined;
195
+ modifiers?: string[] | undefined;
196
+ parentSymbol?: string | undefined;
197
+ }>;
198
+ export type CodeSymbol = z.infer<typeof CodeSymbolSchema>;
199
+ export declare const ImportSchema: z.ZodObject<{
200
+ /** Import source module */
201
+ source: z.ZodString;
202
+ /** Is external (node_modules) */
203
+ isExternal: z.ZodBoolean;
204
+ /** Is type-only import */
205
+ isTypeOnly: z.ZodDefault<z.ZodBoolean>;
206
+ /** Is namespace import (import * as X) */
207
+ isNamespace: z.ZodDefault<z.ZodBoolean>;
208
+ /** Is default import */
209
+ isDefault: z.ZodDefault<z.ZodBoolean>;
210
+ /** Imported names */
211
+ names: z.ZodArray<z.ZodObject<{
212
+ name: z.ZodString;
213
+ alias: z.ZodOptional<z.ZodString>;
214
+ }, "strip", z.ZodTypeAny, {
215
+ name: string;
216
+ alias?: string | undefined;
217
+ }, {
218
+ name: string;
219
+ alias?: string | undefined;
220
+ }>, "many">;
221
+ /** Line number */
222
+ line: z.ZodNumber;
223
+ }, "strip", z.ZodTypeAny, {
224
+ source: string;
225
+ line: number;
226
+ isDefault: boolean;
227
+ isExternal: boolean;
228
+ isTypeOnly: boolean;
229
+ isNamespace: boolean;
230
+ names: {
231
+ name: string;
232
+ alias?: string | undefined;
233
+ }[];
234
+ }, {
235
+ source: string;
236
+ line: number;
237
+ isExternal: boolean;
238
+ names: {
239
+ name: string;
240
+ alias?: string | undefined;
241
+ }[];
242
+ isDefault?: boolean | undefined;
243
+ isTypeOnly?: boolean | undefined;
244
+ isNamespace?: boolean | undefined;
245
+ }>;
246
+ export type Import = z.infer<typeof ImportSchema>;
247
+ export declare const ExportSchema: z.ZodObject<{
248
+ /** Exported name */
249
+ name: z.ZodString;
250
+ /** Is default export */
251
+ isDefault: z.ZodDefault<z.ZodBoolean>;
252
+ /** Is type export */
253
+ isType: z.ZodDefault<z.ZodBoolean>;
254
+ /** Is re-export */
255
+ isReExport: z.ZodDefault<z.ZodBoolean>;
256
+ /** Re-export source */
257
+ source: z.ZodOptional<z.ZodString>;
258
+ /** Line number */
259
+ line: z.ZodNumber;
260
+ }, "strip", z.ZodTypeAny, {
261
+ line: number;
262
+ name: string;
263
+ isDefault: boolean;
264
+ isType: boolean;
265
+ isReExport: boolean;
266
+ source?: string | undefined;
267
+ }, {
268
+ line: number;
269
+ name: string;
270
+ source?: string | undefined;
271
+ isDefault?: boolean | undefined;
272
+ isType?: boolean | undefined;
273
+ isReExport?: boolean | undefined;
274
+ }>;
275
+ export type Export = z.infer<typeof ExportSchema>;
276
+ export declare const CodeStructureContentSchema: z.ZodObject<{
277
+ /** File path */
278
+ filePath: z.ZodString;
279
+ /** Parent file_metadata item ID */
280
+ fileMetadataId: z.ZodString;
281
+ /** All symbols defined in file */
282
+ symbols: z.ZodArray<z.ZodObject<{
283
+ /** Symbol name */
284
+ name: z.ZodString;
285
+ /** Full qualified name (e.g., ClassName.methodName) */
286
+ qualifiedName: z.ZodOptional<z.ZodString>;
287
+ /** Symbol kind */
288
+ kind: z.ZodEnum<["class", "interface", "type", "enum", "function", "arrow_function", "const", "let", "var", "namespace", "module", "component", "hook", "method", "property", "parameter", "import", "export"]>;
289
+ /** Start line number (1-based) */
290
+ lineStart: z.ZodNumber;
291
+ /** End line number (1-based) */
292
+ lineEnd: z.ZodNumber;
293
+ /** Column start */
294
+ columnStart: z.ZodOptional<z.ZodNumber>;
295
+ /** Column end */
296
+ columnEnd: z.ZodOptional<z.ZodNumber>;
297
+ /** Is exported */
298
+ isExported: z.ZodDefault<z.ZodBoolean>;
299
+ /** Is default export */
300
+ isDefault: z.ZodDefault<z.ZodBoolean>;
301
+ /** Is async (for functions) */
302
+ isAsync: z.ZodOptional<z.ZodBoolean>;
303
+ /** Is generator (for functions) */
304
+ isGenerator: z.ZodOptional<z.ZodBoolean>;
305
+ /** Type signature */
306
+ signature: z.ZodOptional<z.ZodString>;
307
+ /** Return type (for functions) */
308
+ returnType: z.ZodOptional<z.ZodString>;
309
+ /** Parameters (for functions) */
310
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
311
+ name: z.ZodString;
312
+ type: z.ZodOptional<z.ZodString>;
313
+ optional: z.ZodDefault<z.ZodBoolean>;
314
+ defaultValue: z.ZodOptional<z.ZodString>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ name: string;
317
+ optional: boolean;
318
+ type?: string | undefined;
319
+ defaultValue?: string | undefined;
320
+ }, {
321
+ name: string;
322
+ type?: string | undefined;
323
+ optional?: boolean | undefined;
324
+ defaultValue?: string | undefined;
325
+ }>, "many">>;
326
+ /** Generic type parameters */
327
+ generics: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
328
+ /** Decorators */
329
+ decorators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
330
+ /** Modifiers (public, private, protected, static, readonly, abstract) */
331
+ modifiers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
332
+ /** JSDoc documentation */
333
+ jsdoc: z.ZodOptional<z.ZodString>;
334
+ /** Parent symbol (for nested symbols) */
335
+ parentSymbol: z.ZodOptional<z.ZodString>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ name: string;
338
+ lineStart: number;
339
+ lineEnd: number;
340
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
341
+ isExported: boolean;
342
+ isDefault: boolean;
343
+ generics: string[];
344
+ decorators: string[];
345
+ modifiers: string[];
346
+ parameters?: {
347
+ name: string;
348
+ optional: boolean;
349
+ type?: string | undefined;
350
+ defaultValue?: string | undefined;
351
+ }[] | undefined;
352
+ jsdoc?: string | undefined;
353
+ qualifiedName?: string | undefined;
354
+ columnStart?: number | undefined;
355
+ columnEnd?: number | undefined;
356
+ isAsync?: boolean | undefined;
357
+ isGenerator?: boolean | undefined;
358
+ signature?: string | undefined;
359
+ returnType?: string | undefined;
360
+ parentSymbol?: string | undefined;
361
+ }, {
362
+ name: string;
363
+ lineStart: number;
364
+ lineEnd: number;
365
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
366
+ parameters?: {
367
+ name: string;
368
+ type?: string | undefined;
369
+ optional?: boolean | undefined;
370
+ defaultValue?: string | undefined;
371
+ }[] | undefined;
372
+ jsdoc?: string | undefined;
373
+ qualifiedName?: string | undefined;
374
+ columnStart?: number | undefined;
375
+ columnEnd?: number | undefined;
376
+ isExported?: boolean | undefined;
377
+ isDefault?: boolean | undefined;
378
+ isAsync?: boolean | undefined;
379
+ isGenerator?: boolean | undefined;
380
+ signature?: string | undefined;
381
+ returnType?: string | undefined;
382
+ generics?: string[] | undefined;
383
+ decorators?: string[] | undefined;
384
+ modifiers?: string[] | undefined;
385
+ parentSymbol?: string | undefined;
386
+ }>, "many">;
387
+ /** Imports */
388
+ imports: z.ZodArray<z.ZodObject<{
389
+ /** Import source module */
390
+ source: z.ZodString;
391
+ /** Is external (node_modules) */
392
+ isExternal: z.ZodBoolean;
393
+ /** Is type-only import */
394
+ isTypeOnly: z.ZodDefault<z.ZodBoolean>;
395
+ /** Is namespace import (import * as X) */
396
+ isNamespace: z.ZodDefault<z.ZodBoolean>;
397
+ /** Is default import */
398
+ isDefault: z.ZodDefault<z.ZodBoolean>;
399
+ /** Imported names */
400
+ names: z.ZodArray<z.ZodObject<{
401
+ name: z.ZodString;
402
+ alias: z.ZodOptional<z.ZodString>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ name: string;
405
+ alias?: string | undefined;
406
+ }, {
407
+ name: string;
408
+ alias?: string | undefined;
409
+ }>, "many">;
410
+ /** Line number */
411
+ line: z.ZodNumber;
412
+ }, "strip", z.ZodTypeAny, {
413
+ source: string;
414
+ line: number;
415
+ isDefault: boolean;
416
+ isExternal: boolean;
417
+ isTypeOnly: boolean;
418
+ isNamespace: boolean;
419
+ names: {
420
+ name: string;
421
+ alias?: string | undefined;
422
+ }[];
423
+ }, {
424
+ source: string;
425
+ line: number;
426
+ isExternal: boolean;
427
+ names: {
428
+ name: string;
429
+ alias?: string | undefined;
430
+ }[];
431
+ isDefault?: boolean | undefined;
432
+ isTypeOnly?: boolean | undefined;
433
+ isNamespace?: boolean | undefined;
434
+ }>, "many">;
435
+ /** Exports */
436
+ exports: z.ZodArray<z.ZodObject<{
437
+ /** Exported name */
438
+ name: z.ZodString;
439
+ /** Is default export */
440
+ isDefault: z.ZodDefault<z.ZodBoolean>;
441
+ /** Is type export */
442
+ isType: z.ZodDefault<z.ZodBoolean>;
443
+ /** Is re-export */
444
+ isReExport: z.ZodDefault<z.ZodBoolean>;
445
+ /** Re-export source */
446
+ source: z.ZodOptional<z.ZodString>;
447
+ /** Line number */
448
+ line: z.ZodNumber;
449
+ }, "strip", z.ZodTypeAny, {
450
+ line: number;
451
+ name: string;
452
+ isDefault: boolean;
453
+ isType: boolean;
454
+ isReExport: boolean;
455
+ source?: string | undefined;
456
+ }, {
457
+ line: number;
458
+ name: string;
459
+ source?: string | undefined;
460
+ isDefault?: boolean | undefined;
461
+ isType?: boolean | undefined;
462
+ isReExport?: boolean | undefined;
463
+ }>, "many">;
464
+ /** Framework detected (react, next, express, etc.) */
465
+ framework: z.ZodOptional<z.ZodString>;
466
+ /** Is React component file */
467
+ isComponent: z.ZodDefault<z.ZodBoolean>;
468
+ /** Is test file */
469
+ isTest: z.ZodDefault<z.ZodBoolean>;
470
+ /** Is type definition file */
471
+ isTypeDefinition: z.ZodDefault<z.ZodBoolean>;
472
+ /** Cyclomatic complexity estimate */
473
+ complexity: z.ZodOptional<z.ZodNumber>;
474
+ /** Analysis timestamp */
475
+ analyzedAt: z.ZodString;
476
+ }, "strip", z.ZodTypeAny, {
477
+ filePath: string;
478
+ fileMetadataId: string;
479
+ symbols: {
480
+ name: string;
481
+ lineStart: number;
482
+ lineEnd: number;
483
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
484
+ isExported: boolean;
485
+ isDefault: boolean;
486
+ generics: string[];
487
+ decorators: string[];
488
+ modifiers: string[];
489
+ parameters?: {
490
+ name: string;
491
+ optional: boolean;
492
+ type?: string | undefined;
493
+ defaultValue?: string | undefined;
494
+ }[] | undefined;
495
+ jsdoc?: string | undefined;
496
+ qualifiedName?: string | undefined;
497
+ columnStart?: number | undefined;
498
+ columnEnd?: number | undefined;
499
+ isAsync?: boolean | undefined;
500
+ isGenerator?: boolean | undefined;
501
+ signature?: string | undefined;
502
+ returnType?: string | undefined;
503
+ parentSymbol?: string | undefined;
504
+ }[];
505
+ imports: {
506
+ source: string;
507
+ line: number;
508
+ isDefault: boolean;
509
+ isExternal: boolean;
510
+ isTypeOnly: boolean;
511
+ isNamespace: boolean;
512
+ names: {
513
+ name: string;
514
+ alias?: string | undefined;
515
+ }[];
516
+ }[];
517
+ exports: {
518
+ line: number;
519
+ name: string;
520
+ isDefault: boolean;
521
+ isType: boolean;
522
+ isReExport: boolean;
523
+ source?: string | undefined;
524
+ }[];
525
+ isComponent: boolean;
526
+ isTest: boolean;
527
+ isTypeDefinition: boolean;
528
+ analyzedAt: string;
529
+ framework?: string | undefined;
530
+ complexity?: number | undefined;
531
+ }, {
532
+ filePath: string;
533
+ fileMetadataId: string;
534
+ symbols: {
535
+ name: string;
536
+ lineStart: number;
537
+ lineEnd: number;
538
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
539
+ parameters?: {
540
+ name: string;
541
+ type?: string | undefined;
542
+ optional?: boolean | undefined;
543
+ defaultValue?: string | undefined;
544
+ }[] | undefined;
545
+ jsdoc?: string | undefined;
546
+ qualifiedName?: string | undefined;
547
+ columnStart?: number | undefined;
548
+ columnEnd?: number | undefined;
549
+ isExported?: boolean | undefined;
550
+ isDefault?: boolean | undefined;
551
+ isAsync?: boolean | undefined;
552
+ isGenerator?: boolean | undefined;
553
+ signature?: string | undefined;
554
+ returnType?: string | undefined;
555
+ generics?: string[] | undefined;
556
+ decorators?: string[] | undefined;
557
+ modifiers?: string[] | undefined;
558
+ parentSymbol?: string | undefined;
559
+ }[];
560
+ imports: {
561
+ source: string;
562
+ line: number;
563
+ isExternal: boolean;
564
+ names: {
565
+ name: string;
566
+ alias?: string | undefined;
567
+ }[];
568
+ isDefault?: boolean | undefined;
569
+ isTypeOnly?: boolean | undefined;
570
+ isNamespace?: boolean | undefined;
571
+ }[];
572
+ exports: {
573
+ line: number;
574
+ name: string;
575
+ source?: string | undefined;
576
+ isDefault?: boolean | undefined;
577
+ isType?: boolean | undefined;
578
+ isReExport?: boolean | undefined;
579
+ }[];
580
+ analyzedAt: string;
581
+ framework?: string | undefined;
582
+ isComponent?: boolean | undefined;
583
+ isTest?: boolean | undefined;
584
+ isTypeDefinition?: boolean | undefined;
585
+ complexity?: number | undefined;
586
+ }>;
587
+ export type CodeStructureContent = z.infer<typeof CodeStructureContentSchema>;
588
+ export declare const DependencyTypeSchema: z.ZodEnum<["import", "require", "dynamic", "type_only", "reference", "inheritance", "re_export"]>;
589
+ export type DependencyType = z.infer<typeof DependencyTypeSchema>;
590
+ export declare const CodeDependencyContentSchema: z.ZodObject<{
591
+ /** Source file path */
592
+ sourceFile: z.ZodString;
593
+ /** Source file metadata ID */
594
+ sourceFileId: z.ZodString;
595
+ /** Target file path (resolved) */
596
+ targetFile: z.ZodString;
597
+ /** Target file metadata ID (if internal) */
598
+ targetFileId: z.ZodOptional<z.ZodString>;
599
+ /** Is external dependency (node_modules) */
600
+ isExternal: z.ZodBoolean;
601
+ /** Package name (for external) */
602
+ packageName: z.ZodOptional<z.ZodString>;
603
+ /** Dependency type */
604
+ dependencyType: z.ZodEnum<["import", "require", "dynamic", "type_only", "reference", "inheritance", "re_export"]>;
605
+ /** Imported/referenced symbols */
606
+ symbols: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
607
+ /** Line number where dependency occurs */
608
+ line: z.ZodNumber;
609
+ /** Is circular dependency */
610
+ isCircular: z.ZodDefault<z.ZodBoolean>;
611
+ /** Detection timestamp */
612
+ detectedAt: z.ZodString;
613
+ }, "strip", z.ZodTypeAny, {
614
+ line: number;
615
+ detectedAt: string;
616
+ isExternal: boolean;
617
+ symbols: string[];
618
+ sourceFile: string;
619
+ sourceFileId: string;
620
+ targetFile: string;
621
+ dependencyType: "dynamic" | "import" | "require" | "type_only" | "reference" | "inheritance" | "re_export";
622
+ isCircular: boolean;
623
+ targetFileId?: string | undefined;
624
+ packageName?: string | undefined;
625
+ }, {
626
+ line: number;
627
+ detectedAt: string;
628
+ isExternal: boolean;
629
+ sourceFile: string;
630
+ sourceFileId: string;
631
+ targetFile: string;
632
+ dependencyType: "dynamic" | "import" | "require" | "type_only" | "reference" | "inheritance" | "re_export";
633
+ symbols?: string[] | undefined;
634
+ targetFileId?: string | undefined;
635
+ packageName?: string | undefined;
636
+ isCircular?: boolean | undefined;
637
+ }>;
638
+ export type CodeDependencyContent = z.infer<typeof CodeDependencyContentSchema>;
639
+ export declare const DocumentationSourceSchema: z.ZodEnum<["jsdoc", "tsdoc", "inline_comment", "block_comment", "readme", "markdown"]>;
640
+ export type DocumentationSource = z.infer<typeof DocumentationSourceSchema>;
641
+ export declare const CodeDocumentationContentSchema: z.ZodObject<{
642
+ /** File path */
643
+ filePath: z.ZodString;
644
+ /** Symbol name (if for specific symbol) */
645
+ symbolName: z.ZodOptional<z.ZodString>;
646
+ /** Documentation source type */
647
+ source: z.ZodEnum<["jsdoc", "tsdoc", "inline_comment", "block_comment", "readme", "markdown"]>;
648
+ /** Raw documentation text */
649
+ content: z.ZodString;
650
+ /** @param tags */
651
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
652
+ name: z.ZodString;
653
+ type: z.ZodOptional<z.ZodString>;
654
+ description: z.ZodString;
655
+ optional: z.ZodDefault<z.ZodBoolean>;
656
+ }, "strip", z.ZodTypeAny, {
657
+ description: string;
658
+ name: string;
659
+ optional: boolean;
660
+ type?: string | undefined;
661
+ }, {
662
+ description: string;
663
+ name: string;
664
+ type?: string | undefined;
665
+ optional?: boolean | undefined;
666
+ }>, "many">>;
667
+ /** @returns description */
668
+ returns: z.ZodOptional<z.ZodObject<{
669
+ type: z.ZodOptional<z.ZodString>;
670
+ description: z.ZodString;
671
+ }, "strip", z.ZodTypeAny, {
672
+ description: string;
673
+ type?: string | undefined;
674
+ }, {
675
+ description: string;
676
+ type?: string | undefined;
677
+ }>>;
678
+ /** @throws tags */
679
+ throws: z.ZodDefault<z.ZodArray<z.ZodObject<{
680
+ type: z.ZodOptional<z.ZodString>;
681
+ description: z.ZodString;
682
+ }, "strip", z.ZodTypeAny, {
683
+ description: string;
684
+ type?: string | undefined;
685
+ }, {
686
+ description: string;
687
+ type?: string | undefined;
688
+ }>, "many">>;
689
+ /** @example code blocks */
690
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
691
+ /** Tags (@deprecated, @internal, @beta, etc.) */
692
+ tags: z.ZodDefault<z.ZodArray<z.ZodObject<{
693
+ name: z.ZodString;
694
+ value: z.ZodOptional<z.ZodString>;
695
+ }, "strip", z.ZodTypeAny, {
696
+ name: string;
697
+ value?: string | undefined;
698
+ }, {
699
+ name: string;
700
+ value?: string | undefined;
701
+ }>, "many">>;
702
+ /** @see references */
703
+ seeAlso: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
704
+ /** Extracted timestamp */
705
+ extractedAt: z.ZodString;
706
+ }, "strip", z.ZodTypeAny, {
707
+ source: "jsdoc" | "readme" | "markdown" | "tsdoc" | "inline_comment" | "block_comment";
708
+ params: {
709
+ description: string;
710
+ name: string;
711
+ optional: boolean;
712
+ type?: string | undefined;
713
+ }[];
714
+ filePath: string;
715
+ content: string;
716
+ tags: {
717
+ name: string;
718
+ value?: string | undefined;
719
+ }[];
720
+ throws: {
721
+ description: string;
722
+ type?: string | undefined;
723
+ }[];
724
+ examples: string[];
725
+ seeAlso: string[];
726
+ extractedAt: string;
727
+ symbolName?: string | undefined;
728
+ returns?: {
729
+ description: string;
730
+ type?: string | undefined;
731
+ } | undefined;
732
+ }, {
733
+ source: "jsdoc" | "readme" | "markdown" | "tsdoc" | "inline_comment" | "block_comment";
734
+ filePath: string;
735
+ content: string;
736
+ extractedAt: string;
737
+ params?: {
738
+ description: string;
739
+ name: string;
740
+ type?: string | undefined;
741
+ optional?: boolean | undefined;
742
+ }[] | undefined;
743
+ tags?: {
744
+ name: string;
745
+ value?: string | undefined;
746
+ }[] | undefined;
747
+ symbolName?: string | undefined;
748
+ returns?: {
749
+ description: string;
750
+ type?: string | undefined;
751
+ } | undefined;
752
+ throws?: {
753
+ description: string;
754
+ type?: string | undefined;
755
+ }[] | undefined;
756
+ examples?: string[] | undefined;
757
+ seeAlso?: string[] | undefined;
758
+ }>;
759
+ export type CodeDocumentationContent = z.infer<typeof CodeDocumentationContentSchema>;
760
+ export declare const AnalysisTypeSchema: z.ZodEnum<["security", "performance", "quality", "complexity", "maintainability", "documentation", "test_coverage", "accessibility", "best_practices"]>;
761
+ export type AnalysisType = z.infer<typeof AnalysisTypeSchema>;
762
+ export declare const AnalysisFindingSchema: z.ZodObject<{
763
+ /** Finding ID */
764
+ id: z.ZodString;
765
+ /** Severity */
766
+ severity: z.ZodEnum<["critical", "high", "medium", "low", "info"]>;
767
+ /** Category */
768
+ category: z.ZodString;
769
+ /** Finding message */
770
+ message: z.ZodString;
771
+ /** Line number */
772
+ line: z.ZodOptional<z.ZodNumber>;
773
+ /** Code snippet */
774
+ snippet: z.ZodOptional<z.ZodString>;
775
+ /** Suggested fix */
776
+ suggestion: z.ZodOptional<z.ZodString>;
777
+ /** Fix code */
778
+ fixCode: z.ZodOptional<z.ZodString>;
779
+ /** Confidence score (0-1) */
780
+ confidence: z.ZodOptional<z.ZodNumber>;
781
+ }, "strip", z.ZodTypeAny, {
782
+ message: string;
783
+ severity: "critical" | "high" | "medium" | "low" | "info";
784
+ id: string;
785
+ category: string;
786
+ line?: number | undefined;
787
+ suggestion?: string | undefined;
788
+ confidence?: number | undefined;
789
+ snippet?: string | undefined;
790
+ fixCode?: string | undefined;
791
+ }, {
792
+ message: string;
793
+ severity: "critical" | "high" | "medium" | "low" | "info";
794
+ id: string;
795
+ category: string;
796
+ line?: number | undefined;
797
+ suggestion?: string | undefined;
798
+ confidence?: number | undefined;
799
+ snippet?: string | undefined;
800
+ fixCode?: string | undefined;
801
+ }>;
802
+ export type AnalysisFinding = z.infer<typeof AnalysisFindingSchema>;
803
+ export declare const CodeAnalysisContentSchema: z.ZodObject<{
804
+ /** File path */
805
+ filePath: z.ZodString;
806
+ /** File metadata ID */
807
+ fileMetadataId: z.ZodString;
808
+ /** Analysis type */
809
+ analysisType: z.ZodEnum<["security", "performance", "quality", "complexity", "maintainability", "documentation", "test_coverage", "accessibility", "best_practices"]>;
810
+ /** Expert that performed analysis */
811
+ expertId: z.ZodString;
812
+ /** Findings */
813
+ findings: z.ZodArray<z.ZodObject<{
814
+ /** Finding ID */
815
+ id: z.ZodString;
816
+ /** Severity */
817
+ severity: z.ZodEnum<["critical", "high", "medium", "low", "info"]>;
818
+ /** Category */
819
+ category: z.ZodString;
820
+ /** Finding message */
821
+ message: z.ZodString;
822
+ /** Line number */
823
+ line: z.ZodOptional<z.ZodNumber>;
824
+ /** Code snippet */
825
+ snippet: z.ZodOptional<z.ZodString>;
826
+ /** Suggested fix */
827
+ suggestion: z.ZodOptional<z.ZodString>;
828
+ /** Fix code */
829
+ fixCode: z.ZodOptional<z.ZodString>;
830
+ /** Confidence score (0-1) */
831
+ confidence: z.ZodOptional<z.ZodNumber>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ message: string;
834
+ severity: "critical" | "high" | "medium" | "low" | "info";
835
+ id: string;
836
+ category: string;
837
+ line?: number | undefined;
838
+ suggestion?: string | undefined;
839
+ confidence?: number | undefined;
840
+ snippet?: string | undefined;
841
+ fixCode?: string | undefined;
842
+ }, {
843
+ message: string;
844
+ severity: "critical" | "high" | "medium" | "low" | "info";
845
+ id: string;
846
+ category: string;
847
+ line?: number | undefined;
848
+ suggestion?: string | undefined;
849
+ confidence?: number | undefined;
850
+ snippet?: string | undefined;
851
+ fixCode?: string | undefined;
852
+ }>, "many">;
853
+ /** Overall score (0-1) */
854
+ score: z.ZodOptional<z.ZodNumber>;
855
+ /** Metrics */
856
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
857
+ /** Analysis timestamp */
858
+ analyzedAt: z.ZodString;
859
+ }, "strip", z.ZodTypeAny, {
860
+ filePath: string;
861
+ expertId: string;
862
+ fileMetadataId: string;
863
+ analyzedAt: string;
864
+ analysisType: "documentation" | "performance" | "security" | "test_coverage" | "accessibility" | "complexity" | "quality" | "maintainability" | "best_practices";
865
+ findings: {
866
+ message: string;
867
+ severity: "critical" | "high" | "medium" | "low" | "info";
868
+ id: string;
869
+ category: string;
870
+ line?: number | undefined;
871
+ suggestion?: string | undefined;
872
+ confidence?: number | undefined;
873
+ snippet?: string | undefined;
874
+ fixCode?: string | undefined;
875
+ }[];
876
+ metrics?: Record<string, number> | undefined;
877
+ score?: number | undefined;
878
+ }, {
879
+ filePath: string;
880
+ expertId: string;
881
+ fileMetadataId: string;
882
+ analyzedAt: string;
883
+ analysisType: "documentation" | "performance" | "security" | "test_coverage" | "accessibility" | "complexity" | "quality" | "maintainability" | "best_practices";
884
+ findings: {
885
+ message: string;
886
+ severity: "critical" | "high" | "medium" | "low" | "info";
887
+ id: string;
888
+ category: string;
889
+ line?: number | undefined;
890
+ suggestion?: string | undefined;
891
+ confidence?: number | undefined;
892
+ snippet?: string | undefined;
893
+ fixCode?: string | undefined;
894
+ }[];
895
+ metrics?: Record<string, number> | undefined;
896
+ score?: number | undefined;
897
+ }>;
898
+ export type CodeAnalysisContent = z.infer<typeof CodeAnalysisContentSchema>;
899
+ export declare const CrossProjectRefTypeSchema: z.ZodEnum<["similar_pattern", "shared_dependency", "shared_concept", "api_usage", "design_pattern", "anti_pattern", "best_practice", "duplicate_code"]>;
900
+ export type CrossProjectRefType = z.infer<typeof CrossProjectRefTypeSchema>;
901
+ export declare const CrossProjectRefContentSchema: z.ZodObject<{
902
+ /** Source project system ID */
903
+ sourceProject: z.ZodString;
904
+ /** Source file path */
905
+ sourceFile: z.ZodString;
906
+ /** Source symbol */
907
+ sourceSymbol: z.ZodOptional<z.ZodString>;
908
+ /** Target project system ID */
909
+ targetProject: z.ZodString;
910
+ /** Target file path */
911
+ targetFile: z.ZodOptional<z.ZodString>;
912
+ /** Target symbol */
913
+ targetSymbol: z.ZodOptional<z.ZodString>;
914
+ /** Reference type */
915
+ referenceType: z.ZodEnum<["similar_pattern", "shared_dependency", "shared_concept", "api_usage", "design_pattern", "anti_pattern", "best_practice", "duplicate_code"]>;
916
+ /** Similarity score (0-1) */
917
+ similarity: z.ZodNumber;
918
+ /** Description */
919
+ description: z.ZodString;
920
+ /** Is bidirectional */
921
+ bidirectional: z.ZodDefault<z.ZodBoolean>;
922
+ /** Detected timestamp */
923
+ detectedAt: z.ZodString;
924
+ }, "strip", z.ZodTypeAny, {
925
+ description: string;
926
+ detectedAt: string;
927
+ similarity: number;
928
+ sourceFile: string;
929
+ sourceProject: string;
930
+ targetProject: string;
931
+ referenceType: "similar_pattern" | "shared_dependency" | "shared_concept" | "api_usage" | "design_pattern" | "anti_pattern" | "best_practice" | "duplicate_code";
932
+ bidirectional: boolean;
933
+ targetFile?: string | undefined;
934
+ sourceSymbol?: string | undefined;
935
+ targetSymbol?: string | undefined;
936
+ }, {
937
+ description: string;
938
+ detectedAt: string;
939
+ similarity: number;
940
+ sourceFile: string;
941
+ sourceProject: string;
942
+ targetProject: string;
943
+ referenceType: "similar_pattern" | "shared_dependency" | "shared_concept" | "api_usage" | "design_pattern" | "anti_pattern" | "best_practice" | "duplicate_code";
944
+ targetFile?: string | undefined;
945
+ sourceSymbol?: string | undefined;
946
+ targetSymbol?: string | undefined;
947
+ bidirectional?: boolean | undefined;
948
+ }>;
949
+ export type CrossProjectRefContent = z.infer<typeof CrossProjectRefContentSchema>;
950
+ export declare const IndexRunStatusSchema: z.ZodEnum<["running", "completed", "failed", "cancelled"]>;
951
+ export type IndexRunStatus = z.infer<typeof IndexRunStatusSchema>;
952
+ export declare const IndexRunContentSchema: z.ZodObject<{
953
+ /** Project ID being indexed */
954
+ projectId: z.ZodString;
955
+ /** Index run status */
956
+ status: z.ZodEnum<["running", "completed", "failed", "cancelled"]>;
957
+ /** Start timestamp */
958
+ startedAt: z.ZodString;
959
+ /** End timestamp */
960
+ completedAt: z.ZodOptional<z.ZodString>;
961
+ /** Duration in ms */
962
+ durationMs: z.ZodOptional<z.ZodNumber>;
963
+ /** Index depth (quick, standard, thorough) */
964
+ depth: z.ZodEnum<["quick", "standard", "thorough"]>;
965
+ /** Statistics */
966
+ stats: z.ZodObject<{
967
+ filesScanned: z.ZodNumber;
968
+ filesIndexed: z.ZodNumber;
969
+ filesSkipped: z.ZodNumber;
970
+ filesChanged: z.ZodNumber;
971
+ symbolsExtracted: z.ZodNumber;
972
+ dependenciesFound: z.ZodNumber;
973
+ embeddingsGenerated: z.ZodNumber;
974
+ errorsEncountered: z.ZodNumber;
975
+ }, "strip", z.ZodTypeAny, {
976
+ filesChanged: number;
977
+ filesScanned: number;
978
+ filesIndexed: number;
979
+ filesSkipped: number;
980
+ symbolsExtracted: number;
981
+ dependenciesFound: number;
982
+ embeddingsGenerated: number;
983
+ errorsEncountered: number;
984
+ }, {
985
+ filesChanged: number;
986
+ filesScanned: number;
987
+ filesIndexed: number;
988
+ filesSkipped: number;
989
+ symbolsExtracted: number;
990
+ dependenciesFound: number;
991
+ embeddingsGenerated: number;
992
+ errorsEncountered: number;
993
+ }>;
994
+ /** Errors encountered */
995
+ errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
996
+ file: z.ZodString;
997
+ error: z.ZodString;
998
+ stack: z.ZodOptional<z.ZodString>;
999
+ }, "strip", z.ZodTypeAny, {
1000
+ error: string;
1001
+ file: string;
1002
+ stack?: string | undefined;
1003
+ }, {
1004
+ error: string;
1005
+ file: string;
1006
+ stack?: string | undefined;
1007
+ }>, "many">>;
1008
+ /** Paths indexed */
1009
+ paths: z.ZodArray<z.ZodString, "many">;
1010
+ /** Exclude patterns used */
1011
+ excludePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1012
+ }, "strip", z.ZodTypeAny, {
1013
+ status: "failed" | "completed" | "cancelled" | "running";
1014
+ startedAt: string;
1015
+ stats: {
1016
+ filesChanged: number;
1017
+ filesScanned: number;
1018
+ filesIndexed: number;
1019
+ filesSkipped: number;
1020
+ symbolsExtracted: number;
1021
+ dependenciesFound: number;
1022
+ embeddingsGenerated: number;
1023
+ errorsEncountered: number;
1024
+ };
1025
+ errors: {
1026
+ error: string;
1027
+ file: string;
1028
+ stack?: string | undefined;
1029
+ }[];
1030
+ paths: string[];
1031
+ depth: "quick" | "standard" | "thorough";
1032
+ projectId: string;
1033
+ excludePatterns: string[];
1034
+ completedAt?: string | undefined;
1035
+ durationMs?: number | undefined;
1036
+ }, {
1037
+ status: "failed" | "completed" | "cancelled" | "running";
1038
+ startedAt: string;
1039
+ stats: {
1040
+ filesChanged: number;
1041
+ filesScanned: number;
1042
+ filesIndexed: number;
1043
+ filesSkipped: number;
1044
+ symbolsExtracted: number;
1045
+ dependenciesFound: number;
1046
+ embeddingsGenerated: number;
1047
+ errorsEncountered: number;
1048
+ };
1049
+ paths: string[];
1050
+ depth: "quick" | "standard" | "thorough";
1051
+ projectId: string;
1052
+ completedAt?: string | undefined;
1053
+ durationMs?: number | undefined;
1054
+ errors?: {
1055
+ error: string;
1056
+ file: string;
1057
+ stack?: string | undefined;
1058
+ }[] | undefined;
1059
+ excludePatterns?: string[] | undefined;
1060
+ }>;
1061
+ export type IndexRunContent = z.infer<typeof IndexRunContentSchema>;
1062
+ export declare const CodeWikiItemTypeSchema: z.ZodEnum<["file_metadata", "code_structure", "code_dependency", "code_documentation", "code_analysis", "cross_project_ref", "index_run"]>;
1063
+ export type CodeWikiItemType = z.infer<typeof CodeWikiItemTypeSchema>;
1064
+ /**
1065
+ * Create file metadata content
1066
+ */
1067
+ export declare function createFileMetadata(filePath: string, options: Partial<FileMetadataContent>): FileMetadataContent;
1068
+ /**
1069
+ * Create code structure content
1070
+ */
1071
+ export declare function createCodeStructure(filePath: string, fileMetadataId: string, options?: Partial<Omit<CodeStructureContent, 'filePath' | 'fileMetadataId' | 'analyzedAt'>>): CodeStructureContent;
1072
+ /**
1073
+ * Create code dependency content
1074
+ */
1075
+ export declare function createCodeDependency(sourceFile: string, targetFile: string, options: Partial<Omit<CodeDependencyContent, 'sourceFile' | 'targetFile' | 'detectedAt'>>): CodeDependencyContent;
1076
+ /**
1077
+ * Create index run content
1078
+ */
1079
+ export declare function createIndexRun(projectId: string, paths: string[], depth?: IndexRunContent['depth']): IndexRunContent;
1080
+ /**
1081
+ * Detect language from file extension
1082
+ */
1083
+ export declare function detectLanguage(extension: string): Language;
1084
+ /**
1085
+ * Detect if file is a test file
1086
+ */
1087
+ export declare function isTestFile(filePath: string): boolean;
1088
+ /**
1089
+ * Detect if file is a type definition
1090
+ */
1091
+ export declare function isTypeDefinitionFile(filePath: string): boolean;
1092
+ declare const _default: {
1093
+ FileMetadataContentSchema: z.ZodObject<{
1094
+ /** Absolute file path */
1095
+ filePath: z.ZodString;
1096
+ /** Relative path from project root */
1097
+ relativePath: z.ZodString;
1098
+ /** File name with extension */
1099
+ fileName: z.ZodString;
1100
+ /** File extension (without dot) */
1101
+ extension: z.ZodString;
1102
+ /** Detected programming language */
1103
+ language: z.ZodEnum<["typescript", "javascript", "tsx", "jsx", "json", "markdown", "css", "scss", "html", "yaml", "sql", "shell", "unknown"]>;
1104
+ /** File size in bytes */
1105
+ size: z.ZodNumber;
1106
+ /** Lines of code */
1107
+ loc: z.ZodNumber;
1108
+ /** Non-empty lines */
1109
+ locNonEmpty: z.ZodNumber;
1110
+ /** Comment lines */
1111
+ locComments: z.ZodNumber;
1112
+ /** SHA-256 content hash for change detection */
1113
+ hash: z.ZodString;
1114
+ /** Last modified timestamp (ISO) */
1115
+ lastModified: z.ZodString;
1116
+ /** Project identifier */
1117
+ projectId: z.ZodString;
1118
+ /** Git branch (if in repo) */
1119
+ branch: z.ZodOptional<z.ZodString>;
1120
+ /** Git commit hash (if in repo) */
1121
+ commit: z.ZodOptional<z.ZodString>;
1122
+ /** First indexed timestamp */
1123
+ firstIndexedAt: z.ZodString;
1124
+ /** Last indexed timestamp */
1125
+ lastIndexedAt: z.ZodString;
1126
+ }, "strip", z.ZodTypeAny, {
1127
+ filePath: string;
1128
+ language: "unknown" | "json" | "sql" | "typescript" | "javascript" | "tsx" | "jsx" | "markdown" | "css" | "scss" | "html" | "yaml" | "shell";
1129
+ hash: string;
1130
+ relativePath: string;
1131
+ fileName: string;
1132
+ extension: string;
1133
+ size: number;
1134
+ loc: number;
1135
+ locNonEmpty: number;
1136
+ locComments: number;
1137
+ lastModified: string;
1138
+ projectId: string;
1139
+ firstIndexedAt: string;
1140
+ lastIndexedAt: string;
1141
+ branch?: string | undefined;
1142
+ commit?: string | undefined;
1143
+ }, {
1144
+ filePath: string;
1145
+ language: "unknown" | "json" | "sql" | "typescript" | "javascript" | "tsx" | "jsx" | "markdown" | "css" | "scss" | "html" | "yaml" | "shell";
1146
+ hash: string;
1147
+ relativePath: string;
1148
+ fileName: string;
1149
+ extension: string;
1150
+ size: number;
1151
+ loc: number;
1152
+ locNonEmpty: number;
1153
+ locComments: number;
1154
+ lastModified: string;
1155
+ projectId: string;
1156
+ firstIndexedAt: string;
1157
+ lastIndexedAt: string;
1158
+ branch?: string | undefined;
1159
+ commit?: string | undefined;
1160
+ }>;
1161
+ CodeStructureContentSchema: z.ZodObject<{
1162
+ /** File path */
1163
+ filePath: z.ZodString;
1164
+ /** Parent file_metadata item ID */
1165
+ fileMetadataId: z.ZodString;
1166
+ /** All symbols defined in file */
1167
+ symbols: z.ZodArray<z.ZodObject<{
1168
+ /** Symbol name */
1169
+ name: z.ZodString;
1170
+ /** Full qualified name (e.g., ClassName.methodName) */
1171
+ qualifiedName: z.ZodOptional<z.ZodString>;
1172
+ /** Symbol kind */
1173
+ kind: z.ZodEnum<["class", "interface", "type", "enum", "function", "arrow_function", "const", "let", "var", "namespace", "module", "component", "hook", "method", "property", "parameter", "import", "export"]>;
1174
+ /** Start line number (1-based) */
1175
+ lineStart: z.ZodNumber;
1176
+ /** End line number (1-based) */
1177
+ lineEnd: z.ZodNumber;
1178
+ /** Column start */
1179
+ columnStart: z.ZodOptional<z.ZodNumber>;
1180
+ /** Column end */
1181
+ columnEnd: z.ZodOptional<z.ZodNumber>;
1182
+ /** Is exported */
1183
+ isExported: z.ZodDefault<z.ZodBoolean>;
1184
+ /** Is default export */
1185
+ isDefault: z.ZodDefault<z.ZodBoolean>;
1186
+ /** Is async (for functions) */
1187
+ isAsync: z.ZodOptional<z.ZodBoolean>;
1188
+ /** Is generator (for functions) */
1189
+ isGenerator: z.ZodOptional<z.ZodBoolean>;
1190
+ /** Type signature */
1191
+ signature: z.ZodOptional<z.ZodString>;
1192
+ /** Return type (for functions) */
1193
+ returnType: z.ZodOptional<z.ZodString>;
1194
+ /** Parameters (for functions) */
1195
+ parameters: z.ZodOptional<z.ZodArray<z.ZodObject<{
1196
+ name: z.ZodString;
1197
+ type: z.ZodOptional<z.ZodString>;
1198
+ optional: z.ZodDefault<z.ZodBoolean>;
1199
+ defaultValue: z.ZodOptional<z.ZodString>;
1200
+ }, "strip", z.ZodTypeAny, {
1201
+ name: string;
1202
+ optional: boolean;
1203
+ type?: string | undefined;
1204
+ defaultValue?: string | undefined;
1205
+ }, {
1206
+ name: string;
1207
+ type?: string | undefined;
1208
+ optional?: boolean | undefined;
1209
+ defaultValue?: string | undefined;
1210
+ }>, "many">>;
1211
+ /** Generic type parameters */
1212
+ generics: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1213
+ /** Decorators */
1214
+ decorators: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1215
+ /** Modifiers (public, private, protected, static, readonly, abstract) */
1216
+ modifiers: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1217
+ /** JSDoc documentation */
1218
+ jsdoc: z.ZodOptional<z.ZodString>;
1219
+ /** Parent symbol (for nested symbols) */
1220
+ parentSymbol: z.ZodOptional<z.ZodString>;
1221
+ }, "strip", z.ZodTypeAny, {
1222
+ name: string;
1223
+ lineStart: number;
1224
+ lineEnd: number;
1225
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
1226
+ isExported: boolean;
1227
+ isDefault: boolean;
1228
+ generics: string[];
1229
+ decorators: string[];
1230
+ modifiers: string[];
1231
+ parameters?: {
1232
+ name: string;
1233
+ optional: boolean;
1234
+ type?: string | undefined;
1235
+ defaultValue?: string | undefined;
1236
+ }[] | undefined;
1237
+ jsdoc?: string | undefined;
1238
+ qualifiedName?: string | undefined;
1239
+ columnStart?: number | undefined;
1240
+ columnEnd?: number | undefined;
1241
+ isAsync?: boolean | undefined;
1242
+ isGenerator?: boolean | undefined;
1243
+ signature?: string | undefined;
1244
+ returnType?: string | undefined;
1245
+ parentSymbol?: string | undefined;
1246
+ }, {
1247
+ name: string;
1248
+ lineStart: number;
1249
+ lineEnd: number;
1250
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
1251
+ parameters?: {
1252
+ name: string;
1253
+ type?: string | undefined;
1254
+ optional?: boolean | undefined;
1255
+ defaultValue?: string | undefined;
1256
+ }[] | undefined;
1257
+ jsdoc?: string | undefined;
1258
+ qualifiedName?: string | undefined;
1259
+ columnStart?: number | undefined;
1260
+ columnEnd?: number | undefined;
1261
+ isExported?: boolean | undefined;
1262
+ isDefault?: boolean | undefined;
1263
+ isAsync?: boolean | undefined;
1264
+ isGenerator?: boolean | undefined;
1265
+ signature?: string | undefined;
1266
+ returnType?: string | undefined;
1267
+ generics?: string[] | undefined;
1268
+ decorators?: string[] | undefined;
1269
+ modifiers?: string[] | undefined;
1270
+ parentSymbol?: string | undefined;
1271
+ }>, "many">;
1272
+ /** Imports */
1273
+ imports: z.ZodArray<z.ZodObject<{
1274
+ /** Import source module */
1275
+ source: z.ZodString;
1276
+ /** Is external (node_modules) */
1277
+ isExternal: z.ZodBoolean;
1278
+ /** Is type-only import */
1279
+ isTypeOnly: z.ZodDefault<z.ZodBoolean>;
1280
+ /** Is namespace import (import * as X) */
1281
+ isNamespace: z.ZodDefault<z.ZodBoolean>;
1282
+ /** Is default import */
1283
+ isDefault: z.ZodDefault<z.ZodBoolean>;
1284
+ /** Imported names */
1285
+ names: z.ZodArray<z.ZodObject<{
1286
+ name: z.ZodString;
1287
+ alias: z.ZodOptional<z.ZodString>;
1288
+ }, "strip", z.ZodTypeAny, {
1289
+ name: string;
1290
+ alias?: string | undefined;
1291
+ }, {
1292
+ name: string;
1293
+ alias?: string | undefined;
1294
+ }>, "many">;
1295
+ /** Line number */
1296
+ line: z.ZodNumber;
1297
+ }, "strip", z.ZodTypeAny, {
1298
+ source: string;
1299
+ line: number;
1300
+ isDefault: boolean;
1301
+ isExternal: boolean;
1302
+ isTypeOnly: boolean;
1303
+ isNamespace: boolean;
1304
+ names: {
1305
+ name: string;
1306
+ alias?: string | undefined;
1307
+ }[];
1308
+ }, {
1309
+ source: string;
1310
+ line: number;
1311
+ isExternal: boolean;
1312
+ names: {
1313
+ name: string;
1314
+ alias?: string | undefined;
1315
+ }[];
1316
+ isDefault?: boolean | undefined;
1317
+ isTypeOnly?: boolean | undefined;
1318
+ isNamespace?: boolean | undefined;
1319
+ }>, "many">;
1320
+ /** Exports */
1321
+ exports: z.ZodArray<z.ZodObject<{
1322
+ /** Exported name */
1323
+ name: z.ZodString;
1324
+ /** Is default export */
1325
+ isDefault: z.ZodDefault<z.ZodBoolean>;
1326
+ /** Is type export */
1327
+ isType: z.ZodDefault<z.ZodBoolean>;
1328
+ /** Is re-export */
1329
+ isReExport: z.ZodDefault<z.ZodBoolean>;
1330
+ /** Re-export source */
1331
+ source: z.ZodOptional<z.ZodString>;
1332
+ /** Line number */
1333
+ line: z.ZodNumber;
1334
+ }, "strip", z.ZodTypeAny, {
1335
+ line: number;
1336
+ name: string;
1337
+ isDefault: boolean;
1338
+ isType: boolean;
1339
+ isReExport: boolean;
1340
+ source?: string | undefined;
1341
+ }, {
1342
+ line: number;
1343
+ name: string;
1344
+ source?: string | undefined;
1345
+ isDefault?: boolean | undefined;
1346
+ isType?: boolean | undefined;
1347
+ isReExport?: boolean | undefined;
1348
+ }>, "many">;
1349
+ /** Framework detected (react, next, express, etc.) */
1350
+ framework: z.ZodOptional<z.ZodString>;
1351
+ /** Is React component file */
1352
+ isComponent: z.ZodDefault<z.ZodBoolean>;
1353
+ /** Is test file */
1354
+ isTest: z.ZodDefault<z.ZodBoolean>;
1355
+ /** Is type definition file */
1356
+ isTypeDefinition: z.ZodDefault<z.ZodBoolean>;
1357
+ /** Cyclomatic complexity estimate */
1358
+ complexity: z.ZodOptional<z.ZodNumber>;
1359
+ /** Analysis timestamp */
1360
+ analyzedAt: z.ZodString;
1361
+ }, "strip", z.ZodTypeAny, {
1362
+ filePath: string;
1363
+ fileMetadataId: string;
1364
+ symbols: {
1365
+ name: string;
1366
+ lineStart: number;
1367
+ lineEnd: number;
1368
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
1369
+ isExported: boolean;
1370
+ isDefault: boolean;
1371
+ generics: string[];
1372
+ decorators: string[];
1373
+ modifiers: string[];
1374
+ parameters?: {
1375
+ name: string;
1376
+ optional: boolean;
1377
+ type?: string | undefined;
1378
+ defaultValue?: string | undefined;
1379
+ }[] | undefined;
1380
+ jsdoc?: string | undefined;
1381
+ qualifiedName?: string | undefined;
1382
+ columnStart?: number | undefined;
1383
+ columnEnd?: number | undefined;
1384
+ isAsync?: boolean | undefined;
1385
+ isGenerator?: boolean | undefined;
1386
+ signature?: string | undefined;
1387
+ returnType?: string | undefined;
1388
+ parentSymbol?: string | undefined;
1389
+ }[];
1390
+ imports: {
1391
+ source: string;
1392
+ line: number;
1393
+ isDefault: boolean;
1394
+ isExternal: boolean;
1395
+ isTypeOnly: boolean;
1396
+ isNamespace: boolean;
1397
+ names: {
1398
+ name: string;
1399
+ alias?: string | undefined;
1400
+ }[];
1401
+ }[];
1402
+ exports: {
1403
+ line: number;
1404
+ name: string;
1405
+ isDefault: boolean;
1406
+ isType: boolean;
1407
+ isReExport: boolean;
1408
+ source?: string | undefined;
1409
+ }[];
1410
+ isComponent: boolean;
1411
+ isTest: boolean;
1412
+ isTypeDefinition: boolean;
1413
+ analyzedAt: string;
1414
+ framework?: string | undefined;
1415
+ complexity?: number | undefined;
1416
+ }, {
1417
+ filePath: string;
1418
+ fileMetadataId: string;
1419
+ symbols: {
1420
+ name: string;
1421
+ lineStart: number;
1422
+ lineEnd: number;
1423
+ kind: "function" | "type" | "module" | "method" | "component" | "hook" | "export" | "import" | "interface" | "namespace" | "class" | "enum" | "arrow_function" | "const" | "let" | "var" | "property" | "parameter";
1424
+ parameters?: {
1425
+ name: string;
1426
+ type?: string | undefined;
1427
+ optional?: boolean | undefined;
1428
+ defaultValue?: string | undefined;
1429
+ }[] | undefined;
1430
+ jsdoc?: string | undefined;
1431
+ qualifiedName?: string | undefined;
1432
+ columnStart?: number | undefined;
1433
+ columnEnd?: number | undefined;
1434
+ isExported?: boolean | undefined;
1435
+ isDefault?: boolean | undefined;
1436
+ isAsync?: boolean | undefined;
1437
+ isGenerator?: boolean | undefined;
1438
+ signature?: string | undefined;
1439
+ returnType?: string | undefined;
1440
+ generics?: string[] | undefined;
1441
+ decorators?: string[] | undefined;
1442
+ modifiers?: string[] | undefined;
1443
+ parentSymbol?: string | undefined;
1444
+ }[];
1445
+ imports: {
1446
+ source: string;
1447
+ line: number;
1448
+ isExternal: boolean;
1449
+ names: {
1450
+ name: string;
1451
+ alias?: string | undefined;
1452
+ }[];
1453
+ isDefault?: boolean | undefined;
1454
+ isTypeOnly?: boolean | undefined;
1455
+ isNamespace?: boolean | undefined;
1456
+ }[];
1457
+ exports: {
1458
+ line: number;
1459
+ name: string;
1460
+ source?: string | undefined;
1461
+ isDefault?: boolean | undefined;
1462
+ isType?: boolean | undefined;
1463
+ isReExport?: boolean | undefined;
1464
+ }[];
1465
+ analyzedAt: string;
1466
+ framework?: string | undefined;
1467
+ isComponent?: boolean | undefined;
1468
+ isTest?: boolean | undefined;
1469
+ isTypeDefinition?: boolean | undefined;
1470
+ complexity?: number | undefined;
1471
+ }>;
1472
+ CodeDependencyContentSchema: z.ZodObject<{
1473
+ /** Source file path */
1474
+ sourceFile: z.ZodString;
1475
+ /** Source file metadata ID */
1476
+ sourceFileId: z.ZodString;
1477
+ /** Target file path (resolved) */
1478
+ targetFile: z.ZodString;
1479
+ /** Target file metadata ID (if internal) */
1480
+ targetFileId: z.ZodOptional<z.ZodString>;
1481
+ /** Is external dependency (node_modules) */
1482
+ isExternal: z.ZodBoolean;
1483
+ /** Package name (for external) */
1484
+ packageName: z.ZodOptional<z.ZodString>;
1485
+ /** Dependency type */
1486
+ dependencyType: z.ZodEnum<["import", "require", "dynamic", "type_only", "reference", "inheritance", "re_export"]>;
1487
+ /** Imported/referenced symbols */
1488
+ symbols: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1489
+ /** Line number where dependency occurs */
1490
+ line: z.ZodNumber;
1491
+ /** Is circular dependency */
1492
+ isCircular: z.ZodDefault<z.ZodBoolean>;
1493
+ /** Detection timestamp */
1494
+ detectedAt: z.ZodString;
1495
+ }, "strip", z.ZodTypeAny, {
1496
+ line: number;
1497
+ detectedAt: string;
1498
+ isExternal: boolean;
1499
+ symbols: string[];
1500
+ sourceFile: string;
1501
+ sourceFileId: string;
1502
+ targetFile: string;
1503
+ dependencyType: "dynamic" | "import" | "require" | "type_only" | "reference" | "inheritance" | "re_export";
1504
+ isCircular: boolean;
1505
+ targetFileId?: string | undefined;
1506
+ packageName?: string | undefined;
1507
+ }, {
1508
+ line: number;
1509
+ detectedAt: string;
1510
+ isExternal: boolean;
1511
+ sourceFile: string;
1512
+ sourceFileId: string;
1513
+ targetFile: string;
1514
+ dependencyType: "dynamic" | "import" | "require" | "type_only" | "reference" | "inheritance" | "re_export";
1515
+ symbols?: string[] | undefined;
1516
+ targetFileId?: string | undefined;
1517
+ packageName?: string | undefined;
1518
+ isCircular?: boolean | undefined;
1519
+ }>;
1520
+ CodeDocumentationContentSchema: z.ZodObject<{
1521
+ /** File path */
1522
+ filePath: z.ZodString;
1523
+ /** Symbol name (if for specific symbol) */
1524
+ symbolName: z.ZodOptional<z.ZodString>;
1525
+ /** Documentation source type */
1526
+ source: z.ZodEnum<["jsdoc", "tsdoc", "inline_comment", "block_comment", "readme", "markdown"]>;
1527
+ /** Raw documentation text */
1528
+ content: z.ZodString;
1529
+ /** @param tags */
1530
+ params: z.ZodDefault<z.ZodArray<z.ZodObject<{
1531
+ name: z.ZodString;
1532
+ type: z.ZodOptional<z.ZodString>;
1533
+ description: z.ZodString;
1534
+ optional: z.ZodDefault<z.ZodBoolean>;
1535
+ }, "strip", z.ZodTypeAny, {
1536
+ description: string;
1537
+ name: string;
1538
+ optional: boolean;
1539
+ type?: string | undefined;
1540
+ }, {
1541
+ description: string;
1542
+ name: string;
1543
+ type?: string | undefined;
1544
+ optional?: boolean | undefined;
1545
+ }>, "many">>;
1546
+ /** @returns description */
1547
+ returns: z.ZodOptional<z.ZodObject<{
1548
+ type: z.ZodOptional<z.ZodString>;
1549
+ description: z.ZodString;
1550
+ }, "strip", z.ZodTypeAny, {
1551
+ description: string;
1552
+ type?: string | undefined;
1553
+ }, {
1554
+ description: string;
1555
+ type?: string | undefined;
1556
+ }>>;
1557
+ /** @throws tags */
1558
+ throws: z.ZodDefault<z.ZodArray<z.ZodObject<{
1559
+ type: z.ZodOptional<z.ZodString>;
1560
+ description: z.ZodString;
1561
+ }, "strip", z.ZodTypeAny, {
1562
+ description: string;
1563
+ type?: string | undefined;
1564
+ }, {
1565
+ description: string;
1566
+ type?: string | undefined;
1567
+ }>, "many">>;
1568
+ /** @example code blocks */
1569
+ examples: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1570
+ /** Tags (@deprecated, @internal, @beta, etc.) */
1571
+ tags: z.ZodDefault<z.ZodArray<z.ZodObject<{
1572
+ name: z.ZodString;
1573
+ value: z.ZodOptional<z.ZodString>;
1574
+ }, "strip", z.ZodTypeAny, {
1575
+ name: string;
1576
+ value?: string | undefined;
1577
+ }, {
1578
+ name: string;
1579
+ value?: string | undefined;
1580
+ }>, "many">>;
1581
+ /** @see references */
1582
+ seeAlso: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1583
+ /** Extracted timestamp */
1584
+ extractedAt: z.ZodString;
1585
+ }, "strip", z.ZodTypeAny, {
1586
+ source: "jsdoc" | "readme" | "markdown" | "tsdoc" | "inline_comment" | "block_comment";
1587
+ params: {
1588
+ description: string;
1589
+ name: string;
1590
+ optional: boolean;
1591
+ type?: string | undefined;
1592
+ }[];
1593
+ filePath: string;
1594
+ content: string;
1595
+ tags: {
1596
+ name: string;
1597
+ value?: string | undefined;
1598
+ }[];
1599
+ throws: {
1600
+ description: string;
1601
+ type?: string | undefined;
1602
+ }[];
1603
+ examples: string[];
1604
+ seeAlso: string[];
1605
+ extractedAt: string;
1606
+ symbolName?: string | undefined;
1607
+ returns?: {
1608
+ description: string;
1609
+ type?: string | undefined;
1610
+ } | undefined;
1611
+ }, {
1612
+ source: "jsdoc" | "readme" | "markdown" | "tsdoc" | "inline_comment" | "block_comment";
1613
+ filePath: string;
1614
+ content: string;
1615
+ extractedAt: string;
1616
+ params?: {
1617
+ description: string;
1618
+ name: string;
1619
+ type?: string | undefined;
1620
+ optional?: boolean | undefined;
1621
+ }[] | undefined;
1622
+ tags?: {
1623
+ name: string;
1624
+ value?: string | undefined;
1625
+ }[] | undefined;
1626
+ symbolName?: string | undefined;
1627
+ returns?: {
1628
+ description: string;
1629
+ type?: string | undefined;
1630
+ } | undefined;
1631
+ throws?: {
1632
+ description: string;
1633
+ type?: string | undefined;
1634
+ }[] | undefined;
1635
+ examples?: string[] | undefined;
1636
+ seeAlso?: string[] | undefined;
1637
+ }>;
1638
+ CodeAnalysisContentSchema: z.ZodObject<{
1639
+ /** File path */
1640
+ filePath: z.ZodString;
1641
+ /** File metadata ID */
1642
+ fileMetadataId: z.ZodString;
1643
+ /** Analysis type */
1644
+ analysisType: z.ZodEnum<["security", "performance", "quality", "complexity", "maintainability", "documentation", "test_coverage", "accessibility", "best_practices"]>;
1645
+ /** Expert that performed analysis */
1646
+ expertId: z.ZodString;
1647
+ /** Findings */
1648
+ findings: z.ZodArray<z.ZodObject<{
1649
+ /** Finding ID */
1650
+ id: z.ZodString;
1651
+ /** Severity */
1652
+ severity: z.ZodEnum<["critical", "high", "medium", "low", "info"]>;
1653
+ /** Category */
1654
+ category: z.ZodString;
1655
+ /** Finding message */
1656
+ message: z.ZodString;
1657
+ /** Line number */
1658
+ line: z.ZodOptional<z.ZodNumber>;
1659
+ /** Code snippet */
1660
+ snippet: z.ZodOptional<z.ZodString>;
1661
+ /** Suggested fix */
1662
+ suggestion: z.ZodOptional<z.ZodString>;
1663
+ /** Fix code */
1664
+ fixCode: z.ZodOptional<z.ZodString>;
1665
+ /** Confidence score (0-1) */
1666
+ confidence: z.ZodOptional<z.ZodNumber>;
1667
+ }, "strip", z.ZodTypeAny, {
1668
+ message: string;
1669
+ severity: "critical" | "high" | "medium" | "low" | "info";
1670
+ id: string;
1671
+ category: string;
1672
+ line?: number | undefined;
1673
+ suggestion?: string | undefined;
1674
+ confidence?: number | undefined;
1675
+ snippet?: string | undefined;
1676
+ fixCode?: string | undefined;
1677
+ }, {
1678
+ message: string;
1679
+ severity: "critical" | "high" | "medium" | "low" | "info";
1680
+ id: string;
1681
+ category: string;
1682
+ line?: number | undefined;
1683
+ suggestion?: string | undefined;
1684
+ confidence?: number | undefined;
1685
+ snippet?: string | undefined;
1686
+ fixCode?: string | undefined;
1687
+ }>, "many">;
1688
+ /** Overall score (0-1) */
1689
+ score: z.ZodOptional<z.ZodNumber>;
1690
+ /** Metrics */
1691
+ metrics: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
1692
+ /** Analysis timestamp */
1693
+ analyzedAt: z.ZodString;
1694
+ }, "strip", z.ZodTypeAny, {
1695
+ filePath: string;
1696
+ expertId: string;
1697
+ fileMetadataId: string;
1698
+ analyzedAt: string;
1699
+ analysisType: "documentation" | "performance" | "security" | "test_coverage" | "accessibility" | "complexity" | "quality" | "maintainability" | "best_practices";
1700
+ findings: {
1701
+ message: string;
1702
+ severity: "critical" | "high" | "medium" | "low" | "info";
1703
+ id: string;
1704
+ category: string;
1705
+ line?: number | undefined;
1706
+ suggestion?: string | undefined;
1707
+ confidence?: number | undefined;
1708
+ snippet?: string | undefined;
1709
+ fixCode?: string | undefined;
1710
+ }[];
1711
+ metrics?: Record<string, number> | undefined;
1712
+ score?: number | undefined;
1713
+ }, {
1714
+ filePath: string;
1715
+ expertId: string;
1716
+ fileMetadataId: string;
1717
+ analyzedAt: string;
1718
+ analysisType: "documentation" | "performance" | "security" | "test_coverage" | "accessibility" | "complexity" | "quality" | "maintainability" | "best_practices";
1719
+ findings: {
1720
+ message: string;
1721
+ severity: "critical" | "high" | "medium" | "low" | "info";
1722
+ id: string;
1723
+ category: string;
1724
+ line?: number | undefined;
1725
+ suggestion?: string | undefined;
1726
+ confidence?: number | undefined;
1727
+ snippet?: string | undefined;
1728
+ fixCode?: string | undefined;
1729
+ }[];
1730
+ metrics?: Record<string, number> | undefined;
1731
+ score?: number | undefined;
1732
+ }>;
1733
+ CrossProjectRefContentSchema: z.ZodObject<{
1734
+ /** Source project system ID */
1735
+ sourceProject: z.ZodString;
1736
+ /** Source file path */
1737
+ sourceFile: z.ZodString;
1738
+ /** Source symbol */
1739
+ sourceSymbol: z.ZodOptional<z.ZodString>;
1740
+ /** Target project system ID */
1741
+ targetProject: z.ZodString;
1742
+ /** Target file path */
1743
+ targetFile: z.ZodOptional<z.ZodString>;
1744
+ /** Target symbol */
1745
+ targetSymbol: z.ZodOptional<z.ZodString>;
1746
+ /** Reference type */
1747
+ referenceType: z.ZodEnum<["similar_pattern", "shared_dependency", "shared_concept", "api_usage", "design_pattern", "anti_pattern", "best_practice", "duplicate_code"]>;
1748
+ /** Similarity score (0-1) */
1749
+ similarity: z.ZodNumber;
1750
+ /** Description */
1751
+ description: z.ZodString;
1752
+ /** Is bidirectional */
1753
+ bidirectional: z.ZodDefault<z.ZodBoolean>;
1754
+ /** Detected timestamp */
1755
+ detectedAt: z.ZodString;
1756
+ }, "strip", z.ZodTypeAny, {
1757
+ description: string;
1758
+ detectedAt: string;
1759
+ similarity: number;
1760
+ sourceFile: string;
1761
+ sourceProject: string;
1762
+ targetProject: string;
1763
+ referenceType: "similar_pattern" | "shared_dependency" | "shared_concept" | "api_usage" | "design_pattern" | "anti_pattern" | "best_practice" | "duplicate_code";
1764
+ bidirectional: boolean;
1765
+ targetFile?: string | undefined;
1766
+ sourceSymbol?: string | undefined;
1767
+ targetSymbol?: string | undefined;
1768
+ }, {
1769
+ description: string;
1770
+ detectedAt: string;
1771
+ similarity: number;
1772
+ sourceFile: string;
1773
+ sourceProject: string;
1774
+ targetProject: string;
1775
+ referenceType: "similar_pattern" | "shared_dependency" | "shared_concept" | "api_usage" | "design_pattern" | "anti_pattern" | "best_practice" | "duplicate_code";
1776
+ targetFile?: string | undefined;
1777
+ sourceSymbol?: string | undefined;
1778
+ targetSymbol?: string | undefined;
1779
+ bidirectional?: boolean | undefined;
1780
+ }>;
1781
+ IndexRunContentSchema: z.ZodObject<{
1782
+ /** Project ID being indexed */
1783
+ projectId: z.ZodString;
1784
+ /** Index run status */
1785
+ status: z.ZodEnum<["running", "completed", "failed", "cancelled"]>;
1786
+ /** Start timestamp */
1787
+ startedAt: z.ZodString;
1788
+ /** End timestamp */
1789
+ completedAt: z.ZodOptional<z.ZodString>;
1790
+ /** Duration in ms */
1791
+ durationMs: z.ZodOptional<z.ZodNumber>;
1792
+ /** Index depth (quick, standard, thorough) */
1793
+ depth: z.ZodEnum<["quick", "standard", "thorough"]>;
1794
+ /** Statistics */
1795
+ stats: z.ZodObject<{
1796
+ filesScanned: z.ZodNumber;
1797
+ filesIndexed: z.ZodNumber;
1798
+ filesSkipped: z.ZodNumber;
1799
+ filesChanged: z.ZodNumber;
1800
+ symbolsExtracted: z.ZodNumber;
1801
+ dependenciesFound: z.ZodNumber;
1802
+ embeddingsGenerated: z.ZodNumber;
1803
+ errorsEncountered: z.ZodNumber;
1804
+ }, "strip", z.ZodTypeAny, {
1805
+ filesChanged: number;
1806
+ filesScanned: number;
1807
+ filesIndexed: number;
1808
+ filesSkipped: number;
1809
+ symbolsExtracted: number;
1810
+ dependenciesFound: number;
1811
+ embeddingsGenerated: number;
1812
+ errorsEncountered: number;
1813
+ }, {
1814
+ filesChanged: number;
1815
+ filesScanned: number;
1816
+ filesIndexed: number;
1817
+ filesSkipped: number;
1818
+ symbolsExtracted: number;
1819
+ dependenciesFound: number;
1820
+ embeddingsGenerated: number;
1821
+ errorsEncountered: number;
1822
+ }>;
1823
+ /** Errors encountered */
1824
+ errors: z.ZodDefault<z.ZodArray<z.ZodObject<{
1825
+ file: z.ZodString;
1826
+ error: z.ZodString;
1827
+ stack: z.ZodOptional<z.ZodString>;
1828
+ }, "strip", z.ZodTypeAny, {
1829
+ error: string;
1830
+ file: string;
1831
+ stack?: string | undefined;
1832
+ }, {
1833
+ error: string;
1834
+ file: string;
1835
+ stack?: string | undefined;
1836
+ }>, "many">>;
1837
+ /** Paths indexed */
1838
+ paths: z.ZodArray<z.ZodString, "many">;
1839
+ /** Exclude patterns used */
1840
+ excludePatterns: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1841
+ }, "strip", z.ZodTypeAny, {
1842
+ status: "failed" | "completed" | "cancelled" | "running";
1843
+ startedAt: string;
1844
+ stats: {
1845
+ filesChanged: number;
1846
+ filesScanned: number;
1847
+ filesIndexed: number;
1848
+ filesSkipped: number;
1849
+ symbolsExtracted: number;
1850
+ dependenciesFound: number;
1851
+ embeddingsGenerated: number;
1852
+ errorsEncountered: number;
1853
+ };
1854
+ errors: {
1855
+ error: string;
1856
+ file: string;
1857
+ stack?: string | undefined;
1858
+ }[];
1859
+ paths: string[];
1860
+ depth: "quick" | "standard" | "thorough";
1861
+ projectId: string;
1862
+ excludePatterns: string[];
1863
+ completedAt?: string | undefined;
1864
+ durationMs?: number | undefined;
1865
+ }, {
1866
+ status: "failed" | "completed" | "cancelled" | "running";
1867
+ startedAt: string;
1868
+ stats: {
1869
+ filesChanged: number;
1870
+ filesScanned: number;
1871
+ filesIndexed: number;
1872
+ filesSkipped: number;
1873
+ symbolsExtracted: number;
1874
+ dependenciesFound: number;
1875
+ embeddingsGenerated: number;
1876
+ errorsEncountered: number;
1877
+ };
1878
+ paths: string[];
1879
+ depth: "quick" | "standard" | "thorough";
1880
+ projectId: string;
1881
+ completedAt?: string | undefined;
1882
+ durationMs?: number | undefined;
1883
+ errors?: {
1884
+ error: string;
1885
+ file: string;
1886
+ stack?: string | undefined;
1887
+ }[] | undefined;
1888
+ excludePatterns?: string[] | undefined;
1889
+ }>;
1890
+ createFileMetadata: typeof createFileMetadata;
1891
+ createCodeStructure: typeof createCodeStructure;
1892
+ createCodeDependency: typeof createCodeDependency;
1893
+ createIndexRun: typeof createIndexRun;
1894
+ detectLanguage: typeof detectLanguage;
1895
+ isTestFile: typeof isTestFile;
1896
+ isTypeDefinitionFile: typeof isTypeDefinitionFile;
1897
+ };
1898
+ export default _default;
1899
+ //# sourceMappingURL=codewiki-types.d.ts.map