Function: resolveRequiredSessionId()
Makaio Framework / ai-adapters-core / resolveRequiredSessionId
Function: resolveRequiredSessionId()
Section titled “Function: resolveRequiredSessionId()”resolveRequiredSessionId(
contextSessionId,payloadSessionId,sourceLabel,allowPayloadSessionFallback?):string
Defined in: ../../../adapters/core/src/utils/tool-approval.ts:130
Resolve the Makaio session ID required for global tool approval routing.
Scoped connector payloads may omit sessionId; agent context should normally
provide it. Callers may optionally allow a payload fallback when their scoped
payload is already trusted to carry the same value.
Parameters
Section titled “Parameters”contextSessionId
Section titled “contextSessionId”string | undefined
Session ID from agent context
payloadSessionId
Section titled “payloadSessionId”string | undefined
Optional session ID from scoped payload
sourceLabel
Section titled “sourceLabel”string
Short source label used in error messages
allowPayloadSessionFallback?
Section titled “allowPayloadSessionFallback?”boolean = false
Whether trusted callers may reuse the payload session ID
Returns
Section titled “Returns”string
Resolved session ID
Throws
Section titled “Throws”Error if session ID is absent from all allowed sources