Skip to content

feat(adapter): add DeepSeek Harness (dsh) usage support #1647

Closed

Description

@oksure

Summary

Please add a first-class usage adapter for DeepSeek Harness (dsh).

Current behavior

I tested ccusage 20.0.20. It supports several coding-agent sources, but there is no dsh subcommand or DSH source in the unified report. ccusage dsh ... returns Unknown command 'dsh'.

Data source

DSH persists sessions as zstd-compressed JSONL under:

$DSH_HOME/sessions/<encoded-cwd>/<session-id>/session.jsonl.zstd

The default home is ~/.dsh. The session records include provider/model metadata and standard usage fields, for example (sanitized):

{
  "type": "assistant/message",
  "data": {
    "usage": {
      "inputTokens": 1234,
      "cacheReadTokens": 5678,
      "outputTokens": 90
    },
    "message": {
      "source": {
        "provider": "together",
        "model": "deepseek-ai/DeepSeek-V4-Flash-0731"
      }
    }
  }
}

Proposed scope

  • Discover $DSH_HOME, falling back to ~/.dsh
  • Read zstd-compressed session JSONL
  • Support daily, monthly, session, and unified reports
  • Include provider/model breakdowns and configurable path discovery
  • Preserve the existing pricing override mechanism

Accounting detail

DSH can persist streaming assistant/chunk usage and a finalized assistant/message usage record for the same turn/step. The adapter should deduplicate or prefer the finalized record so streaming updates are not double-counted.

I can provide a sanitized fixture if useful. No prompts, credentials, or private session content are required for the adapter test fixture.

Activity

  1. pullfrog commented on Aug 27, 2026

    @pullfrog
    Contributor
  2. github-actions commented on Aug 27, 2026

    @github-actions
    Contributor

    This issue was auto-closed. Issues from new contributors are auto-closed by default.

    Maintainers review auto-closed issues and reopen worthwhile ones. Issues that do not meet the quality bar in CONTRIBUTING.md may not be reopened or receive a reply.

    Keep the issue short, concrete, and written in your own voice.

    If a maintainer replies lgtmi, your future issues will stay open. If a maintainer replies lgtm, your future issues and PRs will stay open.

    See CONTRIBUTING.md.

  3. oksure commented on Aug 27, 2026

    @oksure
    Author

    I prepared a focused implementation on my fork:
    https://github.com/oksure/ccusage/tree/contrib/dsh-usage-adapter

    It adds DSH raw and concatenated zstd session-log discovery, one usage row per turn and step with finalized-message replacement, provider/model attribution, pricing lookup, focused dsh reports, unified-report wiring, config schema support, docs, and fixture tests.

    The Rust workspace formatter, clippy, and tests pass locally. If this direction is useful, please reply lgtm so I can open the PR under the contributor gate.

  4. ryoppippi commented on Aug 31, 2026

    @ryoppippi
    Member

    Historical audit: this discussion was auto-closed by the legacy contributor gate. That closure did not assess technical importance.

    Audit result: excluded from the current maintenance scope. This request depends on an unsupported external source, unavailable schema or fixture, platform or release infrastructure the project cannot reliably maintain, an operational service, or an unsafe or underspecified design. It is not a candidate for automatic reopening or implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    triage:excludedExcluded from the current maintenance scope.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions