@aerol-ai/aerolvm-sdk 0.1.5 → 0.1.6
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/dist/internal/client.js +8 -4
- package/package.json +3 -3
package/dist/internal/client.js
CHANGED
|
@@ -497,6 +497,12 @@ function describeWSClose(event) {
|
|
|
497
497
|
parts.push(`wasClean=${e.wasClean}`);
|
|
498
498
|
return parts.join(" ");
|
|
499
499
|
}
|
|
500
|
+
function toWebSocketBinaryFrame(data) {
|
|
501
|
+
const bytes = typeof data === "string" ? new TextEncoder().encode(data) : data;
|
|
502
|
+
const frame = new Uint8Array(bytes.byteLength);
|
|
503
|
+
frame.set(bytes);
|
|
504
|
+
return frame;
|
|
505
|
+
}
|
|
500
506
|
function openExecStream(baseURL, patToken, sandboxID, options) {
|
|
501
507
|
const wsURL = baseURL.replace(/^http/, "ws") + `/v1/sandboxes/${encodeURIComponent(sandboxID)}/toolbox/process/exec/stream`;
|
|
502
508
|
const WS = globalThis.WebSocket;
|
|
@@ -587,8 +593,7 @@ function openExecStream(baseURL, patToken, sandboxID, options) {
|
|
|
587
593
|
failWith(detail !== "" ? `websocket error: ${detail}` : "websocket error");
|
|
588
594
|
});
|
|
589
595
|
const sendBinary = (data) => {
|
|
590
|
-
|
|
591
|
-
ws.send(bytes);
|
|
596
|
+
ws.send(toWebSocketBinaryFrame(data));
|
|
592
597
|
};
|
|
593
598
|
return {
|
|
594
599
|
write: sendBinary,
|
|
@@ -687,8 +692,7 @@ function openSessionAttach(baseURL, patToken, sandboxID, sessionID, options) {
|
|
|
687
692
|
failWith(detail !== "" ? `websocket error: ${detail}` : "websocket error");
|
|
688
693
|
});
|
|
689
694
|
const sendBinary = (data) => {
|
|
690
|
-
|
|
691
|
-
ws.send(bytes);
|
|
695
|
+
ws.send(toWebSocketBinaryFrame(data));
|
|
692
696
|
};
|
|
693
697
|
return {
|
|
694
698
|
write: sendBinary,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aerol-ai/aerolvm-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"test": "tsc -p tsconfig.test.json --outDir dist-test && node --test dist-test/*.test.js"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@types/node": "^
|
|
24
|
-
"typescript": "^
|
|
23
|
+
"@types/node": "^25.6.2",
|
|
24
|
+
"typescript": "^6.0.3",
|
|
25
25
|
"tsx": "^4.21.0"
|
|
26
26
|
}
|
|
27
27
|
}
|