DeepJIT
Manifest valid★ 1JIT compiler plugin for deepseek-harness: compiles recurring agent workflows into hot skills and flow templates
DeepJIT
A JIT compiler plugin for deepseek-harness (dsh).
Overview
DeepJIT watches agent execution traces, mines recurring "hot" workflows, and compiles them with an LLM into reusable skills (markdown) or flows (step templates) — then feeds them back into the running harness, no restart. It is for anyone who repeats similar multi-tool workflows and wants dsh to turn them into fast, reusable assets.
traces ──► SQLite ──► hot-path mining ──► LLM compile ──► skills / flows ──► dsh
- Artifacts live under
~/.dsh/deepjit/and hot-reload into dsh. - JIT never compiles its own tools, so it can't feed on itself.
- Lifecycle (compiler-style): an AOT pass validates flows against the live tool registry and constant-folds literal args; tiering promotes hot, reliable skills to flows and deoptimizes unreliable flows; GC prunes stale artifacts.
Compatibility
| Item | Value |
|---|---|
| DSH version | @deepseek-ai/dsh 0.1.5-rc.2 (runtime-verified) |
| DSH mainline | session-persistence drill-down now uses SessionHandle.open().read(offset,length) (0.1.5 API); summarizer supports both the legacy readFrom and the new handle form |
| Node | ^22.19 || >=24 |
| Profiles | headless, web |
dsh is pre-release; APIs may drift. Pins @deepseek-ai/* to 0.1.5-rc.2 (cordis 4.0.2).
Install / Uninstall
# install from npm (published as @fly3366/deepjit)
dsh plugin --profile web add @fly3366/deepjit
# or install from git (no npm release needed)
dsh plugin --profile web add github:fly3366/DeepJIT
# disable for one profile
dsh plugin --profile web remove @fly3366/deepjit
# fully remove local data
rm -rf ~/.dsh/deepjit
Quick start
dsh plugin --profile headless add github:fly3366/DeepJIT
DEEPSEEK_API_KEY=... dsh --profile headless "read package.json and tsconfig.json, then summarize"
# repeat similar tasks; deepjit mines and compiles hot flows automatically
dsh --profile headless "use deepjit_status to list compiled artifacts"
Configuration
Override in cordis.patch.yml or a profile patch. Key options (full list in
src/config.ts):
| Key | Default | Description |
|---|---|---|
enabled | true | master switch |
summarizeIntervalMs | 600000 | JIT cycle (mine + compile) |
minRepeat | 3 | min occurrences for a hot sequence |
argumentAware | false | include sorted arg-key signatures in mined sequences |
compileCandidates | 1 | best-of-N candidates per compile; higher = better quality, more LLM calls |
minFlowSteps | 2 | min tool steps a flow must have to be compiled |
minPatternValue | 6 | min value score (count × steps) to justify a compile |
flushBatchSize | 200 | trace rows per batched SQLite write |
maxPendingCalls | 10000 | cap for in-memory pending/raw maps (bounds memory) |
minerMaxRows | 20000 | max trace rows read per session per mining cycle |
transcriptMaxRows | 2000 | max tool rows read per compile transcript |
gcEnabled / gcStaleMs / gcProtectMs | true / 14d / 1d | GC: disable artifacts unused beyond gcStaleMs after a gcProtectMs grace |
dryRun | false | publish artifacts as disabled; enable manually via deepjit_status |
traceRetentionMs / patternRetentionMs | 7d / 7d | prune trace rows / stale uncompiled patterns older than this |
deoptMinUses / deoptMaxSuccessRate | 5 / 0.5 | disable a flow used ≥N times with success rate ≤ this (deoptimization) |
qualityMinUses / minQuality | 5 / 0 | disable active artifacts used ≥N times whose quality score < minQuality (0 = off) |
promoteMinUses / promoteMinSuccessRate | 5 / 0.8 | recompile a hot, reliable skill's pattern as a flow (promotion) |
llmProvider / llmModel | deepseek-official / (session) | compile model; empty = reuse session model |
locale | auto | en / zh / auto (dsh locale → LANG → English) |
Sensitive: no keys are stored. The compile call uses dsh's credential service
or the launching environment's DEEPSEEK_API_KEY.
Permissions & data
- Files: writes only under
~/.dsh/deepjit/(SQLite traces, skills, flows, log); reads session JSONL viactx.sessionPersistencefor compile drill-down. - Network: LLM calls go through dsh's
ctx.llm(DeepSeek provider); no other network access. - Credentials: none stored; resolved by dsh or the environment.
- User data: stores compact execution traces (tool args/results, message text).
- Tools: flow steps run through
ctx.tools.executeand the normal permission gates. - Observability: dsh's OTel telemetry covers agent sessions only; DeepJIT keeps its
own counters (traces flushed, compiles, LLM latency, GC/deopt/promote) and emits
GenAI semantic-convention spans (
gen_ai.*: system/model/usage tokens) for each LLM call. Read counters viadeepjit_status {action:"metrics"}; spans export via dsh-o11y-plugin when present.
Troubleshooting
- Log:
~/.dsh/deepjit/deepjit.log. Database:~/.dsh/deepjit/deepjit.db. MISSING_CREDENTIAL→ exportDEEPSEEK_API_KEYor store it in dsh's Models page.TRANSPORT/NO_ADAPTERon compile → usually a transient LLM call failure; deepjit retries and falls back to the next cycle.- Roll back:
dsh plugin --profile <p> remove deepjit, thenrm -rf ~/.dsh/deepjit.
Development
npm install && npm test # node:test, run natively via Node type stripping
npm run typecheck && npm run build
See CONTRIBUTING.md and AGENTS.md.
Related work
The "compile recurring workflows just-in-time" idea and the best-of-N compile selection are inspired by JIT-Agent — Scaling Harness Intelligence via Just-in-Time Harness Evolution (bingreeky/JIT). DeepJIT adapts that harness-evolution concept to run online inside a live dsh session, compiling recurring tool flows into skills/flows rather than synthesizing whole harnesses.
License & security
MIT. Report vulnerabilities privately per SECURITY.md.
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
Comments
Loading…
From the same category
by tt-a1i
Agent skill for beautiful, verifiable architecture, workflow, sequence, data-flow, and lifecycle diagrams—self-contained HTML with motion and crisp export.
★ 69.9k
↓ 3.5k/wk
MIT
JavaScript
Sep 22, 2026
dsh plugin --profile web add @tt-a1i/archify-dshDeepSeek Harness plugin for Reactive Resume: bridges your resumes and job applications into a Harness session over MCP.
★ 41.7k
↓ 251/wk
MIT
Aug 24, 2026
dsh plugin --profile web add dsh-plugin-reactive-resumeby Tencent
Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
★ 28.9k
↓ 831/wk
NOASSERTION
Go
Sep 22, 2026
dsh plugin --profile web add @wxg-prc-cpg/dsh-weknoraby anywhere-labs
为 DeepSeek Harness (DSH) 插件生态打造的现代化桌面端解决方案。万物皆「插件」,桌面本身也是「插件」。
★ 28.5k
↓ 170/wk
MIT
TypeScript
Sep 22, 2026
dsh plugin --profile web add dsh-plugin-desktopby titanwings
Distilly — Distill how they think into reusable Skills for any Agent or Bot. Formerly Colleague Skill(原同事 Skill).
★ 25k
MIT
TypeScript
Sep 22, 2026
by Nagi-ovo
Enhancement suite for Gemini, AI Studio, Claude & ChatGPT — plus a prompt manager for any websites, DeepSeek Harness included. / 面向 Gemini、AI Studio、Claude 与 ChatGPT 的增强套件;其中的提示词管理器可用于任意网站,如 DeepSeek
★ 20.1k
GPL-3.0
TypeScript
Sep 21, 2026