openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
3 lines • 813 B
JavaScript
import{r as resolveStateDir}from"./state-dir-BwIClCab.mjs";import{o as isGatewayExternallySupervised}from"./gateway-supervision-TUZKxlq7.mjs";import{r as captureOpenClawStateWorkerContext}from"./openclaw-state-worker-context-Dx8YjqO2.mjs";
//!src/infra/delivery-queue-state-context.ts
function captureDeliveryQueueStateContext(e){const t=resolveDeliveryQueueStateEnv(e);return{workerContext:captureOpenClawStateWorkerContext({env:t}),stateDir:resolveStateDir(t),...isGatewayExternallySupervised(process.env)?{supervisorMode:`external`}:{}}}function resolveDeliveryQueueStateEnv(e,t){return t?{...process.env,OPENCLAW_STATE_DIR:t.stateDir,OPENCLAW_SUPERVISOR_MODE:t.supervisorMode}:e?{...process.env,OPENCLAW_STATE_DIR:e}:process.env}export{resolveDeliveryQueueStateEnv as n,captureDeliveryQueueStateContext as t};