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

Function metaFromIdentity

apps/cloud/src/mcp/session-meta.ts:112–124  ·  view source on GitHub ↗
(
  token: McpSessionInit,
  organization: { readonly name: string; readonly slug?: string },
)

Source from the content-addressed store, hash-verified

110 isUserStoreError(failure) ? failure.reason : "upstream";
111
112const metaFromIdentity = (
113 token: McpSessionInit,
114 organization: { readonly name: string; readonly slug?: string },
115): SessionMeta => ({
116 organizationId: token.organizationId,
117 organizationName: organization.name,
118 ...(organization.slug === undefined ? {} : { organizationSlug: organization.slug }),
119 userId: token.userId,
120 resource: token.resource,
121 elicitationMode: token.elicitationMode,
122 artifactsEnabled: token.artifactsEnabled,
123 searchToolsEnabled: token.searchToolsEnabled,
124});
125
126/**
127 * Read the organization row, retrying only failures a retry can clear, and

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected