openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 813 B
JavaScript
import{P as resolveIntegerOption}from"./number-coercion-B3CfI447.mjs";
//!src/channels/direct-dm-guard-policy.ts
function createDirectDmPreCryptoGuardPolicy(e={}){return{allowedKinds:e.allowedKinds??[4],maxFutureSkewSec:resolveIntegerOption(e.maxFutureSkewSec,120,{min:0}),maxCiphertextBytes:resolveIntegerOption(e.maxCiphertextBytes,16384,{min:1}),maxPlaintextBytes:resolveIntegerOption(e.maxPlaintextBytes,8192,{min:1}),rateLimit:{windowMs:resolveIntegerOption(e.rateLimit?.windowMs,6e4,{min:1}),maxPerSenderPerWindow:resolveIntegerOption(e.rateLimit?.maxPerSenderPerWindow,20,{min:1}),maxGlobalPerWindow:resolveIntegerOption(e.rateLimit?.maxGlobalPerWindow,200,{min:1}),maxTrackedSenderKeys:resolveIntegerOption(e.rateLimit?.maxTrackedSenderKeys,4096,{min:1})}}}export{createDirectDmPreCryptoGuardPolicy as t};