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

Function invokeCtx

packages/plugins/apps/src/plugin/apps-plugin.test.ts:246–269  ·  view source on GitHub ↗
(input: {
  readonly bundle: string;
  readonly bundleKey?: string;
  readonly execute: (address: string, args: unknown) => Effect.Effect<unknown, unknown>;
})

Source from the content-addressed store, hash-verified

244});
245
246const invokeCtx = (input: {
247 readonly bundle: string;
248 readonly bundleKey?: string;
249 readonly execute: (address: string, args: unknown) => Effect.Effect<unknown, unknown>;
250}) =>
251 ({
252 owner: { tenant: "tenant-a", subject: null },
253 storage: makeInvokeStore({
254 bundle: input.bundle,
255 ...(input.bundleKey ? { bundleKey: input.bundleKey } : {}),
256 integrations: { crm: { slug: "dealcloud", mode: "one" } },
257 }),
258 connections: {
259 list: () => Effect.succeed([]),
260 get: () =>
261 Effect.succeed({
262 address: "tools.dealcloud.org.main",
263 integration: "dealcloud",
264 owner: "org",
265 name: "main",
266 }),
267 },
268 execute: (address: string, args: unknown) => input.execute(String(address), args),
269 }) as never;
270
271describe("apps plugin schema projection", () => {
272 it.effect("narrows synthesized integration fields to connection address enums", () =>

Callers 1

Calls 2

makeInvokeStoreFunction · 0.85
executeMethod · 0.65

Tested by

no test coverage detected