feat(agent-core-v2): caller MCP servers on session create and skill-dir file access - #1654
Closed
sailist wants to merge 4 commits into
Closed
feat(agent-core-v2): caller MCP servers on session create and skill-dir file access#1654sailist wants to merge 4 commits into
sailist wants to merge 4 commits into
Conversation
…reate - add mcpServers to CreateSessionOptions, forwarded to the session's first ensureMcpReady call so caller-supplied servers ride on the initial load - ensureMcpReady accepts callerServers, honored only by the call that starts the initial load; later calls just await the in-flight single-flight load - merge precedence mirrors v1 (rpc/core-impl.ts): file config < caller-supplied < plugin servers
- add extendWorkspaceWithSkillRoots to path-access; Read/Write/Edit/Grep/ Glob and media tools merge skill-catalog roots into the workspace per call (v1 merged once at construction), so skill dirs outside the cwd stay reachable and late-loading roots are picked up - add skillCatalogRuntimeOptionsSeed; wire --skillsDir into the v2 print CLI and skillDirs into kap-server startServer (v1 SDK skillDirs parity)
Enforce the package comment convention that comments live only in the top-of-file block: strip mid-file doc, prose, and trailing comments while preserving header blocks and eslint/oxlint/@ts-* suppression comments. No code tokens are changed.
🦋 Changeset detectedLatest commit: 6f03722 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 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 |
Collaborator
Author
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.
Related Issue
None — the problem is explained in the next section.
Problem
Two v1-parity gaps in the v2 engine (experimental):
mcpServersnever connected to them.--skillsDir/ the server'sskillDirsoption had no effect.What changed
1. Caller-supplied MCP servers on session create
mcpServerstoCreateSessionOptions, forwarded to the session's firstensureMcpReadycall so caller-supplied servers ride on the initial load.ensureMcpReadyacceptscallerServers, honored only by the call that starts the initial load; later calls just await the in-flight single-flight load.2. File tools reach skill roots; skillDirs seed
extendWorkspaceWithSkillRootsto path-access; Read/Write/Edit/Grep/Glob and media tools merge skill-catalog roots into the workspace per call (v1 merged once at construction), so skill dirs outside the cwd stay reachable and late-loading roots are picked up.skillCatalogRuntimeOptionsSeed; wire--skillsDirinto the v2 print CLI andskillDirsinto kap-serverstartServer(v1 SDKskillDirsparity).3. Comment cleanup in agent-core-v2
Changesets for the two fixes are included; the comment-only commit needs none.
Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update.