7 Commits
Author SHA1 Message Date
af0837032d ci: OIDC cannot do the first publish — keep a token for it (#6)
Same fix as ai-forms, before hitting the same failure. Trusted publishing
is configured per package on npmjs.com and cannot be configured for a
package that has never been published, so the token-free workflow fails
on the first release with E404 on the PUT.

Co-authored-by: Mao Nakamoto <georgy.butaev@revamp-it.ch>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
v0.1.0
2026-08-16 16:49:13 +02:00
GandClaude Opus 5 4856fb0631 ci: add the missing lint gate, and put typecheck in verify (#4)
Third instance of one scaffold defect. ai-forms (#11) and ai-ration (#2) had
exactly this, and so does threadkit:

  - No lint at all. ESLint was not a dependency, there was no config, and no
    script referenced it — so the fleet verify floor (lint AND typecheck AND
    test) was unmet.
  - `typecheck` existed but was not in `verify`. `build` is `tsc -p`, so types
    were checked only as a side effect of emitting. That conflates "compiles
    to dist" with "types are sound", and it evaporates the moment the build
    strategy changes.

verify = lint → typecheck → build → test.

Three repos with the same gap is a template problem, not three coincidences.
The instance is fixed here; the generator that produces `"verify": "npm run
build && npm test"` needs the same edit, or repo four is born with it. Naming
that explicitly rather than quietly fixing instance three — an un-encoded
"I'll remember" is the thing the never-twice rule exists to prevent.

Recommended presets only. ~500 lines of library code does not need a bespoke
rule set. Lint is clean on arrival, so this closes a hole rather than deferring
a backlog.

CI needs no change — ci.yml already calls `npm run verify` verbatim.

Verified: `npm run verify` passes — eslint clean, tsc clean, build clean,
31/31 tests.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 16:44:34 +02:00
GandClaude Opus 5 351612d16c ci: publish via OIDC, so no npm token has to exist (#3)
The publish workflow added yesterday needed an NPM_TOKEN secret. Trusted
publishing removes that requirement entirely: the workflow exchanges a
short-lived, workflow-scoped OIDC credential with npm at publish time, so
nothing long-lived is stored and there is no secret to leak or rotate.

Two things this 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 with no
  secret set. The documented OIDC example sets no token at all — the
  `id-token: write` permission already present is what does the work.

Provenance stops needing the flag: npm generates attestations automatically
for a public package published from a public repo via OIDC.

Matches the identical change in ai-forms, so the two libraries keep releasing
the same way.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 15:59:57 +02:00
GandClaude Opus 5 c62d5bfa83 ci: publish on a version tag, with provenance (#1)
threadkit has a CI workflow but no way to ship. The package is publish-ready —
name unclaimed on npm, `files: ["dist"]`, README and LICENSE both in the
tarball, 27 files, builds clean — so the only thing standing between it and a
release was a manual `npm publish` from someone's laptop.

This is the same workflow ai-forms already carries, so the two libraries
release identically rather than each growing its own procedure:

- triggered by a `v*` tag, so every published artifact traces to a commit
- `id-token: write` for npm provenance — the registry can prove the tarball
  was built by this workflow from this commit, not uploaded from a laptop
- runs `npm run verify` first: never publish something that would not pass CI
- refuses to publish when the tag and package.json version disagree, instead
  of silently shipping the wrong number

Verified locally with the workflow's exact steps: `npm ci --ignore-scripts`
then `npm run verify` — 31 tests pass.

Needs the NPM_TOKEN repo secret once; after that a release is `npm version`
plus a tag push.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 15:06:36 +02:00
Mao NakamotoandClaude Opus 5 82723a5183 test: prove the invariants, and consume the tarball the way npm does
Each invariant was verified to fail when broken: forcing the visibility
window open fails 4 targeted tests, and swapping the per-participant read
mark for a shared one fails exactly the test that names that bug.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 13:17:01 +02:00
Mao NakamotoandClaude Opus 5 e914a09c9b feat: participation-based thread core with AI participants
Permission is participation, never role. Unread is a per-participant
high-water mark, never a flag on the message row. An AI is a participant
and reads through the same visibility window as everyone else.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-16 13:11:52 +02:00
Mao Nakamoto 082d431fd4 chore: initial commit 2026-08-16 13:05:50 +02:00