Skip to content

Filter runtime event subscriptions to handled event types #90

Open

Description

@frap129

What to build

Use the OpenCode 2.2.0 typed event filter so the runtime subscribes only to the five event types it handles: session.revert.staged, session.revert.committed, session.revert.cleared, session.compaction.started, and session.compaction.ended.

The runtime must keep invalidating Rule delivery and Working context on revert events, and keep marking compaction and invalidating history reads on compaction events.

Acceptance criteria

  • The runtime passes the five handled event types to ctx.event.subscribe.
  • Revert events still invalidate Rule delivery and Working context history reads.
  • Compaction events still mark the session compacted and invalidate history reads.
  • A test asserts the exact subscription filter.
  • Existing event behavior tests pass.

Blocked by

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agentv2Part of the opencode v2 migration effort

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions