Skip to content

feat(agents): PM-aware MCP spawn via agents init --mcp#154

Merged
SutuSebastian merged 7 commits into
mainfrom
feat/mcp-invocation-resolve
May 27, 2026
Merged

feat(agents): PM-aware MCP spawn via agents init --mcp#154
SutuSebastian merged 7 commits into
mainfrom
feat/mcp-invocation-resolve

Conversation

@SutuSebastian
Copy link
Copy Markdown
Contributor

@SutuSebastian SutuSebastian commented May 27, 2026

Summary

  • codemap agents init --mcp resolves PM-aware spawn commands (npx codemap, pnpm exec codemap, yarn exec codemap, bunx codemap, or dlx @stainless-code/codemap@latest) instead of assuming global codemap on PATH.
  • Shared resolver (src/codemap-invocation.ts + scripts/codemap-invocation.mjs) also powers Action PM detection; action.yml copies both scripts into the Action stage.
  • Adds consumer-surfaces rule, updates served skill launch docs, and trims deprecated MCP test helper.

Test plan

  • bun run check
  • bun test src/codemap-invocation.test.ts src/agents-init-mcp.test.ts src/agents-init.test.ts
  • bun run test:scripts
  • CI action-smoke on PR (non-blocking; continue-on-error: true until Action v1.0.0)

Resolve codemap CLI invocation from the project package manager so MCP
config works when codemap is a devDependency, not only on PATH.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

Warning

Review limit reached

@SutuSebastian, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes and 15 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 36468963-06c9-4e39-8de1-7caccb1e4d39

📥 Commits

Reviewing files that changed from the base of the PR and between 535986f and 6f9b0cd.

📒 Files selected for processing (32)
  • .agents/rules/agents-tier-system.md
  • .agents/rules/concise-comments.md
  • .agents/rules/consumer-surfaces.md
  • .agents/rules/docs-governance.md
  • .changeset/mcp-invocation-resolve.md
  • .cursor/rules/consumer-surfaces.mdc
  • .github/workflows/ci.yml
  • README.md
  • action.yml
  • docs/README.md
  • docs/agents.md
  • docs/architecture.md
  • docs/roadmap.md
  • lint-staged.config.js
  • package.json
  • scripts/action-resolve-working-directory.sh
  • scripts/action-resolve-working-directory.test.mjs
  • scripts/codemap-invocation-sync.test.mjs
  • scripts/codemap-invocation.mjs
  • scripts/detect-pm.mjs
  • scripts/detect-pm.test.mjs
  • src/agents-init-interactive.ts
  • src/agents-init-mcp.test.ts
  • src/agents-init-mcp.ts
  • src/agents-init.test.ts
  • src/agents-init.ts
  • src/cli.test.ts
  • src/cli/cmd-agents.ts
  • src/cli/main.ts
  • src/codemap-invocation.test.ts
  • src/codemap-invocation.ts
  • templates/agent-content/skill/10-recipes-context.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/mcp-invocation-resolve

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: 6f9b0cd

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@stainless-code/codemap Patch

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

Address PR review: absolute project root for detect-pm when the Action
stage cd's elsewhere; TS↔mjs sync test; docs/plan lifecycle; test gaps.
Wire Action helper and TS↔mjs sync tests into test:scripts, lint-staged,
and the CI test job; harden working-directory against .. segments.
Broaden TS↔mjs sync coverage, add pnpm e2e for agents init --mcp, dedupe agent validation in detect-pm, and align changeset wording with CLI prefix.
Extract Action working-directory resolution to a tested shell helper, broaden resolver/sync/e2e coverage, map detector yarn+berry to yarn@berry for dlx, and align consumer docs/CLI copy.
@SutuSebastian SutuSebastian merged commit 1bcca3a into main May 27, 2026
10 of 11 checks passed
@SutuSebastian SutuSebastian deleted the feat/mcp-invocation-resolve branch May 27, 2026 14:44
@github-actions github-actions Bot mentioned this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant