@supaku/agentfactory-server 0.7.19 → 0.7.21
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.
|
@@ -40,7 +40,7 @@ export declare class RedisCircuitBreaker implements CircuitBreakerStrategy {
|
|
|
40
40
|
/**
|
|
41
41
|
* Record an auth failure. May trip the circuit to open.
|
|
42
42
|
*/
|
|
43
|
-
recordAuthFailure(
|
|
43
|
+
recordAuthFailure(_statusCode?: number): Promise<void>;
|
|
44
44
|
/**
|
|
45
45
|
* Check if an error is an auth/rate-limit error.
|
|
46
46
|
* Reuses the same detection logic as the in-memory CircuitBreaker.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis-circuit-breaker.d.ts","sourceRoot":"","sources":["../../src/redis-circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAI/F,MAAM,WAAW,yBAA0B,SAAQ,oBAAoB;IACrE,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAA;CACpB;AA6GD,qBAAa,mBAAoB,YAAW,sBAAsB;IAChE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA2B;IAClD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAQ;gBAEtB,MAAM,EAAE,OAAO,CAAC,yBAAyB,CAAC,GAAG;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE;IAKhF,OAAO,KAAK,QAAQ,GAEnB;IACD,OAAO,KAAK,WAAW,GAEtB;IACD,OAAO,KAAK,WAAW,GAEtB;IACD,OAAO,KAAK,eAAe,GAE1B;IAED;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAuBpC;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IAgBpC;;OAEG;IACG,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"redis-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AyB,EAAE,aAAa,CAAC,CAAC,GAC/D,mBAAmB,CAErB"}
|
|
@@ -180,17 +180,13 @@ export class RedisCircuitBreaker {
|
|
|
180
180
|
/**
|
|
181
181
|
* Record an auth failure. May trip the circuit to open.
|
|
182
182
|
*/
|
|
183
|
-
async recordAuthFailure(
|
|
184
|
-
if (!this.config.authErrorCodes.includes(statusCode)) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
183
|
+
async recordAuthFailure(_statusCode) {
|
|
187
184
|
try {
|
|
188
185
|
const redis = getRedisClient();
|
|
189
186
|
const result = await redis.eval(RECORD_FAILURE_LUA, 4, this.stateKey, this.failuresKey, this.openedAtKey, this.resetTimeoutKey, String(this.config.failureThreshold), String(Date.now()), String(this.config.resetTimeoutMs), String(this.config.backoffMultiplier), String(this.config.maxResetTimeoutMs));
|
|
190
187
|
if (result === 'open') {
|
|
191
188
|
log.warn('Circuit breaker tripped to OPEN', {
|
|
192
189
|
workspaceId: this.config.workspaceId,
|
|
193
|
-
statusCode,
|
|
194
190
|
});
|
|
195
191
|
}
|
|
196
192
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supaku/agentfactory-server",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.21",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Webhook server and distributed worker pool for AgentFactory — Redis queues, issue locks, session management",
|
|
6
6
|
"author": "Supaku (https://supaku.com)",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
],
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"ioredis": "^5.4.2",
|
|
47
|
-
"@supaku/agentfactory
|
|
48
|
-
"@supaku/agentfactory": "0.7.
|
|
47
|
+
"@supaku/agentfactory": "0.7.21",
|
|
48
|
+
"@supaku/agentfactory-linear": "0.7.21"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^22.5.4",
|