@adhdev/mesh-shared 1.0.82-rc.25 → 1.0.82-rc.27

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.
@@ -278,7 +278,7 @@ export declare function normalizeMeshNodeFacts(raw: unknown): MeshNodeFacts | un
278
278
  * the host `agy` itself uses; the unprefixed `cloudcode-pa` host 429s Google
279
279
  * AI Pro Antigravity accounts), and its credential lives in the OS keyring,
280
280
  * not the stale on-disk token file — see the provenance note in daemon-core
281
- * `quota/fetchers/antigravity.ts`. Supported on macOS and Windows; other
281
+ * `quota/fetchers/antigravity.ts`. Supported on macOS, Windows, and Linux; other
282
282
  * platforms report `unsupported` rather than guess at a keyring backend
283
283
  * nobody has verified.
284
284
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/mesh-shared",
3
- "version": "1.0.82-rc.25",
3
+ "version": "1.0.82-rc.27",
4
4
  "description": "ADHDev mesh-shared — pure mesh/git status normalizers shared by daemon-core and web-core",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -237,6 +237,7 @@ export interface FollowedRemoteProjectEntry {
237
237
  updatedAt: number | string
238
238
  unfollowedAt?: number | string
239
239
  revokedAt?: number | string
240
+ revokedReason?: string
240
241
  lastCursor?: string | null
241
242
  coordinatorSessionId?: string | null
242
243
  lastErrorCode?: string
package/src/node-facts.ts CHANGED
@@ -288,7 +288,7 @@ export function normalizeMeshNodeFacts(raw: unknown): MeshNodeFacts | undefined
288
288
  * the host `agy` itself uses; the unprefixed `cloudcode-pa` host 429s Google
289
289
  * AI Pro Antigravity accounts), and its credential lives in the OS keyring,
290
290
  * not the stale on-disk token file — see the provenance note in daemon-core
291
- * `quota/fetchers/antigravity.ts`. Supported on macOS and Windows; other
291
+ * `quota/fetchers/antigravity.ts`. Supported on macOS, Windows, and Linux; other
292
292
  * platforms report `unsupported` rather than guess at a keyring backend
293
293
  * nobody has verified.
294
294
  *
@@ -102,12 +102,15 @@ function backfillCheckAt(quota: MeshNodeFactsProviderQuota, now: number): number
102
102
  export function assessQuotaFreshness(quota: MeshNodeFactsProviderQuota, now: number = Date.now()): QuotaFreshness {
103
103
  const meta = quota.metadata
104
104
  const kind = meta?.failureKind
105
- const userMustAct = (kind === 'no-data' && quota.provider !== 'codex-cli')
106
- || (kind === 'expired-token' && ['grok-cli', 'kimi', 'antigravity-cli'].includes(quota.provider))
107
- // Order matters: the aged-out Claude shape and the retained antigravity
108
- // shape both ALSO mark lastGoodWindows (mesh routing trusts retained numbers
109
- // until their reset), so they must be classified before the generic branch.
105
+ const userMustAct = kind === 'no-data' && quota.provider !== 'codex-cli'
106
+ const awaitsCliUse = kind === 'expired-token' && ['grok-cli', 'kimi', 'antigravity-cli'].includes(quota.provider)
107
+ // Order matters: the aged-out Claude shape and the retained expired-token
108
+ // shape both ALSO mark lastGoodWindows, so they must be classified before
109
+ // the generic branch. An expired short-lived access token that the CLI
110
+ // renews itself is NOT an auth failure requiring user action (userMustAct:
111
+ // false), while any retained lastGood numbers are marked stale.
110
112
  if (userMustAct) return hasReading(quota) ? { cue: 'stale', userMustAct: true } : { userMustAct: true }
113
+ if (awaitsCliUse) return hasReading(quota) ? { cue: 'stale', userMustAct: false } : { userMustAct: false }
111
114
  if (meta?.lastGoodWindows !== true) {
112
115
  // A successful fetch is not a perpetual live reading. Use the DATA
113
116
  // clock; a recent failed attempt must never rejuvenate old numbers.