Skip to content

Commit 2c0ce01

Browse files
committed
package: update name to @ably/ai-transport
1 parent c5a5c4d commit 2c0ce01

42 files changed

Lines changed: 97 additions & 97 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/rules/ABSTRACTIONS.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ The SDK ships four entry points from a single package:
4141

4242
| Export path | Contains | Purpose | External deps |
4343
|---|---|---|---|
44-
| `@ably/ably-ai-transport-js` | Generic codec interfaces, `createClientTransport`, `createServerTransport`, shared utilities | Core primitives — codec-agnostic transport and encoding | `ably` (peer) |
45-
| `@ably/ably-ai-transport-js/react` | `useClientTransport`, `useMessages`, `useSend`, `useRegenerate`, `useEdit`, `useActiveTurns`, `useHistory`, `useConversationTree`, `useAblyMessages` | Generic React hooks for any codec | `ably`, `react` (peers) |
46-
| `@ably/ably-ai-transport-js/vercel` | `UIMessageCodec`, `createServerTransport`, `createClientTransport`, `createChatTransport`, Vercel-specific types | Drop-in Vercel AI SDK integration | `ably`, `ai` (peers) |
47-
| `@ably/ably-ai-transport-js/vercel/react` | `useChatTransport`, `useMessageSync` | React hooks for Vercel's `useChat` | `ably`, `ai`, `react` (peers) |
44+
| `@ably/ai-transport` | Generic codec interfaces, `createClientTransport`, `createServerTransport`, shared utilities | Core primitives — codec-agnostic transport and encoding | `ably` (peer) |
45+
| `@ably/ai-transport/react` | `useClientTransport`, `useMessages`, `useSend`, `useRegenerate`, `useEdit`, `useActiveTurns`, `useHistory`, `useConversationTree`, `useAblyMessages` | Generic React hooks for any codec | `ably`, `react` (peers) |
46+
| `@ably/ai-transport/vercel` | `UIMessageCodec`, `createServerTransport`, `createClientTransport`, `createChatTransport`, Vercel-specific types | Drop-in Vercel AI SDK integration | `ably`, `ai` (peers) |
47+
| `@ably/ai-transport/vercel/react` | `useChatTransport`, `useMessageSync` | React hooks for Vercel's `useChat` | `ably`, `ai`, `react` (peers) |
4848

4949

5050
## Two-Layer Architecture

.claude/skills/docs/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ After writing a doc page, verify:
368368
- [ ] Code examples are copy-pasteable and use real API surface
369369
- [ ] Code examples match current source code (read the implementation)
370370
- [ ] Code examples have all variables defined (no undefined references)
371-
- [ ] Import paths use real package entry points (`@ably/ably-ai-transport-js`, `/react`, `/vercel`, `/vercel/react`)
371+
- [ ] Import paths use real package entry points (`@ably/ai-transport`, `/react`, `/vercel`, `/vercel/react`)
372372
- [ ] Interface signatures match the source exactly — optional fields (`?`),
373373
parameter names, parameter order, return types
374374
- [ ] Wire protocol values match source (`streaming`/`finished`/`aborted`, not `open`/`closed`)

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project
66

7-
`@ably/ably-ai-transport-js` — Ably transport and codecs for building AI applications with Ably. Ships as a single npm package with four entry points: core, react, vercel, and vercel/react.
7+
`@ably/ai-transport` — Ably transport and codecs for building AI applications with Ably. Ships as a single npm package with four entry points: core, react, vercel, and vercel/react.
88

99
## Commands
1010

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
A durable transport layer between AI agents and users. Streams AI responses over [Ably](https://ably.com/) channels — responses resume after disconnections, conversations persist across page reloads and devices — with cancellation, branching conversations, and multi-user sync.
44

5-
`@ably/ably-ai-transport-js` ships as a single package with four entry points: core primitives, React hooks, Vercel AI SDK integration, and Vercel + React hooks.
5+
`@ably/ai-transport` ships as a single package with four entry points: core primitives, React hooks, Vercel AI SDK integration, and Vercel + React hooks.
66

77
> **Status:** Pre-release (`0.x`). The API is evolving. Feedback and contributions are welcome.
88
@@ -30,13 +30,13 @@ The SDK is codec-agnostic. A `Codec` translates between your AI framework's type
3030
### Installation
3131

3232
```sh
33-
npm install @ably/ably-ai-transport-js ably
33+
npm install @ably/ai-transport ably
3434
```
3535

3636
For Vercel AI SDK projects, also install the `ai` package:
3737

3838
```sh
39-
npm install @ably/ably-ai-transport-js ably ai
39+
npm install @ably/ai-transport ably ai
4040
```
4141

4242
### Supported platforms
@@ -63,8 +63,8 @@ import { streamText, convertToModelMessages } from 'ai';
6363
import type { UIMessage } from 'ai';
6464
import { anthropic } from '@ai-sdk/anthropic';
6565
import Ably from 'ably';
66-
import { createServerTransport } from '@ably/ably-ai-transport-js/vercel';
67-
import type { MessageWithHeaders } from '@ably/ably-ai-transport-js';
66+
import { createServerTransport } from '@ably/ai-transport/vercel';
67+
import type { MessageWithHeaders } from '@ably/ai-transport';
6868

6969
interface ChatRequestBody {
7070
turnId: string;
@@ -119,9 +119,9 @@ export async function POST(req: Request) {
119119

120120
import { useChat } from '@ai-sdk/react';
121121
import { useChannel } from 'ably/react';
122-
import { useClientTransport, useActiveTurns, useHistory } from '@ably/ably-ai-transport-js/react';
123-
import { useChatTransport, useMessageSync } from '@ably/ably-ai-transport-js/vercel/react';
124-
import { UIMessageCodec } from '@ably/ably-ai-transport-js/vercel';
122+
import { useClientTransport, useActiveTurns, useHistory } from '@ably/ai-transport/react';
123+
import { useChatTransport, useMessageSync } from '@ably/ai-transport/vercel/react';
124+
import { UIMessageCodec } from '@ably/ai-transport/vercel';
125125

126126
function Chat({ chatId, clientId }: { chatId: string; clientId?: string }) {
127127
const { channel } = useChannel({ channelName: chatId });
@@ -204,7 +204,7 @@ The core entry point is framework-agnostic. Bring your own `Codec` to map betwee
204204
### Client
205205

206206
```typescript
207-
import { createClientTransport } from '@ably/ably-ai-transport-js';
207+
import { createClientTransport } from '@ably/ai-transport';
208208
import { myCodec } from './my-codec';
209209

210210
const transport = createClientTransport({
@@ -228,7 +228,7 @@ while (true) {
228228
### Server
229229

230230
```typescript
231-
import { createServerTransport } from '@ably/ably-ai-transport-js';
231+
import { createServerTransport } from '@ably/ai-transport';
232232
import { myCodec } from './my-codec';
233233

234234
const transport = createServerTransport({ channel, codec: myCodec });
@@ -248,10 +248,10 @@ transport.close();
248248

249249
| Export path | Purpose | Peer dependencies |
250250
| ----------------------------------------- | ------------------------------------------- | --------------------- |
251-
| `@ably/ably-ai-transport-js` | Core transport, codec interfaces, utilities | `ably` |
252-
| `@ably/ably-ai-transport-js/react` | React hooks for any codec | `ably`, `react` |
253-
| `@ably/ably-ai-transport-js/vercel` | Vercel AI SDK codec, transport factories | `ably`, `ai` |
254-
| `@ably/ably-ai-transport-js/vercel/react` | React hooks for Vercel's `useChat` | `ably`, `ai`, `react` |
251+
| `@ably/ai-transport` | Core transport, codec interfaces, utilities | `ably` |
252+
| `@ably/ai-transport/react` | React hooks for any codec | `ably`, `react` |
253+
| `@ably/ai-transport/vercel` | Vercel AI SDK codec, transport factories | `ably`, `ai` |
254+
| `@ably/ai-transport/vercel/react` | React hooks for Vercel's `useChat` | `ably`, `ai`, `react` |
255255

256256
### React hooks
257257

demo/vercel/react/use-chat/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { NextConfig } from "next";
33
const nextConfig: NextConfig = {
44
serverExternalPackages: ["jsonwebtoken", "ably"],
55
webpack: (config) => {
6-
// @ably/ably-ai-transport-js source uses .js extensions in imports (standard TS ESM convention).
6+
// @ably/ai-transport source uses .js extensions in imports (standard TS ESM convention).
77
// When the library is linked as source (file:../../), webpack needs to resolve
88
// .js imports to .ts files.
99
config.resolve.extensionAlias = {

demo/vercel/react/use-chat/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lint": "next lint"
1111
},
1212
"dependencies": {
13-
"@ably/ably-ai-transport-js": "file:../../../../",
13+
"@ably/ai-transport": "file:../../../../",
1414
"@ai-sdk/anthropic": "^3",
1515
"@ai-sdk/react": "^3.0.118",
1616
"ably": "^2",

demo/vercel/react/use-chat/src/app/api/chat/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import { streamText, convertToModelMessages } from 'ai';
1111
import type { UIMessage } from 'ai';
1212
import { anthropic } from '@ai-sdk/anthropic';
1313
import Ably from 'ably';
14-
import { createServerTransport } from '@ably/ably-ai-transport-js/vercel';
15-
import type { MessageWithHeaders } from '@ably/ably-ai-transport-js';
14+
import { createServerTransport } from '@ably/ai-transport/vercel';
15+
import type { MessageWithHeaders } from '@ably/ai-transport';
1616

1717
/** Shape of the POST body sent by the client transport. */
1818
interface ChatRequestBody {

demo/vercel/react/use-chat/src/app/chat.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import { useChat } from '@ai-sdk/react';
44
import { useChannel } from 'ably/react';
5-
import { useClientTransport, useActiveTurns, useHistory, useAblyMessages } from '@ably/ably-ai-transport-js/react';
6-
import { useChatTransport, useMessageSync } from '@ably/ably-ai-transport-js/vercel/react';
7-
import { UIMessageCodec } from '@ably/ably-ai-transport-js/vercel';
5+
import { useClientTransport, useActiveTurns, useHistory, useAblyMessages } from '@ably/ai-transport/react';
6+
import { useChatTransport, useMessageSync } from '@ably/ai-transport/vercel/react';
7+
import { UIMessageCodec } from '@ably/ai-transport/vercel';
88
import { useState } from 'react';
99
import { MessageList } from './components/message-list';
1010
import { DebugPane } from './components/debug-pane';

demo/vercel/react/use-chat/src/app/components/message-list.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { useRef, useEffect } from 'react';
44
import type { UIMessage } from 'ai';
5-
import type { ClientTransport } from '@ably/ably-ai-transport-js';
5+
import type { ClientTransport } from '@ably/ai-transport';
66
import type { UIMessageChunk } from 'ai';
77
import { MessageBubble } from './message-bubble';
88

demo/vercel/react/use-client-transport/next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { NextConfig } from "next";
33
const nextConfig: NextConfig = {
44
serverExternalPackages: ["jsonwebtoken", "ably"],
55
webpack: (config) => {
6-
// @ably/ably-ai-transport-js source uses .js extensions in imports (standard TS ESM convention).
6+
// @ably/ai-transport source uses .js extensions in imports (standard TS ESM convention).
77
// When the library is linked as source (file:../../), webpack needs to resolve
88
// .js imports to .ts files.
99
config.resolve.extensionAlias = {

0 commit comments

Comments
 (0)