← 返回列表
未验证
为外部子代理调用补上会话归因与指针记录
尚未跑自动兼容性验证,可查看页面内的依赖与入口分析。 · 最近上游提交 2026/8/15 · 已提供中文文档
综合分
27.5
GitHub 分
27.5
用户评分
—
★ Stars
1
周下载量
—
兼容 / 相关生态插件(非 dsh 原生,请按其对应运行时安装)
git clone https://github.com/jeremy9682/dsh-observability.git数据截至 2026/9/16(元数据每日更新 · 实装验证按队列轮转,单条结论的验证时间见上方)
依赖的 DSH / Cordis 模块
@deepseek-ai/cordis@deepseek-ai/schemastery用户评分
还没有人投票,来当第一个
订阅周报,不错过优质插件更新
每周一封 · 高评分插件 + 新用户活动
README
dsh-observability
两个小插件,补上 DeepSeek Harness 在「外部 subagent 运行」上的可观测性缺口。背景与上游提案:discussion #1493。
包
| 路径 | 包名 | 作用 |
|---|---|---|
| (根目录) | dsh-codex-observability | 在被跟踪的工具调用前后对产品会话根目录(~/.codex/sessions、~/.cursor/chats 等)做指纹比对,并把归因信封(sessionRef、sessionStatus)写入 journal 文件。只写指针——从不记录提示词或对话内容。 |
| plugin-cursor/ | dsh-tool-cursor | 一个 cursor_delegate 工具,把任务委派给官方 cursor-agent CLI(headless),移植自 opencodex 的 cursor.ts 参考实现。默认只读;edit 只提议、不落盘。 |
两个包都在真实组合中 boot 测试过(隔离 DSH_HOME、headless、--patch、dsh 0.1.0-rc.6)。证据:
{"kind":"subagent-attribution","runId":"c091edac-…","provider":"bash","callId":"call_00_…",
"error":"none","sessionRef":"/tmp/obs-test-root/new-artifact.jsonl",
"sessionStatus":"attributed-single-artifact"}
{"kind":"subagent-attribution","runId":"55f45e12-…","provider":"read","callId":"call_00_…",
"error":"none","sessionRef":null,"sessionStatus":"not-observed"}
安装
从 git 安装(构建走包内 prepare 脚本;pnpm >= 10 首次会要求 allowBuilds,
把打印的键拷进 profile 的 pnpm-workspace.yaml 后重跑即可)
dsh plugin --profile web add github:jeremy9682/dsh-observability
或从本地 checkout 安装
dsh plugin --profile web add ~/Projects/dsh-observability
cursor 工具:本地 checkout 形式(仓库根目录是 observability 包)
dsh plugin --profile web add ~/Projects/dsh-observability/plugin-cursor
要求 dsh 0.1.0-rc.6 与 Node ^22.19 || >=24。
配置(以下为默认值):
- id: codex-observability
name: dsh-codex-observability
config:
enabled: true
roots: ['~/.codex/sessions', '~/.cursor/chats']
tools: [subagent_codex, subagent_claude_code]
journal: '~/.dsh/storages/codex-observability.jsonl'
- id: tool-cursor
name: dsh-tool-cursor
config:
timeoutSeconds: 600
defaultMode: ask
独立工具(无需 DSH)
bin/dsh-run-attributed.mjs 用同样的指纹 + 信封 + 三级超时(首事件 / 空闲 / 总时长)包装任意 CLI:
node bin/dsh-run-attributed.mjs --provider codex --seat codex-landing \
--root ~/.codex/sessions --first-event 60 --idle 240 --total 300 \
-- codex exec --json ""
已知的上游阻塞
「会话日志内的持久指针」(替代文件 journal)依赖 #1493 中提出的两个上游事项:下游事件类型的注册面,以及 append 时的 ignorable 控制。目前 Session.append() 两者都不提供;KNOWN_SESSION_EVENT_TYPES 天然排除仓外插件事件。在此之前,文件 journal 是可行的过渡方案。
License
MIT。同作者(jeremy9682)的其他插件
扫码进群