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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

3779 );
3780
3781 const connectionsRefresh = (
3782 ref: ConnectionRef,
3783 ): Effect.Effect<
3784 readonly Tool[],
3785 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
3786 > =>
3787 Effect.gen(function* () {
3788 const row = yield* findConnectionRow(ref);
3789 if (!row) {
3790 return yield* new ConnectionNotFoundError({
3791 owner: ref.owner,
3792 integration: ref.integration,
3793 name: ref.name,
3794 });
3795 }
3796 const integrationRow = yield* findIntegrationRow(ref.integration);
3797 if (!integrationRow) {
3798 return yield* new IntegrationNotFoundError({ slug: ref.integration });
3799 }
3800 return yield* produceConnectionTools(integrationRow, ref);
3801 });
3802
3803 // No health-check capability ⇒ "unknown" rather than an error: the caller
3804 // 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