* fix(apps.conf): Kivvi is a bitbaum product, not a RevampIT favour
* chore: regenerate fleet-sites.ts
---------
Co-authored-by: catomean <catomean@users.noreply.github.com>
* sealed-builds: diag mode (runner journal + gemini under real PTY in the sealed container)
* probe: show composer + working screens
* Sealed builds: Antigravity gets a TTY and its key; Gemini 0.65 working/composer markers
* Fleet Runner 0.8.53 release entry; .env.example XDG_RUNTIME_DIR
* format
---------
Co-authored-by: catomean <catomean@users.noreply.github.com>
* builder-agents probe: show the runner's own PATH/env names and cached provider probes
* builder-agents: probes read /dev/null so they cannot swallow the rest of the piped script
* Provider chooser lists the current agent; inventory probes close stdin
* prettier
---------
Co-authored-by: catomean <catomean@users.noreply.github.com>
* sealed-builds test: NoNewPrivileges toggle for diagnosis
* sealed test: qualified image name, image visibility diagnostics
* sealed test: store diagnostics
* sealed: load the agent image into the runner user's own store
* sealed test: diagnostic without runsc
* sealed: runtime matrix diagnostic
* Sealed builds that start: NNP off for the unit, runsc without NoCgroups, crun, per-user image
* Sealed builds: slirp4netns for rootless networking
* prettier
* test: sealed network is slirp4netns
---------
Co-authored-by: catomean <catomean@users.noreply.github.com>
* builder-agents: probe-only mode and masked failure detail
* key_present before the install block
* Probe gemini with the runner's key: root loads the root-only env
* Probe with --skip-trust
* Launch Antigravity with --skip-trust so a builder run never stalls on the folder-trust prompt
---------
Co-authored-by: catomean <catomean@users.noreply.github.com>
* Install Cursor, Grok and Antigravity on the cloud builder so quota failover has somewhere to go
* No grep -q in a pipe
---------
Co-authored-by: catomean <catomean@users.noreply.github.com>
Deploy 2623 printed the cause the previous fix made visible: inside the
build, apt-get fetched no package index at all — no network. Docker on the
same box sets the firewall's FORWARD policy to DROP, which strands a rootful
podman bridge. The build runs with --network=host; tenants' sealed containers
run rootless with user-mode networking, which that chain never sees.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
Both deploys on 2026-10-20 read "⚠ loki-agent image did not build" and nothing
more: the build's output went to /dev/null, and the box cannot be reached from
a sandbox to look. Now the build writes /var/log/loki-sealed-builds.log and the
deploy prints its last fifteen lines on failure.
Two likely causes removed while at it: the base image is fully qualified
(docker.io/library/ubuntu:24.04 — an unqualified short name makes podman ask
which registry, and a build with no terminal cannot answer), and the root
build runs on a storage.conf of its own (graphroot = the shared store) instead
of the global one that lists the same store as an additional, read-only
image store for every tenant.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
Track 4.2 of docs/master-plan-2026-10.md, built; switched on by a reading.
- SandboxExecutor gains a podman mode (buildPodmanRunArgs): rootless as the
tenant (--userns=keep-id), the tenant's home bound at the same path so
sign-ins, trust and transcripts stay where the runner looks, the project's
real path as workdir, network on, capabilities dropped,
--cgroups=disabled so the deploy's drain still counts the processes, and
gVisor's runsc as the OCI runtime when the box has it.
- scripts/hetzner/agent-image/Containerfile: the image (shell, git, gh,
node, Claude Code, Codex). install-sealed-builds.sh, run by every deploy:
rootless podman, runsc best-effort, the image built into a shared
read-only store, and a reading in /etc/loki/sealed-builds.
- Nothing switches on by itself: new-tenant.sh writes the unit drop-in
(LOKI_EXECUTOR=sandbox, LOKI_SANDBOX_RUNTIME=podman, runsc when read) only
when the reading says ready AND /etc/loki/sealed-builds.on exists. The
roadmap milestone stays unticked until a tenant builds in a container.
- Tests: sandbox-executor pins the sealed shape; private-builders pins the
two-reading switch and that no tenant ever joins the docker group.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
* feat(settings): your own key builds, when you say so — a key marked for building reaches your private builder
Track 1, PR 6 of docs/architecture/private-builders.md.
- user_model_keys.for_building (migration 0123), off by default; one
switch per key in Settings → AI, offered only on keys that can drive an
agent CLI (config/build-engines.ts: Anthropic → ANTHROPIC_API_KEY for
Claude Code, OpenAI → Codex, xAI → Grok, Google → Gemini CLI) and only
to an account with a builder on the cloud.
- scripts/write-tenant-engines.ts (root on the box, from the reconcile
timer) opens the marked keys with the app's sealing secret and writes
them to /etc/loki/runners/<short>.env; a unit whose file changed is
drain-restarted, so the key reaches its next agent without ending a
session mid-task. No route ever returns an opened key.
- Records: changelog {#your-engine}; roadmap milestones ticked.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* fix(settings): the building switch sits in one row with its sentence
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* feat(engines): welcome builds, then the plan's, then your own — and capacity you can read
Track 2 (2.1, 2.2, 2.5) and Track 4.1 of docs/master-plan-2026-10.md.
- users.build_engine (migration 0124): "own" by default — the person's
sign-in or a key marked for building, never counted — or "loki": Loki's
key within WELCOME_BUILDS (3, config/welcome-changes.ts) and the plan's
PLAN_LIMITS.buildsMonthly (10 / 40 / 100). Every run records which
engine paid for it (payload.engine); welcome and plan builds are counted
from that marker. A dispatch past the last build is refused with the way
forward (code engine-exhausted), and the kickoff screen shows it with
one tap to Settings. Loki's welcome spending stops for everyone at
WELCOME_MONTHLY_CAP_CHF (20), at CHF_PER_USD, a hand-set rate.
- The box writes Loki's key (LOKI_BUILD_ENGINE_ANTHROPIC_KEY from the
app's env) into a tenant's unit only while they chose Loki's engine and
have builds left; otherwise their own marked keys.
- Settings → AI: "Your engine for building", one Segmented choice with the
numbers; /api/settings/build-engine. The kickoff's no-builder copy says
the operator switches a private builder on per account.
- System → Capacity: how long work waited for a builder in the last day
per channel (median, worst), this month's builds, tokens and cost per
account, and welcome spend against its cap.
- /pricing and the whitepaper (0.3.3) state the builds a month on Loki's
engine and the rule. Records: changelog {#welcome-changes}
{#capacity-card}; roadmap milestones ticked.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* style(engines): format resolve.ts the way prettier wants it
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(runner): agents get an allowlisted environment; the cloud builder asks Loki what to clone
Track 1, PRs 2 and 3 of docs/architecture/private-builders.md, together.
- src/lib/agent-execution/agent-env.ts: with LOKI_AGENT_ENV=allowlist (set
by the box units) an agent PTY is born with a shell's environment, the
engine keys the unit holds and what its own spec passes — never
DATABASE_URL, never the org GITHUB_TOKEN. Off the box nothing changes.
- GET /api/control/workspace-source?tab=: a runner asks with its own token
and gets its own account's repository and a token that account may write
with (github-org-token.ts). box-workspace.ts reads no database any more;
the runner passes the run's token to the one agent that needs it
(GITHUB_TOKEN/GH_TOKEN in the spec env).
- mint-box-runner-token.ts --user <id>: a token per tenant.
- Records: changelog {#agent-env} {#runner-no-db}; roadmap milestone ticked.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* feat(cloud): a private builder per account — the flag, the sealed unit, reconciled on the box
Track 1, PRs 4 and 5 of docs/architecture/private-builders.md.
- users.private_builder (migration 0122) is the one switch, set from
System → Plans (/api/system/private-builder). It grants cloud BUILDING
only: isCloudBuilderAllowed (founder or flag) for routing, Sessions and
the kickoff path; isFleetInfrastructureAllowed is the founder alone and
gates the org GitHub token, studio CD, own domains and the server's own
PTYs. LOKI_CLOUD_BUILDER_USER_IDS is retired.
- scripts/hetzner/loki-box-runner@.service: one unit per tenant as
lk-<short>, ProtectSystem=strict, ProtectHome=tmpfs with its own home
bound, the app and the runner env invisible, MemoryMax/CPUQuota/TasksMax,
its own dev root, the agent env allowlist, no database password.
- scripts/hetzner/new-tenant.sh: user, clean shell, dev root, a runner
token minted for THAT user, the agent contract, claude in its own home,
an env file for its engine keys, the unit. reconcile-tenants.sh runs
every minute from loki-tenants.timer (install-tenant-reconcile.sh, run by
the deploy) and brings units into step with the flag. The deploy ships
the scripts and template and drains and restarts every unit, each in its
own transient unit.
- A tenant's project path is written under its own root
(tenantDevRoot), which counts as box-rooted for routing.
- Records: changelog {#new-tenant} {#private-builder-flag}; roadmap.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
* chore(runner): Fleet Runner 0.8.50 — the allowlisted environment and the API-backed clone
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
---------
Co-authored-by: Claude <noreply@anthropic.com>
center-com.orangecat.ch (the older Center SOM build) was taken offline with
retire-site.yml and its repository archived; the preview at
centersom.orangecat.ch is Center SOM. Its apps.conf row is now archived, and
an archived row is skipped by a full sync (lib.sh app_names), the push-deploy
installer and the watchdog — otherwise the next sync-sites run would have put
it back online, and the watchdog would have paged it as down.
The previews doc gains the rule the owner asked for: address, project and
repository are one word.
Claude-Session: https://claude.ai/code/session_01HyfPCAeTFi2sjpVY44Y1JJ
Co-authored-by: Claude <noreply@anthropic.com>
Every deploy restarted the cloud builder, and a restart ends every session
it holds. The drain waited for nobody to be mid-task, then logged "idle
sessions resume on their next dispatch" — nothing resumed them. The owner
found "No live sessions" after each of five deploys in one afternoon.
- The builder writes down each session it opens (~/.loki/open-tabs.json)
and crosses it off only when it really ends: closed from Loki, or the
agent exited while the builder stayed up. On start it reopens the rest;
Claude sessions come back as the same conversation (claude --resume).
- Deploys compare runner files by content (rsync --checksum). A fresh
checkout gives every file a new mtime, so every deploy, docs-only
included, read as a runner change and restarted it.
- The manifest sync no longer lists a package-lock.json this pnpm repo
does not have; its rsync error blanked the output and hid real changes.
- Runner 0.8.47; the drain log says what happens now.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
* feat(previews): a status mode that says where a change sent with `ask` is
An ask to a preview's builder answers with a runId and a commandId, and
nothing could read them back from Actions: a change that had not landed after
half an hour was waiting, running or failed, and there was no way to tell.
`status` reads the run (and the queued command) through the deployed app as
the operator, the same way the other modes act.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
* feat(previews): status also says whether the cloud builder is running and what its update drain last did
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
* feat(previews): status shows the runner restart's state and each agent the drain waits on
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
* fix(runner): a day-old Claude with no status file no longer holds every runner update
The drain restarts the box runner only when no agent is working, and a Claude
with no status file counts as working ("unknown is not idle"). Two such
processes, 6 days and 1.8 days old, held the drain open while all six other
agents sat idle: the runner stayed on 12 October's code, and since the
commands route holds new work for a builder that is behind
(src/lib/runner-update-hold.ts), no new task started on the cloud builder
at all. Center SOM's change sat "Waiting for a builder" for over half an hour,
and so did everything else.
Every current Claude writes its status file for as long as it runs, so one
that has written none for a day (LOKI_RUNNER_LEFTOVER_SECS, default 86400) is a
leftover — a session from a CLI that predates the file, or a helper — and no
longer holds the restart. A young one with no file, a Claude whose file says it
is working, and every other agent CLI are still busy. Pinned in
test-drain-and-restart-runner.sh.
Also on this branch: previews.yml `status` (a run's state, the queued command,
the runner, its drain and each agent's status — names and states only), which
is how this was found.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
---------
Co-authored-by: Claude <noreply@anthropic.com>
Found 2026-10-18: diplodoctor.orangecat.ch and causius.orangecat.ch have
been running since 2026-09-10 (health green, changelogs moving), but the
fleet map — and so bitbaum.orangecat.ch and the public chat — still said
"prospect" / "validating", and Diplodoctor's description and identity still
told its first idea: cross-border healthcare and medical tourism.
- The map's `what` reads the README's opening paragraph first, the way the
roadmap and changelog already come from ROADMAP.md and CHANGELOG.md
(repo-records.ts: readmeLead). Headings, badges, lists, code, generator
boilerplate and sentences meant for contributors ("defined in HEIDI.md",
"Built with Next.js") are skipped; the stored description is the fallback.
Audited against the fifteen shown projects: the README was right in every
case where the two disagreed (evig, Hirnli, Diplodoctor, Causius).
- Migration 0116: Diplodoctor's project gets its repository link (it had
none, so Loki never read its README, roadmap or changelog) and its public
identity is rewritten from its README. The replaced texts are kept in the
migration's comment.
- apps.conf: diplodoctor prospect → live, causius validating → live. Both
are served products in beta ("live" means served, not released). They
stop sleeping when idle, like Heidi. fleet-sites.ts regenerated; the
public footer gets their names and a line each from their own headlines.
Tests: repo-records covers the lead (heading glued to its paragraph, badges,
contributor sentences, boilerplate, the length cut) and the third fetch.
tsc, eslint, prettier, fleet-map, fleet-register, fleet-sites-derived and
widget-chat-concierge pass.
Claude-Session: https://claude.ai/code/session_01HyfPCAeTFi2sjpVY44Y1JJ
Co-authored-by: Claude <noreply@anthropic.com>
The owner used Loki from a phone (2026-10-18) and could not tell whether
anything worked. Four separate faults, each passing every check:
The cloud builder ran code days behind the app. Its restart waits for
every agent to be idle, and autopilot refilled the queue the instant one
finished: ten consecutive deploys (23:38 → 09:12) found "2 agent(s)
working — deferring restart". Hence "Model: not known yet" of an answer
the screen was showing. Now, while the cloud runner's heartbeat version is
behind the deploy's, the commands route hands it no work-starting
commands (dispatch, launch_agent, auto_continue, browser_task) — a
person's own words into a session still go through — so the idle moment
comes, the restart lands, the queue resumes on the new code. Server-side
on purpose: a runner-side rule would have waited for the very restart it
was meant to allow. Control's builder line says "a newer version waits
for its agents to finish" meanwhile.
An agent renamed a preview site, committed, and reported "the work lives
only on this machine — tell Loki where this preview's remote should
live". The box contract says push or fail loudly; a preview folder is
served from disk and has no remote by design, so the change had been live
since the save and the owner read a failure and a chore. Every dispatch
to a preview folder now carries "Where this goes" (lib/previews/
delivery-note), and the contract has the same section.
The session sheet's Change and Set typed /model and /effort into the
terminal and closed; Claude Code drew its picker behind the conversation
and nothing on screen moved. Each row now lists its choices; a tap sends
the command with the choice named (/model sonnet, /effort high), the
sheet stays open and says what is changing, and settles when the log
names it. The sheet is built like the Settings sheet.
The session box had a 26px library button beside 44px round ones, a 36px
chip and a 34px Keys pill, the microphone second from the left in one
view and beside Send in the other, and "claude" on the tab beside
"Message Claude…". One row, one size, one order in both views; the
agent's name everywhere (terminal-strip-tabs badgeNames).
Widget: the owner's change list reads what needs them first (the line
counted nine, the list showed none); "9 needs you" → "9 need you"; a
failed call is named ("my call to Loki to save your note failed… Your
words are still here — press it again") instead of "one of my calls to
Loki failed — nothing for you to do".
Tests: runner-update-hold, preview-delivery-note, owner-changes-order,
session-sheet-browser (new); builder-presence, widget-changes,
widget-self-report, inject-context-boundaries extended.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
`check` proved the site, the tour and its pictures answer, but not what the
page says, so a preview renamed to fix a misspelt store name (Центр СОМ, not
center-com) could not be confirmed without opening it. It now prints the
home page's <title> and first heading.
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
Co-authored-by: Claude <noreply@anthropic.com>
Private tiles on bitbaum.orangecat.ch/private/ now render through the same
tile as the public work grid (bitbaum PR #136). This adds the picture they
show: GET /api/fleet/private/shot/<slug>, owner only, a 1280x800 picture of
the project's site (a preview through Loki's own route with the owner's
cookie, its widget left out), kept for twelve hours. A site behind its own
access-code page is not photographed, so its tile is text, not a code page.
takePagePicture takes a viewport; wider than a phone is a desktop browser.
The owner check is one helper (studioOwnerCheck) shared by the list and its
pictures.
A preview can now move: POST /api/previews/<slug>/move { to, name } attaches
the new address, renames the folder, moves the project row and its name in
one transaction (the folder moves back if that fails), points the widget at
the new address and detaches the old one. Center SOM was born center-com-3
from a domain spelled in look-alike Latin letters; this is how it becomes
tsentr-som. previews.yml gains `move` and `ask` (send the builder a change).
A website preview's one line names the site by host ("center-com.ru"), not
by its URL.
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
Co-authored-by: Claude <noreply@anthropic.com>
The tour's pictures came back 404 on center-com-3 with no way to tell a
server without a browser from a page that never went network-idle. The page
picture now waits for load, then for idleness only up to eight seconds, and
photographs what is there — a shop page with beacons that never go quiet
still gets its picture. A picture that cannot be taken answers with
x-loki-picture-reason, and the owner-side check prints it, together with the
tour's headline and first rows.
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
Co-authored-by: Claude <noreply@anthropic.com>
The first run against the deployed route showed the parsing one-liner had a
quoting error, and the failure path printed the app's answer — which carries
the cookie — into a public Actions log (run deleted). The cookie is now read
from a file by a heredoc script, and a refusal prints only the HTTP status and
the app's error sentence. test-preview-host.sh pins that no echo, cat or head
of the answer exists in the script.
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
Co-authored-by: Claude <noreply@anthropic.com>
GET /api/previews/<slug>/cookie, owner only: the cookie minted from the code
they set, set for Loki's /p/ path and named in the body. The owner-side check
(preview-check-on-box.sh) now mints the operator's session on the box, as the
create does, and asks the deployed app for the cookie — so it no longer
depends on how far behind main the box's Loki checkout is, which is what made
it fail twice today. The Set-Cookie attributes have one producer
(previewAccessSetCookie), shared with the gate.
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
Co-authored-by: Claude <noreply@anthropic.com>
The preview route kept a null project for five seconds, so the address a
creation had just proved reachable answered 404 to the first visitor
(center-com-3, 2026-10-17): createPreview asks the host whether it answers
before the project row exists. Null is no longer kept.
preview-check-on-box.sh minted its cookie with a script the box's Loki
checkout did not have yet (it is often behind main). ensure-preview.sh now
ships that script into the checkout's git-ignored .tmp/ before every check,
and the check prefers the shipped copy.
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
Co-authored-by: Claude <noreply@anthropic.com>
* feat(previews): before and after, photographed — the tour of what Loki changed on a live site
A preview made from a live site (/change "Improve this site") used to end in
improvements.html, a page the build agent styled freehand that Loki could
neither check nor illustrate, and the owner still compared two sites from
memory. Now the build leaves improvements.json (one entry per change naming
the live page and the new file, plus the engineer's account under the
pull-request walkthrough's keys), and Loki shows it:
- `/p/<slug>/_loki/before-after`, behind the preview's own code: each change
as the live page and the new page photographed on a phone, side by side,
with the build's words, what was not brought over, the questions for the
owner, and the account. Pictures are taken by lib/feedback/page-picture on
first ask and kept in the folder's `.loki/pictures/`; "before" pictures are
taken the moment the preview starts, while they still are the before; an
"after" is Loki opening its own preview with the access cookie
(`x-loki-picture: 1` keeps the widget out of the shot), keyed by content.
- Watch it work links the tour and shows the Walkthrough from the folder.
- The brief says a preview is a first impression, not a migration: the
homepage and the pages a visitor uses, at the live site's own paths.
The consultation's tour now reads the pages a buyer reads: navigation before
footer, the biggest section (a shop's catalogue) first, one page per section
before the second, accounts and small print left out. center-com.ru's tour had
been the login page, the privacy policy and the bank details.
From the review of this flow: the consultation cache is keyed by the
normalized address (every "Build" click had re-read the whole site inside the
request); a create saves the access code and attaches a host only after every
check has passed; name and folder agree (a leftover folder no longer serves
<name> at <name>-2); the gate no longer names the client; the chat's
read_website reuses the crawl; one in-flight helper; the shared escaper; the
preview route memoizes its project lookup for a page load; stale comments.
Dogfood without a browser: the Previews workflow gets `website` (the exact
/change path, as the operator, on the deployed app) and `check` (open a
preview as its owner and report the site, the tour and its pictures — the
cookie is minted on the box and never printed).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
* fix(watch): the preview walkthrough reads from a lib the shared-access test can bind
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9KbVEpxKLC9nhKhpWncU1
---------
Co-authored-by: Claude <noreply@anthropic.com>
- Claude Code writes the effort level on each answer in its log, beside the
model. The reducer reads it and SessionInfo shows it: "Opus 5.5 · high
effort · Auto", and the sheet's Effort row names the current level.
- The box agents' contract gains "What Loki knows that this machine does
not": records arrive attached; when one is missing, say "I need the
feedback reports for <project>." (which the box turns into an Attach
button), never ask the operator to export them by hand. A test ties that
sentence to the detector.
- The contract was only installed when the builder was first set up, so
every later edit stayed in the repo. deploy-hetzner.sh now re-applies it
(merge-only, 60 s cap, never fails the deploy).
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
The row's first host is now vita.orangecat.ch; vitareba.orangecat.ch stays
served so sent email links, calendar subscriptions and cron callers keep
working. The app redirects its pages to the new host (bitbaum/vitareba).
Apply with Sync sites (apps: vitareba) after merge.
Claude-Session: https://claude.ai/code/session_014d9r6dNr1vW789Q75hPcHF
Co-authored-by: Claude <noreply@anthropic.com>
* feat(chat): book without a second tap, reminders, notes, agenda, pictures and voice; skill installs itself
* feat(ops): doctor prints how the gateway sends a message
---------
Co-authored-by: Claude <noreply@anthropic.com>
The first run of the gateway-up workflow (#1208, 2026-10-15) showed the
real cause. Linger was already on and the user manager's bus socket
existed, but every `systemctl --user` call was refused ("Failed to
connect to user scope bus ... Connection refused"): a stale socket left
by a user manager that is not running. Enabling linger could not fix
that, so the unit was never enabled or started.
Step 2 now restarts user@<uid>.service and waits for the manager to
answer before enabling the unit. If it still will not answer the script
stops and prints what the box says (service status and journal, whether
the template is masked, sessions, the runtime dir) and that NOTHING was
installed: running the gateway as a system service instead would add a
new persistent unit on production, so it is a decision for the operator,
not a fallback this script takes by itself. Also fixes the HTTP probe's
doubled "000000".
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
Co-authored-by: Claude <noreply@anthropic.com>
WhatsApp and the Telegram chat are both carried by the OpenClaw gateway
on bitbaum; Loki has no inbound channel of its own. The messaging doctor
(#1206) found it dead since 2026-10-08: no process, nothing on :18789, the
unit `disabled`, and the openclaw user's systemd manager unreachable.
Forwarding a message to WhatsApp to be put in the calendar had stopped
working and nothing said so — the health sweep stopped watching the
gateway the same day, on the belief it was retired.
scripts/hetzner/openclaw-gateway-up.sh, run by
.github/workflows/openclaw-gateway-up.yml over the same SSH setup as the
doctor, enables linger for the openclaw user (without it the user's
systemd manager exists only while someone is logged in, so the box's own
reboot left the gateway down for good), enables and starts the unit
`openclaw gateway install` wrote, waits for :18789 and prints the
gateway's own channel status, masked. It touches no config, credential or
token, and says plainly if WhatsApp's linked-device session needs a QR
scan, the one step only the phone's owner can do.
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
Co-authored-by: Claude <noreply@anthropic.com>
farmaciadelparco's preview gate deployed fine and was rolled back: the
before/after page check compared the open site with the code page and read
it as lost text. page-check.mjs now records whether the response came from
an access-code page (X-Access-Gate header); page-check-compare treats a
change of gate state as "no baseline" with a note. Gated on both sides is
the same page and is still compared; a gate page that does not load still
fails the deploy.
Claude-Session: https://claude.ai/code/session_014d9r6dNr1vW789Q75hPcHF
Co-authored-by: Claude <noreply@anthropic.com>
* feat(ops): a read-only messaging doctor, run from GitHub
A Petvity report left from another phone could not be found, and no
Telegram, Web Push or WhatsApp message arrived for it. Everything that
answers "ingest, notifier, bot or gateway?" lives on the box, which an
agent session cannot reach — so the question was being guessed at.
scripts/hetzner/doctor-messaging.sh, run by .github/workflows/box-doctor.yml
over the same SSH setup as openclaw-media.yml, looks at: whether the
feedback rows exist, the widget token's status and last boot, what the
notifier logged, the channel configuration (yes/NO only), the Telegram
Bot API live (getMe, webhook state, optionally one test message to the
operator's own chat), the OpenClaw gateway (process, port, error-shaped
log lines, session and WhatsApp auth file times, the CLI's channel
status) and the last actions Loki queued from chat.
It changes nothing. The repo is public, so it prints counts, times and
statuses only: no feedback text, no action titles, no secrets, and every
line passes through a filter that masks long digit runs and token-shaped
strings.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
* docs(telegram): register the box doctor's one test message
CI's Telegram-registry gate (scripts/ci/check-telegram-registry.sh) found
that scripts/hetzner/doctor-messaging.sh can reach the operator's phone
and was not listed. Add its row: one test message, on demand only, when
the Box doctor workflow is dispatched with send_test true.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
---------
Co-authored-by: Claude <noreply@anthropic.com>
A visitor opening francesco.orangecat.ch saw "This preview is not available
right now / Previews are switched off on this server": the word "preview" is
ours, and the page spoke as if the site were broken. It now says what is true
in the visitor's terms: the site is private for now / not open yet / not here.
The previews job takes an optional `code` input (masked in the logs) and passes
it to the live API, which saves it before it checks whether the address is
taken, so it also sets the code for a preview that already exists. Delete the
run afterwards: a public repo shows a run's inputs.
Claude-Session: https://claude.ai/code/session_01XpakL9C3TESU4H45fXMFfc
Co-authored-by: Claude <noreply@anthropic.com>
The starter's provisioning wrote DATABASE_URL with 'localhost' and gave the
role no pg_hba.conf line. On this box that is refused (localhost resolves to
::1 first; hba is a per-role allowlist ending in a reject), so a new starter
site's /api/health was red with its database present. Write 127.0.0.1,
rewrite an earlier localhost, and add the role's own line above the reject
block once, with a backup and a reload. Found provisioning diplodoctor.
Claude-Session: https://claude.ai/code/session_01UzP8kyUAz5uhKE3mt87Yi7
Co-authored-by: Claude <noreply@anthropic.com>
francesco.orangecat.ch showed ERR_SSL_PROTOCOL_ERROR: wildcard DNS sends every
label to the box, but a label with no Caddy vhost has no certificate. Found on
a phone four times.
- createPreview waits until the address answers over HTTPS and says plainly
when it does not, instead of reporting success on hope
- previews.yml + ensure-preview.sh: `create` makes a preview as the operator on
the box and fails unless its address answers; `heal` (every six hours)
re-attaches and re-checks every preview folder so a lost vhost is restored
before anyone opens the link. No access code goes through a public repo's
Actions
- A preview with no code yet answers 503 ("switched off"): the address and
certificate work, the code is set in the app
- set_preview_code chat tool ("set the preview code to cat"); create_website
still insists on a code
- Tests: ensure scripts parse, fail loudly, run on a clock, carry no code
Claude-Session: https://claude.ai/code/session_01XpakL9C3TESU4H45fXMFfc
Co-authored-by: Claude <noreply@anthropic.com>
* feat(previews): a preview is the whole of its own address, and a finished site can be brought in
"create website for Murphy's Bar" now ends at murphys-bar.orangecat.ch, behind
the access code, with the widget on it.
- attach-preview-host.sh + lib.sh preview_vhost: a Caddy vhost per preview.
Wildcard DNS already points every label at the box, so there is no record
to set. "/" opens the entry file, everything else moves under /p/<label>/,
and X-Preview-Root tells Loki the preview is the root
- handle.ts: with that header the cookie is scoped to "/", the gate posts to
"/", and the widget loads from Loki's own origin
- createPreview takes an address (default: the name) and attaches the host,
falling back to the /p/ path with the reason when the server cannot
- Build a preview takes a .zip of a finished site (unpack.ts: no unsafe paths,
no symlinks, no .git, byte-counted) and commits it as it arrived
- Docs: prospect-previews.md ("Its own address", "A site that already exists",
"Create website for <name>") and the standing flow in CLAUDE.md
- Tests: previews, previews-route (own-address cases), preview-unpack,
test-preview-host.sh (in test:ops)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpakL9C3TESU4H45fXMFfc
* fix(previews): read the base domain from its one source
address.ts read SITES_BASE_DOMAIN itself; the env-example test caught that
the variable Loki actually reads is LOKI_SITES_BASE_DOMAIN, owned by
site-cd.ts sitesBaseDomain(). Use that.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpakL9C3TESU4H45fXMFfc
---------
Co-authored-by: Claude <noreply@anthropic.com>
A cloud session has no ~/.claude/CLAUDE.md, so it never saw the org rules.
Those stay in bitbaum/fleet AGENTS.md (packages by default, searchkit,
chatkit, names, identity). This file only points there.
* feat(ops): the cloud builder's liveness is public, deploys print its state, the queue says "offline"
The shared cloud builder was offline all night on 2026-10-11 → 12 and
nothing outside a signed-in page said so: /api/health reported the web
app green, the fleet sweep probes only HTTP codes, and the box journal is
the one place the restart's outcome is written. The owner found out by
trying to work from a second computer.
- GET /api/health/builder: 200 while the owner's cloud builder is
connected and heartbeating, 503 otherwise, with the last heartbeat and
version. Public on purpose (one boolean, one timestamp, about a service
the operator runs); registered in scripts/test/api-route-auth.ts.
- install-watchdog.sh: the box watchdog now probes it, so a state flip
alerts on Telegram like a dead site does.
- deploy-hetzner.sh: before scheduling the runner restart, print
`systemctl is-active loki-box-runner`, the last runner journal lines and
the last drain lines into the CI log — the first place a person without
an ssh session can read why the builder is down. Warn-only.
- feedback run-step: a job on the cloud queue while the cloud builder is
offline reads "Cloud builder offline — nothing starts until it
reconnects", not "Watch shows why" (nothing showed why).
Tests: feedback-run-step (+2), api-route-auth, watchdog-check.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB
* fix(terminal): a private cloud builder reads "private", not "offline"
Walking Loki as a brand-new account (2026-10-12): the Terminal's chip said
"Cloud builder offline" beside an empty state that said "Cloud builder is
private for this account". Presence is per account and a new account has
none, so the chip mistook "not yours" for "down". The chip derivation moves
into terminalHonesty() (one helper, the component stays under its 510-line
ratchet) and names the gate first.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Xssd1hFZCUSxqjACjoVBB
---------
Co-authored-by: Claude <noreply@anthropic.com>
scripts/site-template is now bitbaum/fleet templates/app — Next.js 16,
better-auth accounts (password, link, passkey, 2FA, OrangeCat/bitbaum sign-in
as env-gated OIDC), en/de/fr, nonce CSP, ai-kit/mail-kit/limitkit/bip-kit,
tests and CI — copied at a pinned fleet commit by
scripts/templates/sync-starter.sh. CI proves the copy is exact
(sync-starter.sh --check), and starter-sync.yml opens the PR when fleet's
starter moves. Never edited here.
The kickoff's "nextjs-tailwind" starter seeds the same app from
src/lib/starter-app.generated.ts (generated from the directory, pinned by
scripts/test/starter-app.ts), minus the workflows register-site.sh adds with
the site's CD. The repo is seeded in one Trees API call with inline contents
instead of a blob POST per file (~85 for this starter). The widget token rides
in .env.production; the starter's .gitleaks.toml allows NEXT_PUBLIC_* values.
The new-from-scratch picker reads the light template list, so the starter's
file bodies never reach a client bundle.
Both paths give the site its database and auth/seal secrets ON THE BOX
(scripts/hetzner/provision-db-on-box.sh: role + database, ~/.db-credentials,
/opt/<slug>/shared/.env; existing secrets never replaced; nothing printed), and
record the db in the register row so every deploy applies drizzle/.
register-site.sh seeds the starter's full workflow set to starter repos and
the golden CI floor to anything else, never overwriting another repo's ci.yml.
test-site-template.sh follows the starter (verify SSOT, design tokens instead
of a local palette) and its comment stripper is fixed: the sed range deleted
the page from the doc comment to EOF, so every day-zero check had been passing
against an empty string. check-template-contrast.mjs and the starter-lock
generator are retired with the files they checked.
Claude-Session: https://claude.ai/code/session_01W7K2Gm5wcbfCi7THtmV1Hy
Co-authored-by: Claude <noreply@anthropic.com>
Provisioned by causius's provision-matters workflow (role, database,
pg_hba lines, schema 0000 applied). Naming it here lets the shared deploy
apply later migrations; its first run baselines the ledger at 0000.
Claude-Session: https://claude.ai/code/session_012EJFFkKhmaVnnH8E3mHnaZ
Co-authored-by: Claude <noreply@anthropic.com>
Every host check asked "is X down?"; none asked "is X stuck doing the
same failing thing?" — and a stuck loop looks healthy to all of them.
loki-calendar-drain retried one unbookable event every 15 s from
2026-09-21 to 2026-10-08 (38,851 failures, a free-tier model call on
each) and nothing said a word.
host-check.sh now groups the last hour's error-shaped journal lines by
unit + digit-folded text; >= 120 repeats is a loop. One message per
unit (alert_once backoff, daily), N loops in a tick = one digest.
Heartbeats don't count. Dry-run on the box's real journal: catches the
calendar loop in 23 of 24 hours, one other hit (orangecat-2-app), no
noise. 6 new tests; the suite's journalctl stub now serves -o json.
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>