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

Function resolveInFlightValues

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

Source from the content-addressed store, hash-verified

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