network-ai 4.11.2 → 4.12.1

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.
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ /**
3
+ * Skill Composer — Meta-operations for composing agent execution
4
+ *
5
+ * Provides chain(), batch(), loop(), and verify() combinators that orchestrate
6
+ * multiple agent calls into higher-level workflows. Works with any AdapterRegistry.
7
+ *
8
+ * Inspired by Claw-Code's skill composition pattern.
9
+ *
10
+ * @module SkillComposer
11
+ * @version 1.0.0
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.SkillComposer = void 0;
15
+ // ============================================================================
16
+ // SKILL COMPOSER
17
+ // ============================================================================
18
+ /**
19
+ * Composes agent execution into higher-level workflows.
20
+ *
21
+ * @example
22
+ * ```typescript
23
+ * const composer = new SkillComposer(registry, { agentId: 'orchestrator' });
24
+ *
25
+ * // Sequential chain — output of each step feeds into next
26
+ * const results = await composer.chain([
27
+ * { agentId: 'researcher', payload: { action: 'search', params: { query: 'AI safety' } } },
28
+ * { agentId: 'writer', payload: { action: 'draft', params: {} } },
29
+ * { agentId: 'reviewer', payload: { action: 'review', params: {} } },
30
+ * ]);
31
+ *
32
+ * // Parallel batch with concurrency limit
33
+ * const batchResults = await composer.batch(steps, 5);
34
+ * ```
35
+ */
36
+ class SkillComposer {
37
+ registry;
38
+ baseContext;
39
+ /**
40
+ * @param registry The adapter registry to execute agents through
41
+ * @param baseContext Default execution context (merged with step-level overrides)
42
+ */
43
+ constructor(registry, baseContext) {
44
+ this.registry = registry;
45
+ this.baseContext = baseContext;
46
+ }
47
+ /**
48
+ * Execute steps sequentially. Each step's result is passed as
49
+ * `blackboardSnapshot.previousResult` to the next step.
50
+ *
51
+ * Stops on first failure unless `continueOnError` is true.
52
+ */
53
+ async chain(steps, continueOnError = false) {
54
+ const start = Date.now();
55
+ const results = [];
56
+ let successCount = 0;
57
+ let failureCount = 0;
58
+ let previousResult = undefined;
59
+ for (const step of steps) {
60
+ const payload = {
61
+ ...step.payload,
62
+ blackboardSnapshot: {
63
+ ...step.payload.blackboardSnapshot,
64
+ previousResult,
65
+ },
66
+ };
67
+ const ctx = { ...this.baseContext, ...step.context };
68
+ const result = await this.registry.executeAgent(step.agentId, payload, ctx);
69
+ results.push(result);
70
+ if (result.success) {
71
+ successCount++;
72
+ previousResult = result.data;
73
+ }
74
+ else {
75
+ failureCount++;
76
+ if (!continueOnError)
77
+ break;
78
+ }
79
+ }
80
+ return {
81
+ success: failureCount === 0,
82
+ results,
83
+ totalMs: Date.now() - start,
84
+ successCount,
85
+ failureCount,
86
+ };
87
+ }
88
+ /**
89
+ * Execute steps in parallel with an optional concurrency limit.
90
+ *
91
+ * @param steps Steps to execute
92
+ * @param concurrency Max parallel executions (default: all at once)
93
+ */
94
+ async batch(steps, concurrency) {
95
+ const start = Date.now();
96
+ const limit = concurrency ?? steps.length;
97
+ const results = new Array(steps.length);
98
+ let successCount = 0;
99
+ let failureCount = 0;
100
+ // Process in chunks of `limit`
101
+ for (let i = 0; i < steps.length; i += limit) {
102
+ const chunk = steps.slice(i, i + limit);
103
+ const chunkResults = await Promise.all(chunk.map((step, idx) => {
104
+ const ctx = { ...this.baseContext, ...step.context };
105
+ return this.registry.executeAgent(step.agentId, step.payload, ctx);
106
+ }));
107
+ for (let j = 0; j < chunkResults.length; j++) {
108
+ results[i + j] = chunkResults[j];
109
+ if (chunkResults[j].success) {
110
+ successCount++;
111
+ }
112
+ else {
113
+ failureCount++;
114
+ }
115
+ }
116
+ }
117
+ return {
118
+ success: failureCount === 0,
119
+ results,
120
+ totalMs: Date.now() - start,
121
+ successCount,
122
+ failureCount,
123
+ };
124
+ }
125
+ /**
126
+ * Repeatedly execute a step while `condition` returns true.
127
+ *
128
+ * @param step The step to repeat
129
+ * @param options Loop options (condition + maxIterations)
130
+ */
131
+ async loop(step, options) {
132
+ const start = Date.now();
133
+ const maxIter = options.maxIterations ?? 10;
134
+ const results = [];
135
+ let successCount = 0;
136
+ let failureCount = 0;
137
+ for (let i = 0; i < maxIter; i++) {
138
+ const ctx = {
139
+ ...this.baseContext,
140
+ ...step.context,
141
+ metadata: { ...this.baseContext.metadata, ...step.context?.metadata, iteration: i },
142
+ };
143
+ const result = await this.registry.executeAgent(step.agentId, step.payload, ctx);
144
+ results.push(result);
145
+ if (result.success) {
146
+ successCount++;
147
+ }
148
+ else {
149
+ failureCount++;
150
+ }
151
+ if (!options.condition(result, i))
152
+ break;
153
+ }
154
+ return {
155
+ success: failureCount === 0,
156
+ results,
157
+ totalMs: Date.now() - start,
158
+ successCount,
159
+ failureCount,
160
+ };
161
+ }
162
+ /**
163
+ * Execute a step and retry until the validator accepts the result or retries are exhausted.
164
+ *
165
+ * @param step The step to execute and verify
166
+ * @param options Verify options (validator + maxRetries)
167
+ */
168
+ async verify(step, options) {
169
+ const maxRetries = options.maxRetries ?? 3;
170
+ for (let attempt = 0; attempt <= maxRetries; attempt++) {
171
+ const ctx = {
172
+ ...this.baseContext,
173
+ ...step.context,
174
+ metadata: { ...this.baseContext.metadata, ...step.context?.metadata, attempt },
175
+ };
176
+ const result = await this.registry.executeAgent(step.agentId, step.payload, ctx);
177
+ if (result.success && options.validator(result)) {
178
+ return result;
179
+ }
180
+ // Last attempt — return whatever we got
181
+ if (attempt === maxRetries) {
182
+ return result;
183
+ }
184
+ }
185
+ // Unreachable, but TypeScript needs it
186
+ return { success: false, error: { code: 'VERIFY_EXHAUSTED', message: 'All retries exhausted', recoverable: false } };
187
+ }
188
+ }
189
+ exports.SkillComposer = SkillComposer;
190
+ //# sourceMappingURL=skill-composer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-composer.js","sourceRoot":"","sources":["../../lib/skill-composer.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAyDH,+EAA+E;AAC/E,iBAAiB;AACjB,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAa,aAAa;IAChB,QAA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@
1
1
  {
2
2
  "name": "network-ai",
3
- "version": "4.11.2",
3
+ "version": "4.12.1",
4
4
  "description": "AI agent orchestration framework for TypeScript/Node.js - 17 adapters (LangChain, AutoGen, CrewAI, OpenAI Assistants, LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, OpenClaw, A2A, Codex, MiniMax, NemoClaw, APS + streaming variants). Built-in CLI, security, swarm intelligence, real-time streaming, and agentic workflow patterns.",
5
5
  "homepage": "https://network-ai.org",
6
6
  "main": "dist/index.js",
@@ -33,6 +33,7 @@
33
33
  "test:nemoclaw": "npx ts-node test-nemoclaw.ts",
34
34
  "test:cli": "npx ts-node test-cli.ts",
35
35
  "test:qa": "npx ts-node test-qa.ts",
36
+ "test:phase7": "npx ts-node test-phase7.ts",
36
37
  "test:all": "npx ts-node run-tests.ts",
37
38
  "setup": "npx ts-node setup.ts",
38
39
  "setup:check": "npx ts-node setup.ts --check",
@@ -96,7 +97,7 @@
96
97
  "devDependencies": {
97
98
  "@types/node": "^25.5.0",
98
99
  "dotenv": "^17.3.1",
99
- "openai": "^6.31.0",
100
+ "openai": "^6.33.0",
100
101
  "ts-node": "^10.9.2",
101
102
  "typescript": "^5.9.3"
102
103
  },
@@ -105,6 +106,7 @@
105
106
  "bin/",
106
107
  "types/",
107
108
  "scripts/",
109
+ "socket.json",
108
110
  "README.md",
109
111
  "QUICKSTART.md",
110
112
  "INTEGRATION_GUIDE.md",
package/socket.json ADDED
@@ -0,0 +1,181 @@
1
+ {
2
+ "version": 2,
3
+ "ignore": {
4
+ "evalDynamicCodeExecution": [
5
+ {
6
+ "path": "lib/blackboard-validator.ts",
7
+ "reason": "False positive — this pattern is part of dangerous-code detection for untrusted agent content written to the blackboard. It does not execute code."
8
+ },
9
+ {
10
+ "path": "dist/lib/blackboard-validator.js",
11
+ "reason": "False positive — compiled output of the dangerous-code detector. It matches risky input patterns and does not execute code."
12
+ }
13
+ ],
14
+ "networkAccess": [
15
+ {
16
+ "path": "adapters/a2a-adapter.ts",
17
+ "reason": "Intentional — A2AAdapter implements the Google Agent-to-Agent protocol and sends outbound HTTP requests only to agent endpoints explicitly registered by the user."
18
+ },
19
+ {
20
+ "path": "dist/adapters/a2a-adapter.js",
21
+ "reason": "Intentional — compiled output of A2AAdapter. It talks only to agent endpoints explicitly registered by the user."
22
+ },
23
+ {
24
+ "path": "adapters/custom-adapter.ts",
25
+ "reason": "Intentional — CustomAdapter can call a caller-supplied HTTP endpoint as part of its documented bring-your-own-client behavior."
26
+ },
27
+ {
28
+ "path": "dist/adapters/custom-adapter.js",
29
+ "reason": "Intentional — compiled output of CustomAdapter. It calls a caller-supplied endpoint as part of documented adapter behavior."
30
+ },
31
+ {
32
+ "path": "adapters/aps-adapter.ts",
33
+ "reason": "Intentional — APSAdapter can verify delegation chains through a configured remote verifier endpoint when that mode is enabled by the caller."
34
+ },
35
+ {
36
+ "path": "dist/adapters/aps-adapter.js",
37
+ "reason": "Intentional — compiled output of APSAdapter. It talks only to a caller-configured verifier endpoint when that verification mode is enabled."
38
+ },
39
+ {
40
+ "path": "lib/mcp-transport-sse.ts",
41
+ "reason": "Intentional — McpSseTransport is the HTTP and SSE transport layer for MCP. Serving and connecting over HTTP is its documented role."
42
+ },
43
+ {
44
+ "path": "dist/lib/mcp-transport-sse.js",
45
+ "reason": "Intentional — compiled output of the MCP HTTP and SSE transport layer."
46
+ },
47
+ {
48
+ "path": "dist/bin/mcp-server.js",
49
+ "reason": "Intentional — network-ai-server is an opt-in CLI binary that starts an MCP HTTP and SSE server only when the user invokes it explicitly."
50
+ },
51
+ {
52
+ "path": "adapters/codex-adapter.ts",
53
+ "reason": "Intentional — CodexAdapter sends outbound requests to OpenAI or a caller-provided base URL as part of its documented adapter behavior."
54
+ },
55
+ {
56
+ "path": "dist/adapters/codex-adapter.js",
57
+ "reason": "Intentional — compiled output of CodexAdapter. It talks to OpenAI or a caller-provided base URL."
58
+ },
59
+ {
60
+ "path": "adapters/minimax-adapter.ts",
61
+ "reason": "Intentional — MiniMaxAdapter sends outbound requests to MiniMax's API as part of its documented adapter behavior."
62
+ },
63
+ {
64
+ "path": "dist/adapters/minimax-adapter.js",
65
+ "reason": "Intentional — compiled output of MiniMaxAdapter. It talks to MiniMax endpoints as configured by the caller."
66
+ }
67
+ ],
68
+ "urlStrings": [
69
+ {
70
+ "path": "dist/adapters/custom-adapter.js",
71
+ "reason": "Intentional — CustomAdapter accepts user-supplied endpoint URLs (config.url) as its core function. URLs are provided by the caller at runtime, not hard-coded."
72
+ },
73
+ {
74
+ "path": "dist/adapters/mcp-adapter.js",
75
+ "reason": "Intentional — MCPAdapter documents example MCP endpoint URL patterns in comments. No runtime URL is hard-coded."
76
+ },
77
+ {
78
+ "path": "dist/bin/mcp-server.js",
79
+ "reason": "Intentional — mcp-server.js is the MCP server binary; localhost URLs are for the server it starts (e.g. http://localhost:3001/sse) and are documented in help text and comments."
80
+ },
81
+ {
82
+ "path": "adapters/codex-adapter.ts",
83
+ "reason": "Intentional — CodexAdapter uses https://api.openai.com as default baseUrl for OpenAI API calls. Users can override via config.baseUrl."
84
+ },
85
+ {
86
+ "path": "dist/adapters/codex-adapter.js",
87
+ "reason": "Intentional — CodexAdapter uses https://api.openai.com as default baseUrl for OpenAI API calls. Users can override via config.baseUrl."
88
+ },
89
+ {
90
+ "path": "adapters/minimax-adapter.ts",
91
+ "reason": "Intentional — MiniMaxAdapter uses https://api.minimax.io/v1 as default baseUrl for MiniMax API calls. Users can override via config.baseUrl."
92
+ },
93
+ {
94
+ "path": "dist/adapters/minimax-adapter.js",
95
+ "reason": "Intentional — MiniMaxAdapter uses https://api.minimax.io/v1 as default baseUrl for MiniMax API calls. Users can override via config.baseUrl."
96
+ }
97
+ ],
98
+ "envVars": [
99
+ {
100
+ "path": "security.ts",
101
+ "reason": "Intentional — reads SWARM_TOKEN_SECRET and SWARM_ENCRYPTION_KEY env vars as an opt-in mechanism for users to supply secrets without hard-coding them."
102
+ },
103
+ {
104
+ "path": "dist/security.js",
105
+ "reason": "Intentional — compiled output of security.ts. Reads SWARM_TOKEN_SECRET and SWARM_ENCRYPTION_KEY env vars."
106
+ },
107
+ {
108
+ "path": "adapters/codex-adapter.ts",
109
+ "reason": "Intentional — CodexAdapter reads OPENAI_API_KEY env var as a fallback when no API key is provided via config. Declared in skill.json env section."
110
+ },
111
+ {
112
+ "path": "dist/adapters/codex-adapter.js",
113
+ "reason": "Intentional — compiled output of codex-adapter.ts. Reads OPENAI_API_KEY env var."
114
+ },
115
+ {
116
+ "path": "adapters/minimax-adapter.ts",
117
+ "reason": "Intentional — MiniMaxAdapter reads MINIMAX_API_KEY env var as a fallback when no API key is provided via config. Declared in skill.json env section."
118
+ },
119
+ {
120
+ "path": "dist/adapters/minimax-adapter.js",
121
+ "reason": "Intentional — compiled output of minimax-adapter.ts. Reads MINIMAX_API_KEY env var."
122
+ },
123
+ {
124
+ "path": "setup.ts",
125
+ "reason": "Intentional — setup module checks for OPENAI_API_KEY env var to provide helpful configuration guidance. Declared in skill.json env section."
126
+ },
127
+ {
128
+ "path": "dist/setup.js",
129
+ "reason": "Intentional — compiled output of setup.ts. Checks for OPENAI_API_KEY env var."
130
+ }
131
+ ],
132
+ "shellExec": [
133
+ {
134
+ "path": "adapters/nemoclaw-adapter.ts",
135
+ "reason": "Intentional — NemoClawAdapter's default executor uses child_process.execFile to invoke the openshell CLI for sandbox management. This is the fallback when no custom executor is provided. Users are expected to bring their own executor in production."
136
+ },
137
+ {
138
+ "path": "dist/adapters/nemoclaw-adapter.js",
139
+ "reason": "Intentional — compiled output of nemoclaw-adapter.ts. Uses child_process.execFile to invoke the openshell CLI."
140
+ },
141
+ {
142
+ "path": "examples/05-code-review-swarm.ts",
143
+ "reason": "Intentional — example script uses execSync('npx tsc --noEmit') to demonstrate automated TypeScript type-checking in a code review pipeline. Not part of the core library."
144
+ },
145
+ {
146
+ "path": "examples/demo-runner.ts",
147
+ "reason": "Intentional — demo runner uses spawn('npx', ['ts-node', file]) to execute example scripts. This is a developer convenience script, not part of the core library."
148
+ }
149
+ ],
150
+ "filesystemAccess": [
151
+ {
152
+ "path": "dist/index.js",
153
+ "reason": "Intentional — the blackboard uses a file-backed store (data/ directory) as its persistence layer. Filesystem access is the explicit purpose of the local-first architecture."
154
+ },
155
+ {
156
+ "path": "dist/run.js",
157
+ "reason": "Intentional — run.ts bootstraps the local blackboard and reads/writes the data directory. File I/O is the core mechanism."
158
+ },
159
+ {
160
+ "path": "dist/security.js",
161
+ "reason": "Intentional — security module writes the HMAC-signed audit log to data/audit_log.jsonl. Append-only filesystem writes are the audit trail mechanism."
162
+ },
163
+ {
164
+ "path": "dist/lib/locked-blackboard.js",
165
+ "reason": "Intentional — LockedBlackboard uses atomic file rename + fsync for its mutex. Filesystem access is the locking primitive."
166
+ },
167
+ {
168
+ "path": "dist/lib/mcp-tools-extended.js",
169
+ "reason": "Intentional — extended MCP tools expose blackboard snapshot and audit log query over MCP; these read from the data/ directory."
170
+ },
171
+ {
172
+ "path": "dist/lib/mcp-transport-sse.js",
173
+ "reason": "Intentional — SSE transport reads config from the filesystem. File access is for configuration loading only."
174
+ },
175
+ {
176
+ "path": "dist/lib/swarm-utils.js",
177
+ "reason": "Intentional — swarm-utils reads/writes the shared blackboard file and audit log. Filesystem I/O is the persistence layer."
178
+ }
179
+ ]
180
+ }
181
+ }
@@ -227,6 +227,7 @@ export type AdapterEventType =
227
227
  | 'adapter:registered'
228
228
  | 'adapter:initialized'
229
229
  | 'adapter:shutdown'
230
+ | 'adapter:deferred'
230
231
  | 'adapter:error'
231
232
  | 'agent:execution:start'
232
233
  | 'agent:execution:complete'