network-ai 5.3.1 → 5.3.2

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 (3) hide show
  1. package/README.md +1 -1
  2. package/SKILL.md +33 -64
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Website](https://img.shields.io/badge/website-network--ai.org-4b9df2?style=flat&logo=web&logoColor=white)](https://network-ai.org/)
6
6
  [![CI](https://github.com/Jovancoding/Network-AI/actions/workflows/ci.yml/badge.svg)](https://github.com/Jovancoding/Network-AI/actions/workflows/ci.yml)
7
7
  [![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-v5.3.1-blue.svg)](https://github.com/Jovancoding/Network-AI/releases)
8
+ [![Release](https://img.shields.io/badge/release-v5.3.2-blue.svg)](https://github.com/Jovancoding/Network-AI/releases)
9
9
  [![npm](https://img.shields.io/npm/dw/network-ai.svg?label=npm%20downloads)](https://www.npmjs.com/package/network-ai)
10
10
  [![Tests](https://img.shields.io/badge/tests-2899%20passing-brightgreen.svg)](#testing)
11
11
  [![Adapters](https://img.shields.io/badge/frameworks-29%20supported-blueviolet.svg)](#adapter-system)
package/SKILL.md CHANGED
@@ -34,7 +34,7 @@ metadata:
34
34
 
35
35
  > **Advisory tokens notice:** Grant tokens issued by `check_permission.py` are **advisory scoring outputs only** — the caller-supplied `--agent` identity is not cryptographically verified. Downstream systems must not treat these tokens as authenticated credentials without adding a separate identity-verification step or human approval gate, especially for PAYMENTS, DATABASE, and FILE_EXPORT resources.
36
36
 
37
- > **Data-flow notice (host platform — not this skill):** This skill does NOT implement, invoke, or control `sessions_send`. That is a host-platform built-in (OpenClaw runtime). The orchestration instructions below describe *when* to call the platform’s `sessions_send` after budget checks pass but the actual network call, model endpoint, and data transmission are entirely the **host platform’s** responsibility. If you need to prevent external network calls, disable or reroute `sessions_send` in your **platform settings** before installing this skill. This skill has no access to that configuration.
37
+ > **Data-flow notice (host platform — not this skill):** This skill does NOT implement, invoke, or control `sessions_send` or any inter-agent messaging. All bundled Python scripts are local-only tools (budget guard, blackboard, permission scorer, context manager). If your platform has a `sessions_send` built-in, whether and how it is used is entirely the **host platform’s** responsibility and is outside this skill’s scope. If you need to prevent external network calls, disable or reroute delegation in your **platform settings** before installing this skill.
38
38
 
39
39
  > **Context file integrity:** The `context_manager.py inject` command now validates `data/project-context.json` for injection patterns and oversized fields before printing the context block. Review any warnings printed to stderr before passing the output to an agent system prompt.
40
40
 
@@ -117,12 +117,12 @@ Sub-Task 3 (RECOMMEND): [strategy_advisor]
117
117
  - Output: Recommendations with rationale
118
118
  ```
119
119
 
120
- ### Budget-Aware Handoff Protocol
120
+ ### Budget Check Protocol
121
121
 
122
- **CRITICAL:** Before EVERY `sessions_send`, call the handoff interceptor:
122
+ **Run the budget interceptor before any task delegation:**
123
123
 
124
124
  ```bash
125
- # ALWAYS run this BEFORE sessions_send
125
+ # Run this before delegating to any sub-agent
126
126
  python {baseDir}/scripts/swarm_guard.py intercept-handoff \
127
127
  --task-id "task_001" \
128
128
  --from orchestrator \
@@ -133,10 +133,10 @@ python {baseDir}/scripts/swarm_guard.py intercept-handoff \
133
133
  **Decision Logic:**
134
134
  ```
135
135
  IF result.allowed == true:
136
- Proceed with sessions_send
136
+ Budget check passed — proceed with the delegated task
137
137
  → Note tokens_spent and remaining_budget
138
138
  ELSE:
139
- → STOP - Do NOT call sessions_send
139
+ → STOP budget exceeded or handoff limit reached
140
140
  → Report blocked reason to user
141
141
  → Consider: reduce scope or abort task
142
142
  ```
@@ -273,11 +273,10 @@ python {baseDir}/scripts/swarm_guard.py budget-init \
273
273
  --description "Q4 Financial Analysis"
274
274
  ```
275
275
 
276
- ### 2. Delegate a Task to Another Session
276
+ ### 2. Check Budget Before Task Delegation
277
277
 
278
- > **Platform note:** `sessions_list`, `sessions_send`, and `sessions_history` are **OpenClaw host platform built-ins** — they are part of the OpenClaw runtime, not provided or invoked by this skill's Python scripts. This skill only runs local `python scripts/*.py` commands. The guidance below describes how to combine the platform's session tools with this skill's budget guard.
279
278
 
280
- First check budget, then use the OpenClaw platform operation:
279
+ Always run the budget guard before delegating any task:
281
280
 
282
281
  ```bash
283
282
  # 1. Check budget (this skill's Python script)
@@ -285,17 +284,8 @@ python {baseDir}/scripts/swarm_guard.py intercept-handoff \
285
284
  --task-id "task_001" --from orchestrator --to data_analyst \
286
285
  --message "Analyze Q4 revenue data"
287
286
 
288
- # 2. If allowed, delegate using the OpenClaw platform tool (not this skill):
289
- # sessions_list → see available sessions/agents
290
- # sessions_send → send task to another session
291
- # sessions_history → check results from delegated work
292
- ```
293
-
294
- **Example delegation prompt:**
295
- ```
296
- After running swarm_guard.py intercept-handoff and getting result.allowed == true,
297
- use the OpenClaw sessions_send platform tool to ask the data_analyst session:
298
- "Analyze Q4 revenue trends from the SAP export data and summarize key insights"
287
+ # 2. If result.allowed == true, proceed with delegation via your platform's built-in tools.
288
+ # If result.allowed == false, stop — budget exceeded or handoff limit reached.
299
289
  ```
300
290
 
301
291
  ### 3. Check Permission Before API Access
@@ -330,7 +320,7 @@ python {baseDir}/scripts/blackboard.py list
330
320
 
331
321
  ## Agent-to-Agent Handoff Protocol
332
322
 
333
- When delegating tasks between agents/sessions:
323
+ When delegating tasks between agents, always run the budget guard first.
334
324
 
335
325
  ### Step 1: Initialize Budget & Check Capacity
336
326
  ```bash
@@ -343,12 +333,6 @@ python {baseDir}/scripts/swarm_guard.py budget-check --task-id "task_001"
343
333
 
344
334
  ### Step 2: Identify Target Agent
345
335
 
346
- > **Platform note:** `sessions_list` is an **OpenClaw host platform built-in**, not provided by this skill.
347
-
348
- ```
349
- sessions_list # OpenClaw platform operation — find available agents
350
- ```
351
-
352
336
  Common agent types:
353
337
  | Agent | Specialty |
354
338
  |-------|-----------|
@@ -357,10 +341,10 @@ Common agent types:
357
341
  | `risk_assessor` | Risk analysis, compliance checks |
358
342
  | `orchestrator` | Coordination, task decomposition |
359
343
 
360
- ### Step 3: Intercept Before Handoff (REQUIRED)
344
+ ### Step 3: Run Budget Guard Before Delegation
361
345
 
362
346
  ```bash
363
- # This checks budget AND handoff limits before allowing the call
347
+ # Check budget AND handoff limits before delegating
364
348
  python {baseDir}/scripts/swarm_guard.py intercept-handoff \
365
349
  --task-id "task_001" \
366
350
  --from orchestrator \
@@ -369,8 +353,8 @@ python {baseDir}/scripts/swarm_guard.py intercept-handoff \
369
353
  --artifact # Include if expecting output
370
354
  ```
371
355
 
372
- **If ALLOWED:** Proceed to Step 4
373
- **If BLOCKED:** Stop - do not call sessions_send
356
+ **If ALLOWED:** Proceed with delegation via your platform's own tools
357
+ **If BLOCKED:** Stop budget exceeded or handoff limit reached; do not delegate
374
358
 
375
359
  ### Step 4: Construct Handoff Message
376
360
 
@@ -380,38 +364,25 @@ Include these fields in your delegation:
380
364
  - **constraints**: Any limitations or requirements
381
365
  - **expectedOutput**: What format/content you need back
382
366
 
383
- ### Step 5: Send via OpenClaw Platform Session Tool
367
+ ### Step 5: Check Results
384
368
 
385
- > **Platform note:** `sessions_send` is an **OpenClaw host platform built-in** — it is NOT implemented by this skill. This skill only provides the budget guard (`swarm_guard.py`) that must be run first.
369
+ After delegation completes, read results from the blackboard:
386
370
 
387
- ```
388
- # OpenClaw platform operation (not this skill):
389
- sessions_send to data_analyst:
390
- "[HANDOFF]
391
- Instruction: Analyze Q4 revenue by product category
392
- Context: Using SAP export from ./data/q4_export.csv
393
- Constraints: Focus on top 5 categories only
394
- Expected Output: JSON summary with category, revenue, growth_pct
395
- [/HANDOFF]"
371
+ ```bash
372
+ python {baseDir}/scripts/blackboard.py read "task:001:data_analyst"
396
373
  ```
397
374
 
398
- ### Step 6: Check Results
375
+ ## Permission Scoring
399
376
 
400
- > **Platform note:** `sessions_history` is an **OpenClaw host platform built-in**, not provided by this skill.
377
+ > **Tokens are audit scoring outputs only.** Grant tokens from `check_permission.py` are NOT authenticated credentials and must NOT be used as real access control. They are advisory hints based on a local scoring model. Require a separate authenticated identity and explicit human approval before accessing PAYMENTS, DATABASE, or FILE_EXPORT resources.
401
378
 
402
- ```
403
- sessions_history data_analyst # OpenClaw platform operationget the response
404
- ```
379
+ **Always score permission before accessing:**
380
+ - `DATABASE` Internal database / data store (abstract label no external credentials)
381
+ - `PAYMENTS` — Financial/payment data services (abstract label — requires `--confirm-high-risk`)
382
+ - `EMAIL` — Email sending capability (abstract label)
383
+ - `FILE_EXPORT` — Exporting data to local files (abstract label — requires `--confirm-high-risk`)
405
384
 
406
- ## Permission Wall
407
-
408
- **CRITICAL**: Always check permissions before accessing:
409
- - `DATABASE` - Internal database / data store access
410
- - `PAYMENTS` - Financial/payment data services
411
- - `EMAIL` - Email sending capability
412
- - `FILE_EXPORT` - Exporting data to local files
413
-
414
- > **Note**: These are abstract local resource type names used by `check_permission.py`. No external API credentials are required or used — all permission evaluation runs locally.
385
+ > **Note**: These are abstract local resource type names used by `check_permission.py`. No external API credentials are required or used — all evaluation runs locally.
415
386
 
416
387
  ### Permission Evaluation Criteria
417
388
 
@@ -507,16 +478,14 @@ Sequential processing - output of one feeds into next.
507
478
 
508
479
  ### Example Parallel Workflow
509
480
 
510
- > **Platform note:** `sessions_send` and `sessions_history` are **OpenClaw host platform built-ins**, not provided by this skill. This skill provides only the `swarm_guard.py` budget/handoff check that runs before each delegation.
511
-
512
481
  ```
513
- # For each delegation below, first run:
482
+ # For each delegation below, first run the budget guard:
514
483
  # python {baseDir}/scripts/swarm_guard.py intercept-handoff --task-id "task_001" --from orchestrator --to <agent> --message "<task>"
515
- # Then, if allowed, use the OpenClaw platform tool:
516
- 1. sessions_send to data_analyst: "Extract key metrics from Q4 data"
517
- 2. sessions_send to risk_assessor: "Identify compliance risks in Q4 data"
518
- 3. sessions_send to strategy_advisor: "Recommend actions based on Q4 trends"
519
- 4. Wait for all responses via sessions_history
484
+ # If result.allowed == true, delegate via your platform's own tools.
485
+ 1. Delegate to data_analyst: "Extract key metrics from Q4 data"
486
+ 2. Delegate to risk_assessor: "Identify compliance risks in Q4 data"
487
+ 3. Delegate to strategy_advisor: "Recommend actions based on Q4 trends"
488
+ 4. Wait for all results and read them from the blackboard
520
489
  5. Synthesize: Combine metrics + risks + recommendations into executive summary
521
490
  ```
522
491
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "network-ai",
3
- "version": "5.3.1",
3
+ "version": "5.3.2",
4
4
  "description": "AI agent orchestration framework for TypeScript/Node.js - 29 adapters (LangChain, AutoGen, CrewAI, OpenAI Assistants, LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, OpenClaw, A2A, Codex, MiniMax, NemoClaw, APS, Copilot, LangGraph, Anthropic Computer Use, OpenAI Agents SDK, Vertex AI, Pydantic AI, Browser Agent, Hermes, Orchestrator, RLM + streaming variants). Built-in CLI, security, swarm intelligence, real-time streaming, and agentic workflow patterns.",
5
5
  "homepage": "https://network-ai.org",
6
6
  "main": "dist/index.js",