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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

4300 );
4301
4302 const connectionsRefresh = (
4303 ref: ConnectionRef,
4304 ): Effect.Effect<
4305 readonly Tool[],
4306 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
4307 > =>
4308 Effect.gen(function* () {
4309 const row = yield* findConnectionRow(ref);
4310 if (!row) {
4311 return yield* new ConnectionNotFoundError({
4312 owner: ref.owner,
4313 integration: ref.integration,
4314 name: ref.name,
4315 });
4316 }
4317 const integrationRow = yield* findIntegrationRow(ref.integration);
4318 if (!integrationRow) {
4319 return yield* new IntegrationNotFoundError({ slug: ref.integration });
4320 }
4321 return yield* produceConnectionTools(integrationRow, ref);
4322 });
4323
4324 // No health-check capability ⇒ "unknown" rather than an error: the caller
4325 // 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