Commit Graph
364 Commits
Author SHA1 Message Date
Cato baac8dec3b feat(feedback): owner-only switches for agent auto-build and editor dispatch (#1620)
user_projects.agent_builds_unasked: an agent's report builds on the
owner's builder without a tap. user_projects.editors_may_build: an editor
may use dispatch on the owner's builder. Both nullable, default off, set
by the owner at /api/projects/[id]/build-grants. Filing alone never builds
unless the owner opted in; every other seat still never dispatches.

Claude-Session: https://claude.ai/code/session_019MDtmuk1DzMJHBJdsDfRhG
2026-11-10 11:38:06 +01:00
Cato 8cfd826eaf feat(feedback): one canonical status mapper for the status route, Watch and the reporter view (#1619)
canonicalStatus() maps work.phase to the six statuses of RUN-STATUS-SSOT
plus cause, nextAction and evidence. GET /api/feedback/[id]/status serves
it (owner/editor in full, other seats the state of their own report),
Watch carries status.canonical, the reporter view carries state only, and
the agent filing route's statusUrl now points at the status route.
2026-11-10 11:15:56 +01:00
Cato 6048f392a5 feat(feedback): agents file reports with their own seat's Bearer token (#1617)
* feat(feedback): agents file reports with their own seat's Bearer token

POST /api/projects/[id]/feedback takes a ck_ token of any seat on the
project, stores source 'agent' with agentName and an idempotencyKey
(unique per project), and returns {id, status, statusUrl}. Filing never
starts a build: agent is not in BUILDS_UNASKED, so it waits for a tap.

* feat(feedback): agent reports carry screenshots, context and moments

One attachment schema (lib/feedback/attachment-schema.ts) now backs both
POST /api/feedback and POST /api/projects/[id]/feedback.

* style: format the generated drizzle meta
2026-11-10 10:53:48 +01:00
CatoandClaude Opus 5.5 7fddc81f46 fix(deploy): every deploy ships the embed server, so #1594 reaches the box (#1595)
The memory bound from #1594 merged and changed nothing on the box: server.py
and the loki-embed unit were written only by install-fleet-rag.sh, which needs
a laptop's ssh key (and this morning the laptop's agent could not sign). The
unit lived as a heredoc inside that installer, so the deploy had nothing to
ship.

Move the unit to scripts/hetzner/loki-embed.service, have the installer copy
it, and have deploy-hetzner.sh content-sync server.py + the unit, restarting
loki-embed (and waiting on /health) only when one changed. Warn-only, skipped
where the install never ran. scripts/test/deploy-ships-embed.ts guards both
halves.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 07:05:57 +01:00
Cato 670201a442 fix(workbench): start idle projects through the shared session composer (#1588) 2026-11-04 19:22:28 +01:00
CatoandClaude 51ca180fa2 feat(auth): Loki on AccountKit's own screens (#1576)
Closes #1566. Loki answered sign-in from AccountKit but drew its own forms;
its sign-up asked for a name and the password twice. On the AccountKit
runtime its sign-in, sign-up, recovery and account panel are now
AccountKit's SignInForm, SignUpForm, PasswordRecoveryForm and AccountPanel,
the same screens as every fleet app (screens: "accountkit").

- Sign-up asks for an email and a password, nothing else.
- Sign-in: OrangeCat, GitHub (Loki's own app, githubSignIn, AccountKit
  0.26.1), the passkey, the password, the sign-in link and recovery, in
  AccountKit's order and words; the demo and the site-widget hint stay
  around the card.
- Settings → Account: AccountKit's panel (ways to sign in, passkeys, the
  second factor). Loki keeps its own name, password change (through
  AccountKit's endpoint when the credential is AccountKit's) and its own
  deletion (DELETE /api/me, every table; accountDeletion: false).
- The sign-in hook's bootstrap (Loki row, personal org) is unchanged and
  runs for AccountKit's sign-up too; a note's tracking link is claimed
  before onboarding, as the old form did by hand.
- Auth.js (AUTH_RUNTIME unset) keeps Loki's old forms.

Journeys (real Postgres, test:db): AccountKit sign-up gives a Loki row
and a personal org; its password change works on an imported Loki hash
and ends the old one; its deletion answers 404 and Loki's row stays; the
GitHub-only / no Google, X or env owner key journey is kept. Browser
(scripts/test/accountkit-screens-browser.ts, 390 and 320px): sign-up
fields, sign-in order, the panel, adding a passkey and signing in with it.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-03 01:02:01 +01:00
CatoandClaude 9806228c7f docs(auth): the reset, Loki's OrangeCat token and GitHub sign-in are proven (#1558)
prove ran a real password reset through a real inbox on all five apps,
and checked that OrangeCat accepts the token a real sign-in left in
Loki's accounts. GitHub signs in to Loki through its own app again (the
owner's choice, loki#1551), live. Nothing in the AccountKit migration is
left waiting on the owner.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 16:31:54 +01:00
CatoandClaude 6704b56636 feat(auth): GitHub signs in on AccountKit through Loki's own GitHub app (#1551)
Loki's GitHub sign-in, and the repo and workflow grant "Start a new
project" acts with, waited on the bitbaum sign-in getting provider
credentials. AccountKit 0.22 brings a product's own GitHub app across at
its existing callback: GitHub is offered again on this runtime, with
githubScopes repo and workflow; a signed-in person pressing GitHub links
it ("Connect GitHub"); a new link's token goes to Loki's accounts, where
the GitHub features read it. GitHub links made under Auth.js are recorded
in AccountKit's table (the import, and migration 0133 on the switched
box), so they sign the same person in. The deploy's provider check
expects GitHub when the box has the app.

Also: prove's real-inbox step retries mail.tm when several proofs run at
once.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 16:13:09 +01:00
CatoandClaude ec00b7ec16 fix(ops): analysis-beta bootstrap runs by dispatch only (#1554)
It registered biaslens on 2026-10-22; biaslens has deployed through its own
deploy.yml behind the rollout gate since. Running it after every loki CI
redeployed biaslens out of band through deploy.sh, which no longer finds
the runtime files it expects, so it failed on every main commit.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 11:16:36 +01:00
CatoandClaude 8560d8c33a docs(auth): Loki does not take AccountKit's own-GitHub-app sign-in (#1553)
AccountKit 0.23 makes a product's own GitHub sign-in opt-in
(githubSignIn: true). Loki's GitHub app is for repository access, so Loki
does not opt in, and its journey keeps proving GitHub is not offered.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 10:42:03 +01:00
CatoandClaude Opus 5.5 dd44fac73e feat(review): take over the browser, hand it back, and see what comes next (#1545)
* feat(orangecat): a bot can ask Loki, as the person

POST /api/orangecat/ask on the signed OrangeCat rail: one of the person's
OrangeCat bots asks Loki a question and the turn runs as the Loki user
linked to that actor, read-only, so a relayed question can never dispatch,
approve or spend. An unlinked actor is told the one step that links it.
Door test: no secret, no signature, a tampered or oversize body are all
refused before a database or a model is reached.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* feat(review): take over the browser, hand it back, and see what comes next

The owner, 2026-11-02, beside Grok Bot's live Handler: "I want to see how
the machine is being used and click through", led through it and in
control, "and it should be objectively so". The project review's browser is
the fleet's one agent-driven browser, so it gets that first.

- Take over: the person's clicks on the picture, wheel scrolls, typed text,
  Enter and Back reach the page; each answers with a fresh picture, and the
  screen polls faster while they drive. Hand back returns it: the worker
  goes back to the page and scroll it was on, finishes that page so its
  notes stay about the right page, then reviews the person's page next.
- Inputs are data (two coordinates, at most 200 characters, one of ten
  keys), queued atomically in site_reviews.control (migration 0132, one
  column) and taken by the worker in one statement at its checkpoint. The
  read-only guard is unchanged for the person: a form button sends nothing.
- Under the picture: Live/You, what Loki does now, the next page, pages done.
- Tests: real-Chromium take over (inspection-takeover-browser.ts); the
  workspace test drives take over at 320/390/768/1440 in both themes and
  checks a click on the scaled picture lands on the same page point.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

* style(review): format the generated migration snapshot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmrXvMqAqZtbpQ4x3et

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 10:24:49 +01:00
CatoandClaude c4d9bf5c8b feat(workbench): "Let Loki try it" — the first walk is one tap (#1550)
The site region was blank until someone started a review elsewhere, so a
new person never learned that Loki can use their site in front of them —
the moment the workbench exists for.

- Before Loki has looked at a site, the region offers one button, "Let
  Loki try it" (WorkbenchSiteStart: the "Design and usability" review,
  every page on phone and desktop), with "Or open it yourself" beside it.
  The same tap hands the work to the project's agent, so both columns
  wake together.
- It says only what is true: "Waiting for Loki's builder…" while the walk
  waits in line, "Loki is opening …" once a builder has it. A walk that
  cannot start says why in a sentence.
- The workbench reports to usage as `projects.workbench` (shown, and
  which of its few actions were used — try-it, open-site, robot-window,
  site-screen, fullscreen; never URLs or text), so whether one screen
  holds what people came for becomes a reading, not a guess.

Tried end to end in a browser against a local database: the button, the
review row it created, both columns answering at once, and the queued
state's wording.


Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 09:49:49 +01:00
CatoandClaude e464980608 fix(openclaw): health-guardian keeps healing and stops messaging the chat (#1549)
The day-plan installer's report (run 5) showed how "Gateway was not
running. Restarted automatically. All good now." and "Swap at 99%" reach
the owner: OpenClaw's own watcher, tools/health-guardian.sh, run by the user
unit openclaw-guardian.service, sends them itself with `openclaw message
send` — not through the heartbeat, so the heartbeat contract could not stop
them. A heal that worked needs nobody, and Loki's check-gateway already sends
the one gateway message with a button. The send line becomes a no-op (dated
backup, parse-checked, restored on failure) and the unit is restarted.


Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 09:44:00 +01:00
CatoandClaude 21e10a42ff feat(review): watch Loki use your site — the pointer, the press, an ending (#1544)
The first look at someone else's version of this (a live picture of a
bot's browser on a phone, 2026-11-02) showed what not to do: a desktop
page shrunk to unreadable text, a dark void above it, and no sense of
what the bot meant to do. Loki's browser is now watched the way you'd
watch a friend use a page — on the workbench and on Review alike.

- The worker records where each press lands (ReviewFrame.target: the
  element's box in viewport pixels, optional so older frames still play).
- RobotBrowser draws Loki's pointer there and lights the pressed thing
  with a ring that arrives like a tap; the pointer glides between
  presses, rests dimmed when Loki only looks, and no ring is lit at rest.
- One pure rule places the picture (lib/inspection/robot-view viewOf,
  tested): a tall column is filled to its height with a desktop page
  cropped at the sides, a phone page stands like a phone, a page too
  small to read leans in, and it slides so the press sits as near the
  middle as the edges allow. No void, no squinting.
- RobotEnding: a walk that finishes while you watch says so — a check
  that draws itself, "All done. Loki looked at 3 pages and found 2 things
  worth fixing.", one button to see them; nothing found is good news.
- The workbench follows the project's latest review (5 s while walking,
  20 s at rest), so a walk started after the page opened appears too.
- Every glide, ring and breath stops under prefers-reduced-motion.

Checked in a browser against a staged walk: live on the workbench at
1440, the ending arriving mid-view, and Review on a 390px phone.


Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 09:11:22 +01:00
CatoandClaude Opus 5.5 b912cb4d91 feat(notify): every person chooses what reaches their own Telegram (#1543)
* feat(notify): every person chooses what reaches their own Telegram

Loki is multi-tenant, but Telegram was one hard-wired chat (the operator's)
on a bot whose incoming messages belong to OpenClaw. Now each account sets
it up in Settings → Notifications → Telegram:

- Connect Telegram opens Loki's notification bot with a one-time code;
  pressing Start links that chat (POST /api/telegram/webhook, verified by
  Telegram's secret-token header). No chat ids, nothing to type. /stop or
  blocking the bot unlinks. The webhook registers itself on first use.
- Six kinds of message (config/notify-categories.ts), each on/off per
  person; "servers" is shown to the operator only.
- Every app sender now goes through the gateway as that person
  (lib/notify/person.ts → deliverNotice): approvals, feedback, fixes, runs,
  studio, build requests, sign-ups, autopilot, site live, gateway down. The
  gateway applies the person's choices, sends to their own linked chat, and
  falls back to the operator's old chat for the operator only.
  scripts/test/one-telegram-door.ts fails the build on a direct send.
- Buttons Loki composes from its own records (a customer's own site) are
  trusted; links from outside still meet the host allowlist.
- Migration 0132 adds the link and choices to notification_preferences.
- New env: TELEGRAM_NOTIFY_BOT_TOKEN, TELEGRAM_NOTIFY_BOT_USERNAME (checked as
  a pair at boot). Until set, Settings says Telegram is not set up and the
  operator's existing chat keeps working.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* fix(openclaw): the heartbeat follows the same one-tap contract

The box audit (openclaw-day-plan run 3) found the sender of "Gateway was
not running. Restarted automatically. All good now.": the OpenClaw
workspace's tools/health-guardian.sh, not in any repo, whose status lines the
agent relays. The contract now goes on HEARTBEAT.md too (between markers,
backed up, idempotent), and the installer prints how health-guardian is
started and its speaking lines, numbers and secrets redacted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* style(drizzle): format the generated 0132 snapshot and journal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 09:05:10 +01:00
CatoandClaude Opus 5.5 18d34dff0a fix(notify): OpenClaw jobs send only what has one tap; close the review's critical/high findings (#1542)
* fix(openclaw): every scheduled job sends only what has one tap, else NO_REPLY

On 2026-11-02 the chat still carried OpenClaw's own messages that fail the
owner's test: "Invoice / Payment Alert … if credit card is on file, no
action needed", "Gateway was not running. Restarted automatically. All good
now." The scheduled jobs' prompts live only on the box, so:

- contract.md: one short block appended (between markers, replaced on each
  install) to every enabled job except the day plan: send only what needs
  him, each item with the ONE link that does it, never status or counts, and
  reply exactly NO_REPLY when nothing passes — OpenClaw's documented silent
  token, which suppresses delivery.
- The installer lists, by path only, every file on the box that calls the
  Telegram API or says "restarted automatically", so the remaining sender is
  found from the public log without printing anything private.
- Notices carry no machine name ("orangecat-cat · …"); the source stays on
  the list row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* docs(telegram): register the day-plan installer (it only searches for senders)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* fix(notify): close the review's critical and high findings

An independent review of the messaging system found real defects; these
are the ones that lose an urgent message, send a wrong one, or wake him:

- Intrusions could be dropped: the caps held urgent notices, every SSH
  password login shared one dedupe key, and /api/notify/box answered 200
  when nothing was recorded, so the box never used its direct fallback.
  Urgent notices skip the caps, intrusion lines are keyed on the whole line,
  and the route answers 503 when an urgent line was not delivered.
- A link chosen by an email could become a trusted one-tap button. Buttons
  now open only own domains, Gmail, Google Calendar, GitHub or Hetzner.
- Long titles/labels or a fourth button dropped real notices into the list;
  they are clipped instead. Only a missing or unsafe action refuses.
- SSH login from a new address and edits to authorized_keys/sudoers/shadow/
  PAM/ld.so.preload are intrusion signs (both lists, kept equal by test);
  the button opens /today, where the notice is listed; the title names the box.
- Customers' escalations and capped goals reached the owner's chat
  (selfTelegramTarget); they now use telegramTargetFor. The gateway-down
  message went once per fleet account; it is sent once.
- The notify routes accept bearer tokens only (no browser session/CSRF).
- countDeliveries ignored rows older than a week; it no longer does.
- Night silence (22:00–07:00 Zurich) for the direct senders too: lib-alert's
  fallback, ivy-health, fleet-uptime, deploy-hetzner. ivy-health names what
  broke and offers Redeploy only when Loki's app is the failure, Box doctor
  otherwise, and reads the chat id from the box's telegram.env.
- Prompts: the day plan no longer asks for approve links it cannot get or a
  page it cannot open, never uses links found inside emails, and says when a
  source failed. The summaries he asked for (reflection, digests, scorecard,
  evening wrap) get a digest contract instead of being silenced; jobs with no
  text prompt are left untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* feat(day-plan): one morning message; the email scanner twice a day

Approved by the owner 2026-11-02. The day plan now carries a half-line on
each person he meets today, and the separate 07:30 "Meeting People Brief"
is switched off. The email deadline scanner runs at 08:00 and 17:00 instead
of four times a day.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 08:46:52 +01:00
CatoandClaude Opus 5.5 f8da012c95 feat(notify): Telegram only with a one-tap action — one gateway for every bot (#1540)
* fix(alerts): stop paging on transient systemd-run units; send digests silently

The 5-minute host sweep announced every failed one-off systemd-run unit
(run-p<pid>-i<id>) as its own incident. Each has a fresh name, so no
per-unit cooldown held and the phone rang every five minutes.

The sweep now resets those units and never announces them, and the
STILL FAILING / RECOVERED digests are delivered with disable_notification.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* fix(alerts): quiet by default, ring only for down/intrusion; stop deploy and cron echoes

- lib-alert: all box alerts deliver silently except DOWN/deploy failure/
  intrusion-class messages (_alert_silent)
- host sweep: failed appcron oneshots are the OnFailure notifier's, not repeated
- security check: files a deploy rewrites by design are journal-only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* ci(box): install the alerting scripts on the box when they change

The alert fixes only take effect once install-host-alerts.sh and
install-security-watch.sh run on the box, and nothing ran them.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* feat(notify): one tap or not at all — every bot reaches the owner through one gateway

The owner's Telegram held ~1,200 unread messages and rang every five minutes
with lines he could do nothing with ("STILL FAILING: run-p…", "SENSITIVE
FILE(S) CHANGED … if this was a deploy, ignore", "built nothing"). New rule,
enforced in code: a message reaches the phone only with a button that does
the thing; everything else is recorded on /today or /system.

- telegram-send: refuses a message without a URL button (NOT_ACTIONABLE);
  adds silent delivery and sendTelegramVoice.
- lib/notify: one gateway (deliverNotice) with the policy — at most 3
  buttons, one incident one message with backed-off reminders, 3/source/hour
  and 12/day caps, sound only for "now" and never 22:00–07:00 Zurich. Voice
  notes for paid plans; a monthly "voice notes come with Personal" notice
  with its pay button for free accounts.
- Routes: /api/notify (token holders, `loki.sh notify`), /api/notify/box
  (the box's lib-alert), /api/orangecat/notify (OrangeCat's bots, signed).
- Box: lib-alert posts every line to Loki's list instead of Telegram; only an
  intrusion goes straight to the phone when Loki is unreachable, with a Box
  doctor button. ivy-health pages only "down and restart failed" with
  Redeploy; clean deploy rollbacks are not paged; fleet-uptime pages only for
  Loki or 3+ apps down; sleeping apps are no longer conformance findings.
- App senders: each kept one now carries its button (Triage it, Review it,
  Watch the fix, Write to them, Restart the gateway, Decide on Control …);
  telemetry/runner/model-id pings and run successes leave Telegram.
- Day plan: the morning brief's prompt is in the repo
  (scripts/openclaw/day-plan) and installed on merge, which also switches off
  jobs that only post swap/memory warnings.
- Workflows install the box alerting, ivy-health, the day plan and OpenClaw's
  photo/video understanding on merge instead of by hand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

* feat(telegram): every sender is silent between 22:00 and 07:00 unless it says otherwise

Feedback, studio briefs and the other direct senders skipped the notify
gateway's quiet hours. A send that does not ask for sound now arrives
silently at night in the owner's zone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmtzUbLhg3oqt4X1NaN

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-02 07:04:45 +01:00
CatoandClaude 929e22a423 feat(auth): passkeys, the second factor and the sign-in link on Loki's AccountKit runtime (#1539)
Since the switch to AccountKit, Loki offered OrangeCat, email + password and
its own recovery. The runtime serves passkeys, the second factor and the
sign-in link, but the compat layer answered 404 for all of them, and Loki's
screens had no way to use them.

- src/lib/auth/shared/open-paths.ts lists the AccountKit endpoints Loki's
  screens reach directly: passkeys, the second factor and the sign-in link.
  src/auth.ts routes them past the compat layer. None of them writes a
  password. Sign-up, reset, password, profile and deletion stay closed, so
  Loki's users table remains the one credential writer.
- The sign-in card, on this runtime, adds "Sign in with a passkey", "Email me
  a sign-in link instead" (with account mail), and the code step after a
  password when the account has the second factor. The password goes straight
  to AccountKit for that; the demo still uses compat. Sign-up offers the
  link too. The words are AccountKit's labels.
- Settings → Account adds passkeys (add, remove) and the second factor (set
  up with the password, confirm with the first code, backup codes, turn off).
- A runtime plugin (sign-in-hook.ts) runs after every new session, whatever
  the way in. It gives a person AccountKit has but Loki does not (a link to a
  new address) their users row, then runs bootstrapAfterSignIn. The compat
  layer no longer runs it a second time.
- accountkit-journeys (test:db) adds three cases: the second factor (a
  password alone gets the code step, the TOTP code makes the session), the
  hook making the Loki row and workspace, and which paths are open.
- The migration doc says what is open and why.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 23:00:54 +01:00
CatoandClaude 410f6ffd74 feat(auth): the shared sign-in button on AccountKit, and a deploy check that follows the box's OIDC env (#1534)
Loki has run on AccountKit since 2026-11-01. The runtime mounts the shared
sign-in (`bitbaum-signin`, SIGNIN_*) from env, and the compat layer can start
it, but Loki's sign-in and sign-up pages had no button for it. The deploy
check also expected only "email-password" on this runtime, so OrangeCat could
vanish from /api/auth/providers without failing a deploy.

- getEnabledAuthProviders().signin is AccountKit's signinBroker(env), on the
  AccountKit runtime only. Sign-in and sign-up show "Continue with Google,
  Apple, GitHub, X or Facebook" (AccountKit's own label) next to OrangeCat,
  started through next-auth/react like OrangeCat.
- scripts/expected-auth-providers.ts expects, on AccountKit, the password
  form plus every OIDC client AccountKit mounts (oidcClients): orangecat with
  ORANGECAT_OAUTH_*, bitbaum-signin with SIGNIN_*. On Auth.js it behaves as
  before.
- deploy-hetzner.sh reads the box's OIDC env for it from /opt/fleet/env and
  the app .env, a non-empty app line winning as in launch.sh. The issuers and
  client ids are passed as they are; each secret is passed only as "set".
- scripts/test/deploy-expected-providers.ts covers both runtimes and the
  button.


Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 22:07:31 +01:00
CatoandClaude Opus 5.5 f07165a356 Loki first: the chat opens, three words in the sidebar, a one-screen workbench, and a voice on your side (#1506)
* feat(workbench): one project side by side, on one screen or two

A project's session and Loki as columns of one window, and its site in a
window of its own — beside this one or on the other screen. Nothing in it
is new UI: the columns are TerminalSurface and LokiWorkspace mounted as
they are; the site is the live page with the owner's pass, where pointing
and "Fix it now" already live. What the workbench adds is the arrangement.

- /projects/[id]/workbench, a Workbench row on the project page, and the
  pane SSOT in config/workbench.ts (session, loki).
- The site is a window, not a pane, on purpose: every fleet site sends
  frame-ancestors 'none' and Cross-Origin-Opener-Policy same-origin, so it
  can be neither framed nor reached as an opener. The workbench says only
  what it knows. docs/architecture/workbench.md.
- Windows open the best way the platform offers: Fleet Runner places them
  from the real display list (new IPC open-workbench-window, v0.8.60,
  caller tiled left / new window right, or the other display whole, an
  open window brought forward); a Chromium browser places a popup on the
  other screen once allowed; any browser gets a half-screen popup.
- Any pane in its own window (?pane=): a solo window hides the shell
  chrome at every width; the windows of one project on one machine keep
  each other honest over a BroadcastChannel (a popped-out pane leaves its
  window and returns when that window closes).
- Which panes a window shows is device-local (localStorage per project),
  never a column on the project. Two columns from xl; below that one pane
  at a time and the strip chooses; below md the phone's rows.
- Each column's side rail (the session's Loki rail, the chat's history) is
  remembered for the workbench apart from its own page and starts closed
  in a column: TerminalSurface gets `rail`, LokiWorkspace gets `basePath`,
  `project` and `history`.
- Full screen is the browser's own, on the workbench root.
- Pure parts tested: scripts/test/workbench-layout.ts, workbench-windows.ts,
  workbench-placement.ts. Checked by hand at 390, 720, 1000, 1440 and
  1920px and as a one-pane window at 900px, no horizontal scroll.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* refactor(workbench): one placement rule, a window's own layout, honest re-opens

A second pass over the workbench after an independent review of the diff.

- One placement module for both sides: src/lib/workbench/placement.ts is
  the pure rule the browser popup and Fleet Runner's real windows share
  (the desktop copy is gone). Tiling respects the caller's minimum width,
  so the 800px shell and the new window meet on a 1440px display instead
  of overlapping; only a display too small for both overlaps.
- The layout is the window's: sessionStorage per project, kept across the
  window's reloads and never shared. Two full workbench windows of one
  project each keep their own arrangement; localStorage's cross-window
  storage event clobbered them. useLocalStorageState takes the area.
- A popped-out pane announces itself closed on every way out — pagehide
  and a soft navigation away — and open again from the back-forward cache.
- A window already open is brought forward, never navigated again: the
  site's address carries a pass minted per visit, and a second navigation
  left it unread in the address bar. Fleet Runner keys windows by the URL
  without its fragment, restores a minimized one and places it where the
  person now asks.
- The screen-management prompt is raised when "On the other screen" is
  chosen, not on the open that follows: a click that waits for a prompt
  goes stale and the browser refuses the window.
- Close in a solo window leads somewhere even when window.close() is a
  no-op (a typed address): it falls through to the whole workbench.
- The dock click on macOS asks whether the SHELL window exists, not any
  window, so a site window open with the shell closed no longer hides it.
- Which panes are on screen (columns, or one of them) is a pure, tested
  rule; window opening lives in one hook (use-workbench-windows) instead of
  two states; the phone's rows read each pane's surface from the registry;
  useBodyClass serves both the immersive chat and the solo window.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(workbench): one box — Session and Watch, not Session and Loki

The first cut put Loki's chat in the second column. Beside the session's
box that was a second place to type on one screen, and a person had to
work out which box did what ("I see two chats, and it just gets
confusing"). The session's box already does the one thing the screen is
for — it types into the live agent, or starts one — and the session
already offers Loki about itself ("What's going on?").

- The second column is Watch: the project's run as a live thread (what you
  asked, Loki narrating, the agent's screen, and where the change is —
  pull request, tested and merged, live), mounted from ProjectWatch as it
  is. It has no box. Loki's chat stays its own page.
- The pane registry carries where each pane's own page is (`pageHref`),
  so the phone's rows and the columns read one list.
- A pane body can be a scrolling thread (Watch) or a surface that fills
  the pane (the session).
- LokiWorkspace is back to what it was: the host-path, project and history
  props it only grew for the workbench are gone with their only caller.
- The project row says what the screen is for: "Say what to change and
  watch it happen, with the site beside".

Checked by hand at 390, 720, 1000, 1440 and 1920px and in both solo
windows: no horizontal scroll, no console errors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(workbench): one screen, one box — the site as Loki sees it, the robot, one line of state

"If a user sees tons of options, they can feel a paralysis" (owner,
2026-10-31). The screen showed about twenty controls: the Sessions page's
builder picker, tab strip, agent and view switches, Watch's card with its
own buttons, pane toggles, a window-placement menu. One thing to do, a
few things to see — so:

- The site, left, as Loki's own browser sees it (WorkbenchSiteView): the
  review worker already walks the site in a headless Chromium on the box
  and keeps one frame per action with the action named. While it walks,
  this shows the robot using the site, frame by frame — the one thing no
  window of yours can show; at rest, the last look. A tap opens the real
  site in its own window, where the person uses it and the widget does
  the watching. Fleet sites forbid framing and sever window.opener, so a
  picture of Loki's browser is what can honestly be shown inside Loki.
- The robot, right: TerminalSurface in a new quiet shape (`quiet`) — no
  builder picker (which builder runs a project is a stored decision), no
  tab strip of other projects, no shell rows; the chat | terminal switch
  and the agent stay. Its box is the ONE box on the screen.
- One line of state over the robot (WorkbenchStateLine): the sentence the
  Watch track composes, a dot for its tone, "Watch it work" for the whole
  story. Pure stateLine() in lib/workbench/state-line.ts, tested. The
  Watch column is gone from the screen.
- One "⋯" for the rest: the robot in its own window / on the other
  screen, the site on the other screen, full screen. The pane toggles and
  the placement menu are gone; a placement named for one opening wins and
  becomes the remembered one.
- The pane registry is the robot alone; the site is a region. Below xl the
  robot alone (the site is in its own window anyway). On a phone: the
  site, the robot, Watch it work, as rows.
- TerminalSurface stayed under the function-size ceiling by lifting the
  builder-picker wrapper and the resume filter out of it.

Checked by hand at 390, 720, 1440 and 1920px and in the solo window: no
horizontal scroll, no console errors.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(workbench): a focus screen — the app's chrome leaves while you build

Three layers of navigation sat around two columns: the sidebar's twenty
destinations, the project strip ("Profile · Chat · Home · Sessions"),
then the workbench's own header and the robot's bar with the Sessions
page's agent menu — "Frankenstein elements just thrown together" (owner,
2026-11-01).

- While the workbench is open, the sidebar, top bar, bottom tabs, footer
  and project strip are gone (body.fc-workbench-focus, the former solo
  rule applied to the whole screen from md up). They are for moving
  between pages, and a person here is not moving. The one back link in
  the header is the way out. A phone keeps its own bars: the rows need
  them.
- The robot's bar is the chat | terminal switch alone (TerminalSessionBar
  `agentSwitch`, off in the quiet shape): the session's own chip names the
  agent and its box changes it.

What is on the screen now, left to right: back, Open the site, "⋯"; the
site as Loki sees it; the robot with one line of state, the view switch
and the one box.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(workbench): two windows of one desk — one frame, a title bar each

The site sat in a card and the robot stood bare beside it, with a line
of state floating above and a caption floating below: two different
things on one screen. Now both regions, and a solo window, are one
frame (WorkbenchFrame): a title bar — a dot for its tone, one sentence,
one link — over a body.

- The site's bar is its address and what Loki is doing there ("Live",
  "Loki is using it: …", "Loki's last look: …"), like a browser's own
  tab; its body the page, top-aligned; before any look, the address alone
  and "Tap to open" — never a sentence apologising for an empty box.
- The robot's bar is the build's state (hooks/use-run-state, the Watch
  track's sentence) with "Watch it work"; its body the session with the
  one box. WorkbenchStateLine is folded into it.
- The floating Ask Loki button leaves in focus: its panel is the second
  chat this screen deliberately has not, and it sat on the send arrow.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(nav): Loki first — the chat is the default screen, three words then folds

The owner's philosophy, 2026-11-01, now in AGENTS.md ("Why Loki exists,
and for whom"): a good Loki chat, reachable in one step, is the screen
that opens; the rest of the app one tap away; a friend on your side, not
a staff; never a screen that makes a person feel stupid; measure by
effort, not features.

- APP_HOME and RUNNER_HOME are /loki: signing in, and Fleet Runner
  starting with the computer, land on the chat. They landed on Today, a
  page to read before a person could say anything.
- The sidebar is three bare words — Loki, Home, Projects — the same three
  as the phone's bottom bar (Loki first there too), then folded groups
  that each say the question they answer: Waiting for you (Approvals,
  Feedback), Your day (Today, Suggestions, Voice), Across your projects
  (Sessions, Missions, Activity, Prompts), Under the hood (Packages,
  System), and Private behind the PIN. Not a drawer called More: the
  navigation test records why a "More" section rots, and still forbids
  it; the phone's More is the folded groups as a sheet.
- Every sidebar line says what it is for on hover (the item's own
  description), so nothing has to be guessed.
- SidebarSection gains `bare` (no header, never folded) and
  `foldedByDefault`; the tests that pinned the old Build / Loki / To
  review / The fleet placement now pin the new homes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(voice): Loki speaks as someone on your side

The owner's philosophy (AGENTS.md, "Why Loki exists"): a friend on your
side, not a staff you direct; never a word that makes a person feel
stupid. The public pages still said the opposite.

- Hero: "Say what you want. Loki builds it with you." (was "Describe it.
  Agents build it."). The lede, APP_DESCRIPTION, the social-card tagline
  and the how-it-works steps follow. Every factual claim is one the
  product keeps: it builds with AI agents, puts it online, changes it on
  ask.
- /why's principles open with two new ones from the owner's words: "On
  your side" and "Life is short". Commitments about how Loki is made, not
  claims about what it does.
- The new-project card says "Say what you want. Loki sets it up and
  starts building." instead of repos and agents; the sidebar's Loki line
  drops "dispatch" for "Loki answers, or builds it with you".
- The hero's two sentences are separate balanced blocks: on a phone each
  breaks as an even pair, never one word alone.

The mission headline on /why ("Direct the creation of …") is left for
the owner to decide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

* feat(voice): the mission reads "with someone on your side"

/why's headline was "Direct the creation of everything you can
imagine." — the staff-you-manage voice the owner set aside. It now reads
"Make everything you can imagine, with someone on your side.", the
owner's own call (2026-11-01).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmswy1H6cYyL3hmLRy9

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 21:35:13 +01:00
CatoandClaude 5af8b91471 docs(auth): the account journeys are proven live (#1530)
Loki's accountkit-switch.yml prove ran on every switched app with
throwaway accounts: two sessions, a row change read on the next request,
a password write ending every session, sign-out, deletion, and a real
browser OrangeCat sign-in where offered. The docs listed these as waiting
on an approved test identity; they now say what was proven, what it
found, and what no machine can prove (a reset mail in a real inbox).


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 20:49:44 +01:00
CatoandClaude Opus 5.5 e2915bf6dd fix(auth): OrangeCat sign-in on AccountKit works, and keeps its tokens (#1528)
* fix(auth): OrangeCat sign-in on AccountKit works, and keeps its tokens

AccountKit 0.19.0 fixes a first OrangeCat sign-in failing with
unable_to_create_user (Loki's mirror recorded the link before
better-auth stored its own) and hands the provider's tokens to
onAccountCreated. ensureLokiUser now keeps OrangeCat's token set in
Loki's accounts, where publish, promote and the wallet read it; on
AccountKit nothing reached them before, because AccountKit stores no
provider token. Migration 0131 drops the trigger that was meant to copy
them out of auth_accounts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

* style: format the generated migration meta

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 20:18:45 +01:00
CatoandClaude 5a1c34981d feat(ops): prove the account journeys live on a switched product (#1515)
A prove action for accountkit-switch.yml, with throwaway accounts deleted
again: two sessions, a row change read on the next request, a password
write ending every session (old refused, new accepted), sign-out and
deletion. Where the product offers OrangeCat, a real browser sign-in
with a throwaway OrangeCat account through OrangeCat's sign-in and
consent and back. This replaces the approved test identity the switch
docs waited on.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 18:56:01 +01:00
CatoandClaude 38d0c2679b docs(auth): AccountKit answers sign-in since 2026-11-01 (#1513)
The switch ran from loki's accountkit-switch.yml: survey (nobody locked
out), import under locks, AUTH_RUNTIME=accountkit, restart, and a live
proof with a throwaway account. The docs said "staged, off"; they now say
what runs, how to roll back, and what still needs an approved test
identity.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 18:28:25 +01:00
CatoandClaude 281540c4bf feat(ops): an AccountKit switch per product, with a live proof and rollback (#1510)
Five products stage AccountKit beside Auth.js behind AUTH_RUNTIME. This is
the switch, from GitHub over the deploy's SSH, one product per run:

- survey: counts only, including people whose only way in is a social
  provider AccountKit cannot reach yet (they would be locked out);
- switch: refuses while that count is above zero; imports under locks with
  the product's own accountkit-import.sql, ensures a 32-character
  BETTER_AUTH_SECRET, sets AUTH_RUNTIME=accountkit, restarts, then proves
  on the public site that AccountKit answers and a throwaway account signs
  in, reads its session and signs out (deleted after); any failure rolls
  back;
- rollback: AUTH_RUNTIME off, restart on Auth.js, mirrors dropped, shared
  tables emptied.

The log is public: counts and verdicts only. test-accountkit-switch.sh joins
test:ops.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 17:15:29 +01:00
CatoandClaude f82e076fc6 refactor(auth): use AccountKit's compat layer instead of a local copy (#1508)
The next-auth/react bridge, its call helper, the session plumbing, the
AUTH_RUNTIME switch, the import rehearsal script and the journey-test cookie
client were copies of code five products each carried. They now come from
AccountKit 0.18.0:

- @bitbaum/accountkit/auth/nextauth-compat answers next-auth/react. The
  product's compat.ts holds only what is its own: the session shape, how each
  password form signs in, its login codes and hooks.
- @bitbaum/accountkit/auth/switch: sharedRuntimeEnabled().
- `pnpm run db:rehearse-import` runs AccountKit's accountkit-rehearse-import
  on this product's import SQL.
- The journeys use @bitbaum/accountkit/auth/compat-testing.

Behaviour is unchanged with the switch off. With it on, a signed-out session
reads as null, and a resolver or hook failure is a readable refusal rather
than a 500. The real-database journeys pass unchanged.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 11:56:28 +01:00
CatoandClaude 0adea245cc feat(auth): stage AccountKit beside Auth.js, switch off (#1503)
Loki moves from Auth.js to @bitbaum/accountkit one reversible step at a
time, as evig, kivvi, petvity and surf-your-life do. Nothing changes while
AUTH_RUNTIME is unset.

- Migration 0130: AccountKit's tables under `auth_`, and the mirror
  functions: users <-> auth_users, and AccountKit's OrangeCat token set into
  Loki's `accounts`, where publish, promote and the wallet read it.
- scripts/db/accountkit-import.sql + a rollback-only rehearsal: ids, Loki's
  own scrypt hashes (read through AccountKit 0.17.0's legacyPassword),
  verification, OrangeCat links, a placeholder address for people with none;
  collisions, drift and a live shared runtime refused.
- src/lib/auth/shared/: the runtime, the session re-read from `users` on
  every request, and a bridge for next-auth/react: email, the invite's
  user-password and the owner key (stored hash only), OrangeCat sign-in or
  link, and the studio's server signIn by redirect. GitHub, Google and X are
  not offered on this runtime (getEnabledAuthProviders knows it).
- src/lib/auth/bootstrap.ts: onboarding heal and personal org, now one
  function both runtimes call.
- The proxy reads the shared session and asks the same authorized().
- /api/me/password keeps the caller's shared session.
- scripts/test/accountkit-journeys.ts joins `test:db` (16 journeys and the
  rehearsal on CI's Postgres).

docs/architecture/accountkit-migration.md records what blocks the switch,
chiefly GitHub/Google sign-in and the GitHub repository token.


Claude-Session: https://claude.ai/code/session_019MDtmud6zcK4rStBGmYSML

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 09:36:49 +01:00
CatoandClaude Opus 5.5 536fcaa3f1 feat(studio): call approved partners builders (#1477)
* feat(studio): call approved partners builders

Settles the first word of master plan 3.4: the person the studio approves
and a customer books is a builder ("approved builder" beside "build it
yourself"); "builders in the loop" is the line around it. Bitbaum moved
/partners/ to /builders/ (the old address forwards).

- build paths, /build, the chat's links, terms and rules, the intake
  prompt, the /studio/partner page, the reply email and the studio
  console now say builder
- the chat still recognises "partner" as a way people ask
- identifiers other systems read (kind "partner", /api/studio-partners,
  /studio/partner) are unchanged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmw5m9WhdN77N2YeqDm

* docs(plan): 3.4 — Owner and Builder already name the other two

The seat an approved builder gets is an editor seat, which the roster
already calls Builder, so the person keeps one word from Bitbaum to the
project. What stays open is "builder" for the machine that runs the work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmw5m9WhdN77N2YeqDm

* docs(plan): 3.4 — the machine's word is runner, not engine

Engine already names the model and subscription a change is built with.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmw5m9WhdN77N2YeqDm

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 22:01:41 +01:00
CatoandClaude Opus 5.5 a506d80d78 feat(brand): the rotorelief disc replaces the stroked spiral (#1472)
* feat(brand): the rotorelief disc replaces the stroked spiral

After Duchamp's discs in Anémic Cinéma (1926): the coil is cut out of a
disc, its inner turns drift off centre and thin toward the middle, so a
plain rotation reads as a tunnel breathing in and out.

- src/config/brand-mark.ts: markPathD() draws the whole mark as one
  evenodd path (disc, coil cut, pupil cut); MARK_TURNS gives optical
  sizes so the disc still reads at 16px
- LokiMark renders it everywhere in-app (header, consult avatar,
  feedback launcher, voice) in currentColor
- voice: the disc fills the orb; clockwise (pouring inward) while
  listening and thinking, reversed while speaking; loudness sets depth
- generate:brand now also writes the PWA install icons, replacing
  generate-app-icons.mjs; favicon, desktop, tray and widget regenerated

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmreRmsJkmf3AcYy6DS

* chore(desktop): 0.8.60 for the new app and tray icon

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmreRmsJkmf3AcYy6DS

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 09:53:59 +01:00
CatoandClaude Opus 5.5 afb337007c docs(agents): fold CLAUDE.md into AGENTS.md, leave the pointer (#1465)
* docs(agents): fold CLAUDE.md into AGENTS.md, leave the pointer

CLAUDE.md now only points at AGENTS.md, the fleet's one agent-file shape
(bitbaum/fleet scripts/ci/agent-rules.mjs). The rules move into AGENTS.md:
the four-layer design system, choice rows, AI form assist, SSOT rules,
data flow, security, cloud vs local, how to ask George, which token the
sweep holds, the box-runner update hold, package installs and "create
website for <Name>". The component map and the views table, which are
reference rather than rules, move to docs/development/surfaces.md so
AGENTS.md stays readable.

Checked against the tree:
- Only @bitbaum/accountkit still installs from GitHub; chatkit, searchkit
  and whenkit come from the registry. The install section says so.
- Dropped restatements of fleet rules (no dead ends, the merge chain) and
  the duplicate Database section.

globals.css excluded CLAUDE.md from Tailwind's source scan because its
"never write" examples are bracket classes; AGENTS.md and the surfaces doc
now carry them, so they are excluded too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

* docs(surfaces): name the model chip by family, not a version

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 10:43:25 +01:00
CatoandClaude Sonnet 5.5 59cd3e7b10 feat(terminal): a plain shell on the builder, operator-only behind the PIN (#1449)
* feat(terminal): a plain shell on the builder, operator-only behind the PIN

Sessions -> Plain shell opens a real bash login shell in a PTY the builder
owns: no project, no agent, no inject wrapper. It is one more kind of session
on the existing transport (open_shell command, peek-stream, the rawkey lane,
tab-memory), not a second terminal.

Security: operator account only (browser session, never a bearer token); a PIN
must be set and the shell's own unlock (10 min idle, 60 max) entered; opens
rate-limited and capped at 3 per builder; no queued command except
open/close/peek may name a shell tab (queue, validator and injectPty); tenant
and sealed builders never offer one; shell environment carries no engine keys.
Every open/close/denied/unlock is on an append-only audit trail with no
content. Threat model: docs/architecture/plain-shell.md.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

* test(terminal): keep the repo's gates true for the plain shell

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

* docs(plain-shell): name where provision-service.py lives

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 20:14:13 +01:00
CatoandClaude 84f46ac255 feat(widget-chat): studio intake as a conversation, and pictures the chat can read (#1446)
The studio's door on bitbaum.orangecat.ch answered every message with one
canned stamp, and the front desk could not take a screenshot. POST
/api/widget/chat now takes:

- mode "intake" (+ purpose studio|partner): Loki asks one or two questions
  at a time, names the published engagement a request resembles (from
  commission.json's offers), and returns {reply, ready, summary}. The JSON
  shape, the rules (no unpublished price, no date, no booking, no past work
  or clients) and ready-to-file are decided in code
  (src/lib/widget-chat/intake.ts); a broken rule, spent budget or outage
  answers with an honest question instead.
- images (<=3 data URLs, jpeg/png/webp, <=600k chars, the ingest's
  screenshots shape), read by the vision chain and folded into the prompt as
  the visitor's material; unread pictures are said so in code.

commission.json's optional `offers` list is accepted by the contract.
Tests: scripts/test/widget-chat-intake.ts (fake model output, no network).


Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 11:35:31 +01:00
Cato f2cd986c7c fix(deploy): keep CI runtime environment outside source checkout (#1435) 2026-10-25 19:08:18 +01:00
Cato 9b85906350 feat(deploy): stage public Fleet artifact receipts beside served apps (#1430) 2026-10-25 18:49:40 +01:00
CatoandClaude 79e36832d8 fix(widget): the microphone is a segment of the launcher pill, never a second button (#1423)
On Loki's own pages the launcher is drawn by the top bar and the widget's pill
is visibility:hidden, but quick-talk measured it anyway and drew a loose
microphone over the tab bar that could not be moved. The microphone now lives
inside the pill (one outline, one footprint for the avoid pass, clamp and
drag), is grabbed like the pill, and exists only while the pill is drawn by
the widget as a button.


Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 10:24:55 +02:00
CatoandClaude 105f75ef88 feat(chat): the answer feedback loop — thumbs, transcript export, nightly review (#1417)
chatkit 0.14 carries the contract both ways; this is Loki's side of the
fleet chat-review loop (docs/architecture/chat-review.md).

- Thumbs under every Loki answer: chatkit's AnswerActions with onFeedback
  replaces the hand-rolled "Bad answer" button and ReportAnswer form. The
  thumb goes to POST /api/chat/feedback (new chat_feedback table, migration
  0128); a thumb down is still filed as a report in Loki's own inbox through
  the same plumbing the old button used (lib/loki/answer-report-file.ts).
  The terminal's Loki rail and the prompt Run sheet pass onFeedback to
  ChatThread.
- GET /api/chat/review-export: Loki's day of conversations as
  ChatTranscript[] behind the shared CHAT_REVIEW_TOKEN (bearer, constant
  time, 503 while unset), scope derived from Loki's own prompt
  (lokiChatScope). Never a temporary chat; no names or user ids.
- src/config/chat-review.ts (SSOT): the four products, their export URLs
  and repos, the night's budgets.
- Cron review-chats at 03:40: fetch each product's export, then start one
  agent run on the product's Loki project (found by gitUrl, as its owner)
  carrying chatkit's CHAT_REVIEW_INSTRUCTION + reviewPrompt for every
  conversation and the door to file findings through (widget token + agent
  pass, Origin = the product). The route calls no model: no box timer may
  spend the free AI tier (no-free-background-ai), so the judge is the
  project's agent, the way AI review reads a live page. Outcome per product
  under debug_logs crons/review-chats.
- share-chat-review-token.yml: generate the token on the box into Loki's
  env, copy it to heidi, orangecat, substrata when absent, redeploy all four;
  the value is never printed.
- .env.example, docs/architecture/chat-review.md, link from the widget doc.

Verified: pnpm run verify green through test:unit (540 files) and the
remaining gates; test:ops fails only on .env ownership in the root sandbox.
Thumbs rendered at 390px in headless Chromium: 44px targets, no sideways
scroll, the app receives {messageId, verdict, reason} on Send.


Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 19:56:40 +02:00
CatoandClaude Opus 5.5 058a4a7dd8 Design reset: every page rebuilt to one calm bar (rows, one action, plain words) (#1406)
* docs(design): the reset brief, and a page audit that signs in and screenshots every page

The owner walked the app on a phone on 2026-10-21 and called it unusable.
design-reset-2026-10.md is the bar every page is now held to, written from
the apps he uses daily. scripts/audit-pages.mjs signs in (the public demo by
default), visits every page at phone and desktop width, saves screenshots and
writes down overflow, duplicate h1s, sticky blocks, cut-off text, small tap
targets, console errors and failed requests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(scripts): seed:showcase, a local account that looks like the owner's

The public demo has three tidy projects, so most pages look empty on it and
their real problems never show. scripts/seed-showcase.ts creates
owner@loki.local / showcase-owner ("Cato", operator) with 42 projects under
the owner's own junk folder names and long task-text descriptions, mixed
states (live, site down, not connected, deploy failed, autopilot paused,
production / blueprint), 73 feedback items on one project and 8 on another,
73 runs over 60 days with the real failure texts and three running now,
bell alerts 8, 19 and 28 days old, four identical "Next Best Step" prompts
plus two near-copies, a dozen Loki threads, goals with milestones, habits
with history, people, crew assignments, approvals, package rows, scheduled
jobs, subscriptions, events and memory.

Idempotent through the demo reset's live-foreign-key wipe (now exported),
with timestamps relative to now. Refuses any non-localhost database URL,
the prod tunnel's port, and a database that already has an operator.
audit-pages.mjs documents the pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(audit): one slow screenshot no longer loses the whole report

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(widget): a host can draw the launcher itself (data-fc-place="host")

A rendered region marked data-fc-place="host" IS the launcher: the widget
draws no floating button while it is on screen and counts the owner's state
as shown, so watch mode adds no bar. When the region goes, the launcher comes
back on its own. The page opens the panel with Loki.open() and reads
Loki.status ({ owner, watching, unread }), announced as a loki:status event.
A hidden region still wins. Customer sites are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(design): primitives and a calm top bar for the design reset

The pieces the page rebuilds are made of (docs/development/design-reset-2026-10.md):
ListRow + List + ListSearch, Section/SectionHeading, a quiet EmptyState,
ChoiceMenu ("Sort: Priority" as a sheet on a phone, a popover from md up),
and PageAction — a page's one primary action, a round + in the phone top bar
and a pill in the header from md up (PageLayout action, ModalForm
trigger="page-action").

Chrome: the top bar names every page on a phone with 40px borderless icons;
exactly one h1 per page at every width (the page's own, read but not drawn on
a phone; the bar's name is the h1 only when the page has none). Loki's own
feedback launcher is a top-bar icon (data-fc-place="host"), not a tab over the
content. The Sessions drawer icon leaves the phone bar. The bottom bar is
exactly its token's height and the main column ends above it, so nothing
scrolls under it. ui-kicker and ui-micro-label stop shouting in capitals;
empty panels lose their box; the demo strip is one line on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(memory,robots): rebuild both pages to the design reset

The two worked examples the page rebuilds copy. Memory: the counts as a
sentence, then sections of rows — recently added (each with its own Forget
in a row menu), recent activity, by kind, context from other projects — and
"Forget everything" as the page's last row. No cards, tiles or badges.
Robots: the title is the top bar's, "Add robot" is the round + beside the
avatar, the search is the list's first row, each robot one row, and an empty
book is an icon, a line and one button.

Adds a "Primitives" section to the design brief: each primitive, its file,
and when to use it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(alerts): stale notifications fold into Earlier; the bell counts what still needs you

The bell read a red 9+ over nudges 8, 19 and 28 days old. Root cause: event
alerts (studio requests, build requests, escalations) have no condition a
checker can see end, so nothing ever cleared them; insert-once producers
deduped against any open row, so one forgotten alert swallowed every later
occurrence; and the bell counted every open row however old.

- lib/alerts/relevance: an alert is current while younger than its type's
  window (alert-types freshForDays, default 7) or urgent; otherwise Earlier.
  /api/alerts marks each one; the bell counts only current ones, and Today's
  needs-you reads the same rule.
- insertActiveAlertOnce lets a stale open alert go instead of blocking new
  ones; refreshOrInsertActiveAlert can renew the date when things got worse
  (feedback summary renews when more items wait).
- The feedback summary says one plain sentence instead of
  '84 feedback items need you (stalled + check live)'.
- The panel is a ListRow sheet (bottom sheet on a phone): dot, title, one
  grey line, time, x to dismiss; Earlier below with Clear all.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* style(labels): sentence case for the app's remaining capital-letter labels

Section labels in settings, Control, Today and the private unlock form
dropped their uppercase + letter-spacing (design reset rule 4). Small
tags (status pills, badges) keep theirs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(ui): DetailSheet, a ListRow control slot, quiet ModalForm triggers

DetailSheet opens one thing from its row (bottom sheet on a phone, dialog
from md up) with its actions as full-width rows. ListRow gains a leading
control that is its own action (a habit's check-off); ModalForm gains a
"secondary" trigger for an empty state's one button and "none" for a
form opened from a row's menu. Styles for the Life pages sit in one
design-reset block in globals.css; rules their old markup used are gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(goals): rows on /goals, and a page of its own for every goal

/goals is one sentence ("4 goals, 48% done on average") and a list: a
progress ring, the title, one line (due, milestones, sub-goals, project)
and the percentage. Sort and project are menus, not chip rows cut at the
edge; finished and set-aside goals fold away. The old card — inline
title, description button, four menu actions, folded milestones, nested
sub-goal cards — is now /goals/[id]: where it stands, its fields as rows,
milestones and sub-goals as lists, the actions as rows at the end.
Deleting a goal now checks the answer instead of refreshing on failure.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(habits): check off from the row, open a habit in a sheet

/habits is one sentence ("3 of 5 done today") and a row per habit: the
circle on the left checks it off for today, the row opens the habit — its
month, how often (one even row of three), the goals it feeds, pause,
rename, ask Loki, delete. The card with a 35-cell heatmap, a frequency
select, five icon buttons and a stat-tile row above it is gone. A goal's
row line drops its milestone count, which pushed the project off a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(projects): rebuild the list, project page and Watch to the design reset

/projects is a search row, two menus on one line (Show / Sort) and ListRows:
an initial, projectTitle(), ONE plain-word state line ("Building now",
"Live · updated 2h ago", "Needs you: 3 notes") and the time since the last
run. Nothing sticks. Checks, stage and feedback counts moved to the project
page; earlier `-refresh-<hex>` copies and archived projects fold under
"Archived". The two black buttons became one `+` that asks "Build a site"
or "Add an existing project".

The project page has one title with the way back, one primary action (Ask
Loki, in the top bar on a phone), a section menu on a phone instead of a
pinned select, sections as plain headings without boxes, flags as "Needs
fixing" rows, and agent sentences said plainly (no URLs or HTTP codes).
Watch it work uses PageLayout and names the project with projectTitle().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* wip(work-tools): prompts, activity, feedback rebuilt as rows; tab-inject starts repo-only projects

Work in progress before merging main; gates run after the merge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(events): rows by date, a sheet per event; an event with no deadline can be added again

/events reads an event's date and place, not only its deadline: a meetup
with a day and a city sat under "No deadline" as if it had neither. Rows
go coming up, no date yet, already happened; a row opens the event in a
sheet (edit, ask Loki, archive, delete) and "New event" is the page's
one action, a form in a sheet.

Fix: the add form sent "" for an empty deadline and the API refused it
as "Invalid date", so no event without a deadline could be added. The
form now sends only what was filled in, and the API reads "" as none.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(talk): Loki's empty chat, chat list, Sessions and More sheet as rows

- /loki: a greeting, recent chats and Build next as ListRows above the
  composer; no scrolling chip strip, no starter chips when there are
  projects, no "Auto your key" on the model chip; the chat list
  (ThreadRail) as Claude's list, pin and delete in each row's menu.
- Sessions: nothing open is one line and a Resume row per project; a
  missed deep link is one line and its row (and, on a phone, the open
  sessions); the session and more sheets are short rows; the Sessions
  drawer is a list with its search as the first row.
- More sheet: names only, no truncated descriptions.
- Voice: one line and Start, then titled sections of rows.
- Sidebar section labels and app-wide label classes in sentence case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* wip(public): calmer signed-out site — rows, one orange action, sentence case

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(design): Home, Today, Suggestions and Approvals as sections of rows

Design reset (docs/development/design-reset-2026-10.md) for the 'what needs
me' group:

- Home: three sections of ListRows — Needs you (failures with their fix on
  the row, escalations, the review inbox), Being built, Done — under the
  composer. Job cards that all read 'Next best step' became rows naming the
  project and the live step; the footer is two rows (builder, New project),
  so nothing pokes under the bottom bar. The status hero no longer repeats
  projects the rows already name. Builder-offline chip is a row.
- Today: a greeting, the day in one sentence (lib/today-brief todaySentence)
  with Plan my day / Log a conversation, then Needs you, weather in one
  line, Calendar, Habits, Commitments, Sticky note and More as sections of
  rows. Six recap cards that restated nav pages are gone.
- Suggestions: momentum as a sentence, Show: All menu instead of a cut-off
  chip row, each suggestion a ListRow (tap = do it, menu = Not now), and
  project names through projectTitle().
- Approvals: pending first, unboxed; Approve/Decline in words; event times
  in the reader's zone instead of a raw UTC ISO string; standing approvals
  as OptionRows at the end; quiet empty state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(money): one sentence, subscription rows, a sheet per subscription

"51.00 CHF and 329.60 USD a month across 9 subscriptions. Next: GitHub on
3 Nov." replaces three stat tiles. Each subscription is a row (how often,
when next, whether a receipt backs it; the amount on the right) that opens
a sheet with everything the row used to carry: mark paid, edit, check at
the vendor, ask Loki, free alternatives, cancel, delete. Cancelled ones
fold away; promised money and the founder's OrangeCat link are rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(people): contact rows with search and menus, a real page per person

/people is a list like a phone's contacts: initial, name, what they do and
where, how long since you talked. Search is the first row; Show and Sort
are menus instead of a chip row cut at the edge; the filled "Log talk"
button on every row moved into the row's menu. Importing and merging is
one row that opens a sheet. A person's page opens with the person on it
(it fetched the same row again behind a skeleton), in plain sections,
with rename, ask Loki and delete as rows at the end.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(crew): asks and crew as rows; an ask with nobody on it can be given to someone

One sentence ("1 ask needs you"), the open asks grouped by where they
stand, each a row that opens a sheet with its brief, link, payment and
the moves open to you; your crew as rows with "Give them work" in the
row's menu. Fix: an ask saved with nobody on it said "pick someone before
handing this over" and offered no way to pick; the sheet now does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(settings): a list of sections on a phone, flat sections inside

Below lg, /settings is a list of its twelve sections, each a row with
what is in it; one opens as its own page with a back row, and the phone's
back gesture returns to the list. The tab strip that ran off the screen
is gone. Inside, the bordered boxes and caps labels are flattened to
sections and rows; Appearance is one even row of three, the digest is a
list of choices, and the Agent tab says what it is for in plain words.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(home,bell): failure rows give the reason the full width; Earlier rows carry no dot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(today,home): In focus is one row; Home loads as its own shape

TodayWatch was a bordered card with an orange capitals eyebrow, the day's
counts a second time and two Loki buttons; it is now one row under 'In
focus' with Loki's nudge as a plain line, and says nothing when nothing
stands out. Home's loading state is the composer and three row lines
instead of three empty cards.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(projects): plain sections on every project tab, one time per row

- A row's line no longer repeats its trailing time ("Worked on 1d ago … 1d"):
  it says Live / Not live yet / Not started yet, and the time is said once.
- A run waiting on a person (main's new "needs_you" build state) reads
  "Needs you: the agent is waiting" on the list and offers "See what it
  needs" on the project; the list query now reads the run's own record.
- Story: one rename (in the header), the stage drawn without colour, the
  profile score labelled in words, "The story" instead of "Agent context",
  three short fill buttons that fit a phone.
- Feedback: one heading and one "…" menu for list actions; the widget setup
  and auto-ship toggle on the page instead of boxes in boxes; plain labels
  ("Put it on the site", "Turn on only") kept in step with the API hints and
  the public docs.
- Activity: "What changed" as rows, newest first by date, no handoff chips.
- Plan: "Roadmap" is the section's heading; no accent icons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(prompts): one Run that works — repo-only projects start, Loki streams, no raw blanks

- Send to terminal on a project with only a repository (no folder) queued a
  bare inject that failed with "no running agent for 'substrata' on this
  runner"; tab-inject now hands such projects to the inject core, the same
  start-or-queue path /api/inject uses (in the previous commit).
- The Run sheet leads with the prompt's own worker (lib/prompt-run): the
  project's agent for project work, Loki for personal prompts; the other is
  one quiet line. A send ends in one sentence and "Watch it work".
- Run with Loki streams into the sheet through the chat's own thread
  (useSessionAsk + ChatThread): clock, Stop, retry, Continue in Loki.
- {{variables}} are never shown raw: blanks are named in words until filled.
- Pins all of it in scripts/test/prompts-page.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(activity): the answer as a sentence, failures and history as rows

/activity drew eight boxes before the first event: a hero card with a bar
chart and four coloured tiles, a red card of failures in the builder's own
words, project chips cut off at the edge, a time picker card, count chips and
a report card. Now: When and Project as two menus, the headline sentence,
"Runs need you" as rows with Run again, and "What happened" as rows under
day headings (Show: menu), each opening its run on Watch. The report is the
page's one action, in a sheet. Failures read in plain words (activity-words).
Fixes the double <h1> (page and view both drew PageLayout).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(feedback): decisions and reports as rows; each opens in a sheet

/feedback: "Do all" is the page's one action (confirmed in a sheet that
says what it spends); every decision is one row — the report in the
reporter's words, project and when — with its yes as the row's own button,
still one tap; the row opens the full decision (Loki's read, facts, every
move) in a sheet. Under way / Done / Filed away are rows with their state in
plain words. Keeps main's per-decision taken key (#1367).
/my-feedback: rows (your words, status and project, when), each opening the
shared ReporterFeedbackCard in a sheet; a quiet empty state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* feat(system,packages): plain sections and rows; one design-reset block in globals.css

/system: nineteen bordered cards under three question headings become one
page of plain sections (SystemBlock: sentence-case heading, no box) with
words a person would say — Alarms, Server, Server size, Room for more work,
Health check, Recent errors, Agents keep going, Runs on a schedule — and the
records behind one "More records" row. Agents keep going is one sentence
and the one button that changes it.
/packages: each package one row (latest, who uses it, who is behind), the
read line ending in "Read again", and Publish to npm as two calm numbered
steps instead of a card.
globals.css: the work-tools block (prompts sheet, activity, feedback row
verb, steps, system) after the feedback classes; the dead activity, pulse,
needs-you and feedback-card rules deleted with the code that used them, and
ui-btn-overlay (its last users were the prompt cards). CLAUDE.md follows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(talk): own class for the empty Sessions list, quieter dots, a voice note that fits

ui-term-empty already named another rule, which centred the new list;
a finished session no longer gets a green dot (rule 8); the 'Only what
needs me' line fits under its switch on a phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(public): reachable /fleet filters on desktop, essay body on the title's edge

The /fleet filters sat in a <details> whose summary was hidden from md up
on the belief that CSS forced it open; a closed <details> hides its
content at any width, so on a desktop the filters were gone with nothing
to press. The toggle now shows at every width and opens itself while a
filter is set. The footer's closed studio-sites list no longer lays out
invisibly, and an essay's body starts on the same left edge as its title.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(feedback): projects by name, the age last, the night note in francs

- Every project on /feedback goes through projectTitle(): the inbox route
  attaches each row's projectTitle from the project entity, and the rows, the
  project menu and the sheet title read it.
- A decision row's one line is project · age (or the page, with one project
  in view); the repeated "Build it, one agent run" beside a "Build it" button
  is gone, and no trailing age squeezes the report's words.
- The morning note (nightNoteText, shared with /today) names projects through
  projectTitle, drops the "· 2 of 3 runs" ledger, and states the cost in
  francs (CHF_PER_USD): "… filed away 4 old reports. It cost CHF 1.70."

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore: drop the dead recent-dispatches query; the build-row fade at every width

getRecentDispatches fed only the Today recap card the redesign removed. The
/loki build row hid its scrollbar at every width but faded its edge only on
a phone; the fade now applies wherever the row scrolls.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(projects): a project with no title reads as a word, not its folder name

projectTitle passed an untitled project's folder name straight through, so
Home, Feedback and the bell listed "murphys-bar" and "aoz-housing". An
all-lowercase slug now reads as a word ("Murphys bar"); a name typed with
capitals is kept as typed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(public): headline visible before its animation, names through projectTitle, plain demo note

The hero rose in from opacity 0 with a 'both' fill, so until the
animation ran the headline was simply not there: a slow phone, a
screenshot or a page still loading showed a blank where the promise
should be. The rise is now movement only; content is visible by
default and reduced motion turns the movement off.

Every project name on the public site (the /fleet register, a project's
public page, a person's public profile, the landing hero) now goes
through projectTitle(). The sign-in demo note says what is switched off
in plain words, and /build's eyebrow is sentence case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(terminal): drop terminalSourceHint, which nothing reads now

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(life): project titles, channel names and sheet rows after a look at the pages

A goal's project and an ask's project read the project's title when it
has one instead of its folder name; the ask's row drops the project so
the date fits on a phone. A person's ways to reach them and their
conversations say "WhatsApp", not "whatsapp", and the icon now matches
a conversation's channel (it looked the channel up without its prefix and
always fell back). Sheet action rows draw every icon at one size and start
at the left; "I cancelled it" is not red. A goal's progress and date are
body text. The responsive audit names /goals/[id] as needing an id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(work-tools): every project name through projectTitle()

With main's projectTitle() reading an untitled key as words (3bc9a395), the
remaining bare keys in this group go through it too: the decision card's
where-line and the full feedback row's project link, Activity's rows, menus
and retry label (one titleFor helper instead of three fallbacks to the raw
key), scheduled jobs grouped by project on /system, and the repositories and
dependents on /packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test(projects): pin the rebuilt rows, flags and activity to the new rule

- getProjectsRunNow reads runs since a day ago with gte(), not raw SQL.
- The health panel can no longer be trapped by a row: it is not on a row.
- "Needs fixing" heads the flags; each row carries a red dot and no tint.
- Activity speaks plainly ("Working on …", "Nothing running", "last change").
- The project page's site link uses the widget's owner-pass helper, so the
  browser fixture bundles it.
- The chooser's two lines fit a phone; the dead ui-* rule baseline drops to 27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs(projects): the Views row describes the rebuilt list and page

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(home,today): project names in words, reasons that say what happened, one builder line

- Every project name on Home and Today goes through projectTitle().
- 'last run: needs attention' became what the run's record says, in words
  (lib/attention-words): 'Stopped: …', 'Stuck: …', 'The last run only got
  part of the way — next: …'.
- Home says the builder's state once: the row at the top. The foot is
  Settings and New project, and no longer contradicts it.
- Runs with no word from the agent sit under 'Gone quiet' and say what
  they wait on ('No word from the agent for 1d', 'Waiting for a builder to
  pick it up'); times are compact ('1d', '2h 5m').
- Today: Start my day is one row when no main projects are chosen; the
  headline names its parts ('4 urgent, 4 approvals, 42 reports to triage
  and 7 other things.'); an urgent item has one action (Fix with Loki), its
  title opens it; alerts show their first paragraph only. The repo-missing
  alert says "<Project>'s repository can't be found on GitHub", with no URL
  or status code in the words a person reads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs: the Life pages and their primitives, as they now are

CLAUDE.md's component map and Views rows for People, Crew, Money, Goals,
Habits, Events and Settings described cards, chip filters and stat tiles
that are gone. The design-reset primitives table gains DetailSheet, the
ListRow control slot and ModalForm's quiet triggers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* chore(design): drop two rules the rebuilt pages no longer use

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(audit): a page that reloads or crashes no longer ends the audit

Each route gets its own page, measuring retries while a dev server reloads,
and a crashed page is recorded in the report instead of throwing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs(changelog): every page, calm

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* fix(design): session names in words, and no "next: Nothing queued"

A session's name in Sessions was its folder ("derhochhinhousepartyrenner-ch-
refresh"); it now reads as every other surface names the project. Home no
longer appends an agent's "Nothing queued" as if it were a next step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* test: pin the rebuilt pages' names and rows

Project names now read as words in the night note and the Sessions drawer,
the ListRow link carries its own props, and the trailing-column check reads
the rule itself rather than a scoped override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 10:51:18 +02:00
Cato aed99dc3d5 feat(missions): Continue Mission using existing authorized project dispatch (#1405)
* feat(missions): derive guarded Continue Mission action from canonical project state

* feat(missions): one-click Continue through existing permissioned project dispatch

* feat(missions): expose authorized and state-gated next move in mission control

* test(missions): guard resume action and reuse the authoritative project dispatch gate

* docs(missions): state execution boundaries and known limitations of Continue Mission

* chore(ci): temporarily emit canonical mission action formatter diff

* style(missions): apply exact formatter output for Continue Mission

* style(missions): apply exact formatter output for Continue Mission

* chore(ci): restore full normal checks after exact mission formatting fix

* fix(missions): escape JSX apostrophe in dispatch consent copy
2026-10-22 10:06:25 +02:00
Cato d0df538110 feat(missions): searchable attention-first mission board (#1400)
* feat(missions): prioritize real project alerts and provide searchable mission filters

* feat(missions): searchable priority board with accessible filters and responsive cards

* refactor(missions): server-owned data projection and interactive client board

* test(missions): enforce the new server-to-board projection boundary

* test(missions): verify truthful flags, ordering, search and responsive controls

* test(missions): assert priority order for missions without roadmaps

* docs(missions): specify attention ordering, visibility and truth boundaries

* chore(ci): temporarily print canonical formatter diff for Missions attention board

* style(missions): apply canonical Prettier formatting from CI

* style(missions): apply canonical Prettier formatting from CI

* style(missions): apply canonical Prettier formatting from CI

* chore(ci): restore normal full verification after Missions formatting fix

* fix(missions): use mobile scrollable filter row instead of wrapping choices

* fix(missions): show touch-scroll fade affordance on filter strip

* style(missions): format scroll-filter row after fade affordance
2026-10-22 08:03:01 +00:00
Cato 3fbe041041 ops(beta): register and deploy the existing analysis app through Fleet after green CI (#1402)
* ops(beta): provision existing analysis repo via one Fleet registrar after green CI

* docs(ops): record one-time beta provisioning acceptance and brand independence
2026-10-22 09:00:14 +02:00
Cato d80c99f56e feat: Loki Missions — truthful project-backed mission control (#1397)
* feat(missions): derive project objectives without parallel state or fake verification

* feat(missions): add real project-backed Missions overview

* feat(missions): add mission objective, roadmap, and execution evidence page

* feat(missions): add Missions to Build navigation and command palette

* test(missions): pin honest progress derivation and tenant-scoped source reads

* docs(missions): specify honest game-like UI over existing project ledger

* fix(missions): count stated mission objectives rather than roadmap presence

* chore(ci): temporarily capture exact Missions Prettier diff

* style(missions): apply exact repository Prettier diff

* style(missions): apply exact repository Prettier diff

* style(missions): apply exact repository Prettier diff

* chore(ci): restore normal formatting check after Missions diagnostic

* test(missions): register Missions in navigation and responsive audit

* test(missions): register Missions in navigation and responsive audit

* test(missions): record dynamic mission viewport sample prerequisite

* style(missions): respect responsive-audit formatter layout
2026-10-22 01:26:56 +00:00
Catoandcatomean d17fdfad88 Sealed builds that actually start: NNP off for the unit, runsc without NoCgroups, slirp4netns, per-user image, crun (#1372)
* 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>
2026-10-21 18:23:50 +02:00
Catoandcatomean 0bf127e967 Sealed builds: opencode in the agent image; read/test/on/off workflow per runner unit (#1371)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 17:41:46 +02:00
CatoandClaude Fable 5.1 93ab3816a8 feat(loki): the start screen owns the phone too — floating chats · Loki · menu, nothing clipped (#1360)
* feat(loki): the start screen owns the phone too — floating chats · Loki · menu, nothing clipped

What the owner saw on /loki from his phone (2026-10-21) was the START
screen, which the thread redesign had left with the app shell: the app top
bar, the bottom tabs, the starters and the composer around an inner scroller
that clipped the spiral and the Build next row and drew Android's grey
scrollbars. "It says the thread fills the display edge to edge, but it
doesn't really."

Now the whole of /loki takes the phone (useImmersiveChat on the start screen
as well). The start screen is laid out like a thread: a floating one-line
header — chats (the history drawer, as the ChatGPT and Claude apps keep it)
· Loki · a menu that carries Home and every other page now that the tabs are
gone — and the composer floating at the bottom with the starters above it,
where the thumb is. The greeting, the recent chats and Build next scroll
under both with the measured insets as padding, so nothing is cut off
between two bars. Build next and the starter row scroll sideways with no
scrollbar and a fade at the edge, never a chip cut in half.

The desktop keeps its sidebar, top bar and in-flow composer. The TopbarPortal
that lent two buttons to the phone top bar is gone with the bar.

scripts/test/mobile-flow-browser.ts now pins it: no bottom tabs, no top bar,
the page's own header on screen, Home one tap from its menu.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

* fix(loki): the starter row says it scrolls (ui-scroll-fade-right)

CI's scroll-strips-have-an-affordance ratchet: a strip that hides its
scrollbar must carry the fade, and the starter row above the composer
had the one without the other. Room after the last chip so it clears it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018WZnBnaLP6RhwFkLxRTKgE

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-21 05:51:24 +02:00
CatoandClaude 7e9a55d800 feat(studio): a booked partner holds a seat on one project and is paid through a service in their own name (#1349)
Track 3 of docs/master-plan-2026-10.md, the Loki half (the OrangeCat half is
its PR #1366: the `service.write` scope and services that go live at once).

- The seat (lib/studio/seat.ts, seat-change.ts): assigning an approved partner
  to a website brief resolves their Loki account (users.orangecat_actor_id =
  the identity they connected), makes them an EDITOR on the brief's linked
  project and switches their private builder on, so they build under their
  own tenant on their own engine. The seat follows the assignment and the
  project link (assign_partner, link_project, revoke_access) and goes when
  either does. Never an org membership. studio_requests.builder_user_id.
- The fee (lib/studio/fee.ts, fee-listing.ts, integrations/orangecat-fee-
  service.ts): with a delivery a partner may state a fee once; after the
  delivery is saved Loki lists it as a service in the partner's OWN name on
  OrangeCat with the partner's own token, live at once and off their profile,
  and the brief shows the link to pay it. The sign-in asks for service.write.
  studio_requests.fee_amount/currency/service_id/url (migration 0125).
- Paid is OrangeCat's word: /api/orangecat/events marks the brief paid from
  the settled-payment signal for a service (markStudioFeePaid, idempotent on
  the payment), records the event, and tells the studio, the customer and
  the partner. fee_paid_at is written nowhere else.
- The staff screen says where the seat stands and what the fee is; the
  portal view carries `fee` for the partner's and the customer's screens.
- Records: changelog {#builder-seat} {#builder-fee}; roadmap "Builders on
  other people's sites" seat and fee ticked; private-builders.md "Booked
  builders"; builders-and-booking.md status. scripts/test/builder-booking.ts.


Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 13:28:33 +02:00
CatoandClaude 01d0c4fc65 feat(cloud): sealed builds — rootless podman and gVisor as readings, switched on per tenant by the operator (#1348)
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>
2026-10-20 13:20:21 +02:00
CatoandClaude Fable 5.1 944ed15747 feat(cloud): private builders — an allowlisted agent environment, a runner without the database, one sealed unit per account (#1346)
* 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>
2026-10-20 12:05:27 +02:00
CatoandClaude 83316f063a feat(feedback): whoever asks pays — a seat's request is a suggestion, the allowance is retired, routing tells the truth (#1344)
Track 0 of docs/master-plan-2026-10.md: stop the leak and the routing lies,
app only, nothing on the box changes.

Stop the leak
- A request on a shared project from a Builder, a client or a viewer is
  filed as a suggestion in the owner's tenant (source `client` or the new
  `member`), announced like a visitor's note, and waits for the owner's
  tap. Only the owner's own word starts a build on the owner's builder
  (ask-in-loki.ts, implement.ts, pass-holder.ts). Until now a Builder's
  ask built at once on the owner's subscription and a client's built on
  a monthly allowance; both spent one person's engine on another's word.
- The per-site allowance is retired: config/client-allowance.ts, the
  members PATCH, the People-panel picker, the dossier count, the invite
  copy. The `monthly_changes` columns stay in the schema unread (a DROP
  aborts the deploy; dropped by hand later). `on_allowance` is kept and
  read as `previewFirst`: a change built for the person who asked still
  opens as a draft and goes live on their "Make it live".
- The owner pass is the owner's alone; everyone with a seat carries a
  member pass. The 40-builds-a-day cap is keyed by the owner, not the
  project: a guard on one engine, never a price.

Routing honesty
- inject-core requests only what was chosen (a lock, a named builder, a
  stored preference) and lets the decision apply the floor, so a fresh
  account with Fleet Runner connected runs there instead of a 403
  (execution-access.ts requestedDispatchChannel).
- Kickoff writes a path under the cloud builder's root only for accounts
  the cloud serves; for anyone else the path stays empty so the project
  is not locked to a builder they do not have.
- "Hosted runner" is offered, accepted and dispatched only for the one
  account it serves (lib/hosted-runner/serves.ts).

Records: CHANGELOG entry {#seat-suggests}, ROADMAP milestone ticked,
CLAUDE.md and feedback-widget.md say what a seat's ask is now. Tests:
client-seat rewritten, execution-access extended, the pinned shapes in
client-seat-browser, seat-on-site-and-tracking, feedback-trust,
project-capabilities and owner-note-builds updated.


Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 11:43:36 +02:00
CatoandClaude Fable 5.1 2d7de4bd72 docs: master plan, October 2026 — from one builder to many (#1343)
* docs: master plan, October 2026 — from one builder to many

The plan that sequences private builders, the first franc, builders
through Bitbaum and sealed builds, under one rule: whoever asks for a
change pays for it, with their own engine, in their own builder.

- docs/master-plan-2026-10.md: ground truth, the rule and its
  corollaries, why this order, five phases each with proof and cost,
  what it looks like at 100,000 users, what is deliberately not done,
  risks, the decisions the owner is asked to make, ninety-day metrics,
  and an appendix mapping every July item to what became of it
- docs/sustainability-gates.md: Gate 1 split — hosted execution on a
  person's own engine is allowed once their private builder exists;
  on Loki's key it stays gated on metering and a CHF cap
- docs/master-plan-2026-07.md: status note points at the new plan

Hosting cost stays at CHF 0 above today's until a System reading says
otherwise. Nothing in the plan is live; Phase 0 starts on the owner's
yes.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

* docs(plan): one build in merge order, not five phases over weeks

At the owner's direction the plan is one build landed as a chain of PRs
in dependency order, each exercised on the live box before the next
stacks on it. What is genuinely not mine to speed up is named: KVM for
microVMs (gVisor containers need none), the company for money in Loki's
name, the people who sign in, a second box. Decisions 1, 2 and 4 recorded
as taken; 5 and 6 applied as standing numbers until changed.

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>
2026-10-20 11:17:54 +02:00
CatoandClaude 8efd523f46 docs(architecture): private builders — the plan for one sealed builder per account (#1342)
A read-through of what runs today (2026-10-19) found one builder, one
identity: every cloud build runs as the owner, on the owner's Claude sign-in,
with the production database password in its environment; a Builder on a
shared project spends the owner's subscription; a new account cannot build
at all and is told to install Fleet Runner, which fails the same way.

The plan: whoever asks for a change pays for it, with their own engine, in
their own builder. One Linux user per account on the box we have, a token
per tenant, no database password in any runner, an allowlisted environment
for every agent, and a request with no engine becomes a suggestion to the
owner. Seven reversible PRs, CHF 0 in hosting. The roadmap carries the same
milestones. Nothing on the box changes until the owner approves.


Claude-Session: https://claude.ai/code/session_01NZqZujmXpupVDC1Hi5Jbsx

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 10:57:18 +02:00