Preflight ETA Chime: A Pre-Transmission Estimation and Completion Reminder Plugin for DeepSeek Harness

Introduction

The plugin system in DeepSeek Harness (DSH) makes host behavior highly customizable. In long conversations or complex tasks, developers often need to know: how long will this request actually take to complete? When will it finish? The DSH ecosystem already has dozens of ETA plugins, but most of them only estimate remaining time during execution by inferring from step counts or token usage. The approach of preflight-eta-chime is different: it asks first before sending, letting the model provide a context-aware prior range, then refines it in real time during execution using actual evidence.

This plugin is maintained by Dongze502 and is currently classified as a client-side plugin. It bundles three features together—pre-flight check, in-execution ETA, and completion chime—as three independent modules that can be toggled individually. An anomaly in any one module will never block the main conversation.

Three Modules

1. Pre-Flight Check

Click the Pre-flight button below the input box, or trigger it with Ctrl+Shift+Enter. The plugin spawns a read-only sub-agent (preflight-estimator) that assesses task complexity and time range based on the current conversation context, and writes the result into the ETA prior.

The context read by the preflight sub-agent includes only the most recent 12 messages, each capped at 1,200 characters. If the total exceeds 8,000 characters, it is truncated with an annotation of the omitted amount. The prompt explicitly tells the model: <conversation> is background only, and the estimation target is solely “the single reply the assistant is about to write.” A set of signal anchors is also passed in (character count of the current user message, character count of the previous assistant reply, average steps and seconds-per-step across completed turns in this session).

The sub-agent must return a basis field (a single sentence of ≤30 characters) explaining the rationale behind the estimate. Both the preflight card and the ETA floating panel display this basis so you can judge whether the numbers are reasonable. Answer tolerance mechanism: if only one side of the range is given, the other is filled in at 1.7×; if neither side is given but a complexity level is provided, it falls back to the default range for that complexity (Low: 0.4–1.5 min, Medium: 1.5–4 min, High: 4–12 min).

If the sub-agent’s stopReason is not completed, the result is marked as degraded, returning { ok: false, degraded: true, riskFlags: ['preflight_<reason>'] }. Degradation scenarios include timeout, parse failure, and service unavailability.

The completion event of the preflight sub-agent is excluded from the main conversation’s completion notifications, achieved via delivery: 'caller'. The timeout defaults to 8 seconds and is adjustable between 1–60 seconds in settings. After a timeout, dispose() is always called. Any exception is converted into a degraded result—exceptions are never thrown outward.

2. In-Execution ETA

The pill indicator to the left of the input box displays real-time remaining time. The plugin subscribes to session/event, folds turn/start, step/start, step/end, and turn/end events, and fuses the preflight prior with actual execution evidence into a live remaining-time estimate.

The preflight sub-agent’s session is skipped (session.header.origin === 'subagent')—it is neither counted toward ETA nor triggers the chime. The fusion formula is: weight = clamp(1 - stepsDone/5, 0.2, 1); the prior is first reduced by elapsed time (prior_remaining = max(p50 - elapsed, 0.05)), then blended with the measured pace: eta = weight × prior_remaining + (1 - weight) × deterministic. The pill shows a countdown—it will not report the full turn duration when only 30 seconds remain.

The fallback chain is: preflight estimate → measured pace from this session (EtaTracker retains the average step count and per-step duration of the last 20 turns) → coarse default range (0.5–2.5 minutes). EtaView.source indicates which layer the number comes from (preflight/evidence/history/coarse), and the floating panel explicitly states the basis, eliminating unexplained placeholders. The estimation scope covers the current turn’s reply (from the user’s last message to the end of this turn) and allows fractional minutes (e.g., 0.5 means half a minute).

3. Completion Chime

When a conversation ends normally, the plugin plays a chime and sends a system notification. The same session rings at most once within 3 seconds, and globally only one chime plays at any given moment (the client serializes playback). States such as aborted / error / interrupted do not trigger the chime.

On the browser side, the Notification API is used for system notifications (if permission is denied, it stays silent; the chime is unaffected). The <audio> element plays the chime (built-in ding) or a Web Audio synthesized sound (success/chime/bell/pop). Browsers require a user gesture before playing audio. The settings page includes an “Unlock Audio” button, and any click on the page also automatically attempts to unlock; if not unlocked, notifications still appear but the chime stays silent.

The plugin inspects the dsh.profile.bundles in the host’s profile at startup. If known notifying plugins such as dsh-pharos, dsh-notification, dsh-localnotify, or dsh-voice-alert are detected, and the chimeRespectNotifiers setting is true (default), the current turn’s completion frame carries a silentReason. The client suppresses the chime and does not fire a duplicate system notification. The settings page lists concurrently installed notification plugins, and this courtesy behavior can be disabled.

Installation & Enablement

Install via the DSH plugin manager (recommended):

plugin_manager → action: install_bundle → target: <absolute path to this directory>

Or install directly from GitHub (DSH CLI):

dsh plugin --profile web add github:Dongze502/preflight-eta-chime

For local development, it is recommended to run npm install && npm run verify first, then npm run build; lib/ contains build artifacts and is not committed to the repository. After modifying source code, you must re-run npm run build and restart DSH for the new module code to take effect.

After installation, the plugin page should display the title “Preflight ETA Chime” with a description (from locale/zh.json), and the icon from assets/icon.svg.

Settings

The settings panel has two entry points pointing to the same configuration:

  1. Plugin page: attached to plugins.row.config, keyed as preflight-eta-chime#preflight-eta-chime, appearing as the config button on the right side of the row under Settings → Plugins → Preflight ETA Chime.
  2. ETA floating panel: click the ⏱ pill to the left of the input box → “Settings” in the bottom-right corner of the floating panel.

Setting fields and defaults:

{
  "preflightEnabled": true,
  "etaEnabled": true,
  "chimeEnabled": true,
  "ringtone": "ding",
  "customRingtoneUrl": null,
  "volume": 0.7,
  "analysisLanguage": "zh",
  "chimeRespectNotifiers": true,
  "learnFromTurns": true,
  "preflightTimeoutMs": 8000
}

analysisLanguage controls the language of the preflight free-text output: zh (default) requires basis and risk_flags to be written in Simplified Chinese; en requires English. The JSON key names do not change—only the sentences you read do. Degradation reasons generated by the host itself (preflight_timeout, preflight_unavailable, etc.) are stable codes; the client translates them into the configured analysisLanguage and will not dump raw underscore codes onto the UI.

chimeRespectNotifiers (default true) controls courtesy behavior: when known notification plugins are detected, the chime is suppressed. Turning it off means the chime always follows chimeEnabled, even if dsh-pharos is also installed.

learnFromTurns (default true) controls “self-calibration”: turning it off stops turn/end from writing to the calibration file, but existing samples remain effective.

Calibration samples are stored in $DSH_HOME/preflight-eta-chime/calibration.json, bucketed by “model-claimed complexity × request length tier” (short <400, medium <2000, long). Once a bucket accumulates 3 samples, the next preflight multiplies the estimate by that bucket’s bias coefficient (clamped between 0.25× and 4×). The coefficient is the trimmed median: when a bucket reaches 5 samples, 10% (at least one) is trimmed from each end, so a single interrupted or hung turn won’t skew the entire bucket.

Settings are persisted to $DSH_HOME/preflight-eta-chime/settings.json with atomic writes. If the file is corrupted or read-only, it falls back to in-memory values without affecting the session.

Custom ringtone supports three sources: local upload (wav/mp3/ogg, ≤2 MB, converted to a data URL), HTTPS URL (fetched via host proxy and converted to a data URL to avoid CORS), and a local absolute path (e.g., D:\sounds\ding.wav, only valid on the same machine). All fields are force-clamped (volume 0–1, timeout 1–60 s, unknown ringtone falls back to ding)—even manual file edits cannot break the plugin.

Compatibility & Notes

  • DSH baseline: 0.2.2-rc.2; tested on 0.2.2-rc.3 desktop.
  • Cordis: 4.1.0.
  • Node.js: >=24.9.0 (per engines.node in package.json).
  • Host dependencies: all are import type; the compiled output has zero runtime @deepseek-ai/* dependencies.

DSH is currently in developer preview. The plugin’s Cordis contract, session/event payload, and client slots may change across versions. After upgrading DSH, run npm run verify before installing.

The plugin runs with the current DSH process’s privileges. Review the source code and license (MIT) before installing. The plugin does not hardcode any sensitive information in config files; calibration samples and settings are all stored under the host directory.

Conclusion

preflight-eta-chime consolidates three capabilities—pre-flight estimation, in-execution ETA, and completion chime—into a single client-side plugin. The three modules are independent and individually toggleable, and an anomaly in any one will never block the main conversation. Through sub-agent preflight, real-time evidence fusion, a calibration feedback loop, and courtesy mechanisms with other notification plugins, it provides visible time information while minimizing disruption to the conversation experience. It is well suited for developers who work with long conversations or complex task orchestration.

References

  • Plugin directory: https://www.skillhub.cn/plugins/Dongze502/preflight-eta-chime
  • GitHub repository: https://github.com/Dongze502/preflight-eta-chime
羽毛球分组比赛记分
小程序二维码

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

Xiaoye