import { resolveEntity, type EntityProvider } from '@agenticprimitives/context';
// "who did they mean by alice?" — asked only of the asker's own tier, because this answer
// will become the payee of a mandate.
const outcome = await resolveEntity(providers, { term: 'alice', tiers: ['private'], subject: askerSa });
switch (outcome.outcome) {
case 'certain': return outcome.candidate.agent;
case 'ambiguous': return ask(outcome.candidates); // the person chooses; nothing is ranked
case 'unknown': return refuse(outcome.looked); // and say where we looked
}