@michengai/dsh-automation 0.1.31 → 0.1.32

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/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  The five most recent published versions are listed below. Git tags and GitHub Releases now mirror these entries; historical sections retain links to their original release commits.
6
6
 
7
+ ## 0.1.32 — 2026-09-06
8
+
9
+ - Removed the fixed unattended tool allowlist and background-shell ban so tool calls and background process management follow DSH. Retained automatic rejection of approval requests and task timeout cancellation.
10
+
7
11
  ## 0.1.31 — 2026-09-05
8
12
 
9
13
  - Aligned the scheduled-task editor with the Host modal surface, elevation, themed mask, and borderless close icon while preserving its existing dismissal behavior.
@@ -4,6 +4,10 @@
4
4
 
5
5
  以下记录最近发布的五个版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
6
6
 
7
+ ## 0.1.32 — 2026-09-06
8
+
9
+ - 移除无人值守自动化的固定工具白名单和后台 shell 禁令,工具调用及后台进程管理统一遵循 DSH;保留需要审批即拒绝和任务超时取消约束。
10
+
7
11
  ## 0.1.31 — 2026-09-05
8
12
 
9
13
  - 将定时任务编辑器的浮层背景、阴影、主题遮罩和无边框关闭图标与宿主统一,同时保留原有关闭行为。
package/README.md CHANGED
@@ -124,6 +124,7 @@ Each dispatched run uses the saved prompt, workspace, model, and permission boun
124
124
  | Item | Behavior |
125
125
  | --- | --- |
126
126
  | Permission | Options and the default come directly from the Host `permissionPresets` service, including custom presets. |
127
+ | Tool calls | Follow Host tool availability, permission, and approval checks without an additional fixed tool allowlist or a background-shell ban. The Host manages background processes. |
127
128
  | Full access | The official `danger-full-access` option uses the same risk confirmation and orange warning as Chat. |
128
129
  | Approval | Chat create follows the session policy. Full access (`never`) proceeds; Workspace Write / Read Only (`ask`) shows the official card. Unattended runs stay fail-closed `never`. |
129
130
  | Retry | No automatic retry after a started run. |
package/README.zh-CN.md CHANGED
@@ -124,6 +124,7 @@ dsh --profile web --dump-config
124
124
  | 项目 | 行为 |
125
125
  | --- | --- |
126
126
  | 权限 | 列表和默认值直接来自 Host 官方 `permissionPresets` 服务;支持 Host 注册的自定义预设。 |
127
+ | 工具调用 | 遵循 Host 的工具可用性、权限和审批检查,不额外维护固定工具白名单或禁止后台 shell;后台进程由 Host 管理。 |
127
128
  | 完全访问 | 选择官方 `danger-full-access` 时显示与 Chat 一致的风险确认和橙色提示。 |
128
129
  | 审批 | 对话创建跟随当前会话策略。Full access(`never`)直接创建;Workspace Write / Read Only(`ask`)走官方授权卡。无人值守运行仍是 fail-closed 的 `never`。 |
129
130
  | 重试 | 已经开始的运行不会自动重试。 |
package/lib/index.js CHANGED
@@ -54,27 +54,6 @@ function automationSessionTitle(taskName, iso, timeZone2) {
54
54
  }
55
55
 
56
56
  // src/executor.ts
57
- var UNATTENDED_TOOL_ALLOWLIST = /* @__PURE__ */ new Set([
58
- "run_code",
59
- "bash",
60
- "pwsh",
61
- "read",
62
- "read_image",
63
- "write",
64
- "edit",
65
- "str_replace_editor",
66
- "glob",
67
- "grep",
68
- "lsp",
69
- "web_search",
70
- "web_fetch",
71
- "skill",
72
- "session_search",
73
- "session_trace",
74
- "session_event_read",
75
- "session_event_search",
76
- "session_event_trace"
77
- ]);
78
57
  var CANCEL_CONVERGENCE_TIMEOUT_MS = 1e4;
79
58
  async function settlesWithin(promise2, timeoutMs) {
80
59
  let timer;
@@ -89,12 +68,6 @@ async function settlesWithin(promise2, timeoutMs) {
89
68
  if (timer !== void 0) clearTimeout(timer);
90
69
  }
91
70
  }
92
- function unattendedToolGuardReason(name2, args) {
93
- if ((name2 === "bash" || name2 === "pwsh") && typeof args === "object" && args !== null && args.run_in_background === true) {
94
- return "\u65E0\u4EBA\u503C\u5B88\u8FD0\u884C\u4E0D\u5141\u8BB8\u542F\u52A8\u540E\u53F0\u8FDB\u7A0B\u3002";
95
- }
96
- return UNATTENDED_TOOL_ALLOWLIST.has(name2) ? void 0 : `\u5DE5\u5177 '${name2}' \u4E0D\u5728\u65E0\u4EBA\u503C\u5B88\u81EA\u52A8\u5316\u5141\u8BB8\u5217\u8868\u4E2D\u3002`;
97
- }
98
71
  function applyUnattendedPermission(presets, session, permission) {
99
72
  presets.set(session, permission);
100
73
  setApprovalPolicy(session, "never");
@@ -173,7 +146,6 @@ async function executeAutomationRun(ctx, definition, run, config2) {
173
146
  const agent = agentCtx.agent;
174
147
  if (agent === void 0) throw new Error("automation setup has no scoped Agent");
175
148
  applyUnattendedPermission(ctx.permissionPresets, agent.session, target.permissionPreset);
176
- agentCtx.tools.guard((exec) => unattendedToolGuardReason(exec.name, exec.arguments));
177
149
  }
178
150
  }));
179
151
  await handle.agent.whenIdle();
@@ -13,7 +13,6 @@ interface SessionEventReader {
13
13
  }
14
14
  /** 对不保证及时响应 AbortSignal 的宿主任务设置第二道退出上限。 */
15
15
  export declare function settlesWithin(promise: Promise<unknown>, timeoutMs: number): Promise<boolean>;
16
- export declare function unattendedToolGuardReason(name: string, args: unknown): string | undefined;
17
16
  export interface RunCompletion {
18
17
  readonly sessionId?: string;
19
18
  readonly status: 'succeeded' | 'failed' | 'cancelled';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@michengai/dsh-automation",
3
- "version": "0.1.31",
3
+ "version": "0.1.32",
4
4
  "description": "在独立 DSH Session 中按计划执行编码任务,支持 Web 设置页与 Agent 双入口管理。",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",