MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / resolveIdentities

Function resolveIdentities

packages/core/api/src/admin/reads.ts:129–144  ·  view source on GitHub ↗
(
  directory: AdminIdentityDirectory | undefined,
  externalIds: readonly string[],
)

Source from the content-addressed store, hash-verified

127 * operator actually asked for. Logged once per failed page — the cause carries
128 * the detail, and the caller learns nothing from it. */
129const resolveIdentities = (
130 directory: AdminIdentityDirectory | undefined,
131 externalIds: readonly string[],
132): Effect.Effect<ReadonlyMap<string, AdminUserIdentity>> => {
133 if (!directory || externalIds.length === 0) return Effect.succeed(new Map());
134 return directory(externalIds).pipe(
135 Effect.catchCause((cause) =>
136 Effect.as(
137 Effect.logWarning("admin users: host identity lookup failed; reporting users unnamed", {
138 cause,
139 }),
140 new Map<string, AdminUserIdentity>(),
141 ),
142 ),
143 );
144};
145
146const ABSENT_IDENTITY: AdminUserIdentity = { email: null, displayName: null };
147

Callers 3

listUsersFunction · 0.85
listUsersWithConnectionsFunction · 0.85
getUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected