@audienti/cli 0.1.115 → 0.1.116

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/CHANGELOG.md CHANGED
@@ -4,6 +4,12 @@ All notable changes to the Audienti CLI are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.1.116] - 2026-10-12
8
+
9
+ ### Changed
10
+
11
+ - Show linked receipt expenses from the current run, and distinguish current unknown amounts from costs that were unverified at completion (#2618).
12
+
7
13
  ## [0.1.115] - 2026-10-10
8
14
 
9
15
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@audienti/cli",
3
- "version": "0.1.115",
3
+ "version": "0.1.116",
4
4
  "description": "Agent-first command-line client for Audienti.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -16474,6 +16474,13 @@ async function writeExportPayload(payload, format, outputPath, context) {
16474
16474
  function renderToolRun(run, context) {
16475
16475
  writeLine(context.stdout, `Run ${display(run?.id)} (${display(run?.tool)}): ${display(run?.status)}`);
16476
16476
  writeLine(context.stdout, `Items: ${display(run?.item_count, 0)} total, ${display(run?.completed_item_count, 0)} completed, ${display(run?.failed_item_count, 0)} failed`);
16477
+ if (run?.summary && Object.keys(run.summary).length > 0) {
16478
+ const usage = [`${display(run.summary.attempt_count, 0)} provider call(s)`];
16479
+ if (Number(run.summary.cache_hit_count) > 0) usage.push(`${run.summary.cache_hit_count} cached`);
16480
+ writeLine(context.stdout, `Usage: ${usage.join("; ")}`);
16481
+ }
16482
+ const stillRunningWithoutExpenses = ["queued", "running"].includes(run?.status) && run?.current_expenses?.state === "none";
16483
+ if (run?.current_expenses && !stillRunningWithoutExpenses) writeLine(context.stdout, `Recorded expenses: ${toolRunExpenseSummary(run.current_expenses)}`);
16477
16484
  const outcomes = run?.summary?.outcomes || {};
16478
16485
  if (Object.keys(outcomes).length > 0) {
16479
16486
  writeLine(context.stdout, `Outcomes: ${Object.entries(outcomes).map(([outcome, count]) => `${outcome} ${count}`).join(", ")}`);
@@ -16482,6 +16489,31 @@ function renderToolRun(run, context) {
16482
16489
  if (run?.details_expired) writeLine(context.stdout, "Details expired after 90 days; only this summary remains.");
16483
16490
  }
16484
16491
 
16492
+ function toolRunExpenseSummary(expenses) {
16493
+ if (expenses.state === "unavailable") return "data unavailable";
16494
+ if (expenses.state === "none") return "no recorded expenses";
16495
+ if (expenses.state === "expired") {
16496
+ const known = expenses.completion_snapshot?.known_billed_expense_cents;
16497
+ return `current receipt detail expired; completion-time snapshot ${expenseAmountLabel(known)}; ${display(expenses.uncertain_attempt_count, 0)} call(s) with unknown or uncertain expense at completion`;
16498
+ }
16499
+
16500
+ const known = expenses.known_expense_cents;
16501
+ const parts = [known === null || known === undefined ? "no priced receipts" : `${expenseAmountLabel(known)} recorded`];
16502
+ if (expenses.unknown_expense_receipt_count > 0) parts.push(`${expenses.unknown_expense_receipt_count} linked receipt(s) with unknown amount`);
16503
+ if (expenses.uncertain_attempt_count > 0) parts.push(`${expenses.uncertain_attempt_count} call(s) with unknown or uncertain expense`);
16504
+ if (expenses.completion_unverified_attempt_count > 0) parts.push(`${expenses.completion_unverified_attempt_count} call(s) with cost unverified at completion`);
16505
+ if (expenses.in_progress_attempt_count > 0) parts.push(`${expenses.in_progress_attempt_count} call(s) in progress`);
16506
+ if (expenses.state === "partial") parts.push("known sum may be partial");
16507
+ return parts.join("; ");
16508
+ }
16509
+
16510
+ function expenseAmountLabel(cents) {
16511
+ if (cents === null || cents === undefined) return "no known amount";
16512
+ const amount = Number(cents);
16513
+ if (amount > 0 && amount < 0.01) return "less than 0.01¢";
16514
+ return `${amount.toFixed(2)}¢`;
16515
+ }
16516
+
16485
16517
  function renderToolRunItems(tool, items, context) {
16486
16518
  if (items.length === 0) return writeLine(context.stdout, "No results yet.");
16487
16519