dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
DeepSeek Harness plugin: one on-demand tool that finds tools and skills outside the agent schema by meaning and registers the found tool in the requesting scope.
On-demand tool catalog for DeepSeek Harness.
A profile with many plugins and MCP servers sends hundreds of tool definitions on
every request. Every definition costs schema tokens for every turn, and a tool
list that large is well past the point where model accuracy starts to drop.
dsh-alfandega adds one tool, achar_ferramenta ("find tool" in
Portuguese), that finds the tool or skill missing from the agent schema by
meaning and registers the found tool in the requesting agent's scope. The agent
discovers the capability as content, when it needs it, instead of carrying every
schema all the time.
| Who | Surface | What you get |
|---|---|---|
| the agent | achar_ferramenta tool | the full schema of the matching tool, plus registration in its scope |
| you, in the chat | /alfandega <what you want to do> | the same search, as text |
# 1. pnpm (needed by `dsh plugin`)
npm install -g pnpm
# 2. add the plugin to your `web` profile
npx @deepseek-ai/dsh plugin --profile web add github:songjongdevsecops/dsh-alfandega
If dsh is already installed globally, step 2 is:
dsh plugin --profile web add github:songjongdevsecops/dsh-alfandega
Restart the harness after installing: the bundle layer is read at boot.
npx @deepseek-ai/dsh web
Check that the line was loaded:
npx @deepseek-ai/dsh --profile web --dump-config | grep -A4 alfandega
Expected shape:
- id: alfandega
name: dsh-alfandega
config:
colecao: ferramentas-bgem3-v1
topK: 5
buscaTimeoutMs: 20000
The package declares dsh.bundle.patch, so dsh plugin add appends
dsh-alfandega to dsh.profile.bundles in the profile manifest. That line is
the only activation.
# update: re-run the add command, then restart the harness
npx @deepseek-ai/dsh plugin --profile web add github:songjongdevsecops/dsh-alfandega
# uninstall, then restart
npx @deepseek-ai/dsh plugin --profile web remove dsh-alfandega
the model needs a capability that is not in its schema
│
▼
achar_ferramenta(consulta) ← one tool, always in the schema
│
├─ 1. optional vector search in a memsearch collection, by MEANING
├─ 2. completed by local lexical ranking (name > description > keyword)
│
▼
returns the FULL schema as CONTENT (the prompt prefix is not rewritten)
and registers the tool in the scope of the agent that asked
│
▼
the tool is callable from the NEXT request on — one cache re-warm, not one
per request
achar_ferramenta({ consulta, quantas? })./alfandega <what you want to do>; /alfandega alone
reports the catalog size and path.tools/change clears the in-memory catalog cache.client.js does not exist
on purpose.Registration is agent-scoped (exec.agent.ctx.tools.register), never global:
the tool array of the prompt prefix is extended once, when the model asks, so
the prompt cache survives.
^22.19.0 || >=24.0.0 (the range DeepSeek Harness supports).PATH; the harness manages profile plugins with it.npx @deepseek-ai/dsh web.ferramenta-<name> /
skill-<name>. Without it (or with the index busy/unavailable), the plugin
falls back to local lexical ranking and says so in the result. Nothing breaks.The package deliberately ships no catalog. A catalog is a dump of the tool and skill registry of one machine; shipping it would leak that machine's paths and internal descriptions, and it would be stale for everyone else.
On the first call (achar_ferramenta or /alfandega), if there is no catalog
at the configured path, the plugin:
tools.schemas()),Default path: ~/.dsh/alfandega/catalogo.json. If the directory is not
writable, the plugin keeps the catalog in memory for the session and logs a
warning instead of failing.
To refresh the catalog (for example after installing a new plugin), delete the file and call the tool again:
rm ~/.dsh/alfandega/catalogo.json
The search also merges what the calling agent already sees, so a tool that is in
the schema never appears twice or gets registered again. The hook
tools/change clears the in-memory cache, so a regenerated file is picked up
without a restart.
All keys live on the alfandega line of the profile patch. A patch replaces the
whole config of the line, so restate every key you want to keep.
| Key | Environment variable | Default | Meaning |
|---|---|---|---|
catalogo | DSH_ALFANDEGA_CATALOGO | ~/.dsh/alfandega/catalogo.json | catalog path; ~/ is expanded |
colecao | — | ferramentas-bgem3-v1 | memsearch collection queried for vector search |
topK | — | 5 | how many items a call returns (capped at 20) |
buscaTimeoutMs | — | 20000 | vector search ceiling; on timeout the lexical ranking answers |
Profile patch example (~/.dsh/profiles/web/cordis.patch.yml):
- id: alfandega
config:
colecao: 'ferramentas-bgem3-v1'
catalogo: '/home/you/.dsh/alfandega/catalogo.json'
topK: 5
buscaTimeoutMs: 20000
When developing the plugin from a directory, a catalogo.json next to
index.js takes precedence over the home default; that is how a checkout can
keep a pre-generated catalog while a package install generates its own.
Ask the agent for a capability it does not seem to have ("run a long command in
the background", "search the web", "start a workflow"). It calls
achar_ferramenta and receives the full schema of the match.
In the chat:
/alfandega list background jobs # find and show the matching tool
/alfandega # catalog size, path and state
What a result looks like:
[alfandega] 1 de 42 itens para "list background jobs" (lexical + registro sob demanda).
FERRAMENTA job_list
List background jobs started by this session
parâmetros:
{ ... }
registradas agora no seu escopo: job_list. Elas ficam disponíveis a partir da
PRÓXIMA requisição.
From a clone of the repository:
node --test tests/
The suite covers the lexical ranking, vector-first ordering, scoped
registration (never twice, never global), the frame-format JSON Schema,
catalog read errors, catalog generation at the destination, and the package
contract. It needs no harness install and no index; when
@deepseek-ai/dsh-tools is resolvable (or DSH_TOOLS_ENTRY points at its
entrypoint), it also validates the registered schema with the harness compiler.
To verify the install: check the dump-config line above, restart the harness,
then run /alfandega web search. The first call reports
catálogo gerado agora a partir do host.
tools/change hook only invalidates the in-memory cache.skill tool, which owns the skill catalog.pnpm not found — npm install -g pnpm, then re-run the add command.catálogo não existe em ...; o host não expôs ferramenta nem skill — the
registry was empty when the plugin tried to generate the catalog. Check that
the profile mounts its bundles, then call the tool again.DSH_ALFANDEGA_CATALOGO at a writable
path; the session still works from memory.lexical: motor ocupado — another process holds the memsearch
database. The lexical ranking answers and the vector returns on the next call.<subject>-<engine>-v1; the
plugin warns but keeps working with the name you gave.