zettelkasten.dashboard.backend.routes.claims¶
zettelkasten.dashboard.backend.routes.claims ¶
Claim, claim-anatomy, and citation enrich/expand routes.
Split out of the former flat routes.py; behaviour is unchanged.
enrich_graph_citations ¶
Refresh OpenAlex citation metrics for a single source and its citations.
Source code in zettelkasten/dashboard/backend/routes/claims.py
enrich_project_citations ¶
Refresh OpenAlex citation metrics across a project's sources/citations.
Source code in zettelkasten/dashboard/backend/routes/claims.py
expand_graph_citations ¶
expand_graph_citations(name: str, direction: str = Query('both', description='backward | forward | both'), limit: int = Query(25), dry_run: bool = Query(False)) -> dict
Grow a source's citation graph via OpenAlex and link it to the source.
Wraps citation(action="expand"): resolves the source's DOI, mints
deduped stubs in _citations/, and records their ids on the source's
references / cited_by lists — the same lists GET /graphs/{name}/
citations surfaces. LOCAL-ONLY (a federated/read-only source is rejected),
and refused when the server runs write-disabled, mirroring the review-action
barrier. Clears the papers/claims caches so refreshed scores surface.
Source code in zettelkasten/dashboard/backend/routes/claims.py
expand_project_citations ¶
expand_project_citations(name: str, direction: str = Query('both', description='backward | forward | both'), limit: int = Query(25), dry_run: bool = Query(False)) -> dict
Bulk-grow the citation graph for EVERY owned source in a project.
A scope-level wrapper over citation(action="expand"): it runs the same
per-source OpenAlex expansion (mint deduped _citations/ stubs, record them
on each source's references / cited_by) across all of the project's local
sources, then aggregates the per-source outcomes. Sources without a resolvable
DOI are skipped (not an error). LOCAL-ONLY and refused when the server runs
write-disabled, mirroring the single-source route. Clears the papers/claims
caches once at the end so refreshed scores surface.
Source code in zettelkasten/dashboard/backend/routes/claims.py
graph_claims ¶
graph_claims(name: str, limit: int = Query(0, ge=0, description='Max key claims to return; 0 = all')) -> dict
Claims view for a single source graph (its claims, scored and situated).
Source code in zettelkasten/dashboard/backend/routes/claims.py
project_claims ¶
project_claims(name: str, limit: int = Query(0, ge=0, description='Max key claims to return; 0 = all')) -> dict
Claims view across a project: the claims asserted by any of its sources.
Source code in zettelkasten/dashboard/backend/routes/claims.py
get_claim_anatomy ¶
Full anatomy of a single claim/finding in a source graph.
Claim ids are unique only within a graph, so the claim is identified by
(name, note_id). Mirrors the get_note single-graph resolution: 404s
when the note doesn't exist, isn't a claim/finding, or isn't an active
(scorable) claim. The index is built over this one graph — its own evidence
plus whatever cross-source links the claim's notes carry. No cache (like
get_note / get_citation): a single anatomy is a one-pass read.