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/CHANGELOG.md ADDED
@@ -0,0 +1,66 @@
1
+ # Changelog
2
+
3
+ All notable changes to Agent Recon will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.1] - 2026-04-03
9
+
10
+ ### Changed
11
+
12
+ - Server code bundled into single minified file for IP protection (esbuild)
13
+ - npm tarball reduced from 84 to 44 files
14
+ - Dynamic LLM provider loading replaced with static mapping for bundle compatibility
15
+
16
+ ### Fixed
17
+
18
+ - npm publish step added to release workflow (was missing, caused E404 for users)
19
+ - .npmignore gaps: excluded internal test procedures, hardware analysis, build tools, CLA
20
+
21
+ ## [1.0.0] - 2026-04-03
22
+
23
+ ### Added
24
+
25
+ - Real-time event feed with WebSocket streaming from Claude Code hook scripts
26
+ - Multi-environment support (Windows, macOS, Linux, WSL, VS Code, tmux)
27
+ - Scrolling waveform timeline canvas with per-session swimlanes
28
+ - Security classification engine (browser-side regex + server-side YARA-X rules)
29
+ - LLM-powered security chain analysis with context-aware risk calibration
30
+ - Token cost tracking with Usage API polling and per-session breakdowns
31
+ - Per-session AI-generated insights and prompt quality coaching
32
+ - Hallucination risk scoring (two-tier: direct evidence + circumstantial signals)
33
+ - Environment recommendations based on 7-day rolling analysis
34
+ - Session history narratives with LLM-generated title and detail summaries
35
+ - Session labels with project-aware naming (<project>:<hex> format)
36
+ - Multi-provider LLM abstraction (Anthropic fully implemented; OpenAI, Google stubs)
37
+ - Per-pipeline provider and model configuration via settings
38
+ - Cross-platform installer CLI (detect, install, upgrade, uninstall)
39
+ - OS-native credential storage (DPAPI, Keychain, libsecret, PBKDF2 fallback)
40
+ - AES-256-GCM encrypted settings for API keys at rest
41
+ - AES-256 encrypted session archives
42
+ - PII detection and automatic redaction before storage
43
+ - Privacy-respecting telemetry with opt-out and self-service data deletion
44
+ - OpenTelemetry export (OTLP/HTTP for logs, traces, metrics)
45
+ - Browser-trusted TLS via mkcert (HTTP / mkcert / custom certificate modes)
46
+ - Three-tier licensing (Community, Personal, Professional) via Lemonsqueezy
47
+ - Feature gating with upgrade overlays for LLM-powered features
48
+ - Landing page (agent-recon.net) and storefront integration
49
+ - Azure telemetry backend with admin dashboard and compliance review workflow
50
+ - In-app documentation modal with tabbed sections
51
+ - Comprehensive developer documentation (API reference, architecture, database schema)
52
+ - Cross-platform CI (Ubuntu, Windows, macOS Intel/ARM, Docker matrix)
53
+ - Platform-aware setup scripts and service templates (launchd, systemd, NSSM)
54
+ - Homebrew and Scoop package manager templates
55
+
56
+ ### Security
57
+
58
+ - Server-side PII scanning with confidence-scored regex detection and redaction
59
+ - YARA-X rule-based security classification of tool calls and events
60
+ - Gitleaks-compatible secret detection configuration
61
+ - IP allowlist restricting server connections to private network ranges (127.x, 10.x, 172.16-31.x, 192.168.x)
62
+ - HMAC-SHA256 webhook signature verification for Lemonsqueezy events
63
+ - Azure deployment with managed identity, Key Vault, VNet, and firewall hardening
64
+
65
+ [1.0.1]: https://github.com/genxcoder1999/agent-recon/releases/tag/v1.0.1
66
+ [1.0.0]: https://github.com/genxcoder1999/agent-recon/releases/tag/v1.0.0
@@ -0,0 +1,70 @@
1
+ # Contributing to Agent Recon™
2
+
3
+ Thank you for your interest in contributing to Agent Recon™!
4
+
5
+ ## Contributor License Agreement (CLA)
6
+
7
+ Before we can accept your contribution, you must sign our
8
+ [Contributor License Agreement](CLA.md). When you open your first pull
9
+ request, the CLA Assistant bot will prompt you to sign electronically.
10
+ You only need to sign once.
11
+
12
+ **Why a CLA?** Agent Recon™ uses an open-core model: core components are
13
+ Apache 2.0, while some components are proprietary. The CLA ensures PNW Great
14
+ Loop LLC can maintain both licenses. Your contributions to Apache 2.0 core
15
+ remain Apache 2.0.
16
+
17
+ ## What Can I Contribute To?
18
+
19
+ Contributions are welcome to **Apache 2.0-licensed core components** (see
20
+ LICENSE for the full list). These include:
21
+
22
+ - Event ingestion server and SQLite layer
23
+ - Regex security engine
24
+ - Dashboard UI (feed, waveform, stats, filters)
25
+ - Token cost tracking
26
+ - Build system and hook scripts
27
+ - Setup scripts (all platforms)
28
+ - Tests (all test suites)
29
+
30
+ Contributions to proprietary components (LLM pipelines, telemetry, installer)
31
+ are generally not accepted via open PRs. If you have ideas for those areas,
32
+ please open an issue to discuss.
33
+
34
+ ## How to Contribute
35
+
36
+ 1. **Fork** the repository and create a feature branch from `main`
37
+ 2. **Make your changes** — follow the existing code style
38
+ 3. **Add tests** — every change must include tests (see CLAUDE.md > Testing Policy)
39
+ 4. **Run tests** before submitting:
40
+ ```bash
41
+ cd server
42
+ npm run test:unit && npm run test:fe
43
+ ```
44
+ 5. **Run the build** if you modified `src/` files:
45
+ ```bash
46
+ node build.js
47
+ ```
48
+ 6. **Open a pull request** against `main` with a clear description of the change
49
+
50
+ ## Code Style
51
+
52
+ - No framework dependencies in the frontend (vanilla JS, single-file SPA)
53
+ - Tests use `node:test` and `node:assert` (Node 22+ built-ins, no test framework)
54
+ - LF line endings for `.py` and `.sh` files
55
+ - See CLAUDE.md for the full developer guide
56
+
57
+ ## Reporting Issues
58
+
59
+ Open a GitHub issue with:
60
+ - Steps to reproduce
61
+ - Expected vs. actual behavior
62
+ - Platform info (OS, terminal, shell, Node.js version)
63
+
64
+ ## Code of Conduct
65
+
66
+ Be respectful and constructive. We're building something useful together.
67
+
68
+ ---
69
+
70
+ Questions? Email contribute@agent-recon.net
package/EULA.md ADDED
@@ -0,0 +1,223 @@
1
+ # Agent Recon™ — End User License Agreement (EULA)
2
+
3
+ **Effective Date:** March 2026
4
+ **Licensor:** 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. Agreement to Terms
17
+
18
+ By installing, copying, or otherwise using Agent Recon™ ("Software"), you
19
+ ("User") agree to be bound by the terms of this End User License Agreement
20
+ ("EULA"). If you do not agree, do not install or use the Software.
21
+
22
+ This EULA governs the entire Agent Recon™ distribution, which includes both
23
+ open-source core components (licensed under Apache License 2.0 — see LICENSE)
24
+ and proprietary components (licensed under a commercial license — see
25
+ LICENSE-COMMERCIAL). The terms below apply to the Software as a whole, including
26
+ the interaction between open-source and proprietary components.
27
+
28
+ ## 2. License Tiers
29
+
30
+ Agent Recon™ is available under three license tiers:
31
+
32
+ ### 2.1 Community Tier (Free)
33
+
34
+ - **Price:** Free forever
35
+ - **Permitted use:** Individual developers for personal, non-commercial
36
+ development projects
37
+ - **Features included:**
38
+ - Real-time event feed and WebSocket streaming
39
+ - Token cost tracking and Usage API integration
40
+ - Regex-based security classifications
41
+ - Dashboard UI (waveform timeline, statistics, filters, session management)
42
+ - Hook scripts for Claude Code event capture
43
+ - 7-day data retention
44
+ - **Features not included (require paid license):**
45
+ - LLM-powered security chain analysis
46
+ - LLM-powered session insights and coaching
47
+ - LLM-powered hallucination scoring
48
+ - LLM-powered environment recommendations
49
+ - LLM-powered prompt quality analysis
50
+ - Session history narratives
51
+ - OTEL export
52
+ - Encrypted archives
53
+ - Multi-environment support
54
+ - Extended data retention (up to 90 days)
55
+ - **Restrictions:** The Community tier may not be redistributed as part of a
56
+ commercial product or service.
57
+
58
+ ### 2.2 Personal Tier ($9.99/month or $84/year)
59
+
60
+ - **Price:** $9.99 per month, or $84 per year (30% annual savings)
61
+ - **Permitted use:** Individual developers purchasing with personal funds for
62
+ full-featured use
63
+ - **Features:** All features, including all LLM-powered analysis, extended
64
+ retention, OTEL export, encrypted archives, and multi-environment support
65
+ - **Purchase requirement:** Must be purchased with the User's own personal
66
+ funds. The Personal tier may NOT be purchased by, reimbursed by, or expensed
67
+ to an employer, client, or other business entity.
68
+ - **License scope:** Single individual, any number of personal machines
69
+
70
+ ### 2.3 Professional Tier ($29/month or $279/year)
71
+
72
+ - **Price:** $29 per month, or $279 per year (20% annual savings)
73
+ - **Permitted use:** Developers whose use occurs in an employment, contractor,
74
+ or commercial context, OR whose license is purchased or reimbursed by a
75
+ business entity
76
+ - **Features:** All features (identical to Personal tier), plus:
77
+ - Invoice billing
78
+ - Priority support
79
+ - **Required when:**
80
+ - Use is in connection with employment or paid contracting
81
+ - Purchase is made by or reimbursed by an employer or client
82
+ - Use supports revenue-generating commercial activities
83
+ - **License scope:** Single individual, any number of work machines
84
+
85
+ ## 3. LLM API Keys and Third-Party Services
86
+
87
+ Agent Recon™ does not provide LLM API access. The User supplies their own API
88
+ key(s) from any supported LLM provider (Anthropic, OpenAI, Google, or others).
89
+
90
+ - The User is solely responsible for all costs associated with LLM API usage,
91
+ including costs incurred by both the AI coding agent being observed (e.g.,
92
+ Claude Code, Cursor) and Agent Recon™'s analysis pipelines.
93
+ - The User is responsible for compliance with the terms of service of their
94
+ chosen LLM provider(s).
95
+ - The Licensor is not responsible for the availability, pricing, terms, or
96
+ performance of any third-party LLM provider.
97
+
98
+ ## 4. License Key
99
+
100
+ Access to Personal and Professional tier features requires a valid license key
101
+ obtained through the authorized Agent Recon™ storefront.
102
+
103
+ - License keys are non-transferable without written consent from the Licensor.
104
+ - License keys are validated periodically via the Licensor's API and cached
105
+ locally for offline operation.
106
+ - If the validation endpoint is unreachable, the most recently cached license
107
+ state is honored.
108
+ - Tampering with, sharing, or circumventing license key validation is a
109
+ violation of this EULA.
110
+
111
+ ## 5. Telemetry
112
+
113
+ Agent Recon™ includes an optional telemetry system that sends minimal,
114
+ non-identifying data (install ID, software version, platform, and timestamp)
115
+ to the Licensor's servers for product improvement and license compliance
116
+ monitoring. See PRIVACY.md for full details.
117
+
118
+ - Telemetry is **opt-out**: the User may disable telemetry at any time via
119
+ Settings > Telemetry or by setting `telemetry_enabled=false`.
120
+ - The telemetry system must not be removed or disabled by any means other than
121
+ the provided opt-out mechanism.
122
+ - No source code, prompts, API keys, file contents, or personally identifiable
123
+ information is collected by the telemetry system.
124
+
125
+ ## 6. Restrictions
126
+
127
+ The User SHALL NOT:
128
+
129
+ (a) Copy, redistribute, sublicense, sell, lease, or otherwise transfer the
130
+ Software or any portion thereof to any third party, except as expressly
131
+ permitted by the Apache License 2.0 for core components.
132
+
133
+ (b) Reverse engineer, decompile, disassemble, or otherwise attempt to derive
134
+ the source code of the proprietary components, except to the extent
135
+ expressly permitted by applicable law.
136
+
137
+ (c) Remove, alter, or obscure any proprietary notices, license headers, or
138
+ trademarks.
139
+
140
+ (d) Use the Software to create a competing product or service that
141
+ substantially replicates the functionality of Agent Recon™.
142
+
143
+ (e) Use the Software in any manner that violates applicable law or regulation.
144
+
145
+ (f) Misrepresent the license tier under which the Software is used (e.g.,
146
+ using a Personal license in an employment context that requires
147
+ Professional).
148
+
149
+ ## 7. Intellectual Property
150
+
151
+ The Software, including all proprietary components, modifications, and
152
+ enhancements, is the exclusive property of PNW Great Loop LLC. Core components
153
+ are licensed under Apache 2.0; proprietary components are licensed under
154
+ LICENSE-COMMERCIAL. This EULA does not transfer ownership of any component.
155
+
156
+ "Agent Recon" and the Agent Recon™ logo are trademarks of PNW Great Loop LLC.
157
+
158
+ ## 8. Disclaimer of Warranties
159
+
160
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
161
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
162
+ FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.
163
+
164
+ THE LICENSOR DOES NOT WARRANT THAT THE SOFTWARE WILL BE UNINTERRUPTED,
165
+ ERROR-FREE, OR SECURE. THE LICENSOR DOES NOT WARRANT THE ACCURACY,
166
+ COMPLETENESS, OR RELIABILITY OF ANY LLM-GENERATED OUTPUT, INCLUDING
167
+ SECURITY CLASSIFICATIONS, INSIGHTS, COACHING, HALLUCINATION SCORES,
168
+ OR RECOMMENDATIONS. LLM-GENERATED OUTPUTS ARE PROVIDED FOR INFORMATIONAL
169
+ PURPOSES ONLY AND SHOULD NOT BE RELIED UPON AS THE SOLE BASIS FOR SECURITY
170
+ OR DEVELOPMENT DECISIONS.
171
+
172
+ ## 9. Limitation of Liability
173
+
174
+ IN NO EVENT SHALL PNW GREAT LOOP LLC BE LIABLE FOR ANY INDIRECT, INCIDENTAL,
175
+ SPECIAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES ARISING OUT OF OR IN CONNECTION
176
+ WITH THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
177
+ POSSIBILITY OF SUCH DAMAGES.
178
+
179
+ THE LICENSOR'S TOTAL AGGREGATE LIABILITY SHALL NOT EXCEED THE AMOUNT PAID BY
180
+ THE USER FOR THE SOFTWARE IN THE TWELVE (12) MONTHS PRECEDING THE CLAIM.
181
+
182
+ FOR COMMUNITY TIER USERS, THE LICENSOR'S TOTAL LIABILITY SHALL NOT EXCEED
183
+ TEN DOLLARS ($10.00 USD).
184
+
185
+ ## 10. Termination
186
+
187
+ - The User may terminate this EULA at any time by uninstalling the Software
188
+ and destroying all copies.
189
+ - The Licensor may terminate this EULA if the User breaches any term and fails
190
+ to cure the breach within thirty (30) days of written notice.
191
+ - Upon termination of a paid subscription, the installation reverts to
192
+ Community tier functionality. No User data is deleted upon downgrade.
193
+ - Sections 6, 7, 8, 9, and 11 survive termination.
194
+
195
+ ## 11. Governing Law
196
+
197
+ This EULA shall be governed by and construed in accordance with the laws of
198
+ the State of Washington, United States, without regard to its conflict of law
199
+ provisions. Any dispute arising under this EULA shall be resolved in the state
200
+ or federal courts located in Washington State.
201
+
202
+ ## 12. Changes to This EULA
203
+
204
+ The Licensor may update this EULA from time to time. Material changes will be
205
+ communicated through the Software's update mechanism or via the Licensor's
206
+ website. Continued use of the Software after changes take effect constitutes
207
+ acceptance of the revised EULA.
208
+
209
+ ## 13. Severability
210
+
211
+ If any provision of this EULA is held to be unenforceable or invalid, that
212
+ provision shall be modified to the minimum extent necessary to make it
213
+ enforceable, and the remaining provisions shall continue in full force.
214
+
215
+ ## 14. Contact
216
+
217
+ PNW Great Loop LLC
218
+ Email: license@agent-recon.net
219
+ Web: https://www.agent-recon.net
220
+
221
+ ---
222
+
223
+ *Attorney review recommended before commercial distribution ($500-$1,500).*
package/INSTALL.md ADDED
@@ -0,0 +1,193 @@
1
+ # Installing Agent Recon
2
+
3
+ ## Prerequisites
4
+
5
+ - **Node.js >= 22** — [nodejs.org](https://nodejs.org/)
6
+ - **Python 3** — Required for hook scripts ([python.org](https://www.python.org/))
7
+ - **C/C++ build tools** — Required to compile the `better-sqlite3` native addon:
8
+ - **Windows:** `npm install -g windows-build-tools` or install Visual Studio Build Tools
9
+ - **macOS:** `xcode-select --install`
10
+ - **Linux (Debian/Ubuntu):** `sudo apt install build-essential python3`
11
+ - **Linux (Fedora/RHEL):** `sudo dnf groupinstall "Development Tools"`
12
+ - **Linux (Arch):** `sudo pacman -S base-devel`
13
+
14
+ ## npm (Recommended)
15
+
16
+ ```bash
17
+ npm install -g agent-recon
18
+ ```
19
+
20
+ Then run the guided installer:
21
+
22
+ ```bash
23
+ agent-recon install
24
+ ```
25
+
26
+ The installer will:
27
+ 1. Detect your platform and existing configuration
28
+ 2. Copy hook scripts to your Claude Code hooks directory
29
+ 3. Register 13 lifecycle events in Claude Code settings
30
+ 4. Optionally configure LLM API keys for analysis features
31
+ 5. Optionally set up an auto-start service (systemd / launchd / Windows Service)
32
+ 6. Verify the server starts and responds
33
+
34
+ ## From Source
35
+
36
+ ```bash
37
+ git clone <repository-url>
38
+ cd agent-recon
39
+
40
+ # Install server dependencies
41
+ cd server && npm install && cd ..
42
+
43
+ # Install installer dependencies
44
+ cd installer && npm install && cd ..
45
+
46
+ # Run the guided installer
47
+ node installer/cli.js install
48
+
49
+ # Or start the server manually
50
+ node server/start.js
51
+ ```
52
+
53
+ ## Upgrading
54
+
55
+ ```bash
56
+ # If installed via npm
57
+ npm update -g agent-recon
58
+ agent-recon upgrade
59
+
60
+ # If installed from source
61
+ git pull
62
+ agent-recon upgrade
63
+ # or: node installer/cli.js upgrade
64
+ ```
65
+
66
+ ## Uninstalling
67
+
68
+ ```bash
69
+ agent-recon uninstall
70
+ ```
71
+
72
+ This removes hooks from Claude Code settings, stops any auto-start service, and optionally
73
+ deletes the database and stored credentials. The source directory is never deleted.
74
+
75
+ To also remove the npm package:
76
+
77
+ ```bash
78
+ npm uninstall -g agent-recon
79
+ ```
80
+
81
+ ## CLI Commands
82
+
83
+ ```
84
+ agent-recon install # Guided installation (default)
85
+ agent-recon upgrade # Upgrade existing installation
86
+ agent-recon uninstall # Remove Agent Recon
87
+ agent-recon detect # Print environment detection report
88
+ agent-recon --help # Show help
89
+ agent-recon --version # Show version
90
+ ```
91
+
92
+ ## Platform Package Managers
93
+
94
+ ### Homebrew (macOS / Linux) — Coming Soon
95
+
96
+ A Homebrew formula is planned for a future release. In the meantime, use npm.
97
+
98
+ ### Scoop (Windows) — Coming Soon
99
+
100
+ A Scoop manifest is planned for a future release. In the meantime, use npm.
101
+
102
+ ## TLS / HTTPS Setup
103
+
104
+ Agent Recon supports browser-trusted HTTPS via [mkcert](https://github.com/FiloSottile/mkcert), eliminating "Not Secure" browser warnings without self-signed certificate interstitials.
105
+
106
+ ### Prerequisites
107
+
108
+ Install mkcert for your platform:
109
+
110
+ | Platform | Command |
111
+ |----------|---------|
112
+ | macOS | `brew install mkcert` |
113
+ | Windows | `choco install mkcert` |
114
+ | Linux / WSL | `apt install mkcert` or `brew install mkcert` |
115
+
116
+ Then run the one-time CA installation (requires admin/sudo):
117
+
118
+ ```bash
119
+ mkcert -install
120
+ ```
121
+
122
+ ### Enable TLS during install
123
+
124
+ ```bash
125
+ npx agent-recon install --tls
126
+ ```
127
+
128
+ This pre-selects the mkcert option in the guided installer. You can also choose TLS interactively during a normal `npx agent-recon install`.
129
+
130
+ ### Enable TLS on an existing installation
131
+
132
+ ```bash
133
+ npx agent-recon tls setup # configure mkcert TLS via server API
134
+ npx agent-recon tls status # check current TLS status
135
+ npx agent-recon upgrade --tls # add TLS during upgrade
136
+ ```
137
+
138
+ After enabling TLS, restart the server. The dashboard will be available at `https://localhost:3132` with a green padlock.
139
+
140
+ ### WSL note
141
+
142
+ On WSL2, mkcert installs the CA into the Windows trust store via interop. Both Windows browsers and WSL-side `curl` will trust the certificate. Ensure `mkcert -install` is run from WSL (it automatically uses the Windows `certutil` via `/mnt/c/`).
143
+
144
+ ### Custom certificates
145
+
146
+ For CA-signed or enterprise certificates, choose "Custom certificate" during install or set the paths in Settings. Provide PEM-encoded cert and key file paths.
147
+
148
+ ## Verifying Installation
149
+
150
+ ```bash
151
+ # Check environment detection
152
+ agent-recon detect
153
+
154
+ # Check server health (server must be running)
155
+ curl http://localhost:3131/health
156
+ ```
157
+
158
+ ## Troubleshooting
159
+
160
+ ### `better-sqlite3` build failure
161
+
162
+ This native addon must compile C++ code during installation. If it fails:
163
+
164
+ 1. Ensure C/C++ build tools are installed (see Prerequisites above)
165
+ 2. Try rebuilding manually: `cd server && npm rebuild better-sqlite3`
166
+ 3. On WSL, ensure you are on a native ext4 filesystem, not an NTFS mount (`/mnt/c/...`)
167
+
168
+ ### Python not found
169
+
170
+ Hook scripts require Python 3. The installer checks for `python3` and `python` in your PATH.
171
+
172
+ - **Windows:** Install from [python.org](https://www.python.org/) and ensure "Add to PATH" is checked
173
+ - **macOS:** `brew install python` or use the system Python 3
174
+ - **Linux:** `sudo apt install python3` (Debian/Ubuntu) or `sudo dnf install python3` (Fedora)
175
+
176
+ ### Permission errors on global install
177
+
178
+ If `npm install -g` fails with permission errors:
179
+
180
+ - **Recommended:** Configure npm to use a user directory:
181
+ ```bash
182
+ mkdir -p ~/.npm-global
183
+ npm config set prefix '~/.npm-global'
184
+ # Add to ~/.bashrc or ~/.zshrc:
185
+ export PATH="$HOME/.npm-global/bin:$PATH"
186
+ ```
187
+ - **Not recommended:** `sudo npm install -g agent-recon` (avoid running npm as root)
188
+
189
+ ### Server won't start
190
+
191
+ 1. Check that port 3131 is available: `lsof -i :3131` (macOS/Linux) or `netstat -ano | findstr 3131` (Windows)
192
+ 2. Ensure the database directory is writable: `ls -la data/`
193
+ 3. Check logs: set `AGENT_RECON_DEBUG=1` before starting