agl 42.2.0 → 42.2.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.
@@ -405,6 +405,10 @@ const native = (context: IAuthSwitchUsageContext): boolean => context.providerId
405
405
  const readable = (context: IAuthSwitchUsageContext): boolean => usable(context)
406
406
  || (native(context) && !context.removed && context.nativeSource === null);
407
407
 
408
+ /** What keeps a login of a readable kind from being read now, so its usage is missing for want of access. */
409
+ const accessStoppedStates = ['exchange_may_have_been_sent', 'needs_reauth', 'handoff_pending', 'handoff_quarantined',
410
+ 'legacy_native_pending'];
411
+
408
412
  /**
409
413
  * Whether a reading or observation made under one context still describes the login of another: the same account,
410
414
  * login, subject, workspace, owner and authorization, and the same Claude Code home where both name one. A renewed token
@@ -938,8 +942,7 @@ export class AuthSwitchAuthorityUsage {
938
942
  if (!readable(context)) {
939
943
  this.unschedule(accountId, loginId);
940
944
  return this.unavailable(accountId, loginId,
941
- context.removed || ['handoff_pending', 'handoff_quarantined', 'legacy_native_pending'].includes(context.grantState)
942
- ? 'access_unavailable' : 'unsupported');
945
+ context.removed || accessStoppedStates.includes(context.grantState) ? 'access_unavailable' : 'unsupported');
943
946
  }
944
947
  let stored: IAuthSwitchStoredUsage | null;
945
948
  try { stored = await this.options.store.read(accountId, loginId); }
@@ -165,7 +165,7 @@ export class ClaudeNativeAuthority {
165
165
  });
166
166
  this.changed();
167
167
  } catch {
168
- // The pre-send marker is durable. Startup makes an unresolved rotation needs_reauth.
168
+ // The pre-send marker is durable. The broker's next scan makes an unresolved rotation needs_reauth.
169
169
  throw new Error('Claude refresh commit is uncertain; the previous token will not be replayed.');
170
170
  }
171
171
  }
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: 'agl',
6
- version: '42.2.0',
6
+ version: '42.2.1',
7
7
  description: 'Agent Gateway Layer for OpenCode, FlexHarness, and Codex sessions'
8
8
  }