vibestreak 0.3.1 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  Any version runs with `npx vibestreak@<version>`; `npx vibestreak@latest autosync on`
4
4
  moves the background sync to the newest one.
5
5
 
6
+ ## 0.3.2 (2026-10-25)
7
+
8
+ - Linking says up front that your profile is public (and how to hide it), and
9
+ that linking means agreeing to the Terms and Privacy policy.
10
+ - If the server ever stops accepting this version, the background sync shows
11
+ a notification (once a day) with the command that updates it, instead of
12
+ failing quietly while your streak runs out.
13
+
6
14
  ## 0.3.1 (2026-10-25)
7
15
 
8
16
  - `vibestreak --version` (or `-v`), and the version in `help` and `status`.
@@ -64,7 +64,7 @@ async function api(config, path, init = {}) {
64
64
  headers: { authorization: `Bearer ${config.token}`, 'content-type': 'application/json', 'x-vibestreak-cli': VERSION, 'user-agent': `${BRAND}/${VERSION}`, ...init.headers },
65
65
  })
66
66
  const body = await response.json().catch(() => ({}))
67
- if (!response.ok) throw new Error(body.error ?? `${response.status} ${response.statusText}`)
67
+ if (!response.ok) throw Object.assign(new Error(body.error ?? `${response.status} ${response.statusText}`), { status: response.status })
68
68
  return body
69
69
  }
70
70
 
@@ -180,7 +180,7 @@ async function main() {
180
180
  if (command === 'collect' || command === 'sync') {
181
181
  const until = values.scheduled && pausedUntil(config)
182
182
  if (until) return console.log(`${new Date().toISOString()} paused until ${until.toISOString()}; skipped`)
183
- return sync(config, values, log, command === 'sync')
183
+ return sync(config, values, log, command === 'sync').catch(error => (values.scheduled ? tooOldNotice(config, error) : Promise.reject(error)))
184
184
  }
185
185
 
186
186
  if (command === 'status') return status(config)
@@ -213,7 +213,7 @@ async function main() {
213
213
  // `nudge run`, the evening job: sync, then nudge if the streak would end at midnight.
214
214
  const until = pausedUntil(config)
215
215
  if (until) return console.log(`${new Date().toISOString()} paused until ${until.toISOString()}; skipped`)
216
- const result = await sync(config, values, log, true)
216
+ const result = await sync(config, values, log, true).catch(error => tooOldNotice(config, error))
217
217
  if (shouldNudge(result.streak, config)) {
218
218
  await notify(nudgeText(result.streak))
219
219
  config.lastNudge = result.streak.today
@@ -247,6 +247,9 @@ async function main() {
247
247
  // settings page (for machines without one).
248
248
  async function login(config, values, { addresses = true } = {}) {
249
249
  config.server = values.server ?? config.server ?? DEFAULT_SERVER
250
+ const site = config.server.replace(/\/$/, '')
251
+ console.log(`Your profile (GitHub username, avatar, heatmap, streak) will be public on ${BRAND} and its leaderboard; you can hide it in Settings.`)
252
+ console.log(`Linking means you agree to the Terms (${site}/terms) and Privacy policy (${site}/privacy).\n`)
250
253
  if (values.token) config.token = values.token
251
254
  else config.token = (await deviceLogin({ server: config.server, machine: config.machineName })).token
252
255
  const me = await api(config, '/api/v1/me')
@@ -332,6 +335,18 @@ async function sync(config, values, log, isSync) {
332
335
  return result
333
336
  }
334
337
 
338
+ // A background run the server turned away as too old: nobody reads the log,
339
+ // and the streak would end unnoticed, so say so on screen, once a day.
340
+ async function tooOldNotice(config, error) {
341
+ const today = new Date().toISOString().slice(0, 10)
342
+ if (error.status === 426 && config.lastUpdateNotice !== today) {
343
+ await notify({ title: 'Update to keep your streak', message: `This version can no longer sync. Run: npx ${BRAND}@latest autosync on` })
344
+ config.lastUpdateNotice = today
345
+ await saveConfig(config)
346
+ }
347
+ throw error
348
+ }
349
+
335
350
  // Says so when a newer CLI is out (the server checks npm).
336
351
  function notice(config, cli) {
337
352
  const line = updateNotice(cli, { brand: BRAND, autosync: config.autosync })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vibestreak",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Your AI coding streak: a heatmap of the days you coded with Claude Code, Codex, Cursor, Copilot, Gemini and OpenCode, and the commits you shipped with them. Sends daily totals only.",
5
5
  "keywords": ["claude-code", "codex", "cursor", "copilot", "gemini", "opencode", "ai-coding", "heatmap", "streak", "leaderboard", "cli"],
6
6
  "homepage": "https://vibestreak.kingsbridge-consultancy.com/cli",