@blockrun/franklin 3.15.102 → 3.16.0

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.
@@ -188,7 +188,7 @@ Franklin stores wallet keys in ~/.blockrun/. When the user asks about wallet loc
188
188
  - Spending data:
189
189
  - ~/.blockrun/franklin-stats.json — rolling totals + per-model breakdown (what \`franklin stats\` reads).
190
190
  - ~/.blockrun/franklin-audit.jsonl — append-only forensic ledger of every LLM call.
191
- - ~/.blockrun/cost_log.jsonl — append-only ledger of every settled x402 payment (written by @blockrun/llm SDK).
191
+ - ~/.blockrun/cost_log.jsonl — append-only ledger of every settled x402 payment. Both Franklin (via AgentClient in src/agent/llm.ts) and the @blockrun/llm SDK (>= 2.0.0, via its chatCompletion / raw payment paths) append to the same file with the canonical schema.
192
192
  - Use \`franklin stats\` / \`franklin content list\` instead of parsing files when the user asks "how much did I spend".
193
193
  - Programmatic access: import { getWalletAddress, getOrCreateWallet, getOrCreateSolanaWallet } from '@blockrun/llm'
194
194
 
@@ -131,7 +131,7 @@ export function loadSdkSettlements(opts) {
131
131
  function dedupeRows(rows) {
132
132
  const seen = new Map();
133
133
  for (const r of rows) {
134
- const bucket = Math.round(r.ts / 1000);
134
+ const bucket = Math.floor(r.ts / 1000);
135
135
  const microUsd = Math.round(r.costUsd * 1e6);
136
136
  const key = `${bucket}|${r.endpoint}|${r.model ?? ''}|${microUsd}`;
137
137
  // Keep the FIRST row in each bucket (chronologically earliest by ts).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockrun/franklin",
3
- "version": "3.15.102",
3
+ "version": "3.16.0",
4
4
  "description": "Franklin Agent — The AI agent with a wallet. Spends USDC autonomously to get real work done. Pay per action, no subscriptions.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -66,7 +66,7 @@
66
66
  "node": ">=20"
67
67
  },
68
68
  "dependencies": {
69
- "@blockrun/llm": "^1.13.0",
69
+ "@blockrun/llm": "^2.0.0",
70
70
  "@modelcontextprotocol/sdk": "^1.29.0",
71
71
  "@solana/spl-token": "^0.4.14",
72
72
  "@solana/web3.js": "^1.98.4",