network-ai 4.12.0 → 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.
@@ -70,7 +70,7 @@ class AdapterHookManager {
70
70
  * @returns true if a hook was removed
71
71
  */
72
72
  unregister(name) {
73
- for (const [phase, list] of this.hooks.entries()) {
73
+ for (const [, list] of this.hooks.entries()) {
74
74
  const idx = list.findIndex(h => h.name === name);
75
75
  if (idx !== -1) {
76
76
  list.splice(idx, 1);
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-hooks.js","sourceRoot":"","sources":["../../lib/adapter-hooks.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AA8CH,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAa,kBAAkB;IACrB,KAAK,GAAoC,IAAI,GAAG,CAAC;QACvD,CAAC,eAAe,EAAE,EAAE,CAAC;QACrB,CAAC,cAAc,EAAE,EAAE,CAAC;QACpB,CAAC,SAAS,EAAE,EAAE,CAAC;KAChB,CAAC,CAAC;IAEH;;;OAGG;IACH,QAAQ,CAAC,IAAmB;QAC1B,4CAA4C;QAC5C,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;YAC7C,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;gBAC/C,MAAM,IAAI,KAAK,CAAC,SAAS,IAAI,CAAC,IAAI,yBAAyB,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;QAED,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAE,CAAC;QACzC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,iCAAiC;QACjC,IAAI,CAAC,IAAI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AAC;YACvC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IAEO,KAAK,CAAC,QAAQ,CAAC,KAAgB,EAAE,GAAgB;QACvD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAC1C,IAAI,OAAO,GAAG,GAAG,CAAC;QAClB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AArHD,gDAqHC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "network-ai",
3
- "version": "4.12.0",
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",
@@ -106,6 +106,7 @@
106
106
  "bin/",
107
107
  "types/",
108
108
  "scripts/",
109
+ "socket.json",
109
110
  "README.md",
110
111
  "QUICKSTART.md",
111
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
+ }