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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

4856 );
4857
4858 const connectionsRefresh = (
4859 ref: ConnectionRef,
4860 ): Effect.Effect<
4861 readonly Tool[],
4862 ConnectionNotFoundError | IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure
4863 > =>
4864 Effect.gen(function* () {
4865 yield* guardOrgWrite(ref.owner);
4866 const row = yield* findConnectionRow(ref);
4867 if (!row) {
4868 return yield* new ConnectionNotFoundError({
4869 owner: ref.owner,
4870 integration: ref.integration,
4871 name: ref.name,
4872 });
4873 }
4874 const integrationRow = yield* findIntegrationRow(ref.integration);
4875 if (!integrationRow) {
4876 return yield* new IntegrationNotFoundError({ slug: ref.integration });
4877 }
4878 return yield* produceConnectionTools(integrationRow, ref);
4879 });
4880
4881 // No health-check capability ⇒ "unknown" rather than an error: the caller
4882 // 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