@tryformation/querylight-cli 0.1.1 → 0.2.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.
@@ -1,4 +1,7 @@
1
- export declare function runCli(argv: string[]): Promise<{
1
+ export declare function runCli(argv: string[], io?: {
2
+ onStdout?: (value: string) => void;
3
+ onStderr?: (value: string) => void;
4
+ }): Promise<{
2
5
  exitCode: number;
3
6
  stdout: string;
4
7
  stderr: string;
@@ -0,0 +1 @@
1
+ export declare function mapWithConcurrency<T>(items: readonly T[], limit: number, worker: (item: T, index: number) => Promise<void>): Promise<void>;
@@ -1,3 +1,5 @@
1
1
  export declare const PACKAGE_NAME = "@tryformation/querylight-cli";
2
- export declare const PACKAGE_VERSION = "0.1.0";
2
+ export declare const PACKAGE_VERSION = "0.2.1";
3
3
  export declare const DEFAULT_WORKSPACE = ".kb";
4
+ export declare const DEFAULT_SHARED_MODEL_CACHE_DIR = "~/.qli/models/huggingface";
5
+ export declare const LEGACY_WORKSPACE_MODEL_CACHE_DIR = ".kb/models/huggingface";
@@ -0,0 +1,3 @@
1
+ export declare function writeGzipJson(filePath: string, value: unknown): Promise<void>;
2
+ export declare function readJsonFromGzipOrFile<T>(gzipPath: string, legacyPath?: string): Promise<T>;
3
+ export declare function resolveExistingGzipOrFilePath(gzipPath: string, legacyPath?: string): Promise<string>;
@@ -0,0 +1,4 @@
1
+ export type ProgressLevel = "info" | "detail";
2
+ export type ProgressHandler = (level: ProgressLevel, message: string) => void;
3
+ export declare function reportProgress(progress: ProgressHandler | undefined, message: string): void;
4
+ export declare function reportProgressDetail(progress: ProgressHandler | undefined, message: string): void;
@@ -0,0 +1 @@
1
+ export declare function normalizeRemoteUrl(uri: string): string;
@@ -1,4 +1,6 @@
1
1
  import type { IndexMetadata } from "../types/models.js";
2
+ export declare function latestIndexPath(workspacePath: string): string;
3
+ export declare function latestMetaPath(workspacePath: string): string;
2
4
  export declare function writeIndexArtifacts({ workspacePath, indexState, metadata }: {
3
5
  workspacePath: string;
4
6
  indexState: object;
@@ -9,3 +11,4 @@ export declare function writeIndexArtifacts({ workspacePath, indexState, metadat
9
11
  }>;
10
12
  export declare function readLatestIndexState(workspacePath: string): Promise<object>;
11
13
  export declare function readLatestIndexMetadata(workspacePath: string): Promise<IndexMetadata>;
14
+ export declare function resolveLatestIndexArtifactPath(workspacePath: string): Promise<string>;
@@ -1,11 +1,13 @@
1
1
  import { TextFieldIndex } from "@tryformation/querylight-ts";
2
+ import { type ProgressHandler } from "../core/progress.js";
2
3
  import type { IndexMetadata } from "../types/models.js";
3
4
  export declare function createIndexMapping(extraFields?: string[]): Record<string, TextFieldIndex>;
4
- export declare function buildIndex({ workspacePath, denseOverride, sparseOverride, buildAvailableModels }: {
5
+ export declare function buildIndex({ workspacePath, denseOverride, sparseOverride, buildAvailableModels, progress }: {
5
6
  workspacePath: string;
6
7
  denseOverride?: boolean;
7
8
  sparseOverride?: boolean;
8
9
  buildAvailableModels?: boolean;
10
+ progress?: ProgressHandler;
9
11
  }): Promise<{
10
12
  metadata: IndexMetadata;
11
13
  indexPath: string;