Repository navigation
feat(daemon): add batch extension activation APIs #8788
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 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
e64cc42
feat(daemon): add batch extension activation APIs
callmeYe a0f76aa
fix(daemon): focus extension batch API on V2
callmeYe 7813909
fix(sdk): export extension batch types
callmeYe e330112
fix(core): reject empty extension batches
callmeYe 62b3bcb
test(extensions): strengthen batch regression fences
callmeYe 8cd11d5
feat(extensions): allow batch activation declarations
callmeYe 77fd532
fix(extensions): preserve legacy activation declarations
callmeYe 17efbcb
fix(extensions): reject ambiguous legacy identities
callmeYe 2577645
fix(extensions): preserve batch activation lifecycle
callmeYe 31ee0e3
feat(extensions): key batch activation by name
callmeYe b9cb38d
fix(extensions): harden batch activation lifecycle
callmeYe 6114a01
Merge remote-tracking branch 'origin/main' into codex/batch-extension…
callmeYe 7199382
fix(extensions): preserve declared activation lifecycle
callmeYe 71bea4d
fix(extensions): reconcile renamed and legacy policies
callmeYe 476cd59
fix(extensions): preserve renamed artifact lifecycle
callmeYe f6b0d94
fix(extensions): validate persisted artifact paths
callmeYe f6b6f69
fix(extensions): preserve re-keyed artifact directory
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,50 @@ | ||
| # Daemon Extension Batch Activation | ||
|
|
||
| ## Context | ||
|
|
||
| Extension Management V2 separates global default activation from exact | ||
| workspace overrides. Its singular global route writes `defaultActivation` by | ||
| stable Extension id and refreshes every runtime. Its singular workspace routes | ||
| write or clear an override for a selected trusted runtime and refresh only that | ||
| runtime. | ||
|
|
||
| Remote clients currently repeat those singular operations when toggling several | ||
| Extensions. The legacy `/workspace/extensions/*` compatibility surface has | ||
| different semantics: user scope writes a home-level path rule and workspace | ||
| scope is bound to the primary workspace. A batch route on that surface alone | ||
| therefore cannot optimize V2 clients. | ||
|
|
||
| ## V2 contract | ||
|
|
||
| Add `extension_batch_activation_v2` as an independent capability so clients can | ||
| distinguish older `extension_management_v2` daemons. It exposes two queued | ||
| operations: | ||
|
|
||
| ```text | ||
| PUT /extensions/activation | ||
| PUT /workspaces/:workspace/extensions/activation | ||
| ``` | ||
|
|
||
| Both accept 1–100 stable `extensionIds`, deduplicate them in request order, and | ||
| return one Extension operation id. The global body accepts `state` as `enabled` | ||
| or `disabled` and writes every valid target's `defaultActivation`. The workspace | ||
| body also accepts `inherit`; it clears each valid target's exact override using | ||
| the same legacy-rule masking semantics as the singular DELETE route. | ||
|
|
||
| Malformed ids or state reject the request before queueing. A well-formed but | ||
| missing id is a per-target `extension_not_found` error and does not block valid | ||
| targets. Successful global results report the resulting default activation. | ||
| Successful workspace results report the exact override (`null` for inherit) and | ||
| effective activation. | ||
|
|
||
| ## Persistence and ownership | ||
|
|
||
| All valid targets are resolved from one loaded-Extension snapshot and written | ||
| under one Extension Store lock, producing one generation. The manager applies | ||
| that snapshot and refreshes its tool cache once. | ||
|
|
||
| The global batch is process-global: it refreshes all registered runtimes. The | ||
| workspace batch is selected-runtime scoped: it resolves the exact workspace id | ||
| or canonical path, requires that runtime to be trusted and open, writes only its | ||
| canonical workspace override, and refreshes only that runtime. It never falls | ||
| back to the primary runtime. |
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.