feat(deps): install skill dependencies just-in-time (#621) - #651
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
luongnv89
deleted the
feat/621-install-skill-dependencies-just-in-time
branch
September 9, 2026 11:55
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.
Closes #621
Summary
ASM now lets a calling agent discover optional skill dependencies, acquire only the ones a run actually reaches, use a returned path immediately, and release that session afterward. Parent installation no longer installs optional dependents, and cleanup preserves anything that was already present.
Approach
Option 2 — Caller-owned temporary acquisition leases: add
asm deps discover|acquire|release|cleanuparound persistent session leases. The main agent owns try/finally control flow. ASM records ownership, returns a directly usableskillMdPath, and recovers only explicitly stale sessions later.Decision Record
asm getcleaned clones at request end rather than at the enclosing task boundary.Analyzed at:
feat/621-install-skill-dependencies-just-in-time@ b8ce73d (2026-09-09)Changes
src/dependency-leases.tssrc/commands/deps.tsdiscover,acquire,release, andcleanupcommandssrc/cli.tsdepsthrough existing CLI dispatchsrc/utils/frontmatter.tssrc/utils/types.tssrc/scanner.tssrc/installer-core.tssrc/commands/get.tssrc/formatter.ts/src/formatter-core.tssrc/config.tssrc/eval/providers/skill-best-practice/v1/index.tsREADME.mdskills/skill-creator/**skills/skill-auto-improver/**Test Results
Acceptance Criteria Verification
src/installer.test.tsparent-install cases;src/commands/install-run.tsstill installs only explicit skillssrc/dependency-leases.test.tsacquire returns readableskillMdPath;src/cli.test.tsdeps acquiresrc/dependency-leases.test.tsrelease removes only lease-owned artifactsfinally;asm deps cleanup --stale-beforerecovers explicitly stale sessions. ASM does not detect arbitrary caller failure.