Site icon image usounds

usoundsの日常や技術的なメモを残すブログです

リト開発者向け / Rito for Developer

English follow Japanese

リトでは、開発者向けの機能を提供します。

オーナーコメント

Image in a image block

通常、このタイトルと説明はWebサイトから取得されたOGPが表示されますが、プロダクトオーナーは自身のコメントを、そのブックマークの最上位に表示することができます。さらに、自動で「Verified」タグが挿入されます。

プロダクトオーナーと認定されるには、下記の条件を満たす必要があります。

  • Blueskyのアカウントを所有していること
  • そのアカウントがカスタムドメインが設定されていること
  • ご自身のプロダクトのWebサイトがカスタムドメインを含むドメインで稼働していること
  • ブックマークのURLがhttps://rito.blue/のようにパスを含まないこと
  • ブックマークのURLがホスト部がブックマークを行うアカウントのカスタムハンドルを含むこと

Webサイトを持たないソースコードのみのプロダクトの場合、現在はhttps://tangled.org/のみがサポートされます。

  • Blueskyのアカウントを所有していること
  • そのアカウントでログインし、https://tangled.org/@usounds.work/devのように、
    • パスの2つ目がアカウントのハンドルと完全一致していること
    • URLがパスを含まないこと

Lexiconスキーマ

ATProtocolの重要な要素の一つのデータはNSIDをキーに保存されます。ただし、このNSIDのデータのレンダラーとなるURLはATProtocol上では知りうることができませんでした。

リトではNSIDがどのURLでレンダリング可能かを、全員が定義することができます。

  • レンダラーがブックマークされていること
  • そのブックマークに「ATProtocol」タグが設定されていること

この条件を満たす場合、URL詳細タブに「Lexiconタブ」が表示されます。

Image in a image block

変更を押すと、NSIDに対するスキーマを入力できます。

https://skyblur.uk/post/{did}/{rkey}

{did}{rkey}はプレースホルダとして使用できます。もし、データとして取り扱いURLが存在しない場合は「このNSIDに対応するAppViewのURLは存在しない」のスライダーをオンにしてください。

なお、この登録は「プロダクトオーナー」の登録が最優先されます。プロダクトオーナーは下記のように判定します

  • 該当LexiconがLexicon解決に対応している場合
    • Lexicon解決で指定されるDIDと本レコードを作成したDIDが一致している
  • Lexicon解決に対応していない場合
    • そのアカウントがカスタムドメインが設定されていること
    • そのアカウントのハンドルがNSIDと一致していること

プロダクトオーナー以外の登録は多数決によって決まります。もし誤りがある場合は、変更から修正案を提案してみてください。

なお、プロダクトオーナーが登録をしている場合、他のユーザーからの変更はできなくなります。

Schema API

登録したNSIDに対するスキーマはAPIから参照できます。該当するスキーマやサイトのOGP、オーナーブックマーク(ない場合は最新のコメント)が参照できます。このAPIはCloudflareで5分キャッシュされ、リアルタイムに更新されません。

https://rito.blue/xrpc/blue.rito.service.getSchema?nsid=uk.skyblur.post

Lexiconはこちらを参照ください。

https://raw.githubusercontent.com/usounds/Rito/refs/heads/main/lexicons/blue/rito/service/getSchema.json

English

Owner Comments

Normally, 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.

To be recognized as a product owner, the following conditions must be met:

  • You must own a Bluesky account.
  • That account must have a custom domain set.
  • Your product’s website must be running on a domain that includes the custom domain.
  • The bookmark URL must not include a path, e.g., like https://rito.blue/.
  • The host part of the bookmark URL must include the custom handle of the account making the bookmark.

For products consisting only of source code with no website, currently only https://tangled.org/ is supported.

  • You must own a Bluesky account.
  • You must log in with that account, and the URL must meet the following:

Lexicon Schema

In 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.

In Rito, anyone can define which URL an NSID can be rendered at.

Conditions:

  • The renderer must be bookmarked.
  • The bookmark must have the “ATProtocol” tag assigned.

If these conditions are met, a “Lexicon” tab will appear in the URL detail view.

When you click Change, you can input a schema for the NSID.

https://skyblur.uk/post/{did}/{rkey}

You can use {did} and {rkey} as placeholders.

If there is no URL corresponding to the data, turn on the toggle for “No AppView URL exists for this NSID”

Note that registrations made by product owners always take precedence. A product owner is determined as follows:

  • If the relevant Lexicon supports Lexicon resolution:
    • The DID specified in the Lexicon resolution must match the DID that created this record.
  • If Lexicon resolution is not supported:
    • The account must have a custom domain set.
    • The account’s handle must match the NSID.

Registrations from non-product owners are decided by majority vote. If there’s an error, please propose a correction via Edit.

If a product owner has registered, no changes can be made by other users.

Schema API

The 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.

https://rito.blue/xrpc/blue.rito.service.getSchema?nsid=uk.skyblur.post

Refer to the Lexicon here:

https://raw.githubusercontent.com/usounds/Rito/refs/heads/main/lexicons/blue/rito/service/getSchema.json