societyai 0.1.4 → 0.1.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.
- package/bin/inspect.js +0 -0
- package/bin/societyai.js +300 -28
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/public-api.d.ts +3 -3
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +5 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +1 -1
package/bin/inspect.js
CHANGED
|
File without changes
|
package/bin/societyai.js
CHANGED
|
@@ -171,7 +171,16 @@ async function validateCommand(filePath) {
|
|
|
171
171
|
|
|
172
172
|
// For TypeScript, we need to use ts-node/register
|
|
173
173
|
if (ext === '.ts') {
|
|
174
|
-
|
|
174
|
+
const projectDir = path.dirname(fullPath);
|
|
175
|
+
const originalCwd = process.cwd();
|
|
176
|
+
process.chdir(projectDir);
|
|
177
|
+
const localTsNode = path.join(projectDir, 'node_modules', 'ts-node', 'register');
|
|
178
|
+
try {
|
|
179
|
+
require(localTsNode);
|
|
180
|
+
} catch (e) {
|
|
181
|
+
require('ts-node/register');
|
|
182
|
+
}
|
|
183
|
+
process.chdir(originalCwd);
|
|
175
184
|
}
|
|
176
185
|
|
|
177
186
|
const module = require(fullPath);
|
|
@@ -188,8 +197,12 @@ async function validateCommand(filePath) {
|
|
|
188
197
|
console.warn(colorize('yellow', '⚠️ Warning: Society does not have an execute method'));
|
|
189
198
|
}
|
|
190
199
|
|
|
191
|
-
|
|
192
|
-
|
|
200
|
+
// Use build() to get the SocietyConfig for structure validation
|
|
201
|
+
if (typeof society.build === 'function') {
|
|
202
|
+
const config = society.build();
|
|
203
|
+
if (!config.agents || config.agents.length === 0) {
|
|
204
|
+
console.warn(colorize('yellow', '⚠️ Warning: Society has no agents'));
|
|
205
|
+
}
|
|
193
206
|
}
|
|
194
207
|
}
|
|
195
208
|
|
|
@@ -236,7 +249,16 @@ async function visualizeCommand(filePath, options) {
|
|
|
236
249
|
// Load the module
|
|
237
250
|
const ext = path.extname(fullPath);
|
|
238
251
|
if (ext === '.ts') {
|
|
239
|
-
|
|
252
|
+
const projectDir = path.dirname(fullPath);
|
|
253
|
+
const originalCwd = process.cwd();
|
|
254
|
+
process.chdir(projectDir);
|
|
255
|
+
const localTsNode = path.join(projectDir, 'node_modules', 'ts-node', 'register');
|
|
256
|
+
try {
|
|
257
|
+
require(localTsNode);
|
|
258
|
+
} catch (e) {
|
|
259
|
+
require('ts-node/register');
|
|
260
|
+
}
|
|
261
|
+
process.chdir(originalCwd);
|
|
240
262
|
}
|
|
241
263
|
|
|
242
264
|
const module = require(fullPath);
|
|
@@ -338,8 +360,19 @@ async function runCommand(filePath, options) {
|
|
|
338
360
|
try {
|
|
339
361
|
// Load the module
|
|
340
362
|
const ext = path.extname(fullPath);
|
|
363
|
+
const projectDir = path.dirname(fullPath);
|
|
341
364
|
if (ext === '.ts') {
|
|
342
|
-
|
|
365
|
+
// Change to project directory so ts-node picks up the local tsconfig.json
|
|
366
|
+
const originalCwd = process.cwd();
|
|
367
|
+
process.chdir(projectDir);
|
|
368
|
+
// Use ts-node from the project's own node_modules if available
|
|
369
|
+
const localTsNode = path.join(projectDir, 'node_modules', 'ts-node', 'register');
|
|
370
|
+
try {
|
|
371
|
+
require(localTsNode);
|
|
372
|
+
} catch (e) {
|
|
373
|
+
require('ts-node/register');
|
|
374
|
+
}
|
|
375
|
+
process.chdir(originalCwd);
|
|
343
376
|
}
|
|
344
377
|
|
|
345
378
|
const module = require(fullPath);
|
|
@@ -418,6 +451,8 @@ async function runCommand(filePath, options) {
|
|
|
418
451
|
console.log(colorize('green', `\n💾 State saved to: ${saveState}`));
|
|
419
452
|
}
|
|
420
453
|
|
|
454
|
+
process.exit(0);
|
|
455
|
+
|
|
421
456
|
} catch (error) {
|
|
422
457
|
const duration = Date.now() - startTime;
|
|
423
458
|
console.error(colorize('red', `\n❌ Execution failed after ${duration}ms: ${error.message}`));
|
|
@@ -430,7 +465,7 @@ async function runCommand(filePath, options) {
|
|
|
430
465
|
|
|
431
466
|
// Init command
|
|
432
467
|
async function initCommand(template, options) {
|
|
433
|
-
const templateName =
|
|
468
|
+
const templateName = options.template || options.t || template || 'basic';
|
|
434
469
|
const outputDir = options.output || options.o || '.';
|
|
435
470
|
const projectName = options.name || 'my-society';
|
|
436
471
|
|
|
@@ -458,10 +493,12 @@ export const society = Society.create()
|
|
|
458
493
|
.sequential()
|
|
459
494
|
);
|
|
460
495
|
|
|
461
|
-
// Execute
|
|
462
|
-
|
|
463
|
-
.
|
|
464
|
-
|
|
496
|
+
// Execute (only when run directly, not when imported by CLI tools)
|
|
497
|
+
if (require.main === module) {
|
|
498
|
+
society.execute('Hello World')
|
|
499
|
+
.then(result => console.log(result.output))
|
|
500
|
+
.catch(console.error);
|
|
501
|
+
}
|
|
465
502
|
`,
|
|
466
503
|
'package.json': JSON.stringify({
|
|
467
504
|
name: projectName,
|
|
@@ -502,13 +539,26 @@ npm start
|
|
|
502
539
|
|
|
503
540
|
- \`society.ts\` - Main society configuration
|
|
504
541
|
`,
|
|
542
|
+
'tsconfig.json': JSON.stringify({
|
|
543
|
+
compilerOptions: {
|
|
544
|
+
target: 'ES2020',
|
|
545
|
+
module: 'commonjs',
|
|
546
|
+
moduleResolution: 'node',
|
|
547
|
+
esModuleInterop: true,
|
|
548
|
+
strict: false,
|
|
549
|
+
skipLibCheck: true,
|
|
550
|
+
outDir: 'dist',
|
|
551
|
+
},
|
|
552
|
+
'ts-node': {
|
|
553
|
+
transpileOnly: true,
|
|
554
|
+
},
|
|
555
|
+
}, null, 2),
|
|
505
556
|
},
|
|
506
557
|
|
|
507
558
|
advanced: {
|
|
508
|
-
'society.ts': `import { Society } from 'societyai';
|
|
509
|
-
import { MockModel } from 'societyai/adapters';
|
|
559
|
+
'society.ts': `import { Society, StandardModelBase, MiddlewareChain, Middlewares } from 'societyai';
|
|
510
560
|
|
|
511
|
-
const model = new
|
|
561
|
+
const model = new StandardModelBase({}, async () => 'Hello from mock model!').withName('mock');
|
|
512
562
|
|
|
513
563
|
export const society = Society.create()
|
|
514
564
|
.withName('${projectName}')
|
|
@@ -516,7 +566,6 @@ export const society = Society.create()
|
|
|
516
566
|
.withId('analyzer')
|
|
517
567
|
.withRole(role => role.withSystemPrompt('Analyze the input and extract key insights'))
|
|
518
568
|
.withModel(model)
|
|
519
|
-
.withExecutionMode('isolated')
|
|
520
569
|
)
|
|
521
570
|
.addAgent(agent => agent
|
|
522
571
|
.withId('validator')
|
|
@@ -529,23 +578,34 @@ export const society = Society.create()
|
|
|
529
578
|
.withModel(model)
|
|
530
579
|
)
|
|
531
580
|
.addTask(task => task
|
|
532
|
-
.withId('
|
|
533
|
-
.withAgents(['analyzer'
|
|
534
|
-
.withInstructions('
|
|
535
|
-
.
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
581
|
+
.withId('analyze')
|
|
582
|
+
.withAgents(['analyzer'])
|
|
583
|
+
.withInstructions('Analyze the input')
|
|
584
|
+
.sequential()
|
|
585
|
+
)
|
|
586
|
+
.addTask(task => task
|
|
587
|
+
.withId('validate')
|
|
588
|
+
.withAgents(['validator'])
|
|
589
|
+
.withInstructions('Validate the analysis')
|
|
590
|
+
.dependsOn('analyze')
|
|
539
591
|
.sequential()
|
|
540
592
|
)
|
|
541
|
-
.
|
|
542
|
-
.
|
|
543
|
-
.
|
|
593
|
+
.addTask(task => task
|
|
594
|
+
.withId('format')
|
|
595
|
+
.withAgents(['formatter'])
|
|
596
|
+
.withInstructions('Format the final output')
|
|
597
|
+
.dependsOn('validate')
|
|
598
|
+
.sequential()
|
|
599
|
+
)
|
|
600
|
+
.addMiddleware(
|
|
601
|
+
MiddlewareChain.create()
|
|
602
|
+
.use(Middlewares.logging())
|
|
603
|
+
.use(Middlewares.timing())
|
|
544
604
|
);
|
|
545
605
|
|
|
546
|
-
// Execute
|
|
606
|
+
// Execute (only when run directly, not when imported by CLI tools)
|
|
547
607
|
if (require.main === module) {
|
|
548
|
-
society.execute(
|
|
608
|
+
society.execute('Hello World')
|
|
549
609
|
.then(result => console.log(result.output))
|
|
550
610
|
.catch(console.error);
|
|
551
611
|
}
|
|
@@ -593,6 +653,209 @@ npm start
|
|
|
593
653
|
- Agents: analyzer, validator, formatter
|
|
594
654
|
- Pipeline: analyzer → validator → formatter
|
|
595
655
|
`,
|
|
656
|
+
'tsconfig.json': JSON.stringify({
|
|
657
|
+
compilerOptions: {
|
|
658
|
+
target: 'ES2020',
|
|
659
|
+
module: 'commonjs',
|
|
660
|
+
moduleResolution: 'node',
|
|
661
|
+
esModuleInterop: true,
|
|
662
|
+
strict: false,
|
|
663
|
+
skipLibCheck: true,
|
|
664
|
+
outDir: 'dist',
|
|
665
|
+
},
|
|
666
|
+
'ts-node': {
|
|
667
|
+
transpileOnly: true,
|
|
668
|
+
},
|
|
669
|
+
}, null, 2),
|
|
670
|
+
},
|
|
671
|
+
|
|
672
|
+
mcp: {
|
|
673
|
+
'society.ts': `import { Society, StandardModelBase, MCPServers } from 'societyai';
|
|
674
|
+
|
|
675
|
+
const model = new StandardModelBase({}, async (input) => \`Processed: \${input}\`).withName('mock');
|
|
676
|
+
|
|
677
|
+
async function main() {
|
|
678
|
+
// Connect to an MCP filesystem server (adjust the path as needed)
|
|
679
|
+
const fsTools = await MCPServers.filesystem(process.cwd());
|
|
680
|
+
|
|
681
|
+
const society = Society.create()
|
|
682
|
+
.withName('${projectName}')
|
|
683
|
+
.addAgent(agent => agent
|
|
684
|
+
.withId('assistant')
|
|
685
|
+
.withRole(role => role
|
|
686
|
+
.withSystemPrompt('You are a helpful assistant with access to filesystem tools.')
|
|
687
|
+
.withTools(fsTools.getTools())
|
|
688
|
+
)
|
|
689
|
+
.withModel(model)
|
|
690
|
+
)
|
|
691
|
+
.addTask(task => task
|
|
692
|
+
.withId('main')
|
|
693
|
+
.withAgents(['assistant'])
|
|
694
|
+
.withInstructions('Process the input using available tools')
|
|
695
|
+
.sequential()
|
|
696
|
+
);
|
|
697
|
+
|
|
698
|
+
try {
|
|
699
|
+
const result = await society.execute('Hello World');
|
|
700
|
+
console.log(result.output);
|
|
701
|
+
} finally {
|
|
702
|
+
await fsTools.disconnect();
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
main().catch(console.error);
|
|
707
|
+
`,
|
|
708
|
+
'package.json': JSON.stringify({
|
|
709
|
+
name: projectName,
|
|
710
|
+
version: '1.0.0',
|
|
711
|
+
description: `A SocietyAI project with MCP tool integration`,
|
|
712
|
+
main: 'society.ts',
|
|
713
|
+
scripts: {
|
|
714
|
+
start: 'ts-node society.ts',
|
|
715
|
+
validate: 'societyai validate society.ts',
|
|
716
|
+
visualize: 'societyai visualize society.ts --format html --output graph.html',
|
|
717
|
+
},
|
|
718
|
+
dependencies: {
|
|
719
|
+
'societyai': '^0.1.0',
|
|
720
|
+
},
|
|
721
|
+
devDependencies: {
|
|
722
|
+
'ts-node': '^10.9.0',
|
|
723
|
+
'typescript': '^5.7.0',
|
|
724
|
+
},
|
|
725
|
+
}, null, 2),
|
|
726
|
+
'README.md': `# ${projectName}
|
|
727
|
+
|
|
728
|
+
A SocietyAI project with Model Context Protocol (MCP) tool integration.
|
|
729
|
+
|
|
730
|
+
## Getting Started
|
|
731
|
+
|
|
732
|
+
\`\`\`bash
|
|
733
|
+
npm install
|
|
734
|
+
npm start
|
|
735
|
+
\`\`\`
|
|
736
|
+
|
|
737
|
+
## Structure
|
|
738
|
+
|
|
739
|
+
- \`society.ts\` - Main society configuration with MCP tool support
|
|
740
|
+
- Uses MCPServers.filesystem to give agents access to filesystem tools
|
|
741
|
+
`,
|
|
742
|
+
'tsconfig.json': JSON.stringify({
|
|
743
|
+
compilerOptions: {
|
|
744
|
+
target: 'ES2020',
|
|
745
|
+
module: 'commonjs',
|
|
746
|
+
moduleResolution: 'node',
|
|
747
|
+
esModuleInterop: true,
|
|
748
|
+
strict: false,
|
|
749
|
+
skipLibCheck: true,
|
|
750
|
+
outDir: 'dist',
|
|
751
|
+
},
|
|
752
|
+
'ts-node': {
|
|
753
|
+
transpileOnly: true,
|
|
754
|
+
},
|
|
755
|
+
}, null, 2),
|
|
756
|
+
},
|
|
757
|
+
|
|
758
|
+
'multi-tenant': {
|
|
759
|
+
'society.ts': `import { Society, StandardModelBase } from 'societyai';
|
|
760
|
+
|
|
761
|
+
const model = new StandardModelBase({}, async (input) => \`Tenant response: \${input}\`).withName('mock');
|
|
762
|
+
|
|
763
|
+
// Factory function to create a society for a specific tenant
|
|
764
|
+
function createTenantSociety(tenantId: string, tenantConfig: { name: string; instructions: string }) {
|
|
765
|
+
return Society.create(\`society-\${tenantId}\`)
|
|
766
|
+
.withName(\`\${tenantConfig.name} Society\`)
|
|
767
|
+
.withGlobalContext({ tenantId, tenantName: tenantConfig.name })
|
|
768
|
+
.addAgent(agent => agent
|
|
769
|
+
.withId(\`agent-\${tenantId}\`)
|
|
770
|
+
.withRole(role => role.withSystemPrompt(tenantConfig.instructions))
|
|
771
|
+
.withModel(model)
|
|
772
|
+
)
|
|
773
|
+
.addTask(task => task
|
|
774
|
+
.withId('main')
|
|
775
|
+
.withAgents([\`agent-\${tenantId}\`])
|
|
776
|
+
.withInstructions('Process the input for this tenant')
|
|
777
|
+
.sequential()
|
|
778
|
+
);
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
// Define tenants
|
|
782
|
+
const tenants = [
|
|
783
|
+
{ id: 'tenant-a', name: 'Tenant A', instructions: 'You handle support tickets for Tenant A. Be formal.' },
|
|
784
|
+
{ id: 'tenant-b', name: 'Tenant B', instructions: 'You handle support tickets for Tenant B. Be friendly.' },
|
|
785
|
+
];
|
|
786
|
+
|
|
787
|
+
// Export the multi-tenant runner
|
|
788
|
+
export async function runForTenant(tenantId: string, input: string) {
|
|
789
|
+
const tenant = tenants.find(t => t.id === tenantId);
|
|
790
|
+
if (!tenant) throw new Error(\`Unknown tenant: \${tenantId}\`);
|
|
791
|
+
|
|
792
|
+
const society = createTenantSociety(tenant.id, { name: tenant.name, instructions: tenant.instructions });
|
|
793
|
+
return society.execute(input);
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
// Run example with all tenants
|
|
797
|
+
async function main() {
|
|
798
|
+
const input = 'Hello, I need help with my account';
|
|
799
|
+
for (const tenant of tenants) {
|
|
800
|
+
const society = createTenantSociety(tenant.id, { name: tenant.name, instructions: tenant.instructions });
|
|
801
|
+
const result = await society.execute(input);
|
|
802
|
+
console.log(\`[\${tenant.name}]: \${result.output}\`);
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
if (require.main === module) {
|
|
807
|
+
main().catch(console.error);
|
|
808
|
+
}
|
|
809
|
+
`,
|
|
810
|
+
'package.json': JSON.stringify({
|
|
811
|
+
name: projectName,
|
|
812
|
+
version: '1.0.0',
|
|
813
|
+
description: `A multi-tenant SocietyAI project`,
|
|
814
|
+
main: 'society.ts',
|
|
815
|
+
scripts: {
|
|
816
|
+
start: 'ts-node society.ts',
|
|
817
|
+
validate: 'societyai validate society.ts',
|
|
818
|
+
visualize: 'societyai visualize society.ts --format html --output graph.html',
|
|
819
|
+
},
|
|
820
|
+
dependencies: {
|
|
821
|
+
'societyai': '^0.1.0',
|
|
822
|
+
},
|
|
823
|
+
devDependencies: {
|
|
824
|
+
'ts-node': '^10.9.0',
|
|
825
|
+
'typescript': '^5.7.0',
|
|
826
|
+
},
|
|
827
|
+
}, null, 2),
|
|
828
|
+
'README.md': `# ${projectName}
|
|
829
|
+
|
|
830
|
+
A multi-tenant SocietyAI project where each tenant gets an isolated society instance.
|
|
831
|
+
|
|
832
|
+
## Getting Started
|
|
833
|
+
|
|
834
|
+
\`\`\`bash
|
|
835
|
+
npm install
|
|
836
|
+
npm start
|
|
837
|
+
\`\`\`
|
|
838
|
+
|
|
839
|
+
## Structure
|
|
840
|
+
|
|
841
|
+
- \`society.ts\` - Multi-tenant society factory and runner
|
|
842
|
+
- Each tenant gets its own isolated society with custom instructions
|
|
843
|
+
- Use \`runForTenant(tenantId, input)\` to execute for a specific tenant
|
|
844
|
+
`,
|
|
845
|
+
'tsconfig.json': JSON.stringify({
|
|
846
|
+
compilerOptions: {
|
|
847
|
+
target: 'ES2020',
|
|
848
|
+
module: 'commonjs',
|
|
849
|
+
moduleResolution: 'node',
|
|
850
|
+
esModuleInterop: true,
|
|
851
|
+
strict: false,
|
|
852
|
+
skipLibCheck: true,
|
|
853
|
+
outDir: 'dist',
|
|
854
|
+
},
|
|
855
|
+
'ts-node': {
|
|
856
|
+
transpileOnly: true,
|
|
857
|
+
},
|
|
858
|
+
}, null, 2),
|
|
596
859
|
},
|
|
597
860
|
};
|
|
598
861
|
|
|
@@ -600,7 +863,7 @@ npm start
|
|
|
600
863
|
|
|
601
864
|
if (!selectedTemplate) {
|
|
602
865
|
console.error(colorize('red', `❌ Unknown template: ${templateName}`));
|
|
603
|
-
console.error(colorize('dim', 'Available templates: basic, advanced'));
|
|
866
|
+
console.error(colorize('dim', 'Available templates: basic, advanced, mcp, multi-tenant'));
|
|
604
867
|
process.exit(1);
|
|
605
868
|
}
|
|
606
869
|
|
|
@@ -714,7 +977,16 @@ async function diffCommand(file1, file2) {
|
|
|
714
977
|
const ext2 = path.extname(path2);
|
|
715
978
|
|
|
716
979
|
if (ext1 === '.ts' || ext2 === '.ts') {
|
|
717
|
-
|
|
980
|
+
const projectDir = path.dirname(path1);
|
|
981
|
+
const originalCwd = process.cwd();
|
|
982
|
+
process.chdir(projectDir);
|
|
983
|
+
const localTsNode = path.join(projectDir, 'node_modules', 'ts-node', 'register');
|
|
984
|
+
try {
|
|
985
|
+
require(localTsNode);
|
|
986
|
+
} catch (e) {
|
|
987
|
+
require('ts-node/register');
|
|
988
|
+
}
|
|
989
|
+
process.chdir(originalCwd);
|
|
718
990
|
}
|
|
719
991
|
|
|
720
992
|
const module1 = require(path1);
|
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,8 @@ export { ModelAdapters, SerializableModelConfig, ModelAdapter, isSerializableMod
|
|
|
13
13
|
export { SocietyExecutor } from './agents/society-executor';
|
|
14
14
|
export { Society, SocietyPatterns, AggregationStrategies, FluentRoleBuilder, FluentAgentBuilder, FluentTaskBuilder, FluentPipelineBuilder, FluentRoleBuilder as RoleBuilder, FluentAgentBuilder as AgentBuilder, FluentTaskBuilder as TaskBuilder, roleBuilder, agentBuilder, createRole, createAgent, } from './builders/builder';
|
|
15
15
|
export type { PipelineConfig, PipelinePattern } from './builders/builder';
|
|
16
|
-
export { MiddlewareChain, ComposedMiddleware, MiddlewareWrappedModel, Middlewares, StepMiddlewares, InMemoryMetricsCollector, } from './core/middleware';
|
|
17
|
-
export type { Middleware, MiddlewareFn, MiddlewareContext, MiddlewareResult, NextFunction, MetricsCollector, StepMiddleware, StepMiddlewareFn, StepMiddlewareContext, } from './core/middleware';
|
|
16
|
+
export { MiddlewareChain, ComposedMiddleware, MiddlewareWrappedModel, Middlewares, StepMiddlewares, StreamMiddlewares, composeStreamingMiddleware, applyStreamingMiddleware, InMemoryMetricsCollector, } from './core/middleware';
|
|
17
|
+
export type { Middleware, MiddlewareFn, MiddlewareContext, MiddlewareResult, NextFunction, MetricsCollector, StepMiddleware, StepMiddlewareFn, StepMiddlewareContext, StreamingMiddleware, StreamingMiddlewareContext, StreamingMiddlewareFn, } from './core/middleware';
|
|
18
18
|
export { createContextToken, isContextToken, ContextProvider, ContextProviderBuilder, ContextScope, CommonContexts, ContextStore, ContextMap, selectContext, fromObject, toObject, mergeContexts, AgentContextInjector, ContextAwarePromptBuilder, } from './core/context';
|
|
19
19
|
export type { ContextToken, IContextProvider, IMutableContextProvider } from './core/context';
|
|
20
20
|
export { SocietyEventEmitter, FilteredEventEmitter, ProgressTracker, EventLogger, EventAggregator, createEventEmitter, createProgressTracker, createEventLogger, } from './observability/events';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts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oBAAoB,EACpB,iBAAiB,GAClB,MAAM,0CAA0C,CAAC;AAMlD,OAAO,EAEL,mBAAmB,EAEnB,kBAAkB,EAElB,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,cAAc,EACd,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,aAAa,EACb,iBAAiB,EAEjB,mBAAmB,GACpB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAMxE,OAAO,EAEL,mBAAmB,EACnB,WAAW,EACX,kBAAkB,EAElB,sBAAsB,EACtB,YAAY,EACZ,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.GraphVisualizer = exports.PostgresStorageAdapter = exports.RedisStorageAdapter = exports.FileStorageAdapter = exports.wrapEngineAsModel = exports.EngineAsModel = exports.VectorStoreAdapter = exports.InMemoryVectorStore = exports.createSelfCorrectingValidator = exports.SelfCorrectingValidator = exports.createSchema = exports.validateJSON = exports.StructuredOutputBuilder = exports.StructuredOutputValidator = exports.EntityMemory = exports.LongTermMemory = exports.ShortTermMemory = exports.MemoryBuilder = exports.MemorySystem = exports.BuiltInTools = exports.ToolBuilder = exports.ToolExecutor = exports.ToolRegistry = exports.NodeType = exports.GraphBuilder = exports.ExecutionEngine = exports.SocietyGraph = exports.createEventLogger = void 0;
|
|
17
|
+
exports.EventLogger = exports.ProgressTracker = exports.FilteredEventEmitter = exports.SocietyEventEmitter = exports.ContextAwarePromptBuilder = exports.AgentContextInjector = exports.mergeContexts = exports.toObject = exports.fromObject = exports.selectContext = exports.ContextMap = exports.ContextStore = exports.CommonContexts = exports.ContextScope = exports.ContextProviderBuilder = exports.ContextProvider = exports.isContextToken = exports.createContextToken = exports.InMemoryMetricsCollector = exports.applyStreamingMiddleware = exports.composeStreamingMiddleware = exports.StreamMiddlewares = exports.StepMiddlewares = exports.Middlewares = exports.MiddlewareWrappedModel = exports.ComposedMiddleware = exports.MiddlewareChain = exports.createAgent = exports.createRole = exports.agentBuilder = exports.roleBuilder = exports.TaskBuilder = exports.AgentBuilder = exports.RoleBuilder = exports.FluentPipelineBuilder = exports.FluentTaskBuilder = exports.FluentAgentBuilder = exports.FluentRoleBuilder = exports.AggregationStrategies = exports.SocietyPatterns = exports.Society = exports.SocietyExecutor = exports.createModelFromConfig = exports.isSerializableModelConfig = exports.ModelAdapters = exports.MCPServers = exports.MCPToolProvider = exports.createOpenTelemetryObserver = exports.OpenTelemetryObserver = exports.IsolatedWorkerPool = void 0;
|
|
18
|
+
exports.GraphVisualizer = exports.PostgresStorageAdapter = exports.RedisStorageAdapter = exports.FileStorageAdapter = exports.wrapEngineAsModel = exports.EngineAsModel = exports.VectorStoreAdapter = exports.InMemoryVectorStore = exports.createSelfCorrectingValidator = exports.SelfCorrectingValidator = exports.createSchema = exports.validateJSON = exports.StructuredOutputBuilder = exports.StructuredOutputValidator = exports.EntityMemory = exports.LongTermMemory = exports.ShortTermMemory = exports.MemoryBuilder = exports.MemorySystem = exports.BuiltInTools = exports.ToolBuilder = exports.ToolExecutor = exports.ToolRegistry = exports.NodeType = exports.GraphBuilder = exports.ExecutionEngine = exports.SocietyGraph = exports.createEventLogger = exports.createProgressTracker = exports.createEventEmitter = exports.EventAggregator = void 0;
|
|
19
19
|
__exportStar(require("./public-api"), exports);
|
|
20
20
|
__exportStar(require("./core/types"), exports);
|
|
21
21
|
__exportStar(require("./core/config"), exports);
|
|
@@ -59,6 +59,9 @@ Object.defineProperty(exports, "ComposedMiddleware", { enumerable: true, get: fu
|
|
|
59
59
|
Object.defineProperty(exports, "MiddlewareWrappedModel", { enumerable: true, get: function () { return middleware_1.MiddlewareWrappedModel; } });
|
|
60
60
|
Object.defineProperty(exports, "Middlewares", { enumerable: true, get: function () { return middleware_1.Middlewares; } });
|
|
61
61
|
Object.defineProperty(exports, "StepMiddlewares", { enumerable: true, get: function () { return middleware_1.StepMiddlewares; } });
|
|
62
|
+
Object.defineProperty(exports, "StreamMiddlewares", { enumerable: true, get: function () { return middleware_1.StreamMiddlewares; } });
|
|
63
|
+
Object.defineProperty(exports, "composeStreamingMiddleware", { enumerable: true, get: function () { return middleware_1.composeStreamingMiddleware; } });
|
|
64
|
+
Object.defineProperty(exports, "applyStreamingMiddleware", { enumerable: true, get: function () { return middleware_1.applyStreamingMiddleware; } });
|
|
62
65
|
Object.defineProperty(exports, "InMemoryMetricsCollector", { enumerable: true, get: function () { return middleware_1.InMemoryMetricsCollector; } });
|
|
63
66
|
var context_1 = require("./core/context");
|
|
64
67
|
Object.defineProperty(exports, "createContextToken", { enumerable: true, get: function () { return context_1.createContextToken; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAgEA,+CAA6B;AAM7B,+CAA6B;AAC7B,gDAA8B;AAM9B,gDAA8B;AAM9B,yDAAuC;AAMvC,gDAA8B;AAM9B,sDAAoC;AACpC,qEAAkE;AAAzD,0HAAA,kBAAkB,OAAA;AAM3B,+DAIuC;AAHrC,sHAAA,qBAAqB,OAAA;AACrB,4HAAA,2BAA2B,OAAA;AAQ7B,0CAAuF;AAA9E,sGAAA,eAAe,OAAA;AAAE,iGAAA,UAAU,OAAA;AAMpC,gDAA8B;AAM9B,uCAMoB;AALlB,yGAAA,aAA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AAA;AACZ,qGAAA,YAAY,OAAA;AACZ,oGAAA,WAAW,OAAA;AAEX,qGAAA,YAAY,OAAA;AAad,gDAe+B;AAb7B,sGAAA,YAAY,OAAA;AACZ,uGAAA,aAAa,OAAA;AACb,yGAAA,eAAe,OAAA;AACf,wGAAA,cAAc,OAAA;AACd,sGAAA,YAAY,OAAA;AAed,wDAWmC;AATjC,uHAAA,yBAAyB,OAAA;AACzB,qHAAA,uBAAuB,OAAA;AAEvB,0GAAA,YAAY,OAAA;AACZ,0GAAA,YAAY,OAAA;AAWd,sFAQkD;AANhD,oIAAA,uBAAuB,OAAA;AACvB,0IAAA,6BAA6B,OAAA;AAW/B,4DAYqC;AAVnC,mHAAA,mBAAmB,OAAA;AAEnB,kHAAA,kBAAkB,OAAA;AAcpB,+DAMqC;AAJnC,gHAAA,aAAa,OAAA;AACb,oHAAA,iBAAiB,OAAA;AASnB,kDAAwD;AAA/C,iHAAA,kBAAkB,OAAA;AAO3B,uCASoB;AAPlB,+GAAA,mBAAmB,OAAA;AAInB,kHAAA,sBAAsB,OAAA;AASxB,iEAA+D;AAAtD,mHAAA,eAAe,OAAA"}
|
package/dist/public-api.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export type AgentExecutionMode = 'default' | 'isolated';
|
|
|
3
3
|
export { SocietyError, ModelNotSupportedError, ProcessingFailedError, InvalidAgentCountError, NoModelsSpecifiedError, SynthesisModelRequiredError, OperationCancelledError, ExecutionTimeoutError, InvalidConfigurationError, InvalidWorkflowRoutingError, NotImplementedError, AgentNotFoundError, CircularDependencyError, isAbortError, wrapError, } from './core/errors';
|
|
4
4
|
export { Society, SocietyPatterns, AggregationStrategies, FluentRoleBuilder, FluentAgentBuilder, FluentTaskBuilder, FluentPipelineBuilder, FluentRoleBuilder as RoleBuilder, FluentAgentBuilder as AgentBuilder, FluentTaskBuilder as TaskBuilder, roleBuilder, agentBuilder, } from './builders/builder';
|
|
5
5
|
export type { PipelineConfig, PipelinePattern } from './builders/builder';
|
|
6
|
-
export { MiddlewareChain, Middlewares, StepMiddlewares, InMemoryMetricsCollector, } from './core/middleware';
|
|
7
|
-
export type { Middleware, MiddlewareContext, MiddlewareResult, MetricsCollector, } from './core/middleware';
|
|
6
|
+
export { MiddlewareChain, Middlewares, StepMiddlewares, InMemoryMetricsCollector, StreamMiddlewares, composeStreamingMiddleware, applyStreamingMiddleware, } from './core/middleware';
|
|
7
|
+
export type { Middleware, MiddlewareContext, MiddlewareResult, MetricsCollector, StreamingMiddleware, StreamingMiddlewareContext, StreamingMiddlewareFn, } from './core/middleware';
|
|
8
8
|
export { ToolRegistry, ToolBuilder, BuiltInTools } from './capabilities/tools';
|
|
9
9
|
export type { Tool, ToolCall, ToolResult, ToolContext } from './capabilities/tools';
|
|
10
10
|
export { MemorySystem, MemoryBuilder } from './capabilities/memory';
|
|
@@ -19,5 +19,5 @@ export { withRetry } from './utils/retry';
|
|
|
19
19
|
export type { RetryOptions } from './core/config';
|
|
20
20
|
export { getLogger, setLogger, DefaultLogger as ConsoleLogger } from './observability/logger';
|
|
21
21
|
export type { Logger } from './core/config';
|
|
22
|
-
export declare const VERSION = "0.1.
|
|
22
|
+
export declare const VERSION = "0.1.5";
|
|
23
23
|
//# sourceMappingURL=public-api.d.ts.map
|
package/dist/public-api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAqBA,YAAY,EACV,OAAO,EACP,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,CAAC;AAMxD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,SAAS,GACV,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,IAAI,WAAW,EAChC,kBAAkB,IAAI,YAAY,EAClC,iBAAiB,IAAI,WAAW,EAChC,WAAW,EACX,YAAY,GACb,MAAM,oBAAoB,CAAC;AAE5B,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAM1E,OAAO,EACL,eAAe,EACf,WAAW,EACX,eAAe,EACf,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EACV,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":"AAqBA,YAAY,EACV,OAAO,EACP,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,eAAe,GAChB,MAAM,cAAc,CAAC;AAGtB,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,UAAU,CAAC;AAMxD,OAAO,EACL,YAAY,EACZ,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,EACnB,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,SAAS,GACV,MAAM,eAAe,CAAC;AAMvB,OAAO,EACL,OAAO,EACP,eAAe,EACf,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,IA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,eAAe,CAAC;AAMlD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE9F,YAAY,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAM5C,eAAO,MAAM,OAAO,UAAU,CAAC"}
|
package/dist/public-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.VERSION = exports.ConsoleLogger = exports.setLogger = exports.getLogger = exports.withRetry = exports.isSerializableModelConfig = exports.ModelAdapters = exports.FileStorageAdapter = exports.createSchema = exports.validateJSON = exports.StructuredOutputValidator = exports.MemoryBuilder = exports.MemorySystem = exports.BuiltInTools = exports.ToolBuilder = exports.ToolRegistry = exports.InMemoryMetricsCollector = exports.StepMiddlewares = exports.Middlewares = exports.MiddlewareChain = exports.agentBuilder = exports.roleBuilder = exports.TaskBuilder = exports.AgentBuilder = exports.RoleBuilder = exports.FluentPipelineBuilder = exports.FluentTaskBuilder = exports.FluentAgentBuilder = exports.FluentRoleBuilder = exports.AggregationStrategies = exports.SocietyPatterns = exports.Society = exports.wrapError = exports.isAbortError = exports.CircularDependencyError = exports.AgentNotFoundError = exports.NotImplementedError = exports.InvalidWorkflowRoutingError = exports.InvalidConfigurationError = exports.ExecutionTimeoutError = exports.OperationCancelledError = exports.SynthesisModelRequiredError = exports.NoModelsSpecifiedError = exports.InvalidAgentCountError = exports.ProcessingFailedError = exports.ModelNotSupportedError = exports.SocietyError = void 0;
|
|
3
|
+
exports.VERSION = exports.ConsoleLogger = exports.setLogger = exports.getLogger = exports.withRetry = exports.isSerializableModelConfig = exports.ModelAdapters = exports.FileStorageAdapter = exports.createSchema = exports.validateJSON = exports.StructuredOutputValidator = exports.MemoryBuilder = exports.MemorySystem = exports.BuiltInTools = exports.ToolBuilder = exports.ToolRegistry = exports.applyStreamingMiddleware = exports.composeStreamingMiddleware = exports.StreamMiddlewares = exports.InMemoryMetricsCollector = exports.StepMiddlewares = exports.Middlewares = exports.MiddlewareChain = exports.agentBuilder = exports.roleBuilder = exports.TaskBuilder = exports.AgentBuilder = exports.RoleBuilder = exports.FluentPipelineBuilder = exports.FluentTaskBuilder = exports.FluentAgentBuilder = exports.FluentRoleBuilder = exports.AggregationStrategies = exports.SocietyPatterns = exports.Society = exports.wrapError = exports.isAbortError = exports.CircularDependencyError = exports.AgentNotFoundError = exports.NotImplementedError = exports.InvalidWorkflowRoutingError = exports.InvalidConfigurationError = exports.ExecutionTimeoutError = exports.OperationCancelledError = exports.SynthesisModelRequiredError = exports.NoModelsSpecifiedError = exports.InvalidAgentCountError = exports.ProcessingFailedError = exports.ModelNotSupportedError = exports.SocietyError = void 0;
|
|
4
4
|
var errors_1 = require("./core/errors");
|
|
5
5
|
Object.defineProperty(exports, "SocietyError", { enumerable: true, get: function () { return errors_1.SocietyError; } });
|
|
6
6
|
Object.defineProperty(exports, "ModelNotSupportedError", { enumerable: true, get: function () { return errors_1.ModelNotSupportedError; } });
|
|
@@ -35,6 +35,9 @@ Object.defineProperty(exports, "MiddlewareChain", { enumerable: true, get: funct
|
|
|
35
35
|
Object.defineProperty(exports, "Middlewares", { enumerable: true, get: function () { return middleware_1.Middlewares; } });
|
|
36
36
|
Object.defineProperty(exports, "StepMiddlewares", { enumerable: true, get: function () { return middleware_1.StepMiddlewares; } });
|
|
37
37
|
Object.defineProperty(exports, "InMemoryMetricsCollector", { enumerable: true, get: function () { return middleware_1.InMemoryMetricsCollector; } });
|
|
38
|
+
Object.defineProperty(exports, "StreamMiddlewares", { enumerable: true, get: function () { return middleware_1.StreamMiddlewares; } });
|
|
39
|
+
Object.defineProperty(exports, "composeStreamingMiddleware", { enumerable: true, get: function () { return middleware_1.composeStreamingMiddleware; } });
|
|
40
|
+
Object.defineProperty(exports, "applyStreamingMiddleware", { enumerable: true, get: function () { return middleware_1.applyStreamingMiddleware; } });
|
|
38
41
|
var tools_1 = require("./capabilities/tools");
|
|
39
42
|
Object.defineProperty(exports, "ToolRegistry", { enumerable: true, get: function () { return tools_1.ToolRegistry; } });
|
|
40
43
|
Object.defineProperty(exports, "ToolBuilder", { enumerable: true, get: function () { return tools_1.ToolBuilder; } });
|
|
@@ -57,5 +60,5 @@ var logger_1 = require("./observability/logger");
|
|
|
57
60
|
Object.defineProperty(exports, "getLogger", { enumerable: true, get: function () { return logger_1.getLogger; } });
|
|
58
61
|
Object.defineProperty(exports, "setLogger", { enumerable: true, get: function () { return logger_1.setLogger; } });
|
|
59
62
|
Object.defineProperty(exports, "ConsoleLogger", { enumerable: true, get: function () { return logger_1.DefaultLogger; } });
|
|
60
|
-
exports.VERSION = '0.1.
|
|
63
|
+
exports.VERSION = '0.1.5';
|
|
61
64
|
//# sourceMappingURL=public-api.js.map
|
package/dist/public-api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../src/public-api.ts"],"names":[],"mappings":";;;AAyCA,wCAgBuB;AAfrB,sGAAA,YAAY,OAAA;AACZ,gHAAA,sBAAsB,OAAA;AACtB,+GAAA,qBAAqB,OAAA;AACrB,gHAAA,sBAAsB,OAAA;AACtB,gHAAA,sBAAsB,OAAA;AACtB,qHAAA,2BAA2B,OAAA;AAC3B,iHAAA,uBAAuB,OAAA;AACvB,+GAAA,qBAAqB,OAAA;AACrB,mHAAA,yBAAyB,OAAA;AACzB,qHAAA,2BAA2B,OAAA;AAC3B,6GAAA,mBAAmB,OAAA;AACnB,4GAAA,kBAAkB,OAAA;AAClB,iHAAA,uBAAuB,OAAA;AACvB,sGAAA,YAAY,OAAA;AACZ,mGAAA,SAAS,OAAA;AAOX,8CAa4B;AAZ1B,kGAAA,OAAO,OAAA;AACP,0GAAA,eAAe,OAAA;AACf,gHAAA,qBAAqB,OAAA;AACrB,4GAAA,iBAAiB,OAAA;AACjB,6GAAA,kBAAkB,OAAA;AAClB,4GAAA,iBAAiB,OAAA;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qGAAA,YAAY,OAAA;AAAE,oGAAA,WAAW,OAAA;AAAE,qGAAA,YAAY,OAAA;AAQhD,gDAAoE;AAA3D,sGAAA,YAAY,OAAA;AAAE,uGAAA,aAAa,OAAA;AAapC,wDAAkG;AAAzF,uHAAA,yBAAyB,OAAA;AAAE,0GAAA,YAAY,OAAA;AAAE,0GAAA,YAAY,OAAA;AAQ9D,kDAAwD;AAA/C,iHAAA,kBAAkB,OAAA;AAO3B,uCAAsE;AAA7D,yGAAA,aAAa,OAAA;AAAE,qHAAA,yBAAyB,OAAA;AAQjD,uCAA0C;AAAjC,kGAAA,SAAS,OAAA;AAOlB,iDAA8F;AAArF,mGAAA,SAAS,OAAA;AAAE,mGAAA,SAAS,OAAA;AAAE,uGAAA,aAAa,OAAiB;AAQhD,QAAA,OAAO,GAAG,OAAO,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "societyai",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "A powerful TypeScript library for creating collaborative multi-agent AI systems with DAG-based orchestration. Build sophisticated workflows where AI agents work together through dependency graphs, conditional routing, and pluggable execution strategies. Features thread-safe parallel execution, memory management, and circuit breaker patterns for production-grade reliability.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|