@node9/proxy 1.0.14 β†’ 1.0.16

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 CHANGED
@@ -40,6 +40,36 @@ Node9 initiates a **Concurrent Race** across all enabled channels. The first cha
40
40
  - **Cloud (Slack):** Remote asynchronous approval for team governance.
41
41
  - **Terminal:** Classic `[Y/n]` prompt for manual proxy usage and SSH sessions.
42
42
 
43
+ ### πŸ›°οΈ Flight Recorder β€” See Everything, Instantly
44
+
45
+ Node9 records every tool call your AI agent makes in real-time β€” no polling, no log files, no refresh. Two ways to watch:
46
+
47
+ **Browser Dashboard** (`node9 daemon start` β†’ `localhost:7391`)
48
+
49
+ A live 3-column dashboard. The left column streams every tool call as it happens, updating in-place from `● PENDING` to `βœ“ ALLOW` or `βœ— BLOCK`. The center handles pending approvals. The right sidebar controls shields and persistent decisions β€” all without ever causing a browser scrollbar.
50
+
51
+ **Terminal** (`node9 tail`)
52
+
53
+ A split-pane friendly stream for terminal-first developers and SSH sessions:
54
+
55
+ ```bash
56
+ node9 tail # live events only
57
+ node9 tail --history # replay recent history then go live
58
+ node9 tail | grep DLP # filter to DLP blocks only
59
+ ```
60
+
61
+ ```
62
+ πŸ›°οΈ Node9 tail β†’ localhost:7391
63
+ Showing live events. Press Ctrl+C to exit.
64
+
65
+ 21:06:58 πŸ“– Read {"file_path":"src/core.ts"} βœ“ ALLOW
66
+ 21:06:59 πŸ” Grep {"pattern":"authorizeHeadless"} βœ“ ALLOW
67
+ 21:07:01 πŸ’» Bash {"command":"npm run build"} βœ“ ALLOW
68
+ 21:07:04 πŸ’» Bash {"command":"curl … Bearer sk-ant-…"} βœ— BLOCK πŸ›‘οΈ DLP
69
+ ```
70
+
71
+ `node9 tail` auto-starts the daemon if it isn't running β€” no setup step needed.
72
+
43
73
  ### 🧠 AI Negotiation Loop
44
74
 
45
75
  Node9 doesn't just "cut the wire." When a command is blocked, it injects a **Structured Negotiation Prompt** back into the AI's context window. This teaches the AI why it was stopped and instructs it to pivot to a safer alternative.
@@ -99,12 +129,51 @@ Node9 has two layers of protection. You get Layer 1 automatically. Layer 2 is on
99
129
 
100
130
  Built into the binary. Zero configuration required. Protects the tools every developer uses.
101
131
 
102
- | What it protects | Example blocked action |
103
- | :--------------- | :------------------------------------------------------ |
104
- | **Git** | `git push --force`, `git reset --hard`, `git clean -fd` |
105
- | **Shell** | `curl ... \| bash`, `sudo` commands |
106
- | **SQL** | `DELETE` / `UPDATE` without a `WHERE` clause |
107
- | **Filesystem** | `rm -rf` targeting home directory |
132
+ | What it protects | Example blocked action |
133
+ | :---------------- | :------------------------------------------------------ |
134
+ | **Git** | `git push --force`, `git reset --hard`, `git clean -fd` |
135
+ | **Shell** | `curl ... \| bash`, `sudo` commands |
136
+ | **SQL** | `DELETE` / `UPDATE` without a `WHERE` clause |
137
+ | **Filesystem** | `rm -rf` targeting home directory |
138
+ | **Secrets (DLP)** | AWS keys, GitHub tokens, Stripe keys, PEM private keys |
139
+
140
+ ### πŸ” DLP β€” Content Scanner (Always On)
141
+
142
+ Node9 scans **every tool call argument** for secrets before the command reaches your agent. If a credential is detected, Node9 hard-blocks the action, redacts the secret in the audit log, and injects a negotiation prompt telling the AI what went wrong.
143
+
144
+ **Built-in patterns:**
145
+
146
+ | Pattern | Severity | Prefix format |
147
+ | :---------------- | :------- | :-------------------------- |
148
+ | AWS Access Key ID | `block` | `AKIA` + 16 chars |
149
+ | GitHub Token | `block` | `ghp_`, `gho_`, `ghs_` |
150
+ | Slack Bot Token | `block` | `xoxb-` |
151
+ | OpenAI API Key | `block` | `sk-` + 20+ chars |
152
+ | Stripe Secret Key | `block` | `sk_live_` / `sk_test_` |
153
+ | PEM Private Key | `block` | `-----BEGIN PRIVATE KEY---` |
154
+ | Bearer Token | `review` | `Authorization: Bearer ...` |
155
+
156
+ `block` = hard deny, no approval prompt. `review` = routed through the normal race engine for human approval.
157
+
158
+ Secrets are **never logged in full** β€” the audit trail stores only a redacted sample (`AKIA****MPLE`).
159
+
160
+ **Config knobs** (in `node9.config.json` or `~/.node9/config.json`):
161
+
162
+ ```json
163
+ {
164
+ "policy": {
165
+ "dlp": {
166
+ "enabled": true,
167
+ "scanIgnoredTools": true
168
+ }
169
+ }
170
+ }
171
+ ```
172
+
173
+ | Key | Default | Description |
174
+ | :--------------------- | :------ | :----------------------------------------------------------------- |
175
+ | `dlp.enabled` | `true` | Master switch β€” disable to turn off all DLP scanning |
176
+ | `dlp.scanIgnoredTools` | `true` | Also scan tools in `ignoredTools` (e.g. `web_search`, `read_file`) |
108
177
 
109
178
  ### Layer 2 β€” Shields (Opt-in, Per Service)
110
179
 
@@ -215,29 +284,35 @@ Use `node9 explain <tool> <args>` to dry-run any tool call and see exactly which
215
284
 
216
285
  ```json
217
286
  {
287
+ "version": "1.0",
218
288
  "settings": {
219
- "mode": "standard",
289
+ "mode": "audit",
220
290
  "enableUndo": true,
291
+ "flightRecorder": true,
221
292
  "approvalTimeoutMs": 30000,
222
293
  "approvers": {
223
294
  "native": true,
224
295
  "browser": true,
225
- "cloud": true,
296
+ "cloud": false,
226
297
  "terminal": true
227
298
  }
228
299
  }
229
300
  }
230
301
  ```
231
302
 
232
- | Key | Default | Description |
233
- | :------------------- | :----------- | :----------------------------------------------------------- |
234
- | `mode` | `"standard"` | `standard` \| `strict` \| `audit` |
235
- | `enableUndo` | `true` | Take git snapshots before every AI file edit |
236
- | `approvalTimeoutMs` | `0` | Auto-deny after N ms if no human responds (0 = wait forever) |
237
- | `approvers.native` | `true` | OS-native popup |
238
- | `approvers.browser` | `true` | Browser dashboard (`node9 daemon`) |
239
- | `approvers.cloud` | `true` | Slack / SaaS approval |
240
- | `approvers.terminal` | `true` | `[Y/n]` prompt in terminal |
303
+ | Key | Default | Description |
304
+ | :------------------- | :-------- | :------------------------------------------------------------------------------ |
305
+ | `mode` | `"audit"` | `audit` (log-only) \| `standard` (approve/block) \| `strict` (deny by default) |
306
+ | `enableUndo` | `true` | Take git snapshots before every AI file edit |
307
+ | `flightRecorder` | `true` | Record tool call activity to the flight recorder ring buffer for the browser UI |
308
+ | `approvalTimeoutMs` | `30000` | Auto-deny after N ms if no human responds (`0` = wait forever) |
309
+ | `approvers.native` | `true` | OS-native popup |
310
+ | `approvers.browser` | `true` | Browser dashboard (`node9 daemon`) |
311
+ | `approvers.cloud` | `false` | Slack / SaaS approval β€” requires `node9 login`; opt-in only |
312
+ | `approvers.terminal` | `true` | `[Y/n]` prompt in terminal |
313
+
314
+ > **Tip β€” choosing a mode:**
315
+ > Start with the default `audit` to observe what your agent does without blocking anything. Once you understand its behaviour, switch to `standard` (blocks dangerous commands with human approval) or `strict` (denies anything not explicitly allowed) in your `~/.node9/config.json` or project `node9.config.json`.
241
316
 
242
317
  ---
243
318
 
@@ -251,6 +326,7 @@ Use `node9 explain <tool> <args>` to dry-run any tool call and see exactly which
251
326
  | `node9 status` | Show current protection status and active rules |
252
327
  | `node9 doctor` | Health check β€” verifies binaries, config, credentials, and all agent hooks |
253
328
  | `node9 shield <cmd>` | Manage shields (`enable`, `disable`, `list`, `status`) |
329
+ | `node9 tail [--history]` | Stream live agent activity to the terminal (auto-starts daemon if needed) |
254
330
  | `node9 explain <tool> [args]` | Trace the policy waterfall for a given tool call (dry-run, no approval prompt) |
255
331
  | `node9 undo [--steps N]` | Revert the last N AI file edits using shadow Git snapshots |
256
332
  | `node9 check` | Called by agent hooks; evaluates a pending tool call and exits 0 (allow) or 1 (block) |
@@ -299,7 +375,7 @@ Verdict: BLOCK (dangerous word: rm -rf)
299
375
  ## πŸ”§ Troubleshooting
300
376
 
301
377
  **`node9 check` exits immediately / Claude is never blocked**
302
- Node9 fails open by design to prevent breaking your agent. Check debug logs: `NODE9_DEBUG=1 claude`.
378
+ Node9 fails open by design to prevent breaking your agent. Check debug logs: `NODE9_DEBUG=1 claude`. Also verify you are in `standard` or `strict` mode β€” the default `audit` mode approves everything and only logs.
303
379
 
304
380
  **Terminal prompt never appears during Claude/Gemini sessions**
305
381
  Interactive agents run hooks in a "Headless" subprocess. You **must** enable `native: true` or `browser: true` in your config to see approval prompts.
@@ -307,6 +383,9 @@ Interactive agents run hooks in a "Headless" subprocess. You **must** enable `na
307
383
  **"Blocked by Organization (SaaS)"**
308
384
  A corporate policy has locked this action. You must click the "Approve" button in your company's Slack channel to proceed.
309
385
 
386
+ **`node9 tail --history` says "Daemon failed to start" even though the daemon is running**
387
+ This can happen when the daemon's PID file (`~/.node9/daemon.pid`) is missing β€” for example after a crash or a botched restart left a daemon running without a PID file. Node9 now detects this automatically: it performs an HTTP health probe and a live port check before deciding the daemon is gone. If you hit this on an older version, run `node9 daemon stop` then `node9 daemon -b` to create a clean PID file.
388
+
310
389
  ---
311
390
 
312
391
  ## πŸ—ΊοΈ Roadmap
@@ -318,7 +397,8 @@ A corporate policy has locked this action. You must click the "Approve" button i
318
397
  - [x] **Shadow Git Snapshots** (1-click Undo for AI hallucinations)
319
398
  - [x] **Identity-Aware Execution** (Differentiates between Human vs. AI risk levels)
320
399
  - [x] **Shield Templates** (`node9 shield enable <service>` β€” one-click protection for Postgres, GitHub, AWS)
321
- - [ ] **Content Scanner / DLP** (Detect and block secrets like AWS keys and Bearer tokens in-flight)
400
+ - [x] **Content Scanner / DLP** (Detect and block secrets like AWS keys and Bearer tokens in-flight)
401
+ - [x] **Flight Recorder** (Real-time activity stream in browser dashboard and `node9 tail` terminal view)
322
402
  - [ ] **Universal MCP Gateway** (Standalone security tunnel for LangChain, CrewAI, and any agent without native hooks)
323
403
  - [ ] **Cursor & Windsurf Hook** (Native hook support for AI-first IDEs)
324
404
  - [ ] **VS Code Extension** (Approval requests in a native sidebar β€” no more OS popups)