MCPcopy Create free account
hub / github.com/CreminiAI/skillpack / find

Function find

tests/agent.test.ts:36–59  ·  view source on GitHub ↗
(provider, modelId)

Source from the content-addressed store, hash-verified

34 assert.deepEqual(model.headers, { "X-Existing": "kept" });
35});
36
37test("handleMessage forwards the final agent_end after an automatic retry", async () => {
38 const rootDir = fs.mkdtempSync(path.join(os.tmpdir(), "skillpack-agent-"));
39 const listeners = new Set<(event: { type: string }) => void>();
40 const session = {
41 _agentEventQueue: Promise.resolve(),
42 state: { messages: [] },
43 systemPrompt: "",
44 subscribe(listener: (event: { type: string }) => void) {
45 listeners.add(listener);
46 return () => listeners.delete(listener);
47 },
48 async prompt() {
49 for (const type of [
50 "agent_start",
51 "agent_end",
52 "agent_start",
53 "agent_end",
54 ]) {
55 for (const listener of listeners) {
56 listener({ type });
57 }
58 }
59 },
60 };
61 const channelSession = {
62 session,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected