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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

2569 );
2570
2571 const connectionsRefresh = (
2572 ref: ConnectionRef,
2573 ): Effect.Effect<
2574 readonly Tool[],
2575 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
2576 > =>
2577 Effect.gen(function* () {
2578 const row = yield* findConnectionRow(ref);
2579 if (!row) {
2580 return yield* new ConnectionNotFoundError({
2581 owner: ref.owner,
2582 integration: ref.integration,
2583 name: ref.name,
2584 });
2585 }
2586 const integrationRow = yield* findIntegrationRow(ref.integration);
2587 if (!integrationRow) {
2588 return yield* new IntegrationNotFoundError({ slug: ref.integration });
2589 }
2590 return yield* produceConnectionTools(integrationRow, ref);
2591 });
2592
2593 // No health-check capability ⇒ "unknown" rather than an error: the caller
2594 // 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