@easbot/codebase 0.3.29 → 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 (73) 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-4XKCGYFF.mjs → chunk-33DIOGLJ.mjs} +22 -22
  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-YJK7F6NJ.cjs → chunk-OZYQQS63.cjs} +22 -22
  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-S7TJGWWS.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-DFKFFRSM.cjs → stdio-server-KA3JQB7C.cjs} +2 -2
  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 +149 -41
  45. package/dist/index.d.ts +149 -41
  46. package/dist/index.mjs +1 -1
  47. package/package.json +8 -9
  48. package/dist/chunks/chunk-23YR2LAM.cjs +0 -1
  49. package/dist/chunks/chunk-2YMB6W5S.mjs +0 -1
  50. package/dist/chunks/chunk-3RVRPGJC.mjs +0 -1
  51. package/dist/chunks/chunk-3UGOMK4F.cjs +0 -62
  52. package/dist/chunks/chunk-5M2N7JFP.cjs +0 -1
  53. package/dist/chunks/chunk-A4YJ5ZVE.cjs +0 -203
  54. package/dist/chunks/chunk-J7AIRI5N.mjs +0 -203
  55. package/dist/chunks/chunk-LLO6DDXU.mjs +0 -48
  56. package/dist/chunks/chunk-LQVKXVBS.mjs +0 -51
  57. package/dist/chunks/chunk-LZLPJAB6.mjs +0 -62
  58. package/dist/chunks/chunk-M2YU5LAI.cjs +0 -1
  59. package/dist/chunks/chunk-MZHDSOD7.mjs +0 -1
  60. package/dist/chunks/chunk-OGTQ7MWV.cjs +0 -51
  61. package/dist/chunks/chunk-V6PHJ4DG.cjs +0 -48
  62. package/dist/chunks/cli-handler-B7WPIZRE.cjs +0 -1
  63. package/dist/chunks/cli-handler-EJX27R4Q.mjs +0 -1
  64. package/dist/chunks/code-base-FSOSU46G.mjs +0 -1
  65. package/dist/chunks/code-base-OWYMNEQG.cjs +0 -1
  66. package/dist/chunks/database-manager-7D7NDXJK.mjs +0 -1
  67. package/dist/chunks/database-manager-X4DMAUWC.cjs +0 -1
  68. package/dist/chunks/file-watcher-E2JROVI7.cjs +0 -1
  69. package/dist/chunks/file-watcher-KSLBUUPP.mjs +0 -1
  70. package/dist/chunks/interfaces-URUTHSR2.cjs +0 -1
  71. package/dist/chunks/llm-R2ZLKZDO.cjs +0 -1
  72. package/dist/chunks/llm-U57HNTZO.mjs +0 -1
  73. package/dist/chunks/stdio-server-NV5YAXJD.mjs +0 -30
package/dist/index.d.ts CHANGED
@@ -3,8 +3,7 @@ export { CodebaseKnowledgeConfig, CodebaseKnowledgeConfigWithModels, SyncConfig
3
3
  import z$1, { z } from 'zod';
4
4
  import { EmbeddingModelV3 } from '@ai-sdk/provider';
5
5
  export { EmbeddingModelV3 as EmbeddingModel } from '@ai-sdk/provider';
6
- import { LanguageModel, EmbeddingModel } from 'ai';
7
- import { ILLMInitConfig, ILLMCapabilities, ILLM } from '@easbot/llm';
6
+ import { ILLMInitConfig, ILLMCapabilities, LanguageModelRef, EmbeddingModelRef, ILLM } from '@easbot/llm';
8
7
  export { ServiceError, ServiceError as ServiceErrorInstance } from '@easbot/utils';
9
8
 
10
9
  type IndexState = 'uninitialized' | 'indexing' | 'complete' | 'partial' | 'failed' | 'stale';
@@ -257,6 +256,7 @@ interface SearchOptions extends KnowledgeSearchOptions {
257
256
  filePath?: string;
258
257
  astType?: string;
259
258
  enableFts?: boolean;
259
+ snippetMaxChars?: number;
260
260
  includeEdges?: boolean;
261
261
  edgesLimit?: number;
262
262
  embedding?: EmbeddingModelV3;
@@ -328,8 +328,8 @@ declare const CodebaseJsonSchema: z.ZodObject<{
328
328
  backend: z.ZodOptional<z.ZodString>;
329
329
  created_at: z.ZodOptional<z.ZodString>;
330
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>>;
331
+ evaluation_model: z.ZodOptional<z.ZodNullable<z.ZodString>>;
332
+ evaluation_threshold: z.ZodOptional<z.ZodNumber>;
333
333
  }, z.core.$loose>;
334
334
  type CodebaseJson = z.infer<typeof CodebaseJsonSchema>;
335
335
  declare const DEFAULT_CODEBASE_JSON: CodebaseJson;
@@ -530,6 +530,7 @@ declare namespace CodebaseError {
530
530
  filePath: string;
531
531
  }, options?: ErrorOptions): {
532
532
  readonly name: "CodebaseParserError";
533
+ readonly message: string;
533
534
  readonly data: {
534
535
  message: string;
535
536
  filePath: string;
@@ -548,7 +549,6 @@ declare namespace CodebaseError {
548
549
  filePath: string;
549
550
  };
550
551
  };
551
- message: string;
552
552
  stack?: string;
553
553
  cause?: unknown;
554
554
  };
@@ -566,6 +566,7 @@ declare namespace CodebaseError {
566
566
  message: string;
567
567
  }, options?: ErrorOptions): {
568
568
  readonly name: "UnknownError";
569
+ readonly message: string;
569
570
  readonly data: {
570
571
  message: string;
571
572
  };
@@ -581,7 +582,6 @@ declare namespace CodebaseError {
581
582
  message: string;
582
583
  };
583
584
  };
584
- message: string;
585
585
  stack?: string;
586
586
  cause?: unknown;
587
587
  };
@@ -593,6 +593,7 @@ declare namespace CodebaseError {
593
593
  }, z$1.core.$strip>;
594
594
  isInstance(input: any): input is {
595
595
  readonly name: "UnknownError";
596
+ readonly message: string;
596
597
  readonly data: {
597
598
  message: string;
598
599
  };
@@ -608,7 +609,6 @@ declare namespace CodebaseError {
608
609
  message: string;
609
610
  };
610
611
  };
611
- message: string;
612
612
  stack?: string;
613
613
  cause?: unknown;
614
614
  };
@@ -630,6 +630,7 @@ declare namespace CodebaseError {
630
630
  operation: string;
631
631
  }, options?: ErrorOptions): {
632
632
  readonly name: "CodebaseDatabaseError";
633
+ readonly message: string;
633
634
  readonly data: {
634
635
  message: string;
635
636
  operation: string;
@@ -648,7 +649,6 @@ declare namespace CodebaseError {
648
649
  operation: string;
649
650
  };
650
651
  };
651
- message: string;
652
652
  stack?: string;
653
653
  cause?: unknown;
654
654
  };
@@ -666,6 +666,7 @@ declare namespace CodebaseError {
666
666
  message: string;
667
667
  }, options?: ErrorOptions): {
668
668
  readonly name: "UnknownError";
669
+ readonly message: string;
669
670
  readonly data: {
670
671
  message: string;
671
672
  };
@@ -681,7 +682,6 @@ declare namespace CodebaseError {
681
682
  message: string;
682
683
  };
683
684
  };
684
- message: string;
685
685
  stack?: string;
686
686
  cause?: unknown;
687
687
  };
@@ -693,6 +693,7 @@ declare namespace CodebaseError {
693
693
  }, z$1.core.$strip>;
694
694
  isInstance(input: any): input is {
695
695
  readonly name: "UnknownError";
696
+ readonly message: string;
696
697
  readonly data: {
697
698
  message: string;
698
699
  };
@@ -708,7 +709,6 @@ declare namespace CodebaseError {
708
709
  message: string;
709
710
  };
710
711
  };
711
- message: string;
712
712
  stack?: string;
713
713
  cause?: unknown;
714
714
  };
@@ -730,6 +730,7 @@ declare namespace CodebaseError {
730
730
  missing?: string[] | undefined;
731
731
  }, options?: ErrorOptions): {
732
732
  readonly name: "CodebaseSchemaError";
733
+ readonly message: string;
733
734
  readonly data: {
734
735
  message: string;
735
736
  missing?: string[] | undefined;
@@ -748,7 +749,6 @@ declare namespace CodebaseError {
748
749
  missing?: string[] | undefined;
749
750
  };
750
751
  };
751
- message: string;
752
752
  stack?: string;
753
753
  cause?: unknown;
754
754
  };
@@ -766,6 +766,7 @@ declare namespace CodebaseError {
766
766
  message: string;
767
767
  }, options?: ErrorOptions): {
768
768
  readonly name: "UnknownError";
769
+ readonly message: string;
769
770
  readonly data: {
770
771
  message: string;
771
772
  };
@@ -781,7 +782,6 @@ declare namespace CodebaseError {
781
782
  message: string;
782
783
  };
783
784
  };
784
- message: string;
785
785
  stack?: string;
786
786
  cause?: unknown;
787
787
  };
@@ -793,6 +793,7 @@ declare namespace CodebaseError {
793
793
  }, z$1.core.$strip>;
794
794
  isInstance(input: any): input is {
795
795
  readonly name: "UnknownError";
796
+ readonly message: string;
796
797
  readonly data: {
797
798
  message: string;
798
799
  };
@@ -808,7 +809,6 @@ declare namespace CodebaseError {
808
809
  message: string;
809
810
  };
810
811
  };
811
- message: string;
812
812
  stack?: string;
813
813
  cause?: unknown;
814
814
  };
@@ -830,6 +830,7 @@ declare namespace CodebaseError {
830
830
  filePath: string;
831
831
  }, options?: ErrorOptions): {
832
832
  readonly name: "CodebaseFileSystemError";
833
+ readonly message: string;
833
834
  readonly data: {
834
835
  message: string;
835
836
  filePath: string;
@@ -848,7 +849,6 @@ declare namespace CodebaseError {
848
849
  filePath: string;
849
850
  };
850
851
  };
851
- message: string;
852
852
  stack?: string;
853
853
  cause?: unknown;
854
854
  };
@@ -866,6 +866,7 @@ declare namespace CodebaseError {
866
866
  message: string;
867
867
  }, options?: ErrorOptions): {
868
868
  readonly name: "UnknownError";
869
+ readonly message: string;
869
870
  readonly data: {
870
871
  message: string;
871
872
  };
@@ -881,7 +882,6 @@ declare namespace CodebaseError {
881
882
  message: string;
882
883
  };
883
884
  };
884
- message: string;
885
885
  stack?: string;
886
886
  cause?: unknown;
887
887
  };
@@ -893,6 +893,7 @@ declare namespace CodebaseError {
893
893
  }, z$1.core.$strip>;
894
894
  isInstance(input: any): input is {
895
895
  readonly name: "UnknownError";
896
+ readonly message: string;
896
897
  readonly data: {
897
898
  message: string;
898
899
  };
@@ -908,7 +909,6 @@ declare namespace CodebaseError {
908
909
  message: string;
909
910
  };
910
911
  };
911
- message: string;
912
912
  stack?: string;
913
913
  cause?: unknown;
914
914
  };
@@ -930,6 +930,7 @@ declare namespace CodebaseError {
930
930
  filePath?: string | undefined;
931
931
  }, options?: ErrorOptions): {
932
932
  readonly name: "CodebaseIndexError";
933
+ readonly message: string;
933
934
  readonly data: {
934
935
  message: string;
935
936
  filePath?: string | undefined;
@@ -948,7 +949,6 @@ declare namespace CodebaseError {
948
949
  filePath?: string | undefined;
949
950
  };
950
951
  };
951
- message: string;
952
952
  stack?: string;
953
953
  cause?: unknown;
954
954
  };
@@ -966,6 +966,7 @@ declare namespace CodebaseError {
966
966
  message: string;
967
967
  }, options?: ErrorOptions): {
968
968
  readonly name: "UnknownError";
969
+ readonly message: string;
969
970
  readonly data: {
970
971
  message: string;
971
972
  };
@@ -981,7 +982,6 @@ declare namespace CodebaseError {
981
982
  message: string;
982
983
  };
983
984
  };
984
- message: string;
985
985
  stack?: string;
986
986
  cause?: unknown;
987
987
  };
@@ -993,6 +993,7 @@ declare namespace CodebaseError {
993
993
  }, z$1.core.$strip>;
994
994
  isInstance(input: any): input is {
995
995
  readonly name: "UnknownError";
996
+ readonly message: string;
996
997
  readonly data: {
997
998
  message: string;
998
999
  };
@@ -1008,7 +1009,6 @@ declare namespace CodebaseError {
1008
1009
  message: string;
1009
1010
  };
1010
1011
  };
1011
- message: string;
1012
1012
  stack?: string;
1013
1013
  cause?: unknown;
1014
1014
  };
@@ -1030,6 +1030,7 @@ declare namespace CodebaseError {
1030
1030
  field?: string | undefined;
1031
1031
  }, options?: ErrorOptions): {
1032
1032
  readonly name: "CodebaseConfigError";
1033
+ readonly message: string;
1033
1034
  readonly data: {
1034
1035
  message: string;
1035
1036
  field?: string | undefined;
@@ -1048,7 +1049,6 @@ declare namespace CodebaseError {
1048
1049
  field?: string | undefined;
1049
1050
  };
1050
1051
  };
1051
- message: string;
1052
1052
  stack?: string;
1053
1053
  cause?: unknown;
1054
1054
  };
@@ -1066,6 +1066,7 @@ declare namespace CodebaseError {
1066
1066
  message: string;
1067
1067
  }, options?: ErrorOptions): {
1068
1068
  readonly name: "UnknownError";
1069
+ readonly message: string;
1069
1070
  readonly data: {
1070
1071
  message: string;
1071
1072
  };
@@ -1081,7 +1082,6 @@ declare namespace CodebaseError {
1081
1082
  message: string;
1082
1083
  };
1083
1084
  };
1084
- message: string;
1085
1085
  stack?: string;
1086
1086
  cause?: unknown;
1087
1087
  };
@@ -1093,6 +1093,7 @@ declare namespace CodebaseError {
1093
1093
  }, z$1.core.$strip>;
1094
1094
  isInstance(input: any): input is {
1095
1095
  readonly name: "UnknownError";
1096
+ readonly message: string;
1096
1097
  readonly data: {
1097
1098
  message: string;
1098
1099
  };
@@ -1108,7 +1109,6 @@ declare namespace CodebaseError {
1108
1109
  message: string;
1109
1110
  };
1110
1111
  };
1111
- message: string;
1112
1112
  stack?: string;
1113
1113
  cause?: unknown;
1114
1114
  };
@@ -1130,6 +1130,7 @@ declare namespace CodebaseError {
1130
1130
  params?: Record<string, unknown> | undefined;
1131
1131
  }, options?: ErrorOptions): {
1132
1132
  readonly name: "CodebaseQueryError";
1133
+ readonly message: string;
1133
1134
  readonly data: {
1134
1135
  message: string;
1135
1136
  params?: Record<string, unknown> | undefined;
@@ -1148,7 +1149,6 @@ declare namespace CodebaseError {
1148
1149
  params?: Record<string, unknown> | undefined;
1149
1150
  };
1150
1151
  };
1151
- message: string;
1152
1152
  stack?: string;
1153
1153
  cause?: unknown;
1154
1154
  };
@@ -1166,6 +1166,7 @@ declare namespace CodebaseError {
1166
1166
  message: string;
1167
1167
  }, options?: ErrorOptions): {
1168
1168
  readonly name: "UnknownError";
1169
+ readonly message: string;
1169
1170
  readonly data: {
1170
1171
  message: string;
1171
1172
  };
@@ -1181,7 +1182,6 @@ declare namespace CodebaseError {
1181
1182
  message: string;
1182
1183
  };
1183
1184
  };
1184
- message: string;
1185
1185
  stack?: string;
1186
1186
  cause?: unknown;
1187
1187
  };
@@ -1193,6 +1193,7 @@ declare namespace CodebaseError {
1193
1193
  }, z$1.core.$strip>;
1194
1194
  isInstance(input: any): input is {
1195
1195
  readonly name: "UnknownError";
1196
+ readonly message: string;
1196
1197
  readonly data: {
1197
1198
  message: string;
1198
1199
  };
@@ -1208,7 +1209,6 @@ declare namespace CodebaseError {
1208
1209
  message: string;
1209
1210
  };
1210
1211
  };
1211
- message: string;
1212
1212
  stack?: string;
1213
1213
  cause?: unknown;
1214
1214
  };
@@ -1230,6 +1230,7 @@ declare namespace CodebaseError {
1230
1230
  filePath: string;
1231
1231
  }, options?: ErrorOptions): {
1232
1232
  readonly name: "CodebaseUnsupportedLanguageError";
1233
+ readonly message: string;
1233
1234
  readonly data: {
1234
1235
  extension: string;
1235
1236
  filePath: string;
@@ -1248,7 +1249,6 @@ declare namespace CodebaseError {
1248
1249
  filePath: string;
1249
1250
  };
1250
1251
  };
1251
- message: string;
1252
1252
  stack?: string;
1253
1253
  cause?: unknown;
1254
1254
  };
@@ -1266,6 +1266,7 @@ declare namespace CodebaseError {
1266
1266
  message: string;
1267
1267
  }, options?: ErrorOptions): {
1268
1268
  readonly name: "UnknownError";
1269
+ readonly message: string;
1269
1270
  readonly data: {
1270
1271
  message: string;
1271
1272
  };
@@ -1281,7 +1282,6 @@ declare namespace CodebaseError {
1281
1282
  message: string;
1282
1283
  };
1283
1284
  };
1284
- message: string;
1285
1285
  stack?: string;
1286
1286
  cause?: unknown;
1287
1287
  };
@@ -1293,6 +1293,7 @@ declare namespace CodebaseError {
1293
1293
  }, z$1.core.$strip>;
1294
1294
  isInstance(input: any): input is {
1295
1295
  readonly name: "UnknownError";
1296
+ readonly message: string;
1296
1297
  readonly data: {
1297
1298
  message: string;
1298
1299
  };
@@ -1308,7 +1309,106 @@ declare namespace CodebaseError {
1308
1309
  message: string;
1309
1310
  };
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: {
1311
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
+ };
1312
1412
  stack?: string;
1313
1413
  cause?: unknown;
1314
1414
  };
@@ -1334,6 +1434,7 @@ declare namespace CodebaseError {
1334
1434
  }[] | undefined;
1335
1435
  }, options?: ErrorOptions): {
1336
1436
  readonly name: "CodebaseNotFoundError";
1437
+ readonly message: string;
1337
1438
  readonly data: {
1338
1439
  message: string;
1339
1440
  name: string;
@@ -1364,7 +1465,6 @@ declare namespace CodebaseError {
1364
1465
  }[] | undefined;
1365
1466
  };
1366
1467
  };
1367
- message: string;
1368
1468
  stack?: string;
1369
1469
  cause?: unknown;
1370
1470
  };
@@ -1386,6 +1486,7 @@ declare namespace CodebaseError {
1386
1486
  message: string;
1387
1487
  }, options?: ErrorOptions): {
1388
1488
  readonly name: "UnknownError";
1489
+ readonly message: string;
1389
1490
  readonly data: {
1390
1491
  message: string;
1391
1492
  };
@@ -1401,7 +1502,6 @@ declare namespace CodebaseError {
1401
1502
  message: string;
1402
1503
  };
1403
1504
  };
1404
- message: string;
1405
1505
  stack?: string;
1406
1506
  cause?: unknown;
1407
1507
  };
@@ -1413,6 +1513,7 @@ declare namespace CodebaseError {
1413
1513
  }, z$1.core.$strip>;
1414
1514
  isInstance(input: any): input is {
1415
1515
  readonly name: "UnknownError";
1516
+ readonly message: string;
1416
1517
  readonly data: {
1417
1518
  message: string;
1418
1519
  };
@@ -1428,7 +1529,6 @@ declare namespace CodebaseError {
1428
1529
  message: string;
1429
1530
  };
1430
1531
  };
1431
- message: string;
1432
1532
  stack?: string;
1433
1533
  cause?: unknown;
1434
1534
  };
@@ -1454,6 +1554,7 @@ declare namespace CodebaseError {
1454
1554
  }[];
1455
1555
  }, options?: ErrorOptions): {
1456
1556
  readonly name: "CodebaseAmbiguousError";
1557
+ readonly message: string;
1457
1558
  readonly data: {
1458
1559
  message: string;
1459
1560
  name: string;
@@ -1484,7 +1585,6 @@ declare namespace CodebaseError {
1484
1585
  }[];
1485
1586
  };
1486
1587
  };
1487
- message: string;
1488
1588
  stack?: string;
1489
1589
  cause?: unknown;
1490
1590
  };
@@ -1506,6 +1606,7 @@ declare namespace CodebaseError {
1506
1606
  message: string;
1507
1607
  }, options?: ErrorOptions): {
1508
1608
  readonly name: "UnknownError";
1609
+ readonly message: string;
1509
1610
  readonly data: {
1510
1611
  message: string;
1511
1612
  };
@@ -1521,7 +1622,6 @@ declare namespace CodebaseError {
1521
1622
  message: string;
1522
1623
  };
1523
1624
  };
1524
- message: string;
1525
1625
  stack?: string;
1526
1626
  cause?: unknown;
1527
1627
  };
@@ -1533,6 +1633,7 @@ declare namespace CodebaseError {
1533
1633
  }, z$1.core.$strip>;
1534
1634
  isInstance(input: any): input is {
1535
1635
  readonly name: "UnknownError";
1636
+ readonly message: string;
1536
1637
  readonly data: {
1537
1638
  message: string;
1538
1639
  };
@@ -1548,7 +1649,6 @@ declare namespace CodebaseError {
1548
1649
  message: string;
1549
1650
  };
1550
1651
  };
1551
- message: string;
1552
1652
  stack?: string;
1553
1653
  cause?: unknown;
1554
1654
  };
@@ -1814,8 +1914,8 @@ declare class CodeBase implements ICodebase {
1814
1914
  declare function createCodebase(config?: Partial<CodebaseConfig>): Promise<ICodebase>;
1815
1915
 
1816
1916
  interface LlmModels {
1817
- graphLlm?: LanguageModel;
1818
- embeddingLlm?: EmbeddingModel;
1917
+ evaluation?: LanguageModelRef;
1918
+ embedding?: EmbeddingModelRef;
1819
1919
  }
1820
1920
  interface LlmOptions {
1821
1921
  maxOutputTokens?: number;
@@ -1823,8 +1923,9 @@ interface LlmOptions {
1823
1923
  }
1824
1924
  interface LlmInitConfig extends ILLMInitConfig {
1825
1925
  options?: {
1826
- graph?: LlmOptions;
1926
+ evaluation?: LlmOptions;
1827
1927
  };
1928
+ evaluationThreshold?: number;
1828
1929
  }
1829
1930
  interface EvaluationResult {
1830
1931
  score: number;
@@ -1833,21 +1934,26 @@ interface EvaluationResult {
1833
1934
  extraEntities: string[];
1834
1935
  wrongRelations: string[];
1835
1936
  missingRelations: string[];
1937
+ passing: boolean;
1836
1938
  }
1837
1939
  declare namespace Llm {
1838
- function init(config: ILLMInitConfig): void;
1940
+ function init(config: LlmInitConfig): void;
1941
+ function getEvaluationThreshold(): number;
1839
1942
  function isInitialized(): boolean;
1840
1943
  function _resetForTest(): void;
1841
1944
  function capabilities(): ILLMCapabilities;
1842
- function getGraphLlm(): LanguageModel | undefined;
1843
- 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;
1844
1950
  function generateText(prompt: string, options?: LlmOptions): Promise<string>;
1845
1951
  function evaluateExtraction(params: {
1846
1952
  gold: string;
1847
1953
  predicted: string;
1954
+ threshold?: number;
1848
1955
  options?: LlmOptions;
1849
1956
  }): Promise<EvaluationResult>;
1850
- function parseEvaluationResult(text: string): EvaluationResult;
1851
1957
  }
1852
1958
  declare const llm: ILLM;
1853
1959
 
@@ -2004,6 +2110,7 @@ interface SearchParams {
2004
2110
  enableFts?: boolean;
2005
2111
  enableEmbedding?: boolean;
2006
2112
  maxEdgesPerNode?: number;
2113
+ snippetMaxChars?: number;
2007
2114
  }
2008
2115
  interface SearchHit {
2009
2116
  nodeId: string;
@@ -2143,6 +2250,7 @@ interface ExploreParams {
2143
2250
  depth?: number;
2144
2251
  includeContent?: boolean;
2145
2252
  intent?: string;
2253
+ snippetMaxChars?: number;
2146
2254
  }
2147
2255
  interface ExploreEntryPoint {
2148
2256
  file: string;
@@ -2227,7 +2335,7 @@ type StateResult = {
2227
2335
  };
2228
2336
  declare namespace CodebaseCache {
2229
2337
  function state(): Promise<StateResult>;
2230
- function resetState(): void;
2338
+ function resetState(writtenPath?: string): void;
2231
2339
  function init(): Promise<void>;
2232
2340
  function getCodebaseJson(): Promise<CodebaseJson | undefined>;
2233
2341
  function exists(): Promise<boolean>;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- export{a as CODEBASE_JSON_REL_PATH,b as CodebaseCache,f as handleCodebaseCli,c as renderBanner,d as renderHelp}from'./chunks/chunk-LLO6DDXU.mjs';export{c as getGlobal,g as getHomeDir,f as getInstance,l as getProjectDirectory,k as getXdgCache,i as getXdgConfig,h as getXdgData,j as getXdgState,b as resetGlobalAdapter,e as resetInstanceAdapter,a as setGlobalAdapter,d as setInstanceAdapter}from'./chunks/chunk-MZHDSOD7.mjs';import'./chunks/chunk-3RVRPGJC.mjs';export{p as SECTION_END,o as SECTION_MARKER,f as callees,e as callers,c as context,u as defaultRiskLabel,i as doctor,n as emptyFormattedNode,g as explore,l as formatCodebaseEdge,k as formatCodebaseNode,m as formatCodebaseSearchHits,d as impact,j as initCodebase,b as node,C as renderCalleesFromResult,B as renderCallersFromResult,v as renderContext,A as renderContextFromQuery,F as renderExploreFromResult,t as renderImpact,z as renderImpactFromTuples,x as renderNeighborList,w as renderNode,E as renderNodeDetail,y as renderSearch,s as renderSearchResult,D as renderStatusFromResult,a as search,h as status,q as truncateAtSectionBoundary,r as truncateAtSectionBoundarySync}from'./chunks/chunk-LZLPJAB6.mjs';export{x as CodeBase,i as CodebaseJsonSchema,j as DEFAULT_CODEBASE_JSON,e as DEFAULT_EMBEDDING_CONFIG,f as DEFAULT_INDEXER_CONFIG,g as DEFAULT_PARSER_CONFIG,h as DEFAULT_TOKENIZER_CONFIG,r as EdgeExtractor,l as FILE_EXTENSION_MAP,t as Indexer,p as NodeExtractor,m as ParserManager,v as QueryInterface,b as codebaseConfigPath,c as codebaseDbPath,y as createCodebase,s as createEdgeExtractor,u as createIndexer,q as createNodeExtractor,w as createQueryInterface,a as easbotDir,n as getParserManager,o as resetParserManager}from'./chunks/chunk-J7AIRI5N.mjs';export{c as CODEBASE_BUSINESS_CODES,d as CODEBASE_BUSINESS_HINTS,b as CodebaseError,k as DatabaseManager,e as registerBusinessErrors}from'./chunks/chunk-4XKCGYFF.mjs';export{a as Llm,b as llm}from'./chunks/chunk-LQVKXVBS.mjs';import'./chunks/chunk-2YMB6W5S.mjs';
1
+ export{d as handleCodebaseCli,a as renderBanner,b as renderHelp}from'./chunks/chunk-37KKG3UK.mjs';export{p as SECTION_END,o as SECTION_MARKER,f as callees,e as callers,c as context,u as defaultRiskLabel,i as doctor,n as emptyFormattedNode,g as explore,l as formatCodebaseEdge,k as formatCodebaseNode,m as formatCodebaseSearchHits,d as impact,j as initCodebase,b as node,C as renderCalleesFromResult,B as renderCallersFromResult,v as renderContext,A as renderContextFromQuery,F as renderExploreFromResult,t as renderImpact,z as renderImpactFromTuples,x as renderNeighborList,w as renderNode,E as renderNodeDetail,y as renderSearch,s as renderSearchResult,D as renderStatusFromResult,a as search,h as status,q as truncateAtSectionBoundary,r as truncateAtSectionBoundarySync}from'./chunks/chunk-PRPBK7D6.mjs';export{a as CODEBASE_JSON_REL_PATH,b as CodebaseCache}from'./chunks/chunk-ETCTXAXR.mjs';export{c as getGlobal,g as getHomeDir,f as getInstance,l as getProjectDirectory,k as getXdgCache,i as getXdgConfig,h as getXdgData,j as getXdgState,b as resetGlobalAdapter,e as resetInstanceAdapter,a as setGlobalAdapter,d as setInstanceAdapter}from'./chunks/chunk-H4VZF3ZQ.mjs';import'./chunks/chunk-TMQVJU4I.mjs';export{r as CodeBase,l as EdgeExtractor,f as FILE_EXTENSION_MAP,n as Indexer,j as NodeExtractor,g as ParserManager,p as QueryInterface,b as codebaseConfigPath,c as codebaseDbPath,s as createCodebase,m as createEdgeExtractor,o as createIndexer,k as createNodeExtractor,q as createQueryInterface,a as easbotDir,h as getParserManager,i as resetParserManager}from'./chunks/chunk-KR6BQNY6.mjs';export{f as DatabaseManager}from'./chunks/chunk-33DIOGLJ.mjs';export{c as CODEBASE_BUSINESS_CODES,d as CODEBASE_BUSINESS_HINTS,b as CodebaseError,e as registerBusinessErrors}from'./chunks/chunk-KTSR5VPT.mjs';export{a as Llm,b as llm}from'./chunks/chunk-ESA2CL57.mjs';export{e as CodebaseJsonSchema,g as DEFAULT_CODEBASE_JSON,a as DEFAULT_EMBEDDING_CONFIG,b as DEFAULT_INDEXER_CONFIG,c as DEFAULT_PARSER_CONFIG,d as DEFAULT_TOKENIZER_CONFIG}from'./chunks/chunk-43WAI4Z7.mjs';import'./chunks/chunk-T6KJWYTV.mjs';