@agent-wall/cli 0.1.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.
@@ -0,0 +1,18 @@
1
+
2
+ > @agent-wall/cli@0.1.0 build /home/runner/work/agent-wall/agent-wall/packages/cli
3
+ > tsup && node -e "const fs=require('fs'),p=require('path');const s=p.resolve(__dirname,'../dashboard/dist');const d=p.resolve(__dirname,'dist/dashboard');if(fs.existsSync(s)){fs.cpSync(s,d,{recursive:true});console.log('✓ Dashboard assets bundled')}else{console.log('⚠ Dashboard not built, skipping asset bundle')}"
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/runner/work/agent-wall/agent-wall/packages/cli/tsup.config.ts
9
+ CLI Target: es2022
10
+ CLI Cleaning output folder
11
+ ESM Build start
12
+ ESM dist/index.js 41.63 KB
13
+ ESM dist/index.js.map 75.55 KB
14
+ ESM ⚡️ Build success in 62ms
15
+ DTS Build start
16
+ DTS ⚡️ Build success in 1926ms
17
+ DTS dist/index.d.ts 13.00 B
18
+ ✓ Dashboard assets bundled
@@ -0,0 +1,19 @@
1
+
2
+ > @agent-wall/cli@0.1.0 test /home/runner/work/agent-wall/agent-wall/packages/cli
3
+ > vitest run --passWithNoTests
4
+
5
+
6
+  RUN  v3.2.4 /home/runner/work/agent-wall/agent-wall/packages/cli
7
+
8
+ ✓ src/commands/test.test.ts (8 tests) 22ms
9
+ ✓ src/commands/scan.test.ts (15 tests) 27ms
10
+ ✓ src/commands/audit.test.ts (9 tests) 51ms
11
+ ✓ src/commands/validate.test.ts (6 tests) 11ms
12
+ ✓ src/commands/doctor.test.ts (7 tests) 17ms
13
+ ✓ src/commands/init.test.ts (6 tests) 16ms
14
+
15
+  Test Files  6 passed (6)
16
+  Tests  51 passed (51)
17
+  Start at  10:39:44
18
+  Duration  1.06s (transform 389ms, setup 0ms, collect 885ms, tests 143ms, environment 2ms, prepare 815ms)
19
+
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026-present Agent Wall Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # Agent Wall
2
+
3
+ **Security firewall for AI agents.** Intercepts MCP tool calls, enforces policies, blocks attacks.
4
+
5
+ > *"Cloudflare for AI agents"* — Zero-config protection for any MCP server.
6
+
7
+ [![CI](https://github.com/agent-wall/agent-wall/actions/workflows/ci.yml/badge.svg)](https://github.com/agent-wall/agent-wall/actions/workflows/ci.yml)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/agent-wall/agent-wall/blob/main/LICENSE)
9
+ [![npm](https://img.shields.io/npm/v/agent-wall)](https://www.npmjs.com/package/agent-wall)
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g @agent-wall/cli
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # Generate a starter policy
21
+ agent-wall init
22
+
23
+ # Wrap any MCP server
24
+ agent-wall wrap -- npx @modelcontextprotocol/server-filesystem /home/user
25
+
26
+ # With real-time dashboard
27
+ agent-wall wrap --dashboard -- npx mcp-server
28
+ ```
29
+
30
+ ## 30-Second Integration
31
+
32
+ Replace your MCP config entry:
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "filesystem": {
38
+ "command": "agent-wall",
39
+ "args": ["wrap", "--", "npx", "@modelcontextprotocol/server-filesystem", "/home/user"]
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ Works with **Claude Code**, **Cursor**, **Claude Desktop**, **VS Code**, **Windsurf**, and any MCP client.
46
+
47
+ ## Defense-in-Depth Pipeline
48
+
49
+ Every tool call runs through a **5-step inbound pipeline**:
50
+
51
+ ```
52
+ 1. Kill Switch — Emergency deny-all
53
+ 2. Injection — 30+ prompt injection patterns
54
+ 3. Egress Control — Block SSRF, private IPs, metadata endpoints
55
+ 4. Policy Engine — YAML rules (first-match-wins, glob, rate limiting)
56
+ 5. Chain Detection — Suspicious multi-step patterns
57
+ ```
58
+
59
+ Plus an **outbound response scanner** — 14 secret patterns, 5 PII patterns, custom regex.
60
+
61
+ ## CLI Commands
62
+
63
+ | Command | Description |
64
+ |---------|-------------|
65
+ | `agent-wall wrap` | Wrap an MCP server with policy enforcement |
66
+ | `agent-wall init` | Generate a starter config |
67
+ | `agent-wall test` | Dry-run a tool call against your policy |
68
+ | `agent-wall audit` | View and analyze audit logs |
69
+ | `agent-wall scan` | Scan MCP config for security risks |
70
+ | `agent-wall validate` | Validate policy configuration |
71
+ | `agent-wall doctor` | Health check for config and environment |
72
+
73
+ ## Documentation
74
+
75
+ Full docs: [agent-wall.github.io/agent-wall](https://agent-wall.github.io/agent-wall/)
76
+
77
+ ## License
78
+
79
+ [MIT](https://github.com/agent-wall/agent-wall/blob/main/LICENSE)
@@ -0,0 +1 @@
1
+ :root{--bg-primary: #0d1117;--bg-secondary: #161b22;--bg-tertiary: #21262d;--border: #30363d;--text-primary: #e6edf3;--text-secondary: #8b949e;--text-muted: #484f58;--green: #3fb950;--green-dim: #1a4731;--red: #f85149;--red-dim: #5a1e1e;--yellow: #d29922;--yellow-dim: #4b3a12;--orange: #db6d28;--blue: #58a6ff;--font-mono: "SF Mono", "Cascadia Code", "Consolas", monospace;--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--radius: 6px}*{margin:0;padding:0;box-sizing:border-box}html,body,#root{height:100%;background:var(--bg-primary);color:var(--text-primary);font-family:var(--font-sans);font-size:14px;line-height:1.5}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:transparent}::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}.card{background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);padding:14px}.badge{display:inline-block;padding:1px 7px;border-radius:10px;font-size:10px;font-weight:700;font-family:var(--font-mono);text-transform:uppercase;letter-spacing:.5px;white-space:nowrap}.badge-allow{background:var(--green-dim);color:var(--green)}.badge-deny{background:var(--red-dim);color:var(--red)}.badge-prompt{background:var(--yellow-dim);color:var(--yellow)}.badge-info{background:var(--bg-tertiary);color:var(--text-secondary)}.severity-dot{display:inline-block;width:7px;height:7px;border-radius:50%;flex-shrink:0}.severity-info{background:var(--blue)}.severity-warn{background:var(--orange)}.severity-critical{background:var(--red);animation:pulse 1.5s infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.3}}@keyframes slideIn{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes glowPulse{0%,to{box-shadow:none}50%{box-shadow:0 0 12px #f851494d}}table{width:100%;border-collapse:collapse;font-family:var(--font-mono);font-size:12px}th{text-align:left;padding:7px 10px;border-bottom:1px solid var(--border);color:var(--text-secondary);font-weight:500;cursor:pointer;-webkit-user-select:none;user-select:none;font-size:11px}th:hover{color:var(--text-primary)}td{padding:5px 10px;border-bottom:1px solid var(--bg-tertiary)}.cell-mono{font-family:var(--font-mono);color:var(--text-muted)}.cell-tool{color:var(--blue);max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cell-rule{color:var(--text-muted);font-size:11px}.cell-rule-name{color:var(--text-primary)}.cell-msg{color:var(--text-secondary);max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button{cursor:pointer;border:1px solid var(--border);border-radius:var(--radius);padding:5px 12px;font-size:12px;font-family:var(--font-sans);background:var(--bg-tertiary);color:var(--text-primary);transition:background .15s}button:hover{background:var(--border)}input{background:var(--bg-primary);border:1px solid var(--border);border-radius:var(--radius);padding:5px 10px;font-size:12px;font-family:var(--font-mono);color:var(--text-primary);outline:none;width:100%}input:focus{border-color:var(--blue)}.audit-select{background:var(--bg-primary);border:1px solid var(--border);border-radius:var(--radius);padding:5px 8px;font-size:12px;color:var(--text-primary);outline:none}.chip{display:inline-block;padding:1px 9px;border-radius:10px;font-size:11px;cursor:pointer;border:1px solid var(--border);background:var(--bg-primary);color:var(--text-secondary);transition:all .15s;-webkit-user-select:none;user-select:none}.chip.active{border-color:var(--blue);color:var(--blue);background:#58a6ff14}.dashboard{height:100%;display:flex;flex-direction:column;padding:12px 16px;gap:10px;overflow:hidden}.dash-header{display:flex;align-items:center;justify-content:space-between;padding:4px 0;flex-shrink:0}.header-left{display:flex;align-items:center;gap:10px}.header-right{display:flex;align-items:center;gap:14px}.logo{font-size:16px;font-weight:700;color:var(--text-primary);display:flex;align-items:center}.connection-dot{width:8px;height:8px;border-radius:50%}.connection-dot.connected{background:var(--green);box-shadow:0 0 6px var(--green)}.connection-dot.disconnected{background:var(--red);animation:pulse 1.5s infinite}.connection-text{font-size:11px;color:var(--text-secondary)}.uptime{font-size:11px;color:var(--text-muted);font-family:var(--font-mono)}.stats-row{display:flex;gap:8px;flex-shrink:0}.stat-card{flex:1;text-align:center;padding:8px 6px}.stat-label{font-size:10px;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px;margin-bottom:2px}.stat-value{font-size:24px;font-weight:700;font-family:var(--font-mono);line-height:1.2}.stat-glow{animation:glowPulse 2s infinite}.event-feed{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}.panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;flex-shrink:0}.panel-header h3{font-size:12px;font-weight:600;color:var(--text-secondary);text-transform:uppercase;letter-spacing:.5px}.header-meta{display:flex;align-items:center;gap:10px}.event-counter{font-family:var(--font-mono);font-size:11px;color:var(--text-muted);background:var(--bg-tertiary);padding:1px 8px;border-radius:10px}.filter-chips{display:flex;gap:4px}.event-list{flex:1;overflow-y:auto;font-family:var(--font-mono);font-size:12px}.event-row{display:flex;align-items:center;gap:6px;padding:3px 4px;border-bottom:1px solid rgba(48,54,61,.5);cursor:pointer;min-width:0;transition:background .1s}.event-row:hover{background:var(--bg-tertiary)}.event-anim{animation:slideIn .2s ease-out}.event-tag{font-size:9px;font-weight:700;padding:0 5px;border-radius:3px;background:#f8514926;color:var(--red);white-space:nowrap;flex-shrink:0}.event-tool{color:var(--blue);flex-shrink:0;max-width:130px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.event-detail{color:var(--text-secondary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:1}.event-detail-full{white-space:normal;word-break:break-word}.event-expanded{background:var(--bg-tertiary);border-radius:4px}.scroll-btn{margin-top:6px;font-size:11px;padding:3px 10px;align-self:center}.empty-state{text-align:center;color:var(--text-muted);padding:20px;font-size:13px}.tab-container{flex:1;display:flex;flex-direction:column;min-height:0;background:var(--bg-secondary);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden}.tab-bar{display:flex;gap:0;border-bottom:1px solid var(--border);flex-shrink:0;background:var(--bg-primary)}.tab-btn{border:none;border-radius:0;background:transparent;color:var(--text-secondary);padding:8px 18px;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.5px;border-bottom:2px solid transparent;transition:all .15s;display:flex;align-items:center;gap:6px}.tab-btn:hover{color:var(--text-primary);background:var(--bg-secondary)}.tab-active{color:var(--blue);border-bottom-color:var(--blue);background:var(--bg-secondary)}.tab-count{font-family:var(--font-mono);font-size:10px;padding:0 6px;border-radius:8px;background:var(--bg-tertiary);color:var(--text-muted)}.tab-count-alert{background:var(--red-dim);color:var(--red)}.tab-content{flex:1;overflow-y:auto;padding:12px;min-height:0}.attack-list-full{display:flex;flex-direction:column;gap:6px}.attack-category{border:1px solid var(--bg-tertiary);border-radius:var(--radius);overflow:hidden}.attack-category-header{display:flex;align-items:center;gap:8px;cursor:pointer;padding:8px 10px;font-size:13px;font-weight:600;background:var(--bg-primary);transition:background .1s}.attack-category-header:hover{background:var(--bg-tertiary)}.attack-icon{font-family:var(--font-mono);font-weight:700;font-size:12px;flex-shrink:0}.attack-label{flex:1}.attack-category-count{font-family:var(--font-mono);font-size:11px;padding:0 7px;border-radius:8px;background:var(--bg-tertiary);color:var(--text-secondary)}.collapse-icon{color:var(--text-muted);font-family:var(--font-mono);font-size:12px}.attack-items{padding:4px 10px 8px 28px;font-size:12px;font-family:var(--font-mono)}.attack-item{display:flex;align-items:flex-start;gap:6px;padding:3px 0;border-bottom:1px solid rgba(48,54,61,.3);min-width:0}.attack-item-tool{color:var(--blue);flex-shrink:0}.attack-item-detail{color:var(--text-secondary);word-break:break-word;flex:1;min-width:0}.attack-more{color:var(--text-muted);padding:4px 0;font-size:11px}.table-scroll{flex:1;overflow-y:auto}.hit-bar-bg{height:6px;background:var(--bg-primary);border-radius:3px;overflow:hidden}.hit-bar{height:100%;border-radius:3px;transition:width .3s ease}.audit-full{display:flex;flex-direction:column;gap:8px;height:100%;min-height:0}.audit-controls{display:flex;gap:6px;flex-shrink:0}.audit-controls input{flex:1}.kill-switch-container{display:flex;align-items:center}.kill-btn{background:var(--bg-tertiary);border:1px solid var(--border);padding:4px 14px;font-weight:700;font-size:11px;font-family:var(--font-mono);text-transform:uppercase;letter-spacing:1px}.kill-btn:hover{border-color:var(--red);color:var(--red)}.kill-btn.kill-active{background:var(--red-dim);border-color:var(--red);color:var(--red);animation:pulse 1.5s infinite}.kill-confirm{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--yellow)}.kill-btn-confirm{background:var(--red-dim);border-color:var(--red);color:var(--red);font-weight:700}