@zhafron/opencode-kiro-auth 1.4.7 → 1.4.8

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.
Files changed (2) hide show
  1. package/dist/plugin.js +4 -3
  2. package/package.json +1 -1
package/dist/plugin.js CHANGED
@@ -269,15 +269,16 @@ export const createKiroPlugin = (id) => async ({ client, directory }) => {
269
269
  catch (e) {
270
270
  // If we can't parse the error, use default message
271
271
  }
272
- if (acc.failCount < 3) {
272
+ if (acc.failCount < 5) {
273
273
  const delay = 1000 * Math.pow(2, acc.failCount - 1);
274
274
  showToast(`Server Error (500): ${errorMessage}. Retrying in ${Math.ceil(delay / 1000)}s...`, 'warning');
275
275
  await sleep(delay);
276
276
  continue;
277
277
  }
278
278
  else {
279
- acc.failCount = 0;
280
- showToast(`Server Error (500): ${errorMessage}. Switching account...`, 'warning');
279
+ am.markUnhealthy(acc, `Server Error (500) after 5 attempts: ${errorMessage}`);
280
+ await am.saveToDisk();
281
+ showToast(`Server Error (500): ${errorMessage}. Marking account as unhealthy and switching...`, 'warning');
281
282
  continue;
282
283
  }
283
284
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhafron/opencode-kiro-auth",
3
- "version": "1.4.7",
3
+ "version": "1.4.8",
4
4
  "description": "OpenCode plugin for AWS Kiro (CodeWhisperer) providing access to Claude models",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",