@easbot/codebase 0.3.28 → 0.3.32

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 (76) hide show
  1. package/README.en.md +55 -1
  2. package/README.md +55 -1
  3. package/dist/chunks/cache-D7NVUXB2.mjs +1 -0
  4. package/dist/chunks/cache-LSQZJEDR.cjs +1 -0
  5. package/dist/chunks/chunk-33DIOGLJ.mjs +158 -0
  6. package/dist/chunks/chunk-37KKG3UK.mjs +48 -0
  7. package/dist/chunks/chunk-43WAI4Z7.mjs +1 -0
  8. package/dist/chunks/chunk-CLUGDJA5.cjs +62 -0
  9. package/dist/chunks/chunk-EH2QTB6S.cjs +37 -0
  10. package/dist/chunks/chunk-ESA2CL57.mjs +37 -0
  11. package/dist/chunks/chunk-ETCTXAXR.mjs +1 -0
  12. package/dist/chunks/chunk-H4VZF3ZQ.mjs +1 -0
  13. package/dist/chunks/chunk-J7Z3MIR7.cjs +1 -0
  14. package/dist/chunks/chunk-JEHVBEBS.cjs +1 -0
  15. package/dist/chunks/chunk-KFESJR3T.cjs +1 -0
  16. package/dist/chunks/chunk-KR6BQNY6.mjs +203 -0
  17. package/dist/chunks/chunk-KTSR5VPT.mjs +1 -0
  18. package/dist/chunks/chunk-OJK5EFPD.cjs +48 -0
  19. package/dist/chunks/chunk-OZYQQS63.cjs +158 -0
  20. package/dist/chunks/chunk-PRPBK7D6.mjs +62 -0
  21. package/dist/chunks/chunk-T6KJWYTV.mjs +1 -0
  22. package/dist/chunks/chunk-TBDAGLC4.cjs +203 -0
  23. package/dist/chunks/chunk-TMQVJU4I.mjs +1 -0
  24. package/dist/chunks/chunk-VZCOLSBF.cjs +1 -0
  25. package/dist/chunks/chunk-W5SMGCKO.cjs +1 -0
  26. package/dist/chunks/chunk-Y7JDLK56.cjs +1 -0
  27. package/dist/chunks/cli-handler-IQ6ZNLEJ.mjs +1 -0
  28. package/dist/chunks/cli-handler-WTEPKO4E.cjs +1 -0
  29. package/dist/chunks/code-base-5BXR4FUU.cjs +1 -0
  30. package/dist/chunks/code-base-M4EMTQTG.mjs +1 -0
  31. package/dist/chunks/database-manager-KM7BOISA.mjs +1 -0
  32. package/dist/chunks/database-manager-LTHK7MM6.cjs +1 -0
  33. package/dist/chunks/file-watcher-2MUX5MO5.cjs +1 -0
  34. package/dist/chunks/file-watcher-ABFT22GS.mjs +1 -0
  35. package/dist/chunks/{interfaces-DPFLQBQ6.mjs → interfaces-43SSCG3E.mjs} +1 -1
  36. package/dist/chunks/interfaces-LUHDPZOT.cjs +1 -0
  37. package/dist/chunks/llm-S6D5ICOO.cjs +1 -0
  38. package/dist/chunks/llm-WS3XKT46.mjs +1 -0
  39. package/dist/chunks/stdio-server-KA3JQB7C.cjs +30 -0
  40. package/dist/chunks/stdio-server-QP63TXGI.mjs +30 -0
  41. package/dist/cli.cjs +1 -1
  42. package/dist/cli.mjs +1 -1
  43. package/dist/index.cjs +1 -1
  44. package/dist/index.d.cts +1215 -89
  45. package/dist/index.d.ts +1215 -89
  46. package/dist/index.mjs +1 -1
  47. package/package.json +9 -10
  48. package/dist/chunks/chunk-2YMB6W5S.mjs +0 -1
  49. package/dist/chunks/chunk-34CU2EU4.mjs +0 -1
  50. package/dist/chunks/chunk-4HJ7RFP7.cjs +0 -1
  51. package/dist/chunks/chunk-4TCNRCEK.mjs +0 -48
  52. package/dist/chunks/chunk-7CL37IYG.mjs +0 -158
  53. package/dist/chunks/chunk-7N7UVPKB.cjs +0 -48
  54. package/dist/chunks/chunk-GWCRGM4D.mjs +0 -51
  55. package/dist/chunks/chunk-ICEJ23S3.mjs +0 -203
  56. package/dist/chunks/chunk-JCJFUUU2.cjs +0 -203
  57. package/dist/chunks/chunk-JVX6PHPN.cjs +0 -1
  58. package/dist/chunks/chunk-M2YU5LAI.cjs +0 -1
  59. package/dist/chunks/chunk-TGCR6O3S.cjs +0 -62
  60. package/dist/chunks/chunk-UHNJOT5S.cjs +0 -158
  61. package/dist/chunks/chunk-VPWALTY7.cjs +0 -51
  62. package/dist/chunks/chunk-WRM2FP4O.mjs +0 -62
  63. package/dist/chunks/chunk-ZPEE2LSX.mjs +0 -1
  64. package/dist/chunks/cli-handler-DXLDGJFQ.mjs +0 -1
  65. package/dist/chunks/cli-handler-KKNIISIE.cjs +0 -1
  66. package/dist/chunks/code-base-BFLIOZXA.cjs +0 -1
  67. package/dist/chunks/code-base-DMVLROV6.mjs +0 -1
  68. package/dist/chunks/database-manager-GT3LOQUV.cjs +0 -1
  69. package/dist/chunks/database-manager-N5WLNG3F.mjs +0 -1
  70. package/dist/chunks/file-watcher-QS442D52.cjs +0 -1
  71. package/dist/chunks/file-watcher-X56TEWNY.mjs +0 -1
  72. package/dist/chunks/interfaces-YX56SVRQ.cjs +0 -1
  73. package/dist/chunks/llm-ADBGTSCV.mjs +0 -1
  74. package/dist/chunks/llm-BDMNIGOH.cjs +0 -1
  75. package/dist/chunks/stdio-server-4X7YFQA2.mjs +0 -30
  76. package/dist/chunks/stdio-server-5UQVBBZP.cjs +0 -30
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import { KnowledgeSearchOptions, SearchConfig, BaseSearchResult, KnowledgeLlmStatus, CodebaseKnowledgeConfigWithModels, CodebaseKnowledgeConfig, IGlobal, IInstance } from '@easbot/types';
2
2
  export { CodebaseKnowledgeConfig, CodebaseKnowledgeConfigWithModels, SyncConfig } from '@easbot/types';
3
+ import z$1, { z } from 'zod';
3
4
  import { EmbeddingModelV3 } from '@ai-sdk/provider';
4
5
  export { EmbeddingModelV3 as EmbeddingModel } from '@ai-sdk/provider';
5
- import { LanguageModel, EmbeddingModel } from 'ai';
6
- import { ILLMInitConfig, ILLMCapabilities, ILLM } from '@easbot/llm';
6
+ import { ILLMInitConfig, ILLMCapabilities, LanguageModelRef, EmbeddingModelRef, ILLM } from '@easbot/llm';
7
+ export { ServiceError, ServiceError as ServiceErrorInstance } from '@easbot/utils';
7
8
 
8
9
  type IndexState = 'uninitialized' | 'indexing' | 'complete' | 'partial' | 'failed' | 'stale';
9
10
  interface FtsSearchResult {
@@ -255,6 +256,7 @@ interface SearchOptions extends KnowledgeSearchOptions {
255
256
  filePath?: string;
256
257
  astType?: string;
257
258
  enableFts?: boolean;
259
+ snippetMaxChars?: number;
258
260
  includeEdges?: boolean;
259
261
  edgesLimit?: number;
260
262
  embedding?: EmbeddingModelV3;
@@ -300,8 +302,39 @@ declare class QueryInterface {
300
302
  }
301
303
  declare function createQueryInterface(db: DatabaseManager): QueryInterface;
302
304
 
305
+ type Language = 'ts' | 'tsx' | 'js' | 'jsx' | 'mjs' | 'cjs' | 'py' | 'rs' | 'go' | 'c' | 'cpp' | 'cc' | 'cxx' | 'h' | 'hpp' | 'cs' | 'csharp' | 'java' | 'scala' | 'kt' | 'kts' | 'rb' | 'ruby' | 'php' | 'swift' | 'm' | 'mm' | 'zig';
306
+ declare const DEFAULT_EMBEDDING_CONFIG: {
307
+ readonly provider: "easbot-local";
308
+ readonly model: "bge-base-zh-v1.5";
309
+ readonly batchSize: 32;
310
+ };
311
+ declare const DEFAULT_INDEXER_CONFIG: {
312
+ readonly batchSize: 50;
313
+ readonly ignorePatterns: readonly ["node_modules/**", "dist/**", "build/**", ".git/**", "__pycache__/**", "*.min.js", "*.min.ts"];
314
+ readonly incremental: true;
315
+ };
316
+ declare const DEFAULT_PARSER_CONFIG: {
317
+ languages: readonly Language[];
318
+ lazyLoad: boolean;
319
+ };
320
+ declare const DEFAULT_TOKENIZER_CONFIG: {
321
+ readonly dictPath: readonly [];
322
+ };
323
+ declare const CodebaseJsonSchema: z.ZodObject<{
324
+ version: z.ZodOptional<z.ZodLiteral<1>>;
325
+ schema_version: z.ZodOptional<z.ZodNumber>;
326
+ extraction_version: z.ZodOptional<z.ZodNumber>;
327
+ index_state: z.ZodOptional<z.ZodString>;
328
+ backend: z.ZodOptional<z.ZodString>;
329
+ created_at: z.ZodOptional<z.ZodString>;
330
+ embedding_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
331
+ evaluation_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
+ evaluation_threshold: z.ZodOptional<z.ZodNumber>;
333
+ }, z.core.$loose>;
334
+ type CodebaseJson = z.infer<typeof CodebaseJsonSchema>;
335
+ declare const DEFAULT_CODEBASE_JSON: CodebaseJson;
336
+
303
337
  type CodebaseConfig = CodebaseKnowledgeConfigWithModels;
304
- type Language = 'ts' | 'tsx' | 'js' | 'py' | 'rs' | 'go' | 'c' | 'cpp' | 'csharp' | 'java' | 'scala' | 'ruby' | 'php' | 'zig';
305
338
  declare const FILE_EXTENSION_MAP: Record<string, Language>;
306
339
  type RelationType = 'CONTAINS' | 'CALLS' | 'IMPORTS' | 'TYPE_REFERENCES' | 'ANNOTATES' | 'EXTENDS' | 'IMPLEMENTS' | 'HAS_METHOD' | 'HAS_PROPERTY' | 'METHOD_OVERRIDES';
307
340
  type ASTNodeType = 'class_declaration' | 'function_declaration' | 'method_declaration' | 'method_definition' | 'variable_declaration' | 'import_declaration' | 'import_statement' | 'interface_declaration' | 'type_alias_declaration' | 'enum_declaration' | 'struct_item' | 'impl_item' | 'trait_item' | 'function_definition' | 'function_item' | 'class_definition' | 'module' | 'identifier' | 'type_identifier' | 'property_identifier' | 'field_identifier' | 'call_expression' | 'new_expression' | 'member_expression' | 'assignment_expression' | 'binary_expression' | 'unary_expression' | 'arrow_function' | 'function_expression' | 'lexical_declaration' | 'variable_declarator' | 'formal_parameters' | 'parameter' | 'required_parameter' | 'optional_parameter' | 'rest_parameter' | 'object_type' | 'array_type' | 'union_type' | 'intersection_type' | 'literal_type' | 'generic_type' | 'named_imports' | 'import_clause' | 'export_statement' | 'export_clause' | 'decorator' | 'attribute_item' | 'macro_definition' | 'macro_invocation' | 'namespace_definition' | 'using_directive' | 'class_heredoc' | 'trait_adaptations' | 'namespace_declaration' | 'define_directive' | 'preproc_if' | 'preproc_function_def';
@@ -490,68 +523,1151 @@ interface ICodebase {
490
523
  getQuery(): QueryInterface;
491
524
  }
492
525
 
493
- declare class ParserError extends Error {
494
- readonly name = "ParserError";
495
- readonly filePath: string;
496
- readonly cause?: Error;
497
- constructor(message: string, filePath: string, cause?: Error);
498
- toString(): string;
499
- toJSON(): Record<string, unknown>;
500
- }
501
- declare class DatabaseError extends Error {
502
- readonly name = "DatabaseError";
503
- readonly operation: string;
504
- readonly cause?: Error;
505
- constructor(message: string, operation: string, cause?: Error);
506
- toString(): string;
507
- toJSON(): Record<string, unknown>;
508
- }
509
- declare class FileSystemError extends Error {
510
- readonly name = "FileSystemError";
511
- readonly filePath: string;
512
- readonly cause?: Error;
513
- constructor(message: string, filePath: string, cause?: Error);
514
- toString(): string;
515
- toJSON(): Record<string, unknown>;
516
- }
517
- declare class SchemaError extends Error {
518
- readonly name = "SchemaError";
519
- readonly missing?: string[];
520
- constructor(message: string, missing?: string[]);
521
- toString(): string;
522
- toJSON(): Record<string, unknown>;
523
- }
524
- declare class ConfigError extends Error {
525
- readonly name = "ConfigError";
526
- readonly field?: string;
527
- constructor(message: string, field?: string);
528
- toString(): string;
529
- toJSON(): Record<string, unknown>;
530
- }
531
- declare class IndexError extends Error {
532
- readonly name = "IndexError";
533
- readonly filePath?: string;
534
- readonly cause?: Error;
535
- constructor(message: string, filePath?: string, cause?: Error);
536
- toString(): string;
537
- toJSON(): Record<string, unknown>;
538
- }
539
- declare class QueryError extends Error {
540
- readonly name = "QueryError";
541
- readonly params?: Record<string, unknown>;
542
- readonly cause?: Error;
543
- constructor(message: string, params?: Record<string, unknown>, cause?: Error);
544
- toString(): string;
545
- toJSON(): Record<string, unknown>;
546
- }
547
- declare class UnsupportedLanguageError extends Error {
548
- readonly name = "UnsupportedLanguageError";
549
- readonly extension: string;
550
- readonly filePath: string;
551
- constructor(extension: string, filePath: string);
552
- toString(): string;
553
- toJSON(): Record<string, unknown>;
526
+ declare namespace CodebaseError {
527
+ const ParserError: {
528
+ new (data: {
529
+ message: string;
530
+ filePath: string;
531
+ }, options?: ErrorOptions): {
532
+ readonly name: "CodebaseParserError";
533
+ readonly message: string;
534
+ readonly data: {
535
+ message: string;
536
+ filePath: string;
537
+ };
538
+ schema(): z$1.ZodObject<{
539
+ name: z$1.ZodLiteral<"CodebaseParserError">;
540
+ data: z$1.ZodObject<{
541
+ message: z$1.ZodString;
542
+ filePath: z$1.ZodString;
543
+ }, z$1.core.$strip>;
544
+ }, z$1.core.$strip>;
545
+ toObject(): {
546
+ name: "CodebaseParserError";
547
+ data: {
548
+ message: string;
549
+ filePath: string;
550
+ };
551
+ };
552
+ stack?: string;
553
+ cause?: unknown;
554
+ };
555
+ readonly Schema: z$1.ZodObject<{
556
+ name: z$1.ZodLiteral<"CodebaseParserError">;
557
+ data: z$1.ZodObject<{
558
+ message: z$1.ZodString;
559
+ filePath: z$1.ZodString;
560
+ }, z$1.core.$strip>;
561
+ }, z$1.core.$strip>;
562
+ isInstance(input: any): input is InstanceType<any>;
563
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
564
+ readonly Unknown: {
565
+ new (data: {
566
+ message: string;
567
+ }, options?: ErrorOptions): {
568
+ readonly name: "UnknownError";
569
+ readonly message: string;
570
+ readonly data: {
571
+ message: string;
572
+ };
573
+ schema(): z$1.ZodObject<{
574
+ name: z$1.ZodLiteral<"UnknownError">;
575
+ data: z$1.ZodObject<{
576
+ message: z$1.ZodString;
577
+ }, z$1.core.$strip>;
578
+ }, z$1.core.$strip>;
579
+ toObject(): {
580
+ name: "UnknownError";
581
+ data: {
582
+ message: string;
583
+ };
584
+ };
585
+ stack?: string;
586
+ cause?: unknown;
587
+ };
588
+ readonly Schema: z$1.ZodObject<{
589
+ name: z$1.ZodLiteral<"UnknownError">;
590
+ data: z$1.ZodObject<{
591
+ message: z$1.ZodString;
592
+ }, z$1.core.$strip>;
593
+ }, z$1.core.$strip>;
594
+ isInstance(input: any): input is {
595
+ readonly name: "UnknownError";
596
+ readonly message: string;
597
+ readonly data: {
598
+ message: string;
599
+ };
600
+ schema(): z$1.ZodObject<{
601
+ name: z$1.ZodLiteral<"UnknownError">;
602
+ data: z$1.ZodObject<{
603
+ message: z$1.ZodString;
604
+ }, z$1.core.$strip>;
605
+ }, z$1.core.$strip>;
606
+ toObject(): {
607
+ name: "UnknownError";
608
+ data: {
609
+ message: string;
610
+ };
611
+ };
612
+ stack?: string;
613
+ cause?: unknown;
614
+ };
615
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
616
+ readonly Unknown: any;
617
+ isError(error: unknown): error is Error;
618
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
619
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
620
+ stackTraceLimit: number;
621
+ };
622
+ isError(error: unknown): error is Error;
623
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
624
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
625
+ stackTraceLimit: number;
626
+ };
627
+ const DatabaseError: {
628
+ new (data: {
629
+ message: string;
630
+ operation: string;
631
+ }, options?: ErrorOptions): {
632
+ readonly name: "CodebaseDatabaseError";
633
+ readonly message: string;
634
+ readonly data: {
635
+ message: string;
636
+ operation: string;
637
+ };
638
+ schema(): z$1.ZodObject<{
639
+ name: z$1.ZodLiteral<"CodebaseDatabaseError">;
640
+ data: z$1.ZodObject<{
641
+ message: z$1.ZodString;
642
+ operation: z$1.ZodString;
643
+ }, z$1.core.$strip>;
644
+ }, z$1.core.$strip>;
645
+ toObject(): {
646
+ name: "CodebaseDatabaseError";
647
+ data: {
648
+ message: string;
649
+ operation: string;
650
+ };
651
+ };
652
+ stack?: string;
653
+ cause?: unknown;
654
+ };
655
+ readonly Schema: z$1.ZodObject<{
656
+ name: z$1.ZodLiteral<"CodebaseDatabaseError">;
657
+ data: z$1.ZodObject<{
658
+ message: z$1.ZodString;
659
+ operation: z$1.ZodString;
660
+ }, z$1.core.$strip>;
661
+ }, z$1.core.$strip>;
662
+ isInstance(input: any): input is InstanceType<any>;
663
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
664
+ readonly Unknown: {
665
+ new (data: {
666
+ message: string;
667
+ }, options?: ErrorOptions): {
668
+ readonly name: "UnknownError";
669
+ readonly message: string;
670
+ readonly data: {
671
+ message: string;
672
+ };
673
+ schema(): z$1.ZodObject<{
674
+ name: z$1.ZodLiteral<"UnknownError">;
675
+ data: z$1.ZodObject<{
676
+ message: z$1.ZodString;
677
+ }, z$1.core.$strip>;
678
+ }, z$1.core.$strip>;
679
+ toObject(): {
680
+ name: "UnknownError";
681
+ data: {
682
+ message: string;
683
+ };
684
+ };
685
+ stack?: string;
686
+ cause?: unknown;
687
+ };
688
+ readonly Schema: z$1.ZodObject<{
689
+ name: z$1.ZodLiteral<"UnknownError">;
690
+ data: z$1.ZodObject<{
691
+ message: z$1.ZodString;
692
+ }, z$1.core.$strip>;
693
+ }, z$1.core.$strip>;
694
+ isInstance(input: any): input is {
695
+ readonly name: "UnknownError";
696
+ readonly message: string;
697
+ readonly data: {
698
+ message: string;
699
+ };
700
+ schema(): z$1.ZodObject<{
701
+ name: z$1.ZodLiteral<"UnknownError">;
702
+ data: z$1.ZodObject<{
703
+ message: z$1.ZodString;
704
+ }, z$1.core.$strip>;
705
+ }, z$1.core.$strip>;
706
+ toObject(): {
707
+ name: "UnknownError";
708
+ data: {
709
+ message: string;
710
+ };
711
+ };
712
+ stack?: string;
713
+ cause?: unknown;
714
+ };
715
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
716
+ readonly Unknown: any;
717
+ isError(error: unknown): error is Error;
718
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
719
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
720
+ stackTraceLimit: number;
721
+ };
722
+ isError(error: unknown): error is Error;
723
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
724
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
725
+ stackTraceLimit: number;
726
+ };
727
+ const SchemaError: {
728
+ new (data: {
729
+ message: string;
730
+ missing?: string[] | undefined;
731
+ }, options?: ErrorOptions): {
732
+ readonly name: "CodebaseSchemaError";
733
+ readonly message: string;
734
+ readonly data: {
735
+ message: string;
736
+ missing?: string[] | undefined;
737
+ };
738
+ schema(): z$1.ZodObject<{
739
+ name: z$1.ZodLiteral<"CodebaseSchemaError">;
740
+ data: z$1.ZodObject<{
741
+ message: z$1.ZodString;
742
+ missing: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
743
+ }, z$1.core.$strip>;
744
+ }, z$1.core.$strip>;
745
+ toObject(): {
746
+ name: "CodebaseSchemaError";
747
+ data: {
748
+ message: string;
749
+ missing?: string[] | undefined;
750
+ };
751
+ };
752
+ stack?: string;
753
+ cause?: unknown;
754
+ };
755
+ readonly Schema: z$1.ZodObject<{
756
+ name: z$1.ZodLiteral<"CodebaseSchemaError">;
757
+ data: z$1.ZodObject<{
758
+ message: z$1.ZodString;
759
+ missing: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
760
+ }, z$1.core.$strip>;
761
+ }, z$1.core.$strip>;
762
+ isInstance(input: any): input is InstanceType<any>;
763
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
764
+ readonly Unknown: {
765
+ new (data: {
766
+ message: string;
767
+ }, options?: ErrorOptions): {
768
+ readonly name: "UnknownError";
769
+ readonly message: string;
770
+ readonly data: {
771
+ message: string;
772
+ };
773
+ schema(): z$1.ZodObject<{
774
+ name: z$1.ZodLiteral<"UnknownError">;
775
+ data: z$1.ZodObject<{
776
+ message: z$1.ZodString;
777
+ }, z$1.core.$strip>;
778
+ }, z$1.core.$strip>;
779
+ toObject(): {
780
+ name: "UnknownError";
781
+ data: {
782
+ message: string;
783
+ };
784
+ };
785
+ stack?: string;
786
+ cause?: unknown;
787
+ };
788
+ readonly Schema: z$1.ZodObject<{
789
+ name: z$1.ZodLiteral<"UnknownError">;
790
+ data: z$1.ZodObject<{
791
+ message: z$1.ZodString;
792
+ }, z$1.core.$strip>;
793
+ }, z$1.core.$strip>;
794
+ isInstance(input: any): input is {
795
+ readonly name: "UnknownError";
796
+ readonly message: string;
797
+ readonly data: {
798
+ message: string;
799
+ };
800
+ schema(): z$1.ZodObject<{
801
+ name: z$1.ZodLiteral<"UnknownError">;
802
+ data: z$1.ZodObject<{
803
+ message: z$1.ZodString;
804
+ }, z$1.core.$strip>;
805
+ }, z$1.core.$strip>;
806
+ toObject(): {
807
+ name: "UnknownError";
808
+ data: {
809
+ message: string;
810
+ };
811
+ };
812
+ stack?: string;
813
+ cause?: unknown;
814
+ };
815
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
816
+ readonly Unknown: any;
817
+ isError(error: unknown): error is Error;
818
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
819
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
820
+ stackTraceLimit: number;
821
+ };
822
+ isError(error: unknown): error is Error;
823
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
824
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
825
+ stackTraceLimit: number;
826
+ };
827
+ const FileSystemError: {
828
+ new (data: {
829
+ message: string;
830
+ filePath: string;
831
+ }, options?: ErrorOptions): {
832
+ readonly name: "CodebaseFileSystemError";
833
+ readonly message: string;
834
+ readonly data: {
835
+ message: string;
836
+ filePath: string;
837
+ };
838
+ schema(): z$1.ZodObject<{
839
+ name: z$1.ZodLiteral<"CodebaseFileSystemError">;
840
+ data: z$1.ZodObject<{
841
+ message: z$1.ZodString;
842
+ filePath: z$1.ZodString;
843
+ }, z$1.core.$strip>;
844
+ }, z$1.core.$strip>;
845
+ toObject(): {
846
+ name: "CodebaseFileSystemError";
847
+ data: {
848
+ message: string;
849
+ filePath: string;
850
+ };
851
+ };
852
+ stack?: string;
853
+ cause?: unknown;
854
+ };
855
+ readonly Schema: z$1.ZodObject<{
856
+ name: z$1.ZodLiteral<"CodebaseFileSystemError">;
857
+ data: z$1.ZodObject<{
858
+ message: z$1.ZodString;
859
+ filePath: z$1.ZodString;
860
+ }, z$1.core.$strip>;
861
+ }, z$1.core.$strip>;
862
+ isInstance(input: any): input is InstanceType<any>;
863
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
864
+ readonly Unknown: {
865
+ new (data: {
866
+ message: string;
867
+ }, options?: ErrorOptions): {
868
+ readonly name: "UnknownError";
869
+ readonly message: string;
870
+ readonly data: {
871
+ message: string;
872
+ };
873
+ schema(): z$1.ZodObject<{
874
+ name: z$1.ZodLiteral<"UnknownError">;
875
+ data: z$1.ZodObject<{
876
+ message: z$1.ZodString;
877
+ }, z$1.core.$strip>;
878
+ }, z$1.core.$strip>;
879
+ toObject(): {
880
+ name: "UnknownError";
881
+ data: {
882
+ message: string;
883
+ };
884
+ };
885
+ stack?: string;
886
+ cause?: unknown;
887
+ };
888
+ readonly Schema: z$1.ZodObject<{
889
+ name: z$1.ZodLiteral<"UnknownError">;
890
+ data: z$1.ZodObject<{
891
+ message: z$1.ZodString;
892
+ }, z$1.core.$strip>;
893
+ }, z$1.core.$strip>;
894
+ isInstance(input: any): input is {
895
+ readonly name: "UnknownError";
896
+ readonly message: string;
897
+ readonly data: {
898
+ message: string;
899
+ };
900
+ schema(): z$1.ZodObject<{
901
+ name: z$1.ZodLiteral<"UnknownError">;
902
+ data: z$1.ZodObject<{
903
+ message: z$1.ZodString;
904
+ }, z$1.core.$strip>;
905
+ }, z$1.core.$strip>;
906
+ toObject(): {
907
+ name: "UnknownError";
908
+ data: {
909
+ message: string;
910
+ };
911
+ };
912
+ stack?: string;
913
+ cause?: unknown;
914
+ };
915
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
916
+ readonly Unknown: any;
917
+ isError(error: unknown): error is Error;
918
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
919
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
920
+ stackTraceLimit: number;
921
+ };
922
+ isError(error: unknown): error is Error;
923
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
924
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
925
+ stackTraceLimit: number;
926
+ };
927
+ const IndexError: {
928
+ new (data: {
929
+ message: string;
930
+ filePath?: string | undefined;
931
+ }, options?: ErrorOptions): {
932
+ readonly name: "CodebaseIndexError";
933
+ readonly message: string;
934
+ readonly data: {
935
+ message: string;
936
+ filePath?: string | undefined;
937
+ };
938
+ schema(): z$1.ZodObject<{
939
+ name: z$1.ZodLiteral<"CodebaseIndexError">;
940
+ data: z$1.ZodObject<{
941
+ message: z$1.ZodString;
942
+ filePath: z$1.ZodOptional<z$1.ZodString>;
943
+ }, z$1.core.$strip>;
944
+ }, z$1.core.$strip>;
945
+ toObject(): {
946
+ name: "CodebaseIndexError";
947
+ data: {
948
+ message: string;
949
+ filePath?: string | undefined;
950
+ };
951
+ };
952
+ stack?: string;
953
+ cause?: unknown;
954
+ };
955
+ readonly Schema: z$1.ZodObject<{
956
+ name: z$1.ZodLiteral<"CodebaseIndexError">;
957
+ data: z$1.ZodObject<{
958
+ message: z$1.ZodString;
959
+ filePath: z$1.ZodOptional<z$1.ZodString>;
960
+ }, z$1.core.$strip>;
961
+ }, z$1.core.$strip>;
962
+ isInstance(input: any): input is InstanceType<any>;
963
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
964
+ readonly Unknown: {
965
+ new (data: {
966
+ message: string;
967
+ }, options?: ErrorOptions): {
968
+ readonly name: "UnknownError";
969
+ readonly message: string;
970
+ readonly data: {
971
+ message: string;
972
+ };
973
+ schema(): z$1.ZodObject<{
974
+ name: z$1.ZodLiteral<"UnknownError">;
975
+ data: z$1.ZodObject<{
976
+ message: z$1.ZodString;
977
+ }, z$1.core.$strip>;
978
+ }, z$1.core.$strip>;
979
+ toObject(): {
980
+ name: "UnknownError";
981
+ data: {
982
+ message: string;
983
+ };
984
+ };
985
+ stack?: string;
986
+ cause?: unknown;
987
+ };
988
+ readonly Schema: z$1.ZodObject<{
989
+ name: z$1.ZodLiteral<"UnknownError">;
990
+ data: z$1.ZodObject<{
991
+ message: z$1.ZodString;
992
+ }, z$1.core.$strip>;
993
+ }, z$1.core.$strip>;
994
+ isInstance(input: any): input is {
995
+ readonly name: "UnknownError";
996
+ readonly message: string;
997
+ readonly data: {
998
+ message: string;
999
+ };
1000
+ schema(): z$1.ZodObject<{
1001
+ name: z$1.ZodLiteral<"UnknownError">;
1002
+ data: z$1.ZodObject<{
1003
+ message: z$1.ZodString;
1004
+ }, z$1.core.$strip>;
1005
+ }, z$1.core.$strip>;
1006
+ toObject(): {
1007
+ name: "UnknownError";
1008
+ data: {
1009
+ message: string;
1010
+ };
1011
+ };
1012
+ stack?: string;
1013
+ cause?: unknown;
1014
+ };
1015
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1016
+ readonly Unknown: any;
1017
+ isError(error: unknown): error is Error;
1018
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1019
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1020
+ stackTraceLimit: number;
1021
+ };
1022
+ isError(error: unknown): error is Error;
1023
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1024
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1025
+ stackTraceLimit: number;
1026
+ };
1027
+ const ConfigError: {
1028
+ new (data: {
1029
+ message: string;
1030
+ field?: string | undefined;
1031
+ }, options?: ErrorOptions): {
1032
+ readonly name: "CodebaseConfigError";
1033
+ readonly message: string;
1034
+ readonly data: {
1035
+ message: string;
1036
+ field?: string | undefined;
1037
+ };
1038
+ schema(): z$1.ZodObject<{
1039
+ name: z$1.ZodLiteral<"CodebaseConfigError">;
1040
+ data: z$1.ZodObject<{
1041
+ message: z$1.ZodString;
1042
+ field: z$1.ZodOptional<z$1.ZodString>;
1043
+ }, z$1.core.$strip>;
1044
+ }, z$1.core.$strip>;
1045
+ toObject(): {
1046
+ name: "CodebaseConfigError";
1047
+ data: {
1048
+ message: string;
1049
+ field?: string | undefined;
1050
+ };
1051
+ };
1052
+ stack?: string;
1053
+ cause?: unknown;
1054
+ };
1055
+ readonly Schema: z$1.ZodObject<{
1056
+ name: z$1.ZodLiteral<"CodebaseConfigError">;
1057
+ data: z$1.ZodObject<{
1058
+ message: z$1.ZodString;
1059
+ field: z$1.ZodOptional<z$1.ZodString>;
1060
+ }, z$1.core.$strip>;
1061
+ }, z$1.core.$strip>;
1062
+ isInstance(input: any): input is InstanceType<any>;
1063
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1064
+ readonly Unknown: {
1065
+ new (data: {
1066
+ message: string;
1067
+ }, options?: ErrorOptions): {
1068
+ readonly name: "UnknownError";
1069
+ readonly message: string;
1070
+ readonly data: {
1071
+ message: string;
1072
+ };
1073
+ schema(): z$1.ZodObject<{
1074
+ name: z$1.ZodLiteral<"UnknownError">;
1075
+ data: z$1.ZodObject<{
1076
+ message: z$1.ZodString;
1077
+ }, z$1.core.$strip>;
1078
+ }, z$1.core.$strip>;
1079
+ toObject(): {
1080
+ name: "UnknownError";
1081
+ data: {
1082
+ message: string;
1083
+ };
1084
+ };
1085
+ stack?: string;
1086
+ cause?: unknown;
1087
+ };
1088
+ readonly Schema: z$1.ZodObject<{
1089
+ name: z$1.ZodLiteral<"UnknownError">;
1090
+ data: z$1.ZodObject<{
1091
+ message: z$1.ZodString;
1092
+ }, z$1.core.$strip>;
1093
+ }, z$1.core.$strip>;
1094
+ isInstance(input: any): input is {
1095
+ readonly name: "UnknownError";
1096
+ readonly message: string;
1097
+ readonly data: {
1098
+ message: string;
1099
+ };
1100
+ schema(): z$1.ZodObject<{
1101
+ name: z$1.ZodLiteral<"UnknownError">;
1102
+ data: z$1.ZodObject<{
1103
+ message: z$1.ZodString;
1104
+ }, z$1.core.$strip>;
1105
+ }, z$1.core.$strip>;
1106
+ toObject(): {
1107
+ name: "UnknownError";
1108
+ data: {
1109
+ message: string;
1110
+ };
1111
+ };
1112
+ stack?: string;
1113
+ cause?: unknown;
1114
+ };
1115
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1116
+ readonly Unknown: any;
1117
+ isError(error: unknown): error is Error;
1118
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1119
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1120
+ stackTraceLimit: number;
1121
+ };
1122
+ isError(error: unknown): error is Error;
1123
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1124
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1125
+ stackTraceLimit: number;
1126
+ };
1127
+ const QueryError: {
1128
+ new (data: {
1129
+ message: string;
1130
+ params?: Record<string, unknown> | undefined;
1131
+ }, options?: ErrorOptions): {
1132
+ readonly name: "CodebaseQueryError";
1133
+ readonly message: string;
1134
+ readonly data: {
1135
+ message: string;
1136
+ params?: Record<string, unknown> | undefined;
1137
+ };
1138
+ schema(): z$1.ZodObject<{
1139
+ name: z$1.ZodLiteral<"CodebaseQueryError">;
1140
+ data: z$1.ZodObject<{
1141
+ message: z$1.ZodString;
1142
+ params: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
1143
+ }, z$1.core.$strip>;
1144
+ }, z$1.core.$strip>;
1145
+ toObject(): {
1146
+ name: "CodebaseQueryError";
1147
+ data: {
1148
+ message: string;
1149
+ params?: Record<string, unknown> | undefined;
1150
+ };
1151
+ };
1152
+ stack?: string;
1153
+ cause?: unknown;
1154
+ };
1155
+ readonly Schema: z$1.ZodObject<{
1156
+ name: z$1.ZodLiteral<"CodebaseQueryError">;
1157
+ data: z$1.ZodObject<{
1158
+ message: z$1.ZodString;
1159
+ params: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
1160
+ }, z$1.core.$strip>;
1161
+ }, z$1.core.$strip>;
1162
+ isInstance(input: any): input is InstanceType<any>;
1163
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1164
+ readonly Unknown: {
1165
+ new (data: {
1166
+ message: string;
1167
+ }, options?: ErrorOptions): {
1168
+ readonly name: "UnknownError";
1169
+ readonly message: string;
1170
+ readonly data: {
1171
+ message: string;
1172
+ };
1173
+ schema(): z$1.ZodObject<{
1174
+ name: z$1.ZodLiteral<"UnknownError">;
1175
+ data: z$1.ZodObject<{
1176
+ message: z$1.ZodString;
1177
+ }, z$1.core.$strip>;
1178
+ }, z$1.core.$strip>;
1179
+ toObject(): {
1180
+ name: "UnknownError";
1181
+ data: {
1182
+ message: string;
1183
+ };
1184
+ };
1185
+ stack?: string;
1186
+ cause?: unknown;
1187
+ };
1188
+ readonly Schema: z$1.ZodObject<{
1189
+ name: z$1.ZodLiteral<"UnknownError">;
1190
+ data: z$1.ZodObject<{
1191
+ message: z$1.ZodString;
1192
+ }, z$1.core.$strip>;
1193
+ }, z$1.core.$strip>;
1194
+ isInstance(input: any): input is {
1195
+ readonly name: "UnknownError";
1196
+ readonly message: string;
1197
+ readonly data: {
1198
+ message: string;
1199
+ };
1200
+ schema(): z$1.ZodObject<{
1201
+ name: z$1.ZodLiteral<"UnknownError">;
1202
+ data: z$1.ZodObject<{
1203
+ message: z$1.ZodString;
1204
+ }, z$1.core.$strip>;
1205
+ }, z$1.core.$strip>;
1206
+ toObject(): {
1207
+ name: "UnknownError";
1208
+ data: {
1209
+ message: string;
1210
+ };
1211
+ };
1212
+ stack?: string;
1213
+ cause?: unknown;
1214
+ };
1215
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1216
+ readonly Unknown: any;
1217
+ isError(error: unknown): error is Error;
1218
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1219
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1220
+ stackTraceLimit: number;
1221
+ };
1222
+ isError(error: unknown): error is Error;
1223
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1224
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1225
+ stackTraceLimit: number;
1226
+ };
1227
+ const UnsupportedLanguageError: {
1228
+ new (data: {
1229
+ extension: string;
1230
+ filePath: string;
1231
+ }, options?: ErrorOptions): {
1232
+ readonly name: "CodebaseUnsupportedLanguageError";
1233
+ readonly message: string;
1234
+ readonly data: {
1235
+ extension: string;
1236
+ filePath: string;
1237
+ };
1238
+ schema(): z$1.ZodObject<{
1239
+ name: z$1.ZodLiteral<"CodebaseUnsupportedLanguageError">;
1240
+ data: z$1.ZodObject<{
1241
+ extension: z$1.ZodString;
1242
+ filePath: z$1.ZodString;
1243
+ }, z$1.core.$strip>;
1244
+ }, z$1.core.$strip>;
1245
+ toObject(): {
1246
+ name: "CodebaseUnsupportedLanguageError";
1247
+ data: {
1248
+ extension: string;
1249
+ filePath: string;
1250
+ };
1251
+ };
1252
+ stack?: string;
1253
+ cause?: unknown;
1254
+ };
1255
+ readonly Schema: z$1.ZodObject<{
1256
+ name: z$1.ZodLiteral<"CodebaseUnsupportedLanguageError">;
1257
+ data: z$1.ZodObject<{
1258
+ extension: z$1.ZodString;
1259
+ filePath: z$1.ZodString;
1260
+ }, z$1.core.$strip>;
1261
+ }, z$1.core.$strip>;
1262
+ isInstance(input: any): input is InstanceType<any>;
1263
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1264
+ readonly Unknown: {
1265
+ new (data: {
1266
+ message: string;
1267
+ }, options?: ErrorOptions): {
1268
+ readonly name: "UnknownError";
1269
+ readonly message: string;
1270
+ readonly data: {
1271
+ message: string;
1272
+ };
1273
+ schema(): z$1.ZodObject<{
1274
+ name: z$1.ZodLiteral<"UnknownError">;
1275
+ data: z$1.ZodObject<{
1276
+ message: z$1.ZodString;
1277
+ }, z$1.core.$strip>;
1278
+ }, z$1.core.$strip>;
1279
+ toObject(): {
1280
+ name: "UnknownError";
1281
+ data: {
1282
+ message: string;
1283
+ };
1284
+ };
1285
+ stack?: string;
1286
+ cause?: unknown;
1287
+ };
1288
+ readonly Schema: z$1.ZodObject<{
1289
+ name: z$1.ZodLiteral<"UnknownError">;
1290
+ data: z$1.ZodObject<{
1291
+ message: z$1.ZodString;
1292
+ }, z$1.core.$strip>;
1293
+ }, z$1.core.$strip>;
1294
+ isInstance(input: any): input is {
1295
+ readonly name: "UnknownError";
1296
+ readonly message: string;
1297
+ readonly data: {
1298
+ message: string;
1299
+ };
1300
+ schema(): z$1.ZodObject<{
1301
+ name: z$1.ZodLiteral<"UnknownError">;
1302
+ data: z$1.ZodObject<{
1303
+ message: z$1.ZodString;
1304
+ }, z$1.core.$strip>;
1305
+ }, z$1.core.$strip>;
1306
+ toObject(): {
1307
+ name: "UnknownError";
1308
+ data: {
1309
+ message: string;
1310
+ };
1311
+ };
1312
+ stack?: string;
1313
+ cause?: unknown;
1314
+ };
1315
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1316
+ readonly Unknown: any;
1317
+ isError(error: unknown): error is Error;
1318
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1319
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1320
+ stackTraceLimit: number;
1321
+ };
1322
+ isError(error: unknown): error is Error;
1323
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1324
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1325
+ stackTraceLimit: number;
1326
+ };
1327
+ const BetterSqlite3ResolveError: {
1328
+ new (data: {
1329
+ message: string;
1330
+ installPath: string;
1331
+ }, options?: ErrorOptions): {
1332
+ readonly name: "CodebaseBetterSqlite3ResolveError";
1333
+ readonly message: string;
1334
+ readonly data: {
1335
+ message: string;
1336
+ installPath: string;
1337
+ };
1338
+ schema(): z$1.ZodObject<{
1339
+ name: z$1.ZodLiteral<"CodebaseBetterSqlite3ResolveError">;
1340
+ data: z$1.ZodObject<{
1341
+ message: z$1.ZodString;
1342
+ installPath: z$1.ZodString;
1343
+ }, z$1.core.$strip>;
1344
+ }, z$1.core.$strip>;
1345
+ toObject(): {
1346
+ name: "CodebaseBetterSqlite3ResolveError";
1347
+ data: {
1348
+ message: string;
1349
+ installPath: string;
1350
+ };
1351
+ };
1352
+ stack?: string;
1353
+ cause?: unknown;
1354
+ };
1355
+ readonly Schema: z$1.ZodObject<{
1356
+ name: z$1.ZodLiteral<"CodebaseBetterSqlite3ResolveError">;
1357
+ data: z$1.ZodObject<{
1358
+ message: z$1.ZodString;
1359
+ installPath: z$1.ZodString;
1360
+ }, z$1.core.$strip>;
1361
+ }, z$1.core.$strip>;
1362
+ isInstance(input: any): input is InstanceType<any>;
1363
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1364
+ readonly Unknown: {
1365
+ new (data: {
1366
+ message: string;
1367
+ }, options?: ErrorOptions): {
1368
+ readonly name: "UnknownError";
1369
+ readonly message: string;
1370
+ readonly data: {
1371
+ message: string;
1372
+ };
1373
+ schema(): z$1.ZodObject<{
1374
+ name: z$1.ZodLiteral<"UnknownError">;
1375
+ data: z$1.ZodObject<{
1376
+ message: z$1.ZodString;
1377
+ }, z$1.core.$strip>;
1378
+ }, z$1.core.$strip>;
1379
+ toObject(): {
1380
+ name: "UnknownError";
1381
+ data: {
1382
+ message: string;
1383
+ };
1384
+ };
1385
+ stack?: string;
1386
+ cause?: unknown;
1387
+ };
1388
+ readonly Schema: z$1.ZodObject<{
1389
+ name: z$1.ZodLiteral<"UnknownError">;
1390
+ data: z$1.ZodObject<{
1391
+ message: z$1.ZodString;
1392
+ }, z$1.core.$strip>;
1393
+ }, z$1.core.$strip>;
1394
+ isInstance(input: any): input is {
1395
+ readonly name: "UnknownError";
1396
+ readonly message: string;
1397
+ readonly data: {
1398
+ message: string;
1399
+ };
1400
+ schema(): z$1.ZodObject<{
1401
+ name: z$1.ZodLiteral<"UnknownError">;
1402
+ data: z$1.ZodObject<{
1403
+ message: z$1.ZodString;
1404
+ }, z$1.core.$strip>;
1405
+ }, z$1.core.$strip>;
1406
+ toObject(): {
1407
+ name: "UnknownError";
1408
+ data: {
1409
+ message: string;
1410
+ };
1411
+ };
1412
+ stack?: string;
1413
+ cause?: unknown;
1414
+ };
1415
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1416
+ readonly Unknown: any;
1417
+ isError(error: unknown): error is Error;
1418
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1419
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1420
+ stackTraceLimit: number;
1421
+ };
1422
+ isError(error: unknown): error is Error;
1423
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1424
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1425
+ stackTraceLimit: number;
1426
+ };
1427
+ const NotFoundError: {
1428
+ new (data: {
1429
+ message: string;
1430
+ name: string;
1431
+ candidates?: {
1432
+ node: unknown;
1433
+ score: number;
1434
+ }[] | undefined;
1435
+ }, options?: ErrorOptions): {
1436
+ readonly name: "CodebaseNotFoundError";
1437
+ readonly message: string;
1438
+ readonly data: {
1439
+ message: string;
1440
+ name: string;
1441
+ candidates?: {
1442
+ node: unknown;
1443
+ score: number;
1444
+ }[] | undefined;
1445
+ };
1446
+ schema(): z$1.ZodObject<{
1447
+ name: z$1.ZodLiteral<"CodebaseNotFoundError">;
1448
+ data: z$1.ZodObject<{
1449
+ message: z$1.ZodString;
1450
+ name: z$1.ZodString;
1451
+ candidates: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
1452
+ node: z$1.ZodUnknown;
1453
+ score: z$1.ZodNumber;
1454
+ }, z$1.core.$strip>>>;
1455
+ }, z$1.core.$strip>;
1456
+ }, z$1.core.$strip>;
1457
+ toObject(): {
1458
+ name: "CodebaseNotFoundError";
1459
+ data: {
1460
+ message: string;
1461
+ name: string;
1462
+ candidates?: {
1463
+ node: unknown;
1464
+ score: number;
1465
+ }[] | undefined;
1466
+ };
1467
+ };
1468
+ stack?: string;
1469
+ cause?: unknown;
1470
+ };
1471
+ readonly Schema: z$1.ZodObject<{
1472
+ name: z$1.ZodLiteral<"CodebaseNotFoundError">;
1473
+ data: z$1.ZodObject<{
1474
+ message: z$1.ZodString;
1475
+ name: z$1.ZodString;
1476
+ candidates: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
1477
+ node: z$1.ZodUnknown;
1478
+ score: z$1.ZodNumber;
1479
+ }, z$1.core.$strip>>>;
1480
+ }, z$1.core.$strip>;
1481
+ }, z$1.core.$strip>;
1482
+ isInstance(input: any): input is InstanceType<any>;
1483
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1484
+ readonly Unknown: {
1485
+ new (data: {
1486
+ message: string;
1487
+ }, options?: ErrorOptions): {
1488
+ readonly name: "UnknownError";
1489
+ readonly message: string;
1490
+ readonly data: {
1491
+ message: string;
1492
+ };
1493
+ schema(): z$1.ZodObject<{
1494
+ name: z$1.ZodLiteral<"UnknownError">;
1495
+ data: z$1.ZodObject<{
1496
+ message: z$1.ZodString;
1497
+ }, z$1.core.$strip>;
1498
+ }, z$1.core.$strip>;
1499
+ toObject(): {
1500
+ name: "UnknownError";
1501
+ data: {
1502
+ message: string;
1503
+ };
1504
+ };
1505
+ stack?: string;
1506
+ cause?: unknown;
1507
+ };
1508
+ readonly Schema: z$1.ZodObject<{
1509
+ name: z$1.ZodLiteral<"UnknownError">;
1510
+ data: z$1.ZodObject<{
1511
+ message: z$1.ZodString;
1512
+ }, z$1.core.$strip>;
1513
+ }, z$1.core.$strip>;
1514
+ isInstance(input: any): input is {
1515
+ readonly name: "UnknownError";
1516
+ readonly message: string;
1517
+ readonly data: {
1518
+ message: string;
1519
+ };
1520
+ schema(): z$1.ZodObject<{
1521
+ name: z$1.ZodLiteral<"UnknownError">;
1522
+ data: z$1.ZodObject<{
1523
+ message: z$1.ZodString;
1524
+ }, z$1.core.$strip>;
1525
+ }, z$1.core.$strip>;
1526
+ toObject(): {
1527
+ name: "UnknownError";
1528
+ data: {
1529
+ message: string;
1530
+ };
1531
+ };
1532
+ stack?: string;
1533
+ cause?: unknown;
1534
+ };
1535
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1536
+ readonly Unknown: any;
1537
+ isError(error: unknown): error is Error;
1538
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1539
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1540
+ stackTraceLimit: number;
1541
+ };
1542
+ isError(error: unknown): error is Error;
1543
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1544
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1545
+ stackTraceLimit: number;
1546
+ };
1547
+ const AmbiguousError: {
1548
+ new (data: {
1549
+ message: string;
1550
+ name: string;
1551
+ candidates: {
1552
+ node: unknown;
1553
+ score: number;
1554
+ }[];
1555
+ }, options?: ErrorOptions): {
1556
+ readonly name: "CodebaseAmbiguousError";
1557
+ readonly message: string;
1558
+ readonly data: {
1559
+ message: string;
1560
+ name: string;
1561
+ candidates: {
1562
+ node: unknown;
1563
+ score: number;
1564
+ }[];
1565
+ };
1566
+ schema(): z$1.ZodObject<{
1567
+ name: z$1.ZodLiteral<"CodebaseAmbiguousError">;
1568
+ data: z$1.ZodObject<{
1569
+ message: z$1.ZodString;
1570
+ name: z$1.ZodString;
1571
+ candidates: z$1.ZodArray<z$1.ZodObject<{
1572
+ node: z$1.ZodUnknown;
1573
+ score: z$1.ZodNumber;
1574
+ }, z$1.core.$strip>>;
1575
+ }, z$1.core.$strip>;
1576
+ }, z$1.core.$strip>;
1577
+ toObject(): {
1578
+ name: "CodebaseAmbiguousError";
1579
+ data: {
1580
+ message: string;
1581
+ name: string;
1582
+ candidates: {
1583
+ node: unknown;
1584
+ score: number;
1585
+ }[];
1586
+ };
1587
+ };
1588
+ stack?: string;
1589
+ cause?: unknown;
1590
+ };
1591
+ readonly Schema: z$1.ZodObject<{
1592
+ name: z$1.ZodLiteral<"CodebaseAmbiguousError">;
1593
+ data: z$1.ZodObject<{
1594
+ message: z$1.ZodString;
1595
+ name: z$1.ZodString;
1596
+ candidates: z$1.ZodArray<z$1.ZodObject<{
1597
+ node: z$1.ZodUnknown;
1598
+ score: z$1.ZodNumber;
1599
+ }, z$1.core.$strip>>;
1600
+ }, z$1.core.$strip>;
1601
+ }, z$1.core.$strip>;
1602
+ isInstance(input: any): input is InstanceType<any>;
1603
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1604
+ readonly Unknown: {
1605
+ new (data: {
1606
+ message: string;
1607
+ }, options?: ErrorOptions): {
1608
+ readonly name: "UnknownError";
1609
+ readonly message: string;
1610
+ readonly data: {
1611
+ message: string;
1612
+ };
1613
+ schema(): z$1.ZodObject<{
1614
+ name: z$1.ZodLiteral<"UnknownError">;
1615
+ data: z$1.ZodObject<{
1616
+ message: z$1.ZodString;
1617
+ }, z$1.core.$strip>;
1618
+ }, z$1.core.$strip>;
1619
+ toObject(): {
1620
+ name: "UnknownError";
1621
+ data: {
1622
+ message: string;
1623
+ };
1624
+ };
1625
+ stack?: string;
1626
+ cause?: unknown;
1627
+ };
1628
+ readonly Schema: z$1.ZodObject<{
1629
+ name: z$1.ZodLiteral<"UnknownError">;
1630
+ data: z$1.ZodObject<{
1631
+ message: z$1.ZodString;
1632
+ }, z$1.core.$strip>;
1633
+ }, z$1.core.$strip>;
1634
+ isInstance(input: any): input is {
1635
+ readonly name: "UnknownError";
1636
+ readonly message: string;
1637
+ readonly data: {
1638
+ message: string;
1639
+ };
1640
+ schema(): z$1.ZodObject<{
1641
+ name: z$1.ZodLiteral<"UnknownError">;
1642
+ data: z$1.ZodObject<{
1643
+ message: z$1.ZodString;
1644
+ }, z$1.core.$strip>;
1645
+ }, z$1.core.$strip>;
1646
+ toObject(): {
1647
+ name: "UnknownError";
1648
+ data: {
1649
+ message: string;
1650
+ };
1651
+ };
1652
+ stack?: string;
1653
+ cause?: unknown;
1654
+ };
1655
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1656
+ readonly Unknown: any;
1657
+ isError(error: unknown): error is Error;
1658
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1659
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1660
+ stackTraceLimit: number;
1661
+ };
1662
+ isError(error: unknown): error is Error;
1663
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1664
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1665
+ stackTraceLimit: number;
1666
+ };
554
1667
  }
1668
+ declare const CODEBASE_BUSINESS_CODES: ReadonlySet<string>;
1669
+ declare const CODEBASE_BUSINESS_HINTS: Readonly<Record<string, string>>;
1670
+ declare function registerBusinessErrors(): Promise<void>;
555
1671
 
556
1672
  declare class NodeExtractor {
557
1673
  extractNodes(tree: ParseTree, source: string, language: Language, filePath: string): ExtractedNode[];
@@ -798,8 +1914,8 @@ declare class CodeBase implements ICodebase {
798
1914
  declare function createCodebase(config?: Partial<CodebaseConfig>): Promise<ICodebase>;
799
1915
 
800
1916
  interface LlmModels {
801
- graphLlm?: LanguageModel;
802
- embeddingLlm?: EmbeddingModel;
1917
+ evaluation?: LanguageModelRef;
1918
+ embedding?: EmbeddingModelRef;
803
1919
  }
804
1920
  interface LlmOptions {
805
1921
  maxOutputTokens?: number;
@@ -807,8 +1923,9 @@ interface LlmOptions {
807
1923
  }
808
1924
  interface LlmInitConfig extends ILLMInitConfig {
809
1925
  options?: {
810
- graph?: LlmOptions;
1926
+ evaluation?: LlmOptions;
811
1927
  };
1928
+ evaluationThreshold?: number;
812
1929
  }
813
1930
  interface EvaluationResult {
814
1931
  score: number;
@@ -817,21 +1934,26 @@ interface EvaluationResult {
817
1934
  extraEntities: string[];
818
1935
  wrongRelations: string[];
819
1936
  missingRelations: string[];
1937
+ passing: boolean;
820
1938
  }
821
1939
  declare namespace Llm {
822
- function init(config: ILLMInitConfig): void;
1940
+ function init(config: LlmInitConfig): void;
1941
+ function getEvaluationThreshold(): number;
823
1942
  function isInitialized(): boolean;
824
1943
  function _resetForTest(): void;
825
1944
  function capabilities(): ILLMCapabilities;
826
- function getGraphLlm(): LanguageModel | undefined;
827
- function getEmbeddingLlm(): EmbeddingModel | undefined;
1945
+ function probeEmbeddingDims(options?: {
1946
+ timeoutMs?: number;
1947
+ }): Promise<number | undefined>;
1948
+ function getEvaluation(): LanguageModelRef | undefined;
1949
+ function getEmbedding(): EmbeddingModelRef | undefined;
828
1950
  function generateText(prompt: string, options?: LlmOptions): Promise<string>;
829
1951
  function evaluateExtraction(params: {
830
1952
  gold: string;
831
1953
  predicted: string;
1954
+ threshold?: number;
832
1955
  options?: LlmOptions;
833
1956
  }): Promise<EvaluationResult>;
834
- function parseEvaluationResult(text: string): EvaluationResult;
835
1957
  }
836
1958
  declare const llm: ILLM;
837
1959
 
@@ -988,6 +2110,7 @@ interface SearchParams {
988
2110
  enableFts?: boolean;
989
2111
  enableEmbedding?: boolean;
990
2112
  maxEdgesPerNode?: number;
2113
+ snippetMaxChars?: number;
991
2114
  }
992
2115
  interface SearchHit {
993
2116
  nodeId: string;
@@ -1127,6 +2250,7 @@ interface ExploreParams {
1127
2250
  depth?: number;
1128
2251
  includeContent?: boolean;
1129
2252
  intent?: string;
2253
+ snippetMaxChars?: number;
1130
2254
  }
1131
2255
  interface ExploreEntryPoint {
1132
2256
  file: string;
@@ -1145,23 +2269,6 @@ type StatusParams = {};
1145
2269
  type StatusResult = GraphStatus;
1146
2270
  type DoctorParams = {};
1147
2271
  type DoctorResult = HealthCheckResult;
1148
- declare class ServiceError extends Error {
1149
- readonly code: 'NOT_FOUND' | 'AMBIGUOUS' | 'INTERNAL' | 'NOT_INDEXED';
1150
- readonly details?: Record<string, unknown> | undefined;
1151
- constructor(message: string, code: 'NOT_FOUND' | 'AMBIGUOUS' | 'INTERNAL' | 'NOT_INDEXED', details?: Record<string, unknown> | undefined);
1152
- }
1153
- declare class NotFoundError extends ServiceError {
1154
- constructor(name: string, candidates?: Array<{
1155
- node: Node;
1156
- score: number;
1157
- }>);
1158
- }
1159
- declare class AmbiguousError extends ServiceError {
1160
- constructor(name: string, candidates: Array<{
1161
- node: Node;
1162
- score: number;
1163
- }>);
1164
- }
1165
2272
 
1166
2273
  declare function renderSearch(hits: Array<{
1167
2274
  nodeId: string;
@@ -1201,6 +2308,8 @@ declare function explore(ctx: ServiceContext, params: ExploreParams): Promise<Ex
1201
2308
  declare function status(ctx: ServiceContext, _params: StatusParams): Promise<StatusResult>;
1202
2309
  declare function doctor(ctx: ServiceContext, _params: DoctorParams): Promise<DoctorResult>;
1203
2310
 
2311
+ declare function initCodebase(): Promise<void>;
2312
+
1204
2313
  declare function setGlobalAdapter(global: IGlobal | null): void;
1205
2314
  declare function resetGlobalAdapter(): void;
1206
2315
  declare function getGlobal(): IGlobal;
@@ -1218,4 +2327,21 @@ declare function easbotDir(rootDir: string): string;
1218
2327
  declare function codebaseConfigPath(rootDir: string): string;
1219
2328
  declare function codebaseDbPath(rootDir: string): string;
1220
2329
 
1221
- export { type ASTNodeType, AmbiguousError, type CalleeEntry, type CalleesParams, type CalleesResult, type CallerEntry, type CallersParams, type CallersResult, CodeBase, type CodeKnowledgeGraphConfig, type CodebaseCliDeps, type CodebaseCliResult, type CodebaseConfig, ConfigError, type ContextInput, type ContextNode, type ContextParams, type ContextResult, DatabaseError, DatabaseManager, type DoctorParams, type DoctorResult, type Edge, EdgeExtractor, type EdgeQueryFilter, type EdgeWithNodes, type ExploreEntryPoint, type ExploreParams, type ExploreResult, type ExtractedEdge, type ExtractedNode, FILE_EXTENSION_MAP, type FileHashRecord, FileSystemError, type FormattedEdge, type FormattedNode, type FormattedSearchHit, type GraphStatus, type HealthCheckResult, type HybridSearchResult, type ICodebase, type IEdgeExtractor, type INodeExtractor, type IParser, type ImpactBucket, type ImpactBucketEntry, type ImpactParams, type ImpactResult, IndexError, type IndexResult, Indexer, type IndexerConfig, type Language, Llm, type LlmInitConfig, type LlmModels, type LlmOptions, type Node, NodeExtractor, type NodeKind, type NodeParams, type NodeQueryFilter, type NodeResult, type NodeWithEdges, NotFoundError, ParserError, ParserManager, type PendingFile, type ProgressCallback, QueryError, QueryInterface, type RelationQueryOptions, type RelationType, type RenderOptions, SECTION_END, SECTION_MARKER, SchemaError, type SearchHit, type SearchOptions, type SearchParams, type SearchResult$1 as SearchResult, type ServiceContext, ServiceError, type StatusParams, type StatusResult, type SyncResult, type TruncateOptions, type TruncateResult, UnsupportedLanguageError, callees, callers, codebaseConfigPath, codebaseDbPath, context, createCodebase, createEdgeExtractor, createIndexer, createNodeExtractor, createQueryInterface, defaultRiskLabel, doctor, easbotDir, emptyFormattedNode, explore, formatCodebaseEdge, formatCodebaseNode, formatCodebaseSearchHits, getGlobal, getHomeDir, getInstance, getParserManager, getProjectDirectory, getXdgCache, getXdgConfig, getXdgData, getXdgState, handleCodebaseCli, impact, llm, node, renderBanner, renderCalleesFromResult, renderCallersFromResult, renderContext, renderContextFromQuery, renderExploreFromResult, renderHelp, renderImpact, renderImpactFromTuples, renderNeighborList, renderNode, renderNodeDetail, renderSearch, renderSearchResult, renderStatusFromResult, resetGlobalAdapter, resetInstanceAdapter, resetParserManager, search, setGlobalAdapter, setInstanceAdapter, status, truncateAtSectionBoundary, truncateAtSectionBoundarySync };
2330
+ declare const CODEBASE_JSON_REL_PATH: readonly [".easbot", "codebase.json"];
2331
+ type StateResult = {
2332
+ codebaseJson: CodebaseJson | undefined;
2333
+ exists: boolean;
2334
+ rootDir: string;
2335
+ };
2336
+ declare namespace CodebaseCache {
2337
+ function state(): Promise<StateResult>;
2338
+ function resetState(writtenPath?: string): void;
2339
+ function init(): Promise<void>;
2340
+ function getCodebaseJson(): Promise<CodebaseJson | undefined>;
2341
+ function exists(): Promise<boolean>;
2342
+ function getRootDir(): Promise<string>;
2343
+ function writeCodebaseJson(partial: Partial<CodebaseJson>): Promise<CodebaseJson>;
2344
+ function getConfigPath(): Promise<string>;
2345
+ }
2346
+
2347
+ export { type ASTNodeType, CODEBASE_BUSINESS_CODES, CODEBASE_BUSINESS_HINTS, CODEBASE_JSON_REL_PATH, type CalleeEntry, type CalleesParams, type CalleesResult, type CallerEntry, type CallersParams, type CallersResult, CodeBase, type CodeKnowledgeGraphConfig, CodebaseCache, type CodebaseCliDeps, type CodebaseCliResult, type CodebaseConfig, CodebaseError, type CodebaseJson, CodebaseJsonSchema, type ContextInput, type ContextNode, type ContextParams, type ContextResult, DEFAULT_CODEBASE_JSON, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_TOKENIZER_CONFIG, DatabaseManager, type DoctorParams, type DoctorResult, type Edge, EdgeExtractor, type EdgeQueryFilter, type EdgeWithNodes, type ExploreEntryPoint, type ExploreParams, type ExploreResult, type ExtractedEdge, type ExtractedNode, FILE_EXTENSION_MAP, type FileHashRecord, type FormattedEdge, type FormattedNode, type FormattedSearchHit, type GraphStatus, type HealthCheckResult, type HybridSearchResult, type ICodebase, type IEdgeExtractor, type INodeExtractor, type IParser, type ImpactBucket, type ImpactBucketEntry, type ImpactParams, type ImpactResult, type IndexResult, Indexer, type IndexerConfig, type Language, Llm, type LlmInitConfig, type LlmModels, type LlmOptions, type Node, NodeExtractor, type NodeKind, type NodeParams, type NodeQueryFilter, type NodeResult, type NodeWithEdges, ParserManager, type PendingFile, type ProgressCallback, QueryInterface, type RelationQueryOptions, type RelationType, type RenderOptions, SECTION_END, SECTION_MARKER, type SearchHit, type SearchOptions, type SearchParams, type SearchResult$1 as SearchResult, type ServiceContext, type StatusParams, type StatusResult, type SyncResult, type TruncateOptions, type TruncateResult, callees, callers, codebaseConfigPath, codebaseDbPath, context, createCodebase, createEdgeExtractor, createIndexer, createNodeExtractor, createQueryInterface, defaultRiskLabel, doctor, easbotDir, emptyFormattedNode, explore, formatCodebaseEdge, formatCodebaseNode, formatCodebaseSearchHits, getGlobal, getHomeDir, getInstance, getParserManager, getProjectDirectory, getXdgCache, getXdgConfig, getXdgData, getXdgState, handleCodebaseCli, impact, initCodebase, llm, node, registerBusinessErrors, renderBanner, renderCalleesFromResult, renderCallersFromResult, renderContext, renderContextFromQuery, renderExploreFromResult, renderHelp, renderImpact, renderImpactFromTuples, renderNeighborList, renderNode, renderNodeDetail, renderSearch, renderSearchResult, renderStatusFromResult, resetGlobalAdapter, resetInstanceAdapter, resetParserManager, search, setGlobalAdapter, setInstanceAdapter, status, truncateAtSectionBoundary, truncateAtSectionBoundarySync };