effectify Installation service, drop Effect suffix from namespaces#18266
Merged
kitlangton merged 11 commits intodevfrom Mar 20, 2026
Merged
effectify Installation service, drop Effect suffix from namespaces#18266kitlangton merged 11 commits intodevfrom
kitlangton merged 11 commits intodevfrom
Conversation
…mespaces Migrate Installation to Effect with HttpClient for version fetching and ChildProcessSpawner for package manager detection/upgrade. Register in global ManagedRuntime. Split into effect.ts (service) and index.ts (legacy adapters) to break the runtime circular dependency. Rename AccountEffect → Account, AuthEffect → Auth, TruncateEffect → Truncate to establish consistent naming where both the effect.ts and index.ts files use the same namespace name.
Replace raw JSON.parse and any casts with Schema.Class definitions and HttpClientResponse.schemaBodyJson for type-safe parsing of GitHub, npm, brew, choco, and scoop version responses.
Cover npm registry, bun (via npm registry), brew formulae API, brew tap CLI JSON parsing, GitHub releases, scoop, and chocolatey. Tests use mock HttpClient and ChildProcessSpawner layers.
# ------------------------ >8 ------------------------ # Do not modify or remove the line above. # Everything below it will be ignored. # # Conflicts: # packages/opencode/test/account/service.test.ts
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.
Summary
HttpClientfor version fetching andChildProcessSpawnerfor package manager detection/upgradeeffect.ts(service definition) andindex.ts(legacy adapters viaruntime.runPromise) to break circular dependency with runtimeManagedRuntimeUpgradeFailedErrorfromNamedErrortoSchema.TaggedErrorClassAccountEffect→Account,AuthEffect→Auth,TruncateEffect→Truncate— both files now use the same namespace name, distinguished by import pathTest plan
bun run test test/installation/installation.test.ts— 3 tests pass (GitHub releases, scoop, chocolatey version fetching)HttpClient+ChildProcessSpawnerlayers instead ofglobalThis.fetchbunx tsgo --noEmitpasses clean