@devries-cameron20 / composio-1 / commits / 7daab1496
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

fix(core): stop dropping auth field metadata from toolkit auth details (#4411)

## Summary `transformToolkitRetrieveResponse` projects `auth_config_details[]` key by key and silently dropped three keys the pinned client declares. `is_secret` and `legacy_template_name` are snake_case, so zod stripped them; `auth_hint_url` was never listed. The API documents `is_secret` as "Clients use it to decide whether to mask the input". Without it a consumer rendering its own credential form cannot tell an API key from a shop subdomain, so a field holding a secret is not reported as one. ## Changes - Map auth fields explicitly; add `isSecret`, `legacyTemplateName` and `authHintUrl` to the schemas - Spread optional keys conditionally, so a key the API omits stays absent rather than `undefined`, which would beat a caller's fallback - Add a runtime test over all four field groups, plus a type-level test that fails the build on an unlisted client key in any group. It catches new wire keys, not an assignment removed from the mapper; the runtime test pins that for the keys known today - Add a patch changeset for `@composio/core` ## Type of change - [x] Bug fix - [ ] New feature - [ ] Refactor/Chore - [ ] Documentation - [ ] Breaking change ## How Has This Been Tested? - `pnpm --filter @composio/core test`: 55 files, 1288 passed, 2 expected fail; typecheck and `validate:changesets` exit 0 - `pnpm lint:packages`: exit 0 with 54 pre-existing warnings, one in a file this PR touches; no new warning on added lines - The runtime test fails 5 of its 7 cases on `origin/next`; the two green on both are the regression guards. The type-level test was checked against all four client interfaces - Node 24.18.0; `mise.toml` pins 24.17.0, unavailable here, so it was not run under it. Not run: the root workspace suite (its `test:toolchain` needs Bun), Docker E2E, the Python suite ## Screenshots (if applicable) N/A ## Checklist - [x] I have read the Code of Conduct and this PR adheres to it - [x] I ran linters/tests locally and they passed, with the exceptions listed above - [x] I updated documentation as needed (none needed: the new keys carry TSDoc; the SDK reference is generated from unchanged signatures) - [x] I added tests or explain why not applicable - [x] I added a changeset if this change affects published packages ## Additional context Left out on purpose: `user_visible` and `required_scopes`, in the spec but not the pinned client; `deprecated_auth_provider_details`, which the client marks deprecated; and the keys this transformer drops outside `auth_config_details`, all pre-existing and adjacent. One behavior change: the eager mapping now throws if an auth config detail arrives without its `auth_config_creation` group, where the pass-through still returned the connection fields. The client declares both groups required and non-nullable, so this affects only out-of-contract responses.

Alberto Schiabel committed Sep 15, 2026 at 15:16 UTC 7daab1496f9321c9e3ea6afde53f43be70184caa

No changes.