@duke-dsh-plugins/dsh-agent-approval 1.8.1 → 1.8.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.
Files changed (2) hide show
  1. package/client.js +7 -1
  2. package/package.json +1 -1
package/client.js CHANGED
@@ -200,6 +200,12 @@ window.__ModuleLoader__.load({
200
200
  // with no glyph the icon span is absent, leaving label + chevron.
201
201
  // Skip menu rows (handled above) and the settings dialog (its nav
202
202
  // row carries the same label but is owned by the settings-nav icon).
203
+ // The trigger renders whichever preset is CURRENTLY selected, so it
204
+ // must accept BOTH of our preset names (v1.8.2): 自动审批 and 自动审查
205
+ // are equally ours, and neither is in the host's permissionGlyphs —
206
+ // registerReviewMenuItem only marks menu rows, so without this the
207
+ // trigger showed 自动审查 with no icon at all.
208
+ const triggerLabels = [currentLabel, String(REVIEW_LABEL).trim()];
203
209
  const buttons = document.querySelectorAll("button");
204
210
  for (let i = 0; i < buttons.length; i++) {
205
211
  const button = buttons[i];
@@ -212,7 +218,7 @@ window.__ModuleLoader__.load({
212
218
  const s = spans[j].textContent ? spans[j].textContent.trim() : "";
213
219
  if (s.length > 0) { labelText = s; break; }
214
220
  }
215
- const matches = labelText === currentLabel && button.querySelector("svg") !== null;
221
+ const matches = triggerLabels.indexOf(labelText) !== -1 && button.querySelector("svg") !== null;
216
222
  if (matches) button.setAttribute(PERM_TRIGGER_MARKER, "");
217
223
  else button.removeAttribute(PERM_TRIGGER_MARKER);
218
224
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duke-dsh-plugins/dsh-agent-approval",
3
- "version": "1.8.1",
3
+ "version": "1.8.2",
4
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 or the TypeSafe Jev decision model), plus an opt-in 自动审查 per-call review mode (Full access base; every tool call reviewed by the Jev judge before execution, 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",