dsh-coding-time
IdentifiedLocal coding-activity timing per project with wall-clock interval unions, AI added/deleted lines from real diff metadata, per-file time shares, a settings dashboard and CSV export.
dsh-coding-time
Local coding-activity timing for the DeepSeek Harness (DSH). It measures
wall-clock active time per project (cwd), counts added/deleted lines from real
diff metadata, and can optionally time human edits. All data stays on this
machine under ~/.dsh — no account, no network service, no telemetry.

Dark theme

The session header shows today's AI active time at a glance and opens a compact summary popover.

What it does
- Active time by project. Records wall-clock intervals of AI activity (tool calls and assistant events), grouped by working directory. Overlapping intervals are merged into a union, so the total is never a simple sum.
- Real line accounting. Added and deleted lines come only from explicit diff metadata returned by tools. Missing metadata stays unknown — it is never filled in as zero.
- Optional human timing. Off by default. It becomes available only when an editor integration supplies explicit real-input evidence.
- Time by file. Active intervals are apportioned across the files they touch and shown as a donut chart, with a per-file share breakdown.
- Project ranking. Projects are listed by union active time with a duration bar and a percentage of the leading project.
- Daily activity. A bar chart of AI (and, when connected, human) time per day.
- Recent activity and file changes. A short timeline of recent events, plus a read-only snapshot of the current Git working tree per project.
- Settings. Heartbeat, idle and flush intervals, collection switches, the local storage directory and storage statistics — all editable in the Host's settings page when a writable config namespace is available.
- CSV export. Download the summary as CSV; unknown values stay distinct from zero.
How it stays local
The Web dashboard mounts onto the Harness's existing webServer — the plugin
adds no HTTP listener of its own. It reads from same-origin local routes and
writes JSONL under <storageDirectory>/<profile>/. There is no third-party
API call, no outbound statistics, and no credentials stored or read by the UI.
Runtime code uses only Node built-ins; the settings form uses the Host-provided
@deepseek-ai/schemastery peer dependency to build its config schema.
Uncollected or not-connected values are shown as such (for example "not
collected" or "not connected"), never as a fabricated 0.
Install
From npm:
npm install dsh-coding-time@0.1.0
dsh plugin --profile web add dsh-coding-time
Or straight from the GitHub repository:
dsh plugin --profile web add 'https://github.com/Dclef/dsh-coding-time'
Requires Node >=22.14.0 and a running Harness with the dsh CLI on PATH.
See docs/INSTALL.md for details.
Configuration (defaults)
| Field | Default |
|---|---|
enabled | true |
heartbeatIntervalSeconds | 60 |
idleThresholdSeconds | 180 |
flushIntervalSeconds | 10 |
trackAgentActivity | true |
trackAiLines | true |
humanTracking.enabled | false |
storageDirectory | ~/.dsh/coding-time |
timezone | local IANA zone |
weekStartsOn | 1 (Monday) |
exclude | common build, VCS and secret paths |
idleThresholdSeconds must be at least heartbeatIntervalSeconds. Unknown
fields, credential fields, invalid numbers, invalid timezones and non-absolute
directories are rejected rather than silently clamped.
Development
npm test # full test suite
npm run check # syntax-check every .js source file
node --test test/summary-contract.test.mjs # real apply + /summary HTTP contract
npm pack --dry-run # offline packaging check
Status
Experimental, local-only, published as source for review and self-hosting. Settings are editable only when the Host exposes this plugin's own writable Config namespace; otherwise the client shows an explicit read-only state and sends zero save requests. Automated tests passing is not a claim of manual browser acceptance.
License
MIT — see LICENSE.
Chinese documentation: README.zh.md.
Comments
Loading…
Similar plugins
by titanwings
DSH 自动化插件:让 Coding 任务按计划在全新 Agent Session 中运行,并由用户或 Agent 创建和管理定时任务。 / Run coding tasks in fresh Agent sessions and manage schedules from DSH Web or an Agent.
★ 101
MIT
TypeScript
Sep 8, 2026
dsh plugin --profile web add @dsh-external/dsh-automationby zjukop
Creates local, content-addressed workspace checkpoints with diff previews and two-phase restore confirmation.
★ 0
MIT
TypeScript
Aug 15, 2026
dsh plugin --profile web add dsh-time-machineby JularDepick
A dsh plugin: after a timeout, the time distribution from the previous iteration is fed to the model, enabling the model to autonomously identify and adjust its behavior; if the introspection cost bec
★ 0
Apache-2.0
TypeScript
Nov 6, 2026
dsh plugin --profile web add dsh-time-introspect本地 AI agent 请求日志面板
★ 0
MIT
JavaScript
dsh plugin --profile web add @yxzpro/agent-actaby Guyao146
DSH 活动统计:彩色时间线看什么时候在干活/改代码,每日 token 消耗按项目/日期/小时查看。
★ 5
LGPL-2.1
JavaScript
Oct 5, 2026
dsh plugin --profile web add dsh-activity-trackerby usersx
Schedules workspace Agent runs in fresh Result Sessions with persistent audit history, using a stock DSH Conversation tab or a global Shell page when its slots are available.
★ 0
MIT
JavaScript
Sep 6, 2026
dsh plugin --profile web add dsh-automation-center