@livx.cc/agentx 0.96.1 → 0.96.2

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
@@ -142,6 +142,7 @@ interface Args {
142
142
  harden?: boolean;
143
143
  hardenNet?: boolean;
144
144
  worktree?: string;
145
+ updateCheck?: boolean;
145
146
  }
146
147
  declare function parseArgs(argv: string[]): Args;
147
148
  /** Hooks that render tool activity to stderr: a preToolUse header, and for edits a colorized diff.
package/dist/cli.js CHANGED
@@ -10138,7 +10138,7 @@ function parseReasoning(raw) {
10138
10138
  throw new Error(`invalid --reasoning: ${raw} (use off|low|medium|high or a token budget)`);
10139
10139
  }
10140
10140
  function parseArgs(argv) {
10141
- const a = { stream: true, plan: false, ask: false, yes: false, vfs: false, shell: void 0, seed: false, subagents: false, help: false, version: false, cont: false, outputFormat: "text", duplex: false, voice: false, scratch: true };
10141
+ const a = { stream: true, plan: false, ask: false, yes: false, vfs: false, shell: void 0, seed: false, subagents: false, help: false, version: false, cont: false, outputFormat: "text", duplex: false, voice: false, scratch: true, updateCheck: true };
10142
10142
  const rest = [];
10143
10143
  const val = (i, flag) => {
10144
10144
  const v = argv[i];
@@ -10167,6 +10167,7 @@ function parseArgs(argv) {
10167
10167
  else if (x === "--vfs" || x === "--sandbox") a.vfs = true;
10168
10168
  else if (x === "--scratch") a.scratch = true;
10169
10169
  else if (x === "--no-scratch") a.scratch = false;
10170
+ else if (x === "--no-update-check") a.updateCheck = false;
10170
10171
  else if (x === "--boddb") a.boddb = val(++i, x);
10171
10172
  else if (x === "--seed") a.seed = true;
10172
10173
  else if (x === "--shell") a.shell = true;
@@ -10237,6 +10238,7 @@ Flags:
10237
10238
  --plan plan mode: edits blocked until you approve a plan
10238
10239
  --ask confirm each mutating tool (bash/Shell/Write/Edit/\u2026)
10239
10240
  --yes, -y auto-approve mutating tools (no prompts) \u2014 for trusted/unattended runs
10241
+ --no-update-check skip the automatic update check on startup
10240
10242
  --verbose, --debug verbose logs (sets DEBUG=* \u2014 tool args, hook decisions, retries)
10241
10243
  --allowedTools <l> comma-list of tools to allow w/o asking, e.g. "Edit,Shell(git *)"
10242
10244
  --disallowedTools <l> comma-list of tools to deny outright (wins over allow), e.g. "Shell(rm *)"
@@ -10280,7 +10282,7 @@ Project instructions: ./AGENTS.md or ./CLAUDE.md are auto-loaded (scaffold with
10280
10282
  Auto-loaded from ./.agent/: commands/, skills/, memory/, agents/.
10281
10283
 
10282
10284
  REPL shortcuts: !<cmd> runs a shell command inline \xB7 #<note> saves a memory \xB7 @path inlines a file
10283
- REPL slash commands: /help /version /tools /permissions /status /cost /context /transcript /doctor /cwd /model /reasoning /config /rename /compact /memory /rewind /undo /clear /sessions /resume /commands /skills /reload /mcp /init /export /paste /goal /exit (duplex: /act /think /tasks /voice /voice-model /think-model)
10285
+ REPL slash commands: /help /version /tools /permissions /status /cost /context /transcript /doctor /cwd /model /reasoning /config /rename /compact /memory /rewind /undo /clear /sessions /resume /commands /skills /reload /mcp /init /export /paste /goal /update /exit (duplex: /act /think /tasks /voice /voice-model /think-model)
10284
10286
  REPL completion: type / (commands+skills) or @ (files) for a LIVE menu \u2014 \u2191/\u2193 select, \u23CE/Tab accept, Esc dismiss.
10285
10287
  REPL multi-line: Option/Alt+Enter inserts a newline, or end a line with \\ to continue. Esc cancels a running turn / clears the input line; double-Esc jumps back to edit a previous message.
10286
10288
  REPL shortcuts: Shift+Tab cycles permission posture (ask \u2192 accept-edits \u2192 plan) \xB7 Alt+T toggles reasoning \xB7 Alt+P switches model \xB7 Ctrl+O toggles verbose tool output \xB7 Ctrl+X Ctrl+E edits the buffer in $EDITOR \xB7 \u2192 or Tab accepts the dim history ghost-suggestion \xB7 Alt+S/Ctrl+S stash/unstash.
@@ -10317,6 +10319,28 @@ function loadInstallEnv() {
10317
10319
  }
10318
10320
  }
10319
10321
  }
10322
+ async function loadBodifySecrets() {
10323
+ const apiKey = process.env.BODIFY_API_KEY, appId = process.env.BODIFY_APP_ID;
10324
+ if (!apiKey || !appId) return;
10325
+ const base = process.env.BODIFY_URL || "https://bodify.bod.ee";
10326
+ try {
10327
+ const res = await fetch(`${base}/api/apps/${encodeURIComponent(appId)}/env`, {
10328
+ headers: { Authorization: `Bearer ${apiKey}` },
10329
+ signal: AbortSignal.timeout(5e3)
10330
+ });
10331
+ if (!res.ok) {
10332
+ console.error(` bodify secrets: ${res.status} ${res.statusText}`);
10333
+ return;
10334
+ }
10335
+ const { values } = await res.json();
10336
+ if (!values) return;
10337
+ for (const [k, v] of Object.entries(values)) {
10338
+ if (!(k in process.env)) process.env[k] = v;
10339
+ }
10340
+ } catch (e) {
10341
+ console.error(` bodify secrets: ${e.message ?? e}`);
10342
+ }
10343
+ }
10320
10344
  function apiKeysFromEnv() {
10321
10345
  const e = process.env, keys = {};
10322
10346
  for (const provider of listProviders()) {
@@ -11956,6 +11980,7 @@ ${task}`;
11956
11980
  `));
11957
11981
  const keys = ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "GOOGLE_API_KEY", "GROQ_API_KEY"].filter((k) => process.env[k]);
11958
11982
  keys.length ? ok(`provider keys: ${keys.join(", ")}`) : bad("no provider keys set (ANTHROPIC_API_KEY / OPENAI_API_KEY / GOOGLE_API_KEY / GROQ_API_KEY)");
11983
+ process.env.BODIFY_API_KEY && process.env.BODIFY_APP_ID ? ok(`bodify secrets: ${process.env.BODIFY_APP_ID}`) : warn("bodify secrets: not configured (set BODIFY_API_KEY + BODIFY_APP_ID)");
11959
11984
  const info = getModelInfo(work.model);
11960
11985
  info?.pricing ? ok(`model ${work.model} \u2014 priced (${info.pricing.inputCostPer1K}/${info.pricing.outputCostPer1K} per 1k in/out)`) : warn(`model ${work.model} \u2014 no pricing in the catalog (costs will show ~$0; verify the id)`);
11961
11986
  const cfgFiles = ["ts", "js", "json"].flatMap((e) => [`${cwd}/.agent/config.${e}`, `${homedir9()}/.agent/config.${e}`]).filter((p) => existsSync9(p));
@@ -12753,6 +12778,18 @@ ${task}`;
12753
12778
  if (exitRequested) return true;
12754
12779
  }
12755
12780
  },
12781
+ update: {
12782
+ desc: "check for updates and install if available",
12783
+ run: async () => {
12784
+ err(dim(" checking\u2026\n"));
12785
+ const msg = await checkForUpdate(VERSION).catch(() => null);
12786
+ if (msg) {
12787
+ err(yellow(` ${msg}
12788
+ `));
12789
+ err(dim(" run the command above to update, then restart.\n"));
12790
+ } else err(green(" \u2713 up to date\n"));
12791
+ }
12792
+ },
12756
12793
  exit: { desc: "quit", run: () => true },
12757
12794
  quit: { desc: "quit", run: () => true }
12758
12795
  };
@@ -12760,7 +12797,7 @@ ${task}`;
12760
12797
  banner(bold("agentx") + cyan(" v" + VERSION) + dim(` \u2014 ${work.model} \xB7 ${cwd}`));
12761
12798
  banner(dim("Type a task, or /help. Type / or @ for live suggestions (\u2191/\u2193 \u23CE). Esc cancels/clears; double-Esc jumps back; Ctrl-D exits."));
12762
12799
  if (dx) banner(dim(`\u25D1 duplex \u2014 reflex: ${dx.options.reflexModel} \xB7 act: ${work.model}${dx.options.thinkModel !== false ? ` \xB7 think: ${dx.options.thinkModel}` : ""} (real work runs in background tasks, re-voiced when done)`));
12763
- checkForUpdate(VERSION).then((msg) => {
12800
+ if (args.updateCheck !== false) checkForUpdate(VERSION).then((msg) => {
12764
12801
  if (msg) err(yellow(` ${msg}
12765
12802
  `));
12766
12803
  }).catch(() => {
@@ -13280,6 +13317,7 @@ async function main() {
13280
13317
  args.resume = id;
13281
13318
  }
13282
13319
  loadInstallEnv();
13320
+ await loadBodifySecrets();
13283
13321
  const apiKeys = { ...cfg.apiKeys, ...apiKeysFromEnv() };
13284
13322
  if (!Object.keys(apiKeys).length) {
13285
13323
  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."));