///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
///
import type { FilterQuery, Types } from 'mongoose';
import type { IAgent } from '~/types';
export interface AgentDeps {
/** Removes all ACL permissions for a resource. Injected from PermissionService. */
removeAllPermissions: (params: {
resourceType: string;
resourceId: unknown;
}) => Promise;
/** Gets actions. Created by createActionMethods. */
getActions: (searchParams: FilterQuery, includeSensitive?: boolean) => Promise;
/** Returns resource IDs solely owned by the given user. From createAclEntryMethods. */
getSoleOwnedResourceIds: (userObjectId: Types.ObjectId, resourceTypes: string | string[]) => Promise;
}
/**
* Generates a hash of action metadata for version comparison.
*/
declare function generateActionMetadataHash(actionIds: string[] | null | undefined, actions: Array<{
action_id: string;
metadata: Record | null;
}>): Promise;
export declare function createAgentMethods(mongoose: typeof import('mongoose'), deps: AgentDeps): {
getAgent: (searchParameter: FilterQuery) => Promise;
getAgents: (searchParameter: FilterQuery) => Promise;
createAgent: (agentData: Record) => Promise;
updateAgent: (searchParameter: FilterQuery, updateData: Record, options?: {
updatingUserId?: string | null;
forceVersion?: boolean;
skipVersioning?: boolean;
}) => Promise;
deleteAgent: (searchParameter: FilterQuery) => Promise;
deleteUserAgents: (userId: string) => Promise;
revertAgentVersion: (searchParameter: FilterQuery, versionIndex: number) => Promise;
countPromotedAgents: () => Promise;
addAgentResourceFile: ({ agent_id, tool_resource, file_id, updatingUserId, }: {
agent_id: string;
tool_resource: string;
file_id: string;
updatingUserId?: string | undefined;
}) => Promise;
getListAgentsByAccess: ({ accessibleIds, otherParams, limit, after, }: {
accessibleIds?: Types.ObjectId[] | undefined;
otherParams?: Record | undefined;
limit?: number | null | undefined;
after?: string | null | undefined;
}) => Promise<{
object: string;
data: Array>;
first_id: string | null;
last_id: string | null;
has_more: boolean;
after: string | null;
}>;
removeAgentResourceFiles: ({ agent_id, files, }: {
agent_id: string;
files: Array<{
tool_resource: string;
file_id: string;
}>;
}) => Promise;
generateActionMetadataHash: typeof generateActionMetadataHash;
removeAgentFromUserFavorites: (resourceId: string, userIds: string[]) => Promise;
};
export type AgentMethods = ReturnType;
export {};