@jcode.labs/ragmir 2.9.1 → 2.9.2

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/README.md CHANGED
@@ -1,16 +1,91 @@
1
1
  # Ragmir Core
2
2
 
3
- `@jcode.labs/ragmir` provides the `rgr` CLI, TypeScript API, MCP server, and portable agent skills for
4
- local cited retrieval.
3
+ `@jcode.labs/ragmir` is the main Ragmir package. It provides the `rgr` command-line interface, a
4
+ TypeScript retrieval API, a local MCP server, and portable agent helpers.
5
+
6
+ Use it when a repository needs searchable, cited context without uploading its documents to a hosted
7
+ knowledge base. It is retrieval-first: the default `local-hash` mode works offline, without an
8
+ account or model download.
9
+
10
+ ## Choose this package when you need
11
+
12
+ | Need | What Core provides |
13
+ | --- | --- |
14
+ | Search project documents from a terminal | `rgr search` with source citations. |
15
+ | Give an AI agent bounded access to repository context | A local stdio MCP server and generated helpers. |
16
+ | Build retrieval into a Node.js tool | A typed TypeScript API for ingesting and searching. |
17
+ | Index PDFs, Markdown, source files, Office files, HTML, or CSV | Local extraction, redaction, chunking, and storage. |
18
+ | Work with a confidential repository offline | Ignored local `.ragmir/` state and offline-first retrieval. |
19
+
20
+ For answer generation, install the optional [Ragmir Chat](https://www.npmjs.com/package/@jcode.labs/ragmir-chat)
21
+ package. For audio summaries, install [Ragmir TTS](https://www.npmjs.com/package/@jcode.labs/ragmir-tts).
22
+
23
+ ## Quick start
24
+
25
+ Install Core in the repository that owns the documents you want to search:
5
26
 
6
27
  ```bash
7
28
  npm install --save-dev @jcode.labs/ragmir
8
29
  npx rgr setup
9
30
  npx rgr sources add "docs/**/*.md"
10
31
  npx rgr ingest
11
- npx rgr search "your question"
32
+ npx rgr search "Which decision changed the deployment?"
12
33
  ```
13
34
 
14
- The generated `.ragmir/` state stays local and ignored by Git. See the
15
- [root README](https://github.com/jcode-works/jcode-ragmir#readme) for the API, agent setup, and
16
- focused documentation.
35
+ `rgr setup` creates ignored local state. `rgr ingest` incrementally extracts text, applies configured
36
+ redaction, chunks the content, and writes the local index. Every search result identifies its source
37
+ file, excerpt, chunk, and PDF page when available.
38
+
39
+ ## How it works
40
+
41
+ 1. Select files with `rgr sources add` or `.ragmir/sources.txt`.
42
+ 2. Ragmir extracts and redacts text locally, then writes a local index under `.ragmir/`.
43
+ 3. `rgr search`, the TypeScript API, and MCP return ranked passages with citations.
44
+ 4. Semantic embeddings, OCR, local chat, and audio are explicit opt-ins.
45
+
46
+ For a scanned PDF, OCR runs only on pages that have no embedded text, through a command configured on
47
+ your machine. Ragmir never sends PDF pages to a cloud OCR service.
48
+
49
+ ## TypeScript API
50
+
51
+ ```ts
52
+ import { ingest, search } from "@jcode.labs/ragmir"
53
+
54
+ await ingest({ cwd: process.cwd() })
55
+
56
+ const results = await search("Which decision changed the deployment?", { topK: 5 })
57
+
58
+ for (const result of results) {
59
+ console.log(result.relativePath, result.citation, result.text)
60
+ }
61
+ ```
62
+
63
+ Use `ask()` for cited retrieval context without an LLM, `research()` for audit-backed multi-query
64
+ retrieval, and `serveMcp()` to start the local MCP server from your own integration.
65
+
66
+ ## Agent setup
67
+
68
+ Generate local MCP helpers for the agents used by the repository:
69
+
70
+ ```bash
71
+ npx rgr setup --agents claude,codex,kimi,opencode,cline
72
+ ```
73
+
74
+ The generated helper points the agent at the current project, never at Ragmir's package installation
75
+ directory. Retrieval stays bounded and read-focused.
76
+
77
+ ## Technology and local data
78
+
79
+ Core is TypeScript for Node.js 20 or later. It uses LanceDB for local storage, the Model Context
80
+ Protocol TypeScript SDK for agent integration, and Transformers.js only when semantic retrieval is
81
+ explicitly enabled. Its generated `.ragmir/` state is local and should stay ignored by Git.
82
+
83
+ ## Further reading
84
+
85
+ - [Ragmir overview and package comparison](https://github.com/jcode-works/jcode-ragmir#readme)
86
+ - [CLI reference](https://github.com/jcode-works/jcode-ragmir/blob/main/docs/cli-reference.md)
87
+ - [TypeScript API reference](https://github.com/jcode-works/jcode-ragmir/blob/main/docs/api-reference.md)
88
+ - [Configuration and privacy](https://github.com/jcode-works/jcode-ragmir/blob/main/docs/configuration.md)
89
+ - [Agent integration](https://github.com/jcode-works/jcode-ragmir/blob/main/docs/agent-integration.md)
90
+
91
+ Ragmir is open source under the [MIT License](https://github.com/jcode-works/jcode-ragmir/blob/main/LICENSE).
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "2.9.1";
1
+ export declare const VERSION = "2.9.2";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = "2.9.1";
1
+ export const VERSION = "2.9.2";
2
2
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jcode.labs/ragmir",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "Ragmir Core: open-source sovereign local RAG for confidential datasets and AI agents.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -69,8 +69,8 @@
69
69
  "unpdf": "^1.4.0",
70
70
  "yaml": "^2.9.0",
71
71
  "zod": "^4.1.13",
72
- "@jcode.labs/ragmir-chat": "2.9.1",
73
- "@jcode.labs/ragmir-tts": "2.9.1"
72
+ "@jcode.labs/ragmir-chat": "2.9.2",
73
+ "@jcode.labs/ragmir-tts": "2.9.2"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/html-to-text": "^9.0.4",