Skip to content

Enhance agent marketplace with pagination, reviews, and import precheck#3316

Open
Lifeng-Chen wants to merge 5 commits into
developfrom
clf/agent_repository
Open

Enhance agent marketplace with pagination, reviews, and import precheck#3316
Lifeng-Chen wants to merge 5 commits into
developfrom
clf/agent_repository

Conversation

@Lifeng-Chen

Copy link
Copy Markdown
Contributor

No description provided.

…ort precheck

Add paginated search for repository listings and mine agents, an admin review
queue with approve/reject, and import precheck/copy flow that validates models,
knowledge bases, MCP, skills, and tools before copying from the marketplace.
Extract repository domain constants and expand backend/frontend tests.
@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

审核中心页面展示优化,审核项展示为表格的样式,并且支持分页
image

image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

我的agent页面优化,支持按照智能体名称/描述来搜索,支持分页。无编辑权限的智能体“编辑”按钮改为“查看”。

image image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

我的agent点击查看,仓库/审核中心中的智能体点击详情,可以显示下载量(下载量为该智能体所有版本下载量的总和,而非当前版本)。

image image image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

增加创建智能体的ui

image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

体验优化,在申请上架的时候,如果该智能体历史版本已上架,或者当前版本重新上架,都会预填充智能体图标、类别、标签。

image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

审核中心点击审核项的“详情”

image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

复制仓库中的智能体,会出现复制项的明细弹窗

image

@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

确定复制后,会把智能体和依赖的子智能体都复制下来

image image

1 similar comment
@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

确定复制后,会把智能体和依赖的子智能体都复制下来

image image

… tests

Align the test file with existing frontend unit tests and fix CI type-check failures caused by missing vitest dependency.
Replace void promise calls with async handlers and .catch() in page.tsx,
and split AgentRepositoryDetailModal into smaller components to reduce
cognitive complexity below SonarCloud threshold.
Auto-compute tool_count when creating or updating listings, expose it in
the list API, and render "x tools" on repository cards when count is greater than zero.
@Lifeng-Chen

Copy link
Copy Markdown
Contributor Author

如果智能体有使用工具,在智能体仓库中的对应卡片会显示X个工具

image

@@ -1,9 +1,13 @@
import logging
import math
from typing import Any, Collection, Dict, List, Optional

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Download Count Inflation

increment_agent_repository_downloads increments for any non-deleted repository regardless of status. Should only increment for status=shared to prevent inflating counts for pending/rejected listings.

@@ -1,26 +1,31 @@
import logging

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In-Memory Search

list_agent_repository_listings_impl fetches all records then filters by search in-memory. For large datasets, search should be done at database level via SQL LIKE/ILIKE.

@@ -1,26 +1,31 @@
import logging

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Inefficient Agent Fetch

list_my_editable_agents_impl fetches ALL agents then filters ownership/search in-memory. Inefficient for large tenant datasets.

@@ -0,0 +1,348 @@
"""Extract and validate repository import dependencies against the target tenant."""

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Duplicate DB Calls

build_repository_import_precheck calls get_knowledge_record twice per KB: once in _check_kb_available and again for description. Combine into single call.

@@ -1,26 +1,31 @@
import logging

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Breaking Auth Change

_validate_create_listing_permission changed from email-based to created_by-based authorization. DEV users who previously could share via email match will now be denied.

@@ -1,26 +1,31 @@
import logging

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Breaking Version Naming

Version naming changed from lowercase v to uppercase V (v1 to V1). Creates inconsistency with existing published versions.

@@ -1,9 +1,13 @@
import logging
import math
from typing import Any, Collection, Dict, List, Optional

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Download Sum Includes Deleted

sum_agent_repository_downloads_by_agent_ids sums downloads across ALL rows including soft-deleted and non-shared. Should exclude deleted/non-active listings.

@@ -0,0 +1,418 @@
"use client";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

API Field Mismatch

Frontend AgentRepositoryCopyDialog expects detail.duplicate_skills but backend returns detail.duplicate_names. Skill duplicate errors won't display properly.

@@ -25,15 +25,25 @@ export interface AgentRepositoryListingItem {
submitted_by?: string | null;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Duplicate Interface

frontend/types/agentRepository.ts has duplicate AgentRepositoryListingCreatePayload interface definition. Second definition should be removed.

@@ -1,18 +1,23 @@
"use client";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Arbitrary Limit

MineApplyListingModal fetches listings with page_size:100. If agent has >100 listings, prefill may miss entries. Should use unbounded query or justify limit.

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.

2 participants