ai-spend-agent 0.3.0 → 0.4.1

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/index.d.ts CHANGED
@@ -5,4 +5,10 @@ export type CliResult = {
5
5
  stderr: string;
6
6
  };
7
7
  export declare function runCli(argv?: string[]): Promise<CliResult>;
8
+ /**
9
+ * Full bin entrypoint (node guard, spinner, error voice, exit code).
10
+ * Exported so the thin alias packages (`aispend`, `aireceipt`) run the EXACT
11
+ * same path without duplicating it — one CLI, several names.
12
+ */
13
+ export declare function runMain(): Promise<void>;
8
14
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ export async function runCli(argv = process.argv.slice(2)) {
41
41
  if (args.command === "report-card") {
42
42
  return reportCardCommand(args);
43
43
  }
44
- if (args.command === "apply-artifact") {
44
+ if (args.command === "apply-artifact" || args.command === "apply") {
45
45
  return applyArtifactCommand(args);
46
46
  }
47
47
  if (args.command === "add-source") {
@@ -1329,7 +1329,8 @@ function helpText() {
1329
1329
  " [--group-by source|model|client|project|agent|user|workspace|apiKey] Default: model",
1330
1330
  " report [--out <name>] Generate local Markdown and HTML reports",
1331
1331
  " report-card [--out f.svg] Write your AI Receipt — a redacted, shareable SVG + caption",
1332
- " apply-artifact Generate coding prompt, action plan, policy/config, verification, demo package",
1332
+ " apply Print the paste-ready coding-agent prompt + write action/policy/verification plans",
1333
+ " apply-artifact Same as `apply` (long form)",
1333
1334
  "",
1334
1335
  "Cron (production watch): add a crontab entry such as:",
1335
1336
  " 0 * * * * cd /path/to/workspace && ai-spend-agent watch --interval 3600 --cycles 1 >> ai-spend-watch.log 2>&1",
@@ -1352,7 +1353,12 @@ const invokedAsMain = (() => {
1352
1353
  return false;
1353
1354
  }
1354
1355
  })();
1355
- if (invokedAsMain) {
1356
+ /**
1357
+ * Full bin entrypoint (node guard, spinner, error voice, exit code).
1358
+ * Exported so the thin alias packages (`aispend`, `aireceipt`) run the EXACT
1359
+ * same path without duplicating it — one CLI, several names.
1360
+ */
1361
+ export async function runMain() {
1356
1362
  // Fail with a clear message on old Node instead of a cryptic module/syntax
1357
1363
  // error deep in a dependency. npm warns on engines but never blocks install.
1358
1364
  const major = Number(process.versions.node.split(".")[0]);
@@ -1405,4 +1411,7 @@ if (invokedAsMain) {
1405
1411
  }
1406
1412
  process.exitCode = result.exitCode;
1407
1413
  }
1414
+ if (invokedAsMain) {
1415
+ await runMain();
1416
+ }
1408
1417
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-spend-agent",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Your AI spend in one view, in 90 seconds — local-first CLI for OpenAI, Anthropic, Cursor, Copilot + Claude Code/Codex session logs, with a ranked savings cut list, and flags the tools your agent loads but never uses (dead context).",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,8 +49,8 @@
49
49
  "prepack": "npm run build"
50
50
  },
51
51
  "dependencies": {
52
- "@agent-finops/core": "0.3.0",
53
- "@agent-finops/report": "0.3.0",
52
+ "@agent-finops/core": "0.4.1",
53
+ "@agent-finops/report": "0.4.1",
54
54
  "yocto-spinner": "^1.2.0"
55
55
  }
56
56
  }