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

Function resolveIdentities

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

Source from the content-addressed store, hash-verified

143 * operator actually asked for. Logged once per failed page — the cause carries
144 * the detail, and the caller learns nothing from it. */
145const resolveIdentities = (
146 directory: AdminIdentityDirectory | undefined,
147 externalIds: readonly string[],
148): Effect.Effect<ReadonlyMap<string, AdminUserIdentity>> => {
149 if (!directory || externalIds.length === 0) return Effect.succeed(new Map());
150 return directory(externalIds).pipe(
151 Effect.catchCause((cause) =>
152 Effect.as(
153 Effect.logWarning("admin users: host identity lookup failed; reporting users unnamed", {
154 cause,
155 }),
156 new Map<string, AdminUserIdentity>(),
157 ),
158 ),
159 );
160};
161
162const ABSENT_IDENTITY: AdminUserIdentity = { email: null, displayName: null };
163

Callers 3

listUsersFunction · 0.85
listUsersWithConnectionsFunction · 0.85
getUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected