ai-spend-agent 0.5.6 → 0.5.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -4
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -6,6 +6,9 @@ import { fileURLToPath, pathToFileURL } from "node:url";
6
6
  import { analyzeSpend, attributeUsageRecords, buildUsageGlance, loadContextHealth, detectLocalCredentials, detectLocalPlans, redactSecrets, readSafeStateText, resolveSafeScanRoot, resolveSafeStateDirectory, subscriptionPlans, unsafeScanRootReason, selectProviderFinancialHeadlineRecords, writeSafeStateText, loadDeadContext, sampleDeadContext, loadLocalAgentUsage, loadSampleUsageData, scanLocalUsageSignals, buildMissingSourcePrompts, confirmMapping, createProviderConnectorStub, createLocalFolderSourceRegistry, createScanAuditLog, fetchProviderUsageRecords, addApprovedSource, slugifySourceId } from "@agent-finops/core";
7
7
  import { generateActionPlanMarkdown, generateApplyArtifactMarkdown, generateDemoPackageMarkdown, generateHtmlReport, generateMarkdownReport, generatePlainEnglishSummary, generatePolicyConfigDraftMarkdown, generateReportCardCaption, generateReportCardSvg, generateVerificationPlanMarkdown, groupByDimensions } from "@agent-finops/report";
8
8
  export async function runCli(argv = process.argv.slice(2)) {
9
+ if (argv.includes("--version") || argv.includes("-v")) {
10
+ return ok(await cliVersion());
11
+ }
9
12
  if (argv.includes("--help") || argv.includes("-h") || argv[0] === "help") {
10
13
  return ok(helpText());
11
14
  }
@@ -1618,13 +1621,13 @@ function helpText() {
1618
1621
  "aibill — your AI cost and usage evidence in one private view",
1619
1622
  "",
1620
1623
  "Run with no command for an instant, zero-key demo:",
1621
- " ai-spend-agent Show where your AI money goes (sample/auto-detected data)",
1624
+ " ai-spend-agent Show available AI cost/value evidence (sample or local data)",
1622
1625
  " ai-spend-agent --group-by agent Drill down by source|model|client|project|agent|user|workspace|apiKey",
1623
1626
  " ai-spend-agent --plan <id> Declare your plan when auto-detection can't (claude-max-5x|claude-max-20x|claude-pro|chatgpt-plus|chatgpt-pro)",
1624
1627
  "",
1625
- "Connect your real spend (cost data is ADMIN/owner-gated):",
1626
- " ai-spend-agent connect openai Self-serve in ~2 min with an org-owner Admin key",
1627
- " ai-spend-agent connect anthropic Self-serve in ~2 min with an Admin key",
1628
+ "Add official provider-reported cost (ADMIN/owner-gated):",
1629
+ " ai-spend-agent connect openai Requires an org-owner Admin key",
1630
+ " ai-spend-agent connect anthropic Requires an Admin key",
1628
1631
  " ai-spend-agent connect cursor Upgrade: requires a Cursor team-admin key (Business plan)",
1629
1632
  " ai-spend-agent connect github-copilot Upgrade: requires a GitHub billing-admin token",
1630
1633
  " ai-spend-agent sync-provider ... Pull provider cost/usage evidence via a local env: reference (never a raw key)",
@@ -1634,6 +1637,7 @@ function helpText() {
1634
1637
  " [--cycles N] [--group-by ...] --cycles 0 runs forever; default 1 (cron-friendly)",
1635
1638
  "",
1636
1639
  "Other commands:",
1640
+ " --version, -v Print the package version without reading local data",
1637
1641
  " init [--path <dir>] Initialize local state",
1638
1642
  " doctor Launch-grade diagnostics: data mode, logs found, provider keys, warnings",
1639
1643
  " reset [--path <dir>] Clear persisted spend state (so sample state can't mask real logs)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-spend-agent",
3
- "version": "0.5.6",
3
+ "version": "0.5.7",
4
4
  "description": "Local-first financial intelligence CLI for Claude Code and Codex activity, provider-reported cost, attribution, runway, provenance, and Context Health.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -54,8 +54,8 @@
54
54
  "prepack": "npm run build"
55
55
  },
56
56
  "dependencies": {
57
- "@agent-finops/core": "0.5.6",
58
- "@agent-finops/report": "0.5.6",
57
+ "@agent-finops/core": "0.5.7",
58
+ "@agent-finops/report": "0.5.7",
59
59
  "yocto-spinner": "^1.2.0"
60
60
  }
61
61
  }