@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.
Files changed (38) hide show
  1. package/README.md +57 -2
  2. package/dist/agent/agent.d.ts +27 -21
  3. package/dist/agent/answer-citations.d.ts +22 -0
  4. package/dist/agent/answer-guidelines.d.ts +9 -9
  5. package/dist/agent/citations.d.ts +35 -23
  6. package/dist/agent/evidence-ledger.d.ts +7 -12
  7. package/dist/agent/index.d.ts +2 -2
  8. package/dist/agent/{emit-results-tool.d.ts → results.d.ts} +5 -40
  9. package/dist/agent/search-documents.d.ts +14 -19
  10. package/dist/agent/self-config.d.ts +1 -1
  11. package/dist/cli/commands/report.d.ts +1 -1
  12. package/dist/cli/commands/tui.d.ts +3 -2
  13. package/dist/cli/index.js +1466 -984
  14. package/dist/cloud/authorize.d.ts +12 -0
  15. package/dist/cloud/callback-server.d.ts +33 -0
  16. package/dist/cloud/callback.d.ts +23 -0
  17. package/dist/cloud/config.d.ts +23 -0
  18. package/dist/cloud/errors.d.ts +46 -0
  19. package/dist/cloud/index.d.ts +12 -0
  20. package/dist/cloud/models.d.ts +32 -0
  21. package/dist/cloud/oauth-login.d.ts +22 -0
  22. package/dist/cloud/pkce.d.ts +20 -0
  23. package/dist/cloud/provider.d.ts +40 -0
  24. package/dist/cloud/token.d.ts +22 -0
  25. package/dist/core.d.ts +2 -5
  26. package/dist/core.js +1341 -918
  27. package/dist/index.d.ts +2 -1
  28. package/dist/index.js +1463 -928
  29. package/dist/mcp/index.js +1404 -925
  30. package/dist/minsync/client.d.ts +1 -1
  31. package/dist/minsync/installer.d.ts +1 -1
  32. package/dist/observability/run-log.d.ts +1 -1
  33. package/dist/retrieval/index.d.ts +1 -1
  34. package/dist/retrieval/types.d.ts +0 -23
  35. package/package.json +1 -1
  36. package/skills/autorag-lite-setup/SKILL.md +1 -1
  37. package/skills/autorag-setup/SKILL.md +2 -2
  38. package/dist/agent/fast-answer-tool.d.ts +0 -56
@@ -14,7 +14,7 @@ export interface MinSyncClientOptions {
14
14
  readonly maxChunkSize?: number;
15
15
  readonly runtime?: MinSyncRuntime;
16
16
  }
17
- /** MinSync v0.4.5 supports native vector, BM25, and hybrid query modes. */
17
+ /** MinSync v0.4.6 supports native vector, BM25, and hybrid query modes. */
18
18
  export type MinSyncQueryMode = "vector" | "bm25" | "hybrid";
19
19
  export declare class MinSyncQueryError extends Error {
20
20
  readonly code: number | null;
@@ -1,4 +1,4 @@
1
- export declare const MINSYNC_VERSION = "0.4.5";
1
+ export declare const MINSYNC_VERSION = "0.4.6";
2
2
  export declare const MINSYNC_CARGO_INSTALL_TIMEOUT_MS: number;
3
3
  export interface MinSyncReleaseAsset {
4
4
  readonly name: string;
@@ -9,7 +9,7 @@ export type AutoRAGRunEvent = {
9
9
  timestamp: string;
10
10
  sessionId: string;
11
11
  resultCount: number;
12
- /** True when the run ended without emit_autorag_results and fell back to a degraded response. */
12
+ /** True when the run ended without a final answer message and fell back to a degraded response. */
13
13
  degraded?: boolean;
14
14
  } | {
15
15
  event: "search_failed";
@@ -7,4 +7,4 @@ export { type CreateRerankerOptions, createReranker, DEFAULT_RERANK_API_KEY_ENV,
7
7
  export { matchesVirtualPathScope, normalizeVirtualPath, normalizeVirtualPathScope, virtualPathScopeToRegExp, } from "./scope.js";
8
8
  export { type DatasourceCatalogEntry, derivedDatasourceIds, type RetrievalSelection, RetrievalSelectionError, type RetrievalSelectionErrorCode, resolveSelectedMethods, } from "./selection.js";
9
9
  export { describeRetrievalError, groupUnsearchedSurfaces, MINSYNC_SURFACE, type RetrievalSkip, retrievalSurfaceFor, } from "./skip.js";
10
- export type { CuratedResult, NumberedResult, RetrievalDiagnostic, RetrievalDiagnosticCode, RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult, RetrievalUnsearchedSurface, RetrievalWithDiagnostics, } from "./types.js";
10
+ export type { RetrievalDiagnostic, RetrievalDiagnosticCode, RetrievalMethod, RetrievalMethodDescriptor, RetrievalOptions, RetrievalResult, RetrievalUnsearchedSurface, RetrievalWithDiagnostics, } from "./types.js";
@@ -58,26 +58,3 @@ export interface RetrievalWithDiagnostics {
58
58
  /** Surfaces that were not searched for this query. Empty when every method ran. */
59
59
  unsearched: RetrievalUnsearchedSurface[];
60
60
  }
61
- export interface NumberedResult {
62
- index: number;
63
- source: string;
64
- content: string;
65
- method: string;
66
- }
67
- export interface EvidenceReference {
68
- method: string;
69
- source: string;
70
- excerpt?: string;
71
- content?: string;
72
- retrievalResultId?: string;
73
- chunkIndex?: number;
74
- lineNumber?: number;
75
- stableEvidenceId: string;
76
- }
77
- export interface CuratedResult {
78
- index: number;
79
- content: string;
80
- source: string;
81
- method: string;
82
- evidenceRefs?: readonly EvidenceReference[];
83
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autorag/librarian",
3
- "version": "2.9.0",
3
+ "version": "2.10.0",
4
4
  "description": "Self-evolving librarian agent on Pi framework with pluggable retrieval methods",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -169,7 +169,7 @@ AUTORAG_CONFIG=/absolute/path/to/.autorag/config.json autorag lite refresh --jso
169
169
  are missing or broken, run a full refresh or return to setup rather than
170
170
  silently degrading to lexical-only search.
171
171
  - MinSync's default embedder is in-process native Qwen3 embeddings
172
- (`native:Qwen/Qwen3-Embedding-0.6B`, 1024 dimensions, MinSync 0.4.5+): no
172
+ (`native:Qwen/Qwen3-Embedding-0.6B`, 1024 dimensions, MinSync 0.4.6): no
173
173
  embedder flags, no API key, and no external daemon (such as Ollama) are
174
174
  needed, and no corpus text leaves the machine. For gateway-profiled
175
175
  embeddings, prefetch with `autorag models prefetch --profile qwen3-embedding-0.6b`.
@@ -184,7 +184,7 @@ told duplicate exclusion is off. Set `"excludeExactDuplicates": false` to
184
184
  index every copy.
185
185
 
186
186
  MinSync's default embedder is in-process native Qwen3 embeddings
187
- (`native:Qwen/Qwen3-Embedding-0.6B`, 1024 dimensions, MinSync 0.4.5+). The
187
+ (`native:Qwen/Qwen3-Embedding-0.6B`, 1024 dimensions, MinSync 0.4.6). The
188
188
  default needs no embedder flags, no API key, and no external daemon (such as
189
189
  Ollama) — all embeddings run in-process locally and privately. For workspaces
190
190
  using the loopback llama-server gateway, prefetch the verified model with
@@ -264,7 +264,7 @@ default model, add a provider, check that a provider works), Jev's `config`
264
264
  branch loads this whole skill into that turn. The agent edits only the active
265
265
  config file (and `models.json` for a custom provider), verifies with
266
266
  `autorag health --json` and `autorag models list --available`, and reports each
267
- change as old → new through `emit_autorag_results`. It never prints a
267
+ change as old → new in its final message. It never prints a
268
268
  credential value and never uses `init --force`.
269
269
 
270
270
  ### Retrieval and ingest caps
@@ -1,56 +0,0 @@
1
- import type { AgentTool } from "@earendil-works/pi-agent-core";
2
- import { Type } from "typebox";
3
- import type { AutoRAGEvidenceRef } from "./emit-results-tool.js";
4
- import type { EvidenceLedger } from "./evidence-ledger.js";
5
- export declare const EMIT_FAST_ANSWER_TOOL_NAME = "emit_fast_answer";
6
- declare const fastAnswerSchema: Type.TObject<{
7
- answer: Type.TString;
8
- results: Type.TArray<Type.TObject<{
9
- number: Type.TInteger;
10
- title: Type.TString;
11
- summary: Type.TString;
12
- evidence: Type.TOptional<Type.TArray<Type.TObject<{
13
- excerpt: Type.TString;
14
- lineNumber: Type.TOptional<Type.TInteger>;
15
- }>>>;
16
- confidence: Type.TOptional<Type.TNumber>;
17
- refs: Type.TOptional<Type.TArray<Type.TString>>;
18
- }>>;
19
- }>;
20
- export interface AutoRAGFastAnswerResult {
21
- readonly number: number;
22
- readonly title: string;
23
- readonly summary: string;
24
- readonly evidence: readonly {
25
- readonly excerpt: string;
26
- readonly lineNumber?: number;
27
- }[];
28
- readonly confidence?: number;
29
- }
30
- export interface AutoRAGFastAnswerDetails {
31
- readonly answer: string;
32
- readonly results: readonly AutoRAGFastAnswerResult[];
33
- /** Number -> primary source, derived from `evidenceRefs`. */
34
- readonly sources: readonly {
35
- readonly number: number;
36
- readonly source: string;
37
- }[];
38
- /** Harness-recorded evidence each result cited; never model-written text. */
39
- readonly evidenceRefs: readonly {
40
- readonly number: number;
41
- readonly refs: readonly AutoRAGEvidenceRef[];
42
- }[];
43
- }
44
- export interface EmitFastAnswerToolOptions {
45
- /** Evidence the baseline retrieval produced; `refs` resolve against it. */
46
- readonly ledger: EvidenceLedger;
47
- }
48
- /**
49
- * Builds the non-terminating fast-answer tool used by the two-phase search
50
- * flow. The model calls this exactly once during the thinking-off fast phase
51
- * to deliver an immediate, complete first answer; the run then continues into
52
- * the verification phase, which ends with emit_autorag_results. Sources are
53
- * derived from the evidence ids the model cites, never typed by the model.
54
- */
55
- export declare function createEmitFastAnswerTool(capture: (details: AutoRAGFastAnswerDetails) => void, options: EmitFastAnswerToolOptions): AgentTool<typeof fastAnswerSchema, AutoRAGFastAnswerDetails>;
56
- export {};