@inkeep/open-knowledge 0.85.0-beta.8 → 0.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/skills/project/references/doc-editing.md +1 -3
- package/dist/cli.mjs +58 -58
- package/dist/constants-TNJVUahv.mjs +1 -0
- package/dist/{dist-C88EFTff.mjs → dist-4xO55Yaw.mjs} +1 -1
- package/dist/dist-Bkpf6l5f.mjs +2212 -0
- package/dist/index.d.mts +1 -33
- package/dist/index.mjs +209 -209
- package/dist/init-CVCNY4Ls.mjs +1 -0
- package/dist/{init-D7PlEegF.mjs → init-DkjNMYlz.mjs} +9 -9
- package/dist/{launch-json-removal-D9SwwoqN.mjs → launch-json-removal-a4E1YMn5.mjs} +1 -1
- package/dist/loader-DRmyM_aE.mjs +1 -0
- package/dist/{loader-B6EbvYkG.mjs → loader-ucwkbXZa.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-BXD2ehDb.mjs → md-manager-BGnqyqi1-CDSS__qm.mjs} +125 -125
- package/dist/{open-browser-Dz0M-5l3.mjs → open-browser-sLXj2Tjq.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-BEmA3MKx.mjs → preview-D_ZiJu7g.mjs} +1 -1
- package/dist/preview-Dcj4w_f3.mjs +1 -0
- package/dist/public/assets/{AccountSection-CAc6UOnq.js → AccountSection-BEKd-tkM.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-DJynIwUP.js → ActivityModeContent-DrbbsE_-.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-DbEuq3sM.js → AddPropertiesButton-DoCpp2QW.js} +2 -2
- package/dist/public/assets/{AgentConnectionsSection-PbNqCjhO.js → AgentConnectionsSection-BOlCjbB0.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-D1R52IAC.js → AgentDiffPane-CtNtZb9V.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-CwzmF_oJ.js → AttachmentsSection-DackfQ_s.js} +1 -1
- package/dist/public/assets/{AuthModal-B97W2kBc.js → AuthModal-7ZC-1yVV.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CIKjKCws.js → CodeMirrorPropInput-DvKu95Lo.js} +3 -3
- package/dist/public/assets/{ContentRulesSection-qOrpB7KF.js → ContentRulesSection-DtplCATO.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-CukzuN1M.js → DiffViewBoundary-Cue9UIPe.js} +1 -1
- package/dist/public/assets/{DocumentContext-Dpy4ql5Q.js → DocumentContext-BH42QH54.js} +4 -4
- package/dist/public/assets/{EditorModeToggle-DTbhRtHs.js → EditorModeToggle-DnKwTnbn.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-B2xUOvkW.js → ExcalidrawDocEditor-Bgw6T9Fb.js} +1 -1
- package/dist/public/assets/FeedbackForm-h13skg8D.js +1 -0
- package/dist/public/assets/{GraphPanel-CbRFSjv5.js → GraphPanel-BmqiikMo.js} +2 -2
- package/dist/public/assets/{ImageAttachments-DmZlAyNH.js → ImageAttachments-Dd_h_7LM.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CyfVZKqf.js → ImportSkillDialog-C4_lHSx9.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-CF_3Yekj.js → LinkPreviewsSection-DQxmONPl.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CHV8ivfk.js → LintConfigEditor-BMxjC7yE.js} +1 -1
- package/dist/public/assets/{LintingSection-BRRp1vEf.js → LintingSection-B-IUi1Qd.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-Bl8aGLz1.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-DbGm48tE.js → ManagedArtifactProperties-Jf0t9Hbp.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-Cg5l17ho.js → MermaidDocEditor-CRbSyiuH.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-CWnE5RB-.js → NetworkAccessSection-DJggS7b-.js} +1 -1
- package/dist/public/assets/{OkignoreSection-Dg2isYSX.js → OkignoreSection-DYAQ4Haz.js} +1 -1
- package/dist/public/assets/{PageListContext-B4oUr1KZ.js → PageListContext-DgTeRFU-.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-BQRFn0aR.js → ProjectTemplatesSection-oiahzFKw.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DPpqKedg.js → PropertyDisplayRow-D4PvPcj8.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-C8Z4c1cR.js → PublishToGitHubDialog-DW5fQKKa.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-CNf09bvo.js → RegisteredAgentIcon-DKZ8eOKZ.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-DokEvc7U.js → ReportBugDialogBody-DoHfZBJP.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-BSorqVCo.js → ReportBugMenuTrigger-B7ha_vzT.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DqdcRzYD.js → SchemaConfigEditor-NA0BTi-e.js} +1 -1
- package/dist/public/assets/{SearchSection-BQFA9q-a.js → SearchSection-Cr2ZiTwI.js} +1 -1
- package/dist/public/assets/{SessionsHost-5rMutJWH.js → SessionsHost-DFL-snqS.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CRRd_5fA.js → SettingsDialogBody-M1HGNylA.js} +2 -2
- package/dist/public/assets/{ShareBranchSwitchDialog-BVpHAvAz.js → ShareBranchSwitchDialog-BqfHGl0s.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-DuE0Io5t.js → ShareReceiveDialog-CxPIsiXq.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-WEyChUmK.js → ShareReceiveMissDialog-BxMzxo4C.js} +1 -1
- package/dist/public/assets/{SkillCostValue-BAFvtN-A.js → SkillCostValue-DPX8ruMM.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-DK0im2ZH.js → SkillForkDialog-BB_XS1nP.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-BVEHbRUy.js → SkillInstallMenu-CAjgsxCn.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-CeyDfqua.js → SkillOriginInline-D1tWqOqr.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-GO9DY9uH.js → SkillToolbarControls-BnM0BcVL.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-BY_rUJ96.js → SkillsManagerSection-B0OJHWNm.js} +1 -1
- package/dist/public/assets/{SlidesPluginSection-qj2ynzJw.js → SlidesPluginSection-Bi8J2lVH.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-OD5hTRCr.js → SlidesToolbarControls-CqXBuf70.js} +1 -1
- package/dist/public/assets/{SourceEditor-DwYtJEqZ.js → SourceEditor-DdxSAmDx.js} +1 -1
- package/dist/public/assets/{SpellingSettings-BvzNDT7g.js → SpellingSettings-Dkdy9B2q.js} +1 -1
- package/dist/public/assets/{SyncSection-CSV4Q3-z.js → SyncSection-DH3epVLR.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-DmKujoEJ.js → SyncStatusBadge-DrRCeCvZ.js} +1 -1
- package/dist/public/assets/{TemplateRow-PUB19e3g.js → TemplateRow-DoNZxhIJ.js} +1 -1
- package/dist/public/assets/{TerminalLaunchContext-DncO203O.js → TerminalLaunchContext-Cwrrh5Ck.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CNyrqROa.js → TerminalPanel-C5LSq4fA.js} +1 -1
- package/dist/public/assets/{TerminalSection-CRjm8wzK.js → TerminalSection-DU8swJ-Q.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-5Yzprb2g.js → TerminalWindowApp-CeS0EeFD.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Baf4tcry.js → TextDocEditor-DR9-rMdW.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-C4i43nY3.js → ThemePluginSection-BT1NQe1R.js} +2 -2
- package/dist/public/assets/{ThreadView-hUBkJ35P.js → ThreadView-Cp69nJvv.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BohOVaCv.js → TimelineDiffPane-BfAbyPCH.js} +1 -1
- package/dist/public/assets/_envelope-g8Le8UBe-6j_3zVcA.js +1 -0
- package/dist/public/assets/{agent-connections-Dj9-89rY.js → agent-connections-CykO_Ezy.js} +1 -1
- package/dist/public/assets/{agent-registry-CUdBP9oP.js → agent-registry-pREadnY_.js} +1 -1
- package/dist/public/assets/{bridge-D0M08jrS.js → bridge-D8Oy74FE.js} +3 -3
- package/dist/public/assets/{card-13ChSYBD.js → card-DJoKetZ9.js} +1 -1
- package/dist/public/assets/{catalog-eC0BYrwO.js → catalog-CJ_rs_wb.js} +1 -1
- package/dist/public/assets/{client-version-BpvzLe36.js → client-version-09D8u2lP.js} +1 -1
- package/dist/public/assets/{comment-chips-CZj3Fghj.js → comment-chips-aOK6IXhP.js} +1 -1
- package/dist/public/assets/{config-provider-OflyhMYP.js → config-provider-m9Ao-f9D.js} +2 -2
- package/dist/public/assets/config-schema-Dh_H8E-u.js +1 -0
- package/dist/public/assets/{css-color-to-hex-9GaMLm_g.js → css-color-to-hex-Cjxd2Xbp.js} +1 -1
- package/dist/public/assets/{diagnostic-breadcrumb-DPgUDxA8.js → diagnostic-breadcrumb-Cr0C15nJ.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-lMyCDpKw.js → doc-undo-manager-BNDPNoYq.js} +1 -1
- package/dist/public/assets/field-controls-C6S4B1Im.js +1 -0
- package/dist/public/assets/{field-controls-Dzoda-yy.js → field-controls-DSwLWrMh.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-0APd5Uqe.js → file-tree-adapter-BeSKxnyg.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BPUSn1l0.js → file-tree-utils-DUpeRMj2.js} +1 -1
- package/dist/public/assets/folder-config-api-Db5-uEQR.js +1 -0
- package/dist/public/assets/{frontmatter-tags-BEkbJ1mW.js → frontmatter-tags-CoOxl3mC.js} +1 -1
- package/dist/public/assets/{handoff-Ccrokk1b.js → handoff-pwpLEUcJ.js} +1 -1
- package/dist/public/assets/{index-CtLXsR8v.js → index-EQxoHYsz.js} +13 -13
- package/dist/public/assets/{lint-config-client-DNaT4xzp.js → lint-config-client-DDZrpVHz.js} +1 -1
- package/dist/public/assets/{lint-plugins-Denw4h4y.js → lint-plugins-DjZCf7i3.js} +1 -1
- package/dist/public/assets/{markdown-lint-Bm1176Wf.js → markdown-lint-DeZBsw3J.js} +3 -3
- package/dist/public/assets/{markdownlint-rule-browser-0hwXUugA.js → markdownlint-rule-browser-60Esn3tM.js} +1 -1
- package/dist/public/assets/{navigation-targets-CcY2FHJZ.js → navigation-targets-DTSxcGor.js} +1 -1
- package/dist/public/assets/{page-list-cache-B9RqU_KB.js → page-list-cache-BNFVKu-D.js} +1 -1
- package/dist/public/assets/parse-api-error-B5EVRh3T.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-ienh9z35.js → pending-receive-nav-store-CTKqE4f9.js} +1 -1
- package/dist/public/assets/{perf-CPPbaRwr.js → perf-DZJpLc5j.js} +1 -1
- package/dist/public/assets/{preferred-session-events-DXwjk8-J.js → preferred-session-events-D3VKdVs1.js} +1 -1
- package/dist/public/assets/{progress-70K6FIt8.js → progress-BUhjQpqL.js} +1 -1
- package/dist/public/assets/{receive-store-CnWTih4w.js → receive-store-O9cRwWtJ.js} +1 -1
- package/dist/public/assets/saved-themes-client-ByYw6oZt.js +1 -0
- package/dist/public/assets/{schema-section-DFiSaK5s.js → schema-section-C8DGjvNX.js} +1 -1
- package/dist/public/assets/schemas-api-CQHNNDP6.js +112 -0
- package/dist/public/assets/{selection-context-DYdSNd6N.js → selection-context-CXQ2g-vC.js} +1 -1
- package/dist/public/assets/{skills-api-B9YEcMtk.js → skills-api-B7NWq2mZ.js} +1 -1
- package/dist/public/assets/{src-DQAsmuTd.js → src-BW92GkqF.js} +1 -1
- package/dist/public/assets/{startup-marks-YB3zPCjL.js → startup-marks-aftNzVFI.js} +1 -1
- package/dist/public/assets/storage-scope-lp6Y3sn1.js +1 -0
- package/dist/public/assets/{tag-pill-input-CUjBNOlr.js → tag-pill-input-C9tJ_ebG.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-OCgrT_rG.js → target-navigation-intent-D7IZjXLN.js} +1 -1
- package/dist/public/assets/{telemetry-impl-Qt0R8fsM.js → telemetry-impl-BGTG-dVN.js} +1 -1
- package/dist/public/assets/{telemetry-startup-CpnPkk1U.js → telemetry-startup-Dnz5Cf32.js} +1 -1
- package/dist/public/assets/terminal-cli-display-Bn8rI2FY.js +1 -0
- package/dist/public/assets/{terminal-command-events-YJjbnpwG.js → terminal-command-events-DYVYsw0p.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-C_GWUJjY.js → terminal-launch-events-C1I24zal.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-zGdk134c.js → typing-burst-detector-DiJWNHNK.js} +2 -2
- package/dist/public/assets/{use-activity-panel-DfL_rV-q.js → use-activity-panel-ZGbJVtoL.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-D0H8BLH0.js → use-apply-config-color-theme-B9f6n0Cd.js} +2 -2
- package/dist/public/assets/{use-conflicts-CIO4TSqq.js → use-conflicts-BJFBAg9M.js} +1 -1
- package/dist/public/assets/{use-installed-clis-CTgVOGN1.js → use-installed-clis-98lB00dU.js} +2 -2
- package/dist/public/assets/{use-live-xterm-theme-D4ySF_-p.js → use-live-xterm-theme-CMmPbV7u.js} +1 -1
- package/dist/public/assets/{use-open-skill-DfkvZ_Bu.js → use-open-skill-Nru-PAlE.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-CRBCNkG6.js → use-semantic-search-status-Cqw3SIgk.js} +1 -1
- package/dist/public/assets/{use-skill-origin-C4Hj71IE.js → use-skill-origin-f6iU7bK5.js} +1 -1
- package/dist/public/assets/{use-skill-targets-9Csbq0fG.js → use-skill-targets-CcZTp1aJ.js} +1 -1
- package/dist/public/assets/{use-skills-BzbDGc60.js → use-skills-D4I9tjyB.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CI-0DBdj.js → use-terminal-enabled-DnnXtaEs.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-RE38BXhc.js → use-timeline-entry-diff-Bu0jft5W.js} +2 -2
- package/dist/public/assets/{use-workspace-eebQ7TvN.js → use-workspace-CF2-WOaH.js} +1 -1
- package/dist/public/index.html +70 -70
- package/dist/{registry-probes-BH2uw5Jf.mjs → registry-probes-CRUm2aMY.mjs} +3 -3
- package/dist/{removal-file-path-BuUAo5vC.mjs → removal-file-path-DVMcCry_.mjs} +1 -1
- package/dist/{repair-launch-json-BozJA4K5.mjs → repair-launch-json-DOfAd3oZ.mjs} +1 -1
- package/dist/{repair-mcp-configs-D8UQE5Ig.mjs → repair-mcp-configs-C4c5EcIG.mjs} +1 -1
- package/dist/src-CNTwiJdN.mjs +14 -0
- package/dist/src-DkLULCOE.mjs +1 -0
- package/dist/start-C3Psdi4z.mjs +1 -0
- package/dist/{start-DdbwQecd.mjs → start-DxGMMch9.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-6nYvEHuj.mjs +0 -1
- package/dist/dist-Dizk2k7y.mjs +0 -2212
- package/dist/init-CUuZYRCr.mjs +0 -1
- package/dist/loader-DO_qCug3.mjs +0 -1
- package/dist/preview-CbAbyGAf.mjs +0 -1
- package/dist/public/assets/FeedbackForm-DhmoszxQ.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-kzAj26e2.js +0 -1
- package/dist/public/assets/_envelope-DwyyiIO_-B2czcEJX.js +0 -1
- package/dist/public/assets/config-schema-C_UAFDLp.js +0 -1
- package/dist/public/assets/field-controls-nUgQuwqO.js +0 -1
- package/dist/public/assets/folder-config-api-CVKiiPvW.js +0 -1
- package/dist/public/assets/parse-api-error-CeEVOj25.js +0 -1
- package/dist/public/assets/saved-themes-client-DfS9q8l3.js +0 -1
- package/dist/public/assets/schemas-api-DbKS2FSh.js +0 -112
- package/dist/public/assets/storage-scope-DTSZLReS.js +0 -1
- package/dist/public/assets/terminal-cli-display-Dfy7Rj7j.js +0 -1
- package/dist/src-BVRsIRXH.mjs +0 -14
- package/dist/src-W8Lzxzm1.mjs +0 -1
- package/dist/start-NiFudUEJ.mjs +0 -1
- /package/dist/public/assets/{constants-github-B7yhDvQc.js → constants-github-DOek7bCt.js} +0 -0
- /package/dist/public/assets/{doc-extensions-CcO7K8uD-DG9uHV54.js → doc-extensions-CcO7K8uD-B004ggqh.js} +0 -0
- /package/dist/public/assets/{logging-renderer-log-CqIZVUIQ.js → logging-renderer-log-Bvxj7ztp.js} +0 -0
- /package/dist/public/assets/{share-D-LUU2aX-B7Yg0G_m.js → share-D-LUU2aX-DfD-mrg-.js} +0 -0
- /package/dist/public/assets/{util-doc-name-DRKmy6g9.js → util-doc-name-D-_o-n0R.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./AgentIconCluster-Qf_VPGzc.js";import{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./alert-dialog-BA3e7-10.js";import{t as y}from"./checkbox-CKD8LETI.js";import{t as b}from"./label-CvMpFFbN.js";import{t as x}from"./button-DzgjsZzC.js";import{t as S}from"./dist-C_FzPxEX2.js";import{t as C}from"./constants-product-C4Nt9vD3.js";import{r as w}from"./schemas-api-DbKS2FSh.js";import{a as T,c as E,n as D,r as O,s as k}from"./constants-editors-DLxv8SuP.js";import{b as A}from"./handoff-Ccrokk1b.js";import{c as j,d as M,f as N,h as P,i as F,n as I,r as L,t as R,u as ee}from"./agent-registry-CUdBP9oP.js";import{t as te}from"./folder-QqUoFRPR.js";import{t as z}from"./info-CyR0W2SK.js";import{t as ne}from"./monitor-IXzxTnmk.js";import{t as B}from"./sparkles-BS2TX_Um.js";import{t as V}from"./triangle-alert-BXrUEeRU.js";import{t as H}from"./x-DM2drskU.js";import{t as re}from"./badge-DmdA1C7r.js";import{a as ie,c as ae,i as oe,n as se,o as ce,s as le,t as ue}from"./dialog-BJEjKJjL.js";import{c as de,l as fe,n as U,s as pe,t as W}from"./field-DFJgKWGh.js";import{t as G}from"./constants-skills-BLHVRW90.js";import{t as K}from"./tool-list-format-CS7MZY1Q.js";var q=e(n(),1),J=a();function Y(e){if(e===void 0)return null;let t=P(e);if(t===null)return null;if(t.kind===`central-skill-store`)return`~/${G}/`;switch(t.kind){case`editor-project-config`:return E[t.editor];case`editor-project-skill-root`:{let e=O[t.editor];return e===null?null:`${e}/${k}/`}case`editor-user-skill-root`:{let e=T[t.editor];return e===null?null:`~/${e}/`}case`editor-user-config`:return null}}function me(e,t){if(e===void 0||t.length===0)return[];let n=P(e);return n===null||n.kind===`central-skill-store`?[]:t.map(e=>Y(`${n.kind}:${e}`)).filter(e=>e!==null)}function he(){return(typeof window>`u`?null:window.okDesktop?.mcpServerName)||null}function ge(){return he()??`OpenKnowledge`}function _e(e){return typeof e==`string`&&e!==``?e:he()??C.stable.mcpServerName}function X(e){return typeof e==`string`?D[e]??e:null}function ve(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`guidance.mcp.user-config`:return S._({id:`guidance.mcp.user-config`,values:{agent:t}});case`guidance.mcp.project-config`:return S._({id:`guidance.mcp.project-config`,values:{agent:t}});case`guidance.mcp.session-injection`:return S._({id:`guidance.mcp.session-injection`,values:{agent:t}});case`guidance.mcp.managed-file`:return S._({id:`guidance.mcp.managed-file`,values:{agent:t}});case`guidance.skill.project`:return S._({id:`guidance.skill.project`,values:{agent:t}});case`guidance.skill.user`:return S._({id:`guidance.skill.user`,values:{agent:t}});case`guidance.skill.central-store`:return S._({id:`guidance.skill.central-store`,values:{agent:t}});default:return null}}function ye(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`troubleshooting.claude.project-entry-not-approved`:return S._({id:`troubleshooting.claude.project-entry-not-approved`,values:{agent:t}});case`troubleshooting.claude-desktop.per-tool-approval`:return S._({id:`troubleshooting.claude-desktop.per-tool-approval`,values:{agent:t}});case`troubleshooting.cursor.project-entry-not-loaded`:{let n=_e(e.params?.server);return S._({id:`troubleshooting.cursor.project-entry-not-loaded`,values:{agent:t,server:n}})}case`troubleshooting.codex.folder-trust`:return S._({id:`troubleshooting.codex.folder-trust`,values:{agent:t}});case`troubleshooting.codex.desktop-project-config`:return e.params?.honoredByDesktop===!0?null:S._({id:`troubleshooting.codex.desktop-project-config`,values:{agent:t}});case`troubleshooting.copilot.shared-workspace-config`:{let n=X(e.params?.sourceAgent)??``;return S._({id:`troubleshooting.copilot.shared-workspace-config`,values:{agent:t,sourceAgent:n}})}case`troubleshooting.openclaw.central-store-missing`:return S._({id:`troubleshooting.openclaw.central-store-missing`,values:{agent:t}});case`troubleshooting.pi.folder-trust`:return S._({id:`troubleshooting.pi.folder-trust`,values:{agent:t}});case`troubleshooting.lm-studio.config-path-mismatch`:return S._({id:`troubleshooting.lm-studio.config-path-mismatch`,values:{agent:t}});default:return null}}function Z(e){return e?.closest(`section`)?.querySelector(`h4`)??null}var Q=t(),be={projectMcp:!1,projectSkill:!1,globalMcp:!1,discoverySkill:!1},xe=[`projectMcp`,`projectSkill`,`globalMcp`,`discoverySkill`],Se={projectMcp:`project`,projectSkill:`project`,globalMcp:`machine`,discoverySkill:`machine`};function Ce(e,t){return xe.flatMap(n=>{if(Se[n]!==t)return[];let r=e.cells[n];return r===void 0?[]:[[n,r]]})}function $(e){return e.disabledReason!==null}function we(e){let t=new Set,n=new Map;for(let[r,i]of e){let e=[];if(i.checked&&!$(i))for(let n of i.troubleshooting){if(t.has(n.id))continue;let r=ye(n);r!==null&&(t.add(n.id),e.push({id:n.id,text:r}))}n.set(r,e)}return n}function Te(e){return e.scope===`project`&&e.piece===`mcp`?`projectMcp`:e.scope===`project`&&e.piece===`skill`?`projectSkill`:e.scope===`user`&&e.piece===`mcp`?`globalMcp`:e.scope===`user`&&e.piece===`skill`?`discoverySkill`:null}function Ee(e){if(!j.includes(e.agentId))return null;let t=e.agentId,n={};for(let t of e.scopes)for(let e of t.cells){let t=Te(e);t!==null&&(n[t]=e)}return{id:t,label:De(t),row:e,cells:n}}function De(e){return D[e]}function Oe(e){let t=(0,J.c)(5),{agentId:n,className:r}=e;if(n===`lm-studio`){let e;return t[0]===r?e=t[1]:(e=(0,Q.jsx)(B,{"aria-hidden":!0,className:r,strokeWidth:1.5}),t[0]=r,t[1]=e),e}let i;return t[2]!==n||t[3]!==r?(i=(0,Q.jsx)(o,{host:n,"aria-hidden":!0,className:r}),t[2]=n,t[3]=r,t[4]=i):i=t[4],i}function ke(e,{forceDetected:t=[]}={}){return I({agentIds:j,probes:e.probes,detection:{...e.detection,detected:[...e.detection.detected,...t]}}).rows.flatMap(e=>{let t=Ee(e);return t===null?[]:[t]})}function Ae(e){return A.some(t=>N(t)===e)&&ee.some(t=>M(t.id)===e)}function je(e){return{projectMcp:e.cells.projectMcp?.checked===!0,projectSkill:e.cells.projectSkill?.checked===!0,globalMcp:e.cells.globalMcp?.checked===!0,discoverySkill:e.cells.discoverySkill?.checked===!0}}function Me(e){let t=je(e);return Ne(t)>0?t:Object.fromEntries(xe.map(t=>{let n=e.cells[t];return[t,n!==void 0&&!$(n)&&!F(n.state)]}))}function Ne(e){return Object.values(e).filter(Boolean).length}function Pe(e){return Object.values(e.cells).some(e=>!$(e))}function Fe(e){let t=Object.values(e.cells);return t.length>0&&t.every(e=>e.checked)}function Ie(e){let t=(0,J.c)(10),{children:n}=e,{_:r}=i(),a;t[0]===r?a=t[1]:(a=r({id:`kjrq_8`}),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(z,{"aria-hidden":!0}),t[2]=o):o=t[2];let u;t[3]===a?u=t[4]:(u=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,"aria-label":a,children:o})}),t[3]=a,t[4]=u);let d;t[5]===n?d=t[6]:(d=(0,Q.jsx)(c,{className:`max-w-72`,children:n}),t[5]=n,t[6]=d);let f;return t[7]!==u||t[8]!==d?(f=(0,Q.jsxs)(l,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f}function Le(e){let t=(0,J.c)(16),{message:n,path:r,info:a}=e,{_:o}=i(),u;t[0]===o?u=t[1]:(u=o({id:`bn_MDX`}),t[0]=o,t[1]=u);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(V,{"aria-hidden":!0}),t[2]=d):d=t[2];let f;t[3]===u?f=t[4]:(f=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,className:`text-amber-700 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-400`,"aria-label":u,children:d})}),t[3]=u,t[4]=f);let p;t[5]===n?p=t[6]:(p=(0,Q.jsx)(`span`,{className:`font-medium`,children:n}),t[5]=n,t[6]=p);let m;t[7]===r?m=t[8]:(m=r===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:r}),t[7]=r,t[8]=m);let h;t[9]!==a||t[10]!==p||t[11]!==m?(h=(0,Q.jsx)(c,{className:`max-w-72`,children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[p,a,m]})}),t[9]=a,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;return t[13]!==f||t[14]!==h?(g=(0,Q.jsxs)(l,{children:[f,h]}),t[13]=f,t[14]=h,t[15]=g):g=t[15],g}function Re(e){let t=(0,J.c)(51),{id:n,checked:r,disabled:a,exception:o,state:s,title:c,description:l,info:u,path:d,sharedPaths:f,alsoAffects:p,notes:m,onCheckedChange:h}=e,{_:g}=i(),_=o===`warning`||o===`error`,v;t[0]!==g||t[1]!==_||t[2]!==s?(v=_?g(s===`foreign`?{id:`tCE-ZH`}:s===`foreign-replaceable`?{id:`KTxoDA`}:{id:`8wwkVu`}):null,t[0]=g,t[1]=_,t[2]=s,t[3]=v):v=t[3];let x=v,S=x===null?void 0:`${n}-warning`,C=p===null?void 0:`${n}-shared`,w;t[4]!==C||t[5]!==S?(w=[S,C].filter(Boolean).join(` `)||void 0,t[4]=C,t[5]=S,t[6]=w):w=t[6];let T=w,E=a||void 0,D;t[7]===h?D=t[8]:(D=e=>h(e===!0),t[7]=h,t[8]=D);let O;t[9]!==r||t[10]!==T||t[11]!==a||t[12]!==n||t[13]!==D?(O=(0,Q.jsx)(`div`,{className:`flex h-7 items-center`,children:(0,Q.jsx)(y,{id:n,checked:r,disabled:a,"aria-describedby":T,onCheckedChange:D})}),t[9]=r,t[10]=T,t[11]=a,t[12]=n,t[13]=D,t[14]=O):O=t[14];let k;t[15]===c?k=t[16]:(k=(0,Q.jsx)(fe,{children:c}),t[15]=c,t[16]=k);let A;t[17]!==n||t[18]!==k?(A=(0,Q.jsx)(b,{htmlFor:n,className:`cursor-pointer`,children:k}),t[17]=n,t[18]=k,t[19]=A):A=t[19];let j;t[20]!==a||t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==x?(j=x===null?(0,Q.jsx)(Ie,{children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[u,d===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:d}),f.map(Be)]})}):(0,Q.jsx)(Le,{message:x,path:d,info:a?null:u}),t[20]=a,t[21]=u,t[22]=d,t[23]=f,t[24]=x,t[25]=j):j=t[25];let M;t[26]!==A||t[27]!==j?(M=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[A,j]}),t[26]=A,t[27]=j,t[28]=M):M=t[28];let N;t[29]===l?N=t[30]:(N=(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:l}),t[29]=l,t[30]=N);let P;t[31]!==n||t[32]!==m?(P=m.length===0?null:(0,Q.jsx)(`div`,{className:`flex flex-col gap-1.5`,"data-testid":`${n}-troubleshooting`,children:m.map(ze)}),t[31]=n,t[32]=m,t[33]=P):P=t[33];let F;t[34]!==g||t[35]!==p||t[36]!==C?(F=p===null?null:(0,Q.jsx)(`p`,{id:C,className:`text-sm leading-relaxed text-amber-700 dark:text-amber-400`,children:g({id:`qze9od`,values:{alsoAffects:p}})}),t[34]=g,t[35]=p,t[36]=C,t[37]=F):F=t[37];let I;t[38]!==x||t[39]!==S?(I=S===void 0?null:(0,Q.jsx)(`span`,{id:S,className:`sr-only`,children:x}),t[38]=x,t[39]=S,t[40]=I):I=t[40];let L;t[41]!==N||t[42]!==P||t[43]!==F||t[44]!==I||t[45]!==M?(L=(0,Q.jsxs)(U,{children:[M,N,P,F,I]}),t[41]=N,t[42]=P,t[43]=F,t[44]=I,t[45]=M,t[46]=L):L=t[46];let R;return t[47]!==L||t[48]!==E||t[49]!==O?(R=(0,Q.jsxs)(W,{orientation:`horizontal`,className:`items-start gap-3`,"data-disabled":E,children:[O,L]}),t[47]=L,t[48]=E,t[49]=O,t[50]=R):R=t[50],R}function ze(e){return(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e.text},e.id)}function Be(e){return(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:e},e)}function Ve(e,t){let n=e.cells[t];return n===void 0?!1:!$(n)}function He(e){let t=(0,J.c)(81),{part:n,cell:a,notes:o,draft:s,setPart:c}=e,{i18n:l,_:u}=i(),d;t[0]===a?d=t[1]:(d=$(a),t[0]=a,t[1]=d);let f=d,p;t[2]===u?p=t[3]:(p=u({id:`ggMMa7`}),t[2]=u,t[3]=p);let m;t[4]===u?m=t[5]:(m=u({id:`LtiJ5c`}),t[4]=u,t[5]=m);let h;t[6]===u?h=t[7]:(h=u({id:`2gXnCO`}),t[6]=u,t[7]=h);let g;t[8]===u?g=t[9]:(g=u({id:`ejiJeW`}),t[8]=u,t[9]=g);let _;t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==g?(_={projectMcp:p,projectSkill:m,globalMcp:h,discoverySkill:g},t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_):_=t[14];let v=_,y;if(t[15]!==u||t[16]!==a.agentId||t[17]!==a.disabledReason||t[18]!==a.exception||t[19]!==a.guidance||t[20]!==a.pathId||t[21]!==a.piece||t[22]!==a.resolvedPath||t[23]!==a.sharedFolderWith||t[24]!==a.state||t[25]!==f||t[26]!==s||t[27]!==l||t[28]!==o||t[29]!==n||t[30]!==c||t[31]!==v){y=Symbol.for(`react.early_return_sentinel`);bb0:{let e={foreign:u({id:`tCE-ZH`}),"structural-na":u({id:`3n7lnE`}),"not-installable":u({id:`BMoSQy`}),"agent-undetected":u({id:`mdWhUY`})},i=function(){let t=a.disabledReason;return t==null?u({id:`RXYvxn`}):e[t]},d;if(t[33]!==u||t[34]!==a.state){let e=ge();d=a.state===`foreign-replaceable`?u({id:`uOKoBM`,values:{server:e}}):null,t[33]=u,t[34]=a.state,t[35]=d}else d=t[35];let p=d,m;t[36]!==a.piece||t[37]!==a.sharedFolderWith||t[38]!==l?(m=a.piece===`skill`&&a.sharedFolderWith.length>0?K(a.sharedFolderWith.map(nt),l.locale):null,t[36]=a.piece,t[37]=a.sharedFolderWith,t[38]=l,t[39]=m):m=t[39];let h=m,g=a.exception,_=g===`warning`||g===`error`,b;t[40]!==a.pathId||t[41]!==a.sharedFolderWith?(b=me(a.pathId,a.sharedFolderWith),t[40]=a.pathId,t[41]=a.sharedFolderWith,t[42]=b):b=t[42];let x=b,S;t[43]===a.guidance?S=t[44]:(S=ve(a.guidance),t[43]=a.guidance,t[44]=S);let C=S,w=`${a.agentId}-${n}`,T=s[n],E;t[45]!==a.pathId||t[46]!==a.resolvedPath||t[47]!==f||t[48]!==_?(E=f&&!_?null:a.resolvedPath??Y(a.pathId),t[45]=a.pathId,t[46]=a.resolvedPath,t[47]=f,t[48]=_,t[49]=E):E=t[49];let D;t[50]!==f||t[51]!==_||t[52]!==x?(D=f&&!_?[]:x,t[50]=f,t[51]=_,t[52]=x,t[53]=D):D=t[53];let O=f?null:h,k;t[54]!==n||t[55]!==c?(k=e=>c(n,e),t[54]=n,t[55]=c,t[56]=k):k=t[56];let A;t[57]!==a.state||t[58]!==f||t[59]!==g||t[60]!==o||t[61]!==w||t[62]!==T||t[63]!==E||t[64]!==D||t[65]!==O||t[66]!==k?(A={id:w,checked:T,disabled:f,exception:g,state:a.state,notes:o,path:E,sharedPaths:D,alsoAffects:O,onCheckedChange:k},t[57]=a.state,t[58]=f,t[59]=g,t[60]=o,t[61]=w,t[62]=T,t[63]=E,t[64]=D,t[65]=O,t[66]=k,t[67]=A):A=t[67];let j=A;switch(n){case`projectMcp`:{let e;t[68]===C?e=t[69]:(e=C??(0,Q.jsx)(r,{id:`oxj8er`}),t[68]=C,t[69]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`EBP_hA`})});break bb0}case`projectSkill`:{let e;t[70]===C?e=t[71]:(e=C??(0,Q.jsx)(r,{id:`nta97o`}),t[70]=C,t[71]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():(0,Q.jsx)(r,{id:`n11Jj7`})});break bb0}case`globalMcp`:{let e;t[72]===C?e=t[73]:(e=C??(0,Q.jsx)(r,{id:`itchkf`}),t[72]=C,t[73]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`wgj--j`})});break bb0}case`discoverySkill`:{let e=v[n],a;t[74]===C?a=t[75]:(a=C??(0,Q.jsx)(r,{id:`6ur2Mk`}),t[74]=C,t[75]=a);let o=f?i():(0,Q.jsx)(r,{id:`uVhq9B`}),s;t[76]!==j||t[77]!==e||t[78]!==a||t[79]!==o?(s=(0,Q.jsx)(Re,{...j,title:e,description:a,info:o}),t[76]=j,t[77]=e,t[78]=a,t[79]=o,t[80]=s):s=t[80],y=s;break bb0}}}t[15]=u,t[16]=a.agentId,t[17]=a.disabledReason,t[18]=a.exception,t[19]=a.guidance,t[20]=a.pathId,t[21]=a.piece,t[22]=a.resolvedPath,t[23]=a.sharedFolderWith,t[24]=a.state,t[25]=f,t[26]=s,t[27]=l,t[28]=o,t[29]=n,t[30]=c,t[31]=v,t[32]=y}else y=t[32];if(y!==Symbol.for(`react.early_return_sentinel`))return y}function Ue(e){return e.piece===`mcp`&&e.scope===`project`?(0,Q.jsx)(r,{id:`ggMMa7`}):e.piece===`skill`&&e.scope===`project`?(0,Q.jsx)(r,{id:`LtiJ5c`}):e.piece===`mcp`&&e.scope===`user`?(0,Q.jsx)(r,{id:`2gXnCO`}):e.piece===`skill`&&e.scope===`user`?(0,Q.jsx)(r,{id:`ejiJeW`}):null}function We(e,t,n,r){let i=e.report.conflicts.find(e=>e.kind===r);if(i===void 0)return null;let a=e=>xe.find(n=>t.cells[n]?.satisfierId===e),[o,s]=i.satisfierIds,c=o===void 0?void 0:a(o),l=s===void 0?void 0:a(s);return c===void 0||l===void 0?null:{dependent:n[l],prerequisite:n[c],blockedReason:i.blockedReason}}function Ge(e){let t=(0,J.c)(29),{result:n,connection:a}=e,{_:o}=i(),s;if(t[0]!==o||t[1]!==a||t[2]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e={projectMcp:o({id:`ggMMa7`}),projectSkill:o({id:`LtiJ5c`}),globalMcp:o({id:`2gXnCO`}),discoverySkill:o({id:`ejiJeW`})},t=We(n,a,e,`prerequisite-unavailable`);if(t!==null){let{dependent:e,prerequisite:n}=t;s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:(()=>{switch(t.blockedReason){case`foreign`:return o({id:`XrPvMT`,values:{dependent:e,prerequisite:n}});case`structural-na`:return o({id:`XNdXMR`,values:{dependent:e,prerequisite:n}});case`not-installable`:return o({id:`GTvYzA`,values:{dependent:e,prerequisite:n}});case`agent-undetected`:return o({id:`7Ny8bV`,values:{dependent:e,prerequisite:n}});default:return o({id:`h2QPvj`,values:{dependent:e,prerequisite:n}})}})()});break bb0}let r=We(n,a,e,`prerequisite-removed`);if(r!==null){s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:o({id:`5CHuXn`,values:{0:r.dependent,1:r.prerequisite}})});break bb0}}t[0]=o,t[1]=a,t[2]=n,t[3]=s}else s=t[3];if(s!==Symbol.for(`react.early_return_sentinel`))return s;if(n.unavailable===!0){let e;t[4]!==o||t[5]!==n.devBuild?(e=n.devBuild===!0?o({id:`AUORpp`}):o({id:`RD8cCw`}),t[4]=o,t[5]=n.devBuild,t[6]=e):e=t[6];let r;return t[7]===e?r=t[8]:(r=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:e}),t[7]=e,t[8]=r),r}let c;t[9]===o?c=t[10]:(c=e=>{switch(e.errorId){case`surface-missing`:return o({id:`3n7lnE`});case`foreign-artifact`:return o({id:`tCE-ZH`});case`no-writer`:case`not-installable`:return o({id:`BMoSQy`});case`dependency-failed`:return o({id:`1FXL-O`});case`write-declined`:return o({id:`_fZSIY`});case`write-failed`:case`executor-threw`:case`unrecognized-outcome`:return o({id:`dCforW`});default:return null}},t[9]=o,t[10]=c);let l=c,u=n.report.actions,d,f,p,m;if(t[11]!==l||t[12]!==n.error||t[13]!==n.report.actions){m=Symbol.for(`react.early_return_sentinel`);bb1:{let e;t[18]===l?e=t[19]:(e=e=>({key:e.satisfierId,title:Ue(e),managedInSkillsStudio:e.errorId===`no-writer`&&e.piece===`skill`&&e.scope===`user`,detail:l(e)}),t[18]=l,t[19]=e);let i=u.filter(Je).map(e).filter(qe);if(i.length===0){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{children:(0,Q.jsx)(r,{id:`fWsBTs`})}),t[20]=e):e=t[20];let i;t[21]===n.error?i=t[22]:(i=n.error===void 0?null:(0,Q.jsx)(`code`,{className:`block wrap-break-word font-mono text-xs opacity-80`,children:n.error}),t[21]=n.error,t[22]=i);let a;t[23]===i?a=t[24]:(a=(0,Q.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-sm text-destructive`,children:[e,i]}),t[23]=i,t[24]=a),m=a;break bb1}d=`alert`,f=`space-y-2 text-sm text-destructive`,p=i.map(Ke)}t[11]=l,t[12]=n.error,t[13]=n.report.actions,t[14]=d,t[15]=f,t[16]=p,t[17]=m}else d=t[14],f=t[15],p=t[16],m=t[17];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;return t[25]!==d||t[26]!==f||t[27]!==p?(h=(0,Q.jsx)(`div`,{role:d,className:f,children:p}),t[25]=d,t[26]=f,t[27]=p,t[28]=h):h=t[28],h}function Ke(e){return(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[e.title===null?null:(0,Q.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,Q.jsx)(`p`,{children:e.managedInSkillsStudio?(0,Q.jsx)(r,{id:`5RiC8D`}):e.detail})]},e.key)}function qe(e){return e.managedInSkillsStudio||e.detail!==null}function Je(e){return e.errorId!==void 0}function Ye(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Q.jsx)(r,{id:`s8difl`})}),e[0]=t):t=e[0],t}function Xe(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`74Mikl`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Ze(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`2lJAvH`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Qe(e){let t=(0,J.c)(141),{connection:n,open:a,onOpenChange:o,onSave:s,paired:c,onCloseAutoFocus:l,validateSave:u,alternateAction:d}=e,f=c===void 0?!1:c,{i18n:p,_:m}=i(),h=(0,q.useId)(),g;t[0]===n?g=t[1]:(g=()=>n===null?be:Me(n),t[0]=n,t[1]=g);let[_,v]=(0,q.useState)(g),[C,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),[j,M]=(0,q.useState)(null),N;t[2]!==n||t[3]!==_?(N=n!==null&&xe.some(e=>{let t=n.cells[e];return _[e]&&t!==void 0&&F(t.state)}),t[2]=n,t[3]=_,t[4]=N):N=t[4];let P=N,I;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e,t){v(n=>({...n,[e]:t})),A(null),O(null),M(null)},t[5]=I):I=t[5];let L=I,R;t[6]!==n||t[7]!==_?(R=n!==null&&!_.projectSkill&&Ve(n,`projectSkill`),t[6]=n,t[7]=_,t[8]=R):R=t[8];let ee=R,z,B,V,H,fe,U,W,G,K,Y,me,he,ge,_e,X,ve,ye,Z;if(t[9]!==m||t[10]!==n||t[11]!==_||t[12]!==l||t[13]!==o||t[14]!==a||t[15]!==f||t[16]!==C||t[17]!==j||t[18]!==ee){let e=n===null?[]:Ce(n,`project`),i=n===null?[]:Ce(n,`machine`),s=n!==null&&e.length===0,c=n?.label,u=we(e),d=we(i),p;t[37]!==n?.cells||t[38]!==_?(p=xe.filter(e=>n?.cells[e]?.checked===!0&&!_[e]),t[37]=n?.cells,t[38]=_,t[39]=p):p=t[39],U=p.length;let h;t[40]!==n||t[41]!==_?(h=xe.filter(e=>n?.cells[e]!==void 0&&_[e]&&!n.cells[e]?.checked),t[40]=n,t[41]=_,t[42]=h):h=t[42],H=h.length;let g;t[43]!==m||t[44]!==H||t[45]!==U?(g=H>0&&U>0?m({id:`6tQC_t`,values:{addingCount:H,removingCount:U}}):H>0?S._({id:`xKcXG6`,values:{addingCount:H}}):U>0?S._({id:`0niWj3`,values:{removingCount:U}}):null,t[43]=m,t[44]=H,t[45]=U,t[46]=g):g=t[46];let v=g;W=U>0&&H===0;let y;t[47]!==_||t[48]!==W?(y=W&&xe.every(e=>!_[e]),t[47]=_,t[48]=W,t[49]=y):y=t[49];let b=y;Z=j!==null&&j.peerSatisfierIds.length>0;let x;t[50]!==m||t[51]!==H||t[52]!==n||t[53]!==b||t[54]!==U||t[55]!==j||t[56]!==v||t[57]!==Z?(x=n===null?null:j===null?b?m({id:`CCngW8`,values:{0:n.label}}):v:Z?m(H>0?{id:`0hAvVd`,values:{0:n.label,1:j.peers,addingCount:H,removingCount:U}}:{id:`yqr502`,values:{0:n.label,1:j.peers,removingCount:U}}):v,t[50]=m,t[51]=H,t[52]=n,t[53]=b,t[54]=U,t[55]=j,t[56]=v,t[57]=Z,t[58]=x):x=t[58],fe=x,V=ue,he=a,t[59]!==o||t[60]!==C?(ge=e=>!C&&o(e),t[59]=o,t[60]=C,t[61]=ge):ge=t[61],B=oe,G=`sm:max-w-lg`,K=!1,Y=l;let w;t[62]===n?w=t[63]:(w=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[62]=n,t[63]=w);let T=n?.label,E;t[64]!==w||t[65]!==T?(E=(0,Q.jsxs)(ae,{className:`flex items-center gap-2 text-lg`,children:[w,T]}),t[64]=w,t[65]=T,t[66]=E):E=t[66];let D;t[67]!==m||t[68]!==c||t[69]!==n||t[70]!==s?(D=m(n?s?{id:`bm1oV9`,values:{agentLabel:c}}:{id:`qr2gAH`,values:{0:n.label}}:{id:`CxnZP4`}),t[67]=m,t[68]=c,t[69]=n,t[70]=s,t[71]=D):D=t[71];let O;t[72]===D?O=t[73]:(O=(0,Q.jsx)(ie,{children:D}),t[72]=D,t[73]=O),t[74]!==E||t[75]!==O?(me=(0,Q.jsxs)(le,{className:`gap-2`,children:[E,O]}),t[74]=E,t[75]=O,t[76]=me):me=t[76],z=se,_e=`flex flex-col gap-6`,t[77]!==n||t[78]!==f?(X=f&&n?(0,Q.jsx)(Xe,{label:n.label}):null,t[77]=n,t[78]=f,t[79]=X):X=t[79],ve=e.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ZWyHmq`}),(0,Q.jsx)(re,{variant:`secondary`,className:`font-mono text-[10px] uppercase`,children:(0,Q.jsx)(r,{id:`WEYdDv`})})]}),e.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:u.get(t)??[],draft:_,setPart:L},t)}),ee?(0,Q.jsx)(Ye,{}):null]}):null,ye=i.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ImTzPZ`})]}),i.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:d.get(t)??[],draft:_,setPart:L},t)})]}):null,t[9]=m,t[10]=n,t[11]=_,t[12]=l,t[13]=o,t[14]=a,t[15]=f,t[16]=C,t[17]=j,t[18]=ee,t[19]=z,t[20]=B,t[21]=V,t[22]=H,t[23]=fe,t[24]=U,t[25]=W,t[26]=G,t[27]=K,t[28]=Y,t[29]=me,t[30]=he,t[31]=ge,t[32]=_e,t[33]=X,t[34]=ve,t[35]=ye,t[36]=Z}else z=t[19],B=t[20],V=t[21],H=t[22],fe=t[23],U=t[24],W=t[25],G=t[26],K=t[27],Y=t[28],me=t[29],he=t[30],ge=t[31],_e=t[32],X=t[33],ve=t[34],ye=t[35],Z=t[36];let Se;t[80]!==n||t[81]!==T||t[82]!==D||t[83]!==j||t[84]!==k?(Se=j===null?k===null?D===null?T!==null&&n!==null?(0,Q.jsx)(Ge,{result:T,connection:n}):null:(0,Q.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:D}):(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:k}):(0,Q.jsx)(it,{choice:j}),t[80]=n,t[81]=T,t[82]=D,t[83]=j,t[84]=k,t[85]=Se):Se=t[85];let $;t[86]!==z||t[87]!==Se||t[88]!==_e||t[89]!==X||t[90]!==ve||t[91]!==ye?($=(0,Q.jsxs)(z,{className:_e,children:[X,ve,ye,Se]}),t[86]=z,t[87]=Se,t[88]=_e,t[89]=X,t[90]=ve,t[91]=ye,t[92]=$):$=t[92];let Te;t[93]===fe?Te=t[94]:(Te=(0,Q.jsx)(`p`,{role:`status`,className:`me-auto text-xs text-muted-foreground`,"aria-live":`polite`,"aria-atomic":`true`,children:fe}),t[93]=fe,t[94]=Te);let Ee;t[95]===o?Ee=t[96]:(Ee=()=>o(!1),t[95]=o,t[96]=Ee);let De;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Q.jsx)(r,{id:`dEgA5A`}),t[97]=De):De=t[97];let ke;t[98]!==C||t[99]!==Ee?(ke=(0,Q.jsx)(x,{variant:`outline`,className:`font-mono uppercase`,disabled:C,onClick:Ee,children:De}),t[98]=C,t[99]=Ee,t[100]=ke):ke=t[100];let Ae;t[101]!==d||t[102]!==h||t[103]!==C?(Ae=d===void 0?null:(0,Q.jsxs)(`div`,{className:`flex flex-col items-start gap-2 sm:items-end`,children:[d.preference===void 0?null:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(y,{id:h,checked:d.preference.checked,disabled:C,onCheckedChange:e=>d.preference?.onCheckedChange(e===!0)}),(0,Q.jsx)(b,{htmlFor:h,className:`cursor-pointer text-sm`,children:d.preference.label})]}),(0,Q.jsx)(x,{variant:`ghost`,className:`font-mono uppercase`,disabled:C,onClick:d.onClick,children:d.label})]}),t[101]=d,t[102]=h,t[103]=C,t[104]=Ae):Ae=t[104];let je=P||U>0?`destructive`:`default`,Ne=C||(j===null?H+U===0:!Z),Pe;t[105]!==n||t[106]!==_||t[107]!==p||t[108]!==o||t[109]!==s||t[110]!==j?.peerSatisfierIds||t[111]!==u?(Pe=()=>{let e=u?.(_)??null;if(e!==null){A(e);return}w(!0),A(null),E(null),O(null);let t=j?.peerSatisfierIds;M(null),s(_,t).then(e=>{if(`kind`in e){O(e.message);return}if(e.ok){o(!1);return}let t=n===null?null:rt(e,n,p.locale);t===null?E(e):M(t)}).catch(()=>E({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null})).finally(()=>w(!1))},t[105]=n,t[106]=_,t[107]=p,t[108]=o,t[109]=s,t[110]=j?.peerSatisfierIds,t[111]=u,t[112]=Pe):Pe=t[112];let Fe;t[113]!==P||t[114]!==W||t[115]!==C||t[116]!==Z?(Fe=C?(0,Q.jsx)(r,{id:`uF9ruK`}):Z?(0,Q.jsx)(r,{id:`dGcsnU`}):P?(0,Q.jsx)(r,{id:`inJhKB`}):W?(0,Q.jsx)(r,{id:`t_YqKh`}):(0,Q.jsx)(r,{id:`y3aU20`}),t[113]=P,t[114]=W,t[115]=C,t[116]=Z,t[117]=Fe):Fe=t[117];let Ie;t[118]!==je||t[119]!==Ne||t[120]!==Pe||t[121]!==Fe?(Ie=(0,Q.jsx)(x,{variant:je,className:`font-mono uppercase`,disabled:Ne,onClick:Pe,children:Fe}),t[118]=je,t[119]=Ne,t[120]=Pe,t[121]=Fe,t[122]=Ie):Ie=t[122];let Le;t[123]!==Te||t[124]!==ke||t[125]!==Ae||t[126]!==Ie?(Le=(0,Q.jsxs)(ce,{className:`items-center`,children:[Te,ke,Ae,Ie]}),t[123]=Te,t[124]=ke,t[125]=Ae,t[126]=Ie,t[127]=Le):Le=t[127];let Re;t[128]!==B||t[129]!==G||t[130]!==K||t[131]!==Y||t[132]!==me||t[133]!==$||t[134]!==Le?(Re=(0,Q.jsxs)(B,{className:G,showCloseButton:K,onCloseAutoFocus:Y,children:[me,$,Le]}),t[128]=B,t[129]=G,t[130]=K,t[131]=Y,t[132]=me,t[133]=$,t[134]=Le,t[135]=Re):Re=t[135];let ze;return t[136]!==V||t[137]!==he||t[138]!==ge||t[139]!==Re?(ze=(0,Q.jsx)(V,{open:he,onOpenChange:ge,children:Re}),t[136]=V,t[137]=he,t[138]=ge,t[139]=Re,t[140]=ze):ze=t[140],ze}function $e(e){switch(e){case`projectMcp`:return(0,Q.jsx)(r,{id:`ggMMa7`});case`projectSkill`:return(0,Q.jsx)(r,{id:`LtiJ5c`});case`globalMcp`:return(0,Q.jsx)(r,{id:`2gXnCO`});case`discoverySkill`:return(0,Q.jsx)(r,{id:`ejiJeW`})}}function et(e,t){return xe.flatMap(n=>{let r=e.cells[n];return r?.checked===!0?[{cell:r,part:n,label:$e(n),path:r.resolvedPath??Y(r.pathId),scope:r.scope===`project`?`project`:`machine`,alsoAffects:r.piece===`skill`&&r.sharedFolderWith.length>0?K(r.sharedFolderWith.map(nt),t):null}]:[]})}function tt(e){let t=(0,J.c)(12),{scope:n,rows:a}=e,{_:o}=i();if(a.length===0)return null;let s;t[0]===n?s=t[1]:(s=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 border-b bg-muted/60 px-3 py-2 font-mono text-xs uppercase tracking-wide text-muted-foreground`,children:[n===`project`?(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}):(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),n===`project`?(0,Q.jsx)(r,{id:`ZWyHmq`}):(0,Q.jsx)(r,{id:`ImTzPZ`})]}),t[0]=n,t[1]=s);let c;if(t[2]!==o||t[3]!==a){let e;t[5]===o?e=t[6]:(e=e=>{let t=e.alsoAffects;return(0,Q.jsxs)(`li`,{className:`flex items-start gap-3 px-3 py-3`,children:[(0,Q.jsx)(H,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-sm font-medium`,children:e.label}),e.path===null?null:(0,Q.jsx)(`code`,{className:`block truncate text-xs text-muted-foreground`,children:e.path}),t===null?null:(0,Q.jsx)(`p`,{className:`text-xs text-amber-700 dark:text-amber-400`,children:o({id:`qze9od`,values:{alsoAffects:t}})})]})]},e.cell.satisfierId)},t[5]=o,t[6]=e),c=a.map(e),t[2]=o,t[3]=a,t[4]=c}else c=t[4];let l;t[7]===c?l=t[8]:(l=(0,Q.jsx)(`ul`,{className:`divide-y divide-border`,children:c}),t[7]=c,t[8]=l);let u;return t[9]!==s||t[10]!==l?(u=(0,Q.jsxs)(`div`,{children:[s,l]}),t[9]=s,t[10]=l,t[11]=u):u=t[11],u}function nt(e){return D[e]??e}function rt(e,t,n){let r=e.report.conflicts.filter(e=>e.kind===`unresolved-shared-copy`),i=new Set(Object.values(t.cells).map(e=>e.satisfierId)),a=[...new Set(r.flatMap(e=>e.satisfierIds))].filter(e=>!i.has(e)),o=[...new Set(r.flatMap(e=>e.agentIds))].filter(e=>e!==t.id);if(a.length===0&&o.length===0)return null;let s=[...new Set(r.map(e=>Y(e.pathId)).filter(e=>e!==null))];return{peers:K(o.map(nt),n),path:s.length===1?s[0]:null,peerSatisfierIds:a}}function it(e){let t=(0,J.c)(5),{choice:n}=e,{peers:i,path:a}=n;if(n.peerSatisfierIds.length===0){let e;return t[0]===i?e=t[1]:(e=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:(0,Q.jsx)(r,{id:`H8tj8y`,values:{peers:i}})}),t[0]=i,t[1]=e),e}let o;return t[2]!==a||t[3]!==i?(o=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:a===null?(0,Q.jsx)(r,{id:`4C2RCg`,values:{peers:i}}):(0,Q.jsx)(r,{id:`fybwfg`,values:{peers:i,path:a},components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}),t[2]=a,t[3]=i,t[4]=o):o=t[4],o}function at(e){let t=(0,J.c)(96),{connection:n,open:a,onOpenChange:o,onRemove:s,paired:c}=e,l=c===void 0?!1:c,{i18n:y,_:b}=i(),x=(0,q.useRef)(null),S=(0,q.useRef)(null),C,w;t[0]===a?(C=t[1],w=t[2]):(C=()=>{if(!a)return;let e=document.activeElement;x.current=e,S.current=e?.closest(`section`)??null},w=[a],t[0]=a,t[1]=C,t[2]=w),(0,q.useEffect)(C,w);let[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),j,M,N,P,F,I,L,R,ee,te,z,ne,B,V,H,re;if(t[3]!==b||t[4]!==n||t[5]!==y||t[6]!==o||t[7]!==s||t[8]!==a||t[9]!==T){F=n?et(n,y.locale):[];let e;t[26]!==n||t[27]!==y||t[28]!==o||t[29]!==s?(e=function(e){n!==null&&(E(!0),O(null),A(null),s(e).then(e=>{if(e.ok){o(!1);return}let t=rt(e,n,y.locale);t===null?O(e):A(t)}).catch(e=>O({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null,error:e instanceof Error?e.message:String(e)})).finally(()=>E(!1)))},t[26]=n,t[27]=y,t[28]=o,t[29]=s,t[30]=e):e=t[30],I=e,P=v,ee=a,t[31]!==o||t[32]!==T?(te=e=>!T&&o(e),t[31]=o,t[32]=T,t[33]=te):te=t[33],N=u,re=`sm:max-w-lg`,t[34]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{let t=x.current,n=t?.isConnected?t:Z(S.current);n?.isConnected&&(e.preventDefault(),n.focus())},t[34]=L):L=t[34];let i;t[35]===n?i=t[36]:(i=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[35]=n,t[36]=i);let c;t[37]!==b||t[38]!==n?(c=b(n?{id:`ApNWRQ`,values:{0:n.label}}:{id:`Y1wa2r`}),t[37]=b,t[38]=n,t[39]=c):c=t[39];let l;t[40]!==i||t[41]!==c?(l=(0,Q.jsxs)(p,{className:`flex items-center gap-2 text-lg`,children:[i,c]}),t[40]=i,t[41]=c,t[42]=l):l=t[42];let f;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(h,{children:(0,Q.jsx)(r,{id:`da7Yfw`})}),t[43]=f):f=t[43],t[44]===l?R=t[45]:(R=(0,Q.jsxs)(d,{className:`gap-2`,children:[l,f]}),t[44]=l,t[45]=R),M=g,H=`flex flex-col gap-4`,B=`overflow-hidden rounded-lg border`,V=(0,Q.jsx)(tt,{scope:`project`,rows:F.filter(st)}),j=tt,z=`machine`,ne=F.filter(ot),t[3]=b,t[4]=n,t[5]=y,t[6]=o,t[7]=s,t[8]=a,t[9]=T,t[10]=j,t[11]=M,t[12]=N,t[13]=P,t[14]=F,t[15]=I,t[16]=L,t[17]=R,t[18]=ee,t[19]=te,t[20]=z,t[21]=ne,t[22]=B,t[23]=V,t[24]=H,t[25]=re}else j=t[10],M=t[11],N=t[12],P=t[13],F=t[14],I=t[15],L=t[16],R=t[17],ee=t[18],te=t[19],z=t[20],ne=t[21],B=t[22],V=t[23],H=t[24],re=t[25];let ie;t[46]!==j||t[47]!==z||t[48]!==ne?(ie=(0,Q.jsx)(j,{scope:z,rows:ne}),t[46]=j,t[47]=z,t[48]=ne,t[49]=ie):ie=t[49];let ae;t[50]!==ie||t[51]!==B||t[52]!==V?(ae=(0,Q.jsxs)(`div`,{className:B,children:[V,ie]}),t[50]=ie,t[51]=B,t[52]=V,t[53]=ae):ae=t[53];let oe;t[54]!==n||t[55]!==l?(oe=l&&n?(0,Q.jsx)(Ze,{label:n.label}):null,t[54]=n,t[55]=l,t[56]=oe):oe=t[56];let se;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Q.jsx)(r,{id:`Evsh6U`})}),t[57]=se):se=t[57];let ce;t[58]!==n||t[59]!==D||t[60]!==k?(ce=k===null?D!==null&&n!==null?(0,Q.jsx)(Ge,{result:D,connection:n}):null:(0,Q.jsx)(it,{choice:k}),t[58]=n,t[59]=D,t[60]=k,t[61]=ce):ce=t[61];let le;t[62]!==M||t[63]!==ae||t[64]!==oe||t[65]!==ce||t[66]!==H?(le=(0,Q.jsxs)(M,{className:H,children:[ae,oe,se,ce]}),t[62]=M,t[63]=ae,t[64]=oe,t[65]=ce,t[66]=H,t[67]=le):le=t[67];let ue;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Q.jsx)(r,{id:`dEgA5A`}),t[68]=ue):ue=t[68];let de;t[69]===T?de=t[70]:(de=(0,Q.jsx)(f,{disabled:T,children:ue}),t[69]=T,t[70]=de);let fe=T||F.length===0||k!==null&&k.peerSatisfierIds.length===0,U;t[71]!==k?.peerSatisfierIds||t[72]!==I?(U=e=>{e.preventDefault(),I(k?.peerSatisfierIds)},t[71]=k?.peerSatisfierIds,t[72]=I,t[73]=U):U=t[73];let pe;t[74]!==T||t[75]!==k?(pe=T?(0,Q.jsx)(r,{id:`uF9ruK`}):k!==null&&k.peerSatisfierIds.length>0?(0,Q.jsx)(r,{id:`dGcsnU`}):(0,Q.jsx)(r,{id:`t_YqKh`}),t[74]=T,t[75]=k,t[76]=pe):pe=t[76];let W;t[77]!==fe||t[78]!==U||t[79]!==pe?(W=(0,Q.jsx)(m,{variant:`destructive`,className:`font-mono uppercase`,disabled:fe,onClick:U,children:pe}),t[77]=fe,t[78]=U,t[79]=pe,t[80]=W):W=t[80];let G;t[81]!==de||t[82]!==W?(G=(0,Q.jsxs)(_,{children:[de,W]}),t[81]=de,t[82]=W,t[83]=G):G=t[83];let K;t[84]!==N||t[85]!==L||t[86]!==R||t[87]!==le||t[88]!==G||t[89]!==re?(K=(0,Q.jsxs)(N,{className:re,onCloseAutoFocus:L,children:[R,le,G]}),t[84]=N,t[85]=L,t[86]=R,t[87]=le,t[88]=G,t[89]=re,t[90]=K):K=t[90];let Y;return t[91]!==P||t[92]!==ee||t[93]!==te||t[94]!==K?(Y=(0,Q.jsx)(P,{open:ee,onOpenChange:te,children:K}),t[91]=P,t[92]=ee,t[93]=te,t[94]=K,t[95]=Y):Y=t[95],Y}function ot(e){return e.scope===`machine`}function st(e){return e.scope===`project`}function ct(e,t,n=[]){let r=je(e);return[...n.map(e=>({satisfierId:e,desired:`absent`})),...xe.flatMap(n=>{let i=e.cells[n];return i===void 0||t[n]===r[n]?[]:[{satisfierId:i.satisfierId,desired:t[n]?`present`:`absent`}]})]}function lt(e,t=[]){let n=je(e),r=Object.fromEntries(xe.map(t=>[t,e.cells[t]?!1:n[t]])),i=t.map(e=>({satisfierId:e,desired:`absent`}));return[...ct(e,r),...i]}function ut(e){if(e.status===`nothing-required`)return`met`;let t=!1;for(let n of e.options){if(n.confidence===`unverified`){t=!0;continue}if(n.counts)return`met`}return t?`unprobed`:`unmet`}function dt(e,t,n){return n===!1?`absent`:n===!0?`present`:t===null||!t.detection.probed?`unknown`:L(t.detection,e)?`present`:`absent`}function ft(e){let{agentId:t,mode:n,snapshot:r,detected:i}=e;if(dt(t,r,i)===`absent`)return`not-installed`;if(r===null)return`no-status`;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.filter(e=>e.level===`required`);if(a.length===0)return`no-status`;let o=a.map(ut);return o.includes(`unprobed`)?`no-status`:o.includes(`unmet`)?`not-connected`:`connected`}function pt(e){return e===`enable-manually`?`external`:`terminal`}function mt(e){let{agentId:t,mode:n,snapshot:r,projectMcp:i}=e;if(r===null||i?.followup===void 0||ft(e)!==`connected`)return;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.find(e=>e.level===`required`&&e.piece===`mcp`);if(a===void 0||a.status!==`met`)return;let o=a.options.filter(e=>e.counts);if(!(o.length!==1||o[0]?.id!==i.satisfierId))return i.followup}var ht={actions:[],conflicts:[],withheld:[]};function gt(e){return{ok:!1,report:ht,snapshot:null,error:e}}function _t(e){return e.conflicts.length===0&&e.actions.every(e=>e.errorId===void 0)}async function vt(e,t){let n=globalThis.window?.okDesktop;if(n!==void 0)try{let t=await n.agentIntegrations.apply({intents:e});return t.ok?{ok:!0,report:t.report,snapshot:t.snapshot}:{ok:!1,report:t.report,snapshot:t.snapshot,error:t.error,...t.unavailable===!0?{unavailable:!0}:{},...t.devBuild===!0?{devBuild:!0}:{}}}catch(e){return{ok:!1,report:ht,snapshot:null,error:e instanceof Error?e.message:String(e)}}let r;try{r=await fetch(`/api/agent-integrations/apply`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({intents:e}),signal:t?.webSignal})}catch(e){return gt(e instanceof Error?e.message:String(e))}if(!r.ok)return gt(`HTTP ${r.status} ${r.statusText}`.trimEnd());let i;try{i=await r.json()}catch(e){return gt(e instanceof Error?e.message:String(e))}let a=w.safeParse(i);if(!a.success){let e=a.error.issues.map(e=>e.path.join(`.`));return console.warn(`[agent-connections] response schema drift`,{issues:e}),gt(`Unexpected response shape at ${e.join(`, `)}`)}let o={actions:a.data.actions,conflicts:a.data.conflicts,withheld:a.data.withheld};return{ok:_t(o),report:o,snapshot:a.data.snapshot}}var yt=new Set;function bt(e){return yt.add(e),()=>{yt.delete(e)}}async function xt(e,t){let n=await vt(e,t);if(e.length>0){let e=[...yt];for(let t of e)try{t(n)}catch(e){console.warn(`[agent-connections] change listener failed:`,e)}}return n}export{je as _,pt as a,Oe as c,De as d,ke as f,ct as g,Ne as h,mt as i,at as l,Ae as m,bt as n,dt as o,Pe as p,ft as r,Qe as s,xt as t,Fe as u,lt as v,Z as y};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./AgentIconCluster-Qf_VPGzc.js";import{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./alert-dialog-BA3e7-10.js";import{t as y}from"./checkbox-CKD8LETI.js";import{t as b}from"./label-CvMpFFbN.js";import{t as x}from"./button-DzgjsZzC.js";import{t as S}from"./dist-C_FzPxEX2.js";import{t as C}from"./constants-product-C4Nt9vD3.js";import{r as w}from"./schemas-api-CQHNNDP6.js";import{a as T,c as E,n as D,r as O,s as k}from"./constants-editors-DLxv8SuP.js";import{b as A}from"./handoff-pwpLEUcJ.js";import{c as j,d as M,f as N,h as P,i as F,n as I,r as L,t as R,u as ee}from"./agent-registry-pREadnY_.js";import{t as te}from"./folder-QqUoFRPR.js";import{t as z}from"./info-CyR0W2SK.js";import{t as ne}from"./monitor-IXzxTnmk.js";import{t as B}from"./sparkles-BS2TX_Um.js";import{t as V}from"./triangle-alert-BXrUEeRU.js";import{t as H}from"./x-DM2drskU.js";import{t as re}from"./badge-DmdA1C7r.js";import{a as ie,c as ae,i as oe,n as se,o as ce,s as le,t as ue}from"./dialog-BJEjKJjL.js";import{c as de,l as fe,n as U,s as pe,t as W}from"./field-DFJgKWGh.js";import{t as G}from"./constants-skills-BLHVRW90.js";import{t as K}from"./tool-list-format-CS7MZY1Q.js";var q=e(n(),1),J=a();function Y(e){if(e===void 0)return null;let t=P(e);if(t===null)return null;if(t.kind===`central-skill-store`)return`~/${G}/`;switch(t.kind){case`editor-project-config`:return E[t.editor];case`editor-project-skill-root`:{let e=O[t.editor];return e===null?null:`${e}/${k}/`}case`editor-user-skill-root`:{let e=T[t.editor];return e===null?null:`~/${e}/`}case`editor-user-config`:return null}}function me(e,t){if(e===void 0||t.length===0)return[];let n=P(e);return n===null||n.kind===`central-skill-store`?[]:t.map(e=>Y(`${n.kind}:${e}`)).filter(e=>e!==null)}function he(){return(typeof window>`u`?null:window.okDesktop?.mcpServerName)||null}function ge(){return he()??`OpenKnowledge`}function _e(e){return typeof e==`string`&&e!==``?e:he()??C.stable.mcpServerName}function X(e){return typeof e==`string`?D[e]??e:null}function ve(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`guidance.mcp.user-config`:return S._({id:`guidance.mcp.user-config`,values:{agent:t}});case`guidance.mcp.project-config`:return S._({id:`guidance.mcp.project-config`,values:{agent:t}});case`guidance.mcp.session-injection`:return S._({id:`guidance.mcp.session-injection`,values:{agent:t}});case`guidance.mcp.managed-file`:return S._({id:`guidance.mcp.managed-file`,values:{agent:t}});case`guidance.skill.project`:return S._({id:`guidance.skill.project`,values:{agent:t}});case`guidance.skill.user`:return S._({id:`guidance.skill.user`,values:{agent:t}});case`guidance.skill.central-store`:return S._({id:`guidance.skill.central-store`,values:{agent:t}});default:return null}}function ye(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`troubleshooting.claude.project-entry-not-approved`:return S._({id:`troubleshooting.claude.project-entry-not-approved`,values:{agent:t}});case`troubleshooting.claude-desktop.per-tool-approval`:return S._({id:`troubleshooting.claude-desktop.per-tool-approval`,values:{agent:t}});case`troubleshooting.cursor.project-entry-not-loaded`:{let n=_e(e.params?.server);return S._({id:`troubleshooting.cursor.project-entry-not-loaded`,values:{agent:t,server:n}})}case`troubleshooting.codex.folder-trust`:return S._({id:`troubleshooting.codex.folder-trust`,values:{agent:t}});case`troubleshooting.codex.desktop-project-config`:return e.params?.honoredByDesktop===!0?null:S._({id:`troubleshooting.codex.desktop-project-config`,values:{agent:t}});case`troubleshooting.copilot.shared-workspace-config`:{let n=X(e.params?.sourceAgent)??``;return S._({id:`troubleshooting.copilot.shared-workspace-config`,values:{agent:t,sourceAgent:n}})}case`troubleshooting.openclaw.central-store-missing`:return S._({id:`troubleshooting.openclaw.central-store-missing`,values:{agent:t}});case`troubleshooting.pi.folder-trust`:return S._({id:`troubleshooting.pi.folder-trust`,values:{agent:t}});case`troubleshooting.lm-studio.config-path-mismatch`:return S._({id:`troubleshooting.lm-studio.config-path-mismatch`,values:{agent:t}});default:return null}}function Z(e){return e?.closest(`section`)?.querySelector(`h4`)??null}var Q=t(),be={projectMcp:!1,projectSkill:!1,globalMcp:!1,discoverySkill:!1},xe=[`projectMcp`,`projectSkill`,`globalMcp`,`discoverySkill`],Se={projectMcp:`project`,projectSkill:`project`,globalMcp:`machine`,discoverySkill:`machine`};function Ce(e,t){return xe.flatMap(n=>{if(Se[n]!==t)return[];let r=e.cells[n];return r===void 0?[]:[[n,r]]})}function $(e){return e.disabledReason!==null}function we(e){let t=new Set,n=new Map;for(let[r,i]of e){let e=[];if(i.checked&&!$(i))for(let n of i.troubleshooting){if(t.has(n.id))continue;let r=ye(n);r!==null&&(t.add(n.id),e.push({id:n.id,text:r}))}n.set(r,e)}return n}function Te(e){return e.scope===`project`&&e.piece===`mcp`?`projectMcp`:e.scope===`project`&&e.piece===`skill`?`projectSkill`:e.scope===`user`&&e.piece===`mcp`?`globalMcp`:e.scope===`user`&&e.piece===`skill`?`discoverySkill`:null}function Ee(e){if(!j.includes(e.agentId))return null;let t=e.agentId,n={};for(let t of e.scopes)for(let e of t.cells){let t=Te(e);t!==null&&(n[t]=e)}return{id:t,label:De(t),row:e,cells:n}}function De(e){return D[e]}function Oe(e){let t=(0,J.c)(5),{agentId:n,className:r}=e;if(n===`lm-studio`){let e;return t[0]===r?e=t[1]:(e=(0,Q.jsx)(B,{"aria-hidden":!0,className:r,strokeWidth:1.5}),t[0]=r,t[1]=e),e}let i;return t[2]!==n||t[3]!==r?(i=(0,Q.jsx)(o,{host:n,"aria-hidden":!0,className:r}),t[2]=n,t[3]=r,t[4]=i):i=t[4],i}function ke(e,{forceDetected:t=[]}={}){return I({agentIds:j,probes:e.probes,detection:{...e.detection,detected:[...e.detection.detected,...t]}}).rows.flatMap(e=>{let t=Ee(e);return t===null?[]:[t]})}function Ae(e){return A.some(t=>N(t)===e)&&ee.some(t=>M(t.id)===e)}function je(e){return{projectMcp:e.cells.projectMcp?.checked===!0,projectSkill:e.cells.projectSkill?.checked===!0,globalMcp:e.cells.globalMcp?.checked===!0,discoverySkill:e.cells.discoverySkill?.checked===!0}}function Me(e){let t=je(e);return Ne(t)>0?t:Object.fromEntries(xe.map(t=>{let n=e.cells[t];return[t,n!==void 0&&!$(n)&&!F(n.state)]}))}function Ne(e){return Object.values(e).filter(Boolean).length}function Pe(e){return Object.values(e.cells).some(e=>!$(e))}function Fe(e){let t=Object.values(e.cells);return t.length>0&&t.every(e=>e.checked)}function Ie(e){let t=(0,J.c)(10),{children:n}=e,{_:r}=i(),a;t[0]===r?a=t[1]:(a=r({id:`kjrq_8`}),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(z,{"aria-hidden":!0}),t[2]=o):o=t[2];let u;t[3]===a?u=t[4]:(u=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,"aria-label":a,children:o})}),t[3]=a,t[4]=u);let d;t[5]===n?d=t[6]:(d=(0,Q.jsx)(c,{className:`max-w-72`,children:n}),t[5]=n,t[6]=d);let f;return t[7]!==u||t[8]!==d?(f=(0,Q.jsxs)(l,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f}function Le(e){let t=(0,J.c)(16),{message:n,path:r,info:a}=e,{_:o}=i(),u;t[0]===o?u=t[1]:(u=o({id:`bn_MDX`}),t[0]=o,t[1]=u);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(V,{"aria-hidden":!0}),t[2]=d):d=t[2];let f;t[3]===u?f=t[4]:(f=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,className:`text-amber-700 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-400`,"aria-label":u,children:d})}),t[3]=u,t[4]=f);let p;t[5]===n?p=t[6]:(p=(0,Q.jsx)(`span`,{className:`font-medium`,children:n}),t[5]=n,t[6]=p);let m;t[7]===r?m=t[8]:(m=r===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:r}),t[7]=r,t[8]=m);let h;t[9]!==a||t[10]!==p||t[11]!==m?(h=(0,Q.jsx)(c,{className:`max-w-72`,children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[p,a,m]})}),t[9]=a,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;return t[13]!==f||t[14]!==h?(g=(0,Q.jsxs)(l,{children:[f,h]}),t[13]=f,t[14]=h,t[15]=g):g=t[15],g}function Re(e){let t=(0,J.c)(51),{id:n,checked:r,disabled:a,exception:o,state:s,title:c,description:l,info:u,path:d,sharedPaths:f,alsoAffects:p,notes:m,onCheckedChange:h}=e,{_:g}=i(),_=o===`warning`||o===`error`,v;t[0]!==g||t[1]!==_||t[2]!==s?(v=_?g(s===`foreign`?{id:`tCE-ZH`}:s===`foreign-replaceable`?{id:`KTxoDA`}:{id:`8wwkVu`}):null,t[0]=g,t[1]=_,t[2]=s,t[3]=v):v=t[3];let x=v,S=x===null?void 0:`${n}-warning`,C=p===null?void 0:`${n}-shared`,w;t[4]!==C||t[5]!==S?(w=[S,C].filter(Boolean).join(` `)||void 0,t[4]=C,t[5]=S,t[6]=w):w=t[6];let T=w,E=a||void 0,D;t[7]===h?D=t[8]:(D=e=>h(e===!0),t[7]=h,t[8]=D);let O;t[9]!==r||t[10]!==T||t[11]!==a||t[12]!==n||t[13]!==D?(O=(0,Q.jsx)(`div`,{className:`flex h-7 items-center`,children:(0,Q.jsx)(y,{id:n,checked:r,disabled:a,"aria-describedby":T,onCheckedChange:D})}),t[9]=r,t[10]=T,t[11]=a,t[12]=n,t[13]=D,t[14]=O):O=t[14];let k;t[15]===c?k=t[16]:(k=(0,Q.jsx)(fe,{children:c}),t[15]=c,t[16]=k);let A;t[17]!==n||t[18]!==k?(A=(0,Q.jsx)(b,{htmlFor:n,className:`cursor-pointer`,children:k}),t[17]=n,t[18]=k,t[19]=A):A=t[19];let j;t[20]!==a||t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==x?(j=x===null?(0,Q.jsx)(Ie,{children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[u,d===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:d}),f.map(Be)]})}):(0,Q.jsx)(Le,{message:x,path:d,info:a?null:u}),t[20]=a,t[21]=u,t[22]=d,t[23]=f,t[24]=x,t[25]=j):j=t[25];let M;t[26]!==A||t[27]!==j?(M=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[A,j]}),t[26]=A,t[27]=j,t[28]=M):M=t[28];let N;t[29]===l?N=t[30]:(N=(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:l}),t[29]=l,t[30]=N);let P;t[31]!==n||t[32]!==m?(P=m.length===0?null:(0,Q.jsx)(`div`,{className:`flex flex-col gap-1.5`,"data-testid":`${n}-troubleshooting`,children:m.map(ze)}),t[31]=n,t[32]=m,t[33]=P):P=t[33];let F;t[34]!==g||t[35]!==p||t[36]!==C?(F=p===null?null:(0,Q.jsx)(`p`,{id:C,className:`text-sm leading-relaxed text-amber-700 dark:text-amber-400`,children:g({id:`qze9od`,values:{alsoAffects:p}})}),t[34]=g,t[35]=p,t[36]=C,t[37]=F):F=t[37];let I;t[38]!==x||t[39]!==S?(I=S===void 0?null:(0,Q.jsx)(`span`,{id:S,className:`sr-only`,children:x}),t[38]=x,t[39]=S,t[40]=I):I=t[40];let L;t[41]!==N||t[42]!==P||t[43]!==F||t[44]!==I||t[45]!==M?(L=(0,Q.jsxs)(U,{children:[M,N,P,F,I]}),t[41]=N,t[42]=P,t[43]=F,t[44]=I,t[45]=M,t[46]=L):L=t[46];let R;return t[47]!==L||t[48]!==E||t[49]!==O?(R=(0,Q.jsxs)(W,{orientation:`horizontal`,className:`items-start gap-3`,"data-disabled":E,children:[O,L]}),t[47]=L,t[48]=E,t[49]=O,t[50]=R):R=t[50],R}function ze(e){return(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e.text},e.id)}function Be(e){return(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:e},e)}function Ve(e,t){let n=e.cells[t];return n===void 0?!1:!$(n)}function He(e){let t=(0,J.c)(81),{part:n,cell:a,notes:o,draft:s,setPart:c}=e,{i18n:l,_:u}=i(),d;t[0]===a?d=t[1]:(d=$(a),t[0]=a,t[1]=d);let f=d,p;t[2]===u?p=t[3]:(p=u({id:`ggMMa7`}),t[2]=u,t[3]=p);let m;t[4]===u?m=t[5]:(m=u({id:`LtiJ5c`}),t[4]=u,t[5]=m);let h;t[6]===u?h=t[7]:(h=u({id:`2gXnCO`}),t[6]=u,t[7]=h);let g;t[8]===u?g=t[9]:(g=u({id:`ejiJeW`}),t[8]=u,t[9]=g);let _;t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==g?(_={projectMcp:p,projectSkill:m,globalMcp:h,discoverySkill:g},t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_):_=t[14];let v=_,y;if(t[15]!==u||t[16]!==a.agentId||t[17]!==a.disabledReason||t[18]!==a.exception||t[19]!==a.guidance||t[20]!==a.pathId||t[21]!==a.piece||t[22]!==a.resolvedPath||t[23]!==a.sharedFolderWith||t[24]!==a.state||t[25]!==f||t[26]!==s||t[27]!==l||t[28]!==o||t[29]!==n||t[30]!==c||t[31]!==v){y=Symbol.for(`react.early_return_sentinel`);bb0:{let e={foreign:u({id:`tCE-ZH`}),"structural-na":u({id:`3n7lnE`}),"not-installable":u({id:`BMoSQy`}),"agent-undetected":u({id:`mdWhUY`})},i=function(){let t=a.disabledReason;return t==null?u({id:`RXYvxn`}):e[t]},d;if(t[33]!==u||t[34]!==a.state){let e=ge();d=a.state===`foreign-replaceable`?u({id:`uOKoBM`,values:{server:e}}):null,t[33]=u,t[34]=a.state,t[35]=d}else d=t[35];let p=d,m;t[36]!==a.piece||t[37]!==a.sharedFolderWith||t[38]!==l?(m=a.piece===`skill`&&a.sharedFolderWith.length>0?K(a.sharedFolderWith.map(nt),l.locale):null,t[36]=a.piece,t[37]=a.sharedFolderWith,t[38]=l,t[39]=m):m=t[39];let h=m,g=a.exception,_=g===`warning`||g===`error`,b;t[40]!==a.pathId||t[41]!==a.sharedFolderWith?(b=me(a.pathId,a.sharedFolderWith),t[40]=a.pathId,t[41]=a.sharedFolderWith,t[42]=b):b=t[42];let x=b,S;t[43]===a.guidance?S=t[44]:(S=ve(a.guidance),t[43]=a.guidance,t[44]=S);let C=S,w=`${a.agentId}-${n}`,T=s[n],E;t[45]!==a.pathId||t[46]!==a.resolvedPath||t[47]!==f||t[48]!==_?(E=f&&!_?null:a.resolvedPath??Y(a.pathId),t[45]=a.pathId,t[46]=a.resolvedPath,t[47]=f,t[48]=_,t[49]=E):E=t[49];let D;t[50]!==f||t[51]!==_||t[52]!==x?(D=f&&!_?[]:x,t[50]=f,t[51]=_,t[52]=x,t[53]=D):D=t[53];let O=f?null:h,k;t[54]!==n||t[55]!==c?(k=e=>c(n,e),t[54]=n,t[55]=c,t[56]=k):k=t[56];let A;t[57]!==a.state||t[58]!==f||t[59]!==g||t[60]!==o||t[61]!==w||t[62]!==T||t[63]!==E||t[64]!==D||t[65]!==O||t[66]!==k?(A={id:w,checked:T,disabled:f,exception:g,state:a.state,notes:o,path:E,sharedPaths:D,alsoAffects:O,onCheckedChange:k},t[57]=a.state,t[58]=f,t[59]=g,t[60]=o,t[61]=w,t[62]=T,t[63]=E,t[64]=D,t[65]=O,t[66]=k,t[67]=A):A=t[67];let j=A;switch(n){case`projectMcp`:{let e;t[68]===C?e=t[69]:(e=C??(0,Q.jsx)(r,{id:`oxj8er`}),t[68]=C,t[69]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`EBP_hA`})});break bb0}case`projectSkill`:{let e;t[70]===C?e=t[71]:(e=C??(0,Q.jsx)(r,{id:`nta97o`}),t[70]=C,t[71]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():(0,Q.jsx)(r,{id:`n11Jj7`})});break bb0}case`globalMcp`:{let e;t[72]===C?e=t[73]:(e=C??(0,Q.jsx)(r,{id:`itchkf`}),t[72]=C,t[73]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`wgj--j`})});break bb0}case`discoverySkill`:{let e=v[n],a;t[74]===C?a=t[75]:(a=C??(0,Q.jsx)(r,{id:`6ur2Mk`}),t[74]=C,t[75]=a);let o=f?i():(0,Q.jsx)(r,{id:`uVhq9B`}),s;t[76]!==j||t[77]!==e||t[78]!==a||t[79]!==o?(s=(0,Q.jsx)(Re,{...j,title:e,description:a,info:o}),t[76]=j,t[77]=e,t[78]=a,t[79]=o,t[80]=s):s=t[80],y=s;break bb0}}}t[15]=u,t[16]=a.agentId,t[17]=a.disabledReason,t[18]=a.exception,t[19]=a.guidance,t[20]=a.pathId,t[21]=a.piece,t[22]=a.resolvedPath,t[23]=a.sharedFolderWith,t[24]=a.state,t[25]=f,t[26]=s,t[27]=l,t[28]=o,t[29]=n,t[30]=c,t[31]=v,t[32]=y}else y=t[32];if(y!==Symbol.for(`react.early_return_sentinel`))return y}function Ue(e){return e.piece===`mcp`&&e.scope===`project`?(0,Q.jsx)(r,{id:`ggMMa7`}):e.piece===`skill`&&e.scope===`project`?(0,Q.jsx)(r,{id:`LtiJ5c`}):e.piece===`mcp`&&e.scope===`user`?(0,Q.jsx)(r,{id:`2gXnCO`}):e.piece===`skill`&&e.scope===`user`?(0,Q.jsx)(r,{id:`ejiJeW`}):null}function We(e,t,n,r){let i=e.report.conflicts.find(e=>e.kind===r);if(i===void 0)return null;let a=e=>xe.find(n=>t.cells[n]?.satisfierId===e),[o,s]=i.satisfierIds,c=o===void 0?void 0:a(o),l=s===void 0?void 0:a(s);return c===void 0||l===void 0?null:{dependent:n[l],prerequisite:n[c],blockedReason:i.blockedReason}}function Ge(e){let t=(0,J.c)(29),{result:n,connection:a}=e,{_:o}=i(),s;if(t[0]!==o||t[1]!==a||t[2]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e={projectMcp:o({id:`ggMMa7`}),projectSkill:o({id:`LtiJ5c`}),globalMcp:o({id:`2gXnCO`}),discoverySkill:o({id:`ejiJeW`})},t=We(n,a,e,`prerequisite-unavailable`);if(t!==null){let{dependent:e,prerequisite:n}=t;s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:(()=>{switch(t.blockedReason){case`foreign`:return o({id:`XrPvMT`,values:{dependent:e,prerequisite:n}});case`structural-na`:return o({id:`XNdXMR`,values:{dependent:e,prerequisite:n}});case`not-installable`:return o({id:`GTvYzA`,values:{dependent:e,prerequisite:n}});case`agent-undetected`:return o({id:`7Ny8bV`,values:{dependent:e,prerequisite:n}});default:return o({id:`h2QPvj`,values:{dependent:e,prerequisite:n}})}})()});break bb0}let r=We(n,a,e,`prerequisite-removed`);if(r!==null){s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:o({id:`5CHuXn`,values:{0:r.dependent,1:r.prerequisite}})});break bb0}}t[0]=o,t[1]=a,t[2]=n,t[3]=s}else s=t[3];if(s!==Symbol.for(`react.early_return_sentinel`))return s;if(n.unavailable===!0){let e;t[4]!==o||t[5]!==n.devBuild?(e=n.devBuild===!0?o({id:`AUORpp`}):o({id:`RD8cCw`}),t[4]=o,t[5]=n.devBuild,t[6]=e):e=t[6];let r;return t[7]===e?r=t[8]:(r=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:e}),t[7]=e,t[8]=r),r}let c;t[9]===o?c=t[10]:(c=e=>{switch(e.errorId){case`surface-missing`:return o({id:`3n7lnE`});case`foreign-artifact`:return o({id:`tCE-ZH`});case`no-writer`:case`not-installable`:return o({id:`BMoSQy`});case`dependency-failed`:return o({id:`1FXL-O`});case`write-declined`:return o({id:`_fZSIY`});case`write-failed`:case`executor-threw`:case`unrecognized-outcome`:return o({id:`dCforW`});default:return null}},t[9]=o,t[10]=c);let l=c,u=n.report.actions,d,f,p,m;if(t[11]!==l||t[12]!==n.error||t[13]!==n.report.actions){m=Symbol.for(`react.early_return_sentinel`);bb1:{let e;t[18]===l?e=t[19]:(e=e=>({key:e.satisfierId,title:Ue(e),managedInSkillsStudio:e.errorId===`no-writer`&&e.piece===`skill`&&e.scope===`user`,detail:l(e)}),t[18]=l,t[19]=e);let i=u.filter(Je).map(e).filter(qe);if(i.length===0){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{children:(0,Q.jsx)(r,{id:`fWsBTs`})}),t[20]=e):e=t[20];let i;t[21]===n.error?i=t[22]:(i=n.error===void 0?null:(0,Q.jsx)(`code`,{className:`block wrap-break-word font-mono text-xs opacity-80`,children:n.error}),t[21]=n.error,t[22]=i);let a;t[23]===i?a=t[24]:(a=(0,Q.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-sm text-destructive`,children:[e,i]}),t[23]=i,t[24]=a),m=a;break bb1}d=`alert`,f=`space-y-2 text-sm text-destructive`,p=i.map(Ke)}t[11]=l,t[12]=n.error,t[13]=n.report.actions,t[14]=d,t[15]=f,t[16]=p,t[17]=m}else d=t[14],f=t[15],p=t[16],m=t[17];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;return t[25]!==d||t[26]!==f||t[27]!==p?(h=(0,Q.jsx)(`div`,{role:d,className:f,children:p}),t[25]=d,t[26]=f,t[27]=p,t[28]=h):h=t[28],h}function Ke(e){return(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[e.title===null?null:(0,Q.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,Q.jsx)(`p`,{children:e.managedInSkillsStudio?(0,Q.jsx)(r,{id:`5RiC8D`}):e.detail})]},e.key)}function qe(e){return e.managedInSkillsStudio||e.detail!==null}function Je(e){return e.errorId!==void 0}function Ye(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Q.jsx)(r,{id:`s8difl`})}),e[0]=t):t=e[0],t}function Xe(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`74Mikl`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Ze(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`2lJAvH`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Qe(e){let t=(0,J.c)(141),{connection:n,open:a,onOpenChange:o,onSave:s,paired:c,onCloseAutoFocus:l,validateSave:u,alternateAction:d}=e,f=c===void 0?!1:c,{i18n:p,_:m}=i(),h=(0,q.useId)(),g;t[0]===n?g=t[1]:(g=()=>n===null?be:Me(n),t[0]=n,t[1]=g);let[_,v]=(0,q.useState)(g),[C,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),[j,M]=(0,q.useState)(null),N;t[2]!==n||t[3]!==_?(N=n!==null&&xe.some(e=>{let t=n.cells[e];return _[e]&&t!==void 0&&F(t.state)}),t[2]=n,t[3]=_,t[4]=N):N=t[4];let P=N,I;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e,t){v(n=>({...n,[e]:t})),A(null),O(null),M(null)},t[5]=I):I=t[5];let L=I,R;t[6]!==n||t[7]!==_?(R=n!==null&&!_.projectSkill&&Ve(n,`projectSkill`),t[6]=n,t[7]=_,t[8]=R):R=t[8];let ee=R,z,B,V,H,fe,U,W,G,K,Y,me,he,ge,_e,X,ve,ye,Z;if(t[9]!==m||t[10]!==n||t[11]!==_||t[12]!==l||t[13]!==o||t[14]!==a||t[15]!==f||t[16]!==C||t[17]!==j||t[18]!==ee){let e=n===null?[]:Ce(n,`project`),i=n===null?[]:Ce(n,`machine`),s=n!==null&&e.length===0,c=n?.label,u=we(e),d=we(i),p;t[37]!==n?.cells||t[38]!==_?(p=xe.filter(e=>n?.cells[e]?.checked===!0&&!_[e]),t[37]=n?.cells,t[38]=_,t[39]=p):p=t[39],U=p.length;let h;t[40]!==n||t[41]!==_?(h=xe.filter(e=>n?.cells[e]!==void 0&&_[e]&&!n.cells[e]?.checked),t[40]=n,t[41]=_,t[42]=h):h=t[42],H=h.length;let g;t[43]!==m||t[44]!==H||t[45]!==U?(g=H>0&&U>0?m({id:`6tQC_t`,values:{addingCount:H,removingCount:U}}):H>0?S._({id:`xKcXG6`,values:{addingCount:H}}):U>0?S._({id:`0niWj3`,values:{removingCount:U}}):null,t[43]=m,t[44]=H,t[45]=U,t[46]=g):g=t[46];let v=g;W=U>0&&H===0;let y;t[47]!==_||t[48]!==W?(y=W&&xe.every(e=>!_[e]),t[47]=_,t[48]=W,t[49]=y):y=t[49];let b=y;Z=j!==null&&j.peerSatisfierIds.length>0;let x;t[50]!==m||t[51]!==H||t[52]!==n||t[53]!==b||t[54]!==U||t[55]!==j||t[56]!==v||t[57]!==Z?(x=n===null?null:j===null?b?m({id:`CCngW8`,values:{0:n.label}}):v:Z?m(H>0?{id:`0hAvVd`,values:{0:n.label,1:j.peers,addingCount:H,removingCount:U}}:{id:`yqr502`,values:{0:n.label,1:j.peers,removingCount:U}}):v,t[50]=m,t[51]=H,t[52]=n,t[53]=b,t[54]=U,t[55]=j,t[56]=v,t[57]=Z,t[58]=x):x=t[58],fe=x,V=ue,he=a,t[59]!==o||t[60]!==C?(ge=e=>!C&&o(e),t[59]=o,t[60]=C,t[61]=ge):ge=t[61],B=oe,G=`sm:max-w-lg`,K=!1,Y=l;let w;t[62]===n?w=t[63]:(w=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[62]=n,t[63]=w);let T=n?.label,E;t[64]!==w||t[65]!==T?(E=(0,Q.jsxs)(ae,{className:`flex items-center gap-2 text-lg`,children:[w,T]}),t[64]=w,t[65]=T,t[66]=E):E=t[66];let D;t[67]!==m||t[68]!==c||t[69]!==n||t[70]!==s?(D=m(n?s?{id:`bm1oV9`,values:{agentLabel:c}}:{id:`qr2gAH`,values:{0:n.label}}:{id:`CxnZP4`}),t[67]=m,t[68]=c,t[69]=n,t[70]=s,t[71]=D):D=t[71];let O;t[72]===D?O=t[73]:(O=(0,Q.jsx)(ie,{children:D}),t[72]=D,t[73]=O),t[74]!==E||t[75]!==O?(me=(0,Q.jsxs)(le,{className:`gap-2`,children:[E,O]}),t[74]=E,t[75]=O,t[76]=me):me=t[76],z=se,_e=`flex flex-col gap-6`,t[77]!==n||t[78]!==f?(X=f&&n?(0,Q.jsx)(Xe,{label:n.label}):null,t[77]=n,t[78]=f,t[79]=X):X=t[79],ve=e.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ZWyHmq`}),(0,Q.jsx)(re,{variant:`secondary`,className:`font-mono text-[10px] uppercase`,children:(0,Q.jsx)(r,{id:`WEYdDv`})})]}),e.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:u.get(t)??[],draft:_,setPart:L},t)}),ee?(0,Q.jsx)(Ye,{}):null]}):null,ye=i.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ImTzPZ`})]}),i.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:d.get(t)??[],draft:_,setPart:L},t)})]}):null,t[9]=m,t[10]=n,t[11]=_,t[12]=l,t[13]=o,t[14]=a,t[15]=f,t[16]=C,t[17]=j,t[18]=ee,t[19]=z,t[20]=B,t[21]=V,t[22]=H,t[23]=fe,t[24]=U,t[25]=W,t[26]=G,t[27]=K,t[28]=Y,t[29]=me,t[30]=he,t[31]=ge,t[32]=_e,t[33]=X,t[34]=ve,t[35]=ye,t[36]=Z}else z=t[19],B=t[20],V=t[21],H=t[22],fe=t[23],U=t[24],W=t[25],G=t[26],K=t[27],Y=t[28],me=t[29],he=t[30],ge=t[31],_e=t[32],X=t[33],ve=t[34],ye=t[35],Z=t[36];let Se;t[80]!==n||t[81]!==T||t[82]!==D||t[83]!==j||t[84]!==k?(Se=j===null?k===null?D===null?T!==null&&n!==null?(0,Q.jsx)(Ge,{result:T,connection:n}):null:(0,Q.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:D}):(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:k}):(0,Q.jsx)(it,{choice:j}),t[80]=n,t[81]=T,t[82]=D,t[83]=j,t[84]=k,t[85]=Se):Se=t[85];let $;t[86]!==z||t[87]!==Se||t[88]!==_e||t[89]!==X||t[90]!==ve||t[91]!==ye?($=(0,Q.jsxs)(z,{className:_e,children:[X,ve,ye,Se]}),t[86]=z,t[87]=Se,t[88]=_e,t[89]=X,t[90]=ve,t[91]=ye,t[92]=$):$=t[92];let Te;t[93]===fe?Te=t[94]:(Te=(0,Q.jsx)(`p`,{role:`status`,className:`me-auto text-xs text-muted-foreground`,"aria-live":`polite`,"aria-atomic":`true`,children:fe}),t[93]=fe,t[94]=Te);let Ee;t[95]===o?Ee=t[96]:(Ee=()=>o(!1),t[95]=o,t[96]=Ee);let De;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Q.jsx)(r,{id:`dEgA5A`}),t[97]=De):De=t[97];let ke;t[98]!==C||t[99]!==Ee?(ke=(0,Q.jsx)(x,{variant:`outline`,className:`font-mono uppercase`,disabled:C,onClick:Ee,children:De}),t[98]=C,t[99]=Ee,t[100]=ke):ke=t[100];let Ae;t[101]!==d||t[102]!==h||t[103]!==C?(Ae=d===void 0?null:(0,Q.jsxs)(`div`,{className:`flex flex-col items-start gap-2 sm:items-end`,children:[d.preference===void 0?null:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(y,{id:h,checked:d.preference.checked,disabled:C,onCheckedChange:e=>d.preference?.onCheckedChange(e===!0)}),(0,Q.jsx)(b,{htmlFor:h,className:`cursor-pointer text-sm`,children:d.preference.label})]}),(0,Q.jsx)(x,{variant:`ghost`,className:`font-mono uppercase`,disabled:C,onClick:d.onClick,children:d.label})]}),t[101]=d,t[102]=h,t[103]=C,t[104]=Ae):Ae=t[104];let je=P||U>0?`destructive`:`default`,Ne=C||(j===null?H+U===0:!Z),Pe;t[105]!==n||t[106]!==_||t[107]!==p||t[108]!==o||t[109]!==s||t[110]!==j?.peerSatisfierIds||t[111]!==u?(Pe=()=>{let e=u?.(_)??null;if(e!==null){A(e);return}w(!0),A(null),E(null),O(null);let t=j?.peerSatisfierIds;M(null),s(_,t).then(e=>{if(`kind`in e){O(e.message);return}if(e.ok){o(!1);return}let t=n===null?null:rt(e,n,p.locale);t===null?E(e):M(t)}).catch(()=>E({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null})).finally(()=>w(!1))},t[105]=n,t[106]=_,t[107]=p,t[108]=o,t[109]=s,t[110]=j?.peerSatisfierIds,t[111]=u,t[112]=Pe):Pe=t[112];let Fe;t[113]!==P||t[114]!==W||t[115]!==C||t[116]!==Z?(Fe=C?(0,Q.jsx)(r,{id:`uF9ruK`}):Z?(0,Q.jsx)(r,{id:`dGcsnU`}):P?(0,Q.jsx)(r,{id:`inJhKB`}):W?(0,Q.jsx)(r,{id:`t_YqKh`}):(0,Q.jsx)(r,{id:`y3aU20`}),t[113]=P,t[114]=W,t[115]=C,t[116]=Z,t[117]=Fe):Fe=t[117];let Ie;t[118]!==je||t[119]!==Ne||t[120]!==Pe||t[121]!==Fe?(Ie=(0,Q.jsx)(x,{variant:je,className:`font-mono uppercase`,disabled:Ne,onClick:Pe,children:Fe}),t[118]=je,t[119]=Ne,t[120]=Pe,t[121]=Fe,t[122]=Ie):Ie=t[122];let Le;t[123]!==Te||t[124]!==ke||t[125]!==Ae||t[126]!==Ie?(Le=(0,Q.jsxs)(ce,{className:`items-center`,children:[Te,ke,Ae,Ie]}),t[123]=Te,t[124]=ke,t[125]=Ae,t[126]=Ie,t[127]=Le):Le=t[127];let Re;t[128]!==B||t[129]!==G||t[130]!==K||t[131]!==Y||t[132]!==me||t[133]!==$||t[134]!==Le?(Re=(0,Q.jsxs)(B,{className:G,showCloseButton:K,onCloseAutoFocus:Y,children:[me,$,Le]}),t[128]=B,t[129]=G,t[130]=K,t[131]=Y,t[132]=me,t[133]=$,t[134]=Le,t[135]=Re):Re=t[135];let ze;return t[136]!==V||t[137]!==he||t[138]!==ge||t[139]!==Re?(ze=(0,Q.jsx)(V,{open:he,onOpenChange:ge,children:Re}),t[136]=V,t[137]=he,t[138]=ge,t[139]=Re,t[140]=ze):ze=t[140],ze}function $e(e){switch(e){case`projectMcp`:return(0,Q.jsx)(r,{id:`ggMMa7`});case`projectSkill`:return(0,Q.jsx)(r,{id:`LtiJ5c`});case`globalMcp`:return(0,Q.jsx)(r,{id:`2gXnCO`});case`discoverySkill`:return(0,Q.jsx)(r,{id:`ejiJeW`})}}function et(e,t){return xe.flatMap(n=>{let r=e.cells[n];return r?.checked===!0?[{cell:r,part:n,label:$e(n),path:r.resolvedPath??Y(r.pathId),scope:r.scope===`project`?`project`:`machine`,alsoAffects:r.piece===`skill`&&r.sharedFolderWith.length>0?K(r.sharedFolderWith.map(nt),t):null}]:[]})}function tt(e){let t=(0,J.c)(12),{scope:n,rows:a}=e,{_:o}=i();if(a.length===0)return null;let s;t[0]===n?s=t[1]:(s=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 border-b bg-muted/60 px-3 py-2 font-mono text-xs uppercase tracking-wide text-muted-foreground`,children:[n===`project`?(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}):(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),n===`project`?(0,Q.jsx)(r,{id:`ZWyHmq`}):(0,Q.jsx)(r,{id:`ImTzPZ`})]}),t[0]=n,t[1]=s);let c;if(t[2]!==o||t[3]!==a){let e;t[5]===o?e=t[6]:(e=e=>{let t=e.alsoAffects;return(0,Q.jsxs)(`li`,{className:`flex items-start gap-3 px-3 py-3`,children:[(0,Q.jsx)(H,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-sm font-medium`,children:e.label}),e.path===null?null:(0,Q.jsx)(`code`,{className:`block truncate text-xs text-muted-foreground`,children:e.path}),t===null?null:(0,Q.jsx)(`p`,{className:`text-xs text-amber-700 dark:text-amber-400`,children:o({id:`qze9od`,values:{alsoAffects:t}})})]})]},e.cell.satisfierId)},t[5]=o,t[6]=e),c=a.map(e),t[2]=o,t[3]=a,t[4]=c}else c=t[4];let l;t[7]===c?l=t[8]:(l=(0,Q.jsx)(`ul`,{className:`divide-y divide-border`,children:c}),t[7]=c,t[8]=l);let u;return t[9]!==s||t[10]!==l?(u=(0,Q.jsxs)(`div`,{children:[s,l]}),t[9]=s,t[10]=l,t[11]=u):u=t[11],u}function nt(e){return D[e]??e}function rt(e,t,n){let r=e.report.conflicts.filter(e=>e.kind===`unresolved-shared-copy`),i=new Set(Object.values(t.cells).map(e=>e.satisfierId)),a=[...new Set(r.flatMap(e=>e.satisfierIds))].filter(e=>!i.has(e)),o=[...new Set(r.flatMap(e=>e.agentIds))].filter(e=>e!==t.id);if(a.length===0&&o.length===0)return null;let s=[...new Set(r.map(e=>Y(e.pathId)).filter(e=>e!==null))];return{peers:K(o.map(nt),n),path:s.length===1?s[0]:null,peerSatisfierIds:a}}function it(e){let t=(0,J.c)(5),{choice:n}=e,{peers:i,path:a}=n;if(n.peerSatisfierIds.length===0){let e;return t[0]===i?e=t[1]:(e=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:(0,Q.jsx)(r,{id:`H8tj8y`,values:{peers:i}})}),t[0]=i,t[1]=e),e}let o;return t[2]!==a||t[3]!==i?(o=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:a===null?(0,Q.jsx)(r,{id:`4C2RCg`,values:{peers:i}}):(0,Q.jsx)(r,{id:`fybwfg`,values:{peers:i,path:a},components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}),t[2]=a,t[3]=i,t[4]=o):o=t[4],o}function at(e){let t=(0,J.c)(96),{connection:n,open:a,onOpenChange:o,onRemove:s,paired:c}=e,l=c===void 0?!1:c,{i18n:y,_:b}=i(),x=(0,q.useRef)(null),S=(0,q.useRef)(null),C,w;t[0]===a?(C=t[1],w=t[2]):(C=()=>{if(!a)return;let e=document.activeElement;x.current=e,S.current=e?.closest(`section`)??null},w=[a],t[0]=a,t[1]=C,t[2]=w),(0,q.useEffect)(C,w);let[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),j,M,N,P,F,I,L,R,ee,te,z,ne,B,V,H,re;if(t[3]!==b||t[4]!==n||t[5]!==y||t[6]!==o||t[7]!==s||t[8]!==a||t[9]!==T){F=n?et(n,y.locale):[];let e;t[26]!==n||t[27]!==y||t[28]!==o||t[29]!==s?(e=function(e){n!==null&&(E(!0),O(null),A(null),s(e).then(e=>{if(e.ok){o(!1);return}let t=rt(e,n,y.locale);t===null?O(e):A(t)}).catch(e=>O({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null,error:e instanceof Error?e.message:String(e)})).finally(()=>E(!1)))},t[26]=n,t[27]=y,t[28]=o,t[29]=s,t[30]=e):e=t[30],I=e,P=v,ee=a,t[31]!==o||t[32]!==T?(te=e=>!T&&o(e),t[31]=o,t[32]=T,t[33]=te):te=t[33],N=u,re=`sm:max-w-lg`,t[34]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{let t=x.current,n=t?.isConnected?t:Z(S.current);n?.isConnected&&(e.preventDefault(),n.focus())},t[34]=L):L=t[34];let i;t[35]===n?i=t[36]:(i=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[35]=n,t[36]=i);let c;t[37]!==b||t[38]!==n?(c=b(n?{id:`ApNWRQ`,values:{0:n.label}}:{id:`Y1wa2r`}),t[37]=b,t[38]=n,t[39]=c):c=t[39];let l;t[40]!==i||t[41]!==c?(l=(0,Q.jsxs)(p,{className:`flex items-center gap-2 text-lg`,children:[i,c]}),t[40]=i,t[41]=c,t[42]=l):l=t[42];let f;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(h,{children:(0,Q.jsx)(r,{id:`da7Yfw`})}),t[43]=f):f=t[43],t[44]===l?R=t[45]:(R=(0,Q.jsxs)(d,{className:`gap-2`,children:[l,f]}),t[44]=l,t[45]=R),M=g,H=`flex flex-col gap-4`,B=`overflow-hidden rounded-lg border`,V=(0,Q.jsx)(tt,{scope:`project`,rows:F.filter(st)}),j=tt,z=`machine`,ne=F.filter(ot),t[3]=b,t[4]=n,t[5]=y,t[6]=o,t[7]=s,t[8]=a,t[9]=T,t[10]=j,t[11]=M,t[12]=N,t[13]=P,t[14]=F,t[15]=I,t[16]=L,t[17]=R,t[18]=ee,t[19]=te,t[20]=z,t[21]=ne,t[22]=B,t[23]=V,t[24]=H,t[25]=re}else j=t[10],M=t[11],N=t[12],P=t[13],F=t[14],I=t[15],L=t[16],R=t[17],ee=t[18],te=t[19],z=t[20],ne=t[21],B=t[22],V=t[23],H=t[24],re=t[25];let ie;t[46]!==j||t[47]!==z||t[48]!==ne?(ie=(0,Q.jsx)(j,{scope:z,rows:ne}),t[46]=j,t[47]=z,t[48]=ne,t[49]=ie):ie=t[49];let ae;t[50]!==ie||t[51]!==B||t[52]!==V?(ae=(0,Q.jsxs)(`div`,{className:B,children:[V,ie]}),t[50]=ie,t[51]=B,t[52]=V,t[53]=ae):ae=t[53];let oe;t[54]!==n||t[55]!==l?(oe=l&&n?(0,Q.jsx)(Ze,{label:n.label}):null,t[54]=n,t[55]=l,t[56]=oe):oe=t[56];let se;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Q.jsx)(r,{id:`Evsh6U`})}),t[57]=se):se=t[57];let ce;t[58]!==n||t[59]!==D||t[60]!==k?(ce=k===null?D!==null&&n!==null?(0,Q.jsx)(Ge,{result:D,connection:n}):null:(0,Q.jsx)(it,{choice:k}),t[58]=n,t[59]=D,t[60]=k,t[61]=ce):ce=t[61];let le;t[62]!==M||t[63]!==ae||t[64]!==oe||t[65]!==ce||t[66]!==H?(le=(0,Q.jsxs)(M,{className:H,children:[ae,oe,se,ce]}),t[62]=M,t[63]=ae,t[64]=oe,t[65]=ce,t[66]=H,t[67]=le):le=t[67];let ue;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Q.jsx)(r,{id:`dEgA5A`}),t[68]=ue):ue=t[68];let de;t[69]===T?de=t[70]:(de=(0,Q.jsx)(f,{disabled:T,children:ue}),t[69]=T,t[70]=de);let fe=T||F.length===0||k!==null&&k.peerSatisfierIds.length===0,U;t[71]!==k?.peerSatisfierIds||t[72]!==I?(U=e=>{e.preventDefault(),I(k?.peerSatisfierIds)},t[71]=k?.peerSatisfierIds,t[72]=I,t[73]=U):U=t[73];let pe;t[74]!==T||t[75]!==k?(pe=T?(0,Q.jsx)(r,{id:`uF9ruK`}):k!==null&&k.peerSatisfierIds.length>0?(0,Q.jsx)(r,{id:`dGcsnU`}):(0,Q.jsx)(r,{id:`t_YqKh`}),t[74]=T,t[75]=k,t[76]=pe):pe=t[76];let W;t[77]!==fe||t[78]!==U||t[79]!==pe?(W=(0,Q.jsx)(m,{variant:`destructive`,className:`font-mono uppercase`,disabled:fe,onClick:U,children:pe}),t[77]=fe,t[78]=U,t[79]=pe,t[80]=W):W=t[80];let G;t[81]!==de||t[82]!==W?(G=(0,Q.jsxs)(_,{children:[de,W]}),t[81]=de,t[82]=W,t[83]=G):G=t[83];let K;t[84]!==N||t[85]!==L||t[86]!==R||t[87]!==le||t[88]!==G||t[89]!==re?(K=(0,Q.jsxs)(N,{className:re,onCloseAutoFocus:L,children:[R,le,G]}),t[84]=N,t[85]=L,t[86]=R,t[87]=le,t[88]=G,t[89]=re,t[90]=K):K=t[90];let Y;return t[91]!==P||t[92]!==ee||t[93]!==te||t[94]!==K?(Y=(0,Q.jsx)(P,{open:ee,onOpenChange:te,children:K}),t[91]=P,t[92]=ee,t[93]=te,t[94]=K,t[95]=Y):Y=t[95],Y}function ot(e){return e.scope===`machine`}function st(e){return e.scope===`project`}function ct(e,t,n=[]){let r=je(e);return[...n.map(e=>({satisfierId:e,desired:`absent`})),...xe.flatMap(n=>{let i=e.cells[n];return i===void 0||t[n]===r[n]?[]:[{satisfierId:i.satisfierId,desired:t[n]?`present`:`absent`}]})]}function lt(e,t=[]){let n=je(e),r=Object.fromEntries(xe.map(t=>[t,e.cells[t]?!1:n[t]])),i=t.map(e=>({satisfierId:e,desired:`absent`}));return[...ct(e,r),...i]}function ut(e){if(e.status===`nothing-required`)return`met`;let t=!1;for(let n of e.options){if(n.confidence===`unverified`){t=!0;continue}if(n.counts)return`met`}return t?`unprobed`:`unmet`}function dt(e,t,n){return n===!1?`absent`:n===!0?`present`:t===null||!t.detection.probed?`unknown`:L(t.detection,e)?`present`:`absent`}function ft(e){let{agentId:t,mode:n,snapshot:r,detected:i}=e;if(dt(t,r,i)===`absent`)return`not-installed`;if(r===null)return`no-status`;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.filter(e=>e.level===`required`);if(a.length===0)return`no-status`;let o=a.map(ut);return o.includes(`unprobed`)?`no-status`:o.includes(`unmet`)?`not-connected`:`connected`}function pt(e){return e===`enable-manually`?`external`:`terminal`}function mt(e){let{agentId:t,mode:n,snapshot:r,projectMcp:i}=e;if(r===null||i?.followup===void 0||ft(e)!==`connected`)return;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.find(e=>e.level===`required`&&e.piece===`mcp`);if(a===void 0||a.status!==`met`)return;let o=a.options.filter(e=>e.counts);if(!(o.length!==1||o[0]?.id!==i.satisfierId))return i.followup}var ht={actions:[],conflicts:[],withheld:[]};function gt(e){return{ok:!1,report:ht,snapshot:null,error:e}}function _t(e){return e.conflicts.length===0&&e.actions.every(e=>e.errorId===void 0)}async function vt(e,t){let n=globalThis.window?.okDesktop;if(n!==void 0)try{let t=await n.agentIntegrations.apply({intents:e});return t.ok?{ok:!0,report:t.report,snapshot:t.snapshot}:{ok:!1,report:t.report,snapshot:t.snapshot,error:t.error,...t.unavailable===!0?{unavailable:!0}:{},...t.devBuild===!0?{devBuild:!0}:{}}}catch(e){return{ok:!1,report:ht,snapshot:null,error:e instanceof Error?e.message:String(e)}}let r;try{r=await fetch(`/api/agent-integrations/apply`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({intents:e}),signal:t?.webSignal})}catch(e){return gt(e instanceof Error?e.message:String(e))}if(!r.ok)return gt(`HTTP ${r.status} ${r.statusText}`.trimEnd());let i;try{i=await r.json()}catch(e){return gt(e instanceof Error?e.message:String(e))}let a=w.safeParse(i);if(!a.success){let e=a.error.issues.map(e=>e.path.join(`.`));return console.warn(`[agent-connections] response schema drift`,{issues:e}),gt(`Unexpected response shape at ${e.join(`, `)}`)}let o={actions:a.data.actions,conflicts:a.data.conflicts,withheld:a.data.withheld};return{ok:_t(o),report:o,snapshot:a.data.snapshot}}var yt=new Set;function bt(e){return yt.add(e),()=>{yt.delete(e)}}async function xt(e,t){let n=await vt(e,t);if(e.length>0){let e=[...yt];for(let t of e)try{t(n)}catch(e){console.warn(`[agent-connections] change listener failed:`,e)}}return n}export{je as _,pt as a,Oe as c,De as d,ke as f,ct as g,Ne as h,mt as i,at as l,Ae as m,bt as n,dt as o,Pe as p,ft as r,Qe as s,xt as t,Fe as u,lt as v,Z as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,f as n,g as r,i,m as a,p as o,s,t as c,u as l,v as u,y as ee}from"./schemas-B93JY9Ef.js";import{Ft as d,It as te,Lt as ne,Mt as re,Nt as ie,Pt as ae,Rt as f,jt as oe}from"./schemas-api-DbKS2FSh.js";import{i as p,t as m}from"./constants-editors-DLxv8SuP.js";import{b as se}from"./handoff-Ccrokk1b.js";var h=[...m,`gemini`],g=c(h);function _(e){return h.includes(e)}var ce=c([`acp`,`terminal`,`external`]),le=c([...se,`gemini`]),ue=c([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),v=c([`mcp`,`skill`]),de=[`project`,`user`,`session`],fe=c(de),y=u().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),pe=u().min(1).transform(e=>e),me=u().min(1).transform(e=>e);function b(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function he(e){return e}function ge(e){return e}var _e=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],ve=he(`central-skill-store`);function x(e,t){return he(`${e}:${t}`)}function ye(e){if(e===ve)return{kind:`central-skill-store`};let t=e.indexOf(`:`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!_e.includes(n)||!m.includes(r)?null:{kind:n,editor:r}}var be=c(m),S=o({kind:c([`source-read`,`measured`,`vendor-doc`,`upstream-issue`,`observation`]),ref:u().min(1),note:u().optional()}),C=o({version:u().min(1).optional(),observedAt:u().min(1)}),xe=s(`confidence`,[o({confidence:l(`verified`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`assumed`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`contested`),evidence:i(S).min(1),verifiedAgainst:C})]),w=o({id:me,params:r(u(),ee([u(),n(),t()])).optional()}),Se=s(`mode`,[o({mode:l(`probeable`),strictness:i(d).min(1)}),o({mode:l(`unprobeable`),reason:c([`no-readable-state`,`different-machine`,`no-programmatic-path`,`session-scoped`]),note:u().optional()})]),Ce=c([`this-project`,`this-user`,`this-machine`]),we=c([`installable`,`user-completes`,`not-installable`]),Te=o({id:y,agent:g,piece:v,scope:fe,kind:ne,pathId:pe.optional(),sharedWith:i(g).default([]),prerequisites:i(y).default([]),consentClass:re.default(`none`),probe:Se,attestation:xe,audience:Ce,installability:we.default(`installable`),notInstallableReason:c([`no-non-interactive-verb`,`session-scoped`,`no-surface`]).optional(),preferred:t().default(!1),guidance:w.optional(),followup:w.optional(),troubleshooting:i(w).default([])}),Ee=o({piece:v,level:te,satisfiedByAny:i(y)}),De=o({acpAgentId:u().min(1),featuredOrder:n().int().nonnegative().nullable(),harnessCli:le.nullable(),harnessReadsEditorConfig:be.nullable(),harnessReadsEditorConfigAttestation:xe,verifiedPosture:c([`asks`,`self-managed`,`autonomous`]).nullable()}),Oe=o({cliId:u().min(1)}),T=[`darwin`,`win32`,`linux`],ke=c(T),Ae=o({targetId:ue,knownOrder:n().int().nonnegative(),visible:t(),displayName:u().min(1),appBrandName:u().min(1).optional(),schemes:i(u().min(1)),installUrl:u().min(1),platforms:i(ke).min(1),tagline:u().min(1).optional()}),je=o({requirements:i(Ee),caveats:i(w).default([])});o({id:g,setupDocSlug:u().min(1).nullable(),offerOnlyWhenDetected:t().default(!1),offersConnectionRow:t().default(!1),detectionSources:i(u().min(1)).default([]),satisfiers:i(Te),modes:a(ce,je),acp:De.optional(),terminal:Oe.optional(),external:Ae.optional()}),o({id:u().min(1),requiredStrictness:d,scope:fe.optional(),piece:v,revokedByForeignEntry:t().default(!1),guidance:w.optional()});var Me=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function E(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:Me(o),id:b({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??`none`,installability:i??`installable`,preferred:a??!1}}function D(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...a}=e,o={};for(let[e,t]of Object.entries(i))o[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...a,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:o}}var O=(e,t,n,r)=>b({agent:e,piece:t,scope:n,kind:r}),k=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),A=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),j=(...e)=>({mode:`probeable`,strictness:e}),Ne=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),M=(e,t)=>({id:ge(e),...t===void 0?{}:{params:t}}),Pe=(e,t)=>{let n=ae.find(t=>t===e);return n===void 0?void 0:M(`followup.${n}`,{agent:t})},N=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),P=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},Fe=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function F(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function I(e){let{appBrandName:t,tagline:n,platforms:r=T,...i}=e;return{...i,platforms:[...r],...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var L=(e,t)=>({kind:`observation`,ref:e,note:t}),R={observedAt:`2026-07-02`},z={cliEditors:`packages/cli/src/commands/editors.ts`,coreEditors:`packages/core/src/constants/editors.ts`,acpRegistry:`packages/server/src/acp/registry.ts`,threadManager:`packages/server/src/acp/thread-manager.ts`,writeProjectSkill:`packages/cli/src/integrations/write-project-skill.ts`,repairSkills:`packages/cli/src/commands/repair-skills.ts`,skillInstall:`packages/server/src/skill-install.ts`,presenceProbes:`packages/desktop/src/main/integrations-settings.ts`};function B(e){return E({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:x(`editor-user-config`,e.agent),probe:j(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:M(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function V(e){return E({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:x(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:j(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.mcp.project-config`,{agent:e.agent}),followup:Pe(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function H(e){return E({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:x(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function U(e){return E({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:x(`editor-user-skill-root`,e.agent),probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:M(`guidance.skill.user`,{agent:e.agent})})}function W(e){return E({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:Ne(`session-scoped`),attestation:P([N(z.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:M(`guidance.mcp.session-injection`,{agent:e})})}var G={claude:D({id:`claude`,setupDocSlug:p.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[B({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors,`user-global MCP config target`)])}),V({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors),N(z.coreEditors)]),troubleshooting:M(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),H({agent:`claude`,prerequisites:[O(`claude`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`claude`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`claude`)],modes:{external:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`claude`,`mcp`,`session`,`session-injection`),O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:P([N(z.threadManager,`the injection-skip probe reads the managed entry for this editor`),L(`claude-acp adapter`,`The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.`)],R),verifiedPosture:`asks`}),external:I({targetId:`claude-code`,knownOrder:1,visible:!0,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`})}),"claude-desktop":D({id:`claude-desktop`,setupDocSlug:p[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[B({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:M(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[k([O(`claude-desktop`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`claude-cowork`,knownOrder:0,visible:!1,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`})}),cursor:D({id:`cursor`,setupDocSlug:p.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[B({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors),N(z.coreEditors),{kind:`observation`,ref:`cursor-3.19.19-project-server-default-off`,note:`project .cursor/mcp.json server listed Disabled under Customize → MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it`}],{version:`3.19.19`,observedAt:`2026-09-09`}),troubleshooting:M(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),H({agent:`cursor`,prerequisites:[O(`cursor`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`cursor`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`cursor`)],modes:{external:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`cursor`,`mcp`,`session`,`session-injection`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:P([L(`cursor-agent mcp list`,`Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.`),N(z.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:I({targetId:`cursor`,knownOrder:3,visible:!0,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`})}),codex:D({id:`codex`,setupDocSlug:p.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[B({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`TOML user-global config target`)])}),V({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:Fe([N(z.cliEditors,`project config path added by analogy with the other editors`),{kind:`upstream-issue`,ref:`openai/codex#13025`,note:`open, reproduced on builds newer than the one OK checked`},{kind:`upstream-issue`,ref:`openai/codex#36960`,note:`requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks`},{kind:`vendor-doc`,ref:`OpenAI Codex: Advanced configuration`,note:`project-scoped config loads only for a trusted project`},{kind:`observation`,ref:`codex-desktop-project-config-load`,note:`single non-repro on 26.623.81905; the CLI honors it only for a trusted project`}],{version:`26.707.72221`,observedAt:`2026-07-15`}),troubleshooting:[M(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),M(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),H({agent:`codex`,prerequisites:[O(`codex`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)]),troubleshooting:M(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),U({agent:`codex`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`codex`)],modes:{external:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`codex`,`mcp`,`session`,`session-injection`),O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),L(`codex-acp adapter`,`The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.`)],R),verifiedPosture:`self-managed`}),external:I({targetId:`codex`,knownOrder:2,visible:!0,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`})}),copilot:D({id:`copilot`,setupDocSlug:p.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[B({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:P([{kind:`vendor-doc`,ref:`GitHub Copilot CLI — MCP configuration`,note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:`vendor-doc`,ref:`GitHub Docs: Adding MCP servers for Copilot CLI`,note:`project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`},N(z.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:M(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),H({agent:`copilot`,prerequisites:[O(`copilot`,`mcp`,`project`,`config-entry`),O(`copilot`,`mcp`,`user`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)])}),U({agent:`copilot`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`copilot`)],modes:{external:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`copilot`,`mcp`,`session`,`session-injection`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[L(`copilot CLI 1.0.80`,"The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:`1.0.80`,observedAt:`2026-08-20`}},verifiedPosture:null}),external:I({targetId:`copilot`,knownOrder:4,visible:!1,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`})}),opencode:D({id:`opencode`,setupDocSlug:p.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[B({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),V({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`the one project config that is not under a dotdir`)])}),H({agent:`opencode`,prerequisites:[O(`opencode`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`opencode`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`opencode`)],modes:{external:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`opencode`,`mcp`,`session`,`session-injection`),O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the opencode config`),L(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],R),verifiedPosture:null}),external:I({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:D({id:`openclaw`,setupDocSlug:p.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[B({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),E({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:ve,probe:j(`reclaim-permissive`),attestation:P([N(z.coreEditors),N(z.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:M(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:M(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:I({targetId:`openclaw`,knownOrder:8,visible:!1,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`})}),pi:D({id:`pi`,setupDocSlug:p.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[E({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:x(`editor-project-config`,`pi`),probe:j(`reclaim-permissive`,`injection-functional`),attestation:P([N(z.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),N(z.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:M(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),H({agent:`pi`,prerequisites:[O(`pi`,`mcp`,`project`,`managed-file`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)]),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),U({agent:`pi`,attestation:P([N(z.coreEditors,`the agent home nests one level below the dotdir`),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:P([L(`pi-acp@0.0.33`,"Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting — the same mapping, a different shape."),N(z.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:I({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:D({id:`antigravity`,setupDocSlug:p.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[B({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),U({agent:`antigravity`,attestation:P([N(z.coreEditors),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:I({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":D({id:`lm-studio`,setupDocSlug:p[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[B({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:P([N(z.cliEditors,`two candidate locations, resolved against what already exists`),{kind:`upstream-issue`,ref:`lmstudio-ai/lmstudio-bug-tracker#1371`,note:`documented config path differs from the one the app reads on macOS`},N(z.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:M(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[k([O(`lm-studio`,`mcp`,`user`,`config-entry`)]),A([])]}}}),hermes:D({id:`hermes`,setupDocSlug:p.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[B({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]},terminal:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:D({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[W(`gemini`)],modes:{acp:{requirements:[k([O(`gemini`,`mcp`,`session`,`session-injection`)]),A([])]}},acp:F({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:P([N(z.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],R),verifiedPosture:null})})};function Ie(e){return G[e]}var Le=Object.values(G).flatMap(e=>e.satisfiers),Re=new Map(Le.map(e=>[e.id,e]));function ze(e){return Re.get(e)}var K=Object.values(G).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));K.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var Be=Object.fromEntries(K.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(K.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var Ve=Object.fromEntries(K.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),He=Object.values(G).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),Ue=He.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,platforms:a,tagline:o})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,platforms:a,...o===void 0?{}:{tagline:o}}));function We(e,t){return t==null||e.platforms.includes(t)}var Ge=new Set(He.filter(e=>e.visible).map(e=>e.targetId)),Ke=Ue.filter(e=>Ge.has(e.id)),qe=m.filter(e=>G[e].offersConnectionRow),Je=new Map(Object.values(G).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function Ye(e){return Je.get(e)}var Xe=new Map(Object.values(G).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function Ze(e){return Xe.get(e)}Object.fromEntries(Object.values(G).flatMap(e=>{let t=e.satisfiers.find(e=>e.piece===`mcp`&&e.scope===`project`&&e.consentClass!==`none`)?.consentClass;return t===void 0?[]:[[e.id,t]]})),new Set(oe);var Qe=[{id:`mcp-preapproval`,piece:`mcp`,scope:`project`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!1},{id:`tool-autoapprove`,piece:`mcp`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!0}];Qe.map(e=>e.id);var q={satisfied:{counts:!0,exception:null},"present-consent-unknown":{counts:!0,exception:`info`},absent:{counts:!1,exception:null},foreign:{counts:!1,exception:`warning`},"foreign-replaceable":{counts:!1,exception:`warning`},drifted:{counts:!1,exception:`warning`},excluded:{counts:!1,exception:`info`},"structural-na":{counts:!1,exception:`info`},undetected:{counts:!1,exception:null},unprobeable:{counts:!0,exception:`info`},unprobed:{counts:!1,exception:`info`}};c([`count-unverified`,`not-count`]);var $e={acp:{unprobed:`count-unverified`},terminal:{unprobed:`count-unverified`},external:{unprobed:`not-count`}};c([`acp-catalog-supported`,`harness-cli-on-path`,`os-scheme-handler`]);var et={acp:{signal:`acp-catalog-supported`,unresolved:`show`,negativeOutranksOverride:!0},terminal:{signal:`harness-cli-on-path`,unresolved:`show`,negativeOutranksOverride:!1},external:{signal:`os-scheme-handler`,unresolved:`hide`,negativeOutranksOverride:!1}};function J(e){return typeof e==`object`&&!!e}function Y(e,t){if(!J(e))return;let{satisfiers:n}=e;if(!J(n))return;let r=n[t];if(!J(r))return;let{state:i,strictness:a,sharedWith:o}=r;if(typeof i!=`string`||i.length===0)return;let s=Array.isArray(a)?a.filter(e=>typeof e==`string`):void 0,c=Array.isArray(o)?o.filter(e=>typeof e==`string`&&_(e)):void 0;return{state:i,...s===void 0?{}:{strictness:s},...c===void 0||c.length===0?{}:{sharedWith:c}}}function tt(e,t){if(!J(e))return!1;let{detected:n}=e;return Array.isArray(n)&&n.includes(t)}function X(e,t){return e.probe.mode===`unprobeable`?`unprobeable`:Y(t,e.id)?.state??`unprobed`}function Z(e){return f(e)?q[e]:q.unprobed}function nt(e,t){let n=e.filter(e=>{let n=ze(e);return n===void 0?!0:!Z(X(n,t)).counts});return n.length===e.length?n:[]}function rt(e){return Z(e).exception===`warning`}function it(e){return e.state===`foreign`?`foreign`:e.state===`structural-na`?`structural-na`:e.installability===`not-installable`?`not-installable`:e.agentFolded?`agent-undetected`:null}function at(e,t){let n=t?.probed===!0?tt(t,e.id):null;return{detected:n,folded:e.offerOnlyWhenDetected&&n===!1}}function ot(e,t){return(Y(t,e.id)?.sharedWith??[]).filter(t=>t!==e.agent)}var st=de.filter(e=>e!==`session`);function ct(e){return ie.includes(e)}function lt(e,t,n){let r=[];for(let i of e.satisfiers){if(!ct(i.kind))continue;let a=X(i,t),o=t?.satisfiers?.[i.id]?.path,s=Z(a),c=nt(i.prerequisites,t),l=it({state:a,installability:i.installability,agentFolded:n});r.push({satisfierId:i.id,agentId:e.id,piece:i.piece,scope:i.scope,kind:i.kind,...i.pathId===void 0?{}:{pathId:i.pathId},...o===void 0?{}:{resolvedPath:o},audience:i.audience,state:a,checked:s.counts,exception:s.exception,folded:a===`undetected`,enabled:l===null,disabledReason:l,sharedWith:i.sharedWith,sharedFolderWith:ot(i,t),prerequisites:i.prerequisites,unmetPrerequisites:c,consentClass:i.consentClass,installability:i.installability,...i.guidance===void 0?{}:{guidance:i.guidance},...i.followup===void 0?{}:{followup:i.followup},troubleshooting:i.troubleshooting})}return r}function ut(e){let t=[];for(let n of st){let r=e.filter(e=>e.scope===n);r.length!==0&&t.push({scope:n,cells:r})}return t}function dt(e,t,n){let{detected:r,folded:i}=at(e,n),a=lt(e,t,i);return{agentId:e.id,detected:r,folded:i,setupDocSlug:e.setupDocSlug,scopes:ut(a)}}function ft(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&_(e)):h}function pt(e={}){let{agentIds:t,probes:n,detection:r}=e;return{rows:ft(t).map(e=>G[e]).filter(e=>e!==void 0).map(e=>dt(e,n,r))}}var Q={agent:g},mt={"followup.enable-manually":{params:e(Q)},"guidance.mcp.user-config":{params:e(Q)},"guidance.mcp.project-config":{params:e(Q)},"guidance.mcp.session-injection":{params:e(Q)},"guidance.mcp.managed-file":{params:e(Q)},"guidance.skill.project":{params:e(Q)},"guidance.skill.user":{params:e(Q)},"guidance.skill.central-store":{params:e(Q)},"troubleshooting.claude.project-entry-not-approved":{params:e(Q)},"troubleshooting.claude-desktop.per-tool-approval":{params:e(Q)},"troubleshooting.cursor.project-entry-not-loaded":{params:e({...Q,server:u().optional()})},"troubleshooting.codex.desktop-project-config":{params:e({...Q,honoredByDesktop:t()})},"troubleshooting.codex.folder-trust":{params:e(Q)},"troubleshooting.copilot.shared-workspace-config":{params:e({...Q,sourceAgent:g})},"troubleshooting.openclaw.central-store-missing":{params:e(Q)},"troubleshooting.pi.folder-trust":{params:e(Q)},"troubleshooting.lm-studio.config-path-mismatch":{params:e(Q)}};Object.keys(mt).sort(),Le.flatMap(e=>e.probe.mode===`probeable`?[{satisfierId:e.id,agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind,pathId:e.pathId??null,strictness:e.probe.strictness}]:[]).map(e=>e.satisfierId);var ht={verified:3,unverifiable:2,unverified:1};function gt(e,t){let n=et[e],r=typeof t==`boolean`?t:null;return{signal:n.signal,resolved:r,show:r??n.unresolved===`show`}}function _t(e,t,n){let r=ze(e);if(r===void 0)return{id:e,state:`absent`,counts:!1,confidence:`unverified`,exception:q.absent.exception,consentClass:`none`,troubleshooting:[]};let i=X(r,n),a=!f(i)||i===`unprobed`,o=$e[t].unprobed===`count-unverified`;return{id:e,state:i,counts:a?o:Z(i).counts,confidence:a?`unverified`:i===`unprobeable`?`unverifiable`:`verified`,exception:Z(i).exception,consentClass:r.consentClass,...r.guidance===void 0?{}:{guidance:r.guidance},...r.followup===void 0?{}:{followup:r.followup},troubleshooting:r.troubleshooting}}function vt(e,t,n){let r=e.satisfiedByAny.map(e=>_t(e,t,n));if(r.length===0)return{piece:e.piece,level:e.level,status:`nothing-required`,confidence:null,satisfiedBy:null,options:r};let i=null;for(let e of r)e.counts&&(i===null||ht[e.confidence]>ht[i.confidence])&&(i=e);return{piece:e.piece,level:e.level,status:i===null?`unmet`:`met`,confidence:i?.confidence??null,satisfiedBy:i?.id??null,options:r}}var yt=[`absent`,`structural-na`];function bt(e,t){let n=[];for(let r of Qe){let i=e.satisfiers.filter(e=>e.piece===r.piece&&e.kind!==`session-injection`&&(r.scope===void 0||e.scope===r.scope));r.revokedByForeignEntry&&i.some(e=>yt.includes(X(e,t))?!1:!$(Y(t,e.id),r.requiredStrictness))||i.some(e=>e.probe.mode!==`probeable`||!e.probe.strictness.includes(r.requiredStrictness)||!Z(X(e,t)).counts?!1:$(Y(t,e.id),r.requiredStrictness))&&n.push(r.id)}return n}function $(e,t){return e?.strictness?.includes(t)===!0}function xt(e){let{agentId:t,mode:n,probes:r,modeSignal:i}=e,a=_(t)?Ie(t):void 0;if(a===void 0)return{agentId:t,mode:n,verdict:`not-registered`,visibility:{...gt(n,i),show:!0},requirements:[],grantedCapabilities:[],modeCaveats:[]};let o=gt(n,i),s=a.modes[n];if(s===void 0)return{agentId:t,mode:n,verdict:`mode-not-available`,visibility:o,requirements:[],grantedCapabilities:[],modeCaveats:[]};let c=s.requirements.map(e=>vt(e,n,r)),l=c.some(e=>e.level===`required`&&e.status===`unmet`),u=c.some(e=>e.status===`unmet`);return{agentId:t,mode:n,verdict:l?`blocked`:u?`ready-with-nudges`:`ready`,visibility:o,requirements:c,grantedCapabilities:bt(a,r),modeCaveats:s.caveats}}export{Be as a,qe as c,Ye as d,Ze as f,ye as h,rt as i,Ue as l,We as m,pt as n,Ve as o,Ie as p,tt as r,G as s,xt as t,Ke as u};
|
|
1
|
+
import{_ as e,a as t,f as n,g as r,i,m as a,p as o,s,t as c,u as l,v as u,y as ee}from"./schemas-B93JY9Ef.js";import{Bt as te,Gt as d,Ht as f,Rt as ne,Ut as re,Vt as ie,Wt as ae,zt as oe}from"./schemas-api-CQHNNDP6.js";import{i as p,t as m}from"./constants-editors-DLxv8SuP.js";import{b as se}from"./handoff-pwpLEUcJ.js";var h=[...m,`gemini`],g=c(h);function _(e){return h.includes(e)}var ce=c([`acp`,`terminal`,`external`]),le=c([...se,`gemini`]),ue=c([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),v=c([`mcp`,`skill`]),de=[`project`,`user`,`session`],fe=c(de),y=u().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),pe=u().min(1).transform(e=>e),me=u().min(1).transform(e=>e);function b(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function he(e){return e}function ge(e){return e}var _e=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],ve=he(`central-skill-store`);function x(e,t){return he(`${e}:${t}`)}function ye(e){if(e===ve)return{kind:`central-skill-store`};let t=e.indexOf(`:`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!_e.includes(n)||!m.includes(r)?null:{kind:n,editor:r}}var be=c(m),S=o({kind:c([`source-read`,`measured`,`vendor-doc`,`upstream-issue`,`observation`]),ref:u().min(1),note:u().optional()}),C=o({version:u().min(1).optional(),observedAt:u().min(1)}),xe=s(`confidence`,[o({confidence:l(`verified`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`assumed`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`contested`),evidence:i(S).min(1),verifiedAgainst:C})]),w=o({id:me,params:r(u(),ee([u(),n(),t()])).optional()}),Se=s(`mode`,[o({mode:l(`probeable`),strictness:i(f).min(1)}),o({mode:l(`unprobeable`),reason:c([`no-readable-state`,`different-machine`,`no-programmatic-path`,`session-scoped`]),note:u().optional()})]),Ce=c([`this-project`,`this-user`,`this-machine`]),we=c([`installable`,`user-completes`,`not-installable`]),Te=o({id:y,agent:g,piece:v,scope:fe,kind:ae,pathId:pe.optional(),sharedWith:i(g).default([]),prerequisites:i(y).default([]),consentClass:oe.default(`none`),probe:Se,attestation:xe,audience:Ce,installability:we.default(`installable`),notInstallableReason:c([`no-non-interactive-verb`,`session-scoped`,`no-surface`]).optional(),preferred:t().default(!1),guidance:w.optional(),followup:w.optional(),troubleshooting:i(w).default([])}),Ee=o({piece:v,level:re,satisfiedByAny:i(y)}),De=o({acpAgentId:u().min(1),featuredOrder:n().int().nonnegative().nullable(),harnessCli:le.nullable(),harnessReadsEditorConfig:be.nullable(),harnessReadsEditorConfigAttestation:xe,verifiedPosture:c([`asks`,`self-managed`,`autonomous`]).nullable()}),Oe=o({cliId:u().min(1)}),T=[`darwin`,`win32`,`linux`],ke=c(T),Ae=o({targetId:ue,knownOrder:n().int().nonnegative(),visible:t(),displayName:u().min(1),appBrandName:u().min(1).optional(),schemes:i(u().min(1)),installUrl:u().min(1),platforms:i(ke).min(1),tagline:u().min(1).optional()}),je=o({requirements:i(Ee),caveats:i(w).default([])});o({id:g,setupDocSlug:u().min(1).nullable(),offerOnlyWhenDetected:t().default(!1),offersConnectionRow:t().default(!1),detectionSources:i(u().min(1)).default([]),satisfiers:i(Te),modes:a(ce,je),acp:De.optional(),terminal:Oe.optional(),external:Ae.optional()}),o({id:u().min(1),requiredStrictness:f,scope:fe.optional(),piece:v,revokedByForeignEntry:t().default(!1),guidance:w.optional()});var Me=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function E(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:Me(o),id:b({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??`none`,installability:i??`installable`,preferred:a??!1}}function D(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...a}=e,o={};for(let[e,t]of Object.entries(i))o[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...a,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:o}}var O=(e,t,n,r)=>b({agent:e,piece:t,scope:n,kind:r}),k=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),A=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),j=(...e)=>({mode:`probeable`,strictness:e}),Ne=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),M=(e,t)=>({id:ge(e),...t===void 0?{}:{params:t}}),Pe=(e,t)=>{let n=ie.find(t=>t===e);return n===void 0?void 0:M(`followup.${n}`,{agent:t})},N=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),P=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},Fe=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function F(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function I(e){let{appBrandName:t,tagline:n,platforms:r=T,...i}=e;return{...i,platforms:[...r],...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var L=(e,t)=>({kind:`observation`,ref:e,note:t}),R={observedAt:`2026-07-02`},z={cliEditors:`packages/cli/src/commands/editors.ts`,coreEditors:`packages/core/src/constants/editors.ts`,acpRegistry:`packages/server/src/acp/registry.ts`,threadManager:`packages/server/src/acp/thread-manager.ts`,writeProjectSkill:`packages/cli/src/integrations/write-project-skill.ts`,repairSkills:`packages/cli/src/commands/repair-skills.ts`,skillInstall:`packages/server/src/skill-install.ts`,presenceProbes:`packages/desktop/src/main/integrations-settings.ts`};function B(e){return E({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:x(`editor-user-config`,e.agent),probe:j(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:M(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function V(e){return E({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:x(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:j(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.mcp.project-config`,{agent:e.agent}),followup:Pe(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function H(e){return E({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:x(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function U(e){return E({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:x(`editor-user-skill-root`,e.agent),probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:M(`guidance.skill.user`,{agent:e.agent})})}function W(e){return E({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:Ne(`session-scoped`),attestation:P([N(z.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:M(`guidance.mcp.session-injection`,{agent:e})})}var G={claude:D({id:`claude`,setupDocSlug:p.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[B({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors,`user-global MCP config target`)])}),V({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors),N(z.coreEditors)]),troubleshooting:M(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),H({agent:`claude`,prerequisites:[O(`claude`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`claude`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`claude`)],modes:{external:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`claude`,`mcp`,`session`,`session-injection`),O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:P([N(z.threadManager,`the injection-skip probe reads the managed entry for this editor`),L(`claude-acp adapter`,`The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.`)],R),verifiedPosture:`asks`}),external:I({targetId:`claude-code`,knownOrder:1,visible:!0,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`})}),"claude-desktop":D({id:`claude-desktop`,setupDocSlug:p[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[B({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:M(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[k([O(`claude-desktop`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`claude-cowork`,knownOrder:0,visible:!1,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`})}),cursor:D({id:`cursor`,setupDocSlug:p.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[B({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors),N(z.coreEditors),{kind:`observation`,ref:`cursor-3.19.19-project-server-default-off`,note:`project .cursor/mcp.json server listed Disabled under Customize → MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it`}],{version:`3.19.19`,observedAt:`2026-09-09`}),troubleshooting:M(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),H({agent:`cursor`,prerequisites:[O(`cursor`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`cursor`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`cursor`)],modes:{external:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`cursor`,`mcp`,`session`,`session-injection`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:P([L(`cursor-agent mcp list`,`Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.`),N(z.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:I({targetId:`cursor`,knownOrder:3,visible:!0,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`})}),codex:D({id:`codex`,setupDocSlug:p.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[B({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`TOML user-global config target`)])}),V({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:Fe([N(z.cliEditors,`project config path added by analogy with the other editors`),{kind:`upstream-issue`,ref:`openai/codex#13025`,note:`open, reproduced on builds newer than the one OK checked`},{kind:`upstream-issue`,ref:`openai/codex#36960`,note:`requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks`},{kind:`vendor-doc`,ref:`OpenAI Codex: Advanced configuration`,note:`project-scoped config loads only for a trusted project`},{kind:`observation`,ref:`codex-desktop-project-config-load`,note:`single non-repro on 26.623.81905; the CLI honors it only for a trusted project`}],{version:`26.707.72221`,observedAt:`2026-07-15`}),troubleshooting:[M(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),M(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),H({agent:`codex`,prerequisites:[O(`codex`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)]),troubleshooting:M(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),U({agent:`codex`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`codex`)],modes:{external:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`codex`,`mcp`,`session`,`session-injection`),O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),L(`codex-acp adapter`,`The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.`)],R),verifiedPosture:`self-managed`}),external:I({targetId:`codex`,knownOrder:2,visible:!0,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`})}),copilot:D({id:`copilot`,setupDocSlug:p.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[B({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:P([{kind:`vendor-doc`,ref:`GitHub Copilot CLI — MCP configuration`,note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:`vendor-doc`,ref:`GitHub Docs: Adding MCP servers for Copilot CLI`,note:`project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`},N(z.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:M(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),H({agent:`copilot`,prerequisites:[O(`copilot`,`mcp`,`project`,`config-entry`),O(`copilot`,`mcp`,`user`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)])}),U({agent:`copilot`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`copilot`)],modes:{external:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`copilot`,`mcp`,`session`,`session-injection`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[L(`copilot CLI 1.0.80`,"The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:`1.0.80`,observedAt:`2026-08-20`}},verifiedPosture:null}),external:I({targetId:`copilot`,knownOrder:4,visible:!1,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`})}),opencode:D({id:`opencode`,setupDocSlug:p.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[B({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),V({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`the one project config that is not under a dotdir`)])}),H({agent:`opencode`,prerequisites:[O(`opencode`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`opencode`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`opencode`)],modes:{external:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`opencode`,`mcp`,`session`,`session-injection`),O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the opencode config`),L(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],R),verifiedPosture:null}),external:I({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:D({id:`openclaw`,setupDocSlug:p.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[B({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),E({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:ve,probe:j(`reclaim-permissive`),attestation:P([N(z.coreEditors),N(z.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:M(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:M(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:I({targetId:`openclaw`,knownOrder:8,visible:!1,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`})}),pi:D({id:`pi`,setupDocSlug:p.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[E({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:x(`editor-project-config`,`pi`),probe:j(`reclaim-permissive`,`injection-functional`),attestation:P([N(z.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),N(z.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:M(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),H({agent:`pi`,prerequisites:[O(`pi`,`mcp`,`project`,`managed-file`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)]),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),U({agent:`pi`,attestation:P([N(z.coreEditors,`the agent home nests one level below the dotdir`),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:P([L(`pi-acp@0.0.33`,"Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting — the same mapping, a different shape."),N(z.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:I({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:D({id:`antigravity`,setupDocSlug:p.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[B({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),U({agent:`antigravity`,attestation:P([N(z.coreEditors),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:I({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":D({id:`lm-studio`,setupDocSlug:p[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[B({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:P([N(z.cliEditors,`two candidate locations, resolved against what already exists`),{kind:`upstream-issue`,ref:`lmstudio-ai/lmstudio-bug-tracker#1371`,note:`documented config path differs from the one the app reads on macOS`},N(z.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:M(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[k([O(`lm-studio`,`mcp`,`user`,`config-entry`)]),A([])]}}}),hermes:D({id:`hermes`,setupDocSlug:p.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[B({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]},terminal:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:D({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[W(`gemini`)],modes:{acp:{requirements:[k([O(`gemini`,`mcp`,`session`,`session-injection`)]),A([])]}},acp:F({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:P([N(z.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],R),verifiedPosture:null})})};function Ie(e){return G[e]}var Le=Object.values(G).flatMap(e=>e.satisfiers),Re=new Map(Le.map(e=>[e.id,e]));function ze(e){return Re.get(e)}var K=Object.values(G).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));K.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var Be=Object.fromEntries(K.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(K.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var Ve=Object.fromEntries(K.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),He=Object.values(G).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),Ue=He.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,platforms:a,tagline:o})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,platforms:a,...o===void 0?{}:{tagline:o}}));function We(e,t){return t==null||e.platforms.includes(t)}var Ge=new Set(He.filter(e=>e.visible).map(e=>e.targetId)),Ke=Ue.filter(e=>Ge.has(e.id)),qe=m.filter(e=>G[e].offersConnectionRow),Je=new Map(Object.values(G).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function Ye(e){return Je.get(e)}var Xe=new Map(Object.values(G).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function Ze(e){return Xe.get(e)}Object.fromEntries(Object.values(G).flatMap(e=>{let t=e.satisfiers.find(e=>e.piece===`mcp`&&e.scope===`project`&&e.consentClass!==`none`)?.consentClass;return t===void 0?[]:[[e.id,t]]})),new Set(ne);var Qe=[{id:`mcp-preapproval`,piece:`mcp`,scope:`project`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!1},{id:`tool-autoapprove`,piece:`mcp`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!0}];Qe.map(e=>e.id);var q={satisfied:{counts:!0,exception:null},"present-consent-unknown":{counts:!0,exception:`info`},absent:{counts:!1,exception:null},foreign:{counts:!1,exception:`warning`},"foreign-replaceable":{counts:!1,exception:`warning`},drifted:{counts:!1,exception:`warning`},excluded:{counts:!1,exception:`info`},"structural-na":{counts:!1,exception:`info`},undetected:{counts:!1,exception:null},unprobeable:{counts:!0,exception:`info`},unprobed:{counts:!1,exception:`info`}};c([`count-unverified`,`not-count`]);var $e={acp:{unprobed:`count-unverified`},terminal:{unprobed:`count-unverified`},external:{unprobed:`not-count`}};c([`acp-catalog-supported`,`harness-cli-on-path`,`os-scheme-handler`]);var et={acp:{signal:`acp-catalog-supported`,unresolved:`show`,negativeOutranksOverride:!0},terminal:{signal:`harness-cli-on-path`,unresolved:`show`,negativeOutranksOverride:!1},external:{signal:`os-scheme-handler`,unresolved:`hide`,negativeOutranksOverride:!1}};function J(e){return typeof e==`object`&&!!e}function Y(e,t){if(!J(e))return;let{satisfiers:n}=e;if(!J(n))return;let r=n[t];if(!J(r))return;let{state:i,strictness:a,sharedWith:o}=r;if(typeof i!=`string`||i.length===0)return;let s=Array.isArray(a)?a.filter(e=>typeof e==`string`):void 0,c=Array.isArray(o)?o.filter(e=>typeof e==`string`&&_(e)):void 0;return{state:i,...s===void 0?{}:{strictness:s},...c===void 0||c.length===0?{}:{sharedWith:c}}}function tt(e,t){if(!J(e))return!1;let{detected:n}=e;return Array.isArray(n)&&n.includes(t)}function X(e,t){return e.probe.mode===`unprobeable`?`unprobeable`:Y(t,e.id)?.state??`unprobed`}function Z(e){return d(e)?q[e]:q.unprobed}function nt(e,t){let n=e.filter(e=>{let n=ze(e);return n===void 0?!0:!Z(X(n,t)).counts});return n.length===e.length?n:[]}function rt(e){return Z(e).exception===`warning`}function it(e){return e.state===`foreign`?`foreign`:e.state===`structural-na`?`structural-na`:e.installability===`not-installable`?`not-installable`:e.agentFolded?`agent-undetected`:null}function at(e,t){let n=t?.probed===!0?tt(t,e.id):null;return{detected:n,folded:e.offerOnlyWhenDetected&&n===!1}}function ot(e,t){return(Y(t,e.id)?.sharedWith??[]).filter(t=>t!==e.agent)}var st=de.filter(e=>e!==`session`);function ct(e){return te.includes(e)}function lt(e,t,n){let r=[];for(let i of e.satisfiers){if(!ct(i.kind))continue;let a=X(i,t),o=t?.satisfiers?.[i.id]?.path,s=Z(a),c=nt(i.prerequisites,t),l=it({state:a,installability:i.installability,agentFolded:n});r.push({satisfierId:i.id,agentId:e.id,piece:i.piece,scope:i.scope,kind:i.kind,...i.pathId===void 0?{}:{pathId:i.pathId},...o===void 0?{}:{resolvedPath:o},audience:i.audience,state:a,checked:s.counts,exception:s.exception,folded:a===`undetected`,enabled:l===null,disabledReason:l,sharedWith:i.sharedWith,sharedFolderWith:ot(i,t),prerequisites:i.prerequisites,unmetPrerequisites:c,consentClass:i.consentClass,installability:i.installability,...i.guidance===void 0?{}:{guidance:i.guidance},...i.followup===void 0?{}:{followup:i.followup},troubleshooting:i.troubleshooting})}return r}function ut(e){let t=[];for(let n of st){let r=e.filter(e=>e.scope===n);r.length!==0&&t.push({scope:n,cells:r})}return t}function dt(e,t,n){let{detected:r,folded:i}=at(e,n),a=lt(e,t,i);return{agentId:e.id,detected:r,folded:i,setupDocSlug:e.setupDocSlug,scopes:ut(a)}}function ft(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&_(e)):h}function pt(e={}){let{agentIds:t,probes:n,detection:r}=e;return{rows:ft(t).map(e=>G[e]).filter(e=>e!==void 0).map(e=>dt(e,n,r))}}var Q={agent:g},mt={"followup.enable-manually":{params:e(Q)},"guidance.mcp.user-config":{params:e(Q)},"guidance.mcp.project-config":{params:e(Q)},"guidance.mcp.session-injection":{params:e(Q)},"guidance.mcp.managed-file":{params:e(Q)},"guidance.skill.project":{params:e(Q)},"guidance.skill.user":{params:e(Q)},"guidance.skill.central-store":{params:e(Q)},"troubleshooting.claude.project-entry-not-approved":{params:e(Q)},"troubleshooting.claude-desktop.per-tool-approval":{params:e(Q)},"troubleshooting.cursor.project-entry-not-loaded":{params:e({...Q,server:u().optional()})},"troubleshooting.codex.desktop-project-config":{params:e({...Q,honoredByDesktop:t()})},"troubleshooting.codex.folder-trust":{params:e(Q)},"troubleshooting.copilot.shared-workspace-config":{params:e({...Q,sourceAgent:g})},"troubleshooting.openclaw.central-store-missing":{params:e(Q)},"troubleshooting.pi.folder-trust":{params:e(Q)},"troubleshooting.lm-studio.config-path-mismatch":{params:e(Q)}};Object.keys(mt).sort(),Le.flatMap(e=>e.probe.mode===`probeable`?[{satisfierId:e.id,agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind,pathId:e.pathId??null,strictness:e.probe.strictness}]:[]).map(e=>e.satisfierId);var ht={verified:3,unverifiable:2,unverified:1};function gt(e,t){let n=et[e],r=typeof t==`boolean`?t:null;return{signal:n.signal,resolved:r,show:r??n.unresolved===`show`}}function _t(e,t,n){let r=ze(e);if(r===void 0)return{id:e,state:`absent`,counts:!1,confidence:`unverified`,exception:q.absent.exception,consentClass:`none`,troubleshooting:[]};let i=X(r,n),a=!d(i)||i===`unprobed`,o=$e[t].unprobed===`count-unverified`;return{id:e,state:i,counts:a?o:Z(i).counts,confidence:a?`unverified`:i===`unprobeable`?`unverifiable`:`verified`,exception:Z(i).exception,consentClass:r.consentClass,...r.guidance===void 0?{}:{guidance:r.guidance},...r.followup===void 0?{}:{followup:r.followup},troubleshooting:r.troubleshooting}}function vt(e,t,n){let r=e.satisfiedByAny.map(e=>_t(e,t,n));if(r.length===0)return{piece:e.piece,level:e.level,status:`nothing-required`,confidence:null,satisfiedBy:null,options:r};let i=null;for(let e of r)e.counts&&(i===null||ht[e.confidence]>ht[i.confidence])&&(i=e);return{piece:e.piece,level:e.level,status:i===null?`unmet`:`met`,confidence:i?.confidence??null,satisfiedBy:i?.id??null,options:r}}var yt=[`absent`,`structural-na`];function bt(e,t){let n=[];for(let r of Qe){let i=e.satisfiers.filter(e=>e.piece===r.piece&&e.kind!==`session-injection`&&(r.scope===void 0||e.scope===r.scope));r.revokedByForeignEntry&&i.some(e=>yt.includes(X(e,t))?!1:!$(Y(t,e.id),r.requiredStrictness))||i.some(e=>e.probe.mode!==`probeable`||!e.probe.strictness.includes(r.requiredStrictness)||!Z(X(e,t)).counts?!1:$(Y(t,e.id),r.requiredStrictness))&&n.push(r.id)}return n}function $(e,t){return e?.strictness?.includes(t)===!0}function xt(e){let{agentId:t,mode:n,probes:r,modeSignal:i}=e,a=_(t)?Ie(t):void 0;if(a===void 0)return{agentId:t,mode:n,verdict:`not-registered`,visibility:{...gt(n,i),show:!0},requirements:[],grantedCapabilities:[],modeCaveats:[]};let o=gt(n,i),s=a.modes[n];if(s===void 0)return{agentId:t,mode:n,verdict:`mode-not-available`,visibility:o,requirements:[],grantedCapabilities:[],modeCaveats:[]};let c=s.requirements.map(e=>vt(e,n,r)),l=c.some(e=>e.level===`required`&&e.status===`unmet`),u=c.some(e=>e.status===`unmet`);return{agentId:t,mode:n,verdict:l?`blocked`:u?`ready-with-nudges`:`ready`,visibility:o,requirements:c,grantedCapabilities:bt(a,r),modeCaveats:s.caveats}}export{Be as a,qe as c,Ye as d,Ze as f,ye as h,rt as i,Ue as l,We as m,pt as n,Ve as o,Ie as p,tt as r,G as s,xt as t,Ke as u};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{f as n,i as r,p as i,s as a,u as o,v as s,y as c}from"./schemas-B93JY9Ef.js";import{
|
|
1
|
+
import{o as e,t}from"./chunk-CYidjpOJ.js";import{f as n,i as r,p as i,s as a,u as o,v as s,y as c}from"./schemas-B93JY9Ef.js";import{Ct as l,St as u,_t as d,at as f,ct as p,dt as m,ft as h,it as g,lt as _,mt as v,ot as y,pt as b,rt as x,st as S,ut as C,vt as w,xt as T}from"./schemas-api-CQHNNDP6.js";import{t as E}from"./structural-freshness-CIbkMFA3-CWi_lyiW.js";var D=i({path:r(c([s(),n()])),message:s(),issueCode:s()});a(`code`,[i({code:o(`SCHEMA_INVALID`),issues:r(D)}),i({code:o(`WRITE_ERROR`),detail:s()})]);function O(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function k(e){if(e.code!==`SCHEMA_INVALID`)return{};let t={};for(let n of e.issues){let e=n.path[0];typeof e==`string`&&(t[e]=t[e]?`${t[e]}; ${n.message}`:n.message)}return t}function A(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}var j=e(t(((e,t)=>{var n=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},r=-1,i=1,a=0;n.Diff=function(e,t){return[e,t]},n.prototype.diff_main=function(e,t,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+this.Diff_Timeout*1e3);var o=i;if(e==null||t==null)throw Error(`Null input. (diff_main)`);if(e==t)return e?[new n.Diff(a,e)]:[];r===void 0&&(r=!0);var s=r,c=this.diff_commonPrefix(e,t),l=e.substring(0,c);e=e.substring(c),t=t.substring(c),c=this.diff_commonSuffix(e,t);var u=e.substring(e.length-c);e=e.substring(0,e.length-c),t=t.substring(0,t.length-c);var d=this.diff_compute_(e,t,s,o);return l&&d.unshift(new n.Diff(a,l)),u&&d.push(new n.Diff(a,u)),this.diff_cleanupMerge(d),d},n.prototype.diff_compute_=function(e,t,o,s){var c;if(!e)return[new n.Diff(i,t)];if(!t)return[new n.Diff(r,e)];var l=e.length>t.length?e:t,u=e.length>t.length?t:e,d=l.indexOf(u);if(d!=-1)return c=[new n.Diff(i,l.substring(0,d)),new n.Diff(a,u),new n.Diff(i,l.substring(d+u.length))],e.length>t.length&&(c[0][0]=c[2][0]=r),c;if(u.length==1)return[new n.Diff(r,e),new n.Diff(i,t)];var f=this.diff_halfMatch_(e,t);if(f){var p=f[0],m=f[1],h=f[2],g=f[3],_=f[4],v=this.diff_main(p,h,o,s),y=this.diff_main(m,g,o,s);return v.concat([new n.Diff(a,_)],y)}return o&&e.length>100&&t.length>100?this.diff_lineMode_(e,t,s):this.diff_bisect_(e,t,s)},n.prototype.diff_lineMode_=function(e,t,o){var s=this.diff_linesToChars_(e,t);e=s.chars1,t=s.chars2;var c=s.lineArray,l=this.diff_main(e,t,!1,o);this.diff_charsToLines_(l,c),this.diff_cleanupSemantic(l),l.push(new n.Diff(a,``));for(var u=0,d=0,f=0,p=``,m=``;u<l.length;){switch(l[u][0]){case i:f++,m+=l[u][1];break;case r:d++,p+=l[u][1];break;case a:if(d>=1&&f>=1){l.splice(u-d-f,d+f),u=u-d-f;for(var h=this.diff_main(p,m,!1,o),g=h.length-1;g>=0;g--)l.splice(u,0,h[g]);u+=h.length}f=0,d=0,p=``,m=``;break}u++}return l.pop(),l},n.prototype.diff_bisect_=function(e,t,a){for(var o=e.length,s=t.length,c=Math.ceil((o+s)/2),l=c,u=2*c,d=Array(u),f=Array(u),p=0;p<u;p++)d[p]=-1,f[p]=-1;d[l+1]=0,f[l+1]=0;for(var m=o-s,h=m%2!=0,g=0,_=0,v=0,y=0,b=0;b<c&&!(new Date().getTime()>a);b++){for(var x=-b+g;x<=b-_;x+=2){for(var S=l+x,C=x==-b||x!=b&&d[S-1]<d[S+1]?d[S+1]:d[S-1]+1,w=C-x;C<o&&w<s&&e.charAt(C)==t.charAt(w);)C++,w++;if(d[S]=C,C>o)_+=2;else if(w>s)g+=2;else if(h){var T=l+m-x;if(T>=0&&T<u&&f[T]!=-1){var E=o-f[T];if(C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}for(var D=-b+v;D<=b-y;D+=2){for(var T=l+D,E=D==-b||D!=b&&f[T-1]<f[T+1]?f[T+1]:f[T-1]+1,O=E-D;E<o&&O<s&&e.charAt(o-E-1)==t.charAt(s-O-1);)E++,O++;if(f[T]=E,E>o)y+=2;else if(O>s)v+=2;else if(!h){var S=l+m-D;if(S>=0&&S<u&&d[S]!=-1){var C=d[S],w=l+C-S;if(E=o-E,C>=E)return this.diff_bisectSplit_(e,t,C,w,a)}}}}return[new n.Diff(r,e),new n.Diff(i,t)]},n.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},n.prototype.diff_linesToChars_=function(e,t){var n=[],r={};n[0]=``;function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){o=e.indexOf(`
|
|
2
2
|
`,i),o==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},n.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},n.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?(n=i,a=n):r=i,i=Math.floor((r-n)/2+n);return i},n.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,(c==0||e.substring(i-o)==t.substring(0,o))&&(a=o,o++)}},n.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||r.length*2<n.length)return null;var i=this;function a(e,t,n){for(var r=e.substring(n,n+Math.floor(e.length/4)),a=-1,o=``,s,c,l,u;(a=t.indexOf(r,a+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(a)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,a));o.length<f+d&&(o=t.substring(a-f,a)+t.substring(a,a+d),s=e.substring(0,n-f),c=e.substring(n+d),l=t.substring(0,a-f),u=t.substring(a+d))}return o.length*2>=e.length?[s,c,l,u,o]:null}var o=a(n,r,Math.ceil(n.length/4)),s=a(n,r,Math.ceil(n.length/2)),c;if(!o&&!s)return null;c=s?o&&o[4].length>s[4].length?o:s:o;var l,u,d,f;e.length>t.length?(l=c[0],u=c[1],d=c[2],f=c[3]):(d=c[0],f=c[1],l=c[2],u=c[3]);var p=c[4];return[l,u,d,f,p]},n.prototype.diff_cleanupSemantic=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=0,d=0,f=0,p=0;l<e.length;)e[l][0]==a?(o[s++]=l,u=f,d=p,f=0,p=0,c=e[l][1]):(e[l][0]==i?f+=e[l][1].length:p+=e[l][1].length,c&&c.length<=Math.max(u,d)&&c.length<=Math.max(f,p)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,s--,l=s>0?o[s-1]:-1,u=0,d=0,f=0,p=0,c=null,t=!0)),l++;for(t&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),l=1;l<e.length;){if(e[l-1][0]==r&&e[l][0]==i){var m=e[l-1][1],h=e[l][1],g=this.diff_commonOverlap_(m,h),_=this.diff_commonOverlap_(h,m);g>=_?(g>=m.length/2||g>=h.length/2)&&(e.splice(l,0,new n.Diff(a,h.substring(0,g))),e[l-1][1]=m.substring(0,m.length-g),e[l+1][1]=h.substring(g),l++):(_>=m.length/2||_>=h.length/2)&&(e.splice(l,0,new n.Diff(a,m.substring(0,_))),e[l-1][0]=i,e[l-1][1]=h.substring(0,h.length-_),e[l+1][0]=r,e[l+1][1]=m.substring(_),l++),l++}l++}},n.prototype.diff_cleanupSemanticLossless=function(e){function t(e,t){if(!e||!t)return 6;var r=e.charAt(e.length-1),i=t.charAt(0),a=r.match(n.nonAlphaNumericRegex_),o=i.match(n.nonAlphaNumericRegex_),s=a&&r.match(n.whitespaceRegex_),c=o&&i.match(n.whitespaceRegex_),l=s&&r.match(n.linebreakRegex_),u=c&&i.match(n.linebreakRegex_),d=l&&e.match(n.blanklineEndRegex_),f=u&&t.match(n.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==a&&e[r+1][0]==a){var i=e[r-1][1],o=e[r][1],s=e[r+1][1],c=this.diff_commonSuffix(i,o);if(c){var l=o.substring(o.length-c);i=i.substring(0,i.length-c),o=l+o.substring(0,o.length-c),s=l+s}for(var u=i,d=o,f=s,p=t(i,o)+t(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var m=t(i,o)+t(o,s);m>=p&&(p=m,u=i,d=o,f=s)}e[r-1][1]!=u&&(u?e[r-1][1]=u:(e.splice(r-1,1),r--),e[r][1]=d,f?e[r+1][1]=f:(e.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(e){for(var t=!1,o=[],s=0,c=null,l=0,u=!1,d=!1,f=!1,p=!1;l<e.length;)e[l][0]==a?(e[l][1].length<this.Diff_EditCost&&(f||p)?(o[s++]=l,u=f,d=p,c=e[l][1]):(s=0,c=null),f=p=!1):(e[l][0]==r?p=!0:f=!0,c&&(u&&d&&f&&p||c.length<this.Diff_EditCost/2&&u+d+f+p==3)&&(e.splice(o[s-1],0,new n.Diff(r,c)),e[o[s-1]+1][0]=i,s--,c=null,u&&d?(f=p=!0,s=0):(s--,l=s>0?o[s-1]:-1,f=p=!1),t=!0)),l++;t&&this.diff_cleanupMerge(e)},n.prototype.diff_cleanupMerge=function(e){e.push(new n.Diff(a,``));for(var t=0,o=0,s=0,c=``,l=``,u;t<e.length;)switch(e[t][0]){case i:s++,l+=e[t][1],t++;break;case r:o++,c+=e[t][1],t++;break;case a:o+s>1?(o!==0&&s!==0&&(u=this.diff_commonPrefix(l,c),u!==0&&(t-o-s>0&&e[t-o-s-1][0]==a?e[t-o-s-1][1]+=l.substring(0,u):(e.splice(0,0,new n.Diff(a,l.substring(0,u))),t++),l=l.substring(u),c=c.substring(u)),u=this.diff_commonSuffix(l,c),u!==0&&(e[t][1]=l.substring(l.length-u)+e[t][1],l=l.substring(0,l.length-u),c=c.substring(0,c.length-u))),t-=o+s,e.splice(t,o+s),c.length&&(e.splice(t,0,new n.Diff(r,c)),t++),l.length&&(e.splice(t,0,new n.Diff(i,l)),t++),t++):t!==0&&e[t-1][0]==a?(e[t-1][1]+=e[t][1],e.splice(t,1)):t++,s=0,o=0,c=``,l=``;break}e[e.length-1][1]===``&&e.pop();var d=!1;for(t=1;t<e.length-1;)e[t-1][0]==a&&e[t+1][0]==a&&(e[t][1].substring(e[t][1].length-e[t-1][1].length)==e[t-1][1]?(e[t][1]=e[t-1][1]+e[t][1].substring(0,e[t][1].length-e[t-1][1].length),e[t+1][1]=e[t-1][1]+e[t+1][1],e.splice(t-1,1),d=!0):e[t][1].substring(0,e[t+1][1].length)==e[t+1][1]&&(e[t-1][1]+=e[t+1][1],e[t][1]=e[t][1].substring(e[t+1][1].length)+e[t+1][1],e.splice(t+1,1),d=!0)),t++;d&&this.diff_cleanupMerge(e)},n.prototype.diff_xIndex=function(e,t){var n=0,a=0,o=0,s=0,c;for(c=0;c<e.length&&(e[c][0]!==i&&(n+=e[c][1].length),e[c][0]!==r&&(a+=e[c][1].length),!(n>t));c++)o=n,s=a;return e.length!=c&&e[c][0]===r?s:s+(t-o)},n.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,o=/</g,s=/>/g,c=/\n/g,l=0;l<e.length;l++){var u=e[l][0],d=e[l][1].replace(n,`&`).replace(o,`<`).replace(s,`>`).replace(c,`¶<br>`);switch(u){case i:t[l]=`<ins style="background:#e6ffe6;">`+d+`</ins>`;break;case r:t[l]=`<del style="background:#ffe6e6;">`+d+`</del>`;break;case a:t[l]=`<span>`+d+`</span>`;break}}return t.join(``)},n.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==i&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==r&&(t[n]=e[n][1]);return t.join(``)},n.prototype.diff_levenshtein=function(e){for(var t=0,n=0,o=0,s=0;s<e.length;s++){var c=e[s][0],l=e[s][1];switch(c){case i:n+=l.length;break;case r:o+=l.length;break;case a:t+=Math.max(n,o),n=0,o=0;break}}return t+=Math.max(n,o),t},n.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case i:t[n]=`+`+encodeURI(e[n][1]);break;case r:t[n]=`-`+e[n][1].length;break;case a:t[n]=`=`+e[n][1].length;break}return t.join(` `).replace(/%20/g,` `)},n.prototype.diff_fromDelta=function(e,t){for(var o=[],s=0,c=0,l=t.split(/\t/g),u=0;u<l.length;u++){var d=l[u].substring(1);switch(l[u].charAt(0)){case`+`:try{o[s++]=new n.Diff(i,decodeURI(d))}catch{throw Error(`Illegal escape in diff_fromDelta: `+d)}break;case`-`:case`=`:var f=parseInt(d,10);if(isNaN(f)||f<0)throw Error(`Invalid number in diff_fromDelta: `+d);var p=e.substring(c,c+=f);l[u].charAt(0)==`=`?o[s++]=new n.Diff(a,p):o[s++]=new n.Diff(r,p);break;default:if(l[u])throw Error(`Invalid diff operation in diff_fromDelta: `+l[u])}}if(c!=e.length)throw Error(`Delta length (`+c+`) does not equal source text length (`+e.length+`).`);return o},n.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},n.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),s=e.lastIndexOf(t,n+t.length),s!=-1&&(o=Math.min(a(0,s),o)));var c=1<<t.length-1;s=-1;for(var l,u,d=t.length+e.length,f,p=0;p<t.length;p++){for(l=0,u=d;l<u;)a(p,n+u)<=o?l=u:d=u,u=Math.floor((d-l)/2+l);d=u;var m=Math.max(1,n-u+1),h=Math.min(n+u,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(p===0?g[_]=(g[_+1]<<1|1)&v:g[_]=(g[_+1]<<1|1)&v|(f[_+1]|f[_])<<1|1|f[_+1],g[_]&c){var y=a(p,_-1);if(y<=o)if(o=y,s=_-1,s>n)m=Math.max(1,2*n-s);else break}}if(a(p+1,n)>o)break;f=g}return s},n.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(var n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},n.prototype.patch_addContext_=function(e,t){if(t.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=t.substring(e.start2,e.start2+e.length1),i=0;t.indexOf(r)!=t.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=t.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var o=t.substring(e.start2-i,e.start2);o&&e.diffs.unshift(new n.Diff(a,o));var s=t.substring(e.start2+e.length1,e.start2+e.length1+i);s&&e.diffs.push(new n.Diff(a,s)),e.start1-=o.length,e.start2-=o.length,e.length1+=o.length+s.length,e.length2+=o.length+s.length}},n.prototype.patch_make=function(e,t,o){var s,c;if(typeof e==`string`&&typeof t==`string`&&o===void 0)s=e,c=this.diff_main(s,t,!0),c.length>2&&(this.diff_cleanupSemantic(c),this.diff_cleanupEfficiency(c));else if(e&&typeof e==`object`&&t===void 0&&o===void 0)c=e,s=this.diff_text1(c);else if(typeof e==`string`&&t&&typeof t==`object`&&o===void 0)s=e,c=t;else if(typeof e==`string`&&typeof t==`string`&&o&&typeof o==`object`)s=e,c=o;else throw Error(`Unknown call format to patch_make.`);if(c.length===0)return[];for(var l=[],u=new n.patch_obj,d=0,f=0,p=0,m=s,h=s,g=0;g<c.length;g++){var _=c[g][0],v=c[g][1];switch(!d&&_!==a&&(u.start1=f,u.start2=p),_){case i:u.diffs[d++]=c[g],u.length2+=v.length,h=h.substring(0,p)+v+h.substring(p);break;case r:u.length1+=v.length,u.diffs[d++]=c[g],h=h.substring(0,p)+h.substring(p+v.length);break;case a:v.length<=2*this.Patch_Margin&&d&&c.length!=g+1?(u.diffs[d++]=c[g],u.length1+=v.length,u.length2+=v.length):v.length>=2*this.Patch_Margin&&d&&(this.patch_addContext_(u,m),l.push(u),u=new n.patch_obj,d=0,m=h,f=p);break}_!==i&&(f+=v.length),_!==r&&(p+=v.length)}return d&&(this.patch_addContext_(u,m),l.push(u)),l},n.prototype.patch_deepCopy=function(e){for(var t=[],r=0;r<e.length;r++){var i=e[r],a=new n.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new n.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,t[r]=a}return t},n.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var o=0,s=[],c=0;c<e.length;c++){var l=e[c].start2+o,u=this.diff_text1(e[c].diffs),d,f=-1;if(u.length>this.Match_MaxBits?(d=this.match_main(t,u.substring(0,this.Match_MaxBits),l),d!=-1&&(f=this.match_main(t,u.substring(u.length-this.Match_MaxBits),l+u.length-this.Match_MaxBits),(f==-1||d>=f)&&(d=-1))):d=this.match_main(t,u,l),d==-1)s[c]=!1,o-=e[c].length2-e[c].length1;else{s[c]=!0,o=d-l;var p=f==-1?t.substring(d,d+u.length):t.substring(d,f+this.Match_MaxBits);if(u==p)t=t.substring(0,d)+this.diff_text2(e[c].diffs)+t.substring(d+u.length);else{var m=this.diff_main(u,p,!1);if(u.length>this.Match_MaxBits&&this.diff_levenshtein(m)/u.length>this.Patch_DeleteThreshold)s[c]=!1;else{this.diff_cleanupSemanticLossless(m);for(var h=0,g,_=0;_<e[c].diffs.length;_++){var v=e[c].diffs[_];v[0]!==a&&(g=this.diff_xIndex(m,h)),v[0]===i?t=t.substring(0,d+g)+v[1]+t.substring(d+g):v[0]===r&&(t=t.substring(0,d+g)+t.substring(d+this.diff_xIndex(m,h+v[1].length))),v[0]!==r&&(h+=v[1].length)}}}}}return t=t.substring(n.length,t.length-n.length),[t,s]},n.prototype.patch_addPadding=function(e){for(var t=this.Patch_Margin,r=``,i=1;i<=t;i++)r+=String.fromCharCode(i);for(var i=0;i<e.length;i++)e[i].start1+=t,e[i].start2+=t;var o=e[0],s=o.diffs;if(s.length==0||s[0][0]!=a)s.unshift(new n.Diff(a,r)),o.start1-=t,o.start2-=t,o.length1+=t,o.length2+=t;else if(t>s[0][1].length){var c=t-s[0][1].length;s[0][1]=r.substring(s[0][1].length)+s[0][1],o.start1-=c,o.start2-=c,o.length1+=c,o.length2+=c}if(o=e[e.length-1],s=o.diffs,s.length==0||s[s.length-1][0]!=a)s.push(new n.Diff(a,r)),o.length1+=t,o.length2+=t;else if(t>s[s.length-1][1].length){var c=t-s[s.length-1][1].length;s[s.length-1][1]+=r.substring(0,c),o.length1+=c,o.length2+=c}return r},n.prototype.patch_splitMax=function(e){for(var t=this.Match_MaxBits,o=0;o<e.length;o++)if(!(e[o].length1<=t)){var s=e[o];e.splice(o--,1);for(var c=s.start1,l=s.start2,u=``;s.diffs.length!==0;){var d=new n.patch_obj,f=!0;for(d.start1=c-u.length,d.start2=l-u.length,u!==``&&(d.length1=d.length2=u.length,d.diffs.push(new n.Diff(a,u)));s.diffs.length!==0&&d.length1<t-this.Patch_Margin;){var p=s.diffs[0][0],m=s.diffs[0][1];p===i?(d.length2+=m.length,l+=m.length,d.diffs.push(s.diffs.shift()),f=!1):p===r&&d.diffs.length==1&&d.diffs[0][0]==a&&m.length>2*t?(d.length1+=m.length,c+=m.length,f=!1,d.diffs.push(new n.Diff(p,m)),s.diffs.shift()):(m=m.substring(0,t-d.length1-this.Patch_Margin),d.length1+=m.length,c+=m.length,p===a?(d.length2+=m.length,l+=m.length):f=!1,d.diffs.push(new n.Diff(p,m)),m==s.diffs[0][1]?s.diffs.shift():s.diffs[0][1]=s.diffs[0][1].substring(m.length))}u=this.diff_text2(d.diffs),u=u.substring(u.length-this.Patch_Margin);var h=this.diff_text1(s.diffs).substring(0,this.Patch_Margin);h!==``&&(d.length1+=h.length,d.length2+=h.length,d.diffs.length!==0&&d.diffs[d.diffs.length-1][0]===a?d.diffs[d.diffs.length-1][1]+=h:d.diffs.push(new n.Diff(a,h))),f||e.splice(++o,0,d)}}},n.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},n.prototype.patch_fromText=function(e){var t=[];if(!e)return t;for(var o=e.split(`
|
|
3
3
|
`),s=0,c=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;s<o.length;){var l=o[s].match(c);if(!l)throw Error(`Invalid patch string: `+o[s]);var u=new n.patch_obj;for(t.push(u),u.start1=parseInt(l[1],10),l[2]===``?(u.start1--,u.length1=1):l[2]==`0`?u.length1=0:(u.start1--,u.length1=parseInt(l[2],10)),u.start2=parseInt(l[3],10),l[4]===``?(u.start2--,u.length2=1):l[4]==`0`?u.length2=0:(u.start2--,u.length2=parseInt(l[4],10)),s++;s<o.length;){var d=o[s].charAt(0);try{var f=decodeURI(o[s].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+f)}if(d==`-`)u.diffs.push(new n.Diff(r,f));else if(d==`+`)u.diffs.push(new n.Diff(i,f));else if(d==` `)u.diffs.push(new n.Diff(a,f));else if(d==`@`)break;else if(d!==``)throw Error(`Invalid patch mode "`+d+`" in: `+f);s++}}return t},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var e=this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1,t=this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2,n=[`@@ -`+e+` +`+t+` @@
|
|
4
4
|
`],o,s=0;s<this.diffs.length;s++){switch(this.diffs[s][0]){case i:o=`+`;break;case r:o=`-`;break;case a:o=` `;break}n[s+1]=o+encodeURI(this.diffs[s][1])+`
|
|
5
5
|
`}return n.join(``).replace(/%20/g,` `)},t.exports=n,t.exports.diff_match_patch=n,t.exports.DIFF_DELETE=r,t.exports.DIFF_INSERT=i,t.exports.DIFF_EQUAL=a}))(),1);function M(e,t){let n=Object.create(null);for(let e=0;e<t.length;e++){let r=t[e];n[r]?n[r].push(e):n[r]=[e]}let r=[{buffer1index:-1,buffer2index:-1,chain:null}];for(let t=0;t<e.length;t++){let i=n[e[t]]||[],a=0,o=r[0];for(let e of i){let n;for(n=a;n<r.length&&!(r[n].buffer2index<e&&(n===r.length-1||r[n+1].buffer2index>e));n++);if(n<r.length){let i={buffer1index:t,buffer2index:e,chain:r[n]};if(a===r.length?r.push(o):r[a]=o,a=n+1,o=i,a===r.length)break}}r[a]=o}return r[r.length-1]}function N(e,t){let n=M(e,t),r=[],i=e.length,a=t.length;for(let o=n;o!==null;o=o.chain){let n=i-o.buffer1index-1,s=a-o.buffer2index-1;i=o.buffer1index,a=o.buffer2index,(n||s)&&r.push({buffer1:[i+1,n],buffer1Content:e.slice(i+1,i+1+n),buffer2:[a+1,s],buffer2Content:t.slice(a+1,a+1+s)})}return r.reverse(),r}function ee(e,t,n){let r=[];function i(e,t){r.push({ab:t,oStart:e.buffer1[0],oLength:e.buffer1[1],abStart:e.buffer2[0],abLength:e.buffer2[1]})}N(t,e).forEach(e=>i(e,`a`)),N(t,n).forEach(e=>i(e,`b`)),r.sort((e,t)=>e.oStart-t.oStart);let a=[],o=0;function s(e){e>o&&(a.push({stable:!0,buffer:`o`,bufferStart:o,bufferLength:e-o,bufferContent:t.slice(o,e)}),o=e)}for(;r.length;){let i=r.shift(),c=i.oStart,l=i.oStart+i.oLength,u=[i];for(s(c);r.length;){let e=r[0],t=e.oStart;if(t>l)break;l=Math.max(l,t+e.oLength),u.push(r.shift())}if(u.length===1){if(i.abLength>0){let t=i.ab===`a`?e:n;a.push({stable:!0,buffer:i.ab,bufferStart:i.abStart,bufferLength:i.abLength,bufferContent:t.slice(i.abStart,i.abStart+i.abLength)})}}else{let r={a:[e.length,-1,t.length,-1],b:[n.length,-1,t.length,-1]};for(;u.length;){i=u.shift();let e=i.oStart,t=e+i.oLength,n=i.abStart,a=n+i.abLength,o=r[i.ab];o[0]=Math.min(n,o[0]),o[1]=Math.max(a,o[1]),o[2]=Math.min(e,o[2]),o[3]=Math.max(t,o[3])}let o=r.a[0]+(c-r.a[2]),s=r.a[1]+(l-r.a[3]),d=r.b[0]+(c-r.b[2]),f=r.b[1]+(l-r.b[3]),p={stable:!1,aStart:o,aLength:s-o,aContent:e.slice(o,s),oStart:c,oLength:l-c,oContent:t.slice(c,l),bStart:d,bLength:f-d,bContent:n.slice(d,f)};a.push(p)}o=l}return s(t.length),a}function te(e,t,n,r){r=Object.assign({excludeFalseConflicts:!0,stringSeparator:/\s+/},r),typeof e==`string`&&(e=e.split(r.stringSeparator)),typeof t==`string`&&(t=t.split(r.stringSeparator)),typeof n==`string`&&(n=n.split(r.stringSeparator));let i=[],a=ee(e,t,n),o=[];function s(){o.length&&i.push({ok:o}),o=[]}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return a.forEach(e=>{e.stable?o.push(...e.bufferContent):r.excludeFalseConflicts&&c(e.aContent,e.bContent)?o.push(...e.aContent):(s(),i.push({conflict:{a:e.aContent,aIndex:e.aStart,o:e.oContent,oIndex:e.oStart,b:e.bContent,bIndex:e.bStart}}))}),s(),i}new j.default;var P=/^---[ \t]*\r?\n---[ \t]*(\r?\n|$)/,ne=/^---([ \t]*)(?=\r?\n|$)/,F=e=>e.includes(`\r
|
|
6
6
|
`)?`\r
|
|
7
7
|
`:`
|
|
8
|
-
`,re=e=>e.replace(ne,`***$1`),I=e=>`---${e}${e}---${e}`;function L(e,t){let n=
|
|
8
|
+
`,re=e=>e.replace(ne,`***$1`),I=e=>`---${e}${e}---${e}`;function L(e,t){let n=d(e,t);return{md:n,frontmatter:n.slice(0,n.length-t.length)}}function R(e,t){let{md:n,frontmatter:r}=L(e,t),i=w(n);return i.frontmatter===r&&i.body===t}function z(e,t,n,r){let{md:i,frontmatter:a}=L(t,n);return{md:i,frontmatter:a,body:n,adjusted:r===`none`&&a!==e?`frontmatter`:r}}function ie(e,t){if(R(e,t))return z(e,e,t,`none`);let n=re(t);if(n!==t&&R(e,n))return z(e,e,n,`body`);if(P.test(e)){let n=I(F(e));if(R(n,t))return z(e,n,t,`frontmatter`)}return z(e,e,t,`unresolved`)}function ae(e,t){if(R(e,t))return z(e,e,t,`none`);let n=I(F(e||t));return(e===``||P.test(e))&&R(n,t)?z(e,n,t,`frontmatter`):z(e,e,t,`unresolved`)}var oe=Object.freeze({source:`local`,skipStoreHooks:!1,context:Object.freeze({origin:`form-write`})});function B(e){return{ok:!1,error:e}}function se(e){return{ok:!0,...e}}function ce(e){return{ok:!0,...e}}function le(e){return{ok:!0,...e}}function V(e){return{ok:!0,...e}}function H(e){switch(e.kind){case`unknown_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`unknown key '${e.key}'`,issueCode:`unknown_key`}]};case`duplicate_target`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`key '${e.key}' already exists`,issueCode:`duplicate_target`}]};case`invalid_value`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:e.reason,issueCode:`invalid_value`}]};case`reserved_key`:return{code:`SCHEMA_INVALID`,issues:[{path:[e.key],message:`'${e.key}' is a reserved frontmatter key`,issueCode:`reserved_key`}]};case`reorder_mismatch`:return{code:`WRITE_ERROR`,detail:`reorder list does not match current keys (state changed mid-drag)`};case`region_too_large`:return{code:`SCHEMA_INVALID`,issues:[{path:[],message:`Frontmatter region exceeds ${x}-byte limit (would be ${e.bytes})`,issueCode:`region_too_large`}]};case`parse_failed`:return{code:`WRITE_ERROR`,detail:`Frontmatter YAML is malformed; fix in source mode to commit (${e.reason})`};case`invalid_path`:return{code:`SCHEMA_INVALID`,issues:[{path:[...e.path],message:e.reason,issueCode:`invalid_path`}]}}}function ue(e,t){if(e.parseError!==t.parseError||e.keys.length!==t.keys.length)return!1;for(let n=0;n<e.keys.length;n++)if(e.keys[n]!==t.keys[n])return!1;for(let n of e.keys)if(!l(e.map[n],t.map[n]))return!1;return!0}var de=5;function U(e){let t=e.toString();return{snapshot:fe(t),raw:t}}function fe(e){let{map:t,parseError:n}=v(e);return{map:t,keys:b(e),parseError:n}}function W(e){return e.startsWith(`---`)}function pe(e){let t=e.document,n=t.getText(`source`),r=new Set,i=U(n),a=i.snapshot,o=h(i.raw).fenced,s=W(i.raw),c=!1;function l(e=!1){if(c)return;let t,i;try{let e=U(n);t=e.snapshot,i=e.raw}catch(e){console.warn(`[bindFrontmatterDoc] readSnapshotFromYText threw:`,e);return}if(!e&&ue(a,t)){s=W(i);return}a=t,o=h(i).fenced,s=W(i);for(let e of r)try{e(t)}catch(e){console.warn(`[bindFrontmatterDoc] listener threw:`,e)}}let d=e=>{c||me(e,o.length,s)&&l()};n.observe(d),e.on(`synced`,v);function v(){l(!0)}function b(e){let r;return t.transact(()=>{let t=n.toString(),{fenced:i}=h(t);if(r=e(i),!r.ok||r.nextFenced===i)return;let a=ae(r.nextFenced,t.slice(i.length)).frontmatter;n.delete(0,i.length),a!==``&&n.insert(0,a)},oe),r??{ok:!1,error:{kind:`parse_failed`,reason:`commit transact produced no result`}}}function x(e){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});if(Object.hasOwn(e,`frontmatter`))return B({code:`SCHEMA_INVALID`,issues:[{path:[u],message:`'${u}' is a reserved frontmatter key`,issueCode:`reserved_key`}]});let t=T.safeParse(e);if(!t.success)return B({code:`SCHEMA_INVALID`,issues:t.error.issues.map(O)});let n=t.data,r=Object.keys(n),i=b(e=>g(e,n));return i.ok?se({appliedKeys:r}):B(H(i.error))}function w(e,t,n={}){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=b(r=>C(r,e,t,n));return r.ok?ce({oldKey:e,newKey:t}):B(H(r.error))}function E(e){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=b(t=>m(t,e));return t.ok?le({orderedKeys:[...e]}):B(H(t.error))}function D(e,t){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=b(n=>_(n,e,t));return n.ok?V({path:[...e]}):B(H(n.error))}function k(e){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let t=b(t=>f(t,e));return t.ok?V({path:[...e]}):B(H(t.error))}function A(e,t,n={}){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let r=b(r=>y(r,e,t,n));return r.ok?V({path:[...e]}):B(H(r.error))}function j(e,t){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=b(n=>p(n,e,t));return n.ok?V({path:[...e]}):B(H(n.error))}function M(e,t){if(c)return B({code:`WRITE_ERROR`,detail:`FrontmatterBinding has been disposed`});let n=b(n=>S(n,e,t));return n.ok?V({path:[...e]}):B(H(n.error))}return{current(){return U(n).snapshot},patch(e){return x(e)},rename(e,t,n){return w(e,t,n)},reorder(e){return E(e)},patchPath(e,t){return D(e,t)},deletePath(e){return k(e)},renamePath(e,t,n){return A(e,t,n)},reorderPath(e,t){return j(e,t)},reorderSeqPath(e,t){return M(e,t)},subscribe(e){return r.add(e),()=>{r.delete(e)}},dispose(){c||(c=!0,n.unobserve(d),e.off(`synced`,v),r.clear())}}}function me(e,t,n){if(t===0&&n)return!0;let r=t>0?t:de,i=0;for(let t of e.delta){if(typeof t.retain==`number`){i+=t.retain;continue}if(typeof t.insert==`string`){if(i<r)return!0;i+=t.insert.length;continue}if(t.insert!==void 0){if(i<r)return!0;i+=1;continue}if(typeof t.delete==`number`&&i<r)return!0}return!1}function he(e,t){if(e===``)return{slot:``,body:t};let n=t.match(/^\r?\n/);return n?{slot:n[0],body:t.slice(n[0].length)}:{slot:``,body:t}}function G(e){let{frontmatter:t,body:n}=w(e);if(t===``)return E(e);let r=he(t,n).body;return/^\n*$/.test(r)?E(e):E(r)}var ge=new j.default;ge.Match_Threshold=.5;var _e=/\\([!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~])/g,K=/^\s*\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)+\|?\s*$/,q=/^[ \t]+([-+*]|\d+[.)]|[a-zA-Z][.)])\s/,ve=/^\d+([.)])(?=\s)/,ye=`1`,be=/\*\*\s*(`[^`]+`)\s*\*\*/g,xe=/^(`{3,}|~{3,})/;function Se(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r].trimEnd(),a=xe.exec(i);if(a){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}if(n!==null||r===0||!K.test(i))continue;let o=e[r-1].trimEnd();if(!(!o.startsWith(`|`)||K.test(o))){t.add(r-1),t.add(r);for(let n=r+1;n<e.length&&e[n].trimEnd().startsWith(`|`);n++)t.add(n)}}return t}function J(e){return e.slice(0,-1).trimEnd()}var Y=/^(?:#{1,6}[ \t]|>|(?:[-+*]|\d{1,9}[.)])[ \t]|`{3,}|~{3,}|=+[ \t]*$|-+[ \t]*$|(?:\*[ \t]*){3,}$|(?:_[ \t]*){3,}$)/;function X(e){let t=new Set,n=null;for(let r=0;r<e.length;r++){let i=e[r]??``,a=/^(`{3,}|~{3,})/.exec(i.trimStart());if(a?.[1]){let e=a[1][0];if(n===null){n=e;continue}if(n===e){n=null;continue}}n!==null&&t.add(r)}return t}var Ce=/^<\/?[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,we=/^<[A-Z][A-Za-z0-9.]*(?:\s[^>]*)?>$/,Te=/^<\/[A-Z][A-Za-z0-9.]*\s*>$/,Ee=/<\/?[A-Z]/;function De(e){let t=!1;for(let n=0;n<e.length;n++)if(Ee.test(e[n]??``)){t=!0;break}if(!t)return e;let n=X(e),r=[],i=[],a=0;for(let t=0;t<e.length;t++){let o=e[t]??``,s=o.trim();if(n.has(t)){r.push(!1),i.push(a);continue}let c=a>=1||!/^[ \t]/.test(o);r.push(c&&Ce.test(s));let l=c&&Te.test(s),u=c&&!l&&we.test(s)&&!s.endsWith(`/>`);l?(a=Math.max(0,a-1),i.push(a)):(i.push(a),u&&(a+=1))}let o=Array(e.length);for(let t=0,n=-1;t<e.length;t++)o[t]=n,(e[t]??``).trim()!==``&&(n=t);let s=Array(e.length);for(let t=e.length-1,n=e.length;t>=0;t--)s[t]=n,(e[t]??``).trim()!==``&&(n=t);let c=new Set;for(let t=0;t<e.length;t++){if((e[t]??``).trim()!==``||n.has(t)||(i[t]??0)<1)continue;let a=o[t]??-1,l=s[t]??e.length;(a>=0&&r[a]===!0||l<e.length&&r[l]===!0)&&c.add(t)}let l=[];for(let t=0;t<e.length;t++){if(c.has(t))continue;let n=e[t]??``;l.push(r[t]===!0&&(i[t]??0)>=1?n.replace(/^[ \t]+/,``):n)}return l}function Oe(e){let t=De(e.replace(/^/,``).replace(/\r/g,``).replace(_e,`$1`).replace(be,`$1`).replace(/^\n+/,``).replace(/^[*-]{3,}(?=\n|$)/,`---`).replace(/(\n)([#>+-]|\d+[.)]|`{3,}|~{3,})/g,`
|
|
9
9
|
|
|
10
10
|
$2`).replace(/^([#>+-].*|\d+[.)].*|`{3,}.*|~{3,}.*|<\/[A-Z][A-Za-z0-9]*>[ \t]*)\n([^\n])/gm,`$1
|
|
11
11
|
|
|
@@ -13,7 +13,7 @@ $2`).split(`
|
|
|
13
13
|
`)),n=Se(t),r=X(t);return t.map((e,i)=>{let a=e.trimEnd();if(i>0&&!r.has(i)&&/^[ \t]+\S/.test(a)&&(t[i-1]??``).trim()!==``&&!q.test(a)&&!Y.test(a.trimStart())){let e=(t[i-1]??``).trimStart();if(!Y.test(e)&&!e.startsWith(`|`))return a.replace(/^[ \t]+/,``)}if(K.test(a)){let e=a.replace(/\s+/g,``);return n.has(i)&&e.length>1&&e.startsWith(`|`)&&e.endsWith(`|`)?J(e):e}let o=q.test(a)?a.replace(/^[ \t]+/,``):a;return n.has(i)&&o.length>1&&o.startsWith(`|`)&&o.endsWith(`|`)&&(o=J(o)),o.replace(ve,`${ye}$1`)}).join(`
|
|
14
14
|
`).replace(/\n{3,}/g,`
|
|
15
15
|
|
|
16
|
-
`).replace(/\n+$/,``)}function Z(e){return[...e.replace(/^\n+/,``).replace(/\n+$/,``).matchAll(/\n{2,}/g)].map(e=>e[0].length)}function ke(e,t){let n=G(e),r=G(t);if(r.leading>n.leading||r.trailing>n.trailing)return!0;let i=Z(
|
|
16
|
+
`).replace(/\n+$/,``)}function Z(e){return[...e.replace(/^\n+/,``).replace(/\n+$/,``).matchAll(/\n{2,}/g)].map(e=>e[0].length)}function ke(e,t){let n=G(e),r=G(t);if(r.leading>n.leading||r.trailing>n.trailing)return!0;let i=Z(w(e).body),a=Z(w(t).body);return i.length===a.length?a.some((e,t)=>e>(i[t]??0)):!1}var Q=`<<<<<<< ours`,Ae=`||||||| original`,$=`=======`,je=`>>>>>>> theirs`;function Me(e,t,n,r={}){let{includeBaseSection:i=!0}=r;if(t==null)return Ne(e,n);let a=e.endsWith(`
|
|
17
17
|
`)||t.endsWith(`
|
|
18
18
|
`)||n.endsWith(`
|
|
19
19
|
`),o=e=>e.at(-1)===``?e.slice(0,-1):e,s=te(o(e.split(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{n as s}from"./AgentIconCluster-Qf_VPGzc.js";import{t as c}from"./dist-CSCUSbQc.js";import{t as l}from"./checkbox-CKD8LETI.js";import{t as u}from"./label-CvMpFFbN.js";import{i as d,n as ee,o as te,s as ne,t as re}from"./select-Bu4Wm3Rf.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as f}from"./dist-BGzUo_18.js";import{n as ae}from"./constants-editors-DLxv8SuP.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-BVEHbRUy.js";import{a as ce,c as le,i as ue,n as de,o as fe,s as pe,t as me}from"./dialog-BJEjKJjL.js";import{p as he,r as ge,t as _e}from"./skill-scope-N3jmnGIX.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-B9YEcMtk.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-BzbDGc60.js";import{t as Ee}from"./use-skill-targets-9Csbq0fG.js";var p=a(),m=e(n(),1),h=t();function g(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(_,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function _(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:g,onOpenChange:_,returnFocus:v}=e,{_:y}=i(),Ne=(0,m.useId)(),Pe=he(),[b,Fe]=(0,m.useState)(c?.scope??o),Ie;t[0]!==n.names||t[1]!==c?(Ie=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ie):Ie=t[2];let[x,Le]=(0,m.useState)(Ie),[S,Re]=(0,m.useState)(!1),ze;t[3]===n.descriptions?ze=t[4]:(ze=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=ze);let[Be,Ve]=(0,m.useState)(ze),C=Ee(),[He,Ue]=(0,m.useState)(null),We=C.state.status===`ready`?C.state.data.targets:null,Ge;t[5]!==We||t[6]!==He?(Ge=He??new Set(We??[]),t[5]=We,t[6]=He,t[7]=Ge):Ge=t[7];let w=Ge,T=Te(),Ke=T.status===`ready`?T.data.find(e=>e.scope===b)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==b||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===b).map(Me)):new Set,t[8]=b,t[9]=T.data,t[10]=T.status,t[11]=Je):Je=t[11];let E=Je,Ye;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=new Set,t[12]=Ye):Ye=t[12];let[D,Xe]=(0,m.useState)(Ye),Ze=new Set;if(C.state.status===`ready`){let e;t[13]===C.state.data.folders?e=t[14]:(e=C.state.data.folders??[],t[13]=C.state.data.folders,t[14]=e);for(let t of e)t.scope===b&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===b)for(let t of e.customPlacements??[]){let e=ge(t);e&&Ze.add(e)}}let Qe=[...Ze].sort(),$e=c!==void 0,et,tt;t[15]!==a||t[16]!==$e?(et=()=>{if($e)return;let e=new AbortController;return ye(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(je)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,m.useEffect)(et,tt);let{plugin:O,names:k}=n,nt;if(t[19]!==E||t[20]!==k){let e;t[22]===E?e=t[23]:(e=e=>!E.has(e),t[22]=E,t[23]=e),nt=k.filter(e),t[19]=E,t[20]=k,t[21]=nt}else nt=t[21];let A=nt,j=x.size===A.length&&A.length>0,rt;t[24]===x?rt=t[25]:(rt=function(e,t){let n=new Set(x);t?n.add(e):n.delete(e),Le(n)},t[24]=x,t[25]=rt);let it=rt,at;t[26]!==y||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==g||t[31]!==_||t[32]!==O||t[33]!==b||t[34]!==x||t[35]!==a?(at=async function(){if(Re(!0),c){let e=await c.installSelected([...x]);if(Re(!1),e===null)return;e.size>0&&g?.(e),_(!1);return}let e=await be({source:a,skills:[...x],scope:b,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(y({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Ae).filter(ke),n=[...w];if(n.length>0)for(let e of t){let t=await ve({scope:b,name:e,targets:n,linkMode:!0});t.ok||f.error(y({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await xe({scope:b,name:n,dir:e,mode:`link`});t.ok||f.error(y({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}Re(!1);let{imported:r,alreadyImported:i,failed:o}=e;if(o>0){let t=e.results.filter(Oe).map(De).join(`, `);f.error(y({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(y({id:`uJfwF8`})):i>0?f.success(y({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(y({id:`-kKdCC`,values:{0:O??a,imported:r}}));let s=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||s.set(t.requested,t.name??t.requested);s.size>0&&g?.(s),_(!1)},t[26]=y,t[27]=D,t[28]=w,t[29]=c,t[30]=g,t[31]=_,t[32]=O,t[33]=b,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==_?(M=e=>{!e&&!S&&_(!1)},t[37]=S,t[38]=_,t[39]=M):M=t[39];let ct=ue,N;t[40]===v?N=t[41]:(N=e=>{v&&(e.preventDefault(),v())},t[40]=v,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,h.jsx)(le,{children:O?(0,h.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,h.jsx)(r,{id:`Q-DKvr`,values:{source:a}})}),t[42]=O,t[43]=a,t[44]=P):P=t[44];let F;t[45]===O?F=t[46]:(F=(0,h.jsx)(ce,{children:O?(0,h.jsx)(r,{id:`lj4cNf`}):(0,h.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,h.jsxs)(pe,{children:[P,F]}),t[47]=P,t[48]=F,t[49]=I):I=t[49];let lt=de,L;t[50]!==A.length||t[51]!==x.size?(L=(0,h.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,h.jsx)(r,{id:`lUtr1r`,values:{0:x.size,1:A.length}})}),t[50]=A.length,t[51]=x.size,t[52]=L):L=t[52];let R;t[53]!==j||t[54]!==A?(R=()=>Le(j?new Set:new Set(A)),t[53]=j,t[54]=A,t[55]=R):R=t[55];let z;t[56]===j?z=t[57]:(z=j?(0,h.jsx)(r,{id:`xCJdfg`}):(0,h.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,h.jsx)(ie,{variant:`ghost`,size:`sm`,disabled:S,onClick:R,children:z}),t[58]=S,t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==L||t[63]!==B?(V=(0,h.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,B]}),t[62]=L,t[63]=B,t[64]=V):V=t[64];let H;if(t[65]!==S||t[66]!==Be||t[67]!==E||t[68]!==k||t[69]!==x||t[70]!==it){let e;t[72]!==S||t[73]!==Be||t[74]!==E||t[75]!==x||t[76]!==it?(e=e=>{let t=Be.get(e),n=E.has(e);return(0,h.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,h.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,h.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,h.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,h.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=Be,t[74]=E,t[75]=x,t[76]=it,t[77]=e):e=t[77],H=k.map(e),t[65]=S,t[66]=Be,t[67]=E,t[68]=k,t[69]=x,t[70]=it,t[71]=H}else H=t[71];let U;t[78]===H?U=t[79]:(U=(0,h.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:H}),t[78]=H,t[79]=U);let W;t[80]===b?W=t[81]:(W=b===`project`?(0,h.jsx)(r,{id:`oVW7VD`}):(0,h.jsx)(r,{id:`7HY6fA`}),t[80]=b,t[81]=W);let ut=$e?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,h.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,h.jsx)(r,{id:`poAsUN`}),(0,h.jsxs)(we,{children:[(0,h.jsx)(Se,{asChild:!0,children:(0,h.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,h.jsx)(r,{id:`o-XJ9D`})})}),(0,h.jsxs)(Ce,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{htmlFor:Ne,children:(0,h.jsx)(r,{id:`7MSbAT`})}),(0,h.jsxs)(re,{value:b,disabled:S,onValueChange:e=>Fe(e),children:[(0,h.jsx)(te,{id:Ne,className:`w-full`,children:(0,h.jsx)(ne,{})}),(0,h.jsx)(ee,{children:_e.map(e=>(0,h.jsx)(d,{value:e,children:Pe[e]},e))})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{children:(0,h.jsx)(r,{id:`Y5la_5`})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,h.jsx)(l,{checked:w.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(w);t===!0?n.add(e):n.delete(e),Ue(n)}}),ae[e]??e]},e)),Qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,h.jsx)(l,{checked:D.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(D);t===!0?n.add(e):n.delete(e),Xe(n)}}),(0,h.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[W,ut]}),t[82]=W,t[83]=ut,t[84]=G):G=t[84];let K;t[85]!==lt||t[86]!==V||t[87]!==U||t[88]!==G?(K=(0,h.jsxs)(lt,{className:`flex flex-col gap-4`,children:[V,U,G]}),t[85]=lt,t[86]=V,t[87]=U,t[88]=G,t[89]=K):K=t[89];let q;t[90]===_?q=t[91]:(q=()=>_(!1),t[90]=_,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,h.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,h.jsx)(ie,{variant:`outline`,disabled:S,onClick:q,children:dt}),t[93]=S,t[94]=q,t[95]=J):J=t[95];let ft=S||x.size===0,Y;t[96]===ot?Y=t[97]:(Y=()=>void ot(),t[96]=ot,t[97]=Y);let X;t[98]!==S||t[99]!==x.size?(X=S?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,h.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,h.jsx)(r,{id:`TKQ7K-`}):(0,h.jsx)(r,{id:`9XwoPv`,values:{0:x.size}}),t[98]=S,t[99]=x.size,t[100]=X):X=t[100];let Z;t[101]!==ft||t[102]!==Y||t[103]!==X?(Z=(0,h.jsx)(ie,{"data-testid":`plugin-bundle-install`,disabled:ft,onClick:Y,children:X}),t[101]=ft,t[102]=Y,t[103]=X,t[104]=Z):Z=t[104];let Q;t[105]!==J||t[106]!==Z?(Q=(0,h.jsxs)(fe,{children:[J,Z]}),t[105]=J,t[106]=Z,t[107]=Q):Q=t[107];let $;t[108]!==ct||t[109]!==N||t[110]!==I||t[111]!==K||t[112]!==Q?($=(0,h.jsxs)(ct,{className:`sm:max-w-lg`,onCloseAutoFocus:N,children:[I,K,Q]}),t[108]=ct,t[109]=N,t[110]=I,t[111]=K,t[112]=Q,t[113]=$):$=t[113];let pt;return t[114]!==st||t[115]!==M||t[116]!==$?(pt=(0,h.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function De(e){return e.requested}function Oe(e){return e.status===`failed`||e.status===`not-found`}function ke(e){return typeof e==`string`}function Ae(e){return e.name}function je(e){return[e.name,e.description]}function Me(e){return e.name}function v(e){let t=(0,p.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,l=a!==void 0&&a?c:`div`,u;t[5]===n?u=t[6]:(u=o(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==r||t[9]!==s||t[10]!==u?(d=(0,h.jsx)(l,{"data-slot":`card`,"data-size":s,className:u,...r}),t[7]=l,t[8]=r,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function y(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ne(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function b(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ie(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ie as a,g as c,Pe as i,b as n,y as o,Fe as r,Ne as s,v as t};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{n as s}from"./AgentIconCluster-Qf_VPGzc.js";import{t as c}from"./dist-CSCUSbQc.js";import{t as l}from"./checkbox-CKD8LETI.js";import{t as u}from"./label-CvMpFFbN.js";import{i as d,n as ee,o as te,s as ne,t as re}from"./select-Bu4Wm3Rf.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as f}from"./dist-BGzUo_18.js";import{n as ae}from"./constants-editors-DLxv8SuP.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-CAjgsxCn.js";import{a as ce,c as le,i as ue,n as de,o as fe,s as pe,t as me}from"./dialog-BJEjKJjL.js";import{p as he,r as ge,t as _e}from"./skill-scope-N3jmnGIX.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-B7NWq2mZ.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-D4I9tjyB.js";import{t as Ee}from"./use-skill-targets-CcZTp1aJ.js";var p=a(),m=e(n(),1),h=t();function g(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(_,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function _(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:g,onOpenChange:_,returnFocus:v}=e,{_:y}=i(),Ne=(0,m.useId)(),Pe=he(),[b,Fe]=(0,m.useState)(c?.scope??o),Ie;t[0]!==n.names||t[1]!==c?(Ie=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ie):Ie=t[2];let[x,Le]=(0,m.useState)(Ie),[S,Re]=(0,m.useState)(!1),ze;t[3]===n.descriptions?ze=t[4]:(ze=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=ze);let[Be,Ve]=(0,m.useState)(ze),C=Ee(),[He,Ue]=(0,m.useState)(null),We=C.state.status===`ready`?C.state.data.targets:null,Ge;t[5]!==We||t[6]!==He?(Ge=He??new Set(We??[]),t[5]=We,t[6]=He,t[7]=Ge):Ge=t[7];let w=Ge,T=Te(),Ke=T.status===`ready`?T.data.find(e=>e.scope===b)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==b||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===b).map(Me)):new Set,t[8]=b,t[9]=T.data,t[10]=T.status,t[11]=Je):Je=t[11];let E=Je,Ye;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=new Set,t[12]=Ye):Ye=t[12];let[D,Xe]=(0,m.useState)(Ye),Ze=new Set;if(C.state.status===`ready`){let e;t[13]===C.state.data.folders?e=t[14]:(e=C.state.data.folders??[],t[13]=C.state.data.folders,t[14]=e);for(let t of e)t.scope===b&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===b)for(let t of e.customPlacements??[]){let e=ge(t);e&&Ze.add(e)}}let Qe=[...Ze].sort(),$e=c!==void 0,et,tt;t[15]!==a||t[16]!==$e?(et=()=>{if($e)return;let e=new AbortController;return ye(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(je)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,m.useEffect)(et,tt);let{plugin:O,names:k}=n,nt;if(t[19]!==E||t[20]!==k){let e;t[22]===E?e=t[23]:(e=e=>!E.has(e),t[22]=E,t[23]=e),nt=k.filter(e),t[19]=E,t[20]=k,t[21]=nt}else nt=t[21];let A=nt,j=x.size===A.length&&A.length>0,rt;t[24]===x?rt=t[25]:(rt=function(e,t){let n=new Set(x);t?n.add(e):n.delete(e),Le(n)},t[24]=x,t[25]=rt);let it=rt,at;t[26]!==y||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==g||t[31]!==_||t[32]!==O||t[33]!==b||t[34]!==x||t[35]!==a?(at=async function(){if(Re(!0),c){let e=await c.installSelected([...x]);if(Re(!1),e===null)return;e.size>0&&g?.(e),_(!1);return}let e=await be({source:a,skills:[...x],scope:b,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(y({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Ae).filter(ke),n=[...w];if(n.length>0)for(let e of t){let t=await ve({scope:b,name:e,targets:n,linkMode:!0});t.ok||f.error(y({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await xe({scope:b,name:n,dir:e,mode:`link`});t.ok||f.error(y({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}Re(!1);let{imported:r,alreadyImported:i,failed:o}=e;if(o>0){let t=e.results.filter(Oe).map(De).join(`, `);f.error(y({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(y({id:`uJfwF8`})):i>0?f.success(y({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(y({id:`-kKdCC`,values:{0:O??a,imported:r}}));let s=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||s.set(t.requested,t.name??t.requested);s.size>0&&g?.(s),_(!1)},t[26]=y,t[27]=D,t[28]=w,t[29]=c,t[30]=g,t[31]=_,t[32]=O,t[33]=b,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==_?(M=e=>{!e&&!S&&_(!1)},t[37]=S,t[38]=_,t[39]=M):M=t[39];let ct=ue,N;t[40]===v?N=t[41]:(N=e=>{v&&(e.preventDefault(),v())},t[40]=v,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,h.jsx)(le,{children:O?(0,h.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,h.jsx)(r,{id:`Q-DKvr`,values:{source:a}})}),t[42]=O,t[43]=a,t[44]=P):P=t[44];let F;t[45]===O?F=t[46]:(F=(0,h.jsx)(ce,{children:O?(0,h.jsx)(r,{id:`lj4cNf`}):(0,h.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,h.jsxs)(pe,{children:[P,F]}),t[47]=P,t[48]=F,t[49]=I):I=t[49];let lt=de,L;t[50]!==A.length||t[51]!==x.size?(L=(0,h.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,h.jsx)(r,{id:`lUtr1r`,values:{0:x.size,1:A.length}})}),t[50]=A.length,t[51]=x.size,t[52]=L):L=t[52];let R;t[53]!==j||t[54]!==A?(R=()=>Le(j?new Set:new Set(A)),t[53]=j,t[54]=A,t[55]=R):R=t[55];let z;t[56]===j?z=t[57]:(z=j?(0,h.jsx)(r,{id:`xCJdfg`}):(0,h.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,h.jsx)(ie,{variant:`ghost`,size:`sm`,disabled:S,onClick:R,children:z}),t[58]=S,t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==L||t[63]!==B?(V=(0,h.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,B]}),t[62]=L,t[63]=B,t[64]=V):V=t[64];let H;if(t[65]!==S||t[66]!==Be||t[67]!==E||t[68]!==k||t[69]!==x||t[70]!==it){let e;t[72]!==S||t[73]!==Be||t[74]!==E||t[75]!==x||t[76]!==it?(e=e=>{let t=Be.get(e),n=E.has(e);return(0,h.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,h.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,h.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,h.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,h.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=Be,t[74]=E,t[75]=x,t[76]=it,t[77]=e):e=t[77],H=k.map(e),t[65]=S,t[66]=Be,t[67]=E,t[68]=k,t[69]=x,t[70]=it,t[71]=H}else H=t[71];let U;t[78]===H?U=t[79]:(U=(0,h.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:H}),t[78]=H,t[79]=U);let W;t[80]===b?W=t[81]:(W=b===`project`?(0,h.jsx)(r,{id:`oVW7VD`}):(0,h.jsx)(r,{id:`7HY6fA`}),t[80]=b,t[81]=W);let ut=$e?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,h.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,h.jsx)(r,{id:`poAsUN`}),(0,h.jsxs)(we,{children:[(0,h.jsx)(Se,{asChild:!0,children:(0,h.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,h.jsx)(r,{id:`o-XJ9D`})})}),(0,h.jsxs)(Ce,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{htmlFor:Ne,children:(0,h.jsx)(r,{id:`7MSbAT`})}),(0,h.jsxs)(re,{value:b,disabled:S,onValueChange:e=>Fe(e),children:[(0,h.jsx)(te,{id:Ne,className:`w-full`,children:(0,h.jsx)(ne,{})}),(0,h.jsx)(ee,{children:_e.map(e=>(0,h.jsx)(d,{value:e,children:Pe[e]},e))})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{children:(0,h.jsx)(r,{id:`Y5la_5`})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,h.jsx)(l,{checked:w.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(w);t===!0?n.add(e):n.delete(e),Ue(n)}}),ae[e]??e]},e)),Qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,h.jsx)(l,{checked:D.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(D);t===!0?n.add(e):n.delete(e),Xe(n)}}),(0,h.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[W,ut]}),t[82]=W,t[83]=ut,t[84]=G):G=t[84];let K;t[85]!==lt||t[86]!==V||t[87]!==U||t[88]!==G?(K=(0,h.jsxs)(lt,{className:`flex flex-col gap-4`,children:[V,U,G]}),t[85]=lt,t[86]=V,t[87]=U,t[88]=G,t[89]=K):K=t[89];let q;t[90]===_?q=t[91]:(q=()=>_(!1),t[90]=_,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,h.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,h.jsx)(ie,{variant:`outline`,disabled:S,onClick:q,children:dt}),t[93]=S,t[94]=q,t[95]=J):J=t[95];let ft=S||x.size===0,Y;t[96]===ot?Y=t[97]:(Y=()=>void ot(),t[96]=ot,t[97]=Y);let X;t[98]!==S||t[99]!==x.size?(X=S?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,h.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,h.jsx)(r,{id:`TKQ7K-`}):(0,h.jsx)(r,{id:`9XwoPv`,values:{0:x.size}}),t[98]=S,t[99]=x.size,t[100]=X):X=t[100];let Z;t[101]!==ft||t[102]!==Y||t[103]!==X?(Z=(0,h.jsx)(ie,{"data-testid":`plugin-bundle-install`,disabled:ft,onClick:Y,children:X}),t[101]=ft,t[102]=Y,t[103]=X,t[104]=Z):Z=t[104];let Q;t[105]!==J||t[106]!==Z?(Q=(0,h.jsxs)(fe,{children:[J,Z]}),t[105]=J,t[106]=Z,t[107]=Q):Q=t[107];let $;t[108]!==ct||t[109]!==N||t[110]!==I||t[111]!==K||t[112]!==Q?($=(0,h.jsxs)(ct,{className:`sm:max-w-lg`,onCloseAutoFocus:N,children:[I,K,Q]}),t[108]=ct,t[109]=N,t[110]=I,t[111]=K,t[112]=Q,t[113]=$):$=t[113];let pt;return t[114]!==st||t[115]!==M||t[116]!==$?(pt=(0,h.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function De(e){return e.requested}function Oe(e){return e.status===`failed`||e.status===`not-found`}function ke(e){return typeof e==`string`}function Ae(e){return e.name}function je(e){return[e.name,e.description]}function Me(e){return e.name}function v(e){let t=(0,p.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,l=a!==void 0&&a?c:`div`,u;t[5]===n?u=t[6]:(u=o(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==r||t[9]!==s||t[10]!==u?(d=(0,h.jsx)(l,{"data-slot":`card`,"data-size":s,className:u,...r}),t[7]=l,t[8]=r,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function y(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ne(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function b(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ie(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ie as a,g as c,Pe as i,b as n,y as o,Fe as r,Ne as s,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{m as i}from"./RegisteredAgentIcon-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{m as i}from"./RegisteredAgentIcon-DKZ8eOKZ.js";var a=r(),o=e(t(),1);function s(e){return e.supported?e.harness?.availability===`present`||e.harness?.credentials===`present`:!1}function c(e){let t=[`claude-acp`,`codex-acp`,`cursor`,`opencode`],n=e=>{let n=t.indexOf(e);return n===-1?t.length:n};return e.filter(s).sort((e,t)=>n(e.id)-n(t.id))}function l(e){return e.harness?.credentials===`present`?0:+(e.harness?.availability===`not-found`)}async function u(e){let t=await fetch(`/api/acp/catalog`,{signal:e??AbortSignal.timeout(2e4)});if(!t.ok)throw Error(`agent catalog request failed: HTTP ${t.status}`);let n=await t.json();return{agents:Array.isArray(n.agents)?n.agents:[],stale:n.stale===!0,maxThreads:typeof n.maxThreads==`number`?n.maxThreads:8}}var d=300*1e3,f=null;function p(e){let t=(0,a.c)(6),r=e===void 0?!0:e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`acp-catalog`],t[0]=i):i=t[0];let s;t[1]===r?s=t[2]:(s={queryKey:i,queryFn:m,staleTime:d,enabled:r},t[1]=r,t[2]=s);let c=n(s),{error:l}=c,u,p;return t[3]===l?(u=t[4],p=t[5]):(u=()=>{l==null||l===f||(f=l,console.error(`[acp-catalog] agent catalog request failed`,l))},p=[l],t[3]=l,t[4]=u,t[5]=p),(0,o.useEffect)(u,p),c}function m(e){let{signal:t}=e;return u(t)}function h(){let e=(0,a.c)(3),{data:t}=p(),n=t?.agents,r,s;e[0]===n?(r=e[1],s=e[2]):(r=()=>{n&&i(n.map(g))},s=[n],e[0]=n,e[1]=r,e[2]=s),(0,o.useEffect)(r,s)}function g(e){return{source:e.source,id:e.id,name:e.name,supported:e.supported,featured:e.featured,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}export{p as a,s as i,u as n,h as o,l as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.85.0
|
|
1
|
+
var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.85.0`}?.VITE_APP_VERSION??`0.0.0-unknown`,c=n({hasDesktopBridge:typeof window<`u`&&window.okDesktop!==void 0,embeddedHost:o()});function l(){return r({kind:c,runtimeVersion:s})}function u(){return i({kind:c,runtimeVersion:s})}export{o as a,u as i,c as n,e as o,l as r,s as t};
|