( req: DaemonRequest, )
| 24 | } |
| 25 | |
| 26 | export function resolveImplicitSessionScope( |
| 27 | req: DaemonRequest, |
| 28 | ): SessionState['sessionScope'] | undefined { |
| 29 | if (req.meta?.sessionExplicit === true) return undefined; |
| 30 | if ((req.session || DEFAULT_SESSION_NAME) !== DEFAULT_SESSION_NAME) return undefined; |
| 31 | if (req.meta?.sessionIsolation === 'tenant' || req.flags?.sessionIsolation === 'tenant') { |
| 32 | return undefined; |
| 33 | } |
| 34 | const scopeRoot = resolveCallerScopeRoot(req.meta?.cwd); |
| 35 | if (!scopeRoot) return undefined; |
| 36 | return { |
| 37 | kind: 'cwd', |
| 38 | id: hashScopeRoot(scopeRoot), |
| 39 | }; |
| 40 | } |
| 41 | |
| 42 | export function sessionMatchesScope( |
| 43 | session: SessionState, |
no test coverage detected
searching dependent graphs…