mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 15:08:38 +01:00
dependabot/github_actions/actions/setup-node-7
16
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
39474428d7 |
docs: clear docs-truth drift and retired names (#1322)
- Fix stale paths/links in docs (model-vendors billingUrl, agent adapter placeholder, bridge host setup, entitlements not yet created, tokens module). - hetzner-migration: current hosts (evig, aoz) and a pointer to scripts/hetzner/apps.conf as the live app list. - Archive two point-in-time records (fleet-runner-pty-ownership, terminal-parity) into docs/archive with a README; fix inbound refs. - Thoughts essays: repo aoz-housing is now aoz-begleitung. Claude-Session: https://claude.ai/code/session_01PJkbo18cRNXtgPWZN2S9cD Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
6e7d534ced |
chore(deps): bump the minor-and-patch group across 1 directory with 19 updates (#1084)
Bumps the minor-and-patch group with 19 updates in the / directory: | Package | From | To | | --- | --- | --- | | [@bitbaum/ai-kit](https://github.com/bitbaum/ai-kit) | `1.18.0` | `1.20.1` | | [drizzle-orm](https://github.com/drizzle-team/drizzle-orm) | `0.45.2` | `0.45.3` | | [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `1.41.0` | `1.52.0` | | [react](https://github.com/react/react/tree/HEAD/packages/react) | `19.2.8` | `19.3.0` | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `19.2.18` | `19.3.0` | | [react-dom](https://github.com/react/react/tree/HEAD/packages/react-dom) | `19.2.8` | `19.3.0` | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `19.2.7` | `19.3.0` | | [shadcn](https://github.com/shadcn-ui/ui/tree/HEAD/packages/shadcn) | `4.21.0` | `4.21.2` | | [shiki](https://github.com/shikijs/shiki/tree/HEAD/packages/shiki) | `4.4.3` | `4.5.0` | | [tailwind-merge](https://github.com/dcastil/tailwind-merge/tree/HEAD/packages/tailwind-merge) | `3.6.0` | `3.7.0` | | [ws](https://github.com/websockets/ws) | `8.21.3` | `8.22.0` | | [@types/ws](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ws) | `8.18.1` | `8.18.2` | | [zod](https://github.com/colinhacks/zod) | `4.5.4` | `4.6.5` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `26.4.1` | `26.6.4` | | [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) | `19.2.18` | `19.3.0` | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `19.2.7` | `19.3.0` | | [drizzle-kit](https://github.com/drizzle-team/drizzle-orm) | `0.31.10` | `0.31.11` | | [eslint](https://github.com/eslint/eslint) | `10.10.0` | `10.12.0` | | [prettier](https://github.com/prettier/prettier) | `3.9.6` | `3.9.9` | | [tsx](https://github.com/privatenumber/tsx) | `4.23.13` | `4.23.15` | | [pg](https://github.com/brianc/node-postgres/tree/HEAD/packages/pg) | `8.23.0` | `8.23.1` | Updates `@bitbaum/ai-kit` from 1.18.0 to 1.20.1 - [Commits](https://github.com/bitbaum/ai-kit/compare/v1.18.0...v1.20.1) Updates `drizzle-orm` from 0.45.2 to 0.45.3 - [Release notes](https://github.com/drizzle-team/drizzle-orm/releases) - [Commits](https://github.com/drizzle-team/drizzle-orm/compare/0.45.2...0.45.3) Updates `lucide-react` from 1.41.0 to 1.52.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.52.0/packages/lucide-react) Updates `react` from 19.2.8 to 19.3.0 - [Release notes](https://github.com/react/react/releases) - [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/react/react/commits/v19.3.0/packages/react) Updates `@types/react` from 19.2.18 to 19.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) Updates `react-dom` from 19.2.8 to 19.3.0 - [Release notes](https://github.com/react/react/releases) - [Changelog](https://github.com/react/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/react/react/commits/v19.3.0/packages/react-dom) Updates `@types/react-dom` from 19.2.7 to 19.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Updates `shadcn` from 4.21.0 to 4.21.2 - [Release notes](https://github.com/shadcn-ui/ui/releases) - [Changelog](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/CHANGELOG.md) - [Commits](https://github.com/shadcn-ui/ui/commits/shadcn@4.21.2/packages/shadcn) Updates `shiki` from 4.4.3 to 4.5.0 - [Release notes](https://github.com/shikijs/shiki/releases) - [Commits](https://github.com/shikijs/shiki/commits/v4.5.0/packages/shiki) Updates `tailwind-merge` from 3.6.0 to 3.7.0 - [Release notes](https://github.com/dcastil/tailwind-merge/releases) - [Commits](https://github.com/dcastil/tailwind-merge/commits/tailwind-merge@3.7.0/packages/tailwind-merge) Updates `ws` from 8.21.3 to 8.22.0 - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/8.21.3...8.22.0) Updates `@types/ws` from 8.18.1 to 8.18.2 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ws) Updates `zod` from 4.5.4 to 4.6.5 - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](https://github.com/colinhacks/zod/compare/v4.5.4...v4.6.5) Updates `@types/node` from 26.4.1 to 26.6.4 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@types/react` from 19.2.18 to 19.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) Updates `@types/react-dom` from 19.2.7 to 19.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Updates `drizzle-kit` from 0.31.10 to 0.31.11 - [Release notes](https://github.com/drizzle-team/drizzle-orm/releases) - [Commits](https://github.com/drizzle-team/drizzle-orm/compare/drizzle-kit@0.31.10...drizzle-kit@0.31.11) Updates `eslint` from 10.10.0 to 10.12.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v10.10.0...v10.12.0) Updates `prettier` from 3.9.6 to 3.9.9 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.9.6...3.9.9) Updates `tsx` from 4.23.13 to 4.23.15 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.23.13...v4.23.15) Updates `pg` from 8.23.0 to 8.23.1 - [Changelog](https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md) - [Commits](https://github.com/brianc/node-postgres/commits/pg@8.23.1/packages/pg) --- updated-dependencies: - dependency-name: "@bitbaum/ai-kit" dependency-version: 1.20.1 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/node" dependency-version: 26.6.4 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/react" dependency-version: 19.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/react" dependency-version: 19.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/react-dom" dependency-version: 19.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/react-dom" dependency-version: 19.3.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@types/ws" dependency-version: 8.18.2 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: drizzle-kit dependency-version: 0.31.11 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: drizzle-orm dependency-version: 0.45.3 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: eslint dependency-version: 10.12.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: lucide-react dependency-version: 1.52.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: pg dependency-version: 8.23.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: prettier dependency-version: 3.9.9 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: react dependency-version: 19.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: react-dom dependency-version: 19.3.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: shadcn dependency-version: 4.21.1 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: shiki dependency-version: 4.5.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: tailwind-merge dependency-version: 3.7.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: tsx dependency-version: 4.23.15 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: ws dependency-version: 8.22.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: zod dependency-version: 4.6.5 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
dbd6cbea8e |
refactor: one definition per concern — 12 duplicated helpers and clones consolidated (#729)
* refactor(ai): one reader for a model's JSON answer, not four that disagree
`extractJson` existed four times with three different algorithms, and which
copy a caller reached for decided which model quirks it survived:
digest-producer sliced first `{` to last `}` and never returned null;
frontier/digest handled code fences but not `</think>` leaks; dod-gate handled
`</think>` but not fences (its own comment called itself "a third hand-rolled
copy"); only frontier/propose did both. `parseModelJson` was a fifth and sixth
copy in project-brief and business-plan.
src/lib/ai/model-json.ts is the union of what each knew — strip reasoning,
unwrap a fence (unless the fence holds something else, like a shell snippet),
then scan for the first BALANCED object. The scan is now string-aware, which
fixes a bug every copy shared: a `}` inside a string value closed the object
early, so a DoD verdict whose gap text quoted a brace was silently read as
"met" — the judge's actual answer thrown away by its own reader. A
trailing-comma repair runs only after a strict parse has already failed, so it
can never change the reading of valid JSON.
scripts/test/model-json.ts pins the real shape each of the six callers feeds
it, plus the truncated reply that propose.ts's salvage path depends on
returning null.
Also: `sleep` was defined three times. src/lib/async.ts serves the app and
desktop (which resolves `@/*` to ../src). bridge keeps its own with a comment
saying why — its tsconfig pins `rootDir: "src"`, so nothing outside that
directory can compile into it.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
* refactor(api): one rate limiter and one JSON POST wrapper
The PIN route kept its own attempts Map beside lib/rate-limit — a second
limiter with the unbounded growth limitkit's bounded store exists to prevent,
and untested, which for a limiter is indistinguishable from one that always
returns true. It now calls checkRateLimit; the 5-per-minute-per-user VALUES
stay in the route, which is the part that is its business.
scripts/test/rate-limit.ts pins both halves. The second half is the one that
matters: getClientIp must read the LAST X-Forwarded-For hop. Six sibling repos
shipped the first-hop version, where the client writes the leftmost value — a
fresh invented hop per request is a fresh bucket per request, so no bucket ever
fills and the limiter cannot be tripped. limitkit 0.2.0 already counts from the
right; nothing else in this repo reads the header at all. The test writes the
bypass out so a regression fails loudly instead of silently.
terminal-transport's postJson was a sixth copy of the fetch boilerplate
lib/api/fetch already wraps. It now composes: the shared postJson plus the
swallow that keeps a dropped keystroke from becoming an unhandled rejection.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
* refactor(agent-execution): one PTY executor, two ways to spawn
LocalPtyExecutor and SandboxExecutor differed in exactly two places — how the
PTY is born, and what terminate() cleans up afterwards. The other 74 lines
(workspace map, ring buffer, sequence numbers, replay on reconnect, the
running→idle timer, listener isolation) were copied between them, and had
already drifted in their comments. The next fix to the event stream would have
landed in one substrate and not the other, which is a bug you can only see by
flipping LOKI_EXECUTOR.
PtyExecutor owns that half. A backend implements `launch` and, if it owns
anything outside the PTY, `afterTerminate` — SandboxExecutor's docker rm -f is
the only instance. "Both backends behave identically" is now a fact about the
code rather than a claim about two files.
Behaviour is unchanged: both existing suites (test:executor, the real PTY
round-trip including the idle flip and replay; test:sandbox-executor, the
docker argv) pass untouched.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
* refactor(ui): say the repeated things once — attrs routes, repo pickers, today, PIN forms
Four clones, each a case of a file repeating itself rather than two files
repeating each other:
- /api/people/[id]/attrs and /api/robots/[id]/attrs were the same handler
twice. Attributes live in one table keyed by entity id, so the request IS the
same; the only real difference is that robots first proves the id is a robot
the caller owns, so /api/robots/<a person's id>/attrs cannot write through
the wrong door. That check is now a `guard` parameter, run before the body is
read exactly as before, and responses are byte-identical.
- RepoPicker and RepoMultiPicker each carried the language-colour map, the
/api/github/repos fetch and the row markup. The row takes a `lead` slot
rather than a `multi` flag: the multi picker puts a checkbox in front of the
lock, the single picker puts nothing, and neither component learns about the
other. What selecting MEANS is the only thing they still differ in.
- /today wrote `<Suspense fallback={<CardSkeleton />}>` eleven times and the
same two-column grid four times, which buried what the page is actually
saying — which decisions come first — under its loading mechanics.
- PrivacySettings' three PIN forms shared a submit envelope, a validation pair
and a button row. Each form still owns its fields and its own call.
Rendered output is unchanged in all four; tsc, lint and check:design are green.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
* refactor: one site-slug list, one account-fields block, one signed-webhook door
Three more single-definition fixes, each where the duplicate was a door:
- lib/site-cd and lib/hosted-runner/new-site each carried a
character-for-character copy of the reserved-label list and the DNS slug
grammar. That is the shape of duplication that quietly stops being identical:
a label added to one is a door left open in the other. lib/site-slug now owns
both, with no imports of its own so the hosted runner does not pull the
GitHub provisioning graph in just to reject a slug.
scripts/hetzner/new-site.sh keeps its own copy and stays the authority.
- /setup and SignUpForm wrote the same name/password/confirm block twice, down
to the placeholders and autocomplete hints — which matter: a password manager
keys off those, so drift between the two forms is drift in whether saved
credentials work. CreateAccountFields renders the email field only when
sign-up passes one.
- The three /api/orangecat receivers each reassembled the same front door:
refuse if unconfigured, verify the HMAC over the RAW body, then parse and
validate. The ORDER is what matters, not the code — the signature covers the
bytes so it must be checked before anything parses them, and the secret
before that, since with no secret a signed and an unsigned request are the
same request. readSignedOrangeCatBody is now that door; a fourth receiver
gets it right by construction. Responses are byte-identical.
site-cd (43), hosted-new-site (39) and the webhook HMAC contract tests pass
unchanged.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
* refactor(lib): single definitions for escapeLike, decodeEntities, formatDate, normalizeName
Four helpers that existed twice each. Two of the pairs were not merely
redundant — they disagreed, and in both cases one side was wrong.
- decodeEntities: the atlas copy decoded `&` FIRST, so "&lt;" became
"<" became "<" — text a site had deliberately escaped turned back into
markup. The frontier copy did it last, correctly, and also handled CDATA and
`'`. One function now, `&` last, with a test that states why.
- escapeLike: identical in people.ts and robots.ts, but it is the LIKE-wildcard
escape — without it a search for "100%" matches every row. It now lives in
lib/sql-escape.ts rather than beside the queries, because it is pure string
work and that lets the unit suite run it without a DATABASE_URL. Tested,
including the backslash case, which is the one a "simplification" breaks.
- formatDate: two pages, one name, different output — worse than two names,
because reading one told you nothing about the other. lib/dates now exports
`longDate(value, { weekday })`, which also pins a bare YYYY-MM-DD to UTC noon
so a date column never renders as the previous day west of Greenwich.
- normalizeName: these two are genuinely different jobs (person-name folding vs
project-name matching), so the fix is honest naming, not a merge. The project
one is `normalizeProjectName`; one name meaning two rule sets is a bug
waiting for whoever imports the wrong one.
scripts/test/text-helpers.ts pins escapeLike and decodeEntities, including the
double-decode the consolidation fixed.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
* fix(gates): teach the route-auth gate the new guard doors, and leave desktop/ alone
Two gates caught this branch, both correctly.
api-route-auth requires every route to NAME its auth mechanism. Moving the
OrangeCat HMAC check and the attrs guard behind shared helpers meant four
routes stopped naming one. The mechanisms are registered now — a route that
delegates names the delegate — and the helpers are noted as wrappers over
mechanisms already in the list, not as new ones.
Worse, and invisible: the same file derives "which routes authenticate
themselves" from markers in the source, then checks each one is exempt from the
session middleware. With the marker gone it found ZERO routes and reported
success — a check that silently examined nothing, which is the exact failure it
was written to prevent (a signed receiver behind the middleware 401s every
caller and reads like a wrong secret). It now fails when the marker set matches
nothing; proved by mutation — emptying SELF_AUTH_MARKERS fails the gate.
desktop-release-drift refused the `sleep` consolidation there, and it is right
to: desktop/ ships as a versioned release, so any change under it obliges a
version bump and a published Fleet Runner build. Three lines of helper is not
worth asking every machine to update, so desktop/src/main/dispatch.ts is
restored byte-for-byte and the reasoning is recorded in src/lib/async.ts, where
it costs no release.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012KAn51JHFcTrPeCjZDGXM8
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
|
||
|
|
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> |
||
|
|
64d931004d |
chore(deps-dev): bump @types/node from 20.19.43 to 26.4.1 (#527)
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.19.43 to 26.4.1. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 26.4.1 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
273a795b34 |
chore(deps): bump the minor-and-patch group with 11 updates (#525)
Bumps the minor-and-patch group with 11 updates: | Package | From | To | | --- | --- | --- | | [@noble/secp256k1](https://github.com/paulmillr/noble-secp256k1) | `3.1.0` | `3.2.0` | | [@sentry/nextjs](https://github.com/getsentry/sentry-javascript) | `10.72.0` | `10.73.0` | | [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) | `1.35.0` | `1.41.0` | | [next](https://github.com/vercel/next.js) | `16.3.3` | `16.3.4` | | [shadcn](https://github.com/shadcn-ui/ui/tree/HEAD/packages/shadcn) | `4.19.0` | `4.21.0` | | [zod](https://github.com/colinhacks/zod) | `4.5.1` | `4.5.4` | | [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom) | `19.2.5` | `19.2.7` | | [eslint](https://github.com/eslint/eslint) | `10.9.1` | `10.10.0` | | [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) | `16.3.3` | `16.3.4` | | [playwright](https://github.com/microsoft/playwright) | `1.62.1` | `1.63.0` | | [tsx](https://github.com/privatenumber/tsx) | `4.23.12` | `4.23.13` | Updates `@noble/secp256k1` from 3.1.0 to 3.2.0 - [Release notes](https://github.com/paulmillr/noble-secp256k1/releases) - [Changelog](https://github.com/paulmillr/noble-secp256k1/blob/main/CHANGELOG.md) - [Commits](https://github.com/paulmillr/noble-secp256k1/compare/3.1.0...3.2.0) Updates `@sentry/nextjs` from 10.72.0 to 10.73.0 - [Release notes](https://github.com/getsentry/sentry-javascript/releases) - [Changelog](https://github.com/getsentry/sentry-javascript/blob/10.73.0/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-javascript/compare/10.72.0...10.73.0) Updates `lucide-react` from 1.35.0 to 1.41.0 - [Release notes](https://github.com/lucide-icons/lucide/releases) - [Commits](https://github.com/lucide-icons/lucide/commits/1.41.0/packages/lucide-react) Updates `next` from 16.3.3 to 16.3.4 - [Release notes](https://github.com/vercel/next.js/releases) - [Commits](https://github.com/vercel/next.js/compare/v16.3.3...v16.3.4) Updates `shadcn` from 4.19.0 to 4.21.0 - [Release notes](https://github.com/shadcn-ui/ui/releases) - [Changelog](https://github.com/shadcn-ui/ui/blob/main/packages/shadcn/CHANGELOG.md) - [Commits](https://github.com/shadcn-ui/ui/commits/shadcn@4.21.0/packages/shadcn) Updates `zod` from 4.5.1 to 4.5.4 - [Release notes](https://github.com/colinhacks/zod/releases) - [Commits](https://github.com/colinhacks/zod/compare/v4.5.1...v4.5.4) Updates `@types/react-dom` from 19.2.5 to 19.2.7 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) Updates `eslint` from 10.9.1 to 10.10.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Commits](https://github.com/eslint/eslint/compare/v10.9.1...v10.10.0) Updates `eslint-config-next` from 16.3.3 to 16.3.4 - [Release notes](https://github.com/vercel/next.js/releases) - [Commits](https://github.com/vercel/next.js/commits/v16.3.4/packages/eslint-config-next) Updates `playwright` from 1.62.1 to 1.63.0 - [Release notes](https://github.com/microsoft/playwright/releases) - [Commits](https://github.com/microsoft/playwright/compare/v1.62.1...v1.63.0) Updates `tsx` from 4.23.12 to 4.23.13 - [Release notes](https://github.com/privatenumber/tsx/releases) - [Changelog](https://github.com/privatenumber/tsx/blob/master/release.config.cjs) - [Commits](https://github.com/privatenumber/tsx/compare/v4.23.12...v4.23.13) --- updated-dependencies: - dependency-name: "@noble/secp256k1" dependency-version: 3.2.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: "@sentry/nextjs" dependency-version: 10.73.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: lucide-react dependency-version: 1.41.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: next dependency-version: 16.3.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: shadcn dependency-version: 4.21.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: zod dependency-version: 4.5.4 dependency-type: direct:production update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: "@types/react-dom" dependency-version: 19.2.7 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: eslint dependency-version: 10.10.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: eslint-config-next dependency-version: 16.3.4 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch - dependency-name: playwright dependency-version: 1.63.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: minor-and-patch - dependency-name: tsx dependency-version: 4.23.13 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: minor-and-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> |
||
|
|
65dea6f303 |
chore: pnpm — the fleet has one package manager (#478)
* chore: pnpm — the fleet has one package manager - packageManager pnpm@11.25.0; lockfile via pnpm import, package-lock.json removed; npm "workspaces" replaced by pnpm-workspace.yaml packages (packages/agent), and bridge/ joins the workspace — one install, one lockfile, its own package-lock.json removed - npm "overrides" (fast-uri pin) moved to pnpm-workspace.yaml (pnpm ignores the npm-only field) - allowBuilds: better-sqlite3, node-pty, @sentry/cli, native toolchain, and the two git-hosted deps (@fleet/ai-forms, limitkit — pnpm wants the exact resolved spec, keys move with the pinned tags); temporary minimumReleaseAgeExclude for our own @bitbaum/ai-kit@0.6.2 - phantom deps declared: @auth/core (src/auth.ts augments @auth/core/jwt — TS2664 under pnpm's strict layout), dotenv, sharp (scripts) - CI/audit/deploy workflows: pnpm/action-setup@v6, store-dir pinned outside the action's bin dir, cache: pnpm, frozen-lockfile; deploy's separate `npm --prefix bridge ci` is covered by the workspace install; Next cache key hashes pnpm-lock.yaml; npm audit → pnpm audit - desktop-release: root install → pnpm; desktop/ itself STAYS an npm package (own package-lock.json, electron toolchain untouched) - husky: pre-push staleness gate now compares pnpm-lock.yaml against node_modules/.modules.yaml; hooks + scripts (deploy-hetzner, hetzner/deploy, install-app, doctor, smoke) converted to pnpm - check-deploy-ready fleet gate now recognizes pnpm verify/test lines too Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn * fix: prettier-format pnpm-workspace.yaml — format:check gates verify Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn --------- Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
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> |
||
|
|
4d1c9f1fe7 |
chore: migrate the fleet to the bitbaum org (#415)
* chore(ci): GitHub owner catomean -> bitbaum * docs(hetzner): update _box-env.sh comments for the completed org migration The GH_OWNER/WORKFLOW_OWNER comments described a future state (repos moving to bitbaum while fleetcrown stayed personal) that sweep-gh-owner.sh just made true, then obsolete: fleetcrown itself is in bitbaum now too. Comments describing a plan that already happened are worse than no comment — they send the next reader looking for a divergence that isn't there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN * chore(desktop): release 0.8.15 — the org-migration owner literals Same shape as 0.8.14: desktop/ carries two literal owner references (issue link, updater feed owner) that a fleet-wide rename touches, and desktop-release-drift.ts correctly refuses to let that ship without a version bump — a repo whose desktop app silently points at a dead update feed is worse than one that fails the gate. This should be the last time it's an account name: the org is the stable home from here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN --------- Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com> |
||
|
|
45938e60cf |
fix(ci): unbreak the gates — dependency graph, agent-core drift, desktop release (#400)
* refactor(infra): studio constants get one home, and the rename gets a command Fair criticism: I spent the day arguing for SSOT and then wrote new-site.sh with its own copies of GH_OWNER, BASE_DOMAIN and DEV_ROOT, and hardcoded 'maonakamoto' again in provision-widget.ts. Worse, the pattern already existed — _box-env.sh is literally labelled 'SSOT' for the box address. I did not extend it, I duplicated around it. _box-env.sh now owns GH_OWNER, SITES_BASE_DOMAIN and DEV_ROOT alongside the box address, and new-site.sh and provision-widget.ts read them instead of carrying their own. The 41 workflow files are a different case and worth being precise about: GitHub Actions requires a LITERAL owner/repo in and will not accept a variable, so that duplication cannot be removed. But a duplication you cannot remove is one you have to OWN — leaving it as 'remember to edit 41 files' is exactly the shape of step that gets skipped, the same shape as the git repository Camille never got. So sweep-gh-owner.sh is committed: one command, dry-runnable, optionally self-committing. Dry run against the fleet: 24 repos, all detected correctly. Renaming to an org is now plus one line in _box-env.sh. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(infra): split WORKFLOW_OWNER from GH_OWNER before they diverge Same bug as the last commit, one layer down. The site template hardcoded maonakamoto/fleetcrown in its deploy.yml uses: line, derived from nothing — so every new site would bake in a literal that follows neither an account rename nor a move to an org. And GH_OWNER was quietly doing two jobs: where new site repos are CREATED, and where fleetcrown LIVES. They look identical today and are about to diverge — sites go to an org while fleetcrown stays on the personal account. One name for two values is how a rename half-works. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(ci): GitHub owner maonakamoto -> catomean * chore(infra): owner is catomean Account renamed maonakamoto -> catomean. sweep-gh-owner.sh swept 24 repos and the SSOT now agrees; 32 local remotes repointed. This is the commit the sweep script exists for. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * chore(ci): GitHub owner maonakamoto -> catomean * chore(ci): GitHub owner maonakamoto -> catomean * fix(desktop): cut 0.8.14 — the owner rename touched desktop code My owner sweep changed two files in desktop/ (an update URL and a package reference) without bumping the version. That is precisely the failure #370 existed to prevent: desktop code that changes without a release ships to the server and to no machine at all, silently. The gate caught it, four commits after it was written. Working as intended, and worth saying plainly — I was the one it caught. GitHub redirects repository URLs after a rename, but only until somebody claims the freed name. An auto-updater should not depend on a redirect. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ci): the gate fails on your diff, not on your laptop Three things in this hook blocked pushes for reasons unrelated to the change being pushed, and together they are why --no-verify became reflex here. I passed it eight times in one day and blamed the hook; the hook was reporting real problems with misleading attribution. 1. STALE INSTALL. An unresolvable dependency surfaced as 'Cannot find module' — indistinguishable from a type error in your code. Now a precondition that fails first, loudly, naming npm ci. A day was spent on this exact confusion. 2. AGENT-CORE DRIFT. Drift arises either because you changed canonical without syncing, or because somebody changed the mirror in the other repo. Only the first is yours. It now checks whether this branch touched src/lib/agent/core/ and warns instead of blocking when it did not. 3. SCHEMA DRIFT. The guard already skipped an unreachable database but not a reachable stale one, so a local scratch DB missing someone else's columns blocked pushes touching no schema. Now scoped: if the branch changes schema a mismatch is yours and blocks; otherwise it reports and continues. The pattern is taken from desktop-release-drift, which self-scopes to files changed since the last release and is the only check here that has never blocked an unrelated push. It caught me correctly today, four commits after it was written. Where scope cannot be established the checks still fail closed — a gate that cannot establish innocence should not grant it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix(ci): resolve the default branch, never assume main The diff-scoping added in the previous commit compares against origin/main. 28 repos here use main — but aoz-housing, dotfiles and sbb-lost-found use master, and six had no origin/HEAD set at all. On those, merge-base fails, the scoping falls through to 'cannot tell', and every check treats every change as in-scope. The gate I had just fixed would have gone back to blocking unrelated pushes on a fifth of the fleet, for a reason nobody would have connected to a branch name. default_branch() now lives in lib.sh and resolves in order: the remote's own origin/HEAD, then whichever of main/master exists, then fail. Never a guess. The pre-push hook and agent-core-drift both use it. Also ran 'origin/HEAD' is unchanged and points to 'main' on the six repos missing origin/HEAD. 32 of 33 now resolve; wild-spirit has no remote at all, which is a separate finding and the same shape as camille this morning. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(scaffold): every new site is born with CI ci-gate.sh cannot tell 'CI green' from 'no CI configured' — both exit 0. So a scaffolded site without a workflow deployed every push unverified while looking identical to one that passed. Substrata shipped to production that way for a day. The template now emits ci.yml alongside deploy.yml: npm ci, type-check, lint, build — the same bundle verify runs locally. Plus eslint.config.mjs, because ESLint 9 without a flat config exits non-zero on a migration notice and a new site's FIRST CI run would be red for reasons unrelated to its code. A red first run teaches people to ignore the light. Config copied from the fleet's working Next 16 apps, not invented. postcss.config.mjs assigns before exporting — the anonymous default export is a lint warning, and a scaffold should not emit its own warnings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(ci): no deployed app ships without CI, ratcheted to zero ci-gate.sh exits 0 for 'CI green' AND for 'no CI configured'. Absence is indistinguishable from success, so an app with no workflow deploys every push unverified while looking exactly like one that passed. Nothing reported it, because nothing was looking. The audit found two: camille-boulangerie, and sink — which is sinktattoo.com, a real client's site. sink turned out to be a FALSE POSITIVE, and that is the more useful finding: apps.conf pointed at /home/g/dev/s-ink, a path that does not exist, so the gate reasoned about an absent repository and reported the wrong fault. It sent me to add a workflow to a repo that already had one. The register was the bug. So the gate now distinguishes a stale register entry from a missing workflow and fails loudly on the former — a gate that lies about what to fix is worse than no gate. apps.conf repointed at /home/g/dev/aslan-tattoo. Camille genuinely had none and now does. Baseline is 0: a new deployed app without CI is a build failure. Tested in all four directions — over baseline fails, at baseline passes, under baseline passes and prompts, stale path fails. The first version could never fail at all: it set HERE before sourcing lib.sh, which overwrites HERE, so BASELINE_FILE pointed at a missing file and silently fell back to the current count. Found by testing the gate rather than trusting it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(scaffold): template ships .nvmrc Every new site now pins Node once, and both CI and the deploy read it. Without it the deploy warns and the two pipelines pick a version independently — the kind of difference that surfaces as 'green in CI, broken on the box'. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * feat(hetzner): scaffold sets the deploy key itself, from one configured path new-site.sh printed `gh secret set ...` and called that operator hygiene. What it actually produced was substrata live in production deploying only from a laptop, because a printed instruction is a step that gets skipped. The key is piped from DEPLOY_KEY_PATH straight into `gh secret set` — never read into a variable, a log, or an agent's context — so the safety argument that motivated the manual step is kept while the step disappears. Per-repo on purpose: GitHub Free does not expose org-level secrets to PRIVATE repositories, so an org secret alone would silently cover only part of the fleet. DEPLOY_KEY_PATH joins the other constants in _box-env.sh so there is one path, not one per script. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN * fix(ci): make the deploy-ready gate judge the diff, not the workstation The gate inspected the sibling checkouts under DEV_ROOT and nothing else. All 15 are cloned on the workstation, so it printed "all 15 deployed apps have CI"; CI clones this repo only, so the same commit printed fifteen missing repos and exited 1 — red on a diff that touched none of them. Third instance of one class: a gate judging state outside the commit. Its real cost is not the red run, it is that everyone learns the gate is noise and reaches for --no-verify. Split into the two halves that were tangled: REGISTER INTEGRITY — apps.conf lives in this repo, so it is in the diff, so CI must judge it. Now actually checked: field count, unique names, unique numeric ports. Previously nothing validated the register at all. FLEET INSPECTION — needs the checkouts. Where none exist it is announced as NOT RUN and exits 0. Announced, because "no output" and "all clear" looking identical is the bug this file was written to fix. Where some exist, a bad path is still drift and still fails. test:deploy-ready-gate locks it shut from both sides: a malformed register must fail even with no checkouts present, and a bare environment must never claim the fleet passed. Added to verify, so CI runs it in exactly the environment that used to break it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y9rKLxddothnXEtY6KDziN --------- Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Co-authored-by: t <t@t.t> |
||
|
|
033b780326 | feat(control): complete terminal and orchestration trust pass | ||
|
|
53eb54fbaf |
feat(bridge): non-durable rawkey/resize fast lane for terminal parity (P3.1)
Adds a cloud→runner transport for raw terminal keystrokes/resizes that rides the
existing fc:state NOTIFY channel but is discriminated by a `kind` field and
fanned out via a distinct SSE event name with NO id — so it bypasses both the
durable pending_commands path (a per-key DB row is catastrophic) and the
Last-Event-ID replay buffer (a replayed keystroke is wrong). Fire-and-forget.
- event-stream-types.ts (SSOT, shared cloud+runner): BRIDGE_NOTIFY_CHANNEL,
RawKeyEvent/ResizeEvent {kind,u,tab,b|c,r}, isFastLaneEvent
- bridge: listen.ts routes kind-events; server.ts fans them via fanoutRaw
(no logEvent); subscriptions.ts fanoutRaw (no id line); types.ts mirror
- bridge-publish.ts: publishFastLaneEvent → pg_notify('fc:state', ...)
Verified in isolation on prod: pg_notify a rawkey → SSE client received
`event: rawkey` with the payload and no id line; existing change path intact.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
0b737cbcad |
chore: purge remaining Vercel residuals (svg, .vercelignore, stale strings)
- Remove dead public/vercel.svg + .vercelignore (no Vercel deploys) - subscriptions.ts: GCP alternative 'Vercel Free (already using)' → 'Hetzner (already using)' (accurate) - bridge/.env.example + gen-env.sh: drop Vercel from comments; rename default env-backup dir vercel-env-backup → env-backup (dir migrated on disk) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
c6bc058cb4 |
chore: purge Vercel / Neon / managed-Supabase across the codebase
Self-hosted on Hetzner is the only reality now; the leftover references were
stale at best and a security hole at worst. Thorough sweep across code, config,
scripts, docs, and comments (84+ files). Self-hosted supabase.orangecat.ch is
kept; historical migration records stay accurate.
Functional / security fixes:
- cron-auth: prod detection was process.env.VERCEL (unset on the box!), so the
fail-closed 'CRON_SECRET unset -> 503' gate never fired in production. Now
keys on NODE_ENV=production. (security)
- auth trustHost: dropped the dead process.env.VERCEL===1 branch.
- AppFooter: read the baked-in build SHA instead of VERCEL_GIT_COMMIT_SHA/ENV.
- project bootstrap: removed 'neon projects create' + the Vercel deploy brief;
DB option is now self-hosted Postgres, deploy guidance is the self-hosted flow.
- db-url: removed the legacy NEON_DATABASE_URL* fallbacks (+ updated its test).
Infra / removals:
- deleted .github/workflows/vercel-deploy.yml and scripts/db/dump-from-{neon,supabase}.sh.
- stripped NEON_* env fallbacks from db dump/restore/sync scripts.
User-facing:
- desktop offline overlay no longer blames a 'Vercel hiccup'; privacy page +
PRIVACY_POLICY subprocessors now say Hetzner self-hosted / self-hosted Postgres.
Plus ~50 comment/doc rewrites (Vercel -> the cloud host/the box; Neon -> Postgres).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
||
|
|
37595ec6b0 |
feat(presence): connection-based runner presence, replacing the heartbeat
The web inferred 'Fleet Runner online' from the freshness of a 5-min runtime-state heartbeat (offline if >8min stale), so a healthy runner looked dead for minutes after any restart. Presence is now a property of the live runner<->bridge SSE connection instead of a timer. - bridge: runner connections tag themselves ?client=runner; on connect/disconnect the bridge upserts runner_presence and pg_notify's the web stream channel. Boot resets all counts so a crashed bridge can't leave stale 'connected'. - web: /control/stream carries live runnerConnected; the badge flips in <1s. ADDITIVE: online = connected OR heartbeat-fresh, so the current (untagged) runner keeps working until the desktop rebuild ships. Cutover (drop heartbeat + long-poll) is staged separately. - desktop runner tags its bridge connection ?client=runner. Docs: docs/architecture/connection-presence.md. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|
|
e3541e2374 |
feat(v0.6): Phase A — event bus foundation (Postgres NOTIFY → SSE bridge)
The end-to-end push pipeline that replaces /api/control polling. This
commit ships the foundation; phases B-E light it up across the web,
desktop, and daemon. Read the architectural narrative in
/thoughts/from-polling-to-listening-fleetcrown-v0-6.
drizzle/0022_notify_triggers.sql
- Generic fc_emit_change() plpgsql function: receives (user_col,
key_col) via TG_ARGV, emits NOTIFY 'fc:state' with a compact
{t, u, k, op, ts} JSON payload. IDs only — no row content — so
the bus stays under Postgres's 8 KB NOTIFY limit even on bursts.
- AFTER INSERT/UPDATE/DELETE triggers on the five UI-relevant
tables: project_states, runtime_snapshots, pending_commands,
orchestration_runs, beacon_settings.
- Adding more tables in the future is two lines: drop + create
trigger pointing at the same fc_emit_change function.
bridge/ (new ~300-line Node service)
- src/server.ts — HTTP server with /sse (SSE endpoint, ?token=ck_*
auth, Last-Event-ID replay) and /healthz. CORS open; the bridge
sits on a different origin than Vercel and the desktop app.
- src/listen.ts — single dedicated pg Client running LISTEN
"fc:state" forever, with exponential-backoff reconnect on
disconnect. Notifications fan out to subscriptions.
- src/subscriptions.ts — in-memory Map<userId, Set<connection>>.
Per-user routing; fanout writes SSE frames; idempotent remove
on disconnect.
- src/auth.ts — validates ck_* tokens against agent_tokens using
the same plaintext lookup the cloud API uses (mirrors src/db/
queries/agent-tokens.ts validateAgentToken).
- src/types.ts — ChangeEvent and Subscription shapes.
- In-memory ring buffer (1000 events) for Last-Event-ID replay so
a brief disconnect doesn't drop state.
- Heartbeat (SSE comment) every 25s to keep proxies happy.
- Graceful SIGINT/SIGTERM shutdown with 5s hard-fail timeout.
- .env.example, .gitignore, README with the Oracle systemd deploy
runbook.
next.config.ts
- Exclude ./bridge/** from output: standalone tracing. Same lesson
as ./desktop/** — bridge has its own node_modules and is
deployed separately. Don't let Vercel bundle it into every
serverless function.
Verified end-to-end locally:
- psql UPDATE on project_states → fc_emit_change fires →
pg_notify reaches the bridge's LISTEN client → fanout to the
subscribed curl SSE connection in ~milliseconds.
- Per-user routing: a token bound to user A only receives events
for user A's rows; tested by minting under two different users.
- Last-Event-ID replay: reconnect with header skips already-
delivered events, then live events arrive immediately.
Next: Phase B (web client subscribes to the bridge instead of polling
/api/control). Phases C-E follow.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|