haltija 1.13.0-beta.4 → 1.13.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/CHANGELOG.md CHANGED
@@ -1,5 +1,114 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.13.0 (2026-10-18)
4
+
5
+ The 1.13 betas, released. Read **Security** and **Upgrading from 1.12** before moving off 1.12.x.
6
+ The beta sections below have the detail and the reasoning; this section is the list. The changes
7
+ made after beta.5 are at the end.
8
+
9
+ ### Security
10
+
11
+ - **Through 1.12.9, anything on your network could drive your browser.** The server listens on
12
+ every interface and, without `--token`, answered any machine, `/eval` included. Affected: every
13
+ release through **1.12.9** (the previous `latest`) and **1.13.0-beta.1 to beta.4**. In 1.13.0 a
14
+ connection from another machine is refused (403) unless the server has a token (virta #815,
15
+ GitHub #44; first shipped in beta.5). If you stay on 1.12.x, start the server with `--token
16
+ <secret>` on any network you don't trust.
17
+ - **Pages on this machine can still call the API, and that is by design.** beta.1 listed this as a
18
+ known issue with "an origin gate planned before 1.13.0". That gate is not coming: the widget is
19
+ injected into arbitrary pages, so the REST surface must answer any origin, and an origin check
20
+ would break exactly the pages haltija exists for. `--token` closes it, as it closes a tunnel or
21
+ reverse proxy running on this machine (which connects from localhost). The README's Security
22
+ section says what is and isn't covered.
23
+
24
+ ### Upgrading from 1.12
25
+
26
+ Each of these changes something that worked before. Before → after:
27
+
28
+ - **Other machines need a token.** Phones, headsets, other computers, and browsers in a container,
29
+ VM or WSL2 that reach haltija through a forwarded port: they connected freely, and now get a 403
30
+ until the server has `--token <secret>` and the client sends it (beta.5).
31
+ - **Both transports by default.** `DEV_CHANNEL_MODE` was `http`; it is `both`, so HTTPS 8701 comes
32
+ up too. `--http` opts out, and says what that costs other projects (beta.1).
33
+ - **The certificate lives in `~/.haltija/certs`.** It was per-install; an existing one is copied
34
+ forward, so trust you already granted survives (beta.1).
35
+ - **The desktop app's internal server moved from 8701 to 8710.** `HALTIJA_PORT=8701 hj tree`
36
+ (inspecting the app's own UI) is now `HALTIJA_PORT=8710 hj tree` (beta.1).
37
+ - **Only the server on 8700 takes HTTPS 8701.** A `--port` / `--name` server's HTTPS is now
38
+ ephemeral, shown in its banner and `/status`, unless you pass `--https-port` (beta.1).
39
+ - **`server` from `haltija/server` is the HTTP listener**, and `server`, `httpServer` and
40
+ `httpsServer` are typed `ListeningServer` (`port`, `hostname`, `url`, `stop()`) instead of
41
+ Bun's server type. Code that used other Bun server methods on them needs a cast (beta.1).
42
+ - **Navigate and refresh wait for the page's widget.** They returned at once; now they block until
43
+ the widget reconnects, up to `--timeout` (default 10 s). A page that doesn't load the widget
44
+ itself (a bookmarklet tab) waits that long every time: pass `--no-wait` there. `navigate()` and
45
+ `refresh()` in `DevChannelClient` / `haltija/test` now return `{ reconnected, warning? }` (beta.2).
46
+ - **The widget writes `window.name` while navigating**, and restores the page's own value after.
47
+ An app that keeps state in `window.name` can see the marker briefly (beta.2).
48
+ - **`press` acts at the focused element.** In `haltija/test` and `DevChannelClient.press` it was one
49
+ `keydown` at `body`; now it is the full key sequence at the focused element, like `hj key`
50
+ (beta.4).
51
+ - **Schematics are drawn by tosijs-floorplan.** Same response fields; the picture looks different
52
+ (beta.5).
53
+
54
+ ### Fixed after beta.5
55
+
56
+ From the 1.13.0 release review (`reviews/1.13.0-*.md`):
57
+
58
+ - **A refused connection from another machine is now logged on the server**, once per address, with
59
+ the `--token` remedy. A browser cannot read why a WebSocket handshake failed, so a widget in a
60
+ container or VM retried forever while the server said nothing.
61
+ - **`DevChannelClient` and `haltija/test` send `HALTIJA_TOKEN`.** `hj` and the MCP bridge always
62
+ did; these two never did, so a test suite could not reach a `--token` server at all, which since
63
+ beta.5 is the setup for any runner on another machine.
64
+ - **`haltija --token=<secret>` sets a token.** The launcher read only `--token <secret>`, so the `=`
65
+ form, like a misspelled flag, started a server with no token and no complaint. `--flag=value` now
66
+ works for every launcher flag that takes a value, an unknown flag is reported, and the banner has
67
+ an `AUTH:` line saying whether a token is in force.
68
+ - **`/drag`, `hj drag` and the `drag` step move pointer-driven controls.** They sent bare mouse
69
+ events (some of them `CustomEvent`s with no coordinates), so a slider, resize handle or orbit
70
+ camera that listens for pointer events didn't move while the drag reported success. They now use
71
+ the same pointer-and-mouse sequence as `dragFrom`, with `buttons` set while pressed.
72
+ - **MCP setup replaces a stale entry.** Before 1.13 setup wrote `node …/apps/mcp/build/index.js`,
73
+ which no longer exists. `--check` reported such an entry as configured, and re-running setup said
74
+ "already configured". Both now call it stale, and setup rewrites it. The help named
75
+ `npx haltija-mcp-setup`, a package that does not exist; it is `npx -p haltija haltija-mcp-setup`.
76
+ - **The `test:integration` lane runs its tests.** It needed a server it was never given, so every
77
+ 1.13 beta attested "0 pass, 11 skip" as a pass. It now starts its own private headless instance,
78
+ and a lane that only skipped fails.
79
+ - Docs: the README no longer shows a demo image that doesn't exist, and links the API reference and
80
+ the browser-test guide (`docs/TEST-IN-BROWSER.md`).
81
+
82
+ ## 1.13.0-beta.5 (2026-10-18)
83
+
84
+ ### Changed
85
+
86
+ - **Schematics are drawn by tosijs-floorplan** (virta #873). `hj map --image`, `hj screenshot
87
+ --schematic` and the no-capture fallback used haltija's own ~600-line renderer. haltija now emits
88
+ floorplan's record format and floorplan draws it, so haltija and tosijs share one renderer and one
89
+ affordance grammar. The response is unchanged: same fields, same `legend`, and refs still drawn as
90
+ dark pills. What looks different: captions show content instead of tag names (`Place order`, not
91
+ `@18 button Place order`), long text wraps to the box, checkboxes and radios are drawn as
92
+ geometry, an editable region wears a `↔` badge, and findings are short coloured bars on the left
93
+ edge (`contrast 1.1:1`, `target 16x16`) with the full text in the legend. A map with no geometry,
94
+ or `layout: 'structural'`, is still drawn as stacked boxes by haltija, since floorplan draws only
95
+ what has bounds. The widget is about 3 KB larger gzipped.
96
+ - **Page text can no longer pose as a binding** (virta #816). In the record format, `text ⟷ path`
97
+ means "two-way bound to path", and haltija copied page text into its map verbatim, so a page
98
+ could make its own text read as a writable binding. The `⟷` and `⟵` arrows in page text, labels,
99
+ values and placeholders now become `<->` and `<-` as the map is built. Link destinations are kept
100
+ verbatim.
101
+ - **Without `--token`, haltija refuses connections from other machines** (virta #815, GitHub #44).
102
+ The server listens on every interface, and anything on your network could drive your browser,
103
+ `/eval` included, unless you had thought to pass `--token`. Now a request or socket whose peer
104
+ address is not loopback gets a 403 that says to restart with `--token`. Same-machine use is
105
+ unchanged. To keep using haltija from another device (a phone, a headset, a second computer), start
106
+ it with `--token <secret>` and send the token as before. The check uses the connection's address,
107
+ never a header the caller writes.
108
+ - What it does not change, now said plainly in the README: a page you visit on this machine can
109
+ still call the API (the widget's whole job), and a tunnel or reverse proxy on this machine
110
+ connects from localhost, so it counts as local. Use `--token` for either.
111
+
3
112
  ## 1.13.0-beta.4 (2026-10-17)
4
113
 
5
114
  ### Added
package/README.md CHANGED
@@ -8,9 +8,6 @@
8
8
 
9
9
  Unlike screenshot-based tools, Haltija works with the actual DOM. Unlike Playwright, it connects to your real browser — already logged in, same cookies, same bug you're looking at.
10
10
 
11
- <!-- TODO: Replace with actual GIF showing: 1) bunx haltija launches app, 2) agent queries tree, 3) agent clicks something, 4) highlight shows result -->
12
- ![Haltija in action](docs/assets/demo.gif)
13
-
14
11
  > *Haltija* (Finnish): a guardian spirit that watches over a place. In this case, your DOM.
15
12
 
16
13
  ---
@@ -333,10 +330,18 @@ app also exists but isn't required for either.
333
330
 
334
331
  - Widget is always visible (no silent snooping)
335
332
  - User can pause or kill connection anytime
336
- - **Not localhost-only.** The server listens on all interfaces (HTTP 8700 and HTTPS 8701 by
337
- default), and without `--token` any page you visit, or anything on your network, can call its
338
- REST API — including `/eval` in your connected tabs. Use `--token <secret>` (or
339
- `HALTIJA_TOKEN`) on any network you don't trust, and don't leave a server running you aren't
333
+ - **Other machines need `--token`.** The server listens on all interfaces (HTTP 8700 and HTTPS
334
+ 8701 by default), but without a token it refuses every connection that doesn't come from this
335
+ machine. To use haltija from another device (a phone, a headset, a second computer), start it
336
+ with `--token <secret>` (or `HALTIJA_TOKEN`) and send the same value as `X-Haltija-Token`,
337
+ `?token=`, or the widget's `token` option. A browser in a container, VM or WSL2 that reaches
338
+ haltija through a forwarded port also counts as another machine. The server's terminal names
339
+ each refused address once.
340
+ - **On this machine, any page you visit can call it.** The widget is injected into arbitrary
341
+ pages, so the REST API answers any origin, `/eval` in your connected tabs included. That is by
342
+ design for a local dev tool, and `--token` closes it too. A tunnel or reverse proxy on this
343
+ machine (ngrok, cloudflared, `ssh -R`) connects from localhost and so counts as this machine:
344
+ if you expose haltija through one, pass `--token`. Don't leave a server running you aren't
340
345
  using.
341
346
  - Machine-level HTTPS certificate in `~/.haltija/certs`, auto-generated (mkcert if installed,
342
347
  otherwise openssl) and renewed before it expires
@@ -405,10 +410,11 @@ hj api # Full API reference (markdown)
405
410
  hj --help # CLI subcommand reference
406
411
  ```
407
412
 
408
- - [Full API Reference](./API.md) (auto-generated from schema)
413
+ - [Full API Reference](https://github.com/tonioloewald/haltija/blob/main/API.md) (auto-generated from schema)
409
414
  - [Agent Prompt](docs/agent-prompt.md) — Copy-paste prompt for any AI agent
410
415
  - [Recipes](docs/recipes.md) — Common workflows
411
416
  - [CI Integration](docs/CI-INTEGRATION.md) — E2E testing with Haltija in GitHub Actions
417
+ - [Browser tests from your test runner](docs/TEST-IN-BROWSER.md) — `createBrowserPage` from `haltija/test`: assertions on the host, probes in a real browser
412
418
  - [Roadmap](docs/ROADMAP.md)
413
419
 
414
420
  ---
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "haltija-desktop",
3
- "version": "1.13.0-beta.4",
3
+ "version": "1.13.0",
4
4
  "private": true,
5
5
  "description": "Haltija Desktop - God Mode Browser for AI Agents",
6
6
  "homepage": "https://github.com/tonioloewald/haltija",