feat!: Effect-native core on Effect 4.0.0 and remove the legacy runtime
Replaces #206, #208 and #209. Stacked on #207 → #205.
Moves Mitome onto the stable Effect 4.0.0 release and the new Effect-native execution core, and deletes the legacy runtime. Pre-release, so there's no compatibility layer.
Delivers #181, #182 and #183, and the SQLite qualification part of #170. The CLI (#184) and TUI (#185) are rebuilt next on this core.
Commits
feat!: run native Sessions, Turns and controlled Tool Steps on Effect 4.0.0- Effect 4.0.0 pins and the approved TypeScript 7.0.2 +
@effect/tsgocompiler. makeSession/Turn: whole-function Turns that commit staged history once, with owned cleanup and live queries.step/loop/localTools: serial native Tools, fail-closed authorization, incomplete-response handling, generation/dispatch limits and physical request accounting.- Provider support for
openai,openai-compatibleandopenai-codex. - Qualification fixtures under
tools/qualification. - The legacy packages don't build at this commit.
- Effect 4.0.0 pins and the approved TypeScript 7.0.2 +
refactor!: remove the legacy runtime- Deletes
@mitome/sdk,@mitome/channelsand@mitome/tui, plus the Agent Definition, Extension, Hook, Host and old store code in Core. - The CLI keeps only
--help/--version. - Provider tests are ported to
providerModel+LanguageModel. create-mitomescaffolds a native program, and the release fixtures smoke-test the native packed exports.
- Deletes
Merge with "Create a merge commit" so the stack's commit SHAs carry through. Only the merged result builds green; commit 1 alone doesn't.
No local dependency patches
Effect and @effect/* are used exactly as published at 4.0.0. There is no patches/ directory and no patchedDependencies. Earlier drafts patched three Effect modules; those patches were removed by owner decision, and Mitome accepts upstream behavior:
- When a Tool handler fails with a typed error and its cleanup crashes or is interrupted, Effect's Toolkit keeps only the typed error. A return-mode Tool's failure is not part of the Step's error type.
@effect/ai-openaidoes not validate the Responsesstatus, unfinished item statuses orcomputer_callitems. An incomplete response without a reason, or one stopped bymax_output_tokens, is not reported as incomplete.- The OpenAI and OpenAI-compatible bindings re-encode Tool parameters through the application's parameter schema. The Codex provider is Mitome's own code and keeps its stricter checks.
Tests that only covered the patched behavior were removed (4 core, 51 provider cases). See the dated note in docs/research/native-baseline-qualification.md.
Verification (local, Bun 1.4.0 / Node 26.7.0)
bun run build -- --force,bun run check -- --forceandbun run test -- --forceall exit 0:- core 88 tests, providers 381, cli 2, create-mitome 11, scripts 7.
- The release tarball/install fixtures pass, including the packed native smoke.
tools/qualificationchecks pass: native baseline, and SQLite on Node and Bun.
Not covered: the scaffold's runtime node index.ts needs credentials, so only its typecheck is gated. The CLI binary release-artifact path wasn't exercised locally.