@instaclaw/dispatch 0.6.1 → 0.6.2
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/executor.js +2 -3
- package/package.json +1 -1
package/dist/executor.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Executor — receives dispatch commands and executes them via usecomputer.
|
|
3
3
|
* Returns results (action confirmations or screenshot data).
|
|
4
4
|
*/
|
|
5
|
-
import { execSync } from "child_process";
|
|
5
|
+
import { execSync, exec as execCb } from "child_process";
|
|
6
6
|
import { captureScreenshot } from "./screenshot.js";
|
|
7
7
|
// Dynamic import for usecomputer (ESM)
|
|
8
8
|
let uc = null;
|
|
@@ -225,8 +225,7 @@ async function doExec(params) {
|
|
|
225
225
|
// Timeout: default 30s, max 120s
|
|
226
226
|
const timeoutMs = Math.min(Number(params.timeout) || 30000, 120000);
|
|
227
227
|
return new Promise((resolve) => {
|
|
228
|
-
|
|
229
|
-
exec(command, { timeout: timeoutMs, maxBuffer: 1024 * 1024, shell: "/bin/bash" }, (err, stdout, stderr) => {
|
|
228
|
+
execCb(command, { timeout: timeoutMs, maxBuffer: 1024 * 1024, shell: "/bin/bash" }, (err, stdout, stderr) => {
|
|
230
229
|
const exitCode = err ? err.code ?? 1 : 0;
|
|
231
230
|
// Cap output to prevent context flooding (max 4KB each)
|
|
232
231
|
const cappedStdout = stdout.length > 4096 ? stdout.substring(0, 4096) + "\n[...truncated]" : stdout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instaclaw/dispatch",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Let your InstaClaw AI agent control your computer — screenshots, clicks, typing, and more via a secure WebSocket relay",
|
|
5
5
|
"bin": {
|
|
6
6
|
"instaclaw-dispatch": "./dist/index.js"
|