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.
- package/changelog.md +6 -0
- package/dist_serve/bundle.js +1 -1
- package/dist_serve/bundle.js.map +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts_authswitch/classes.authoritybroker.d.ts +6 -0
- package/dist_ts_authswitch/classes.authoritybroker.js +42 -19
- package/dist_ts_authswitch/classes.authorityusage.js +5 -3
- package/dist_ts_authswitch/classes.claudeauthority.js +2 -2
- package/docs/authswitch.md +3 -1
- package/package.json +1 -1
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts_authswitch/classes.authoritybroker.ts +38 -16
- package/ts_authswitch/classes.authorityusage.ts +5 -2
- package/ts_authswitch/classes.claudeauthority.ts +1 -1
- package/ts_web/00_commitinfo_data.ts +1 -1
|
@@ -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 ||
|
|
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.
|
|
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
|
}
|