everclear077/dsh-progressive-tools
Cache-stable progressive tool discovery for DeepSeek Harness. The default mode sends a small, fixed tool surface on the first request, keeps the complete catalog in process memory, and executes discovered tools through the ordinary Harness pipeline.
catalog descriptioncatalog 简介 / catalog description:Progressive tool discovery for DeepSeek Harness — tiny stable surface, searchable catalog, real pipeline execution, context cache intact.
Project Overview项目介绍
This is a DeepSeek Harness plugin for cache-stable progressive tool discovery. It keeps a small fixed tool surface for the first request, maintains a byte-stable prefix to enable context cache reuse, and stores the full tool catalog in process memory. Use it when you have many tools and want to preserve context cache hits. Note most deferred tools require an extra discovery search before use.
这是DeepSeek Harness的渐进式工具发现插件,核心能力是保持首请求工具列表体积小、工具前缀字节稳定,支持复用上下文缓存,全量工具目录保存在进程内存中,通过常规DSH管道执行发现的工具。适合工具数量多、需要保留上下文缓存命中率的场景,注意使用大部分延迟加载工具前需要先进行一次发现搜索。
请帮我了解并安装插件:【dsh-progressive-tools】【https://github.com/everclear077/dsh-progressive-tools】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:everclear077/dsh-progressive-tools#v0.4.0
把 everclear077/dsh-progressive-tools 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
DSH Progressive Tools
Cache-stable progressive tool discovery for DeepSeek Harness. The default mode sends a small, fixed tool surface on the first request, keeps the complete catalog in process memory, and executes discovered tools through the ordinary Harness pipeline.
Documentation map · Getting started · Upgrade guide · Troubleshooting
Why
Every visible tool definition consumes input tokens on every request. Changing that definition list later also changes the request prefix and reduces context cache reuse. Progressive disclosure needs both properties at once:
- a small first request;
- a byte-stable tool and system prefix across later requests.
The default stable-proxy mode provides that contract:
complete registry (process memory)
│
├── exact searchable definitions
│
└── fixed request surface
├── tool_search
├── tool_dispatch
└── common direct tools
│
tool_search result ────┴──► append exact matches to conversation history
│
└── tool_dispatch ──► normal DSH execution pipeline
Search changes conversation history, not the top-level tool list. Approval, guards, argument validation, timeout wrappers, result policy, deferred context, and cancellation still run for the selected real tool.
Features
- Minimal tool definitions on the actual first AgentLoop request.
- Byte-stable native tool list and Code Mode SDK across discovery calls.
- Exact tool matches with full name, description, and parameter schema.
- Family-wide discovery: each match names every sibling tool of its family, so one search opens a plugin's complete dispatchable surface.
- Browsable
statuscatalog listing, with an optionalstatusGrantsDiscoverygrant for trusted deployments. - Bounded conversation growth: search results record per-call discovery increments while resume state travels in presentation metadata.
- Deterministic BM25-style lexical ranking over names, descriptions, nested parameter descriptions, enums, family metadata, and multilingual aliases.
- Stable
tool_dispatchtransport with runtime schema validation through the original tool definition. - Monotonic guard that rejects direct calls to deferred tools and permits only dispatcher-owned nested execution trees.
- Support for inherited and agent-scoped tools.
- Durable discovery reconstruction for top-level and Code Mode search calls.
- Optional skill-to-family discovery bindings.
dynamiccompatibility mode for deployments that require native definitions after activation.- Reversible Cordis effects for unload and configuration reload.
Requirements
- Node.js
^22.19.0or>=24.0.0 - Host runtime
0.1.5-rc.1(exact tested core peer versions) - pnpm for source installation and development
Runtime compatibility
Version 0.4.0 targets runtime 0.1.5-rc.1. Core peer versions are
pinned to that tested release; older runtimes and later prereleases are not
covered. Earlier plugin versions predate this adaptation. The command below
uses the release tag for reproducible deployments.
Install
dsh plugin --profile web add github:everclear077/dsh-progressive-tools#v0.4.0
Source installs run the package prepare script. If pnpm asks for build
authorization, add the exact package key it reports to the profile's
pnpm-workspace.yaml:
allowBuilds:
dsh-progressive-tools: true
Verify the composed layer before starting the profile:
dsh --profile web --dump-config
The dump should contain the progressive-tools row contributed by this bundle.
Use
The default direct surface contains:
tool_search;tool_dispatch;skill,ask_user_question,report,submit_*, andstructured_output*when registered;- reserved Harness presentation transports when the active tool mode needs them.
No special wording is required in an ordinary conversation. A stable system instruction tells the agent to search before declaring a capability unavailable.
Discovery returns exact definitions:
{
"query": "browser navigation",
"max_results": 3
}
The next call uses one returned definition:
{
"name": "browser_open",
"arguments": {
"url": "https://example.com"
}
}
Each match also lists every member tool name of its family, and the whole family becomes dispatchable from that one search — siblings that did not make the top-ranked slice can be dispatched by name or schema-loaded with one exact-name query.
tool_search also accepts {"action":"status"}, which lists every deferred
family with its member tool names alongside catalog and savings estimates. By
default the listing is browse-only: dispatching an unseen name still requires
one exact-name search, and the rejection message says so. Deployments that
prefer immediate access can set statusGrantsDiscovery: true. Search results
are append-only conversation content; they never add native definitions to the
top-level request.
Configure
The default configuration is intentionally small:
- id: progressive-tools
config:
mode: stable-proxy
toolName: tool_search
dispatchToolName: tool_dispatch
maxResults: 5
requireDiscovery: true
statusGrantsDiscovery: false
deferToolGuidance: true
alwaysVisible:
- skill
- ask_user_question
- report
- submit_*
- structured_output*
Family rules improve search without changing the stable request surface:
- id: progressive-tools
config:
groups:
- id: browser
description: Browser navigation and page interaction
aliases: [browser, web page, 浏览器]
include: [browser_*]
- id: database
description: Database inspection and queries
aliases: [database, sql, 数据库]
include: [db_*, sql_*]
See configuration for every option, the
plugin-ecosystem onboarding checklist (alwaysVisible for high-frequency
tools, skillBindings for Skill-shipping packages, explicit groups for
unconventional names), and the migration notes for dynamic mode. The
progressive disclosure model maps Skills,
exact tool definitions, execution, and provider capability gaps.
Execution and security semantics
Stable mode filters the authoritative prompt assembly instead of changing the
registry view. A direct call to a deferred name is then denied by a monotonic
tool guard. tool_dispatch creates a nested execution with the original agent,
signal, root call identity, arguments, and real tool name, so normal DSH policy
continues to apply to that real tool.
The guard is a routing invariant, not a replacement for approval or sandbox policy. Security-sensitive deployments should keep their existing controls enabled.
Trade-offs
- Deferred tools lose provider-native argument grammar at the outer request. Their original schema is validated at dispatch time by DSH.
- A task may need one discovery call before execution.
- Family siblings become dispatchable before their schemas were shown; the pipeline still validates every call, but complex or side-effectful siblings are best schema-loaded first with one exact-name search.
- Search is deterministic lexical ranking, not an embedding service.
- Search results add only matched definitions to conversation history, but those definitions remain there until normal compaction.
- A registry or composition change can legitimately alter the next prompt. Discovery alone does not.
Development
pnpm install
pnpm run check
The test suite includes a real AgentLoop request test that captures the first wire-ready tool array and verifies that discovery leaves both tools and system text unchanged.
The implementation follows the public references for architecture, system prompt assembly, tool execution, skills, and plugin packaging.
omdsh-dev/DSH-better-sidebar
limuyang2/agent-team
LoserFox/distill
Cerbur/clutch-dsh
Iwctwbh/dsh-flowglass
rootkiller6788/dsh-flow
PerryLink/dsh-background-agents