Skip to content

effectify Installation service, drop Effect suffix from namespaces#18266

Merged
kitlangton merged 11 commits intodevfrom
kit/effect-installation
Mar 20, 2026
Merged

effectify Installation service, drop Effect suffix from namespaces#18266
kitlangton merged 11 commits intodevfrom
kit/effect-installation

Conversation

@kitlangton
Copy link
Contributor

Summary

  • Migrate Installation service to Effect with HttpClient for version fetching and ChildProcessSpawner for package manager detection/upgrade
  • Split into effect.ts (service definition) and index.ts (legacy adapters via runtime.runPromise) to break circular dependency with runtime
  • Register Installation in global ManagedRuntime
  • Convert UpgradeFailedError from NamedError to Schema.TaggedErrorClass
  • Rename AccountEffectAccount, AuthEffectAuth, TruncateEffectTruncate — both files now use the same namespace name, distinguished by import path

Test plan

  • bun run test test/installation/installation.test.ts — 3 tests pass (GitHub releases, scoop, chocolatey version fetching)
  • Tests use mock HttpClient + ChildProcessSpawner layers instead of globalThis.fetch
  • bunx tsgo --noEmit passes clean
  • Pre-push typecheck across all packages passes

…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.
opencode-agent bot added a commit that referenced this pull request Mar 19, 2026
opencode-agent bot added a commit that referenced this pull request Mar 19, 2026
opencode-agent bot added a commit that referenced this pull request Mar 19, 2026
opencode-agent bot added a commit that referenced this pull request Mar 19, 2026
opencode-agent bot added a commit that referenced this pull request Mar 19, 2026
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
#	packages/opencode/test/account/service.test.ts
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
@thdxr thdxr added beta and removed beta labels Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
opencode-agent bot added a commit that referenced this pull request Mar 20, 2026
@kitlangton kitlangton merged commit e78944e into dev Mar 20, 2026
8 checks passed
@kitlangton kitlangton deleted the kit/effect-installation branch March 20, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants