oc_connect
Loading...
Searching...
No Matches
oc_connect.delivery Namespace Reference

Classes

class  DeliveryConnector
class  OutboundSender

Functions

tuple[str,...] parse_choices (Sequence[str] raw)

Variables

tuple CHOICES_RULE

Detailed Description

Grant-checked, filtered, durable outbound delivery orchestration.

Dependencies
------------
- oc_connect.audit (AuditStore, content_hash - audits a blocked send and finds the audit id a keyboard names)
- oc_connect.connectors.telegram.destinations (DestinationStore - resolves the named destination and its connector)
- oc_connect.connectors.telegram.transport (inline_keyboard - builds the reply-vocabulary keyboard for --choices)
- oc_connect.credentials (CredentialBroker - handed to the connector factory)
- oc_connect.egress (require_safe, EgressBlockedError - the egress filter every send passes)
- oc_connect.grants (GrantStore - resolves the send risk and requires a matching grant)
- oc_connect.outbox (Outbox, OutboxItem - queues and processes the durable send)
- oc_connect.registry (ConnectorRegistry, load_builtin_connectors - finds the connector for a destination)
- oc_diagnostics (_dbg structured logger)
- option_c_connector_contracts (REPLY_VOCABULARY, DeliveryReceipt - allowed choices and the send receipt)

Function Documentation

◆ parse_choices()

tuple[str, ...] oc_connect.delivery.parse_choices ( Sequence[str] raw)
Return the vocabulary tokens a keyboard may carry, or refuse by name.

Structured-only ruling (plan 236 P1): a label is accepted only when it is
exactly a :data:`REPLY_VOCABULARY` token. Case is not folded, a URL is a
label like any other and is refused the same way, and a repeated token is
refused because a keyboard with two identical buttons answers nothing.

Definition at line 61 of file delivery.py.

Here is the caller graph for this function:

Variable Documentation

◆ CHOICES_RULE

tuple oc_connect.delivery.CHOICES_RULE
Initial value:
1= (
2 "Security rulings (scanner waivers, thresholds, M8 files) are NEVER sent "
3 "with --choices; buttons carry operational decisions only."
4)

Definition at line 36 of file delivery.py.