openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
148 lines • 465 kB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./about-page-DkWix_H2.js","./control-ui-boot-shared-DoKu-5Ju.js","./control-ui-boot-shared-JlZTSJEC.js","./control-ui-boot-shared-3SP_aL-Y.js","./control-ui-boot-shared-90V688bk.js","./control-ui-boot-shared-DBJri5ri.js","./control-ui-boot-shared-BykNRHBP.js","./control-ui-boot-shared-Rs4iS2kF.js","./plugin-contracts-runtime-CsJ0WpAd.js","./markdown-runtime-Hc-lvqnn.js","./config-runtime-CgOgfOrG.js","./control-ui-boot-shared-CG9HtEG-.js","./control-ui-boot-shared-73R4ErOy.js","./control-ui-boot-shared-CcmBeh0v.js","./control-ui-boot-shared-BR12heUA.js","./control-ui-boot-shared-CApmg5ot.js","./css-chat-Ckz95ikh.js","./chat-transcript-layout-w3EszKw8.js","./css-chat-custodian-new-session-B_euK-Vu.js","./sidebar-update-runtime-B0vYzX3D.js","./control-ui-boot-new-BTHisEC4.js","./css-cron-custodian-new-session-DdqVeFqw.js","./chat-transcript-styles-BVZgOT1t.js","./css-new-session-BGJnpiJ5.js","./css-config-njfbfHBk.js","./settings-workspace-whxhPRxQ.js","./settings-DdI5hVp3.js","./brand-icons-7DNJSqjN.js","./control-ui-boot-shared-BJ_QKfFn.css","./css-chat-DCHf01mf.css","./css-chat-custodian-new-session-CEndYuO5.css","./sidebar-update-runtime-ah7rgQE7.css","./css-cron-custodian-new-session-Ci5c-FgJ.css","./chat-transcript-styles-DHHd4Hhc.css","./css-new-session-C71huhgC.css","./css-config-vi6FusyS.css","./control-ui-boot-new-D-SpiTTi.css","./settings-DyrJbLnT.css","./about-page-B5fnhNH8.css","./activity-page-B-bP-8vK.js","./stream-auto-follow-controller-BZ0UzGsg.js","./agent-row-chip-Bs3wMn9R.js","./agent-row-chip-DMskru2Y.css","./activity-page-BLWoPXbi.css","./agents-home-page-DlqnjN5B.js","./roster-element-C29y8JVq.js","./agents-home-page-DfcNNRNz.css","./agents-page-rKGqpCmH.js","./en-settings-CTjRjKt9.js","./css-agents-plugins-skill-workshop-skills-DvcafeYi.js","./github-identity-view-Chpr1KID.js","./tool-catalog-BZx1rz45.js","./slots-Dm2tR7jh.js","./model-picker-DGuSm00e.js","./decision-model-picker-BdLltaxT.js","./skills-shared-DP3TO2QO.js","./cron-jobs-pagination-l_55cgvG.js","./presenter-nbeVqnou.js","./css-agents-plugins-skill-workshop-skills-DP4CzO_X.css","./tool-catalog-btW_u57U.css","./cron-jobs-pagination-WTYglB0y.css","./agents-page-l_HjeTiy.css","./approvals-page-mgL2PlL5.js","./apps-page-C5PcxzAe.js","./en-apps-8oPCuuXd.js","./native-chrome-setup-DhZFPD6-.js","./native-chrome-setup-DEA9Gvpf.css","./apps-page-DwKkljot.css","./channels-page-Ddpp6FWJ.js","./channel-picker-DAnVfyDn.js","./wizard-step-controls-BmW-9g-y.js","./config-form-CJ1yQ7qT.js","./config-form.tiers-B6RLhwBP.js","./config-form.search-Cgp2izNk.js","./config-form.node.shared-YCBWiPxU.js","./phone-runtime-ZUS6orP4.js","./channel-picker-DMboyz7y.css","./wizard-step-controls-D2NAzKG1.css","./route-loader-Cu3upMOr.js","./control-ui-boot-chat-DCYcb1Hy.js","./css-skill-workshop-D2ZfJfdl.js","./css-question-Ct0OXZAc.js","./session-snapshot-database-CobUvfK7.js","./css-skill-workshop-CWhVVscF.css","./css-question-DeaP1V6y.css","./control-ui-boot-chat-CPmZGJw4.css","./route-entry-CfP2rXbi.js","./cloud-workers-page-pcJfJmCo.js","./config-page-tBwl6BY5.js","./response-body-krIvH2yK.js","./theme-palette-CTWKNgGC.js","./update-run-view-BRPFPBfJ.js","./en-update-actions-B4FZH2_u.js","./settings-targets-BVKntTff.js","./setup-schema-Dq2HBf5f.js","./system-info-CjVJMFLU.js","./system-info-CF8uzcQK.js","./wizard-login-controller-BCg3Kod0.js","./state-rFA9s-wO.js","./en-transcripts-BT7itEy8.js","./en-memory-import-b7LufhbK.js","./settings-select-row-YlQk8ZwW.js","./settings-model-BpgA2Bjs.js","./update-run-view-DpZEihgg.css","./wizard-login-controller-CpdIpYqr.css","./config-page-B_geQ8Ih.css","./connection-page-CHf3u2Cr.js","./login-runtime-B9V4EbPP.js","./gateway-vitals-DDvGDrbo.js","./en-debug-CmOVvDOZ.js","./sparkline-tile-Cq3j8Hqq.js","./sparkline-tile-CaHeaFDQ.css","./connection-page-DEIxnsDY.css","./cron-page-Cktv5oaO.js","./agent-scope-control-BJCYxovr.js","./cron-page-rcVzTv_b.css","./custodian-page-DvINjS8u.js","./custodian-surface-DgaL0Vy1.js","./plugin-help-C-HH8MfQ.js","./custodian-alert-store-D3-kKDhQ.js","./custodian-surface-BS8BC9z-.css","./route-view-BqFAKzJ2.js","./dashboards-page-BCMA68OG.js","./near-viewport-observer-WgGck829.js","./dashboards-page-oN0QjD8g.css","./debug-page-ib4Y7BWX.js","./lane-table-BvMbqjBH.js","./lane-table-CSTpz4OW.css","./device-page-B95bbKmJ.js","./device-page-DzxF6N-U.css","./permissions-page-CPe9XfYq.js","./page-operations-CWRHz9QD.js","./page-operations-CCVbWoO9.js","./devices-page-2BLu-MPY.js","./desktop-focus-window-BlH9P8oZ.js","./capacity-meter-DfI-oR4b.js","./en-devices-CYyAb5JP.js","./capacity-meter-Bpyn5Saf.css","./devices-page-Do3i-SE3.css","./labs-page-BGKFWAnP.js","./lobsterdex-page-Ok9JWDZi.js","./lobsterdex-page-BYmxmm_r.css","./logs-page-TwrnZuQ_.js","./logs-page-FIJskeGm.css","./meetings-page-CLX_1hxZ.js","./meetings-page-C6CzIO_R.css","./memory-import-page-BdF8i_8h.js","./memory-import-page-744kZiKS.css","./load-DoWmG1Sk.js","./load-BLOiHlSU.js","./usage-qkiTcEi1.js","./model-providers-page-5fAfC_CF.js","./usage-CNBIeCDY.js","./view-status-CQdNGoo5.js","./provider-usage-BEdyBaWo.js","./usage-Mraqbmi0.css","./view-status-CPVPeI0Y.css","./model-setup-page-DHl6HaMR.js","./first-run-activation-receipt-BjtCrdGt.js","./route-loader-BhZLGTFx.js","./new-session-page-entry-C2nB9KLT.js","./plugin-page-mDKuJl57.js","./control-ui-disabled-DNN1S8_t.js","./plugins-page-B9svU2dY.js","./panel-empty-state-BO6bnLg_.js","./plugins-hub-header-Cc1OP0uc.js","./credential-editor-wA0iUUNI.js","./ref-contract-CnSrOdzE.js","./file-preview-modal-registration-BAioOm-d.js","./plugins-hub-header-CLg8XWX0.css","./credential-editor-CxfZfu4o.css","./plugins-page-D_KVIBAs.css","./portals-page-BjP25pFE.js","./portals-page-pG5r4WM8.css","./profile-page-BMBiQCz1.js","./profile-page-C73ipYq-.css","./search-page-Dmjfj41F.js","./secrets-page-BmmHpbwD.js","./secrets-page-DyeEsoTs.css","./sessions-page-DZ7AXtRM.js","./session-workspace-recovery.runtime-DzJr_zYd.js","./transcript-search-Bw6jSdBN.js","./cloud-worker-stop.runtime-Deft5Au6.js","./sessions-hub-header-COmLUpdO.js","./sessions-page-DcRygUsm.css","./skill-workshop-page-DVMx528D.js","./skill-workshop-page-DOFJgGGw.css","./skills-page-8gfL1PP2.js","./skills-page-BQ5d-20G.css","./systems-page-DVGB1rJS.js","./desktop-panel-B-wMMJaC.js","./scrollbar-styles-BielkyQ9.js","./dock-panel-styles-lbOjSYYD.js","./gateway-websocket-url-cYJwVUmD.js","./systems-page-CEseuTcJ.css","./terminal-page-B_elQSBK.js","./terminal-panel-registration-DCAn7CIA.js","./panel-tab-strip-BM8uM2tc.js","./dock-destination-controls-BlZlW68m.js","./theme-color-DAo4KRoc.js","./catalog-terminal-start-CKAPUE5U.js","./terminal-page-DzAc6IHZ.css","./route-loader-DD1ur0Vo.js","./request-usage-snapshot-bbeAz4r8.js","./usage-page-Cu_Co5y2.js","./worktrees-page-bHwv0pao.js","./sha2-DdUuYbOM.js","./dist-DWV1tVpX.js","./session-roster-cache.reader-za0ig5Q3.js","./session-roster-cache.reader-EFFQX3Sf.js","./session-roster-cache.runtime-CPajVK7c.js","./session-message-subscriptions.runtime-DGVEZVG1.js","./first-run-activation-receipt-OVHkgGFB.js","./control-ui-loader-hbLkGbP6.js","./session-snapshot-invalidation-DO4C2Hgi.js","./session-snapshot-database-M8hdgb-a.js","./debug-overlay-layout.runtime-BtwbCcPA.js","./sw-refresh.runtime-BOQMREZN.js"])))=>i.map(i=>d[i]);
import{n as e}from"./rolldown-runtime-8BhlS34s.js";import{$r as t,Aa as n,Ai as r,Ar as i,At as a,Ba as o,Bi as s,C as c,Da as l,Dn as u,Dr as d,Dt as f,Ea as p,Ei as m,En as h,Er as g,Et as _,Fi as v,Fr as y,G as b,Ga as x,Gi as S,Gt as C,Ia as w,Ii as T,Ir as ee,J as E,Ja as D,Ji as O,Jt as k,Kt as A,Li as j,Lr as te,Ma as M,Mr as N,Nt as ne,Oi as P,On as re,Or as ie,Pa as F,Pr as ae,Qr as oe,Ra as se,Si as ce,Sr as le,T as ue,Ti as de,Tr as fe,Tt as pe,Ui as I,Ur as me,Ut as he,V as ge,Vi as _e,Vt as ve,Wi as ye,Wr as be,Wt as xe,X as Se,Xr as Ce,Yr as we,Yt as Te,Z as Ee,Zr as De,_t as Oe,ai as ke,at as Ae,br as je,ca as Me,ci as Ne,da as Pe,dt as Fe,ei as Ie,eo as Le,et as Re,ft as ze,gt as Be,ha as Ve,hi as He,hn as Ue,ht as We,ia as Ge,ii as Ke,ja as qe,kr as Je,kt as Ye,ln as L,lt as Xe,mt as Ze,ni as Qe,no as $e,oa as R,oi as et,oo as tt,ot as nt,pn as rt,pt as it,q as at,qr as ot,qt as st,ra as ct,ro as z,sa as B,ti as lt,tn as ut,ut as dt,wi as ft,wr as pt,yr as mt,zi as V,zt as ht}from"./control-ui-foundation-ZY_Flbbd.js";import{$n as gt,$r as _t,Ba as vt,Bi as yt,Co as bt,Do as xt,Ei as St,Eo as H,Fa as Ct,Gn as wt,Hi as Tt,Ia as Et,Jt as Dt,Ka as Ot,Kn as kt,Li as At,Mi as jt,Ni as Mt,Pi as Nt,Qa as Pt,Ti as Ft,Ui as It,Vi as Lt,Vr as Rt,Wa as zt,Xa as Bt,Xi as Vt,Xn as Ht,Ya as Ut,Yt as Wt,Za as Gt,Zi as Kt,_i as qt,_r as Jt,co as U,dr as Yt,ei as Xt,eo as Zt,er as Qt,fo as $t,fr as en,gi as tn,go as nn,hi as rn,hr as an,ko as on,lr as sn,mi as cn,mr as ln,nr as un,oo as dn,or as fn,qn as pn,ro as mn,sr as hn,t as gn,ti as _n,to as vn,ur as yn,vi as bn,vo as xn,vr as Sn,wo as Cn,xo as wn,yi as Tn,za as En,zi as Dn}from"./control-ui-core-CFW9Qtjn.js";import{$ as W,B as On,I as kn,R as An,X as jn,Y as G,ct as Mn,g as Nn,j as Pn,k as Fn,nt as In}from"./lit-runtime-P5vbNq6b.js";import{a as Ln,c as Rn,d as zn,i as Bn,l as Vn,n as Hn,o as Un,r as Wn,s as Gn}from"./gateway-runtime-5YzSCmfV.js";function Kn(e){return qn.some(t=>t===e)}var qn,Jn;function Yn(){return(Yn=e((()=>{qn=[`overview`,`files`,`tools`,`skills`,`channels`,`cron`,`memory`],Jn=`overview`})))()}function Xn(e,t){if(!Zn)return Array.from(e).slice(0,t).join(``);let n=``,r=0;for(let{segment:i}of Zn.segment(e))if(n+=i,r+=1,r>=t)break;return n}var Zn;function Qn(){return(Qn=e((()=>{Zn=typeof Intl.Segmenter==`function`?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null})))()}function $n(e){return!!e&&typeof e.getItem==`function`&&typeof e.setItem==`function`}function er(e){let t=Object.getOwnPropertyDescriptor(globalThis,e);if(typeof process<`u`&&{}.VITEST)return t&&!t.get&&$n(t.value)?t.value:null;if(typeof window<`u`&&typeof document<`u`)try{let t=window[e];return $n(t)?t:null}catch{return null}return t&&!t.get&&$n(t.value)?t.value:null}function tr(){return er(`localStorage`)}function nr(){return er(`sessionStorage`)}function rr(){return(rr=e((()=>{})))()}var ir,ar,or,sr;function cr(){return(cr=e((()=>{ir={menuLabel:`Agent menu`,agents:`Agents`,newConversation:`New conversation`,allAgents:`All agents`,showAllAgents:`Show all agents`,showOneAgent:`Show one agent`,workspaceMenuLabel:`Workspace menu`,switchAgent:`Switch agent`,working:`Working…`,ready:`Ready to chat`,whatCanAgentDo:`What can {name} do?`,help:`Help`,getHelp:`Get help`,getApps:`Get the apps`,discord:`Discord community`,viewChangelog:`View changelog`,agentSettings:`Agent settings`},ar={label:`Agent`,allAgents:`All agents`},or={pinToSwitcher:`Pin to switcher`,unpinFromSwitcher:`Unpin from switcher`},sr={title:`Identity`,subtitle:`Name, emoji, and avatar shown in chats and the sidebar.`,name:`Display name`,namePlaceholder:`Agent name`,emoji:`Emoji`,chooseImage:`Choose image…`,replaceImage:`Replace image…`,imageUnusable:`That image can't be used. Pick an image file up to 2 MB.`,imageTooDetailed:`That image is too detailed to store as an avatar. Try a simpler image, or set a workspace image path with openclaw agents set-identity --agent <id> --avatar <path>.`,fileHint:`Saving mirrors identity fields to IDENTITY.md; configured values take precedence.`}})))()}var lr;function ur(){return(ur=e((()=>{cr(),lr={pluginUi:{sessionRecentMessages:`Recent messages`,sessionHistoryUnavailable:`Session history could not be loaded. Try again.`,sessionHistoryEmpty:`No recent messages.`,customize:`Customize UI`,selectionScope:`Choose views for this browser window. Built-in views are always available.`,builtin:`Built-in view`,retryView:`Retry plugin view`,reload:`Reload plugin UI`,dashboardTitle:`Session dashboard`,dashboardEmpty:`This session has no dashboard widgets yet.`,customPluginsDisabled:`Custom plugin UI is off`,customPluginsEnableHint:`Enable Custom plugin UI in Labs.`,openLabs:`Open Labs`,surface:{"session-list":`Session list`,composer:`Composer`,workspace:`Workspace`,transcript:`Transcript`,"tool-result":`Tool results`}},capacityMeter:{workerSlots:`{used} of {total} slots busy`,unavailable:`Slot utilization unavailable`,execHost:`Codex exec`},agentsHome:{},common:{uploadsDisabled:`File and image uploads are disabled.`,health:`Health`,ok:`OK`,yes:`Yes`,no:`No`,default:`Default`,active:`Active`,loading:`Loading…`,gatewayStarting:`Gateway starting…`,refreshing:`Refreshing…`,offline:`Offline`,connect:`Connect`,connected:`Connected`,refresh:`Refresh`,retry:`Retry`,staleData:`Showing stale data.`,reload:`Reload`,reset:`Reset`,restore:`Restore`,unarchive:`Unarchive`,undo:`Undo`,probe:`Probe`,call:`Call`,confirm:`Confirm`,dontAskAgain:`Don't ask me again`,cancel:`Cancel`,close:`Close`,previous:`Previous`,next:`Next`,continue:`Continue`,back:`Back`,create:`Create`,copy:`Copy`,copied:`Copied!`,copyFailed:`Copy failed`,copyCode:`Copy code`,copyTable:`Copy table`,expandTable:`Expand table`,expandedTable:`Expanded table`,closeTable:`Close expanded table`,resizeSplitView:`Resize split view`,delete:`Delete`,remove:`Remove`,dismiss:`Dismiss`,dismissAndDontShowAgain:`Dismiss and don't show again`,unselect:`Unselect`,enabled:`Enabled`,disabled:`Disabled`,failed:`Failed`,none:`none`,na:`n/a`,never:`never`,justNow:`just now`,now:`now`,unknown:`Unknown`,configured:`Configured`,running:`Running`,queued:`Queued`,completed:`Completed`,cancelled:`Cancelled`,linked:`Linked`,mode:`Mode`,system:`System`,light:`Light`,dark:`Dark`,baseUrl:`Base URL`,lastStart:`Last start`,lastProbe:`Last probe`,lastConnect:`Last connect`,lastMessage:`Last message`,authAge:`Auth age`,credential:`Credential`,audience:`Audience`,publicKey:`Public Key`,probeOk:`Probe ok`,probeFailed:`Probe failed`,reloadConfig:`Reload Config`,multiSelect:{addCustom:`Add “{value}”`,noMatches:`No matches`,remove:`Remove {value}`},loadConfig:`Load config`,loadApprovals:`Load approvals`,settingsSections:`Settings sections`,version:`Version`,docs:`Docs`,learnMore:`Learn more`,colorMode:`Color mode`,colorModeOption:`Color mode: {mode}`,search:`Search`,pickerNoMatches:`No matches`,save:`Save`,saving:`Saving…`,saveAndPublish:`Save & Publish`,importing:`Importing…`,importFromRelays:`Import from Relays`,showAdvanced:`Show Advanced`,hideAdvanced:`Hide Advanced`,unsavedChanges:`You have unsaved changes`,working:`Working…`,showQr:`Show QR`,relink:`Relink`,waitForScan:`Wait for scan`,logout:`Logout`,skipToMainContent:`Skip to main content`},focus:{unsupported:`This focused view is not supported.`},shortcutsOverlay:{title:`Keyboard shortcuts`},optionCard:{recommended:`Recommended`,skip:`Skip for now`},nativeConversation:{openDashboardFailed:`Couldn't open that page in the Dashboard`},nativeLinkMenu:{label:`Link actions`,openInline:`Open in Browser Panel`,openExternal:`Open in Default Browser`,copy:`Copy Link`},browserLinkPreferences:{openInControlUi:`Open links in Control UI browser`},filePreview:{bundle:{},label:`Support files`},mcpApp:{title:`MCP App`,unavailable:`MCP App unavailable: {error}`,errors:{gatewayUnavailable:`MCP App gateway unavailable`,mountUnavailable:`MCP App mount unavailable`,sandboxTimedOut:`MCP App sandbox timed out`,sandboxUnavailable:`MCP App sandbox unavailable`,initializationTimedOut:`MCP App initialization timed out`,requestFailed:`Request failed`,invalidSandboxUrl:`MCP App sandbox URL is invalid`}},sessionHovercard:{ariaLabel:`Session information`,agentNotepad:`Agent Notepad`,linkedChannel:`Linked to {channel}`,viaAccount:`Via {account}`,topicNumber:`Topic {id}`,sessionParticipants:`In this session`,chatKinds:{direct:`Direct chat`,group:`Group chat`,channel:`Channel`,thread:`Thread`,topic:`Topic`},attributionOther:`& {count} other`,attributionOthers:`& {count} others`,moreParticipants:`+{count}`,moreParticipantsLabel:`{count} more participants`,projectLabel:`Project`,workspaceLabel:`Workspace`,branchLabel:`Branch`,runsOn:`Runs on {providerId} · {profileId}`,machineLabel:`Machine`,machineCpu:`{cpu} vCPU`,machineMemory:`{memory} GB`,more:`+{count} more`,changedFile:`{count} file`,changedFiles:`{count} files`,pullRequestLabel:`Pull request #{number}, {state}`,pullRequestAuthorLabel:`Opened by {login}`,states:{open:`Open`,draft:`Draft`,merged:`Merged`,closed:`Closed`},checks:{passing:`CI checks passing`,failing:`CI checks failing`,pending:`CI checks running`}},sessionProgressCard:{title:`Progress`,composerTitle:`Task progress`,shortCount:`{completed} of {total}`,noteLabel:`Progress note`,dismiss:`Dismiss progress card`,dismissFailed:`Could not dismiss the progress card. Try again.`,refresh:{label:`Refresh task progress`,retry:`Retry progress refresh`,pending:`Refreshing task progress…`,failed:`Could not refresh. Previous update kept.`,timeout:`No new update yet. The request may still be running.`,updated:`Task progress updated`},widgetLabel:`Session progress`,widgetLoading:`Loading session progress…`,widgetEmpty:`No progress card yet`,widgetUnavailable:`Session progress is unavailable.`,widgetAccessDenied:`Select a session you can access or change sharing for this session.`,countLabel:`{completed} of {total} completed`,activity:{updated:`Updated {time}`,completed:`Completed {time}`,failed:`Failed {time}`,stopped:`Stopped {time}`},outcome:{completed:`Completed`,failed:`Failed`,stopped:`Stopped`},stepLabel:`{step}, {status}`,status:{completed:`completed`,failed:`failed`,inProgress:`in progress`,paused:`paused`,pending:`pending`,stopped:`stopped`},receipt:{updating:`Updating progress`,failed:`Progress update failed`,skipped:`Progress update skipped`,updated:`Progress updated — {completed}/{total} · {current}`,noteUpdated:`Progress note updated`,cleared:`Progress cleared`}},channels:{lastError:`Last error`,refreshingStaleSnapshot:`Refreshing channel status in the background; showing the last successful snapshot.`,hub:{connectedTitle:`Connected channels`,addTitle:`Add a channel`,addSubtitle:`Pick a service and follow the guided setup.`,updatedAgo:`Updated {ago}`,noneConnected:`No channels connected yet. Pick one below to get started.`,partialSnapshot:`Some channel checks did not finish before the UI budget.`,stateRunning:`Running`,stateConfigured:`Configured`,stateAttention:`Needs attention`,setUp:`Set up`,guidedSetup:`Guided step-by-step setup`,openDetails:`Open details`,lastMessageAgo:`Last message {ago}`,browseAllTitle:`More channels…`,browseAllSubtitle:`Browse every available channel, including installable plugins.`,runSetup:`Run setup`,adminRequired:`Browsing only. Channel setup requires operator.admin access.`,saveBeforeSetup:`You have unsaved channel config changes. Save or reload them before running guided setup.`},pairing:{title:`DM access requests`,subtitle:`Review people waiting to send direct messages to pairing-protected channels.`,channelFilter:`Channel`,accountFilter:`Account`,allChannels:`All channels`,allAccounts:`All accounts`,approve:`Approve`,dismiss:`Dismiss`,approveAria:`Approve {sender} for {channel}, account {account}`,dismissAria:`Dismiss {sender} for {channel}, account {account}`,requested:`Requested {ago}`,expires:`Expires {ago}`,senderDetails:`Sender details`,missingPermission:`This connection does not have operator.pairing access, so DM requests cannot be reviewed.`,noAccounts:`No configured channel accounts use DM sender pairing.`,noRequests:`No pending DM access requests.`,noFilteredRequests:`No pending requests match these filters.`,limits:`Requests expire after {minutes} minutes. Each channel account can hold up to {count} pending requests.`,detailTitle:`DM access`,detailSubtitle:`People must be approved before their direct messages reach the agent.`,pendingCount:`{count} pending`,noPending:`No pending requests`,review:`Review requests`,approveDialogTitle:`Approve DM access`,dismissDialogTitle:`Dismiss DM access request`,approveExplanation:`This lets the sender talk to the agent in direct messages. It does not grant group access.`,dismissExplanation:`This removes the current request but does not block the sender. They can request access again later.`,notifyRequester:`Notify the requester after approval`,makeCommandOwner:`Also make this sender the first command owner`,commandOwnerHelp:`Command owners can run privileged commands and approve dangerous actions. This option is only available while no owner is configured.`,commandOwnerNeedsAdmin:`No command owner is configured. This connection needs operator.admin to assign the first owner.`,approvedNotice:`DM access approved.`,approvedOwnerNotice:`DM access approved and the first command owner was configured.`,approvedNotificationFailedNotice:`DM access approved, but the requester notification could not be delivered.`,approvedOwnerFailedNotice:`DM access approved, but the first command owner could not be configured.`,approvedFollowupsFailedNotice:`DM access approved, but requester notification and command-owner setup both failed.`,dismissedNotice:`DM access request dismissed. The sender can request access again.`},setup:{dialogLabel:`Set up {channel}`,title:`Set up {channel}`,genericTitle:`a channel`,subtitle:`Guided channel setup`,starting:`Starting setup…`,working:`Working…`,sessionExpired:`This setup session expired after the Gateway restarted. Close this dialog, then start channel setup again.`,continue:`Continue`,finish:`Finish`,copyText:`Copy`,openLink:`Open link`,viewDocs:`View docs`,doneTitle:`Channel configured`,doneBody:`Configuration saved. The gateway reloads the channel automatically; check its card for live status.`,doneNoChangesTitle:`No changes made`,doneNoChangesBody:`Setup finished without configuring a channel. Nothing was saved.`,whatsappScanTitle:`Link WhatsApp by scanning the QR code`,whatsappScanHelp:`On your phone, open WhatsApp → Settings → Linked devices → Link a device, then scan this code.`,whatsappQrLoading:`Generating QR code…`,whatsappQrHint:`Click Show QR to generate a pairing code.`,whatsappQrAlt:`WhatsApp QR`,whatsappLinked:`WhatsApp is linked and ready.`,regenerateQr:`New QR code`,linkLater:`Link later`},config:{schemaUnavailable:`Schema unavailable. Use Raw.`,channelSchemaUnavailable:`Channel config schema unavailable.`,loadingSchema:`Loading config schema…`},generic:{subtitle:`Channel status and configuration.`},discord:{title:`Discord`,subtitle:`Bot status and channel configuration.`},googleChat:{title:`Google Chat`,subtitle:`Chat API webhook status and channel configuration.`},imessage:{title:`iMessage`,subtitle:`macOS bridge status and channel configuration.`},signal:{title:`Signal`,subtitle:`signal-cli status and channel configuration.`},slack:{title:`Slack`,subtitle:`Socket mode status and channel configuration.`},telegram:{title:`Telegram`,subtitle:`Bot status and channel configuration.`},whatsapp:{title:`WhatsApp`,subtitle:`Link WhatsApp Web and monitor connection health.`,phoneNumber:`Phone number`,loggedOut:`Logged out.`,logoutConfirmTitle:`Log out of WhatsApp account {accountId}?`,logoutConfirmMessage:`Logging out of account {accountId} stops its listener and deletes its saved credentials.`,logoutNotCleared:`No stored WhatsApp session was cleared. It may already be absent, or its auth directory may require manual cleanup.`},nostr:{title:`Nostr`,subtitle:`Decentralized DMs via Nostr relays (NIP-04).`,profile:`Profile`,editProfile:`Edit Profile`,profilePicture:`Profile picture`,noProfile:`No profile set.`,noProfileHint:`Click "Edit Profile" to add your name, bio, and avatar.`,name:`Name`,displayName:`Display Name`,about:`About`,advanced:`Advanced`,profilePicturePreview:`Profile picture preview`,account:`Account`,username:`Username`,usernameHelp:`Short username (e.g., satoshi)`,bio:`Bio`,bioPlaceholder:`Tell people about yourself...`,bioHelp:`A brief bio or description`,displayNameHelp:`Your full display name`,avatarUrl:`Avatar URL`,avatarHelp:`HTTPS URL to your profile picture`,bannerUrl:`Banner URL`,bannerHelp:`HTTPS URL to a banner image`,website:`Website`,websiteHelp:`Your personal website`,nip05Identifier:`NIP-05 Identifier`,nip05Help:`Verifiable identifier (e.g., you@domain.com)`,lightningAddress:`Lightning Address`,lightningHelp:`Lightning address for tips (LUD-16)`,placeholders:{username:`satoshi`,displayName:`Satoshi Nakamoto`,avatarUrl:`https://example.com/avatar.jpg`,bannerUrl:`https://example.com/banner.jpg`,website:`https://example.com`,nip05:`you@example.com`,lightningAddress:`you@getalby.com`},notices:{timeout:`Request timed out after 30 seconds; the server may still have applied the change — check the profile before retrying.`,operationFailed:`{prefix}: {error}`,updateFailed:`Profile update failed`,publishFailed:`Profile publish failed on all relays.`,published:`Profile published to relays.`,importFailed:`Profile import failed`,importedFromRelays:`Profile imported from relays. Review and publish.`,imported:`Profile imported. Review and publish.`}}},lazyView:{errorTitle:`Panel failed to load`,genericSubtitle:`Something went wrong while loading this panel.`,staleTitle:`This view could not load`,staleSubtitle:`Some interface files could not be downloaded. Check your connection, then reload.`,reloading:`Reloading…`,retry:`Retry`,stylesFailed:`Styles failed to load, so the page may look broken.`},communityInvite:{cardLabel:`Join the OpenClaw community on Discord`,artAlt:`A lobster beside the Discord mark on a lit seafloor pedestal`,title:`Come build with us`,body:`Ask anything, show what you're making, and find out what everyone else is building.`,bodyGreeting:`Or just say hi.`,action:`Join us on Discord`,dismissForever:`Dismiss and don't show again`,dismissFailed:`Invitation dismissed, but your preference couldn't be saved.`},updates:{adminRequired:`Administrator access is required to change update settings or start an update.`,campaign:{countdown:`Updating in {time}`,waitingForIdle:`Waiting for active work · forced update in {time}`,held:`Update held · resumes in {time}`,applying:`Applying update…`},holdOneHour:`Hold 1 h`,reviewUpdate:`Review update`,run:{title:`Update progress`,phases:`Update phases`,steps:`Installation steps`,details:`Step details`,noDetails:`No step details recorded yet.`,verification:`Verification checks`,report:`Update report`,restarting:`Gateway restarting…`,reconnecting:`Reconnecting automatically. Update progress is saved on the gateway.`,progress:`{completed} of {total} phases complete`,phase:{requested:`Requested`,staging:`Staging`,validating:`Validating`,repairing:`Repairing`,activating:`Activating`,restarting:`Restarting`,verifying:`Verifying`,finished:`Finished`},step:{completed:`Complete`,in_progress:`In progress`,pending:`Pending`,failed:`Failed`,skipped:`Skipped`},oracle:{service:`Service`,version:`Version`,plugins:`Plugins`,channels:`Channels`,inference:`Inference`},oracleState:{pass:`Passed`,warn:`Not verified`,fail:`Failed`,pending:`Pending`}},confirm:{action:`Update and restart`},target:{version:`v{version}`,commitBehind:`{count} commit behind`,commitsBehind:`{count} commits behind`,viewChanges:`Compare on GitHub`},sidebar:{campaignTarget:`{status} · {target}`,updating:`Updating Gateway…`,availableTitle:`Update available`,availableSummary:`A newer revision is ready.`,blockedTitle:`Update blocked`,blockedSummary:`The selected revision could not be applied to this checkout.`,blockedWaiting:`Blocked · waiting for active work · {target}`,waitingForIdle:`Waiting for active work`},dialog:{disconnected:"The Gateway disconnected during the update. This page reconnects on its own. If it stays disconnected, run `openclaw triage` on the Gateway host to open a local coding agent for diagnosis and repair.",restarting:"The Gateway is restarting. This page disconnects and reconnects on its own. If it stays disconnected, run `openclaw triage` on the Gateway host to open a local coding agent for diagnosis and repair."},channel:{},installKind:{},page:{},coalescedRestart:`Update installed. A gateway restart is already in progress; status will refresh after it reconnects.`,error:`Update error: {error}`,checkError:`Could not check for updates: {error}`,status:`Update {status}: {reason}. {guidance}`,verificationFailedWithIdentity:"Update finished, but the running install does not match the expected revision. Expected {expected}, running {actual}. Run `openclaw triage` on the Gateway host before retrying.",handoffTimeout:"Update completion was not confirmed. Run `openclaw triage` on the Gateway host and inspect the result before retrying.",outcomeUnknown:"The update outcome is unknown. Run `openclaw triage` on the Gateway host and inspect the result before retrying.",triage:{hostHint:"If Ask OpenClaw is unavailable, run `openclaw triage` on the Gateway host to open a local coding agent for diagnosis and repair. Diagnose the cause before retrying."},report:{},failureReasons:{dirty:`Commit or stash changes, then retry.`,noUpstream:`Set an upstream branch, then retry.`,notGitInstall:"Not a git checkout. Run `openclaw update` from the CLI for a global reinstall.",notOpenclawRoot:`Run the update from an OpenClaw checkout or use the CLI global reinstall path.`,depsInstallFailed:`Dependency install failed. Fix the install error and retry.`,buildFailed:`Build failed. Fix the build error and retry.`,buildDirty:`The selected revision's build changed checkout files. Retry with a revision that includes its generated artifacts.`,uiBuildFailed:`The control UI rebuild failed. Fix the UI build error and retry.`,globalInstallFailed:`The global package install did not verify on disk. Retry or reinstall from the CLI.`,restartDisabled:`The update was not applied because gateway restarts are disabled. Enable restarts in config, then retry.`,restartUnavailable:`This global install cannot be safely replaced while restarts are disabled and no supervisor is present.`,externalSupervisorUpdateRequired:"This Gateway is managed by an external supervisor. Use your server or deployment's update workflow to update OpenClaw and restart the Gateway. The Control UI and `openclaw update` cannot update this installation. No package changes or Gateway restart were attempted.",restartUnhealthy:`The replacement process never became healthy. The previous process stayed up so you can recover.`,restartRevisionMismatch:`The restarted Gateway is running a different revision. Check the service install root and retry.`,restartRevisionUnavailable:`The restarted Gateway could not report its revision. Check the service install root and logs before retrying.`,alreadyCurrent:`This checkout is already at its tracked upstream revision.`,managedServiceHandoffAlreadyRunning:`Another managed update is already running. Wait for it to complete, then refresh update status.`,managedServiceHandoffUnavailable:"Stop the foreground Gateway, run `openclaw update`, then launch it again. For automatic updates, install a managed Gateway service.",doctorFailed:"Doctor repair failed. Run `openclaw doctor --non-interactive` and retry.",managedServiceHandoffFailed:"The update helper stopped before finishing. Run `openclaw update` in the terminal to see why.",managedServiceHandoffSpawnFailed:"The Gateway could not start the update helper. Run `openclaw update` in the terminal instead.",managedServiceHandoffParentTimeout:"The Gateway stayed up too long for the update helper. Start the update again, or run `openclaw update`.",default:`See the gateway logs for the exact failure and retry once the cause is fixed.`},failedAtStep:`The update failed at {step}: {cause}.`,succeededVersion:`Gateway updated to v{version}.`,succeededCommit:`Gateway updated · now on {sha}.`,succeeded:`Gateway updated and restarted.`},devices:{readOnly:{pairingRequired:`Browsing only. Device changes require operator.pairing access.`,adminRequired:`Browsing only. Exec approvals and node bindings require operator.admin access.`,pairingAndAdminRequired:`Browsing only. Device changes require operator.pairing; exec approvals and node bindings require operator.admin.`},pairing:{button:`Pair device`,adminRequired:`Administrator access is required to create setup codes.`,title:`Pair a device`,loadFailed:`Could not load the pairing dialog. Check your connection and try again.`},binding:{loadConfigHint:`Load config to edit bindings.`,formModeHint:`Switch the Config tab to Form mode to edit bindings here.`,execNodeBinding:`Exec node binding`,execNodeBindingSubtitle:`Pin agents to a specific node when using exec host=node.`,defaultBinding:`Default binding`,defaultBindingHint:`Used when agents do not override a node binding.`,node:`Node`,anyNode:`Any node`,noNodes:`No nodes with system.run available.`,noAgents:`No agents found.`,defaultAgent:`default agent`,agent:`agent`,usesDefault:`uses default ({node})`,override:`override: {node}`,binding:`Binding`,useDefault:`Use default`,any:`any`,unavailable:`Unavailable`},inventory:{title:`Paired devices`,connected:`connected`,desktop:`Desktop`,actions:`Actions`,actionsName:`Actions for {name}`,openDesktop:`Open desktop`,copyDeviceId:`Copy device ID`,deviceIdCopied:`Device ID copied`,removeAction:`Remove…`,editAlias:`Edit alias`,lastKnown:`last known {time}`,deviceIdLabel:`Device ID`,remoteIpLabel:`Remote IP`,scopesLabel:`Scopes`,requestedAccessLabel:`Requested access`,approvedAccessLabel:`Approved access`,tokenRole:`Role`,tokenStatus:`Status`,tokenAge:`Age`,desktopOpenWindow:`Open this desktop in a new window`,desktopEnableHint:`Desktop sharing starts enabled on desktop nodes. In the desktop app on that node, check the Desktop sharing switch under Settings. Approve any pending desktop capability request here, and check that Gateway policy does not deny desktop.stream. The node needs Screen Sharing or an authenticated local VNC server.`,uptime:`up {time}`,loadLabel:`load {load}`,loadTitle:`Load averages (1 / 5 / 15 min): {averages} on {cores} cores`,memoryTitle:`Memory: {used} used / {total} total`,diskLabel:`{available} free`,diskTitle:`Disk: {available} available / {total} total`,summaryConnected:`{connected} of {total} connected`,summaryPending:`{count} awaiting approval`,cleanupStale:`Clean up {count} stale`,pendingApproval:`Pending approval`,empty:`No paired devices.`,connectedWithoutPairing:`Connected without pairing`,olderPairing:`{count} older pairing of {name}`,olderPairings:`{count} older pairings of {name}`,autoPaired:`auto-paired`,versionDrift:`version drift`,versionDriftTitle:`Device {nodeVersion}; Gateway {gatewayVersion}. Update the older component to align the fleet.`,workerVersion:`Worker {version}`,workerMissing:`worker missing`,workerMissingTitle:`The Gateway-managed worker bundle is missing. Start a new session on this device to reinstall it.`,manualWake:`manual wake required`,manualWakeTitle:`The Gateway cannot wake an offline Windows device. Start the machine or restore its network connection.`,approvalNeeded:`approval needed`,inputAgo:`input {time} ago`,seen:`seen {time}`,approved:`approved {time}`,details:`Details`,deviceId:`Device ID: {id}`,tokens:`Tokens`,capabilities:`Capabilities`,commands:`Commands`,offline:`offline`,approve:`Approve`,reject:`Reject`,remove:`Remove`,removePromptTitle:`Remove {name}?`,removePromptBody:`This device must pair again before it can reconnect.`,removeStalePromptTitle:`Remove {count} stale pairings?`,removeStalePromptTitleOne:`Remove 1 stale pairing?`,removeStalePromptBody:`Affected clients re-pair silently on their next connection.`,renameTitle:`Rename {name}`,renamePrompt:`Shown instead of the device's hostname on this Gateway.`,rejectDevicePromptTitle:`Reject this device pairing request?`,rejectNodePromptTitle:`Reject this node pairing request?`,rejectPromptBody:`The client must send a new pairing request before it can connect.`,revokePromptTitle:`Revoke the {role} token?`,revokePromptBody:`This token stops working immediately and cannot be restored.`,rotatePromptTitle:`New {role} token`,rotatePromptBody:`Copy this token now and store it securely. It is shown once and cannot be recovered.`,rotateAcknowledge:`I saved this token`,rotateDismissHint:`This dialog stays open until you confirm the token is saved.`,rotateWithheldTitle:`Token rotated · {device}`,rotateWithheldNext:`It will reconnect with the new token automatically — nothing else to do.`,rotateWithheldException:`If it doesn't reconnect on its own, pair it again.`,rotateWithheldNote:`For security, the new token is only revealed on the device itself.`,gateway:`gateway`,unpaired:`unpaired`,unknownClient:`unknown client`,revoked:`revoked`,active:`active`,rotate:`Rotate`,revoke:`Revoke`,none:`none`,rolesAndScopes:`roles: {roles} · scopes: {scopes}`,scopeUpgrade:`scope upgrade requires approval`,roleUpgrade:`role upgrade requires approval`,reapproval:`reconnect details changed; approval required`,newPairing:`new device pairing request`,repair:`repair`,requestedAt:`{note} · requested {time}`},capabilities:{},execApprovals:{title:`Exec approvals`,subtitlePrefix:`Allowlist and approval policy for`,loadHint:`Load exec approvals to edit allowlists.`,hostNativePolicy:`Host-native policy`,hostNativeHint:`Read-only here. Edit from the companion app or CLI.`,native:`Native`,defaultAction:`Default action`,rule:`{count} rule`,rules:`{count} rules`,allShells:`all shells`,off:`off`,on:`on`,target:`Target`,targetHint:`Gateway edits local approvals; node edits the selected node.`,host:`Host`,gateway:`Gateway`,node:`Node`,selectNode:`Select node`,noNodes:`No nodes advertise exec approvals yet.`,scope:`Scope`,defaults:`Defaults`,security:`Security`,defaultSecurity:`Default security mode.`,defaultValue:`Default: {value}.`,mode:`Mode`,useDefaultValue:`Use default ({value})`,ask:`Ask`,defaultPrompt:`Default prompt policy.`,askFallback:`Ask fallback`,promptUnavailable:`Applied when the UI prompt is unavailable.`,fallback:`Fallback`,autoAllowSkills:`Auto-allow skill CLIs`,autoAllowSkillsHint:`Allow skill executables listed by the Gateway.`,override:`Override ({value}).`,useDefault:`Use default`,allowlist:`Allowlist`,allowlistHint:`Case-insensitive glob patterns.`,addPattern:`Add pattern`,emptyAllowlist:`No allowlist entries yet.`,newPattern:`New pattern`,lastUsed:`Last used: {time}`,pattern:`Pattern`,remove:`Remove`,options:{deny:`Deny`,allowlist:`Allowlist`,full:`Full`,off:`Off`,onMiss:`On miss`,always:`Always`}}},worktrees:{adminRequired:`Browsing only. Worktree changes require operator.admin access.`,newWorktree:`New worktree`,ownerManual:`Manual`,ownerSession:`Session`,ownerWorkboard:`Workboard`,title:`Managed Worktrees`,subtitle:`Isolated repository checkouts owned by OpenClaw.`,cleanNow:`Clean up now`,name:`Name`,namePlaceholder:`auto`,baseBranch:`Base branch`,baseBranchPlaceholder:`Remote default`,repo:`Repository`,empty:`No managed worktrees.`,restorable:`Restorable`,restore:`Restore`,confirmDelete:`Snapshot and delete {name}?`,confirmForceDelete:`Snapshot failed: {error}
Delete without a snapshot?`},agentChip:ir,agentScope:ar,newSession:{title:`New session`,hint:`Pick where this session works, then say what to do.`,placementReloadBlocked:`Recovery needs a reload. Unsaved starts will be lost.`,discardUnsavedAndReload:`Discard unsaved starts and reload`},dashboardsPage:{emptyTitle:`No dashboards yet`,emptyDescription:`Dashboards created in your tasks will appear here.`,loadError:`Could not load dashboards: {error}`,openFocusMode:`Open dashboard in focus mode`,live:`Live`,byAuthor:`By {author}`,updated:`Updated {time}`,updatedUnknown:`Update time unknown`,totalLabel:`dashboards`,searchLabel:`Search dashboards`,searchPlaceholder:`Search dashboards…`,authorFilter:`Author`,allAuthors:`All authors`,sortLabel:`Sort`,sortUpdated:`Recently updated`,sortTitle:`Title A–Z`,resultCount:`Dashboards: {count}`,noResultsTitle:`No matching dashboards`,noResultsDescription:`Try another search or author.`},dashboardDocument:{close:`Close dashboard`,missingSession:`No dashboard session was specified.`,notFound:`This session could not be found.`,unavailable:`Session dashboards are unavailable for this connection.`,loadFailed:`Could not load this dashboard: {error}. Check the Gateway connection and try again.`},sessionsView:{subagentPrefix:`Subagent:`,automationPrefix:`Automation:`,actionRequiresConnection:`Connect to the Gateway to change sessions.`,actionUnavailable:`This Gateway does not support this session action.`,actionRequiresScope:`This action requires {scope} access.`,actionRequiresOwnership:`Only the session owner can make this change.`,deletePreservedReasons:{"owner-mismatch":`owned elsewhere`,busy:`live run or cleanup active`,"foreign-lock":`foreign Git lock`,"snapshot-failed":`OpenClaw could not create a safety snapshot`,"cleanup-failed":`cleanup failed`},draftCleanupFailed:`Session deleted; browser draft remains. Clear site data.`,title:`Sessions`,subtitle:`Browse sessions and manage per-session overrides.`,store:`Store: {path}`,active:`Updated within`,limit:`Limit`,createdBy:`Created by {name}`,ownedBy:`Owned by {name}`,archivedBy:`Archived by {name}`,archiveReason:`Archive reason`,archiveReasonManual:`Archived manually`,archiveReasonAgeRetention:`Automatically archived by age retention`,archiveReasonActiveSessionCap:`Automatically archived because the active-session limit was reached`,archiveReasonStaleDashboard:`Automatically archived after dashboard inactivity`,archiveReasonRestartRecovery:`Archived when a replacement session was recovered`,viewingNow:`viewing now`,owners:`Owners`,allOwners:`All owners`,involvingMe:`Involving me`,hideFromInvolvingMe:`Hide from Involving me`,showInInvolvingMe:`Show in Involving me`,specificOwner:`Specific owner`,specificOwnerAvailable:`Specific owner: {count} available`,specificOwnerSelected:`Specific owner: {name}`,ownerYou:`{name} (You)`,withParticipant:`with {name}`,withMoreParticipants:`+{count} more`,assignToMe:`Me`,assignTo:`Assign to…`,filterControls:`Session filters`,filters:`Filters`,sourceFilters:`Session source filters`,global:`Global`,unknown:`Unknown`,sessionState:`Session state`,all:`All`,sessionArchived:`Session archived`,archiving:`Archiving…`,sessionsArchived:`Archived {count} sessions`,deleteAllArchived:`Delete all archived…`,deleteAllArchivedConfirm:`Delete {count} archived sessions and their transcripts? Any attached workers will be stopped safely first.`,activeTooltip:`Loads sessions updated in the last {count} minutes.`,limitTooltip:`Max sessions to load.`,globalTooltip:`Include global sessions.`,unknownTooltip:`Include unknown sessions.`,archivedOnlyTooltip:`Show only archived sessions.`,minutesPlaceholder:`min`,searchPlaceholder:`Filter by key, agent, label, kind…`,user:`User`,assistant:`Assistant`,selected:`{count} selected`,deleteSelected:`Delete`,selectAllOnPage:`Select all on page`,selectSession:`Select session`,optionalPlaceholder:`(optional)`,key:`Key`,label:`Label`,kind:`Kind`,updated:`Updated`,tokens:`Tokens`,goal:`Goal`,goalNote:`Goal note`,thinking:`Thinking`,fast:`Fast`,verbose:`Verbose`,reasoning:`Reasoning`,actions:`Actions`,addToWorkboard:`Add to Workboard`,openWorkboardCard:`Open Workboard card`,opensAsDashboard:`Opens as dashboard`,approvalNeeded:`Approval needed`,messageNeedsAttention:`{count} message needs attention`,messagesNeedAttention:`{count} messages need attention`,unsentDraft:`Unsent draft`,noSessions:`No sessions found.`,noActiveSessions:`No active sessions.`,noArchivedSessions:`No archived sessions.`,noSessionsMatchFilters:`No sessions match your filters.`,pagination:`{start}-{end} of {total} rows`,pageSize:`Rows per page`,rowsPerPage:`{count} per page`,showAll:`Show all`,inherit:`inherit`,offExplicit:`off (explicit)`,auto:`auto`,on:`on`,off:`off`,full:`full`,stream:`stream`,contextUsage:`{percent}% of context used ({used} / {context} tokens)`,promptBudgetUsage:`{percent}% of last-run prompt budget used ({used} / {context} tokens)`,promptBudgetUsageApprox:`Approximately {percent}% of last-run prompt budget used ({used} / {context} tokens)`,contextUsageApprox:`~{percent}% of context used ({used} / {context} tokens, approximate)`,showSessionDetails:`Show session details for {count}`,hideSessionDetails:`Hide session details for {count}`,sessionDetails:`Session details`,overrides:`Overrides`,status:`Status`,statusLive:`Live`,statusIdle:`Idle`,statusUnknown:`Unknown`,statusQueued:`Queued`,statusRunning:`Running`,statusDone:`Done`,statusFailed:`Failed`,statusInterrupted:`Interrupted`,statusKilled:`Killed`,statusTimeout:`Timed out`,waitingForAnswer:`Waiting for your answer`,waitingForApproval:`Waiting for approval`,questionsNeedAnswer:`{count} questions need your answer`,approvalsNeedApproval:`{count} requests need approval`,attentionMore:`+{count} more`,runFailedReason:`Run failed: {reason}`,childRunFailedReason:`Child session {label} failed: {reason}`,runErrorTimedOut:`Timed out`,runErrorUnknown:`Unknown error`,attentionRequired:`Session needs attention`,openSession:`Open session`,model:`Model`,provider:`Provider`,runtime:`Runtime`,runDuration:`Run duration`,lastActive:`Last active {time}`,surface:`Surface`,subject:`Subject`,room:`Room`,space:`Space`,sessionId:`Session ID`,activeRun:`Active run`,subagentsWorking:`Subagents working`,showChildSessions:`Show {count} child sessions for {session}`,hideChildSessions:`Hide {count} child sessions for {session}`,childSessions:`Child sessions`,showMoreChildren:`Show {count} more`,archived:`Archived`,pinned:`Pinned`,unread:`Unread`,automationAttached:`Automation attached`,incognito:`Incognito session`,cloudWorkerPlacement:`Placement: {state}`,placementWorkspaceConflict:`{placement} · 1 workspace conflict`,placementWorkspaceConflicts:`{placement} · {count} workspace conflicts`,cloudWorkerDiskWarning:`Cloud session disk space is low`,cloudWorkerDiskCritical:`Cloud session disk space is critically low`,cloudWorkerDescendantConflict:`Cloud worker child: 1 workspace conflict`,cloudWorkerDescendantConflicts:`Cloud worker children: {count} workspace conflicts`,renameSession:`Rename session`,renameSessionPrompt:`Rename session`,renameSessionMenu:`Rename…`,setIconMenu:`Set icon`,setColorMenu:`Color`,setIconColorMenu:`Icon & color`,sessionColor:`Session color: {color}`,colors:{red:`Red`,blue:`Blue`,green:`Green`,yellow:`Yellow`,purple:`Purple`,orange:`Orange`,pink:`Pink`,cyan:`Cyan`},iconEmojiSection:`Emoji`,iconGlyphSection:`Icons`,noIcon:`No icon`,noColor:`No color`,customEmojiCell:`Custom emoji…`,customEmojiTitle:`Custom emoji`,customEmojiSet:`Set`,customEmojiHint:`Any emoji works. Press {shortcut} for the system emoji picker.`,customEmojiHintNoShortcut:`Any emoji works.`,customIconCell:`Custom icon…`,customIconTitle:`Custom icon`,customIconHint:`Paste an emoji or SVG. Press {shortcut} for the system emoji picker.`,customIconHintNoShortcut:`Paste an emoji or SVG.`,removeIcon:`Remove icon`,pinSession:`Pin session`,pinRootSessionsOnly:`Only root sessions can be pinned; pin the parent session instead.`,unpinSession:`Unpin session`,markUnread:`Mark as unread`,markRead:`Mark as read`,markUnreadCount:`Mark {count} as unread`,markReadCount:`Mark {count} as read`,forkSession:`Fork conversation`,forkFromLastCompleted:`Fork from last completed message`,forkedSession:`Forked session`,copySessionId:`Session ID`,copySessionLink:`Session link`,copySessionPreviewLink:`Preview link`,copyMarkdown:`Conversation as Markdown`,openNewTab:`New tab`,openNewWindow:`New window`,splitBelow:`Split below`,workspaceEditors:`Workspace · editor`,resetAppearance:`Reset to default`,copyTranscriptChanged:`Conversation changed while copying. Try again.`,openWindowBlocked:`Allow pop-ups for this site, then try again.`,splitUnavailable:`Open a conversation on a wide screen to use split view.`,openPullRequest:`Open PR`,openInEditorMenu:`Open in`,archiveSession:`Archive session`,archiveSessionCount:`Archive {count}`,restoreSession:`Restore session`,restoreSessionCount:`Restore {count}`,moveSession:`Move session…`,moveSessionTitle:`Move session`,moveSessionDescription:`Choose where "{session}" should continue.`,moveSessionNoReplayWarning:`OpenClaw safely reconciles the current workspace before moving. Active work is never replayed.`,moveSessionActiveRunWarning:`The active turn will be interrupted. Partial output is not replayed; send the next turn again after the move.`,moveSessionAction:`Move session`,moveSessionCatalogFailed:`Could not load available destinations.`,moveSessionFailed:`Move failed`,moveSessionGatewayTarget:`Gateway`,movingSession:`Moving to {target}…`,movingSessionGeneric:`Moving session…`,stopCloudWorker:`Stop cloud worker…`,stopCloudWorkerConfirm:`Stop the cloud worker for "{session}"?`,stopCloudWorkerConfirmAction:`Stop worker`,initialTurnPausedByWorkerStop:`Worker stop requested. Review the initial message before retrying.`,stopCloudWorkerStale:`Gateway connection replaced before the cloud worker for "{session}" was stopped. Try again.`,deleteSessionMenu:`Delete…`,deleteSessionCount:`Delete {count}…`,deleteSessionConfirm:`Delete "{session}" and its transcript? Any attached worker will be stopped safely first.`,deleteSessionStale:`Gateway connection replaced before "{session}" was deleted. Try again.`,deleteSessionsConfirm:`Delete {count} sessions and their transcripts? Any attached workers will be stopped safely first.`,deleteSessionsStale:`Gateway connection replaced before {count} sessions were deleted. Try again.`,deleteSelectedConfirmOne:`Delete 1 session?
Stop any attached worker safely, then delete the session entry and archive its transcript.`,deleteSelectedConfirm:`Delete {count} sessions?
Stop any attached workers safely, then delete the session entries and archive their transcripts.`,groupBy:`Group by`,groupByNone:`None`,groupByCategory:`Custom groups`,groupByPerson:`Person`,showSessionPreview:`Show message preview`,hideEmptyGroups:`Hide empty groups`,hideEmptyGroupsSelected:`Hide empty groups: {mode}`,emptyGroupsWhenFiltering:`When filtering`,emptyGroupsAlways:`Always`,emptyGroupsNever:`Never`,showCronSessions:`Show automation sessions`,showSystemSessions:`Show system sessions`,groupByChannel:`Channel`,groupByKind:`Kind`,groupByAgent:`Agent`,groupByDate:`Date`,group:`Group`,ungrouped:`Ungrouped`,newGroup:`New group`,newGroupPrompt:`New group name`,newGroupTitle:`New group`,newGroupCreate:`Create group`,newGroupFailed:`Could not create the group.`,newGroupStale:`Gateway connection replaced before the group was saved. Try again.`,newGroupMoveSkipped:`Group created, but the move was skipped because the list changed. Move from the row menu.`,moveToGroup:`Move session to a group`,moveToGroupMenu:`Move to group`,moveToGroupMenuCount:`Move {count} to group`,removeFromGroup:`Remove from group`,moveBackToGroups:`Move back to Groups`,groupMenu:`Group options for {group}`,newSessionInGroup:`New session in {group}`,groupDefaultsMenu:`New session defaults`,groupDefaultsTitle:`New session defaults for "{group}"`,groupDefaultsDescription:`Choose where new sessions in this group start.`,groupDefaultsCwd:`Working directory`,groupDefaultsCwdPlaceholder:`Use the agent workspace`,groupDefaultsCwdHint:`Leave empty to use the selected agent's workspace.`,groupDefaultsMode:`Environment`,groupDefaultsLocal:`Current checkout`,groupDefaultsWorktree:`New worktree`,groupDefaultsWorktreeHint:`Runs each session in an isolated Git worktree.`,groupDefaultsFailed:`Could not save the group defaults.`,groupDefaultsStale:`Gateway connection replaced before the defaults were saved. Try again.`,renameGroupMenu:`Rename group`,renameGroupTitle:`Rename group "{group}"`,groupNameLabel:`Group name`,deleteGroupMenu:`Delete group`,deleteGroupTitle:`Delete group "{group}"`,deleteGroupConfirm:`The group is removed. Its sessions move back to the session list.`,deleteGroupStale:`Gateway connection replaced before "{group}" was deleted. Try again.`,dragSessionHint:`Drag session to move between groups`,dateToday:`Today`,dateYesterday:`Yesterday`,dateThisWeek:`This week`,dateOlder:`Older`,dateNoActivity:`No activity`,groupRowCount:`{count} sessions`,groupRowCountOne:`{count} session`},agents:{noAgents:`No agents`,createdBy:`Created by {id}`,defaults:{title:`Agent defaults`,description:`Defaults every agent inherits unless overridden.`},copyId:`Copy ID`,default:`Default`,setDefault:`Set Default`,...or,selectTitle:`Select an agent`,selectSubtitle:`Pick an agent to inspect its workspace and tools.`,tabs:{overview:`Overview`,files:`Files`,tools:`Tools`,skills:`Skills`,channels:`Channels`,cronJobs:`Automations`,memory:`Memory`},context:{title:`Agent Context`,workspace:`Workspace`,openFilesTab:`Open Files tab`,primaryModel:`Primary Model`,runtime:`Runtime`,thinkingDefault:`Thinking Default`,identityName:`Identity Name`,identityAvatar:`Identity Avatar`,skillsFilter:`Skills Filter`,default:`Default`,configurationSubtitle:`Workspace, identity, and model configuration.`,schedulingSubtitle:`Workspace and scheduling targets.`},identity:sr,overview:{title:`Overview`,subtitle:`Workspace paths and identity metadata.`,selectedSkills:`{count} selected`,allSkills:`all skills`,unsavedConfig:`You have unsaved config changes.`,modelSelection:`Model Selection`,primaryModel:`Primary model`,primaryModelDefault:`Primary model (default)`,notSet:`Not set`,inheritDefault:`Inherit default`,inheritDefaultModel:`Inherit default ({model})`,fallbacks:`Fallbacks`,addFallback:`Add fallback…`},toolCatalog:{groups:{files:`Files`,runtime:`Runtime`,web:`Web`,memory:`Memory`,sessions:`Sessions`,ui:`UI`,messaging:`Messaging`,automation:`Automation`,nodes:`Nodes`,agents:`Agents`,media:`Media`},descriptions:{read:`Read file contents`,write:`Create or overwrite files`,edit:`Make precise edits`,applyPatch:`Patch files (OpenAI)`,exec:`Run shell commands`,process:`Manage background processes`,webSearch:`Search the web`,webFetch:`Fetch web content`,memorySearch:`Semantic search`,memoryGet:`Read memory files`,sessionsList:`List sessions`,sessionsHistory:`Session history`,sessionsSend:`Send to session`,sessionsSpawn:`Spawn sub-agent`,sessionStatus:`Session status`,browser:`Control web browser`,canvas:`Control canvases`,message:`Send messages`,cron:`Schedule tasks`,gateway:`Gateway control`,nodes:`Nodes + devices`,agentsList:`List agents`,image:`Image understanding`},profiles:{minimal:`Minimal`,coding:`Coding`,messaging:`Messaging`,full:`Full`}},skillsPanel:{title:`Skills`,subtitle:`Per-agent skill allowlist and workspace skills.`,loadConfig:`Load the gateway config to set per-agent skills.`,customAllowlist:`This agent uses a custom skill allowlist.`,inheritedAllowlist:`This agent inherits the default skill allowlist.`,allEnabled:`All skills are enabled. Disabling any skill will create a per-agent allowlist.`,loadAgent:`Load skills for this agent to view workspace-specific entries.`,filter:`Filter`,searchPlaceholder:`Search skills`,shown:`{count} shown`,empty:`No skills found.`,missing:`Missing: {items}`,reason:`Reason: {items}`,updateError:`Could not update the agent skill allowlist.`},channels:{title:`Channels`,subtitle:`Gateway-wide channel status snapshot.`,lastRefresh:`Last refresh: {time}`,loadHint:`Load channels to see live status.`,empty:`No channels found.`,connectedCount:`{connected}/{total} connected`,noAccounts:`no accounts`,configuredCount:`{count} configured`,notConfigured:`not configured`,enabledCount:`{count} enabled`,setupGuide:`Setup guide`},cronPanel:{schedulerTitle:`Scheduler`,schedulerSubtitle:`Gateway automations status.`,jobs:`Jobs`,nextWake:`Next wake`,agentJobsTitle:`Agent Automations`,agentJobsSubtitle:`Scheduled jobs targeting this agent.`,noJobs:`No jobs assigned.`,runNow:`Run Now`,edit:`Edit`,editJob:`Edit {name}`},files:{emptyDraft:`Empty draft`,minRead:`{count} min read`,markdownPreview:`Markdown Preview`,extensionPreview:`{ext} Preview`,preview:`Preview`,expandPreview:`Expand preview`,collapsePreview:`Collapse preview`,editFile:`Edit file`,closePreview:`Close preview`,coreFilesTitle:`Core Files`,coreFilesSubtitle:`Bootstrap persona, identity, and tool guidance.`,workspace:`Workspace`,loadHint:`Load the agent workspace files to edit core instructions.`,empty:`No files found.`,missing:`missing`,selectFile:`Select a file to edit.`,willCreateOnSave:`Will Create on Save`,liveDraftPreview:`Live Draft Preview`,savedPreview:`Saved Preview`,updated:`Updated {time}`,notCreatedYet:`Not Created Yet`,updatedUnknown:`Updated Unknown`,missingHint:`This file is missing. Saving will create it in the agent workspace.`,addFile:`Add file…`,createHint:`This file does not exist yet. Saving will create it in the agent workspace.`,content:`Content`,words:`{count} words`,lines:`lines`,overwrite:`Overwrite`,conflictHint:`This file changed in the agent workspace after this draft was started. Reload to take the workspace version, or Overwrite to replace it with this draft.`}},debug:{lanes:{lane:`Lane`,active:`Active`,queued:`Queued`,blocked:`Blocked`},overlay:{title:`System busyness`,eyebrow:`Live diagnostics`,move:`Move system busyness with arrow keys, or drag`,minimize:`Minimize system busyness`,expand:`Expand system busyness`,lanes:`Lanes`,status:`Event loop / status`,activeRuns:`Active runs`,events:`Events`,cpu:`CPU`,memory:`Memory`,delayP99:`Delay p99`}},configForm:{redactedPlaceholder:`[redacted - click reveal to view]`,sectionHelp:`Help for {section}`,advancedDivider:`Advanced`,advancedSettings:`Advanced settings`,hideValue:`Hide value`,revealValue:`Reveal value`,disableStreamToReveal:`Disable stream mode to reveal value`,storedSecretNotRevealable:`This editor cannot reveal the stored value.`,unsupportedType:`Unsupported type: {type}. Use Raw mode.`,structuredSecretRaw:`Structured value (SecretRef) - use Raw mode to edit`,structuredSecretFile:`Structured value (SecretRef) - edit the config file directly`,defaultValue:`Default: {value}`,select:`Select...`,enumOn:`On`,enumOff:`Off`,enumAuto:`Auto`,nullValue:`null`,jsonValue:`JSON value`,invalidJson:`Enter valid JSON before leaving this field.`,invalidString:`Enter a value that matches this setting's constraints.`,invalidNumber:`Enter a value within the allowed range and step.`,draftRejected:`This setting could not be saved. Your draft is still here.`,unsupportedArray:`Unsupported array schema. Use Raw mode.`,itemCountOne:`{count} item`,itemCount:`{count} items`,add:`Add`,noItems:`No items yet. Click "Add" to create one.`,removeItem:`Remove item`,customEntries:`Custom entries`,addEntry:`Add Entry`,key:`Key`,removeEntry:`Remove entry`,renameRedactedBlocked:`This entry holds a stored secret. Add the new key with its value, then remove this one.`,schemaUnavailable:`Schema unavailable.`,unsupportedSchema:`Unsupported schema. Use Raw.`,unsupportedNode:`Unsupported schema node. Use Raw mode.`,noSettingsMatch:`No settings match "{query}"`,noSettingsInSection:`No settings in this section`,sections:{}},quickSettings:{language:`Language`,model:{title:`Model & Thinking`,model:`Model`,thinking:`Thinking`,fastMode:`Fast Mode`,default:`Default`,modelPolicy:`Model policy`,thinkingLevels:{off:`Off`,low:`Low`,medium:`Medium`,high:`High`},fastModes:{auto:`Auto`,fast:`Fast`,standard:`Standard`,on:`On`,off:`Off`}},channels:{title:`Channels`,connect:`Connect →`},appearance:{lobsterVisits:`Lobster visits`,lobsterVisitsOn:`Drops by occasionally`,lobsterVisitsThemeHidden:`The lobster stays home while the {theme} theme is active. Other visitors still drop by.`,lobsterVisitsOff:`Never visits`,lobsterSounds:`Lobster sounds`,lobsterSoundsOn:`Tiny blubs when touched`,lobsterSoundsOff:`Silent`,lobsterdex:`Lobsterdex`,lobsterdexSeen:`{seen}/{total} visited`,lobsterdexFirstVisited:`{name} · first visited {date}`,lobsterdexCardFirstVisited:`First visited {date}`,lobsterdexCardShinySeen:`✦ Shiny spotted {date}`,lobsterdexCardCopyLink:`Copy link`,lobsterdexOpen:`Open Lobsterdex`},security:{intro:`Review gateway access, tool policy, device authentication, and approvals.`,title:`Security`,gatewayAuth:`Gateway auth`,execPolicy:`Exec policy`,browserEnabled:`Browser enabled`,toolProfile:`Available tools`,toolProfileDefault:`Using core and default plugin tools. Choose Full to include available optional plugin tools.`},system:{gatewayHost:`Gateway Host`,up:`Up {duration}`,cpu:`CPU`,memory:`Memory`,disk:`Disk`,usage:`{label} usage`,loadAverage:`Load average: {values}`,core:`{count} core`,cores:`{count} cores`,load:`load`,used:`used`,freeOf:`{free} free of {total}`,runtime:`Node {version} · PID {pid}`},personal:{browserOnly:`Stored in this browser only.`}},configPage:{},configView:{adminRequired:`Configuration changes require operator.admin access.`,channelSettings:`Channel settings`,categories:{},sections:{},themes:{},textSizes:{},profileSyncedHint:`Saved to your profile — follows you on every device.`,syncedHint:`Synced across your devices through the gateway.`,syncPendingHint:`Waiting to sync through the gateway.`,notifications:{},appearance:{},chatPrefs:{},sidebarPrefs:{},sessionObserver:{},connection:{},root:`<root>`,itemCount:`[{count} item]`,itemCountPlural:`[{count} items]`,form:`Form`,raw:`Raw`,formUnsafeTitle:`Form view can't safely edit some fields`,rawTitle:`Edit raw JSON/JSON5 config`,rawUnavailableTitle:`Raw mode unavailable for this snapshot`,open:`Open`,fileOpenedOnGateway:`Configuration file opened on Gateway host.`,applying:`Applying…`,autoSaveSaving:`Saving…`,autoSaveSaved:`Saved`,autoSavePaused:`Autosave paused after reconnect`,saveNow:`Save`,autoSaveFailed:`Save failed`,autoSaveRejected:`Settings not applied`,autoSaveRejectedHint:`Current settings are unchanged.`,rejectionDetails:`Show reason`,recoveryNotRestored:`Settings could not be restored. Your draft is kept. Check {path} before saving again.`,recoveryUnknown:`Settings restoration could not be confirmed. Your draft is kept. Check {path} before saving again.`,recoveryBackup:`Inspect the recovery backup at {path}.`,recoveryReload:`Discard draft and reload`,discardUnconfirmed:`The last save could not be confirmed. Your draft is kept. Reload configuration before discarding this setting.`,writeGatewayChanged:`This unsettled change belongs to a different Gateway. Reconnect to that Gateway to retry, or discard the draft.`,writeUnconfirmed:`The last configuration change could not be confirmed. Your draft is kept. Retry before changing other settings.`,autoSaveConflict:`Settings changed elsewhere`,retry:`Retry`,applyChanges:`Apply changes`,rawDiscard:`Discard`,reloadBlocked:`Finish saving or discard pending config changes before reloading.`,rawDraftBlocksApply:`Save or discard edits in the Raw editor before applying changes.`,rawDraftPendingFormTitle:`Unsaved raw config edits — save or discard them before switching to Form.`,rawDraftBlocksFormEdit:`Unsaved raw config edits could not be parsed; resolve them in the Raw editor before changing settings.`,rawDraftUnverified:`Cannot verify the raw draft against the saved configuration; reload and retry.`,invalidConfig:`Your configuration is invalid. Some settings may not work as expected.`,dismissWarning:`Don't remind again`,viewPendingChangesRaw:`View pending changes`,rawDiffUnavailable:`Changes detected (JSON diff not available)`,hideEnvValues:`Hide env values`,revealEnvValues:`Reveal env values`,peek:`Peek`,loadingSchema:`Loading schema…`,formUnsafeCount:`1 setting in this config can only be edited as text: {paths}`,formUnsafeCountPlural:`{count} settings in this config can only be edited as text: {paths}`,formUnsafeMore:`+{count} more`,openRawEditor:`Open Raw editor`,rawConfig:`Raw config (JSON/JSON5)`,secretCount:`{count} secret`,secretCountPlural:`{count} secrets`,redacted:`redacted`,visible:`visible`,revealSensitive:`Reveal sensitive values`,hideSensitive:`Hide sensitive values`,toggleRawRedaction:`Toggle raw config redaction`,sensitiveHidden:`{count} sensitive value hidden. Use the reveal button above to edit the raw config.`,sensitiveHiddenPlural:`{count} sensitive values hidden. Use the reveal button above to edit the raw config.`},execApproval:{scope:{standingGrant:`Always allow runs this exact command for "{automation}" without asking, until revoked (revocable)`,standingGrantDays:`Always allow runs this exact command for "{automation}" without asking, for {count} days (revocable)`,messageSend:`Sends to {count} recipient(s) via {target}`,payment:`Pays {amount} {currency} to {target}`,externalPost:`Posts externally to {target}`},expiresIn:`expires in {time}`,expired:`expired`,execApprovalNeeded:`Exec approval needed`,pluginApprovalNeeded:`Plugin approval needed`,requestedBySession:`Approval requested by session {session}`,pending:`{count} pending`,otherPending:`Other pending requests`,reviewRequest:`Review approval from {agent}: {command}`,decisionRequest:`{decision}: {command}`,agentPendingOne:`{count} pending approval`,agentPending:`{count} pending approvals`,allowOnce:`Allow once`,alwaysAllow:`Always allow`,alwaysAllowHere:`Always allow here`,allowAlwaysUnavailable:`Allow Always is unavailable for this command.`,reviewOnly:`Review only. Sign in with approval access to record a decision.`,deny:`Deny`,details:`Details`,labels:{host:`Host`,session:`Session`,cwd:`CWD`,resolved:`Resolved`,security:`Security`,ask:`Ask`}},approvalPage:{brandName:`OpenClaw`,eyebrow:`Operator approval`,loadingTitle:`Loading approval`,loadingDescription:`Checking the current approval state with the Gateway.`,unavailableTitle:`Approval unavailable`,unavailableDescription:`This approval could not be found or this device is not authorized to review it.`,connectionErrorTitle:`Connection interrupted`,connectionErrorDescription:`OpenClaw cannot confirm or record a decision while disconnected. Reconnect to check the current status.`,retry:`Retry`,execTitle:`Command approval`,pending:`Waiting for your decision`,pendingDescription:`Review the request carefully. The first answer from any surface wins.`,approvedHere:`Approved here`,deniedHere:`Denied here`,resolvedElsewhere:`Resolved elsewhere`,resolvedElsewhereDescription:`Another surface or an earlier attempt recorded the decision first.`,approved:`Approved`,denied:`Denied`,expired:`Expired`,cancelled:`Cancelled`,allowedOnceDescription:`The operation was approved for this request only.`,allowedAlwaysDescription:`The operation was approved with the always-allow decision.`,deniedDescription:`The operation was denied and will not continue.`,expiredDescription:`No decision arrived before the deadline, so the operation was denied.`,cancelledDescription:`The requesting run ended before a decision could be used.`,summaryLabel:`Summary`,commandLabel:`Command`,requestLabel:`Request details`,nodeLabel:`Node`,expiresLabel:`Expires`,resolvedLabel:`Resolved`,actionsLabel:`Approval decisions`,resolvingDecision:`Recording {decision}…`,safeToClose:`The decision is recorded. You can close this page.`,openControlUi:`Open Control UI`},agentTools:{},skillGroups:{workspace:`Workspace Skills`,builtIn:`Built-in Skills`,installed:`Installed Skills`,extra:`Extra Skills`,other:`Other Skills`},skillsPage:{},skillStatus:{bundled:`bundled`,eligible:`eligible`,blocked:`blocked`,disabled:`disabled`,blockedAllowlist:`blocked by allowlist`,blockedAgentFilter:`blocked by agent filter`},nav:{gateway:{sectionLabel:`Gateway`,menuLabel:`Gateway: {gateway}`,primaryTag:`primary`,setPrimary:`Set as primary…`,openSettings:`Gateway settings…`,connected:`Connected`,unreachable:`Unreachable`,unknown:`Unknown status`},owner:`Owner`,back:`Back`,forward:`Forward`,settings:`Settings`,askOpenClaw:`Ask OpenClaw`,settingsGroupDevice:`This Mac`,settingsGroupThisComputer:`This computer`,settingsGroupThisIPhone:`This iPhone`,settingsGroupThisIPad:`This iPad`,settingsGroupThisDevice:`This device`,settingsGroupConnections:`Connections`,settingsGroupAgents:`Agents & Tools`,settingsGroupSecurity:`Privacy & Security`,settingsGroupSystem:`System`,settingsSearchLabel:`Search settings`,settingsSearchPlaceholder:`Search settings…`,settingsSearchNoResults:`No matching settings.`,settingsSearchClear:`Clear settings search`,settingsLoadFailed:`Settings navigation could not load.`,exitSettings:`Back to app`,expand:`Expand sidebar`,collapse:`Collapse sidebar`,resize:`Resize sidebar`,more:`More`,home:`Home`,pages:`Pages`,customize:`Edit pinned items`,customizeReset:`Reset pinned items`,workboardGroup:`WorkBoard`},terminal:{title:`Terminal`,toggle:`Toggle terminal`,open:`Open terminal`,openWindow:`Open terminal in new window`,hide:`Hide terminal`,resize:`Resize terminal panel`,newSession:`New terminal session`,addFiles:`Add files to terminal`,dropFiles:`Drop files to add them`,uploadProgress:`Uploading {current} of {total}`,uploadFailed:`Upload failed`,retryUpload:`Retry`,insertUploadedPaths:`Insert uploaded paths`,uploadExpired:`Uploaded files may have expired. Cancel this batch and choose the files again.`,closeSession:`Close terminal session`,sessions:`Terminal sessions`,refreshSessions:`Refresh`,loadingSessions:`Loading sessions…`,noSessions:`No live terminal sessions`,currentSession:`current`,sessionAttached:`attached`,attachSession:`Attach session`,attachFailed:`Could not attach terminal session`,startCancelled:`Terminal start was cancelled. Try again.`,connecting:`Connecting to session…`,connectionTimedOut:`Session did not connect within 30 seconds.`,refreshRequired:`Control UI updated. Reload this page to continue the terminal action.`,tabLabel:`shell {n}`,tabHint:`{agent} · {cwd}`,agentOwnedBadge:`agent`,exited:`exited`,exitedCode:`exited ({code})`,exitedSignal:`exited (signal {signal})`,detached:`detached`,dockBottom:`Dock to bottom`,dockRight:`Dock to right`,dockMain:`Fill main content area`,dockMode:`Terminal panel position`,unavailable:`The terminal is not available on this gateway.`,unusableSession:`The Gateway returned an unusable terminal session (missing {field}). The Gateway is likely older than this Control UI — update it, then retry.`,uploadTooLarge:`File exceeds the 16 MiB terminal upload limit: {file}`,uploadUnsafeCmdPath:`Cannot safely insert an uploaded path containing % or ! into cmd.exe`,uploadUnsupportedShell:`Cannot safely insert an uploaded path into unsupported shell: {shell}`,uploadInvalidNativePath:`Cannot safely insert the uploaded native file path`},browser:{nativeTab:`App tab`,remoteTab:`Agent browser tab`,stop:`Stop loading`,profile:`Browser profile: {profile}`,title:`Browser`,open:`Open`,openPanel:`Open browser panel`,moreActions:`More actions`,copyUrl:`Copy URL`,openNewTab:`Open in new tab`,openWithinOpenClaw:`Open in OpenClaw`,toggle:`Toggle browser panel`,close:`Close browser panel`,resize:`Resize browser panel`,newTab:`New tab`,closeTab:`Close tab`,untitledTab:`New tab`,back:`Back`,forward:`Forward`,reload:`Reload`,openExternal:`Open in your browser`,urlPlaceholder:`Enter a URL and press Enter`,dockBottom:`Dock to bottom`,dockRight:`Dock to right`,annotate:`Annotate page`,inspect:`Inspect element`,annotateSend:`Send to chat`,annotateUndo:`Undo`,annotateClear:`Clear`,annotateDone:`Exit annotate mode`,annotateHint:`Draw on the page, then send the markup to your chat.`,inspectName:`Name`,inspectRole:`Role`,inspectFocusable:`Focusable`,loading:`Loading page…`,notRunning:`The gateway browser is not running.`,start:`Start browser`,errors:{},annotatePrompt:{}},desktop:{title:`Desktop`,openWindow:`Open desktop in new window`,unavailable:`Desktop viewing is unavailable for this connection.`,toggle:`Toggle desktop panel`,reconnect:`Reconnect`,connecting:`Connecting to desktop…`},systems:{},routeTitles:{modelProviders:`Models`,notifications:`Notifications`,advanced:`Advanced`},tabs:{device:`This Mac`,devicePermissions:`Permissions`,agentsHome:`Agents`,agents:`Agents`,activity:`Activity`,meetings:`Meetings`,apps:`Apps`,portals:`Portals`,approvals:`Approvals`,workboard:`Workboard`,worktrees:`Worktrees`,channels:`Channels`,connection:`Gateway`,sessions:`Sessions`,systems:`Systems`,usage:`Usage`,cron:`Automations`,skills:`Skills`,plugins:`Plugins`,skillWorkshop:`Skill workshop`,devices:`Devices`,cloudWorkers:`Cloud workers`,chat:`Chat`,dashboards:`Dashboards`,custodian:`OpenClaw`,profile:`Profile`,communications:`Communications`,appearance:`Appearance`,lobsterdex:`Lobsterdex`,automation:`Automation`,mcp:`MCP`,memory:`Memory`,search:`Search`,talk:`Talk`,infrastructure:`Infrastructure`,labs:`Labs`,updates:`Updates`,about:`About`,aiAgents:`Agent Defaults`,modelSetup:`Model Setup`,memoryImport:`Import Memory`,security:`Privacy & Security`,secrets:`Secrets`,debug:`Debug`,logs:`Logs`,plugin:`Plugin`},subtitles:{device:`App settings and capabilities on this Mac.`,devicePermissions:`Manage macOS access, location, and computer presence.`,agentsHome:`Who is on your team and what they are doing`,agents:`Workspaces, tools, identities.`,activity:`Recent sessions across people using this gateway.`,meetings:`Meeting notes and transcripts across this gateway.`,apps:`Companion apps for phone, watch, desktop, and browser.`,portals:`Live previews from agent-run applications.`,approvals:`Recent exec, plugin, and system-agent approvals.`,workboard:`Agent work queue and session handoff.`,worktrees:`Isolated agent task checkouts and recovery snapshots.`,channels:`Channels and settings.`,connection:`Gateway endpoint, credentials, and handshake status.`,sessions:`Active sessions and defaults.`,systems:`Machines and desktops.`,usage:`API usage and costs.`,cron:`Scheduled tasks and recurring agent runs.`,skills:`Manage your agent skills`,plugins:`Extend your Claw with tools`,skillWorkshop:`The skills your agent uses now, suggestions waiting for review, and past decisions.`,devices:`Paired devices, pairing approvals, and exec bindings.`,cloudWorkers:`Profiles and machine sizes for cloud sessions.`,chat:`Gateway chat for quick interventions.`,dashboards:`Tasks with saved dashboards.`,custodian:`System setup and care.`,config:`Legacy settings route; opens Appearance.`,profile:`Your display name, avatar, and identity on this gateway.`,communications:`Messages, text-to-speech, and meeting capture settings.`,appearance:`Theme and UI settings.`,lobsterdex:`Every lobster palette that has visited this browser.`,automation:`Commands, hooks, automations, and plugins.`,mcp:`MCP servers, auth, tools, and diagnostics.`,memory:`Memory engine, search, and dreaming.`,search:`Choose how agents search the web and check provider health.`,talk:`Realtime voice: provider, model, and speaker voice.`,infrastructure:`Gateway, browser, node host, discovery, and ACP settings.`,labs:`Experimental agent and tool capabilities.`,updates:`Release channel, automatic updates, and current update status.`,about:`Control UI and connected Gateway build identity.`,aiAgents:`Global agent defaults: skills, tools, and session.`,modelSetup:`Connect a verified AI model`,modelProviders:`Default models, behavior, provider access, usage, and cost.`,memoryImport:`Bring Codex and Claude Code memory into an agent workspace.`,notifications:`Browser push notifications from your gateway.`,security:`Gateway auth, exec policy, tool profile, and approvals.`,advanced:`Every remaining config section, plus the raw file editor.`,debug:`Snapshots, events, RPC.`,logs:`Live gateway logs.`,plugin:`Plugin-provided panel.`},meetingCapture:{title:`Meeting capture`,description:`Choose which sources can save meeting notes on this Gateway.`,sources:`Auto-start sources`},cloudWorkersPage:{},portalsPage:{},modelSetup:{discovery:{},missingAuth:`No provider credential is configured for this model. Set it up in Model Setup.`,commandHint:`Try /models or /help.`,heading:`Connect a verified AI model`,intro:`OpenClaw discovers AI access on this Gateway. Choose a provider to begin; nothing is selected, tested, installed, or saved automatically.`,required:{title:`No AI provider configured`,body:`Connect a provider and choose a model to send messages.`,action:`Connect an AI provider`},loading:`Checking this Gateway for available AI access…`,testing:`Testing — asking the selected model for a quick reply…`,retry:`Retry`,checkAgain:`Check again`,recovery:{unknown:`The previous activation is unresolved. Check again refreshes the current setup without repeating it. If a model is available, you can verify and use it.`,wait:`The previous setup attempt may still be running. Check again can refresh its result. If no model appears, check again after {time} to choose a provider.`,useCurrent:`Verify & use selected model`},verify:{},access:{adminRequired:`Model setup requires operator.admin access.`,gatewayTooOld:`The Gateway is running an older OpenClaw version`},candidates:{title:`Found on this Gateway`,recommended:`Recommended`,credentialsReady:`Credentials ready`,signInNeeded:`Sign-in needed`,detected:`Detected`,testAndUse:`Test & use`,retry:`Retry test`,testingButton:`Testing…`},nativeDiscovery:{},nativeModels:{title:`Use an installed agent`,body:`Choose a model from an installed agent. It keeps its own sign-in and tools. Use saves your choice without running the setup test.`,choose:`Choose a model`,use:`Use`,saving:`Saving…`,loading:`Checking installed agents…`,empty:`No models are available from installed agents. Check the installed app, then open the picker again.`,unconfirmed:`Availability not confirmed`},empty:{title:`Recommended installs`,intro:`Install an assistant or local model service, then check again.`},signIn:{title:`Set up and verify a model`,description:`Setup requests a model reply. To save an account first, choose Connect provider.`,verify:`Set up & verify`,install:`Review & install`,custom:`Set up endpoint`,more:`More sign-in options`},prepare:{title:`Run a model locally`,intro:`Use a local model service or prepare a private GGUF model on this Gateway.`,ollamaButton:`Check & set up`,ollamaLabel:`Ollama`,ollamaHint:`Connect to the Ollama service on this Gateway and prepare a tools-capable model`,llamaCppLabel:`llama.cpp`,providerNotReady:`{provider} did not expose a usable local model. Review the setup result, then retry.`},manual:{title:`Connect with an API key or token`,provider:`Provider and access method`,selectProvider:`Select a provider`,selectProviderHint:`Choose where this credential comes from`,accessValue:`API key or token`,accessValueFor:`{provider} API key or token`,accessValuePlaceholder:`Paste an API key or token`,connectAndVerify:`Connect & verify`,verifyHint:`OpenClaw verifies a real model reply before marking the connection ready.`,required:`Choose a provider and enter an API key or token.`},success:{},utility:{},failure:{auth:`Authentication failed`,rateLimit:`Rate limited`,billing:`Billing problem`,timeout:`Timed out`,format:`Invalid response`,unavailable:`Unavailable`,unknown:`Connection failed`},failureGuidance:{auth:`Review the provider credential or sign-in, then retry.`,rateLimit:`Wait for the provider limit to reset, then retry.`,billing:`Restore provider billing or quota, then retry.`,timeout:`The model did not finish the setup test in time. Warm it or choose a faster model, then retry.`,unavailable:`Make sure the provider service is running and reachable, then retry.`,format:`Check that the endpoint exposes a compatible chat model, then retry.`,unknown:`Review the connection details, then retry.`},errors:{requestFailed:`Model setup request failed.`,activationFailed:`The model could not be activated.`},wizard:{dialogLabel:`Provider sign-in`,prepareDialogLabel:`Local model setup`,title:`Sign in with a provider`,connected:`Account connected. Choose a model when you want to test a reply.`,failed:`Could not finish. Open Details to see what to do next.`,details:`Details`,prepareTitle:`Set up a local model`,starting:`Starting provider sign-in…`,prepareStarting:`Starting local model setup…`,checking:`Checking your model setup…`,working:`Working…`,continue:`Continue`,submit:`Submit`,openSignIn:`Open sign-in`,copy:`Copy`,copyCode:`Copy code`,copyLink:`Copy link`,manualEntry:`Use manual entry`,browserInstructions:`Complete sign-in in your browser, then return here.`,waiting:`Waiting for sign-in…`,deviceCodeWarning:`Continue only if you started this sign-in yourself. If a website or another person gave you this code, cancel.`,expires:`Expires in {count} minutes`,cancelled:`Provider sign-in was cancelled.`,finishingStep:`Setup is finishing the current step. You can cancel when it finishes.`,cancelFailed:`Could not confirm cancellation: {error}`,sessionExpired:`The Gateway no longer has this setup session. It may already have finished. Close this dialog and choose Check again to review the current setup.`,notComplete:`Sign-in finished, but model setup is not complete yet.`}},memoryImport:{},onboarding:{memoryImport:{title:`Bring your assistant memory with you`,body:`OpenClaw found memory from other coding assistants. Import it into your agent workspace?`,plannedCount:`{count} ready to import`,alreadyImported:`Already imported: {count}`,sourceUnavailable:`Source path unavailable`,import:`Import`,skip:`Skip`,reviewDetails:`Review details`,importingProvider:`Importing…`,providerResult:`Migrated {migrated}, skipped {skipped}`,providerIncomplete:`Migrated {migrated}, skipped {skipped}, {errors} failed, {conflicts} conflicts`,providerError:`Import failed: {error}`,connectionChanged:`Skipped: the Gateway connection changed during the import`,unknownError:`Request failed`,doneTitle:`Memory import finished`,doneBody:`Migrated {migrated}, skipped {skipped}. You can continue setting up OpenClaw.`}},assistantPanel:{title:`Assistant sidebar`,home:`Home`,toggle:`Talk to your Home agent`,openHome:`Open Home full page`,close:`Close assistant sidebar`,resize:`Resize assistant sidebar`,dockBottom:`Dock assistant sidebar at bottom`,dockRight:`Dock assistant sidebar at right`,context:`Working on: {context}`,contextOff:`Work context off`,removeContext:`Remove work context`,includeContext:`Include work context`,selection:`Selected text`,attachSelection:`Attach selected text`,removeSelection:`Remove selected text`},custodian:{title:`OpenClaw`,subtitleCaretaker:`System setup and care.`,exitSetup:`Exit setup`,newAgent:`New agent`,hatchDraft:`Wake up, my friend!`,placeholder:`Message OpenClaw…`,sensitivePlaceholder:`Enter sensitive value…`,sensitiveReply:`Sensitive reply sent`,cancel:`Cancel`,send:`Send`,thinking:`OpenClaw is thinking`,earlier:`Earlier`,requestFailed:`OpenClaw could not reply. Try again.`,connectionChanged:`The Gateway connection changed. Retry to continue this setup.`,sessionRestarted:`{error} OpenClaw started a fresh session; earlier messages remain for context.`,unsupportedGateway:`Update the Gateway to continue setup with OpenClaw.`,panel:{title:`OpenClaw`,toggle:`Toggle Ask OpenClaw`,close:`Close Ask OpenClaw`,resize:`Resize Ask OpenClaw`,dockBottom:`Dock Ask OpenClaw at bottom`,dockRight:`Dock Ask OpenClaw at right`},history:{button:`History`,title:`Recent changes`,description:`What changed on this system, newest first.`,loading:`Loading recent changes…`,empty:`No recorded changes yet.`,requestFailed:`OpenClaw could not load change history.`,loadMore:`Load more`,loadingMore:`Loading more…`,changedPaths:`Changed paths ({count})`,invalidEdit:`This manual edit did not pass configuration validation.`,opaqueChange:`Formatting or comments changed without visible configuration path changes.`,sources:{systemAgent:`system-agent`,doctor:`doctor`,settings:`settings`,cli:`CLI`,pluginInstall:`plugin install`,manualEdit:`manual edit`,unknown:`unknown`}},nudge:{configReload:`Configuration reload stopped — ask me what happened`,channelAuth:`{channel} authentication degraded — ask me what happened`,channelDisconnected:`{channel} just disconnected — ask me what happened`,channelDegraded:`{channel} is degraded — ask me what happened`,channelFallback:`A channel`,dismiss:`Dismiss this update`,channelSetupTitle:`Reach OpenClaw outside this app`,channelSetupBody:`The web app already works. Add a channel only if you want to message OpenClaw from another service.`,channelSetupAction:`Set up a channel`,channelSetupDismiss:`Keep using the web app`,channelStatusErrorTitle:`Channel status is unavailable`,channelStatusErrorBody:`Retry the check, or keep using the web app without a channel.`}},mcpServers:{},mcpPage:{},talkPage:{intro:`Configure realtime voice providers, models, and speaker voices.`,voiceSection:{title:`Realtime voice`,description:`Continuous speech conversations with your agent. The pickers below write talk.realtime settings; the full form further down covers everything else.`},status:{title:`Status`,ready:`Ready`,notReady:`Not configured`,unavailable:`Unavailable`,unavailableHint:`Connect to the Gateway to check realtime voice readiness.`,activeProvider:`Active provider: {provider}`,noProvider:`No realtime voice provider is configured yet.`},provider:{title:`Provider`,description:`Auto picks the first provider with working credentials.`,auto:`Auto`},model:{title:`Model`,description:`Realtime voice model for browser Talk sessions.`,default:`Provider default`,defaultNamed:`Default ({model})`},voice:{title:`Speaker voice`,description:`Voice used for spoken replies. GPT-Live locks the voice once a call starts.`,default:`Provider default`,unsupported:`unsupported`,unsupportedDefault:`This saved voice is unavailable for the selected route. Provider default will be used.`},gptLive:{title:`GPT-Live`,hint:`Released browser/Gateway-owned WebRTC tries OAuth first and falls back to a Platform API key. Direct backend sockets and unlisted or private routes require Platform API-key access. Delegated work can be steered while running and requires exact spoken confirmation for high-impact actions.`,ready:`Ready`}},memoryPage:{},sessionsPage:{hubTablistLabel:`Session sections`},pluginsPage:{},labsPage:{intro:`Labs contains experimental capabilities that may change, break, or disappear between releases.`,sectionTitle:`Experimental features`,sectionDescription:`Changes save without restarting the Gateway. Code Mode and Tool Search apply to future agent runs.`,documentation:`Documentation`,restartRequired:`Gateway restart required.`,saveErrorTitle:`Could not update feature`,saveFailed:`The feature setting could not be saved.`,decisionAssistance:{},codeMode:{},swarm:{title:`Swarm`,groupTitle:`Parallel tasks`,defaultPhase:`Unphased`,progress:`{complete} of {total}`,active:`{running} running · {queued} queued · {failed} failed or stopped`,finished:`{done} completed · {failed} failed or stopped`,completed:`{done} completed`,failedOrStopped:`Failed or stopped`,childOutcome:`Child runs finished. Check the conversation for the final response.`,childOutcomeProcessing:`Child runs finished. The parent is processing their results.`,details:`Child details`,detailsUnavailable:`Child details are unavailable. Counts include all accepted workers.`,otherGroups:`{count} more active groups`},toolSearch:{},customPluginUi:{},hostDesktop:{},workerDesktop:{}},aboutPage:{productName:`OpenClaw`,tagline:`Your personal AI assistant, running on your own devices.`,waveHello:`Wave hello to Clawd`,linksLabel:`Community and resources`,linkWebsite:`Website`,linkDocs:`Docs`,linkGitHub:`GitHub`,linkDiscord:`Discord`,linkX:`X (Twitter)`,linkChangelog:`Changelog`,license:`© 2026 OpenClaw Foundation — MIT License.`,artifactTitle:`Control UI`,artifactSubtitle:`Identity embedded when this browser artifact was built.`,artifactDetails:`Control UI build details`,version:`Version`,commit:`Commit`,branch:`Branch`,built:`Built`,unavailable:`Unavailable`,copyCommit:`Copy full commit hash`,copyingCommit:`Copying commit hash`,copiedCommit:`Commit hash copied`,copyCommitFailed:`Could not copy commit hash`,gateway:`Gateway`,gatewayVersion:`Connected Gateway version`,gatewayVersionHint:`Reported by the active Gateway connection; separate from this Control UI build.`},appsPage:{},presence:{sharedOwner:{name:`Shared owner`,hint:`Connected with the Gateway token or over a tunnel, not a personal sign-in.`},rosterTitle:`Online`,active:`Active`,onlineActive:`Online · Active`,onlineIdle:`Online · Idle`,idle:`Idle`,offline:`Offline`,sessions:{openCount:`{count}\xA0open`,runningCount:`{count}\xA0running`,openHint:`Owned, unarchived conversations you can access across agents. Excludes hidden subagents, automation, and system sessions.`,runningHint:`Open sessions actively executing an agent turn. Queued work is not running.`,counts:`{open} open sessions, {running} running`,unavailable:`Session counts unavailable`,retry:`Counts may be out of date. Retry`},card:{details:`Details for {name}`,loadFailed:`Could not open details. Try again, or open this person’s Activity page.`,ariaLabel:`Activity for {name}`,person:`Person`,onlineFor:`Online for`,where:`Where`,reportedTimeZone:`Reported time zone: {zone}`,lastActivity:`Last interaction`,notObserved:`Activity unavailable`,viewingNow:`Viewing now`,recentSessions:`Recent sessions`,noVisibleSessions:`No visible sessions being viewed.`,noRecentSessions:`No recent visible sessions.`,sessionUpdated:`Session updated`,ago:`ago`,viewActivity:`View activity`,web:`Web`,cli:`Command line`,terminal:`Terminal`,app:`App`}},activityFeed:{partialHistory:`People and counts describe visible recorded session associations; retained history and this people list may be incomplete.`,sessionsMode:`Sessions`,searchPlaceholder:`Search session titles…`,time:`Time`,time24h:`Last 24 hours`,time7d:`Last 7 days`,time30d:`Last 30 days`,timeAll:`All time`,everyone:`Everyone`,peopleButtonLabel:`Filter sessions by person`,lastActive:`· {time}`,unresolvedIdentities:`Unresolved identities`,clearPersonFilter:`Clear person filter`,showing:`Showing {shown} of {total}`,today:`Today`,yesterday:`Yesterday`,unknownDate:`Unknown date`,noSessions:`No sessions match these filters.`,automationGroup:`{count} automation sessions`,automation:`Automation`,inspectRun:`Inspect run`,recap:`Session recap`,recapMissing:`No recap yet`,recapUpdating:`Updating recap…`,recapStale:`New activity since this recap`,recapUnavailable:`Recap unavailable`,recapRefreshFailed:`Couldn’t refresh recap`,recapRetry:`Retry recap`,recapUpdated:`Recap updated {time}`,backToSessions:`Back to sessions`,channelLabel:`Channel: {value}`,agentLabel:`Agent: {value}`,online:`Online`,idle:`Idle`,offline:`Offline`,unknownDevice:`Unknown device`,lastInput:`Last input {time} ago`,viewingNow:`Viewing now`,notViewing:`Not viewing a session right now.`,notFoundTitle:`Person not found`,notFoundDescription:`No online presence or visible session association matches this identity.`},githubPublication:{personal:`My GitHub`,system:`System`,agent:`Agent override`,publishAs:`Publish as @{account}`,account:`Publication account`,choose:`Choose an account`,newAction:`Choose a new publication`,capacity:`Too many publications are awaiting review. Finish an existing publication, then select "{newAction}" to make room. Existing retries remain available.`,confirm:`Confirm original publication`,check:`Check publication`,refresh:`Refresh publication`,unknown:`The outcome is unknown. Retry keeps the original account and request; it does not switch accounts.`,target:`Pull request: {repository} → {base}`,pushTarget:`Push: {repository} · {branch}`,snapshot:`Original accepted snapshot`,head:`HEAD`,index:`Index tree`,workspace:`Workspace tree`,dispatched:`GitHub {kind} was dispatched; its remote outcome may still be unknown.`,observed:`GitHub {kind} was observed. Disconnecting does not undo this effect.`,effectLink:`View GitHub effect`,effectPush:`push`,effectPullRequest:`pull request`,personalWorkspace:`My GitHub requires an idle, reconciled local workspace. Wait for work to finish and reclaim the workspace. System and agent publication keep their existing shared flow.`,scopeHelp:`My GitHub applies only to this explicit Publish PR action. Agent commands, previews, and cloud workers keep the shared account.`,unidentified:`Sign in with a personal profile to use My GitHub.`,connectHelp:`Connect or repair My GitHub in Settings → Profile → GitHub connections.`},githubConnections:{title:`GitHub connections`,description:`Check the accounts used for agent commands, dashboard data, and publishing. These connections are separate from your GitHub sign-in and co-author credit.`,mine:`My GitHub`,system:`System GitHub`,personalDescription:`Your account for explicitly selected Publish PR actions.`,systemDescription:`Default account for agent commands, authenticated dashboards, and publishing.`,unboundDescription:`Sign in with a personal Gateway profile to connect My GitHub. Administrators can still manage System GitHub.`,signInRequired:`Personal sign-in required`,connected:`Connected`,disconnected:`Not connected`,notLoaded:`Status not loaded`,checking:`Checking connection…`,statusUnavailable:`Connection status unavailable`,manage:`Manage connections`,reconnectRequired:`Reconnect required`,connectMine:`Connect My GitHub`,changeMine:`Change My GitHub`,changeSystem:`Change System GitHub`,disconnectMine:`Disconnect My GitHub`,disconnectDescription:`Stops unfinished personal publication. Published work stays intact; revoke the app grant separately in GitHub settings.`,adminManaged:`Admin managed`,purpose:`Connect GitHub`,forMe:`For me`,forSystem:`For the system`,purposeHint:`Only the selected connection changes.`,continue:`Continue with GitHub`,usage:`Where these accounts are used`,usageDescription:`My GitHub is used only when you explicitly select it for Gateway-brokered Publish PR on an idle, reconciled local workspace. Publication still needs write access to the session. Agent git/gh, model actions, previews, and workers keep the shared account. Finish and reclaim remote work before personal publication. Connecting My GitHub changes no defaults.`,details:`Connection details`,agentTitle:`GitHub account`,agentFor:`GitHub for {agent}`,agentDescription:`Used for this agent's commands and authenticated dashboard data. Verified confirms the account; repository access is checked when data is requested.`,viewAgent:`View agent account`,agentOverride:`Agent override`,advancedOverride:`Advanced: agent GitHub override`,manageCommon:`Manage connections in Profile`},profilePage:{personalInstructions:{title:`Personal instructions`,description:`Tell this agent about you and how you like to work. This edits only your personal USER.md, not the shared workspace file.`},offline:`Connect to the gateway to meet your agent.`,access:{},usageStatistics:`Usage statistics`,usageStatisticsDescription:`View activity, costs, and usage trends.`,identity:{title:`Identity`,menuLabel:`Identity menu`,menuButtonLabel:`Identity and app menu for {name}`,description:`Your profile on this gateway.`,avatar:`Avatar`,chooseAvatar:`Choose image`,displayName:`Display name`,linkedEmails:`Linked emails`},modelAccounts:{}},skillWorkshop:{},activity:{status:{done:`Done`}},gatewayLogs:{title:`Logs`,subtitle:`Gateway file logs (JSONL).`,exportButton:`Export {label}`,exportLabels:{filtered:`filtered`,visible:`visible`},filter:`Filter`,searchPlaceholder:`Search logs`,autoFollow:`Auto-follow`,file:`File: {file}`,truncated:`Log output truncated; showing latest chunk.`,empty:`No log entries.`},pluginTabs:{unavailableTitle:`Plugin panel unavailable`,unavailableSubtitle:`The plugin that owns this tab is not active on the connected gateway, or it did not provide a panel.`},logbook:{nav:{previousDay:`Previous day`,nextDay:`Next day`,today:`Today`},status:{capturing:`Capturing every {seconds}s`,paused:`Capture paused`,disabled:`Capture off`,nodeHelp:`Device providing screen snapshots.`,pending:`{count} frames queued`,pendingHelp:`Snapshots waiting for the next analysis batch.`,analyzing:`Analyzing…`,captureError:`Capture error`,batchError:`Analysis error`,modelMissing:`No vision model`,modelMissingHelp:`Set plugins.entries.logbook.config.visionModel or configure tools.media models.`},actions:{pause:`Pause`,resume:`Resume`,analyzeNow:`Analyze now`},empty:{title:`Nothing on the timeline yet.`,subtitle:`Logbook is collecting snapshots; cards appear after the first analysis batch completes.`},card:{keyframeAlt:`Screen snapshot from this activity`,distractions:`Distractions`},stats:{title:`Day at a glance`,focus:`{pct}% focus`,tracked:`{duration} tracked`},standup:{title:`Daily standup`,generate:`Generate`,refresh:`Regenerate`,empty:`Turn today's timeline into a ready-to-paste standup update.`},ask:{title:`Ask your day`,placeholder:`When did I review the gateway PR?`,submit:`Ask`}},board:{label:`Session dashboard`,tabsLabel:`Dashboard tabs`,moreTabs:`More dashboard tabs`,gridLabel:`Dashboard widgets`,emptyTitle:`A clear board, ready for work`,emptyHint:`Your agent can pin widgets here — try asking for a status card.`,actionFailed:`The dashboard change could not be saved.`,actionInProgress:`Another dashboard change is still being saved.`,announcement:{moved:`Moved {title}.`,resized:`Resized {title}.`,removed:`Removed {title}.`,granted:`Widget access allowed.`,rejected:`Widget access rejected.`},widget:{cellLabel:`Dashboard widget: {title}. Use arrow keys to navigate. Hold Alt and press an arrow key to move it.`,moveHandle:`Move {title}`,resizeHandle:`Resize {title}`,menuLabel:`Widget options`,moveToTab:`Move to tab`,noOtherTabs:`No other tabs`,resize:`Resize`,autoHeight:`Auto height`,remove:`Delete`,needsApproval:`Needs approval`,needsApprovalDetail:`This widget requested additional access.`,networkAccess:`Network origins`,hostTools:`Host tools and data`,activeCapabilities:`Active widget capabilities`,networkCapability:`Network: {capability}`,toolCapability:`Tool: {capability}`,granted:`Granted`,allow:`Allow`,allowFailed:`Could not allow widget access. Try again.`,reject:`Reject`,rejectFailed:`Could not reject widget access. Try again.`,rejected:`Access rejected`,rejectedDetail:`This widget stays inactive until it is removed or replaced.`,appLoading:`Restoring app…`,appStaleTitle:`This pinned app is stale`,appStaleDetail:`Its server, resource, or originating transcript is no longer available.`,retry:`Retry`,frameResolverMissing:`Widget content is unavailable.`,sandboxUnavailable:`Widget sandbox host is unavailable.`,runtimeError:`Script error: {message}`,frameAuthorizationFailed:`Widget authorization failed after repeated refresh attempts.`,sandboxOriginRequired:`Widget authorization failed after repeated refresh attempts. If the gateway runs behind a reverse proxy or tunnel that does not route the widget sandbox port, set mcp.apps.sandboxOrigin to a dedicated public origin routed to the sandbox listener.`,errorTitle:`This widget could not load`,errorDetail:`The problem is contained to this card.`,actionErrorTitle:`Widget change failed`,actionErrorDetail:`The dashboard kept the previous widget state.`,errorShow:`Show details`,kindMcp:`MCP`,kindHtml:`HTML`,kindPlugin:`Plugin`,kindReport:`Report`,kindWebsite:`Website`,kindBrowserDashboard:`Browser dashboard`,pluginLoading:`Loading plugin widget…`,disabledPlugin:`Widget from disabled plugin {pluginId}`}},connection:{browserSignIn:{title:`Sign in to continue loading content`,description:`Your website sign-in has expired. Images and files cannot load until you sign in again. Your conversation and draft will stay open.`,action:`Sign in`,dismiss:`Not now`,returnHint:`Finish signing in in the new tab, then return here. Visible attachments will retry automatically.`,checkAgain:`Check again`,checking:`Checking access…`,stillRequired:`Sign-in is still required. Finish signing in, then check again.`,unavailable:`Could not verify access. Check your connection and try again.`},disconnectedTitle:`Disconnected`,connecting:`Connecting…`,starting:`Starting…`,restoring:`Restoring…`,"reload-required":`Refresh required`,offline:`Disconnected`,reconnecting:`Reconnecting…`,interruptedRetrying:`Connection to the Gateway was interrupted. Reconnecting automatically. (WebSocket {code})`,interrupted:`Connection to the Gateway was interrupted. Check your connection and try again. (WebSocket {code})`,restarting:`Restarting…`,suspending:`Suspending…`,suspended:`Suspended`,retryNow:`Retry now`,actionsUnavailable:`Actions are unavailable while the Gateway reconnects.`,settingsChangesUnavailable:`Changes to settings are disabled while the Gateway is reconnecting.`,sessionMoveRefreshFailed:`The session move was saved, but refreshing the list failed: {error}`,sessionMoveUncertain:`The session move could not be confirmed. Refresh and check its group before retrying. {error}`,sessionOperationCompletedPreviousConnection:`The session operation completed on the previous connection. Check the current session list before continuing.`,sessionOperationCompletedPreviousConnectionWithRefreshError:`The session operation completed on the previous connection, but refreshing the current session list failed: {error}`,scopeUpgrade:{},access:{},switchGateway:{title:`Switch to a different Gateway?`,summary:`This link asks the browser to connect somewhere else.`,current:`Current`,next:`Link`,note:`Anything you enter after switching goes to that host.`,noteToken:`The link also carries a token for it.`,noteScoped:`Your saved credential for {host} stays here and is not sent.`,confirm:`Switch to {host}`,cancel:`Keep current Gateway`},help:{title:`How to connect`,step1:`Start the gateway on your host machine:`,step2:`Get a tokenized dashboard URL:`,step3:`Paste the Gateway URL and secret above, or open that URL directly.`,docsLink:`Read the docs →`,copyCommand:`Copy command`,copyCommandAria:`Copy command: {command}`}},attention:{issues:`Inbox`},standingGrants:{title:`Standing grants`,description:`Allow-always on an automation approval mints a standing grant for that exact command. Revoking one makes the next occurrence ask again.`,historyTitle:`Approval history`,empty:`No standing grants. Answer an automation approval with Always allow to mint one.`,stateUntilRevoked:`Until revoked`,stateExpiresIn:`Expires in {count}d`,stateExpired:`Expired`,stateRevoked:`Revoked`,revoke:`Revoke`,revoking:`Revoking…`,columns:{automation:`Automation`,command:`Command`,uses:`Uses`,state:`State`}},approvalHistory:{description:`Terminal exec, plugin, and system-agent approvals recorded by this gateway, newest first.`,loading:`Loading approval history…`,loadingMore:`Loading…`,loadMore:`Load more`,empty:`No resolved approvals in the rolling 30-day window.`,retention:`Approval history is a rolling 30-day window.`,offline:`Connect to the gateway to load approval history.`,invalidResponse:`The gateway returned an invalid approval history response.`,unknown:`Unknown`,notApplicable:`N/A`,columns:{resolved:`Resolved`,kind:`Kind`,request:`Request`,decision:`Decision`,reason:`Resolution reason`,source:`Source agent / session`,resolver:`Resolver`},kinds:{exec:`Exec`,plugin:`Plugin`,systemAgent:`System agent`},statuses:{allowed:`Allowed`,denied:`Denied`,expired:`Expired`,cancelled:`Cancelled`},decisions:{allowOnce:`Allow once`,allowAlways:`Always allow`,deny:`Deny`},reasons:{user:`User decision`,timeout:`Timed out`,malformedVerdict:`Malformed verdict`,noRoute:`No route`,runAborted:`Run aborted`,gatewayRestart:`Gateway restart`,storageCorrupt:`Storage corrupt`}},commandPalette:{},palette:{placeholder:`Search or start a task…`,categories:{navigation:`Navigation`}},dreaming:{},modelProviders:{},searchPage:{},usage:{common:{emptyValue:`—`,unknown:`unknown`},loading:{title:`Usage Overview`,badge:`Loading`},metrics:{tokens:`Tokens`,cost:`Cost`,session:`session`,sessions:`sessions`},heatmap:{title:`Token Activity`,subtitle:`Daily token intensity for the selected range, up to one year.`,cellTokens:`{tokens} tokens`,less:`Less`,more:`More`},providerUsage:{title:`Provider plans & billing`,subtitle:`Live plan, quota, balance, and budget data reported by configured providers.`,stalled:`Provider usage did not finish loading. Refresh to retry.`,unavailable:`Provider usage is unavailable; the last request failed. Refresh to retry.`,balance:`Balance`,spend:`Usage`,budget:`Budget`,today:`Today`,last7Days:`7 days`,lastDays:`{count} days`,dailyCost:`Daily provider cost`,requests:`{count} requests`,inputTokens:`{count} input`,cacheTokens:`{count} cache`,outputTokens:`{count} output`,topModels:`Top models`,costCategories:`Cost categories`,remaining:`{percent}% left`,resets:`Resets {date}`},presets:{},scope:{},filters:{},query:{},export:{},cacheStatus:{},empty:{},daily:{},costWindows:{},breakdown:{output:`Output`,input:`Input`,cacheWrite:`Cache Write`,cacheRead:`Cache Read`,total:`Total`,tokensByType:`Tokens by Type`,costByType:`Cost by Type`},overview:{title:`Usage Overview`},sessions:{},details:{noUsageData:`No usage data for this session.`,duration:`Duration`,modelMix:`Model Mix`,filtered:`(filtered)`,close:`Close session details`,noTimeline:`No timeline data`,loadFailed:`Could not load {detail}: {error}`,noDataInRange:`No data in range`,usageOverTime:`Usage Over Time`,rangeStart:`Range start`,rangeEnd:`Range end`,reset:`Reset`,perTurn:`Per Turn`,cumulative:`Cumulative`,turnRange:`Turns {start}–{end} of {total}`,assistantOutputTokens:`Assistant output tokens`,userToolInputTokens:`User + tool input tokens`,tokensWrittenToCache:`Tokens written to cache`,tokensReadFromCache:`Tokens read from cache`,noContextData:`No context data`,contextOutOfDate:`These context details are out of date. Refresh usage and try again.`,systemPromptBreakdown:`System Prompt Breakdown`,collapse:`Collapse`,collapseAll:`Collapse All`,expandAll:`Expand All`,baseContextPerMessage:`Base context per message`,system:`System`,systemShort:`Sys`,skills:`Skills`,tools:`Tools`,files:`Files`,ofInput:`of input`,of:`of`,timelineFiltered:`timeline filtered`,loadedIntervalMessages:`Loaded conversation · selected interval`,conversation:`Conversation`,noMessages:`No messages`,tool:`Tool`,toolResult:`Tool result`,hasTools:`Has tools`,searchConversation:`Search conversation`,filterByRole:`Filter by role`,filterByTool:`Filter by tool`,you:`You`,noMessagesMatch:`No messages match the filters.`},mosaic:{}},login:{},chat:{historyRequestTimedOut:`Chat history request timed out. Retry to load the conversation.`,clawhub:{retryStatus:`Status unavailable · Retry`,viewDetails:`View details`},modelAccounts:{section:`Account`,automatic:`Automatic (new-chat default)`,manage:`Manage saved accounts…`},mentions:{menu:`Mention a person`,empty:`No people found`,truncated:`Keep typing to find more people.`,online:`Online`,offline:`Offline`,unavailable:`Could not load people. Try again.`,limit:`You can mention up to 10 people per message.`,selectedLabel:`Will notify`,selected:`Will notify: {names}`,remove:`Remove mention`,restoreFailed:`Mention selection could not be restored. Edit this message and select its recipients again.`,unsupported:`Human mentions are not available in this mode. Remove the selected mentions or send from a normal chat.`},cloudWorkerFailed:`Runner failed: {error}`,errorDetails:`Error details`,checkStatus:`Check status`,details:`Details`,copyError:`Copy error`,providerAccessRemoved:`This reply stopped because the provider was signed out. Sign in again or choose another model.`,providerReview:{},providerPolicy:{bufferingTitle:`Cyber safety review`,bufferingBody:`OpenAI is reviewing this response for cyber safety.`,blockedTitle:`Cyber policy block`,blockedBody:`OpenAI blocked this response under its cyber policy.`,fallbackTitle:`Provider changed the model`,fallbackBody:`OpenAI routed this response to {model}.`,fallbackUnknownBody:`OpenAI routed this response to another model.`,escalatedTitle:`Retried on Daybreak`,escalatedBody:`OpenAI declined this request; retried on {model}.`,unavailableTitle:`Daybreak unavailable`,unavailableBody:`OpenAI declined this request; {model} is not authorized.`},diskSpace:{warningTitle:`Cloud session disk space is low`,criticalTitle:`Cloud session disk space is critically low`,warningBody:`{percent}% used · {free} free. Delete unneeded files or stop the cloud worker before large writes.`,criticalBody:`{percent}% used · {free} free. New writes may fail and stop the agent. Delete unneeded files or stop the cloud worker before large writes.`},workerRuntimeInstall:{transferringTitle:`Updating worker runtime · {transferred} of {total} ({percent}%)`,installingTitle:`Installing worker runtime`,transferringBody:`Transferring the new worker runtime to this device: {transferred} of {total} ({percent}%). The next turn starts when it finishes.`,installingBody:`Installing the new worker runtime on this device.`},sendErrors:{outboxPayloadCopied:`This queued message was copied from another tab. Check the conversation and retry only if it has not arrived.`,outboxPayloadCapacity:`Browser attachment storage is full. Try a smaller batch or send/discard queued messages to free space. No new message was sent; your input is retained.`,outboxPayloadUnavailable:`Browser attachment storage is unavailable. Allow browser storage and close older dashboard tabs before reconnecting and retrying. No new message was sent.`,outboxPayloadMissing:`Queued attachments are missing or unreadable. This may be a stale copy from another tab. Check the conversation, then discard this row and attach the files again if needed. No new message was sent.`,activeLeafChanged:`The session switched branches — review and resend.`},waitingForApproval:`Waiting for approval…`,startupStatus:{retrying:`Retrying… {attempt}/{maxAttempts}`,preparingWorkspace:`Preparing workspace…`,namingWorktree:`Naming worktree…`,creatingWorktree:`Creating worktree…`,runningSetup:`Running setup…`,provisioningEnvironment:`Provisioning environment…`,preparingContext:`Preparing this turn…`,memoryFlushing:`Saving conversation memory…`,startingModel:`Waiting for a response…`,waitingForState:`Temporarily busy—retrying…`},archivedSessionDisabled:`This session is archived. Unarchive it to continue the conversation.`,subagentViewOnly:`View-only subagent`,subagentSessionDisabled:`This is a subagent of {parent}. Continue the conversation in its parent session.`,parentSession:`the parent session`,openParentSession:`Open parent session`,parentSessionUnavailable:`Parent session information is unavailable.`,sessionRoute:{chooseTitle:`Choose a session`,multipleMatches:`More than one session matches {shortId}.`,additionalMatches:`Search results remain. Use a longer id prefix.`,notFoundTitle:`Session not found`,notFoundExplanation:`The session may have been removed, or the link may be incorrect.`,goToMain:`Go to main session`,viewSessions:`View sessions`,catalogShareUnavailable:`This shared session route is unavailable.`,catalogShareInvalid:`This {catalog} share URL is invalid.`},commandResults:{startingNewThread:`Starting new session...`,resettingThread:`Resetting session...`,stoppingCurrentRun:`Stopping current run...`,chatHistoryCleared:`Chat history cleared.`,emptyExport:`There are no messages to export yet.`,exportPathUnsupported:`Control UI exports Markdown through your browser. Run /export without a file path.`,unknownCommand:"Unknown command: `{command}`",options:`Options: {options}.`,sessionUnavailable:`Session capability is unavailable`,help:{availableCommands:`Available Commands`,agentCommand:`agent`,openMenu:"Type `/` to open the command menu."},compaction:{failed:`Compaction failed.`,failedWithReason:`Compaction failed: {reason}`,tokenSummary:` ({before} -> {after} tokens)`,succeeded:`Context compacted successfully`,skipped:`Compaction skipped.`,skippedWithReason:`Compaction skipped: {reason}`},model:{current:`**Current model:** {model}`,available:`**Available:** {models}`,more:` +{count} more`,getFailed:`Failed to get model info: {error}`,set:`Model set to {model}.`,setFailed:`Failed to set model: {error}`},thinking:{current:`Current thinking level: {level}.`,getFailed:`Failed to get thinking level: {error}`,reset:`Thinking level reset to default.`,resetFailed:`Failed to reset thinking level: {error}`,unrecognized:`Unrecognized thinking level "{level}". Valid levels: {options}.`,unsupported:`Unsupported thinking level "{level}" for this model. Valid levels: {options}.`,set:`Thinking level set to {level}.`,setFailed:`Failed to set thinking level: {error}`},verbose:{current:`Current verbose level: {level}.`,getFailed:`Failed to get verbose level: {error}`,unrecognized:`Unrecognized verbose level "{level}". Valid levels: off, on, full.`,set:`Verbose mode set to {level}.`,setFailed:`Failed to set verbose mode: {error}`},fast:{autoValue:`auto ({seconds} sec)`,on:`on`,off:`off`,sourceSession:` (session)`,sourceAgent:` (default: agent)`,sourceModel:` (default: model)`,sourceDefault:` (default)`,current:`Current fast mode: {value}`,options:`on, off, auto ({seconds} sec), default, status`,getFailed:`Failed to get fast mode: {error}`,reset:`Fast mode reset to default.`,resetFailed:`Failed to reset fast mode: {error}`,unrecognized:`Unrecognized fast mode "{mode}". Valid levels: on, off, auto, default, status.`,setAuto:`Fast mode set to auto.`,enabled:`Fast mode enabled.`,disabled:`Fast mode disabled.`,setFailed:`Failed to set fast mode: {error}`},usage:{noActiveThread:`No active session.`,notAvailable:`n/a`,title:`Session Usage`,inputTokens:`Input: {count} tokens`,outputTokens:`Output: {count} tokens`,totalTokens:`Total: {count} tokens`,context:`Context: {percent} of {total}`,promptBudget:`Prompt budget (last run): {percent} of {total}`,model:`Model: {model}`,failed:`Failed to get usage: {error}`},agents:{none:`No agents configured.`,title:`**Agents** ({count})`,default:`default`,runtime:` · runtime {runtime}`,failed:`Failed to list agents: {error}`},steer:{timeout:`The active run ended before the steer message was accepted.`,failed:`Steer failed before it reached the run; try again.`,usage:"Usage: `/steer <message>`",succeeded:`Steered.`,requestFailed:`Failed to steer: {error}`},redirect:{timeout:`The active run ended before the redirect message was accepted.`,failed:`Redirect failed before it reached the run; try again.`,usage:"Usage: `/redirect <message>`",succeeded:`Redirected.`,requestFailed:`Failed to redirect: {error}`}},sessionSharing:{menu:`Session sharing`,current:`Session visibility: {visibility}`,visibility:`Visibility`,shared:`Shared`,readOnly:`Read-only`,suggest:`Suggest`,draft:`Draft`,publishDraft:`Publish draft`,owner:`Owner`,members:`Members`,selected:`Member`,noPeople:`No paired people found.`,readOnlyNotice:`Only the session owner and members can act in this session.`,scopeReadOnlyNotice:`Sending messages is unavailable with your current access.`,publicAccess:`Public access`,publicIndicator:`Public`,worldReadable:`Public — anyone can read without signing in.`,notPublic:`Only signed-in people with access can view this session.`,enablePublicAccess:`Enable public access…`,disablePublicAccess:`Disable public access`,copyPublicLink:`Copy public link`,publicConfirmTitle:`Make this session world-readable?`,publicConfirmMessage:`Anyone with the public link can read existing and future conversation text without signing in. Tools, reasoning, files, and widgets are excluded. Review the conversation for private information before sharing. Disabling access cannot recall copies already downloaded.`,publicConfirmEnable:`Make public`,publicEnabled:`Public access enabled. Copy the public link from Session sharing.`,publicDisabled:`Public access disabled.`,publicUnavailable:`Public access requires a saved, non-incognito session.`},sessionSuggestions:{suggest:`Suggest`,suggestMessage:`Suggest message`,attachmentsUnsupported:`Remove attachments before submitting a text suggestion.`,sendNow:`Send {author}'s suggestion now`,queue:`Queue {author}'s suggestion`,edit:`Edit {author}'s suggestion`,dismiss:`Dismiss {author}'s suggestion`,typing:`{name} is typing…`,typingMany:`{names} are typing…`,typingSeveral:`Several people are typing…`,typingOthers:`{count} others`,otherCollaborators:`Other collaborators`,typingDraftState:`is typing...`,pausedDraftState:`Draft`,state:{pending:`Pending`,accepted:`Accepted`,dismissed:`Dismissed`}},sessionHeader:{renameTooltip:`Rename session`,renameAria:`Rename session {title}`,renameInputAria:`Session title`,renameInputPlaceholder:`Session title`,openParent:`Open parent session {title}`,panels:`Panels`,layout:`Layout`,continueInTerminal:{action:`Continue in terminal…`,title:`Continue in terminal`,description:`Copy this command to continue the current session. It is safe to paste in common terminals and shells.`,authNote:`The command contains no credentials. The terminal authenticates independently, and the session's access controls still apply.`,disconnected:`Connect to the Gateway to continue this session in a terminal.`,queryRouted:`Query-routed Gateway URLs cannot create credential-free continuation commands because authentication and stored device scope are not query-aware. Use a manually authenticated CLI target or a queryless configured Gateway URL.`,unavailable:`This session or Gateway address cannot be continued in a terminal.`},workspaceAria:`Workspace actions for {workspace}`,revealFinder:`Reveal in Finder`,revealFileExplorer:`Reveal in File Explorer`,revealFileManager:`Open in file manager`,copyPath:`Copy path`,copyBranch:`Copy branch name`,copied:`Copied`,incognito:`Incognito session`,branches:`Session branches`,branchSwitchUnavailable:`Branch switch is unavailable while the agent is working.`,untitledBranch:`Untitled branch`,oneMessage:`{count} message`,messages:`{count} messages`,activeBranch:`Active branch`},board:{faceLabel:`Session face`,chatFace:`Chat`,splitFace:`Split`,dashboardFace:`Dashboard`,dockMenu:`Chat dock: {dock}`,dockLeft:`Dock chat left`,dockRight:`Dock chat right`,dockBottom:`Dock chat bottom`,resizeDock:`Resize chat dock`,enterFullscreen:`Enter fullscreen`,exitFullscreen:`Exit fullscreen`,fullscreenUnavailable:`Fullscreen is unavailable in this browser`,fullscreenFailed:`Could not change fullscreen mode: {error}`,workboardCard:`Workboard card: {title}, {status}`,defaultTab:`Main`,mockPlaceholder:`Board view seam · {tabs} tabs · {widgets} widgets`,resetTitle:`Reset conversation?`,resetDescription:`The conversation context resets. Your dashboard stays.`},catalog:{remoteViewOnly:`This session is on a paired device and is view-only.`,unsupportedViewOnly:`This external session source is view-only.`,sessionMenu:`External session actions`,openInOpenClaw:`Open in OpenClaw`,openInTerminal:`Open in terminal`,deleteSession:`Delete`,deleteSessionConfirm:`Delete this external session from OpenClaw? Make sure no other runner is using it. Beamed sessions are deleted permanently. Sessions kept by another tool, such as Codex, are archived there and may be restorable.`,terminalUnavailable:`Terminal opening is unavailable for this session.`},taskSuggestions:{eyebrow:`Suggested task · in {repo}`,startSession:`Start in a new session`,startOptions:`Choose where to start the task`,startWorktree:`Start in a new worktree`,chooseRepository:`Choose repository`,repositoryFolder:`Repository folder`,chooseRepositoryHelp:`Choose a Git repository with a commit. Your task will start in a new worktree; its instructions are preserved.`,startCurrentSession:`Start in this session`,copyPrompt:`Copy prompt`,copyPromptFailed:`Couldn't copy the prompt to the clipboard`,promptCopied:`Copied`,showInstructions:`Show instructions`,hideInstructions:`Hide instructions`,previous:`Previous suggested task`,next:`Next suggested task`,starting:`Starting…`,dismiss:`Dismiss {title}`,started:`Task started`,startUnconfirmed:`Couldn't confirm the task started. Retry checks the same task.`,adminRequired:`Administrator access is required to start suggested tasks.`},pullRequests:{linkLabel:`Pull request #{number}: {title}`,createPr:`Create PR`,createPrLabel:`Create a pull request for {branch}`,publishPr:`Publish PR`,publishing:`Publishing…`,publicationRequested:`Requested`,retryPublication:`Retry publication`,openPublishedPr:`Open PR`,cloudPublicationGuidance:`Start a live agent turn and ask it to publish this cloud workspace after reconciliation.`,dismiss:`Dismiss pull request #{number}`,open:`Open`,draft:`Draft`,merged:`Merged`,closed:`Closed`,checks:`CI`,checksPassing:`CI checks passing`,checksFailing:`CI checks failing`,checksPending:`CI checks running`,ciMonitoring:`CI monitoring`,openChecks:`Open checks on GitHub`,checksPassed:`Passed`,checksFailed:`Failed`,checksRunning:`Running`,checksSkipped:`Skipped`,rateLimited:`GitHub API rate limit reached. Pull request status may be out of date until the limit resets.`,unavailable:`GitHub status could not be refreshed. Showing the last known state; check GitHub for the latest.`},usageRemaining:`Usage Remaining`,view:{menu:`View`,reasoning:`Reasoning`,toolCalls:`Tool calls`,commentary:`Keep commentary`},sendShortcut:`Send shortcut`,sendShortcutEnter:`Enter`,sendShortcutModifierEnter:`⌘/Ctrl+Enter`,followUpMode:`Follow-ups while the agent is working`,followUpModeQueue:`Queue until the run ends`,followUpModeServer:`Server default ({mode})`,followUpModeLoading:`loading…`,followUpModeSteer:`Steer into the active run`,followUpModeOverriding:`Overriding server default ({mode})`,followUpModeReset:`Reset to server default`,catalogOpenTarget:`Open external sessions in`,catalogOpenTargetViewer:`OpenClaw viewer`,catalogOpenTargetTerminal:`Terminal`,catalogOutputTruncated:`[Output truncated]`,onboardingDisabled:`Disabled during setup`,commandPaletteTitle:`Search or jump to… (⌘K)`,openCommandPalette:`Open command palette`,updating:`Updating…`,actions:{copyAsMarkdown:`Copy as markdown`,dismissError:`Dismiss error`,exitFocusMode:`Exit focus mode`,scrollToLatest:`Scroll to latest`},markdown:{truncated:`… truncated ({total} chars, showing first {shown}).`},mermaid:{title:`Mermaid diagram`,options:`Diagram options`,diagram:`Show diagram`,source:`Show source`,copySource:`Copy source`,expand:`Expand diagram`,rendering:`Rendering diagram…`,error:`This diagram could not be rendered. Check the source or simplify the diagram.`,rendererError:`The Mermaid renderer could not load or finish. Reload the dashboard; if this continues, check proxy or authentication rules for its renderer asset URLs.`,imageError:`The diagram image could not be displayed. Reload the dashboard to try again.`},codeBlock:{},workspaceConflict:{titleOne:`1 cloud workspace conflict`,titleMany:`{count} cloud workspace conflicts`,description:`OpenClaw kept your local versions and applied the other cloud changes. Inspect the staged result or take its version for a conflicted path.`,summary:`Local versions kept; inspect or take the cloud version.`,showCommands:`Show commands`,morePaths:`+{count} more paths`,stagedResult:`Staged cloud result`,copyStagedResult:`Copy staged result ref`,inspectCloud:`Inspect the first cloud version`,takeCloud:`Take the first cloud version`,copyInspectCommand:`Copy cloud inspect command`,copyTakeCommand:`Copy take-cloud command`,commandHelp:`Run these in Bash or zsh (Git Bash on Windows). If inspect says the path does not exist, the cloud deleted it; verify and remove the local path manually. If checkout reports a file/directory conflict, move or remove the blocking local path, then retry. If the staged ref is missing, the notice is stale; do not change the local path.`,commandsUnavailable:`This filename contains terminal control characters, so OpenClaw will not build a copyable shell command for it. Inspect the staged ref directly and enter the path manually with care.`,dismiss:`Dismiss workspace conflict notice`,eventSender:`Cloud workspace`,eventTitleOne:`Cloud result applied with 1 conflict`,eventTitleMany:`Cloud result applied with {count} conflicts`,eventDescription:`Local versions were kept for these paths; other cloud changes were applied.`},compaction:{label:`Compacted history`,savedTokens:`saved {count} tokens`},sessionReset:{label:`Session reset`,description:`The earlier conversation was cleared.`},outboxRecoveryTitle:`Saved messages need a destination`,outboxRecoveryFailedTitle:`Saved messages could not be loaded`,outboxRecoveryDescription:`These saved drafts and queued messages need a conversation. Open an empty non-Incognito conversation, then restore an entry for review. Nothing is sent automatically. Attachment drafts may appear separately.`,outboxRecoveryConfirm:`Confirm this destination for the saved entry. Queued messages will remain paused for review and Retry. If delivery was uncertain, check the conversation before retrying.`,outboxRecoveryRestore:`Restore here for review`,outboxRecoveryConflict:`This destination has a newer draft or queue, or changed during confirmation. Open an empty conversation and try again. The saved entry is still available.`,outboxRecoveryStorageFailed:`Your saved data has been kept. Reload to try again. If the problem continues, check that browser storage is available. Do not clear site data while you have messages to recover.`,outboxRecoveryFull:`Recovery is full. Restore saved entries to make room; remaining legacy data is still retained in this browser.`,outboxRecoveryMessages:`Queued messages: {count}`,privateDraftReload:{blocked:`An unsent Incognito draft is keeping this tab open. Review it before refreshing.`,review:`Review private draft`,title:`Unsent Incognito draft`,description:`This draft stays only in this tab. Copy its text or download its attachments before discarding it to refresh. Keeping this tab open leaves the draft unchanged.`,text:`Draft text`,copy:`Copy text`,goal:`This draft includes an unsent goal change.`,reading:`Some attachments are still being read. Keep this tab open, then review the draft again when they finish.`,changed:`The draft changed while you were reviewing it. It has not been discarded; review the current draft before refreshing.`,copyFailed:`The text could not be copied. Select it in the draft field and copy it manually.`,attachmentUnavailable:`This attachment is no longer available to download. Keep the draft open and recover the original file before discarding it.`,download:`Download {name}`,discard:`Discard this draft and refresh`,keep:`Keep in this tab`,unavailable:`The private draft could not be opened. It remains in this tab; try Review private draft again.`},incognitoExpiredTitle:`Incognito session expired`,incognitoExpiredBody:`Incognito sessions last for 24 hours or until the Gateway restarts. Your unsent input stays in this tab.`,newIncognitoSession:`New Incognito session`,restartRecoveryTitle:`This session ended during a restart.`,restartRecoveryDisabled:`Its transcript is safe.`,resumeInNewSession:`Resume in new session`,resumingSession:`Resuming…`,systemNotice:{guardian:{approvedSummary:`Guardian approved {action}.`,deniedLabel:`Guardian denied`,deniedSummary:`{action} · risk: {risk}
{rationale}`,warningLabel:`Guardian warning`,warningFallback:`Guardian stopped the requested action.`,strictReviewRequiredLabel:`Guardian review required`,strictReviewRequiredSummary:`Guardian is reviewing this action before it can continue.`,requestedAction:`Requested action`,unknownRisk:`unknown`,noRationale:`No rationale was provided.`},restartRecovery:{label:`System · restart recovery`,summary:`Turn interrupted by a gateway restart — asked the agent to resume and finish the response.`,interrupted:`The Gateway restarted. Automatic recovery was interrupted before the agent could resume. Send a message to continue.`,cancelled:`The Gateway restarted. Automatic recovery was cancelled before the agent could resume. Send a message to continue.`},gatewayRestarted:{label:`System · gateway restarted`},cliHarnessContext:{label:`System · injected context`},claudeCliTaskNotification:{label:`System · background task`},showContent:`Show content`},progressLabels:{shelling:`Shelling`,scuttling:`Scuttling`,clawing:`Clawing`,pinching:`Pinching`,molting:`Molting`,bubbling:`Bubbling`,tiding:`Tiding`,reefing:`Reefing`,cracking:`Cracking`,sifting:`Sifting`,brining:`Brining`,nautiling:`Nautiling`,krilling:`Krilling`,barnacling:`Barnacling`,lobstering:`Lobstering`,tidepooling:`Tidepooling`,pearling:`Pearling`,snapping:`Snapping`,surfacing:`Surfacing`},turnRecap:{doneIn:`Done in {duration}`,tokens:`{count} output tokens`,tokensOne:`1 output token`},commands:{},skills:{menu:`Skill references`,label:`Skills`,loading:`Loading skills…`},splitView:{chooseConversation:`Choose a conversation`,missingOwner:`Select this pane, then choose Home or a conversation in the sidebar to restore it.`,open:`Open split view`,splitRight:`Split right`,splitDown:`Split down`,closePane:`Close pane`,panePosition:`Column {column}, row {row} ({pane})`,dropSplit:`Split`,dropOpenHere:`Open here`},sidebar:{updateMacAndGateway:`Update Mac app + Gateway`,updateGateway:`Update Gateway`,serverUpdatedTitle:`Server updated`,serverUpdatedRefresh:`Refresh for full capabilities`,threads:`Sessions`,otherSessions:`Other`,groups:`Groups`,coding:`Coding`,catalogViewOptions:`View options`,reorderItem:`Reorder {item}`,moveUp:`Move up`,moveDown:`Move down`,hideFromSidebar:`Hide from sidebar`,sectionHidden:`{section} hidden.`,sectionHiddenRecovery:`Show it again in Settings > Appearance > Sidebar.`,hiddenSessionSections:`Hidden session sections`,showSessionSection:`Show`,catalogGroupByProject:`Project`,catalogGroupByPerson:`Person`,openSessionMenu:`Open session menu`,sortBy:`Sort by`,sortCreated:`Created`,menuFilters:`Filters`,menuDisplay:`Display`,hideEmpty:`Hide empty`,activeFilterCount:`Active filters: {count}`,sortSessions:`Filter & sort`,sessionSources:`Session sources`,showOnlyPerson:`Show only {name}`,showEveryone:`Show everyone`,showAllSessions:`Show all sessions`,noActiveSessionsForFilter:`No active sessions match this filter`,sortUpdated:`Last updated`,sessionMenu:`Actions for {session}`,sessionMenuMany:`Actions for {count} sessions`,toolActivity:`Using {tool}`,catalogDiscoveryHelp:`{error}. Configure automatic session discovery in Settings > Appearance > Session sources.`,catalogPaginationFailed:`Session catalog returned a repeated page cursor`,catalogPageMissingHost:`Session catalog page did not include the requested host`},welcome:{suggestions:{whatCanYouDo:`What can you do?`}},runControls:{newSession:`New session`,newSessionWorktree:`New session in worktree`,exportChat:`Export chat`,queue:`Queue`,queueMessage:`Queue message`,stop:`Stop`,stopWithShortcut:`Stop (Esc)`,stopGenerating:`Stop generating`,send:`Send`,sendMessage:`Send message`},queue:{reviewEdit:`Review edit`,reloadBlocked:`Save or cancel your queued message edit before reloading.`,connectionPending:`Finishing connection recovery. Try sending again when it is ready.`,editSourceChanged:`This queued message changed while you were editing. Your edit is still here. Copy it, cancel the edit, and review the queue before trying again.`,editStorageFailed:`Your edit could not be saved in this browser. Keep this tab open and copy your edit before freeing browser storage, then try again.`,full:`The message queue is full. Wait for a queued message to send or remove one, then try again.`,initialTurnPending:`The initial message is unresolved. Reconnect if needed, then review it before sending another message.`,notSent:`Not sent`,deliveryUnconfirmed:`Delivery unconfirmed`,checkDelivery:`Check delivery`,checkDeliveryHelp:`Delivery is unconfirmed. Check delivery looks for the original message without resending it or starting a worker. Inspect the conversation, or copy the retained prompt if you choose to start a separate attempt.`,retry:`Retry`,retryQueuedMessage:`Retry queued message`,discard:`Discard`,discardPendingMessage:`Discard this local pending copy. This does not cancel a message already received by the Gateway.`,steer:`Steer`,steerQueuedMessage:`Steer queued message`,removeQueuedMessage:`Remove queued message`,reorderQueuedMessage:`Reorder queued message with the arrow keys`,reorderUnavailable:`This message holds its place and cannot be reordered`,editQueuedMessage:`Edit queued message`,moreActions:`More queued message actions`,cancelEdit:`Cancel editing and keep the queued message`,states:{applyingSettings:`Applying chat settings`,blockedByUnconfirmed:`Queue paused. Retry or discard the earlier unconfirmed message in the conversation.`,runningCommand:`Running command`,waitingForReconnect:`Waiting for reconnect`,editing:`Editing`,needsReview:`Delivery uncertain`},imageCount:`Image ({count})`},goals:{},asyncQuestions:{title:`Optional · work can continue`,dismiss:`Dismiss`,dismissing:`Dismissing…`,dismissed:`Dismissed`,reopening:`Restoring answer…`,dismissedReason:`You can still answer this question later.`,dismissedNotice:`Question dismissed. Work continues.`,pendingOne:`{count} unanswered question`,pendingMany:`{count} unanswered questions`,inComposer:`Answer above the message box.`,archived:`No longer pending`,archivedReason:`The conversation moved on. You can still answer this question.`,sendFailed:`Could not send your answer. Your draft is preserved.`,queued:`Answer queued`,sending:`Sending answer…`,sent:`Answer sent`,failed:`Answer not sent`,awaitingConfirmation:`Awaiting delivery confirmation`,retry:`Retry answer`,draftStorageFailed:`This answer is not saved on this device. Keep this page open or copy your answer.`,draftConflict:`This question was edited in another tab. Copy your answer before reloading.`},questions:{other:`Type your own answer here`,multilineHint:`Enter adds a line · {shortcut} to continue`,answer:`Answer`,answerPlaceholder:`{label}`,openLink:`Open link`,externalStepHint:`Complete the step in the new tab, then return here to submit your answer.`,submit:`Submit`,next:`Next`,back:`Back`,skip:`Skip`,skipping:`Skipping…`,skipped:`Skipped`,collapse:`Collapse question`,expand:`Expand question`,eyebrow:`Waiting for your answer`,summaryLabel:`Question outcome`,ownAnswerFor:`Your own answer for {header}`,storeRequestedBy:`Requested by {agent} · {session}`,storeEntry:`Stores {name} as {kind}`,storeReplacement:`Replaces {name} — last updated {updated}`,storeReplacementBy:`Replaces {name} — last updated {updated} by {updatedBy}`,submitting:`Submitting…`,submitFailed:`Could not submit: {error}`,answered:`Answered`,answeredElsewhere:`Answered elsewhere`,unavailable:`Unavailable`,expired:`Expired`,disconnected:`Not connected. Try again after reconnecting.`},imageLightbox:{previous:`Previous image`,next:`Next image`,position:`{current} / {total}`,label:`Image preview: {title}`,open:`Open image {title}`,openOriginal:`Open in new tab`,copy:`Copy image`,download:`Download image`,copyFailed:`Could not copy this image. Check clipboard access and try again.`,downloadFailed:`Could not download this image. Try again.`,loadFailed:`Could not load this image. Try again.`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,resetZoom:`Reset zoom`,close:`Close image preview`,untitled:`Image`},externalImage:{notLoaded:`External image not loaded`,open:`Open image`},messages:{copySelection:`Copy`,replyingTo:`Replying to {name}`,message:`message`,showLess:`Show less`,showMore:`Show more`,tooLargeToDisplay:`This message is too large to display here.`,unattributedSender:`Message`,toolSender:`Tool`,errorSender:`Error`},mediaPlayer:{play:`Play`,pause:`Pause`,seek:`Seek media`,mute:`Mute`,unmute:`Unmute`,volume:`Volume`,download:`Download {filename}`,preparing:`Preparing playback…`,openVideo:`Expand {filename} in the media overlay`,videoPreview:`Video preview: {title}`,closeVideoPreview:`Close video preview`},modelControls:{},nativeRuntimeRecovery:{},permissionControls:{},rail:{title:`Side chat`,subtitle:`Ask about this session or its project`,expand:`Expand side chat`,collapse:`Collapse side chat`,close:`Close side chat`,show:`Show side chat`,clear:`Clear side chat`,pullRequests:`Pull requests`,checksPassing:`{count} passed`,checksFailing:`{count} failed`,checksPending:`{count} running`,finished:`Finished {time}`,empty:`Answers come from this session's transcript and its project files.`,starters:{changed:`What changed?`,stopped:`Why did it stop?`,remaining:`What's left?`},askLabel:`Ask in side chat`,askPlaceholder:`Ask a question`,askImageQuestion:`What does this image show?`,selectionTooLong:`These comments are too long for Side chat. Use a shorter selection or comment.`,selectionQuoteOnly:`The selection is too long to attach. A short quote is ready in Side chat.`,askSubmit:`Ask`,askPending:`Answering from this session…`,askBusy:`Side chat is already answering a question.`,askHistoryUnavailable:`Couldn't load this session's history.`,askMissing:`This session is no longer available.`,askModelUnavailable:`No utility model is configured for this session.`,askImageUnsupported:`This Side chat model cannot read images. Choose an image-capable utility model, then retry.`,askRateLimited:`Side chat reached its question limit. Try again shortly.`,askUnavailable:`Side chat cannot answer right now.`,askRetry:`Retry`,asOf:`as of {time}`,health:{"on-track":`On track`,grinding:`Working`,stuck:`Stuck`,"waiting-on-user":`Waiting on you`,"wrapping-up":`Wrapping up`,done:`Done`,failed:`Failed`}},detailPanel:{},sidebarColumns:{close:`Close {panel}`},sidePanel:{label:`Side panel`,addTab:`Add side panel tab`,expand:`Focus`,expandPanel:`Expand {panel}`,restore:`Restore split`,useViewAsDefault:`Use current view as default`,currentViewIsDefault:`This is the default view`,defaultViewDescription:`Used when anyone opens this dashboard. Personal layout choices still apply.`,savingDefault:`Saving default…`,defaultSaved:`Dashboard default saved for future opens.`,defaultSaveFailed:`Could not save the dashboard default. Check the connection and try again.`,defaultSaveError:`Could not save the dashboard default: {error}`,swap:`Swap {main} and {side}`,layout:`Layout`,dockLeft:`Move side panel left`,dockRight:`Move side panel right`,dockBottom:`Move side panel below`,conversation:`Chat`,conversationEmpty:`The conversation for this task.`,minimize:`Minimize side panel`,resize:`Resize side panel`,review:`Review`,reviewEmpty:`Open a change, file, image, or tool result to review it here.`,terminal:`Terminal`,terminalEmpty:`Open a shell for this session's workspace.`,browser:`Browser`,browserEmpty:`A shared browser for you and the agent.`,files:`Files`,filesEmpty:`Browse files, artifacts, and changes from this session.`,companion:`Side chat`,companionEmpty:`Ask a focused question about this session.`,desktop:`Desktop`,desktopEmpty:`Connect to an available remote desktop.`,portal:`Portal`,portalEmpty:`Preview a web application running for this task.`,discussion:`Discussion`,discussionEmpty:`Open the shared discussion for this session.`,dashboard:`Dashboard`,dashboardEmpty:`This task does not have a dashboard yet.`},thread:{search:`Search messages`,searchPlaceholder:`Search messages...`,closeSearch:`Close search`,loading:`Loading chat`,showEarlier:`Show earlier`,loadingEarlier:`Loading earlier…`,noMatches:`No matching messages`,positionRail:`Conversation position`,positionMarker:`{label}, marker {position} of {count}`,positionUserMessage:`User message`,positionAssistantMessage:`Assistant message`,positionMarkerHint:`Use arrow keys or Home and End to choose a marker, Enter or Space to jump, and Escape to return to the conversation. Tab leaves the rail.`},pendingInputs:{waitingForWorkspaceSync:`Received · waiting for workspace sync`,waitingForWorkerSetup:`Received · waiting for worker setup`,resuming:`Interrupted by a Gateway restart. This saved message will resume when the session is ready.`,cancelled:`Cancelled before the agent started it. It will not run automatically; copy it and send again.`,interrupted:`Interrupted before the agent started it. It will not run automatically; copy it and send again.`,earlier:`Show earlier messages`,latest:`Show latest messages`},pairingQrExpired:{title:`Pairing QR expired`,reason:`Run /pair qr again to generate a fresh setup code.`,badge:`Expired`},composer:{composerInput:`Chat composer`,emojiSuggestions:`Emoji suggestions`,placeholder:`Message {name}`,emptyHint:`Write a message to send.`,placeholderWithAttachments:`Add a message or paste more images...`,offlineQueuedHint:`{count} in this conversation’s outbox.`,preparingModel:`Preparing model...`,responding:`{name} is responding...`,sendingMessage:`Sending message...`,working:`{name} is working...`,runDone:`Done`,runInterrupted:`Interrupted`,runStatus:`Run status: {status}`,compactingContext:`Compacting context...`,contextCompacted:`Context compacted`,fallbackActive:`Fallback active: {model}`,fallbackCleared:`Fallback cleared: {model}`,fallbackSelected:`Selected: {model}`,fallbackCurrent:`Active: {model}`,fallbackPrevious:`Previous fallback: {model}`,fallbackReason:`Reason: {reason}`,fallbackAttempts:`Attempts: {attempts}`,cancelReply:`Cancel reply`,attachmentPreview:`Attachment preview`,browserAnnotation:`Browser annotation`,browserAnnotationPreview:`Browser annotation preview`,browserAnnotationRegion:`{count} marked region`,browserAnnotationRegions:`{count} marked regions`,browserAnnotationInspectedElement:`Element inspected`,browserAnnotationRemoved:`Browser annotation removed.`,browserAnnotationUndoUnavailable:`Undo is unavailable because the browser annotation limit has been reached.`,preparingAttachments:`Preparing attachments…`,preparingAttachmentCount:`Preparing {count} attachment`,preparingAttachmentsCount:`Preparing {count} attachments`,removeAttachment:`Remove attachment`,removeNamedAttachment:`Remove {name}`,removeBrowserAnnotation:`Remove browser annotation: {name}`,addAttachment:`Add attachment`,attach:`Attach…`,attachPhoto:`Photo`,attachFileOption:`File`,menu:{back:`Back`,skills:`Skills`,connectors:`Connectors`,webSearch:`Web search`,webSearchGloballyDisabled:`Web search is disabled in config (tools.web.search.enabled). Session overrides cannot turn it back on.`,webSearchClearStaleEnable:`Web search is disabled in config. Click to clear this session’s enable override.`,managePlugins:`Manage plugins`,manageSkills:`Manage skills`,addMcpServer:`Add MCP server…`,addMcpServerTitle:`Add MCP server`,addMcpServerDescription:`Configure the server and choose where it is enabled.`,scopeLabel:`Availability`,scopeSession:`This session`,scopeEverywhere:`Everywhere`,scopeSessionHint:`The server is saved globally disabled and enabled only for this session.`,scopeEverywhereHint:`The server is saved and enabled for every session.`,toolAccess:{label:`Tool access`,loading:`Loading tools…`,loadFailed:`Couldn’t load tools.`,noTools:`No tools available for this connector.`,summary:`{enabled} of {total} tools on`,summaryOne:`{enabled} of {total} tool on`},enabledCount:`{count} on`,loadingSkills:`Loading skills…`,skillsLoadFailed:`Couldn’t load skills.`,noSkills:`No skills available.`,noConnectors:`No MCP servers configured.`,depsMissing:`deps missing`,skillBlocked:`not available for this agent`,sessionTag:`session`,offlineBlocked:`Connect to the gateway to change session capabilities.`,adminBlocked:`Admin access is required to manage connectors.`,savingBlocked:`Wait for the current session capability change to finish.`},overrides:{count:`{count} overrides`,countOne:`{count} override`,clear:`Clear session overrides`},contextUsage:{title:`Context usage details`,open:`Open context usage details`,summary:`Session context usage: {used} of {limit} ({pct}%)`,contextWindow:`Context window`,promptBudget:`Prompt budget`,latestRunTokens:`Latest run tokens`,estimatedCost:`Est. cost`,planUsage:`Plan usage`,openUsage:`Open usage dashboard`,resets:`Resets {time}`,usageCredits:`Usage credits`,budgetValue:`{used} of {limit}`,limitFiveHour:`5-hour limit`,limitWeekly:`Weekly`,limitDaily:`Daily limit`,limitHours:`{hours}-hour limit`},takePhoto:`Take photo`,cameraAccessFailed:`Unable to access the camera.`,cameraBusy:`The camera is busy or unavailable to the browser.`,cameraFallback:`Camera {number}`,cameraInput:`Camera`,cameraListUnsupported:`This browser cannot list cameras.`,cameraNoneFound:`No camera was found.`,cameraPageInactive:`Cameras are unavailable while this page is inactive.`,cameraPermissionBlocked:`Camera access is blocked. Allow camera access in browser site settings.`,cameraPreview:`Camera preview`,dismissVoiceInputError:`Dismiss voice input error`,microphoneAccessFailed:`Unable to access microphone inputs.`,microphoneAccessPending:`Waiting for microphone access. Bring this tab to the foreground and allow access if prompted.`,microphoneBusy:`Microphone inputs are busy or unavailable to the browser.`,microphoneStopped:`Microphone input stopped. Choose an available input and start again.`,microphoneFallback:`Microphone {number}`,microphoneInput:`Microphone input`,microphoneAppliesNextSession:`Changes apply when you start your next Talk session.`,microphoneListUnsupported:`This browser cannot list microphone inputs.`,noCameras:`No additional cameras found`,noMicrophones:`No additional microphones found`,microphoneNoneFound:`No microphone found. Plug one in and it appears here.`,microphonePageInactive:`Microphone inputs are unavailable while this page is inactive.`,microphonePermissionBlocked:`Microphone access is blocked. Allow it in browser site settings to list inputs.`,realtimeTalkCapability:`Tap to talk`,dictationCapability:`Dictation`,realtimeTalkProviderUnavailable:`No realtime voice provider is configured.`,dictationProviderUnavailableShort:`No transcription provider is configured.`,talkCapabilityChecking:`Checking provider availability…`,talkCapabilityUnknown:`Provider availability could not be verified.`,openRealtimeTalkSettings:`Talk settings`,openDictationSettings:`Transcription setup`,configureCapability:`Configure`,holdToRecordSetting:`Hold microphone button to start dictation`,holdToDictate:`Hold to start dictation`,holdToRecordSettingDescription:`Hold until dictation starts, then release and keep speaking. Tap Stop to insert the transcript.`,dictationAudioUnsupported:`The Gateway returned an unsupported dictation audio format.`,dictationBrowserAudioUnsupported:`This browser cannot capture dictation audio at 8 kHz.`,dictationDisconnected:`Dictation stopped because the Gateway disconnected.`,dictationFailed:`Dictation failed.`,dictationInterruptedRecovery:`Captured text was inserted. Check your connection and try again.`,dictationStartRecovery:`Check microphone access and transcription settings, then try again.`,dictationFinalizing:`Finishing dictation…`,dictationListening:`Listening…`,dictationStopAndKeep:`Stop and keep text`,dictationProviderUnavailable:`No transcription provider is configured for dictation. Choose one in Settings to dictate.`,realtimeTalkCancellationRejected:`Realtime output cancellation was not accepted.`,realtimeTalkMissingTurnIdentity:`Realtime output is missing its turn identity.`,realtimeTalkRequiresMicrophone:`Realtime voice input requires browser microphone access.`,selectedMicrophoneUnavailable:`The selected microphone is unavailable. Choose another input or System default.`,selectedCameraUnavailable:`The selected camera is unavailable. Choose another camera or System default.`,startVoiceInput:`Start voice input`,voiceGestureHint:`Tap to talk · Hold to start dictation`,stillListening:`Still listening`,stopVoiceInput:`Stop voice input`,systemDefaultMicrophone:`System default`,useSystemDefaultMicrophoneForCall:`Use System default for this call`,systemDefaultCamera:`System default`,switchCamera:`Switch camera`,turnCameraOff:`Turn camera off`,turnCameraOn:`Turn camera on`,voiceTranscript:`Voice transcript`},attachments:{allowImage:`Allow image`,attachedFile:`Attached file`,audio:`Audio`,expand:`Open {filename} in the side panel`,open:`Open`,previewUnavailable:`Preview unavailable`,textPreviewUnavailable:`Could not preview this file. Text previews require UTF-8 files up to 256 KiB. Download it to read the full file.`,htmlPreviewUnavailable:`Could not preview this HTML file. HTML previews require UTF-8 files up to 2 MiB. Download it to read the full file.`,readFailed:`Could not attach: {names}{more}`,imagesOnly:`Side chat accepts image attachments only.`,tooLarge:`Too large to send: {names}{more}`,showInTextField:`Show in text field`,pastedText:`Pasted text`,outsideAllowedFolders:`Outside allowed folders`,unavailable:`Unavailable`,failureDeliveryFailed:`Delivery failed. Try sending this file again.`,failureFileNotFound:`File not found. Check the path and try again.`,failureUnsupportedFormat:`Rejected by the local attachment allowlist. Send a supported file type.`,history:`History`,image:`Image`,notSent:`Not sent`,omittedFromHistory:`Omitted from history`,omittedFromHistoryWithSize:`Omitted from history · {size}`,video:`Video`},voice:{asking:`Asking OpenClaw...`,preparing:`Preparing voice session...`,connecting:`Connecting voice input...`,listening:`Listening...`,selectionFailed:`Could not change voices. Restart the call.`,selectionTimedOut:`Voice change timed out. Restart the call.`,selectionConfirmationFailed:`Voice change unconfirmed.`},selectors:{loadMoreSessions:`Show more`,loadMoreRosterSessions:`Load more sessions`,model:`Chat model`,modelSection:`Model`,modelLocked:`Locked`,modelLockedLabel:`Model selection controlled for this session`,lockedSessionModel:`Session model`,thinkingLevel:`Chat thinking level`},toolCards:{tool:`Tool`,canvas:`Canvas`,summary:`Summary`,toolInput:`Tool input`,toolOutput:`Tool output`,providerResponse:`Provider tool response`,executionOutput:`Execution output`,showFullOutput:`Show full output`,fullOutputUnavailable:`Full output unavailable. Only the captured output is shown.`,copyOutput:`Copy available output`,downloadOutput:`Download available output`,outputLoadFailed:`Could not load the full output. Try again.`,outputDownloadFailed:`Could not download the output. Try again.`,toolError:`Tool error`,rawDetails:`Raw details`,activity:{titleOne:`1 operation`,titleMany:`{count} operations`,commandsOne:`1 command`,commandsMany:`{count} commands`,readsOne:`1 read`,readsMany:`{count} reads`,editsOne:`1 edit`,editsMany:`{count} edits`,writesOne:`1 write`,writesMany:`{count} writes`,searchesOne:`1 search`,searchesMany:`{count} searches`,fetchesOne:`1 fetch`,fetchesMany:`{count} fetches`,otherOne:`1 other operation`,otherMany:`{count} other operations`,failed:`{count} failed`,blocked:`{count} blocked`,unknown:`{count} unknown`},showRawDetails:`Show raw details`,hideRawDetails:`Hide raw details`,viewMode:`Tool detail view`,diff:`Diff`,raw:`Raw`,openFile:`Open file`,openDetails:`Open tool details in side panel`,widgetActions:`Widget actions`,copyToClipboard:`Copy to clipboard`,downloadFile:`Download file`,copyAsImage:`Copy as image`,downloadAsImage:`Download as image`,widgetExportRerender:`This widget needs to be re-rendered to export as an image.`,widgetExportHtmlFallback:`Image unavailable. Downloaded the widget as HTML instead.`,widgetExportFailed:`Widget export failed. Try again.`,pinToDashboard:`Pin to dashboard`,pinToDashboardPending:`Pinning…`,pinToDashboardFailed:`Could not pin to dashboard. Try again.`,pinnedToDashboard:`Pinned`,fileChanges:`File changes`,attemptedChanges:`Attempted changes`,failed:`failed`,skipped:`Skipped`,skippedCount:`{count} skipped`,running:`Running`,completed:`Completed`,blocked:`Blocked`,outcomeUnknown:`Outcome unknown`,exitCode:`Exit code {code}`,failureCount:`{count} failed`,noOutputFailed:`No output — tool failed.`,noOutputSucceeded:`No output — tool completed successfully.`,noResult:`No result available.`,review:{reviewing:`{reviewer} reviewing`,approved:`{reviewer} approved`,denied:`{reviewer} denied`,timedOut:`{reviewer} timed out`,aborted:`{reviewer} stopped`,risk:`{level} risk`,authorization:`{level} authorization`,noRationale:`No rationale was provided.`},verbs:{read:`Read`,edit:`Edit`,editing:`Editing`,edited:`Edited`,create:`Create`,creating:`Creating`,created:`Created`,delete:`Delete`,deleting:`Deleting`,deleted:`Deleted`,change:`Change`,changing:`Changing`,changed:`Changed`,write:`Write`,writing:`Writing`,wrote:`Wrote`,searched:`Searched`,fetched:`Fetched`}},workRun:{workedFor:`Worked for {duration}`,worked:`Worked`,toolCallsOne:`1 tool call`,toolCallsMany:`{count} tool calls`},sessionDiff:{title:`Changes`,show:`Show session changes`,refresh:`Refresh changes`,loading:`Loading changes…`,empty:`No changes in this session's checkout.`,notGit:`This session's workspace is not a git checkout.`,unknownSession:`No workspace is associated with this session.`,unknownCommit:`This commit is no longer available in the session checkout.`,workspaceStopped:`Saved changed files are shown. Start the cloud session to load full diffs and line counts.`,workspaceStoppedFile:`Start the cloud session to load this diff.`,disconnected:`Gateway is disconnected.`,allChanges:`All Changes`,uncommitted:`Uncommitted`,commitsAhead:`{count} commits ahead of {base}`,head:`HEAD`,mergeBase:`Merge Base`,scopeMenu:`Choose change scope`,sync:`Sync`,syncLocally:`Sync Locally`,syncDescription:`Run this command in a local checkout to mirror this session's committed changes.`,copyCommand:`Copy sync command`,checkoutPath:`Checkout path`,branchName:`Branch name`,uncommittedStay:`Uncommitted changes stay in the session checkout.`,viewOptions:`Change view options`,collapseAll:`Collapse All`,expandAll:`Expand All`,enableWrapping:`Enable Wrapping`,disableWrapping:`Disable Wrapping`,switchSplit:`Switch to Split Diff`,switchUnified:`Switch to Unified Diff`,fileActions:`Actions for {path}`,copyPath:`Copy Path`,openFile:`Open File`,openInEditor:`Open in Editor`,revealInFileTree:`Reveal in File Tree`,unmodifiedLines:`{count} unmodified lines`,expandPreviousLines:`Show previous {count} unmodified lines`,expandNextLines:`Show next {count} unmodified lines`,expandAllLines:`Show all {count} unmodified lines`,binaryFile:`Binary file`,untracked:`untracked`,previewUnavailable:`Diff preview is unavailable.`,truncatedFile:`Diff truncated.`,truncatedResult:`Some changes could not be displayed.`,statusAdded:`Added`,statusDeleted:`Deleted`,statusRenamed:`Renamed`,statusModified:`Modified`},sessionDiscussion:{show:`Show discussion`,hide:`Hide discussion`,disconnected:`Gateway is disconnected.`,loading:`Loading discussion…`,opening:`Opening discussion…`,requiresWriteAccess:`Operator write access is required to open this discussion.`,openExternal:`Open discussion in a new tab`,frameTitle:`Session discussion`,unavailable:`This discussion cannot be embedded.`},workspaceFiles:{label:`Session workspace`,collapse:`Collapse session workspace`,showFiles:`Show session files`,dockRight:`Dock to the right`,dockBottom:`Dock to the bottom`,workspace:`Session`,files:`Workspace`,refresh:`Refresh session workspace`,loading:`Loading session workspace…`,changed:`Changed`,read:`Read`,artifacts:`Artifacts`,browser:`Project files`,root:`Root`,search:`Search files`,searchResults:`Search results`,parentFolder:`Parent folder`,noBrowserFiles:`No files in this folder.`,folderUnavailable:`This folder is unavailable. Open its parent folder to continue browsing.`,noSearchResults:`No matching files.`,truncated:`Showing the first matching files. Refine the search to narrow results.`,session:`Session`,missing:`Missing`,filterAll:`All`,filters:`Filter files`,changedCount:`{count} changed`,readCount:`{count} read`,artifactCount:`{count} artifacts`,actions:`Workspace file actions`,preview:`Preview`,copyPath:`Copy path`}},languages:{en:`English`,zhCN:`简体中文 (Simplified Chinese)`,zhTW:`繁體中文 (Traditional Chinese)`,ptBR:`Português (Brazilian Portuguese)`,de:`Deutsch (German)`,es:`Español (Spanish)`,jaJP:`日本語 (Japanese)`,ko:`한국어 (Korean)`,fr:`Français (French)`,hi:`हिन्दी (Hindi)`,ar:`العربية (Arabic)`,it:`Italiano (Italian)`,tr:`Türkçe (Turkish)`,uk:`Українська (Ukrainian)`,id:`Bahasa Indonesia (Indonesian)`,pl:`Polski (Polish)`,th:`ไทย (Thai)`,vi:`Tiếng Việt (Vietnamese)`,nl:`Nederlands (Dutch)`,fa:`فارسی (Persian)`,ru:`Русский (Russian)`},secretsStore:{name:`Name`,access:`Access`,accessMode:`Access mode`,value:`Value`,allowedHosts:`Allowed hosts`,allowedHostsPlaceholder:`api.example.com`,allowedHostsHint:`Exact hostnames only, one per line or comma-separated. No wildcards or ports.`,noAllowedHosts:`None`,updated:`Last updated`,by:`{time} by {name}`,actions:`Actions`,add:`Add`,edit:`Edit`,bulk:`Bulk Add`,protectedSecret:`Protected secret`,protectedSecretHint:`Hidden after save and inert unless referenced by a SecretRef or used through enabled destination-bound Gateway egress. It is never directly readable.`,agentReadable:`Agent-readable environment`,agentReadableHint:`High risk: visible to admins and plaintext to Gateway-hosted agent commands. The agent can print, transmit, or persist it. Applies from the next run.`,hint:`Choose protected, write-only secrets or intentionally agent-readable Gateway environment values.`,required:`Enter a value.`,detect:`Protect credential-like names automatically`,detected:`{count} protected secrets detected`,detectedOne:`{count} protected secret detected`,unavail:`Gateway/admin required.`,badName:`Use SERVICE_API_KEY.`,tooLarge:`Max 64 KiB.`,savedProtected:`Saved {name} as Protected secret. Add a SecretRef or enable destination-bound Gateway egress to use it.`,savedReadable:`Saved {name} as Agent-readable environment. It is available to Gateway-hosted agent commands from the next run.`,savedMany:`Saved {count} entries ({protected} protected, {readable} agent-readable). Protected secrets need a SecretRef or enabled destination-bound Gateway egress; agent-readable environment values reach Gateway-hosted agent commands from the next run.`,warnings:`{count} runtime warnings.`,partial:`{saved}/{total}: {error}`,confirmDelete:`Delete {name}?`,deleted:`Deleted {name}.`,deleteFailed:`The secret was not deleted. Reload the list and try again.`},cron:{adminRequired:`Browsing only. Automation changes require operator.admin access.`,tabs:{filterLabel:`Automation status`,all:`All`,active:`Active`,paused:`Paused`},list:{},suggestions:{},stats:{tasks:`Automations`,failing:`Failing`,nextWake:`Next wake`},detail:{tabsLabel:`Automation details`,newTitle:`New automation`,newSubtitle:`Describe what OpenClaw should do, then pick when it runs.`,back:`All automations`,settingsTab:`Settings`,historyTitle:`Run history`,generalSection:`General`,scheduleSection:`Schedule`,deliverySection:`Delivery`,active:`Active`,paused:`Paused`},actions:{runNow:`Run now`,runNowJob:`Run now: {name}`,runIfDue:`Run if due`,pauseJob:`Pause: {name}`,resumeJob:`Resume: {name}`,clone:`Clone`,remove:`Remove`,removeConfirmTitle:`Remove "{name}"?`,removeConfirmMessage:`This permanently deletes the automation and stops all future runs. This action cannot be undone.`,moreJob:`More actions for {name}`},runNotStarted:{notDue:`This automation is not due yet.`,alreadyRunning:`This automation is already running.`,recoveryPending:`Scheduler recovery is still in progress.`,invalidSpec:`This automation has an invalid schedule or payload.`,stopped:`The scheduler is stopped.`,unknown:`This automation could not be started.`},jobs:{schedule:`Schedule`,lastRun:`Last run`,all:`All`,condition:`Condition`,conditional:`Conditional`,unconditional:`Unconditional`,sort:`Sort`,nextRun:`Next run`,recentlyUpdated:`Recently updated`,name:`Name`,direction:`Direction`,ascending:`Ascending`,descending:`Descending`,reset:`Reset`},runs:{searchRuns:`Search runs`,searchPlaceholder:`Summary, error, or task`,newestFirst:`Newest first`,oldestFirst:`Oldest first`,status:`Status`,delivery:`Delivery`,clear:`Clear`,allStatuses:`All statuses`,allDelivery:`All delivery`,noMatching:`No matching runs.`,emptyTitle:`No runs yet`,emptyHint:`Runs show up here once an automation fires.`,conditionActivity:`Condition activity`,conditionActivityHint:`Checks run on schedule before the payload starts.`,checks:`Checks`,lastChecked:`Last checked`,lastFired:`Last fired`,notChecked:`Not checked yet`,neverFired:`Never`,emptyConditionTitle:`No payload runs yet`,emptyConditionHint:`The condition has been checked {count} times without matching. Run history starts when the payload executes.`,emptyConditionHintOne:`The condition has been checked once without matching. Run history starts when the payload executes.`,emptyConditionUnchecked:`The condition has not been checked yet. Run history starts when the payload executes.`,loadMore:`Load more runs`,runStatusOk:`OK`,runStatusError:`Error`,runStatusSkipped:`Skipped`,runStatusUnknown:`Unknown`,runStatusRunning:`Running`,deliveryDelivered:`Delivered`,deliveryNotDelivered:`Not delivered`,deliveryUnknown:`Unknown`,deliveryNotRequested:`Not requested`},form:{requiredSr:`required`,fieldName:`Name`,description:`Description`,agentId:`Agent`,namePlaceholder:`Morning brief`,descriptionPlaceholder:`Optional context for this task`,agentPlaceholder:`main or ops`,agentHelp:`Start typing to pick a known agent, or enter a custom one.`,promptPlaceholder:`Describe what OpenClaw should do...`,repeat:`Repeat`,repeatInterval:`Interval`,repeatOnce:`Once`,repeatOnExit:`On exit`,repeatStream:`Stream source`,onExitHelp:`Runs when a watched command exits. The schedule cannot be edited here.`,every:`Every`,at:`At`,cronOption:`Cron`,runAt:`Run at`,unit:`Unit`,minutes:`Minutes`,hours:`Hours`,days:`Days`,expression:`Expression`,expressionPlaceholder:`0 7 * * *`,everyAmountPlaceholder:`30`,summaryEverySecondOne:`Runs every second`,summaryEveryMinuteOne:`Runs every minute`,summaryEveryHourOne:`Runs every hour`,summaryEveryDayOne:`Runs every day`,summaryEverySeconds:`Runs every {amount} seconds`,summaryEveryMinutes:`Runs every {amount} minutes`,summaryEveryHours:`Runs every {amount} hours`,summaryEveryDays:`Runs every {amount} days`,summaryOnce:`Runs once at {at}`,summaryCron:`Cron schedule {expr}`,summaryCronTz:`Cron schedule {expr} ({tz})`,timezoneOptional:`Timezone`,timezonePlaceholder:`America/Los_Angeles`,timezoneHelp:`Optional. Leave blank to use the Gateway host timezone, or enter any valid IANA timezone.`,runsIn:`Runs in`,mainSession:`Main session`,isolatedSession:`Isolated session`,sessionHelp:`Main posts into the agent's timeline. Isolated runs a dedicated agent turn.`,wakeMode:`Wake mode`,now:`Now`,nextHeartbeat:`Next heartbeat`,wakeModeHelp:`Now triggers immediately. Next heartbeat waits for the next cycle.`,action:`Action`,command:`Command`,script:`Script`,readOnlyPayloadHelp:`This payload was created outside Control UI. Its contents stay read-only and are preserved when you save other changes.`,systemEvent:`Post to main timeline`,agentTurn:`Run agent task`,systemEventHelp:`Sends your text to the gateway main timeline (good for reminders).`,agentTurnHelp:`Starts an agent run in its own session using your prompt.`,timeoutSeconds:`Timeout (seconds)`,timeoutPlaceholder:`Optional, e.g. 90`,timeoutHelp:`Optional. Leave blank to use the gateway default timeout for this run.`,mainTimelineMessage:`Main timeline message`,assistantTaskPrompt:`Prompt`,deliveryModeLabel:`Mode`,announceDefault:`Announce summary`,webhookPost:`Webhook POST`,noneInternal:`None (internal)`,deliveryHelp:`Announce posts a summary to chat. None keeps execution internal.`,webhookUrl:`Webhook URL`,channel:`Channel`,webhookPlaceholder:`https://example.com/cron`,channelHelp:`Choose which connected channel receives the summary.`,webhookHelp:`Send run summaries to a webhook endpoint.`,to:`To`,toPlaceholder:`+1555... or chat id`,toHelp:`Optional recipient override (chat id, phone, or user id).`,advanced:`Advanced`,advancedHelp:`Optional condition checks, delivery guarantees, schedule jitter, and model controls.`,conditionTrigger:`Condition trigger`,conditionTriggerHelp:`Run a quiet headless check before the task and call the model only when it matches.`,triggerConfigured:`Trigger configured`,triggerScript:`Trigger script`,triggerScriptHelp:`Runs unattended with this automation's tool policy. Return json({ fire, message?, state? }); limits: 30 seconds, 5 tool calls, 16 KB state.`,triggerOnce:`Disable after first match`,triggerOnceHelp:`Disable this automation after the first successful fired task.`,triggerDisabled:`Condition triggers are disabled by cron.triggers.enabled.`,triggerDisabledConfigured:`Condition triggers are disabled. Existing configuration is preserved until you clear it.`,clearTrigger:`Clear trigger`,startEnabled:`Start enabled`,deleteAfterRun:`Delete after run`,deleteAfterRunHelp:`Best for one-shot reminders that should auto-clean up.`,clearAgentOverride:`Clear agent override`,clearAgentHelp:`Force this task to use the gateway default agent.`,sessionKey:`Session key`,sessionKeyHelp:`Optional routing key for job delivery and wake routing.`,exactTiming:`Exact timing (no stagger)`,exactTimingHelp:`Run on exact cron boundaries with no spread.`,staggerWindow:`Stagger window`,staggerUnit:`Stagger unit`,staggerPlaceholder:`30`,seconds:`Seconds`,accountId:`Account ID`,accountIdHelp:`Optional channel account ID for multi-account setups.`,lightContext:`Light context`,lightContextHelp:`Use lightweight bootstrap context for this agent job.`,model:`Model`,customModel:`Custom model…`,modelPlaceholder:`openai/gpt-5.2`,modelHelp:`Start typing to pick a known model, or enter a custom one. Routine jobs (summaries, triage, classification) run well on a lighter model — cheaper and faster than your default.`,thinking:`Reasoning`,thinkingPlaceholder:`low`,thinkingHelp:`Use a suggested level or enter a provider-specific value.`,failureAlerts:`Failure alerts`,failureAlertInherit:`Inherit global setting`,failureAlertDisabled:`Disable for this job`,failureAlertCustom:`Custom per-job settings`,failureAlertsHelp:`Control when this job sends repeated-failure alerts.`,failureAlertAfter:`Alert after`,failureAlertAfterHelp:`Consecutive errors before alerting.`,failureAlertCooldown:`Cooldown (seconds)`,failureAlertCooldownHelp:`Minimum seconds between alerts.`,failureAlertChannel:`Alert channel`,failureAlertTo:`Alert to`,failureAlertToPlaceholder:`+1555... or chat id`,failureAlertToHelp:`Optional recipient override for failure alerts.`,failureAlertMode:`Alert mode`,failureAlertAnnounce:`Announce (via channel)`,failureAlertWebhook:`Webhook (HTTP POST)`,failureAlertAccountId:`Alert account ID`,failureAlertAccountPlaceholder:`Account ID for multi-account setups`,bestEffortDelivery:`Best effort delivery`,bestEffortHelp:`Do not fail the task if delivery itself fails.`,cantAddYet:`Can't save yet`,fillRequired:`Fill the required fields below to enable submit.`,fixFields:`Fix {count} field to continue.`,fixFieldsPlural:`Fix {count} fields to continue.`,saving:`Saving...`,saveChanges:`Save changes`,createTask:`Create automation`,createAndRun:`Create & run now`,cancel:`Cancel`},jobState:{next:`Next`},runEntry:{noSummary:`No summary.`,deliverySuppression:`Delivery suppression: {reason}`,runAt:`Run at`,transcript:`Run transcript`,viewTranscript:`View transcript`,transcriptEmpty:`No messages in this run yet.`,transcriptMissingMetadata:`This run is missing the identity needed to open its transcript.`,transcriptUnavailable:`The exact run transcript is unavailable or ambiguous. Refresh run history and try again.`,next:`Next {rel}`,due:`Due {rel}`},errors:{nameRequired:`Name is required.`,scheduleAtInvalid:`Enter a valid date/time.`,everyAmountInvalid:`Interval must be greater than 0.`,triggerIntervalTooShort:`Condition-triggered automations must run at least every 30 seconds.`,cronExprRequired:`Cron expression is required.`,staggerAmountInvalid:`Stagger must be greater than 0.`,triggerScriptRequired:`Trigger script is required when the condition trigger is enabled.`,triggerScriptPayloadUnsupported:`Script payloads cannot use condition triggers because both own the same saved state.`,triggerScheduleUnsupported:`Condition triggers require an interval, cron, or stream schedule.`,systemTextRequired:`System text is required.`,agentMessageRequired:`Agent message is required.`,timeoutInvalid:`If set, timeout must be 0 or greater (0 disables this timeout).`,webhookUrlRequired:`Webhook URL is required.`,webhookUrlInvalid:`Webhook URL must be a valid http(s):// URL without embedded credentials.`,invalidRunTime:`Invalid run time.`,invalidIntervalAmount:`Invalid interval amount.`,cronExprRequiredShort:`Cron expression required.`,invalidStaggerAmount:`Invalid stagger amount.`,systemEventTextRequired:`System event text required.`,agentMessageRequiredShort:`Agent message required.`,nameRequiredShort:`Name required.`}},linkReader:{loadingPreview:`Loading preview…`,title:`Link reader`,urlPlaceholder:`Supported link URL`}}})))()}function dr(e){return e!=null&&_r.includes(e)}function fr(e){return gr.includes(e)}function pr(e){let t=e.toLowerCase();if(t.startsWith(`zh`)){let[,...e]=t.split(`-`);return e.includes(`hant`)?`zh-TW`:e.includes(`hans`)?`zh-CN`:e.some(e=>e===`tw`||e===`hk`||e===`mo`)?`zh-TW`:`zh-CN`}return gr.find(e=>t.startsWith(e.split(`-`)[0].toLowerCase()))??`en`}async function mr(e){return fr(e)?(await hr[e]())[e.replaceAll(`-`,`_`)]??null:null}var hr,gr,_r;function vr(){return(vr=e((()=>{s(),hr={"zh-CN":()=>V(()=>import(`./zh-CN-CefrbpXA.js`),[],import.meta.url),"zh-TW":()=>V(()=>import(`./zh-TW-DKD0doSY.js`),[],import.meta.url),"pt-BR":()=>V(()=>import(`./pt-BR-DD55Zz3s.js`),[],import.meta.url),de:()=>V(()=>import(`./de-CtE3jfo3.js`),[],import.meta.url),es:()=>V(()=>import(`./es-DoR_6_Mi.js`),[],import.meta.url),"ja-JP":()=>V(()=>import(`./ja-JP-B4sYHDAP.js`),[],import.meta.url),ko:()=>V(()=>import(`./ko-klRIL81U.js`),[],import.meta.url),fr:()=>V(()=>import(`./fr-CDq_csZn.js`),[],import.meta.url),hi:()=>V(()=>import(`./hi-CRt8aeWT.js`),[],import.meta.url),ar:()=>V(()=>import(`./ar-BAstByWJ.js`),[],import.meta.url),it:()=>V(()=>import(`./it-DX8t_gUP.js`),[],import.meta.url),tr:()=>V(()=>import(`./tr-DqpPb6Xf.js`),[],import.meta.url),uk:()=>V(()=>import(`./uk-BswcgsGI.js`),[],import.meta.url),id:()=>V(()=>import(`./id-BfrpkFzC.js`),[],import.meta.url),pl:()=>V(()=>import(`./pl-o0LcNcnN.js`),[],import.meta.url),th:()=>V(()=>import(`./th-BTA-NMTK.js`),[],import.meta.url),vi:()=>V(()=>import(`./vi-BQHXlhN4.js`),[],import.meta.url),nl:()=>V(()=>import(`./nl-BGVeUcN9.js`),[],import.meta.url),fa:()=>V(()=>import(`./fa-jto8fs8F.js`),[],import.meta.url),ru:()=>V(()=>import(`./ru-CPSEudxS.js`),[],import.meta.url)},gr=Object.keys(hr),_r=[`en`,...gr]})))()}function yr(e,t){let n=e;for(let e of t){if(!n||typeof n!=`object`)return;n=Reflect.get(n,e)}return n}function br(e){typeof document<`u`&&(document.documentElement.lang=e,document.documentElement.dir=xr.has(e)?`rtl`:`ltr`)}var xr,Sr,Cr,K,wr;function Tr(){return(Tr=e((()=>{ur(),vr(),xr=new Set([`ar`,`fa`]),Sr=class{constructor(e=mr){this.loadLocaleTranslation=e,this.locale=`en`,this.translations={en:lr},this.subscribers=new Set,this.pendingLocale=null,this.pendingLocaleShouldPersist=!0,this.localeRequestGeneration=0,this.inFlightLocaleLoads=new Map,this.loadLocale()}readStoredLocale(){try{return tr()?.getItem(`openclaw.i18n.locale`)??null}catch{return null}}persistLocale(e){let t=tr();if(t)try{e===null?t.removeItem(`openclaw.i18n.locale`):t.setItem(`openclaw.i18n.locale`,e)}catch{}}resolveInitialLocale(){let e=this.readStoredLocale();return dr(e)?{locale:e,shouldPersist:!0}:{locale:this.getSystemLocale(),shouldPersist:!1}}loadLocale(){let e=this.resolveInitialLocale();if(e.locale===`en`){this.locale=`en`,br(`en`),e.shouldPersist||this.persistLocale(null);return}this.applyLocale(e.locale,!1,e.shouldPersist)}getLocale(){return this.locale}getSystemLocale(){return pr((typeof globalThis.navigator?.language==`string`?globalThis.navigator.language:null)??``)}async setLocale(e){return this.applyLocale(e,!1,!0)}async useSystemLocale(){return this.applyLocale(this.getSystemLocale(),!1,!1)}loadLocaleTranslationOnce(e){let t=this.inFlightLocaleLoads.get(e);if(t)return t;let n=this.loadLocaleTranslation(e),r=()=>{this.inFlightLocaleLoads.get(e)===n&&this.inFlightLocaleLoads.delete(e)};return this.inFlightLocaleLoads.set(e,n),n.then(r,r),n}async applyLocale(e,t,n){let r=++this.localeRequestGeneration,i=e!==`en`&&!this.translations[e];if(n||this.persistLocale(null),this.locale===e&&!i){this.pendingLocale=null,n&&this.persistLocale(e);return}if(i){this.pendingLocale=e,this.pendingLocaleShouldPersist=n;try{let t=await this.loadLocaleTranslationOnce(e);if(!t)return;this.translations[e]=t}catch(i){let a=this.localeRequestGeneration===r;t&&a&&this.localeLoadRecovery?.isUnrecoverableError(i)&&(n&&this.persistLocale(e),this.localeLoadRecovery.onUnrecoverableLocaleLoad?.(e)),console.error(`Failed to load locale: ${e}`,i);return}}this.localeRequestGeneration===r&&(this.pendingLocale=null,this.locale=e,br(e),n&&this.persistLocale(e),this.notify())}retryPendingLocale(){if(this.pendingLocale===null||this.pendingLocale===this.locale)return;let e=this.pendingLocale,t=this.pendingLocaleShouldPersist;this.pendingLocale=null,this.applyLocale(e,!0,t)}setLocaleLoadRecovery(e){this.localeLoadRecovery=e}registerTranslation(e,t){this.translations[e]=t}subscribe(e){return this.subscribers.add(e),()=>this.subscribers.delete(e)}notify(){this.subscribers.forEach(e=>e(this.locale))}translateActive(e){let t=yr(this.translations[this.locale],e.split(`.`));return typeof t==`string`?t:void 0}t(e,t){let n=e.split(`.`),r=yr(this.translations[this.locale]||this.translations.en,n);return r===void 0&&this.locale!==`en`&&(r=yr(this.translations.en,n)),typeof r==`string`?t?r.replace(/\{(\w+)\}/g,(e,n)=>t[n]??`{${n}}`):r:e}},Cr=new Sr,K=(e,t)=>Cr.t(e,t),wr=e=>Cr.translateActive(e),typeof process<`u`&&{}.VITEST&&(globalThis[Symbol.for(`openclaw.i18nManagerTestApi`)]={createI18nManager(e){return new Sr(e)}})})))()}var Er;function Dr(){return(Dr=e((()=>{Tr(),Er=class{constructor(e){this.host=e,e.addController(this)}hostConnected(){this.unsubscribe?.(),this.unsubscribe=Cr.subscribe(()=>{this.host.requestUpdate()}),this.host.requestUpdate()}hostDisconnected(){this.unsubscribe?.(),this.unsubscribe=void 0}}})))()}function q(){return(q=e((()=>{Tr(),Dr()})))()}var Or,kr,Ar;function jr(){return(jr=e((()=>{G(),Dr(),Or=class extends j{constructor(...e){super(...e),this.i18nController=new Er(this)}},kr=class extends Or{createRenderRoot(){return this}},Ar=class extends kr{connectedCallback(){super.connectedCallback(),this.style.display=`contents`}}})))()}function Mr(e,t,n){if(e instanceof MouseEvent){e.preventDefault(),e.stopPropagation(),n(t,e.clientX,e.clientY);return}let r=e.key===`ContextMenu`||e.key===`F10`&&e.shiftKey;if(e.altKey||e.ctrlKey||e.metaKey||!r||!t&&!(e.target instanceof HTMLElement))return;e.preventDefault(),e.stopPropagation();let i=t??e.target,a=i.getBoundingClientRect();n(i,a.right,a.bottom+4)}function Nr(e){if(e.isComposing||e.keyCode===229)return null;let t=e.key.toLowerCase();if(Pr.test(t))return t;if(e.altKey||e.key===`Dead`||Array.from(e.key).length!==1)return null;let n=Fr.exec(e.code)?.[1];return n?n.toLowerCase():e.shiftKey?null:Ir.exec(e.code)?.[1]??null}var Pr,Fr,Ir;function Lr(){return(Lr=e((()=>{Pr=/^[a-z0-9]$/,Fr=/^Key([A-Z])$/,Ir=/^Digit([0-9])$/})))()}function Rr(e=globalThis.navigator?.platform??``){return/Mac|iPhone|iPad|iPod/u.test(e)}function zr(e,t=Rr()){let n=t?{mod:`⌘`,ctrl:`⌃`,shift:`⇧`,alt:`⌥`}:{mod:`Ctrl`,ctrl:`Ctrl`,shift:`Shift`,alt:`Alt`},r={Backquote:"`",Comma:`,`,Enter:t?`⏎`:`Enter`,Escape:t?`esc`:`Esc`,ArrowUp:`↑`,ArrowDown:`↓`,ArrowLeft:`←`,ArrowRight:`→`,Click:`Click`};return[...e.modifiers.map(e=>n[e]),r[e.key]??e.key.toUpperCase()]}function Br(e,t=Rr()){return zr(e,t).join(t?``:`+`)}function Vr(e,t){if(t.isComposing||t.key===`Dead`||t.keyCode===229)return!1;let n=e.modifiers.includes(`mod`),r=e.modifiers.includes(`ctrl`),i=n?t.metaKey!==t.ctrlKey&&(!e.platformSpecific||t.metaKey===Rr()):!t.metaKey&&t.ctrlKey===r,a=e.key===`/`||e.key===`Backquote`;if(!i||t.altKey!==e.modifiers.includes(`alt`)||!a&&t.shiftKey!==e.modifiers.includes(`shift`))return!1;if(e.key===`/`)return t.key===`/`||t.key===`?`||t.code===`Slash`&&!/^[\x20-\x7e]$/u.test(t.key);if(e.key===`Backquote`||e.key===`Comma`)return t.code===e.key;if(e.key===`Enter`||e.key===`Escape`||e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`)return t.key===e.key;let o=Nr(t);return o!==null||!t.metaKey||!t.altKey?o===e.key:t.code===`Key${e.key.toUpperCase()}`}var Hr;function Ur(){return(Ur=e((()=>{Lr(),Hr={commandPalette:{modifiers:[`mod`],key:`k`,platformSpecific:!0},newSession:{modifiers:[`mod`,`shift`],key:`o`,platformSpecific:!0},archiveSession:{modifiers:[`mod`,`shift`],key:`a`,platformSpecific:!0},keyboardShortcuts:{modifiers:[`mod`],key:`/`},toggleSidebar:{modifiers:[`mod`],key:`b`,platformSpecific:!0},debugOverlay:{modifiers:[`mod`,`shift`],key:`d`},appearanceSettings:{modifiers:[`mod`,`shift`],key:`Comma`},escape:{modifiers:[],key:`Escape`},sendMessage:{modifiers:[],key:`Enter`},modifiedEnter:{modifiers:[`mod`],key:`Enter`},newline:{modifiers:[`shift`],key:`Enter`},transcriptSearch:{modifiers:[`mod`],key:`f`,platformSpecific:!0},terminalPanel:{modifiers:[`ctrl`],key:`Backquote`},homePanel:{modifiers:[`mod`,`shift`],key:`h`},workspaceFiles:{modifiers:[`mod`,`shift`],key:`b`},sideChat:{modifiers:[`mod`,`shift`],key:`s`},browserPanel:{modifiers:[`mod`,`alt`,`shift`],key:`u`},desktopPanel:{modifiers:[`mod`,`alt`,`shift`],key:`d`},discussionPanel:{modifiers:[`mod`,`alt`,`shift`],key:`j`},dashboardPanel:{modifiers:[`mod`,`alt`,`shift`],key:`g`},reviewPanel:{modifiers:[`mod`,`alt`,`shift`],key:`e`},approveAlways:{modifiers:[`mod`,`shift`],key:`Enter`},denyApproval:{modifiers:[`mod`],key:`d`},historyPrevious:{modifiers:[],key:`ArrowUp`},historyNext:{modifiers:[],key:`ArrowDown`},zoomIn:{modifiers:[],key:`+`},zoomOut:{modifiers:[],key:`-`},zoomReset:{modifiers:[],key:`0`},imagePanLeft:{modifiers:[`shift`],key:`ArrowLeft`},imagePanRight:{modifiers:[`shift`],key:`ArrowRight`},imagePanUp:{modifiers:[`shift`],key:`ArrowUp`},imagePanDown:{modifiers:[`shift`],key:`ArrowDown`},toggleSessionSelect:{modifiers:[`alt`],key:`Click`},extendSessionSelect:{modifiers:[`shift`],key:`Click`}}})))()}function Wr(e){return e.length<=10?`***`:`${v(e,0,6)}...${v(e,-4)}`}function Gr({match:e,groups:n,input:r,offset:i}){let a=i<0?``:r.slice(i+e.length);if(e.includes(`PRIVATE KEY-----`))return t(e,`...redacted...`);let o=n.findLast(e=>typeof e==`string`&&e.length>0)??e;if(o===`$`&&a.startsWith("`"))return e;let s=Wr(o);if(o===e)return s;let c=e.lastIndexOf(o);return c<0?`***`:`${e.slice(0,c)}${s}${e.slice(c+o.length)}`}function Kr(e){return e.replace(Jr,(e,t,n,r)=>Qe(n)?`${t}${n}=${Wr(r)}`:e)}function qr(e){let t=Kr(e);for(let e of Yr)t=Ie(t,e,Gr);return Xr.reduce((e,[t,n])=>e.replace(t,n),t)}var Jr,Yr,Xr,Zr;function Qr(){return(Qr=e((()=>{lt(),De(),Ce(),Jr=/([?&])([^=&#\s]+)=([^&#\s"'<>]+)/gu,Yr=we.map(e=>typeof e==`string`?new RegExp(...oe(e)):e),Xr=[[/\b(Authorization|Cookie|Set-Cookie)\s*:\s*[^\n\r]+/gi,`$1: [redacted]`],[/\b(Bearer\s+)[A-Za-z0-9._~+/=-]{12,}/gi,`$1[redacted]`],[/\b(api[_.-]?key|token|secret|password|passwd|authorization)\b(["'])(\s*:\s*)"(?:\\.|[^"\\\r\n])*"/gi,`$1$2$3"[redacted]"`],[/\b(api[_.-]?key|token|secret|password|passwd|authorization)\b(["'])(\s*:\s*)'(?:\\.|[^'\\\r\n])*'/gi,`$1$2$3'[redacted]'`],[/\b(api[_.-]?key|token|secret|password|passwd|authorization)\b(\s*[:=]\s*)["']?[^"',\s}]+/gi,`$1$2[redacted]`],[/-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z ]*PRIVATE KEY-----/g,`[redacted private key]`]],Zr=qr})))()}function J(e,t=``){return r(e,{redact:qr})||t}function $r(e,t=``){let n=e?.trim();return n?qr(n):t}function Y(){return(Y=e((()=>{Ke(),Qr()})))()}function ei(e){let t=e?.isConnected?e.getBoundingClientRect():null;return t&&t.width>0?t:null}function ti(){return[...document.openClawModalLayers??[]].findLast(e=>e.isConnected)}function ni(){return document.querySelector(`.shell-nav[aria-modal='true']`)??document.querySelector(`.shell`)}function ri(e){if(typeof document>`u`)return!1;let t=document.querySelector(`openclaw-toast-host`);if(!t)return oi=e,!1;let n=ti();if(n&&t.parentElement!==n){n.append(t);let e=r=>{r.target===n&&(n.removeEventListener(`wa-after-hide`,e),queueMicrotask(()=>(ti()??ni())?.append(t)))};n.addEventListener(`wa-after-hide`,e)}return t.show(e),!0}var ii,ai,oi,si;function ci(){return(ci=e((()=>{G(),In(),Fn(),Kt(),q(),jr(),Y(),ii=6e3,ai=450,oi=null,si=class extends Ar{constructor(...e){super(...e),this.toast=null,this.active=!1,this.toastQueue=[],this.dismissTimer=null,this.exitTimer=null,this.exitReason=null,this.remainingMs=0,this.deadline=0,this.hovered=!1}syncPlacement(){this.dataset.toastPlacement=this.parentElement?.matches(`.shell`)?`shell`:`overlay`}connectedCallback(){super.connectedCallback(),this.syncPlacement(),this.hovered=this.querySelector(`.app-toast`)?.matches(`:hover`)??!1,this.syncDismissTimer();let e=oi;oi=null,e&&this.show(e)}disconnectedCallback(){if(super.disconnectedCallback(),this.isConnected)return;let e=ti()??ni();this.parentElement?.localName===`openclaw-modal-dialog`&&e?e.append(this):this.dismiss(`disconnected`)}show(e){if(e.fifo&&this.toast){this.toastQueue.push(e);return}this.finishDismiss(this.exitReason??`replaced`),this.toast=e,this.active=!0,this.exitReason=null,this.remainingMs=e.durationMs??ii,this.syncDismissTimer()}updated(){this.toast||(this.hovered=!1),this.syncDismissTimer()}syncDismissTimer(e){if(!this.toast||!this.active||!this.isConnected)return;let t=this.getRootNode(),n=t instanceof ShadowRoot?t.activeElement:this.ownerDocument.activeElement,r=e??this.contains(n);this.hovered||r?this.dismissTimer!==null&&(this.remainingMs=Math.max(0,this.deadline-performance.now()),globalThis.clearTimeout(this.dismissTimer),this.dismissTimer=null):this.dismissTimer===null&&(this.deadline=performance.now()+this.remainingMs,this.dismissTimer=globalThis.setTimeout(()=>this.dismiss(`timeout`),this.remainingMs))}clearDismissTimer(){this.dismissTimer!==null&&(globalThis.clearTimeout(this.dismissTimer),this.dismissTimer=null),this.exitTimer!==null&&(globalThis.clearTimeout(this.exitTimer),this.exitTimer=null)}finishDismiss(e){let t=this.toast;if(this.clearDismissTimer(),this.active=!1,this.exitReason=null,this.toast=null,t?.onDismiss?.(e),e===`disconnected`){this.hovered=!1;let e=this.toastQueue.splice(0);for(let t of e)t.onDismiss?.(`disconnected`)}else if(e!==`replaced`){let e=this.toastQueue.shift();e&&this.show(e)}}dismiss(e){let t=this.toast;if(t){if(this.clearDismissTimer(),e!==`dismiss`&&e!==`timeout`||!this.isConnected||globalThis.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches||!ei(t.anchor)){this.finishDismiss(e);return}this.active=!1,this.exitReason=e,this.exitTimer=globalThis.setTimeout(()=>{this.toast===t&&this.finishDismiss(e)},ai)}}render(){let e=this.toast;if(!e)return jn;let t=ei(e.anchor);return W`
<div
class="app-toast ${t?`app-toast--anchored`:e.placement===`bottom`?`app-toast--bottom`:``}"
data-active=${this.active?`true`:`false`}
style=${Pn(t?{"--app-toast-anchor-center":`${t.left+t.width/2}px`,"--app-toast-anchor-top":`${t.top+(e.anchorTopOffset??0)}px`,"--app-toast-anchor-width":`${t.width}px`}:{})}
role="status"
aria-live="polite"
aria-atomic="true"
@pointerenter=${()=>{this.hovered=!0,this.syncDismissTimer()}}
@pointerleave=${()=>{this.hovered=!1,this.syncDismissTimer()}}
@focusin=${()=>this.syncDismissTimer(!0)}
@focusout=${e=>{this.syncDismissTimer(e.relatedTarget instanceof Node&&this.contains(e.relatedTarget))}}
@transitionend=${e=>{e.target===e.currentTarget&&e.propertyName===`opacity`&&!this.active&&this.exitReason&&this.finishDismiss(this.exitReason)}}
>
${e.icon?W`<span class="app-toast__icon" aria-hidden="true">${e.icon}</span>`:jn}
<span class="app-toast__message"
>${typeof e.message==`string`?$r(e.message):e.message}</span
>
${e.actionLabel&&e.onAction?W`
<button
type="button"
class="app-toast__action"
@click=${()=>{this.dismiss(`action`),e.onAction?.()}}
>
${e.actionLabel}
</button>
`:jn}
<button
type="button"
class="app-toast__dismiss"
aria-label=${K(`common.dismiss`)}
@click=${()=>this.dismiss(`dismiss`)}
>
${Vt.x}
</button>
</div>
`}},ot([Mn()],si.prototype,`toast`,void 0),ot([Mn()],si.prototype,`active`,void 0),typeof customElements<`u`&&!customElements.get(`openclaw-toast-host`)&&customElements.define(`openclaw-toast-host`,si)})))()}function li(e,t){let n=z(t);return n?T(n,pi[e]):void 0}function ui(e){let t=z(e);return t?pt(t)||mi.test(t)?t:hi.test(t)||/[\r\n]/.test(t)?null:t.length<=fi?t:null:null}function di(e){let t=li(`name`,e?.name)??gi,n=ui(e?.avatar),r=li(`avatarSource`,e?.avatarSource)??null,i=e?.avatarStatus===`none`||e?.avatarStatus===`local`||e?.avatarStatus===`remote`||e?.avatarStatus===`data`?e.avatarStatus:null,a=li(`avatarReason`,e?.avatarReason)??null;return{agentId:typeof e?.agentId==`string`&&e.agentId.trim()?e.agentId.trim():null,name:t,avatar:n,avatarSource:r,avatarStatus:i,avatarReason:a}}var fi,pi,mi,hi,gi;function _i(){return(_i=e((()=>{le(),fi=64,pi={name:50,avatarSource:500,avatarReason:200},mi=/^\/(?!\/)/,hi=/^[a-z][a-z0-9+.-]*:/i,gi=`Assistant`})))()}function vi(e){return pt(e)||Si.test(e)}function yi(e,t){let n=[z(t?.avatar),z(e.identity?.avatarUrl),z(e.identity?.avatar)];for(let e of n)if(e&&vi(e))return e;return null}function bi(e,t,n){let r=z(e);return r?.startsWith(`blob:`)?r:yi(t,n)}function xi(e){let t=e?.trim();return!t||t===`A`||t.startsWith(`blob:`)||vi(t)||t.length>8||/\s/.test(t)||/[\\/.:]/.test(t)||Ci.test(t)?null:t}var Si,Ci;function wi(){return(wi=e((()=>{le(),_i(),Si=/^\/(?!\/)/,Ci=/[\u200B-\u200F\u202A-\u202E\u2060-\u206F\uFEFF]/u})))()}function Ti(e){let t=e.trim().toLowerCase();return zi.has(t)?`openai`:t}function Ei(e,t){let n=e.trim();if(!n)return``;let r=t?.trim();if(!r)return n;let i=`${r.toLowerCase()}/`;return n.toLowerCase().startsWith(i)?n:`${r}/${n}`}function Di(e,t){let n=e?.trim();return n?n.includes(`/`)?n:ki(n,t)||n:``}function Oi(e,t){let n=t.trim().toLowerCase();return n?e.some(e=>Pi(e)===n):!1}function ki(e,t){let n=e.trim().toLowerCase();if(!n)return``;let r=``;for(let e of t){if(e.id.trim().toLowerCase()!==n)continue;let t=Ei(e.id,e.provider);if(!r){r=t;continue}if(r.toLowerCase()!==t.toLowerCase())return``}return r}function Ai(e,t,n){if(typeof e!=`string`)return``;let r=e.trim();if(!r)return``;let i=t?.trim();if(!i)return Di(r,n);if(!r.includes(`/`)){let e=Di(r,n);return e===r?Ei(r,i):e}let a=Ei(r,i),o=r.toLowerCase(),s=Ti(i);return n.some(e=>e.id.trim().toLowerCase()===o&&Ti(e.provider)===s)&&Oi(n,a)?a:Oi(n,r)?r:Oi(n,a)?a:ki(r,n)||r}function ji(e){let t=e.trim();if(!t)return``;let n=t.indexOf(`/`);return n<=0?t:`${t.slice(n+1)} · ${t.slice(0,n)}`}function Mi(e){let t=e.provider?.trim();return t?`${e.id} · ${t}`:e.id}function Ni(e){let t=e.name.trim(),n=e.alias?.trim();return!t||!n?t||n||``:n.toLowerCase()===t.toLowerCase()?t:n.toLowerCase().includes(t.toLowerCase())?n:`${t} · ${n}`}function Pi(e){return Ei(e.id,e.provider).trim().toLowerCase()}function Fi(e,t){return`${e.toLowerCase()}\u0000${t?.trim().toLowerCase()??``}`}function Ii(e){let t=new Map,n=new Map,r=e.map(e=>{let t=Ni(e);return{entry:e,name:t,qualifiedKey:i(Ei(e.id,e.provider)),nameKey:t.toLowerCase(),providerKey:Fi(t,e.provider)}});for(let{name:e,qualifiedKey:i,nameKey:a,providerKey:o}of r){if(!e)continue;let r=t.get(a)??new Set;r.add(i),t.set(a,r);let s=n.get(o)??new Set;s.add(i),n.set(o,s)}return new Map(r.map(({entry:e,name:r,qualifiedKey:i,nameKey:a,providerKey:o})=>{let s=r||Mi(e);return r&&(t.get(a)?.size??0)>1&&(s=`${r} · ${(n.get(o)?.size??0)<=1?e.provider?.trim()||e.id:Mi(e)}`),[i,s]}))}function Li(e,t){let n=e.trim();return n?t.get(i(n))??ji(n):``}function Ri(e,t){let n=Ei(e.id,e.provider);return{value:n,label:t.get(i(n))??Mi(e)}}var zi;function Bi(){return(Bi=e((()=>{Je(),zi=new Set([`codex`,`openai-codex`])})))()}function Vi(e,t){return X(e.key)?.agentId??e.agentId??t}function X(e){let t=Le(e);return qe(t.startsWith(`:`)||t.endsWith(`:`)||t.includes(`::`)?t.split(`:`).filter(Boolean).join(`:`):t)}function Hi(e){let t=/^agent:([^:]+):([^:]+):(.+)$/.exec(e);return t?{agentId:t[1],channel:t[2],accountId:t[3]}:null}function Ui(e){return z(e?.parentSessionKey)??z(e?.spawnedBy)}function Wi(e){if(ga(e.key)||z(e.spawnedBy))return!1;let t=z(e.parentSessionKey);if(!t)return!0;let n=X(e.key);return n?.agentId?t===l({agentId:n.agentId}):!1}function Gi(e){let t=z(e);if(!t)return``;if(!/(?:^|:)(?:catalog|matrix|signal)(?=:|$)/i.test(t))return t.toLowerCase();let n=t.split(`:`),r=0;for(;n.length-r>=3&&n[r]?.toLowerCase()===`agent`;)n[r]=`agent`,n[r+1]=n[r+1]?.toLowerCase()??``,r+=2;for(;r<n.length&&!n[r]?.trim();)r+=1;let i=n[r]?.toLowerCase();if(i===`catalog`)return n.join(`:`);let a=n[r+1]?.toLowerCase(),o=i===`matrix`&&(a===`channel`||a===`group`);if(!o&&(i!==`signal`||a!==`group`))return t.toLowerCase();if(n[r]=i,n[r+1]=a,o){for(let e=n.length-2;e>=r+2;--e)if(n[e]?.toLowerCase()===`thread`){n[e]=`thread`;break}}else{n[r+2]=n[r+2]?.trim()??``;for(let e=r+3;e<n.length;e+=1)n[e]=n[e]?.toLowerCase()??``}return n.join(`:`)}function Ki(e){let t=e.hello?.snapshot;if(!t||typeof t!=`object`||!(`sessionDefaults`in t))return;let n=t.sessionDefaults;return n&&typeof n==`object`?n:void 0}function qi(e){return n(e.agentsList?.mainKey??Ki(e)?.mainKey)}function Ji(e){return F(e.agentsList?.defaultId??Ki(e)?.defaultAgentId??`main`)}function Yi(e){let t=e.assistantAgentId??e.agentsList?.defaultId??Ki(e)?.defaultAgentId;return t?F(t):void 0}function Xi(e){return Yi(e)??`main`}function Zi(e,t){let n=z(t);if(!n||Qi(n))return null;let r=ea(e,n);return r.sessionKey===`global`?r.agentId??null:null}function Qi(e){return Le(e)===`global`}function $i(e){let t=$e(e.agentsList?.scope);return t?t===`global`:Qi(Ki(e)?.mainSessionKey)}function ea(e,t,r){let i=t.trim(),a=X(i),o=ta(e),s=qi(e),c=a?.rest??i.toLowerCase(),u=c===`main`||o&&c===s;if(Qi(i)){let t=r?.trim()?F(r):Yi(e);return{sessionKey:`global`,...t?{agentId:t}:{}}}if(!a&&(!u||!o))return{sessionKey:i};let d=F(a?.agentId??z(r)??Ji(e)),f=Gi(i);if(u&&o){let t=Ki(e),r=z(t?.mainSessionKey),i=r&&d===Ji(e)&&d===F(t?.defaultAgentId)&&d===X(r)?.agentId&&s===n(t?.mainKey);f=$i(e)?`global`:i?Gi(r):l({agentId:d,mainKey:s})}return{sessionKey:f,agentId:d}}function ta(e){return e.agentsList!=null||Ki(e)!==void 0}function na(e,t){let n=e.trim();return!n||X(n)||!t?.trim()?n:`agent:${F(t)}:${n}`}function ra(e,t){let n=z(t);return n?ea(e,n).sessionKey:``}function ia(e,t,n,r,i){let a=z(t),o=z(n);if(!a||!o)return!1;let s=z(i),c=ea(e,a,s),l=z(r),u=Ji(e),d=ea(e,o,l??u),f=c.agentId??u,p=d.agentId??u;return(!s||F(s)===f)&&(!l||F(l)===p)&&c.sessionKey===d.sessionKey&&f===p}function aa(e,t,n){return!z(t)||ia(e,e.sessionKey,t,n)}function oa(e,t){return ra(e,t)===`global`}function sa(e,t=e.sessionKey){return ea(e,t??``).agentId}function ca(e,t,n,r){let i=n?ea(e,n):null;return ia(e,n,t,r??(Qi(t)?i?.agentId:void 0))}function la(e){let t=Gi(e);return t===`main`?l({agentId:va,mainKey:p}):t}function Z(e,t){let n=la(e),r=la(t);return!!(n&&r&&n===r)}function ua(e){let t=X(e);return F(t?.agentId??`main`)}function da(e,t){let r=Le(e.key);return e.kind===`global`||e.kind===`unknown`||r===`global`||r===`unknown`||e.key===`main`||Le(X(e.key)?.rest)===n(t)}function fa(e,t){return!(!e.sessionId?.trim()||da(e,t))}function pa(e,t){return e.every(e=>e.archived===!0)||e.every(e=>e.hasActiveRun!==!0&&!da(e,t))}function ma(e,t,n=va){let r=F(t),i=X(e);return i?F(i.agentId)===r:r===F(n)}function ha(e,t){let n=Le(e);return n.startsWith(t)||Le(X(n)?.rest).startsWith(t)}function ga(e){return ha(e,`subagent:`)}function _a(e){return ha(e,`acp:`)}var va;function Q(){return(Q=e((()=>{M(),Ve(),va=`main`})))()}function ya(e){return{client:e?.client??null,connected:e?.phase===`connected`,applySessionKey:e?.sessionKey??`main`,configLoading:!1,configRaw:`{
}
`,configRawOriginal:``,configRawOriginalParsed:Fa(null),configRawOriginalParsePending:Fa(null),configValid:Fa(null),configIssues:Fa([]),configSaving:!1,configApplying:!1,configAutoSaveStatus:Fa(`idle`),configRecoveryError:Fa(null),configNeedsApply:!1,configSnapshot:Fa(null),configDraftBaseHash:Fa(null),configSchema:Fa(null),configSchemaVersion:Fa(null),configSchemaLoading:!1,configUiHints:Fa({}),configForm:Fa(null),configFormOriginal:Fa(null),configFormDirty:!1,configFormMode:Fa(`form`),configSearchQuery:``,configActiveSection:Fa(null),configActiveSubsection:Fa(null),lastError:Fa(null)}}function ba(e){let t=za.get(e);za.delete(e),t?.invalidated.resolve({ok:!1,error:`The configuration refresh was superseded.`})}function xa(e){return za.get(e)}function Sa(e,t){let n={version:Ca(e,`config`),client:t,connectionEpoch:Ta(e),completion:mt(),invalidated:mt()};return za.set(e,n),n}function Ca(e,t){t===`config`&&ba(e);let n=Ia.get(e)??{config:0,schema:0},r={...n,[t]:n[t]+1};return Ia.set(e,r),r[t]}function wa(e){ba(e),Ia.delete(e)}function Ta(e){return La.get(e)??0}function Ea(e,t){e.configSnapshot=t,Ra.delete(e)}function Da(e){Ra.add(e),ba(e),La.set(e,Ta(e)+1)}function Oa(e,t,n){return e.connected&&e.client===t&&Ta(e)===n}function ka(e,t,n,r,i){return Oa(e,r,i)&&Ia.get(e)?.[t]===n}function Aa(e){return I(e?.sourceConfig)??I(e?.resolved)??I(e?.config)}function ja(e){return Ra.has(e)?null:e.configForm??Aa(e.configSnapshot)}function Ma(e){let t=e.trim();if(!Ba.test(t))return null;let n=F(t);return Va.has(n)?null:n}function Na(e,t){let n=Ma(t);if(!n)return null;let r=I(e?.agents),i=I(r?.entries),a=Object.keys(i??{}).find(e=>Ba.test(e)&&F(e)===n);if(!i||!a)return null;let o=i[a];return O(o)?{path:[`agents`,`entries`,a],entry:o}:null}function Pa(e,t,n={}){let r=Ma(t);return r?Na(e.configForm??Aa(e.configSnapshot),r)||(n.ensure?{path:[`agents`,`entries`,r],entry:{}}:null):null}var Fa,Ia,La,Ra,za,Ba,Va;function Ha(){return(Ha=e((()=>{je(),Q(),Fa=e=>e,Ia=new WeakMap,La=new WeakMap,Ra=new WeakSet,za=new WeakMap,Ba=/^[a-z0-9_][a-z0-9_-]{0,63}$/i,Va=new Set([`__proto__`,`prototype`,`constructor`])})))()}function Ua(e){return e.filter(e=>e.kind!==`system`)}function Wa(e){return{...e,agents:Ua(e.agents)}}function Ga(e,t){return z(e.name)??z(e.identity?.name)??z(t?.name)??e.id}function Ka(e,t){return(t?.nameSource&&t.nameSource!=="default"?z(t.name):void 0)??z(e.name)??z(e.identity?.name)??e.id}function qa(e,t){let n=[z(e.identity?.emoji),z(e.identity?.avatar),z(t?.emoji),z(t?.avatar)];for(let e of n){let t=xi(e);if(t)return t}return null}function Ja(e,t={}){return e==null||!Number.isFinite(e)?t.fallback??`-`:de(e,{style:`legacy-binary`,maxUnit:t.maxUnit??`tera`,separator:` `,fractionDigits:t.fractionDigits??((e,t)=>t===`byte`?null:+(e<10))})}function Ya(e,t){let n=e;return{entry:Na(e,t)?.entry,defaults:n?.agents?.defaults,globalTools:n?.tools}}function Xa(e,t){let n=Ya(e,t);return Array.isArray(n.entry?.skills)?x(n.entry.skills):Array.isArray(n.defaults?.skills)?x(n.defaults.skills):void 0}function Za(e,t,n,r,i){let a=Ya(t,e.id),o=(n&&n.agentId===e.id?n.workspace:null)||a.entry?.workspace||e.workspace||a.defaults?.workspace||`default`,s=eo(a.entry?.model)??eo(a.defaults?.model)??eo(e.model),c=no(a.entry?.model,a.defaults?.model)??(t?null:to(e.model)),l=s?Qa({primary:s,fallbacks:c}):`-`,u=fe(e.agentRuntime),d=z(e.identity?.name)||z(e.name)||z(i?.name)||a.entry?.name||e.id,f=yi(e,i)?`custom`:qa(e,i)??`—`,p=Xa(t,e.id);return{workspace:o,model:l,runtime:u,identityName:d,identityAvatar:f,skillsLabel:p?K(`agents.overview.selectedSkills`,{count:String(p.length)}):K(`agents.overview.allSkills`),isDefault:!!(r&&e.id===r)}}function Qa(e){if(!e)return`-`;if(typeof e==`string`)return z(e)||`-`;if(typeof e==`object`){let t=e,n=z(t.primary);if(n){let e=Array.isArray(t.fallbacks)?t.fallbacks.length:0;return e>0?`${n} (+${e} fallback)`:n}}return`-`}function $a(e){return e.match(/^(.+) \(\+\d+ fallback\)$/)?.[1]??e}function eo(e){if(typeof e==`string`)return z(e)??null;if(!e||typeof e!=`object`)return null;let t=e,n=[t.primary,t.model,t.id,t.value].find(e=>typeof e==`string`);return z(n)??null}function to(e){if(!e||typeof e!=`object`)return null;let t=e,n=Array.isArray(t.fallbacks)?t.fallbacks:Array.isArray(t.fallback)?t.fallback:null;return n?n.filter(e=>typeof e==`string`):null}function no(e,t){return to(e)??(eo(e)?[]:to(t))}function ro(e,t){let n=e?.agents?.defaults?.models,r=t?Ya(e,t)?.entry?.models:void 0,i=Object.keys({...n,...r}),a=[];for(let e of i){let t=e.trim();if(!t)continue;let i=n?.[e],o=r?.[e],s=o?.alias===void 0?z(i?.alias):z(o.alias)??``,c=t.indexOf(`/`);a.push({value:t,label:s&&s!==t?`${s} (${t})`:t,provider:c>0?t.slice(0,c):void 0,alias:s})}return a}function io(e,t,n){if(!t)return()=>!1;let r=S(e?.agents),a=S(r?.defaults),o=n?Na(e,n)?.entry:void 0,s=[S(a?.models),S(o?.models)],c=new Map;for(let e of s)for(let[t,n]of Object.entries(e??{})){if(ie(t)||!O(n)||!Object.hasOwn(n,`alias`))continue;let e=i(t);c.delete(e),c.set(e,z(n.alias)??``)}let l=new Map,u=new Map;for(let[e,t]of c)if(t){let n=Le(t);l.set(n,e);let r=y(e);r&&u.set(`${r.provider}/${n}`,e)}let d=t.trim(),{model:f,profile:p}=N(d),m=l.get(Le(d)),h=p?m??l.get(Le(f)):void 0,g=y(f),_=S(e?.models),v=S(_?.providers),b=S(g?ee(v,g.provider):void 0),x=Le(b?.api),C=!!(x&&x!==g?.provider),w=f;h?w=h:!p&&m&&!C&&(!g||y(m))&&(w=m);let T=i(w);return e=>{let{model:t,profile:n}=N(e),r=y(t),a=l.get(Le(t))??(r?u.get(`${r.provider}/${Le(r.modelId)}`):void 0)??t;return i(a)===T&&(!n||n===p)}}function ao(e,t,n,r){let a=new Set,o=[],s=new Map,c=ro(e,r),l=e=>{let t=i(e.value);a.has(t)||(a.add(t),o.push(e))};if(n){let e=new Map(c.map(e=>[i(e.value),e.alias])),t=n.map(t=>{let n=i(`${t.provider}/${t.id}`),r=e.get(n);return r===void 0?t:{...t,alias:r||void 0}}),r=Ii(t);for(let e of t){let t=Ri(e,r);s.set(i(t.value),{...t,provider:e.provider,tags:e.tags,...e.available===!1?{disabled:!0}:{}})}}for(let e of c)l(s.get(i(e.value))??e);for(let e of s.values())l(e);if(t&&!a.has(i(t))){let e=t.indexOf(`/`);o.unshift({value:t,label:`Current (${t})`,provider:e>0?t.slice(0,e):void 0})}return o}function oo(){return(oo=e((()=>{ae(),te(),Ke(),o(),Je(),d(),g(),q(),wi(),Bi(),Ha()})))()}function so(e){document.dispatchEvent(new CustomEvent(mo,{detail:e}))}async function co(e){let{agentId:t,client:n,key:r}=e,i,a=new Set,o=null;for(let s=0;s<go;s+=1){let s=await n.request(`sessions.catalog.list`,{agentId:t,catalogId:r.catalogId,hostIds:[r.hostId],limitPerHost:ho,...i?{cursors:{[r.hostId]:i}}:{}});if(!e.isCurrent())return null;o=s.catalogs.find(e=>e.id===r.catalogId)?.hosts.find(e=>e.hostId===r.hostId)??null;let c=o?.sessions.find(e=>e.threadId===r.threadId)??null;if(c)return{host:o,session:c};let l=o?.nextCursor;if(!l||a.has(l))break;a.add(l),i=l}return{host:o,session:null}}function lo(e,t){let n=`catalog:${encodeURIComponent(e.catalogId)}:${encodeURIComponent(e.hostId)}:${encodeURIComponent(e.threadId)}`;return t?`agent:${F(t)}:${n}`:n}function uo(e){return`?${new URLSearchParams({catalog:e.catalogId,host:e.hostId,thread:e.threadId,...e.sourceHomeId?{sourceHomeId:e.sourceHomeId}:{}}).toString()}`}function fo(e){let t=new URLSearchParams(e),[n,r,i,a]=[`catalog`,`host`,`thread`,`sourceHomeId`].map(e=>t.get(e)?.trim());return n&&r&&i?{catalogId:n,hostId:r,threadId:i,...a?{sourceHomeId:a}:{}}:null}function po(e){let t=e?.replace(/^agent:[^:]+:/u,``);if(!t?.startsWith(`catalog:`))return null;let n=t.slice(8).split(`:`);if(n.length!==3)return null;try{let[e,t,r]=n.map(e=>decodeURIComponent(e));return e&&t&&r?{catalogId:e,hostId:t,threadId:r}:null}catch{return null}}var mo,ho,go;function _o(){return(_o=e((()=>{Q(),mo=`openclaw-session-catalog-continued`,ho=100,go=100})))()}function vo(e){return`?${new URLSearchParams({draft:e,[Oo]:`1`}).toString()}`}function yo(e,t){return e!==`unknown`&&(e!==`global`||t)}function bo(e){return e?.boardFace===`dashboard`?`dashboard`:`chat`}function xo(e,t,n){let r=e.sessions.state.result?.sessions.find(e=>Z(e.key,t));if(!r||!Qi(r.key))return r;let i=e.sessions.state.agentId?.trim(),a=wo(e,n);return i&&F(i)===F(a)?r:void 0}function So(e,t,n){return bo(xo(e,t,n))}function Co(e,t,n){let r=So(e,t,n),i=To({context:e,face:r,sessionKey:t,agentId:n,preferenceDerivedFace:!0,exactKey:!0});rn({selection:e.agentSelection,gateway:e.gateway,sessionKey:t,agentId:n}),e.navigate(r,i.options)}function wo(e,t){let n={agentsList:e.agents.state.agentsList,hello:e.gateway.snapshot.hello};return t?.trim()||e.agentSelection.state.selectedId?.trim()||Ji(n)}function To(e){let t=e.context,n=e.sessionKey,r,i,a,o;if(t){let s={agentsList:t.agents.state.agentsList,hello:t.gateway.snapshot.hello};r=wo(t,e.agentId),i=e.basePath??t.basePath,o=qi(s),a=xo(t,n,r)}else r=e.fallbackAgentId,i=e.basePath??``,a=e.row,o=e.mainKey;let s=po(a?.key??n),c=s?l({agentId:X(n)?.agentId??r,mainKey:o??`main`}):a?.key??n,u=qt(e.face,r,c,i,{displayName:s?void 0:a?.displayName,exactKey:e.exactKey,mainKey:o,shortIdLength:e.shortIdLength})??nn(e.face,i),d=s?uo(s):void 0,f=new URLSearchParams(d??``);e.preferenceDerivedFace&&!a&&f.set(Eo,`1`),e.focusComposer&&f.set(Oo,`1`),e.dashboardExpanded&&f.set(ko,`expanded`);let p=e.navigationKey?.trim()||a?.key;p&&Ao.test(p)&&f.set(Do,p);let m=f.toString(),h=m?{pathname:u,search:`?${m}`}:{pathname:u},g=new URLSearchParams(d??``);e.dashboardExpanded&&g.set(ko,`expanded`);let _=g.toString();return{href:`${u}${_?`?${_}`:``}`,options:h}}var Eo,Do,Oo,ko,Ao;function jo(){return(jo=e((()=>{U(),tn(),cn(),_o(),Q(),Eo=`__openclawSessionFacePreference`,Do=`__openclawSessionKey`,Oo=`__openclawComposerFocus`,ko=`dashboard`,Ao=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu})))()}var Mo;function No(){return(No=e((()=>{Mo=class{constructor(e){this.host=e,this.entries=[],this.connected=!1,e.addController(this)}watch(e,t,n,r){return this.addEntry(e,(e,i)=>{let a=i.generation,o=t(e,()=>{this.connected&&i.generation===a&&Object.is(i.source,e)&&(n?.(e),!r||globalThis.document?.visibilityState===`hidden`||typeof globalThis.requestAnimationFrame!=`function`?this.host.requestUpdate():i.frame===void 0&&(i.frame=globalThis.requestAnimationFrame(()=>{i.frame=void 0,this.connected&&i.generation===a&&Object.is(i.getSource(),e)&&(this.host.requestUpdate(),r())})))});return i.cleanup=o,n?.(e),o},!0)}effect(e,t){return this.addEntry(e,e=>t(e),!1)}hostConnected(){this.connected=!0,this.refresh(!0)}hostUpdate(){this.connected&&this.refresh(!1)}clear(){for(let e of this.entries)this.disconnectEntry(e)}hostDisconnected(){this.connected=!1,this.clear()}addEntry(e,t,n){let r={getSource:e,connect:e=>t(e,r),invalidateOnConnect:n,source:void 0,cleanup:void 0,generation:0,frame:void 0};return this.entries.push(r),this.connected&&this.refreshEntry(r,n),this}refresh(e){for(let t of this.entries)this.refreshEntry(t,e&&t.invalidateOnConnect)}refreshEntry(e,t){let n=e.getSource()??void 0;if(!Object.is(e.source,n)&&(this.disconnectEntry(e),n!==void 0)){e.source=n,e.generation+=1;try{e.cleanup=e.connect(n)}catch(t){throw this.disconnectEntry(e),t}t&&this.host.requestUpdate()}}disconnectEntry(e){e.generation+=1,e.frame!==void 0&&(globalThis.cancelAnimationFrame(e.frame),e.frame=void 0),e.source=void 0;let t=e.cleanup;if(e.cleanup=void 0,t)try{t()}catch(e){console.error(`[openclaw] subscription cleanup failed`,e)}}}})))()}var Po,Fo,Io,Lo;function Ro(){return(Ro=e((()=>{Po=`openclaw-chat-route-ready`,Fo=`openclaw-chat-transcript-loading-changed`,Io=`openclaw-chat-pane-lifecycle-changed`,Lo=`openclaw-chat-run-activity-changed`})))()}var zo;function Bo(){return(Bo=e((()=>{zo=class{constructor(){this.lastDeviceToken=``}key(e){if(!e)return``;let{gatewayUrl:t,token:n,password:r,bootstrapToken:i}=e.connection,a=e.snapshot.hello?.auth;return a&&(this.lastDeviceToken=a.deviceToken??``),JSON.stringify([t,n,r,i,this.lastDeviceToken])}}})))()}function Vo(e){let t=Jo.get(e);if(!t){let n=new zo;t={identity:n,scope:n.key(e.gateway),pendingDraft:``,focusRequest:0,selectionEpoch:0,seenGateways:new Set,listeners:new Set},Jo.set(e,t);let r=t;e.gateway.subscribe(()=>{Uo(e,r),Wo(r)}),e.router.subscribe(()=>{r.publication&&r.publication.pathname!==Ho(e)&&(r.publication=void 0,r.selectionEpoch+=1,Wo(r))})}return Uo(e,t),t}function Ho(e){return e.router.getState().location?.pathname??window.location.pathname}function Uo(e,t){let n=t.identity.key(e.gateway);t.scope!==n&&(t.scope=n,t.publication=void 0,t.selectionEpoch+=1,t.pendingDraft=``,t.focusRequest=0)}function Wo(e){for(let t of e.listeners)t()}function Go(e,t){let n=Vo(e);return n.listeners.add(t),()=>n.listeners.delete(t)}function Ko(e){let t=Vo(e),n=e.gateway.connection.gatewayUrl;return!t.publication?.overview||!t.publication.installed||t.seenGateways.has(n)?!1:(t.seenGateways.add(n),!0)}function qo(e){Vo(e).seenGateways.add(e.gateway.connection.gatewayUrl)}var Jo;function Yo(){return(Yo=e((()=>{Bo(),Jo=new WeakMap})))()}function Xo(){return(Xo=e((()=>{})))()}function Zo(){return(Zo=e((()=>{})))()}function Qo(){for(let e of as)e()}function $o(){if(is.size===0||as.size===0){ss!==null&&(cancelAnimationFrame(ss),ss=null);return}ss===null&&(ss=requestAnimationFrame(()=>{ss=null,Qo(),$o()}))}function es(e){for(let t of is)for(let n of t()){if(!n.isConnected)continue;let t=n.getBoundingClientRect();if(t.width>0&&t.height>0&&t.left<e.right&&t.right>e.left&&t.top<e.bottom&&t.bottom>e.top)return!0}return!1}function ts(){if(!Rt())return()=>{};os+=1,os===1&&Qo();let e=!1;return()=>{e||(e=!0,--os,os===0&&Qo())}}function ns(e,t){if(!Rt())return e(!1),()=>{};let n,r=()=>{let r=t(),i=os>0||!!(r&&r.width>0&&r.height>0&&es(r));i!==n&&(n=i,e(i))};return as.add(r),r(),$o(),()=>{as.delete(r),$o()}}function rs(e,t=`toggle`,n=()=>[e,...e.querySelectorAll(`*`)]){if(!Rt()||!e.isConnected||cs.has(e))return;is.add(n),$o();let r=new MutationObserver(()=>{e.isConnected||a()}),i=n=>{n.target===e&&(t!==`toggle`||n.newState===`closed`)&&a()},a=()=>{r.disconnect(),e.removeEventListener(t,i),cs.delete(e),is.delete(n),Qo(),$o()};cs.add(e),e.addEventListener(t,i);let o=e.getRootNode();for(r.observe(o,{childList:!0,subtree:!0});o instanceof ShadowRoot;)o=o.host.getRootNode(),r.observe(o,{childList:!0,subtree:!0})}var is,as,os,ss,cs;function ls(){return(ls=e((()=>{is=new Set,as=new Set,os=0,ss=null,cs=new WeakSet})))()}function us(e){let t=e.sessionKey.trim().toLowerCase(),n=e.agentId??X(e.sessionKey)?.agentId??(t===`global`||t===`main`?`@unresolved`:`main`);return`${e.sessionKey}\u0000agent:${n}`}var ds;function fs(){return(fs=e((()=>{Q(),ds=`@unresolved`})))()}function ps(e,t){let n=null,r=!1,i=!1,a=()=>(n??=e().then(e=>(window.removeEventListener(`online`,o),t?.(e),e)).catch(e=>{throw n=null,r?(window.addEventListener(`online`,o,{once:!0}),navigator.onLine&&!i&&(i=!0,s()),e):e}),n),o=()=>r&&void a().catch(()=>void 0),s=()=>{n||(`requestIdleCallback`in window?requestIdleCallback(o,{timeout:3e3}):setTimeout(o,1500))},c=()=>{r=!0,i=!1};return{schedule:()=>{c(),s()},load:()=>(c(),a()),dispose:()=>{r=!1,window.removeEventListener(`online`,o)}}}function ms(){return(ms=e((()=>{})))()}function hs(e){let t=e.trim();return t.length<=10?t:`…${v(t,-6)}`}function gs(e){return e.replace(ks,e=>`…${e.slice(-4)}`)}function _s(e,t){if(!Ms.test(e))return{channelSession:!1};let n=e.match(js)?.[1],r=z(n)??z(t);return{channel:r,channelSession:!!r}}function vs(e){return e.split(/[\\/]/).findLast(Boolean)??e}function ys(e){let t=z(e.repository?.url.replace(/\.git$/u,``))??(e.execNode?void 0:z(e.worktree?.repoRoot));if(t){let n=(e.placement&&`remoteWorkspaceDir`in e.placement?z(e.placement.remoteWorkspaceDir):void 0)??(e.execNode?z(e.execCwd):void 0),r=z(e.repository?.branch)??z(e.worktree?.branch);return{kind:`project`,name:vs(t),path:t,cwd:e.repository?n:z(e.spawnedCwd),branch:!e.repository&&r?.startsWith(As)?r.slice(9):r}}let n=e.execNode?z(e.execCwd):z(e.spawnedWorkspaceDir)??z(e.spawnedCwd);return n?{kind:`workspace`,name:vs(n),path:n}:void 0}function bs(e){let t=z(e.execNode),n=t?gs(t):void 0,r=z(e.repository?.url.replace(/\.git$/u,``))??z(e.worktree?.repoRoot),i=z(e.repository?.branch)??z(e.worktree?.branch),a=!e.repository&&i?.startsWith(As)?i.slice(9):i,o=r?a?`${vs(r)} ⎇ ${a}`:vs(r):void 0;return o&&n?`${o} · ${n}`:o??n}function xs(e,t){if(!t||t==="default")return e;let n=` · ${t}`;return e.endsWith(n)?e:`${e}${n}`}function Ss(e){return K(e===`subagent`?`sessionsView.subagentPrefix`:`sessionsView.automationPrefix`)}function Cs(e){return Ds.get(e)??e.charAt(0).toUpperCase()+e.slice(1)}function ws(e){let t=Le(e);if(e===`main`||/^agent:[^:]+:main$/u.test(e))return{prefix:``,fallbackName:`Main Session`};if(e.includes(`:subagent:`)){let e=Ss(`subagent`);return{kind:`subagent`,prefix:e,fallbackName:e}}if(t.startsWith(`cron:`)||e.includes(`:cron:`)){let e=Ss(`automation`);return{kind:`automation`,prefix:e,fallbackName:e}}let n=e.match(/^agent:[^:]+:([^:]+)(?::([^:]+))?:(?:direct|dm):(.+)$/);if(n){let t=n[1],r=n[2],i=n[3];return!t||!i?{prefix:``,fallbackName:e,accountId:r}:{prefix:``,fallbackName:`${Cs(t)} · ${hs(i)}`,accountId:r}}let r=e.match(/^agent:[^:]+:([^:]+):group:(.+)$/);if(r){let t=r[1];return t?{prefix:``,fallbackName:`${Cs(t)} Group`}:{prefix:``,fallbackName:e}}for(let t of Os)if(e===t||e.startsWith(`${t}:`))return{prefix:``,fallbackName:`${Cs(t)} Session`};if(/^agent:[^:]+:dashboard:/.test(e))return{prefix:``,fallbackName:`New session`};let i=e.match(/^agent:[^:]+:(?:explicit:)?(.+)$/)?.[1];return i?{prefix:``,fallbackName:gs(i)}:{prefix:``,fallbackName:e}}function Ts(e,t,n={}){let r=z(t?.label)??``,i=z(t?.displayName)??``,a=z(t?.derivedTitle)??``,{kind:o,prefix:s,fallbackName:c,accountId:l}=ws(e),u=z(t?.accountId)??l,d=e=>{if(!o||!s)return e;let t=o===`automation`&&e.replace(/^cron(\s+job)?:\s*/i,``).trim()||e,r=RegExp(`^${s.replace(/[.*+?^${}()|[\\]\\]/g,`\\$&`)}\\s*`,`i`);return o===`subagent`&&n.includeSubagentPrefix===!1?t.replace(r,``).trim()||c:r.test(t)?t:`${s} ${t}`};return xs((()=>{if(r&&r!==e)return d(r);if(i&&i!==e)return d(i);let n=t?bs(t):void 0;return n&&t?.worktree?d(n):a&&a!==e?d(a):c})(),u)}function Es(e){return u(e.key)?`cron`:e.kind}var Ds,Os,ks,As,js,Ms;function Ns(){return(Ns=e((()=>{h(),q(),Ds=new Map([[`imessage`,`iMessage`],[`telegram`,`Telegram`],[`discord`,`Discord`],[`signal`,`Signal`],[`slack`,`Slack`],[`whatsapp`,`WhatsApp`],[`matrix`,`Matrix`],[`msteams`,`Microsoft Teams`],[`bluebubbles`,`BlueBubbles`],[`googlechat`,`Google Chat`],[`mattermost`,`Mattermost`],[`irc`,`IRC`],[`email`,`Email`],[`sms`,`SMS`]]),Os=[...Ds.keys()],ks=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|[0-9a-f]{10,}/gi,As=`openclaw/`,js=/^agent:[^:]+:([^:]+)(?:(?::[^:]+)?:(?:direct|dm)|:(?:group|channel|thread)):/,Ms=/:(?:direct|dm|group|channel|thread):/})))()}function Ps(e,t){for(let n=(e?.length??0)-1;n>=0;--n)t(e[n])&&e.splice(n,1)}function Fs(e,t){for(let n of Ls.get(e)?.values()??[])Ps(n,e=>e.isCurrent()&&t.some(({key:t,retireBeforeRevision:n})=>Z(e.sessionKey,t)&&e.expiresAt-3e4<n))}var Is,Ls;function Rs(){return(Rs=e((()=>{Q(),Is=3e4,Ls=new WeakMap})))()}function zs(e){let t=e?.trim()??``;if(!t)return K(`common.unknown`);try{return new URL(t).host||t}catch{return t}}function Bs(){return(Bs=e((()=>{q()})))()}function Vs(e){let t=e.getRootNode();return e.assignedSlot??e.parentElement??(t instanceof ShadowRoot?t.host:null)}function Hs(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function Us(e){for(let t of e.composedPath())if(t instanceof HTMLAnchorElement)return t;return e.target instanceof Element?e.target.closest(`a`):null}function Ws(e){let t=Us(e);if(!t||t.hasAttribute(`download`)||t.hasAttribute(`data-file-path`))return null;try{let e=new URL(t.href,window.location.href);return(e.protocol===`http:`||e.protocol===`https:`)&&e.origin!==window.location.origin?{anchor:t,url:e}:null}catch{return null}}function Gs(){return(Gs=e((()=>{})))()}function Ks(e,t){return e.phase===`connected`&&t&&en(e.hello?.auth??null)&&(zn(e,`terminal.open`)??!1)}function qs(){return(qs=e((()=>{Jt(),Vn()})))()}var Js;function Ys(){return(Ys=e((()=>{B(),G(),U(),s(),Js=R({...H(`about`),component:()=>V(()=>import(`./about-page-DkWix_H2.js`).then(()=>({header:!0,render:()=>W`<openclaw-about-page></openclaw-about-page>`})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38]),import.meta.url)})})))()}function Xs(e){return Cn(e,Ut)}var Zs;function Qs(){return(Qs=e((()=>{B(),U(),s(),Zs=R({...H(`activity`),loaderDeps:(e,t)=>{let{pathname:n,search:r,hash:i}=Xs(t);return`${n}\u0000${r}\u0000${i}`},loader:(e,{location:t})=>Xs(t),component:()=>V(()=>import(`./activity-page-B-bP-8vK.js`).then(e=>e.activityPageComponent),__vite__mapDeps([39,2,3,4,5,6,7,8,9,10,1,11,12,13,14,15,16,17,18,19,40,25,26,41,28,29,30,31,37,42,43]),import.meta.url)})})))()}var $s;function ec(){return(ec=e((()=>{B(),U(),s(),$s=R({...H(`agents-home`),component:()=>V(()=>import(`./agents-home-page-DlqnjN5B.js`),__vite__mapDeps([44,11,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,45,28,29,30,31,46]),import.meta.url)})})))()}function tc(e){return Cn(e,Bt)}function nc(e){let t=e.get(`agent`)?.trim()??``;return t&&!t.includes(`/`)&&t!==`.`&&t!==`..`?t:null}function rc(e,t=``){let n=tc(e),r=dn(n.pathname,t),i=new URLSearchParams(n.search),a=i.has(`agent`),o=nc(i);i.delete(`agent`);let s=i.toString(),c=r?.agentId??o,l=r?$t(r.agentId,r.invalidPanel?null:r.panelSegment,t):c?$t(c,null,t):nn(`agents`,t),u=a||r?.invalidPanel?{pathname:l,search:s?`?${s}`:``,hash:n.hash}:void 0;return{location:n,requestedAgentId:c,panel:r?.panel??`overview`,...u?{canonicalLocation:u}:{}}}function ic(){return(ic=e((()=>{U(),Yn()})))()}async function ac(e,t){let n=rc(t,e.basePath),r=e.gateway,i=r.snapshot,a=e.settingsAgentSelection,o=a.intentRevision,s=e.agents.state.agentsList??await e.agents.ensureList(),c=s?Wa(s):null;return{...n,gateway:r,gatewaySnapshot:i,settingsAgentSelection:a,selectionIntentRevision:o,agentsList:c,error:e.agents.state.agentsError}}var oc;function sc(){return(sc=e((()=>{B(),U(),oo(),ic(),s(),oc=R({...H(`agents`),loaderDeps:(e,t)=>{let n=rc(t,e.basePath).location;return`${n.pathname}\u0000${n.search}\u0000${n.hash}\u0000${e.settingsAgentSelection.intentRevision}`},loader:(e,{location:t})=>ac(e,t),component:()=>V(()=>import(`./agents-page-rKGqpCmH.js`),__vite__mapDeps([47,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,48,49,25,26,50,51,20,21,22,23,24,52,53,54,55,56,57,28,29,30,31,58,37,32,33,34,35,36,59,60,61]),import.meta.url)})})))()}var cc;function lc(){return(lc=e((()=>{B(),G(),U(),s(),cc=R({...H(`approvals`),component:()=>V(()=>import(`./approvals-page-mgL2PlL5.js`).then(()=>({header:!0,render:()=>W`<openclaw-approvals-page></openclaw-approvals-page>`})),__vite__mapDeps([62,7,3,2,4,5,10,6,8,9,11,1,12,13,14,15,16,17,18,19,25,26,28,29,30,31,37]),import.meta.url)})})))()}var uc;function dc(){return(dc=e((()=>{B(),G(),U(),s(),uc=R({...H(`apps`),component:()=>V(()=>import(`./apps-page-C5PcxzAe.js`).then(()=>({header:!0,render:()=>W`<openclaw-apps-page></openclaw-apps-page>`})),__vite__mapDeps([63,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,64,25,26,27,65,48,28,29,30,31,37,66,67]),import.meta.url)})})))()}function fc(e){Promise.all([e.channels.refresh(!1),e.runtimeConfig.ensureLoaded()]).then(()=>{e.runtimeConfig.ensureSchemaLoaded()},()=>void 0)}var pc;function mc(){return(mc=e((()=>{B(),G(),U(),s(),pc=R({...H(`channels`),loader:e=>fc(e),component:()=>V(()=>import(`./channels-page-Ddpp6FWJ.js`).then(()=>({header:!0,render:()=>W`<openclaw-channels-page></openclaw-channels-page>`})),__vite__mapDeps([68,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,69,70,25,26,71,72,48,73,74,75,28,29,30,31,76,77,37]),import.meta.url)})})))()}function hc(e,t,n){let r=new URLSearchParams(n.search),i=n.pathname===nn(e,t.basePath)?r.get(vn):null;i&&r.delete(vn);let a=r.toString();return`${yn(t.gateway).key}\u0000${i??n.pathname}\u0000${a?`?${a}`:``}`}function gc(e){return R({...H(e),loaderDeps:(t,n)=>hc(e,t,n),loader:async(t,n)=>(await V(async()=>{let{loadSessionPage:e}=await import(`./route-loader-Cu3upMOr.js`);return{loadSessionPage:e}},__vite__mapDeps([78,79,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,49,23,80,81,82,28,29,30,31,32,33,58,34,83,84,85]),import.meta.url)).loadSessionPage(t,e,n),component:()=>V(()=>import(`./route-entry-CfP2rXbi.js`),__vite__mapDeps([86,16,79,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,17,18,19,21,22,49,23,80,81,82,29,28,30,31,32,33,58,34,83,84,85]),import.meta.url)})}var _c;function vc(){return(vc=e((()=>{B(),U(),Yt(),s(),_c=[gc(`chat`),gc(`dashboard`)]})))()}var yc;function bc(){return(bc=e((()=>{B(),G(),U(),s(),yc=R({...H(`cloud-workers`),loader:e=>e.runtimeConfig.ensureLoaded(),component:()=>V(()=>import(`./cloud-workers-page-pcJfJmCo.js`).then(()=>({header:!0,render:()=>W`<openclaw-cloud-workers-page></openclaw-cloud-workers-page>`})),__vite__mapDeps([87,2,3,4,5,6,7,8,9,10,1,11,12,13,14,15,16,17,18,19,48,25,26,28,29,30,31,37]),import.meta.url)})})))()}function xc(e){if(!e)return null;try{return decodeURIComponent(e.slice(1))}catch{return null}}function Sc(e){let t=new URLSearchParams(e.search),n=t.get(`__openclawMemoryPath`)??e.pathname;t.delete(Gt);let r=t.toString(),i=t.get(`section`)?.trim()||null;return{pathname:n,search:r?`?${r}`:``,hash:e.hash,section:i,advanced:t.get(`advanced`)===`1`,tab:t.get(`tab`)?.trim()||null,targetBlockId:xc(e.hash)}}var Cc,wc,Tc,Ec;function Dc(){return(Dc=e((()=>{U(),Cc={behavior:`settings-model-behavior`},wc={language:`settings-language`,theme:`settings-appearance-theme`,accent:`settings-appearance-accent`,typography:`settings-appearance-typography`,textSize:`settings-appearance-text-size`,sidebar:`settings-appearance-sidebar`,chat:`settings-appearance-chat`,sessionSources:`settings-session-sources`,connection:`settings-appearance-connection`},Tc=e=>({routeId:`appearance`,search:`?section=__appearance__`,hash:`#${e}`}),Ec={modelBehavior:{routeId:`model-providers`,hash:`#${Cc.behavior}`},appearanceLanguage:Tc(wc.language),appearanceSidebar:Tc(wc.sidebar),sessionSources:Tc(wc.sessionSources)}})))()}function Oc(e,t,n){let r=Sc(t),i=r.section?Ac[`${n}:${r.section}`]:void 0;if(r.section&&i)return Pe({pathname:nn(i.routeId,e.basePath),search:i.search??(i.keepSection?`?section=${encodeURIComponent(r.section)}${i.advanced?`&advanced=1`:``}`:``),hash:r.hash});let a=n===`memory`?{owner:e.settingsAgentSelection,revision:e.settingsAgentSelection.intentRevision}:void 0,o=e.runtimeConfig.ensureLoaded();return n!==`updates`&&o.then(()=>e.runtimeConfig.ensureSchemaLoaded()).catch(()=>void 0),{...r,...a?{agentSelectionIntent:a}:{}}}function kc(e){return R({...H(e),loaderDeps:(t,n)=>{let r=Sc(n),i=`${r.pathname}\u0000${r.search}\u0000${r.hash}`;return e===`memory`?`${i}\u0000${t.settingsAgentSelection.intentRevision}`:i},loader:(t,{location:n})=>Oc(t,n,e),component:()=>V(()=>import(`./config-page-tBwl6BY5.js`).then(()=>({header:!0,render:t=>W`
<openclaw-config-page .pageId=${e} .routeData=${t??null}></openclaw-config-page>
`})),__vite__mapDeps([88,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,89,90,91,92,40,48,20,21,22,23,24,93,94,52,25,26,51,53,71,72,73,74,75,95,96,97,70,69,98,99,100,101,102,28,29,30,31,103,32,33,34,35,36,37,59,76,77,104,105]),import.meta.url)})}var Ac,jc,Mc;function Nc(){return(Nc=e((()=>{B(),G(),U(),En(),Dc(),s(),Ac={"communications:__notifications__":{routeId:`notifications`,keepSection:!1},"communications:channels":{routeId:`channels`,keepSection:!1},"communications:broadcast":{routeId:`advanced`,keepSection:!0},"communications:talk":{routeId:`talk`,keepSection:!0},"appearance:wizard":{routeId:`advanced`,keepSection:!0},"advanced:transcripts":{routeId:`communications`,keepSection:!0,advanced:!0},"automation:approvals":{routeId:`security`,keepSection:!0},"automation:plugins":{routeId:`plugin-settings`,keepSection:!1,search:`?tab=advanced`},"ai-agents:memory":{routeId:`memory`,keepSection:!0},"ai-agents:models":{routeId:`model-providers`,keepSection:!1}},jc=R({...H(`config`),loaderDeps:(e,t)=>`${t.pathname}\u0000${t.search}\u0000${t.hash}`,loader:(e,{location:t})=>{let n=xc(t.hash)===`settings-general-model`?Ec.modelBehavior:Ec.appearanceLanguage;return Pe({pathname:nn(n.routeId,e.basePath),search:`search`in n?n.search:``,hash:n.hash})},component:async()=>({header:!0,render:()=>jn})}),Mc=[R({...H(`settings`),loader:(e,{location:t})=>vt()?void 0:Pe({...t,pathname:nn(`chat`,e.basePath)}),component:async()=>({render:()=>jn})}),jc,kc(`communications`),kc(`appearance`),kc(`notifications`),kc(`security`),kc(`automation`),kc(`mcp`),kc(`memory`),kc(`talk`),kc(`infrastructure`),kc(`updates`),kc(`ai-agents`),kc(`advanced`)]})))()}var Pc;function Fc(){return(Fc=e((()=>{B(),G(),U(),s(),Pc=R({...H(`connection`),component:()=>V(()=>import(`./connection-page-CHf3u2Cr.js`).then(()=>({header:!0,render:()=>W`<openclaw-connection-page></openclaw-connection-page>`})),__vite__mapDeps([106,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,48,93,107,25,26,95,96,108,109,110,28,29,30,31,37,111,112]),import.meta.url)})})))()}var Ic;function Lc(){return(Lc=e((()=>{B(),U(),s(),Ic=R({...H(`cron`),loaderDeps:(e,{search:t})=>t,loader:(e,{deps:t})=>t,component:()=>V(()=>import(`./cron-page-Cktv5oaO.js`).then(e=>e.cronPageComponent),__vite__mapDeps([113,2,3,4,5,6,7,8,9,10,1,11,12,13,14,15,16,17,18,19,69,21,25,26,41,53,56,57,114,20,22,23,24,28,29,30,31,76,32,37,42,60,33,34,35,36,115]),import.meta.url)})})))()}function Rc(e){return new URLSearchParams(e).get(`intent`)===`new-agent`?`new-agent`:null}var zc;function Bc(){return(Bc=e((()=>{B(),U(),s(),zc=R({...H(`custodian`),loaderDeps:(e,t)=>t.search,loader:(e,{location:t})=>({onboarding:sn(t.search),intent:Rc(t.search)}),component:()=>V(()=>import(`./custodian-page-DvINjS8u.js`).then(()=>V(async()=>{let{renderCustodianRoute:e}=await import(`./route-view-BqFAKzJ2.js`);return{renderCustodianRoute:e}},__vite__mapDeps([121]),import.meta.url).then(({renderCustodianRoute:e})=>({header:!0,render:t=>e(t)}))),__vite__mapDeps([116,11,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,117,118,119,70,69,21,22,79,49,23,80,81,82,26,28,29,30,31,76,77,32,33,58,34,83,84,85,120,37]),import.meta.url)})})))()}async function Vc(e,t){await e.request(`sessions.setInvolvement`,t)}function Hc(e){let t=e?.trim();return{...cl,hasBoard:!0,archivedFilter:`all`,...t?{agentId:t}:{}}}function Uc(e){let t=e?.trim();return{...cl,archivedFilter:`all`,...t?{agentId:t}:{}}}function Wc(e,t){let n=e.trim(),r=t?.trim();return{key:n,...r?{agentId:r}:{}}}function Gc(e,t){let{key:n,...r}=Wc(e,t);return{sessionKey:n,...r}}function Kc(e={}){let t={includeGlobal:!0,includeUnknown:!0,configuredAgentsOnly:!0};e.limit===void 0?t.limit=cl.limit:e.limit>0&&(t.limit=Math.floor(e.limit));for(let n of[`includeGlobal`,`includeUnknown`,`configuredAgentsOnly`,`excludeSubagents`,`excludeCron`,`excludeSystem`,`hasBoard`])e[n]!==void 0&&(t[n]=e[n]);for(let n of[`includeDerivedTitles`,`includeLastMessage`,`includeOwnerSessionCounts`,`ownerFirst`,`involvingMe`])e[n]===!0&&(t[n]=!0);e.archivedFilter===`archived`?t.archived=!0:e.archivedFilter===`all`&&(t.archived=`all`);let n=e.archivedFilter===`archived`||e.archivedFilter===`all`?0:typeof e.activeMinutes==`number`&&e.activeMinutes>0?Math.floor(e.activeMinutes):0;n>0&&(t.activeMinutes=n);for(let n of[`agentId`,`spawnedBy`,`search`,`ownerId`]){let r=e[n]?.trim();r&&(t[n]=r)}return e.boardFace&&(t.boardFace=e.boardFace),typeof e.offset==`number`&&e.offset>0&&(t.offset=Math.floor(e.offset)),t}function qc(e){let{offset:t,append:n,...r}=e,i=typeof e.limit==`number`&&e.limit>0?Math.floor(e.limit):cl.limit;return Object.freeze({...Kc({...r,limit:i}),limit:i})}async function Jc(e,t={}){return Yc(e,Kc(t))}async function Yc(e,t){return await e.request(`sessions.list`,t)??null}function Xc(e,t,n,r={}){let i=r.expectedSessionId?.trim(),a={...Wc(t,r.agentId),...i?{expectedSessionId:i}:{},...r.expectedMarkedUnreadAt===void 0?{}:{expectedMarkedUnreadAt:r.expectedMarkedUnreadAt},...n};return n.archived===!0?e.request(`sessions.patch`,a,Xe):e.request(`sessions.patch`,a)}function Zc(e,t){return t.patch.archived===!0?e.request(`sessions.patchMany`,t,Xe):e.request(`sessions.patchMany`,t)}function Qc(e,t,n={}){return e.request(`sessions.delete`,{...Wc(t,n.agentId),deleteTranscript:n.deleteTranscript??!0,...n.expectedSessionId?{expectedSessionId:n.expectedSessionId}:{},...n.archivedOnly===!0?{archivedOnly:!0}:{}},Xe)}function $c(e,t,n={}){return e.request(`sessions.reset`,Wc(t,n.agentId)).then(()=>void 0)}function el(e,t,n={}){return e.request(`sessions.compact`,Wc(t,n.agentId))}function tl(e,t,n={}){return e.request(`sessions.files.list`,{sessionKey:t,path:n.path??``,search:n.search??``,...n.agentId?.trim()?{agentId:n.agentId.trim()}:{}})}function nl(e,t,n,r={}){return e.request(`sessions.files.get`,{sessionKey:t,path:n,...r.agentId?.trim()?{agentId:r.agentId.trim()}:{}})}function rl(e,t,n,r,i){return e.request(`sessions.files.set`,{sessionKey:t,path:n,content:r,expectedHash:i.expectedHash,...i.agentId?.trim()?{agentId:i.agentId.trim()}:{}})}function il(e,t,n,r={}){return e.request(`sessions.rewind`,{...Gc(t,r.agentId),entryId:n})}function al(e,t,n,r={}){return e.request(`sessions.fork`,{...Gc(t,r.agentId),entryId:n})}async function ol(e,t,n={}){return(await e.request(`sessions.branches.list`,Gc(t,n.agentId))).branches}function sl(e,t,n,r={}){return e.request(`sessions.branches.switch`,{...Gc(t,r.agentId),leafEntryId:n})}var cl;function ll(){return(ll=e((()=>{dt(),cl={limit:200}})))()}function ul(e){return Hc(e.agentSelection.state.scopeId)}function dl(e,t){return{result:t.result,error:t.error,basePath:e.basePath,fallbackAgentId:wo(e),globalScope:$i({agentsList:e.agents.state.agentsList,hello:e.gateway.snapshot.hello}),mainKey:qi({agentsList:e.agents.state.agentsList,hello:e.gateway.snapshot.hello})}}async function fl(e){let t=ul(e),n=e.sessions.listSnapshot(t);return!n.result&&!n.loading&&(await e.sessions.refreshList({...t,force:!0}),n=e.sessions.listSnapshot(t)),dl(e,n)}var pl;function ml(){return(ml=e((()=>{B(),G(),U(),jo(),Q(),ll(),s(),pl=R({...H(`dashboards`),loader:fl,component:()=>V(()=>import(`./dashboards-page-BCMA68OG.js`).then(()=>({header:!0,render:e=>W`<openclaw-dashboards-page .routeData=${e}></openclaw-dashboards-page>`})),__vite__mapDeps([122,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,123,25,26,28,29,30,31,37,124]),import.meta.url)})})))()}var hl;function gl(){return(gl=e((()=>{B(),G(),U(),s(),hl=R({...H(`debug`),component:()=>V(()=>import(`./debug-page-ib4Y7BWX.js`).then(()=>({header:!0,render:()=>W`<openclaw-debug-page></openclaw-debug-page>`})),__vite__mapDeps([125,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26,57,126,109,28,29,30,31,37,127]),import.meta.url)})})))()}var _l,vl;function yl(){return(yl=e((()=>{B(),G(),U(),s(),_l=R({...H(`device`),component:()=>V(()=>import(`./device-page-B95bbKmJ.js`).then(()=>({header:!0,render:()=>W`<openclaw-device-page></openclaw-device-page>`})),__vite__mapDeps([128,11,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,48,64,25,26,65,28,29,30,31,37,66,129]),import.meta.url)}),vl=R({...H(`device-permissions`),component:()=>V(()=>import(`./permissions-page-CPe9XfYq.js`).then(()=>({header:!0,render:()=>W`<openclaw-device-permissions-page></openclaw-device-permissions-page>`})),__vite__mapDeps([130,11,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,48,25,26,28,29,30,31,37]),import.meta.url)})})))()}async function bl(e){let{createInitialDevicesState:t,loadDevices:n,loadExecApprovals:r,loadNodes:i}=await V(async()=>{let{createInitialDevicesState:e,loadDevices:t,loadExecApprovals:n,loadNodes:r}=await import(`./page-operations-CWRHz9QD.js`);return{createInitialDevicesState:e,loadDevices:t,loadExecApprovals:n,loadNodes:r}},__vite__mapDeps([131,132]),import.meta.url),a=e.gateway,o=a.snapshot,s=t({client:o.client,connected:o.phase===`connected`});if(o.phase!==`connected`||!o.client)return{gateway:a,gatewaySnapshot:o,devices:s};let c=o.hello?.auth??null,l=!c||ln(c),u=en(c);return await Promise.all([i(s),Promise.allSettled([l&&n(s),e.runtimeConfig.refresh(),u&&r(s)])]),{gateway:a,gatewaySnapshot:o,devices:s}}var xl;function Sl(){return(Sl=e((()=>{B(),G(),U(),Jt(),s(),xl=R({...H(`devices`),loader:bl,component:()=>V(()=>import(`./devices-page-2BLu-MPY.js`).then(()=>({header:!0,render:e=>W`<openclaw-devices-page .routeData=${e}></openclaw-devices-page>`})),__vite__mapDeps([133,7,3,2,4,5,10,6,8,9,1,11,12,13,14,15,16,17,18,19,20,21,22,23,24,134,132,25,26,95,135,136,28,29,30,31,32,33,34,35,36,37,137,138]),import.meta.url)})})))()}var Cl;function wl(){return(wl=e((()=>{B(),G(),U(),s(),Cl=R({...H(`labs`),loader:e=>e.runtimeConfig.ensureLoaded(),component:()=>V(()=>import(`./labs-page-BGKFWAnP.js`).then(()=>({header:!0,render:()=>W`<openclaw-labs-page></openclaw-labs-page>`})),__vite__mapDeps([139,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26,101,28,29,30,31,37]),import.meta.url)})})))()}var Tl;function El(){return(El=e((()=>{B(),G(),U(),s(),Tl=R({...H(`lobsterdex`),component:()=>V(()=>import(`./lobsterdex-page-Ok9JWDZi.js`).then(()=>({header:!0,render:()=>W`<openclaw-lobsterdex-page></openclaw-lobsterdex-page>`})),__vite__mapDeps([140,20,7,3,2,4,5,10,6,8,9,1,11,12,13,14,15,16,17,18,19,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,141]),import.meta.url)})})))()}var Dl;function Ol(){return(Ol=e((()=>{B(),G(),U(),fn(),s(),Dl=R({...H(`logs`),component:()=>V(()=>import(`./logs-page-TwrnZuQ_.js`).then(()=>({header:!0,render:()=>W`<openclaw-logs-page ${hn({logsPage:!0})}></openclaw-logs-page>`})),__vite__mapDeps([142,3,2,7,4,5,8,9,10,6,1,11,12,13,14,15,16,17,18,19,40,25,26,28,29,30,31,37,143]),import.meta.url)})})))()}var kl;function Al(){return(Al=e((()=>{B(),U(),s(),kl=R({...H(`meetings`),loaderDeps:(e,{search:t})=>t,loader:(e,{deps:t})=>t,component:()=>V(()=>import(`./meetings-page-CLX_1hxZ.js`).then(e=>e.meetingsPageComponent),__vite__mapDeps([144,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,93,99,28,29,30,31,145]),import.meta.url)})})))()}var jl;function Ml(){return(Ml=e((()=>{B(),G(),U(),s(),jl=R({...H(`memory-import`),component:()=>V(()=>import(`./memory-import-page-BdF8i_8h.js`).then(()=>({header:!0,render:()=>W`<openclaw-memory-import-page></openclaw-memory-import-page>`})),__vite__mapDeps([146,5,4,11,2,3,6,7,8,9,10,1,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,100,28,29,30,31,32,33,34,35,36,37,147]),import.meta.url)})})))()}async function Nl(e,t){let n=new URLSearchParams(t.location.search),r=n.get(`connect`)===`1`,i=n.get(`provider`)?.trim()??``,a=e.gateway,o=a.snapshot,s=e.settingsAgentSelection,c=s.intentRevision,l={gateway:a,gatewaySnapshot:o,selectionIntentRevision:c,connect:r,provider:i},u=s.state.selectedId,{EMPTY_MODEL_PROVIDERS_DATA:d,loadModelProvidersData:f}=await V(async()=>{let{EMPTY_MODEL_PROVIDERS_DATA:e,loadModelProvidersData:t}=await import(`./load-DoWmG1Sk.js`);return{EMPTY_MODEL_PROVIDERS_DATA:e,loadModelProvidersData:t}},__vite__mapDeps([148,149,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,48,150,28,29,30,31]),import.meta.url),p=o.phase===`connected`?o.client:null,m=()=>{let e=a.snapshot;return t.shouldRun()&&e.phase===`connected`&&e.client===o.client&&e.hello===o.hello&&s.intentRevision===c&&s.state.selectedId===u};return p&&m()&&(u||=(await e.agents.ensureList(),s.state.selectedId),u&&m())?{...l,data:await f(p,{agentId:u,signal:t.signal}),client:p,agentId:u}:{...l,data:d,client:null,agentId:u}}var Pl;function Fl(){return(Fl=e((()=>{B(),G(),U(),s(),Pl=R({...H(`model-providers`),loaderDeps:(e,t)=>t.search,loader:Nl,component:()=>V(()=>import(`./model-providers-page-5fAfC_CF.js`).then(()=>({header:!0,render:(e,t=!1)=>W`<openclaw-model-providers-page
.routeData=${e}
.loaderPending=${t}
></openclaw-model-providers-page>`})),__vite__mapDeps([151,3,2,7,4,5,8,9,10,6,1,11,12,13,14,15,16,17,18,19,48,25,26,53,54,149,150,152,153,97,70,69,98,154,28,29,30,31,37,155,76,77,104,156]),import.meta.url)})})))()}var Il;function Ll(){return(Ll=e((()=>{B(),G(),U(),s(),Il=R({...H(`model-setup`),loaderDeps:(e,t)=>t.search,loader:(e,{location:t})=>{let n=[`1`,`explicit`].includes(new URLSearchParams(t.search).get(`firstRun`)??``);return n?{firstRun:n}:Pe({pathname:nn(`model-providers`,e.basePath),search:`?connect=1`,hash:``})},component:()=>V(()=>import(`./model-setup-page-DHl6HaMR.js`).then(()=>({header:!0,render:e=>W`<openclaw-model-setup-page .routeData=${e}></openclaw-model-setup-page>`})),__vite__mapDeps([157,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26,53,98,97,48,70,69,153,154,158,28,29,30,31,37,76,77,104,156]),import.meta.url)})})))()}var Rl;function zl(){return(zl=e((()=>{B(),U(),s(),Rl=R({...H(`new-session`),loaderDeps:(e,t)=>t.search,staleReloadMode:`blocking`,loader:async(e,{location:t,cause:n})=>(await V(async()=>{let{load:e}=await import(`./route-loader-BhZLGTFx.js`);return{load:e}},__vite__mapDeps([159,20,7,3,2,4,5,10,6,8,9,1,11,12,13,14,15,16,17,18,19,21,22,23,24,28,29,30,31,32,33,34,35,36]),import.meta.url)).load(e,t.search,n),component:()=>V(()=>import(`./new-session-page-entry-C2nB9KLT.js`),__vite__mapDeps([160,20,7,3,2,4,5,10,6,8,9,1,11,12,13,14,15,16,17,18,19,21,22,23,24,28,29,30,31,32,33,34,35,36]),import.meta.url)})})))()}function Bl(e,t=``,n=``){let r=new URLSearchParams(e),i=bt(r.get(`__openclawPluginPath`)??t,n);return{pluginId:i?.pluginId??r.get(`plugin`)?.trim()??``,id:i?.id??r.get(`id`)?.trim()??``}}function Vl(e){return`${e.pluginId}/${e.id}`}function Hl(e){return Object.fromEntries([...new URLSearchParams(e)].filter(([e])=>e.startsWith(`p.`)).map(([e,t])=>[e.slice(2),t]))}var Ul;function Wl(){return(Wl=e((()=>{B(),G(),U(),s(),Ul=R({...H(`plugin`),loaderDeps:(e,t)=>JSON.stringify([Vl(Bl(t.search,t.pathname,e.basePath)),Hl(t.search)]),loader:(e,t)=>({...Bl(t.location.search,t.location.pathname,e.basePath),params:Hl(t.location.search)}),component:()=>V(()=>import(`./plugin-page-mDKuJl57.js`).then(()=>({header:!0,render:e=>{let t=e??{pluginId:``,id:``,params:{}};return W`<openclaw-plugin-page
.pluginId=${t.pluginId}
.tabId=${t.id}
.params=${t.params}
>
</openclaw-plugin-page>`}})),__vite__mapDeps([161,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,162,107,28,29,30,31]),import.meta.url)})})))()}function Gl(e){return e.request(`plugins.list`,{})}function Kl(e,t,n,r){return e.request(`plugins.catalog.get`,{id:t,...r?{version:r}:{}},n?{signal:n}:void 0)}function ql(e,t){return e.request(`plugins.uninstall`,{pluginId:t})}function Jl(e,t,n,r){return e.request(`plugins.setEnabled`,{pluginId:t,enabled:n,...r})}async function Yl(e,t,n,r={}){let i,a=await e.runExternalMutation(async e=>{if(e!==t)throw Error(`Connection changed before the plugin update started.`);try{return await n(e)}catch(e){throw i=e instanceof Error?e:Error(String(e)),i}},r);if(!a.ok)throw i??Error(a.error);return{value:a.value,refreshError:a.refresh.ok?null:a.refresh.error}}function Xl(){return(Xl=e((()=>{})))()}function Zl(e){return Cn(Cn(e,Pt),Zt)}function Ql(e,t=``){let n=new URLSearchParams(e.search),r=nn(`plugin-settings`,t),i=n.get(`tab`),a=e.pathname===r&&i===`advanced`,o=n.has(`tab`)&&!a;o&&n.delete(`tab`);let s=n.toString(),c=e.pathname===`${r}/discover`,l={pathname:c||i===`discover`?nn(`plugins`,t):e.pathname,search:s?`?${s}`:``,hash:e.hash};return o||c?l:null}function $l(){return($l=e((()=>{U()})))()}async function eu(e,t){let n=Zl(t.location),r=e.gateway,i=r.snapshot,a=i.client;if(i.phase!==`connected`||!a)return{gateway:r,gatewaySnapshot:i,result:null,error:null,location:n};try{return{gateway:r,gatewaySnapshot:i,result:await Gl(a),error:null,location:n}}catch(e){return{gateway:r,gatewaySnapshot:i,result:null,error:J(e),location:n}}}function tu(e,t){return R({...H(e),loaderDeps:(e,t)=>{let n=Zl(t);return`${n.pathname}\u0000${n.search}\u0000${n.hash}`},loader:(e,n)=>{let r=Ql(Zl(n.location),e.basePath);return r?Pe(r):(t===`settings`&&e.runtimeConfig.ensureLoaded().then(()=>e.runtimeConfig.ensureSchemaLoaded()).catch(()=>void 0),eu(e,n))},component:()=>V(()=>import(`./plugins-page-B9svU2dY.js`).then(()=>({header:!0,render:e=>W`<openclaw-plugins-page
.routeData=${e}
.surface=${t}
></openclaw-plugins-page>`})),__vite__mapDeps([163,7,3,2,4,5,10,6,8,9,1,11,12,13,14,15,16,17,18,19,118,49,162,164,73,25,26,71,72,48,74,75,97,70,69,98,102,165,166,167,168,28,29,30,31,58,37,76,77,104,169,170,171]),import.meta.url)})}var nu,ru,iu;function au(){return(au=e((()=>{B(),G(),U(),Y(),$l(),s(),nu=tu(`plugins`,`discovery`),ru=tu(`plugin-settings`,`settings`),iu=[nu,ru]})))()}var ou;function su(){return(su=e((()=>{B(),G(),U(),s(),ou=R({...H(`portals`),component:()=>V(()=>import(`./portals-page-BjP25pFE.js`).then(()=>({header:!0,render:()=>W`<openclaw-portals-page></openclaw-portals-page>`})),__vite__mapDeps([172,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,28,29,30,31,173]),import.meta.url)})})))()}var cu;function lu(){return(lu=e((()=>{B(),G(),U(),s(),cu=R({...H(`profile`),loader:e=>{e.agents.ensureList()},component:()=>V(()=>import(`./profile-page-BMBiQCz1.js`).then(()=>({header:!0,render:()=>W`<openclaw-profile-page></openclaw-profile-page>`})),__vite__mapDeps([174,7,3,2,4,5,10,6,8,9,1,11,12,13,14,15,16,17,18,19,70,69,93,25,26,50,28,29,30,31,76,77,37,175]),import.meta.url)})})))()}var uu;function du(){return(du=e((()=>{B(),G(),U(),s(),uu=R({...H(`search`),component:()=>V(()=>import(`./search-page-Dmjfj41F.js`).then(()=>({header:!0,render:()=>W`<openclaw-search-page></openclaw-search-page>`})),__vite__mapDeps([176,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,48,20,21,22,23,24,73,25,26,53,71,72,74,75,101,102,166,167,28,29,30,31,32,33,34,35,36,37,170]),import.meta.url)})})))()}var fu;function pu(){return(pu=e((()=>{B(),G(),U(),s(),fu=R({...H(`secrets`),component:()=>V(()=>import(`./secrets-page-BmmHpbwD.js`).then(()=>({header:!0,render:()=>W`<openclaw-secrets-page></openclaw-secrets-page>`})),__vite__mapDeps([177,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26,167,28,29,30,31,37,178]),import.meta.url)})})))()}function mu(e){let t=new URLSearchParams(e.search),n=t.get(`session`)?.trim()||null,r=t.get(`status`);return{expandedSessionKey:n,statusFilter:r===`archived`?`archived`:r===`all`?`all`:`active`}}async function hu(e,t){return await e.runtimeConfig.ensureLoaded().catch(()=>void 0),mu(t)}var gu;function _u(){return(_u=e((()=>{B(),G(),U(),s(),gu=R({...H(`sessions`),loaderDeps:(e,t)=>{let n=mu(t);return`${n.expandedSessionKey??``}\u0000${n.statusFilter}\u0000${e.agentSelection.state.scopeId??`all`}`},loader:(e,{location:t})=>hu(e,t),component:()=>V(()=>import(`./sessions-page-DZ7AXtRM.js`).then(()=>({header:!0,render:e=>W`<openclaw-sessions-page .routeData=${e}></openclaw-sessions-page>`})),__vite__mapDeps([179,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,180,181,182,25,26,41,57,114,20,21,22,23,24,135,183,28,29,30,31,37,42,32,33,34,35,36,137,184]),import.meta.url)})})))()}var vu;function yu(){return(yu=e((()=>{B(),G(),U(),s(),vu=R({...H(`skill-workshop`),component:()=>V(()=>import(`./skill-workshop-page-DVMx528D.js`).then(()=>({render:()=>W`<openclaw-skill-workshop-page></openclaw-skill-workshop-page>`})),__vite__mapDeps([185,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,49,80,41,114,165,168,28,29,30,31,32,33,34,35,36,58,83,42,169,186]),import.meta.url)})})))()}async function bu(e,t){return e.request(`skills.status`,{agentId:t})}function xu(){return(xu=e((()=>{})))()}async function Su(e,t,n){let r=new URLSearchParams(t.location.search),i=r.get(`clawhub`)??void 0,a=e.gateway,o=a.snapshot,s=e.agents,c=n===`settings`?e.settingsAgentSelection:e.agentSelection,l=c.state,u=c.intentRevision,d=o.client,f=null,p=null,m=null;if(o.phase===`connected`&&d){try{let e=await s.ensureList(),t=r.get(`agent`)??l.selectedId??e?.defaultId;p=e?.agents.some(e=>e.id===t)?t??null:null}catch(e){f=J(e)}if(p)try{m=await bu(d,p)??null}catch(e){f??=J(e)}}return{gateway:a,gatewaySnapshot:o,agents:s,selectedAgentId:p,selectionIntentRevision:u,report:m,error:f,clawhubRef:i}}function Cu(e,t){return R({...H(e),loaderDeps:(e,t)=>t.search,loader:(e,n)=>Su(e,n,t),component:()=>V(()=>import(`./skills-page-8gfL1PP2.js`).then(()=>({header:!0,render:e=>e?W`<openclaw-skills-page
.routeData=${e}
.surface=${t}
></openclaw-skills-page>`:jn})),__vite__mapDeps([187,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,49,25,26,55,165,28,29,30,31,58,37,169,188]),import.meta.url)})}var wu;function Tu(){return(Tu=e((()=>{B(),G(),U(),Y(),s(),wu=[Cu(`skills`,`discovery`),Cu(`skill-settings`,`settings`)]})))()}var Eu,Du;function Ou(){return(Ou=e((()=>{B(),U(),Yt(),s(),Eu=()=>V(()=>import(`./systems-page-DVGB1rJS.js`),__vite__mapDeps([189,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,190,191,192,193,134,95,110,28,29,30,31,111,194]),import.meta.url),Du=R({...H(`systems`),loaderDeps:e=>String(yn(e.gateway).key),staleTime:1/0,loader:async e=>(await Eu()).load(e),component:Eu})})))()}var ku;function Au(){return(Au=e((()=>{B(),G(),U(),fn(),s(),ku=R({...H(`terminal`),loader:(e,{location:t})=>t,component:()=>V(()=>import(`./terminal-page-B_elQSBK.js`).then(()=>({render:e=>W`<openclaw-terminal-page
.location=${e??null}
${hn({terminalPage:!0})}
></openclaw-terminal-page>`})),__vite__mapDeps([195,196,5,4,11,2,3,6,7,8,9,10,1,12,13,14,15,16,17,18,19,191,192,197,198,164,199,200,28,29,30,31,201]),import.meta.url)})})))()}var ju;function Mu(){return(Mu=e((()=>{B(),U(),s(),ju=R({...H(`usage`),loader:(e,t)=>{let n=e.gateway,r={gateway:n,gatewaySnapshot:n.snapshot,agentId:e.agentSelection.state.scopeId,date:new Date};return V(async()=>{let{loadUsageRouteData:e}=await import(`./route-loader-DD1ur0Vo.js`);return{loadUsageRouteData:e}},__vite__mapDeps([202,203,150]),import.meta.url).then(({loadUsageRouteData:n})=>n(e,t,r))},component:()=>V(()=>import(`./usage-page-Cu_Co5y2.js`).then(e=>e.usagePageComponent),__vite__mapDeps([204,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,25,26,41,114,20,21,22,23,24,150,152,154,203,28,29,30,31,37,42,32,33,34,35,36,155]),import.meta.url)})})))()}function Nu(e){return Cn(e,mn)}function Pu(e,t=``){let n=Nu(e),r=on(n.pathname,t),i=new URLSearchParams(n.search),a=i.has(`board`);if(!r&&!a)return{boardFilter:Fu,search:n.search};let o=i.get(`board`)?.trim()??``;i.delete(`board`);let s=i.toString(),c=r??(Ge(o)?o:Fu);return{boardFilter:c,search:s?`?${s}`:``,...a?{canonicalLocation:{pathname:c===Fu?nn(`workboard`,t):xn(c,t),search:s?`?${s}`:``,hash:n.hash}}:{}}}var Fu;function Iu(){return(Iu=e((()=>{ct(),U(),Fu=`__all__`})))()}var Lu;function Ru(){return(Ru=e((()=>{B(),G(),U(),Iu(),s(),Lu=R({...H(`workboard`),loaderDeps:(e,t)=>{let n=Nu(t),r=Pu(n,e.basePath),i=r.canonicalLocation;return`${i?.pathname??n.pathname}\u0000${i?.search??r.search}`},loader:(e,{location:t})=>Pu(t,e.basePath),component:()=>V(()=>import(`./plugin-page-mDKuJl57.js`).then(()=>({header:!0,render:e=>W`<openclaw-plugin-page
.pluginId=${`workboard`}
.tabId=${`workboard`}
.params=${{boardId:e?.boardFilter??`__all__`}}
></openclaw-plugin-page>`})),__vite__mapDeps([161,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,162,107,28,29,30,31]),import.meta.url)})})))()}var zu;function Bu(){return(Bu=e((()=>{B(),G(),U(),s(),zu=R({...H(`worktrees`),component:()=>V(()=>import(`./worktrees-page-bHwv0pao.js`).then(()=>({header:!0,render:()=>W`<openclaw-worktrees-page></openclaw-worktrees-page>`})),__vite__mapDeps([205,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,183,28,29,30,31,32,33,34,35,36,37]),import.meta.url)})})))()}function Vu(e,t){if(e){if(t){let n=qu.get(e);for(let e of t)n?.delete(e)}else qu.delete(e)}}function Hu(e){return!!(e?.result&&Date.now()-e.result.cachedAt<Ku)}function Uu(e,t){let n=qu.get(e);n||(n=new Map,qu.set(e,n));let r=t.trim(),i=n.get(r);if(i&&(!i.result||Hu(i)))return n.delete(r),n.set(r,i),i.pending;n.delete(r);let a={pending:Promise.resolve(null)};return a.pending=e.request(`agent.identity.get`,{agentId:r}).then(t=>{if(qu.get(e)!==n||n.get(r)!==a)return null;a.result={identity:t,cachedAt:Date.now()};for(let[e,t]of n){if(n.size<=Gu)break;t.result&&n.delete(e)}return t},e=>{throw n.get(r)===a&&n.delete(r),e}),n.set(r,a),a.pending}function Wu(e){let t=e.snapshot.client,n=e.snapshot.phase===`connected`,r=0,i=new Map,a=new Map,o=new Set,s=()=>{for(let e of o)e()},c=e=>{let o=e.phase===`connected`;if(e.client===t&&o===n)return;let c=i.size>0;Vu(t),t=e.client,n=o,r+=1,i.clear(),a.clear(),c&&s()};return e.subscribe(c),e.subscribeEvents?.(e=>{e.event===`config.changed`&&(Vu(t),r+=1,i.clear(),a.clear(),s())}),{get(e){let t=e?.trim();return t?i.get(t)??null:null},entries(){return[...i.values()]},async ensure(t){let n=e.snapshot;c(n);let o=n.client;if(!o||n.phase!==`connected`)return;let l=r,u=D(t).filter(e=>{let t=qu.get(o)?.get(e);return!Hu(t)||i.get(e)!==t?.result?.identity});if(u.length===0)return;let d=await Promise.all(u.map(async e=>[e,a.get(e)??0,await Uu(o,e).catch(()=>null)]));if(r!==l||e.snapshot.client!==o||e.snapshot.phase!==`connected`)return;let f=!1;for(let[e,t,n]of d)n&&i.get(e)!==n&&t===(a.get(e)??0)&&(i.set(e,n),f=!0);f&&s()},invalidate(e){let n=!1,r=D(e);Vu(t,r);for(let e of r)a.set(e,(a.get(e)??0)+1),i.delete(e)&&(n=!0);n&&s()},subscribe(e){return o.add(e),()=>o.delete(e)}}}var Gu,Ku,qu;function Ju(){return(Ju=e((()=>{o(),Gu=128,Ku=6e4,qu=new WeakMap})))()}function Yu(e){let t=e.client,n=e.phase===`connected`,r=0,i=!1;return{get epoch(){return r},capture(){return!i&&n&&t?{client:t,epoch:r}:null},isCurrent(e){return!i&&n&&t===e.client&&r===e.epoch},invalidate(){i||(r+=1)},transition(e){if(i)return!1;let a=e.phase===`connected`,o=t!==e.client||n!==a;return o&&(r+=1),t=e.client,n=a,o},dispose(){i||(i=!0,r+=1)}}}function Xu(){return(Xu=e((()=>{})))()}function Zu(e){let t=e.trim().toLowerCase();return[`localhost`,`::1`,`[::1]`].includes(t)||/^127(?:\.\d{1,3}){3}$/.test(t)&&t.split(`.`).every(e=>Number(e)<=255)}function Qu(){return(Qu=e((()=>{})))()}function $u(e){let t=[],n=32768;for(let r=0;r<e.length;r+=n)t.push(String.fromCharCode(...e.subarray(r,r+n)));return btoa(t.join(``))}function ed(){return(ed=e((()=>{})))()}function td(e){return`${Sd}${ut(e)}`}function nd(e){try{e?.removeItem(xd)}catch{}}function rd(e){if(!e)return null;try{let t=JSON.parse(e);return!t||t.version!==1||!t.deviceId||typeof t.deviceId!=`string`||!t.tokens||typeof t.tokens!=`object`?null:t}catch{return null}}function id(e){try{let t=tr(),n=td(e),r=rd(t?.getItem(n)??null);if(r)return nd(t),r;let i=rd(t?.getItem(xd)??null);if(!i)return null;try{t?.setItem(n,JSON.stringify(i)),nd(t)}catch{}return i}catch{return null}}function ad(e,t){try{let n=tr();n?.setItem(td(e),JSON.stringify(t)),nd(n)}catch{}}function od(e){let t={};for(let[n,r]of Object.entries(e)){let e=Ae(n);e&&r&&typeof r.token==`string`&&(t[e]={token:r.token,role:e,scopes:nt(Array.isArray(r.scopes)?r.scopes:void 0),updatedAtMs:Number.isFinite(r.updatedAtMs)?r.updatedAtMs:0})}return t}function sd(e){let t=id(e.gatewayUrl);if(!t||t.deviceId!==e.deviceId)return null;let n=Ae(e.role);return od(t.tokens)[n]??null}function cd(e){let t=gd(tr());if(!t)return null;let n=sd({deviceId:t.deviceId,gatewayUrl:e,role:`operator`});return n?.scopes.includes(`operator.read`)?n.token:null}function ld(e){let t=id(e.gatewayUrl),n=Ae(e.role),r={token:e.token,role:n,scopes:nt(e.scopes),updatedAtMs:Date.now()};return ad(e.gatewayUrl,{version:1,deviceId:e.deviceId,tokens:{...t?.deviceId===e.deviceId?od(t.tokens):{},[n]:r}}),r}function ud(e){let t=id(e.gatewayUrl);if(!t||t.deviceId!==e.deviceId)return;let n=Ae(e.role),r=od(t.tokens);r[n]&&(delete r[n],ad(e.gatewayUrl,{...t,tokens:r}))}function dd(e){return $u(e).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/g,``)}function fd(e){let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t+`=`.repeat((4-t.length%4)%4),r=atob(n),i=new Uint8Array(r.length);for(let e=0;e<r.length;e+=1)i[e]=r.charCodeAt(e);return i}async function pd(e){let t=globalThis.crypto?.subtle;if(t){let n=await t.digest(`SHA-256`,e.slice().buffer);return Hn.bytesToHex(new Uint8Array(n))}return Hn.bytesToHex((await yd()).sha256(e))}async function md(){let e=Gn.randomSecretKey(),t=await Wn(e);return{deviceId:await pd(t),publicKey:dd(t),privateKey:dd(e)}}function hd(){try{let e=tr()?.getItem(Cd);if(!e)return null;let t=JSON.parse(e);return O(t)&&t.version===1&&typeof t.deviceId==`string`&&t.deviceId?t.deviceId:null}catch{return null}}function gd(e){try{let t=e?.getItem(Cd);if(t){let e=JSON.parse(t);if(e?.version===1&&typeof e.deviceId==`string`&&typeof e.publicKey==`string`&&typeof e.privateKey==`string`)return e}}catch{}return null}async function _d(){let e=tr(),t=gd(e);try{if(t){let n=await pd(fd(t.publicKey));if(n!==t.deviceId){let r={...t,deviceId:n};e?.setItem(Cd,JSON.stringify(r))}return{deviceId:n,publicKey:t.publicKey,privateKey:t.privateKey}}}catch{}if(wd)return wd;let n=await md(),r={version:1,deviceId:n.deviceId,publicKey:n.publicKey,privateKey:n.privateKey,createdAtMs:Date.now()};try{e?.setItem(Cd,JSON.stringify(r))}catch{}return wd=n,n}async function vd(e,t){let n=fd(e),r=new TextEncoder().encode(t);return dd(await Un(r,n))}var yd,bd,xd,Sd,Cd,wd;function Td(){return(Td=e((()=>{Ln(),s(),yd=()=>V(()=>import(`./sha2-DdUuYbOM.js`),__vite__mapDeps([206,5,4]),import.meta.url),bd=Bn.sha512Async,Bn.sha512Async=async e=>globalThis.crypto?.subtle&&bd?await bd(e):Uint8Array.from((await yd()).sha512(e)),xd=`openclaw.device.auth.v1`,Sd=`${xd}:`,Cd=`openclaw-device-identity-v1`,wd=null})))()}function Ed(e,t,n){let r=I(e);return r?(typeof r.gatewayCode==`string`?r.gatewayCode:typeof r.code==`string`?r.code:null)===t&&I(r.details)?.code===n:!1}function Dd(e){return Ed(e,f.INVALID_REQUEST,Ye.WIZARD_NOT_FOUND)}function Od(e){return Ed(e,f.UNAVAILABLE,Ye.SETUP_ADMISSION_BUSY)}function kd(e){return!(e instanceof Error)||e.name!==`GatewayRequestError`?!1:ne(e)?.missingScope===`operator.read`||un(e)===L.AUTH_UNAUTHORIZED}function Ad(e){return I(e)?.gatewayCode===f.FORBIDDEN||kd(e)}function jd(e){return`This connection is missing operator.read, so ${e} cannot be loaded yet.`}function Md(){return(Md=e((()=>{a(),rt(),Qt()})))()}function Nd(e,t){let n=t.agentId.trim(),r=t.sessionKey.trim();return`${n}:${r}:model=${Ld(e,r)||`(default)`}`}async function Pd(e,t,n={}){let r=e.client,i=t.agentId.trim(),a=t.sessionKey.trim(),o=Nd(e,{agentId:i,sessionKey:a});if(!r||!e.connected||!i||!a||e.toolsEffectiveLoading&&e.toolsEffectiveLoadingKey===o)return;let s=Symbol(`effective-tools-request`);Rd.set(e,s);let c=()=>e.client===r&&e.connected&&Rd.get(e)===s&&(n.isCurrent?.()??!0),l=()=>!c()||(n.ignoreResponse?.(i,o)??!1);e.toolsEffectiveLoading=!0,e.toolsEffectiveLoadingKey=o,e.toolsEffectiveResultKey=null,e.toolsEffectiveError=null,e.toolsEffectiveResult=null;try{let t=await r.request(`tools.effective`,{agentId:i,sessionKey:a});if(l())return;e.toolsEffectiveResultKey=o,e.toolsEffectiveResult=t}catch(t){if(l())return;e.toolsEffectiveError=n.onError?.(t)??J(t)}finally{c()&&e.toolsEffectiveLoadingKey===o&&(Rd.delete(e),e.toolsEffectiveLoadingKey=null,e.toolsEffectiveLoading=!1)}}function Fd(e){Rd.delete(e),e.toolsEffectiveResult=null,e.toolsEffectiveResultKey=null,e.toolsEffectiveError=null,e.toolsEffectiveLoading=!1,e.toolsEffectiveLoadingKey=null}function Id(e){let t=e.sessionKey?.trim();if(!t||e.agentsPanel!==`tools`||!e.agentsSelectedId)return;let n=ua(t);if(e.agentsSelectedId===n)return Pd(e,{agentId:n,sessionKey:t})}function Ld(e,t){if(!t)return``;let n=e.chatModelCatalog??[],r=e.sessions.state.modelOverrides[t],i=e.sessionsResult?.defaults,a=Ai(i?.model,i?.modelProvider,n);if(r===null)return a;if(r)return Di(r,n);let o=e.sessionsResult?.sessions.find(e=>e.key===t);return o?.model?Ai(o.model,o.modelProvider,n):a}var Rd;function zd(){return(zd=e((()=>{Bi(),Y(),Q(),Rd=new WeakMap})))()}function Bd(e,t){return!!(e.agentsSelectedId&&e.agentsSelectedId!==t)}function Vd(e,t){return kd(e)?jd(t):J(e)}async function Hd(e,t){let n=t.trim(),r=e.client;if(!r||!e.connected||!n||e.toolsCatalogLoading&&e.toolsCatalogLoadingAgentId===n)return;let i=e.requestGeneration,a=()=>e.client!==r||e.requestGeneration!==i||e.toolsCatalogLoadingAgentId!==n||Bd(e,n);e.toolsCatalogLoading=!0,e.toolsCatalogLoadingAgentId=n,e.toolsCatalogError=null,e.toolsCatalogResult=null;try{let t=await r.request(`tools.catalog`,{agentId:n,includePlugins:!0});if(a())return;e.toolsCatalogResult=t}catch(t){if(a())return;e.toolsCatalogError=Vd(t,`tools catalog`)}finally{e.client===r&&e.requestGeneration===i&&e.toolsCatalogLoadingAgentId===n&&(e.toolsCatalogLoadingAgentId=null,e.toolsCatalogLoading=!1)}}async function Ud(e,t){let n=e.client,r=e.requestGeneration;await Pd(e,t,{isCurrent:()=>e.client===n&&e.connected&&e.requestGeneration===r,ignoreResponse:(t,n)=>e.toolsEffectiveLoadingKey!==n||Bd(e,t),onError:e=>Vd(e,`effective tools`)})}async function Wd(e,t,n,r=()=>!0){if(!r())return;let i=e.state.configFormDirty;e.stageDefaultAgent(t)&&!i&&e.state.configFormDirty&&await e.save({canDispatch:r})&&r()&&await n()}async function Gd(e,t){await e.request(`agents.update`,{agentId:t.agentId,...t.name?{name:t.name}:{},...t.emoji?{emoji:t.emoji}:{},...t.avatar?{avatar:t.avatar}:{}})}function Kd(){return{list:null,loading:!1,error:null}}function qd(e,t={}){let n=t.cachedList??null,r=t.cachedProfileId??null,i=e.connectionRevision,a=e.connection?ut(e.connection.gatewayUrl):null,o=Yu(e.snapshot),s={client:e.snapshot.client,connected:e.snapshot.phase===`connected`,agentsLoading:!1,agentsError:null,agentsList:n,agentsListCached:n!==null},c=new Map,l=new Map,u=new Set,d=!1,f=0,p=null,m=()=>{p=null,f+=1,s.agentsLoading=!1},h=()=>{if(!d)for(let e of u)e(s)},g=e=>{let t=c.get(e);if(t)return t;let n=Kd();return c.set(e,n),n},_=async e=>{let t=o.capture();if(!t)return s.agentsList;if(p&&!e)return p;if(s.agentsList&&!s.agentsListCached&&!e)return s.agentsList;let r=++f;s.agentsLoading=!0,s.agentsError=null,h();let i=t.client.request(`agents.list`,{}).then(e=>{let i=o.isCurrent(t)&&f===r;return i&&(n&&=e,s.agentsList=e,s.agentsListCached=!1,s.agentsError=null),i?e:null}).catch(e=>(o.isCurrent(t)&&f===r&&(s.agentsError=Vd(e,`agent list`)),null)).finally(()=>{let e=f===r;e&&(p=null),e&&o.isCurrent(t)&&(s.agentsLoading=!1,h())});return p=i,i},v=async(e,t)=>{let n=z(e),r=o.capture();if(!n||!r)return n?c.get(n)?.list??null:null;let i=g(n);if(i.list&&!t)return i.list;let a=l.get(n);if(a&&!t)return a;i.loading=!0,i.error=null,h();let s=r.client.request(`agents.files.list`,{agentId:n}).then(e=>{let t=o.isCurrent(r)&&l.get(n)===s;return t&&e&&(i.list=e,i.error=null),t?i.list:null}).catch(e=>(o.isCurrent(r)&&l.get(n)===s&&(i.error=J(e)),null)).finally(()=>{let e=l.get(n)===s;e&&l.delete(n),e&&o.isCurrent(r)&&(i.loading=!1,h())});return l.set(n,s),s},y=e.subscribe(t=>{let u=s.client!==t.client,d=t.phase===`connected`,f=o.transition(t),p=e.connectionRevision!==i||a!==null&&e.connection!==void 0&&ut(e.connection.gatewayUrl)!==a;if(p&&(n=null),s.client=t.client,s.connected=d,f&&(u||!d)){m(),l.clear();for(let e of c.values())e.loading=!1;c.clear(),s.agentsList=n,s.agentsListCached=n!==null,s.agentsError=null}let g=s.agentsListCached&&(p||d&&(t.selfUser?.id??null)!==r);g&&(n=null,s.agentsList=null,s.agentsListCached=!1),(f||g)&&h()});return{get state(){return s},ensureList:()=>_(!1),refreshList:()=>_(!0),files(e){let t=z(e);return t?c.get(t)??Kd():Kd()},invalidateFiles(e){let t=!1;for(let n of D(e))t=c.delete(n)||t,t=l.delete(n)||t;t&&h()},ensureFiles:e=>v(e,!1),refreshFiles:e=>v(e,!0),recordFile({agentId:e,file:t}){let n=g(e);if(!n.list){v(e,!0);return}l.delete(e);let r={...t};delete r.content;let i=n.list.files;n.list={...n.list,files:i.some(e=>e.name===r.name)?i.map(e=>e.name===r.name?r:e):[...i,r]},n.loading=!1,n.error=null,h()},subscribe(e){return u.add(e),()=>u.delete(e)},dispose(){d=!0,o.dispose(),y(),u.clear(),l.clear(),c.clear(),m()}}}function Jd(){return(Jd=e((()=>{o(),Y(),Md(),zd()})))()}function Yd(e,t){let n=e&&Object.hasOwn(e,t)&&e[t];return Array.isArray(n)?n:[]}function Xd(e,t){if(!e)return!1;let n=I(Object.hasOwn(e.channels,t)?e.channels[t]:void 0);return n?.configured===!0||n?.running===!0||n?.connected===!0||Yd(e.channelAccounts,t).some(e=>e.configured===!0||e.running===!0||e.connected===!0)}function Zd(e){return e?[...new Set([...e.channelOrder,...Object.keys(e.channels),...Object.keys(e.channelAccounts)])].some(t=>Xd(e,t)):!1}function Qd(e,t){if(!e)return null;let n=I(e.channels);return I(n?.[t])??I(e[t])}function $d(e){if(e==null)return K(`common.na`);if(typeof e==`string`||typeof e==`number`||typeof e==`boolean`)return String(e);try{return JSON.stringify(e)}catch{return K(`common.na`)}}function ef(e){let t=Qd(e.configForm,e.channelId);return t?e.fields.flatMap(e=>e in t?[{label:e,value:$d(t[e])}]:[]):[]}function tf(e){let t=e.hello?.auth;return JSON.stringify({role:t?.role??null,scopes:t?.scopes?[...t.scopes].toSorted():null})}function nf(e,t){let n=e.hello?.auth;return!n?.scopes||We({role:n.role??`operator`,requestedScopes:[t],allowedScopes:n.scopes})}function rf(e={}){return{client:e.client??null,connected:e.phase===`connected`,channelsLoading:!1,channelsLoadingProbe:null,channelsRefreshSeq:0,channelsSnapshot:null,channelsError:null,channelsLastSuccess:null,pairingLoading:!1,pairingRefreshSeq:0,pairingSnapshot:null,pairingError:null,pairingLastSuccess:null,pairingBusyRequestId:null,whatsappLoginMessage:null,whatsappLoginQrDataUrl:null,whatsappLoginSessionKey:null,whatsappLoginConnected:null,whatsappBusy:!1}}function af(e,t,n){return e.client===t&&e.channelsRefreshSeq===n}function of(e,t,n){return e.connected&&e.client===t&&e.pairingRefreshSeq===n}function sf(e){e.pairingRefreshSeq+=1,e.pairingLoading=!1}async function cf(e,t={}){let n=e.client;if(!n||!e.connected||e.pairingLoading||e.pairingBusyRequestId&&!t.duringMutation)return;let r=e.pairingRefreshSeq+1;e.pairingRefreshSeq=r,e.pairingLoading=!0,e.pairingError=null;try{let t=await n.request(`channels.pairing.list`,{});if(!of(e,n,r))return;e.pairingSnapshot=t,e.pairingLastSuccess=Date.now()}catch(t){of(e,n,r)&&(e.pairingError=J(t))}finally{of(e,n,r)&&(e.pairingLoading=!1)}}function lf(e,t){let n=e.pairingSnapshot;n&&n.requests.some(e=>e.requestId===t)&&(e.pairingSnapshot={...n,requests:n.requests.filter(e=>e.requestId!==t)})}function uf(e){let t=rf(e.snapshot),n={whatsappEpoch:0,pairingEpoch:0};async function r(e,r){let i=t.client;if(!i||!t.connected||t.pairingBusyRequestId)return null;let a=e.requestId,o=n.pairingEpoch,s=()=>t.connected&&t.client===i&&n.pairingEpoch===o&&t.pairingBusyRequestId===a;sf(t),t.pairingBusyRequestId=e.requestId,t.pairingError=null;try{let n=await r(i);return s()?(lf(t,e.requestId),sf(t),await cf(t,{duringMutation:!0}),s()?{result:n}:null):null}catch(e){return s()&&(t.pairingError=J(e)),null}finally{s()&&(t.pairingBusyRequestId=null)}}async function i(e,r,i){let a=t.client;if(!a||!t.connected||t.whatsappBusy)return!1;t.whatsappBusy=!0;let o=n.whatsappEpoch,s=()=>t.connected&&t.client===a&&n.whatsappEpoch===o;try{let t=await e(a);if(!s())return!1;r(t)}catch(e){return s()&&(t.whatsappLoginMessage=J(e),i?.()),!1}finally{s()&&(t.whatsappBusy=!1)}return!0}function a(e,n){return i(t=>t.request(`web.login.start`,{channel:`whatsapp`,force:e,timeoutMs:3e4,...n?{accountId:n}:{}}),e=>{t.whatsappLoginSessionKey=e.connected?null:e.sessionKey??null,t.whatsappLoginMessage=e.message?J(e.message):null,t.whatsappLoginQrDataUrl=e.qrDataUrl??null,t.whatsappLoginConnected=typeof e.connected==`boolean`?e.connected:null},()=>{t.whatsappLoginQrDataUrl=null,t.whatsappLoginSessionKey=null,t.whatsappLoginConnected=null})}function o(e){return i(n=>n.request(`web.login.wait`,{channel:`whatsapp`,timeoutMs:12e4,currentQrDataUrl:t.whatsappLoginQrDataUrl??void 0,...t.whatsappLoginSessionKey?{sessionKey:t.whatsappLoginSessionKey}:{},...e?{accountId:e}:{}}),e=>{t.whatsappLoginMessage=e.message?J(e.message):null,t.whatsappLoginConnected=e.connected??null,e.connected&&(t.whatsappLoginSessionKey=null),e.qrDataUrl?t.whatsappLoginQrDataUrl=e.qrDataUrl:e.connected&&(t.whatsappLoginQrDataUrl=null)},()=>{t.whatsappLoginConnected=null})}function s(e){return i(t=>t.request(`channels.logout`,{channel:`whatsapp`,...e?{accountId:e}:{}}),e=>{e.cleared?(t.whatsappLoginMessage=K(`channels.whatsapp.loggedOut`),t.whatsappLoginQrDataUrl=null,t.whatsappLoginSessionKey=null,t.whatsappLoginConnected=null):t.whatsappLoginMessage=K(`channels.whatsapp.logoutNotCleared`)})}let c=new Set,l=nf(e.snapshot,`operator.read`),u=tf(e.snapshot),d=nf(e.snapshot,`operator.admin`),f=!1,p=!1,m=()=>{if(!f)for(let e of c)e(t)},h=async e=>{if(f)return;let t=e();m();try{return await t}finally{m()}};async function g(e){let n=t.client;if(!n||!t.connected||t.channelsLoading&&(!t.channelsLoadingProbe||e))return;let r=(t.channelsRefreshSeq??0)+1;t.channelsRefreshSeq=r,t.channelsLoading=!0,t.channelsLoadingProbe=e,e||(p=!1);try{let i=await n.request(`channels.status`,{probe:e,timeoutMs:8e3});if(!af(t,n,r))return;t.channelsSnapshot=i,t.channelsError=null,t.channelsLastSuccess=Date.now()}catch(e){if(!af(t,n,r))return;kd(e)?(t.channelsSnapshot=null,t.channelsError=jd(`channel status`)):t.channelsError=J(e)}finally{af(t,n,r)&&(t.channelsLoading=!1,t.channelsLoadingProbe=null,p&&await g(!1))}}let _=(e=!1)=>h(()=>g(e)),v=e=>h(async()=>{await e()&&await _(!0)}),y=e.subscribe(e=>{let r=t.client!==e.client,i=e.phase===`connected`,a=t.connected!==i,o=nf(e,`operator.read`),s=l!==o;l=o;let c=tf(e),f=u!==c;u=c;let h=nf(e,`operator.admin`),g=d!==h;d=h,t.client=e.client,t.connected=i,(r||a||s)&&(p=!1,t.channelsLoading=!1,t.channelsLoadingProbe=null,t.channelsRefreshSeq=(t.channelsRefreshSeq??0)+1,t.channelsError=i||!o?null:t.channelsError,t.channelsSnapshot=null,t.channelsLastSuccess=null),(r||a||g)&&(n.whatsappEpoch+=1,t.whatsappBusy=!1,t.whatsappLoginSessionKey=null,h||(t.whatsappLoginMessage=null,t.whatsappLoginQrDataUrl=null,t.whatsappLoginConnected=null)),(r||a||f)&&(n.pairingEpoch+=1,t.pairingSnapshot=null,t.pairingError=null,t.pairingLastSuccess=null,t.pairingLoading=!1,t.pairingBusyRequestId=null,t.pairingRefreshSeq+=1),m()}),b=e.subscribeEvents(e=>{e.event===`config.changed`&&t.connected&&l&&(t.channelsSnapshot||t.channelsLoading||c.size!==0)&&(p=!0,_())});return{get state(){return t},refresh:_,refreshPairing:()=>h(()=>cf(t)),approvePairing:async e=>{let t=await h(()=>r(e,t=>t.request(`channels.pairing.approve`,e)));return t?t.result:null},dismissPairing:async e=>!!await h(()=>r(e,t=>t.request(`channels.pairing.dismiss`,e))),startWhatsApp:(e,t)=>v(()=>a(e,t)),waitWhatsApp:e=>v(()=>o(e)),logoutWhatsApp:e=>v(()=>s(e)),subscribe(e){return c.add(e),()=>c.delete(e)},dispose(){f||(f=!0,p=!1,t.channelsRefreshSeq=(t.channelsRefreshSeq??0)+1,n.whatsappEpoch+=1,n.pairingEpoch+=1,t.pairingRefreshSeq+=1,t.pairingBusyRequestId=null,t.whatsappBusy=!1,y(),b(),c.clear())}}}function df(){return(df=e((()=>{Ze(),q(),Y(),Md()})))()}function ff(e){let t=null,n=0,r=0,i=!1,a=()=>{t&&=(clearTimeout(t),null),n=0,r+=1},o=()=>{if(i||!e.shouldRefresh()){a();return}if(t)return;let s=pf[Math.min(n,pf.length-1)];t=setTimeout(()=>{t=null;let i=r;n=Math.min(n+1,pf.length-1),e.refresh(()=>i===r).then(()=>i===r&&o(),()=>i===r&&o())},s)};return{cancel:a,reconcile:o,dispose:()=>{i=!0,a()}}}var pf;function mf(){return(mf=e((()=>{pf=[250,750,1500,3e3,6e3,3e4]})))()}function hf(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function gf(){return(gf=e((()=>{})))()}function _f(e){return encodeURIComponent(e).replaceAll(`.`,`%2E`)}function vf(e){let t=e.trim().split(/\s+/).join(` `);return`v1-${hf(t).toString(36)}-${t.length.toString(36)}`}function yf(e,t,n){return`configHints.${_f(e)}.${t}.${vf(n)}`}function bf(){return(bf=e((()=>{})))()}function xf(e){return typeof e==`string`?e.trim().length>0&&!/^\$\{[^}]*\}$/.test(e.trim()):e!=null}function Sf(e){if(e)return Array.isArray(e.type)?e.type.find(e=>e!==`null`)??e.type[0]:e.type}function Cf(e){let t=Array.isArray(e.type)?e.type:e.type?[e.type]:[];return t.length>0&&!t.includes(`string`)||e.const!==void 0&&typeof e.const!=`string`||e.enum&&!e.enum.some(e=>typeof e==`string`)||e.allOf&&!e.allOf.every(Cf)||e.anyOf&&!e.anyOf.some(Cf)?!1:!e.oneOf||e.oneOf.some(Cf)}function wf(e){return e.filter(e=>typeof e==`string`).join(`.`)}function Tf(e,t){let n=wf(e),r=t[n];if(r)return{hint:r,hintPath:n};let i=e.map(String),a=Rf.get(t);a||(a=Object.entries(t).flatMap(([e,t])=>e.includes(`*`)?[[e.split(`.`),t]]:[]),Rf.set(t,a));for(let[e,t]of a)if(e.length===i.length&&e.every((e,t)=>e===`*`||e===i[t]))return{hint:t,hintPath:e.join(`.`)}}function Ef(e,t){return Tf(e,t)?.hint}function Df(e,t){let n=Tf(e,t);if(!n)return;let{hint:r,hintPath:i}=n;return{...r,label:r.label?wr(yf(i,`label`,r.label))??r.label:r.label,help:r.help?wr(yf(i,`help`,r.help))??r.help:r.help}}function Of(e){return e.replace(/_/g,` `).replace(/([a-z0-9])([A-Z])/g,`$1 $2`).replace(/\s+/g,` `).replace(/^./,e=>e.toUpperCase())}function kf(e){return`${JSON.stringify(e,null,2).trimEnd()}\n`}function Af(e){let t=Array.isArray(e)?e:O(e)?Object.values(e):[];return e===`__OPENCLAW_REDACTED__`||t.some(Af)}function jf(e){return{omitted:!1,value:e}}function Mf(e){if(e.value===`__OPENCLAW_REDACTED__`)return e.originalFormValue!==`__OPENCLAW_REDACTED__`||e.originalRawPathExists?jf(e.value):e.canOmit?Bf:jf(e.value);if(Array.isArray(e.value)){let t=Array.isArray(e.originalFormValue)?e.originalFormValue:[],n=Array.isArray(e.originalRawValue)?e.originalRawValue:[];return jf(e.value.map((e,r)=>{let i=Mf({value:e,originalFormValue:t[r],originalRawValue:n[r],originalRawPathExists:r in n,canOmit:!1});return i.omitted?e:i.value}))}if(!O(e.value))return jf(e.value);let t=O(e.originalFormValue)?e.originalFormValue:null,n=O(e.originalRawValue)?e.originalRawValue:null,r={};for(let[i,a]of Object.entries(e.value)){let e=t!=null&&Object.hasOwn(t,i)?t[i]:void 0,o=n!=null&&Object.hasOwn(n,i),s=Mf({value:a,originalFormValue:e,originalRawValue:o?n?.[i]:void 0,originalRawPathExists:o,canOmit:!0});s.omitted||(r[i]=s.value)}return e.canOmit&&Object.keys(r).length===0&&!e.originalRawPathExists?Bf:jf(r)}function Nf(e,t,n){if(!t||!n)return e;let r=Mf({value:e,originalFormValue:t,originalRawValue:n,originalRawPathExists:!0,canOmit:!1});return!r.omitted&&O(r.value)?r.value:e}function Pf(e){return typeof e==`string`&&Vf.has(e)}function Ff(e,t,n){if(t.length===0||t.some(Pf))return null;let r=e;for(let e=0;e<t.length-1;e+=1){let i=t[e],a=t[e+1];if(i===void 0)return null;if(typeof i==`number`){if(!Array.isArray(r))return null;if(r[i]==null){if(!n)return null;r[i]=typeof a==`number`?[]:{}}r=r[i];continue}if(typeof r!=`object`||!r)return null;let o=r;if(o[i]==null){if(!n)return null;o[i]=typeof a==`number`?[]:{}}r=o[i]}let i=t.at(-1);return i===void 0?null:{current:r,lastKey:i}}function If(e,t,n){let r=Ff(e,t,!0);if(r){if(typeof r.lastKey==`number`){Array.isArray(r.current)&&(r.current[r.lastKey]=n);return}typeof r.current==`object`&&r.current!=null&&(r.current[r.lastKey]=n)}}function Lf(e,t){let n=Ff(e,t,!1);if(n){if(typeof n.lastKey==`number`){Array.isArray(n.current)&&n.current.splice(n.lastKey,1);return}typeof n.current==`object`&&n.current!=null&&delete n.current[n.lastKey]}}var Rf,zf,Bf,Vf;function Hf(){return(Hf=e((()=>{bf(),Tr(),Rf=new WeakMap,zf=`__OPENCLAW_REDACTED__`,Bf={omitted:!0},Vf=new Set([`__proto__`,`prototype`,`constructor`])})))()}function Uf(){return Kf!==null}function Wf(){return qf??=V(()=>import(`./dist-DWV1tVpX.js`).then(e=>(Kf=e.default,Kf),e=>{throw qf=null,e}),__vite__mapDeps([207,10]),import.meta.url),qf}function Gf(e){try{return JSON.parse(e)}catch(t){if(Kf)return Kf.parse(e);throw Wf().catch(()=>void 0),t}}var Kf,qf;function Jf(){return(Jf=e((()=>{s(),Kf=null,qf=null})))()}function Yf(e,t,n){if(!e||!t)return null;let r=structuredClone(n),i=(e,t,n,a)=>{for(let o of new Set([...Object.keys(e),...Object.keys(t)])){let s=[...a,o];Object.hasOwn(t,o)?O(e[o])&&O(t[o])&&O(n[o])?i(e[o],t[o],n[o],s):et(e[o])!==et(t[o])&&If(r,s,structuredClone(t[o])):Lf(r,s)}};return i(e,t,n,[]),r}function Xf(e,t){let n=(e,t)=>t===`__OPENCLAW_REDACTED__`&&xf(e)?zf:Array.isArray(e)?e.map((e,r)=>n(e,Array.isArray(t)?t[r]:void 0)):O(e)?Object.fromEntries(Object.entries(e).map(([e,r])=>[e,n(r,O(t)?t[e]:void 0)])):e;return Object.fromEntries(Object.entries(e).map(([e,r])=>[e,n(r,t[e])]))}function Zf(e,t,n){let r=Xf(e,n),i=Xf(t,n);return et(Yf(r,n,i))!==et(i)}function Qf(e,t,n){let r=Xf(e,n),i=Xf(t,n);return et(Yf(r,i,n))!==et(Yf(r,n,i))}function $f(){return($f=e((()=>{ke(),Hf()})))()}function ep(e){if(typeof e?.raw==`string`)return e.raw;let t=Aa(e);return t?kf(t):null}function tp(e){Dp.delete(e)}function np(e,t){let n=J(e),r=e instanceof gt?`${e.name}: ${n}`:n;if(!t||!(e instanceof gt)||!O(e.details))return r;let i=e.details.issues;if(!Array.isArray(i))return r;let a=`${e.name}: invalid config: `;if(!r.startsWith(a))return r;let o=mp(t);if(!o)return r;let s=a.length;for(let e of i){if(!O(e)||typeof e.path!=`string`||typeof e.message!=`string`||!r.startsWith(`${e.path}: ${e.message}`,s))break;let t=rp(e.path,o);if(t!==e.path&&(r=`${r.slice(0,s)}${t}${r.slice(s+e.path.length)}`),s+=t.length+2+e.message.length,!r.startsWith(`; `,s))break;s+=2}return r}function rp(e,t){let n=e.split(`.`),r=(e,t)=>{if(t===n.length)return[``];let i=n[t];if(i===void 0)return[];if(Array.isArray(e)){let a=Number(i);return!/^\d+$/u.test(i)||!Number.isSafeInteger(a)||!Object.hasOwn(e,a)?[n.slice(t).join(`.`)]:r(e[a],t+1).map(e=>e?`#${a+1}.${e}`:`#${a+1}`)}if(!O(e))return[n.slice(t).join(`.`)];let a=Object.keys(e).flatMap(i=>{let a=i.split(`.`);return a.length>n.length-t||!a.every((e,r)=>e===n[t+r])?[]:r(e[i],t+a.length).map(e=>e?`${i}.${e}`:i)});return a.length>0?a:[n.slice(t).join(`.`)]},i=new Set(r(t,0));return i.size===1?i.values().next().value??e:e}function ip(e,t,n={}){let r=(e.configFormDirty||e.configRecoveryError!==null||n.preservePendingChanges===!0)&&n.discardPendingChanges!==!0;n.discardPendingChanges===!0&&(e.configAutoSaveStatus=`idle`,e.configRecoveryError=null);let i=t.configRevisionHash??t.hash??null;t.appliedConfigHash!==void 0&&(e.configNeedsApply=i!==t.appliedConfigHash);let a=e.configDraftBaseHash??e.configSnapshot?.hash??null;Ea(e,t);let o=Aa(t);!(typeof t.raw==`string`||o||e.configForm)&&e.configFormMode===`raw`&&(e.configFormMode=`form`),r?(e.configFormMode!==`raw`&&e.configForm&&(e.configRaw=kf(e.configForm)),e.configDraftBaseHash=a):Cp(e)}function ap(e){let t=e.trim();return t===`true`||t!==`false`&&e}function op(e,t){if(e==null)return e;if(t.allOf&&t.allOf.length>0){let{allOf:n,...r}=t,i=op(e,r);for(let e of n)i=op(i,e);return i}let n=Sf(t);if(t.anyOf||t.oneOf){let n=(t.anyOf??t.oneOf??[]).filter(e=>!(e.type===`null`||Array.isArray(e.type)&&e.type.includes(`null`)));if(n.length===1){let t=n[0];return t?op(e,t):e}if(typeof e==`string`){if(n.some(Cf))return e;for(let t of n){let n=Sf(t);if(n===`number`||n===`integer`){let t=pn(e,n===`integer`);if(t===void 0||typeof t==`number`)return t}if(n===`boolean`){let t=ap(e);if(typeof t==`boolean`)return t}}}for(let t of n){let n=Sf(t);if(n===`object`&&typeof e==`object`&&!Array.isArray(e)||n===`array`&&Array.isArray(e))return op(e,t)}return e}if(n===`number`||n===`integer`)return typeof e==`string`?pn(e,n===`integer`):e;if(n===`boolean`)return typeof e==`string`?ap(e):e;if(n===`string`)return typeof e==`string`&&e.length===0&&t.minLength?void 0:e;if(n===`object`){if(typeof e!=`object`||Array.isArray(e))return e;let n=t.properties??{},r=t.additionalProperties&&typeof t.additionalProperties==`object`?t.additionalProperties:null,i={};for(let[t,a]of Object.entries(e)){let e=n[t]??r,o=e?op(a,e):a;o!==void 0&&(i[t]=o)}return i}if(n===`array`){if(!Array.isArray(e))return e;let n=t.items;return Array.isArray(n)?e.map((e,t)=>{let r=t<n.length?n[t]:void 0;return r?op(e,r):e}):n?e.map(e=>op(e,n)).filter(e=>e!==void 0):e}return e}function sp(e){if(!e.configFormDirty&&typeof e.configSnapshot?.raw==`string`)return e.configSnapshot.raw;let t=cp(e);return t?kf(t):e.configRaw}function cp(e){if(e.configFormMode!==`form`||!e.configForm)return null;let t=O(e.configSchema)?e.configSchema:null;return Nf(t?op(e.configForm,t):e.configForm,e.configFormOriginal,e.configFormOriginal)}function lp(e){return O(e)&&O(e.config)&&typeof e.hash==`string`&&e.hash.length>0}function up(e){let t=Aa(e.configSnapshot);if(!t||e.configDraftBaseHash!==e.configSnapshot?.hash)return;let n=e.configFormOriginal??e.configRawOriginalParsed;if(!n)throw Error(K(`configView.rawDraftUnverified`));if(!Zf(n,n,t))return;let r=cp(e)??mp(e.configRaw);if(!r||Zf(n,r,t))throw Error(`config changed since last load; re-run config.get and retry`)}function dp(e,t,n,r={}){let i=r.raw??kf(n.config),a=cp(e),o=a?kf(a):e.configRaw,s=Aa(t.independentSnapshot),c=!!(a&&e.configFormOriginal&&s&&Qf(e.configFormOriginal,a,s)),l=o===t.raw?structuredClone(n.config):c?null:Yf(t.form,a,n.config);if(Ea(e,{...e.configSnapshot,raw:i,hash:n.hash,valid:!0,issues:[],config:n.config,sourceConfig:n.config}),e.configDraftBaseHash=n.hash,e.configValid=!0,e.configIssues=[],e.configAutoSaveStatus=c?`conflict`:e.configAutoSaveStatus===`paused`?`paused`:`idle`,!l){c||(hp(e,t.raw),e.configFormOriginal=t.form);let r=e.configFormOriginal??e.configRawOriginalParsed,i=a??mp(e.configRaw);return(c||r&&i&&Zf(r,i,n.config))&&(e.configAutoSaveStatus=`conflict`,e.lastError=`config changed since last load; re-run config.get and retry`),e.configFormDirty=!0,e.configAutoSaveStatus}return hp(e,i),e.configFormOriginal=structuredClone(n.config),e.configForm=l,e.configRaw=kf(l),e.configFormDirty=e.configRaw!==kf(n.config),e.configFormDirty||(e.configAutoSaveStatus=`idle`,e.configRaw=i,tp(e)),e.configAutoSaveStatus}function fp(e,t){let n=e.configFormOriginal??Aa(e.configSnapshot)??{},r=kf(t),i=kf(n);e.configForm=t,e.configRaw=r,e.configFormDirty=r!==i,e.configFormMode=`form`,pp(e)}function pp(e){e.configAutoSaveStatus!==`saving`&&e.configAutoSaveStatus!==`conflict`&&e.configAutoSaveStatus!==`paused`&&((e.configAutoSaveStatus===`rejected`||!e.configFormDirty&&e.configAutoSaveStatus===`error`)&&(e.lastError=null),e.configAutoSaveStatus=`idle`)}function mp(e){try{return I(Gf(e))}catch{return null}}function hp(e,t){e.configRawOriginal=t,e.configRawOriginalParsePending=null;try{e.configRawOriginalParsed=I(Gf(t));return}catch{e.configRawOriginalParsed=null}let n=Wf().then(r=>{if(e.configRawOriginal===t&&e.configRawOriginalParsePending===n)try{e.configRawOriginalParsed=I(r.parse(t))}catch{e.configRawOriginalParsed=null}}).catch(()=>void 0).finally(()=>{e.configRawOriginalParsePending===n&&(e.configRawOriginalParsePending=null)});e.configRawOriginalParsePending=n}function gp(e,t){let n;if(e.configFormDirty&&e.configFormMode===`raw`){let t=mp(e.configRaw);if(!t){e.configAutoSaveStatus=`error`,e.lastError=K(`configView.rawDraftBlocksFormEdit`);return}n=t}else n=structuredClone(e.configForm??Aa(e.configSnapshot)??{});t(n),fp(e,n)}function _p(e,t){let n=Dp.get(e)??new Set;n.add(t),Dp.set(e,n)}function vp(e,t){let n=Dp.get(e);n&&(n.delete(t),n.size===0&&Dp.delete(e))}function yp(e,t,n,r){if(n.length!==4||n[0]!==`plugins`||n[1]!==`entries`||typeof n[2]!=`string`||n[3]!==`enabled`)return;let i=n[2],a=I(t.plugins),o=Array.isArray(a?.allow)?a.allow:null;if(!o){vp(e,i);return}if(r===!0){if(o.includes(i))return;if(o.length===0){vp(e,i);return}If(t,[`plugins`,`allow`],[...o,i]),_p(e,i);return}Dp.get(e)?.has(i)&&(If(t,[`plugins`,`allow`],o.filter(e=>e!==i)),vp(e,i))}function bp(e,t,n){gp(e,r=>{if(If(r,t,n),t[0]===`plugins`&&t[1]===`allow`){Dp.delete(e);return}yp(e,r,t,n)})}function xp(e,t,n=!1){Wf().catch(()=>void 0),e.configRaw=t,e.configFormDirty=t!==e.configRawOriginal,e.configFormDirty?e.configDraftBaseHash=e.configDraftBaseHash??e.configSnapshot?.hash??null:n?(e.configForm=structuredClone(e.configFormOriginal??{}),tp(e)):Cp(e),e.configFormMode=`raw`,pp(e)}function Sp(e){let t=Aa(e.configSnapshot);e.configFormOriginal=structuredClone(t??{}),hp(e,e.configSnapshot?.raw??(t?kf(t):e.configRawOriginal)),e.configDraftBaseHash=e.configSnapshot?.hash??null}function Cp(e){Sp(e),e.configForm=structuredClone(e.configFormOriginal??{}),e.configRaw=e.configRawOriginal,e.configFormDirty=!1,e.configFormMode=`form`,Dp.delete(e)}function wp(e,t){gp(e,e=>Lf(e,t))}function Tp(e,t){let n=Aa(e.configSnapshot),r=e.configFormOriginal;if(!n||!e.configSnapshot?.hash||e.configValid!==!0||!r||!e.configForm||e.configFormMode!==`form`)return!1;let i=structuredClone(e.configForm),a=t.reduce((e,t)=>Array.isArray(e)&&typeof t==`number`||O(e)&&typeof t==`string`?e[t]:void 0,r);if(a===void 0?Lf(i,t):If(i,t,structuredClone(a)),i=Nf(i,r,r),Qf(r,i,n))return e.configAutoSaveStatus=`conflict`,e.lastError=`config changed since last load; re-run config.get and retry`,!1;let o=Yf(r,i,n);return o?(Sp(e),e.configAutoSaveStatus!==`paused`&&(e.configAutoSaveStatus=`idle`),fp(e,o),e.lastError=null,!0):!1}function Ep(e,t){let n=Na(e.configForm??Aa(e.configSnapshot),t);if(!n)return!1;let r=n.path[2];return gp(e,e=>{let t=I(e.agents),n=I(t?.entries);if(n){for(let e of Object.values(n))O(e)&&delete e.default;Object.keys(n).length>1&&If(e,[`agents`,`ownership`],`explicit`),If(e,[`agents`,`defaults`,`systemAgent`,`agentId`],r)}}),!0}var Dp;function Op(){return(Op=e((()=>{Qt(),Ht(),q(),Hf(),Y(),Jf(),$f(),Ha(),Dp=new WeakMap})))()}function kp(){return++Mp}async function Ap(e,t){let n=kp();if(!e)return!1;if(navigator.clipboard?.writeText)try{return await navigator.clipboard.writeText(e),!0}catch{}return n!==Mp||t&&!t()?!1:jp(e)}function jp(e){let t=document.createElement(`textarea`),n=document.activeElement instanceof HTMLElement?document.activeElement:void 0;t.value=e,t.style.position=`fixed`,t.style.opacity=`0`,([...document.openClawModalLayers??[]].findLast(e=>e.isConnected)??document.body).appendChild(t),t.select();try{return document.execCommand(`copy`)}catch{return!1}finally{if(t.remove(),n?.isConnected){let e=t.ownerDocument;window.setTimeout(()=>{let{activeElement:t,body:r}=e;n.isConnected&&(!t||t===r)&&n.focus({preventScroll:!0})},0)}}}var Mp;function Np(){return(Np=e((()=>{Mp=0})))()}function Pp(e,t,n){let r=n===void 0?J(t):np(t,n),i=t instanceof gt&&O(t.details)?t.details:null;return i&&(i.publication===`partial`||i.publication===`complete`)?(i.rollbackStatus!==`restored`&&(typeof i.configPath==`string`&&(r=K(i.rollbackStatus===`not-restored`?`configView.recoveryNotRestored`:`configView.recoveryUnknown`,{path:i.configPath}),typeof i.recoveryBackupPath==`string`&&(r+=`
`+K(`configView.recoveryBackup`,{path:i.recoveryBackupPath}))),e.configRecoveryError=r),{status:`error`,message:r}):r.includes(`config changed since last load`)?{status:`conflict`,message:r}:t instanceof gt&&A(t)&&t.gatewayCode===f.INVALID_REQUEST&&i?.publication===void 0&&i?.persistedConfig===void 0&&Array.isArray(i?.issues)&&i.issues.length>0&&i.issues.every(e=>O(e)&&typeof e.path==`string`&&typeof e.message==`string`)?{status:`rejected`,message:r.replace(/^GatewayRequestError: /u,``)}:{status:`error`,message:r}}function Fp(e){if(!(e instanceof gt))return!1;let t=O(e.details)?e.details:null;return t&&(t.publication===`partial`||t.publication===`complete`)?t.rollbackStatus===`restored`:e.gatewayCode===f.INVALID_REQUEST||e.gatewayCode===f.FORBIDDEN}function Ip(){return(Ip=e((()=>{a(),C(),Qt(),q(),Y(),Op()})))()}async function Lp(e,t,n,r){let i=e.configFormMode===`form`&&e.configFormDirty?ep(e.configSnapshot):null,a=e.client,o=Ta(e);await t()&&a&&Oa(e,a,o)&&i!==null&&ep(e.configSnapshot)===i&&(e.configDraftBaseHash=e.configSnapshot?.hash??e.configDraftBaseHash,n()),r()}async function Rp(e,t,n,r,i,a,o){if(!Oa(e,t,n))return{ok:!1,reason:`unavailable`,error:`Connection changed before the configuration update started.`};if(i.canDispatch&&!i.canDispatch())return{ok:!1,reason:`unavailable`,error:i.dispatchError??`Access changed before the configuration update started.`};let s={operation:`independent`,raw:e.configFormDirty?e.configRawOriginal:sp(e),form:e.configFormOriginal,independentSnapshot:e.configSnapshot},c;try{c=await r(t)}catch(r){if(!Oa(e,t,n))return{ok:!1,reason:`unavailable`,error:`Connection changed before the configuration update completed.`};let i=Pp(e,r);return{ok:!1,reason:i.status===`conflict`?`conflict`:Fp(r)?`rejected`:`error`,error:i.message}}let l=e=>({ok:!0,value:c,refresh:{ok:!1,error:e}});try{let r=i.configWriteAck?.(c);if(r&&r.noop!==!0&&(o?.({...s,ack:r}),Oa(e,t,n)&&dp(e,s,r)),!Oa(e,t,n))return l(`Connection changed before the configuration update was refreshed.`);if(r?.noop!==!0&&i.shouldRefresh&&!i.shouldRefresh(c))return{ok:!0,value:c,refresh:{ok:!0}};let u=await a();if(!Oa(e,t,n))return l(`Connection changed before the configuration update was refreshed.`);if(!u.ok)return l(u.error);if(r?.noop===!0){let t=e.configSnapshot,n=Aa(t);if(!n||!t?.hash)throw Error(`Config hash missing; refresh and retry.`);dp(e,{raw:e.configRawOriginal,form:e.configFormOriginal,independentSnapshot:t},{config:n,hash:t.hash},{raw:t.raw})}return{ok:!0,value:c,refresh:{ok:!0}}}catch(e){return l(J(e))}}function zp(e,t={},n=()=>!0){let r=e.client;if(!r||!e.connected)return null;let i=Sa(e,r);return Hp(e,i,t,n).then(i.completion.resolve),i}function Bp(e,t={},n=()=>!0){let r=zp(e,t,n);return r?r.completion.promise.then(e=>e.ok):Promise.resolve(!1)}async function Vp(e,t={}){let n=zp(e,t);if(!n)return w(`Configuration is unavailable; reconnect and try again.`);let{client:r,connectionEpoch:i}=n;for(;;){let t=await Promise.race([n.completion.promise,n.invalidated.promise]);if(!Oa(e,r,i))return w(`Connection changed before the configuration update was refreshed.`);let a=xa(e);if(!a)return w(`The configuration refresh was superseded by a configuration write.`);if(a===n)return t;n=a}}async function Hp(e,{client:t,connectionEpoch:n,version:r},i,a){let o=()=>a()&&ka(e,`config`,r,t,n);i.background||(e.configLoading=!0),!i.draftWrites?.hasUnacknowledgedDraftWrite()&&e.configAutoSaveStatus!==`conflict`&&e.configAutoSaveStatus!==`rejected`&&(!i.background||e.configAutoSaveStatus!==`error`)&&(e.lastError=null,e.chatError=null);try{let n=await t.request(`config.get`,{});if(!o())return w(`The configuration refresh was superseded.`);if(e.configValid=typeof n.valid==`boolean`?n.valid:null,e.configIssues=Array.isArray(n.issues)?n.issues:[],n.writeError){let t=Pp(e,new gt(n.writeError));return e.lastError=t.message,e.configAutoSaveStatus=`error`,w(t.message)}return e.configRecoveryError!==null&&(!n.exists||!n.valid)?w(e.configRecoveryError):(i.beforeApplySnapshot?.(),o()?(i.draftWrites?i.draftWrites.applySnapshot(n,i):ip(e,n,i),!i.background&&!e.configFormDirty&&!i.draftWrites?.hasUnacknowledgedDraftWrite()&&((e.configAutoSaveStatus===`error`||e.configAutoSaveStatus===`conflict`||e.configAutoSaveStatus===`rejected`)&&(e.configAutoSaveStatus=`idle`),e.lastError=null),se(void 0)):w(`The configuration refresh was superseded.`))}catch(t){if(!o())return w(`The configuration refresh was superseded.`);let n=Pp(e,t);return e.lastError=n.message,(e.configAutoSaveStatus===`rejected`||i.draftWrites?.hasUnacknowledgedDraftWrite())&&(e.configAutoSaveStatus=`error`),w(n.message)}finally{ka(e,`config`,r,t,n)&&(e.configLoading=!1)}}async function Up(e){let t=e.client;if(!t||!e.connected||e.configSchemaLoading)return;let n=Ta(e),r=Ca(e,`schema`);e.configSchemaLoading=!0;try{let i=await t.request(`config.schema`,{});if(!ka(e,`schema`,r,t,n))return;e.configSchema=i.schema??null,e.configUiHints=i.uiHints??{},e.configSchemaVersion=i.version??null}catch(i){ka(e,`schema`,r,t,n)&&(e.lastError=J(i),e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`))}finally{ka(e,`schema`,r,t,n)&&(e.configSchemaLoading=!1)}}async function Wp(e,t,n,r=()=>!0){let i=e.client,a=()=>t!==`auto`||e.configFormDirty&&e.configFormMode===`form`;if(!i||!e.connected||!a()||e.configRecoveryError!==null)return!1;let o=Ta(e),s=()=>Oa(e,i,o),c=t===`auto`?null:t===`apply`?`configApplying`:`configSaving`;c&&(e[c]=!0,e.lastError=null,e.chatError=null);let l=null,u=null;try{if(e.configRawOriginalParsePending&&await e.configRawOriginalParsePending,!s()||!a())return!1;up(e);let o=sp(e),c={operation:t===`apply`?`apply`:`save`,raw:o,form:cp(e),independentSnapshot:null};l=e.configFormMode===`form`?o:null;let d=e.configDraftBaseHash??e.configSnapshot?.hash;if(!d)return e.lastError=`Config hash missing; reload and retry.`,e.configAutoSaveStatus=`error`,!1;if(!r())return!1;t===`auto`&&(e.configAutoSaveStatus=`saving`,e.lastError=null,e.chatError=null),u={...c,ack:null},n?.(u);let f=await i.request(t===`apply`?`config.apply`:`config.set`,{raw:o,baseHash:d,...t===`apply`?{sessionKey:e.applySessionKey}:{}});return n?.({...c,ack:f}),!s()||(dp(e,c,f),e.configNeedsApply=t!==`apply`,t!==`auto`&&(await Bp(e),!s()))?!1:(t!==`apply`&&e.configAutoSaveStatus!==`conflict`&&(e.configAutoSaveStatus=e.configFormDirty?`idle`:`saved`),!0)}catch(t){if(s()){let r=Pp(e,t,l);u&&e.configRecoveryError===null&&Fp(t)&&n?.({...u,rejected:!0}),e.lastError=r.message,e.configAutoSaveStatus=r.status}return!1}finally{c&&s()&&(e[c]=!1)}}function Gp(e,t,n,r,i){if(dp(e,n,r),!i()||!e.configFormDirty)return;try{up(e)}catch(t){let n=Pp(e,t);e.lastError=n.message,e.configAutoSaveStatus=n.status;return}let a={raw:sp(e),form:cp(e),independentSnapshot:null};t.request(`config.set`,{raw:a.raw,baseHash:r.hash}).then(t=>dp(e,a,t)).catch(()=>void 0)}async function Kp(e,t,n){let r=e.client,i=e.configSnapshot;if(!r||!e.connected||!i)return!1;let a=Ta(e),o=i.hash,s=Aa(i);if(!o||!s)return e.lastError=`Config hash missing; refresh and retry.`,e.configAutoSaveStatus=`conflict`,!1;if(t.canDispatch&&!t.canDispatch())return!1;let c=e.configFormDirty?e.configAutoSaveStatus:`idle`,l={operation:`independent`,raw:e.configRawOriginal,form:e.configFormOriginal,independentSnapshot:i};e.configAutoSaveStatus=`saving`,e.lastError=null,e.chatError=null;try{let u=await r.request(`config.patch`,{baseHash:o,raw:typeof t.raw==`string`?t.raw:JSON.stringify(t.raw),sessionKey:e.applySessionKey,note:t.note,...t.replacePaths?.length?{replacePaths:t.replacePaths}:{}}),d={config:u.noop===!0?s:u.config,hash:u.noop===!0?o:u.hash};if(n?.({...l,ack:d}),!Oa(e,r,a))return!1;let f=dp(e,l,d,{raw:u.noop===!0?i.raw:void 0});return u.noop!==!0&&(e.configNeedsApply=!0),e.configAutoSaveStatus=f===`conflict`?`conflict`:e.configFormDirty&&c===`paused`?`paused`:e.configFormDirty?`idle`:`saved`,!0}catch(t){if(Oa(e,r,a)){if(t instanceof gt&&A(t)&&t.gatewayCode===f.UNAVAILABLE&&O(t.details)&&t.details.publication!==`partial`&&t.details.publication!==`complete`&&lp(t.details.persistedConfig)){n?.({...l,ack:t.details.persistedConfig});let r=dp(e,l,t.details.persistedConfig);if(e.configNeedsApply=!0,r===`conflict`)return!1}let r=Pp(e,t);e.lastError=r.message,e.configAutoSaveStatus=r.status}return!1}}async function qp(e,t){let n=e.client;if(!n||!e.connected)return null;let r=Ta(e);try{let i=await n.request(`config.schema.lookup`,{path:t});return Oa(e,n,r)?i:null}catch(t){if(!Oa(e,n,r))return null;throw t}}async function Jp(e){let t=e.client;if(!t||!e.connected)return;let n=Ta(e),r=()=>Oa(e,t,n);e.configAutoSaveStatus!==`rejected`&&(e.lastError=null),e.chatError=null;let i=async(t,n)=>{if(!r())return;let i=t;n&&(i+=await Ap(n)?`\n\nFile path copied to clipboard: ${n}`:`\n\nFile path: ${n}`),r()&&(e.lastError=$r(i),e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`),ri({message:e.lastError}))};try{let n=await t.request(`config.openFile`,{});if(!r())return;if(!n.ok){await i($r(n.error,`Failed to open config file`),n.path||e.configSnapshot?.path);return}ri({message:K(`configView.fileOpenedOnGateway`)})}catch(t){await i(J(t),e.configSnapshot?.path)}}function Yp(){return(Yp=e((()=>{a(),C(),Qt(),q(),Np(),Y(),ci(),Op(),Ip(),Ha()})))()}function Xp(e){let{state:t}=e,n=async()=>{let t=e.holdAutoSave();try{e.hasInFlightWrite()&&await e.drainPendingWrites()}finally{t(!1)}e.clearPatches()};return async r=>{if(e.invalidateFieldDiscards(),await n(),t.connected&&t.client){e.cancelAppliedRefresh();try{await e.run(()=>Bp(t,{discardPendingChanges:!0}),`config`)&&e.clearDraftConnection()}finally{e.reconcileAppliedRefresh()}return}r?.reloadOnly||t.configRecoveryError!==null||(e.mutate(()=>{Cp(t),t.configAutoSaveStatus!==`conflict`&&(t.configAutoSaveStatus=`idle`,t.lastError=null)}),e.clearDraftConnection())}}function Zp(){return(Zp=e((()=>{Op(),Yp()})))()}function Qp(e){let{state:t}=e,n=new Set;return{invalidate:e=>{for(let t of n)(!e||e.slice(0,Math.min(e.length,t.path.length)).every((e,n)=>e===t.path[n]))&&(t.current=!1)},discard:async r=>{let i=t.client,a=Ta(t);if(!i||!t.connected||t.configFormMode!==`form`)return!1;let o={path:[...r],current:!0};n.add(o);let s=e.holdAutoSave(),c=!1,l=()=>o.current&&!e.isDisposed()&&Oa(t,i,a);try{return c=await e.serialize(async()=>!l()||!await e.readSnapshot()||!l()||t.configRecoveryError!==null?!1:e.hasUnacknowledgedDraftWrite()?(t.lastError=K(`configView.discardUnconfirmed`),t.configAutoSaveStatus=`error`,!1):Tp(t,o.path)),c}finally{n.delete(o),e.reconcileDraft(),s(c),e.publish()}}}}function $p(){return($p=e((()=>{q(),Op(),Ha()})))()}function em(e){let{state:t}=e,n=null,r=r=>(e.cancelAppliedRefresh(),e.dispatch(async i=>{e.cancelAppliedRefresh();let a=t.client,o=Ta(t);try{let s=r();if(`error`in s)return t.lastError=s.error,t.configAutoSaveStatus=`error`,n=r,!1;if(!a||!t.configSnapshot||s.options.canDispatch?.()===!1)return!1;let c=await Kp(t,s.options,i);return Oa(t,a,o)&&(n=c?null:r,c&&e.reconcileDraft()),c}finally{e.reconcileAppliedRefresh()}}).finally(e.scheduleAutoSave));return{queue:r,retry:e=>n?r(n):e(),clear:()=>{n=null}}}function tm(){return(tm=e((()=>{Yp(),Ha()})))()}function nm({state:e,getFlight:t,invalidateConfigLoad:n,refreshConnectionState:r,refreshSnapshot:i,isDisposed:a,pauseAutoSaveDraftConnection:o,clearAutoSaveDraftConnection:s,publish:c,reconcileAppliedRefresh:l}){let u=null,d=!1,f=null,p=()=>{d=!1,f=null},m=()=>{let e=u??f;return e&&!e.ack&&!e.rejected&&e.operation!==`independent`?e:null},h=()=>m()!==null,g=(e,t)=>t!==null&&(e.gatewayUrl===t.gatewayUrl||ut(e.gatewayUrl)===ut(t.gatewayUrl)),_=()=>{let t=m();return!t||g(t,e.client)?!0:e.client?(e.configAutoSaveStatus=`error`,e.lastError=K(`configView.writeGatewayChanged`),!1):!1},v=(n,r={})=>{let i=m();if(ip(e,n,{...r,preservePendingChanges:i!==null||r.preservePendingChanges===!0}),r.discardPendingChanges){u=null,p();return}let a=Aa(n),o=n.configRevisionHash??n.hash,s=i?.form&&i.raw===e.configRawOriginal?ep(n):n.raw;if(i&&g(i,e.client)&&t()?.submission!==i&&s===i.raw&&n.hash&&a){let t={config:a,hash:n.hash},r=i.operation===`save`||!!o&&n.appliedConfigHash===o,s=e.configAutoSaveStatus,c=e.lastError;dp(e,i,t,{raw:n.raw}),r&&(u={...i,ack:t},p()),(!r||e.configFormDirty)&&e.configAutoSaveStatus!==`conflict`?(e.configAutoSaveStatus=s===`conflict`?`error`:s,e.lastError=c):r&&!e.configFormDirty&&(e.lastError=null)}};return{applySnapshot:v,canWriteDraft:_,unacknowledgedDraftWrite:m,hasUnacknowledgedDraftWrite:h,get latestSubmission(){return u??f},get interrupted(){return d},createFlight(){let r=m(),i={promise:Promise.resolve(),submission:null,snapshotAtDispatch:e.configSnapshot},o=e.client,s=Ta(e);return{flight:i,onSubmitted:c=>{if(!o)return;let l={...c,gatewayUrl:o.gatewayUrl};!c.ack&&!c.rejected&&(i.snapshotAtDispatch=e.configSnapshot),i.submission=l,!a()&&Oa(e,o,s)&&(u=c.rejected&&r?r:l,c.ack&&p()),c.ack&&!a()&&t()===i&&n()}}},reconcileSettledFlight(t,n,r){n&&e.configSnapshot&&e.configSnapshot!==t.snapshotAtDispatch&&v(e.configSnapshot),r?.(),t.submission?.rejected&&!h()&&!e.configFormDirty&&e.configSnapshot?(ip(e,e.configSnapshot),t.submission.operation===`save`&&(pp(e),c())):t.submission?.rejected&&h()&&(e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`,e.lastError=K(`configView.writeUnconfirmed`)),i())},flushDisposedFlight(t,n,r){n.promise.then(()=>{let i=n.submission,a=i?.ack??null;a&&i&&g(i,t)&&Gp(e,t,i,a,r)})},retireConnection(){u=null},interrupt(e){d=!0,f=e?.ack?null:e},refreshInterrupted(){let t=f,n=t?.raw??null;t&&!t.ack&&!t.rejected&&(u=t);let i=()=>({form:structuredClone(e.configForm??{}),raw:e.configRaw,mode:e.configFormMode,originalRaw:e.configRawOriginal,dirty:e.configFormDirty,submittedRaw:e.configFormDirty?sp(e):e.configRaw}),d=null;r(()=>{d=i()},n!==null).then(r=>{if(!a()){if(!r||!e.connected){l();return}if(!_()){c(),l();return}if(p(),n!==null&&e.configSnapshot?.raw!==n){let t=e.configSnapshot?.raw,n=d&&t===d.originalRaw;d&&n&&!d.dirty&&Cp(e);let r=typeof t==`string`&&!n;r&&(e.configFormDirty=!0),e.configAutoSaveStatus=r?`conflict`:`error`,e.lastError=r?`config changed since last load; re-run config.get and retry`:K(`configView.writeUnconfirmed`),c(),l();return}if(t?.operation===`apply`&&m()===t){e.configAutoSaveStatus=`error`,e.lastError??=K(`configView.writeUnconfirmed`),c(),l();return}if(n!==null&&e.configSnapshot?.raw===n){e.configSnapshot.appliedConfigHash===void 0&&(e.configNeedsApply=!0);let t=e.configFormDirty?i():d;t&&t.submittedRaw!==n?(Sp(e),e.configForm=t.form,e.configRaw=t.raw,e.configFormMode=t.mode,e.configFormDirty=!0,o()):(Cp(e),e.configAutoSaveStatus=`idle`,s())}c(),l()}})},clear(){u=null,p()}}}function rm(){return(rm=e((()=>{q(),Op(),Yp(),Ha()})))()}function im({state:e,gateway:t,publish:n,run:r,mutate:i,resetLoads:a,resetConfigLoad:o,refreshConnectionState:s,canCallConfigMethod:c,cancelAppliedRefresh:l,reconcileAppliedRefresh:u,disposeAppliedRefresh:d,isDisposed:f}){let p=null,m=null,h=!1,g=null,_=!1,v=0,y=null,b=Promise.resolve(),x=()=>{b=new Promise(e=>{y=e})};x();let S=!1,C,w=null,T=Promise.resolve(),ee=t=>{let r=c(t);return!r&&e.connected&&(e.lastError=K(`configView.adminRequired`),e.configAutoSaveStatus===`rejected`&&(e.configAutoSaveStatus=`error`),n()),r&&t!==`config.patch`&&!j.canWriteDraft()?(n(),!1):r},E=()=>{g=null,_=!1,e.configAutoSaveStatus===`paused`&&(e.configAutoSaveStatus=`idle`)},D=()=>{_=!0,e.configFormMode===`form`&&e.configAutoSaveStatus!==`conflict`&&(e.configAutoSaveStatus=`paused`)},O=()=>{if(_){D();return}!g&&e.client&&e.connected&&e.configFormDirty&&e.configFormMode===`form`&&(g={client:e.client,epoch:Ta(e)})},k=()=>{e.client&&e.connected&&e.configFormMode===`form`&&(g={client:e.client,epoch:Ta(e)},_=!1,e.configAutoSaveStatus===`paused`&&(e.configAutoSaveStatus=`idle`))},A=()=>e.configAutoSaveStatus!==`conflict`&&e.configRecoveryError===null&&j.canWriteDraft()&&!_&&g!==null&&g.client===e.client&&g.epoch===Ta(e),j=nm({state:e,getFlight:()=>m,invalidateConfigLoad:()=>re(),refreshConnectionState:s,refreshSnapshot:()=>r(()=>Bp(e,{background:!0,draftWrites:he}),`config`),isDisposed:f,pauseAutoSaveDraftConnection:D,clearAutoSaveDraftConnection:E,publish:n,reconcileAppliedRefresh:u}),{applySnapshot:te,unacknowledgedDraftWrite:M,hasUnacknowledgedDraftWrite:N}=j,ne=()=>{e.configFormDirty?O():m===null&&E()},P=()=>{p&&=(clearTimeout(p),null),h=!1},re=()=>{o(),Ca(e,`config`),e.configLoading=!1},ie=(t,n=!1)=>{let{flight:r,onSubmitted:i}=j.createFlight(),a=t(i);return r.promise=a.catch(()=>!1).then(t=>{if(m!==r)return;let i=!t&&N();i&&P(),m=null,j.reconcileSettledFlight(r,i,n?ne:void 0);let a=h||n&&t&&e.configFormDirty&&e.configFormMode===`form`&&p===null;h=!1,a&&!f()?F():u()}),m=r,a},F=()=>{if(!(f()||v||S||!A()||!c(`config.set`))){if(m){h=!0;return}l(),ie(t=>r(()=>Wp(e,`auto`,t,()=>ee(`config.set`)?(pe.clear(),!0):!1)),!0).catch(()=>void 0)}},ae=()=>{p&&(clearTimeout(p),p=null,F())},oe=()=>{!f()&&!S&&A()&&c(`config.set`)&&e.configFormDirty&&e.configFormMode===`form`&&(l(),p&&clearTimeout(p),p=setTimeout(()=>{p=null,F()},am))},se=async(e=!1)=>{for(;;){e&&ae();let t=m;if(!t||(await Promise.race([t.promise,b]),f()))return;e||P()}},ce=()=>(v++,P(),e=>{v--,e&&oe()}),le=null,ue=(t,n,i={})=>{if(S&&!C)return Promise.resolve(n());let a=e.client,o=Ta(e);i.flushScheduledDraft?ae():P();let s=()=>r(async()=>{S&&C&&!f()&&(await C(),S||(i.flushScheduledDraft?ae():P())),m&&await se(i.flushScheduledDraft);let r=j.interrupted&&i.flushScheduledDraft?xa(e):null;r&&await Promise.race([r.completion.promise,r.invalidated.promise]);let s=a&&Oa(e,a,o);return S||f()||!s?n():e.configRecoveryError!==null||i.canDispatch?.()===!1?n(e.configRecoveryError??void 0):i.flushScheduledDraft&&N()?(e.lastError=K(`configView.writeUnconfirmed`),e.configAutoSaveStatus=`error`,n(e.lastError)):await ie(t)}),c=le?le.then(s):s(),l=c.catch(()=>!1).then(()=>{le===l&&(le=null)});return le=l,c},de=Qp({state:e,serialize:e=>ue(e,()=>!1),readSnapshot:()=>r(()=>Bp(e,{draftWrites:he}),`config`),hasUnacknowledgedDraftWrite:N,holdAutoSave:ce,isDisposed:f,publish:n,reconcileDraft:ne}),fe=t.subscribe(t=>{let r=e.client!==t.client,i=e.connected!==(t.phase===`connected`);if(e.client=t.client,e.connected=t.phase===`connected`,e.applySessionKey=t.sessionKey,r||i){let t=M();de.invalidate(),j.retireConnection(),pe.clear();let r=e.configFormDirty||m!==null||t!==null;a(),le=null,Da(e),P(),l(),r&&D(),(m!==null||t!==null)&&(j.interrupt(m?.submission??t),m=null,h=!1);let i=y;x(),i?.(),e.configLoading=!1,e.configSchemaLoading=!1,e.configSaving=!1,e.configApplying=!1,e.configAutoSaveStatus===`saving`&&(e.configAutoSaveStatus=`idle`),e.connected&&e.client&&(j.interrupted?j.refreshInterrupted():Lp(e,s,n,u))}n()}),pe=em({state:e,reconcileDraft:ne,dispatch:e=>ue(e,()=>!1,{flushScheduledDraft:!0,canDispatch:()=>ee(`config.patch`)}),cancelAppliedRefresh:l,reconcileAppliedRefresh:u,scheduleAutoSave:()=>{N()||oe()}}),I=(e,t)=>{de.invalidate(t),i(e),ne(),oe()},me=(t,n)=>n()?ue(async r=>{k(),l();try{if(t===`apply`&&e.configFormDirty&&e.configFormMode===`raw`)return e.configAutoSaveStatus=`error`,e.lastError=K(`configView.rawDraftBlocksApply`),!1;let i=await Wp(e,t,e=>{t===`save`&&e.ack===null&&pe.clear(),r(e)},()=>n()?(t===`apply`&&pe.clear(),!0):!1);return ne(),i}finally{u()}},()=>!1,{canDispatch:n}):Promise.resolve(!1),he={hasUnacknowledgedDraftWrite:N,applySnapshot:te,patchForm:(t,n)=>I(()=>bp(e,t,n),t),removeFormValue:t=>I(()=>wp(e,t),t),setRaw:t=>I(()=>xp(e,t,N())),discardFormValue:de.discard,discardDraft:Xp({state:e,invalidateFieldDiscards:de.invalidate,hasInFlightWrite:()=>m!==null,holdAutoSave:ce,drainPendingWrites:se,clearPatches:pe.clear,run:r,mutate:i,clearDraftConnection:()=>{j.clear(),E()},cancelAppliedRefresh:l,reconcileAppliedRefresh:u}),setWritesSuspended:(e,t)=>{if(C=t,S!==e){if(S=e,e)P(),T=new Promise(e=>{w=e});else{let e=w;w=null,e?.(),N()||oe()}}},waitForPendingWrites:()=>se(!0),flushFormChanges:async()=>{let t=e.client,n=Ta(e);return!t||!c(`config.set`)||e.configFormMode!==`form`?!1:(await se(!0),!f()&&Oa(e,t,n)&&!e.configFormDirty&&e.configRecoveryError===null&&(e.configAutoSaveStatus===`saved`||e.configAutoSaveStatus===`idle`))},save:(e={})=>me(`save`,()=>ee(`config.set`)&&(e.canDispatch?.()??!0)),retry:()=>pe.retry(()=>j.latestSubmission?.operation===`apply`?he.apply():he.save()),apply:()=>me(`apply`,()=>ee(`config.apply`)),stageDefaultAgent:t=>{if(!ee(`config.set`))return!1;de.invalidate([`agents`]);let r=Ep(e,t);return n(),ne(),oe(),r},patch:e=>ee(`config.patch`)&&(e.canDispatch?.()??!0)?pe.queue(()=>({options:e})):Promise.resolve(!1),patchFromSnapshot:t=>ee(`config.patch`)?pe.queue(()=>{let n=Aa(e.configSnapshot);return n?t(n):{error:`Configuration is unavailable; refresh and try again.`}}):Promise.resolve(!1),runExternalMutation:async(t,n={})=>{let i=e.client,a=Ta(e);for(;;){if(n.waitForWritesResumed&&S&&!f()&&(await C?.(),S&&!f()&&await T),!i||!Oa(e,i,a))return{ok:!1,reason:`unavailable`,error:`Connection changed before the configuration update started.`};let o=await ue(o=>Rp(e,i,a,t,n,()=>r(()=>Vp(e,{draftWrites:he}),`config`),o),e=>({ok:!1,reason:S?`suspended`:`unavailable`,error:e??(S?`Configuration writes are temporarily suspended.`:`Configuration is unavailable; reconnect and try again.`)}),{flushScheduledDraft:!0});if(!n.waitForWritesResumed||f()||o.ok||o.reason!==`suspended`&&!S)return o}},dispose(){de.invalidate(),pe.clear(),w?.(),w=null,y?.();let t=e.client,n=e.connected&&t!==null&&!S&&c(`config.set`),r=m;P(),d(),t&&r?j.flushDisposedFlight(t,r,()=>n&&!_&&c(`config.set`)):n&&!N()&&A()&&e.configFormDirty&&e.configFormMode===`form`&&Wp(e,`auto`,void 0,()=>c(`config.set`)),Da(e),e.connected=!1,e.configLoading=!1,e.configSchemaLoading=!1,e.configSaving=!1,e.configApplying=!1,fe(),j.clear()}};return he}var am;function om(){return(om=e((()=>{q(),Zp(),Op(),$p(),Yp(),tm(),Ha(),rm(),am=800})))()}function sm(e){let t=ya(e.snapshot),n=yt(()=>!t.configFormDirty&&!t.configSaving&&!t.configApplying&&!f.hasUnacknowledgedDraftWrite(),()=>ri({message:K(`configView.reloadBlocked`)})),r=new Set,i=new Map,a=!1,o=(t,n)=>Rn({client:e.snapshot.client,hello:e.snapshot.hello??null,phase:e.snapshot.phase},t,t===`config.schema`?`operator.read`:`operator.admin`,n),s=()=>{if(!a)for(let e of r)e(t)},c=async(e,t)=>{let n;try{return n=e(),t&&i.set(t,n),s(),await n}finally{try{s()}finally{t&&i.get(t)===n&&i.delete(t)}}},l=e=>{e(),s()},u=async(e,t)=>{await(i.get(e)??c(t,e))},d=ff({shouldRefresh:()=>!a&&t.connected&&t.configNeedsApply&&t.configSnapshot?.appliedConfigHash!==void 0,refresh:e=>u(`config`,()=>Bp(t,{background:!0,draftWrites:f},e))}),f=im({state:t,gateway:e,publish:s,run:c,mutate:l,resetLoads:()=>{i.clear()},resetConfigLoad:()=>{i.delete(`config`)},refreshConnectionState:(e,n=!1)=>{let r=c(()=>Bp(t,{beforeApplySnapshot:e,preservePendingChanges:n,draftWrites:f}),`config`);return t.configSchemaVersion!==null&&m()&&c(()=>Up(t),`schema`),r},canCallConfigMethod:o,cancelAppliedRefresh:d.cancel,reconcileAppliedRefresh:d.reconcile,disposeAppliedRefresh:d.dispose,isDisposed:()=>a}),p=async()=>{t.configSnapshot||await u(`config`,()=>Bp(t,{draftWrites:f})),d.reconcile()},m=()=>{let t=e.snapshot;return!t.client||t.phase!==`connected`||zn(t,`config.schema`)===!1?!1:an(t.hello?.auth??null)};return{get state(){return t},get canSet(){return o(`config.set`)},get canApply(){return o(`config.apply`)},get canPatch(){return o(`config.patch`)},get canOpenFile(){return o(`config.openFile`,{requireAdvertisement:!1})},ensureLoaded:p,ensureSchemaLoaded:()=>t.configSchema||!m()?Promise.resolve():u(`schema`,()=>Up(t)),refresh:async e=>{d.cancel();try{await c(()=>Bp(t,{...e,draftWrites:f}),`config`)}finally{d.reconcile()}},refreshSchema:()=>c(()=>Up(t),`schema`),patchForm:f.patchForm,removeFormValue:f.removeFormValue,setRaw:f.setRaw,discardDraft:f.discardDraft,discardFormValue:f.discardFormValue,setWritesSuspended:f.setWritesSuspended,waitForPendingWrites:f.waitForPendingWrites,flushFormChanges:f.flushFormChanges,save:f.save,retry:f.retry,apply:f.apply,openFile:()=>o(`config.openFile`,{requireAdvertisement:!1})?c(()=>Jp(t)):Promise.resolve(),agentEntry:(e,n)=>Pa(t,e,n),stageDefaultAgent:f.stageDefaultAgent,patch:f.patch,patchFromSnapshot:f.patchFromSnapshot,runExternalMutation:f.runExternalMutation,lookupSchemaPath:e=>c(()=>qp(t,e)),subscribe(e){return r.add(e),()=>r.delete(e)},dispose(){n(),a=!0,f.dispose(),r.clear(),wa(t),tp(t)}}}function cm(){return(cm=e((()=>{Dn(),Jt(),q(),Vn(),ci(),mf(),Op(),Yp(),Ha(),om()})))()}function lm(e,t){let n=e.state.selectedId,r=e.intentRevision;return e.subscribe(()=>{let i=e.state.selectedId,a=e.intentRevision!==void 0&&e.intentRevision!==r;r=e.intentRevision,n!==i&&(n=i,t(i,a))})}function um(e){let t=new Map,n=()=>{let t=e.snapshot(),n=Xi(t);return(e,r)=>{let i=ea(t,e,r??void 0);return`${i.sessionKey}\0${i.agentId??F(r??n)}`}},r=(e,t)=>n()(e,t),i=(e,t)=>{for(let n of e?.records??[])if(t&&n.sessionId===t)return n;return e?.active},a=e=>t.get(r(e.target.key,e.target.agentId))===e.owner&&e.owner.records.has(e),o=(e,t)=>!e?.sessionId||!t||e.sessionId===t,s=t=>{e.publish({...e.readState(),error:t},`operation`),ri({message:t})},c=(e,t)=>{if(e&&e.phase!==`rollback`&&(t&&e.sessionId?t===e.sessionId:e.owner.active===e))return e.phase},l=t=>{e.publish({...e.readState(),deletedSessions:t&&t.owner.active===t?[{key:t.target.key,...t.target.agentId?{agentId:t.target.agentId}:{},retireBeforeRevision:Date.now()}]:[]}),e.redecorateLists()},u=n=>{let a=r(n.key,n.agentId),o=t.get(a);o||(o={sessionId:e.publishedRow((e,t)=>r(e.key,e.agentId??t)===a)?.sessionId,revision:e.requestRevision(),records:new Set},t.set(a,o));let s=n.expectedSessionId??o.sessionId,c=i(o,s);if(c&&(o.active===c||c.phase===`pending`)&&(!s||c.sessionId===s))return c;let l={target:n,sessionId:s,owner:o,phase:`pending`,rows:new WeakMap};return(!s||!o.sessionId||s===o.sessionId)&&(o.active=l,o.sessionId=s,o.revision=e.requestRevision()),o.records.add(l),l},d=t=>{a(t)&&t.phase!==`confirmed`&&(t.phase=`rollback`,e.redecorateLists(),t.owner.records.delete(t),t.owner.active===t&&(t.owner.active=void 0),l(),e.invalidateLists())},f=(t,n)=>{t.phase!==`confirmed`&&(t.phase=`confirmed`,t.sessionId||(t.owner.revision=e.requestRevision()),t.rows=new WeakMap,t.owner.active===t&&e.retire(n),l(t))},p=(e,t)=>{if(e.operation)return e.operation;let{target:n}=e;return e.operation=(async()=>{try{let r=await Qc(t.client,n.key,n);return a(e)?!r.deleted&&e.phase!==`confirmed`?(d(e),{deleted:!1}):(f(e,n.key),{deleted:!0,...r.worktreePreserved?{worktreePreserved:r.worktreePreserved}:{}}):{deleted:!1}}catch(t){if(!a(e))return{deleted:!1};d(e);let n=J(t);throw s(n),t}})(),e.operation},m=async t=>{let n=e.connection.capture(),r={deleted:[],errors:[],preservedWorktrees:[]};if(!n||t.length===0)return r;let i=new Map;for(let e of t){let t=u(e),n=i.get(t)??new Map;n.set(e.key,e),i.set(t,n)}l();for(let[o,c]of i){if(!e.connection.isCurrent(n)&&!o.operation){let e=[...i.keys()].filter(e=>!e.operation&&a(e));if(e.length>0){let n=Error(K(`sessionsView.deleteSessionsStale`,{count:String(t.length)}));for(let t of e){d(t);for(let e of i.get(t).values())r.errors.push({target:e,error:n})}s(n.message)}break}try{let e=await p(o,n);e.deleted&&(r.deleted.push(...c.keys()),e.worktreePreserved&&r.preservedWorktrees.push(e.worktreePreserved))}catch(e){for(let t of c.values())r.errors.push({target:t,error:e})}}return r.deleted.length>0&&(e.connection.isCurrent(n)&&await e.reconcileMutation(t.length===1?t[0]?.agentId:void 0),!e.connection.isCurrent(n)&&!await e.reconcilePreviousConnection(n))?{deleted:[],errors:[],preservedWorktrees:[]}:r};return{acceptsGeneration:(e,n,i)=>o(t.get(r(e,i)),n),deletionState:(e,n,a)=>c(i(t.get(r(e,n)),a),a),deleteMany:m,async delete(e,t={}){let n=await m([{key:e,...t}]);if(n.errors.length>0)throw n.errors[0].error;return{deleted:n.deleted.includes(e),...n.preservedWorktrees[0]?{worktreePreserved:n.preservedWorktrees[0]}:{}}},apply(e,r){if(!e||t.size===0)return e;let a=n(),s=e.sessions;for(let[n,i]of t)for(let t of i.records){let o=t.rows.get(r);t.phase===`rollback`&&i.active===t&&o&&!s.some(e=>a(e.key,e.agentId??r.scope.agentId)===n)&&(s===e.sessions&&(s=s.slice()),s.splice(o.index,0,o.row))}let l=s.filter((e,n)=>{let s=e.agentId??r.scope.agentId,l=t.get(a(e.key,s));if(!o(l,e.sessionId))return!1;let u=i(l,e.sessionId);return!c(u,e.sessionId)||(u?.phase===`pending`&&u.rows.set(r,{row:e,index:n}),!1)});return l.length===e.sessions.length&&l.every((t,n)=>t===e.sessions[n])?e:{...e,count:l.length,sessions:l}},reconcileList(e,r,a){if(!e)return e;let o=n(),s=e.sessions.filter(e=>{let n=o(e.key,e.agentId??a),s=t.get(n);if(!s)s={revision:r,sessionId:e.sessionId,records:new Set},t.set(n,s);else if(e.sessionId&&e.sessionId!==s.sessionId){if(r<=s.revision||i(s,e.sessionId)?.sessionId===e.sessionId)return!1;if(s.active?.phase===`pending`&&!s.active.sessionId)return!0;s.sessionId=e.sessionId,s.active=void 0}return s.revision=Math.max(s.revision,r),!0});return s.length===e.sessions.length?e:{...e,sessions:s,count:s.length}},observe(n){let{key:a,agentId:o,reason:s,sessionId:c}=n;if(s===`delete`){if(!c){e.invalidateLists();return}let t=u({key:a,expectedSessionId:c,...o?{agentId:o}:{}});f(t,a)}else if(s===`create`||s===`new`){let e=i(t.get(r(a,o)));e?.phase===`confirmed`&&(e.owner.active=void 0,l())}},clear:()=>t.clear()}}function dm(){return(dm=e((()=>{q(),Y(),ci(),Q(),ll()})))()}function fm(e){let t=0,n=null,r=null,i=null,a=()=>{i!==null&&(globalThis.clearTimeout(i),i=null)},o=(n,r)=>t===r&&e.isCurrent(n),s=c=>{if(n?.client===c.client&&n.epoch===c.epoch)return Promise.resolve();if(r?.generation===t)return r.promise;a();let l=t,u=(async()=>{try{let t=await c.client.request(`sessions.subscribe`,{},{timeoutMs:ht});if(!o(c,l))return;if(t?.subscribed!==!0)throw new gt({code:`UNAVAILABLE`,message:`Gateway did not activate the session event subscription`,retryable:!0});n=c,e.onError(c,null)}catch(t){if(!o(c,l))return;let n=t instanceof xe?new gt({code:t.code,message:t.message,retryable:!0}):t;e.onError(c,J(n));let r=e.retryDelayMs(n);if(r===null||!o(c,l))return;i=globalThis.setTimeout(()=>{i=null,o(c,l)&&s(c)},r)}})().finally(()=>{r?.promise===u&&(r=null)});return r={generation:l,promise:u},u},c=()=>{t+=1,n=null,r=null,a()};return{ensure:s,reset:c,dispose:c}}function pm(){return(pm=e((()=>{ve(),C(),Qt(),Y()})))()}function mm(e,t){let n=z(e)??``,r=Ki({hello:t}),i=z(r?.mainSessionKey);if(!i)return n;if(!n)return i;let a=$e(r?.mainKey)??`main`,o=z(r?.defaultAgentId);return n===`main`||n===a||o&&(n===`agent:${o}:main`||n===`agent:${o}:${a}`)?i:n}function hm(e,t){let n=ea(e,z(t)??``);return n.sessionKey===`global`?n.agentId:void 0}function gm(e,t){let n=hm(e,t);return n?{agentId:n}:{}}function _m(e,t){let n=X(t),r=Le(t),i=n?.agentId??(r===`global`?Yi(e):r===`unknown`?void 0:Ji(e));return i?{agentId:F(i)}:{}}function vm(e,t){let n=z(t.agentId)??_m(e,t.sessionKey).agentId;return n?{agentId:n}:{}}function ym(e,t,n){return ia(e,e.sessionKey,t,n)}function bm(e,t){let n=e.sessions.filter(e=>e.key&&xm(e,t.archivedFilter));return{...e,count:n.length,sessions:n}}function xm(e,t=`active`){return t===`all`||e.archived===!0==(t===`archived`)}function Sm(e,t){return xm(e,t.archivedFilter)&&e.kind!==`global`&&e.kind!==`unknown`&&(t.showCron===!0||!u(e.key))&&(t.showSystem===!0||!re(e))&&(!t.filterByAgent||ma(e.key,t.agentId,t.defaultAgentId))}function Cm(e,t){return e.filter(e=>e.key===t.currentSessionKey&&((t.archivedFilter??`active`)===`active`||xm(e,t.archivedFilter))?!0:Sm(e,t)&&!ga(e.key)&&(!e.spawnedBy||z(e.category)!=null))}function wm(e,t){return Cm(e?.sessions??[],t)}function Tm(e,t){let n=Number(t.pinned===!0)-Number(e.pinned===!0);if(n!==0)return n;let r=(t.pinnedAt??0)-(e.pinnedAt??0);if(r!==0)return r;let i=(t.updatedAt??0)-(e.updatedAt??0);return i===0?e.key<t.key?-1:+(e.key>t.key):i}function Em(e){let t=mm(e.sessionKey,e.hello),n=Xi({assistantAgentId:e.assistantAgentId,hello:e.hello}),r=X(t)?.agentId??n,i=t.toLowerCase()!==`unknown`,a=n=>ca(e,n.key,t,n.agentId??(Qi(n.key)?e.resultAgentId:void 0)),o=e.result?.sessions.find(a)??(e.activeSession&&a(e.activeSession)?e.activeSession:void 0),s=t&&t.toLowerCase()!==`unknown`&&!po(t)?{...o??{kind:`direct`,updatedAt:null},key:t}:void 0,c=wm(e.result,{currentSessionKey:t||void 0,agentId:r,defaultAgentId:n,filterByAgent:i,showCron:e.showCron,showSystem:e.showSystem,archivedFilter:e.archivedFilter}).toSorted(e.compareSessions??Tm),l=c.find(a);return!l&&s&&e.archivedFilter!==`archived`&&(l=s,c=[l,...c]),{currentSessionKey:t,selectedAgentId:r,defaultAgentId:n,selectedSession:s,visibleSessions:c,activeRowKey:l?.key??null}}function Dm(){return(Dm=e((()=>{h(),_o(),Q()})))()}function Om(e,t){let n=e,r=t,i=Object.keys(e).filter(e=>e!==`snapshotAt`),a=Object.keys(t).filter(e=>e!==`snapshotAt`);return i.length===a.length&&i.every(e=>{let t=n[e],i=r[e];return t===i||t!==null&&i!==null&&typeof t==`object`&&typeof i==`object`&&JSON.stringify(t)===JSON.stringify(i)})}function km(e,t){let n=e.agentRuntime?.id?.trim(),r=t.agentRuntime?.id?.trim();return!(e.modelProvider&&t.modelProvider&&e.modelProvider!==t.modelProvider||e.model&&t.model&&e.model!==t.model||n&&r&&n!==r)}function Am(e,t){if(!t||t.thinkingLevels===void 0&&t.thinkingOptions===void 0||!km(e,t)||e.thinkingLevels!==void 0||e.thinkingOptions!==void 0)return e;let n={...e};for(let r of Mm)e[r]===void 0&&t[r]!==void 0&&Object.assign(n,{[r]:t[r]});return n}function jm(e){let t={...e};for(let e of Mm)delete t[e];return t}var Mm;function Nm(){return(Nm=e((()=>{Mm=[`thinkingLevels`,`thinkingOptions`,`thinkingDefault`]})))()}function Pm(e){let t={...e};for(let[n,r]of Object.entries(e))(r===void 0||n===`totalTokensFresh`&&r===!1&&e.totalTokens===void 0)&&Reflect.deleteProperty(t,n);return t}function Fm(e){return!!(typeof e.sessionId==`string`&&e.sessionId.trim()||typeof e.updatedAt==`number`)}function Im(e,t){if(!t||!e.sessionId||e.sessionId!==t.sessionId||e.derivedTitle!==void 0&&e.lastMessagePreview!==void 0)return e;let n=Bm(e,null),r=Bm(t,null);if(n&&r&&n!==r)return e;let i={...e};for(let n of[`derivedTitle`,`lastMessagePreview`])e[n]===void 0&&t[n]!==void 0&&(i[n]=t[n]);return i}function Lm(e,t){return typeof e.updatedAt==`number`&&typeof t?.updatedAt==`number`&&e.updatedAt<t.updatedAt}function Rm(e,t){if(!t||!Re(t)||Re(e)||e.snapshotAt!==void 0&&t.snapshotAt!==void 0&&e.snapshotAt>t.snapshotAt)return!1;let n=e.updatedAt??0;return(t.updatedAt??0)>=n||typeof t.startedAt==`number`&&t.startedAt>=n}function zm(e,t,n){let r=Bm(e,null),i=X(t)?.agentId??n;if(r&&i?.trim()&&r!==F(i))return!1;if(Z(e.key,t))return!0;if(!Qi(t)||e.kind!==`global`)return!1;let a=X(e.key);return a?.agentId!==void 0&&F(a.agentId)===F(n??``)}function Bm(e,t){let n=X(e.key);return n?.agentId?F(n.agentId):e.agentId?.trim()?F(e.agentId):e.kind===`global`&&t?.trim()?F(t):null}function $(e,t){return Object.hasOwn(e,t)?e[t]:void 0}function Vm(e){return e===`running`||e===`queued`||e===`done`||e===`failed`||e===`interrupted`||e===`killed`||e===`timeout`?e:null}function Hm(e,t,n){Om(e,t)&&Xm.set(e,n)}function Um(e,t,n,r,i){let{key:a}=t;if(!e||!t.sessionId||e.sessionId!==t.sessionId||typeof n.revision!=`string`||Xm.get(e)!==n.revision||t.snapshotAt===void 0||!zm(e,a,t.agentId)||qm(e,r))return{applied:!1,key:a,row:e};let o={...e,snapshotAt:Math.max(e.snapshotAt??0,t.snapshotAt)},s=i?.(o,e,Object.keys(e),t)??o;return Hm(s,o,n.revision),{applied:!0,key:a,row:s,admittedRow:s,reconciled:!0}}function Wm(e){let t=I(e);if(!t)return null;let n=I(t.session),r=n?{...Array.isArray(t.ancestorSessions)?Object.fromEntries(Object.entries(t).filter(([,e])=>e===null)):t,...n}:t,i=z($(r,`key`))??z($(t,`sessionKey`));if(!i)return null;let a=z($(t,`reason`))??z($(r,`reason`))??null,o=z($(t,`phase`))??z($(r,`phase`)),s=$(r,`hasActiveRun`),c=typeof s==`boolean`?s:$(t,`hasActiveRun`),l=$(r,`archived`),u=$(r,`updatedAt`),d=$(r,`snapshotAt`),f=$(r,`thinkingLevel`),p=Object.hasOwn(r,`activeRunIds`)?$(r,`activeRunIds`):$(t,`activeRunIds`);return[{key:i,reason:a,sessionId:z($(r,`sessionId`)),updatedAt:typeof u==`number`?u:null,snapshotAt:typeof d==`number`&&Number.isFinite(d)?d:void 0,hasPermissionMode:Object.hasOwn(r,`permissionMode`),thinkingLevel:typeof f==`string`?f:f===null?null:void 0,agentId:z($(t,`agentId`))??null,runId:z($(t,`runId`))??z($(r,`runId`))??null,clientRunId:z($(t,`clientRunId`))??z($(r,`clientRunId`))??null,hasActiveRun:typeof c==`boolean`?c:null,activeRunIds:p===null||Array.isArray(p)&&p.every(e=>typeof e==`string`)?p:void 0,status:Vm($(r,`status`))??Vm($(t,`status`)),archived:typeof l==`boolean`?l:null,isChatTurn:o===`start`||o===`message`||o===`end`||o===`error`||a===`send`||a===`steer`,isAncestorReference:t.ancestorSessionRef===!0},t,r,a]}function Gm(e){let t=I(e);return!t||!Array.isArray(t.ancestorSessions)?[e]:[e,...[...t.ancestorSessions.map(e=>[e,!1]),...Array.isArray(t.ancestorSessionRefs)?t.ancestorSessionRefs.map(e=>[e,!0]):[]].flatMap(([e,n])=>{let r=I(e),i=z(r?.key);return!r||!i?[]:[{session:r,agentId:z(r.agentId)??X(i)?.agentId,ts:t.ts,ancestorSessions:[],...n?{ancestorSessionRef:!0}:{}}]})]}function Km(e){return Wm(e)?.[0]??null}function qm(e,t){let n=t.resultAgentId?.trim()?F(t.resultAgentId):null,r=Bm(e,t.selectedGlobalAgentId??null);return n!==null&&r!==null&&r!==n}function Jm(e,t,n={},r){let i=e=>({disposition:e,row:t,confirmRead:!1});if(!e?.key)return i(`invalid`);let a=Pm(e);if(qm(a,n))return i(`outside-scope`);let o=t&&r?.isProvisional?.(t)?void 0:t;if(n.preserveExisting&&t)return i(`preserved`);if(Lm(a,t))return i(`older`);if(!o&&!Fm(a))return i(`unpersisted`);let s=t?.key??a.key,c=Im(Am(s===a.key?a:{...a,key:s},o),o);if(Rm(c,t))return i(`stale-active`);c=r?.project?.(c,o)??c;let l=xm(c,n.archivedFilter??`active`);if(o&&Om(c,o)&&l){let e=Om(a,o);return e&&r?.observe?.(o),{disposition:`unchanged`,row:o,admittedRow:e?o:c,confirmRead:e}}let u=l?c:void 0;return u&&r?.observe?.(u),{disposition:`accepted`,row:u,admittedRow:c,confirmRead:u!==void 0}}function Ym(e,t,n={},r){let i=Wm(t);if(!i)return{applied:!1,row:e};let[a,o,s,c]=i,{key:l}=a;if(a.isAncestorReference)return Um(e,a,s,n,r);let{agentId:u,ancestorRevision:d,ancestorSessions:f,ancestorSessionRefs:p,catalogChanged:m,clientRunId:h,compacted:g,key:_,phase:v,reason:y,runId:b,session:x,sessionKey:S,ts:C,...w}=s;if(!a.agentId&&(Qi(l)||!X(l)&&!Object.keys(w).length))return{applied:!1,key:l,agentId:null,row:e};if(c===`delete`&&!a.sessionId)return{applied:!1,key:l,agentId:a.agentId,row:e};if(c===`delete`)return e&&e.sessionId!==a.sessionId?{applied:!1,key:l,agentId:a.agentId,row:e}:{applied:!0,key:l,agentId:a.agentId,deletedKey:e?.key??l};let T=w.kind===`direct`||w.kind===`group`||w.kind===`global`||w.kind===`unknown`?w.kind:e?.kind,ee=typeof w.updatedAt==`number`?w.updatedAt:e?.updatedAt,E=z(w.sessionId)??e?.sessionId;if(!T||!e&&E===void 0&&typeof ee!=`number`)return{applied:!1,row:e};let D={applied:!0,key:l,agentId:a.agentId,runId:a.runId,clientRunId:a.clientRunId,hasActiveRun:a.hasActiveRun,status:a.status,isChatTurn:a.isChatTurn};if(!e)return D;let O=I(w.agentRuntime),k=km({modelProvider:z(w.modelProvider),model:z(w.model),...O?{agentRuntime:{id:z(O.id)??``}}:{}},e)?e:jm(e),A=Array.isArray(o.ancestorSessions),j=z(I(o.session)?.agentId),te={...A?{}:k,...w,key:e.key,kind:T,updatedAt:ee??null,...E?{sessionId:E}:{},...A&&j?{agentId:j}:{}};for(let[e,t]of Object.entries(w))t===null&&!Zm.has(e)&&Reflect.deleteProperty(te,e);let M=[...Object.keys(w).filter(e=>w[e]!==void 0),...k===e?[]:Mm],N=Jm(te,e,{...n,selectedGlobalAgentId:a.agentId??n.selectedGlobalAgentId??null},r?{project:t=>r(t,e,A?[...M,...Object.keys(e).filter(e=>!Object.hasOwn(t,e))]:M,a)}:void 0),ne=e.owner?.actor;typeof s.ancestorRevision==`string`&&N.admittedRow&&Hm(N.admittedRow,Pm(te),s.ancestorRevision);let P=N.admittedRow?.owner?.actor,re=!!N.admittedRow&&(A||Object.hasOwn(w,`owner`)||Object.hasOwn(w,`createdActor`))&&(ne?.type!==P?.type||ne?.id!==P?.id||ne?.label!==P?.label||e.owner?.assignedAt!==N.admittedRow?.owner?.assignedAt);return{...D,row:N.row,admittedRow:N.admittedRow,reconciled:!0,disposition:N.disposition,...typeof o.ts==`number`&&Number.isFinite(o.ts)?{eventTs:o.ts}:{},ownershipChanged:re}}var Xm,Zm;function Qm(){return(Qm=e((()=>{Dm(),Q(),Nm(),Xm=new WeakMap,Zm=new Set([`updatedAt`,`activeLeafEntryId`,`modelOverrideSource`])})))()}function $m(e,t){return e&&t.some((t,n)=>t!==e.sessions[n])?{...e,sessions:t}:e}function eh(e,t,n){let r=e.sessions.filter(e=>e.key!==t);return n&&(r.push(n),r.sort(Tm)),{...e,count:r.length,sessions:r}}function th(e,t){let n=new Set,r=[...e.sessions,...t.sessions].filter(e=>!e.key||n.has(e.key)?!1:(n.add(e.key),!0)),i=t.totalCount??e.totalCount,a=t.hasMore??(typeof i==`number`&&Number.isFinite(i)?r.length<i:!1);return{...t,count:r.length,totalCount:i,hasMore:a,nextOffset:t.nextOffset??(a?r.length:null),sessions:r}}function nh(e,t){if(!e||!t)return e;let n=new Map(t.sessions.map(e=>[e.key,e]));return $m(e,e.sessions.map(e=>Im(e,n.get(e.key))))}function rh(e,t,n,r){let i=n.sessionKey?.trim();if(!i)return e;let a=X(i)?.agentId,o=F(a??Xi(n));if(!a&&F(t.agentId??``)!==o)return e;let s=e=>ca(n,e.key,i,e.agentId),c=t.result?.sessions.find(s);if(c&&(r||c.archived===!0)&&!e.sessions.some(s)){let t=[...e.sessions,c];return{...e,count:t.length,sessions:t}}return e}function ih(e,t,n={},r){let i=Km(t),a=i?.agentId??n.selectedGlobalAgentId??null,o=i?e?.sessions.find(e=>zm(e,i.key,a)):void 0,{row:s,admittedRow:c,reconciled:l,eventTs:u,ownershipChanged:d,disposition:f,...p}=Ym(o,t,n,r);if(f===`outside-scope`)return{...p,row:o,result:e};if(p.deletedKey){if(!e||!o)return{...p,result:e};let t=e.sessions.filter(e=>e!==o);return{...p,result:{...e,count:t.length,sessions:t}}}if(!l)return!e&&p.applied?{applied:!1,result:e}:{...p,result:e};if(!e||!o)return{applied:!1,result:e};let m=s===o?e:eh(e,o.key,s),h=u!==void 0&&u>m.ts?{...m,ts:u}:m,g=d?{...h,owners:void 0}:h;return{...p,row:s,admittedRow:c,result:g}}function ah(e,t,n={},r,i=()=>!0){let a=e,o,s=[];for(let e of Gm(t)){let c=Km(e);if(c&&(!i(c)||e!==t&&a?.sessions.some(e=>zm(e,c.key,c.agentId)&&e.sessionId!==c.sessionId)))continue;let l=ih(a,e,n,r);o??=l,a=l.result,l.admittedRow&&s.push(l.admittedRow)}return{...o??{applied:!1},...s.length?{applied:!0,admittedRows:s}:{},result:a}}function oh(e,t,n,r={},i=!1,a){if(!t?.key||qm(t,r))return e;if(!e){if(!Fm(t)&&!n)return null;let e=Fm(t)&&xm(t,r.archivedFilter??`active`)?Jm(t,void 0,{...r,archivedFilter:`all`},a):void 0,i=e?.row?[e.row]:[];return{ts:Date.now(),path:``,count:i.length,defaults:n??{modelProvider:null,model:null,contextTokens:null},sessions:i}}let o=e.sessions.find(e=>zm(e,t.key,t.agentId??r.selectedGlobalAgentId??null)),s=n?Am(n,e.defaults):e.defaults,c=s===e.defaults?e:{...e,defaults:s},l=Jm(t,o,{...r,preserveExisting:i},a);return l.disposition===`older`||l.disposition===`outside-scope`||l.disposition===`invalid`?e:l.disposition===`accepted`?eh(c,o?.key??t.key,l.row):c}function sh(){return(sh=e((()=>{Dm(),Q(),Qm(),Nm()})))()}function ch(e){return{key:e.key,agentId:e.agentId,kind:e.kind,updatedAt:e.updatedAt,sessionId:e.sessionId,sharingRole:e.sharingRole,visibility:e.visibility,archived:e.archived,worktree:e.worktree?{...e.worktree}:void 0,repositoryWorkspaceId:e.repositoryWorkspaceId,repository:e.repository?{...e.repository}:void 0}}function lh(e){let t=e.repositoryWorkspaceId?[`repository`,e.repositoryWorkspaceId,e.repository?.branch]:[`worktree`,e.worktree?.id,e.worktree?.branch,e.worktree?.repoRoot];return JSON.stringify([e.sessionId,e.sharingRole,e.visibility,e.archived===!0,...t])}function uh(e){return JSON.stringify([e.selfUser?.identity??null,e.hello?.auth?.role,e.hello?.auth?.scopes,zn(e,`sessions.github.publish`)])}function dh(e){let t=new Map,n=(t,n)=>{let r=ea(e.snapshot(),t.key,t.agentId??n??void 0);return`${r.agentId??``}\0${r.sessionKey}`},r=(e,n)=>{t.delete(e),n.controller.reset()},i=(e,n)=>{!n.retained&&!n.controller.hasBindings&&t.get(e)===n&&t.delete(e)},a=e=>{for(let[n,i]of t){let t=e(i.row,n);!i.current()||!t||lh(t)!==lh(i.row)?r(n,i):i.row=ch(t)}},o=e=>({ts:0,path:``,count:1,defaults:{modelProvider:null,model:null,contextTokens:null},sessions:[e]});return{attach(a,o,s){let c=e.connection.capture();if(!c)return null;let l=ea(e.snapshot(),a.key,a.agentId),u=`${l.agentId??``}\0${l.sessionKey}`,d=uh(e.snapshot()),f=t.get(u);if(f&&(!f.current()||lh(f.row)!==lh(a))&&(r(u,f),f=void 0),!f){let n={row:ch({...a,key:l.sessionKey,agentId:l.agentId}),retained:!1,current:()=>t.get(u)===n&&e.connection.isCurrent(c)&&uh(e.snapshot())===d&&e.deletionState(n.row)!==`confirmed`,controller:new s({client:c.client,target:l,isCurrent:()=>n.current(),reserve:()=>{if(!n.retained){if([...t.values()].filter(e=>e.retained).length>=fh)throw Error(K(`githubPublication.capacity`,{newAction:K(`githubPublication.newAction`)}));n.retained=!0}},release:()=>{n.retained=!1,i(u,n)},unbound:()=>i(u,n)})};f=n,t.set(u,f)}let p=f;return Object.assign(p.controller.bind(o),{matches:t=>p.current()&&!e.deletionState(t)&&n(t)===u&&lh(t)===lh(p.row)})},observeRows(e,r){if(t.size===0)return;let i=new Map(e.map(e=>[n(e,r),e]));a((e,t)=>{let n=i.get(t);return n?oh(o(e),{...n,key:e.key,agentId:e.agentId},void 0,{archivedFilter:`all`,selectedGlobalAgentId:e.agentId})?.sessions[0]:e})},observeEvent(e){if(t.size===0)return;let r=Km(e);if(!r||Qi(r.key)&&!r.agentId)return;let i=n({key:r.key,agentId:r.agentId??void 0});if(a((t,n)=>n===i?ah(o(t),e,{archivedFilter:`all`,selectedGlobalAgentId:t.agentId}).result?.sessions[0]:t),I(e)?.reason===`github-publication`){let e=t.get(i);e?.current()&&e.controller.invalidate()}},invalidate(){for(let e of t.values())e.current()&&e.controller.invalidate()},clear(){for(let[e,n]of t)r(e,n)}}}var fh;function ph(){return(ph=e((()=>{q(),Vn(),sh(),Q(),fh=32})))()}function mh(e){return e.find(e=>e.sharingRole!==`owner`&&e.sharingRole!==`admin`)??e[0]}function hh(e,t){return{allowed:!1,requiredScope:e,cause:t,reason:K(t===`disconnected`?`sessionsView.actionRequiresConnection`:t===`method-unavailable`?`sessionsView.actionUnavailable`:t===`session-not-owned`?`sessionsView.actionRequiresOwnership`:`sessionsView.actionRequiresScope`,{scope:e})}}function gh(e,t){let n=t.requiredScope===`operator.admin`?t.requiredScope:ze(t.method,t.params)??t.requiredScope,r=(t.sessionScope&&n!==`operator.admin`?it(t.method,t.params):void 0)??n;if(!r)throw Error(`Missing session method scope: ${t.method}`);let i=e?.scopes,a=e?.role??`operator`;return!Array.isArray(i)||!We({role:a,requestedScopes:[r],allowedScopes:i})?hh(r,`missing-scope`):r===`operator.sessions.write`&&!We({role:a,requestedScopes:[`operator.write`],allowedScopes:i})&&t.method!==`sessions.create`&&t.session?.sharingRole!==`owner`&&t.session?.sharingRole!==`admin`?hh(r,`session-not-owned`):{allowed:!0,requiredScope:r}}function _h(e,t){let n=gh(e?.hello?.auth,t);return e?.phase!==`connected`||!e.client?hh(n.requiredScope,`disconnected`):zn(e,t.method)===!0?n:hh(n.requiredScope,`method-unavailable`)}function vh(){return(vh=e((()=>{Ze(),Fe(),q(),Vn()})))()}function yh(e){let t=e?.groups;return Array.isArray(t)?t.flatMap((e,t)=>{let n=e,r=typeof n?.name==`string`?n.name.trim():``;return r?[{name:r,position:typeof n?.position==`number`&&Number.isSafeInteger(n.position)?n.position:t}]:[]}):[]}function bh(e,t){let n=t?.defaults,r=new Map;if(Array.isArray(n))for(let e of n){let t=e,n=typeof t?.name==`string`?t.name.trim():``;if(!n)continue;let i=typeof t?.cwd==`string`?t.cwd.trim():``;r.set(n,{...i?{cwd:i}:{},...typeof t?.worktree==`boolean`?{worktree:t.worktree}:{}})}return e.map(({name:e,position:t})=>({name:e,position:t,...r.get(e)}))}function xh(e){return Sh(e?.sectionOrder)??[]}function Sh(e){if(!Array.isArray(e))return null;let t=[];for(let n of e){if(typeof n!=`string`)continue;let e=n.trim(),r=[`catalog:`,`category:`].find(t=>e.startsWith(t)),i=r?e.slice(r.length).trim():``,a=r?i&&`${r}${i}`:Ch.has(e)&&e;a&&!t.includes(a)&&t.push(a)}return t}var Ch;function wh(){return(wh=e((()=>{Ch=new Set([`ungrouped`,`groups`,`work`])})))()}function Th(){try{let e=JSON.parse(tr()?.getItem(Dh)??`[]`);return D(e)}catch{return[]}}function Eh(e){let t=-1,n=0,r=0,i=`idle`,a=null,o=null,s=()=>{o!==null&&(clearTimeout(o),o=null)},c=()=>{t=-1,n+=1,r+=1,a=null,s(),i=`loading`,e.publish({...e.readState()})},l=()=>{t=-1,n+=1,a=null,s()},u=(t,n,r)=>{let a=e.readState(),o=t.map(e=>e.name),s=o.length===a.groups.length&&o.every((e,t)=>e===a.groups[t]),c=n.length===a.sectionOrder.length&&n.every((e,t)=>e===a.sectionOrder[t]),l=t.length===a.groupSettings.length&&t.every((e,t)=>{let n=a.groupSettings[t];return n?.name===e.name&&n.position===e.position&&n.cwd===e.cwd&&n.worktree===e.worktree}),u=i!==r;i=r,(!s||!l||!c||u)&&e.publish({...a,groups:[...o],groupSettings:[...t],sectionOrder:[...n]})},d=(r,a,s,c)=>{if(!e.connection.isCurrent(r)||a!==n||(i!==`unavailable`&&(i=`unavailable`,e.publish({...e.readState()})),!c))return null;t=-1;let l=e.retryDelayMs(s);return l!==null&&(o=setTimeout(()=>{o=null,e.connection.isCurrent(r)&&a===n&&p()},l)),null},f=async(t,r,i)=>{try{let i=await t.client.request(Oh,{});if(!e.connection.isCurrent(t)||r!==n)return null;let a=yh(i),o=xh(i),s=Th();if(s.length>0&&_h(e.snapshot(),{method:`sessions.groups.put`,requiredScope:`operator.write`}).allowed){if(a.length===0){let i=await t.client.request(`sessions.groups.put`,{names:s});if(!e.connection.isCurrent(t)||r!==n)return null;a=yh(i),o=xh(i)}try{tr()?.removeItem(Dh)}catch{}}if(!(zn(e.snapshot(),kh)===!0&&_h(e.snapshot(),{method:kh,requiredScope:`operator.write`}).allowed))return u(a,o,`ready`),a;u(a,o,`loading`);try{let i=await t.client.request(kh,{});if(!e.connection.isCurrent(t)||r!==n)return null;a=bh(a,i)}catch(e){return d(t,r,e,!0)}return u(a,o,`ready`),a}catch(e){return d(t,r,e,i===!0)}},p=async()=>{let r=e.connection.capture();if(!r)return null;if(t===r.epoch)return a??e.readState().groupSettings;let o=zn(e.snapshot(),Oh);s();let c=++n;if(t=r.epoch,i!==`loading`&&(i=`loading`,e.publish({...e.readState()})),o===!1)return u([],[],`ready`),[];let l=f(r,c,o).then(t=>e.connection.isCurrent(r)&&c!==n?p():t).finally(()=>{a===l&&(a=null)});return a=l,l},m=(e,t)=>{c(),u(e,t,`loading`),p()},h=async(t,n,r)=>{let i=e.connection.capture();if(!i)return`stale`;try{let a=await i.client.request(t,n);return e.connection.isCurrent(i)?(r(a),`completed`):`stale`}catch(t){if(!e.connection.isCurrent(i))return`stale`;throw e.publish({...e.readState(),error:J(t)},`operation`),t}},g=(t,n=e.readState().groupSettings)=>{m(bh(yh(t),{defaults:n}),xh(t))};return{delete:t=>h(`sessions.groups.delete`,{name:t},t=>{g(t),e.refreshRows()}),dispose:l,generation:()=>r,invalidate:c,load:p,put:(e,t)=>h(`sessions.groups.put`,{names:[...e],...t===void 0?{}:{sectionOrder:[...t]}},g),rename:(t,n)=>h(`sessions.groups.rename`,{name:t,to:n},r=>{let i=e.readState().groupSettings,a=i.some(e=>e.name===n),o=i.flatMap(e=>e.name===t?a?[]:[{...e,name:n}]:[e]);g(r,o),e.refreshRows()}),status:()=>i,update:(t,n)=>h(`sessions.groups.update`,{name:t,...n},t=>{let n=e.readState();u(bh(n.groupSettings,t),n.sectionOrder,`ready`)})}}var Dh,Oh,kh;function Ah(){return(Ah=e((()=>{o(),Y(),Vn(),vh(),wh(),Dh=`openclaw:sessions:custom-groups`,Oh=`sessions.groups.list`,kh=`sessions.groups.defaults`})))()}function jh(e=``,t){let n=e.trim(),r=t?.trim(),i=n&&n.toLowerCase()!==`unknown`?n:void 0;return{...r?{agentId:r}:{},...i?{parentSessionKey:i,emitCommandHooks:!0,succeedsParent:!1}:{}}}async function Mh(e,t={}){let n=await e.request(`sessions.create`,t),r=z(n?.key)??``;if(!r)throw Error(`sessions.create returned no key`);let i={status:`idle`};if(n.runStarted){let e=z(n.runId)??``;i={status:`started`,...e?{runId:e}:{}}}else n.runError!==void 0&&(i={status:`rejected`,error:(z(n.runError?.message)??``)||`The session was created, but its first message could not be sent.`,...n.runError?.details===void 0?{}:{errorDetails:n.runError.details}});return{key:r,entry:n.entry,initialRun:i}}function Nh(){return(Nh=e((()=>{})))()}function Ph(e,t,n,r){return{source:{revision:e,updatedAt:t,event:!0,...n===void 0?{}:{readCutoff:n},...r===void 0?{}:{snapshotAt:r}}}}function Fh(e,t){return e.snapshotAt!==void 0&&t.snapshotAt!==void 0&&e.snapshotAt!==t.snapshotAt?e.snapshotAt>t.snapshotAt:(e.event||t.event)&&e.updatedAt!==null&&t.updatedAt!==null&&e.updatedAt!==t.updatedAt?e.updatedAt>t.updatedAt:!e.event&&t.readCutoff!==void 0?e.revision>t.readCutoff:!t.event&&e.readCutoff!==void 0?t.revision<=e.readCutoff:e.revision>t.revision}function Ih(e,t){let n=e?.writer;t.writer&&(!n||Fh(t.writer,n))&&(n=t.writer);let r=e=>!!(e.event&&n&&e!==n&&Fh(n,e)),i=!e||t.source!==e.source&&(r(e.source)||!r(t.source)&&Fh(t.source,e.source)),a=e&&!i?e:t;return a.source.event&&(!n||Fh(a.source,n))&&(n=a.source),{useOffered:i,observation:a.writer===n?a:{source:a.source,writer:n}}}function Lh(){let e=new WeakMap,t=new WeakSet,n=(t,n)=>{let r=X(t.key)?.agentId??t.agentId?.trim()??e.get(t)?.agentId??n?.trim();return r?F(r):null},r=(e,t)=>{let r=n(e,t);return!e.sessionId?.trim()||Qi(e.key)&&!r?null:JSON.stringify([la(e.key),r,e.sessionId])},i=(t,r)=>e.get(t)??{read:{source:{revision:0,updatedAt:t.updatedAt??null}},agentId:n(t,r),fields:new Map},a=(t,n,i)=>{let a=r(t,i),o=e;return(t,s)=>{let c=e.get(t);return!a||o!==e||!c||r(t,i)!==a?[]:s.filter(e=>!zh.has(e)&&(c.fields.get(e)??c.read).source===n.source)}};return{reset(){e=new WeakMap},owner:n,identity:r,inheritRow:(t,n,a)=>{if(!n||e.has(t))return t;let o=i(n),s=r(n,o.agentId);if(!s||s!==r(t,o.agentId))return t;let c=new Map(o.fields);if(a&&r(a)===s){let e=i(a,o.agentId);for(let r of Rh)t[r]!==n[r]&&t[r]===a[r]&&c.set(r,e.fields.get(r)??e.read)}return e.set(t,{...o,fields:c}),t},mergeRow:(n,a,o)=>{let s=n===a?e.get(n):void 0;if(s&&t.has(s))return n;let c=r(n,o);if(!c||c!==r(a,o))return n;let l=s??i(n,o);if(s){let r;for(let[e,t]of l.fields){let n=Ih(t,t).observation;n!==t&&(r??=new Map(l.fields),r.set(e,n))}let i=r?{...l,fields:r}:l;return r&&e.set(n,i),t.add(i),n}let u=i(a,o),d=u.read.source.revision>l.read.source.revision,f=d?a:n,p=d?u:l,m=n,h=a,g=f.key===n.key?f:{...f,key:n.key},_=g,v=g!==f,y,b=new Set([...Object.keys(n),...Object.keys(a),...l.fields.keys(),...u.fields.keys()]);for(let e of b){if(zh.has(e))continue;let t=Ih(l.fields.get(e)??l.read,u.fields.get(e)??u.read),n=t.useOffered?h:m,r=t.observation;r===p.read?p.fields.has(e)&&(y??=new Map(p.fields),y.delete(e)):r!==p.fields.get(e)&&(y??=new Map(p.fields),y.set(e,r)),(_[e]!==n[e]||Object.hasOwn(_,e)!==Object.hasOwn(n,e))&&(v||=(g={...f},_=g,!0),Object.hasOwn(n,e)?_[e]=n[e]:delete _[e])}let x=y?{...p,fields:y}:p;return g===n||Om(g,n)?(e.set(n,x),n):(e.set(g,x),g)},observeReadRow:(t,n,r,o=[])=>{if((e.get(t)?.read.source.revision??0)>=n)return()=>[];let s=new Map;for(let e of o)for(let[t,n]of i(e,r).fields){let e=n.writer,r=s.get(t);e&&(!r||Fh(e,r))&&s.set(t,e)}let c=new Map;for(let e of[`derivedTitle`,`lastMessagePreview`,`activitySummary`])t[e]===void 0&&c.set(e,{source:{revision:0,updatedAt:null}});let l=X(t.key)?.agentId??t.agentId?.trim()??r?.trim(),u={source:{revision:n,updatedAt:t.updatedAt??null,snapshotAt:t.snapshotAt}};for(let[e,t]of s){let n=(c.get(e)??u).source;Fh(n,t)&&c.set(e,{source:n,writer:t})}return e.set(t,{read:u,agentId:l?F(l):null,fields:c}),a(t,u,r)},observeFields:(t,n,r,o)=>{let s=i(t,o),c=new Map(s.fields);for(let e of n)zh.has(e)||c.set(e,r);return e.set(t,{...s,fields:c}),a(t,r,o)},fieldNames:e=>[...new Set([...Object.keys(e),...i(e).fields.keys()])],fieldObservation:(e,t)=>{let n=i(e);return n.fields.get(t)??n.read},bindOwner(t,n){e.has(t)||e.set(t,i(t,n))},rowRevision:t=>e.get(t)?.read.source.revision??0,hasObservation:t=>{let n=e.get(t);if(!n)return!1;if(n.read.source.revision>0)return!0;for(let e of n.fields.values())if(e.source.event===!0)return!0;return!1},hasNewerFacts:(t,n)=>{let r=e.get(t);if(!r)return n<0;if(r.read.source.revision>n)return!0;for(let e of r.fields.values())if(e.source.revision>n||e.writer!==void 0&&e.writer.revision>n||e.writer?.readCutoff!==void 0&&e.writer.readCutoff>=n)return!0;return!1}}}var Rh,zh;function Bh(){return(Bh=e((()=>{Q(),Nm(),Rh=[`derivedTitle`,`lastMessagePreview`,...Mm],zh=new Set([`key`,`sessionId`,`agentId`])})))()}function Vh(e,t,n){let r=new Map,i=(e,t,n,i)=>{let a=r.get(e);if(a&&a.sessionId!==n.sessionId&&i.source.revision<=a.observation.source.revision)return!1;let o=a?.sessionId===n.sessionId?a:void 0,s=Ih(o?.observation,i);if(o&&!s.useOffered)return s.observation!==o.observation&&(r.set(e,{...o,observation:s.observation}),!0);let c=o?.archived?o:void 0;return r.set(e,{sessionId:n.sessionId,archived:t,observation:s.observation,...t?{archivedAt:n.archivedAt??c?.archivedAt,archivedBy:n.archivedBy??c?.archivedBy,archiveReason:n.archiveReason??c?.archiveReason}:{}}),!0},a=new Map,o=e=>{r.delete(e.trim()),a.delete(e.trim())},s=e=>{if(!r.get(e.key)||!e.sessionId)return e;i(e.key,e.archived===!0,{...e,sessionId:e.sessionId},n.fieldObservation(e,`archived`));let t=r.get(e.key);if(!t||t.sessionId!==e.sessionId)return e;let a=Hh(t.archived);t.archived&&(t.archivedAt!==void 0&&(a.archivedAt=t.archivedAt),t.archivedBy!==void 0&&(a.archivedBy=t.archivedBy),t.archiveReason!==void 0&&(a.archiveReason=t.archiveReason));let o=Object.entries(a),s=e;if(o.every(([r,i])=>{let a=n.fieldObservation(e,r);return s[r]===i&&Object.hasOwn(s,r)===(i!==void 0)&&Ih(a,t.observation).observation===a}))return n.mergeRow(e,e);let c=n.inheritRow({...e,...a},e);for(let[e,t]of o)t===void 0&&Reflect.deleteProperty(c,e);return n.observeFields(c,Object.keys(a),t.observation),n.mergeRow(e,c)};return{clear:o,confirm:(t,n,a,o)=>{let s=t.trim(),c=r.get(s),l=e(s);return l?.sessionId&&l.sessionId!==a.sessionId||c&&c.sessionId!==a.sessionId&&l?.sessionId!==a.sessionId?!1:i(s,n,a,o)},clearAll:()=>{r.clear(),a.clear()},observe:(e,t,r)=>{let o=e.trim();o&&t!==null&&r?.sessionId&&(t&&a.get(o)?.sessionId===r.sessionId&&a.delete(o),i(o,t,{...r,sessionId:r.sessionId},n.fieldObservation(r,`archived`)))},applyRow:s,apply:e=>!e||r.size===0?e:$m(e,e.sessions.map(s)),visibility:t=>{let n=t.trim(),i=a.get(n),o=e(n);if(i&&(!o||o.sessionId===i.sessionId))return`pending`;let s=r.get(n);if(s?.archived)return o&&s.sessionId!==o.sessionId?void 0:`archived`},beginPending:(e,n)=>{let r=e.trim(),i=a.get(r);if(!r||i&&i.sessionId===n)return null;let o=Symbol(`session-archive`);return a.set(r,{sessionId:n,token:o}),t(),()=>{a.get(r)?.token===o&&(a.delete(r),t())}}}}var Hh;function Uh(){return(Uh=e((()=>{sh(),Bh(),Hh=(e,t)=>e?{archived:!0,pinned:!1,pinnedAt:void 0,...t?{archivedAt:t.archivedAt,archivedBy:t.archivedBy,archiveReason:t.archiveReason}:{}}:{archived:!1,archivedAt:void 0,archivedBy:void 0,archiveReason:void 0}})))()}function Wh(e){let t=new Map,n=new Set,r=(r,i,a=!1)=>{let o=r.trim();if(!o)return;a?n.add(o):n.delete(o);let s=t.get(o);s&&(s.revision+=1);let c=e.readState(),l={...c.modelOverrides};if(i===void 0){if(!Object.hasOwn(c.modelOverrides,o))return;delete l[o]}else{let e=i===null?null:i.trim();if(l[o]===e&&Object.hasOwn(l,o))return;l[o]=e}e.publish({...c,modelOverrides:l})};return{set:r,retire:e=>{let n=e.trim();n&&(t.delete(n),r(n,void 0))},preparePatch:(i,a,o,s)=>{let c=i.trim(),l=Object.hasOwn(a,`model`),u=()=>o.ownsModelOverride?.()!==!1,d=0,f;return{start:()=>{if(!l||f||!u())return;let o=t.get(c);f=Symbol(`session-model-patch`),t.set(c,{token:f,previous:o?.previous??{value:e.readState().modelOverrides[c],created:n.has(c)},revision:0}),r(i,a.model),d=t.get(c)?.revision??0},settle:n=>{if(!f)return;let l=t.get(c);if(l?.token===f&&(t.delete(c),l.revision===d)){if(e.connection.isCurrent(s)&&u()){if(n&&!o.deferListRefresh)r(i,void 0);else{let t=l.previous,o=!n&&t.created&&e.publishedRow(c)?.modelOverrideSource===void 0;r(i,n?a.model:t.created&&!o?void 0:t.value,o)}}else r(i,void 0)}}}},settleCreated(e){e.modelOverrideSource!==void 0&&n.has(e.key)&&r(e.key,void 0)},clear(){n.clear(),t.clear()}}}function Gh(e,t,n){let r=Wm(t);if(!e||!r||!Qh({...n,archivedFilter:`active`}))return!1;let[i,a]=r;if(!S(a.session)||a.catalogChanged===!0||a.phase===`reset`||i.reason!==null&&!ig.has(i.reason)||(n.offset??0)>0)return!1;let o=Gm(t),s=Array.isArray(a.ancestorSessions),c=!1;for(let t of o){let r=Wm(t);if(!r)return!1;let[i]=r,a=i.agentId??X(i.key)?.agentId;if(n.agentId&&a&&F(n.agentId)!==F(a))continue;let l=e.sessions.find(e=>zm(e,i.key,i.agentId??n.agentId??null)),u=Ym(l,t,{resultAgentId:n.agentId,archivedFilter:`all`}).admittedRow;if(!l||!u||!xm(l,n.archivedFilter??`active`)||l.sessionId!==u.sessionId||l.kind!==u.kind||l.archived===!0!=(u.archived===!0)||l.pinned===!0!=(u.pinned===!0)||l.pinnedAt!==u.pinnedAt||JSON.stringify(l.owner)!==JSON.stringify(u.owner)||JSON.stringify(l.createdActor)!==JSON.stringify(u.createdActor)||l.spawnedBy!==u.spawnedBy||l.controlOwnerSessionKey!==u.controlOwnerSessionKey||l.parentSessionKey!==u.parentSessionKey)return!1;let d=[l.spawnedBy,l.controlOwnerSessionKey,l.parentSessionKey];if(!s&&(ga(l.key)||d.some(Boolean)||l.childSessions?.length)||e.sessions.some(e=>(d.some(t=>t&&Z(t,e.key))||e.childSessions?.some(e=>Z(e,l.key)))&&(!s||!o.some(t=>{let n=Wm(t)?.[0];return n&&zm(e,n.key,n.agentId)})))||!i.isAncestorReference&&(i.updatedAt===null||i.updatedAt<(l.updatedAt??0))||!i.isAncestorReference&&i.updatedAt!==l.updatedAt&&e.sessions.length>(e.nextOffset??e.limitApplied??n.limit??cl.limit))return!1;c=!0}return c}function Kh(e){return e.append!==!0&&e.backgroundHydrate!==!0}function qh(e){let t=e?F(e):null;return e=>!t||!e?.trim()||F(e)===t}function Jh(e,t){let n=Gm(e).map(e=>Yh(e,t));return(e,t)=>n.some(n=>n(e,t))}function Yh(e,t){let n=Wm(e),r=n?.[0],i=n?.[1]??S(e),a=n?.[2],o=qh(r?.agentId??X(r?.key)?.agentId??(typeof i?.agentId==`string`?i.agentId:t)),s=[a?.controlOwnerSessionKey,a?.spawnedBy,a?.parentSessionKey,i?.parentSessionKey];return(e,t)=>{let n=e.spawnedBy;return n&&r&&Z(r.key,n)?!0:o(e.agentId)?!n||!r||t?.sessions.some(e=>Z(e.key,r.key))||s.some(e=>typeof e==`string`&&Z(e,n))?!0:!t||t.hasMore===!0||(t.totalCount??t.sessions.length)>t.sessions.length:!1}}function Xh(e,t){if(!e)return null;if(e.outcome.status===`failed`||!t?.trim())return e.matchesRequestedQuery?e.outcome:null;let n=e.result,r=n&&!n.hasMore&&(n.totalCount??n.sessions.length)<=n.sessions.length;return!e.options.append&&qh(t)(e.options.agentId)&&(e.options.agentId?.trim()||r)?e.outcome:null}function Zh(e,t,n){return e?((t.intent!==`automatic`||e.intent===`automatic`)&&(t.intent!==`reconcile`||e.intent===`automatic`||e.intent===`reconcile`)&&(Kh(t.options)||!Kh(e.options))?(e.options=t.options,e.intent=t.intent,e.foreground=t.foreground,e.bootstrap=t.bootstrap,e.errorOwner=t.errorOwner):t.intent===`reconcile`&&$h(eg(e.options,n),eg(t.options,n),!1)&&(e.errorOwner=t.errorOwner),e.completions.push(...t.completions),e):t}function Qh(e){if(e.includeDerivedTitles===!1||e.includeLastMessage===!1)return!1;let t=qc(e);return t.archived===void 0&&!t.spawnedBy&&(t.boardFace??t.hasBoard)===void 0&&!t.activeMinutes&&!t.search&&!t.ownerId&&t.involvingMe!==!0&&t.includeOwnerSessionCounts!==!0&&t.excludeSubagents!==!0&&t.excludeCron!==!0&&t.excludeSystem!==!0&&t.includeGlobal===!0&&t.includeUnknown===!0&&t.configuredAgentsOnly===!0}function $h(e,t,n){let r=Kc(e),i=Kc(t);return n&&(r.limit=i.limit,r.ownerFirst=i.ownerFirst),JSON.stringify(r)===JSON.stringify(i)}function eg(e,t){let n={...e,includeDerivedTitles:e.includeDerivedTitles??!0};return!t.selfUser?.id.trim()||n.append===!0||!Qh(n)?n:{...n,ownerFirst:!0}}function tg(e,t){return e?new Promise(n=>{e.completions.push({options:t,reconcile:!1,complete:n})}):null}function ng(e,t,n,r){e.completions.forEach(({options:e,reconcile:i,complete:a})=>{let o=eg(e,r);a((i?n:t).then(e=>e?{...e,matchesRequestedQuery:$h(o,e.options,!1)}:null))})}function rg(e,t,n,r,i){let a=i.selfUser?.id.trim()&&Qh(e)&&n&&typeof t==`number`?t+n.sessions.length:r.sessions.length;return{...e,limit:Math.max(e.limit??cl.limit,a)}}var ig;function ag(){return(ag=e((()=>{Dm(),Q(),ll(),Qm(),ig=new Set([`patch`,`participants`,`placement`,`send`,`steer`,`agent.run.started`,`agent.input.settled`,`run-capacity`,`chat.title`])})))()}function og(e){return{reconcileConfirmedPreviousConnection:async(t,n)=>{let r=e.connection.capture();if(!r||r.client!==t.client)return!1;let i;try{let t=await e.reconcileMutation(n);i=t.status===`failed`?t.error:void 0}catch(e){i=J(e)}return e.connection.isCurrent(r)?(e.publish({...e.readState(),error:i?K(`connection.sessionOperationCompletedPreviousConnectionWithRefreshError`,{error:i}):K(`connection.sessionOperationCompletedPreviousConnection`)},`operation`),!0):!1},refreshCategory:(t,n)=>{let r=e.readState(),i=qh(n)(r.agentId??void 0),a=()=>{let n=e.readState();return i&&e.connection.isCurrent(t)&&n.agentId===r.agentId&&n.result===r.result&&n.resultCached===r.resultCached},o=t=>{a()&&e.publish({...e.readState(),error:K(`connection.sessionMoveRefreshFailed`,{error:t})},`operation`)};e.reconcileMutation(n,a).then(e=>{e.status===`failed`&&o(e.error)}).catch(e=>o(J(e)))},reportUncertainCategory:(t,n)=>{e.reconcileMutation(n).catch(()=>void 0);let r=Error(K(`connection.sessionMoveUncertain`,{error:J(t)}));return e.publish({...e.readState(),error:r.message},`operation`),r}}}function sg(e){return e instanceof he&&(e.gatewayCode===f.INVALID_REQUEST||e.gatewayCode===f.FORBIDDEN||e.gatewayCode===f.APPROVAL_NOT_FOUND)}function cg(){return(cg=e((()=>{a(),C(),q(),Y(),ag()})))()}function lg(e,t){let{entry:n}=t,r=[];Object.hasOwn(e,`model`)&&t.resolved&&r.push({...t.resolved,...n.modelOverrideSource===void 0?{}:{modelOverrideSource:n.modelOverrideSource==="default"?null:n.modelOverrideSource}});for(let[i,a]of[[`thinkingLevel`,`thinkingLevels`],[`contextWindow`,`contextWindows`]])e[i]!==void 0&&r.push({[i]:t.resolved&&Object.hasOwn(t.resolved,i)?t.resolved[i]:n[i],...t.resolved?.[a]===void 0?{}:{[a]:t.resolved[a]}});e.fastMode!==void 0&&r.push({fastMode:n.fastMode}),typeof e.archived==`boolean`&&r.push(Hh(e.archived,n));for(let t of[`label`,`category`,`boardPresentation`,`boardFace`])e[t]!==void 0&&r.push({[t]:n[t]});if(e.pinned!==void 0||e.unread===!1){let t={pinned:n.pinnedAt!==void 0,pinnedAt:n.pinnedAt},i={unread:Ee(n),lastReadAt:n.lastReadAt,markedUnreadAt:n.markedUnreadAt,agentStatus:n.agentStatus};r.push(e.pinned===void 0?i:e.unread===!1?{...t,...i}:t)}return r}function ug(){return(ug=e((()=>{Uh()})))()}function dg(e,t,n){let r=n?.trim()?F(n):void 0,i=ea(e,t,r);if(i.agentId&&r&&i.agentId!==r)return null;let a=i.agentId??r;return i.sessionKey&&a?{identity:JSON.stringify([i.sessionKey,a]),key:i.sessionKey,agentId:a}:null}function fg(e,t,n){let r=t.agentId?.trim()||X(t.key)?.agentId||n;return r?.trim()?dg(e,t.key,r)?.identity??null:null}function pg(e,t,n,r){let i=n?r===void 0?e.findRow((e,r)=>fg(t,e,r)===n.identity)?.sessionId?.trim():r.trim():void 0;return n&&i?{...n,sessionId:i}:null}function mg(e,t,n,r){let i=()=>n?e.findRow((e,r)=>fg(t,e,r)===n.identity):void 0,a=!!i();return()=>{let e=i(),t=e?.sessionId?.trim();return a&&!e||!!(t&&t!==r()?.sessionId)}}function hg(e,t,n,r){if(!t||n||r.expectedSessionId!==void 0)return null;let i=r.predecessorReceipt?.read(),a=i?.entry.sessionId?.trim();return a&&i&&dg(e,i.key,t.agentId)?.identity===t.identity?{...t,sessionId:a}:null}function gg(e,t){let n=new Map,r=0,i=(e,t)=>{let r=n.get(e.identity);return r?.token===t&&r.sessionId===e.sessionId},a=t=>{t?e.redecorateLists():e.notifyPendingChange()};return{prepare:(i,o)=>{let s=Symbol(`session-row-patch`),c=++r;return r=>{let l=e.snapshot(),u=e.findRow((e,t)=>e.sessionId===r.sessionId&&fg(l,e,t)===r.identity),d=n.get(r.identity);if(!u&&r.sessionId!==void 0)return d?.token!==s||d.sessionId!==void 0?null:(d.sessionId=r.sessionId,s);if(d&&(d.sessionId===void 0||d.sessionId===r.sessionId)&&d.order>c)return null;let f=i(u),p=d&&d.sessionId===r.sessionId?d.previous:t.read(u),m=r.sessionId!==void 0;return n.set(r.identity,{token:s,order:c,sessionId:r.sessionId,hasProjectedRow:m,isCurrent:o,previous:p,next:f,canonical:t.canonical?t.canonical(p,f):f}),a(m),s}},owns:i,read(e){let t=n.get(e);return t&&t.isCurrent?.()!==!1?t:void 0},observe(e,r,i){let a=i?n.get(i):void 0;a&&a.sessionId===e.sessionId&&(a.canonical=t.observe(a.canonical,e,r),a.previous=t.observe(a.previous,e,r))},settle(e,t,r,i){let o=n.get(e.identity);o&&o.token===t&&o.sessionId===e.sessionId&&(o.hasProjectedRow?i&&(o.next=r?o.canonical:o.previous,o.previous=o.next):n.delete(e.identity),i&&a(o.hasProjectedRow),n.get(e.identity)===o&&n.delete(e.identity))},applyRow(e,r){let i=r?n.get(r):void 0;return!i||i.sessionId===void 0||e.sessionId!==i.sessionId?e:(i.hasProjectedRow=!0,t.write(e,i.next))},hasPending:()=>n.size>0,clear:()=>n.clear()}}function _g(e,t){return gg(e,{read:e=>e?.[t],write:(n,r)=>n[t]===r?n:e.copyRow(n,{[t]:r}),observe:(e,n,r)=>r.includes(t)?n[t]:e})}function vg(e){let t=gg(e,{read:e=>({pinned:e?.pinned===!0,pinnedAt:e?.pinnedAt}),write:(t,n)=>t.pinned===!0===n.pinned?t:e.copyRow(t,n),observe:(e,t,n)=>({pinned:n.includes(`pinned`)?t.pinned===!0:e.pinned,pinnedAt:n.includes(`pinnedAt`)?t.pinnedAt:e.pinnedAt})});return{...t,start(e,n){return t.prepare(e=>n?{pinned:!0,pinnedAt:e?.pinnedAt??Date.now()}:{pinned:!1,pinnedAt:void 0})(e)}}}function yg(e){let t=_g(e,`thinkingLevel`),n=gg(e,{read:e=>({fastMode:e?.fastMode,effectiveFastMode:e?.effectiveFastMode}),canonical:(e,t)=>({...e,fastMode:t.fastMode}),write:(t,n)=>t.fastMode===n.fastMode&&t.effectiveFastMode===n.effectiveFastMode?t:e.copyRow(t,n),observe:(e,t,n)=>({fastMode:n.includes(`fastMode`)?t.fastMode:e.fastMode,effectiveFastMode:n.includes(`effectiveFastMode`)?t.effectiveFastMode:e.effectiveFastMode})}),r=_g(e,`contextWindow`);return{owners:[t,n,r],read(e){let i=t.read(e),a=n.read(e),o=r.read(e);return i||a||o?{...i?{thinkingLevel:i.next}:{},...a?.next,...o?{contextWindow:o.next}:{}}:void 0},prepare(e,i){let a=[];return e.thinkingLevel!==void 0&&a.push([t,t.prepare(()=>e.thinkingLevel?.trim()||void 0,i)]),e.fastMode!==void 0&&a.push([n,n.prepare(()=>({fastMode:e.fastMode??void 0,effectiveFastMode:e.fastMode??void 0}),i)]),e.contextWindow!==void 0&&a.push([r,r.prepare(()=>e.contextWindow?.trim()||void 0,i)]),a.length===0?null:e=>e?a.map(([t,n])=>[t,n(e)]):[]}}}var bg;function xg(){return(xg=e((()=>{Q(),bg=[`pinned`,`pinnedAt`,`unread`,`category`,`thinkingLevel`,`fastMode`,`effectiveFastMode`,`contextWindow`]})))()}function Sg(e){return(t,n,r)=>{let i=e.connection.capture(),a=t.trim();if(!i||!a||r&&(!r.agentId.trim()||!r.sessionId.trim()))return;let o=e.snapshot(),s=r&&dg(o,a,r.agentId);if(r&&!s)return;let c=(t,i)=>(r&&s?t.sessionId===r.sessionId&&fg(o,t,i)===s.identity:Z(t.key,a))?e.copyRow(t,n):t,l=e.readState(),u=$m(l.result,l.result?.sessions.map(e=>c(e,l.agentId))??[]),d=r?e.stageManagedResults(i,e=>$m(e.snapshot.result,e.snapshot.result?.sessions.map(t=>c(t,e.snapshot.agentId))??[]),e=>({row:e.row?c(e.row,e.target.agentId):null})):void 0;e.connection.isCurrent(i)&&(u!==l.result&&e.publish({...l,result:u}),d?.notify())}}function Cg(){return(Cg=e((()=>{sh(),Q(),xg()})))()}function wg(e){let t=Wh(e),n=Vh(e.publishedRow,()=>e.publish({...e.readState()}),e.archiveFields),r=new Set,i=Sg(e),a=vg(e),o=_g(e,`category`),s=_g(e,`unread`),c=yg(e),l=[a,s,o,...c.owners],u=()=>l.some(e=>e.hasPending()),d=(t,n)=>{if(!u())return t;let r=fg(e.snapshot(),t,n);return l.reduce((e,t)=>t.applyRow(e,r),t)},{reconcileConfirmedPreviousConnection:f,refreshCategory:p,reportUncertainCategory:m}=og(e),h=async(n={},i={})=>{let a=e.connection.capture();if(!a)return null;try{let{currentSessionKey:o,...s}=n,c=await Mh(a.client,{...s,...jh(o,n.agentId)});if(!e.connection.isCurrent(a))return await f(a,n.agentId)?c:null;e.notifyCreated(c.key,c.entry,s.agentId),(s.worktree===!0||s.execNode?.trim())&&r.add(c.key.trim()),s.model?.trim()?t.set(c.key,s.model,!0):r.has(c.key)&&e.publish({...e.readState()});let l=e.reconcileMutation(n.agentId);if(i.reconciliation===`background`)l.catch(t=>{e.connection.isCurrent(a)&&e.publish({...e.readState(),error:J(t)},`operation`)});else if(await l,!e.connection.isCurrent(a))return await f(a,n.agentId)?c:null;return c}catch(t){return e.connection.isCurrent(a)&&e.publish({...e.readState(),error:J(t)},`operation`),null}},g=async(e={})=>(await h(e))?.key??null,_=async(n,r,l={})=>{let u=e.connection.capture();if(!u)return null;let d=Object.hasOwn(r,`model`),h=()=>!w()&&l.canDispatch?.()!==!1,g=c.prepare(r,h),_=d||g!==null,v=n.trim(),y=e.snapshot(),b=_||r.label!==void 0||r.category!==void 0||r.pinned!==void 0||r.unread===!1||r.archived!==void 0||r.boardFace!==void 0||r.boardPresentation!==void 0?dg(y,v,l.agentId):null,x=pg(e,y,b,l.expectedSessionId),S=Object.hasOwn(r,`thinkingLevel`),C=S?e.suspendThink(v,l.agentId):void 0,w=mg(e,y,_?b:null,()=>x),T=x??b,ee=[[T,g?.(T)??[]]],E=!1,D=!1,O,k=()=>l.ownsModelOverride?.()!==!1,A=t.preparePatch(n,r,l,u),j=r.pinned===!0,te=null,M=null,N=null,ne=()=>{r.category!==void 0&&!N&&x&&(N=o.prepare(()=>r.category?.trim()||void 0)(x)),A.start(),r.pinned!==void 0&&!te&&x&&(te=a.start(x,j)),r.unread===!1&&!M&&x&&(M=s.prepare(()=>!1)(x))};l.waitFor||ne();let P=t=>{A.settle(t),S&&(t?e.clearThink(v,l.agentId):C?.(),C=void 0);for(let[n,r]of[[x,[[a,te],[s,M],[o,N]]],...ee])if(n)for(let[i,a]of r)a&&i.settle(n,a,t&&E,e.connection.isCurrent(u))},re=()=>{if(!e.connection.isCurrent(u)||!_)return;let t=hg(y,b,x,l);t&&(x=t,h()&&ee.push([x,g?.(x)??[]]))},ie;try{if(l.waitFor&&(ie=l.predecessorReceipt?.subscribe(re),re(),await l.waitFor,!e.connection.isCurrent(u)||(re(),w()))||l.canDispatch?.()===!1||(ne(),!e.connection.isCurrent(u)||!h()))return P(!1),null;Object.hasOwn(r,`permissionMode`)&&(O=e.claimPermissionProjection(n,l.agentId,l.expectedSessionId));let t=x?e.capturePatchFields(x):void 0,a=await Xc(u.client,n,r,_&&x?{...l,expectedSessionId:x.sessionId}:l);if(D=!0,!e.connection.isCurrent(u))return P(!1),await f(u,l.agentId)?a:null;if(l.onConfirmed?.(a),E=x!==null&&a.entry.sessionId===x.sessionId&&dg(y,a.key,x.agentId)?.identity===x.identity,x&&E&&t){let n=e.readRevision();for(let e of lg(r,a))t({key:x.key,agentId:x.agentId,sessionId:x.sessionId,updatedAt:a.entry.updatedAt??null,readCutoff:n,fields:e})}if(O){let e=O.confirm({sessionId:a.entry?.sessionId,permissionMode:a.entry?.permissionMode,updatedAt:a.entry?.updatedAt});if(e===`superseded`)return P(!0),a;let t=dg(y,n,l.agentId);e===`confirmed`&&t&&a.entry?.sessionId&&i(n,{permissionMode:a.entry?.permissionMode,...a.entry?.updatedAt===void 0?{}:{updatedAt:a.entry.updatedAt}},{agentId:t.agentId,sessionId:a.entry.sessionId})}if(r.category!==void 0&&Object.keys(r).every(e=>e===`category`||e===`pinned`))return P(!0),l.deferListRefresh||p(u,l.agentId),a;let o={status:`refreshed`},s=E&&r.unread===!1&&Object.keys(r).length===1;if(!l.deferListRefresh&&!s){if(Object.hasOwn(r,`permissionMode`)?o=await e.reconcileMutation(l.agentId,O?.isCurrent):await e.reconcileMutation(l.agentId),!e.connection.isCurrent(u))return P(!1),await f(u,l.agentId)?a:null;if(O?.isCurrent()===!1)return P(!0),a}return P(!0),o.status===`failed`?{...a,listRefreshError:o.error}:a}catch(t){let n=r.category!==void 0&&!D&&!sg(t);n&&N&&x&&(o.settle(x,N,!1,!1),N=null,te&&=(a.settle(x,te,!1,!1),null));try{!D&&e.connection.isCurrent(u)&&!w()&&ee.some(([e,t])=>e&&t.some(([t,n])=>n&&t.owns(e,n)))&&l.onRejected?.(t)}finally{P(D)}if(!e.connection.isCurrent(u))return null;throw n?m(t,l.agentId):(k()&&!w()&&e.publish({...e.readState(),error:J(t)},`operation`),t)}finally{ie?.()}},v=async(t,n)=>{let r=e.connection.capture();if(!r)return null;let{archived:i,pinned:a}=n,o=a===!0?{pinned:!0}:a===!1?{pinned:!1,pinnedAt:void 0}:void 0,s=i===void 0?o:{...Hh(i),...i?void 0:o},c=e.snapshot(),l=s?t.map(t=>{let n=dg(c,t.key,t.agentId),r=t.expectedSessionId?.trim();if(!n||!r)return null;let i={...n,sessionId:r};return{owned:i,confirm:e.capturePatchFields(i)}}):[],u=await Zc(r.client,{targets:t,patch:n});if(!e.connection.isCurrent(r))return u;if(s){let t=e.readRevision();u.outcomes.forEach((e,n)=>{let r=l[n];e.ok&&r&&r.confirm({key:r.owned.key,agentId:r.owned.agentId,sessionId:r.owned.sessionId,updatedAt:null,readCutoff:t,fields:s})})}return u},y=async(t,n={})=>{let r=e.connection.capture();if(!r)return`not-started`;try{return await $c(r.client,t,n),e.connection.isCurrent(r)?`completed`:`uncertain`}catch(t){return e.connection.isCurrent(r)&&e.publish({...e.readState(),error:J(t)},`operation`),`uncertain`}},b=async(t,n,r={})=>{let a=e.connection.capture();if(!a)return null;let o=e.snapshot(),s=dg(o,t,r.agentId),c=s&&e.findRow((e,t)=>fg(o,e,t)===s.identity),l=s&&c?.sessionId?{agentId:s.agentId,sessionId:c.sessionId}:void 0;try{let o=await a.client.request(`sessions.assignOwner`,{key:t,owner:n,...r.agentId?{agentId:r.agentId}:{}});return e.connection.isCurrent(a)?(l&&i(o.key,{owner:o.owner},l),o.owner):null}catch(t){return e.connection.isCurrent(a)&&e.publish({...e.readState(),error:J(t)},`operation`),null}},x=()=>{t.clear();for(let e of l)e.clear();n.clearAll(),r.clear()};return{create:g,createResult:h,reconcileConfirmedPreviousConnection:f,retireDeletedSession(i){e.retirePullRequestSummary(i),n.clear(i),r.delete(i.trim()),t.set(i,void 0)},patch:_,settingsPreview(t,n){let r=dg(e.snapshot(),t,n);return r?c.read(r.identity):void 0},patchMany:v,assignOwner:b,patchRowLocal:i,applyPendingRow:d,observePendingFields(t,n,r){if(!u())return;let i=fg(e.snapshot(),t,r);for(let e of l)e.observe(t,n,i)},applyPendingRows(e,t){return!e||!u()?e:$m(e,e.sessions.map(e=>d(e,t)))},applyConfirmedArchives:n.apply,applyConfirmedArchiveRow:n.applyRow,observeArchiveState:n.observe,confirmArchiveState:n.confirm,reset:y,retireModelOverride:t.retire,archiveVisibility:n.visibility,beginArchive:n.beginPending,isPreparedWorkSession:e=>r.has(e.trim()),settlePrepared(e){for(let n of e?.sessions??[])t.settleCreated(n),(n.worktree||n.execNode)&&r.delete(n.key)},retireConnection(){x();let t=e.readState();e.publish({...t,modelOverrides:{}})},dispose:x}}function Tg(){return(Tg=e((()=>{Y(),Nh(),sh(),Uh(),cg(),ug(),xg(),ll(),Cg()})))()}function Eg(e,t){let n=new Map,r=(t,n)=>{let r=ea(e.snapshot,t,n??void 0);return`${r.sessionKey}\0${r.agentId??``}`},i=(e,t)=>{let r=n.get(e),i={sessionId:t,fact:r&&r.sessionId===t?r.fact:void 0};return n.set(e,i),i},a=(e,a,o)=>{let s=r(e,a),c=o?.trim()||void 0,l=t(),u=l.observations.publishedRow((e,t)=>r(e.key,e.agentId??t)===s),d=c??u?.sessionId,f=i(s,d);!f.fact&&u&&u.sessionId===d&&(f.fact={permissionMode:u.permissionMode,updatedAt:u.updatedAt,revision:l.observations.rowRevision(u)});let p=f.fact,m=()=>n.get(s)===f,h=!1,g=f.fact;return{isCurrent:()=>m()&&(!h||f.fact===g),confirm(e){let n=f.sessionId===e.sessionId?f.fact:void 0;return!m()||e.sessionId&&c&&c!==e.sessionId||e.updatedAt!=null&&n?.updatedAt!=null&&e.updatedAt<n.updatedAt?`superseded`:(h=!0,g=f.fact,n&&n!==p&&n.updatedAt===e.updatedAt&&n.permissionMode!==e.permissionMode?`refresh`:e.sessionId?(f.sessionId=e.sessionId,f.fact={permissionMode:e.permissionMode,updatedAt:e.updatedAt,revision:t().requestRevision},g=f.fact,`confirmed`):`confirmed`)}}},o=(e,i,a,o)=>{let s=r(e.key,e.agentId??a),c=n.get(s);if(!c)return e;if(e.sessionId!==c.sessionId)return o&&n.delete(s),e;let l=i(e),u=c.fact,d=u?.updatedAt!=null&&e.updatedAt!=null&&e.updatedAt<u.updatedAt,f=u?.updatedAt!=null&&e.updatedAt!=null&&e.updatedAt>u.updatedAt;if(!u||f||!d&&l>u.revision)return o&&(u&&u.permissionMode===e.permissionMode&&u.updatedAt===e.updatedAt?u.revision=l:c.fact={permissionMode:e.permissionMode,updatedAt:e.updatedAt,revision:Math.max(l,u?.revision??0)}),e;if(e.permissionMode===u.permissionMode)return e;let p={...e};return u.permissionMode===void 0?delete p.permissionMode:p.permissionMode=u.permissionMode,t().observations.inheritRow(p,e)},s=(e,t,r,i)=>!e||n.size===0?e:$m(e,e.sessions.map(e=>o(e,t,r,i)));return{claim:a,capture:(e,t)=>{let i=r(e,t),a=n.get(i),o=a?.fact,s=o?.revision;return()=>a!==void 0&&n.get(i)===a&&a.fact===o&&a.fact?.revision===s},reconcileList:(e,t,n)=>s(e,()=>t,n,!0),reconcileRow:(e,t,n)=>o(e,()=>t,n,!0),apply:(e,t,n)=>s(e,t,n,!1),applyRow:(e,t,n)=>o(e,()=>t,n,!1),observeEventRow:(e,a,o,s)=>{if(e===a)return e;let c=e.agentId??o.agentId??s,l=r(e.key,c),u=n.get(l);if((!u||u.sessionId!==e.sessionId)&&(u=i(l,e.sessionId)),u?.fact?.updatedAt!=null&&e.updatedAt!=null&&e.updatedAt<u.fact.updatedAt){let t={...e,permissionMode:u.fact.permissionMode};return t.permissionMode===void 0&&delete t.permissionMode,t}return e.sessionId&&(u.fact={permissionMode:e.permissionMode,updatedAt:e.updatedAt,revision:t().requestRevision}),e},clear:()=>n.clear()}}function Dg(){return(Dg=e((()=>{sh(),Q()})))()}function Og(e){let t=bg,n=(n,r,i)=>(a,o)=>{let s=r?.observe(n,i),c=e.roster.observations.inheritRow(a,n,o),l=e.roster.observations.projectFields(r?e.permissions.reconcileRow(c,r.revision,i):c,i);return s&&e.mutations.observePendingFields(n,s(l,t),i),l},r=n=>{let r=e.roster.captureReconciliation(),i={...n,key:n.key.trim(),agentId:F(n.agentId)},a=!!(i.key&&n.agentId.trim()&&i.sessionId.trim());return n=>{let o=()=>r.isCurrent(void 0,i.agentId)&&e.deletions.acceptsGeneration(i.key,i.sessionId,i.agentId)&&!e.deletions.deletionState(i.key,i.agentId,i.sessionId);if(!a||!n.agentId.trim()||!Z(n.key,i.key)||F(n.agentId)!==i.agentId||n.sessionId!==i.sessionId||!o())return;let s=Object.keys(n.fields),c=Ph(r.revision,n.updatedAt,n.readCutoff),l=!1,u=!1,d=(t,n)=>{u=e.mutations.confirmArchiveState(i.key,t.archived===!0,{sessionId:i.sessionId,archivedAt:t.archivedAt,archivedBy:t.archivedBy,archiveReason:t.archiveReason},n)||u},f=(r,a)=>{let o=X(r.key)?.agentId,u=o??r.agentId??a;if(!u||F(u)!==i.agentId||o&&r.agentId&&F(r.agentId)!==F(o)||!Z(r.key,i.key)||r.sessionId!==i.sessionId)return r;let f={...r,...n.fields};for(let[e,t]of Object.entries(n.fields))t===void 0&&Reflect.deleteProperty(f,e);e.roster.observations.inheritRow(f,r);let p=e.roster.observations.observeFields(f,s,c,i.agentId),m=e.roster.observations.projectFields(f,i.agentId);return`archived`in n.fields&&(l=!0,d(m,e.roster.observations.fieldObservation(m,`archived`))),e.mutations.observePendingFields(f,p(m,t),i.agentId),m},p=(e,t)=>e&&$m(e,e.sessions.map(e=>f(e,t))),m=e.readState(),h=p(m.result,m.agentId),g=e.roster.observations.stageManagedResults(r.scope,e=>p(e.snapshot.result,e.snapshot.agentId),e=>({row:e.row?f(e.row,e.target.agentId):null}));o()&&(!l&&`archived`in n.fields&&d(n.fields,c),(h!==m.result||u)&&e.publish({...m,result:e.decorate(h)}),g.notify())}},i=(t,r,i,a)=>{let o=e.readState(),s=t?.agentId??(Qi(t?.key)?i?.selectedGlobalAgentId:void 0)??i?.resultAgentId??o.agentId;if(a&&!a.isCurrent(void 0,s)||t&&(!e.deletions.acceptsGeneration(t.key,t.sessionId,s)||e.deletions.deletionState(t.key,s,t.sessionId)))return!1;if(a&&!a.isCurrent(t,s))return r&&t&&Qi(t.key)&&s!==o.agentId&&i?.selectedGlobalAgentId===s?`defaults-only`:!1;let c=!!a||!t||e.roster.observations.isCurrentRow(t,void 0,s);if(!c&&!o.result?.sessions.some(n=>Z(n.key,t?.key)&&e.roster.observations.isCurrentRow(n)))return!1;let l=i?.sourceCanonicalListRevision,u=!c||!a&&l!==void 0&&e.canonicalListRevision()>l,d=t&&n(t,a,s),f,p=t?e.roster.observations.currentRow(t,s):void 0,m=t&&Lm(t,p)?void 0:t,h=oh(o.result,m,r,i,u,t?{observe:e=>{f=e.key},isProvisional:n=>o.resultCached===!0&&(!!a||e.roster.observations.rowRevision(t)>0)&&e.roster.observations.rowRevision(n)===0,project:d}:void 0),g=e.decorate(h),_=f&&g?.sessions.find(e=>Z(e.key,f)),v=_||(t&&a&&c?Jm(t,e.roster.observations.currentRow(t,s),{resultAgentId:s,selectedGlobalAgentId:s,archivedFilter:`all`},{project:d}).admittedRow:void 0),y=v?a?.stage(v,s):void 0;v&&e.githubPublication.observeRows([v],s);let b=i?.resultAgentId?.trim()?F(i.resultAgentId):o.agentId,x=g?.sessions!==o.result?.sessions;return(g!==o.result||b!==o.agentId)&&e.publish({...o,result:g,agentId:b}),y?.(),t&&c&&x&&(a||l===void 0)&&e.roster.invalidateManagedLists(X(t.key)?.agentId??s,_||t,i?.sourceListScope),c};return{capturePatchFields:r,reconcile:i,reconcileChangedEvent:(n,r,i)=>{let{roster:a,connection:o,deletions:s,githubPublication:c,permissions:l,mutations:u,thinkingClaims:d}=e,f=e.readState(),p=Km(n),m=()=>(!r.scope||o.isCurrent(r.scope))&&(!p||s.acceptsGeneration(p.key,p.sessionId,p.agentId??f.agentId)),h=e=>r.deliver(e,m),g=()=>({eventInfo:null,reconciled:{applied:!1,result:e.readState().result},notifyEvent:h});if(!m())return g();let _=f.result,v=z(I(n)?.reason);c.observeEvent(n);let y=e.snapshot().sessionKey?.trim(),b=p?.archived===!0&&!!(y&&aa({assistantAgentId:e.snapshot().assistantAgentId,hello:e.snapshot().hello,sessionKey:y},p.key,p.agentId)),x=b?{...i,archivedFilter:`all`}:i,S,C,w=a.observations.prepareProjection(),T=(e,n,i,o,s)=>{let c=s.hasPermissionMode?l.observeEventRow(e,n,s,o):e;a.observations.inheritRow(c,n);let d=a.observations.inheritRow({...c},c),f=a.observations.observeFields(d,s.isAncestorReference?a.observations.fieldNames(n):i,Ph(r.revision,s.updatedAt,void 0,s.snapshotAt),o),p=w.projectFields(d,o);return s.archived!==null&&u.observeArchiveState(p.key,p.archived===!0,p),u.observePendingFields(d,f(p,t),o),p},ee=(e,t,r)=>{let i=$m(e,w.projectRows(e?.sessions??[])),o=ah(i,n,t,(e,t,n,i)=>T(e,t,n,i.agentId??r,i),e=>s.acceptsGeneration(e.key,e.sessionId,e.agentId??r));if(a.observations.inherit(o.result,i,void 0,r),!C&&o.admittedRow){let{result:e,...t}=o;C=t}return o},E=ee(_,x,f.agentId),D=[],O=a.observations.stageManagedResults(r.scope,e=>{let t=ee(e.snapshot.result,{resultAgentId:e.snapshot.agentId,archivedFilter:b?`all`:e.scope.archivedFilter},e.snapshot.agentId);return D.push(...(t.admittedRows??[]).map(e=>({row:e,revision:r.revision}))),t.result},e=>{if(!p&&v===`runner-availability`)return{row:e.row,invalidateRevision:r.revision};let t=Gm(n).find(t=>{let n=Km(t),r=n?.agentId??X(n?.key)?.agentId;return n&&r&&Z(n.key,e.target.key)&&F(r)===e.target.agentId&&s.acceptsGeneration(n.key,n.sessionId,r)}),i=Km(t);if(!i)return{row:e.row};if(!e.row)return{row:null,eventResult:C,invalidateRevision:r.revision};if(i.sessionId&&i.sessionId!==e.row.sessionId)return{row:e.row};let a=Ym(w.projectFields(e.row,e.target.agentId),t,{resultAgentId:e.target.agentId,selectedGlobalAgentId:e.target.agentId,archivedFilter:`all`},(t,n,r)=>T(t,n,r,e.target.agentId,i));return t===n&&(a.admittedRow||a.deletedKey)&&(S??=a),{row:a.row??null,eventResult:a,...!a.deletedKey&&(!a.admittedRow||!Array.isArray(I(t)?.ancestorSessions))?{invalidateRevision:r.revision}:{}}},!1,D,r),k=(e=!1)=>O.notify(e?(E.admittedRows??[]).map(e=>({row:e,revision:r.revision})):[],v),A=d.observeEvent(p?.reason===`delete`?E:C??S??E,p);return p&&(p.reason!==`delete`||E.deletedKey||!p.sessionId)&&s.observe(p),m()?{eventInfo:p,reconciled:E,claimChanged:A,notifyManaged:k,notifyEvent:h}:g()},observeRow:(t,r,i)=>{let{roster:a,deletions:o}=e;if(!t.key.trim()||!t.agentId.trim())throw Error(`A session row observation requires a session key and explicit agent.`);let s={key:t.key.trim(),agentId:F(t.agentId)},c=a.observations.registerRow(s,r,{onInvalidate:i?.onInvalidate,onEvent:i?.onEvent,isValid:e=>o.acceptsGeneration(s.key,e,s.agentId),decorate:t=>o.deletionState(t.key,s.agentId,t.sessionId)?null:e.mutations.applyPendingRow(e.mutations.applyConfirmedArchiveRow(e.permissions.applyRow(t,a.observations.rowRevision(t),s.agentId)),s.agentId)}),l=a.observations.publishedRow((e,t)=>{let n=X(e.key)?.agentId??e.agentId??t;return!!(n&&Z(e.key,s.key)&&F(n)===s.agentId&&a.observations.hasLiveObservation(e)&&o.acceptsGeneration(e.key,e.sessionId,s.agentId))});return l&&a.observations.stageObservedRows([l],e.connection.capture(),s.agentId)(),{get row(){return c.current()},get sessionId(){return c.sessionId()},get hasObserved(){return c.hasObserved()},isCurrent:c.isCurrent,dispose:c.dispose,captureReconcile(){let t=a.captureReconciliation();return r=>{if(!c.isCurrent()||!t.isCurrent(void 0,s.agentId))return{status:`retired`};if(c.readInvalidated(t.revision))return{status:`invalidated`};if(r){if(!c.acceptsRead(r,t.revision)||o.deletionState(r.key,s.agentId,r.sessionId)||!t.isCurrent(r,s.agentId))return{status:`current`,row:c.current()};let i=Jm(r,a.observations.currentRow(r,s.agentId),{resultAgentId:s.agentId,selectedGlobalAgentId:s.agentId,archivedFilter:`all`},{isProvisional:e=>a.observations.rowRevision(e)===0,project:n(r,t,s.agentId)});if(i.admittedRow){let n=i.admittedRow,r=t.stage(n,s.agentId),o=e.readState(),c=a.observations.mergeRows(o.result,[n],o.agentId,s.agentId);e.githubPublication.observeRows([n],s.agentId),c!==o.result&&e.publish({...o,result:e.decorate(c)}),r()}}else c.clear(t.revision)();return c.isCurrent()?{status:`current`,row:c.current()}:{status:`retired`}}}}},captureReconcile(){let t=e.roster.captureReconciliation();return(e,n,r)=>i(e,n,r,t)}}}function kg(){return(kg=e((()=>{sh(),Q(),xg(),Bh(),Qm()})))()}function Ag(e){if(!(e instanceof gt)||!e.retryable)return null;let t=typeof e.retryAfterMs==`number`&&Number.isFinite(e.retryAfterMs)?e.retryAfterMs:jg;return Math.min(Math.max(t,Mg),Ng)}var jg,Mg,Ng;function Pg(){return(Pg=e((()=>{Qt(),jg=500,Mg=100,Ng=3e4})))()}function Fg(){Bg+=1}var Ig,Lg,Rg,zg,Bg,Vg,Hg;function Ug(){return(Ug=e((()=>{s(),Ig=`openclaw-session-roster`,Lg=`rosters`,Rg=2592e6,zg=1572864,Bg=0,Vg=0,Hg={read(e,t){let n=Bg;return V(async()=>{let{readSessionRoster:e}=await import(`./session-roster-cache.reader-za0ig5Q3.js`);return{readSessionRoster:e}},__vite__mapDeps([208,209]),import.meta.url).then(({readSessionRoster:r})=>r(e,t,n))},write(e){let t=Bg;Vg+=1;let n=Vg;V(()=>import(`./session-roster-cache.runtime-CPajVK7c.js`).then(r=>{t===Bg&&r.persistSessionRoster(e,n)}),__vite__mapDeps([210,209]),import.meta.url).catch(()=>void 0)}}})))()}function Wg(e,t,n,r){let i=n.rosterCache??Hg,a=()=>e.connection?ut(e.connection.gatewayUrl):n.bootRecord?.scope,o=a(),s=e.connectionRevision,c=n.bootRecord?.profileId,l=new AbortController,u={scope:o,connectionRevision:s,agentId:t.state.selectedId,profileId:c,query:{}};return{settled:new Promise(a=>{if(!n.bootRecord||e.snapshot.phase===`connected`){a();return}l.signal.addEventListener(`abort`,()=>a(),{once:!0}),V(async()=>{let{hydrateSessionRoster:e}=await import(`./session-roster-cache.reader-za0ig5Q3.js`);return{hydrateSessionRoster:e}},__vite__mapDeps([208,209]),import.meta.url).then(({hydrateSessionRoster:n})=>n(e,t,i,r,u,l.signal)).then(a,a)}),synchronize(t){t.phase===`connected`&&l.abort(),(a()!==o||e.connectionRevision!==s||t.phase===`connected`&&c!==void 0&&c!==(t.selfUser?.id??null))&&(c=void 0,o=a(),s=e.connectionRevision,l.abort(),r.publish({...r.readState(),result:null,resultCached:!1,agentId:null,groups:[],groupSettings:[],sectionOrder:[]}))},persist(t){t.result&&!t.resultCached&&r.connected()&&e.connection&&kt(e.snapshot.hello?.auth,e.connection.token)&&(c=void 0,i.write({version:1,scope:ut(e.connection.gatewayUrl),savedAt:Date.now(),profileId:e.snapshot.selfUser?.id??null,agentId:t.agentId,query:r.query(),result:t.result,groups:t.groups,groupSettings:t.groupSettings,sectionOrder:t.sectionOrder}))},dispose(){l.abort()}}}function Gg(){return(Gg=e((()=>{wt(),Ug(),s()})))()}function Kg(e){return e instanceof he&&(Te(e)||k(e))||Oe(e)}function qg(e){return e.phase===`connected`&&e.restartPending!==!0&&(e.suspensionPhase===void 0||e.suspensionPhase===`accepting`)}function Jg(e,t){return Kg(e)||!(e instanceof he)&&t!=null&&!qg(t)}function Yg(){return(Yg=e((()=>{C(),st(),Be()})))()}function Xg({active:e,refresh:t}){let n=e,r=0,i=0,a=null,o=0,s=!1,c=()=>{clearTimeout(r),r=0},l=(e=!0)=>{if(!n||a||!s||r)return;let t=Date.now(),o=e?Zg*(1-.2*Math.random()):0;r=setTimeout(u,Math.max(o,i-t))},u=()=>{if(c(),!n||a||!s)return;s=!1;let e={};a=e;let r=Date.now(),u=o;t(()=>a===e&&u===o).catch(()=>{}).finally(()=>{if(a!==e)return;a=null;let t=Date.now();i=t+Math.min(15e3,Math.max(5e3,3*(t-r))),l()})},d=()=>{o+=1,c(),s=!1},f=()=>{d(),a=null,i=0};return{schedule(){s=!0,l()},setActive(e,t=!1){if(n=e,e){l(!1);return}s||=t||r!==0,c()},absorb:d,reset:f,dispose:f}}var Zg;function Qg(){return(Qg=e((()=>{Zg=5e3})))()}function $g(e,t,n=()=>!0){e.snapshot=t;for(let r of e.listeners){if(!n()||e.snapshot!==t)return;r(t)}}function e_(e,{managedLists:t,observations:n,nextRevision:r,isPageActive:i,publishPrimary:a}){let o=(o,s)=>{let c=e.connection.capture();if(!c)return Promise.resolve();if(o.pending)return s.invalidated&&(!s.background||!o.queued||o.queued.background)&&(o.queued=s),o.pending;if(s.background&&!s.invalidated&&!s.append&&o.connectionEpoch===c.epoch||s.append&&!o.snapshot.result)return Promise.resolve();s.append||(o.queued=null);let l=()=>t.get(o.key)===o&&e.connection.isCurrent(c),u=async()=>{let t=s;for(;t&&l();){t.append||o.coordinator.absorb();let s={...o.query,limit:t.append?o.query.limit:o.retainedLimit,...t.append&&t.offset!==void 0?{offset:t.offset}:{}};$g(o,{...o.snapshot,loading:!0,error:null},l);try{let i=r(),u=await Yc(c.client,s);if(!l())return;if(!u)throw Error(`The session query did not return a result. Try again.`);let d=e.reconcileList(u,i,o.query.agentId),f=o.snapshot.result,p=nh(d,f),m=o.query.agentId;n.inherit(p,d,f,m);let h=n.accept(p,f,e.readState().result,m,o.snapshot.agentId),g=h&&t.append&&s.offset&&f?th(f,h):h,_=e.decorate(g,o);_&&(o.retainedLimit=Math.max(o.retainedLimit,_.sessions.length));let v=n.stageObservedRows(h?.sessions??[],c,m,void 0,!1);o.connectionEpoch=c.epoch;let y={result:_,agentId:m??null,loading:!1,error:null};o.snapshot=y;let b=e.readState(),x=n.mergeRows(b.result,_?.sessions??[],b.agentId,m);x!==b.result&&a(x),l()&&o.snapshot===y&&$g(o,y,l),v()}catch(t){if(!l())return;let n=Jg(t,e.snapshot());$g(o,{...o.snapshot,loading:!1,error:n?null:J(t)},l)}if(!l())return;let u=o.queued;if(u?.background)return;o.queued=null,t=i()?u:null}},d=mt(),f=d.promise.finally(()=>{o.pending===f&&(o.pending=null,o.queued?.background&&l()&&i()&&o.coordinator.schedule())});return o.pending=f,d.resolve(u()),f};return(n,r,a=()=>!0)=>!r.background||n.pending?o(n,r):((!n.queued||r.invalidated&&n.queued.background)&&(n.queued=r),e.background(n,async()=>{if(a()&&t.get(n.key)===n&&n.listeners.size>0){if(!i()){n.coordinator.setActive(!1,!0);return}let e=n.queued??r;n.queued=null,await o(n,e)}}))}function t_(){return(t_=e((()=>{je(),Y(),Yg(),sh(),ll()})))()}function n_(e,t,n){let r=0,i=(t=()=>!0)=>{let r=new Set;for(let n of e.values())n.warmPrimary&&t(n)&&(n.warmPrimary=!1,n.scope.agentId&&r.add(F(n.scope.agentId)),n.listeners.size===0&&!n.pending&&(n.coordinator.dispose(),e.delete(n.key)));r.size>0&&n(r)},a=(t,n,r)=>{let a=e=>n(e);return t.listeners.add(a),i(e=>e===t),t.coordinator.setActive(r),()=>{if(t.listeners.delete(a),t.listeners.size>0||e.get(t.key)!==t)return;t.coordinator.setActive(!1,t.queued!==null),t.queued=null;let n=()=>{!t.warmPrimary&&t.listeners.size===0&&e.get(t.key)===t&&(t.coordinator.dispose(),e.delete(t.key))};t.pending?t.pending.finally(n):n()}};return{subscribe:a,observe(t,n,r,i,o){let s=a(t,n,r),c=!1,l=()=>{if(c||e.get(t.key)!==t)throw Error(`This session query has been disposed.`)};try{n(t.snapshot)}catch(e){throw s(),e}return{async refresh(){l();let e=i.capture();if(!e)throw Error(`The session query is unavailable while disconnected. Try again.`);if(await o(),l(),!i.isCurrent(e))throw Error(`The session query connection changed. Try again.`);if(t.snapshot.error)throw Error(t.snapshot.error)},dispose(){c||(c=!0,s())}}},retire:i,get revision(){return r},invalidate(t,n,a){let o=JSON.stringify(qc(n)),s=e.get(o);o!==a&&(!s||t(s))&&(r+=1),i(e=>e.key!==a&&t(e))},capture(e,n,r){let a=JSON.stringify(qc(e));i(t=>t.scope.agentId===e.agentId&&t.key!==a);let o=t(e);if(o.listeners.size>0||o.pending){i(e=>e===o);return}o.warmPrimary=!0,o.connectionEpoch=r,$g(o,{result:n,agentId:e.agentId?F(e.agentId):null,loading:!1,error:null})},presentation(t,n){if(!Qh(t))return null;for(let r of e.values())if(r.warmPrimary&&r.listeners.size===0&&!r.pending&&!r.snapshot.loading&&r.snapshot.error===null&&r.connectionEpoch===n&&$h(r.scope,t,!0))return{result:r.snapshot.result,agentId:r.snapshot.agentId};return null}}}function r_(){return(r_=e((()=>{Q(),ag(),t_(),ll()})))()}function i_(e,t,n,r){let i=async n=>{let r=e.connection.capture();if(!r)return null;try{let i=t(),a=await Jc(r.client,n);return e.connection.isCurrent(r)?{result:e.reconcileList(a??null,i,n.agentId),scope:r,issuedRevision:i}:null}catch(t){if(!e.connection.isCurrent(r))return null;throw t}};return{list:async(t={})=>{let n=await i(t);return n&&e.connection.isCurrent(n.scope)?e.decorate(n.result,{scope:t}):null},reconcile:async(t,a)=>{let o=e.connection.capture();if(!o)return{status:`stale`};try{let a=await i(t);if(!a||!e.connection.isCurrent(o))return{status:`stale`};let s=a.result?.sessions??[],c=e.readState(),l=e.decorate(n.mergeRows(c.result,s,c.agentId,t.agentId),r()),u=n.stageObservedRows(s,a.scope,t.agentId,a.issuedRevision);return l!==c.result&&e.publish({...c,result:l}),u(),{status:`refreshed`}}catch(t){return e.connection.isCurrent(o)&&a?.()!==!1?{status:`failed`,error:J(t)}:{status:`stale`}}}}}function a_(){return(a_=e((()=>{Y(),ll()})))()}function o_(e,t){return async(n,r)=>{let i=e.connection.capture();if(!i)return{status:`stale`};t.invalidate(n);let a=t.foreground();if(qh(n)(a.agentId)){let o=t.replacementOptions(a.initial?n:void 0),s=await t.refresh(o,r);if(!e.connection.isCurrent(i))return{status:`stale`};let c=Xh(s,n);if(c)return c.status===`failed`&&r?.()===!1?{status:`stale`}:c;if(!n?.trim()||r?.()===!1)return{status:`stale`}}return t.read(t.replacementOptions(n),r)}}function s_(){return(s_=e((()=>{ag()})))()}function c_(e){let t=new Map,n=()=>{for(let[e,n]of t){if(t.size<=l_)break;n.result&&t.delete(e)}},r=t=>{if(!e.connection.isCurrent(t.scope))return!1;let n=e.currentRow(t.params),r=t.result?t.result.session:t.issuedRow;return!n||!!(r&&n.sessionId===r.sessionId&&(n.updatedAt??0)<=(r.updatedAt??0))};return{describe:async(i,a={})=>{let o=e.connection.capture(),s=a.timeoutMs===void 0?[]:[{timeoutMs:a.timeoutMs}];if(!o||a.client&&a.client!==o.client){if(a.refresh&&a.client)return a.client.request(`sessions.describe`,i,...s);throw Error(`gateway not connected`)}let c=JSON.stringify([i.key,i.agentId,i.includeDerivedTitles,i.includeLastMessage,a.timeoutMs]),l=t.get(c);if(l&&(!r(l)||a.refresh||!e.canReuse()&&l.result)&&(t.delete(c),l=void 0),!l){let a=o.client.request(`sessions.describe`,i,...s),u={params:{...i},scope:o,promise:a,issuedRow:e.currentRow(i),reusable:e.canReuse()};u.promise=a.then(i=>{let a=i.session?.runtimeMs===void 0?i:{...i,session:{...i.session,runtimeSampledAt:Date.now()}};return t.get(c)===u&&e.connection.isCurrent(o)&&(u.result=a,(!u.reusable||!e.canReuse()||!r(u))&&t.delete(c),n()),a},e=>{throw t.get(c)===u&&t.delete(c),e}),l=u,t.set(c,l),n()}return l.promise},clear:()=>t.clear(),invalidateEvent(e){if(!Array.isArray(Wm(e)?.[1].ancestorSessions)){t.clear();return}let n=Gm(e).flatMap(e=>{let t=Km(e);return t?[t]:[]});if(!n.length){t.clear();return}for(let[e,r]of t){let i=X(r.params.key)?.agentId??r.params.agentId;n.some(e=>{let t=e.agentId??X(e.key)?.agentId;return Z(e.key,r.params.key)&&(!i||!t||F(t)===F(i))})&&t.delete(e)}}}}var l_;function u_(){return(u_=e((()=>{Q(),Qm(),l_=128})))()}function d_(e,t,n,r,i){return(a,o)=>{let s=new Set([...e].filter(r)),c=new Map;return{captures:e=>s.has(e),results:c,deliver(e,l){for(let u of s){if(!a||!t.isCurrent(a))return;if(u.onEvent&&n(u))try{let t=c.get(u),n=l?.()===!1?{applied:!1,generationRejected:!0}:t&&(r(u)||t.result.deletedKey)&&u.snapshot===t.snapshot&&(!t.result.admittedRow||!i(t.result.admittedRow,o))?t.result:{applied:!1};u.onEvent(e,n)}catch(e){console.error(`[sessions] event observer error:`,e)}}}}}}function f_(e,t){let{identity:n,inheritRow:r,mergeRow:i,rowRevision:a}=e,o=(e,t,r)=>{let i=new Map;for(let a of e){if(r&&!r.has(a.sessionId))continue;let e=n(a,t);e&&i.set(e,a)}return i},s=(e,t,s,c,u)=>{if(!e||t.length===0)return e;let d=o(t,c);return $m(e,e.sessions.map(e=>{let t=n(e,s),o=t&&d.get(t);if(!o)return e;let f=t&&u?.get(t),p=f&&(a(o)>a(f)||Lm(f,o))&&l(o,c);return p?p.key===e.key?p:r({...p,key:e.key},p):i(e,o,s)}))},c=e=>{let{state:o,primaryRows:s,observedRows:c}=t(e&&new Set(e.flatMap(e=>e.sessionId?.trim()?[e.sessionId]:[]))),l=(e,t)=>{let l=n(e,t);if(!l)return e;let u=e,d=s.get(l);d&&(u=o.resultCached&&a(d)===0?i(u,d,t):i(d,u,t));for(let e of c.get(l)??[])u=i(u,e,t);return u.key===e.key?u:r({...u,key:e.key},u)};return{projectFields:l,projectRows:e=>e.map(e=>l(e))}},l=(e,t)=>c([e]).projectFields(e,t),u=(e,r,i)=>{let a=n(e,r);if(!a)return[];let{primaryRows:o,observedRows:s}=i??t(),c=o.get(a);return[...c?[c]:[],...s.get(a)??[]]};return{indexRows:o,merge:s,prepareProjection:c,projectFields:l,heldRowsFor:u,currentRow:(e,t)=>{let n=u(e,t)[0];return n?l(n,t):void 0}}}function p_(){return(p_=e((()=>{sh(),Qm()})))()}function m_(e,t){let n=e.runId?.trim()||null,r=T($r(e.errorMessage).replace(/\s+/g,` `).trim(),160);return i=>{if(!e.sessionKeys.some(e=>Z(i.key,e)))return i;let a=t?t.agentId(i):i.agentId??e.agentId;if(Qi(i.key)&&(!e.agentId||!a||F(a)!==F(e.agentId)))return i;let o=t?.project(i)??i,s=o.hasActiveRun===!0||Re(o),c=o.lastRunId?.trim(),l=e.status!==`queued`&&e.status!==`running`;if(!s&&l&&n&&c&&c!==n||s&&(!n||!o.activeRunIds?.includes(n)))return i;let u=n?o.activeRunIds?.filter(e=>e!==n):[];if(u?.length){let e={...o,activeRunIds:u,hasActiveRun:!0,status:`running`};return t?.observe(e,o,[`activeRunIds`,`hasActiveRun`,`status`]),e}let d=s&&n&&c&&c!==n&&l?n:void 0,f=e.status===`failed`||e.status===`timeout`,p=f?r||(d?void 0:o.lastRunError):void 0,m=d?e.endedAt:o.endedAt??e.endedAt,h=d?void 0:typeof o.startedAt==`number`?Math.max(0,m-o.startedAt):o.runtimeMs,g=o.activeRunIds?.length?[]:o.activeRunIds,_=e.status===`killed`?!0:d||e.status===`running`?!1:o.abortedLastRun,v=[`hasActiveRun`,`status`];g!==void 0&&v.push(`activeRunIds`),(!f||r||d)&&v.push(`lastRunError`),d?v.push(`lastRunId`,`startedAt`,`endedAt`,`runtimeMs`):o.endedAt??(v.push(`endedAt`),typeof o.startedAt==`number`&&v.push(`runtimeMs`)),(d||e.status===`killed`||e.status===`running`)&&v.push(`abortedLastRun`);let y=!d&&o.hasActiveRun===!1&&o.status===e.status&&o.lastRunError===p&&o.endedAt===m&&o.runtimeMs===h&&o.activeRunIds===g&&o.abortedLastRun===_?o:{...o,...d?{lastRunId:d,startedAt:void 0}:{},activeRunIds:g,hasActiveRun:!1,status:e.status,lastRunError:p,endedAt:m,runtimeMs:h,abortedLastRun:_};return t?.observe(y,o,v),y}}function h_(e,t,n){if(!e)return e;let r=m_(t,n);return $m(e,e.sessions.map(r))}function g_(e){return(t,n)=>{let{owner:r,inheritRow:i,observeFields:a}=e.provenance,{projectFields:o}=e.prepareProjection(),s=e=>({agentId:t=>r(t,e),project:t=>o(t,e),observe:(t,r,o)=>{i(t,r),a(t,o,Ph(n.revision,null),e)}}),c=(e,n)=>e&&h_(e,t,s(n)),l=e.readState(),u=c(l.result,l.agentId),d=e.stage(n.scope,e=>c(e.snapshot.result,e.snapshot.agentId),e=>{let r=t.sessionKeys.some(n=>{let r=X(n)?.agentId??t.agentId;return!!(r&&Z(n,e.target.key)&&F(r)===F(e.target.agentId))});return{row:e.row&&r?m_(t,s(e.target.agentId))(e.row):e.row,...!e.row&&r?{invalidateRevision:n.revision}:{}}});return{result:u,changed:u!==l.result||d.changed,notify:d.notify}}}function __(){return(__=e((()=>{Y(),sh(),Q(),Bh()})))()}function v_(e,t){let n=Lh(),{owner:r,identity:i,inheritRow:a,mergeRow:o,rowRevision:s}=n,c=new Set,l=t=>c.has(t)&&t.scope!==null&&e.connection.isCurrent(t.scope),u=e=>l(e)&&!e.snapshot.retired&&(e.snapshot.sessionId===null||e.isValid(e.snapshot.sessionId)),d=d_(c,e.connection,l,u,n.hasNewerFacts),f=(e,t)=>{let n=X(e.key)?.agentId;return!!e.sessionId?.trim()&&Z(e.key,t.key)&&r(e,t.agentId)===F(t.agentId)&&(!n||!e.agentId||F(e.agentId)===F(n))},p=e=>u(e)?e.snapshot.row:null,m=(e,t)=>u(e)&&f(t,e.target)&&!!(t.sessionId&&e.isValid(t.sessionId))&&(e.snapshot.sessionId===null||e.snapshot.sessionId===t.sessionId),h=(e,t,r,i=!1)=>m(e,t)&&(r>e.snapshot.invalidatedRevision||i&&e.snapshot.sessionId===null&&e.snapshot.invalidatedRevision===0&&n.hasObservation(t)),g=(e,t)=>{let r=e.snapshot,i=r.sessionId;if(l(e)&&!r.retired&&i)return t.some(({row:t,revision:a})=>t.sessionId&&t.sessionId!==i&&f(t,e.target)&&e.isValid(t.sessionId)&&(!e.isValid(i)||a>r.invalidatedRevision&&(!r.row||!n.hasNewerFacts(r.row,a))))?{entry:e,previous:r,snapshot:{...r,row:null,visible:null,retired:!0}}:void 0},_=n=>{let r=e.readState(),a=v(r.result?.sessions??[],r.agentId,n),o=e.connection.capture()?.epoch,s=new Map,l=(e,t)=>{let n=s.get(e);n?n.push(t):s.set(e,[t])};for(let e of t.values())if(e.connectionEpoch===o)for(let[t,r]of v(e.snapshot.result?.sessions??[],e.snapshot.agentId,n))l(t,r);for(let e of c){let t=p(e),r=t&&(!n||n.has(t.sessionId))&&i(t,e.target.agentId);t&&r&&l(r,t)}return{state:r,primaryRows:a,observedRows:s}},{indexRows:v,merge:y,prepareProjection:b,projectFields:x,heldRowsFor:S,currentRow:C}=f_(n,_),w=(e,t,r)=>n.observeReadRow(e,t,r,S(e,r)),T=(e,t,r)=>{if(e.length===0)return[];let i=_();return e.map(e=>({row:e,select:n.observeReadRow(e,t,r,S(e,r,i))}))},ee=(n,r,o,d=!1,_=[],v)=>{if(!n||!e.connection.isCurrent(n))return{changed:!1,notify:()=>{}};let y=[...c],b=[],x=[];for(let[i,a]of t){if(a.connectionEpoch!==n.epoch)continue;let t=a.snapshot,o=e.decorate(r(a),a);o!==a.snapshot.result&&b.push({key:i,entry:a,previous:t,snapshot:{...t,result:o}})}for(let e of y){let t=g(e,_);if(t){x.push(t);continue}if(!u(e))continue;let n=e.snapshot,r=p(e),c=o?.({target:e.target,row:r})??{row:r},l=c.row&&(r!==null||d)&&(c.row===r||(d?h(e,c.row,c.observationRevision??s(c.row),!0):m(e,c.row)))?c.row:d&&c.row?r:null,y=l?e.decorate(l):null,b=l&&y&&f(y,e.target)&&i(y,e.target.agentId)===i(l,e.target.agentId)?a(y,l):null,S=!n.row||e.onInvalidate?Math.max(n.invalidatedRevision,c.invalidateRevision??0):n.invalidatedRevision,C=n.hasObserved||l!==null||!!c.eventResult?.deletedKey,w=n;(l!==n.row||b!==n.visible||C!==n.hasObserved||S!==n.invalidatedRevision)&&(w={row:b??l,visible:b,hasObserved:C,invalidatedRevision:S,sessionId:n.sessionId??l?.sessionId??null,retired:!!c.eventResult?.deletedKey},x.push({entry:e,previous:n,snapshot:w})),e.onEvent&&c.eventResult&&(!c.eventResult.admittedRow||m(e,c.eventResult.admittedRow))&&v?.results.set(e,{snapshot:w,result:{...c.eventResult,row:b??void 0}})}if(!e.connection.isCurrent(n))return{changed:!1,notify:()=>{}};let S=!1;for(let e of b)t.get(e.key)===e.entry&&e.entry.snapshot===e.previous&&(e.entry.snapshot=e.snapshot,S=!0);for(let e of x)l(e.entry)&&(e.snapshot.retired||u(e.entry))&&e.entry.snapshot===e.previous&&(e.entry.snapshot=e.snapshot,S=!0);return{changed:S,notify:(r=[],i)=>{if(e.connection.isCurrent(n)){for(let e of y){let t=g(e,r);t&&(e.snapshot=t.snapshot,x.push(t))}for(let{key:r,entry:i,snapshot:a}of b)for(let o of i.listeners){if(!e.connection.isCurrent(n))return;if(t.get(r)!==i||i.snapshot!==a)break;o(a)}for(let{entry:t,previous:r,snapshot:a}of x){if(!e.connection.isCurrent(n))return;l(t)&&(a.retired||u(t))&&t.snapshot===a&&(a.retired&&t.onEvent&&v?.captures(t)?t.listener(a.visible,{eventPending:!0}):t.listener(a.visible),u(t)&&t.snapshot===a&&a.invalidatedRevision>r.invalidatedRevision&&t.onInvalidate?.(i))}}}}},E=(e,t,n,a,c=!0)=>{let l=v(e,n),u=new WeakMap(e.map(e=>[e,a??s(e)])),{projectFields:d}=b();return ee(t,t=>y(t.snapshot.result,c?e:[],t.snapshot.agentId,n),e=>{let t=e.row?i(e.row,e.target.agentId):null,a=t?l.get(t):[...l.values()].find(t=>r(t,n)===F(e.target.agentId)&&f(t,e.target));return{row:a?e.row?o(e.row,d(a,n),e.target.agentId):d(a,n):e.row,...!e.row&&a?{observationRevision:u.get(a)??0}:{}}},!0,e.map(e=>({row:e,revision:a??s(e)}))).notify},D=c_({connection:e.connection,canReuse:()=>e.observerError()===null,currentRow:e=>{let t=O.publishedRow((t,i)=>{let a=X(e.key)?.agentId??e.agentId;return Z(t.key,e.key)&&(!a||r(t,i)===F(a))&&n.hasObservation(t)});return t?x(t,e.agentId):void 0}}),O={descriptions:D,reset(){n.reset(),c.clear(),D.clear()},registerRow(t,r,i){let a={target:Object.freeze({...t}),scope:e.connection.capture(),listener:r,...i,snapshot:{row:null,visible:null,hasObserved:!1,sessionId:null,invalidatedRevision:0,retired:!1}};return c.add(a),{current:()=>p(a)?a.snapshot.visible:null,sessionId:()=>a.snapshot.sessionId,hasObserved:()=>a.snapshot.hasObserved,isCurrent:()=>u(a),readInvalidated:e=>e<=a.snapshot.invalidatedRevision,acceptsRead:(e,t)=>h(a,e,t),clear:e=>{let t=p(a);if(!u(a)||t&&n.hasNewerFacts(t,e))return()=>{};let r={...a.snapshot,row:null,visible:null,hasObserved:!0,invalidatedRevision:Math.max(a.snapshot.invalidatedRevision,e)};return a.snapshot=r,()=>{u(a)&&a.snapshot===r&&a.listener(null)}},dispose:()=>{c.delete(a)}}},inheritRow:a,mergeRow:o,currentRow:C,mergeRows:y,publishedRow(n){let r=e.readState(),i=r.result?.sessions.find(e=>n(e,r.agentId));if(i)return i;for(let e of t.values()){let t=e.snapshot.result?.sessions.find(t=>n(t,e.scope.agentId));if(t)return t}for(let e of c){let t=p(e);if(t&&n(t,e.target.agentId))return t}},projectFields:x,prepareProjection:b,projectRows:e=>e.length===0?[]:b(e).projectRows(e),stageObservedRows:E,stageManagedResults:ee,captureEventDelivery:d,rowRevision:s,hasLiveObservation:t=>e.connection.capture()!==null&&n.hasObservation(t),isCurrentRow:(e,t,r)=>{let i=S(e,r),a=t??s(e);return!i.some(e=>s(e)>a)&&(t===void 0||i.some(n.hasObservation)||![...c].some(t=>m(t,e)&&!h(t,e,a,!0)))},bindOwner:(e,t)=>{for(let r of e?.sessions??[])n.bindOwner(r,t)},observeReadRows:T,observeFields:n.observeFields,fieldNames:n.fieldNames,fieldObservation:n.fieldObservation,stageRunTerminal:g_({readState:e.readState,prepareProjection:b,provenance:n,stage:ee}),copyRow:(e,t)=>a({...e,...t},e),captureReconciliation(t){let n=e.connection.capture();return{scope:n,revision:t,observe:(e,n)=>w(e,t,n),isCurrent:(r,i)=>n!==null&&e.connection.isCurrent(n)&&(!r||O.isCurrentRow(r,Math.max(t,s(r)),i)),stage:(e,r)=>E([e],n,r,t)}},accept(n,r,i,a,o=a,s=e.readState().agentId){let l=v(n?.sessions??[],a),u=y(y(n,r?.sessions??[],a,o),i?.sessions??[],a,s),d=e.connection.capture()?.epoch;for(let e of t.values())e.connectionEpoch===d&&(u=y(u,e.snapshot.result?.sessions??[],a,e.snapshot.agentId));for(let e of c){let t=p(e);t&&(u=y(u,[t],a,e.target.agentId,l))}return $m(u,O.projectRows(u?.sessions??[]))},inherit(e,t,n,r){let o=v(t?.sessions??[],r),s=v(n?.sessions??[],r);for(let t of e?.sessions??[]){let e=i(t,r);e&&a(t,o.get(e),s.get(e))}}};return O}function y_(){return(y_=e((()=>{sh(),u_(),Q(),p_(),Bh(),__()})))()}function b_(e){let t=qg(e.snapshot()),n=0,r=0,i=null,a=null,o={},s={scope:{}},c=`none`,l=typeof document<`u`&&typeof globalThis.addEventListener==`function`,u=!l||document.visibilityState!==`hidden`,d=new Map,f=v_(e,d),p=()=>{f.reset(),r+=1,i=null,a?.completions.forEach(({complete:e})=>e(null)),a=null},m=e=>{let t=qc(e),n=JSON.stringify(t),r=d.get(n);if(r)return r;let i={key:n,query:t,scope:Object.freeze({...e}),retainedLimit:t.limit,connectionEpoch:null,snapshot:{result:null,agentId:null,loading:!1,error:null},listeners:new Set,coordinator:Xg({active:!1,refresh:e=>y(i,{append:!1,invalidated:!0,background:!0},e)}),pending:null,queued:null};return d.set(n,i),i},h=n_(d,m,e.onWarmListsRetired),g=(e=()=>!0)=>h.invalidate(e,o),_=(e,t)=>{h.retire(n=>n.key!==t&&e(n));for(let n of d.values())n.key!==t&&e(n)&&n.coordinator.schedule()},v=(e,t,n)=>{let r=Jh({agentId:e,session:t}),i=n&&JSON.stringify(qc(n));_(e=>r(e.query,e.snapshot.result),i)},y=e_(e,{managedLists:d,observations:f,nextRevision:()=>++n,isPageActive:()=>u,publishPrimary:t=>e.publish({...e.readState(),result:e.decorate(t,s)})}),b=i_(e,()=>++n,f,()=>s),x=async(t,i=!1,a)=>{let l=e.connection.capture();if(!l)return null;let u=r,d=h.revision,p=()=>e.connection.isCurrent(l)&&u===r,{append:m=!1,force:g,backgroundHydrate:_=!1,...v}=t,y={...v};if(delete y.offset,_?(i||c===`none`)&&(o=y,c=`seeded`):(o=y,c=`foreground`),!_){let t=e.observerError();e.publish({...e.readState(),loading:!0,error:t,deletedSessions:[]},t?`session-observer`:void 0)}try{let r=++n,i=await Jc(l.client,v);if(!p())return null;i=e.reconcileList(i,r,v.agentId);let a=e.readState(),c=!a.resultCached&&m&&typeof v.offset==`number`,u=a.resultCached?null:a.result,g=nh(i,u);f.inherit(g,i,u,v.agentId);let b=f.accept(g,a.result,null,v.agentId,a.agentId),x=b&&c&&u?th(u,b):b;m&&x&&!_&&(o=rg(y,v.offset,i,x,e.snapshot())),x&&=rh(x,{agentId:a.agentId,result:a.resultCached?{sessions:a.result?.sessions.filter(f.hasLiveObservation)??[]}:a.result},e.snapshot(),_),$h(s.scope,y,c)||(s={scope:y}),s.scope=m?o:y,x=e.decorate(x,s);let S=f.stageObservedRows(i?.sessions??[],l,v.agentId,r,!1);e.onCanonicalList(x,r,v.agentId,i),x&&v.agentId&&d===h.revision&&Qh(s.scope)&&h.capture(s.scope,x,l.epoch);let C=e.readState(),w=e.observerError();return e.publish({...C,result:x,resultCached:!1,agentId:v.agentId?.trim()?F(v.agentId):null,loading:_?C.loading:!1,error:w,deletedSessions:[]},w?`session-observer`:void 0),S(),{options:t,matchesRequestedQuery:!0,result:i,outcome:{status:`refreshed`}}}catch(n){let r=J(n),i=a?.()!==!1;if(p()){let t=e.readState();e.publish({...t,loading:_?t.loading:!1,error:i?r:t.error,deletedSessions:[]},i?`operation`:void 0)}return p()&&i?{options:t,matchesRequestedQuery:!0,result:null,outcome:{status:`failed`,error:r}}:null}},S=(t,n=!1,r)=>{let o=e.connection.capture();if(!o)return Promise.resolve(null);let s=!Kh(t)&&typeof a?.intent==`function`?null:a;s&&(a=null);let c=e.snapshot(),l=eg(t,c),u=mt(),d=null,f=u.promise.finally(()=>{if(i!==f)return;i=null;let t=a;t&&(s?.completions.some(({reconcile:e})=>e)&&(d=tg(t,l)),t.intent!==`explicit`&&!t.foreground?e.background(t,C):C())});return i=f,u.resolve(x(l,n,r)),s&&ng(s,f,f.then(t=>t??(e.connection.isCurrent(o)?d:null)),c),f},C=()=>{let t=a;if(i||!t)return Promise.resolve(null);let n=typeof t.intent==`function`?k(t.intent()):t.options;n.append||E.absorb();let r=e.snapshot(),o=$h(eg(t.errorOwner.options,r),eg(n,r),!1);return S(n,t.bootstrap,o?t.errorOwner.isCurrent:void 0)},w=(t,n,o,s=`explicit`,c=!1)=>{if(!e.connection.capture())return Promise.resolve(null);let l=Kh(t);if(i||s!==`explicit`){let u=mt();return a=Zh(a,{options:t,errorOwner:{options:t,isCurrent:o},intent:s,foreground:c,bootstrap:n,completions:[{options:t,reconcile:s===`reconcile`,complete:u.resolve}]},e.snapshot()),l&&Kh(a.options)&&(r+=1),i||(a.foreground?C():e.background(a,C)),u.promise}let u=Object.entries(t).some(([e,t])=>e!==`force`&&e!==`backgroundHydrate`&&t!==void 0);return e.readState().result&&!t.force&&!u?Promise.resolve({options:t,matchesRequestedQuery:!0,result:e.readState().result,outcome:{status:`refreshed`}}):(l&&(r+=1),t.append!==!0&&E.absorb(),S(t,n,o))},T=(e={})=>w(e,!1).then(()=>void 0),ee=async t=>{let n=e.connection.capture();for(let e=i;e&&t();e=i)await e;if(n&&e.connection.isCurrent(n)&&t()){if(!u){E.setActive(!1,!0);return}a||await S({...o,force:!0})}},E=Xg({active:u,refresh:t=>e.background(E,()=>ee(t))}),D=e=>{let t=e.type===`pagehide`;u=!t&&document.visibilityState!==`hidden`,E.setActive(u,t||i!==null);for(let e of d.values())e.listeners.size>0&&e.coordinator.setActive(u,t||e.pending!==null)},O=e=>{let t=e?`addEventListener`:`removeEventListener`;document[t](`visibilitychange`,D),globalThis[t](`pagehide`,D),globalThis[t](`pageshow`,D)};l&&O(!0);let k=e=>({...o,...e?.trim()?{agentId:e.trim()}:{},force:!0}),A=o_(e,{foreground:()=>({agentId:o.agentId,initial:c===`none`}),replacementOptions:k,invalidate:v,refresh:(e,t)=>w(e,!1,t,`reconcile`),read:b.reconcile});return{observeGateway(e,n){let r=qg(e);r&&!t&&!n&&v(),t=r},captureReconciliation:()=>f.captureReconciliation(++n),observations:f,captureEvent(t){let r=e.connection.capture(),i=++n,a=Jh(t),s=new Set;for(let e of d.values())a(e.query,e.snapshot.result)&&(e.pending!==null||e.snapshot.error!==null||!Gh(e.snapshot.result,t,e.scope))&&s.add(e);return{revision:i,scope:r,lists:s,affectsPrimary:a({agentId:o.agentId}),...f.captureEventDelivery(r,i)}},primaryList:()=>s,get requestRevision(){return n},list:b.list,listSnapshot(t){if(Qh(t)){let{result:t,agentId:n,loading:r,error:i}=e.readState();return{result:t,agentId:n,loading:r,error:i}}return d.get(JSON.stringify(qc(t)))?.snapshot??{result:null,agentId:null,loading:!1,error:null}},subscribeList(e,t){return h.subscribe(m(e),t,u)},observeList:(t,n)=>{let r=m(t);return h.observe(r,n,u,e.connection,()=>y(r,{append:!1,invalidated:!0}))},refreshList(e={}){return Qh(e)?T(e):y(m(e),{append:e.append===!0,...e.force===!0&&e.append!==!0?{invalidated:!0}:{},...e.offset===void 0?{}:{offset:e.offset}})},isPrimaryList:Qh,async refreshManagedLists(){let t=e.connection.capture();t&&await Promise.all([...d.values()].filter(e=>e.listeners.size>0&&e.connectionEpoch!==t.epoch).map(e=>y(e,{append:!1,background:!0})))},refresh:T,bootstrap:e=>w(e,!0,void 0,`automatic`),refreshAutomatic:e=>w(e,!1,void 0,`automatic`),refreshReplacement:()=>w(k(),!1,void 0,`automatic`).then(e=>e?.matchesRequestedQuery?e.result:null),refreshSelection:(e,t=!1)=>(t&&(r+=1,i=null),w(k(e()),!1,void 0,e,t)),reconcileMutation:A,redecorateLists(){let t=e.readState(),n=e.decorate(t.result,s),r=f.stageManagedResults(e.connection.capture(),e=>e.snapshot.result);n!==t.result&&e.publish({...t,result:n});for(let t of d.values()){let n=e.decorate(t.snapshot.result,t);n!==t.snapshot.result&&$g(t,{...t.snapshot,result:n})}r.notify()},lastOptions:()=>o,retireWarmLists:g,selectionPresentation(t){let n=e.connection.capture();return n&&!e.observerError()&&t?h.presentation(k(t),n.epoch):null},canApplyPrimarySnapshot(t){let n=!i&&e.readState();return n&&n.error===null&&!n.resultCached&&Gh(n.result,t,o)},invalidateManagedLists:v,scheduleEvent(e={}){let t=qh(e.agentId),n=e.affectedLists;h.invalidate(e=>n?.has(e)??t(e.query.agentId),o),!e.primarySnapshotApplied&&(e.affectsPrimary??t(o.agentId))&&E.schedule(),n?_(e=>n.has(e)):v(e.agentId)},reset(){p(),s={scope:s.scope},E.reset();for(let e of d.values()){if(e.coordinator.reset(),e.pending=e.queued=null,e.listeners.size===0){e.coordinator.dispose(),d.delete(e.key);continue}(e.snapshot.loading||e.snapshot.error)&&$g(e,{...e.snapshot,loading:!1,error:null})}},dispose(){p(),E.dispose(),l&&O(!1);for(let e of d.values())e.coordinator.dispose(),e.listeners.clear();d.clear()}}}function x_(){return(x_=e((()=>{je(),Y(),Yg(),Qg(),sh(),Q(),ag(),t_(),r_(),ll(),a_(),s_(),y_()})))()}async function S_(e,t){let n=await e.request(`sessions.recover`,t);if(!n?.key?.trim()||!n?.sessionId?.trim())throw Error(`sessions.recover returned no successor identity`);return n}function C_(e){let t=new Set,n,r,i=!1,a=()=>r??=V(()=>import(`./session-message-subscriptions.runtime-DGVEZVG1.js`).then(e=>n=e,e=>{throw r=void 0,e}),__vite__mapDeps([211,7,3,2,4,5,10,6,8,9]),import.meta.url),o=async t=>{let n=e.connection.capture();if(!n)return null;try{let r=await S_(n.client,t);return e.connection.isCurrent(n)?(e.notifyCreated(r.key),await e.reconcileMutation(t.agentId),e.connection.isCurrent(n)?r:null):null}catch(t){return e.connection.isCurrent(n)&&e.reportError(t),null}},s=async(t,n={})=>{let r=e.connection.capture();if(!r)throw Error(`Session compaction requires an active Gateway connection`);let i=await el(r.client,t,n);if(!e.connection.isCurrent(r))throw Error(`Session compaction completed on a replaced Gateway connection`);return i},c=async t=>{let n=e.connection.capture();if(!n)return null;let r=await t(n.client);return e.connection.isCurrent(n)?r:null},l=(e,t={})=>c(n=>tl(n,e,t)),u=(e,t,n={})=>c(r=>nl(r,e,t,n)),d=(e,t,n,r)=>c(i=>rl(i,e,t,n,r)),f=async e=>{await(n??await a()).releaseGatewaySessionMessageSubscription(e),t.delete(e)},p=async(r,o={})=>{let s=e.connection.capture();if(!s||i)throw Error(`Session message subscription requires an active Gateway connection`);let c=r.trim(),l=o.agentId?.trim()?F(o.agentId):null,{mode:u,includeApprovals:d}=o,p=n??await a();if(i||!e.connection.isCurrent(s))throw Error(`Session message subscription completed on a replaced Gateway connection`);let m=await p.getGatewaySessionMessageSubscriptionCoordinator(s.client,{keysEquivalent:Z}).acquire(c,{agentId:l,...d?{includeApprovals:!0}:{},...u?{mode:u}:{}}).catch(t=>{throw t instanceof AggregateError&&t.errors[0]instanceof xe&&t.errors[0].requestSent&&!i&&e.connection.isCurrent(s)&&!w_.has(t)&&(w_.add(t),s.client.forceReconnect(`session subscription recovery failed`)),t});if(t.add(m),i||!e.connection.isCurrent(s))throw await f(m).catch(()=>void 0),Error(`Session message subscription completed on a replaced Gateway connection`);return m},m=async(t,n,r)=>{let i=e.connection.capture();if(!i)throw Error(t);let a=await n(i.client);return e.connection.isCurrent(i)&&await e.reconcileMutation(r).catch(()=>{}),a};return{compact:s,forkAtMessage:(e,t,n={})=>m(`Session fork requires an active Gateway connection`,r=>al(r,e,t,n),n.agentId),getFile:u,listBranches:async(e,t={})=>await c(n=>ol(n,e,t))??[],listFiles:l,recover:o,rewind:(e,t,n={})=>m(`Session rewind requires an active Gateway connection`,r=>il(r,e,t,n),n.agentId),setFile:d,subscribeMessages:p,switchBranch:(e,t,n={})=>m(`Session branch switch requires an active Gateway connection`,r=>sl(r,e,t,n),n.agentId),unsubscribeMessages:f,retireConnection:e=>{e&&n?.resetGatewaySessionMessageSubscriptionCoordinator(e),t.clear()},dispose:()=>{i=!0;for(let e of t)f(e).catch(()=>void 0)}}}var w_;function T_(){return(T_=e((()=>{C(),Q(),ll(),s(),w_=new WeakSet})))()}function E_(e,t){let n=new Map,r=new Map,i=(t,n)=>{let r=X(t)?.agentId??n??Xi(e.snapshot);return`${Gi(t)}\0agent:${F(r)}`};return{get:(e,t)=>{let a=i(e,t);return r.has(a)?void 0:n.get(a)?.[0]},clear:(e,t)=>{let a=i(e,t);return r.delete(a),n.delete(a)},suspend:(e,t)=>{let a=i(e,t);if(!n.has(a))return;let o=Symbol(`session-thinking-claim-suspension`),s=r.get(a)??new Set;return s.add(o),r.set(a,s),()=>{let e=r.get(a);e?.delete(o)&&e.size===0&&r.delete(a)}},reset:()=>{n.clear(),r.clear()},recordCreated(e,r,a){typeof r?.thinkingLevel==`string`&&typeof r.updatedAt==`number`&&n.set(i(e,a),[r.thinkingLevel,r.updatedAt,t()])},settle(e,t,r){let a=i(e.key,r),o=n.get(a),s=o?.[1]===void 0?o!==void 0&&t>o[2]:(e.updatedAt??-1)>o[1]||e.updatedAt===o[1]&&t>o[2];o&&(e.thinkingLevel===o[0]||s)&&n.delete(a)},observeEvent(e,r){let a=!1;if(e.applied&&e.key&&r){let o=i(e.key,r.agentId),s=n.get(o),c=r.thinkingLevel,l=r.updatedAt===null||s?.[1]===void 0||r.updatedAt>=s[1],u=e.deletedKey||r.archived===!0&&!e.row;if(s&&l&&u)a=n.delete(o);else if(s&&l&&!e.row&&typeof c==`string`){let e=[c,r.updatedAt??void 0,t()];a=s[0]!==e[0]||s[1]!==e[1]||s[2]!==e[2],a&&n.set(o,e)}else s&&l&&c!==void 0&&(a=n.delete(o))}return a}}}function D_(){return(D_=e((()=>{Q()})))()}function O_(e,t,n,r){e.delete(t),e.set(t,n),Se(e,r)}var k_,A_,j_;function M_(){return(M_=e((()=>{sh(),k_=1e4,A_=1e5,j_=class{constructor(){this.currentPhaseByGroup=new Map,this.phaseRankByGroupPhase=new Map,this.nextPhaseRank=0,this.latestLogByGroup=new Map,this.phaseByChild=new Map}clear(){this.currentPhaseByGroup.clear(),this.phaseRankByGroupPhase.clear(),this.nextPhaseRank=0,this.latestLogByGroup.clear(),this.phaseByChild.clear()}observe(e){let t=I(e);if(!t)return!1;let n=I(t.session)??t,r=z(t.swarmGroupId)??z(n.swarmGroupId);if(!r)return!1;let i=z(t.kind),a=z(t.text);if((i===`phase`||i===`log`)&&a){if(i===`phase`){let e=`${r}\u0000${a}`;this.phaseRankByGroupPhase.has(e)||(O_(this.phaseRankByGroupPhase,e,this.nextPhaseRank,A_),this.nextPhaseRank+=1)}return O_(i===`phase`?this.currentPhaseByGroup:this.latestLogByGroup,r,a,k_),!0}let o=z(n.key)??z(t.sessionKey);if(!o)return!0;let s=z(n.swarmPhase)??z(t.swarmPhase);if(s)return O_(this.phaseByChild,o,s,A_),!0;if(z(t.reason)===`create`&&!this.phaseByChild.has(o)){let e=this.currentPhaseByGroup.get(r);e&&O_(this.phaseByChild,o,e,A_)}return!0}decorate(e){return e&&$m(e,e.sessions.map(e=>{let t=this.phaseByChild.get(e.key)??e.swarmPhase,n=e.swarmGroupId?.trim(),r=(n?this.latestLogByGroup.get(n):void 0)??e.swarmLog,i=(t&&n?this.phaseRankByGroupPhase.get(`${n}\u0000${t}`):void 0)??e.swarmPhaseRank;return t===e.swarmPhase&&r===e.swarmLog&&i===e.swarmPhaseRank?e:{...e,...t?{swarmPhase:t}:{},...i===void 0?{}:{swarmPhaseRank:i},...r?{swarmLog:r}:{}}}))}}})))()}function N_(e,t,n={}){let r={result:null,agentId:null,modelOverrides:{},loading:!1,error:null,deletedSessions:[],groups:n.bootRecord?.groups.map(e=>e.name)??[],groupSettings:n.bootRecord?.groups??[],sectionOrder:n.bootRecord?.sectionOrder??[]},i={result:null,agentId:null},a=null,o=e.snapshot.phase===`connected`?e.snapshot.selfUser?.id.trim()??null:n.bootRecord?.profileId,s=()=>{(i.result||r.result||a!==null)&&(a=v+1),i={result:null,agentId:null}},c=Wg(e,t,n,{readState:()=>r,publish:e=>{k.retireWarmLists(),s(),e.resultCached&&(i={result:e.result,agentId:e.agentId,resultCached:!0}),T(e)},connected:()=>l.capture()!==null,query:()=>k.lastOptions()}),l=Yu(e.snapshot),u=async(t,r)=>{let i=l.capture(),a=async()=>{i&&l.isCurrent(i)&&e.snapshot.client===i.client&&await r()};await(n.connectionBootstrap?.run(t,a,{background:!0})??a())},d=dh({connection:l,snapshot:()=>e.snapshot,deletionState:e=>N.deletionState(e.key,e.agentId,e.sessionId)}),f=new j_,p=new Map,m=new Map,h=new Set,g=new Set,_=E_(e,()=>k.requestRevision),v=0,y=null,b=null,x=e.snapshot.client,S=null,C=null,w=()=>{for(let e of h)e(r)},T=(e,t)=>{e.error===null?C=null:(t||e.error!==r.error)&&(C=t??`operation`),k.observations.bindOwner(e.result,e.agentId),r=e,(a===null||v>=a)&&(i={result:e.result,agentId:e.agentId,resultCached:e.resultCached},e.resultCached||(a=null)),d.observeRows(e.result?.sessions??[],e.agentId),c.persist(e),w()},ee=e=>{let t=e.trim();m.delete(t),p.delete(t)},E=(e,t=k.primaryList())=>{let n=O.apply(e,k.observations.rowRevision,t.scope.agentId),r=f.decorate(n);k.observations.inherit(r,n);let i=N.apply(M.applyPendingRows(M.applyConfirmedArchives(r),t.scope.agentId),t);return k.observations.inherit(i,e),i},D=fm({isCurrent:l.isCurrent,retryDelayMs:Ag,onError:(e,t)=>{if(!l.isCurrent(e))return;let n=S;S=t,t!==null&&(k.retireWarmLists(),k.observations.descriptions.clear());let i=C===`session-observer`;t!==null&&(r.error===null||i)?T({...r,error:t},`session-observer`):t===null&&i&&T({...r,error:null}),n!==null&&t===null&&(d.invalidate(),k.refreshAutomatic({...k.lastOptions(),backgroundHydrate:!0,force:!0}),k.invalidateManagedLists())}}),O=Eg(e,()=>k),k=b_({background:u,connection:l,snapshot:()=>e.snapshot,readState:()=>r,publish:T,onWarmListsRetired:e=>{let n=t.state.selectedId;!i.result&&n&&e.has(F(n))&&w()},observerError:()=>S,decorate:E,reconcileList:(e,t,n)=>{let r=N.reconcileList(e&&{...e,sessions:e.sessions.map(Pm)},t,n),i=k.observations.observeReadRows(r?.sessions??[],t,n),a=O.reconcileList(r,t,n);return k.observations.inherit(a,r),a&&(k.observations.projectRows(a.sessions).forEach((e,t)=>{let r=i[t];r&&M.observePendingFields(r.row,r.select(e,bg),n)}),a)},onCanonicalList(e,t,n,r){d.observeRows(r?.sessions??e?.sessions??[],n),M.settlePrepared(e);for(let e of r?.sessions??[])_.settle(e,t,n);v+=1}}),A=Eh({connection:l,snapshot:()=>e.snapshot,readState:()=>r,publish:T,refreshRows:()=>k.refresh({...k.lastOptions(),force:!0}),retryDelayMs:Ag}),j=(e,t,n)=>{k.retireWarmLists(),_.recordCreated(e,t,n);for(let t of g)t(e)},te=(e,t)=>{k.retireWarmLists(),k.observations.descriptions.clear(),T(e,t)},M=wg({connection:l,snapshot:()=>e.snapshot,findRow:e=>{let t=k.observations.publishedRow(e);return t?k.observations.projectFields(t):void 0},readState:()=>r,publish:te,copyRow:k.observations.copyRow,stageManagedResults:k.observations.stageManagedResults,reconcileMutation:k.reconcileMutation,publishedRow:e=>k.observations.publishedRow(t=>t.key===e),archiveFields:k.observations,readRevision:()=>k.requestRevision,redecorateLists:k.redecorateLists,notifyPendingChange:w,notifyCreated:j,clearThink:_.clear,suspendThink:_.suspend,claimPermissionProjection:O.claim,capturePatchFields:e=>le(e),retirePullRequestSummary:ee}),N=um({connection:l,snapshot:()=>e.snapshot,requestRevision:()=>k.requestRevision,readState:()=>r,publish:te,publishedRow:k.observations.publishedRow,redecorateLists:k.redecorateLists,invalidateLists:k.scheduleEvent,reconcileMutation:k.reconcileMutation,reconcilePreviousConnection:M.reconcileConfirmedPreviousConnection,retire:M.retireDeletedSession}),{dispose:ne,retireConnection:P,...re}=C_({connection:l,reconcileMutation:k.reconcileMutation,notifyCreated:j,reportError:e=>T({...r,error:J(e)},`operation`)}),ie=e=>p.get(e.trim()),ae=e=>{let t={};return m.set(e.trim(),t),t},oe=(e,t,n)=>{let i=e.trim();!i||n!==void 0&&m.get(i)!==n||p.get(i)!==t&&(t?p.set(i,t):p.delete(i),T({...r}))},{reconcile:se,captureReconcile:ce,capturePatchFields:le,reconcileChangedEvent:ue,observeRow:de}=Og({readState:()=>r,publish:T,canonicalListRevision:()=>v,connection:l,snapshot:()=>e.snapshot,permissions:O,mutations:M,thinkingClaims:_,decorate:E,deletions:N,githubPublication:d,roster:k}),fe=e=>{let t=C===`operation`,n=t?r.error:S;T({...e,error:n},n===null?void 0:t?`operation`:`session-observer`)},pe=e=>{let t=k.captureReconciliation();if(t.scope&&!l.isCurrent(t.scope))return!1;for(let t of e.sessionKeys)t.trim()&&k.invalidateManagedLists(X(t)?.agentId??e.agentId,{key:t});let n=r.result,{result:i,changed:a,notify:o}=k.observations.stageRunTerminal(e,t);return i!==n&&fe({...r,result:i}),o(),a},I=e.subscribe(e=>{let n=x,u=e.phase===`connected`,h=e.selfUser?.id.trim()||null,g=l.transition(e);if(u?(o!==void 0&&o!==h&&(k.retireWarmLists(),s(),w()),o=h):e.client?i.result&&a===null&&(a=v+1):s(),k.observeGateway(e,g),c.synchronize(e),x=e.client,d.observeRows([]),g){n!==e.client&&N.clear();let t=p.size>0;_.reset(),O.clear(),k.reset(),D.reset(),S=null,P(n),A.invalidate(),f.clear(),M.retireConnection(),p.clear(),m.clear(),t&&u&&e.client&&T({...r})}if(!u||!e.client){y=null,b=null,T({...r,result:r.resultCached?r.result:null,agentId:r.resultCached?r.agentId:null,loading:!1,error:null,deletedSessions:[]});return}let C=y!==e.client;if(C||b!==h){let e=l.capture();if(!e)return;if(y=e.client,b=h,!C){k.scheduleEvent();return}D.ensure(e),k.bootstrap({...k.lastOptions(),agentId:t.state.selectedId??void 0,includeDerivedTitles:!0,includeLastMessage:!0,backgroundHydrate:!0,force:!0}).then(()=>{l.isCurrent(e)&&k.refreshManagedLists()}).catch(()=>void 0)}}),me=lm(t,(n,r)=>{s(),w(),n&&y===e.snapshot.client&&k.refreshSelection(()=>t.state.selectedId,r)}),he=e.subscribeEvents(e=>{if((e.event===`config.changed`||e.event===`chat.metadata.changed`)&&k.observations.descriptions.clear(),e.event===`config.changed`){k.scheduleEvent();return}if(e.event!==`sessions.changed`&&e.event!==`session.message`)return;k.observations.descriptions.invalidateEvent(e.payload);let t=e.payload;if(e.event===`sessions.changed`&&t?.reason===`activity-summary`){k.captureEvent(e.payload).deliver(e);return}let n=k.canApplyPrimarySnapshot(e.payload),i=k.captureEvent(e.payload),a=f.observe(e.payload),{eventInfo:o,reconciled:s,claimChanged:c,notifyManaged:d,notifyEvent:p}=ue(e.payload,i,{resultAgentId:r.agentId,archivedFilter:k.lastOptions().archivedFilter});if(i.scope&&!l.isCurrent(i.scope))return;let m=s.hasActiveRun??o?.hasActiveRun,h=s.status??o?.status,g=m===!1||h!=null&&h!==`running`,_=e.event===`session.message`&&g,v=s.applied&&n,y=!1;if(c||a||o?.archived!==null&&!_||!_&&s.applied&&(s.result!==r.result||s.deletedKey)||v){let e=E(s.result);(c||e!==r.result)&&(fe({...r,result:e}),y=!0)}if(d?.(y),i.scope&&!l.isCurrent(i.scope))return;let b=t?.reason,x=t?.agentId;if(b===`groups`&&(A.invalidate(),u(A.load,()=>A.load())),e.event===`session.message`&&!g){p?.(e);return}k.scheduleEvent({agentId:o?.agentId??X(o?.key)?.agentId??(typeof x==`string`?x:void 0),primarySnapshotApplied:v,affectsPrimary:i.affectsPrimary,affectedLists:i.lists}),p?.(e)});return{get state(){return r},get presentation(){return i.result?i:k.selectionPresentation(t.state.selectedId)??i},get canonicalListRevision(){return v},githubPublication:d,whenCachedRosterSettled:()=>c.settled,captureConnectionScope:l.capture,isConnectionScopeCurrent:l.isCurrent,describe:k.observations.descriptions.describe,list:k.list,observeList:k.observeList,listSnapshot:k.listSnapshot,subscribeList(e,t){if(!k.isPrimaryList(e))return k.subscribeList(e,t);let n=()=>t(k.listSnapshot(e));return h.add(n),()=>h.delete(n)},refreshList:k.refreshList,reconcile:se,captureReconcile:ce,observeRow:de,inheritRow:k.observations.inheritRow,projectRows:k.observations.projectRows,reconcileRunTerminal:pe,refresh:k.refresh,invalidate:k.scheduleEvent,refreshReplacement:k.refreshReplacement,reconcileMutation:k.reconcileMutation,capturePermissionObservation:O.capture,createResult:M.createResult,create:M.create,...re,patch:M.patch,patchMany:M.patchMany,archiveVisibility:M.archiveVisibility,beginArchive:M.beginArchive,assignOwner:M.assignOwner,retireModelOverride:M.retireModelOverride,think:_.get,settingsPreview:M.settingsPreview,patchRowLocal:M.patchRowLocal,isPreparedWorkSession:M.isPreparedWorkSession,pullRequestSummary:ie,capturePullRequestEpoch:ae,setPullRequestSummary:oe,delete:N.delete,deleteMany:N.deleteMany,deletionState:N.deletionState,reset:M.reset,groupsLoad:A.load,groupsGeneration:A.generation,groupsStatus:A.status,groupsInvalidate:A.invalidate,groupsPut:A.put,groupsRename:A.rename,groupsUpdate:A.update,groupsDelete:A.delete,subscribeCreated(e){return g.add(e),()=>g.delete(e)},subscribe(e){return h.add(e),()=>h.delete(e)},dispose(){s(),c.dispose(),d.clear(),k.dispose(),ne(),l.dispose(),A.dispose(),y=null,b=null,M.dispose(),O.clear(),N.clear(),f.clear(),p.clear(),m.clear(),D.dispose(),I(),me(),he(),g.clear(),h.clear()}}}function P_(){return(P_=e((()=>{Y(),dm(),pm(),ph(),Ah(),Q(),Tg(),xg(),Dg(),kg(),Pg(),Gg(),x_(),Qm(),T_(),D_(),M_(),ll(),__(),Dm()})))()}function F_(){try{let e=tr()?.getItem(L_);return e===`card`||e===`off`?e:`pill`}catch{return`pill`}}function I_(e){try{tr()?.setItem(L_,e)}catch{}}var L_;function R_(){return(R_=e((()=>{L_=`openclaw.chat.observerHud.display`})))()}function z_(e,t){return e.request(`sessions.observer.visibility`,{visible:t})}function B_(){return(B_=e((()=>{})))()}function V_(e,t,n){return!new URLSearchParams(e.search+`&`+e.hash.slice(1)).has(`session`)&&!wn(e.pathname,t)&&(n(e.pathname,t)===null||/^\/chat(?:\/main)?\/?$/u.test(e.pathname.slice(t.length)))}async function H_(e){let t=await e.initialLocationReady;if(!xt(e.history.location(),t)&&e.shouldInstallLocation?.()!==!1&&(e.installLocation?await e.installLocation(t):e.history.replace(t)),!e.enabled)return e.onInitialDecision?.(),()=>void 0;let{context:n}=e,r=()=>xt(e.history.location(),t),i=e.redirect??(()=>n.replace(`model-setup`,{search:`?firstRun=1`})),a=!1,o=()=>{a||(a=!0,e.onInitialDecision?.())},s=e=>{if(a)return;if(e.phase!==`connected`){(e.hello||e.phase===`reload-required`||e.phase===`stopped`)&&o();return}let t=Ki(e),s=n.agentSelection.state.selectedId?.trim()||null;if(Rn(e,`openclaw.setup.detect`,`operator.admin`)&&(!s||s===t?.defaultAgentId?.trim())&&r()){if(t?.modelConfigured===!1)i();else if(t?.modelConfigured)try{if(localStorage.getItem(`openclaw.modelSetup.pendingActivation.v1`)){let t=n.gateway.connectionRevision;V(async()=>{let{resumeFirstRunActivation:e}=await import(`./first-run-activation-receipt-OVHkgGFB.js`);return{resumeFirstRunActivation:e}},__vite__mapDeps([212,158,5,4,98]),import.meta.url).then(({resumeFirstRunActivation:c})=>c({context:n,isStillDefaultLanding:r,redirect:i},e,t,s,()=>a,o)).catch(o);return}}catch{}}o()},c=n.gateway.subscribe(s);return s(n.gateway.snapshot),()=>{c(),o()}}function U_(){return(U_=e((()=>{U(),Vn(),Q(),s()})))()}var W_,G_,K_,q_;function J_(){return(J_=e((()=>{E(),b(),Jt(),Y(),Vn(),s(),W_={pages:`page`,navigation:`navigation`,panels:`panel`,actions:`action`,accessories:`accessory`,widgets:`widget`,replacements:`replacement`},G_=/^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/,K_=15e3,q_=class{constructor(e){this.getContext=e,this.owners=new Map,this.selected=new Map,this.listeners=new Set,this.loadingOwners=new Set,this.loadingCatalog=null,this.stops=[],this.client=null,this.connectionId=null,this.refreshGeneration=0,this.disposed=!1,this.diagnostics=[],this.grantTimer=null}get errors(){let e=[...this.owners.values(),...this.loadingOwners].flatMap(e=>Object.keys(W_).filter(t=>e.contributions[t].size>0&&e.descriptor.uiCapabilities&&!e.descriptor.uiCapabilities.includes(W_[t])).map(t=>({pluginId:e.descriptor.pluginId,message:`Registered UI capability "${W_[t]}" is missing from uiCapabilities in openclaw.plugin.json.`})));return[...this.diagnostics,...e]}get hasPlugins(){return this.owners.size>0||this.loadingOwners.size>0}isLoading(e){return this.loadingCatalog===`pending`||this.loadingCatalog?.has(e)===!0||[...this.loadingOwners].some(t=>t.descriptor.pluginId===e)}get canReload(){let e=this.getContext().gateway.snapshot;return!this.disposed&&e.phase===`connected`&&Sn(e).canAdmin&&zn(e,`plugins.controlUi.reload`)===!0}async reload(){if(!this.canReload||!this.client)throw Error(`Reloading plugin UI requires a connected operator with admin access.`);let e=this.client,t=this.connectionId;if(await e.request(`plugins.controlUi.reload`,{}),this.disposed||this.client!==e||this.connectionId!==t)throw Error(`The connection changed while reloading plugin UI. Reconnect and retry.`);await this.refresh()}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}invalidate(e){if(!this.isCurrent(e))throw Error(`This plugin UI activation has ended.`);this.publish()}start(){let e=this.getContext();this.stops.push(e.gateway.subscribe(()=>this.syncConnection()),e.gateway.subscribeEvents(e=>{(e.event===`plugins.controlUi.changed`||e.event===`plugins.changed`)&&this.refresh()})),this.syncConnection()}syncConnection(){let e=this.getContext().gateway.snapshot,t=e.phase===`connected`?e.client:null,n=t?e.hello?.server?.connId??null:null;(this.client!==t||this.connectionId!==n)&&(this.retireOwners(),this.client=t,this.connectionId=n,this.diagnostics=[],this.publish(),t&&zn(e,`plugins.controlUi.list`)&&this.refresh())}async refresh(){let e=this.client;if(!e||this.disposed)return;let t=++this.refreshGeneration;for(let e of this.loadingOwners)this.disposeOwner(e);this.loadingOwners.clear(),this.loadingCatalog=`pending`,this.publish();let n=()=>!this.disposed&&this.client===e&&this.refreshGeneration===t;try{let t=await e.request(`plugins.controlUi.list`,{});if(!n())return;this.diagnostics=t.diagnostics;let r=new Set(t.plugins.map(e=>e.pluginId));this.loadingCatalog=r;for(let[e,t]of this.owners)r.has(e)||(this.owners.delete(e),this.disposeOwner(t));if(this.publish(),t.plugins.length){let i=new URL(e.gatewayUrl,window.location.href);if(i.protocol=i.protocol.replace(/^ws/u,`http`),!zt(e.gatewayUrl)){this.loadingCatalog=null;let r=Error(`Native plugin UI requires the Control UI served by the connected Gateway. Open ${i.origin} and reconnect there.`);await Promise.all(t.plugins.map(t=>(this.reportError(t.pluginId,r),this.reportActivation(t,e,n,`failed`,r))));return}let a=await this.getContext().config.refresh();if(!n())return;if(!a)throw Error(`Could not authenticate native plugin assets. Reconnect and retry.`);for(let i of t.plugins){let t=at(i.pluginId,this.getContext().resourceBasePath);if(a.pluginAssetsRequireAuth&&(!window.isSecureContext||!a.pluginFrameGrants.some(e=>e.pluginId===i.pluginId&&e.match===`prefix`&&e.path===t))){r.delete(i.pluginId);let t=Error(window.isSecureContext?`Native plugin asset grant unavailable: ${i.pluginId}`:`Native plugin UI requires HTTPS or localhost to authenticate its assets. Open this Gateway through HTTPS/Tailscale Serve, or use its loopback dashboard.`);if(this.reportError(i.pluginId,t),await this.reportActivation(i,e,n,`failed`,t),!n())return}}a.pluginAssetsRequireAuth&&this.startGrantRenewal()}let i=t.plugins.filter(e=>r.has(e.pluginId)&&this.owners.get(e.pluginId)?.descriptor.revision!==e.revision).map(t=>this.activate(t,e,n));this.loadingCatalog=null,this.publish(),await Promise.all(i),this.publish()}catch(e){n()&&(this.loadingCatalog=null,this.reportError(`host`,e),this.publish())}}startGrantRenewal(){this.grantTimer===null&&(this.grantTimer=setInterval(()=>{this.client&&this.owners.size&&this.getContext().config.refresh().catch(e=>this.reportError(`host`,e))},ge/2))}async activate(e,t,n){let r=new AbortController,i={descriptor:e,client:t,abort:r,disposers:new Set,contributions:{pages:new Map,navigation:new Map,panels:new Map,actions:new Map,replacements:new Map,accessories:new Map,widgets:new Map},selections:new Map};this.loadingOwners.add(i);let a;try{let o=[],s=await Promise.race([(async()=>{let{initializeControlUiPlugin:e}=await V(async()=>{let{initializeControlUiPlugin:e}=await import(`./control-ui-loader-hbLkGbP6.js`);return{initializeControlUiPlugin:e}},__vite__mapDeps([213,7,3,2,4,5,10,6,8,9,15,1,11,12,13,14,16,17,18,19,29,30,31,28]),import.meta.url);return e(this.getContext,this,i,o,()=>this.disposeOwner(i))})(),new Promise((e,t)=>{a=setTimeout(()=>t(Error(`Plugin UI initialization timed out. Check the plugin and reload its UI.`)),K_),r.signal.addEventListener(`abort`,()=>t(Error(`Plugin UI activation ended.`)),{once:!0})})]);if(!s||!n()||r.signal.aborted){this.disposeOwner(i);return}let c=[...s.selections].map(([t,n])=>{if(n===null)return[t,null];let r=s.contributions.replacements.get(n);if(r?.value.surface!==t)throw Error(`The selected UI replacement is unavailable.`);return[t,{key:`${e.pluginId}/${n}`,signal:r.signal}]}),l=this.owners.get(e.pluginId);if(this.loadingOwners.delete(i),this.owners.set(e.pluginId,s),l)for(let[t,n]of this.selected){let r=n.key.slice(e.pluginId.length+1);if(n.signal.aborted||n.signal!==l.contributions.replacements.get(r)?.signal)continue;let i=s.contributions.replacements.get(r);i?.value.surface===t?this.selected.set(t,{key:n.key,signal:i.signal}):this.selected.delete(t)}for(let[e,t]of c)t===null?this.selected.delete(e):this.selected.set(e,t);for(let e of o)e.media=`all`;l&&this.disposeOwner(l),this.publish(),await this.reportActivation(e,t,n,`activated`)}catch(r){this.loadingOwners.delete(i),this.disposeOwner(i),n()&&(this.reportError(e.pluginId,r),this.publish(),await this.reportActivation(e,t,n,`failed`,r))}finally{clearTimeout(a),this.loadingOwners.delete(i)}}async reportActivation(e,t,n,r,i){if(n())try{await t.request(`plugins.controlUi.report`,{pluginId:e.pluginId,revision:e.revision,status:r,...i===void 0?{}:{error:J(i,`Plugin UI activation failed.`).slice(0,512)}})}catch(t){n()&&this.reportError(e.pluginId,t)}}isCurrent(e){return!this.disposed&&!e.abort.signal.aborted&&this.client===e.client}register(e,t,n){if(!this.isCurrent(e))throw Error(`This plugin UI activation has ended.`);let r=e.contributions[t],i=n.id;if(!G_.test(i)||r.has(i))throw Error(`Invalid or duplicate plugin UI contribution: ${i}`);let a=new AbortController,o={value:n,signal:AbortSignal.any([e.abort.signal,a.signal])};r.set(i,o);let s=()=>{if(e.disposers.delete(s)){if(r.delete(i),t===`replacements`){for(let[t,n]of e.selections)n===i&&e.selections.delete(t);this.clearSelections(o.signal)}a.abort(),this.publish()}};return e.disposers.add(s),this.publish(),s}registrations(e){let t=[];for(let n of this.owners.values())for(let[r,i]of n.contributions[e])t.push({key:`${n.descriptor.pluginId}/${r}`,pluginId:n.descriptor.pluginId,value:i.value,host:n.host,signal:i.signal});return t.toSorted((e,t)=>e.key.localeCompare(t.key))}selectedReplacement(e){let t=this.selected.get(e);return this.registrations(`replacements`).find(n=>n.key===t?.key&&n.signal===t.signal&&n.value.surface===e)}selectReplacement(e,t){if(t===null)this.selected.delete(e);else{let n=this.registrations(`replacements`).find(n=>n.key===t&&n.value.surface===e);if(!n)throw Error(`The selected UI replacement is unavailable.`);this.selected.set(e,{key:t,signal:n.signal})}this.publish()}reportError(e,t){let n=J(t,`Plugin UI failed.`);this.diagnostics.some(t=>t.pluginId===e&&t.message===n)||(this.diagnostics=[...this.diagnostics.filter(t=>t.pluginId!==e),{pluginId:e,message:n}].slice(-20),this.publish())}publish(){for(let e of this.listeners)e()}disposeOwner(e){for(let{signal:t}of e.contributions.replacements.values())this.clearSelections(t);e.abort.abort();for(let t of[...e.disposers].toReversed())try{t()}catch(t){this.reportError(e.descriptor.pluginId,t)}e.disposers.clear()}clearSelections(e){for(let[t,n]of this.selected)n.signal===e&&this.selected.delete(t)}retireOwners(){this.refreshGeneration+=1,this.loadingCatalog=null,this.grantTimer!==null&&(clearInterval(this.grantTimer),this.grantTimer=null);let e=[...this.owners.values(),...this.loadingOwners];this.owners.clear(),this.loadingOwners.clear();for(let t of e)this.disposeOwner(t)}dispose(){this.disposed=!0,this.retireOwners();for(let e of this.stops)e();this.stops.length=0,this.listeners.clear()}}})))()}function Y_(e,t){let n=X(t.sessionKey),r=t.agentId?.trim(),i=r?F(r):n?F(n.agentId):Qi(t.sessionKey)?Xi(e):Ji(e),a=Gi(t.sessionKey),o=n?a.split(`:`).slice(2).join(`:`):a,s=qi(e);return`agent:${i}:${Qi(t.sessionKey)||o===`main`||o===s?p:o}`}function X_(){return(X_=e((()=>{Q()})))()}function Z_(e,t){let n=new URLSearchParams;return e&&n.set(`agent`,e),t?.catalogId&&n.set(`catalog`,t.catalogId),t?.group&&n.set(`group`,t.group),n.size>0?`?${n.toString()}`:``}function Q_(e){let t=new URLSearchParams(e);return{agentId:t.get(`agent`)?.trim()??``,catalogId:t.get(`catalog`)?.trim()??``,group:t.get(`group`)?.trim()??``}}function $_(){return($_=e((()=>{})))()}function ev(e){if(!O(e))return{};let t={};for(let[n,r]of Object.entries(e)){if(!n.trim()||!O(r))continue;let e=r,i=typeof e.activeTabId==`string`?e.activeTabId.trim():``,a={};if(O(e.reopenDockByTab))for(let[t,n]of Object.entries(e.reopenDockByTab).slice(0,50)){let e=t.trim();e&&(n===`bottom`||n===`left`||n===`right`)&&(a[e]=n)}(i||Object.keys(a).length!==0)&&(t[n]={...i?{activeTabId:i}:{},...Object.keys(a).length>0?{reopenDockByTab:a}:{}})}return t}function tv(e,t,n){let r=t.trim();if(!r)return ev(e);let i=ev(e),a=i[r]??{};return delete i[r],i[r]={...a,...n},Object.fromEntries(Object.entries(i).slice(-500))}function nv(){return(nv=e((()=>{})))()}function rv(e){return structuredClone(e)}function iv(e){return Math.min(pv,Math.max(260,e))}function av(e){return Math.min(mv,Math.max(220,e))}function ov(e){return e.dock===`bottom`||e.dock===`left`?e.dock:`right`}function sv(e){return e.columns[0]?.panels.find(t=>t.id===e.mainPanelId)}function cv(e){return e.columns[0]?.panels.filter(t=>t.id!==e.mainPanelId)??[]}function lv(e){return cv(e).find(t=>t.id===e.columns[0]?.activePanelId)}function uv(e,t){return e.expanded&&e.expandedSide?e.open===!0&&lv(e)?.slot===t:(sv(e)?.slot??`conversation`)===t||e.open===!0&&!e.expanded&&lv(e)?.slot===t}function dv(e,t){let n=rv(e);if(!Number.isFinite(t)||t<=0)return n;let r=n.columns[0];if(!r)return n;if(n.columns=[r],ov(n)===`bottom`)return r.height=av(r.height),n;let i=Math.max(260,Math.min(pv,t*.6)),a=Math.max(0,t-hv-gv);return 260>a?null:(r.width=Math.min(i,a,iv(r.width)),n)}function fv(e,t,n){let r=e.columns[0];if(!r?.browserWidthPending||!e.open||e.expanded||ov(e)===`bottom`||(sv(e)?.slot??`conversation`)!==`conversation`||lv(e)?.slot!==`browser`||!Number.isFinite(t)||t<680||!Number.isFinite(n)||n<=0)return e;let i=rv(e),a=i.columns[0];return a.width=Math.max(r.width,t-Math.min(n,t/2)-gv),delete a.browserWidthPending,dv(i,t)??e}var pv,mv,hv,gv;function _v(){return(_v=e((()=>{pv=1200,mv=800,hv=312,gv=6})))()}function vv(e){return typeof e==`string`&&/^plugin:[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}\/[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$/.test(e)}function yv(e){return e===`chat`?`dashboard`:e===`browser`||e===`link-reader`||e===`companion`||e===`conversation`||e===`dashboard`||e===`desktop`||e===`detail`||e===`discussion`||e===`portal`||e===`terminal`||e===`workspace`||vv(e)?e:null}function bv(e,t){let n=e,r=2;for(;t.has(n);)n=`${e}-${r++}`;return t.add(n),n}function xv(e){if(!O(e)||!Array.isArray(e.columns))return{columns:[],open:!1,expanded:!1};let t,n=new Set,r=new Set,i=[],a=tt(e.mainPanelId)?.trim(),o,s=``,c=Sv,l,u=Cv;for(let d of e.columns){if(!O(d)||d.side!==`left`&&d.side!==`right`||!Array.isArray(d.panels))continue;t??=z(d.id)??`column`;let e=z(d.activePanelId)??``,f;for(let t of d.panels){if(!O(t))continue;let s=yv(t.slot);if(!s||s===`detail`&&z(t.taskId)||r.has(s))continue;let c=z(t.id)??``,l=bv(c||s,n),u=c||(t.slot===`chat`?`chat`:s);u===e&&(f??=l),u===a&&(o??=l),r.add(s);let d=z(t.environmentId),p=z(t.portalId);i.push({id:l,slot:s,...(s===`desktop`||s===`portal`&&!p)&&d?{environmentId:d}:{},...s===`portal`&&p?{portalId:p}:{}})}s=f??s,c=typeof d.width==`number`&&Number.isFinite(d.width)?iv(d.width):c,l=d.browserWidthPending===!0||void 0,u=typeof d.height==`number`&&Number.isFinite(d.height)?av(d.height):u}let d=i.find(e=>e.slot===`conversation`);e.mainPanelId===void 0&&e.expanded===!0&&e.open!==!1&&(o=i.find(e=>e.id===s)?.id??i[0]?.id),(o||d||a!==void 0||e.expanded===!0)&&(d||(d={id:bv(`conversation`,n),slot:`conversation`},i.push(d)),o??=d.id);let f=i.find(e=>e.id===s&&e.id!==o)??(d&&d.id!==o?d:i.find(e=>e.id!==o)),p=t||i.length>0||e.open===!0?[{id:t??`side-panel-column`,side:`right`,panels:i,activePanelId:f?.id??``,height:u,width:c,...l?{browserWidthPending:l}:{}}]:[];return{columns:p,...o?{mainPanelId:o}:{},dock:e.dock===`bottom`||e.dock===`left`?e.dock:`right`,open:typeof e.open==`boolean`?e.open:p.length>0,expanded:e.expanded===!0,...e.dashboardPresentationOverride===null||e.dashboardPresentationOverride===`split`||e.dashboardPresentationOverride===`expanded`?{dashboardPresentationOverride:e.dashboardPresentationOverride}:{},...e.expanded===!0&&e.expandedSide===!0&&e.open!==!1&&f?{expandedSide:!0}:{},...e.resourceAutoOpenDismissed===!0?{resourceAutoOpenDismissed:!0}:{}}}var Sv,Cv;function wv(){return(wv=e((()=>{Ke(),_v(),Sv=480,Cv=360})))()}function Tv(e){let t={};for(let[n,r]of Object.entries(_e(e)).slice(-500)){let e=n.trim();e&&(t[e]=xv(r))}return t}function Ev(e,t,n,r){let i=t.trim(),a=Tv(e);if(!i)return a;let o=a[i],s=xv(n),c=r?.geometryOnly&&o?{...o,dock:s.dock,columns:o.columns.map(e=>{let t=s.columns.find(t=>t.id===e.id);return t?{...e,width:t.width,height:t.height,browserWidthPending:t.browserWidthPending}:e})}:s;return delete a[i],a[i]=xv({...c,dashboardPresentationOverride:r?.dashboardPresentationOverride===void 0?o?o.dashboardPresentationOverride:null:r.dashboardPresentationOverride}),Object.fromEntries(Object.entries(a).slice(-500))}function Dv(e){let t={};for(let[n,r]of Object.entries(_e(e)).slice(-500)){let e=n.trim(),i=typeof r==`string`?r.trim():``;e&&i&&(t[e]=i)}return t}function Ov(e,t,n){let r=t.trim(),i=n.trim(),a=Dv(e);return!r||!i?a:(delete a[r],a[r]=i,Object.fromEntries(Object.entries(a).slice(-500)))}function kv(){return(kv=e((()=>{wv()})))()}function Av(e){let t=e.reduce((e,t)=>e+t,0);return e.map(e=>e/t)}function jv(e,t){let n=RegExp(`^${t}(\\d+)$`,`u`).exec(e);return n?Number(n[1]):0}function Mv(e,t){return!Array.isArray(e)||e.length!==t||e.some(e=>typeof e!=`number`||!Number.isFinite(e)||e<=0)?Array.from({length:t},()=>1/t):Av(e)}function Nv(e,t,n){let r=typeof e==`string`?e.trim():``;if(r&&!t.has(r))return t.add(r),r;let i=n();for(;t.has(i);)i=n();return t.add(i),i}function Pv(e){if(!O(e)||!Array.isArray(e.columns))return;let t=e.columns.filter(O),n=t.reduce((e,t)=>Array.isArray(t.panes)?t.panes.reduce((e,t)=>!O(t)||typeof t.id!=`string`?e:Math.max(e,jv(t.id.trim(),`p`)),e):e,0),r=t.reduce((e,t)=>typeof t.id==`string`?Math.max(e,jv(t.id.trim(),`c`)):e,0),i=new Set,a=new Set,o=[],s=[];for(let[e,c]of t.entries()){if(!Array.isArray(c.panes))continue;let t=[],l=[];for(let[e,r]of c.panes.entries()){if(!O(r)||typeof r.sessionKey!=`string`)continue;let a=r.sessionKey.trim();a&&(t.push({id:Nv(r.id,i,()=>`p${++n}`),sessionKey:a}),l.push(e))}if(t.length===0)continue;let u=Mv(c.paneWeights,c.panes.length),d=Av(l.map(e=>P(u[e],`normalized split pane source weight`)));o.push({id:Nv(c.id,a,()=>`c${++r}`),panes:t,paneWeights:d}),s.push(e)}if(o.length===0)return;let c=Mv(e.columnWeights,t.length),l=Av(s.map(e=>P(c[e],`normalized split column source weight`))),u=o.flatMap(e=>e.panes);if(u.length<2&&!Qi(u[0]?.sessionKey))return;let d=typeof e.activePaneId==`string`?e.activePaneId.trim():``;return{columns:o,columnWeights:l,activePaneId:u.some(e=>e.id===d)?d:P(u[0],`normalized split layout first pane`).id}}function Fv(){return(Fv=e((()=>{Ke(),Q()})))()}function Iv(e){return e.sessionKey||(Uv+=1),Promise.all([...Hv].map(t=>Promise.resolve(t(e)))).then(()=>void 0)}function Lv(e){try{localStorage.setItem(Vv,JSON.stringify(e)),localStorage.removeItem(Vv)}catch{}}function Rv(e){try{let t=JSON.parse(e);if(typeof t==`object`&&t&&`sessionKey`in t&&typeof t.sessionKey==`string`&&t.sessionKey)return{sessionKey:t.sessionKey,...`reason`in t&&t.reason===`cache-eviction`?{reason:`cache-eviction`}:{}}}catch{}return{}}function zv(e){let t=Iv(e);return Lv(e),t}function Bv(e){return Hv.add(e),()=>Hv.delete(e)}var Vv,Hv,Uv;function Wv(){return(Wv=e((()=>{Vv=`openclaw.control.chatSnapshots.invalidate.v1`,Hv=new Set,Uv=0,typeof window<`u`&&window.addEventListener(`storage`,e=>{e.key===Vv&&e.newValue!==null&&Iv(Rv(e.newValue)).catch(e=>{console.error(`[chat-snapshot-cache] cross-tab invalidation failed`,e)})})})))()}function Gv(){let e=zv({});return qv().then(async({clearStoredChatSnapshotStorage:t})=>{await e,await t()})}function Kv(e,t){return qv().then(({deleteStoredChatSnapshot:n})=>Promise.all(t.map(({key:t,agentId:r})=>n(Y_({...e,assistantAgentId:r??e.assistantAgentId},{sessionKey:t,agentId:r})))).then(()=>void 0))}var qv;function Jv(){return(Jv=e((()=>{Wv(),X_(),s(),qv=()=>V(()=>import(`./session-snapshot-invalidation-DO4C2Hgi.js`),__vite__mapDeps([214,79,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,21,22,49,23,80,81,82,28,29,30,31,32,33,58,34,83,84,85]),import.meta.url)})))()}function Yv(e){$v&&(e===void 0||$v.cacheKey===e)&&($v.cancelled=!0,$v=void 0)}function Xv(e){Yv();let t=Uv,n={cacheKey:e,cancelled:!1,promise:V(async()=>{let{readStoredChatSnapshotRecord:e}=await import(`./session-snapshot-database-M8hdgb-a.js`);return{readStoredChatSnapshotRecord:e}},__vite__mapDeps([215,82]),import.meta.url).then(({readStoredChatSnapshotRecord:t})=>t(e)).then(e=>n.cancelled||t!==Uv?void 0:e).catch(()=>void 0)};$v=n}function Zv(e){if($v?.cacheKey!==e)return;let t=$v;return $v=void 0,t}function Qv(){$v&&($v.readyAt??=Date.now())}var $v;function ey(){return(ey=e((()=>{Wv(),s(),Bv(({sessionKey:e})=>Yv(e))})))()}function ty(e){if(!Le(e).startsWith(ay))return!1;let t=e.indexOf(`,`);if(t<5)return!1;let n=e.slice(5,t),r=Le(n.split(`;`)[0]);return r.startsWith(`image/`)?!sy.has(r):!1}function ny(e,t,n={}){let r=e.trim();if(!r)return null;if(n.allowDataImage===!0&&ty(r))return r;if(Le(r).startsWith(ay))return null;try{let e=new URL(r,t);return oy.has(Le(e.protocol))?e.toString():null}catch{return null}}function ry(e={}){let t=window.open(`about:blank`,`_blank`,e.popup?`popup`:void 0);return t&&(t.opener=null),t}function iy(e,t={}){let n=ny(e,t.baseHref??window.location.href,t);if(!n)return null;let r=window.open(n,`_blank`,`noopener,noreferrer`);return r&&(r.opener=null),r}var ay,oy,sy;function cy(){return(cy=e((()=>{ay=`data:`,oy=new Set([`http:`,`https:`,`blob:`]),sy=new Set([`image/svg+xml`])})))()}function ly(e){e&&typeof URL<`u`&&typeof URL.revokeObjectURL==`function`&&URL.revokeObjectURL(e)}function uy(e){e.videoPoster?.controller.abort(),ly(e.videoPoster?.url)}function dy(e){let t=py.get(e);t&&(uy(t),ly(t.previewUrl),py.delete(e))}function fy(e=[]){for(let t of e)dy(t.id)}var py;function my(){return(my=e((()=>{py=new Map})))()}function hy(e,t){return`${vy}${e.length}:${e}:${t.length}:${t}:`}function gy(e,t,n){return`${hy(e,t)}${n.length}:${n}`}function _y(e,t){try{let n=globalThis.sessionStorage,r=hy(e,t),i=[];for(let e=0;e<n.length;e+=1){let t=n.key(e);t?.startsWith(r)&&i.push(t)}return i.toSorted()}catch{return[]}}var vy;function yy(){return(yy=e((()=>{vy=`openclaw.new-session.session-placement-recovery.v1:`})))()}function by(e){return e?.length?e.flatMap(e=>{let t=ye(e);if(!t)return[];let n=typeof t.mimeType==`string`?t.mimeType.trim():``,r=typeof t.content==`string`?t.content:``;return!/^[a-z0-9][a-z0-9!#$&^_.+-]*\/[a-z0-9][a-z0-9!#$&^_.+-]*$/i.test(n)||!/^[A-Za-z0-9+/]+={0,2}$/.test(r)?[]:[{id:pe(),dataUrl:`data:${n};base64,${r}`,mimeType:n,...t.origin===`paste`||t.origin===`file`?{origin:t.origin}:{},fileName:typeof t.fileName==`string`?t.fileName:void 0}]}):[]}function xy(){return(xy=e((()=>{_()})))()}function Sy(e){return`openclaw.control.goalOperation.v1:${JSON.stringify(ut(e))}:`}function Cy(e,t){return`${Sy(e)}${JSON.stringify(t)}:`}function wy(e){return Dy.get(Sy(e))?.[1]??0}function Ty(e){return e+864e5<=Date.now()}function Ey(e,t){let n=Sy(e),r=t?Cy(e,t):null,i=Dy.get(n)??[r,0];try{let e=globalThis.sessionStorage;for(let t=e.length-1;t>=0;--t){let i=e.key(t);if(i?.startsWith(n)){if(!r||!i.startsWith(r))e.removeItem(i);else{let t=ce(e.getItem(i)??`null`);if(t===void 0){e.setItem(i,`"invalid"`);continue}O(t)&&typeof t.issuedAtMs==`number`&&Ty(t.issuedAtMs)&&e.setItem(i,`"expired"`)}}}}catch{}Dy.set(n,[r,i[1]+ +(!r||i[0]!==r)])}var Dy;function Oy(){return(Oy=e((()=>{Ke(),Dy=new Map})))()}function ky(e){let t=I(e)?.authReason;return typeof t==`string`&&Ly.has(t)?t:null}function Ay(e,t,n){if(e||!t)return null;let r=Ue(t);return r?{kind:r.reason===`scope-upgrade`?`scope-upgrade-pending`:r.reason===`role-upgrade`?`role-upgrade-pending`:r.reason===`metadata-upgrade`?`metadata-upgrade-pending`:`pairing-required`,requestId:r.requestId??null}:n===L.PAIRING_REQUIRED?{kind:`pairing-required`,requestId:null}:null}function jy(e){return e.connected||!e.lastError?null:e.lastErrorCode?e.lastErrorCode===L.AUTH_IDENTITY_HEADER_REQUIRED||e.lastErrorCode===L.AUTH_UNAUTHORIZED&&typeof e.lastErrorAuthReason==`string`&&Ly.has(e.lastErrorAuthReason)?`trusted-proxy`:Fy.has(e.lastErrorCode)?e.lastErrorCode===L.AUTH_DEVICE_TOKEN_MISMATCH&&!e.hasToken&&!e.hasPassword||Py.has(e.lastErrorCode)?`required`:`failed`:null:Le(e.lastError).includes(`unauthorized`)?!e.hasToken&&!e.hasPassword?`required`:`failed`:null}function My(e,t,n){if(e||!t)return!1;if(n)return Iy.has(n);let r=Le(t);return r.includes(`secure context`)||r.includes(`device identity required`)}function Ny(e){return J(e.replace(/([?#&])(?:access_token|auth|deviceToken|password|refresh_token|token)=([^&#\s]+)/gi,`$1[redacted-credential]`).replace(/\bBearer\s+([A-Za-z0-9._~+/-]+=*)/gi,`Bearer [redacted]`).replace(/(["']?(?:access|accessToken|deviceToken|password|refresh|refreshToken|token)["']?\s*[:=]\s*)["']?[^"',\s}]+/gi,`$1[redacted]`))}var Py,Fy,Iy,Ly;function Ry(){return(Ry=e((()=>{rt(),Y(),Py=new Set([L.AUTH_REQUIRED,L.AUTH_TOKEN_MISSING,L.AUTH_PASSWORD_MISSING,L.AUTH_TOKEN_NOT_CONFIGURED,L.AUTH_PASSWORD_NOT_CONFIGURED]),Fy=new Set([...Py,L.AUTH_UNAUTHORIZED,L.AUTH_TOKEN_MISMATCH,L.AUTH_PASSWORD_MISMATCH,L.AUTH_BOOTSTRAP_TOKEN_INVALID,L.AUTH_DEVICE_TOKEN_MISMATCH,L.AUTH_RATE_LIMITED,L.AUTH_TAILSCALE_IDENTITY_MISSING,L.AUTH_TAILSCALE_PROXY_MISSING,L.AUTH_TAILSCALE_WHOIS_FAILED,L.AUTH_TAILSCALE_IDENTITY_MISMATCH]),Iy=new Set([`BROWSER_WEBSOCKET_SECURITY_ERROR`,L.CONTROL_UI_DEVICE_IDENTITY_REQUIRED,L.DEVICE_IDENTITY_REQUIRED]),Ly=new Set([`trusted_proxy_no_request`,`trusted_proxy_untrusted_source`,`trusted_proxy_loopback_source`,`trusted_proxy_local_interface_check_failed`,`trusted_proxy_local_interface_source`,`trusted_proxy_user_missing`,`trusted_proxy_user_not_allowed`,`trusted_proxy_config_missing`,`trusted_proxy_no_proxies_configured`,`proxy_attribution_required`])})))()}function zy(e){return Jy.add(e),()=>{Jy.delete(e)}}function By(){return{origin:Wy,resourceBasePath:Gy,authTokens:Ky}}async function Vy(e,t){let n=Wy??globalThis.location?.origin??`http://localhost`;if(new URL(e,n).origin!==n)throw Error(`Resource must belong to the connected Gateway`);let r=AbortSignal.any([qy.signal,AbortSignal.timeout(t)]),i=await Dt(e,{credentials:`include`,signal:r},Ky,()=>!0);if(i.status===401||i.status===403)throw await i.body?.cancel(),Error(`Gateway credentials rejected`);return i}function Hy(e){if(!e)return null;try{let t=new URL(e);return`${t.protocol===`wss:`?`https:`:t.protocol===`ws:`?`http:`:t.protocol}//${t.host}`}catch{return null}}function Uy(e,t=[],n=``){let r=e&&Ot(e)?globalThis.location?.origin??null:Hy(e),i=globalThis.location?.origin,a=r&&i===r?Me(n):``;if(Wy!==r||Gy!==a||Ky.length!==t.length||Ky.some((e,n)=>e!==t[n])){qy.abort(),qy=new AbortController;for(let e of Jy)e()}Wy=r,Gy=a,Ky=[...t]}var Wy,Gy,Ky,qy,Jy;function Yy(){return(Yy=e((()=>{U(),Wt(),Wy=null,Gy=``,Ky=[],qy=new AbortController,Jy=new Set})))()}function Xy(){return Qy}function Zy(){Qy+=1}var Qy;function $y(){return($y=e((()=>{Qy=0})))()}function eb(e){if(e.event===`config.changed`)return`refresh`;if(e.event===`chat.metadata.changed`){let t=I(e.payload);return t?.modelSelectionChanged===!0?`clear`:t?.modelCatalogChanged===!1?void 0:`refresh`}}function tb(e){let t=mb.get(e);return t||(t={entries:new Map,reads:new Set,nextRead:0,requests:new Map},mb.set(e,t)),t}function nb(e,t){for(let n of Array.from(hb.get(e)??[]))n(t)}function rb(e,t,n,r=!1){let i=tb(e),a={client:e,cache:i,scope:t,signal:n,unresolvedScope:r,order:++i.nextRead};return i.reads.add(a),a}function ib(e,t){let n=new Set;for(let e of t.entries.keys()){if(t.entries.size<=gb)break;t.entries.delete(e),n.add(e);for(let n of t.reads)(n.unresolvedScope||n.scope&&ob(ab(n.scope))===e)&&t.reads.delete(n)}n.size&&mb.get(e)===t&&nb(e,{type:`invalidated`,matches:(e,t)=>n.has(t)})}function ab(e){let{agentId:t,view:n=`configured`,...r}=e;return{view:n,...r,...t===void 0?{}:{agentId:t.trim()}}}function ob(e){let{refresh:t,...n}=e;return JSON.stringify(Object.entries(n).filter(([,e])=>e!==void 0).toSorted(([e],[t])=>e.localeCompare(t)))}function sb(e,t,n){let{cache:r,client:i}=e;if(mb.get(i)!==r||!r.reads.has(e)||e.signal?.aborted)return!1;let a=ob(ab(t));if(e.scope){let n=ab(e.scope);if(n.agentId===void 0&&(n.agentId=t.agentId),ob(n)!==a)return!1}let o=r.entries.get(a)??{scope:t};if(!t.refresh&&(o.publishedRead??0)>e.order)return!1;let s=!n.refreshFailed;for(let n of r.reads)s&&n!==e&&n.scope&&ob(ab(n.scope))===a&&(t.refresh||!n.scope.refresh)&&r.reads.delete(n);if(r.reads.delete(e),t.refresh&&s){for(let e of r.entries.values())e!==o&&cb(e);r.reads.clear()}o.result=n,o.invalidated=!s,o.publishedRead=e.order,o.expiresAt=s?n.models.reduce((e,t)=>Math.min(e,t.unavailableUntil??1/0),1/0):void 0,r.entries.delete(a),r.entries.set(a,o),r.requiresSnapshot=n.modelSelectionPolicy?.restricted===!0;for(let e of r.requests.get(a)?.values()??[])for(let r of[e.active,e.queued])r&&s&&(t.refresh||!r.refresh)&&r.resolve(n);return ib(i,r),t.refresh&&s&&nb(i,{type:`invalidated`,matches:(e,t)=>t!==a}),nb(i,{type:`published`}),!0}function cb(e){e.invalidated=!0,e.expiresAt=void 0}function lb(e,t){cb(t);let n=ob(ab(t.scope));nb(e,{type:`invalidated`,matches:(e,t)=>t===n})}function ub(e,t){let n=mb.get(e);mb.delete(e),tb(e).requiresSnapshot=t?.requireSnapshot===!0||n?.requiresSnapshot===!0||(n?.entries.size??0)>0;for(let e of n?.requests.values()??[])for(let t of e.values())t.active?.reject(new DOMException(`Model catalog connection retired`,`AbortError`)),t.queued?.reject(new DOMException(`Model catalog connection retired`,`AbortError`));nb(e,{type:`invalidated`,matches:()=>!0})}function db(e,t){let n=mb.get(e);return n?.requiresSnapshot===!0&&!n.entries.get(ob(ab(t)))?.result}function fb(e){let t=e&&mb.get(e);return!!(t?.entries.size&&t.requiresSnapshot===!1)}function pb(e,t,n,r){let i=mb.get(e);if(!i)return;let a=e=>e&&r?.has(ob(ab(e)))?!1:!t||!e?!0:t.sessionsOnly&&e.sessionKey===void 0||t.agentId!==void 0&&e.agentId!==void 0&&e.agentId!==t.agentId.trim()||t.authProfileId!==void 0&&e.authProfileId!==t.authProfileId?!1:t.sessionKey===void 0?!0:n?e.sessionKey!==void 0&&!ta(n)&&!X(e.sessionKey)||ia(n,e.sessionKey,t.sessionKey,t.agentId,e.agentId):e.sessionKey===t.sessionKey;for(let e of i.reads)a(e.scope)&&i.reads.delete(e);for(let e of i.entries.values())a(e.scope)&&cb(e);nb(e,{type:`invalidated`,matches:a})}var mb,hb,gb;function _b(){return(_b=e((()=>{Q(),mb=new WeakMap,hb=new WeakMap,gb=64})))()}function vb(e,t,n,r=`refresh`){r===`clear`?ub(e,{requireSnapshot:!0}):r===`refresh`&&pb(e,t,n),xb.get(e)?.invalidate(t,n)}function yb(e,t,n){let r=I(t),i=Km(r),a=typeof r?.agentId==`string`?r.agentId:void 0,o=i?{agentId:a,sessionKey:i.key}:void 0,s=o&&bb(r)?new Set(Array.from(xb.get(e)?.entries.values()??[]).filter(e=>e.listeners.size>0).map(e=>ob(ab(e.scope)))):void 0;pb(e,o??{agentId:a,sessionsOnly:!0},n,s),xb.get(e)?.invalidate(o,n,r)}function bb(e){return e?.catalogChanged!==!0&&e?.phase!==`reset`&&(e?.reason===`patch`||e?.reason===`command-metadata`)}var xb;function Sb(){return(Sb=e((()=>{_b(),sh(),xb=new WeakMap})))()}function Cb(e){Tb.delete(e)}function wb(e){let t=Tb.get(e);if(!t){t=e.request(`cron.list`,{includeDisabled:!0,limit:200,offset:0,sortBy:`name`,sortDir:`asc`,compact:!0}),Tb.set(e,t);let n=t;n.catch(()=>{Tb.get(e)===n&&Tb.delete(e)})}return t}var Tb;function Eb(){return(Eb=e((()=>{Tb=new WeakMap})))()}function Db(e){return e.event===`config.changed`||e.event===`chat.metadata.changed`&&I(e.payload)?.authChanged!==!1}function Ob(e){kb.get(e)?.entries.clear()}var kb;function Ab(){return(Ab=e((()=>{kb=new WeakMap})))()}function jb(e,t,n,r=``,i){let a=i??globalThis.location?.href;if(!a)return null;try{let i=new URL(a),o=new URL(e,i);if(o.protocol===`ws:`?o.protocol=`http:`:o.protocol===`wss:`&&(o.protocol=`https:`),![`http:`,`https:`].includes(o.protocol))return null;o.username=``,o.password=``;let s=o.origin===i.origin?Me(r):``;return new URL(c(t,n,s),o.origin).href}catch{return null}}function Mb(){return(Mb=e((()=>{B(),ue()})))()}function Nb(e,t){return e.request(`device.pair.setupCode`,t,{timeoutMs:ht})}function Pb(e){return Nb(e,{includeQr:!1,joinUrl:!0})}function Fb(e){return{client:e.client,connected:e.connected,devicePairSetupOpen:!1,devicePairSetupLifecycle:{phase:`selection`,access:`full`},devicePairSetupExpiryTimer:null,devicePairSetupCountdownTimer:null,onDevicePairSetupChange:e.onChange??(()=>{}),pendingCount:0}}function Ib(e){return{devicePairSetupOpen:e.devicePairSetupOpen,devicePairSetupLifecycle:e.devicePairSetupLifecycle,devicePairPendingCount:e.pendingCount}}function Lb(e){e.devicePairSetupCountdownTimer&&=(clearInterval(e.devicePairSetupCountdownTimer),null)}function Rb(e,t){Lb(e);let n=e.devicePairSetupLifecycle,r=n.phase===`waiting`?n.setup.expiresAtMs:void 0;n.access!==`node`||!e.devicePairSetupOpen||typeof r!=`number`||r<=Date.now()||(e.devicePairSetupCountdownTimer=setInterval(()=>{(!e.devicePairSetupOpen||r<=Date.now())&&Lb(e),t()},1e3))}function zb(e){return typeof e.setupId==`string`&&e.setupId.length>0&&typeof e.expiresAtMs==`number`&&Number.isInteger(e.expiresAtMs)&&e.expiresAtMs>=0}function Bb(e){e.devicePairSetupExpiryTimer!==null&&(clearTimeout(e.devicePairSetupExpiryTimer),e.devicePairSetupExpiryTimer=null)}async function Vb(e,t){let n=e.client;if(!n||!e.connected)return{status:`unavailable`,message:`Gateway unavailable`};try{let e=await n.request(`device.pair.setupStatus`,{setupId:t});if(e?.completion===void 0){if(e?.deliveryUncertain===void 0)return{status:`missing`};let n=qb(e.deliveryUncertain);return n?.setupId===t?{status:`delivery-uncertain`,outcome:n}:{status:`unavailable`,message:`Invalid setup status response`}}let r=Kb(e.completion);return r?.setupId===t?{status:`found`,completion:r}:{status:`unavailable`,message:`Invalid setup status response`}}catch(e){return{status:`unavailable`,message:J(e)}}}function Hb(e,t){let n=e.devicePairSetupLifecycle;return n.phase===`waiting`&&n.setup.setupId===t||n.phase===`reconciling`&&n.setupId===t||n.phase===`error`&&n.source===`status`&&n.setupId===t}function Ub(e,t,n,r){if(Hb(e,t)){if(r.status===`found`){Yb(e,r.completion);return}if(r.status===`delivery-uncertain`){Xb(e,r.outcome);return}e.devicePairSetupLifecycle=r.status===`missing`?{phase:`expired`,access:n}:{phase:`error`,source:`status`,access:n,setupId:t,message:r.message},e.onDevicePairSetupChange()}}async function Wb(e,t){let n=e.devicePairSetupLifecycle;if(n.phase!==`waiting`||n.setup.setupId!==t)return;Bb(e),Lb(e);let r=n.access;e.devicePairSetupLifecycle={phase:`reconciling`,access:r,setupId:t},e.onDevicePairSetupChange(),Ub(e,t,r,await Vb(e,t))}function Gb(e,t){Bb(e);let n=()=>{let r=t.expiresAtMs-Date.now();if(r>0){e.devicePairSetupExpiryTimer=setTimeout(n,r);return}Wb(e,t.setupId)};n()}function Kb(e){if(!O(e))return null;let{setupId:t,deviceName:n,access:r}=e;if(typeof t!=`string`||t.length===0||r!==`full`&&r!==`limited`&&r!==`node`)return null;let i=typeof n==`string`?n.trim():``;return{setupId:t,access:r,...i?{deviceName:i}:{}}}function qb(e){let t=Kb(e);return t?{setupId:t.setupId,access:t.access}:null}function Jb(e,t,n){return Hb(e,t)?(Lb(e),Bb(e),e.devicePairSetupLifecycle=n,e.onDevicePairSetupChange(),!0):!1}function Yb(e,t){return Jb(e,t.setupId,{phase:`success`,access:t.access,...t.deviceName?{deviceName:t.deviceName}:{}})}function Xb(e,t){return Jb(e,t.setupId,{phase:`delivery-uncertain`,access:t.access})}async function Zb(e){e.devicePairSetupOpen=!0}async function Qb(e){let t=e.client,n=e.devicePairSetupLifecycle,r=n.access;if(!t||!e.connected||e.devicePairSetupLifecycle.phase===`loading`||tx.has(e))return;let i={};if(tx.set(e,i),n.phase===`error`&&n.source===`status`){let t=await Vb(e,n.setupId);tx.get(e)===i&&(Ub(e,n.setupId,r,t),tx.delete(e));return}Bb(e),e.devicePairSetupLifecycle={phase:`loading`,access:r};try{let n=await Nb(t,r===`full`?{}:r===`node`?{bootstrapProfile:`node`,includeQr:!1}:{bootstrapProfile:`limited`});if(tx.get(e)!==i||e.client!==t||!e.connected||!e.devicePairSetupOpen)return;if(!zb(n))throw Error(`Gateway does not provide pairing lifecycle metadata. Update the Gateway and try again.`);e.devicePairSetupLifecycle={phase:`waiting`,access:n.access===`full`||n.access===`limited`||n.access===`node`?n.access:r,setup:n},Gb(e,n)}catch(n){tx.get(e)===i&&e.client===t&&e.devicePairSetupOpen&&(e.devicePairSetupLifecycle={phase:`error`,source:`create`,access:r,message:J(n)})}finally{tx.get(e)===i&&tx.delete(e)}}async function $b(e,t){(e.devicePairSetupLifecycle.phase===`selection`||e.devicePairSetupLifecycle.phase===`error`&&e.devicePairSetupLifecycle.source===`create`)&&e.devicePairSetupLifecycle.access!==t&&(e.devicePairSetupLifecycle={phase:`selection`,access:t})}function ex(e){Lb(e),tx.delete(e),Bb(e),e.devicePairSetupOpen=!1,e.devicePairSetupLifecycle={phase:`selection`,access:`full`}}var tx;function nx(){return(nx=e((()=>{ve(),Y(),tx=new WeakMap})))()}function rx(e,t,n=!1){let r=Math.max(0,Math.ceil((e-t)/1e3)),i=String(Math.floor(r/60));return`${n?i.padStart(2,`0`):i}:${String(r%60).padStart(2,`0`)}`}function ix(){let e=Cr.getLocale();return Sx?.locale!==e&&(Sx={locale:e,units:{}}),Sx}function ax({value:e,unit:t}){let n=ix();return(n.units[t]??=new Intl.NumberFormat(n.locale,{style:`unit`,unit:t,unitDisplay:`narrow`,maximumFractionDigits:0})).format(e)}function ox(e,t){let n=ix();return(n.relative??=new Intl.RelativeTimeFormat(n.locale,{numeric:`auto`,style:`narrow`})).format(e,t)}function sx(e,t={}){let n=t.fallback??K(`common.unknown`);if(e==null||!Number.isFinite(e)||e<0)return n;let{value:r,unit:i}=ft(e);return i===`second`&&t.suffix!==!1?K(`common.justNow`):t.suffix===!1?ax({value:r,unit:i}):ox(-r,i)}function cx(e,t={}){let n=t.fallback??K(`common.na`);if(e==null||!Number.isFinite(e))return n;let r=e-Date.now(),i=r<=0,{value:a,unit:o}=ft(Math.abs(r));if(o===`second`)return t.suffix===!1?ax({value:a,unit:o}):i?K(`common.justNow`):ox(a,o);if(t.dateFallback&&o===`day`&&a>7)try{return new Intl.DateTimeFormat(Cr.getLocale(),{month:`short`,day:`numeric`,...t.timezone?{timeZone:t.timezone}:{}}).format(new Date(e))}catch{}let s=i?-a:a;return t.suffix===!1?ax({value:a,unit:o}):ox(s,o)}function lx(e){if(e==null)return``;if(typeof e==`string`)return e;if(typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`||typeof e==`symbol`)return String(e);try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return e instanceof Error?J(e):Object.prototype.toString.call(e)}function ux(e){return dx()(e)}function dx(e,t){let n;return r=>{let i=Ne(r);return i===void 0?t??K(`common.na`):(n??=new Intl.DateTimeFormat(Cr.getLocale(),e??{year:`numeric`,month:`numeric`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),n.format(new Date(i)))}}function fx(e,t,n=K(`common.na`)){let r=Ne(e);return r===void 0?n:new Date(r).toLocaleDateString(Cr.getLocale(),t)}function px(e,t,n=K(`common.na`)){let r=Ne(e);return r===void 0?n:new Date(r).toLocaleTimeString(Cr.getLocale(),t??{timeStyle:`short`})}function mx(e,t,n=K(`common.na`)){let r=Ne(e);return r===void 0?n:new Date(r).toLocaleString(Cr.getLocale(),t)}function hx(e){return!e||e.length===0?K(`common.none`):e.filter(e=>!!(e&&e.trim())).join(`, `)}function gx(e,t=120){return e.length<=t?e:`${T(e,Math.max(0,t-1))}…`}function _x(e,t){return e.length<=t?{text:e,truncated:!1,total:e.length}:{text:T(e,Math.max(0,t)),truncated:!0,total:e.length}}function vx(e,t){let n=Number(e);return Number.isFinite(n)?n:t}function yx(e,t=`$0.00`){return e==null||!Number.isFinite(e)?t:e===0?`$0.00`:`$${e.toFixed(e<.01?4:e<1?3:2)}`}function bx(e,t={}){return e==null||!Number.isFinite(e)?`0`:m(e,{thousandsSuffix:t.thousandsSuffix,millionsSuffix:t.millionsSuffix??`M`,trimTrailingZero:t.trimTrailingZero??!0,maxUnit:`billion`})}function xx(e){return e<1e6?bx(e):`${Math.floor(e/1e5)/10}M`}var Sx;function Cx(){return(Cx=e((()=>{Ke(),He(),q(),Y()})))()}function wx(){let e=globalThis.navigator;return/iPad|iPhone|iPod/u.test(e.userAgent)||e.platform===`MacIntel`&&e.maxTouchPoints>1}function Tx(){return(Tx=e((()=>{})))()}var Ex,Dx;function Ox(){return(Ox=e((()=>{G(),Nn(),On(),s(),Ex=class extends kn{constructor(...e){super(...e),this.mode=`expanded`,this.loading=!1}render(e){return jn}update(e,[t]){return this.element=e.element instanceof HTMLElement?e.element:void 0,this.mode=t,this.layout?this.layout.update(t):this.load(),jn}load(){!this.loading&&this.isConnected&&(this.loading=!0,V(async()=>{let{DebugOverlayLayout:e}=await import(`./debug-overlay-layout.runtime-BtwbCcPA.js`);return{DebugOverlayLayout:e}},__vite__mapDeps([216]),import.meta.url).then(({DebugOverlayLayout:e})=>{this.loading=!1,this.isConnected&&this.element?.isConnected&&(this.layout=new e(this.element),this.layout.update(this.mode))}).catch(e=>{this.loading=!1,console.error(`System busyness position controls could not load. Reload to retry.`,e)}))}disconnected(){this.layout?.disconnect()}reconnected(){this.layout?this.layout.reconnect():this.load()}},Dx=An(Ex)})))()}function kx(e){return W`
<div
class="debug-overlay__placeholder debug-overlay__placeholder--${e}"
role="status"
aria-label=${K(`common.loading`)}
>
<div class="debug-overlay__placeholder-content" aria-hidden="true">
${e===`status`?W`<div class="debug-overlay__placeholder-vitals">
${[`cpu`,`memory`,`delayP99`].map(e=>W`<div class="debug-overlay__placeholder-vital">
<span>${K(`debug.overlay.${e}`)}</span>
<div class="skeleton debug-overlay__placeholder-value"></div>
<div class="skeleton debug-overlay__placeholder-line"></div>
</div>`)}
</div>`:e===`lanes`?W`<div class="debug-overlay__placeholder-lanes">
${[`lane`,`active`,`queued`,`blocked`].map(e=>W`<span>${K(`debug.lanes.${e}`)}</span>`)}
${Array.from({length:12},()=>W`<div class="skeleton debug-overlay__placeholder-line"></div>`)}
</div>`:W`<div class="debug-overlay__placeholder-rows">
${Array.from({length:e===`events`?3:2},()=>W`<div class="skeleton debug-overlay__placeholder-line"></div>`)}
</div>`}
</div>
</div>
`}function Ax(){return W`${Object.values(jx).map(e=>W`<section class="debug-overlay__section" aria-busy="true">
<h3>${K(e.titleKey)}</h3>
${kx(e.id)}
</section>`)}`}var jx;function Mx(){return(Mx=e((()=>{G(),q(),jx={lanes:{id:`lanes`,titleKey:`debug.overlay.lanes`},status:{id:`status`,titleKey:`debug.overlay.status`},"active-runs":{id:`active-runs`,titleKey:`debug.overlay.activeRuns`},events:{id:`events`,titleKey:`debug.overlay.events`}}})))()}function Nx(e){return e?.eventType===`openclaw:debug-overlay-request`&&e.detail&&`mode`in e.detail&&e.detail.mode===`minimized`?`minimized`:`expanded`}function Px(e,t){return Lx({mode:e.pendingDebugOverlayMode,body:t.status===`error`?_n({actionLabel:K(`common.retry`),error:t.error,stale:t.stale,subtitle:t.element.label,onRetry:()=>e.lazyCustomElements.retry()}):Ix(e.pendingDebugOverlayMode),onToggleMode:()=>e.togglePendingDebugOverlayMode(),onClose:()=>e.lazyCustomElements.close()})}function Fx(e,t,n){return e.key===`Escape`&&!e.defaultPrevented&&t!==`closed`&&(t!==`minimized`||n!==null&&e.composedPath().includes(n))}function Ix(e){return e===`minimized`?W`<div class="debug-overlay__compact-loading" role="status">${K(`common.loading`)}</div>`:Ax()}function Lx({mode:e,body:t,onToggleMode:n,onClose:r}){return W`
<aside
${Dx(e)}
class="debug-overlay ${e===`minimized`?`debug-overlay--minimized`:``}"
aria-label=${K(`debug.overlay.title`)}
>
<header
class="debug-overlay__header"
role="group"
tabindex="0"
aria-label=${K(`debug.overlay.move`)}
>
<div>
${e===`minimized`?jn:W`<div class="debug-overlay__eyebrow">${K(`debug.overlay.eyebrow`)}</div>`}
<h2>${K(`debug.overlay.title`)}</h2>
</div>
<div class="debug-overlay__controls">
<button
type="button"
class="debug-overlay__control"
aria-label=${K(e===`minimized`?`debug.overlay.expand`:`debug.overlay.minimize`)}
title=${K(e===`minimized`?`debug.overlay.expand`:`debug.overlay.minimize`)}
@click=${n}
>
${e===`minimized`?Vt.maximize:Vt.minimize}
</button>
<button
type="button"
class="debug-overlay__control debug-overlay__close"
aria-label=${K(`common.close`)}
@click=${r}
>
${Vt.x}
</button>
</div>
</header>
<div class="debug-overlay__body">${t}</div>
</aside>
`}var Rx;function zx(){return(zx=e((()=>{G(),Kt(),Xt(),_t(),q(),Ox(),Mx(),Rx=W`<openclaw-debug-overlay></openclaw-debug-overlay>`})))()}function Bx(e){return e?.current.uploadsEnabled!==!1}function Vx(){return K(`common.uploadsDisabled`)}function Hx(e){if(!Bx(e))throw Error(Vx())}function Ux(){return(Ux=e((()=>{q()})))()}function Wx(e,t=!1){return t||e.phase===`reload-required`?`reload-required`:e.restartPending?`restarting`:e.suspensionPhase===`preparing`||e.suspensionPhase===`draining`?`suspending`:e.suspensionPhase===`prepared`?`suspended`:e.phase===`connecting`||e.phase===`starting`?e.phase:e.phase===`connected`?e.client?.recoveryScopeReady===!1?`restoring`:null:e.offlineStable?e.phase===`reconnecting`?`reconnecting`:`offline`:null}function Gx(){return(Gx=e((()=>{})))()}function Kx(e,t,n,r=!0,i=jn){return Yx(e,t,n,r,i)}function qx(e,t,n,r=jn,i=!0){return W`<openclaw-plugin-view
.kind=${e}
.contributionKey=${t}
.props=${n}
.defaultView=${r}
.presented=${i}
></openclaw-plugin-view>`}var Jx,Yx;function Xx(){return(Xx=e((()=>{me(),G(),Nn(),Tn(),Jx=class extends kn{constructor(...e){super(...e),this.pending=!1}update(e,t){this.args=t;let n=e.options?.host;return n instanceof j&&this.host!==n&&(this.disconnect(),this.host=n),this.connect(),this.render(...t)}connect(){this.isConnected&&this.host&&!this.consumer&&(this.consumer=new be(this.host,{context:bn,subscribe:!0,callback:e=>{this.runtime!==e?.plugins&&(this.unsubscribe?.(),this.runtime=e?.plugins,this.unsubscribe=this.runtime?.subscribe(()=>this.refresh()),this.refresh())}}))}refresh(){this.pending||(this.pending=!0,queueMicrotask(()=>{this.pending=!1,this.isConnected&&this.args&&this.setValue(this.render(...this.args))}))}disconnect(){this.unsubscribe?.(),this.unsubscribe=void 0,this.consumer?.hostDisconnected(),this.consumer&&this.host?.removeController(this.consumer),this.consumer=void 0,this.runtime=void 0}disconnected(){this.disconnect()}reconnected(){this.connect(),this.refresh()}render(e,t,n,r,i){return this.runtime?.selectedReplacement(e)?W`<openclaw-plugin-view
?data-plugin-composer=${e===`composer`}
.surface=${e}
.props=${t}
.defaultView=${n}
.replacementCompanion=${i}
.defaultHost=${this.host}
.presented=${r}
></openclaw-plugin-view>`:n}},Yx=An(Jx)})))()}function Zx(){Qx(`link[rel="icon"][type="image/svg+xml"]`,`favicon.svg`),Qx(`link[rel="icon"][type="image/png"]`,`favicon-32.png`),Qx(`link[rel="apple-touch-icon"]`,`apple-touch-icon.png`),Qx(`link[rel="manifest"]`,`manifest.webmanifest`)}function Qx(e,t){let n=document.querySelector(e);n&&(n.href=Ct(t))}var $x,eS;function tS(){return(tS=e((()=>{if(Et(),gn(),jt(),It(),Ft(),s(),$x=Lt.buildId,eS=document.createElement(`style`),eS.textContent=St.cssText,document.head.append(eS),Zx(),Nt(),Mt(),`serviceWorker`in navigator){let e=new URL(Ct(`sw.js`),window.location.origin);e.searchParams.set(`v`,$x),navigator.serviceWorker.addEventListener(`message`,e=>{Tt(e.data)&&At({canReload:()=>e.source===navigator.serviceWorker.controller}),e.data?.type===`sw-version-probe`&&e.ports[0]?.postMessage({version:$x})});let t=()=>V(async()=>{let{refreshControlUiServiceWorker:e}=await import(`./sw-refresh.runtime-BOQMREZN.js`);return{refreshControlUiServiceWorker:e}},__vite__mapDeps([217,11,2,3,4,5,6,7,8,9,10,1,12,13,14,15,16,17,18,19,28,29,30,31]),import.meta.url).then(({refreshControlUiServiceWorker:e})=>e()).catch(e=>{console.warn(`OpenClaw service worker refresh failed.`,e)});navigator.serviceWorker.addEventListener(`controllerchange`,()=>void t()),navigator.serviceWorker.register(e,{updateViaCache:`none`}).then(t).catch(e=>{console.warn(`OpenClaw service worker registration failed.`,e)})}})))()}export{Rb as $,ql as $a,pa as $c,Od as $i,zr as $l,U_ as $n,_c as $o,_m as $r,Go as $s,my as $t,mx as A,Tu as Aa,Za as Ac,Zd as Ai,Ei as Al,wv as An,pl as Ao,vh as Ar,vs as As,$y as At,_x as B,du as Ba,Xa as Bc,Hd as Bi,bi as Bl,ov as Bn,Ic as Bo,Fm as Br,us as Bs,Ay as Bt,gx as C,Pu as Ca,so as Cc,Lf as Ci,Vi as Cl,Av as Cn,_l as Co,Gh as Cr,Is as Cs,eb as Ct,nr as Cu,yx as D,ku as Da,_o as Dc,hf as Di,ca as Dl,Tv as Dn,ul as Do,jh as Dr,Fs as Ds,sb as Dt,Jn as Du,xx as E,Au as Ea,uo as Ec,If as Ei,aa as El,Dv as En,hl as Eo,Nh as Er,Ps as Es,ab as Et,Xn as Eu,px as F,vu as Fa,Ua as Fc,Qd as Fi,Ai as Fl,dv as Fn,Vc as Fo,sh as Fr,bs as Fs,Uy as Ft,Xb as G,ou as Ga,eo as Gc,zd as Gi,J as Gl,tv as Gn,wc as Go,bm as Gr,Zo as Gs,Oy as Gt,Yb as H,lu as Ha,no as Hc,Wd as Hi,di as Hl,cv as Hn,Pc as Ho,Im as Hr,ls as Hs,Ty as Ht,ax as I,_u as Ia,Ga as Ic,ef as Ii,wi as Il,_v as In,Uc as Io,$m as Ir,ps as Is,Ry as It,qb as J,Xl as Ja,Ha as Jc,Fd as Ji,Qr as Jl,Z_ as Jn,xc as Jo,Dm as Jr,qo as Js,by as Jt,Zb as K,au as Ka,Wa as Kc,Pd as Ki,$r as Kl,$_ as Kn,Cc as Ko,Cm as Kr,Xo as Ks,Ey as Kt,lx as L,gu as La,Ka as Lc,tf as Li,vi as Ll,fv as Ln,Bc as Lo,ah as Lr,ms as Ls,ky as Lt,ux as M,xu as Ma,io as Mc,$d as Mi,Bi as Ml,av as Mn,Kc as Mo,gh as Mr,Es as Ms,Yy as Mt,cx as N,bu as Na,Ja as Nc,df as Ni,Di as Nl,iv as Nn,ll as No,mh as Nr,Ts as Ns,By as Nt,rx as O,Ou as Oa,co as Oc,gf as Oi,Ii as Ol,Ov as On,dl as Oo,wh as Or,Cs as Os,Zy as Ot,Yn as Ou,sx as P,yu as Pa,oo as Pc,Yd as Pi,Ti as Pl,rv as Pn,qc as Po,th as Pr,ys as Ps,zy as Pt,$b as Q,Jl as Qa,fa as Qc,kd as Qi,Br as Ql,J_ as Qn,vc as Qo,vm as Qr,Vo as Qs,hy as Qt,Cx as R,pu as Ra,$a as Rc,qd as Ri,yi as Rl,uv as Rn,zc as Ro,oh as Rr,ds as Rs,Ny as Rt,wx as S,Iu as Sa,mo as Sc,wf as Si,Ui as Sl,Pv as Sn,yl as So,Bg as Sr,Bs as Ss,mb as St,tr as Su,bx as T,ju as Ta,fo as Tc,Sf as Ti,ia as Tl,kv as Tn,gl as To,Qh as Tr,Ls as Ts,hb as Tt,Qn as Tu,Fb as U,cu as Ua,to as Uc,Gd as Ui,ci as Ul,nv as Un,Nc as Uo,Km as Ur,rs as Us,Cy as Ut,ex as V,uu as Va,qa as Vc,Ud as Vi,_i as Vl,sv as Vn,Fc as Vo,zm as Vr,ts as Vs,My as Vt,nx as W,su as Wa,Qa as Wc,Nd as Wi,ri as Wl,ev as Wn,Mc as Wo,Tm as Wr,ns as Ws,wy as Wt,Qb as X,Kl as Xa,va as Xc,Md as Xi,Zr as Xl,Y_ as Xn,bc as Xo,Em as Xr,Wo as Xs,_y as Xt,Ib as Y,Gl as Ya,Aa as Yc,jd as Yi,qr as Yl,X_ as Yn,Dc as Yo,mm as Yr,Yo as Ys,yy as Yt,Pb as Z,Yl as Za,Z as Zc,Ad as Zi,Hr as Zl,q_ as Zn,yc as Zo,hm as Zr,Ho as Zs,gy as Zt,Fx as _,Ju as _a,Co as _c,Ef as _i,Ji as _l,Wv as _n,Tl as _o,Rg as _r,Vs as _s,fb as _t,_r as _u,Gx as a,_d as aa,Fo as ac,pm as ai,ga as al,cy as an,Rl as ao,F_ as ar,cc as as,Db as at,Nr as au,kx as b,Ru as ba,So as bc,xf as bi,Xi as bl,Bv as bn,Sl as bo,Ug as br,Hs as bs,lb as bt,lr as bu,Ux as c,ld as ca,No as cc,kp as ci,oa as cl,ny as cn,Fl as co,P_ as cr,ec as cs,wb as ct,Or as cu,Rx as d,Qu as da,Eo as dc,Jf as di,X as dl,ey as dn,jl as do,Xg as dr,Zs as ds,yb as dt,Er as du,Dd as ea,zo as ec,gm as ei,ra as el,py as en,Wl as eo,V_ as er,mc as es,Mb as et,Ur as eu,zx as f,Zu as fa,Do as fc,Uf as fi,Hi as fl,Qv as fn,Al as fo,Qg as fr,Ys as fs,vb as ft,Dr as fu,Px as g,Uu as ga,yo as gc,Af as gi,ea as gl,Jv as gn,El as go,Ig as gr,Us as gs,tb as gt,wr as gu,Ix as h,Wu as ha,jo as hc,zf as hi,qi as hl,Kv as hn,Dl as ho,qg as hr,Ks as hs,ub as ht,K as hu,Kx as i,sd as ia,Lo as ic,fm as ii,Wi as il,ly as in,zl as io,R_ as ir,lc as is,Ob as it,Lr as iu,hx as j,wu as ja,ao as jc,uf as ji,Li as jl,xv as jn,cl as jo,_h as jr,_s as js,Vy as jt,fx as k,Du as ka,po as kc,Xd as ki,Ri as kl,Ev as kn,ml as ko,Sh as kr,Ns as ks,Xy as kt,Kn as ku,Vx as l,$u as la,Oo as lc,Ap as li,la as ll,Zv as ln,Pl as lo,__ as lr,$s as ls,xb as lt,jr as lu,Lx as m,Xu as ma,xo as mc,Wf as mi,ua as ml,Gv as mn,Ol as mo,Jg as mr,qs as ms,rb as mt,Tr as mu,Xx as n,Td as na,Io as nc,Sm as ni,Q as nl,fy as nn,Vl as no,B_ as nr,dc as ns,kb as nt,Vr as nu,Wx as o,hd as oa,Ro as oc,sm as oi,$i as ol,iy as on,Ll as oo,I_ as or,sc as os,Eb as ot,Ar as ou,Nx as p,Yu as pa,vo as pc,Gf as pi,Ki as pl,Xv as pn,kl as po,Yg as pr,Js as ps,bb as pt,Cr as pu,Kb as q,iu as qa,ja as qc,Id as qi,Y as ql,Q_ as qn,Ec as qo,wm as qr,Ko as qs,xy as qt,qx as r,cd as ra,Po as rc,ym as ri,_a as rl,uy as rn,Bl as ro,z_ as rr,uc as rs,Ab as rt,Mr as ru,Hx as s,vd as sa,Mo as sc,cm as si,Qi as sl,ry as sn,Il as so,N_ as sr,oc as ss,Cb as st,kr as su,tS as t,ud as ta,Bo as tc,xm as ti,ta as tl,dy as tn,Ul as to,H_ as tr,pc as ts,jb as tt,Rr as tu,Bx as u,ed as ua,ko as uc,Np as ui,Gi as ul,Yv as un,Ml as uo,h_ as ur,Qs as us,Sb as ut,q as uu,jx as v,Bu as va,wo as vc,Of as vi,Zi as vl,zv as vn,wl as vo,zg as vr,Ws as vs,_b as vt,vr as vu,dx as w,Mu as wa,lo as wc,Cf as wi,na as wl,jv as wn,vl as wo,ag as wr,Rs as ws,ob as wt,rr as wu,Tx as x,Lu as xa,To as xc,Df as xi,sa as xl,Fv as xn,xl as xo,Fg as xr,zs as xs,db as xt,ur as xu,Mx as y,zu as ya,bo as yc,Hf as yi,Yi as yl,Uv as yn,Cl as yo,Lg as yr,Gs as ys,pb as yt,dr as yu,vx as z,fu as za,Ya as zc,Jd as zi,xi as zl,lv as zn,Lc as zo,Qm as zr,fs as zs,jy as zt};