@meshagent/meshagent-agents 0.47.1 → 0.49.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 CHANGED
@@ -1,15 +1,33 @@
1
+ ## [0.49.0]
2
+ - Breaking: `createProject` no longer accepts inline settings; project settings are now document-based with `room_roles` support.
3
+ - Route path models now use a service-port/content-target union and support CORS, compression, index, and IAP for room-content routes.
4
+ - `RoomRole` now includes `guest`, and missing project-settings documents return `undefined`.
5
+
6
+ ## [0.48.1]
7
+ - Stability
8
+
9
+ ## [0.48.0]
10
+ - Reworked the TS/JS agent chat stack to preserve ordered threaded messages and support injected-message threads across chat clients and process handling.
11
+ - Added chat feed widgets and virtual scrolling to the React/Tailwind UI, improving large-thread performance.
12
+ - Aligned `meshagent-agents-ts` with the Dart agents implementation and refreshed the shared chat/message contracts.
13
+ - Removed the LiveKit dependency from the React package and updated shared package dependencies for the new chat stack.
14
+
1
15
  ## [0.47.1]
2
16
  - 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
17
  - Reworked messaging and room client flow control so dispatch ordering, close behavior, and presence updates stay consistent under streaming loads.
4
18
  - Expanded stream and presence test coverage for the new messaging behavior.
5
19
 
6
20
  ## [0.47.0]
21
+ - 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.
22
+ - Removed TypeScript-only dataset hydration, timeline, and derived session-state APIs from the agents package; UI-specific equivalents now live in `meshagent-tailwind`.
7
23
  - Improved TypeScript messaging clients so room delivery order and startup/presence behavior stay consistent.
8
24
  - Moved managed-agent client routing onto the Rust tunnel path and hardened agent chat-client event handling.
9
25
  - Added a `test:rust-process-e2e` entry point for the agents-ts package and expanded live chat/process-agent coverage.
10
26
  - Finished aligning CLI pagination behavior across feeds, rooms, mailboxes, scheduled tasks, and shared helpers.
11
27
 
12
28
  ## [0.46.3]
29
+ - Chat thread sessions now retain successful client-tool completion events so restored UIs can render their outputs without re-executing tools.
30
+ - Added SDK-owned dataset-thread hydration and canonical chat timelines, including sequence-ordered history replay before buffered live events.
13
31
  - `LivekitProtocolChannel.sendData` now clones outgoing `Uint8Array` payloads before publishing, avoiding shared-buffer mutation issues.
14
32
 
15
33
  ## [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: ["dataset://assets/files/report.pdf"],
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.type === agentTextContentDeltaType) {
91
- const delta = event.message as typeof event.message & { text: string };
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(...)`.