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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

3201 );
3202
3203 const connectionsRefresh = (
3204 ref: ConnectionRef,
3205 ): Effect.Effect<
3206 readonly Tool[],
3207 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
3208 > =>
3209 Effect.gen(function* () {
3210 const row = yield* findConnectionRow(ref);
3211 if (!row) {
3212 return yield* new ConnectionNotFoundError({
3213 owner: ref.owner,
3214 integration: ref.integration,
3215 name: ref.name,
3216 });
3217 }
3218 const integrationRow = yield* findIntegrationRow(ref.integration);
3219 if (!integrationRow) {
3220 return yield* new IntegrationNotFoundError({ slug: ref.integration });
3221 }
3222 return yield* produceConnectionTools(integrationRow, ref);
3223 });
3224
3225 // No health-check capability ⇒ "unknown" rather than an error: the caller
3226 // 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