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

Function toDecision

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

Source from the content-addressed store, hash-verified

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

Callers 1

decideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected