dsh-inbox-bridge 2.19.2 → 2.19.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.
- package/CHANGELOG.md +4 -0
- package/docs/index.json +3 -3
- package/index.js +11 -0
- package/package.json +1 -1
- package/scripts/clear-inbox.mjs +9 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## 2.19.3
|
|
2
|
+
|
|
3
|
+
- 唤醒只差「会话还不够空闲」这一步时,事件不再被注入掉,而是继续留在队列里等空闲窗口。之前的顺序是:此刻不满足唤醒条件,就把它塞进下一轮对话——于是那条消息被用掉了,唤醒永远等不到它。现在只有真的叫不动(角色不对、多人看同一个仓库、预算用完)才退回注入,纯粹的「再等一会儿」会把事件留给它本来要开的那一轮。
|
|
4
|
+
- 回归测试:`a wakeup that is not idle yet holds the event instead of spending it`(关掉这一条判定后立刻红)。
|
|
1
5
|
## 2.19.2
|
|
2
6
|
|
|
3
7
|
- 被「留下」的事件现在会先记进队列(`attempts: 0` 表示记下来了但还没告诉任何人),下一次轮询即使来源已经不再报它,也会把它重新端上来。之前 issue 与评论这类只报一次的事实,在「所有会话都正忙」的那一轮被留下之后就永远消失了——唤醒因此永远等不到它要等的那条消息。
|
package/docs/index.json
CHANGED
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
},
|
|
51
51
|
"versions": [
|
|
52
52
|
{
|
|
53
|
-
"version": "2.19.
|
|
54
|
-
"publishTimestamp":
|
|
53
|
+
"version": "2.19.3",
|
|
54
|
+
"publishTimestamp": 1794920339,
|
|
55
55
|
"source": {
|
|
56
56
|
"type": "git",
|
|
57
57
|
"url": "https://github.com/c3115644151/dsh-inbox-bridge",
|
|
58
|
-
"commit": "
|
|
58
|
+
"commit": "5bb3c88ae0c3cbf425b3ec6de46c8804a69d5950"
|
|
59
59
|
},
|
|
60
60
|
"engines": {
|
|
61
61
|
"dsh": ">=0.1.0"
|
package/index.js
CHANGED
|
@@ -628,6 +628,17 @@ export function apply(ctx, config) {
|
|
|
628
628
|
primary: prefs.primary ?? {},
|
|
629
629
|
});
|
|
630
630
|
if (!wake.agent && wake.considered > 0) log(`no wakeup: ${wake.why}`);
|
|
631
|
+
// A wakeup that is only waiting for the idle window must not spend the
|
|
632
|
+
// event by injecting it: that would fill the next turn and leave nothing
|
|
633
|
+
// for the wake it existed for. The event stays pending and the next poll
|
|
634
|
+
// carries it (see `carriedPending`), so the wake still happens once the
|
|
635
|
+
// session has been quiet long enough.
|
|
636
|
+
if (!wake.agent && wake.why === "not-idle" && options.delivery === "wakeup") {
|
|
637
|
+
log(
|
|
638
|
+
`held ${events.length} event(s): the session has not been idle for ${pollLabel(options.wakeAfterIdleMs)} yet`,
|
|
639
|
+
);
|
|
640
|
+
return;
|
|
641
|
+
}
|
|
631
642
|
const waking = wake.agent ? new Set([wake.agent]) : new Set();
|
|
632
643
|
const deliveredKeys = new Set();
|
|
633
644
|
let delivered = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-inbox-bridge",
|
|
3
|
-
"version": "2.19.
|
|
3
|
+
"version": "2.19.3",
|
|
4
4
|
"displayName": "GitHub inbox",
|
|
5
5
|
"description": "DSH 插件:让 agent 像维护者一样盯着你的仓库——按会话订阅仓库,取回与你有关、需要你处理的事件(失败的 CI、待评审的 PR、指派给你的 issue、@你的评论、开着的安全告警),在自己的回合送进上下文;会话空闲又遇到要紧的事时也能主动开一轮,让 agent 自己去修、去审、去接。",
|
|
6
6
|
"type": "module",
|
package/scripts/clear-inbox.mjs
CHANGED
|
@@ -540,7 +540,15 @@ if (process.argv[1] && pathToFileURL(resolve(process.argv[1])).href === import.m
|
|
|
540
540
|
main(process.argv.slice(2)).then(
|
|
541
541
|
(code) => process.exit(code ?? 0),
|
|
542
542
|
(error) => {
|
|
543
|
-
|
|
543
|
+
// A bare "Uncaught" tells whoever reads the log nothing. Keep the message
|
|
544
|
+
// and the first frames, which is what says whether the profile is busy or
|
|
545
|
+
// the page changed.
|
|
546
|
+
const text = String(error?.message ?? error);
|
|
547
|
+
const frames = String(error?.stack ?? "")
|
|
548
|
+
.split("\n")
|
|
549
|
+
.slice(1, 3)
|
|
550
|
+
.join("\n");
|
|
551
|
+
console.error(`clear-inbox: ${text}${frames ? `\n${frames}` : ""}`);
|
|
544
552
|
process.exit(1);
|
|
545
553
|
},
|
|
546
554
|
);
|