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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

3055 );
3056
3057 const connectionsRefresh = (
3058 ref: ConnectionRef,
3059 ): Effect.Effect<
3060 readonly Tool[],
3061 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
3062 > =>
3063 Effect.gen(function* () {
3064 const row = yield* findConnectionRow(ref);
3065 if (!row) {
3066 return yield* new ConnectionNotFoundError({
3067 owner: ref.owner,
3068 integration: ref.integration,
3069 name: ref.name,
3070 });
3071 }
3072 const integrationRow = yield* findIntegrationRow(ref.integration);
3073 if (!integrationRow) {
3074 return yield* new IntegrationNotFoundError({ slug: ref.integration });
3075 }
3076 return yield* produceConnectionTools(integrationRow, ref);
3077 });
3078
3079 // No health-check capability ⇒ "unknown" rather than an error: the caller
3080 // 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