@meshagent/meshagent-agents 0.47.1 → 0.48.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 +10 -0
- package/README.md +28 -5
- package/dist/browser/agent-messages.d.ts +1448 -107
- package/dist/browser/agent-messages.js +345 -193
- package/dist/browser/chat-client.d.ts +93 -33
- package/dist/browser/chat-client.js +483 -206
- package/dist/browser/images-dataset.d.ts +1 -1
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.js +8 -0
- package/dist/browser/thread-storage.d.ts +1 -1
- package/dist/esm/agent-messages.d.ts +1448 -107
- package/dist/esm/agent-messages.js +340 -189
- package/dist/esm/chat-client.d.ts +93 -33
- package/dist/esm/chat-client.js +478 -206
- package/dist/esm/images-dataset.d.ts +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/thread-storage.d.ts +1 -1
- package/dist/node/agent-messages.d.ts +1448 -107
- package/dist/node/agent-messages.js +345 -193
- package/dist/node/chat-client.d.ts +93 -33
- package/dist/node/chat-client.js +483 -206
- package/dist/node/images-dataset.d.ts +1 -1
- package/dist/node/index.d.ts +2 -0
- package/dist/node/index.js +8 -0
- package/dist/node/thread-storage.d.ts +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
## [0.48.0]
|
|
2
|
+
- Reworked the TS/JS agent chat stack to preserve ordered threaded messages and support injected-message threads across chat clients and process handling.
|
|
3
|
+
- Added chat feed widgets and virtual scrolling to the React/Tailwind UI, improving large-thread performance.
|
|
4
|
+
- Aligned `meshagent-agents-ts` with the Dart agents implementation and refreshed the shared chat/message contracts.
|
|
5
|
+
- Removed the LiveKit dependency from the React package and updated shared package dependencies for the new chat stack.
|
|
6
|
+
|
|
1
7
|
## [0.47.1]
|
|
2
8
|
- Added duplex messaging stream subscriptions and replay-state alignment in the TypeScript chat clients, bringing the NodeJS SDK in line with the new streaming model.
|
|
3
9
|
- Reworked messaging and room client flow control so dispatch ordering, close behavior, and presence updates stay consistent under streaming loads.
|
|
4
10
|
- Expanded stream and presence test coverage for the new messaging behavior.
|
|
5
11
|
|
|
6
12
|
## [0.47.0]
|
|
13
|
+
- Aligned the TypeScript agent message and chat-client API with the Dart implementation, including strongly typed message constructors, `AgentFileContent`, client-tool request claiming, pending-thread matching, and direct MessagePack WebSocket transport.
|
|
14
|
+
- Removed TypeScript-only dataset hydration, timeline, and derived session-state APIs from the agents package; UI-specific equivalents now live in `meshagent-tailwind`.
|
|
7
15
|
- Improved TypeScript messaging clients so room delivery order and startup/presence behavior stay consistent.
|
|
8
16
|
- Moved managed-agent client routing onto the Rust tunnel path and hardened agent chat-client event handling.
|
|
9
17
|
- Added a `test:rust-process-e2e` entry point for the agents-ts package and expanded live chat/process-agent coverage.
|
|
10
18
|
- Finished aligning CLI pagination behavior across feeds, rooms, mailboxes, scheduled tasks, and shared helpers.
|
|
11
19
|
|
|
12
20
|
## [0.46.3]
|
|
21
|
+
- Chat thread sessions now retain successful client-tool completion events so restored UIs can render their outputs without re-executing tools.
|
|
22
|
+
- Added SDK-owned dataset-thread hydration and canonical chat timelines, including sequence-ordered history replay before buffered live events.
|
|
13
23
|
- `LivekitProtocolChannel.sendData` now clones outgoing `Uint8Array` payloads before publishing, avoiding shared-buffer mutation issues.
|
|
14
24
|
|
|
15
25
|
## [0.46.2]
|
package/README.md
CHANGED
|
@@ -35,6 +35,7 @@ Every protocol message is represented by a class with `toJson()` and can be pars
|
|
|
35
35
|
|
|
36
36
|
```ts
|
|
37
37
|
import {
|
|
38
|
+
AgentFileContent,
|
|
38
39
|
AgentMessage,
|
|
39
40
|
TurnStart,
|
|
40
41
|
agentInputContent,
|
|
@@ -44,7 +45,10 @@ const message = new TurnStart({
|
|
|
44
45
|
threadId: "dataset://threads/example",
|
|
45
46
|
content: agentInputContent({
|
|
46
47
|
text: "Summarize this file.",
|
|
47
|
-
attachments: [
|
|
48
|
+
attachments: [new AgentFileContent({
|
|
49
|
+
url: "dataset://assets/files/report.pdf",
|
|
50
|
+
name: "report.pdf",
|
|
51
|
+
})],
|
|
48
52
|
}),
|
|
49
53
|
provider: "openai",
|
|
50
54
|
model: "gpt-5.4",
|
|
@@ -62,8 +66,8 @@ The package exports the message type constants as well, for example `agentTurnSt
|
|
|
62
66
|
|
|
63
67
|
```ts
|
|
64
68
|
import {
|
|
69
|
+
AgentTextContentDelta,
|
|
65
70
|
MessagingChatClient,
|
|
66
|
-
agentTextContentDeltaType,
|
|
67
71
|
} from "@meshagent/meshagent-agents";
|
|
68
72
|
import type { RoomClient } from "@meshagent/meshagent";
|
|
69
73
|
|
|
@@ -87,9 +91,8 @@ await session.sendText({
|
|
|
87
91
|
});
|
|
88
92
|
|
|
89
93
|
for await (const event of chat.events) {
|
|
90
|
-
if (event.message
|
|
91
|
-
|
|
92
|
-
process.stdout.write(delta.text);
|
|
94
|
+
if (event.message instanceof AgentTextContentDelta) {
|
|
95
|
+
process.stdout.write(event.message.text);
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
```
|
|
@@ -111,6 +114,26 @@ await session.close();
|
|
|
111
114
|
|
|
112
115
|
`ChatThreadSession` tracks local pending inputs in `session.pendingInputs`. Pending input state is updated when accepted, started, steered, rejected, ended, or cleared messages arrive from the agent.
|
|
113
116
|
|
|
117
|
+
## WebSocket Chat Client
|
|
118
|
+
|
|
119
|
+
`WebSocketChatClient` is the direct MessagePack WebSocket transport. It uses the `meshagent-msgpack` and `meshagent-agent.<token>` subprotocols and reconnects by default.
|
|
120
|
+
|
|
121
|
+
```ts
|
|
122
|
+
import { WebSocketChatClient } from "@meshagent/meshagent-agents";
|
|
123
|
+
|
|
124
|
+
const chat = new WebSocketChatClient({
|
|
125
|
+
url: new URL("wss://example.test/messages"),
|
|
126
|
+
token: participantToken,
|
|
127
|
+
participantName: "user@example.com",
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
await chat.start();
|
|
131
|
+
const { session } = await chat.startThread({
|
|
132
|
+
message: "Hello",
|
|
133
|
+
attachments: [],
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
114
137
|
## Custom Transports
|
|
115
138
|
|
|
116
139
|
Use `BaseChatClient` if you want to send agent messages through another transport. Implement `sendAgentMessage(...)` and feed inbound messages back through `handleAgentMessage(...)`.
|