@kervnet/opencode-kiro-auth 1.7.24 → 1.7.25

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.
@@ -34,6 +34,21 @@ export class AccountSelector {
34
34
  await this.sleep(wait);
35
35
  return null;
36
36
  }
37
+ // Last resort: re-sync from kiro-cli and reset all accounts
38
+ if (this.config.auto_sync_kiro_cli) {
39
+ await this.syncFromKiroCli();
40
+ this.repository.invalidateCache();
41
+ const fresh = await this.repository.findAll();
42
+ this.accountManager.replaceAccounts(fresh);
43
+ for (const a of this.accountManager.getAccounts()) {
44
+ a.isHealthy = true;
45
+ a.failCount = 0;
46
+ a.unhealthyReason = undefined;
47
+ a.recoveryTime = undefined;
48
+ }
49
+ await this.repository.batchSave(this.accountManager.getAccounts());
50
+ return null; // retry on next loop iteration
51
+ }
37
52
  throw new Error('All accounts are unhealthy or rate-limited');
38
53
  }
39
54
  this.resetCircuitBreaker();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kervnet/opencode-kiro-auth",
3
- "version": "1.7.24",
3
+ "version": "1.7.25",
4
4
  "description": "OpenCode plugin for AWS Kiro (CodeWhisperer) with IAM Identity Center profile support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",