Commit Graph
83 Commits
Author SHA1 Message Date
Mao NakamotoandClaude Fable 5 10d7df029c feat(projects): OC→FC create deep link — /projects?new=1&name=<prefill>
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>
2026-07-02 21:16:44 +02:00
Mao NakamotoandClaude Fable 5 736def9db6 docs: FleetCrown-side master plan + reconcile bridge status (Part C shipped)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 18:40:00 +02:00
Mao NakamotoandClaude Fable 5 6e96bce5ba feat(auth): Login with OrangeCat — OIDC relying party (bridge Part A, step 2)
- 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>
2026-07-02 16:05:40 +02:00
Mao Nakamoto cf45aa9be5 fix(loops): route idle nudges through dispatch spine 2026-07-01 02:52:21 +02:00
Mao Nakamoto 66e3ac55dc feat(multitenancy): gate shared cloud execution 2026-06-30 19:07:54 +02:00
Mao Nakamoto d908145a1f feat(loki): refine command composer UX 2026-06-30 18:09:49 +02:00
Mao Nakamoto 033b780326 feat(control): complete terminal and orchestration trust pass 2026-06-30 14:53:06 +02:00
Mao NakamotoandCursor f755b4f134 fix(loki,control): show builder-online copy for cloud queue dispatches
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>
2026-06-30 00:08:43 +02:00
Mao NakamotoandCursor a491e9e487 feat(loki,control): unified builder UX and move-forward dispatch
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>
2026-06-29 22:58:32 +02:00
Mao NakamotoandCursor 480294fa15 feat(control,loki): subset loops and screenshot dispatch
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>
2026-06-29 19:45:42 +02:00
Mao NakamotoandCursor 9f0d170484 feat(control): fleet-kick on Start building and fix nudge-idle cron
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>
2026-06-29 18:58:10 +02:00
Mao NakamotoandCursor a07cd7276e feat(loki): business plan generation and profile update drafts
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>
2026-06-29 17:57:29 +02:00
Mao NakamotoandCursor 24471d795c feat(loki): inject project profile into chat turns
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>
2026-06-29 16:32:15 +02:00
Mao NakamotoandCursor f37780c82c feat(loki): screenshot vision preflight and composer polish
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>
2026-06-29 15:27:06 +02:00
Mao NakamotoandCursor 5ac16ea023 feat(loki): consolidate on /loki as single command surface
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>
2026-06-29 14:45:06 +02:00
Mao NakamotoandCursor 507cc661d9 refactor(control): Phase 3 prompt vocabulary SSOT
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>
2026-06-29 08:53:36 +02:00
Mao NakamotoandCursor f62565e9b8 feat(control): ship Phase 1 fleet play/pause hero UX
Prominent ui-control-hero autopilot card with Building/Paused status, large
Start/Pause CTA, per-project toggles, rail override chips, and refresh sync.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 11:09:33 +02:00
Mao NakamotoandCursor 414a8a0bfa docs: note swiss-longevity-hub retirement in hetzner runbook
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 10:45:55 +02:00
Mao NakamotoandCursor 308f32c833 chore(projects): retire swiss-longevity-hub and link Bitbaum runtime
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>
2026-06-28 10:39:39 +02:00
Mao NakamotoandCursor 4a47546273 docs: note reparaturbonus-zh profile backfill complete
All 19 prod projects now have build-contract attrs after enrich run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 10:05:39 +02:00
Mao NakamotoandCursor 3b94efbb67 chore(db): retire stale prod projects and add cleanup tooling
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>
2026-06-28 09:59:27 +02:00
Mao NakamotoandCursor 36d1802469 chore(profiles): backfill prod build-contract attrs from local repos
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>
2026-06-27 20:05:23 +02:00
Mao NakamotoandCursor 50b52301e1 feat(rag): Memory index health and Hetzner install SSOT
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>
2026-06-27 18:39:47 +02:00
Mao NakamotoandCursor 239e6d8ec4 fix(projects): cloud inject carries full project context to agents
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>
2026-06-27 18:19:55 +02:00
Mao NakamotoandCursor ba7ac4b328 fix(mobile): full-screen overlays and project drawer tap targets
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>
2026-06-27 17:30:17 +02:00
Mao NakamotoandCursor 6dd74f2c2b feat(terminal,loki): mobile full-screen terminal and develop handoff
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>
2026-06-27 16:22:30 +02:00
Mao NakamotoandCursor 215a4fe3ea fix(projects): merge duplicate entities and simplify fleet overview
Resolve case-insensitive duplicate project rows in Postgres, prevent
recurrence in entity creation, and redesign the Projects page hierarchy
(search-first, compact list, attention cards, activity redaction).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 12:13:43 +02:00
Mao NakamotoandCursor 32cbb19fd3 feat(shell): unify theme control and improve mobile navigation
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>
2026-06-27 09:52:29 +02:00
Mao NakamotoandCursor 023c513f88 fix(ui): make all app surfaces usable and polished on mobile
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>
2026-06-27 09:23:26 +02:00
Mao NakamotoandClaude Opus 4.8 fa8616e16f feat(runner): box-runner shipped (P1) — token mint, systemd install, spec update
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>
2026-06-26 11:29:12 +02:00
Mao Nakamoto 99d2c9e51a feat(terminal): clickable links + GPU rendering + a real theme
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.
2026-06-25 20:27:21 +02:00
Mao Nakamoto 9690eb7021 feat(rag): fleet-knowledge pgvector index + cross-project context injection
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.
2026-06-25 16:57:11 +02:00
Mao NakamotoandClaude Opus 4.8 9de008014e chore(agents): park the dormant Hermes adapter; add "one identity, many engines" note
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>
2026-06-25 16:49:21 +02:00
Mao NakamotoandClaude Opus 4.8 c212eeb30a feat(settings): writing-voice preference + Thoughts style skill, wired into Loki
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>
2026-06-25 14:25:15 +02:00
GandClaude Opus 4.8 509f2a4189 feat(hosted-runner): wire runHermesTask via hosted_dispatch + positioning one-pager + harness essay (#52)
- 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>
2026-06-25 14:04:23 +02:00
GandClaude Opus 4.8 39aabc214a feat(hosted-runner): Phase 0 — safe read-only repo analysis core + phased design (#49)
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>
2026-06-25 13:18:11 +02:00
GandClaude Opus 4.8 5d201b3e55 docs(loki): mark command surface as shipped (Phases 1-3 live) (#25)
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>
2026-06-23 04:52:25 +02:00
Mao NakamotoandClaude Opus 4.8 842e26ea7f refactor(terminal): merge two xterm wrappers into one transport-parameterized view (P4)
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>
2026-06-18 19:37:32 +02:00
Mao NakamotoandClaude Opus 4.8 fce300eb6a docs(terminal): record verified end-to-end keystroke echo
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>
2026-06-18 19:04:39 +02:00
Mao NakamotoandClaude Opus 4.8 119b0aa4ec docs(terminal): mark machine-terminal parity SHIPPED (P3)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 18:47:12 +02:00
Mao NakamotoandClaude Opus 4.8 3bca46495a docs(terminal): concrete P3 transport plan + blast-radius finding
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>
2026-06-18 16:32:17 +02:00
Mao NakamotoandClaude Opus 4.8 e3acc9a9d7 refactor(loki,docs): SSOT the resolver + make engineering standards explicit
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>
2026-06-18 11:57:46 +02:00
Mao NakamotoandClaude Opus 4.8 7afee18838 docs: Loki conversational command surface + terminal parity plans
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>
2026-06-18 10:36:54 +02:00
Mao NakamotoandCursor e83d8179aa fix(runner): v0.8.5 — reliable live terminal peek on My machine
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>
2026-06-18 00:08:34 +02:00
Mao NakamotoandClaude Opus 4.8 cc269e9c11 docs(architecture): agent execution platform — the scalable, terminal-agnostic north star
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>
2026-06-17 01:40:22 +02:00
Mao NakamotoandClaude Opus 4.8 d092b5d84d docs(architecture): reconcile identity-bridge spec to corrected spine
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>
2026-06-16 23:42:34 +02:00
Mao NakamotoandClaude Opus 4.8 4485b5e882 fix(control): kill launch friction, dedupe offline banner, finish daemon retirement
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>
2026-06-16 23:32:51 +02:00
Mao NakamotoandClaude Opus 4.8 823a6e6255 legal: use pseudonym 'Mao Nakamoto' instead of real name
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>
2026-06-16 22:29:08 +02:00
Mao NakamotoandClaude Opus 4.8 334b1bd404 docs: correct stale infra/brand drift to current reality
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>
2026-06-16 20:00:25 +02:00
Mao NakamotoandClaude Opus 4.8 391c592e70 docs(infra): Ivy co-location runbook + migrate-openclaw.sh
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>
2026-06-16 18:19:47 +02:00