@gmickel/gno 2.10.1 → 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 +11 -11
- package/assets/skill/SKILL.md +25 -14
- package/assets/skill/cli-reference.md +6 -5
- package/assets/skill/examples.md +16 -12
- package/assets/skill/mcp-reference.md +2 -1
- package/browser-extension/artifacts/{gno-browser-clipper-v2.10.1.zip → gno-browser-clipper-v2.11.0.zip} +0 -0
- package/browser-extension/artifacts/gno-browser-clipper-v2.11.0.zip.sha256 +1 -0
- package/browser-extension/dist/manifest.json +1 -1
- package/package.json +3 -1
- package/spec/cli.md +27 -1
- package/spec/mcp.md +27 -3
- package/spec/output-schemas/ask.schema.json +8 -0
- package/spec/output-schemas/claim-verification.schema.json +8 -2
- package/spec/output-schemas/context-capsule-v1.schema.json +6 -1
- package/spec/output-schemas/context-capsule-verification.schema.json +4 -2
- package/spec/output-schemas/get.schema.json +4 -0
- package/spec/output-schemas/metadata-summary.schema.json +60 -0
- package/spec/output-schemas/multi-get.schema.json +4 -0
- package/spec/output-schemas/search-result.schema.json +4 -0
- package/spec/output-schemas/search-results.schema.json +4 -0
- package/src/app/constants.ts +16 -0
- package/src/app/context-format.ts +1 -0
- package/src/app/verified-ask.ts +2 -0
- package/src/cli/commands/agents/block.ts +9 -8
- package/src/cli/commands/ask-format.ts +18 -1
- package/src/cli/commands/ask.ts +4 -5
- package/src/cli/commands/daemon.ts +5 -1
- package/src/cli/commands/get.ts +11 -1
- package/src/cli/commands/metadata.ts +79 -0
- package/src/cli/commands/multi-get.ts +13 -0
- package/src/cli/commands/shared.ts +9 -7
- package/src/cli/format/search-results.ts +11 -0
- package/src/cli/options.ts +2 -0
- package/src/cli/program.ts +45 -0
- package/src/core/context-capsule-schema.ts +2 -0
- package/src/core/context-capsule-verification.ts +2 -0
- package/src/core/context-compiler.ts +2 -5
- package/src/core/context-evidence.ts +1 -0
- package/src/core/context-verifier.ts +14 -1
- package/src/core/metadata-discovery.ts +169 -0
- package/src/ingestion/sync.ts +49 -1
- package/src/ingestion/walker.ts +11 -3
- package/src/mcp/http-egress.ts +1 -0
- package/src/mcp/tool-descriptions-core.ts +2 -2
- package/src/mcp/tool-profile.ts +16 -1
- package/src/mcp/tools/get.ts +10 -0
- package/src/mcp/tools/index.ts +39 -4
- package/src/mcp/tools/multi-get.ts +15 -0
- package/src/mcp/tools/query.ts +5 -3
- package/src/mcp/tools/search.ts +5 -3
- package/src/mcp/tools/vsearch.ts +5 -3
- package/src/mcp/tools/workspace-write.ts +42 -34
- package/src/pipeline/answer-prompt.ts +15 -2
- package/src/pipeline/answer.ts +3 -0
- package/src/pipeline/claim-verification-schema.ts +6 -1
- package/src/pipeline/claim-verification.ts +54 -1
- package/src/pipeline/explain.ts +1 -1
- package/src/pipeline/fusion.ts +24 -4
- package/src/pipeline/hybrid.ts +5 -1
- package/src/pipeline/result-context.ts +29 -0
- package/src/pipeline/search.ts +5 -1
- package/src/pipeline/types.ts +4 -0
- package/src/pipeline/vsearch.ts +5 -1
- package/src/sdk/client.ts +32 -4
- package/src/sdk/documents.ts +5 -0
- package/src/sdk/types.ts +5 -0
- package/src/serve/routes/api.ts +29 -1
- package/src/serve/server.ts +12 -0
- package/src/store/sqlite/adapter.ts +82 -2
- package/src/store/types.ts +16 -0
- package/src/store/vector/variant-search.ts +112 -74
- package/browser-extension/artifacts/gno-browser-clipper-v2.10.1.zip.sha256 +0 -1
package/README.md
CHANGED
|
@@ -139,7 +139,7 @@ See the [guide](docs/COMPILED-CONTEXT.md).
|
|
|
139
139
|
|
|
140
140
|
<!-- public-truth:current-version -->
|
|
141
141
|
|
|
142
|
-
> Current source version: **v2.
|
|
142
|
+
> Current source version: **v2.11.0**. See [CHANGELOG.md](./CHANGELOG.md).
|
|
143
143
|
|
|
144
144
|
<!-- /public-truth -->
|
|
145
145
|
|
|
@@ -580,12 +580,12 @@ Full guide: [SDK docs](https://gno.sh/docs/sdk)
|
|
|
580
580
|
|
|
581
581
|
## Search Modes
|
|
582
582
|
|
|
583
|
-
| Command | Mode | Best For
|
|
584
|
-
| :----------------- | :------------------ |
|
|
585
|
-
| `gno search` | Document-level BM25 | Exact phrases, code identifiers
|
|
586
|
-
| `gno vsearch` | Contextual Vector |
|
|
587
|
-
| `gno query` | Hybrid |
|
|
588
|
-
| `gno ask --answer` | RAG | Direct answers with citations
|
|
583
|
+
| Command | Mode | Best For |
|
|
584
|
+
| :----------------- | :------------------ | :------------------------------------------ |
|
|
585
|
+
| `gno search` | Document-level BM25 | Exact phrases, code identifiers |
|
|
586
|
+
| `gno vsearch` | Contextual Vector | Similar concepts, different wording |
|
|
587
|
+
| `gno query` | Hybrid | Natural-language questions (`--fast` first) |
|
|
588
|
+
| `gno ask --answer` | RAG | Direct answers with citations |
|
|
589
589
|
|
|
590
590
|
**BM25** indexes full documents (not chunks) with Snowball stemming, so "running" matches "run".
|
|
591
591
|
**Vector** embeds chunks with document titles for context awareness.
|
|
@@ -715,10 +715,10 @@ Connect GNO to Claude Desktop, Cursor, Raycast, and more:
|
|
|
715
715
|
|
|
716
716
|

|
|
717
717
|
|
|
718
|
-
GNO exposes
|
|
718
|
+
GNO exposes 38 tools by default via [Model Context Protocol](https://modelcontextprotocol.io),
|
|
719
719
|
including the core retrieval tools below. Starting MCP with `--enable-write`
|
|
720
720
|
adds 21 opt-in mutation tools and the read-only `gno_request_status` lookup,
|
|
721
|
-
for
|
|
721
|
+
for 60 total.
|
|
722
722
|
|
|
723
723
|
| Tool | Description |
|
|
724
724
|
| :------------------- | :---------------------------------------------- |
|
|
@@ -1109,7 +1109,7 @@ graph TD
|
|
|
1109
1109
|
0. **Strong Signal Check**: Skip expansion if BM25 has confident match (saves 1-3s)
|
|
1110
1110
|
1. **Query Expansion**: LLM generates lexical variants, semantic rephrases, and a [HyDE](https://arxiv.org/abs/2212.10496) passage
|
|
1111
1111
|
2. **Parallel Retrieval**: Document-level BM25 + chunk-level vector search on all variants
|
|
1112
|
-
3. **Fusion**: RRF
|
|
1112
|
+
3. **Fusion**: RRF over documents (each list counts a document once, at its best chunk's rank), 2× weight for original query, tiered bonus for top ranks
|
|
1113
1113
|
4. **Reranking**: Qwen3-Reranker scores best chunk per document (4K), blended with fusion
|
|
1114
1114
|
|
|
1115
1115
|
> **Deep dive**: [How Search Works](https://gno.sh/docs/how-search-works)
|
|
@@ -1129,7 +1129,7 @@ graph TD
|
|
|
1129
1129
|
| **Local LLM** | AI answers via llama.cpp, no API keys |
|
|
1130
1130
|
| **Remote Inference** | Optional HTTP endpoints for embedding, reranking, expansion, and generation |
|
|
1131
1131
|
| **Privacy First** | Fail-closed per-collection egress policy; no telemetry; explicit network use |
|
|
1132
|
-
| **MCP Server** | 10 automatic client targets;
|
|
1132
|
+
| **MCP Server** | 10 automatic client targets; 38 read-only tools, 60 with writes enabled |
|
|
1133
1133
|
| **Integrity Audits** | Offline link, declared-provenance, and freshness reports with stable IDs |
|
|
1134
1134
|
| **Knowledge Delta** | Bounded metadata history, structural diffs, and dependency impact paths |
|
|
1135
1135
|
| **Context Capsules** | Deterministic evidence bundles plus saved-file freshness reverification |
|
package/assets/skill/SKILL.md
CHANGED
|
@@ -136,17 +136,24 @@ Open without fetching content via `gno get`:
|
|
|
136
136
|
|
|
137
137
|
## Search Modes
|
|
138
138
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
|
144
|
-
|
|
|
145
|
-
| `gno
|
|
146
|
-
| `gno
|
|
147
|
-
| `gno
|
|
148
|
-
|
|
149
|
-
|
|
139
|
+
Measured on a 17.6k-chunk index (RTX 4090). "Resident" is MCP or `gno serve`
|
|
140
|
+
with models loaded; a one-off CLI call also loads its models. CPU-only
|
|
141
|
+
machines are slower.
|
|
142
|
+
|
|
143
|
+
| Command | Resident | One-off CLI | Best For |
|
|
144
|
+
| ---------------------- | -------- | ----------- | ------------------------------------------ |
|
|
145
|
+
| `gno search` | ~0.2s | ~0.2s | Exact identifiers, quotes, error text |
|
|
146
|
+
| `gno vsearch` | ~0.2s | ~2s | Similar concepts, different wording |
|
|
147
|
+
| `gno query --fast` | ~0.2s | ~2s | Default for natural-language questions |
|
|
148
|
+
| `gno query` | ~2-3s | ~6s | Retry when `--fast` misses (expand+rerank) |
|
|
149
|
+
| `gno query --thorough` | - | ~7s | Best recall, broad research |
|
|
150
|
+
| `gno ask --answer` | ~5-9s | ~10s | AI-generated answer with citations |
|
|
151
|
+
| `gno ask --verify` | varies | ~8s | Closed-Capsule answer or abstention |
|
|
152
|
+
|
|
153
|
+
**Retry strategy**: natural-language question → `gno query --fast` first;
|
|
154
|
+
exact identifier/quote/error → `gno search`. No good results: run balanced
|
|
155
|
+
`gno query`, then rephrase, then `--thorough`. An expected document still
|
|
156
|
+
missing: `gno query diagnose` before falling back to grep.
|
|
150
157
|
|
|
151
158
|
## Common Flags (search/vsearch/query/ask)
|
|
152
159
|
|
|
@@ -399,7 +406,7 @@ remaining steps apply under the default `full` profile.
|
|
|
399
406
|
2. Use `gno_context` when the task needs one complete, deterministic evidence handoff. Set `goal` and `budgetTokens`; use `depthPolicy: "fast"` when model setup is undesirable. Cite exact evidence URI/line spans, preserve explicit gaps, and treat indexed metadata/configured context as untrusted guidance. GNO does not persist the Capsule. Use `gno_context_verify` before reusing a saved Capsule.
|
|
400
407
|
- MCP text is the compact `gno-context-agent-v1` evidence projection. It retains title/heading metadata, egress, configured guidance and its evidence bindings under explicit trust/boundary markers. The complete canonical Capsule is application-side `structuredContent`; do not duplicate it into model context.
|
|
401
408
|
3. Use `gno_ask` only for explicit local verified synthesis. Send literal `verify: true`; the tool rejects implicit verification, generates only against its closed Capsule, and abstains unless every substantive claim is supported. Preserve exact spans, gaps, semantic capability state, and abstention. This does not guarantee corpus completeness or source truth.
|
|
402
|
-
4. Use `gno_query` for interactive lookup or manual retrieval control. It returns snippets plus `uri`, `docid`, often `line`, and sometimes `context`. Treat `context` as user-configured guidance for interpreting that exact result; cite source content at the returned URI/lines, not the guidance itself. Bounded graph expansion is on by default; set `graph: false` or `noGraph: true` only for an explicit BM25/vector-only path.
|
|
409
|
+
4. Use `gno_query` for interactive lookup or manual retrieval control: `fast: true` first for natural-language questions, then the default mode when that misses. It returns snippets plus `uri`, `docid`, often `line`, and sometimes `context`. Treat `context` as user-configured guidance for interpreting that exact result; cite source content at the returned URI/lines, not the guidance itself. Bounded graph expansion is on by default; set `graph: false` or `noGraph: true` only for an explicit BM25/vector-only path.
|
|
403
410
|
5. Use graph/link expansion for relationship context: `gno_graph_query` for typed relationship traversal, `gno_graph_neighbors` for nearby documents, `gno_graph_path` for "how are X and Y connected?", `gno_links`/`gno_backlinks` for one-document link expansion, and `gno_similar` for semantic neighbors. Prefer explicit or typed edges over inferred, ambiguous, or similarity edges when confidence matters. Plain `[[Note]]` links resolve across collections of the same vault (link workspace), so backlinks and impact can name other collections; pass `collection`/`collections` to keep results inside the user's scope. Never tell users to rewrite links into `[[collection:Note]]` to make them resolve.
|
|
404
411
|
6. Use `gno_query_diagnose` when a known target document should have appeared but did not; it reports BM25/vector/fusion/graph/rerank stage presence and filter state.
|
|
405
412
|
7. Use `gno_get` with `fromLine`/`lineCount` for targeted reads, or `gno_multi_get` to batch top refs.
|
|
@@ -598,6 +605,8 @@ existing notes. They work only on a collection with `memoryManaged: true`.
|
|
|
598
605
|
re-stored as a new fact.
|
|
599
606
|
- `remember` without a decision returns candidates and writes nothing; decide
|
|
600
607
|
with `--add` or `--supersede <uri> --predecessor-hash <hash>` from recall.
|
|
608
|
+
- A result, document or citation with `supersededBy` is a replaced fact: use
|
|
609
|
+
the fact at that URI, never present the old one as current.
|
|
601
610
|
- Details, error codes, and the fence's paraphrase limit: `docs/MEMORY.md`,
|
|
602
611
|
[cli-reference.md](cli-reference.md), [mcp-reference.md](mcp-reference.md).
|
|
603
612
|
|
|
@@ -740,8 +749,10 @@ MCP-equivalent write tool:
|
|
|
740
749
|
|
|
741
750
|
Use fixed flags for existing collection/tag/date/author/category fields. Custom
|
|
742
751
|
fields must be indexed from nested YAML `gno.metadata`; arbitrary frontmatter
|
|
743
|
-
keys are not automatically custom fields.
|
|
744
|
-
|
|
752
|
+
keys are not automatically custom fields. Run `gno metadata --collection <c>`
|
|
753
|
+
(MCP `gno_list_metadata`) first to see which keys, types and values exist.
|
|
754
|
+
CLI retrieval accepts `--filter` JSON; MCP/SDK/REST accept the same `filter`
|
|
755
|
+
object:
|
|
745
756
|
|
|
746
757
|
```json
|
|
747
758
|
{
|
|
@@ -424,11 +424,11 @@ gno query <query> [options]
|
|
|
424
424
|
|
|
425
425
|
**Search modes** (pick one):
|
|
426
426
|
|
|
427
|
-
| Flag | Time
|
|
428
|
-
| ------------ |
|
|
429
|
-
| `--fast` | ~0.
|
|
430
|
-
| (default) | ~2-3s | Balanced, graph + reranking |
|
|
431
|
-
| `--thorough` | ~
|
|
427
|
+
| Flag | Time | Description |
|
|
428
|
+
| ------------ | ------------------------ | ------------------------------ |
|
|
429
|
+
| `--fast` | ~2s CLI / ~0.2s resident | Skip expansion, graph, rerank |
|
|
430
|
+
| (default) | ~6s CLI / ~2-3s resident | Balanced, graph + reranking |
|
|
431
|
+
| `--thorough` | ~7s CLI | Wider expansion + graph/rerank |
|
|
432
432
|
|
|
433
433
|
Additional options:
|
|
434
434
|
|
|
@@ -1203,6 +1203,7 @@ gno completion output <bash|zsh|fish>
|
|
|
1203
1203
|
## Custom metadata filters
|
|
1204
1204
|
|
|
1205
1205
|
```bash
|
|
1206
|
+
gno metadata --collection docs --values 20 # keys, types, counts, common values
|
|
1206
1207
|
gno search "rollout" --filter '{"op":"eq","key":"status","value":"approved"}'
|
|
1207
1208
|
gno query diagnose "rollout" --target gno://docs/decision.md --filter '{"op":"gte","key":"confidence","value":0.8}'
|
|
1208
1209
|
```
|
package/assets/skill/examples.md
CHANGED
|
@@ -397,18 +397,22 @@ gno --config ~/gno-sessions/archive.yml --index sessions get "gno://sessions-wor
|
|
|
397
397
|
|
|
398
398
|
### Search Modes
|
|
399
399
|
|
|
400
|
-
| Command |
|
|
401
|
-
| ---------------------- |
|
|
402
|
-
| `gno search` |
|
|
403
|
-
| `gno vsearch` | ~0.
|
|
404
|
-
| `gno query --fast` | ~0.
|
|
405
|
-
| `gno query` | ~2-3s
|
|
406
|
-
| `gno query --thorough` |
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
400
|
+
| Command | Resident | One-off CLI | Use When |
|
|
401
|
+
| ---------------------- | -------- | ----------- | ----------------------------------- |
|
|
402
|
+
| `gno search` | ~0.2s | ~0.2s | Exact identifiers, quotes, errors |
|
|
403
|
+
| `gno vsearch` | ~0.2s | ~2s | Finding similar concepts |
|
|
404
|
+
| `gno query --fast` | ~0.2s | ~2s | First try for any question |
|
|
405
|
+
| `gno query` | ~2-3s | ~6s | `--fast` missed; expansion + rerank |
|
|
406
|
+
| `gno query --thorough` | - | ~7s | Best recall, complex queries |
|
|
407
|
+
|
|
408
|
+
Measured on a 17.6k-chunk index (RTX 4090); resident means MCP or `gno serve`
|
|
409
|
+
with models loaded.
|
|
410
|
+
|
|
411
|
+
**Agent retry strategy**: `gno query --fast` first. If no good results:
|
|
412
|
+
|
|
413
|
+
1. Run balanced `gno query` (adds expansion and reranking)
|
|
414
|
+
2. Rephrase the query (free, often helps)
|
|
415
|
+
3. Try `--thorough` for better recall
|
|
412
416
|
|
|
413
417
|
### Output formats
|
|
414
418
|
|
|
@@ -105,7 +105,8 @@ default `full` profile. Pick the profile once per client at install time with
|
|
|
105
105
|
switch an existing registration); `gno mcp status` shows the profile each
|
|
106
106
|
registration carries.
|
|
107
107
|
|
|
108
|
-
For normal questions, start with `gno_query
|
|
108
|
+
For normal questions, start with `gno_query` and `fast: true`; when that
|
|
109
|
+
misses, call it again without `fast`. Then read targeted snippets with
|
|
109
110
|
`gno_get` or batch refs with `gno_multi_get`. Use `gno_context` for one bounded,
|
|
110
111
|
exact evidence handoff. Use `gno_ask` only when a local closed-evidence answer
|
|
111
112
|
is specifically useful, and pass the literal boolean `verify: true`; it
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
589f77b3c4d48d0922fccb9598fc5e07dc32e9f56afa899998d49a735309eae5 gno-browser-clipper-v2.11.0.zip
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gmickel/gno",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.11.0",
|
|
4
4
|
"description": "Local semantic search for your documents. Index Markdown, PDF, and Office files with hybrid BM25 + vector search.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"embeddings",
|
|
@@ -91,6 +91,7 @@
|
|
|
91
91
|
"test:watcher:filesystem": "bun test test/serve/watch-service-filesystem.test.ts test/serve/resident-runtime.test.ts",
|
|
92
92
|
"bench:watcher-reconciliation": "bun scripts/watcher-reconciliation-benchmark.ts",
|
|
93
93
|
"bench:session-import": "bun scripts/session-import-benchmark.ts",
|
|
94
|
+
"bench:vector-search": "bun scripts/vector-search-benchmark.ts",
|
|
94
95
|
"soak": "bun scripts/soak/index.ts",
|
|
95
96
|
"smoke:watcher-reconciliation": "bun scripts/watcher-reconciliation-smoke.ts",
|
|
96
97
|
"bench:code-embeddings": "bun scripts/code-embedding-benchmark.ts",
|
|
@@ -100,6 +101,7 @@
|
|
|
100
101
|
"bench:cpu-embeddings": "bun scripts/cpu-embed-autoresearch.ts",
|
|
101
102
|
"bench:cpu-embeddings:native-batch-probe": "bun scripts/native-embedding-batch-probe.ts",
|
|
102
103
|
"bench:cjk-lexical": "bun scripts/cjk-lexical-benchmark.ts",
|
|
104
|
+
"eval:ranking-ablation": "bun scripts/ranking-ablation.ts",
|
|
103
105
|
"eval:retrieval-candidates": "bun scripts/retrieval-candidate-benchmark.ts",
|
|
104
106
|
"eval:retrieval-candidates:write": "bun scripts/retrieval-candidate-benchmark.ts --write",
|
|
105
107
|
"eval:agentic": "bun evals/agentic/cli.ts",
|
package/spec/cli.md
CHANGED
|
@@ -1697,7 +1697,7 @@ active with `sourceCount: 1`.
|
|
|
1697
1697
|
[explain] bm25: 45 candidates
|
|
1698
1698
|
[explain] vector: 38 candidates
|
|
1699
1699
|
[explain] graph: seeds=5, candidates=4/20, explicit=3, inferred=1, ambiguous=0, similarity=0
|
|
1700
|
-
[explain] fusion: RRF k=60, 52 unique
|
|
1700
|
+
[explain] fusion: RRF k=60, 52 unique documents (best rank per list)
|
|
1701
1701
|
[explain] rerank: top 20 reranked
|
|
1702
1702
|
[explain] result 1: score=0.92 (bm25=0.85, vec=0.78, rerank=0.95)
|
|
1703
1703
|
```
|
|
@@ -3812,6 +3812,32 @@ gno agents uninstall [--target <...>] [--extra-dir <path>]... [--dry-run] [--jso
|
|
|
3812
3812
|
|
|
3813
3813
|
---
|
|
3814
3814
|
|
|
3815
|
+
### gno metadata
|
|
3816
|
+
|
|
3817
|
+
List the typed metadata keys active documents carry.
|
|
3818
|
+
|
|
3819
|
+
**Synopsis:**
|
|
3820
|
+
|
|
3821
|
+
```bash
|
|
3822
|
+
gno metadata [-c, --collection <name>] [--values <n>] [--json] [--md]
|
|
3823
|
+
```
|
|
3824
|
+
|
|
3825
|
+
**Options:**
|
|
3826
|
+
|
|
3827
|
+
| Option | Type | Description |
|
|
3828
|
+
| ------------------ | ------- | ------------------------------------------------ |
|
|
3829
|
+
| `-c, --collection` | string | Only documents in this collection |
|
|
3830
|
+
| `--values` | integer | Common values listed per key (1-100, default 10) |
|
|
3831
|
+
| `--json` | flag | JSON output (`gno://schemas/metadata-summary`) |
|
|
3832
|
+
| `--md` | flag | Markdown output |
|
|
3833
|
+
|
|
3834
|
+
**Exit Codes:**
|
|
3835
|
+
|
|
3836
|
+
- 0: Success
|
|
3837
|
+
- 1: `--values` out of range
|
|
3838
|
+
|
|
3839
|
+
---
|
|
3840
|
+
|
|
3815
3841
|
### gno tags list
|
|
3816
3842
|
|
|
3817
3843
|
List all tags with document counts.
|
package/spec/mcp.md
CHANGED
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
**Transport:** JSON-RPC 2.0 over stdio or resident Streamable HTTP
|
|
8
8
|
**SDK:** `@modelcontextprotocol/server` 2.x (tool `inputSchema` /
|
|
9
9
|
`outputSchema` carry the JSON Schema 2020-12 `$schema` stamp; an unknown tool
|
|
10
|
-
name answers JSON-RPC `-32602`)
|
|
10
|
+
name answers JSON-RPC `-32602`). Tool inputs are closed objects: an argument
|
|
11
|
+
key a tool does not declare fails validation with an error naming the key, and
|
|
12
|
+
the tool does not run. Each `inputSchema` advertises `additionalProperties:
|
|
13
|
+
false` (per `oneOf` member for the discriminated-union inputs).
|
|
11
14
|
|
|
12
15
|
This document specifies the MCP server interface for GNO.
|
|
13
16
|
|
|
@@ -153,7 +156,7 @@ the resident gateway applies one profile to every connected client.
|
|
|
153
156
|
|
|
154
157
|
| Profile | Without `--enable-write` | With `--enable-write` |
|
|
155
158
|
| ---------------- | ----------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
|
|
156
|
-
| `full` (default) | Every read tool below (
|
|
159
|
+
| `full` (default) | Every read tool below (38) | Every read tool plus every write tool (60) |
|
|
157
160
|
| `core` | `gno_query`, `gno_search`, `gno_get`, `gno_multi_get`, `gno_context`, `gno_changes`, `gno_recall` (7) | The 7 read tools plus `gno_capture`, `gno_remember` (9) |
|
|
158
161
|
|
|
159
162
|
Both lists are exact: `core` advertises nothing else, and `full` is byte-for-byte
|
|
@@ -907,7 +910,7 @@ Hybrid search combining BM25 and vector retrieval with optional expansion and re
|
|
|
907
910
|
},
|
|
908
911
|
"fast": {
|
|
909
912
|
"type": "boolean",
|
|
910
|
-
"description": "Fast mode: skip expansion and reranking (
|
|
913
|
+
"description": "Fast mode: skip expansion and reranking (typically under a second on a warm server)",
|
|
911
914
|
"default": false
|
|
912
915
|
},
|
|
913
916
|
"thorough": {
|
|
@@ -1937,6 +1940,27 @@ paths or session content.
|
|
|
1937
1940
|
archive lock; `SESSIONS_RUNTIME_FAILURE` (fixed, path-free message) for filesystem or
|
|
1938
1941
|
index failures.
|
|
1939
1942
|
|
|
1943
|
+
### gno_list_metadata
|
|
1944
|
+
|
|
1945
|
+
List the typed metadata keys indexed documents carry, with observed types,
|
|
1946
|
+
document counts and most common values (array members count individually).
|
|
1947
|
+
|
|
1948
|
+
**Input Schema:**
|
|
1949
|
+
|
|
1950
|
+
```json
|
|
1951
|
+
{
|
|
1952
|
+
"type": "object",
|
|
1953
|
+
"additionalProperties": false,
|
|
1954
|
+
"properties": {
|
|
1955
|
+
"collection": { "type": "string" },
|
|
1956
|
+
"values": { "type": "integer", "minimum": 1, "maximum": 100 }
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
```
|
|
1960
|
+
|
|
1961
|
+
**Output Schema:** `gno://schemas/metadata-summary`. Text content is the same
|
|
1962
|
+
summary as `gno metadata`. Full profile only.
|
|
1963
|
+
|
|
1940
1964
|
### gno_list_tags
|
|
1941
1965
|
|
|
1942
1966
|
List all tags with document counts.
|
|
@@ -169,6 +169,10 @@
|
|
|
169
169
|
"description": "Resolved user-configured retrieval guidance, ordered from global to collection to matching path prefixes"
|
|
170
170
|
},
|
|
171
171
|
"egressLineage": { "$ref": "#/$defs/egressLineage" },
|
|
172
|
+
"supersededBy": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"description": "URI of the current fact when a newer memory fact superseded this result"
|
|
175
|
+
},
|
|
172
176
|
"snippet": {
|
|
173
177
|
"type": "string",
|
|
174
178
|
"description": "Matching text snippet from document mirror"
|
|
@@ -447,6 +451,10 @@
|
|
|
447
451
|
"type": "integer",
|
|
448
452
|
"description": "Citation end line",
|
|
449
453
|
"minimum": 1
|
|
454
|
+
},
|
|
455
|
+
"supersededBy": {
|
|
456
|
+
"type": "string",
|
|
457
|
+
"description": "URI of the current fact when a newer memory fact superseded the cited one"
|
|
450
458
|
}
|
|
451
459
|
}
|
|
452
460
|
}
|
|
@@ -186,7 +186,8 @@
|
|
|
186
186
|
"semantic_entailment",
|
|
187
187
|
"semantic_contradiction",
|
|
188
188
|
"no_valid_evidence",
|
|
189
|
-
"semantic_judgment_unavailable"
|
|
189
|
+
"semantic_judgment_unavailable",
|
|
190
|
+
"quote_not_in_evidence"
|
|
190
191
|
]
|
|
191
192
|
},
|
|
192
193
|
"verifierFingerprint": {
|
|
@@ -260,7 +261,12 @@
|
|
|
260
261
|
"if": { "properties": { "status": { "const": "uncertain" } } },
|
|
261
262
|
"then": {
|
|
262
263
|
"properties": {
|
|
263
|
-
"rationaleCode": {
|
|
264
|
+
"rationaleCode": {
|
|
265
|
+
"enum": [
|
|
266
|
+
"semantic_judgment_unavailable",
|
|
267
|
+
"quote_not_in_evidence"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
264
270
|
"evidence": { "type": "array", "minItems": 1 }
|
|
265
271
|
}
|
|
266
272
|
}
|
|
@@ -924,7 +924,12 @@
|
|
|
924
924
|
"enum": ["local_only", "lan", "remote", "unclassified", "unavailable"]
|
|
925
925
|
},
|
|
926
926
|
"egressLineage": { "$ref": "#/definitions/egressLineage" },
|
|
927
|
-
"record": { "$ref": "#/definitions/recordEvidenceMetadata" }
|
|
927
|
+
"record": { "$ref": "#/definitions/recordEvidenceMetadata" },
|
|
928
|
+
"supersededBy": {
|
|
929
|
+
"type": "string",
|
|
930
|
+
"pattern": "^gno://",
|
|
931
|
+
"description": "Current successor when a newer memory fact superseded this one"
|
|
932
|
+
}
|
|
928
933
|
}
|
|
929
934
|
},
|
|
930
935
|
"coverage": {
|
|
@@ -1229,7 +1229,8 @@
|
|
|
1229
1229
|
"chunk_missing",
|
|
1230
1230
|
"chunk_corrupt",
|
|
1231
1231
|
"source_missing",
|
|
1232
|
-
"mirror_missing"
|
|
1232
|
+
"mirror_missing",
|
|
1233
|
+
"superseded"
|
|
1233
1234
|
]
|
|
1234
1235
|
},
|
|
1235
1236
|
"rankingStatus": {
|
|
@@ -1273,7 +1274,8 @@
|
|
|
1273
1274
|
"mirror_corrupt",
|
|
1274
1275
|
"passage_stale",
|
|
1275
1276
|
"chunk_missing",
|
|
1276
|
-
"chunk_corrupt"
|
|
1277
|
+
"chunk_corrupt",
|
|
1278
|
+
"superseded"
|
|
1277
1279
|
]
|
|
1278
1280
|
},
|
|
1279
1281
|
"currentSourceHash": { "$ref": "#/definitions/sha256" },
|
|
@@ -129,6 +129,10 @@
|
|
|
129
129
|
"reason": { "type": "string" }
|
|
130
130
|
}
|
|
131
131
|
},
|
|
132
|
+
"supersededBy": {
|
|
133
|
+
"type": "string",
|
|
134
|
+
"description": "URI of the current fact when a newer memory fact superseded this document"
|
|
135
|
+
},
|
|
132
136
|
"record": {
|
|
133
137
|
"type": "object",
|
|
134
138
|
"additionalProperties": false,
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "gno://schemas/metadata-summary",
|
|
4
|
+
"title": "Typed metadata summary",
|
|
5
|
+
"description": "Typed metadata keys indexed documents carry: observed types, document counts and the most common values. Returned by `gno metadata --json`, MCP gno_list_metadata, GET /api/metadata and SDK listMetadata.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["collection", "documents", "documentsWithMetadata", "keys"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"collection": { "oneOf": [{ "type": "string" }, { "type": "null" }] },
|
|
11
|
+
"documents": { "type": "integer", "minimum": 0 },
|
|
12
|
+
"documentsWithMetadata": { "type": "integer", "minimum": 0 },
|
|
13
|
+
"keys": {
|
|
14
|
+
"type": "array",
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": false,
|
|
18
|
+
"required": ["key", "types", "documents", "values", "valuesTruncated"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"key": { "type": "string", "minLength": 1 },
|
|
21
|
+
"types": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"minItems": 1,
|
|
24
|
+
"items": {
|
|
25
|
+
"enum": [
|
|
26
|
+
"string",
|
|
27
|
+
"number",
|
|
28
|
+
"boolean",
|
|
29
|
+
"string[]",
|
|
30
|
+
"number[]",
|
|
31
|
+
"boolean[]"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"documents": { "type": "integer", "minimum": 1 },
|
|
36
|
+
"values": {
|
|
37
|
+
"type": "array",
|
|
38
|
+
"maxItems": 100,
|
|
39
|
+
"items": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["value", "documents"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"value": {
|
|
45
|
+
"oneOf": [
|
|
46
|
+
{ "type": "string" },
|
|
47
|
+
{ "type": "number" },
|
|
48
|
+
{ "type": "boolean" }
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"documents": { "type": "integer", "minimum": 1 }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"valuesTruncated": { "type": "boolean" }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -49,6 +49,10 @@
|
|
|
49
49
|
"ext": { "type": "string", "pattern": "^\\.[a-zA-Z0-9]+$" }
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
|
+
"supersededBy": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"description": "URI of the current fact when a newer memory fact superseded this document"
|
|
55
|
+
},
|
|
52
56
|
"record": {
|
|
53
57
|
"type": "object",
|
|
54
58
|
"additionalProperties": false,
|
|
@@ -50,6 +50,10 @@
|
|
|
50
50
|
"type": "string",
|
|
51
51
|
"description": "Resolved user-configured retrieval guidance, ordered from global to collection to matching path prefixes"
|
|
52
52
|
},
|
|
53
|
+
"supersededBy": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "URI of the current fact when a newer memory fact superseded this result"
|
|
56
|
+
},
|
|
53
57
|
"snippet": {
|
|
54
58
|
"type": "string",
|
|
55
59
|
"description": "Matching text snippet from document mirror"
|
|
@@ -84,6 +84,10 @@
|
|
|
84
84
|
"description": "Resolved user-configured retrieval guidance, ordered from global to collection to matching path prefixes"
|
|
85
85
|
},
|
|
86
86
|
"egressLineage": { "$ref": "#/$defs/egressLineage" },
|
|
87
|
+
"supersededBy": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "URI of the current fact when a newer memory fact superseded this result"
|
|
90
|
+
},
|
|
87
91
|
"snippet": {
|
|
88
92
|
"type": "string",
|
|
89
93
|
"description": "Matching text snippet from document mirror"
|
package/src/app/constants.ts
CHANGED
|
@@ -361,6 +361,22 @@ export function decorateUriForIndex(uri: string, indexName?: string): string {
|
|
|
361
361
|
});
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
+
/**
|
|
365
|
+
* Decorate a result's URI and, when present, its successor URI for the index
|
|
366
|
+
* it came from.
|
|
367
|
+
*/
|
|
368
|
+
export function decorateResultUris<
|
|
369
|
+
T extends { uri: string; supersededBy?: string },
|
|
370
|
+
>(item: T, indexName?: string): T {
|
|
371
|
+
return {
|
|
372
|
+
...item,
|
|
373
|
+
uri: decorateUriForIndex(item.uri, indexName),
|
|
374
|
+
...(item.supersededBy
|
|
375
|
+
? { supersededBy: decorateUriForIndex(item.supersededBy, indexName) }
|
|
376
|
+
: {}),
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
|
|
364
380
|
/**
|
|
365
381
|
* Remove output-only index metadata from a gno:// URI.
|
|
366
382
|
*/
|
|
@@ -98,6 +98,7 @@ const evidenceBlock = (
|
|
|
98
98
|
`- Selection rank: ${item.selectionRank}`,
|
|
99
99
|
`- Modified: ${nullable(item.modifiedAt)}`,
|
|
100
100
|
`- Document date: ${nullable(item.documentDate)}`,
|
|
101
|
+
...(item.supersededBy ? [`- Superseded by: ${item.supersededBy}`] : []),
|
|
101
102
|
`- Observed: ${nullable(item.observedAt)}`,
|
|
102
103
|
`- Facets: ${item.facets.length > 0 ? item.facets.join(", ") : "none"}`,
|
|
103
104
|
`- Trust: ${item.trust}`,
|
package/src/app/verified-ask.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { CliError } from "../../errors.js";
|
|
|
17
17
|
// ─────────────────────────────────────────────────────────────────────────────
|
|
18
18
|
|
|
19
19
|
/** Version of the protocol block content. Bump on any content change. */
|
|
20
|
-
export const BLOCK_VERSION =
|
|
20
|
+
export const BLOCK_VERSION = 4;
|
|
21
21
|
|
|
22
22
|
/** Stable across block versions — never change these once shipped. */
|
|
23
23
|
export const BEGIN_MARKER = "<!-- gno:agents:begin -->";
|
|
@@ -44,16 +44,17 @@ Local knowledge search over indexed collections. Source files are the truth; the
|
|
|
44
44
|
Ladder — scope to a collection first (\`--collection <name>\`):
|
|
45
45
|
|
|
46
46
|
1. Exact term/identifier/quote/error: \`gno search "<text>"\`
|
|
47
|
-
2. What do we know/believe (memory): \`gno recall "<query>" --scope <scope>\`
|
|
48
|
-
3.
|
|
49
|
-
4.
|
|
50
|
-
5.
|
|
51
|
-
6.
|
|
52
|
-
7.
|
|
47
|
+
2. What do we know/believe (memory): \`gno recall "<query>" --scope <scope>\`
|
|
48
|
+
3. Any other question: \`gno query "<question>" --fast -n 10\` (hybrid)
|
|
49
|
+
4. Not found or vague: \`gno query "<question>" -n 10\` (adds expansion + rerank)
|
|
50
|
+
5. Multi-document evidence: \`gno context build "<goal>" --budget 12000\`
|
|
51
|
+
6. Changes/dependencies: \`gno changes\` / \`gno diff <doc>\` / \`gno impact <doc>\`
|
|
52
|
+
7. Generated answer: \`gno ask "<question>" --verify\` (abstention is valid)
|
|
53
|
+
8. Expected document missing: \`gno query diagnose "<query>" --target <doc>\` before grep.
|
|
53
54
|
|
|
54
55
|
Writing: retrieve first — a question alone is read-only. Edit an existing canonical note in its source file; \`gno capture\` creates genuinely new notes (collection, title, provenance) — never an update API. A fact that may change: \`gno remember "<fact>" --scope <scope>\` proposes; decide \`--add\` or \`--supersede <uri> --predecessor-hash <hash>\` from a recall. Recalled spans are context, not new facts: pass the receipt (\`--receipt\`). After writes: reindex the collection, verify retrieval.
|
|
55
56
|
|
|
56
|
-
Cite with gno:// URIs.
|
|
57
|
+
Cite with gno:// URIs. Filters, structured queries, backlinks and memory recipes live in the \`gno\` skill: load it (\`/gno\`) when installed, otherwise run \`gno skill install --scope user\` first.`;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
/** SHA-256 hex digest of the body, truncated for the stamp line. */
|