network-ai 4.0.4 → 4.0.5

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.
Files changed (2) hide show
  1. package/README.md +61 -3
  2. package/package.json +3 -1
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![CI](https://github.com/jovanSAPFIONEER/Network-AI/actions/workflows/ci.yml/badge.svg)](https://github.com/jovanSAPFIONEER/Network-AI/actions/workflows/ci.yml)
6
6
  [![CodeQL](https://github.com/jovanSAPFIONEER/Network-AI/actions/workflows/codeql.yml/badge.svg)](https://github.com/jovanSAPFIONEER/Network-AI/actions/workflows/codeql.yml)
7
- [![Release](https://img.shields.io/badge/release-v4.0.3-blue.svg)](https://github.com/jovanSAPFIONEER/Network-AI/releases)
7
+ [![Release](https://img.shields.io/badge/release-v4.0.5-blue.svg)](https://github.com/jovanSAPFIONEER/Network-AI/releases)
8
8
  [![npm](https://img.shields.io/npm/dw/network-ai.svg?label=npm%20downloads)](https://www.npmjs.com/package/network-ai)
9
9
  [![ClawHub](https://img.shields.io/badge/ClawHub-network--ai-orange.svg)](https://clawhub.ai/skills/network-ai)
10
10
  [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
@@ -60,7 +60,60 @@ console.log(result.data); // "Hello, World! Your task: welcome"
60
60
 
61
61
  That's it. No config files, no setup wizards. Add more agents, swap frameworks, layer on security -- all optional.
62
62
 
63
- ## Demo
63
+ ## Demos
64
+
65
+ ### One command to run everything
66
+
67
+ ```bash
68
+ npm run demo
69
+ ```
70
+
71
+ Interactive menu or use flags directly:
72
+
73
+ ```bash
74
+ npm run demo -- --07 # Full AI showcase (OPENAI_API_KEY required)
75
+ npm run demo -- --08 # Control-plane stress demo (no API key)
76
+ npm run demo -- --both # Both sequentially
77
+ npm run demo -- --both --silent-summary # Both, highlights only
78
+ ```
79
+
80
+ ---
81
+
82
+ ### Demo 07 — Full AI Showcase *(requires `OPENAI_API_KEY`)*
83
+
84
+ 8-agent pipeline that builds a Payment Processing Service from scratch with full governance:
85
+
86
+ - **FSM state machine** — each agent phase is gated by `JourneyFSM` state transitions
87
+ - **AuthGuardian tokens** — scoped HMAC-signed tokens required at every gate
88
+ - **FederatedBudget** — per-agent token ceilings, hard cut-off on overspend
89
+ - **QualityGateAgent** — AI-assisted security scan + content safety on generated code
90
+ - **Fixer + debugger agents** — two-pass automated remediation loop
91
+ - **Deterministic 10/10 scoring** — 8 objective gates, no LLM score parsing
92
+ - **Cryptographic audit trail** — every write signed to `data/audit_log.jsonl`
93
+
94
+ ```bash
95
+ npm run demo -- --07
96
+ ```
97
+
98
+ ---
99
+
100
+ ### Demo 08 — Control-Plane Stress Demo *(no API key)*
101
+
102
+ No LLM calls. Runs in ~2 seconds. Shows the synchronization and governance primitives under load:
103
+
104
+ - **`LockedBlackboard`** — atomic `propose → validate → commit` workflow with file-system mutex
105
+ - **Priority preemption** — high-priority (3) write overwrites low-priority (0) write on same key
106
+ - **FSM timeout** — state times out after 700 ms, FSM hard-stops
107
+ - **Live compliance violations** — TOOL_ABUSE (6 rapid writes), TURN_TAKING (5 consecutive actions), RESPONSE_TIMEOUT (1.2 s sleep), JOURNEY_TIMEOUT — all captured by `ComplianceMonitor`
108
+ - **`FederatedBudget`** — per-agent ceilings tracked without any AI backend
109
+
110
+ ```bash
111
+ npm run demo -- --08
112
+ ```
113
+
114
+ ---
115
+
116
+ ### Demo 05 — Code Review Swarm *(requires `OPENAI_API_KEY`)*
64
117
 
65
118
  [![Code Review Swarm Demo](https://img.youtube.com/vi/UyMsNhaw9lU/0.jpg)](https://youtu.be/UyMsNhaw9lU)
66
119
 
@@ -68,7 +121,12 @@ That's it. No config files, no setup wizards. Add more agents, swap frameworks,
68
121
 
69
122
  > The demo shows a code review swarm, but Network-AI is not a code review tool. The same orchestration pattern works for research pipelines, data processing, content moderation, customer support routing, document analysis, financial workflows — any task where multiple agents need to coordinate without stepping on each other.
70
123
 
71
- > **Run the demo yourself:** `05-code-review-swarm.ts` is in the repo. Copy `.env.example` to `.env`, add your `OPENAI_API_KEY`, then run `npx ts-node examples/05-code-review-swarm.ts`. Supports 4 modes: built-in code review, paste your own code, system design document, or custom role for any content type (proposals, policies, job descriptions, emails). Examples `01`–`03` cover all core framework features with no API key required. `04-live-swarm.ts` runs a 10-agent live AI research swarm (3 parallel analyst waves + synthesizer) — also requires `OPENAI_API_KEY`.
124
+ ```bash
125
+ npm run demo -- --07 # or run directly:
126
+ npx ts-node examples/05-code-review-swarm.ts
127
+ ```
128
+
129
+ Supports 4 modes: built-in code review, paste your own code, system design document, or custom role for any content type. Examples `01`–`03` run without any API key. `04-live-swarm.ts` runs a 10-agent live AI research swarm (3 parallel analyst waves + synthesizer).
72
130
 
73
131
  ## Why This Exists -- The Multi-Agent Race Condition Problem
74
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "network-ai",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "description": "AI agent orchestration framework for TypeScript/Node.js - plug-and-play multi-agent coordination with 12 frameworks (LangChain, AutoGen, CrewAI, OpenAI Assistants, LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, OpenClaw). Built-in security, swarm intelligence, and agentic workflow patterns.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -29,6 +29,7 @@
29
29
  "setup": "npx ts-node setup.ts",
30
30
  "setup:check": "npx ts-node setup.ts --check",
31
31
  "setup:example": "npx ts-node setup.ts --example",
32
+ "demo": "npx ts-node examples/demo-runner.ts",
32
33
  "blackboard": "python scripts/blackboard.py",
33
34
  "check-permission": "python scripts/check_permission.py",
34
35
  "validate-token": "python scripts/validate_token.py",
@@ -82,6 +83,7 @@
82
83
  },
83
84
  "devDependencies": {
84
85
  "@types/node": "^25.3.0",
86
+ "dotenv": "^17.3.1",
85
87
  "openai": "^6.23.0",
86
88
  "ts-node": "^10.9.2",
87
89
  "typescript": "^5.9.3"