@michengai/dsh-automation 1.0.6 → 1.0.7
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 +8 -0
- package/CHANGELOG.zh-CN.md +8 -0
- package/README.md +39 -0
- package/README.zh-CN.md +40 -0
- package/lib/client.js +14 -3
- package/lib/client.js.map +3 -3
- package/lib/index.js +300 -13
- package/lib/types/client/api-base.d.ts +20 -0
- package/lib/types/client/bundle-config.d.ts +59 -0
- package/lib/types/client/contracts.d.ts +1 -0
- package/lib/types/client/index.d.ts +2 -0
- package/lib/types/client/locales.d.ts +10 -0
- package/lib/types/client/plugin-update-ui.d.ts +2 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/plugin-updater.d.ts +1 -0
- package/lib/types/settings-manager.d.ts +27 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
Upcoming changes and 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
|
+
## 1.0.7 - 2026-10-23
|
|
8
|
+
|
|
9
|
+
- **Dedicated Sidebar Activity Bar Entry**: Supports toggling a dedicated scheduled tasks icon on the primary activity bar from the plugin bundle configuration card. Enabled by default on new installs to seamlessly replace the built-in entry, expanding into a full 960px centered workbench for editing long prompts, recurrence rules, and audit logs.
|
|
10
|
+
- **Hide Official Automation Entry Toggle**: Supports toggling whether to hide the host's built-in "Automation tasks" (`ui-schedule`) entry. Enabled by default; automatically resets active panel to default conversation if official panel is open; features persistent client caching against network flicker; restores built-in entry cleanly when disabled or if this plugin is uninstalled.
|
|
11
|
+
- **Online Update Switch & Enterprise Lockdown**: Supports toggling update check status from the plugin card. Supports declaring `updater: false` or `onlineUpdate: false` in Cordis configuration for full lockdown (403 blocked and UI disabled with notice).
|
|
12
|
+
- **Reverse Proxy Subpath Support**: Resolves API endpoints against `document.baseURI` with trailing slash guards, preventing 404 errors when DSH is hosted behind reverse proxies with path prefixes.
|
|
13
|
+
- **Persistent Settings & Security Hardening**: Supports `stateDir` configuration; secures settings HTTP endpoints with host authentication check, CSRF marker validation, and payload size bounds.
|
|
14
|
+
|
|
7
15
|
## 1.0.6 - 2026-10-22
|
|
8
16
|
|
|
9
17
|
- Fix sidebar rebound on collapse after searching: prevent the official workspace tree from mistakenly triggering `expandSidebar` on narrow rail mount due to historical search requests, keeping sidebar collapse stable (Issue #20).
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
以下记录待发布变更及近期已发布版本。Git 标签与 GitHub Release 现已和这些条目同步;历史条目继续保留原始发布提交链接。
|
|
6
6
|
|
|
7
|
+
## 1.0.7 - 2026-10-23
|
|
8
|
+
|
|
9
|
+
- **侧边栏独立入口**:在插件扩展配置卡片中支持自主开启/关闭左侧主活动栏常驻「定时任务」快捷入口,初装默认开启,与屏蔽官方入口协同无缝平替官方活动栏入口,直达 960px 居中大版心主工作台,便于查看长指令、调度配置与运行历史;与会话树次级页签双层互补。
|
|
10
|
+
- **屏蔽官方自动化入口开关**:支持在插件扩展配置卡片中开启/关闭是否隐藏宿主自带的「自动化任务」(`ui-schedule`)入口,默认开启;隐藏时自动将官方 schedules 面板切回默认会话,杜绝主区孤立悬空;带有本地持久化缓存防闪烁;若关闭该项或卸载本插件,官方自带入口将自动完好无损地复现,绝无残留。
|
|
11
|
+
- **在线更新开关与企业合规锁定**:支持在插件卡片中随时切换在线检查更新状态;支持在 Cordis 配置中声明 `updater: false` 或 `onlineUpdate: false` 锁定更新,锁定状态下更新接口强行阻断返回 403,界面自动置灰并提示锁定。
|
|
12
|
+
- **反向代理部署支持**:端点路径自动按页面 `document.baseURI` 解析,彻底解决在带子路径前缀反代(如 `/app/dsh/`)部署下更新与设置端点 404 的问题。
|
|
13
|
+
- **配置持久化与安全性增强**:支持 `stateDir` 配置项;设置 API 补齐宿主认证门禁与跨站防御,读写端点安全可靠。
|
|
14
|
+
|
|
7
15
|
## 1.0.6 - 2026-10-22
|
|
8
16
|
|
|
9
17
|
- 修复搜索后侧栏无法收起(收起后瞬间弹回)的缺陷:阻断官方任务树在窄轨收起状态下因历史搜索请求而误调 `expandSidebar` 导致侧栏秒弹回的问题,保障收起操作稳定执行(Issue #20)。
|
package/README.md
CHANGED
|
@@ -103,6 +103,45 @@ dsh --profile web --dump-config
|
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
Restart DSH Web and hard-refresh the browser. Pin a version with `@0.1.5` instead of `@latest` when needed.
|
|
106
|
+
- **Reverse Proxy Deployment**: Supports running DSH behind a reverse proxy with a path prefix (e.g. `/app/dsh/`). Plugin API and update check endpoints resolve relative to the document base URI (`document.baseURI`) to avoid 404 errors caused by stripped path prefixes.
|
|
107
|
+
|
|
108
|
+
## Configuration & Optional Toggles
|
|
109
|
+
|
|
110
|
+
The plugin supports unified management via the host plugin configuration card:
|
|
111
|
+
> **Sidebar → Plugins → Click `@michengai/dsh-automation` details** (registered in the host `plugins.bundle.config` slot).
|
|
112
|
+
|
|
113
|
+
Two native toggle switches are available:
|
|
114
|
+
|
|
115
|
+
### 1. Sidebar Entry (`sidebarEntry`)
|
|
116
|
+
- **Default**: Off (`false`)
|
|
117
|
+
- **Description**: Displays a dedicated **Scheduled Tasks** icon on the primary activity bar.
|
|
118
|
+
- **Effect**:
|
|
119
|
+
- When enabled, clicking the sidebar icon opens the full task center inside a **960px centered view** (aligned with official plugin manager conventions), providing ample room for editing multi-step prompts, schedules, and inspect runs;
|
|
120
|
+
- When toggled off, cleanly unregisters the slot and safely switches away if the panel was active;
|
|
121
|
+
- The standard Settings modal and the workspace rail tabs remain fully available and in sync regardless of this toggle.
|
|
122
|
+
|
|
123
|
+
### 2. Online Update (`onlineUpdate` / `updater`)
|
|
124
|
+
- **Default**: On (`true`)
|
|
125
|
+
- **Description**: Controls whether the plugin checks for and installs online updates.
|
|
126
|
+
- **Effect**:
|
|
127
|
+
- **UI Integration**: Disabling the switch instantly removes update chips and check buttons from the settings header;
|
|
128
|
+
- **Server-Side Enforcement**: All update check and install requests return `HTTP 403` when disabled;
|
|
129
|
+
- **Host/Platform Lockdown**: Supports declarative lockdown in Cordis configuration (bundle patch):
|
|
130
|
+
```yaml
|
|
131
|
+
updater: false # or onlineUpdate: false
|
|
132
|
+
```
|
|
133
|
+
When locked, the updater is completely disabled at startup, and the UI toggle is disabled with a locked notice.
|
|
134
|
+
|
|
135
|
+
### 3. Hide Official Automation Entry (`hideOfficialSchedule`)
|
|
136
|
+
- **Default**: On (`true`)
|
|
137
|
+
- **Description**: Controls whether to hide the host's built-in "Automation tasks" (`ui-schedule`) entry to avoid conflict.
|
|
138
|
+
- **Effect**:
|
|
139
|
+
- **Clean Sidebar**: Installed by default with the built-in entry hidden, avoiding duplicate icons;
|
|
140
|
+
- **Instant Response**: Toggling off immediately restores the built-in icon;
|
|
141
|
+
- **Zero Residual Changes**: Toggling off or uninstalling the plugin restores the built-in entry automatically.
|
|
142
|
+
|
|
143
|
+
### 4. Storage Directory Configuration (`stateDir`)
|
|
144
|
+
- Supports configuring a custom state directory via `stateDir` in `cordis.patch.yml`. Settings are saved to `settings.json` within that directory, falling back to the active profile directory when omitted.
|
|
106
145
|
|
|
107
146
|
## Updates
|
|
108
147
|
|
package/README.zh-CN.md
CHANGED
|
@@ -103,6 +103,46 @@ dsh --profile web --dump-config
|
|
|
103
103
|
```
|
|
104
104
|
|
|
105
105
|
安装后重启 DSH Web,并在浏览器硬刷新。需要钉死某一版时,把 `@latest` 换成 `@0.1.5`。
|
|
106
|
+
- **反向代理部署**:支持将 DSH 部署在带路径前缀的反向代理后面(如 `/app/dsh/`),插件 API 与更新检查端点统一自动按页面基址(`document.baseURI`)相对解析,避免丢失代理路径前缀导致 404。
|
|
107
|
+
|
|
108
|
+
## 插件配置与可选开关
|
|
109
|
+
|
|
110
|
+
插件支持在 DSH 插件扩展配置中统一管理:
|
|
111
|
+
> **主界面侧边栏「插件」→ 点击 `@michengai/dsh-automation` 详情页**(对应宿主 `plugins.bundle.config` 插槽)。
|
|
112
|
+
|
|
113
|
+
此处提供两个原生扁平行开关:
|
|
114
|
+
|
|
115
|
+
### 1. 侧边栏入口 (`sidebarEntry`)
|
|
116
|
+
- **默认状态**:关闭(`false`)
|
|
117
|
+
- **功能说明**:在宿主左侧主活动栏增加常驻的 **「定时任务」** 图标入口。
|
|
118
|
+
- **生效效果**:
|
|
119
|
+
- 开启后,在侧边栏点击即可直达定时任务中心,并在主工作区以 **960px 居中版心**(对齐官方插件管理与市场规范)展开完整大面板,便于集中管理长任务指令、定时计划与执行记录;
|
|
120
|
+
- 关闭后安全注销侧栏槽位(若当前正停留在定时任务面板,会自动安全切回默认视图,防止悬空和白屏);
|
|
121
|
+
- 无论是否开启侧栏入口,DSH 原有的「设置 → 定时任务」弹窗以及会话侧栏内的「任务与定时」页签均始终保留,数据与状态 100% 实时同步。
|
|
122
|
+
|
|
123
|
+
### 2. 在线更新 (`onlineUpdate` / `updater`)
|
|
124
|
+
- **默认状态**:开启(`true`)
|
|
125
|
+
- **功能说明**:控制是否允许在线检查并安装定时任务插件的新版本。
|
|
126
|
+
- **生效效果**:
|
|
127
|
+
- **界面联动**:关闭开关后,定时任务设置标题旁的「检查更新」按钮与版本提示将即时隐藏,无需刷新页面;开启后自动恢复展示;
|
|
128
|
+
- **接口安全拦截**:关闭后,服务端的更新路由对任何版本检查和安装请求均返回 `HTTP 403` 禁用状态,彻底杜绝在插件内安装未审核版本;
|
|
129
|
+
- **宿主/平台级锁定**:面向精选插件索引或企业安全合规环境,支持直接在 Cordis 配置文件(bundle patch)中声明,无需进入界面手动配置:
|
|
130
|
+
```yaml
|
|
131
|
+
updater: false # 或 onlineUpdate: false
|
|
132
|
+
```
|
|
133
|
+
配置生效后,更新器在启动时即被完全禁用,且更新入口默认保持隐藏,前端 Switch 显示为锁定置灰状态。
|
|
134
|
+
- **更新模式**:发现新版后,只有检测到 DSH CLI 或 Desktop 更新服务时才可使用“自动更新”;其他环境会在弹窗中提供可复制、与当前 Profile 对应的手工更新命令。
|
|
135
|
+
|
|
136
|
+
### 3. 屏蔽官方自动化入口 (`hideOfficialSchedule`)
|
|
137
|
+
- **默认状态**:开启(`true`)
|
|
138
|
+
- **功能说明**:控制是否隐藏宿主自带的「自动化任务」(`ui-schedule`)活动栏入口,避免与本插件功能冲突。
|
|
139
|
+
- **生效效果**:
|
|
140
|
+
- **默认清爽**:安装本插件后,宿主自带的自动化任务活动栏按钮默认隐藏,避免界面出现两个相似入口;
|
|
141
|
+
- **即时响应**:若手动关闭此项,官方入口立刻重新出现;
|
|
142
|
+
- **无损自愈与卸载复原**:关闭开关或通过标准命令卸载本插件后,官方自带的自动化入口将自动完好无损地复现,绝无残留修改。
|
|
143
|
+
|
|
144
|
+
### 4. 存储目录配置 (`stateDir`)
|
|
145
|
+
- 支持在 `cordis.patch.yml` 中声明自定义存储目录(如 `stateDir: D:/Data/dsh-automation`),设置将持久化至该目录下的 `settings.json`,未指定时默认存储在当前 Profile 目录。
|
|
106
146
|
|
|
107
147
|
## 在线更新
|
|
108
148
|
|