Draft
Conversation
Add a /commit skill that generates commit messages following the repository's conventions, presents them for approval, and commits. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define the version, general principles, and architectural constraints for the Ably AI Transport SDK. Covers the two-layer architecture, codec parameterization, header discipline, channel model, dependency injection, and error handling conventions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add encoder core (AIT-CD1 through AIT-CD6) and decoder core (AIT-CD7 through AIT-CD10) spec points covering the contract between domain event streams and Ably message primitives. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Define the server transport layer covering factory construction, turn lifecycle (start, addMessages, streamResponse, end), cancel routing with filter headers, and transport close semantics. Spec points AIT-ST1 through AIT-ST11.
Add AIT-CT1 through AIT-CT18 covering the client transport layer: factory construction, send/regenerate/edit operations, cancel propagation, event subscriptions, message access, history with pagination, close lifecycle, conversation tree with branching and fork semantics, stream routing, echo detection, multi-client sync, active turn tracking, and waitForTurn. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add common and AI Transport-specific error code sections to the specification. Common codes (BadRequest 40000, InvalidArgument 40003) are listed for completeness. Custom codes in the 104xxx range cover encoder recovery, transport subscription errors, cancel listener errors, turn lifecycle errors, closed transport operations, and transport send failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When multiple messages are sent in a single send() call, each subsequent message must parent off the previous message in the batch rather than the original auto-computed parent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Return msg-ids from addMessages() instead of tracking them internally, and simplify streamResponse() parent resolution to per-operation override then turn-level parent. This makes parent linking explicit rather than relying on implicit internal state. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace "echo" terminology with "relay" and "optimistic reconciliation" in AIT-CT13d and AIT-CT15 to better describe the mechanism by which own messages are matched and merged with their optimistic entries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
AIT-ST5/ST5a/ST5b: redefine addMessages() to accept ConversationNode[] with typed fields (msgId, parentId, forkOf, headers) instead of unstructured per-operation options. AIT-CT9a: add getNodes() for returning the flattened conversation tree as ConversationNode[] with typed transport fields.
… spec points Revise client transport spec points to reflect the View refactor: rename ConversationTree/ConversationNode to Tree/TreeNode, update method signatures to view-scoped APIs (view.flattenNodes, view.select, view.loadOlder), and add new spec points for independent views (CT8e, CT10a-c). Add AIT-CT13e (fork auto-selection with deferred selection for regenerate) and AIT-CT13f (selection pinning for external forks).
Add spec points for the new error handling behaviours introduced in the SDK: - Amend AIT-CT3b: on POST failure the turn stream must be errored (not closed) with TransportSendFailed, preserving the HTTP status or wrapping the network error as cause. - AIT-CT14c: errorStream() on the stream router. - AIT-CT19/CT19a: channel continuity loss detection — the transport must monitor for FAILED, SUSPENDED, DETACHED, or non-resumed re-attach and error active own-turn streams with ChannelContinuityLost (104006). - AIT-CT20: send() must reject with ChannelNotReady (104007) when the channel is not ATTACHED or ATTACHING. - Add ChannelContinuityLost (104006) and ChannelNotReady (104007) to the error codes section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
spec/ait: add error handling spec points
Fixes inconsistencies in server transport error handling: - addMessages() and addEvents() must reject with an Ably.ErrorInfo (code TurnLifecycleError) on publish failure, wrapping the underlying error as cause. The per-turn onError callback is NOT invoked — per the project's single-delivery-channel rule, awaited methods surface errors via promise rejection only (new AIT-ST5c). - end() publish failure gets the same explicit treatment (new AIT-ST7b). - streamResponse() stream errors preserve the original Error in StreamResult.error and invoke onError with a wrapped Ably.ErrorInfo, allowing server-side callers to distinguish provider errors such as rate limits while giving observability a standardised type (refined AIT-ST6b3). onError is the single ErrorInfo delivery path for streamResponse since the method does not throw. Also documents the deliberate decision that error details do NOT propagate automatically to the client transport (new AIT-ST6b4): server implementations forward details explicitly (e.g. via onMessage) to avoid leaking internals and to avoid imposing a protocol contract on all codecs. Broadens the TurnLifecycleError (104003) description to cover all turn publish failures, not just lifecycle events. Adds new error code StreamError (104008) for source stream failures. Refs: AIT-667 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ling [AIT-667] spec/ait: extend error handling for turn operations and stream failures
AIT-ST4b (turn-start publish failure) previously said onError must be invoked and the error re-thrown. PR #449 reworked ST5c and ST7b to the rejection-only pattern: the method must reject with an Ably.ErrorInfo carrying code TurnLifecycleError and wrapping the underlying error as cause, and onError must NOT be invoked. This brings ST4b in line with ST5c and ST7b. Per the project's single-delivery-channel rule, awaited methods must not surface the same error through both rejection and onError. Since start() is awaited, rejection is the sole delivery channel; onError is reserved for paths with no other signal (streamResponse stream errors in AIT-ST6b3, onCancel handler failures in AIT-ST9a). Scope: deliberately left out of PR #449 to keep that PR's scope to its branch name; this is the promised follow-up. Refs: AIT-667 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ling [AIT-667] spec/ait: align AIT-ST4b with turn-lifecycle error pattern
Server-side counterpart to AIT-597. Add AIT-ST12/AIT-ST12a requiring the server transport to monitor the channel for continuity loss (FAILED, SUSPENDED, DETACHED, or re-attach with resumed:false) and surface it via the transport-level onError callback with ChannelContinuityLost (104006). Active turns are not auto-aborted and the per-turn onError is not invoked — continuity loss is channel-wide, not turn-scoped, and the server's only inbound channel traffic is cancel messages (missing one is survivable). Amend AIT-ST11 to require close() to also stop listening for channel state changes (AIT-ST12) and to be idempotent. Companion SDK PR: https://github.com/ably/ably-ai-transport-js/pull/<TBD> [AIT-695] Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
spec/ait: add server-side channel continuity
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.
No description provided.