visionclaw 0.1.192-beta.0 → 0.1.192-beta.1
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/utils/restart.d.ts.map +1 -1
- package/dist/utils/restart.js +17 -3
- package/dist/utils/restart.js.map +1 -1
- package/dist-agent/bundle.cjs +23 -17
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restart.d.ts","sourceRoot":"","sources":["../../src/utils/restart.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"restart.d.ts","sourceRoot":"","sources":["../../src/utils/restart.ts"],"names":[],"mappings":"AAUA,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,wBAAgB,oBAAoB,IAAI,KAAK,GAAG,SAAS,GAAG,UAAU,GAAG,IAAI,CAgB5E;AAoBD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,OAAO,SAAQ,EACf,eAAe,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GACpC,IAAI,CA8EN"}
|
package/dist/utils/restart.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { exec, execFileSync } from "node:child_process";
|
|
1
|
+
import { exec, execFile, execFileSync } from "node:child_process";
|
|
2
2
|
import { promisify } from "node:util";
|
|
3
3
|
import { logger } from "../logger.js";
|
|
4
4
|
const execAsync = promisify(exec);
|
|
5
|
+
const execFileAsync = promisify(execFile);
|
|
5
6
|
const PACKAGE_NAME = "visionclaw";
|
|
6
7
|
const RESTART_EXIT_CODE = 42;
|
|
7
8
|
export function isElectronChild() {
|
|
@@ -29,7 +30,7 @@ async function restartViaProcessManager(pm) {
|
|
|
29
30
|
}
|
|
30
31
|
if (pm === "pm2") {
|
|
31
32
|
const pmId = process.env.pm_id ?? process.env.name ?? PACKAGE_NAME;
|
|
32
|
-
const { stdout, stderr } = await
|
|
33
|
+
const { stdout, stderr } = await execFileAsync("pm2", ["restart", pmId]);
|
|
33
34
|
return (stdout + stderr).trim();
|
|
34
35
|
}
|
|
35
36
|
const { stdout, stderr } = await execAsync(`systemctl restart ${PACKAGE_NAME}`);
|
|
@@ -58,7 +59,20 @@ export function scheduleRestart(delayMs = 5_000, onBeforeRestart) {
|
|
|
58
59
|
const doRestart = async () => {
|
|
59
60
|
if (onBeforeRestart)
|
|
60
61
|
await onBeforeRestart();
|
|
61
|
-
|
|
62
|
+
try {
|
|
63
|
+
await restartViaProcessManager(pm);
|
|
64
|
+
}
|
|
65
|
+
catch (err) {
|
|
66
|
+
// If the process manager restart fails (e.g. PM2 daemon refuses,
|
|
67
|
+
// restart procedure is interrupted, app id drifted), we are now
|
|
68
|
+
// in a half-shutdown state: channels stopped, pollers stopped,
|
|
69
|
+
// but the process is still alive. Leaving it that way leads to
|
|
70
|
+
// confusing "statement has been finalized" / dead-channel errors
|
|
71
|
+
// hours later. Force-exit instead so the process manager can
|
|
72
|
+
// respawn us cleanly via its normal autorestart path.
|
|
73
|
+
logger.err(`Restart via ${pm} failed, force-exiting so ${pm} can respawn: ${err instanceof Error ? err.message : String(err)}`);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
}
|
|
62
76
|
};
|
|
63
77
|
doRestart().catch((err) => {
|
|
64
78
|
logger.err(`Restart via ${pm} failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restart.js","sourceRoot":"","sources":["../../src/utils/restart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"restart.js","sourceRoot":"","sources":["../../src/utils/restart.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAA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AC,GAAG,EAAE,IAAI,EAAE;oBACtB,KAAK,EAAE,SAAS;oBAChB,GAAG,EAAE,OAAO,CAAC,GAAG;iBACjB,CAAC,CAAC;YACL,CAAC;YAAC,MAAM,CAAC;gBACP,+DAA+D;gBAC/D,uEAAuE;YACzE,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC;QACF,SAAS,EAAE,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;YACjC,MAAM,CAAC,GAAG,CAAC,mBAAmB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAClF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,OAAO,CAAC,CAAC;AACd,CAAC"}
|
package/dist-agent/bundle.cjs
CHANGED
|
@@ -20450,7 +20450,7 @@ var require_prompts3 = __commonJS({
|
|
|
20450
20450
|
|
|
20451
20451
|
// dist/utils/version-check.js
|
|
20452
20452
|
function isBundled() {
|
|
20453
|
-
const v15 = "0.1.192-beta.
|
|
20453
|
+
const v15 = "0.1.192-beta.1";
|
|
20454
20454
|
return typeof v15 === "string" && v15 !== "undefined";
|
|
20455
20455
|
}
|
|
20456
20456
|
function getPackageRoot() {
|
|
@@ -20467,7 +20467,7 @@ function getInstallationInfo() {
|
|
|
20467
20467
|
};
|
|
20468
20468
|
}
|
|
20469
20469
|
function getCurrentVersion() {
|
|
20470
|
-
const bundledVersion = "0.1.192-beta.
|
|
20470
|
+
const bundledVersion = "0.1.192-beta.1";
|
|
20471
20471
|
if (bundledVersion && bundledVersion !== "undefined") {
|
|
20472
20472
|
return bundledVersion;
|
|
20473
20473
|
}
|
|
@@ -804736,7 +804736,7 @@ async function restartViaProcessManager(pm) {
|
|
|
804736
804736
|
}
|
|
804737
804737
|
if (pm === "pm2") {
|
|
804738
804738
|
const pmId = process.env.pm_id ?? process.env.name ?? PACKAGE_NAME2;
|
|
804739
|
-
const { stdout: stdout2, stderr: stderr2 } = await
|
|
804739
|
+
const { stdout: stdout2, stderr: stderr2 } = await execFileAsync6("pm2", ["restart", pmId]);
|
|
804740
804740
|
return (stdout2 + stderr2).trim();
|
|
804741
804741
|
}
|
|
804742
804742
|
const { stdout, stderr } = await execAsync4(`systemctl restart ${PACKAGE_NAME2}`);
|
|
@@ -804750,7 +804750,12 @@ function scheduleRestart(delayMs = 5e3, onBeforeRestart) {
|
|
|
804750
804750
|
const doRestart = async () => {
|
|
804751
804751
|
if (onBeforeRestart)
|
|
804752
804752
|
await onBeforeRestart();
|
|
804753
|
-
|
|
804753
|
+
try {
|
|
804754
|
+
await restartViaProcessManager(pm);
|
|
804755
|
+
} catch (err7) {
|
|
804756
|
+
logger.err(`Restart via ${pm} failed, force-exiting so ${pm} can respawn: ${err7 instanceof Error ? err7.message : String(err7)}`);
|
|
804757
|
+
process.exit(1);
|
|
804758
|
+
}
|
|
804754
804759
|
};
|
|
804755
804760
|
doRestart().catch((err7) => {
|
|
804756
804761
|
logger.err(`Restart via ${pm} failed: ${err7 instanceof Error ? err7.message : String(err7)}`);
|
|
@@ -804790,7 +804795,7 @@ function scheduleRestart(delayMs = 5e3, onBeforeRestart) {
|
|
|
804790
804795
|
});
|
|
804791
804796
|
}, delayMs);
|
|
804792
804797
|
}
|
|
804793
|
-
var import_node_child_process14, import_node_util9, execAsync4, PACKAGE_NAME2, RESTART_EXIT_CODE;
|
|
804798
|
+
var import_node_child_process14, import_node_util9, execAsync4, execFileAsync6, PACKAGE_NAME2, RESTART_EXIT_CODE;
|
|
804794
804799
|
var init_restart = __esm({
|
|
804795
804800
|
"dist/utils/restart.js"() {
|
|
804796
804801
|
"use strict";
|
|
@@ -804798,6 +804803,7 @@ var init_restart = __esm({
|
|
|
804798
804803
|
import_node_util9 = require("node:util");
|
|
804799
804804
|
init_logger();
|
|
804800
804805
|
execAsync4 = (0, import_node_util9.promisify)(import_node_child_process14.exec);
|
|
804806
|
+
execFileAsync6 = (0, import_node_util9.promisify)(import_node_child_process14.execFile);
|
|
804801
804807
|
PACKAGE_NAME2 = "visionclaw";
|
|
804802
804808
|
RESTART_EXIT_CODE = 42;
|
|
804803
804809
|
}
|
|
@@ -984227,7 +984233,7 @@ async function snapshotGhCli(stagingDir) {
|
|
|
984227
984233
|
}
|
|
984228
984234
|
let hasToken = false;
|
|
984229
984235
|
try {
|
|
984230
|
-
const { stdout } = await
|
|
984236
|
+
const { stdout } = await execFileAsync8("gh", ["auth", "token"], {
|
|
984231
984237
|
timeout: 1e4
|
|
984232
984238
|
});
|
|
984233
984239
|
const token = stdout.trim();
|
|
@@ -984292,7 +984298,7 @@ async function runBackup(config2, ownerEmail) {
|
|
|
984292
984298
|
if (import_node_fs49.default.existsSync(import_node_path51.default.join(stagingRoot, ".config"))) {
|
|
984293
984299
|
zipInputs.push(".config");
|
|
984294
984300
|
}
|
|
984295
|
-
await
|
|
984301
|
+
await execFileAsync8("zip", ["-rq", zipPath, ...zipInputs], {
|
|
984296
984302
|
cwd: stagingRoot,
|
|
984297
984303
|
timeout: 10 * 60 * 1e3,
|
|
984298
984304
|
maxBuffer: 10 * 1024 * 1024
|
|
@@ -984317,7 +984323,7 @@ async function runBackup(config2, ownerEmail) {
|
|
|
984317
984323
|
import_node_fs49.default.rmSync(tmpDir, { recursive: true, force: true });
|
|
984318
984324
|
}
|
|
984319
984325
|
}
|
|
984320
|
-
var import_node_fs49, import_node_os24, import_node_path51, import_node_child_process22, import_node_util17,
|
|
984326
|
+
var import_node_fs49, import_node_os24, import_node_path51, import_node_child_process22, import_node_util17, execFileAsync8, CLOUDFLARED_DIR, CLOUDFLARED_BACKUP_FILES, GH_CLI_DIR, GH_CLI_TOKEN_FILE;
|
|
984321
984327
|
var init_backup = __esm({
|
|
984322
984328
|
"dist/agent/backup.js"() {
|
|
984323
984329
|
"use strict";
|
|
@@ -984330,7 +984336,7 @@ var init_backup = __esm({
|
|
|
984330
984336
|
init_google_drive();
|
|
984331
984337
|
init_logger();
|
|
984332
984338
|
init_claude_transcripts();
|
|
984333
|
-
|
|
984339
|
+
execFileAsync8 = (0, import_node_util17.promisify)(import_node_child_process22.execFile);
|
|
984334
984340
|
CLOUDFLARED_DIR = import_node_path51.default.join(import_node_os24.default.homedir(), ".cloudflared");
|
|
984335
984341
|
CLOUDFLARED_BACKUP_FILES = ["cert.pem", "config.yml"];
|
|
984336
984342
|
GH_CLI_DIR = import_node_path51.default.join(import_node_os24.default.homedir(), ".config", "gh");
|
|
@@ -995722,14 +995728,14 @@ function escapePowerShellLiteral(value) {
|
|
|
995722
995728
|
}
|
|
995723
995729
|
async function extractZipArchive(zipPath, destDir) {
|
|
995724
995730
|
if (process.platform === "win32") {
|
|
995725
|
-
await
|
|
995731
|
+
await execFileAsync9("powershell", [
|
|
995726
995732
|
"-NoProfile",
|
|
995727
995733
|
"-Command",
|
|
995728
995734
|
`Expand-Archive -LiteralPath '${escapePowerShellLiteral(zipPath)}' -DestinationPath '${escapePowerShellLiteral(destDir)}' -Force`
|
|
995729
995735
|
], { timeout: 10 * 60 * 1e3 });
|
|
995730
995736
|
return;
|
|
995731
995737
|
}
|
|
995732
|
-
await
|
|
995738
|
+
await execFileAsync9("unzip", ["-oq", zipPath, "-d", destDir], {
|
|
995733
995739
|
timeout: 10 * 60 * 1e3
|
|
995734
995740
|
});
|
|
995735
995741
|
}
|
|
@@ -995995,7 +996001,7 @@ async function runRestoreCli(args = process.argv.slice(2)) {
|
|
|
995995
996001
|
import_node_fs76.default.rmSync(tmpDir, { recursive: true, force: true });
|
|
995996
996002
|
}
|
|
995997
996003
|
}
|
|
995998
|
-
var import_node_fs76, import_node_path76, import_node_os31, import_node_child_process36, import_node_util19, CLOUDFLARED_DIR2, GH_CLI_DIR2, GH_CLI_TOKEN_FILE2,
|
|
996004
|
+
var import_node_fs76, import_node_path76, import_node_os31, import_node_child_process36, import_node_util19, CLOUDFLARED_DIR2, GH_CLI_DIR2, GH_CLI_TOKEN_FILE2, execFileAsync9;
|
|
995999
996005
|
var init_restore = __esm({
|
|
996000
996006
|
"dist/restore.js"() {
|
|
996001
996007
|
"use strict";
|
|
@@ -996010,7 +996016,7 @@ var init_restore = __esm({
|
|
|
996010
996016
|
CLOUDFLARED_DIR2 = import_node_path76.default.join(import_node_os31.default.homedir(), ".cloudflared");
|
|
996011
996017
|
GH_CLI_DIR2 = import_node_path76.default.join(import_node_os31.default.homedir(), ".config", "gh");
|
|
996012
996018
|
GH_CLI_TOKEN_FILE2 = "oauth-token.txt";
|
|
996013
|
-
|
|
996019
|
+
execFileAsync9 = (0, import_node_util19.promisify)(import_node_child_process36.execFile);
|
|
996014
996020
|
}
|
|
996015
996021
|
});
|
|
996016
996022
|
|
|
@@ -1041158,7 +1041164,7 @@ var import_node_crypto14 = require("node:crypto");
|
|
|
1041158
1041164
|
var import_node_os23 = require("node:os");
|
|
1041159
1041165
|
var import_node_path50 = require("node:path");
|
|
1041160
1041166
|
init_logger();
|
|
1041161
|
-
var
|
|
1041167
|
+
var execFileAsync7 = (0, import_node_util16.promisify)(import_node_child_process21.execFile);
|
|
1041162
1041168
|
var WHISPER_MODEL_PATH2 = process.platform === "win32" ? (0, import_node_path50.join)(process.env.LOCALAPPDATA ?? (0, import_node_path50.join)((0, import_node_os23.homedir)(), "AppData", "Local"), "whisper-cpp", "ggml-large-v3-turbo.bin") : (0, import_node_path50.join)((0, import_node_os23.homedir)(), ".local/share/whisper-cpp/ggml-large-v3-turbo.bin");
|
|
1041163
1041169
|
var TRANSCRIBE_TIMEOUT_MS = 3e4;
|
|
1041164
1041170
|
async function fileExists(path86) {
|
|
@@ -1041172,7 +1041178,7 @@ async function fileExists(path86) {
|
|
|
1041172
1041178
|
async function which(bin) {
|
|
1041173
1041179
|
const cmd = process.platform === "win32" ? "where" : "which";
|
|
1041174
1041180
|
try {
|
|
1041175
|
-
await
|
|
1041181
|
+
await execFileAsync7(cmd, [bin]);
|
|
1041176
1041182
|
return true;
|
|
1041177
1041183
|
} catch {
|
|
1041178
1041184
|
return false;
|
|
@@ -1041216,8 +1041222,8 @@ async function transcribeAudioAttachment(att) {
|
|
|
1041216
1041222
|
}
|
|
1041217
1041223
|
const wavPath = (0, import_node_path50.join)((0, import_node_os23.tmpdir)(), `vc-audio-${(0, import_node_crypto14.randomUUID)()}.wav`);
|
|
1041218
1041224
|
tempFiles.push(wavPath);
|
|
1041219
|
-
await
|
|
1041220
|
-
const { stdout } = await
|
|
1041225
|
+
await execFileAsync7("ffmpeg", ["-y", "-i", inputPath, "-ar", "16000", "-ac", "1", wavPath], { timeout: TRANSCRIBE_TIMEOUT_MS });
|
|
1041226
|
+
const { stdout } = await execFileAsync7("whisper-cli", ["-m", WHISPER_MODEL_PATH2, "-f", wavPath, "--no-timestamps", "-l", "auto"], { timeout: TRANSCRIBE_TIMEOUT_MS });
|
|
1041221
1041227
|
const text = stdout.trim();
|
|
1041222
1041228
|
return text || null;
|
|
1041223
1041229
|
} catch (err7) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "visionclaw",
|
|
3
|
-
"version": "0.1.192-beta.
|
|
3
|
+
"version": "0.1.192-beta.1",
|
|
4
4
|
"description": "A personal assistant agent that runs on your desktop, receives commands from messaging channels, and executes tasks autonomously.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|