The best way to control Claude Code, Codex and more from any computer or phone

main
ts 12 lines 404 Bytes
Raw
1 import { FraudCheck } from "@bank/domain/Fraud/FraudCheck.external";
2 import * as Effect from "effect/Effect";
3
4 /**
5 * A stand-in adapter for a fraud vendor: large withdrawals score as risky.
6 * Swap it for an HTTP adapter in production.
7 */
8 export const SiftFraudCheck = FraudCheck.toLayer(
9 Effect.succeed({
10 score: ({ amount }) => Effect.succeed({ risk: amount >= 80_000 ? 0.95 : 0.05 }),
11 }),
12 );