hauntview 0.0.0-stage → 0.0.6
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/LICENSE +21 -0
- package/README.md +358 -2
- package/VERSION +1 -0
- package/dist/cli.js +8184 -0
- package/package.json +120 -4
- package/scripts/postinstall.mjs +47 -0
- package/src/core/browser-launch.ts +60 -0
- package/src/core/browser-pool.ts +267 -0
- package/src/core/concurrency-resolver.ts +154 -0
- package/src/core/finding-classifier.ts +346 -0
- package/src/core/index.ts +8 -0
- package/src/core/profile-manager.ts +499 -0
- package/src/core/report-store.ts +117 -0
- package/src/core/screenshot-manager.ts +312 -0
- package/src/core/system-capability.ts +161 -0
- package/src/core/visual-diff.ts +230 -0
- package/src/engine.ts +473 -0
- package/src/profiles/accessibility-cognitive.ts +261 -0
- package/src/profiles/accessibility-keyboard.ts +225 -0
- package/src/profiles/accessibility-screenreader.ts +243 -0
- package/src/profiles/accessibility-visual.ts +257 -0
- package/src/profiles/broken-links.ts +261 -0
- package/src/profiles/browser-edge.ts +192 -0
- package/src/profiles/browser-firefox.ts +254 -0
- package/src/profiles/browser-legacy.ts +213 -0
- package/src/profiles/console-errors.ts +192 -0
- package/src/profiles/desktop-4k.ts +273 -0
- package/src/profiles/desktop.ts +192 -0
- package/src/profiles/font-failure.ts +148 -0
- package/src/profiles/form-resilience.ts +285 -0
- package/src/profiles/i18n-cjk.ts +218 -0
- package/src/profiles/i18n-mixed.ts +255 -0
- package/src/profiles/i18n-rtl.ts +236 -0
- package/src/profiles/image-failure.ts +178 -0
- package/src/profiles/index.ts +42 -0
- package/src/profiles/js-disabled.ts +179 -0
- package/src/profiles/mobile.ts +175 -0
- package/src/profiles/network-resilience.ts +208 -0
- package/src/profiles/offline.ts +165 -0
- package/src/profiles/performance.ts +244 -0
- package/src/profiles/reduced-motion.ts +144 -0
- package/src/profiles/security-hygiene.ts +206 -0
- package/src/profiles/tablet.ts +176 -0
- package/src/reports/factory.ts +56 -0
- package/src/reports/html-generator.ts +1105 -0
- package/src/reports/index.ts +9 -0
- package/src/reports/markdown-generator.ts +349 -0
- package/src/reports/types.ts +34 -0
- package/src/reports/zip-generator.ts +85 -0
- package/src/types/contracts.ts +238 -0
- package/src/types/finding-utils.ts +121 -0
- package/src/types/index.ts +8 -0
- package/src/types/profiles.ts +175 -0
- package/src/types/results.ts +135 -0
- package/src/version.ts +5 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HauntView 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
CHANGED
|
@@ -1,3 +1,359 @@
|
|
|
1
|
-
#
|
|
1
|
+
# HauntView 👻
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**See what breaks before your users do.**
|
|
4
|
+
|
|
5
|
+
HauntView photographs your website under 25 different conditions — mobile layout, JavaScript disabled, images blocked, fonts failing, offline, broken links, missing security headers, and more. Every finding carries proof. The tool refuses to flag a defect it cannot prove.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
### Option 1: Official CLI (`haunt`)
|
|
12
|
+
|
|
13
|
+
Install globally via npm to run rites directly from your terminal:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g hauntview
|
|
17
|
+
|
|
18
|
+
# Run testing rites against any URL
|
|
19
|
+
haunt https://example.com
|
|
20
|
+
|
|
21
|
+
# Configure default export format, destination, and concurrency
|
|
22
|
+
haunt setup
|
|
23
|
+
|
|
24
|
+
# Check Node version, installed browsers, and system concurrency capability
|
|
25
|
+
haunt doctor
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Option 2: Local Web Dashboard
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git clone https://github.com/kingjethro999/hauntview.git
|
|
32
|
+
cd hauntview
|
|
33
|
+
pnpm install
|
|
34
|
+
pnpm dev # Victorian Parlour Web UI at http://localhost:3000
|
|
35
|
+
pnpm mcp # MCP server (stdio) for Kiro integration
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Requirements:** Node 22 LTS, pnpm 9+. Playwright browser engines (Chromium, Firefox, WebKit) are installed automatically.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Kiro Power Installation
|
|
43
|
+
|
|
44
|
+
HauntView is packaged as an installable **Kiro Power** under [`power/`](power/) following the Agent Plugins specification. It bundles all 25 testing profile tools, specialized skills (`haunt-a-website`, `exorcise-findings`, `setup`), and automatic conversational activation keywords.
|
|
45
|
+
|
|
46
|
+
### Option A: Install as a Custom Power (Recommended)
|
|
47
|
+
|
|
48
|
+
1. In **Kiro IDE**, open the **Powers** sidebar and click **Add Custom Power**.
|
|
49
|
+
2. Select **Import power from GitHub**.
|
|
50
|
+
3. Paste the repository URL:
|
|
51
|
+
```text
|
|
52
|
+
https://github.com/kingjethro999/hauntview
|
|
53
|
+
```
|
|
54
|
+
4. Confirm import.
|
|
55
|
+
|
|
56
|
+
Once installed, simply ask Kiro in chat:
|
|
57
|
+
|
|
58
|
+
> _"Test my site on mobile and check for broken links on http://localhost:3000"_
|
|
59
|
+
> _"Audit accessibility and prefers-reduced-motion on https://example.com"_
|
|
60
|
+
> _"Exorcise findings from the last run and verify the fix"_
|
|
61
|
+
|
|
62
|
+
Kiro will automatically activate the Power, execute the test rites in headless browsers, analyze visual diff plates and DOM snapshots, and guide you to fix issues with verified evidence.
|
|
63
|
+
|
|
64
|
+
### Option B: Workspace MCP Setup
|
|
65
|
+
|
|
66
|
+
If you prefer configuring MCP directly in your workspace, add `.kiro/settings/mcp.json`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"hauntview": {
|
|
72
|
+
"command": "pnpm",
|
|
73
|
+
"args": ["mcp"],
|
|
74
|
+
"disabled": false
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Then ask Kiro in chat:
|
|
81
|
+
|
|
82
|
+
> `@hauntview run tests on https://yoursite.com` — it will invoke `run-test-profile`, extract structured findings, and help you fix them without leaving the IDE.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Project Status
|
|
87
|
+
|
|
88
|
+
- **Phase 1** ✅ Core infrastructure: contracts, BrowserPool, ScreenshotManager, FindingClassifier, ProfileManager, VisualDiff, SQLite storage, safety validation.
|
|
89
|
+
- **Phase 2** ✅ All 25 testing profiles implemented and verified with Jest unit tests.
|
|
90
|
+
- **Phase 3** ✅ Official CLI (`haunt` / `hauntview`), interactive setup wizard, doctor diagnostic, and opt-in profile concurrency.
|
|
91
|
+
- **Phase 4** ✅ Comprehensive documentation, auto-versioning pre-commit hook, and architecture references.
|
|
92
|
+
- **Current Test Suite:** **34 Jest test suites, 169 tests — 100% passing.**
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## Architecture & Faces
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
┌────────────────────────────────────────────────────────────────────────┐
|
|
100
|
+
│ FACES │
|
|
101
|
+
│ Web UI (Next.js) CLI (`haunt`) MCP Server REST API │
|
|
102
|
+
│ Parlour Interface Node.js CLI Kiro/Claude Endpoints │
|
|
103
|
+
│ Zustand Store Zero Web Bloat stdio/SSE /api/test │
|
|
104
|
+
└────────────────────────────────────┬───────────────────────────────────┘
|
|
105
|
+
│ (direct / HTTP / stdio)
|
|
106
|
+
┌────────────────────────────────────▼───────────────────────────────────┐
|
|
107
|
+
│ CORE │
|
|
108
|
+
│ Orchestrator (`HauntViewEngine`) Concurrency Resolver │
|
|
109
|
+
│ System Capability Evaluator 25 Resilience Profiles │
|
|
110
|
+
│ BrowserPool (Playwright) FindingClassifier │
|
|
111
|
+
│ ScreenshotManager VisualDiff (pixelmatch) │
|
|
112
|
+
│ ReportFactory (HTML/MD/Zip) Safety & SSRF Validator │
|
|
113
|
+
└────────────────────────────────────┬───────────────────────────────────┘
|
|
114
|
+
│
|
|
115
|
+
┌────────────────────────────────────▼───────────────────────────────────┐
|
|
116
|
+
│ DUAL STORAGE MODEL │
|
|
117
|
+
│ │
|
|
118
|
+
│ Client-Side Web Storage (Private) Server-Side Storage (Headless) │
|
|
119
|
+
│ --------------------------------- ------------------------------ │
|
|
120
|
+
│ • zustand/persist -> localStorage • SQLite via better-sqlite3 │
|
|
121
|
+
│ • Zero cross-visitor leakage • `.hauntview/data/hauntview.db`│
|
|
122
|
+
│ • Device-local privacy • Used by CLI, MCP, and Server │
|
|
123
|
+
│ • Survives server redeployments • Structured run & finding data │
|
|
124
|
+
│ • Rehydrates reports on restart • Export outputs to configured │
|
|
125
|
+
│ • Manual "Clear History" button destination directory │
|
|
126
|
+
└────────────────────────────────────────────────────────────────────────┘
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Storage Model: Privacy by Design
|
|
132
|
+
|
|
133
|
+
HauntView intentionally separates storage based on environment:
|
|
134
|
+
|
|
135
|
+
1. **Web UI (Client-Side `localStorage` via Zustand):**
|
|
136
|
+
- User test history and reports are stored locally in the user's browser using Zustand's `persist` middleware ([`app/lib/crypt-store.ts`](file:///home/japheth/Desktop/hauntview/app/lib/crypt-store.ts)).
|
|
137
|
+
- **Privacy:** In public or multi-tenant deployments (such as `hauntview.onrender.com`), test reports are private to each user's device and never bleed between visitors.
|
|
138
|
+
- **Resilience:** If the hosting server or local container restarts, report data is safely preserved in the browser and rehydrated upon launch.
|
|
139
|
+
- **Controls & Limits:** Users can clear all stored history at any time using the "Clear History" button. Storage is subject to browser localStorage quotas (~5–10 MB) and does not sync across different browsers or devices.
|
|
140
|
+
2. **CLI / MCP / REST API (Server-Side SQLite):**
|
|
141
|
+
- Headless test executions store structured test runs and findings in an embedded SQLite database (`.hauntview/data/hauntview.db`).
|
|
142
|
+
- The CLI never imports `zustand`, `window`, or browser DOM APIs, keeping the package lean and portable.
|
|
143
|
+
- CLI exports (HTML, Markdown, Zip bundles) are written directly to the user's configured output directory.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Profile Concurrency
|
|
148
|
+
|
|
149
|
+
HauntView includes an opt-in concurrency engine that executes browser rites in parallel using a bounded worker pool:
|
|
150
|
+
|
|
151
|
+
| Execution Mode | Concurrency Amount | Duration (25 Profiles) | Memory Footprint |
|
|
152
|
+
| :----------------------- | :----------------- | :--------------------- | :----------------- |
|
|
153
|
+
| **Sequential (Default)** | 1 (off) | ~70 – 80s | ~600 MB peak |
|
|
154
|
+
| **Concurrent (Optimal)** | 2 – 4 workers | **~25 – 30s** | ~1.5 – 2.5 GB peak |
|
|
155
|
+
|
|
156
|
+
### Hardware Capability Heuristic
|
|
157
|
+
|
|
158
|
+
To prevent system freezing or OOM conditions, HauntView calculates safe hardware limits at runtime:
|
|
159
|
+
|
|
160
|
+
- **Formula:** $\text{maxConcurrency} = \min(\lfloor \frac{\text{logicalCores}}{2} \rfloor, \lfloor \frac{\text{totalRAM(GB)}}{2} \rfloor, 8)$
|
|
161
|
+
- **Low-Spec Guard:** Systems with $< 4\text{ GB}$ RAM or $< 2$ logical cores are restricted to sequential execution (`maxConcurrency = 1`). The setup wizard disallows enabling concurrency, and the CLI clamps manual overrides.
|
|
162
|
+
- **Setup Rejection:** `haunt setup` refuses values higher than the hardware maximum with a detailed explanation of your machine's CPU/RAM specs.
|
|
163
|
+
|
|
164
|
+
### Configuration Precedence
|
|
165
|
+
|
|
166
|
+
1. CLI Flag (`--concurrency`, `--concurrency-amount`) / API request body (`concurrency`, `concurrencyAmount`) / MCP tool arguments
|
|
167
|
+
2. Environment Variables (`HAUNT_CONCURRENCY=1`, `HAUNT_CONCURRENCY_AMOUNT=n`)
|
|
168
|
+
3. Persistent Configuration (`~/.config/hauntview/config.json`)
|
|
169
|
+
4. Engine Default (`concurrency: false`, `concurrencyAmount: 2`)
|
|
170
|
+
|
|
171
|
+
### ⚠️ Hosted Service Notice (`hauntview.onrender.com`)
|
|
172
|
+
|
|
173
|
+
HauntView's public demo instance runs on Render's free tier with **0.5 vCPU and 512 MB RAM**. Concurrency is strictly **disabled** on the hosted instance to protect container stability. Requests to `/api/test` with concurrency enabled are rejected with HTTP 400. Full 25-rite runs take ~70 seconds on Render. For fast concurrent testing (~25s), please [install the CLI](#option-1-official-cli-haunt) or run locally via MCP.
|
|
174
|
+
|
|
175
|
+
See [`docs/CONCURRENCY.md`](file:///home/japheth/Desktop/hauntview/docs/CONCURRENCY.md) for full details.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Workspace Auto-Versioning
|
|
180
|
+
|
|
181
|
+
HauntView implements an automated workspace-wide versioning workflow:
|
|
182
|
+
|
|
183
|
+
- **Single Source of Truth:** The root [`VERSION`](file:///home/japheth/Desktop/hauntview/VERSION) file defines the project version.
|
|
184
|
+
- **Rollover Bump Rules:**
|
|
185
|
+
- Patch rolls over at 9: `0.0.9` → `0.1.0`
|
|
186
|
+
- Minor rolls over at 99: `0.99.9` → `1.0.0`
|
|
187
|
+
- **Synchronized Carriers:** Every version bump updates:
|
|
188
|
+
- `VERSION`
|
|
189
|
+
- `package.json`
|
|
190
|
+
- `power/plugin.json`
|
|
191
|
+
- `src/version.ts`
|
|
192
|
+
- Next.js Web UI footer (via `src/version.ts`)
|
|
193
|
+
- **Automated Pre-Commit Hook:** Husky automatically invokes [`scripts/bump-version.mjs`](file:///home/japheth/Desktop/hauntview/scripts/bump-version.mjs) before every commit. The hook detects and skips bumps during git `amend`, `rebase`, and `merge` operations to avoid version drift.
|
|
194
|
+
- **Validation:**
|
|
195
|
+
- Run `pnpm run version:check` to verify that all carrier files match `VERSION`.
|
|
196
|
+
- Run `pnpm run setup:hooks` to reinitialize Git hooks for development.
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## 25 Testing Profiles
|
|
201
|
+
|
|
202
|
+
### Device Testing (5 legacy + 3 canonical)
|
|
203
|
+
|
|
204
|
+
| ID | Viewport | What it checks |
|
|
205
|
+
| :---------------------- | :-------- | :------------------------------------------------------ |
|
|
206
|
+
| `mobile-iphone15` | 390×844 | Touch targets, responsive layout, font sizes |
|
|
207
|
+
| `mobile-android` | 360×800 | Touch targets, responsive layout |
|
|
208
|
+
| `tablet-ipad` | 1024×1366 | Viewport-fit, double-tap delay, landscape overflow |
|
|
209
|
+
| `desktop-1080p` | 1920×1080 | Layout shift, CSS optimization |
|
|
210
|
+
| `desktop-4k` | 3840×2160 | High-DPI images, typography legibility, container width |
|
|
211
|
+
| `mobile` _(canonical)_ | 390×844 | Canonical mobile rite |
|
|
212
|
+
| `tablet` _(canonical)_ | 820×1180 | Canonical tablet rite |
|
|
213
|
+
| `desktop` _(canonical)_ | 1280×800 | Canonical desktop rite |
|
|
214
|
+
|
|
215
|
+
### Accessibility (4)
|
|
216
|
+
|
|
217
|
+
| ID | What it checks |
|
|
218
|
+
| :------------------ | :------------------------------------------------------------------- |
|
|
219
|
+
| `a11y-screenreader` | `lang`, landmarks, heading order, skip links, ARIA roles |
|
|
220
|
+
| `a11y-keyboard` | Positive tabindex, non-semantic clickables, focus outlines |
|
|
221
|
+
| `a11y-visual` | Luminance contrast ratios (WCAG AA), color-only state, forced-colors |
|
|
222
|
+
| `a11y-cognitive` | DOM complexity, autoplay, form complexity, readability |
|
|
223
|
+
|
|
224
|
+
### Internationalization (3)
|
|
225
|
+
|
|
226
|
+
| ID | Locale | What it checks |
|
|
227
|
+
| :----------- | :------ | :------------------------------------------------ |
|
|
228
|
+
| `i18n-rtl` | `ar-SA` | `dir="rtl"`, logical CSS properties, Arabic fonts |
|
|
229
|
+
| `i18n-cjk` | `ja-JP` | CJK font stack, line-breaking, ruby annotations |
|
|
230
|
+
| `i18n-mixed` | `hi-IN` | Devanagari fonts, ligatures, diacritics |
|
|
231
|
+
|
|
232
|
+
### Browser Compatibility (4)
|
|
233
|
+
|
|
234
|
+
| ID | Engine | What it checks |
|
|
235
|
+
| :---------------- | :---------- | :----------------------------------------------------------- |
|
|
236
|
+
| `browser-webkit` | WebKit | WebKit engine baseline |
|
|
237
|
+
| `browser-firefox` | Gecko | `-webkit-*` without standard fallbacks, Gecko console errors |
|
|
238
|
+
| `browser-edge` | Blink/Edge | Windows High Contrast, forced-colors, PWA manifest |
|
|
239
|
+
| `browser-legacy` | IE11 compat | CSS custom properties, Grid, ES6+ in inline scripts |
|
|
240
|
+
|
|
241
|
+
### Canonical Resilience Rites (9)
|
|
242
|
+
|
|
243
|
+
| ID | Severity range | What it checks |
|
|
244
|
+
| :------------------- | :------------- | :--------------------------------------------------------------------------------- |
|
|
245
|
+
| `image-failure` | warning / info | All images blocked — missing alt, missing width/height |
|
|
246
|
+
| `font-failure` | warning | All web fonts blocked — fallback layout shift |
|
|
247
|
+
| `js-disabled` | warning / info | JS off — blank content vs. `<noscript>` fallback |
|
|
248
|
+
| `reduced-motion` | warning | `prefers-reduced-motion: reduce` — animations still running |
|
|
249
|
+
| `offline` | info | Service worker absent, no offline fallback page |
|
|
250
|
+
| `broken-links` | warning / info | Same-origin links probed — 404/410/5xx/auth |
|
|
251
|
+
| `network-resilience` | warning | All XHR/fetch aborted — page errors or blank content |
|
|
252
|
+
| `security-hygiene` | warning / info | CSP, HSTS, X-Frame-Options, X-Content-Type-Options, Referrer-Policy, mixed content |
|
|
253
|
+
| `form-resilience` | warning / info | Empty form submit — validation feedback present/absent |
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Evidence Contract & Severity Policy
|
|
258
|
+
|
|
259
|
+
Every finding carries at least one piece of verified evidence (`screenshot`, `dom`, `request`, `header`, `metric`, `axe`, `console`). The engine refuses to raise a finding without proof.
|
|
260
|
+
|
|
261
|
+
| Situation | Severity | Confidence |
|
|
262
|
+
| :----------------------------------------------- | :-------- | :---------- |
|
|
263
|
+
| Missing alt attribute | `warning` | `observed` |
|
|
264
|
+
| Font fallback layout shift | `warning` | `measured` |
|
|
265
|
+
| JS-disabled blank page, no noscript | `warning` | `observed` |
|
|
266
|
+
| Animations under reduced-motion | `warning` | `observed` |
|
|
267
|
+
| No service worker / offline fallback | `info` | `observed` |
|
|
268
|
+
| 404/410/5xx same-origin link | `warning` | `observed` |
|
|
269
|
+
| 401/403/429 link (inconclusive) | `info` | `observed` |
|
|
270
|
+
| Missing CSP / X-Frame-Options / HSTS | `warning` | `observed` |
|
|
271
|
+
| Missing X-Content-Type-Options / Referrer-Policy | `info` | `observed` |
|
|
272
|
+
| Form submits without validation | `warning` | `heuristic` |
|
|
273
|
+
|
|
274
|
+
_Rule:_ Findings with `heuristic` confidence may never exceed `warning` severity.
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## API Usage
|
|
279
|
+
|
|
280
|
+
### Run rites via HTTP POST
|
|
281
|
+
|
|
282
|
+
```bash
|
|
283
|
+
curl -X POST http://localhost:3000/api/test \
|
|
284
|
+
-H "Content-Type: application/json" \
|
|
285
|
+
-d '{
|
|
286
|
+
"url": "https://example.com",
|
|
287
|
+
"profiles": ["image-failure", "security-hygiene", "broken-links"],
|
|
288
|
+
"concurrency": true,
|
|
289
|
+
"concurrencyAmount": 2,
|
|
290
|
+
"includeScreenshots": true
|
|
291
|
+
}'
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
---
|
|
295
|
+
|
|
296
|
+
## Project Structure
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
hauntview/
|
|
300
|
+
├── VERSION # Single source of truth for workspace version
|
|
301
|
+
├── bin/
|
|
302
|
+
├── dist/ # Compiled standalone CLI bundle (dist/cli.js)
|
|
303
|
+
├── scripts/
|
|
304
|
+
│ ├── bump-version.mjs # Version rollover bump engine
|
|
305
|
+
│ ├── check-version.mjs # Carrier sync validation
|
|
306
|
+
│ ├── build-cli.mjs # esbuild CLI packager
|
|
307
|
+
│ └── postinstall.mjs # Safe browser setup hook
|
|
308
|
+
├── src/
|
|
309
|
+
│ ├── version.ts # Exported version constant
|
|
310
|
+
│ ├── types/
|
|
311
|
+
│ │ ├── contracts.ts # Zod schemas + CanonicalFinding
|
|
312
|
+
│ │ ├── finding-utils.ts # buildFinding, assertions
|
|
313
|
+
│ │ ├── profiles.ts # Profile types
|
|
314
|
+
│ │ └── results.ts # Report types
|
|
315
|
+
│ ├── core/
|
|
316
|
+
│ │ ├── browser-pool.ts # Playwright pool
|
|
317
|
+
│ │ ├── screenshot-manager.ts
|
|
318
|
+
│ │ ├── finding-classifier.ts
|
|
319
|
+
│ │ ├── profile-manager.ts # 25 profiles configured
|
|
320
|
+
│ │ ├── visual-diff.ts # pixelmatch ectoplasm diff
|
|
321
|
+
│ │ ├── report-store.ts # SQLite persistence
|
|
322
|
+
│ │ ├── system-capability.ts # Hardware assessment & heuristic
|
|
323
|
+
│ │ └── concurrency-resolver.ts # Priority resolver & hosted guard
|
|
324
|
+
│ ├── cli/ # HauntView CLI
|
|
325
|
+
│ │ ├── index.ts # Entrypoint & command routing
|
|
326
|
+
│ │ ├── runner.ts # haunt <url> runner & reporters
|
|
327
|
+
│ │ ├── setup.ts # haunt setup interactive wizard
|
|
328
|
+
│ │ ├── doctor.ts # haunt doctor diagnostic
|
|
329
|
+
│ │ ├── browsers.ts # Playwright browser verification
|
|
330
|
+
│ │ └── config.ts # Persistent config store
|
|
331
|
+
│ ├── profiles/ # 25 profile implementations
|
|
332
|
+
│ ├── reports/ # HTML, Markdown, and Zip export pipeline
|
|
333
|
+
│ ├── mcp/ # MCP server (stdio / SSE)
|
|
334
|
+
│ └── engine.ts # Master orchestrator with settled pool
|
|
335
|
+
├── app/ # Next.js Victorian Parlour Web UI
|
|
336
|
+
│ ├── api/test/route.ts # REST API with hosted concurrency guard
|
|
337
|
+
│ ├── lib/crypt-store.ts # Private localStorage Zustand store
|
|
338
|
+
│ ├── components/ # Kiroween design system components
|
|
339
|
+
│ └── docs/ # Interactive developer manual
|
|
340
|
+
├── docs/
|
|
341
|
+
│ ├── ARCHITECTURE.md # Architecture specification
|
|
342
|
+
│ ├── CLI.md # Comprehensive haunt CLI guide
|
|
343
|
+
│ ├── CONCURRENCY.md # Concurrency architecture & benchmarks
|
|
344
|
+
│ ├── CONTRACTS.md # Auto-generated contract reference
|
|
345
|
+
│ └── KIRO_USAGE.md
|
|
346
|
+
├── power/ # Kiro Power bundle (plugin.json, skills)
|
|
347
|
+
├── jest.config.js
|
|
348
|
+
└── package.json
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## License
|
|
354
|
+
|
|
355
|
+
MIT — see LICENSE file.
|
|
356
|
+
|
|
357
|
+
## Built for Kiroween 2026 Hackathon
|
|
358
|
+
|
|
359
|
+
HauntView demonstrates comprehensive spec-driven development with Kiro: Zod contracts, steering documents, hooks, property-based tests, and MCP integration — all in a single local-first tool.
|
package/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
v0.0.6
|