Skip to content

feat(grpc): improve proto — sessions, multi-agent RPCs, structured events #17

@EngineerProjects

Description

@EngineerProjects

Summary

The current proto covers basic Query/Stream but lacks session management,
multi-agent team RPCs, and structured runtime events. This issue brings
the gRPC API to feature-parity with the Go SDK.

New RPCs to add

service NexusService {
  // Sessions
  rpc CreateSession(CreateSessionRequest)   returns (CreateSessionResponse);
  rpc ResumeSession(ResumeSessionRequest)   returns (ResumeSessionResponse);
  rpc ListSessions(ListSessionsRequest)     returns (ListSessionsResponse);
  rpc DeleteSession(DeleteSessionRequest)   returns (DeleteSessionResponse);

  // Multi-agent team
  rpc RegisterAgent(RegisterAgentRequest)   returns (RegisterAgentResponse);
  rpc ListAgents(ListAgentsRequest)         returns (ListAgentsResponse);
  rpc SendMessage(SendMessageRequest)       returns (SendMessageResponse);
  rpc GetInbox(GetInboxRequest)             returns (GetInboxResponse);

  // Streaming events (replaces flat QueryResponse)
  rpc RunStream(RunRequest) returns (stream RuntimeEvent);
}

Structured RuntimeEvent

Replace the flat QueryResponse with a typed event union:

message RuntimeEvent {
  oneof event {
    TextChunkEvent    text_chunk    = 1;
    ToolCallEvent     tool_call     = 2;
    ToolResultEvent   tool_result   = 3;
    ThinkingEvent     thinking      = 4;
    SessionDoneEvent  session_done  = 5;
    ErrorEvent        error         = 6;
  }
}

Acceptance criteria

  • New RPCs defined in nexus.proto with full message types
  • Go server implementation for all new RPCs
  • Backward-compatible — old Query and QueryStream RPCs still work
  • Proto documentation comments in English
  • docs/transports.md updated

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreCore runtime / engine layerenhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions