MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / take

Function take

packages/hosts/mcp/src/browser-approval-store.ts:35–40  ·  view source on GitHub ↗
(executionId: string)

Source from the content-addressed store, hash-verified

33 const waiters = new Map<string, Deferred.Deferred<BrowserApprovalDecision>>();
34
35 const take = (executionId: string): Effect.Effect<BrowserApprovalDecision | null> =>
36 Effect.sync(() => {
37 const response = responses.get(executionId) ?? null;
38 if (response) responses.delete(executionId);
39 return response;
40 });
41
42 const waitFor = (executionId: string): Effect.Effect<BrowserApprovalDecision | null> =>
43 Effect.gen(function* () {

Callers 1

waitForFunction · 0.85

Calls 3

syncMethod · 0.65
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected