fix: regenerate agents-mcp package with pnpm monorepo compatibility#2770
fix: regenerate agents-mcp package with pnpm monorepo compatibility#2770amikofalvy wants to merge 6 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 21db81d The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
TL;DR — Regenerates the Key changes
Summary | 1183 files | 6 commits | base:
|
Regenerated with --skip-versioning to keep gen.yaml version at 0.0.1. Renamed cliGetManageApiCliMe -> cliGetManageApiCLIMe to fix TS1261 case-sensitivity error between filename and import path. Made-with: Cursor
There was a problem hiding this comment.
Low urgency — the core approach is sound, but two items need attention before merge.
This PR regenerates @inkeep/agents-mcp from the latest OpenAPI spec (Speakeasy 1.698.0 → 1.757.1, SDK version 0.0.1 → 0.1.1). All 1174 changed files are scoped to packages/agents-mcp/. The manual changes — .genignore to protect package.json, --skip-compile to avoid npm-in-pnpm conflicts, and the narrowed .npmignore — are correct and well-motivated.
Two items to address:
-
Missing changeset.
@inkeep/agents-mcpis not in the changeset ignore list, yet no changeset was added. This regeneration adds ~279 new files (new API surface for apps, skills, scheduled triggers, Slack channels, etc.), deletes 31 files (renamed/removed endpoints), and bumps the SDK generation version. Consumers of@inkeep/agents-mcp(currentlyagents-api) will see new exports and potentially removed ones. A changeset is warranted. -
Unchecked test plan item. The PR description lists "Verify MCP server starts correctly:
npx @inkeep/agents-mcp start --help" as unchecked. Sincebin/mcp-server.jsis a build artifact that doesn't exist in the source tree (produced bybun build), this verification would need a local build first. Worth confirming this passes before merge.
| "lint": "eslint --cache --max-warnings=0 src", | ||
| "prepublishOnly": "npm run build", | ||
| "generate": "speakeasy run" | ||
| "generate": "speakeasy run --skip-compile" |
There was a problem hiding this comment.
The --skip-compile change is the right fix for the pnpm monorepo conflict. Worth noting that the build script still runs bun i (line 20), which installs via bun's own resolver and bypasses pnpm's lockfile. This is a pre-existing concern outside the scope of this PR, but if the goal is full pnpm compatibility, it's the next thing to address.
| @@ -0,0 +1 @@ | |||
| package.json | |||
There was a problem hiding this comment.
This is correct — prevents Speakeasy from overwriting the manually-managed package.json with its own template that lacks the pnpm-specific adjustments. However, this means future dependency additions from Speakeasy regeneration (e.g., if a new SDK feature requires a new package) will need manual intervention. Consider documenting this in a comment or the README's generation instructions so future regenerators know to diff the generated package.json against the existing one.
| !/**/*.js | ||
| !/**/*.mjs | ||
| !/**/*.json | ||
| !/package.json |
There was a problem hiding this comment.
The narrowing from !/**/*.json to explicit paths is correct — manifest.json is build-time only (used by build.mts and mcpb:build), not needed by npm consumers. The !/jsr.json pattern is a no-op since jsr.json doesn't exist in this package. The !/dist/**/*.json and !/esm/**/*.json patterns are also currently no-ops (tsc doesn't emit JSON files with the current tsconfig.json), but they're reasonable future-proofing.
There was a problem hiding this comment.
PR Review Summary
(1) Total Issues | Risk: Medium
🟠⚠️ Major (1) 🟠⚠️
🟠 1) scope Missing changeset for published package
Issue: The @inkeep/agents-mcp package (version 0.58.20) has been regenerated with significant changes, but no changeset was added. Per AGENTS.md, any change to a published package requires a changeset.
Why: This regeneration includes:
- New
--skip-compileflag in the generate script (workflow change) - New
.genignoreto preventpackage.jsonoverwrites - Updated Speakeasy from 1.698.0 → 1.757.1
- Regenerated ~1,170 SDK files from updated OpenAPI spec
- New operations (Apps CRUD, Slack channels, Auth/PoW, Conversations)
- Removed operations (tool approvals, pending invitations, user organizations)
- New dynamic tool discovery pattern (
list_tools,describe_tool_input,execute_tool)
Without a changeset, consumers won't have changelog documentation and the package version won't be bumped appropriately.
Fix: Run:
pnpm bump patch --pkg agents-mcp "Regenerate MCP server with pnpm monorepo compatibility and updated OpenAPI spec"Note: Given the scope of changes (new operations, removed operations, workflow changes), a minor bump may be more appropriate depending on semver policy for this package.
Refs:
💭 Consider (1) 💭
Inline Comments:
- 💭 Consider:
gen.yaml:27versioningStrategy: automaticinteraction with.genignore
✅ What's Good
.genignoreapproach — Correctly prevents Speakeasy from overwriting the manually-managedpackage.json, solving the three-way merge conflict issue.npmignorerefinement — More restrictive JSON allowlist (!/package.json,!/jsr.json,!/dist/**/*.json,!/esm/**/*.json) is safer than the previous!/**/*.json--skip-compileworkaround — Appropriate solution for pnpm monorepo compatibility sincemcp-typescripttarget doesn't supportcompileCommand- Dynamic tool discovery — The new
list_tools/describe_tool_input/execute_toolpattern is a modern MCP approach
📋 Test Plan Verification
The PR description includes:
-
speakeasy run --skip-compilecompletes successfully -
pnpm install && pnpm buildcompiles the generated SDK without errors - Verify MCP server starts correctly:
npx @inkeep/agents-mcp start --help
Please complete the final test plan item before merging.
💡 APPROVE WITH SUGGESTIONS
Summary: This is a well-structured PR that correctly solves the pnpm monorepo compatibility issue with Speakeasy code generation. The .genignore + --skip-compile approach is the right solution. A changeset is required for this published package — please add one before merging.
Discarded (5)
| Location | Issue | Reason Discarded |
|---|---|---|
manifest.json |
tools array removed |
Intentional — replaced by dynamic tool discovery pattern |
manifest.json |
Auth required changed to false |
Intentional — supports new anonymous session auth |
models/ |
Tool approvals endpoint removed | Reflects OpenAPI spec change, not a PR bug |
models/ |
Invitations/organizations endpoints removed | Reflects OpenAPI spec change, not a PR bug |
README.md:6 |
MIT license badge vs Elastic License 2.0 | Pre-existing Speakeasy template issue, out of scope |
Reviewers (2)
| Reviewer | Returned | Main Findings | Consider | Inline Comments | Discarded |
|---|---|---|---|---|---|
pr-review-devops |
6 | 1 | 1 | 1 | 3 |
pr-review-breaking-changes |
7 | 0 | 0 | 0 | 7 |
| Total | 13 | 1 | 1 | 1 | 10 |
Note: Breaking changes findings were discarded after validation — the removed endpoints and manifest changes reflect intentional OpenAPI spec updates, not PR bugs.
| schemas: | ||
| allOfMergeStrategy: shallowMerge | ||
| requestBodyFieldName: body | ||
| versioningStrategy: automatic |
There was a problem hiding this comment.
💭 Consider: versioningStrategy: automatic interaction with .genignore
Issue: The versioningStrategy: automatic setting was added, but package.json is now in .genignore, meaning Speakeasy cannot update the version field.
Why: This may cause version drift between what Speakeasy expects and what's in the manually-managed package.json. Since version bumps are handled via changesets in this monorepo, this setting may be harmless—but the interaction should be verified.
Fix: Consider removing versioningStrategy: automatic since versioning is handled via changesets and package.json is protected by .genignore. Alternatively, verify with Speakeasy docs that this combination works as expected.
Refs:
macOS HFS+ is case-insensitive, so `mv Cli -> CLI` was a no-op. Use two-step git mv through intermediate name to record the rename in git's index for case-sensitive filesystems (Linux CI runners). Made-with: Cursor
There was a problem hiding this comment.
PR Review Summary
(0) Total Issues | Risk: Low
Delta Review
This is a re-review scoped to changes since the previous automated review.
Changes since last review:
- 1 commit:
fix: case-sensitive file rename for cliGetManageApiCLIMe on Linux CI - 2 files renamed (no content changes):
src/funcs/cliGetManageApiCliMe.ts→src/funcs/cliGetManageApiCLIMe.tssrc/mcp-server/tools/cliGetManageApiCliMe.ts→src/mcp-server/tools/cliGetManageApiCLIMe.ts
Assessment: The delta is a correct fix for case-sensitivity issues on Linux CI. The filename casing now matches the import/export identifiers (cliGetManageApiCLIMe). No new issues introduced.
🕐 Pending Recommendations (1)
- 🟠
scopeMissing changeset for published package — still unresolved
💡 APPROVE WITH SUGGESTIONS
Summary: The delta (case-sensitive file rename) is correct and resolves the TS1261 build issue on Linux CI. The changeset requirement from the previous review remains unresolved — please run pnpm bump patch --pkg agents-mcp "Regenerate MCP server with pnpm monorepo compatibility and updated OpenAPI spec" before merging.
Reviewers (0)
| Reviewer | Returned | Main Findings | Consider | While You're Here | Inline Comments | Pending Recs | Discarded |
|---|---|---|---|---|---|---|---|
| Total | 0 | 0 | 0 | 0 | 0 | 1 | 0 |
Note: Delta review — no sub-reviewers dispatched as the change was a trivial file rename with no content changes.
Speakeasy auto-added validateResponse: true during regeneration, but the API intentionally strips tenantId/projectId from app responses via sanitizeAppConfig. This caused ROUTE-5 and EDGE-1 test failures for apps-create-app and apps-list-apps endpoints. Revert to the default (false) to match prior behavior. Made-with: Cursor
Made-with: Cursor
There was a problem hiding this comment.
PR Review Summary
(0) Total Issues | Risk: Low
Delta Review
This is a re-review scoped to changes since the previous automated review.
Changes since last review (2 commits):
| Commit | Summary |
|---|---|
fcf22e830 |
fix: disable validateResponse to fix apps response-validation errors |
5dbc3c214 |
chore: add changeset for agents-mcp regeneration |
Key changes:
- Changeset added (
.changeset/brave-mcp-regen.md) — resolves the major issue from all prior reviews validateResponse: falseingen.yaml— disables Speakeasy's runtime response validationmatchers.tsdeleted (352 lines) — response validation logic removed as consequence
Assessment:
✅ Changeset requirement satisfied — The changeset correctly describes the regeneration with pnpm monorepo compatibility fixes.
✅ Response validation fix is appropriate — Disabling validateResponse is the correct approach for a generated SDK where the OpenAPI spec may not perfectly match all API responses (especially for polymorphic/union types in the apps CRUD operations). This is a common pattern for Speakeasy-generated SDKs.
✅ No regressions introduced — The delta only contains the two targeted fixes; no unrelated changes.
✅ APPROVE
Summary: All prior review feedback has been addressed. The changeset is in place, and disabling response validation is the appropriate fix for the apps CRUD errors. This PR is ready to merge.
Note: Submitting as COMMENT due to bot permissions — this review recommends approval.
Reviewers (0)
| Reviewer | Returned | Main Findings | Consider | While You're Here | Inline Comments | Pending Recs | Discarded |
|---|---|---|---|---|---|---|---|
| Total | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Note: Delta review — no sub-reviewers dispatched. The changes were two targeted fixes (changeset + config flag) with no new code logic requiring domain-specific review.
There was a problem hiding this comment.
PR Review Summary
(0) Total Issues | Risk: Low
Delta Review
This is a re-review scoped to changes since the previous automated review (5dbc3c214ac7).
Changes since last review (3 commits):
| Commit | Summary |
|---|---|
21db81dfa |
Merge branch 'main' into update/agents-mcp-1 |
4f7555014 |
Version Packages (#2766) |
75da86cd1 |
fix(manage-ui): handle __Secure- cookie prefix in auth middleware (#2769) |
Files changed (17):
- CHANGELOG files added for all packages (version 0.58.20 → 0.58.21)
- Version bumps in
package.jsonfiles - New
packages/agents-core/src/auth/cookie-names.ts— utilities for__Secure-cookie prefix handling - Updates to
api-config.tsandproxy.tsto use new auth cookie helpers
Assessment:
✅ No changes to PR scope — The delta is a merge from main bringing in routine version bumps and an unrelated auth middleware fix. No changes to the core PR work (packages/agents-mcp/ regeneration, .genignore, --skip-compile, validateResponse: false).
✅ Previous approval stands — All prior review feedback was addressed in earlier commits. The changeset is in place, response validation is disabled to fix apps CRUD tests, and the casing fix resolved Linux CI issues.
✅ Merged-in changes are correct — The cookie-names.ts addition and its usages follow good patterns (centralized constants, helper functions for secure cookie detection).
✅ APPROVE
Summary: The delta is a routine merge from main (version bumps + unrelated auth fix). The core PR work was already reviewed and approved. This PR is ready to merge.
Note: Submitting as COMMENT due to bot permissions — this review recommends approval.
Reviewers (0)
| Reviewer | Returned | Main Findings | Consider | While You're Here | Inline Comments | Pending Recs | Discarded |
|---|---|---|---|---|---|---|---|
| Total | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Note: Delta review — no sub-reviewers dispatched. The delta contained only merged-in main branch changes (version bumps, auth cookie fix) with no impact on the PR's core changes.
Ito Test Report ❌17 test cases ran. 14 passed, 3 failed. ✅ Most core MCP flows, auth checks, and CRUD scenarios behaved as expected in this run. 🔍 Code-first verification found three likely product defects: Streamable HTTP protocol sequencing is not enforced, the advertised SSE endpoint is unavailable in the Streamable HTTP server path, and a generated available-agents operation is not registered as an MCP tool. ✅ Passed (14)
❌ Failed (3)
Out-of-order MCP sequence handling – Failed
SSE transport session lifecycle – Failed
Available-agents route reachable but not MCP-discoverable – Failed
📋 View Recording |

































Summary
@inkeep/agents-mcpSpeakeasy MCP server from the latest public OpenAPI spec athttps://api.pilot.inkeep.com/openapi.json.genignorewithpackage.jsonto prevent Speakeasy from overwriting manually-managed dependency versions (which caused three-way merge conflicts on every generation)generatescript to usespeakeasy run --skip-compile, bypassing the hardcodednpm installstep that fails in pnpm monorepos (npm walks into pnpm's.pnpmstore and tries to rebuild incompatible packages likeglobals@16.5.0)Why
--skip-compileis neededThe
mcp-typescriptSpeakeasy target does not support thecompileCommandconfig option (only thetypescripttarget does). Its compile step always runsnpm install --ignore-scripts, which conflicts with pnpm's content-addressable store layout. After code generation,pnpm install && pnpm buildhandles compilation correctly.Test plan
speakeasy run --skip-compilecompletes successfullypnpm install && pnpm buildcompiles the generated SDK without errorsnpx @inkeep/agents-mcp start --helpMade with Cursor