Commit Graph
181 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 f07165a356 Loki first: the chat opens, three words in the sidebar, a one-screen workbench, and a voice on your side (#1506)
* feat(workbench): one project side by side, on one screen or two

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 21:35:13 +01:00
CatoandClaude 169f920055 fix(desktop): Linux AppImage keeps the Chromium sandbox on (#1521)
Every Linux launch passed --no-sandbox. afterPack.cjs wrapped the
Electron binary in a stub that added it unconditionally, the .desktop
Exec= line carried it (electron-builder's AppImage default), and the
systemd unit from install-fleet-runner.sh passed it again. The reason
was real but narrow: inside an AppImage the setuid chrome-sandbox can
never work (the FUSE mount is nosuid), so where unprivileged user
namespaces are also blocked Chromium aborts at FATAL. Everywhere else
the namespace sandbox works without any setuid helper, and the flag
switched off the renderer sandbox #1479 had turned on.

- desktop/scripts/linux-launcher.sh replaces the stub. It runs
  Chromium's own probe (create a userns, write its maps, nest another)
  and the setuid-helper check for .deb installs, and passes
  --no-sandbox only when neither is available (or as root). It then
  prints why and how to fix it, and sets FLEET_RUNNER_SANDBOX_OFF.
  It also reports a --no-sandbox that arrives on argv, including the
  one electron-builder's AppRun appends silently.
- The main process shows that reason as a notification.
- linux.executableArgs is [] so the .desktop entry stops passing it.
- The systemd unit no longer passes --no-sandbox.
- The stale-instance pgrep no longer requires --no-sandbox in argv.
- Packaged-build test: test-linux-sandbox.sh starts the real AppImage
  under Xvfb and checks the live process tree (main argv; renderer
  seccomp-bpf and its own user namespace). ci-linux-sandbox.sh runs it
  with Ubuntu's userns restriction off (must be sandboxed) and on (must
  still start, with the notice). New PR workflow
  desktop-linux-sandbox.yml, and a step on the Linux release build.
- Version 0.8.62 with its changelog entry.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-01 19:18:22 +01:00
CatoandClaude 42bf0dceb7 fix(deps): Electron 43.8.4 and a sandboxed main window in Fleet Runner (#1479)
* fix(deps): Electron 43.8.4 and a sandboxed main window in Fleet Runner

Fleet Runner ships Electron 43.4.1, which has two high advisories
(GHSA-qmv3-fv6v-rmhq, GHSA-jr5w-w6x2-84p9) plus moderates and lows. The fix
is inside the existing major: electron ^43.8.4.

The main window loads the remote web shell, and it ran with sandbox:false.
The preload only imports contextBridge and ipcRenderer from 'electron',
which a sandboxed preload supports, so the window now runs with
sandbox:true, contextIsolation:true and nodeIntegration:false.

Also clears the desktop dev-toolchain highs (vite ^8.3.5, undici,
brace-expansion, source-map-js, fast-uri lock refresh) and two root
moderates through pnpm overrides (qs ^6.16.1, ip-address ^10.7.4, both via
the shadcn CLI).

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

* fix(deps): release Fleet Runner 0.8.61 with the Electron security update

The desktop change has to reach machines, so desktop/package.json moves to
0.8.61 with its FLEET_RUNNER_RELEASES entry (desktop-release-drift).

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

---------

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

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

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

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

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-30 09:53:59 +01:00
CatoandClaude 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
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 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 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
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
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 d12f1b08a2 fix: the bell counts what happened, Codex resumes, Projects rows speak plainly (#1332)
- The bell counted feedback waiting for triage, which Home's "To review"
  already shows: "9+" beside "Feedback to triage 13" on one screen. It now
  counts only alerts, and exactly what its panel lists (it also counted
  new_feedback alerts the panel hid).
- Resume continues Codex conversations too (`codex resume --last`, scoped to
  the folder by Codex; falls back to a fresh session), from the Sessions
  page and when the cloud builder reopens sessions after an update. Cursor
  stays Start: its resume reaches chats from every project. Runner 0.8.49.
- Projects: no subtitle restating the sort; the sort is the even segmented
  row with its meaning under it; "Not connected" sits once in the facts line
  instead of orange capitals beside every name; "health 5/10" reads
  "5 of 10 checks", the rail's own word.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 18:50:00 +02:00
CatoandClaude 556133788b feat: Home, four tabs, and a terminal that lists your sessions (#1327)
Walked as the owner (2026-10-19): what you expect, what happened.

- "I want something built." Control is now Home, and opens on the box:
  what to build, with a project chip (the one you were last in, one tap to
  change), sent to that project's agent via /api/inject. The empty
  "Nothing is being built right now" card and its "Start something" (which
  left for /loki) are gone. Done rows lead with what was done, not the
  request quoted back.
- "Where is everything?" The phone's bottom bar is Home · Projects · Loki ·
  More. Sections are grouped by thing — Build, Loki, To review, Your day,
  The fleet, Private — not by abstract question. "Control" is "Home" in
  every sentence that names it.
- "Where is my session?" With nothing open, the terminal lists your
  projects, each with Resume, which opens it and continues its last Claude
  conversation (/api/agent/launch {resume:true} → claude --resume of the
  folder's newest log; runner 0.8.48). No more form with two dropdowns.
- Autopilot's toggle is a quiet control, not the page's filled primary.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 16:00:02 +02:00
CatoandClaude 1f1f40429c fix(builder): sessions survive cloud builder updates (#1326)
Every deploy restarted the cloud builder, and a restart ends every session
it holds. The drain waited for nobody to be mid-task, then logged "idle
sessions resume on their next dispatch" — nothing resumed them. The owner
found "No live sessions" after each of five deploys in one afternoon.

- The builder writes down each session it opens (~/.loki/open-tabs.json)
  and crosses it off only when it really ends: closed from Loki, or the
  agent exited while the builder stayed up. On start it reopens the rest;
  Claude sessions come back as the same conversation (claude --resume).
- Deploys compare runner files by content (rsync --checksum). A fresh
  checkout gives every file a new mtime, so every deploy, docs-only
  included, read as a runner change and restarted it.
- The manifest sync no longer lists a package-lock.json this pnpm repo
  does not have; its rsync error blanked the output and hid real changes.
- Runner 0.8.47; the drain log says what happens now.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 15:47:07 +02:00
CatoandClaude 39474428d7 docs: clear docs-truth drift and retired names (#1322)
- Fix stale paths/links in docs (model-vendors billingUrl, agent adapter
  placeholder, bridge host setup, entitlements not yet created, tokens module).
- hetzner-migration: current hosts (evig, aoz) and a pointer to
  scripts/hetzner/apps.conf as the live app list.
- Archive two point-in-time records (fleet-runner-pty-ownership,
  terminal-parity) into docs/archive with a README; fix inbound refs.
- Thoughts essays: repo aoz-housing is now aoz-begleitung.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-19 14:05:48 +02:00
CatoandClaude 071ef57447 fix(session): switch to Fable or Opus from the phone, see it confirmed; the terminal says it is opening (#1312)
From a phone the owner could not switch a session from Fable to Opus, and
opening the terminal showed a black pane before the screen appeared.

- The model sheet offers each family by Claude Code's own alias: Fable,
  Opus, Sonnet, Haiku. Fable was missing. Versions are never written
  down, because the aliases resolve to the newest model in each family.
- Claude Code's own "Set model to Opus 5.5", "Set effort level to high"
  and refusals ("Model 'x' isn't available for your account") are read
  from the session log as setting items. The sheet settles on them at
  once and shows a refusal in Claude Code's words. The conversation
  gets a quiet line where the change happened. A runner too old to send
  these items still settles on the next answer.
- The chip reads "Model · Auto" instead of "Model? · Auto".
- The box's book button is now a slash button labelled "Commands and
  prompts". It always opened the agent's commands above the library.
- The terminal pane says "Opening the screen…" until the first frame.
  The server remembers each session's last screen, and a new viewer sees
  it at once, marked "Last screen · updating", until the runner's live
  replay lands. A remembered screen never counts as proof of life for
  the stall watchdog, and closing a session forgets it.
- The conversation view's wait reads "Opening the conversation…".
- Fleet Runner 0.8.46 carries the log reader.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-18 20:09:04 +02:00
CatoandClaude f80a315212 feat(control): the top of Control is the work being done for you, each job a tap from watching it (#1275)
The owner, on his phone (2026-10-17): "I see Building, I tap it, and I
expect to see how it's building — the chat or the terminal. Here there is
just so much… scary to non-technical users." The hero said "Building · 1
agent working" and could not be tapped; under it sat a builder sync line,
three counters, a Workspaces list and a "Recent activity" log of the raw
prompts sent to agents, safety fences included.

- ControlNow: one card per job being built — what it is, what the agent
  is doing right now, how long — and the whole card opens the live
  session as a conversation (/terminal?project=…&view=chat&run=…). A job
  waiting for your answer leads with the question and says "Answer it".
- ControlDone: the last day's results, what came of each (merged and
  deployed, partly done, stopped) and where to look: the site, the change,
  the conversation. Replaces "Recent activity".
- ControlFoot: builder state, New project and Settings in one quiet line.
  The hero now speaks only for alarms or when someone is needed;
  Workspaces is desktop-only.
- Titles (lib/task-title): a run named from its prompt the way a person
  would — a feedback fix is the report, an owner's decision is THE ASK, a
  site brief is its first line with the link as a domain. Never the prompt.
- Live step without a viewer (lib/run-step): the runner's progress beat
  reads the tail of the agent's own session log and sends "Editing
  Header.tsx"; the server keeps it on the run (payload.lastStep) and
  /api/control returns it with the run's id, outcome, title and last beat.
  Fleet Runner 0.8.44.
- The project the page auto-selects no longer becomes "your project" in
  the Profile · Chat · Control · Terminal strip; only one you open does.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 21:21:56 +02:00
CatoandClaude Opus 5.5 ab85172dda feat(terminal): sessions as tabs on the phone, and a second session per project (#1270)
* feat(terminal): sessions as tabs on the phone, and a second session per project

Asked for from a phone: several terminal sessions open at once, the way a
terminal has tabs, without clutter. Loki already ran several sessions and the
desktop strip showed them, but below md the strip and its "+" were hidden, so
a phone could neither see the other sessions at a glance nor start one while
another was running.

- Phone header: with more than one session the name becomes a sideways-
  scrolling row of them. The current one keeps its dot and chevron (and still
  opens the settings sheet); the others switch in one tap. One session looks
  as before, plus a "+".
- "+" opens TerminalNewSessionSheet, the same start form as the desktop "+".
- A project that already has a session now says so and offers "Start another
  session" or "Go to its session". Launching the same project used to target
  the same tab, which replaces the running agent. The second session is a lane
  tab (<project>~<id8>, run-tab.ts), named "project 2".
- The runner gives a hand-started lane its own git worktree, as parallel
  dispatch already does, and refuses rather than share one checkout
  (desktop/src/main/lane-workspace.ts). The lane limit moved to run-tab.ts so
  dispatch and the "+" share it.
- Close a session from the phone's session list (tap twice).
- /api/agent/launch refuses a tab carrying "~" that is not a lane Loki minted.

Tests: terminal-session-lanes (lane rules, refusal, numbering) and
terminal-tabs-browser (320/390px: no sideways scroll, 44px targets, switch,
sheet, second session beside a busy one).

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

* chore(desktop): Fleet Runner 0.8.43 — a hand-started second session gets its own worktree

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-17 20:22:12 +02:00
CatoandClaude Opus 5.5 afb39da877 fix(agents): each project is offered what its own builder has, and a missing CLI is said, not launched (#1262)
* fix(agents): each project is offered what its own builder has, and a missing CLI is said, not launched

- Control offered one agent list for the whole panel, read from the
  computer's report first, so a cloud project was offered Codex because the
  laptop had it. Each card now gets the list of the builder that will run
  that project (the same answer dispatch gives: locus lock, builder_pref,
  cloud), and an agent that builder lacks reads "not on the cloud builder".
  A builder that has not reported changes nothing (unknown, not none).
- A builder about to launch a CLI it does not have used to open a terminal
  on "command not found", and the run read as an agent that never answered.
  launchAgentPty now refuses first: "Codex is not installed on the cloud
  builder, so nothing was started. Switch this project to an agent installed
  there, or install Codex on the cloud builder, then try again."
- The next-step suggestions told the model the agent was "Claude Code" in
  every session. They now name the agent actually running (looked up from
  its adapter id; no free text reaches the system prompt).

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

* chore(desktop): Fleet Runner 0.8.43 — the launch check reaches computers

The launch check lives in desktop/src/main/pty-runtime.ts, so it reaches a
computer only with a release; desktop-release-drift (new on main) is right to
refuse it at 0.8.42. Bump and record the release.

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-17 18:41:08 +02:00
CatoandClaude Opus 5.5 d3325afbad fix(runner): the cloud builder crash-looped on an Electron import — load the browser hand-off lazily (#1159)
* fix(runner): the cloud builder crash-looped on an Electron import — load the browser hand-off lazily

#1152 (2026-10-11 22:25 UTC) added a top-level
`import { openBrowserHandoff } from './browser-handoff'` to the shared
poller. browser-handoff.ts imports `electron`. The desktop app has it; the
headless box-runner runs the same poller under plain Node and does not, so
it died at load with "Cannot find module 'electron'". systemd restarted it
220 times; /api/health/builder has read offline since 22:34, and every
cloud dispatch — including the owner's from a second computer — sat in
the queue. The deploy's new runner-state print showed it:
"Main process exited, code=exited, status=1/FAILURE … restart counter is
at 220".

- poller.ts: `browser_task` loads browser-handoff with a dynamic import at
  the call site. Browser tasks are channel "local", so the box never takes
  that path; on a desktop the module is a separate chunk (checked with
  electron-vite build).
- scripts/test/box-runner-headless.ts: walks the static import graph from
  scripts/box-runner.ts and fails on any desktop-only package (electron,
  electron-updater, @sentry/electron, @electron-toolkit/utils), printing
  the chain. Fails on main with
  "electron via box-runner.ts → poller.ts → browser-handoff.ts"; passes here.
- Fleet Runner 0.8.42 (desktop-release-drift requires the bump for any
  desktop/ change), with a release note.

Verified: the poller and every other box-runner import load under plain
Node (`tsx`); desktop tsc and electron-vite build clean;
desktop-command-validator 17/17.

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

* test(browser-fill): find the filler in any built main chunk

The poller now loads browser-handoff lazily, so electron-vite emits it as
its own chunk beside index.js. The test looked only in index.js and failed
in CI with 'has no top-level fillBrowserForm'. It now reads every .js file
in desktop/out/main.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-12 04:16:12 -07:00
CatoandClaude 7bf3220106 feat(browser): Loki fills a web form on your computer and stops at the final button (#1152)
A step behind the operator's own login ended in Loki listing fields to
type. On 2026-10-11 npm's trusted-publisher form took three rounds of chat
and a phone screenshot, and still hid two traps: an autofilled "Bitbaum"
that cannot be edited once saved, and "Allow npm publish" off by default.

Now Fleet Runner opens the page in Loki's own browser window
(persist:loki-browser, so a sign-in sticks), fills it, outlines the final
button and stops. The operator presses it and confirms any passkey.

- config/browser-tasks.ts: recipes are the SSOT and the only thing a
  queued row can name — no raw url or free-form steps reach the runner.
  First recipe: npm-trusted-publisher.
- lib/browser-fill.ts: one self-contained filler, found by visible label,
  React-safe value setter, idempotent, never presses the hand-off button.
- browser_task pending command, channel "local"; validated on both sides.
- Loki chat tool fill_web_form and MCP tool loki_browser_task (loki.act).
- Fleet Runner 0.8.41.

Tests: scripts/test/browser-fill.ts drives a React form built like npm's in
Chromium, against a runner-style bundle and the actual Fleet Runner build
(35/35; mutation-checked: a plain .value set fails 3). mcp-server 75/75,
desktop-command-validator 17/17.


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

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-11 15:25:46 -07:00
CatoandClaude Opus 5.5 2011f31d64 feat(loki, terminal): AI next steps, one-action dispatch card, chat view's clock and mode (#1046)
* feat(loki, terminal): AI next steps, a dispatch card with one next step, the chat view's clock

From the operator, on a phone (2026-10-05): smarter suggestions, a less
confusing dispatch card, a phone layout pass, and a chat view more like the
Claude app.

- AI next steps. Once a session's screen or Claude's reply stops changing,
  the fast model reads it (POST /api/terminal/next-steps, one call per
  distinct context) and its three steps lead the suggestion row in both the
  Prompt box and the chat view. The rule-based chips show at once and stay
  as the fallback when the model is slow or fails.
- Dispatch card. "Queued · waiting for a builder · Target: loki" over
  Control state / Cloud terminal / This computer is now a headline that
  names where the work is ("Waiting for this computer"), one line on what
  happens next, and ONE primary action chosen by state: Connect Fleet Runner
  while it waits on this computer, Watch it while it runs (on the terminal
  it actually runs on), Open in Control when it failed, See the result when
  it finished. lib/dispatch-card.ts, tested.
- Chat view. The live line carries the turn's age ("2 min 5 s"), the way
  the Claude app shows it; a single tool step names itself ("Ran" + the
  command in mono) instead of "Ran a command".
- Status dots. dispatchToneDotClass returned a colour class without the
  ui-dot size, so every dispatch status line (Loki card, terminal composer,
  prompt run modal, activity retry) began with a 0×0 dot.
- Suggestion chips ellipsize instead of cutting a step mid-word.

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

* feat(terminal): Claude Code's mode beside the message box, one tap to the next

The Claude app shows Auto / Accept edits / Plan beside its composer. Loki's
conversation view now does too.

- Claude Code writes `permissionMode` on every message you send. The shared
  log reader (lib/claude-transcript, also Fleet Runner's) keeps it on user
  items; the frame route accepts it; sessionMode() reads the newest.
- SessionModeChip in the composer row: the mode as of your last message,
  and a tap sends Shift+Tab, the TUI's next-mode key. It says "Switched…"
  until your next message records the new mode. No pick-a-mode list on
  purpose: the cycle order varies by Claude Code version and settings, so a
  picker could land on the wrong mode and claim otherwise.
- Fleet Runner 0.8.40 (the runner reduces the log), with its changelog
  entry. Older runners send no mode and the chip simply does not show.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-05 07:30:27 -07:00
CatoandClaude Opus 5.5 d5719be7f9 feat(terminal): screenshots reach the agent as images — the runner writes them, Claude opens them (#1045)
* feat(terminal): screenshots reach the agent as images — the runner writes them, Claude opens them

From the operator: a screenshot attached in the Terminal's composer should
actually reach the agent working in it. It never did — it was "described"
by a free vision model first, and when those were rate-limited the agent got
"Could not analyze attached image(s): all vision models failed — HTTP 429"
(2026-10-05). Even when they answered, the agent read a paraphrase.

Claude Code reads an image file when the prompt names its path. So:

- lib/agent-attachments: an image gets a placeholder line in the prompt and
  travels with the command (pending_commands payload `attachments`);
  parseAgentImages is the runner's boundary check (uuid ids, png/jpeg/gif/
  webp, size and count caps — refused whole).
- lib/agent-attachments-fs: where the agent runs (box runner, Fleet Runner,
  or a local Loki), write each image to ~/.loki/attachments/<id>.<ext>
  (0600, outside any checkout) and swap the placeholder for its absolute
  path; a file that cannot be written becomes a sentence, never a token.
- tab-inject (Terminal composer): stageAttachmentsForAgent instead of the
  vision fold; dispatch/inject carry the images.
- Runner (poller inject + dispatch, command-validator): accept and
  materialize them before typing.
- Chat view: a message with a screenshot goes through the new
  /api/control/chat-send (verbatim inject; the keystroke lane has no room for
  a picture), replacing /api/control/fold-attachments.

Other dispatch paths (Control's orchestration run, /api/inject, feedback)
still describe images; they are not typed into a live terminal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(desktop): Fleet Runner 0.8.39 — screenshots reach the agent as image files

The runner now materializes attached screenshots (poller inject/dispatch),
so this change must reach machines, not only the box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 07:16:37 -07:00
CatoandClaude Opus 5.5 d0e7fa68a7 Feedback inbox as one view; a Claude conversation that finds its log; follow-ups and voice chat in Loki (#1027)
* feat(feedback): one integrated inbox instead of stacked widgets

/feedback on a phone read as "a bunch of random elements": a lone bordered
Studio requests button, two rows of pills, a line restating the chip just
tapped, three bordered cards with grey headers, and rows whose status, context
and buttons sat in different places and came in three heights and two fills.

- Lens: Needs you · Under way · Shipped as one segmented control with counts.
  One list shows at a time; it opens on the first lens that holds something.
  An empty lens links to the lens that has work, never a dead end.
- Filters: one line. Project chips scroll; source is a compact select; the
  loop's numbers and the Studio requests link share the line under the chips.
- Rows: same anatomy for every phase. Context (status · project · page · who ·
  age), message, one "why" line, then an action bar of one height: the labelled
  decision leads, icon utilities (note, resolve, archive) sit at the trailing
  edge. Under-way Resolve becomes an icon; "What changed" becomes a link on
  the agent's line. The "Watching this run" strip is gone, because the Watch
  panel already holds Terminal and Chat.
- Dead .ui-inbox-fold rules removed; the fold now uses .ui-fb-fold.

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

* fix(terminal): the Claude conversation finds its log; a calmer phone chat

The /terminal conversation view sat on "No conversation from this session
yet" for sessions that were plainly running.

- Runner (0.8.38): claudeProjectSlug now matches Claude Code — every
  non-alphanumeric becomes "-", not just "/" and ".". Workspace and worktree
  names may contain "_", and for those the transcript stream, the usage
  collector and the auth canary all looked in a folder that never exists.
  Slugs past 200 chars (Claude truncates and hashes them) match on prefix.
- Runner: when it has the session but Claude has written no log, it says so
  once (an empty frame). The view tells apart "builder never answered",
  "Claude hasn't started here" and "nothing said yet", each with its own
  next step; the composer stays live in all of them.
- Answers in the Claude conversation get the same row as Loki's chat: Copy,
  Listen and — where the phone has a share sheet — Share (AnswerActions,
  shared with MessageTurn).
- Phone chrome: the Profile/Chat/Control/Terminal strip and its repeated
  project name are hidden on /terminal below md (the one-line header names
  the session); the agent chip drops in conversation view so the session name
  is readable; the Loki button says "Loki", not a second "Chat".

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

* feat(loki): suggested follow-ups and a hands-free voice conversation

Two things the reference chat apps have and Loki's chat did not.

- Suggested follow-ups: after an ordinary answer that ends the thread, up to
  three "↳ Make it longer" rows; a tap sends one as the next message.
  POST /api/loki/follow-ups asks the fast model once (feature
  "chat-follow-ups"); a slow or failed model answers [] and nothing shows.
  lib/loki/follow-ups.ts parses whatever comes back (numbering, bullets,
  quotes, a JSON array, a preamble) into clean tap targets — tested.
- Talk: a filled pill beside the composer's controls (only while the box is
  empty — the mic beside send still dictates). It opens a full-screen voice
  chat: listen until you pause, send what you said through the normal send
  path, read the answer aloud, listen again. The mic is closed while the
  answer is read, so the phone never answers itself; a failed turn goes back
  to listening rather than to silence; 20s of quiet pauses it. Endpointing
  (lib/loki/voice-turn.ts) works on waveform RMS against an adaptive noise
  floor and ends a turn only on a pause AFTER speech — tested. Transcription
  is the composer's own server leg (/api/control/transcribe).

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

* fix(loki): voice chat passes lint — no setState in an effect body, workspace under its line cap

The answer that arrives during a voice turn is read aloud from a deferred
callback rather than the effect body (react-hooks/set-state-in-effect), and
the voice screen takes the hook's state whole, so LokiWorkspace drops back
under its 510-line max-lines-per-function ratchet.

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

* fix(loki): answer first, never a wall of projects; thumbs-down files feedback

From the owner's phone: "This all is making it unworkable. Flow should be
easy and enjoyable." A plain message ("let's keep improving this interface")
came back as "Which project should I run that on?" over seventeen two-column
project tiles, and the thread title ran across the back arrow.

- Loki always answers. When the message also reads like work, the answer
  carries one closed line under it — "Run this on a project…" (or "No
  project called X — run this on another…") — which opens the picker only
  when tapped. The blocking needs-project turn is gone; older threads that
  contain one still render it.
- The picker is small wrapping chips, not 44px tiles in a grid.
- Thread header: the title truncates instead of overflowing both edges (a
  centred flex child is as wide as its text, so `truncate` never engaged).
- Thumbs-down under Loki's answers: one optional line on what was wrong,
  then Send. POST /api/loki/answer-feedback files it into Loki's own project
  (FEEDBACK_WIDGET_TOKEN, where the dogfood widget files), with the question
  and answer attached so it reads on its own in /feedback, and the reporter
  recorded so it shows in their /my-feedback. Not on the Claude Code
  conversation, which is not Loki's answer. Says plainly when the token is
  not provisioned. Report text: lib/loki/answer-report.ts, tested.

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

* fix(feedback): scale widths, not arbitrary ones, in the row context line

max-w-48 / max-w-40 are the same 12rem / 10rem on Tailwind's scale; the
arbitrary values raised design-principles' one-off-layout ratchet.

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

* fix(loki): answer report takes optional note/question, as the route sends them

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-03 04:24:15 -07:00
CatoandClaude Opus 5.5 88c08a70cb Claude Code as a phone conversation, texting-app chat, operator-only OpenClaw, one task to several projects (#1024)
* feat(control): one task, several projects — write a cross-repo task once

A change that spans repositories ("make it so I can post prompts in
OrangeCat and Loki") had to be pasted into each project separately, and
each agent then tried to build the whole thing in its own repo.

- lib/multi-project-dispatch.ts fans one task out through injectPrompt
  (same routing, serialisation, tracking as /api/inject). Names resolve
  before anything is sent; an unknown name refuses the whole task and
  lists the projects that would have worked.
- lib/multi-dispatch-prompt.ts: with 2+ projects each agent is told who
  else got the task, which part is theirs, and to write down any
  cross-repo contract it assumed.
- POST /api/inject/multi (session / agent token).
- POST /api/orangecat/task: signed OrangeCat rail, runs as the Loki user
  linked to the actor, 409 with the next step when unlinked.
- Control: select projects on the rail -> "Send a task" opens the shared
  Composer; a partial send keeps the draft and retries only the refused.

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

* fix(loki): the operator's OpenClaw agent and personal session are the operator's alone

Loki is multi-user with open sign-up, but three paths let any signed-in
account reach the instance operator's private agent:

- ask_openclaw (a `read` tool every user's tool loop advertised) queried
  the operator's OpenClaw agent, which remembers their Telegram and
  WhatsApp threads.
- The gateway fallback ran for every user whose tool loop failed, with
  the operator's gateway token at operator.write scope.
- LOKI_PERSONAL_SESSION_KEY put every user's "Ask Loki" into the
  operator's personal session.

Now: tools can be marked operatorOnly and runLokiTurn drops them unless
operator === true (fail closed); askLoki resolves "operator" from the
account (users.is_default) — never from a caller option — and only then
may fall back to the gateway; the personal session key applies to the
operator's account only. Everyone else keeps the shared chain and their
own per-user thread.

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

* feat(loki): a texting-app chat on phones

On a phone the chat got about a fifth of the screen: the app top bar, a
second row of two icons, a "save this exchange" row, a row of starter
chips, a four-row composer and the bottom tabs. Now:

- An open conversation takes the whole phone (useImmersiveChat hides
  the app top bar and bottom tabs below md). Its own ThreadHeader is one
  line: back to chats, the title with the project scope under it, and a
  menu (New chat, All chats, Projects).
- Your messages are neutral bubbles, answers are plain 16px text, and
  copy/retry are icon-only 44px targets on phones.
- The composer is one rounded card: words first, then one row —
  attach · model · project on the left, mic beside send on the right.
  The project pill sits inline (tap to change, × to drop) instead of a
  header row, the builder badge is a coloured dot on phones, and starter
  chips stay off phones mid-conversation. chatkit's stylesheet is
  unlayered, so these overrides are unlayered too (a rule inside @layer
  components silently loses to it).
- "Save this exchange to a project" scrolls with the thread instead of
  holding a fixed row.
- The start screen is a messages inbox — round initials, title + time,
  project under it, eight deep. It used to hide recent chats on every
  phone because the desktop rail's pin (on by default) was treated as
  "the rail is visible", so Back from a thread landed on nothing.
- On the start screen the chat's own two icons render inside the app
  top bar's empty left half (TopbarSlot) instead of a second header.

Checked at 320/390 in light and dark: no horizontal overflow, send
never pushed off (model and project pills give up width first).

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

* feat(terminal): Claude Code as a conversation on your phone; a model sheet that reads like one

/terminal showed a Claude session only as its PTY — answers as 80-column
TUI cells, unreadable on a phone. Claude Code already writes the same
conversation as structured data, so now it is shown as one.

- lib/claude-transcript.ts (pure, tested): Claude Code's session JSONL
  → user / assistant / tool items. A tool's result lands on a later line
  and updates its row in place; harness noise, sidechains and meta lines
  are dropped; results are previews, never whole files. Consecutive tool
  calls fold into one line ("Ran 2 commands, edited a file"), and a live
  one says what is happening now ("Running git push").
- Runner (desktop 0.8.37): transcript-streamer.ts follows the newest log
  for the folder the agent was launched in, reading only appended bytes
  with fs/promises on a 1s timer, and only while someone watches — it
  rides peek_start/peek_stop.
- Server: POST /api/control/transcript-frame (runner token) and
  GET /api/control/transcript-stream (session). The server keeps the
  latest conversation per (user, tab), so a phone that slept repaints at
  once.
- ClaudeChatView: bubbles, readable answers, folded tool runs you can
  open, an animated status line while Claude works, Allow / Always / Deny
  when Claude may be asking, and a composer that types into the same PTY
  (bracketed paste, so newlines do not send early). Stop is Esc; once you
  type mid-run the slot becomes Send and Claude Code queues it. Chat is
  the default view; the raw terminal is one tap away (header icon on
  phones, "Chat" in the desktop pane chrome) and agents that write no
  Claude log always get the terminal.
- Model picker: a bottom sheet on phones — plain names, one line on what
  each is for, a check, locked rows saying why in words.
- Fix: the chat model you picked never reached the chat turn (askLoki had
  no model; runLokiTurn always started at LOKI_MODEL). It now sets where
  the free chain starts. And it is no longer handed to dispatched project
  agents, which were being launched with a Groq/OpenRouter model id.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-03 01:56:24 -07:00
CatoandClaude Opus 5.5 9747207038 fix(runner): a working Claude is not reported as silent; fresh launches close dialogs (#966)
* fix(runner): a working Claude is not reported as silent; fresh launches close dialogs

Petvity, 2026-09-28: two dispatches failed with "claude opened on this
computer, but produced no response" while Claude was logged in, well
inside its limits, and working normally in a terminal on the same account.
The runner's only evidence for "no response" is Claude's own status file
(~/.claude/sessions/<pid>.json) staying idle for ~22s, matched to the
workspace by folder path. Three gaps, all closed here:

- claudeLiveSessionForDir compared paths as strings. Claude records its
  cwd as the kernel reports it (symlinks resolved, no trailing slash); the
  runner holds the path it was handed. One folder spelled two ways meant no
  session was found, the check fell back to a guess, and a working Claude
  was NACKed. Both sides are now compared by realpath as well as as given.
- The dialog dismissal added after Farmhouse (2026-09-26) ran only for an
  already-live session. A freshly launched Claude can open on a dialog too;
  the prompt then answered the dialog. The launch path now closes it first.
- The generic failure now quotes the last lines the CLI drew
  (screenExcerpt), so the next unexplained failure says what Claude was
  showing instead of leaving the operator to guess.

Tests: claude-dialog-not-a-composer (symlink, trailing slash, subfolder,
other folder; fresh-launch dismissal; the excerpt strips escapes and
borders and stays short). Unit suite 296/296, tsc clean, check:desktop ok.

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

* chore(desktop): Fleet Runner 0.8.36 carries the silent-Claude fix

The runner change touches desktop/, so it needs a version the release
workflow can publish, or it lands on the server and on no machine
(desktop-release-drift). 0.8.36 with its FLEET_RUNNER_RELEASES entry.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-09-28 14:54:24 -07:00
CatoandClaude Opus 5.5 3af2fec589 fix: what the Farmhouse end-to-end test broke — Live link, stuck Claude dialog, owner wording (#938)
* fix(sites): a site that goes live after registration is recorded, and its owner told

Registration wrote the live URL only if the site answered at that moment.
Farmhouse's first deploy failed, a later one succeeded, and nothing looked
again: no live URL, a Live link that opened the OrangeCat listing, and no word
to the owner. An hourly check (and the owner opening the project page) now
asks the same question registration asks and, the first time the answer is
yes, sends the owner their link that readies the widget.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs(telemetry): six crons run hourly now that check-site-live does

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(runner): a Claude session showing a dialog is cleared before a prompt is sent into it

Farmhouse's parked session sat on Claude Code's "Teach auto mode about your
environment?" dialog. The owner's widget note was injected into the dialog,
nothing ran, and the run was NACKed 33s later while the widget said "On it".
Claude reports this itself ({status: waiting, waitingFor: "dialog open"}); the
runner now presses Escape and, if the dialog stays, starts a fresh session.

Also: on the box every live-session lookup used the dispatch's laptop path,
which no session has, so the generation check fell back to guessing from
screen activity. They now use the folder the agent really runs in, and the
reader accepts current CLIs' updatedAt.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* feat(widget): owner mode reads as the owner's, and the agent is told the owner asked

The widget no longer asks the owner for a name/email and says what happens
("Your site: what you say here gets built and goes live"). The agent's brief
now opens with "The owner of <project> asked for this change" instead of
"Fix this visitor feedback" — still fenced as text from a browser.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* chore(desktop): 0.8.35 — ships the dialog-clearing runner fix to Fleet Runner too

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* docs(changelog): Fleet Runner 0.8.35

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-26 04:27:44 -07:00
CatoandClaude Opus 5.5 10b1f3a082 fix(orchestration): a runner restart closes the runs its sessions were serving (#917)
The runner now reports bootedAt (process start, captured once) on every
runtime-state post. Runs on that runner's channel whose agent session was
live before the boot (claimed/launched/submitted/generating/progress event
older than bootedAt), with nothing heard since and no un-acked command, are
closed at once with the restart named, instead of reading 'waiting' until
the hourly reaper. Only-dispatched runs are left for the new runner.

Verdict matches the reaper's (partial on handoff, else timeout) so the same
repo-evidence correction upgrades runs that had already pushed work.
Fleet Runner 0.8.34.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 09:09:03 -07:00
CatoandCursor f2f6206bcf fix(projects): truthful cloud presence + project header state/actions (#912)
* fix(projects): tell the truth about cloud presence and separate header state

Box-runner heartbeats as cloud but could register bridge presence as local,
so /terminal said Cloud offline while the journal shipped work. Infer cloud
from box-* versions, force the channel in box-runner, and scope the terminal
honesty chip. Project header now shows listing/live as status, not peer links;
catalogue invite waits until kickoff/build is idle.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(desktop): bump Fleet Runner to 0.8.33 for presence-channel fix

desktop/bridge-subscriber changed so box-* runners register as cloud; the
release-drift gate requires a version bump and changelog entry before merge.

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-25 05:29:46 -07:00
CatoandClaude Opus 5.5 49553dadec fix(runner): stop killing working agents — quota NACK read our own prompt, drain waited on idle CLIs (#898)
Two defects hit one Skif dispatch on 2026-09-25, and either alone loses work.

1. The dispatch was NACKed "claude cannot generate because its usage limit
   is exhausted" 14s in, while Claude was visibly working on the brief. The
   capacity check scanned the WHOLE PTY buffer with a topic-word regex
   ("rate limit", "credit", "context window"), so the echoed prompt, the boot
   banner or a file the agent printed read as a quota wall. Now it reads only
   what the CLI printed after the injection, ignores lines that are just the
   prompt echoed back, and for Claude defers to its own session status: a
   session still generating has not hit a wall.

2. Two minutes later the box runner restarted and killed every session. The
   post-deploy drain waited for agent processes to EXIT, and interactive CLIs
   never exit, so it always ran to its 30-minute cap and then killed whatever
   had started most recently. It now counts agents that are WORKING: an idle
   Claude does not hold the restart; generating, waiting mid-task, or any
   status it cannot read does.

Fleet Runner 0.8.32 (desktop/ changed, so it ships as a release).
Tests: terminal-run-view (echo vs real wall, mutation-checked) and a new
test-drain-and-restart-runner.sh (18 checks, four mutations each caught).

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-25 01:14:22 -07:00
CatoandClaude Opus 5.5 9c94a0f20c fix(desktop): ship 0.8.31 with the vulnerable transitives pinned to patched versions (#893)
All of desktop's advisories sit in desktop/package-lock.json with no direct
dependency to bump, so Dependabot never proposes a fix. desktop is NOT part of
the pnpm workspace (that covers packages/* and bridge), so it takes npm
`overrides` in its own package.json.

Five pins, each the advisory's own first_patched_version and bounded to one
major (^0.8.15 on @xmldom/xmldom stays inside 0.8.x). nanoid is not in GitHub's
alert list -- `npm audit` finds it locally -- so the dashboard count understates
the exposure. `npm audit`: 0 vulnerabilities.

The bump to 0.8.31 is required, not cosmetic: desktop code reaches a machine
only when a fleet-runner-v* tag is minted from this version, so pins without a
bump would stay on the server and on no machine. desktop-release-drift.ts
enforces that and the matching FLEET_RUNNER_RELEASES entry.

Redo of loki#803, closed 2026-09-23 as a stale draft. Main moved to 0.8.30 in
the meantime without these pins.


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

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 22:50:34 -07:00
a1e81da2d8 chore(desktop): land three stranded dependency bumps as one release (#827)
* chore(deps): bump the minor-and-patch group across 1 directory with 3 updates

Bumps the minor-and-patch group with 3 updates in the /desktop directory: [@sentry/electron](https://github.com/getsentry/sentry-electron), [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).


Updates `@sentry/electron` from 7.17.0 to 7.19.0
- [Release notes](https://github.com/getsentry/sentry-electron/releases)
- [Changelog](https://github.com/getsentry/sentry-electron/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-electron/compare/7.17.0...7.19.0)

Updates `@types/node` from 26.4.0 to 26.6.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `vite` from 8.2.2 to 8.3.0
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/create-vite@8.3.0/packages/vite)

---
updated-dependencies:
- dependency-name: "@sentry/electron"
  dependency-version: 7.18.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: "@types/node"
  dependency-version: 26.5.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: vite
  dependency-version: 8.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore(desktop): land three stranded dependency bumps as one release

Takes #713 (@sentry/electron 7.17.0 -> 7.19.0, vite 8.2.2 -> 8.3.0) and #619
(js-yaml 4.2.0 -> 4.3.2, transitive) and ships them together as
fleet-runner-v0.8.30.

WHY THEY WERE STUCK, and why the gate was right

Each was red on desktop-release-drift, which refuses a change that reaches a
machine unless `desktop/package.json` is ahead of the last released tag and
`FLEET_RUNNER_RELEASES` has the matching entry. Desktop code does not ship
itself: without the bump, a merged change is live nowhere and `git log` looks
healthy anyway. Dependabot cannot know to do that, so every desktop bump it
opens is born red.

That is the gate working. The failure was upstream of it: the auto-merge sweep
had deadlocked (fixed in fleet#123 today), so nothing surfaced them either.
#619 had sat since 2026-09-11, #713 since 09-14.

ONE RELEASE, NOT THREE

Merging the PRs separately would mint three runner releases for what is a
single maintenance update, and every operator would see three identical-looking
updates. Combined here so the version moves once.

js-yaml is a lockfile-only (transitive) bump, so it is spliced into the merged
lockfile rather than reformatting the file wholesale.

NOT INCLUDED: #524 (electron 43.4.1 -> 44.3.0). A major Electron bump replaces
the Chromium and Node inside every installed runner, and a green build proves
it packages, not that it runs. That deserves its own change with a real smoke
test, not a ride-along in a maintenance commit. Closing it; dependabot will
re-raise at a current version (44.4.3 today).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-22 01:00:33 -07:00
CatoandClaude Opus 5 a02d31d996 Every public claim matches the code, and two gates can now fail (#802)
* fix(truth): every public claim now matches what the code and the licence say

The /license page forbade what LICENSE grants. #791 relicensed the repo to MIT
and fixed LICENSE, the README and the Terms — but missed the page, which still
said "source-available", listed hosting and repackaging under "you may not",
and promised a replacement licence that had already shipped. On a public repo,
that revoked rights we had granted.

Same shape, five more places:

- Three live /thoughts pages and four front-matters carried "Mao Nakamoto",
  the retired identity, into the rendered byline and the OG social card.
- legal/ named that identity as operator, data controller and IP assignor, and
  assigned the work to bitbaum AG / orangecat GmbH / loki GmbH — none of which
  were ever incorporated. Rewritten as a record of authorship and the MIT
  grant, which is what is actually true.
- The desktop About dialog and the installer copyright metadata shipped
  "© 2026 Mao Nakamoto" in every build. No audit pass had looked there.
- /pricing and the feedback-widget docs said the report loop "closes itself"
  months after close-loop.ts deliberately removed auto-resolve for being
  untrue; resolve is an operator act and has zero call sites.
- /roadmap claimed signed installers under "Shipping now"; no signing secret
  exists and /download says the opposite two pages away.
- /releases claimed "every shipped version" while missing nine, and listed a
  0.8.25 that was never tagged — its "Binaries →" link 404'd. Removed per the
  file's own rule: one entry per tag pushed to loki-releases.
- desktop/README pointed all five install commands at bitbaum/loki, which
  404s; releases publish to loki-releases. Version pin replaced with a glob so
  it cannot rot again.
- DEFAULT_USER_NAME greeted nameless OAuth users as "Mao".

And the two that lied to agents rather than users: CLAUDE.md claimed pre-push
runs the full verify bundle so "green locally means green in CI", and
AGENTS.md claimed pre-commit runs tsc. The hook's own header documents why it
stopped doing both — a docs-only push runs nothing. An agent trusting either
line would skip the verification it needed.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix(gates): close the two gaps that let deleted things keep passing

Two gates could not fail, and one migration ledger had silently drifted.

MIGRATION JOURNAL — 13 files missing, next db:generate breaks the deploy.
drizzle/ held 78 .sql files; meta/_journal.json had 65 entries. Production
was fine and always had been: apply-schema.sh globs the directory and keeps
its own _deploy_schema_history, so it never reads the journal. But
drizzle-kit does, and its newest snapshot was 0072 — so the next generate
would re-emit 0073-0077, including CREATE TABLE "calendar_busy" with no
IF NOT EXISTS. apply-schema.sh rewrites ADD COLUMN only, and the batch is one
transaction, so the deploy would abort on a change unrelated to it.

Reconciled to 78 via bootstrap-migration-ledger.ts --write-journal, and added
scripts/test/migration-journal-coverage.ts so it cannot drift again: files vs
journal in both directions, plus idx contiguity. Proven by mutation — drop one
entry and it exits 1; restore it and it exits 0.

SMOKE — every authenticated probe passed whether or not the route existed.
The auth middleware answers 401 before routing, and check_route accepted 401
for everything in AUTH_API_ROUTES. Measured: /api/definitely-not-a-real-route
returns 401 exactly like /api/orgs. So the list proved nothing, and
/api/checkout/personal sat in it for 15 days after the Stripe rail was
removed. A 401 now only passes if a route file actually resolves on disk
(dynamic and catch-all segments included); the dead entry is gone, and all
remaining probes resolve.

Also: bumping desktop/package.json to 0.8.29, because the retired-identity fix
in the previous commit touched desktop/src/main/index.ts and desktop-release-
drift.ts correctly refused to let a shipped file change without a release to
carry it. That gate was right and is the model for the two above.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-20 08:40:34 -07:00
Cato f4164a6f67 fix(runner): make Terminal and provider status truthful (#755)
* fix(terminal): stop claiming dead sessions are generating

* fix(runner): report provider quota walls honestly

* docs: define Loki's working product contract

* fix(runner): replace stale provider PTY on retry

* fix(control): route provider switches to project runner

* fix(terminal): keep Watch on the dispatched runner
2026-09-16 23:21:21 -07:00
Cato 8034cb629b feat(feedback): add reporter tracking and project editors (#754) 2026-09-16 22:21:59 -07:00
Cato 43c6bb44af fix(runner): make feedback dispatch observably start (#745) 2026-09-16 11:54:30 -07:00
CatoandClaude Opus 5 a78b4b1e9a fix(runs): a fast task closes its run — delivery is stamped at injection, not at the ack (#720)
* fix(runs): a fast task closes its run — delivery is stamped when the prompt lands, not when the runner acks

The e2e health probe did everything right and its run never closed. The
agent was injected at 05:12:55, wrote `status: ready` at 05:13:06, and the
runner acked at 05:13:11 — because between injecting and acking it spends up
to eight seconds (plus retries) checking that the agent is actually
generating. `deliveredAt` was stamped at the ack, and closeRunFromSession
requires the handoff to POST-DATE delivery, so the run's own handoff read as
stale. It sat `waiting` until the hourly reaper called it a timeout.

Every task shorter than that check hits this, which is every health probe and
most one-line fixes — the runs most likely to be used as proof that the loop
works.

The runner now records the moment of `injectPty()` and reports it in the ack;
the server prefers it (`deliveryStampFor`) within bounds that keep the floor
honest: never before the run was created (60s of clock slack), never in the
future, otherwise the ack time as before. Tested on the verbatim timings above.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh

* chore(desktop): ship the delivery-stamp fix as Fleet Runner 0.8.25

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-14 23:18:42 -07:00
CatoandClaude Fable 5.1 3abdd4b7ea chore(desktop): ship the rename as Fleet Runner 0.8.24 (#696)
desktop/ changed in the rename, and the drift gate refuses a desktop change
that does not carry a new version — merging one leaves it on the server and on
no machine. Bumped, with the /releases entry that the same gate requires.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:24:23 -07:00
CatoandClaude Fable 5.1 95c40a9cd8 refactor: rename the product from FleetCrown to Loki (#695)
The product, its assistant, the repo, the host and every unit on the box now
share one name. 638 files, ~3,000 mentions: UI copy, config, env keys
(FLEETCROWN_* -> LOKI_*), systemd units (fleetcrown-* -> loki-*), docs,
articles, the deploy workflow other repos reuse, and nine file names.

- Three article slugs carried the old name and had been shared; permanent
  redirects keep those links alive (next.config.ts).
- test-no-retired-name.sh now also forbids the old product name across the
  whole repo, so the rename cannot creep back through templates and examples.
- ASSISTANT_STACK collapses the product and the assistant into one entry,
  because they are now the same name.

Infra was cut over ahead of this merge: /opt/loki, loki-* units, the `loki`
database and role, loki.orangecat.ch (old host 308s to it; /api, /widget,
/embed keep proxying), GitHub repos bitbaum/loki and bitbaum/loki-releases.
The Resend sending domain stays fleetcrown.orangecat.ch until the new domain
is verified in DNS.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-13 16:13:10 -07:00
CatoandClaude Opus 5 f637036f17 feat(feedback): say WHY the agent is quiet, not just that it is (#679)
* feat(feedback): say WHY the agent is quiet, not just that it is

George dispatched a fix at 15:45:29. The first output arrived at 15:58:43 —
thirteen minutes later, and only because he opened a terminal by hand and
found the agent sitting at a Claude sign-in. The row said "the agent never
reported any output". True, useless, and the reason was ten seconds away.

Silence has two meanings and the operator can only act on one. "Thinking" is
nobody's problem; "waiting for a human" is theirs, right now. The runner could
already tell them apart — detectAuthFailure reads the transcript for a 401 or a
/login notice — but it only ever asked ONCE, inside an 8-second window at
inject time. That run passed the check and then went quiet, and nothing looked
again.

The heartbeat is the thing that watches the terminal for the whole run, so it
is where the question belongs. After 90 seconds of no output the runner asks,
and the answer rides the next beat; the route stamps payload.blocked and emits
one `blocked` event per stretch; the row reads "Needs you to sign in" with
Watch opening the terminal where you answer it. 90 s is chosen so the reason is
ready BEFORE the ten-minute mark forces the row to say something.

One subtlety worth the test that pins it: a blocked agent prints nothing, so
the "no output, no beat" rule would have suppressed exactly the beat carrying
the reason. Silence WITH a reason is now the message — still one beat per
window.

detectAuthFailure moved to desktop/src/main/agent-auth.ts: the poller starts the
heartbeat, so importing it back would have been a cycle.

163/163 unit files, lint, check:desktop, prettier green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore(desktop): 0.8.23 — the runner says why a quiet agent is quiet

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-12 10:53:41 -07:00
CatoandClaude Opus 5 a58fbb4b15 fix(runner): refuse a dispatch whose workspace is not on this machine (#614)
* fix(runner): refuse a dispatch whose workspace is not on this machine

The box clones on demand; a laptop Fleet Runner does not. Handed a project
whose dirPath exists only on the box, it launched claude in a directory that
does not exist and reported "inject did not stick" three times while the box
sat idle (2026-09-10). Routing now locks box-rooted projects to the cloud;
this is the runner's own refusal for any command that still arrives, so the
ack names the real cause instead of a guess.

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

* chore(runner): 0.8.22 — the workspace refusal reaches machines

The drift gate is right: a desktop/ change that is meant to reach laptops
needs the bump that says so. Adds the changelog entry for the refusal.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0118cLNxoB3dt2w74vU1PH6w

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 04:42:47 -07:00
CatoandClaude Fable 5.1 b7b26df120 feat(feedback): the row shows the work happening — runner heartbeat, Working · N min, Watch into the terminal (#632)
* feat(feedback): the row shows the work happening — runner heartbeat, Working · N min, Watch into the terminal

Between 'submitted' and 'closed' a run wrote nothing anywhere, so Feedback
read a busy agent as Queued and, from minute ten, as Not running. The box
runner owns the agent's PTY and sees every byte; it now beats
PATCH /api/control/runs/:id/progress (at most every 45 s, only when the PTY
printed) and the cloud stamps payload.lastProgressAt + a 'progress' event.

deriveFeedbackWork reads the heartbeat: fresh = 'Working · 47 min' for as
long as the run takes; gone quiet = 'Stalled' with how long it worked and
how long it has been silent; never any = 'Not running' after 10 min measured
from delivery. Every delivered phase is watchable, so the row's button is
'Watch' into /terminal?project=… whenever a PTY exists, and 'Open on
Control' only while Queued.

A project with no repository and no folder gets 'Connect a repository'
instead of Implement, and the dispatch route refuses the same case with a
422 that says what to do — the Annushka failure class, closed at the source.

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

* fix(control): Watch follows the same watchable rule as the Feedback row

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

* chore(desktop): 0.8.21 — Fleet Runner reports run progress while the agent prints

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

* docs(changelog): Fleet Runner 0.8.21 — run progress heartbeat

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 03:12:09 -07:00
CatoandClaude Fable 5.1 6e6ca0bc7a docs(cloud-primary): nothing left that describes the old substrate — docs, marketing, comments, focus_tab (#631)
* docs(cloud-primary): nothing left that describes the old substrate — docs, marketing, comments, focus_tab

The cloud-primary series (#615 routing, #618 OrangeCat auto-kickoff, #624
Fleet Runner 0.8.19, #630 web PTY-only) changed what the product IS. This
sweep makes every surface that describes it say so, so neither an agent
reading the repo nor a person reading the site is told about zellij tabs,
presence-based routing, a cold-start restore, or a handoff that "starts
nothing".

Inventory-driven (≈105 doc lines, ≈30 user-facing strings, ≈22 code
comments, 2 repo-level items), not a grep-and-replace:

User-facing
- /download prerequisites: the "Zellij — bundled" card is gone; copy says
  each agent runs in a terminal Fleet Runner owns.
- Quickstart, license page, executor copy (cloud is the default; "This
  computer" is a per-project choice under Runs on), marketing pillars,
  whitepaper (owned-PTY design, "where a project runs is a decision, not a
  guess", ZSH typing-guard section deleted), Control terminal panel strings
  (components renamed LiveTerminalPanel / LiveTerminalRows), peek drawer
  copy, GitHub release notes for 0.8.19, repo description + topics.

Agent-facing
- README, CLAUDE.md, AGENTS-adjacent SSOTs: cloud-local-workflows.md now
  states the stored routing rule; priority plan closes B6; multitenancy plan
  routes by builder_pref; HANDOFF.md staleness table + terminals section;
  the 2026-09-10 cold-start handoff gets a dated "superseded" section; the
  two shipped proposals (fleet-runner-pty-ownership, desktop-app) carry a
  status banner; home/README describes the eight modules that exist;
  desktop/README describes 0.8.19; roadmap seed marks the migration done;
  box-runner unit and log drop FLEETCROWN_RUNNER_PTY; 22 code comments.

Code (one coherent retirement)
- focus_tab is removed from the pending-command contract, the desktop
  validator and poller, enqueueTabCommand's type, the validator test and the
  failure classifier (START_SESSION | RETRY). The runner had rejected it
  since 0.8.19; now it cannot be enqueued at all.

Verified: tsc, eslint, 148/148 unit files, 130/130 home self-tests,
check:desktop (typecheck + build).

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

* chore(desktop): 0.8.20 — the focus_tab retirement touches desktop/, so it ships as a release

The release-drift gate is right: a desktop change without a bump goes red on
main once the next tag is minted. 0.8.19's changelog date is corrected to the
release's real publishedAt.

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

---------

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 02:41:20 -07:00
CatoandClaude Fable 5.1 5990c3fe68 feat(runner): one substrate — Fleet Runner owns every agent PTY, zellij is gone (#624)
The "Could not bring zellij up" toast fired on every Fleet Runner boot. It
came from a cold-start that could not work: `restoreFleetOnBoot` fetched the
user's last runtime snapshot — whichever channel pushed last, so on the laptop
it got the box's fleet with `/home/ubuntu` paths — wrote a zellij layout for
it, and spawned `zellij --session fleet --layout` detached with no TTY. A
zellij client needs a terminal to bring up its server; probed three ways on
2026-09-11, that spawn never produced a session, every time. The toast said
"Open Settings to retry"; Settings had a Restoration section that the desktop
never read (autoRestore hardcoded true) and no retry.

Since 0.8.3 the owned PTY was the default with zellij kept as the fallback for
tabs it could not find. The fallback is where every stuck dispatch ended:
"no zellij tab with that name in any active session" (2026-09-10 21:08, an
inject into Heidi), a keystroke typed into "Tab #9", a session spawned that no
terminal could show. This release deletes the fallback instead of hardening it
a fourth time.

Runner:
- poller: inject requires a live owned PTY and fails loudly otherwise (the
  cloud enqueues a DISPATCH for a project with no session, so a miss is a
  real error); launch/dispatch/switch own the PTY with no fallback; close and
  peek answer from the PTY or say there is none; focus_tab is retired;
  install_cli runs the installer in an owned PTY; the zellij session/tab
  helpers, the pre-flight `ensureSessionForCommand`, the ETIMEDOUT
  translation, and FLEETCROWN_RUNNER_PTY are gone.
- pusher: open tabs are the owned PTYs; pane records no longer join through
  ZELLIJ_PANE_ID or stamp a session name.
- index: no cold-start on boot, no bundled-binary PATH prepend, no zellij in
  the prerequisites scan; peek-tab reads the owned buffer.
- desktop/scripts/download-zellij.mjs and the prebuild download are deleted.

Web (the pieces that existed only for the cold-start):
- /api/control/runtime-state/desired (cross-channel snapshot read) deleted.
- Settings → Agent → Restoration (FleetLifecycleSettings + its API) deleted;
  the users.fleet_settings column stays (migrations never DROP) and is unread.
- src/lib/zellij-bootstrap.ts and zellij-layout-generator.ts deleted.

Fleet Runner 0.8.19; changelog entry written for the person who installed it.


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

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 02:12:33 -07:00
Cato 9b33aec49e Fix feedback loop with durable agent sessions (#541)
* fix(feedback): resume durable agent sessions

* chore(desktop): release Fleet Runner 0.8.18

* fix(ci): restore complete desktop lockfile
2026-09-09 08:48:24 -07:00
11210882f8 fix(desktop): release 0.8.17 so dependabot's lockfile change reaches machines (#484)
main is RED and the merge queue is stopped. Not from a code defect — from a
release gate doing exactly its job.

Dependabot's @types/node bump (#411) edits desktop/package-lock.json, which
determines what gets BUILT into the runner. Nothing bumped desktop's version
alongside it, so desktop-release-drift correctly reports "1 file changed since
fleet-runner-v0.8.16, version still 0.8.16" — a change that would live on the
server and on no machine at all. That is the failure the gate was written for,
after six commits went missing at v0.8.12.

Because the sweep only merges onto a green base, this blocked every open PR,
none of which had anything to do with it.

Worth naming the shape, because it will recur: a dependency bot can trip a
release gate, and its PR can never carry the bump itself — the bot does not
know the repo ships a desktop binary. So the bump always lands afterwards, from
a human or an agent, and until it does the whole queue is stuck behind a red
main. Nothing here changes behaviour; the release exists so the lockfile ships.

pnpm run verify passes.


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

Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-04 12:51:17 +00:00
dependabot[bot] a79cc14089 chore(deps-dev): bump @types/node (#411)
Bumps the minor-and-patch group with 1 update in the /desktop directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node).


Updates `@types/node` from 26.2.0 to 26.4.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-04 12:27:07 +00:00