MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / classifyBindingSlot

Function classifyBindingSlot

packages/core/sdk/src/migration-spec.ts:691–703  ·  view source on GitHub ↗
(slotKey: string)

Source from the content-addressed store, hash-verified

689 * `kind=connection` binding, not a secret; classified oauth-access for the rare
690 * cases it is secret-backed). */
691export const classifyBindingSlot = (slotKey: string): SecretRole => {
692 if (slotKey.includes("client-secret")) return "client-secret";
693 if (slotKey.includes("client-id")) return "client-id";
694 if (
695 slotKey.startsWith("header:") ||
696 slotKey.startsWith("query_param:") ||
697 slotKey.startsWith("spec_fetch_header:")
698 ) {
699 return "apikey";
700 }
701 if (slotKey.endsWith(":connection")) return "oauth-access";
702 return "apikey";
703};
704
705const isOAuthClientCredentialSlot = (slotKey: string): boolean =>
706 slotKey.startsWith("oauth2:") &&

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected