deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:dingyi222666/dsh-wakatime
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
WakaTime plugin for DeepSeek Harness (dsh) — track your AI coding activity, lines of code, and time spent. Adapted from opencode-wakatime to dsh's plugin model.
# Install from npm (requires dsh >= 0.1.0-rc.7)
dsh plugin --profile web add @dingyi222666/dsh-wakatime
# Restart dsh web for it to take effect
dsh web
The plugin works in any profile that runs the agent loop — web, headless, tui, … — install it into each profile you use:
dsh plugin --profile headless add @dingyi222666/dsh-wakatime
git clone https://github.com/dingyi222666/dsh-wakatime
cd dsh-wakatime
pnpm install && pnpm run build
dsh plugin --profile web add .
dsh web
Notes:
dsh plugin behaves like adding a dependency to your profile. A bundle plugin is loaded once its full package name appears in the profile's dsh.profile.bundles list (added automatically); the bundle patch (cordis.patch.yml) applies on the next boot.node --import tsx/esm apps/cli/src/bin.ts plugin --profile web add @dingyi222666/dsh-wakatime).The plugin works out of the box. To override behavior, add a row with the
same id (wakatime) in your profile's user patch layer
($DSH_HOME/profiles/<name>/cordis.patch.yml) or via --patch:
- id: wakatime
config:
heartbeatIntervalMs: 120000 # rate limit per project (default 60000)
debug: true # force DEBUG logging (default: ~/.wakatime.cfg debug=true)
client: web # client qualifier in the --plugin string (default "dsh")
timeoutMs: 45000 # heartbeat CLI timeout (default 30000)
All fields are optional and validated by a schemastery schema at load.
wakatime-cli automatically, or uses a global install (brew install wakatime-cli)edit, write, read, and str_replace_editor (view/create/str_replace/insert)--ai-line-changes for WakaTime's AI coding analytics, computed exactly from the fs tools' diff hunks (context lines excluded)dsh --profile headless runs still report their activitywakatime-cli invocation via --extra-heartbeats@deepseek-ai/* peers the host already providesEnsure you have a WakaTime API key configured in ~/.wakatime.cfg
(or $WAKATIME_HOME/.wakatime.cfg when WAKATIME_HOME is set):
[settings]
api_key = waka_your_api_key_here
Get your API key from WakaTime Settings.
The plugin downloads wakatime-cli automatically when missing. To install it yourself:
brew install wakatime-cli
or download from WakaTime releases.
The plugin subscribes to dsh's session event firehose (session/event):
flowchart TB
subgraph dsh["DeepSeek Harness"]
A[Agent Loop] --> B[tool/call + tool/result events]
C[Chat Activity<br/>user/message, assistant/message] --> D[Session Events<br/>turn/end, session/disposed]
end
subgraph Plugin["dsh-wakatime"]
B --> E[Join callId: extract file<br/>path + line changes from<br/>args and fs diff meta]
E --> F[Per-project pending<br/>changes]
C --> G[Rate-limited<br/>heartbeat batch]
D --> H[Final force flush]
F --> G
G --> I[wakatime-cli<br/>--ai-line-changes<br/>--extra-heartbeats]
H --> I
end
tool/call records the tool name and parsed arguments by callId; tool/result
matches it back and reads the fs tools' private meta diff hunks for exact
per-hunk line counts (edit, write), or derives them from the arguments
(write content, str_replace_editor strings).~/.wakatime/dsh-wakatime/), on chat activity, turn boundaries, session
disposal, and plugin teardown.--plugin tag reports Deepseek Harness[-<client>]/<dsh version> dsh-wakatime/<version>.pnpm install
pnpm run typecheck # tsc --noEmit
pnpm run build # declarations into lib/types + tsdown bundle lib/index.js
pnpm test # vitest: changes, state, heartbeat, plugin wiring
Layout:
src/index.ts — plugin entry (name / Config / apply) and event wiringsrc/config.ts — schemastery Config schema, defaults, --plugin tagsrc/changes.ts — tool events → file changes, diff line countingsrc/state.ts — per-project rate limitingsrc/heartbeat.ts — wakatime-cli invocation, batching, flushingsrc/cli.ts — wakatime-cli discovery/download/updatesrc/paths.ts, src/logger.ts — WakaTime paths and file loggingtests/ — unit tests plus an integration test that drives the plugin over a
real cordis Contextfile_path arguments; paths the sandbox resolves differently
may land as project-relative entities.bash commands are not attributed to files (they can touch anything).--plugin tag is unknown when the
@deepseek-ai/dsh package cannot be resolved from the plugin's location
(e.g. an npm install without the dev dependency present).MIT — ported logic from opencode-wakatime (MIT).
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。