feat: add serverFingerprint to MCP fetch/replace types @W-23827791@ - #334
Open
dgs87 wants to merge 1 commit into
Open
feat: add serverFingerprint to MCP fetch/replace types @W-23827791@#334dgs87 wants to merge 1 commit into
dgs87 wants to merge 1 commit into
Conversation
|
Thanks for the contribution! Before we can merge this, we need @dgs87 to sign the Salesforce Inc. Contributor License Agreement. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What & why
ApiCatalog.fetchMcpServer and ApiCatalog.replaceMcpServerAssets are unaware of serverFingerprint
API now returns from POST /mcp-servers/{id}/fetch and accepts on PUT /mcp-servers/{id}/assets
Without it,
@salesforce/agentsconsumers have no way to detect that a remote MCP server's tool definitions changed between reviewing them and saving the allowlist.Change
Added serverFingerprint?: string to two existing types in src/apiCatalogTypes.ts:
No changes to src/apiCatalog.ts: both fetchMcpServer and replaceMcpServerAssets already pass the full body/response through the generic request() helper, so the new field flows through automatically once the types declare it. No changes to src/index.ts: both types were already re-exported.
Test plan
replaceMcpServerAssets now asserts serverFingerprint is round-tripped in the serialized request body when supplied and omitted (not sent as undefined)
when not.
this is a continuation of the work made on #325
@W-23827791@