Skip to content

op catalog

Mikhail Deynekin edited this page Nov 22, 2026 · 7 revisions

catalog

Registry of projects: what is indexed, when, with which checksums.

Group Navigation and reading
Edition community — works without a licence
Capability audit — the feature that carries this operation; the licence matrix is on 15 · Editions and licensing
MCP tool ragraf_catalog · read-only · idempotent
CLI ragraf -p <config> query catalog …

Why it exists

The registry answers "which corpora exist and which of them are indexed", and until 0.13.0 a damaged registry was the one failure it handled silently: a file whose entries was not an object produced an empty list, and "no corpora" read exactly like "nothing to show". A missing corpus looks like a working answer, so the loss would pass unnoticed. Now the read fails loudly — exit code 2, the reason in the answer, and a copy of the damaged file next to it (catalog.json.broken-<timestamp>) so the registry itself is not overwritten by an empty one.

What it solves

  • List the corpora, their revisions and their state in one place.
  • Distinguish "no corpora registered" from "the registry cannot be read" — the second is an error with a reason, not an empty answer.
  • Find the preserved copy of a damaged registry before touching anything.

How to use it

The call that produced the answer below, as a command line:

$ ragraf -p demo-corpus.yaml query catalog

The same call through MCP: ragraf_catalog().

The answer below was captured on the demo corpus, not written for the page:

{
 "op": "catalog",
 "index_rev": "rev-0002",
 "capability": "degraded",
 "provenance": "index",
 "found": true,
 "result": {
  "version": 1,
  "count": 1,
  "entries": [
   {
    "category": "demo-corpus",
    "project": "demo-corpus",
    "root": "C:/AutoClaw/RAGRAF.git/.work/demo-corpus",
    "config": "C:/AutoClaw/RAGRAF.git/.work/demo-corpus.config.yaml",
    "rev_id": "rev-0002",
    "indexed_at": "2026-11-10T20:08:39+03:00",
    "capability": "degraded",
    "corpus_hash": "ab36fd1c181eacb4eadcbe406fd34eaa7a4de470c0cc9b421ba22f015e307892",
    "config_hash": "f07d136f61e4f808",
    "files": 11,
    "nodes": 69,
    "edges": 91,
    "embedding_model": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
    "runs": 2,
    "state": "indexed",
    "index_enabled": true,
    "hash_matches": true,
    "files_now": 11,
    "verified_by": "fingerprint",
    "config_matches": true
   }
  ]
 },
 "limits_count": 1
}

The call succeeded. The answer is trimmed to two items per list and to the fields that carry no Russian prose: limits and the explanatory strings are counted in the footer below instead of being quoted.

Parameters

This operation takes no parameters.

What it returns

result is assembled at runtime, so the code carries no static list of its keys: the shape is whatever the sentence above describes, and the diagram below shows the steps that build it.

The body also writes these fields into the answer envelope itself (extra): note, suggest.

The envelope around the result is the same for every operation; how to read it: 04 · Operations reference.

How it works

Step What happens
Reads none of the three stores directly — the answer comes through the engine the body calls, or from what the call is given
Calls no module function: the body computes the answer itself
Guarded by nothing: no licence gate and no revision check, the body answers directly
Writes note, suggest into the answer envelope
Empty answer yes, and names where to go instead: index
flowchart TD
  Start[query catalog]
  Body[operation body]
  Found{found}
  Empty[empty result + suggest: index]
  Out[envelope with result]
  Start --> Body
  Body --> Found
  Found -- no --> Empty
  Found -- yes --> Out
Loading

Where it stops

Every answer carries a limits field, and it is never empty when a boundary exists: that is where the limits of this particular call are named — which part of the corpus was not covered, which fact could not be confirmed, what the operation refused to guess.

The boundary of the whole Navigation and reading group is stated once, on the reference page. It is a sentence about the group, so it is not repeated here as if it were a sentence about catalog.

Around this group

← previous in the group: repo_map

→ next in the group: skill_catalog

The full table with all 87 operations · A–Z index · Navigation and reading


Where these fields come from: the parameters, their types and defaults are read from the signature op_catalog in src/ragraf/facade.py:2651 (line numbers as of 0.12.0); the MCP annotations from the tool registration; the edition from src/ragraf/edition_baseline.json; the guards, calls, stores, envelope fields and the diagram from the body of that same method. The example is a run of tools/build-op-examples.py on the demo corpus at revision rev-0002; fields whose value is Russian prose in this build (limits, explanatory strings) are counted, not quoted. Nothing else on this page is written by hand.

The reason and the tasks above are a translation of the docstring of op_catalog, src/ragraf/facade.py:2651, kept in tools/op-text.json next to the line it came from. That file is the only hand-written text in the pipeline; the gate tools/check-op-text.py checks that the line exists and that its text is English.

Clone this wiki locally