wings1848/dsh-rtk0

@wingsbutterfly/dsh-rtk

RTK command rewriting and tool-output compaction for the DeepSeek Harness: rewrites bash commands to their rtk equivalents and compacts noisy tool output before it reaches the model.

AI Analysis

适合需要将Bash命令转为RTK等效命令并减少模型上下文消耗的用户。

Package
@wingsbutterfly/dsh-rtk
Version
0.1.0
License
MIT
Last updated
Sep 12, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

Configuration

Every field is optional; defaults are shown.

- id: rtk
  name: '@wingsbutterfly/dsh-rtk'
  config:
    enabled: true                    # master switch
    mode: rewrite                    # rewrite | suggest
    guardWhenRtkMissing: true        # run the original when rtk is unavailable
    showRewriteNotifications: false  # append a one-line rewrite note to the result
    rtkExecutable: rtk               # name or absolute path
    rewriteTimeoutMs: 3000           # deadline for one `rtk rewrite` call
    compactedTools: [bash, read, grep]
    outputCompaction:
      enabled: true
      stripAnsi: true
      readCompaction:
        enabled: false               # lossy read compaction; off so code reads stay exact
      sourceCodeFilteringEnabled: false
      preserveExactSkillReads: false
      sourceCodeFiltering: none      # none | minimal | aggressive
      aggregateTestOutput: true
      filterBuildOutput: true
      compactGitOutput: true
      aggregateLinterOutput: true
      groupSearchOutput: true
      trackSavings: true
      deferToHarnessSpill: true      # let the harness spill policy own oversized output
      smartTruncate:
        enabled: false
        maxLines: 220                # 40–4000
      truncate:
        enabled: true
        maxChars: 12000              # 1000–200000

The configuration is also registered as the dsh-rtk namespace in the harness settings document, so it can be edited there and takes effect without a restart. A composition config: block supplies the base layer; the settings document supplies the user layer on top.

Why readCompaction is off by default. Filtering or truncating a read result can leave the model editing against text that no longer matches the file. Everything on by default is lossless for the body text it summarizes, or only fires on outputs whose whole shape is being replaced.