@hhuangpanda/dsh-automation 0.3.33 → 0.3.35
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/LICENSE +22 -22
- package/README.md +2 -2
- package/README.zh.md +2 -2
- package/docs/images/automation-example-en.png +0 -0
- package/docs/images/automation-example-zh.png +0 -0
- package/docs/reference.md +55 -55
- package/docs/reference.zh.md +55 -55
- package/lib/agent-configuration.js +1 -3
- package/lib/api.js +3 -2
- package/lib/client.js +1 -1
- package/lib/domain.js +2 -2
- package/package.json +23 -22
- package/screenshots.json +1 -1
package/LICENSE
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 alpacachen
|
|
4
|
-
Copyright (c) 2026 hhuangpanda
|
|
5
|
-
|
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
-
in the Software without restriction, including without limitation the rights
|
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
-
furnished to do so, subject to the following conditions:
|
|
12
|
-
|
|
13
|
-
The above copyright notice and this permission notice shall be included in all
|
|
14
|
-
copies or substantial portions of the Software.
|
|
15
|
-
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 alpacachen
|
|
4
|
+
Copyright (c) 2026 hhuangpanda
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
> **A fork of [alpacachen/dsh-automation](https://github.com/alpacachen/dsh-automation) that adds support
|
|
1
|
+
> **A fork of [alpacachen/dsh-automation](https://github.com/alpacachen/dsh-automation) that adds support up to DSH 0.2.1-rc.2.**
|
|
2
2
|
>
|
|
3
3
|
> If you used the original plugin, disable it before installing this one, or tasks will run twice.
|
|
4
4
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
## Get started
|
|
60
60
|
|
|
61
|
-
Targets DSH **0.1.7-rc.2**, **0.2.0-rc.1**, and **0.2.
|
|
61
|
+
Targets DSH **0.1.7-rc.2**, **0.2.0-rc.1**, **0.2.0-rc.2**, **0.2.1-rc.1** and **0.2.1-rc.2**. 0.3.35 is tested on 0.2.1-rc.2; earlier releases were tested on 0.2.0-rc.2. Versions up to 0.3.34 fail to load on DSH 0.2.1 and later, so update to 0.3.35.
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
64
|
dsh plugin --profile web add @hhuangpanda/dsh-automation
|
package/README.zh.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
> **这是 [alpacachen/dsh-automation](https://github.com/alpacachen/dsh-automation) 的 fork
|
|
1
|
+
> **这是 [alpacachen/dsh-automation](https://github.com/alpacachen/dsh-automation) 的 fork,新增支持至 DSH 0.2.1-rc.2。**
|
|
2
2
|
>
|
|
3
3
|
> 如果你用过原版插件,请先停用它再安装本插件,否则任务会重复执行。
|
|
4
4
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
## 开始使用
|
|
60
60
|
|
|
61
|
-
适配 DSH **0.1.7-rc.2**、**0.2.0-rc.1** 和 **0.2.0-rc.2
|
|
61
|
+
适配 DSH **0.1.7-rc.2**、**0.2.0-rc.1**、**0.2.0-rc.2**、**0.2.1-rc.1** 和 **0.2.1-rc.2**。0.3.35 已在 0.2.1-rc.2 上测试,更早的版本在 0.2.0-rc.2 上测试过。0.3.34 及更早版本无法在 DSH 0.2.1 及以上版本加载,请升级到 0.3.35。
|
|
62
62
|
|
|
63
63
|
```sh
|
|
64
64
|
dsh plugin --profile web add @hhuangpanda/dsh-automation
|
|
Binary file
|
|
Binary file
|
package/docs/reference.md
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
# Automation reference
|
|
2
|
-
|
|
3
|
-
[Back to overview](../README.md) · [简体中文](reference.zh.md)
|
|
4
|
-
|
|
5
|
-
## A few things to know before running tasks
|
|
6
|
-
|
|
7
|
-
- DSH must be running to execute tasks. After a restart, each eligible task catches up with only its latest missed occurrence; paused occurrences are skipped.
|
|
8
|
-
- Each plugin instance runs one automation at a time. Runs have a 1-hour limit by default, configurable through `maxRunDurationMs`.
|
|
9
|
-
- Pausing affects future scheduling; a started run continues. Stopping the current run, running now, or choosing Resume & run leaves the original schedule unchanged.
|
|
10
|
-
- Interactive approvals are never granted automatically. Unattended runs may wait until timeout.
|
|
11
|
-
- Pinned sessions keep their context and Agent/model configuration, apply task permissions, and do not reload skills. Changing the binding after creation requires the UI. A busy or unavailable target fails the run without creating a replacement session.
|
|
12
|
-
- Failed runs can be retried manually. Optional auto-pause counts failures and timeouts; success resets the count. A run whose outcome was not recorded before an unexpected restart becomes outcome unknown and is not automatically rerun.
|
|
13
|
-
- Message delivery has its own status. Failed sends never rerun tasks or automatically resend; an interrupted send becomes unknown. Manual cancellation and Host shutdown interruptions do not trigger reports. Platform acceptance does not guarantee receipt on the recipient's device.
|
|
14
|
-
|
|
15
|
-
## Reasoning effort
|
|
16
|
-
|
|
17
|
-
For fresh sessions, open **Edit → Agent execution**, choose a provider, then use the combined model menu to select **Model** or **Reasoning effort**. This uses the Host Menu primitive without changing the chat session's model selection. Choices come from that model's Host metadata, not a fixed low/medium/high list. **Default (no override)** preserves the normal Agent/model default; it does not turn reasoning off. Existing tasks keep their prior behavior. Switching models in the editor resets this choice to default.
|
|
18
|
-
|
|
19
|
-
For Agent tools, query `automation_options` with the candidate `provider` and `model` (or an existing task `id`) before using `reasoning_effort`. An explicit level requires a concrete provider/model pair and is validated by the Host before saving and running. Omit it on creation for the default, omit it on update to preserve the saved value, or pass `null` on update to clear it. HTTP updates use `execution.reasoningEffort`. When changing models through tools/API, also clear or replace an incompatible level. Pinned sessions always use their own reasoning configuration; task-level overrides apply only to fresh sessions.
|
|
20
|
-
|
|
21
|
-
## Manually delete run records
|
|
22
|
-
|
|
23
|
-
Expand a record in **Run history**, choose **Delete record**, and confirm. This removes only that record and its summary, error, and delivery status. It does not delete the session, recall messages, or change the task schedule, consecutive failure count, or paused state. Deletion cannot be undone.
|
|
24
|
-
|
|
25
|
-
Queued or running records and records whose messages are still sending cannot be deleted. Other finished records remain deletable while the task is running. Deleting the latest record makes the overview show the latest remaining result; deleting every record shows **No run records**.
|
|
26
|
-
|
|
27
|
-
## State storage
|
|
28
|
-
|
|
29
|
-
Run history is retained without a count limit by default. An explicit plugin `maxRunHistory` setting still limits retention. Previously pruned records cannot be restored by changing this setting.
|
|
30
|
-
|
|
31
|
-
State is written to a temporary file in the same directory, flushed, and atomically renamed over the previous file. Windows skips directory fsync; other platforms attempt it after the rename. If that post-commit step fails, the Host logs `AUTOMATION_DIRECTORY_SYNC_FAILED`: the operation is already committed and memory follows the new file, but persistence across a system crash or power loss is not guaranteed. Investigate the filesystem warning rather than retrying the operation. Failures before the rename still reject the operation and leave the previous state unchanged.
|
|
32
|
-
|
|
33
|
-
## Agent tools and schedule parameter reference
|
|
34
|
-
|
|
35
|
-
| Tool | Purpose |
|
|
36
|
-
| -------------------- | ---------------------------------------------------------------------------- |
|
|
37
|
-
| `automation_options` | Query current Host Agent, model, skill, and permission options. |
|
|
38
|
-
| `automation_create` | Create a task after the user confirms its complete configuration. |
|
|
39
|
-
| `automation_update` | Update task and execution settings; permission changes require confirmation. |
|
|
40
|
-
| `automation_list` | List tasks and run state. |
|
|
41
|
-
| `automation_run` | Queue one immediate run without changing the schedule. |
|
|
42
|
-
| `automation_pause` | Pause future scheduling. |
|
|
43
|
-
| `automation_resume` | Resume, optionally with one immediate run. |
|
|
44
|
-
| `automation_delete` | Delete the task and future scheduling, preserving existing sessions. |
|
|
45
|
-
|
|
46
|
-
Create and update support `agent_preset`, `provider` / `model`, `reasoning_effort`, and ordered `skills`; updates can clear execution overrides or replace the skill list. Creation also accepts `execution_mode: pinned-session`, `target_session_id`, and `session_target_confirmed: true` after user confirmation. Changing the target after creation and configuring message delivery require the UI.
|
|
47
|
-
|
|
48
|
-
| Type | Parameter | Format / example |
|
|
49
|
-
| --------- | ----------- | -------------------------------------------------------------------------- |
|
|
50
|
-
| One-time | `once_at` | RFC 3339 UTC instant, such as `2027-01-04T01:00:00.000Z`. |
|
|
51
|
-
| Recurring | `rrule` | One RFC 5545 rule without `DTSTART`, such as `FREQ=WEEKLY;BYDAY=MO,WE,FR`. |
|
|
52
|
-
| Recurring | `time_zone` | IANA zone, such as `Asia/Shanghai`. |
|
|
53
|
-
| Recurring | `start_at` | Local wall-clock time in `YYYY-MM-DDTHH:mm:ss` format. |
|
|
54
|
-
|
|
55
|
-
Recurring schedules require `rrule`, `time_zone`, and `start_at` together.
|
|
1
|
+
# Automation reference
|
|
2
|
+
|
|
3
|
+
[Back to overview](../README.md) · [简体中文](reference.zh.md)
|
|
4
|
+
|
|
5
|
+
## A few things to know before running tasks
|
|
6
|
+
|
|
7
|
+
- DSH must be running to execute tasks. After a restart, each eligible task catches up with only its latest missed occurrence; paused occurrences are skipped.
|
|
8
|
+
- Each plugin instance runs one automation at a time. Runs have a 1-hour limit by default, configurable through `maxRunDurationMs`.
|
|
9
|
+
- Pausing affects future scheduling; a started run continues. Stopping the current run, running now, or choosing Resume & run leaves the original schedule unchanged.
|
|
10
|
+
- Interactive approvals are never granted automatically. Unattended runs may wait until timeout.
|
|
11
|
+
- Pinned sessions keep their context and Agent/model configuration, apply task permissions, and do not reload skills. Changing the binding after creation requires the UI. A busy or unavailable target fails the run without creating a replacement session.
|
|
12
|
+
- Failed runs can be retried manually. Optional auto-pause counts failures and timeouts; success resets the count. A run whose outcome was not recorded before an unexpected restart becomes outcome unknown and is not automatically rerun.
|
|
13
|
+
- Message delivery has its own status. Failed sends never rerun tasks or automatically resend; an interrupted send becomes unknown. Manual cancellation and Host shutdown interruptions do not trigger reports. Platform acceptance does not guarantee receipt on the recipient's device.
|
|
14
|
+
|
|
15
|
+
## Reasoning effort
|
|
16
|
+
|
|
17
|
+
For fresh sessions, open **Edit → Agent execution**, choose a provider, then use the combined model menu to select **Model** or **Reasoning effort**. This uses the Host Menu primitive without changing the chat session's model selection. Choices come from that model's Host metadata, not a fixed low/medium/high list. **Default (no override)** preserves the normal Agent/model default; it does not turn reasoning off. Existing tasks keep their prior behavior. Switching models in the editor resets this choice to default.
|
|
18
|
+
|
|
19
|
+
For Agent tools, query `automation_options` with the candidate `provider` and `model` (or an existing task `id`) before using `reasoning_effort`. An explicit level requires a concrete provider/model pair and is validated by the Host before saving and running. Omit it on creation for the default, omit it on update to preserve the saved value, or pass `null` on update to clear it. HTTP updates use `execution.reasoningEffort`. When changing models through tools/API, also clear or replace an incompatible level. Pinned sessions always use their own reasoning configuration; task-level overrides apply only to fresh sessions.
|
|
20
|
+
|
|
21
|
+
## Manually delete run records
|
|
22
|
+
|
|
23
|
+
Expand a record in **Run history**, choose **Delete record**, and confirm. This removes only that record and its summary, error, and delivery status. It does not delete the session, recall messages, or change the task schedule, consecutive failure count, or paused state. Deletion cannot be undone.
|
|
24
|
+
|
|
25
|
+
Queued or running records and records whose messages are still sending cannot be deleted. Other finished records remain deletable while the task is running. Deleting the latest record makes the overview show the latest remaining result; deleting every record shows **No run records**.
|
|
26
|
+
|
|
27
|
+
## State storage
|
|
28
|
+
|
|
29
|
+
Run history is retained without a count limit by default. An explicit plugin `maxRunHistory` setting still limits retention. Previously pruned records cannot be restored by changing this setting.
|
|
30
|
+
|
|
31
|
+
State is written to a temporary file in the same directory, flushed, and atomically renamed over the previous file. Windows skips directory fsync; other platforms attempt it after the rename. If that post-commit step fails, the Host logs `AUTOMATION_DIRECTORY_SYNC_FAILED`: the operation is already committed and memory follows the new file, but persistence across a system crash or power loss is not guaranteed. Investigate the filesystem warning rather than retrying the operation. Failures before the rename still reject the operation and leave the previous state unchanged.
|
|
32
|
+
|
|
33
|
+
## Agent tools and schedule parameter reference
|
|
34
|
+
|
|
35
|
+
| Tool | Purpose |
|
|
36
|
+
| -------------------- | ---------------------------------------------------------------------------- |
|
|
37
|
+
| `automation_options` | Query current Host Agent, model, skill, and permission options. |
|
|
38
|
+
| `automation_create` | Create a task after the user confirms its complete configuration. |
|
|
39
|
+
| `automation_update` | Update task and execution settings; permission changes require confirmation. |
|
|
40
|
+
| `automation_list` | List tasks and run state. |
|
|
41
|
+
| `automation_run` | Queue one immediate run without changing the schedule. |
|
|
42
|
+
| `automation_pause` | Pause future scheduling. |
|
|
43
|
+
| `automation_resume` | Resume, optionally with one immediate run. |
|
|
44
|
+
| `automation_delete` | Delete the task and future scheduling, preserving existing sessions. |
|
|
45
|
+
|
|
46
|
+
Create and update support `agent_preset`, `provider` / `model`, `reasoning_effort`, and ordered `skills`; updates can clear execution overrides or replace the skill list. Creation also accepts `execution_mode: pinned-session`, `target_session_id`, and `session_target_confirmed: true` after user confirmation. Changing the target after creation and configuring message delivery require the UI.
|
|
47
|
+
|
|
48
|
+
| Type | Parameter | Format / example |
|
|
49
|
+
| --------- | ----------- | -------------------------------------------------------------------------- |
|
|
50
|
+
| One-time | `once_at` | RFC 3339 UTC instant, such as `2027-01-04T01:00:00.000Z`. |
|
|
51
|
+
| Recurring | `rrule` | One RFC 5545 rule without `DTSTART`, such as `FREQ=WEEKLY;BYDAY=MO,WE,FR`. |
|
|
52
|
+
| Recurring | `time_zone` | IANA zone, such as `Asia/Shanghai`. |
|
|
53
|
+
| Recurring | `start_at` | Local wall-clock time in `YYYY-MM-DDTHH:mm:ss` format. |
|
|
54
|
+
|
|
55
|
+
Recurring schedules require `rrule`, `time_zone`, and `start_at` together.
|
package/docs/reference.zh.md
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
# Automation 使用参考
|
|
2
|
-
|
|
3
|
-
[返回介绍](../README.zh.md) · [English](reference.md)
|
|
4
|
-
|
|
5
|
-
## 运行前,了解这几个边界
|
|
6
|
-
|
|
7
|
-
- 运行时需保持 DSH 在线;重启后,每个符合条件的任务只补跑最近错过的一次,暂停期间的周期会被跳过。
|
|
8
|
-
- 同一插件实例一次执行一个自动化任务。默认运行上限为 1 小时,可通过 `maxRunDurationMs` 调整。
|
|
9
|
-
- 暂停影响未来调度,已开始的运行会继续;停止当前运行、立即运行或「恢复并运行」都不改变原计划。
|
|
10
|
-
- 要求交互批准的权限不会被自动批准,无人值守任务可能等待到超时。
|
|
11
|
-
- 固定会话沿用其上下文及 Agent/模型配置,应用任务权限,不重新加载技能。创建后更换绑定需在界面中操作;目标忙碌或不可用时直接失败,不另建替代会话。
|
|
12
|
-
- 失败运行可手动重试;可选自动暂停将失败和超时计入连续次数,成功后清零。意外重启时未完成记录的运行标为「结果未知」,不会自动重跑。
|
|
13
|
-
- 消息投递单独记录状态;发送失败不重跑任务、不自动重发,发送中重启标为结果未知。手动取消或 Host 关闭导致的中断不触发报告;平台接受消息不等于终端已收到。
|
|
14
|
-
|
|
15
|
-
## 推理等级
|
|
16
|
-
|
|
17
|
-
新建会话模式下,进入「编辑 → Agent 执行配置」,选择具体的提供商,在合并的模型下拉菜单中选择「模型」或「推理等级」。界面复用 Host 原生 Menu,不会改动聊天会话的模型设置。选项来自该模型的 Host 元数据,不固定为低/中/高。「默认(不覆盖)」沿用正常的 Agent/模型默认行为,不代表关闭推理;旧任务行为不变。在编辑器切换模型会将该项重置为默认。
|
|
18
|
-
|
|
19
|
-
使用 Agent 工具时,先向 `automation_options` 传入候选 `provider` 和 `model`(或已有任务 `id`)查询,再设置 `reasoning_effort`。显式等级要求具体的提供商/模型组合,保存和运行前由 Host 校验。创建时省略使用默认,更新时省略保留原值,更新传 `null` 清除覆盖。HTTP 更新字段为 `execution.reasoningEffort`。通过工具/API 更换模型时,也应清除或替换不兼容的等级。固定会话始终沿用会话自身的推理配置;任务级覆盖仅对新建会话生效。
|
|
20
|
-
|
|
21
|
-
## 手动删除运行记录
|
|
22
|
-
|
|
23
|
-
在「运行历史」展开一条记录,点击「删除记录」并确认。仅移除该条记录及其摘要、错误和投递状态,不删除对应会话、不撤回消息,也不改变任务计划、连续失败计数或暂停状态。删除后不可恢复。
|
|
24
|
-
|
|
25
|
-
排队中、运行中或消息仍在发送的记录不可删除;同一任务正在执行时,仍可删除其他已结束记录。删除最新记录后,概览显示剩余记录中的最新结果;全部删除后显示「暂无运行记录」。
|
|
26
|
-
|
|
27
|
-
## 状态保存
|
|
28
|
-
|
|
29
|
-
运行历史默认不限制保留条数;只有显式配置插件的 `maxRunHistory` 时才按该上限保留。此前已被裁剪的记录不会因修改设置而恢复。
|
|
30
|
-
|
|
31
|
-
状态先写入同目录临时文件并同步,再通过原子重命名替换旧文件。Windows 跳过目录 fsync,其他平台在重命名后尝试目录同步。如果这一步失败,Host 会记录 `AUTOMATION_DIRECTORY_SYNC_FAILED` 告警:操作已经提交,内存与新文件保持一致,但不能保证系统崩溃或断电后仍保留该次更新。此时应排查文件系统告警,而不是重试操作。重命名前的失败仍会拒绝操作,保留原有状态。
|
|
32
|
-
|
|
33
|
-
## Agent 工具与调度参数参考
|
|
34
|
-
|
|
35
|
-
| 工具 | 用途 |
|
|
36
|
-
| -------------------- | ---------------------------------------------- |
|
|
37
|
-
| `automation_options` | 查询 Host 当前的 Agent、模型、技能和权限选项。 |
|
|
38
|
-
| `automation_create` | 用户确认完整配置后创建任务。 |
|
|
39
|
-
| `automation_update` | 更新任务及执行配置;权限变更需要确认。 |
|
|
40
|
-
| `automation_list` | 查看任务和运行状态。 |
|
|
41
|
-
| `automation_run` | 立即运行一次,不改变原计划。 |
|
|
42
|
-
| `automation_pause` | 暂停未来调度。 |
|
|
43
|
-
| `automation_resume` | 恢复任务,可同时立即运行一次。 |
|
|
44
|
-
| `automation_delete` | 删除任务及未来调度,保留已有会话。 |
|
|
45
|
-
|
|
46
|
-
创建与更新支持 `agent_preset`、`provider` / `model`、`reasoning_effort` 和有序 `skills`;更新可清除执行覆盖或替换技能列表。创建时还可传入 `execution_mode: pinned-session`、`target_session_id` 和经用户确认的 `session_target_confirmed: true`。创建后更换目标会话,以及配置消息投递,需在界面中操作。
|
|
47
|
-
|
|
48
|
-
| 类型 | 参数 | 格式 / 示例 |
|
|
49
|
-
| ---- | ----------- | ----------------------------------------------------------------------- |
|
|
50
|
-
| 单次 | `once_at` | RFC 3339 UTC 时间,例如 `2027-01-04T01:00:00.000Z`。 |
|
|
51
|
-
| 周期 | `rrule` | 单行 RFC 5545 规则,不含 `DTSTART`,例如 `FREQ=WEEKLY;BYDAY=MO,WE,FR`。 |
|
|
52
|
-
| 周期 | `time_zone` | IANA 时区,例如 `Asia/Shanghai`。 |
|
|
53
|
-
| 周期 | `start_at` | 本地时间,格式 `YYYY-MM-DDTHH:mm:ss`。 |
|
|
54
|
-
|
|
55
|
-
周期任务需同时提供 `rrule`、`time_zone`、`start_at`。
|
|
1
|
+
# Automation 使用参考
|
|
2
|
+
|
|
3
|
+
[返回介绍](../README.zh.md) · [English](reference.md)
|
|
4
|
+
|
|
5
|
+
## 运行前,了解这几个边界
|
|
6
|
+
|
|
7
|
+
- 运行时需保持 DSH 在线;重启后,每个符合条件的任务只补跑最近错过的一次,暂停期间的周期会被跳过。
|
|
8
|
+
- 同一插件实例一次执行一个自动化任务。默认运行上限为 1 小时,可通过 `maxRunDurationMs` 调整。
|
|
9
|
+
- 暂停影响未来调度,已开始的运行会继续;停止当前运行、立即运行或「恢复并运行」都不改变原计划。
|
|
10
|
+
- 要求交互批准的权限不会被自动批准,无人值守任务可能等待到超时。
|
|
11
|
+
- 固定会话沿用其上下文及 Agent/模型配置,应用任务权限,不重新加载技能。创建后更换绑定需在界面中操作;目标忙碌或不可用时直接失败,不另建替代会话。
|
|
12
|
+
- 失败运行可手动重试;可选自动暂停将失败和超时计入连续次数,成功后清零。意外重启时未完成记录的运行标为「结果未知」,不会自动重跑。
|
|
13
|
+
- 消息投递单独记录状态;发送失败不重跑任务、不自动重发,发送中重启标为结果未知。手动取消或 Host 关闭导致的中断不触发报告;平台接受消息不等于终端已收到。
|
|
14
|
+
|
|
15
|
+
## 推理等级
|
|
16
|
+
|
|
17
|
+
新建会话模式下,进入「编辑 → Agent 执行配置」,选择具体的提供商,在合并的模型下拉菜单中选择「模型」或「推理等级」。界面复用 Host 原生 Menu,不会改动聊天会话的模型设置。选项来自该模型的 Host 元数据,不固定为低/中/高。「默认(不覆盖)」沿用正常的 Agent/模型默认行为,不代表关闭推理;旧任务行为不变。在编辑器切换模型会将该项重置为默认。
|
|
18
|
+
|
|
19
|
+
使用 Agent 工具时,先向 `automation_options` 传入候选 `provider` 和 `model`(或已有任务 `id`)查询,再设置 `reasoning_effort`。显式等级要求具体的提供商/模型组合,保存和运行前由 Host 校验。创建时省略使用默认,更新时省略保留原值,更新传 `null` 清除覆盖。HTTP 更新字段为 `execution.reasoningEffort`。通过工具/API 更换模型时,也应清除或替换不兼容的等级。固定会话始终沿用会话自身的推理配置;任务级覆盖仅对新建会话生效。
|
|
20
|
+
|
|
21
|
+
## 手动删除运行记录
|
|
22
|
+
|
|
23
|
+
在「运行历史」展开一条记录,点击「删除记录」并确认。仅移除该条记录及其摘要、错误和投递状态,不删除对应会话、不撤回消息,也不改变任务计划、连续失败计数或暂停状态。删除后不可恢复。
|
|
24
|
+
|
|
25
|
+
排队中、运行中或消息仍在发送的记录不可删除;同一任务正在执行时,仍可删除其他已结束记录。删除最新记录后,概览显示剩余记录中的最新结果;全部删除后显示「暂无运行记录」。
|
|
26
|
+
|
|
27
|
+
## 状态保存
|
|
28
|
+
|
|
29
|
+
运行历史默认不限制保留条数;只有显式配置插件的 `maxRunHistory` 时才按该上限保留。此前已被裁剪的记录不会因修改设置而恢复。
|
|
30
|
+
|
|
31
|
+
状态先写入同目录临时文件并同步,再通过原子重命名替换旧文件。Windows 跳过目录 fsync,其他平台在重命名后尝试目录同步。如果这一步失败,Host 会记录 `AUTOMATION_DIRECTORY_SYNC_FAILED` 告警:操作已经提交,内存与新文件保持一致,但不能保证系统崩溃或断电后仍保留该次更新。此时应排查文件系统告警,而不是重试操作。重命名前的失败仍会拒绝操作,保留原有状态。
|
|
32
|
+
|
|
33
|
+
## Agent 工具与调度参数参考
|
|
34
|
+
|
|
35
|
+
| 工具 | 用途 |
|
|
36
|
+
| -------------------- | ---------------------------------------------- |
|
|
37
|
+
| `automation_options` | 查询 Host 当前的 Agent、模型、技能和权限选项。 |
|
|
38
|
+
| `automation_create` | 用户确认完整配置后创建任务。 |
|
|
39
|
+
| `automation_update` | 更新任务及执行配置;权限变更需要确认。 |
|
|
40
|
+
| `automation_list` | 查看任务和运行状态。 |
|
|
41
|
+
| `automation_run` | 立即运行一次,不改变原计划。 |
|
|
42
|
+
| `automation_pause` | 暂停未来调度。 |
|
|
43
|
+
| `automation_resume` | 恢复任务,可同时立即运行一次。 |
|
|
44
|
+
| `automation_delete` | 删除任务及未来调度,保留已有会话。 |
|
|
45
|
+
|
|
46
|
+
创建与更新支持 `agent_preset`、`provider` / `model`、`reasoning_effort` 和有序 `skills`;更新可清除执行覆盖或替换技能列表。创建时还可传入 `execution_mode: pinned-session`、`target_session_id` 和经用户确认的 `session_target_confirmed: true`。创建后更换目标会话,以及配置消息投递,需在界面中操作。
|
|
47
|
+
|
|
48
|
+
| 类型 | 参数 | 格式 / 示例 |
|
|
49
|
+
| ---- | ----------- | ----------------------------------------------------------------------- |
|
|
50
|
+
| 单次 | `once_at` | RFC 3339 UTC 时间,例如 `2027-01-04T01:00:00.000Z`。 |
|
|
51
|
+
| 周期 | `rrule` | 单行 RFC 5545 规则,不含 `DTSTART`,例如 `FREQ=WEEKLY;BYDAY=MO,WE,FR`。 |
|
|
52
|
+
| 周期 | `time_zone` | IANA 时区,例如 `Asia/Shanghai`。 |
|
|
53
|
+
| 周期 | `start_at` | 本地时间,格式 `YYYY-MM-DDTHH:mm:ss`。 |
|
|
54
|
+
|
|
55
|
+
周期任务需同时提供 `rrule`、`time_zone`、`start_at`。
|
|
@@ -51,7 +51,6 @@ var __disposeResources = (this && this.__disposeResources) || (function (Suppres
|
|
|
51
51
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
52
52
|
});
|
|
53
53
|
import { ReasoningEffortId } from '@deepseek-ai/dsh-llm';
|
|
54
|
-
import { standingMountFor } from '@deepseek-ai/dsh-agent-preset-registry';
|
|
55
54
|
import { isUserInvocable, renderSkillContent } from '@deepseek-ai/dsh-skill';
|
|
56
55
|
import { assertProviderModelPair, validateReasoningExecution } from './validation.js';
|
|
57
56
|
import '@deepseek-ai/dsh-agent-preset-registry';
|
|
@@ -195,10 +194,9 @@ export class AgentConfiguration {
|
|
|
195
194
|
if (task.execution.skills.length === 0)
|
|
196
195
|
return [];
|
|
197
196
|
const skills = this.ctx.agentPresets.serviceFor(agent, 'skills') ?? this.ctx.skills;
|
|
198
|
-
const scope = standingMountFor(agent.ctx)?.key;
|
|
199
197
|
const loaded = [];
|
|
200
198
|
for (const name of task.execution.skills) {
|
|
201
|
-
const skill = await skills.get(name, { cwd: task.execution.cwd, scope });
|
|
199
|
+
const skill = await skills.get(name, { cwd: task.execution.cwd, scope: agent });
|
|
202
200
|
if (skill === undefined)
|
|
203
201
|
throw new Error(`Selected skill ${name} is unavailable.`);
|
|
204
202
|
if (!isUserInvocable(skill))
|
package/lib/api.js
CHANGED
|
@@ -174,8 +174,9 @@ export function registerAutomationApi(ctx, controller) {
|
|
|
174
174
|
send(res, 405, { error: 'Method not allowed.' });
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
const
|
|
178
|
-
const
|
|
177
|
+
const [, rawTaskId = '', rawRunId = ''] = runMatch;
|
|
178
|
+
const taskId = decodeURIComponent(rawTaskId);
|
|
179
|
+
const runId = decodeURIComponent(rawRunId);
|
|
179
180
|
if (![taskId, runId].every((id) => /^[A-Za-z0-9_-]{1,256}$/.test(id))) {
|
|
180
181
|
throw new Error('Invalid automation task or run id.');
|
|
181
182
|
}
|
package/lib/client.js
CHANGED
|
@@ -2937,7 +2937,7 @@ window.__ModuleLoader__.load({
|
|
|
2937
2937
|
}
|
|
2938
2938
|
|
|
2939
2939
|
// src/client/styles.css
|
|
2940
|
-
var styles_default = "/* Compact task inbox: Host typography and controls, no private theme tokens.\r\n * Keep the 13px reading density; primitives retain their own type and focus rules.\r\n */\r\n/* sidebar.footer.action supplies placement, not a button skin. Match Settings. */\r\n.am-nav { position:relative; display:flex; flex:none; align-items:center; gap:8px; box-sizing:border-box; width:100%; height:42px; margin:0; padding:0 10px 0 5.5px; border:0; border-radius:12px; background:transparent; color:var(--dsw-alias-label-primary); font:var(--dsw-font-s-14); cursor:pointer; }\r\n.am-nav:hover { background:var(--dsw-alias-interactive-bg-hover); }\r\n.am-nav.is-rail { width:36px; height:36px; margin:8px 0 10px; justify-content:center; gap:0; padding:0; border-radius:50%; corner-shape:round; }\r\n.am-nav-icon { display:inline-flex; flex:none; align-items:center; justify-content:center; width:16px; height:16px; }\r\n.am-nav-icon svg { flex:none; }\r\n.am-nav.is-rail .am-nav-icon { width:18px; height:18px; }\r\n.am-nav-label { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\r\n.am-nav-badge { position:absolute; top:2px; right:2px; min-width:16px; padding:0 4px; border-radius:999px; background:var(--dsw-alias-button-primary-fill); color:var(--dsw-alias-label-primary-foreground); font:var(--dsw-font-xs-13); line-height:16px; text-align:center; }\r\n.am-nav.is-wide .am-nav-badge { position:static; margin-left:auto; }\r\n\r\n.am-overlay { position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; padding:32px; background:var(--dsw-alias-bg-mask-1); backdrop-filter:var(--dsw-mask-blur); }\r\n.am-panel { position:relative; display:flex; flex-direction:column; width:min(940px,100%); height:min(640px,100%); overflow:hidden; border:0; border-radius:16px; background:var(--dsw-alias-bg-layer-2); color:var(--dsw-alias-label-primary); box-shadow:var(--dsw-elevation-prominent); font:var(--dsw-font-xs-13); }\r\n.am-panel *, .am-panel *::before, .am-panel *::after { box-sizing:border-box; }\r\n.am-panel:focus { outline:none; }\r\n.am-panel code { font-family:var(--ds-font-family-code); font-size:inherit; }\r\n/* Empty/loading/error states need no two-pane canvas. */\r\n.am-panel.is-empty { width:min(640px,100%); height:auto; max-height:100%; }\r\n.am-header { display:flex; flex:none; align-items:center; gap:10px; padding:14px 20px; border-bottom:1px solid var(--dsw-alias-border-l2); }\r\n.am-header > button { flex-shrink:0; white-space:nowrap; }\r\n.am-header-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }\r\n.am-header-title { margin:0; font:var(--dsw-font-base-16); font-weight:500; }\r\n.am-header-count { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-spacer { flex:1 1 auto; }\r\n.am-icon-button, .am-back, .am-copy { display:inline-flex; flex:none; align-items:center; justify-content:center; width:28px; height:28px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--dsw-alias-label-secondary); cursor:pointer; }\r\n.am-icon-button:hover:not(:disabled), .am-back:hover, .am-copy:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); }\r\n.am-icon-button:disabled { opacity:.45; cursor:default; }\r\n.am-help-button { width:20px; height:20px; margin-inline-start:6px; vertical-align:middle; }\r\n.am-back { display:none; }\r\n.am-panel-footer { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; min-height:30px; padding:6px 20px; border-top:1px solid var(--dsw-alias-border-l2); color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-scheduler { display:inline-flex; align-items:center; gap:6px; font:var(--dsw-font-xs-13); white-space:nowrap; }\r\n.am-scheduler-card { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; min-width:220px; max-width:340px; margin:0; font:var(--dsw-font-xs-13); }\r\n.am-scheduler-card dt { color:var(--dsw-alias-label-tertiary); }\r\n.am-scheduler-card dd { margin:0; overflow-wrap:anywhere; }\r\n.am-banners { display:flex; flex:none; flex-direction:column; gap:6px; padding:12px 28px 0; }\r\n.am-alert { margin:0; padding:10px 12px; border:1px solid transparent; border-radius:8px; font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\r\n.am-alert.is-error { background:var(--dsw-alias-interactive-bg-hover-danger); color:var(--dsw-alias-state-error-primary); }\r\n.am-alert.is-warning { background:var(--dsw-alias-state-warn-tertiary); color:var(--dsw-alias-state-warn-label); }\r\n.am-alert.is-info { color:var(--dsw-alias-label-secondary); }\r\n.am-alert.is-full { grid-column:1 / -1; }\r\n.am-confirm { display:flex; align-items:center; gap:8px; }\r\n\r\n/* List and detail: one dividing rule, no nested cards. */\r\n.am-body { display:flex; flex:1 1 auto; min-height:0; }\r\n.am-body.is-single { justify-content:center; padding:24px; overflow:auto; }\r\n.am-list-pane { display:flex; flex:none; flex-direction:column; width:260px; min-height:0; border-right:1px solid var(--dsw-alias-border-l2); }\r\n.am-list-tools { display:flex; flex:none; flex-direction:column; gap:10px; padding:14px 14px 0; }\r\n.am-pill-group { display:flex; flex-wrap:wrap; gap:6px; }\r\n.am-list-tools input::placeholder { color:var(--dsw-alias-label-tertiary); opacity:1; }\r\n.am-list-tools .am-pill-group { flex-wrap:nowrap; justify-content:space-between; gap:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\r\n.am-tab { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 2px 12px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); font-weight:500; white-space:nowrap; cursor:pointer; }\r\n.am-tab:hover { color:var(--dsw-alias-label-primary); }\r\n.am-tab.is-active { border-bottom-color:currentColor; color:var(--dsw-alias-state-business-primary); }\r\n.am-tab > span { color:var(--dsw-alias-label-tertiary); font-size:13px; font-weight:400; }\r\n.am-list { flex:1 1 auto; min-height:0; padding:10px; overflow:auto; overscroll-behavior:contain; }\r\n.am-row { display:flex; align-items:center; gap:10px; width:100%; margin:2px 0; padding:10px 10px; border:0; border-radius:8px; background:transparent; color:inherit; text-align:left; cursor:pointer; transition:background 120ms ease; }\r\n.am-row:hover { background:var(--dsw-alias-interactive-bg-hover); }\r\n.am-row.is-selected { background:var(--dsw-alias-button-ghost-active-fill); }\r\n.am-row-dot { flex:none; }\r\n.am-row-body { display:flex; flex:1 1 auto; flex-direction:column; gap:6px; min-width:0; }\r\n.am-row-name { overflow:hidden; font:var(--dsw-font-xs-13); white-space:nowrap; text-overflow:ellipsis; }\r\n.am-row-meta { overflow:hidden; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); white-space:nowrap; text-overflow:ellipsis; }\r\n.am-failure-chip { display:inline-flex; flex:none; align-items:center; gap:3px; color:var(--dsw-alias-state-error-primary); font:var(--dsw-font-xs-13); }\r\n.am-list-empty { display:flex; flex-direction:column; align-items:center; gap:12px; padding:40px 16px; color:var(--dsw-alias-label-tertiary); text-align:center; }\r\n.am-list-empty p { margin:0; overflow-wrap:anywhere; }\r\n.am-detail-pane { display:flex; flex:1 1 auto; flex-direction:column; min-width:0; min-height:0; overflow:hidden; }\r\n.am-detail-hint { margin:auto; padding:28px; color:var(--dsw-alias-label-tertiary); text-align:center; }\r\n.am-detail { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; }\r\n.am-detail-header { display:flex; flex:none; align-items:flex-start; gap:10px; padding:20px 22px 10px; }\r\n.am-detail-title { display:flex; flex:1 1 auto; flex-direction:column; gap:10px; min-width:0; }\r\n.am-detail-title h3 { margin:0; font:var(--dsw-font-base-16); font-weight:500; overflow-wrap:anywhere; }\r\n.am-detail-badges { display:flex; flex-wrap:wrap; align-items:center; gap:14px; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-status { display:inline-flex; align-items:center; gap:6px; }\r\n.am-detail-workspace { max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\r\n.am-detail-scroll, .am-editor-scroll { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }\r\n.am-muted { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-danger { color:var(--dsw-alias-state-error-primary); }\r\n\r\n/* Signature: the next occurrence and human schedule read together. */\r\n.am-next-run { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin:2px 22px 12px; padding:8px 0 8px 12px; border-left:2px solid var(--dsw-alias-border-l3); }\r\n.am-next-run-label { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-next-run strong { font:var(--dsw-font-xs-13); }\r\n.am-next-run-when { color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); font-variant-numeric:tabular-nums; }\r\n.am-next-run-schedule { flex-basis:100%; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\r\n.am-actions { display:flex; flex-wrap:wrap; gap:8px; padding:0 22px 12px; }\r\n.am-detail-nav { display:flex; gap:24px; margin:0 22px; border-bottom:1px solid var(--dsw-alias-border-l2); }\r\n.am-detail-nav .am-tab { padding:10px 0 12px; font-size:13px; }\r\n.am-block { display:flex; flex-direction:column; gap:10px; padding:14px 22px; }\r\n.am-block + .am-block { padding-top:8px; }\r\n.am-block-title { display:flex; align-items:center; gap:8px; margin:0; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); }\r\n.am-block-tools { display:flex; align-items:center; gap:4px; margin-left:auto; }\r\n.am-prompt { margin:0; max-height:280px; overflow:auto; color:var(--dsw-alias-label-primary); font:var(--dsw-font-xs-13); line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }\r\n.am-summary { margin:0; padding:12px 14px; border-radius:8px; background:var(--dsw-alias-bg-module-platform); color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }\r\n.am-empty-note, .am-detail-note { margin:0; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-detail-note { padding:0 22px 28px; }\r\n.am-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr)); gap:16px; }\r\n.am-fact { display:flex; gap:8px; min-width:0; }\r\n.am-fact.is-full { grid-column:1 / -1; }\r\n.am-fact-icon { display:inline-flex; flex:none; padding-top:2px; color:var(--dsw-alias-label-tertiary); }\r\n.am-fact-body { display:flex; flex-direction:column; gap:6px; min-width:0; }\r\n.am-fact-label { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-fact-value { font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\r\n.am-mono-row { display:inline-flex; flex-wrap:wrap; align-items:center; gap:5px; max-width:100%; min-width:0; }\r\n.am-mono-row code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\r\n.am-runs { display:flex; flex-direction:column; gap:6px; }\r\n.am-run { border-bottom:1px solid var(--dsw-alias-border-l2); }\r\n.am-run-line { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-run-body { display:flex; flex-direction:column; gap:12px; padding:8px 0 16px; }\r\n.am-run-summary { margin:0; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }\r\n.am-run-facts { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 16px; margin:0; align-items:baseline; }\r\n.am-run-facts dt { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-run-facts dd { min-width:0; margin:0; font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\r\n.am-run-actions { display:flex; flex-wrap:wrap; gap:8px; }\r\n.am-run-delete-confirm { display:flex; flex-direction:column; gap:12px; }\r\n.am-run-delete-context { display:flex; flex-wrap:wrap; align-items:center; gap:12px; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); }\r\n\r\n/* Editor: task and schedule first, secondary controls on demand. */\r\n.am-editor { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; }\r\n.am-editor-hint { margin:0; padding:0 22px 8px; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-editor-footer { display:flex; flex:none; align-items:center; gap:8px; padding:12px 22px; border-top:1px solid var(--dsw-alias-border-l2); }\r\n.am-form-section { display:flex; flex-direction:column; gap:12px; padding:16px 22px; }\r\n.am-form-section-title { margin:0; color:var(--dsw-alias-label-primary); font:var(--dsw-font-xs-13); }\r\n.am-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr)); gap:16px; }\r\n.am-editor-disclosure { margin:0 22px; border-top:1px solid var(--dsw-alias-border-l2); }\r\n.am-editor-disclosure > summary { display:flex; align-items:center; gap:6px; padding:14px 0; list-style:none; cursor:pointer; }\r\n.am-editor-disclosure > summary::-webkit-details-marker { display:none; }\r\n.am-disclosure-chevron { flex:none; color:var(--dsw-alias-label-tertiary); transition:transform 120ms ease; }\r\n.am-editor-disclosure[open] > summary .am-disclosure-chevron { transform:rotate(90deg); }\r\n.am-editor-disclosure > .am-form-grid { padding:0 0 24px; }\r\n.am-editor-scroll > .am-alert { margin:10px 22px; }\r\n.am-editor-scroll > .am-alert .am-spacer { display:none; }\r\n.am-rule-builder, .am-rule-advanced { grid-column:1 / -1; }\r\n.am-rule-advanced { display:flex; flex-direction:column; gap:6px; }\r\n.am-interval { display:flex; align-items:center; gap:8px; }\r\n.am-interval .am-input { width:88px; }\r\n.am-field { display:flex; flex-direction:column; gap:7px; min-width:0; }\r\n.am-field-label { color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); }\r\n.am-field-hint { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); line-height:1.5; overflow-wrap:anywhere; }\r\n.am-field.is-full { grid-column:1 / -1; }\r\n.am-input { width:100%; }\r\n/* Host has no Textarea/Select primitive; use the Input surface and type ramp. */\r\n.am-textarea, .am-select { width:100%; border:.5px solid var(--dsw-alias-border-l4); border-radius:8px; background:var(--dsw-alias-bg-layer-1); color:var(--dsw-alias-label-primary); font:var(--dsw-font-s-14); }\r\n.am-textarea { min-height:140px; padding:8px; resize:vertical; }\r\n.am-select { display:flex; align-items:center; justify-content:space-between; gap:8px; height:32px; padding:0 8px; text-align:left; cursor:pointer; }\r\n.am-select:hover:not(:disabled), .am-textarea:focus { border-color:var(--dsw-alias-label-primary); }\r\n.am-textarea:focus { outline:none; }\r\n.am-select:disabled, .am-textarea:disabled { opacity:.5; cursor:default; }\r\n.am-select-value { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\r\n.am-select-menu { min-width:220px; }\r\n.am-model-summary { display:flex; align-items:center; gap:8px; min-width:0; }\r\n.am-model-summary > span { overflow:hidden; text-overflow:ellipsis; }\r\n.am-model-summary > span:last-child { flex:none; color:var(--dsw-alias-label-tertiary); }\r\n.am-model-menu { min-width:240px; }\r\n.am-model-menu-row { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; }\r\n.am-model-menu-row > span:nth-child(2) { margin-left:auto; color:var(--dsw-alias-label-tertiary); max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\r\n.am-model-menu-row > svg { flex:none; color:var(--dsw-alias-label-tertiary); }\r\n.am-option { display:flex; flex-direction:column; gap:2px; }\r\n.am-option small { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-skills { display:flex; flex-direction:column; gap:12px; }\r\n.am-skills-bar { display:flex; align-items:center; gap:8px; }\r\n.am-skills-bar > :first-child { flex:1 1 auto; min-width:0; }\r\n.am-skill-chips { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }\r\n.am-skills-count { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n.am-chip-remove { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:0; border-radius:5px; background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); font:var(--dsw-font-xs-13); cursor:pointer; }\r\n.am-chip-remove:hover:not(:disabled) { color:var(--dsw-alias-state-error-primary); }\r\n.am-chip-remove:disabled { opacity:.5; cursor:default; }\r\n.am-skill-list { max-height:210px; overflow:auto; border:1px solid var(--dsw-alias-border-l2); border-radius:8px; }\r\n.am-skill { display:flex; gap:10px; padding:12px; border-bottom:1px solid var(--dsw-alias-border-l2); cursor:pointer; }\r\n.am-skill:last-child { border-bottom:0; }\r\n.am-skill:hover { background:var(--dsw-alias-interactive-bg-hover); }\r\n.am-skill.is-unavailable { opacity:.6; }\r\n.am-skill input { flex:none; margin:3px 0 0; accent-color:var(--dsw-alias-button-primary-fill,currentColor); }\r\n.am-skill-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }\r\n.am-skill-copy b { font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\r\n.am-skill-copy small { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\r\n.am-skill-list .am-empty-note { display:block; padding:20px; text-align:center; }\r\n\r\n.am-onboarding { display:flex; flex-direction:column; align-items:flex-start; gap:12px; width:min(520px,100%); margin:auto; }\r\n.am-onboarding-icon { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; color:var(--dsw-alias-label-tertiary); }\r\n.am-onboarding h3 { margin:0; font:var(--dsw-font-base-16); font-weight:500; }\r\n.am-onboarding p { margin:0; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); line-height:1.6; }\r\n.am-onboarding small { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); line-height:1.6; }\r\n.am-examples { display:flex; flex-direction:column; width:100%; margin:8px 0; }\r\n.am-example { display:flex; align-items:center; gap:16px; width:100%; padding:12px 8px; border:0; border-bottom:1px solid var(--dsw-alias-border-l2); border-radius:0; background:transparent; color:var(--dsw-alias-label-primary); text-align:left; cursor:pointer; }\r\n.am-example-arrow { flex:none; color:var(--dsw-alias-label-tertiary); }\r\n.am-example:hover:not(:disabled) { background:var(--dsw-alias-interactive-bg-hover); }\r\n.am-example:disabled { opacity:.5; cursor:default; }\r\n.am-example-icon { display:inline-flex; flex:none; color:var(--dsw-alias-label-tertiary); }\r\n.am-example-copy { display:flex; flex:1 1 auto; flex-direction:column; gap:6px; min-width:0; }\r\n.am-example-copy strong { font:var(--dsw-font-xs-13); }\r\n.am-example-copy > span { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\r\n\r\n/* Style only our controls: Host Input/Switch/Button own their focus treatment. */\r\n.am-nav:focus-visible, .am-panel :is(.am-tab,.am-row,.am-example,summary):focus-visible { outline:2px solid var(--dsw-alias-label-primary); outline-offset:-2px; }\r\n.am-panel :is(.am-icon-button,.am-back,.am-copy,.am-select,.am-chip-remove):focus-visible { outline:2px solid var(--dsw-alias-label-primary); outline-offset:2px; }\r\n.am-spin { display:inline-flex; animation:am-spin 900ms linear infinite; }\r\n@keyframes am-spin { to { transform:rotate(360deg); } }\r\n@media (prefers-reduced-motion:reduce) { .am-spin { animation:none; } .am-panel *, .am-nav { transition:none; scroll-behavior:auto; } }\r\n@media (max-width:760px) {\r\n .am-overlay { padding:0; }\r\n .am-panel, .am-panel.is-empty { width:100%; height:100%; max-height:100%; border-radius:0; }\r\n .am-list-pane { width:100%; border-right:0; }\r\n .am-list-tools .am-pill-group { justify-content:flex-start; gap:24px; }\r\n .am-detail-pane { display:none; }\r\n .am-panel.is-detail .am-list-pane { display:none; }\r\n .am-panel.is-detail .am-detail-pane { display:flex; }\r\n .am-back { display:inline-flex; }\r\n}\r\n@media (max-width:520px) {\r\n .am-header { gap:6px; padding:16px; }\r\n .am-header-count { font-size:13px; }\r\n .am-header .am-icon-button { width:28px; }\r\n .am-detail-header { padding:20px 16px 12px; gap:6px; }\r\n .am-next-run { margin:8px 16px 16px; }\r\n .am-actions { padding:0 16px 12px; }\r\n .am-detail-nav { margin:0 16px; gap:24px; }\r\n .am-block, .am-form-section { padding:14px 16px; }\r\n .am-editor-hint, .am-detail-note { padding-left:16px; padding-right:16px; }\r\n .am-editor-disclosure { margin:0 16px; }\r\n .am-editor-scroll > .am-alert { margin:10px 16px; }\r\n .am-editor-footer { padding:12px 16px; }\r\n .am-panel-footer { padding:8px 16px; }\r\n .am-form-grid, .am-facts { grid-template-columns:minmax(0,1fr); }\r\n .am-banners { padding:10px 16px 0; }\r\n}\r\n";
|
|
2940
|
+
var styles_default = "/* Compact task inbox: Host typography and controls, no private theme tokens.\n * Keep the 13px reading density; primitives retain their own type and focus rules.\n */\n/* sidebar.footer.action supplies placement, not a button skin. Match Settings. */\n.am-nav { position:relative; display:flex; flex:none; align-items:center; gap:8px; box-sizing:border-box; width:100%; height:42px; margin:0; padding:0 10px 0 5.5px; border:0; border-radius:12px; background:transparent; color:var(--dsw-alias-label-primary); font:var(--dsw-font-s-14); cursor:pointer; }\n.am-nav:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.am-nav.is-rail { width:36px; height:36px; margin:8px 0 10px; justify-content:center; gap:0; padding:0; border-radius:50%; corner-shape:round; }\n.am-nav-icon { display:inline-flex; flex:none; align-items:center; justify-content:center; width:16px; height:16px; }\n.am-nav-icon svg { flex:none; }\n.am-nav.is-rail .am-nav-icon { width:18px; height:18px; }\n.am-nav-label { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\n.am-nav-badge { position:absolute; top:2px; right:2px; min-width:16px; padding:0 4px; border-radius:999px; background:var(--dsw-alias-button-primary-fill); color:var(--dsw-alias-label-primary-foreground); font:var(--dsw-font-xs-13); line-height:16px; text-align:center; }\n.am-nav.is-wide .am-nav-badge { position:static; margin-left:auto; }\n\n.am-overlay { position:fixed; inset:0; z-index:60; display:flex; align-items:center; justify-content:center; padding:32px; background:var(--dsw-alias-bg-mask-1); backdrop-filter:var(--dsw-mask-blur); }\n.am-panel { position:relative; display:flex; flex-direction:column; width:min(940px,100%); height:min(640px,100%); overflow:hidden; border:0; border-radius:16px; background:var(--dsw-alias-bg-layer-2); color:var(--dsw-alias-label-primary); box-shadow:var(--dsw-elevation-prominent); font:var(--dsw-font-xs-13); }\n.am-panel *, .am-panel *::before, .am-panel *::after { box-sizing:border-box; }\n.am-panel:focus { outline:none; }\n.am-panel code { font-family:var(--ds-font-family-code); font-size:inherit; }\n/* Empty/loading/error states need no two-pane canvas. */\n.am-panel.is-empty { width:min(640px,100%); height:auto; max-height:100%; }\n.am-header { display:flex; flex:none; align-items:center; gap:10px; padding:14px 20px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.am-header > button { flex-shrink:0; white-space:nowrap; }\n.am-header-heading { display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; }\n.am-header-title { margin:0; font:var(--dsw-font-base-16); font-weight:500; }\n.am-header-count { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-spacer { flex:1 1 auto; }\n.am-icon-button, .am-back, .am-copy { display:inline-flex; flex:none; align-items:center; justify-content:center; width:28px; height:28px; padding:0; border:0; border-radius:8px; background:transparent; color:var(--dsw-alias-label-secondary); cursor:pointer; }\n.am-icon-button:hover:not(:disabled), .am-back:hover, .am-copy:hover { background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); }\n.am-icon-button:disabled { opacity:.45; cursor:default; }\n.am-help-button { width:20px; height:20px; margin-inline-start:6px; vertical-align:middle; }\n.am-back { display:none; }\n.am-panel-footer { display:flex; flex:none; align-items:center; justify-content:space-between; gap:12px; min-height:30px; padding:6px 20px; border-top:1px solid var(--dsw-alias-border-l2); color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-scheduler { display:inline-flex; align-items:center; gap:6px; font:var(--dsw-font-xs-13); white-space:nowrap; }\n.am-scheduler-card { display:grid; grid-template-columns:auto 1fr; gap:6px 12px; min-width:220px; max-width:340px; margin:0; font:var(--dsw-font-xs-13); }\n.am-scheduler-card dt { color:var(--dsw-alias-label-tertiary); }\n.am-scheduler-card dd { margin:0; overflow-wrap:anywhere; }\n.am-banners { display:flex; flex:none; flex-direction:column; gap:6px; padding:12px 28px 0; }\n.am-alert { margin:0; padding:10px 12px; border:1px solid transparent; border-radius:8px; font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\n.am-alert.is-error { background:var(--dsw-alias-interactive-bg-hover-danger); color:var(--dsw-alias-state-error-primary); }\n.am-alert.is-warning { background:var(--dsw-alias-state-warn-tertiary); color:var(--dsw-alias-state-warn-label); }\n.am-alert.is-info { color:var(--dsw-alias-label-secondary); }\n.am-alert.is-full { grid-column:1 / -1; }\n.am-confirm { display:flex; align-items:center; gap:8px; }\n\n/* List and detail: one dividing rule, no nested cards. */\n.am-body { display:flex; flex:1 1 auto; min-height:0; }\n.am-body.is-single { justify-content:center; padding:24px; overflow:auto; }\n.am-list-pane { display:flex; flex:none; flex-direction:column; width:260px; min-height:0; border-right:1px solid var(--dsw-alias-border-l2); }\n.am-list-tools { display:flex; flex:none; flex-direction:column; gap:10px; padding:14px 14px 0; }\n.am-pill-group { display:flex; flex-wrap:wrap; gap:6px; }\n.am-list-tools input::placeholder { color:var(--dsw-alias-label-tertiary); opacity:1; }\n.am-list-tools .am-pill-group { flex-wrap:nowrap; justify-content:space-between; gap:8px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.am-tab { display:inline-flex; align-items:center; justify-content:center; gap:6px; padding:8px 2px 12px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); font-weight:500; white-space:nowrap; cursor:pointer; }\n.am-tab:hover { color:var(--dsw-alias-label-primary); }\n.am-tab.is-active { border-bottom-color:currentColor; color:var(--dsw-alias-state-business-primary); }\n.am-tab > span { color:var(--dsw-alias-label-tertiary); font-size:13px; font-weight:400; }\n.am-list { flex:1 1 auto; min-height:0; padding:10px; overflow:auto; overscroll-behavior:contain; }\n.am-row { display:flex; align-items:center; gap:10px; width:100%; margin:2px 0; padding:10px 10px; border:0; border-radius:8px; background:transparent; color:inherit; text-align:left; cursor:pointer; transition:background 120ms ease; }\n.am-row:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.am-row.is-selected { background:var(--dsw-alias-button-ghost-active-fill); }\n.am-row-dot { flex:none; }\n.am-row-body { display:flex; flex:1 1 auto; flex-direction:column; gap:6px; min-width:0; }\n.am-row-name { overflow:hidden; font:var(--dsw-font-xs-13); white-space:nowrap; text-overflow:ellipsis; }\n.am-row-meta { overflow:hidden; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); white-space:nowrap; text-overflow:ellipsis; }\n.am-failure-chip { display:inline-flex; flex:none; align-items:center; gap:3px; color:var(--dsw-alias-state-error-primary); font:var(--dsw-font-xs-13); }\n.am-list-empty { display:flex; flex-direction:column; align-items:center; gap:12px; padding:40px 16px; color:var(--dsw-alias-label-tertiary); text-align:center; }\n.am-list-empty p { margin:0; overflow-wrap:anywhere; }\n.am-detail-pane { display:flex; flex:1 1 auto; flex-direction:column; min-width:0; min-height:0; overflow:hidden; }\n.am-detail-hint { margin:auto; padding:28px; color:var(--dsw-alias-label-tertiary); text-align:center; }\n.am-detail { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; }\n.am-detail-header { display:flex; flex:none; align-items:flex-start; gap:10px; padding:20px 22px 10px; }\n.am-detail-title { display:flex; flex:1 1 auto; flex-direction:column; gap:10px; min-width:0; }\n.am-detail-title h3 { margin:0; font:var(--dsw-font-base-16); font-weight:500; overflow-wrap:anywhere; }\n.am-detail-badges { display:flex; flex-wrap:wrap; align-items:center; gap:14px; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-status { display:inline-flex; align-items:center; gap:6px; }\n.am-detail-workspace { max-width:230px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.am-detail-scroll, .am-editor-scroll { flex:1 1 auto; min-height:0; overflow:auto; overscroll-behavior:contain; }\n.am-muted { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-danger { color:var(--dsw-alias-state-error-primary); }\n\n/* Signature: the next occurrence and human schedule read together. */\n.am-next-run { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 12px; margin:2px 22px 12px; padding:8px 0 8px 12px; border-left:2px solid var(--dsw-alias-border-l3); }\n.am-next-run-label { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-next-run strong { font:var(--dsw-font-xs-13); }\n.am-next-run-when { color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); font-variant-numeric:tabular-nums; }\n.am-next-run-schedule { flex-basis:100%; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\n.am-actions { display:flex; flex-wrap:wrap; gap:8px; padding:0 22px 12px; }\n.am-detail-nav { display:flex; gap:24px; margin:0 22px; border-bottom:1px solid var(--dsw-alias-border-l2); }\n.am-detail-nav .am-tab { padding:10px 0 12px; font-size:13px; }\n.am-block { display:flex; flex-direction:column; gap:10px; padding:14px 22px; }\n.am-block + .am-block { padding-top:8px; }\n.am-block-title { display:flex; align-items:center; gap:8px; margin:0; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); }\n.am-block-tools { display:flex; align-items:center; gap:4px; margin-left:auto; }\n.am-prompt { margin:0; max-height:280px; overflow:auto; color:var(--dsw-alias-label-primary); font:var(--dsw-font-xs-13); line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }\n.am-summary { margin:0; padding:12px 14px; border-radius:8px; background:var(--dsw-alias-bg-module-platform); color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }\n.am-empty-note, .am-detail-note { margin:0; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-detail-note { padding:0 22px 28px; }\n.am-facts { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr)); gap:16px; }\n.am-fact { display:flex; gap:8px; min-width:0; }\n.am-fact.is-full { grid-column:1 / -1; }\n.am-fact-icon { display:inline-flex; flex:none; padding-top:2px; color:var(--dsw-alias-label-tertiary); }\n.am-fact-body { display:flex; flex-direction:column; gap:6px; min-width:0; }\n.am-fact-label { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-fact-value { font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\n.am-mono-row { display:inline-flex; flex-wrap:wrap; align-items:center; gap:5px; max-width:100%; min-width:0; }\n.am-mono-row code { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.am-runs { display:flex; flex-direction:column; gap:6px; }\n.am-run { border-bottom:1px solid var(--dsw-alias-border-l2); }\n.am-run-line { display:inline-flex; flex-wrap:wrap; align-items:center; gap:6px; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-run-body { display:flex; flex-direction:column; gap:12px; padding:8px 0 16px; }\n.am-run-summary { margin:0; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }\n.am-run-facts { display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px 16px; margin:0; align-items:baseline; }\n.am-run-facts dt { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-run-facts dd { min-width:0; margin:0; font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\n.am-run-actions { display:flex; flex-wrap:wrap; gap:8px; }\n.am-run-delete-confirm { display:flex; flex-direction:column; gap:12px; }\n.am-run-delete-context { display:flex; flex-wrap:wrap; align-items:center; gap:12px; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); }\n\n/* Editor: task and schedule first, secondary controls on demand. */\n.am-editor { display:flex; flex:1 1 auto; flex-direction:column; min-height:0; }\n.am-editor-hint { margin:0; padding:0 22px 8px; color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-editor-footer { display:flex; flex:none; align-items:center; gap:8px; padding:12px 22px; border-top:1px solid var(--dsw-alias-border-l2); }\n.am-form-section { display:flex; flex-direction:column; gap:12px; padding:16px 22px; }\n.am-form-section-title { margin:0; color:var(--dsw-alias-label-primary); font:var(--dsw-font-xs-13); }\n.am-form-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(215px,100%),1fr)); gap:16px; }\n.am-editor-disclosure { margin:0 22px; border-top:1px solid var(--dsw-alias-border-l2); }\n.am-editor-disclosure > summary { display:flex; align-items:center; gap:6px; padding:14px 0; list-style:none; cursor:pointer; }\n.am-editor-disclosure > summary::-webkit-details-marker { display:none; }\n.am-disclosure-chevron { flex:none; color:var(--dsw-alias-label-tertiary); transition:transform 120ms ease; }\n.am-editor-disclosure[open] > summary .am-disclosure-chevron { transform:rotate(90deg); }\n.am-editor-disclosure > .am-form-grid { padding:0 0 24px; }\n.am-editor-scroll > .am-alert { margin:10px 22px; }\n.am-editor-scroll > .am-alert .am-spacer { display:none; }\n.am-rule-builder, .am-rule-advanced { grid-column:1 / -1; }\n.am-rule-advanced { display:flex; flex-direction:column; gap:6px; }\n.am-interval { display:flex; align-items:center; gap:8px; }\n.am-interval .am-input { width:88px; }\n.am-field { display:flex; flex-direction:column; gap:7px; min-width:0; }\n.am-field-label { color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); }\n.am-field-hint { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); line-height:1.5; overflow-wrap:anywhere; }\n.am-field.is-full { grid-column:1 / -1; }\n.am-input { width:100%; }\n/* Host has no Textarea/Select primitive; use the Input surface and type ramp. */\n.am-textarea, .am-select { width:100%; border:.5px solid var(--dsw-alias-border-l4); border-radius:8px; background:var(--dsw-alias-bg-layer-1); color:var(--dsw-alias-label-primary); font:var(--dsw-font-s-14); }\n.am-textarea { min-height:140px; padding:8px; resize:vertical; }\n.am-select { display:flex; align-items:center; justify-content:space-between; gap:8px; height:32px; padding:0 8px; text-align:left; cursor:pointer; }\n.am-select:hover:not(:disabled), .am-textarea:focus { border-color:var(--dsw-alias-label-primary); }\n.am-textarea:focus { outline:none; }\n.am-select:disabled, .am-textarea:disabled { opacity:.5; cursor:default; }\n.am-select-value { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }\n.am-select-menu { min-width:220px; }\n.am-model-summary { display:flex; align-items:center; gap:8px; min-width:0; }\n.am-model-summary > span { overflow:hidden; text-overflow:ellipsis; }\n.am-model-summary > span:last-child { flex:none; color:var(--dsw-alias-label-tertiary); }\n.am-model-menu { min-width:240px; }\n.am-model-menu-row { display:flex; align-items:center; justify-content:space-between; gap:16px; width:100%; }\n.am-model-menu-row > span:nth-child(2) { margin-left:auto; color:var(--dsw-alias-label-tertiary); max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }\n.am-model-menu-row > svg { flex:none; color:var(--dsw-alias-label-tertiary); }\n.am-option { display:flex; flex-direction:column; gap:2px; }\n.am-option small { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-skills { display:flex; flex-direction:column; gap:12px; }\n.am-skills-bar { display:flex; align-items:center; gap:8px; }\n.am-skills-bar > :first-child { flex:1 1 auto; min-width:0; }\n.am-skill-chips { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }\n.am-skills-count { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n.am-chip-remove { display:inline-flex; align-items:center; gap:5px; padding:5px 8px; border:0; border-radius:5px; background:var(--dsw-alias-interactive-bg-hover); color:var(--dsw-alias-label-primary); font:var(--dsw-font-xs-13); cursor:pointer; }\n.am-chip-remove:hover:not(:disabled) { color:var(--dsw-alias-state-error-primary); }\n.am-chip-remove:disabled { opacity:.5; cursor:default; }\n.am-skill-list { max-height:210px; overflow:auto; border:1px solid var(--dsw-alias-border-l2); border-radius:8px; }\n.am-skill { display:flex; gap:10px; padding:12px; border-bottom:1px solid var(--dsw-alias-border-l2); cursor:pointer; }\n.am-skill:last-child { border-bottom:0; }\n.am-skill:hover { background:var(--dsw-alias-interactive-bg-hover); }\n.am-skill.is-unavailable { opacity:.6; }\n.am-skill input { flex:none; margin:3px 0 0; accent-color:var(--dsw-alias-button-primary-fill,currentColor); }\n.am-skill-copy { display:flex; flex-direction:column; gap:4px; min-width:0; }\n.am-skill-copy b { font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\n.am-skill-copy small { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); overflow-wrap:anywhere; }\n.am-skill-list .am-empty-note { display:block; padding:20px; text-align:center; }\n\n.am-onboarding { display:flex; flex-direction:column; align-items:flex-start; gap:12px; width:min(520px,100%); margin:auto; }\n.am-onboarding-icon { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; color:var(--dsw-alias-label-tertiary); }\n.am-onboarding h3 { margin:0; font:var(--dsw-font-base-16); font-weight:500; }\n.am-onboarding p { margin:0; color:var(--dsw-alias-label-secondary); font:var(--dsw-font-xs-13); line-height:1.6; }\n.am-onboarding small { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); line-height:1.6; }\n.am-examples { display:flex; flex-direction:column; width:100%; margin:8px 0; }\n.am-example { display:flex; align-items:center; gap:16px; width:100%; padding:12px 8px; border:0; border-bottom:1px solid var(--dsw-alias-border-l2); border-radius:0; background:transparent; color:var(--dsw-alias-label-primary); text-align:left; cursor:pointer; }\n.am-example-arrow { flex:none; color:var(--dsw-alias-label-tertiary); }\n.am-example:hover:not(:disabled) { background:var(--dsw-alias-interactive-bg-hover); }\n.am-example:disabled { opacity:.5; cursor:default; }\n.am-example-icon { display:inline-flex; flex:none; color:var(--dsw-alias-label-tertiary); }\n.am-example-copy { display:flex; flex:1 1 auto; flex-direction:column; gap:6px; min-width:0; }\n.am-example-copy strong { font:var(--dsw-font-xs-13); }\n.am-example-copy > span { color:var(--dsw-alias-label-tertiary); font:var(--dsw-font-xs-13); }\n\n/* Style only our controls: Host Input/Switch/Button own their focus treatment. */\n.am-nav:focus-visible, .am-panel :is(.am-tab,.am-row,.am-example,summary):focus-visible { outline:2px solid var(--dsw-alias-label-primary); outline-offset:-2px; }\n.am-panel :is(.am-icon-button,.am-back,.am-copy,.am-select,.am-chip-remove):focus-visible { outline:2px solid var(--dsw-alias-label-primary); outline-offset:2px; }\n.am-spin { display:inline-flex; animation:am-spin 900ms linear infinite; }\n@keyframes am-spin { to { transform:rotate(360deg); } }\n@media (prefers-reduced-motion:reduce) { .am-spin { animation:none; } .am-panel *, .am-nav { transition:none; scroll-behavior:auto; } }\n@media (max-width:760px) {\n .am-overlay { padding:0; }\n .am-panel, .am-panel.is-empty { width:100%; height:100%; max-height:100%; border-radius:0; }\n .am-list-pane { width:100%; border-right:0; }\n .am-list-tools .am-pill-group { justify-content:flex-start; gap:24px; }\n .am-detail-pane { display:none; }\n .am-panel.is-detail .am-list-pane { display:none; }\n .am-panel.is-detail .am-detail-pane { display:flex; }\n .am-back { display:inline-flex; }\n}\n@media (max-width:520px) {\n .am-header { gap:6px; padding:16px; }\n .am-header-count { font-size:13px; }\n .am-header .am-icon-button { width:28px; }\n .am-detail-header { padding:20px 16px 12px; gap:6px; }\n .am-next-run { margin:8px 16px 16px; }\n .am-actions { padding:0 16px 12px; }\n .am-detail-nav { margin:0 16px; gap:24px; }\n .am-block, .am-form-section { padding:14px 16px; }\n .am-editor-hint, .am-detail-note { padding-left:16px; padding-right:16px; }\n .am-editor-disclosure { margin:0 16px; }\n .am-editor-scroll > .am-alert { margin:10px 16px; }\n .am-editor-footer { padding:12px 16px; }\n .am-panel-footer { padding:8px 16px; }\n .am-form-grid, .am-facts { grid-template-columns:minmax(0,1fr); }\n .am-banners { padding:10px 16px 0; }\n}\n";
|
|
2941
2941
|
|
|
2942
2942
|
// src/client/index.tsx
|
|
2943
2943
|
var import_client2 = require("@deepseek-ai/dsh-client-ui-layout/client");
|
package/lib/domain.js
CHANGED
|
@@ -254,9 +254,9 @@ export class AutomationDomain {
|
|
|
254
254
|
if (task === undefined)
|
|
255
255
|
throw new AutomationDomainError('task_not_found', `Automation ${taskId} was not found.`);
|
|
256
256
|
const index = task.runs.findIndex((run) => run.id === runId);
|
|
257
|
-
if (index === -1)
|
|
258
|
-
return false;
|
|
259
257
|
const run = task.runs[index];
|
|
258
|
+
if (run === undefined)
|
|
259
|
+
return false;
|
|
260
260
|
if (nonTerminal(run) || run.delivery?.status === 'sending') {
|
|
261
261
|
throw new AutomationDomainError('run_in_progress', 'A queued, running, or sending run cannot be deleted.');
|
|
262
262
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hhuangpanda/dsh-automation",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.35",
|
|
4
4
|
"description": "Durable agent-created automations for DeepSeek Harness",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -68,26 +68,26 @@
|
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@deepseek-ai/cordis": "^4.0.4",
|
|
71
|
-
"@deepseek-ai/dsh-agent": "
|
|
72
|
-
"@deepseek-ai/dsh-agent-preset-registry": "
|
|
73
|
-
"@deepseek-ai/dsh-api-session-controller": "
|
|
74
|
-
"@deepseek-ai/dsh-api-workspace-controller": "
|
|
75
|
-
"@deepseek-ai/dsh-client-connection": "
|
|
76
|
-
"@deepseek-ai/dsh-client-locale": "
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-layout": "
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-renderer": "
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-session": "
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "
|
|
81
|
-
"@deepseek-ai/dsh-client-ui-workspace": "
|
|
82
|
-
"@deepseek-ai/dsh-host-webserver": "
|
|
83
|
-
"@deepseek-ai/dsh-llm": "
|
|
84
|
-
"@deepseek-ai/dsh-permission-presets": "
|
|
85
|
-
"@deepseek-ai/dsh-session": "
|
|
86
|
-
"@deepseek-ai/dsh-session-title": "
|
|
87
|
-
"@deepseek-ai/dsh-skill": "
|
|
88
|
-
"@deepseek-ai/dsh-tools": "
|
|
89
|
-
"@deepseek-ai/dsh-util-values": "
|
|
90
|
-
"@deepseek-ai/dsh-workspace": "
|
|
71
|
+
"@deepseek-ai/dsh-agent": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
72
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
73
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
74
|
+
"@deepseek-ai/dsh-api-workspace-controller": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
75
|
+
"@deepseek-ai/dsh-client-connection": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
76
|
+
"@deepseek-ai/dsh-client-locale": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
82
|
+
"@deepseek-ai/dsh-host-webserver": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
83
|
+
"@deepseek-ai/dsh-llm": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
84
|
+
"@deepseek-ai/dsh-permission-presets": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
85
|
+
"@deepseek-ai/dsh-session": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
86
|
+
"@deepseek-ai/dsh-session-title": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
87
|
+
"@deepseek-ai/dsh-skill": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
88
|
+
"@deepseek-ai/dsh-tools": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
89
|
+
"@deepseek-ai/dsh-util-values": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
90
|
+
"@deepseek-ai/dsh-workspace": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1",
|
|
91
91
|
"react": "^18.2.0"
|
|
92
92
|
},
|
|
93
93
|
"devDependencies": {
|
|
@@ -149,7 +149,8 @@
|
|
|
149
149
|
"typescript-eslint": "^8.70.0"
|
|
150
150
|
},
|
|
151
151
|
"engines": {
|
|
152
|
-
"node": ">=22"
|
|
152
|
+
"node": ">=22",
|
|
153
|
+
"dsh": "0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || >=0.2.1-rc.1 <0.2.1"
|
|
153
154
|
},
|
|
154
155
|
"license": "MIT",
|
|
155
156
|
"publishConfig": {
|
package/screenshots.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
["docs/images/automation-overview-en.png", "docs/images/automation-overview-zh.png"]
|
|
1
|
+
["docs/images/automation-overview-en.png", "docs/images/automation-example-en.png", "docs/images/automation-overview-zh.png", "docs/images/automation-example-zh.png"]
|