Add GraphQL field for agent Flow Registry config with separate version metadata (deprecate aiCatalogAgentFlowConfig)

Problem

  • Current aiCatalogAgentFlowConfig returns only the YAML config. Clients (frontend, editor extensions) need to know the flowConfigSchemaVersion but embedding that inside the YAML risks future incompatibility if Flow Registry schemas change or omit the version.

Proposal

  • Add a new GraphQL field that returns an AgentFlowRegistryConfig type with:
    • config: String (YAML config, same content as aiCatalogAgentFlowConfig)
    • version: String (the value clients should use for flowConfigSchemaVersion)
  • Deprecate aiCatalogAgentFlowConfig in favor of the new field.
  • Allow future metadata fields to be added alongside config without modifying the YAML itself.

Backward compatibility & client handling

  • Editor extensions and frontend must support both:
    • New field when available.
    • Fall back to existing aiCatalogAgentFlowConfig for older GitLab instances.
  • Editor extensions that determine behavior based on instance version should also check result?.metadata?.version (or the GraphQL metadata field) to decide whether to use the new field or the legacy field.
  • This avoids relying on an in-YAML version key that may not always be present.

Implementation notes

  • GraphQL: add AgentFlowRegistryConfig type and new field on the agent query (e.g., agent { flowRegistryConfig { config version } }).
  • Mark aiCatalogAgentFlowConfig deprecated with clear deprecation message and timeline.
  • Update frontend and editor-extensions:
    • Prefer new field; fallback to aiCatalogAgentFlowConfig.
    • Switch behavior based on instance metadata.version when necessary.
  • Tests:
    • Unit tests for new GraphQL type and resolver.
    • Integration tests ensuring fallback behavior with older server responses.
    • Editor-extension integration test verifying version-switching logic.

Migration plan

  1. Add new GraphQL type and field; implement server-side resolver returning YAML and version.
  2. Update frontend/editor-extensions to read new field and fall back to legacy field; ship client updates.
  3. Monitor usage and after clients are updated, schedule deprecation removal of aiCatalogAgentFlowConfig in a future release (document timeline in deprecation message).

Acceptance criteria

  • New GraphQL field AgentFlowRegistryConfig available and returns expected config and version.
  • Frontend and editor-extensions use the new field when available and correctly fall back to the legacy field on older instances.
  • aiCatalogAgentFlowConfig is marked deprecated and documented with a removal timeline.
  • Tests cover new behavior and fallback scenarios.