Skip to content

effectify Command service#18271

Draft
kitlangton wants to merge 7 commits intodevfrom
kit/effectify-command
Draft

effectify Command service#18271
kitlangton wants to merge 7 commits intodevfrom
kit/effectify-command

Conversation

@kitlangton
Copy link
Contributor

Summary

  • Migrate Command service from legacy Instance.state() pattern to the Effect service pattern (Interface / Service / layer / promise facades)
  • Replace Instance.worktree references with InstanceContext in template getters
  • Register Command.Service and Command.layer in the instance services map
  • Add guard for undefined command in session/prompt.ts to satisfy stricter return type

Test plan

  • bun run typecheck passes in packages/opencode (all errors are pre-existing)
  • No Instance.state references remain in command/index.ts
  • Follows same pattern as File and Skill services

Constrain BusEvent.define to ZodObject instead of ZodType so TS knows
event properties are always a record. Type GlobalBus payload as
{ type: string; properties: Record<string, unknown> } instead of any.

Refactor watcher test to use Bus.subscribe instead of raw GlobalBus
listener, removing hand-rolled event types and unnecessary casts.
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