@duke-dsh-plugins/dsh-agent-approval 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/index.js +15 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
dsh plugin --profile web add /path/to/dsh-agent-approval
|
|
63
63
|
|
|
64
64
|
# 正式发布:从 GitHub Release tarball 安装(资产名为 npm pack 的 scope 形式)
|
|
65
|
-
dsh plugin --profile web add https://github.com/MoonlitDropOfBlood/dsh-agent-approval/releases/download/v1.7.
|
|
65
|
+
dsh plugin --profile web add https://github.com/MoonlitDropOfBlood/dsh-agent-approval/releases/download/v1.7.2/duke-dsh-plugins-dsh-agent-approval-1.7.2.tgz
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
重启 DSH 后:设置面板出现 **Agent 审批** 页;`/permission` 菜单出现第四项 **Agent 审批**。
|
package/index.js
CHANGED
|
@@ -1394,6 +1394,20 @@ export class AgentApprovalService extends TypertRemoteService {
|
|
|
1394
1394
|
|
|
1395
1395
|
const pApprove = Number(probabilities.approve);
|
|
1396
1396
|
const pReject = Number(probabilities.reject);
|
|
1397
|
+
// riskLevel 是与 decision 独立的另一条 Choice(v1.7.2):审计里 risk=high
|
|
1398
|
+
// 却看不到 high 的把握度,记录无法自解释。与 decision 同款防御读取,字段
|
|
1399
|
+
// 缺失只做省略——纯审计文本增强,不改变任何 outcome 判定与校验门槛。
|
|
1400
|
+
const riskProbabilities =
|
|
1401
|
+
risk && risk.probabilities && typeof risk.probabilities === "object" ? risk.probabilities : {};
|
|
1402
|
+
const pLow = Number(riskProbabilities.low);
|
|
1403
|
+
const pMedium = Number(riskProbabilities.medium);
|
|
1404
|
+
const pHigh = Number(riskProbabilities.high);
|
|
1405
|
+
const riskConfidence = risk ? Number(risk.confidence) : NaN;
|
|
1406
|
+
const riskParts = [];
|
|
1407
|
+
if (Number.isFinite(riskConfidence)) riskParts.push("置信度 " + riskConfidence.toFixed(2));
|
|
1408
|
+
if (Number.isFinite(pLow) && Number.isFinite(pMedium) && Number.isFinite(pHigh)) {
|
|
1409
|
+
riskParts.push("p low/medium/high " + pLow.toFixed(2) + "/" + pMedium.toFixed(2) + "/" + pHigh.toFixed(2));
|
|
1410
|
+
}
|
|
1397
1411
|
const rationale =
|
|
1398
1412
|
"Jev 决策=" + choice +
|
|
1399
1413
|
"(置信度 " + confidence.toFixed(2) +
|
|
@@ -1401,6 +1415,7 @@ export class AgentApprovalService extends TypertRemoteService {
|
|
|
1401
1415
|
? ",p approve/reject " + pApprove.toFixed(2) + "/" + pReject.toFixed(2)
|
|
1402
1416
|
: "") +
|
|
1403
1417
|
");风险=" + riskChoice +
|
|
1418
|
+
(riskParts.length > 0 ? "(" + riskParts.join(",") + ")" : "") +
|
|
1404
1419
|
";具体风险概率=" + probeNoul.toFixed(2) +
|
|
1405
1420
|
"。Jev 为结构化决策模型,不生成文字,本理由由概率分布合成。";
|
|
1406
1421
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duke-dsh-plugins/dsh-agent-approval",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.2",
|
|
4
4
|
"description": "Agent-decided approvals for DeepSeek Harness: a workspace-write base permission mode where an independent approval judge (an isolated subagent, or the TypeSafe Jev decision model via direct API) evaluates every sandbox escalation (risky operations are rejected), with a configurable approval model and a per-session audit trail in the conversation window's 审批 tab.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|