claude-code-swarm 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +22 -1
- package/.claude-plugin/run-agent-inbox-mcp.sh +76 -0
- package/.claude-plugin/run-minimem-mcp.sh +98 -0
- package/.claude-plugin/run-opentasks-mcp.sh +65 -0
- package/CLAUDE.md +200 -36
- package/README.md +65 -0
- package/e2e/helpers/cleanup.mjs +17 -3
- package/e2e/helpers/map-mock-server.mjs +201 -25
- package/e2e/helpers/sidecar.mjs +222 -0
- package/e2e/helpers/workspace.mjs +2 -1
- package/e2e/tier5-sidecar-inbox.test.mjs +900 -0
- package/e2e/tier6-inbox-mcp.test.mjs +173 -0
- package/e2e/tier6-live-agent.test.mjs +759 -0
- package/e2e/vitest.config.e2e.mjs +1 -1
- package/hooks/hooks.json +15 -8
- package/package.json +13 -1
- package/references/agent-inbox/CLAUDE.md +151 -0
- package/references/agent-inbox/README.md +238 -0
- package/references/agent-inbox/docs/CLAUDE-CODE-SWARM-PROPOSAL.md +137 -0
- package/references/agent-inbox/docs/DESIGN.md +1156 -0
- package/references/agent-inbox/hooks/inbox-hook.mjs +119 -0
- package/references/agent-inbox/hooks/register-hook.mjs +69 -0
- package/references/agent-inbox/package-lock.json +3347 -0
- package/references/agent-inbox/package.json +58 -0
- package/references/agent-inbox/rules/agent-inbox.md +78 -0
- package/references/agent-inbox/src/federation/address.ts +61 -0
- package/references/agent-inbox/src/federation/connection-manager.ts +573 -0
- package/references/agent-inbox/src/federation/delivery-queue.ts +222 -0
- package/references/agent-inbox/src/federation/index.ts +6 -0
- package/references/agent-inbox/src/federation/routing-engine.ts +188 -0
- package/references/agent-inbox/src/federation/trust.ts +71 -0
- package/references/agent-inbox/src/index.ts +390 -0
- package/references/agent-inbox/src/ipc/ipc-server.ts +207 -0
- package/references/agent-inbox/src/jsonrpc/mail-server.ts +382 -0
- package/references/agent-inbox/src/map/map-client.ts +414 -0
- package/references/agent-inbox/src/mcp/mcp-server.ts +272 -0
- package/references/agent-inbox/src/mesh/delivery-bridge.ts +110 -0
- package/references/agent-inbox/src/mesh/mesh-connector.ts +41 -0
- package/references/agent-inbox/src/mesh/mesh-transport.ts +157 -0
- package/references/agent-inbox/src/mesh/type-mapper.ts +239 -0
- package/references/agent-inbox/src/push/notifier.ts +233 -0
- package/references/agent-inbox/src/registry/warm-registry.ts +255 -0
- package/references/agent-inbox/src/router/message-router.ts +175 -0
- package/references/agent-inbox/src/storage/interface.ts +48 -0
- package/references/agent-inbox/src/storage/memory.ts +145 -0
- package/references/agent-inbox/src/storage/sqlite.ts +671 -0
- package/references/agent-inbox/src/traceability/traceability.ts +183 -0
- package/references/agent-inbox/src/types.ts +303 -0
- package/references/agent-inbox/test/federation/address.test.ts +101 -0
- package/references/agent-inbox/test/federation/connection-manager.test.ts +546 -0
- package/references/agent-inbox/test/federation/delivery-queue.test.ts +159 -0
- package/references/agent-inbox/test/federation/integration.test.ts +857 -0
- package/references/agent-inbox/test/federation/routing-engine.test.ts +117 -0
- package/references/agent-inbox/test/federation/sdk-integration.test.ts +744 -0
- package/references/agent-inbox/test/federation/trust.test.ts +89 -0
- package/references/agent-inbox/test/ipc-jsonrpc.test.ts +113 -0
- package/references/agent-inbox/test/ipc-server.test.ts +197 -0
- package/references/agent-inbox/test/mail-server.test.ts +285 -0
- package/references/agent-inbox/test/map-client.test.ts +408 -0
- package/references/agent-inbox/test/mesh/delivery-bridge.test.ts +178 -0
- package/references/agent-inbox/test/mesh/e2e-mesh.test.ts +527 -0
- package/references/agent-inbox/test/mesh/e2e-real-meshpeer.test.ts +629 -0
- package/references/agent-inbox/test/mesh/federation-mesh.test.ts +269 -0
- package/references/agent-inbox/test/mesh/mesh-connector.test.ts +66 -0
- package/references/agent-inbox/test/mesh/mesh-transport.test.ts +191 -0
- package/references/agent-inbox/test/mesh/meshpeer-integration.test.ts +442 -0
- package/references/agent-inbox/test/mesh/mock-mesh.ts +125 -0
- package/references/agent-inbox/test/mesh/mock-meshpeer.ts +266 -0
- package/references/agent-inbox/test/mesh/type-mapper.test.ts +226 -0
- package/references/agent-inbox/test/message-router.test.ts +184 -0
- package/references/agent-inbox/test/push-notifier.test.ts +139 -0
- package/references/agent-inbox/test/registry/warm-registry.test.ts +171 -0
- package/references/agent-inbox/test/sqlite-prefix.test.ts +192 -0
- package/references/agent-inbox/test/sqlite-storage.test.ts +243 -0
- package/references/agent-inbox/test/storage.test.ts +196 -0
- package/references/agent-inbox/test/traceability.test.ts +123 -0
- package/references/agent-inbox/test/wake.test.ts +330 -0
- package/references/agent-inbox/tsconfig.json +20 -0
- package/references/agent-inbox/tsup.config.ts +10 -0
- package/references/agent-inbox/vitest.config.ts +8 -0
- package/references/minimem/.claude/settings.json +7 -0
- package/references/minimem/.sudocode/issues.jsonl +18 -0
- package/references/minimem/.sudocode/specs.jsonl +1 -0
- package/references/minimem/CLAUDE.md +329 -0
- package/references/minimem/README.md +565 -0
- package/references/minimem/claude-plugin/.claude-plugin/plugin.json +10 -0
- package/references/minimem/claude-plugin/.mcp.json +7 -0
- package/references/minimem/claude-plugin/README.md +158 -0
- package/references/minimem/claude-plugin/commands/recall.md +47 -0
- package/references/minimem/claude-plugin/commands/remember.md +41 -0
- package/references/minimem/claude-plugin/hooks/__tests__/hooks.test.ts +272 -0
- package/references/minimem/claude-plugin/hooks/hooks.json +27 -0
- package/references/minimem/claude-plugin/hooks/session-end.sh +86 -0
- package/references/minimem/claude-plugin/hooks/session-start.sh +85 -0
- package/references/minimem/claude-plugin/skills/memory/SKILL.md +108 -0
- package/references/minimem/media/banner.png +0 -0
- package/references/minimem/package-lock.json +5373 -0
- package/references/minimem/package.json +76 -0
- package/references/minimem/scripts/postbuild.js +49 -0
- package/references/minimem/src/__tests__/edge-cases.test.ts +371 -0
- package/references/minimem/src/__tests__/errors.test.ts +265 -0
- package/references/minimem/src/__tests__/helpers.ts +199 -0
- package/references/minimem/src/__tests__/internal.test.ts +407 -0
- package/references/minimem/src/__tests__/knowledge-frontmatter.test.ts +148 -0
- package/references/minimem/src/__tests__/knowledge.test.ts +148 -0
- package/references/minimem/src/__tests__/minimem.integration.test.ts +1127 -0
- package/references/minimem/src/__tests__/session.test.ts +190 -0
- package/references/minimem/src/cli/__tests__/commands.test.ts +760 -0
- package/references/minimem/src/cli/__tests__/contained-layout.test.ts +286 -0
- package/references/minimem/src/cli/commands/__tests__/conflicts.test.ts +141 -0
- package/references/minimem/src/cli/commands/append.ts +76 -0
- package/references/minimem/src/cli/commands/config.ts +262 -0
- package/references/minimem/src/cli/commands/conflicts.ts +415 -0
- package/references/minimem/src/cli/commands/daemon.ts +169 -0
- package/references/minimem/src/cli/commands/index.ts +12 -0
- package/references/minimem/src/cli/commands/init.ts +166 -0
- package/references/minimem/src/cli/commands/mcp.ts +221 -0
- package/references/minimem/src/cli/commands/push-pull.ts +213 -0
- package/references/minimem/src/cli/commands/search.ts +223 -0
- package/references/minimem/src/cli/commands/status.ts +84 -0
- package/references/minimem/src/cli/commands/store.ts +189 -0
- package/references/minimem/src/cli/commands/sync-init.ts +290 -0
- package/references/minimem/src/cli/commands/sync.ts +70 -0
- package/references/minimem/src/cli/commands/upsert.ts +197 -0
- package/references/minimem/src/cli/config.ts +611 -0
- package/references/minimem/src/cli/index.ts +299 -0
- package/references/minimem/src/cli/shared.ts +189 -0
- package/references/minimem/src/cli/sync/__tests__/central.test.ts +152 -0
- package/references/minimem/src/cli/sync/__tests__/conflicts.test.ts +209 -0
- package/references/minimem/src/cli/sync/__tests__/daemon.test.ts +118 -0
- package/references/minimem/src/cli/sync/__tests__/detection.test.ts +207 -0
- package/references/minimem/src/cli/sync/__tests__/integration.test.ts +476 -0
- package/references/minimem/src/cli/sync/__tests__/registry.test.ts +363 -0
- package/references/minimem/src/cli/sync/__tests__/state.test.ts +255 -0
- package/references/minimem/src/cli/sync/__tests__/validation.test.ts +193 -0
- package/references/minimem/src/cli/sync/__tests__/watcher.test.ts +178 -0
- package/references/minimem/src/cli/sync/central.ts +292 -0
- package/references/minimem/src/cli/sync/conflicts.ts +205 -0
- package/references/minimem/src/cli/sync/daemon.ts +407 -0
- package/references/minimem/src/cli/sync/detection.ts +138 -0
- package/references/minimem/src/cli/sync/index.ts +107 -0
- package/references/minimem/src/cli/sync/operations.ts +373 -0
- package/references/minimem/src/cli/sync/registry.ts +279 -0
- package/references/minimem/src/cli/sync/state.ts +358 -0
- package/references/minimem/src/cli/sync/validation.ts +206 -0
- package/references/minimem/src/cli/sync/watcher.ts +237 -0
- package/references/minimem/src/cli/version.ts +34 -0
- package/references/minimem/src/core/index.ts +9 -0
- package/references/minimem/src/core/indexer.ts +628 -0
- package/references/minimem/src/core/searcher.ts +221 -0
- package/references/minimem/src/db/schema.ts +183 -0
- package/references/minimem/src/db/sqlite-vec.ts +24 -0
- package/references/minimem/src/embeddings/__tests__/embeddings.test.ts +431 -0
- package/references/minimem/src/embeddings/batch-gemini.ts +392 -0
- package/references/minimem/src/embeddings/batch-openai.ts +409 -0
- package/references/minimem/src/embeddings/embeddings.ts +434 -0
- package/references/minimem/src/index.ts +132 -0
- package/references/minimem/src/internal.ts +299 -0
- package/references/minimem/src/minimem.ts +1291 -0
- package/references/minimem/src/search/__tests__/hybrid.test.ts +247 -0
- package/references/minimem/src/search/graph.ts +234 -0
- package/references/minimem/src/search/hybrid.ts +151 -0
- package/references/minimem/src/search/search.ts +256 -0
- package/references/minimem/src/server/__tests__/mcp.test.ts +347 -0
- package/references/minimem/src/server/__tests__/tools.test.ts +364 -0
- package/references/minimem/src/server/mcp.ts +326 -0
- package/references/minimem/src/server/tools.ts +720 -0
- package/references/minimem/src/session.ts +460 -0
- package/references/minimem/src/store/__tests__/manifest.test.ts +177 -0
- package/references/minimem/src/store/__tests__/materialize.test.ts +52 -0
- package/references/minimem/src/store/__tests__/store-graph.test.ts +228 -0
- package/references/minimem/src/store/index.ts +27 -0
- package/references/minimem/src/store/manifest.ts +203 -0
- package/references/minimem/src/store/materialize.ts +185 -0
- package/references/minimem/src/store/store-graph.ts +252 -0
- package/references/minimem/tsconfig.json +19 -0
- package/references/minimem/tsup.config.ts +26 -0
- package/references/minimem/vitest.config.ts +29 -0
- package/references/openteams/src/cli/generate.ts +23 -1
- package/references/openteams/src/generators/agent-prompt-generator.test.ts +94 -0
- package/references/openteams/src/generators/agent-prompt-generator.ts +42 -13
- package/references/openteams/src/generators/package-generator.ts +9 -1
- package/references/openteams/src/generators/skill-generator.test.ts +28 -0
- package/references/openteams/src/generators/skill-generator.ts +10 -4
- package/references/skill-tree/.claude/settings.json +6 -0
- package/references/skill-tree/.sudocode/issues.jsonl +19 -0
- package/references/skill-tree/.sudocode/specs.jsonl +3 -0
- package/references/skill-tree/CLAUDE.md +132 -0
- package/references/skill-tree/README.md +396 -0
- package/references/skill-tree/docs/GAPS_v1.md +221 -0
- package/references/skill-tree/docs/INTEGRATION_PLAN.md +467 -0
- package/references/skill-tree/docs/TODOS.md +91 -0
- package/references/skill-tree/docs/anthropic_skill_guide.md +1364 -0
- package/references/skill-tree/docs/design/federated-skill-trees.md +524 -0
- package/references/skill-tree/docs/design/multi-agent-sync.md +759 -0
- package/references/skill-tree/docs/scraper/BRAINSTORM.md +583 -0
- package/references/skill-tree/docs/scraper/POC_PLAN.md +420 -0
- package/references/skill-tree/docs/scraper/README.md +170 -0
- package/references/skill-tree/examples/basic-usage.ts +157 -0
- package/references/skill-tree/package-lock.json +1852 -0
- package/references/skill-tree/package.json +66 -0
- package/references/skill-tree/plan.md +78 -0
- package/references/skill-tree/scraper/README.md +123 -0
- package/references/skill-tree/scraper/docs/DESIGN.md +683 -0
- package/references/skill-tree/scraper/docs/PLAN.md +336 -0
- package/references/skill-tree/scraper/drizzle.config.ts +10 -0
- package/references/skill-tree/scraper/package-lock.json +6329 -0
- package/references/skill-tree/scraper/package.json +68 -0
- package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-description.md +7 -0
- package/references/skill-tree/scraper/test/fixtures/invalid-skill/missing-name.md +7 -0
- package/references/skill-tree/scraper/test/fixtures/minimal-skill/SKILL.md +27 -0
- package/references/skill-tree/scraper/test/fixtures/skill-json/SKILL.json +21 -0
- package/references/skill-tree/scraper/test/fixtures/skill-with-meta/SKILL.md +54 -0
- package/references/skill-tree/scraper/test/fixtures/skill-with-meta/_meta.json +24 -0
- package/references/skill-tree/scraper/test/fixtures/valid-skill/SKILL.md +93 -0
- package/references/skill-tree/scraper/test/fixtures/valid-skill/_meta.json +22 -0
- package/references/skill-tree/scraper/tsup.config.ts +14 -0
- package/references/skill-tree/scraper/vitest.config.ts +17 -0
- package/references/skill-tree/scripts/convert-to-vitest.ts +166 -0
- package/references/skill-tree/skills/skill-writer/SKILL.md +339 -0
- package/references/skill-tree/skills/skill-writer/references/examples.md +326 -0
- package/references/skill-tree/skills/skill-writer/references/patterns.md +210 -0
- package/references/skill-tree/skills/skill-writer/references/quality-checklist.md +123 -0
- package/references/skill-tree/test/run-all.ts +106 -0
- package/references/skill-tree/test/utils.ts +128 -0
- package/references/skill-tree/vitest.config.ts +16 -0
- package/references/swarmkit/src/commands/init/phases/configure.ts +0 -22
- package/references/swarmkit/src/commands/init/phases/global-setup.ts +5 -3
- package/references/swarmkit/src/commands/init/wizard.ts +2 -2
- package/references/swarmkit/src/packages/setup.test.ts +53 -7
- package/references/swarmkit/src/packages/setup.ts +37 -1
- package/scripts/bootstrap.mjs +26 -1
- package/scripts/generate-agents.mjs +5 -1
- package/scripts/map-hook.mjs +97 -64
- package/scripts/map-sidecar.mjs +179 -25
- package/scripts/team-loader.mjs +12 -41
- package/skills/swarm/SKILL.md +89 -25
- package/src/__tests__/agent-generator.test.mjs +6 -13
- package/src/__tests__/bootstrap.test.mjs +124 -1
- package/src/__tests__/config.test.mjs +200 -27
- package/src/__tests__/e2e-live-map.test.mjs +536 -0
- package/src/__tests__/e2e-mesh-sidecar.test.mjs +570 -0
- package/src/__tests__/e2e-native-task-hooks.test.mjs +376 -0
- package/src/__tests__/e2e-sidecar-bridge.test.mjs +477 -0
- package/src/__tests__/helpers.mjs +13 -0
- package/src/__tests__/inbox.test.mjs +22 -89
- package/src/__tests__/index.test.mjs +35 -9
- package/src/__tests__/integration.test.mjs +513 -0
- package/src/__tests__/map-events.test.mjs +514 -150
- package/src/__tests__/mesh-connection.test.mjs +308 -0
- package/src/__tests__/opentasks-client.test.mjs +517 -0
- package/src/__tests__/paths.test.mjs +185 -41
- package/src/__tests__/sidecar-client.test.mjs +35 -0
- package/src/__tests__/sidecar-server.test.mjs +124 -0
- package/src/__tests__/skilltree-client.test.mjs +80 -0
- package/src/agent-generator.mjs +104 -33
- package/src/bootstrap.mjs +150 -10
- package/src/config.mjs +81 -17
- package/src/context-output.mjs +58 -8
- package/src/inbox.mjs +9 -54
- package/src/index.mjs +39 -8
- package/src/map-connection.mjs +4 -3
- package/src/map-events.mjs +350 -80
- package/src/mesh-connection.mjs +148 -0
- package/src/opentasks-client.mjs +269 -0
- package/src/paths.mjs +182 -27
- package/src/sessionlog.mjs +14 -9
- package/src/sidecar-client.mjs +81 -27
- package/src/sidecar-server.mjs +175 -16
- package/src/skilltree-client.mjs +173 -0
- package/src/template.mjs +68 -4
- package/vitest.config.mjs +1 -0
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach, afterEach } from "vitest";
|
|
2
|
+
import { SqliteStorage } from "../src/storage/sqlite.js";
|
|
3
|
+
import type { Agent, Message, Conversation, Turn } from "../src/types.js";
|
|
4
|
+
|
|
5
|
+
function makeAgent(overrides: Partial<Agent> = {}): Agent {
|
|
6
|
+
return {
|
|
7
|
+
agent_id: "agent-1",
|
|
8
|
+
scope: "default",
|
|
9
|
+
status: "active",
|
|
10
|
+
metadata: {},
|
|
11
|
+
registered_at: "2025-01-01T00:00:00Z",
|
|
12
|
+
last_active_at: "2025-01-01T00:00:00Z",
|
|
13
|
+
...overrides,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function makeMessage(overrides: Partial<Message> = {}): Message {
|
|
18
|
+
return {
|
|
19
|
+
id: "msg-1",
|
|
20
|
+
scope: "default",
|
|
21
|
+
sender_id: "agent-1",
|
|
22
|
+
recipients: [{ agent_id: "agent-2", kind: "to" }],
|
|
23
|
+
content: { type: "text", text: "hello" },
|
|
24
|
+
importance: "normal",
|
|
25
|
+
metadata: {},
|
|
26
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
27
|
+
...overrides,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe("SqliteStorage", () => {
|
|
32
|
+
let storage: SqliteStorage;
|
|
33
|
+
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
storage = new SqliteStorage({ path: ":memory:" });
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
afterEach(() => {
|
|
39
|
+
storage.close();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
describe("Agents", () => {
|
|
43
|
+
it("should put and get an agent", () => {
|
|
44
|
+
const agent = makeAgent();
|
|
45
|
+
storage.putAgent(agent);
|
|
46
|
+
const result = storage.getAgent("agent-1");
|
|
47
|
+
expect(result).toBeDefined();
|
|
48
|
+
expect(result!.agent_id).toBe("agent-1");
|
|
49
|
+
expect(result!.status).toBe("active");
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it("should list agents by scope", () => {
|
|
53
|
+
storage.putAgent(makeAgent({ agent_id: "a1", scope: "team-a" }));
|
|
54
|
+
storage.putAgent(makeAgent({ agent_id: "a2", scope: "team-b" }));
|
|
55
|
+
storage.putAgent(makeAgent({ agent_id: "a3", scope: "team-a" }));
|
|
56
|
+
|
|
57
|
+
expect(storage.listAgents("team-a")).toHaveLength(2);
|
|
58
|
+
expect(storage.listAgents("team-b")).toHaveLength(1);
|
|
59
|
+
expect(storage.listAgents()).toHaveLength(3);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("should remove an agent", () => {
|
|
63
|
+
storage.putAgent(makeAgent());
|
|
64
|
+
expect(storage.removeAgent("agent-1")).toBe(true);
|
|
65
|
+
expect(storage.getAgent("agent-1")).toBeUndefined();
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("should update agent on re-put", () => {
|
|
69
|
+
storage.putAgent(makeAgent({ status: "active" }));
|
|
70
|
+
storage.putAgent(makeAgent({ status: "offline" }));
|
|
71
|
+
expect(storage.getAgent("agent-1")!.status).toBe("offline");
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
describe("Messages", () => {
|
|
76
|
+
it("should store and retrieve message with recipients", () => {
|
|
77
|
+
const msg = makeMessage();
|
|
78
|
+
storage.putMessage(msg);
|
|
79
|
+
const result = storage.getMessage("msg-1");
|
|
80
|
+
expect(result).toBeDefined();
|
|
81
|
+
expect(result!.sender_id).toBe("agent-1");
|
|
82
|
+
expect(result!.recipients).toHaveLength(1);
|
|
83
|
+
expect(result!.recipients[0].agent_id).toBe("agent-2");
|
|
84
|
+
expect(result!.content).toEqual({ type: "text", text: "hello" });
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("should get inbox for agent", () => {
|
|
88
|
+
storage.putMessage(
|
|
89
|
+
makeMessage({ id: "m1", recipients: [{ agent_id: "bob", kind: "to" }], created_at: "2025-01-01T00:00:01Z" })
|
|
90
|
+
);
|
|
91
|
+
storage.putMessage(
|
|
92
|
+
makeMessage({ id: "m2", recipients: [{ agent_id: "bob", kind: "to" }], created_at: "2025-01-01T00:00:02Z" })
|
|
93
|
+
);
|
|
94
|
+
storage.putMessage(
|
|
95
|
+
makeMessage({ id: "m3", recipients: [{ agent_id: "alice", kind: "to" }] })
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const inbox = storage.getInbox("bob");
|
|
99
|
+
expect(inbox).toHaveLength(2);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("should filter unread only", () => {
|
|
103
|
+
storage.putMessage(
|
|
104
|
+
makeMessage({
|
|
105
|
+
id: "m1",
|
|
106
|
+
recipients: [{ agent_id: "bob", kind: "to", read_at: "2025-01-01T00:00:05Z" }],
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
storage.putMessage(
|
|
110
|
+
makeMessage({
|
|
111
|
+
id: "m2",
|
|
112
|
+
recipients: [{ agent_id: "bob", kind: "to" }],
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const unread = storage.getInbox("bob", { unreadOnly: true });
|
|
117
|
+
expect(unread).toHaveLength(1);
|
|
118
|
+
expect(unread[0].id).toBe("m2");
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("should get thread by tag", () => {
|
|
122
|
+
storage.putMessage(makeMessage({ id: "m1", thread_tag: "sprint-1", scope: "default" }));
|
|
123
|
+
storage.putMessage(makeMessage({ id: "m2", thread_tag: "sprint-1", scope: "default" }));
|
|
124
|
+
storage.putMessage(makeMessage({ id: "m3", thread_tag: "sprint-2", scope: "default" }));
|
|
125
|
+
|
|
126
|
+
const thread = storage.getThread({ threadTag: "sprint-1", scope: "default" });
|
|
127
|
+
expect(thread).toHaveLength(2);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it("should update message recipients on re-put", () => {
|
|
131
|
+
const msg = makeMessage({
|
|
132
|
+
recipients: [{ agent_id: "bob", kind: "to" }],
|
|
133
|
+
});
|
|
134
|
+
storage.putMessage(msg);
|
|
135
|
+
|
|
136
|
+
msg.recipients[0].read_at = "2025-01-01T01:00:00Z";
|
|
137
|
+
storage.putMessage(msg);
|
|
138
|
+
|
|
139
|
+
const result = storage.getMessage("msg-1")!;
|
|
140
|
+
expect(result.recipients[0].read_at).toBe("2025-01-01T01:00:00Z");
|
|
141
|
+
});
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
describe("Full-text search", () => {
|
|
145
|
+
it("should find messages by text content", () => {
|
|
146
|
+
storage.putMessage(
|
|
147
|
+
makeMessage({ id: "m1", content: { type: "text", text: "fix the auth bug" } })
|
|
148
|
+
);
|
|
149
|
+
storage.putMessage(
|
|
150
|
+
makeMessage({ id: "m2", content: { type: "text", text: "deploy the app" } })
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
const results = storage.searchMessages("auth");
|
|
154
|
+
expect(results).toHaveLength(1);
|
|
155
|
+
expect(results[0].id).toBe("m1");
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it("should find messages by subject", () => {
|
|
159
|
+
storage.putMessage(
|
|
160
|
+
makeMessage({ id: "m1", subject: "auth issue", content: { type: "text", text: "details" } })
|
|
161
|
+
);
|
|
162
|
+
storage.putMessage(
|
|
163
|
+
makeMessage({ id: "m2", subject: "deploy plan", content: { type: "text", text: "steps" } })
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
const results = storage.searchMessages("auth");
|
|
167
|
+
expect(results).toHaveLength(1);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
it("should filter search by scope", () => {
|
|
171
|
+
storage.putMessage(
|
|
172
|
+
makeMessage({ id: "m1", scope: "team-a", content: { type: "text", text: "auth fix" } })
|
|
173
|
+
);
|
|
174
|
+
storage.putMessage(
|
|
175
|
+
makeMessage({ id: "m2", scope: "team-b", content: { type: "text", text: "auth fix" } })
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
const results = storage.searchMessages("auth", "team-a");
|
|
179
|
+
expect(results).toHaveLength(1);
|
|
180
|
+
expect(results[0].scope).toBe("team-a");
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
describe("Conversations", () => {
|
|
185
|
+
it("should store and retrieve with participants", () => {
|
|
186
|
+
const conv: Conversation = {
|
|
187
|
+
id: "conv-1",
|
|
188
|
+
scope: "default",
|
|
189
|
+
subject: "Test",
|
|
190
|
+
status: "active",
|
|
191
|
+
participants: [
|
|
192
|
+
{ agent_id: "alice", joined_at: "2025-01-01T00:00:00Z" },
|
|
193
|
+
{ agent_id: "bob", joined_at: "2025-01-01T00:00:00Z" },
|
|
194
|
+
],
|
|
195
|
+
metadata: {},
|
|
196
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
197
|
+
updated_at: "2025-01-01T00:00:00Z",
|
|
198
|
+
};
|
|
199
|
+
storage.putConversation(conv);
|
|
200
|
+
const result = storage.getConversation("conv-1")!;
|
|
201
|
+
expect(result.subject).toBe("Test");
|
|
202
|
+
expect(result.participants).toHaveLength(2);
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
describe("Turns & Threads", () => {
|
|
207
|
+
it("should add and retrieve turns", () => {
|
|
208
|
+
const turn: Turn = {
|
|
209
|
+
id: "turn-1",
|
|
210
|
+
conversation_id: "conv-1",
|
|
211
|
+
participant_id: "alice",
|
|
212
|
+
content_type: "text",
|
|
213
|
+
content: { type: "text", text: "hello" },
|
|
214
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
215
|
+
};
|
|
216
|
+
// Need conversation first for FK
|
|
217
|
+
storage.putConversation({
|
|
218
|
+
id: "conv-1", scope: "default", status: "active", participants: [],
|
|
219
|
+
metadata: {}, created_at: "2025-01-01T00:00:00Z", updated_at: "2025-01-01T00:00:00Z",
|
|
220
|
+
});
|
|
221
|
+
storage.addTurn(turn);
|
|
222
|
+
const turns = storage.getTurns("conv-1");
|
|
223
|
+
expect(turns).toHaveLength(1);
|
|
224
|
+
expect(turns[0].participant_id).toBe("alice");
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
it("should store and retrieve threads", () => {
|
|
228
|
+
storage.putConversation({
|
|
229
|
+
id: "conv-1", scope: "default", status: "active", participants: [],
|
|
230
|
+
metadata: {}, created_at: "2025-01-01T00:00:00Z", updated_at: "2025-01-01T00:00:00Z",
|
|
231
|
+
});
|
|
232
|
+
storage.putThread({
|
|
233
|
+
id: "thread-1",
|
|
234
|
+
conversation_id: "conv-1",
|
|
235
|
+
root_turn_id: "turn-1",
|
|
236
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
237
|
+
});
|
|
238
|
+
const threads = storage.getThreadsByConversation("conv-1");
|
|
239
|
+
expect(threads).toHaveLength(1);
|
|
240
|
+
expect(threads[0].root_turn_id).toBe("turn-1");
|
|
241
|
+
});
|
|
242
|
+
});
|
|
243
|
+
});
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
2
|
+
import { InMemoryStorage } from "../src/storage/memory.js";
|
|
3
|
+
import type { Agent, Message, Recipient, Conversation, Turn } from "../src/types.js";
|
|
4
|
+
|
|
5
|
+
function makeAgent(overrides: Partial<Agent> = {}): Agent {
|
|
6
|
+
return {
|
|
7
|
+
agent_id: "agent-1",
|
|
8
|
+
scope: "default",
|
|
9
|
+
status: "active",
|
|
10
|
+
metadata: {},
|
|
11
|
+
registered_at: "2025-01-01T00:00:00Z",
|
|
12
|
+
last_active_at: "2025-01-01T00:00:00Z",
|
|
13
|
+
...overrides,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function makeMessage(overrides: Partial<Message> = {}): Message {
|
|
18
|
+
return {
|
|
19
|
+
id: "msg-1",
|
|
20
|
+
scope: "default",
|
|
21
|
+
sender_id: "agent-1",
|
|
22
|
+
recipients: [{ agent_id: "agent-2", kind: "to" }],
|
|
23
|
+
content: { type: "text", text: "hello" },
|
|
24
|
+
importance: "normal",
|
|
25
|
+
metadata: {},
|
|
26
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
27
|
+
...overrides,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe("InMemoryStorage", () => {
|
|
32
|
+
let storage: InMemoryStorage;
|
|
33
|
+
|
|
34
|
+
beforeEach(() => {
|
|
35
|
+
storage = new InMemoryStorage();
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
describe("Agents", () => {
|
|
39
|
+
it("should put and get an agent", () => {
|
|
40
|
+
const agent = makeAgent();
|
|
41
|
+
storage.putAgent(agent);
|
|
42
|
+
expect(storage.getAgent("agent-1")).toEqual(agent);
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
it("should return undefined for missing agent", () => {
|
|
46
|
+
expect(storage.getAgent("nope")).toBeUndefined();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it("should list agents by scope", () => {
|
|
50
|
+
storage.putAgent(makeAgent({ agent_id: "a1", scope: "team-a" }));
|
|
51
|
+
storage.putAgent(makeAgent({ agent_id: "a2", scope: "team-b" }));
|
|
52
|
+
storage.putAgent(makeAgent({ agent_id: "a3", scope: "team-a" }));
|
|
53
|
+
|
|
54
|
+
expect(storage.listAgents("team-a")).toHaveLength(2);
|
|
55
|
+
expect(storage.listAgents("team-b")).toHaveLength(1);
|
|
56
|
+
expect(storage.listAgents()).toHaveLength(3);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("should remove an agent", () => {
|
|
60
|
+
storage.putAgent(makeAgent());
|
|
61
|
+
expect(storage.removeAgent("agent-1")).toBe(true);
|
|
62
|
+
expect(storage.getAgent("agent-1")).toBeUndefined();
|
|
63
|
+
expect(storage.removeAgent("agent-1")).toBe(false);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
describe("Messages", () => {
|
|
68
|
+
it("should put and get a message", () => {
|
|
69
|
+
const msg = makeMessage();
|
|
70
|
+
storage.putMessage(msg);
|
|
71
|
+
expect(storage.getMessage("msg-1")).toEqual(msg);
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("should get inbox for agent", () => {
|
|
75
|
+
storage.putMessage(
|
|
76
|
+
makeMessage({
|
|
77
|
+
id: "m1",
|
|
78
|
+
recipients: [{ agent_id: "bob", kind: "to" }],
|
|
79
|
+
created_at: "2025-01-01T00:00:01Z",
|
|
80
|
+
})
|
|
81
|
+
);
|
|
82
|
+
storage.putMessage(
|
|
83
|
+
makeMessage({
|
|
84
|
+
id: "m2",
|
|
85
|
+
recipients: [{ agent_id: "bob", kind: "to" }],
|
|
86
|
+
created_at: "2025-01-01T00:00:02Z",
|
|
87
|
+
})
|
|
88
|
+
);
|
|
89
|
+
storage.putMessage(
|
|
90
|
+
makeMessage({
|
|
91
|
+
id: "m3",
|
|
92
|
+
recipients: [{ agent_id: "alice", kind: "to" }],
|
|
93
|
+
})
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const inbox = storage.getInbox("bob");
|
|
97
|
+
expect(inbox).toHaveLength(2);
|
|
98
|
+
expect(inbox[0].id).toBe("m1");
|
|
99
|
+
expect(inbox[1].id).toBe("m2");
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it("should filter unread only", () => {
|
|
103
|
+
storage.putMessage(
|
|
104
|
+
makeMessage({
|
|
105
|
+
id: "m1",
|
|
106
|
+
recipients: [{ agent_id: "bob", kind: "to", read_at: "2025-01-01T00:00:05Z" }],
|
|
107
|
+
})
|
|
108
|
+
);
|
|
109
|
+
storage.putMessage(
|
|
110
|
+
makeMessage({
|
|
111
|
+
id: "m2",
|
|
112
|
+
recipients: [{ agent_id: "bob", kind: "to" }],
|
|
113
|
+
})
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
const unread = storage.getInbox("bob", { unreadOnly: true });
|
|
117
|
+
expect(unread).toHaveLength(1);
|
|
118
|
+
expect(unread[0].id).toBe("m2");
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it("should get thread by tag", () => {
|
|
122
|
+
storage.putMessage(makeMessage({ id: "m1", thread_tag: "sprint-1", scope: "default" }));
|
|
123
|
+
storage.putMessage(makeMessage({ id: "m2", thread_tag: "sprint-1", scope: "default" }));
|
|
124
|
+
storage.putMessage(makeMessage({ id: "m3", thread_tag: "sprint-2", scope: "default" }));
|
|
125
|
+
|
|
126
|
+
const thread = storage.getThread({ threadTag: "sprint-1", scope: "default" });
|
|
127
|
+
expect(thread).toHaveLength(2);
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
it("should search messages by text content", () => {
|
|
131
|
+
storage.putMessage(makeMessage({ id: "m1", content: { type: "text", text: "fix the auth bug" } }));
|
|
132
|
+
storage.putMessage(makeMessage({ id: "m2", content: { type: "text", text: "deploy the app" } }));
|
|
133
|
+
storage.putMessage(makeMessage({ id: "m3", subject: "auth issue", content: { type: "text", text: "details" } }));
|
|
134
|
+
|
|
135
|
+
expect(storage.searchMessages("auth")).toHaveLength(2);
|
|
136
|
+
expect(storage.searchMessages("deploy")).toHaveLength(1);
|
|
137
|
+
expect(storage.searchMessages("nonexistent")).toHaveLength(0);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it("should get sent messages", () => {
|
|
141
|
+
storage.putMessage(makeMessage({ id: "m1", sender_id: "alice" }));
|
|
142
|
+
storage.putMessage(makeMessage({ id: "m2", sender_id: "bob" }));
|
|
143
|
+
storage.putMessage(makeMessage({ id: "m3", sender_id: "alice" }));
|
|
144
|
+
|
|
145
|
+
expect(storage.getSentMessages("alice")).toHaveLength(2);
|
|
146
|
+
expect(storage.getSentMessages("bob")).toHaveLength(1);
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
describe("Conversations", () => {
|
|
151
|
+
it("should put and get a conversation", () => {
|
|
152
|
+
const conv: Conversation = {
|
|
153
|
+
id: "conv-1",
|
|
154
|
+
scope: "default",
|
|
155
|
+
subject: "Test",
|
|
156
|
+
status: "active",
|
|
157
|
+
participants: [],
|
|
158
|
+
metadata: {},
|
|
159
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
160
|
+
updated_at: "2025-01-01T00:00:00Z",
|
|
161
|
+
};
|
|
162
|
+
storage.putConversation(conv);
|
|
163
|
+
expect(storage.getConversation("conv-1")).toEqual(conv);
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it("should list conversations by scope", () => {
|
|
167
|
+
storage.putConversation({
|
|
168
|
+
id: "c1", scope: "team-a", status: "active", participants: [],
|
|
169
|
+
metadata: {}, created_at: "2025-01-01T00:00:00Z", updated_at: "2025-01-01T00:00:00Z",
|
|
170
|
+
});
|
|
171
|
+
storage.putConversation({
|
|
172
|
+
id: "c2", scope: "team-b", status: "active", participants: [],
|
|
173
|
+
metadata: {}, created_at: "2025-01-01T00:00:00Z", updated_at: "2025-01-01T00:00:00Z",
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
expect(storage.listConversations("team-a")).toHaveLength(1);
|
|
177
|
+
expect(storage.listConversations()).toHaveLength(2);
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
|
|
181
|
+
describe("Turns", () => {
|
|
182
|
+
it("should add and retrieve turns", () => {
|
|
183
|
+
const turn: Turn = {
|
|
184
|
+
id: "turn-1",
|
|
185
|
+
conversation_id: "conv-1",
|
|
186
|
+
participant_id: "agent-1",
|
|
187
|
+
content_type: "text",
|
|
188
|
+
content: { type: "text", text: "hello" },
|
|
189
|
+
created_at: "2025-01-01T00:00:00Z",
|
|
190
|
+
};
|
|
191
|
+
storage.addTurn(turn);
|
|
192
|
+
expect(storage.getTurns("conv-1")).toHaveLength(1);
|
|
193
|
+
expect(storage.getTurns("conv-2")).toHaveLength(0);
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
});
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { describe, it, expect, beforeEach } from "vitest";
|
|
2
|
+
import { EventEmitter } from "node:events";
|
|
3
|
+
import { InMemoryStorage } from "../src/storage/memory.js";
|
|
4
|
+
import { MessageRouter } from "../src/router/message-router.js";
|
|
5
|
+
import { TraceabilityLayer } from "../src/traceability/traceability.js";
|
|
6
|
+
|
|
7
|
+
describe("TraceabilityLayer", () => {
|
|
8
|
+
let storage: InMemoryStorage;
|
|
9
|
+
let events: EventEmitter;
|
|
10
|
+
let router: MessageRouter;
|
|
11
|
+
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
storage = new InMemoryStorage();
|
|
14
|
+
events = new EventEmitter();
|
|
15
|
+
router = new MessageRouter(storage, events, "default");
|
|
16
|
+
// TraceabilityLayer subscribes to events on construction
|
|
17
|
+
new TraceabilityLayer(storage, events);
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it("should auto-create a conversation from thread_tag", async () => {
|
|
21
|
+
await router.routeMessage({
|
|
22
|
+
from: "alice",
|
|
23
|
+
to: "bob",
|
|
24
|
+
payload: "hello",
|
|
25
|
+
threadTag: "sprint-1",
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
const conversations = storage.listConversations("default");
|
|
29
|
+
expect(conversations).toHaveLength(1);
|
|
30
|
+
expect(conversations[0].subject).toBe("sprint-1");
|
|
31
|
+
expect(conversations[0].participants).toHaveLength(2);
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
it("should reuse conversation for same thread_tag+scope", async () => {
|
|
35
|
+
await router.routeMessage({
|
|
36
|
+
from: "alice",
|
|
37
|
+
to: "bob",
|
|
38
|
+
payload: "msg 1",
|
|
39
|
+
threadTag: "sprint-1",
|
|
40
|
+
});
|
|
41
|
+
await router.routeMessage({
|
|
42
|
+
from: "bob",
|
|
43
|
+
to: "alice",
|
|
44
|
+
payload: "msg 2",
|
|
45
|
+
threadTag: "sprint-1",
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const conversations = storage.listConversations("default");
|
|
49
|
+
expect(conversations).toHaveLength(1);
|
|
50
|
+
|
|
51
|
+
const turns = storage.getTurns(conversations[0].id);
|
|
52
|
+
expect(turns).toHaveLength(2);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it("should create catch-all conversation for untagged messages", async () => {
|
|
56
|
+
await router.routeMessage({
|
|
57
|
+
from: "alice",
|
|
58
|
+
to: "bob",
|
|
59
|
+
payload: "hi",
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
const conversations = storage.listConversations("default");
|
|
63
|
+
expect(conversations).toHaveLength(1);
|
|
64
|
+
expect(conversations[0].subject).toBe("General");
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
it("should set conversation_id on messages", async () => {
|
|
68
|
+
const msg = await router.routeMessage({
|
|
69
|
+
from: "alice",
|
|
70
|
+
to: "bob",
|
|
71
|
+
payload: "hello",
|
|
72
|
+
threadTag: "test",
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// The traceability layer sets conversation_id after message.created
|
|
76
|
+
const updated = storage.getMessage(msg.id)!;
|
|
77
|
+
expect(updated.conversation_id).toBeTruthy();
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
it("should create threads from reply chains", async () => {
|
|
81
|
+
const msg1 = await router.routeMessage({
|
|
82
|
+
from: "alice",
|
|
83
|
+
to: "bob",
|
|
84
|
+
payload: "original",
|
|
85
|
+
threadTag: "test",
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
const msg2 = await router.routeMessage({
|
|
89
|
+
from: "bob",
|
|
90
|
+
to: "alice",
|
|
91
|
+
payload: "reply",
|
|
92
|
+
inReplyTo: msg1.id,
|
|
93
|
+
threadTag: "test",
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const conversations = storage.listConversations("default");
|
|
97
|
+
expect(conversations).toHaveLength(1);
|
|
98
|
+
|
|
99
|
+
const threads = storage.getThreadsByConversation(conversations[0].id);
|
|
100
|
+
expect(threads).toHaveLength(1);
|
|
101
|
+
|
|
102
|
+
const turns = storage.getTurns(conversations[0].id);
|
|
103
|
+
expect(turns).toHaveLength(2);
|
|
104
|
+
// The reply turn should have a thread_id
|
|
105
|
+
const replyTurn = turns.find((t) => t.source_message_id === msg2.id);
|
|
106
|
+
expect(replyTurn?.thread_id).toBeTruthy();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
it("should add participants from both sender and recipients", async () => {
|
|
110
|
+
await router.routeMessage({
|
|
111
|
+
from: "alice",
|
|
112
|
+
to: ["bob", "charlie"],
|
|
113
|
+
payload: "team update",
|
|
114
|
+
threadTag: "standup",
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const conv = storage.listConversations("default")[0];
|
|
118
|
+
const participantIds = conv.participants.map((p) => p.agent_id);
|
|
119
|
+
expect(participantIds).toContain("alice");
|
|
120
|
+
expect(participantIds).toContain("bob");
|
|
121
|
+
expect(participantIds).toContain("charlie");
|
|
122
|
+
});
|
|
123
|
+
});
|