@autorag/librarian 2.4.1 → 2.5.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/NOTICE +68 -0
- package/README.md +72 -30
- package/dist/agent/agent.d.ts +74 -2
- package/dist/agent/emit-results-tool.d.ts +1 -2
- package/dist/agent/fast-answer-tool.d.ts +46 -0
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/peer-target-tool.d.ts +19 -0
- package/dist/agent/search-all-tool.d.ts +3 -0
- package/dist/agent/search-datasource-tool.d.ts +3 -0
- package/dist/agent/search-documents.d.ts +50 -5
- package/dist/agent/search-minsync-tool.d.ts +3 -0
- package/dist/agent/system-prompt.d.ts +1 -0
- package/dist/cli/commands/duplicates.d.ts +6 -0
- package/dist/cli/commands/gateway.d.ts +7 -0
- package/dist/cli/commands/lite-refresh.d.ts +10 -0
- package/dist/cli/commands/lite-retrieve.d.ts +33 -0
- package/dist/cli/commands/lite.d.ts +3 -0
- package/dist/cli/commands/models.d.ts +18 -0
- package/dist/cli/commands/p2p-policy.d.ts +2 -0
- package/dist/cli/commands/p2p.d.ts +7 -0
- package/dist/cli/commands/report.d.ts +3 -0
- package/dist/cli/commands/serve.d.ts +18 -0
- package/dist/cli/commands/setup.d.ts +2 -0
- package/dist/cli/commands/status.d.ts +2 -0
- package/dist/cli/commands/tui.d.ts +1 -1
- package/dist/cli/commands/watch.d.ts +2 -0
- package/dist/cli/config.d.ts +20 -0
- package/dist/cli/index.js +7911 -2518
- package/dist/cli/output.d.ts +6 -0
- package/dist/cli/setup.d.ts +59 -0
- package/dist/core.d.ts +67 -0
- package/dist/core.js +18172 -0
- package/dist/datasource/access-context.d.ts +1 -1
- package/dist/datasource/connector-skill.d.ts +1 -1
- package/dist/datasource/connector.d.ts +1 -1
- package/dist/datasource/index.d.ts +0 -1
- package/dist/datasource/result-filter.d.ts +1 -1
- package/dist/datasource/skills/discrawl/client.d.ts +6 -2
- package/dist/datasource/skills/discrawl/index.d.ts +1 -1
- package/dist/datasource/skills/discrawl/skill.d.ts +2 -1
- package/dist/datasource/skills/discrawl/types.d.ts +22 -0
- package/dist/datasource/skills/factory.d.ts +2 -1
- package/dist/datasource/skills/katok/client.d.ts +4 -7
- package/dist/datasource/skills/katok/types.d.ts +1 -6
- package/dist/embedding-runtime/cache.d.ts +21 -0
- package/dist/embedding-runtime/gateway.d.ts +27 -0
- package/dist/embedding-runtime/index.d.ts +120 -0
- package/dist/embedding-runtime/manifest.d.ts +24 -0
- package/dist/embedding-runtime/supervisor.d.ts +74 -0
- package/dist/embedding-runtime/types.d.ts +66 -0
- package/dist/filesystem/source-paths.d.ts +27 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +13214 -8659
- package/dist/minsync/client.d.ts +26 -1
- package/dist/minsync/embedder-config.d.ts +12 -0
- package/dist/minsync/index.d.ts +4 -3
- package/dist/minsync/installer.d.ts +7 -1
- package/dist/minsync/local-embedder.d.ts +16 -0
- package/dist/minsync/method.d.ts +8 -2
- package/dist/minsync/types.d.ts +9 -0
- package/dist/mirror/index.d.ts +1 -1
- package/dist/mirror/paths.d.ts +2 -0
- package/dist/mirror/sync.d.ts +1 -0
- package/dist/observability/run-log.d.ts +2 -0
- package/dist/p2p/approval-store.d.ts +31 -0
- package/dist/p2p/egress-gate.d.ts +22 -0
- package/dist/p2p/file-sharing.d.ts +33 -0
- package/dist/p2p/injection-classifier.d.ts +33 -0
- package/dist/p2p/injection-gate.d.ts +37 -0
- package/dist/p2p/pii-gate.d.ts +47 -0
- package/dist/p2p/policy-filter.d.ts +15 -0
- package/dist/p2p/policy.d.ts +77 -0
- package/dist/p2p/simplex-server.d.ts +95 -0
- package/dist/p2p/simplex-transport.d.ts +38 -0
- package/dist/p2p/wire.d.ts +39 -0
- package/dist/process/terminate-tree.d.ts +20 -0
- package/dist/retrieval/engine.d.ts +123 -0
- package/dist/retrieval/index.d.ts +1 -0
- package/licenses/apache-2.0.txt +202 -0
- package/licenses/embedding-assets.json +104 -0
- package/licenses/gemma-notice.txt +24 -0
- package/licenses/gemma-section-3.2-flow-down.txt +9 -0
- package/licenses/gemma-terms-of-use.html +4750 -0
- package/licenses/gemma-terms-of-use.txt +158 -0
- package/licenses/llama.cpp-MIT.txt +21 -0
- package/licenses/qwen3-embedding-notice.txt +13 -0
- package/package.json +19 -10
- package/skills/autorag/SKILL.md +16 -6
- package/skills/autorag-lite-search/SKILL.md +155 -0
- package/skills/autorag-lite-setup/SKILL.md +182 -0
- package/skills/autorag-setup/SKILL.md +58 -27
- package/dist/datasource/skills/gmail/connector.d.ts +0 -30
- package/dist/datasource/skills/gmail/index.d.ts +0 -2
- package/dist/datasource/skills/gmail/skill.d.ts +0 -24
package/dist/cli/output.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ export interface RenderOptions {
|
|
|
11
11
|
export declare function renderRefresh(result: AutoRAGRefreshResult, opts: RenderOptions): string;
|
|
12
12
|
export declare function renderStatus(status: AutoRAGRefreshStatus, opts: RenderOptions): string;
|
|
13
13
|
export declare function renderSearch(resp: SearchDocumentsResponse, opts: RenderOptions): string;
|
|
14
|
+
/**
|
|
15
|
+
* Render the two-phase search's immediate first answer. Kept distinct from
|
|
16
|
+
* the final response so callers can show "fast answer → verified answer"
|
|
17
|
+
* progression; the JSON shape wraps the normal search envelope.
|
|
18
|
+
*/
|
|
19
|
+
export declare function renderPreliminary(resp: SearchDocumentsResponse, opts: RenderOptions): string;
|
|
14
20
|
export declare function renderMemory(schema: MemorySchemaV4, opts: RenderOptions): string;
|
|
15
21
|
export declare function renderFeedback(result: {
|
|
16
22
|
applied: boolean;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { type RuntimeStatus } from "../embedding-runtime/index.js";
|
|
2
|
+
import { resolveProfile } from "../embedding-runtime/manifest.js";
|
|
3
|
+
import type { ProfileId } from "../embedding-runtime/types.js";
|
|
4
|
+
import { type FileLockHandle } from "../filesystem/file-lock.js";
|
|
5
|
+
export type SetupDatasourceState = "configured" | "skipped" | "blocked";
|
|
6
|
+
export interface SetupDatasourceReport {
|
|
7
|
+
readonly name: string;
|
|
8
|
+
readonly state: SetupDatasourceState;
|
|
9
|
+
readonly reason?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface SetupReport {
|
|
12
|
+
readonly ok: boolean;
|
|
13
|
+
readonly mode: "semantic" | "bm25";
|
|
14
|
+
readonly runtime: {
|
|
15
|
+
readonly state: string;
|
|
16
|
+
readonly health: boolean;
|
|
17
|
+
readonly model: string;
|
|
18
|
+
};
|
|
19
|
+
readonly model: {
|
|
20
|
+
readonly valid: boolean;
|
|
21
|
+
readonly profile: ProfileId;
|
|
22
|
+
};
|
|
23
|
+
readonly datasources: readonly SetupDatasourceReport[];
|
|
24
|
+
readonly remediation?: string;
|
|
25
|
+
readonly changed: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface SetupRuntime {
|
|
28
|
+
runtimeStatus(): Promise<RuntimeStatus>;
|
|
29
|
+
verifyModel(profileId?: ProfileId): Promise<{
|
|
30
|
+
profileId: ProfileId;
|
|
31
|
+
path: string;
|
|
32
|
+
hash: string;
|
|
33
|
+
}>;
|
|
34
|
+
ensureRuntime?(input?: {
|
|
35
|
+
profileId?: ProfileId;
|
|
36
|
+
}): Promise<{
|
|
37
|
+
baseUrl: string;
|
|
38
|
+
profile: ReturnType<typeof resolveProfile>;
|
|
39
|
+
identity: {
|
|
40
|
+
provider: string;
|
|
41
|
+
model: string;
|
|
42
|
+
dimension: number;
|
|
43
|
+
profileId: ProfileId;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
}
|
|
47
|
+
export interface SetupDeps {
|
|
48
|
+
readonly runtime?: SetupRuntime;
|
|
49
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
50
|
+
readonly pathExists?: (path: string) => boolean;
|
|
51
|
+
readonly executable?: (name: string) => string | undefined;
|
|
52
|
+
readonly acquireLock?: (path: string) => FileLockHandle;
|
|
53
|
+
}
|
|
54
|
+
export declare function runSetup(options: {
|
|
55
|
+
configPath: string;
|
|
56
|
+
workspacePath: string;
|
|
57
|
+
profileId?: ProfileId;
|
|
58
|
+
deps?: SetupDeps;
|
|
59
|
+
}): Promise<SetupReport>;
|
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { AutoRAGJikjiPrepareResult, AutoRAGRefreshOptions, AutoRAGRefreshResult, AutoRAGRefreshStatus, AutoRAGWatchRefreshHandle, AutoRAGWatchRefreshOptions } from "./agent/agent.js";
|
|
2
|
+
import type { AutoRAGResultsDetails } from "./agent/emit-results-tool.js";
|
|
3
|
+
import { type SearchDocumentsResponse } from "./agent/search-documents.js";
|
|
4
|
+
import { type CliConfig, type ResolveConfigInput } from "./cli/config.js";
|
|
5
|
+
import type { MemorySchemaV4 } from "./memory/memory.js";
|
|
6
|
+
import type { MinSyncSyncResult } from "./minsync/types.js";
|
|
7
|
+
import type { ParsedMirrorSyncResult } from "./mirror/sync.js";
|
|
8
|
+
import type { RetrievalEngine } from "./retrieval/engine.js";
|
|
9
|
+
import type { CuratedResult, RetrievalDiagnostic, RetrievalOptions, RetrievalResult } from "./retrieval/types.js";
|
|
10
|
+
/** Input accepted by {@link createAutoRAGLite}. Flags keep CLI precedence intact. */
|
|
11
|
+
export interface AutoRAGLiteOptions {
|
|
12
|
+
readonly flags?: ResolveConfigInput["flags"];
|
|
13
|
+
readonly env?: NodeJS.ProcessEnv;
|
|
14
|
+
readonly cwd?: string;
|
|
15
|
+
readonly readOnly?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** The model-free AutoRAG runtime facade. */
|
|
18
|
+
export declare class AutoRAGLite {
|
|
19
|
+
readonly config: CliConfig;
|
|
20
|
+
private readonly agent;
|
|
21
|
+
private readonly retrievalEngine;
|
|
22
|
+
private readonly memory;
|
|
23
|
+
private readonly sessions;
|
|
24
|
+
constructor(config: CliConfig);
|
|
25
|
+
/** Refresh parsed mirrors and configured indexes without constructing a model. */
|
|
26
|
+
refresh(force?: boolean, options?: AutoRAGRefreshOptions): Promise<AutoRAGRefreshResult>;
|
|
27
|
+
/** Alias for callers that model indexing as a lifecycle operation. */
|
|
28
|
+
index(force?: boolean, options?: AutoRAGRefreshOptions): Promise<AutoRAGRefreshResult>;
|
|
29
|
+
/** Return the path-opaque refresh and index health snapshot. */
|
|
30
|
+
getRefreshStatus(): Promise<AutoRAGRefreshStatus>;
|
|
31
|
+
/** Short status alias for headless lifecycle callers. */
|
|
32
|
+
status(): Promise<AutoRAGRefreshStatus>;
|
|
33
|
+
/** Run only parsed-mirror indexing while preserving the agent's path pinning. */
|
|
34
|
+
syncParsedMirrors(force?: boolean): Promise<ParsedMirrorSyncResult>;
|
|
35
|
+
/** Run the configured MinSync indexer without constructing a model. */
|
|
36
|
+
syncMinSync(): Promise<MinSyncSyncResult | undefined>;
|
|
37
|
+
/** Run the configured Jikji preparer without constructing a model. */
|
|
38
|
+
prepareJikji(): Promise<readonly AutoRAGJikjiPrepareResult[] | undefined>;
|
|
39
|
+
/** Start an opt-in incremental filesystem refresh watcher. */
|
|
40
|
+
startWatchRefresh(options?: AutoRAGWatchRefreshOptions): AutoRAGWatchRefreshHandle;
|
|
41
|
+
/** Return the deterministic retrieval engine used by this configured runtime. */
|
|
42
|
+
getRetrievalEngine(): RetrievalEngine;
|
|
43
|
+
/** Retrieve merged results without entering the model-backed agent loop. */
|
|
44
|
+
retrieve(query: string, options?: RetrievalOptions): Promise<{
|
|
45
|
+
results: RetrievalResult[];
|
|
46
|
+
diagnostics: RetrievalDiagnostic[];
|
|
47
|
+
}>;
|
|
48
|
+
/** Retrieve per-method results without entering the model-backed agent loop. */
|
|
49
|
+
retrieveByMethod(query: string, options?: RetrievalOptions): Promise<{
|
|
50
|
+
byMethod: Map<string, RetrievalResult[]>;
|
|
51
|
+
diagnostics: RetrievalDiagnostic[];
|
|
52
|
+
}>;
|
|
53
|
+
/** Persist a typed structured report for later evidence and feedback commands. */
|
|
54
|
+
recordStructuredResultsSession(sessionId: string, query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
|
|
55
|
+
/** Generate a session id and persist a typed structured report. */
|
|
56
|
+
recordReport(query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
|
|
57
|
+
/** Return the opaque result registry associated with a persisted report. */
|
|
58
|
+
getResultRegistry(sessionId: string): ReadonlyMap<number, CuratedResult>;
|
|
59
|
+
/** Record numbered feedback against a report persisted by this facade. */
|
|
60
|
+
recordFeedbackByNumbers(sessionId: string, usefulNumbers: readonly number[], notUsefulNumbers?: readonly number[]): void;
|
|
61
|
+
/** Return a detached snapshot of persisted evidence and feedback state. */
|
|
62
|
+
getMemorySchema(): MemorySchemaV4;
|
|
63
|
+
}
|
|
64
|
+
/** Resolve the existing CLI config and construct a model-free runtime. */
|
|
65
|
+
export declare function createAutoRAGLite(options?: AutoRAGLiteOptions): AutoRAGLite;
|
|
66
|
+
export type { AgentModelAuth, AgentModelConfig, AgentModelResolutionSource, CliConfig, MinSyncMethodConfig, NormalizedIndexingConfig, RawIndexingMethods, ResolveConfigInput, ResolvedAgentModel, ResolvedAgentModelDetailed, ResolvedAgentModelRole, ResolvedConfigPath, UiConfig, } from "./cli/config.js";
|
|
67
|
+
export { AUTORAG_HOME_ENV, buildAgentOptions, ConfigError, DEFAULT_CONFIG_FILENAME, LEGACY_CONFIG_FILENAME, normalizeEmbedder, normalizeIndexingConfig, normalizeLegacyConfigPaths, readRawConfigObject, resolveAgentModel, resolveAgentModelDetailed, resolveConfig, resolveConfigPath, resolveConfigReadOnly, resolveModel, writeConfigObject, writeDefaultConfig, } from "./cli/config.js";
|