@vibe-cafe/vibe-usage 0.1.11 → 0.1.12

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/package.json +1 -1
  2. package/src/sync.js +7 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibe-cafe/vibe-usage",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Track your AI coding tool token usage and sync to vibecafe.ai",
5
5
  "type": "module",
6
6
  "bin": {
package/src/sync.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { hostname as osHostname } from 'node:os';
1
2
  import { loadConfig, saveConfig } from './config.js';
2
3
  import { ingest } from './api.js';
3
4
  import { parsers } from './parsers/index.js';
@@ -34,6 +35,12 @@ export async function runSync() {
34
35
  return 0;
35
36
  }
36
37
 
38
+ // Tag every bucket with this machine's hostname
39
+ const host = osHostname().replace(/\.local$/, '');
40
+ for (const b of allBuckets) {
41
+ b.hostname = host;
42
+ }
43
+
37
44
  const apiUrl = config.apiUrl || 'https://vibecafe.ai';
38
45
  let totalIngested = 0;
39
46
  const totalBatches = Math.ceil(allBuckets.length / BATCH_SIZE);