Canvas AI: Component context required props missing required flag
## Problem
A regression in `CanvasAiPageBuilderHelper::processSdc()` causes the `required: true` flag to be dropped from component context metadata.
Current code:
`// Mark required props.
if (isset($sdc_definition['props']['required']) && \in_array($prop_name, $sdc_definition['props']['required'], TRUE)) {
$output[$source_id]['components'][$component_id]['props'][$prop_name]['required'] = TRUE;
}
`
The flag should instead be added to the prop metadata:
`// Mark required props.
if (isset($sdc_definition['props']['required']) && \in_array($prop_name, $sdc_definition['props']['required'], TRUE)) {
$prop_metadata['required'] = TRUE;
}
`
As a result, required SDC props are no longer surfaced in the component context returned to AI tools.
## Proposed solution
1. Fix `CanvasAiPageBuilderHelper::processSdc()` so required props include a `required: true` flag in the generated component context.
2. Update `CanvasAiPageBuilderHelper::processCodeComponents()` to also surface required props for code components.
3. Do not add `required: false` for optional props. Only include the flag when a prop is required.
Note: Block required props are being handled in a separate issue:\
https://git.drupalcode.org/project/canvas/-/work_items/3569120
## Testing steps
1. Install the `ai_api_explorer` module.
2. Go to `/admin/config/ai/explorers/tools_explorer`.
3. Select the `get_component_context` tool and click **Run**.
4. Verify that required component props include a `required: true` flag.
5. Go to `/admin/config/ai/canvas-ai-component-description-settings`.
6. Save the form.
7. Run the `get_component_context` tool again.
8. Verify that the `required: true` flags are still present after saving the settings form.
_Note: Issue description generated with AI assistance._
issue