DeepSeek Harness 插件

po-et/dsh-har-triage

Star 数 ★ 0 分类 工具与能力 收录于 2026-10-17

离线分析 HAR,以端点别名、原始条目索引和最小 HTML/JSON 证据定位请求问题;不录制或重放请求。

安装

# Release 预构建包

dsh plugin --profile web add -w "https://github.com/po-et/dsh-har-triage/releases/download/v0.1.3/dsh-har-triage-0.1.3.tgz"

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:po-et/dsh-har-triage

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

该插件的 README 只有英文版本。

Offline network evidence for DeepSeek Harness. Find failed and slow browser requests without handing the agent your URLs, cookies or response bodies.

浏览器网络排障插件:读取本地 HAR,生成可回查原始请求索引的离线诊断报告。默认不把网址、请求头、Cookie、参数值或正文带进报告和 AI 工具结果。

Synthetic HAR diagnosis: signals, source indexes and timing evidence

The screenshot uses the bundled synthetic scenario, not real browser traffic.

What it does

  • Reads an existing HAR 1.2 capture; never records traffic, sends requests, or changes the capture.
  • Groups requests into endpoint aliases, highlights HTTP 4xx/5xx, unavailable responses, slow requests and long waiting phases.
  • Produces a self-contained HTML report: signals → request row → measured timing phases. Filters, pagination and source locators work offline.
  • Returns at most 20 evidence entries to the agent, with a count of omitted evidence. The full numeric projection stays in the local JSON/HTML files.

Request #43 corresponds to log.entries[42] in your original HAR. Endpoint aliases deliberately do not reveal names. Keep the original capture private and use its index to look up the actual request locally.

Install in Harness

Node 24.9+ is required. Install the prebuilt bundle into your chosen profile:

dsh plugin --profile YOUR_PROFILE add https://github.com/po-et/dsh-har-triage/releases/download/v0.1.3/dsh-har-triage-0.1.3.tgz
dsh --profile YOUR_PROFILE --dump-config

Version 0.1.3 adds Harness 0.2.2-rc.5 and its Cordis 4.1.x dependency to the explicit peer ranges. The previous v0.1.2 bundle is rejected by rc.5's plugin manager. CI and release acceptance cover 0.2.1-rc.4, 0.2.2-alpha.2 and 0.2.2-rc.5. Older 0.2.0-rc.2, 0.2.1-alpha.2, 0.2.1-rc.2 and 0.2.1-rc.3 peers remain accepted based on earlier release tests; they are not in the current CI matrix. Later previews require separate validation.

The configuration should contain the har-triage row. A configuration dump alone does not establish runtime compatibility. Start that profile, put your HAR inside its session workspace, and ask:

Inspect capture.har with har_triage. Save reports in a new har-review directory. Explain the measured evidence and cite the original HAR entry indexes. Do not guess root causes.

Tool arguments:

{"input":"capture.har","outputDir":"har-review","slowMs":2000}

The tool uses Harness filesystem and sandbox services. It requires write permission to create the reports and refuses input/output paths outside the session workspace. Existing report files are never overwritten. Uninstall with dsh plugin --profile YOUR_PROFILE remove dsh-har-triage.

Try without Harness

The CLI and analysis/report modules use Node built-ins only. From a source checkout:

node src/cli.js capture.har --out new-report-directory --slow-ms 2000

Open new-report-directory/report.html. The output directory must not exist. The original capture is unchanged.

For a reproducible synthetic example:

npm run demo

This creates a new directory under artifacts/ with a deliberately synthetic capture and its report. It is not evidence of real browser traffic or real users.

Evidence, not root-cause claims

503 means the capture records a server-error response. status: 0 means it did not record a valid HTTP response. Neither identifies a failing service, proves CORS, or proves an expired token. A high wait/TTFB share is an observation, not proof that the backend or database is slow.

Start offsets include submillisecond differences and are expressed in relative milliseconds. Absolute source timestamps are never included in the report.

Unknown phase timings and byte sizes remain -1, displayed as “Unknown.” TLS is part of the HAR connection timing and is not added a second time. Contradictory phase durations are flagged; the report hides misleading proportions.

Ollama's application/x-ndjson streaming responses are classified as JSON. This is a MIME-based content category, not validation of the response body; model output remains excluded from reports.

What is retained and removed

Retained: source entry index, sequential endpoint alias, controlled method/status/content classes, relative offsets, numeric durations/sizes, and fixed diagnostic codes. Aliases group the same method/origin/path within one capture; query strings and fragments do not affect grouping.

HTTP method identity is case-sensitive: GET and get receive separate aliases. Only the allowlisted uppercase methods receive named display values; all other method tokens appear as OTHER. Private method tokens are used only for grouping and are not included in reports, tool evidence or report ID hashes.

Removed: complete URLs including origins and paths, query values, headers, cookies, request/response bodies, page titles, initiator data, IP addresses, absolute timestamps, extension fields, raw error text, and the original file digest. The report ID hashes only the retained projection. Arbitrary source strings are not copied to reports or tool evidence.

This is a minimal diagnostic projection, not a scrubbed HAR, an anonymization guarantee, or a replacement for reviewing an artifact before sharing it. Status patterns, sizes, timing, request counts and grouping can still identify an application. See SECURITY.md.

Limits

  • HAR JSON only: version 1.2, UTF-8, at most 16 MiB and 10,000 entries. Invalid supported entries fail with fixed errors rather than silently truncating the evidence.
  • HTTP and HTTPS requests are analyzed. Other protocols are excluded and counted. Missing timing/size values are retained as unknown; a valid request URL, start timestamp, duration, status and response content object are required.
  • Synchronous bounded analysis: cancellation is checked before parsing and between entries, not an interruptible worker. The slow threshold defaults to 2,000 ms and is configurable per call.
  • Reports are created exclusively. If HTML creation fails after JSON creation, the JSON is retained and the tool reports the partial result; retry using a fresh destination.
  • No upload, traffic replay, header inspection, body analysis, automatic source lookup, or edits to the original HAR.

Development and validation

npm ci --ignore-scripts
npm test
npm run smoke:host
npm run smoke:profile -- /absolute/path/to/node_modules/@deepseek-ai/dsh
npm pack --dry-run

The 60 tests cover actual CLI subprocesses, controlled output and failure text, input limits, phases, original-file preservation, and real Cordis tool dispatch/filesystem/sandbox/Loader integration. CI runs them on Node 24 and 26. smoke:host uses a real service composition; smoke:profile requires pnpm on PATH, packs this checkout, installs its tarball with the specified Harness CLI into a fresh temporary Profile, boots it with runProfile, and dispatches har_triage. Pass an existing tarball as a second argument to verify it instead of packing the checkout; its version must match this checkout. Test files and Profiles are retained under the OS temporary directory for inspection.

Profile acceptance checks that source bytes remain unchanged, output omits a synthetic secret canary, and overwrite and workspace-escape attempts are refused. The 0.2.2 hosts use the batch tool-execution API. HMR is disabled only in the temporary Profiles. CI and the release workflow run these checks on the three versions listed above. No LLM or real credentials are used. These synthetic checks establish the tested runtime behavior; they are not evidence of real-user usefulness.

Browser checks covered status filtering, signal-to-request navigation, correct source locators, no console errors, and a 390-pixel layout without page-level overflow. The demo and regression captures are synthetic; real-user usefulness is not yet validated.

Related tools

net-debug is an existing Harness HTTP client with history, replay and HAR export. harlite already offers extensive HAR analysis, SQL, waterfall and HTML reporting. This plugin does not replace those tools: its narrower purpose is a Harness-native, no-external-binary, allowlisted evidence path for agent-assisted debugging.

MIT licensed.

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。