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

Function invokeDownloadsCode

e2e/scenarios/no-auth-connection.test.ts:110–118  ·  view source on GitHub ↗
(slug: string)

Source from the content-addressed store, hash-verified

108`;
109
110const invokeDownloadsCode = (slug: string) => `
111const found = await tools.search({ namespace: ${JSON.stringify(slug)}, query: "downloads", limit: 5 });
112const path = found.items[0]?.path;
113if (!path) return { ok: false, error: "no downloads tool found", items: found.items };
114let t = tools;
115for (const seg of path.split(".")) t = t[seg];
116const result = await t({ period: "last-week", package: "react" });
117return { ok: result.ok, path, data: result.ok ? result.data : result.error };
118`;
119
120const removeConnectionsCode = (slug: string) => `
121const list = await tools.executor.coreTools.connections.list({});

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected