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.
|
@metamaskbot publish-preview |
|
Preview builds have been published. Learn how to use preview builds in other projects. Expand for full list of packages and versions. |
will make agenticCli required on next Major


Explanation
Adds Agentic CLI notification preferences to authenticated user storage and wires them through
NotificationServicesController.@metamask/authenticated-user-storageAgenticCliPreference(inAppNotificationsEnabled,pushNotificationsEnabled) and an optionalagenticClifield onNotificationPreferences(minor semver; the next major release should make it required).DEFAULT_AGENTIC_CLI_PREFERENCES(both flags default totrue) and exports it from the package index.getNotificationPreferences: legacy blobs that omitagenticCliare backfilled with a shallow copy ofDEFAULT_AGENTIC_CLI_PREFERENCES, then validated against the full schema. When non-null, the returned object always includesagenticClieven though the type marks it optional.putNotificationPreferences: relies on the TypeScript type for write shape; no additional runtime validation is performed on PUT.@metamask/notification-services-controllerDEFAULT_AGENTIC_CLI_PREFERENCESfrom@metamask/authenticated-user-storage.agenticCliwhen building fresh notification preferences viabuildFreshPreferences.agenticClipreferences;NotificationServicesControllerdoes not filter Agentic CLI notifications at fetch time (same asperpsandsocialAI).Semver note
This is a minor change:
agenticCliis optional onNotificationPreferences, so existing consumers that read-modify-write viagetNotificationPreferencesdo not need code changes. The next major release should makeagenticClirequired on the type.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.