Repository navigation
fix(sdk): scope the Base V2 capability inventory to platform and own packages (#442) - #446
Draft
waldemort-auto[bot] wants to merge 1 commit into
Draft
waldemort-auto[bot] wants to merge 1 commit into
waldemort-auto[bot] wants to merge 1 commit into
Conversation
…packages (#442) A Base V2 session bound to a named agent now lists and loads only the PilotSwarm platform packages (system, management, SDK skill directories, bundled default agents) and the bound agent's own package. The capability index, the load_skill catalog and the CLI skill directories share one scope (sessionCapabilityScope). Unbound sessions keep the deployment and owner listing, with one copy per owner package (private before shared). Out-of-scope packages stay reachable through search_capabilities; an out-of-scope deployment skill still loads by exact name, unlisted. Fixes #442 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been 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.
Fixes #442.
A Base V2 session bound to a named agent now lists and loads only the PilotSwarm platform packages and the agent's own package. The capability index, the
load_skillcatalog and the CLI skill directories use one scope (sessionCapabilityScope).Behavior
Other packages stay reachable through
search_capabilitiesand an exact reference.Decisions (please confirm)
pluginDirs)load_skillby exact namelisted: false)load_skill("<deployment skill>"), often from a different deployment package. Owner packages outside the scope are never served by name, so an unrelated private skill can no longer shadow a deployment skill.other_shared)load_skilland search; other revisions' skills and workflows are hidden; the live revision's skill directory is never usedChanges
capability-catalog.ts:CapabilitySource.platform,sessionCapabilityScope,liveSkillDirectoryScope; the inventory takes a scope.worker.ts: marks platform sources, stampscapabilitySourceIdon every agent copy, maps each skill directory to its source, forwards the scope to_getBaseV2SkillDirectories, exposes installed pinned sources.session-manager.ts: one scope per turn for the index, theload_skillcatalog and the CLI skill directories; the catalog uses the same turn snapshot; the dehydrate-retry handle builds no catalog.managed-session.ts:load_skillnames only listed skills on a miss and points tosearch_capabilities(V2 only).base-v2.md,docs/developer/building/plugins.md,CHANGELOG.md.Tests
New tests fail on
24bdf9082and pass on this branch:test/local/base-agent-policy-adversarial.test.js(issue Base V2 capability index lists every static and owner package regardless of the session's agent (no scoping, duplicate copies, ~15K tokens per call) #442 block, real turn path): bound scope, unbound one-copy dedup, unknown own package, pinned skill-only revision with a competing live revision, another publisher's package vs a deployment skill.test/unit/capability-worker-registry-adversarial.test.mjs: platform flags,capabilitySourceId, the productiongetBaseV2SkillDirectoriescallback with a foreign private package, pinned revision matching.test/unit/workflow-skills-load-skill.test.mjs: Workflow skills load by name; named on a miss only where Workflows are on.An independent GPT-6.2 review ran four rounds; every blocker and major finding is fixed.
All-providers run
./scripts/run-tests.sh --all-providerson tree6c776e526ccf(the commitdc245a390681of this PR), builderpse-devws2(PG16 local, live HorizonDBwdmchk-pse-hdb1, westus3), 3 parallel SDK files, modelazure-openai:gpt-5.6-sol. Finished 2026-12-02 09:47Z.node --test)Every failure was rerun on base
24bdf9082and on this branch. None is caused by this change.MODEL_HTTP_429AccessShareLockrace on HorizonDBCREATE INDEX CONCURRENTLYGitHub PR checks: pass.
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com