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

Function connectionsRefresh

packages/core/sdk/src/executor.ts:2697–2717  ·  view source on GitHub ↗
(
      ref: ConnectionRef,
    )

Source from the content-addressed store, hash-verified

2695 );
2696
2697 const connectionsRefresh = (
2698 ref: ConnectionRef,
2699 ): Effect.Effect<
2700 readonly Tool[],
2701 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
2702 > =>
2703 Effect.gen(function* () {
2704 const row = yield* findConnectionRow(ref);
2705 if (!row) {
2706 return yield* new ConnectionNotFoundError({
2707 owner: ref.owner,
2708 integration: ref.integration,
2709 name: ref.name,
2710 });
2711 }
2712 const integrationRow = yield* findIntegrationRow(ref.integration);
2713 if (!integrationRow) {
2714 return yield* new IntegrationNotFoundError({ slug: ref.integration });
2715 }
2716 return yield* produceConnectionTools(integrationRow, ref);
2717 });
2718
2719 // No health-check capability ⇒ "unknown" rather than an error: the caller
2720 // can still render the connection, just without a liveness verdict.

Callers 1

createExecutorFunction · 0.85

Calls 3

findConnectionRowFunction · 0.85
findIntegrationRowFunction · 0.85
produceConnectionToolsFunction · 0.85

Tested by

no test coverage detected