@autorag/librarian 2.7.0 → 2.9.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 +10 -4
- package/README.md +122 -38
- package/dist/agent/agent.d.ts +210 -53
- package/dist/agent/answer-guidelines.d.ts +19 -0
- package/dist/agent/citations.d.ts +43 -0
- package/dist/agent/datasource-skill.d.ts +30 -16
- package/dist/agent/emit-results-tool.d.ts +37 -2
- package/dist/agent/evidence-judgment.d.ts +58 -0
- package/dist/agent/evidence-ledger.d.ts +59 -0
- package/dist/agent/evidence-origins.d.ts +49 -0
- package/dist/agent/fast-answer-tool.d.ts +16 -6
- package/dist/agent/index.d.ts +2 -1
- package/dist/agent/jev-extension.d.ts +68 -0
- package/dist/agent/jikji-find-tool.d.ts +2 -1
- package/dist/agent/pi-session.d.ts +28 -1
- package/dist/agent/query-decomposition.d.ts +25 -0
- package/dist/agent/query-peer-tool.d.ts +3 -0
- package/dist/agent/query-routing.d.ts +115 -0
- package/dist/agent/search-all-tool.d.ts +5 -5
- package/dist/agent/search-documents.d.ts +3 -11
- package/dist/agent/search-minsync-tool.d.ts +5 -5
- package/dist/agent/search-single-datasource-tool.d.ts +9 -8
- package/dist/agent/self-config.d.ts +40 -0
- package/dist/agent/system-prompt.d.ts +3 -3
- package/dist/agent/web-fetch-tool.d.ts +2 -1
- package/dist/agent/web-search-tool.d.ts +2 -1
- package/dist/cli/commands/evidence.d.ts +22 -0
- package/dist/cli/commands/init.d.ts +2 -1
- package/dist/cli/commands/memory.d.ts +1 -1
- package/dist/cli/commands/report.d.ts +1 -1
- package/dist/cli/commands/update-check.d.ts +8 -0
- package/dist/cli/config.d.ts +80 -7
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +3844 -2291
- package/dist/cli/output.d.ts +2 -6
- package/dist/cli/update-check.d.ts +34 -0
- package/dist/cli/version.d.ts +5 -0
- package/dist/config/home.d.ts +6 -0
- package/dist/core.d.ts +30 -6
- package/dist/core.js +7742 -6225
- package/dist/datasource/chunk-store.d.ts +2 -6
- package/dist/datasource/connector-skill.d.ts +2 -3
- package/dist/datasource/index.d.ts +2 -4
- package/dist/datasource/registry.d.ts +11 -13
- package/dist/datasource/scope.d.ts +19 -0
- package/dist/datasource/skills/github-gist/index.d.ts +1 -1
- package/dist/datasource/skills/github-gist/semantic.d.ts +3 -44
- package/dist/datasource/skills/github-gist/skill.d.ts +3 -3
- package/dist/datasource/types.d.ts +14 -28
- package/dist/embedding-runtime/gateway-embedder.d.ts +41 -0
- package/dist/everything/bundle.d.ts +15 -3
- package/dist/everything/client.d.ts +22 -5
- package/dist/everything/index.d.ts +1 -1
- package/dist/filesystem/name-search.d.ts +57 -0
- package/dist/fsearch/client.d.ts +7 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +9139 -6376
- package/dist/jikji/client.d.ts +6 -1
- package/dist/language.d.ts +2 -1
- package/dist/mcp/index.d.ts +2 -0
- package/dist/mcp/index.js +30542 -0
- package/dist/mcp/server.d.ts +9 -0
- package/dist/memory/check-memory-tool.d.ts +8 -4
- package/dist/memory/context.d.ts +51 -0
- package/dist/memory/index.d.ts +8 -1
- package/dist/memory/judged-evidence.d.ts +32 -0
- package/dist/memory/memory.d.ts +36 -120
- package/dist/memory/renderer.d.ts +16 -7
- package/dist/memory/similar-queries.d.ts +40 -0
- package/dist/minsync/errors.d.ts +14 -0
- package/dist/minsync/index.d.ts +1 -0
- package/dist/minsync/method.d.ts +8 -5
- package/dist/mirror/index.d.ts +1 -1
- package/dist/mirror/paths.d.ts +6 -0
- package/dist/mirror/sync.d.ts +5 -2
- package/dist/parser/defaults.d.ts +16 -5
- package/dist/parser/index.d.ts +1 -1
- package/dist/parser/kordoc.d.ts +8 -1
- package/dist/parser/ocr-engines.d.ts +19 -0
- package/dist/retrieval/bm25.d.ts +19 -0
- package/dist/retrieval/engine.d.ts +33 -43
- package/dist/retrieval/index.d.ts +3 -1
- package/dist/retrieval/merger.d.ts +6 -0
- package/dist/retrieval/rerank.d.ts +4 -2
- package/dist/retrieval/selection.d.ts +89 -0
- package/dist/retrieval/types.d.ts +1 -3
- package/dist/web/search/format.d.ts +5 -2
- package/dist/web/search/index.d.ts +7 -1
- package/package.json +11 -7
- package/skills/autorag/SKILL.md +43 -23
- package/skills/autorag-doctor/SKILL.md +40 -26
- package/skills/autorag-lite-setup/SKILL.md +123 -64
- package/skills/autorag-setup/SKILL.md +107 -22
- package/dist/cli/commands/feedback.d.ts +0 -8
- package/dist/datasource/access-context.d.ts +0 -43
- package/dist/datasource/result-filter.d.ts +0 -64
- package/dist/parser/ocr.d.ts +0 -31
- package/skills/autorag-lite-search/SKILL.md +0 -245
package/dist/cli/output.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AutoRAGRefreshResult, AutoRAGRefreshStatus } from "../agent/agent.js";
|
|
2
2
|
import type { SearchDocumentsResponse } from "../agent/search-documents.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { MemorySchema } from "../memory/memory.js";
|
|
4
4
|
import type { HealthReportV1 } from "./commands/health.js";
|
|
5
5
|
import type { SearchHealthHint } from "./commands/search.js";
|
|
6
6
|
export interface RenderOptions {
|
|
@@ -17,11 +17,7 @@ export declare function renderSearch(resp: SearchDocumentsResponse, opts: Render
|
|
|
17
17
|
* progression; the JSON shape wraps the normal search envelope.
|
|
18
18
|
*/
|
|
19
19
|
export declare function renderPreliminary(resp: SearchDocumentsResponse, opts: RenderOptions): string;
|
|
20
|
-
export declare function renderMemory(schema:
|
|
21
|
-
export declare function renderFeedback(result: {
|
|
22
|
-
applied: boolean;
|
|
23
|
-
sessionId: string;
|
|
24
|
-
}, opts: RenderOptions): string;
|
|
20
|
+
export declare function renderMemory(schema: MemorySchema, opts: RenderOptions): string;
|
|
25
21
|
export declare function renderIndex(result: {
|
|
26
22
|
action: "reset" | "rebuild";
|
|
27
23
|
removed: string[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AutoRAG's own update check. Pi's interactive host reports its own version and
|
|
3
|
+
* changelog; this module answers "is a newer `@autorag/librarian` published?"
|
|
4
|
+
* so the CLI and TUI can notify on AutoRAG's terms.
|
|
5
|
+
*
|
|
6
|
+
* The check is best-effort: any network/parse failure yields `status: "error"`
|
|
7
|
+
* and never throws, so a launch is never blocked or failed by the lookup.
|
|
8
|
+
*/
|
|
9
|
+
export declare const AUTORAG_PACKAGE_NAME = "@autorag/librarian";
|
|
10
|
+
export declare const AUTORAG_UPDATE_COMMAND = "bun install -g @autorag/librarian";
|
|
11
|
+
export declare const AUTORAG_LATEST_VERSION_URL: string;
|
|
12
|
+
export declare const AUTORAG_UPDATE_CHECK_TIMEOUT_MS = 2500;
|
|
13
|
+
export type AutoRAGUpdateStatus = "available" | "up-to-date" | "skipped" | "error";
|
|
14
|
+
export interface AutoRAGUpdateResult {
|
|
15
|
+
readonly status: AutoRAGUpdateStatus;
|
|
16
|
+
readonly packageName: string;
|
|
17
|
+
readonly currentVersion: string;
|
|
18
|
+
readonly latestVersion?: string;
|
|
19
|
+
readonly installCommand: string;
|
|
20
|
+
}
|
|
21
|
+
export interface CheckAutoRAGUpdateOptions {
|
|
22
|
+
/** The running package version to compare against the registry. */
|
|
23
|
+
readonly currentVersion: string;
|
|
24
|
+
/** Registry endpoint override; primarily a test/QA seam. */
|
|
25
|
+
readonly url?: string;
|
|
26
|
+
readonly timeoutMs?: number;
|
|
27
|
+
readonly fetchImpl?: typeof fetch;
|
|
28
|
+
readonly env?: Readonly<Record<string, string | undefined>>;
|
|
29
|
+
}
|
|
30
|
+
/** Semver precedence by numeric core, then release-over-prerelease. `undefined` when either side is unparsable. */
|
|
31
|
+
export declare function comparePackageVersions(left: string, right: string): number | undefined;
|
|
32
|
+
export declare function checkAutoRAGUpdate(options: CheckAutoRAGUpdateOptions): Promise<AutoRAGUpdateResult>;
|
|
33
|
+
/** One-line TUI/CLI notice, or `undefined` when there is nothing to announce. */
|
|
34
|
+
export declare function renderAutoRAGUpdateNotice(result: AutoRAGUpdateResult): string | undefined;
|
package/dist/config/home.d.ts
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
export declare const AUTORAG_HOME_ENV = "AUTORAG_HOME";
|
|
2
|
+
/**
|
|
3
|
+
* Operator home directory. `HOME` wins over `USERPROFILE` on Windows, and a
|
|
4
|
+
* missing, empty, or relative value falls back to `os.homedir()` so callers
|
|
5
|
+
* never build absolute-looking state from a relative base.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveUserHome(env?: NodeJS.ProcessEnv): string;
|
|
2
8
|
export declare function resolveAutoRAGHome(env?: NodeJS.ProcessEnv): string;
|
package/dist/core.d.ts
CHANGED
|
@@ -2,10 +2,13 @@ import type { AutoRAGJikjiPrepareResult, AutoRAGRefreshOptions, AutoRAGRefreshRe
|
|
|
2
2
|
import type { AutoRAGResultsDetails } from "./agent/emit-results-tool.js";
|
|
3
3
|
import { type SearchDocumentsResponse } from "./agent/search-documents.js";
|
|
4
4
|
import { type CliConfig, type ResolveConfigInput } from "./cli/config.js";
|
|
5
|
-
import type {
|
|
5
|
+
import type { EverythingSearchRequest, EverythingSearchResult } from "./everything/index.js";
|
|
6
|
+
import type { FSearchSearchRequest, FSearchSearchResult } from "./fsearch/index.js";
|
|
7
|
+
import type { MemorySchema } from "./memory/memory.js";
|
|
6
8
|
import type { MinSyncSyncResult } from "./minsync/types.js";
|
|
7
9
|
import type { ParsedMirrorSyncResult } from "./mirror/sync.js";
|
|
8
10
|
import type { RetrievalEngine } from "./retrieval/engine.js";
|
|
11
|
+
import type { DatasourceCatalogEntry, RetrievalSelection } from "./retrieval/selection.js";
|
|
9
12
|
import type { CuratedResult, RetrievalDiagnostic, RetrievalOptions, RetrievalResult, RetrievalUnsearchedSurface } from "./retrieval/types.js";
|
|
10
13
|
/** Input accepted by {@link createAutoRAGLite}. Flags keep CLI precedence intact. */
|
|
11
14
|
export interface AutoRAGLiteOptions {
|
|
@@ -40,6 +43,29 @@ export declare class AutoRAGLite {
|
|
|
40
43
|
startWatchRefresh(options?: AutoRAGWatchRefreshOptions): AutoRAGWatchRefreshHandle;
|
|
41
44
|
/** Return the deterministic retrieval engine used by this configured runtime. */
|
|
42
45
|
getRetrievalEngine(): RetrievalEngine;
|
|
46
|
+
/**
|
|
47
|
+
* List the configured datasources for this runtime: identity, descriptive
|
|
48
|
+
* tags, and source scope strings only — no credentials or config metadata.
|
|
49
|
+
*/
|
|
50
|
+
listDatasources(): DatasourceCatalogEntry[];
|
|
51
|
+
/**
|
|
52
|
+
* Search only the selected datasources/methods/local surfaces. Selection is
|
|
53
|
+
* applied before any backend is invoked, so an unselected datasource never
|
|
54
|
+
* runs. Unknown methods or unknown datasource ids throw
|
|
55
|
+
* {@link RetrievalSelectionError}.
|
|
56
|
+
*/
|
|
57
|
+
searchSelected(query: string, selection?: RetrievalSelection, options?: RetrievalOptions): Promise<{
|
|
58
|
+
results: RetrievalResult[];
|
|
59
|
+
diagnostics: RetrievalDiagnostic[];
|
|
60
|
+
unsearched: RetrievalUnsearchedSurface[];
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* Search the Windows-only Everything index through the model-free provider,
|
|
64
|
+
* delegating to the existing agent backend (unsupported off Windows).
|
|
65
|
+
*/
|
|
66
|
+
searchEverything(request: EverythingSearchRequest): Promise<EverythingSearchResult>;
|
|
67
|
+
/** Search the existing macOS/Linux FSearch client through the model-free provider. */
|
|
68
|
+
searchFsearch(request: FSearchSearchRequest): Promise<FSearchSearchResult>;
|
|
43
69
|
/** Retrieve merged results without entering the model-backed agent loop. */
|
|
44
70
|
retrieve(query: string, options?: RetrievalOptions): Promise<{
|
|
45
71
|
results: RetrievalResult[];
|
|
@@ -52,16 +78,14 @@ export declare class AutoRAGLite {
|
|
|
52
78
|
diagnostics: RetrievalDiagnostic[];
|
|
53
79
|
unsearched: RetrievalUnsearchedSurface[];
|
|
54
80
|
}>;
|
|
55
|
-
/** Persist a typed structured report for later evidence
|
|
81
|
+
/** Persist a typed structured report for later evidence commands. */
|
|
56
82
|
recordStructuredResultsSession(sessionId: string, query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
|
|
57
83
|
/** Generate a session id and persist a typed structured report. */
|
|
58
84
|
recordReport(query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
|
|
59
85
|
/** Return the opaque result registry associated with a persisted report. */
|
|
60
86
|
getResultRegistry(sessionId: string): ReadonlyMap<number, CuratedResult>;
|
|
61
|
-
/**
|
|
62
|
-
|
|
63
|
-
/** Return a detached snapshot of persisted evidence and feedback state. */
|
|
64
|
-
getMemorySchema(): MemorySchemaV4;
|
|
87
|
+
/** Return a detached snapshot of persisted evidence state. */
|
|
88
|
+
getMemorySchema(): MemorySchema;
|
|
65
89
|
}
|
|
66
90
|
/** Resolve the existing CLI config and construct a model-free runtime. */
|
|
67
91
|
export declare function createAutoRAGLite(options?: AutoRAGLiteOptions): AutoRAGLite;
|