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

Function registerCredentialProvider

packages/core/sdk/src/executor.ts:2168–2184  ·  view source on GitHub ↗
(
      provider: CredentialProvider,
      sourceLabel: string,
    )

Source from the content-addressed store, hash-verified

2166 };
2167
2168 const registerCredentialProvider = (
2169 provider: CredentialProvider,
2170 sourceLabel: string,
2171 ): Effect.Effect<void, StorageFailure> => {
2172 const key = String(provider.key);
2173 if (credentialProviders.has(key)) {
2174 return Effect.fail(
2175 new StorageError({
2176 message: `Duplicate credential provider key: ${key} (from ${sourceLabel})`,
2177 cause: undefined,
2178 }),
2179 );
2180 }
2181 credentialProviders.set(key, boundedProvider(provider, key));
2182 credentialProviderOrder.push(key);
2183 return Effect.void;
2184 };
2185
2186 // Config-level providers register first so the default store prefers them.
2187 for (const provider of config.providers ?? []) {

Callers 1

createExecutorFunction · 0.85

Calls 3

boundedProviderFunction · 0.85
pushMethod · 0.80
setMethod · 0.65

Tested by

no test coverage detected