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

Function resolveInFlightValues

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

Source from the content-addressed store, hash-verified

4500 // pasted `value`/`values` are used directly; `from` origins resolve through
4501 // their provider. Single-secret sugar lands on the `token` variable.
4502 const resolveInFlightValues = (
4503 input: ConnectionValueInput,
4504 ): Effect.Effect<Record<string, string | null>, StorageFailure> =>
4505 Effect.gen(function* () {
4506 const out: Record<string, string | null> = {};
4507 for (const { variable, origin } of normalizeConnectionInputs(input)) {
4508 if ("value" in origin) {
4509 out[variable] = origin.value;
4510 continue;
4511 }
4512 const provider = credentialProviders.get(String(origin.from.provider));
4513 if (!provider) {
4514 return yield* new StorageError({
4515 message: `Credential provider "${origin.from.provider}" is not registered.`,
4516 cause: undefined,
4517 });
4518 }
4519 out[variable] = yield* provider.get(origin.from.id);
4520 }
4521 return out;
4522 });
4523
4524 /** Stamp the verdict + which path produced it onto the enclosing health
4525 * 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