@sadjjk/dsh-context-mode-adapter avatar

@sadjjk/dsh-context-mode-adapter

context-mode 没有官方 DSH 插件——本仓库补上:11 个 ctx_* 工具进程内注册 + hook 路由拦截,节省会话上下文

PluginAI ModelsSecurityMemoryFile
Verification
L5 · Run tested
Verified
Risk
LowRisk
Health
Active
Trust
Gold

Install verification: runtime verified (L5) · tested on dsh 0.2.1-rc.2 · last checked Install verification details →

Install verification badge dsh 0.2.1-rc.2

What it doesAI

DSH adapter that registers 11 context-mode ctx_* sandbox tools in-process with hook routing to cut session context usage.

  • Registers 11 ctx_* tools in-process: sandbox exec, FTS5 index/search, batch, fetch-and-index
  • Hook pre-intercepts large tool outputs and injects per-turn routing blocks
  • Settings card shows status, one-click doctor check and tool on/off toggles
aiAImemoryAIfileAI

Capability tags are AI-inferred or rule-extracted from the README (see badge) — vocabulary-limited, not install-verified. AI = inferred; README = literal keyword from the readme.

Installation

dsh plugin --profile web add github:sadjjk/dsh-context-mode-adapter#v0.1.1
verified v0.1.1

Install method: GitHub · runtime verified (L5)

Verification & Compatibility

Grouped by plugin version: each card lists the dsh versions actually tested against that artifact version and their install verdicts (L5 wins). Untested combinations are omitted — absence means untested, never assumed compatible. L1–L3 are a plugin-level static archive (independent of the dsh version — the same verdict on every dsh row): they sit in each row's level grid next to L4/L5, marked "static", while their evidence is stored once per plugin inside that row's "checks & evidence" instead of being duplicated per version.

External credentials (plugin-level): none detected

Declared DSH compatibilityfrom package.json · peerDependencies
author declared no dsh version requirement

○ The author declares no dsh version requirement — install is not blocked by version.

Install compatibility matrix (rows = plugin versions〔latest 5〕, columns = dsh versions〔latest 5〕)
At-a-glance → evidence in the cards below
plugin \ dshdsh 0.2.1-rc.2
current
dsh 0.2.1-alpha.2
v0.1.1✓✓
Install compatibility (by plugin version, dsh versions within)
Legend:✓ L5 runtime verified○ ecosystem plugin◼ ecosystem app✗ failed
v0.1.1github✓ 2 runtime-verified2026-10-20

https://github.com/sadjjk/dsh-context-mode-adapter

✓dsh 0.2.1-rc.2current2026-10-20L5 · runtime verified
Environment & artifact
  • • Node.js: v24.14.0
  • • DSH: 0.2.1-rc.2
  • • Plugin artifact: github · https://github.com/sadjjk/dsh-context-mode-adapter#v0.1.1
Levels (L1–L3 plugin-level static archive · L4/L5 newest real verdicts for this combination)
L1 static
Passed
L2 static
Passed
L3 static
Passed
L4 sandbox
Passed
L5 runtime
Passed
Install + runtime smoke verified in the dsh sandbox — installs and runs
L5 · runtime verified · valid for dsh 0.2.1-rc.2

ID: dsh-context-mode-adapter@v0.1.1@dsh0.2.1-rc.2 · profile: l4-sandbox

Issued: 2026-10-20 · expires: 2026-10-27

View checks & evidence
L1 · Found✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L2 · Structured✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L3 · Install spec✓ Passed
Install command parsed✓ Passed
Source: registry verification · Method: install spec parse · Captured 2026-10-18
DSH version declared✓ Passed
Source: registry verification · Method: DSH version declaration · Captured 2026-10-18
L4 · Install tested✓ Passed
Install executed in confined sandbox✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-20
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · channel GitHub source · outcome ran · exit 0
check took: 1.8s
Install succeeded✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-20
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · channel GitHub source · outcome ran · exit 0
check took: 1.8s
Installed artifact confirmed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-20
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · channel GitHub source · outcome ran · exit 0
check took: 1.8s
L5 · Run tested✓ Passed

active in loader tree (150 entries)

Sandbox install passed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-20
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · install mode reused L4 scratch
check took: 20ms
Web boot ready✓ Passed
Source: DSH runtime · Method: web boot · Captured 2026-10-20
ready line dsh web: http://127.0.0.1:64999/?token=…
HTTP endpoint served✓ Passed
Source: DSH runtime · Method: HTTP request · Captured 2026-10-20
path / · HTTP 200 · took 20ms
Plugin active in inventory✓ Passed
Source: DSH runtime · Method: plugin inventory query · Captured 2026-10-20
verdict active · entries 150
match: include:dsh-context-mode-adapter · dsh-context-mode-adapter · phase active
phases: active 122 · null 28

L1–L3 are plugin-level static conclusions (baseline, identical across dsh versions): evidence is stored once per plugin.

✓dsh 0.2.1-alpha.22026-10-14L5 · runtime verified
Environment & artifact
  • • Node.js: v24.14.0
  • • DSH: 0.2.1-alpha.2
  • • Plugin artifact: github · https://github.com/sadjjk/dsh-context-mode-adapter#v0.1.1
Levels (L1–L3 plugin-level static archive · L4/L5 newest real verdicts for this combination)
L1 static
Passed
L2 static
Passed
L3 static
Passed
L4 sandbox
Passed
L5 runtime
Passed
Install + runtime smoke verified in the dsh sandbox — installs and runs
L5 · runtime verified · valid for dsh 0.2.1-alpha.2

ID: dsh-context-mode-adapter@v0.1.1@dsh0.2.1-alpha.2 · profile: l4-sandbox

Issued: 2026-10-14 · expires: 2026-10-21

View checks & evidence
L1 · Found✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L2 · Structured✓ Passed
Defaulted from L3✓ Passed
defaulted to passed — L3 install spec passed (full-registry L3 sweep policy)
L3 · Install spec✓ Passed
Install command parsed✓ Passed
Source: registry verification · Method: install spec parse · Captured 2026-10-18
DSH version declared✓ Passed
Source: registry verification · Method: DSH version declaration · Captured 2026-10-18
L4 · Install tested✓ Passed
Install executed in confined sandbox✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-14
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · channel GitHub source · outcome ran · exit 0
check took: 3.3s
Install succeeded✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-14
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · channel GitHub source · outcome ran · exit 0
check took: 3.3s
Installed artifact confirmed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-14
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · channel GitHub source · outcome ran · exit 0
check took: 3.3s
L5 · Run tested✓ Passed

active in loader tree (150 entries)

Sandbox install passed✓ Passed
Source: Windows ACL sandbox · Method: sandbox install run · Captured 2026-10-14
spec github:sadjjk/dsh-context-mode-adapter#v0.1.1 · install mode reused L4 scratch
check took: 503ms
Web boot ready✓ Passed
Source: DSH runtime · Method: web boot · Captured 2026-10-14
ready line dsh web: http://127.0.0.1:56258/?token=…
HTTP endpoint served✓ Passed
Source: DSH runtime · Method: HTTP request · Captured 2026-10-14
path / · HTTP 200 · took 503ms
Plugin active in inventory✓ Passed
Source: DSH runtime · Method: plugin inventory query · Captured 2026-10-14
verdict active · entries 150
match: include:dsh-context-mode-adapter · dsh-context-mode-adapter · phase active
phases: active 122 · null 28

L1–L3 are plugin-level static conclusions (baseline, identical across dsh versions): evidence is stored once per plugin.

Author badges

Embed the official badges in your README to showcase security & install-test status:

dsh.so risk
`[![dsh.so risk](https://www.dsh.so/badge/dsh-context-mode-adapter.svg)](https://www.dsh.so/artifact/dsh-context-mode-adapter/)`
dsh 0.2.1-rc.2 install verified
`[![dsh.so install · dsh 0.2.1-rc.2](https://www.dsh.so/badge/install/dsh-context-mode-adapter@0.2.1-rc.2.svg)](https://www.dsh.so/artifact/dsh-context-mode-adapter/)`

Security Report

Two automated layers, neither a manual review: a static scan (per-plugin rule checks) and a model-driven dynamic security audit that covers only the subset static-flagged at warn or above and never executes plugin code.

dsh-context-mode-adapterAutomated review · daily

Static low, dynamic low — stricter wins → overall low.

static low→dynamic low→overall low
0 critical·0 high
lowoverall · low
1static scan · vet primaryvet AST static analysis (npm artifact or git source)
plugin versionv0.1.1dsh manifest
scanned versionv0.1.1git2026-10-21
current versionv0.1.1same version
vet verdictclean · git

Vet is an AST static scan (npm artifact or git source).

show static findings (4)
  • criticalnewFunction · code-execlib/index.js:848

    schema.callback = new Function("return " + schema.callback)();

  • criticalshellExec · shelllib/index.js:20

    const p = execSync("which context-mode", {

  • criticalshellExec · shelllib/index.js:27

    const prefix = execSync("npm config get prefix", {

  • criticalshellExec · shelllib/index.js:45

    const dirs = execSync(`ls -d ${nvmBin}/*/bin/context-mode 2>/dev/null`, {

2model reads redacted source context · never executes plugin code
highest gradelow
merged intooverall low
audited at2026-10-16
findings0 critical·0 high0 medium / 4 low hidden
show 4 audit findings
  • lownvm probe interpolates a home-derived path into a shell commandlib/index.js:45

    The nvm fallback builds a shell string from join(homedir(), '.nvm/versions/node'). If HOME ever contains shell metacharacters (spaces, $(...), ;) the command would be reparsed by the shell. Requires a pre-existing attacker-influenced HOME plus existence of that directory, so impact is marginal; the other two execSync calls are fully constant strings.

  • lowIn-process import of a PATH-resolved 'context-mode' package not declared in package.jsonlib/index.js:373

    resolvePackageRoot() follows detectContextModePath() (`which context-mode`) and imports build/server.js from whatever package named context-mode it finds, then registers its handlers as kernel tools that execute with the host's privileges. context-mode is not listed in dependencies/peerDependencies, so the resolved artifact is whatever is installed on PATH / globally. This is the plugin's documented design (UI tells the user to npm install -g context-mode), so the residual risk is supply-chain rather than an exploitable flaw.

  • lowBundled schemastery contains new Function() on schema.callback (unreachable here)lib/index.js

    This is dead code from the vendored @deepseek-ai/schemastery build. schema.callback is only assigned a string by transform()-style schemas; this plugin's Config uses only Schema.boolean()/Schema.number()/Schema.object with literal defaults, so no string ever reaches new Function. No dynamic evaluation of plugin, user or model input occurs.

  • lowPredictable /tmp sentinel path written without exclusive/no-follow flagslib/index.js:540

    On multi-user POSIX hosts another local user can pre-create /tmp/context-mode-mcp-ready-<pid> as a symlink; writeFileSync follows it, so the plugin would overwrite the link target with the pid digits, and unlinkSync on exit would remove the link. Content is trivial (a pid) and the pid is guessable only within the process lifetime, so impact is limited to clobbering a file the attacker already controls the link for.

Static 'critical' hits are heuristic: execSync commands are fixed, the bundled new Function is unreachable, writes stay in ~/.dsh; only low-risk hardening gaps remain.

Rule: the dynamic audit can only raise risk, never lower it (raise-only, never an exemption); a wrong raise is withdrawn by human review and the tier falls back to the static verdict. Overall verdict = the stricter of the two layers.

Disclaimer: the static scan and the dynamic security audit are both automated analysis, not a security guarantee. Always review what you install.

Activity

Last commit 2026-10-09 · activity: Active

• Repo created: 2026-10-09

• Stars: ★ 0 · Forks: 0

• Health: Active — committed within last 30 days

Source

GitHub: github.com/sadjjk/dsh-context-mode-adapter

Was this page helpful?