{
  "path": "/posts/rito-for-developer",
  "site": "at://did:plc:rgdcflm4ylsl6udghmtblydc/site.standard.publication/blog",
  "tags": [
    "リト",
    "Bluesky"
  ],
  "$type": "site.standard.document",
  "title": "リト開発者向け / Rito for Developer",
  "updatedAt": "2026-02-22T10:06:41.921Z",
  "description": "ATProtocolで動作するリトの開発者向けの説明です。",
  "publishedAt": "2025-09-22T00:00:00.000Z",
  "textContent": "English follow Japanese\n\nリトでは、開発者向けの機能を提供します。\n\n## オーナーコメント\n\n通常、このタイトルと説明はWebサイトから取得されたOGPが表示されますが、プロダクトオーナーは自身のコメントを、そのブックマークの最上位に表示することができます。さらに、自動で「Verified」タグが挿入されます。\n\nプロダクトオーナーと認定されるには、下記の条件を満たす必要があります。\n\n- Blueskyのアカウントを所有していること\n- そのアカウントがカスタムドメインが設定されていること\n- ご自身のプロダクトのWebサイトがカスタムドメインを含むドメインで稼働していること\n- ブックマークのURLがhttps://rito.blue/のようにパスを含まないこと\n- ブックマークのURLがホスト部がブックマークを行うアカウントのカスタムハンドルを含むこと\nWebサイトを持たないソースコードのみのプロダクトの場合、現在はhttps://tangled.org/のみがサポートされます。\n\n- Blueskyのアカウントを所有していること\n- そのアカウントでログインし、https://tangled.org/@usounds.work/devのように、\n## Lexiconスキーマ\n\nATProtocolの重要な要素の一つのデータはNSIDをキーに保存されます。ただし、このNSIDのデータのレンダラーとなるURLはATProtocol上では知りうることができませんでした。\n\nリトではNSIDがどのURLでレンダリング可能かを、全員が定義することができます。\n\n- レンダラーがブックマークされていること\n- そのブックマークに「ATProtocol」タグが設定されていること\nこの条件を満たす場合、URL詳細タブに「Lexiconタブ」が表示されます。\n\n変更を押すと、NSIDに対するスキーマを入力できます。\n\n```javascript\nhttps://skyblur.uk/post/{did}/{rkey}\n```\n\n{did} と {rkey}はプレースホルダとして使用できます。もし、データとして取り扱いURLが存在しない場合は「このNSIDに対応するAppViewのURLは存在しない」のスライダーをオンにしてください。\n\nなお、この登録は「プロダクトオーナー」の登録が最優先されます。プロダクトオーナーは下記のように判定します\n\n- 該当LexiconがLexicon解決に対応している場合\n- Lexicon解決に対応していない場合\nプロダクトオーナー以外の登録は多数決によって決まります。もし誤りがある場合は、変更から修正案を提案してみてください。\n\nなお、プロダクトオーナーが登録をしている場合、他のユーザーからの変更はできなくなります。\n\n## Schema API\n\n登録したNSIDに対するスキーマはAPIから参照できます。該当するスキーマやサイトのOGP、オーナーブックマーク(ない場合は最新のコメント)が参照できます。このAPIはCloudflareで5分キャッシュされ、リアルタイムに更新されません。\n\nhttps://rito.blue/xrpc/blue.rito.service.getSchema?nsid=uk.skyblur.post\n\nLexiconはこちらを参照ください。\n\nhttps://raw.githubusercontent.com/usounds/Rito/refs/heads/main/lexicons/blue/rito/service/getSchema.json\n\n# English\n\n## Owner Comments\n\nNormally, the title and description here are taken from the website’s OGP, but product owners can display their own comments at the very top of the bookmark. Additionally, a “Verified” tag will be automatically inserted.\n\nTo be recognized as a product owner, the following conditions must be met:\n\n- You must own a Bluesky account.\n- That account must have a custom domain set.\n- Your product’s website must be running on a domain that includes the custom domain.\n- The bookmark URL must not include a path, e.g., like https://rito.blue/.\n- The host part of the bookmark URL must include the custom handle of the account making the bookmark.\nFor products consisting only of source code with no website, currently only https://tangled.org/ is supported.\n\n- You must own a Bluesky account.\n- You must log in with that account, and the URL must meet the following:\n## Lexicon Schema\n\nIn ATProtocol, one of the most important data elements is stored using NSID as the key. However, the URL that serves as the renderer for that NSID data cannot be known directly within ATProtocol.\n\nIn Rito, anyone can define which URL an NSID can be rendered at.\n\nConditions:\n\n- The renderer must be bookmarked.\n- The bookmark must have the “ATProtocol” tag assigned.\nIf these conditions are met, a “Lexicon” tab will appear in the URL detail view.\n\nWhen you click Change, you can input a schema for the NSID.\n\n```javascript\nhttps://skyblur.uk/post/{did}/{rkey}\n```\n\nYou can use {did} and {rkey} as placeholders.\n\nIf there is no URL corresponding to the data, turn on the toggle for “No AppView URL exists for this NSID”\n\nNote that registrations made by product owners always take precedence. A product owner is determined as follows:\n\n- If the relevant Lexicon supports Lexicon resolution:\n- If Lexicon resolution is not supported:\nRegistrations from non-product owners are decided by majority vote. If there’s an error, please propose a correction via Edit.\n\nIf a product owner has registered, no changes can be made by other users.\n\n## Schema API\n\nThe schema for a registered NSID can be accessed via the API. You can retrieve the corresponding schema, the site’s OGP, and the owner’s bookmarks (or the latest comment if none exist). This API is cached on Cloudflare for 5 minutes, so updates are not reflected in real time.\n\nhttps://rito.blue/xrpc/blue.rito.service.getSchema?nsid=uk.skyblur.post\n\nRefer to the Lexicon here:\n\nhttps://raw.githubusercontent.com/usounds/Rito/refs/heads/main/lexicons/blue/rito/service/getSchema.json\n\n"
}