Changelog
What each release of lith changed.
Until 1.0, a minor release may change the API; its entry says what to change in an app.
v0.5.11 (2026-11-24)
edge:RecoverdropsContent-Disposition,Content-Language,Content-LocationandContent-Rangebefore its 500, besidesContent-Encoding,ETagandLast-Modified: a panic after a handler setContent-Dispositionmade the browser download the error page.edge:RecoverWith(log, h, RecoverOptions{Page})renders the app's own error page for a navigation that panicked before writing, with the status 500 whatever the page writes, and the plain 500 when the page writes nothing or panics first.Navigation(r)reports such a request: a GET or HEAD whoseSec-Fetch-Destisdocumentor missing, and not Datastar's.
v0.5.10 (2026-11-19)
datastar: the build is Starbase's at commit 846b62d, which adds patch 0013 (upstream #1248) to 0002: a patch that morphs N elements inside one Rocket component used to re-scope that component N times, and now does it once (370 elements in five components at 4x CPU: about 2,870 ms a frame before, 119 ms after). An app that servesdatastar.JS()with Rocket components around morphed content gets it on upgrade; nothing changes in its markup. lith's site pins Starbase snapshot 81f24b268adb with it.- Docs and template: an action's pending state shows on the page, not only in
aria-busy, about 200 ms after the click, so an op acked within a tick does not flicker; work that may take longer than a few seconds reports progress from rows a view renders, not a spinner. The skill's rule 5, both review checklists and the pages guide say so, and the template's and the site'saria-busystyles wait 200 ms. - Docs: moving a replica to another endpoint, with a unit started by a socket: stop the socket too, and check the running process's environment.
v0.5.9 (2026-11-17)
backup:Config.ContentMD5(<prefix>CONTENT_MD5) has Litestream send Content-MD5 on every upload that goes up in one piece, for a provider that requires it, as AWS does on an Object Lock bucket. An upload of more than 5 MiB goes up in parts, and Litestream sends no checksum on parts to a custom endpoint.backup: lith's own S3 client, which aborts unfinished uploads and runsPurgeReplica's listings and deletes, uses Litestream's checksum policy: with an endpoint, checksums only where an operation requires one, and Content-MD5 on DeleteObjects.backup:Manager.ReplicaNames(ctx)lists the replica names underConfig.Prefixin the bucket or directory, names whose purge failed included, so an app can purge those its account list no longer has.writer:Taken(ctx, q, key)reports whether aOnceorOnceResultkey has committed and is still kept, in a read transaction or a command's.- Docs: a command calls no other database's writer: neither
DonorSendmakes the two commits atomic,Domakes the command's batch wait for the other writer's, and two databases thatDointo each other deadlock. A follow-up in another database goes through a row the other side picks up. The skill, the review checklist and the commands guide say so. backup: the docs cover versioned and Object Lock buckets (tested on Infomaniak's native S3,s3.gva2.infomaniak.cloud): Litestream needs nothing for them, and an erased account's data stays in old versions until they expire.Config.PurgeSettle's 15 s are for S3 over Swift (s3.pub2); on a provider whose listings are complete at once, a millisecond will do.
v0.5.8 (2026-11-14)
datastar: the build is Starbase's at commit 7dc2352, Datastar v1.0.5 with Rocket and one patch (observeProps hears an attribute write that decodes the same, upstream #1223). The patch that read a bool prop's="false"as false is gone: Starbase's components readopen,checked,busyandexpandedby presence, as HTML's boolean attributes do, soopen="false"is open. Before an app serves this build, it renders such an attribute only when true (templchecked?={ on }) and givesdata-attra boolean, which removes the attribute when false, never the string'false'; an app that vendors Starbase's components takes them from snapshot a6cffca9d15a or later together with it, as lith's site does.
v0.5.7 (2026-11-11)
- Set
go 1.27.4in go.mod, for GO-2026-6859: an HTTP/1 server can crash on a race betweenMaxBytesReaderand the response headers, which lith reaches throughedge.Static,sse.Openand the upload limits. An app builds with Go 1.27.4 or later, and apps made bylith-newstart on it. sse: a stream whose write was under way when the hub stopped lost its end frame, so a tab missed its notices,Options.Stopping's events and the reconnect, and fell back to its retry. That write now goes out within the end frame's 250 ms, and the end frame after it.live: a stream that replaces one with its ID, as a page does when it reconnects before the server noticed its old stream end, rendered the views only that ID watches with the old stream's Render. A Render that keeps state, such as the frame it sent last so that it returns nil while nothing changed, or how far the page has read, then sent the new page nothing. Those views now render with the new stream's own definition.backup: with a bucket on AWS S3 and no region set, the cleanup of unfinished uploads failed, and with itPurgeReplica, unlessAWS_REGIONor a profile named a region. The lookup of the bucket's region now starts from us-east-1 when the host names none, as Litestream's does, and no longer uses the deprecatedfeature/s3/manager(Litestream still does, for its uploads). A Config with an endpoint never looks its region up.backup: on Infomaniak's object storage (OpenStack Swift),PurgeReplica's one listing missed an object written two seconds before the purge, which stayed in the bucket. On S3 the purge now lists the replica againConfig.PurgeSettle(15 s,PURGE_SETTLE) after its deletes and deletes what that listing shows, up to three listings, and fails when the third still shows objects, so that a retry deletes them. A purge takes 15 s at least; on AWS, whose listings are complete at once, a millisecond will do.- Dependencies: modernc.org/sqlite v1.62.0 (SQLite 3.54.1; a done context now stops a busy wait or a running statement), klauspost/compress v1.20.4 (zstd could write an undecodable stream from small flushed pieces at the Better and Best levels; lith's streams default to Fastest), andybalholm/brotli v1.3.0, templ v0.3.1100, and the AWS SDK in
backup. An app that raises templ to v0.3.1100 runstempl generateagain: views generated by v0.3.1070 no longer build.
v0.5.6 (2026-11-10)
Closing a replicated database without a checkpoint costs no memory now, the Datastar build has a package of its own, and edge gains a version of static files, a quieter readiness probe and client addresses without a proxy. What to check in an app:
backup: the stop ends its reads, detaches and closes the database withoutPRAGMA wal_checkpoint(TRUNCATE). Drop the TRUNCATE if you kept it after v0.5.5: it makes every Attach upload the whole database. Detach now has Litestream checkpoint the WAL and start it over, and logs a warning when an open read stops it.sqlite: the write connection reads through the memory map, as the readers do, so a large read in a command no longer stays in its page cache while the database is open. An I/O error on a mapped page now crashes the process instead of failing the query, for the writer as for the readers.template:Datastar()andDatastarVersionare deprecated and forward tolith/datastar. An app that calls them no longer embeds the template's files, 180 KiB less.edge:Readylogs a failing check once, at Info until the first probe passes and at Warn after, andStatic.Warmedalso waits for files given withAdd.
New:
datastar:JS(),VersionandIntegrity(the build's sha384), in a package that embeds nothing else.edge:Static.Version(names...)names the content of a set of static files, for a page's assets version after a deploy. A template app that switches to it asks open pages for one reload after that deploy.edge:NoProxies(h)trusts no peer's forwarded headers, loopback included, for an app with no proxy in front. The default is unchanged.
v0.5.5 (2026-11-10)
Memory for many databases in one process, and replicas that no longer upload again after a restart. The new options are opt-in. What to check in an app:
backup: after detach, close the database withoutPRAGMA wal_checkpoint(TRUNCATE); with it, every Attach still uploads the whole database. A database opened withsqlite.CheckpointExternalnow keeps its-waland-shmwhen it closes, so code that deletes or replaces one removes those too.sse: where the process's own cgroup sets no memory limit, the default budget now takes the limit from the groups above it or from cgroup v1, not from the machine's memory.- Datastar is Starbase's build of v1.0.5 (
1.0.5+starbase.818f366). ItsretryMaxCountcounts every retry in a request's life, so a stream withoutretryMaxCount: Infinitygives up at its tenth dropped connection.
New:
sqlite:Options.IdleReadersandReaderIdleTimeclose idle read connections, down to none.live:Options.ReleaseAftergives a quiet hub's read connections back. With it andReaderIdleTimeat a minute, Libretto held 0.6 MiB less per idle tenant, and the first update after idle came 60 to 120 ms later.live:Options.HibernateFirstshortens a stream's first rest, so the streams of a deploy share encoders: peak memory fell from 1,703 to 1,450 MiB at 500 tenants.tenant:Pool.Peekreturns a key's value only if it is open, without opening it or waiting.sse:MemoryLimitreports the limit a budget takes half of, and where it came from.backup(backup/v0.3.3): Litestream v0.5.18, whose restore after a crash no longer returns stale rows; until an upstream fix it keeps about 155 KiB per attached database. A restore removes a-waland-shmleft beside its output.
v0.5.4 (2026-11-03)
The Datastar build by an exported name, and proxies that aren't on loopback.
template:Datastar()returns the vendored Datastar build andDatastarVersionnames it (1.0.4+starbase.c6a6589), so an app serves it withedge.Static.Addinstead of reading a path insidetemplate.FS.edge:BehindProxies(proxies, h)believes the proxy headers from peers in a list of prefixes too, for a proxy on another host or a container bridge, and walksX-Forwarded-Forpast every address in them;ParseProxiesreads the list andTrustedProxiesnames it. The template's-trusted-proxies(APP_TRUSTED_PROXIES) is empty by default. Every address in the list can name any client: list only your own proxies.
v0.5.3 (2026-10-29)
JavaScript minified with esbuild, a backup that no longer fills the disk, and Synchronous: "OFF" for tests. What to change in an app:
-
minify: nothing;minify.Byteskeeps its API. Scripts minified before may now come out a little different, and minifying a 68 KB build takes about 4 ms more at startup. A workaround that served scripts unminified because of tdewolff's bug can go. -
sqlite: setSynchronous: "OFF"for test databases, only undertesting.Testing(). -
minify: JavaScript is minified with esbuild instead of tdewolff/minify, whose JavaScript minifier dropped side effects aftervoidof a logical expression (tdewolff/minify#1057), which broke Starbase's sb-busy and sb-virtual-scroll. CSS stays with tdewolff. -
backup(tagbackup/v0.3.2, released on 2026-10-28): an attached replica removes the WAL segments it has uploaded from its local directory every 15 s once they areConfig.LocalL0Retentionold (5 minutes) and keeps the newest. Litestream deletes them only after compacting them into L1, which the Manager does not run, so a busy database filled its disk. New metrics:replica_local_l0_files,replica_local_l0_bytesandreplica_local_l0_removed_total. -
sqlite:Options.Synchronoustakes"OFF", no fsync at all, for databases that die with the process, such as tests on a slow disk.
v0.5.2 (2026-10-27)
A fix for v0.5.1's build signal, a restore that holds a few connections instead of one per file, and docs. What to change in an app:
-
backup: nothing is required. An app whose restore check makes the server heavy can run it out of process withVerifyOnceunder a systemd timer (the backups guide has the units); the server's verify metrics andOnFailthen move to that unit. -
live: the build signal follows the first render of every view, with or without a frame. Since v0.5.1 a view whoseRenderreturned nil, or failed, held it back for good, and every reconnect refreshed the page again. A frame dropped as stale goes out when the next render repeats it. -
backup(tagbackup/v0.3.1): a restore downloads the replica's files with 4 connections and merges them 32 at a time on disk. Litestream's restore opened every WAL segment since the snapshot at once, one connection each, so a verification of a busy replica held thousands of connections and hundreds of MiB in the server. Replicas with Litestream v0.3 generations still restore through Litestream. A restore to a moment after a gap in the WAL segments fails instead of returning the older state; a killed restore's working directory is removed by a later restore. Each verification logs its outcome. New:VerifyOptions.FirstDelayandVerifyOnce. -
Docs and skill: the tab and op come from the
Tab-IdandOp-Idheaders only; an app's own response wrapper needsUnwrapforedge.Upload; clearing a read deadline after the body's end is harmless. Patterns from a co-editing layer: a per-stream bound forevents.Compactkept as an index row, frames that carry every change since the tab's ack, high-rate commits outsideAct, a one-byte answer for the page's code, and JavaScript shipped inside a Go module. -
Deploy: lith's alert rules keep their last state when an evaluation errors, so a failing Grafana no longer fires every app's alerts.
v0.5.1 (2026-10-23)
Fixes from an external review of v0.5.0, refresh state reported in signals instead of headers, an upload helper, and maintenance for backups that aren't attached. What to change in an app made from the v0.5.0 template:
-
Set
ReadTimeout: 15 * time.Secondon the server, and read upload bodies throughedge.Upload(oredge.UploadBody).ReadTimeoutleaves streams alone; the v0.5.0 docs that said it ends every stream were wrong. -
In
openStream, replace thePage-Build,Page-AssetsandPage-Dirtyheaders withfilterSignals: {include: /^_(build|assets|dirty)$/, exclude: /(?!)/}and read them withsse.ReadSignals(pageStateininternal/web/server.go). -
Move
tabandopfromact's payload toheaders: {'Tab-Id': $_tab, 'Op-Id': op}, read before the body (sign). -
Copy
shared,refreshandpatchfrominternal/web/live.go. -
Set
go 1.27.3in go.mod (GO-2026-6809 incrypto/x509). -
backup:RunMaintenanceLoop(ctx, interval)becomesRunMaintenanceLoop(ctx, backup.MaintenanceOptions{Interval: interval, Names: accounts}). -
edge:Upload(w, r, UploadLimits{Max, MinRate, Window, Slack})gives an upload's body a read deadline of one window (10 s), moved on each timeMinRate(8 KiB/s) arrived for that long, up toMax/MinRateplusSlack, and capped atMax: a slow honest upload finishes, a trickle is cut off. It clears the write deadline while the body arrives, and returns an error when the writer takes no deadlines.UploadBodyis the short form;TooLarge(err)finds the size limit's error through form and JSON parsing. A body trickled to a route that never reads it held a connection without limit; the template's and site'sReadTimeoutnow end it. -
live: eachSpec.Clientrefreshes one stream at a time, so a forged build can't hold the shared slots; skipped refreshes log once per 10 s; the refresh guard finds the stream's element in any spelling. The build signal now follows the first frame of every view. A tick costs the hub no allocation of its own per view, andTickwith 10,000 views fell from 2.73 to 2.16 ms. UnderRefusea refreshed stream books its larger first write, not both. -
sse: a hibernating stream's wake allocates 279 bytes instead of 2.8 KB. -
backup(tagbackup/v0.3.0):MaintenanceOptions.Namesare pruned once a day even when not attached (DetachedInterval, one at a time with 250 ms after each; no snapshot). Attached replicas stay hourly. A due snapshot is written in the background afterAttach(Config.SnapshotTimeout) and cancelled by detach; a cut-off snapshot's multipart upload is aborted, andPurgeReplicaaborts all unfinished uploads under the name. New metrics for passes, pruned objects, skips and detached failures. -
Template, example and site: refresh state as signals,
Tab-IdandOp-Idheaders so a rate limit answers before the body is read, tabs of one page share a refresh render for a second, and views render straight into the frame buffer. The writer race takes two races per address, the town's seek one session's worth. -
Docs and skill: notices keyed as the page acks;
$_syncedreset on every open, retry and hide; reload-only refresh as a choice; more Datastar notes (headers built once, effects that overwrite patches, missing keys,@post's promise). Caddy:read_bodyleaves streams alone, and since 2.11.5 it's at most a ceiling sized to the slowest honest upload; lith leaves Caddy's timeouts to the host.
v0.5.0 (2026-10-23)
A status code no longer carries anything a person reads. What a person causes is an outcome in the tab's row; what they must know but didn't cause is a notice on their stream; what only the browser knows the page says itself. Open tabs refresh in place after a deploy. The backup module's verification retries before it reports, and reports once per run. What to change in an app:
-
Serveanswers a stream it doesn't open with the status alone. A page that showed that text says it in its own words. -
A check a person can fail belongs in the command's
Apply, as a refusal the tab's row records, not inValidatewith a 400. -
A rate limit or failed write answers its status and sends a notice with
Hub.Notify, carrying the op id. -
A page ends a pending op on its ack, on
retries-failed, on a 4xx other than 409 and 429, or when its stream connects again without the ack. Never on a timer. -
backup: the per-replica callback is gone.RunVerifyLoop(ctx, interval, func(name string, err error))becomesRunVerifyLoop(ctx, backup.VerifyOptions{Interval: interval, OnFail: func(failures []backup.VerifyFailure, span time.Duration)}), called once per run: send one alert listing them. An app that attaches its tenants on demand setsNamesto its account list, since only attached replicas are verified otherwise. -
live:Hub.Notify(streamID, key, frame)sends one stream a notice once, in the write with the frames it waited for. At most 64 wait per stream (MaxNotices); a stream that isn't open gets nothing.Options.Stopping(spec)gives each stream its last events when the hub stops. A stream that replaces one with its ID renders its own views afresh; shared views show another process's commit with the next one, or afterMarkAll. -
live: refresh after a deploy. A page reports the build it was rendered by (Spec.Build,Spec.Page,Spec.Dirty); when it differs fromOptions.Build(the VCS revision by default),Spec.Refreshrenders the page's container anew and the stream sends it first, then a new_build. Refreshes run on at mostOptions.RefreshConcurrencyat once and are skipped, counted, when they fail, time out, find no slot or would replace the stream element. Metricslive_refreshes_total,live_refreshes_unchanged_totalandlive_refreshes_skipped_total{reason}. -
backup(tagbackup/v0.2.0):RunVerifyLoopchecks the failed replicas again 10 and 30 minutes after a run (VerifyOptions.Retries) and reports only those that failed every attempt, with their first and last error. A run starts an interval after the last one started.VerifyOptions.Namesverifies a list of replicas, such as every account, attached or not. New metrics<ns>_backup_replica_verify_retried_totaland<ns>_backup_replica_verify_attempts.VerifyRestorekeeps no result for a cancelled restore or one that overlaps a purge (one past its deadline fails), andStatus'sVerifyOKalso needs a recorded time. The maintenance loop logs a replica's failure as an error from its third failed pass in a row, and still covers attached replicas only. -
Template: refusals in the tab's row, notices for a rate limit and a failed write,
Stoppingwired, ops tracked per key from a hidden#ops, and#contentrefreshed after a deploy (a reload notice when the person typed or the assets changed). CI tests a generated project. -
Docs and skill: outcomes, notices and the page's own words; which feedback to give; the op pattern per key; uploads; refreshing a page after a deploy; backup alerts per run; review checks. The site's demos follow the rule.
To update an app made from an earlier template: copy internal/views/expr.go's op tracking and the #ops element into the shell; move user-facing checks from Validate into Apply; answer 429 and 500 with Notify; pass Stopping and Build to live.New; keep #stream, #ops and the page's signals outside the refreshed container, and set Spec.Refresh.
v0.4.3 (2026-10-22)
minify:Bytesno longer panics on CSS with adata:URI, which madeedge.NewStaticwithedge.Minify(minify.Bytes)crash at start. It handed tdewolff's CSS minifier nominify.M, which that minifier needs for a data URI; a data URI now comes out in its shorter encoding.edge:Statichands Minify's function a copy of each file. tdewolff's(*minify.M).Bytesrenames JavaScript in the array it is given, so a script it saved less than a twentieth of went out as written but scrambled, and did not parse.writer:tx.Publish(v)hands a value to in-process listeners once the command commits, andw.Subscribe[T](ctx, n)returns a channel of the values of typeT, in commit order. It is best effort: a full queue drops the value for its subscriber alone (Stats.Dropped), a crash between commit and delivery loses it, and nothing is replayed, so a listener that must not miss a value reconciles from the data.Stats.Subscriberscounts the subscriptions open.prom:writer_published_total,writer_publish_dropped_totalandwriter_subscribers, and a Published values panel in the dashboard's writer row.
v0.4.2 (2026-10-21)
events:Compactno longer reads the events a stream keeps, and whileSincemoves on,CompactandPruneno longer read again on each call the events aLimitleft: on a stream that keeps 100,000, a call withLimit: 1takes 0.06 ms instead of 9 to 14 ms, and with 40,000 waiting,Limit: 10takes 0.1 ms instead of 3.LoadUntilandStateAtread a stream no further than their position. ACompactwhoseSincemoved back now folds the events after the compacted position that it would have left before.sse:Stream.Upgradereturns nil for a stream that will never move, instead of a channel made outside anytesting/synctestbubble, which stopped a bubble's clock once a stream withReconnecthad been open for a minute.
v0.4.1 (2026-10-20)
Fixes from an external review of v0.4.0, and a hub that allocates less. What to check in an app:
-
Set
Client: edge.ClientKey(r)in each public stream'slive.Spec:live.Options.MaxStreamsPerClient(16) then answers a client's further streams with 429. -
Without GOMEMLIMIT or a cgroup limit, the streams' budget takes a quarter of the machine's memory instead of no limit, and
live.Newwarns. -
db.Ropens the file withmode=ro, andsse.PatchElementspanics on a line break in aPatchoption. -
edge.Compressprefers zstd to brotli: Chrome, Firefox and Safari 26.3 now get zstd. -
A context derived from a Render's ctx that timed out ends with
context.Canceled, its causeDeadlineExceeded. -
live:Spec.Client,Options.MaxStreamsPerClientandErrClientFull;Hub.HasStream. A tick allocates 3 times a view instead of 13, and 3 instead of 26 whenDependstopics move.FrameBuffer(ctx)lets a Render format its frame without a copy. -
sse:AppendPatchElementsandNewElementsformat into the caller's buffer.Stream.Pingsends a heartbeat without waking a hibernating stream.ReadSignalsgives a request body 10 s (SignalsTimeout).BudgetStats.Fromsays where the budget's limit came from. -
writer: a command alone in its batch skips its savepoint (a 186 MB update: 0.33 s instead of 0.47 s).Options.SlowCommandlogs a command that runs over 5 s, and prom exportswriter_command_running_seconds.Options.CheckpointAside, off by default, checkpoints beside the batches and halves the stall after a large write. -
edge:Static.Warmedfor readiness,TrustedProxiesfor a log line at start. -
Template and site:
/paceand/acklimited per address,/static/outside the sessions, 409 for a tab without a stream, tab state swept after a day, request bodies capped at 1 MB in Caddy, a 0660 socket. The site moves to a Unix socket (site/deploy/README.md).
To update an app made from an earlier template: add Client to the stream's Spec and MaxStreamsPerClient to live.New; put paceAddrs and ackAddrs in front of paces and acks; mount site.Static() outside Routes and add ready.Add("static", site.Static().Warmed); in sign, refuse a tab without s.hub.HasStream; copy migrations/002_tab_state_seen.sql and set TabTTL to a day; chmod the socket 0660, set RuntimeDirectoryMode=0750, run usermod -aG app caddy, restart Caddy, and copy the request_body and format filter parts of deploy/app.caddy.
v0.4.0 (2026-10-19)
Views can declare what their Render read, topics form a tree by their : segments, and the hub numbers its commits, for caches of derived values. A read can skip the statement caches, and a stream the hub stops keeps its clean end over HTTP/2. No API was removed. What to check in an app:
-
Topics with
:now count for the levels above them: a commit toboard:42touchesboardtoo, so a view on a bare kind such asboardrenders at everyboard:<id>commit. -
Per-tab, session and presence state belongs under a root of its own (
tab:…,sid:…,here:…), not under a root that shared views listen to. lith's site moved its demos' state out from under each demo's slug; the template needs no change. -
sse: a write under way when the hub stops its stream gets up to 250 ms to finish, like the end frame, where it had a deadline of now. Over HTTP/2 that deadline reset the stream withINTERNAL_ERROR, and the page lost its clean end and itsReconnectevent on a deploy. -
live:Depends(ctx, topics...)declares, in a Render, topics the view read. They mark it dirty likeTopicsand replace those of the Render before, so a view keyed by the tab follows the tab's route withoutUnwatchandWatch. -
live:Hub.Seqnumbers the commits,Hub.Version(topics...)is the last commit to touch one of them, andSeq(ctx)is, in a Render, the last commit its snapshot is sure to hold. A cached count stays valid while its topics' version is not above the number it was computed at. The hub keeps the versions of theOptions.Versionstopics changed last (32,768 by default, 4.3 MiB at most); a topic pushed out reads as changed then. -
live: topics form a tree by their:segments. A commit tosrc:A:7marks the views ofsrc:Aandsrctoo and moves their versions; one tosrc:A:*marks every view at or belowsrc:A, and*alone isMarkAll.Topic(parts...)builds one from outside ids such asurn:uuid:…, escaping:,*and%;Below(topic)adds the:*. The levels above keep their versions in a store of their own,Options.PrefixVersions(32,768 by default), so a sync of more items thanOptions.Versionsno longer pushes out the version of a space. A topic with an empty segment or a*panics inServe,WatchandDepends. A commit of two topics at depth 2 costs about 60 ns more (BenchmarkChanged). -
sqlite:Uncached(ctx)runs a query without the statement caches, on the read pool, in a Render and in a command. SQL built at runtime, such as an IN list sized to the results, no longer pushes the statements that repeat out of a connection's cache. -
Docs and skill: recipes for a topic hierarchy, a per-tab view that navigates with
Depends, and an aggregate cached against a version; views in a shared database, keyed by the person and the route; large updates and deletes, by rowid range or inExclusive;livewithout lith's writer, for an app whose own store callsHub.Changedafter each commit; and pinningReaders,CacheKiBand the hub'sWorkersin a desktop app, since they grow with GOMAXPROCS. New benchmarks measure large writes and the hub (BenchmarkLargeWrite,BenchmarkChanged,BenchmarkTick), andbench/RESULTS.mdcompares the board with v0.3.1.
v0.3.1 (2026-10-19)
newest-frame.js now only drops frames in the page by default, and once a page reports that it fell behind, the server paces its stream by the page's acknowledgements until it keeps up again. The template and the site pace this way by default, and pacing is no longer experimental.
live:newest-frame.jsis the build of github.com/mbolli/datastar-attribute-newest-frame;live/VERSIONnames the commit. The template and the site leave__reopenoff: at CPU 6x it held the Game of Life to 4 frames a second, 0.37 s behind where no fix was 0.10 s, and the page stayed on the slow stream for good.data-newest-frame__reopenkeeps v0.3.0's behaviour. The slow-link check as the page starts is unchanged.live: a stream withSpec.Ackstarts unpaced;Hub.Pacepaces it once its page is behind, and then it sends a write only once the page has acknowledged the last (Hub.Ack).Spec.Release(DefaultRelease, 5 s) ends the pacing once the page keeps up, measured against the round trip the page reports (Hub.RoundTrip) withSpec.ReleaseSlack(DefaultReleaseSlack, 100 ms).Spec.Windowpaces a stream from the start.live,prom:Hub.Behind(id)counts a page's report that it fell behind its stream. prom exports it as<namespace>_live_newest_frame_behind_totaland<namespace>_live_newest_frame_behind_streams_total, and the pacing as<namespace>_live_paces_total,_releases_totaland_acks_total; the "lith apps" dashboard draws them.- Template:
<body>posts eachnewest-frame-behindtoPOST /pace, which counts it and paces the stream, and each paced write has the page postPOST /ackafter the paint. Both routes reach only the streams of the request's session;/paceis limited per session and/ackper stream. A slow page gets about a third of the bytes; on a slow phone on a 300 ms link it lags 0.60 s at 1.45 frames a second, against 0.47 s at 2.74 with the plugin alone. A page that keeps up pays nothing. WithoutAckin the stream'sSpec,/paceonly counts. - Template: the binary serves its metrics for Prometheus on a loopback listener of its own (
-metrics, by default-addr's port + 100). The unit now allows loopback and no other host.lith-newrequireslith/promandlith/dbmetrics/prom, and every release tagsprom/vX.Y.Z. - Docs: what a frame costs the page (mostly its elements, not its bytes), counting the pages that fall behind, and pacing a stream by the page, with what it costs. The slow-page numbers come from the corrected
TestLifeDrift: 27.15 s behind at the median in 150 s, not 42.6 s after 2 minutes.
To update an app made from an earlier template:
- Copy
internal/web/pace.go, add its routesPOST /paceandPOST /ackwith their limiters (paces,acks) to the server, and add both routes toedge.CSRF'sDatastarroutes. - In the stream handler, give the
Specthe IDstreamID(sid, tab)andAck: ackEvent(tab). An app that callsWatchorUnwatchpasses the same ID. - Copy the template's
<body>attributes,data-newest-frame data-on:newest-frame-behind={ behind }, andbehindininternal/views/expr.go. - For the metrics, copy
cmd/app/metrics.go, the unit's network lines anddeploy/observability/app.metrics.yml, and install the "lith apps" dashboard again. An app that calls out adds its addresses to the unit'sIPAddressAllow.
v0.3.0 (2026-10-16)
The new package events adds event sourcing to the writer, with inline and catch-up projectors, rebuilds, retention and reads as of any position. A page that is too slow for its stream now stays close to the present with newest-frame.js, a Datastar plugin that lith serves. It applies only the newest frame of each view, and asks for a slower stream when it skips most of them. No API was removed. What to check in an app:
-
To bound a slow page's lag, serve
live.Scripts'newest-frame.jsunder/static/(static.Add("lith/"+live.NewestFrame, js)on the app'sedge.Static), load it after Datastar through the import map, and putdata-newest-frameon<body>. Open the stream withheaders: $_slow ? {'Save-Data': 'on'} : {}at the same URL as before, and setlive.Spec.Slowfromedge.SlowLink(r). The template does all of it. -
The Grafana dashboard and alert rules for lith apps are in
deploy/observabilityat the repository's root and no longer filter on a scrape job: install them again on a host that has the old ones. They match the metric names and the labelapp, and the dashboard has a row forevents. -
Apps opt in to minified JavaScript and CSS by importing the new module
github.com/zweiundeins/lith/minifyand passingedge.Minify(minify.Bytes)toedge.NewStatic, outside development; an app that does not import it serves its files as before and pulls in nothing. The template does. -
A stream whose client falls behind no longer costs renders: a dirty view waits while every stream that watches it has a frame of it waiting, and then sends the frame that waited and the newest a tick later. Nothing to change, unless a test counts a slow stream's frames.
-
events: a new package for event sourcing on the writer. A command callsExecutein itsApply: it reads the stream's state row, which aDeciderfolds from the stream's own events, checks the expected version (Any,NoStream,Exactly, orErrConflict), decides, appends, saves the row and runs the inline projectors (Handle), all in the command's savepoint. Streams are typed by their key,int64orstring, and their events' interface; each event type is defined once withDefine, through a helper of one line per stream that makes the compiler check that the type belongs to it. Events record their time in Unix milliseconds, an actor, a correlation and a causation.AppendandOneappend without a decision;LoadandSinceread as iterators over anysqlite.Querier;Upcastreads an old event type as a new one.Newrefuses a projector that neither handles nor ignores a type of its stream, and duplicate names. ARunnerrebuilds an inline projector whose version changed into copies of the tables it names (Tables), a command per batch, and swaps them in with the last batch, so pages never read a table half built; a decider whoseVersionchanged folds each stream again at its next command. Catch-up projectors (After) run after the commit from a checkpoint, woken by the writer, with the event's position as the idempotency key; an event that keeps failing parks the projector with its error inRunner.Stats.ForgetandPrunedelete events, and positions, fromAUTOINCREMENT, are never handed out again. The tableslith_events,lith_event_stateandlith_projectionsare created by the first command that needs them.events/eventstesttests a decider as given, when, then, and checks a JSON sample of every event type. While a projector rebuilds, new events still reach its live table through its new handlers, in a savepoint whose failure is logged and leaves the command alone; the batches drop the topics they touch, and only the swap touches the projector's topic. A projector whose table is missing failsRunner.Run, and in commands only those on its own stream kind.LoadUntil,SinceUntilandStateAtread a stream, the log and a decider's state as of a position. Through the writer with one inline projector, it appended 18,342 events a second with 200 producers and NORMAL, and rebuilt a projection of 100,000 events in about a second (bench/RESULTS.md). -
eventsandprom:Runner.Statshas the last position committed (Head) and each projector'sLagbehind the last event of its stream kind, kept by the commits without a query, andStore.Statscounts the events committed by stream kind, the conflicts and the refolds.prom.Sourcestakes the runner (Events) and the store (Store) and exports<namespace>_events_*:appended_total{stream},conflicts_total,refolds_total,head_position, and by projectorprojector_position,projector_lag,projector_status(a series per status, 1 for the current one) andprojector_attempts. The lith apps dashboard has an Events row, and two alert rules fire for a projector parked for a minute and for a live catch-up projector more than 1,000 positions behind for 10 minutes. -
events:Prunetakes anevents.Retention:Sincekeeps the events stored from a time on,Newestthe newest so many, and with both an event goes only when both let it go;Limitcaps the events one call takes.CompactisPrunethat closes the books: each stream that loses events keeps one, its last, rewritten in place with its position, version, time and metadata as a snapshot of the stream's state, an event type that the app defines on the stream and that the decider'sEvolveand every projector handle. A rebuild after it makes the tables it made before, as-of reads stay right from the newest snapshot on, and a stream keeps one snapshot at most. It is the one place where a stored event changes; a fourth table,lith_event_kinds, records how far each kind was compacted.Boundsreturns a kind's first and last position, 0 and 0 without events, the newest snapshot first afterCompact.Load,LoadUntil,Since,SinceUntil,StateAtandBoundsread a database whose tables the first command has not made yet as one without events.StateAtrefuses a position before a stream's snapshot. -
writer:Tx.LocalandTx.SetLocalkeep a value per writer, for packages built on it that serve many databases, such as whateventsknows of each. -
writer:Tx.Untouched(fn)runs fn and drops the topics it touched, keeping its changes: for writes that no view reads yet. -
Docs and skill: the guide Event sourcing; the commands guide's event-sourced command and the board example run on
events, and the review checklist has a section on events. -
Website: a ninth demo, Town in time: a town of tiles built together and event-sourced on
events, a stream per tile with a decider and two inline projectors, and a slider that takes each tab back to any position of the log through a history table, the town as of each position a view that every tab there shares. The site runs anevents.Runnerand exportslith_site_events_*. The town's sweep keeps its newest 5,000 events and a snapshot of each tile from before them (Compact), so a rebuild makes the same town, and the badge in the stage's corner says past instead of live while a tab looks back. -
Website: a demo can be featured (
demo.Demo.Featured): its card comes first and takes four cells, so nine cards fill every row on/demos, and on the landing page, which has five columns when the page is wide enough, it takes two. Town in time is featured. -
Template: the Caddy block is
deploy/app.caddy, for/etc/caddy/sites/, anddeploy/observabilityholds the app's blackbox probes and an Alloy file that ships its journal, with slog's level as a label, and its access log to Loki.deploy/setup-host.shinstalls them into the folders a shared host's Prometheus and Alloy load, each only where that service is installed, and reloads Alloy, putting the old file back if Alloy refuses the new one. The CI deploy key is now optional. The guide Metrics and monitoring lists the folders and the labels; an app made from an earlier template can copy the folder and the script. -
lith-new:app_in the template becomes the app's name with-as_, for identifiers such as Alloy's component labels. -
The Grafana dashboard and alert rules for lith apps moved from
site/deploy/observabilitytodeploy/observabilityat the repository's root, with a README on installing them. They no longer filter on a scrape job: they match the metric names and the labelapp, the dashboard also filters byslot, and each alert fires for one app and slot. -
edge:SlowLinkreports whether a request says its client is on a slow link:Save-Data: on, which browsers send when their user asked to save data, and lith's pages send on their stream's request from their own measurement; Chromium's client hints,ECTof slow-2g, 2g or 3g,RTTover 300 ms orDownlinkunder 0.8 Mbit/s, which Chromium sends once a document has asked for them withAccept-CH: ECT, RTT, Downlink(NetworkHints); the query parameternet=slow, which pages put in their stream's URL before they sentSave-Data, for the tabs still open from then. -
live:Spec.Slowmarks a stream to a client on a slow link. It sends each view's newest frame 250 ms or more after the last, about four a second. A view's first frame goes out at once, and so does the frame of a view that sent nothing for 250 ms, which takes the frames that wait along: views that change together still arrive together, and an outcome is not held up. Heartbeats go out as before. On a phone with its CPU slowed four times on DevTools' Slow 4G and 3G presets, a tab of a Game of Life that steps ten times a second kept its main thread 54 to 56% busy instead of 89 to 90%, and its stream sent 2.7 to 2.9 KB/s instead of 5.2 to 6.2. A phone too slow for the page needs it on a fast link too: with the CPU slowed 15 times on an unthrottled link, the tab fell 94 to 98 s behind the board in five minutes without it, while the hub dropped no frame and no write waited, since the browser and the kernel held the frames; with it, the tab stayed within 1.2 s. -
live: a dirty view does not render while every stream that watches it still has a frame of it waiting. The first stream that takes its frame marks the view dirty again, and the next tick renders it as it is then, so a stream that falls behind sends the frame that waited, then the newest a tick later. A stream whose writes block costs no renders until its write deadline ends it, and a view that only slow streams watch renders about four times a second instead of at every tick: for 50 tabs with a view of their own that changes at every tick, 0.4 cores instead of 1.6 to 1.7 on slow streams, and 0.03 to 0.05 instead of 1.4 to 1.7 on streams whose client stopped reading.Stats.RendersDeferredcounts the renders put off, andlith/promexports it as<namespace>_live_renders_deferred_total. A view that one of its streams keeps up with renders at every change, as before. -
The template's page measures its link once as it starts, into
$_slow:navigator.connection'ssaveDataor an effective type of 2g or 3g, or where that is missing, a document whose first byte came more than 300 ms after its request or that came at under 100 KB/s. Its stream's request then sendsSave-Data: on, at the same URL as on a fast link, its documents sendAccept-CH, and its stream handler setsSpec.Slowfromedge.SlowLink. -
live:NewestFrame,newest-frame.jsinScripts, is a Datastar plugin that does in the page what the hub does for a stream: the newest frame of a view wins. A page too slow for its stream falls behind without the server noticing, since the browser holds the frames: Chromium then hands the page 2 MiB of the stream per read, which Datastar applies in one task without a paint, and Firefox keeps them in its parent process. Withdata-newest-frameon<body>, the page holds the stream's patch events, applies only the newest frame of each view among those that arrived together, and after a batch waits half as long as that batch took to apply. A page that keeps up applies every frame. When it drops more than half of its frames for 3 s, it sets$_slowand opens the stream again, which then sendsSave-Data: onat the same URL, so Datastar aborts the old request. Serve it under/static/by its content's hash (edge.Static.Add) and load it after Datastar, through an import map that maps'datastar'; the template does, and its page now has that import map, with the request's CSP nonce. On lith's site, in headless Chromium 154 with its CPU slowed 15 times on an unthrottled link behind Caddy, a tab of the Game of Life asked for a slow stream within 2 s and stayed 0.68 s behind the board at the median over 2 minutes, 1.08 s at most, where it fell 42.6 s behind without the plugin; with every frame costing the page 300 ms more, Chromium 154 and Firefox 158 both asked after 2.8 s and stayed within 0.8 s. -
edgeand the new moduleminify:edge.Minify(fn)hasedge.Staticminify its JavaScript and CSS, the filesNewStaticreads and thoseAddgives it, before it names and precompresses them, so the hashed URL, the ETag and the brotli and gzip copies are all of the minified bytes. A file the function fails on, or shrinks by less than a twentieth, goes out as written, and the function never sees*.min.jsor*.min.css, so a vendored build keeps the bytes its integrity hash pins: tdewolff takes 0.4% off the Datastar build, which a page that pins it would then refuse.github.com/zweiundeins/lith/minifyhas the function,minify.Bytes, on tdewolff/minify; an app opts in by importing it, and one that does not pulls in nothing. The template minifies unless it runs with-dev, whichgo tool task devpasses, so devtools show the files as written; its go.mod requires the module as it requires lith, andlith-newwrites lith's version for both, or replaces both with-lith. The site minifies its CSS bundle and its scripts through it instead of its own code, and with-devserves them as written. The template's stylesheet andnewest-frame.jstake 1,846 bytes under brotli instead of 3,189,NewStatictakes about 6 ms longer at startup, and the template's stripped binary is 644 KiB larger (bench/RESULTS.md).
v0.2.0 (2026-10-14)
Streams are measured by memory: the budget books what each stream holds, sizes its window from its frames, and with Refuse caps the streams instead of a count. No API was removed. What to check in an app:
-
A budget's
Limitnow covers each stream's encoder, 32 KiB besides and the frames the hub keeps, not only the encoders. The default, half the memory limit, needs no change; aLimitsized for encoders alone now lets fewer streams compress. -
ZstdWindowandBrotliWindoware the largest window a stream may get: each stream takes the smallest window that holds its frames.MinWindowno longer defaults to 18; set it only for pages whose frames refer back further than one write. -
With
Refuse, a stream gets in only with room for a window that holds its frame, and its headers go out with its first frame. Open streams withretry: 'error'and leavelive.Options.MaxStreamsat its default, as a backstop. -
A view that one stream watches, such as a tab's own, no longer keeps its frame: a stream that joins it gets a frame rendered in the next tick.
-
sse:ReadSignalsreads a request's Datastar signals for any method: thedatastarquery parameter of GET, HEAD and DELETE, the JSON body of the others,@query's QUERY included. It caps the body at 1 MiB (ReadSignalsLimitfor another cap), takes a request without signals as none, and reads the body to its end, so that over HTTP/1.1 a handler that waits before it answers still notices a client that left. Called afterOpen, it returnsErrBodyConsumed. -
edge:Compresscompresses the answers to QUERY as it does GET's. -
sse:PatchElementsand the other events split HTML without a carriage return withbytes.IndexByte: a 230 KB page takes 40 µs instead of 342. -
sse: a budget books what its streams hold, not only their encoders: each stream's tier, 32 KiB for the rest of the stream (its state, its goroutines' stacks, net/http's buffers), and whatBudget.Holdbooks, such as the frames a hub keeps.Limit, half the process's memory limit by default, now covers all of it; the other half stays for the rest of the app and for the garbage between collections.BudgetStats.Framesreports whatHoldbooked. WithoutRefuse, uncompressed streams may take the total beyond the limit. -
sse: a stream's tier is picked at its first write, from its largest write: the window must hold that frame with a sixteenth to spare, or a frame cannot refer to the one before. A brotli stream takes that window and no larger one, at quality 4 while the budget stays at most half full, then at quality 3, and only when that does not fit, quality 3 at 2^16, which compresses each frame alone; it goes out uncompressed only when even that does not fit. A zstd stream takes the largest tier within its fair share, moves down no further than its frame's window, takes 2^15 only when that window does not fit, and moves up again at a write once room frees up.MinWindowno longer defaults to 18: unset, the frames decide; set, it is the smallest window a stream's frames need, for pages whose frames refer back further than one write. With a limit, an unsetZstdWindoworBrotliWindowlets the budget go up toMaxWindow. In 150 MiB, 114 brotli tabs with a 230 KB view each hold 2^18, and 168 zstd tabs. The tiers are booked from measurements at 50 to 230 KB: brotli's 7 to 31% lower, zstd's 32 to 48 KiB higher. Apps that setMinWindowto their largest frame can drop it. -
sse:Stream.Upgradereturns a channel that the stream's budget closes when the stream holds a brotli window below its frames, or went out uncompressed, and a stream opened now would get a window that holds them: at most one stream a second.BudgetStats.Reopenedcounts them. -
live: the hub books the frames it keeps in the streams' budget, once for all the streams that watch a view: a[]byteframe at its length and 8 KiB, another by itsLen() intmethod. A stream withSpec.Reconnectends withsse.Reconnectwhen its budget has a better tier for it, and the page opens it again; the same stream ID at most once a minute, a stream without an ID after a minute. -
live: the hub keeps a view's newest frame only while two or more streams watch it. Of a view that one stream watches, such as a tab's own, it keeps the frame's length and hash once the stream has the frame: a render that repeats it still goes to no stream, the budget books nothing for it, and a stream that joins the view gets a frame rendered in the next tick. That saves about 235 KiB a tab with a 233 KB view of its own, 34 MiB for 150 such tabs, and a budget withRefuseno longer goes past its limit by the frame of a tab thatOpenhas just let in. A frame that is not[]bytehas no hash, and the hub keeps it as before. Each[]byteframe is hashed once as it renders, about 16 µs for 233 KB. -
sse: withRefuse, a budget lets a stream in only with room for 32 KiB and the smallest tier of its coding whose window holds its frame:Options.Frame, whichlive'sServesets from the stream's first frames (unset, the coding's smallest tier). It also turns away a stream that compresses nothing (its client accepts no coding, orNoCompressionis set) when its 32 KiB do not fit. A stream let in keeps a window that holds its frame until it closes: a zstd stream keeps that tier booked before its first write and while it hibernates, and moves no lower when the budget fills or a lower limit asks it to; a brotli stream takes no window below its frame. When the budget turns a stream away, the zstd streams above their frame's window move down to it at their next write, until the stream would fit. A stream whose frames outgrow its window later keeps its tier and sends more bytes a frame until it gets a larger one; it is never cut off. So no stream the budget lets in goes out uncompressed, in raw blocks or with a window below its frame, and memory caps the streams: an app withRefuseleaveslive.Options.MaxStreamsat its default as a backstop, and its pages open their streams withretry: 'error'. In 120 MiB, 134 zstd tabs with a 233 KB view each get in, all at 2^18, or 91 brotli tabs, and the others get a 503. Before, 150 MiB let in 175 zstd tabs with a 230 KB view, most of them at 2^15 to 2^17, where a frame took 4 to 35 KB instead of about 60 bytes. -
live:Serveopens a stream once the first frames of its views are there, or the tick that renders them has ended, and gives their length to the budget (sse.Options.Frame), which withRefuseanswers 503 when no window that holds them fits. The response's headers now go out with the first frame: on a hub that ticks every 50 ms, 24 ms later at the median, while the first frame comes as soon as before. A view thatWatchgives a stream that the budget then turns away waits for the next stream with its ID, as it does while none is open. -
prom:sse_budget_frames_bytesandsse_budget_reopened_total; the limit and the reservation cover what the streams hold. -
sse: a brotli stream flushes its encoder every 16 KiB of a frame at quality 3 and every 32 KiB at 4. Without those flushes brotli extends a copy into the next input block without hashing it, so after a change in a large frame it lost the frame before and coded the rest in short pieces: a 230 KB board at quality 3 and 2^18 took 3,173 bytes a frame and now takes 259, a 230 KB data table that scrolls 5,756 and now 227 (quality 4: 2,382 and 140, 3,450 and 134). The encoder's heap no longer grows with the frame: at 230 KB, quality 3 at 2^18 held 1,554 KiB against the 1,312 its tier booked, and now holds 1,083; quality 4 at 2^18 2,370 against 2,192, now 1,603. Each flush costs a metablock header: a 230 KB list with 20 changes spread through it takes 676 bytes a frame instead of 363, and a 50 KB board at quality 4 50 instead of 34. The CPU per frame of a 230 KB frame changes by 13% less to 30% more.
v0.1.1 (2026-10-14)
sse: withZstdLowMemoryset and a memory budget (everylivehub has one), a client that accepts brotli but not zstd, such as Safari, got its stream uncompressed: the low-memory filter dropped the brotli tiers too. It now narrows zstd's tiers only. Apps that setZstdLowMemoryshould update.
v0.1.0 (2026-10-13)
The first release: the runtime for Go, SQLite and Datastar apps, with a template for new apps, a skill for coding agents and the website at lith.zweiundeins.gmbh. It needs Go 1.27 and builds with CGO_ENABLED=0.
Packages
sqlite: one write connection and aquery_onlyread pool; pragmas; migrations byuser_versionor a project's own runner; read-only opens;ViewandViewValuein one snapshot, joining a transaction a ctx carries;VACUUM INTObackups. Each read connection keeps the 128 statements it ran last prepared.writer: the single writer.Send,DoandDoValuequeue commands, which run in batches of one transaction with a savepoint each, on statements prepared once;OnceandOnceResultfor requests a client retries;Flush;Exclusivefor work between batches; checkpoints andPRAGMA optimize.live: commits touch topics, topics mark views dirty, and each tick renders every dirty view once, in one read transaction per worker, for all the streams that watch it. Presence,Every,WatchandUnwatch,WriteTick, a stream cap, heartbeats, andSpec.Reconnect, which ends each stream withsse.Reconnectwhen the server stops, so that pages open their stream again on the next process.sse: Datastar's events, formatted once and written to many streams; zstd, brotli or gzip per stream, with a deadline on every write; a memory budget that shrinks the streams' windows as more open; idle streams that give their encoder back (Hibernate).edge: sessions, CSRF, the client's address behind a proxy, a CSP with a nonce, compression, precompressed static files, rate limiters, request logs, health checks.tenant: one open database per account, refcounted, evicted at a soft cap.dbmetrics: statement timing and a slow-query log through a wrapping driver.loadtest: the writer and the render loop under load, in process, without HTTP.backup(a module of its own): Litestream to S3, a restore when the file is missing, snapshots, a daily verify.dbmetrics/promandprom(modules of their own): the statements', the writer's, the hub's and the stream budget's numbers in Prometheus.
Defaults to know
synchronous=NORMAL: a power loss or a kernel crash can undo the commits of the last 35 seconds or so; a crash of the process loses none.sqlite.Options{Synchronous: "FULL"}syncs every batch.- The streams share a memory budget of half of GOMEMLIMIT, or of the cgroup's limit: a few streams compress with 512 KiB windows, many with 256 KiB, and the rest go out uncompressed, or not at all with
Refuse. - An idle stream keeps its encoder until
live.Options.Hibernateis set. - A page opens its stream with
retry: 'error'from an element with an id, the oneSpec.Reconnectnames.
Tools
cmd/lith-newcopies the template into a new module that requires the lith it ran from: a guestbook with tests, CI, a systemd unit, a Caddy block, a deploy script with rollback and a backup timer.skills/lith: the rules for coding agents, with review commands, Datastar notes, recipes and performance numbers.bench: the writer, render and stream benchmarks, with the commands to run them again (bench/RESULTS.md).
Website
lith.zweiundeins.gmbh runs on lith, from site/: the landing page, the docs (guides that follow one app, Datastar notes, performance, the package reference from the doc comments, a review checklist and this changelog), and eight live demos: a guestbook, a writer race, a stream inspector, a pixel canvas, a shared board, a cursor party, a Game of Life and a million checkboxes.