ai-spend-agent 0.4.1 → 0.4.3
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.js +14 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -950,8 +950,22 @@ async function buildReportInput(stateDir, rootPath) {
|
|
|
950
950
|
readConfirmedMappings(stateDir),
|
|
951
951
|
readOptionalJson(join(stateDir, "provider-records.json"), { records: [] })
|
|
952
952
|
]);
|
|
953
|
+
// Named dead-context items feed the apply artifact for local-log users —
|
|
954
|
+
// the concrete "remove these" list, from the same engine as the readout.
|
|
955
|
+
const deadContext = spendState.mode === "local_logs"
|
|
956
|
+
? await loadDeadContext({
|
|
957
|
+
claudeProjectsDir: process.env.AI_SPEND_CLAUDE_LOGS_DIR,
|
|
958
|
+
claudeHomeDir: process.env.AI_SPEND_CLAUDE_HOME_DIR,
|
|
959
|
+
claudeConfigPath: process.env.AI_SPEND_CLAUDE_CONFIG,
|
|
960
|
+
projectDir: rootPath,
|
|
961
|
+
includeAllProjectMcp: true,
|
|
962
|
+
sinceIso: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
963
|
+
windowDays: 30
|
|
964
|
+
}).catch(() => undefined)
|
|
965
|
+
: undefined;
|
|
953
966
|
return {
|
|
954
967
|
summary: spendState.summary,
|
|
968
|
+
deadContext,
|
|
955
969
|
// Evidence ledger is built from the SAME records as the confidence
|
|
956
970
|
// breakdown so the two sections can never contradict each other.
|
|
957
971
|
allRecords: spendState.records ?? [],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-spend-agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
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.4.
|
|
53
|
-
"@agent-finops/report": "0.4.
|
|
52
|
+
"@agent-finops/core": "0.4.3",
|
|
53
|
+
"@agent-finops/report": "0.4.3",
|
|
54
54
|
"yocto-spinner": "^1.2.0"
|
|
55
55
|
}
|
|
56
56
|
}
|