@jcode.labs/ragmir 2.10.0 → 2.11.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.
- package/README.md +10 -0
- package/dist/chunk-stats.d.ts +8 -0
- package/dist/chunk-stats.d.ts.map +1 -0
- package/dist/chunk-stats.js +31 -0
- package/dist/chunk-stats.js.map +1 -0
- package/dist/cli.js +101 -5
- package/dist/cli.js.map +1 -1
- package/dist/context-resources.d.ts +4 -0
- package/dist/context-resources.d.ts.map +1 -0
- package/dist/context-resources.js +87 -0
- package/dist/context-resources.js.map +1 -0
- package/dist/evaluate.d.ts.map +1 -1
- package/dist/evaluate.js +8 -0
- package/dist/evaluate.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/ingest.d.ts.map +1 -1
- package/dist/ingest.js +7 -1
- package/dist/ingest.js.map +1 -1
- package/dist/knowledge-bases.d.ts +4 -0
- package/dist/knowledge-bases.d.ts.map +1 -0
- package/dist/knowledge-bases.js +113 -0
- package/dist/knowledge-bases.js.map +1 -0
- package/dist/mcp.d.ts +3 -1
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +38 -7
- package/dist/mcp.js.map +1 -1
- package/dist/preview.d.ts +3 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +115 -0
- package/dist/preview.js.map +1 -0
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +70 -21
- package/dist/query.js.map +1 -1
- package/dist/research.d.ts.map +1 -1
- package/dist/research.js +2 -0
- package/dist/research.js.map +1 -1
- package/dist/setup.js +1 -1
- package/dist/skill.d.ts.map +1 -1
- package/dist/skill.js +46 -4
- package/dist/skill.js.map +1 -1
- package/dist/types.d.ts +140 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/skills/ragmir/SKILL.md +28 -0
package/skills/ragmir/SKILL.md
CHANGED
|
@@ -43,11 +43,15 @@ acceptable. Normal confidential indexing keeps remote model loading disabled.
|
|
|
43
43
|
|
|
44
44
|
| Need | Command or MCP tool |
|
|
45
45
|
| --- | --- |
|
|
46
|
+
| Active base, readiness, and capabilities | Read `ragmir://context` or run `rgr status --json` |
|
|
47
|
+
| Bounded source coverage and index drift | Read `ragmir://sources` or run `rgr audit` |
|
|
46
48
|
| Readiness | `rgr doctor` or `ragmir_status` |
|
|
47
49
|
| Repair setup or stale data | `rgr doctor --fix` |
|
|
48
50
|
| Check unindexed or unsupported files | `rgr audit --unsupported` |
|
|
51
|
+
| Preview redacted chunks before indexing | `rgr preview --path <prefix> --json` |
|
|
49
52
|
| Check privacy posture | `rgr security-audit` |
|
|
50
53
|
| Retrieve exact passages | `rgr search "query" --compact` or `ragmir_search` |
|
|
54
|
+
| Explain hybrid ranking | `rgr search "query" --explain` or `ragmir_search` with `explain: true` |
|
|
51
55
|
| Expand one returned citation | `ragmir_expand` |
|
|
52
56
|
| Gather broad cited evidence | `rgr research "topic" --compact` or `ragmir_research` |
|
|
53
57
|
| Return deterministic context | `rgr ask "question"` or `ragmir_ask` |
|
|
@@ -57,6 +61,21 @@ Use `rgr route-prompt "..." --json` or `ragmir_route_prompt` only when it is unc
|
|
|
57
61
|
current request needs the local corpus. The router is deterministic and does not retrieve or store
|
|
58
62
|
the prompt.
|
|
59
63
|
|
|
64
|
+
## Monorepo routing
|
|
65
|
+
|
|
66
|
+
When a monorepo has a root Ragmir base and nested app bases, select the base before retrieval:
|
|
67
|
+
|
|
68
|
+
1. Run `rgr bases --json` from the directory in scope. The nearest configured ancestor is
|
|
69
|
+
`activeId`.
|
|
70
|
+
2. Use the root base for shared architecture or cross-app questions. Use the nested base for an
|
|
71
|
+
app-specific question.
|
|
72
|
+
3. If the shell working directory is not inside the intended base, pass
|
|
73
|
+
`--project-root /absolute/path/to/base` before the command.
|
|
74
|
+
4. For MCP, call `ragmir_status` when the active base is uncertain and verify `knowledgeBaseId`.
|
|
75
|
+
Generated helpers pin `RAGMIR_PROJECT_ROOT`; nested bases receive distinct server names.
|
|
76
|
+
5. Never silently combine citations from different bases. Label each base when a task genuinely
|
|
77
|
+
requires evidence from more than one.
|
|
78
|
+
|
|
60
79
|
## Indexing
|
|
61
80
|
|
|
62
81
|
Use `.ragmir/config.json` for sources, with paths, globs, and `!` exclusions:
|
|
@@ -80,6 +99,11 @@ OCR stays opt-in and never calls a remote service by default.
|
|
|
80
99
|
`local-hash` is the default retrieval provider. It supports cited local retrieval but is not
|
|
81
100
|
semantic embeddings. Use the Transformers provider only after an explicit model preload.
|
|
82
101
|
|
|
102
|
+
Before a costly ingest or after changing chunk settings, run `rgr preview --json`. Review redaction
|
|
103
|
+
counts, citations, `contextPath`, omitted chunks, and p50/p95 sizes. Search, ask, research, MCP
|
|
104
|
+
retrieval, and golden queries can restrict retrieval with source paths and structural context paths.
|
|
105
|
+
Use explanations to inspect RRF ranks and contributions, not as an independent relevance score.
|
|
106
|
+
|
|
83
107
|
## MCP
|
|
84
108
|
|
|
85
109
|
`rgr setup` writes local MCP helpers under `.ragmir/` for Claude Code, Codex, Kimi, OpenCode, and
|
|
@@ -105,6 +129,10 @@ only when the exact chunk or neighboring context is needed. Retrieval tools acce
|
|
|
105
129
|
the configured `mcpMaxOutputBytes` remains the hard ceiling. Inspect `_meta["ragmir/output"]` to see
|
|
106
130
|
whether the response was compacted or truncated.
|
|
107
131
|
|
|
132
|
+
When MCP resources are supported, read `ragmir://context` first for a bounded identity, readiness,
|
|
133
|
+
freshness, coverage, and capability overview. Read `ragmir://sources` only when source coverage or
|
|
134
|
+
index drift matters; its per-file lists are capped while totals remain complete.
|
|
135
|
+
|
|
108
136
|
MCP is read-focused. Only remove an index with the explicit shell command:
|
|
109
137
|
|
|
110
138
|
```sh
|