import { getAgentFactories, type BosunProjectApiV1 } from './get-agent-factories'
import { getImportNonce } from './import-nonce'
import { getRootPath } from './get-root-path'

export async function getProjectBosunApi(): Promise<BosunProjectApiV1 | null> {
	const rootPath = await getRootPath()
	const { bosunApi } = await getAgentFactories(rootPath, getImportNonce())
	return bosunApi ?? null
}
