network-ai 4.3.7 → 4.4.1

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 +25 -0
  2. package/SKILL.md +61 -40
  3. package/package.json +4 -4
package/README.md CHANGED
@@ -363,6 +363,31 @@ npm run test:cli # CLI layer
363
363
 
364
364
  ---
365
365
 
366
+ ## Use with Claude, ChatGPT & Codex
367
+
368
+ Three integration files are included in the repo root:
369
+
370
+ | File | Use |
371
+ |---|---|
372
+ | [`claude-tools.json`](claude-tools.json) | Claude API tool use & OpenAI Codex — drop into the `tools` array |
373
+ | [`openapi.yaml`](openapi.yaml) | Custom GPT Actions — import directly in the GPT editor |
374
+ | [`claude-project-prompt.md`](claude-project-prompt.md) | Claude Projects — paste into Custom Instructions |
375
+
376
+ **Claude API / Codex:**
377
+ ```js
378
+ import tools from './claude-tools.json' assert { type: 'json' };
379
+ // Pass tools array to anthropic.messages.create({ tools }) or OpenAI chat completions
380
+ ```
381
+
382
+ **Custom GPT Actions:**
383
+ In the GPT editor → Actions → Import from URL, or paste the contents of `openapi.yaml`.
384
+ Set the server URL to your running `npx network-ai-server --port 3001` instance.
385
+
386
+ **Claude Projects:**
387
+ Copy the contents of `claude-project-prompt.md` (below the horizontal rule) into a Claude Project's Custom Instructions field. No server required for instruction-only mode.
388
+
389
+ ---
390
+
366
391
  ## Contributing
367
392
 
368
393
  1. Fork → feature branch → `npm run test:all` → pull request
package/SKILL.md CHANGED
@@ -6,11 +6,12 @@ metadata:
6
6
  emoji: "\U0001F41D"
7
7
  homepage: https://github.com/jovanSAPFIONEER/Network-AI
8
8
  bundle_scope: "Python scripts only (scripts/*.py). The README.md in this repo describes the FULL project including the companion Node.js npm package — features documented there (HMAC tokens, AES-256 encryption, MCP server, 14 adapters, CLI) are NOT implemented in these Python scripts and are NOT part of this ClawHub skill. Install the npm package separately for those features."
9
+ network_calls: none
10
+ sessions_ops: "platform-provided — sessions_send, sessions_list, and sessions_history are OpenClaw host platform built-ins, not implemented or invoked by this skill's Python scripts"
9
11
  requires:
10
12
  bins:
11
13
  - python3
12
- optional_bins:
13
- - node # Only needed if you separately install and run the Node.js MCP server (network-ai-server via npm). Not required for this skill's Python instructions.
14
+ optional_bins: [] # No optional binaries required. Node.js is only needed for the SEPARATE companion npm package (not part of this skill).
14
15
  env:
15
16
  SWARM_TOKEN_SECRET:
16
17
  required: false
@@ -168,17 +169,26 @@ python {baseDir}/scripts/swarm_guard.py budget-init \
168
169
 
169
170
  ### 2. Delegate a Task to Another Session
170
171
 
171
- Use OpenClaw's built-in session tools to delegate work:
172
+ > **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.
172
173
 
173
- ```
174
- sessions_list # See available sessions/agents
175
- sessions_send # Send task to another session
176
- sessions_history # Check results from delegated work
174
+ First check budget, then use the OpenClaw platform operation:
175
+
176
+ ```bash
177
+ # 1. Check budget (this skill's Python script)
178
+ python {baseDir}/scripts/swarm_guard.py intercept-handoff \
179
+ --task-id "task_001" --from orchestrator --to data_analyst \
180
+ --message "Analyze Q4 revenue data"
181
+
182
+ # 2. If allowed, delegate using the OpenClaw platform tool (not this skill):
183
+ # sessions_list → see available sessions/agents
184
+ # sessions_send → send task to another session
185
+ # sessions_history → check results from delegated work
177
186
  ```
178
187
 
179
188
  **Example delegation prompt:**
180
189
  ```
181
- Use sessions_send to ask the data_analyst session to:
190
+ After running swarm_guard.py intercept-handoff and getting result.allowed == true,
191
+ use the OpenClaw sessions_send platform tool to ask the data_analyst session:
182
192
  "Analyze Q4 revenue trends from the SAP export data and summarize key insights"
183
193
  ```
184
194
 
@@ -212,33 +222,9 @@ python {baseDir}/scripts/blackboard.py read "task:q4_analysis"
212
222
  python {baseDir}/scripts/blackboard.py list
213
223
  ```
214
224
 
215
- ### 5. Use the Node.js CLI (optional — requires `npm install -g network-ai`)
216
-
217
- The CLI gives direct terminal access to all four subsystems without running a server:
225
+ ### 5. Optional: Use the Node.js CLI
218
226
 
219
- ```bash
220
- # Blackboard
221
- network-ai bb get task:q4_analysis
222
- network-ai bb set task:q4_analysis '{"status": "complete"}' --agent orchestrator
223
- network-ai bb list
224
- network-ai bb snapshot
225
-
226
- # Permissions
227
- network-ai auth token data_analyst --resource DATABASE --action read \
228
- --justification "Need Q4 invoices for revenue report"
229
- network-ai auth check grant_a1b2c3...
230
- network-ai auth revoke grant_a1b2c3...
231
-
232
- # Budget
233
- network-ai budget status
234
- network-ai budget set-ceiling 50000
235
-
236
- # Audit log
237
- network-ai audit log --limit 50
238
- network-ai audit tail # live-stream as events arrive
239
- ```
240
-
241
- Global flags: `--data <path>` (override data directory) · `--json` (machine-readable output)
227
+ > **Scope note:** The `network-ai` CLI is part of the **companion npm package** — it is a completely separate project and is NOT part of this ClawHub skill bundle. This skill's Python scripts work fully without it. See the [Appendix](#appendix-optional-nodejs-companion-npm) at the bottom of this file for details.
242
228
 
243
229
  ## Agent-to-Agent Handoff Protocol
244
230
 
@@ -254,8 +240,11 @@ python {baseDir}/scripts/swarm_guard.py budget-check --task-id "task_001"
254
240
  ```
255
241
 
256
242
  ### Step 2: Identify Target Agent
243
+
244
+ > **Platform note:** `sessions_list` is an **OpenClaw host platform built-in**, not provided by this skill.
245
+
257
246
  ```
258
- sessions_list # Find available agents
247
+ sessions_list # OpenClaw platform operation — find available agents
259
248
  ```
260
249
 
261
250
  Common agent types:
@@ -289,9 +278,12 @@ Include these fields in your delegation:
289
278
  - **constraints**: Any limitations or requirements
290
279
  - **expectedOutput**: What format/content you need back
291
280
 
292
- ### Step 5: Send via sessions_send
281
+ ### Step 5: Send via OpenClaw Platform Session Tool
282
+
283
+ > **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.
293
284
 
294
285
  ```
286
+ # OpenClaw platform operation (not this skill):
295
287
  sessions_send to data_analyst:
296
288
  "[HANDOFF]
297
289
  Instruction: Analyze Q4 revenue by product category
@@ -301,10 +293,12 @@ Expected Output: JSON summary with category, revenue, growth_pct
301
293
  [/HANDOFF]"
302
294
  ```
303
295
 
304
- ### Step 4: Check Results
296
+ ### Step 6: Check Results
297
+
298
+ > **Platform note:** `sessions_history` is an **OpenClaw host platform built-in**, not provided by this skill.
305
299
 
306
300
  ```
307
- sessions_history data_analyst # Get the response
301
+ sessions_history data_analyst # OpenClaw platform operation — get the response
308
302
  ```
309
303
 
310
304
  ## Permission Wall (AuthGuardian)
@@ -409,9 +403,14 @@ Sequential processing - output of one feeds into next.
409
403
 
410
404
  ### Example Parallel Workflow
411
405
 
406
+ > **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.
407
+
412
408
  ```
409
+ # For each delegation below, first run:
410
+ # python {baseDir}/scripts/swarm_guard.py intercept-handoff --task-id "task_001" --from orchestrator --to <agent> --message "<task>"
411
+ # Then, if allowed, use the OpenClaw platform tool:
413
412
  1. sessions_send to data_analyst: "Extract key metrics from Q4 data"
414
- 2. sessions_send to risk_assessor: "Identify compliance risks in Q4 data"
413
+ 2. sessions_send to risk_assessor: "Identify compliance risks in Q4 data"
415
414
  3. sessions_send to strategy_advisor: "Recommend actions based on Q4 trends"
416
415
  4. Wait for all responses via sessions_history
417
416
  5. Synthesize: Combine metrics + risks + recommendations into executive summary
@@ -618,7 +617,7 @@ python {baseDir}/scripts/swarm_guard.py supervisor-review --task-id "task_001"
618
617
  - Entry was never written
619
618
 
620
619
  ### Session Not Found
621
- - Run `sessions_list` to see available sessions
620
+ - Run `sessions_list` (OpenClaw platform built-in) to see available sessions
622
621
  - Session may need to be started first
623
622
 
624
623
  ## References
@@ -627,3 +626,25 @@ python {baseDir}/scripts/swarm_guard.py supervisor-review --task-id "task_001"
627
626
  - [Blackboard Schema](references/blackboard-schema.md) - Data structure specifications
628
627
  - [Agent Trust Levels](references/trust-levels.md) - How trust is calculated
629
628
  - [CLI Reference](QUICKSTART.md) - Full `network-ai` CLI command reference (§ 10. CLI)
629
+
630
+ ---
631
+
632
+ ## Appendix: Optional Node.js Companion (npm)
633
+
634
+ > **This section describes a SEPARATE project — not part of this ClawHub skill bundle.**
635
+ > The Python scripts above work completely without any of this.
636
+ > Install only if you want MCP server integration with Claude/Cursor/VS Code.
637
+
638
+ ```bash
639
+ npm install -g network-ai
640
+ npx network-ai-server --port 3001
641
+ ```
642
+
643
+ The companion npm package (`network-ai`) provides:
644
+ - HMAC-signed audit tokens (vs UUID tokens in the Python layer)
645
+ - AES-256 blackboard encryption
646
+ - A standalone MCP server for IDE integration (Claude, Cursor, VS Code)
647
+ - 14 framework adapters (LangChain, AutoGen, CrewAI, DSPy, LlamaIndex, etc.)
648
+ - A full CLI (`network-ai bb`, `network-ai auth`, `network-ai budget`, `network-ai audit`)
649
+
650
+ None of the above are provided by this skill's Python scripts. No network calls are made by this skill.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "network-ai",
3
- "version": "4.3.7",
3
+ "version": "4.4.1",
4
4
  "description": "AI agent orchestration framework for TypeScript/Node.js - 14 adapters (LangChain, AutoGen, CrewAI, OpenAI Assistants, LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, OpenClaw, A2A, Codex + streaming variants). Built-in CLI, security, swarm intelligence, real-time streaming, and agentic workflow patterns.",
5
5
  "homepage": "https://github.com/jovanSAPFIONEER/Network-AI#readme",
6
6
  "main": "dist/index.js",
@@ -88,9 +88,9 @@
88
88
  "python": ">=3.9"
89
89
  },
90
90
  "devDependencies": {
91
- "@types/node": "^25.3.3",
91
+ "@types/node": "^25.4.0",
92
92
  "dotenv": "^17.3.1",
93
- "openai": "^6.25.0",
93
+ "openai": "^6.27.0",
94
94
  "ts-node": "^10.9.2",
95
95
  "typescript": "^5.9.3"
96
96
  },
@@ -107,6 +107,6 @@
107
107
  "socket.json"
108
108
  ],
109
109
  "dependencies": {
110
- "commander": "^13.1.0"
110
+ "commander": "^14.0.3"
111
111
  }
112
112
  }