feat(api): REST API for repository onboarding and management
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, typescript
Hướng nghiên cứu
Start with docs/design/REPO_ONBOARDING.md and the existing repo policy route, GET /repos/{repo_id}/policies, to trace the API handler, authorization, and persistence patterns. Then read cdk/src/blueprints/definitions.ts, cdk/src/handlers/shared/types.ts, and cli/src/types.ts for the current config and validation boundaries. Done means implementing and documenting authenticated repo CRUD, shared validation, secret handling, and CLI integration; this issue leaves several design choices open, so coordinate them with maintainers first.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Component
API or orchestration
Describe the feature
Add a REST API for onboarding and managing repositories at runtime, so operators can register, update, and offboard repos without editing CDK and redeploying, and without holding AWS credentials with direct DynamoDB access.
Today repository management has three disjoint paths:
- CDK
Blueprintconstruct (canonical) — add an entry tocdk/src/blueprints/definitions.tsand redeploy; the custom resource writes aRepoConfigrow toRepoTable. bgagent repo list | show | onboard | offboard(from #378) — writesRepoTabledirectly using the operator's AWS credentials, bypassing the API, its auth, and its validation.- REST — the only repo-scoped route is
GET /repos/{repo_id}/policies. There is no repo CRUD.
docs/design/REPO_ONBOARDING.md states this directly: "There is no runtime API for repo CRUD."
Use case
- Platform teams embedding ABCA into an internal developer portal or software factory want to onboard repos programmatically (e.g. when a new service repo is created) via an authenticated HTTP API, not a CDK change + deploy or a CLI that needs IAM write access to DynamoDB.
- Workshop / multi-team deployments need to add repos in minutes without a ~10 minute
cdk deploy. - The operator web console cannot offer repo management without a backend API.
- Distributing IAM credentials with
RepoTablewrite access to every repo admin is a wider blast radius than a scoped, audited API.
Proposed solution
Endpoints (Cognito-authenticated, admin-gated):
| Method | Path | Purpose |
|---|---|---|
GET |
/v1/repos |
List onboarded repos (status, model, compute type, updated_at); paginated |
POST |
/v1/repos |
Onboard / re-activate a repo (owner/repo, model, token secret ref, optional overrides) |
GET |
/v1/repos/{repo_id} |
Full RepoConfig (secret ARNs redacted) |
PATCH |
/v1/repos/{repo_id} |
Update mutable fields |
DELETE |
/v1/repos/{repo_id} |
Soft delete (status=removed + TTL, same as Blueprint removal) |
Design points:
- Same schema and validation as
Blueprint. Reuse the construct's validation (repo pattern, model allowlist, budget bounds fromcontracts/constants.json, egress domain pattern) in a shared module so API- and CDK-onboarded repos are indistinguishable to the orchestrator. Reject models that are not granted to the runtime (see #805) and verify the token can reach the repo at onboard time rather than failing at turn 0. - Authorization. Require membership in an admin Cognito group (e.g.
abca-repo-admins) for writes, and/or a scoped platform API key (repos:manage) via the existing unified Cognito-or-API-keyRequestAuthorizerused for webhook management. Reads could be open to authenticated users or gated similarly. - CDK vs API precedence. Record the provenance of each row (
source: cdk | api) and document precedence — e.g. CDK-managed rows are read-only via the API (409 with guidance), or last-writer-wins with a warning. CDK users who want repo config in Git keep the Blueprint path. - Secrets. Accept a Secrets Manager ARN reference for per-repo tokens; never accept or return raw token values. Orchestrator IAM must be able to read referenced secrets (today this requires
additionalSecretArnsat deploy time — the API path needs a scoped pattern or tag-based grant). - CLI. Move
bgagent repo onboard | offboard | list | showonto the API so they no longer need AWS credentials (keep the direct path behind a flag for break-glass if desired). - Types/docs. Update
cdk/src/handlers/shared/types.ts+cli/src/types.ts,docs/design/API_CONTRACT.md, andREPO_ONBOARDING.md.
Other information
-
This is section 2 ("Runtime repository onboarding API") of RFC #377, split out so it can ship independently of the larger infra/runtime deploy split. See the split request on #377.
-
Related: #378 (CLI operator commands, closed), #476 (principal-to-repo authorization — natural follow-on once repos are API-managed), #805 (
repo onboard --modelvalidation), #369 (mapping repos with no Blueprint), #443 (re-onboarding on default-branch drift), #453 (OpenAPI publication), #1022 (user and team management API). -
I may be able to implement this feature
-
This might be a breaking change
- Ngôn ngữ chính
- TypeScript
- Star
- 185
- Fork
- 54
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws-samples/sample-autonomous-cloud-coding-agents
-
docs(security): record the fail-open content-screening posture as an ADR (extend ADR-009 or add ADR-023)Có thể đã có người làm @krokoko đã nhận 3 ngày trước. Đang mởdocumentation P2 security
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 74/100
aws-samples/sample-autonomous-cloud-coding-agents#793 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: How to clear previously set attributes for a blueprintCó thể đã có người làm @krokoko đã nhận 3 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aws-samples/sample-autonomous-cloud-coding-agents#749 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Harden /review_prs Stage-2 sketch against `args` arriving as a JSON stringCó thể đã có người làm @krokoko đã nhận 3 ngày trước. Đang mởenhancement P2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
aws-samples/sample-autonomous-cloud-coding-agents#670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation security
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 75/100
aws-samples/sample-autonomous-cloud-coding-agents#493 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws-samples/sample-autonomous-cloud-coding-agents
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#42253 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/ui#1108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
garethgeorge/backrest#1451 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderCó thể đã có người làm @ManyaS-Git đã nhận 1 ngày trước. Đang mởstatus:in-linear
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n8n-io/n8n#45027 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Activity indicator ignores prefers-reduced-motionCó thể đã có người làm @CapThunder19 đã nhận hôm nay. Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
joinmarket-webui/jam#1675 ·
Maintainer thường phản hồi trong vòng 3 ngày