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

Function connectionsRefresh

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

Source from the content-addressed store, hash-verified

4750 );
4751
4752 const connectionsRefresh = (
4753 ref: ConnectionRef,
4754 ): Effect.Effect<
4755 readonly Tool[],
4756 ConnectionNotFoundError | IntegrationNotFoundError | OrgWriteDeniedError | StorageFailure
4757 > =>
4758 Effect.gen(function* () {
4759 yield* guardOrgWrite(ref.owner);
4760 const row = yield* findConnectionRow(ref);
4761 if (!row) {
4762 return yield* new ConnectionNotFoundError({
4763 owner: ref.owner,
4764 integration: ref.integration,
4765 name: ref.name,
4766 });
4767 }
4768 const integrationRow = yield* findIntegrationRow(ref.integration);
4769 if (!integrationRow) {
4770 return yield* new IntegrationNotFoundError({ slug: ref.integration });
4771 }
4772 return yield* produceConnectionTools(integrationRow, ref);
4773 });
4774
4775 // No health-check capability ⇒ "unknown" rather than an error: the caller
4776 // 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