agentlife 2.6.21 → 2.6.23
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 +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7590,6 +7590,16 @@ function registerAdminGateway(api, state2) {
|
|
|
7590
7590
|
const version = await fetchNpmLatestVersion(force);
|
|
7591
7591
|
respond(true, { version });
|
|
7592
7592
|
}, { scope: "operator.read" });
|
|
7593
|
+
api.registerGatewayMethod("agentlife.update", async ({ respond }) => {
|
|
7594
|
+
try {
|
|
7595
|
+
const { spawn: spawn2 } = __require("node:child_process");
|
|
7596
|
+
const child = spawn2("openclaw", ["plugins", "install", "agentlife", "--dangerously-force-unsafe-install", "--force"], { detached: true, stdio: "ignore" });
|
|
7597
|
+
child.unref();
|
|
7598
|
+
respond(true, { started: true });
|
|
7599
|
+
} catch (err) {
|
|
7600
|
+
respond(false, undefined, { code: "UPDATE_FAILED", message: err?.message ?? "failed to spawn install" });
|
|
7601
|
+
}
|
|
7602
|
+
}, { scope: "operator.admin" });
|
|
7593
7603
|
api.registerGatewayMethod("agentlife.quality", ({ respond }) => {
|
|
7594
7604
|
try {
|
|
7595
7605
|
const db = getOrCreateHistoryDb(state2);
|