chore: merge main into next to resolve v3 PR conflicts

ZR
3d ago
+1806-259

Purpose

Resolve the main/next conflicts in #1378 (next → main) through a separately reviewable PR, without merging v3 into main.

This branch starts at next and merges main directly into it. It contains a real merge commit, not a squashed copy or cherry-picked patch. Both the complete next history and the main history remain intact.

Conflict Resolutions

  • Preserve next's v3 prerelease versions, AI SDK 7, Zod 4, and intentional API migrations.
  • Bring in main's stable fixes for delegated-agent memory, template replacement, sandbox command normalization, RAG format detection, and MCP metadata/stateless HTTP support.
  • Keep next's migrated Netlify tool implementation rather than restoring the legacy execution context.
  • Retain both changelog histories, add prerelease changesets, align MCP SDK ranges, and regenerate the lockfile.

Merge Instructions

Use Create a merge commit. Do not squash or rebase this PR.

Merging this PR into next preserves main's ancestry and resolves #1378's current branch conflicts. #1378 remains open for the eventual v3 release into main. This PR does not merge next into main.

Validation

  • Verified current origin/next and origin/main are both ancestors of the restored merge commit.
  • Verified the restored tree is identical to the previously validated sync.
  • Passed: full build across 30 projects.
  • Passed: core tests (1,606), MCP server (13), server-core (135), and RAG (47).
  • Passed: core, MCP server, and server-core typechecks.
  • Passed: AI SDK 7.0.0 compatibility, including 136 contract tests.
  • Passed: tracked-file Biome lint/format checks, whitespace checks, and frozen-lockfile installation.

Known Validation Limitations

  • Full test run encounters playground localStorage failures in the local Node runtime and an unreachable PostgreSQL E2E database.
  • Root lint scans existing untracked .scratch files and fails on formatting/file size; tracked-file checks pass.
  • Existing playground manifest ordering and Monaco version-range issues remain unchanged.