@autorag/librarian 2.10.4 → 2.10.6

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 (89) hide show
  1. package/NOTICE +9 -9
  2. package/README.md +32 -17
  3. package/dist/agent/agent.d.ts +63 -51
  4. package/dist/agent/context-token-guard.d.ts +11 -0
  5. package/dist/agent/discord-remote.d.ts +30 -0
  6. package/dist/agent/embedding-controls.d.ts +22 -0
  7. package/dist/agent/index.d.ts +1 -2
  8. package/dist/agent/pi-session.d.ts +21 -1
  9. package/dist/agent/query-decomposition.d.ts +1 -1
  10. package/dist/agent/search-documents.d.ts +2 -2
  11. package/dist/agent/system-prompt.d.ts +1 -1
  12. package/dist/agent/web-search-tool.d.ts +2 -2
  13. package/dist/cli/commands/models.d.ts +0 -14
  14. package/dist/cli/commands/search.d.ts +3 -4
  15. package/dist/cli/config.d.ts +7 -19
  16. package/dist/cli/index.d.ts +1 -1
  17. package/dist/cli/index.js +6056 -9408
  18. package/dist/cli/setup.d.ts +13 -36
  19. package/dist/cli/whatsapp-extension.d.ts +21 -0
  20. package/dist/cloud/config.d.ts +3 -3
  21. package/dist/core.js +7126 -9804
  22. package/dist/datasource/embedding-env.d.ts +29 -0
  23. package/dist/datasource/sidecar/config.d.ts +3 -0
  24. package/dist/datasource/sidecar/index.d.ts +1 -1
  25. package/dist/datasource/skills/discrawl/client.d.ts +1 -0
  26. package/dist/datasource/skills/discrawl/embedding.d.ts +17 -0
  27. package/dist/datasource/skills/discrawl/types.d.ts +11 -3
  28. package/dist/datasource/skills/factory.d.ts +14 -1
  29. package/dist/datasource/skills/github-gist/semantic.d.ts +5 -5
  30. package/dist/datasource/skills/github-gist/skill.d.ts +2 -3
  31. package/dist/datasource/skills/lazykatok/types.d.ts +9 -1
  32. package/dist/datasource/skills/mailcrawl/types.d.ts +9 -1
  33. package/dist/embedding/daemon.d.ts +57 -0
  34. package/dist/embedding/embedder.d.ts +59 -0
  35. package/dist/embedding/http-embedder.d.ts +28 -0
  36. package/dist/embedding/in-process.d.ts +19 -0
  37. package/dist/embedding/index.d.ts +28 -0
  38. package/dist/embedding/managed.d.ts +44 -0
  39. package/dist/embedding/prefixes.d.ts +18 -0
  40. package/dist/embedding/settings.d.ts +9 -0
  41. package/dist/index.js +7149 -9829
  42. package/dist/mcp/index.js +7146 -9824
  43. package/dist/memory/context.d.ts +1 -1
  44. package/dist/memory/similar-queries.d.ts +1 -1
  45. package/dist/minsync/binary.d.ts +21 -0
  46. package/dist/minsync/client.d.ts +19 -10
  47. package/dist/minsync/embedder-config.d.ts +11 -1
  48. package/dist/minsync/index.d.ts +1 -1
  49. package/dist/minsync/installer.d.ts +1 -1
  50. package/dist/minsync/kiwi.d.ts +17 -0
  51. package/dist/minsync/lexical-language.d.ts +18 -0
  52. package/dist/minsync/method.d.ts +3 -11
  53. package/dist/minsync/process.d.ts +1 -0
  54. package/dist/minsync/types.d.ts +9 -2
  55. package/dist/retrieval/rerank.d.ts +10 -3
  56. package/dist/web/search/types.d.ts +22 -18
  57. package/package.json +4 -3
  58. package/skills/autorag/SKILL.md +3 -8
  59. package/skills/autorag-doctor/SKILL.md +47 -26
  60. package/skills/autorag-lite-setup/SKILL.md +8 -8
  61. package/skills/autorag-setup/SKILL.md +39 -23
  62. package/dist/agent/peer-target-tool.d.ts +0 -19
  63. package/dist/agent/query-peer-tool.d.ts +0 -51
  64. package/dist/cli/commands/gateway.d.ts +0 -7
  65. package/dist/cli/commands/p2p-policy.d.ts +0 -2
  66. package/dist/cli/commands/p2p.d.ts +0 -7
  67. package/dist/cli/commands/serve.d.ts +0 -19
  68. package/dist/embedding-runtime/cache.d.ts +0 -30
  69. package/dist/embedding-runtime/gateway-embedder.d.ts +0 -41
  70. package/dist/embedding-runtime/gateway.d.ts +0 -27
  71. package/dist/embedding-runtime/index.d.ts +0 -120
  72. package/dist/embedding-runtime/manifest.d.ts +0 -20
  73. package/dist/embedding-runtime/supervisor.d.ts +0 -74
  74. package/dist/embedding-runtime/types.d.ts +0 -70
  75. package/dist/p2p/approval-store.d.ts +0 -32
  76. package/dist/p2p/egress-gate.d.ts +0 -22
  77. package/dist/p2p/file-sharing.d.ts +0 -33
  78. package/dist/p2p/injection-classifier.d.ts +0 -33
  79. package/dist/p2p/injection-gate.d.ts +0 -37
  80. package/dist/p2p/pii-gate.d.ts +0 -47
  81. package/dist/p2p/policy-filter.d.ts +0 -15
  82. package/dist/p2p/policy.d.ts +0 -77
  83. package/dist/p2p/simplex-query-store.d.ts +0 -44
  84. package/dist/p2p/simplex-server.d.ts +0 -115
  85. package/dist/p2p/simplex-transport.d.ts +0 -62
  86. package/dist/p2p/wire.d.ts +0 -39
  87. package/licenses/embedding-assets.json +0 -85
  88. package/licenses/llama.cpp-MIT.txt +0 -21
  89. package/licenses/qwen3-embedding-notice.txt +0 -13
@@ -1,6 +1,4 @@
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";
1
+ import { type EmbeddingBackend, type ManagedEmbedder } from "../embedding/index.js";
4
2
  import { type FileLockHandle } from "../filesystem/file-lock.js";
5
3
  export type SetupDatasourceState = "configured" | "skipped" | "blocked";
6
4
  export interface SetupDatasourceReport {
@@ -8,46 +6,26 @@ export interface SetupDatasourceReport {
8
6
  readonly state: SetupDatasourceState;
9
7
  readonly reason?: string;
10
8
  }
9
+ export interface SetupEmbeddingReport {
10
+ /** Where text is embedded: a configured remote endpoint, the `minsync serve` daemon, or MinSync in-process. */
11
+ readonly backend?: Exclude<EmbeddingBackend, "none">;
12
+ readonly provider?: string;
13
+ readonly model?: string;
14
+ readonly dimension?: number;
15
+ /** Why no embedding backend is available. */
16
+ readonly reason?: string;
17
+ }
11
18
  export interface SetupReport {
12
19
  readonly ok: boolean;
13
20
  readonly mode: "semantic" | "bm25";
14
- readonly runtime: {
15
- readonly state: string;
16
- readonly health: boolean;
17
- readonly model: string;
18
- readonly reason?: string;
19
- };
20
- readonly model: {
21
- readonly valid: boolean;
22
- readonly profile: ProfileId;
23
- };
21
+ readonly embedding: SetupEmbeddingReport;
24
22
  readonly datasources: readonly SetupDatasourceReport[];
25
23
  readonly remediation?: string;
26
24
  readonly changed: boolean;
27
25
  }
28
- export interface SetupRuntime {
29
- runtimeStatus(): Promise<RuntimeStatus>;
30
- verifyModel(profileId?: ProfileId): Promise<{
31
- profileId: ProfileId;
32
- path: string;
33
- hash: string;
34
- }>;
35
- ensureRuntime?(input?: {
36
- profileId?: ProfileId;
37
- }): Promise<{
38
- baseUrl: string;
39
- profile: ReturnType<typeof resolveProfile>;
40
- identity: {
41
- provider: string;
42
- model: string;
43
- dimension: number;
44
- profileId: ProfileId;
45
- };
46
- }>;
47
- releaseRuntimeHandles?(): Promise<void>;
48
- }
49
26
  export interface SetupDeps {
50
- readonly runtime?: SetupRuntime;
27
+ /** Embedding backend probe; defaults to the one built from the config's `minSync.embedder`. */
28
+ readonly embedder?: ManagedEmbedder;
51
29
  readonly env?: NodeJS.ProcessEnv;
52
30
  readonly pathExists?: (path: string) => boolean;
53
31
  readonly executable?: (name: string) => string | undefined;
@@ -56,6 +34,5 @@ export interface SetupDeps {
56
34
  export declare function runSetup(options: {
57
35
  configPath: string;
58
36
  workspacePath: string;
59
- profileId?: ProfileId;
60
37
  deps?: SetupDeps;
61
38
  }): Promise<SetupReport>;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The most-installed pi package that drives a session from WhatsApp (QR pairing, allow-listed
3
+ * contacts/groups, inbound messages become prompts, assistant replies go back). Pinned so a
4
+ * published update never changes what runs unattended.
5
+ */
6
+ export declare const WHATSAPP_PI_SOURCE = "npm:whatsapp-pi@1.0.70";
7
+ export interface WhatsAppExtension {
8
+ readonly paths: string[];
9
+ readonly flags: Readonly<Record<string, string | boolean>>;
10
+ }
11
+ export interface WhatsAppExtensionInput {
12
+ readonly flags: Readonly<Record<string, string | boolean | undefined>>;
13
+ /** Installs (if missing) the pi package sources and returns their extension entry files. */
14
+ readonly resolveSources?: (sources: string[]) => Promise<string[]>;
15
+ readonly cwd?: string;
16
+ }
17
+ /**
18
+ * Resolves `autorag tui --whatsapp [--whatsapp-group JID]` into the extension entry files and flag
19
+ * values the interactive session loads, or `undefined` when WhatsApp control was not requested.
20
+ */
21
+ export declare function resolveWhatsAppExtension(input: WhatsAppExtensionInput): Promise<WhatsAppExtension | undefined>;
@@ -5,11 +5,11 @@ export declare const PROVIDER_NAME = "Dazzi Models";
5
5
  * Chat model used when nothing is configured and the user is signed in. Used only
6
6
  * if the live or persisted catalog lists it; otherwise the first catalog model.
7
7
  */
8
- export declare const DEFAULT_DAZZI_CHAT_MODEL_ID = "anthropic/claude-haiku-5.5";
8
+ export declare const DEFAULT_DAZZI_CHAT_MODEL_ID = "z-ai/glm-5.3-flash";
9
9
  /**
10
10
  * Question-decomposition model used when nothing is configured and the user is
11
- * signed in. `z-ai/glm-5.3-flash` is not usable here: it requires reasoning, and
12
- * the decomposition call runs with reasoning off. Same catalog caveat as
11
+ * signed in. The decomposition call runs with minimal reasoning, so reasoning-only
12
+ * models (e.g. `z-ai/glm-5.3-flash`) also work. Same catalog caveat as
13
13
  * {@link DEFAULT_DAZZI_CHAT_MODEL_ID}: the model must be in the signed-in catalog.
14
14
  */
15
15
  export declare const DEFAULT_DAZZI_QUERY_DECOMPOSITION_MODEL_ID = "openai/gpt-6-luna";