* 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>
`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>
* 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>
The repo had nothing a visitor could run. Evaluating the library meant wiring
a provider into your own app first, which is the wrong order — the behaviour
has to be visible before anyone invests that.
`examples/next` is a real job-posting form: prose fills it, follow-up
instructions patch it. It runs with zero configuration because `complete` is
caller-supplied, so the example ships a deterministic offline pattern matcher
for the no-key case. That matcher is NOT a language model and the UI says so
in plain words — it exists so the library's own contribution (merge intent,
sanitizing, field discipline) is visible without a provider in the way.
Set GROQ_API_KEY or OPENAI_API_KEY for real model behaviour.
Verified end to end against the running example:
- fill from one sentence -> 9 fields set, salary parsed as 130000-160000
- "make it principal" -> changed == ["seniority"], everything else survives
- "set the posting id" -> postingId unchanged; it is aiExcluded
- unknown target -> rejected before any model call
Root package unaffected: 14/14 tests green.
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>