MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / asMap

Function asMap

server/src/training-agent/state.ts:264–265  ·  view source on GitHub ↗
(v: unknown, fallback: Map<string, V>)

Source from the content-addressed store, hash-verified

262 const { __sessionKey: _sessionKey, ...hydrated } = hydratedWithMeta;
263 const fresh = createSession();
264 const asMap = <V>(v: unknown, fallback: Map<string, V>): Map<string, V> =>
265 v instanceof Map ? (v as Map<string, V>) : fallback;
266 const hydratedComply = (hydrated.complyExtensions ?? {}) as Partial<SessionState['complyExtensions']>;
267 return {
268 ...fresh,

Callers 1

deserializeSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected