dsh-session-log-upload: Resubmit session logs from unofficial channels to DeepSeek

Introduction

DSH’s built-in plugin @deepseek-ai/dsh-session-log-deepseek only handles sessions that go through the official adapter. If your model channel is ollama-local, pi-ai, or any OpenAI-compatible endpoint, the logs for these sessions will never be uploaded, and the official collection endpoint is missing this data.

dsh-session-log-upload is meant to fill this gap. It is a third-party project, maintained by 3418244301q-star, and uses the MIT license. It shares the same watermark (watermark) with the built-in plugin, so the two paths coexist without duplication.

What is this

One sentence: It takes the standardized session logs generated by sessions driven by non-official channels, uses your configured DeepSeek API credentials, and sends them to api.deepseek.com as the top-level field dsh_session_log of a minimal chat request.

The content uploaded with the logs includes your questions, model responses, tool calls and returns, timestamps, and session identifiers. Sessions via official channels are not uploaded by this plugin; that part is still handled by the built-in plugin.

It deliberately chose the same watermark writing style as the built-in plugin, session-log-deepseek/delivery-accepted, to fold both paths into the same watermark. Whoever sends first advances it, and the other side naturally skips. The trade-off is: for the segment belonging to the official window, only the built-in plugin can advance the watermark; this plugin cannot.

Core Capabilities

It only processes sessions where a non-official provider appeared within the pending transmission interval. The criterion is data.header.config.provider from the request/header event. Sessions that are entirely deepseek-official are handed over to the built-in plugin.

The upload method is not a direct connection to the OTLP collection endpoint, but rather piggybacks on a minimal chat request. It carries the same dsh_session_log field that the server already recognizes, so the server does not need new parsing logic. This is the main trade-off with the similar plugin yihefeikong-rgb/dsh-session-log-universal: the latter does a full retransmission and tracks a watermark separately, aiming for coverage; this plugin pursues zero duplication.

There are three trigger modes to choose from: manual for manual only, deferred for cleanup and idle, and realtime for every round in real-time. The default deferred is to avoid turning every turn into an HTTP request. The deferred mode starts an idleDelayMs timer after turn/end, resetting if new events occur during that period.

The failure handling follows an “at least once” semantic: on failure, the watermark is not advanced, and it will retry. If a segment exceeds the limit, it only warns once, and the watermark does not advance. After a global rate limit is exceeded, requests are queued rather than discarded.

Configuration

Default values are provided in cordis.patch.yml. enabled defaults to false; when off, there is zero network activity.

Key Default Description
enabled false Turn off to zero network activity
mode deferred manual / deferred / realtime
apiKeyRef DEEPSEEK_API_KEY Accessed via ctx.credentials; falls back to the same-named environment variable if unavailable
model deepseek-flash The official model used to carry the request
maxBytes 8388608 Per-segment limit, consistent with the built-in plugin
idleDelayMs 600000 Idle detection for deferred mode
includeSeeded false Whether to also upload seeded sub-sessions (only after inherited segments)
budget.maxRequestsPerHour 60 Global rate limiting; excess is queued instead of discarded
retry.maxAttempts / baseDelayMs 3 / 2000 Exponential backoff retry

Installation

The README does not provide a hardcoded installation command; it only states that it is a Host plugin, requiring dsh’s plugin management capability or plugin_manager, and is installed into a specific profile. The bundle manifest is in cordis.patch.yml, with a default enabled: false.

Therefore, the installation method depends on your host version and plugin management method. If you get the package from a Release, each tag’s Release attaches dsh-session-log-upload-X.Y.Z.tgz (an npm pack artifact), which can be directly pnpm add <file> for offline installation. Next to it is SHA256SUMS-X.Y.Z.txt for verifying bytes.

After installation, it also comes with a client injection part, depending on dsh-client-locale and dsh-client-ui-settings. If the host is missing these two packages, the settings row will not appear, and no error will be reported.

Version requirements: DSH core dsh.engines.dsh: ">=0.2.1-rc.3", tested locally on 0.2.1-rc.5; @deepseek-ai/schemastery requires ^3.18.4 as it uses .volatile(), and older versions will report ...volatile is not a function.

There is a semver blind spot worth noting: engines.dsh is written as >=0.2.1-rc.3, and node-semver only allows pre-release versions if there is a pre-release comparator on the same tuple within the range. 0.2.2-rc.1 will therefore be excluded. Being excluded is not an error, but a silent disappearance from the market’s compatibility filtering. The maintenance action is to change the engines to a form that covers that tuple every time DSH enters a new pre-release minor, for example:

"engines": { "dsh": ">=0.2.1-rc.3 <0.2.2-0 || >=0.2.2-rc.1" }

Typical Usage

The enable entry is in “Settings → General”. A new row with order 91 is added below the official row “Upload Session Log when using official model API” (order 90): the left side has a title and description, and the right side has a mode dropdown and a toggle. enabled and mode are both volatile; they take effect immediately after selection without a restart.

Enabling requires a prerequisite check and a risk confirmation:

  1. When clicking the toggle, check once if a valid API key is available; if not, cancel enabling and leave a reminder in the row “No valid API key detected” (with “Re-detect”).
  2. When a key is present, pop up the official confirmation box (the same component as “Settings → Permissions” switching to “Full Permissions”). It will explain where the logs go, that no data is masked, automatic triggering, and compliance responsibilities. You can only click “Enable Upload” after checking “I have understood the risks and am willing to continue”. Disabling does not require confirmation.

Operations for certain modes:

  • There is an “Upload Now” button below the left text area. It is only available when the mode is “Manual Only”; other modes are grayed out with a reason hint. After clicking, it sequentially checks if the plugin is off / there is a task running / 30-second cooldown / already up-to-date / no key configured / N sessions uploaded, and displays the result as an inline text that disappears automatically after 6 seconds.
  • The manual mode does not register timers or listen to turn/end, resulting in zero network activity; starting a scan only logs.
  • The realtime mode enqueues on every turn/end, merging duplicate entries for the same session.

After startup, scan for active sessions every 5 seconds to catch up on any missed cleanup due to crashes or force-kill. When uninstalling, clear the queue and all timers.

Applicable Scenarios and Notes

Suitable for developers who are already using non-official model channels, want these session logs to enter the DeepSeek collection endpoint, and do not want duplicate reporting with the built-in plugin.

Regarding risks, please read each item clearly:

  • Disabled by default; network activity only occurs after enabling. The plugin constructs and triggers requests in an automated manner, which may be recognized by official or third-party services as automated requests, posing risks of account restrictions or Terms of Service violations.
  • It does not provide data masking, compliance review, data authorization management, or content filtering. Whether to mask data before upload, whether authorization has been obtained, and whether forwarding is allowed are all the user’s sole responsibility.
  • It depends on the current behavior of the DSH official API, which is not a formal public interface and may change, become invalid, or be restricted at any time.
  • Explicitly stated failure scenarios include: a session will permanently stall if the first request after the watermark goes through the official channel and the built-in plugin is not pushing the watermark; no request can be sent if a single event exceeds maxBytes; it does not work at all if the API key is missing or invalid, and 401/403 errors are not retried; starting a scan cannot cover sessions that are no longer active (inactive sessions have no Session object and cannot have a watermark set).
  • It cannot prove that the server actually stores the data; a 2xx status code is the only signal.
  • The author is not responsible for any direct or indirect losses. Using this implies that you confirm you have read and agreed to the relevant terms, obtained the necessary authorization, and assume compliance and data risks yourself.

Before installation, you should check the source code and license, and confirm that the internal contracts it depends on still hold on your current DSH core version.

Conclusion

The value of this plugin lies in filling the gap rather than replacing it: using the same watermark and fields as the built-in plugin to send non-official channel logs back to DeepSeek without duplication. If you want a complete ledger for official sessions and are willing to accept duplication, that is a trade-off of a different class of plugins.

Directory: https://www.skillhub.cn/plugins/3418244301q-star/dsh-session-log-upload
GitHub: https://github.com/3418244301q-star/dsh-session-log-upload

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye