gock_group_protocol
Pure protocol helpers for the wallet-gated GOCK multiplayer room.
- class gock_group_protocol.HolderChannelSpec(slug, channel_id, pubsub_channel, history_key, display_name)
Bases:
objectServer-owned routing metadata for one holder-chat channel.
- gock_group_protocol.normalize_holder_channel(value)
Return a known holder channel slug, defaulting closed to
main.
- gock_group_protocol.holder_channel_spec(value)
Resolve untrusted channel input to server-owned routing metadata.
- Return type:
- Parameters:
value (Any)
- gock_group_protocol.holder_channel_from_request_id(value)
Map an outbound SSE request id back to its holder channel slug.
- gock_group_protocol.canonical_holder_room(platform, channel_id)
Derive a holder room only from the trusted transport routing fields.
- gock_group_protocol.holder_transport_is_trusted(platform, channel_id)
Accept holder-only metadata solely from the GOCK webchat transport.
- gock_group_protocol.holder_room_uses_atropa_lore(platform, channel_id)
Return whether automatic ATROPA retrieval is valid for this route.
- gock_group_protocol.holder_room_uses_contract_intents(platform, channel_id)
Return whether private client-wallet contract cards are allowed.
- gock_group_protocol.holder_tool_is_allowed_for_route(tool_name, *, platform, channel_id)
Enforce the canonical route policy for holder-room-only tools.
- gock_group_protocol.filter_room_bound_holder_tools(tool_names, *, platform, channel_id)
Keep ATROPA/VOID tools strictly inside their canonical holder rooms.
- gock_group_protocol.filter_room_bound_holder_tools_for_context(tool_names, ctx)
Apply the room-bound tool policy to an injected
ToolContext.
- gock_group_protocol.normalize_wallet_address(value)
Return a canonical lowercase EVM address or raise
ValueError.
- gock_group_protocol.sanitize_display_name(value)
Normalize a wallet display name while removing control characters.
- gock_group_protocol.normalize_message_id(value)
Return a bounded client id, or an empty string when it is unsafe.
- gock_group_protocol.holder_is_eligible(balance_raw)
Return whether a raw 9-decimal balance meets the exact holder gate.
- gock_group_protocol.updated_holder_privilege_mask(current, enabled)
Set or clear only WEB_SEARCH and STARGAZER_USE in a privilege mask.
- gock_group_protocol.format_party_context(messages, *, exclude_message_id='')
Build a bounded, attributed transcript for untrusted prompt context.
- gock_group_protocol.extract_chart_queries(message, active_query='')
Return at most two non-GOCK chart queries mentioned or selected.
- gock_group_protocol.extract_universe_addresses(message, active_query='', *, limit=3)
Return bounded, deduplicated EVM addresses for PULSAr graph lookup.
Unlike chart extraction, GOCK itself is intentionally retained: pasting the room token address should let Star inspect its ingested universe topology. Symbol-only chart selectors are ignored because FalkorDB keys are addresses.