'aafm/site-brief', 'principal_user_id' => (int) $user->ID, 'principal_login' => $user->user_login ? (string) $user->user_login : '', 'status' => 'success', 'event_type' => 'setting_changed', 'detail' => __( 'Site brief updated', 'agent-abilities-for-mcp' ), ) ); } /** * Render the Site brief card on the Settings tab. Called from aafm_render_settings_tab(), inside * #aafm-settings-form, so the one Save button covers it. * * @return void */ function aafm_render_site_brief_section(): void { ob_start(); aafm_render_set_row( array( 'label' => __( 'Rules for every agent', 'agent-abilities-for-mcp' ), 'opt' => __( 'Optional', 'agent-abilities-for-mcp' ), 'control' => sprintf( '', esc_attr__( 'Site brief: rules every connected agent reads at the start of a session', 'agent-abilities-for-mcp' ), esc_textarea( aafm_site_brief() ) ), 'help' => sprintf( /* translators: %s: the maximum number of characters, for example 1,500. */ __( 'Plain text, up to %s characters. Every agent that connects to this plugin\'s endpoint gets this text when its session starts, so keep passwords and private details out of it. Only you can change it; agents cannot. For example: British spelling, never touch the pricing page, drafts only on Fridays.', 'agent-abilities-for-mcp' ), number_format_i18n( AAFM_SITE_BRIEF_MAX ) ), ) ); $body = (string) ob_get_clean(); aafm_render_section( array( 'icon' => 'audit', 'title' => __( 'Site brief', 'agent-abilities-for-mcp' ), 'body' => $body, ) ); }