@vibe-cafe/vibe-usage 0.9.9 → 0.9.10

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/README.md CHANGED
@@ -66,7 +66,7 @@ npx @vibe-cafe/vibe-usage status # Show config & detected tools
66
66
  | Kiro | Kiro CLI native event streams `~/.kiro/sessions/cli/*.jsonl` (estimated tokens from message text: input = prompt + tool results, output = reply + tool calls, reasoning = thinking, cacheRead = re-sent context; thinking-block signatures excluded). Falls back to `~/Library/Application Support/kiro-cli/data.sqlite3` / `~/.local/share/kiro-cli/data.sqlite3` + optional `~/.kiro_sessions/*.json` archives, then IDE `q-client.log` whole-credit deltas as `kiro-credits` (floored cumulative diff — the server stores token counts as bigint); legacy IDE `dev_data/devdata.sqlite` token telemetry is opt-in with `VIBE_USAGE_KIRO_LEGACY_TOKENS=1` |
67
67
  | Cline | `<host>/User/globalStorage/saoudrizwan.claude-dev/{state/taskHistory.json,tasks/<id>/ui_messages.json}` (walks all VSCode-fork hosts: Code, Cursor, Windsurf, VSCodium, Trae, ...) |
68
68
  | Roo Code | `<host>/User/globalStorage/rooveterinaryinc.roo-cline/{tasks/_index.json,tasks/<id>/{history_item,ui_messages}.json}` (walks all VSCode-fork hosts) |
69
- | Antigravity | `~/.gemini/antigravity/conversations/*.pb` to discover cascades, then reads token usage + sessions from the running language server via Connect RPC (process discovered with `ps`/`lsof` on macOS/Linux, PowerShell CIM with a `wmic` fallback on Windows) |
69
+ | Antigravity | `~/.gemini/antigravity/conversations/*.pb` / `*.db` to discover cascades, then reads token usage + sessions from the running language server via Connect RPC (process discovered with `ps`/`lsof` on macOS/Linux, PowerShell CIM with a `wmic` fallback on Windows) |
70
70
  | ZCode | `~/.zcode/cli/db/db.sqlite` (SQLite; reads the `message` table for per-message tokens, model, and project `cwd`/`root`, joined to `session.directory`) |
71
71
 
72
72
  ## How It Works
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-cafe/vibe-usage",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "description": "Track your AI coding tool token usage and sync to vibecafe.ai",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -8,7 +8,7 @@ import { aggregateToBuckets, extractSessions } from './index.js';
8
8
 
9
9
  /**
10
10
  * Antigravity parser (file-based).
11
- * Scans .pb files in ~/.gemini/antigravity/conversations/ to discover cascade IDs.
11
+ * Scans .pb/.db files in ~/.gemini/antigravity/conversations/ to discover cascade IDs.
12
12
  * Calls GetCascadeTrajectory via a running language server to extract token usage
13
13
  * (from generatorMetadata) and session events (from trajectory steps).
14
14
  */
@@ -42,7 +42,7 @@ function findLanguageServer() {
42
42
  }
43
43
 
44
44
  function findLanguageServerUnix() {
45
- const out = execSync("ps aux | grep 'antigravity/bin/language_server_'", { encoding: 'utf-8', timeout: 5000 });
45
+ const out = execSync("ps aux | grep -i 'antigravity.*language_server'", { encoding: 'utf-8', timeout: 5000 });
46
46
  for (const line of out.split('\n')) {
47
47
  if (!line.trim()) continue;
48
48
  if (line.includes('grep')) continue;
@@ -224,6 +224,8 @@ async function probeHttpPort(ports, csrfToken) {
224
224
  const MODEL_NORMALIZE_MAP = {
225
225
  'claude-opus-4-6-thinking': 'claude-opus-4-6',
226
226
  'claude-sonnet-4-6-thinking': 'claude-sonnet-4-6',
227
+ 'gemini-3-flash-a': 'gemini-3-flash',
228
+ 'gemini-3-flash-b': 'gemini-3-flash',
227
229
  'gemini-3-flash-c': 'gemini-3-flash',
228
230
  "gemini-3.1-pro-high": "gemini-3.1-pro",
229
231
  "gemini-3.1-pro-low": "gemini-3.1-pro",
@@ -242,6 +244,10 @@ const PLACEHOLDER_MODEL_MAP = {
242
244
  'MODEL_PLACEHOLDER_M35': 'claude-sonnet-4-6',
243
245
  'MODEL_PLACEHOLDER_M26': 'claude-opus-4-6',
244
246
  'MODEL_OPENAI_GPT_OSS_120B_MEDIUM': 'gpt-oss-120b',
247
+ // Antigravity 2.0+ standalone app placeholders (verified via responseModel)
248
+ 'MODEL_PLACEHOLDER_M132': 'gemini-3-flash',
249
+ 'MODEL_PLACEHOLDER_M133': 'gemini-3-flash',
250
+ 'MODEL_PLACEHOLDER_M20': 'gemini-3-flash',
245
251
  };
246
252
 
247
253
  function normalizeModel(raw) {
@@ -274,17 +280,21 @@ function projectFromUri(uri) {
274
280
  }
275
281
 
276
282
  /**
277
- * List cascade IDs from .pb files in the conversations directory.
283
+ * List cascade IDs from .pb and .db files in the conversations directory.
284
+ * Antigravity 2.0+ stores new conversations as SQLite .db files instead of .pb.
278
285
  */
279
286
  function listCascades() {
280
287
  try {
281
288
  const files = readdirSync(CONVERSATIONS_DIR);
282
- const results = [];
289
+ const seen = new Set();
283
290
  for (const f of files) {
284
- if (!f.endsWith('.pb')) continue;
285
- results.push(f.slice(0, -3)); // strip .pb → cascadeId
291
+ // SQLite auxiliaries (foo.db-wal / foo.db-shm) don't end with .db, so no
292
+ // extra filtering is needed here.
293
+ if (f.endsWith('.pb') || f.endsWith('.db')) {
294
+ seen.add(f.slice(0, -3));
295
+ }
286
296
  }
287
- return results;
297
+ return [...seen];
288
298
  } catch {
289
299
  return [];
290
300
  }
@@ -293,7 +303,7 @@ function listCascades() {
293
303
  // ── Main parse ───────────────────────────────────────────────────────
294
304
 
295
305
  export async function parse() {
296
- // Step 1: List cascade .pb files
306
+ // Step 1: List cascade conversation files (.pb / .db)
297
307
  const cascadeIds = listCascades();
298
308
  if (cascadeIds.length === 0) return { buckets: [], sessions: [] };
299
309