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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

3136 );
3137
3138 const connectionsRefresh = (
3139 ref: ConnectionRef,
3140 ): Effect.Effect<
3141 readonly Tool[],
3142 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
3143 > =>
3144 Effect.gen(function* () {
3145 const row = yield* findConnectionRow(ref);
3146 if (!row) {
3147 return yield* new ConnectionNotFoundError({
3148 owner: ref.owner,
3149 integration: ref.integration,
3150 name: ref.name,
3151 });
3152 }
3153 const integrationRow = yield* findIntegrationRow(ref.integration);
3154 if (!integrationRow) {
3155 return yield* new IntegrationNotFoundError({ slug: ref.integration });
3156 }
3157 return yield* produceConnectionTools(integrationRow, ref);
3158 });
3159
3160 // No health-check capability ⇒ "unknown" rather than an error: the caller
3161 // 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