societyai 0.0.5 → 0.0.6

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.
Files changed (56) hide show
  1. package/README.md +85 -4
  2. package/dist/__tests__/capabilities/mcp.test.d.ts +2 -0
  3. package/dist/__tests__/capabilities/mcp.test.d.ts.map +1 -0
  4. package/dist/__tests__/capabilities/mcp.test.js +168 -0
  5. package/dist/__tests__/capabilities/mcp.test.js.map +1 -0
  6. package/dist/__tests__/integration/end-to-end-features.test.d.ts +2 -0
  7. package/dist/__tests__/integration/end-to-end-features.test.d.ts.map +1 -0
  8. package/dist/__tests__/integration/end-to-end-features.test.js +261 -0
  9. package/dist/__tests__/integration/end-to-end-features.test.js.map +1 -0
  10. package/dist/__tests__/integration/execution-mode-integration.test.d.ts +2 -0
  11. package/dist/__tests__/integration/execution-mode-integration.test.d.ts.map +1 -0
  12. package/dist/__tests__/integration/execution-mode-integration.test.js +193 -0
  13. package/dist/__tests__/integration/execution-mode-integration.test.js.map +1 -0
  14. package/dist/__tests__/observability/opentelemetry.test.d.ts +2 -0
  15. package/dist/__tests__/observability/opentelemetry.test.d.ts.map +1 -0
  16. package/dist/__tests__/observability/opentelemetry.test.js +193 -0
  17. package/dist/__tests__/observability/opentelemetry.test.js.map +1 -0
  18. package/dist/__tests__/utils/isolated-worker-pool.test.d.ts +2 -0
  19. package/dist/__tests__/utils/isolated-worker-pool.test.d.ts.map +1 -0
  20. package/dist/__tests__/utils/isolated-worker-pool.test.js +206 -0
  21. package/dist/__tests__/utils/isolated-worker-pool.test.js.map +1 -0
  22. package/dist/builders/agent-builder.d.ts +2 -0
  23. package/dist/builders/agent-builder.d.ts.map +1 -1
  24. package/dist/builders/agent-builder.js +5 -0
  25. package/dist/builders/agent-builder.js.map +1 -1
  26. package/dist/capabilities/mcp.d.ts +48 -0
  27. package/dist/capabilities/mcp.d.ts.map +1 -0
  28. package/dist/capabilities/mcp.js +186 -0
  29. package/dist/capabilities/mcp.js.map +1 -0
  30. package/dist/core/types.d.ts +8 -0
  31. package/dist/core/types.d.ts.map +1 -1
  32. package/dist/examples/complete-integration.d.ts +4 -0
  33. package/dist/examples/complete-integration.d.ts.map +1 -0
  34. package/dist/examples/complete-integration.js +140 -0
  35. package/dist/examples/complete-integration.js.map +1 -0
  36. package/dist/execution/engine/execution-engine.d.ts +6 -3
  37. package/dist/execution/engine/execution-engine.d.ts.map +1 -1
  38. package/dist/execution/engine/execution-engine.js +152 -34
  39. package/dist/execution/engine/execution-engine.js.map +1 -1
  40. package/dist/index.d.ts +3 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +10 -2
  43. package/dist/index.js.map +1 -1
  44. package/dist/observability/opentelemetry.d.ts +46 -0
  45. package/dist/observability/opentelemetry.d.ts.map +1 -0
  46. package/dist/observability/opentelemetry.js +200 -0
  47. package/dist/observability/opentelemetry.js.map +1 -0
  48. package/dist/utils/isolated-worker-pool.d.ts +38 -0
  49. package/dist/utils/isolated-worker-pool.d.ts.map +1 -0
  50. package/dist/utils/isolated-worker-pool.js +181 -0
  51. package/dist/utils/isolated-worker-pool.js.map +1 -0
  52. package/dist/utils/isolated-worker.d.ts +2 -0
  53. package/dist/utils/isolated-worker.d.ts.map +1 -0
  54. package/dist/utils/isolated-worker.js +32 -0
  55. package/dist/utils/isolated-worker.js.map +1 -0
  56. package/package.json +11 -3
package/README.md CHANGED
@@ -1,9 +1,15 @@
1
1
  # SocietyAI
2
2
 
3
- [![npm version](https://img.shields.io/npm/v/societyai.svg)](https://www.npmjs.com/package/societyai)
4
- [![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
6
- [![Zero Dependencies](https://img.shields.io/badge/dependencies-0-brightgreen.svg)](package.json)
3
+ <div align="center">
4
+ <img src="https://societyai.vercel.app/logo.png" alt="SocietyAI Logo" width="200" />
5
+
6
+ <p>
7
+ <a href="https://www.npmjs.com/package/societyai"><img src="https://img.shields.io/npm/v/societyai.svg" alt="npm version"></a>
8
+ <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="license"></a>
9
+ <a href="https://www.typescriptlang.org/"><img src="https://img.shields.io/badge/TypeScript-5.9-blue.svg" alt="TypeScript"></a>
10
+ <a href="package.json"><img src="https://img.shields.io/badge/dependencies-0-brightgreen.svg" alt="Zero Dependencies"></a>
11
+ </p>
12
+ </div>
7
13
 
8
14
  **SocietyAI** is a powerful TypeScript/Node.js library for orchestrating
9
15
  collaborative multi-agent systems. It allows you to build sophisticated
@@ -35,10 +41,16 @@ be modular.
35
41
  agent.
36
42
  - **🔄 Flexible Workflows**: Sequential, Parallel, Collaborative (debate between
37
43
  agents), and Conditional.
44
+ - **⚡ Worker Threads Support**: Execute CPU-intensive agents in isolated worker
45
+ threads to prevent blocking the main event loop.
38
46
  - **🧠 Memory & Context**: Native management of short/long-term memory and
39
47
  type-safe Context Injection.
40
48
  - **💾 Persistence & Recovery**: Save execution state, handle crashes, and
41
49
  resume workflows seamlessly.
50
+ - **📊 OpenTelemetry Integration**: Built-in distributed tracing support for
51
+ production observability.
52
+ - **🔌 MCP Protocol Support**: Integrate external tools and services via Model
53
+ Context Protocol.
42
54
  - **📡 Observability**: Full event-driven system to track every thought, action,
43
55
  and state change.
44
56
  - **🙋 Human-in-the-Loop**: Pause workflows for human validation or input and
@@ -179,6 +191,75 @@ console.log('Final Result:', result.output);
179
191
  console.log('History:', result.taskResults);
180
192
  ```
181
193
 
194
+ ### 3. Advanced: Worker Threads & Observability
195
+
196
+ For CPU-intensive agents, use worker threads to prevent blocking:
197
+
198
+ ```typescript
199
+ import { Society, createOpenTelemetryObserver } from 'societyai';
200
+ import { OpenAIModel } from './my-model-impl';
201
+
202
+ const model = new OpenAIModel(process.env.OPENAI_API_KEY);
203
+
204
+ // Optional: Enable distributed tracing
205
+ const observer = createOpenTelemetryObserver({
206
+ serviceName: 'my-app',
207
+ exporterType: 'console',
208
+ });
209
+
210
+ const result = await Society.create()
211
+ .withId('advanced-team')
212
+ .withObserver(observer) // ← Add OpenTelemetry tracing
213
+
214
+ // Standard agent (I/O-bound tasks)
215
+ .addAgent(
216
+ (agent) =>
217
+ agent
218
+ .withId('coordinator')
219
+ .withRole((role) =>
220
+ role.withSystemPrompt(
221
+ 'You coordinate tasks and handle I/O operations.'
222
+ )
223
+ )
224
+ .withModel(model)
225
+ // executionMode defaults to 'default' (main thread)
226
+ )
227
+
228
+ // CPU-intensive agent (runs in worker thread)
229
+ .addAgent(
230
+ (agent) =>
231
+ agent
232
+ .withId('data-processor')
233
+ .withRole((role) =>
234
+ role.withSystemPrompt(
235
+ 'You perform heavy data analysis and complex calculations.'
236
+ )
237
+ )
238
+ .withModel(model)
239
+ .withExecutionMode('isolated') // ← Runs in Worker Thread
240
+ )
241
+
242
+ .addTask((task) =>
243
+ task.withId('coordinate').withAgents(['coordinator']).thenGoto(['process'])
244
+ )
245
+ .addTask((task) => task.withId('process').withAgents(['data-processor']))
246
+
247
+ .execute('Start workflow');
248
+
249
+ console.log('Result:', result.output);
250
+
251
+ // Cleanup observer
252
+ await observer.shutdown();
253
+ ```
254
+
255
+ **Key Points:**
256
+
257
+ - **executionMode: 'isolated'**: Agent runs in a Worker Thread, preventing main
258
+ thread blocking.
259
+ - **OpenTelemetry Observer**: Distributed tracing for production monitoring.
260
+ - **MCP Tools**: Add external tools via
261
+ `withTools(await MCPServers.filesystem('/path'))`.
262
+
182
263
  ## 📚 Documentation
183
264
 
184
265
  Explore detailed documentation in the `/docs` folder:
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=mcp.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/capabilities/mcp.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ const mcp_1 = require("../../capabilities/mcp");
37
+ const childProcess = __importStar(require("child_process"));
38
+ jest.mock('child_process', () => ({
39
+ spawn: jest.fn(),
40
+ }));
41
+ const mockChildProcess = childProcess;
42
+ describe('MCP Integration', () => {
43
+ beforeEach(() => {
44
+ jest.clearAllMocks();
45
+ });
46
+ describe('MCPToolProvider', () => {
47
+ describe('Connection', () => {
48
+ it('should create a tool provider', () => {
49
+ expect(mcp_1.MCPToolProvider).toBeDefined();
50
+ });
51
+ it('should accept server configuration', async () => {
52
+ const { spawn } = mockChildProcess;
53
+ const mockProcess = {
54
+ stdout: {
55
+ on: jest.fn().mockReturnThis(),
56
+ off: jest.fn().mockReturnThis(),
57
+ },
58
+ stdin: {
59
+ write: jest.fn(),
60
+ },
61
+ on: jest.fn(),
62
+ kill: jest.fn(),
63
+ };
64
+ spawn.mockReturnValue(mockProcess);
65
+ const config = {
66
+ command: 'npx',
67
+ args: ['-y', '@modelcontextprotocol/server-filesystem', '/tmp'],
68
+ };
69
+ expect(config).toBeDefined();
70
+ expect(config.command).toBe('npx');
71
+ });
72
+ });
73
+ describe('Tool Discovery', () => {
74
+ it('should discover tools from MCP server', async () => {
75
+ const { spawn } = mockChildProcess;
76
+ const mockProcess = {
77
+ stdout: {
78
+ on: jest.fn().mockReturnThis(),
79
+ off: jest.fn().mockReturnThis(),
80
+ },
81
+ stdin: {
82
+ write: jest.fn(),
83
+ },
84
+ on: jest.fn(),
85
+ kill: jest.fn(),
86
+ };
87
+ spawn.mockReturnValue(mockProcess);
88
+ expect(spawn).toBeDefined();
89
+ expect(mockProcess.stdout?.on).toBeDefined();
90
+ });
91
+ });
92
+ });
93
+ describe('MCPServers Helpers', () => {
94
+ it('should provide filesystem helper', () => {
95
+ expect(mcp_1.MCPServers.filesystem).toBeDefined();
96
+ expect(typeof mcp_1.MCPServers.filesystem).toBe('function');
97
+ });
98
+ it('should provide GitHub helper', () => {
99
+ expect(mcp_1.MCPServers.github).toBeDefined();
100
+ expect(typeof mcp_1.MCPServers.github).toBe('function');
101
+ });
102
+ it('should provide Brave Search helper', () => {
103
+ expect(mcp_1.MCPServers.braveSearch).toBeDefined();
104
+ expect(typeof mcp_1.MCPServers.braveSearch).toBe('function');
105
+ });
106
+ it('should provide custom helper', () => {
107
+ expect(mcp_1.MCPServers.custom).toBeDefined();
108
+ expect(typeof mcp_1.MCPServers.custom).toBe('function');
109
+ });
110
+ });
111
+ describe('Tool Conversion', () => {
112
+ it('should convert MCP tools to SocietyAI format', () => {
113
+ expect(true).toBe(true);
114
+ });
115
+ });
116
+ describe('Error Handling', () => {
117
+ it('should handle connection errors gracefully', async () => {
118
+ const { spawn } = mockChildProcess;
119
+ const mockProcess = {
120
+ stdout: null,
121
+ stdin: null,
122
+ on: jest.fn(),
123
+ kill: jest.fn(),
124
+ };
125
+ spawn.mockReturnValue(mockProcess);
126
+ await expect(mcp_1.MCPToolProvider.connect({
127
+ command: 'invalid-command',
128
+ args: [],
129
+ })).rejects.toThrow('Failed to spawn MCP server process');
130
+ });
131
+ });
132
+ describe('Integration Scenarios', () => {
133
+ it('should demonstrate filesystem MCP usage', () => {
134
+ const example = `
135
+ const provider = await MCPServers.filesystem('/my/data');
136
+ const tools = provider.getTools();
137
+
138
+ // Use tools with agent
139
+ agent.withTools(tools);
140
+ `;
141
+ expect(example).toBeTruthy();
142
+ });
143
+ it('should demonstrate GitHub MCP usage', () => {
144
+ const example = `
145
+ const provider = await MCPServers.github('github_token');
146
+ const tools = provider.getTools();
147
+
148
+ // Access GitHub repositories
149
+ agent.withTools(tools);
150
+ `;
151
+ expect(example).toBeTruthy();
152
+ });
153
+ it('should demonstrate custom MCP usage', () => {
154
+ const example = `
155
+ const provider = await MCPServers.custom({
156
+ command: 'node',
157
+ args: ['my-mcp-server.js'],
158
+ env: { API_KEY: 'secret' }
159
+ });
160
+
161
+ const tools = provider.getTools();
162
+ agent.withTools(tools);
163
+ `;
164
+ expect(example).toBeTruthy();
165
+ });
166
+ });
167
+ });
168
+ //# sourceMappingURL=mcp.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mcp.test.js","sourceRoot":"","sources":["../../../src/__tests__/capabilities/mcp.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,gDAAqE;AAErE,4DAA8C;AAG9C,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,CAAC;IAChC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE;CACjB,CAAC,CAAC,CAAC;AAEJ,MAAM,gBAAgB,GAAG,YAAgD,CAAC;AAE1E,QAAQ,CAAC,i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AAyC,EAAE,GAAG,EAAE;YAEjD,MAAM,OAAO,GAAG;;;;;;OAMf,CAAC;YAEF,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAE7C,MAAM,OAAO,GAAG;;;;;;OAMf,CAAC;YAEF,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,qCAAqC,EAAE,GAAG,EAAE;YAE7C,MAAM,OAAO,GAAG;;;;;;;;;OASf,CAAC;YAEF,MAAM,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,CAAC;QAC/B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=end-to-end-features.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-to-end-features.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/integration/end-to-end-features.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,261 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const society_1 = require("../../core/society");
4
+ const opentelemetry_1 = require("../../observability/opentelemetry");
5
+ const isolated_worker_pool_1 = require("../../utils/isolated-worker-pool");
6
+ const mcp_1 = require("../../capabilities/mcp");
7
+ const mock_model_1 = require("../utils/mock-model");
8
+ describe('End-to-End Feature Integration', () => {
9
+ describe('Agent Builder with ExecutionMode', () => {
10
+ it('should allow setting execution mode via builder', () => {
11
+ const mockModel = new mock_model_1.MockModel();
12
+ const society = society_1.Society.create()
13
+ .withName('Test Society')
14
+ .addAgent((a) => a
15
+ .withId('worker-agent')
16
+ .withName('CPU-Intensive Worker')
17
+ .withRole((r) => r
18
+ .withId('worker-role')
19
+ .withName('Worker')
20
+ .withSystemPrompt('You process heavy computations'))
21
+ .withModel(mockModel)
22
+ .withExecutionMode('isolated'));
23
+ const config = society['_agents'][0];
24
+ expect(config.executionMode).toBe('isolated');
25
+ });
26
+ it('should default to undefined execution mode when not specified', () => {
27
+ const mockModel = new mock_model_1.MockModel();
28
+ const society = society_1.Society.create()
29
+ .withName('Test Society')
30
+ .addAgent((a) => a
31
+ .withId('regular-agent')
32
+ .withRole((r) => r.withId('role').withSystemPrompt('Regular agent'))
33
+ .withModel(mockModel));
34
+ const config = society['_agents'][0];
35
+ expect(config.executionMode).toBeUndefined();
36
+ });
37
+ });
38
+ describe('OpenTelemetry Observer Integration', () => {
39
+ it('should integrate OpenTelemetry observer with Society', async () => {
40
+ const mockModel = new mock_model_1.MockModel();
41
+ const observer = (0, opentelemetry_1.createOpenTelemetryObserver)({
42
+ serviceName: 'test-society',
43
+ exporterType: 'console',
44
+ });
45
+ const society = society_1.Society.create()
46
+ .withName('Observable Society')
47
+ .withObserver(observer)
48
+ .addAgent((a) => a
49
+ .withId('agent1')
50
+ .withRole((r) => r.withId('role1').withSystemPrompt('Test agent'))
51
+ .withModel(mockModel))
52
+ .addTask((t) => t.withId('task1').withAgents(['agent1']));
53
+ const result = await society.execute('Test input');
54
+ expect(result).toBeDefined();
55
+ expect(result.output).toContain('Mock response');
56
+ await observer.shutdown();
57
+ });
58
+ it('should track spans for agent execution', async () => {
59
+ const mockModel = new mock_model_1.MockModel();
60
+ const observer = (0, opentelemetry_1.createOpenTelemetryObserver)({
61
+ serviceName: 'span-tracking',
62
+ exporterType: 'console',
63
+ });
64
+ const society = society_1.Society.create()
65
+ .withName('Span Test Society')
66
+ .withObserver(observer)
67
+ .addAgent((a) => a
68
+ .withId('span-agent')
69
+ .withRole((r) => r.withId('span-role').withSystemPrompt('Test'))
70
+ .withModel(mockModel))
71
+ .addTask((t) => t.withId('span-task').withAgents(['span-agent']));
72
+ await society.execute('Test');
73
+ expect(observer).toBeDefined();
74
+ await observer.shutdown();
75
+ });
76
+ });
77
+ describe('IsolatedWorkerPool Standalone Usage', () => {
78
+ it('should execute agents in isolated worker pool', async () => {
79
+ const pool = new isolated_worker_pool_1.IsolatedWorkerPool(2);
80
+ const mockModel = new mock_model_1.MockModel();
81
+ const agent = {
82
+ id: 'pool-agent',
83
+ name: 'Pool Agent',
84
+ role: {
85
+ id: 'pool-role',
86
+ name: 'Pool Role',
87
+ systemPrompt: 'CPU-intensive task',
88
+ },
89
+ model: mockModel,
90
+ };
91
+ const result = await pool.execute({
92
+ agent,
93
+ input: 'Process this',
94
+ context: {
95
+ input: 'Process this',
96
+ sharedData: new Map(),
97
+ taskResults: new Map(),
98
+ messageHistory: [],
99
+ metadata: {},
100
+ },
101
+ });
102
+ expect(result).toBeDefined();
103
+ expect(result.result).toBeDefined();
104
+ expect(result.duration).toBeGreaterThanOrEqual(0);
105
+ await pool.shutdown();
106
+ });
107
+ it('should handle multiple concurrent tasks in pool', async () => {
108
+ const pool = new isolated_worker_pool_1.IsolatedWorkerPool(3);
109
+ const mockModel = new mock_model_1.MockModel();
110
+ const agent = {
111
+ id: 'concurrent-agent',
112
+ name: 'Concurrent Agent',
113
+ role: {
114
+ id: 'concurrent-role',
115
+ name: 'Concurrent Role',
116
+ systemPrompt: 'Parallel processing',
117
+ },
118
+ model: mockModel,
119
+ };
120
+ const tasks = Array.from({ length: 5 }, (_, i) => pool.execute({
121
+ agent,
122
+ input: `Task ${i}`,
123
+ context: {
124
+ input: `Task ${i}`,
125
+ sharedData: new Map(),
126
+ taskResults: new Map(),
127
+ messageHistory: [],
128
+ metadata: {},
129
+ },
130
+ }));
131
+ const results = await Promise.all(tasks);
132
+ expect(results).toHaveLength(5);
133
+ results.forEach((result) => {
134
+ expect(result.result).toBeDefined();
135
+ expect(result.result.success).toBe(true);
136
+ });
137
+ await pool.shutdown();
138
+ });
139
+ });
140
+ describe('MCP Tools Integration', () => {
141
+ it('should allow adding MCP tools via agent builder', () => {
142
+ const mockModel = new mock_model_1.MockModel();
143
+ const society = society_1.Society.create()
144
+ .withName('MCP Test Society')
145
+ .addAgent((a) => a
146
+ .withId('mcp-agent')
147
+ .withRole((r) => r.withId('mcp-role').withSystemPrompt('Uses MCP tools'))
148
+ .withModel(mockModel)
149
+ .withTools([]))
150
+ .addTask((t) => t.withId('mcp-task').withAgents(['mcp-agent']));
151
+ const agent = society['_agents'][0];
152
+ expect(agent.tools === undefined || agent.tools.length === 0).toBeTruthy();
153
+ });
154
+ it('should expose MCPServers helpers', () => {
155
+ expect(mcp_1.MCPServers.filesystem).toBeDefined();
156
+ expect(mcp_1.MCPServers.github).toBeDefined();
157
+ expect(mcp_1.MCPServers.braveSearch).toBeDefined();
158
+ expect(mcp_1.MCPServers.custom).toBeDefined();
159
+ expect(typeof mcp_1.MCPServers.filesystem).toBe('function');
160
+ expect(typeof mcp_1.MCPServers.github).toBe('function');
161
+ expect(typeof mcp_1.MCPServers.braveSearch).toBe('function');
162
+ expect(typeof mcp_1.MCPServers.custom).toBe('function');
163
+ });
164
+ });
165
+ describe('Complete Integration Scenario', () => {
166
+ it('should integrate all features in a single society', async () => {
167
+ const mockModel = new mock_model_1.MockModel();
168
+ const observer = (0, opentelemetry_1.createOpenTelemetryObserver)({
169
+ serviceName: 'complete-integration',
170
+ exporterType: 'console',
171
+ });
172
+ const society = society_1.Society.create()
173
+ .withName('Complete Integration Society')
174
+ .withDescription('Tests all new features together')
175
+ .withObserver(observer)
176
+ .addAgent((a) => a
177
+ .withId('standard-agent')
178
+ .withName('Standard Agent')
179
+ .withRole((r) => r.withId('standard-role').withSystemPrompt('Standard IO-bound agent'))
180
+ .withModel(mockModel)
181
+ .withTags(['standard', 'io-bound']))
182
+ .addAgent((a) => a
183
+ .withId('cpu-agent')
184
+ .withName('CPU-Intensive Agent')
185
+ .withRole((r) => r.withId('cpu-role').withSystemPrompt('CPU-intensive processing agent'))
186
+ .withModel(mockModel)
187
+ .withExecutionMode('isolated')
188
+ .withTags(['cpu-intensive', 'isolated'])
189
+ .withTools([]))
190
+ .addTask((t) => t.withId('standard-task').withAgents(['standard-agent']).thenGoto(['cpu-task']))
191
+ .addTask((t) => t.withId('cpu-task').withAgents(['cpu-agent']));
192
+ expect(society['_agents']).toHaveLength(2);
193
+ expect(society['_agents'][0].executionMode).toBeUndefined();
194
+ expect(society['_agents'][1].executionMode).toBe('isolated');
195
+ expect(society['_observer']).toBe(observer);
196
+ const result = await society.execute('Process this data');
197
+ expect(result).toBeDefined();
198
+ expect(result.output).toBeDefined();
199
+ await observer.shutdown();
200
+ });
201
+ });
202
+ describe('Feature Compatibility', () => {
203
+ it('should maintain backward compatibility with existing code', async () => {
204
+ const mockModel = new mock_model_1.MockModel();
205
+ const oldStyleSociety = society_1.Society.create()
206
+ .withName('Legacy Society')
207
+ .addAgent((a) => a
208
+ .withId('legacy-agent')
209
+ .withRole((r) => r.withId('legacy-role').withSystemPrompt('Legacy'))
210
+ .withModel(mockModel))
211
+ .addTask((t) => t.withId('legacy-task').withAgents(['legacy-agent']));
212
+ const result = await oldStyleSociety.execute('Test');
213
+ expect(result).toBeDefined();
214
+ expect(result.output).toBeDefined();
215
+ });
216
+ it('should work with partial feature adoption', async () => {
217
+ const mockModel = new mock_model_1.MockModel();
218
+ const observer = (0, opentelemetry_1.createOpenTelemetryObserver)({
219
+ serviceName: 'partial-features',
220
+ exporterType: 'console',
221
+ });
222
+ const society = society_1.Society.create()
223
+ .withName('Partial Feature Society')
224
+ .withObserver(observer)
225
+ .addAgent((a) => a
226
+ .withId('partial-agent')
227
+ .withRole((r) => r.withId('partial-role').withSystemPrompt('Test'))
228
+ .withModel(mockModel))
229
+ .addTask((t) => t.withId('partial-task').withAgents(['partial-agent']));
230
+ const result = await society.execute('Test');
231
+ expect(result).toBeDefined();
232
+ await observer.shutdown();
233
+ });
234
+ });
235
+ describe('Error Handling with New Features', () => {
236
+ it('should handle errors gracefully with observer', async () => {
237
+ const mockModel = new mock_model_1.MockModel();
238
+ const observer = (0, opentelemetry_1.createOpenTelemetryObserver)({
239
+ serviceName: 'error-handling',
240
+ exporterType: 'console',
241
+ });
242
+ mockModel.process = async () => {
243
+ throw new Error('Simulated failure');
244
+ };
245
+ const society = society_1.Society.create()
246
+ .withName('Error Test Society')
247
+ .withObserver(observer)
248
+ .addAgent((a) => a
249
+ .withId('error-agent')
250
+ .withRole((r) => r.withId('error-role').withSystemPrompt('Will fail'))
251
+ .withModel(mockModel))
252
+ .addTask((t) => t.withId('error-task').withAgents(['error-agent']));
253
+ const result = await society.execute('Test');
254
+ expect(result.success).toBe(false);
255
+ expect(result.errors).toBeDefined();
256
+ expect(result.errors.length).toBeGreaterThan(0);
257
+ await observer.shutdown();
258
+ });
259
+ });
260
+ });
261
+ //# sourceMappingURL=end-to-end-features.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"end-to-end-features.test.js","sourceRoot":"","sources":["../../../src/__tests__/integration/end-to-end-features.test.ts"],"names":[],"mappings":";;AAUA,gDAA6C;AAC7C,qEAAgF;AAChF,2EAAsE;AACtE,gDAAoD;AACpD,oDAAgD;AAEhD,QAAQ,CAAC,gCAAgC,EAAE,GAAG,EAAE;IAC9C,QAAQ,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAChD,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;YACzD,MAAM,SAAS,GAAG,IAAI,sBAAS,EAAE,CAAC;YAElC,MAAM,OAAO,GAAG,iBAAO,CAAC,MAAM,EAAE;iBAC7B,QAAQ,CAAC,cAAc,CAAC;iBACxB,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CACd,CAAC;iBACE,MAAM,CAAC,cAAc,CAAC;iBACtB,QAAQ,CAAC,sBAAsB,CAAC;iBAChC,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CACd,CAAC;iBACE,MAAM,CAAC,aAAa,CAAC;iBACrB,QAAQ,CAAC,QAAQ,CAAC;iBAClB,gBAAgB,CAAC,gCAAgC,CAAC,CACtD;iBACA,SAAS,CAAC,SAAS,CAAC;iBACpB,iBAAiB,CAAC,UAAU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,CAAC,CAAC,EAAE,EAAE,CACd,CAAC;iBACE,MAAM,CAAC,aAAa,CAAC;iBACrB,QAAQ,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;iBACrE,SAAS,CAAC,SAAS,CAAC,CACxB;iBACA,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,UAAU,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;YAEtE,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAG7C,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;YACpC,MAAM,CAAC,MAAM,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;YAEjD,MAAM,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC5B,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=execution-mode-integration.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"execution-mode-integration.test.d.ts","sourceRoot":"","sources":["../../../src/__tests__/integration/execution-mode-integration.test.ts"],"names":[],"mappings":""}