Commit Graph
828 Commits
Author SHA1 Message Date
CatoandClaude c5a52da875 fix(enrich): read AGENTS.md; a CLAUDE.md pointer adds nothing (#1468)
Every fleet repo's CLAUDE.md is now a one-line pointer to AGENTS.md, so
profile enrichment (the route and the backfill script) was sending the model
a pointer instead of the repo's notes. Both now read AGENTS.md, and keep
CLAUDE.md only where it still holds real notes (repos outside the fleet).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-29 18:05:22 +01:00
Catoandfleet-reconciler 37c35b4b05 chore(deps): raise shared package floors to published versions (#1436)
* chore(deps): raise shared package floors to published versions

Opened by bitbaum/fleet .github/workflows/internal-currency.yml.

The fleet's own packages ship features in MINORS, so
version-currency.mjs — which judges by major — reports nothing while
consumers drift. This is the instrument that sees it, and it opens
the fix rather than reporting it.

If this PR is red, that is the useful outcome: it names a repo that
cannot take the new version, which nothing else in the fleet would
have told us.

* fix(widget): keep ChatKit embed under size budget

* test: isolate prompt delivery Git fixtures from hook environment

---------

Co-authored-by: fleet-reconciler <fleet@bitbaum.invalid>
2026-10-28 13:45:19 +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
Cato 2ff28da1ed fix(deploy): expose only the public package receipt path (#1448) 2026-10-27 18:32:15 +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
CatoandClaude 34bb66aba4 fix(widget): the panel's first look is whole on a phone (#1426)
Driven with a microphone in a real browser: the visitor's thread opened scrolled
to its bottom with the greeting's first line cut under the header; on a 320x640
phone the Talk hero was sliced and the owner's way in was gone. The thread now
opens at its top when nothing has been said, the hero and the sign-in line are
tighter, and on short screens the sheet is taller and the chips and long
explanations step aside. A browser test pins it at 320x640 and 390x800.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 14:15:24 +02:00
CatoandClaude Opus 5.5 84f47582a5 chore(chatkit): the broken-word audit runs in audit:responsive and the widget test (#1425)
* chore(chatkit): 0.14.2 — the broken-word audit runs in audit:responsive and the widget test

chatkit 0.14.2 exports `@bitbaum/chatkit/audit`: `findBrokenWords(root)` and
`BROKEN_WORDS_SOURCE`, every word drawn across two lines (words beside
- / . @ : _ and over 24 characters exempt). "Di / re / ct / or / y" is five
syllables nobody wrote, and reading the CSS never finds it — only laying the
words out does.

- `pnpm run audit:responsive` now fails a page/viewport on a cut word, listing
  the page, the width and every word (the list names the cause: one word is a
  narrow cell, all of them a `break-all` on an ancestor). Same retry path as
  the overflow measure.
- scripts/test/widget-host-avoid-browser.ts serves the chat chunk
  (public/widget-chat.js, built as build:widget builds it) from the mocked
  origin, opens the panel with data-fc-chat="kit" at 390 and runs the same
  measure on the panel. Mutation-proven: `word-break: break-all` on the panel
  fails it with the greeting, starters and mode labels listed.
- No cut word found: the widget panel at 390, and / /sign-in /change /build
  /fleet /pricing /sign-up /u/cato /docs/feedback-widget and two more public
  pages at 320/390/768/1440 on the live site all pass.

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

* chore(chatkit): 0.15.0, and a variable read with its fallback has a default

chatkit 0.15.0 is additive over 0.14.2. Its stylesheet reads
var(--ck-n, 1), a per-element variable with the fallback at the point of
use, which widget-chat-css's "every other variable has chatkit's own
default" check counted as unset. It now counts a fallback as a default; the
colour check (every colour from the widget theme) is unchanged.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-23 13:29:01 +02: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 Sonnet 5.5 b3ac085511 feat(ui): Missions and Settings as rows, names in words, quiet agents said plainly (#1421)
* feat(missions): Missions as rows, on the same bar as every other page

The list was a grid of cards under four stat boxes, a chip row and three
explanatory sentences, and its search used a class the reset had removed. The
list is now a search row, a Show menu and one row per project; the page is
Objective, Next move, Roadmap, Latest handoff and Recent runs. Progress stays
'reported', never verified.

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

* feat(settings): Billing, Projects, Team and Privacy as rows

The four sections still drew their old boxes inside the new pane. Each is now
Section headings and rows: plans and passes, projects with Move up/down and an
edit sheet (no drag handle, no raw paths), members and invitation links (no raw
URLs), and the private zone with its PIN forms in sheets.

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

* fix(home): project names in words on the status card, start-of-day and composer; one row for a builder never connected

The composer's project chip, the fleet status card and Start my day showed
folder names. The never-connected builder row's title was cut off at the edge.

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

* fix(projects): a delivered request that went silent reads as 'the agent went quiet', as Watch says

Overview said nobody picked the request up while Watch said the agent had gone
quiet, for the same run.

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

* fix(ui): Suggestions shows an avenue's best five, Packages says a failure once, Voice picks from a menu, the download button reads

- Suggestions: 30 'Put X online' rows pushed every other avenue off the screen.
- Packages: 'N could not be read' ran the read line on into its own link.
- Voice: seven names never line up as a 4 + 3 grid; a menu does.
- Approvals: the message disclosure now says it opens (a chevron).
- Download: the note on the orange button had too little contrast.

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

* docs: changelog and Views row for the last pages of the reset

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 23:21:25 +02:00
CatoandClaude Fable 5.1 8c9c9b3c01 feat(box): app-secrets — generate an app's machine secrets on the box from GitHub (#1419)
* feat(box): app-secrets — generate an app's machine secrets on the box from GitHub

The secrets an app needs that no human holds: a cron bearer token the box's
own timer presents, and a Web Push (VAPID) key pair. Until now they were a
"generate this and paste it into /opt/<app>/shared/.env" ask handed to the
owner, who on 2026-10-22 — heidi's channel notifications waiting on exactly
that — rightly declined to run openssl for a value nobody will ever read.

scripts/hetzner/app-secrets.sh holds the registry (app|VAR|kind: hex32,
vapid, literal) and the rules: it adds only what is missing and never
overwrites, treats a VAPID pair as one unit, prints names and never values,
and restarts <app>-app only when it added something. Values are made on the
caller's side and travel to the box on ssh's stdin, never in argv or a log.
.github/workflows/app-secrets.yml runs it from GitHub over the deploy's SSH
(show | ensure), then re-runs install-app-crons.sh so a timer exists to
present the new CRON_SECRET.

First registered app: heidi (CRON_SECRET, VAPID_*, subject = the site's
contact address). Checked against a fake box: show, ensure, a second ensure
that adds nothing, the half-pair refusal; the generated pair is 65 + 32
bytes and web-push accepts it.

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

* test(terminal): the swipe test drags a finger that stops, over a deeper buffer

terminal-swipe-browser failed twice on one commit in CI (1 !== 0: the
"as far back" note was already showing after the first swipe) and passed
on main an hour earlier. Two things made the first swipe land on the
oldest line instead of short of it:

- The synthetic swipe lifted at full speed. CDP delivers the twelve moves
  a millisecond or two apart, the scroller reads that as a very fast
  finger, and the glide after a flick runs on that speed — on a quick
  runner one 300px swipe glided past every kept line. Six still moves
  before the lift decay the smoothed velocity to nothing (×0.2 each), so
  a swipe now moves exactly what the finger moved.
- 120 lines was no margin: at 390px the fitted font gives ~66 rows a
  screen, so only ~54 rows sat above the fold and a 300px swipe (~54 rows
  at that cell height) reached the top exactly. 300 lines leave 180 rows
  after the first swipe; the "to the top" loop allows twelve swipes.

Measured locally: start 234 → 180 after one swipe, top reached inside the
loop, the note on the swipe past it; three runs green.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 23:12:48 +02:00
CatoandClaude 2610d16b1c feat(widget): Minimize — the launcher folds into the slim edge tab (#1420)
The owner's pill ("Watching", its microphone, its remark bubbles) sat over
the text being read on Substrata at 390px (2026-10-22): "when you press and
hold on that widget, something opens ... make it possible to minimize it so
it's how it was before ... otherwise it's kind of disturbing".

Long-press / right-click on the launcher now offers Minimize first (then
Hide, Reset position). Minimize folds the pill into the slim edge tab on the
side and at the height the person had left it: still one tap from Loki,
still showing the live dot and the unread count, with the microphone and the
remark bubbles gone. It is remembered per site, outranks every placement
heuristic, and the tab's own long-press menu offers Expand.

- visitor-placement.ts: readMinimized / writeMinimized (per token).
- placement.ts: chooseTabTop takes a height the person chose, tried first.
- launcher.ts: the menu item, and a minimized branch in reposition().
- scripts/test/widget-host-avoid-browser.ts 8d drives the real menu: Minimize,
  slim and flush right, remembered after a reload, Expand, remembered too.
  It fails on the pre-change bundle (6 failures). widget-placement.ts covers
  the preferred height. widget/README.md documents it under "Hiding it".


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 22:58:36 +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 6144518228 feat(chat): chatkit 0.13 — answers that read like the ChatGPT app's (#1413)
Pin @bitbaum/chatkit at ^0.13.0: headings a size up, option cards with a
[Recommended] pill, citation chips after the sentence, external links
marked, the layered "stack" figure, and the "Thought for 42s ›" row.

Loki's own thread feeds that row from its run data. useLokiStream keeps
every status the turn names and every further model round, in order, as
`live.steps`; the live line under a turn is now chatkit's ThinkingRow
(the clock and what it is doing in the title, the steps under it, the
newest marked), replacing Loki's own dots line and its CSS. When the
persisted turn lands, the hook hands the workspace `thinking`
(duration + steps), carried only by the in-session message — nothing is
stored, a reopened thread keeps its work trail. The terminal's Loki
rail and the prompt Run sheet pass the same steps to chatkit's thread.

The widget chat chunk grew to 33 KB gzipped with the new answer shapes;
its budget moves from 32 to 40 KB.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 18:46:23 +02:00
CatoandClaude 8bd35f1c59 fix(home): a new account's Home is rows, not two boxes with two black buttons (#1408)
An account with no builder and no linked project saw a tinted setup box with
its own black button above a raised card with another — the first screen a
visitor meets broke the design reset's one-action rule. The builder is now one
row that opens the full setup, and unlinked projects are a quiet empty state
with one secondary button.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 11:13:26 +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
CatoandClaude 8884b09eb5 feat(settings): Settings → AI as one surface — what is left per source, one row shape, no untrue copy (#1401)
Every card of the AI tab now wears the same header (title, one line,
at most one action on the title row), and the tab reads top to bottom
as the levers a person reaches for:

- "What you have left": one list of every source Loki answers from —
  each key the person brought, a paid plan, the shared free pool —
  with one row anatomy: what is left (in the vendor's words, or "not
  reported yet", never "full"), what it cost, what to do. Under it,
  two equal cells that are always there: Add a provider · Upgrade /
  Manage plan. The free pool's number is said once (hero or sentence,
  never both); every per-answer figure names its basis ("your own
  2,720 tokens" vs "a starting estimate").
- "Your providers": one row shape (name · model, detail, Test inline,
  the rest behind one menu), "Also for building" as a switch row,
  adding as the last row. Usage and billing are no longer repeated
  from the card above.
- "What Auto picks" is its own card and states where its prices and
  intelligence index come from and when they were read.
- The server's vendor counters and per-feature spend are the
  operator's and show only to the operator, with a title that says so.

Copy that was wrong or ambiguous: "set a a monthly spending limit";
"7,200 of 7,200 requests." with no "left"; "then 0 a month on your
plan" on Free; and every "once Loki's company is registered" line,
which now says only that checkout is not open yet and a reservation
is kept. The plans note still says nothing is charged.

One switch class replaces three hand-rolled pills (the old white knob
vanished on a near-white "on" track in dark mode). A preview entry
renders the whole tab from mocked routes at 390/1280 in both themes
(scripts/preview/build-ai-settings-preview.mjs).


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-22 08:38:05 +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 320ab091d2 Widget launcher: drag to move, snaps to the nearest edge, remembered per site (#1399)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:21:25 +00:00
Catoandcatomean 83c257547b Widget launcher stays put: avoid pass only on load, resize, route change; never moves a chosen spot (#1398)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:09:07 +00:00
Catoandcatomean 8fae3cf1e9 Widget launcher is always solid and tappable (no scroll fade, no 70% tab) (#1396)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:00:36 +00:00
Catoandcatomean 2c18d1f4de A merged PR at the agent's HEAD also closes the run Done (#1395)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 23:39:49 +00:00
Catoandcatomean ea21c03415 Never deliver a queued dispatch whose run closed or whose feedback item is done (#1394)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 23:20:22 +00:00
Cato 8ab96666d7 Use shared audio playback and describe Cat's real creative Studio (#1382)
* Play audio in Loki and ground Cat Studio capabilities in the working first version

* Minify shared widget CSS before inlining to retain the download budget
2026-10-22 00:41:03 +02:00
Catoandcatomean d857a449b8 Close a run Done with the agent's own PR once it sits idle (#1393)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 22:36:48 +00:00
Catoandcatomean 07eb43fd00 Control reads the open run's state; name container-start failures (#1392)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-22 00:15:15 +02:00
Catoandcatomean 66180821e5 Sealed builds: reclaim the tab's container name (--replace); launch-check harness (#1390)
* sealed-builds: stop-sealed mode (stop stuck sealed agent containers)

* journal mode

* journal: unit OR drain

* journal tail 600

* journal keep podman

* containers mode

* diag: runtime as the unit runs it

* Sealed builds: --replace the per-tab container name (dead container blocked every launch); real-launch-path check (launch-check mode)

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 22:55:51 +02:00
Catoandcatomean c1f95c0dd8 Sealed Antigravity unattended; one run state; dead agent = Failed; salvage PR (#1388)
* Sealed Gemini auto-answers its taint prompt; one run state (project page/Control read the run); dead agent closes Failed; salvage PR on exit

* format

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 22:05:56 +02:00
Catoandcatomean 316ccce8b0 Antigravity auto-approve; permission prompts show Needs you with the question (#1387)
* Antigravity auto-approve in unattended runs; agent permission prompts read as Needs you with the question

* Sealed git identity+push, drain counts sealed agents, dead agent = Agent stopped, no menu-pick suggestions; worktree read mode

* worktree mode: find nested worktrees

* worktree mode: match by branch

* worktree mode: staged diff

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 21:19:05 +02:00
Catoandcatomean 2e645b01c1 Sealed builds: Antigravity gets a TTY and its key (fixes 'never accepted the prompt') (#1380)
* sealed-builds: diag mode (runner journal + gemini under real PTY in the sealed container)

* probe: show composer + working screens

* Sealed builds: Antigravity gets a TTY and its key; Gemini 0.65 working/composer markers

* Fleet Runner 0.8.53 release entry; .env.example XDG_RUNTIME_DIR

* format

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 20:29:22 +02:00
Cato 55141f4614 Send widget guided choices through the conversation handler (#1379) 2026-10-21 19:52:44 +02:00
Catoandcatomean 45dc3ead2e Provider inventory: measured per-runner provider status; failover and AI Providers read it (#1374)
* Provider inventory: each runner measures and reports what it can build with; failover and Settings → Agent read it

* prettier

* Fleet Runner 0.8.51 (provider inventory); env example

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 19:06:11 +02:00
Catoandcatomean 7964da23c6 Prompt delivery: drop terminal-query answers from input; Working needs evidence; fresh branch per run (#1373)
* Agent prompt delivery: drop viewer terminal-query answers, Working only on evidence, fresh branch per run

* Fleet Runner 0.8.51

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 18:49:01 +02: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 b3bdd96ce9 Fail over to the next agent on a quota wall; never 'Done' over a failure; Watch on the decision card (#1367)
Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 16:38:11 +02:00
Catoandcatomean 9901e004d8 Use the shared visual answer engine in AI chats (#1364)
* feat: adopt shared visual AI answers

* test: preserve all citations in one sources sheet per answer

* feat: negotiate visual answers with public chat clients

* fix: preserve complete visual widget answers and bounded history

* fix: keep visitors' literal messages in rich chat history

* style: normalize widget history formatting

* fix(widget): keep chatkit out of the panel bundle

The panel (public/widget.js) imported richAnswerText from @bitbaum/chatkit,
pulling a dependency into every customer page load and failing
widget-self-contained. Use a dependency-free copy in widget/rich-history.ts
with a parity test against chatkit.

* style: format widget visual answer test

---------

Co-authored-by: catomean <catomean@users.noreply.github.com>
2026-10-21 15:53:00 +02:00
CatoandClaude Fable 5.1 f883de4c20 feat(loki): chatkit 0.10 (the row under an answer, studio voice) and temporary chat (#1361)
* feat(loki): chatkit 0.10 — the row under an answer is the fleet's, read in the studio voice

Copy · Listen · Share · Try again · Bad answer under every answer are
chatkit's AnswerActions now (0.10.0): Listen reads the answer in the studio
voice (createServerSpeaker, made inside the tap so a phone does not mute it,
the phone's own voice as the fallback) and the row becomes a small player —
Stop and the time so far — while it reads. Loki's own copy of the flattening
(speech-text) and the browser-voice hook are gone; the path re-exports
chatkit's for the voice modules. The composer's placeholder is one row on
the narrowest phone, from the same release.

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

* chore(deps): chatkit 0.10.0 pinned to main

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

* feat(loki): temporary chat — never listed, gone when you leave

"Temporary chat" in the start screen's menu (and a thread's): the next
conversation is created `ephemeral` (conversations.ephemeral, drizzle 0126).
It is never in the rail, the start screen or an export — every list reads
ephemeral = false — and it is deleted the moment the person leaves it: a new
chat, a switch to another thread, a closed tab (the delete goes with
keepalive). The daily sweep (crons/sweep-temporary-chats, 04:40 UTC) takes
any left behind by a dead phone. The header says "Not saved — gone when you
leave" while one is open or armed. lib/loki/temporary-chat.ts holds the
leave rule, pure and tested (scripts/test/loki-temporary-chat.ts).

The workspace's two drawers moved to WorkspaceDrawers to stay under the
line cap.

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

* chore(drizzle): format the generated 0126 meta

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

* fix(crons): the temporary-chat sweep writes its outcome down

cron-outcome-persistence: every cron-authed route records what it did with
logDebug, since the journal holds about a day.

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 07:33:11 +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 Opus 5.5 3024426a65 fix: Voice says why studio voices are off, Watching says each thing once, Prompts in words (#1358)
* fix(prompts): one card per saved prompt, schedules in words, dialogs that say why

What the owner found on /prompts from an Android phone, item by item:

1. Saved prompts: saving the same name + words again no longer inserts a
   row — POST /api/prompts answers with the prompt already saved
   (existing: true); the form opens it, the default's save button says
   "Already in your prompts". A card that stands for identical copies says
   how many and offers "Remove N extra copies" — one explicit tap, the
   caller's own rows only, the same soft delete as Delete
   (DELETE /api/prompts/<id>/copies). Same name with different words says
   "2 versions with this name, worded differently".
2. Filters: the scope filter is a <Segmented> (All / Any project / One
   project) sitting with the category row on the list they both filter,
   under "Loki's prompts". Category counts follow the scope. Filter chip
   rows on a phone get a wider fade, snap to a chip's start and leave room
   after the last chip, so the edge reads as "more" rather than a cut word.
3. New prompt: Create stays disabled until there is a name and a prompt,
   and says what is missing beside it. Opening or closing the form never
   saved anything; the copy glyph on every default card did, in one tap
   with no label on a phone — it is now a labelled "save a copy" button.
4. Schedule: pick Every day / Weekdays / Every week / Every month, a day
   and a time; Loki writes the cron (lib/cron-words), with "Write it as a
   cron line instead" for experts. The schedule reads back in words with
   the time zone it runs in ("Every Monday at 10:00, Zurich time
   (Europe/Zurich)") and a link to change it; the zone is sent with the
   job. The API refuses a cron line the scheduler cannot read, in words.
   Create is the primary button and says why when it cannot be pressed.
5. Run: a prompt that names {{project_name}} asks for a project whatever
   its scope (a saved copy is global), defaulting to the project in use;
   the prompt is shown only once complete. Each action says in one line
   who does the work; Send to terminal works for any of your projects
   (tab-inject starts or queues the session) and says why when it cannot.
   Project pickers list projectTitle(), not folder keys.
6. Category chips are neutral (ui-tag-neutral); the ui-cat-* rainbow and
   the featured star's amber are gone. "control" was a second id for the
   fleet prompts — one category now, "Fleet control".

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

* fix(voice): spoken sentences start with a capital and name a repeated project once

The briefing read "one run is waiting for a builder: loki ... three runs
failed: loki, loki and loki". Sentences now open with a capital, and the
runs' projects are said once each: "Three runs failed on loki.", "Four runs
failed: loki three times and heidi once." The same for runs waiting for a
builder, agents working, and the announcements between turns.

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

* fix(voice): say why the studio voice is off, with the link that fixes it

POST /api/voice/speak answered 502 with Groq's reason only in the server
console, and the phone fell back to its own voice in silence, so every voice
in the picker sounded the same. Groq's refusal is now classified
(lib/voice/tts-failure: terms gate, bad key, limit, model gone, vendor down,
no key) into one plain sentence and, where one exists, the link that fixes
it — for the Orpheus terms gate, Groq's voice page and "press Accept". The
route returns it in the 502/503 body and records it in debug_logs (once per
reason per half hour) so System shows it. The speaker reports the fallback
to the page; useStudioVoiceStatus keeps it for the tab's session and
StudioVoiceNotice shows it. The phone-voice fallback stays.

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

* feat(voice): change Loki's voice by saying so, and answer questions about voice mode truthfully

"I don't like your voice, can I change your voice" was answered like a
generic chatbot ("in most voice-enabled AI chat apps... look in settings").
Now "use Troy", "change your voice to Diana", "other voice" and
"switch voice" are a spoken command (config/no-screen.ts, lib/voice/commands)
that the phone answers itself; with no name it lists the voices. A question
that does reach Loki carries voiceModeContext (lib/voice/self.ts), built from
the SSOT: the voices by name, how to change one, the three switches with the
same one-line notes the screen shows (NO_SCREEN_OPTIONS), every command, the
current settings and why studio voices are off, if they are.

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

* fix(voice): a music bed a phone can actually play, and keep its sound awake

The bed sat at about -38 dBFS RMS alone and -50 under the voice, every note
98-370 Hz behind a 900 Hz low-pass: below what a phone speaker or many
earbuds reproduce, so "music bed on" was silence. It is now an octave
higher (196-740 Hz), about 12 dB louder, ducks by 10 dB instead of 11 more on
top, and earcons sit above it. The AudioContext is resumed inside the Start
tap, on every tap on the circle or headphone button, on return to the page,
and when the phone suspends it mid-session.

useSoundscape also returned a new object every render, so effects keyed on
it re-ran ~20 times a second while listening: the gain was re-ramped every
frame and the 20-second fleet poll was cleared before it could fire. It is
memoized now.

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

* fix(voice): one h1 per screen, End clear of the feedback launcher, voices as an even grid

- Speaking screen: an h1 below md, where the app top bar steps aside; the
  start screen's big "Voice" is no longer a second h1 beside the top bar's.
- The speaking screen sets data-fc-place="tab", so the feedback launcher
  and its Watching pill become the slim edge handle instead of sitting on
  End; End is larger, with room below it, and the stage scrolls rather than
  pushing End off a short screen.
- The voice picker is a <Segmented> grid of four columns (seven voices as
  4 + 3, the last two cells wide) instead of a chip row cut off at the edge;
  the setting groups have real headings.
- The unclear note under the switches is one short line under each switch,
  shared with what Loki is told about itself.
- The page wires the studio-voice notice (under the picker and under the
  circle, said aloud once), the spoken voice change, the page's state sent
  with each question, and the sound resume on every tap.

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

* fix(widget): one card per finding, settled page checks, honest fix status, a count that means what needs you

Watching on Loki's own /voice from an Android phone showed six problems in
one panel. Each is fixed where it starts:

- Notices no longer stack. A page's checks own ONE card (checksSlot), which
  each new reading replaces in place and a clean reading takes back
  (thread.ts pushNoticed / dropNoticed); a remark whose words are already on
  screen is not said again; a finding's signature ignores its count and its
  placeholder example (findingKind), and the card names its page.
- The heading miscount: the check counted headings inside aria-hidden and
  inert subtrees, and measured the page once, mid-swap — /voice's setup
  screen (top bar h1 + page h1) leaving for its speaking screen (immersive
  mode hides the top bar: no h1). Checks now count only rendered elements and
  run once the page has held still, twice, keeping only what both readings
  agree on (settledPageChecks / stableChecks). The Voice page itself now has
  one h1 on each screen.
- A fix Watch started that failed no longer promises it "goes live by
  itself": it says the fix did not finish, and "Open it in Loki to see why"
  is a real link to that run's Watch page (owner-view ownerTap; watch-fix
  now resolves a failed run's Watch page even without a live page).
- Self-watch: "I couldn't check on your changes just now" replaces the old
  sentence; a request that lived through the page being put away (a phone
  locking) is never a failure; background reads count only after three
  failures in a row; the changes route always answers with CORS headers and
  logs what failed.
- The header's one number is what waits on the owner's decision (failed
  attempts, saved notes, notes not started, changes said but not saved),
  counted by the server over ALL of the owner's rows, not inside the newest
  twelve; the open list shows every one of them first. Nothing waiting:
  just "Watching".
- The save receipt never quotes a cut sentence: several changes are listed
  one per line under it, clamped to whole lines with "Show all".

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

* docs(changelog): voice, Watching and Prompts fixes

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-21 00:38:11 +02:00
CatoandClaude Opus 5.5 6fb45f69a6 fix(loki): New chat always starts a blank box with the cursor in it (#1356)
On the start page, "New chat" only left a thread that was not open, so a
press changed nothing: the half-typed draft stayed and focus stayed where it
was (watch-mode report: "pressed New chat three times and nothing
happened"). Every New chat — rail, phone top bar, thread menu — now clears
the start page's stored draft, empties the composer and focuses it
(hooks/use-new-chat.ts). Back in a phone's thread header only leaves the
thread: no keyboard, draft kept.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 23:50:32 +02:00
CatoandClaude Opus 5.5 9a8142a1ac fix(terminal): a real page heading, a clear box, a Terminal button that toggles (#1354)
Owner feedback on /terminal (2026-10-20):
- h1 "Live Terminal – AI Agent Sessions", present at every width
  (screen-reader only below sm, where it used to be display:none)
- subtitle says what the page is for instead of describing the view switch
- tapping the view you are in flips Chat | Terminal, so "Terminal" always
  changes the screen
- the session box draws its text line as a field on a card set apart from
  the terminal; Send stays on the owner's + · model · mic · Send row
- app footer: the bare commit hash becomes a Help link (/support); the
  hash is the env cell's tooltip

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 19:09:09 +02:00
CatoandClaude 331e5aa528 fix(watch): send work to an agent the builder has, and say a stop once (#1353)
A report filed from Loki's own page went to Grok on the cloud builder,
which only runs Claude Code. Watch then showed the refusal three times,
"Try again" (which fails the same way), empty future stages, "Grok
stopped" for an agent that never opened, "Done." filler, and the
report's technical details inside "You asked".

- Dispatch (Implement, kickoff, retry) routes around an agent the
  builder reported it does not have, and records why (reroutedWhy).
- A not-installed stop offers the installed agent as the one button.
- The reason and the buttons sit together in the card; the duplicate
  Loki message and "Stopped · N steps" line go when a track exists.
- The track ends at a failed stage; "could not start" when nothing opened.
- The user's bubble hides "--- technical details ---" behind Dispatch details.
- Reroute line says the true reason; an operator's own pick says nothing.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 18:16:39 +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 9c84c929e4 feat(engines): your own key builds when you say so; welcome builds, then the plan's, then your own; capacity you can read (#1347)
* feat(settings): your own key builds, when you say so — a key marked for building reaches your private builder

Track 1, PR 6 of docs/architecture/private-builders.md.

- user_model_keys.for_building (migration 0123), off by default; one
  switch per key in Settings → AI, offered only on keys that can drive an
  agent CLI (config/build-engines.ts: Anthropic → ANTHROPIC_API_KEY for
  Claude Code, OpenAI → Codex, xAI → Grok, Google → Gemini CLI) and only
  to an account with a builder on the cloud.
- scripts/write-tenant-engines.ts (root on the box, from the reconcile
  timer) opens the marked keys with the app's sealing secret and writes
  them to /etc/loki/runners/<short>.env; a unit whose file changed is
  drain-restarted, so the key reaches its next agent without ending a
  session mid-task. No route ever returns an opened key.
- Records: changelog {#your-engine}; roadmap milestones ticked.

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

* fix(settings): the building switch sits in one row with its sentence

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

* feat(engines): welcome builds, then the plan's, then your own — and capacity you can read

Track 2 (2.1, 2.2, 2.5) and Track 4.1 of docs/master-plan-2026-10.md.

- users.build_engine (migration 0124): "own" by default — the person's
  sign-in or a key marked for building, never counted — or "loki": Loki's
  key within WELCOME_BUILDS (3, config/welcome-changes.ts) and the plan's
  PLAN_LIMITS.buildsMonthly (10 / 40 / 100). Every run records which
  engine paid for it (payload.engine); welcome and plan builds are counted
  from that marker. A dispatch past the last build is refused with the way
  forward (code engine-exhausted), and the kickoff screen shows it with
  one tap to Settings. Loki's welcome spending stops for everyone at
  WELCOME_MONTHLY_CAP_CHF (20), at CHF_PER_USD, a hand-set rate.
- The box writes Loki's key (LOKI_BUILD_ENGINE_ANTHROPIC_KEY from the
  app's env) into a tenant's unit only while they chose Loki's engine and
  have builds left; otherwise their own marked keys.
- Settings → AI: "Your engine for building", one Segmented choice with the
  numbers; /api/settings/build-engine. The kickoff's no-builder copy says
  the operator switches a private builder on per account.
- System → Capacity: how long work waited for a builder in the last day
  per channel (median, worst), this month's builds, tokens and cost per
  account, and welcome spend against its cap.
- /pricing and the whitepaper (0.3.3) state the builds a month on Loki's
  engine and the rule. Records: changelog {#welcome-changes}
  {#capacity-card}; roadmap milestones ticked.

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

* style(engines): format resolve.ts the way prettier wants it

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-20 12:55:35 +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 Opus 5.5 9031430125 feat(feedback): a client's seat on the site itself; visitors follow notes without an account (#1337)
* feat(feedback): a client's seat on the site itself; visitors follow notes without an account

Step 3 — the seat reaches the site:
- A member pass (#loki-member=) names the person, not the owner. Their
  project page's Open link and the widget's sign-in door give it to anyone
  on the project who does not build it. The widget stays the ordinary panel
  and sends it with each note; ingest files it through the same path as
  asking in Loki, so a client's note on the site builds on their allowance
  and goes live on their word. Membership is read when used.
- The owner's own link is no longer what a client is sent: the preview's
  share card offers Invite them as Client.
- An approved /change request seats its requester as the site's client
  (5 changes a month), and their request page says where to ask.

Step 4 — the way back without an account:
- The tracking link opens on the note's status (the My feedback card), for
  six months; an account is optional, below it.
- A visitor who leaves an email gets the link by mail (three a day per
  address), and again in the shipped mail.

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

* chore(widget): keep the conversation within its length limit

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

* chore(widget): hand the passes on through one helper

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

* test(feedback): the shared reporter card and the six-month link

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-20 00:00:21 +02:00
CatoandClaude Opus 5.5 50d632f21a feat(projects): a client's seat — builds on a monthly allowance, live on their word (#1336)
* feat(projects): a client's seat — builds on a monthly allowance, live on their word

The client is the person a site is for. Their asks used to wait for the
owner; the only other seat was Builder, which builds without limit and ships
without anyone looking. Now:

- The owner picks a client's changes a month on the People panel (Ask me /
  5 / 20 / 50), on the invite and per client later.
- Within it, the client's ask builds at once on the owner's builder. The
  agent opens a DRAFT pull request; it merges only after the client taps
  Make it live (their project page and My feedback), which lifts the draft
  and merges once green. Auto-ship OFF still means the owner merges.
- Past it, or with Ask me, the owner decides, and the night never builds it
  unasked. A build that did not start is not counted.
- The client is told what happened in plain words, with changes left.

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

* fix(projects): a client's change stays a draft until their yes; the inbox names it as theirs

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

* chore(db): format the migration snapshot

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

* fix(db): drizzle comparisons for the allowance count

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-19 23:35:44 +02:00