haltija 1.1.0
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 +190 -0
- package/README.md +220 -0
- package/bin/build-bookmarklet.ts +107 -0
- package/bin/cli-subcommand.mjs +537 -0
- package/bin/format-events.mjs +125 -0
- package/bin/format-test.mjs +183 -0
- package/bin/format-tree.mjs +165 -0
- package/bin/hj.mjs +59 -0
- package/bin/mcp-setup.mjs +288 -0
- package/bin/server.ts +9 -0
- package/bin/tosijs-dev.mjs +591 -0
- package/bin/tosijs-dev.ts +74 -0
- package/dist/client.js +387 -0
- package/dist/component.js +6685 -0
- package/dist/index.js +10201 -0
- package/dist/server.js +9847 -0
- package/docs/CI-INTEGRATION.md +230 -0
- package/docs/EXECUTIVE-SUMMARY.md +213 -0
- package/docs/README.md +67 -0
- package/docs/REST-API.md +123 -0
- package/docs/ROADMAP.md +591 -0
- package/docs/UX-CRIMES.md +599 -0
- package/docs/agent-prompt.md +139 -0
- package/docs/getting-started/app.md +96 -0
- package/docs/getting-started/playground.md +75 -0
- package/docs/getting-started/service.md +96 -0
- package/docs/recipes.md +245 -0
- package/haltija-icon.svg +79 -0
- package/package.json +68 -0
package/docs/ROADMAP.md
ADDED
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
# Roadmap to 11/10
|
|
2
|
+
|
|
3
|
+
Current state: **9/10** - Best-in-class developer tool. GET support for actions, `/key` endpoint, diff-on-action, iframe visibility, simplified API.
|
|
4
|
+
|
|
5
|
+
Goal: **10/10** - The standard way AI agents interact with browsers.
|
|
6
|
+
|
|
7
|
+
Beyond: **11/10** - Agent-as-a-Service for browsers. Zero-config AI automation.
|
|
8
|
+
|
|
9
|
+
**Current Focus: Phase 5 - CI Integration POC**
|
|
10
|
+
- β
CI documentation written (`docs/CI-INTEGRATION.md`)
|
|
11
|
+
- π Dogfooding in real CI environment
|
|
12
|
+
- π Discovering actual friction points
|
|
13
|
+
|
|
14
|
+
**Recent Progress (v0.1.9):**
|
|
15
|
+
- β
GET support for `/click`, `/type`, `/key` - simpler curl commands
|
|
16
|
+
- β
`/key` endpoint for keyboard shortcuts with realistic event lifecycle
|
|
17
|
+
- β
`diff: true` option - see what changed after actions
|
|
18
|
+
- β
`/form` endpoint - extract all form values as JSON
|
|
19
|
+
- β
Iframe visibility - always show `frameSrc` even for cross-origin
|
|
20
|
+
- β
`/status` includes windows - fewer round trips
|
|
21
|
+
- β
Contextual tree flags - validation state, wouldScroll, focused
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Phase 1: Documentation & Discovery (Low effort, high impact)
|
|
26
|
+
|
|
27
|
+
The product is better than people can tell. Fix that first.
|
|
28
|
+
|
|
29
|
+
### 1.1 Landing Page Hero
|
|
30
|
+
**Problem**: README buries the lede. Users don't immediately understand the value.
|
|
31
|
+
|
|
32
|
+
**Solution**:
|
|
33
|
+
- Lead with the one-liner setup: `bunx haltija` + one script tag
|
|
34
|
+
- 30-second video showing AI controlling a real app
|
|
35
|
+
- Clear "Get Started in 2 Minutes" path
|
|
36
|
+
|
|
37
|
+
### 1.2 Consolidate Documentation
|
|
38
|
+
**Problem**: Docs scattered across CLAUDE.md, /docs, /api, embedded markdown, README.
|
|
39
|
+
|
|
40
|
+
**Solution**:
|
|
41
|
+
- Single docs site or well-organized docs/ folder
|
|
42
|
+
- Clear hierarchy: Quick Start β Guides β API Reference β Architecture
|
|
43
|
+
- Remove duplication, cross-reference instead
|
|
44
|
+
|
|
45
|
+
### 1.3 Use Case Galleries
|
|
46
|
+
**Problem**: Users don't know what's possible.
|
|
47
|
+
|
|
48
|
+
**Solution**:
|
|
49
|
+
- "Recipes" page with common workflows:
|
|
50
|
+
- Testing a login flow
|
|
51
|
+
- Exploring a new codebase
|
|
52
|
+
- Recording and replaying a bug report
|
|
53
|
+
- Generating tests from manual exploration
|
|
54
|
+
- Each recipe: problem, solution, code, expected output
|
|
55
|
+
|
|
56
|
+
### 1.4 API Reference Polish
|
|
57
|
+
**Problem**: /api endpoint is a wall of text.
|
|
58
|
+
|
|
59
|
+
**Solution**:
|
|
60
|
+
- Structured JSON output option for programmatic consumption
|
|
61
|
+
- Interactive examples (curl commands that work)
|
|
62
|
+
- Group by workflow, not just category
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Phase 2: Developer Experience & "Hobbyist Lock-In" (Medium effort, high impact)
|
|
67
|
+
|
|
68
|
+
Make it impossible for an individual developer to use anything else.
|
|
69
|
+
|
|
70
|
+
### 2.1 Node.js Support
|
|
71
|
+
**Problem**: Bun-only limits adoption. Many teams aren't on Bun yet.
|
|
72
|
+
|
|
73
|
+
**Status**: Server uses `Bun.serve()` - Node.js would require abstracting HTTP layer. Low priority since:
|
|
74
|
+
- Desktop app bundles the server (no runtime dependency)
|
|
75
|
+
- REST/MCP API means any client works regardless of server runtime
|
|
76
|
+
- Bun installs easily: `bunx haltija`
|
|
77
|
+
|
|
78
|
+
**Solution** (if needed):
|
|
79
|
+
- Abstract HTTP server to support both Bun and Node
|
|
80
|
+
- `npx haltija` as alternative install path
|
|
81
|
+
|
|
82
|
+
### 2.2 Browser Extension
|
|
83
|
+
**Problem**: Bookmarklet requires manual click per page. CSP blocks injection on some sites.
|
|
84
|
+
|
|
85
|
+
**Solution**:
|
|
86
|
+
- Chrome extension for persistent injection
|
|
87
|
+
- Firefox extension
|
|
88
|
+
- Survives navigation, works on CSP-restricted sites
|
|
89
|
+
- Toggle on/off per-site
|
|
90
|
+
|
|
91
|
+
### 2.3 Better Error Messages
|
|
92
|
+
**Problem**: Some failures are still cryptic.
|
|
93
|
+
|
|
94
|
+
**Solution**:
|
|
95
|
+
- Audit all error paths
|
|
96
|
+
- Every error should suggest a fix
|
|
97
|
+
- "Element not found" β "Element not found: #submit. Did you mean: #submit-btn, button.submit?"
|
|
98
|
+
|
|
99
|
+
### 2.4 TypeScript SDK
|
|
100
|
+
**Problem**: Raw HTTP calls are tedious.
|
|
101
|
+
|
|
102
|
+
**Solution**:
|
|
103
|
+
```typescript
|
|
104
|
+
import { Haltija } from 'haltija'
|
|
105
|
+
|
|
106
|
+
const h = new Haltija('http://localhost:4000')
|
|
107
|
+
await h.click('#submit')
|
|
108
|
+
const tree = await h.tree({ depth: 2 })
|
|
109
|
+
```
|
|
110
|
+
- Type-safe, auto-complete friendly
|
|
111
|
+
- Async/await native
|
|
112
|
+
- Publish to npm
|
|
113
|
+
|
|
114
|
+
### 2.5 "Watch and Learn" Mode β
(Mostly done)
|
|
115
|
+
**Problem**: Copy/pasting prompts is low friction, but *zero* friction is better.
|
|
116
|
+
|
|
117
|
+
**Status**: Recording infrastructure exists (`/recording/start`, `/recording/stop`, `/recording/generate`). Generates test JSON from user actions.
|
|
118
|
+
|
|
119
|
+
**Remaining**:
|
|
120
|
+
- Add prompt generation option (convert recording to Claude prompt, not just test JSON)
|
|
121
|
+
- Or: document that Claude can read the test JSON and replicate the workflow
|
|
122
|
+
|
|
123
|
+
**Low priority**: CLI test runner (`bunx haltija run test.json`) - works via API already, CLI feels like regression to Playwright model
|
|
124
|
+
|
|
125
|
+
**Key differentiator**: We connect to a *live browser* you're already using - no cold start, existing auth/cookies/state preserved. Test the actual thing you're looking at, not a sterile simulation. Need isolation? Open a new tab - instant fresh context without browser spinup.
|
|
126
|
+
|
|
127
|
+
### 2.6 "Flight Recorder" UI
|
|
128
|
+
**Problem**: "Click with Diff" produces powerful data, but it's just JSON.
|
|
129
|
+
|
|
130
|
+
**Solution**:
|
|
131
|
+
- Visual playback UI in Desktop App
|
|
132
|
+
- Timeline view: Action β DOM Diff (visualized) β Result
|
|
133
|
+
- Let humans *see* the diff the way the AI saw it
|
|
134
|
+
- Builds trust in the "black box" of AI decision-making
|
|
135
|
+
|
|
136
|
+
### 2.7 Skill Marketplace / Community Registry
|
|
137
|
+
**Problem**: Sharing automation recipes is ad-hoc.
|
|
138
|
+
|
|
139
|
+
**Solution**:
|
|
140
|
+
- GitHub repo or lightweight registry of "Haltija Skills"
|
|
141
|
+
- Pre-built skills for top SaaS apps (Stripe checkout, Gmail, etc.)
|
|
142
|
+
- `haltija-skill-stripe-checkout`, `haltija-skill-gmail-cleanup`
|
|
143
|
+
- Install Haltija β instantly have robust skills for common workflows
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Phase 3: Platform Expansion β
(Mostly done)
|
|
148
|
+
|
|
149
|
+
Build scripts work for all platforms. v0.1.9 includes:
|
|
150
|
+
- β
macOS: DMG (arm64, x64)
|
|
151
|
+
- β
Windows: NSIS installer + portable exe
|
|
152
|
+
- β
Linux: AppImage + deb (arm64)
|
|
153
|
+
|
|
154
|
+
### 3.1 Document Local Build Process
|
|
155
|
+
**Problem**: Users don't know they can build locally.
|
|
156
|
+
|
|
157
|
+
**Solution**:
|
|
158
|
+
- Document `npm run build:mac/win/linux` in apps/desktop
|
|
159
|
+
- Explain Playwright-like "build where you are" model
|
|
160
|
+
- Add to Quick Start for non-macOS users
|
|
161
|
+
|
|
162
|
+
### 3.2 Windows Testing β
(Build works)
|
|
163
|
+
**Problem**: Windows build untested.
|
|
164
|
+
|
|
165
|
+
**Status**: Build scripts work, produces installer + portable exe. Needs real Windows testing.
|
|
166
|
+
|
|
167
|
+
**Solution**:
|
|
168
|
+
- Test build script on Windows
|
|
169
|
+
- Fix any platform-specific issues
|
|
170
|
+
- Add Windows to CI build matrix
|
|
171
|
+
|
|
172
|
+
### 3.3 Pre-built Binaries
|
|
173
|
+
**Problem**: Building locally requires dev environment.
|
|
174
|
+
|
|
175
|
+
**Solution**:
|
|
176
|
+
- GitHub releases with macOS (arm64, x64), Linux, Windows builds
|
|
177
|
+
- Automated release workflow on tag
|
|
178
|
+
|
|
179
|
+
### 3.4 Docker Image
|
|
180
|
+
**Problem**: Cloud deployment requires manual setup.
|
|
181
|
+
|
|
182
|
+
**Solution**:
|
|
183
|
+
```bash
|
|
184
|
+
docker run -p 4000:4000 haltija/haltija
|
|
185
|
+
```
|
|
186
|
+
- Pre-built image with server ready
|
|
187
|
+
- Headless mode for CI environments
|
|
188
|
+
- Xvfb for headed mode in containers
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Phase 4: Enterprise Readiness (High effort, high impact for adoption)
|
|
193
|
+
|
|
194
|
+
What's needed for production deployment at scale.
|
|
195
|
+
|
|
196
|
+
**Approach**: Dogfood in real CI environment first. The items below are hypotheses - actual friction points will emerge from integration with real workflows (CI systems, Copilot, PR processes). Build what's actually needed, not what's imagined.
|
|
197
|
+
|
|
198
|
+
### 4.1 API Authentication
|
|
199
|
+
**Problem**: No auth on REST API. Anyone on localhost can control the browser.
|
|
200
|
+
|
|
201
|
+
**Solution**:
|
|
202
|
+
- Optional API key authentication
|
|
203
|
+
- Token-based auth for multi-user scenarios
|
|
204
|
+
- Configurable via environment variable or config file
|
|
205
|
+
|
|
206
|
+
### 4.2 Audit Logging
|
|
207
|
+
**Problem**: No record of what commands were executed.
|
|
208
|
+
|
|
209
|
+
**Solution**:
|
|
210
|
+
- Log all commands with timestamps
|
|
211
|
+
- Optional persistence to file or external service
|
|
212
|
+
- Queryable history: "What did the agent do in the last hour?"
|
|
213
|
+
|
|
214
|
+
### 4.3 Rate Limiting
|
|
215
|
+
**Problem**: Runaway agent could spam commands.
|
|
216
|
+
|
|
217
|
+
**Solution**:
|
|
218
|
+
- Configurable rate limits per endpoint
|
|
219
|
+
- Backpressure signaling to agents
|
|
220
|
+
- Circuit breaker for repeated failures
|
|
221
|
+
|
|
222
|
+
### 4.4 Multi-Browser Support
|
|
223
|
+
**Problem**: One browser per server instance.
|
|
224
|
+
|
|
225
|
+
**Solution**:
|
|
226
|
+
- Connection pooling for multiple browser instances
|
|
227
|
+
- Session isolation
|
|
228
|
+
- Parallel test execution
|
|
229
|
+
|
|
230
|
+
### 4.5 Automated Test Reports
|
|
231
|
+
**Problem**: Managers don't trust AI. They need to see the work.
|
|
232
|
+
|
|
233
|
+
**Solution**:
|
|
234
|
+
- Generate markdown or HTML reports after test runs
|
|
235
|
+
- "Checked 40 flows. Found 2 bugs."
|
|
236
|
+
- Screenshots and plain-English reproduction steps for failures
|
|
237
|
+
- Replaces Jira tickets with artifacts of proof
|
|
238
|
+
- Exportable for stakeholder review
|
|
239
|
+
|
|
240
|
+
### 4.6 "Signed/Safe" Enterprise Mode
|
|
241
|
+
**Problem**: Security teams hate "Magic Apps" that strip CSP.
|
|
242
|
+
|
|
243
|
+
**Solution**:
|
|
244
|
+
- Browser extension deployed via Group Policy
|
|
245
|
+
- Respects CSP but gets necessary access legitimately
|
|
246
|
+
- Checks the compliance box for enterprise security reviews
|
|
247
|
+
- Optional: extension-only mode (no CSP stripping)
|
|
248
|
+
|
|
249
|
+
### 4.7 Fleet Orchestration
|
|
250
|
+
**Problem**: Localhost is a ceiling for enterprise scale.
|
|
251
|
+
|
|
252
|
+
**Solution**:
|
|
253
|
+
- Spin up 50+ headless Haltija instances in Kubernetes
|
|
254
|
+
- Hammer staging environments in parallel
|
|
255
|
+
- "My personal AI assistant" β "Our CI/CD Infrastructure"
|
|
256
|
+
- Central management console for fleet status
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Phase 5: Cloud & CI Integration (High effort, transformative impact)
|
|
261
|
+
|
|
262
|
+
This is the 10/10 unlock.
|
|
263
|
+
|
|
264
|
+
### 5.1 Hosted Haltija Cloud
|
|
265
|
+
**Problem**: Requires local server for every user.
|
|
266
|
+
|
|
267
|
+
**Solution**:
|
|
268
|
+
- Hosted service: sign up, get API key, inject widget
|
|
269
|
+
- No local server needed
|
|
270
|
+
- Usage-based pricing
|
|
271
|
+
|
|
272
|
+
### 5.2 CI/CD Integration
|
|
273
|
+
**Problem**: Running in CI requires manual setup.
|
|
274
|
+
|
|
275
|
+
**Solution**:
|
|
276
|
+
- GitHub Action: `uses: haltija/action@v1`
|
|
277
|
+
- GitLab CI template
|
|
278
|
+
- Pre-configured for common setups (Next.js, Vite, CRA)
|
|
279
|
+
|
|
280
|
+
### 5.3 AI QA Agent
|
|
281
|
+
**Problem**: Users still have to write test specs.
|
|
282
|
+
|
|
283
|
+
**Solution**:
|
|
284
|
+
- Agent that explores app automatically
|
|
285
|
+
- Generates test plan from exploration
|
|
286
|
+
- Runs tests, reports failures in plain English
|
|
287
|
+
- Auto-fixes tests when UI changes intentionally
|
|
288
|
+
|
|
289
|
+
### 5.4 PR Integration
|
|
290
|
+
**Problem**: Test results are separate from code review.
|
|
291
|
+
|
|
292
|
+
**Solution**:
|
|
293
|
+
- PR comments with test results
|
|
294
|
+
- Screenshots of failures
|
|
295
|
+
- "This test broke because button moved from header to sidebar"
|
|
296
|
+
- Suggested fixes as PR suggestions
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## Phase 6: Ecosystem (Ongoing)
|
|
301
|
+
|
|
302
|
+
Build the moat through adoption.
|
|
303
|
+
|
|
304
|
+
### 6.1 Framework Integrations
|
|
305
|
+
- Next.js plugin
|
|
306
|
+
- Vite plugin
|
|
307
|
+
- Remix loader
|
|
308
|
+
- One-line setup for each framework
|
|
309
|
+
|
|
310
|
+
### 6.2 Test Framework Bridges
|
|
311
|
+
- Jest integration
|
|
312
|
+
- Vitest integration
|
|
313
|
+
- Export to Playwright format (escape hatch)
|
|
314
|
+
|
|
315
|
+
### 6.3 IDE Extensions
|
|
316
|
+
- VS Code extension: run Haltija tests from editor
|
|
317
|
+
- See test status inline with code
|
|
318
|
+
- Jump to failing element in browser
|
|
319
|
+
|
|
320
|
+
### 6.4 Community
|
|
321
|
+
- Discord/Slack for users
|
|
322
|
+
- Example repository with real-world patterns
|
|
323
|
+
- Blog posts on advanced usage
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Priority Matrix
|
|
328
|
+
|
|
329
|
+
| Phase | Effort | Impact | Do When |
|
|
330
|
+
|-------|--------|--------|---------|
|
|
331
|
+
| 1. Docs & Discovery | Low | High | Now |
|
|
332
|
+
| 2. Developer Experience | Medium | High | Next |
|
|
333
|
+
| 3. Platform Expansion | Low-Medium | Medium | β
Done |
|
|
334
|
+
| 4. Enterprise Readiness | High | Medium | Dogfood first |
|
|
335
|
+
| 5. Cloud & CI | High | Transformative | The 10/10 |
|
|
336
|
+
| 6. Ecosystem | Ongoing | Cumulative | Continuous |
|
|
337
|
+
| 7. Hosted Service | Medium | Business | The 11/10 |
|
|
338
|
+
|
|
339
|
+
---
|
|
340
|
+
|
|
341
|
+
## What Gets Us to 10/10 (and Beyond)
|
|
342
|
+
|
|
343
|
+
A product is 10/10 when it becomes the obvious default choice.
|
|
344
|
+
|
|
345
|
+
**We're at 9/10 now**: Best-in-class developer tool. GET support, `/key`, diff-on-action, simplified API.
|
|
346
|
+
|
|
347
|
+
**Phase 2 additions lock in developers**:
|
|
348
|
+
- "Watch and Learn" mode (zero-friction automation)
|
|
349
|
+
- Flight Recorder UI (visualize the AI's view)
|
|
350
|
+
- Skill Marketplace (community moat)
|
|
351
|
+
|
|
352
|
+
**Phase 4-5 unlocks enterprise**:
|
|
353
|
+
- Fleet orchestration (Kubernetes scale)
|
|
354
|
+
- Automated reports (artifacts of proof)
|
|
355
|
+
- Signed/Safe mode (compliance checkbox)
|
|
356
|
+
|
|
357
|
+
**Phase 5 gets us to 10/10**: AI QA in CI that just works. Push code, get human-readable test results, auto-fixed tests, real bug reports.
|
|
358
|
+
|
|
359
|
+
**Phase 7 gets us to 11/10**: Agent-as-a-Service. One curl command = AI controlling a browser. No setup, no MCP, no local Claude. Just:
|
|
360
|
+
```bash
|
|
361
|
+
curl https://yourco.haltija.net/do -d '{"task": "fill out the signup form"}'
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
The architecture makes this possible: we route messages, we don't run browsers. Near-zero marginal cost while competitors burn money on browser infrastructure.
|
|
365
|
+
|
|
366
|
+
---
|
|
367
|
+
|
|
368
|
+
## Phase 7: Hosted Service & Agent-as-a-Service (The 11/10)
|
|
369
|
+
|
|
370
|
+
This is what makes Haltija a business, not just a tool.
|
|
371
|
+
|
|
372
|
+
### The Architecture Insight
|
|
373
|
+
|
|
374
|
+
**Why this is cheap to run:**
|
|
375
|
+
- Competitors (Browserbase, Playwright Cloud) host actual browsers = $$$
|
|
376
|
+
- Haltija just routes messages between agent and browser
|
|
377
|
+
- Browser runs on customer's machine/CI (they pay for compute)
|
|
378
|
+
- Our relay is WebSocket routing = pennies
|
|
379
|
+
|
|
380
|
+
**Cost projection:**
|
|
381
|
+
| Users | Concurrent Sessions | Monthly Cost |
|
|
382
|
+
|-------|---------------------|--------------|
|
|
383
|
+
| 1,000 | ~200 | ~$5 |
|
|
384
|
+
| 10,000 | ~2,000 | ~$20 |
|
|
385
|
+
| 100,000 | ~20,000 | ~$50 |
|
|
386
|
+
|
|
387
|
+
That's 95%+ margins on the relay itself.
|
|
388
|
+
|
|
389
|
+
### 7.1 Core Infrastructure
|
|
390
|
+
|
|
391
|
+
**Firebase stack (known quantity):**
|
|
392
|
+
- **Auth**: Firebase Auth (OAuth, email, API keys for CI)
|
|
393
|
+
- **Database**: Firestore for users, subscriptions, test definitions, run history
|
|
394
|
+
- **Storage**: Firebase Storage for recordings, screenshots, reports
|
|
395
|
+
- **Hosting**: Firebase Hosting for dashboard UI
|
|
396
|
+
|
|
397
|
+
**Relay service (Fly.io):**
|
|
398
|
+
- Lightweight WebSocket routing
|
|
399
|
+
- Scales horizontally
|
|
400
|
+
- Global edge locations
|
|
401
|
+
- ~$20/mo handles thousands of customers
|
|
402
|
+
|
|
403
|
+
### 7.2 Domain Structure
|
|
404
|
+
|
|
405
|
+
```
|
|
406
|
+
haltija.dev - marketing site, docs
|
|
407
|
+
app.haltija.dev - dashboard (Firebase Hosting)
|
|
408
|
+
api.haltija.dev - shared API (free tier, auth via token)
|
|
409
|
+
|
|
410
|
+
*.haltija.net - customer-specific endpoints
|
|
411
|
+
acme.haltija.net - Acme Corp's dedicated relay
|
|
412
|
+
initech.haltija.net - Initech's dedicated relay
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
**Benefits of customer subdomains:**
|
|
416
|
+
- Session isolation (can't accidentally route to wrong customer)
|
|
417
|
+
- Natural CORS scoping
|
|
418
|
+
- Per-customer rate limiting
|
|
419
|
+
- Premium feel for enterprise
|
|
420
|
+
|
|
421
|
+
### 7.3 Payments & Subscriptions
|
|
422
|
+
|
|
423
|
+
**Stripe integration:**
|
|
424
|
+
- Usage-based pricing model
|
|
425
|
+
- Metered billing on commands/test runs
|
|
426
|
+
|
|
427
|
+
**Proposed tiers:**
|
|
428
|
+
| Tier | Price | Limits |
|
|
429
|
+
|------|-------|--------|
|
|
430
|
+
| Free | $0 | 1K commands/mo, 10 test runs |
|
|
431
|
+
| Pro | $29/mo | 50K commands/mo, 500 test runs |
|
|
432
|
+
| Team | $99/mo | 500K commands/mo, unlimited tests |
|
|
433
|
+
| Enterprise | Custom | Unlimited, SLA, dedicated subdomain |
|
|
434
|
+
|
|
435
|
+
### 7.4 Telemetry & Analytics
|
|
436
|
+
|
|
437
|
+
**Instrument Haltija to learn what works:**
|
|
438
|
+
|
|
439
|
+
```
|
|
440
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
441
|
+
β Telemetry Events β
|
|
442
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
|
|
443
|
+
β Usage: command_invoked, test_run_started, test_passed β
|
|
444
|
+
β Utility: command_success_rate, avg_response_time β
|
|
445
|
+
β Usability: command_retry_count, error_frequency, feedback β
|
|
446
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Per-command tracking:**
|
|
450
|
+
- Invocation count
|
|
451
|
+
- Success/failure rate
|
|
452
|
+
- Average latency
|
|
453
|
+
- Common error messages
|
|
454
|
+
- Retry patterns (agent retried 3x = friction signal)
|
|
455
|
+
|
|
456
|
+
### 7.5 Agent Feedback Endpoint
|
|
457
|
+
|
|
458
|
+
Let agents report friction directly:
|
|
459
|
+
|
|
460
|
+
```
|
|
461
|
+
POST /feedback
|
|
462
|
+
{
|
|
463
|
+
"type": "friction" | "suggestion" | "error",
|
|
464
|
+
"context": "tried to click dropdown but it was inside shadow DOM",
|
|
465
|
+
"command": "/click",
|
|
466
|
+
"severity": "medium"
|
|
467
|
+
}
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
**Dashboard aggregates:**
|
|
471
|
+
- "Agents retry /click 40% more when targeting shadow DOM"
|
|
472
|
+
- "Common friction: form submission timing"
|
|
473
|
+
- "Feature request: better iframe support (12 reports)"
|
|
474
|
+
|
|
475
|
+
### 7.6 Magic Token: Agent-as-a-Service
|
|
476
|
+
|
|
477
|
+
**The killer feature - zero config agents:**
|
|
478
|
+
|
|
479
|
+
Current setup requires:
|
|
480
|
+
1. Install Claude Desktop / configure MCP
|
|
481
|
+
2. Get API keys from Anthropic
|
|
482
|
+
3. Configure the MCP server
|
|
483
|
+
4. Figure out the system prompt
|
|
484
|
+
5. Connect to Haltija
|
|
485
|
+
|
|
486
|
+
**Magic token flow:**
|
|
487
|
+
1. Sign up at haltija.dev
|
|
488
|
+
2. Add your Anthropic key (stored encrypted)
|
|
489
|
+
3. Get a magic token
|
|
490
|
+
4. Done:
|
|
491
|
+
```bash
|
|
492
|
+
curl https://yourco.haltija.net/do \
|
|
493
|
+
-H "Authorization: Bearer xxx" \
|
|
494
|
+
-d '{"task": "click the login button"}'
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
**Architecture:**
|
|
498
|
+
```
|
|
499
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
500
|
+
β haltija.net (hosted) β
|
|
501
|
+
β βββββββββββ βββββββββββ βββββββββββ β
|
|
502
|
+
β β Auth βββββΆβ Agent βββββΆβ Relay βββββββββββββββββββΌβββΆ Browser
|
|
503
|
+
β β + Keys β β (Claude)β β β β (your machine)
|
|
504
|
+
β βββββββββββ βββββββββββ βββββββββββ β
|
|
505
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
506
|
+
β²
|
|
507
|
+
β
|
|
508
|
+
curl/REST (your CI, scripts, whatever)
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
**What this enables:**
|
|
512
|
+
- **Zero config agents** - no MCP setup, no local Claude
|
|
513
|
+
- **API-first automation** - natural language over REST
|
|
514
|
+
- **Composable** - chain from shell scripts, CI, webhooks
|
|
515
|
+
- **Key management** - one place for API keys, rotate easily
|
|
516
|
+
|
|
517
|
+
**Pricing options:**
|
|
518
|
+
- Bring your own key: just pay relay costs
|
|
519
|
+
- Use our pool: markup on token usage (like OpenRouter model)
|
|
520
|
+
|
|
521
|
+
### 7.7 Bookmarklet + HTTPS
|
|
522
|
+
|
|
523
|
+
**HTTPS is non-negotiable** for the hosted service:
|
|
524
|
+
- Bookmarklet can `fetch()` from any page without CSP blocking
|
|
525
|
+
- WebSocket upgrades work (`wss://`)
|
|
526
|
+
- No mixed-content warnings
|
|
527
|
+
- Agents in CI connect without cert hacks
|
|
528
|
+
|
|
529
|
+
**Magic bookmarklet flow:**
|
|
530
|
+
1. User clicks bookmarklet on any page
|
|
531
|
+
2. Widget injected, connects to `wss://api.haltija.dev/ws?token=xxx`
|
|
532
|
+
3. Agent can now control that browser from anywhere
|
|
533
|
+
|
|
534
|
+
Use case: "Click this bookmarklet and I can see your browser" for remote debugging/support.
|
|
535
|
+
|
|
536
|
+
### 7.8 Dashboard
|
|
537
|
+
|
|
538
|
+
**What users see:**
|
|
539
|
+
- Active sessions (which browsers connected)
|
|
540
|
+
- Usage metrics (commands, test runs, costs)
|
|
541
|
+
- Telemetry insights (what's working, what's failing)
|
|
542
|
+
- Feedback inbox (agent-reported friction)
|
|
543
|
+
- Test history and reports
|
|
544
|
+
- API key management
|
|
545
|
+
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
## The Business Model
|
|
549
|
+
|
|
550
|
+
**Why this works:**
|
|
551
|
+
|
|
552
|
+
1. **Near-zero marginal cost** - we route messages, we don't run browsers
|
|
553
|
+
2. **Competitor moat** - they're stuck with expensive browser infrastructure
|
|
554
|
+
3. **Usage-aligned pricing** - customers pay for value delivered
|
|
555
|
+
4. **Enterprise upsell** - dedicated subdomains, SLAs, compliance
|
|
556
|
+
|
|
557
|
+
**Revenue projection (conservative):**
|
|
558
|
+
- 100 Pro Γ $29 = $2,900/mo
|
|
559
|
+
- 10 Team Γ $99 = $990/mo
|
|
560
|
+
- Infrastructure: ~$100/mo
|
|
561
|
+
- Margin: ~95%
|
|
562
|
+
|
|
563
|
+
**The real insight:** A week to build the core product. Another week or two for hosted service MVP. Competitors maintain Kubernetes clusters of browsers.
|
|
564
|
+
|
|
565
|
+
---
|
|
566
|
+
|
|
567
|
+
## Non-Goals
|
|
568
|
+
|
|
569
|
+
Things we're explicitly not building:
|
|
570
|
+
|
|
571
|
+
- **General browser automation tool**: Playwright exists. We're AI-first.
|
|
572
|
+
- **Screenshot-based testing**: DOM is the source of truth, not pixels.
|
|
573
|
+
- **Record-and-replay only**: The AI understands, it doesn't just mimic.
|
|
574
|
+
- **Selenium replacement**: Different philosophy, different audience.
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
## Success Metrics
|
|
579
|
+
|
|
580
|
+
**How we know we've hit 10/10:**
|
|
581
|
+
- Teams choosing Haltija over Playwright for new projects
|
|
582
|
+
- "We deleted our E2E test suite and use Haltija" case studies
|
|
583
|
+
- AI QA catching real bugs before users do
|
|
584
|
+
- PR comments from Haltija that developers actually read
|
|
585
|
+
|
|
586
|
+
**How we know we've hit 11/10:**
|
|
587
|
+
- Customers using `/do` endpoint without ever installing anything locally
|
|
588
|
+
- Revenue from hosted service exceeds infrastructure costs by 10x+
|
|
589
|
+
- Agent feedback endpoint surfacing real product insights
|
|
590
|
+
- "I just curl Haltija" becomes a thing people say
|
|
591
|
+
- Startups building products on top of the Haltija API
|