dsh-session-superagent 0.9.115 → 0.9.118
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/CHANGELOG.md +87 -0
- package/README.md +4 -3
- package/client.js +1 -1
- package/lib/gh-format.js +465 -465
- package/lib/index.js +2310 -2289
- package/lib/watch.js +16 -0
- package/package.json +1 -1
package/lib/watch.js
CHANGED
|
@@ -319,6 +319,22 @@ export function batchFresh(fresh, limit = 3, priority) {
|
|
|
319
319
|
* 反复请求不存在的资源既浪费额度,还可能触发 secondary rate limit。
|
|
320
320
|
* 出处:https://docs.github.com/en/rest/using-the-rest-api/best-practices-for-using-the-rest-api
|
|
321
321
|
*/
|
|
322
|
+
/**
|
|
323
|
+
* 进入「不在活跃时段」的等待:顺带把上一次的错误清掉。
|
|
324
|
+
*
|
|
325
|
+
* 为什么:时段外根本不轮询,旧的 lastError 会一直挂着,面板上就变成一条永不消停的「异常」。
|
|
326
|
+
* 依据同 paused-means-no-new-facts:不再更新的状态不该继续代表「现在」。
|
|
327
|
+
*/
|
|
328
|
+
export function enterActiveHoursDefer(entry, waitMs, hours, at = new Date()) {
|
|
329
|
+
entry.nextAt = new Date(at.getTime() + Number(waitMs || 0)).toISOString()
|
|
330
|
+
entry.lastDeferred = `不在活跃时段(${hours}),${Math.round(Number(waitMs || 0) / 60000)} 分钟后开始`
|
|
331
|
+
entry.deferReason = 'active-hours'
|
|
332
|
+
// 旧错误不是「现在」的事实
|
|
333
|
+
entry.lastError = null
|
|
334
|
+
entry.lastErrorAt = null
|
|
335
|
+
entry.consecutiveFailures = 0
|
|
336
|
+
return entry
|
|
337
|
+
}
|
|
322
338
|
export function permanentBackoffMs(kind, baseMs = 60000) {
|
|
323
339
|
const PERMANENT = new Set(['notfound', 'moved'])
|
|
324
340
|
if (!PERMANENT.has(kind)) return 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.118",
|
|
4
4
|
"description": "Session-level superagent for DeepSeek Harness: watch a GitHub repository and wake a session when something needs doing. Credentials never reach the model.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|