WIP: pre-granular-permissions commit

feat: Add category and support contact fields to Agent schema and UI components

Revert "feat: Add category and support contact fields to Agent schema and UI components"

This reverts commit c43a52b4c9.

Fix: Update import for renderHook in useAgentCategories.spec.tsx

fix: Update icon rendering in AgentCategoryDisplay tests to use empty spans

refactor: Improve category synchronization logic and clean up AgentConfig component

refactor: Remove unused UI flow translations from translation.json

feat: agent marketplace features
This commit is contained in:
Danny Avila 2025-06-23 10:22:27 -04:00
parent dd67e463e4
commit d471209ced
No known key found for this signature in database
GPG key ID: BF31EEB2C5CA0956
55 changed files with 6280 additions and 17 deletions

View file

@ -436,6 +436,80 @@ export const revertAgentVersion = ({
version_index: number;
}): Promise<a.Agent> => request.post(endpoints.revertAgentVersion(agent_id), { version_index });
/* Marketplace */
/**
* Get agent categories with counts for marketplace tabs
*/
export const getAgentCategories = (): Promise<t.TMarketplaceCategory[]> => {
return request.get(endpoints.agents({ path: 'marketplace/categories' }));
};
/**
* Get promoted/top picks agents with pagination
*/
export const getPromotedAgents = (params: {
page?: number;
limit?: number;
showAll?: string; // Add showAll parameter to get all shared agents instead of just promoted
}): Promise<a.AgentListResponse> => {
return request.get(
endpoints.agents({
path: 'marketplace/promoted',
options: params,
}),
);
};
/**
* Get all agents with pagination (for "all" category)
*/
export const getAllAgents = (params: {
page?: number;
limit?: number;
}): Promise<a.AgentListResponse> => {
return request.get(
endpoints.agents({
path: 'marketplace/all',
options: params,
}),
);
};
/**
* Get agents by category with pagination
*/
export const getAgentsByCategory = (params: {
category: string;
page?: number;
limit?: number;
}): Promise<a.AgentListResponse> => {
const { category, ...options } = params;
return request.get(
endpoints.agents({
path: `marketplace/category/${category}`,
options,
}),
);
};
/**
* Search agents in marketplace
*/
export const searchAgents = (params: {
q: string;
category?: string;
page?: number;
limit?: number;
}): Promise<a.AgentListResponse> => {
return request.get(
endpoints.agents({
path: 'marketplace/search',
options: params,
}),
);
};
/* Tools */
export const getAvailableAgentTools = (): Promise<s.TPlugin[]> => {

View file

@ -164,6 +164,11 @@ export const defaultAgentFormValues = {
[Tools.execute_code]: false,
[Tools.file_search]: false,
[Tools.web_search]: false,
category: 'general',
support_contact: {
name: '',
email: '',
},
};
export const ImageVisionTool: FunctionTool = {

View file

@ -154,6 +154,11 @@ export type TCategory = {
label: string;
};
export type TMarketplaceCategory = TCategory & {
count: number;
description?: string;
};
export type TError = {
message: string;
code?: number | string;