@agentvault/agentvault 0.19.64 → 0.19.65

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/cli.js CHANGED
@@ -5,16 +5,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __require = /* @__PURE__ */ ((x2) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x2, {
9
- get: (a2, b2) => (typeof require !== "undefined" ? require : a2)[b2]
10
- }) : x2)(function(x2) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x2 + '" is not supported');
13
- });
14
8
  var __esm = (fn, res) => function __init() {
15
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
10
  };
17
- var __commonJS = (cb, mod4) => function __require2() {
11
+ var __commonJS = (cb, mod4) => function __require() {
18
12
  return mod4 || (0, cb[__getOwnPropNames(cb)[0]])((mod4 = { exports: {} }).exports, mod4), mod4.exports;
19
13
  };
20
14
  var __export = (target, all) => {
@@ -67515,25 +67509,6 @@ ${messageText}`;
67515
67509
  }
67516
67510
  });
67517
67511
 
67518
- // src/_cp.ts
67519
- function load() {
67520
- if (!_cp) _cp = __require(`node:${_mod}`);
67521
- return _cp;
67522
- }
67523
- function execSync(command, options) {
67524
- return load().execSync(command, options);
67525
- }
67526
- function spawnSync(command, args2, options) {
67527
- return load().spawnSync(command, args2, options);
67528
- }
67529
- var _mod, _cp;
67530
- var init_cp = __esm({
67531
- "src/_cp.ts"() {
67532
- "use strict";
67533
- _mod = ["child", "process"].join("_");
67534
- }
67535
- });
67536
-
67537
67512
  // src/types.ts
67538
67513
  var init_types = __esm({
67539
67514
  "src/types.ts"() {
@@ -88296,6 +88271,7 @@ __export(doctor_exports, {
88296
88271
  runDoctorCommand: () => runDoctorCommand,
88297
88272
  validatePlist: () => validatePlist
88298
88273
  });
88274
+ import { execSync } from "node:child_process";
88299
88275
  import { existsSync, readFileSync as readFileSync2, writeFileSync, chmodSync } from "node:fs";
88300
88276
  import { join as join5 } from "node:path";
88301
88277
  import { createInterface } from "node:readline";
@@ -88651,7 +88627,6 @@ var PLIST_FILENAME, WRAPPER_SCRIPT_NAME;
88651
88627
  var init_doctor = __esm({
88652
88628
  async "src/doctor.ts"() {
88653
88629
  "use strict";
88654
- init_cp();
88655
88630
  await init_create_agent();
88656
88631
  PLIST_FILENAME = "ai.openclaw.gateway.plist";
88657
88632
  WRAPPER_SCRIPT_NAME = "start-gateway.sh";
@@ -88667,6 +88642,7 @@ __export(create_agent_exports, {
88667
88642
  readOpenClawConfig: () => readOpenClawConfig,
88668
88643
  runCreateCommand: () => runCreateCommand
88669
88644
  });
88645
+ import { execSync as execSync2 } from "node:child_process";
88670
88646
  import { existsSync as existsSync2, mkdirSync, readFileSync as readFileSync3, writeFileSync as writeFileSync2, copyFileSync } from "node:fs";
88671
88647
  import { join as join6 } from "node:path";
88672
88648
  function openclawHome() {
@@ -88773,7 +88749,7 @@ async function runCreateCommand(options) {
88773
88749
  ].join(":");
88774
88750
  const env = { ...process.env, PATH: `${extraPaths}:${process.env.PATH ?? ""}` };
88775
88751
  try {
88776
- const result = execSync("openclaw --version", { stdio: "pipe", env });
88752
+ const result = execSync2("openclaw --version", { stdio: "pipe", env });
88777
88753
  console.log(` OpenClaw found: ${result?.toString().trim()}`);
88778
88754
  } catch (err) {
88779
88755
  console.error(` Error: 'openclaw' not found in PATH. Is OpenClaw installed?`);
@@ -88804,7 +88780,7 @@ async function runCreateCommand(options) {
88804
88780
  }
88805
88781
  console.log(" Step 3/7 \u2014 Creating agent with OpenClaw...");
88806
88782
  try {
88807
- execSync(`openclaw agents add -- ${name2}`, { stdio: "pipe", env });
88783
+ execSync2(`openclaw agents add -- ${name2}`, { stdio: "pipe", env });
88808
88784
  console.log(` Agent '${name2}' created.
88809
88785
  `);
88810
88786
  } catch {
@@ -88958,7 +88934,6 @@ async function runCreateCommand(options) {
88958
88934
  var init_create_agent = __esm({
88959
88935
  async "src/create-agent.ts"() {
88960
88936
  "use strict";
88961
- init_cp();
88962
88937
  await init_setup();
88963
88938
  }
88964
88939
  });
@@ -88970,6 +88945,7 @@ __export(setup_exports, {
88970
88945
  installPlugin: () => installPlugin,
88971
88946
  runSetupCommand: () => runSetupCommand
88972
88947
  });
88948
+ import { execSync as execSync3, spawnSync } from "node:child_process";
88973
88949
  import * as readline from "node:readline";
88974
88950
  import { resolve } from "node:path";
88975
88951
  async function runSetupCommand(options) {
@@ -89133,7 +89109,7 @@ async function runSetupCommand(options) {
89133
89109
  let configPatched = false;
89134
89110
  for (const cmd of patchCommands) {
89135
89111
  try {
89136
- execSync(cmd, { stdio: "pipe", env });
89112
+ execSync3(cmd, { stdio: "pipe", env });
89137
89113
  configPatched = true;
89138
89114
  } catch {
89139
89115
  configPatched = false;
@@ -89239,7 +89215,7 @@ async function runSetupCommand(options) {
89239
89215
  }
89240
89216
  function installPlugin(env) {
89241
89217
  try {
89242
- const info = execSync("openclaw plugins info agentvault", {
89218
+ const info = execSync3("openclaw plugins info agentvault", {
89243
89219
  stdio: "pipe",
89244
89220
  env
89245
89221
  });
@@ -89249,7 +89225,7 @@ function installPlugin(env) {
89249
89225
  if (installedVersion && installedVersion !== VERSION) {
89250
89226
  console.log(` Updating plugin ${installedVersion} \u2192 ${VERSION}...`);
89251
89227
  try {
89252
- execSync("openclaw plugins update agentvault", { stdio: "pipe", env });
89228
+ execSync3("openclaw plugins update agentvault", { stdio: "pipe", env });
89253
89229
  console.log(" Plugin updated.");
89254
89230
  } catch {
89255
89231
  console.log(` \u26A0\uFE0F Update failed \u2014 v${installedVersion} will be used.`);
@@ -89261,7 +89237,7 @@ function installPlugin(env) {
89261
89237
  } catch {
89262
89238
  }
89263
89239
  try {
89264
- execSync("openclaw plugins install @agentvault/agentvault", {
89240
+ execSync3("openclaw plugins install @agentvault/agentvault", {
89265
89241
  stdio: "pipe",
89266
89242
  env
89267
89243
  });
@@ -89274,7 +89250,7 @@ function installPlugin(env) {
89274
89250
  }
89275
89251
  function configurePm2(env) {
89276
89252
  try {
89277
- execSync("pm2 --version", { stdio: "pipe", env });
89253
+ execSync3("pm2 --version", { stdio: "pipe", env });
89278
89254
  } catch {
89279
89255
  console.log(`
89280
89256
  \u2139\uFE0F pm2 not found. For best reliability, install pm2:
@@ -89288,7 +89264,7 @@ function configurePm2(env) {
89288
89264
  return false;
89289
89265
  }
89290
89266
  try {
89291
- const info = execSync("pm2 describe openclaw-gateway", { stdio: "pipe", env });
89267
+ const info = execSync3("pm2 describe openclaw-gateway", { stdio: "pipe", env });
89292
89268
  const infoStr = info.toString();
89293
89269
  if (infoStr.includes("online") || infoStr.includes("stopped")) {
89294
89270
  console.log(" pm2 process 'openclaw-gateway' already exists.");
@@ -89299,20 +89275,20 @@ function configurePm2(env) {
89299
89275
  const isMac = process.platform === "darwin";
89300
89276
  const startCmd = isMac ? "caffeinate -i openclaw gateway start" : "openclaw gateway start";
89301
89277
  try {
89302
- execSync(`pm2 start "${startCmd}" --name openclaw-gateway`, { stdio: "pipe", env });
89278
+ execSync3(`pm2 start "${startCmd}" --name openclaw-gateway`, { stdio: "pipe", env });
89303
89279
  console.log(" \u2705 Gateway registered with pm2.");
89304
89280
  } catch (err) {
89305
89281
  console.log(` \u26A0\uFE0F Failed to register with pm2: ${err}`);
89306
89282
  return false;
89307
89283
  }
89308
89284
  try {
89309
- execSync("pm2 startup", { stdio: "pipe", env });
89285
+ execSync3("pm2 startup", { stdio: "pipe", env });
89310
89286
  console.log(" \u2705 pm2 startup configured (auto-start on boot).");
89311
89287
  } catch {
89312
89288
  console.log(" \u26A0\uFE0F pm2 startup failed \u2014 you may need to run 'pm2 startup' manually with sudo.");
89313
89289
  }
89314
89290
  try {
89315
- execSync("pm2 save", { stdio: "pipe", env });
89291
+ execSync3("pm2 save", { stdio: "pipe", env });
89316
89292
  console.log(" \u2705 pm2 process list saved.");
89317
89293
  } catch {
89318
89294
  console.log(" \u26A0\uFE0F pm2 save failed.");
@@ -89372,7 +89348,6 @@ function ask2(question) {
89372
89348
  var init_setup = __esm({
89373
89349
  async "src/setup.ts"() {
89374
89350
  "use strict";
89375
- init_cp();
89376
89351
  await init_channel();
89377
89352
  await init_index();
89378
89353
  await init_state();