rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:trid11111-arch/dsh-infer-kit
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Inference toolkit for DeepSeek Harness — semantic cache, draft cascade, and JSON validation.
Three model-agnostic tools (work with any provider DSH routes to):
| Tool | What it does |
|---|---|
infer_cache_lookup |
Semantic cache for answers and tool results. Jaccard similarity ≥ 0.62 triggers a hit. Retention: agent = 3 days, chatbot = 7 days. |
infer_draft_cascade |
Cheap-draft → expensive-verify cascade (client-side analog of speculative decoding). Any OpenAI-compatible endpoint works. |
infer_json_validate |
Validate JSON against JSON Schema before presenting structured output. Supports type, properties, required, additionalProperties, items, enum, min/max, minLength/maxLength. |
Built on ideas from DeepInfer (DeepSeek's open-source inference engine, Apache 2.0, October 2026).
dsh plugin --profile web add dsh-infer-kit
Then restart dsh web (or the desktop app). The plugin activates on next start.
For manual / source install:
dsh plugin --profile web add github:YOUR_USERNAME/dsh-infer-kit
After installing and restarting, three tools become available to any model:
{
"mode": "lookup",
"key_text": "What is the capital of France?",
"kind": "chatbot"
}
{
"mode": "store",
"key_text": "What is the capital of France?",
"value": "Paris is the capital of France.",
"kind": "chatbot",
"tags": ["geography", "quick-facts"]
}
{
"task": "List all files in the project root",
"context": "TypeScript monorepo with packages/api, packages/web, packages/shared",
"accept": true
}
Returns a draft (typically 100–600 tokens) from the configured cheap model; you verify and finalize. If the draft endpoint is unavailable, falls back to full-quality self-completion — no errors raised.
Configure the draft endpoint in your profile's cordis.patch.yml:
config:
draftEndpoint: 'https://inference.dahl.global/v1/chat/completions'
draftModel: 'deepseek-ai/DeepSeek-V4-Flash-0731'
draftTimeoutMs: 90000
The API key is read from the DAHO_API_KEY credential (set it in Settings → Models like any other provider key). It resolves fresh on every draft call — rotating keys are picked up automatically.
{
"json": "{\"id\": 42, \"name\": \"Alice\"}",
"schema": {
"type": "object",
"required": ["id", "name"],
"properties": {
"id": { "type": "integer" },
"name": { "type": "string", "minLength": 1 }
}
}
}
Returns ok: true or a list of concrete errors to fix before presenting the output.
All config lives in cordis.patch.yml under config::
| Key | Default | Description |
|---|---|---|
storePath |
store.json next to index.js |
Path to the persistent cache file |
maxEntries |
512 |
Max cache entries; oldest are evicted on overflow |
similarityThreshold |
0.62 |
Jaccard threshold for cache hits (0–1) |
ttlAgentDays |
3 |
TTL for kind=agent entries (days) |
ttlChatDays |
7 |
TTL for kind=chatbot entries (days) |
draftEndpoint |
null |
OpenAI-compatible draft endpoint URL |
draftModel |
null |
Model name passed to draft endpoint |
draftMaxTokens |
600 |
max_tokens for draft calls |
draftTimeoutMs |
25000 |
Timeout per draft call (ms) |
DSH process (host half) Web GUI (client half)
───────────────────────── ─────────────────────
index.js client.js
├── inject: ['credentials'] ├── inject: ['slots']
├── inject: ['tools'] └── registers ⚡ InferKit
├── inject: ['webServer'] button in sidebar footer
│ └── GET /infer-kit/status
└── ctx.effect() cleanup
index.js): Node.js built-ins only (node:fs, node:path, node:crypto, fetch). No @deepseek-ai/* imports — verified contract.client.js): React status button, no build step required.storePath).Draft cascade tested against inference.dahl.global with deepseek-ai/DeepSeek-V4-Flash-0731:
| Run | Draft length | Latency | Notes |
|---|---|---|---|
| 1 | 94 tokens | 2139 ms | First call |
| 2 | 157 tokens | 4627 ms | Survived a 429 retry |
| 3 | 146 tokens | 1369 ms | With credentials resolver |
>= 0.2.0-rc.2fetch (available in DSH's Node runtime)MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: inference、deepseek-harness。