Skip to content

Commit 1a8b08e

Browse files
committed
docs(ai-chat): tidy Sessions changelog + sidebar
- Move Upgrade Guide to the bottom of the Agents sidebar (after API Reference) and rename its sidebarTitle to "Sessions Upgrade Guide" so it reads as a standalone migration doc rather than a regular concept page. - Replace the inaccurate inline Migration section in the 4/24 Sessions changelog entry with a pointer to the upgrade guide. - Add a Docs section to the same entry summarizing the Sessions doc surface that shipped: rewritten Client Protocol, atomic-write warning on the persistence pattern, new reference symbols, and the broader page refreshes.
1 parent 40431ec commit 1a8b08e

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

docs/ai-chat/changelog.mdx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,14 @@ Practical impact: `TriggerChatTransport.reconnectToStream` no longer needs a cli
3131

3232
## Migration
3333

34-
Nothing to do for users of `chat.agent()` + `TriggerChatTransport` + `AgentChat`. Your existing code keeps working; you pick up the new durability guarantees for free.
34+
See the [Sessions Upgrade Guide](/ai-chat/upgrade-guide) for the full step-by-step — auth callback split, persisted `ChatSession` shape, server-side helpers (`chat.createStartSessionAction`, `chat.createAccessToken` for renewal), and the `clientData` validation pivot.
3535

36-
If you built a custom transport against the old `/realtime/v1/streams/{runId}/...` endpoints, see the rewritten [Client Protocol](/ai-chat/client-protocol) for the new session-based wire format. The old constants (`CHAT_STREAM_KEY`, `CHAT_MESSAGES_STREAM_ID`, `CHAT_STOP_STREAM_ID`) are removed from `@trigger.dev/core/v3/chat-client` — migrate to `sessions.open(sessionId).out` / `.in`.
36+
## Docs
37+
38+
- Rewritten [Client Protocol](/ai-chat/client-protocol) — full wire format for the new `/realtime/v1/sessions/{sessionId}/...` endpoints, JWT scopes, S2 direct-write credentials, and `Last-Event-ID` resume.
39+
- [Database persistence pattern](/ai-chat/patterns/database-persistence) — new `chatId`-keyed `ChatSession` shape (no more `runId`) and a warning on the `onTurnComplete` race that requires a single atomic write of `messages` + `lastEventId`.
40+
- [Reference](/ai-chat/reference) — added `chat.createStartSessionAction`, `chat.createAccessToken`, `ChatInputChunk`, `TriggerChatTaskResult.sessionId`, `ChatTaskRunPayload.sessionId`. The old run-scoped stream-ID constants are gone.
41+
- Refreshed [Backend](/ai-chat/backend), [Frontend](/ai-chat/frontend), [Server Chat](/ai-chat/server-chat), [Quick start](/ai-chat/quick-start), [Overview](/ai-chat/overview), [Features](/ai-chat/features), [Types](/ai-chat/types), [Error handling](/ai-chat/error-handling), and [Testing](/ai-chat/testing) for the session-based wiring.
3742

3843
</Update>
3944

docs/ai-chat/upgrade-guide.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Upgrade Guide: prerelease → Sessions-as-run-manager"
3-
sidebarTitle: "Upgrade Guide"
3+
sidebarTitle: "Sessions Upgrade Guide"
44
description: "Migrating chat.agent code from the prerelease API to the Sessions-as-run-manager release."
55
---
66

docs/docs.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
"pages": [
106106
"ai-chat/overview",
107107
"ai-chat/changelog",
108-
"ai-chat/upgrade-guide",
109108
"ai-chat/quick-start",
110109
"ai-chat/backend",
111110
"ai-chat/frontend",
@@ -131,7 +130,8 @@
131130
]
132131
},
133132
"ai-chat/client-protocol",
134-
"ai-chat/reference"
133+
"ai-chat/reference",
134+
"ai-chat/upgrade-guide"
135135
]
136136
}
137137
]

0 commit comments

Comments
 (0)