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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

4864 );
4865
4866 const connectionsRefresh = (
4867 ref: ConnectionRef,
4868 ): Effect.Effect<
4869 readonly Tool[],
4870 ConnectionNotFoundError | IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure
4871 > =>
4872 Effect.gen(function* () {
4873 yield* guardOrgWrite(ref.owner);
4874 const row = yield* findConnectionRow(ref);
4875 if (!row) {
4876 return yield* new ConnectionNotFoundError({
4877 owner: ref.owner,
4878 integration: ref.integration,
4879 name: ref.name,
4880 });
4881 }
4882 const integrationRow = yield* findIntegrationRow(ref.integration);
4883 if (!integrationRow) {
4884 return yield* new IntegrationNotFoundError({ slug: ref.integration });
4885 }
4886 return yield* produceConnectionTools(integrationRow, ref);
4887 });
4888
4889 // No health-check capability ⇒ "unknown" rather than an error: the caller
4890 // can still render the connection, just without a liveness verdict.

Callers 1

createExecutorFunction · 0.85

Calls 4

guardOrgWriteFunction · 0.85
findConnectionRowFunction · 0.85
findIntegrationRowFunction · 0.85
produceConnectionToolsFunction · 0.85

Tested by

no test coverage detected