From 9f5bc9669b5ef16f36ea4128a91e484b28da5355 Mon Sep 17 00:00:00 2001 From: Ziya Date: Tue, 13 Oct 2026 05:38:34 -0700 Subject: [PATCH] =?UTF-8?q?fix(schedule):=20=E7=AE=80=E5=8C=96=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8C=96=E4=BB=BB=E5=8A=A1=E6=A0=87=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E6=97=B6=E9=97=B4=E4=B8=8E=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=20(#6105)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(schedule): keep timing and execution notes out of task titles * fix(schedule): avoid repeating task title guidance * fix(schedule): keep title guidance examples in English --------- Co-authored-by: ZiyaZhang <199893125+ZiyaZhang@users.noreply.github.com> --- docs/tool-catalog.md | 4 ++-- docs/tool-catalog.zh.md | 4 ++-- packages/schedule/tool-schedule/README.i18n.yaml | 4 ++-- packages/schedule/tool-schedule/README.md | 2 +- packages/schedule/tool-schedule/README.zh.md | 2 +- packages/schedule/tool-schedule/src/index.ts | 12 ++++++++++-- .../tool-schedule/tests/tool-schedule.spec.ts | 2 +- .../web/fresh-round-trip/tool-schemas.expected.json | 4 ++-- .../system-prompt.expected.md | 4 ++-- .../optional-string-editor/system-prompt.expected.md | 4 ++-- snapshots/web/ptc-round/system-prompt.expected.md | 4 ++-- 11 files changed, 27 insertions(+), 19 deletions(-) diff --git a/docs/tool-catalog.md b/docs/tool-catalog.md index 0d415975c6..82abbdd2c5 100644 --- a/docs/tool-catalog.md +++ b/docs/tool-catalog.md @@ -1397,7 +1397,7 @@ Create a reminder in the current session that delivers prompt when it becomes du }, "title": { "type": "string", - "description": "Task name of at most 120 characters, shown on the task card and in task lists." + "description": "Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt." }, "after_seconds": { "type": "number", @@ -1558,7 +1558,7 @@ Change a reminder in place, keeping its id. Supply a new title, prompt, or at mo }, "title": { "type": "string", - "description": "New task name of at most 120 characters." + "description": "New task name; follow the schedule_create title rules." }, "prompt": { "type": "string", diff --git a/docs/tool-catalog.zh.md b/docs/tool-catalog.zh.md index 1622182f0f..1e3dad2606 100644 --- a/docs/tool-catalog.zh.md +++ b/docs/tool-catalog.zh.md @@ -1403,7 +1403,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete }, "title": { "type": "string", - "description": "Task name of at most 120 characters, shown on the task card and in task lists." + "description": "Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt." }, "after_seconds": { "type": "number", @@ -1564,7 +1564,7 @@ create、edit、pause 和 resume 要求直接来自人类的根权限;complete }, "title": { "type": "string", - "description": "New task name of at most 120 characters." + "description": "New task name; follow the schedule_create title rules." }, "prompt": { "type": "string", diff --git a/packages/schedule/tool-schedule/README.i18n.yaml b/packages/schedule/tool-schedule/README.i18n.yaml index dd18039a4a..8563815ed2 100644 --- a/packages/schedule/tool-schedule/README.i18n.yaml +++ b/packages/schedule/tool-schedule/README.i18n.yaml @@ -42,8 +42,8 @@ en: 3039bc5e7a796b21 zh: 6b7a9eaf69c9ea53 /deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/what-the-model-sees: - en: 82465f7520c67ddd - zh: eb9014c758b687c5 + en: 0056efd9de0ecd8c + zh: 6887c2dd9ed8587f /deepseek-ai-dsh-tool-schedule/model-experience/tool-schemas/token-effect: en: 70fb9094859d0804 zh: 30726b045484713c diff --git a/packages/schedule/tool-schedule/README.md b/packages/schedule/tool-schedule/README.md index 238bce1d47..b923332157 100644 --- a/packages/schedule/tool-schedule/README.md +++ b/packages/schedule/tool-schedule/README.md @@ -84,7 +84,7 @@ The plugin registers four `defineTool` definitions through the context that load #### What the model sees -The generated [`schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) whenever this package is visible in the calling Agent's scope. +The generated [`schedule_create`, `schedule_list`, `schedule_update`, and `schedule_delete` schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-schedule) whenever this package is visible in the calling Agent's scope. Title guidance does not rewrite stored titles or add validation beyond the existing non-empty and length checks. #### Token effect diff --git a/packages/schedule/tool-schedule/README.zh.md b/packages/schedule/tool-schedule/README.zh.md index 15e54ecc2f..8404186f32 100644 --- a/packages/schedule/tool-schedule/README.zh.md +++ b/packages/schedule/tool-schedule/README.zh.md @@ -84,7 +84,7 @@ kind: "package-reference" #### What the model sees -只要本包在调用方 Agent 的作用域内可见,模型就会收到生成的 [`schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule)。 +只要本包在调用方 Agent 的作用域内可见,模型就会收到生成的 [`schedule_create`、`schedule_list`、`schedule_update` 与 `schedule_delete` schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-schedule)。标题指引不会改写已存标题,也不会在现有的非空和长度检查之外增加校验。 #### Token effect diff --git a/packages/schedule/tool-schedule/src/index.ts b/packages/schedule/tool-schedule/src/index.ts index d67d474c6d..da802b4a2c 100644 --- a/packages/schedule/tool-schedule/src/index.ts +++ b/packages/schedule/tool-schedule/src/index.ts @@ -195,6 +195,14 @@ const UPDATE_DESCRIPTION = 'Change a reminder in place, keeping its id. Supply a new title, prompt, or at most one timing parameter; ' + 'omitted fields keep their stored values. To change a relative delay, create a new reminder.' +const CREATE_TITLE_DESCRIPTION = + `Concise task name in the user's language, at most ${MAX_TITLE_LENGTH} characters. ` + + 'Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. ' + + 'Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, ' + + 'or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. ' + + 'Do not append parenthetical notes. ' + + 'Put scheduling information in the timing parameters and execution instructions in prompt.' + /** Deterministic model content for every canonical Schedule value. */ function renderValue(_args: unknown, value: unknown): ContentBlock[] { // The ToolRuntime has already validated the value against the lossless-JSON output schema. @@ -454,7 +462,7 @@ function registerScheduleTools(ctx: Context): void { title: { type: 'string', required: true, - description: `Task name of at most ${MAX_TITLE_LENGTH} characters, shown on the task card and in task lists.`, + description: CREATE_TITLE_DESCRIPTION, }, after_seconds: { type: 'number', @@ -534,7 +542,7 @@ function registerScheduleTools(ctx: Context): void { id: { type: 'string', required: true, description: 'Schedule id returned by schedule_list.' }, title: { type: 'string', - description: `New task name of at most ${MAX_TITLE_LENGTH} characters.`, + description: 'New task name; follow the schedule_create title rules.', }, prompt: { type: 'string', diff --git a/packages/schedule/tool-schedule/tests/tool-schedule.spec.ts b/packages/schedule/tool-schedule/tests/tool-schedule.spec.ts index 95f115858f..7e2c294978 100644 --- a/packages/schedule/tool-schedule/tests/tool-schedule.spec.ts +++ b/packages/schedule/tool-schedule/tests/tool-schedule.spec.ts @@ -130,7 +130,7 @@ describe('Schedule model tools', () => { const schema = test.ctx.tools.schemas(test.agent).find(item => item.name === 'schedule_create') const parameters = schema?.parameters as { properties: Record; required: string[] } expect(parameters.properties.title?.type).toBe('string') - expect(parameters.properties.title?.description).toContain('task card') + expect(parameters.properties.title?.description).toContain('Concise task name') expect(parameters.required).toEqual(expect.arrayContaining(['prompt', 'title'])) const created = await execute(test, 'schedule_create', { prompt: 'Check the queue\nand the backlog', title: ' Queue check ', every_seconds: 300, diff --git a/snapshots/web/fresh-round-trip/tool-schemas.expected.json b/snapshots/web/fresh-round-trip/tool-schemas.expected.json index 557f8adc57..90228febab 100644 --- a/snapshots/web/fresh-round-trip/tool-schemas.expected.json +++ b/snapshots/web/fresh-round-trip/tool-schemas.expected.json @@ -408,7 +408,7 @@ }, "title": { "type": "string", - "description": "Task name of at most 120 characters, shown on the task card and in task lists." + "description": "Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt." }, "after_seconds": { "type": "number", @@ -554,7 +554,7 @@ }, "title": { "type": "string", - "description": "New task name of at most 120 characters." + "description": "New task name; follow the schedule_create title rules." }, "prompt": { "type": "string", diff --git a/snapshots/web/official-subagent-bundle/system-prompt.expected.md b/snapshots/web/official-subagent-bundle/system-prompt.expected.md index 74cf3faf4c..eac847a631 100644 --- a/snapshots/web/official-subagent-bundle/system-prompt.expected.md +++ b/snapshots/web/official-subagent-bundle/system-prompt.expected.md @@ -186,7 +186,7 @@ interface ToolArgsMap { schedule_create: { /** Reminder content to present when the target becomes due. */ prompt: string; - /** Task name of at most 120 characters, shown on the task card and in task lists. */ + /** Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt. */ title: string; /** Delay in whole seconds. */ after_seconds?: number; @@ -233,7 +233,7 @@ interface ToolArgsMap { schedule_update: { /** Schedule id returned by schedule_list. */ id: string; - /** New task name of at most 120 characters. */ + /** New task name; follow the schedule_create title rules. */ title?: string; /** New reminder content. */ prompt?: string; diff --git a/snapshots/web/optional-string-editor/system-prompt.expected.md b/snapshots/web/optional-string-editor/system-prompt.expected.md index e6bf7b9e62..f1e9811c90 100644 --- a/snapshots/web/optional-string-editor/system-prompt.expected.md +++ b/snapshots/web/optional-string-editor/system-prompt.expected.md @@ -186,7 +186,7 @@ interface ToolArgsMap { schedule_create: { /** Reminder content to present when the target becomes due. */ prompt: string; - /** Task name of at most 120 characters, shown on the task card and in task lists. */ + /** Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt. */ title: string; /** Delay in whole seconds. */ after_seconds?: number; @@ -233,7 +233,7 @@ interface ToolArgsMap { schedule_update: { /** Schedule id returned by schedule_list. */ id: string; - /** New task name of at most 120 characters. */ + /** New task name; follow the schedule_create title rules. */ title?: string; /** New reminder content. */ prompt?: string; diff --git a/snapshots/web/ptc-round/system-prompt.expected.md b/snapshots/web/ptc-round/system-prompt.expected.md index d52e523e18..13222409c8 100644 --- a/snapshots/web/ptc-round/system-prompt.expected.md +++ b/snapshots/web/ptc-round/system-prompt.expected.md @@ -186,7 +186,7 @@ interface ToolArgsMap { schedule_create: { /** Reminder content to present when the target becomes due. */ prompt: string; - /** Task name of at most 120 characters, shown on the task card and in task lists. */ + /** Concise task name in the user's language, at most 120 characters. Name only the core action and subject; keep essential target identifiers such as PR numbers and branch names. Do not include execution frequency (e.g. daily, hourly), scheduled dates/times, time zones, task status, or configuration and execution details (e.g. read-only mode, profile-tag filters), even when embedded in the requested or existing title. Do not append parenthetical notes. Put scheduling information in the timing parameters and execution instructions in prompt. */ title: string; /** Delay in whole seconds. */ after_seconds?: number; @@ -233,7 +233,7 @@ interface ToolArgsMap { schedule_update: { /** Schedule id returned by schedule_list. */ id: string; - /** New task name of at most 120 characters. */ + /** New task name; follow the schedule_create title rules. */ title?: string; /** New reminder content. */ prompt?: string;