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

Function resolveInFlightValues

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

Source from the content-addressed store, hash-verified

2599 // pasted `value`/`values` are used directly; `from` origins resolve through
2600 // their provider. Single-secret sugar lands on the `token` variable.
2601 const resolveInFlightValues = (
2602 input: ConnectionValueInput,
2603 ): Effect.Effect<Record<string, string | null>, StorageFailure> =>
2604 Effect.gen(function* () {
2605 const out: Record<string, string | null> = {};
2606 for (const { variable, origin } of normalizeConnectionInputs(input)) {
2607 if ("value" in origin) {
2608 out[variable] = origin.value;
2609 continue;
2610 }
2611 const provider = credentialProviders.get(String(origin.from.provider));
2612 if (!provider) {
2613 return yield* new StorageError({
2614 message: `Credential provider "${origin.from.provider}" is not registered.`,
2615 cause: undefined,
2616 });
2617 }
2618 out[variable] = yield* provider.get(origin.from.id);
2619 }
2620 return out;
2621 });
2622
2623 const connectionCheckHealth = (
2624 ref: ConnectionRef,

Callers 1

connectionValidateFunction · 0.85

Calls 2

getMethod · 0.65

Tested by

no test coverage detected