Skip to content

docs: round 4 — runnable snippet gate, examples import the package, id rules, CHANGELOG cleanup - #612

Merged
LinuxDevil merged 6 commits into
mainfrom
ccr-0ae7820c-cbv21k-docs-4
Oct 12, 2026
Merged

LinuxDevil merged 6 commits into
mainfrom
ccr-0ae7820c-cbv21k-docs-4

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Round-4 audit fixes, docs area.

Changes

  • Snippet gate (A-docs-6): docs:verify-snippets handles fences indented under list items. It now runs every mock-provider snippet (about 50) instead of only quick-start.md.
    • Fixed what that surfaced: auth.md had a mock with one reply for two turns, and the workspace-tools.md snippet used names it never defined.
    • Snippets that need secrets, servers or vitest are marked no-run and are still type-checked.
  • Examples (A-docs-7): every example imports @lousho/build-ai-agent and its public subpaths instead of ../../src, resolved through tsconfig paths and a vitest plugin scoped to examples/. examples/imports.test.ts guards this and checks that paths matches the package exports.
  • Id rules (A-docs-9): upgrading.md, durable-execution.md and errors.md explain the session id rule (1–128, no .) and the run id rule (1–200, . allowed). The error messages name which rule applies.
  • CHANGELOG:
    • Removed the dated [1.0.0-rc.0] heading for a version that was never published. Its entries are re-filed under the releases that actually shipped them (alpha.9 and alpha.19).
    • [Unreleased] is condensed from about 119 KB to about 30 KB, with behavior changes first.
    • Internal ticket tags are removed.

Testing

All local gates pass: tsc, typecheck, lint, build, api:check, test:types, docs snippets, llms, ratchet and coverage (5760 tests).

  • fallow: health flags the WebhookTriggerAdapter.ts constructor (CRAP 30). This branch doesn't touch that file, so CI will show whether it's pre-existing.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n


Generated by Claude Code

Every example imported `../../src/...` (internal modules, including
`src/storage/sqlite/driver`), so none could be copied into an app as-is.
They now import `@lousho/build-ai-agent` and its public subpaths
(`/testing`, `/executor`, `/flows`, `/triggers`, ...). tsconfig.json `paths`
(moved there from tsconfig.tests.json and completed to match every
package.json export, dropping the stale `/core`) point those names at src/,
so `npx tsx examples/...` and typecheck:examples need no build; a resolver
in vitest.config.ts does the same for tests under examples/.

data-analyst loads `node:sqlite` itself instead of the internal driver.
examples/imports.test.ts fails on a new `src/` import in an example source
and keeps the paths in sync with the exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n
…nces

docs:verify-snippets ran only docs/quick-start.md against the packed
package, so the "Reading the principal in the run" snippet in auth.md
(one scripted mockModel reply, two turns) crashed unnoticed, and fences
indented under a list item were never type-checked at all.

Stage B now also runs every ```ts snippet that builds its own mock
provider (mockModel / createMockProvider), and the fence parser accepts
indented fences. Fixed what that surfaced: the auth.md mock script gets a
reply per turn, the workspace-tools CommandRule snippet imports and builds
what it uses, and snippets that need a secret, an agent directory, vitest
or a long-running server are marked `no-run` (still type-checked).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n
Two different id grammars are both called `sessionId`: a session id
(`agent.session({ id })`, the routes, `lousho chat --session`) is 1-128
characters of A-Za-z0-9_- with no '.', while a run id
(`send({ sessionId })`) is 1-200 characters and may contain '.'. The
upgrading table quoted only the run rule, so a route user with a '.' or a
129+ character id got a 400 that contradicted it.

The upgrading row, durable-execution and errors.md now state both rules
(and the reserved `.fire` ending); both error messages say which rule they
enforce and point at the other one, and the error-code hint and the
`send()` option docs say the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n
…ense Unreleased

- The `[1.0.0-rc.0] - 2026-10-04` heading named a version that was never
  published. Its entries are now filed by when they reached npm, checked
  against the CHANGELOG at each release tag: what was already in
  1.0.0-alpha.9 is under `[1.0.0-alpha.9] - 2026-10-04`, and the rest
  (first published in alpha.15) is under `[1.0.0-alpha.19] - 2026-10-08`.
- `[Unreleased]` also held 17 entries that alpha.15-alpha.19 had already
  published; they moved to `[1.0.0-alpha.19]` too.
- `[Unreleased]` is condensed from ~119 KB to ~30 KB: each change is kept
  (behavior changes first and marked, related fixes grouped by area,
  duplicate entries merged, purely internal repo housekeeping dropped), and
  it covers this branch's changes (examples, id rules, snippet check).
- Internal ticket tags (`Eve ...`, `LOU-...`, `(H2)`, ...) are removed from
  the sections above `[1.0.0-alpha.8]`.

docs/upgrading.md now points at `1.0.0-alpha.19` instead of rc.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n
On a slow runner the 300 ms runs could finish before the cancel arrived;
the id then named one request and the cancel rightly stopped it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n
…WebhookTriggerAdapter constructor

With examples importing the package by name, fallow no longer links the
adapter's tests to it through the example graph and falls back to its
static CRAP estimate, which put the 5-branch constructor at the limit.
Behavior is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BG6n8mwoFq1jmay9zCPS6n
@LinuxDevil
LinuxDevil force-pushed the ccr-0ae7820c-cbv21k-docs-4 branch from 9187ef6 to 77d658d Compare October 12, 2026 16:07
@LinuxDevil
LinuxDevil merged commit 67c0d1a into main Oct 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants