Repository navigation
chore: upgrade to Effect 4.0.0 and Alchemy 2.0.0-beta.80 - #52
Merged
Merged
Conversation
Effect 4.0.0 is the first stable v4 release. Alchemy beta.80 requires `effect@^4.0.0`, so both move together; @effect/tsgo goes to 0.48.0. - Import paths move from `effect/unstable/*` to `effect/*`. - Follow the 4.0.0 renames: PascalCase `Config` and CLI `Flag` constructors, `Schema.isStartingWith`, `LanguageModel.LanguageModel`, `ByteSize.bytes`, and `effect/encoding` `Base64`/`Base64Url`. - Refresh the vendored @effect/ai-openai, ai-anthropic and ai-openai-compat sources from rc.112 to 4.0.0 with a three-way merge that keeps the HumanLayer delta; update UPSTREAM.md and checksums. - `Schema.brand` now takes one literal name, so `makeBrandedId` asserts its runtime-computed name once (brands are type-only at runtime). - Add `AnyTool` for fold's erased tools: with `Tool.Any`, 4.0.0's new parameter-encoding and handler-start requirements come out unknown and leak into every model request. - Turn off the new `unstableApiUsage` diagnostic: 4.0.0 marks effect/ai, effect/http and the other moved modules unstable, and fold is built on them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a0f3fc-13b0-758f-a343-fae04e83a7a9
…path test Effect 4.0.0 reads file times as nanoseconds and drops the fraction of a millisecond. The test reset the log's time from Node's statSync Date, and utimesSync can store that a hair early, so Effect read the previous millisecond about half the time and the cache missed. Set the time half a millisecond past the recorded one instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a0f3fc-13b0-758f-a343-fae04e83a7a9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves fold from the Effect 4.0.0 release candidate (rc.112) to the stable 4.0.0 release. Alchemy beta.80 requires
effect@^4.0.0, so it moves with it;@effect/tsgogoes to 0.48.0.Versions
effect,@effect/platform-node,@effect/platform-bun,@effect/vitestalchemy@effect/tsgoWhat 4.0.0 required
effect/unstable/*becameeffect/*(effect/http,effect/ai,effect/cli, ...). This is most of the diff.Config.string/Config.redacted→Config.String/Config.Redacted.Flagconstructors became PascalCase, withchoice→Literalsandinteger→Int.Schema.isStartsWith→Schema.isStartingWith.LanguageModel.Service→LanguageModel.LanguageModel.FileSystem.Size→ByteSize.bytes.effect/Encoding→Base64/Base64Urlfromeffect/encoding.effect-ai-openai,effect-ai-anthropic,effect-ai-openai-compat): upstream's rc.112 → 4.0.0 changes were applied with a three-way merge, keeping the HumanLayer delta listed in eachUPSTREAM.md. EachUPSTREAM.mdand the openai-compat checksums now pin 4.0.0. The openai-compat files inUPSTREAM.sha256were checked to match the 4.0.0 tarball byte for byte.Choices worth a look
unstableApiUsageis off intsconfig.jsonand.oxlintrc.jsonc. 4.0.0 markseffect/ai,effect/httpand the other moved modules as unstable. fold is built on them, and the new diagnostic produced about 1,500 warnings and failed the declaration build.makeBrandedIdhas one type assertion.Schema.brandnow accepts only a single literal brand name.makeBrandedIdcomputes the name at runtime, frombrandor the prefix, so it asserts the overload's literal type once, with aSAFETY:comment. Brands are type-only at runtime in 4.0.0, and the public API is unchanged.AnyToolinToolsetService.ts. In 4.0.0, a tool's parameter-encoding services reachstreamText, and its handler services reach the handler's start. WithTool.Anyboth come out asunknown.AnyToolstates that fold's tool schemas need no services and its handlers need only the per-call services.ToolsetService.handlenow declares those services on the outer effect too; ToolRuntime already provides them there.A flaky test, fixed. In 4.0.0,
FileSystem.statreads file times in nanoseconds and drops the fraction of a millisecond. The session-summary fast-path test reset a log's time from Node'sstatSync, andutimesSynccan store that a hair early. Effect then read the previous millisecond, about half the time, and the cache missed. It failed 4 times in 10 here and 0 in 10 onmain. The test now sets the time half a millisecond past the recorded one, and passed 20 of 20. Production code isn't affected, because the cache compares Effect's readings with each other.Checks
bun run typecheck,bun run lint,bun run format:checkandbun run testall pass locally:🤖 Generated with Claude Code