Skip to content

feat(server): add control clone-and-bind endpoint#229

Draft
abhinav-galileo wants to merge 1 commit into
mainfrom
feature/control-clone-and-bind
Draft

feat(server): add control clone-and-bind endpoint#229
abhinav-galileo wants to merge 1 commit into
mainfrom
feature/control-clone-and-bind

Conversation

@abhinav-galileo
Copy link
Copy Markdown
Collaborator

Summary

  • Add controls.cloned_from_control_id plus cloned=true|false filtering on GET /api/v1/controls.
  • Add POST /api/v1/controls/{control_id}/clone-and-bind to clone an active control and create a target binding in one transaction.
  • Update Python and generated TypeScript SDK surfaces with server and SDK tests.

Usage

POST /api/v1/controls/{control_id}/clone-and-bind
{
  "name": "optional-clone-name",
  "target_binding": {
    "target_type": "environment",
    "target_id": "prod",
    "enabled": true
  }
}
{
  "control_id": 42,
  "name": "optional-clone-name",
  "cloned_from_control_id": 7,
  "binding_id": 99
}

Root controls can be listed with GET /api/v1/controls?cloned=false; cloned controls can be listed with GET /api/v1/controls?cloned=true.

Validation

  • make prepush
  • make server-test
  • make sdk-test
  • make sdk-ts-lint
  • make sdk-ts-typecheck
  • make sdk-ts-test
  • make sdk-ts-build
  • make sdk-ts-generate-check
  • make openapi-spec-check

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 85.54217% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ver/src/agent_control_server/endpoints/controls.py 75.00% 12 Missing ⚠️

📢 Thoughts on this report? Let us know!

@abhinav-galileo abhinav-galileo force-pushed the feature/control-clone-and-bind branch from 0db9219 to 2e9fe20 Compare May 19, 2026 18:45
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.

1 participant