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

Function resolveInFlightValues

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

Source from the content-addressed store, hash-verified

5060 // pasted `value`/`values` are used directly; `from` origins resolve through
5061 // their provider. Single-secret sugar lands on the `token` variable.
5062 const resolveInFlightValues = (
5063 input: ConnectionValueInput,
5064 ): Effect.Effect<Record<string, string | null>, StorageFailure> =>
5065 Effect.gen(function* () {
5066 const out: Record<string, string | null> = {};
5067 for (const { variable, origin } of normalizeConnectionInputs(input)) {
5068 if ("value" in origin) {
5069 out[variable] = origin.value;
5070 continue;
5071 }
5072 const provider = credentialProviders.get(String(origin.from.provider));
5073 if (!provider) {
5074 return yield* new StorageError({
5075 message: `Credential provider "${origin.from.provider}" is not registered.`,
5076 cause: undefined,
5077 });
5078 }
5079 out[variable] = yield* provider.get(origin.from.id);
5080 }
5081 return out;
5082 });
5083
5084 /** Stamp the verdict + which path produced it onto the enclosing health
5085 * 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