@livx.cc/agentx 0.96.4 → 0.96.6

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.d.ts CHANGED
@@ -143,6 +143,7 @@ interface Args {
143
143
  hardenNet?: boolean;
144
144
  worktree?: string;
145
145
  updateCheck?: boolean;
146
+ update?: boolean;
146
147
  }
147
148
  declare function parseArgs(argv: string[]): Args;
148
149
  /** Hooks that render tool activity to stderr: a preToolUse header, and for edits a colorized diff.
package/dist/cli.js CHANGED
@@ -3545,7 +3545,8 @@ var Agent = class _Agent {
3545
3545
  bodyStr = void 0;
3546
3546
  }
3547
3547
  if (bodyStr && err2 instanceof Error && !err2.message.includes(bodyStr)) err2.detail = bodyStr;
3548
- log4.error(`chat() failed: ${err2?.message ?? err2}${bodyStr ? ` \u2014 ${bodyStr}` : ""}`, err2);
3548
+ const errLog = err2 instanceof Error ? { message: err2.message, ...err2.detail ? { detail: err2.detail } : {}, stack: err2.stack } : err2;
3549
+ log4.error(`chat() failed: ${err2?.message ?? err2}${bodyStr ? ` \u2014 ${bodyStr}` : ""}`, errLog);
3549
3550
  return { text: "", steps, finishReason: "error", messages: this.transcript, usage, usageEstimated, error: err2 };
3550
3551
  }
3551
3552
  if (o.signal?.aborted) return kill("aborted");
@@ -7088,7 +7089,7 @@ var Player = class {
7088
7089
  var nativeDir = () => join6(dirname3(fileURLToPath(import.meta.url)), "native");
7089
7090
  function detectFfmpegMic() {
7090
7091
  if (process.env.MIC_DEVICE) return process.env.MIC_DEVICE;
7091
- const out = spawnSync2("ffmpeg", ["-f", "avfoundation", "-list_devices", "true", "-i", ""], { encoding: "utf8" }).stderr;
7092
+ const out = spawnSync2("ffmpeg", ["-f", "avfoundation", "-list_devices", "true", "-i", ""], { encoding: "utf8" }).stderr ?? "";
7092
7093
  const audio = out.slice(out.indexOf("audio devices"));
7093
7094
  const devices = [...audio.matchAll(/\[(\d+)\] (.+)/g)].map(([, idx, name]) => ({ idx, name: name.trim() }));
7094
7095
  const mic = devices.find((d) => /microphone|built-in/i.test(d.name) && !/teams|blackhole|loopback/i.test(d.name)) ?? devices[0];
@@ -10167,6 +10168,7 @@ function parseArgs(argv) {
10167
10168
  else if (x === "--vfs" || x === "--sandbox") a.vfs = true;
10168
10169
  else if (x === "--scratch") a.scratch = true;
10169
10170
  else if (x === "--no-scratch") a.scratch = false;
10171
+ else if (x === "--update") a.update = true;
10170
10172
  else if (x === "--no-update-check") a.updateCheck = false;
10171
10173
  else if (x === "--boddb") a.boddb = val(++i, x);
10172
10174
  else if (x === "--seed") a.seed = true;
@@ -10238,6 +10240,7 @@ Flags:
10238
10240
  --plan plan mode: edits blocked until you approve a plan
10239
10241
  --ask confirm each mutating tool (bash/Shell/Write/Edit/\u2026)
10240
10242
  --yes, -y auto-approve mutating tools (no prompts) \u2014 for trusted/unattended runs
10243
+ --update check for updates and exit (no keys needed)
10241
10244
  --no-update-check skip the automatic update check on startup
10242
10245
  --verbose, --debug verbose logs (sets DEBUG=* \u2014 tool args, hook decisions, retries)
10243
10246
  --allowedTools <l> comma-list of tools to allow w/o asking, e.g. "Edit,Shell(git *)"
@@ -13285,6 +13288,12 @@ async function main() {
13285
13288
  console.log(HELP);
13286
13289
  return;
13287
13290
  }
13291
+ if (args.update) {
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;
13296
+ }
13288
13297
  if (args.debug) process.env.DEBUG ||= "*";
13289
13298
  if (args.print && !args.task && !process.stdin.isTTY) args.task = (await readAllStdin()).trim();
13290
13299
  let worktreeCleanup;
@@ -13330,7 +13339,7 @@ async function main() {
13330
13339
  await loadBodifySecrets();
13331
13340
  const apiKeys = { ...cfg.apiKeys, ...apiKeysFromEnv() };
13332
13341
  if (!Object.keys(apiKeys).length) {
13333
- console.error(red("No provider key found. Set ANTHROPIC_API_KEY (or OPENAI_API_KEY / GOOGLE_API_KEY / GROQ_API_KEY), e.g. in .env."));
13342
+ console.error(red("No provider key found. Set ANTHROPIC_API_KEY (or OPENAI_API_KEY / GOOGLE_API_KEY / GROQ_API_KEY) in ~/.agent/.env, or set BODIFY_API_KEY + BODIFY_APP_ID to pull from Bodify."));
13334
13343
  process.exit(1);
13335
13344
  }
13336
13345
  const ai = new AIClient({