Skip to content

chore(effect): upgrade to stable effect 4.0.0 - #80

Merged
K-Mistele merged 2 commits into
mainfrom
upgrade-effect-to-v4-and-create-pr-0wp7ta
Oct 3, 2026
Merged

K-Mistele merged 2 commits into
mainfrom
upgrade-effect-to-v4-and-create-pr-0wp7ta

Conversation

@K-Mistele

@K-Mistele K-Mistele commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves from effect@4.0.0-beta.107 to stable effect@4.0.0.

  • Catalog bump in root package.json; lockfile updated. Stable 4.0.0 has no runtime deps, so msgpackr and kubernetes-types drop out.

  • Import paths: stable promoted the unstable modules we use. effect/unstable/http → effect/http, effect/unstable/encoding/Sse → effect/encoding/Sse (all in opencode-llm-vendor).

  • Schema make collisions: in 4.0.0, every schema has a built-in make (a getter with no setter), so Object.assign(schema, { make }) threw at module load. Instead of overriding it, the vendored helpers no longer use that name:

    • ToolCallPart: type is now Schema.tag('tool-call'), so Effect's own make fills it in. The call site is unchanged, and make now checks its input.
    • SystemPart.make(text) → SystemPart.text(text)
    • ToolResultValue.make(value, type) → ToolResultValue.from(value, type)
    • ToolResultPart.make(input) → ToolResultPart.from(input)

    Upstream opencode is still on beta.83, so this part diverges from upstream.

Testing

  • bun check passes: typecheck, biome, tests (1276 pass, 0 fail).

🤖 Generated with Claude Code

- Bump catalog from 4.0.0-beta.107 to 4.0.0
- Move imports off `effect/unstable/*`: `effect/http`, `effect/encoding/Sse`
- Attach schema helpers with Object.defineProperties; `make`/`is` are now
  setter-less prototype getters, so Object.assign throws at load

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a103b0-a7fb-7001-92c0-90b76151d9e4
@socket-security

socket-security Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedeffect@​4.0.0-beta.107 ⏵ 4.0.0100 +110093 +398 +2100

View full report

@github-actions

github-actions Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Docs Agent Review

Agent finished with reason: error


To apply these recommendations, comment: @docs-agent apply

Replace the defineProperties shim with plain helpers that don't collide
with Effect 4's built-in `make`:

- ToolCallPart: use Schema.tag('tool-call') and Effect's own make
- SystemPart.make -> SystemPart.text
- ToolResultValue.make -> ToolResultValue.from
- ToolResultPart.make -> ToolResultPart.from

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
HumanLayer-Session: https://app.dev.codelayer.gg/sessions/01a103b0-a7fb-7001-92c0-90b76151d9e4
@K-Mistele
K-Mistele merged commit 6f853b3 into main Oct 3, 2026
6 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.

1 participant