Pinned — your Sanity apiVersion is a promise; this agent reads the fine print
Описание и применение
Pinned автоматически обнаруживает скрытые изменения версии 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