@duke-dsh-plugins/dsh-agent-approval 1.8.2 → 1.10.0
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 +9 -10
- package/client.js +176 -172
- package/index.js +478 -228
- package/package.json +2 -2
- package/typert.host.js +13 -5
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duke-dsh-plugins/dsh-agent-approval",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Agent-decided approvals for DeepSeek Harness: an 自动审批 permission mode where every sandbox escalation is judged automatically (default judge: one direct LLM call with no subagent session; optional isolated judge subagent
|
|
3
|
+
"version": "1.10.0",
|
|
4
|
+
"description": "Agent-decided approvals for DeepSeek Harness: an 自动审批 permission mode where every sandbox escalation is judged automatically by an LLM (default judge: one direct LLM call with no subagent session; optional isolated judge subagent) plus an independent 自动审查 per-call review mode (Full access base; every tool call reviewed before execution by the TypeSafe Jev decision model, with interpreter scripts the command references expanded into the judge state so temp scripts are judged by their actual code; risky calls rejected with no human fallback), with a configurable judge model and a per-session audit trail in the conversation window's 审批 tab.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/MoonlitDropOfBlood/dsh-agent-approval.git"
|
package/typert.host.js
CHANGED
|
@@ -115,9 +115,17 @@ const setReviewDefaultValueSchema = z
|
|
|
115
115
|
})
|
|
116
116
|
.readonly();
|
|
117
117
|
|
|
118
|
+
/**
|
|
119
|
+
* v1.10.0: the TypeSafe Jev backend belongs to the 自动审查 (per-call review)
|
|
120
|
+
* mode alone — it is NOT a judge provider. `setJevConfig` therefore reports
|
|
121
|
+
* the review gate and the (possibly auto-enabled) review default so the
|
|
122
|
+
* client can reflect "配置了 Jev 就启用自动审查" without a second round trip.
|
|
123
|
+
*/
|
|
118
124
|
const setJevValueSchema = z
|
|
119
125
|
.object({
|
|
120
126
|
jev: jevConfigSchema,
|
|
127
|
+
reviewAvailable: z.boolean(),
|
|
128
|
+
reviewDefault: z.boolean(),
|
|
121
129
|
})
|
|
122
130
|
.readonly();
|
|
123
131
|
|
|
@@ -557,17 +565,17 @@ export const TYPERT = {
|
|
|
557
565
|
kind: "method",
|
|
558
566
|
name: "setModel",
|
|
559
567
|
signature: "@Remote('setModel') async setModel(request: AgentApprovalSetModelRequest): Promise<AgentApprovalSetModelResult>",
|
|
560
|
-
summary: "Set the judge model route (empty strings =
|
|
568
|
+
summary: "Set the judge model route (empty strings = use the harness default model; the escalation judge is always an LLM).",
|
|
561
569
|
jsDoc:
|
|
562
|
-
"/**\n * Set provider/model used by the approval judge; empty strings clear the override
|
|
570
|
+
"/**\n * Set provider/model used by the approval judge; empty strings clear the override (the judge then uses the harness default model). Since v1.10.0 Jev is not a judge provider — a legacy 'typesafe' selection clears the override.\n * @param request - { provider, model }.\n * @returns the stored route.\n */",
|
|
563
571
|
},
|
|
564
572
|
{
|
|
565
573
|
kind: "method",
|
|
566
574
|
name: "setJevConfig",
|
|
567
575
|
signature: "@Remote('setJevConfig') async setJevConfig(request: AgentApprovalSetJevRequest): Promise<AgentApprovalSetJevResult>",
|
|
568
|
-
summary: "Set the TypeSafe Jev backend settings (API key, endpoint, model, confidence gate; persisted).",
|
|
576
|
+
summary: "Set the TypeSafe Jev backend settings of the 自动审查 mode (API key, endpoint, model, confidence gate; persisted; a resolvable key opens the review gate and enables 自动审查 for new sessions).",
|
|
569
577
|
jsDoc:
|
|
570
|
-
"/**\n * Update the Jev backend settings
|
|
578
|
+
"/**\n * Update the Jev backend settings of the per-call review mode (independent of the approval judge). Only provided fields change; confidence (the fail-closed gate) is clamped to [0.01, 0.99]. Saving a resolvable API key opens the review gate and turns 自动审查 on for new sessions.\n * @param request - { apiKey, endpoint, model, confidence }.\n * @returns the stored Jev settings plus the review gate and the review default.\n */",
|
|
571
579
|
},
|
|
572
580
|
{
|
|
573
581
|
kind: "method",
|
|
@@ -642,7 +650,7 @@ export const TYPERT = {
|
|
|
642
650
|
{
|
|
643
651
|
name: "AgentApprovalSetJevResult",
|
|
644
652
|
declaration:
|
|
645
|
-
"export type AgentApprovalSetJevResult = { ok: true; value: { readonly jev: AgentApprovalJevConfig } } | { ok: false; error: { code: string; message?: string } };",
|
|
653
|
+
"export type AgentApprovalSetJevResult = { ok: true; value: { readonly jev: AgentApprovalJevConfig; readonly reviewAvailable: boolean; readonly reviewDefault: boolean } } | { ok: false; error: { code: string; message?: string } };",
|
|
646
654
|
},
|
|
647
655
|
{
|
|
648
656
|
name: "AgentApprovalEnabledSession",
|