Repository navigation
v0.0.23 — The page a human can open, and one flag for agents
v0.0.23 — The page a human can open, and one flag for agents
Two gaps this release closes were found by reading the competition, not by
guessing: lsq hands out a share link that opens in any browser, and lsend
has --json everywhere with an agent-shaped docs command. Both were real.
A share link a browser can actually open
$ zapsend receive --share ./photos --pin 424242
sharing ./photos (Download API on)
$ curl -k https://box:53317/
<!doctype html>… <table><tr><td><a href="/api/localsend/v2/download?…">report.txt</a></td>…
GET / now serves a plain page: every shared file, its size, and a link that
downloads it. Same port, same PIN, same listener — no extra port and no extra
surface. Without --share there is no page at all (still 404).
- no scripts, no fonts, no CDN: it has to work on a network with no internet
- file names are HTML-escaped, links are percent-encoded, so
evil <b>.txtis
a name, not markup - the PIN rides in the query string (
/?pin=…), because a browser cannot send a
header of our invention; wrong PIN gets a form, not a hint - the download links carry the same short-lived session id as the API, so a page
open for an hour is not an open file server
ZAPSEND_JSON=1
--json was already on every one-shot command, but an agent driving ten commands
had to remember ten flags. The environment variable sets it once:
export ZAPSEND_JSON=1
zapsend discover | jq -r '.devices[].alias'Auto-detecting a pipe, the way lsend does, was considered and rejected: it
would silently rewrite the output of every script that already reads ours.
Verified
test_page.sh: 22 checks — page only with--share, listing flat and
nested files, name escaping, real downloads with matching SHA-256,../and
dotfile requests refused, unknown session 403, PIN form / right PIN / wrong
PIN, env JSON on and off.- Full suite: 15 unit, 31 compat, 28 json, 25 pull-resume, 29 hosts, 19 pull,
17 resume, 52 fan-out, 25 sync, 22 page, 11 interop. - WinPE 10.0.26100.1742 (round 16):
--version0.0.23,send3,000,000 B
exit 0 against a share-enabled receiver. The page itself was not fetched
from that environment — WinPE ships neithercurlnor PowerShell — so browser
rendering is verified on Linux only.