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

Function resolveInFlightValues

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

Source from the content-addressed store, hash-verified

3233 // pasted `value`/`values` are used directly; `from` origins resolve through
3234 // their provider. Single-secret sugar lands on the `token` variable.
3235 const resolveInFlightValues = (
3236 input: ConnectionValueInput,
3237 ): Effect.Effect<Record<string, string | null>, StorageFailure> =>
3238 Effect.gen(function* () {
3239 const out: Record<string, string | null> = {};
3240 for (const { variable, origin } of normalizeConnectionInputs(input)) {
3241 if ("value" in origin) {
3242 out[variable] = origin.value;
3243 continue;
3244 }
3245 const provider = credentialProviders.get(String(origin.from.provider));
3246 if (!provider) {
3247 return yield* new StorageError({
3248 message: `Credential provider "${origin.from.provider}" is not registered.`,
3249 cause: undefined,
3250 });
3251 }
3252 out[variable] = yield* provider.get(origin.from.id);
3253 }
3254 return out;
3255 });
3256
3257 /** Stamp the verdict + which path produced it onto the enclosing health
3258 * 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