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

Function requireConnection

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

Source from the content-addressed store, hash-verified

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

Callers 1

removeConnectionFunction · 0.85

Calls 1

failFunction · 0.70

Tested by

no test coverage detected