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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

2679 );
2680
2681 const connectionsRefresh = (
2682 ref: ConnectionRef,
2683 ): Effect.Effect<
2684 readonly Tool[],
2685 ConnectionNotFoundError | IntegrationNotFoundError | StorageFailure
2686 > =>
2687 Effect.gen(function* () {
2688 const row = yield* findConnectionRow(ref);
2689 if (!row) {
2690 return yield* new ConnectionNotFoundError({
2691 owner: ref.owner,
2692 integration: ref.integration,
2693 name: ref.name,
2694 });
2695 }
2696 const integrationRow = yield* findIntegrationRow(ref.integration);
2697 if (!integrationRow) {
2698 return yield* new IntegrationNotFoundError({ slug: ref.integration });
2699 }
2700 return yield* produceConnectionTools(integrationRow, ref);
2701 });
2702
2703 // No health-check capability ⇒ "unknown" rather than an error: the caller
2704 // 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