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

Function forceRefreshConnectionValues

packages/core/sdk/src/executor.ts:2857–2869  ·  view source on GitHub ↗
(
      row: ConnectionRow,
    )

Source from the content-addressed store, hash-verified

2855 * not OAuth-backed, or holding no refresh token — so the caller keeps the
2856 * upstream's own auth failure instead of inventing one. */
2857 const forceRefreshConnectionValues = (
2858 row: ConnectionRow,
2859 ): Effect.Effect<
2860 Record<string, string | null> | null,
2861 StorageFailure | CredentialResolutionError
2862 > =>
2863 Effect.gen(function* () {
2864 if (row.oauth_client == null || row.refresh_item_id == null) return null;
2865 const provider = credentialProviders.get(row.provider);
2866 if (!provider) return null;
2867 const access = yield* refreshConnectionToken(row, provider, "reactive");
2868 return { [PRIMARY_INPUT_VARIABLE]: access };
2869 });
2870
2871 /** The primary (`token`) value — the public seam for OAuth + single-input
2872 * callers that only ever need one value. */

Callers 1

executeFunction · 0.85

Calls 2

refreshConnectionTokenFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected