@agent-os-lab/agent-sdk 0.1.63 → 0.1.65

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.
Files changed (3) hide show
  1. package/README.md +3 -2
  2. package/USAGE.md +2 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -158,7 +158,7 @@ Use `getSessionMessagesByIds` when you already have persisted message ids and on
158
158
  const selected = await chat.getSessionMessagesByIds(sessionId, selectedMessageIds);
159
159
  ```
160
160
 
161
- During streaming, AgentOS may emit a `CUSTOM` AG-UI event named `agentos.message.persisted`. Its value maps the client/runtime message id to the durable persisted message id:
161
+ During streaming, AgentOS may emit a `CUSTOM` AG-UI event named `agentos.message.persisted`. Its value maps the current visible runtime message id to the durable persisted message id:
162
162
 
163
163
  ```ts
164
164
  {
@@ -168,7 +168,8 @@ During streaming, AgentOS may emit a `CUSTOM` AG-UI event named `agentos.message
168
168
  }
169
169
  ```
170
170
 
171
- Use this event as the persistence acknowledgment before treating a streamed user message as safe to reference or reload by id.
171
+ Use this event as the persistence acknowledgment before treating a streamed message as safe to reference or reload by id.
172
+ AgentOS emits this acknowledgment for persisted visible user and assistant messages. For assistant replies, `runtimeMessageId` matches the AG-UI message id currently visible to the client; `persistedMessageId` is the AgentOS id to store for durable references.
172
173
 
173
174
  Use the lower-level `createAgUiAgent` when you already own session/history management and only need the AG-UI transport.
174
175
 
package/USAGE.md CHANGED
@@ -204,7 +204,7 @@ const selectedMessages = await chat.getSessionMessagesByIds(session.sessionId, [
204
204
 
205
205
  The request accepts at most 100 message ids. Returned messages are ordered by transcript order and include the same `messageReference` shape as full session history.
206
206
 
207
- During streaming, AgentOS can send an AG-UI `CUSTOM` event named `agentos.message.persisted` after a user message is durably stored:
207
+ During streaming, AgentOS can send an AG-UI `CUSTOM` event named `agentos.message.persisted` after a visible user or assistant message is durably stored:
208
208
 
209
209
  ```ts
210
210
  {
@@ -218,7 +218,7 @@ During streaming, AgentOS can send an AG-UI `CUSTOM` event named `agentos.messag
218
218
  }
219
219
  ```
220
220
 
221
- Treat the pre-stream/client id as a runtime id. Use the `message.persisted` acknowledgment or later `messageReference` from history before saving durable references or calling `getSessionMessagesByIds`.
221
+ Treat pre-stream/client ids and AG-UI visible assistant ids as runtime ids. Use the `message.persisted` acknowledgment or later `messageReference` from history before saving durable references or calling `getSessionMessagesByIds`.
222
222
 
223
223
  Use lower-level `createAgUiAgent` only when your application already manages session list/history/active-run state itself.
224
224
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-os-lab/agent-sdk",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",