Package-level declarations

Types

Link copied to clipboard

Lists currently-active watches from WatchRegistry.list, with each entry's TTL countdown (expires_in_seconds, floored at 0) and how many times it has fired so far. Expired watches are swept from the registry before the list is built, so this never returns a watch whose TTL has already elapsed. No preconditions — always succeeds, even with an empty registry.

Link copied to clipboard

Provider for the notification-watch module. Wires up WatchNotificationsTool, UnwatchNotificationsTool, and ListNotificationWatchesTool, all backed by WatchRegistry. Watches match against the live stream via NotificationListenerBus.events rather than polling — the host's listener service must be bound and notification listener access granted for events to flow. As with the sibling NotificationsReplyTools module, this is a special-access permission granted via Settings, so requiredPermissions is empty and hasPermissions always returns true; use isNotificationListenerEnabled or permissionStatus to check actual readiness.

Link copied to clipboard

Removes a watch by id via WatchRegistry.unregister. Idempotent — removing an id that doesn't exist (already expired, already removed, or never valid) returns success with removed=false rather than an error, so callers don't need to check existence first. Output: the echoed watch_id and removed.

Link copied to clipboard

Registers a filter against the live notification stream in WatchRegistry, returning a watch_id for later ListNotificationWatchesTool / UnwatchNotificationsTool calls. Requires the listener service bound and notification listener access granted, else notification_listener_not_enabled. At least one of package_name (exact match), sender_pattern (substring on title), or keyword (substring on text/bigText/subText/ ticker) is required — supplying none is invalid_filter; supplying several AND-combines. All string matching is case-insensitive. ttl_seconds (clamped 60-86400, default 3600) auto-expires the watch; fire_on_update (default false) controls whether subsequent updates to an already-matched notification key fire again. Output: watch_id, expires_at, the effective ttl_seconds, and fire_on_update.