@inferencesh/sdk 0.37.0 → 0.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/agent/api.js +4 -4
- package/dist/api/agents.js +1 -1
- package/dist/proxy/endpoints.json +8 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.38.0] - 2026-10-29
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Reading a chat's messages (`fetchMessages`, `fetchMessagesPage`, `fetchChat`, and the stream's resync after a dropped connection) sends `POST /chats/{id}/messages/list` with the limit and cursor in the body. It was `GET /chats/{id}/messages`.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- The server proxy forwards `POST /chats/{id}/messages/list` (`conversations:read`). It still forwards `GET /chats/{id}/messages` for clients on 0.37.0 and older. A page on this version needs a proxy on this version or newer. `src/proxy/endpoints.json` is regenerated from the API.
|
|
17
|
+
|
|
10
18
|
## [0.37.0] - 2026-10-29
|
|
11
19
|
|
|
12
20
|
### Added
|
package/dist/agent/api.js
CHANGED
|
@@ -95,12 +95,12 @@ export async function fetchMessages(client, chatId, options) {
|
|
|
95
95
|
}
|
|
96
96
|
export async function fetchMessagesPage(client, chatId, options) {
|
|
97
97
|
try {
|
|
98
|
-
const
|
|
98
|
+
const body = {};
|
|
99
99
|
if (options?.limit !== undefined)
|
|
100
|
-
|
|
100
|
+
body.limit = options.limit;
|
|
101
101
|
if (options?.cursor)
|
|
102
|
-
|
|
103
|
-
const resp = await client.http.request('
|
|
102
|
+
body.cursor = options.cursor;
|
|
103
|
+
const resp = await client.http.request('post', `/chats/${chatId}/messages/list`, { data: body });
|
|
104
104
|
return resp.data || { items: [], next_cursor: '', has_next: false };
|
|
105
105
|
}
|
|
106
106
|
catch (error) {
|
package/dist/api/agents.js
CHANGED
|
@@ -283,7 +283,7 @@ export class Agent {
|
|
|
283
283
|
deltaAccums.clear();
|
|
284
284
|
const [{ data: chat }, { data: page }] = await Promise.all([
|
|
285
285
|
this.http.request('get', `/chats/${chatId}`),
|
|
286
|
-
this.http.request('
|
|
286
|
+
this.http.request('post', `/chats/${chatId}/messages/list`),
|
|
287
287
|
]);
|
|
288
288
|
for (const message of page?.items ?? [])
|
|
289
289
|
observeMessage(message);
|
|
@@ -174,6 +174,14 @@
|
|
|
174
174
|
"conversations:read"
|
|
175
175
|
]
|
|
176
176
|
},
|
|
177
|
+
{
|
|
178
|
+
"method": "POST",
|
|
179
|
+
"path": "/chats/{id}/messages/list",
|
|
180
|
+
"purpose": "list a chat's messages",
|
|
181
|
+
"scopes": [
|
|
182
|
+
"conversations:read"
|
|
183
|
+
]
|
|
184
|
+
},
|
|
177
185
|
{
|
|
178
186
|
"method": "GET",
|
|
179
187
|
"path": "/chats/{id}/stream",
|