Resolves an open loop's counterparty to a person page, first within its own connector source, then across sources by exact email alias or canonical identity. Reuse for confidence-gated cross-source entity matching.
// Source: https://github.com/garrytan/gbrain | License: MIT | Copyright 2026 Garry Tan // Provided via justclaw.it.com; keep this notice with the code. /** * Counterparty resolution for open loops (#5504, wave 14 P4.1). * * A loop's counterparty is a person named in a connector source (a Gmail * sweep), while the person's page often lives in another source (`default` * on a federated brain). Resolution runs in two steps and records the source * it landed in, so `open_loops.counterparty_source_id` can confine every * later read to one (source, slug) page: * * 1. the loop's OWN source, through the ordinary resolver, any * high-confidence arm (never the slugify fallback); * 2. failing that, ACROSS sources by identity only (T8): the exact email * as a page alias (one ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key