GandClaude Opus 4.8 4d3bcf35fa fix(desktop): unbreak release build + phase 2 parallel dispatch (#65)
* fix(desktop): unbreak the release build — node-gyp 13 override

The release workflow has been silently broken since v0.8.0: @electron/rebuild
pins node-gyp 9.4.1, which predates Python 3.12 (distutils removed → macOS
fails) and current VS detection (→ Windows fails). Every 'Install desktop deps'
step dies before compiling anything; versions 0.8.1-0.8.11 never shipped
through the feed. Scoped npm override forces node-gyp ^13 under
@electron/rebuild only.

Verified via workflow_dispatch dry-run (build-only) on this branch.

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

* feat(dispatch): phase 2 — same-project parallel dispatch via derived run-tabs (opt-in)

When a project is busy, dispatch immediately under a tab alias
<project>~<runId8> instead of queueing behind — every tab-keyed mechanism
(PTY workspace, session file, sentinels, zellij tab, phase-1 worktree)
composes unchanged. Gated by FLEETCROWN_PARALLEL_DISPATCH (default off).

- src/lib/run-tab.ts: alias SSOT (derive/base/detect) shared by server+runner
- run/route.ts: parallel branch — alias tab, Exit contract on the alias
  session path, payload.sessionTab; run keeps BASE projectKey for analytics
- poller.ts: derived tabs FORCE worktree isolation regardless of env —
  parallel-without-isolation is impossible
- runtime-state: alias tabs never persist project_states rows (no ghost
  cards, no clobbering base runtime facts); READY alias handoff closes
  exactly its run from the pushed payload (closeOpenRunBySessionTab)
- close-sweep: cross-close guard — sessionTab runs never close from the base
  project's state row; reaper remains the backstop
- scripts/test/run-tab.ts: 8-check net. 38/38 unit files, tsc, eslint green.

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

* fix(desktop): swap to @electron/rebuild 4.2.0 (paired node-gyp 12)

The scoped node-gyp-13-under-rebuild-3.6.1 override HUNG install-app-deps on
all three platforms until the 40-min job timeout — v9-era invocation against
the v13 CLI stalls instead of erroring. rebuild 4.2.0 ships its own paired
node-gyp ^12 (Python 3.12 + modern VS support) — the combination its authors
actually test.

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

* fix(release): pin the BUILD ENV, not the deps — Python 3.11 + windows-2022

Third approach, the right one: the dep set (electron-builder 25 + rebuild
3.6.1 + node-gyp 9) was never broken — the runner images rotted under it
after v0.8.0 (Python 3.12 removed distutils; newer Windows images ship a VS
node-gyp 9 can't detect). Overriding node-gyp 13 under rebuild 3.6.1 HUNG
(CLI mismatch); rebuild 4.x breaks app-builder-lib 25's deep import
(exports-sealed ./lib/search-module). So: revert both overrides, pin
setup-python 3.11 + windows-2022 in the workflow. Prod deps untouched.

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

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-17 17:16:49 +02:00
2026-04-04 22:47:22 +02:00
2026-04-04 22:47:22 +02:00

FleetCrown

FleetCrown is an execution operating system for builders who run many projects at once. FleetCrown is a customer of sibling product OrangeCat (economic layer). Both have profiles as projects on orangecat.ch for Mao Nakamoto, with FleetCrown as "customer" via stakeholder graph, shared BTC wallet. The integration makes OrangeCat + FleetCrown the complete stack (production + economy).

The product thesis is simple: AI agents are becoming cheap execution capacity, but serious users still need a trustworthy command center. FleetCrown provides the state, queues, handoffs, guardrails, and business context around that capacity.

Production: https://fleetcrown.orangecat.ch

What It Does

  • Agent operations: launch, monitor, switch, and dispatch Claude, Codex, Gemini, Cursor, Grok, and OpenClaw across real project workspaces.
  • Hybrid control plane: hosted Next.js app owns auth, database, product UI, and team state; a local daemon owns Zellij, shell, git, and agent CLIs.
  • Project execution memory: per-project handoffs, queues, recent outcomes, lifecycle signals, git state, and saved context are visible in one place.
  • Builder life OS: goals, people, habits, events, money, prompts, and thoughts live beside the work system rather than in disconnected apps.
  • Operational trust: runtime signals are persisted, versioned, and explained in the UI so users can tell the difference between active work, an open terminal, and historical handoff context.

Product And Economic Model

FleetCrown is designed as a high-retention SaaS for power users and small teams. As a customer of OrangeCat, it demonstrates the "one is customer of the other" model (FleetCrown production consumes OrangeCat economic services). Both projects live on the OrangeCat platform with typed relations. See live: orangecat.ch projects for FleetCrown / OrangeCat (shared wallet bc1q3hh4yklcmwtpnqmxyksw36yedg7zyfy6tzzqwz). The economic model is built around durable workflow ownership, not one-off AI novelty.

Layer Value Monetization path
Individual builder One FleetCrown for projects, agents, commitments, and execution memory Pro subscription
Team / studio Shared project state, team visibility, agent dispatch, audit trail Per-seat team plan
Agent runtime Local daemon connects private machines to the hosted control plane Paid runtime seats / usage tiers
Execution intelligence Prompt routing, queue reasoning, outcomes, continuation policies Premium automation tier
Enterprise / investor diligence Operating telemetry, governance, security, and project health Managed deployment / annual contract

See docs/business-model.md for positioning, pricing logic, expansion loops, and defensibility.

Architecture At A Glance

Hosted control plane (self-hosted Next.js on Hetzner, Caddy in front)
  Auth, database, UI, team state, command queue, runtime snapshots

Local runtime (user machine)
  Zellij tabs, agent CLIs, git, shell tools, daemon, hook bridge

Data layer (Postgres / Drizzle)
  User projects, runtime state, orchestration events, prompt queues,
  goals, people, habits, events, billing, memories

Key design rules:

  • SSOT first: schema, navigation, agent registry, runtime snapshots, prompt queues, and design tokens each have one canonical owner.
  • Cloud/local separation: browser workflows stay cloud-safe; shell and terminal work happens only through the authenticated local daemon.
  • Runtime truth beats assumptions: Control reflects live daemon pushes, process detection, Zellij tabs, and timestamped handoff files.
  • Agent-agnostic direction: Claude-era compatibility remains where needed, but adapters and registry definitions are the migration path.

Stack

  • Next.js 16.2.6 App Router, React 19, TypeScript strict
  • PostgreSQL 17 with Drizzle ORM and schema-inferred types
  • NextAuth v5 with GitHub OAuth and local owner-key support for private installs
  • Tailwind CSS 4 with a tokenized dark-first design system
  • Zellij + local daemon for terminal runtime control
  • Self-hosted on Hetzner (bitbaum box, Caddy + systemd) — production deploys via scripts/deploy-hetzner.sh (build → rsync → restart); cron jobs run on the box
  • Husky + GitHub Actions for type, lint, and audit checks

Repository Map

src/app/                 App routes and API endpoints
src/components/control/  Agent operations UI
src/components/*/        Domain surfaces: today, people, projects, goals, etc.
src/config/              Navigation, prompts, categories, product constants
src/db/schema/           Drizzle schema SSOT
src/db/queries/          Data access by domain
src/lib/                 Runtime, auth, orchestration, formatting, utilities
home/                    Local-first orchestration self-tests and runtime model
scripts/                 Daemon, install, smoke, migration, and verification tools
docs/                    Architecture, business model, cloud/local workflows
drizzle/                 Generated schema migrations
packages/agent/          Hosted installer CLI
content/                 Public essays and whitepaper content

Quality Bar

Every change should preserve:

  • npm run lint
  • npx tsc --noEmit
  • npm run check:design
  • npm run test:control-presenter
  • npm run test:home
  • npm run test:db-url
  • npm run test:orchestration-summary
  • npm run build
  • npm run smoke

CI runs type/lint/design/self-test checks on pushes and pull requests. A scheduled audit workflow fails on high or critical dependency vulnerabilities. Production deploys to the Hetzner box run via scripts/deploy-hetzner.sh (build → rsync → restart fleetcrown-app).

Local Development

npm install
docker compose up db -d
cp .env.example .env.local
npm run migrate
npm run dev

Minimum local .env.local:

DATABASE_URL=postgresql://fleetcrown:changeme@localhost:5432/fleetcrown
AUTH_SECRET=replace-me
GITHUB_CLIENT_ID=replace-me
GITHUB_CLIENT_SECRET=replace-me

On a fresh database, visit /setup to create the first user.

Local Agent Runtime

Agent dispatch from the hosted app needs a connected machine:

curl -fsSL https://fleetcrown.orangecat.ch/api/agent/install | node - init --base-url https://fleetcrown.orangecat.ch

The runtime requires Zellij and at least one supported CLI on PATH: claude, codex, gemini, agent (Cursor), grok, or openclaw.

See docs/development/cloud-local-workflows.md for the full matrix of browser-only vs local-runtime workflows.

Important Docs

Security And Operations

  • Secrets stay out of Git; use .env.example as the contract.
  • Production uses direct and pooled Postgres URLs separately.
  • Local daemon access should use per-user ck_* agent tokens.
  • Legacy shared daemon tokens require an explicit server-side opt-in flag.
  • Private surfaces can be PIN-gated server-side.
  • Dependency audit runs daily and high+ findings block the audit workflow.

See SECURITY.md for reporting and operational expectations.

Languages
TypeScript 88.6%
Shell 7.3%
CSS 2.3%
JavaScript 1.6%
Python 0.1%