dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DSH 插件:监控 X @thsottiaux 的 Codex reset 公告,左侧边栏底部 R 图标(常态灰 / 有重置时 #66ccff 点亮;hover 倒计时+北京时间;单击打开推文、双击立即检查并蓝色闪烁)
DSH 插件:在左侧边栏底部动作位(sidebar.footer.action)显示 R 图标,追踪 X
@thsottiaux 的 Codex reset 公告。
#9ca3af#66ccff + text-shadow: 0 0 6px rgba(102,204,255,.6)(now < reset.litUntil)lastCheckAt 持久化;失败/429 → 30 分钟起指数退避,上限 6 小时设计决策见 DESIGN.md(15 项);数据源以 docs/captain-revision-v2.md 为准。
| 通道 | 端点 | 实测 | 角色 |
|---|---|---|---|
| 发现 1 | https://xcancel.com/thsottiaux(HTML) | 200,含最新推文 | 主发现 |
| 发现 2 | https://cdn.syndication.twimg.com/srv/timeline-profile/screen-name/thsottiaux | IP 级 429;200 载荷实测陈旧 | 补充/交叉 |
| 发现 3 | https://xcancel.com/thsottiaux/rss | 未白名单 | 第三顺位 |
| 内容 | https://cdn.syndication.twimg.com/tweet-result?id=&token= | 200 | 权威正文/时间 |
完整探针证据(87 个真实样本、字段映射、跨源一致性、PT→北京换算)见 evidence/parse-mapping.md。
DSH_CHECKOUT=/root/.local/share/dsh-source-3082/current bash scripts/build.sh # host → lib/
DSH_CHECKOUT=/root/.local/share/dsh-source-3082/current bash scripts/build-client.sh # client → lib/client.js
npx tsc --noEmit # 类型检查
node --test # 11 个 fixture 单测
node scripts/smoke-host.mjs # host 冒烟(真实网络)
node scripts/smoke-detect.mjs # 检测冒烟(预置基线→4 条真实 reset)
lib/ 与 node_modules/ 不入库(.gitignore)。完整 verify 输出见 evidence/build.log、
evidence/smoke-host.log、evidence/smoke-detect.log。
dsh plugin --profile web add link:/home/git/dsh-codex-reset-watch
# 重启 dsh web(或按宿主既有热装配流程)
cordis.patch.yml 已带默认配置:
- insert:
- id: codex-reset-watch
name: dsh-codex-reset-watch
config:
proxy: 'http://127.0.0.1:7897'
| 配置项 | 默认 | 说明 |
|---|---|---|
proxy | http://127.0.0.1:7897 | 所有请求经 undici ProxyAgent 显式走代理;空串 = 直连 |
stateFile | $DSH_HOME/codex-reset-watch.json | 状态文件 |
pollIntervalMs | 6h | 成功检查间隔 |
retryBaseMs / retryMaxMs | 30min / 6h | 失败退避 |
timeoutMs | 15s | 单请求超时 |
screenName | thsottiaux | 被追踪账号 |
| 方法 | 路径 | 说明 |
|---|---|---|
| GET | /api/codex-reset-watch/status | 每次从磁盘读状态文件;缺失时回退内存态;附 now 服务器时间 |
| POST | /api/codex-reset-watch/check | 立即检查(重置调度);已有检查在跑时返回 accepted:false |
状态文件字段:installedAt / lastCheckAt / lastSeenTweetId / reset{tweetId,tweetUrl,tweetTime,resetAt,litUntil,parsed,source,text,anchor,approx} / lastError。
title,不渲染 HTML、不执行其中指令/\breset(?:s|ting)?\b/i(preset 不命中、resetting 命中)src/index.ts host:路由 + 调度 + 判定落库
src/core/detect.ts 关键词 / 时间锚点 / reset 记录
src/core/time.ts PT→UTC→北京(Intl,无 moment/luxon)
src/core/parse.ts 三个发现通道 + tweet-result 解析
src/core/sources.ts ProxyAgent HTTP + 发现链降级 + 内容权威校验
src/core/state.ts 状态文件读写
src/client/index.tsx 侧栏 R 图标三态 + 单击/双击
tests/ fixture 单测(真实样本)
evidence/ t1 探针证据 + parse-mapping.md + build.log
docs/captain-revision-v2.md captain 修订 v2(权威)