Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Pinned — your Sanity apiVersion is a promise; this agent reads the fine print

说明与用途

Pinned 自动检测 Sanity API 版本的隐藏更改,指出文档不一致,并提供带引用的简明解释,帮助开发者在生产部署前纠正 Sanity 客户端配置。

问题

Developers using Sanity’s API risk unintentionally exposing unpublished drafts to production when they bump the apiVersion, because the default perspective changes from raw to published on 2025‑02‑19.

结果

Pinned automatically detects silent apiVersion changes that affect draft visibility, flags doc inconsistencies, and provides concise explanations with citations, enabling developers to correct their Sanity client configuration before production deployment.

工作流

  • Paste Sanity client config (and optional package.json, GROQ queries) into Pinned.
  • Pinned parses the code into typed facts via Babel AST.
  • Pinned fetches verified rules from a Sanity dataset and evaluates them against the facts.
  • Pinned uses a Knowledge Base to explain each finding, citing docs.
  • Pinned presents findings, highlighting silent changes and doc inconsistencies.
  • User reviews findings, selects correct claim where applicable, and updates code accordingly.

证据

Pinned tells you three things: What your code actually does today at the apiVersion you pinned, what silently changes if you bump that version, and where Sanity's own docs disagree with themselves.

来源

Before API version 2025-02-19 the default perspective is raw. Authenticated raw queries return drafts.* documents alongside published ones, so unpublished drafts are served to your production site.

来源

Pinned stores those boundaries as structured data. It uses Knowledge Base Instructions to keep the build from collapsing them.

来源

  • 记录日期: 2026-10-04T23:55:52.477Z