Repository navigation
fix(mcp): declare every probe field, and ship the manifest to Vercel - #30
Merged
Merged
Conversation
Two contracts broke on the live surface that the local suite could not see. inspect_target: the probe gained opencodeVersion and skillsCount, but the tool's output schema did not declare them, and the MCP SDK rejects unknown fields in structuredContent — so the call failed with 'data must NOT have additional properties' for five fields (the two new ones plus shell, osIdLike and npmPrefix, which had been undeclared all along and only surfaced now). Declare all five, export the schema, and add a test that fails when the probe emits a field the schema does not describe, so this is caught in CI rather than by a user. describe_workbench: the versions summary was null in production because the manifest is read with readFileSync, which Vercel's tracer cannot see, so the file never entered the function bundle. includeFiles puts it there.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Merged
This branch was successfully deployed
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.
Two contracts broke on the live surface that the local suite could not see. Both are now covered by a test or by an explicit deployment setting.
inspect_targetfailed with a schema errorLive:
The probe gained
opencodeVersionandskillsCount, but the tool's output schema never declared them — and the MCP SDK rejects unknown fields instructuredContent. The five offenders were those two plusshell,osIdLikeandnpmPrefix, which had been emitted but undeclared all along and only surfaced once the call was exercised end to end.Fix: declare all five and export the schema.
mcp-server/test/inspect-output.test.tsnow parses the probe and fails if it emits a field the schema does not describe — so this class of break is caught in CI, not by a user.describe_workbenchreturned no versionsversionswasnullin production while working locally. The manifest is read withreadFileSync, which Vercel's file tracer cannot see, soworkbench.versions.jsonnever entered the function bundle and the read threw (caught, returningundefined).Fix:
includeFiles: "workbench.versions.json"onapi/mcp.js.Worth noting the asymmetry that hid this:
describe_workbench's existing fields come from code constants, not from files, so nothing had ever exercised a runtime file read on that path.Verification
No compute box, so CI gates the TypeScript. What I can assert directly:
vercel.jsonparses, and the diff is the two lines shownAfter merge I will re-run the live checks that exposed both bugs:
inspect_targetonopencode-workbench.simonmak.com/mcpanddescribe_workbench.versions.