Add secret/connection usages SDK surface#516
Open
RhysSullivan wants to merge 1 commit intomainfrom
Open
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | d488f51 | Commit Preview URL Branch Preview URL |
May 04 2026, 07:51 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-cloud | d488f51 | May 04 2026, 07:51 PM |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/storage-core
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-google-discovery
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
This was referenced May 4, 2026
Owner
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Plugins gain optional `usagesForSecret` / `usagesForConnection` callbacks that the executor fans out across via `executor.secrets.usages(id)` and `executor.connections.usages(id)`. Secret/connection removal is now RESTRICT — refuses with `SecretInUseError` / `ConnectionInUseError` when any plugin reports the id as in use, surfacing the count to the caller. API gains GET `/secrets/:id/usages` and `/connections/:id/usages` endpoints. React atoms and a small "Used by …" footer on each row in the Secrets and Connections tabs round out the surface. No plugin implements `usagesForSecret`/`usagesForConnection` yet, so the footer renders nothing and remove still succeeds for everything. Plugin migration lands in follow-up commits.
e0a2079 to
d488f51
Compare
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.

Summary
usagesForSecret/usagesForConnectioncallbacks. The executor fans out across them viaexecutor.secrets.usages(id)/executor.connections.usages(id), returning a flat list ofUsagerows that describe where a given secret or connection is referenced.secrets.remove/connections.removeare now RESTRICT — they refuse withSecretInUseError/ConnectionInUseErrorwhen any plugin reports the id as in use, surfacing the count to the caller.GET /scopes/:scopeId/secrets/:secretId/usagesand the connection equivalent. React atoms + a "Used by …" footer on each row in the Secrets and Connections tabs round out the surface.No plugin implements
usagesFor*yet, so the footer is empty everywhere and remove still succeeds for everything. This is the foundation for follow-up commits that move secret/connection refs out of plugin-private JSON columns into normalized columns/child tables; once those land, the footer populates and remove starts blocking real usages.Test plan
bunx --bun turbo typecheck --filter='!@executor-js/local'— 33/33 packages cleanbunx --bun vitest runin the SDK package — 172/172 pass