Skip to content

Commit 0befe9e

Browse files
authored
fix(core): keep local add-ons optional and polish workflows (#115) (#116)
* fix(core): keep chat and tts truly optional * fix(landing): polish local rag workflows
1 parent 0838219 commit 0befe9e

28 files changed

Lines changed: 225 additions & 115 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
- `packages/ragmir-core` provides `@jcode.labs/ragmir`: the `rgr` CLI, TypeScript library, MCP server, and portable skills.
1414
- `packages/ragmir-chat` is the optional local GGUF synthesis add-on used by `rgr chat`.
1515
- `packages/ragmir-tts` is the optional local/offline audio add-on used by `rgr audio`.
16+
- Core must install and start without Chat or TTS. Keep both as optional peer integrations and load them only when their command is used.
1617
- `packages/ragmir-landing` is a self-contained, telemetry-free Astro site. Keep it static, open-source focused, and free of vendor deployment configuration.
1718
- Ragmir Core stays retrieval-first: `local-hash` supports offline retrieval, `transformers` is the explicit semantic option, and local chat remains a separate add-on.
1819
- Long-running Node.js processes use one `RagmirClient` per project root and close it during shutdown. Keep the top-level API for one-shot scripts.

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Use `pnpm --filter @jcode.labs/ragmir <script>` for Core-only work. The pinned N
1717
- `packages/ragmir-core`: published CLI, library, MCP server, and skills.
1818
- `packages/ragmir-chat`: optional local chat add-on.
1919
- `packages/ragmir-tts`: optional audio add-on.
20+
- Core must install and start without Chat or TTS. Keep both as optional peer integrations and load them only when their command is used.
2021
- `packages/ragmir-landing`: self-contained static Astro documentation and product site.
2122

2223
Generated `dist/`, `.astro/`, `release-artifacts/`, and `.ragmir/` directories are ignored. Do not

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
**Local RAG for your coding agents.**
1010

11-
Ragmir indexes the project files you choose, keeps the index on your machine, and gives coding
12-
agents and local scripts bounded evidence with verifiable citations. Connect through project-scoped
13-
agent skills, a local MCP server, the CLI, or the TypeScript API. The default path needs no account,
14-
hosted document store, or model download.
11+
Ragmir indexes the project files you choose on your machine and retrieves bounded, cited evidence
12+
offline by default. The corpus and generated index remain local, so confidential source files are
13+
not uploaded to a hosted RAG service. Connect through project-scoped agent skills, a local MCP
14+
server, the CLI, or the TypeScript API. The default `local-hash` path needs no account, API key, or
15+
model download.
1516

1617
Bring the coding agent or automation you already use. Ragmir Core retrieves evidence without
1718
calling a model. If no retrieved passage may leave the machine, use a local consumer or Ragmir Chat
@@ -235,6 +236,8 @@ Redaction reduces accidental exposure but is not a compliance certification. Rev
235236
| [`@jcode.labs/ragmir-chat`](./packages/ragmir-chat/README.md) | Optional cited generation with a local GGUF model |
236237
| [`@jcode.labs/ragmir-tts`](./packages/ragmir-tts/README.md) | Optional local audio or explicit online voice rendering |
237238

239+
Installing Core does not install Chat or TTS. Add only the optional package needed by the workflow.
240+
238241
## Runnable examples
239242

240243
| Example | What it proves |

SECURITY.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,9 @@ or private document disclosure.
1717

1818
## Data Boundary
1919

20-
Ragmir is designed to index local project documents. Raw project documents, `.ragmir/`,
21-
environment files, credentials, and customer records must remain outside commits.
20+
Ragmir indexes selected project documents on the user's machine. The default `local-hash` path keeps
21+
ingestion and retrieval offline, and Core does not upload the corpus to a hosted RAG service. A cloud
22+
consumer can still receive returned passages when the user explicitly chooses that handoff.
23+
24+
Raw project documents, `.ragmir/`, environment files, credentials, and customer records must remain
25+
outside commits.

context7.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://context7.com/schema/context7.json",
33
"projectTitle": "Ragmir",
4-
"description": "Local RAG for coding agents and scripts, with verifiable citations. The TypeScript CLI, library, read-focused MCP server, and portable skills keep the index under ignored local state. Optional local Chat and TTS remain separate packages.",
4+
"description": "Local RAG for coding agents and scripts, with offline cited retrieval. The TypeScript CLI, library, read-focused MCP server, and portable skills keep the corpus and index under ignored local state. Optional local Chat and TTS remain separate packages.",
55
"excludeFolders": [
66
"node_modules",
77
"packages/ragmir-core/dist",

docs/agent-integration.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Agent integration
22

3-
Ragmir gives the AI or automation you choose cited local passages through CLI or one stdio MCP
4-
server. Core is model-agnostic and never calls a model itself.
3+
Ragmir indexes the selected project files locally and gives the AI or automation you choose cited
4+
passages through CLI or one stdio MCP server. The default `local-hash` path keeps ingestion and
5+
retrieval offline. Core is model-agnostic, never uploads the corpus, and never calls a model itself.
56

67
Choose the handoff that matches the corpus:
78

docs/api-reference.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ Ragmir publishes three ESM packages for Node.js 20 or later:
1010

1111
Use the CLI or MCP server when an agent or automation only needs to retrieve evidence. Use these
1212
APIs when a Node.js process owns the workflow. All paths resolve from `cwd` or the current working
13-
directory, and generated state stays under the project's ignored `.ragmir/` directory.
13+
directory, and generated state stays under the project's ignored `.ragmir/` directory. With the
14+
default `local-hash` provider, Core indexes and retrieves private project files locally and
15+
offline. Only passages a caller explicitly hands to an external consumer cross that boundary.
1416

1517
## Core: cited retrieval
1618

@@ -279,6 +281,15 @@ import { doctor, renderSpeech } from "@jcode.labs/ragmir-tts"
279281
const runtime = await doctor()
280282
console.log(runtime.transformersAvailable)
281283

284+
await renderSpeech({
285+
cwd: process.cwd(),
286+
text: "Non-sensitive model preload text.",
287+
outputPath: "/tmp/ragmir-tts-preload.wav",
288+
engine: "transformers",
289+
language: "en",
290+
allowRemoteModels: true,
291+
})
292+
282293
const result = await renderSpeech({
283294
cwd: process.cwd(),
284295
textFile: ".ragmir/reports/release-brief.md",
@@ -292,8 +303,9 @@ console.log(result.outputPath, result.samplingRate)
292303
```
293304

294305
TTS renders text supplied by the caller. It does not retrieve evidence or write a summary. The
295-
default Transformers.js path produces local WAV output after an explicit model preload. The Edge
296-
path is explicit and sends narration text to the external service.
306+
first call explicitly preloads the local model from non-sensitive text. Later calls can keep
307+
`allowRemoteModels: false` for confidential content. The Edge path is explicit and sends narration
308+
text to the external service.
297309

298310
### TTS runtime exports
299311

docs/cli-reference.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ rgr models pull --enable
6666
rgr ocr doctor
6767
rgr ocr setup --language eng+fra
6868
rgr chat setup --profile fast
69+
printf '%s\n' "Non-sensitive model preload text." > /tmp/ragmir-tts-preload.txt
70+
rgr audio /tmp/ragmir-tts-preload.txt --allow-remote-models --out .ragmir/audio/preload.wav
6971
rgr audio ./brief.md --offline --out .ragmir/audio/brief.wav
7072
```
7173

@@ -77,7 +79,9 @@ rgr audio ./brief.md --offline --out .ragmir/audio/brief.wav
7779
| `audio <file>` | Render text with the optional TTS add-on. |
7880

7981
OCR runs only for PDF pages without embedded text. The strict privacy profile disables external
80-
extractors. Normal chat and offline audio rendering do not download models.
82+
extractors. The first audio command above explicitly downloads the model from non-sensitive text;
83+
the second uses the prepared cache and does not download anything. See the
84+
[offline TTS guide](./offline-tts-preload.md) for model paths and verification.
8185

8286
## Agents, maintenance, and JSON
8387

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "jcode-ragmir",
33
"version": "0.4.12",
44
"private": true,
5-
"description": "Monorepo for Ragmir, local RAG with verifiable citations for coding agents and scripts, plus optional local Chat and TTS.",
5+
"description": "Monorepo for Ragmir, local RAG with offline cited retrieval for coding agents and scripts, plus optional local Chat and TTS.",
66
"type": "module",
77
"license": "MIT",
88
"author": "Jean-Baptiste Thery (https://github.com/jb-thery)",

packages/ragmir-chat/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77

88
**Optional local answers for your coding-agent RAG workflow.**
99

10-
Ragmir Core retrieves cited project evidence for your coding agent or local script.
11-
`@jcode.labs/ragmir-chat` adds an optional answer step on the same machine: it runs a verified local
12-
model, limits generation to the retrieved passages, and validates the source markers in the visible
13-
answer.
10+
Ragmir Core indexes selected project files on your machine and retrieves cited evidence offline by
11+
default, without uploading the source corpus to a hosted RAG service. `@jcode.labs/ragmir-chat` adds
12+
an optional answer step on the same machine: it runs a verified local model, limits generation to
13+
the retrieved passages, and validates the source markers in the visible answer.
1414

1515
Core does not require Chat or any generative model. Use this package only when the answer itself,
1616
not just retrieval, must stay on the workstation.

0 commit comments

Comments
 (0)