From 6266d785abbcc5d94adda46569f212c5a6ebea7f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 30 Oct 2026 06:33:03 +0000 Subject: [PATCH] chore: sync MCP source from the monorepo at df194b0 Published by release/2026-10-29-001. Previous sync: 9c6599eacc0a3eb3e71b6142af70c321e6fa13f5. Carries: chore: replace deprecated zod APIs --- mcp-server/.synced-from | 2 +- mcp-server/src/lib/schema.ts | 8 ++++---- mcp-server/src/tools/context/get-context.ts | 6 +++--- .../src/tools/evidence/create-evidence-links.ts | 8 ++++---- mcp-server/src/tools/identifierSchemas.test.ts | 2 +- .../src/tools/integrations/link-jira-issue.ts | 2 +- .../tools/projects/list-project-pull-requests.ts | 2 +- mcp-server/src/tools/runs/add-attachments.ts | 10 +++++----- mcp-server/src/tools/sessions/create-session.ts | 2 +- mcp-server/src/tools/share/create-share-link.ts | 14 +++++++------- 10 files changed, 28 insertions(+), 28 deletions(-) diff --git a/mcp-server/.synced-from b/mcp-server/.synced-from index acf7507..d3deb7d 100644 --- a/mcp-server/.synced-from +++ b/mcp-server/.synced-from @@ -1 +1 @@ -9c6599eacc0a3eb3e71b6142af70c321e6fa13f5 +df194b0317d172e6f5a3941dab0484549dd757e1 diff --git a/mcp-server/src/lib/schema.ts b/mcp-server/src/lib/schema.ts index 795800f..a8d3c56 100644 --- a/mcp-server/src/lib/schema.ts +++ b/mcp-server/src/lib/schema.ts @@ -105,12 +105,12 @@ export const isoDateString = () => .refine( (value) => matchesIsoDate(value) || matchesIsoDateTime(value, DATE_TIME, true), - { message: 'Expected an ISO 8601 date or date-time' } + { error: 'Expected an ISO 8601 date or date-time' } ); /** * `expiresAfter` is stricter than the query bounds: the actions routes declare - * it `z.string().datetime()` (`CreateActionSchema` in + * it `z.iso.datetime()` (`CreateActionSchema` in * packages/api/src/api/actions/actions.validation.ts), which requires a UTC * timestamp and refuses a date on its own or a numeric offset. */ @@ -118,7 +118,7 @@ export const isoDateTimeString = () => z .string() .refine((value) => matchesIsoDateTime(value, UTC_DATE_TIME, false), { - message: 'Expected a UTC ISO 8601 date-time', + error: 'Expected a UTC ISO 8601 date-time', }); /** @@ -147,4 +147,4 @@ const UUID_V4 = /^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i; export const uuidV4 = () => - z.string().regex(UUID_V4, { message: 'Expected a UUID' }); + z.string().regex(UUID_V4, { error: 'Expected a UUID' }); diff --git a/mcp-server/src/tools/context/get-context.ts b/mcp-server/src/tools/context/get-context.ts index da534fd..69873c5 100644 --- a/mcp-server/src/tools/context/get-context.ts +++ b/mcp-server/src/tools/context/get-context.ts @@ -88,7 +88,7 @@ const zodSchema = z if (test_id) { if (!instance_id) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'test_id requires instance_id', path: ['instance_id'], }); @@ -98,7 +98,7 @@ const zodSchema = z if (instance_id) { if (!run_id) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'instance-level context requires run_id when test_id is omitted', path: ['run_id'], @@ -108,7 +108,7 @@ const zodSchema = z } if (!run_id) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', // The only message a caller that passed nothing gets, so it names // every level rather than the one it fell through to. message: diff --git a/mcp-server/src/tools/evidence/create-evidence-links.ts b/mcp-server/src/tools/evidence/create-evidence-links.ts index 93dfedc..6022e47 100644 --- a/mcp-server/src/tools/evidence/create-evidence-links.ts +++ b/mcp-server/src/tools/evidence/create-evidence-links.ts @@ -65,28 +65,28 @@ const zodSchema = z const forSession = value.sessionId || value.attachmentId; if (forSession && (value.instanceId || value.testId)) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'send sessionId and attachmentId, or instanceId and testId', path: ['sessionId'], }); } else if (forSession) { if (!value.sessionId || !value.attachmentId) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'a session needs both sessionId and attachmentId', path: [value.sessionId ? 'attachmentId' : 'sessionId'], }); } if (value.attemptIndex !== undefined || value.artifactName) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'attemptIndex and artifactName are for CI tests', path: ['attemptIndex'], }); } } else if (!value.instanceId || !value.testId) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'send instanceId and testId, or sessionId and attachmentId', path: ['instanceId'], }); diff --git a/mcp-server/src/tools/identifierSchemas.test.ts b/mcp-server/src/tools/identifierSchemas.test.ts index 8068abb..de2fedd 100644 --- a/mcp-server/src/tools/identifierSchemas.test.ts +++ b/mcp-server/src/tools/identifierSchemas.test.ts @@ -172,7 +172,7 @@ describe('ISO date inputs', () => { } ); - // The actions routes declare expiresAfter z.string().datetime(), so a date on + // The actions routes declare expiresAfter z.iso.datetime(), so a date on // its own or a numeric offset is refused where a date bound would take it. it.each(['2026-01-01', '2026-01-01T00:00:00+02:00', 'January 1, 2026'])( 'rejects %s as expiresAfter', diff --git a/mcp-server/src/tools/integrations/link-jira-issue.ts b/mcp-server/src/tools/integrations/link-jira-issue.ts index a40b827..8277eaa 100644 --- a/mcp-server/src/tools/integrations/link-jira-issue.ts +++ b/mcp-server/src/tools/integrations/link-jira-issue.ts @@ -43,7 +43,7 @@ const zodSchema = z .superRefine((val, ctx) => { if (val.includeContextInComment === false && !val.comment?.trim()) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'comment is required when includeContextInComment is false', path: ['comment'], }); diff --git a/mcp-server/src/tools/projects/list-project-pull-requests.ts b/mcp-server/src/tools/projects/list-project-pull-requests.ts index de38ade..08fb98a 100644 --- a/mcp-server/src/tools/projects/list-project-pull-requests.ts +++ b/mcp-server/src/tools/projects/list-project-pull-requests.ts @@ -30,7 +30,7 @@ const searchText = ( return length >= 1 && length <= SEARCH_MAX_LENGTH; }, { - message: `Expected 1 to ${SEARCH_MAX_LENGTH} characters after trimming`, + error: `Expected 1 to ${SEARCH_MAX_LENGTH} characters after trimming`, } ); diff --git a/mcp-server/src/tools/runs/add-attachments.ts b/mcp-server/src/tools/runs/add-attachments.ts index f187a80..0f7bf19 100644 --- a/mcp-server/src/tools/runs/add-attachments.ts +++ b/mcp-server/src/tools/runs/add-attachments.ts @@ -159,7 +159,7 @@ const zodSchema = z return new Set(names).size === names.length; }, { - message: 'two traces share a name, so they cannot be told apart', + error: 'two traces share a name, so they cannot be told apart', } ) .describe( @@ -169,7 +169,7 @@ const zodSchema = z .superRefine((value, ctx) => { if (!value.sessionId === !value.runId) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'send sessionId or runId, not both and not neither', path: ['sessionId'], }); @@ -179,14 +179,14 @@ const zodSchema = z ); if (value.sessionId && target) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: `${target} is for CI runs; a session has no spec, test or machine`, path: [target], }); } const problem = runTargetProblem(value); if (value.runId && problem) { - ctx.addIssue({ code: z.ZodIssueCode.custom, message: problem }); + ctx.addIssue({ code: 'custom', message: problem }); } if (value.runId && !problem) { const level = runTargetLevel(value); @@ -196,7 +196,7 @@ const zodSchema = z ); if (refused) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: `A ${refused.type} cannot be attached at the ${level} level. Allowed: ${allowed.join(', ')}`, path: ['attachments'], }); diff --git a/mcp-server/src/tools/sessions/create-session.ts b/mcp-server/src/tools/sessions/create-session.ts index ed51b97..c7c80ac 100644 --- a/mcp-server/src/tools/sessions/create-session.ts +++ b/mcp-server/src/tools/sessions/create-session.ts @@ -104,7 +104,7 @@ const zodSchema = z.strictObject({ return new Set(names).size === names.length; }, { - message: 'two traces share a name, so they cannot be told apart', + error: 'two traces share a name, so they cannot be told apart', } ) .describe( diff --git a/mcp-server/src/tools/share/create-share-link.ts b/mcp-server/src/tools/share/create-share-link.ts index 8d9923e..79d12c4 100644 --- a/mcp-server/src/tools/share/create-share-link.ts +++ b/mcp-server/src/tools/share/create-share-link.ts @@ -65,7 +65,7 @@ const zodSchema = z val.attempt !== undefined ) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'session_id cannot be sent with run_id, instance_id, test_id or attempt', path: ['session_id'], @@ -73,7 +73,7 @@ const zodSchema = z } if (val.purpose !== 'report') { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'a session can be shared with purpose "report" only', path: ['purpose'], }); @@ -82,21 +82,21 @@ const zodSchema = z } if (val.test_id && !val.instance_id) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'test_id requires instance_id', path: ['instance_id'], }); } if (val.instance_id && !val.run_id && !val.test_id) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'instance_id requires run_id (spec file) or test_id (test)', path: ['run_id'], }); } if (!val.run_id && !val.instance_id) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'provide session_id (session), run_id (run), run_id + instance_id (spec file), or instance_id + test_id (test)', path: ['run_id'], @@ -104,14 +104,14 @@ const zodSchema = z } if (val.attempt !== undefined && !(val.instance_id && val.test_id)) { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'attempt requires a single test (instance_id + test_id)', path: ['attempt'], }); } if (val.attempt !== undefined && val.purpose === 'report') { ctx.addIssue({ - code: z.ZodIssueCode.custom, + code: 'custom', message: 'attempt is only valid with purpose "fix"', path: ['attempt'], });