@livx.cc/agentx 0.96.6 → 0.96.7

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
@@ -10240,7 +10240,7 @@ Flags:
10240
10240
  --plan plan mode: edits blocked until you approve a plan
10241
10241
  --ask confirm each mutating tool (bash/Shell/Write/Edit/\u2026)
10242
10242
  --yes, -y auto-approve mutating tools (no prompts) \u2014 for trusted/unattended runs
10243
- --update check for updates and exit (no keys needed)
10243
+ --update check for updates and install if available (no keys needed)
10244
10244
  --no-update-check skip the automatic update check on startup
10245
10245
  --verbose, --debug verbose logs (sets DEBUG=* \u2014 tool args, hook decisions, retries)
10246
10246
  --allowedTools <l> comma-list of tools to allow w/o asking, e.g. "Edit,Shell(git *)"
@@ -13290,9 +13290,14 @@ async function main() {
13290
13290
  }
13291
13291
  if (args.update) {
13292
13292
  const msg = await checkForUpdate(VERSION).catch(() => null);
13293
- if (msg) console.log(msg);
13294
- else console.log("\u2713 up to date (v" + VERSION + ")");
13295
- return;
13293
+ if (!msg) {
13294
+ console.log("\u2713 up to date (v" + VERSION + ")");
13295
+ return;
13296
+ }
13297
+ console.log(msg.replace(/Run .+$/, "Installing\u2026"));
13298
+ const { spawnSync: spawnSync6 } = await import("child_process");
13299
+ const r = spawnSync6("bun", ["add", "-g", "@livx.cc/agentx"], { stdio: "inherit" });
13300
+ process.exit(r.status ?? 1);
13296
13301
  }
13297
13302
  if (args.debug) process.env.DEBUG ||= "*";
13298
13303
  if (args.print && !args.task && !process.stdin.isTTY) args.task = (await readAllStdin()).trim();