peyk.platform_core.capabilities

Audited cross-platform capability registry.

Functions

get_capabilities(platform)

Return the audited capabilities for platform.

Classes

CapabilityMatrix(platforms)

Complete three-state matrix and comparison helpers.

CapabilitySet(platform, features)

Capabilities for one platform.

Feature(*values)

Cross-platform features audited by Phase 1.

Support(level, evidence, str], ...] =, ...)

Audited support for one feature on one platform.

SupportLevel(*values)

Degree of implementation support established by the audit.

class peyk.platform_core.capabilities.CapabilityMatrix(platforms: Mapping[str, CapabilitySet])[source]

Bases: object

Complete three-state matrix and comparison helpers.

platforms: Mapping[str, CapabilitySet]
for_platform(platform: str) CapabilitySet[source]

Return the capability set for a platform identifier.

missing_on(platform: str) tuple[Feature, ...][source]

Return features audited as unsupported on platform.

diff(a: str, b: str) Mapping[Feature, tuple[Support, Support]][source]

Return features whose audited support differs between two platforms.

class peyk.platform_core.capabilities.CapabilitySet(platform: str, features: Mapping[Feature, Support])[source]

Bases: object

Capabilities for one platform.

platform: str
features: Mapping[Feature, Support]
supports(feature: Feature) bool[source]

Return whether support is established as usable rather than unknown.

get(feature: Feature) Support[source]

Return the audited support record for feature.

limit(name: str) object | None[source]

Return a named limit from any feature record that declares it.

class peyk.platform_core.capabilities.Feature(*values)[source]

Bases: str, Enum

Cross-platform features audited by Phase 1.

TEXT = 'messaging.text'
PHOTO = 'messaging.photo'
VIDEO = 'messaging.video'
AUDIO = 'messaging.audio'
VOICE = 'messaging.voice'
DOCUMENT = 'messaging.document'
ANIMATION = 'messaging.animation'
STICKER = 'messaging.sticker'
CONTACT = 'messaging.contact'
LOCATION = 'messaging.location'
VENUE = 'messaging.venue'
POLL = 'messaging.poll'
DICE = 'messaging.dice'
MEDIA_GROUP = 'messaging.media_group'
COPY = 'messaging.copy'
FORWARD = 'messaging.forward'
EDIT_TEXT = 'messaging.edit_text'
EDIT_CAPTION = 'messaging.edit_caption'
EDIT_MEDIA = 'messaging.edit_media'
EDIT_MARKUP = 'messaging.edit_markup'
DELETE = 'messaging.delete'
BULK_DELETE = 'messaging.bulk_delete'
REPLY_TO = 'messaging.reply_to'
CHAT_ACTIONS = 'messaging.chat_actions'
REACTIONS = 'messaging.reactions'
PROTECT_CONTENT = 'messaging.protect_content'
ENTITIES_FORMATTING = 'messaging.entities_formatting'
INLINE_KEYBOARD = 'keyboards.inline'
REPLY_KEYBOARD = 'keyboards.reply'
REMOVE_REPLY = 'keyboards.remove_reply'
FORCE_REPLY = 'keyboards.force_reply'
BUTTON_URL = 'keyboards.button.url'
BUTTON_CALLBACK = 'keyboards.button.callback'
BUTTON_WEB_APP = 'keyboards.button.web_app'
BUTTON_COPY_TEXT = 'keyboards.button.copy_text'
BUTTON_COLOR_STYLE = 'keyboards.button.color_style'
BUTTON_ICON_EMOJI = 'keyboards.button.icon_emoji'
BUTTON_REQUEST_CONTACT = 'keyboards.button.request_contact'
BUTTON_REQUEST_LOCATION = 'keyboards.button.request_location'
BUTTON_REQUEST_POLL = 'keyboards.button.request_poll'
BUTTON_REQUEST_USERS = 'keyboards.button.request_users'
BUTTON_REQUEST_CHAT = 'keyboards.button.request_chat'
BUTTON_PAY = 'keyboards.button.pay'
BUTTON_SWITCH_INLINE = 'keyboards.button.switch_inline'
BUTTON_LOGIN_URL = 'keyboards.button.login_url'
RUBIKA_BUTTON_SELECTION = 'keyboards.rubika.selection'
RUBIKA_BUTTON_CALENDAR = 'keyboards.rubika.calendar'
RUBIKA_BUTTON_NUMBER_PICKER = 'keyboards.rubika.number_picker'
RUBIKA_BUTTON_STRING_PICKER = 'keyboards.rubika.string_picker'
RUBIKA_BUTTON_LOCATION = 'keyboards.rubika.location'
RUBIKA_BUTTON_CAMERA_IMAGE = 'keyboards.rubika.camera_image'
RUBIKA_BUTTON_CAMERA_VIDEO = 'keyboards.rubika.camera_video'
RUBIKA_BUTTON_FILE = 'keyboards.rubika.file'
RUBIKA_BUTTON_AUDIO = 'keyboards.rubika.audio'
RUBIKA_BUTTON_RECORD_AUDIO = 'keyboards.rubika.record_audio'
RUBIKA_BUTTON_TEXTBOX = 'keyboards.rubika.textbox'
RUBIKA_BUTTON_PHONE = 'keyboards.rubika.ask_my_phone_number'
RUBIKA_BUTTON_USER_LOCATION = 'keyboards.rubika.ask_my_location'
RUBIKA_BUTTON_BARCODE = 'keyboards.rubika.barcode'
CALLBACK_ANSWER = 'callbacks.answer'
CALLBACK_ALERT_TOAST = 'callbacks.alert_toast'
CALLBACK_DATA_LIMIT = 'callbacks.data_byte_limit'
POLLING = 'updates.polling'
WEBHOOK = 'updates.webhook'
WEBHOOK_SECRET_HEADER = 'updates.webhook_secret_header'
UPDATE_OFFSET = 'updates.offset_kind'
ALLOWED_UPDATES = 'updates.allowed_updates'
LONG_POLL_TIMEOUT = 'updates.long_poll_timeout'
BAN = 'chat_admin.ban'
UNBAN = 'chat_admin.unban'
RESTRICT = 'chat_admin.restrict'
PROMOTE = 'chat_admin.promote'
PIN = 'chat_admin.pin'
UNPIN = 'chat_admin.unpin'
MEMBER_COUNT = 'chat_admin.member_count'
ADMINISTRATORS = 'chat_admin.administrators'
PERMISSIONS = 'chat_admin.permissions'
TITLE = 'chat_admin.title'
DESCRIPTION = 'chat_admin.description'
CHAT_PHOTO = 'chat_admin.photo'
LEAVE = 'chat_admin.leave'
JOIN_REQUESTS = 'chat_admin.join_requests'
FORUM_TOPICS = 'chat_admin.forum_topics'
MEMBER_STATUS_UPDATES = 'chat_admin.member_status_updates'
GET_FILE = 'files.get_file'
UPLOAD_BYTES = 'files.upload_bytes'
MULTI_STEP_UPLOAD = 'files.multi_step_upload'
PAYMENTS = 'payments'
BOT_COMMANDS = 'bot_profile.commands'
BOT_NAME = 'bot_profile.name'
BOT_DESCRIPTION = 'bot_profile.description'
INLINE_MODE = 'inline_mode'
TELEGRAM_GAMES = 'telegram.games'
TELEGRAM_PASSPORT = 'telegram.passport'
TELEGRAM_BUSINESS = 'telegram.business'
TELEGRAM_STORIES = 'telegram.stories'
TELEGRAM_GIFTS = 'telegram.gifts'
TELEGRAM_STARS = 'telegram.stars'
class peyk.platform_core.capabilities.Support(level: ~peyk.platform_core.capabilities.SupportLevel, evidence: tuple[tuple[str, str], ...] = (), limits: ~typing.Mapping[str, object] = <factory>, note: str = '', confidence: str = 'confirmed')[source]

Bases: object

Audited support for one feature on one platform.

level: SupportLevel
evidence: tuple[tuple[str, str], ...] = ()
limits: Mapping[str, object]
note: str = ''
confidence: str = 'confirmed'
limit(name: str) object | None[source]

Return an audited limit, or None when it is not recorded.

class peyk.platform_core.capabilities.SupportLevel(*values)[source]

Bases: str, Enum

Degree of implementation support established by the audit.

FULL = 'full'
PARTIAL = 'partial'
EMULATED = 'emulated'
NONE = 'none'
UNKNOWN = 'unknown'
peyk.platform_core.capabilities.get_capabilities(platform: str | Platform) CapabilitySet[source]

Return the audited capabilities for platform.

Modules

bale

Bale capability declarations derived from the audited client/models.

legacy

Compatibility projection for the pre-R0 capability dataclass.

rubika

Rubika capability declarations derived from the audited official-contract implementation.

telegram

Telegram capability declarations derived from the audited client/models.