@autorag/librarian 2.8.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.
Files changed (80) hide show
  1. package/NOTICE +4 -4
  2. package/README.md +65 -24
  3. package/dist/agent/agent.d.ts +126 -63
  4. package/dist/agent/citations.d.ts +23 -0
  5. package/dist/agent/datasource-skill.d.ts +30 -16
  6. package/dist/agent/emit-results-tool.d.ts +37 -2
  7. package/dist/agent/evidence-judgment.d.ts +58 -0
  8. package/dist/agent/evidence-ledger.d.ts +59 -0
  9. package/dist/agent/evidence-origins.d.ts +49 -0
  10. package/dist/agent/fast-answer-tool.d.ts +16 -6
  11. package/dist/agent/index.d.ts +1 -1
  12. package/dist/agent/jikji-find-tool.d.ts +2 -1
  13. package/dist/agent/pi-session.d.ts +8 -1
  14. package/dist/agent/query-peer-tool.d.ts +3 -0
  15. package/dist/agent/query-routing.d.ts +71 -10
  16. package/dist/agent/search-all-tool.d.ts +5 -5
  17. package/dist/agent/search-documents.d.ts +3 -11
  18. package/dist/agent/search-minsync-tool.d.ts +5 -5
  19. package/dist/agent/search-single-datasource-tool.d.ts +9 -8
  20. package/dist/agent/self-config.d.ts +40 -0
  21. package/dist/agent/system-prompt.d.ts +2 -3
  22. package/dist/agent/web-fetch-tool.d.ts +2 -1
  23. package/dist/agent/web-search-tool.d.ts +2 -1
  24. package/dist/cli/commands/evidence.d.ts +2 -2
  25. package/dist/cli/commands/memory.d.ts +1 -1
  26. package/dist/cli/commands/report.d.ts +1 -1
  27. package/dist/cli/config.d.ts +16 -8
  28. package/dist/cli/index.d.ts +1 -1
  29. package/dist/cli/index.js +10450 -9902
  30. package/dist/cli/output.d.ts +2 -6
  31. package/dist/config/home.d.ts +6 -0
  32. package/dist/core.d.ts +8 -16
  33. package/dist/core.js +16465 -15823
  34. package/dist/datasource/chunk-store.d.ts +2 -6
  35. package/dist/datasource/connector-skill.d.ts +2 -3
  36. package/dist/datasource/index.d.ts +2 -4
  37. package/dist/datasource/registry.d.ts +11 -13
  38. package/dist/datasource/scope.d.ts +19 -0
  39. package/dist/datasource/skills/github-gist/index.d.ts +1 -1
  40. package/dist/datasource/skills/github-gist/semantic.d.ts +3 -44
  41. package/dist/datasource/skills/github-gist/skill.d.ts +3 -3
  42. package/dist/datasource/types.d.ts +14 -28
  43. package/dist/embedding-runtime/gateway-embedder.d.ts +41 -0
  44. package/dist/index.d.ts +1 -1
  45. package/dist/index.js +14767 -14173
  46. package/dist/language.d.ts +2 -1
  47. package/dist/mcp/index.js +14797 -14204
  48. package/dist/memory/check-memory-tool.d.ts +8 -4
  49. package/dist/memory/context.d.ts +51 -0
  50. package/dist/memory/index.d.ts +8 -1
  51. package/dist/memory/judged-evidence.d.ts +32 -0
  52. package/dist/memory/memory.d.ts +36 -120
  53. package/dist/memory/renderer.d.ts +16 -7
  54. package/dist/memory/similar-queries.d.ts +40 -0
  55. package/dist/minsync/errors.d.ts +14 -0
  56. package/dist/minsync/index.d.ts +1 -0
  57. package/dist/minsync/method.d.ts +3 -3
  58. package/dist/mirror/sync.d.ts +5 -2
  59. package/dist/parser/defaults.d.ts +16 -5
  60. package/dist/parser/index.d.ts +1 -1
  61. package/dist/parser/kordoc.d.ts +8 -1
  62. package/dist/parser/ocr-engines.d.ts +19 -0
  63. package/dist/retrieval/bm25.d.ts +19 -0
  64. package/dist/retrieval/engine.d.ts +17 -58
  65. package/dist/retrieval/index.d.ts +2 -1
  66. package/dist/retrieval/merger.d.ts +6 -0
  67. package/dist/retrieval/rerank.d.ts +2 -2
  68. package/dist/retrieval/selection.d.ts +33 -41
  69. package/dist/retrieval/types.d.ts +1 -3
  70. package/dist/web/search/format.d.ts +5 -2
  71. package/dist/web/search/index.d.ts +7 -1
  72. package/package.json +5 -5
  73. package/skills/autorag/SKILL.md +21 -22
  74. package/skills/autorag-doctor/SKILL.md +20 -15
  75. package/skills/autorag-lite-setup/SKILL.md +21 -18
  76. package/skills/autorag-setup/SKILL.md +33 -20
  77. package/dist/cli/commands/feedback.d.ts +0 -8
  78. package/dist/datasource/access-context.d.ts +0 -43
  79. package/dist/datasource/result-filter.d.ts +0 -64
  80. package/dist/parser/ocr.d.ts +0 -31
@@ -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 { MemorySchemaV4 } from "../memory/memory.js";
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: MemorySchemaV4, opts: RenderOptions): string;
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[];
@@ -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
@@ -4,7 +4,7 @@ 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";
6
6
  import type { FSearchSearchRequest, FSearchSearchResult } from "./fsearch/index.js";
7
- import type { MemorySchemaV4 } from "./memory/memory.js";
7
+ import type { MemorySchema } from "./memory/memory.js";
8
8
  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";
@@ -44,15 +44,14 @@ export declare class AutoRAGLite {
44
44
  /** Return the deterministic retrieval engine used by this configured runtime. */
45
45
  getRetrievalEngine(): RetrievalEngine;
46
46
  /**
47
- * List the authorized configured datasources for this runtime: identity,
48
- * capability tags, and authorized source scope strings only — no
49
- * credentials or config metadata.
47
+ * List the configured datasources for this runtime: identity, descriptive
48
+ * tags, and source scope strings only — no credentials or config metadata.
50
49
  */
51
50
  listDatasources(): DatasourceCatalogEntry[];
52
51
  /**
53
52
  * Search only the selected datasources/methods/local surfaces. Selection is
54
- * applied before any backend is invoked, so an unselected or unauthorized
55
- * datasource never runs. Unknown or unauthorized selections throw
53
+ * applied before any backend is invoked, so an unselected datasource never
54
+ * runs. Unknown methods or unknown datasource ids throw
56
55
  * {@link RetrievalSelectionError}.
57
56
  */
58
57
  searchSelected(query: string, selection?: RetrievalSelection, options?: RetrievalOptions): Promise<{
@@ -79,21 +78,14 @@ export declare class AutoRAGLite {
79
78
  diagnostics: RetrievalDiagnostic[];
80
79
  unsearched: RetrievalUnsearchedSurface[];
81
80
  }>;
82
- /** Persist a typed structured report for later evidence and feedback commands. */
81
+ /** Persist a typed structured report for later evidence commands. */
83
82
  recordStructuredResultsSession(sessionId: string, query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
84
83
  /** Generate a session id and persist a typed structured report. */
85
84
  recordReport(query: string, details: AutoRAGResultsDetails): SearchDocumentsResponse;
86
85
  /** Return the opaque result registry associated with a persisted report. */
87
86
  getResultRegistry(sessionId: string): ReadonlyMap<number, CuratedResult>;
88
- /** Record numbered feedback and report whether numbers matched and changed memory. */
89
- recordFeedbackByNumbersDetailed(sessionId: string, usefulNumbers: readonly number[], notUsefulNumbers?: readonly number[]): {
90
- matched: boolean;
91
- applied: boolean;
92
- };
93
- /** Record numbered feedback against a report persisted by this facade. */
94
- recordFeedbackByNumbers(sessionId: string, usefulNumbers: readonly number[], notUsefulNumbers?: readonly number[]): boolean;
95
- /** Return a detached snapshot of persisted evidence and feedback state. */
96
- getMemorySchema(): MemorySchemaV4;
87
+ /** Return a detached snapshot of persisted evidence state. */
88
+ getMemorySchema(): MemorySchema;
97
89
  }
98
90
  /** Resolve the existing CLI config and construct a model-free runtime. */
99
91
  export declare function createAutoRAGLite(options?: AutoRAGLiteOptions): AutoRAGLite;