agy-family 0.4.0 → 0.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agy-family",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Zero-privacy-leak transparent usage dashboard, /family slash command, and fair-use budget guardrail for Google One / Antigravity family groups.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -59,7 +59,7 @@ import {
59
59
  writeHostConfig,
60
60
  } from '../src/host.mjs';
61
61
 
62
- const CLI_VERSION = '0.4.0';
62
+ const CLI_VERSION = '0.4.1';
63
63
  const THIS_CLI_PATH = fileURLToPath(import.meta.url);
64
64
  const PACKAGE_ROOT = resolve(dirname(THIS_CLI_PATH), '..', '..', '..');
65
65
 
@@ -736,7 +736,7 @@ export async function runHeadlessSync({ cfg, fullSync = false, home = homedir(),
736
736
  const { payload, scan, nextSyncedHashes, nextAccountLedger } = await buildSyncPayload({
737
737
  deviceId,
738
738
  clientKind: 'cli',
739
- clientVersion: '0.4.0',
739
+ clientVersion: '0.4.1',
740
740
  home,
741
741
  fileCache: cache,
742
742
  syncedHashes: prevHashes,
@@ -83,7 +83,7 @@ export function diffSyncBuckets(buckets, syncedHashes = null, { fullSync = false
83
83
  export async function buildSyncPayload({
84
84
  deviceId,
85
85
  clientKind = 'cli',
86
- clientVersion = '0.4.0',
86
+ clientVersion = '0.4.1',
87
87
  home,
88
88
  roots = null,
89
89
  sourceFilter = 'all',
@@ -164,7 +164,7 @@ export async function buildSyncPayload({
164
164
  deviceId: String(deviceId || deriveAnonymousDeviceId()).slice(0, 32),
165
165
  client: {
166
166
  kind: clientKind === 'extension' ? 'extension' : 'cli',
167
- version: String(clientVersion || '0.4.0').slice(0, 24),
167
+ version: String(clientVersion || '0.4.1').slice(0, 24),
168
168
  ...(platformLabel ? { platform: platformLabel } : {}),
169
169
  },
170
170
  account: {
@@ -26,7 +26,7 @@ import {
26
26
  import { FAVICON_SVG, renderDashboardHtml } from './ui.mjs';
27
27
  import { dispatchWebhook, sendDedupedAlert, validateWebhookUrl } from './webhooks.mjs';
28
28
 
29
- export const SERVER_VERSION = '0.4.0';
29
+ export const SERVER_VERSION = '0.4.1';
30
30
  const MAX_BUCKETS_PER_SYNC = 1000;
31
31
  const MAX_DEVICES_PER_MEMBER = 8;
32
32
  const MAX_TOKENS_PER_BUCKET = 500_000_000;
@@ -993,7 +993,7 @@ export async function buildBoardPayload(
993
993
  }
994
994
 
995
995
  const membersRaw = await db.all(
996
- 'SELECT id, name, role, color, quota_pct, expected_email_hash, last_account_status, daily_cap_usd, weekly_cap_usd, cycle_cap_usd, active, created_at, last_seen_at, last_client_kind, last_client_version FROM members WHERE active = 1 ORDER BY created_at ASC',
996
+ 'SELECT id, name, role, color, quota_pct, expected_email_hash, email_hint, last_account_status, daily_cap_usd, weekly_cap_usd, cycle_cap_usd, active, created_at, last_seen_at, last_client_kind, last_client_version FROM members WHERE active = 1 ORDER BY created_at ASC',
997
997
  );
998
998
  const quotasMap = resolveFamilyQuotas(membersRaw);
999
999
 
@@ -1338,6 +1338,7 @@ export async function buildBoardPayload(
1338
1338
  lastClientVersion: agg.lastClientVersion,
1339
1339
  online: !isOffline,
1340
1340
  accountBound: Boolean(raw.expected_email_hash),
1341
+ emailHint: raw.email_hint || '',
1341
1342
  accountStatus: raw.expected_email_hash ? raw.last_account_status || 'unknown' : 'unbound',
1342
1343
  integrityFlags7d: integrityByMember.get(raw.id) || 0,
1343
1344
  };
@@ -1571,7 +1572,7 @@ export async function buildMemberDetailPayload(
1571
1572
  { period = 'today', from = '', to = '', envDefaults = {}, now = Date.now() } = {},
1572
1573
  ) {
1573
1574
  const member = await db.get(
1574
- 'SELECT id, name, role, color, quota_pct, expected_email_hash, last_account_status, daily_cap_usd, weekly_cap_usd, cycle_cap_usd, active, created_at, last_seen_at, last_client_kind, last_client_version FROM members WHERE id = ? AND active = 1',
1575
+ 'SELECT id, name, role, color, quota_pct, expected_email_hash, email_hint, last_account_status, daily_cap_usd, weekly_cap_usd, cycle_cap_usd, active, created_at, last_seen_at, last_client_kind, last_client_version FROM members WHERE id = ? AND active = 1',
1575
1576
  [memberId],
1576
1577
  );
1577
1578
  if (!member) return null;
@@ -1865,6 +1866,7 @@ export async function buildMemberDetailPayload(
1865
1866
  period: win.period,
1866
1867
  online,
1867
1868
  accountBound: Boolean(member.expected_email_hash),
1869
+ emailHint: member.email_hint || '',
1868
1870
  accountStatus: member.expected_email_hash ? member.last_account_status || 'unknown' : 'unbound',
1869
1871
  lastSeenAt: member.last_seen_at || null,
1870
1872
  lastClientKind: member.last_client_kind || null,
@@ -1924,7 +1924,7 @@ export function renderDashboardHtml({ boardTitle = 'Antigravity 家庭组' } = {
1924
1924
 
1925
1925
  <footer class="foot">
1926
1926
  <span data-i18n="privacyNote">隐私承诺:客户端仅只读扫描本地 SQLite 数值元数据,绝不上传 Prompt、代码、文件路径或 Google 凭据。</span>
1927
- <span class="mono">agy-family v0.4.0 · MIT</span>
1927
+ <span class="mono">agy-family v0.4.1 · MIT</span>
1928
1928
  </footer>
1929
1929
  </main>
1930
1930
 
@@ -3082,6 +3082,9 @@ function renderMemberRows(d) {
3082
3082
  if (hasPlanSplit && m.usedUsd > 0) subParts.push((lang === 'zh' ? '分摊 ' : 'split ') + fmtMoney(m.estPlanSplit, planCur));
3083
3083
  subParts.push((lang === 'zh' ? '参考 ' : 'ref ') + fmtUsd(m.usedUsd));
3084
3084
 
3085
+ const emailHintHtml = m.emailHint
3086
+ ? '<span class="mono" style="color:var(--body)">· ' + esc(m.emailHint) + '</span>'
3087
+ : '';
3085
3088
  const devMetaBits = [];
3086
3089
  if (m.lastPlatform) devMetaBits.push(m.lastPlatform);
3087
3090
  if (m.lastMaskedIp && m.lastMaskedIp !== 'local') {
@@ -3102,7 +3105,7 @@ function renderMemberRows(d) {
3102
3105
  '<span class="dot" style="background:' + esc(m.color) + '"></span>' +
3103
3106
  '<div>' +
3104
3107
  '<div class="member-name-row"><span class="member-name">' + esc(m.name) + '</span>' + roleTag + meTag + acctTag + statusTag + integrityTag + '</div>' +
3105
- '<div class="member-sub"><span class="live-dot ' + (m.online ? 'on' : 'off') + '"></span><span>' + esc(m.online ? t('online') : t('offline')) + '</span><span>' + esc(fmtAgo(m.lastSeenAt)) + '</span>' + devMetaHtml + '</div>' +
3108
+ '<div class="member-sub"><span class="live-dot ' + (m.online ? 'on' : 'off') + '"></span><span>' + esc(m.online ? t('online') : t('offline')) + '</span><span>' + esc(fmtAgo(m.lastSeenAt)) + '</span>' + emailHintHtml + devMetaHtml + '</div>' +
3106
3109
  '</div>' +
3107
3110
  '</div></td>' +
3108
3111
  '<td><div class="meter-box"' + (meterTip ? ' title="' + esc(meterTip) + '"' : '') + '>' +