redhat-developer / redhat-developer/abbenay

feat(grpc): add tool approval flow for Chat/SessionChat RPCs

Open
#34 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
12
Forks
7
Avg merge
7h 7m
Merged PRs (30d)
3

Description

Summary

The REST API supports an interactive tool approval flow for chat:

  1. POST /api/chat streams SSE events including approval_request when a tool invocation needs human approval
  2. POST /api/chat/:chatId/approve resolves the pending approval (approve or deny)

The gRPC Chat and SessionChat RPCs support streaming responses but have no equivalent approval mechanism. This means gRPC clients cannot replicate the dashboard's interactive chat-with-approval UX.

Proposal

Design a gRPC-native approval flow. Options include:

  1. Bidirectional streaming — extend Chat/SessionChat to accept client-to-server approval messages mid-stream
  2. Separate approval RPC — add an ApproveToolCall(chatId, toolCallId, approved) unary RPC that resolves pending approvals, mirroring the REST endpoint
  3. Callback pattern — use the existing VSCodeStream bidirectional channel to relay approval requests/responses

Option 2 is simplest and most consistent with the REST pattern.

Context

Identified during gRPC config parity audit in #32.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the gRPC Chat and SessionChat RPC definitions and streaming implementations with the REST approval flow at POST /api/chat and POST /api/chat/:chatId/approve. Review the existing VSCodeStream bidirectional channel and the context from #32 before choosing an approach. Done means a documented gRPC approval design that lets clients receive approval requests and approve or deny pending tool calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, typescript
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.