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

Function identityPathTier

packages/core/sdk/src/health-check.ts:447–452  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

445 * or -1 when it doesn't look like an identity at all. Shared by the sample
446 * picker below and the candidate ranking in the connect flow. */
447export const identityPathTier = (path: string): number => {
448 const segments = path.split(".");
449 const named = segments.filter((segment) => !/^\d+$/.test(segment));
450 const leaf = (named[named.length - 1] ?? "").toLowerCase();
451 return IDENTITY_KEY_TIERS.findIndex((keys) => keys.includes(leaf));
452};
453
454/** Order sample rows identity-first: rows whose leaf key names the account
455 * (email > login > name > id) come before the rest, which keep response

Callers 3

AddAccountModalViewFunction · 0.85
candidateIdentityTierFunction · 0.85
rankResponseSampleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected