niahere 0.5.10 → 0.5.11

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": "niahere",
3
- "version": "0.5.10",
3
+ "version": "0.5.11",
4
4
  "description": "A personal AI assistant daemon — chat, scheduled jobs, persona system, extensible via skills.",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/agent/auth.ts CHANGED
@@ -144,7 +144,10 @@ export function codexAuthStatus(now: number = Date.now(), reader: AuthReader = d
144
144
  }
145
145
 
146
146
  const tokens = (auth.tokens ?? {}) as Record<string, unknown>;
147
- const exp = jwtExpiry(typeof tokens.id_token === "string" ? tokens.id_token : undefined);
147
+ // access_token is what authenticates. id_token is a short-lived OIDC identity
148
+ // token that lapses about an hour after every refresh, so reading it reports
149
+ // "lapsed" for any healthy install — a permanent false alarm.
150
+ const exp = jwtExpiry(typeof tokens.access_token === "string" ? tokens.access_token : undefined);
148
151
  const mode = typeof auth.auth_mode === "string" ? auth.auth_mode : "oauth";
149
152
  if (exp === undefined) return { ...base, state: "unknown", detail: `${mode} sign-in, no readable expiry` };
150
153
  if (exp <= now) return { ...base, state: "stale", detail: `${mode} token lapsed ${ago(now - exp)} ago, renewable` };