MCPcopy
hub / github.com/rohitg00/agentmemory / wire

Function wire

test/slots.test.ts:26–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24}
25
26function wire() {
27 const kv = mockKV();
28 const handlers: Record<string, (data: Record<string, unknown>) => Promise<Record<string, unknown>>> = {};
29 const sdk = {
30 registerFunction: vi.fn((id: string, cb) => {
31 handlers[id] = cb;
32 }),
33 } as unknown as import("iii-sdk").ISdk;
34 registerSlotsFunctions(sdk, kv as never);
35 return { kv, handlers };
36}
37
38async function waitForSeed(kv: ReturnType<typeof mockKV>) {
39 for (let i = 0; i < 20; i++) {

Callers 1

slots.test.tsFile · 0.85

Calls 2

registerSlotsFunctionsFunction · 0.85
mockKVFunction · 0.70

Tested by

no test coverage detected