@tryformation/querylight-cli 0.1.1
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.
- package/Dockerfile +7 -0
- package/LICENSE +21 -0
- package/README.md +391 -0
- package/dist/chunk/chunk-store.d.ts +4 -0
- package/dist/chunk/chunker.d.ts +9 -0
- package/dist/cli/format.d.ts +4 -0
- package/dist/cli/main.d.ts +2 -0
- package/dist/cli/main.js +3523 -0
- package/dist/cli/run-cli.d.ts +5 -0
- package/dist/core/config.d.ts +4 -0
- package/dist/core/constants.d.ts +3 -0
- package/dist/core/errors.d.ts +17 -0
- package/dist/core/files.d.ts +1 -0
- package/dist/core/hashing.d.ts +1 -0
- package/dist/core/ids.d.ts +1 -0
- package/dist/core/jsonl.d.ts +2 -0
- package/dist/core/runs.d.ts +3 -0
- package/dist/core/workspace.d.ts +7 -0
- package/dist/index/index-store.d.ts +11 -0
- package/dist/index/querylight-indexer.d.ts +14 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +2794 -0
- package/dist/ingest/adapters/crawl4ai-adapter.d.ts +1 -0
- package/dist/ingest/adapters/directory-adapter.d.ts +2 -0
- package/dist/ingest/adapters/file-adapter.d.ts +16 -0
- package/dist/ingest/adapters/rss-adapter.d.ts +7 -0
- package/dist/ingest/adapters/url-adapter.d.ts +11 -0
- package/dist/ingest/adapters/website-adapter.d.ts +2 -0
- package/dist/ingest/document-utils.d.ts +24 -0
- package/dist/ingest/extractors/docx-extractor.d.ts +1 -0
- package/dist/ingest/extractors/html-extractor.d.ts +5 -0
- package/dist/ingest/extractors/markdown-extractor.d.ts +1 -0
- package/dist/ingest/extractors/pdf-extractor.d.ts +1 -0
- package/dist/ingest/extractors/text-extractor.d.ts +1 -0
- package/dist/ingest/ingest-service.d.ts +23 -0
- package/dist/normalize/boilerplate.d.ts +1 -0
- package/dist/normalize/normalize-markdown.d.ts +2 -0
- package/dist/query/context-builder.d.ts +8 -0
- package/dist/query/related-service.d.ts +6 -0
- package/dist/query/search-service.d.ts +31 -0
- package/dist/report/diff-service.d.ts +23 -0
- package/dist/sources/source-model.d.ts +1 -0
- package/dist/sources/source-store.d.ts +7 -0
- package/dist/types/models.d.ts +309 -0
- package/dist/vector/dense.d.ts +13 -0
- package/dist/vector/runtime.d.ts +18 -0
- package/dist/vector/service.d.ts +26 -0
- package/dist/vector/sparse.d.ts +19 -0
- package/dist/vector/store.d.ts +20 -0
- package/dist/vector/text.d.ts +3 -0
- package/package.json +66 -0
- package/scripts/sparse-encode.py +104 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkspaceConfig } from "../types/models.js";
|
|
2
|
+
export declare const defaultConfig: () => WorkspaceConfig;
|
|
3
|
+
export declare function writeDefaultConfig(workspacePath: string, force?: boolean): Promise<void>;
|
|
4
|
+
export declare function loadConfig(workspacePath: string, configPath?: string): Promise<WorkspaceConfig>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum ExitCode {
|
|
2
|
+
Success = 0,
|
|
3
|
+
GeneralError = 1,
|
|
4
|
+
InvalidArguments = 2,
|
|
5
|
+
WorkspaceError = 3,
|
|
6
|
+
SourceError = 4,
|
|
7
|
+
IngestionError = 5,
|
|
8
|
+
IndexError = 6,
|
|
9
|
+
QueryError = 7,
|
|
10
|
+
ProviderError = 8
|
|
11
|
+
}
|
|
12
|
+
export declare class CliError extends Error {
|
|
13
|
+
readonly code: string;
|
|
14
|
+
readonly exitCode: ExitCode;
|
|
15
|
+
readonly details?: unknown | undefined;
|
|
16
|
+
constructor(message: string, code: string, exitCode: ExitCode, details?: unknown | undefined);
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fileExists(filePath: string): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function sha256(input: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function stableId(prefix: string, ...parts: string[]): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IndexMetadata } from "../types/models.js";
|
|
2
|
+
export declare function writeIndexArtifacts({ workspacePath, indexState, metadata }: {
|
|
3
|
+
workspacePath: string;
|
|
4
|
+
indexState: object;
|
|
5
|
+
metadata: IndexMetadata;
|
|
6
|
+
}): Promise<{
|
|
7
|
+
indexPath: string;
|
|
8
|
+
metadataPath: string;
|
|
9
|
+
}>;
|
|
10
|
+
export declare function readLatestIndexState(workspacePath: string): Promise<object>;
|
|
11
|
+
export declare function readLatestIndexMetadata(workspacePath: string): Promise<IndexMetadata>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TextFieldIndex } from "@tryformation/querylight-ts";
|
|
2
|
+
import type { IndexMetadata } from "../types/models.js";
|
|
3
|
+
export declare function createIndexMapping(extraFields?: string[]): Record<string, TextFieldIndex>;
|
|
4
|
+
export declare function buildIndex({ workspacePath, denseOverride, sparseOverride, buildAvailableModels }: {
|
|
5
|
+
workspacePath: string;
|
|
6
|
+
denseOverride?: boolean;
|
|
7
|
+
sparseOverride?: boolean;
|
|
8
|
+
buildAvailableModels?: boolean;
|
|
9
|
+
}): Promise<{
|
|
10
|
+
metadata: IndexMetadata;
|
|
11
|
+
indexPath: string;
|
|
12
|
+
denseBuilt: boolean;
|
|
13
|
+
sparseBuilt: boolean;
|
|
14
|
+
}>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./types/models.js";
|
|
2
|
+
export * from "./core/workspace.js";
|
|
3
|
+
export * from "./core/config.js";
|
|
4
|
+
export * from "./sources/source-store.js";
|
|
5
|
+
export * from "./ingest/ingest-service.js";
|
|
6
|
+
export * from "./chunk/chunker.js";
|
|
7
|
+
export * from "./index/querylight-indexer.js";
|
|
8
|
+
export * from "./query/search-service.js";
|
|
9
|
+
export * from "./query/related-service.js";
|
|
10
|
+
export * from "./query/context-builder.js";
|
|
11
|
+
export * from "./report/diff-service.js";
|