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

Function resolveInFlightValues

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

Source from the content-addressed store, hash-verified

2776 // pasted `value`/`values` are used directly; `from` origins resolve through
2777 // their provider. Single-secret sugar lands on the `token` variable.
2778 const resolveInFlightValues = (
2779 input: ConnectionValueInput,
2780 ): Effect.Effect<Record<string, string | null>, StorageFailure> =>
2781 Effect.gen(function* () {
2782 const out: Record<string, string | null> = {};
2783 for (const { variable, origin } of normalizeConnectionInputs(input)) {
2784 if ("value" in origin) {
2785 out[variable] = origin.value;
2786 continue;
2787 }
2788 const provider = credentialProviders.get(String(origin.from.provider));
2789 if (!provider) {
2790 return yield* new StorageError({
2791 message: `Credential provider "${origin.from.provider}" is not registered.`,
2792 cause: undefined,
2793 });
2794 }
2795 out[variable] = yield* provider.get(origin.from.id);
2796 }
2797 return out;
2798 });
2799
2800 const connectionCheckHealth = (
2801 ref: ConnectionRef,

Callers 1

connectionValidateFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected