xarleyn/dsh-plugins--plugins-dsh-tool-offload ↗★ 1

@yadsh/dsh-tool-offload

Offloads large, low-judgement DeepSeek Harness tool results to small one-shot worker agents before they enter the main model context 适合高频工具场景,要求子代理与工具白/黑名单已配置以减少上下文膨胀。

패키지
@yadsh/dsh-tool-offload
호환성
미검증
Harness peer 범위
catalog:dsh
Cordis peer 범위
catalog:dsh
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 9. 13.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:xarleyn/dsh-plugins#fd3cdd95651ec4eafe52d510751ba3aba3c9248d&path:plugins/dsh-tool-offload

Configuration

All keys are optional; defaults in parentheses.

OptionTypeDefaultDescription
enabledbooleantrueMaster switch; false passes every result through untouched.
routing.modeallowlist | denylistallowlistallowlist offloads only routing.allow tools; denylist offloads everything except routing.deny.
routing.allowstring[]read, grep, search, web_fetchTool names matched exactly or by prefix* glob.
routing.denystring[]bashTools never offloaded; wins over allow.
routing.thresholds.minBytesnumber24000Byte threshold; a result qualifies when either threshold is exceeded.
routing.thresholds.minEstimatedTokensnumber6000Cheap characters / 4 token estimate threshold.
routing.rulesRule[][]Ordered rules; first match picks the worker/prompt profile or forces passthrough. Each rule: id, match.tools, match.minBytes, action (offload/passthrough), worker, prompt.
workersRecord—Named worker profiles merged over the default profile.
workers..subagentProviderstringspawnDSH subagent provider; must support tool restrictions.
workers..provider / .modelstring | nullnullModel route for the worker; null inherits the parent agent's route. Configure a cheap model here.
workers..maxTokensnumber | null4000Worker output token cap.
workers..timeoutMsnumber45000Bounded worker timeout; on timeout the original result is restored.
defaultWorkerstringdefaultWorker profile used when no rule selects one.
context.includeLastUserMessagebooleantruePass the latest user task message to the worker.
context.maxParentContextBytesnumber12000Byte cap for the extracted parent task.
payload.maxBytesnumber300000Results larger than this pass through (chunking is planned).
validation.maxOutputBytesnumber20000Worker answers above this size are rejected.
validation.requireReductionbooleantrueReject answers that did not actually shrink the result.
validation.minReductionRationumber0.15Required relative shrink (0.15 = at least 15 % smaller).
fallback.modeoriginal | truncate | errororiginalWhat replaces the result when an offload fails.
annotation.enabledbooleanfalsePrefix transformed content with [offloaded result].
concurrency.maxWorkersPerAgentnumber3Per-agent worker budget (non-blocking).
concurrency.maxWorkersGlobalnumber8Global worker budget (non-blocking).
promptsRecord—Custom "Your job" prompt sections; generic, code-reader, search-results, web-reader, and logs are bundled.
telemetry.enabledbooleantrueStructured event logging; counters stay on either way.

Built-in routing rules map the default tool candidates to bundled prompt profiles: web_fetch → web-reader, grep/search → search-results, read → code-reader; everything else uses generic.

Example cordis.patch.yml profile override:

- override:
    - id: dsh-tool-offload
      config:
        workers:
          default:
            provider: zai
            model: glm-4.5-air
            maxTokens: 4000
        routing:
          allow:
            - read
            - grep
            - web_fetch