__( 'Connector Approval', 'ai' ), 'description' => __( 'Require explicit administrator approval before plugins or themes can use AI connectors configured on this site. Enabling this feature will block all AI interactions, including those from the AI plugin, until an approved connector is available. Note this is an experimental, proof-of-concept feature and as such, issues may be encountered. Feedback welcome and desired to help shape the feature.', 'ai' ), 'category' => Experiment_Category::ADMIN, 'capability' => 'none', 'usage' => array( 'trigger' => 'none', 'runs' => __( 'On each AI request from a plugin or theme', 'ai' ), 'sends' => __( 'Nothing', 'ai' ), 'details' => __( 'Blocks AI requests, including this plugin\'s, until you approve them', 'ai' ), ), ); } /** * {@inheritDoc} */ public function register(): void { $store = new Approvals_Store(); $identifier = new Caller_Identifier(); $key_index = new Connector_Key_Index(); $guard = new Http_Guard( $identifier, $store, $key_index ); $rest = new REST_Controller( $store ); $notice = new Admin_Notice( $store, array( Admin_Page::class, 'url' ) ); $this->admin_page = new Admin_Page(); $guard->register(); add_action( 'rest_api_init', array( $rest, 'register_routes' ) ); if ( ! is_admin() ) { return; } $notice->register(); $this->admin_page->register(); } }