Files from bitbaum/fleet `templates/package` that this repository does not have yet:
- `.github/workflows/release-notify-tagged.yml`
Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.
Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
* feat: publish as @bitbaum/ai-forms (same code, same version)
Owner, 2026-11-06: the fleet's packages belong under the @bitbaum npm
organization; this one was published earlier, unscoped, and never moved
(fleet docs/package-scope-migration-plan.md). Name, imports in tests, examples
and docs change; no API changes. The old name stays installable and is
deprecated once no adopter uses it.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD
* ci(publish): the current Publish workflow, which can make a package's first npm release
The renamed @bitbaum/ai-forms is a new npm name, and npm trusts a publisher only for an
existing package; the current template publishes the first version with the org
token and links tokenless publishing afterwards. The old copy here was
OIDC-only, so it would fail on a new name.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019MDtmvpWNTLxXNfwUHS7MD
* chore(example): regenerate the example's lockfile for the @bitbaum/ai-forms name
The example's lock still keyed the local file:../.. dependency as ai-forms,
so the fleet rollout gate found no locked artifact for @bitbaum/ai-forms and
held this PR (sweep: 'Missing locked artifact for @bitbaum/ai-forms').
---------
Co-authored-by: Claude <noreply@anthropic.com>
* chore: add the fleet package template files this repo is missing (git-release.yml, release-notify.yml, release.yml, AGENTS.md, CLAUDE.md)
Files from bitbaum/fleet `templates/package` that this repository does not have yet:
- `.github/workflows/git-release.yml`
- `.github/workflows/release-notify.yml`
- `.github/workflows/release.yml`
- `AGENTS.md`
- `CLAUDE.md`
Only missing files are added — no file this repository already has is changed. `release.yml` is what lets the package owner release a new version from Loki (the package page: "Release vX.Y.Z"), or from the Actions tab.
Opened by bitbaum/fleet `scripts/packages/sync-package-template.mjs` (`.github/workflows/package-repos.yml`). It merges itself when this repository's CI is green.
* chore: current release.yml template, prettier-stable under this repo's config
---------
Co-authored-by: bitbaum-fleet <fleet@bitbaum.invalid>
* fix(assist): refine fills empty fields, writes requested prose, localisable copy
A form stops being empty at the first typed word, and from then on every
instruction was a refine that returned only named fields - so pasting an
advert after typing a title filled nothing, and 'fill in the description'
was refused as invention. Refine now also lands in empty fields the message
supplies; facts vs prose are separated (never invent a fact, do write a
requested free-text field). User-facing copy is overridable per app and per
form (AOZ showed English errors in a German form), and the hook clears the
previous turn's 'changed' so it cannot sit beside this turn's error.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* feat: suggestions for filled forms, and one shared AiFormAssistant control
A filled form can now be asked what it would improve: intent 'suggest' on
the same route returns up to 4 one-tap proposals, each applied as an
ordinary refine (undo covers it). Never proposes inventing a fact.
AiFormAssistant moves the bar every adopter hand-rolled (AOZ and evig had
near-identical copies) into the package: behaviour here, words and design
tokens from the app via labels/classNames, no styling shipped. An
improvement to the experience now lands everywhere on one install.
respond keeps its AssistResult type (loki passes one); suggest gets its
own respondSuggest.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The product was renamed on 2026-09-14: bitbaum/loki, loki.orangecat.ch,
LOKI_* env keys, loki-* units. This repo referenced the old name in
1 file changed, 1 insertion(+), 1 deletion(-).
Email addresses at the old sending domain stay until the new domain is
verified in Resend.
Claude-Session: https://claude.ai/code/session_016YJVAanfj8keVSXyZnTemh
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
One merge starts Publish twice — the PAT-made push and the auto-merge
sweep's workflow_dispatch re-arm, seconds apart. Both ask the registry
before either publishes, both build, and the loser gets E403 "cannot
publish over previously published versions" (bip-kit 0.2.6, 0.2.7 on
2026-09-11). A red run that means nothing is wrong teaches everyone to
ignore the workflow.
- concurrency group "publish", never cancelled: the second run waits,
then sees the version on the registry and skips
- registry check writes a green step summary ("already published —
nothing to do") and gates install/verify/publish
- npm publish failure is re-checked against the registry: if the
version is there, that is the goal state, not an error
OIDC trusted publishing, verify-before-publish, tag checks and the
re-arm list are unchanged.
Claude-Session: https://claude.ai/code/session_01WqKqMnHQHSmkGFfc5t7Rxn
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
The comment added a few hours ago says GITHUB_TOKEN cannot merge a PR that
touches .github/workflows. That is contradicted by this fleet's own history:
github-actions[bot] merged datacat#253 and ai-kit#42 today, and both change a
workflow file. I asserted it from the reusable workflow's docstring without
checking, then found the counter-evidence while looking for something else.
Two stalled PRs were offered as proof and neither survives either. ai-kit#11
opened 2026-08-29 and this repo's sweep was not added until 2026-09-04, so for
most of that PR's life nothing was sweeping at all. aoz-housing#122 is still
unexplained — I merged it before diagnosing it, which destroyed the evidence.
The THROUGHPUT reason is unaffected and is why the line stays. A dispatch made
with GITHUB_TOKEN triggers no workflows — the same rule the deploy reconciler
exists for — so after a merge the re-armed CI run's completion fires no
workflow_run and nothing wakes the sweep for the next PR. It waits for the
cron, which GitHub throttles: fleetcrown's sweeps land 50-65 minutes apart
against a */10 schedule. A PAT-created dispatch does emit workflow_run.
The wrong claim is recorded in the file rather than quietly deleted, so the
next reader does not re-derive it from the same docstring I did.
No behaviour change: an undefined secret still resolves to empty and the
reusable workflow still falls back to github.token.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
GITHUB_TOKEN cannot merge a PR that touches .github/workflows. The sweep tries,
the merge API refuses, it logs "leaving for the next sweep", and repeats — while
still exiting 0. So the failure is invisible: every run reports success and the
PR simply never merges.
That is not hypothetical. ai-kit #11 (bump actions/checkout) sat green, CLEAN
and MERGEABLE for nine days; aoz-housing #122 (bump actions/upload-artifact)
for nine more. Both had to be merged by hand today. Every Dependabot
`github_actions` bump in the fleet is in this class, permanently.
A PAT fixes a second thing that costs more: THROUGHPUT. A dispatch made with
GITHUB_TOKEN emits no workflow_run, so after each merge nothing wakes the sweep
to take the next PR — it waits for the cron, and GitHub throttles scheduled
workflows to roughly hourly regardless of what the cron says. Observed in
fleetcrown: sweeps ~50-65 minutes apart against a */10 schedule. A PAT-created
dispatch does emit workflow_run, so the queue drains at CI speed instead.
The reusable workflow has always supported this — GH_TOKEN is
`secrets.token || github.token`. This just passes it.
SAFE BEFORE THE SECRET EXISTS: an undefined secret resolves to empty, and the
fallback picks github.token. So this changes nothing until FLEET_PAT is created
as an organisation secret, and needs no second pass afterwards.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
`CompleteFn` is deliberately bring-your-own-provider, which makes this
example the file people copy — and a copied mistake is the expensive
kind. A fleet-wide audit (2026-09-06) found this example teaching all
three of the defects it then found in production clients.
DEAD BY DEFAULT. The default model was `llama-3.3-70b-versatile`, which
Groq retired with the rest of the llama-3 family. Verified live
2026-09-07: 404 model_not_found. Anyone who followed the README with a
Groq key got a broken example and no way to tell why — and the same id
sat in .env.example, on the line a reader is most likely to uncomment.
It is a LIST now, tried in order, because that is the only shape that
survives a vendor's release notes. AI_FORMS_MODEL still wins, and may
itself be comma-separated.
AN EMPTY HTTP 200 WAS AN ANSWER. `content ?? ''` returned the empty
string as though the model had spoken. Some models return exactly that
after spending their whole budget on hidden reasoning, and here it
becomes "the assistant filled in nothing" with no error to explain it.
Now a failure that moves to the next model.
NO DEADLINE. A provider that accepted the connection and then went quiet
held the form open forever, and the next model was never reached. Each
attempt now gets its OWN deadline — a shared one is spent by the first
model and leaves the rest with an already-expired signal, which is worse
than none.
Failures now name every model tried, not just the last: "the key is
dead" and "one id rotted" used to read identically.
Still dependency-free, on purpose — the example exists to show what
CompleteFn is. It points at @bitbaum/ai-kit's complete() for anyone who
would rather not hand-roll this, but being dependency-free is not a
licence to demonstrate the wrong thing.
verify green; the example app typechecks.
Claude-Session: https://claude.ai/code/session_01NHDLTKGirKU7He8q2YR2y4
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The local auto-merge-sweep copy word-splits REARM_WORKFLOWS on whitespace;
auto-merge.yml passed a comma-joined list, so every post-merge re-arm
dispatched the literal name 'ci.yml,publish.yml', failed, and main's tip
never got a CI run — the next sweep then waited forever on 'CI catching
up'. Four consecutive merges on 2026-08-31 needed hand dispatches.
Fix in the fleet's direction, not in place: adopt the canonical reusable
workflow (bitbaum/fleet auto-merge-sweep.yml), which documents this exact
trap at its rearm_workflows input, and DELETE the drifted local copy — one
fewer entry in the shared-inventory duplication count, and no local script
left to drift again.
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>
* chore: add a formatter, matching the style this repo already writes
singleQuote=true 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 (15 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>
---------
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Was: >=18.
Eighteen of thirty repos declared no Node version at all, and the twelve
that did used five spellings of the same intent - >=18, >=20, >=20.0.0,
>=22, >=22.19.0. The box runs 20.20.2, so >=22 was a claim nothing could
satisfy and nothing would have caught.
One spelling, matching the machine that runs it, turns an invisible
mismatch into a loud one.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
23 of 30 repos in the fleet had none. The symptom looks like neglect and
is not: aoz-housing had 100 commits in August, features landing daily, and
was still on Next 14 / React 18 / Tailwind 3 — because nothing ever OPENED
the upgrade PR. Version drift here is the absence of a mechanism.
npm directory: /. Minor and patch grouped so the sweep spends one
cycle on them; majors stay separate because they deserve reading.
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The account was renamed to `catomean` and the repos then moved to the
`bitbaum` org, so `maonakamoto` now names nothing: github.com/maonakamoto
and maonakamoto.github.io both return 404, and @maonakamoto no longer
resolves as a user.
Three different targets, because these are not the same reference:
repo links -> bitbaum/<repo> (the repos live in the org)
the person -> catomean (profile links, @mentions, CODEOWNERS)
pages site -> bitbaum.github.io
Deliberately NOT changed:
.mailmap keeps the old noreply address as an ALIAS. It is what maps
historical commits onto the current identity; deleting it would
silently unmap them. Only the canonical side moved to catomean.
Files that explain the outage by naming the old account keep it,
since the name is the content.
Files: README.md, package.json, scripts/ci/auto-merge-sweep.sh
Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
The package's Trusted Publisher on npm is now pinned to this repo and
publish.yml, so the bootstrap NPM_TOKEN auth goes away: the publish step
authenticates via OIDC alone, and token-health.yml is deleted because
there is no token left whose expiry could block a release.
The version bump makes the reconciler prove this end-to-end: on merge it
will find 0.1.2 missing from the registry and publish it with OIDC.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The self-releasing workflow I merged an hour ago would not have released
anything, and the proof is in this repo: #16 merged to main and no publish run
started. threadkit's identical change did fire — because I merged that one by
hand with a user token.
auto-merge merges with GITHUB_TOKEN, and a push made with that token starts no
workflow. So `on: push: branches: [main]` silently does not fire for exactly the
merges that matter here. This is the no-cascade rule already documented in
CLAUDE.md, and I walked into it while writing the thing meant to remove manual
steps.
Two fixes, because one of them is a promise and the other is a mechanism:
- auto-merge.yml carries REARM_WORKFLOWS, whose comment says "keep this in sync
when a push-triggered workflow is added". I added one and did not. Now listed.
- More importantly: publish.yml gains an hourly schedule. The question it asks —
"is package.json's version on the registry?" — is idempotent, so asking it on a
timer costs one `npm view` when there is nothing to do and repairs a missed
release when there is. A hand-maintained list of workflows to re-arm is
something to keep correct forever; a reconciler is correct by construction.
This matches how deploys already work in the fleet: compare desired against
actual and act on the difference, rather than trusting an event to arrive.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Two things still required a human, and both are now gone.
**Cutting a release.** It meant `npm version && git push --tags` from a laptop.
Now: merge a version bump to main and the package ships. The workflow asks the
registry whether package.json's version already exists and publishes it if not.
That check, rather than a tag trigger, for two reasons. A tag pushed by
GITHUB_TOKEN does not start another workflow — so "push a tag, let publish.yml
notice" silently never runs, which is a trap this fleet has hit before. And
asking npm what is published is idempotent: re-running the workflow, or pushing
a tag by hand, cannot double-publish or fail confusingly. The tag is now created
AFTER a successful publish, so a tag never claims a release that did not happen.
**The token expiring.** NPM_TOKEN expires 2026-11-14. Without a check, the thing
that discovers that is a release failing in three months — and npm reports it as
403/ENEEDAUTH, which reads like a permissions problem, not an expiry. So
token-health.yml probes `npm whoami` weekly and, when it fails, opens a single
issue with the fix written in it, including the trusted-publishing route that
removes the token entirely.
Verified before shipping: both files parse as YAML, and the registry check was
run against the real registry — ai-forms@0.1.1 correctly reports "already
published, skip", ai-forms@9.9.9 correctly reports "would publish".
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
I removed this env block one PR ago in favour of trusted publishing, and that
was the right destination reached in the wrong order: a trusted publisher is
configured on a PACKAGE, and neither package exists yet. With the token wiring
gone and OIDC not yet possible, a tag push would have failed to authenticate
by either route.
So the bootstrap release authenticates with NPM_TOKEN (now set correctly on
this repo). Once the package exists on the registry, the trusted publisher is
configured against this workflow, this env block goes away again, and the token
is revoked — that ordering actually works.
Node 24 stays: it is required for OIDC later and harmless now.
Provenance is unaffected. `id-token: write` is what npm needs to attest the
build, and that is independent of how the publish authenticates — so the
bootstrap release still gets a real attestation rather than --provenance=false.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Trusted publishing lets the workflow exchange a short-lived, workflow-scoped
OIDC credential with npm at publish time. Nothing long-lived is stored, so
there is no secret to leak, rotate, or accidentally paste somewhere it becomes
visible.
That last one is not hypothetical: an npm token was created for this repo today
and ended up as a GitHub Actions secret *name* rather than its value — and
names are visible metadata, not secrets. The token has been revoked. This
change removes the reason to ever create another one.
Two things the workflow would have failed on, from the npm docs:
- Node 22 bundles npm 10.x, but trusted publishing requires npm >= 11.5.1.
Node 24 ships npm 11, so the runtime is bumped rather than adding a
separate npm upgrade step.
- `NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}` passed an empty string once the
secret was gone. The documented OIDC example sets no token at all — the
`id-token: write` permission already present is what does the work.
Provenance also stops needing the flag: npm generates attestations
automatically for a public package published from a public repo via OIDC.
Still required on the npm side, and not verified until the first publish
attempt (npm does not validate the config when saved): the trusted publisher
must name this repo and `publish.yml` exactly, and package.json's
repository.url must match the GitHub repo — it does.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>