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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

3155 );
3156
3157 const connectionsRefresh = (
3158 ref: ConnectionRef,
3159 ): Effect.Effect<
3160 readonly Tool[],
3161 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
3162 > =>
3163 Effect.gen(function* () {
3164 const row = yield* findConnectionRow(ref);
3165 if (!row) {
3166 return yield* new ConnectionNotFoundError({
3167 owner: ref.owner,
3168 integration: ref.integration,
3169 name: ref.name,
3170 });
3171 }
3172 const integrationRow = yield* findIntegrationRow(ref.integration);
3173 if (!integrationRow) {
3174 return yield* new IntegrationNotFoundError({ slug: ref.integration });
3175 }
3176 return yield* produceConnectionTools(integrationRow, ref);
3177 });
3178
3179 // No health-check capability ⇒ "unknown" rather than an error: the caller
3180 // 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