Commit Graph
14 Commits
Author SHA1 Message Date
CatoandClaude Opus 5.5 291f98adad chore(copy): bring public copy and the fleet register up to date (#1050)
- /fleet no longer says "no site yet" for loki, orangecat and bitbaum:
  a project's own live URL counts as a site when apps.conf has no row
  (they are served from the main Caddyfile), as the fleet map already did.
- An owner the register marks with "?" is never shown as a partner:
  /fleet printed "with Stadt Zürich?" for the Reparaturbonus concept, and
  the website concierge would have said "a pilot built with Stadt Zürich?".
- Loki's chat is not open-weight only: the chain is Groq (gpt-oss, qwen),
  then Google (Gemini), then OpenRouter, and llama left it in 2026-08.
  /why, /roadmap and /how-it-works now say that.
- /download: the Linux step described the AppImage chmod while showing
  the .deb install line; the update note now says .deb updates need the
  one command the banner shows.
- README: Next.js 16 (was a stale 16.2.6 pin; package.json is 16.3.8).
- packages/agent licence UNLICENSED -> MIT, matching the repo.
- CHANGELOG 2026-10-05 entry and a ROADMAP Shipped item for Make it yours.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-07 04:52: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
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
7b4dc80188 chore(infra): remove/repoint Vercel references — everything is self-hosted now (#93)
Vercel is fully decommissioned; every app runs self-hosted on the Hetzner
box behind Caddy. Repoint live references at fleetcrown.orangecat.ch and
correct stale current-setup claims. Historical/factual references (migration
record, decommission checklist, thoughts essays, package-lock deps) are left
intact as accurate history.

- packages/agent/bin/fleetcrown-agent.js: DEFAULT_BASE_URL and curl install
  examples pointed at the dead fleetcrown.vercel.app host → orangecat.ch.
- src/app/api/project/bootstrap/route.ts: reword the deploy step to describe
  the self-hosted build→rsync→systemd/Caddy flow without naming Vercel.
- src/app/layout.tsx: neutralize the Geist font comment.
- docs/infrastructure/hetzner-migration.md: gen-env.sh description said it
  pulls from `vercel env pull`; the actual script reads the captured env
  backup (~/dev/env-backup) with no Vercel CLI — corrected to match reality.

Co-authored-by: x <x@x>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 21:36:00 +02:00
Georgy Butaev e30c842869 feat(desktop) + fix(design,lint): project selection + auto-sync + Sync to Web (ck_* token); canonical injectIntoTab + real appendEvent bridge.dispatch/worker.started in Fleet Runner runtime (replaces fake in-memory); hardened zellij.ts (session resolution + -- write-chars); ui-public-download-* + --public-accent (zero design violations); full cockpit->fleetcrown rebrand in desktop/scripts/docs/thoughts/marketing/home; update desktop README + docs/desktop-app.md with capabilities + gaps (in-memory vs real log)
- desktop build clean, tsc clean, lint 0, home/ 89/89
- advances desktop-2/3: dispatches now produce durable events in ~/.fleetcrown/events.jsonl with proper runId/sentinel so stop-hooks and web control plane treat them as first-class
- still no embedded watcher (idle via co-running home/watcher.ts for now)

Refs: desktop-app.md phases, Cockpit.roadmap T1/T2, prior landing 2d98638
2026-06-02 14:54:51 +02:00
Georgy Butaev b08ac4da14 feat(desktop): project selection + auto-sync on connect + Sync to Web (agent token to /runtime-state); switch to canonical injectIntoTab; ui-public-download-* classes (zero design violations); forward custom prompts as queueHead; clean lint; broad docs/marketing/scripts updates for FleetCrown desktop runtime 2026-06-02 12:17:12 +02:00
g-but b869bedd4c feat(control): make local agent runtime self-healing 2026-05-26 19:34:14 +02:00
g-but 94d50da677 fix(agent): advertise hosted installer command 2026-05-26 13:26:21 +02:00
g-but cfe7be0322 fix(agent): ship install-daemon.sh in the bundle + wire --install to find it
After f3a08fd a new customer's daemon supports all three agents, but it
still dies on shell exit — the install incantation says "start the
daemon: ~/.local/share/cockpit/cockpit-daemon.sh" which is a foreground
process. The `--install` flag was supposed to register a systemd user
service via install-daemon.sh, but that file wasn't in the bundle and
the agent CLI only looked in process.cwd()/scripts/.

Three-file change:

  • route.ts FILES + next.config.ts outputFileTracingIncludes add
    install-daemon.sh (now 12 files in the bundle).
  • cockpit-agent.js --install handler now prefers ${DAEMON_DIR}/
    install-daemon.sh, falling back to process.cwd()/scripts/install-
    daemon.sh for developers running from inside the repo.

install-daemon.sh's existing structure works in the flat ~/.local/share/
cockpit/ layout without modification: WorkingDirectory + ExecStart use
$SCRIPT_DIR (= the daemon dir, all 12 files siblings), and the token
arrives via env from the CLI's spawn — bypassing the PROJECT_DIR/
.env.local fallback that would have been wrong for non-clone users.

After this, `curl … | node - init --token ck_… --install` enrolls the
daemon as a systemd user service in one shot — survives shell exit,
reboot, and restarts on failure.
2026-05-25 01:06:05 +02:00
g-but b2bc97fd2c fix(agent): make the token prompt work when CLI is piped via curl|node -
The documented install path is curl … | node - init, but node consumes
process.stdin to receive the script body, leaving stdin at EOF by the
time the script runs. If the user omits --token, the prompt() call
printed "Paste your ck_* agent token:" and silently terminated — the
readline closed immediately on EOF, the answer was empty, the next
check exited the process with no useful error to the user. Verified
the silent failure locally before fixing.

Two changes:

  1. prompt() now opens /dev/tty directly when process.stdin isn't a
     TTY, so the user can still type a token even when the script body
     came in through a pipe. Standard installer pattern (rustup, brew,
     nvm). Falls back to process.stdin where /dev/tty doesn't exist
     (Windows) — in that case --token is the only path forward.

  2. Before prompting, check that we have *some* TTY (stdin or stdout).
     If neither is a TTY (CI, sandboxes, daemons), exit 2 with the
     clean message "Non-interactive environment: pass --token ck_… as
     an argument." instead of hanging on an unread prompt.

Verified:
  • cat agent.js | node - init  (no token, no TTY) → exits 2, clear msg
  • cat agent.js | node - init --token ck_invalid → 401 as before
  • Tsc/eslint clean.
2026-05-25 00:47:11 +02:00
g-but 878b4d7a60 fix(agent): correct help text + retry hint after install changes
After 02c2551 (init now installs daemon scripts to ~/.local/share/cockpit/)
and fcc56f1 (route verified live), three customer-facing lines in the
agent CLI were still wrong:

  • `init` command description didn't mention daemon install — said only
    "Save daemon token and verify connectivity"
  • "After init, start the daemon: source ${ENV_FILE} && cockpit-daemon.sh"
    assumes cockpit-daemon.sh is on PATH (it isn't); correct path is
    ${DAEMON_DIR}/cockpit-daemon.sh
  • Both the help Examples and the soft-fail retry hint referenced
    `npx @cockpit/agent init` — a command that does not work because the
    package isn't on npm; new customers can only get here via curl|node

Rewrites the help to:
  - Describe what init actually does
  - Document the install/upgrade incantation (curl|node -)
  - Show the correct daemon start path
  - Keep --install in the option list but note it's repo-clone-only for
    now (the only path that still works there; ship a proper
    ~/.local/share/cockpit/install-daemon.sh in a follow-up)

Soft-fail retry hint now prints the same curl|node command with the
token already filled in, so the user can paste and retry without
having to remember the form.
2026-05-25 00:37:55 +02:00
g-but 02c2551ee6 feat(onboarding): one-command public installer for the local daemon
Closes the second half of the connect-step gap. Last week's 422873a
made `curl|node - init --token X` reachable for new customers (the
agent CLI was served via /api/agent/install). 15727a7 added an
honesty disclaimer that the daemon scripts still required a Cockpit
repo clone. This commit removes the disclaimer by shipping the
scripts the same way.

  • New /api/agent/daemon route spawns `tar -czf - -C scripts/ …`
    with the 4 daemon files (~1500 lines bash: cockpit-daemon.sh,
    _brand.sh, agent-hook-lib.sh, agent-hook-bridge.sh) and returns
    the gzipped tarball (~20 KB).

  • next.config.ts outputFileTracingIncludes pins those 4 source
    files to the route so Vercel ships them in the bundle (the route
    reads them via spawn at runtime — they'd otherwise be tree-shaken).

  • src/proxy.ts matcher exception adds api/agent/daemon so the
    download works pre-auth.

  • packages/agent/bin/cockpit-agent.js gets a new downloadDaemon()
    step inside `init`: after writeEnvFile, fetch the tarball, pipe
    into `tar -xz -C ~/.local/share/cockpit`, chmod +x the two
    executables. Soft-fail with a warning if it errors — the token
    write still lands and the user can retry by re-running init.

  • ConnectMachineStep step 3 drops the "requires repo clone, public
    installer coming soon" caveat in favor of the actual path
    (~/.local/share/cockpit/cockpit-daemon.sh).

After this, a brand-new customer's path is:
  1. Sign up + onboarding (username + project + connect)
  2. Generate token → copy one curl command → paste into terminal
  3. ONE command installs both the env file AND the daemon scripts
  4. Run ~/.local/share/cockpit/cockpit-daemon.sh and they're live

No repo clone. No npm publish dependency. Customer-#2-ready.
2026-05-25 00:20:36 +02:00
g-but 15727a706e fix(onboarding): tell the truth about the daemon requiring a repo clone
Last commit (422873a) made step 2 of the connect flow work for new
customers, but step 3 — "Start the daemon: ./scripts/cockpit-daemon.sh"
— was still a lie: the agent CLI only writes a token env file, it does
not install the 783-line daemon script. New customers would copy that
path, get "No such file or directory", and assume they did something
wrong.

Update both surfaces (the onboarding UI's step 3 + the CLI's post-init
"Next steps" output) to acknowledge that the daemon currently requires
a Cockpit repo clone and flag a one-line public installer as coming
soon. The "Skip for now" button on the step already lets non-developer
customers complete onboarding and explore the cloud — the copy now
makes that the explicit, honest path.

Does not change behavior. The real fix (serve scripts/cockpit-daemon.sh
+ _brand.sh + agent-hook-lib.sh via /api/agent/daemon, with a bash
installer that drops them into ~/.local/share/cockpit) is queued — out
of scope for one commit (1500+ lines of bash, multi-file tracing).
2026-05-25 00:03:38 +02:00
g-butandCursor 6fb9c199b2 feat: harden cloud onboarding with agent CLI, private zone, and cron DB
Add @cockpit/agent init, server-side PIN enforcement for private APIs,
Postgres-backed cron jobs, daemon auto-continue sync, and cloud/local docs
so SaaS users get a clear path from browser signup to local dispatch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-21 15:20:03 +02:00