feat: TangleAppsClient — self-service brokered hub-exec client#73
Merged
Conversation
Adds the self-service external-apps client to the integrations/hub SDK, next to TangleIntegrationsClient: register an app (registerApp), mint short-lived sk-tan-broker- tokens unattended against a durable consented grant (mintBrokerToken), exchange the one-time consent code (exchangeAuthCode), list/revoke. The operator-allowlist-free (no TRUSTED_APPS) path any external developer uses to integrate the hub. Mirrors TangleIntegrationsClient (endpoint + fetchImpl seam, createTangle*Client factory, IntegrationRuntimeError surface; BROKER_DISABLED → passthrough_disabled; flat OAuth token endpoint handled). 5 tests; typecheck + build clean. This is the canonical home — supersedes the draft in agent-runtime (PR closed).
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.
Adds
TangleAppsClientto the integrations/hub SDK, alongsideTangleIntegrationsClient— the natural home for the self-service external-apps / brokered-hub-exec flow (this is the hub SDK).registerApp(one-time, owner bearer) → client_id + once-shown client_secretmintBrokerToken— durable, app-creds-only re-mint of single-usesk-tan-broker-tokens for/v1/hub/exec(no user session per call)exchangeAuthCode— first token from the one-time consentagc_codelistApps/revokeAppMirrors
TangleIntegrationsClientexactly (endpoint+fetchImpl,createTangle*Clientfactory,IntegrationRuntimeErrorsurface;BROKER_DISABLED→passthrough_disabled). 5 tests; typecheck + build clean.Supersedes agent-runtime #118 (wrong home — that was a stopgap). Pairs with agent-dev-container #1636 (
sk-tan-broker-prefix).