Skip to content

Adopt Zod 4.5 across AgentLayer - #72

Merged
K-Mistele merged 1 commit into
mainfrom
audit-zod-45-adoption-for-memory-and-compatibility
Aug 30, 2026
Merged

Adopt Zod 4.5 across AgentLayer#72
K-Mistele merged 1 commit into
mainfrom
audit-zod-45-adoption-for-memory-and-compatibility

Conversation

@K-Mistele

Copy link
Copy Markdown
Contributor

Summary

  • upgrade the repository-wide Zod catalog from 4.3.6 to 4.5.4
  • enable lazy global Zod compilation at the Codelayer CLI, docs workflow, and Yjs agent application entry points
  • upgrade the Yjs editor's TanStack Router packages to versions whose build tooling supports Zod 4
  • enforce one exact catalog-backed Zod version in workspace manifests and bun.lock, including CI and release workflows

Why

Zod 4.5 substantially reduces retained memory per schema. AgentLayer also passes Zod schemas across package boundaries, so resolving one exact version prevents incompatible ZodType identities. The application-level zod/compile imports opt executables into lazy fast-path compilation without imposing process-wide behavior on published libraries.

TanStack Router accepts Zod 4 schemas directly through Standard Schema. AgentLayer's editor does not use the Zod adapter, but its older Router plugin pulled Zod 3 into the lockfile; the upgraded plugin depends on Zod 4 and now deduplicates to 4.5.4.

Validation

  • bun install --frozen-lockfile
  • bun check — 1,244 tests passed, 2 skipped
  • bun run --cwd agents/codelayer build
  • bun run --cwd packages/yjs-fs build
  • bun run --cwd packages/yjs-fs-react build
  • bun run --cwd examples/yjs-fs-editor build
  • bun run agents/codelayer/src/cli.ts --help
  • bun run agents/docs-agent/src/workflow.ts --help

@github-actions

Copy link
Copy Markdown

Docs Agent Review

Agent finished with reason: error


To apply these recommendations, comment: @docs-agent apply

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​types/​bun@​1.3.14 ⏵ 1.4.01001004892 +2100
Updated@​tanstack/​router-plugin@​1.167.22 ⏵ 1.168.35991007898 +3100
Updated@​tanstack/​react-router@​1.168.23 ⏵ 1.170.3292 +1610087 +398 +3100
Updatedzod@​3.25.76 ⏵ 4.5.410010010096100

View full report

@K-Mistele
K-Mistele merged commit 63d88ce into main Aug 30, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant