diff --git a/packages/cloud-agent-profile/src/index.ts b/packages/cloud-agent-profile/src/index.ts index 1cfecf16bc..69de20d339 100644 --- a/packages/cloud-agent-profile/src/index.ts +++ b/packages/cloud-agent-profile/src/index.ts @@ -54,8 +54,6 @@ export { setDefaultProfile, clearDefaultProfile, getDefaultProfile, - getProfileByName, - getProfileIdByName, getEffectiveDefaultProfileId, } from './profile-service'; diff --git a/packages/cloud-agent-profile/src/profile-service.ts b/packages/cloud-agent-profile/src/profile-service.ts index dbecaa41a9..e68126fe18 100644 --- a/packages/cloud-agent-profile/src/profile-service.ts +++ b/packages/cloud-agent-profile/src/profile-service.ts @@ -308,46 +308,6 @@ export async function getDefaultProfile( return getProfile(db, profile.id, owner); } -/** - * Get a profile by name for an owner. - * Used for profile resolution in the prepare session API. - */ -export async function getProfileByName( - db: WorkerDb, - name: string, - owner: ProfileOwner -): Promise { - const [profile] = await db - .select() - .from(agent_environment_profiles) - .where(and(buildOwnershipCondition(owner), eq(agent_environment_profiles.name, name))) - .limit(1); - - if (!profile) { - return null; - } - - return getProfile(db, profile.id, owner); -} - -/** - * Get profile ID by name for an owner. - * Returns null if not found. - */ -export async function getProfileIdByName( - db: WorkerDb, - name: string, - owner: ProfileOwner -): Promise { - const [profile] = await db - .select({ id: agent_environment_profiles.id }) - .from(agent_environment_profiles) - .where(and(buildOwnershipCondition(owner), eq(agent_environment_profiles.name, name))) - .limit(1); - - return profile?.id ?? null; -} - /** * Get the effective default profile ID for a user in org context. * Personal default takes precedence over org default — a user-specific