Repository navigation
Send the catalog User-Agent on calls from installed connectors - #1539
Merged
Merged
Conversation
sevdesk asks technology partners to send a User-Agent on every API call. The sevdesk adapter now declares one, and catalog connectors that were installed before their adapter gained a static User-Agent get it at request time, since catalog sync never updates stored headers. A User-Agent stored on the connector still wins.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sevdesk asks technology partners to send a User-Agent on every API call (requirement #2 of its partner programme). Our sevdesk adapter sent none. Adding the header to the adapter alone is not enough: the header is copied onto a connector at install, and catalog sync never updates stored headers (
CatalogResyncService"never touches auth/envVars/headers"), so connectors installed earlier would keep sending none.Changes
de/sevdesk.json:"headers": {"User-Agent": "AnythingMCP ([email protected])"}(same value asbr/tiendanube.json).connectors/catalog-user-agent.util.ts:withCatalogUserAgent(headers, connectorConfig). For a catalog connector (config.adapterSlug) with no User-Agent, add the adapter's User-Agent. Rules:{{VAR}}) is used;dynamic-mcp-tools.ts),ConnectorsServicetool execution and the connection test.Type
Testing
In
packages/backend:npx jest src/connectors/catalog-user-agent.util.spec.ts: 6 passed. The tests cover:user-agent: AnythingMCP ([email protected])on a sevdesk call.npx eslinton the 4 changed TS files: clean.node scripts/validate-adapters.mjs --warn: no sevdesk warnings.node scripts/regenerate-catalog.mjs: no catalog diff.tscand thedynamic-mcp-tools*/connectors.service*suites fail to compile because the shared localnode_moduleslacks@types/picomatchand other modules. That is a baseline of this machine, unrelated to this change, and the same on main. CI runs the full suites.Checklist
Related Issues
None (sevdesk technology partner requirement).