Skip to content

Commit f0997c1

Browse files
author
jovanSAPFIONEER
committed
Phase 10: Goal Decomposer — LLM-powered goal → task DAG → parallel execution (v4.15.0)
Added: - GoalDecomposer: LLM-powered goal decomposition into validated TaskDAG - TeamRunner: DAG execution engine with topological-layer scheduling, concurrency limits, per-task/total timeouts, dependency result injection - runTeam() one-liner: single function call from goal to results - createLLMPlanner(): structured prompt → any LLM via adapter system - DAG utilities: validateDAG (Kahn's cycle detection), topologicalLayers, parsePlanJSON (robust LLM response parsing) - TypeScript 6.0 upgrade (5.9.3 → 6.0.2) with ignoreDeprecations: 6.0 - postinstall script for third-party tsconfig patching - 153 new tests in test-phase10.ts (2,357 total across 25 suites) New module: lib/goal-decomposer.ts Exports: GoalDecomposer, TeamRunner, runTeam, createLLMPlanner, validateDAG, topologicalLayers, parsePlanJSON + all types
1 parent dde1204 commit f0997c1

22 files changed

+1762
-29
lines changed

.github/SECURITY.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
| Version | Supported |
66
|---------|-----------|
7-
| 4.13.x | ✅ Yes — full support (current) |
7+
| 4.15.x | ✅ Yes — full support (current) |
8+
| 4.14.x | ✅ Security fixes only |
9+
| 4.13.x | ✅ Security fixes only |
810
| 4.12.x | ✅ Security fixes only |
911
| 4.9.x | ✅ Security fixes only |
1012
| 4.8.x | ✅ Security fixes only |
@@ -51,6 +53,8 @@ Network-AI includes built-in security features:
5153
- **Approval Gates** (v4.14.0) -- `ApprovalGate` requires explicit human or callback approval for high-risk operations (writes, shell commands, budget spend); auto-approve mode for trusted environments; full approval history with audit trail
5254
- **Pipe Mode Authentication** (v4.14.0) -- JSON stdin/stdout protocol for programmatic agent control; commands processed one-at-a-time with structured responses; no shell injection surface
5355
- **Strategy Agent Pool Isolation** (v4.14.0) -- `AgentPool` enforces per-pool capacity ceilings; `WorkloadPartitioner` routes tasks by priority class; adaptive scaling respects budget constraints before spawning agents
56+
- **Goal Decomposer DAG Validation** (v4.15.0) -- `validateDAG()` enforces acyclicity (Kahn's algorithm), rejects self-dependencies and unknown task references; task graphs are validated before execution to prevent infinite loops or orphaned tasks
57+
- **Team Runner Approval Gate** (v4.15.0) -- optional `approvalCallback` on `runTeam()` requires explicit approval of the full task DAG before any agent execution begins; rejection skips all tasks with audit-ready status
5458

5559
## Security Scan Results
5660

.github/copilot-instructions.md

Lines changed: 3 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.14.0). 2,204 tests across 24 suites.
5+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination (v4.15.0). 2,357 tests across 25 suites.
66

77
## Architecture
88

@@ -36,13 +36,14 @@ Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, gu
3636
- `lib/agent-runtime.ts` — AgentRuntime sandboxed execution with SandboxPolicy, ShellExecutor, FileAccessor, ApprovalGate
3737
- `lib/console-ui.ts` — ConsoleUI interactive terminal dashboard
3838
- `lib/strategy-agent.ts` — StrategyAgent meta-orchestrator with AgentPool, WorkloadPartitioner, adaptive scaling
39+
- `lib/goal-decomposer.ts` — GoalDecomposer, TeamRunner, runTeam: LLM-powered goal → task DAG → parallel execution
3940
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
4041

4142
## Build & Test
4243

4344
```bash
4445
npx tsc --noEmit # Type-check (zero errors expected)
45-
npm run test:all # All 2,204 tests across 24 suites
46+
npm run test:all # All 2,357 tests across 25 suites
4647
npm test # Core orchestrator tests
4748
npm run test:adapters # All 17 adapters
4849
```

ARCHITECTURE.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,11 @@ Network-AI/
303303
│ ├── semantic-search.ts # BYOE vector store with cosine similarity (v4.12)
304304
│ ├── phase-pipeline.ts # Multi-phase workflows with approval gates (v4.13)
305305
│ ├── confidence-filter.ts # Multi-agent result scoring and filtering (v4.13)
306-
│ └── fan-out.ts # Parallel agent spawning with pluggable aggregation (v4.13)
306+
│ ├── fan-out.ts # Parallel agent spawning with pluggable aggregation (v4.13)
307+
│ ├── agent-runtime.ts # Sandboxed execution with SandboxPolicy, ShellExecutor (v4.14)
308+
│ ├── console-ui.ts # Interactive terminal dashboard with ANSI TUI (v4.14)
309+
│ ├── strategy-agent.ts # Meta-orchestrator with AgentPool, WorkloadPartitioner (v4.14)
310+
│ └── goal-decomposer.ts # LLM-powered goal → task DAG → parallel execution (v4.15)
307311
├── scripts/ # Python helper scripts (local orchestration only)
308312
│ ├── blackboard.py # Shared state management with atomic commits
309313
│ ├── swarm_guard.py # Handoff tax prevention, budget tracking

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ 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.15.0] - 2026-04-04
9+
10+
### Added
11+
- **Goal Decomposer** (`GoalDecomposer`) — LLM-powered goal → task DAG → parallel execution. Takes a natural language goal, decomposes it into a validated `TaskDAG` via an LLM planner, respects dependencies, and executes with concurrency control. New module: `lib/goal-decomposer.ts`.
12+
- **Team Runner** (`TeamRunner`) — DAG execution engine with topological-layer scheduling, concurrency limits, per-task and total timeouts, dependency result injection (`_dependencyResults`), priority ordering within layers, and `continueOnFailure` mode.
13+
- **`runTeam()` one-liner** — single function call: `runTeam(goal, agents, { planner, executor })` to go from natural language goal to results. Includes optional approval gate, planner retries, and full event emission.
14+
- **`createLLMPlanner()`** — built-in planner factory that sends structured prompts to any LLM agent via the adapter system and parses JSON responses (handles code fences, preamble text, nested `{ tasks }` / `{ text }` / `{ content }` shapes).
15+
- **DAG utilities**`validateDAG()` (cycle detection via Kahn's algorithm, self-dependency and unknown-ref checks), `topologicalLayers()` (parallel scheduling), `parsePlanJSON()` (robust LLM response parsing).
16+
- **TypeScript 6.0** — upgraded from 5.9.3 to 6.0.2; added `ignoreDeprecations: "6.0"` and postinstall script for third-party tsconfig patching.
17+
- 153 new tests in `test-phase10.ts` (2,357 total across 25 suites)
18+
819
## [4.14.0] - 2026-04-02
920

1021
### Added

CLAUDE.md

Lines changed: 3 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.14.0.
7+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.15.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 2,204 tests across 24 suites
14+
npm run test:all # Run all 2,357 tests across 25 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
@@ -37,6 +37,7 @@ All tests must pass before any commit. No test should be skipped or marked `.onl
3737
- `lib/agent-runtime.ts` — AgentRuntime: sandboxed execution with SandboxPolicy, ShellExecutor, FileAccessor, ApprovalGate
3838
- `lib/console-ui.ts` — ConsoleUI: interactive terminal dashboard with ANSI TUI
3939
- `lib/strategy-agent.ts` — StrategyAgent: meta-orchestrator with AgentPool, WorkloadPartitioner, adaptive scaling
40+
- `lib/goal-decomposer.ts` — GoalDecomposer, TeamRunner, runTeam: LLM-powered goal → task DAG → parallel execution
4041
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
4142
- `bin/cli.ts` — CLI entry point (`npx network-ai`)
4243
- `bin/mcp-server.ts` — MCP server (SSE + stdio transport)

CODEX.md

Lines changed: 3 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.14.0.
7+
Network-AI is a TypeScript/Node.js multi-agent orchestrator — shared state, guardrails, budgets, and cross-framework coordination. Version 4.15.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 2,204 tests across 24 suites
14+
npm run test:all # Run all 2,357 tests across 25 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
@@ -37,6 +37,7 @@ All tests must pass before any commit. No test should be skipped or marked `.onl
3737
- `lib/agent-runtime.ts` — AgentRuntime: sandboxed execution with SandboxPolicy, ShellExecutor, FileAccessor, ApprovalGate
3838
- `lib/console-ui.ts` — ConsoleUI: interactive terminal dashboard with ANSI TUI
3939
- `lib/strategy-agent.ts` — StrategyAgent: meta-orchestrator with AgentPool, WorkloadPartitioner, adaptive scaling
40+
- `lib/goal-decomposer.ts` — GoalDecomposer, TeamRunner, runTeam: LLM-powered goal → task DAG → parallel execution
4041
- `adapters/` — 17 framework adapters (LangChain, AutoGen, CrewAI, MCP, Codex, MiniMax, NemoClaw, APS, etc.)
4142
- `bin/cli.ts` — CLI entry point (`npx network-ai`)
4243
- `bin/mcp-server.ts` — MCP server (SSE + stdio transport)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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 2,204 tests (24 suites)
81+
npm run test:all # Run all 2,357 tests (25 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-
- 2,204 passing assertions across 24 suites
103+
- 2,357 passing assertions across 25 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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ Run these before declaring the integration production-ready:
409409
- [ ] `npx ts-node test-phase4.ts` — 147 behavioral tests pass
410410
- [ ] `npx ts-node test-qa.ts` — 67 QA orchestrator tests pass
411411
- [ ] `npx ts-node test-phase7.ts` — 94 Phase 7 tests pass (hooks, flow control, composer, semantic search)
412-
- [ ] `npm run test:all` — all 2,204 tests pass across 24 suites
412+
- [ ] `npm run test:all` — all 2,357 tests pass across 25 suites
413413
- [ ] `npm run demo -- --08` runs to completion in < 10 seconds
414414

415415
### Race Condition Safety
@@ -477,4 +477,4 @@ Run these before declaring the integration production-ready:
477477

478478
---
479479

480-
*Network-AI v4.14.0 · MIT License · https://github.com/Jovancoding/Network-AI*
480+
*Network-AI v4.15.0 · MIT License · https://github.com/Jovancoding/Network-AI*

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
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.14.0-blue.svg)](https://github.com/Jovancoding/Network-AI/releases)
8+
[![Release](https://img.shields.io/badge/release-v4.15.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-2204%20passing-brightgreen.svg)](#testing)
10+
[![Tests](https://img.shields.io/badge/tests-2357%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)
1414
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen.svg)](https://nodejs.org)
15-
[![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6.svg)](https://typescriptlang.org)
15+
[![TypeScript](https://img.shields.io/badge/TypeScript-6.x-3178C6.svg)](https://typescriptlang.org)
1616
[![ClawHub](https://img.shields.io/badge/ClawHub-network--ai-orange.svg)](https://clawhub.ai/skills/network-ai)
1717
[![Integration Guide](https://img.shields.io/badge/docs-integration%20guide-informational.svg)](INTEGRATION_GUIDE.md)
1818
[![Sponsor](https://img.shields.io/badge/sponsor-support%20the%20project-f15bb5.svg)](https://github.com/sponsors/Jovancoding)
@@ -102,6 +102,7 @@ Runs priority preemption, AuthGuardian permission gating, FSM governance, and co
102102
| ✅ Interactive console | TUI dashboard for live monitoring, agent control, blackboard/budget/FSM management |
103103
| ✅ Pipe mode | JSON stdin/stdout protocol for programmatic AI-to-orchestrator control |
104104
| ✅ Strategy agent | Meta-orchestrator with elastic agent pools, workload partitioning, and adaptive scaling |
105+
| ✅ Goal decomposer | LLM-powered goal → task DAG → parallel execution with `runTeam()` one-liner |
105106
| ✅ TypeScript native | ES2022 strict mode, zero native dependencies |
106107

107108
---
@@ -396,9 +397,10 @@ npm run test:codex # Codex adapter
396397
npm run test:priority # Priority & preemption
397398
npm run test:cli # CLI layer
398399
npm run test:phase9 # Agent runtime, console, strategy agent
400+
npm run test:phase10 # Goal decomposer, task DAG, runTeam
399401
```
400402

401-
**2,204 passing assertions across 24 test suites** (`npm run test:all`):
403+
**2,357 passing assertions across 25 test suites** (`npm run test:all`):
402404

403405
| Suite | Assertions | Covers |
404406
|---|---|---|
@@ -425,6 +427,7 @@ npm run test:phase9 # Agent runtime, console, strategy agent
425427
| `test-phase7.ts` | 94 | Deferred init, hook middleware, flow control, skill composer, semantic search |
426428
| `test-phase8.ts` | 146 | Phase pipeline, confidence filter, matcher-based hooks, fan-out/fan-in |
427429
| `test-phase9.ts` | 280 | Agent runtime, sandbox policy, shell executor, file accessor, approval gate, console UI, orchestrator wiring, pipe mode, strategy agent |
430+
| `test-phase10.ts` | 153 | Goal decomposer, task DAG validation, topological layers, JSON parsing, team runner, concurrency, timeouts, events, runTeam one-liner, dependency injection, LLM planner |
428431

429432
---
430433

0 commit comments

Comments
 (0)