MCPcopy Create free account
hub / github.com/callstack/agent-device / resolveImplicitSessionScope

Function resolveImplicitSessionScope

src/daemon/session-routing.ts:26–40  ·  view source on GitHub ↗
(
  req: DaemonRequest,
)

Source from the content-addressed store, hash-verified

24}
25
26export 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
42export function sessionMatchesScope(
43 session: SessionState,

Callers 6

completeOpenCommandFunction · 0.90
handleRecordCommandFunction · 0.90

Calls 2

resolveCallerScopeRootFunction · 0.85
hashScopeRootFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…