Taking back a site had one way in: a button in Settings under Deploy, which said
the same thing to everybody and could not say whether anything was actually
waiting. On the gateway this was built for, two people out of eight hundred and
seven have used it.
The moment it is needed is the one somebody types a name they used to own, and
until now that moment did the opposite — the name came back taken and the button
went dead, because a name being held for its previous owner looks exactly like a
stranger's to anyone who does not ask. The gateway can now be asked, so the field
says the name is being held for them and offers the step that gets it back, in
place of a refusal with nowhere to go. The deploy dialog owns that list rather
than the field, because one recognised name is rarely all somebody has waiting.
npanel also refuses to add a name it is holding, saying to take it back instead —
a sentence that was being shown as a flat red alert with no way to act on it.
That refusal now carries the same offer.
And the settings card asks how many are waiting instead of guessing. It costs a
signature on a page nobody asked to sign on, which is the thing this deliberately
did not do before; the difference is that it is now two counted rows rather than
a read of every claimed deploy, and that the card says nothing at all unless
there is something to say. A card that cannot tell whether it applies to you is
one most people learn to ignore before it ever does.
The deploy form asked the gateway whether a name was free, which is not the
question it needed answered. A name somebody recovered in the migration is
theirs, is already serving their site, and came back "taken" — so the button
went dead with "That name is taken on shakespeare.wtf. Try another." about their
own site. Every name anyone took back was in this state: a hundred and four of
them for one person.
The form had an escape hatch for exactly this, and it was too narrow. It knew a
name was the user's own only if this project had deployed to it before, read out
of the project's own deploy record. A name recovered through the migration dialog
has no such record — the site was published, the hostname repointed, and nothing
about it ever went through this form.
So the question is asked properly instead. The anonymous ask happens first and is
usually the end of it, because a name somebody is picking is usually free. Only a
name that comes back taken is asked about again with a signature, which is the
one branch where the distinction exists and the one place worth spending a remote
signer on. A gateway too old to answer the second question leaves the first
answer standing, which is the behavior as it was.
The deploy itself never needed fixing: bindHostname asks for the host, is given
it, finds it already points where it is about to point, and returns. The form was
the only thing in the way.
Also compares the saved name trimmed, since that is what gets deployed — a
trailing space is not a different name, and typing one told people their own site
was somebody else's.
Three things the migration got wrong, all of them the same shape: something was
known and not said.
The archive titled every site it carried after the site's hostname, because an
address was all it knew about a site it had only ever seen at one. Handing that
back hands back an address where a name should be — a site called "Arguable"
comes home titled "arguable.shakespeare.wtf". The gateway can now read the name
the site was carrying all along, out of its webmanifest or the metadata it
publishes for link previews, and that is what gets signed. A site that never
said what it is called gets no title, which is what a manifest without one has
always meant. Its `alt` goes too: it says the site is archived so that it keeps
working, which is a true sentence about the archive and stops being true here.
Names already taken back are listed and fixed the same way, rebuilt from the
event as relays hold it rather than from the gateway's copy — a site redeployed
since the migration ran has moved on, and rebuilding it from what the gateway
fetched would quietly restore an older version of it.
Publishing to relays went through a pool that resolves on the first acceptance
and discards every other answer, so a manifest that reached one relay out of
five was reported exactly like one that reached all five, and the reasons the
other four refused were received and thrown away. Of 102 manifests published
this way in one sitting, one relay held every one and another held none, and
nothing anywhere said so. Every relay is now published to on its own and
reported on by name. One acceptance is still a success — the event exists and
whoever reads that relay will find it — so this is a note, not a failure.
The gaps that leaves are closed without signing anything: the events go out
again exactly as they are, ids and signatures unchanged, to the relays whose own
answer says they are missing them. A relay that already has one says duplicate
and nothing happens; a relay that refused before finally says why, which is the
only way to hear a reason that was discarded at the time.
Ordinary nsite deploys published the same blind way, so they use the same
helper and carry the same coverage.
Lastly, names more than one label under the gateway's domain are refused rather
than published for. A wildcard certificate covers one label, so `a.b.example.com`
can be claimed, published for, and will still fail its handshake for everyone
forever. Five are on file, inherited from a host that accepted them; one already
has a manifest published for it, which can now be retracted.
The domains Shakespeare Deploy published to are now served by a gateway that
took them over, and the sites already under those names had to keep working, so
they were republished under an archive key rather than left to break. That key
is not theirs. This is how it stops speaking for them: the gateway holds a
record of who each name is waiting for, they publish their own copy of the site,
and the name is repointed at it.
All of it at once, because the person with one name to recover is not the person
this is for. Doing it a site at a time through the deploy button would mean
re-deploying a hundred projects, most of which are no longer checked out
anywhere, to recover sites whose files the gateway already has.
The list is only reached by asking, never on page load: finding out what is
waiting costs a signature, and a signing prompt nobody asked for is worse than a
button that sometimes opens an empty list.
A name whose site was always published under its owner's key needs nothing
republished — the record is the whole migration. The rest need the archived
manifest signed again, which reproduces the site exactly, since a manifest is
its tags and the blobs are addressed by hash and already sit where the server
tags say. Publishing happens before claiming, so the name never points at an
event the gateway has not fetched.
What a name must never do is come back at the cost of a live one. Kind 35128 is
addressable, so republishing an archived snapshot at a `d` tag someone already
publishes under would replace the current site with an old copy of itself —
which is not hypothetical: two of the first hundred names looked at were exactly
that. Those are claimed straight to the site that already exists, so both names
end up serving it. Working that out needs relays to answer, so silence from them
is treated as silence and not as "publishes nothing": a user whose own sites the
gateway is already serving must see at least those come back, or nothing is
planned at all.
Also fixes ProviderConfigDialog, which had grown a relay list and a server list
and no height limit, and was pushing its own Save button off the bottom of the
screen with no way to scroll to it.
Shakespeare Deploy uploaded a zip to a host that kept the files itself. That
host has been replaced: those domains are served out of nsite manifests, so a
deploy through the old API has been succeeding and changing nothing anyone can
see. This replaces it.
NpanelAdapter is NsiteAdapter plus a name. The site is an ordinary nsite under
the user's own key — same event, readable by any nsite client, gateway or no
gateway — and the second half of the deploy asks the gateway to point a hostname
at it. Its predecessor claimed names implicitly, by watching relays and
reserving whichever d tag it saw first; this one keeps an explicit row, which is
what makes a name something its owner holds rather than something they won a
race for. The hostname is asked about before it is claimed, because "nobody
holds this", "I already hold this" and "somebody else holds this" are three
different acts and creating-then-reading-the-409 cannot tell the last two apart.
The name field checks availability as you type, against an endpoint that takes
no credentials: somebody choosing a name has not decided to make an account yet.
A name this project already deployed to is not reported as taken — it is theirs.
An unreachable gateway reports available, because being wrong that way costs a
clear error at deploy time, and being wrong the other way tells someone a free
name is taken and they settle for worse.
Also fixes readDeploySettings, which swallowed a missing file and an unreadable
one alike and answered "no providers" to both. The default provider it was meant
to hand new users had therefore never reached anybody: it was written, saved
back as an empty list on the next render, and gone. The two cases are now
distinct, because inventing defaults for a file that exists but will not parse
would silently replace whatever the user had.
Providers and per-project deploy records saved under the old type are migrated
on load rather than dropped. The project file holds one record per provider a
project ever deployed to, so rejecting one entry would take a Netlify site id
and a Vercel project id with it.
Verified end to end against the live gateway: a fresh key self-enrolled,
uploaded a blob, published a manifest, claimed a name, and the site served
publicly with the SPA fallback working on a deep path.
The package-lock version bump is npm reconciling it with package.json, which
had drifted before this work.
The runner image turned out to carry no nsyte at all, so every deploy
took the download fallback and ran 0.27.2, whose nostr-tools refuses to
NIP-44 encrypt a payload over 64 KiB. Signing a site manifest through
the bunker fails outright there. 0.28.0 is the first release with the
fix, and it is now baked into the image.
`command -v nsyte` also left the pin unenforceable: a baked binary of
any vintage won silently, which is how deploys kept running 0.27.2 long
after the pin moved. The check now compares versions and treats the pin
as a floor, so a newer image still wins but an older one is replaced.
0.6.6 enforces the nostrconnect handshake secret. Previously a signer
could answer the connect request with result: "ack" and skip proving it
could decrypt the secret, so any relay-connected party who saw the
nostrconnect URI could claim the session and become the user's signer.
The 0.6.6 NostrLoginProvider now resolves stored logins on a microtask
(rendering a null fallback until storage resolves) rather than
synchronously. Component/hook tests render and query immediately, so
they observed an empty tree. Mock @nostrify/react/login in the test
setup with a synchronous provider and matching useNostrLogin hook,
passing every other export (NLogin, NUser, the connect helpers) through
from the real module untouched.
Zapping asked the recipient's LNURL-pay server for an invoice and paid
whatever came back, checking only that it was a non-empty string. The
server is chosen by the recipient, so anyone who posts a note and runs
their own endpoint decided how much their victims paid — after the
victim had already approved a figure. The success toast reported the
requested amount rather than the paid one, so an overcharge left no
trace in the UI either.
Add a BOLT11 decoder (bech32 + tagged fields, on @scure/base and
@noble/hashes, both already bundled via nostr-tools) and require the
returned invoice to charge exactly the millisats the user approved.
Amountless invoices are rejected outright. The check runs before the
NWC, WebLN and QR paths alike, and useNWC's sendPayment now takes the
approved amount and re-checks it, so no future caller can hand the
wallet an unvetted invoice.
Resolve LNURL-pay in-repo instead of via nip57.getZapEndpoint, which
returns only the callback URL and discards everything used to validate
the response: HTTPS is now required for both the LNURL and the callback
it names, the advertised minSendable/maxSendable are honoured, and the
invoice's description hash is checked against the zap request (NIP-57)
or the endpoint metadata (LUD-06) when it carries one.
Report the decoded amount in the success toast so it can never
understate a spend.
Adapted from Alex Gleason's ditto commit 6e062450.
From this coordinator the 115 MB release download fails about half the
time, mid-transfer, with an SSL record-mac error; curl's own --retry does
not help because each attempt breaks identically. Loop the fetch, force
HTTP/1.1, and run the binary before accepting it.
The durable fix is baking nsyte into the CI image.
It has failed here with "SSL_read: decryption failed or bad record mac",
which curl does not treat as retryable. Also -f, so an HTTP error page is
never saved as the binary, and a version check to catch a truncated one.
Replaces the GitLab deploy and deploy-nsite jobs. The old nsite job published
under a personal npub; the signing pubkey is the site address, so this one
lives in the Team Soapbox namespace and is served by npanel.
Single self-contained recovery action: consolidates all git pack files
into one pack of every reachable object (from all branches, tags,
remotes, stash, and HEAD), removes the old packs and redundant loose
objects, and reports the size reduction in a toast. Shows a spinner
while running.
All logic (UI, gc algorithm, run state) lives in one new file; the only
other change is its render line in ProjectTitleMenu, so the feature can
be removed by deleting the file and that line.
Safety guarantees: the repository is left completely untouched if any
object fails to read during the reachability walk (an already-damaged
repo can never lose history), and also if the new undeltified pack
would not actually shrink the repo (isomorphic-git's packObjects does
no delta compression, so repacking a server-deltified clone could
otherwise grow it permanently).
Root cause of the Tailwind v4 'Missing closing } at font-face' runtime
error: font assets imported via a CSS @import (e.g. @fontsource packages)
were emitted as url(https://esm.sh/*@fontsource/...woff2). The /* from
esm.sh's wildcard ('externalize all deps') prefix sits inside an unquoted
url(), and the in-browser Tailwind v4 tokenizer misreads it as the start of
a CSS comment, scanning past the rule's closing } and throwing.
esm.sh's '*' only affects JS module builds; for raw static assets it is
meaningless and the same file is served without it. Strip the '/*' prefix
from externalized asset URLs (and ?url asset imports) so emitted CSS url()
values are parseable by all CSS parsers, not just the ones tolerant of
'/*' inside url(). JS module URLs are untouched.
Adds unit tests for stripAssetUrlWildcard.
Ran npm audit fix to resolve 19 vulnerabilities and upgraded vitest from
v3 to v4.1.8 (breaking change) to fix the critical UI server advisory
(GHSA-5xrq-8626-4rwp).
Vitest v4 no longer allows vi.fn() mocks to be used as constructors, so
converted constructor mocks (IntersectionObserver, ResizeObserver,
AbortController, NPool/NRelay1) to real classes in the test setup and
affected test files.
npm audit now reports 0 vulnerabilities.
esm.sh's build pipeline returns HTTP 500 for packages that ship only
TypeScript types with an effectively-empty runtime JS file (e.g.
@solana/rpc-parsed-types, pulled in transitively by @solana/kit). The
esm plugin treated this as fatal, blocking any project depending on such
a package.
When an esm.sh JS module fetch fails, fall back to jsDelivr's +esm
endpoint to inspect the package's actual runtime. If it is effectively
empty (no exports/imports/code after stripping comments, prologues, and
source-map directives), synthesize an empty ES module so the build can
proceed. Genuine non-empty failures are still re-thrown unchanged, and
the fallback is scoped to JS module requests only (asset/CSS/JSON
failures remain fatal).
Collapses the separate "Secret Key" and "Bunker" tabs into a single
input that auto-detects nsec vs bunker:// from the pasted string. File
upload runs the same detection on file contents.
The nostrconnect QR flow is now opt-in on both platforms — no relay
subscription opens until the user clicks "Login with remote signer"
(desktop) or "Open signer app" (mobile). Mobile skips QR rendering and
deep-links to the signer once the URI is generated.
BunkerLoginPanel is renamed to LoginPanel and owns all string-based
methods plus the QR session lifecycle. LoginDialog drops its
Extension/Key/Bunker Tabs structure; SimpleLoginDialog drops the
nsec/bunker tab switcher. Both now mount LoginPanel directly with
extension login below.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds the client-initiated NIP-46 flow alongside the existing bunker:// paste
input. Desktop users scan a generated QR code with their signer app
(Amber, nsec.app, etc.); mobile users get an "Open signer app" deep-link
plus a /remoteloginsuccess callback page. The pasted bunker:// URI moves
into a collapsible fallback below the QR.
A shared BunkerLoginPanel component owns the session lifecycle and is
embedded in both LoginDialog and SimpleLoginDialog. The listener effect
depends only on a sessionToken and reads login/onLoggedIn/config through
refs so parent re-renders don't tear down an in-flight handshake.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
--exclude=index.html matches index.html at every depth, which stripped
prerendered index.html files from subdirectories. Anchoring with a
leading slash limits the exclude to the transfer root so only the root
index.html is skipped.
The iframe preview sandboxing service is now maintained as a separate
project at https://gitlab.com/soapbox-pub/iframe.diy and deployed at
https://iframe.diy/. Remove the stale in-tree copy and update the
services README to point to the upstream project.
Each built-in shell command has been audited and rewritten to support the
options AI agents (and humans) typically reach for, close critical behavior
gaps, and align with POSIX/GNU conventions:
- Shared argument parser (utils.ts) handles combined short flags, long
options with '=VALUE' or space-separated values, the '--' sentinel,
numeric shortcuts like 'head -5', and '-' for stdin.
- cat, ls, cp, mv, rm, mkdir, touch: added missing common flags; removed
the legacy 'absolute paths are not supported' and 'reading from stdin
is not supported' barriers where they made agent use awkward.
- mv now overwrites destinations by default (POSIX) and supports -n.
- touch updates mtime on existing files (by rewriting content) and
accepts -c/-a/-m/-h/-r/-d/-t options.
- find: new expression engine with -iname, -path, -regex, -type,
-empty, -size, -maxdepth, -mindepth, -not, -or, -print/-print0,
-delete, -quit.
- grep: -v, -c, -l, -L, -w, -x, -o, -q, -E, -F, -G, -H, -h, -A/-B/-C
context, --include/--exclude, multiple -e, -f scriptfile.
- head/tail: -c bytes, -NUM shorthand, negative/positive line counts,
proper multi-file headers.
- sort: -k keys, -t separator, -o output, -f/-b/-d/-s, -h/-V/-M modes.
- uniq: -i, -f, -s, -w, -D, and the [input [output]] form.
- wc: -m characters and -L longest line; -c now counts bytes (UTF-8).
- cut: open-ended ranges (3-, -5), -s, --complement, --output-delimiter.
- tr: -c/-s/-t, [:class:] character classes, escape sequences.
- sed: real multi-command parser supporting ';', addresses (N, $,
/re/, N,M), '!' negation, proper -n quiet mode, y///, and -i[SUFFIX].
- echo: -n, -e, -E with standard backslash escapes.
- pwd/cd: -L/-P, plus cd -, cd ~, cd $HOME with OLDPWD tracking.
- diff: proper LCS algorithm producing correct normal and unified
output; adds -q, -s, -N, -i, -w, -b, -B.
- env: -i, -u, NAME=VAL assignments; reads the live shell environment.
- date: -u, -d, -R, -I, and a full GNU-subset format specifier set.
Tests for each command were updated to reflect the corrected behavior
(e.g. absolute paths and stdin are now accepted, POSIX error messages).
All 1334 tests pass; typecheck and production build succeed.
The old ShellTool used a flat string scanner that couldn't distinguish
quote context from operator context. In practice this produced a long
tail of surprising behaviours that confused AI agents and occasionally
corrupted the virtual filesystem:
* `echo hi 2>&1` wrote 'hi 2' to a file named literally `&1`
* `echo hi >&2` wrote to a file named `&2`
* `cat < in.txt` silently produced no output (input redirection
was unimplemented but not rejected)
* `for f in *.tsx; do ... done` was split into three separate
"command not found" errors
* `echo $HOME`, `echo $(pwd)`, `echo \`pwd\`` all printed
the unexpanded source text
* `# comment`, backslash escapes, brace expansion, tilde, and
arithmetic all fell through as literal characters
Introduce a proper mini-shell in src/lib/shell/:
* tokenizer.ts — POSIX-flavoured lexer that understands single and
double quotes, backslash escapes (including line continuations),
comments, operators, fd-prefixed redirections (IO_NUMBER), and
dollar-led expressions ($VAR, ${...}, $(...), $((...)), backticks).
* parser.ts — recursive-descent parser producing an AST covering
pipelines, and-or lists, sequences, redirections (including `<<`
heredocs and fd duplication like `2>&1`), and the full suite of
compound commands: if/elif/else/fi, for, while, until, case,
subshells, and brace groups.
* expand.ts — word expansion following POSIX ordering: brace
expansion, tilde, parameter, command substitution, arithmetic,
word splitting, pathname expansion, quote removal. Glob patterns
match against the virtual filesystem; unmatched patterns pass
through unchanged.
* executor.ts — AST interpreter that dispatches simple commands to
the existing ShellCommand registry, applies redirections safely
(validateWritePath runs BEFORE any file write so bogus paths can
no longer materialize), evaluates control flow, and tracks exit
status in $? with a safe iteration cap on while/until loops.
* Built-ins: true, false, :, export, unset, exit, test, [.
ShellTool.ts is now a thin integration layer that wires the registry
into a ShellExecutor and formats the final output, keeping its public
API (execute, getCurrentWorkingDirectory, setCurrentWorkingDirectory,
getAvailableCommands) unchanged so existing callers (ChatPane,
Terminal) don't need to change.
Tests:
* All 35 existing ShellTool tests still pass (adjusted two
assertions for the improved error messages).
* Added 29 tokenizer, 19 parser, 24 expander, and 49 end-to-end
tests covering the bash features listed above and confirming that
the data-corrupting redirection bugs are gone.
* Full suite: 1316 passed / 6 skipped, typecheck clean, lint clean,
build clean.
AI agents frequently write bash-style commands like `cp *.tsx src/` or
`ls src/**/*.ts`, but ShellTool previously passed wildcard tokens through
to individual commands literally. Since the command implementations don't
do their own expansion, these invocations failed with confusing errors
like "cannot stat '*.tsx'", leading agents to retry with increasingly
complex workarounds (find -exec, for loops) that also aren't supported.
Move glob expansion into the shell itself, matching how real shells work:
unquoted arguments containing `*`, `?`, or `[...]` are expanded
against the virtual filesystem before being handed to the command. Quoted
patterns and option flags are left untouched, and patterns that match
nothing pass through literally (bash default behaviour).
Tailwind v4 projects typically include `@import "tailwindcss";` in
their CSS entry and often `@import` third-party CSS plugins like
`tw-animate-css`. Both cases were broken:
1. esbuild tried to resolve `tailwindcss` through the ESM CDN as JS,
producing 'Cannot import <...> into a CSS file'. The existing
CSS-importer guard used `new URL(args.importer)` to detect CSS
importers, but esbuild passes fs-namespace importers as plain paths
(e.g. `/projects/foo/src/index.css`) which don't parse as URLs, so
the guard never fired.
2. `@tailwindcss/browser@4` only resolves a hardcoded set of `@import`
specifiers (`tailwindcss`, `tailwindcss/preflight`,
`tailwindcss/theme`, `tailwindcss/utilities`) and throws
'The browser build does not support @import for <x>' for everything
else, so plugin packages couldn't be preserved as external either.
Detect CSS importers with a plain string match and split behavior:
`tailwindcss` and its subpaths stay external so the v4 runtime can
handle them, while other bare CSS imports fall through to the normal
esm.sh resolution path. esm.sh redirects CSS-only packages to their
`.css` entry and `onLoad` picks `loader: "css"` via the content-type
mapping, so the dependency is bundled inline. The combined CSS then
lands in the `<style type="text/tailwindcss">` block where the v4
runtime can process v4 directives (`@custom-variant`, `@theme`, etc.)
from third-party plugins.