@autorag/librarian 2.9.0 → 2.10.0
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/README.md +57 -2
- package/dist/agent/agent.d.ts +27 -21
- package/dist/agent/answer-citations.d.ts +22 -0
- package/dist/agent/answer-guidelines.d.ts +9 -9
- package/dist/agent/citations.d.ts +35 -23
- package/dist/agent/evidence-ledger.d.ts +7 -12
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/{emit-results-tool.d.ts → results.d.ts} +5 -40
- package/dist/agent/search-documents.d.ts +14 -19
- package/dist/agent/self-config.d.ts +1 -1
- package/dist/cli/commands/report.d.ts +1 -1
- package/dist/cli/commands/tui.d.ts +3 -2
- package/dist/cli/index.js +1466 -984
- package/dist/cloud/authorize.d.ts +12 -0
- package/dist/cloud/callback-server.d.ts +33 -0
- package/dist/cloud/callback.d.ts +23 -0
- package/dist/cloud/config.d.ts +23 -0
- package/dist/cloud/errors.d.ts +46 -0
- package/dist/cloud/index.d.ts +12 -0
- package/dist/cloud/models.d.ts +32 -0
- package/dist/cloud/oauth-login.d.ts +22 -0
- package/dist/cloud/pkce.d.ts +20 -0
- package/dist/cloud/provider.d.ts +40 -0
- package/dist/cloud/token.d.ts +22 -0
- package/dist/core.d.ts +2 -5
- package/dist/core.js +1341 -918
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1463 -928
- package/dist/mcp/index.js +1404 -925
- package/dist/minsync/client.d.ts +1 -1
- package/dist/minsync/installer.d.ts +1 -1
- package/dist/observability/run-log.d.ts +1 -1
- package/dist/retrieval/index.d.ts +1 -1
- package/dist/retrieval/types.d.ts +0 -23
- package/package.json +1 -1
- package/skills/autorag-lite-setup/SKILL.md +1 -1
- package/skills/autorag-setup/SKILL.md +2 -2
- package/dist/agent/fast-answer-tool.d.ts +0 -56
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface AuthorizeUrlParams {
|
|
2
|
+
/** Server root, e.g. `https://api.dazziapp.com`. */
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
/** Loopback redirect URI chosen by the login flow. */
|
|
5
|
+
redirectUri: string;
|
|
6
|
+
/** Random `state` echoed back on the redirect. */
|
|
7
|
+
state: string;
|
|
8
|
+
/** S256 code challenge derived from the PKCE verifier. */
|
|
9
|
+
codeChallenge: string;
|
|
10
|
+
}
|
|
11
|
+
/** Build the browser authorization URL for the PKCE authorization-code flow. */
|
|
12
|
+
export declare function buildAuthorizeUrl(params: AuthorizeUrlParams): string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/** Path the browser is redirected to on the loopback listener. */
|
|
2
|
+
export declare const CALLBACK_PATH = "/callback";
|
|
3
|
+
/** Loopback listeners are ephemeral; abandon a login nobody completes. */
|
|
4
|
+
export declare const DEFAULT_LOGIN_TIMEOUT_MS: number;
|
|
5
|
+
export interface CallbackServer {
|
|
6
|
+
/** `http://127.0.0.1:<ephemeral port>/callback`. */
|
|
7
|
+
redirectUri: string;
|
|
8
|
+
/** Resolves with the first callback's query parameters. */
|
|
9
|
+
waitForCallback(): Promise<URLSearchParams>;
|
|
10
|
+
/** Stop listening and abandon any pending wait. */
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
13
|
+
export interface CallbackServerOptions {
|
|
14
|
+
/** Loopback interface to bind. Defaults to `127.0.0.1`. */
|
|
15
|
+
host?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Expected OAuth `state`. A browser callback is only accepted when it
|
|
18
|
+
* echoes this value, so a stray or forged request cannot win the race.
|
|
19
|
+
*/
|
|
20
|
+
state: string;
|
|
21
|
+
timeoutMs?: number;
|
|
22
|
+
signal?: AbortSignal;
|
|
23
|
+
onListening?: (redirectUri: string) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Start a loopback HTTP listener for the OAuth redirect.
|
|
27
|
+
*
|
|
28
|
+
* The server closes itself as soon as the first valid callback — a request
|
|
29
|
+
* that echoes {@link CallbackServerOptions.state} and carries a `code` or
|
|
30
|
+
* `error` — arrives; malformed or forged requests get a `400` and are ignored.
|
|
31
|
+
* It also closes on abort and on timeout. Requests to other paths are ignored.
|
|
32
|
+
*/
|
|
33
|
+
export declare function startCallbackServer(options: CallbackServerOptions): Promise<CallbackServer>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Authorization response extracted from either the loopback server or a manual paste. */
|
|
2
|
+
export interface CallbackResult {
|
|
3
|
+
code?: string;
|
|
4
|
+
error?: string;
|
|
5
|
+
state?: string;
|
|
6
|
+
}
|
|
7
|
+
/** Read an authorization response out of query parameters. */
|
|
8
|
+
export declare function parseCallbackQuery(params: URLSearchParams): CallbackResult;
|
|
9
|
+
/**
|
|
10
|
+
* Parse what the user pasted when the browser could not reach the loopback
|
|
11
|
+
* server: a full redirect URL, a bare `code=...&state=...` query, or just the
|
|
12
|
+
* authorization code.
|
|
13
|
+
*/
|
|
14
|
+
export declare function parseCallbackInput(input: string): CallbackResult;
|
|
15
|
+
/**
|
|
16
|
+
* Validate an authorization response against the expected `state` and return
|
|
17
|
+
* the authorization code. `state` is compared whenever the response carries
|
|
18
|
+
* one; a mismatch always aborts the login. A manual code paste carries no
|
|
19
|
+
* `state`, so there is nothing to compare there.
|
|
20
|
+
*/
|
|
21
|
+
export declare function requireAuthorizationCode(result: CallbackResult, expectedState: string): {
|
|
22
|
+
code: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Provider identity and endpoint configuration for the hosted AutoRAG (Dazzi) plan. */
|
|
2
|
+
export declare const PROVIDER_ID = "autorag";
|
|
3
|
+
export declare const PROVIDER_NAME = "AutoRAG";
|
|
4
|
+
/** Server root, e.g. `https://api.dazziapp.com`. The API lives under `<root>/v1`. */
|
|
5
|
+
export declare const DEFAULT_BASE_URL = "https://api.dazziapp.com";
|
|
6
|
+
export declare const AUTORAG_BASE_URL_ENV = "AUTORAG_BASE_URL";
|
|
7
|
+
export declare const AUTORAG_API_KEY_ENV = "AUTORAG_API_KEY";
|
|
8
|
+
/** Server paths appended to the normalized server root. */
|
|
9
|
+
export declare const API_PATH = "/v1";
|
|
10
|
+
export declare const MODELS_PATH = "/v1/models";
|
|
11
|
+
export declare const AUTHORIZE_PATH = "/desktop/authorize";
|
|
12
|
+
export declare const TOKEN_PATH = "/api/desktop/token";
|
|
13
|
+
/** OAuth client identifier for the AutoRAG agent (Pi-compatible hosts use `pi`). */
|
|
14
|
+
export declare const OAUTH_CLIENT_ID = "agent";
|
|
15
|
+
/**
|
|
16
|
+
* Value used for `ProviderConfig.apiKey`. Pi resolves `$NAME` from the
|
|
17
|
+
* environment, so `AUTORAG_API_KEY` enables a headless, login-free setup.
|
|
18
|
+
*/
|
|
19
|
+
export declare const API_KEY_CONFIG_VALUE = "$AUTORAG_API_KEY";
|
|
20
|
+
/** Trim whitespace and trailing slashes so path concatenation is unambiguous. */
|
|
21
|
+
export declare function normalizeBaseUrl(value: string): string;
|
|
22
|
+
/** Server root from `AUTORAG_BASE_URL`, falling back to {@link DEFAULT_BASE_URL}. */
|
|
23
|
+
export declare function resolveBaseUrl(env: Record<string, string | undefined>): string;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error types for the hosted AutoRAG (Dazzi) provider.
|
|
3
|
+
*
|
|
4
|
+
* Messages never contain credentials, authorization headers, or provider
|
|
5
|
+
* payloads; they are safe to surface in the CLI UI and in test assertions.
|
|
6
|
+
*/
|
|
7
|
+
/** Base class for every error raised by the AutoRAG provider. */
|
|
8
|
+
export declare class AutoragError extends Error {
|
|
9
|
+
constructor(message: string, options?: {
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
/** Raised for OAuth/PKCE/callback failures. */
|
|
14
|
+
export declare class AutoragOAuthError extends AutoragError {
|
|
15
|
+
constructor(message: string, options?: {
|
|
16
|
+
cause?: unknown;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Raised when an HTTP call to AutoRAG fails.
|
|
21
|
+
*
|
|
22
|
+
* `status` is the HTTP status code, `code`/`type` come from the OpenAI-shaped
|
|
23
|
+
* error body when the server supplies them.
|
|
24
|
+
*/
|
|
25
|
+
export declare class AutoragHttpError extends AutoragError {
|
|
26
|
+
readonly status: number;
|
|
27
|
+
readonly code?: string;
|
|
28
|
+
readonly type?: string;
|
|
29
|
+
constructor(message: string, options: {
|
|
30
|
+
status: number;
|
|
31
|
+
code?: string;
|
|
32
|
+
type?: string;
|
|
33
|
+
cause?: unknown;
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export interface ErrorPayload {
|
|
37
|
+
message?: string;
|
|
38
|
+
code?: string;
|
|
39
|
+
type?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Extract `{ message, code, type }` from an OpenAI-shaped error body:
|
|
43
|
+
* `{ "error": { "message": ..., "type": ..., "code": ... } }`.
|
|
44
|
+
* Also tolerates `{ "error": "message" }` and a bare `{ "message": ... }`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function extractErrorPayload(body: unknown): ErrorPayload;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type { AuthorizeUrlParams } from "./authorize.js";
|
|
2
|
+
export { buildAuthorizeUrl } from "./authorize.js";
|
|
3
|
+
export type { CallbackResult } from "./callback.js";
|
|
4
|
+
export { parseCallbackInput, parseCallbackQuery, requireAuthorizationCode } from "./callback.js";
|
|
5
|
+
export { CALLBACK_PATH, type CallbackServer, type CallbackServerOptions, DEFAULT_LOGIN_TIMEOUT_MS, startCallbackServer, } from "./callback-server.js";
|
|
6
|
+
export { API_KEY_CONFIG_VALUE, API_PATH, AUTHORIZE_PATH, AUTORAG_API_KEY_ENV, AUTORAG_BASE_URL_ENV, DEFAULT_BASE_URL, MODELS_PATH, normalizeBaseUrl, OAUTH_CLIENT_ID, PROVIDER_ID, PROVIDER_NAME, resolveBaseUrl, TOKEN_PATH, } from "./config.js";
|
|
7
|
+
export { AutoragError, AutoragHttpError, AutoragOAuthError, type ErrorPayload, extractErrorPayload, } from "./errors.js";
|
|
8
|
+
export { buildStoreEntry, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_TOKENS, type FetchModelsOptions, fetchModels, mapModelsError, mapServerModel, mapServerModels, modelsFromStore, resolveCredentialKey, } from "./models.js";
|
|
9
|
+
export { type LoginOptions, loginAutorag, refreshAutoragCredentials } from "./oauth-login.js";
|
|
10
|
+
export { base64UrlEncode, createCodeChallenge, createCodeVerifier, createPkcePair, createState, type PkcePair, } from "./pkce.js";
|
|
11
|
+
export { type AutoragEnv, createAutoRAGProviderConfig, refreshAutoragModels, registerAutoRAGProvider, } from "./provider.js";
|
|
12
|
+
export { type ExchangeCodeOptions, exchangeCodeForToken, mapTokenExchangeError, type TokenResponse } from "./token.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Credential, ModelsStoreEntry } from "@earendil-works/pi-ai";
|
|
2
|
+
import type { ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
3
|
+
import { AutoragHttpError } from "./errors.js";
|
|
4
|
+
/** Used when the server omits `context_window` / `max_output_tokens`. */
|
|
5
|
+
export declare const DEFAULT_CONTEXT_WINDOW = 128000;
|
|
6
|
+
export declare const DEFAULT_MAX_TOKENS = 16384;
|
|
7
|
+
export interface FetchModelsOptions {
|
|
8
|
+
/** Server root, e.g. `https://api.dazziapp.com`. */
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
/** Bearer token resolved from OAuth credentials or `AUTORAG_API_KEY`. */
|
|
11
|
+
apiKey: string;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
fetchImpl?: typeof fetch;
|
|
14
|
+
}
|
|
15
|
+
/** Pick the bearer token out of a stored Pi credential. */
|
|
16
|
+
export declare function resolveCredentialKey(credential: Credential | undefined): string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* `GET <root>/v1/models` -> Pi chat model definitions.
|
|
19
|
+
*
|
|
20
|
+
* Pricing is USD per million tokens, matching Pi's cost model directly.
|
|
21
|
+
*/
|
|
22
|
+
export declare function fetchModels(options: FetchModelsOptions): Promise<ProviderModelConfig[]>;
|
|
23
|
+
/** Map a failed `/v1/models` response; 401 means the token is invalid or revoked. */
|
|
24
|
+
export declare function mapModelsError(status: number, body: unknown): AutoragHttpError;
|
|
25
|
+
/** Map an OpenAI-shaped `{ object: "list", data: [...] }` catalog body. */
|
|
26
|
+
export declare function mapServerModels(payload: unknown): ProviderModelConfig[];
|
|
27
|
+
/** Map a single AutoRAG model record; returns `undefined` when it has no usable id. */
|
|
28
|
+
export declare function mapServerModel(entry: Record<string, unknown>): ProviderModelConfig | undefined;
|
|
29
|
+
/** Snapshot the live catalog for offline startup. */
|
|
30
|
+
export declare function buildStoreEntry(models: readonly ProviderModelConfig[], providerId: string, baseUrl: string): ModelsStoreEntry;
|
|
31
|
+
/** Restore chat model definitions from a persisted catalog snapshot. */
|
|
32
|
+
export declare function modelsFromStore(stored: ModelsStoreEntry | undefined): ProviderModelConfig[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { OAuthCredentials, OAuthLoginCallbacks } from "@earendil-works/pi-ai";
|
|
2
|
+
export interface LoginOptions {
|
|
3
|
+
/** Server root, e.g. `https://api.dazziapp.com`. */
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
/** Loopback wait budget; defaults to {@link DEFAULT_LOGIN_TIMEOUT_MS}. */
|
|
6
|
+
timeoutMs?: number;
|
|
7
|
+
fetchImpl?: typeof fetch;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AutoRAG tokens are long-lived revocable API keys: there is no refresh token
|
|
11
|
+
* and no expiry, so a refresh returns the stored credentials unchanged.
|
|
12
|
+
*/
|
|
13
|
+
export declare function refreshAutoragCredentials(credentials: OAuthCredentials): OAuthCredentials;
|
|
14
|
+
/**
|
|
15
|
+
* OAuth2 authorization-code + PKCE (S256) login for native apps.
|
|
16
|
+
*
|
|
17
|
+
* The browser is sent to `<root>/desktop/authorize` with a loopback redirect
|
|
18
|
+
* URI. When the browser cannot reach the loopback server, the user can paste
|
|
19
|
+
* the final redirect URL (or the bare code) into the prompt instead; both paths
|
|
20
|
+
* are raced and the first result wins.
|
|
21
|
+
*/
|
|
22
|
+
export declare function loginAutorag(callbacks: OAuthLoginCallbacks, options: LoginOptions): Promise<OAuthCredentials>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** RFC 7636 base64url encoding (unpadded, `-`/`_` alphabet). */
|
|
2
|
+
export declare function base64UrlEncode(bytes: Uint8Array): string;
|
|
3
|
+
/**
|
|
4
|
+
* `BASE64URL(SHA256(ASCII(code_verifier)))` — the S256 code challenge.
|
|
5
|
+
*
|
|
6
|
+
* RFC 7636 Appendix B reference vector: verifier
|
|
7
|
+
* `dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk` yields challenge
|
|
8
|
+
* `E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function createCodeChallenge(verifier: string): string;
|
|
11
|
+
/** Random high-entropy PKCE code verifier (43 chars for the default 32 bytes). */
|
|
12
|
+
export declare function createCodeVerifier(byteLength?: number): string;
|
|
13
|
+
/** Random `state` value used to detect CSRF on the OAuth redirect. */
|
|
14
|
+
export declare function createState(byteLength?: number): string;
|
|
15
|
+
export interface PkcePair {
|
|
16
|
+
verifier: string;
|
|
17
|
+
challenge: string;
|
|
18
|
+
}
|
|
19
|
+
/** Generate a verifier and its matching S256 challenge in one step. */
|
|
20
|
+
export declare function createPkcePair(byteLength?: number): PkcePair;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The hosted AutoRAG (Dazzi) plan as a first-class model provider named
|
|
3
|
+
* `autorag`.
|
|
4
|
+
*
|
|
5
|
+
* The server exposes an OpenAI Responses API surface under `<root>/v1`. Login
|
|
6
|
+
* is OAuth2 authorization-code + PKCE over a loopback redirect (or the headless
|
|
7
|
+
* `AUTORAG_API_KEY`), and the model catalog is discovered live from
|
|
8
|
+
* `GET <root>/v1/models` — no model id is ever hardcoded here. Streaming is
|
|
9
|
+
* delegated to Pi's built-in `openai-responses` API implementation.
|
|
10
|
+
*/
|
|
11
|
+
import type { RefreshModelsContext } from "@earendil-works/pi-ai";
|
|
12
|
+
import type { ModelRuntime, ProviderConfig, ProviderModelConfig } from "@earendil-works/pi-coding-agent";
|
|
13
|
+
/** Injection seam for tests and hosts that resolve configuration themselves. */
|
|
14
|
+
export type AutoragEnv = Record<string, string | undefined>;
|
|
15
|
+
interface Endpoints {
|
|
16
|
+
/** Server root, used for OAuth endpoints. */
|
|
17
|
+
baseUrl: string;
|
|
18
|
+
/** API base (`<root>/v1`), used as the provider `baseUrl` and for model listing. */
|
|
19
|
+
apiBaseUrl: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Resolve the provider's model list.
|
|
23
|
+
*
|
|
24
|
+
* Called by Pi with the credential it resolved for this provider. Without a
|
|
25
|
+
* credential (or without network access) the last persisted catalog, if any,
|
|
26
|
+
* is restored; a failed fetch keeps the previous list instead of blanking it.
|
|
27
|
+
*/
|
|
28
|
+
export declare function refreshAutoragModels(context: RefreshModelsContext, endpoints: Endpoints): Promise<ProviderModelConfig[]>;
|
|
29
|
+
/** Build the `ProviderConfig` handed to `ModelRuntime.registerProvider("autorag", ...)`. */
|
|
30
|
+
export declare function createAutoRAGProviderConfig(env?: AutoragEnv): ProviderConfig;
|
|
31
|
+
/**
|
|
32
|
+
* The single registration point: register `autorag` on a Pi `ModelRuntime`.
|
|
33
|
+
*
|
|
34
|
+
* Runs even when the user is not signed in, so `/login` lists AutoRAG. The
|
|
35
|
+
* awaited cache-only refresh loads the persisted catalog snapshot (offline and
|
|
36
|
+
* with `allowModelNetwork:false`); it makes no network call, so a signed-out
|
|
37
|
+
* provider contributes no models and nothing here reaches the network.
|
|
38
|
+
*/
|
|
39
|
+
export declare function registerAutoRAGProvider(runtime: ModelRuntime, env?: AutoragEnv): Promise<void>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AutoragHttpError } from "./errors.js";
|
|
2
|
+
export interface TokenResponse {
|
|
3
|
+
accessToken: string;
|
|
4
|
+
email?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface ExchangeCodeOptions {
|
|
7
|
+
/** Server root, e.g. `https://api.dazziapp.com`. */
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
code: string;
|
|
10
|
+
codeVerifier: string;
|
|
11
|
+
redirectUri: string;
|
|
12
|
+
signal?: AbortSignal;
|
|
13
|
+
fetchImpl?: typeof fetch;
|
|
14
|
+
}
|
|
15
|
+
/** Map a failed token-exchange response to an error carrying the HTTP status and server code. */
|
|
16
|
+
export declare function mapTokenExchangeError(status: number, body: unknown): AutoragHttpError;
|
|
17
|
+
/**
|
|
18
|
+
* Trade a PKCE authorization code for a long-lived API key.
|
|
19
|
+
*
|
|
20
|
+
* `POST <root>/api/desktop/token` with `{ code, code_verifier, redirect_uri }`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function exchangeCodeForToken(options: ExchangeCodeOptions): Promise<TokenResponse>;
|
package/dist/core.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AutoRAGJikjiPrepareResult, AutoRAGRefreshOptions, AutoRAGRefreshResult, AutoRAGRefreshStatus, AutoRAGWatchRefreshHandle, AutoRAGWatchRefreshOptions } from "./agent/agent.js";
|
|
2
|
-
import type { AutoRAGResultsDetails } from "./agent/
|
|
2
|
+
import type { AutoRAGResultsDetails } from "./agent/results.js";
|
|
3
3
|
import { type SearchDocumentsResponse } from "./agent/search-documents.js";
|
|
4
4
|
import { type CliConfig, type ResolveConfigInput } from "./cli/config.js";
|
|
5
5
|
import type { EverythingSearchRequest, EverythingSearchResult } from "./everything/index.js";
|
|
@@ -9,7 +9,7 @@ import type { MinSyncSyncResult } from "./minsync/types.js";
|
|
|
9
9
|
import type { ParsedMirrorSyncResult } from "./mirror/sync.js";
|
|
10
10
|
import type { RetrievalEngine } from "./retrieval/engine.js";
|
|
11
11
|
import type { DatasourceCatalogEntry, RetrievalSelection } from "./retrieval/selection.js";
|
|
12
|
-
import type {
|
|
12
|
+
import type { RetrievalDiagnostic, RetrievalOptions, RetrievalResult, RetrievalUnsearchedSurface } from "./retrieval/types.js";
|
|
13
13
|
/** Input accepted by {@link createAutoRAGLite}. Flags keep CLI precedence intact. */
|
|
14
14
|
export interface AutoRAGLiteOptions {
|
|
15
15
|
readonly flags?: ResolveConfigInput["flags"];
|
|
@@ -23,7 +23,6 @@ export declare class AutoRAGLite {
|
|
|
23
23
|
private readonly agent;
|
|
24
24
|
private readonly retrievalEngine;
|
|
25
25
|
private readonly memory;
|
|
26
|
-
private readonly sessions;
|
|
27
26
|
constructor(config: CliConfig);
|
|
28
27
|
/** Refresh parsed mirrors and configured indexes without constructing a model. */
|
|
29
28
|
refresh(force?: boolean, options?: AutoRAGRefreshOptions): Promise<AutoRAGRefreshResult>;
|
|
@@ -82,8 +81,6 @@ export declare class AutoRAGLite {
|
|
|
82
81
|
recordStructuredResultsSession(sessionId: string, query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
|
|
83
82
|
/** Generate a session id and persist a typed structured report. */
|
|
84
83
|
recordReport(query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
|
|
85
|
-
/** Return the opaque result registry associated with a persisted report. */
|
|
86
|
-
getResultRegistry(sessionId: string): ReadonlyMap<number, CuratedResult>;
|
|
87
84
|
/** Return a detached snapshot of persisted evidence state. */
|
|
88
85
|
getMemorySchema(): MemorySchema;
|
|
89
86
|
}
|