@michengai/dsh-automation 0.1.54 → 0.1.55
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 +6 -0
- package/CHANGELOG.zh-CN.md +6 -0
- package/README.md +4 -0
- package/README.zh-CN.md +4 -0
- package/lib/index.js +86 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ Upcoming changes and recent published versions are listed below. Git tags and Gi
|
|
|
6
6
|
|
|
7
7
|
## Unreleased
|
|
8
8
|
|
|
9
|
+
## 0.1.55 - 2026-10-07
|
|
10
|
+
|
|
11
|
+
- Agent automation create/update tools support provider, model, and reasoning effort, including resetting to the runtime global model or model default (#15).
|
|
12
|
+
- Reject incomplete provider/model pairs and preserve explicit null on creation. Switching models clears an omitted reasoning override. `automation_list` now includes model IDs, supported reasoning efforts, the global model, and catalog failures.
|
|
13
|
+
- Trim model IDs on save. Omitted model fields inherit a complete pair and never splice a session provider with the global model.
|
|
14
|
+
|
|
9
15
|
## 0.1.54 - 2026-10-06
|
|
10
16
|
|
|
11
17
|
- The installed-plugin list shows “Automation” and a localized description instead of the package name. Titles and descriptions come from `meta.title` and `meta.description` in `locale/zh.json` and `locale/en.json`.
|
package/CHANGELOG.zh-CN.md
CHANGED
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
|
|
7
7
|
## 未发布
|
|
8
8
|
|
|
9
|
+
## 0.1.55 - 2026-10-07
|
|
10
|
+
|
|
11
|
+
- Agent 创建和更新定时任务支持提供方、模型和推理等级,也可恢复运行时全局模型或模型默认等级(#15)。
|
|
12
|
+
- 拒绝不完整的 provider/model 配对,创建时保留显式 null。切换模型时清除未重新指定的旧推理等级。`automation_list` 返回模型 ID、支持的推理等级、全局模型和目录加载失败信息。
|
|
13
|
+
- 保存模型 ID 时去掉首尾空白。省略模型时按完整配对继承,不把会话 provider 和全局 model 拼在一起。
|
|
14
|
+
|
|
9
15
|
## 0.1.54 - 2026-10-06
|
|
10
16
|
|
|
11
17
|
- 已安装插件列表显示「Automation」和中文简介,不再只用包名。显示名来自 `locale/zh.json` 和 `locale/en.json` 的 `meta.title`、`meta.description`。
|
package/README.md
CHANGED
|
@@ -123,6 +123,10 @@ Open **Settings → Scheduled Tasks**, then use the panel as follows:
|
|
|
123
123
|
|
|
124
124
|
Each dispatched run uses the saved prompt, workspace, model, and permission boundary. It does not reuse approvals from the source chat.
|
|
125
125
|
|
|
126
|
+
`automation_create` and `automation_update` support the same model controls as Settings: `provider`, `model`, and `reasoning_effort`. Use provider/model IDs and a reasoning level published by that model in `reasoningEfforts`. On creation, omitted provider/model fields inherit the current session's complete pair; an incomplete session pair falls back to the whole global pair, never a mix of the two. Creation is rejected when neither source has a complete pair, instead of saving follow-global. Saved IDs are trimmed. Omitted reasoning effort uses the model default. On update, omitted fields keep their saved values. Set both `provider` and `model` to `null` to follow the global selection at each run, and set `reasoning_effort` to `null` to restore the model default. Create/update responses and `automation_list` include the saved target fields in the automation definition (`reasoningEffort` in the response).
|
|
127
|
+
|
|
128
|
+
When specifying or updating a model, send both `provider` and `model` as non-empty IDs or both as `null`; incomplete pairs are rejected. Query `automation_list` first: `models` includes available IDs and `reasoning.efforts`, `defaultModel` is the global selection, and `modelFailures` reports catalog loading failures. Changing the saved provider/model pair clears the previous reasoning override unless you explicitly supply `reasoning_effort`; submitting the same pair preserves it. Model IDs and reasoning levels are not validated against the catalog when saving; catalog discovery lets the Agent choose from the Host's published options.
|
|
129
|
+
|
|
126
130
|
## Safety boundary
|
|
127
131
|
|
|
128
132
|
| Item | Behavior |
|
package/README.zh-CN.md
CHANGED
|
@@ -123,6 +123,10 @@ dsh --profile web --dump-config
|
|
|
123
123
|
|
|
124
124
|
每次派发都使用保存的任务说明、工作区、模型和权限边界,不会复用来源对话中的批准。
|
|
125
125
|
|
|
126
|
+
`automation_create` 和 `automation_update` 支持与设置页相同的模型参数:`provider`、`model`、`reasoning_effort`。提供方和模型使用 ID,推理等级使用该模型公布的 `reasoningEfforts` 值。创建时省略 provider/model 会继承当前会话的完整配对;会话配对不完整时整对回退全局,不会把两边拼在一起。两边都没有完整配对时拒绝创建,而不是写成跟随全局。保存时去掉 ID 首尾空白。省略推理等级使用模型默认。更新时省略字段保持原值。将 `provider` 和 `model` 都设为 `null`,任务就会在每次运行时跟随当时的全局选择;`reasoning_effort=null` 清除固定推理等级,恢复模型默认。创建、更新和 `automation_list` 的返回定义包含保存的目标字段(返回中的推理等级字段为 `reasoningEffort`)。
|
|
127
|
+
|
|
128
|
+
指定或修改模型时,必须成对传入非空的 `provider` 和 `model` ID,或两项都设为 `null`,不完整配对会被拒绝。先查询 `automation_list`:`models` 包含可选 ID 和 `reasoning.efforts`,`defaultModel` 是全局选择,`modelFailures` 提示目录加载失败。切换保存的模型配对时,若没有显式传入 `reasoning_effort`,会清除旧等级;重复提交相同配对则保留。保存时不会依据目录校验模型 ID 和推理等级;Agent 可通过目录查询选择宿主公布的选项。
|
|
129
|
+
|
|
126
130
|
## 权限与安全边界
|
|
127
131
|
|
|
128
132
|
| 项目 | 行为 |
|
package/lib/index.js
CHANGED
|
@@ -16,7 +16,9 @@ var AUTOMATION_PROMPT_TEXT = [
|
|
|
16
16
|
"schedule_create \u53EA\u7528\u4E8E\u5F53\u524D\u4F1A\u8BDD\u91CC\u7684\u63D0\u9192\uFF0C\u4E0D\u4F1A\u65B0\u5F00\u72EC\u7ACB\u7F16\u7801 Session\u3002\u5199\u65E5\u62A5\u3001\u8DD1\u4EE3\u7801\u3001\u505A\u7814\u7A76\u7B49\u72EC\u7ACB\u5DE5\u4F5C\u5FC5\u987B\u7528 automation_create\u3002",
|
|
17
17
|
'\u81EA\u7136\u8BED\u8A00\u6620\u5C04\uFF1A\u6BCF\u4E2A\u5DE5\u4F5C\u65E5/\u5468\u4E00\u5230\u5468\u4E94 \u2192 kind=weekly, weekdays=["MO","TU","WE","TH","FR"]\uFF1B\u6BCF\u5929 \u2192 kind=daily\uFF1B\u65E9\u4E0A8\u70B9 \u2192 time="08:00"\u3002',
|
|
18
18
|
"\u9AD8\u7EA7\u8BA1\u5212\u6620\u5C04\uFF1A\u6BCF\u5C0F\u65F6\u7B2C15\u5206\u949F \u2192 kind=hourly, minute=15\uFF1B\u6BCF\u670831\u65E5 \u2192 kind=monthly, month_day=31\uFF1B\u6BCF3\u5929 \u2192 kind=custom, every_days=3\u3002monthly/custom \u8FD8\u5FC5\u987B\u63D0\u4F9B time\u3002",
|
|
19
|
-
"\u672A\u6307\u5B9A\u65F6\u533A\u65F6\u4F7F\u7528 Asia/Shanghai\u3002prompt \u5FC5\u987B\u5199\u6210\u6BCF\u6B21\u72EC\u7ACB\u8FD0\u884C\u90FD\u80FD\u770B\u61C2\u7684\u5B8C\u6574\u4EFB\u52A1\u8BF4\u660E\u3002"
|
|
19
|
+
"\u672A\u6307\u5B9A\u65F6\u533A\u65F6\u4F7F\u7528 Asia/Shanghai\u3002prompt \u5FC5\u987B\u5199\u6210\u6BCF\u6B21\u72EC\u7ACB\u8FD0\u884C\u90FD\u80FD\u770B\u61C2\u7684\u5B8C\u6574\u4EFB\u52A1\u8BF4\u660E\u3002",
|
|
20
|
+
"automation_create \u548C automation_update \u652F\u6301 provider\u3001model \u548C reasoning_effort\u3002provider/model \u4F7F\u7528\u63D0\u4F9B\u65B9\u548C\u6A21\u578B ID\uFF1B\u63A8\u7406\u7B49\u7EA7\u4F7F\u7528\u8BE5\u6A21\u578B\u516C\u5E03\u7684 reasoningEfforts \u503C\u3002\u5C06 provider \u548C model \u90FD\u8BBE\u4E3A null \u53EF\u8DDF\u968F\u6BCF\u6B21\u8FD0\u884C\u65F6\u7684\u5168\u5C40\u6A21\u578B\uFF1Breasoning_effort=null \u6062\u590D\u6A21\u578B\u9ED8\u8BA4\u3002\u66F4\u65B0\u65F6\u7701\u7565\u8FD9\u4E9B\u5B57\u6BB5\u4FDD\u6301\u4E0D\u53D8\u3002",
|
|
21
|
+
"\u6307\u5B9A\u6216\u4FEE\u6539\u6A21\u578B\u65F6 provider/model \u5FC5\u987B\u6210\u5BF9\u4F20\u5165\u975E\u7A7A ID \u6216\u6210\u5BF9\u8BBE\u4E3A null\u3002\u5148\u8C03\u7528 automation_list \u67E5\u8BE2 models \u548C reasoning.efforts\uFF0C\u76EE\u5F55\u52A0\u8F7D\u5931\u8D25\u89C1 modelFailures\u3002\u5207\u6362\u6A21\u578B\u65F6\u672A\u6307\u5B9A reasoning_effort \u4F1A\u6E05\u9664\u65E7\u7B49\u7EA7\uFF0C\u6062\u590D\u6A21\u578B\u9ED8\u8BA4\u3002"
|
|
20
22
|
].join("\n");
|
|
21
23
|
var AUTOMATION_CREATE_DESCRIPTION = [
|
|
22
24
|
"\u5F53\u7528\u6237\u8981\u521B\u5EFA\u5B9A\u65F6\u4EFB\u52A1\u3001\u8BA1\u5212\u4EFB\u52A1\u3001\u6BCF\u5929/\u6BCF\u5468/\u5DE5\u4F5C\u65E5\u81EA\u52A8\u6267\u884C\u67D0\u4EF6\u4E8B\u65F6\u4F7F\u7528\u672C\u5DE5\u5177\u3002",
|
|
@@ -24,6 +26,7 @@ var AUTOMATION_CREATE_DESCRIPTION = [
|
|
|
24
26
|
"\u4E3A\u5F53\u524D\u5DE5\u4F5C\u533A\u521B\u5EFA\u4E00\u6761\u72EC\u7ACB DSH \u81EA\u52A8\u5316\uFF1B\u6BCF\u6B21\u89E6\u53D1\u5F00\u542F\u5168\u65B0 Session\uFF0C\u4E0D\u7EE7\u627F\u5F53\u524D\u5BF9\u8BDD\u3002",
|
|
25
27
|
'\u5DE5\u4F5C\u65E5\u65E9\u4E0A 8 \u70B9\u793A\u4F8B\uFF1Akind=weekly, weekdays=["MO","TU","WE","TH","FR"], time="08:00", time_zone="Asia/Shanghai"\u3002',
|
|
26
28
|
"\u540C\u65F6\u652F\u6301 hourly(minute)\u3001monthly(month_day + time) \u548C custom(every_days + time)\u3002",
|
|
29
|
+
"\u53EF\u7528 provider\u3001model\u3001reasoning_effort \u56FA\u5B9A\u6A21\u578B\u548C\u63A8\u7406\u7B49\u7EA7\u3002\u7701\u7565\u6A21\u578B\u7EE7\u627F\u5F53\u524D\u4F1A\u8BDD\u6216\u5168\u5C40\u9009\u62E9\uFF1Bprovider/model \u90FD\u8BBE\u4E3A null \u8DDF\u968F\u6BCF\u6B21\u8FD0\u884C\u65F6\u7684\u5168\u5C40\u9009\u62E9\uFF1B\u7701\u7565\u6216\u6E05\u7A7A reasoning_effort \u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\u3002\u8FD4\u56DE\u4FDD\u5B58\u540E\u7684\u5B8C\u6574\u5B9A\u4E49\u3002",
|
|
27
30
|
"\u5FC5\u987B\u4F7F\u7528\u663E\u5F0F IANA \u65F6\u533A\u3002\u6700\u77ED\u95F4\u9694 1 \u5206\u949F\u3002\u9ED8\u8BA4\u6743\u9650\u6765\u81EA Host\uFF1B\u4E0D\u9700\u8981\u5199\u5165\u65F6\u5E94\u663E\u5F0F\u9009\u62E9 read-only\uFF0C\u53EA\u6709\u9700\u8981\u6539\u6587\u4EF6\u65F6\u624D\u9009 workspace-write\u3002"
|
|
28
31
|
].join("");
|
|
29
32
|
|
|
@@ -21884,6 +21887,33 @@ var AUTOMATION_SESSION_PREFIX = "dsh-automation-session-";
|
|
|
21884
21887
|
var AutomationRequestError = class extends Error {
|
|
21885
21888
|
name = "AutomationRequestError";
|
|
21886
21889
|
};
|
|
21890
|
+
function trimmedModelId(value) {
|
|
21891
|
+
return typeof value === "string" ? value.trim() : value;
|
|
21892
|
+
}
|
|
21893
|
+
function normalizeModelFields(input) {
|
|
21894
|
+
return {
|
|
21895
|
+
...input,
|
|
21896
|
+
...input.provider === void 0 ? {} : { provider: trimmedModelId(input.provider) },
|
|
21897
|
+
...input.model === void 0 ? {} : { model: trimmedModelId(input.model) }
|
|
21898
|
+
};
|
|
21899
|
+
}
|
|
21900
|
+
function completeSelection(selection) {
|
|
21901
|
+
const provider = typeof selection?.provider === "string" ? selection.provider.trim() : "";
|
|
21902
|
+
const model = typeof selection?.model === "string" ? selection.model.trim() : "";
|
|
21903
|
+
return provider !== "" && model !== "" ? { provider, model } : null;
|
|
21904
|
+
}
|
|
21905
|
+
function validateModelPair(input) {
|
|
21906
|
+
if (input.provider === void 0 && input.model === void 0) return;
|
|
21907
|
+
if (input.provider === null && input.model === null) return;
|
|
21908
|
+
if (typeof input.provider === "string" && input.provider !== "" && typeof input.model === "string" && input.model !== "") return;
|
|
21909
|
+
throw new AutomationRequestError("provider \u4E0E model \u5FC5\u987B\u540C\u65F6\u6307\u5B9A\u975E\u7A7A ID \u6216\u540C\u65F6\u4E3A null\u3002");
|
|
21910
|
+
}
|
|
21911
|
+
function assertInheritedPair(omitted, provider, model, consultedSession) {
|
|
21912
|
+
if (!omitted || provider !== null && model !== null) return;
|
|
21913
|
+
throw new AutomationRequestError(
|
|
21914
|
+
consultedSession ? "\u5F53\u524D\u4F1A\u8BDD\u548C\u5168\u5C40\u9009\u62E9\u90FD\u6CA1\u6709\u5B8C\u6574\u7684\u6A21\u578B\u914D\u5BF9\uFF0C\u8BF7\u540C\u65F6\u6307\u5B9A provider \u548C model\uFF0C\u6216\u90FD\u8BBE\u4E3A null\u3002" : "\u5168\u5C40\u9009\u62E9\u6CA1\u6709\u5B8C\u6574\u7684\u6A21\u578B\u914D\u5BF9\uFF0C\u8BF7\u540C\u65F6\u6307\u5B9A provider \u548C model\uFF0C\u6216\u90FD\u8BBE\u4E3A null\u3002"
|
|
21915
|
+
);
|
|
21916
|
+
}
|
|
21887
21917
|
function asMessage(error51) {
|
|
21888
21918
|
return error51 instanceof Error ? error51.message : String(error51);
|
|
21889
21919
|
}
|
|
@@ -22057,11 +22087,16 @@ var AutomationService = class _AutomationService {
|
|
|
22057
22087
|
const current = await this.ownedDefinition(scope, id);
|
|
22058
22088
|
throwIfCancelled(signal);
|
|
22059
22089
|
const now2 = toIso();
|
|
22060
|
-
const { status: status2, ...
|
|
22090
|
+
const { status: status2, ...rawFields } = input;
|
|
22091
|
+
const fields = normalizeModelFields(rawFields);
|
|
22092
|
+
validateModelPair(fields);
|
|
22061
22093
|
let normalizedFields = fields.permissionPreset === void 0 ? fields : {
|
|
22062
22094
|
...fields,
|
|
22063
22095
|
permissionPreset: this.requirePermission(fields.permissionPreset)
|
|
22064
22096
|
};
|
|
22097
|
+
if ((fields.provider !== void 0 || fields.model !== void 0) && (fields.provider !== current.provider || fields.model !== current.model) && fields.reasoningEffort === void 0) {
|
|
22098
|
+
normalizedFields = { ...normalizedFields, reasoningEffort: null };
|
|
22099
|
+
}
|
|
22065
22100
|
if (fields.workspaceId !== void 0 || fields.cwd !== void 0) {
|
|
22066
22101
|
const target = await this.resolveUpdateWorkspace(
|
|
22067
22102
|
current,
|
|
@@ -22285,12 +22320,16 @@ var AutomationService = class _AutomationService {
|
|
|
22285
22320
|
};
|
|
22286
22321
|
}
|
|
22287
22322
|
async resolveCreateTarget(scope, request) {
|
|
22288
|
-
const
|
|
22323
|
+
const explicit = normalizeModelFields({ provider: request.provider, model: request.model });
|
|
22324
|
+
validateModelPair(explicit);
|
|
22325
|
+
const omitted = explicit.provider === void 0 && explicit.model === void 0;
|
|
22326
|
+
const fallbackPair = completeSelection(this.ctx.agentDefaultModel?.currentSelection?.());
|
|
22289
22327
|
let workspaceId = request.workspaceId?.trim() ?? "";
|
|
22290
22328
|
let cwd = request.cwd?.trim() ?? "";
|
|
22291
22329
|
let agentPreset = request.agentPreset?.trim() || "standard";
|
|
22292
|
-
let provider =
|
|
22293
|
-
let model =
|
|
22330
|
+
let provider = explicit.provider === void 0 ? fallbackPair?.provider ?? null : explicit.provider;
|
|
22331
|
+
let model = explicit.model === void 0 ? fallbackPair?.model ?? null : explicit.model;
|
|
22332
|
+
let consultedSession = false;
|
|
22294
22333
|
if (workspaceId !== "" || cwd !== "") {
|
|
22295
22334
|
const registry2 = this.ctx.workspaceRegistry;
|
|
22296
22335
|
const byId = workspaceId === "" ? void 0 : registry2.get?.(WorkspaceId2(workspaceId));
|
|
@@ -22310,10 +22349,16 @@ var AutomationService = class _AutomationService {
|
|
|
22310
22349
|
workspaceId = resolved.workspace.id;
|
|
22311
22350
|
cwd = resolved.workspace.path;
|
|
22312
22351
|
agentPreset = this.ctx.agentPresets.composedPreset(resolved.agent.ctx) ?? resolved.agent.session.header.agentPreset ?? agentPreset;
|
|
22313
|
-
|
|
22314
|
-
|
|
22315
|
-
|
|
22352
|
+
consultedSession = true;
|
|
22353
|
+
if (omitted) {
|
|
22354
|
+
const sessionPair = completeSelection(resolved.agent.session.requestHeader()?.config);
|
|
22355
|
+
if (sessionPair !== null) {
|
|
22356
|
+
provider = sessionPair.provider;
|
|
22357
|
+
model = sessionPair.model;
|
|
22358
|
+
}
|
|
22359
|
+
}
|
|
22316
22360
|
}
|
|
22361
|
+
assertInheritedPair(omitted, provider, model, consultedSession);
|
|
22317
22362
|
return { workspaceId, cwd, agentPreset, provider, model };
|
|
22318
22363
|
}
|
|
22319
22364
|
async resolveScope(scope) {
|
|
@@ -23048,6 +23093,27 @@ var JSON_OUTPUT = {
|
|
|
23048
23093
|
schema: { type: "json" },
|
|
23049
23094
|
render
|
|
23050
23095
|
};
|
|
23096
|
+
var MODEL_PARAMETERS = {
|
|
23097
|
+
provider: {
|
|
23098
|
+
oneOf: [{ type: "string" }, { type: "null" }],
|
|
23099
|
+
description: "\u6A21\u578B\u63D0\u4F9B\u65B9 ID\uFF0C\u5FC5\u987B\u4E0E model \u6210\u5BF9\u6307\u5B9A\u975E\u7A7A ID \u6216\u6210\u5BF9\u8BBE\u4E3A null\u3002\u521B\u5EFA\u65F6\u4E24\u9879\u90FD\u7701\u7565\u7EE7\u627F\u5F53\u524D\u4F1A\u8BDD\u6216\u5168\u5C40\u9009\u62E9\uFF1B\u66F4\u65B0\u65F6\u4E24\u9879\u90FD\u7701\u7565\u4FDD\u6301\u4E0D\u53D8\u3002\u5148\u7528 automation_list \u67E5\u8BE2 models\u3002"
|
|
23100
|
+
},
|
|
23101
|
+
model: {
|
|
23102
|
+
oneOf: [{ type: "string" }, { type: "null" }],
|
|
23103
|
+
description: "\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E provider \u6210\u5BF9\u4F20\u5165\u3002\u8DDF\u968F\u5168\u5C40\u65F6\u5C06\u4E24\u9879\u90FD\u8BBE\u4E3A null\u3002\u5207\u6362\u6A21\u578B\u65F6\u7701\u7565 reasoning_effort \u4F1A\u6E05\u9664\u65E7\u7B49\u7EA7\uFF0C\u6062\u590D\u6A21\u578B\u9ED8\u8BA4\u3002"
|
|
23104
|
+
},
|
|
23105
|
+
reasoning_effort: {
|
|
23106
|
+
oneOf: [{ type: "string" }, { type: "null" }],
|
|
23107
|
+
description: "\u8BE5\u6A21\u578B\u516C\u5E03\u7684 reasoningEfforts \u503C\u3002\u521B\u5EFA\u65F6\u7701\u7565\u4F7F\u7528\u6A21\u578B\u9ED8\u8BA4\uFF1B\u66F4\u65B0\u65F6\u7701\u7565\u4FDD\u6301\u4E0D\u53D8\uFF1Bnull \u6E05\u9664\u56FA\u5B9A\u7B49\u7EA7\uFF0C\u6062\u590D\u6A21\u578B\u9ED8\u8BA4\u3002"
|
|
23108
|
+
}
|
|
23109
|
+
};
|
|
23110
|
+
function modelFromArgs(args) {
|
|
23111
|
+
return {
|
|
23112
|
+
...args.provider === void 0 ? {} : { provider: args.provider },
|
|
23113
|
+
...args.model === void 0 ? {} : { model: args.model },
|
|
23114
|
+
...args.reasoning_effort === void 0 ? {} : { reasoningEffort: args.reasoning_effort }
|
|
23115
|
+
};
|
|
23116
|
+
}
|
|
23051
23117
|
function json2(value) {
|
|
23052
23118
|
return JSON.parse(JSON.stringify(value));
|
|
23053
23119
|
}
|
|
@@ -23116,7 +23182,8 @@ function registerAutomationTools(service, agent) {
|
|
|
23116
23182
|
month_day: { type: "integer", description: "\u6BCF\u6708\u8BA1\u5212\u5728\u7B2C\u51E0\u65E5\u8FD0\u884C\uFF0C\u8303\u56F4 1-31\u3002" },
|
|
23117
23183
|
every_days: { type: "integer", description: "\u81EA\u5B9A\u4E49\u8BA1\u5212\u6BCF\u9694\u51E0\u5929\u8FD0\u884C\uFF0C\u8303\u56F4 1-365\u3002" },
|
|
23118
23184
|
max_concurrent_runs: { type: "integer", description: "\u540C\u4E00\u81EA\u52A8\u5316\u7684\u5E76\u53D1\u8FD0\u884C\u4E0A\u9650\uFF0C\u5FC5\u987B\u4E3A\u6B63\u6574\u6570\uFF0C\u9ED8\u8BA4 1" },
|
|
23119
|
-
permission: { type: "string", enum: permissionNames }
|
|
23185
|
+
permission: { type: "string", enum: permissionNames },
|
|
23186
|
+
...MODEL_PARAMETERS
|
|
23120
23187
|
},
|
|
23121
23188
|
output: JSON_OUTPUT,
|
|
23122
23189
|
async execute(args, exec) {
|
|
@@ -23127,7 +23194,8 @@ function registerAutomationTools(service, agent) {
|
|
|
23127
23194
|
prompt: args.prompt,
|
|
23128
23195
|
schedule: scheduleFromArgs(args, (/* @__PURE__ */ new Date()).toISOString()),
|
|
23129
23196
|
...args.max_concurrent_runs === void 0 ? {} : { maxConcurrentRuns: args.max_concurrent_runs },
|
|
23130
|
-
...args.permission === void 0 ? {} : { permissionPreset: args.permission }
|
|
23197
|
+
...args.permission === void 0 ? {} : { permissionPreset: args.permission },
|
|
23198
|
+
...modelFromArgs(args)
|
|
23131
23199
|
}, exec.signal);
|
|
23132
23200
|
return json2({ ok: true, automation: value });
|
|
23133
23201
|
} catch (error51) {
|
|
@@ -23139,7 +23207,7 @@ function registerAutomationTools(service, agent) {
|
|
|
23139
23207
|
}));
|
|
23140
23208
|
register(defineTool({
|
|
23141
23209
|
name: "automation_list",
|
|
23142
|
-
description: "\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u7684\u81EA\u52A8\u5316\u89C4\u5219\u3001\u4E0B\u6B21\u8FD0\u884C\u65F6\u95F4\u548C\u6700\u8FD1\u4E00\u6B21\u7ED3\u679C\u3002",
|
|
23210
|
+
description: "\u5217\u51FA\u5F53\u524D\u5DE5\u4F5C\u533A\u7684\u81EA\u52A8\u5316\u89C4\u5219\u3001\u4E0B\u6B21\u8FD0\u884C\u65F6\u95F4\u548C\u6700\u8FD1\u4E00\u6B21\u7ED3\u679C\uFF0C\u4EE5\u53CA\u53EF\u9009\u6A21\u578B\u76EE\u5F55 models\u3001\u5404\u6A21\u578B reasoning.efforts\u3001\u5168\u5C40 defaultModel \u548C\u76EE\u5F55\u52A0\u8F7D\u5931\u8D25 modelFailures\u3002\u6307\u5B9A\u6216\u4FEE\u590D\u6A21\u578B\u524D\u5148\u67E5\u8BE2\u76EE\u5F55\uFF0C\u4F7F\u7528\u5176\u4E2D\u7684 provider/model ID \u548C\u63A8\u7406\u7B49\u7EA7\u3002",
|
|
23143
23211
|
parameters: {},
|
|
23144
23212
|
output: JSON_OUTPUT,
|
|
23145
23213
|
async execute(_args, exec) {
|
|
@@ -23150,6 +23218,9 @@ function registerAutomationTools(service, agent) {
|
|
|
23150
23218
|
ok: true,
|
|
23151
23219
|
generatedAt: snapshot.generatedAt,
|
|
23152
23220
|
workspace: snapshot.workspace,
|
|
23221
|
+
models: snapshot.models,
|
|
23222
|
+
modelFailures: snapshot.modelFailures,
|
|
23223
|
+
defaultModel: snapshot.defaultModel,
|
|
23153
23224
|
automations: snapshot.definitions
|
|
23154
23225
|
});
|
|
23155
23226
|
} catch (error51) {
|
|
@@ -23161,7 +23232,7 @@ function registerAutomationTools(service, agent) {
|
|
|
23161
23232
|
}));
|
|
23162
23233
|
register(defineTool({
|
|
23163
23234
|
name: "automation_update",
|
|
23164
|
-
description: "\u66F4\u65B0\u5F53\u524D\u5DE5\u4F5C\u533A\u4E2D\u4E00\u6761\u81EA\u52A8\u5316\u7684\u540D\u79F0\u3001\u4EFB\u52A1\u8BF4\u660E\u3001\u8BA1\u5212\u3001\u6743\u9650\u6216\u6682\u505C/\u6062\u590D\u72B6\u6001\u3002\u4EC5\u6682\u505C\u4E0D\u9700\u8981\u5176\u4ED6\u5B57\u6BB5\u3002",
|
|
23235
|
+
description: "\u66F4\u65B0\u5F53\u524D\u5DE5\u4F5C\u533A\u4E2D\u4E00\u6761\u81EA\u52A8\u5316\u7684\u540D\u79F0\u3001\u4EFB\u52A1\u8BF4\u660E\u3001\u8BA1\u5212\u3001\u6A21\u578B\u3001\u63A8\u7406\u7B49\u7EA7\u3001\u6743\u9650\u6216\u6682\u505C/\u6062\u590D\u72B6\u6001\u3002\u4EC5\u6682\u505C\u6216\u4FEE\u6539\u6A21\u578B\u4E0D\u9700\u8981\u5176\u4ED6\u5B57\u6BB5\u3002\u8FD4\u56DE\u4FDD\u5B58\u540E\u7684\u5B8C\u6574\u5B9A\u4E49\uFF1Bprovider \u548C model \u5747\u4E3A null \u8868\u793A\u8DDF\u968F\u8FD0\u884C\u65F6\u5168\u5C40\u9009\u62E9\u3002",
|
|
23165
23236
|
parameters: {
|
|
23166
23237
|
id: { type: "string", required: true },
|
|
23167
23238
|
name: { type: "string" },
|
|
@@ -23177,14 +23248,15 @@ function registerAutomationTools(service, agent) {
|
|
|
23177
23248
|
month_day: { type: "integer" },
|
|
23178
23249
|
every_days: { type: "integer" },
|
|
23179
23250
|
max_concurrent_runs: { type: "integer", description: "\u540C\u4E00\u81EA\u52A8\u5316\u7684\u5E76\u53D1\u8FD0\u884C\u4E0A\u9650\uFF0C\u5FC5\u987B\u4E3A\u6B63\u6574\u6570\uFF0C\u9ED8\u8BA4 1" },
|
|
23180
|
-
permission: { type: "string", enum: permissionNames }
|
|
23251
|
+
permission: { type: "string", enum: permissionNames },
|
|
23252
|
+
...MODEL_PARAMETERS
|
|
23181
23253
|
},
|
|
23182
23254
|
output: JSON_OUTPUT,
|
|
23183
23255
|
async execute(args, exec) {
|
|
23184
23256
|
if (exec.agent !== agent || exec.signal.aborted) return json2({ ok: false, code: "cancelled" });
|
|
23185
23257
|
try {
|
|
23186
23258
|
validateScheduleSelector(args);
|
|
23187
|
-
const input = {};
|
|
23259
|
+
const input = { ...modelFromArgs(args) };
|
|
23188
23260
|
if (args.name !== void 0) input.name = String(args.name);
|
|
23189
23261
|
if (args.prompt !== void 0) input.prompt = String(args.prompt);
|
|
23190
23262
|
if (args.status !== void 0) input.status = args.status;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michengai/dsh-automation",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.55",
|
|
4
4
|
"description": "DSH Automation — 在独立 DSH Session 中按计划执行和管理编码任务 · Schedule and manage coding tasks in isolated DSH sessions",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.22.0",
|