Skip to content

Commit 468cdea

Browse files
committed
Fix structured nullable outputs
1 parent 51b2d1c commit 468cdea

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/mastra/workflows/challenge/challenge-context-workflow.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ const reviewerInfoSchema = z.object({
4848
const runtimeEnvironmentSchema = z.object({
4949
os: z.string().describe('Expected target operating system (e.g. "Linux", "Windows", "macOS", "any", "unknown")'),
5050
containerized: z.boolean().describe('Whether the challenge expects the solution to run inside a container (Docker, Podman, etc.)'),
51-
containerTool: z.string().optional().describe('Expected container tool if containerized (e.g. "Docker", "Docker Compose", "Podman", "Kubernetes")'),
52-
dockerfileExpected: z.boolean().optional().describe('Whether the challenge expects a Dockerfile / docker-compose file to be included in the submission'),
51+
containerTool: z.string().nullable().optional().describe('Expected container tool if containerized (e.g. "Docker", "Docker Compose", "Podman", "Kubernetes")'),
52+
dockerfileExpected: z.boolean().nullable().optional().describe('Whether the challenge expects a Dockerfile / docker-compose file to be included in the submission'),
5353
runtimeEngine: z.string().describe('Expected primary runtime engine (e.g. "Node.js", "Python", "JVM", "Go", ".NET CLR", "browser", "unknown")'),
54-
runtimeVersion: z.string().optional().describe('Required runtime version if specified in the challenge (e.g. ">=18", "3.11", "21 LTS")'),
54+
runtimeVersion: z.string().nullable().optional().describe('Required runtime version if specified in the challenge (e.g. ">=18", "3.11", "21 LTS")'),
5555
programmingLanguages: z.array(z.string()).describe('Programming languages required by the challenge (e.g. ["TypeScript", "Python"])'),
56-
packageManager: z.string().optional().describe('Expected package manager if mentioned in the challenge (e.g. "npm", "pnpm", "yarn", "pip", "poetry", "maven")'),
57-
buildTool: z.string().optional().describe('Expected build tool if mentioned in the challenge (e.g. "webpack", "vite", "tsc", "gradle", "make")'),
58-
deploymentTarget: z.string().optional().describe('Expected deployment target if specified (e.g. "AWS Lambda", "Vercel", "Heroku", "on-premise", "local")'),
59-
serverType: z.string().optional().describe('Expected server framework or type if specified (e.g. "Express", "NestJS", "FastAPI", "Spring Boot")'),
60-
databaseEngine: z.string().optional().describe('Expected primary database if mentioned in the challenge (e.g. "PostgreSQL", "MongoDB", "DynamoDB")'),
61-
additionalServices: z.array(z.string()).optional().describe('Additional services expected by the challenge (e.g. ["Redis", "RabbitMQ", "Elasticsearch"])'),
62-
notes: z.string().optional().describe('Any other runtime / environment expectations inferred from the challenge spec'),
56+
packageManager: z.string().nullable().optional().describe('Expected package manager if mentioned in the challenge (e.g. "npm", "pnpm", "yarn", "pip", "poetry", "maven")'),
57+
buildTool: z.string().nullable().optional().describe('Expected build tool if mentioned in the challenge (e.g. "webpack", "vite", "tsc", "gradle", "make")'),
58+
deploymentTarget: z.string().nullable().optional().describe('Expected deployment target if specified (e.g. "AWS Lambda", "Vercel", "Heroku", "on-premise", "local")'),
59+
serverType: z.string().nullable().optional().describe('Expected server framework or type if specified (e.g. "Express", "NestJS", "FastAPI", "Spring Boot")'),
60+
databaseEngine: z.string().nullable().optional().describe('Expected primary database if mentioned in the challenge (e.g. "PostgreSQL", "MongoDB", "DynamoDB")'),
61+
additionalServices: z.array(z.string()).nullable().optional().describe('Additional services expected by the challenge (e.g. ["Redis", "RabbitMQ", "Elasticsearch"])'),
62+
notes: z.string().nullable().optional().describe('Any other runtime / environment expectations inferred from the challenge spec'),
6363
});
6464

6565
/**
@@ -92,10 +92,10 @@ const existingCodebaseSchema = z.object({
9292
'List of pre-existing artifacts referenced by the challenge (repos, starter code, docs, designs, etc.). '
9393
+ 'Empty array if greenfield.',
9494
),
95-
repositoryUrl: z.string().optional().describe(
95+
repositoryUrl: z.string().nullable().optional().describe(
9696
'Primary Git repository URL if an existing codebase is provided',
9797
),
98-
branchOrTag: z.string().optional().describe(
98+
branchOrTag: z.string().nullable().optional().describe(
9999
'Branch, tag, or commit reference to use if specified',
100100
),
101101
languages: z.array(z.string()).optional().describe(

0 commit comments

Comments
 (0)