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

Function toDecision

apps/cloud/src/engine/execution-gate.ts:142–151  ·  view source on GitHub ↗
(organizationId: string, allowed: boolean)

Source from the content-addressed store, hash-verified

140 };
141
142 const toDecision = (organizationId: string, allowed: boolean): GateDecision =>
143 allowed
144 ? { blocked: false }
145 : {
146 blocked: true,
147 error: new ExecutionLimitReachedError({
148 organizationId,
149 message: EXECUTION_LIMIT_BLOCKED_MESSAGE,
150 }),
151 };
152
153 const decide = (organizationId: string): Effect.Effect<GateDecision> =>
154 Effect.suspend(() => {

Callers 1

decideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected