Skip to content

Move service state into InstanceState, flatten service facades#18483

Merged
kitlangton merged 34 commits intodevfrom
effect/instance-state
Mar 21, 2026
Merged

Move service state into InstanceState, flatten service facades#18483
kitlangton merged 34 commits intodevfrom
effect/instance-state

Conversation

@kitlangton
Copy link
Contributor

Summary

  • Introduces InstanceState as a centralized Effect cache for per-instance service state, replacing scattered module-level mutable state
  • Adds shared memoized service runners (runService) for global singleton services (format, question)
  • Flattens service facade files — merges service.ts into the main module index for permission, snapshot, format, skill, file, and others
  • Deletes the old runtime.ts and instances.ts modules
  • Renames PermissionNext to Permission

Test plan

  • Existing tests pass (bun run test)
  • Typecheck passes (bun run typecheck)
  • New tests for InstanceState and runService

@kitlangton kitlangton marked this pull request as ready for review March 21, 2026 04:15
opencode-agent bot added a commit that referenced this pull request Mar 21, 2026
@kitlangton kitlangton enabled auto-merge (squash) March 21, 2026 04:47
@kitlangton kitlangton merged commit 38e0dc9 into dev Mar 21, 2026
8 checks passed
@kitlangton kitlangton deleted the effect/instance-state branch March 21, 2026 04:51
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.

1 participant