agent-recon 1.0.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 (44) hide show
  1. package/.claude/hooks/send-event-wsl.py +339 -0
  2. package/.claude/hooks/send-event.py +334 -0
  3. package/CHANGELOG.md +66 -0
  4. package/CONTRIBUTING.md +70 -0
  5. package/EULA.md +223 -0
  6. package/INSTALL.md +193 -0
  7. package/LICENSE +287 -0
  8. package/LICENSE-COMMERCIAL +241 -0
  9. package/PRIVACY.md +115 -0
  10. package/README.md +182 -0
  11. package/SECURITY.md +63 -0
  12. package/TERMS.md +233 -0
  13. package/install-service.ps1 +302 -0
  14. package/installer/cli.js +177 -0
  15. package/installer/detect.js +355 -0
  16. package/installer/install.js +195 -0
  17. package/installer/manifest.js +140 -0
  18. package/installer/package.json +12 -0
  19. package/installer/steps/api-keys.js +59 -0
  20. package/installer/steps/directory.js +41 -0
  21. package/installer/steps/env-report.js +48 -0
  22. package/installer/steps/hooks.js +149 -0
  23. package/installer/steps/service.js +159 -0
  24. package/installer/steps/tls.js +104 -0
  25. package/installer/steps/verify.js +117 -0
  26. package/installer/steps/welcome.js +46 -0
  27. package/installer/ui.js +133 -0
  28. package/installer/uninstall.js +233 -0
  29. package/installer/upgrade.js +289 -0
  30. package/package.json +58 -0
  31. package/public/index.html +13953 -0
  32. package/server/fixtures/allowlist-profiles.json +185 -0
  33. package/server/package.json +34 -0
  34. package/server/platform.js +270 -0
  35. package/server/rules/gitleaks.toml +3214 -0
  36. package/server/rules/security.yara +579 -0
  37. package/server/start.js +178 -0
  38. package/service/agent-recon.service +30 -0
  39. package/service/com.agent-recon.server.plist +56 -0
  40. package/setup-linux.sh +259 -0
  41. package/setup-macos.sh +264 -0
  42. package/setup-wsl.sh +248 -0
  43. package/setup.ps1 +171 -0
  44. package/start-agent-recon.bat +4 -0
package/README.md ADDED
@@ -0,0 +1,182 @@
1
+ # Agent Recon™
2
+
3
+ **Real-time observability for AI coding agents.**
4
+
5
+ Monitor every tool call, security event, token cost, and session in real time.
6
+ Know exactly what your AI agent is doing.
7
+
8
+ [![npm](https://img.shields.io/npm/v/agent-recon)](https://www.npmjs.com/package/agent-recon)
9
+ [![License](https://img.shields.io/badge/license-Source--Available-blue)](LICENSE)
10
+ [![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux%20%7C%20WSL-brightgreen)]()
11
+
12
+ 🔒 **Security classification** — regex + LLM-powered risk analysis on every tool call
13
+ 📊 **Token cost tracking** — per-session spend with multi-model support
14
+ 🧠 **AI-powered insights** — prompt coaching, hallucination detection, session narratives
15
+ 🌐 **Cross-platform** — Windows, macOS, Linux, WSL, tmux, VS Code
16
+ 🔌 **Agent-agnostic architecture** — Claude Code v1, Cursor/Copilot/Windsurf in v1.1
17
+
18
+ → **[View landing page](https://www.agent-recon.net)** | **[Installation guide](INSTALL.md)** | **[Pricing](https://www.agent-recon.net#pricing)**
19
+
20
+ ## Quick Start
21
+
22
+ ### Option A — Install via npm
23
+
24
+ ```bash
25
+ npm install -g agent-recon
26
+ agent-recon install
27
+ ```
28
+
29
+ The guided installer detects your platform, registers hooks, and starts the server.
30
+ See [INSTALL.md](INSTALL.md) for prerequisites, troubleshooting, and alternative methods.
31
+
32
+ ### Option B — From source
33
+
34
+ ```bash
35
+ cd server && npm install && cd ..
36
+ node server/start.js
37
+ ```
38
+
39
+ ### Open the dashboard
40
+ Visit **http://localhost:3131** in your browser.
41
+
42
+ ### Start Claude Code
43
+ Run any `claude` command from this project directory. Hook events will stream to the dashboard instantly.
44
+
45
+ ---
46
+
47
+ ## How It Works
48
+
49
+ ```
50
+ Claude Code Agent(s)
51
+ │ hook fires → stdin JSON
52
+
53
+ .claude/hooks/send-event.py ──HTTP POST──▶ server/server.js (port 3131)
54
+
55
+ WebSocket broadcast
56
+
57
+ public/index.html (browser)
58
+ icons · sounds · live feed
59
+ ```
60
+
61
+ Every hook registered in `.claude/settings.json` is wired to `send-event.py`, which runs asynchronously (never blocking Claude) and forwards the payload to the local server. The server stores up to 1 000 events in memory and fans them out to every connected browser tab via WebSocket. Late-joining tabs receive the full event history on connect.
62
+
63
+ ---
64
+
65
+ ## Event Categories & Sounds
66
+
67
+ | Icon | Category | Hook Events | Sound |
68
+ |------|----------|-------------|-------|
69
+ | 🚀 | Session | SessionStart, SessionEnd | Rising arpeggio / falling tone |
70
+ | 💬 | Prompt | UserPromptSubmit | Soft ping |
71
+ | ⚡ | Bash | PreToolUse (Bash) | Quick click |
72
+ | ✍️ | Write | PreToolUse (Write) | Soft click |
73
+ | ✏️ | Edit | PreToolUse (Edit/MultiEdit) | Soft click |
74
+ | 👁️ | Read | PreToolUse (Read) | Soft click |
75
+ | 🔍 | Search | PreToolUse (Glob/Grep) | Soft click |
76
+ | 🌐 | Web | PreToolUse (WebFetch/WebSearch) | Soft click |
77
+ | 🔧 | Tool | PreToolUse (other) | Soft click |
78
+ | ✅ | Done | PostToolUse | Short positive beep |
79
+ | ❌ | Failure | PostToolUseFailure | Low buzz |
80
+ | 🤖 | Subagent | SubagentStart, SubagentStop | Spawn/resolve chime |
81
+ | 🔔 | Notify | Notification | Bell tone |
82
+ | 🏆 | Complete | Stop, TaskCompleted | Success chord |
83
+ | ⚠️ | Idle | TeammateIdle | Pulsed alert |
84
+ | 🗜️ | Compact | PreCompact | Soft tone |
85
+
86
+ ---
87
+
88
+ ## Dashboard Features
89
+
90
+ - **Timeline view** — chronological feed, newest at top with slide-in animation
91
+ - **Swimlane view** — one column per `session_id` for multi-agent observation
92
+ - **Category filter** — click any badge in the stats bar to isolate a category
93
+ - **Session filter** — dropdown to focus on a single agent session
94
+ - **Sound controls** — mute toggle + volume slider; all tones synthesized via Web Audio API (no audio files)
95
+ - **Expandable cards** — click any card to reveal the full raw JSON payload
96
+ - **Auto-reconnect** — dashboard reconnects automatically if the server restarts
97
+ - **History on join** — opening a new tab replays all stored events immediately
98
+
99
+ ---
100
+
101
+ ## Windows Notes
102
+
103
+ The hook command in `.claude/settings.json` is:
104
+ ```
105
+ python .claude/hooks/send-event.py
106
+ ```
107
+ If `python` is not on your PATH, replace it with the full path to your Python 3 executable, e.g.:
108
+ ```
109
+ C:\Python312\python.exe .claude/hooks/send-event.py
110
+ ```
111
+ The forwarder uses only Python standard library modules — no `pip install` required.
112
+
113
+ ---
114
+
115
+ ## WSL + tmux Support
116
+
117
+ Claude Code running inside WSL (including inside a **tmux** session) can stream events to the same dashboard.
118
+
119
+ ### How it works
120
+
121
+ ```
122
+ WSL tmux session
123
+ Claude Code Agent
124
+ │ hook fires → stdin JSON
125
+
126
+ ~/.claude/hooks/send-event-wsl.py ──HTTP POST──▶ Windows host IP:3131
127
+
128
+ (same server.js)
129
+
130
+ browser dashboard
131
+ ```
132
+
133
+ Events from WSL show a green **WSL** badge in the dashboard so you can distinguish them from Windows-side sessions.
134
+
135
+ ### Quick Setup
136
+
137
+ **1 — On Windows**, start the Agent Recon™ server as usual:
138
+ ```powershell
139
+ cd C:\ProjectGreatLoop\agent-recon\server
140
+ node start.js
141
+ ```
142
+
143
+ **2 — Inside WSL**, run the setup script once:
144
+ ```bash
145
+ bash /mnt/c/ProjectGreatLoop/agent-recon/setup-wsl.sh
146
+ ```
147
+
148
+ This script:
149
+ - Copies `send-event-wsl.py` to `~/.claude/hooks/`
150
+ - Creates `~/.claude/settings.json` with all 13 hook registrations
151
+ - Verifies the Windows host is reachable
152
+
153
+ **3 — Start Claude** in any WSL directory (plain shell or tmux):
154
+ ```bash
155
+ tmux new-session -s work
156
+ claude
157
+ ```
158
+
159
+ Events will stream to `http://localhost:3131` on Windows immediately.
160
+
161
+ ### How the WSL forwarder finds the Windows host
162
+
163
+ It reads the `nameserver` from `/etc/resolv.conf` (the WSL2 virtual gateway). If that fails it falls back to `ip route show default`. The server accepts connections from all RFC 1918 private ranges (10.x, 172.16-31.x, 192.168.x) in addition to loopback.
164
+
165
+ ---
166
+
167
+ ## File Structure
168
+
169
+ ```
170
+ ├── .claude/
171
+ │ ├── hooks/
172
+ │ │ ├── send-event.py # Windows hook forwarder (stdlib only)
173
+ │ │ └── send-event-wsl.py # WSL hook forwarder (auto-detects host IP)
174
+ │ └── settings.json # Hook registrations for Windows Claude
175
+ ├── server/
176
+ │ ├── package.json
177
+ │ └── server.js # Express HTTP + WebSocket server (port 3131)
178
+ ├── public/
179
+ │ └── index.html # Single-file dashboard SPA
180
+ ├── setup-wsl.sh # One-time WSL setup script
181
+ └── README.md
182
+ ```
package/SECURITY.md ADDED
@@ -0,0 +1,63 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a Vulnerability
4
+
5
+ **Do NOT open a public GitHub issue for security vulnerabilities.**
6
+
7
+ Please report vulnerabilities by email to **security@agent-recon.net**. Include as much detail as
8
+ possible: affected component, reproduction steps, potential impact, and any suggested fixes.
9
+
10
+ A PGP key is available upon request for encrypted communication.
11
+
12
+ ## Response Commitments
13
+
14
+ | Stage | Timeline |
15
+ |-------|----------|
16
+ | Acknowledge receipt | Within 24 hours |
17
+ | Triage and severity assessment | Within 72 hours |
18
+ | Coordinated disclosure window | 90 days from initial report |
19
+
20
+ Professional tier license holders receive priority triage for security reports.
21
+
22
+ ## Scope
23
+
24
+ The following vulnerability classes are in scope:
25
+
26
+ - Remote code execution (RCE)
27
+ - SQL injection (SQLite)
28
+ - Credential exposure (API keys, license keys, secrets in logs)
29
+ - Authentication / authorization bypass
30
+ - Cross-site scripting (XSS) in the dashboard
31
+ - Hook script injection (malicious payloads via event data)
32
+ - WebSocket hijacking or unauthorized access
33
+ - SQLite database corruption via crafted events
34
+
35
+ ## Out of Scope
36
+
37
+ - Social engineering attacks against maintainers or users
38
+ - Denial-of-service against the localhost-only service
39
+ - Issues requiring physical access to the machine
40
+ - UI cosmetic issues (layout, styling, typos)
41
+ - Vulnerabilities in third-party dependencies (please report these upstream to the relevant project)
42
+
43
+ ## Coordinated Disclosure
44
+
45
+ We follow a 90-day coordinated disclosure policy:
46
+
47
+ 1. Reporter sends vulnerability details to security@agent-recon.net.
48
+ 2. We acknowledge within 24 hours and triage within 72 hours.
49
+ 3. We work on a fix and coordinate a release timeline with the reporter.
50
+ 4. After the fix is released (or after 90 days, whichever comes first), the reporter may publicly
51
+ disclose the vulnerability.
52
+ 5. We will credit the reporter in the release notes unless they prefer to remain anonymous.
53
+
54
+ ## Credit
55
+
56
+ Reporters who follow this responsible disclosure process will be credited by name (or handle) in the
57
+ release notes for the version containing the fix. If you prefer anonymity, let us know in your
58
+ initial report.
59
+
60
+ ## Related Documents
61
+
62
+ - [SECURITY-AUDIT.md](SECURITY-AUDIT.md) -- Security audit results and findings
63
+ - [SECURITY-RULES.md](SECURITY-RULES.md) -- Security rule definitions and classification
package/TERMS.md ADDED
@@ -0,0 +1,233 @@
1
+ # Agent Recon™ — Terms of Service
2
+
3
+ **Effective Date:** March 2026
4
+ **Provider:** PNW Great Loop LLC
5
+ **Product:** Agent Recon™
6
+
7
+ ---
8
+
9
+ > Agent Recon™ is an independent product and is not affiliated with, endorsed
10
+ > by, or sponsored by Anthropic PBC. Claude, Claude Code, and the Anthropic
11
+ > name and logo are trademarks of Anthropic PBC. Agent Recon™ is a trademark
12
+ > of PNW Great Loop LLC.
13
+
14
+ ---
15
+
16
+ ## 1. Acceptance of Terms
17
+
18
+ By purchasing a license, creating an account, or using any paid features of
19
+ Agent Recon™ ("Service"), you ("Customer") agree to these Terms of Service
20
+ ("Terms"). These Terms apply to all paid transactions processed through the
21
+ Agent Recon™ storefront. Use of the free Community tier is governed by the
22
+ End User License Agreement (EULA.md).
23
+
24
+ ## 2. Service Description
25
+
26
+ Agent Recon™ is a locally-installed observability dashboard for AI coding
27
+ agent sessions. The Service includes:
28
+ - Software distributed via npm and direct download
29
+ - License key provisioning and validation
30
+ - Software updates during the subscription period
31
+ - Priority support (Professional tier)
32
+
33
+ The Service does NOT include:
34
+ - LLM API access (the Customer supplies their own API key(s))
35
+ - Hosting or cloud infrastructure (the software runs locally)
36
+ - Guaranteed uptime for the license validation endpoint (graceful offline
37
+ degradation is built in)
38
+
39
+ ## 3. Payment Processor
40
+
41
+ All payments are processed by Lemonsqueezy (or a successor payment processor
42
+ designated by the Provider). By making a purchase, the Customer also agrees
43
+ to Lemonsqueezy's terms of service and privacy policy.
44
+
45
+ The Provider does not directly store credit card numbers, bank account
46
+ details, or other payment credentials. All payment data is handled by
47
+ the payment processor.
48
+
49
+ ## 4. Pricing and Billing
50
+
51
+ ### 4.1 Current Pricing
52
+
53
+ | Tier | Monthly | Annual | Annual Savings |
54
+ |------|---------|--------|----------------|
55
+ | Personal | $9.99/month | $84/year | 30% |
56
+ | Professional | $29/month | $279/year | 20% |
57
+
58
+ Prices are in US dollars (USD) and exclude applicable taxes.
59
+
60
+ ### 4.2 Billing Cycle
61
+
62
+ - **Monthly subscriptions** are billed on the same day each month.
63
+ - **Annual subscriptions** are billed on the same date each year.
64
+ - Billing begins on the date of purchase.
65
+
66
+ ### 4.3 Auto-Renewal
67
+
68
+ Subscriptions automatically renew at the end of each billing cycle unless
69
+ cancelled before the renewal date. The Customer will be charged the
70
+ then-current price at renewal.
71
+
72
+ ### 4.4 Price Changes
73
+
74
+ The Provider may change pricing at any time. Price changes take effect at
75
+ the next renewal cycle, not mid-cycle. The Provider will notify the Customer
76
+ of price changes at least thirty (30) days before the renewal date via:
77
+ - Email to the address associated with the Customer's account, AND
78
+ - A notice in the Software's update mechanism or on the Provider's website
79
+
80
+ If the Customer does not agree to the new pricing, they may cancel before
81
+ the next renewal date.
82
+
83
+ ## 5. Refund Policy
84
+
85
+ ### 5.1 Fourteen-Day Money-Back Guarantee
86
+
87
+ The Customer may request a full refund within fourteen (14) days of the
88
+ initial purchase date, no questions asked. This applies to both monthly
89
+ and annual subscriptions.
90
+
91
+ ### 5.2 Refund Process
92
+
93
+ To request a refund, contact license@agent-recon.net with the order number
94
+ or license key. Refunds are processed through the original payment method
95
+ within five (5) to ten (10) business days.
96
+
97
+ ### 5.3 Renewal Refunds
98
+
99
+ Refunds for auto-renewal charges may be requested within seven (7) days of
100
+ the renewal charge date.
101
+
102
+ ### 5.4 Exceptions
103
+
104
+ Refunds are not available:
105
+ - After the applicable refund period has expired
106
+ - If the license key has been shared with or transferred to another party
107
+ - For complimentary (free) license keys
108
+
109
+ ## 6. Subscription Cancellation
110
+
111
+ ### 6.1 How to Cancel
112
+
113
+ The Customer may cancel at any time through:
114
+ - The account dashboard on the Provider's website
115
+ - Email to license@agent-recon.net
116
+
117
+ ### 6.2 Effect of Cancellation
118
+
119
+ - **Monthly subscriptions:** Access continues until the end of the current
120
+ billing period. No further charges are made.
121
+ - **Annual subscriptions:** Access continues until the end of the annual
122
+ billing period. No partial refunds are issued for unused months beyond
123
+ the 14-day refund window.
124
+ - Upon expiration, the installation reverts to Community tier functionality.
125
+ No Customer data is deleted.
126
+
127
+ ### 6.3 Reactivation
128
+
129
+ A cancelled subscription may be reactivated at any time by purchasing a new
130
+ license. The previously cached license key will be replaced.
131
+
132
+ ## 7. Taxes
133
+
134
+ The Customer is responsible for all applicable taxes (sales tax, VAT, GST,
135
+ or other taxes) imposed by their jurisdiction. The payment processor may
136
+ collect and remit taxes where required by law. Displayed prices may or may
137
+ not include tax depending on the Customer's location.
138
+
139
+ ## 8. Data Handling
140
+
141
+ ### 8.1 Local Data
142
+
143
+ Agent Recon™ runs locally on the Customer's machine. All session data, event
144
+ logs, and LLM analysis results are stored in a local SQLite database on the
145
+ Customer's machine. The Provider does not have access to this data.
146
+
147
+ ### 8.2 Telemetry Data
148
+
149
+ The optional telemetry system collects minimal, non-identifying data as
150
+ described in PRIVACY.md. The Customer may opt out at any time.
151
+
152
+ ### 8.3 Payment Data
153
+
154
+ Payment and account data is handled by the payment processor (Lemonsqueezy)
155
+ and is subject to their privacy policy. The Provider stores only:
156
+ - Email address (for license key delivery and support)
157
+ - License key and tier information
158
+ - Transaction history (dates, amounts, invoice numbers)
159
+
160
+ ### 8.4 Data Deletion
161
+
162
+ The Customer may request deletion of their account and associated data by
163
+ contacting license@agent-recon.net. Telemetry data can be deleted via the
164
+ self-service data deletion endpoint (see PRIVACY.md).
165
+
166
+ ## 9. Account Security
167
+
168
+ The Customer is responsible for maintaining the confidentiality of their
169
+ license key. The Customer must notify the Provider promptly if they become
170
+ aware of unauthorized use of their license key.
171
+
172
+ ## 10. Intellectual Property
173
+
174
+ Agent Recon™, including its name, logo, documentation, and software, is the
175
+ intellectual property of PNW Great Loop LLC. These Terms do not grant any
176
+ rights to the Provider's trademarks or intellectual property except the
177
+ limited license to use the Software as described in the EULA.
178
+
179
+ ## 11. Disclaimer of Warranties
180
+
181
+ THE SERVICE IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY
182
+ KIND. THE PROVIDER DOES NOT WARRANT THAT THE SERVICE WILL BE UNINTERRUPTED,
183
+ ERROR-FREE, OR SECURE. SEE THE EULA (SECTION 8) FOR THE COMPLETE WARRANTY
184
+ DISCLAIMER.
185
+
186
+ ## 12. Limitation of Liability
187
+
188
+ THE PROVIDER'S TOTAL AGGREGATE LIABILITY ARISING OUT OF OR RELATED TO THESE
189
+ TERMS SHALL NOT EXCEED THE AMOUNT PAID BY THE CUSTOMER IN THE TWELVE (12)
190
+ MONTHS PRECEDING THE CLAIM. SEE THE EULA (SECTION 9) FOR THE COMPLETE
191
+ LIABILITY LIMITATION.
192
+
193
+ ## 13. Indemnification
194
+
195
+ The Customer agrees to indemnify and hold harmless PNW Great Loop LLC from
196
+ any claims, damages, losses, or expenses (including reasonable attorney fees)
197
+ arising from the Customer's use of the Service or violation of these Terms.
198
+
199
+ ## 14. Modifications to Terms
200
+
201
+ The Provider may update these Terms at any time. Material changes will be
202
+ communicated at least thirty (30) days in advance via email or the Provider's
203
+ website. Continued use of the Service after changes take effect constitutes
204
+ acceptance of the revised Terms.
205
+
206
+ ## 15. Governing Law
207
+
208
+ These Terms shall be governed by and construed in accordance with the laws
209
+ of the State of Washington, United States, without regard to its conflict of
210
+ law provisions. Any dispute shall be resolved in the state or federal courts
211
+ located in Washington State.
212
+
213
+ ## 16. Severability
214
+
215
+ If any provision of these Terms is held to be unenforceable or invalid,
216
+ that provision shall be modified to the minimum extent necessary, and the
217
+ remaining provisions shall continue in full force.
218
+
219
+ ## 17. Entire Agreement
220
+
221
+ These Terms, together with the EULA, LICENSE, LICENSE-COMMERCIAL, and
222
+ PRIVACY.md, constitute the entire agreement between the parties regarding
223
+ the Service.
224
+
225
+ ## 18. Contact
226
+
227
+ PNW Great Loop LLC
228
+ Email: license@agent-recon.net
229
+ Web: https://www.agent-recon.net
230
+
231
+ ---
232
+
233
+ *Attorney review recommended before commercial distribution.*