Skip to content

feat(agentic-cpapi): agnetic CRs are projected and prepared for qgl - #625

Open
julius-malcovsky wants to merge 9 commits into
mainfrom
feat/agentic-projection
Open

feat(agentic-cpapi): agnetic CRs are projected and prepared for qgl#625
julius-malcovsky wants to merge 9 commits into
mainfrom
feat/agentic-projection

Conversation

@julius-malcovsky

Copy link
Copy Markdown
Contributor

No description provided.

Co-authored-by: Björn Kottner <BjoernKarma@users.noreply.github.com>
Co-authored-by: Ismael Garba <iagarba@users.noreply.github.com>
Co-authored-by: Stefan Siber <stefan-ctrl@users.noreply.github.com>
Co-authored-by: Ron Gummich <ron96g@users.noreply.github.com>
@julius-malcovsky julius-malcovsky self-assigned this Aug 25, 2026
Co-authored-by: Björn Kottner <BjoernKarma@users.noreply.github.com>
Co-authored-by: Ismael Garba <iagarba@users.noreply.github.com>
Co-authored-by: Stefan Siber <stefan-ctrl@users.noreply.github.com>
Co-authored-by: Ron Gummich <ron96g@users.noreply.github.com>
@julius-malcovsky
julius-malcovsky marked this pull request as ready for review August 30, 2026 19:18
Copilot AI lite review requested due to automatic review settings August 30, 2026 19:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Pull request overview

This PR adds agentic (AI gateway) resource support to the projector pipeline by introducing new domain modules (catalogue + exposures + subscriptions), wiring them behind the FeatureAiGateway feature flag, and extending approval/approval-request persistence to resolve AgenticSubscription foreign keys. It also introduces cpapi model types and mapping helpers for agentic security credentials.

Changes:

  • Add projector modules for McpServer, AgentCard, AgenticExposure, and AgenticSubscription, including translators, repositories, and tests.
  • Extend Approval / ApprovalRequest logic to support TargetKind=AgenticSubscription with cache-first meta-key FK resolution.
  • Add/extend cache keys, ID resolver tests, bootstrap gating, and new controlplane-api model + ent schema/entity support for agentic resources.
File summaries
File Description
projector/internal/util/agentic_security.go Adds agentic-to-cpapi credential mapping helpers.
projector/internal/util/agentic_security_test.go Adds nil-safety tests for agentic credential mappers.
projector/internal/infrastructure/idresolver_test.go Adds IDResolver coverage for agentic exposure/subscription lookups.
projector/internal/infrastructure/cachekeys/cachekeys.go Adds cache key helpers for McpServer/AgentCard and agentic exposure/subscription lookups.
projector/internal/infrastructure/cachekeys/cachekeys_test.go Adds tests for new cache key helpers.
projector/internal/domain/mcpserver/types.go Defines projector DTO + key for McpServer catalogue.
projector/internal/domain/mcpserver/translator.go Adds McpServer CR -> DTO translation and key derivation.
projector/internal/domain/mcpserver/translator_test.go Tests McpServer translation and key derivation behavior.
projector/internal/domain/mcpserver/repository.go Implements McpServer persistence + cache updates.
projector/internal/domain/mcpserver/repository_test.go Tests McpServer repository upsert/delete and active-cache behavior.
projector/internal/domain/mcpserver/module.go Registers McpServer typed module for the projector pipeline.
projector/internal/domain/mcpserver/mcpserver_suite_test.go Adds Ginkgo suite bootstrap for mcpserver package.
projector/internal/domain/mcpserver/deps.go Declares repository dependency interface for McpServer (team FK).
projector/internal/domain/approvalrequest/types.go Extends ApprovalRequest TargetKind docs/constants to include AgenticSubscription.
projector/internal/domain/approvalrequest/translator.go Allows AgenticSubscription targets and gates them behind FeatureAiGateway.
projector/internal/domain/approvalrequest/translator_test.go Updates tests for expanded target-kind support.
projector/internal/domain/approvalrequest/repository.go Adds AgenticSubscription FK resolution and eviction handling for ApprovalRequest.
projector/internal/domain/approvalrequest/repository_test.go Adds tests for agentic subscription FK behavior in ApprovalRequest upsert.
projector/internal/domain/approvalrequest/module.go Updates module docs to include AgenticSubscription dependency.
projector/internal/domain/approvalrequest/deps.go Extends deps interface for agentic subscription lookup/eviction.
projector/internal/domain/approval/types.go Extends Approval TargetKind docs/constants to include AgenticSubscription.
projector/internal/domain/approval/translator.go Allows AgenticSubscription targets and gates them behind FeatureAiGateway.
projector/internal/domain/approval/translator_test.go Updates tests for expanded target-kind support.
projector/internal/domain/approval/repository.go Adds AgenticSubscription FK resolution and eviction handling for Approval upsert.
projector/internal/domain/approval/repository_test.go Adds tests for agentic subscription FK behavior in Approval upsert.
projector/internal/domain/approval/module.go Updates module docs to include AgenticSubscription dependency.
projector/internal/domain/approval/deps.go Extends deps interface for agentic subscription lookup/eviction.
projector/internal/domain/agenticsubscription/types.go Defines projector DTO + key for AgenticSubscription entities.
projector/internal/domain/agenticsubscription/translator.go Adds AgenticSubscription CR -> DTO translation and key derivation.
projector/internal/domain/agenticsubscription/repository.go Implements AgenticSubscription persistence + optional target exposure FK resolution + meta-cache.
projector/internal/domain/agenticsubscription/module.go Registers AgenticSubscription typed module for the projector pipeline.
projector/internal/domain/agenticsubscription/deps.go Declares repository dependency interface for owner app + target exposure resolution.
projector/internal/domain/agenticsubscription/agenticsubscription_suite_test.go Adds Ginkgo suite bootstrap for agenticsubscription package.
projector/internal/domain/agenticexposure/types.go Defines projector DTO + key for AgenticExposure entities.
projector/internal/domain/agenticexposure/translator.go Adds AgenticExposure CR -> DTO translation (security/traffic/transformation).
projector/internal/domain/agenticexposure/repository.go Implements AgenticExposure persistence + optional catalogue FK linking + orphan subscription back-linking.
projector/internal/domain/agenticexposure/module.go Registers AgenticExposure typed module for the projector pipeline.
projector/internal/domain/agenticexposure/deps.go Declares repository dependency interface for app + active catalogue lookups.
projector/internal/domain/agenticexposure/agenticexposure_suite_test.go Adds Ginkgo suite bootstrap for agenticexposure package.
projector/internal/domain/agentcard/types.go Defines projector DTO + key for AgentCard catalogue.
projector/internal/domain/agentcard/translator.go Adds AgentCard CR -> DTO translation and key derivation.
projector/internal/domain/agentcard/translator_test.go Tests AgentCard translation and key derivation behavior.
projector/internal/domain/agentcard/repository.go Implements AgentCard persistence + cache updates.
projector/internal/domain/agentcard/repository_test.go Tests AgentCard repository upsert/delete and active-cache behavior.
projector/internal/domain/agentcard/module.go Registers AgentCard typed module for the projector pipeline.
projector/internal/domain/agentcard/deps.go Declares repository dependency interface for AgentCard (team FK).
projector/internal/domain/agentcard/agentcard_suite_test.go Adds Ginkgo suite bootstrap for agentcard package.
projector/internal/bootstrap/bootstrap.go Wires agentic CR scheme + modules behind FeatureAiGateway.
projector/internal/bootstrap/bootstrap_test.go Extends feature-flag matrix tests to cover FeatureAiGateway.
projector/go.mod Adds local monorepo dependency on agentic/api.
controlplane-api/pkg/model/agentic.go Adds cpapi model types for agentic security/traffic/transformation payloads.
controlplane-api/ent/tx.go Adds transactional clients for new agentic entities (generated ent wiring).
controlplane-api/ent/team/where.go Adds Team edge predicates for mcp_servers/agent_cards (generated).
controlplane-api/ent/team/team.go Adds Team edge constants + ordering helpers for new edges (generated).
controlplane-api/ent/team.go Adds TeamEdges support for mcp_servers/agent_cards (generated).
controlplane-api/ent/team_create.go Adds TeamCreate edge setters for new edges (generated).
controlplane-api/ent/schema/team.go Adds ent edges from Team to mcp_servers/agent_cards (GraphQL skipped).
controlplane-api/ent/schema/mcp_server.go Adds McpServer ent schema (GraphQL skipped).
controlplane-api/ent/schema/approval.go Adds Approval edge from agentic_subscription (GraphQL skipped).
controlplane-api/ent/schema/approval_request.go Adds ApprovalRequest edge from agentic_subscription (GraphQL skipped).
controlplane-api/ent/schema/application.go Adds Application edges to agentic exposures/subscriptions (GraphQL skipped).
controlplane-api/ent/schema/agentic_subscription.go Adds AgenticSubscription ent schema (GraphQL skipped).
controlplane-api/ent/schema/agentic_exposure.go Adds AgenticExposure ent schema (GraphQL skipped).
controlplane-api/ent/schema/agent_card.go Adds AgentCard ent schema (GraphQL skipped).
controlplane-api/ent/privacy/privacy.go Adds ent privacy rule adapters for new entities (generated-style wiring).
controlplane-api/ent/predicate/predicate.go Adds predicate function types for new entities (generated).
controlplane-api/ent/mcpserver_delete.go Adds McpServer delete builder (generated).
controlplane-api/ent/hook/hook.go Adds ent hook adapters for new entities (generated).
controlplane-api/ent/ent.go Extends column validation map for new ent tables (generated wiring).
controlplane-api/ent/approvalrequest/where.go Adds ApprovalRequest edge predicates for agentic_subscription (generated).
controlplane-api/ent/approvalrequest/approvalrequest.go Adds ApprovalRequest edge constants/steps for agentic_subscription (generated).
controlplane-api/ent/approvalrequest.go Adds ApprovalRequest struct fields + edge helpers for agentic_subscription (generated).
controlplane-api/ent/approvalrequest_update.go Adds ApprovalRequest update setters/clearers for agentic_subscription (generated).
controlplane-api/ent/approvalrequest_query.go Adds ApprovalRequest query traversal/eager-loading for agentic_subscription (generated).
controlplane-api/ent/approvalrequest_create.go Adds ApprovalRequest create setters for agentic_subscription (generated).
controlplane-api/ent/approval/where.go Adds Approval edge predicates for agentic_subscription (generated).
controlplane-api/ent/approval/approval.go Adds Approval edge constants/steps for agentic_subscription (generated).
controlplane-api/ent/approval.go Adds Approval struct fields + edge helpers for agentic_subscription (generated).
controlplane-api/ent/approval_update.go Adds Approval update setters/clearers for agentic_subscription (generated).
controlplane-api/ent/approval_query.go Adds Approval query traversal/eager-loading for agentic_subscription (generated).
controlplane-api/ent/approval_create.go Adds Approval create setters for agentic_subscription (generated).
controlplane-api/ent/application/where.go Adds Application edge predicates for agentic exposures/subscriptions (generated).
controlplane-api/ent/application/application.go Adds Application edge constants/steps for agentic exposures/subscriptions (generated).
controlplane-api/ent/application.go Adds ApplicationEdges fields + helpers for agentic exposures/subscriptions (generated).
controlplane-api/ent/application_create.go Adds ApplicationCreate edge setters for agentic exposures/subscriptions (generated).
controlplane-api/ent/agenticsubscription_delete.go Adds AgenticSubscription delete builder (generated).
controlplane-api/ent/agenticexposure_delete.go Adds AgenticExposure delete builder (generated).
controlplane-api/ent/agentcard_delete.go Adds AgentCard delete builder (generated).
Review details
  • Files reviewed: 45/125 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread projector/internal/infrastructure/cachekeys/cachekeys.go
Comment thread projector/internal/domain/mcpserver/repository.go

@stefan-ctrl stefan-ctrl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, looks solid.
Two minor things, once resolved, I'd be happy to approve.

Comment thread controlplane-api/ent/schema/application.go Outdated
Comment thread projector/internal/domain/agenticsubscription/translator.go
julius-malcovsky and others added 7 commits September 3, 2026 07:52
…cpServer

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…subscribed agentics

Co-authored-by: Björn Kottner <BjoernKarma@users.noreply.github.com>
Co-authored-by: Ismael Garba <iagarba@users.noreply.github.com>
Co-authored-by: Stefan Siber <stefan-ctrl@users.noreply.github.com>
Co-authored-by: Ron Gummich <ron96g@users.noreply.github.com>
Co-authored-by: Björn Kottner <BjoernKarma@users.noreply.github.com>
Co-authored-by: Ismael Garba <iagarba@users.noreply.github.com>
Co-authored-by: Stefan Siber <stefan-ctrl@users.noreply.github.com>
Co-authored-by: Ron Gummich <ron96g@users.noreply.github.com>
…e-api (#635)

Co-authored-by: Björn Kottner <BjoernKarma@users.noreply.github.com>
Co-authored-by: Ismael Garba <iagarba@users.noreply.github.com>
Co-authored-by: Stefan Siber <stefan-ctrl@users.noreply.github.com>
Co-authored-by: Ron Gummich <ron96g@users.noreply.github.com>
Co-authored-by: Björn Kottner <BjoernKarma@users.noreply.github.com>
Co-authored-by: Ismael Garba <iagarba@users.noreply.github.com>
Co-authored-by: Stefan Siber <stefan-ctrl@users.noreply.github.com>
Co-authored-by: Ron Gummich <ron96g@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants