network-ai 5.13.3 → 5.14.0
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/INTEGRATION_GUIDE.md +6 -3
- package/QUICKSTART.md +9 -4
- package/README.md +66 -15
- package/SKILL.md +1 -1
- package/bin/cli.ts +73 -0
- package/bin/mcp-server.ts +15 -1
- package/dist/adapters/aps-adapter.d.ts +6 -2
- package/dist/adapters/aps-adapter.d.ts.map +1 -1
- package/dist/adapters/aps-adapter.js +20 -6
- package/dist/adapters/aps-adapter.js.map +1 -1
- package/dist/adapters/claude-agent-sdk-adapter.d.ts +100 -0
- package/dist/adapters/claude-agent-sdk-adapter.d.ts.map +1 -0
- package/dist/adapters/claude-agent-sdk-adapter.js +204 -0
- package/dist/adapters/claude-agent-sdk-adapter.js.map +1 -0
- package/dist/adapters/gemini-adapter.d.ts +124 -0
- package/dist/adapters/gemini-adapter.d.ts.map +1 -0
- package/dist/adapters/gemini-adapter.js +239 -0
- package/dist/adapters/gemini-adapter.js.map +1 -0
- package/dist/adapters/index.d.ts +6 -0
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/index.js +10 -1
- package/dist/adapters/index.js.map +1 -1
- package/dist/adapters/openai-responses-adapter.d.ts +119 -0
- package/dist/adapters/openai-responses-adapter.d.ts.map +1 -0
- package/dist/adapters/openai-responses-adapter.js +235 -0
- package/dist/adapters/openai-responses-adapter.js.map +1 -0
- package/dist/bin/cli.js +72 -0
- package/dist/bin/cli.js.map +1 -1
- package/dist/bin/mcp-server.js +14 -1
- package/dist/bin/mcp-server.js.map +1 -1
- package/dist/esm/adapters/aps-adapter.js +20 -6
- package/dist/esm/adapters/aps-adapter.js.map +1 -1
- package/dist/esm/adapters/claude-agent-sdk-adapter.js +204 -0
- package/dist/esm/adapters/claude-agent-sdk-adapter.js.map +1 -0
- package/dist/esm/adapters/gemini-adapter.js +239 -0
- package/dist/esm/adapters/gemini-adapter.js.map +1 -0
- package/dist/esm/adapters/index.js +10 -1
- package/dist/esm/adapters/index.js.map +1 -1
- package/dist/esm/adapters/openai-responses-adapter.js +235 -0
- package/dist/esm/adapters/openai-responses-adapter.js.map +1 -0
- package/dist/esm/index.js +13 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/a2a-server.js +293 -0
- package/dist/esm/lib/a2a-server.js.map +1 -0
- package/dist/esm/lib/approval-inbox.js +48 -15
- package/dist/esm/lib/approval-inbox.js.map +1 -1
- package/dist/esm/lib/claude-hooks.js +307 -0
- package/dist/esm/lib/claude-hooks.js.map +1 -0
- package/dist/esm/lib/mcp-elicitation.js +198 -0
- package/dist/esm/lib/mcp-elicitation.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/lib/a2a-server.d.ts +120 -0
- package/dist/lib/a2a-server.d.ts.map +1 -0
- package/dist/lib/a2a-server.js +293 -0
- package/dist/lib/a2a-server.js.map +1 -0
- package/dist/lib/approval-inbox.d.ts +29 -5
- package/dist/lib/approval-inbox.d.ts.map +1 -1
- package/dist/lib/approval-inbox.js +48 -15
- package/dist/lib/approval-inbox.js.map +1 -1
- package/dist/lib/claude-hooks.d.ts +150 -0
- package/dist/lib/claude-hooks.d.ts.map +1 -0
- package/dist/lib/claude-hooks.js +307 -0
- package/dist/lib/claude-hooks.js.map +1 -0
- package/dist/lib/mcp-elicitation.d.ts +116 -0
- package/dist/lib/mcp-elicitation.d.ts.map +1 -0
- package/dist/lib/mcp-elicitation.js +198 -0
- package/dist/lib/mcp-elicitation.js.map +1 -0
- package/package.json +6 -5
- package/scripts/blackboard.py +11 -4
- package/scripts/clawhub-publish.js +136 -0
- package/socket.json +1 -1
package/INTEGRATION_GUIDE.md
CHANGED
|
@@ -64,7 +64,7 @@ Answers drive `AuthGuardian` configuration and audit log retention policy.
|
|
|
64
64
|
|
|
65
65
|
## 2. Framework Mapping
|
|
66
66
|
|
|
67
|
-
Network-AI ships
|
|
67
|
+
Network-AI ships 32 adapters. Map your existing agents to the right one:
|
|
68
68
|
|
|
69
69
|
| Your Stack | Network-AI Adapter | Notes |
|
|
70
70
|
|-----------|-------------------|-------|
|
|
@@ -89,6 +89,9 @@ Network-AI ships 29 adapters. Map your existing agents to the right one:
|
|
|
89
89
|
| GitHub Copilot | `CopilotAdapter` | Code generate/review/explain/fix/test/refactor/chat |
|
|
90
90
|
| Anthropic Computer Use | `AnthropicComputerUseAdapter` | Screenshot/click/type/scroll browser automation |
|
|
91
91
|
| Google Vertex AI / Gemini | `VertexAIAdapter` | Function calling, multi-modal (text+image) |
|
|
92
|
+
| Google Gemini (Developer API) | `GeminiAdapter` | Gemini 2.5 models, system instructions, thinking budgets (BYOC or `GEMINI_API_KEY`) |
|
|
93
|
+
| OpenAI Responses API | `OpenAIResponsesAdapter` | Assistants successor — reasoning effort, instructions (BYOC or `OPENAI_API_KEY`) |
|
|
94
|
+
| Claude Agent SDK | `ClaudeAgentSDKAdapter` | Full agentic loops (tools, file edits) as swarm agents (BYOC `query`) |
|
|
92
95
|
| Pydantic AI | `PydanticAIAdapter` | Structured output with validation, deps injection |
|
|
93
96
|
| Browser automation | `BrowserAgentAdapter` | Playwright/Puppeteer/CDP browser control |
|
|
94
97
|
| NousResearch Hermes / OpenAI-compatible | `HermesAdapter` | Ollama, Together AI, Fireworks, llama.cpp |
|
|
@@ -496,7 +499,7 @@ Run these before declaring the integration production-ready:
|
|
|
496
499
|
- [ ] `npx ts-node test-phase4.ts` — 147 behavioral tests pass
|
|
497
500
|
- [ ] `npx ts-node test-qa.ts` — 67 QA orchestrator tests pass
|
|
498
501
|
- [ ] `npx ts-node test-phase7.ts` — 94 Phase 7 tests pass (hooks, flow control, composer, semantic search)
|
|
499
|
-
- [ ] `npm run test:all` — all 3,
|
|
502
|
+
- [ ] `npm run test:all` — all 3,525 tests pass across 39 suites
|
|
500
503
|
- [ ] `npm run demo -- --08` runs to completion in < 10 seconds
|
|
501
504
|
|
|
502
505
|
### Race Condition Safety
|
|
@@ -554,7 +557,7 @@ Run these before declaring the integration production-ready:
|
|
|
554
557
|
|----------|---------------|
|
|
555
558
|
| [QUICKSTART.md](QUICKSTART.md) | Get running in 5 minutes |
|
|
556
559
|
| [QUICKSTART.md § CLI](QUICKSTART.md) | CLI reference — bb, auth, budget, audit commands |
|
|
557
|
-
| [references/adapter-system.md](references/adapter-system.md) | All
|
|
560
|
+
| [references/adapter-system.md](references/adapter-system.md) | All 32 adapters with code examples |
|
|
558
561
|
| [references/trust-levels.md](references/trust-levels.md) | Trust scoring formula and agent roles |
|
|
559
562
|
| [references/auth-guardian.md](references/auth-guardian.md) | Permission system, justification scoring, token lifecycle |
|
|
560
563
|
| [references/blackboard-schema.md](references/blackboard-schema.md) | Blackboard key conventions and namespacing |
|
package/QUICKSTART.md
CHANGED
|
@@ -18,7 +18,7 @@ npm install
|
|
|
18
18
|
npx ts-node setup.ts --check
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
**Zero external AI dependencies.** All
|
|
21
|
+
**Zero external AI dependencies.** All 32 adapters are self-contained — add framework SDKs only when you need them.
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
@@ -49,6 +49,9 @@ npx ts-node setup.ts --check
|
|
|
49
49
|
| `anthropic-computer-use` | Anthropic Computer Use | `@anthropic-ai/sdk` | Screenshot/click/type/scroll automation |
|
|
50
50
|
| `openai-agents` | OpenAI Agents SDK | `openai` | Tool use, handoffs, guardrails |
|
|
51
51
|
| `vertex-ai` | Vertex AI / Gemini | `@google-cloud/vertexai` | Function calling, multi-modal |
|
|
52
|
+
| `gemini` | Gemini Developer API | none | Google AI Studio models, thinking budgets |
|
|
53
|
+
| `openai-responses` | OpenAI Responses API | none | GPT-5.x / o-series via `/v1/responses` (Assistants successor) |
|
|
54
|
+
| `claude-agent-sdk` | Claude Agent SDK | `@anthropic-ai/claude-agent-sdk` | Full agentic loops as swarm agents |
|
|
52
55
|
| `pydantic-ai` | Pydantic AI | none | Structured output with validation |
|
|
53
56
|
| `browser-agent` | Browser Automation | none | Playwright/Puppeteer/CDP browser control |
|
|
54
57
|
| `hermes` | NousResearch Hermes / OpenAI-compatible | none | Ollama, Together AI, Fireworks, llama.cpp |
|
|
@@ -255,7 +258,7 @@ export class MyFrameworkAdapter extends BaseAdapter {
|
|
|
255
258
|
```bash
|
|
256
259
|
npx ts-node test-standalone.ts # 88 core tests
|
|
257
260
|
npx ts-node test-security.ts # 34 security tests
|
|
258
|
-
npx ts-node test-adapters.ts #
|
|
261
|
+
npx ts-node test-adapters.ts # 271 adapter tests (all 32 frameworks)
|
|
259
262
|
npx ts-node test-cli.ts # 65 CLI tests
|
|
260
263
|
npx ts-node test-qa.ts # 67 QA orchestrator tests
|
|
261
264
|
```
|
|
@@ -266,7 +269,7 @@ npx ts-node test-qa.ts # 67 QA orchestrator tests
|
|
|
266
269
|
|
|
267
270
|
```bash
|
|
268
271
|
npx ts-node setup.ts --check # Verify installation
|
|
269
|
-
npx ts-node setup.ts --list # List
|
|
272
|
+
npx ts-node setup.ts --list # List adapter quick-start snippets
|
|
270
273
|
npx ts-node setup.ts --example # Generate example.ts
|
|
271
274
|
```
|
|
272
275
|
|
|
@@ -495,11 +498,13 @@ Your App
|
|
|
495
498
|
├── HaystackAdapter ─── Haystack pipelines
|
|
496
499
|
├── DSPyAdapter ─── DSPy modules
|
|
497
500
|
├── AgnoAdapter ─── Agno agents/teams
|
|
498
|
-
├── AgnoAdapter ─── Agno agents/teams
|
|
499
501
|
├── APSAdapter ─── APS delegation-chain trust
|
|
500
502
|
├── CopilotAdapter ─── GitHub Copilot
|
|
501
503
|
├── LangGraphAdapter ─── LangGraph state graphs
|
|
502
504
|
├── VertexAIAdapter ─── Vertex AI / Gemini
|
|
505
|
+
├── GeminiAdapter ─── Gemini Developer API
|
|
506
|
+
├── OpenAIResponsesAdapter ── OpenAI Responses API
|
|
507
|
+
├── ClaudeAgentSDKAdapter ─── Claude Agent SDK loops
|
|
503
508
|
├── PydanticAIAdapter ─── Pydantic AI structured output
|
|
504
509
|
├── OpenAIAgentsAdapter ─── OpenAI Agents SDK
|
|
505
510
|
├── AnthropicComputerUseAdapter ─── Computer Use
|
package/README.md
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
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
|
-
[](#testing)
|
|
11
|
+
[](#adapter-system)
|
|
12
12
|
[](LICENSE)
|
|
13
13
|
[](https://socket.dev/npm/package/network-ai/overview)
|
|
14
14
|
[](https://nodejs.org)
|
|
@@ -31,7 +31,7 @@ Network-AI is a TypeScript/Node.js multi-agent orchestrator that adds coordinati
|
|
|
31
31
|
|
|
32
32
|
- **Shared blackboard with locking** — atomic `propose → validate → commit` prevents race conditions and split-brain failures across parallel agents
|
|
33
33
|
- **Guardrails and budgets** — FSM governance, per-agent token ceilings, HMAC / Ed25519 audit trails, and permission gating
|
|
34
|
-
- **
|
|
34
|
+
- **32 adapters** — LangChain (+ streaming), AutoGen, CrewAI, OpenAI Assistants, OpenAI Responses (Assistants successor), LlamaIndex, Semantic Kernel, Haystack, DSPy, Agno, MCP, Custom (+ streaming), OpenClaw, A2A, Codex, MiniMax, NemoClaw, APS, Copilot, LangGraph, Anthropic Computer Use, Claude Agent SDK (agentic loops), OpenAI Agents SDK, Vertex AI, Gemini (Developer API), Pydantic AI, Browser Agent, Hermes (NousResearch Hermes / any OpenAI-compatible endpoint), Orchestrator (hierarchical multi-orchestrator), and RLM (Recursive Language Model / any RLM-compatible HTTP endpoint) — no glue code, no lock-in
|
|
35
35
|
- **Persistent project memory (Layer 3)** — `context_manager.py` injects decisions, goals, stack, milestones, and banned patterns into every system prompt so agents always have full project context
|
|
36
36
|
- **v5.0 modules** — Agent VCR (record/replay), comparison runner, coverage reporter, goal DSL, approval inbox, job queue, gRPC/HTTP transport, playground REPL, adapter test harness, and more
|
|
37
37
|
- **Model-interaction lifecycle governance (v5.13)** — `GovernedModelGateway` absorbs the model refusal → fallback → billing chain (cross-model fallback, fallback-credit repricing, effort governance, thinking-block handoff) behind one governed, budgeted, audited call
|
|
@@ -46,6 +46,8 @@ Network-AI is a TypeScript/Node.js multi-agent orchestrator that adds coordinati
|
|
|
46
46
|
- A **TypeScript/Node.js library** — `import { createSwarmOrchestrator } from 'network-ai'`
|
|
47
47
|
- An **MCP server** — `npx network-ai-server --port 3001`
|
|
48
48
|
- A **CLI** — `network-ai bb get status` / `network-ai audit tail`
|
|
49
|
+
- A **Claude Code plugin** — `/plugin install network-ai@network-ai`
|
|
50
|
+
- A **Gemini CLI extension** — `gemini extensions install https://github.com/Jovancoding/Network-AI`
|
|
49
51
|
- An **OpenClaw skill** — `clawhub install network-ai`
|
|
50
52
|
|
|
51
53
|
[**5-minute quickstart →**](QUICKSTART.md) | [**Architecture →**](ARCHITECTURE.md) | [**All adapters →**](#adapter-system) | [**Benchmarks →**](BENCHMARKS.md)
|
|
@@ -143,7 +145,7 @@ Runs priority preemption, AuthGuardian permission gating, FSM governance, and co
|
|
|
143
145
|
| ✅ Token budgets | Hard per-agent ceilings with live spend tracking |
|
|
144
146
|
| ✅ Permission gating | HMAC / Ed25519-signed tokens, scoped per agent and resource |
|
|
145
147
|
| ✅ Append-only audit log | Every write, grant, and transition signed and logged |
|
|
146
|
-
| ✅
|
|
148
|
+
| ✅ 32 framework adapters | LangChain, CrewAI, AutoGen, MCP, Codex, Gemini, APS, RLM, and 24 more — zero lock-in |
|
|
147
149
|
| ✅ FSM governance | Hard-stop agents at state boundaries, timeout enforcement |
|
|
148
150
|
| ✅ Compliance monitoring | Real-time violation detection (tool abuse, turn-taking, timeouts) |
|
|
149
151
|
| ✅ Claim verification | Tier 1 agent honesty — outcome-bound signed receipts, manifest reconciliation, trust decay for liars |
|
|
@@ -193,7 +195,7 @@ Runs priority preemption, AuthGuardian permission gating, FSM governance, and co
|
|
|
193
195
|
| Race conditions in parallel agents | Atomic blackboard: `propose → validate → commit` with file-system mutex |
|
|
194
196
|
| Agent overspend / runaway costs | `FederatedBudget` — hard per-agent token ceilings with live spend tracking |
|
|
195
197
|
| No visibility into what agents did | HMAC / Ed25519-signed audit log on every write, permission grant, and FSM transition |
|
|
196
|
-
| Locked into one AI framework |
|
|
198
|
+
| Locked into one AI framework | 32 adapters — mix LangChain + AutoGen + CrewAI + Codex + Gemini + MiniMax + NemoClaw + APS + LangGraph + Vertex AI + Hermes + RLM + custom in one swarm |
|
|
197
199
|
| Agents escalating beyond their scope | `AuthGuardian` — scoped permission tokens required before sensitive operations |
|
|
198
200
|
| Agents lack project context between runs | `ProjectContextManager` (Layer 3) — inject decisions, goals, stack, and milestones into every system prompt |
|
|
199
201
|
| No regression tracking on agent output quality | `QAOrchestratorAgent` — scenario replay, feedback loops, cross-agent contradiction detection, historical trend tracking |
|
|
@@ -330,9 +332,27 @@ The repo root carries the standard plugin layout:
|
|
|
330
332
|
| [`.claude-plugin/plugin.json`](.claude-plugin/plugin.json) | Plugin manifest |
|
|
331
333
|
| [`.mcp.json`](.mcp.json) | Registers the Network-AI MCP server (stdio) |
|
|
332
334
|
| [`.claude-plugin/marketplace.json`](.claude-plugin/marketplace.json) | Self-hosted marketplace catalog |
|
|
335
|
+
| [`commands/`](commands/status.md) | Slash commands — `/network-ai:status`, `/network-ai:budget`, `/network-ai:audit`, `/network-ai:blackboard` |
|
|
333
336
|
|
|
334
337
|
Validate the manifests locally with `claude plugin validate .`.
|
|
335
338
|
|
|
339
|
+
**Gate Claude Code itself with AuthGuardian (hooks).** Every tool call Claude Code makes — shell commands, file edits, web fetches — can be audited and permission-gated through the same weighted scoring (justification 40%, trust 30%, risk 30%) Network-AI applies to swarm agents:
|
|
340
|
+
|
|
341
|
+
```jsonc
|
|
342
|
+
// .claude/settings.json — see examples/claude-code-hooks.json for the full config
|
|
343
|
+
{
|
|
344
|
+
"hooks": {
|
|
345
|
+
"PreToolUse": [{
|
|
346
|
+
"matcher": "Bash|Write|Edit|WebFetch",
|
|
347
|
+
"hooks": [{ "type": "command",
|
|
348
|
+
"command": "npx -y -p network-ai network-ai hook pre-tool-use --mode enforce" }]
|
|
349
|
+
}]
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
`--mode observe` (default) audits every call to `data/hooks_audit.jsonl` without blocking; `--mode enforce` maps tools to resource types (Bash → `SHELL_EXEC`, Write/Edit → `FILE_SYSTEM`, WebFetch → `EXTERNAL_SERVICE`) and requires an AuthGuardian grant — denied calls escalate to you as an interactive prompt. `--deny "rm -rf"` patterns hard-block regardless of mode.
|
|
355
|
+
|
|
336
356
|
---
|
|
337
357
|
|
|
338
358
|
## Use with OpenAI Codex
|
|
@@ -359,6 +379,35 @@ Either route exposes the full tool set (`blackboard_read`, `budget_status`, `aud
|
|
|
359
379
|
|
|
360
380
|
---
|
|
361
381
|
|
|
382
|
+
## Use with Gemini CLI
|
|
383
|
+
|
|
384
|
+
Network-AI ships as a [Gemini CLI](https://github.com/google-gemini/gemini-cli) extension — the repo root carries [`gemini-extension.json`](gemini-extension.json), which wires in the stdio MCP server and a [`GEMINI.md`](GEMINI.md) context file automatically:
|
|
385
|
+
|
|
386
|
+
```bash
|
|
387
|
+
gemini extensions install https://github.com/Jovancoding/Network-AI
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
Or register just the MCP server directly:
|
|
391
|
+
|
|
392
|
+
```bash
|
|
393
|
+
gemini mcp add network-ai npx -- -y -p network-ai network-ai-server --stdio
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
Run `/mcp` inside Gemini CLI to confirm the `network-ai` tools are loaded. For building Gemini-powered swarm agents, use the `GeminiAdapter` (Gemini Developer API / AI Studio) or `VertexAIAdapter` (Vertex AI on GCP) — and for Google's Agent2Agent ecosystem, `A2AServer` exposes this orchestrator as a discoverable A2A agent:
|
|
397
|
+
|
|
398
|
+
```typescript
|
|
399
|
+
import { A2AServer } from 'network-ai';
|
|
400
|
+
|
|
401
|
+
const a2a = new A2AServer({
|
|
402
|
+
name: 'Network-AI Orchestrator',
|
|
403
|
+
secret: process.env.A2A_SECRET,
|
|
404
|
+
executor: async (text) => ({ text: await runSwarmTask(text) }),
|
|
405
|
+
});
|
|
406
|
+
a2a.startServer(4310); // serves /.well-known/agent.json + tasks/send
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
362
411
|
## CLI
|
|
363
412
|
|
|
364
413
|
Control Network-AI directly from the terminal — no server required. The CLI imports the same core engine used by the MCP server.
|
|
@@ -467,7 +516,7 @@ npx ts-node examples/10-nemoclaw-sandbox-swarm.ts
|
|
|
467
516
|
|
|
468
517
|
## Adapter System
|
|
469
518
|
|
|
470
|
-
|
|
519
|
+
32 adapters, zero adapter dependencies. You bring your own SDK objects.
|
|
471
520
|
|
|
472
521
|
| Adapter | Framework / Protocol | Register method |
|
|
473
522
|
|---|---|---|
|
|
@@ -532,7 +581,7 @@ Extend `BaseAdapter` (or `StreamingBaseAdapter` for streaming) to add your own i
|
|
|
532
581
|
npm run test:all # All suites in sequence
|
|
533
582
|
npm test # Core orchestrator
|
|
534
583
|
npm run test:security # Security module
|
|
535
|
-
npm run test:adapters # All
|
|
584
|
+
npm run test:adapters # All 32 adapters
|
|
536
585
|
npm run test:streaming # Streaming adapters
|
|
537
586
|
npm run test:a2a # A2A protocol adapter
|
|
538
587
|
npm run test:codex # Codex adapter
|
|
@@ -542,15 +591,15 @@ npm run test:phase9 # Agent runtime, console, strategy agent
|
|
|
542
591
|
npm run test:phase12 # Context Throttler, Partition Planner, Coverage Gate, Route Classifier
|
|
543
592
|
```
|
|
544
593
|
|
|
545
|
-
**3,
|
|
594
|
+
**3,525 passing assertions across 39 test suites** (`npm run test:all`):
|
|
546
595
|
|
|
547
596
|
| Suite | Assertions | Covers |
|
|
548
597
|
|---|---|---|
|
|
549
598
|
| `test-phase4.ts` | 147 | FSM governance, compliance monitor, adapter integration |
|
|
550
599
|
| `test-phase5f.ts` | 127 | SSE transport, `McpCombinedBridge`, extended MCP tools |
|
|
551
600
|
| `test-phase5g.ts` | 121 | CRDT backend, vector clocks, bidirectional sync |
|
|
552
|
-
| `test-phase6.ts` |
|
|
553
|
-
| `test-adapters.ts` |
|
|
601
|
+
| `test-phase6.ts` | 129 | MCP server, control-plane tools, audit tools |
|
|
602
|
+
| `test-adapters.ts` | 271 | All 32 adapters, registry routing, integration, edge cases |
|
|
554
603
|
| `test-phase5d.ts` | 117 | Pluggable backend (Redis, CRDT, Memory) |
|
|
555
604
|
| `test-standalone.ts` | 88 | Blackboard, auth, integration, persistence, parallelisation, quality gate |
|
|
556
605
|
| `test-phase5e.ts` | 87 | Federated budget tracking |
|
|
@@ -568,9 +617,9 @@ npm run test:phase12 # Context Throttler, Partition Planner, Coverage Gate,
|
|
|
568
617
|
| `test-qa.ts` | 67 | QA orchestrator: scenarios, feedback loop, regression, contradictions |
|
|
569
618
|
| `test-phase7.ts` | 94 | Deferred init, hook middleware, flow control, skill composer, semantic search |
|
|
570
619
|
| `test-phase8.ts` | 146 | Phase pipeline, confidence filter, matcher-based hooks, fan-out/fan-in |
|
|
571
|
-
| `test-phase9.ts` |
|
|
620
|
+
| `test-phase9.ts` | 293 | Agent runtime, sandbox policy, shell executor, file accessor, approval gate, console UI, orchestrator wiring, pipe mode, strategy agent |
|
|
572
621
|
| `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 |
|
|
573
|
-
| `test-phase11.ts` |
|
|
622
|
+
| `test-phase11.ts` | 55 | TTL background sweep, WAL crash recovery, CircuitBreaker, `ITelemetryProvider` / OTel hooks |
|
|
574
623
|
| `test-topology.ts` | 304 | WorkTree, ControlPlane, dashboard server, topology visualization, WebSocket protocol |
|
|
575
624
|
| `test-rlm-phases.ts` | 123 | FederatedBudget child spending, blackboard metadata API, best-partial result, HookContext depth, sub-goal recursion, semaphore fan-out, PhasePipeline compaction, RLMAdapter end-to-end |
|
|
576
625
|
| `test-phase12.ts` | 65 | Context Throttler, Partition Planner, Coverage Gate, Route Classifier, EVALUATING FSM state, runTeam integration |
|
|
@@ -579,8 +628,10 @@ npm run test:phase12 # Context Throttler, Partition Planner, Coverage Gate,
|
|
|
579
628
|
| `test-claim-verifier.ts` | 50 | ClaimVerifier: receipt generation/tamper/expiry, corroborated/unsupported/undisclosed, trust decay/reset/DoS protection |
|
|
580
629
|
| `test-phase13.ts` | 58 | ESM dual-build config, McpStreamableServer dispatch + resources + prompts, PhasePipeline checkpoint/resume/clear, SemanticMemory save/load/autoSave/clearPersisted |
|
|
581
630
|
| `test-phase14.ts` | 52 | Model lifecycle governance: `GovernedModelGateway` refusal→fallback, `ModelBudget` credit repricing, `RefusalTelemetry`, Anthropic Messages adapter |
|
|
582
|
-
| `test-phase15.ts` |
|
|
631
|
+
| `test-phase15.ts` | 32 | Orchestration resilience: `RetryBudget`, per-sub-agent fallback in `FanOutFanIn` + `TeamRunner`, `EffortPolicy` |
|
|
583
632
|
| `test-phase16.ts` | 21 | `ThinkingBlockManager` lifecycle + reasoning-extraction guard, OWASP Agentic Top 10 coverage matrix |
|
|
633
|
+
| `test-phase17.ts` | 13 | `ApprovalInbox` GHSA-m4jg-6w3q-gm86 fix: read-route auth gating, token validation, backward compatibility, CORS allowlist |
|
|
634
|
+
| `test-phase18.ts` | 85 | `ClaudeHookBridge` observe/enforce gating, MCP elicitation channel + fail-closed approval callback, `A2AServer` agent card / tasks / auth / eviction |
|
|
584
635
|
| `test.ts` | 39 | Core orchestrator smoke tests |
|
|
585
636
|
|
|
586
637
|
---
|
|
@@ -601,7 +652,7 @@ npm run test:phase12 # Context Throttler, Partition Planner, Coverage Gate,
|
|
|
601
652
|
| [ADOPTERS.md](ADOPTERS.md) | Known adopters — open a PR to add yourself |
|
|
602
653
|
| [INTEGRATION_GUIDE.md](INTEGRATION_GUIDE.md) | End-to-end integration walkthrough with v5.13 modules |
|
|
603
654
|
| [SKILL.md](SKILL.md) | OpenClaw/ClawHub Python skill — setup, orchestrator protocol, OWASP engine coverage, security scan findings |
|
|
604
|
-
| [references/adapter-system.md](references/adapter-system.md) | Adapter architecture, all
|
|
655
|
+
| [references/adapter-system.md](references/adapter-system.md) | Adapter architecture, all 32 adapters (incl. `AnthropicMessagesAdapter`), writing custom adapters |
|
|
605
656
|
| [references/auth-guardian.md](references/auth-guardian.md) | Permission scoring, resource types, `scoreRequest()`, IAuthValidator interface |
|
|
606
657
|
| [references/trust-levels.md](references/trust-levels.md) | Trust level configuration, APS delegation-chain mapping |
|
|
607
658
|
|
package/SKILL.md
CHANGED
|
@@ -767,7 +767,7 @@ The following findings are drawn from the **MAESTRO Agent Security Threat** fram
|
|
|
767
767
|
|
|
768
768
|
| Control | How Network-AI addresses it |
|
|
769
769
|
|---|---|
|
|
770
|
-
| **Exact version pinning** | npm `package.json` uses exact `"version": "5.
|
|
770
|
+
| **Exact version pinning** | npm `package.json` uses exact `"version": "5.14.0"` — no semver range specifiers; `clawhub install network-ai` pins to a specific published version |
|
|
771
771
|
| **Zero transitive dependency drift** | All bundled Python scripts use Python stdlib only — `pip install` is never required; there are no third-party packages to drift, be compromised upstream, or introduce CVEs |
|
|
772
772
|
| **Signed, tagged releases** | Every release is committed with a signed Git tag (`v5.7.x`); commit hash is verifiable against CHANGELOG.md; GitHub releases link tag → diff → changelog entry |
|
|
773
773
|
| **Supply chain monitoring** | npm package continuously scored by Socket.dev (score A); any new dependency or permission change triggers an alert |
|
package/bin/cli.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { LockedBlackboard } from '../lib/locked-blackboard';
|
|
|
17
17
|
import { AuthGuardian } from '../index';
|
|
18
18
|
import { FederatedBudget } from '../lib/federated-budget';
|
|
19
19
|
import { EnvironmentManager } from '../lib/env-manager';
|
|
20
|
+
import { ClaudeHookBridge } from '../lib/claude-hooks';
|
|
20
21
|
|
|
21
22
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
22
23
|
const pkg = (() => {
|
|
@@ -695,6 +696,78 @@ program.command('inspect <key>')
|
|
|
695
696
|
}
|
|
696
697
|
});
|
|
697
698
|
|
|
699
|
+
// ── hook (coding-agent hooks bridge) ──────────────────────────────────────────
|
|
700
|
+
|
|
701
|
+
function readStdinFully(): Promise<string> {
|
|
702
|
+
return new Promise((resolvePromise, rejectPromise) => {
|
|
703
|
+
let data = '';
|
|
704
|
+
process.stdin.setEncoding('utf8');
|
|
705
|
+
process.stdin.on('data', (chunk: string) => { data += chunk; });
|
|
706
|
+
process.stdin.on('end', () => resolvePromise(data));
|
|
707
|
+
process.stdin.on('error', rejectPromise);
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
const hookCmd = program.command('hook')
|
|
712
|
+
.description('Coding-agent hook bridge — audit/gate tool calls through AuthGuardian (Claude Code PreToolUse/PostToolUse)');
|
|
713
|
+
|
|
714
|
+
hookCmd.command('pre-tool-use')
|
|
715
|
+
.description('Handle a PreToolUse hook event: reads hook JSON from stdin, writes a permission decision to stdout')
|
|
716
|
+
.option('--mode <mode>', "'observe' (audit only) or 'enforce' (AuthGuardian-gated)", process.env['NETWORK_AI_HOOKS_MODE'] ?? 'observe')
|
|
717
|
+
.option('--agent <id>', 'agent identity for permission requests', 'claude-code')
|
|
718
|
+
.option('--trust <level>', 'trust level for the agent identity (0-1)', (v: string) => parseFloat(v), 0.7)
|
|
719
|
+
.option('--deny <pattern...>', 'regex pattern(s) — matching tool calls are denied outright')
|
|
720
|
+
.option('--allow <pattern...>', 'regex pattern(s) — matching tool calls are allowed without gating')
|
|
721
|
+
.option('--blocked-decision <decision>', "decision when the guardian denies: 'ask' (escalate to human) or 'deny'", 'ask')
|
|
722
|
+
.action(async (opts: { mode: string; agent: string; trust: number; deny?: string[]; allow?: string[]; blockedDecision: string }, cmd: Command) => {
|
|
723
|
+
const g = cmd.optsWithGlobals<{ data: string; json: boolean }>();
|
|
724
|
+
if (opts.mode !== 'observe' && opts.mode !== 'enforce') die(`invalid --mode: ${opts.mode} (use observe|enforce)`);
|
|
725
|
+
if (opts.blockedDecision !== 'ask' && opts.blockedDecision !== 'deny') die(`invalid --blocked-decision: ${opts.blockedDecision} (use ask|deny)`);
|
|
726
|
+
const dataDir = resolveData(g);
|
|
727
|
+
const bridge = new ClaudeHookBridge({
|
|
728
|
+
mode: opts.mode,
|
|
729
|
+
agentId: opts.agent,
|
|
730
|
+
trustLevel: opts.trust,
|
|
731
|
+
denyPatterns: opts.deny,
|
|
732
|
+
allowPatterns: opts.allow,
|
|
733
|
+
blockedDecision: opts.blockedDecision,
|
|
734
|
+
auditLogPath: path.join(dataDir, 'hooks_audit.jsonl'),
|
|
735
|
+
guardianAuditLogPath: path.join(dataDir, 'audit_log.jsonl'),
|
|
736
|
+
trustConfigPath: path.join(dataDir, 'trust_levels.json'),
|
|
737
|
+
});
|
|
738
|
+
try {
|
|
739
|
+
const raw = await readStdinFully();
|
|
740
|
+
const input = ClaudeHookBridge.parseInput(raw);
|
|
741
|
+
const out = await bridge.handlePreToolUse(input);
|
|
742
|
+
process.stdout.write(JSON.stringify(out) + '\n');
|
|
743
|
+
} catch (err) {
|
|
744
|
+
process.stderr.write(`network-ai hook: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
745
|
+
process.exit(1);
|
|
746
|
+
}
|
|
747
|
+
});
|
|
748
|
+
|
|
749
|
+
hookCmd.command('post-tool-use')
|
|
750
|
+
.description('Handle a PostToolUse hook event: reads hook JSON from stdin, appends an audit entry')
|
|
751
|
+
.option('--agent <id>', 'agent identity recorded in the audit trail', 'claude-code')
|
|
752
|
+
.action(async (opts: { agent: string }, cmd: Command) => {
|
|
753
|
+
const g = cmd.optsWithGlobals<{ data: string; json: boolean }>();
|
|
754
|
+
const dataDir = resolveData(g);
|
|
755
|
+
const bridge = new ClaudeHookBridge({
|
|
756
|
+
mode: 'observe',
|
|
757
|
+
agentId: opts.agent,
|
|
758
|
+
auditLogPath: path.join(dataDir, 'hooks_audit.jsonl'),
|
|
759
|
+
});
|
|
760
|
+
try {
|
|
761
|
+
const raw = await readStdinFully();
|
|
762
|
+
const input = ClaudeHookBridge.parseInput(raw);
|
|
763
|
+
const out = await bridge.handlePostToolUse(input);
|
|
764
|
+
process.stdout.write(JSON.stringify(out) + '\n');
|
|
765
|
+
} catch (err) {
|
|
766
|
+
process.stderr.write(`network-ai hook: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
767
|
+
process.exit(1);
|
|
768
|
+
}
|
|
769
|
+
});
|
|
770
|
+
|
|
698
771
|
// ── pause / resume (kill switch) ──────────────────────────────────────────────
|
|
699
772
|
|
|
700
773
|
program.command('pause')
|
package/bin/mcp-server.ts
CHANGED
|
@@ -157,6 +157,14 @@ SSE/HTTP mode (for network clients):
|
|
|
157
157
|
*/
|
|
158
158
|
async function runStdio(combined: McpCombinedBridge): Promise<void> {
|
|
159
159
|
const { createInterface } = await import('readline');
|
|
160
|
+
const { StdioElicitationChannel } = await import('../lib/mcp-elicitation');
|
|
161
|
+
|
|
162
|
+
// Server→client request channel (MCP elicitation). Client responses to
|
|
163
|
+
// server-initiated requests are routed here instead of being dispatched
|
|
164
|
+
// (incorrectly) as client requests.
|
|
165
|
+
const elicitation = new StdioElicitationChannel((line: string) => {
|
|
166
|
+
process.stdout.write(line + '\n');
|
|
167
|
+
});
|
|
160
168
|
|
|
161
169
|
const rl = createInterface({ input: process.stdin, terminal: false });
|
|
162
170
|
|
|
@@ -178,11 +186,17 @@ async function runStdio(combined: McpCombinedBridge): Promise<void> {
|
|
|
178
186
|
return;
|
|
179
187
|
}
|
|
180
188
|
|
|
189
|
+
// Response to a server-initiated request (elicitation)? Consume it.
|
|
190
|
+
if (elicitation.handleMessage(request)) return;
|
|
191
|
+
|
|
181
192
|
const response = await combined.handleRPC(request);
|
|
182
193
|
process.stdout.write(JSON.stringify(response) + '\n');
|
|
183
194
|
});
|
|
184
195
|
|
|
185
|
-
rl.on('close', () =>
|
|
196
|
+
rl.on('close', () => {
|
|
197
|
+
elicitation.rejectAll('stdin closed');
|
|
198
|
+
process.exit(0);
|
|
199
|
+
});
|
|
186
200
|
}
|
|
187
201
|
|
|
188
202
|
// ============================================================================
|
|
@@ -15,7 +15,11 @@
|
|
|
15
15
|
* import { APSAdapter } from 'network-ai';
|
|
16
16
|
*
|
|
17
17
|
* const aps = new APSAdapter();
|
|
18
|
-
* await aps.initialize({
|
|
18
|
+
* await aps.initialize({
|
|
19
|
+
* // Required in local mode (the default) — supply a real cryptographic
|
|
20
|
+
* // verifier. There is no fail-open default (GHSA-3jf7-33vc-hgf4).
|
|
21
|
+
* verifySignature: async (delegation) => verifyEd25519(delegation),
|
|
22
|
+
* });
|
|
19
23
|
*
|
|
20
24
|
* // Register an APS-verified agent by providing its delegation chain
|
|
21
25
|
* const trust = aps.apsDelegationToTrust({
|
|
@@ -31,7 +35,7 @@
|
|
|
31
35
|
* guardian.registerAgentTrust(trust);
|
|
32
36
|
*
|
|
33
37
|
* Verification modes:
|
|
34
|
-
* - 'local' —
|
|
38
|
+
* - 'local' — requires a caller-supplied verifySignature callback (default)
|
|
35
39
|
* - 'mcp' — calls an APS MCP server to verify the full chain
|
|
36
40
|
*
|
|
37
41
|
* @module APSAdapter
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aps-adapter.d.ts","sourceRoot":"","sources":["../../adapters/aps-adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"aps-adapter.d.ts","sourceRoot":"","sources":["../../adapters/aps-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EACV,aAAa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,qBAAa,UAAW,SAAQ,WAAW;IACzC,QAAQ,CAAC,IAAI,SAAS;IACtB,QAAQ,CAAC,OAAO,WAAW;IAE3B,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,UAAU,CAAO;IACzB,OAAO,CAAC,gBAAgB,CAA4B;IACpD,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,iBAAiB,CAAC,CAAkD;IAE5E,IAAI,YAAY,IAAI,mBAAmB,CAStC;IAEK,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAsCzD;;;;;;;;;OASG;IACG,oBAAoB,CAAC,UAAU,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;IA+D/E;;OAEG;YACW,gBAAgB;IAyB9B;;;OAGG;YACW,YAAY;IAwC1B;;;OAGG;IACG,YAAY,CAChB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,YAAY,EACrB,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,WAAW,CAAC;CA2CxB"}
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
* import { APSAdapter } from 'network-ai';
|
|
17
17
|
*
|
|
18
18
|
* const aps = new APSAdapter();
|
|
19
|
-
* await aps.initialize({
|
|
19
|
+
* await aps.initialize({
|
|
20
|
+
* // Required in local mode (the default) — supply a real cryptographic
|
|
21
|
+
* // verifier. There is no fail-open default (GHSA-3jf7-33vc-hgf4).
|
|
22
|
+
* verifySignature: async (delegation) => verifyEd25519(delegation),
|
|
23
|
+
* });
|
|
20
24
|
*
|
|
21
25
|
* // Register an APS-verified agent by providing its delegation chain
|
|
22
26
|
* const trust = aps.apsDelegationToTrust({
|
|
@@ -32,7 +36,7 @@
|
|
|
32
36
|
* guardian.registerAgentTrust(trust);
|
|
33
37
|
*
|
|
34
38
|
* Verification modes:
|
|
35
|
-
* - 'local' —
|
|
39
|
+
* - 'local' — requires a caller-supplied verifySignature callback (default)
|
|
36
40
|
* - 'mcp' — calls an APS MCP server to verify the full chain
|
|
37
41
|
*
|
|
38
42
|
* @module APSAdapter
|
|
@@ -107,6 +111,14 @@ class APSAdapter extends base_adapter_1.BaseAdapter {
|
|
|
107
111
|
if (this.verificationMode === 'mcp' && !this.mcpServerUrl) {
|
|
108
112
|
throw new Error('mcpServerUrl is required when verificationMode is "mcp"');
|
|
109
113
|
}
|
|
114
|
+
if (this.verificationMode === 'local' && !this.verifySignatureFn) {
|
|
115
|
+
// Fail closed (GHSA-3jf7-33vc-hgf4): the default 'local' mode must never
|
|
116
|
+
// silently accept an unverified delegation. A caller MUST supply a real
|
|
117
|
+
// cryptographic verifySignature callback to use local mode.
|
|
118
|
+
throw new Error('APSAdapter: verifySignature is required when verificationMode is "local" ' +
|
|
119
|
+
'(the default). Provide a cryptographic verifySignature callback, or set ' +
|
|
120
|
+
'verificationMode: "mcp" with a trusted mcpServerUrl.');
|
|
121
|
+
}
|
|
110
122
|
}
|
|
111
123
|
/**
|
|
112
124
|
* Core method: convert an APS delegation into an AuthGuardian trust mapping.
|
|
@@ -187,13 +199,15 @@ class APSAdapter extends base_adapter_1.BaseAdapter {
|
|
|
187
199
|
if (this.verificationMode === 'mcp' && this.mcpServerUrl) {
|
|
188
200
|
return this.verifyViaMCP(delegation);
|
|
189
201
|
}
|
|
190
|
-
// Local verification —
|
|
202
|
+
// Local verification — requires a BYOC cryptographic verifier. initialize()
|
|
203
|
+
// enforces that verifySignatureFn is set whenever verificationMode is
|
|
204
|
+
// 'local', but we fail closed here too as defense in depth
|
|
205
|
+
// (GHSA-3jf7-33vc-hgf4 — a bare non-empty signature string must never be
|
|
206
|
+
// treated as verified).
|
|
191
207
|
if (this.verifySignatureFn) {
|
|
192
208
|
return this.verifySignatureFn(delegation);
|
|
193
209
|
}
|
|
194
|
-
|
|
195
|
-
// In production, replace with actual crypto verification
|
|
196
|
-
return delegation.signature.length > 0;
|
|
210
|
+
return false;
|
|
197
211
|
}
|
|
198
212
|
/**
|
|
199
213
|
* Verify delegation via an APS MCP server.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aps-adapter.js","sourceRoot":"","sources":["../../adapters/aps-adapter.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"aps-adapter.js","sourceRoot":"","sources":["../../adapters/aps-adapter.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;;;AAEH,iDAA6C;AA0D7C,iFAAiF;AAEjF,MAAM,iBAAiB,GAA2B;IAChD,WAAW,EAAG,aAAa;IAC3B,YAAY,EAAE,aAAa;IAC3B,WAAW,EAAG,SAAS;IACvB,YAAY,EAAE,SAAS;IACvB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAI,KAAK;IACnB,WAAW,EAAG,KAAK;IACnB,SAAS,EAAK,UAAU;IACxB,UAAU,EAAI,UAAU;IACxB,UAAU,EAAI,UAAU;IACxB,WAAW,EAAG,UAAU;CACzB,CAAC;AAEF,iFAAiF;AAEjF;;;;;;GAMG;AACH,MAAa,UAAW,SAAQ,0BAAW;IAChC,IAAI,GAAG,KAAK,CAAC;IACb,OAAO,GAAG,OAAO,CAAC;IAEnB,SAAS,GAAG,GAAG,CAAC;IAChB,UAAU,GAAG,GAAG,CAAC;IACjB,gBAAgB,GAAoB,OAAO,CAAC;IAC5C,YAAY,CAAU;IACtB,iBAAiB,CAAmD;IAE5E,IAAI,YAAY;QACd,OAAO;YACL,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,IAAI;YACd,aAAa,EAAE,KAAK;YACpB,SAAS,EAAE,KAAK;YAChB,cAAc,EAAE,IAAI;YACpB,gBAAgB,EAAE,KAAK;SACxB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,MAAwB;QACvC,MAAM,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;YACnC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AC1B,OAAO,EAAE,sDAAsD;oBAC/D,WAAW,EAAE,KAAK;iBACnB;gBACD,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE;aACjC,CAAC;QACJ,CAAC;QAED,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;YAC1D,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,KAAK;gBACX,QAAQ,EAAE;oBACR,OAAO,EAAE,IAAI,CAAC,IAAI;oBAClB,KAAK,EAAE;wBACL,SAAS;wBACT,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,QAAQ;wBACpC,UAAU,EAAE,KAAK,CAAC,UAAU;qBAC7B;iBACF;aACF,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE;oBACL,IAAI,EAAE,mBAAmB;oBACzB,OAAO,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;oBACzD,WAAW,EAAE,KAAK;oBAClB,WAAW,EAAE,GAAG;iBACjB;gBACD,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE;aACjC,CAAC;QACJ,CAAC;IACH,CAAC;CACF;AA/PD,gCA+PC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Claude Agent SDK Adapter
|
|
3
|
+
*
|
|
4
|
+
* Integrates agents built with Anthropic's Claude Agent SDK
|
|
5
|
+
* (`@anthropic-ai/claude-agent-sdk`) with the SwarmOrchestrator. The SDK's
|
|
6
|
+
* `query()` function runs a full agentic loop (tool use, file edits, shell)
|
|
7
|
+
* and streams SDK messages; this adapter drives that loop and returns the
|
|
8
|
+
* final result to the swarm.
|
|
9
|
+
*
|
|
10
|
+
* Strictly BYOC: the SDK is never imported here. Callers pass the SDK's
|
|
11
|
+
* `query` function (or any compatible implementation) at registration time.
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* import { query } from '@anthropic-ai/claude-agent-sdk';
|
|
15
|
+
*
|
|
16
|
+
* const adapter = new ClaudeAgentSDKAdapter();
|
|
17
|
+
* await adapter.initialize({});
|
|
18
|
+
* adapter.registerAgent('coder', {
|
|
19
|
+
* query, // the SDK's query function
|
|
20
|
+
* options: { maxTurns: 10, allowedTools: ['Read', 'Grep'] },
|
|
21
|
+
* systemPrompt: 'You are a careful refactoring agent.',
|
|
22
|
+
* });
|
|
23
|
+
*
|
|
24
|
+
* await registry.addAdapter(adapter);
|
|
25
|
+
* // orchestrator: delegateTask({ targetAgent: 'claude-agent-sdk:coder', ... })
|
|
26
|
+
*
|
|
27
|
+
* @module ClaudeAgentSDKAdapter
|
|
28
|
+
* @version 1.0.0
|
|
29
|
+
*/
|
|
30
|
+
import { BaseAdapter } from './base-adapter';
|
|
31
|
+
import type { AdapterCapabilities, AgentPayload, AgentContext, AgentResult } from '../types/agent-adapter';
|
|
32
|
+
/**
|
|
33
|
+
* A message yielded by the Claude Agent SDK's query loop. Only the fields
|
|
34
|
+
* this adapter consumes are modeled; extra fields pass through untouched.
|
|
35
|
+
*/
|
|
36
|
+
export interface ClaudeSDKMessage {
|
|
37
|
+
/** Message kind — 'assistant', 'user', 'system', 'result', ... */
|
|
38
|
+
type: string;
|
|
39
|
+
/** For result messages: 'success' or an error subtype */
|
|
40
|
+
subtype?: string;
|
|
41
|
+
/** For result messages: the final result text */
|
|
42
|
+
result?: string;
|
|
43
|
+
/** Total cost in USD, when reported */
|
|
44
|
+
total_cost_usd?: number;
|
|
45
|
+
/** Number of agentic turns taken */
|
|
46
|
+
num_turns?: number;
|
|
47
|
+
/** Session identifier assigned by the SDK */
|
|
48
|
+
session_id?: string;
|
|
49
|
+
/** Token usage, when reported */
|
|
50
|
+
usage?: Record<string, unknown>;
|
|
51
|
+
/** Whether the run ended in an error */
|
|
52
|
+
is_error?: boolean;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* The Claude Agent SDK `query` function shape. Matches
|
|
56
|
+
* `@anthropic-ai/claude-agent-sdk`'s `query({ prompt, options })`, which
|
|
57
|
+
* returns an async iterable of SDK messages.
|
|
58
|
+
*/
|
|
59
|
+
export type ClaudeAgentQueryFn = (params: {
|
|
60
|
+
prompt: string;
|
|
61
|
+
options?: Record<string, unknown>;
|
|
62
|
+
}) => AsyncIterable<ClaudeSDKMessage>;
|
|
63
|
+
/** Configuration for a registered Claude Agent SDK agent */
|
|
64
|
+
export interface ClaudeAgentSDKConfig {
|
|
65
|
+
/** The SDK's query function (BYOC — required) */
|
|
66
|
+
query: ClaudeAgentQueryFn;
|
|
67
|
+
/**
|
|
68
|
+
* Options forwarded to the SDK on every run — e.g. `maxTurns`,
|
|
69
|
+
* `allowedTools`, `permissionMode`, `cwd`, `model`.
|
|
70
|
+
*/
|
|
71
|
+
options?: Record<string, unknown>;
|
|
72
|
+
/** System prompt override — forwarded as `options.systemPrompt` */
|
|
73
|
+
systemPrompt?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Called for every intermediate SDK message (assistant turns, tool use)
|
|
76
|
+
* before the final result — useful for progress reporting.
|
|
77
|
+
*/
|
|
78
|
+
onMessage?: (message: ClaudeSDKMessage) => void;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Adapter that runs Claude Agent SDK agentic loops as swarm agents.
|
|
82
|
+
* The final `result` message becomes the AgentResult; intermediate messages
|
|
83
|
+
* are surfaced through the per-agent `onMessage` callback.
|
|
84
|
+
*/
|
|
85
|
+
export declare class ClaudeAgentSDKAdapter extends BaseAdapter {
|
|
86
|
+
readonly name = "claude-agent-sdk";
|
|
87
|
+
readonly version = "1.0.0";
|
|
88
|
+
private agents;
|
|
89
|
+
get capabilities(): AdapterCapabilities;
|
|
90
|
+
/**
|
|
91
|
+
* Register a Claude Agent SDK-powered agent.
|
|
92
|
+
*
|
|
93
|
+
* @param agentId Unique identifier used in `delegateTask` calls.
|
|
94
|
+
* @param config Agent configuration — `query` is required.
|
|
95
|
+
*/
|
|
96
|
+
registerAgent(agentId: string, config: ClaudeAgentSDKConfig): void;
|
|
97
|
+
executeAgent(agentId: string, payload: AgentPayload, context: AgentContext): Promise<AgentResult>;
|
|
98
|
+
shutdown(): Promise<void>;
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=claude-agent-sdk-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"claude-agent-sdk-adapter.d.ts","sourceRoot":"","sources":["../../adapters/claude-agent-sdk-adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,EACV,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAMhC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,MAAM,MAAM,kBAAkB,GAAG,CAAC,MAAM,EAAE;IACxC,MAAM,EAAE,MAAM,CAAC;IAC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