Agentic Tasks — Member Lookup
Resolve a member name or email to a provider user ID.
Uses the org_members cache populated by resolving-identity.
Prerequisites
active_providermust already be determined.org_membersmust already be populated (caller must trigger resolving-identity Step 2 first).
Resolution Algorithm
Given a query string (name or email fragment):
- Exact email match: compare query (case-insensitive) against
org_members[*].email. Return immediately if exactly one match. - Exact name match: compare query (case-insensitive) against
org_members[*].name. Return immediately if exactly one match. - Partial name match: check if any
namecontains the query string (case-insensitive). Collect all matches. - Return results:
- 0 matches → return empty array
[]. Do not error — let the caller handle the missing case. - 1 match → return
[{ id, name, email }]. - 2–5 matches → return the array. Caller should present candidates and ask the user to confirm.
- 6+ matches → return the first 5 with a note that the query is too broad. Caller should ask for a more specific name.
- 0 matches → return empty array
TeamsDB Fallback
If org_members is empty (provider does not support member listing), fall back to TeamsDB:
- If
teamsDatabaseIdis not inheadless_config, return empty array[](no fallback available). - Fetch the Teams database using
teamsDatabaseIdfrom config. - Collect all unique persons from the
Members(people-type) field across all teams. - Use this as the search corpus. Cache result in
org_membersfor the session. - Apply the same Resolution Algorithm above.
Caller Responsibility
The caller (delegating-tasks, ingesting-messages, managing-tasks) must:
- Run detecting-provider + resolving-identity (org_members) before calling this skill.
- Handle the returned candidates with AskUserQuestion if multiple matches exist.
- Not call this skill for the current user — use
current_user.iddirectly from resolving-identity.