Conversation
…tore The session-stream machinery now comes from the published @ellipsis-dev/sdk (types generated from the server's schema; WebSocket client; SessionTranscriptStore): - src/lib/ws.ts and src/lib/events.ts are deleted; the reconnect/resume/backoff machinery, frame types, and transcript shaping are SDK imports. src/lib/stream.ts keeps the CLI-specific transport bits: ELLIPSIS_WS_BASE resolution, the bearer-door URL, and the ws-package adapter behind the SDK's injected openSocket. - ConnectApp renders from one SessionTranscriptStore: records arrive PUSHED as records_append frames (the 250ms REST refresh loop, the 3s records/status polls, and the turns-polling for queued chips are gone), the open inbox slice drives the queued region, chips retire by acknowledged message id (text-matching dedup deleted), and deltas overlay from the store. If the stream is unavailable, a REST poll feeds the same store through synthetic frames, so the UI is identical either way. - types.ts: the session-surface types (records, messages, turns, send request/response, status/source/state unions) are SDK re-exports under their historical names; the endpoints outside the SDK's REST surface stay hand-rolled for now. - SessionView.tsx deleted (no callers). ws/events tests deleted with their subjects (the SDK carries those suites); stream.test.ts covers the CLI-side adapter. Verified: tsc clean, 201 tests green, bun --compile binary builds and answers --version. NOTE: do not merge until @ellipsis-dev/sdk@0.1.x is on npm (dev loop is bun link).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The CLI now consumes
@ellipsis-dev/sdk— the official TypeScript SDK for the Ellipsis platform (generated API types, the session-stream WebSocket client, and the session transcript store) — instead of hand-rolling that layer. Net −1,700 lines.What moved to the SDK
src/lib/ws.tsandsrc/lib/events.tsare deleted: the stream machinery (reconnect/backoff,after_seqresume, heartbeat liveness, frame types) and the transcript shaping (event → items, tool-run collapsing, pending-call inference, lifecycle copy, cost folding) are@ellipsis-dev/sdk/stream+@ellipsis-dev/sdk/storeimports now. The newsrc/lib/stream.tskeeps only what is CLI-specific:ELLIPSIS_WS_BASEresolution, the bearer-door URL, and thews-package adapter behind the SDK's injectedopenSocket.src/lib/types.ts: the session-surface types (records, inbox messages, turns, the session wire shape, and their request/response DTOs) are SDK re-exports under their historical names — generated from the server's schema, so they can no longer drift.ConnectApp renders from the SDK store
agent session connectis now driven by oneSessionTranscriptStore: records arrive pushed over the stream, so the 250ms REST refresh loop, the 3s records/status polls, and the turns-polling for queued chips are gone. Queued chips retire by acknowledged message id (the old text-matching dedup is deleted). If the stream is unavailable, a REST poll feeds the same store through synthetic frames — the UI is identical either way.--no-recordsstill skips replaying history on screen without re-streaming it.Also:
src/ui/SessionView.tsxdeleted (no callers).Verified
tscclean; 201 tests green (the deleted ws/events suites live in the SDK now, incl. a golden frame fixture recorded from the real server stream);bun --compilebinary builds and answers--version; full suite re-run against the published@ellipsis-dev/sdk@0.1.0from npm (not a local link).