Skip to content

v2.0.0 — Unified Apply

Choose a tag to compare

@MajorTal MajorTal released this 18 May 06:41
· 1354 commits to main since this release
557e7b8

Unified Apply

This is the v1.48 destructive cutover landing in the public packages.

The shape

  • One write engine — r.project(id).apply(spec) atomically lands any combination of release slices (database / functions / site / subdomains / routes / checks) and an asset slice (assets.put / .delete / .sync). Same plan / commit / idempotency / retry / event envelope as before; assets is just a new slice on the existing spec.
  • One namespace for blobs — r.project(id).assets replaces the legacy r.blobs. New Node-only helpers: uploadDir (additive), syncDir (destructive only with explicit prune: true + confirmation token), prepareDir (returns { manifest, applySlice } so HTML can be rendered against resolved URLs before the apply lands).
  • One endpoint — /apply/v1/*. Legacy /deploy/v2/* and /storage/v1/uploads* return 404.
  • Sync-prune drift is a first-class commit outcome: plan computes base_revision + delete_set_digest, commit re-reads inventory and rejects with HTTP 409 ASSET_SYNC_DRIFT if the prefix changed mid-flight. The SDK auto-re-plans.
  • Immutable URLs survive key mutation — internal.asset_versions retains every (project, key, sha) triplet so re-uploading logo.png doesn't break older content-hashed CDN URLs.

Removed surfaces (this is a breaking release)

  • r.blobs, r.deploy.apply, r.assets.apply, bare r.apply — gone. Use r.project(id).apply for writes and r.project(id).assets for blob operations.
  • run402 blob CLI — gone. Use run402 assets (upload, sync, put, prepare, ls, rm, sign, diagnose).
  • blob_put MCP tool — gone. Use assets_put, assets_upload_dir, assets_sync_dir, assets_prepare_dir, assets_put_many.
  • POST /deploy/v2/plans and POST /storage/v1/uploads — return 404.

What also changed

  • CI bindings gain asset_key_scopes for per-key write authorization. The release-slice allowlist (secrets, subdomains, routes, checks forbidden for CI sessions) is enforced on /apply/v1/plans as hard errors.
  • Plan response carries asset_entries[] (one resolved AssetRef per asset put entry, pre-commit), asset_sync (destructive confirmation block when sync-prune is declared), and a cost preview (storage_bytes_added, asset_keys_added/removed/after_commit, payment_required, quota_before/after).
  • AssetRef.scriptTag() / linkTag() / imgTag() emitters carry SRI + crossorigin + MIME-param parsing + attribute escaping.

Upgrade

Lockstep across SDK, CLI, MCP, and Functions — all at 2.0.0. See openspec/changes/unified-apply (private repo) for the per-task ledger and design rationale.