Skip to content

fix(effect): run Effects from plain host functions, keep host fn name and length - #10

Merged
jlongster merged 1 commit into
devfrom
effect-nested
Nov 20, 2026
Merged

jlongster merged 1 commit into
devfrom
effect-nested

Conversation

@jlongster

Copy link
Copy Markdown
Collaborator

Fixes two 0.2.0 regressions found switching OpenCode to psychoscript/effect:

  • A plain function the host gives the program (a method of a returned object, e.g. Bun.file(p).text(), or a plain global) may return an Effect again: an internal per-runtime adapt hook in the core, set only by psychoscript/effect.
  • The program sees a Host.fn's own name and length, not the wrapper's.

Verified against OpenCode #65207: core tool-execute + codemode 67/67, codemode 322/322.

… and length

User decisions:
- OpenCode imports the Effect API from psychoscript/effect
@jlongster
jlongster merged commit 4fff259 into dev Nov 20, 2026
1 check passed
@jlongster
jlongster deleted the effect-nested branch November 20, 2026 15:44
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