#3591881 Canvas AI: Improve the schema of the place_components tool

Summary

  • Replaces place_components' single component_structure_yaml string argument with an operations list, schema-typed via a new PlacementOperation item plugin (mirrors the edit_components/ComponentEdit pattern).
  • placement is now a provider-enforced enum (Choice: above/below/inside) instead of prose in the tool description.
  • CanvasAiPageBuilderHelper::generateComponentPlacementData() and computePlacement() now take a parsed array; customYamlToArrayMapper() still parses its own YAML before delegating, so set_component_structure is unchanged.
  • PlaceComponentsTest fixtures adapted to the new shape; added cases for the rendered schema, an empty operations list, and a non-list components block.
  • Tool remains inert: not wired to any agent.

Testing instructions

AI Disclosure

AI-Generated: Yes (Used Sonnet 5 to adapt PlaceComponentsTest, Reviewed and tested by the author).

Closes #3591881 (closed)

Merge request reports

Loading