dsh-session-superagent 0.9.182 → 0.9.184
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 +66 -0
- package/README.md +2 -2
- package/client.js +18 -7
- package/lib/gh-format.js +4 -1
- package/lib/gitee.js +57 -0
- package/lib/index.js +20 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,72 @@
|
|
|
2
2
|
|
|
3
3
|
格式参照 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
|
4
4
|
|
|
5
|
+
## [0.9.184] - 2026-11-05 —— Gitee 的 ack 标签根本建不出来:半角冒号非法
|
|
6
|
+
|
|
7
|
+
### 真机发现(不是猜的)
|
|
8
|
+
给 Gitee 仓库自动建 ack 标签时,Gitee 直接回:
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
{"message":"Name只允许汉字、字母、数字或者小数点(.)、下划线(_)、中划线(-)、
|
|
12
|
+
正斜杠(/)、反斜杠(\)以及全角符号,长度必须在 2 到 20 个字符之间"}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
我们默认的标签是 `主理鱼:已处理` —— **半角冒号不在允许集合里**,所以这个标签在 Gitee 上永远建不出来,
|
|
16
|
+
`watch_ack` 每次都 404,面板上看到的就是「需要你处理」+ 一句「没归类的错误」。
|
|
17
|
+
|
|
18
|
+
### 改法
|
|
19
|
+
- `DEFAULT_ACK_LABEL_GITEE = '主理鱼-已处理'`(连字符),`defaultAckLabel(provider)` 按 provider 选默认值
|
|
20
|
+
(轮询 / 建守 / `watch_ack` / `watch_doctor` / `watch_start` 五处);
|
|
21
|
+
- `ensureGiteeLabel()` 打标签前先确保标签存在:先 `GET /labels` 查,不存在才 `POST` 建;
|
|
22
|
+
**名字非法时先拦下并给建议**(`suggestGiteeLabel` 把冒号换成连字符),不发无谓请求;
|
|
23
|
+
- `classifyGhError()` 补 **中文 401**:`{"message":"登录失效,无权限访问该资源","code":40001}` → `auth`
|
|
24
|
+
(以前只认英文,这条会落进 `other`)。
|
|
25
|
+
|
|
26
|
+
### 真机验证
|
|
27
|
+
```
|
|
28
|
+
ensureGiteeLabel({ repo:'MYCF711/workbuddy-pro', label:'主理鱼-已处理' })
|
|
29
|
+
→ {"ok":true,"created":true,"reason":"created"} # 标签真的建出来了
|
|
30
|
+
ensureGiteeLabel({ ..., label:'主理鱼:已处理' })
|
|
31
|
+
→ {"ok":false,"reason":"invalid-name","suggestion":"主理鱼-已处理"} # 请求都没发
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### 证据
|
|
35
|
+
```
|
|
36
|
+
node --test → 301/301(新增:标签名规则 6 条断言、中文 401)
|
|
37
|
+
preflight 全量 → 37/37
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## [0.9.183] - 2026-11-05 —— 门禁互斥锁 + 来源页三条文案
|
|
41
|
+
|
|
42
|
+
### ① 门禁互斥锁(本轮最重要)
|
|
43
|
+
上一轮的事故根因:反向用例会**临时改坏文件再还原**,两个这样的进程交错时,后一个把前一个的注入当成原件写回去 ——
|
|
44
|
+
`client.js` 里永久留下 `ZZ_DUP` 两行、`package.json` 的 `files` 少了两项、`README.md` 单测数变成 `9999`。
|
|
45
|
+
这一轮 T6 子代理又亲眼撞了一次(它的改动被整份回滚)。
|
|
46
|
+
|
|
47
|
+
新增 `scripts/gate-lock.mjs`:
|
|
48
|
+
- 用 `mkdirSync` 的原子性做锁(`EEXIST` = 被占用),锁里记 pid 与起始时间;
|
|
49
|
+
- 持有者已死 / 占用超过 30 分钟 → 视为陈旧锁,自动清理重试;
|
|
50
|
+
- `regression-cases.mjs` 全程持锁;`audit-pack.mjs` 也拿同一把锁 ——
|
|
51
|
+
**只读检查遇到忙是 `SKIP` 而不是 `FAIL`**(假红比跳过更糟);
|
|
52
|
+
- 实测:A 持锁 1.5 秒,B 等 1312ms 后拿到;3 条用例覆盖基本/重复释放/陈旧锁。
|
|
53
|
+
|
|
54
|
+
### ② 来源页三条文案(T6 子代理)
|
|
55
|
+
| 位置 | 改前 | 改后 |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| 仓库 | `a/b, c/d, e/f`(518px 粘成一行,窄屏劈在 `owner/name` 中间) | `3 条:a/b、c/d、e/f`(超过 3 条补「等」) |
|
|
58
|
+
| 凭证 | 标签 `凭证`(与左栏分区同词) | 标签 `GitHub 凭证`;值写明二选一 |
|
|
59
|
+
| 隔离占用 | `2 个 · 256.0 KB(合计 256.0 KB)` | `2 个隔离根 · 256.0 KB`(单根不再重复合计) |
|
|
60
|
+
|
|
61
|
+
出图:`shot-set-source-after.png`(断行只发生在顿号处)。
|
|
62
|
+
|
|
63
|
+
### 证据
|
|
64
|
+
```
|
|
65
|
+
node --test → 297/297(新增 gate-lock 3 条)
|
|
66
|
+
ui-audit → 11/11(100)
|
|
67
|
+
preflight 全量 → 37/37
|
|
68
|
+
并发实测 → 后到的门禁等了 1312ms,仓库零残留(files 11 / 无 ZZ_DUP / README 297)
|
|
69
|
+
```
|
|
70
|
+
|
|
5
71
|
## [0.9.182] - 2026-11-05 —— Gitee 三种响应形状 + 分诊信号表两列化 + 用上一轮状态补 Gitee 缺的字段
|
|
6
72
|
|
|
7
73
|
### 派单(LEAD.md 纪律:Lead 只拆包/派单/集成/验收)
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<img src="assets/icon-180.png" width="88" height="88" alt="">
|
|
4
4
|
|
|
5
5
|
[](LICENSE)
|
|
6
|
-
[](https://github.com/MYCF711/dsh-session-superagent/releases)
|
|
7
7
|
[](https://www.npmjs.com/package/dsh-session-superagent)
|
|
8
8
|
[](https://github.com/topics/dsh-plugin)
|
|
9
9
|
|
|
@@ -144,7 +144,7 @@ Gitee 私有仓库要在「设置 → 凭证」填私人令牌;公开仓库不
|
|
|
144
144
|
## 开发
|
|
145
145
|
|
|
146
146
|
```sh
|
|
147
|
-
node --test #
|
|
147
|
+
node --test # 301 项单测
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
### 工具输出:文本给人和 agent,JSON 给程序
|
package/client.js
CHANGED
|
@@ -14,7 +14,7 @@ window.__ModuleLoader__.load({
|
|
|
14
14
|
const { useCallback, useEffect, useRef, useState } = React
|
|
15
15
|
|
|
16
16
|
// 客户端版本探针:每次模块加载写一次,用来确认浏览器里跑的是哪一版
|
|
17
|
-
const CLIENT_VERSION = '0.9.
|
|
17
|
+
const CLIENT_VERSION = '0.9.184'
|
|
18
18
|
let BASE = '/session-superagent'
|
|
19
19
|
/**
|
|
20
20
|
* 挑「最新的那个服务端实例」。
|
|
@@ -1695,16 +1695,24 @@ window.__ModuleLoader__.load({
|
|
|
1695
1695
|
h(Btn, { variant: 'primary', icon: h(Icon, { name: 'plus' }), onClick: addWatcher, disabled: !sessionId || !form.repo.trim() },
|
|
1696
1696
|
sessionId ? '添加到当前会话' : '先打开一个会话'))))
|
|
1697
1697
|
|
|
1698
|
+
// 「仓库」行:先给条数,再看名字;超过 3 条截断成「… 等」。
|
|
1699
|
+
// 原先用 ", " 把三个 owner/name 粘成一行(实测 518px / 可用 541px),
|
|
1700
|
+
// 读者数不清有几条守,窄屏还会劈在 owner/name 中间;改用顿号后换行只发生在条目之间。
|
|
1701
|
+
const repoListText = (list) => list.length + ' 条:'
|
|
1702
|
+
+ list.slice(0, 3).map((w) => w.repo).join('、')
|
|
1703
|
+
+ (list.length > 3 ? ' 等' : '')
|
|
1704
|
+
|
|
1698
1705
|
const settingsSections = [
|
|
1699
1706
|
h(Section, { key: 'source', title: '来源' },
|
|
1700
1707
|
h(KeyValues, { rows: [
|
|
1701
|
-
['仓库', watchers.length === 0 ? '未绑定' : watchers
|
|
1708
|
+
['仓库', watchers.length === 0 ? '未绑定' : repoListText(watchers)],
|
|
1702
1709
|
['gh CLI', !body.gh
|
|
1703
1710
|
? '检测中…'
|
|
1704
1711
|
: body.gh.ok
|
|
1705
1712
|
? '可用 · ' + (body.gh.version || '')
|
|
1706
1713
|
: '不可用 —— 先跑 gh auth login(或装 gh CLI);也可以直接在下面填 token · ' + String(body.gh.error || '').slice(0, 80)],
|
|
1707
|
-
|
|
1714
|
+
// 标签要能和左栏「凭证」分区区分开;值要写出「面板 token / gh 登录态」二选一。
|
|
1715
|
+
['GitHub 凭证', credentials.token === 'none' ? '回退到已登录的 gh CLI' : '用面板 token(不再需要 gh login)'],
|
|
1708
1716
|
['权限范围', (() => {
|
|
1709
1717
|
const info = body.tokenScopes
|
|
1710
1718
|
if (!info) return '正在探测…'
|
|
@@ -1715,10 +1723,13 @@ window.__ModuleLoader__.load({
|
|
|
1715
1723
|
(body.tokenScopes && body.tokenScopes.broad && body.tokenScopes.broad.length > 0)
|
|
1716
1724
|
? ['提示', '这个 token 带 ' + body.tokenScopes.broad.join(', ') + ' —— 我们的功能只需要「读 issue/PR + 写评论和标签」,建议换细粒度 token 只授 Issues 读写']
|
|
1717
1725
|
: null,
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1726
|
+
// 只有一个隔离根时「合计」恒等于前面那个数 —— 同一个数字写两遍;只有多根时才补合计。
|
|
1727
|
+
['隔离占用', (() => {
|
|
1728
|
+
const roots = (body.isolation && body.isolation.roots) || []
|
|
1729
|
+
if (roots.length === 0) return '没有开隔离执行'
|
|
1730
|
+
const each = roots.map((r) => r.count + ' 个隔离根 · ' + bytesText(r.bytes)).join(';')
|
|
1731
|
+
return roots.length > 1 ? each + '(合计 ' + bytesText(body.isolation.totalBytes) + ')' : each
|
|
1732
|
+
})()],
|
|
1722
1733
|
] })),
|
|
1723
1734
|
h(Section, { key: 'creds', title: '凭证' },
|
|
1724
1735
|
h(KeyValues, { rows: [['GitHub token', credentials.token === 'none' ? '未配置(回退到已登录的 gh CLI)' : '已配置'], ['SSH 私钥', credentials.sshKeyPath === 'none' ? '未配置(当前版本不使用)' : '已配置'],
|
package/lib/gh-format.js
CHANGED
|
@@ -86,7 +86,10 @@ export function classifyGhError(detail) {
|
|
|
86
86
|
// 标签不存在(JSON)→ {"message":"404 Not Found"} / {"message":"Not Found Project"}
|
|
87
87
|
// token 失效(JSON)→ {"message":"401 Unauthorized: Access token does not exist"}
|
|
88
88
|
// 限流 → HTTP 429(常常只有状态行,没有正文)
|
|
89
|
-
|
|
89
|
+
// Gitee 的 401 还有**中文**版本(真机 2026-11-05 实测):
|
|
90
|
+
// {"message":"登录失效,无权限访问该资源","code":40001}
|
|
91
|
+
// 只认英文会把这条放进 other,客户看到「没归类的错误」而不知道该重新登录。
|
|
92
|
+
if (/Access token does not exist|401\s+Unauthorized|登录失效|无权限访问该资源/i.test(text)) {
|
|
90
93
|
return {
|
|
91
94
|
kind: 'auth',
|
|
92
95
|
short,
|
package/lib/gitee.js
CHANGED
|
@@ -170,3 +170,60 @@ export function mapGiteeRepoAccess(repo, info = {}) {
|
|
|
170
170
|
checkedAt: new Date().toISOString(),
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* 确保 ack 标签存在(Gitee 不会像 GitHub 那样「打标签时自动建」)。
|
|
176
|
+
*
|
|
177
|
+
* 真机核对(2026-11-05):`GET /repos/{owner}/{repo}/labels` 返回 200 与标签数组,
|
|
178
|
+
* 说明标签端点族存在;不存在时 `POST .../issues/{n}/labels` 会回 HTML 404 页(不是 JSON)。
|
|
179
|
+
*
|
|
180
|
+
* 先 GET 再 POST:Gitee 对「已存在」的 POST 行为没有文档保证,先查一次能省掉一次无谓写入,
|
|
181
|
+
* 也让返回能说清「是新建的,还是本来就有」。
|
|
182
|
+
*
|
|
183
|
+
* 失败不抛:调用方(watch_ack)要能继续尝试打标签,并把真实原因带回给客户。
|
|
184
|
+
*/
|
|
185
|
+
export async function ensureGiteeLabel({ repo, token = '', label, color = 'ededed', fetchImpl } = {}) {
|
|
186
|
+
const name = String(label || '').trim()
|
|
187
|
+
if (!name) return { ok: false, error: 'label is required' }
|
|
188
|
+
// 先按 Gitee 的规则校验:名字非法时 POST 回来的是一句中文报错,客户看不懂该改什么
|
|
189
|
+
if (!isValidGiteeLabel(name)) {
|
|
190
|
+
return {
|
|
191
|
+
ok: false,
|
|
192
|
+
reason: 'invalid-name',
|
|
193
|
+
error: 'Gitee 标签名只允许汉字/字母/数字/._-/ 与全角符号,长度 2–20(半角冒号不行)',
|
|
194
|
+
suggestion: suggestGiteeLabel(name),
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
const listed = await request(`/repos/${repo}/labels`, { token, fetchImpl })
|
|
198
|
+
if (listed.ok) {
|
|
199
|
+
const names = (Array.isArray(listed.data) ? listed.data : []).map((item) => String(item && item.name || ''))
|
|
200
|
+
if (names.includes(name)) return { ok: true, created: false, reason: 'already-exists' }
|
|
201
|
+
}
|
|
202
|
+
const created = await request(`/repos/${repo}/labels`, { token, method: 'POST', body: { name, color }, fetchImpl })
|
|
203
|
+
if (created.ok) return { ok: true, created: true, reason: 'created' }
|
|
204
|
+
return { ok: false, status: created.status, error: created.error, reason: 'create-failed' }
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Gitee 的标签名规则比 GitHub 严(真机 2026-11-05 实测的报错原文):
|
|
209
|
+
*
|
|
210
|
+
* 只允许汉字、字母、数字或者小数点(.)、下划线(_)、中划线(-)、正斜杠(/)、反斜杠(\)
|
|
211
|
+
* 以及全角符号,长度必须在 2 到 20 个字符之间
|
|
212
|
+
*
|
|
213
|
+
* 注意**半角冒号不在允许集合里** —— 我们默认的 `主理鱼:已处理` 在 Gitee 上根本建不出来,
|
|
214
|
+
* 于是 ack 永远 404。所以 Gitee 用连字符版本。
|
|
215
|
+
*/
|
|
216
|
+
export const DEFAULT_ACK_LABEL_GITEE = '主理鱼-已处理'
|
|
217
|
+
|
|
218
|
+
// 允许集:汉字 / 字母 / 数字 / . _ - / 与全角符号;**半角冒号不在其中**(Gitee 实测拒绝)
|
|
219
|
+
const GITEE_LABEL_RE = /^[一-龥A-Za-z0-9._/ -〿--]{2,20}$/
|
|
220
|
+
|
|
221
|
+
export function isValidGiteeLabel(name) {
|
|
222
|
+
return GITEE_LABEL_RE.test(String(name || '').trim())
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** 把 GitHub 风格的标签名换成 Gitee 能接受的(主要就是把半角冒号换成连字符)。 */
|
|
226
|
+
export function suggestGiteeLabel(name) {
|
|
227
|
+
const fixed = String(name || '').trim().split(':').join('-').slice(0, 20)
|
|
228
|
+
return isValidGiteeLabel(fixed) ? fixed : DEFAULT_ACK_LABEL_GITEE
|
|
229
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -23,7 +23,7 @@ import { zstdDecompressSync } from 'node:zlib'
|
|
|
23
23
|
|
|
24
24
|
import { redact } from './redact.js'
|
|
25
25
|
import { decodeBody } from './body.js'
|
|
26
|
-
import { listGiteeItems, fetchGiteeLastComment, addGiteeLabel, giteeWhoami, giteeRepo, mapGiteeRepoAccess } from './gitee.js'
|
|
26
|
+
import { listGiteeItems, fetchGiteeLastComment, addGiteeLabel, ensureGiteeLabel, giteeWhoami, giteeRepo, mapGiteeRepoAccess, DEFAULT_ACK_LABEL_GITEE } from './gitee.js'
|
|
27
27
|
import {
|
|
28
28
|
advanceSeen, applyWatcherAction, batchFresh, decideWake, DEFAULT_ACK_LABEL, formatWatchText,
|
|
29
29
|
parseRepoSpec, markGiteeReopened,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
|
|
43
43
|
export const name = 'dsh-session-superagent'
|
|
44
44
|
/** 服务端版本:随 package.json 同步(meta 测试守着)。客户端据此挑「最新的那个实例」。 */
|
|
45
|
-
export const SERVER_VERSION = '0.9.
|
|
45
|
+
export const SERVER_VERSION = '0.9.184'
|
|
46
46
|
export const inject = ['tools', 'agents', 'webServer']
|
|
47
47
|
/** 一条会话每小时最多被唤醒几次(跨所有守累计)。单守上限挡不住多守叠加。 */
|
|
48
48
|
// 本进程启动时刻:用来区分「刚重启还没轮到」与「定时器真的丢了」
|
|
@@ -578,6 +578,11 @@ function run(file, args, options = {}) {
|
|
|
578
578
|
})
|
|
579
579
|
}
|
|
580
580
|
|
|
581
|
+
/** 默认 ack 标签按 provider 走:Gitee 的标签名不允许半角冒号(真机实测拒建)。 */
|
|
582
|
+
function defaultAckLabel(provider) {
|
|
583
|
+
return provider === 'gitee' ? DEFAULT_ACK_LABEL_GITEE : DEFAULT_ACK_LABEL
|
|
584
|
+
}
|
|
585
|
+
|
|
581
586
|
function defineTool(options) {
|
|
582
587
|
const properties = {}
|
|
583
588
|
const required = []
|
|
@@ -1170,7 +1175,7 @@ async function pollWithItems(ctx, entry, baseMs, parsed) {
|
|
|
1170
1175
|
// 触发要有许可:过滤器不通过的条目根本不进候选集,也不写 seen 水位
|
|
1171
1176
|
// 记忆要有遗忘:seen 只增不减会问成几 MB 的字典
|
|
1172
1177
|
entry.seen = pruneSeen(entry.seen)
|
|
1173
|
-
const ackLabel = entry.ackLabel ||
|
|
1178
|
+
const ackLabel = entry.ackLabel || defaultAckLabel(entry.provider)
|
|
1174
1179
|
// 幂等痕迹留在 GitHub 上:带 ack 标签的条目直接跳过(换机器、删状态都不会重报)
|
|
1175
1180
|
const considered = []
|
|
1176
1181
|
// 每轮重置:这行要被读成「本轮跳过多少」,累计值会越滚越大、误导客户
|
|
@@ -1777,7 +1782,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
|
|
|
1777
1782
|
id, repo, provider, sessionId, cursor: null, seen: {}, lastReported: {},
|
|
1778
1783
|
cooldownMs: 180000, createdAt: new Date().toISOString(),
|
|
1779
1784
|
filters: normalizeFilters(), batchLimit: 5, maxWakesPerHour: 6,
|
|
1780
|
-
wakeTimes: [], consecutiveFailures: 0, ackLabel:
|
|
1785
|
+
wakeTimes: [], consecutiveFailures: 0, ackLabel: defaultAckLabel(provider),
|
|
1781
1786
|
isolated: false, workdir: null,
|
|
1782
1787
|
}
|
|
1783
1788
|
entry.provider = provider
|
|
@@ -2109,7 +2114,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
|
|
|
2109
2114
|
? watchers.find((w) => w && w.repo === String(args.repo))
|
|
2110
2115
|
: watchers.find((w) => w && w.enabled)
|
|
2111
2116
|
if (!entry) return '[error: no watcher for that repo — start one with watch_start first]'
|
|
2112
|
-
const label = String(args.label || entry.ackLabel ||
|
|
2117
|
+
const label = String(args.label || entry.ackLabel || defaultAckLabel(entry.provider))
|
|
2113
2118
|
// GitHub 不会因为加标签而自动建标签:不存在时返回 422。先幂等建一次(已存在也返回 422,忽略)。
|
|
2114
2119
|
// Gitee 没有「建标签」的独立端点(标签必须先存在),所以这边只打标签;
|
|
2115
2120
|
// 标签不存在时它会 404 —— 让调用方看到真实原因,别假装成功。
|
|
@@ -2118,6 +2123,13 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
|
|
|
2118
2123
|
}
|
|
2119
2124
|
const results = []
|
|
2120
2125
|
let failed = null
|
|
2126
|
+
let labelNote = ''
|
|
2127
|
+
// Gitee 打标签前要先确保标签存在(它不会像 GitHub 那样自动建)
|
|
2128
|
+
if (entry.provider === 'gitee') {
|
|
2129
|
+
const ensured = await ensureGiteeLabel({ repo: entry.repo, token: String(readSecrets().giteeToken || ''), label })
|
|
2130
|
+
if (ensured.ok) labelNote = ensured.created ? '(已自动新建标签「' + label + '」)' : ''
|
|
2131
|
+
else labelNote = '(标签「' + label + '」建不出来:' + String(ensured.error || ensured.status || '').slice(0, 80) + ')'
|
|
2132
|
+
}
|
|
2121
2133
|
for (const number of numbers) {
|
|
2122
2134
|
const res = entry.provider === 'gitee'
|
|
2123
2135
|
? await (async () => {
|
|
@@ -2167,7 +2179,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
|
|
|
2167
2179
|
if (args && args.format === 'json') {
|
|
2168
2180
|
return JSON.stringify({ schemaVersion: 1, ok: true, repo: entry.repo, label, acked: results, at: nowIso })
|
|
2169
2181
|
}
|
|
2170
|
-
|
|
2182
|
+
return `acked ${entry.repo} #${results.join(' #')} with label "${label}"` + labelNote
|
|
2171
2183
|
},
|
|
2172
2184
|
}))
|
|
2173
2185
|
|
|
@@ -2352,7 +2364,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
|
|
|
2352
2364
|
}
|
|
2353
2365
|
}
|
|
2354
2366
|
// 3. ack 标签是否存在(两家都要看:Gitee 不会自动建标签,更要说清楚)
|
|
2355
|
-
const label = entry.ackLabel ||
|
|
2367
|
+
const label = entry.ackLabel || defaultAckLabel(entry.provider)
|
|
2356
2368
|
if (isGitee) {
|
|
2357
2369
|
// Gitee 没有「建标签」端点,watch_ack 也不会替它建(GitHub 会)——
|
|
2358
2370
|
// 所以这里只能交代规则,不能假装探测过。
|
|
@@ -2508,7 +2520,7 @@ const UPDATE_CACHE_MS = 10 * 60 * 1000
|
|
|
2508
2520
|
id, repo, provider, sessionId,
|
|
2509
2521
|
intervalSec: 60,
|
|
2510
2522
|
cooldownMs: DEFAULT_COOLDOWN_MS,
|
|
2511
|
-
ackLabel:
|
|
2523
|
+
ackLabel: defaultAckLabel(provider),
|
|
2512
2524
|
cursor: null,
|
|
2513
2525
|
seen: {},
|
|
2514
2526
|
lastReported: {},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-session-superagent",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.184",
|
|
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",
|