openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 1.95 kB
JavaScript
import{t as e}from"./openclaw-state-read-closed-object-D3QW4nRZ.mjs";import{Type as t}from"typebox";const n={WEBCHAT_UI:`webchat-ui`,CONTROL_UI:`openclaw-control-ui`,BROWSER_COPILOT:`openclaw-browser-copilot`,TUI:`openclaw-tui`,WEBCHAT:`webchat`,CLI:`cli`,GATEWAY_CLIENT:`gateway-client`,MACOS_APP:`openclaw-macos`,LINUX_APP:`openclaw-linux`,IOS_APP:`openclaw-ios`,WATCHOS_APP:`openclaw-watchos`,ANDROID_APP:`openclaw-android`,NODE_HOST:`node-host`,WORKER:`openclaw-worker`,TEST:`test`,FINGERPRINT:`fingerprint`,PROBE:`openclaw-probe`},r={WEBCHAT:`webchat`,CLI:`cli`,UI:`ui`,BACKEND:`backend`,NODE:`node`,WORKER:`worker`,PROBE:`probe`,TEST:`test`};new Map(Object.values(n).map(e=>[e,e])),new Map(Object.values(r).map(e=>[e,e]));const i=/^[a-z][a-z0-9_-]{0,63}$/,a=/^[A-Z][A-Z0-9_]{0,127}$/,o=[`external_user`,`inter_session`,`internal_system`],s=t.String({minLength:1}),c=t.String({minLength:64,maxLength:64,pattern:`^[a-fA-F0-9]{64}$`}),l=t.String({minLength:1,maxLength:128});t.String({minLength:1,maxLength:512}),t.String({minLength:1,maxLength:512}),e({kind:t.String({enum:[...o]}),originSessionId:t.Optional(t.String()),sourceSessionKey:t.Optional(t.String()),sourceChannel:t.Optional(t.String()),sourceTool:t.Optional(t.String()),sourceRole:t.Optional(t.Literal(`subagent`)),sourcePromptPrefix:t.Optional(t.String()),jobId:t.Optional(t.String()),runId:t.Optional(t.String())}),t.Enum(n),t.Enum(r);const u=t.String({pattern:i.source}),d=e({source:t.Literal(`env`),provider:u,id:t.String({pattern:a.source})}),f=t.Unsafe({type:`string`,anyOf:[{const:`value`},{allOf:[{pattern:`^/`},{not:{pattern:`~(?:[^01]|$)`}}]}]}),p=e({source:t.Literal(`file`),provider:u,id:f}),m=e({source:t.Literal(`exec`),provider:u,id:t.String({pattern:`^(?!.*(?:^|/)\\.{1,2}(?:/|$))[A-Za-z0-9][A-Za-z0-9._:/#-]{0,255}$`})}),h=e({source:t.Literal(`store`),provider:u,id:t.String({pattern:a.source})}),g=t.Union([d,p,m,h]);t.Union([t.String(),g]);export{c as n,l as r,s as t};