MCPcopy Index your code
hub / github.com/callstack/agent-device / dispatchGenericForLockedScope

Function dispatchGenericForLockedScope

src/daemon/request-router.ts:261–281  ·  view source on GitHub ↗
(params: {
  lockedScope: LockedRequestScope;
  logPath: string;
  sessionStore: SessionStore;
})

Source from the content-addressed store, hash-verified

259}
260
261async function dispatchGenericForLockedScope(params: {
262 lockedScope: LockedRequestScope;
263 logPath: string;
264 sessionStore: SessionStore;
265}): Promise<DaemonResponse> {
266 const { lockedScope, logPath, sessionStore } = params;
267 const session = sessionStore.get(lockedScope.sessionName);
268 if (!session) {
269 return lockedScope.finalize(noActiveSessionError());
270 }
271
272 const dispatchResponse = await dispatchGenericCommand({
273 req: lockedScope.req,
274 session,
275 sessionName: lockedScope.sessionName,
276 logPath,
277 sessionStore,
278 contextFromFlags: lockedScope.contextFromFlags,
279 });
280 return lockedScope.finalize(dispatchResponse);
281}
282
283function canRunReplayActionInCurrentScope(
284 req: DaemonRequest,

Callers 1

executeLockedRequestFunction · 0.85

Calls 3

noActiveSessionErrorFunction · 0.90
dispatchGenericCommandFunction · 0.90
getMethod · 0.80

Tested by

no test coverage detected