dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
本地非生成式决策层:phocinae_ask 与 phocinae_gate 由小型决策模型返回带校准置信度的类型化裁决,并对无法回答的情况 fail-closed 升级。需在本机 8155 端口运行 phocinae-server(pip 安装)并加载 Phocinae-Largha-150M-v1 模型。
English · 中文 · Español · Português · हिन्दी
A local, non-generative decision layer for DeepSeek Harness. A 150M-parameter model answers yes/no, choice and 2–10 score questions in one forward pass, and a fail-closed gate screens tool calls before they run.
phocinae_ask for typed batch decisions; phocinae_gate for one command or action.tools/pre-execute: unreachable service → ask a human, never silently allow.pip install phocinae-server
huggingface-cli download Phocinae/Phocinae-Largha-150M-v1 --local-dir ./model
PHOC_MODEL_DIR=./model python -m phocinae.main
dsh plugin --profile web add dsh-phocinae@0.2.5
curl http://127.0.0.1:8155/health
{"status":"ok","model_loaded":true} means the service is ready. Pin dsh-phocinae@0.2.5: a bare add dsh-phocinae can resolve to an older build while pnpm's minimumReleaseAge gate holds a fresh release back.
| Surface | What it does |
|---|---|
phocinae_ask | Runs up to 64 typed questions against one state; returns answers, calibrated confidence and an advisory escalate flag. |
phocinae_gate | Judges one command or action as allow, ask or deny; checks it without executing it. |
tools/pre-execute gate | Screens every tool call matching gate.tools before execution; fail-closed. |
phocinae skill | Tells the model when a local decision is the right tool and how to read escalate. |
Ask two questions about one state:
{"state":"The user wants to delete /tmp/build. The path is inside the workspace.","questions":[{"id":"safe","type":"noul","threshold":0.8},{"id":"urgency","type":"score"}]}
The response shape is:
{"answers":{"safe":true,"urgency":4},"confidence":{"safe":0.92,"urgency":0.71},"escalate":false}
Gate a dangerous command:
{"command":"rm -rf /","toolName":"shell","cwd":"/home/me/project"}
It returns decision: "deny" with a reason and confidence; the command is never run. These outputs illustrate the schema, not a recorded fixture.
phocinae_ask, phocinae_gate, or the pre-execute gate.http://127.0.0.1:8155/v1/systemone.allow / ask / deny; low confidence becomes escalate, and an unreachable service becomes ask in failMode: closed.Defaults live in cordis.patch.yml and lib/config.mjs. Every key has a default.
| Key | Default | Meaning |
|---|---|---|
endpoint | http://127.0.0.1:8155/v1/systemone | Decision service. Loopback only unless allowRemoteEndpoint: true. |
timeoutMs | 3000 | Per request; one attempt. |
escalateAt | 0.6 | Confidence below this marks an answer escalate: true. |
gate.mode | harm | harm, tri-state, noul or off. |
gate.tools | ['*'] | Tool names to screen: exact, globs, or *. |
gate.failMode | closed | closed asks a human when the service is unreachable; open allows. |
To use only the tools and screen nothing:
- id: phocinae
config:
gate:
mode: off
^22.19 or >=24.>=0.2.1-0 <0.3.0; the bundle row mounts phocinae_ask, phocinae_gate, the gate and the skill.phocinae-server must be reachable at the configured endpoint.| Symptom | Fix |
|---|---|
PHOCINAE_SERVICE_UNAVAILABLE | Start the server and check curl http://127.0.0.1:8155/health. |
| Bare add installs an old version | Re-add with dsh-phocinae@0.2.5; check dsh --profile web --dump-config. |
| The gate asks for everything | Confirm the server is up; in failMode: closed, an unreachable service deliberately asks. |
| The gate is too aggressive/lenient | Tune gate.mode, gate.tools, gate.minConfidence, gate.autoAllow; do not turn it off blindly. |
Apache-2.0. The model card and server are separate projects: Phocinae-Largha-150M-v1 and phocinae-server.