@everworker/oneringai 0.4.6 → 0.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.
- package/README.md +19 -3
- package/dist/capabilities/agents/index.cjs +8 -0
- package/dist/capabilities/agents/index.cjs.map +1 -1
- package/dist/capabilities/agents/index.d.cts +1 -1
- package/dist/capabilities/agents/index.d.ts +1 -1
- package/dist/capabilities/agents/index.js +8 -0
- package/dist/capabilities/agents/index.js.map +1 -1
- package/dist/capabilities/images/index.cjs +11 -1
- package/dist/capabilities/images/index.cjs.map +1 -1
- package/dist/capabilities/images/index.js +11 -1
- package/dist/capabilities/images/index.js.map +1 -1
- package/dist/{index-oBtp-8Qn.d.ts → index-13HQuxEB.d.ts} +237 -9
- package/dist/{index-DJ-qAK15.d.cts → index-Cbd5vY_8.d.cts} +237 -9
- package/dist/index.cjs +4888 -2649
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2249 -1613
- package/dist/index.d.ts +2249 -1613
- package/dist/index.js +4842 -2613
- package/dist/index.js.map +1 -1
- package/dist/shared/index.cjs +3 -0
- package/dist/shared/index.cjs.map +1 -1
- package/dist/shared/index.js +3 -0
- package/dist/shared/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -994,6 +994,12 @@ var StorageRegistry = class _StorageRegistry {
|
|
|
994
994
|
_StorageRegistry.entries.set(key, value);
|
|
995
995
|
return value;
|
|
996
996
|
}
|
|
997
|
+
/**
|
|
998
|
+
* Remove a single storage backend.
|
|
999
|
+
*/
|
|
1000
|
+
static remove(key) {
|
|
1001
|
+
return _StorageRegistry.entries.delete(key);
|
|
1002
|
+
}
|
|
997
1003
|
/**
|
|
998
1004
|
* Check if a storage backend has been configured.
|
|
999
1005
|
*/
|
|
@@ -1156,12 +1162,16 @@ var CircuitBreaker = class extends EventEmitter {
|
|
|
1156
1162
|
}
|
|
1157
1163
|
}
|
|
1158
1164
|
/**
|
|
1159
|
-
* Remove failures outside the time window
|
|
1165
|
+
* Remove failures outside the time window and cap array size
|
|
1160
1166
|
*/
|
|
1161
1167
|
pruneOldFailures() {
|
|
1162
1168
|
const now = Date.now();
|
|
1163
1169
|
const cutoff = now - this.config.windowMs;
|
|
1164
1170
|
this.failures = this.failures.filter((f) => f.timestamp > cutoff);
|
|
1171
|
+
const maxFailures = Math.max(this.config.failureThreshold * 2, 20);
|
|
1172
|
+
if (this.failures.length > maxFailures) {
|
|
1173
|
+
this.failures = this.failures.slice(-maxFailures);
|
|
1174
|
+
}
|
|
1165
1175
|
}
|
|
1166
1176
|
/**
|
|
1167
1177
|
* Get current state
|