Skip to content

fix: pass ServerCallContext to getAuthenticatedExtendedAgentCard for REST#274

Merged
ishymko merged 1 commit intomainfrom
ishymko/fix-context-rest
Dec 17, 2025
Merged

fix: pass ServerCallContext to getAuthenticatedExtendedAgentCard for REST#274
ishymko merged 1 commit intomainfrom
ishymko/fix-context-rest

Conversation

@ishymko
Copy link
Member

@ishymko ishymko commented Dec 17, 2025

Description

Follow-up for #142: authenticated agent card logic relies on context to determine authentication status.

src/server/transports/rest/rest_transport_handler.ts is not exported, so adding a required parameter is fine.

Re #137

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ishymko, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a fix to ensure that the ServerCallContext is correctly passed to the getAuthenticatedExtendedAgentCard logic when handling REST requests. This change is crucial for the authenticated agent card functionality, as it relies on the context to accurately determine the authentication status, addressing a follow-up from previous related issues.

Highlights

  • Context Passing: The ServerCallContext is now explicitly passed to the getAuthenticatedExtendedAgentCard function within the REST handler for the /v1/card endpoint.
  • Method Signature Update: The getAuthenticatedExtendedAgentCard method in RestTransportHandler has been updated to accept the ServerCallContext as a parameter and forward it to the underlying request handler.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@ishymko ishymko marked this pull request as ready for review December 17, 2025 14:51
@ishymko ishymko requested a review from a team as a code owner December 17, 2025 14:51
@github-actions
Copy link

🧪 Code Coverage

⬇️ Download Full Report

Metric Main PR Delta
lines 82.31% 82.31% ⚪️ 0.00%
statements 82.31% 82.31% ⚪️ 0.00%
functions 89.81% 89.81% ⚪️ 0.00%
branches 82.9% 82.9% ⚪️ 0.00%

Generated by coverage-comment.yml

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly addresses a bug by passing the ServerCallContext to the getAuthenticatedExtendedAgentCard method in the REST transport layer. The changes in rest_handler.ts and rest_transport_handler.ts ensure that authentication context is available for retrieving the agent card, which aligns with the PR's goal. The implementation is straightforward and well-executed. I have reviewed the changes and found no issues.

@ishymko ishymko enabled auto-merge (squash) December 17, 2025 14:53
@ishymko ishymko merged commit 89b141b into main Dec 17, 2025
15 checks passed
@ishymko ishymko deleted the ishymko/fix-context-rest branch December 17, 2025 14:53
ishymko pushed a commit that referenced this pull request Dec 17, 2025
🤖 I have created a release *beep* *boop*
---


## [0.3.7](v0.3.6...v0.3.7)
(2025-12-17)


### Features

* add rest client
([#258](#258))
([96be3a1](96be3a1))
* remove EventEmitter dependency to support Edge Runtime
([#219](#219))
([6c76fef](6c76fef)),
closes [#218](#218)


### Bug Fixes

* export transport agnostic errors from client
([#272](#272))
([23cd42e](23cd42e))
* pass ServerCallContext to getAuthenticatedExtendedAgentCard for REST
([#274](#274))
([89b141b](89b141b)),
closes [#137](#137)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants