register_hooks(); } } } /** * What the plugin wires (strings = static register_hooks(), objects = instance). * * Engine: abilities, changesets (engine + background jobs), store map/summary, chat image uploads. Chat: REST (addsynapse-assistant/v1, * logged-in users with the capability + REST nonce). wp-admin: the shared AddSynapse menu/Overview, AddSynapse → Store Assistant (chat + Settings). * * There is NO job channel: the AI answers with the manager's own key, every tool call * is made by the wp-admin chat request of a logged-in user, as that user, and every change is applied by a * logged-in user in wp-admin. * * @param bool $admin wp-admin request. * @return array */ public static function components( bool $admin ): array { $list = array( new AbilitiesRegistrar(), StoreMap::class, StoreSummary::class, ChangesetService::class, ImageUploads::class, new RestRoutes(), // Toolbar link to the chat (wp-admin and front end, users with the capability). AdminBarLink::class, ); if ( $admin ) { // Shared «AddSynapse» top-level menu + Overview (docs/ADMIN-MENU.md). $list[] = AddsynapseMenu::class; $list[] = new AdminPage(); $list[] = new SettingsPage(); // Settings → «Your own AI key»: save + test, remove. $list[] = new OwnKeySection(); // Optional AddSynapse account (opt-in card) and short announcements — the plugin's own screens only. $list[] = new OptIn(); $list[] = new Announcements(); // Links to the separate Store Assistant Pro add-on (menu item, Plugins row) and the one-time review request. $list[] = new ProOffers(); $list[] = new ReviewRequest(); } return $list; } }