network-ai 4.9.1 → 4.10.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.
- package/INTEGRATION_GUIDE.md +3 -2
- package/QUICKSTART.md +12 -11
- package/README.md +60 -17
- package/SKILL.md +3 -3
- package/dist/adapters/aps-adapter.d.ts +129 -0
- package/dist/adapters/aps-adapter.d.ts.map +1 -0
- package/dist/adapters/aps-adapter.js +289 -0
- package/dist/adapters/aps-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +2 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +4 -1
- package/dist/adapters/index.js.map +1 -1
- package/package.json +7 -4
- package/socket.json +0 -169
package/INTEGRATION_GUIDE.md
CHANGED
|
@@ -64,7 +64,7 @@ Answers drive `AuthGuardian` configuration and audit log retention policy.
|
|
|
64
64
|
|
|
65
65
|
## 2. Framework Mapping
|
|
66
66
|
|
|
67
|
-
Network-AI ships
|
|
67
|
+
Network-AI ships 17 adapters. Map your existing agents to the right one:
|
|
68
68
|
|
|
69
69
|
| Your Stack | Network-AI Adapter | Notes |
|
|
70
70
|
|-----------|-------------------|-------|
|
|
@@ -83,6 +83,7 @@ Network-AI ships 16 adapters. Map your existing agents to the right one:
|
|
|
83
83
|
| OpenAI Codex CLI | `CodexAdapter` | Codex CLI task execution |
|
|
84
84
|
| MiniMax | `MiniMaxAdapter` | MiniMax chat completions (M2.5) |
|
|
85
85
|
| NVIDIA NemoClaw | `NemoClawAdapter` | Sandboxed agent execution via OpenShell |
|
|
86
|
+
| APS delegation chains | `APSAdapter` | Delegation-chain trust mapping for AuthGuardian |
|
|
86
87
|
| **Anything else** | `CustomAdapter` | Wrap any async function or HTTP endpoint |
|
|
87
88
|
|
|
88
89
|
### No matching framework?
|
|
@@ -463,7 +464,7 @@ Run these before declaring the integration production-ready:
|
|
|
463
464
|
|----------|---------------|
|
|
464
465
|
| [QUICKSTART.md](QUICKSTART.md) | Get running in 5 minutes |
|
|
465
466
|
| [QUICKSTART.md § CLI](QUICKSTART.md) | CLI reference — bb, auth, budget, audit commands |
|
|
466
|
-
| [references/adapter-system.md](references/adapter-system.md) | All
|
|
467
|
+
| [references/adapter-system.md](references/adapter-system.md) | All 17 adapters with code examples |
|
|
467
468
|
| [references/trust-levels.md](references/trust-levels.md) | Trust scoring formula and agent roles |
|
|
468
469
|
| [references/auth-guardian.md](references/auth-guardian.md) | Permission system, justification scoring, token lifecycle |
|
|
469
470
|
| [references/blackboard-schema.md](references/blackboard-schema.md) | Blackboard key conventions and namespacing |
|
package/QUICKSTART.md
CHANGED
|
@@ -18,7 +18,7 @@ npm install
|
|
|
18
18
|
npx ts-node setup.ts --check
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
**Zero external AI dependencies.** All
|
|
21
|
+
**Zero external AI dependencies.** All 17 adapters are self-contained — add framework SDKs only when you need them.
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -42,7 +42,7 @@ npx ts-node setup.ts --check
|
|
|
42
42
|
| `a2a` | A2A | none | Agent-to-Agent protocol |
|
|
43
43
|
| `codex` | Codex | `openai` | OpenAI Codex CLI |
|
|
44
44
|
| `minimax` | MiniMax | none | MiniMax chat completions |
|
|
45
|
-
| `nemoclaw` | NemoClaw | none | NVIDIA sandboxed agent execution |
|
|
45
|
+
| `nemoclaw` | NemoClaw | none | NVIDIA sandboxed agent execution |\n| `aps` | APS | none | Delegation-chain trust mapping |
|
|
46
46
|
|
|
47
47
|
---
|
|
48
48
|
|
|
@@ -218,9 +218,9 @@ export class MyFrameworkAdapter extends BaseAdapter {
|
|
|
218
218
|
## 8. Run Tests
|
|
219
219
|
|
|
220
220
|
```bash
|
|
221
|
-
npx ts-node test-standalone.ts #
|
|
222
|
-
npx ts-node test-security.ts #
|
|
223
|
-
npx ts-node test-adapters.ts #
|
|
221
|
+
npx ts-node test-standalone.ts # 88 core tests
|
|
222
|
+
npx ts-node test-security.ts # 34 security tests
|
|
223
|
+
npx ts-node test-adapters.ts # 176 adapter tests (all 17 frameworks)
|
|
224
224
|
npx ts-node test-cli.ts # 65 CLI tests
|
|
225
225
|
```
|
|
226
226
|
|
|
@@ -230,7 +230,7 @@ npx ts-node test-cli.ts # 65 CLI tests
|
|
|
230
230
|
|
|
231
231
|
```bash
|
|
232
232
|
npx ts-node setup.ts --check # Verify installation
|
|
233
|
-
npx ts-node setup.ts --list # List all
|
|
233
|
+
npx ts-node setup.ts --list # List all 17 adapters
|
|
234
234
|
npx ts-node setup.ts --example # Generate example.ts
|
|
235
235
|
```
|
|
236
236
|
|
|
@@ -347,7 +347,8 @@ Your App
|
|
|
347
347
|
├── OpenAIAssistantsAdapter── OpenAI Assistants
|
|
348
348
|
├── HaystackAdapter ─── Haystack pipelines
|
|
349
349
|
├── DSPyAdapter ─── DSPy modules
|
|
350
|
-
|
|
350
|
+
├── AgnoAdapter ─── Agno agents/teams
|
|
351
|
+
└── APSAdapter ─── APS delegation-chain trust
|
|
351
352
|
```
|
|
352
353
|
|
|
353
354
|
---
|
|
@@ -523,14 +524,14 @@ const pillars = ['reliability', 'security', 'cost', 'operations', 'performance']
|
|
|
523
524
|
|
|
524
525
|
// Fan-out: each agent writes to its own section independently
|
|
525
526
|
for (const pillar of pillars) {
|
|
526
|
-
const id = board.propose(`
|
|
527
|
+
const id = board.propose(`review:${pillar}`, { score: Math.random(), findings: [] }, pillar);
|
|
527
528
|
board.validate(id, 'orchestrator');
|
|
528
529
|
board.commit(id);
|
|
529
530
|
}
|
|
530
531
|
|
|
531
532
|
// Fan-in: orchestrator reads all results and synthesises
|
|
532
|
-
const results = pillars.map(p => ({ pillar: p, ...board.read(`
|
|
533
|
-
const id = board.propose('
|
|
533
|
+
const results = pillars.map(p => ({ pillar: p, ...board.read(`review:${p}`) }));
|
|
534
|
+
const id = board.propose('review:summary', {
|
|
534
535
|
overall: results.reduce((s, r) => s + r.score, 0) / results.length,
|
|
535
536
|
pillars: results,
|
|
536
537
|
}, 'orchestrator');
|
|
@@ -568,7 +569,7 @@ import SwarmOrchestrator, {
|
|
|
568
569
|
// Factory
|
|
569
570
|
import { createSwarmOrchestrator } from 'network-ai';
|
|
570
571
|
|
|
571
|
-
// All
|
|
572
|
+
// All 17 adapters
|
|
572
573
|
import {
|
|
573
574
|
AdapterRegistry, BaseAdapter,
|
|
574
575
|
OpenClawAdapter, LangChainAdapter, AutoGenAdapter,
|
package/README.md
CHANGED
|
@@ -5,24 +5,29 @@
|
|
|
5
5
|
[](https://jovancoding.github.io/Network-AI/)
|
|
6
6
|
[](https://github.com/Jovancoding/Network-AI/actions/workflows/ci.yml)
|
|
7
7
|
[](https://github.com/Jovancoding/Network-AI/actions/workflows/codeql.yml)
|
|
8
|
-
[](https://github.com/Jovancoding/Network-AI/releases)
|
|
9
9
|
[](https://www.npmjs.com/package/network-ai)
|
|
10
|
-
[](#testing)
|
|
11
|
+
[](#adapter-system)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://socket.dev/npm/package/network-ai/overview)
|
|
14
14
|
[](https://nodejs.org)
|
|
15
15
|
[](https://typescriptlang.org)
|
|
16
16
|
[](https://clawhub.ai/skills/network-ai)
|
|
17
17
|
[](INTEGRATION_GUIDE.md)
|
|
18
|
+
[](https://github.com/sponsors/Jovancoding)
|
|
18
19
|
[](https://discord.gg/Cab5vAxc86)
|
|
19
20
|
[](https://glama.ai/mcp/servers/Jovancoding/network-ai)
|
|
20
21
|
|
|
22
|
+
<p align="center">
|
|
23
|
+
<img src="assets/demo.svg" alt="Network-AI control-plane demo — atomic blackboard, priority preemption, AuthGuardian, FSM governance" width="720">
|
|
24
|
+
</p>
|
|
25
|
+
|
|
21
26
|
Network-AI is a TypeScript/Node.js multi-agent orchestrator that adds coordination, guardrails, and governance to any AI agent stack.
|
|
22
27
|
|
|
23
28
|
- **Shared blackboard with locking** — atomic `propose → validate → commit` prevents race conditions and split-brain failures across parallel agents
|
|
24
29
|
- **Guardrails and budgets** — FSM governance, per-agent token ceilings, HMAC / Ed25519 audit trails, and permission gating
|
|
25
|
-
- **
|
|
30
|
+
- **17 adapters** — LangChain (+ streaming), AutoGen, CrewAI, OpenAI Assistants, LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, Custom (+ streaming), OpenClaw, A2A, Codex, MiniMax, NemoClaw, and APS — no glue code, no lock-in
|
|
26
31
|
- **Persistent project memory (Layer 3)** — `context_manager.py` injects decisions, goals, stack, milestones, and banned patterns into every system prompt so agents always have full project context
|
|
27
32
|
|
|
28
33
|
> **The silent failure mode in multi-agent systems:** parallel agents writing to the same key
|
|
@@ -39,17 +44,54 @@ Network-AI is a TypeScript/Node.js multi-agent orchestrator that adds coordinati
|
|
|
39
44
|
|
|
40
45
|
[**5-minute quickstart →**](QUICKSTART.md) | [**Architecture →**](ARCHITECTURE.md) | [**All adapters →**](#adapter-system) | [**Benchmarks →**](BENCHMARKS.md)
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## ⚡ Try in 60 Seconds
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm install network-ai
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
import { LockedBlackboard } from 'network-ai';
|
|
57
|
+
|
|
58
|
+
const board = new LockedBlackboard('.');
|
|
59
|
+
const id = board.propose('status', { ready: true }, 'agent-1');
|
|
60
|
+
board.validate(id, 'agent-1');
|
|
61
|
+
board.commit(id);
|
|
62
|
+
|
|
63
|
+
console.log(board.read('status')); // { ready: true }
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Two agents, atomic writes, no race conditions. That's it.
|
|
67
|
+
|
|
68
|
+
Want the full stress test? **No API key, ~3 seconds:**
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
npx ts-node examples/08-control-plane-stress-demo.ts
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Runs priority preemption, AuthGuardian permission gating, FSM governance, and compliance monitoring — all without a single LLM call.
|
|
75
|
+
|
|
49
76
|
> If it saves you from a race condition, a ⭐ helps others find it.
|
|
50
77
|
|
|
51
78
|
---
|
|
52
79
|
|
|
80
|
+
## What's Included
|
|
81
|
+
|
|
82
|
+
| | |
|
|
83
|
+
|---|---|
|
|
84
|
+
| ✅ Atomic shared state | `propose → validate → commit` with filesystem mutex — no split-brain |
|
|
85
|
+
| ✅ Token budgets | Hard per-agent ceilings with live spend tracking |
|
|
86
|
+
| ✅ Permission gating | HMAC / Ed25519-signed tokens, scoped per agent and resource |
|
|
87
|
+
| ✅ Append-only audit log | Every write, grant, and transition signed and logged |
|
|
88
|
+
| ✅ 17 framework adapters | LangChain, CrewAI, AutoGen, MCP, Codex, APS, and 11 more — zero lock-in |
|
|
89
|
+
| ✅ FSM governance | Hard-stop agents at state boundaries, timeout enforcement |
|
|
90
|
+
| ✅ Compliance monitoring | Real-time violation detection (tool abuse, turn-taking, timeouts) |
|
|
91
|
+
| ✅ TypeScript native | ES2022 strict mode, zero native dependencies |
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
53
95
|
## Why teams use Network-AI
|
|
54
96
|
|
|
55
97
|
| Problem | How Network-AI solves it |
|
|
@@ -57,7 +99,7 @@ Network-AI is a TypeScript/Node.js multi-agent orchestrator that adds coordinati
|
|
|
57
99
|
| Race conditions in parallel agents | Atomic blackboard: `propose → validate → commit` with file-system mutex |
|
|
58
100
|
| Agent overspend / runaway costs | `FederatedBudget` — hard per-agent token ceilings with live spend tracking |
|
|
59
101
|
| No visibility into what agents did | HMAC / Ed25519-signed audit log on every write, permission grant, and FSM transition |
|
|
60
|
-
| Locked into one AI framework |
|
|
102
|
+
| Locked into one AI framework | 17 adapters — mix LangChain + AutoGen + CrewAI + Codex + MiniMax + NemoClaw + APS + custom in one swarm |
|
|
61
103
|
| Agents escalating beyond their scope | `AuthGuardian` — scoped permission tokens required before sensitive operations |
|
|
62
104
|
| Agents lack project context between runs | `ProjectContextManager` (Layer 3) — inject decisions, goals, stack, and milestones into every system prompt |
|
|
63
105
|
|
|
@@ -275,7 +317,7 @@ npx ts-node examples/10-nemoclaw-sandbox-swarm.ts
|
|
|
275
317
|
|
|
276
318
|
## Adapter System
|
|
277
319
|
|
|
278
|
-
|
|
320
|
+
17 adapters, zero adapter dependencies. You bring your own SDK objects.
|
|
279
321
|
|
|
280
322
|
| Adapter | Framework / Protocol | Register method |
|
|
281
323
|
|---|---|---|
|
|
@@ -295,6 +337,7 @@ npx ts-node examples/10-nemoclaw-sandbox-swarm.ts
|
|
|
295
337
|
| `CodexAdapter` | OpenAI Codex / gpt-4o / Codex CLI | `registerCodexAgent(name, config)` |
|
|
296
338
|
| `MiniMaxAdapter` | MiniMax LLM API (M2.5 / M2.5-highspeed) | `registerAgent(name, config)` |
|
|
297
339
|
| `NemoClawAdapter` | NVIDIA NemoClaw (sandboxed agents via OpenShell) | `registerSandboxAgent(name, config)` |
|
|
340
|
+
| `APSAdapter` | Agent Permission Service (delegation-chain trust) | `apsDelegationToTrust(delegation)` |
|
|
298
341
|
|
|
299
342
|
**Streaming variants** (drop-in replacements with `.stream()` support):
|
|
300
343
|
|
|
@@ -313,7 +356,7 @@ Extend `BaseAdapter` (or `StreamingBaseAdapter` for streaming) to add your own i
|
|
|
313
356
|
|
|
314
357
|
| Capability | Network-AI | LangGraph | CrewAI | AutoGen |
|
|
315
358
|
|---|---|---|---|---|
|
|
316
|
-
| Cross-framework agents in one swarm | ✅
|
|
359
|
+
| Cross-framework agents in one swarm | ✅ 17 built-in adapters | ⚠️ Nodes can call any code; no adapter abstraction | ⚠️ Extensible via tools; CrewAI-native agents only | ⚠️ Extensible via plugins; AutoGen-native agents only |
|
|
317
360
|
| Atomic shared state (conflict-safe) | ✅ `propose → validate → commit` mutex | ⚠️ State passed between nodes; last-write-wins | ⚠️ Shared memory available; no conflict resolution | ⚠️ Shared context available; no conflict resolution |
|
|
318
361
|
| Hard token ceiling per agent | ✅ `FederatedBudget` (first-class API) | ⚠️ Via callbacks / custom middleware | ⚠️ Via callbacks / custom middleware | ⚠️ Built-in token tracking in v0.4+; no swarm-level ceiling |
|
|
319
362
|
| Permission gating before sensitive ops | ✅ `AuthGuardian` (built-in) | ⚠️ Possible via custom node logic | ⚠️ Possible via custom tools | ⚠️ Possible via custom middleware |
|
|
@@ -329,7 +372,7 @@ Extend `BaseAdapter` (or `StreamingBaseAdapter` for streaming) to add your own i
|
|
|
329
372
|
npm run test:all # All suites in sequence
|
|
330
373
|
npm test # Core orchestrator
|
|
331
374
|
npm run test:security # Security module
|
|
332
|
-
npm run test:adapters # All
|
|
375
|
+
npm run test:adapters # All 17 adapters
|
|
333
376
|
npm run test:streaming # Streaming adapters
|
|
334
377
|
npm run test:a2a # A2A protocol adapter
|
|
335
378
|
npm run test:codex # Codex adapter
|
|
@@ -337,7 +380,7 @@ npm run test:priority # Priority & preemption
|
|
|
337
380
|
npm run test:cli # CLI layer
|
|
338
381
|
```
|
|
339
382
|
|
|
340
|
-
**1,
|
|
383
|
+
**1,617 passing assertions across 20 test suites** (`npm run test:all`):
|
|
341
384
|
|
|
342
385
|
| Suite | Assertions | Covers |
|
|
343
386
|
|---|---|---|
|
|
@@ -345,7 +388,7 @@ npm run test:cli # CLI layer
|
|
|
345
388
|
| `test-phase5f.ts` | 127 | SSE transport, `McpCombinedBridge`, extended MCP tools |
|
|
346
389
|
| `test-phase5g.ts` | 121 | CRDT backend, vector clocks, bidirectional sync |
|
|
347
390
|
| `test-phase6.ts` | 121 | MCP server, control-plane tools, audit tools |
|
|
348
|
-
| `test-adapters.ts` |
|
|
391
|
+
| `test-adapters.ts` | 176 | All 17 adapters, registry routing, integration, edge cases |
|
|
349
392
|
| `test-phase5d.ts` | 117 | Pluggable backend (Redis, CRDT, Memory) |
|
|
350
393
|
| `test-standalone.ts` | 88 | Blackboard, auth, integration, persistence, parallelisation, quality gate |
|
|
351
394
|
| `test-phase5e.ts` | 87 | Federated budget tracking |
|
package/SKILL.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: Network-AI
|
|
3
|
-
description: "Python orchestration skill: local multi-agent workflows via blackboard file, permission gating, and token budget scripts. All execution is local — no network calls, no Node.js required. TypeScript/Node.js features (HMAC tokens, AES-256, MCP server,
|
|
3
|
+
description: "Python orchestration skill: local multi-agent workflows via blackboard file, permission gating, and token budget scripts. All execution is local — no network calls, no Node.js required. TypeScript/Node.js features (HMAC tokens, AES-256, MCP server, 17 adapters, CLI) are in the SEPARATE companion npm package (npm install -g network-ai) and are NOT part of this skill bundle."
|
|
4
4
|
metadata:
|
|
5
5
|
openclaw:
|
|
6
6
|
emoji: "\U0001F41D"
|
|
7
7
|
homepage: https://github.com/Jovancoding/Network-AI
|
|
8
|
-
bundle_scope: "Python scripts only (scripts/*.py). The README.md in this repo describes the FULL project including the companion Node.js npm package — features documented there (HMAC tokens, AES-256 encryption, MCP server,
|
|
8
|
+
bundle_scope: "Python scripts only (scripts/*.py). The README.md in this repo describes the FULL project including the companion Node.js npm package — features documented there (HMAC tokens, AES-256 encryption, MCP server, 17 adapters, CLI) are NOT implemented in these Python scripts and are NOT part of this ClawHub skill. Install the npm package separately for those features."
|
|
9
9
|
network_calls: none
|
|
10
10
|
sessions_ops: "platform-provided — sessions_send, sessions_list, and sessions_history are OpenClaw host platform built-ins, not implemented or invoked by this skill's Python scripts"
|
|
11
11
|
requires:
|
|
@@ -746,7 +746,7 @@ The companion npm package (`network-ai`) provides:
|
|
|
746
746
|
- HMAC / Ed25519-signed audit tokens (vs UUID tokens in the Python layer)
|
|
747
747
|
- AES-256 blackboard encryption
|
|
748
748
|
- A standalone MCP server for IDE integration (Claude, Cursor, VS Code)
|
|
749
|
-
-
|
|
749
|
+
- 17 framework adapters (LangChain, AutoGen, CrewAI, DSPy, LlamaIndex, NemoClaw, APS, etc.)
|
|
750
750
|
- A full CLI (`network-ai bb`, `network-ai auth`, `network-ai budget`, `network-ai audit`)
|
|
751
751
|
|
|
752
752
|
None of the above are provided by this skill's Python scripts. No network calls are made by this skill.
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* APS Adapter — Agent Permission Service interop adapter.
|
|
3
|
+
*
|
|
4
|
+
* Maps APS delegation chains to AuthGuardian trust levels.
|
|
5
|
+
* This is the interop PoC proposed in crewAIInc/crewAI#4560:
|
|
6
|
+
* APS chain → MCP verify → trust mapping → registerAgentTrust().
|
|
7
|
+
*
|
|
8
|
+
* APS (Agent Permission Service) is a delegation-chain permission model
|
|
9
|
+
* proposed by aeoess et al. This adapter consumes APS delegation tokens,
|
|
10
|
+
* verifies them (locally or via MCP server), and translates the verified
|
|
11
|
+
* scope + depth into Network-AI's AgentTrustConfig.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
*
|
|
15
|
+
* import { APSAdapter } from 'network-ai';
|
|
16
|
+
*
|
|
17
|
+
* const aps = new APSAdapter();
|
|
18
|
+
* await aps.initialize({});
|
|
19
|
+
*
|
|
20
|
+
* // Register an APS-verified agent by providing its delegation chain
|
|
21
|
+
* const trust = aps.apsDelegationToTrust({
|
|
22
|
+
* delegator: 'root-orchestrator',
|
|
23
|
+
* delegatee: 'sub-agent-7',
|
|
24
|
+
* scope: ['file:read', 'net:fetch'],
|
|
25
|
+
* currentDepth: 1,
|
|
26
|
+
* maxDepth: 3,
|
|
27
|
+
* signature: '<base64-token>',
|
|
28
|
+
* });
|
|
29
|
+
*
|
|
30
|
+
* // Wire into AuthGuardian
|
|
31
|
+
* guardian.registerAgentTrust(trust);
|
|
32
|
+
*
|
|
33
|
+
* Verification modes:
|
|
34
|
+
* - 'local' — checks signature + depth + scope locally (default)
|
|
35
|
+
* - 'mcp' — calls an APS MCP server to verify the full chain
|
|
36
|
+
*
|
|
37
|
+
* @module APSAdapter
|
|
38
|
+
* @version 1.0.0
|
|
39
|
+
*/
|
|
40
|
+
import { BaseAdapter } from './base-adapter';
|
|
41
|
+
import type { AdapterConfig, AdapterCapabilities, AgentPayload, AgentContext, AgentResult } from '../types/agent-adapter';
|
|
42
|
+
/** A single link in an APS delegation chain. */
|
|
43
|
+
export interface APSDelegation {
|
|
44
|
+
/** Agent that grants authority */
|
|
45
|
+
delegator: string;
|
|
46
|
+
/** Agent that receives authority */
|
|
47
|
+
delegatee: string;
|
|
48
|
+
/** Scopes granted — monotonically narrowing down the chain */
|
|
49
|
+
scope: string[];
|
|
50
|
+
/** Current depth in the delegation chain (0 = root) */
|
|
51
|
+
currentDepth: number;
|
|
52
|
+
/** Maximum allowed depth */
|
|
53
|
+
maxDepth: number;
|
|
54
|
+
/** Cryptographic signature or token from the delegator */
|
|
55
|
+
signature: string;
|
|
56
|
+
}
|
|
57
|
+
/** Result of APS verification — input to AuthGuardian. */
|
|
58
|
+
export interface APSTrustMapping {
|
|
59
|
+
agentId: string;
|
|
60
|
+
trustLevel: number;
|
|
61
|
+
allowedResources: string[];
|
|
62
|
+
allowedNamespaces: string[];
|
|
63
|
+
/** Raw APS chain metadata for audit purposes */
|
|
64
|
+
apsMetadata: {
|
|
65
|
+
delegator: string;
|
|
66
|
+
depth: number;
|
|
67
|
+
maxDepth: number;
|
|
68
|
+
scope: string[];
|
|
69
|
+
verified: boolean;
|
|
70
|
+
verificationMode: 'local' | 'mcp';
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
/** Configuration for the APS adapter. */
|
|
74
|
+
export interface APSAdapterConfig extends AdapterConfig {
|
|
75
|
+
/** Base trust level for a fully verified root delegation (default: 0.8) */
|
|
76
|
+
baseTrust?: number;
|
|
77
|
+
/** Depth decay factor — trust decays as delegation gets deeper (default: 0.4) */
|
|
78
|
+
depthDecay?: number;
|
|
79
|
+
/** Verification mode: 'local' or 'mcp' (default: 'local') */
|
|
80
|
+
verificationMode?: 'local' | 'mcp';
|
|
81
|
+
/** MCP server URL for remote verification (required when mode is 'mcp') */
|
|
82
|
+
mcpServerUrl?: string;
|
|
83
|
+
/** Function to verify APS signatures — BYOC (bring your own crypto) */
|
|
84
|
+
verifySignature?: (delegation: APSDelegation) => Promise<boolean>;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* APSAdapter translates APS delegation chains into AuthGuardian trust configs.
|
|
88
|
+
*
|
|
89
|
+
* This is not a traditional execution adapter — it's a trust-bridging adapter.
|
|
90
|
+
* Its primary method is `apsDelegationToTrust()`, which verifies an APS
|
|
91
|
+
* delegation and returns an `AgentTrustConfig`-compatible object.
|
|
92
|
+
*/
|
|
93
|
+
export declare class APSAdapter extends BaseAdapter {
|
|
94
|
+
readonly name = "aps";
|
|
95
|
+
readonly version = "1.0.0";
|
|
96
|
+
private baseTrust;
|
|
97
|
+
private depthDecay;
|
|
98
|
+
private verificationMode;
|
|
99
|
+
private mcpServerUrl?;
|
|
100
|
+
private verifySignatureFn?;
|
|
101
|
+
get capabilities(): AdapterCapabilities;
|
|
102
|
+
initialize(config: APSAdapterConfig): Promise<void>;
|
|
103
|
+
/**
|
|
104
|
+
* Core method: convert an APS delegation into an AuthGuardian trust mapping.
|
|
105
|
+
*
|
|
106
|
+
* Trust formula: baseTrust × (1 - (currentDepth / maxDepth × depthDecay))
|
|
107
|
+
* At depth 0 (root): full baseTrust.
|
|
108
|
+
* At maxDepth: baseTrust × (1 - depthDecay).
|
|
109
|
+
*
|
|
110
|
+
* Scopes are monotonically narrowing — a child delegation can only have
|
|
111
|
+
* a subset of the parent's scopes.
|
|
112
|
+
*/
|
|
113
|
+
apsDelegationToTrust(delegation: APSDelegation): Promise<APSTrustMapping>;
|
|
114
|
+
/**
|
|
115
|
+
* Verify an APS delegation — either locally or via MCP.
|
|
116
|
+
*/
|
|
117
|
+
private verifyDelegation;
|
|
118
|
+
/**
|
|
119
|
+
* Verify delegation via an APS MCP server.
|
|
120
|
+
* Calls the server's `verifyDelegation` tool.
|
|
121
|
+
*/
|
|
122
|
+
private verifyViaMCP;
|
|
123
|
+
/**
|
|
124
|
+
* Execute is a pass-through — APS adapter is a trust bridge, not an executor.
|
|
125
|
+
* When called, it verifies the delegation from the payload and returns the trust mapping.
|
|
126
|
+
*/
|
|
127
|
+
executeAgent(agentName: string, payload: AgentPayload, context: AgentContext): Promise<AgentResult>;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=aps-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aps-adapter.d.ts","sourceRoot":"","sources":["../../adapters/aps-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EACV,aAAa,EACb,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAIhC,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,kCAAkC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,uDAAuD;IACvD,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gDAAgD;IAChD,WAAW,EAAE;QACX,SAAS,EAAE,MAAM,CAAC;QAClB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,QAAQ,EAAE,OAAO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
4
|
+
*
|
|
5
|
+
* Maps APS delegation chains to AuthGuardian trust levels.
|
|
6
|
+
* This is the interop PoC proposed in crewAIInc/crewAI#4560:
|
|
7
|
+
* APS chain → MCP verify → trust mapping → registerAgentTrust().
|
|
8
|
+
*
|
|
9
|
+
* APS (Agent Permission Service) is a delegation-chain permission model
|
|
10
|
+
* proposed by aeoess et al. This adapter consumes APS delegation tokens,
|
|
11
|
+
* verifies them (locally or via MCP server), and translates the verified
|
|
12
|
+
* scope + depth into Network-AI's AgentTrustConfig.
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
*
|
|
16
|
+
* import { APSAdapter } from 'network-ai';
|
|
17
|
+
*
|
|
18
|
+
* const aps = new APSAdapter();
|
|
19
|
+
* await aps.initialize({});
|
|
20
|
+
*
|
|
21
|
+
* // Register an APS-verified agent by providing its delegation chain
|
|
22
|
+
* const trust = aps.apsDelegationToTrust({
|
|
23
|
+
* delegator: 'root-orchestrator',
|
|
24
|
+
* delegatee: 'sub-agent-7',
|
|
25
|
+
* scope: ['file:read', 'net:fetch'],
|
|
26
|
+
* currentDepth: 1,
|
|
27
|
+
* maxDepth: 3,
|
|
28
|
+
* signature: '<base64-token>',
|
|
29
|
+
* });
|
|
30
|
+
*
|
|
31
|
+
* // Wire into AuthGuardian
|
|
32
|
+
* guardian.registerAgentTrust(trust);
|
|
33
|
+
*
|
|
34
|
+
* Verification modes:
|
|
35
|
+
* - 'local' — checks signature + depth + scope locally (default)
|
|
36
|
+
* - 'mcp' — calls an APS MCP server to verify the full chain
|
|
37
|
+
*
|
|
38
|
+
* @module APSAdapter
|
|
39
|
+
* @version 1.0.0
|
|
40
|
+
*/
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.APSAdapter = void 0;
|
|
43
|
+
const base_adapter_1 = require("./base-adapter");
|
|
44
|
+
// ─── Scope → Resource type mapping ────────────────────────────────────────────
|
|
45
|
+
const SCOPE_TO_RESOURCE = {
|
|
46
|
+
'file:read': 'FILE_SYSTEM',
|
|
47
|
+
'file:write': 'FILE_SYSTEM',
|
|
48
|
+
'net:fetch': 'NETWORK',
|
|
49
|
+
'net:listen': 'NETWORK',
|
|
50
|
+
'shell:exec': 'SHELL_EXEC',
|
|
51
|
+
'git:read': 'GIT',
|
|
52
|
+
'git:write': 'GIT',
|
|
53
|
+
'db:read': 'DATABASE',
|
|
54
|
+
'db:write': 'DATABASE',
|
|
55
|
+
'pay:read': 'PAYMENTS',
|
|
56
|
+
'pay:write': 'PAYMENTS',
|
|
57
|
+
};
|
|
58
|
+
// ─── Adapter ──────────────────────────────────────────────────────────────────
|
|
59
|
+
/**
|
|
60
|
+
* APSAdapter translates APS delegation chains into AuthGuardian trust configs.
|
|
61
|
+
*
|
|
62
|
+
* This is not a traditional execution adapter — it's a trust-bridging adapter.
|
|
63
|
+
* Its primary method is `apsDelegationToTrust()`, which verifies an APS
|
|
64
|
+
* delegation and returns an `AgentTrustConfig`-compatible object.
|
|
65
|
+
*/
|
|
66
|
+
class APSAdapter extends base_adapter_1.BaseAdapter {
|
|
67
|
+
name = 'aps';
|
|
68
|
+
version = '1.0.0';
|
|
69
|
+
baseTrust = 0.8;
|
|
70
|
+
depthDecay = 0.4;
|
|
71
|
+
verificationMode = 'local';
|
|
72
|
+
mcpServerUrl;
|
|
73
|
+
verifySignatureFn;
|
|
74
|
+
get capabilities() {
|
|
75
|
+
return {
|
|
76
|
+
streaming: false,
|
|
77
|
+
parallel: true,
|
|
78
|
+
bidirectional: false,
|
|
79
|
+
discovery: false,
|
|
80
|
+
authentication: true,
|
|
81
|
+
statefulSessions: false,
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
async initialize(config) {
|
|
85
|
+
await super.initialize(config);
|
|
86
|
+
if (config.baseTrust !== undefined) {
|
|
87
|
+
if (typeof config.baseTrust !== 'number' || config.baseTrust < 0 || config.baseTrust > 1) {
|
|
88
|
+
throw new Error('baseTrust must be a number between 0 and 1');
|
|
89
|
+
}
|
|
90
|
+
this.baseTrust = config.baseTrust;
|
|
91
|
+
}
|
|
92
|
+
if (config.depthDecay !== undefined) {
|
|
93
|
+
if (typeof config.depthDecay !== 'number' || config.depthDecay < 0 || config.depthDecay > 1) {
|
|
94
|
+
throw new Error('depthDecay must be a number between 0 and 1');
|
|
95
|
+
}
|
|
96
|
+
this.depthDecay = config.depthDecay;
|
|
97
|
+
}
|
|
98
|
+
if (config.verificationMode) {
|
|
99
|
+
this.verificationMode = config.verificationMode;
|
|
100
|
+
}
|
|
101
|
+
if (config.mcpServerUrl) {
|
|
102
|
+
this.mcpServerUrl = config.mcpServerUrl;
|
|
103
|
+
}
|
|
104
|
+
if (config.verifySignature) {
|
|
105
|
+
this.verifySignatureFn = config.verifySignature;
|
|
106
|
+
}
|
|
107
|
+
if (this.verificationMode === 'mcp' && !this.mcpServerUrl) {
|
|
108
|
+
throw new Error('mcpServerUrl is required when verificationMode is "mcp"');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Core method: convert an APS delegation into an AuthGuardian trust mapping.
|
|
113
|
+
*
|
|
114
|
+
* Trust formula: baseTrust × (1 - (currentDepth / maxDepth × depthDecay))
|
|
115
|
+
* At depth 0 (root): full baseTrust.
|
|
116
|
+
* At maxDepth: baseTrust × (1 - depthDecay).
|
|
117
|
+
*
|
|
118
|
+
* Scopes are monotonically narrowing — a child delegation can only have
|
|
119
|
+
* a subset of the parent's scopes.
|
|
120
|
+
*/
|
|
121
|
+
async apsDelegationToTrust(delegation) {
|
|
122
|
+
// Validate input
|
|
123
|
+
if (!delegation || typeof delegation !== 'object') {
|
|
124
|
+
throw new Error('delegation must be a non-null object');
|
|
125
|
+
}
|
|
126
|
+
if (!delegation.delegatee || typeof delegation.delegatee !== 'string') {
|
|
127
|
+
throw new Error('delegation.delegatee must be a non-empty string');
|
|
128
|
+
}
|
|
129
|
+
if (!delegation.delegator || typeof delegation.delegator !== 'string') {
|
|
130
|
+
throw new Error('delegation.delegator must be a non-empty string');
|
|
131
|
+
}
|
|
132
|
+
if (!Array.isArray(delegation.scope) || delegation.scope.length === 0) {
|
|
133
|
+
throw new Error('delegation.scope must be a non-empty array');
|
|
134
|
+
}
|
|
135
|
+
if (typeof delegation.currentDepth !== 'number' || delegation.currentDepth < 0) {
|
|
136
|
+
throw new Error('delegation.currentDepth must be a non-negative number');
|
|
137
|
+
}
|
|
138
|
+
if (typeof delegation.maxDepth !== 'number' || delegation.maxDepth < 1) {
|
|
139
|
+
throw new Error('delegation.maxDepth must be a positive number');
|
|
140
|
+
}
|
|
141
|
+
if (delegation.currentDepth > delegation.maxDepth) {
|
|
142
|
+
throw new Error('delegation.currentDepth cannot exceed maxDepth');
|
|
143
|
+
}
|
|
144
|
+
// Verify the delegation
|
|
145
|
+
const verified = await this.verifyDelegation(delegation);
|
|
146
|
+
// Compute trust level with depth decay
|
|
147
|
+
const depthRatio = delegation.maxDepth > 0
|
|
148
|
+
? delegation.currentDepth / delegation.maxDepth
|
|
149
|
+
: 0;
|
|
150
|
+
const trustLevel = verified
|
|
151
|
+
? Math.max(0, this.baseTrust * (1 - depthRatio * this.depthDecay))
|
|
152
|
+
: 0;
|
|
153
|
+
// Map APS scopes to AuthGuardian resource types
|
|
154
|
+
const allowedResources = [...new Set(delegation.scope
|
|
155
|
+
.map(s => SCOPE_TO_RESOURCE[s])
|
|
156
|
+
.filter((r) => r !== undefined))];
|
|
157
|
+
// Derive namespace prefixes from scopes
|
|
158
|
+
const allowedNamespaces = delegation.scope
|
|
159
|
+
.map(s => s.split(':')[0] + ':')
|
|
160
|
+
.filter((v, i, a) => a.indexOf(v) === i);
|
|
161
|
+
return {
|
|
162
|
+
agentId: delegation.delegatee,
|
|
163
|
+
trustLevel: Math.round(trustLevel * 1000) / 1000,
|
|
164
|
+
allowedResources,
|
|
165
|
+
allowedNamespaces,
|
|
166
|
+
apsMetadata: {
|
|
167
|
+
delegator: delegation.delegator,
|
|
168
|
+
depth: delegation.currentDepth,
|
|
169
|
+
maxDepth: delegation.maxDepth,
|
|
170
|
+
scope: delegation.scope,
|
|
171
|
+
verified,
|
|
172
|
+
verificationMode: this.verificationMode,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Verify an APS delegation — either locally or via MCP.
|
|
178
|
+
*/
|
|
179
|
+
async verifyDelegation(delegation) {
|
|
180
|
+
// Depth bounds check
|
|
181
|
+
if (delegation.currentDepth > delegation.maxDepth) {
|
|
182
|
+
return false;
|
|
183
|
+
}
|
|
184
|
+
if (!delegation.signature || typeof delegation.signature !== 'string') {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
if (this.verificationMode === 'mcp' && this.mcpServerUrl) {
|
|
188
|
+
return this.verifyViaMCP(delegation);
|
|
189
|
+
}
|
|
190
|
+
// Local verification — use BYOC verifier or default signature check
|
|
191
|
+
if (this.verifySignatureFn) {
|
|
192
|
+
return this.verifySignatureFn(delegation);
|
|
193
|
+
}
|
|
194
|
+
// Default: non-empty signature + valid depth = trusted
|
|
195
|
+
// In production, replace with actual crypto verification
|
|
196
|
+
return delegation.signature.length > 0;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Verify delegation via an APS MCP server.
|
|
200
|
+
* Calls the server's `verifyDelegation` tool.
|
|
201
|
+
*/
|
|
202
|
+
async verifyViaMCP(delegation) {
|
|
203
|
+
if (!this.mcpServerUrl)
|
|
204
|
+
return false;
|
|
205
|
+
try {
|
|
206
|
+
const url = new URL('/sse', this.mcpServerUrl);
|
|
207
|
+
const response = await fetch(url.toString(), {
|
|
208
|
+
method: 'POST',
|
|
209
|
+
headers: { 'Content-Type': 'application/json' },
|
|
210
|
+
body: JSON.stringify({
|
|
211
|
+
jsonrpc: '2.0',
|
|
212
|
+
id: `aps-verify-${Date.now()}`,
|
|
213
|
+
method: 'tools/call',
|
|
214
|
+
params: {
|
|
215
|
+
name: 'verifyDelegation',
|
|
216
|
+
arguments: {
|
|
217
|
+
delegator: delegation.delegator,
|
|
218
|
+
delegatee: delegation.delegatee,
|
|
219
|
+
scope: delegation.scope,
|
|
220
|
+
currentDepth: delegation.currentDepth,
|
|
221
|
+
maxDepth: delegation.maxDepth,
|
|
222
|
+
signature: delegation.signature,
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
}),
|
|
226
|
+
});
|
|
227
|
+
if (!response.ok)
|
|
228
|
+
return false;
|
|
229
|
+
const result = await response.json();
|
|
230
|
+
const text = result?.result?.content?.[0]?.text;
|
|
231
|
+
if (!text)
|
|
232
|
+
return false;
|
|
233
|
+
const parsed = JSON.parse(text);
|
|
234
|
+
return parsed.verified === true;
|
|
235
|
+
}
|
|
236
|
+
catch {
|
|
237
|
+
// MCP verification failed — deny by default
|
|
238
|
+
return false;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Execute is a pass-through — APS adapter is a trust bridge, not an executor.
|
|
243
|
+
* When called, it verifies the delegation from the payload and returns the trust mapping.
|
|
244
|
+
*/
|
|
245
|
+
async executeAgent(agentName, payload, context) {
|
|
246
|
+
this.ensureReady();
|
|
247
|
+
const delegation = payload.params;
|
|
248
|
+
if (!delegation?.delegatee) {
|
|
249
|
+
return {
|
|
250
|
+
success: false,
|
|
251
|
+
error: {
|
|
252
|
+
code: 'INVALID_DELEGATION',
|
|
253
|
+
message: 'Payload must contain a valid APSDelegation in params',
|
|
254
|
+
recoverable: false,
|
|
255
|
+
},
|
|
256
|
+
metadata: { adapter: this.name },
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
try {
|
|
260
|
+
const trust = await this.apsDelegationToTrust(delegation);
|
|
261
|
+
return {
|
|
262
|
+
success: true,
|
|
263
|
+
data: trust,
|
|
264
|
+
metadata: {
|
|
265
|
+
adapter: this.name,
|
|
266
|
+
trace: {
|
|
267
|
+
agentName,
|
|
268
|
+
verified: trust.apsMetadata.verified,
|
|
269
|
+
trustLevel: trust.trustLevel,
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
catch (err) {
|
|
275
|
+
return {
|
|
276
|
+
success: false,
|
|
277
|
+
error: {
|
|
278
|
+
code: 'DELEGATION_FAILED',
|
|
279
|
+
message: err instanceof Error ? err.message : String(err),
|
|
280
|
+
recoverable: false,
|
|
281
|
+
nativeError: err,
|
|
282
|
+
},
|
|
283
|
+
metadata: { adapter: this.name },
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
exports.APSAdapter = APSAdapter;
|
|
289
|
+
//# sourceMappingURL=aps-adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aps-adapter.js","sourceRoot":"","sources":["../../adapters/aps-adapter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;;;AAEH,iDAA6C;AA0D7C,iFAAiF;AAEjF,MAAM,iBAAiB,GAA2B;IAChD,WAAW,EAAG,aAAa;IAC3B,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAG,SAAS;IACvB,YAAY,EAAE,SAAS;IACvB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAI,KAAK;IACnB,WAAW,EAAG,KAAK;IACnB,SAAS,EAAK,UAAU;IACxB,UAAU,EAAI,UAAU;IACxB,UAAU,EAAI,UAAU;IACxB,WAAW,EAAG,UAAU;CACzB,CAAC;AAEF,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAa,UAAW,SAAQ,0BAAW;IAChC,IAAI,GAAG,KAAK,CAAC;IACb,OAAO,GAAG,OAAO,CAAC;IAEnB,SAAS,GAAG,GAAG,CAAC;IAChB,UAAU,GAAG,GAAG,CAAC;IACjB,gBAAgB,GAAoB,OAAO,CAAC;IAC5C,YAAY,CAAU;IACtB,iBAAiB,CAAmD;IAE5E,IAAI,YAAY;QACd,OAAO;YACL,SAAS,EAAE,KAAK;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AAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,oBAAoB;oBAC1B,OAAO,EAAE,sDAAsD;oBAC/D,WAAW,EAAE,KAAK;iBACnB;gBACD,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE;aACjC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YAC1D,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE;oBACR,OAAO,EAAE,IAAI,CAAC,IAAI;oBAClB,KAAK,EAAE;wBACL,SAAS;wBACT,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ;wBACpC,UAAU,EAAE,KAAK,CAAC,UAAU;qBAC7B;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,mBAAmB;oBACzB,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;oBACzD,WAAW,EAAE,KAAK;oBAClB,WAAW,EAAE,GAAG;iBACjB;gBACD,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE;aACjC,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AAnPD,gCAmPC"}
|
package/dist/adapters/index.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export { CodexAdapter } from './codex-adapter';
|
|
|
53
53
|
export type { CodexMode, CodexAgentConfig, CodexChatClient, CodexCompletionClient, CodexCLIExecutor, } from './codex-adapter';
|
|
54
54
|
export { MiniMaxAdapter } from './minimax-adapter';
|
|
55
55
|
export type { MiniMaxAgentConfig, MiniMaxChatClient } from './minimax-adapter';
|
|
56
|
+
export { APSAdapter } from './aps-adapter';
|
|
57
|
+
export type { APSDelegation, APSTrustMapping, APSAdapterConfig, } from './aps-adapter';
|
|
56
58
|
export { NemoClawAdapter } from './nemoclaw-adapter';
|
|
57
59
|
export type { NemoClawAgentConfig, OpenShellExecutor, BlueprintAction, BlueprintRunResult, SandboxState, SandboxStatus, NetworkPolicy, PolicyEndpoint, } from './nemoclaw-adapter';
|
|
58
60
|
export type { StreamingChunk, IStreamingAdapter, StreamCollector } from '../types/streaming-adapter';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../adapters/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGlE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,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 1.0.0
|
|
21
21
|
*/
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
-
exports.NemoClawAdapter = exports.MiniMaxAdapter = exports.CodexAdapter = exports.A2AAdapter = exports.CustomStreamingAdapter = exports.LangChainStreamingAdapter = exports.collectStream = exports.StreamingBaseAdapter = exports.AgnoAdapter = exports.DSPyAdapter = exports.HaystackAdapter = exports.OpenAIAssistantsAdapter = exports.SemanticKernelAdapter = exports.LlamaIndexAdapter = exports.CustomAdapter = exports.MCPAdapter = exports.CrewAIAdapter = exports.AutoGenAdapter = exports.LangChainAdapter = exports.OpenClawAdapter = exports.getRegistry = exports.AdapterRegistry = exports.BaseAdapter = void 0;
|
|
23
|
+
exports.NemoClawAdapter = exports.APSAdapter = exports.MiniMaxAdapter = exports.CodexAdapter = exports.A2AAdapter = exports.CustomStreamingAdapter = exports.LangChainStreamingAdapter = exports.collectStream = exports.StreamingBaseAdapter = exports.AgnoAdapter = exports.DSPyAdapter = exports.HaystackAdapter = exports.OpenAIAssistantsAdapter = exports.SemanticKernelAdapter = exports.LlamaIndexAdapter = exports.CustomAdapter = exports.MCPAdapter = exports.CrewAIAdapter = exports.AutoGenAdapter = exports.LangChainAdapter = exports.OpenClawAdapter = exports.getRegistry = exports.AdapterRegistry = exports.BaseAdapter = void 0;
|
|
24
24
|
// Core infrastructure
|
|
25
25
|
var base_adapter_1 = require("./base-adapter");
|
|
26
26
|
Object.defineProperty(exports, "BaseAdapter", { enumerable: true, get: function () { return base_adapter_1.BaseAdapter; } });
|
|
@@ -70,6 +70,9 @@ Object.defineProperty(exports, "CodexAdapter", { enumerable: true, get: function
|
|
|
70
70
|
// MiniMax adapter (MiniMax LLM API — MiniMax-M2.5 / MiniMax-M2.5-highspeed)
|
|
71
71
|
var minimax_adapter_1 = require("./minimax-adapter");
|
|
72
72
|
Object.defineProperty(exports, "MiniMaxAdapter", { enumerable: true, get: function () { return minimax_adapter_1.MiniMaxAdapter; } });
|
|
73
|
+
// APS adapter (Agent Permission Service — delegation chain → trust mapping)
|
|
74
|
+
var aps_adapter_1 = require("./aps-adapter");
|
|
75
|
+
Object.defineProperty(exports, "APSAdapter", { enumerable: true, get: function () { return aps_adapter_1.APSAdapter; } });
|
|
73
76
|
// NemoClaw adapter (NVIDIA NemoClaw — sandboxed agent execution via OpenShell)
|
|
74
77
|
var nemoclaw_adapter_1 = require("./nemoclaw-adapter");
|
|
75
78
|
Object.defineProperty(exports, "NemoClawAdapter", { enumerable: true, get: function () { return nemoclaw_adapter_1.NemoClawAdapter; } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../adapters/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AAEH,sBAAsB;AACtB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,uDAAkE;AAAzD,mHAAA,eAAe,OAAA;AAAE,+GAAA,WAAW,OAAA;AAErC,mCAAmC;AACnC,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AACxB,yDAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AAEzB,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AAEvB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AAEtB,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AAEnB,mDAAiD;AAAxC,+GAAA,aAAa,OAAA;AAGtB,8BAA8B;AAC9B,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAO1B,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA;AAE9B,yEAAsE;AAA7D,oIAAA,uBAAuB,OAAA;AAOhC,uDAAqD;AAA5C,mHAAA,eAAe,OAAA;AAQxB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AAEpB,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AAQpB,qBAAqB;AACrB,mEAA+E;AAAtE,8HAAA,oBAAoB,OAAA;AAAE,uHAAA,aAAa,OAAA;AAC5C,6EAA0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,sBAAsB,OAAA;AAG/B,+BAA+B;AAC/B,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AAUnB,uDAAuD;AACvD,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AASrB,4EAA4E;AAC5E,qDAAmD;AAA1C,iHAAA,cAAc,OAAA;AAGvB,4EAA4E;AAC5E,6CAA2C;AAAlC,yGAAA,UAAU,OAAA;AAOnB,+EAA+E;AAC/E,uDAAqD;AAA5C,mHAAA,eAAe,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "network-ai",
|
|
3
|
-
"version": "4.
|
|
4
|
-
"description": "AI agent orchestration framework for TypeScript/Node.js -
|
|
3
|
+
"version": "4.10.1",
|
|
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://github.com/Jovancoding/Network-AI#readme",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -80,6 +80,10 @@
|
|
|
80
80
|
],
|
|
81
81
|
"author": "OpenClaw Community",
|
|
82
82
|
"license": "MIT",
|
|
83
|
+
"funding": {
|
|
84
|
+
"type": "github",
|
|
85
|
+
"url": "https://github.com/sponsors/Jovancoding"
|
|
86
|
+
},
|
|
83
87
|
"repository": {
|
|
84
88
|
"type": "git",
|
|
85
89
|
"url": "https://github.com/Jovancoding/Network-AI.git"
|
|
@@ -104,8 +108,7 @@
|
|
|
104
108
|
"QUICKSTART.md",
|
|
105
109
|
"INTEGRATION_GUIDE.md",
|
|
106
110
|
"SKILL.md",
|
|
107
|
-
"LICENSE"
|
|
108
|
-
"socket.json"
|
|
111
|
+
"LICENSE"
|
|
109
112
|
],
|
|
110
113
|
"dependencies": {
|
|
111
114
|
"commander": "^14.0.3"
|
package/socket.json
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 2,
|
|
3
|
-
"ignore": {
|
|
4
|
-
"evalDynamicCodeExecution": [
|
|
5
|
-
{
|
|
6
|
-
"path": "lib/blackboard-validator.ts",
|
|
7
|
-
"reason": "False positive — /\\beval\\s*\\(/ is a security detection regex that scans for eval() usage in untrusted agent code submitted to the blackboard. It is not dynamic code execution."
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"path": "dist/lib/blackboard-validator.js",
|
|
11
|
-
"reason": "False positive — this is a security detection pattern that scans for eval() usage in untrusted agent code. It is not dynamic code execution."
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"networkAccess": [
|
|
15
|
-
{
|
|
16
|
-
"path": "adapters/a2a-adapter.ts",
|
|
17
|
-
"reason": "Intentional — A2AAdapter implements the Google Agent-to-Agent protocol; fetch() calls are made to remote agent endpoints that users explicitly register via registerRemoteAgent(). Network access is the purpose of this adapter."
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
"path": "dist/adapters/a2a-adapter.js",
|
|
21
|
-
"reason": "Intentional — A2AAdapter implements the Google Agent-to-Agent protocol; fetch() calls are made to remote agent endpoints that users explicitly register via registerRemoteAgent(). Network access is the purpose of this adapter."
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"path": "dist/adapters/custom-adapter.js",
|
|
25
|
-
"reason": "Intentional — CustomAdapter is a user-configured HTTP adapter that calls a user-supplied URL (config.url) to connect to external AI endpoints. Network access is the explicit purpose of this adapter."
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"path": "lib/mcp-transport-sse.ts",
|
|
29
|
-
"reason": "Intentional — McpSseTransport is an HTTP/SSE transport layer for the MCP protocol. Both the server (createServer) and client (http.request) directions are the explicit purpose of this module."
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"path": "dist/lib/mcp-transport-sse.js",
|
|
33
|
-
"reason": "Intentional — McpSseTransport is an HTTP/SSE transport layer for the MCP protocol. Both the server (createServer) and client (http.request) directions are the explicit purpose of this module."
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
"path": "dist/bin/mcp-server.js",
|
|
37
|
-
"reason": "Intentional — network-ai-server is an opt-in CLI binary that starts an HTTP/SSE server to expose the Network-AI tool suite over MCP. Users invoke it explicitly; it is not a background side-effect."
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"path": "adapters/codex-adapter.ts",
|
|
41
|
-
"reason": "Intentional — CodexAdapter calls OpenAI's chat/completions API (or user-provided baseUrl) via fetch(). Network access is the purpose of this adapter for connecting to OpenAI/Codex endpoints."
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"path": "dist/adapters/codex-adapter.js",
|
|
45
|
-
"reason": "Intentional — CodexAdapter calls OpenAI's chat/completions API (or user-provided baseUrl) via fetch(). Network access is the purpose of this adapter for connecting to OpenAI/Codex endpoints."
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"path": "adapters/minimax-adapter.ts",
|
|
49
|
-
"reason": "Intentional — MiniMaxAdapter calls MiniMax's OpenAI-compatible chat/completions API via fetch(). Network access is the purpose of this adapter for connecting to MiniMax LLM endpoints."
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
"path": "dist/adapters/minimax-adapter.js",
|
|
53
|
-
"reason": "Intentional — MiniMaxAdapter calls MiniMax's OpenAI-compatible chat/completions API via fetch(). Network access is the purpose of this adapter for connecting to MiniMax LLM endpoints."
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
"urlStrings": [
|
|
57
|
-
{
|
|
58
|
-
"path": "dist/adapters/custom-adapter.js",
|
|
59
|
-
"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."
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"path": "dist/adapters/mcp-adapter.js",
|
|
63
|
-
"reason": "Intentional — MCPAdapter documents example MCP endpoint URL patterns in comments. No runtime URL is hard-coded."
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"path": "dist/bin/mcp-server.js",
|
|
67
|
-
"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."
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"path": "adapters/codex-adapter.ts",
|
|
71
|
-
"reason": "Intentional — CodexAdapter uses https://api.openai.com as default baseUrl for OpenAI API calls. Users can override via config.baseUrl."
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"path": "dist/adapters/codex-adapter.js",
|
|
75
|
-
"reason": "Intentional — CodexAdapter uses https://api.openai.com as default baseUrl for OpenAI API calls. Users can override via config.baseUrl."
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"path": "adapters/minimax-adapter.ts",
|
|
79
|
-
"reason": "Intentional — MiniMaxAdapter uses https://api.minimax.io/v1 as default baseUrl for MiniMax API calls. Users can override via config.baseUrl."
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"path": "dist/adapters/minimax-adapter.js",
|
|
83
|
-
"reason": "Intentional — MiniMaxAdapter uses https://api.minimax.io/v1 as default baseUrl for MiniMax API calls. Users can override via config.baseUrl."
|
|
84
|
-
}
|
|
85
|
-
],
|
|
86
|
-
"envVars": [
|
|
87
|
-
{
|
|
88
|
-
"path": "security.ts",
|
|
89
|
-
"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."
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
"path": "dist/security.js",
|
|
93
|
-
"reason": "Intentional — compiled output of security.ts. Reads SWARM_TOKEN_SECRET and SWARM_ENCRYPTION_KEY env vars."
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"path": "adapters/codex-adapter.ts",
|
|
97
|
-
"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."
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"path": "dist/adapters/codex-adapter.js",
|
|
101
|
-
"reason": "Intentional — compiled output of codex-adapter.ts. Reads OPENAI_API_KEY env var."
|
|
102
|
-
},
|
|
103
|
-
{
|
|
104
|
-
"path": "adapters/minimax-adapter.ts",
|
|
105
|
-
"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."
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"path": "dist/adapters/minimax-adapter.js",
|
|
109
|
-
"reason": "Intentional — compiled output of minimax-adapter.ts. Reads MINIMAX_API_KEY env var."
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
"path": "setup.ts",
|
|
113
|
-
"reason": "Intentional — setup module checks for OPENAI_API_KEY env var to provide helpful configuration guidance. Declared in skill.json env section."
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
"path": "dist/setup.js",
|
|
117
|
-
"reason": "Intentional — compiled output of setup.ts. Checks for OPENAI_API_KEY env var."
|
|
118
|
-
}
|
|
119
|
-
],
|
|
120
|
-
"shellExec": [
|
|
121
|
-
{
|
|
122
|
-
"path": "adapters/nemoclaw-adapter.ts",
|
|
123
|
-
"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."
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"path": "dist/adapters/nemoclaw-adapter.js",
|
|
127
|
-
"reason": "Intentional — compiled output of nemoclaw-adapter.ts. Uses child_process.execFile to invoke the openshell CLI."
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
"path": "examples/05-code-review-swarm.ts",
|
|
131
|
-
"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."
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"path": "examples/demo-runner.ts",
|
|
135
|
-
"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."
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
"filesystemAccess": [
|
|
139
|
-
{
|
|
140
|
-
"path": "dist/index.js",
|
|
141
|
-
"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."
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
"path": "dist/run.js",
|
|
145
|
-
"reason": "Intentional — run.ts bootstraps the local blackboard and reads/writes the data directory. File I/O is the core mechanism."
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
"path": "dist/security.js",
|
|
149
|
-
"reason": "Intentional — security module writes the HMAC-signed audit log to data/audit_log.jsonl. Append-only filesystem writes are the audit trail mechanism."
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
"path": "dist/lib/locked-blackboard.js",
|
|
153
|
-
"reason": "Intentional — LockedBlackboard uses atomic file rename + fsync for its mutex. Filesystem access is the locking primitive."
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
"path": "dist/lib/mcp-tools-extended.js",
|
|
157
|
-
"reason": "Intentional — extended MCP tools expose blackboard snapshot and audit log query over MCP; these read from the data/ directory."
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
"path": "dist/lib/mcp-transport-sse.js",
|
|
161
|
-
"reason": "Intentional — SSE transport reads config from the filesystem. File access is for configuration loading only."
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"path": "dist/lib/swarm-utils.js",
|
|
165
|
-
"reason": "Intentional — swarm-utils reads/writes the shared blackboard file and audit log. Filesystem I/O is the persistence layer."
|
|
166
|
-
}
|
|
167
|
-
]
|
|
168
|
-
}
|
|
169
|
-
}
|