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

Function registerIntegration

e2e/cloud/admin-users.test.ts:55–73  ·  view source on GitHub ↗
(client: Client)

Source from the content-addressed store, hash-verified

53
54/** Registers a fresh apiKey-authenticated integration for connections to bind to. */
55const registerIntegration = (client: Client) =>
56 Effect.gen(function* () {
57 const slug = IntegrationSlug.make(`admin-scn-${randomBytes(4).toString("hex")}`);
58 yield* client.openapi.addSpec({
59 payload: {
60 spec: { kind: "blob", value: pingSpec },
61 slug,
62 baseUrl: "http://127.0.0.1:59999", // never contacted during registration
63 authenticationTemplate: [
64 {
65 slug: "apiKey",
66 type: "apiKey",
67 headers: { authorization: ["Bearer ", { type: "variable", name: "token" }] },
68 },
69 ],
70 },
71 });
72 return slug;
73 });
74
75const freshConnectionName = () => ConnectionName.make(`conn${randomBytes(4).toString("hex")}`);
76

Callers 2

AddMcpIntegrationFunction · 0.50

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected