Skip to content

isKnownRepoAuthScope

isKnownRepoAuthScope(value): value is “repo:read” | “repo:checkpoint-read” | “repo:checkpoint-generate” | “repo:write” | “repo:configure” | “repo:admin” | “repo:action-callback”

Is value one of the repo scopes this build knows about?

The access.resolve response types scopes as an open string (openVocabulary(REPO_AUTH_SCOPES)), so a client can receive a scope minted by a newer backend. This guard is how a caller that wants to distinguish known from unknown values does so; it is documentation plus a narrowing helper, never a validation gate on a response. Server-side validation of a requested scope stays closed — see VALID_SCOPES in @warmhub/backend/token/scope-constants.

string

value is “repo:read” | “repo:checkpoint-read” | “repo:checkpoint-generate” | “repo:write” | “repo:configure” | “repo:admin” | “repo:action-callback”