21 Commits
Author SHA1 Message Date
Catoandbitbaum-fleet 683ed2c883 chore: add the fleet package template files this repo is missing (release-notify-tagged.yml) (#64)
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>
2026-11-14 10:19:35 +01:00
CatoandClaude d56a0c50bd feat: publish as @bitbaum/ai-forms (same code, same version) (#62)
* 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>
2026-11-10 08:42:13 +01:00
Cato bfea380102 fix(release): apply verified build-output staging contract (#57) 2026-10-29 01:33:13 +01:00
Catoandbitbaum-fleet 316fe3d178 chore: add the fleet package template files this repo is missing (git-release.yml, release-notify.yml, release.yml, AGENTS.md, CLAUDE.md) (#53)
* 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>
2026-10-28 02:28:42 +01:00
CatoandClaude Fable 5.1 b26fa1ccbe chore: rename FleetCrown to Loki (#43)
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>
2026-09-13 16:21:47 -07:00
CatoandClaude Fable 5.1 49289149a1 ci(publish): make publishing idempotent so a second run is green, not E403 (#40)
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>
2026-09-10 18:05:13 -07:00
CatoandClaude Opus 5 bb48e04442 ci(auto-merge): correct the reason this repo passes a PAT (#39)
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>
2026-09-07 15:52:17 +00:00
CatoandClaude Opus 5 6b122aba84 ci(auto-merge): hand the sweep a PAT so workflow PRs stop stalling (#38)
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>
2026-09-07 14:55:07 +00:00
d47fc0c1c8 chore(ci): test on Node 24, the fleet toolchain (#35)
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>
2026-09-05 14:41:40 +00:00
db04f557e8 chore: pnpm — the fleet has one package manager (#33)
Convert from npm to pnpm (fleet standard, STACK.md):
- packageManager pin pnpm@11.25.0 (corepack SSOT)
- pnpm-lock.yaml via `pnpm import` (root and examples/next), then both
  package-lock.json files deleted
- CI + publish workflows: pnpm/action-setup@v6, cache: pnpm,
  `pnpm install --frozen-lockfile`, `pnpm run verify`
- examples/next: pnpm-workspace.yaml with `allowBuilds: sharp` — pnpm 11
  blocks dependency build scripts by default and sharp must build
- package.json scripts and contributor docs use pnpm; consumer install
  lines stay npm — consumers choose their own package manager
- `npm view` / `npm publish` registry calls in publish.yml unchanged
  (OIDC trusted publishing works from a pnpm-managed tree)

Clean-room proven: rm -rf node_modules && pnpm install --frozen-lockfile
&& tests green; example app installs and typechecks under pnpm.


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>
2026-09-03 14:52:28 +00:00
5717a79542 fix(ci): the sweep dispatched a workflow named 'ci.yml,publish.yml' (#31)
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>
2026-08-31 10:19:02 +00:00
dependabot[bot] 19a473b18f chore(deps): bump actions/checkout from 4 to 7 (#22)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  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>
2026-08-29 07:07:29 +00:00
dependabot[bot] 037a289a08 chore(deps): bump actions/setup-node from 4 to 7 (#21)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 4 to 7.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v4...v7)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-version: '7'
  dependency-type: direct:production
  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>
2026-08-29 06:44:38 +00:00
GandClaude Fable 5 52e3239ae4 chore(release): 0.1.2 — publish via trusted publishing, no token (#18)
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>
2026-08-20 23:20:12 +00:00
GandClaude Opus 5 a80a5a02b5 ci: make the release a reconciler, not a trigger (#17)
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>
2026-08-16 16:45:11 +00:00
GandClaude Opus 5 7273ceeda6 ci: release without anyone running a release (#16)
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>
2026-08-16 15:46:27 +00:00
GandClaude Opus 5 19125770a8 ci: authenticate the first publish with the token, after all (#14)
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>
2026-08-16 14:43:55 +00:00
GandClaude Opus 5 957462fde3 ci: publish via OIDC, so no npm token has to exist (#13)
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>
2026-08-16 13:49:19 +00:00
GandClaude Opus 5 2a8be0ff33 feat: publish to npm as ai-forms (#6)
The package was installable only via a git URL under a private `@fleet`
scope, which made it unusable by anyone outside this fleet and invisible
to search. `ai-forms` was free on the registry, so take it.

- rename `@fleet/ai-forms` -> `ai-forms` (package, lockfile, README, docs)
- add the MIT LICENSE file the package.json already claimed
- add a tag-driven publish workflow with provenance, gated on `verify`
  and on the tag matching package.json (a mismatched tag fails loudly
  instead of shipping the wrong version)
- make the README readable by someone who has never seen this fleet:
  provider-agnostic `complete` example instead of an internal Groq
  helper, real install line, badges

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-15 09:48:06 +00:00
G 0071384a40 ci: green PRs merge and deploy themselves (#1)
* ci: add the auto-merge sweep policy

* ci: green PRs merge and deploy themselves

* ci: allow CI to be dispatched so auto-merge can re-arm it
2026-08-05 19:15:49 +02:00
Mao NakamotoandClaude Opus 5 68087895ab feat: headless AI form filling and conversational refinement
One implementation of the thing every app in the fleet needs and only
OrangeCat had: fill a form from prose, then keep talking to it until it
is right.

The core is the merge rule. Protecting user input by letting existing
values win is correct when filling an empty form and fatal when changing
a full one — it is why asking to rewrite a non-empty field silently does
nothing. Intent decides: `fill` protects what the user typed, `refine`
lets the model win for the fields it returns.

Ships headless. Each app owns its own design tokens, so the package
exports logic and a hook and no markup.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 14:51:28 +02:00