feat: add agentic cli preferences#8933
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a732e09. Configure here.
| marketing: MarketingPreference; | ||
| perps: PerpsPreference; | ||
| socialAI: SocialAIPreference; | ||
| agenticCli: AgenticCliPreference; |
There was a problem hiding this comment.
Validation schema missing new agenticCli field
High Severity
The NotificationPreferences type now requires agenticCli, but NotificationPreferencesSchema in validators.ts was not updated to include a corresponding agenticCli field. The assertNotificationPreferences function uses this schema to validate API responses, then asserts the data is NotificationPreferences. This means API data missing agenticCli will pass validation, yet downstream code will trust it's present — causing runtime undefined access errors.
Reviewed by Cursor Bugbot for commit a732e09. Configure here.


Explanation
Adds Agentic CLI notification preferences to authenticated user storage and wires them through NotificationServicesController.
@metamask/authenticated-user-storage
@metamask/notification-services-controller
Breaking change
NotificationPreferences now requires agenticCli. Consumers that construct or spread preference objects must include this field.
References
Checklist
Note
Medium Risk
Extending
NotificationPreferenceswith a new required field is a breaking type change for consumers that build or spread preference objects withoutagenticCli.Overview
Adds agentic CLI notification settings to authenticated user storage: a new
AgenticCliPreferencetype (in-app and push toggles) and a requiredagenticClifield onNotificationPreferences.Test mocks were updated so
MOCK_NOTIFICATION_PREFERENCESincludes sampleagenticClivalues.Reviewed by Cursor Bugbot for commit a732e09. Bugbot is set up for automated code reviews on this repo. Configure here.