anyuer678/dsh-logtimeline0

dsh-logtimeline

Query local log files with Chinese natural-language time expressions — LogTimeline for DeepSeek Harness.

包名
dsh-logtimeline
版本
0.1.0
许可证
NOASSERTION
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:anyuer678/dsh-logtimeline

Usage

Tell the agent to use the tool — no special syntax needed:

用 log_query 查一下 demo.log 里 2026-07-03 的 ERROR 情况

// log_query(time_text: "2026-07-03", files: ["demo.log"])
{
  "time_range": { "start": "2026-07-03 00:00:00", "end": "2026-07-04 00:00:00", "confidence": 1.0 },
  "filter": {
    "total_matched": 25,
    "stats": { "errors": 13, "warns": 5, "infos": 7, "debugs": 0 },
    "lines": [ /* up to max_lines rows: {lineno, timestamp, raw} */ ]
  }
}

Parameters

ParameterTypeDescription
time_textstring (required)Chinese natural-language time, e.g. 「昨天下午」「3小时前」
filesstring[]Log file paths (absolute or workspace-relative)
dirstringDirectory to scan recursively
patternstringGlob when dir is set (default *.log)
max_linesnumberMax lines returned (default 500; 0 = stats only; capped at 5000)
sincestringRFC3339 absolute-time fallback when time_text fails to parse
timezonestringIANA timezone name, e.g. Asia/Shanghai

The tool runs in offline mode by default: it filters precisely (its unique value), and leaves root-cause reasoning to the agent itself.