@easbot/codebase 0.3.27 → 0.3.29

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 (62) hide show
  1. package/README.en.md +75 -74
  2. package/README.md +75 -74
  3. package/dist/chunks/chunk-23YR2LAM.cjs +1 -0
  4. package/dist/chunks/chunk-3RVRPGJC.mjs +1 -0
  5. package/dist/chunks/chunk-3UGOMK4F.cjs +62 -0
  6. package/dist/chunks/chunk-4XKCGYFF.mjs +158 -0
  7. package/dist/chunks/chunk-5M2N7JFP.cjs +1 -0
  8. package/dist/chunks/chunk-A4YJ5ZVE.cjs +203 -0
  9. package/dist/chunks/chunk-J7AIRI5N.mjs +203 -0
  10. package/dist/chunks/chunk-LLO6DDXU.mjs +48 -0
  11. package/dist/chunks/{chunk-GWCRGM4D.mjs → chunk-LQVKXVBS.mjs} +3 -3
  12. package/dist/chunks/chunk-LZLPJAB6.mjs +62 -0
  13. package/dist/chunks/chunk-MZHDSOD7.mjs +1 -0
  14. package/dist/chunks/{chunk-VPWALTY7.cjs → chunk-OGTQ7MWV.cjs} +3 -3
  15. package/dist/chunks/chunk-V6PHJ4DG.cjs +48 -0
  16. package/dist/chunks/chunk-YJK7F6NJ.cjs +158 -0
  17. package/dist/chunks/cli-handler-B7WPIZRE.cjs +1 -0
  18. package/dist/chunks/cli-handler-EJX27R4Q.mjs +1 -0
  19. package/dist/chunks/code-base-FSOSU46G.mjs +1 -0
  20. package/dist/chunks/code-base-OWYMNEQG.cjs +1 -0
  21. package/dist/chunks/database-manager-7D7NDXJK.mjs +1 -0
  22. package/dist/chunks/database-manager-X4DMAUWC.cjs +1 -0
  23. package/dist/chunks/file-watcher-E2JROVI7.cjs +1 -0
  24. package/dist/chunks/file-watcher-KSLBUUPP.mjs +1 -0
  25. package/dist/chunks/{interfaces-DPFLQBQ6.mjs → interfaces-S7TJGWWS.mjs} +1 -1
  26. package/dist/chunks/interfaces-URUTHSR2.cjs +1 -0
  27. package/dist/chunks/llm-R2ZLKZDO.cjs +1 -0
  28. package/dist/chunks/llm-U57HNTZO.mjs +1 -0
  29. package/dist/chunks/stdio-server-DFKFFRSM.cjs +30 -0
  30. package/dist/chunks/stdio-server-NV5YAXJD.mjs +30 -0
  31. package/dist/cli.cjs +1 -1
  32. package/dist/cli.mjs +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.d.cts +1098 -80
  35. package/dist/index.d.ts +1098 -80
  36. package/dist/index.mjs +1 -1
  37. package/package.json +9 -9
  38. package/dist/chunks/chunk-34CU2EU4.mjs +0 -1
  39. package/dist/chunks/chunk-4HJ7RFP7.cjs +0 -1
  40. package/dist/chunks/chunk-4TCNRCEK.mjs +0 -48
  41. package/dist/chunks/chunk-7CL37IYG.mjs +0 -158
  42. package/dist/chunks/chunk-7N7UVPKB.cjs +0 -48
  43. package/dist/chunks/chunk-ICEJ23S3.mjs +0 -203
  44. package/dist/chunks/chunk-JCJFUUU2.cjs +0 -203
  45. package/dist/chunks/chunk-JVX6PHPN.cjs +0 -1
  46. package/dist/chunks/chunk-TGCR6O3S.cjs +0 -62
  47. package/dist/chunks/chunk-UHNJOT5S.cjs +0 -158
  48. package/dist/chunks/chunk-WRM2FP4O.mjs +0 -62
  49. package/dist/chunks/chunk-ZPEE2LSX.mjs +0 -1
  50. package/dist/chunks/cli-handler-DXLDGJFQ.mjs +0 -1
  51. package/dist/chunks/cli-handler-KKNIISIE.cjs +0 -1
  52. package/dist/chunks/code-base-BFLIOZXA.cjs +0 -1
  53. package/dist/chunks/code-base-DMVLROV6.mjs +0 -1
  54. package/dist/chunks/database-manager-GT3LOQUV.cjs +0 -1
  55. package/dist/chunks/database-manager-N5WLNG3F.mjs +0 -1
  56. package/dist/chunks/file-watcher-QS442D52.cjs +0 -1
  57. package/dist/chunks/file-watcher-X56TEWNY.mjs +0 -1
  58. package/dist/chunks/interfaces-YX56SVRQ.cjs +0 -1
  59. package/dist/chunks/llm-ADBGTSCV.mjs +0 -1
  60. package/dist/chunks/llm-BDMNIGOH.cjs +0 -1
  61. package/dist/chunks/stdio-server-4X7YFQA2.mjs +0 -30
  62. package/dist/chunks/stdio-server-5UQVBBZP.cjs +0 -30
package/dist/index.d.cts CHANGED
@@ -1,9 +1,11 @@
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
6
  import { LanguageModel, EmbeddingModel } from 'ai';
6
7
  import { ILLMInitConfig, ILLMCapabilities, ILLM } from '@easbot/llm';
8
+ export { ServiceError, ServiceError as ServiceErrorInstance } from '@easbot/utils';
7
9
 
8
10
  type IndexState = 'uninitialized' | 'indexing' | 'complete' | 'partial' | 'failed' | 'stale';
9
11
  interface FtsSearchResult {
@@ -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
+ rerank_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
+ graph_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
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,1051 @@ 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 data: {
534
+ message: string;
535
+ filePath: string;
536
+ };
537
+ schema(): z$1.ZodObject<{
538
+ name: z$1.ZodLiteral<"CodebaseParserError">;
539
+ data: z$1.ZodObject<{
540
+ message: z$1.ZodString;
541
+ filePath: z$1.ZodString;
542
+ }, z$1.core.$strip>;
543
+ }, z$1.core.$strip>;
544
+ toObject(): {
545
+ name: "CodebaseParserError";
546
+ data: {
547
+ message: string;
548
+ filePath: string;
549
+ };
550
+ };
551
+ message: string;
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 data: {
570
+ message: string;
571
+ };
572
+ schema(): z$1.ZodObject<{
573
+ name: z$1.ZodLiteral<"UnknownError">;
574
+ data: z$1.ZodObject<{
575
+ message: z$1.ZodString;
576
+ }, z$1.core.$strip>;
577
+ }, z$1.core.$strip>;
578
+ toObject(): {
579
+ name: "UnknownError";
580
+ data: {
581
+ message: string;
582
+ };
583
+ };
584
+ message: string;
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 data: {
597
+ message: string;
598
+ };
599
+ schema(): z$1.ZodObject<{
600
+ name: z$1.ZodLiteral<"UnknownError">;
601
+ data: z$1.ZodObject<{
602
+ message: z$1.ZodString;
603
+ }, z$1.core.$strip>;
604
+ }, z$1.core.$strip>;
605
+ toObject(): {
606
+ name: "UnknownError";
607
+ data: {
608
+ message: string;
609
+ };
610
+ };
611
+ message: string;
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 data: {
634
+ message: string;
635
+ operation: string;
636
+ };
637
+ schema(): z$1.ZodObject<{
638
+ name: z$1.ZodLiteral<"CodebaseDatabaseError">;
639
+ data: z$1.ZodObject<{
640
+ message: z$1.ZodString;
641
+ operation: z$1.ZodString;
642
+ }, z$1.core.$strip>;
643
+ }, z$1.core.$strip>;
644
+ toObject(): {
645
+ name: "CodebaseDatabaseError";
646
+ data: {
647
+ message: string;
648
+ operation: string;
649
+ };
650
+ };
651
+ message: string;
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 data: {
670
+ message: string;
671
+ };
672
+ schema(): z$1.ZodObject<{
673
+ name: z$1.ZodLiteral<"UnknownError">;
674
+ data: z$1.ZodObject<{
675
+ message: z$1.ZodString;
676
+ }, z$1.core.$strip>;
677
+ }, z$1.core.$strip>;
678
+ toObject(): {
679
+ name: "UnknownError";
680
+ data: {
681
+ message: string;
682
+ };
683
+ };
684
+ message: string;
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 data: {
697
+ message: string;
698
+ };
699
+ schema(): z$1.ZodObject<{
700
+ name: z$1.ZodLiteral<"UnknownError">;
701
+ data: z$1.ZodObject<{
702
+ message: z$1.ZodString;
703
+ }, z$1.core.$strip>;
704
+ }, z$1.core.$strip>;
705
+ toObject(): {
706
+ name: "UnknownError";
707
+ data: {
708
+ message: string;
709
+ };
710
+ };
711
+ message: string;
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 data: {
734
+ message: string;
735
+ missing?: string[] | undefined;
736
+ };
737
+ schema(): z$1.ZodObject<{
738
+ name: z$1.ZodLiteral<"CodebaseSchemaError">;
739
+ data: z$1.ZodObject<{
740
+ message: z$1.ZodString;
741
+ missing: z$1.ZodOptional<z$1.ZodArray<z$1.ZodString>>;
742
+ }, z$1.core.$strip>;
743
+ }, z$1.core.$strip>;
744
+ toObject(): {
745
+ name: "CodebaseSchemaError";
746
+ data: {
747
+ message: string;
748
+ missing?: string[] | undefined;
749
+ };
750
+ };
751
+ message: string;
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 data: {
770
+ message: string;
771
+ };
772
+ schema(): z$1.ZodObject<{
773
+ name: z$1.ZodLiteral<"UnknownError">;
774
+ data: z$1.ZodObject<{
775
+ message: z$1.ZodString;
776
+ }, z$1.core.$strip>;
777
+ }, z$1.core.$strip>;
778
+ toObject(): {
779
+ name: "UnknownError";
780
+ data: {
781
+ message: string;
782
+ };
783
+ };
784
+ message: string;
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 data: {
797
+ message: string;
798
+ };
799
+ schema(): z$1.ZodObject<{
800
+ name: z$1.ZodLiteral<"UnknownError">;
801
+ data: z$1.ZodObject<{
802
+ message: z$1.ZodString;
803
+ }, z$1.core.$strip>;
804
+ }, z$1.core.$strip>;
805
+ toObject(): {
806
+ name: "UnknownError";
807
+ data: {
808
+ message: string;
809
+ };
810
+ };
811
+ message: string;
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 data: {
834
+ message: string;
835
+ filePath: string;
836
+ };
837
+ schema(): z$1.ZodObject<{
838
+ name: z$1.ZodLiteral<"CodebaseFileSystemError">;
839
+ data: z$1.ZodObject<{
840
+ message: z$1.ZodString;
841
+ filePath: z$1.ZodString;
842
+ }, z$1.core.$strip>;
843
+ }, z$1.core.$strip>;
844
+ toObject(): {
845
+ name: "CodebaseFileSystemError";
846
+ data: {
847
+ message: string;
848
+ filePath: string;
849
+ };
850
+ };
851
+ message: string;
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 data: {
870
+ message: string;
871
+ };
872
+ schema(): z$1.ZodObject<{
873
+ name: z$1.ZodLiteral<"UnknownError">;
874
+ data: z$1.ZodObject<{
875
+ message: z$1.ZodString;
876
+ }, z$1.core.$strip>;
877
+ }, z$1.core.$strip>;
878
+ toObject(): {
879
+ name: "UnknownError";
880
+ data: {
881
+ message: string;
882
+ };
883
+ };
884
+ message: string;
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 data: {
897
+ message: string;
898
+ };
899
+ schema(): z$1.ZodObject<{
900
+ name: z$1.ZodLiteral<"UnknownError">;
901
+ data: z$1.ZodObject<{
902
+ message: z$1.ZodString;
903
+ }, z$1.core.$strip>;
904
+ }, z$1.core.$strip>;
905
+ toObject(): {
906
+ name: "UnknownError";
907
+ data: {
908
+ message: string;
909
+ };
910
+ };
911
+ message: string;
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 data: {
934
+ message: string;
935
+ filePath?: string | undefined;
936
+ };
937
+ schema(): z$1.ZodObject<{
938
+ name: z$1.ZodLiteral<"CodebaseIndexError">;
939
+ data: z$1.ZodObject<{
940
+ message: z$1.ZodString;
941
+ filePath: z$1.ZodOptional<z$1.ZodString>;
942
+ }, z$1.core.$strip>;
943
+ }, z$1.core.$strip>;
944
+ toObject(): {
945
+ name: "CodebaseIndexError";
946
+ data: {
947
+ message: string;
948
+ filePath?: string | undefined;
949
+ };
950
+ };
951
+ message: string;
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 data: {
970
+ message: string;
971
+ };
972
+ schema(): z$1.ZodObject<{
973
+ name: z$1.ZodLiteral<"UnknownError">;
974
+ data: z$1.ZodObject<{
975
+ message: z$1.ZodString;
976
+ }, z$1.core.$strip>;
977
+ }, z$1.core.$strip>;
978
+ toObject(): {
979
+ name: "UnknownError";
980
+ data: {
981
+ message: string;
982
+ };
983
+ };
984
+ message: string;
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 data: {
997
+ message: string;
998
+ };
999
+ schema(): z$1.ZodObject<{
1000
+ name: z$1.ZodLiteral<"UnknownError">;
1001
+ data: z$1.ZodObject<{
1002
+ message: z$1.ZodString;
1003
+ }, z$1.core.$strip>;
1004
+ }, z$1.core.$strip>;
1005
+ toObject(): {
1006
+ name: "UnknownError";
1007
+ data: {
1008
+ message: string;
1009
+ };
1010
+ };
1011
+ message: string;
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 data: {
1034
+ message: string;
1035
+ field?: string | undefined;
1036
+ };
1037
+ schema(): z$1.ZodObject<{
1038
+ name: z$1.ZodLiteral<"CodebaseConfigError">;
1039
+ data: z$1.ZodObject<{
1040
+ message: z$1.ZodString;
1041
+ field: z$1.ZodOptional<z$1.ZodString>;
1042
+ }, z$1.core.$strip>;
1043
+ }, z$1.core.$strip>;
1044
+ toObject(): {
1045
+ name: "CodebaseConfigError";
1046
+ data: {
1047
+ message: string;
1048
+ field?: string | undefined;
1049
+ };
1050
+ };
1051
+ message: string;
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 data: {
1070
+ message: string;
1071
+ };
1072
+ schema(): z$1.ZodObject<{
1073
+ name: z$1.ZodLiteral<"UnknownError">;
1074
+ data: z$1.ZodObject<{
1075
+ message: z$1.ZodString;
1076
+ }, z$1.core.$strip>;
1077
+ }, z$1.core.$strip>;
1078
+ toObject(): {
1079
+ name: "UnknownError";
1080
+ data: {
1081
+ message: string;
1082
+ };
1083
+ };
1084
+ message: string;
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 data: {
1097
+ message: string;
1098
+ };
1099
+ schema(): z$1.ZodObject<{
1100
+ name: z$1.ZodLiteral<"UnknownError">;
1101
+ data: z$1.ZodObject<{
1102
+ message: z$1.ZodString;
1103
+ }, z$1.core.$strip>;
1104
+ }, z$1.core.$strip>;
1105
+ toObject(): {
1106
+ name: "UnknownError";
1107
+ data: {
1108
+ message: string;
1109
+ };
1110
+ };
1111
+ message: string;
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 data: {
1134
+ message: string;
1135
+ params?: Record<string, unknown> | undefined;
1136
+ };
1137
+ schema(): z$1.ZodObject<{
1138
+ name: z$1.ZodLiteral<"CodebaseQueryError">;
1139
+ data: z$1.ZodObject<{
1140
+ message: z$1.ZodString;
1141
+ params: z$1.ZodOptional<z$1.ZodRecord<z$1.ZodString, z$1.ZodUnknown>>;
1142
+ }, z$1.core.$strip>;
1143
+ }, z$1.core.$strip>;
1144
+ toObject(): {
1145
+ name: "CodebaseQueryError";
1146
+ data: {
1147
+ message: string;
1148
+ params?: Record<string, unknown> | undefined;
1149
+ };
1150
+ };
1151
+ message: string;
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 data: {
1170
+ message: string;
1171
+ };
1172
+ schema(): z$1.ZodObject<{
1173
+ name: z$1.ZodLiteral<"UnknownError">;
1174
+ data: z$1.ZodObject<{
1175
+ message: z$1.ZodString;
1176
+ }, z$1.core.$strip>;
1177
+ }, z$1.core.$strip>;
1178
+ toObject(): {
1179
+ name: "UnknownError";
1180
+ data: {
1181
+ message: string;
1182
+ };
1183
+ };
1184
+ message: string;
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 data: {
1197
+ message: string;
1198
+ };
1199
+ schema(): z$1.ZodObject<{
1200
+ name: z$1.ZodLiteral<"UnknownError">;
1201
+ data: z$1.ZodObject<{
1202
+ message: z$1.ZodString;
1203
+ }, z$1.core.$strip>;
1204
+ }, z$1.core.$strip>;
1205
+ toObject(): {
1206
+ name: "UnknownError";
1207
+ data: {
1208
+ message: string;
1209
+ };
1210
+ };
1211
+ message: string;
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 data: {
1234
+ extension: string;
1235
+ filePath: string;
1236
+ };
1237
+ schema(): z$1.ZodObject<{
1238
+ name: z$1.ZodLiteral<"CodebaseUnsupportedLanguageError">;
1239
+ data: z$1.ZodObject<{
1240
+ extension: z$1.ZodString;
1241
+ filePath: z$1.ZodString;
1242
+ }, z$1.core.$strip>;
1243
+ }, z$1.core.$strip>;
1244
+ toObject(): {
1245
+ name: "CodebaseUnsupportedLanguageError";
1246
+ data: {
1247
+ extension: string;
1248
+ filePath: string;
1249
+ };
1250
+ };
1251
+ message: string;
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 data: {
1270
+ message: string;
1271
+ };
1272
+ schema(): z$1.ZodObject<{
1273
+ name: z$1.ZodLiteral<"UnknownError">;
1274
+ data: z$1.ZodObject<{
1275
+ message: z$1.ZodString;
1276
+ }, z$1.core.$strip>;
1277
+ }, z$1.core.$strip>;
1278
+ toObject(): {
1279
+ name: "UnknownError";
1280
+ data: {
1281
+ message: string;
1282
+ };
1283
+ };
1284
+ message: string;
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 data: {
1297
+ message: string;
1298
+ };
1299
+ schema(): z$1.ZodObject<{
1300
+ name: z$1.ZodLiteral<"UnknownError">;
1301
+ data: z$1.ZodObject<{
1302
+ message: z$1.ZodString;
1303
+ }, z$1.core.$strip>;
1304
+ }, z$1.core.$strip>;
1305
+ toObject(): {
1306
+ name: "UnknownError";
1307
+ data: {
1308
+ message: string;
1309
+ };
1310
+ };
1311
+ message: string;
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 NotFoundError: {
1328
+ new (data: {
1329
+ message: string;
1330
+ name: string;
1331
+ candidates?: {
1332
+ node: unknown;
1333
+ score: number;
1334
+ }[] | undefined;
1335
+ }, options?: ErrorOptions): {
1336
+ readonly name: "CodebaseNotFoundError";
1337
+ readonly data: {
1338
+ message: string;
1339
+ name: string;
1340
+ candidates?: {
1341
+ node: unknown;
1342
+ score: number;
1343
+ }[] | undefined;
1344
+ };
1345
+ schema(): z$1.ZodObject<{
1346
+ name: z$1.ZodLiteral<"CodebaseNotFoundError">;
1347
+ data: z$1.ZodObject<{
1348
+ message: z$1.ZodString;
1349
+ name: z$1.ZodString;
1350
+ candidates: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
1351
+ node: z$1.ZodUnknown;
1352
+ score: z$1.ZodNumber;
1353
+ }, z$1.core.$strip>>>;
1354
+ }, z$1.core.$strip>;
1355
+ }, z$1.core.$strip>;
1356
+ toObject(): {
1357
+ name: "CodebaseNotFoundError";
1358
+ data: {
1359
+ message: string;
1360
+ name: string;
1361
+ candidates?: {
1362
+ node: unknown;
1363
+ score: number;
1364
+ }[] | undefined;
1365
+ };
1366
+ };
1367
+ message: string;
1368
+ stack?: string;
1369
+ cause?: unknown;
1370
+ };
1371
+ readonly Schema: z$1.ZodObject<{
1372
+ name: z$1.ZodLiteral<"CodebaseNotFoundError">;
1373
+ data: z$1.ZodObject<{
1374
+ message: z$1.ZodString;
1375
+ name: z$1.ZodString;
1376
+ candidates: z$1.ZodOptional<z$1.ZodArray<z$1.ZodObject<{
1377
+ node: z$1.ZodUnknown;
1378
+ score: z$1.ZodNumber;
1379
+ }, z$1.core.$strip>>>;
1380
+ }, z$1.core.$strip>;
1381
+ }, z$1.core.$strip>;
1382
+ isInstance(input: any): input is InstanceType<any>;
1383
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1384
+ readonly Unknown: {
1385
+ new (data: {
1386
+ message: string;
1387
+ }, options?: ErrorOptions): {
1388
+ readonly name: "UnknownError";
1389
+ readonly data: {
1390
+ message: string;
1391
+ };
1392
+ schema(): z$1.ZodObject<{
1393
+ name: z$1.ZodLiteral<"UnknownError">;
1394
+ data: z$1.ZodObject<{
1395
+ message: z$1.ZodString;
1396
+ }, z$1.core.$strip>;
1397
+ }, z$1.core.$strip>;
1398
+ toObject(): {
1399
+ name: "UnknownError";
1400
+ data: {
1401
+ message: string;
1402
+ };
1403
+ };
1404
+ message: string;
1405
+ stack?: string;
1406
+ cause?: unknown;
1407
+ };
1408
+ readonly Schema: z$1.ZodObject<{
1409
+ name: z$1.ZodLiteral<"UnknownError">;
1410
+ data: z$1.ZodObject<{
1411
+ message: z$1.ZodString;
1412
+ }, z$1.core.$strip>;
1413
+ }, z$1.core.$strip>;
1414
+ isInstance(input: any): input is {
1415
+ readonly name: "UnknownError";
1416
+ readonly data: {
1417
+ message: string;
1418
+ };
1419
+ schema(): z$1.ZodObject<{
1420
+ name: z$1.ZodLiteral<"UnknownError">;
1421
+ data: z$1.ZodObject<{
1422
+ message: z$1.ZodString;
1423
+ }, z$1.core.$strip>;
1424
+ }, z$1.core.$strip>;
1425
+ toObject(): {
1426
+ name: "UnknownError";
1427
+ data: {
1428
+ message: string;
1429
+ };
1430
+ };
1431
+ message: string;
1432
+ stack?: string;
1433
+ cause?: unknown;
1434
+ };
1435
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1436
+ readonly Unknown: any;
1437
+ isError(error: unknown): error is Error;
1438
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1439
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1440
+ stackTraceLimit: number;
1441
+ };
1442
+ isError(error: unknown): error is Error;
1443
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1444
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1445
+ stackTraceLimit: number;
1446
+ };
1447
+ const AmbiguousError: {
1448
+ new (data: {
1449
+ message: string;
1450
+ name: string;
1451
+ candidates: {
1452
+ node: unknown;
1453
+ score: number;
1454
+ }[];
1455
+ }, options?: ErrorOptions): {
1456
+ readonly name: "CodebaseAmbiguousError";
1457
+ readonly data: {
1458
+ message: string;
1459
+ name: string;
1460
+ candidates: {
1461
+ node: unknown;
1462
+ score: number;
1463
+ }[];
1464
+ };
1465
+ schema(): z$1.ZodObject<{
1466
+ name: z$1.ZodLiteral<"CodebaseAmbiguousError">;
1467
+ data: z$1.ZodObject<{
1468
+ message: z$1.ZodString;
1469
+ name: z$1.ZodString;
1470
+ candidates: z$1.ZodArray<z$1.ZodObject<{
1471
+ node: z$1.ZodUnknown;
1472
+ score: z$1.ZodNumber;
1473
+ }, z$1.core.$strip>>;
1474
+ }, z$1.core.$strip>;
1475
+ }, z$1.core.$strip>;
1476
+ toObject(): {
1477
+ name: "CodebaseAmbiguousError";
1478
+ data: {
1479
+ message: string;
1480
+ name: string;
1481
+ candidates: {
1482
+ node: unknown;
1483
+ score: number;
1484
+ }[];
1485
+ };
1486
+ };
1487
+ message: string;
1488
+ stack?: string;
1489
+ cause?: unknown;
1490
+ };
1491
+ readonly Schema: z$1.ZodObject<{
1492
+ name: z$1.ZodLiteral<"CodebaseAmbiguousError">;
1493
+ data: z$1.ZodObject<{
1494
+ message: z$1.ZodString;
1495
+ name: z$1.ZodString;
1496
+ candidates: z$1.ZodArray<z$1.ZodObject<{
1497
+ node: z$1.ZodUnknown;
1498
+ score: z$1.ZodNumber;
1499
+ }, z$1.core.$strip>>;
1500
+ }, z$1.core.$strip>;
1501
+ }, z$1.core.$strip>;
1502
+ isInstance(input: any): input is InstanceType<any>;
1503
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1504
+ readonly Unknown: {
1505
+ new (data: {
1506
+ message: string;
1507
+ }, options?: ErrorOptions): {
1508
+ readonly name: "UnknownError";
1509
+ readonly data: {
1510
+ message: string;
1511
+ };
1512
+ schema(): z$1.ZodObject<{
1513
+ name: z$1.ZodLiteral<"UnknownError">;
1514
+ data: z$1.ZodObject<{
1515
+ message: z$1.ZodString;
1516
+ }, z$1.core.$strip>;
1517
+ }, z$1.core.$strip>;
1518
+ toObject(): {
1519
+ name: "UnknownError";
1520
+ data: {
1521
+ message: string;
1522
+ };
1523
+ };
1524
+ message: string;
1525
+ stack?: string;
1526
+ cause?: unknown;
1527
+ };
1528
+ readonly Schema: z$1.ZodObject<{
1529
+ name: z$1.ZodLiteral<"UnknownError">;
1530
+ data: z$1.ZodObject<{
1531
+ message: z$1.ZodString;
1532
+ }, z$1.core.$strip>;
1533
+ }, z$1.core.$strip>;
1534
+ isInstance(input: any): input is {
1535
+ readonly name: "UnknownError";
1536
+ readonly data: {
1537
+ message: string;
1538
+ };
1539
+ schema(): z$1.ZodObject<{
1540
+ name: z$1.ZodLiteral<"UnknownError">;
1541
+ data: z$1.ZodObject<{
1542
+ message: z$1.ZodString;
1543
+ }, z$1.core.$strip>;
1544
+ }, z$1.core.$strip>;
1545
+ toObject(): {
1546
+ name: "UnknownError";
1547
+ data: {
1548
+ message: string;
1549
+ };
1550
+ };
1551
+ message: string;
1552
+ stack?: string;
1553
+ cause?: unknown;
1554
+ };
1555
+ create<Name extends string, Data extends z$1.core.$ZodType>(name: Name, data: Data): any;
1556
+ readonly Unknown: any;
1557
+ isError(error: unknown): error is Error;
1558
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1559
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1560
+ stackTraceLimit: number;
1561
+ };
1562
+ isError(error: unknown): error is Error;
1563
+ captureStackTrace(targetObject: object, constructorOpt?: Function): void;
1564
+ prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any;
1565
+ stackTraceLimit: number;
1566
+ };
554
1567
  }
1568
+ declare const CODEBASE_BUSINESS_CODES: ReadonlySet<string>;
1569
+ declare const CODEBASE_BUSINESS_HINTS: Readonly<Record<string, string>>;
1570
+ declare function registerBusinessErrors(): Promise<void>;
555
1571
 
556
1572
  declare class NodeExtractor {
557
1573
  extractNodes(tree: ParseTree, source: string, language: Language, filePath: string): ExtractedNode[];
@@ -1145,23 +2161,6 @@ type StatusParams = {};
1145
2161
  type StatusResult = GraphStatus;
1146
2162
  type DoctorParams = {};
1147
2163
  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
2164
 
1166
2165
  declare function renderSearch(hits: Array<{
1167
2166
  nodeId: string;
@@ -1201,6 +2200,8 @@ declare function explore(ctx: ServiceContext, params: ExploreParams): Promise<Ex
1201
2200
  declare function status(ctx: ServiceContext, _params: StatusParams): Promise<StatusResult>;
1202
2201
  declare function doctor(ctx: ServiceContext, _params: DoctorParams): Promise<DoctorResult>;
1203
2202
 
2203
+ declare function initCodebase(): Promise<void>;
2204
+
1204
2205
  declare function setGlobalAdapter(global: IGlobal | null): void;
1205
2206
  declare function resetGlobalAdapter(): void;
1206
2207
  declare function getGlobal(): IGlobal;
@@ -1218,4 +2219,21 @@ declare function easbotDir(rootDir: string): string;
1218
2219
  declare function codebaseConfigPath(rootDir: string): string;
1219
2220
  declare function codebaseDbPath(rootDir: string): string;
1220
2221
 
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 };
2222
+ declare const CODEBASE_JSON_REL_PATH: readonly [".easbot", "codebase.json"];
2223
+ type StateResult = {
2224
+ codebaseJson: CodebaseJson | undefined;
2225
+ exists: boolean;
2226
+ rootDir: string;
2227
+ };
2228
+ declare namespace CodebaseCache {
2229
+ function state(): Promise<StateResult>;
2230
+ function resetState(): void;
2231
+ function init(): Promise<void>;
2232
+ function getCodebaseJson(): Promise<CodebaseJson | undefined>;
2233
+ function exists(): Promise<boolean>;
2234
+ function getRootDir(): Promise<string>;
2235
+ function writeCodebaseJson(partial: Partial<CodebaseJson>): Promise<CodebaseJson>;
2236
+ function getConfigPath(): Promise<string>;
2237
+ }
2238
+
2239
+ 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 };