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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

2778 );
2779
2780 const connectionsRefresh = (
2781 ref: ConnectionRef,
2782 ): Effect.Effect<
2783 readonly Tool[],
2784 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
2785 > =>
2786 Effect.gen(function* () {
2787 const row = yield* findConnectionRow(ref);
2788 if (!row) {
2789 return yield* new ConnectionNotFoundError({
2790 owner: ref.owner,
2791 integration: ref.integration,
2792 name: ref.name,
2793 });
2794 }
2795 const integrationRow = yield* findIntegrationRow(ref.integration);
2796 if (!integrationRow) {
2797 return yield* new IntegrationNotFoundError({ slug: ref.integration });
2798 }
2799 return yield* produceConnectionTools(integrationRow, ref);
2800 });
2801
2802 // No health-check capability ⇒ "unknown" rather than an error: the caller
2803 // 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