* feat(widget): Loki's own look, in Loki's light or dark mode, with one scroll
The site widget took its colours from the fleet's shared tokens, whose
accent is OrangeCat's warm orange, and was dark only: on a client's light
site the owner saw an orange-ringed black panel and asked why Loki's widget
looked like OrangeCat.
- Themes are generated from Loki's own globals.css, light and dark. The
accent is the ink; the warm colour is only the focus ring and a picked
element's outline on the host page.
- Every widget stylesheet reads var(--lk-*), defined for both modes on the
shadow host; widget/theme-mode.ts picks one. The owner gets the mode they
chose in Loki (user_preferences.theme, saved by ThemeSync via
PUT /api/me/theme, returned with their changes and remembered per site);
everyone else gets their device's setting, followed live.
- The panel is one column with one scroll area (the thread) between a fixed
header and composer. The whole card used to scroll too, which hid the
composer below a laptop's fold and nested scrolls on phones.
- The desktop card no longer greys out the site it invites you to use; the
phone sheet opens at two thirds of the screen with a lighter scrim.
- About is a segmented control that fits a 320px phone on one line.
- The walkthrough card follows the same mode; its ring uses the highlight
so it reads on light and dark sites.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk
* fix(widget): the launcher is findable — Loki's mark at full strength
On the owner's phone, signed out of the owner pass, AOZ showed a grey
pencil at 38% opacity and 85% size, and the owner said the widget was gone.
Without the launcher there is no way to the sign-in that brings owner mode
back. The resting launcher is now Loki's spiral at full strength with a
hairline and a soft lift off the page, on phones and desktop; it still
fades while the page scrolls.
Also: the user_theme migration is renumbered 0107 after main's 0106.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk
* fix(widget): keep the shared chat's thread bounded however chatkit nests it
CI's widget-kit-browser (needs @bitbaum/chatkit, so it only runs there)
failed one check: the chat thread no longer had a max-height once the panel
became a flex column. The flex layout bounds it only when the wrap is a
direct child, so the cap is back as a backstop, and the test now pins the
outcome — the thread scrolls and ends inside a card that fits the screen —
instead of the mechanism.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk
---------
Co-authored-by: Claude <noreply@anthropic.com>
Asked to synthesize user feedback, the agent in a session searched its
memory folder, the repo and GitHub, found nothing, and asked for an export
of reports Loki already holds. And the conversation view said "Auto" with
no model and no way to learn what Auto meant.
- Loki's feedback reports reach the agent as a visible file on the box
(/api/feedback/export, fenced as untrusted, no contact data): from "/",
from a chip when the agent asks for feedback, and with any library prompt
that declares `attach: ["feedback"]` — in a session and in Run with Loki.
- SessionInfo names the model (read from the session log) and the mode in
words; its sheet changes the model, the effort (/effort) and the mode.
- Next-step chips use gpt-oss-120b and never approve an agent that said it
lacks data or access.
- Library prompts that pointed at things the agent cannot reach (the
knowledge graph, Loki's database) now say what to use and to say
"can't tell" instead of guessing.
- A pasted_content closing tag with attributes no longer leaks into the
conversation.
- "/" opens SessionPicker, never taller than the room above the box (it ran
off a 320×568 screen).
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
* feat(loki): always know how much AI is left, on every model
Asked for directly: "I should be always aware how much I have left on
each model." The numbers existed (one budget view feeds Settings, the
picker and Loki's answers) but a person only saw them inside the model
menu, in one sentence for all models, in words they did not follow:
"your share", "the pool", "unlocks in 19 minutes" beside "resets in 8
hours".
- The model button carries the count, always: "Auto · 12 left", or
"next 14:35" while waiting, or "your key". It is read on load, again
when each answer finishes, when the menu opens, and every two minutes.
On phones the button shows the count (the name was already cut to
"A…" there); under 380px the bare figure, so nothing overflows.
- Every model row says what is left on it — "12 left today", "Running
low — about 2 left, more in 40 minutes", "None left right now — back
in 3 hours"; own keys say "No daily limit" and today's answers.
- Plain words with clock times in the person's zone: "12 free answers
left today · full again tomorrow at 02:00", "the next one at 14:35".
The refusal says the same, so the two cannot disagree.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B
* fix(loki): a budget reply the button cannot use is ignored, not fatal
CI on the previous commit caught two things this change caused:
- The model button reads the budget on page load now, and read
`budget.freePool.short` from whatever came back. A reply without the
free count (mobile-flow-browser's fixture answers every API with
`{ok: true}`) crashed the whole chat page. The picker keeps a reading
only when it is a budget.
- The refusal looked up the person's zone for every refusal, opening a
database pool the gate test never closed. It is read only for the two
refusals that name a time, and the tests pass the zone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(fleet): private client projects behind the access code
- POST /api/fleet/private: client work without the client's consent, for the
private area of bitbaum.orangecat.ch. Opened by the operator's preview code,
then a signed expiring token; rate-limited; CORS for the studio origin only;
no repo URLs.
- Migration 0105: Sink Tattoo agreed to be shown; Wild Spirit (Anushka),
Farmacia del Parco and AOZ are client work without consent; Vitareba -> Vita
in display text.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014d9r6dNr1vW789Q75hPcHF
* style: format the 0105 snapshot
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014d9r6dNr1vW789Q75hPcHF
* test: list /api/fleet/private as code-gated public route
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
On a client's site the owner said a description field had no microphone
and asked, twice, whether the site used the fleet's packages. Loki gave
the same advice about one textarea twice, in German to an English
question, and its Review called the minutes spent talking to it "the
page never responded for 194 s" with an invented endpoint.
- The advisor now sees how the site is built: the packages its code
uses, the kickoff's plan, and the owner's build conventions
(src/config/build-conventions.ts, also carried by every dispatch).
- Naming a package is no longer treated as "explaining how to edit";
a point about every form is answered as a rule across the site; no
repeated answers; replies follow the language of the latest message.
- What the owner says to Loki is a `talk` step in Watch's trail, so a
Review reads that time as conversation; Review may not name an
endpoint the evidence does not show.
- Loki's unasked page read skips test data and replaces the previous
read instead of stacking one per page.
- First build convention: fields where people describe something get a
microphone from @bitbaum/chatkit; short fields never do.
Claude-Session: https://claude.ai/code/session_018LMe5Uv6mfWJibAiCaNbbk
Co-authored-by: Claude <noreply@anthropic.com>
The owner, 2026-10-15: "the change has been made, but I cannot watch it, I
cannot see it, I cannot follow it, and I cannot know if it was made".
The step list under a dispatch disappeared the moment the build ended, so
anyone opening the chat afterwards saw a bare "Completed". Now it stays
for the 48 hours a card follows its change, closes with how the run
ended, and runs straight into the follow line: merged, live, and Loki's
own phone-sized picture of the live page, served by a new owner-only
/api/orchestration/runs/:id/picture. A pull request that only repeats its
commit's sentence no longer quotes it twice.
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg
Co-authored-by: Claude <noreply@anthropic.com>
The phone terminal made a person choose Type (keystrokes, no microphone),
Prompt (a task with a microphone) or Keys before saying anything, the next-step
chips reshuffled while you read them, and the prompt picker could not find the
prompts you had saved yourself.
One box for the agent (SessionComposer), in the terminal view and the
conversation view, on a phone and a computer:
- Microphone, screenshots and the prompt library ("/" or the book button) in it.
- It picks the path itself: one of the agent's own commands is typed as keys,
a screenshot goes through chat-send, a live session is typed into (paste +
Enter, as in the terminal), and with nothing running the words go as a task
that starts the agent or waits for the builder.
- "What's going on?" is the first chip above it; the header and the big button
that asked the same question are gone.
- Keys is a button in its tool row and opens only the keys — no second text box.
- Pressing the terminal puts the cursor in the box (or, with live keystrokes on,
hands the screen the keyboard).
- The Type / Prompt / Voice switch, the voice-only button and the exact-keys
composer are removed; Loki's side panel only asks, and a summary's step lands
in the box.
Next steps hold still: one set per settled screen or reply, waiting for the
fast model (then the rules), never reshuffled by a late answer, frozen while
you type, shown whole instead of clamped, two on a phone.
Prompt library:
- The picker lists your saved prompts first, then Loki's, with chips for Yours
and each group; the keyboard hint is hidden on touch screens.
- Search also finds a prompt by the words inside it, after name, tag and
description matches so a typo'd name still comes first.
- On /prompts the search box sits on top and searches your own prompts too.
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx
Co-authored-by: Claude <noreply@anthropic.com>
Seen on the live site: "dentist on Monday at 9am" became two calendar
bookings. The message miner queued "Dentist Appointment" while the
model's propose_action, in parallel, queued "Dentist appointment"; the
pending-title index is case-sensitive and only covers drafts, and the
standing "put appointments in my calendar" rule approved both.
enqueueAction now treats an operator's ask as the same request when an
action of the same type, with overlapping title words, the same day and
(for messages) the same body, was proposed in the last ten minutes. The
second producer gets the first action back: the chat still shows its
card, and the model is told it is already being carried out.
Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B
Co-authored-by: Claude <noreply@anthropic.com>
* refactor(ai): the budget view's shared half comes from @bitbaum/ai-kit
The pace forecast, answer counting (admissionsLeft), refill wording
(refillsIn), midnight UTC, the history-window sentence, the reset
explanation and the action/explanation types now come from ai-kit 1.21.0,
where OrangeCat reads the same ones — so both products phrase a budget the
same way and the next app starts with it. Loki keeps what is Loki's: the
share, the pool states, the levers.
The seven-day line now says "Last 7 days", not "This week": it is seven days
ending today, the correction OrangeCat made in bitbaum/orangecat#1318.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu
* chore(deps): @bitbaum/ai-kit 1.21.0 — the shared usage wording
The budget view already reads its pace forecast, admissions count, refill
wording, history-window sentence and UTC reset explanation from ai-kit's
usage module; 1.21.0 is the release that ships it. ai-forms moves to 0.1.3
with it (ai-kit's own floor).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015QRNwA4BorkdoSCd8j5Xvu
---------
Co-authored-by: Claude <noreply@anthropic.com>
While a build ran, the chat card under it said "Agent is working · still
working · 7m" from start to finish. Now it lists what the builder has
actually done, as it happens, read from the repository: picked up, each
commit pushed (its message, as a sentence), the pull request opened (its
title), and the checks running, passed or failed — each with its time and
a link.
The repo is where progress becomes a fact, and it reads the same for every
builder, so no runner had to change. GitHub is asked at most once a minute
per run, only for an open run from the last six hours; any failure is
"nothing yet", never a broken card.
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg
Co-authored-by: Claude <noreply@anthropic.com>
* feat(ops): tell the operator when the gateway behind WhatsApp and Telegram dies
WhatsApp and the Telegram chat are both carried by the OpenClaw gateway
on bitbaum; Loki has no inbound channel of its own. It died on
2026-10-08 (the box rebooted, the openclaw user's systemd manager stayed
dead) and nothing said so for a week: the host health sweep had stopped
watching it the same day, believing it retired. Forwarding a message to
WhatsApp for the calendar just stopped working.
A check-gateway cron (every 10 min) probes the gateway. Any HTTP answer
is up; a refused connection or a timeout is down. Down raises one
gateway_down alert per outage (deduped) and one Telegram message — sent
through the Bot API directly, so it works while the gateway is the thing
that is down — naming the fix (run the "OpenClaw gateway up" workflow).
When it answers again the alert falls and one recovery message says so,
so the next outage is not swallowed by a flag that never fell.
Pure logic (lib/gateway-health.ts) is pinned by scripts/test/
gateway-health.ts, including that the probe uses a referenced timer (the
first version of the test "passed" by never finishing, because
AbortSignal.timeout's timer is unreferenced). The alert type is
registered with its producer, the timer is installed by
install-hetzner-crons.sh, the Telegram sender has its registry row, and
the cron calls no model (no-free-background-ai walks it).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
* docs(changelog): gateway-down alert
---------
Co-authored-by: Claude <noreply@anthropic.com>
Found by using loki.orangecat.ch as a new, non-technical account:
- "Yes, create it" under Loki's own suggestion was sent to the only
project as a build task. A bare yes is now a reply: it runs the one
ready-to-send line the previous answer ended with, or stays in chat.
- A newcomer's private zone (approvals, commitments, people) was locked
behind the founder's env PIN, which every PIN-less account inherited —
a dead end for them, and the founder's PIN opened all of them. The env
PIN now gates the owner account only.
- Loki did not know the date: "dentist on Monday" came back as "the date
for Monday is not in your data". Every turn now carries the time in
the person's own zone, and drafts lead with what was drafted.
- "What did I ask you today?" got "no record of any request". Recent
threads are now a source Loki reads when asked about them.
- A refused dispatch left its run WAITING forever (six phantom runs);
it is now closed as undelivered, quietly, since the reply says so.
- The fleet fact said "OFFLINE — nothing can run" to an account that
can never use the cloud builder, so Loki told it to restart a runner.
It now says which is true and the way forward; the prompt asks for
plain words and no "restart Loki's services" advice.
- A system-prompt example leaked the owner's project into strangers'
answers ("sink: bring runner online…").
- Citations were eight 44px "Source" buttons inline; now one per
paragraph, at its end.
- Thread titles were cut by reasoning tokens ("Bring") and repeated the
project shown right beside them.
Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B
Co-authored-by: Claude <noreply@anthropic.com>
Production held ZERO subscribed push devices (the messaging doctor,
2026-10-15): the server could send a push, the VAPID keys and the service
worker were in place, and no screen anywhere offered a phone the choice —
usePushSubscription was imported by nothing. A new report on a site
reached no device, and said so only in a log line.
- Settings → Notifications gets an "On this phone" card: Turn on, Send a
test, Turn off, with a plain sentence for every state (not asked,
working, on, blocked by the browser, unsupported — with the iPhone
Add-to-Home-Screen fix — error with retry, server has no key).
Pure view logic (lib/push-card.ts) is pinned by scripts/test/push-card.ts;
copy is SSOT in config/comms.ts.
- GET /api/push/public-key hands out the server's own VAPID_PUBLIC_KEY, so
a phone no longer subscribes against a key inlined at build time that a
build can lose or leave stale; POST /api/push/test sends one test push
and names the failed precondition instead of a bare zero.
- The page-render harness is now a shared core (render-harness.mjs) with a
thin script per page; the push card has one, and rendering it is how a
filled button 8px shorter than its neighbour, and under 44px, was caught
and fixed.
Claude-Session: https://claude.ai/code/session_01NJJp6XiUkeEVzjDaBmWjL3
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>
Two things found by testing the live site with a fresh account:
- "Put an event in my calendar…", "remind me…", "text Anna…" were sent
to the only (or selected) project as a build task, because the
sole-project fallback treats any imperative as work for it. They now
resolve as chat, where the proposal path drafts the calendar entry or
message for approval. Asks that name build work still dispatch.
- The thread-naming ask fired the instant the answer landed, while that
turn had just used the fast model's minute window, and failed — most
new threads kept their opening line as a title. The route now says
`retry: true` when only the model was unavailable, and the client asks
after 3s, then again at 10s and 30s.
Claude-Session: https://claude.ai/code/session_01CG9dupSVqoXCCqKfBCfd9B
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>
The "Live" update in chat had the reporter's screenshot and nothing of the
page as it is now — to see the result the owner still had to open the site.
- post-shipped-update.ts takes an after picture of the live page at phone
size (takePagePicture, the same one-at-a-time browser the fix check uses),
scrolled to the element the reporter pointed at. When the fix check already
took one (payload.fixPicture), that is reused instead of a second browser.
- It is stored like any chat picture (conversation_images) and the update
carries its path; the card shows before and after side by side, even on a
phone.
- No picture for a failed deploy (the page is the old one) or a
behind-the-scenes change (nothing on the page changed). No browser or a page
that will not load: the update still posts, without the picture.
Claude-Session: https://claude.ai/code/session_01MqXhtjrmVb4vKE6oKSyHVg
Co-authored-by: Claude <noreply@anthropic.com>
* Make mobile agent conversations and shared project progress coherent
* Remove the retired automatic personal-goal dispatch reader
* Keep the conversation connection indicator in sync with its live stream
* Preserve existing phone install identity and clarify the historical implementation plan
* Make session recovery instructions user-facing and record the security-alert source review
* Carry project proposals into coding handoffs and clarify empty-session routing
* Make phone conversations readable and start connected repositories without a local folder
* Wait for account builder status before offering a desktop install
* Format builder connection regression coverage
* fix(models): show interactive prices with explicit units
* chore(ci): diagnose the catalog fixture format while workspace is offline
* style(models): apply fixture formatting and remove temporary diagnostics
* style(models): format the future-listing guard
* Clarify mobile catalog details and keep free quotes on their advertised route
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): the access code lives in the app, and Loki's chat can create the website
"Create website for Murphy's Bar" is now one sentence to Loki, and the code is
typed in the app, not set on the server.
- user_preferences.preview_code (migration 0102): the operator's own code,
remembered once, opens every preview they own. LOKI_PREVIEW_CODE is only the
fallback. A preview with neither refuses to be created
- Build a preview has an Access code field (prefilled with the saved one)
- create_website chat tool: same createPreview, no dialog; answers with the
link and the code. Catalog marks tools that act on the operator's command
(acts) so the model does not say "needs approval"
- Tests: owner code beats server code, works with no server code at all
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XpakL9C3TESU4H45fXMFfc
* fix(agent): let defineTool carry the acts flag
create_website marks itself as acting on the operator's command; defineTool's
parameter type did not list the field, so tsc rejected it.
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>
* 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>
* Do not brief agents with imported or retired notes.
A knowledge.sqlite snapshot and a sentence that restates a retired fact were still costing health and riding along in every dispatch. Age alone still does not clear a note someone wrote in Loki.
* Drop the unused import that failed lint.
hasAnswer left today/page.tsx when the flag check moved to signalIsLive.
* fix: preserve short chat labels and simplify model choices
* fix: clear picker data in the opening gesture
* fix: honor explicit shared-model choices without billing own keys
* fix: distinguish shared budgets from previous prompt limits
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(packages): release a shared package from Loki, watch it roll out, pause a bad release everywhere
Release. /packages/[slug] gains "Unreleased": the commits on the package
repo's default branch since its highest version tag (count + first lines,
marked breaking / new / fix), the next version from conventional commits
(feat → minor, ! or BREAKING CHANGE → major; under 1.0 breaking → minor
and a feature → patch, the same breaking rule as dependabot.ts and the
fleet sweep), and "Release vX.Y.Z", which dispatches the repo's own
release.yml (bitbaum/fleet templates/package) with that exact version. It
refuses — with the way forward — when release.yml is missing (links the
fleet's template-sync PR or the sync itself), main's checks are red,
running or absent, a release is already running, there is no version tag,
or the suggestion moved since the page was read. Nothing about a release
is stored; the panel reads tags, compare and workflow runs from GitHub
behind ReleaseGithub (release-github.ts), so it is tested with a fake.
Owner. Whoever owns the Loki project whose repo is the package repo; with
no such project, an account whose GitHub token can push to it. GitHub's
push permission must agree either way (release-access.ts).
Rollout. Per recent version, every project using the package lands in one
bucket: on it, update ready / waiting on tests / held / paused / failing,
behind with no update, newer, unknown — derived from project_packages and
package_update_requests. "Red in N projects — their tests fail on vX.Y.Z"
with links.
Pause. package_release_pauses (migration 0101, additive: one new table) is
the one stored decision. The update sync now takes pauses: decideEnforcement
gains `paused` / `decidedBeforePause` — a paused update is held in every
project whatever its setting and never merged (an approval is kept for
after), a person who takes the pause hold off is left alone, a stand-aside
from before the pause does not exempt it, and resume removes only holds
nothing else wants. Pause/resume applies at once through the same sync
path. Cards, update lines and the package page say "Paused by the package
owner".
Routes: GET/POST /api/packages/[slug]/release, POST /api/packages/[slug]/pause
— signed-in owner only, rate-limited, zod bodies, jsonOk/jsonError.
Migration is numbered 0101: 0100 is taken by 0100_kit_plan, which lands
first; until that rebase, migration-journal-coverage.ts sees the gap.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* style(packages): format with the repo's locked prettier
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(kickoff): brief a new site's first build with the fleet packages it is built from
A kickoff agent briefed only on the project wrote search boxes, booking
pickers, mail senders and payment handling from scratch, although the fleet
ships each as a package. The first build now gets a "BUILT FROM" block: the
packages its brief calls for, each with the catalogue's install line, what to
use it for and "do not write your own".
- src/config/kit-plan.ts: the feature -> package table (trigger words keyed
by catalogue name). A package the live catalogue no longer lists is never
planned; a new one is one entry.
- src/lib/kit-plan/: the pure planner (whole words, "no X" plans no X),
the prompt block under a 1,800-char budget, coverage helpers, and the
server half that reads the catalogue and the starter's own package.json.
- Client work is also told to keep the starter's token structure and replace
@bitbaum/design-tokens with the client's (templates/app globals.css and
tailwind.config.mjs; fleet SHARED.md design-tokens row).
- The plan is recorded on user_projects.kit_plan (additive migration 0100)
and the kickoff run's payload.kitPlan — never in project_packages, which
stays observations.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* feat(projects): show what a new site will be built from, and what is still planned
- Kickoff screen: a text-only "Built from" note under the start button says
in plain words which shared parts the site will use ("Your site will use
sign-in, search, payments and email — parts already running on N other
sites, kept up to date automatically"), and for client work that it gets
the client's colours and fonts. No button and no gate: "Not right? Change
the story" links to the Story tab, and the build starts either way.
- Story tab: under Built from, a "Planned" line names the parts the first
build was planned with that the repository does not have yet. It is its
own line because project_packages rows are observations, never plans.
- Reading those observations is also where the kickoff run's payload.kitPlan
gets the packages observed after the first build (once, an hour after the
run closed), so kit coverage can be computed later.
- a-flag-can-be-raised-and-cleared: check the Flags panel sits on the Story
tab by tab, not by an 800-character window the new line overflowed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* fix(projects): the plan preview reads the dossier itself, with the cleaned description
Lint: the raw description must go through cleanDescription, and
ProjectWorkspaceView was past its function-length limit. KitPlanPreview now
takes the dossier and builds its own inputs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(packages): each project's update setting, applied to its Dependabot PRs
Package updates reach a project automatically by default, gated by its own
tests, with asking as an option. Loki is the policy layer only: Dependabot
proposes the pull requests and the fleet auto-merge sweep merges them.
- user_projects.package_updates: "auto" (default) | "ask" | "pinned". Values,
labels and the one-line consequence of each are SSOT in
src/config/package-updates.ts; an unknown stored value reads as "ask".
No CHECK constraint, as for entities.auto_inject_mode_override (0023).
- package_update_requests: open Dependabot PRs that bump a fleet package —
PR, head, packages (from -> to, breaking, fleet), checks state, state,
whether Loki holds it, and the person's decision. project_packages.dep_name
records the key package.json lists a package under, so an npm alias or a
git dependency named by its key is matched back to the catalogue.
- Pure Dependabot parsing (single, grouped, `in /dir`, backticked shas, `v`
tags) and breaking detection identical to the sweep's: a major, or a minor
under 1.0; a version that is not semver counts as breaking.
- Enforcement as a pure decision table: hold when the setting is ask or
pinned or the bump is breaking; lift only a hold Loki added; a hold a
person added stays and blocks Loki's own merge; a hold someone takes off
on GitHub is not put back and that PR is never merged by Loki.
- Decisions: Update (lift the hold; merge a breaking one once its checks are
green, else on the next read), Not now (hidden 7 days), Stay on this
version (@dependabot ignore this <part> version, per dependency in a
group, close for a sha).
- The Phase 1 sync applies the setting after each good read, with the same
token rules; the PR listing is a conditional request (304s are free).
- Cron sync-package-updates every 15 minutes, so a hold lands before the
sweep merges a green PR. PATCH /api/projects/[id]/package-updates (owner
only, applies at once when GitHub answers in time) and POST
/api/packages/updates/[id] for a decision.
- Migration 0099 is additive: one new table, two new columns.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* feat(packages): update setting, open updates and Approvals cards
- Project "Built from": the update setting as three choices (Automatic /
Ask me / Stay on these versions) with what each will do written under it,
and the rule none overrides (a breaking update always waits). A change
says whether it reached the open updates already or will within 15
minutes. Each package with an open update shows it under its row: the
version it goes to, breaking, held for you / waiting on tests / ready,
and the pull request.
- /packages/[slug]: the same line under each dependent project.
- /approvals: a Package updates card for every held update that needs the
person — every update on "Ask me", breaking ones on "Automatic", none on
"Stay on these versions". Project, packages from -> to, breaking, checks,
why it is asking, link to the PR; Update / Not now / Stay on this
version. A refusal stays on the card with the buttons; "no write access"
comes with Connect GitHub. They name no private data, so they show behind
the PIN too, and the "nothing waiting" empty state steps aside for them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* docs(packages): changelog entry and update settings in the Views table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* fix(packages): read every repository once more to record dependency keys
Rows read before dep_name existed match update pull requests by catalogue
name only, and the sync skips a repository whose head and catalogue have
not moved — so for most projects they would have stayed that way. Folding
an observation version into the catalogue key invalidates that skip once.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(packages): read what each project is built from
The fleet's shared-package catalogue is read from the fleet brief's one fetch
of bitbaum/fleet registers/packages.json (no second fetch; the snapshot now
carries the catalogue too). A new sync reads each project's package.json and
lockfile at its default-branch head through the existing GitHub token rules,
keeps the dependencies that are fleet packages (npm ranges, npm aliases, git
tags and shas, monorepo paths) and stores them as observations:
- project_packages: one row per (project, package) — spec, resolved version,
source, commit, observed time
- project_package_scans: one row per project — last read, head sha,
catalogue fingerprint, outcome — so an unchanged repo costs one request and
a repo that could not be read keeps its rows and says why
POST /api/packages/sync reads all of the caller's projects (or one), four at
a time, never failing all for one. Latest versions come from npm or the
package repo's highest semver tag, cached, with a page deadline and the
register's version as a labelled fallback.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* feat(packages): Packages pages and "Built from" on every project
- /packages (under Fleet): every fleet package with its latest version, how
many of your projects use it and how many are behind; searchable
- /packages/[slug]: what it is, install command, repository, and your
projects on it with version and status, behind first; an unlisted slug
explains itself instead of 404ing
- Project Story tab: "Built from" lists the project's fleet packages with a
behind badge linking to the package page
- Pages read the repositories again on arrival when the data is over six
hours old; Refresh does it on demand; failed reads are named with a reason
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* docs(packages): changelog entry and the Packages view in CLAUDE.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
---------
Co-authored-by: Claude <noreply@anthropic.com>
* feat(search): one slip in a name still finds it, on every search box
Every search box in Loki matched the exact letters typed — `includes(q)` in
the lists, `ILIKE '%q%'` for people — so "lkoi" emptied the ⌘K palette and
"jonh" found nobody in a book that had John in it. They now go through
@bitbaum/searchkit (typo budget by word length, prefix while typing, accent
and joined-word folding, tie-break ranking), via src/lib/search.ts, in one
of two ways:
- rankByQuery, best match first: ⌘K (with matched label parts marked), its
project picker, the prompt library and picker (marked), the chat project
filter and picker, the GitHub repo picker.
- filterByQuery, matches in the list's own order, where the order is the
operator's choice or the point: Projects, Control's "Find project" (the
rail order is frozen on purpose), the model store, events (deadlines),
chats (recency), essays, the goal tree (lib/goal-search.ts).
People stay in Postgres for recall: /api/people also searches the user's
person names and aliases in memory (lib/people-search.ts), ORs the ids it
finds into the ILIKE filter, orders those first, then reranks the page.
The assistant's lookups keep the exact behaviour: they pick one person to
message, and a forgiven name there could become the wrong person.
Matches are marked with a new ui-search-mark class (weight and a quiet
accent wash, not the browser's yellow).
Not converted, each with a one-line comment: site paths (substring on URLs),
robots (a handful of rows), the public fleet register (listkit owns its q).
Generated typo suites (typoCases + evaluate) pin it: palette projects 566
cases success@1 0.989, palette pages 1339 cases 0.998, people 1798 cases
0.999, prompts 4901 cases 0.993; every remaining miss is a listed collision.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* chore(deps): add @bitbaum/searchkit, pinned to orangecat a868c0a9
The fleet's one search package, installed from orangecat by commit
(packages/searchkit). It ships compiled dist/, so no transpile step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* chore(deps): searchkit 0.2.1 (orangecat 6da45621)
Two ranking fixes found by the fleet: the typo budget is the written
word's, and a field is covered only when every typed word landed in it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
* chore(deps): searchkit 0.2.2 (orangecat e6cda794)
When no item has every typed word, keep the words some item has rather
than dropping the last one; two words the text wrote apart, matched as
one, rank as a typo.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6u11m24oVkG98wAVbN7nf
---------
Co-authored-by: Claude <noreply@anthropic.com>