Specification
As the sending notifications in the NotificationsManager are being made asynchronous, we need to introduce commands that interact with the lifecycle of NotificationsManager and the Notifications.
Send
polykey notifications send
This command will be largely the same, but will no longer immediately error. Instead, errors are logged on the Polykey agent, and attempts to send a notification are retried.
Options
--retries [number] // the amount of retries that should be attempted for a notification.
Read
polykey notifications inbox read
polykey notifications outbox read
The notifications read command has now been renamed to inbox read. The outbox read command now also exists for checking what notifications are pending in the outbox. The notificationIdEncoded field is now available on the output so that the user can be given an index to remove a specific notification by.
Options
--limit [number] // has been renamed from --number, limits the amount of notifications shown
--order [newest|oldest]
--unread // this only exists on `inbox read`
Clear
polykey notifications inbox clear
polykey notifications outbox clear
Still the same, but outbox clear also cancels the deleted outbox notifications from being sent.
Remove
polykey notifications inbox remove
polykey notifications outbox remove
Removes a specific notification by the notificationIdEncoded that is returned from polykey notifications * read.
Additional context
#163
MatrixAI/Polykey#703
Tasks
- Implement notifications read commands
- Implement notifications clear commands
- Implement notifications remove commands
Specification
As the sending notifications in the
NotificationsManagerare being made asynchronous, we need to introduce commands that interact with the lifecycle ofNotificationsManagerand theNotifications.Send
This command will be largely the same, but will no longer immediately error. Instead, errors are logged on the Polykey agent, and attempts to send a notification are retried.
Options
--retries [number] // the amount of retries that should be attempted for a notification.Read
The
notifications readcommand has now been renamed toinbox read. Theoutbox readcommand now also exists for checking what notifications are pending in the outbox. ThenotificationIdEncodedfield is now available on the output so that the user can be given an index to remove a specific notification by.Options
Clear
Still the same, but
outbox clearalso cancels the deleted outbox notifications from being sent.Remove
Removes a specific notification by the notificationIdEncoded that is returned from
polykey notifications * read.Additional context
#163
MatrixAI/Polykey#703
Tasks