openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 1.25 kB
JavaScript
import{pn as e}from"./openclaw-state-read-subsystem-Dwoo5bcz.mjs";import{n as t}from"./openclaw-state-read-agent-id-DmscQLD6.mjs";const n=`main`,r=/^agent:[^:]+:(?:dashboard|subagent|internal-session-effects):incognito-[^:]+$/u;function isIncognitoSessionKey(e){let t=e?.trim().toLowerCase();return!!(t&&r.test(t))}function parseAgentSessionKeyParts(e){if(!e.startsWith(`agent:`)&&e.slice(0,6).toLowerCase()!==`agent:`)return null;let t=e.indexOf(`:`,6);if(t===-1)return null;let n=e.slice(6,t).trim(),r=e.slice(t+1);return n&&r&&!r.startsWith(`:`)?{agentId:n,rest:r}:null}function normalizeMainKey(t){return e(t)||`main`}function buildAgentMainSessionKey(e){return`agent:${t(e.agentId)}:${normalizeMainKey(e.mainKey)}`}Object.freeze(/* @__PURE__ */ `activity.ai-agents.appearance.approve.apps.ask.automation.automations.channels.chat.templates.communications.config.cron.custodian.dashboard.dashboards.debug.focus.infrastructure.lobsterdex.logs.mcp.meetings.memory-import.model-providers.model-setup.new.nodes.plugin.plugins.portals.profile.sessions.settings.share.skills.systems.terminal.usage.workboard.worktrees`.split(`.`));export{parseAgentSessionKeyParts as a,normalizeMainKey as i,buildAgentMainSessionKey as n,isIncognitoSessionKey as r,n as t};