@meshagent/meshagent-react 0.35.6 → 0.35.7

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,3 +1,11 @@
1
+ ## [0.35.7]
2
+ - Added container build lifecycle and image management in the TS SDK (start/build returning build IDs, list/cancel/delete builds, build logs, load/save/push/delete images) plus exec stderr streams and stricter status decoding.
3
+ - Breaking: container build APIs now return build IDs and `stop` defaults to non-forced.
4
+ - Added database namespace support and new operations (count, inspect, restore/checkout, listVersions with metadata) plus typed indexes and search offset.
5
+ - Added secrets client overhaul: OAuth/secret request handlers, offline OAuth tokens, request/provide/reject secret flows, and flexible get/set secret by id/type/name.
6
+ - Added storage enhancements: `stat`, upload MIME inference, storage entries include created/updated timestamps, and file updated/deleted events now include participant IDs.
7
+ - Breaking: messaging stream APIs removed; messaging now uses queued sends with start/stop, and RoomClient starts messaging automatically.
8
+
1
9
  ## [0.35.6]
2
10
  - New `@meshagent/meshagent-ts-auth` package provides framework-agnostic OAuth/PKCE login, token storage/refresh, and access-token providers.
3
11
  - New `@meshagent/meshagent-react-dev` package adds developer console hooks for logs, terminal sessions, and webterm/ghostty integrations.
package/dist/cjs/chat.js CHANGED
@@ -34,6 +34,10 @@ class ChatMessage {
34
34
  }
35
35
  }
36
36
  exports.ChatMessage = ChatMessage;
37
+ function getParticipantName(participant) {
38
+ const name = participant.getAttribute("name");
39
+ return typeof name === "string" && name.length > 0 ? name : null;
40
+ }
37
41
  function ensureParticipants(document, localParticipant, includeLocalParticipant, participants, participantNames) {
38
42
  const retParticipants = [
39
43
  ...(participants ?? []),
@@ -45,12 +49,12 @@ function ensureParticipants(document, localParticipant, includeLocalParticipant,
45
49
  if (child.tagName === "members") {
46
50
  for (const member of child.getChildren()
47
51
  .filter((c) => c.tagName !== undefined)) {
48
- const name = member.getAttribute("name");
52
+ const name = getParticipantName(member);
49
53
  if (name)
50
54
  existing.add(name);
51
55
  }
52
56
  for (const part of retParticipants) {
53
- const name = part.getAttribute("name");
57
+ const name = getParticipantName(part);
54
58
  if (name && !existing.has(name)) {
55
59
  child.createChildElement("member", { name });
56
60
  existing.add(name);
@@ -78,7 +82,7 @@ function* getParticipantNames(document) {
78
82
  const memberNode = children.find((c) => c.tagName === "members");
79
83
  const members = memberNode?.getChildren() || [];
80
84
  for (const member of members) {
81
- const name = member.getAttribute("name");
85
+ const name = getParticipantName(member);
82
86
  if (name) {
83
87
  yield name;
84
88
  }
@@ -87,7 +91,7 @@ function* getParticipantNames(document) {
87
91
  function* getOnlineParticipants(roomParticipants, participantNames) {
88
92
  for (const participantName of participantNames) {
89
93
  for (const remoteParticipant of roomParticipants) {
90
- if (remoteParticipant.getAttribute("name") === participantName) {
94
+ if (getParticipantName(remoteParticipant) === participantName) {
91
95
  yield remoteParticipant;
92
96
  }
93
97
  }
@@ -161,7 +165,7 @@ function useChat({ room, path, participants, participantNames, initialMessage, i
161
165
  id: message.id,
162
166
  text: message.text,
163
167
  created_at: new Date().toISOString(),
164
- author_name: room.localParticipant.getAttribute("name"),
168
+ author_name: getParticipantName(room.localParticipant) ?? "",
165
169
  author_ref: null,
166
170
  });
167
171
  for (const path of message.attachments) {
package/dist/esm/chat.js CHANGED
@@ -28,6 +28,10 @@ export class ChatMessage {
28
28
  this.attachments = attachments ?? [];
29
29
  }
30
30
  }
31
+ function getParticipantName(participant) {
32
+ const name = participant.getAttribute("name");
33
+ return typeof name === "string" && name.length > 0 ? name : null;
34
+ }
31
35
  function ensureParticipants(document, localParticipant, includeLocalParticipant, participants, participantNames) {
32
36
  const retParticipants = [
33
37
  ...(participants ?? []),
@@ -39,12 +43,12 @@ function ensureParticipants(document, localParticipant, includeLocalParticipant,
39
43
  if (child.tagName === "members") {
40
44
  for (const member of child.getChildren()
41
45
  .filter((c) => c.tagName !== undefined)) {
42
- const name = member.getAttribute("name");
46
+ const name = getParticipantName(member);
43
47
  if (name)
44
48
  existing.add(name);
45
49
  }
46
50
  for (const part of retParticipants) {
47
- const name = part.getAttribute("name");
51
+ const name = getParticipantName(part);
48
52
  if (name && !existing.has(name)) {
49
53
  child.createChildElement("member", { name });
50
54
  existing.add(name);
@@ -72,7 +76,7 @@ function* getParticipantNames(document) {
72
76
  const memberNode = children.find((c) => c.tagName === "members");
73
77
  const members = memberNode?.getChildren() || [];
74
78
  for (const member of members) {
75
- const name = member.getAttribute("name");
79
+ const name = getParticipantName(member);
76
80
  if (name) {
77
81
  yield name;
78
82
  }
@@ -81,7 +85,7 @@ function* getParticipantNames(document) {
81
85
  function* getOnlineParticipants(roomParticipants, participantNames) {
82
86
  for (const participantName of participantNames) {
83
87
  for (const remoteParticipant of roomParticipants) {
84
- if (remoteParticipant.getAttribute("name") === participantName) {
88
+ if (getParticipantName(remoteParticipant) === participantName) {
85
89
  yield remoteParticipant;
86
90
  }
87
91
  }
@@ -155,7 +159,7 @@ export function useChat({ room, path, participants, participantNames, initialMes
155
159
  id: message.id,
156
160
  text: message.text,
157
161
  created_at: new Date().toISOString(),
158
- author_name: room.localParticipant.getAttribute("name"),
162
+ author_name: getParticipantName(room.localParticipant) ?? "",
159
163
  author_ref: null,
160
164
  });
161
165
  for (const path of message.attachments) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshagent/meshagent-react",
3
- "version": "0.35.6",
3
+ "version": "0.35.7",
4
4
  "description": "Meshagent React Client",
5
5
  "homepage": "https://github.com/meshagent/meshagent-react",
6
6
  "scripts": {
@@ -34,7 +34,7 @@
34
34
  "base-64": "^1.0.0",
35
35
  "livekit-client": "^2.15.5",
36
36
  "react": "^19.1.0",
37
- "@meshagent/meshagent": "^0.35.6",
37
+ "@meshagent/meshagent": "^0.35.7",
38
38
  "react-dom": "^19.1.0",
39
39
  "typescript": "^5.8.3",
40
40
  "uuid": "^11.1.0",