openagents_sdk::owner_notifications
An agent asks its owner to return to its chat. Grant this separately for each agent.
| Item | What it does |
|---|---|
NotifyOwner struct | A notification request whose ID stays the same across retries. |
OwnerNote struct | Private note fetched by the phone; none of these fields enter the push payload. |
OwnerNotification struct | An account-private note fetched by a phone after an attention wake. |
chat_from_deep_link fn | Return the chat ID from an OpenAgents chat link. |
NotifyOwner
pub struct NotifyOwner {
pub request_id: String,
pub note: OwnerNote,
}
A notification request whose ID stays the same across retries.
OwnerNote
pub struct OwnerNote {
pub agent: String,
pub chat: String,
pub title: String,
pub body: String,
}
Private note fetched by the phone; none of these fields enter the push payload.
OwnerNote::validate
pub fn validate(&self) -> Result<(), Error>
Check identifiers, byte limits, and the app's plain-language copy rules.
OwnerNote::deep_link
pub fn deep_link(&self) -> String
App link generated from the checked chat ID, never a caller-supplied URL.
OwnerNotification
pub struct OwnerNotification {
pub request_id: String,
pub note: OwnerNote,
pub deep_link: String,
}
An account-private note fetched by a phone after an attention wake.
chat_from_deep_link
pub fn chat_from_deep_link(link: &str) -> Option<&str>
Return the chat ID from an OpenAgents chat link. Refuse other destinations.