anyuer678/dsh-logtimeline0

dsh-logtimeline

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

AI Analysis

核心用途是让 Agent 能够理解如“昨天下午”等中文口语化时间,并精准检索和统计本地日志。适合需要进行日志分析和运维排障的用户。需要 Python 3.9+。

Package
dsh-logtimeline
Version
0.1.0
License
NOASSERTION
Last updated
Aug 17, 2026

Install

$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.