@node9/proxy 1.5.3 → 1.5.4
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 +56 -14
- package/dist/cli.js +665 -357
- package/dist/cli.mjs +660 -352
- package/dist/index.js +53 -10
- package/dist/index.mjs +53 -10
- package/package.json +6 -5
package/README.md
CHANGED
|
@@ -507,19 +507,60 @@ Use `node9 explain <tool> <args>` to dry-run any tool call and see exactly which
|
|
|
507
507
|
}
|
|
508
508
|
```
|
|
509
509
|
|
|
510
|
-
| Key | Default | Description
|
|
511
|
-
| :------------------- | :-------- |
|
|
512
|
-
| `mode` | `"audit"` | `audit`
|
|
513
|
-
| `enableUndo` | `true` | Take git snapshots before every AI file edit
|
|
514
|
-
| `flightRecorder` | `true` | Record tool call activity to the flight recorder ring buffer for the browser UI
|
|
515
|
-
| `approvalTimeoutMs` | `30000` | Auto-deny after N ms if no human responds (`0` = wait forever)
|
|
516
|
-
| `approvers.native` | `true` | OS-native popup
|
|
517
|
-
| `approvers.browser` | `true` | Browser dashboard (`node9 daemon`)
|
|
518
|
-
| `approvers.cloud` | `false` | Slack / SaaS approval — requires `node9 login`; opt-in only
|
|
519
|
-
| `approvers.terminal` | `true` | `[Y/n]` prompt in terminal
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
510
|
+
| Key | Default | Description |
|
|
511
|
+
| :------------------- | :-------- | :-------------------------------------------------------------------------------------------- |
|
|
512
|
+
| `mode` | `"audit"` | `audit` \| `observe` \| `standard` \| `strict` — see [Security Modes](#-security-modes) below |
|
|
513
|
+
| `enableUndo` | `true` | Take git snapshots before every AI file edit |
|
|
514
|
+
| `flightRecorder` | `true` | Record tool call activity to the flight recorder ring buffer for the browser UI |
|
|
515
|
+
| `approvalTimeoutMs` | `30000` | Auto-deny after N ms if no human responds (`0` = wait forever) |
|
|
516
|
+
| `approvers.native` | `true` | OS-native popup |
|
|
517
|
+
| `approvers.browser` | `true` | Browser dashboard (`node9 daemon`) |
|
|
518
|
+
| `approvers.cloud` | `false` | Slack / SaaS approval — requires `node9 login`; opt-in only |
|
|
519
|
+
| `approvers.terminal` | `true` | `[Y/n]` prompt in terminal |
|
|
520
|
+
|
|
521
|
+
## 🔒 Security Modes
|
|
522
|
+
|
|
523
|
+
| Mode | Blocks? | Runs rules? | Use when |
|
|
524
|
+
| :--------- | :------ | :---------- | :--------------------------------------------------------------------------- |
|
|
525
|
+
| `audit` | Never | No | You want a log of every tool call but never want node9 to interfere |
|
|
526
|
+
| `observe` | Never | Yes | New install — see what _would_ have been blocked before enabling enforcement |
|
|
527
|
+
| `standard` | Yes | Yes | Normal use — dangerous commands need human approval |
|
|
528
|
+
| `strict` | Yes | Yes | High-security — anything not explicitly allowed is denied |
|
|
529
|
+
|
|
530
|
+
**`audit` vs `observe`:** Both never block. The difference is that `audit` skips the policy pipeline entirely (zero overhead, pure logging), while `observe` runs smart rules and DLP in full — recording each `would-block` decision without acting on it. The HUD shows `⚠ N would-block` in observe mode so you can see what enforcement would look like in practice.
|
|
531
|
+
|
|
532
|
+
**Recommended path:** start on `observe` for a few days to build confidence, then switch to `standard`.
|
|
533
|
+
|
|
534
|
+
---
|
|
535
|
+
|
|
536
|
+
## 🛡️ Security Statusline (HUD)
|
|
537
|
+
|
|
538
|
+
When Claude Code is detected, `node9 init` automatically adds a **security statusline** to Claude Code's terminal UI. You can also add it manually:
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
node9 setup hud # add to ~/.claude/settings.json
|
|
542
|
+
node9 setup hud --remove
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
The HUD renders up to three lines below Claude Code's prompt:
|
|
546
|
+
|
|
547
|
+
```
|
|
548
|
+
🛡 node9 | standard | ✅ 14 allowed 🛑 1 blocked ⚡ require-tests-before-deploy
|
|
549
|
+
claude-opus-4-5 │ ctx ████████░░ 82% │ 5h ██████░░░░ 61% (43m left)
|
|
550
|
+
2 CLAUDE.md | 5 rules | 3 MCPs | 2 hooks
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
| Segment | Source | Notes |
|
|
554
|
+
| :----------------- | :-------------------------- | :------------------------------------------------------- |
|
|
555
|
+
| `standard` | daemon: current mode | changes colour in `strict` (red) and `observe` (magenta) |
|
|
556
|
+
| `✅ N allowed` | daemon: session counters | resets when the daemon restarts |
|
|
557
|
+
| `🛑 N blocked` | daemon: session counters | shown in red when > 0 |
|
|
558
|
+
| `⚠ N would-block` | daemon: session counters | shown instead of blocked/allowed in `observe` mode |
|
|
559
|
+
| `⚡ rule-name` | daemon: last smart rule hit | most recent rule that fired |
|
|
560
|
+
| Context bar | Claude Code stdin | token usage and rate limit windows |
|
|
561
|
+
| Environment counts | local config files | CLAUDE.md / rules / MCPs / hooks active in this project |
|
|
562
|
+
|
|
563
|
+
When the daemon is not running the HUD shows `🛡 node9 | offline` instead of an error.
|
|
523
564
|
|
|
524
565
|
---
|
|
525
566
|
|
|
@@ -529,7 +570,8 @@ Use `node9 explain <tool> <args>` to dry-run any tool call and see exactly which
|
|
|
529
570
|
| :----------------------------------- | :------------------------------------------------------------------------------------ |
|
|
530
571
|
| `node9 setup` | Interactive menu — detects installed agents and wires hooks for you |
|
|
531
572
|
| `node9 addto <agent>` | Wire hooks for a specific agent (`claude`, `gemini`, `cursor`) |
|
|
532
|
-
| `node9
|
|
573
|
+
| `node9 setup hud` | Add the node9 security statusline to Claude Code (also done automatically by `init`) |
|
|
574
|
+
| `node9 init` | Create default config, wire detected agents, and set up the HUD |
|
|
533
575
|
| `node9 status` | Show current protection status and active rules |
|
|
534
576
|
| `node9 doctor` | Health check — verifies binaries, config, credentials, and all agent hooks |
|
|
535
577
|
| `node9 shield <cmd>` | Manage shields (`enable`, `disable`, `list`, `status`) |
|