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

Function resolveInFlightValues

packages/core/sdk/src/executor.ts:3154–3174  ·  view source on GitHub ↗
(
      input: ConnectionValueInput,
    )

Source from the content-addressed store, hash-verified

3152 // pasted `value`/`values` are used directly; `from` origins resolve through
3153 // their provider. Single-secret sugar lands on the `token` variable.
3154 const resolveInFlightValues = (
3155 input: ConnectionValueInput,
3156 ): Effect.Effect<Record<string, string | null>, StorageFailure> =>
3157 Effect.gen(function* () {
3158 const out: Record<string, string | null> = {};
3159 for (const { variable, origin } of normalizeConnectionInputs(input)) {
3160 if ("value" in origin) {
3161 out[variable] = origin.value;
3162 continue;
3163 }
3164 const provider = credentialProviders.get(String(origin.from.provider));
3165 if (!provider) {
3166 return yield* new StorageError({
3167 message: `Credential provider "${origin.from.provider}" is not registered.`,
3168 cause: undefined,
3169 });
3170 }
3171 out[variable] = yield* provider.get(origin.from.id);
3172 }
3173 return out;
3174 });
3175
3176 /** Stamp the verdict + which path produced it onto the enclosing health
3177 * span. Every health outcome is HTTP 200, so WITHOUT these attributes the

Callers 1

connectionValidateFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected