Commit Graph
11 Commits
Author SHA1 Message Date
CatoandClaude Sonnet 5.5 59cd3e7b10 feat(terminal): a plain shell on the builder, operator-only behind the PIN (#1449)
* feat(terminal): a plain shell on the builder, operator-only behind the PIN

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

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

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

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

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

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

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-27 20:14:13 +01:00
CatoandClaude 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 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
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 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 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
GandClaude Opus 5 caa0e41c3b chore: add a formatter (#449)
* chore: add a formatter, matching the style this repo already writes

singleQuote=false was chosen by counting this repo's own
imports, not by fleet decree. The fleet is genuinely split and the two repos
that already had a .prettierrc disagreed with each other, so there was no
standard to restore. Quote style does not cross repo boundaries; having a
gate does.

Markdown is ignored for now — prettier rewraps prose, which would bury the
real diff.

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

* style: format with prettier (1062 files)

Mechanical. No behaviour change. This SHA is listed in
.git-blame-ignore-revs so `git blame` skips it.

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

* chore: teach git blame to skip the reformat

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

* fix(lint): reattach two guards the reformat detached

Both effects were one-liners, so a trailing eslint-disable-line covered the
setState call:

  useEffect(() => { setSelected(new Set()); }, [q.length]); // eslint-disable-line ...

prettier expanded the block. The comment stayed on the closing line while the
call moved above it, so the guard protected nothing and the rule its author had
deliberately silenced failed the build.

This is the second shape of the same defect — hirnli had the eslint-disable-NEXT-line
variant. Both come from the same fact: an eslint directive binds to a line
number, so reformatting can silently unbind it, which makes 'mechanical, no
behaviour change' false for any bulk reformat.

* chore(desktop): bump the runner version the reformat requires

desktop-release-drift enforces that anything built into Fleet Runner which
differs from the last released tag must carry a version ahead of that tag —
main read 0.8.15 and fleet-runner-v0.8.15 already shipped.

A whole-repo reformat changes bytes under desktop/, so the gate fires. The
alternative was adding desktop/ to .prettierignore, which would buy a quiet PR
by carving a permanent hole in the formatter's coverage — the precise shape of
silent drift this test was written to catch. Bumping is what the rule asks for
and costs one patch release whose only content is whitespace.

* chore: merge main and re-format

A whole-repo reformat conflicts with any concurrent commit, and a conflicting PR
runs no checks at all while reporting nothing. Conflicts resolved to main,
which is correct because this branch changes formatting and nothing else.

* chore: leave desktop/ out of this reformat

desktop-release-drift is right to refuse this. Everything under desktop/ is
built into Fleet Runner, so changing it means shipping: bump the version AND add
a FLEET_RUNNER_RELEASES entry, whose stated audience is 'person who installed
Fleet Runner and wants to know what changed'. For a whitespace-only build the
honest answer is 'nothing', so that release should not exist — and I should not
write release notes claiming otherwise.

I had bumped to 0.8.16 to get the gate green. That was the wrong direction:
publishing a build to three OS runners to keep a formatting PR quiet. Reverted.

desktop/ is excluded in .prettierignore with the reasoning recorded there, to be
formatted alongside the next real runner change, where the bump and the notes are
true anyway.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-31 09:23:30 +00:00
2a8559f65b feat(terminal): tabs tell the truth — project + live agent, launch in place (#252) (#261)
The terminal knew a tab was called "Tab #1" and nothing else. The runner has
been pushing full pane topology (tab, cwd, agentCli) in every runtime snapshot
all along; nothing joined it to the tab strip. Now /api/terminal/context does:

- Tab strip shows the resolved project name plus a badge naming the agent CLI
  actually running in that tab ("claude", "grok", "claude+codex"). Tab→project
  resolves by name first, then by pane cwd prefix against a project's dirPath —
  which also recovers `dir` for generically named tabs, un-breaking the agent
  switcher there.
- Empty state can start an agent instead of only telling you to go elsewhere.
  TerminalLaunch reuses /api/agent/launch with the same eligibility rule as
  Control (projects with a linked directory) and pins the builder channel you
  are looking at, so the session appears on the terminal you started it from.
- A ?tab=X deep link that matches no live session says so, instead of silently
  showing Tab #1 and letting you type into the wrong agent.
- box-runner reads its version from desktop/package.json (the code it actually
  runs). The systemd unit pinned box-0.8.9 across three releases, so Settings
  reported a version the box was not running. Env demoted to fallback; deploy
  ships desktop/package.json alongside the modules.

Co-authored-by: test <test@test>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 00:41:21 +00:00
Mao Nakamoto e6236c1dd6 fix: push box runner handoffs immediately 2026-07-16 12:19:04 +02:00
Mao NakamotoandClaude Fable 5 5fc3333f9a fix(control): fleet truth pass — honest hero, live janitors, actionable streaks
Dogfood session drove FleetCrown against production and found the fleet
had been silently dead for 2 days behind a green light:

- nudge-idle raw-queried beacon_settings WHERE mode != 'off', so users
  with NO row (missing row = default 'on') were invisible to the
  scheduler — autopilot dispatched nothing while the hero said
  'Autopilot on'. New SSOT getFleetAutopilotUserIds() decides
  enrollment for schedulers; missing rows count as on.
- The stale-run reaper only ran on /api/control page loads: 16 runs sat
  'waiting' for 51h until a human looked, then got stamped with
  fabricated 51h durations. New hourly reap-stale-runs cron reaps all
  users; finishedAt = startedAt + STALE_RUN_MINUTES (truthful).
- Hero headline was mode-derived ('Building' + pulsing green with 0
  working and 16/16 failed runs). deriveFleetPulse() (pure, tested)
  now derives Building / Waiting to dispatch / Stalled(+Review
  failures link) / Paused from live counts + latest outcomes.
- OutcomeStreak ✗ glyphs were unlabeled dead-ends; the streak now
  deep-links to /activity?window=week&project=<key>.
- box-runner logged 'connected · last poll 0s ago' every 2s to journald
  (~40k lines/day); now logs on state change + 15-min heartbeat.

Presenter tests 25/25 (6 new fleet-pulse cases).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 22:00:50 +02:00
Mao NakamotoandClaude Opus 4.8 b62e3aeb19 feat(runner): headless box-runner scaffolding (P1) — Electron-free core + entry
Make the desktop runner core runnable headless on the box. pusher.ts loses its
lone Electron dependency (app.getVersion() → FLEETCROWN_RUNNER_VERSION env, set
by the desktop in index.ts so its behavior is unchanged). scripts/box-runner.ts
is the systemd entry: reuses the EXACT desktop poller + pusher (claim → execute
in owned PTY → stream → ack, presence via bridge SSE), graceful shutdown, run
via tsx from /opt/fleetcrown/runner. See docs/architecture/box-owned-pty-executor.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-26 11:13:10 +02:00