UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

1 lines • 27.1 kB
import{n as e}from"./rolldown-runtime-CNOWq4Kh.js";function t(e){let t=0,n=0,r=0;for(;n<e.length;){let i=e.charCodeAt(n++)>>10;t+=+((r<<8|i)!=13879),r=i}return t}var n;function r(){return(r=e((()=>{n=(()=>{let e=[/(^stateRevision$|^pendingInputs$|^sessionInfo$|^commands$)/u,/(^pendingInputs$|^sessionInfo$|^commands$)/u,/(^items$|^total$|^queuedCount$|^nextBefore$)/u,/(^id$|^runId$|^message$|^acceptedAt$|^state$|^queued$|^cancelledByUser$|^steerNow$)/u,/(^status$|^tools$)/u,/(^key$|^rowMode$|^sharedFacts$|^sessionId$|^lifecycleRevision$|^sessionModelRevision$|^incognito$|^kind$|^label$|^autoLabel$|^icon$|^color$|^channelAvatarUrl$|^boardFace$|^hasBoard$|^boardPresentation$|^displayName$|^titlePending$|^derivedTitle$|^lastMessagePreview$|^lastAssistantMessage$|^channel$|^classification$|^agentId$|^accountId$|^peerKind$|^isMain$|^isBackground$|^isDock$|^chatType$|^activitySummary$|^updatedAt$|^snapshotAt$|^ancestorRevision$|^hiddenFromInvolvingMe$|^archived$|^archivedAt$|^archivedBy$|^archiveReason$|^pinned$|^sidebarRoot$|^pinnedAt$|^snoozedUntil$|^snoozedAt$|^unread$|^lastReadAt$|^markedUnreadAt$|^lastActivityAt$|^lastInteractionAt$|^status$|^backgroundProcessCount$|^lastRunError$|^suppressErrorNotice$|^providerReview$|^lastRunId$|^activeLeafEntryId$|^spawnedBy$|^parentSessionKey$|^parentSessionId$|^controlOwnerSessionKey$|^childOwnerSessionKeys$|^childSessions$|^forkedFromParent$|^spawnDepth$|^subagentRole$|^subagentControlScope$|^swarmGroupId$|^swarm$|^deviceFolder$|^worktree$|^repositoryWorkspaceId$|^repository$|^execNode$|^execCwd$|^spawnedWorkspaceDir$|^spawnedCwd$|^projectId$|^workspaceDir$|^cyberAccessProgram$|^permissionMode$|^communication$|^effectiveCommunication$|^sandboxMode$|^nativeRuntimeConsent$|^permissionModePending$|^sessionRoot$|^createdVia$|^createdSurface$|^createdActor$|^owner$|^participants$|^expandedParticipants$|^participantCount$|^visibility$|^sharingRole$|^sendDisabledReason$|^workspaceReadDisabledReason$|^createdAt$|^forkSource$|^previousSessionId$|^inputTokens$|^outputTokens$|^usageReport$|^totalTokens$|^totalTokensFresh$|^contextTokens$|^estimatedCostUsd$|^model$|^modelProvider$|^activeModel$|^activeModelProvider$|^modelOverrideSource$|^toolOverrides$)/u,/(^text$|^timestamp$)/u,/(^canEnsure$|^text$|^updatedAt$|^state$)/u,/(^type$|^id$|^label$|^avatarUrl$|^identity$)/u,/(^type$|^id$)/u,/(^type$|^id$)/u,/(^type$|^pluginId$|^domain$|^idKind$|^id$)/u,/(^type$|^pluginId$|^accountId$|^senderKind$|^id$)/u,/(^type$|^actorType$|^source$|^id$)/u,/(^id$|^runId$|^explanation$|^continuationMessage$|^canContinue$)/u,/(^groups$|^otherActiveGroups$)/u,/(^groupId$|^createdAt$|^children$|^queued$|^running$|^done$|^failed$)/u,/(^sessionKey$|^status$)/u,/(^deviceId$|^path$)/u,/(^url$|^ref$|^branch$)/u,/(^send$|^receive$)/u,/(^send$|^receive$)/u,/(^actor$|^assignedBy$|^assignedAt$)/u,/(^type$|^id$|^label$|^avatarUrl$|^identity$)/u,/(^identity$|^label$|^avatarUrl$)/u,/(^mcpServers$|^mcpToolsDeny$|^skills$|^webSearch$)/u,/^.*$/u,/^.*$/u,/(^name$|^nativeName$|^textAliases$|^description$|^category$|^source$|^skillDisplayName$|^skillModelVisible$|^skillReferenceable$|^scope$|^acceptsArgs$|^args$|^clientPresentation$)/u,/(^name$|^description$|^type$|^required$|^choices$|^dynamic$)/u,/(^value$|^label$)/u,/(^when$|^action$)/u,/(^kind$)/u],n=e=>r(e),r=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`stateRevision`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[0].test(n)||i(t[n]))&&ee(t.stateRevision)&&(t.pendingInputs===void 0||!(`pendingInputs`in t)||te(t.pendingInputs))&&(t.sessionInfo===void 0||!(`sessionInfo`in t)||le(t.sessionInfo))&&(t.commands===void 0||!(`commands`in t)||dn(t.commands)),i=e=>!1,ee=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&Object.getOwnPropertyNames(t).every((n,r)=>e[1].test(n)||i(t[n]))&&(t.pendingInputs===void 0||!(`pendingInputs`in t)||a(t.pendingInputs))&&(t.sessionInfo===void 0||!(`sessionInfo`in t)||a(t.sessionInfo))&&(t.commands===void 0||!(`commands`in t)||a(t.commands)),a=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=64||e.length<=128&&t(e)<=64),te=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`items`in t&&`total`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[2].test(n)||i(t[n]))&&ne(t.items)&&u(t.total)&&(t.queuedCount===void 0||!(`queuedCount`in t)||d(t.queuedCount))&&(t.nextBefore===void 0||!(`nextBefore`in t)||f(t.nextBefore)),ne=e=>Array.isArray(e)&&e.every((e,t)=>re(e))&&e.length<=20,re=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`id`in t&&`message`in t&&`acceptedAt`in t&&`state`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[3].test(n)||i(t[n]))&&o(t.id)&&(t.runId===void 0||!(`runId`in t)||ie(t.runId))&&ae(t.message)&&s(t.acceptedAt)&&oe(t.state)&&(t.queued===void 0||!(`queued`in t)||c(t.queued))&&(t.cancelledByUser===void 0||!(`cancelledByUser`in t)||c(t.cancelledByUser))&&(t.steerNow===void 0||!(`steerNow`in t)||se(t.steerNow)),o=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1),ie=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=256||e.length<=512&&t(e)<=256),ae=e=>!0,s=e=>Number.isFinite(e),oe=e=>typeof e==`string`&&(e===`queued`||e===`cancelled`||e===`interrupted`),c=e=>typeof e==`boolean`&&e===!0,se=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`status`in t&&`tools`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[4].test(n)||i(t[n]))&&ce(t.status)&&l(t.tools),ce=e=>e===`available`||e===`blocked`,l=e=>Array.isArray(e)&&e.every((e,t)=>o(e)),u=e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e>=0),d=e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e>=0),f=e=>Number.isInteger(e)&&(!(Number.isFinite(e)||typeof e==`bigint`)||e>=1),le=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`key`in t&&`kind`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[5].test(n)||ue(t[n]))&&p(t.key)&&(t.rowMode===void 0||!(`rowMode`in t)||de(t.rowMode))&&(t.sharedFacts===void 0||!(`sharedFacts`in t)||me(t.sharedFacts))&&(t.sessionId===void 0||!(`sessionId`in t)||h(t.sessionId))&&(t.lifecycleRevision===void 0||!(`lifecycleRevision`in t)||g(t.lifecycleRevision))&&(t.sessionModelRevision===void 0||!(`sessionModelRevision`in t)||g(t.sessionModelRevision))&&(t.incognito===void 0||!(`incognito`in t)||c(t.incognito))&&he(t.kind)&&(t.label===void 0||!(`label`in t)||h(t.label))&&(t.autoLabel===void 0||!(`autoLabel`in t)||h(t.autoLabel))&&(t.icon===void 0||!(`icon`in t)||h(t.icon))&&(t.color===void 0||!(`color`in t)||h(t.color))&&(t.channelAvatarUrl===void 0||!(`channelAvatarUrl`in t)||g(t.channelAvatarUrl))&&(t.boardFace===void 0||!(`boardFace`in t)||_e(t.boardFace))&&(t.hasBoard===void 0||!(`hasBoard`in t)||b(t.hasBoard))&&(t.boardPresentation===void 0||!(`boardPresentation`in t)||ye(t.boardPresentation))&&(t.displayName===void 0||!(`displayName`in t)||h(t.displayName))&&(t.titlePending===void 0||!(`titlePending`in t)||b(t.titlePending))&&(t.derivedTitle===void 0||!(`derivedTitle`in t)||h(t.derivedTitle))&&(t.lastMessagePreview===void 0||!(`lastMessagePreview`in t)||h(t.lastMessagePreview))&&(t.lastAssistantMessage===void 0||!(`lastAssistantMessage`in t)||Se(t.lastAssistantMessage))&&(t.channel===void 0||!(`channel`in t)||h(t.channel))&&(t.classification===void 0||!(`classification`in t)||g(t.classification))&&(t.agentId===void 0||!(`agentId`in t)||g(t.agentId))&&(t.accountId===void 0||!(`accountId`in t)||g(t.accountId))&&(t.peerKind===void 0||!(`peerKind`in t)||g(t.peerKind))&&(t.isMain===void 0||!(`isMain`in t)||b(t.isMain))&&(t.isBackground===void 0||!(`isBackground`in t)||b(t.isBackground))&&(t.isDock===void 0||!(`isDock`in t)||b(t.isDock))&&(t.chatType===void 0||!(`chatType`in t)||Ce(t.chatType))&&(t.activitySummary===void 0||!(`activitySummary`in t)||we(t.activitySummary))&&(t.updatedAt===void 0||!(`updatedAt`in t)||Ae(t.updatedAt))&&(t.snapshotAt===void 0||!(`snapshotAt`in t)||w(t.snapshotAt))&&(t.ancestorRevision===void 0||!(`ancestorRevision`in t)||g(t.ancestorRevision))&&(t.hiddenFromInvolvingMe===void 0||!(`hiddenFromInvolvingMe`in t)||b(t.hiddenFromInvolvingMe))&&(t.archived===void 0||!(`archived`in t)||b(t.archived))&&(t.archivedAt===void 0||!(`archivedAt`in t)||w(t.archivedAt))&&(t.archivedBy===void 0||!(`archivedBy`in t)||T(t.archivedBy))&&(t.archiveReason===void 0||!(`archiveReason`in t)||ze(t.archiveReason))&&(t.pinned===void 0||!(`pinned`in t)||b(t.pinned))&&(t.sidebarRoot===void 0||!(`sidebarRoot`in t)||b(t.sidebarRoot))&&(t.pinnedAt===void 0||!(`pinnedAt`in t)||w(t.pinnedAt))&&(t.snoozedUntil===void 0||!(`snoozedUntil`in t)||w(t.snoozedUntil))&&(t.snoozedAt===void 0||!(`snoozedAt`in t)||w(t.snoozedAt))&&(t.unread===void 0||!(`unread`in t)||b(t.unread))&&(t.lastReadAt===void 0||!(`lastReadAt`in t)||w(t.lastReadAt))&&(t.markedUnreadAt===void 0||!(`markedUnreadAt`in t)||w(t.markedUnreadAt))&&(t.lastActivityAt===void 0||!(`lastActivityAt`in t)||w(t.lastActivityAt))&&(t.lastInteractionAt===void 0||!(`lastInteractionAt`in t)||w(t.lastInteractionAt))&&(t.status===void 0||!(`status`in t)||Ge(t.status))&&(t.backgroundProcessCount===void 0||!(`backgroundProcessCount`in t)||f(t.backgroundProcessCount))&&(t.lastRunError===void 0||!(`lastRunError`in t)||h(t.lastRunError))&&(t.suppressErrorNotice===void 0||!(`suppressErrorNotice`in t)||b(t.suppressErrorNotice))&&(t.providerReview===void 0||!(`providerReview`in t)||Xe(t.providerReview))&&(t.lastRunId===void 0||!(`lastRunId`in t)||g(t.lastRunId))&&(t.activeLeafEntryId===void 0||!(`activeLeafEntryId`in t)||B(t.activeLeafEntryId))&&(t.spawnedBy===void 0||!(`spawnedBy`in t)||h(t.spawnedBy))&&(t.parentSessionKey===void 0||!(`parentSessionKey`in t)||h(t.parentSessionKey))&&(t.parentSessionId===void 0||!(`parentSessionId`in t)||h(t.parentSessionId))&&(t.controlOwnerSessionKey===void 0||!(`controlOwnerSessionKey`in t)||h(t.controlOwnerSessionKey))&&(t.childOwnerSessionKeys===void 0||!(`childOwnerSessionKeys`in t)||$e(t.childOwnerSessionKeys))&&(t.childSessions===void 0||!(`childSessions`in t)||et(t.childSessions))&&(t.forkedFromParent===void 0||!(`forkedFromParent`in t)||b(t.forkedFromParent))&&(t.spawnDepth===void 0||!(`spawnDepth`in t)||w(t.spawnDepth))&&(t.subagentRole===void 0||!(`subagentRole`in t)||tt(t.subagentRole))&&(t.subagentControlScope===void 0||!(`subagentControlScope`in t)||it(t.subagentControlScope))&&(t.swarmGroupId===void 0||!(`swarmGroupId`in t)||h(t.swarmGroupId))&&(t.swarm===void 0||!(`swarm`in t)||st(t.swarm))&&(t.deviceFolder===void 0||!(`deviceFolder`in t)||mt(t.deviceFolder))&&(t.worktree===void 0||!(`worktree`in t)||gt(t.worktree))&&(t.repositoryWorkspaceId===void 0||!(`repositoryWorkspaceId`in t)||g(t.repositoryWorkspaceId))&&(t.repository===void 0||!(`repository`in t)||_t(t.repository))&&(t.execNode===void 0||!(`execNode`in t)||h(t.execNode))&&(t.execCwd===void 0||!(`execCwd`in t)||h(t.execCwd))&&(t.spawnedWorkspaceDir===void 0||!(`spawnedWorkspaceDir`in t)||h(t.spawnedWorkspaceDir))&&(t.spawnedCwd===void 0||!(`spawnedCwd`in t)||h(t.spawnedCwd))&&(t.projectId===void 0||!(`projectId`in t)||h(t.projectId))&&(t.workspaceDir===void 0||!(`workspaceDir`in t)||h(t.workspaceDir))&&(t.cyberAccessProgram===void 0||!(`cyberAccessProgram`in t)||bt(t.cyberAccessProgram))&&(t.permissionMode===void 0||!(`permissionMode`in t)||wt(t.permissionMode))&&(t.communication===void 0||!(`communication`in t)||Ot(t.communication))&&(t.effectiveCommunication===void 0||!(`effectiveCommunication`in t)||kt(t.effectiveCommunication))&&(t.sandboxMode===void 0||!(`sandboxMode`in t)||At(t.sandboxMode))&&(t.nativeRuntimeConsent===void 0||!(`nativeRuntimeConsent`in t)||g(t.nativeRuntimeConsent))&&(t.permissionModePending===void 0||!(`permissionModePending`in t)||b(t.permissionModePending))&&(t.sessionRoot===void 0||!(`sessionRoot`in t)||h(t.sessionRoot))&&(t.createdVia===void 0||!(`createdVia`in t)||jt(t.createdVia))&&(t.createdSurface===void 0||!(`createdSurface`in t)||Rt(t.createdSurface))&&(t.createdActor===void 0||!(`createdActor`in t)||T(t.createdActor))&&(t.owner===void 0||!(`owner`in t)||zt(t.owner))&&(t.participants===void 0||!(`participants`in t)||Ht(t.participants))&&(t.expandedParticipants===void 0||!(`expandedParticipants`in t)||Wt(t.expandedParticipants))&&(t.participantCount===void 0||!(`participantCount`in t)||d(t.participantCount))&&(t.visibility===void 0||!(`visibility`in t)||Gt(t.visibility))&&(t.sharingRole===void 0||!(`sharingRole`in t)||Yt(t.sharingRole))&&(t.sendDisabledReason===void 0||!(`sendDisabledReason`in t)||B(t.sendDisabledReason))&&(t.workspaceReadDisabledReason===void 0||!(`workspaceReadDisabledReason`in t)||B(t.workspaceReadDisabledReason))&&(t.createdAt===void 0||!(`createdAt`in t)||w(t.createdAt))&&(t.forkSource===void 0||!(`forkSource`in t)||en(t.forkSource))&&(t.previousSessionId===void 0||!(`previousSessionId`in t)||h(t.previousSessionId))&&(t.inputTokens===void 0||!(`inputTokens`in t)||w(t.inputTokens))&&(t.outputTokens===void 0||!(`outputTokens`in t)||w(t.outputTokens))&&(t.usageReport===void 0||!(`usageReport`in t)||tn(t.usageReport))&&(t.totalTokens===void 0||!(`totalTokens`in t)||w(t.totalTokens))&&(t.totalTokensFresh===void 0||!(`totalTokensFresh`in t)||b(t.totalTokensFresh))&&(t.contextTokens===void 0||!(`contextTokens`in t)||w(t.contextTokens))&&(t.estimatedCostUsd===void 0||!(`estimatedCostUsd`in t)||w(t.estimatedCostUsd))&&(t.model===void 0||!(`model`in t)||h(t.model))&&(t.modelProvider===void 0||!(`modelProvider`in t)||h(t.modelProvider))&&(t.activeModel===void 0||!(`activeModel`in t)||h(t.activeModel))&&(t.activeModelProvider===void 0||!(`activeModelProvider`in t)||h(t.activeModelProvider))&&(t.modelOverrideSource===void 0||!(`modelOverrideSource`in t)||an(t.modelOverrideSource))&&(t.toolOverrides===void 0||!(`toolOverrides`in t)||ln(t.toolOverrides)),ue=e=>!0,p=e=>typeof e==`string`,de=e=>fe(e)||m(e)||pe(e),fe=e=>typeof e==`string`&&e===`compact`,m=e=>typeof e==`string`&&e===`dashboard`,pe=e=>typeof e==`string`&&e===`sidebar`,me=e=>Array.isArray(e)&&e.every((e,t)=>u(e)),h=e=>typeof e==`string`,g=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1),he=e=>_(e)||v(e)||ge(e)||y(e),_=e=>typeof e==`string`&&e===`direct`,v=e=>typeof e==`string`&&e===`group`,ge=e=>typeof e==`string`&&e===`global`,y=e=>typeof e==`string`&&e===`unknown`,_e=e=>ve(e)||m(e),ve=e=>typeof e==`string`&&e===`chat`,b=e=>typeof e==`boolean`,ye=e=>be(e)||xe(e),be=e=>typeof e==`string`&&e===`split`,xe=e=>typeof e==`string`&&e===`expanded`,Se=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`text`in t&&`timestamp`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[6].test(n)||i(t[n]))&&p(t.text)&&s(t.timestamp),Ce=e=>_(e)||v(e)||x(e),x=e=>typeof e==`string`&&e===`channel`,we=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`state`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[7].test(n)||i(t[n]))&&(t.canEnsure===void 0||!(`canEnsure`in t)||b(t.canEnsure))&&(t.text===void 0||!(`text`in t)||Te(t.text))&&(t.updatedAt===void 0||!(`updatedAt`in t)||d(t.updatedAt))&&Ee(t.state),Te=e=>typeof e==`string`&&(e.length<=900||e.length<=1800&&t(e)<=900),Ee=e=>De(e)||Oe(e)||ke(e)||S(e),De=e=>typeof e==`string`&&e===`current`,Oe=e=>typeof e==`string`&&e===`stale`,ke=e=>typeof e==`string`&&e===`updating`,S=e=>typeof e==`string`&&e===`unavailable`,Ae=e=>s(e)||C(e),C=e=>e===null,w=e=>Number.isFinite(e),T=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[8].test(n)||i(t[n]))&&E(t.type)&&(t.id===void 0||!(`id`in t)||g(t.id))&&(t.label===void 0||!(`label`in t)||g(t.label))&&(t.avatarUrl===void 0||!(`avatarUrl`in t)||g(t.avatarUrl))&&(t.identity===void 0||!(`identity`in t)||k(t.identity)),E=e=>D(e)||O(e)||je(e),D=e=>typeof e==`string`&&e===`human`,O=e=>typeof e==`string`&&e===`agent`,je=e=>typeof e==`string`&&e===`system`,k=e=>A(e)||j(e)||M(e)||N(e)||F(e),A=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&`id`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[9].test(n)||i(t[n]))&&Me(t.type)&&o(t.id),Me=e=>typeof e==`string`&&e===`profile`,j=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&`id`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[10].test(n)||i(t[n]))&&O(t.type)&&o(t.id),M=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&`pluginId`in t&&`domain`in t&&`idKind`in t&&`id`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[11].test(n)||i(t[n]))&&Ne(t.type)&&o(t.pluginId)&&o(t.domain)&&o(t.idKind)&&o(t.id),Ne=e=>typeof e==`string`&&e===`remote`,N=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&`pluginId`in t&&`accountId`in t&&`senderKind`in t&&`id`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[12].test(n)||i(t[n]))&&Pe(t.type)&&P(t.pluginId)&&P(t.accountId)&&Fe(t.senderKind)&&o(t.id),Pe=e=>typeof e==`string`&&e===`observation`,P=e=>o(e)||C(e),Fe=e=>D(e)||Ie(e)||y(e),Ie=e=>typeof e==`string`&&e===`bot`,F=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&`actorType`in t&&`source`in t&&`id`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[13].test(n)||i(t[n]))&&Le(t.type)&&p(t.actorType)&&Re(t.source)&&p(t.id),Le=e=>typeof e==`string`&&e===`legacy`,Re=e=>p(e)||C(e),ze=e=>Be(e)||Ve(e)||He(e)||Ue(e)||We(e),Be=e=>typeof e==`string`&&e===`manual`,Ve=e=>typeof e==`string`&&e===`active-session-cap`,He=e=>typeof e==`string`&&e===`age-retention`,Ue=e=>typeof e==`string`&&e===`stale-dashboard`,We=e=>typeof e==`string`&&e===`restart-recovery`,Ge=e=>I(e)||L(e)||R(e)||Ke(e)||qe(e)||Je(e)||Ye(e),I=e=>typeof e==`string`&&e===`queued`,L=e=>typeof e==`string`&&e===`running`,R=e=>typeof e==`string`&&e===`done`,Ke=e=>typeof e==`string`&&e===`failed`,qe=e=>typeof e==`string`&&e===`interrupted`,Je=e=>typeof e==`string`&&e===`killed`,Ye=e=>typeof e==`string`&&e===`timeout`,Xe=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`id`in t&&`runId`in t&&`canContinue`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[14].test(n)||i(t[n]))&&o(t.id)&&o(t.runId)&&(t.explanation===void 0||!(`explanation`in t)||Ze(t.explanation))&&(t.continuationMessage===void 0||!(`continuationMessage`in t)||Qe(t.continuationMessage))&&z(t.canContinue),Ze=e=>typeof e==`string`&&(e.length<=65536||e.length<=131072&&t(e)<=65536),Qe=e=>typeof e==`string`&&(e.length<=1024||e.length<=2048&&t(e)<=1024),z=e=>typeof e==`boolean`,B=e=>o(e)||C(e),$e=e=>Array.isArray(e)&&e.every((e,t)=>o(e))&&e.length<=2,et=e=>Array.isArray(e)&&e.every((e,t)=>p(e)),tt=e=>nt(e)||rt(e),nt=e=>typeof e==`string`&&e===`orchestrator`,rt=e=>typeof e==`string`&&e===`leaf`,it=e=>at(e)||ot(e),at=e=>typeof e==`string`&&e===`children`,ot=e=>typeof e==`string`&&e===`none`,st=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`groups`in t&&`otherActiveGroups`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[15].test(n)||i(t[n]))&&ct(t.groups)&&u(t.otherActiveGroups),ct=e=>Array.isArray(e)&&e.every((e,t)=>lt(e))&&e.length<=5,lt=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`groupId`in t&&`createdAt`in t&&`queued`in t&&`running`in t&&`done`in t&&`failed`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[16].test(n)||i(t[n]))&&o(t.groupId)&&ut(t.createdAt)&&(t.children===void 0||!(`children`in t)||dt(t.children))&&u(t.queued)&&u(t.running)&&u(t.done)&&u(t.failed),ut=e=>Number.isFinite(e)&&e>=0,dt=e=>Array.isArray(e)&&e.every((e,t)=>ft(e))&&e.length<=64,ft=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`sessionKey`in t&&`status`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[17].test(n)||i(t[n]))&&o(t.sessionKey)&&pt(t.status),pt=e=>I(e)||L(e)||R(e)||Ke(e),mt=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`deviceId`in t&&`path`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[18].test(n)||i(t[n]))&&o(t.deviceId)&&ht(t.path),ht=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=4096||e.length<=8192&&t(e)<=4096),gt=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`id`in e&&`branch`in e&&`repoRoot`in e&&p(e.id)&&p(e.branch)&&p(e.repoRoot),_t=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`url`in t&&`branch`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[19].test(n)||i(t[n]))&&vt(t.url)&&(t.ref===void 0||!(`ref`in t)||yt(t.ref))&&o(t.branch),vt=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=2048||e.length<=4096&&t(e)<=2048),yt=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=1024||e.length<=2048&&t(e)<=1024),bt=e=>xt(e)||St(e)||Ct(e),xt=e=>typeof e==`string`&&e===`standard`,St=e=>typeof e==`string`&&e===`daybreak_blue`,Ct=e=>typeof e==`string`&&e===`daybreak_red`,wt=e=>V(e)||Tt(e)||Et(e)||Dt(e),V=e=>typeof e==`string`&&e===`read-only`,Tt=e=>typeof e==`string`&&e===`guarded`,Et=e=>typeof e==`string`&&e===`workspace`,Dt=e=>typeof e==`string`&&e===`full`,Ot=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&Object.getOwnPropertyNames(t).every((n,r)=>e[20].test(n)||i(t[n]))&&(t.send===void 0||!(`send`in t)||H(t.send))&&(t.receive===void 0||!(`receive`in t)||H(t.receive)),H=e=>U(e)||W(e)||G(e),U=e=>typeof e==`string`&&e===`always`,W=e=>typeof e==`string`&&e===`ask`,G=e=>typeof e==`string`&&e===`never`,kt=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`send`in t&&`receive`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[21].test(n)||i(t[n]))&&K(t.send)&&K(t.receive),K=e=>U(e)||W(e)||G(e),At=e=>typeof e==`string`&&e===`off`,jt=e=>Mt(e)||Nt(e)||x(e)||Pt(e)||Ft(e)||It(e)||q(e)||Lt(e),Mt=e=>typeof e==`string`&&e===`operator`,Nt=e=>typeof e==`string`&&e===`spawn`,Pt=e=>typeof e==`string`&&e===`cron`,Ft=e=>typeof e==`string`&&e===`talk`,It=e=>typeof e==`string`&&e===`run`,q=e=>typeof e==`string`&&e===`plugin`,Lt=e=>typeof e==`string`&&e===`internal`,Rt=e=>typeof e==`string`&&e===`plugin-dock`,zt=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`actor`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[22].test(n)||i(t[n]))&&Bt(t.actor)&&(t.assignedBy===void 0||!(`assignedBy`in t)||T(t.assignedBy))&&(t.assignedAt===void 0||!(`assignedAt`in t)||Vt(t.assignedAt)),Bt=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`type`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[23].test(n)||i(t[n]))&&E(t.type)&&(t.id===void 0||!(`id`in t)||g(t.id))&&(t.label===void 0||!(`label`in t)||g(t.label))&&(t.avatarUrl===void 0||!(`avatarUrl`in t)||g(t.avatarUrl))&&(t.identity===void 0||!(`identity`in t)||k(t.identity)),Vt=e=>Number.isFinite(e)&&e>=0,Ht=e=>Array.isArray(e)&&e.every((e,t)=>J(e))&&e.length<=4,J=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`identity`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[24].test(n)||i(t[n]))&&Ut(t.identity)&&(t.label===void 0||!(`label`in t)||g(t.label))&&(t.avatarUrl===void 0||!(`avatarUrl`in t)||g(t.avatarUrl)),Ut=e=>A(e)||j(e)||M(e)||N(e)||F(e),Wt=e=>Array.isArray(e)&&e.every((e,t)=>J(e))&&e.length<=32,Gt=e=>Kt(e)||V(e)||qt(e)||Jt(e),Kt=e=>typeof e==`string`&&e===`shared`,qt=e=>typeof e==`string`&&e===`suggest`,Jt=e=>typeof e==`string`&&e===`draft`,Yt=e=>Xt(e)||Zt(e)||Qt(e)||$t(e),Xt=e=>typeof e==`string`&&e===`admin`,Zt=e=>typeof e==`string`&&e===`owner`,Qt=e=>typeof e==`string`&&e===`member`,$t=e=>typeof e==`string`&&e===`viewer`,en=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`sessionKey`in e&&`sessionId`in e&&p(e.sessionKey)&&p(e.sessionId)&&(e.entryId===void 0||!(`entryId`in e)||h(e.entryId)),tn=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&`state`in e&&nn(e.state),nn=e=>rn(e)||S(e),rn=e=>typeof e==`string`&&e===`available`,an=e=>on(e)||sn(e)||cn(e)||C(e),on=e=>typeof e==`string`&&e===`user`,sn=e=>typeof e==`string`&&e===`auto`,cn=e=>typeof e==`string`&&e===`inherited`,ln=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&Object.getOwnPropertyNames(t).every((n,r)=>e[25].test(n)||i(t[n]))&&(t.mcpServers===void 0||!(`mcpServers`in t)||Y(t.mcpServers))&&(t.mcpToolsDeny===void 0||!(`mcpToolsDeny`in t)||un(t.mcpToolsDeny))&&(t.skills===void 0||!(`skills`in t)||Y(t.skills))&&(t.webSearch===void 0||!(`webSearch`in t)||b(t.webSearch)),Y=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&Object.entries(t).every(([t,n],r)=>!e[26].test(t)||z(n)),un=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&Object.entries(t).every(([t,n],r)=>!e[27].test(t)||l(n)),dn=e=>Array.isArray(e)&&e.every((e,t)=>fn(e))&&e.length<=500,fn=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`name`in t&&`description`in t&&`source`in t&&`scope`in t&&`acceptsArgs`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[28].test(n)||i(t[n]))&&X(t.name)&&(t.nativeName===void 0||!(`nativeName`in t)||Z(t.nativeName))&&(t.textAliases===void 0||!(`textAliases`in t)||pn(t.textAliases))&&mn(t.description)&&(t.category===void 0||!(`category`in t)||hn(t.category))&&Sn(t.source)&&(t.skillDisplayName===void 0||!(`skillDisplayName`in t)||Z(t.skillDisplayName))&&(t.skillModelVisible===void 0||!(`skillModelVisible`in t)||b(t.skillModelVisible))&&(t.skillReferenceable===void 0||!(`skillReferenceable`in t)||b(t.skillReferenceable))&&wn(t.scope)&&z(t.acceptsArgs)&&(t.args===void 0||!(`args`in t)||Dn(t.args))&&(t.clientPresentation===void 0||!(`clientPresentation`in t)||In(t.clientPresentation)),X=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=200||e.length<=400&&t(e)<=200),Z=e=>typeof e==`string`&&(e.length>=2||e.length>=1&&t(e)>=1)&&(e.length<=200||e.length<=400&&t(e)<=200),pn=e=>Array.isArray(e)&&e.every((e,t)=>X(e))&&e.length<=20,mn=e=>typeof e==`string`&&(e.length<=2e3||e.length<=4e3&&t(e)<=2e3),hn=e=>gn(e)||_n(e)||vn(e)||yn(e)||bn(e)||xn(e),gn=e=>typeof e==`string`&&e===`session`,_n=e=>typeof e==`string`&&e===`options`,vn=e=>typeof e==`string`&&e===`status`,yn=e=>typeof e==`string`&&e===`management`,bn=e=>typeof e==`string`&&e===`media`,xn=e=>typeof e==`string`&&e===`tools`,Sn=e=>Q(e)||Cn(e)||q(e),Q=e=>typeof e==`string`&&e===`native`,Cn=e=>typeof e==`string`&&e===`skill`,wn=e=>Tn(e)||Q(e)||En(e),Tn=e=>typeof e==`string`&&e===`text`,En=e=>typeof e==`string`&&e===`both`,Dn=e=>Array.isArray(e)&&e.every((e,t)=>On(e))&&e.length<=20,On=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`name`in t&&`description`in t&&`type`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[29].test(n)||i(t[n]))&&X(t.name)&&kn(t.description)&&An(t.type)&&(t.required===void 0||!(`required`in t)||b(t.required))&&(t.choices===void 0||!(`choices`in t)||Pn(t.choices))&&(t.dynamic===void 0||!(`dynamic`in t)||b(t.dynamic)),kn=e=>typeof e==`string`&&(e.length<=500||e.length<=1e3&&t(e)<=500),An=e=>jn(e)||Mn(e)||Nn(e),jn=e=>typeof e==`string`&&e===`string`,Mn=e=>typeof e==`string`&&e===`number`,Nn=e=>typeof e==`string`&&e===`boolean`,Pn=e=>Array.isArray(e)&&e.every((e,t)=>Fn(e))&&e.length<=50,Fn=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`value`in t&&`label`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[30].test(n)||i(t[n]))&&$(t.value)&&$(t.label),$=e=>typeof e==`string`&&(e.length<=200||e.length<=400&&t(e)<=200),In=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`when`in t&&`action`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[31].test(n)||i(t[n]))&&Ln(t.when)&&Rn(t.action),Ln=e=>typeof e==`string`&&e===`no-arguments`,Rn=e=>zn(e),zn=t=>typeof t==`object`&&!!t&&!Array.isArray(t)&&`kind`in t&&Object.getOwnPropertyNames(t).every((n,r)=>e[32].test(n)||i(t[n]))&&Bn(t.kind),Bn=e=>typeof e==`string`&&e===`device-pairing`;return e=>n(e)})()})))()}r();export{n as isChatHistoryState};