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>
STRIPE_SECRET_KEY and the seven other STRIPE_* vars appear zero times outside
src/ and zero times in .env.example, so isStripeReady() could only ever return
false. Three API routes, a checkout route, a tier grid and a "Manage
subscription" button were all gated on it and permanently unreachable.
Confirmed empty in production before touching the schema:
select count(*) filter (where stripe_customer_id is not null),
count(*) filter (where stripe_subscription_id is not null),
count(*) from users;
→ 0 | 0 | 7
So this removes no data and, more to the point, changes nothing a user sees:
every code path already fell through to the branch below it.
WHAT STAYS. Plans are real and untouched. They are granted through the
OrangeCat/Bitcoin rail (/api/orangecat/entitlement -> recordOcBillingGrant),
with the expiry cron reverting a lapsed pass to free. The pricing CTA cascade
loses only its unreachable middle step: free -> TBA -> [stripe] -> BTC ->
start-free.
WHAT WAS ACTIVELY WRONG. Because isStripeReady() was false, the one part of
Billing that DID render was a notice telling the reader to "add
STRIPE_SECRET_KEY and price IDs" — an environment variable shown to a person
who does not deploy the app and could not act on it. That is the same mistake
NotificationsPill's comment already calls out. Billing now states the plan and
links to /pricing.
Removed: lib/stripe.ts, api/stripe/{checkout,portal,webhook}, api/checkout/
[plan], getUserByStripeCustomerId, two user columns (migration 0063), two
entries from the user-client-view redaction lists, the api/stripe/webhook entry
in proxy.ts's public matcher, the stripe npm dependency, and the smoke/auth
probes for routes that no longer exist.
BillingSettings drops "use client" — with the handlers gone it holds no state,
no effect and no search-param read.
Two mentions deliberately KEPT because they are not the rail: the placeholder
prose describing what a user might build ("Simple dashboard, automated
reminders, Stripe payments…") and the demo project's stack string.
pnpm run verify green. 28 files, 519 deletions.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
* feat(crew): assign work to humans, not just agents
FleetCrown dispatches intents to agents. Some work is not an agent's to
do — calling twelve suppliers on the company's behalf, signing something,
walking into a room. That half of the fleet had nowhere to live, so it
lived in the operator's head. This adds it as a surface: /crew, the
humans in the loop and the work handed to them.
Three laws, each because the alternative is worse:
A person is not a queue. `assigned` only ever means you ASKED. The
answer is theirs — accept, decline, or deliver — and OPERATOR_MOVES
cannot reach `accepted` or `declined`, so FleetCrown can never record
consent nobody gave. Declining is a first-class button on the share
page, not small print: an ask you cannot refuse is an order.
Nothing reaches a human by accident. An assignment is born a DRAFT,
and a draft has told nobody anything. Handing it over mints the share
link, and that is the only act in the feature that reaches a person —
which is what makes it safe to let Loki propose one (propose_human_task
writes a draft, exactly as propose_action does).
Money is OrangeCat's. A task states its fee so both sides see the
terms; a paid one mirrors to OrangeCat as a service and keeps the
pointer. FleetCrown decides WHO does the work; OrangeCat settles what
it costs. That seam is the missing link between the two products.
The roster is not a new table. A crew member is a person already in the
operator's book (`entities`, type person) carrying `crew:member`, so
enrolling someone you know adds no row, un-enrolling keeps every note and
assignment, and the book can never disagree with the roster. The actor
kernel gains a DELEGATE capability opposite MARKET: a robot physically
cannot join the crew, and a person still cannot be listed, booked or
sold — assertAttrAllowed enforces both directions.
The assignee never signs in. They open a link and answer; the token is
their credential, looked up with revoked links excluded, and it can only
ever answer for its own assignment. Revoking an unanswered ask pulls it
back to draft, because a board that says "asked" over a dead link lies
to you every morning.
Verified against real Postgres, not just types: the whole query layer end
to end (enrol → draft → hand over → accept → deliver → accept the work →
revoke → re-share), and the public surface over HTTP — page renders,
accept succeeds, a replayed accept is 409, an invented action is
rejected, unknown tokens 404, and /api/crew plus /crew stay gated.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKERdritcwNRuPW72zv8c3
* feat(crew): pay in bitcoin, to the person who did the work
Three corrections, all of them about the same thing: a fee is a promise to
a human, and every part of it has to be true.
BTC is now an assignable currency. The list is exactly the enum OrangeCat's
services API accepts (USD, EUR, CHF, GBP, BTC) — a currency FleetCrown
offers but OrangeCat rejects is a fee that cannot be mirrored.
fee_amount becomes NUMERIC(20,8), not real. float4 carries ~7 significant
digits, so it cannot represent a satoshi: 0.00050001 BTC would have been
silently rounded on the way to disk, and the amount someone is owed is the
last field in this system allowed to drift. Verified against Postgres —
that exact figure now round-trips to the last satoshi. Two-decimal
formatting had the same bug on screen, printing "BTC 0.00" for 50,000
sats, on the page where a person decides whether to say yes.
And the payment goes to THEM. `publishTaskToOrangeCat` creates a service
under the studio's integration key, so paying that listing pays the
studio — the SDK's actor_id is documented as ignored for integration keys,
and OrangeCat has no endpoint that creates an actor, because a profile
carries a wallet and a wallet belongs to whoever holds its keys. So the
roles are split honestly: the listing is the record of the engagement, and
`crew:orangecat_profile` — their own OrangeCat page, Lightning wallet and
all — is the destination. It rides on the task as `assigneePayUrl`, gives
the operator a "Pay Jana BTC 0.0005" button, and tells the assignee where
the money lands before they accept. A paid assignment with no destination
on file says so out loud on both sides rather than looking complete.
Profile links are stored canonical (a handle and a pasted URL are one
wallet, not two) and anything that is not a profile is refused rather than
half-saved.
The migration is regenerated rather than stacked: 0060 was never applied
anywhere, so the column is born numeric instead of being altered later.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YKERdritcwNRuPW72zv8c3
---------
Co-authored-by: Claude <noreply@anthropic.com>
Loki tells the user 'approve it in your FleetCrown Approval Queue', but no
such place existed: the queue was a card mid-way down /today that renders
null whenever the private zone is locked — so the flow dead-ended with no
route, no nav entry, and nothing to navigate to on mobile.
- /approvals page in the Work section (sidebar, mobile Menu sheet, and
command palette all derive from the navigation.ts SSOT)
- locked zone no longer hides the queue's existence: the page shows the
pending count (no content) + an Unlock CTA through /unlock?next=
- ActionQueueCard stays the queue UI SSOT; new optional emptyState prop
(default null preserves /today behavior)
- /approvals added to smoke PAGE_ROUTES + CLAUDE.md views table
Co-authored-by: x <x@x>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Closes the named trust gap (audit: "no pricing visible; looks abandoned or
confused about whether it's commercial"). Founder can't connect Stripe yet, so
the page is honest by construction: paid CTAs open checkout only when
isStripeReady(); until then every CTA routes to a free signup — no dead Buy
buttons — and flips live automatically when keys land, no code change.
- src/config/plans.ts: SSOT for tiers (free/personal/pro/team) deriving the
project limit from PLAN_LIMITS (lib/plan.ts, the only gate the code enforces).
Prices are the master-plan §7.2 anchors (CHF 15/40/90) — one edit to change.
Rich capabilities live in PRICING_INCLUDED ("every plan includes") rather than
faked as per-tier gates the product doesn't apply — honest by construction.
- src/app/pricing/page.tsx: responsive card grid, reuses ui-public-* classes,
works 320px+, semantic tokens only (no palette/hex).
- Wired into public nav (PUBLIC_NAV), footer Product group, and smoke.sh.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Vendor-neutral DATABASE_URL helpers, dump/restore/sync tooling, and one-command
Oracle migration after a single console VM step. Publishes the studio-stack
thoughts article and hardens build (dynamic layout, resilient sitemap).
Co-authored-by: Cursor <cursoragent@cursor.com>
GET /api/projects/[id] is the most-called endpoint in the app — every
project drawer open hits it. The static smoke test had no coverage for
it because the ID is runtime-derived. Reuses the same jq+curl pattern
used for /api/people/<id>: fetches the first entity project ID from
/api/user-projects, then hits the detail route and verifies it returns
2xx (or 401 without a session).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a smoke route check for /api/invitations/<bogus-token> that must return
404, not 401. If it returns 401 it means the middleware exclusion (api/invitations/)
regressed and new users can no longer accept team invitations. The check fails
loudly on 401, passing only on the expected 404 for an invalid token.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Transient popup windows should not control app-wide theme — removing
ThemeToggle from the beacon header prevents the next session from
waking up in light mode when the user clicked the toggle there.
Smoke test gains /api/orgs, /api/agent-tokens, /api/agent/register
(all three new multi-tenancy + agent-token endpoints).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- stripe/portal: remove copy-paste duplicate if (!userId) guard (dead code)
- money page: remove hardcoded Apr 2026 verification date that was already
stale and would keep rotting; label remains without the date
- smoke.sh: add /api/setup (public), /api/checkout/personal, and
/api/stripe/portal (accepts 401 + 503 when Stripe not configured);
extend check_route with extra_ok_code param for integration-gated routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Added /api/health (public), /api/control/agent, /api/control/commands,
/api/captures, and /api/beacon-settings to smoke coverage. All return
expected status codes (200 for public, 401 for auth-required routes).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
PAGE_ROUTES was missing /history, /thoughts, /settings (all in
NAV_ITEMS per the comment's own rule) and /whitepaper (public page).
Routes match navigation.ts NAV_ITEMS order for easier diffing.
AUTH_API_ROUTES grows from 5 to 10 — adds /api/me, /api/user-projects,
/api/invitations, /api/sessions, /api/prompts/agent. Each confirmed to
have a GET handler before adding. /api/subscriptions omitted (POST-only).
All 28 routes verified green against the running dev server.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
smoke.sh was always exiting 1 because auth-required API routes correctly
return 401 without a session — but the script treated anything ≥400 as a
failure. Splits routes into PUBLIC_API_ROUTES (must 2xx) and AUTH_API_ROUTES
(200 or 401 both pass), so the check meaningfully detects 500s without
requiring a live session. When COCKPIT_SESSION_TOKEN is set, all requests
are authenticated and the full DB/query layer is exercised (20/20 routes).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace 76 sequential execSync calls (19 projects × 4 git commands)
with Promise.all — all projects and the pgrep check now run in parallel.
Event loop no longer blocks on each request; response time drops from
~40s to ~2s.
Also: add /control and /api/control to smoke.sh route lists; bump
reachability probe timeout from 5s to 20s for dev-mode compilation.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Status-only smoke missed a real failure mode: when a Server Component
throws, Next.js renders src/app/error.tsx ("Something went wrong")
INSIDE a 200 response. The page is broken from the user's perspective,
but smoke would mark it ok.
Refactor into a check_route helper that pages call with body-content
checking enabled. Greps the response body for the error-boundary
marker; failing-when-found means the run page doubles as a sanity
check on every server component, not just the route resolver.
API routes skip the body check (the marker is HTML-only and an API
that returned the literal string would be unusual).
Verified: all 18 routes still pass; the grep would catch a fake
error response if one were served.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Static-list smoke caught compile + db breakage but missed regressions
specific to [id] route handlers — readIdParam errors, per-row drizzle
queries, the parameter-handling lifecycle, etc.
Discover the first person id from /api/people (already smoked), then
GET /api/people/<id> and assert 2xx/3xx. Skipped silently if jq isn't
installed or the list is empty, so the script stays portable.
Other dynamic GETs (/api/projects/<id>) aren't smoked because no list
endpoint exists to derive an id without an extra DB roundtrip.
18 routes total now pass.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Page-only smoke caught compile-time route breakage but missed
server-side regressions: a broken Drizzle query would render every
page as "Error" yet still return 200. Add the DB-backed API GETs:
/api/goals, /api/habits, /api/people, /api/events, /api/crons,
/api/system
Tool-dependent endpoints (/api/calendar, /api/weather, /api/github)
stay out of the default run because they need the local Ivy gateway
and would flake on machines that don't have it.
Verified: all 17 routes (11 pages + 6 APIs) return 200 against the
running dev server.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Until now the codebase had zero automated coverage; every refactor
relied on a manual curl loop. scripts/smoke.sh runs that loop in one
command: probe BASE/, then GET every page route and assert 2xx/3xx.
- Routes match config/navigation.ts NAV_ITEMS plus the / redirect
- BASE env var override for prod smoke (defaults to localhost:3000)
- Fast-fails with a clear "start the dev server first" message if
the base is unreachable, instead of dribbling 11 curl errors
- No new dependencies — bash + curl only
Verified: all 11 routes return 200 against the running dev server.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>