Replace custom jsonSchemaToZod implementation with Zod's native z.fromJSONSchema() method#1735
Replace custom jsonSchemaToZod implementation with Zod's native z.fromJSONSchema() method#1735dimaMachina merged 65 commits intomainfrom
jsonSchemaToZod implementation with Zod's native z.fromJSONSchema() method#1735Conversation
…mary (#1714) - Add `url` field to GraphQL queries for review threads and PR comments - Add Phase 5.4 to capture inline comment URLs after posting - Update Point-Fix Edits section to include clickable links - Update Pending Recommendations to use URLs from pr-context skill - Add `gh api` to allowed tools for fetching comment URLs - Add secure debug artifact uploads for Claude review runs
SDK versions 0.2.27+ have a bug causing AJV validation crashes before any API calls are made. This affects all PR reviews. Tracking issue: anthropics/claude-code-action#892 Related: #852, #880, #804 Will revert to @v1 when the upstream issue is resolved.
…hemas containing refinements` error (#1712) * Revert "fix(agents-core): remove refine call in resource id schema (#1689)" This reverts commit 938ffb8. * Revert "fix(agents-core): remove refine call in resource id schema (#1689)" This reverts commit 938ffb8. * bump * upd * remove zod from pnpm overrides * update zod peerdependencies too, and we have error reproducible locally * minimal fix * rm unrelated changes * rm unrelated changes * rm unrelated changes * rm unrelated changes * rm unrelated changes * rm unrelated changes * rm unrelated changes * rm unrelated changes
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* feat: add Vercel production deployment workflow Add GitHub Actions workflow to deploy to Vercel production only when a GitHub release is published. This integrates with the existing changesets release flow. * feat: add deployment checks before promoting to production Deploy to preview URL first, wait for Vercel deployment checks to pass, then promote to production. This ensures API health before going live. * PRD for vercel deployment strategy * docs: add Vercel staging/production deployment strategy documentation - Document Production Branch configuration (set to '_disabled_') - Document GitHub Actions workflow for release-triggered deployments - Document required secrets (VERCEL_TOKEN, VERCEL_ORG_ID, VERCEL_PROJECT_ID) - Document optional staging domain configuration - Add deployment flow diagram and troubleshooting section - Add secrets documentation comments to workflow file Completes US-001, US-002, US-003, US-004 from vercel-deployment-strategy PRD. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: update Vercel staging/production strategy to use never-deploy branch Replace _disabled_ approach (which Vercel doesn't support) with a never-deploy orphan branch. Update staging domain examples to use api-staging.agents.yourdomain.com pattern. * Apply suggestion from @claude[bot] Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> * revert: remove Vercel deployment docs changes and PRD Revert vercel.mdx to main branch version and remove the PRD file. * feat: deploy both agents-api and agents-manage-ui to Vercel Update production workflow to deploy both projects in parallel using a matrix strategy. Each project uses its own secret for the Vercel project ID. --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
No-op patch bumps to trigger a new release.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…1721) The vercel inspect and promote commands were failing with authorization errors because VERCEL_ORG_ID as an environment variable isn't used by the CLI for scope resolution - it requires the --scope flag explicitly.
| const mockDataSchema = artifactComponent.props | ||
| ? z.fromJSONSchema(artifactComponent.props) | ||
| : z.string(); |
There was a problem hiding this comment.
|
@claude write a changeset based on changes in this PR |
|
Claude finished @dimaMachina's task in 2m 51s —— View job ✅ Changeset CreatedI've created and pushed a changeset for this PR that documents the removal of the custom Todo List
Changeset DetailsFile: Packages affected:
Description: Replace custom jsonSchemaToZod implementation with Zod's native z.fromJSONSchema() method This is an internal refactoring that removes ~200 lines of duplicate code by leveraging Zod's built-in JSON Schema conversion functionality. The change has no user-facing API impact, hence the patch version bump. |
Replace custom implementation with Zod's native z.fromJSONSchema() method Co-authored-by: Dimitri POSTOLOV <dimaMachina@users.noreply.github.com>
jsonSchemaToZod implementation with Zod's native z.fromJSONSchema() method
|
Claude finished @dimaMachina's task in 51s —— View job PR Review Summary (Review #4)1 Key Finding | Risk: Low This is a solid refactoring PR that replaces ~200 lines of duplicate 🟠🔶
|
| Location | Risk | Reason |
|---|---|---|
Agent.ts:2198-2214 |
✅ NONE | Already has try-catch |
Agent.ts:3660 |
✅ LOW | dc.props validated via validatePropsAsJsonSchema() at API layer |
artifact-component-schema.ts:38 |
✅ NONE | Static hardcoded constant |
artifact-component-schema.ts:106 |
✅ LOW | Programmatically constructed from validated inputs |
EvaluationService.ts:1073 |
✅ NONE | Already has try-catch |
manage-ui/validation.ts:45 |
✅ NONE | Already has try-catch |
manage-ui routes |
✅ LOW | Upstream API validates props |
|
Claude finished @dimaMachina's task in 3m 41s —— View job PR Review Summary (Review #5)1 Key Finding | Risk: Low This is an architecturally sound cleanup PR that removes ~180 lines of duplicate code by replacing custom 🟠🔶
|
| Location | Risk | Reason |
|---|---|---|
Agent.ts:1395-1397 |
No upstream JSON Schema validation | |
Agent.ts:2198-2214 |
✅ NONE | Already has try-catch |
Agent.ts:3659 |
✅ LOW | dc.props validated via validatePropsAsJsonSchema() at API + DAL layer |
artifact-component-schema.ts:38 |
✅ NONE | Static hardcoded constant (ARTIFACT_PROPS_SCHEMA) |
artifact-component-schema.ts:106 |
✅ LOW | Programmatically constructed from validated inputs |
EvaluationService.ts:1072-1085 |
✅ NONE | Already has try-catch |
manage-ui/validation.ts:45 |
✅ NONE | Already has try-catch |
📌 Point-fix Edits
- 🟠
Agent.ts:1395-1397Add try-catch for user-controlled inputSchema (posted in review done #3)
💡 APPROVE WITH SUGGESTIONS
Summary: Clean refactor with correct architectural direction. The one remaining gap at Agent.ts:1395 has a 1-click suggestion ready. Given the PR is already approved and the risk is contained to function tools with invalid inputSchema (an edge case), this is ready to merge. Accept the inline suggestion at your discretion.
Other Findings (3)
Discarded as invalid or not applicable
| Location | Issue | Reason Excluded |
|---|---|---|
| Test coverage | Single test case for z.fromJSONSchema |
Zod's native implementation is well-tested; the test validates integration |
agents-cli |
Uses json-schema-to-zod |
Different npm package (generates code strings, not runtime types) — unrelated |
package.json |
Dependency changes | zod-from-json-schema correctly removed — no longer needed |
|
Claude finished @dimaMachina's task in 52s —— View job PR Review Summary (Review #6)1 Key Finding | Risk: Low This PR cleanly removes ~180 lines of duplicate 🟠🔶
|
| Location | Risk | Reason |
|---|---|---|
Agent.ts:2198-2214 |
✅ NONE | Already has try-catch |
Agent.ts:3659 |
✅ LOW | dc.props validated via validatePropsAsJsonSchema() |
artifact-component-schema.ts:38 |
✅ NONE | Static hardcoded constant |
artifact-component-schema.ts:106 |
✅ LOW | Constructed from validated inputs |
EvaluationService.ts:1072-1085 |
✅ NONE | Already has try-catch |
manage-ui/validation.ts:45 |
✅ NONE | Already has try-catch |
No description provided.