Skip to content

Commit 1edfc92

Browse files
author
jovanSAPFIONEER
committed
v4.12.0 — Phase 7: deferred init, hooks, flow control, skill composer, semantic search
Version bump to 4.12.0. Updated all docs: README badges, CHANGELOG, SECURITY, CONTRIBUTING, ENTERPRISE, INTEGRATION_GUIDE, CLAUDE, CODEX, copilot-instructions, adapter-system reference. 1,778 tests / 22 suites.
1 parent a1f4140 commit 1edfc92

File tree

15 files changed

+150
-22
lines changed

15 files changed

+150
-22
lines changed

.github/SECURITY.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
|---------|-----------|
7-
| 4.11.x | ✅ Yes — full support (current) |
8-
| 4.10.x | ✅ Security fixes only |
7+
| 4.12.x | ✅ Yes — full support (current) |
8+
| 4.11.x | ✅ Security fixes only |
99
| 4.9.x | ✅ Security fixes only |
1010
| 4.8.x | ✅ Security fixes only |
1111
| 4.7.x | ✅ Security fixes only |
@@ -41,6 +41,9 @@ Network-AI includes built-in security features:
4141
- **ComplianceMonitor** (v3.3.0) -- real-time agent behavior surveillance with configurable violation policies, severity classification, and async audit loop
4242
- **Named Multi-Blackboard API** (v3.4.0) -- isolated `SharedBlackboard` instances per name with independent namespaces, validation configs, and agent scoping; prevents cross-task data leakage
4343
- **QA Orchestrator Agent** (v4.11.0) -- scenario replay through quality gates, cross-agent contradiction detection, feedback loop with retry limits, and regression tracking with historical snapshots
44+
- **Deferred Adapter Initialization** (v4.12.0) -- adapters are materialized only on first use via `registerDeferred()`, preventing untrusted adapter code from running at startup
45+
- **Adapter Hook Middleware** (v4.12.0) -- `beforeExecute` / `afterExecute` / `onError` lifecycle hooks; enables request-level logging, tracing, and custom security gates without modifying adapters
46+
- **Flow Control** (v4.12.0) -- `pause()` / `resume()` / `setThrottle()` on the blackboard; prevents write floods and enables coordinated maintenance windows
4447

4548
## Security Scan Results
4649

.github/copilot-instructions.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project Overview
44

5-
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination (v4.11.0). 1,684 tests across 21 suites.
5+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination (v4.12.0). 1,778 tests across 22 suites.
66

77
## Architecture
88

@@ -27,13 +27,16 @@ Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, gu
2727
- `lib/locked-blackboard.ts` — LockedBlackboard with atomic propose → validate → commit
2828
- `lib/fsm-journey.ts` — JourneyFSM behavioral control plane
2929
- `lib/compliance-monitor.ts` — Real-time agent behavior surveillance
30+
- `lib/adapter-hooks.ts` — AdapterHookManager lifecycle hooks
31+
- `lib/skill-composer.ts` — SkillComposer meta-operations (chain/batch/loop/verify)
32+
- `lib/semantic-search.ts` — SemanticMemory BYOE vector store
3033
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
3134

3235
## Build & Test
3336

3437
```bash
3538
npx tsc --noEmit # Type-check (zero errors expected)
36-
npm run test:all # All 1,684 tests across 21 suites
39+
npm run test:all # All 1,778 tests across 22 suites
3740
npm test # Core orchestrator tests
3841
npm run test:adapters # All 17 adapters
3942
```

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ 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.12.0] - 2026-04-01
9+
10+
### Added
11+
- **Deferred Adapter Initialization**`registerDeferred(name, factory, config)` on `AdapterRegistry`; adapters are created and initialized only on first use via `resolveAdapterAsync()`. `executeAgent()` auto-materializes deferred adapters transparently. `listAdapters()` shows deferred entries with `deferred: true`.
12+
- **Adapter Hook Middleware** (`AdapterHookManager`) — lifecycle hooks (`beforeExecute` / `afterExecute` / `onError`) that wrap any adapter's `executeAgent` call. Priority-ordered execution, payload/result mutation, abort support. New module: `lib/adapter-hooks.ts`.
13+
- **Flow Control** on `LockedBlackboard``pause()` / `resume()` / `isPaused()` blocks writes/commits while paused (reads continue); `setThrottle(ms)` / `getThrottle()` enforces minimum interval between mutating operations; `throttleMs` option in constructor.
14+
- **Skill Composer** (`SkillComposer`) — `chain()`, `batch()`, `loop()`, `verify()` meta-operations for composing multi-agent workflows. Chain passes `previousResult` downstream; batch supports concurrency limits; loop has condition + maxIterations; verify retries until validator passes. New module: `lib/skill-composer.ts`.
15+
- **Semantic Memory Search** (`SemanticMemory`) — BYOE (bring your own embedding function) in-memory vector store with cosine similarity search, `topK` + `threshold`, `indexSnapshot()` for bulk blackboard import. New module: `lib/semantic-search.ts`.
16+
- `adapter:deferred` event type in `AdapterEventType`
17+
- `AdapterFactory` type export from adapter-registry
18+
- 94 new tests in `test-phase7.ts` (1,778 total across 22 suites)
19+
20+
### Fixed
21+
- **CodeQL #91** — removed unused `badResult` variable in `test-qa.ts`
22+
- Constructor detection in `LockedBlackboard` now recognizes options with only `throttleMs` (without `conflictResolution`)
23+
24+
### Changed
25+
- `AdapterRegistry.listAdapters()` return type now includes optional `deferred` field
26+
- `LockedBlackboardOptions` interface extended with `throttleMs` property
27+
- CI: bumped `github/codeql-action` from 4.34.1 to 4.35.1 (PR #79)
28+
829
## [4.11.2] - 2026-03-22
930

1031
### Fixed

CLAUDE.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ 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.10.0.
7+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.12.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,684 tests across 21 suites
14+
npm run test:all # Run all 1,778 tests across 22 suites
1515
npm test # Core orchestrator tests only
1616
npm run test:security # Security module tests
1717
npm run test:adapters # All 17 adapter tests
@@ -28,6 +28,9 @@ 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+
- `lib/adapter-hooks.ts` — AdapterHookManager: beforeExecute/afterExecute/onError lifecycle hooks
32+
- `lib/skill-composer.ts` — SkillComposer: chain/batch/loop/verify meta-operations
33+
- `lib/semantic-search.ts` — SemanticMemory: BYOE vector store with cosine similarity
3134
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
3235
- `bin/cli.ts` — CLI entry point (`npx network-ai`)
3336
- `bin/mcp-server.ts` — MCP server (SSE + stdio transport)

CODEX.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ This file is read automatically by OpenAI Codex CLI when working in this reposit
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.10.0.
7+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.12.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,684 tests across 21 suites
14+
npm run test:all # Run all 1,778 tests across 22 suites
1515
npm test # Core orchestrator tests only
1616
npm run test:security # Security module tests
1717
npm run test:adapters # All 17 adapter tests

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,684 existing tests must pass (`npm run test:all`)
19+
- All 1,778 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,684 tests (21 suites)
81+
npm run test:all # Run all 1,778 tests (22 suites)
8282
npm run test:phase4 # Phase 4 behavioral control plane tests only
8383
npx tsc --noEmit # Type-check
8484
```

ENTERPRISE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Network-AI follows [Semantic Versioning](https://semver.org/):
100100

101101
### Stability Signals
102102

103-
- 1,684 passing assertions across 21 suites
103+
- 1,778 passing assertions across 22 suites
104104
- Deterministic scoring — no random outcomes in permission evaluation or budget enforcement
105105
- CI runs on every push and every PR
106106
- All examples ship with the repo and run without mocking

INTEGRATION_GUIDE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,8 @@ Run these before declaring the integration production-ready:
408408
- [ ] `npx ts-node test-adapters.ts` — 176 adapter tests pass
409409
- [ ] `npx ts-node test-phase4.ts` — 147 behavioral tests pass
410410
- [ ] `npx ts-node test-qa.ts` — 67 QA orchestrator tests pass
411-
- [ ] `npm run test:all` — all 1,684 tests pass across 21 suites
411+
- [ ] `npx ts-node test-phase7.ts` — 94 Phase 7 tests pass (hooks, flow control, composer, semantic search)
412+
- [ ] `npm run test:all` — all 1,778 tests pass across 22 suites
412413
- [ ] `npm run demo -- --08` runs to completion in < 10 seconds
413414

414415
### Race Condition Safety

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
[![Website](https://img.shields.io/badge/website-network--ai.org-4b9df2?style=flat&logo=web&logoColor=white)](https://network-ai.org/)
66
[![CI](https://github.com/Jovancoding/Network-AI/actions/workflows/ci.yml/badge.svg)](https://github.com/Jovancoding/Network-AI/actions/workflows/ci.yml)
77
[![CodeQL](https://github.com/Jovancoding/Network-AI/actions/workflows/codeql.yml/badge.svg)](https://github.com/Jovancoding/Network-AI/actions/workflows/codeql.yml)
8-
[![Release](https://img.shields.io/badge/release-v4.11.2-blue.svg)](https://github.com/Jovancoding/Network-AI/releases)
8+
[![Release](https://img.shields.io/badge/release-v4.12.0-blue.svg)](https://github.com/Jovancoding/Network-AI/releases)
99
[![npm](https://img.shields.io/npm/dw/network-ai.svg?label=npm%20downloads)](https://www.npmjs.com/package/network-ai)
10-
[![Tests](https://img.shields.io/badge/tests-1684%20passing-brightgreen.svg)](#testing)
10+
[![Tests](https://img.shields.io/badge/tests-1778%20passing-brightgreen.svg)](#testing)
1111
[![Adapters](https://img.shields.io/badge/frameworks-17%20supported-blueviolet.svg)](#adapter-system)
1212
[![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
1313
[![Socket](https://socket.dev/api/badge/npm/package/network-ai)](https://socket.dev/npm/package/network-ai/overview)
@@ -89,6 +89,11 @@ Runs priority preemption, AuthGuardian permission gating, FSM governance, and co
8989
| ✅ FSM governance | Hard-stop agents at state boundaries, timeout enforcement |
9090
| ✅ Compliance monitoring | Real-time violation detection (tool abuse, turn-taking, timeouts) |
9191
| ✅ QA orchestration | Scenario replay, feedback loops, regression tracking, contradiction detection |
92+
| ✅ Deferred adapter init | Lazy-load adapters on first use — zero startup cost for unused frameworks |
93+
| ✅ Hook middleware | `beforeExecute` / `afterExecute` / `onError` hooks on any adapter call |
94+
| ✅ Flow control | Pause / resume / throttle writes on the blackboard |
95+
| ✅ Skill composition | `chain()` / `batch()` / `loop()` / `verify()` meta-operations over agent calls |
96+
| ✅ Semantic memory search | BYOE vector store with cosine similarity over blackboard data |
9297
| ✅ TypeScript native | ES2022 strict mode, zero native dependencies |
9398

9499
---
@@ -384,7 +389,7 @@ npm run test:priority # Priority & preemption
384389
npm run test:cli # CLI layer
385390
```
386391

387-
**1,684 passing assertions across 21 test suites** (`npm run test:all`):
392+
**1,778 passing assertions across 22 test suites** (`npm run test:all`):
388393

389394
| Suite | Assertions | Covers |
390395
|---|---|---|
@@ -408,6 +413,7 @@ npm run test:cli # CLI layer
408413
| `test-security.ts` | 34 | Tokens, sanitization, rate limiting, encryption, audit |
409414
| `test-cli.ts` | 65 | CLI layer: bb, auth, budget, audit commands |
410415
| `test-qa.ts` | 67 | QA orchestrator: scenarios, feedback loop, regression, contradictions |
416+
| `test-phase7.ts` | 94 | Deferred init, hook middleware, flow control, skill composer, semantic search |
411417

412418
---
413419

SECURITY.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Version | Supported |
66
|---------|-----------||
7-
| 4.11.x | ✅ Yes — full support (current) |
8-
| 4.10.x | ✅ Security fixes only |
7+
| 4.12.x | ✅ Yes — full support (current) |
8+
| 4.11.x | ✅ Security fixes only |
99
| 4.9.x | ✅ Security fixes only |
1010
| 4.8.x | ✅ Security fixes only |
1111
| 4.7.x | ✅ Security fixes only |
@@ -41,6 +41,9 @@ Network-AI includes built-in security features:
4141
- **ComplianceMonitor** (v3.3.0) -- real-time agent behavior surveillance with configurable violation policies, severity classification, and async audit loop
4242
- **Named Multi-Blackboard API** (v3.4.0) -- isolated `SharedBlackboard` instances per name with independent namespaces, validation configs, and agent scoping; prevents cross-task data leakage
4343
- **QA Orchestrator Agent** (v4.11.0) -- scenario replay through quality gates, cross-agent contradiction detection, feedback loop with retry limits, and regression tracking with historical snapshots
44+
- **Deferred Adapter Initialization** (v4.12.0) -- adapters are materialized only on first use via `registerDeferred()`, preventing untrusted adapter code from running at startup
45+
- **Adapter Hook Middleware** (v4.12.0) -- `beforeExecute` / `afterExecute` / `onError` lifecycle hooks; enables request-level logging, tracing, and custom security gates without modifying adapters
46+
- **Flow Control** (v4.12.0) -- `pause()` / `resume()` / `setThrottle()` on the blackboard; prevents write floods and enables coordinated maintenance windows
4447

4548
## Security Scan Results
4649

0 commit comments

Comments
 (0)