@hasna/search 0.0.7 → 0.0.9

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 (59) hide show
  1. package/README.md +68 -7
  2. package/dist/cli/index.js +10483 -12908
  3. package/dist/cli/local.d.ts +3 -0
  4. package/dist/cli/local.d.ts.map +1 -0
  5. package/dist/cli/storage.d.ts +3 -0
  6. package/dist/cli/storage.d.ts.map +1 -0
  7. package/dist/db/database.d.ts +1 -0
  8. package/dist/db/database.d.ts.map +1 -1
  9. package/dist/db/index-db.d.ts +6 -0
  10. package/dist/db/index-db.d.ts.map +1 -0
  11. package/dist/db/index-migrations.d.ts +3 -0
  12. package/dist/db/index-migrations.d.ts.map +1 -0
  13. package/dist/db/migrations.d.ts.map +1 -1
  14. package/dist/db/pg-migrate.d.ts +8 -0
  15. package/dist/db/pg-migrate.d.ts.map +1 -0
  16. package/dist/db/pg-migrations.d.ts +1 -1
  17. package/dist/db/providers.d.ts.map +1 -1
  18. package/dist/db/remote-storage.d.ts +12 -0
  19. package/dist/db/remote-storage.d.ts.map +1 -0
  20. package/dist/db/storage-config.d.ts +26 -0
  21. package/dist/db/storage-config.d.ts.map +1 -0
  22. package/dist/db/storage-sync.d.ts +35 -0
  23. package/dist/db/storage-sync.d.ts.map +1 -0
  24. package/dist/index.d.ts +11 -0
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +6850 -8733
  27. package/dist/lib/config.d.ts.map +1 -1
  28. package/dist/lib/dedup.d.ts.map +1 -1
  29. package/dist/lib/local/find.d.ts +38 -0
  30. package/dist/lib/local/find.d.ts.map +1 -0
  31. package/dist/lib/local/ignore.d.ts +38 -0
  32. package/dist/lib/local/ignore.d.ts.map +1 -0
  33. package/dist/lib/local/indexer.d.ts +57 -0
  34. package/dist/lib/local/indexer.d.ts.map +1 -0
  35. package/dist/lib/local/query.d.ts +60 -0
  36. package/dist/lib/local/query.d.ts.map +1 -0
  37. package/dist/lib/local/regex.d.ts +26 -0
  38. package/dist/lib/local/regex.d.ts.map +1 -0
  39. package/dist/lib/local/walker.d.ts +30 -0
  40. package/dist/lib/local/walker.d.ts.map +1 -0
  41. package/dist/lib/providers/content.d.ts +9 -0
  42. package/dist/lib/providers/content.d.ts.map +1 -0
  43. package/dist/lib/providers/files.d.ts +9 -0
  44. package/dist/lib/providers/files.d.ts.map +1 -0
  45. package/dist/lib/providers/index.d.ts.map +1 -1
  46. package/dist/lib/search.d.ts.map +1 -1
  47. package/dist/mcp/index.js +7520 -10144
  48. package/dist/mcp/server.d.ts +1 -1
  49. package/dist/mcp/server.d.ts.map +1 -1
  50. package/dist/mcp/storage-tools.d.ts +3 -0
  51. package/dist/mcp/storage-tools.d.ts.map +1 -0
  52. package/dist/server/index.js +13965 -16510
  53. package/dist/server/serve.d.ts.map +1 -1
  54. package/dist/storage.d.ts +7 -0
  55. package/dist/storage.d.ts.map +1 -0
  56. package/dist/storage.js +5584 -0
  57. package/dist/types/index.d.ts +10 -2
  58. package/dist/types/index.d.ts.map +1 -1
  59. package/package.json +18 -5
@@ -0,0 +1,3 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerLocalCommands(program: Command): void;
3
+ //# sourceMappingURL=local.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local.d.ts","sourceRoot":"","sources":["../../src/cli/local.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAmCzC,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAuM5D"}
@@ -0,0 +1,3 @@
1
+ import type { Command } from "commander";
2
+ export declare function registerStorageCommands(program: Command): void;
3
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/cli/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAyBzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyG9D"}
@@ -1,4 +1,5 @@
1
1
  import { Database } from "bun:sqlite";
2
+ export declare function getDbPath(): string;
2
3
  export declare function getDb(): Database;
3
4
  export declare function closeDb(): void;
4
5
  export declare function getDbForTesting(): Database;
@@ -1 +1 @@
1
- {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAoBtC,wBAAgB,KAAK,IAAI,QAAQ,CAehC;AAED,wBAAgB,OAAO,IAAI,IAAI,CAM9B;AAED,wBAAgB,eAAe,IAAI,QAAQ,CAO1C"}
1
+ {"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAoBtC,wBAAgB,SAAS,IAAI,MAAM,CASlC;AAED,wBAAgB,KAAK,IAAI,QAAQ,CAgBhC;AAED,wBAAgB,OAAO,IAAI,IAAI,CAK9B;AAED,wBAAgB,eAAe,IAAI,QAAQ,CAQ1C"}
@@ -0,0 +1,6 @@
1
+ import { Database } from "bun:sqlite";
2
+ export declare function getIndexDbPath(): string;
3
+ export declare function getIndexDb(): Database;
4
+ export declare function closeIndexDb(): void;
5
+ export declare function getIndexDbForTesting(): Database;
6
+ //# sourceMappingURL=index-db.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-db.d.ts","sourceRoot":"","sources":["../../src/db/index-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAMtC,wBAAgB,cAAc,IAAI,MAAM,CAQvC;AAaD,wBAAgB,UAAU,IAAI,QAAQ,CAIrC;AAED,wBAAgB,YAAY,IAAI,IAAI,CAKnC;AAED,wBAAgB,oBAAoB,IAAI,QAAQ,CAE/C"}
@@ -0,0 +1,3 @@
1
+ import type { Database } from "bun:sqlite";
2
+ export declare function runIndexMigrations(db: Database): void;
3
+ //# sourceMappingURL=index-migrations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-migrations.d.ts","sourceRoot":"","sources":["../../src/db/index-migrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAiF3C,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAgCrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/db/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA0I3C,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAgChD"}
1
+ {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../src/db/migrations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AA6K3C,wBAAgB,aAAa,CAAC,EAAE,EAAE,QAAQ,GAAG,IAAI,CAgChD"}
@@ -0,0 +1,8 @@
1
+ export interface PgMigrationResult {
2
+ applied: number[];
3
+ alreadyApplied: number[];
4
+ errors: string[];
5
+ totalMigrations: number;
6
+ }
7
+ export declare function applyPgMigrations(connectionString: string): Promise<PgMigrationResult>;
8
+ //# sourceMappingURL=pg-migrate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg-migrate.d.ts","sourceRoot":"","sources":["../../src/db/pg-migrate.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0C5F"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * PostgreSQL migrations for open-search cloud sync.
2
+ * PostgreSQL migrations for open-search storage sync.
3
3
  *
4
4
  * Equivalent to the SQLite schema in migrations.ts, translated for PostgreSQL.
5
5
  * FTS5 virtual tables and triggers are omitted (use pg_trgm / tsvector instead).
@@ -1 +1 @@
1
- {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/db/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EAAE,KAAK,cAAc,EAA2B,MAAM,mBAAmB,CAAC;AAsBjF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,IAAI,CAI9E;AAED,wBAAgB,aAAa,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,cAAc,EAAE,CAI7D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAInE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAIpE;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACvF,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAyBT;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAIxE;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAGtE"}
1
+ {"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["../../src/db/providers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,KAAK,cAAc,EAAiD,MAAM,mBAAmB,CAAC;AAsBvG,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,cAAc,GAAG,IAAI,CAI9E;AAED,wBAAgB,aAAa,CAAC,EAAE,CAAC,EAAE,QAAQ,GAAG,cAAc,EAAE,CAI7D;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAInE;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,CAIpE;AAED,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,EACvF,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAyBT;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,QAAQ,GAAG,IAAI,CAIxE;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAItE"}
@@ -0,0 +1,12 @@
1
+ export declare class PgAdapterAsync {
2
+ private readonly pool;
3
+ constructor(connectionString: string);
4
+ run(sql: string, ...params: unknown[]): Promise<{
5
+ changes: number;
6
+ }>;
7
+ get(sql: string, ...params: unknown[]): Promise<unknown>;
8
+ all(sql: string, ...params: unknown[]): Promise<unknown[]>;
9
+ exec(sql: string): Promise<void>;
10
+ close(): Promise<void>;
11
+ }
12
+ //# sourceMappingURL=remote-storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remote-storage.d.ts","sourceRoot":"","sources":["../../src/db/remote-storage.ts"],"names":[],"mappings":"AAmBA,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAEhB,gBAAgB,EAAE,MAAM;IAI9B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAK1D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
@@ -0,0 +1,26 @@
1
+ export type StorageMode = "local" | "hybrid" | "remote";
2
+ export interface StorageConfig {
3
+ mode: StorageMode;
4
+ rds: {
5
+ host: string;
6
+ port: number;
7
+ username: string;
8
+ password_env: string;
9
+ ssl: boolean;
10
+ };
11
+ }
12
+ export interface StorageEnv {
13
+ name: string;
14
+ }
15
+ export declare const SEARCH_STORAGE_ENV = "HASNA_SEARCH_DATABASE_URL";
16
+ export declare const SEARCH_STORAGE_FALLBACK_ENV = "SEARCH_DATABASE_URL";
17
+ export declare const SEARCH_STORAGE_MODE_ENV = "HASNA_SEARCH_STORAGE_MODE";
18
+ export declare const SEARCH_STORAGE_MODE_FALLBACK_ENV = "SEARCH_STORAGE_MODE";
19
+ export declare const STORAGE_DATABASE_ENV: readonly ["HASNA_SEARCH_DATABASE_URL", "SEARCH_DATABASE_URL"];
20
+ export declare const STORAGE_MODE_ENV: readonly ["HASNA_SEARCH_STORAGE_MODE", "SEARCH_STORAGE_MODE"];
21
+ export declare function getStorageDatabaseEnvName(): (typeof STORAGE_DATABASE_ENV)[number] | null;
22
+ export declare function getStorageDatabaseEnv(): StorageEnv | null;
23
+ export declare function getStorageDatabaseUrl(): string | undefined;
24
+ export declare function getStorageConfig(): StorageConfig;
25
+ export declare function getStorageConnectionString(dbName?: string): string;
26
+ //# sourceMappingURL=storage-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-config.d.ts","sourceRoot":"","sources":["../../src/db/storage-config.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,GAAG,EAAE,OAAO,CAAC;KACd,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAGD,eAAO,MAAM,kBAAkB,8BAA8B,CAAC;AAC9D,eAAO,MAAM,2BAA2B,wBAAwB,CAAC;AACjE,eAAO,MAAM,uBAAuB,8BAA8B,CAAC;AACnE,eAAO,MAAM,gCAAgC,wBAAwB,CAAC;AACtE,eAAO,MAAM,oBAAoB,+DAA6D,CAAC;AAC/F,eAAO,MAAM,gBAAgB,+DAAuE,CAAC;AAarG,wBAAgB,yBAAyB,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,GAAG,IAAI,CAKxF;AAED,wBAAgB,qBAAqB,IAAI,UAAU,GAAG,IAAI,CAGzD;AAED,wBAAgB,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAG1D;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CA+BhD;AAED,wBAAgB,0BAA0B,CAAC,MAAM,SAAW,GAAG,MAAM,CAiBpE"}
@@ -0,0 +1,35 @@
1
+ import { type Database } from "bun:sqlite";
2
+ import { STORAGE_DATABASE_ENV, type StorageMode } from "./storage-config.js";
3
+ import { PgAdapterAsync } from "./remote-storage.js";
4
+ export interface SyncResult {
5
+ table: string;
6
+ direction: "push" | "pull";
7
+ rowsRead: number;
8
+ rowsWritten: number;
9
+ errors: string[];
10
+ }
11
+ export interface StorageStatus {
12
+ configured: boolean;
13
+ mode: StorageMode;
14
+ enabled: boolean;
15
+ env: typeof STORAGE_DATABASE_ENV;
16
+ activeEnv: string | null;
17
+ service: "search";
18
+ db_path: string;
19
+ tables: Array<{
20
+ table: string;
21
+ rows: number;
22
+ }>;
23
+ }
24
+ export declare const STORAGE_TABLES: readonly ["searches", "search_results", "saved_searches", "providers", "search_profiles", "feedback"];
25
+ export declare function getStoragePg(): Promise<PgAdapterAsync>;
26
+ export declare function runStorageMigrations(remote: PgAdapterAsync): Promise<void>;
27
+ export declare function getStorageStatus(db?: Database): StorageStatus;
28
+ export declare function pushStorageChanges(tables?: string[]): Promise<SyncResult[]>;
29
+ export declare function pullStorageChanges(tables?: string[]): Promise<SyncResult[]>;
30
+ export declare function syncStorageChanges(tables?: string[]): Promise<{
31
+ push: SyncResult[];
32
+ pull: SyncResult[];
33
+ }>;
34
+ export declare function parseStorageTables(raw?: string): string[];
35
+ //# sourceMappingURL=storage-sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage-sync.d.ts","sourceRoot":"","sources":["../../src/db/storage-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,OAAO,EACL,oBAAoB,EAIpB,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,MAAM,WAAW,UAAU;IACzB,KAAK,E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ANGED
@@ -1,9 +1,20 @@
1
1
  export * from "./types/index.js";
2
2
  export { getDb, closeDb, getDbForTesting } from "./db/database.js";
3
+ export { SEARCH_STORAGE_ENV, SEARCH_STORAGE_FALLBACK_ENV, SEARCH_STORAGE_MODE_ENV, SEARCH_STORAGE_MODE_FALLBACK_ENV, STORAGE_DATABASE_ENV, STORAGE_MODE_ENV, getStorageConfig, getStorageConnectionString, getStorageDatabaseEnv, getStorageDatabaseEnvName, getStorageDatabaseUrl, type StorageEnv, type StorageConfig, type StorageMode, } from "./db/storage-config.js";
4
+ export { PgAdapterAsync } from "./db/remote-storage.js";
5
+ export { applyPgMigrations } from "./db/pg-migrate.js";
6
+ export { STORAGE_TABLES, getStoragePg, getStorageStatus, parseStorageTables, pullStorageChanges, pushStorageChanges, runStorageMigrations, syncStorageChanges, } from "./db/storage-sync.js";
7
+ export type { StorageStatus, SyncResult } from "./db/storage-sync.js";
3
8
  export { createSearch, getSearch, listSearches, deleteSearch, updateSearchResults, getSearchStats } from "./db/searches.js";
4
9
  export { createResult, createResults, getResult, listResults, searchResultsFts } from "./db/results.js";
5
10
  export { createSavedSearch, getSavedSearch, listSavedSearches, deleteSavedSearch, updateSavedSearchLastRun } from "./db/saved-searches.js";
6
11
  export { getProvider, listProviders, enableProvider, disableProvider, updateProvider, updateProviderLastUsed, isProviderConfigured } from "./db/providers.js";
7
12
  export { getProfile, getProfileByName, listProfiles, createProfile, deleteProfile } from "./db/profiles.js";
8
13
  export { getConfig, setConfig, resetConfig, getConfigValue, setConfigValue } from "./lib/config.js";
14
+ export { unifiedSearch, searchSingleProvider } from "./lib/search.js";
15
+ export { exportResults } from "./lib/export.js";
16
+ export { getIndexDb, closeIndexDb, getIndexDbPath, getIndexDbForTesting } from "./db/index-db.js";
17
+ export { addRoot, getRoot, listRoots, removeRoot, indexRoot, indexAllRoots, hasReadyRoot, refreshStaleRoots, autoRefreshStaleRoots, normalizeRootPath, type IndexRoot, type IndexStats, } from "./lib/local/indexer.js";
18
+ export { searchFilePaths, searchFileContent, type FileHit, type ContentHit, type LineMatch, type LocalQueryOptions, } from "./lib/local/query.js";
19
+ export { findLocal, type FindKind, type FindMatch, type FindOptions, type FindResponse, } from "./lib/local/find.js";
9
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,YAAY,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC5H,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAC3I,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9J,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAG5G,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AAGjC,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EACL,kBAAkB,EAClB,2BAA2B,EAC3B,uBAAuB,EACvB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