network-ai
Advanced tools
+80
-0
@@ -205,2 +205,19 @@ /** | ||
| } | ||
| /** | ||
| * Options for creating a named blackboard via `orchestrator.getBlackboard(name)`. | ||
| * All fields are optional -- sensible defaults are applied automatically. | ||
| */ | ||
| export interface NamedBlackboardOptions { | ||
| /** | ||
| * Namespace prefixes the orchestrator agent is allowed to use on this board. | ||
| * Defaults to `['*']` (full access). Pass e.g. `['analysis:', 'result:']` to | ||
| * restrict the board to specific key prefixes. | ||
| */ | ||
| allowedNamespaces?: string[]; | ||
| /** | ||
| * Custom validation config applied to writes on this board. | ||
| * Falls back to the orchestrator's global config when omitted. | ||
| */ | ||
| validationConfig?: Partial<ValidationConfig>; | ||
| } | ||
| /** A single task within a parallel execution batch. */ | ||
@@ -518,2 +535,6 @@ interface ParallelTask { | ||
| private qualityGate; | ||
| /** Named isolated blackboards, keyed by board name */ | ||
| private namedBlackboards; | ||
| /** Root workspace path -- used as the parent for named board subdirectories */ | ||
| private _workspacePath; | ||
| /** The adapter registry -- routes requests to the right agent framework */ | ||
@@ -550,2 +571,61 @@ readonly adapters: AdapterRegistry; | ||
| getQualityGate(): QualityGateAgent; | ||
| /** | ||
| * Get or create a named, isolated blackboard managed by this orchestrator. | ||
| * | ||
| * Each named board is stored in its own subdirectory: | ||
| * `<workspacePath>/boards/<name>/` | ||
| * | ||
| * Calling `getBlackboard(name)` a second time returns the same instance -- | ||
| * no duplicate boards are created. | ||
| * | ||
| * All existing APIs (`orchestrator.blackboard`, adapters, AuthGuardian, etc.) | ||
| * are completely unaffected. This is a purely additive method. | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * const board = orchestrator.getBlackboard('project-alpha'); | ||
| * board.registerAgent('analyst', 'tok-1', ['analysis:']); | ||
| * board.write('analysis:result', { score: 0.9 }, 'analyst', 3600, 'tok-1'); | ||
| * const entry = board.read('analysis:result'); | ||
| * ``` | ||
| * | ||
| * @param name - Board name: alphanumeric, hyphens and underscores only | ||
| * @param options - Optional creation options (ignored on subsequent calls) | ||
| * @returns The isolated `SharedBlackboard` instance for this name | ||
| * @throws {@link ValidationError} if `name` is empty or contains invalid characters | ||
| */ | ||
| getBlackboard(name: string, options?: NamedBlackboardOptions): SharedBlackboard; | ||
| /** | ||
| * Returns the names of all currently active named blackboards. | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * orchestrator.getBlackboard('alpha'); | ||
| * orchestrator.getBlackboard('beta'); | ||
| * orchestrator.listBlackboards(); // ['alpha', 'beta'] | ||
| * ``` | ||
| */ | ||
| listBlackboards(): string[]; | ||
| /** | ||
| * Returns `true` if a named blackboard with the given name is currently active. | ||
| * | ||
| * @param name - The board name to check | ||
| */ | ||
| hasBlackboard(name: string): boolean; | ||
| /** | ||
| * Removes a named blackboard from the in-memory registry. | ||
| * | ||
| * **On-disk data is NOT deleted** -- call `getBlackboard(name)` again to | ||
| * re-attach to the same persistent board at a later point. | ||
| * | ||
| * @param name - The board name to remove | ||
| * @returns `true` if the board existed and was removed, `false` otherwise | ||
| * | ||
| * @example | ||
| * ```typescript | ||
| * orchestrator.destroyBlackboard('project-alpha'); // true | ||
| * orchestrator.hasBlackboard('project-alpha'); // false | ||
| * ``` | ||
| */ | ||
| destroyBlackboard(name: string): boolean; | ||
| private priorityToNumber; | ||
@@ -552,0 +632,0 @@ private timeoutPromise; |
+4
-2
| { | ||
| "name": "network-ai", | ||
| "version": "3.3.11", | ||
| "version": "3.4.0", | ||
| "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.", | ||
@@ -16,3 +16,5 @@ "main": "dist/index.js", | ||
| "test:priority": "npx ts-node test-priority.ts", | ||
| "test:all": "npx ts-node test-standalone.ts && npx ts-node test-security.ts && npx ts-node test-adapters.ts && npx ts-node test-priority.ts", | ||
| "test:phase4": "npx ts-node test-phase4.ts", | ||
| "test:phase5": "npx ts-node test-phase5.ts", | ||
| "test:all": "npx ts-node test-standalone.ts && npx ts-node test-security.ts && npx ts-node test-adapters.ts && npx ts-node test-priority.ts && npx ts-node test-phase4.ts && npx ts-node test-phase5.ts", | ||
| "setup": "npx ts-node setup.ts", | ||
@@ -19,0 +21,0 @@ "setup:check": "npx ts-node setup.ts --check", |
+7
-3
@@ -7,3 +7,3 @@ # Network-AI: Multi-Agent Orchestration Framework | ||
| [](https://github.com/jovanSAPFIONEER/Network-AI/actions/workflows/codeql.yml) | ||
| [](https://github.com/jovanSAPFIONEER/Network-AI/releases) | ||
| [](https://github.com/jovanSAPFIONEER/Network-AI/releases) | ||
| [](https://www.npmjs.com/package/network-ai) | ||
@@ -17,3 +17,3 @@ [](https://clawhub.ai/skills/network-ai) | ||
| [](https://agentskills.io) | ||
| [](#testing) | ||
| [](#testing) | ||
| [](#adapter-system) | ||
@@ -73,3 +73,3 @@ [](https://github.com/jovanSAPFIONEER/Network-AI/releases.atom) | ||
| > **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` (live AI research swarm) is coming soon. | ||
| > **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`. | ||
@@ -217,2 +217,4 @@ ## Why This Exists -- The Multi-Agent Race Condition Problem | ||
| |-- test-priority.ts # Priority & preemption tests (64 tests) | ||
| |-- test-phase4.ts # Phase 4 FSM/compliance/adapter tests (147 tests) | ||
| |-- test-phase5.ts # Phase 5 Named Multi-Blackboard tests (35 tests) | ||
| |-- test-ai-quality.ts # AI quality gate demo | ||
@@ -297,2 +299,4 @@ |-- test.ts # Full integration test suite | ||
| npm run test:priority # Priority & preemption (64 tests) | ||
| npm run test:phase4 # Phase 4 FSM/compliance/adapter (147 tests) | ||
| npm run test:phase5 # Phase 5 Named Multi-Blackboard (35 tests) | ||
| npm run test:all # All suites in sequence | ||
@@ -299,0 +303,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
955270
1.08%14782
1.24%1033
0.39%61
-1.61%