Skip to content

Commit b6ea9b7

Browse files
author
jovanSAPFIONEER
committed
v4.10.0 — APS adapter, 1,617 tests, docs overhaul
Added: - APS adapter (Agent Permission Service delegation-chain trust bridge) - 13 new APS tests (root, mid-chain, max depth, BYOC verifier, etc.) - CODEX.md (OpenAI Codex CLI instructions) - .github/copilot-instructions.md (GitHub Copilot workspace instructions) - Animated SVG terminal demo (assets/demo.svg) - Demo recording helpers (gif-demo, create-recording, generate-demo-svg) Changed: - Version bump 4.9.1 → 4.10.0 - Adapter count 16 → 17 across all docs - Test count 1,582 → 1,617 across all docs - Security policy: 4.10.x current, 4.9.x security-fixes-only - refs/auth-guardian.md: APS Integration section - refs/adapter-system.md: APS adapter section - README: badges, adapter table, comparison table, test counts Fixed: - Removed unused grant2 variable in test.ts (CodeQL alert #90)
1 parent 2067c14 commit b6ea9b7

27 files changed

Lines changed: 1203 additions & 60 deletions

.github/copilot-instructions.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# GitHub Copilot Instructions for Network-AI
2+
3+
## Project Overview
4+
5+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination (v4.10.0). 1,617 tests across 20 suites.
6+
7+
## Architecture
8+
9+
- **Blackboard pattern**: All coordination via `LockedBlackboard``propose()``validate()``commit()` with filesystem mutex. Never write to shared state directly.
10+
- **Permission gating**: `AuthGuardian` uses weighted scoring (justification 40%, trust 30%, risk 30%). Require permission before sensitive resource access.
11+
- **Adapter system**: All 17 adapters extend `BaseAdapter`. Each is dependency-free (BYOC — bring your own client). No cross-adapter imports.
12+
- **Audit trail**: Every write, permission grant, and state transition is logged to `data/audit_log.jsonl` via `SecureAuditLogger`.
13+
14+
## Code Conventions
15+
16+
- TypeScript strict mode, target ES2022
17+
- No `any` types — use proper generics or `unknown`
18+
- JSDoc on all exported functions and classes
19+
- No new runtime dependencies without explicit approval
20+
- Input validation required on all public API entry points
21+
- Keep adapter files self-contained — no cross-adapter imports
22+
23+
## Key Files
24+
25+
- `index.ts` — Core engine: SwarmOrchestrator, AuthGuardian, FederatedBudget, QualityGateAgent
26+
- `security.ts` — SecureTokenManager, InputSanitizer, RateLimiter, DataEncryptor, SecureAuditLogger
27+
- `lib/locked-blackboard.ts` — LockedBlackboard with atomic propose → validate → commit
28+
- `lib/fsm-journey.ts` — JourneyFSM behavioral control plane
29+
- `lib/compliance-monitor.ts` — Real-time agent behavior surveillance
30+
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
31+
32+
## Build & Test
33+
34+
```bash
35+
npx tsc --noEmit # Type-check (zero errors expected)
36+
npm run test:all # All 1,582 tests across 20 suites
37+
npm test # Core orchestrator tests
38+
npm run test:adapters # All 17 adapters
39+
```
40+
41+
All tests must pass before any commit. No test should be skipped or marked `.only`.
42+
43+
## Security
44+
45+
- AES-256-GCM encryption at rest
46+
- HMAC-SHA256 / Ed25519 signed tokens with TTL
47+
- No hardcoded secrets, keys, or credentials
48+
- Path traversal and injection protections on all file operations
49+
- Rate limiting on public-facing endpoints

ARCHITECTURE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ Network-AI/
262262
├── setup.ts # Developer setup & installation checker
263263
├── bin/
264264
│ └── cli.ts # Full CLI — bb, auth, budget, audit commands (in-process)
265-
├── adapters/ # 16 plug-and-play agent framework adapters
265+
├── adapters/ # 17 plug-and-play agent framework adapters
266266
│ ├── adapter-registry.ts # Multi-adapter routing & discovery
267267
│ ├── base-adapter.ts # Abstract base class
268268
│ ├── custom-adapter.ts # Custom function/HTTP agent adapter
@@ -276,6 +276,7 @@ Network-AI/
276276
│ ├── haystack-adapter.ts
277277
│ ├── dspy-adapter.ts
278278
│ ├── agno-adapter.ts
279+
│ ├── aps-adapter.ts
279280
│ └── openclaw-adapter.ts
280281
├── lib/
281282
│ ├── locked-blackboard.ts # Atomic commits with file-system mutexes

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ All notable changes to Network-AI will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [4.10.0] - 2026-03-21
9+
10+
### Added
11+
- **APS adapter** — New `APSAdapter` mapping Agent Permission Service delegation chains to AuthGuardian trust levels. Features: depth-decayed trust formula (`baseTrust × (1 - (currentDepth / maxDepth × depthDecay))`), local/MCP/BYOC signature verification, APS scope-to-resource mapping (`file:read``FILE_SYSTEM`, `shell:exec``SHELL_EXEC`, etc.), namespace derivation, and executeAgent pass-through. Adapter count now 17.
12+
- 13 new tests for APS adapter: root delegation, mid-chain decay, max depth, unverified signature, custom config, BYOC verifier, input validation, depth overflow, executeAgent, namespace derivation, MCP mode, capabilities (total: 1,617 across 20 suites)
13+
- `CODEX.md` — Project instructions for OpenAI Codex CLI (mirrors CLAUDE.md)
14+
- `.github/copilot-instructions.md` — GitHub Copilot workspace instructions
15+
16+
### Changed
17+
- All documentation updated: adapter count 16 → 17, test count 1,582 → 1,617 across README, QUICKSTART, ARCHITECTURE, ENTERPRISE, INTEGRATION_GUIDE, CONTRIBUTING, CLAUDE.md, CODEX.md, copilot-instructions.md, SKILL.md, skill.json, package.json
18+
- Security policy updated: 4.10.x now current, 4.9.x moved to security-fixes-only
19+
- `references/adapter-system.md` — Added APS adapter section with trust formula, verification modes, and usage example
20+
- `references/auth-guardian.md` — Added APS Integration section documenting delegation-chain → trust mapping
21+
22+
### Fixed
23+
- Removed unused `grant2` variable in test.ts (CodeQL alert #90)
24+
825
## [4.9.1] - 2026-03-19
926

1027
### Changed

CLAUDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ This file is read automatically by Claude Code when working in this repository.
44

55
## Project Overview
66

7-
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.9.1.
7+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.10.0.
88

99
## Build & Test Commands
1010

1111
```bash
1212
npm install # Install dependencies
1313
npx tsc --noEmit # Type-check (zero errors expected)
14-
npm run test:all # Run all 1,582 tests across 20 suites
14+
npm run test:all # Run all 1,617 tests across 20 suites
1515
npm test # Core orchestrator tests only
1616
npm run test:security # Security module tests
17-
npm run test:adapters # All 16 adapter tests
17+
npm run test:adapters # All 17 adapter tests
1818
npm run test:priority # Priority & preemption tests
1919
npm run test:cli # CLI layer tests
2020
```
@@ -28,7 +28,7 @@ All tests must pass before any commit. No test should be skipped or marked `.onl
2828
- `lib/locked-blackboard.ts` — LockedBlackboard with atomic propose → validate → commit and file-system mutex
2929
- `lib/fsm-journey.ts` — JourneyFSM behavioral control plane
3030
- `lib/compliance-monitor.ts` — Real-time agent behavior surveillance
31-
- `adapters/`16 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, etc.)
31+
- `adapters/`17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
3232
- `bin/cli.ts` — CLI entry point (`npx network-ai`)
3333
- `bin/mcp-server.ts` — MCP server (SSE + stdio transport)
3434
- `scripts/` — Python helper scripts (blackboard, permissions, token management)

CODEX.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# CODEX.md — Project Instructions for OpenAI Codex
2+
3+
This file is read automatically by OpenAI Codex CLI when working in this repository.
4+
5+
## Project Overview
6+
7+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.10.0.
8+
9+
## Build & Test Commands
10+
11+
```bash
12+
npm install # Install dependencies
13+
npx tsc --noEmit # Type-check (zero errors expected)
14+
npm run test:all # Run all 1,617 tests across 20 suites
15+
npm test # Core orchestrator tests only
16+
npm run test:security # Security module tests
17+
npm run test:adapters # All 17 adapter tests
18+
npm run test:priority # Priority & preemption tests
19+
npm run test:cli # CLI layer tests
20+
```
21+
22+
All tests must pass before any commit. No test should be skipped or marked `.only`.
23+
24+
## Project Structure
25+
26+
- `index.ts` — Core engine: SwarmOrchestrator, AuthGuardian, FederatedBudget, QualityGateAgent, all exports
27+
- `security.ts` — Security module: SecureTokenManager, InputSanitizer, RateLimiter, DataEncryptor, SecureAuditLogger
28+
- `lib/locked-blackboard.ts` — LockedBlackboard with atomic propose → validate → commit and file-system mutex
29+
- `lib/fsm-journey.ts` — JourneyFSM behavioral control plane
30+
- `lib/compliance-monitor.ts` — Real-time agent behavior surveillance
31+
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
32+
- `bin/cli.ts` — CLI entry point (`npx network-ai`)
33+
- `bin/mcp-server.ts` — MCP server (SSE + stdio transport)
34+
- `scripts/` — Python helper scripts (blackboard, permissions, token management)
35+
- `types/` — TypeScript declaration files
36+
- `data/` — Runtime data (gitignored): audit log, pending changes
37+
38+
## Key Architecture Patterns
39+
40+
- **Blackboard pattern**: All agent coordination goes through `LockedBlackboard``propose()``validate()``commit()` with file-system mutex. Never write directly.
41+
- **Permission gating**: `AuthGuardian` uses weighted scoring (justification 40%, trust 30%, risk 30%). Always require permission before sensitive resource access.
42+
- **Adapter system**: All adapters extend `BaseAdapter`. Each is dependency-free (BYOC — bring your own client). Do not add runtime dependencies to adapters.
43+
- **Audit trail**: Every write, permission grant, and state transition is logged to `data/audit_log.jsonl` via `SecureAuditLogger`.
44+
45+
## Code Conventions
46+
47+
- TypeScript strict mode, target ES2022
48+
- No `any` types — use proper generics or `unknown`
49+
- JSDoc on all exported functions and classes
50+
- No new runtime dependencies without explicit approval
51+
- Input validation required on all public API entry points
52+
- Keep adapter files self-contained — no cross-adapter imports
53+
54+
## Security Requirements
55+
56+
- AES-256-GCM encryption for data at rest
57+
- HMAC-SHA256 / Ed25519 signed tokens with TTL
58+
- No hardcoded secrets, keys, or credentials anywhere
59+
- Path traversal and injection protections on all file operations
60+
- Rate limiting on all public-facing endpoints
61+
62+
## Common Workflows
63+
64+
**Adding a new adapter:**
65+
1. Create `adapters/<name>-adapter.ts` extending `BaseAdapter`
66+
2. Implement `executeAgent()`, `getCapabilities()`, lifecycle methods
67+
3. Register in `adapters/adapter-registry.ts` and `adapters/index.ts`
68+
4. Add tests in `test-adapters.ts`
69+
5. Update README adapter table
70+
71+
**Bumping a version:**
72+
See `RELEASING.md` for the full checklist. Key files: `package.json`, `skill.json`, `openapi.yaml`, `README.md` badge, `CHANGELOG.md`, `SECURITY.md`, `.github/SECURITY.md`.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Unsolicited PRs without a linked, approved issue will be closed.
1616

1717
### Code Quality
1818

19-
- All 1,582 existing tests must pass (`npm run test:all`)
19+
- All 1,617 existing tests must pass (`npm run test:all`)
2020
- Zero TypeScript compile errors (`npx tsc --noEmit`)
2121
- New features must include tests with >90% branch coverage
2222
- Follow existing code style and patterns
@@ -78,7 +78,7 @@ Unsolicited PRs without a linked, approved issue will be closed.
7878
git clone https://github.com/Jovancoding/Network-AI.git
7979
cd Network-AI
8080
npm install
81-
npm run test:all # Run all 1,582 tests (20 suites)
81+
npm run test:all # Run all 1,617 tests (20 suites)
8282
npm run test:phase4 # Phase 4 behavioral control plane tests only
8383
npx tsc --noEmit # Type-check
8484
```

ENTERPRISE.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This document exists so an engineer or architect can evaluate Network-AI in unde
1212
| Do I control all data? | **Yes.** All state lives in your `data/` directory on your own infrastructure. Nothing is transmitted. |
1313
| Is the source auditable? | **Yes.** MIT-licensed, fully open source, no obfuscated code, no telemetry. |
1414
| Does it have an audit trail? | **Yes.** Every permission request, grant, denial, and revocation is appended to `data/audit_log.jsonl` with a UTC timestamp. See [AUDIT_LOG_SCHEMA.md](AUDIT_LOG_SCHEMA.md). |
15-
| Can I plug in my own LLM / provider? | **Yes.** The adapter registry supports LangChain, AutoGen, CrewAI, LlamaIndex, Semantic Kernel, OpenAI Assistants, Haystack, DSPy, Agno, MCP, OpenClaw, A2A, Codex, MiniMax, NemoClaw, and a `CustomAdapter` for anything else. |
15+
| Can I plug in my own LLM / provider? | **Yes.** The adapter registry supports LangChain, AutoGen, CrewAI, LlamaIndex, Semantic Kernel, OpenAI Assistants, Haystack, DSPy, Agno, MCP, OpenClaw, A2A, Codex, MiniMax, NemoClaw, APS, and a `CustomAdapter` for anything else. |
1616
| Does it work with our existing agent framework? | **Yes.** It wraps around your framework — you keep what you have and add guardrails on top. |
1717
| Is there a security review? | **Yes.** CodeQL scanning on every push, Dependabot auto-merge, Socket.dev supply chain score A, OpenSSF Scorecard. See [SECURITY.md](SECURITY.md). |
1818
| What does it cost to operate? | **Zero licensing cost.** MIT license. Infrastructure cost = your own compute. |
@@ -84,9 +84,10 @@ Network-AI follows [Semantic Versioning](https://semver.org/):
8484

8585
| Version | Policy |
8686
|---|---|
87-
| 4.0.x (current) | Full support — bugs + security fixes |
88-
| 3.5.x – 3.9.x | Security fixes only |
89-
| < 3.5 | No support |
87+
| 4.10.x (current) | Full support — bugs + security fixes |
88+
| 4.9.x | Security fixes only |
89+
| 4.0.x – 4.8.x | Security fixes only |
90+
| < 4.0 | No support |
9091

9192
### Response Times (GitHub Issues)
9293

@@ -98,7 +99,7 @@ Network-AI follows [Semantic Versioning](https://semver.org/):
9899

99100
### Stability Signals
100101

101-
- 1,582 passing assertions across 20 suites
102+
- 1,617 passing assertions across 20 suites
102103
- Deterministic scoring — no random outcomes in permission evaluation or budget enforcement
103104
- CI runs on every push and every PR
104105
- All examples ship with the repo and run without mocking

INTEGRATION_GUIDE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Answers drive `AuthGuardian` configuration and audit log retention policy.
6464

6565
## 2. Framework Mapping
6666

67-
Network-AI ships 16 adapters. Map your existing agents to the right one:
67+
Network-AI ships 17 adapters. Map your existing agents to the right one:
6868

6969
| Your Stack | Network-AI Adapter | Notes |
7070
|-----------|-------------------|-------|
@@ -83,6 +83,7 @@ Network-AI ships 16 adapters. Map your existing agents to the right one:
8383
| OpenAI Codex CLI | `CodexAdapter` | Codex CLI task execution |
8484
| MiniMax | `MiniMaxAdapter` | MiniMax chat completions (M2.5) |
8585
| NVIDIA NemoClaw | `NemoClawAdapter` | Sandboxed agent execution via OpenShell |
86+
| APS delegation chains | `APSAdapter` | Delegation-chain trust mapping for AuthGuardian |
8687
| **Anything else** | `CustomAdapter` | Wrap any async function or HTTP endpoint |
8788

8889
### No matching framework?
@@ -463,7 +464,7 @@ Run these before declaring the integration production-ready:
463464
|----------|---------------|
464465
| [QUICKSTART.md](QUICKSTART.md) | Get running in 5 minutes |
465466
| [QUICKSTART.md § CLI](QUICKSTART.md) | CLI reference — bb, auth, budget, audit commands |
466-
| [references/adapter-system.md](references/adapter-system.md) | All 16 adapters with code examples |
467+
| [references/adapter-system.md](references/adapter-system.md) | All 17 adapters with code examples |
467468
| [references/trust-levels.md](references/trust-levels.md) | Trust scoring formula and agent roles |
468469
| [references/auth-guardian.md](references/auth-guardian.md) | Permission system, justification scoring, token lifecycle |
469470
| [references/blackboard-schema.md](references/blackboard-schema.md) | Blackboard key conventions and namespacing |

QUICKSTART.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ npm install
1818
npx ts-node setup.ts --check
1919
```
2020

21-
**Zero external AI dependencies.** All 16 adapters are self-contained — add framework SDKs only when you need them.
21+
**Zero external AI dependencies.** All 17 adapters are self-contained — add framework SDKs only when you need them.
2222

2323
---
2424

@@ -42,7 +42,7 @@ npx ts-node setup.ts --check
4242
| `a2a` | A2A | none | Agent-to-Agent protocol |
4343
| `codex` | Codex | `openai` | OpenAI Codex CLI |
4444
| `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 |
4646

4747
---
4848

@@ -218,9 +218,9 @@ export class MyFrameworkAdapter extends BaseAdapter {
218218
## 8. Run Tests
219219

220220
```bash
221-
npx ts-node test-standalone.ts # 79 core tests
222-
npx ts-node test-security.ts # 33 security tests
223-
npx ts-node test-adapters.ts # 100+ adapter tests (all 14 frameworks)
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)
224224
npx ts-node test-cli.ts # 65 CLI tests
225225
```
226226

@@ -230,7 +230,7 @@ npx ts-node test-cli.ts # 65 CLI tests
230230

231231
```bash
232232
npx ts-node setup.ts --check # Verify installation
233-
npx ts-node setup.ts --list # List all 16 adapters
233+
npx ts-node setup.ts --list # List all 17 adapters
234234
npx ts-node setup.ts --example # Generate example.ts
235235
```
236236

@@ -347,7 +347,8 @@ Your App
347347
├── OpenAIAssistantsAdapter── OpenAI Assistants
348348
├── HaystackAdapter ─── Haystack pipelines
349349
├── DSPyAdapter ─── DSPy modules
350-
└── AgnoAdapter ─── Agno agents/teams
350+
├── AgnoAdapter ─── Agno agents/teams
351+
└── APSAdapter ─── APS delegation-chain trust
351352
```
352353

353354
---
@@ -568,7 +569,7 @@ import SwarmOrchestrator, {
568569
// Factory
569570
import { createSwarmOrchestrator } from 'network-ai';
570571

571-
// All 16 adapters
572+
// All 17 adapters
572573
import {
573574
AdapterRegistry, BaseAdapter,
574575
OpenClawAdapter, LangChainAdapter, AutoGenAdapter,

0 commit comments

Comments
 (0)