-
Notifications
You must be signed in to change notification settings - Fork 138
Description
Pre-requisities
- I am using the newest version of the platform (
agentstack versionshows that CLI and platform are the same version, and there is no newer version available)
Describe the bug
The SDK crashes when oauthRedirectUri is not provided in fulfillments, even though fulfillments are designed to be partial. The Fulfillments interface requires oauthRedirectUri as a mandatory property, and it's called unconditionally in handle-agent-card.ts, causing a runtime error when the function is missing. The fullfilments should always be partial.
To Reproduce
Steps to reproduce the behavior:
- Create fulfillments without providing
oauthRedirectUri - Pass the partial fulfillments to
resolveMetadatainhandle-agent-card.ts - The code crashes when calling
fulfillments.oauthRedirectUri()on line 99
Expected behavior
Since fulfillments are partial, oauthRedirectUri should be optional. The code should check if oauthRedirectUri exists before calling it, or the interface should make it optional.
Logs / Screenshots / Code snippets
Location: apps/agentstack-sdk-ts/src/client/a2a/extensions/handle-agent-card.ts
// Line 35: oauthRedirectUri is required in the interface
oauthRedirectUri: () => string | null;
// Line 99: Called unconditionally without checking if it exists
const oauthRedirectUri = fulfillments.oauthRedirectUri();Set-up:
- Model provider: N/A (SDK issue)
Additional context
The crash occurs because the Fulfillments interface defines oauthRedirectUri as a required property, but when fulfillments are partial (as they should be), this property may not be present, leading to a runtime error.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status