@meshagent/meshagent-react 0.29.2 → 0.30.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,3 +1,15 @@
1
+ ## [0.30.0]
2
+ - Breaking: tool invocation now uses toolkit-based `room.invoke`/`room.*` events with streaming tool-call chunks, and `RemoteToolkit` registration follows the new room-scoped protocol.
3
+ - Added a Containers client with image listing/pulling, container lifecycle operations, and exec/log streaming.
4
+ - Storage client replaced handle-based writes with streaming upload/download, download URLs, and size metadata.
5
+ - Database and Sync clients now stream inserts/queries/search and sync updates with typed value handling; messaging/queues/developer clients updated to toolkit invocation.
6
+
7
+ ## [0.29.4]
8
+ - Stability
9
+
10
+ ## [0.29.3]
11
+ - Stability
12
+
1
13
  ## [0.29.2]
2
14
  - Stability
3
15
 
@@ -137,21 +137,22 @@ class MeshagentFileUpload extends FileUpload {
137
137
  throw new Error("upload already started or completed");
138
138
  }
139
139
  try {
140
- const handle = await this.room.storage.open(this.path, { overwrite: true });
141
- try {
142
- this.status = UploadStatus.Uploading;
143
- for await (const chunk of this.dataStream) {
144
- await this.room.storage.write(handle, chunk);
145
- this._bytesUploaded += chunk.length;
146
- this.emit("progress", {
140
+ this.status = UploadStatus.Uploading;
141
+ const self = this;
142
+ async function* trackedChunks() {
143
+ for await (const chunk of self.dataStream) {
144
+ self._bytesUploaded += chunk.length;
145
+ self.emit("progress", {
147
146
  status: UploadStatus.Uploading,
148
- progress: this.bytesUploaded / this.size,
147
+ progress: self.bytesUploaded / self.size,
149
148
  });
149
+ yield chunk;
150
150
  }
151
151
  }
152
- finally {
153
- await this.room.storage.close(handle);
154
- }
152
+ await this.room.storage.uploadStream(this.path, trackedChunks(), {
153
+ overwrite: true,
154
+ size: this.size,
155
+ });
155
156
  this._resolveDone();
156
157
  this.status = UploadStatus.Completed;
157
158
  const urlStr = await this.room.storage.downloadUrl(this.path);
@@ -133,21 +133,22 @@ export class MeshagentFileUpload extends FileUpload {
133
133
  throw new Error("upload already started or completed");
134
134
  }
135
135
  try {
136
- const handle = await this.room.storage.open(this.path, { overwrite: true });
137
- try {
138
- this.status = UploadStatus.Uploading;
139
- for await (const chunk of this.dataStream) {
140
- await this.room.storage.write(handle, chunk);
141
- this._bytesUploaded += chunk.length;
142
- this.emit("progress", {
136
+ this.status = UploadStatus.Uploading;
137
+ const self = this;
138
+ async function* trackedChunks() {
139
+ for await (const chunk of self.dataStream) {
140
+ self._bytesUploaded += chunk.length;
141
+ self.emit("progress", {
143
142
  status: UploadStatus.Uploading,
144
- progress: this.bytesUploaded / this.size,
143
+ progress: self.bytesUploaded / self.size,
145
144
  });
145
+ yield chunk;
146
146
  }
147
147
  }
148
- finally {
149
- await this.room.storage.close(handle);
150
- }
148
+ await this.room.storage.uploadStream(this.path, trackedChunks(), {
149
+ overwrite: true,
150
+ size: this.size,
151
+ });
151
152
  this._resolveDone();
152
153
  this.status = UploadStatus.Completed;
153
154
  const urlStr = await this.room.storage.downloadUrl(this.path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshagent/meshagent-react",
3
- "version": "0.29.2",
3
+ "version": "0.30.0",
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.29.2",
37
+ "@meshagent/meshagent": "^0.30.0",
38
38
  "react-dom": "^19.1.0",
39
39
  "typescript": "^5.8.3",
40
40
  "uuid": "^11.1.0",