Repository navigation
feat(daemon): support local path extension installs #10131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
eb316e8
feat(daemon): support local path extension installs
callmeYe b0d1ace
test(cli): include local path install capability
callmeYe 61a1f25
test(daemon): strengthen local path install coverage
callmeYe 9ac5cab
fix(daemon): clarify local path rejection
callmeYe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| # Daemon Extension Local Path Installation | ||
|
|
||
| ## Problem | ||
|
|
||
| The CLI can install an Extension from a path on the daemon host, but the daemon | ||
| REST install routes reject the same source. Callers that already placed an | ||
| Extension on the daemon filesystem must therefore start a terminal command | ||
| instead of using the asynchronous Extension operation API. | ||
|
|
||
| ## Design | ||
|
|
||
| Allow an existing daemon-local path in the `source` field of both install | ||
| contracts: | ||
|
|
||
| - `POST /workspace/extensions/install` remains the primary-workspace | ||
| compatibility route and installs with user activation. | ||
| - `POST /extensions/install` remains the process-global V2 route and uses its | ||
| existing explicit user or workspace activation request. | ||
|
|
||
| No new route or SDK method is needed. `DaemonClient.installExtension()` and | ||
| `DaemonClient.installUserExtension()` already send the shared | ||
| `ExtensionInstallRequest.source` field and poll the existing operation model. | ||
| The accepted source set becomes Git, GitHub, npm, or a path that exists on the | ||
| daemon host and is classified as `local` by the existing source parser. | ||
|
|
||
| Local installation keeps the current CLI semantics: the Extension manager | ||
| copies the source into managed Extension storage rather than linking it. A | ||
| directory or a supported local archive path therefore uses the same parsing, | ||
| conversion, consent, staging, commit, and cleanup logic already exercised by | ||
| the CLI. The REST contract accepts only absolute local paths. This avoids | ||
| resolving a relative path against the daemon process working directory and | ||
| prevents an existing local `owner/repo` directory from shadowing a remote | ||
| GitHub shorthand. | ||
|
|
||
| Advertise `extension_local_path_install` so clients can distinguish daemons | ||
| that accept local paths from older daemons that reject them. The capability | ||
| covers both install routes; clients must still preflight | ||
| `extension_management_v2` before using the V2 route. | ||
|
|
||
| ## Security and failure behavior | ||
|
|
||
| - Existing bearer authentication, strict mutation gating, workspace trust, | ||
| client identity validation, explicit consent, operation admission, and | ||
| runtime reconciliation remain unchanged. | ||
| - The path is resolved and read by the daemon host, not the SDK caller. | ||
| - Relative local paths are rejected; callers must send an absolute path in the | ||
| daemon host's path syntax. | ||
| - A missing path is rejected before the legacy compatibility route queues an | ||
| operation. V2 preparation reports source parsing failures through the | ||
| existing operation status contract. | ||
| - Local sources do not accept URL credentials, `ref`, or `autoUpdate`. | ||
| Existing npm registry and activation validation remains authoritative. | ||
| - Installed metadata records the local source path, matching CLI behavior. | ||
|
|
||
| ## Test plan | ||
|
|
||
| - Verify the primary-workspace route queues an existing local path and prepares | ||
| it as `type: "local"`. | ||
| - Verify the V2 route queues the same source and preserves its explicit initial | ||
| activation. | ||
| - Verify missing local paths, explicit consent, client identity, workspace | ||
| trust, and unsupported remote source behavior remain unchanged. | ||
| - Verify `/capabilities` advertises `extension_local_path_install`. | ||
| - Install a minimal Extension from an absolute temporary directory through the | ||
| daemon, poll the operation to success, and confirm the installed catalog | ||
| entry. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.