opencode-multi-account-core 0.2.2 → 0.2.3

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/index.js +6 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1126,6 +1126,9 @@ var MAX_RESOLVE_ATTEMPTS = 10;
1126
1126
  var SERVER_RETRY_BASE_MS = 1e3;
1127
1127
  var SERVER_RETRY_MAX_MS = 4e3;
1128
1128
  var PERMANENT_AUTH_FAILURE_STATUSES = /* @__PURE__ */ new Set([400, 401, 403]);
1129
+ function isAbortError(error) {
1130
+ return error instanceof Error && error.name === "AbortError";
1131
+ }
1129
1132
  function createExecutorForProvider(providerName, dependencies) {
1130
1133
  const {
1131
1134
  handleRateLimitResponse,
@@ -1158,6 +1161,7 @@ function createExecutorForProvider(providerName, dependencies) {
1158
1161
  runtime = await runtimeFactory.getRuntime(accountUuid);
1159
1162
  response = await runtime.fetch(input, init);
1160
1163
  } catch (error) {
1164
+ if (isAbortError(error)) throw error;
1161
1165
  if (await handleRuntimeFetchFailure(manager, runtimeFactory, client, account, error)) {
1162
1166
  continue;
1163
1167
  }
@@ -1175,6 +1179,7 @@ function createExecutorForProvider(providerName, dependencies) {
1175
1179
  try {
1176
1180
  serverResponse = await runtime.fetch(input, init);
1177
1181
  } catch (error) {
1182
+ if (isAbortError(error)) throw error;
1178
1183
  if (await handleRuntimeFetchFailure(manager, runtimeFactory, client, account, error)) {
1179
1184
  authFailureDuringServerRetry = true;
1180
1185
  break;
@@ -1203,6 +1208,7 @@ function createExecutorForProvider(providerName, dependencies) {
1203
1208
  return retryResponse;
1204
1209
  }
1205
1210
  } catch (error) {
1211
+ if (isAbortError(error)) throw error;
1206
1212
  if (await handleRuntimeFetchFailure(manager, runtimeFactory, client, account, error)) {
1207
1213
  continue;
1208
1214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-multi-account-core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Shared core for multi-account OpenCode plugins",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",