GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(sdk): unify session event stream by kitlangton · Pull Request #34008 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • upgrade sessions.events({ sessionID, after }) from durable-only tailing to one Session-scoped durable/live SSE stream
  • replay durable rows after the exclusive aggregate sequence through a fixed cutoff, then emit exactly one authoritative session.activity, then continue with durable events and live-only Session output fragments
  • derive activity snapshots and transitions from the process-local foreground Session coordinator; background work does not activate a parent Session and activity resets on restart
  • regenerate the Promise, Effect-backed, embedded, and legacy SDK surfaces for the mixed event union

Ordering contract

Observation is registered before capturing fixed durable cutoff B. The stream emits durable Session events in (after, B] by aggregate sequence, emits one authoritative activity value, and only then emits later durable or live-only events. Before a live-only fragment is emitted, the observer drains committed durable rows, so causal start events precede dependent text, reasoning, and tool-input deltas.

Durable database rows are authoritative; bounded in-memory notifications are wakeups only. Only events with event.durable carry or advance the reconnect cursor. Live-only events, including session.activity, have no durable metadata and are not replayed. Existing aggregate deletion still removes replay history; this PR documents that limitation without changing deletion semantics.

Dependency

Depends on #33991. This branch contains that PR head and extends the same SessionExecution / SessionRunCoordinator authority rather than introducing a competing activity registry. It also routes the active snapshot through SessionV2 so the server layer remains correctly composed.

Verification

  • focused EventV2, Session stream, activity race, cursor, causal ordering, and saturation tests: 83 passed
  • packages/client: 9 tests passed; Promise and Effect SSE union coverage
  • packages/sdk-next: embedded router/SSE and import-boundary tests passed
  • packages/httpapi-codegen: 59 tests passed
  • HTTP API exerciser coverage/auth/Effect modes: 205 passed in each mode, no skips or missing routes
  • full pre-push workspace typecheck: 29 packages passed
  • affected package typechecks, Prettier, oxlint (0 errors), new-client generated consistency, and legacy SDK regeneration passed

Note: current origin/dev has a pre-existing schema manifest test mismatch (expected 55 definitions, current inventory has 58); task-specific schema hygiene tests pass.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
kitlangton added 3 commits June 25, 2026 22:16
@kitlangton
feat(sdk): expose active sessions
8a5231e
@kitlangton
Merge commit '8a5231ec26aa93a6324397c398adb7a6e3ae4e58' into session-…
96fbcd7
…event-stream
@kitlangton
feat(sdk): unify session event stream
59c1f89
@github-actions github-actions Bot added the contributor label Jun 26, 2026
kitlangton added 2 commits June 25, 2026 23:37
@kitlangton
fix(sdk): preserve session stream ordering
5146f01
@kitlangton
Merge remote-tracking branch 'origin/dev' into session-event-stream
d3592e4
# ------------------------ >8 ------------------------
# Do not modify or remove the line above.
# Everything below it will be ignored.
#
# Conflicts:
#	packages/core/src/session/execution.ts
#	packages/core/src/session/execution/local.ts
#	packages/core/src/session/run-coordinator.ts
#	packages/core/test/session-prompt.test.ts
#	packages/core/test/session-run-coordinator.test.ts
#	packages/core/test/session-runner-recorded.test.ts
#	packages/core/test/session-runner.test.ts
#	packages/protocol/src/groups/session.ts
@kitlangton kitlangton mentioned this pull request Jun 26, 2026
fix(sdk): wake embedded session live tail #34017
Closed
This was referenced Jun 26, 2026
📊 AI CLI 工具社区动态日报 2026-06-26 96loveslife/big_model_radar#59
Open
📊 AI CLI 工具社区动态日报 2026-06-26 litang9/big_model_radar#124
Open
@kitlangton

kitlangton commented Jun 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #34097 and #34098. Finite durable per-Session history now provides reconciliation, while the process-wide live event stream provides wakeups. Keeping those concerns separate avoids the mixed durable/live ordering and replay semantics introduced here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton kitlangton closed this Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kitlangton
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.