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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

3562 );
3563
3564 const connectionsRefresh = (
3565 ref: ConnectionRef,
3566 ): Effect.Effect<
3567 readonly Tool[],
3568 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
3569 > =>
3570 Effect.gen(function* () {
3571 const row = yield* findConnectionRow(ref);
3572 if (!row) {
3573 return yield* new ConnectionNotFoundError({
3574 owner: ref.owner,
3575 integration: ref.integration,
3576 name: ref.name,
3577 });
3578 }
3579 const integrationRow = yield* findIntegrationRow(ref.integration);
3580 if (!integrationRow) {
3581 return yield* new IntegrationNotFoundError({ slug: ref.integration });
3582 }
3583 return yield* produceConnectionTools(integrationRow, ref);
3584 });
3585
3586 // No health-check capability ⇒ "unknown" rather than an error: the caller
3587 // 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