@agentvault/agentvault 0.19.64 → 0.19.66

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"() {
@@ -88275,7 +88250,7 @@ var init_index = __esm({
88275
88250
  init_skill_invoker();
88276
88251
  await init_skill_telemetry();
88277
88252
  await init_policy_enforcer();
88278
- VERSION = "0.14.1";
88253
+ VERSION = true ? "0.19.66" : "0.0.0-dev";
88279
88254
  }
88280
88255
  });
88281
88256
 
@@ -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,12 +88749,10 @@ 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
- } catch (err) {
88779
- console.error(` Error: 'openclaw' not found in PATH. Is OpenClaw installed?`);
88780
- console.error(` Debug \u2014 PATH includes: ${env.PATH?.split(":").filter((p2) => p2.includes("local")).join(", ")}`);
88781
- console.error(` Debug \u2014 error: ${err?.message?.slice(0, 200)}`);
88754
+ } catch {
88755
+ console.error(" Error: 'openclaw' not found in PATH. Is OpenClaw installed?");
88782
88756
  process.exit(1);
88783
88757
  }
88784
88758
  if (!existsSync2(configPath)) {
@@ -88804,7 +88778,7 @@ async function runCreateCommand(options) {
88804
88778
  }
88805
88779
  console.log(" Step 3/7 \u2014 Creating agent with OpenClaw...");
88806
88780
  try {
88807
- execSync(`openclaw agents add -- ${name2}`, { stdio: "pipe", env });
88781
+ execSync2(`openclaw agents add -- ${name2}`, { stdio: "pipe", env });
88808
88782
  console.log(` Agent '${name2}' created.
88809
88783
  `);
88810
88784
  } catch {
@@ -88958,7 +88932,6 @@ async function runCreateCommand(options) {
88958
88932
  var init_create_agent = __esm({
88959
88933
  async "src/create-agent.ts"() {
88960
88934
  "use strict";
88961
- init_cp();
88962
88935
  await init_setup();
88963
88936
  }
88964
88937
  });
@@ -88970,6 +88943,7 @@ __export(setup_exports, {
88970
88943
  installPlugin: () => installPlugin,
88971
88944
  runSetupCommand: () => runSetupCommand
88972
88945
  });
88946
+ import { execSync as execSync3, spawnSync } from "node:child_process";
88973
88947
  import * as readline from "node:readline";
88974
88948
  import { resolve } from "node:path";
88975
88949
  async function runSetupCommand(options) {
@@ -89133,7 +89107,7 @@ async function runSetupCommand(options) {
89133
89107
  let configPatched = false;
89134
89108
  for (const cmd of patchCommands) {
89135
89109
  try {
89136
- execSync(cmd, { stdio: "pipe", env });
89110
+ execSync3(cmd, { stdio: "pipe", env });
89137
89111
  configPatched = true;
89138
89112
  } catch {
89139
89113
  configPatched = false;
@@ -89239,7 +89213,7 @@ async function runSetupCommand(options) {
89239
89213
  }
89240
89214
  function installPlugin(env) {
89241
89215
  try {
89242
- const info = execSync("openclaw plugins info agentvault", {
89216
+ const info = execSync3("openclaw plugins info agentvault", {
89243
89217
  stdio: "pipe",
89244
89218
  env
89245
89219
  });
@@ -89249,7 +89223,7 @@ function installPlugin(env) {
89249
89223
  if (installedVersion && installedVersion !== VERSION) {
89250
89224
  console.log(` Updating plugin ${installedVersion} \u2192 ${VERSION}...`);
89251
89225
  try {
89252
- execSync("openclaw plugins update agentvault", { stdio: "pipe", env });
89226
+ execSync3("openclaw plugins update agentvault", { stdio: "pipe", env });
89253
89227
  console.log(" Plugin updated.");
89254
89228
  } catch {
89255
89229
  console.log(` \u26A0\uFE0F Update failed \u2014 v${installedVersion} will be used.`);
@@ -89261,7 +89235,7 @@ function installPlugin(env) {
89261
89235
  } catch {
89262
89236
  }
89263
89237
  try {
89264
- execSync("openclaw plugins install @agentvault/agentvault", {
89238
+ execSync3("openclaw plugins install @agentvault/agentvault", {
89265
89239
  stdio: "pipe",
89266
89240
  env
89267
89241
  });
@@ -89274,7 +89248,7 @@ function installPlugin(env) {
89274
89248
  }
89275
89249
  function configurePm2(env) {
89276
89250
  try {
89277
- execSync("pm2 --version", { stdio: "pipe", env });
89251
+ execSync3("pm2 --version", { stdio: "pipe", env });
89278
89252
  } catch {
89279
89253
  console.log(`
89280
89254
  \u2139\uFE0F pm2 not found. For best reliability, install pm2:
@@ -89288,7 +89262,7 @@ function configurePm2(env) {
89288
89262
  return false;
89289
89263
  }
89290
89264
  try {
89291
- const info = execSync("pm2 describe openclaw-gateway", { stdio: "pipe", env });
89265
+ const info = execSync3("pm2 describe openclaw-gateway", { stdio: "pipe", env });
89292
89266
  const infoStr = info.toString();
89293
89267
  if (infoStr.includes("online") || infoStr.includes("stopped")) {
89294
89268
  console.log(" pm2 process 'openclaw-gateway' already exists.");
@@ -89299,20 +89273,20 @@ function configurePm2(env) {
89299
89273
  const isMac = process.platform === "darwin";
89300
89274
  const startCmd = isMac ? "caffeinate -i openclaw gateway start" : "openclaw gateway start";
89301
89275
  try {
89302
- execSync(`pm2 start "${startCmd}" --name openclaw-gateway`, { stdio: "pipe", env });
89276
+ execSync3(`pm2 start "${startCmd}" --name openclaw-gateway`, { stdio: "pipe", env });
89303
89277
  console.log(" \u2705 Gateway registered with pm2.");
89304
89278
  } catch (err) {
89305
89279
  console.log(` \u26A0\uFE0F Failed to register with pm2: ${err}`);
89306
89280
  return false;
89307
89281
  }
89308
89282
  try {
89309
- execSync("pm2 startup", { stdio: "pipe", env });
89283
+ execSync3("pm2 startup", { stdio: "pipe", env });
89310
89284
  console.log(" \u2705 pm2 startup configured (auto-start on boot).");
89311
89285
  } catch {
89312
89286
  console.log(" \u26A0\uFE0F pm2 startup failed \u2014 you may need to run 'pm2 startup' manually with sudo.");
89313
89287
  }
89314
89288
  try {
89315
- execSync("pm2 save", { stdio: "pipe", env });
89289
+ execSync3("pm2 save", { stdio: "pipe", env });
89316
89290
  console.log(" \u2705 pm2 process list saved.");
89317
89291
  } catch {
89318
89292
  console.log(" \u26A0\uFE0F pm2 save failed.");
@@ -89372,7 +89346,6 @@ function ask2(question) {
89372
89346
  var init_setup = __esm({
89373
89347
  async "src/setup.ts"() {
89374
89348
  "use strict";
89375
- init_cp();
89376
89349
  await init_channel();
89377
89350
  await init_index();
89378
89351
  await init_state();