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.
This commit is contained in:
_Kerman 2026-07-10 15:32:21 +08:00
parent 4bc65edc4d
commit 03418e8143
3 changed files with 5 additions and 6 deletions

View file

@ -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<typeof CronDeleteInputSchema>;
@ -76,14 +76,13 @@ export class CronDeleteTool implements BuiltinTool<CronDeleteInput> {
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.`,
};
}

View file

@ -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`

View file

@ -467,7 +467,7 @@ describe('CronDeleteTool', () => {
const output = assertError(await runTool<CronDeleteInput>(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([]);
},