Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/dwarves

crates/nornir-warehouse-embed/proto/coderoom.proto

// A TRIMMED copy of nornir-server's `CodeRoom` service — its ONE rpc, `Answer`, and
// the one message it needs. Package `nornir.v1` so the generated method path
// (`/nornir.v1.CodeRoom/Answer`) matches the live `nornir-server` — dwarves speaks it
// as a THIN client WITHOUT linking the `nornir` crate (the telemetry / warehouse /
// mimir / viz pattern).
//
// WHY dwarves needs it. Since Mímir v2 the code graph is nornir's CODE ROOM (an event
// lake and a graph engine behind the server), not warehouse tables. The panes that
// drew `symbol_facts` / `call_edges` / `scip_occurrences` / `test_inventory` rows —
// the Coverage tab, the navigator's function tier, the Data view's call graph and
// source pane, the Coderoom tab — have nothing to scan any more. They ASK: one
// question is a reader surface by name (`Viz.CrateGraph`, `Knowledge.Source`,
// `Coderoom.SnapshotDiff` …) and its request as JSON; the answer is the reader's JSON
// object, which always carries `state` (`complete` · `partial` · `empty_fact` ·
// `empty_gap`, or a refusal: `not_consumed` · `not_wired` · `no_room` …) and, for the
// pane surfaces, `room` — workspace, repo@seq with the commit, node and edge counts.
// A refusal is a BODY (`refused: true` + `note`), not a gRPC error: the pane draws the
// state by name.
//
// ONE door, not one rpc per pane: the surface list is nornir's
// (`nornir::code_room::reader::SURFACES`), and a surface this client asks for that the
// server does not know answers `invalid_argument` by name.
//
// Keep the field numbers identical to `nornir.proto` (edda's `nornir-wire` leaf) —
// `tests/proto_drift.rs` re-derives that contract and fails on drift, and it fails
// when the upstream proto has no `CodeRoom` at all (an edda older than this verb).
syntax = "proto3";
package nornir.v1;

// `JsonResponse` is the one already declared in `workspaces.proto` (same package).
import "workspaces.proto";

service CodeRoom {
  rpc Answer (CodeRoomQuestion) returns (JsonResponse);
}

message CodeRoomQuestion {
  string surface     = 1;   // a name of the reader's surface list
  string params_json = 2;   // the surface's request as a JSON object; empty = {}
}