dsh-inbox-bridge 2.16.2 → 2.16.4

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 CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.16.4
2
+
3
+ - 商店与设置页里的简介还写着「空闲时不发请求」,而 2.16.2 起唤醒模式必须空闲取数才能叫醒你。改成按模式说明:为唤醒服务的空闲取数只在能开轮的模式里发生,默认的只注入模式空闲时依旧不发任何请求。
4
+ ## 2.16.3
5
+
6
+ - 修掉一处会静默丢掉订阅的配置缺陷:页面覆盖层与 profile 各自改一个键,两者偶尔会互相矛盾(页面选过 `quiet`,profile 里写着 wakeup 用的角色)。旧逻辑因此拒绝整份覆盖层并静默丢弃,连页面上订阅的仓库一起消失,队列从此只读工作目录那一个仓库。现在只让不生效的那个键闲置,启动行会说明;覆盖层真被拒绝时也会写一行 `overlay ignored: …`,不再无声。
7
+ - 这个缺陷是「回合空闲也轮询」上线后暴露的,一并加了回归测试:覆盖层里的仓库必须仍然生效。
1
8
  ## 2.16.2
2
9
 
3
10
  - 补上主动唤醒缺的最后一环:此前空闲时不轮询,而空闲正是唤醒的唯一时机,于是这个模式几乎永远等不到机会。现在 wakeup 下空闲也按 intervalMs 取数,quiet 仍然不读——白付的钱只付给能开轮的模式。
package/docs/index.json CHANGED
@@ -28,8 +28,8 @@
28
28
  "zh": "GitHub 收件箱"
29
29
  },
30
30
  "description": {
31
- "en": "Lets the agent keep watch over your repository the way a maintainer would: it reads the GitHub repositories a session subscribes to, keeps only the events that concern you — failed checks, reviews waiting for you, issues assigned to you, comments that mention you — and injects them at the next turn boundary, so a broken check gets fixed and a review request gets reviewed without waiting for you. A chip in the status row lists them and switches delivery, message clearing and subscriptions. Read-only, no turn on its own, no request while idle.",
32
- "zh": "让 agent 像维护者一样盯着你的仓库:按会话订阅的 GitHub 仓库取数,只保留与你有关、需要你处理的事件(失败的 CI、待你评审的 PR、指派给你的 issue、@你的评论),在回合边界注入会话上下文——CI 挂了就修,有人请你评审就审,不用等你回来看。状态行里的胶囊可查看待处理项,并切换提醒方式、消息清理与订阅仓库。只读 GitHub,默认不主动开启对话,空闲时不发请求。"
31
+ "en": "Lets the agent keep watch over your repository the way a maintainer would: it reads the GitHub repositories a session subscribes to, keeps the events that concern you — failed checks, reviews waiting for you, issues assigned to you, comments that mention you — and puts them in front of the agent in its own turn, opening one by itself when the session is idle and the fact matters, so a broken check gets fixed and a review request gets reviewed without waiting for you. A chip in the status row lists them and switches delivery, message clearing and subscriptions. Read-only; waking is opt-in and gated; no request while idle.",
32
+ "zh": "让 agent 像维护者一样盯着你的仓库:按会话订阅的 GitHub 仓库取数,只保留与你有关、需要你处理的事件(失败的 CI、待你评审的 PR、指派给你的 issue、@你的评论),在自己的回合送进上下文——CI 挂了就修,有人请你评审就审,不用等你回来看;会话空闲又遇到要紧的事,它也会主动开一轮。状态行里的胶囊可查看待处理项,并切换提醒方式、消息清理与订阅仓库。只读 GitHub,主动开轮需显式开启且有四道门,空闲时不发请求。"
33
33
  },
34
34
  "icon": "icon.svg",
35
35
  "author": "c3115644151",
@@ -50,12 +50,12 @@
50
50
  },
51
51
  "versions": [
52
52
  {
53
- "version": "2.16.1",
54
- "publishTimestamp": 1794906035,
53
+ "version": "2.16.3",
54
+ "publishTimestamp": 1794908614,
55
55
  "source": {
56
56
  "type": "git",
57
57
  "url": "https://github.com/c3115644151/dsh-inbox-bridge",
58
- "commit": "a5e99037e4c8dae6c79033397b8a1092c0a6d43b"
58
+ "commit": "e20dbbb20b1b2d0b5043d888fea51af3eef2d0e1"
59
59
  },
60
60
  "engines": {
61
61
  "dsh": ">=0.1.0"
package/index.js CHANGED
@@ -271,8 +271,11 @@ export function apply(ctx, config) {
271
271
  if (Object.keys(prefs).length > 0) {
272
272
  try {
273
273
  Object.assign(options, mergeConfig({ ...baseConfig, ...prefs }));
274
- } catch {
275
- // A stale overlay must not stop the instance; the loop below reports it. prefs = {};
274
+ } catch (error) {
275
+ // An overlay that cannot be merged must not stop the instance, but it also
276
+ // must not vanish without a word: whatever it asked for is not happening.
277
+ log(`overlay ignored: ${error.message ?? error}`);
278
+ prefs = {};
276
279
  }
277
280
  }
278
281
  const agents = new Map();
@@ -608,6 +611,11 @@ export function apply(ctx, config) {
608
611
  `while a turn runs, delivery ${options.delivery}, clear ${options.clear}` +
609
612
  `${options.sweep ? `, sweep ${options.sweep.when}` : ""}${options.repos?.length ? `, repos ${options.repos.join(", ")}` : ""}`,
610
613
  );
614
+ if (options.wakeOnIdle) {
615
+ log(
616
+ `wakeOn ${options.wakeOn.join(",")} is idle: delivery is ${options.delivery}, so those roles only queue`,
617
+ );
618
+ }
611
619
 
612
620
  // A turn is the only thing that makes the inbox worth reading: poll when one
613
621
  // starts, re-poll while a long one runs, poll once more when it ends. An idle
@@ -1001,11 +1009,13 @@ export function mergeConfig(config) {
1001
1009
  `inbox-bridge: \`wakeOn\` must be an array of role names, got ${JSON.stringify(wakeOn)}`,
1002
1010
  );
1003
1011
  }
1004
- if (Array.isArray(wakeOn) && wakeOn.length > 0 && delivery !== "wakeup") {
1005
- throw new Error(
1006
- 'inbox-bridge: `wakeOn` only matters with `delivery: "wakeup"` — set it, or drop `wakeOn`',
1007
- );
1008
- }
1012
+ // `wakeOn` only has an effect in wakeup mode, and the two keys can legitimately
1013
+ // disagree: the page changes one choice at a time, so a profile that names
1014
+ // roles next to a page that picked `quiet` is a normal intermediate state.
1015
+ // Rejecting the whole config there would silently drop the page's other
1016
+ // choices too — the queue then skips repositories nobody asked it to skip.
1017
+ // Keep the roles, mark them idle, and let the startup line say why.
1018
+ const wakeOnIdle = wakeOn.length > 0 && delivery !== "wakeup";
1009
1019
  const intervalMs = given.intervalMs ?? DEFAULTS.intervalMs;
1010
1020
  if (!Number.isInteger(intervalMs) || intervalMs < 5_000) {
1011
1021
  throw new Error(
@@ -1066,6 +1076,7 @@ export function mergeConfig(config) {
1066
1076
  clear,
1067
1077
  sweep: sweepSpec,
1068
1078
  wakeOn,
1079
+ wakeOnIdle,
1069
1080
  intervalMs,
1070
1081
  wakeAfterIdleMs,
1071
1082
  wakesPerHour,
package/locale/en.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "GitHub inbox",
4
- "description": "Lets the agent keep watch over your repository the way a maintainer would: it reads the GitHub repositories a session subscribes to, keeps the events that concern you — failed checks, reviews waiting for you, issues assigned to you, comments that mention you — and puts them in front of the agent in its own turn, opening one by itself when the session is idle and the fact matters, so a broken check gets fixed and a review request gets reviewed without waiting for you. A chip in the status row lists them and switches delivery, message clearing and subscriptions. Read-only; waking is opt-in and gated; no request while idle.",
4
+ "description": "Lets the agent keep watch over your repository the way a maintainer would: it reads the GitHub repositories a session subscribes to, keeps the events that concern you — failed checks, reviews waiting for you, issues assigned to you, comments that mention you — and puts them in front of the agent in its own turn, opening one by itself when the session is idle and the fact matters, so a broken check gets fixed and a review request gets reviewed without waiting for you. A chip in the status row lists them and switches delivery, message clearing and subscriptions. Read-only; waking is opt-in and gated, and reading while idle happens only in the mode that can wake — the default queue-only mode makes no request while idle.",
5
5
  "detail": "docs/DETAIL.md"
6
6
  }
7
7
  }
package/locale/zh.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "GitHub 收件箱",
4
- "description": "让 agent 像维护者一样盯着你的仓库:按会话订阅的 GitHub 仓库取数,只保留与你有关、需要你处理的事件(失败的 CI、待你评审的 PR、指派给你的 issue、@你的评论),在自己的回合送进上下文——CI 挂了就修,有人请你评审就审,不用等你回来看;会话空闲又遇到要紧的事,它也会主动开一轮。状态行里的胶囊可查看待处理项,并切换提醒方式、消息清理与订阅仓库。只读 GitHub,主动开轮需显式开启且有四道门,空闲时不发请求。",
4
+ "description": "让 agent 像维护者一样盯着你的仓库:按会话订阅的 GitHub 仓库取数,只保留与你有关、需要你处理的事件(失败的 CI、待你评审的 PR、指派给你的 issue、@你的评论),在自己的回合送进上下文——CI 挂了就修,有人请你评审就审,不用等你回来看;会话空闲又遇到要紧的事,它也会主动开一轮。状态行里的胶囊可查看待处理项,并切换提醒方式、消息清理与订阅仓库。只读 GitHub;主动开轮需显式开启且有四道门,为它服务的空闲取数也随模式而定——默认的只注入模式空闲时不发任何请求。",
5
5
  "detail": "docs/DETAIL.zh.md"
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-inbox-bridge",
3
- "version": "2.16.2",
3
+ "version": "2.16.4",
4
4
  "displayName": "GitHub inbox",
5
5
  "description": "DSH 插件:让 agent 像维护者一样盯着你的仓库——按会话订阅仓库,取回与你有关、需要你处理的事件(失败的 CI、待评审的 PR、指派给你的 issue、@你的评论),在自己的回合送进上下文;会话空闲又遇到要紧的事时也能主动开一轮,让 agent 自己去修、去审、去接。",
6
6
  "type": "module",