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.
- package/README.md +1 -1
- package/SKILL.md +33 -64
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://network-ai.org/)
|
|
6
6
|
[](https://github.com/Jovancoding/Network-AI/actions/workflows/ci.yml)
|
|
7
7
|
[](https://github.com/Jovancoding/Network-AI/actions/workflows/codeql.yml)
|
|
8
|
-
[](https://github.com/Jovancoding/Network-AI/releases)
|
|
9
9
|
[](https://www.npmjs.com/package/network-ai)
|
|
10
10
|
[](#testing)
|
|
11
11
|
[](#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
|
|
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
|
|
120
|
+
### Budget Check Protocol
|
|
121
121
|
|
|
122
|
-
**
|
|
122
|
+
**Run the budget interceptor before any task delegation:**
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
#
|
|
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
|
-
→
|
|
136
|
+
→ Budget check passed — proceed with the delegated task
|
|
137
137
|
→ Note tokens_spent and remaining_budget
|
|
138
138
|
ELSE:
|
|
139
|
-
→ STOP
|
|
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.
|
|
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
|
-
|
|
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,
|
|
289
|
-
#
|
|
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
|
|
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:
|
|
344
|
+
### Step 3: Run Budget Guard Before Delegation
|
|
361
345
|
|
|
362
346
|
```bash
|
|
363
|
-
#
|
|
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
|
|
373
|
-
**If BLOCKED:** Stop
|
|
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:
|
|
367
|
+
### Step 5: Check Results
|
|
384
368
|
|
|
385
|
-
|
|
369
|
+
After delegation completes, read results from the blackboard:
|
|
386
370
|
|
|
387
|
-
```
|
|
388
|
-
|
|
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
|
-
|
|
375
|
+
## Permission Scoring
|
|
399
376
|
|
|
400
|
-
> **
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
#
|
|
516
|
-
1.
|
|
517
|
-
2.
|
|
518
|
-
3.
|
|
519
|
-
4. Wait for all
|
|
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.
|
|
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",
|