alexdoandev/jev-laya-dsh--packages-npm-dsh-jev-router ↗★ 2
dsh-jev-router
基于本地Laya模型实现提示词路由与防线 适合需要快速分类请求、进行风险拦截和模型分流的用户。
同名包的其他仓库
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-jev-router
User → Jev(Laya) → Agent — a DeepSeek Harness host plugin that puts a local System-1 decision model (Laya, the open Jev-compatible calibrated decision engine) between the user and the agent:
- Prompt router — every turn is classified (chat / code / architecture, plus urgency and code-need probes) in one sub-second forward pass; the fused verdict is injected as an advisory DSH notice before the main model spends its first token.
- Risk gate (optional) — 3-probe calibrated vote on
bash/pwshcalls; escalates to a user confirmation instead of running silently. - Peak/quota awareness — notices carry live peak/off-peak (Asia/Ho_Chi_Minh) and low-quota tags.
- Fail-open by construction — if the decision server is down, cold, or slow, turns run untouched. The layer steers; it never blocks.
A companion decision server is required at http://127.0.0.1:8755 — pick one from
the jev-laya-dsh repo:
onnx-rust-server/— Rust/ort single binary (recommended; macOS arm64 release artifact available)onnx-server/— Node/ONNX equivalentlaya-server/— Python/torch reference
Install (DeepSeek Harness profile)
# copy lib/ into your profile, e.g.
#
/packages/dsh-jev-router/lib/index.js
# then wire it in
/cordis.patch.yml:
- insert:
- id: local-jev-router
name: "@local/dsh-jev-router"
config:
routing: true
gate: false
modelSwap: true
modelByTier:
tier2: { provider: your-provider, model: your-strong-model }
Full configuration table and architecture: jev-laya-dsh README.
License
MIT. Uses the open Laya model (Apache-2.0, © Convai Innovations) via a local decision server — "Jev" (TypeSafe) is not used.