From 03418e8143cec95e15daea1ff07ff85d2c91e2dd Mon Sep 17 00:00:00 2001 From: _Kerman Date: Fri, 10 Jul 2026 15:32:21 +0800 Subject: [PATCH] chore(agent-core-v2): drop legacy 8-hex mention from CronDelete/CronList tool source Match the prompt change in 5cc8e520f: the CronDelete parameter description and invalid-id error now say "ULID" only (not "ULID or legacy 8-hex"), and the CronList id doc comment likewise. The validation regex is unchanged so loading any legacy 8-hex tasks from disk still works. --- .../agent-core-v2/src/session/cron/tools/cron-delete.ts | 7 +++---- packages/agent-core-v2/src/session/cron/tools/cron-list.ts | 2 +- .../agent-core-v2/test/session/cron/cron-tools.test.ts | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/agent-core-v2/src/session/cron/tools/cron-delete.ts b/packages/agent-core-v2/src/session/cron/tools/cron-delete.ts index d97571cea..3c060d509 100644 --- a/packages/agent-core-v2/src/session/cron/tools/cron-delete.ts +++ b/packages/agent-core-v2/src/session/cron/tools/cron-delete.ts @@ -58,7 +58,7 @@ const ID_PATTERN = /^(?:[0-9a-f]{8}|[0-9A-HJKMNP-TV-Z]{26})$/i; export const CronDeleteInputSchema = z.object({ id: z .string() - .describe('The cron job id (ULID, or legacy 8-hex) returned by CronCreate / CronList.'), + .describe('The cron job id (ULID) returned by CronCreate / CronList.'), }); export type CronDeleteInput = z.infer; @@ -76,14 +76,13 @@ export class CronDeleteTool implements BuiltinTool { resolveExecution(args: CronDeleteInput): ToolExecution { // Format check up front. The store would reject the lookup anyway, // but the message is more actionable when it names the constraint - // ("ULID or 8 lowercase hex characters") rather than a generic - // "not found". + // ("ULID") rather than a generic "not found". if (!ID_PATTERN.test(args.id)) { return { isError: true, output: `Invalid cron job id ${JSON.stringify( args.id, - )} — must be a ULID or 8 lowercase hex characters.`, + )} — must be a ULID.`, }; } diff --git a/packages/agent-core-v2/src/session/cron/tools/cron-list.ts b/packages/agent-core-v2/src/session/cron/tools/cron-list.ts index fe9931ba1..5832807bf 100644 --- a/packages/agent-core-v2/src/session/cron/tools/cron-list.ts +++ b/packages/agent-core-v2/src/session/cron/tools/cron-list.ts @@ -9,7 +9,7 @@ * * What each record carries: * - * - `id` — the task id (a ULID, or legacy 8-hex) (also accepted by CronDelete). + * - `id` — the task id (a ULID) (also accepted by CronDelete). * - `cron` — verbatim 5-field expression as scheduled. * - `humanSchedule` — best-effort plain-English rendering via * `cronToHuman`; falls back to the raw `cron` diff --git a/packages/agent-core-v2/test/session/cron/cron-tools.test.ts b/packages/agent-core-v2/test/session/cron/cron-tools.test.ts index e5e9f3665..7e5a42587 100644 --- a/packages/agent-core-v2/test/session/cron/cron-tools.test.ts +++ b/packages/agent-core-v2/test/session/cron/cron-tools.test.ts @@ -467,7 +467,7 @@ describe('CronDeleteTool', () => { const output = assertError(await runTool(tool, { id })); - expect(output).toContain('must be a ULID or 8 lowercase hex characters'); + expect(output).toContain('must be a ULID'); expect(harness.store.list()).toHaveLength(1); expect(harness.deleted).toEqual([]); },