@inkeep/open-knowledge 0.83.0-beta.5 → 0.83.0-beta.7
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/linking.md +1 -1
- package/dist/cli.mjs +60 -60
- package/dist/constants-CCYsBRvI.mjs +1 -0
- package/dist/dist-DMhyZWXW.mjs +2198 -0
- package/dist/{dist-ByQ8IZXo.mjs → dist-ObUBLmuL.mjs} +1 -1
- package/dist/index.d.mts +7 -0
- package/dist/index.mjs +236 -234
- package/dist/{init-CrjTf1pi.mjs → init-B4K69pZS.mjs} +36 -36
- package/dist/init-DORmPVEO.mjs +1 -0
- package/dist/{launch-json-removal-BEKplNGY.mjs → launch-json-removal-CT0i-3-W.mjs} +1 -1
- package/dist/loader-BQnA36qb.mjs +1 -0
- package/dist/{loader-CrmSAWIW.mjs → loader-DZHqBHXr.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-DsBy1Dky.mjs → md-manager-BGnqyqi1-B1QSgyMJ.mjs} +158 -156
- package/dist/{open-browser-CJogphTe.mjs → open-browser-B-7x1MTL.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-BWmm6t1q.mjs +1 -0
- package/dist/{preview-B2beHnfh.mjs → preview-BdmlMCtY.mjs} +1 -1
- package/dist/public/assets/{AccountSection-Droiytue.js → AccountSection-DJh9iLbq.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-CbnLPTIH.js → ActivityModeContent-BAm_Sv3o.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-KfKILXo9.js → AddPropertiesButton-B1mRaQFw.js} +2 -2
- package/dist/public/assets/{AgentConnectionsSection-CJhM0Oqw.js → AgentConnectionsSection-D_gmSJG4.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-B0odJ1aT.js → AgentDiffPane-rX7T_Ooo.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-Mw0-ZVyb.js → AttachmentsSection-FLGDe3pX.js} +1 -1
- package/dist/public/assets/{AuthModal-DcixDUcD.js → AuthModal-CkHLmy_N.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-BuFeADVI.js +166 -0
- package/dist/public/assets/{ContentRulesSection-Bss4zUDP.js → ContentRulesSection-DZmyRVa0.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-B5VRWFoq.js → DiffViewBoundary-BVzts2c4.js} +1 -1
- package/dist/public/assets/DocumentContext-C8ape_2m.js +108 -0
- package/dist/public/assets/{EditorModeToggle-DPAypJvm.js → EditorModeToggle-DS_xfOtT.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-C_j2ekRK.js → ExcalidrawDocEditor-DWd6a8Sl.js} +1 -1
- package/dist/public/assets/FeedbackForm-MbJXUGuy.js +1 -0
- package/dist/public/assets/{GraphPanel-ZgCaGJ14.js → GraphPanel-COpuyFxT.js} +1 -1
- package/dist/public/assets/{ImageAttachments-ChGavHQ_.js → ImageAttachments-By1ZcRNT.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CYgy5v1q.js → ImportSkillDialog-C2_Su5XJ.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-uXIP-dp3.js → LinkPreviewsSection-ChJ4iMSL.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BFYDnPot.js → LintConfigEditor-BbSzjMFm.js} +1 -1
- package/dist/public/assets/LintingSection-4HBYSeJr.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-oK6vCr7C.js → ManagedArtifactProperties-2ky67bIe.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CatYQWAb.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-7zbWvNHd.js → MermaidDocEditor-CA7gNCDw.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-Bn8H6wuf.js → NetworkAccessSection-OcPnmrqG.js} +1 -1
- package/dist/public/assets/{OkignoreSection-B6lKSJGD.js → OkignoreSection-DUIPj4Vl.js} +1 -1
- package/dist/public/assets/PageListContext-CYKNvec7.js +1 -0
- package/dist/public/assets/{ProjectTemplatesSection-Cf5bgyHk.js → ProjectTemplatesSection-Ctdx9_AL.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DtQD10NU.js → PropertyDisplayRow-BvC-5Aoc.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-Bi_yfoyq.js → PublishToGitHubDialog-BAs3Rgt6.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-jysj1Acv.js → RegisteredAgentIcon-Begcc-nC.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-CW-yLP7E.js → ReportBugDialogBody-CPjEs_zr.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-D2RpbMHk.js → ReportBugMenuTrigger-DwuaKFu1.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CmvHbYD0.js → SchemaConfigEditor-_iycEDNg.js} +1 -1
- package/dist/public/assets/{SearchSection-NRyXWfQ3.js → SearchSection-BXFLBgQF.js} +1 -1
- package/dist/public/assets/{SessionsHost-Cc2oV3dV.js → SessionsHost-YR8a-CBs.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CWnpUal4.js → SettingsDialogBody-FXTDyHIp.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-ChcdZosR.js → ShareReceiveMissDialog-D0feG-ij.js} +1 -1
- package/dist/public/assets/{SkillCostValue-Bgy3wkjV.js → SkillCostValue-Bajv3P86.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-CwCSC6Z0.js → SkillForkDialog-BKGY1iRx.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-BIs2wAUZ.js → SkillInstallMenu-CuOKJ4_n.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-Dr1zcAGa.js → SkillOriginInline-BrUb4Fgy.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-BXSkUGmd.js → SkillToolbarControls-BOtPYfa8.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-CiaThXM_.js → SkillsManagerSection-dqXRCM3C.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-BpGxFSJu.js → SlidesToolbarControls-D-0pa5F-.js} +1 -1
- package/dist/public/assets/{SourceEditor-AolrPcnF.js → SourceEditor-ZhZtt3fQ.js} +1 -1
- package/dist/public/assets/{SpellingSettings-Bp5WJ0V7.js → SpellingSettings-DaGy2fT9.js} +1 -1
- package/dist/public/assets/{SyncSection-DN4BNjYi.js → SyncSection-B17cmijr.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-BO6CFavL.js → SyncStatusBadge-DckHbstF.js} +1 -1
- package/dist/public/assets/{TemplateRow-Bj4hpJ-E.js → TemplateRow-C8tLmbrb.js} +1 -1
- package/dist/public/assets/{TerminalLaunchContext-kR8NUVFa.js → TerminalLaunchContext-58PQDilg.js} +1 -1
- package/dist/public/assets/{TerminalPanel-CBpH9VnO.js → TerminalPanel-DOYDhObX.js} +1 -1
- package/dist/public/assets/{TerminalSection-DnexOFJv.js → TerminalSection-CWS2W27g.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CYOc89Z0.js → TerminalWindowApp-0S4powU1.js} +1 -1
- package/dist/public/assets/{TextDocEditor-DcTmh_sa.js → TextDocEditor-DIsBDCjZ.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-DOCAYKOj.js → ThemePluginSection-0b67foiM.js} +1 -1
- package/dist/public/assets/{ThreadView-H4YeUz_6.js → ThreadView-KbVr8sEz.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-DBRzt5of.js → TimelineDiffPane-PhDxCy33.js} +1 -1
- package/dist/public/assets/{agent-connections-BmjcmCOh.js → agent-connections-Bc1t_U_m.js} +1 -1
- package/dist/public/assets/{agent-registry--47SG0kt.js → agent-registry-3ko3YkCm.js} +1 -1
- package/dist/public/assets/{bridge-njD5PB6P.js → bridge-BqL-1MyE.js} +1 -1
- package/dist/public/assets/{card-BsBNZHzU.js → card-CHd8wMSS.js} +1 -1
- package/dist/public/assets/{catalog-DtlAjcAT.js → catalog-nXBoyoEn.js} +1 -1
- package/dist/public/assets/{client-version-Bhpi7gms.js → client-version-C-aFlRsC.js} +1 -1
- package/dist/public/assets/{comment-chips-CO_v36hx.js → comment-chips-DOajrkhR.js} +3 -3
- package/dist/public/assets/{config-provider-DYjwca1V.js → config-provider-Dp4Rfq0I.js} +1 -1
- package/dist/public/assets/config-schema-8zesQqFR.js +1 -0
- package/dist/public/assets/{css-color-to-hex-vFOfC-Pa.js → css-color-to-hex-Dk3DSeEK.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-Dn9t2Iwn.js → doc-undo-manager-ahQPlK9S.js} +1 -1
- package/dist/public/assets/field-controls-D4Q9aSAc.js +1 -0
- package/dist/public/assets/{field-controls-CAjZIoxe.js → field-controls-c03mLOtp.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-B1gVPdEq.js → file-tree-adapter-BeSKxnyg.js} +1 -1
- package/dist/public/assets/{frontmatter-tags-B-pVcI4P.js → frontmatter-tags-B7FS--Ga.js} +1 -1
- package/dist/public/assets/{index-jj7AN3ys.js → index-CWM5nCtw.js} +11 -11
- package/dist/public/assets/{lint-config-client-DRl_GTbs.js → lint-config-client-DBaQUIFB.js} +1 -1
- package/dist/public/assets/{lint-plugins-DQC4DG_-.js → lint-plugins-B7BcnvBQ.js} +1 -1
- package/dist/public/assets/{markdown-lint-C_9h2J3z.js → markdown-lint-CciVlHiz.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BShldaY9.js → markdownlint-rule-browser-CV8JXarL.js} +1 -1
- package/dist/public/assets/messages-7VNu1LEh.js +1 -0
- package/dist/public/assets/messages-BoIpsnrB.js +1 -0
- package/dist/public/assets/messages-BtoWyWp4.js +1 -0
- package/dist/public/assets/messages-CAWZbzxC.js +1 -0
- package/dist/public/assets/messages-CGY-qBkm.js +1 -0
- package/dist/public/assets/messages-CI6bk3ZZ.js +1 -0
- package/dist/public/assets/messages-CKSKVChp.js +1 -0
- package/dist/public/assets/messages-CVkIPXvF.js +1 -0
- package/dist/public/assets/messages-CpkkpjCc.js +1 -0
- package/dist/public/assets/messages-DP2kzUjm.js +1 -0
- package/dist/public/assets/messages-DUncwHK7.js +1 -0
- package/dist/public/assets/messages-WS5AYLW5.js +1 -0
- package/dist/public/assets/messages-yosQwPO3.js +1 -0
- package/dist/public/assets/navigation-targets-DTSxcGor.js +1 -0
- package/dist/public/assets/{page-list-cache-s0lTSAFU.js → page-list-cache-BNFVKu-D.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DIU-Po1C.js → pending-receive-nav-store-Ji-MjcTi.js} +1 -1
- package/dist/public/assets/{preferred-session-events-Ayg96deM.js → preferred-session-events-DZS0rMoL.js} +1 -1
- package/dist/public/assets/{progress-BpdOUTnu.js → progress-RYUnJ5Yy.js} +4 -4
- package/dist/public/assets/{saved-themes-client-BdzXiLZg.js → saved-themes-client-C0V8gWns.js} +1 -1
- package/dist/public/assets/{schema-section-AjQemGau.js → schema-section-BEhtY3tq.js} +1 -1
- package/dist/public/assets/{schemas-api-C4CP1G39.js → schemas-api-BM3O7zA1.js} +1 -1
- package/dist/public/assets/{selection-context-Dj_iPBku.js → selection-context-DFzIaDVr.js} +1 -1
- package/dist/public/assets/{skills-api-BUVVp6gv.js → skills-api-Cwv39pKK.js} +1 -1
- package/dist/public/assets/{src-CS5ZPUzW.js → src-Cc4wFWWl.js} +1 -1
- package/dist/public/assets/storage-scope-67lIepq6.js +1 -0
- package/dist/public/assets/{tag-pill-input-BoyxN9pC.js → tag-pill-input-DoehfrBo.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DAN5F8dH.js → target-navigation-intent-D7IZjXLN.js} +1 -1
- package/dist/public/assets/{telemetry-impl-m7aO3jDl.js → telemetry-impl-DChsPrpQ.js} +1 -1
- package/dist/public/assets/{telemetry-startup-74CCPsgN.js → telemetry-startup-B9nVffXq.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-Cy8GAcTt.js → terminal-launch-events-vPUm3fxK.js} +1 -1
- package/dist/public/assets/typing-burst-detector-D_B94C2V.js +8 -0
- package/dist/public/assets/{uninstall-D609kB1N.js → uninstall-SlWuPbLL.js} +1 -1
- package/dist/public/assets/{use-activity-panel-I5AELaRz.js → use-activity-panel-BynfAds7.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-lLFWDFMc.js → use-apply-config-color-theme-DsCyuU3O.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-C0m8OLaJ.js → use-apply-config-language-CNWS2YSn.js} +2 -2
- package/dist/public/assets/{use-conflicts-B0yvUiLf.js → use-conflicts-CpABgIGI.js} +1 -1
- package/dist/public/assets/{use-installed-clis-4inF6O-n.js → use-installed-clis-CXwm5pk2.js} +2 -2
- package/dist/public/assets/{use-live-xterm-theme-BIzA-mu0.js → use-live-xterm-theme-CkVAs5Ql.js} +1 -1
- package/dist/public/assets/{use-open-skill-Bro5-8rY.js → use-open-skill-oBbTNCkY.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-CGPJyDjj.js → use-semantic-search-status-BYu4PoVz.js} +1 -1
- package/dist/public/assets/{use-skill-origin-Cv_S5gSq.js → use-skill-origin-Be1NTkgW.js} +1 -1
- package/dist/public/assets/{use-skill-targets-D-Tfz8TQ.js → use-skill-targets-Cf23drqO.js} +1 -1
- package/dist/public/assets/{use-skills-CRuEYkjM.js → use-skills-gbn1t63C.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DASwB3kR.js → use-terminal-enabled-DZ-JhCyV.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DePScbzI.js → use-timeline-entry-diff-3gupsEXJ.js} +2 -2
- package/dist/public/assets/{use-workspace-Bf2VHQrp.js → use-workspace-BafUpQnS.js} +1 -1
- package/dist/public/index.html +56 -56
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-CtY_1ly1.mjs → registry-probes-D6HyJ_8R.mjs} +3 -3
- package/dist/{removal-file-path-CNIqq13J.mjs → removal-file-path-DpI99hTo.mjs} +1 -1
- package/dist/{repair-launch-json-CJpZgLgO.mjs → repair-launch-json--_R-76cC.mjs} +1 -1
- package/dist/{repair-mcp-configs-DlqDZ1Q-.mjs → repair-mcp-configs-CZSnWHtM.mjs} +1 -1
- package/dist/src-BrQpMSWu.mjs +11 -0
- package/dist/src-CY1smm1s.mjs +1 -0
- package/dist/{start-UcVINga1.mjs → start-CDnYOrHP.mjs} +3 -3
- package/dist/start-Pg-N_eC0.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-DPhkbJXs.mjs +0 -1
- package/dist/dist-BHg9XI3A.mjs +0 -2198
- package/dist/init-Kw-TosnB.mjs +0 -1
- package/dist/loader-CwZvWeL0.mjs +0 -1
- package/dist/preview-AWnyLtzP.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-CJK_-B_x.js +0 -164
- package/dist/public/assets/DocumentContext-Bsl186nT.js +0 -108
- package/dist/public/assets/FeedbackForm-CQ0MZzAX.js +0 -1
- package/dist/public/assets/LintingSection-CKk0R2XV.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-D4nKksLq.js +0 -1
- package/dist/public/assets/PageListContext-OHnhzUbe.js +0 -1
- package/dist/public/assets/config-schema-CjObvyCB.js +0 -1
- package/dist/public/assets/field-controls-23rf_c2g.js +0 -1
- package/dist/public/assets/messages-6qDi59f7.js +0 -1
- package/dist/public/assets/messages-BEvT9Nwy.js +0 -1
- package/dist/public/assets/messages-BSK33k09.js +0 -1
- package/dist/public/assets/messages-BWfEJjWl.js +0 -1
- package/dist/public/assets/messages-BlGEL1N1.js +0 -1
- package/dist/public/assets/messages-Bq95Bcqm.js +0 -1
- package/dist/public/assets/messages-BvpXmuCB.js +0 -1
- package/dist/public/assets/messages-Cw5_--PV.js +0 -1
- package/dist/public/assets/messages-D456hKdc.js +0 -1
- package/dist/public/assets/messages-F1g5PrYW.js +0 -1
- package/dist/public/assets/messages-_PYN_xve.js +0 -1
- package/dist/public/assets/messages-gEPZ_37y.js +0 -1
- package/dist/public/assets/messages-vtPav911.js +0 -1
- package/dist/public/assets/navigation-targets-BVafzc0v.js +0 -1
- package/dist/public/assets/storage-scope-DRWogX35.js +0 -1
- package/dist/public/assets/typing-burst-detector-Clq1sSnx.js +0 -8
- package/dist/src-CnRhVti_.mjs +0 -11
- package/dist/src-lCnJgf0p.mjs +0 -1
- package/dist/start-CIrEb03P.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActivityPanelDiffView-BYoZOgEt.js","./dist-Nvb76hAm.js","./chunk-CYidjpOJ.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./pierre-theme-m65RB-UD.js","./preload-helper-Chd9yIcd.js","./engine-compile-BPXLm23f.js","./lib-TFtgHRaJ.js","./ccount-BoHE53_k.js","./lib-DlDYgFfS.js","./space-separated-tokens-l9yufOSK.js","./lib-7Zm1Z07d.js","./ok-syntax-theme-BMRqG2JF.js","./MultiFileDiff-zOLnKuhd.js","./react-error-boundary-6ac6QM6R.js","./compiler-runtime-BfE3aGVn.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as ee}from"./dist-Nvb76hAm.js";import{t as te}from"./compiler-runtime-BfE3aGVn.js";import{t as ne}from"./overlay-layers-CKMAjef3.js";import{i as re,n as ie,t as ae}from"./tooltip-DBqLYfio.js";import{c as oe}from"./select-Bu4Wm3Rf.js";import{n as se,t as ce}from"./toggle-group-B7p69Qfd.js";import{t as a}from"./button-DzgjsZzC.js";import{n as le}from"./dist-BGzUo_18.js";import"./schemas-api-C4CP1G39.js";import{n as ue}from"./_envelope-Dwl6i2K9-DPqJ_Q4W.js";import{t as de}from"./chevron-down-CEv6N8LG.js";import{t as fe}from"./spinner-Bx8xD6f8.js";import{n as pe,t as me}from"./panel-right-open-BSU2gtLb.js";import{t as he}from"./undo-2-xEF_s_Io.js";import{t as ge}from"./x-DM2drskU.js";import{a as _e,c as ve,i as ye,o as be,s as xe,t as Se}from"./dialog-BJEjKJjL.js";import{t as Ce}from"./timeline-diff-store-BpioNUVS.js";import{t as o}from"./lru-string-cache-DY072Suk.js";import{a as we,c as Te,i as Ee,l as De,n as Oe,o as ke,r as Ae,s as je,u as Me}from"./use-timeline-entry-diff-DePScbzI.js";var Ne=te(),s=e(r(),1),c=n(),Pe=(0,s.lazy)(async()=>({default:(await t(()=>import(`./ActivityPanelDiffView-BYoZOgEt.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)).ActivityPanelDiffView}));function l(e){let t=(0,Ne.c)(166),{view:n,isPanelCollapsed:r,onTogglePanel:te}=e,{_:o}=ee(),{docName:l,sha:u,parentSha:Le,laterEdits:d,authorName:Re,relativeTime:ze}=n,[Be]=(0,s.useState)(Ie),[f,Ve]=(0,s.useState)(`rendered`),[p,He]=(0,s.useState)(!1),[m,Ue]=(0,s.useState)(!1),We=(0,s.useRef)(null),Ge=(0,s.useRef)(null),[Ke,qe]=(0,s.useState)(0),[Je,Ye]=(0,s.useState)(0),[h,Xe]=(0,s.useState)(!1),[Ze,Qe]=(0,s.useState)(!0),g=Oe(u,l,Be,`vs-parent`,Le),_,v,y,b,$e,x;t[0]!==Je||t[1]!==h||t[2]!==f||t[3]!==g.after||t[4]!==g.before||t[5]!==g.properties||t[6]!==g.status?(b=g.status===`ready`?je(g.before,g.after):null,x=f===`rendered`&&b?.ok===!0,v=g.status===`ready`?g.properties:null,y=v?.changes.length??0,_=v!==null&&(v.changes.length>0||v.unparseable!==null),$e=g.status===`ready`?x&&b?.ok?De(b):h?Je:0:0,t[0]=Je,t[1]=h,t[2]=f,t[3]=g.after,t[4]=g.before,t[5]=g.properties,t[6]=g.status,t[7]=_,t[8]=v,t[9]=y,t[10]=b,t[11]=$e,t[12]=x):(_=t[7],v=t[8],y=t[9],b=t[10],$e=t[11],x=t[12]);let et=$e+(v===null?0:v.unparseable===null?Ze?Math.min(y,50):0:1),tt;t[13]!==h||t[14]!==x?(tt=function(e){let t=Ge.current;if(!t)return;let n=[...t.querySelectorAll(Ae),...x?Array.from(t.querySelectorAll(Te)):h?Ee(t):[]];if(n.length===0)return;let r=(e+n.length)%n.length;qe(r),n[r]?.scrollIntoView({block:`center`,behavior:`smooth`})},t[13]=h,t[14]=x,t[15]=tt):tt=t[15];let nt=tt,rt,it;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(rt=()=>()=>We.current?.abort(),it=[],t[16]=rt,t[17]=it):(rt=t[16],it=t[17]),(0,s.useEffect)(rt,it);let at=g.status===`ready`?`${f}:${g.diff}`:``,ot,st;t[18]===at?(ot=t[19],st=t[20]):(ot=()=>{let e=Ge.current;if(at===``||!e)return;qe(0),Ye(0),Xe(!1);let t=!1,n=null,r,i,ee=()=>{re.sync();let t=Ee(e);return Ye(t.length),Xe(!0),t},te=()=>{let n=ee();if(t)return;let r=e.querySelector(`[data-property-change]`)??e.querySelector(`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`)??n[0];if(!r)return;t=!0;let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollIntoView({block:`center`,behavior:i?`auto`:`smooth`})},ne=()=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{i!==void 0&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=requestAnimationFrame(te)})},120)},re=we(e,ne);n=new MutationObserver(ne),n.observe(e,{childList:!0,subtree:!0}),ne();let ie=setTimeout(()=>{ee(),n?.disconnect(),re.disconnect()},5e3);return()=>{n?.disconnect(),re.disconnect(),r!==void 0&&clearTimeout(r),i!==void 0&&cancelAnimationFrame(i),clearTimeout(ie)}},st=[at],t[18]=at,t[19]=ot,t[20]=st),(0,s.useEffect)(ot,st);let ct,lt;t[21]===p?(ct=t[22],lt=t[23]):(ct=()=>{let e=e=>{e.key===`Escape`&&(p||ne()||Ce())};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},lt=[p],t[21]=p,t[22]=ct,t[23]=lt),(0,s.useEffect)(ct,lt);let ut;t[24]!==o||t[25]!==l||t[26]!==u?(ut=async function(){Ue(!0);let e=new AbortController;We.current=e;let t=function(){e.signal.aborted||Ue(!1),We.current===e&&(We.current=null)},n;try{n=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:l,commitSha:u}),signal:e.signal})}catch(n){let r=n;!e.signal.aborted&&!(r instanceof DOMException&&r.name===`AbortError`)&&le.error(o({id:`NkXEFS`}),{duration:4e3}),t();return}if(e.signal.aborted){t();return}if(n.ok){t(),He(!1),Ce();return}let r=`HTTP ${n.status}`;try{let e=ue.safeParse(await n.json());e.success&&(r=e.data.title)}catch{}le.error(o({id:`uM6jnS`}),{description:r,duration:6e3}),t()},t[24]=o,t[25]=l,t[26]=u,t[27]=ut):ut=t[27];let S=ut,dt=g.status===`ready`&&(g.additions>0||g.deletions>0),C;t[28]===o?C=t[29]:(C=o({id:`b18t0_`}),t[28]=o,t[29]=C);let ft;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,c.jsx)(ge,{className:`size-4`}),t[30]=ft):ft=t[30];let w;t[31]===C?w=t[32]:(w=(0,c.jsx)(re,{asChild:!0,children:(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`timeline-diff-close`,"aria-label":C,onClick:Fe,children:ft})}),t[31]=C,t[32]=w);let T;t[33]===o?T=t[34]:(T=o({id:`b18t0_`}),t[33]=o,t[34]=T);let E;t[35]===T?E=t[36]:(E=(0,c.jsx)(ie,{side:`bottom`,children:T}),t[35]=T,t[36]=E);let D;t[37]!==w||t[38]!==E?(D=(0,c.jsxs)(ae,{children:[w,E]}),t[37]=w,t[38]=E,t[39]=D):D=t[39];let O;t[40]===l?O=t[41]:(O=(0,c.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,children:l}),t[40]=l,t[41]=O);let k;t[42]!==Re||t[43]!==ze?(k=(0,c.jsxs)(`div`,{className:`truncate text-xs text-muted-foreground`,children:[Re,` · `,ze]}),t[42]=Re,t[43]=ze,t[44]=k):k=t[44];let A;t[45]!==O||t[46]!==k?(A=(0,c.jsxs)(`div`,{className:`min-w-[8rem] flex-1`,children:[O,k]}),t[45]=O,t[46]=k,t[47]=A):A=t[47];let j;t[48]===y?j=t[49]:(j=y>0&&(0,c.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,"data-testid":`timeline-diff-property-stat`,children:(0,c.jsx)(i,{id:`UI0WPT`,values:{propertyCount:y}})}),t[48]=y,t[49]=j);let M;t[50]!==o||t[51]!==g.additions||t[52]!==g.deletions||t[53]!==g.status||t[54]!==dt?(M=dt&&g.status===`ready`&&(0,c.jsxs)(`span`,{role:`img`,className:`shrink-0 text-xs tabular-nums`,"data-testid":`timeline-diff-stat`,"aria-label":o({id:`8lwQlE`,values:{0:g.additions,1:g.deletions}}),children:[(0,c.jsxs)(`span`,{"aria-hidden":`true`,className:`text-emerald-600 dark:text-emerald-500`,children:[`+`,g.additions]}),` `,(0,c.jsxs)(`span`,{"aria-hidden":`true`,className:`text-red-600 dark:text-red-500`,children:[`−`,g.deletions]})]}),t[50]=o,t[51]=g.additions,t[52]=g.deletions,t[53]=g.status,t[54]=dt,t[55]=M):M=t[55];let pt;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(pt=e=>{(e===`rendered`||e===`source`)&&Ve(e)},t[56]=pt):pt=t[56];let N;t[57]===o?N=t[58]:(N=o({id:`ZW3mlR`}),t[57]=o,t[58]=N);let mt;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,c.jsx)(se,{value:`rendered`,className:`h-6 px-2 text-xs`,"data-testid":`timeline-diff-render-rendered`,children:(0,c.jsx)(i,{id:`4z_1j2`})}),t[59]=mt):mt=t[59];let ht;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,c.jsx)(se,{value:`source`,className:`h-6 px-2 text-xs`,"data-testid":`timeline-diff-render-source`,children:(0,c.jsx)(i,{id:`wdxz7K`})}),t[60]=ht):ht=t[60];let gt;t[61]!==f||t[62]!==N?(gt=(0,c.jsxs)(ce,{type:`single`,value:f,onValueChange:pt,"aria-label":N,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 rounded-md bg-muted p-0.5 dark:bg-background`,children:[mt,ht]}),t[61]=f,t[62]=N,t[63]=gt):gt=t[63];let P;t[64]!==o||t[65]!==et||t[66]!==Ke||t[67]!==nt?(P=et>1&&(0,c.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 rounded-md border border-border bg-muted/40 p-0.5 dark:bg-background`,children:[(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":o({id:`_azghp`}),"data-testid":`timeline-diff-prev`,onClick:()=>nt(Ke-1),children:(0,c.jsx)(oe,{className:`size-3.5`})}),(0,c.jsxs)(`span`,{className:`px-0.5 text-xs tabular-nums text-muted-foreground`,"aria-live":`polite`,children:[Ke+1,` / `,et]}),(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":o({id:`-bFGPF`}),"data-testid":`timeline-diff-next`,onClick:()=>nt(Ke+1),children:(0,c.jsx)(de,{className:`size-3.5`})})]}),t[64]=o,t[65]=et,t[66]=Ke,t[67]=nt,t[68]=P):P=t[68];let F;t[69]!==S||t[70]!==d?(F=()=>d>0?He(!0):S(),t[69]=S,t[70]=d,t[71]=F):F=t[71];let I;t[72]===m?I=t[73]:(I=m?(0,c.jsx)(fe,{"aria-hidden":`true`,className:`mr-1.5 size-3.5`}):(0,c.jsx)(he,{className:`mr-1.5 size-3.5`}),t[72]=m,t[73]=I);let _t;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,c.jsx)(i,{id:`yKu_3Y`}),t[74]=_t):_t=t[74];let L;t[75]!==m||t[76]!==F||t[77]!==I?(L=(0,c.jsxs)(a,{variant:`outline`,size:`sm`,className:`h-7 shrink-0`,"data-testid":`timeline-diff-restore`,disabled:m,onClick:F,children:[I,_t]}),t[75]=m,t[76]=F,t[77]=I,t[78]=L):L=t[78];let R;t[79]!==o||t[80]!==r?(R=o(r?{id:`6iDEWA`}:{id:`170Js2`}),t[79]=o,t[80]=r,t[81]=R):R=t[81];let vt=!r,z;t[82]===r?z=t[83]:(z=r?(0,c.jsx)(me,{className:`size-4`}):(0,c.jsx)(pe,{className:`size-4`}),t[82]=r,t[83]=z);let B;t[84]!==te||t[85]!==R||t[86]!==vt||t[87]!==z?(B=(0,c.jsx)(re,{asChild:!0,children:(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`timeline-diff-toggle-panel`,"aria-label":R,"aria-expanded":vt,onClick:te,children:z})}),t[84]=te,t[85]=R,t[86]=vt,t[87]=z,t[88]=B):B=t[88];let V;t[89]!==o||t[90]!==r?(V=o(r?{id:`6iDEWA`}:{id:`170Js2`}),t[89]=o,t[90]=r,t[91]=V):V=t[91];let H;t[92]===V?H=t[93]:(H=(0,c.jsx)(ie,{side:`bottom`,children:V}),t[92]=V,t[93]=H);let U;t[94]!==B||t[95]!==H?(U=(0,c.jsxs)(ae,{children:[B,H]}),t[94]=B,t[95]=H,t[96]=U):U=t[96];let W;t[97]!==j||t[98]!==M||t[99]!==gt||t[100]!==P||t[101]!==L||t[102]!==U?(W=(0,c.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center justify-end gap-2`,children:[j,M,gt,P,L,U]}),t[97]=j,t[98]=M,t[99]=gt,t[100]=P,t[101]=L,t[102]=U,t[103]=W):W=t[103];let G;t[104]!==D||t[105]!==A||t[106]!==W?(G=(0,c.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1.5 border-b border-border px-3 py-2`,children:[D,A,W]}),t[104]=D,t[105]=A,t[106]=W,t[107]=G):G=t[107];let K;t[108]===g.status?K=t[109]:(K=g.status===`loading`&&(0,c.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,c.jsx)(fe,{"aria-hidden":`true`,className:`size-3`}),(0,c.jsx)(i,{id:`38foVZ`})]}),t[108]=g.status,t[109]=K);let q;t[110]===g.status?q=t[111]:(q=g.status===`error`&&(0,c.jsx)(`p`,{className:`px-4 py-3 text-xs text-destructive`,children:(0,c.jsx)(i,{id:`vvWZnu`})}),t[110]=g.status,t[111]=q);let J;t[112]!==v||t[113]!==Ze||t[114]!==g.status?(J=g.status===`ready`&&v!==null&&(0,c.jsx)(Me,{delta:v,open:Ze,onOpenChange:e=>{Qe(e),qe(0)}}),t[112]=v,t[113]=Ze,t[114]=g.status,t[115]=J):J=t[115];let Y;t[116]!==l||t[117]!==_||t[118]!==f||t[119]!==b||t[120]!==g.after||t[121]!==g.before||t[122]!==g.diff||t[123]!==g.status||t[124]!==u?(Y=g.status===`ready`&&(f===`rendered`&&b?.ok?(0,c.jsx)(ke,{diff:b}):g.diff===``?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`p`,{className:`border-b border-border px-4 py-2 text-xs text-muted-foreground italic`,children:_?(0,c.jsx)(i,{id:`oCO0pe`}):(0,c.jsx)(i,{id:`3YWddZ`})}),(0,c.jsx)(`pre`,{className:`whitespace-pre-wrap px-4 py-3 font-mono text-xs text-foreground/90`,children:g.after})]}):(0,c.jsx)(s.Suspense,{fallback:(0,c.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,c.jsx)(fe,{"aria-hidden":`true`,className:`size-3`}),(0,c.jsx)(i,{id:`EDm3wJ`})]}),children:(0,c.jsx)(Pe,{before:g.before,after:g.after,cacheKey:`${l}@${u}`})})),t[116]=l,t[117]=_,t[118]=f,t[119]=b,t[120]=g.after,t[121]=g.before,t[122]=g.diff,t[123]=g.status,t[124]=u,t[125]=Y):Y=t[125];let X;t[126]!==K||t[127]!==q||t[128]!==J||t[129]!==Y?(X=(0,c.jsxs)(`div`,{ref:Ge,className:`min-h-0 flex-1 overflow-auto subtle-scrollbar`,children:[K,q,J,Y]}),t[126]=K,t[127]=q,t[128]=J,t[129]=Y,t[130]=X):X=t[130];let yt;t[131]===m?yt=t[132]:(yt=e=>{!e&&!m?He(!1):e&&He(!0)},t[131]=m,t[132]=yt);let bt;t[133]===o?bt=t[134]:(bt=o({id:`n3wx1q`}),t[133]=o,t[134]=bt);let xt;t[135]===bt?xt=t[136]:(xt=(0,c.jsx)(ve,{children:bt}),t[135]=bt,t[136]=xt);let Z;t[137]===d?Z=t[138]:(Z=(0,c.jsx)(i,{id:`nfPccR`,values:{laterEdits:d}}),t[137]=d,t[138]=Z);let St;t[139]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,c.jsx)(i,{id:`5ZbJFS`}),t[139]=St):St=t[139];let Ct;t[140]===Z?Ct=t[141]:(Ct=(0,c.jsxs)(_e,{children:[Z,` `,St]}),t[140]=Z,t[141]=Ct);let wt;t[142]!==xt||t[143]!==Ct?(wt=(0,c.jsxs)(xe,{children:[xt,Ct]}),t[142]=xt,t[143]=Ct,t[144]=wt):wt=t[144];let Tt;t[145]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=(0,c.jsx)(a,{variant:`outline`,"data-testid":`timeline-diff-restore-cancel`,onClick:()=>He(!1),children:(0,c.jsx)(i,{id:`dEgA5A`})}),t[145]=Tt):Tt=t[145];let Et;t[146]===S?Et=t[147]:(Et=()=>S(),t[146]=S,t[147]=Et);let Dt;t[148]===m?Dt=t[149]:(Dt=m?(0,c.jsx)(fe,{"aria-hidden":`true`,className:`mr-2 size-4`}):null,t[148]=m,t[149]=Dt);let Ot;t[150]===Symbol.for(`react.memo_cache_sentinel`)?(Ot=(0,c.jsx)(i,{id:`yKu_3Y`}),t[150]=Ot):Ot=t[150];let kt;t[151]!==m||t[152]!==Et||t[153]!==Dt?(kt=(0,c.jsxs)(be,{children:[Tt,(0,c.jsxs)(a,{variant:`destructive`,"data-testid":`timeline-diff-restore-confirm`,disabled:m,onClick:Et,children:[Dt,Ot]})]}),t[151]=m,t[152]=Et,t[153]=Dt,t[154]=kt):kt=t[154];let Q;t[155]!==wt||t[156]!==kt?(Q=(0,c.jsxs)(ye,{children:[wt,kt]}),t[155]=wt,t[156]=kt,t[157]=Q):Q=t[157];let $;t[158]!==p||t[159]!==yt||t[160]!==Q?($=(0,c.jsx)(Se,{open:p,onOpenChange:yt,children:Q}),t[158]=p,t[159]=yt,t[160]=Q,t[161]=$):$=t[161];let At;return t[162]!==G||t[163]!==X||t[164]!==$?(At=(0,c.jsxs)(`div`,{className:`absolute inset-0 z-20 flex flex-col bg-background`,"data-testid":`timeline-diff-pane`,children:[G,X,$]}),t[162]=G,t[163]=X,t[164]=$,t[165]=At):At=t[165],At}function Fe(){return Ce()}function Ie(){return new o(32)}export{l as TimelineDiffPane};
|
|
2
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as ee}from"./dist-Nvb76hAm.js";import{t as te}from"./compiler-runtime-BfE3aGVn.js";import{t as ne}from"./overlay-layers-CKMAjef3.js";import{i as re,n as ie,t as ae}from"./tooltip-DBqLYfio.js";import{c as oe}from"./select-Bu4Wm3Rf.js";import{n as se,t as ce}from"./toggle-group-B7p69Qfd.js";import{t as a}from"./button-DzgjsZzC.js";import{n as le}from"./dist-BGzUo_18.js";import"./schemas-api-BM3O7zA1.js";import{n as ue}from"./_envelope-Dwl6i2K9-DPqJ_Q4W.js";import{t as de}from"./chevron-down-CEv6N8LG.js";import{t as fe}from"./spinner-Bx8xD6f8.js";import{n as pe,t as me}from"./panel-right-open-BSU2gtLb.js";import{t as he}from"./undo-2-xEF_s_Io.js";import{t as ge}from"./x-DM2drskU.js";import{a as _e,c as ve,i as ye,o as be,s as xe,t as Se}from"./dialog-BJEjKJjL.js";import{t as Ce}from"./timeline-diff-store-BpioNUVS.js";import{t as o}from"./lru-string-cache-DY072Suk.js";import{a as we,c as Te,i as Ee,l as De,n as Oe,o as ke,r as Ae,s as je,u as Me}from"./use-timeline-entry-diff-3gupsEXJ.js";var Ne=te(),s=e(r(),1),c=n(),Pe=(0,s.lazy)(async()=>({default:(await t(()=>import(`./ActivityPanelDiffView-BYoZOgEt.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]),import.meta.url)).ActivityPanelDiffView}));function l(e){let t=(0,Ne.c)(166),{view:n,isPanelCollapsed:r,onTogglePanel:te}=e,{_:o}=ee(),{docName:l,sha:u,parentSha:Le,laterEdits:d,authorName:Re,relativeTime:ze}=n,[Be]=(0,s.useState)(Ie),[f,Ve]=(0,s.useState)(`rendered`),[p,He]=(0,s.useState)(!1),[m,Ue]=(0,s.useState)(!1),We=(0,s.useRef)(null),Ge=(0,s.useRef)(null),[Ke,qe]=(0,s.useState)(0),[Je,Ye]=(0,s.useState)(0),[h,Xe]=(0,s.useState)(!1),[Ze,Qe]=(0,s.useState)(!0),g=Oe(u,l,Be,`vs-parent`,Le),_,v,y,b,$e,x;t[0]!==Je||t[1]!==h||t[2]!==f||t[3]!==g.after||t[4]!==g.before||t[5]!==g.properties||t[6]!==g.status?(b=g.status===`ready`?je(g.before,g.after):null,x=f===`rendered`&&b?.ok===!0,v=g.status===`ready`?g.properties:null,y=v?.changes.length??0,_=v!==null&&(v.changes.length>0||v.unparseable!==null),$e=g.status===`ready`?x&&b?.ok?De(b):h?Je:0:0,t[0]=Je,t[1]=h,t[2]=f,t[3]=g.after,t[4]=g.before,t[5]=g.properties,t[6]=g.status,t[7]=_,t[8]=v,t[9]=y,t[10]=b,t[11]=$e,t[12]=x):(_=t[7],v=t[8],y=t[9],b=t[10],$e=t[11],x=t[12]);let et=$e+(v===null?0:v.unparseable===null?Ze?Math.min(y,50):0:1),tt;t[13]!==h||t[14]!==x?(tt=function(e){let t=Ge.current;if(!t)return;let n=[...t.querySelectorAll(Ae),...x?Array.from(t.querySelectorAll(Te)):h?Ee(t):[]];if(n.length===0)return;let r=(e+n.length)%n.length;qe(r),n[r]?.scrollIntoView({block:`center`,behavior:`smooth`})},t[13]=h,t[14]=x,t[15]=tt):tt=t[15];let nt=tt,rt,it;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(rt=()=>()=>We.current?.abort(),it=[],t[16]=rt,t[17]=it):(rt=t[16],it=t[17]),(0,s.useEffect)(rt,it);let at=g.status===`ready`?`${f}:${g.diff}`:``,ot,st;t[18]===at?(ot=t[19],st=t[20]):(ot=()=>{let e=Ge.current;if(at===``||!e)return;qe(0),Ye(0),Xe(!1);let t=!1,n=null,r,i,ee=()=>{re.sync();let t=Ee(e);return Ye(t.length),Xe(!0),t},te=()=>{let n=ee();if(t)return;let r=e.querySelector(`[data-property-change]`)??e.querySelector(`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`)??n[0];if(!r)return;t=!0;let i=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;r.scrollIntoView({block:`center`,behavior:i?`auto`:`smooth`})},ne=()=>{r!==void 0&&clearTimeout(r),r=setTimeout(()=>{i!==void 0&&cancelAnimationFrame(i),i=requestAnimationFrame(()=>{i=requestAnimationFrame(te)})},120)},re=we(e,ne);n=new MutationObserver(ne),n.observe(e,{childList:!0,subtree:!0}),ne();let ie=setTimeout(()=>{ee(),n?.disconnect(),re.disconnect()},5e3);return()=>{n?.disconnect(),re.disconnect(),r!==void 0&&clearTimeout(r),i!==void 0&&cancelAnimationFrame(i),clearTimeout(ie)}},st=[at],t[18]=at,t[19]=ot,t[20]=st),(0,s.useEffect)(ot,st);let ct,lt;t[21]===p?(ct=t[22],lt=t[23]):(ct=()=>{let e=e=>{e.key===`Escape`&&(p||ne()||Ce())};return window.addEventListener(`keydown`,e,{capture:!0}),()=>window.removeEventListener(`keydown`,e,{capture:!0})},lt=[p],t[21]=p,t[22]=ct,t[23]=lt),(0,s.useEffect)(ct,lt);let ut;t[24]!==o||t[25]!==l||t[26]!==u?(ut=async function(){Ue(!0);let e=new AbortController;We.current=e;let t=function(){e.signal.aborted||Ue(!1),We.current===e&&(We.current=null)},n;try{n=await fetch(`/api/rollback`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({docName:l,commitSha:u}),signal:e.signal})}catch(n){let r=n;!e.signal.aborted&&!(r instanceof DOMException&&r.name===`AbortError`)&&le.error(o({id:`NkXEFS`}),{duration:4e3}),t();return}if(e.signal.aborted){t();return}if(n.ok){t(),He(!1),Ce();return}let r=`HTTP ${n.status}`;try{let e=ue.safeParse(await n.json());e.success&&(r=e.data.title)}catch{}le.error(o({id:`uM6jnS`}),{description:r,duration:6e3}),t()},t[24]=o,t[25]=l,t[26]=u,t[27]=ut):ut=t[27];let S=ut,dt=g.status===`ready`&&(g.additions>0||g.deletions>0),C;t[28]===o?C=t[29]:(C=o({id:`b18t0_`}),t[28]=o,t[29]=C);let ft;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(ft=(0,c.jsx)(ge,{className:`size-4`}),t[30]=ft):ft=t[30];let w;t[31]===C?w=t[32]:(w=(0,c.jsx)(re,{asChild:!0,children:(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`timeline-diff-close`,"aria-label":C,onClick:Fe,children:ft})}),t[31]=C,t[32]=w);let T;t[33]===o?T=t[34]:(T=o({id:`b18t0_`}),t[33]=o,t[34]=T);let E;t[35]===T?E=t[36]:(E=(0,c.jsx)(ie,{side:`bottom`,children:T}),t[35]=T,t[36]=E);let D;t[37]!==w||t[38]!==E?(D=(0,c.jsxs)(ae,{children:[w,E]}),t[37]=w,t[38]=E,t[39]=D):D=t[39];let O;t[40]===l?O=t[41]:(O=(0,c.jsx)(`div`,{className:`truncate text-sm font-medium text-foreground`,children:l}),t[40]=l,t[41]=O);let k;t[42]!==Re||t[43]!==ze?(k=(0,c.jsxs)(`div`,{className:`truncate text-xs text-muted-foreground`,children:[Re,` · `,ze]}),t[42]=Re,t[43]=ze,t[44]=k):k=t[44];let A;t[45]!==O||t[46]!==k?(A=(0,c.jsxs)(`div`,{className:`min-w-[8rem] flex-1`,children:[O,k]}),t[45]=O,t[46]=k,t[47]=A):A=t[47];let j;t[48]===y?j=t[49]:(j=y>0&&(0,c.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground tabular-nums`,"data-testid":`timeline-diff-property-stat`,children:(0,c.jsx)(i,{id:`UI0WPT`,values:{propertyCount:y}})}),t[48]=y,t[49]=j);let M;t[50]!==o||t[51]!==g.additions||t[52]!==g.deletions||t[53]!==g.status||t[54]!==dt?(M=dt&&g.status===`ready`&&(0,c.jsxs)(`span`,{role:`img`,className:`shrink-0 text-xs tabular-nums`,"data-testid":`timeline-diff-stat`,"aria-label":o({id:`8lwQlE`,values:{0:g.additions,1:g.deletions}}),children:[(0,c.jsxs)(`span`,{"aria-hidden":`true`,className:`text-emerald-600 dark:text-emerald-500`,children:[`+`,g.additions]}),` `,(0,c.jsxs)(`span`,{"aria-hidden":`true`,className:`text-red-600 dark:text-red-500`,children:[`−`,g.deletions]})]}),t[50]=o,t[51]=g.additions,t[52]=g.deletions,t[53]=g.status,t[54]=dt,t[55]=M):M=t[55];let pt;t[56]===Symbol.for(`react.memo_cache_sentinel`)?(pt=e=>{(e===`rendered`||e===`source`)&&Ve(e)},t[56]=pt):pt=t[56];let N;t[57]===o?N=t[58]:(N=o({id:`ZW3mlR`}),t[57]=o,t[58]=N);let mt;t[59]===Symbol.for(`react.memo_cache_sentinel`)?(mt=(0,c.jsx)(se,{value:`rendered`,className:`h-6 px-2 text-xs`,"data-testid":`timeline-diff-render-rendered`,children:(0,c.jsx)(i,{id:`4z_1j2`})}),t[59]=mt):mt=t[59];let ht;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ht=(0,c.jsx)(se,{value:`source`,className:`h-6 px-2 text-xs`,"data-testid":`timeline-diff-render-source`,children:(0,c.jsx)(i,{id:`wdxz7K`})}),t[60]=ht):ht=t[60];let gt;t[61]!==f||t[62]!==N?(gt=(0,c.jsxs)(ce,{type:`single`,value:f,onValueChange:pt,"aria-label":N,variant:`segmented`,size:`sm`,spacing:1,className:`shrink-0 rounded-md bg-muted p-0.5 dark:bg-background`,children:[mt,ht]}),t[61]=f,t[62]=N,t[63]=gt):gt=t[63];let P;t[64]!==o||t[65]!==et||t[66]!==Ke||t[67]!==nt?(P=et>1&&(0,c.jsxs)(`div`,{className:`flex shrink-0 items-center gap-0.5 rounded-md border border-border bg-muted/40 p-0.5 dark:bg-background`,children:[(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":o({id:`_azghp`}),"data-testid":`timeline-diff-prev`,onClick:()=>nt(Ke-1),children:(0,c.jsx)(oe,{className:`size-3.5`})}),(0,c.jsxs)(`span`,{className:`px-0.5 text-xs tabular-nums text-muted-foreground`,"aria-live":`polite`,children:[Ke+1,` / `,et]}),(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-6`,"aria-label":o({id:`-bFGPF`}),"data-testid":`timeline-diff-next`,onClick:()=>nt(Ke+1),children:(0,c.jsx)(de,{className:`size-3.5`})})]}),t[64]=o,t[65]=et,t[66]=Ke,t[67]=nt,t[68]=P):P=t[68];let F;t[69]!==S||t[70]!==d?(F=()=>d>0?He(!0):S(),t[69]=S,t[70]=d,t[71]=F):F=t[71];let I;t[72]===m?I=t[73]:(I=m?(0,c.jsx)(fe,{"aria-hidden":`true`,className:`mr-1.5 size-3.5`}):(0,c.jsx)(he,{className:`mr-1.5 size-3.5`}),t[72]=m,t[73]=I);let _t;t[74]===Symbol.for(`react.memo_cache_sentinel`)?(_t=(0,c.jsx)(i,{id:`yKu_3Y`}),t[74]=_t):_t=t[74];let L;t[75]!==m||t[76]!==F||t[77]!==I?(L=(0,c.jsxs)(a,{variant:`outline`,size:`sm`,className:`h-7 shrink-0`,"data-testid":`timeline-diff-restore`,disabled:m,onClick:F,children:[I,_t]}),t[75]=m,t[76]=F,t[77]=I,t[78]=L):L=t[78];let R;t[79]!==o||t[80]!==r?(R=o(r?{id:`6iDEWA`}:{id:`170Js2`}),t[79]=o,t[80]=r,t[81]=R):R=t[81];let vt=!r,z;t[82]===r?z=t[83]:(z=r?(0,c.jsx)(me,{className:`size-4`}):(0,c.jsx)(pe,{className:`size-4`}),t[82]=r,t[83]=z);let B;t[84]!==te||t[85]!==R||t[86]!==vt||t[87]!==z?(B=(0,c.jsx)(re,{asChild:!0,children:(0,c.jsx)(a,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"data-testid":`timeline-diff-toggle-panel`,"aria-label":R,"aria-expanded":vt,onClick:te,children:z})}),t[84]=te,t[85]=R,t[86]=vt,t[87]=z,t[88]=B):B=t[88];let V;t[89]!==o||t[90]!==r?(V=o(r?{id:`6iDEWA`}:{id:`170Js2`}),t[89]=o,t[90]=r,t[91]=V):V=t[91];let H;t[92]===V?H=t[93]:(H=(0,c.jsx)(ie,{side:`bottom`,children:V}),t[92]=V,t[93]=H);let U;t[94]!==B||t[95]!==H?(U=(0,c.jsxs)(ae,{children:[B,H]}),t[94]=B,t[95]=H,t[96]=U):U=t[96];let W;t[97]!==j||t[98]!==M||t[99]!==gt||t[100]!==P||t[101]!==L||t[102]!==U?(W=(0,c.jsxs)(`div`,{className:`ml-auto flex flex-wrap items-center justify-end gap-2`,children:[j,M,gt,P,L,U]}),t[97]=j,t[98]=M,t[99]=gt,t[100]=P,t[101]=L,t[102]=U,t[103]=W):W=t[103];let G;t[104]!==D||t[105]!==A||t[106]!==W?(G=(0,c.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1.5 border-b border-border px-3 py-2`,children:[D,A,W]}),t[104]=D,t[105]=A,t[106]=W,t[107]=G):G=t[107];let K;t[108]===g.status?K=t[109]:(K=g.status===`loading`&&(0,c.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,c.jsx)(fe,{"aria-hidden":`true`,className:`size-3`}),(0,c.jsx)(i,{id:`38foVZ`})]}),t[108]=g.status,t[109]=K);let q;t[110]===g.status?q=t[111]:(q=g.status===`error`&&(0,c.jsx)(`p`,{className:`px-4 py-3 text-xs text-destructive`,children:(0,c.jsx)(i,{id:`vvWZnu`})}),t[110]=g.status,t[111]=q);let J;t[112]!==v||t[113]!==Ze||t[114]!==g.status?(J=g.status===`ready`&&v!==null&&(0,c.jsx)(Me,{delta:v,open:Ze,onOpenChange:e=>{Qe(e),qe(0)}}),t[112]=v,t[113]=Ze,t[114]=g.status,t[115]=J):J=t[115];let Y;t[116]!==l||t[117]!==_||t[118]!==f||t[119]!==b||t[120]!==g.after||t[121]!==g.before||t[122]!==g.diff||t[123]!==g.status||t[124]!==u?(Y=g.status===`ready`&&(f===`rendered`&&b?.ok?(0,c.jsx)(ke,{diff:b}):g.diff===``?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(`p`,{className:`border-b border-border px-4 py-2 text-xs text-muted-foreground italic`,children:_?(0,c.jsx)(i,{id:`oCO0pe`}):(0,c.jsx)(i,{id:`3YWddZ`})}),(0,c.jsx)(`pre`,{className:`whitespace-pre-wrap px-4 py-3 font-mono text-xs text-foreground/90`,children:g.after})]}):(0,c.jsx)(s.Suspense,{fallback:(0,c.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 text-xs text-muted-foreground`,children:[(0,c.jsx)(fe,{"aria-hidden":`true`,className:`size-3`}),(0,c.jsx)(i,{id:`EDm3wJ`})]}),children:(0,c.jsx)(Pe,{before:g.before,after:g.after,cacheKey:`${l}@${u}`})})),t[116]=l,t[117]=_,t[118]=f,t[119]=b,t[120]=g.after,t[121]=g.before,t[122]=g.diff,t[123]=g.status,t[124]=u,t[125]=Y):Y=t[125];let X;t[126]!==K||t[127]!==q||t[128]!==J||t[129]!==Y?(X=(0,c.jsxs)(`div`,{ref:Ge,className:`min-h-0 flex-1 overflow-auto subtle-scrollbar`,children:[K,q,J,Y]}),t[126]=K,t[127]=q,t[128]=J,t[129]=Y,t[130]=X):X=t[130];let yt;t[131]===m?yt=t[132]:(yt=e=>{!e&&!m?He(!1):e&&He(!0)},t[131]=m,t[132]=yt);let bt;t[133]===o?bt=t[134]:(bt=o({id:`n3wx1q`}),t[133]=o,t[134]=bt);let xt;t[135]===bt?xt=t[136]:(xt=(0,c.jsx)(ve,{children:bt}),t[135]=bt,t[136]=xt);let Z;t[137]===d?Z=t[138]:(Z=(0,c.jsx)(i,{id:`nfPccR`,values:{laterEdits:d}}),t[137]=d,t[138]=Z);let St;t[139]===Symbol.for(`react.memo_cache_sentinel`)?(St=(0,c.jsx)(i,{id:`5ZbJFS`}),t[139]=St):St=t[139];let Ct;t[140]===Z?Ct=t[141]:(Ct=(0,c.jsxs)(_e,{children:[Z,` `,St]}),t[140]=Z,t[141]=Ct);let wt;t[142]!==xt||t[143]!==Ct?(wt=(0,c.jsxs)(xe,{children:[xt,Ct]}),t[142]=xt,t[143]=Ct,t[144]=wt):wt=t[144];let Tt;t[145]===Symbol.for(`react.memo_cache_sentinel`)?(Tt=(0,c.jsx)(a,{variant:`outline`,"data-testid":`timeline-diff-restore-cancel`,onClick:()=>He(!1),children:(0,c.jsx)(i,{id:`dEgA5A`})}),t[145]=Tt):Tt=t[145];let Et;t[146]===S?Et=t[147]:(Et=()=>S(),t[146]=S,t[147]=Et);let Dt;t[148]===m?Dt=t[149]:(Dt=m?(0,c.jsx)(fe,{"aria-hidden":`true`,className:`mr-2 size-4`}):null,t[148]=m,t[149]=Dt);let Ot;t[150]===Symbol.for(`react.memo_cache_sentinel`)?(Ot=(0,c.jsx)(i,{id:`yKu_3Y`}),t[150]=Ot):Ot=t[150];let kt;t[151]!==m||t[152]!==Et||t[153]!==Dt?(kt=(0,c.jsxs)(be,{children:[Tt,(0,c.jsxs)(a,{variant:`destructive`,"data-testid":`timeline-diff-restore-confirm`,disabled:m,onClick:Et,children:[Dt,Ot]})]}),t[151]=m,t[152]=Et,t[153]=Dt,t[154]=kt):kt=t[154];let Q;t[155]!==wt||t[156]!==kt?(Q=(0,c.jsxs)(ye,{children:[wt,kt]}),t[155]=wt,t[156]=kt,t[157]=Q):Q=t[157];let $;t[158]!==p||t[159]!==yt||t[160]!==Q?($=(0,c.jsx)(Se,{open:p,onOpenChange:yt,children:Q}),t[158]=p,t[159]=yt,t[160]=Q,t[161]=$):$=t[161];let At;return t[162]!==G||t[163]!==X||t[164]!==$?(At=(0,c.jsxs)(`div`,{className:`absolute inset-0 z-20 flex flex-col bg-background`,"data-testid":`timeline-diff-pane`,children:[G,X,$]}),t[162]=G,t[163]=X,t[164]=$,t[165]=At):At=t[165],At}function Fe(){return Ce()}function Ie(){return new o(32)}export{l as TimelineDiffPane};
|
|
@@ -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-BRpsTDMH.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-DhAo-666.js";import{r as w}from"./schemas-api-C4CP1G39.js";import{a as T,c as E,n as D,r as O,s as k}from"./constants-editors-05BNhhVl.js";import{b as A}from"./handoff-ClTYrgLm.js";import{c as j,d as M,f as N,i as P,m as F,n as I,r as L,t as R,u as ee}from"./agent-registry--47SG0kt.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=F(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=F(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)&&!P(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&&P(t.state)}),t[2]=n,t[3]=_,t[4]=N):N=t[4];let F=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=F||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]!==F||t[114]!==W||t[115]!==C||t[116]!==Z?(Fe=C?(0,Q.jsx)(r,{id:`uF9ruK`}):Z?(0,Q.jsx)(r,{id:`dGcsnU`}):F?(0,Q.jsx)(r,{id:`inJhKB`}):W?(0,Q.jsx)(r,{id:`t_YqKh`}):(0,Q.jsx)(r,{id:`y3aU20`}),t[113]=F,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-BRpsTDMH.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-DhAo-666.js";import{r as w}from"./schemas-api-BM3O7zA1.js";import{a as T,c as E,n as D,r as O,s as k}from"./constants-editors-05BNhhVl.js";import{b as A}from"./handoff-ClTYrgLm.js";import{c as j,d as M,f as N,i as P,m as F,n as I,r as L,t as R,u as ee}from"./agent-registry-3ko3YkCm.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=F(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=F(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)&&!P(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&&P(t.state)}),t[2]=n,t[3]=_,t[4]=N):N=t[4];let F=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=F||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]!==F||t[114]!==W||t[115]!==C||t[116]!==Z?(Fe=C?(0,Q.jsx)(r,{id:`uF9ruK`}):Z?(0,Q.jsx)(r,{id:`dGcsnU`}):F?(0,Q.jsx)(r,{id:`inJhKB`}):W?(0,Q.jsx)(r,{id:`t_YqKh`}):(0,Q.jsx)(r,{id:`y3aU20`}),t[113]=F,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{Bt as te,Gt as ne,Ht as re,Rt as ie,Ut as ae,Vt as oe,Wt as se,zt as ce}from"./schemas-api-C4CP1G39.js";import{i as d,t as f}from"./constants-editors-05BNhhVl.js";import{b as le}from"./handoff-ClTYrgLm.js";var p=[...f,`gemini`],m=c(p);function h(e){return p.includes(e)}var ue=c([`acp`,`terminal`,`external`]),de=c([...le,`gemini`]),fe=c([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),g=c([`mcp`,`skill`]),_=[`project`,`user`,`session`],v=c(_),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 x(e){return e}function he(e){return e}var ge=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],S=x(`central-skill-store`);function C(e,t){return x(`${e}:${t}`)}function _e(e){if(e===S)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!ge.includes(n)||!f.includes(r)?null:{kind:n,editor:r}}var ve=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function w(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:ve(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 T(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 E=(e,t,n,r)=>b({agent:e,piece:t,scope:n,kind:r}),D=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),O=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),k=(...e)=>({mode:`probeable`,strictness:e}),ye=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),A=(e,t)=>({id:he(e),...t===void 0?{}:{params:t}}),be=(e,t)=>{let n=oe.find(t=>t===e);return n===void 0?void 0:A(`followup.${n}`,{agent:t})},j=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),M=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},xe=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function N(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function P(e){let{appBrandName:t,tagline:n,...r}=e;return{...r,...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var F=(e,t)=>({kind:`observation`,ref:e,note:t}),I={observedAt:`2026-07-02`},L={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 R(e){return w({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:C(`editor-user-config`,e.agent),probe:k(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:A(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function z(e){return w({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:C(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:k(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:A(`guidance.mcp.project-config`,{agent:e.agent}),followup:be(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function B(e){return w({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:C(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:k(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:A(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function V(e){return w({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:C(`editor-user-skill-root`,e.agent),probe:k(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:A(`guidance.skill.user`,{agent:e.agent})})}function H(e){return w({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:ye(`session-scoped`),attestation:M([j(L.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:A(`guidance.mcp.session-injection`,{agent:e})})}var U={claude:T({id:`claude`,setupDocSlug:d.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[R({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:M([j(L.cliEditors,`user-global MCP config target`)])}),z({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:M([j(L.cliEditors),j(L.coreEditors)]),troubleshooting:A(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),B({agent:`claude`,prerequisites:[E(`claude`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)])}),V({agent:`claude`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`claude`)],modes:{external:{requirements:[D([E(`claude`,`mcp`,`user`,`config-entry`),E(`claude`,`mcp`,`project`,`config-entry`)]),O([E(`claude`,`skill`,`project`,`skill-bundle-copy`),E(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`claude`,`mcp`,`user`,`config-entry`),E(`claude`,`mcp`,`project`,`config-entry`)]),O([E(`claude`,`skill`,`project`,`skill-bundle-copy`),E(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`claude`,`mcp`,`session`,`session-injection`),E(`claude`,`mcp`,`user`,`config-entry`),E(`claude`,`mcp`,`project`,`config-entry`)]),O([E(`claude`,`skill`,`project`,`skill-bundle-copy`),E(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:M([j(L.threadManager,`the injection-skip probe reads the managed entry for this editor`),F(`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.`)],I),verifiedPosture:`asks`}),external:P({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":T({id:`claude-desktop`,setupDocSlug:d[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[R({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:A(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[D([E(`claude-desktop`,`mcp`,`user`,`config-entry`)]),O([])]}},external:P({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:T({id:`cursor`,setupDocSlug:d.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[R({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors)])}),z({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors),j(L.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:A(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),B({agent:`cursor`,prerequisites:[E(`cursor`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)])}),V({agent:`cursor`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`cursor`)],modes:{external:{requirements:[D([E(`cursor`,`mcp`,`user`,`config-entry`),E(`cursor`,`mcp`,`project`,`config-entry`)]),O([E(`cursor`,`skill`,`project`,`skill-bundle-copy`),E(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`cursor`,`mcp`,`user`,`config-entry`),E(`cursor`,`mcp`,`project`,`config-entry`)]),O([E(`cursor`,`skill`,`project`,`skill-bundle-copy`),E(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`cursor`,`mcp`,`session`,`session-injection`)]),O([E(`cursor`,`skill`,`project`,`skill-bundle-copy`),E(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:M([F(`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.`),j(L.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:P({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:T({id:`codex`,setupDocSlug:d.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[R({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:M([j(L.cliEditors,`TOML user-global config target`)])}),z({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:xe([j(L.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:[A(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),A(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),B({agent:`codex`,prerequisites:[E(`codex`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)]),troubleshooting:A(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),V({agent:`codex`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`codex`)],modes:{external:{requirements:[D([E(`codex`,`mcp`,`user`,`config-entry`),E(`codex`,`mcp`,`project`,`config-entry`)]),O([E(`codex`,`skill`,`project`,`skill-bundle-copy`),E(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`codex`,`mcp`,`user`,`config-entry`),E(`codex`,`mcp`,`project`,`config-entry`)]),O([E(`codex`,`skill`,`project`,`skill-bundle-copy`),E(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`codex`,`mcp`,`session`,`session-injection`),E(`codex`,`mcp`,`user`,`config-entry`),E(`codex`,`mcp`,`project`,`config-entry`)]),O([E(`codex`,`skill`,`project`,`skill-bundle-copy`),E(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:M([j(L.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),F(`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.`)],I),verifiedPosture:`self-managed`}),external:P({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:T({id:`copilot`,setupDocSlug:d.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[R({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors)])}),z({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:M([{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`},j(L.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:A(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),B({agent:`copilot`,prerequisites:[E(`copilot`,`mcp`,`project`,`config-entry`),E(`copilot`,`mcp`,`user`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.writeProjectSkill)])}),V({agent:`copilot`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`copilot`)],modes:{external:{requirements:[D([E(`copilot`,`mcp`,`user`,`config-entry`),E(`copilot`,`mcp`,`project`,`config-entry`)]),O([E(`copilot`,`skill`,`project`,`skill-bundle-copy`),E(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`copilot`,`mcp`,`user`,`config-entry`),E(`copilot`,`mcp`,`project`,`config-entry`)]),O([E(`copilot`,`skill`,`project`,`skill-bundle-copy`),E(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`copilot`,`mcp`,`session`,`session-injection`)]),O([E(`copilot`,`skill`,`project`,`skill-bundle-copy`),E(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[F(`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:P({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:T({id:`opencode`,setupDocSlug:d.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[R({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:M([j(L.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),z({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:M([j(L.cliEditors,`the one project config that is not under a dotdir`)])}),B({agent:`opencode`,prerequisites:[E(`opencode`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)])}),V({agent:`opencode`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`opencode`)],modes:{external:{requirements:[D([E(`opencode`,`mcp`,`user`,`config-entry`),E(`opencode`,`mcp`,`project`,`config-entry`)]),O([E(`opencode`,`skill`,`project`,`skill-bundle-copy`),E(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`opencode`,`mcp`,`user`,`config-entry`),E(`opencode`,`mcp`,`project`,`config-entry`)]),O([E(`opencode`,`skill`,`project`,`skill-bundle-copy`),E(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`opencode`,`mcp`,`session`,`session-injection`),E(`opencode`,`mcp`,`user`,`config-entry`),E(`opencode`,`mcp`,`project`,`config-entry`)]),O([E(`opencode`,`skill`,`project`,`skill-bundle-copy`),E(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:M([j(L.cliEditors,`the managed MCP entry OK writes into the opencode config`),F(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],I),verifiedPosture:null}),external:P({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:T({id:`openclaw`,setupDocSlug:d.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[R({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),w({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:S,probe:k(`reclaim-permissive`),attestation:M([j(L.coreEditors),j(L.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:A(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:A(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[D([E(`openclaw`,`mcp`,`user`,`config-entry`)]),O([E(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[D([E(`openclaw`,`mcp`,`user`,`config-entry`)]),O([E(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:P({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:T({id:`pi`,setupDocSlug:d.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[w({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:C(`editor-project-config`,`pi`),probe:k(`reclaim-permissive`,`injection-functional`),attestation:M([j(L.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),j(L.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:A(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:A(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),B({agent:`pi`,prerequisites:[E(`pi`,`mcp`,`project`,`managed-file`)],attestation:M([j(L.coreEditors),j(L.writeProjectSkill)]),troubleshooting:A(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),V({agent:`pi`,attestation:M([j(L.coreEditors,`the agent home nests one level below the dotdir`),j(L.skillInstall)])})],modes:{external:{requirements:[D([E(`pi`,`mcp`,`project`,`managed-file`)]),O([E(`pi`,`skill`,`project`,`skill-bundle-copy`),E(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`pi`,`mcp`,`project`,`managed-file`)]),O([E(`pi`,`skill`,`project`,`skill-bundle-copy`),E(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`pi`,`mcp`,`project`,`managed-file`)]),O([E(`pi`,`skill`,`project`,`skill-bundle-copy`),E(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:M([F(`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."),j(L.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:P({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:T({id:`antigravity`,setupDocSlug:d.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[R({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),V({agent:`antigravity`,attestation:M([j(L.coreEditors),j(L.skillInstall)])})],modes:{external:{requirements:[D([E(`antigravity`,`mcp`,`user`,`config-entry`)]),O([E(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`antigravity`,`mcp`,`user`,`config-entry`)]),O([E(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:P({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":T({id:`lm-studio`,setupDocSlug:d[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[R({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:M([j(L.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`},j(L.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:A(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[D([E(`lm-studio`,`mcp`,`user`,`config-entry`)]),O([])]}}}),hermes:T({id:`hermes`,setupDocSlug:d.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[R({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[D([E(`hermes`,`mcp`,`user`,`config-entry`)]),O([])]},terminal:{requirements:[D([E(`hermes`,`mcp`,`user`,`config-entry`)]),O([])]}},external:P({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:T({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[H(`gemini`)],modes:{acp:{requirements:[D([E(`gemini`,`mcp`,`session`,`session-injection`)]),O([])]}},acp:N({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:M([j(L.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],I),verifiedPosture:null})})};function Se(e){return U[e]}var Ce=Object.values(U).flatMap(e=>e.satisfiers),we=new Map(Ce.map(e=>[e.id,e]));function Te(e){return we.get(e)}var W=Object.values(U).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));W.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var Ee=Object.fromEntries(W.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(W.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var De=Object.fromEntries(W.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),Oe=Object.values(U).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),ke=Oe.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,tagline:a})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,...a===void 0?{}:{tagline:a}})),Ae=new Set(Oe.filter(e=>e.visible).map(e=>e.targetId)),je=ke.filter(e=>Ae.has(e.id)),Me=f.filter(e=>U[e].offersConnectionRow),Ne=new Map(Object.values(U).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function Pe(e){return Ne.get(e)}var Fe=new Map(Object.values(U).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function Ie(e){return Fe.get(e)}Object.fromEntries(Object.values(U).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(ie);var Le=[{id:`mcp-preapproval`,piece:`mcp`,scope:`project`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!1},{id:`tool-autoapprove`,piece:`mcp`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!0}];Le.map(e=>e.id);var G={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 Re={acp:{unprobed:`count-unverified`},terminal:{unprobed:`count-unverified`},external:{unprobed:`not-count`}};c([`acp-catalog-supported`,`harness-cli-on-path`,`os-scheme-handler`]);var ze={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 K(e){return typeof e==`object`&&!!e}function q(e,t){if(!K(e))return;let{satisfiers:n}=e;if(!K(n))return;let r=n[t];if(!K(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`&&h(e)):void 0;return{state:i,...s===void 0?{}:{strictness:s},...c===void 0||c.length===0?{}:{sharedWith:c}}}function Be(e,t){if(!K(e))return!1;let{detected:n}=e;return Array.isArray(n)&&n.includes(t)}function J(e,t){return e.probe.mode===`unprobeable`?`unprobeable`:q(t,e.id)?.state??`unprobed`}function Y(e){return ne(e)?G[e]:G.unprobed}function Ve(e,t){let n=e.filter(e=>{let n=Te(e);return n===void 0?!0:!Y(J(n,t)).counts});return n.length===e.length?n:[]}function He(e){return Y(e).exception===`warning`}function Ue(e){return e.state===`foreign`?`foreign`:e.state===`structural-na`?`structural-na`:e.installability===`not-installable`?`not-installable`:e.agentFolded?`agent-undetected`:null}function We(e,t){let n=t?.probed===!0?Be(t,e.id):null;return{detected:n,folded:e.offerOnlyWhenDetected&&n===!1}}function Ge(e,t){return(q(t,e.id)?.sharedWith??[]).filter(t=>t!==e.agent)}var Ke=_.filter(e=>e!==`session`);function qe(e){return te.includes(e)}function Je(e,t,n){let r=[];for(let i of e.satisfiers){if(!qe(i.kind))continue;let a=J(i,t),o=t?.satisfiers?.[i.id]?.path,s=Y(a),c=Ve(i.prerequisites,t),l=Ue({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:Ge(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 Ye(e){let t=[];for(let n of Ke){let r=e.filter(e=>e.scope===n);r.length!==0&&t.push({scope:n,cells:r})}return t}function Xe(e,t,n){let{detected:r,folded:i}=We(e,n),a=Je(e,t,i);return{agentId:e.id,detected:r,folded:i,setupDocSlug:e.setupDocSlug,scopes:Ye(a)}}function Ze(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&h(e)):p}function Qe(e={}){let{agentIds:t,probes:n,detection:r}=e;return{rows:Ze(t).map(e=>U[e]).filter(e=>e!==void 0).map(e=>Xe(e,n,r))}}var X={agent:m},$e={"followup.enable-manually":{params:e(X)},"guidance.mcp.user-config":{params:e(X)},"guidance.mcp.project-config":{params:e(X)},"guidance.mcp.session-injection":{params:e(X)},"guidance.mcp.managed-file":{params:e(X)},"guidance.skill.project":{params:e(X)},"guidance.skill.user":{params:e(X)},"guidance.skill.central-store":{params:e(X)},"troubleshooting.claude.project-entry-not-approved":{params:e(X)},"troubleshooting.claude-desktop.per-tool-approval":{params:e(X)},"troubleshooting.cursor.project-entry-not-loaded":{params:e({...X,server:u().optional()})},"troubleshooting.codex.desktop-project-config":{params:e({...X,honoredByDesktop:t()})},"troubleshooting.codex.folder-trust":{params:e(X)},"troubleshooting.copilot.shared-workspace-config":{params:e({...X,sourceAgent:m})},"troubleshooting.openclaw.central-store-missing":{params:e(X)},"troubleshooting.pi.folder-trust":{params:e(X)},"troubleshooting.lm-studio.config-path-mismatch":{params:e(X)}};Object.keys($e).sort(),Ce.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 et={verified:3,unverifiable:2,unverified:1};function tt(e,t){let n=ze[e],r=typeof t==`boolean`?t:null;return{signal:n.signal,resolved:r,show:r??n.unresolved===`show`}}function nt(e,t,n){let r=Te(e);if(r===void 0)return{id:e,state:`absent`,counts:!1,confidence:`unverified`,exception:G.absent.exception,consentClass:`none`,troubleshooting:[]};let i=J(r,n),a=!ne(i)||i===`unprobed`,o=Re[t].unprobed===`count-unverified`;return{id:e,state:i,counts:a?o:Y(i).counts,confidence:a?`unverified`:i===`unprobeable`?`unverifiable`:`verified`,exception:Y(i).exception,consentClass:r.consentClass,...r.guidance===void 0?{}:{guidance:r.guidance},...r.followup===void 0?{}:{followup:r.followup},troubleshooting:r.troubleshooting}}function rt(e,t,n){let r=e.satisfiedByAny.map(e=>nt(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||et[e.confidence]>et[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 it=[`absent`,`structural-na`];function at(e,t){let n=[];for(let r of Le){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=>it.includes(J(e,t))?!1:!ot(q(t,e.id),r.requiredStrictness))||i.some(e=>e.probe.mode!==`probeable`||!e.probe.strictness.includes(r.requiredStrictness)||!Y(J(e,t)).counts?!1:ot(q(t,e.id),r.requiredStrictness))&&n.push(r.id)}return n}function ot(e,t){return e?.strictness?.includes(t)===!0}function st(e){let{agentId:t,mode:n,probes:r,modeSignal:i}=e,a=h(t)?Se(t):void 0;if(a===void 0)return{agentId:t,mode:n,verdict:`not-registered`,visibility:{...tt(n,i),show:!0},requirements:[],grantedCapabilities:[],modeCaveats:[]};let o=tt(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=>rt(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:at(a,r),modeCaveats:s.caveats}}var ct=c(f),Z=o({kind:c([`source-read`,`measured`,`vendor-doc`,`upstream-issue`,`observation`]),ref:u().min(1),note:u().optional()}),Q=o({version:u().min(1).optional(),observedAt:u().min(1)}),lt=s(`confidence`,[o({confidence:l(`verified`),evidence:i(Z).min(1),verifiedAgainst:Q.optional()}),o({confidence:l(`assumed`),evidence:i(Z).min(1),verifiedAgainst:Q.optional()}),o({confidence:l(`contested`),evidence:i(Z).min(1),verifiedAgainst:Q})]),$=o({id:me,params:r(u(),ee([u(),n(),t()])).optional()}),ut=s(`mode`,[o({mode:l(`probeable`),strictness:i(re).min(1)}),o({mode:l(`unprobeable`),reason:c([`no-readable-state`,`different-machine`,`no-programmatic-path`,`session-scoped`]),note:u().optional()})]),dt=c([`this-project`,`this-user`,`this-machine`]),ft=c([`installable`,`user-completes`,`not-installable`]),pt=o({id:y,agent:m,piece:g,scope:v,kind:se,pathId:pe.optional(),sharedWith:i(m).default([]),prerequisites:i(y).default([]),consentClass:ce.default(`none`),probe:ut,attestation:lt,audience:dt,installability:ft.default(`installable`),notInstallableReason:c([`no-non-interactive-verb`,`session-scoped`,`no-surface`]).optional(),preferred:t().default(!1),guidance:$.optional(),followup:$.optional(),troubleshooting:i($).default([])}),mt=o({piece:g,level:ae,satisfiedByAny:i(y)}),ht=o({acpAgentId:u().min(1),featuredOrder:n().int().nonnegative().nullable(),harnessCli:de.nullable(),harnessReadsEditorConfig:ct.nullable(),harnessReadsEditorConfigAttestation:lt,verifiedPosture:c([`asks`,`self-managed`,`autonomous`]).nullable()}),gt=o({cliId:u().min(1)}),_t=o({targetId:fe,knownOrder:n().int().nonnegative(),visible:t(),displayName:u().min(1),appBrandName:u().min(1).optional(),schemes:i(u().min(1)),installUrl:u().min(1),tagline:u().min(1).optional()}),vt=o({requirements:i(mt),caveats:i($).default([])});o({id:m,setupDocSlug:u().min(1).nullable(),offerOnlyWhenDetected:t().default(!1),offersConnectionRow:t().default(!1),detectionSources:i(u().min(1)).default([]),satisfiers:i(pt),modes:a(ue,vt),acp:ht.optional(),terminal:gt.optional(),external:_t.optional()}),o({id:u().min(1),requiredStrictness:re,scope:v.optional(),piece:g,revokedByForeignEntry:t().default(!1),guidance:$.optional()});export{Ee as a,Me as c,Pe as d,Ie as f,He as i,ke as l,_e as m,Qe as n,De as o,Se as p,Be as r,U as s,st as t,je 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 ne,Ht as re,Rt as ie,Ut as ae,Vt as oe,Wt as se,zt as ce}from"./schemas-api-BM3O7zA1.js";import{i as d,t as f}from"./constants-editors-05BNhhVl.js";import{b as le}from"./handoff-ClTYrgLm.js";var p=[...f,`gemini`],m=c(p);function h(e){return p.includes(e)}var ue=c([`acp`,`terminal`,`external`]),de=c([...le,`gemini`]),fe=c([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),g=c([`mcp`,`skill`]),_=[`project`,`user`,`session`],v=c(_),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 x(e){return e}function he(e){return e}var ge=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],S=x(`central-skill-store`);function C(e,t){return x(`${e}:${t}`)}function _e(e){if(e===S)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!ge.includes(n)||!f.includes(r)?null:{kind:n,editor:r}}var ve=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function w(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:ve(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 T(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 E=(e,t,n,r)=>b({agent:e,piece:t,scope:n,kind:r}),D=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),O=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),k=(...e)=>({mode:`probeable`,strictness:e}),ye=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),A=(e,t)=>({id:he(e),...t===void 0?{}:{params:t}}),be=(e,t)=>{let n=oe.find(t=>t===e);return n===void 0?void 0:A(`followup.${n}`,{agent:t})},j=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),M=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},xe=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function N(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function P(e){let{appBrandName:t,tagline:n,...r}=e;return{...r,...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var F=(e,t)=>({kind:`observation`,ref:e,note:t}),I={observedAt:`2026-07-02`},L={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 R(e){return w({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:C(`editor-user-config`,e.agent),probe:k(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:A(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function z(e){return w({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:C(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:k(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:A(`guidance.mcp.project-config`,{agent:e.agent}),followup:be(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function B(e){return w({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:C(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:k(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:A(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function V(e){return w({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:C(`editor-user-skill-root`,e.agent),probe:k(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:A(`guidance.skill.user`,{agent:e.agent})})}function H(e){return w({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:ye(`session-scoped`),attestation:M([j(L.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:A(`guidance.mcp.session-injection`,{agent:e})})}var U={claude:T({id:`claude`,setupDocSlug:d.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[R({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:M([j(L.cliEditors,`user-global MCP config target`)])}),z({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:M([j(L.cliEditors),j(L.coreEditors)]),troubleshooting:A(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),B({agent:`claude`,prerequisites:[E(`claude`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)])}),V({agent:`claude`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`claude`)],modes:{external:{requirements:[D([E(`claude`,`mcp`,`user`,`config-entry`),E(`claude`,`mcp`,`project`,`config-entry`)]),O([E(`claude`,`skill`,`project`,`skill-bundle-copy`),E(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`claude`,`mcp`,`user`,`config-entry`),E(`claude`,`mcp`,`project`,`config-entry`)]),O([E(`claude`,`skill`,`project`,`skill-bundle-copy`),E(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`claude`,`mcp`,`session`,`session-injection`),E(`claude`,`mcp`,`user`,`config-entry`),E(`claude`,`mcp`,`project`,`config-entry`)]),O([E(`claude`,`skill`,`project`,`skill-bundle-copy`),E(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:M([j(L.threadManager,`the injection-skip probe reads the managed entry for this editor`),F(`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.`)],I),verifiedPosture:`asks`}),external:P({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":T({id:`claude-desktop`,setupDocSlug:d[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[R({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:A(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[D([E(`claude-desktop`,`mcp`,`user`,`config-entry`)]),O([])]}},external:P({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:T({id:`cursor`,setupDocSlug:d.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[R({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors)])}),z({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors),j(L.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:A(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),B({agent:`cursor`,prerequisites:[E(`cursor`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)])}),V({agent:`cursor`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`cursor`)],modes:{external:{requirements:[D([E(`cursor`,`mcp`,`user`,`config-entry`),E(`cursor`,`mcp`,`project`,`config-entry`)]),O([E(`cursor`,`skill`,`project`,`skill-bundle-copy`),E(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`cursor`,`mcp`,`user`,`config-entry`),E(`cursor`,`mcp`,`project`,`config-entry`)]),O([E(`cursor`,`skill`,`project`,`skill-bundle-copy`),E(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`cursor`,`mcp`,`session`,`session-injection`)]),O([E(`cursor`,`skill`,`project`,`skill-bundle-copy`),E(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:M([F(`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.`),j(L.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:P({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:T({id:`codex`,setupDocSlug:d.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[R({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:M([j(L.cliEditors,`TOML user-global config target`)])}),z({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:xe([j(L.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:[A(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),A(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),B({agent:`codex`,prerequisites:[E(`codex`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)]),troubleshooting:A(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),V({agent:`codex`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`codex`)],modes:{external:{requirements:[D([E(`codex`,`mcp`,`user`,`config-entry`),E(`codex`,`mcp`,`project`,`config-entry`)]),O([E(`codex`,`skill`,`project`,`skill-bundle-copy`),E(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`codex`,`mcp`,`user`,`config-entry`),E(`codex`,`mcp`,`project`,`config-entry`)]),O([E(`codex`,`skill`,`project`,`skill-bundle-copy`),E(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`codex`,`mcp`,`session`,`session-injection`),E(`codex`,`mcp`,`user`,`config-entry`),E(`codex`,`mcp`,`project`,`config-entry`)]),O([E(`codex`,`skill`,`project`,`skill-bundle-copy`),E(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:M([j(L.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),F(`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.`)],I),verifiedPosture:`self-managed`}),external:P({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:T({id:`copilot`,setupDocSlug:d.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[R({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors)])}),z({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:M([{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`},j(L.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:A(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),B({agent:`copilot`,prerequisites:[E(`copilot`,`mcp`,`project`,`config-entry`),E(`copilot`,`mcp`,`user`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.writeProjectSkill)])}),V({agent:`copilot`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`copilot`)],modes:{external:{requirements:[D([E(`copilot`,`mcp`,`user`,`config-entry`),E(`copilot`,`mcp`,`project`,`config-entry`)]),O([E(`copilot`,`skill`,`project`,`skill-bundle-copy`),E(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`copilot`,`mcp`,`user`,`config-entry`),E(`copilot`,`mcp`,`project`,`config-entry`)]),O([E(`copilot`,`skill`,`project`,`skill-bundle-copy`),E(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`copilot`,`mcp`,`session`,`session-injection`)]),O([E(`copilot`,`skill`,`project`,`skill-bundle-copy`),E(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[F(`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:P({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:T({id:`opencode`,setupDocSlug:d.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[R({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:M([j(L.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),z({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:M([j(L.cliEditors,`the one project config that is not under a dotdir`)])}),B({agent:`opencode`,prerequisites:[E(`opencode`,`mcp`,`project`,`config-entry`)],attestation:M([j(L.coreEditors),j(L.repairSkills)])}),V({agent:`opencode`,attestation:M([j(L.coreEditors),j(L.skillInstall)])}),H(`opencode`)],modes:{external:{requirements:[D([E(`opencode`,`mcp`,`user`,`config-entry`),E(`opencode`,`mcp`,`project`,`config-entry`)]),O([E(`opencode`,`skill`,`project`,`skill-bundle-copy`),E(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`opencode`,`mcp`,`user`,`config-entry`),E(`opencode`,`mcp`,`project`,`config-entry`)]),O([E(`opencode`,`skill`,`project`,`skill-bundle-copy`),E(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`opencode`,`mcp`,`session`,`session-injection`),E(`opencode`,`mcp`,`user`,`config-entry`),E(`opencode`,`mcp`,`project`,`config-entry`)]),O([E(`opencode`,`skill`,`project`,`skill-bundle-copy`),E(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:M([j(L.cliEditors,`the managed MCP entry OK writes into the opencode config`),F(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],I),verifiedPosture:null}),external:P({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:T({id:`openclaw`,setupDocSlug:d.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[R({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),w({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:S,probe:k(`reclaim-permissive`),attestation:M([j(L.coreEditors),j(L.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:A(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:A(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[D([E(`openclaw`,`mcp`,`user`,`config-entry`)]),O([E(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[D([E(`openclaw`,`mcp`,`user`,`config-entry`)]),O([E(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:P({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:T({id:`pi`,setupDocSlug:d.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[w({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:C(`editor-project-config`,`pi`),probe:k(`reclaim-permissive`,`injection-functional`),attestation:M([j(L.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),j(L.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:A(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:A(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),B({agent:`pi`,prerequisites:[E(`pi`,`mcp`,`project`,`managed-file`)],attestation:M([j(L.coreEditors),j(L.writeProjectSkill)]),troubleshooting:A(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),V({agent:`pi`,attestation:M([j(L.coreEditors,`the agent home nests one level below the dotdir`),j(L.skillInstall)])})],modes:{external:{requirements:[D([E(`pi`,`mcp`,`project`,`managed-file`)]),O([E(`pi`,`skill`,`project`,`skill-bundle-copy`),E(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`pi`,`mcp`,`project`,`managed-file`)]),O([E(`pi`,`skill`,`project`,`skill-bundle-copy`),E(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[D([E(`pi`,`mcp`,`project`,`managed-file`)]),O([E(`pi`,`skill`,`project`,`skill-bundle-copy`),E(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:N({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:M([F(`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."),j(L.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:P({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:T({id:`antigravity`,setupDocSlug:d.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[R({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),V({agent:`antigravity`,attestation:M([j(L.coreEditors),j(L.skillInstall)])})],modes:{external:{requirements:[D([E(`antigravity`,`mcp`,`user`,`config-entry`)]),O([E(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[D([E(`antigravity`,`mcp`,`user`,`config-entry`)]),O([E(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:P({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":T({id:`lm-studio`,setupDocSlug:d[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[R({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:M([j(L.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`},j(L.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:A(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[D([E(`lm-studio`,`mcp`,`user`,`config-entry`)]),O([])]}}}),hermes:T({id:`hermes`,setupDocSlug:d.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[R({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:M([j(L.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[D([E(`hermes`,`mcp`,`user`,`config-entry`)]),O([])]},terminal:{requirements:[D([E(`hermes`,`mcp`,`user`,`config-entry`)]),O([])]}},external:P({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:T({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[H(`gemini`)],modes:{acp:{requirements:[D([E(`gemini`,`mcp`,`session`,`session-injection`)]),O([])]}},acp:N({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:M([j(L.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],I),verifiedPosture:null})})};function Se(e){return U[e]}var Ce=Object.values(U).flatMap(e=>e.satisfiers),we=new Map(Ce.map(e=>[e.id,e]));function Te(e){return we.get(e)}var W=Object.values(U).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));W.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var Ee=Object.fromEntries(W.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(W.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var De=Object.fromEntries(W.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),Oe=Object.values(U).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),ke=Oe.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,tagline:a})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,...a===void 0?{}:{tagline:a}})),Ae=new Set(Oe.filter(e=>e.visible).map(e=>e.targetId)),je=ke.filter(e=>Ae.has(e.id)),Me=f.filter(e=>U[e].offersConnectionRow),Ne=new Map(Object.values(U).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function Pe(e){return Ne.get(e)}var Fe=new Map(Object.values(U).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function Ie(e){return Fe.get(e)}Object.fromEntries(Object.values(U).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(ie);var Le=[{id:`mcp-preapproval`,piece:`mcp`,scope:`project`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!1},{id:`tool-autoapprove`,piece:`mcp`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!0}];Le.map(e=>e.id);var G={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 Re={acp:{unprobed:`count-unverified`},terminal:{unprobed:`count-unverified`},external:{unprobed:`not-count`}};c([`acp-catalog-supported`,`harness-cli-on-path`,`os-scheme-handler`]);var ze={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 K(e){return typeof e==`object`&&!!e}function q(e,t){if(!K(e))return;let{satisfiers:n}=e;if(!K(n))return;let r=n[t];if(!K(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`&&h(e)):void 0;return{state:i,...s===void 0?{}:{strictness:s},...c===void 0||c.length===0?{}:{sharedWith:c}}}function Be(e,t){if(!K(e))return!1;let{detected:n}=e;return Array.isArray(n)&&n.includes(t)}function J(e,t){return e.probe.mode===`unprobeable`?`unprobeable`:q(t,e.id)?.state??`unprobed`}function Y(e){return ne(e)?G[e]:G.unprobed}function Ve(e,t){let n=e.filter(e=>{let n=Te(e);return n===void 0?!0:!Y(J(n,t)).counts});return n.length===e.length?n:[]}function He(e){return Y(e).exception===`warning`}function Ue(e){return e.state===`foreign`?`foreign`:e.state===`structural-na`?`structural-na`:e.installability===`not-installable`?`not-installable`:e.agentFolded?`agent-undetected`:null}function We(e,t){let n=t?.probed===!0?Be(t,e.id):null;return{detected:n,folded:e.offerOnlyWhenDetected&&n===!1}}function Ge(e,t){return(q(t,e.id)?.sharedWith??[]).filter(t=>t!==e.agent)}var Ke=_.filter(e=>e!==`session`);function qe(e){return te.includes(e)}function Je(e,t,n){let r=[];for(let i of e.satisfiers){if(!qe(i.kind))continue;let a=J(i,t),o=t?.satisfiers?.[i.id]?.path,s=Y(a),c=Ve(i.prerequisites,t),l=Ue({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:Ge(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 Ye(e){let t=[];for(let n of Ke){let r=e.filter(e=>e.scope===n);r.length!==0&&t.push({scope:n,cells:r})}return t}function Xe(e,t,n){let{detected:r,folded:i}=We(e,n),a=Je(e,t,i);return{agentId:e.id,detected:r,folded:i,setupDocSlug:e.setupDocSlug,scopes:Ye(a)}}function Ze(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&h(e)):p}function Qe(e={}){let{agentIds:t,probes:n,detection:r}=e;return{rows:Ze(t).map(e=>U[e]).filter(e=>e!==void 0).map(e=>Xe(e,n,r))}}var X={agent:m},$e={"followup.enable-manually":{params:e(X)},"guidance.mcp.user-config":{params:e(X)},"guidance.mcp.project-config":{params:e(X)},"guidance.mcp.session-injection":{params:e(X)},"guidance.mcp.managed-file":{params:e(X)},"guidance.skill.project":{params:e(X)},"guidance.skill.user":{params:e(X)},"guidance.skill.central-store":{params:e(X)},"troubleshooting.claude.project-entry-not-approved":{params:e(X)},"troubleshooting.claude-desktop.per-tool-approval":{params:e(X)},"troubleshooting.cursor.project-entry-not-loaded":{params:e({...X,server:u().optional()})},"troubleshooting.codex.desktop-project-config":{params:e({...X,honoredByDesktop:t()})},"troubleshooting.codex.folder-trust":{params:e(X)},"troubleshooting.copilot.shared-workspace-config":{params:e({...X,sourceAgent:m})},"troubleshooting.openclaw.central-store-missing":{params:e(X)},"troubleshooting.pi.folder-trust":{params:e(X)},"troubleshooting.lm-studio.config-path-mismatch":{params:e(X)}};Object.keys($e).sort(),Ce.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 et={verified:3,unverifiable:2,unverified:1};function tt(e,t){let n=ze[e],r=typeof t==`boolean`?t:null;return{signal:n.signal,resolved:r,show:r??n.unresolved===`show`}}function nt(e,t,n){let r=Te(e);if(r===void 0)return{id:e,state:`absent`,counts:!1,confidence:`unverified`,exception:G.absent.exception,consentClass:`none`,troubleshooting:[]};let i=J(r,n),a=!ne(i)||i===`unprobed`,o=Re[t].unprobed===`count-unverified`;return{id:e,state:i,counts:a?o:Y(i).counts,confidence:a?`unverified`:i===`unprobeable`?`unverifiable`:`verified`,exception:Y(i).exception,consentClass:r.consentClass,...r.guidance===void 0?{}:{guidance:r.guidance},...r.followup===void 0?{}:{followup:r.followup},troubleshooting:r.troubleshooting}}function rt(e,t,n){let r=e.satisfiedByAny.map(e=>nt(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||et[e.confidence]>et[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 it=[`absent`,`structural-na`];function at(e,t){let n=[];for(let r of Le){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=>it.includes(J(e,t))?!1:!ot(q(t,e.id),r.requiredStrictness))||i.some(e=>e.probe.mode!==`probeable`||!e.probe.strictness.includes(r.requiredStrictness)||!Y(J(e,t)).counts?!1:ot(q(t,e.id),r.requiredStrictness))&&n.push(r.id)}return n}function ot(e,t){return e?.strictness?.includes(t)===!0}function st(e){let{agentId:t,mode:n,probes:r,modeSignal:i}=e,a=h(t)?Se(t):void 0;if(a===void 0)return{agentId:t,mode:n,verdict:`not-registered`,visibility:{...tt(n,i),show:!0},requirements:[],grantedCapabilities:[],modeCaveats:[]};let o=tt(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=>rt(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:at(a,r),modeCaveats:s.caveats}}var ct=c(f),Z=o({kind:c([`source-read`,`measured`,`vendor-doc`,`upstream-issue`,`observation`]),ref:u().min(1),note:u().optional()}),Q=o({version:u().min(1).optional(),observedAt:u().min(1)}),lt=s(`confidence`,[o({confidence:l(`verified`),evidence:i(Z).min(1),verifiedAgainst:Q.optional()}),o({confidence:l(`assumed`),evidence:i(Z).min(1),verifiedAgainst:Q.optional()}),o({confidence:l(`contested`),evidence:i(Z).min(1),verifiedAgainst:Q})]),$=o({id:me,params:r(u(),ee([u(),n(),t()])).optional()}),ut=s(`mode`,[o({mode:l(`probeable`),strictness:i(re).min(1)}),o({mode:l(`unprobeable`),reason:c([`no-readable-state`,`different-machine`,`no-programmatic-path`,`session-scoped`]),note:u().optional()})]),dt=c([`this-project`,`this-user`,`this-machine`]),ft=c([`installable`,`user-completes`,`not-installable`]),pt=o({id:y,agent:m,piece:g,scope:v,kind:se,pathId:pe.optional(),sharedWith:i(m).default([]),prerequisites:i(y).default([]),consentClass:ce.default(`none`),probe:ut,attestation:lt,audience:dt,installability:ft.default(`installable`),notInstallableReason:c([`no-non-interactive-verb`,`session-scoped`,`no-surface`]).optional(),preferred:t().default(!1),guidance:$.optional(),followup:$.optional(),troubleshooting:i($).default([])}),mt=o({piece:g,level:ae,satisfiedByAny:i(y)}),ht=o({acpAgentId:u().min(1),featuredOrder:n().int().nonnegative().nullable(),harnessCli:de.nullable(),harnessReadsEditorConfig:ct.nullable(),harnessReadsEditorConfigAttestation:lt,verifiedPosture:c([`asks`,`self-managed`,`autonomous`]).nullable()}),gt=o({cliId:u().min(1)}),_t=o({targetId:fe,knownOrder:n().int().nonnegative(),visible:t(),displayName:u().min(1),appBrandName:u().min(1).optional(),schemes:i(u().min(1)),installUrl:u().min(1),tagline:u().min(1).optional()}),vt=o({requirements:i(mt),caveats:i($).default([])});o({id:m,setupDocSlug:u().min(1).nullable(),offerOnlyWhenDetected:t().default(!1),offersConnectionRow:t().default(!1),detectionSources:i(u().min(1)).default([]),satisfiers:i(pt),modes:a(ue,vt),acp:ht.optional(),terminal:gt.optional(),external:_t.optional()}),o({id:u().min(1),requiredStrictness:re,scope:v.optional(),piece:g,revokedByForeignEntry:t().default(!1),guidance:$.optional()});export{Ee as a,Me as c,Pe as d,Ie as f,He as i,ke as l,_e as m,Qe as n,De as o,Se as p,Be as r,U as s,st as t,je as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-BM3O7zA1.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])+`
|
|
@@ -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-BRpsTDMH.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-05BNhhVl.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-BIs2wAUZ.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-CxuIje2Y.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-BUVVp6gv.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-CRuEYkjM.js";import{t as Ee}from"./use-skill-targets-D-Tfz8TQ.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-BRpsTDMH.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-05BNhhVl.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-CuOKJ4_n.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-CxuIje2Y.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-Cwv39pKK.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-gbn1t63C.js";import{t as Ee}from"./use-skill-targets-Cf23drqO.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{p 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{p as i}from"./RegisteredAgentIcon-Begcc-nC.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={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function t({kind:t,runtimeVersion:n}){return{[e.protocol]:`2`,[e.runtime]:n,[e.kind]:t}}function n({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.82.
|
|
1
|
+
var e={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function t({kind:t,runtimeVersion:n}){return{[e.protocol]:`2`,[e.runtime]:n,[e.kind]:t}}function n({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var r={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.82.4`}?.VITE_APP_VERSION??`0.0.0-unknown`;function i(){return t({kind:`web`,runtimeVersion:r})}function a(){return n({kind:`web`,runtimeVersion:r})}export{i as n,a as r,r as t};
|