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

Function requireConnection

packages/plugins/toolkits/src/server.ts:294–303  ·  view source on GitHub ↗
(toolkitId: string, connectionId: string, owner: Owner)

Source from the content-addressed store, hash-verified

292 );
293
294 const requireConnection = (toolkitId: string, connectionId: string, owner: Owner) =>
295 storage.connections
296 .getForOwner({ owner, key: connectionId })
297 .pipe(
298 Effect.flatMap((entry) =>
299 entry && entry.data.toolkitId === toolkitId
300 ? Effect.succeed(entry)
301 : fail("Toolkit connection not found."),
302 ),
303 );
304
305 const create = (input: {
306 readonly owner: Owner;

Callers 1

removeConnectionFunction · 0.85

Calls 1

failFunction · 0.70

Tested by

no test coverage detected