dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
🌊 Agent-native time-series streaming for DeepSeek Harness (DSH plugin) — terminal/serial byte streams → indexed, queryable, event-driven timeline. 19 tools · 9 operators · 🧪 experimental
Agent 原生时序流式分析 —— DeepSeek Harness(DSH)插件
把终端 / 串口字节流,变成可索引、可回查、事件驱动的时序数据流
⚠️ 实验性项目:当前处于早期开发阶段,尚不稳定,接口与行为可能随版本变动;建议仅用于学习、研究与实验环境。本项目会持续维护与更新,欢迎反馈与贡献。
tsstream 是一个可安装的 DSH 插件(TypeScript 包 @tsstream/core),让 DeepSeek Harness 的 Agent 能以时序的方式处理持续输出的字节流——终端日志、串口数据等。
Agent 处理长日志的传统做法是「整段灌进上下文再 grep」,又贵又慢。tsstream 改为 事件钩子唤醒 + 有界窗口回查 + 降采样,让 Agent 只读它真正需要的那几行。
error / warning / idle 等事件;1 秒轮询器只查新事件索引(极低开销),仅有事件时才唤醒 Agent——对 Agent 而言就是事件触发,无需自己轮询。stream_info)。dsh plugin --profile <name> add file:./packages/core # 安装为依赖
# 在 profile 的 cordis.patch.yml 追加:
# - insert:
# - id: tsstream
# name: '@tsstream/core'
# config: {} # 默认:数据缓冲/结果落在 <workspace>/.tsstream(沙箱内,自动创建)
dsh --profile <name> --dump-config # 验证 compose
环境要求:Node.js ≥ 22。唯一运行时依赖为
zod;serialport/node-pty为可选原生依赖,未安装不影响终端与模拟场景。
🛡️ 安全模型(兼容 DSH 沙箱 + 审批栈):① 串口注册
stream_profile_create与批处理batch_submit属「能力授予」,执行前走ctx.approval(无审批服务则 fail-closed 拒绝);② 管线算子为声明式、固定 9 类、无 IO,只能变换管线、无法逃逸;③ 中台的数据缓冲与结果一律落在沙箱工作区<workspaceRoot>/.tsstream隐藏目录树内,不越workspace-write边界。
# 端到端 Demo:采集 → 行分割 → CSV 解析 → 字段提取 → 阈值索引
node examples/demo.ts
# 终端场景 Demo:长构建日志中定位报错 + 读上下文(对比上下文注入体积)
node examples/demo-terminal.ts
# 运行测试
node --test packages/core/test/*.test.ts
stream_list / stream_info / stream_read / stream_recent / stream_events / stream_context / stream_lineagestream_write(发送输入,TX 记入时间线)· stream_close(关闭流并终止进程)stream_wait(阻塞等待新事件,事件触发唤醒)· stream_watch(静默时植入 idle 事件)stream_ports(只读扫描)· stream_profiles / stream_profile_get(列出/读取授权 profile)· stream_profile_create(显式授权,走审批)· stream_open(仅凭已授权 profile id 打开)plugin_deploy / plugin_list / plugin_status / plugin_removebatch_submit(走审批) / batch_statuscache_protect / cache_list_protectedline-split · csv-parse · field-extract · fixed-split · unit-convert · regex-index · threshold-index · keyword-index · idle-index