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

Function toDecision

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

Source from the content-addressed store, hash-verified

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

Callers 1

decideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected