OrangeCat users can now land in FleetCrown with an intent to create:
/projects?new=1 opens the Add Project dialog on load, ?name= prefills
the name field. Params are one-shot — stripped via replaceState after
opening so reload/back doesn't retrigger the dialog.
- ModalForm: new optional defaultOpen prop (backwards compatible)
- NewProjectButton: autoOpen + initialName props + URL cleanup effect
- projects/page.tsx: reads searchParams server-side, passes down
- docs: bridge Part B status updated (deep link implemented; onboarding
gate drops the callback for brand-new users — noted as caveat)
Query params survive the sign-in redirect: middleware sets
callbackUrl=pathname+search and SignInForm passes it to signIn().
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Mount an 'orangecat' Auth.js OIDC provider against the orangecat.ch
authorization server (endpoint discovery via issuer; PKCE + state; email
account-linking policy matching GitHub/Google). Requests the full 7-scope
one-consent grant so the stored access token also powers project publish
and timeline promote later (bridge Part C).
- users.orangecatActorId (uuid, partial-unique) persisted on every OC
sign-in from id_token.sub via events.signIn. Migration 0034 (applied to
the live DB).
- 'Continue with OrangeCat' button on sign-in, gated through the
auth-providers SSOT (env pair ORANGECAT_OAUTH_CLIENT_ID/SECRET).
- Bridge doc status updated: OC provider shipped 2026-06-17, FC relying
party built now; B/C/embeds remain as specced.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cloud inject always queues even when box-runner is connected; distinguish
runnerConnected in Loki footer, Control toasts, and dispatch-status SSOT.
Add prod dogfood script and dispatch-status tests.
Co-authored-by: Cursor <cursoragent@cursor.com>
Browser-first onboarding and executor-copy SSOT; Loki imperatives and move-forward
route to the same builder queue as Control with cloud-first Terminal links; fleet-kick
queues when offline; deploy script syncs box-runner.
Co-authored-by: Cursor <cursoragent@cursor.com>
Add Build/Pause selected on Control, multi-project command fan-out in Loki,
and route scoped screenshots to dispatch with vision preflight instead of chat.
Co-authored-by: Cursor <cursoragent@cursor.com>
Start building now batch-dispatches next_best on eligible idle projects
(capped at three concurrent) and Loki accepts develop-all phrasing; restore
the daily idle nudge for users with autopilot on after the mode collapse.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire NL fast paths before resolveCommand so Loki can generate living business
plans and queue profile field changes through Today’s action queue instead of
silent chat writes.
Co-authored-by: Cursor <cursoragent@cursor.com>
When a project is selected, named, or resolved for chat, prepend the same
getProjectContext block dispatch uses so Loki answers with mission, stack, and goals.
Co-authored-by: Cursor <cursoragent@cursor.com>
Groq Llama 4 Scout describes pasted/picked images for chat and dispatch.
Add scoped-project pill, quick-action chips, hide model picker on mobile,
and hide the shell FAB on /loki.
Co-authored-by: Cursor <cursoragent@cursor.com>
Route shell FAB and loki:open to /loki with composer prefill; retire the
chat-only modal. Add fleet list/create NL fast paths, project picker chips
for ambiguous dispatches, and a db helper to inspect recent conversations.
Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify Saved prompts vs Up next vs Recent dispatches vs Paste from history
via config/control-labels.ts; align activity stats and composer hints.
Co-authored-by: Cursor <cursoragent@cursor.com>
Merge SLH into surf-your-life on prod, drop orphaned box DB, remove SLH from
hetzner manifest, and wire Bitbaum user_projects dir for local dispatch.
Co-authored-by: Cursor <cursoragent@cursor.com>
Merge Cockpit and empty dupes into canonical entities, delete infra/stub
rows, and ship retire-stale-projects.ts plus merge helpers for future hygiene.
Co-authored-by: Cursor <cursoragent@cursor.com>
Re-ran enrich-prod-profiles against Hetzner — 16 projects now have
architecture/conventions/DoD. Add Groq retry for transient fetch failures.
Co-authored-by: Cursor <cursoragent@cursor.com>
Surface fleet-knowledge chunk counts on /memory, document box RAG ops via
install-fleet-rag.sh, and add rag-retrieval test script. Reindex on production
already active (24 chunks across 21 project profiles).
Co-authored-by: Cursor <cursoragent@cursor.com>
Phone/Loki/beacon dispatches queued bare promptKey strings on the cloud host;
assembleInjectPrompt now matches orchestration/run. Persist architecture/
conventions/DoD from AI briefs, expand injected fields, add build-contract UI,
and reindex profile embeddings on save when RAG is enabled.
Co-authored-by: Cursor <cursoragent@cursor.com>
Hide bottom nav and top bar while drawers/modals are open; improve project
profile header layout, tab bar, and card action sizes. Add mobile pages audit script.
Co-authored-by: Cursor <cursoragent@cursor.com>
Expand/collapse on phones gives xterm usable height; Loki dispatches route
"let's develop" through next_best and link to watch the agent. Profile drawer
follows action-first hierarchy with filtered activity noise.
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace three theme buttons with one cycle control in the top bar, sidebar,
and mobile menu; restructure the mobile Menu sheet to mirror sidebar sections.
Co-authored-by: Cursor <cursoragent@cursor.com>
Mobile chrome tokens and viewport panes replace ad-hoc height math on Loki,
Terminal, and workspace routes; modals, drawers, composer, and Control rail
stack correctly on narrow screens. Docs and changelog updated.
Co-authored-by: Cursor <cursoragent@cursor.com>
The headless box-runner is live on the box and verified end-to-end with the
laptop off: presence online via bridge SSE, a launch_agent dispatch claimed +
executed in a FleetCrown-owned node-pty PTY, close_tab cleaned it up, PTY lives
in the box-runner's own process tree (deploy-independent from fleetcrown-app).
- scripts/mint-box-runner-token.ts — mints a ck_ token for the owner + writes it
to the token file (the box-runner equivalent of desktop "install runner").
- scripts/hetzner/install-box-runner.sh — idempotent install/redeploy: rsync
source, mint token if absent, write fleetcrown-box-runner.service, restart.
- Spec marked P0+P1 SHIPPED with the remaining follow-ups (claude /login full
scopes, project clone-on-demand, SandboxExecutor before multi-tenant).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Dogfood-found gaps in the embedded xterm terminal (it only had FitAddon):
- WebLinksAddon — URLs are now clickable (open in a new tab). This is exactly
why `claude setup-token` links were dead text you couldn't open.
- WebglAddon — GPU-accelerated renderer (was the slow DOM renderer), with a
guarded fallback to the default renderer on context-loss / no-GPU.
- A real ANSI-16 dark theme (src/lib/terminal-theme.ts) — was just background:#000
with no foreground/cursor/selection/palette. Documented as the terminal palette
SSOT (standard terminal colors, the canvas/Recharts-style exception).
It still won't beat native kitty (browser vs GPU terminal — physics), and isn't
meant to — it's the "from anywhere" window; kitty+zellij stays the power path.
tsc=0, eslint=0.
Captain-layer RAG — index what only FleetCrown sees across the fleet, never repo
code (the runtime retrieves that itself). Context injection becomes relevance-
ranked instead of profile-dump.
- Local embeddings: scripts/embed-server.py — fastembed BAAI/bge-small-en-v1.5
(384-dim) behind an OpenAI-compatible /v1/embeddings, on the box (no cloud key).
systemd fleetcrown-embed.service.
- src/lib/rag/embeddings.ts — provider-agnostic client (ported from OrangeCat's
convention; EMBEDDINGS_BASE_URL/MODEL/DIM, graceful-off when unset → local dev).
- knowledge_embeddings table (pgvector, vector(384), user_id-scoped) — Drizzle
schema + raw-SQL ingest/cosine-retrieve in db/queries/knowledge-embeddings.ts.
- scripts/reindex-knowledge.ts — backfill project profiles + dev-logs (P0).
- inject-core: dispatches now get a "Relevant context from your other projects"
block retrieved against the task, excluding the project it's for. The engine
under cross-project reference's suggested-references, and the first real fix
for the "memory is the weakest strut" gap.
- docs/architecture/{cross-project-reference,fleet-knowledge-rag}.md — specs.
Verified live on the box: retrieval is semantically accurate (bitcoin→orangecat,
refugee housing→aoz-housing). 24 chunks indexed across 21 projects. tsc=0, eslint=0.
Hermes was a 2026-06-25 spike that proved FleetCrown can orchestrate Nous's
Hermes, but it's not pulling weight: runHermesTask has zero call sites, Hermes
isn't in ORCHESTRATION_ADAPTER_IDS, and the `hermes` CLI isn't installed — so it
only surfaced as a broken/unavailable runtime in the catalog. Removed from
ALL_ADAPTERS (files ./hermes.ts + ./hosted-runner/run-hermes.ts preserved;
re-add when the hosted runner Phase 1 ships).
positioning.md: added the "One identity, many swappable engines" framing (you
talk to one Loki; the runtimes are swappable plumbing — a runtime joins when
we'll actually run it) and made the honest-status line accurate about Hermes
being a parked spike rather than a 7th live runtime.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The style skill (docs/thoughts-style-guide.md) is the SSOT for the house voice
any agent reads before writing a Thoughts essay — voice, shape, frontmatter,
don'ts, exemplars. On top of it, a per-user **writing voice** is now a real,
adjustable preference:
- schema: user_preferences.writing_voice (text, nullable; null = house default).
Column applied to local + box DBs (ADD COLUMN IF NOT EXISTS).
- query/api: threaded through UserPreferencesData, getUserPreferences, upsert,
and the PATCH /api/me/preferences validator (max 600 chars).
- Settings → new "Voice" tab (VoiceSettings): preset chips + free-text, save.
- Loki honours it: askLoki(msg, {userId}) resolves the voice and applies it to
BOTH paths — system prompt for the Groq fallback, a one-line preface for the
gateway agent — so the voice holds whichever brain serves the turn. Wired at
both callers (/api/loki and the conversation messages route).
This is the first real "skill" layer: a stored house style + a user override
injected at generation time. tsc=0, eslint=0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- hosted_dispatch command type + enqueueHostedDispatchCommand (pending-commands.ts):
write-class tasks, distinct from read-only hosted_analyze and the local-runner path.
- scripts/hosted-runner.ts: the worker now claims BOTH hosted types and routes —
hosted_analyze → Groq read-only analysis (Phase 0); hosted_dispatch → runHermesTask
(Phase 1, orchestrate Hermes in its own sandbox). Verified: dispatch routes to
Hermes and reports a clean needs-install result (no crash) until the CLI is
provisioned. The whole path is ready the moment a Hermes credential lands.
- docs/positioning.md: the captain's-bridge one-pager — what we are (orchestration
layer over runtimes), what we're NOT (a runtime), the layer model, the moat
(cross-model verification + governance + economy), honest status.
- content/thoughts/the-harness-not-the-prompt.md: essay — leverage moved from
prompt engineering to harness engineering; FleetCrown is a harness at fleet scale;
maps our shipped pieces (profile-as-context, cross-model DoD gate, the loop) to
harness primitives, and names memory as the weakest strut.
(Recovers the box too: the prior Hermes-spike deploy failed on a missing `ws`
dep the fleet's Loki-gateway commit added; npm install fixed local node_modules,
so this build is clean.) tsc=0, eslint=0.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The keystone gap from "The Captain Needs a Ship": FleetCrown commands a fleet it
doesn't run (execution = the operator's laptop), so every project shows offline
when the laptop sleeps. The hosted ephemeral runner executes dispatches on cloud
compute instead.
This is a multi-phase infra build (the box is bare — no agent CLIs, no clones —
and running unsandboxed coding agents on the shared prod box would be reckless).
So it ships in safety-gated phases (docs/architecture/hosted-ephemeral-runner.md):
- Phase 0 (this commit): src/lib/hosted-runner/analyze.ts — the read-only
execution core. Shallow-clones a repo read-only, snapshots its tree + key
manifests, and runs an analysis/plan/review via Groq. No writes, no shell from
the repo, temp dir always cleaned up — safe on shared compute, and already
useful (work a project without the laptop). Verified: clones a real public repo
and produces a grounded analysis.
- Phase 1: sandboxed single-tenant coding agent (container, writes via PR).
- Phase 2: ephemeral per-dispatch compute (Firecracker/Daytona/Modal-style).
- Phase 3: multi-tenant credential scoping + quotas.
The runner reuses the EXISTING loop — bridge-SSE presence (runner_presence),
pending_command claim (SKIP LOCKED), getProjectContext injection, DoD-gated
outcome close. Only the execution location + sandbox differ. Next: wire Phase 0
to presence + the claim queue + a box service.
tsc=0, eslint=0.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The doc was still labeled 'design / not built' but Loki is live and in
daily dogfood use: NL composer with project resolution, the 3-pane page,
mic/attach/model-picker, and dispatch parity with Control. Add a verified
'Shipped state' note, resolve open questions 1-2, and mark the phased plan
(1-3 done, 4 partial). Discovered by dogfooding FleetCrown via FleetCrown:
this very doc fix was dispatched through Loki.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
WorkspaceTerminal (server PTY) and TerminalView (machine peek) were
near-duplicate xterm wrappers — the input-buffering race fix was
copy-pasted in both. Merge into one src/components/terminal/TerminalView.tsx
parameterized by a TerminalTransport (terminal-transport.ts):
- workspaceTransport(id) → server-owned PTY (/api/workspaces/[id])
- runnerTransport(tab) → Fleet Runner machine PTY (peek-stream + rawkey)
The view owns xterm, the shared input buffer (race fix now in ONE place),
fit/resize and chrome; the transport owns I/O. Delivers the 'same xterm
view, two substrates' the TerminalSurface doc-comment promised. A third
substrate is a third factory, no view change. All 4 call sites migrated;
old control/WorkspaceTerminal.tsx + control/TerminalView.tsx deleted.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes the P3 caveat: launched a throwaway Claude agent on truthseeker
(runner-owned PTY, no zellij tab), typed ECHOTEST42 in 'My machine', and
it round-tripped xterm→tab-inject-raw→bridge rawkey→runner→PTY→peek-stream
→xterm. Runner stayed green (0 restarts) after killing the test agent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Scoped the runner side: the bridge is a NOTIFICATION bus (carries {table,op,id},
not payloads), so per-keystroke transport needs a new non-durable `rawkey` event
type extending the bridge protocol — not a free "reuse NOTIFY". Documents the
decision, the 3-deployable blast radius (bridge → cloud → runner → UI), and the
sequencing that keeps the autopilot-critical runner release last + watched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Best-practices pass on the Phase 1 composer + standards reflected in docs so they
don't need restating:
- resolve route now derives intent ids from ORCHESTRATION_TASK_INTENT_IDS (SSOT)
instead of a hardcoded local copy; type is OrchestrationTaskIntentId.
- palette status line uses a new neutral `ui-palette-status` class instead of
reusing the negative/error class (design discipline — no stray design).
- CONTRIBUTING "Engineering Standards" now names the full bar (first-principles,
SSOT, DRY, SoC, no god files, no hardcoded values, four-layer design system,
config-driven, validate-at-boundary) and points to the global standards in
CLAUDE.md as the authoritative source.
- loki-command-surface.md references those standards.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Structured design docs for George's 2026-06-18 vision, kept as separate threads:
- docs/loki-command-surface.md — the "Loki" ChatGPT-style page + NL command
composer (auto-routes "code review for kivvi"); a new front-end over the
existing dispatch backend. Design only; open questions need sign-off.
- docs/terminal-parity.md — why the server terminal scrambled input (fixed) and
the plan for true interactive parity on the machine terminal.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Root cause of blank /terminal live view: dual runner instances racing
(stale Singleton lock cleared while old process lived), peek_start blocking
on zellij execSync for non-PTY tabs, and streams stuck on zellij after PTY launch.
- peek-streamer: defer zellij first tick so peek_start acks immediately; remove v0.8.4 diagnostics
- poller: stopPeek before startPeek so PTY streams upgrade when agent launches
- index: terminate stale runner PIDs on lock acquire; process.exit(0) on lock failure
- zellij: execSync timeouts on focus/dump-screen (prevents poller hang)
- docs: /terminal My machine workflow and version requirements
Co-authored-by: Cursor <cursoragent@cursor.com>
Locks the long-term architecture so every step is on the path, not another hack.
Billions of users on any device require: FleetCrown OWNS each agent's PTY in an
isolated sandbox (never puppet a human's zellij), the terminal is a VIEW, state is
event-sourced from the owned process, identity is a stable id not a name. Four
planes (control/connection/execution/state) + one Executor abstraction
(LocalPty -> Sandbox -> optional LocalRunner). Same shape as Codespaces/e2b/Fly.
Retires zellij name-guessing, /proc scans, /tmp sentinels, screen-scrape status,
and the pending_command keystroke hack.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Both agent tabs (FleetCrown + OrangeCat) aligned on four refinements that
supersede the first draft of the cross-product sync mechanics:
1. Publish-bus, not shared event bus — FC keeps a private event spine; a
config-driven promote step pushes only publish-worthy events to OC
timeline_events (OC's public publish bus, not FC's general event log).
2. Async/best-effort/idempotent promote — dedupe_key + backfill; never
blocks the user action, never double-posts or silently drops.
3. Map teams, don't migrate — FC orgs/teams stay FC-owned + auth-critical;
OC maps members to actors via OIDC sub, never absorbs the team graph.
4. Embed OC widgets, don't share a UI package — stacks diverge; OC serves
embed routes, FC mounts them; OC owns embed security (origin-pinned
postMessage + frame-ancestors CSP + short-lived scoped token).
Companion (OC-side): docs/architecture/PLATFORM_AND_COLLABORATION.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Phase 1 of the reliability/UX cleanup:
- Launch modal: model choice is no longer mandatory. Launch enables as soon as a
CLI/agent is picked; model field is optional (defaults to the agent's default,
labeled as such). Choosing the CLI is enough. (control-panel-modals.tsx)
- Offline banner: one source of truth. RunnerStatusBanner owns the full "offline
— commands queue until it reconnects" alert; ControlFleetStatus is now a
compact status indicator and project-intent-panel a short inline hint — no more
triple-rendered banner. (ControlFleetStatus.tsx, project-intent-panel.tsx)
- Daemon retirement finished: purged stale user systemd units
(fleetcrown-daemon, beacon-window, an obsolete cockpit-* dir) and rewrote
misleading docs/comments (cloud-local-workflows.md, home/watcher.ts,
home/emit.ts) that still described the deleted bash daemon as live. Kept the
intentional 410 route + historical essays.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per founder decision: no real names in committed files. Replace the
real name with the pseudonym and the personal email with the existing
pseudonym contact (mao@orangecat.ch) across LICENSE + legal docs; de-name
the pseudonym rule in HANDOFF.md.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bring docs + config in line with what's actually deployed (self-hosted
Hetzner, Postgres 'fleetcrown', no Vercel/Neon):
- .env.example: 'Production (Vercel)' -> self-hosted Hetzner; drop the
removed-in-c6bc058 Neon fallback line (NEON_* is no longer read);
cockpit-app -> fleetcrown-app; cockpit DB -> fleetcrown in example URL
- docker-compose.yml: local-dev Postgres db/user cockpit -> fleetcrown
(matches the box DB name; was internally inconsistent)
- docs/debt-reduction-roadmap.md + scripts/fleet: dead /home/g/dev/cockpit/
paths -> /home/g/dev/fleetcrown/ (repo was renamed; links were broken)
- scrub real-name/email leaks from committed content: 'George' -> 'a solo
founder' in the kill-switch essay; real test email -> generic in the
one-click dev plan (pseudonym hygiene)
Preserved all legitimate historical mentions (migration docs, thoughts
essays describing the exit from Vercel/Neon).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sequenced runbook for moving OpenClaw/Ivy onto the (now CX43, 16GB) box —
co-located, hardened (non-root user, pg_hba deny, loopback gateway), with the
off-box heartbeat that makes co-location safe. migrate-openclaw.sh automates
the mechanical parts (stop→package→transfer→restore→perms) and gates the
credentialed/judgment steps (gateway install, venv rebuild, WhatsApp re-pair).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>