Skip to content

feat: implement client interceptors#223

Merged
ishymko merged 16 commits into
mainfrom
ishymko/client-interceptors
Dec 3, 2025
Merged

feat: implement client interceptors#223
ishymko merged 16 commits into
mainfrom
ishymko/client-interceptors

Conversation

@ishymko

@ishymko ishymko commented Dec 2, 2025

Copy link
Copy Markdown
Member

Description

Implement client interceptors and export multi-transport client types to prepare for upcoming release.

Interceptors support "early return" both before and after transport invocation. For early return before transport invocation client invokes appropriate "after" methods of executed interceptors.

Release-As: 0.3.6

@ishymko ishymko changed the title feat: feat: implement client interceptors Dec 2, 2025
@ishymko ishymko marked this pull request as ready for review December 2, 2025 14:30
Comment thread src/client/interceptors.ts
Comment thread src/client/interceptors.ts Outdated
ishymko and others added 2 commits December 3, 2025 10:55
Co-authored-by: Guglielmo Colombo <guglielmoc@google.com>
@ishymko ishymko requested a review from guglielmo-san December 3, 2025 10:03
@ishymko ishymko merged commit 5694c22 into main Dec 3, 2025
6 checks passed
@ishymko ishymko deleted the ishymko/client-interceptors branch December 3, 2025 10:25
ishymko added a commit that referenced this pull request Dec 3, 2025
Fix for #223 which is not yet released, so overriding changelog entry below.

BEGIN_COMMIT_OVERRIDE
refactor: properly invoke CallInterceptor.after for async generators
END_COMMIT_OVERRIDE
ishymko added a commit that referenced this pull request Dec 3, 2025
Fix for #223 which is not yet released, so overriding changelog entry below.

BEGIN_COMMIT_OVERRIDE
refactor: properly invoke CallInterceptor.after for async generators
END_COMMIT_OVERRIDE
ishymko added a commit that referenced this pull request Dec 3, 2025
1. `after` wasn't invoked in case of early return from `before` for
executed interceptors as done in non-generators methods.
2. `after` wasn't invoked for non-streaming fallback from
`sendMessageStream`.

Fix for #223 which is not yet released, so overriding changelog entry
below to avoid extra message for unreleased functionality.

BEGIN_COMMIT_OVERRIDE
refactor: properly invoke CallInterceptor.after for async generators
END_COMMIT_OVERRIDE
guglielmo-san added a commit that referenced this pull request Dec 3, 2025
… optional (#228)

# Description

This PR changes the `context` parameter in `RequestOptions` from
mandatory to optional.

Fix for #223 which is not yet released, so overriding changelog entry
below to avoid extra message for unreleased functionality.

BEGIN_COMMIT_OVERRIDE
refactor: change `context` parameter in `RequestOptions` from mandatory
to optional
END_COMMIT_OVERRIDE
@EditUndo

EditUndo commented Dec 4, 2025

Copy link
Copy Markdown

love this! We've been moving towards an interceptor pattern for our new backend too.

guglielmo-san added a commit that referenced this pull request Dec 8, 2025
# Description

This PR add a feature to PR #223 adding the agentCard to the
interceptors' parameters. Some values of the agentCard may be necessary
at the interceptors level (e.g. security schemes).

BEGIN_COMMIT_OVERRIDE
refactor: add AgentCard to interceptors parameters
END_COMMIT_OVERRIDE
ishymko added a commit that referenced this pull request Dec 10, 2025
🤖 I have created a release *beep* *boop*
---


## [0.3.6](v0.3.5...v0.3.6)
(2025-12-10)


### Features

* add support for extendedAgentCard on client side
([#234](#234))
([3073376](3073376))
* Add support for extension headers on client side
([#227](#227))
([8c57002](8c57002))
* implement client interceptors
([#223](#223))
([5694c22](5694c22))
* Implement extended card support on server side
([#197](#197))
([45014ac](45014ac))
* implement server http+json
([#142](#142))
([f20e662](f20e662))
* introduce AgentCardResolver
([#225](#225))
([ddaf7de](ddaf7de))
* introduce transport agnostic client
([#198](#198))
([94a9848](94a9848))
* server side support for extensions
([5ef7396](5ef7396))
* support authentication on server side
([#195](#195))
([9872d93](9872d93))


### Bug Fixes

* handle errors occurred in non-blocking sendMessage
([#187](#187))
([e55c0f4](e55c0f4))


### Miscellaneous Chores

* set version to 0.3.6
([#191](#191))
([3f8cea0](3f8cea0))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: Ivan Shymko <ishymko@google.com>
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.

3 participants