feat(server): add Orbit agent command RPCs

@dgruzd This MR adds the Knowledge Graph side of the Orbit agent command surface described in !1253 (merged).

It introduces the v2 command registry, returns compact command details for lazy MCP discovery, and executes GKG-owned command invocations. Rails still owns the runtime path for query_graph through its command interceptor.

Relates to:

Depends on:

Flow

flowchart LR
  Agent[Orbit agent] -->|MCP: list_commands| DWS[Duo Workflow Service]
  DWS --> Rails[Rails MCP + REST]
  Rails -->|ListAgentCommands| GKG[GKG command registry v2]
  GKG -->|names, descriptions, schemas, source_type| Rails
  Rails -->|TOON command catalog| Agent

  Agent -->|MCP: invoke_command| DWS
  Rails -->|GKG-owned commands| Invoke[GKG InvokeAgentCommand]
  Invoke -->|DSL, schema, response format context| Agent
  Rails -->|Rails-owned query_graph| Interceptor[Command interceptor]
  Interceptor --> Stream[existing Workhorse query_graph stream]
  Stream --> Agent

  Rest[REST client] -->|GET /orbit/agent/commands| Rails
  Rest -->|POST /orbit/agent/commands/:name| Rails
GKG changes
  • Adds ListAgentCommands and InvokeAgentCommand RPCs.
  • Adds a v2 command registry with command names, descriptions, parameter schemas, supported formats, and source_type ownership.
  • Lists query_graph, get_graph_schema, get_query_dsl, and get_response_format for lazy command discovery.
  • Executes GKG-owned discovery commands directly from InvokeAgentCommand.
  • Marks Rails-owned commands so Rails can intercept them instead of sending execution into GKG.
  • Returns the command catalog in TOON when callers request LLM format.
  • Keeps get_graph_status out of the new command catalog.
  • Does not add get_graph_info.
Edited by Michael Angelo Rivera

Merge request reports

Loading