Skip to content

feat(forward): add realtime conversations and history - #13

Merged
moonyue-w merged 2 commits into
mainfrom
codex/forward-realtime
Oct 13, 2026
Merged

moonyue-w merged 2 commits into
mainfrom
codex/forward-realtime

Conversation

@moonyue-w

@moonyue-w moonyue-w commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Add Forward Realtime Beta Conversation creation, WebSocket connections and persisted History with independent before pagination. Connections expose text/PCM16 input, typed and unknown events, Work progress, playback receipts, interruption and acknowledged graceful closure.

Why

The Go SDK cannot currently use Forward's Realtime API. This adds the public creation/connection/history surface while reusing the existing authentication and HTTP resource conventions.

Verification

  • make lint
  • make build
  • make test
  • make docs-check
  • go build ./examples/...
  • Account-backed integration tests run

Additional checks: go test -race ./forward -run Realtime -count=1, the complete offline suite on Go 1.23.12, and changelog/release-notes checks passed.

CN/Global × PAT/Forward-bound SAT: 4 text and 4 PCM scenarios passed through make test-live-realtime. These verify creation, ready, ping/pong, nonempty transcripts, decoded output audio, matching close acknowledgements and filtered History pagination. Temporary test Identities were cleaned up; existing Templates were preserved. Conversation IDs are retained because there is no public delete API. Input audio is a fixed PCM fixture; audio devices were not tested.

Local WebSocket tests cover protocol validation, cancellation, redirects, deadlines, queue limits, concurrent sending and closure. Work events have offline coverage; Go did not additionally execute a live Work task.

Impact

  • Public API or behavior changed
  • User-facing changes added to CHANGELOG.md under Unreleased
  • Generated API documentation updated
  • Forward/Managed contract fixtures updated where applicable
  • Python and TypeScript parity considered
  • Migration notes added for a breaking change
  • No credentials, .env.live, logs, or generated test output committed

This is additive; migration notes are not required. Adds github.com/coder/websocket while retaining Go 1.23. Transport and stage deadlines are separate from HTTP request timeouts; connections have bounded queues and do not automatically reconnect or replay inputs. Playback receipts remain application-owned.

Realtime SA access currently requires a Forward-issued bound SAT. The platform ServiceAccountCredential exchange does not create that binding; its SAT returned 403 during the initial live checks. Passing a Forward-issued SAT through the existing direct-token interface passed. The SAT issuance API is already merged into main (#12); this PR builds on it and does not change platform credential renewal. Template Realtime configuration APIs are outside this PR.

@moonyue-w
moonyue-w merged commit 5706ff0 into main Oct 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant