Skip to content

feat(agent): agent review queue, versioning, bundles, archive & draft workflow#338

Merged
ShaanNarendran merged 4 commits intomainfrom
appy/feat-agent
Apr 18, 2026
Merged

feat(agent): agent review queue, versioning, bundles, archive & draft workflow#338
ShaanNarendran merged 4 commits intomainfrom
appy/feat-agent

Conversation

@Apoorvgarg-creator
Copy link
Copy Markdown
Contributor

@Apoorvgarg-creator Apoorvgarg-creator commented Apr 17, 2026

Purpose / Description

Comprehensive agent platform improvements: review queue with component gating, semver versioning, component bundles, soft-delete (archive), draft save workflow, interactive CLI search, leaderboard enhancements, and creator attribution.

Original PR: Agent CLI commands (interactive wizard, paginated list, name validation, scope options for all IDEs).

Added on top: Review/approval pipeline, versioning, bundles, archive, drafts, leaderboard, interactive search.

What's Done

Database & Models

  • Migration 0010: Fix variable shadowing bug in dedup loop
  • Migration 0011: Extend AgentStatus (pending, rejected), ListingStatus (archived), create component_bundles table, add bundle_id FK to all 5 listing tables, add rejection_reason to agents
  • ComponentBundle model (id, name, description, submitted_by, created_at)
  • bundle_id nullable FK on McpListing, SkillListing, HookListing, PromptListing, SandboxListing

Semver Versioning

  • services/versioning.py — parse, validate, bump, suggest
  • Pydantic validators on AgentCreateRequest.version and AgentUpdateRequest.version
  • version_bump_type field on AgentUpdateRequest
  • GET /agents/{id}/version-suggestions endpoint
  • Auto-bump in update_agent when version_bump_type provided
  • 12 unit tests for versioning utilities

Agent Review Queue

  • GET /api/v1/review?tab=agents — list pending agents with component readiness
  • POST /api/v1/review/agents/{id}/approve — gated: rejects if any component not approved (422 with blocker details)
  • POST /api/v1/review/agents/{id}/reject — sets rejected status with reason

Bundle Review (Atomic)

  • POST /api/v1/review/bundles/{id}/approve — approves all components in bundle atomically
  • POST /api/v1/review/bundles/{id}/reject — rejects all with shared reason
  • Bundle name resolution in component review list

Agent Archive (Soft Delete)

  • PATCH /api/v1/agents/{id}/archive — admin only, sets status to archived
  • CLI agent delete now calls archive endpoint instead of hard delete

Draft Workflow

  • POST /api/v1/agents/draft — create agent as draft (relaxed validation)
  • PUT /api/v1/agents/{id}/draft — update a draft
  • POST /api/v1/agents/{id}/submit — validate components, transition draft to pending
  • CLI agent publish --draft and agent publish --submit

Created-By Email & Leaderboard

  • created_by_email on AgentSummary, AgentResponse, LeaderboardItem
  • Batch-fetch creator emails in list_agents, get_agent, create_agent, update_agent
  • GET /overview/leaderboard?user=email — filter by creator
  • GET /overview/component-leaderboard — new endpoint for MCP downloads ranked by user
  • GitHub issue feat: add username field to user model (unique, alongside email) #339 created for username field

CLI Enhancements

  • Interactive search (-i flag) on agent list and registry mcp list using questionary fuzzy select
  • Version bump prompt on agent publish --update (patch/minor/major/keep)
  • --beta flag on agent init (defaults to 0.1.0)
  • client.patch() method added
  • Created-by email column in agent list table and agent show detail

What's Left (TODO)

Frontend (not started)

  • Review page: Agents tab alongside Components tab
    • Pending agents with component readiness indicator (green/red per component)
    • Approve button disabled when components_ready === false with tooltip
    • Expandable blocker list
    • Bundle grouping with Review Bundle action
  • Agent three-dot menu (admin): Archive action with confirmation dialog
  • StatusBadge: add archived style (gray, no ping)
  • Version bump dialog in agent builder (patch/minor/major radio with live preview)
  • Draft save: localStorage auto-save + Save Draft button + My Drafts section
  • Leaderboard: user filter input, tabs for agents vs components
  • API client hooks for new endpoints

Bulk Upload

  • POST /api/v1/bulk/agents — bulk create with inline component auto-create, dedup, dry-run
  • schemas/bulk.py — BulkAgentItem, BulkAgentRequest, BulkResult
  • CLI agent bulk-create --from-file with dry-run preview and confirmation

Additional Tests

  • test_agent_review.py — status transitions, component gating, reject with reason
  • test_bundles.py — bundle CRUD, atomic approve/reject
  • test_bulk.py — bulk create with dedup, dry_run, inline component auto-create
  • test_draft_workflow.py — draft save, update, submit transition

How Has This Been Tested?

  • uv run pytest tests/ -x -q1138 tests pass (0 failures)
  • uv run ruff check . — clean for all changed files
  • uv run ruff format --check . — clean for all changed files

Checklist

  • All commits are signed off (git commit -s) per the DCO
  • Descriptive commit messages
  • Self-review completed
  • UI changes: N/A for this commit (frontend TODO above)

@Haz3-jolt Haz3-jolt changed the title feat(agent): add observal agents cli cmds feat(agent): agent review queue, versioning, bundles, archive & draft workflow Apr 17, 2026
Apoorvgarg-creator and others added 3 commits April 18, 2026 19:00
Signed-off-by: Apoorv Garg <apoorvgarg.21@gmail.com>
…t workflow

- Fix migration 0010 variable shadowing (inner_row)
- Add migration 0011: AgentStatus pending/rejected, ListingStatus archived,
  component_bundles table, bundle_id FK on all listing tables, rejection_reason
- Add semver utilities (parse, validate, bump, suggest) with full test coverage
- Add agent review routes: list pending agents with component readiness check,
  approve (gated on all components approved), reject with reason
- Add bundle review: atomic approve/reject all components in a bundle
- Add agent archive endpoint (soft delete, admin only)
- Add draft workflow: save draft, update draft, submit for review
- Add version-suggestions endpoint and version bump on update
- Add created_by_email to agent list, detail, and leaderboard responses
- Add component leaderboard endpoint with user filter
- Add interactive CLI search (-i flag) for agents and MCP servers
- CLI: version bump prompt on publish --update, --draft flag, --beta for init
- CLI: agent delete now archives instead of hard-deleting
- Create GitHub issue #339 for username field

Signed-off-by: Hari Srinivasan <harisrini21@gmail.com>
Remove unused imports (sqlalchemy, UUID) from migration 0011 and
remove stale noqa directive from registry_telemetry.py.

Signed-off-by: Shaan Narendran <shaannaren06@gmail.com>
Signed-off-by: Shaan Narendran <shaannaren06@gmail.com>
@ShaanNarendran ShaanNarendran marked this pull request as ready for review April 18, 2026 13:37
@ShaanNarendran ShaanNarendran merged commit 7128f79 into main Apr 18, 2026
14 checks passed
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