ragent-cli 1.6.0 → 1.6.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/index.js +15 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -31,7 +31,7 @@ var require_package = __commonJS({
|
|
|
31
31
|
"package.json"(exports2, module2) {
|
|
32
32
|
module2.exports = {
|
|
33
33
|
name: "ragent-cli",
|
|
34
|
-
version: "1.6.
|
|
34
|
+
version: "1.6.1",
|
|
35
35
|
description: "CLI agent for rAgent Live \u2014 browser-first terminal control plane for AI coding agents",
|
|
36
36
|
main: "dist/index.js",
|
|
37
37
|
bin: {
|
|
@@ -3907,7 +3907,7 @@ function registerDoctorCommand(program2) {
|
|
|
3907
3907
|
|
|
3908
3908
|
// src/commands/update.ts
|
|
3909
3909
|
function registerUpdateCommand(program2) {
|
|
3910
|
-
program2.command("update").description("Update ragent CLI from npm").option("--check", "Check for updates only; do not install").action(async (opts) => {
|
|
3910
|
+
program2.command("update").description("Update ragent CLI from npm").option("--check", "Check for updates only; do not install").option("--no-restart", "Do not restart the service after updating").action(async (opts) => {
|
|
3911
3911
|
printCommandArt("Update", "checking npm registry for newer ragent-cli versions");
|
|
3912
3912
|
const latestVersion = await checkForUpdate({ force: true });
|
|
3913
3913
|
if (!latestVersion) {
|
|
@@ -3920,9 +3920,19 @@ function registerUpdateCommand(program2) {
|
|
|
3920
3920
|
timeout: 5 * 60 * 1e3,
|
|
3921
3921
|
maxBuffer: 10 * 1024 * 1024
|
|
3922
3922
|
});
|
|
3923
|
-
console.log(
|
|
3924
|
-
|
|
3925
|
-
)
|
|
3923
|
+
console.log(`[rAgent] Updated to ${latestVersion}.`);
|
|
3924
|
+
const backend = getConfiguredServiceBackend();
|
|
3925
|
+
if (backend && opts.restart) {
|
|
3926
|
+
console.log(`[rAgent] Restarting ${backend} service...`);
|
|
3927
|
+
try {
|
|
3928
|
+
await restartService();
|
|
3929
|
+
} catch (err) {
|
|
3930
|
+
console.error(`[rAgent] Failed to restart service: ${err instanceof Error ? err.message : err}`);
|
|
3931
|
+
console.log("[rAgent] Please restart manually: ragent service restart");
|
|
3932
|
+
}
|
|
3933
|
+
} else if (!backend) {
|
|
3934
|
+
console.log("[rAgent] No service backend detected. If ragent is running manually, restart it to use the new version.");
|
|
3935
|
+
}
|
|
3926
3936
|
});
|
|
3927
3937
|
}
|
|
3928
3938
|
|