@inkeep/open-knowledge 0.86.0-beta.15 → 0.86.0-beta.17
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/cli.mjs +6 -6
- package/dist/constants-38pHIGc6.mjs +1 -0
- package/dist/{dist-DikfvdOD.mjs → dist-B7nhQgZp.mjs} +1 -1
- package/dist/dist-mO8anSf2.mjs +2212 -0
- package/dist/index.mjs +5 -5
- package/dist/init-B8r7tLSN.mjs +1 -0
- package/dist/{init-CWtHKTHv.mjs → init-Bl49k8xg.mjs} +2 -2
- package/dist/{launch-json-removal-BB-oqIRC.mjs → launch-json-removal-CvX800jT.mjs} +1 -1
- package/dist/{loader-CkZGQ9i_.mjs → loader-Co8MVRjn.mjs} +1 -1
- package/dist/loader-WALG0Rhp.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-CMF2qMhD.mjs → md-manager-BGnqyqi1-C80pMLi7.mjs} +1 -1
- package/dist/{open-browser-CsFrf5v1.mjs → open-browser-B2IcPaHC.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-B4Wi50zJ.mjs +1 -0
- package/dist/{preview-DraobKxC.mjs → preview-Cz2kOUtY.mjs} +1 -1
- package/dist/public/assets/{AccountSection-X0gfkEFU.js → AccountSection-CGv5Glds.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-BHxvvcEZ.js → ActivityModeContent-D5hMgCgE.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-CbMt9j6h.js → AddPropertiesButton-LeNZoqJc.js} +2 -2
- package/dist/public/assets/{AgentConnectionsSection-C99QFz6Q.js → AgentConnectionsSection-DZe1baEO.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-m_zTMTCy.js → AgentDiffPane-B9jmpVWJ.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-BBKp2KZL.js → AttachmentsSection-BFTMqBa1.js} +1 -1
- package/dist/public/assets/{AuthModal-CaYJDCrL.js → AuthModal-CHid1zIl.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-KdXe7bVw.js → CodeMirrorPropInput-L5MRgVTf.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-TEbxas-J.js → ContentRulesSection-B3Xp9twT.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-DTwemWjU.js → DiffViewBoundary-L0r4YmEw.js} +1 -1
- package/dist/public/assets/{DocumentContext-DnGK7f-7.js → DocumentContext-B3kLPqqX.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-4-oU20Yd.js → EditorModeToggle-Ys1S8N-G.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-bEBqk79B.js → ExcalidrawDocEditor-Cci1htT3.js} +1 -1
- package/dist/public/assets/FeedbackForm-9ncDVWoT.js +1 -0
- package/dist/public/assets/{GraphPanel-D8IPaKtn.js → GraphPanel-75Gq3M8g.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BIlSi8jA.js → ImportSkillDialog-B-tIIuBK.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-iivOiJ_A.js → LinkPreviewsSection-CyBJbZFE.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DHGeIjIC.js → LintConfigEditor-C4LCSXpA.js} +1 -1
- package/dist/public/assets/{LintingSection-DtSj5SS_.js → LintingSection-Dq9MlylS.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DtbhL7v_.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-DCt4z2iG.js → ManagedArtifactProperties-HxTgY01y.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-C7FGmTIS.js → MermaidDocEditor-oruY4qMx.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-B9a9_24L.js → NetworkAccessSection-D_lFT8eQ.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-CVxoKTpG.js → ProjectTemplatesSection-BPIa6vCf.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-D56ZpX2V.js → PropertyDisplayRow-DoGjfxWV.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-NPQKGvMw.js → PublishToGitHubDialog-BXWYD4Bz.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-CNf09bvo.js → RegisteredAgentIcon-B86I4fPj.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-Cyjg356T.js → SchemaConfigEditor-CH0Xi84X.js} +1 -1
- package/dist/public/assets/{SearchSection-BMqoHUM4.js → SearchSection-D6IVpkgi.js} +1 -1
- package/dist/public/assets/{SessionsHost-CRgShvSB.js → SessionsHost-BBmXVJwh.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-BkrW_nE0.js → SettingsDialogBody-BpWrDuWH.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-Cl--AVvA.js → ShareReceiveMissDialog-Thjeu6La.js} +1 -1
- package/dist/public/assets/{SkillCostValue-Br3p-1t8.js → SkillCostValue-D7i9jTwb.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-HHZBdD9G.js → SkillForkDialog-BePu5Ab7.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-CYZkBfwA.js → SkillInstallMenu-ChTMNTo3.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DaVrUMXJ.js → SkillOriginInline-BIqEXUYx.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DaFIqkzD.js → SkillToolbarControls-TKepG31r.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-D4vdwn-z.js → SkillsManagerSection-CcVBU5-5.js} +1 -1
- package/dist/public/assets/{SlidesPluginSection-CIIOqcY1.js → SlidesPluginSection-DuYQPOmz.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-groMA2mx.js → SlidesToolbarControls-PbLGA15n.js} +1 -1
- package/dist/public/assets/{SourceEditor-D9ScUImM.js → SourceEditor-BIheBmv6.js} +1 -1
- package/dist/public/assets/{SpellingSettings-D5xCXWwh.js → SpellingSettings-Bk20lUSX.js} +1 -1
- package/dist/public/assets/{SyncSection-1f2TKL_Y.js → SyncSection-B4LqafAN.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-CchTDe6B.js → SyncStatusBadge-w4biLqfe.js} +1 -1
- package/dist/public/assets/{TemplateRow-Z1Yy07aA.js → TemplateRow-BOTg2YrV.js} +1 -1
- package/dist/public/assets/{TerminalLaunchContext-DncO203O.js → TerminalLaunchContext-yYGkG_wD.js} +1 -1
- package/dist/public/assets/{TerminalPanel-D4_fMtJN.js → TerminalPanel-BSqB23c-.js} +1 -1
- package/dist/public/assets/{TerminalSection-RkwpYNK6.js → TerminalSection-CVhCn29o.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-Bizq7T-M.js → TerminalWindowApp-C0-rhjOO.js} +1 -1
- package/dist/public/assets/{TextDocEditor-oVi7i468.js → TextDocEditor-KYam7k-8.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-CDwd2bcE.js → ThemePluginSection-m8Juee1X.js} +1 -1
- package/dist/public/assets/{ThreadView-D5-hmsZf.js → ThreadView-D__roOXi.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-Do2sxIBv.js → TimelineDiffPane-Bv9j5E6T.js} +1 -1
- package/dist/public/assets/{_envelope-DwyyiIO_-B2czcEJX.js → _envelope-q8XHEv4O-C-Qnl5Tu.js} +1 -1
- package/dist/public/assets/{agent-connections-Dj9-89rY.js → agent-connections-Ceoyy8dY.js} +1 -1
- package/dist/public/assets/{agent-registry-CUdBP9oP.js → agent-registry-BMw1B8Te.js} +1 -1
- package/dist/public/assets/{bridge-D0M08jrS.js → bridge-D7uDalkC.js} +1 -1
- package/dist/public/assets/{card-V6OFaQxm.js → card-BluRJrIS.js} +1 -1
- package/dist/public/assets/{catalog-eC0BYrwO.js → catalog-Cmn9-Gjm.js} +1 -1
- package/dist/public/assets/{client-version-BA6OCZa0.js → client-version-CV4IG6Gv.js} +1 -1
- package/dist/public/assets/{comment-chips-DibE8LRk.js → comment-chips-Cc5Yhe4f.js} +1 -1
- package/dist/public/assets/{config-provider-CAQzJBPy.js → config-provider-TrTgJgwI.js} +1 -1
- package/dist/public/assets/config-schema-yQrjUXxd.js +1 -0
- package/dist/public/assets/{css-color-to-hex-9GaMLm_g.js → css-color-to-hex-Bzp4vTWU.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-C-PBG9o0.js → doc-undo-manager-DCRO_SDd.js} +1 -1
- package/dist/public/assets/field-controls-Cwx83Wji.js +1 -0
- package/dist/public/assets/{field-controls-DrKhqiB3.js → field-controls-owKYZxR_.js} +1 -1
- package/dist/public/assets/{frontmatter-tags-BEkbJ1mW.js → frontmatter-tags-DRQIboHc.js} +1 -1
- package/dist/public/assets/{globals-DWENDqiP.css → globals-vYef5b1j.css} +1 -1
- package/dist/public/assets/{handoff-Ccrokk1b.js → handoff-Dqe1NvVI.js} +1 -1
- package/dist/public/assets/{index-1of4dc7v.js → index-BguXH42n.js} +8 -8
- package/dist/public/assets/{lint-config-client-D-AsWIBw.js → lint-config-client-BjslZut3.js} +1 -1
- package/dist/public/assets/{lint-plugins-ia8X-ZL0.js → lint-plugins-B7bsND1T.js} +1 -1
- package/dist/public/assets/{markdown-lint-DQqFORQu.js → markdown-lint-DHBRQg5Y.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-DX9d-HpW.js → markdownlint-rule-browser-Cg9L-VTb.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-8PO3ggjr.js → pending-receive-nav-store-BycceB9a.js} +1 -1
- package/dist/public/assets/{preferred-session-events-BfQyHO9O.js → preferred-session-events-Dfv5m-jS.js} +1 -1
- package/dist/public/assets/{progress-C_P5sjg5.js → progress-DUKBKwsN.js} +1 -1
- package/dist/public/assets/{saved-themes-client-Cu2_CM_R.js → saved-themes-client-DrFMFctS.js} +1 -1
- package/dist/public/assets/{schema-section-BYiWkCRw.js → schema-section-ZwfGVrsG.js} +1 -1
- package/dist/public/assets/{schemas-api-DbKS2FSh.js → schemas-api-CzN0ZSyO.js} +1 -1
- package/dist/public/assets/{selection-context-62-2q0su.js → selection-context-BRnb4mtv.js} +1 -1
- package/dist/public/assets/{skills-api-B9YEcMtk.js → skills-api-DZKblPpK.js} +1 -1
- package/dist/public/assets/{src-Fp8fTIEP.js → src-BDCEHQB_.js} +1 -1
- package/dist/public/assets/storage-scope-RkgOxsbY.js +1 -0
- package/dist/public/assets/{tag-pill-input-CMMRt7b4.js → tag-pill-input-C2esRppI.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DI8suaT4.js → telemetry-impl-1fw6rzep.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BXbrCtKM.js → telemetry-startup-CiI1tHKc.js} +1 -1
- package/dist/public/assets/terminal-cli-display-CsSKkkvh.js +1 -0
- package/dist/public/assets/{terminal-command-events-Bi72Lcf-.js → terminal-command-events-gsyNmK4P.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-C_GWUJjY.js → terminal-launch-events-0aq4jWnV.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-B8FrkdJE.js → typing-burst-detector-p_JxiPHh.js} +1 -1
- package/dist/public/assets/{uninstall-yrbrkUSW.js → uninstall-B-uEWMBM.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DzIIKheA.js → use-activity-panel-CJW4ey3E.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-D0H8BLH0.js → use-apply-config-color-theme-Ddh-kKyn.js} +1 -1
- package/dist/public/assets/{use-conflicts-WBuTv_RW.js → use-conflicts-BMDLXGd4.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-B-M8VGC3.js → use-live-xterm-theme-M-20jT-Q.js} +1 -1
- package/dist/public/assets/{use-open-skill-BhVtYf3Z.js → use-open-skill-BK66h8n_.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-T5fnhjCX.js → use-semantic-search-status-BkAAt8Ua.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CGXvvIZH.js → use-skill-origin-CKhQalbz.js} +1 -1
- package/dist/public/assets/{use-skill-targets-ED9Nr02L.js → use-skill-targets-6h1qor3V.js} +1 -1
- package/dist/public/assets/{use-skills-NvVxu3-j.js → use-skills-CdEaAQQ2.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-QNCXx6AL.js → use-terminal-enabled-BTRNHD0o.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CCXFO0cF.js → use-timeline-entry-diff-zVHzjiGS.js} +1 -1
- package/dist/public/assets/{use-workspace-eebQ7TvN.js → use-workspace-DLSxs3j7.js} +1 -1
- package/dist/public/index.html +52 -52
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-DfYNGpUS.mjs → registry-probes-Cmwr62-1.mjs} +1 -1
- package/dist/{removal-file-path-D4yFgvd3.mjs → removal-file-path-ndh6vGXE.mjs} +1 -1
- package/dist/{repair-launch-json-hnw7Vz4K.mjs → repair-launch-json-DsLBtATy.mjs} +1 -1
- package/dist/{repair-mcp-configs-Bymhl_R4.mjs → repair-mcp-configs-BOqf1tn0.mjs} +1 -1
- package/dist/{src-W8epkuZh.mjs → src-Cn7t4QM0.mjs} +1 -1
- package/dist/src-g-ITNAqF.mjs +1 -0
- package/dist/start-Dd5QwkZR.mjs +1 -0
- package/dist/{start-BNM-Ewl9.mjs → start-O0wykuAA.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-CaFOyprZ.mjs +0 -1
- package/dist/dist-DO09Y6M7.mjs +0 -2212
- package/dist/init-DhRgHqpq.mjs +0 -1
- package/dist/loader-BW4TZHVu.mjs +0 -1
- package/dist/preview-BPuQatlI.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CJFCHJ2Q.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-37I-gX2R.js +0 -1
- package/dist/public/assets/config-schema-BRXEDN1T.js +0 -1
- package/dist/public/assets/field-controls-BXxM4mAl.js +0 -1
- package/dist/public/assets/storage-scope-DTSZLReS.js +0 -1
- package/dist/public/assets/terminal-cli-display-D_usGdw9.js +0 -1
- package/dist/src-BZsowcmP.mjs +0 -1
- package/dist/start-BFgwkKPg.mjs +0 -1
- /package/dist/public/assets/{globals-ChqKDCf_.js → globals-CXjhlGNL.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./AgentIconCluster-Qf_VPGzc.js";import{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./alert-dialog-BA3e7-10.js";import{t as y}from"./checkbox-CKD8LETI.js";import{t as b}from"./label-CvMpFFbN.js";import{t as x}from"./button-DzgjsZzC.js";import{t as S}from"./dist-C_FzPxEX2.js";import{t as C}from"./constants-product-C4Nt9vD3.js";import{r as w}from"./schemas-api-DbKS2FSh.js";import{a as T,c as E,n as D,r as O,s as k}from"./constants-editors-DLxv8SuP.js";import{b as A}from"./handoff-Ccrokk1b.js";import{c as j,d as M,f as N,h as P,i as F,n as I,r as L,t as R,u as ee}from"./agent-registry-CUdBP9oP.js";import{t as te}from"./folder-QqUoFRPR.js";import{t as z}from"./info-CyR0W2SK.js";import{t as ne}from"./monitor-IXzxTnmk.js";import{t as B}from"./sparkles-BS2TX_Um.js";import{t as V}from"./triangle-alert-BXrUEeRU.js";import{t as H}from"./x-DM2drskU.js";import{t as re}from"./badge-DmdA1C7r.js";import{a as ie,c as ae,i as oe,n as se,o as ce,s as le,t as ue}from"./dialog-BJEjKJjL.js";import{c as de,l as fe,n as U,s as pe,t as W}from"./field-DFJgKWGh.js";import{t as G}from"./constants-skills-BLHVRW90.js";import{t as K}from"./tool-list-format-CS7MZY1Q.js";var q=e(n(),1),J=a();function Y(e){if(e===void 0)return null;let t=P(e);if(t===null)return null;if(t.kind===`central-skill-store`)return`~/${G}/`;switch(t.kind){case`editor-project-config`:return E[t.editor];case`editor-project-skill-root`:{let e=O[t.editor];return e===null?null:`${e}/${k}/`}case`editor-user-skill-root`:{let e=T[t.editor];return e===null?null:`~/${e}/`}case`editor-user-config`:return null}}function me(e,t){if(e===void 0||t.length===0)return[];let n=P(e);return n===null||n.kind===`central-skill-store`?[]:t.map(e=>Y(`${n.kind}:${e}`)).filter(e=>e!==null)}function he(){return(typeof window>`u`?null:window.okDesktop?.mcpServerName)||null}function ge(){return he()??`OpenKnowledge`}function _e(e){return typeof e==`string`&&e!==``?e:he()??C.stable.mcpServerName}function X(e){return typeof e==`string`?D[e]??e:null}function ve(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`guidance.mcp.user-config`:return S._({id:`guidance.mcp.user-config`,values:{agent:t}});case`guidance.mcp.project-config`:return S._({id:`guidance.mcp.project-config`,values:{agent:t}});case`guidance.mcp.session-injection`:return S._({id:`guidance.mcp.session-injection`,values:{agent:t}});case`guidance.mcp.managed-file`:return S._({id:`guidance.mcp.managed-file`,values:{agent:t}});case`guidance.skill.project`:return S._({id:`guidance.skill.project`,values:{agent:t}});case`guidance.skill.user`:return S._({id:`guidance.skill.user`,values:{agent:t}});case`guidance.skill.central-store`:return S._({id:`guidance.skill.central-store`,values:{agent:t}});default:return null}}function ye(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`troubleshooting.claude.project-entry-not-approved`:return S._({id:`troubleshooting.claude.project-entry-not-approved`,values:{agent:t}});case`troubleshooting.claude-desktop.per-tool-approval`:return S._({id:`troubleshooting.claude-desktop.per-tool-approval`,values:{agent:t}});case`troubleshooting.cursor.project-entry-not-loaded`:{let n=_e(e.params?.server);return S._({id:`troubleshooting.cursor.project-entry-not-loaded`,values:{agent:t,server:n}})}case`troubleshooting.codex.folder-trust`:return S._({id:`troubleshooting.codex.folder-trust`,values:{agent:t}});case`troubleshooting.codex.desktop-project-config`:return e.params?.honoredByDesktop===!0?null:S._({id:`troubleshooting.codex.desktop-project-config`,values:{agent:t}});case`troubleshooting.copilot.shared-workspace-config`:{let n=X(e.params?.sourceAgent)??``;return S._({id:`troubleshooting.copilot.shared-workspace-config`,values:{agent:t,sourceAgent:n}})}case`troubleshooting.openclaw.central-store-missing`:return S._({id:`troubleshooting.openclaw.central-store-missing`,values:{agent:t}});case`troubleshooting.pi.folder-trust`:return S._({id:`troubleshooting.pi.folder-trust`,values:{agent:t}});case`troubleshooting.lm-studio.config-path-mismatch`:return S._({id:`troubleshooting.lm-studio.config-path-mismatch`,values:{agent:t}});default:return null}}function Z(e){return e?.closest(`section`)?.querySelector(`h4`)??null}var Q=t(),be={projectMcp:!1,projectSkill:!1,globalMcp:!1,discoverySkill:!1},xe=[`projectMcp`,`projectSkill`,`globalMcp`,`discoverySkill`],Se={projectMcp:`project`,projectSkill:`project`,globalMcp:`machine`,discoverySkill:`machine`};function Ce(e,t){return xe.flatMap(n=>{if(Se[n]!==t)return[];let r=e.cells[n];return r===void 0?[]:[[n,r]]})}function $(e){return e.disabledReason!==null}function we(e){let t=new Set,n=new Map;for(let[r,i]of e){let e=[];if(i.checked&&!$(i))for(let n of i.troubleshooting){if(t.has(n.id))continue;let r=ye(n);r!==null&&(t.add(n.id),e.push({id:n.id,text:r}))}n.set(r,e)}return n}function Te(e){return e.scope===`project`&&e.piece===`mcp`?`projectMcp`:e.scope===`project`&&e.piece===`skill`?`projectSkill`:e.scope===`user`&&e.piece===`mcp`?`globalMcp`:e.scope===`user`&&e.piece===`skill`?`discoverySkill`:null}function Ee(e){if(!j.includes(e.agentId))return null;let t=e.agentId,n={};for(let t of e.scopes)for(let e of t.cells){let t=Te(e);t!==null&&(n[t]=e)}return{id:t,label:De(t),row:e,cells:n}}function De(e){return D[e]}function Oe(e){let t=(0,J.c)(5),{agentId:n,className:r}=e;if(n===`lm-studio`){let e;return t[0]===r?e=t[1]:(e=(0,Q.jsx)(B,{"aria-hidden":!0,className:r,strokeWidth:1.5}),t[0]=r,t[1]=e),e}let i;return t[2]!==n||t[3]!==r?(i=(0,Q.jsx)(o,{host:n,"aria-hidden":!0,className:r}),t[2]=n,t[3]=r,t[4]=i):i=t[4],i}function ke(e,{forceDetected:t=[]}={}){return I({agentIds:j,probes:e.probes,detection:{...e.detection,detected:[...e.detection.detected,...t]}}).rows.flatMap(e=>{let t=Ee(e);return t===null?[]:[t]})}function Ae(e){return A.some(t=>N(t)===e)&&ee.some(t=>M(t.id)===e)}function je(e){return{projectMcp:e.cells.projectMcp?.checked===!0,projectSkill:e.cells.projectSkill?.checked===!0,globalMcp:e.cells.globalMcp?.checked===!0,discoverySkill:e.cells.discoverySkill?.checked===!0}}function Me(e){let t=je(e);return Ne(t)>0?t:Object.fromEntries(xe.map(t=>{let n=e.cells[t];return[t,n!==void 0&&!$(n)&&!F(n.state)]}))}function Ne(e){return Object.values(e).filter(Boolean).length}function Pe(e){return Object.values(e.cells).some(e=>!$(e))}function Fe(e){let t=Object.values(e.cells);return t.length>0&&t.every(e=>e.checked)}function Ie(e){let t=(0,J.c)(10),{children:n}=e,{_:r}=i(),a;t[0]===r?a=t[1]:(a=r({id:`kjrq_8`}),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(z,{"aria-hidden":!0}),t[2]=o):o=t[2];let u;t[3]===a?u=t[4]:(u=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,"aria-label":a,children:o})}),t[3]=a,t[4]=u);let d;t[5]===n?d=t[6]:(d=(0,Q.jsx)(c,{className:`max-w-72`,children:n}),t[5]=n,t[6]=d);let f;return t[7]!==u||t[8]!==d?(f=(0,Q.jsxs)(l,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f}function Le(e){let t=(0,J.c)(16),{message:n,path:r,info:a}=e,{_:o}=i(),u;t[0]===o?u=t[1]:(u=o({id:`bn_MDX`}),t[0]=o,t[1]=u);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(V,{"aria-hidden":!0}),t[2]=d):d=t[2];let f;t[3]===u?f=t[4]:(f=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,className:`text-amber-700 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-400`,"aria-label":u,children:d})}),t[3]=u,t[4]=f);let p;t[5]===n?p=t[6]:(p=(0,Q.jsx)(`span`,{className:`font-medium`,children:n}),t[5]=n,t[6]=p);let m;t[7]===r?m=t[8]:(m=r===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:r}),t[7]=r,t[8]=m);let h;t[9]!==a||t[10]!==p||t[11]!==m?(h=(0,Q.jsx)(c,{className:`max-w-72`,children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[p,a,m]})}),t[9]=a,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;return t[13]!==f||t[14]!==h?(g=(0,Q.jsxs)(l,{children:[f,h]}),t[13]=f,t[14]=h,t[15]=g):g=t[15],g}function Re(e){let t=(0,J.c)(51),{id:n,checked:r,disabled:a,exception:o,state:s,title:c,description:l,info:u,path:d,sharedPaths:f,alsoAffects:p,notes:m,onCheckedChange:h}=e,{_:g}=i(),_=o===`warning`||o===`error`,v;t[0]!==g||t[1]!==_||t[2]!==s?(v=_?g(s===`foreign`?{id:`tCE-ZH`}:s===`foreign-replaceable`?{id:`KTxoDA`}:{id:`8wwkVu`}):null,t[0]=g,t[1]=_,t[2]=s,t[3]=v):v=t[3];let x=v,S=x===null?void 0:`${n}-warning`,C=p===null?void 0:`${n}-shared`,w;t[4]!==C||t[5]!==S?(w=[S,C].filter(Boolean).join(` `)||void 0,t[4]=C,t[5]=S,t[6]=w):w=t[6];let T=w,E=a||void 0,D;t[7]===h?D=t[8]:(D=e=>h(e===!0),t[7]=h,t[8]=D);let O;t[9]!==r||t[10]!==T||t[11]!==a||t[12]!==n||t[13]!==D?(O=(0,Q.jsx)(`div`,{className:`flex h-7 items-center`,children:(0,Q.jsx)(y,{id:n,checked:r,disabled:a,"aria-describedby":T,onCheckedChange:D})}),t[9]=r,t[10]=T,t[11]=a,t[12]=n,t[13]=D,t[14]=O):O=t[14];let k;t[15]===c?k=t[16]:(k=(0,Q.jsx)(fe,{children:c}),t[15]=c,t[16]=k);let A;t[17]!==n||t[18]!==k?(A=(0,Q.jsx)(b,{htmlFor:n,className:`cursor-pointer`,children:k}),t[17]=n,t[18]=k,t[19]=A):A=t[19];let j;t[20]!==a||t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==x?(j=x===null?(0,Q.jsx)(Ie,{children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[u,d===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:d}),f.map(Be)]})}):(0,Q.jsx)(Le,{message:x,path:d,info:a?null:u}),t[20]=a,t[21]=u,t[22]=d,t[23]=f,t[24]=x,t[25]=j):j=t[25];let M;t[26]!==A||t[27]!==j?(M=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[A,j]}),t[26]=A,t[27]=j,t[28]=M):M=t[28];let N;t[29]===l?N=t[30]:(N=(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:l}),t[29]=l,t[30]=N);let P;t[31]!==n||t[32]!==m?(P=m.length===0?null:(0,Q.jsx)(`div`,{className:`flex flex-col gap-1.5`,"data-testid":`${n}-troubleshooting`,children:m.map(ze)}),t[31]=n,t[32]=m,t[33]=P):P=t[33];let F;t[34]!==g||t[35]!==p||t[36]!==C?(F=p===null?null:(0,Q.jsx)(`p`,{id:C,className:`text-sm leading-relaxed text-amber-700 dark:text-amber-400`,children:g({id:`qze9od`,values:{alsoAffects:p}})}),t[34]=g,t[35]=p,t[36]=C,t[37]=F):F=t[37];let I;t[38]!==x||t[39]!==S?(I=S===void 0?null:(0,Q.jsx)(`span`,{id:S,className:`sr-only`,children:x}),t[38]=x,t[39]=S,t[40]=I):I=t[40];let L;t[41]!==N||t[42]!==P||t[43]!==F||t[44]!==I||t[45]!==M?(L=(0,Q.jsxs)(U,{children:[M,N,P,F,I]}),t[41]=N,t[42]=P,t[43]=F,t[44]=I,t[45]=M,t[46]=L):L=t[46];let R;return t[47]!==L||t[48]!==E||t[49]!==O?(R=(0,Q.jsxs)(W,{orientation:`horizontal`,className:`items-start gap-3`,"data-disabled":E,children:[O,L]}),t[47]=L,t[48]=E,t[49]=O,t[50]=R):R=t[50],R}function ze(e){return(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e.text},e.id)}function Be(e){return(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:e},e)}function Ve(e,t){let n=e.cells[t];return n===void 0?!1:!$(n)}function He(e){let t=(0,J.c)(81),{part:n,cell:a,notes:o,draft:s,setPart:c}=e,{i18n:l,_:u}=i(),d;t[0]===a?d=t[1]:(d=$(a),t[0]=a,t[1]=d);let f=d,p;t[2]===u?p=t[3]:(p=u({id:`ggMMa7`}),t[2]=u,t[3]=p);let m;t[4]===u?m=t[5]:(m=u({id:`LtiJ5c`}),t[4]=u,t[5]=m);let h;t[6]===u?h=t[7]:(h=u({id:`2gXnCO`}),t[6]=u,t[7]=h);let g;t[8]===u?g=t[9]:(g=u({id:`ejiJeW`}),t[8]=u,t[9]=g);let _;t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==g?(_={projectMcp:p,projectSkill:m,globalMcp:h,discoverySkill:g},t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_):_=t[14];let v=_,y;if(t[15]!==u||t[16]!==a.agentId||t[17]!==a.disabledReason||t[18]!==a.exception||t[19]!==a.guidance||t[20]!==a.pathId||t[21]!==a.piece||t[22]!==a.resolvedPath||t[23]!==a.sharedFolderWith||t[24]!==a.state||t[25]!==f||t[26]!==s||t[27]!==l||t[28]!==o||t[29]!==n||t[30]!==c||t[31]!==v){y=Symbol.for(`react.early_return_sentinel`);bb0:{let e={foreign:u({id:`tCE-ZH`}),"structural-na":u({id:`3n7lnE`}),"not-installable":u({id:`BMoSQy`}),"agent-undetected":u({id:`mdWhUY`})},i=function(){let t=a.disabledReason;return t==null?u({id:`RXYvxn`}):e[t]},d;if(t[33]!==u||t[34]!==a.state){let e=ge();d=a.state===`foreign-replaceable`?u({id:`uOKoBM`,values:{server:e}}):null,t[33]=u,t[34]=a.state,t[35]=d}else d=t[35];let p=d,m;t[36]!==a.piece||t[37]!==a.sharedFolderWith||t[38]!==l?(m=a.piece===`skill`&&a.sharedFolderWith.length>0?K(a.sharedFolderWith.map(nt),l.locale):null,t[36]=a.piece,t[37]=a.sharedFolderWith,t[38]=l,t[39]=m):m=t[39];let h=m,g=a.exception,_=g===`warning`||g===`error`,b;t[40]!==a.pathId||t[41]!==a.sharedFolderWith?(b=me(a.pathId,a.sharedFolderWith),t[40]=a.pathId,t[41]=a.sharedFolderWith,t[42]=b):b=t[42];let x=b,S;t[43]===a.guidance?S=t[44]:(S=ve(a.guidance),t[43]=a.guidance,t[44]=S);let C=S,w=`${a.agentId}-${n}`,T=s[n],E;t[45]!==a.pathId||t[46]!==a.resolvedPath||t[47]!==f||t[48]!==_?(E=f&&!_?null:a.resolvedPath??Y(a.pathId),t[45]=a.pathId,t[46]=a.resolvedPath,t[47]=f,t[48]=_,t[49]=E):E=t[49];let D;t[50]!==f||t[51]!==_||t[52]!==x?(D=f&&!_?[]:x,t[50]=f,t[51]=_,t[52]=x,t[53]=D):D=t[53];let O=f?null:h,k;t[54]!==n||t[55]!==c?(k=e=>c(n,e),t[54]=n,t[55]=c,t[56]=k):k=t[56];let A;t[57]!==a.state||t[58]!==f||t[59]!==g||t[60]!==o||t[61]!==w||t[62]!==T||t[63]!==E||t[64]!==D||t[65]!==O||t[66]!==k?(A={id:w,checked:T,disabled:f,exception:g,state:a.state,notes:o,path:E,sharedPaths:D,alsoAffects:O,onCheckedChange:k},t[57]=a.state,t[58]=f,t[59]=g,t[60]=o,t[61]=w,t[62]=T,t[63]=E,t[64]=D,t[65]=O,t[66]=k,t[67]=A):A=t[67];let j=A;switch(n){case`projectMcp`:{let e;t[68]===C?e=t[69]:(e=C??(0,Q.jsx)(r,{id:`oxj8er`}),t[68]=C,t[69]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`EBP_hA`})});break bb0}case`projectSkill`:{let e;t[70]===C?e=t[71]:(e=C??(0,Q.jsx)(r,{id:`nta97o`}),t[70]=C,t[71]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():(0,Q.jsx)(r,{id:`n11Jj7`})});break bb0}case`globalMcp`:{let e;t[72]===C?e=t[73]:(e=C??(0,Q.jsx)(r,{id:`itchkf`}),t[72]=C,t[73]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`wgj--j`})});break bb0}case`discoverySkill`:{let e=v[n],a;t[74]===C?a=t[75]:(a=C??(0,Q.jsx)(r,{id:`6ur2Mk`}),t[74]=C,t[75]=a);let o=f?i():(0,Q.jsx)(r,{id:`uVhq9B`}),s;t[76]!==j||t[77]!==e||t[78]!==a||t[79]!==o?(s=(0,Q.jsx)(Re,{...j,title:e,description:a,info:o}),t[76]=j,t[77]=e,t[78]=a,t[79]=o,t[80]=s):s=t[80],y=s;break bb0}}}t[15]=u,t[16]=a.agentId,t[17]=a.disabledReason,t[18]=a.exception,t[19]=a.guidance,t[20]=a.pathId,t[21]=a.piece,t[22]=a.resolvedPath,t[23]=a.sharedFolderWith,t[24]=a.state,t[25]=f,t[26]=s,t[27]=l,t[28]=o,t[29]=n,t[30]=c,t[31]=v,t[32]=y}else y=t[32];if(y!==Symbol.for(`react.early_return_sentinel`))return y}function Ue(e){return e.piece===`mcp`&&e.scope===`project`?(0,Q.jsx)(r,{id:`ggMMa7`}):e.piece===`skill`&&e.scope===`project`?(0,Q.jsx)(r,{id:`LtiJ5c`}):e.piece===`mcp`&&e.scope===`user`?(0,Q.jsx)(r,{id:`2gXnCO`}):e.piece===`skill`&&e.scope===`user`?(0,Q.jsx)(r,{id:`ejiJeW`}):null}function We(e,t,n,r){let i=e.report.conflicts.find(e=>e.kind===r);if(i===void 0)return null;let a=e=>xe.find(n=>t.cells[n]?.satisfierId===e),[o,s]=i.satisfierIds,c=o===void 0?void 0:a(o),l=s===void 0?void 0:a(s);return c===void 0||l===void 0?null:{dependent:n[l],prerequisite:n[c],blockedReason:i.blockedReason}}function Ge(e){let t=(0,J.c)(29),{result:n,connection:a}=e,{_:o}=i(),s;if(t[0]!==o||t[1]!==a||t[2]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e={projectMcp:o({id:`ggMMa7`}),projectSkill:o({id:`LtiJ5c`}),globalMcp:o({id:`2gXnCO`}),discoverySkill:o({id:`ejiJeW`})},t=We(n,a,e,`prerequisite-unavailable`);if(t!==null){let{dependent:e,prerequisite:n}=t;s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:(()=>{switch(t.blockedReason){case`foreign`:return o({id:`XrPvMT`,values:{dependent:e,prerequisite:n}});case`structural-na`:return o({id:`XNdXMR`,values:{dependent:e,prerequisite:n}});case`not-installable`:return o({id:`GTvYzA`,values:{dependent:e,prerequisite:n}});case`agent-undetected`:return o({id:`7Ny8bV`,values:{dependent:e,prerequisite:n}});default:return o({id:`h2QPvj`,values:{dependent:e,prerequisite:n}})}})()});break bb0}let r=We(n,a,e,`prerequisite-removed`);if(r!==null){s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:o({id:`5CHuXn`,values:{0:r.dependent,1:r.prerequisite}})});break bb0}}t[0]=o,t[1]=a,t[2]=n,t[3]=s}else s=t[3];if(s!==Symbol.for(`react.early_return_sentinel`))return s;if(n.unavailable===!0){let e;t[4]!==o||t[5]!==n.devBuild?(e=n.devBuild===!0?o({id:`AUORpp`}):o({id:`RD8cCw`}),t[4]=o,t[5]=n.devBuild,t[6]=e):e=t[6];let r;return t[7]===e?r=t[8]:(r=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:e}),t[7]=e,t[8]=r),r}let c;t[9]===o?c=t[10]:(c=e=>{switch(e.errorId){case`surface-missing`:return o({id:`3n7lnE`});case`foreign-artifact`:return o({id:`tCE-ZH`});case`no-writer`:case`not-installable`:return o({id:`BMoSQy`});case`dependency-failed`:return o({id:`1FXL-O`});case`write-declined`:return o({id:`_fZSIY`});case`write-failed`:case`executor-threw`:case`unrecognized-outcome`:return o({id:`dCforW`});default:return null}},t[9]=o,t[10]=c);let l=c,u=n.report.actions,d,f,p,m;if(t[11]!==l||t[12]!==n.error||t[13]!==n.report.actions){m=Symbol.for(`react.early_return_sentinel`);bb1:{let e;t[18]===l?e=t[19]:(e=e=>({key:e.satisfierId,title:Ue(e),managedInSkillsStudio:e.errorId===`no-writer`&&e.piece===`skill`&&e.scope===`user`,detail:l(e)}),t[18]=l,t[19]=e);let i=u.filter(Je).map(e).filter(qe);if(i.length===0){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{children:(0,Q.jsx)(r,{id:`fWsBTs`})}),t[20]=e):e=t[20];let i;t[21]===n.error?i=t[22]:(i=n.error===void 0?null:(0,Q.jsx)(`code`,{className:`block wrap-break-word font-mono text-xs opacity-80`,children:n.error}),t[21]=n.error,t[22]=i);let a;t[23]===i?a=t[24]:(a=(0,Q.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-sm text-destructive`,children:[e,i]}),t[23]=i,t[24]=a),m=a;break bb1}d=`alert`,f=`space-y-2 text-sm text-destructive`,p=i.map(Ke)}t[11]=l,t[12]=n.error,t[13]=n.report.actions,t[14]=d,t[15]=f,t[16]=p,t[17]=m}else d=t[14],f=t[15],p=t[16],m=t[17];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;return t[25]!==d||t[26]!==f||t[27]!==p?(h=(0,Q.jsx)(`div`,{role:d,className:f,children:p}),t[25]=d,t[26]=f,t[27]=p,t[28]=h):h=t[28],h}function Ke(e){return(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[e.title===null?null:(0,Q.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,Q.jsx)(`p`,{children:e.managedInSkillsStudio?(0,Q.jsx)(r,{id:`5RiC8D`}):e.detail})]},e.key)}function qe(e){return e.managedInSkillsStudio||e.detail!==null}function Je(e){return e.errorId!==void 0}function Ye(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Q.jsx)(r,{id:`s8difl`})}),e[0]=t):t=e[0],t}function Xe(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`74Mikl`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Ze(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`2lJAvH`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Qe(e){let t=(0,J.c)(141),{connection:n,open:a,onOpenChange:o,onSave:s,paired:c,onCloseAutoFocus:l,validateSave:u,alternateAction:d}=e,f=c===void 0?!1:c,{i18n:p,_:m}=i(),h=(0,q.useId)(),g;t[0]===n?g=t[1]:(g=()=>n===null?be:Me(n),t[0]=n,t[1]=g);let[_,v]=(0,q.useState)(g),[C,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),[j,M]=(0,q.useState)(null),N;t[2]!==n||t[3]!==_?(N=n!==null&&xe.some(e=>{let t=n.cells[e];return _[e]&&t!==void 0&&F(t.state)}),t[2]=n,t[3]=_,t[4]=N):N=t[4];let P=N,I;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e,t){v(n=>({...n,[e]:t})),A(null),O(null),M(null)},t[5]=I):I=t[5];let L=I,R;t[6]!==n||t[7]!==_?(R=n!==null&&!_.projectSkill&&Ve(n,`projectSkill`),t[6]=n,t[7]=_,t[8]=R):R=t[8];let ee=R,z,B,V,H,fe,U,W,G,K,Y,me,he,ge,_e,X,ve,ye,Z;if(t[9]!==m||t[10]!==n||t[11]!==_||t[12]!==l||t[13]!==o||t[14]!==a||t[15]!==f||t[16]!==C||t[17]!==j||t[18]!==ee){let e=n===null?[]:Ce(n,`project`),i=n===null?[]:Ce(n,`machine`),s=n!==null&&e.length===0,c=n?.label,u=we(e),d=we(i),p;t[37]!==n?.cells||t[38]!==_?(p=xe.filter(e=>n?.cells[e]?.checked===!0&&!_[e]),t[37]=n?.cells,t[38]=_,t[39]=p):p=t[39],U=p.length;let h;t[40]!==n||t[41]!==_?(h=xe.filter(e=>n?.cells[e]!==void 0&&_[e]&&!n.cells[e]?.checked),t[40]=n,t[41]=_,t[42]=h):h=t[42],H=h.length;let g;t[43]!==m||t[44]!==H||t[45]!==U?(g=H>0&&U>0?m({id:`6tQC_t`,values:{addingCount:H,removingCount:U}}):H>0?S._({id:`xKcXG6`,values:{addingCount:H}}):U>0?S._({id:`0niWj3`,values:{removingCount:U}}):null,t[43]=m,t[44]=H,t[45]=U,t[46]=g):g=t[46];let v=g;W=U>0&&H===0;let y;t[47]!==_||t[48]!==W?(y=W&&xe.every(e=>!_[e]),t[47]=_,t[48]=W,t[49]=y):y=t[49];let b=y;Z=j!==null&&j.peerSatisfierIds.length>0;let x;t[50]!==m||t[51]!==H||t[52]!==n||t[53]!==b||t[54]!==U||t[55]!==j||t[56]!==v||t[57]!==Z?(x=n===null?null:j===null?b?m({id:`CCngW8`,values:{0:n.label}}):v:Z?m(H>0?{id:`0hAvVd`,values:{0:n.label,1:j.peers,addingCount:H,removingCount:U}}:{id:`yqr502`,values:{0:n.label,1:j.peers,removingCount:U}}):v,t[50]=m,t[51]=H,t[52]=n,t[53]=b,t[54]=U,t[55]=j,t[56]=v,t[57]=Z,t[58]=x):x=t[58],fe=x,V=ue,he=a,t[59]!==o||t[60]!==C?(ge=e=>!C&&o(e),t[59]=o,t[60]=C,t[61]=ge):ge=t[61],B=oe,G=`sm:max-w-lg`,K=!1,Y=l;let w;t[62]===n?w=t[63]:(w=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[62]=n,t[63]=w);let T=n?.label,E;t[64]!==w||t[65]!==T?(E=(0,Q.jsxs)(ae,{className:`flex items-center gap-2 text-lg`,children:[w,T]}),t[64]=w,t[65]=T,t[66]=E):E=t[66];let D;t[67]!==m||t[68]!==c||t[69]!==n||t[70]!==s?(D=m(n?s?{id:`bm1oV9`,values:{agentLabel:c}}:{id:`qr2gAH`,values:{0:n.label}}:{id:`CxnZP4`}),t[67]=m,t[68]=c,t[69]=n,t[70]=s,t[71]=D):D=t[71];let O;t[72]===D?O=t[73]:(O=(0,Q.jsx)(ie,{children:D}),t[72]=D,t[73]=O),t[74]!==E||t[75]!==O?(me=(0,Q.jsxs)(le,{className:`gap-2`,children:[E,O]}),t[74]=E,t[75]=O,t[76]=me):me=t[76],z=se,_e=`flex flex-col gap-6`,t[77]!==n||t[78]!==f?(X=f&&n?(0,Q.jsx)(Xe,{label:n.label}):null,t[77]=n,t[78]=f,t[79]=X):X=t[79],ve=e.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ZWyHmq`}),(0,Q.jsx)(re,{variant:`secondary`,className:`font-mono text-[10px] uppercase`,children:(0,Q.jsx)(r,{id:`WEYdDv`})})]}),e.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:u.get(t)??[],draft:_,setPart:L},t)}),ee?(0,Q.jsx)(Ye,{}):null]}):null,ye=i.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ImTzPZ`})]}),i.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:d.get(t)??[],draft:_,setPart:L},t)})]}):null,t[9]=m,t[10]=n,t[11]=_,t[12]=l,t[13]=o,t[14]=a,t[15]=f,t[16]=C,t[17]=j,t[18]=ee,t[19]=z,t[20]=B,t[21]=V,t[22]=H,t[23]=fe,t[24]=U,t[25]=W,t[26]=G,t[27]=K,t[28]=Y,t[29]=me,t[30]=he,t[31]=ge,t[32]=_e,t[33]=X,t[34]=ve,t[35]=ye,t[36]=Z}else z=t[19],B=t[20],V=t[21],H=t[22],fe=t[23],U=t[24],W=t[25],G=t[26],K=t[27],Y=t[28],me=t[29],he=t[30],ge=t[31],_e=t[32],X=t[33],ve=t[34],ye=t[35],Z=t[36];let Se;t[80]!==n||t[81]!==T||t[82]!==D||t[83]!==j||t[84]!==k?(Se=j===null?k===null?D===null?T!==null&&n!==null?(0,Q.jsx)(Ge,{result:T,connection:n}):null:(0,Q.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:D}):(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:k}):(0,Q.jsx)(it,{choice:j}),t[80]=n,t[81]=T,t[82]=D,t[83]=j,t[84]=k,t[85]=Se):Se=t[85];let $;t[86]!==z||t[87]!==Se||t[88]!==_e||t[89]!==X||t[90]!==ve||t[91]!==ye?($=(0,Q.jsxs)(z,{className:_e,children:[X,ve,ye,Se]}),t[86]=z,t[87]=Se,t[88]=_e,t[89]=X,t[90]=ve,t[91]=ye,t[92]=$):$=t[92];let Te;t[93]===fe?Te=t[94]:(Te=(0,Q.jsx)(`p`,{role:`status`,className:`me-auto text-xs text-muted-foreground`,"aria-live":`polite`,"aria-atomic":`true`,children:fe}),t[93]=fe,t[94]=Te);let Ee;t[95]===o?Ee=t[96]:(Ee=()=>o(!1),t[95]=o,t[96]=Ee);let De;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Q.jsx)(r,{id:`dEgA5A`}),t[97]=De):De=t[97];let ke;t[98]!==C||t[99]!==Ee?(ke=(0,Q.jsx)(x,{variant:`outline`,className:`font-mono uppercase`,disabled:C,onClick:Ee,children:De}),t[98]=C,t[99]=Ee,t[100]=ke):ke=t[100];let Ae;t[101]!==d||t[102]!==h||t[103]!==C?(Ae=d===void 0?null:(0,Q.jsxs)(`div`,{className:`flex flex-col items-start gap-2 sm:items-end`,children:[d.preference===void 0?null:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(y,{id:h,checked:d.preference.checked,disabled:C,onCheckedChange:e=>d.preference?.onCheckedChange(e===!0)}),(0,Q.jsx)(b,{htmlFor:h,className:`cursor-pointer text-sm`,children:d.preference.label})]}),(0,Q.jsx)(x,{variant:`ghost`,className:`font-mono uppercase`,disabled:C,onClick:d.onClick,children:d.label})]}),t[101]=d,t[102]=h,t[103]=C,t[104]=Ae):Ae=t[104];let je=P||U>0?`destructive`:`default`,Ne=C||(j===null?H+U===0:!Z),Pe;t[105]!==n||t[106]!==_||t[107]!==p||t[108]!==o||t[109]!==s||t[110]!==j?.peerSatisfierIds||t[111]!==u?(Pe=()=>{let e=u?.(_)??null;if(e!==null){A(e);return}w(!0),A(null),E(null),O(null);let t=j?.peerSatisfierIds;M(null),s(_,t).then(e=>{if(`kind`in e){O(e.message);return}if(e.ok){o(!1);return}let t=n===null?null:rt(e,n,p.locale);t===null?E(e):M(t)}).catch(()=>E({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null})).finally(()=>w(!1))},t[105]=n,t[106]=_,t[107]=p,t[108]=o,t[109]=s,t[110]=j?.peerSatisfierIds,t[111]=u,t[112]=Pe):Pe=t[112];let Fe;t[113]!==P||t[114]!==W||t[115]!==C||t[116]!==Z?(Fe=C?(0,Q.jsx)(r,{id:`uF9ruK`}):Z?(0,Q.jsx)(r,{id:`dGcsnU`}):P?(0,Q.jsx)(r,{id:`inJhKB`}):W?(0,Q.jsx)(r,{id:`t_YqKh`}):(0,Q.jsx)(r,{id:`y3aU20`}),t[113]=P,t[114]=W,t[115]=C,t[116]=Z,t[117]=Fe):Fe=t[117];let Ie;t[118]!==je||t[119]!==Ne||t[120]!==Pe||t[121]!==Fe?(Ie=(0,Q.jsx)(x,{variant:je,className:`font-mono uppercase`,disabled:Ne,onClick:Pe,children:Fe}),t[118]=je,t[119]=Ne,t[120]=Pe,t[121]=Fe,t[122]=Ie):Ie=t[122];let Le;t[123]!==Te||t[124]!==ke||t[125]!==Ae||t[126]!==Ie?(Le=(0,Q.jsxs)(ce,{className:`items-center`,children:[Te,ke,Ae,Ie]}),t[123]=Te,t[124]=ke,t[125]=Ae,t[126]=Ie,t[127]=Le):Le=t[127];let Re;t[128]!==B||t[129]!==G||t[130]!==K||t[131]!==Y||t[132]!==me||t[133]!==$||t[134]!==Le?(Re=(0,Q.jsxs)(B,{className:G,showCloseButton:K,onCloseAutoFocus:Y,children:[me,$,Le]}),t[128]=B,t[129]=G,t[130]=K,t[131]=Y,t[132]=me,t[133]=$,t[134]=Le,t[135]=Re):Re=t[135];let ze;return t[136]!==V||t[137]!==he||t[138]!==ge||t[139]!==Re?(ze=(0,Q.jsx)(V,{open:he,onOpenChange:ge,children:Re}),t[136]=V,t[137]=he,t[138]=ge,t[139]=Re,t[140]=ze):ze=t[140],ze}function $e(e){switch(e){case`projectMcp`:return(0,Q.jsx)(r,{id:`ggMMa7`});case`projectSkill`:return(0,Q.jsx)(r,{id:`LtiJ5c`});case`globalMcp`:return(0,Q.jsx)(r,{id:`2gXnCO`});case`discoverySkill`:return(0,Q.jsx)(r,{id:`ejiJeW`})}}function et(e,t){return xe.flatMap(n=>{let r=e.cells[n];return r?.checked===!0?[{cell:r,part:n,label:$e(n),path:r.resolvedPath??Y(r.pathId),scope:r.scope===`project`?`project`:`machine`,alsoAffects:r.piece===`skill`&&r.sharedFolderWith.length>0?K(r.sharedFolderWith.map(nt),t):null}]:[]})}function tt(e){let t=(0,J.c)(12),{scope:n,rows:a}=e,{_:o}=i();if(a.length===0)return null;let s;t[0]===n?s=t[1]:(s=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 border-b bg-muted/60 px-3 py-2 font-mono text-xs uppercase tracking-wide text-muted-foreground`,children:[n===`project`?(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}):(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),n===`project`?(0,Q.jsx)(r,{id:`ZWyHmq`}):(0,Q.jsx)(r,{id:`ImTzPZ`})]}),t[0]=n,t[1]=s);let c;if(t[2]!==o||t[3]!==a){let e;t[5]===o?e=t[6]:(e=e=>{let t=e.alsoAffects;return(0,Q.jsxs)(`li`,{className:`flex items-start gap-3 px-3 py-3`,children:[(0,Q.jsx)(H,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-sm font-medium`,children:e.label}),e.path===null?null:(0,Q.jsx)(`code`,{className:`block truncate text-xs text-muted-foreground`,children:e.path}),t===null?null:(0,Q.jsx)(`p`,{className:`text-xs text-amber-700 dark:text-amber-400`,children:o({id:`qze9od`,values:{alsoAffects:t}})})]})]},e.cell.satisfierId)},t[5]=o,t[6]=e),c=a.map(e),t[2]=o,t[3]=a,t[4]=c}else c=t[4];let l;t[7]===c?l=t[8]:(l=(0,Q.jsx)(`ul`,{className:`divide-y divide-border`,children:c}),t[7]=c,t[8]=l);let u;return t[9]!==s||t[10]!==l?(u=(0,Q.jsxs)(`div`,{children:[s,l]}),t[9]=s,t[10]=l,t[11]=u):u=t[11],u}function nt(e){return D[e]??e}function rt(e,t,n){let r=e.report.conflicts.filter(e=>e.kind===`unresolved-shared-copy`),i=new Set(Object.values(t.cells).map(e=>e.satisfierId)),a=[...new Set(r.flatMap(e=>e.satisfierIds))].filter(e=>!i.has(e)),o=[...new Set(r.flatMap(e=>e.agentIds))].filter(e=>e!==t.id);if(a.length===0&&o.length===0)return null;let s=[...new Set(r.map(e=>Y(e.pathId)).filter(e=>e!==null))];return{peers:K(o.map(nt),n),path:s.length===1?s[0]:null,peerSatisfierIds:a}}function it(e){let t=(0,J.c)(5),{choice:n}=e,{peers:i,path:a}=n;if(n.peerSatisfierIds.length===0){let e;return t[0]===i?e=t[1]:(e=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:(0,Q.jsx)(r,{id:`H8tj8y`,values:{peers:i}})}),t[0]=i,t[1]=e),e}let o;return t[2]!==a||t[3]!==i?(o=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:a===null?(0,Q.jsx)(r,{id:`4C2RCg`,values:{peers:i}}):(0,Q.jsx)(r,{id:`fybwfg`,values:{peers:i,path:a},components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}),t[2]=a,t[3]=i,t[4]=o):o=t[4],o}function at(e){let t=(0,J.c)(96),{connection:n,open:a,onOpenChange:o,onRemove:s,paired:c}=e,l=c===void 0?!1:c,{i18n:y,_:b}=i(),x=(0,q.useRef)(null),S=(0,q.useRef)(null),C,w;t[0]===a?(C=t[1],w=t[2]):(C=()=>{if(!a)return;let e=document.activeElement;x.current=e,S.current=e?.closest(`section`)??null},w=[a],t[0]=a,t[1]=C,t[2]=w),(0,q.useEffect)(C,w);let[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),j,M,N,P,F,I,L,R,ee,te,z,ne,B,V,H,re;if(t[3]!==b||t[4]!==n||t[5]!==y||t[6]!==o||t[7]!==s||t[8]!==a||t[9]!==T){F=n?et(n,y.locale):[];let e;t[26]!==n||t[27]!==y||t[28]!==o||t[29]!==s?(e=function(e){n!==null&&(E(!0),O(null),A(null),s(e).then(e=>{if(e.ok){o(!1);return}let t=rt(e,n,y.locale);t===null?O(e):A(t)}).catch(e=>O({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null,error:e instanceof Error?e.message:String(e)})).finally(()=>E(!1)))},t[26]=n,t[27]=y,t[28]=o,t[29]=s,t[30]=e):e=t[30],I=e,P=v,ee=a,t[31]!==o||t[32]!==T?(te=e=>!T&&o(e),t[31]=o,t[32]=T,t[33]=te):te=t[33],N=u,re=`sm:max-w-lg`,t[34]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{let t=x.current,n=t?.isConnected?t:Z(S.current);n?.isConnected&&(e.preventDefault(),n.focus())},t[34]=L):L=t[34];let i;t[35]===n?i=t[36]:(i=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[35]=n,t[36]=i);let c;t[37]!==b||t[38]!==n?(c=b(n?{id:`ApNWRQ`,values:{0:n.label}}:{id:`Y1wa2r`}),t[37]=b,t[38]=n,t[39]=c):c=t[39];let l;t[40]!==i||t[41]!==c?(l=(0,Q.jsxs)(p,{className:`flex items-center gap-2 text-lg`,children:[i,c]}),t[40]=i,t[41]=c,t[42]=l):l=t[42];let f;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(h,{children:(0,Q.jsx)(r,{id:`da7Yfw`})}),t[43]=f):f=t[43],t[44]===l?R=t[45]:(R=(0,Q.jsxs)(d,{className:`gap-2`,children:[l,f]}),t[44]=l,t[45]=R),M=g,H=`flex flex-col gap-4`,B=`overflow-hidden rounded-lg border`,V=(0,Q.jsx)(tt,{scope:`project`,rows:F.filter(st)}),j=tt,z=`machine`,ne=F.filter(ot),t[3]=b,t[4]=n,t[5]=y,t[6]=o,t[7]=s,t[8]=a,t[9]=T,t[10]=j,t[11]=M,t[12]=N,t[13]=P,t[14]=F,t[15]=I,t[16]=L,t[17]=R,t[18]=ee,t[19]=te,t[20]=z,t[21]=ne,t[22]=B,t[23]=V,t[24]=H,t[25]=re}else j=t[10],M=t[11],N=t[12],P=t[13],F=t[14],I=t[15],L=t[16],R=t[17],ee=t[18],te=t[19],z=t[20],ne=t[21],B=t[22],V=t[23],H=t[24],re=t[25];let ie;t[46]!==j||t[47]!==z||t[48]!==ne?(ie=(0,Q.jsx)(j,{scope:z,rows:ne}),t[46]=j,t[47]=z,t[48]=ne,t[49]=ie):ie=t[49];let ae;t[50]!==ie||t[51]!==B||t[52]!==V?(ae=(0,Q.jsxs)(`div`,{className:B,children:[V,ie]}),t[50]=ie,t[51]=B,t[52]=V,t[53]=ae):ae=t[53];let oe;t[54]!==n||t[55]!==l?(oe=l&&n?(0,Q.jsx)(Ze,{label:n.label}):null,t[54]=n,t[55]=l,t[56]=oe):oe=t[56];let se;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Q.jsx)(r,{id:`Evsh6U`})}),t[57]=se):se=t[57];let ce;t[58]!==n||t[59]!==D||t[60]!==k?(ce=k===null?D!==null&&n!==null?(0,Q.jsx)(Ge,{result:D,connection:n}):null:(0,Q.jsx)(it,{choice:k}),t[58]=n,t[59]=D,t[60]=k,t[61]=ce):ce=t[61];let le;t[62]!==M||t[63]!==ae||t[64]!==oe||t[65]!==ce||t[66]!==H?(le=(0,Q.jsxs)(M,{className:H,children:[ae,oe,se,ce]}),t[62]=M,t[63]=ae,t[64]=oe,t[65]=ce,t[66]=H,t[67]=le):le=t[67];let ue;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Q.jsx)(r,{id:`dEgA5A`}),t[68]=ue):ue=t[68];let de;t[69]===T?de=t[70]:(de=(0,Q.jsx)(f,{disabled:T,children:ue}),t[69]=T,t[70]=de);let fe=T||F.length===0||k!==null&&k.peerSatisfierIds.length===0,U;t[71]!==k?.peerSatisfierIds||t[72]!==I?(U=e=>{e.preventDefault(),I(k?.peerSatisfierIds)},t[71]=k?.peerSatisfierIds,t[72]=I,t[73]=U):U=t[73];let pe;t[74]!==T||t[75]!==k?(pe=T?(0,Q.jsx)(r,{id:`uF9ruK`}):k!==null&&k.peerSatisfierIds.length>0?(0,Q.jsx)(r,{id:`dGcsnU`}):(0,Q.jsx)(r,{id:`t_YqKh`}),t[74]=T,t[75]=k,t[76]=pe):pe=t[76];let W;t[77]!==fe||t[78]!==U||t[79]!==pe?(W=(0,Q.jsx)(m,{variant:`destructive`,className:`font-mono uppercase`,disabled:fe,onClick:U,children:pe}),t[77]=fe,t[78]=U,t[79]=pe,t[80]=W):W=t[80];let G;t[81]!==de||t[82]!==W?(G=(0,Q.jsxs)(_,{children:[de,W]}),t[81]=de,t[82]=W,t[83]=G):G=t[83];let K;t[84]!==N||t[85]!==L||t[86]!==R||t[87]!==le||t[88]!==G||t[89]!==re?(K=(0,Q.jsxs)(N,{className:re,onCloseAutoFocus:L,children:[R,le,G]}),t[84]=N,t[85]=L,t[86]=R,t[87]=le,t[88]=G,t[89]=re,t[90]=K):K=t[90];let Y;return t[91]!==P||t[92]!==ee||t[93]!==te||t[94]!==K?(Y=(0,Q.jsx)(P,{open:ee,onOpenChange:te,children:K}),t[91]=P,t[92]=ee,t[93]=te,t[94]=K,t[95]=Y):Y=t[95],Y}function ot(e){return e.scope===`machine`}function st(e){return e.scope===`project`}function ct(e,t,n=[]){let r=je(e);return[...n.map(e=>({satisfierId:e,desired:`absent`})),...xe.flatMap(n=>{let i=e.cells[n];return i===void 0||t[n]===r[n]?[]:[{satisfierId:i.satisfierId,desired:t[n]?`present`:`absent`}]})]}function lt(e,t=[]){let n=je(e),r=Object.fromEntries(xe.map(t=>[t,e.cells[t]?!1:n[t]])),i=t.map(e=>({satisfierId:e,desired:`absent`}));return[...ct(e,r),...i]}function ut(e){if(e.status===`nothing-required`)return`met`;let t=!1;for(let n of e.options){if(n.confidence===`unverified`){t=!0;continue}if(n.counts)return`met`}return t?`unprobed`:`unmet`}function dt(e,t,n){return n===!1?`absent`:n===!0?`present`:t===null||!t.detection.probed?`unknown`:L(t.detection,e)?`present`:`absent`}function ft(e){let{agentId:t,mode:n,snapshot:r,detected:i}=e;if(dt(t,r,i)===`absent`)return`not-installed`;if(r===null)return`no-status`;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.filter(e=>e.level===`required`);if(a.length===0)return`no-status`;let o=a.map(ut);return o.includes(`unprobed`)?`no-status`:o.includes(`unmet`)?`not-connected`:`connected`}function pt(e){return e===`enable-manually`?`external`:`terminal`}function mt(e){let{agentId:t,mode:n,snapshot:r,projectMcp:i}=e;if(r===null||i?.followup===void 0||ft(e)!==`connected`)return;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.find(e=>e.level===`required`&&e.piece===`mcp`);if(a===void 0||a.status!==`met`)return;let o=a.options.filter(e=>e.counts);if(!(o.length!==1||o[0]?.id!==i.satisfierId))return i.followup}var ht={actions:[],conflicts:[],withheld:[]};function gt(e){return{ok:!1,report:ht,snapshot:null,error:e}}function _t(e){return e.conflicts.length===0&&e.actions.every(e=>e.errorId===void 0)}async function vt(e,t){let n=globalThis.window?.okDesktop;if(n!==void 0)try{let t=await n.agentIntegrations.apply({intents:e});return t.ok?{ok:!0,report:t.report,snapshot:t.snapshot}:{ok:!1,report:t.report,snapshot:t.snapshot,error:t.error,...t.unavailable===!0?{unavailable:!0}:{},...t.devBuild===!0?{devBuild:!0}:{}}}catch(e){return{ok:!1,report:ht,snapshot:null,error:e instanceof Error?e.message:String(e)}}let r;try{r=await fetch(`/api/agent-integrations/apply`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({intents:e}),signal:t?.webSignal})}catch(e){return gt(e instanceof Error?e.message:String(e))}if(!r.ok)return gt(`HTTP ${r.status} ${r.statusText}`.trimEnd());let i;try{i=await r.json()}catch(e){return gt(e instanceof Error?e.message:String(e))}let a=w.safeParse(i);if(!a.success){let e=a.error.issues.map(e=>e.path.join(`.`));return console.warn(`[agent-connections] response schema drift`,{issues:e}),gt(`Unexpected response shape at ${e.join(`, `)}`)}let o={actions:a.data.actions,conflicts:a.data.conflicts,withheld:a.data.withheld};return{ok:_t(o),report:o,snapshot:a.data.snapshot}}var yt=new Set;function bt(e){return yt.add(e),()=>{yt.delete(e)}}async function xt(e,t){let n=await vt(e,t);if(e.length>0){let e=[...yt];for(let t of e)try{t(n)}catch(e){console.warn(`[agent-connections] change listener failed:`,e)}}return n}export{je as _,pt as a,Oe as c,De as d,ke as f,ct as g,Ne as h,mt as i,at as l,Ae as m,bt as n,dt as o,Pe as p,ft as r,Qe as s,xt as t,Fe as u,lt as v,Z as y};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./AgentIconCluster-Qf_VPGzc.js";import{i as s,n as c,t as l}from"./tooltip-DBqLYfio.js";import{a as u,c as d,i as f,l as p,n as m,o as h,r as g,s as _,t as v}from"./alert-dialog-BA3e7-10.js";import{t as y}from"./checkbox-CKD8LETI.js";import{t as b}from"./label-CvMpFFbN.js";import{t as x}from"./button-DzgjsZzC.js";import{t as S}from"./dist-C_FzPxEX2.js";import{t as C}from"./constants-product-C4Nt9vD3.js";import{r as w}from"./schemas-api-CzN0ZSyO.js";import{a as T,c as E,n as D,r as O,s as k}from"./constants-editors-DLxv8SuP.js";import{b as A}from"./handoff-Dqe1NvVI.js";import{c as j,d as M,f as N,h as P,i as F,n as I,r as L,t as R,u as ee}from"./agent-registry-BMw1B8Te.js";import{t as te}from"./folder-QqUoFRPR.js";import{t as z}from"./info-CyR0W2SK.js";import{t as ne}from"./monitor-IXzxTnmk.js";import{t as B}from"./sparkles-BS2TX_Um.js";import{t as V}from"./triangle-alert-BXrUEeRU.js";import{t as H}from"./x-DM2drskU.js";import{t as re}from"./badge-DmdA1C7r.js";import{a as ie,c as ae,i as oe,n as se,o as ce,s as le,t as ue}from"./dialog-BJEjKJjL.js";import{c as de,l as fe,n as U,s as pe,t as W}from"./field-DFJgKWGh.js";import{t as G}from"./constants-skills-BLHVRW90.js";import{t as K}from"./tool-list-format-CS7MZY1Q.js";var q=e(n(),1),J=a();function Y(e){if(e===void 0)return null;let t=P(e);if(t===null)return null;if(t.kind===`central-skill-store`)return`~/${G}/`;switch(t.kind){case`editor-project-config`:return E[t.editor];case`editor-project-skill-root`:{let e=O[t.editor];return e===null?null:`${e}/${k}/`}case`editor-user-skill-root`:{let e=T[t.editor];return e===null?null:`~/${e}/`}case`editor-user-config`:return null}}function me(e,t){if(e===void 0||t.length===0)return[];let n=P(e);return n===null||n.kind===`central-skill-store`?[]:t.map(e=>Y(`${n.kind}:${e}`)).filter(e=>e!==null)}function he(){return(typeof window>`u`?null:window.okDesktop?.mcpServerName)||null}function ge(){return he()??`OpenKnowledge`}function _e(e){return typeof e==`string`&&e!==``?e:he()??C.stable.mcpServerName}function X(e){return typeof e==`string`?D[e]??e:null}function ve(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`guidance.mcp.user-config`:return S._({id:`guidance.mcp.user-config`,values:{agent:t}});case`guidance.mcp.project-config`:return S._({id:`guidance.mcp.project-config`,values:{agent:t}});case`guidance.mcp.session-injection`:return S._({id:`guidance.mcp.session-injection`,values:{agent:t}});case`guidance.mcp.managed-file`:return S._({id:`guidance.mcp.managed-file`,values:{agent:t}});case`guidance.skill.project`:return S._({id:`guidance.skill.project`,values:{agent:t}});case`guidance.skill.user`:return S._({id:`guidance.skill.user`,values:{agent:t}});case`guidance.skill.central-store`:return S._({id:`guidance.skill.central-store`,values:{agent:t}});default:return null}}function ye(e){if(e===void 0)return null;let t=X(e.params?.agent);if(t===null)return null;switch(e.id){case`troubleshooting.claude.project-entry-not-approved`:return S._({id:`troubleshooting.claude.project-entry-not-approved`,values:{agent:t}});case`troubleshooting.claude-desktop.per-tool-approval`:return S._({id:`troubleshooting.claude-desktop.per-tool-approval`,values:{agent:t}});case`troubleshooting.cursor.project-entry-not-loaded`:{let n=_e(e.params?.server);return S._({id:`troubleshooting.cursor.project-entry-not-loaded`,values:{agent:t,server:n}})}case`troubleshooting.codex.folder-trust`:return S._({id:`troubleshooting.codex.folder-trust`,values:{agent:t}});case`troubleshooting.codex.desktop-project-config`:return e.params?.honoredByDesktop===!0?null:S._({id:`troubleshooting.codex.desktop-project-config`,values:{agent:t}});case`troubleshooting.copilot.shared-workspace-config`:{let n=X(e.params?.sourceAgent)??``;return S._({id:`troubleshooting.copilot.shared-workspace-config`,values:{agent:t,sourceAgent:n}})}case`troubleshooting.openclaw.central-store-missing`:return S._({id:`troubleshooting.openclaw.central-store-missing`,values:{agent:t}});case`troubleshooting.pi.folder-trust`:return S._({id:`troubleshooting.pi.folder-trust`,values:{agent:t}});case`troubleshooting.lm-studio.config-path-mismatch`:return S._({id:`troubleshooting.lm-studio.config-path-mismatch`,values:{agent:t}});default:return null}}function Z(e){return e?.closest(`section`)?.querySelector(`h4`)??null}var Q=t(),be={projectMcp:!1,projectSkill:!1,globalMcp:!1,discoverySkill:!1},xe=[`projectMcp`,`projectSkill`,`globalMcp`,`discoverySkill`],Se={projectMcp:`project`,projectSkill:`project`,globalMcp:`machine`,discoverySkill:`machine`};function Ce(e,t){return xe.flatMap(n=>{if(Se[n]!==t)return[];let r=e.cells[n];return r===void 0?[]:[[n,r]]})}function $(e){return e.disabledReason!==null}function we(e){let t=new Set,n=new Map;for(let[r,i]of e){let e=[];if(i.checked&&!$(i))for(let n of i.troubleshooting){if(t.has(n.id))continue;let r=ye(n);r!==null&&(t.add(n.id),e.push({id:n.id,text:r}))}n.set(r,e)}return n}function Te(e){return e.scope===`project`&&e.piece===`mcp`?`projectMcp`:e.scope===`project`&&e.piece===`skill`?`projectSkill`:e.scope===`user`&&e.piece===`mcp`?`globalMcp`:e.scope===`user`&&e.piece===`skill`?`discoverySkill`:null}function Ee(e){if(!j.includes(e.agentId))return null;let t=e.agentId,n={};for(let t of e.scopes)for(let e of t.cells){let t=Te(e);t!==null&&(n[t]=e)}return{id:t,label:De(t),row:e,cells:n}}function De(e){return D[e]}function Oe(e){let t=(0,J.c)(5),{agentId:n,className:r}=e;if(n===`lm-studio`){let e;return t[0]===r?e=t[1]:(e=(0,Q.jsx)(B,{"aria-hidden":!0,className:r,strokeWidth:1.5}),t[0]=r,t[1]=e),e}let i;return t[2]!==n||t[3]!==r?(i=(0,Q.jsx)(o,{host:n,"aria-hidden":!0,className:r}),t[2]=n,t[3]=r,t[4]=i):i=t[4],i}function ke(e,{forceDetected:t=[]}={}){return I({agentIds:j,probes:e.probes,detection:{...e.detection,detected:[...e.detection.detected,...t]}}).rows.flatMap(e=>{let t=Ee(e);return t===null?[]:[t]})}function Ae(e){return A.some(t=>N(t)===e)&&ee.some(t=>M(t.id)===e)}function je(e){return{projectMcp:e.cells.projectMcp?.checked===!0,projectSkill:e.cells.projectSkill?.checked===!0,globalMcp:e.cells.globalMcp?.checked===!0,discoverySkill:e.cells.discoverySkill?.checked===!0}}function Me(e){let t=je(e);return Ne(t)>0?t:Object.fromEntries(xe.map(t=>{let n=e.cells[t];return[t,n!==void 0&&!$(n)&&!F(n.state)]}))}function Ne(e){return Object.values(e).filter(Boolean).length}function Pe(e){return Object.values(e.cells).some(e=>!$(e))}function Fe(e){let t=Object.values(e.cells);return t.length>0&&t.every(e=>e.checked)}function Ie(e){let t=(0,J.c)(10),{children:n}=e,{_:r}=i(),a;t[0]===r?a=t[1]:(a=r({id:`kjrq_8`}),t[0]=r,t[1]=a);let o;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,Q.jsx)(z,{"aria-hidden":!0}),t[2]=o):o=t[2];let u;t[3]===a?u=t[4]:(u=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,"aria-label":a,children:o})}),t[3]=a,t[4]=u);let d;t[5]===n?d=t[6]:(d=(0,Q.jsx)(c,{className:`max-w-72`,children:n}),t[5]=n,t[6]=d);let f;return t[7]!==u||t[8]!==d?(f=(0,Q.jsxs)(l,{children:[u,d]}),t[7]=u,t[8]=d,t[9]=f):f=t[9],f}function Le(e){let t=(0,J.c)(16),{message:n,path:r,info:a}=e,{_:o}=i(),u;t[0]===o?u=t[1]:(u=o({id:`bn_MDX`}),t[0]=o,t[1]=u);let d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,Q.jsx)(V,{"aria-hidden":!0}),t[2]=d):d=t[2];let f;t[3]===u?f=t[4]:(f=(0,Q.jsx)(s,{asChild:!0,children:(0,Q.jsx)(x,{variant:`ghost`,size:`icon-sm`,className:`text-amber-700 hover:text-amber-700 dark:text-amber-400 dark:hover:text-amber-400`,"aria-label":u,children:d})}),t[3]=u,t[4]=f);let p;t[5]===n?p=t[6]:(p=(0,Q.jsx)(`span`,{className:`font-medium`,children:n}),t[5]=n,t[6]=p);let m;t[7]===r?m=t[8]:(m=r===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:r}),t[7]=r,t[8]=m);let h;t[9]!==a||t[10]!==p||t[11]!==m?(h=(0,Q.jsx)(c,{className:`max-w-72`,children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[p,a,m]})}),t[9]=a,t[10]=p,t[11]=m,t[12]=h):h=t[12];let g;return t[13]!==f||t[14]!==h?(g=(0,Q.jsxs)(l,{children:[f,h]}),t[13]=f,t[14]=h,t[15]=g):g=t[15],g}function Re(e){let t=(0,J.c)(51),{id:n,checked:r,disabled:a,exception:o,state:s,title:c,description:l,info:u,path:d,sharedPaths:f,alsoAffects:p,notes:m,onCheckedChange:h}=e,{_:g}=i(),_=o===`warning`||o===`error`,v;t[0]!==g||t[1]!==_||t[2]!==s?(v=_?g(s===`foreign`?{id:`tCE-ZH`}:s===`foreign-replaceable`?{id:`KTxoDA`}:{id:`8wwkVu`}):null,t[0]=g,t[1]=_,t[2]=s,t[3]=v):v=t[3];let x=v,S=x===null?void 0:`${n}-warning`,C=p===null?void 0:`${n}-shared`,w;t[4]!==C||t[5]!==S?(w=[S,C].filter(Boolean).join(` `)||void 0,t[4]=C,t[5]=S,t[6]=w):w=t[6];let T=w,E=a||void 0,D;t[7]===h?D=t[8]:(D=e=>h(e===!0),t[7]=h,t[8]=D);let O;t[9]!==r||t[10]!==T||t[11]!==a||t[12]!==n||t[13]!==D?(O=(0,Q.jsx)(`div`,{className:`flex h-7 items-center`,children:(0,Q.jsx)(y,{id:n,checked:r,disabled:a,"aria-describedby":T,onCheckedChange:D})}),t[9]=r,t[10]=T,t[11]=a,t[12]=n,t[13]=D,t[14]=O):O=t[14];let k;t[15]===c?k=t[16]:(k=(0,Q.jsx)(fe,{children:c}),t[15]=c,t[16]=k);let A;t[17]!==n||t[18]!==k?(A=(0,Q.jsx)(b,{htmlFor:n,className:`cursor-pointer`,children:k}),t[17]=n,t[18]=k,t[19]=A):A=t[19];let j;t[20]!==a||t[21]!==u||t[22]!==d||t[23]!==f||t[24]!==x?(j=x===null?(0,Q.jsx)(Ie,{children:(0,Q.jsxs)(`span`,{className:`flex flex-col gap-1.5`,children:[u,d===null?null:(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:d}),f.map(Be)]})}):(0,Q.jsx)(Le,{message:x,path:d,info:a?null:u}),t[20]=a,t[21]=u,t[22]=d,t[23]=f,t[24]=x,t[25]=j):j=t[25];let M;t[26]!==A||t[27]!==j?(M=(0,Q.jsxs)(`div`,{className:`flex items-center gap-1`,children:[A,j]}),t[26]=A,t[27]=j,t[28]=M):M=t[28];let N;t[29]===l?N=t[30]:(N=(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:l}),t[29]=l,t[30]=N);let P;t[31]!==n||t[32]!==m?(P=m.length===0?null:(0,Q.jsx)(`div`,{className:`flex flex-col gap-1.5`,"data-testid":`${n}-troubleshooting`,children:m.map(ze)}),t[31]=n,t[32]=m,t[33]=P):P=t[33];let F;t[34]!==g||t[35]!==p||t[36]!==C?(F=p===null?null:(0,Q.jsx)(`p`,{id:C,className:`text-sm leading-relaxed text-amber-700 dark:text-amber-400`,children:g({id:`qze9od`,values:{alsoAffects:p}})}),t[34]=g,t[35]=p,t[36]=C,t[37]=F):F=t[37];let I;t[38]!==x||t[39]!==S?(I=S===void 0?null:(0,Q.jsx)(`span`,{id:S,className:`sr-only`,children:x}),t[38]=x,t[39]=S,t[40]=I):I=t[40];let L;t[41]!==N||t[42]!==P||t[43]!==F||t[44]!==I||t[45]!==M?(L=(0,Q.jsxs)(U,{children:[M,N,P,F,I]}),t[41]=N,t[42]=P,t[43]=F,t[44]=I,t[45]=M,t[46]=L):L=t[46];let R;return t[47]!==L||t[48]!==E||t[49]!==O?(R=(0,Q.jsxs)(W,{orientation:`horizontal`,className:`items-start gap-3`,"data-disabled":E,children:[O,L]}),t[47]=L,t[48]=E,t[49]=O,t[50]=R):R=t[50],R}function ze(e){return(0,Q.jsx)(`p`,{className:`text-sm leading-relaxed text-muted-foreground`,children:e.text},e.id)}function Be(e){return(0,Q.jsx)(`code`,{className:`wrap-break-word font-mono opacity-80`,children:e},e)}function Ve(e,t){let n=e.cells[t];return n===void 0?!1:!$(n)}function He(e){let t=(0,J.c)(81),{part:n,cell:a,notes:o,draft:s,setPart:c}=e,{i18n:l,_:u}=i(),d;t[0]===a?d=t[1]:(d=$(a),t[0]=a,t[1]=d);let f=d,p;t[2]===u?p=t[3]:(p=u({id:`ggMMa7`}),t[2]=u,t[3]=p);let m;t[4]===u?m=t[5]:(m=u({id:`LtiJ5c`}),t[4]=u,t[5]=m);let h;t[6]===u?h=t[7]:(h=u({id:`2gXnCO`}),t[6]=u,t[7]=h);let g;t[8]===u?g=t[9]:(g=u({id:`ejiJeW`}),t[8]=u,t[9]=g);let _;t[10]!==p||t[11]!==m||t[12]!==h||t[13]!==g?(_={projectMcp:p,projectSkill:m,globalMcp:h,discoverySkill:g},t[10]=p,t[11]=m,t[12]=h,t[13]=g,t[14]=_):_=t[14];let v=_,y;if(t[15]!==u||t[16]!==a.agentId||t[17]!==a.disabledReason||t[18]!==a.exception||t[19]!==a.guidance||t[20]!==a.pathId||t[21]!==a.piece||t[22]!==a.resolvedPath||t[23]!==a.sharedFolderWith||t[24]!==a.state||t[25]!==f||t[26]!==s||t[27]!==l||t[28]!==o||t[29]!==n||t[30]!==c||t[31]!==v){y=Symbol.for(`react.early_return_sentinel`);bb0:{let e={foreign:u({id:`tCE-ZH`}),"structural-na":u({id:`3n7lnE`}),"not-installable":u({id:`BMoSQy`}),"agent-undetected":u({id:`mdWhUY`})},i=function(){let t=a.disabledReason;return t==null?u({id:`RXYvxn`}):e[t]},d;if(t[33]!==u||t[34]!==a.state){let e=ge();d=a.state===`foreign-replaceable`?u({id:`uOKoBM`,values:{server:e}}):null,t[33]=u,t[34]=a.state,t[35]=d}else d=t[35];let p=d,m;t[36]!==a.piece||t[37]!==a.sharedFolderWith||t[38]!==l?(m=a.piece===`skill`&&a.sharedFolderWith.length>0?K(a.sharedFolderWith.map(nt),l.locale):null,t[36]=a.piece,t[37]=a.sharedFolderWith,t[38]=l,t[39]=m):m=t[39];let h=m,g=a.exception,_=g===`warning`||g===`error`,b;t[40]!==a.pathId||t[41]!==a.sharedFolderWith?(b=me(a.pathId,a.sharedFolderWith),t[40]=a.pathId,t[41]=a.sharedFolderWith,t[42]=b):b=t[42];let x=b,S;t[43]===a.guidance?S=t[44]:(S=ve(a.guidance),t[43]=a.guidance,t[44]=S);let C=S,w=`${a.agentId}-${n}`,T=s[n],E;t[45]!==a.pathId||t[46]!==a.resolvedPath||t[47]!==f||t[48]!==_?(E=f&&!_?null:a.resolvedPath??Y(a.pathId),t[45]=a.pathId,t[46]=a.resolvedPath,t[47]=f,t[48]=_,t[49]=E):E=t[49];let D;t[50]!==f||t[51]!==_||t[52]!==x?(D=f&&!_?[]:x,t[50]=f,t[51]=_,t[52]=x,t[53]=D):D=t[53];let O=f?null:h,k;t[54]!==n||t[55]!==c?(k=e=>c(n,e),t[54]=n,t[55]=c,t[56]=k):k=t[56];let A;t[57]!==a.state||t[58]!==f||t[59]!==g||t[60]!==o||t[61]!==w||t[62]!==T||t[63]!==E||t[64]!==D||t[65]!==O||t[66]!==k?(A={id:w,checked:T,disabled:f,exception:g,state:a.state,notes:o,path:E,sharedPaths:D,alsoAffects:O,onCheckedChange:k},t[57]=a.state,t[58]=f,t[59]=g,t[60]=o,t[61]=w,t[62]=T,t[63]=E,t[64]=D,t[65]=O,t[66]=k,t[67]=A):A=t[67];let j=A;switch(n){case`projectMcp`:{let e;t[68]===C?e=t[69]:(e=C??(0,Q.jsx)(r,{id:`oxj8er`}),t[68]=C,t[69]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`EBP_hA`})});break bb0}case`projectSkill`:{let e;t[70]===C?e=t[71]:(e=C??(0,Q.jsx)(r,{id:`nta97o`}),t[70]=C,t[71]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():(0,Q.jsx)(r,{id:`n11Jj7`})});break bb0}case`globalMcp`:{let e;t[72]===C?e=t[73]:(e=C??(0,Q.jsx)(r,{id:`itchkf`}),t[72]=C,t[73]=e),y=(0,Q.jsx)(Re,{...j,title:v[n],description:e,info:f?i():p??(0,Q.jsx)(r,{id:`wgj--j`})});break bb0}case`discoverySkill`:{let e=v[n],a;t[74]===C?a=t[75]:(a=C??(0,Q.jsx)(r,{id:`6ur2Mk`}),t[74]=C,t[75]=a);let o=f?i():(0,Q.jsx)(r,{id:`uVhq9B`}),s;t[76]!==j||t[77]!==e||t[78]!==a||t[79]!==o?(s=(0,Q.jsx)(Re,{...j,title:e,description:a,info:o}),t[76]=j,t[77]=e,t[78]=a,t[79]=o,t[80]=s):s=t[80],y=s;break bb0}}}t[15]=u,t[16]=a.agentId,t[17]=a.disabledReason,t[18]=a.exception,t[19]=a.guidance,t[20]=a.pathId,t[21]=a.piece,t[22]=a.resolvedPath,t[23]=a.sharedFolderWith,t[24]=a.state,t[25]=f,t[26]=s,t[27]=l,t[28]=o,t[29]=n,t[30]=c,t[31]=v,t[32]=y}else y=t[32];if(y!==Symbol.for(`react.early_return_sentinel`))return y}function Ue(e){return e.piece===`mcp`&&e.scope===`project`?(0,Q.jsx)(r,{id:`ggMMa7`}):e.piece===`skill`&&e.scope===`project`?(0,Q.jsx)(r,{id:`LtiJ5c`}):e.piece===`mcp`&&e.scope===`user`?(0,Q.jsx)(r,{id:`2gXnCO`}):e.piece===`skill`&&e.scope===`user`?(0,Q.jsx)(r,{id:`ejiJeW`}):null}function We(e,t,n,r){let i=e.report.conflicts.find(e=>e.kind===r);if(i===void 0)return null;let a=e=>xe.find(n=>t.cells[n]?.satisfierId===e),[o,s]=i.satisfierIds,c=o===void 0?void 0:a(o),l=s===void 0?void 0:a(s);return c===void 0||l===void 0?null:{dependent:n[l],prerequisite:n[c],blockedReason:i.blockedReason}}function Ge(e){let t=(0,J.c)(29),{result:n,connection:a}=e,{_:o}=i(),s;if(t[0]!==o||t[1]!==a||t[2]!==n){s=Symbol.for(`react.early_return_sentinel`);bb0:{let e={projectMcp:o({id:`ggMMa7`}),projectSkill:o({id:`LtiJ5c`}),globalMcp:o({id:`2gXnCO`}),discoverySkill:o({id:`ejiJeW`})},t=We(n,a,e,`prerequisite-unavailable`);if(t!==null){let{dependent:e,prerequisite:n}=t;s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:(()=>{switch(t.blockedReason){case`foreign`:return o({id:`XrPvMT`,values:{dependent:e,prerequisite:n}});case`structural-na`:return o({id:`XNdXMR`,values:{dependent:e,prerequisite:n}});case`not-installable`:return o({id:`GTvYzA`,values:{dependent:e,prerequisite:n}});case`agent-undetected`:return o({id:`7Ny8bV`,values:{dependent:e,prerequisite:n}});default:return o({id:`h2QPvj`,values:{dependent:e,prerequisite:n}})}})()});break bb0}let r=We(n,a,e,`prerequisite-removed`);if(r!==null){s=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:o({id:`5CHuXn`,values:{0:r.dependent,1:r.prerequisite}})});break bb0}}t[0]=o,t[1]=a,t[2]=n,t[3]=s}else s=t[3];if(s!==Symbol.for(`react.early_return_sentinel`))return s;if(n.unavailable===!0){let e;t[4]!==o||t[5]!==n.devBuild?(e=n.devBuild===!0?o({id:`AUORpp`}):o({id:`RD8cCw`}),t[4]=o,t[5]=n.devBuild,t[6]=e):e=t[6];let r;return t[7]===e?r=t[8]:(r=(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:e}),t[7]=e,t[8]=r),r}let c;t[9]===o?c=t[10]:(c=e=>{switch(e.errorId){case`surface-missing`:return o({id:`3n7lnE`});case`foreign-artifact`:return o({id:`tCE-ZH`});case`no-writer`:case`not-installable`:return o({id:`BMoSQy`});case`dependency-failed`:return o({id:`1FXL-O`});case`write-declined`:return o({id:`_fZSIY`});case`write-failed`:case`executor-threw`:case`unrecognized-outcome`:return o({id:`dCforW`});default:return null}},t[9]=o,t[10]=c);let l=c,u=n.report.actions,d,f,p,m;if(t[11]!==l||t[12]!==n.error||t[13]!==n.report.actions){m=Symbol.for(`react.early_return_sentinel`);bb1:{let e;t[18]===l?e=t[19]:(e=e=>({key:e.satisfierId,title:Ue(e),managedInSkillsStudio:e.errorId===`no-writer`&&e.piece===`skill`&&e.scope===`user`,detail:l(e)}),t[18]=l,t[19]=e);let i=u.filter(Je).map(e).filter(qe);if(i.length===0){let e;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,Q.jsx)(`p`,{children:(0,Q.jsx)(r,{id:`fWsBTs`})}),t[20]=e):e=t[20];let i;t[21]===n.error?i=t[22]:(i=n.error===void 0?null:(0,Q.jsx)(`code`,{className:`block wrap-break-word font-mono text-xs opacity-80`,children:n.error}),t[21]=n.error,t[22]=i);let a;t[23]===i?a=t[24]:(a=(0,Q.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-sm text-destructive`,children:[e,i]}),t[23]=i,t[24]=a),m=a;break bb1}d=`alert`,f=`space-y-2 text-sm text-destructive`,p=i.map(Ke)}t[11]=l,t[12]=n.error,t[13]=n.report.actions,t[14]=d,t[15]=f,t[16]=p,t[17]=m}else d=t[14],f=t[15],p=t[16],m=t[17];if(m!==Symbol.for(`react.early_return_sentinel`))return m;let h;return t[25]!==d||t[26]!==f||t[27]!==p?(h=(0,Q.jsx)(`div`,{role:d,className:f,children:p}),t[25]=d,t[26]=f,t[27]=p,t[28]=h):h=t[28],h}function Ke(e){return(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[e.title===null?null:(0,Q.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,Q.jsx)(`p`,{children:e.managedInSkillsStudio?(0,Q.jsx)(r,{id:`5RiC8D`}):e.detail})]},e.key)}function qe(e){return e.managedInSkillsStudio||e.detail!==null}function Je(e){return e.errorId!==void 0}function Ye(){let e=(0,J.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,Q.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:(0,Q.jsx)(r,{id:`s8difl`})}),e[0]=t):t=e[0],t}function Xe(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`74Mikl`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Ze(e){let t=(0,J.c)(5),{label:n}=e,{_:r}=i(),a;t[0]!==r||t[1]!==n?(a=r({id:`2lJAvH`,values:{label:n}}),t[0]=r,t[1]=n,t[2]=a):a=t[2];let o;return t[3]===a?o=t[4]:(o=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:a}),t[3]=a,t[4]=o),o}function Qe(e){let t=(0,J.c)(141),{connection:n,open:a,onOpenChange:o,onSave:s,paired:c,onCloseAutoFocus:l,validateSave:u,alternateAction:d}=e,f=c===void 0?!1:c,{i18n:p,_:m}=i(),h=(0,q.useId)(),g;t[0]===n?g=t[1]:(g=()=>n===null?be:Me(n),t[0]=n,t[1]=g);let[_,v]=(0,q.useState)(g),[C,w]=(0,q.useState)(!1),[T,E]=(0,q.useState)(null),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),[j,M]=(0,q.useState)(null),N;t[2]!==n||t[3]!==_?(N=n!==null&&xe.some(e=>{let t=n.cells[e];return _[e]&&t!==void 0&&F(t.state)}),t[2]=n,t[3]=_,t[4]=N):N=t[4];let P=N,I;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(I=function(e,t){v(n=>({...n,[e]:t})),A(null),O(null),M(null)},t[5]=I):I=t[5];let L=I,R;t[6]!==n||t[7]!==_?(R=n!==null&&!_.projectSkill&&Ve(n,`projectSkill`),t[6]=n,t[7]=_,t[8]=R):R=t[8];let ee=R,z,B,V,H,fe,U,W,G,K,Y,me,he,ge,_e,X,ve,ye,Z;if(t[9]!==m||t[10]!==n||t[11]!==_||t[12]!==l||t[13]!==o||t[14]!==a||t[15]!==f||t[16]!==C||t[17]!==j||t[18]!==ee){let e=n===null?[]:Ce(n,`project`),i=n===null?[]:Ce(n,`machine`),s=n!==null&&e.length===0,c=n?.label,u=we(e),d=we(i),p;t[37]!==n?.cells||t[38]!==_?(p=xe.filter(e=>n?.cells[e]?.checked===!0&&!_[e]),t[37]=n?.cells,t[38]=_,t[39]=p):p=t[39],U=p.length;let h;t[40]!==n||t[41]!==_?(h=xe.filter(e=>n?.cells[e]!==void 0&&_[e]&&!n.cells[e]?.checked),t[40]=n,t[41]=_,t[42]=h):h=t[42],H=h.length;let g;t[43]!==m||t[44]!==H||t[45]!==U?(g=H>0&&U>0?m({id:`6tQC_t`,values:{addingCount:H,removingCount:U}}):H>0?S._({id:`xKcXG6`,values:{addingCount:H}}):U>0?S._({id:`0niWj3`,values:{removingCount:U}}):null,t[43]=m,t[44]=H,t[45]=U,t[46]=g):g=t[46];let v=g;W=U>0&&H===0;let y;t[47]!==_||t[48]!==W?(y=W&&xe.every(e=>!_[e]),t[47]=_,t[48]=W,t[49]=y):y=t[49];let b=y;Z=j!==null&&j.peerSatisfierIds.length>0;let x;t[50]!==m||t[51]!==H||t[52]!==n||t[53]!==b||t[54]!==U||t[55]!==j||t[56]!==v||t[57]!==Z?(x=n===null?null:j===null?b?m({id:`CCngW8`,values:{0:n.label}}):v:Z?m(H>0?{id:`0hAvVd`,values:{0:n.label,1:j.peers,addingCount:H,removingCount:U}}:{id:`yqr502`,values:{0:n.label,1:j.peers,removingCount:U}}):v,t[50]=m,t[51]=H,t[52]=n,t[53]=b,t[54]=U,t[55]=j,t[56]=v,t[57]=Z,t[58]=x):x=t[58],fe=x,V=ue,he=a,t[59]!==o||t[60]!==C?(ge=e=>!C&&o(e),t[59]=o,t[60]=C,t[61]=ge):ge=t[61],B=oe,G=`sm:max-w-lg`,K=!1,Y=l;let w;t[62]===n?w=t[63]:(w=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[62]=n,t[63]=w);let T=n?.label,E;t[64]!==w||t[65]!==T?(E=(0,Q.jsxs)(ae,{className:`flex items-center gap-2 text-lg`,children:[w,T]}),t[64]=w,t[65]=T,t[66]=E):E=t[66];let D;t[67]!==m||t[68]!==c||t[69]!==n||t[70]!==s?(D=m(n?s?{id:`bm1oV9`,values:{agentLabel:c}}:{id:`qr2gAH`,values:{0:n.label}}:{id:`CxnZP4`}),t[67]=m,t[68]=c,t[69]=n,t[70]=s,t[71]=D):D=t[71];let O;t[72]===D?O=t[73]:(O=(0,Q.jsx)(ie,{children:D}),t[72]=D,t[73]=O),t[74]!==E||t[75]!==O?(me=(0,Q.jsxs)(le,{className:`gap-2`,children:[E,O]}),t[74]=E,t[75]=O,t[76]=me):me=t[76],z=se,_e=`flex flex-col gap-6`,t[77]!==n||t[78]!==f?(X=f&&n?(0,Q.jsx)(Xe,{label:n.label}):null,t[77]=n,t[78]=f,t[79]=X):X=t[79],ve=e.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ZWyHmq`}),(0,Q.jsx)(re,{variant:`secondary`,className:`font-mono text-[10px] uppercase`,children:(0,Q.jsx)(r,{id:`WEYdDv`})})]}),e.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:u.get(t)??[],draft:_,setPart:L},t)}),ee?(0,Q.jsx)(Ye,{}):null]}):null,ye=i.length>0?(0,Q.jsxs)(de,{className:`gap-5`,children:[(0,Q.jsxs)(pe,{className:`flex items-center gap-2 font-mono data-[variant=legend]:text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),(0,Q.jsx)(r,{id:`ImTzPZ`})]}),i.map(e=>{let[t,n]=e;return(0,Q.jsx)(He,{part:t,cell:n,notes:d.get(t)??[],draft:_,setPart:L},t)})]}):null,t[9]=m,t[10]=n,t[11]=_,t[12]=l,t[13]=o,t[14]=a,t[15]=f,t[16]=C,t[17]=j,t[18]=ee,t[19]=z,t[20]=B,t[21]=V,t[22]=H,t[23]=fe,t[24]=U,t[25]=W,t[26]=G,t[27]=K,t[28]=Y,t[29]=me,t[30]=he,t[31]=ge,t[32]=_e,t[33]=X,t[34]=ve,t[35]=ye,t[36]=Z}else z=t[19],B=t[20],V=t[21],H=t[22],fe=t[23],U=t[24],W=t[25],G=t[26],K=t[27],Y=t[28],me=t[29],he=t[30],ge=t[31],_e=t[32],X=t[33],ve=t[34],ye=t[35],Z=t[36];let Se;t[80]!==n||t[81]!==T||t[82]!==D||t[83]!==j||t[84]!==k?(Se=j===null?k===null?D===null?T!==null&&n!==null?(0,Q.jsx)(Ge,{result:T,connection:n}):null:(0,Q.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:D}):(0,Q.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:k}):(0,Q.jsx)(it,{choice:j}),t[80]=n,t[81]=T,t[82]=D,t[83]=j,t[84]=k,t[85]=Se):Se=t[85];let $;t[86]!==z||t[87]!==Se||t[88]!==_e||t[89]!==X||t[90]!==ve||t[91]!==ye?($=(0,Q.jsxs)(z,{className:_e,children:[X,ve,ye,Se]}),t[86]=z,t[87]=Se,t[88]=_e,t[89]=X,t[90]=ve,t[91]=ye,t[92]=$):$=t[92];let Te;t[93]===fe?Te=t[94]:(Te=(0,Q.jsx)(`p`,{role:`status`,className:`me-auto text-xs text-muted-foreground`,"aria-live":`polite`,"aria-atomic":`true`,children:fe}),t[93]=fe,t[94]=Te);let Ee;t[95]===o?Ee=t[96]:(Ee=()=>o(!1),t[95]=o,t[96]=Ee);let De;t[97]===Symbol.for(`react.memo_cache_sentinel`)?(De=(0,Q.jsx)(r,{id:`dEgA5A`}),t[97]=De):De=t[97];let ke;t[98]!==C||t[99]!==Ee?(ke=(0,Q.jsx)(x,{variant:`outline`,className:`font-mono uppercase`,disabled:C,onClick:Ee,children:De}),t[98]=C,t[99]=Ee,t[100]=ke):ke=t[100];let Ae;t[101]!==d||t[102]!==h||t[103]!==C?(Ae=d===void 0?null:(0,Q.jsxs)(`div`,{className:`flex flex-col items-start gap-2 sm:items-end`,children:[d.preference===void 0?null:(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(y,{id:h,checked:d.preference.checked,disabled:C,onCheckedChange:e=>d.preference?.onCheckedChange(e===!0)}),(0,Q.jsx)(b,{htmlFor:h,className:`cursor-pointer text-sm`,children:d.preference.label})]}),(0,Q.jsx)(x,{variant:`ghost`,className:`font-mono uppercase`,disabled:C,onClick:d.onClick,children:d.label})]}),t[101]=d,t[102]=h,t[103]=C,t[104]=Ae):Ae=t[104];let je=P||U>0?`destructive`:`default`,Ne=C||(j===null?H+U===0:!Z),Pe;t[105]!==n||t[106]!==_||t[107]!==p||t[108]!==o||t[109]!==s||t[110]!==j?.peerSatisfierIds||t[111]!==u?(Pe=()=>{let e=u?.(_)??null;if(e!==null){A(e);return}w(!0),A(null),E(null),O(null);let t=j?.peerSatisfierIds;M(null),s(_,t).then(e=>{if(`kind`in e){O(e.message);return}if(e.ok){o(!1);return}let t=n===null?null:rt(e,n,p.locale);t===null?E(e):M(t)}).catch(()=>E({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null})).finally(()=>w(!1))},t[105]=n,t[106]=_,t[107]=p,t[108]=o,t[109]=s,t[110]=j?.peerSatisfierIds,t[111]=u,t[112]=Pe):Pe=t[112];let Fe;t[113]!==P||t[114]!==W||t[115]!==C||t[116]!==Z?(Fe=C?(0,Q.jsx)(r,{id:`uF9ruK`}):Z?(0,Q.jsx)(r,{id:`dGcsnU`}):P?(0,Q.jsx)(r,{id:`inJhKB`}):W?(0,Q.jsx)(r,{id:`t_YqKh`}):(0,Q.jsx)(r,{id:`y3aU20`}),t[113]=P,t[114]=W,t[115]=C,t[116]=Z,t[117]=Fe):Fe=t[117];let Ie;t[118]!==je||t[119]!==Ne||t[120]!==Pe||t[121]!==Fe?(Ie=(0,Q.jsx)(x,{variant:je,className:`font-mono uppercase`,disabled:Ne,onClick:Pe,children:Fe}),t[118]=je,t[119]=Ne,t[120]=Pe,t[121]=Fe,t[122]=Ie):Ie=t[122];let Le;t[123]!==Te||t[124]!==ke||t[125]!==Ae||t[126]!==Ie?(Le=(0,Q.jsxs)(ce,{className:`items-center`,children:[Te,ke,Ae,Ie]}),t[123]=Te,t[124]=ke,t[125]=Ae,t[126]=Ie,t[127]=Le):Le=t[127];let Re;t[128]!==B||t[129]!==G||t[130]!==K||t[131]!==Y||t[132]!==me||t[133]!==$||t[134]!==Le?(Re=(0,Q.jsxs)(B,{className:G,showCloseButton:K,onCloseAutoFocus:Y,children:[me,$,Le]}),t[128]=B,t[129]=G,t[130]=K,t[131]=Y,t[132]=me,t[133]=$,t[134]=Le,t[135]=Re):Re=t[135];let ze;return t[136]!==V||t[137]!==he||t[138]!==ge||t[139]!==Re?(ze=(0,Q.jsx)(V,{open:he,onOpenChange:ge,children:Re}),t[136]=V,t[137]=he,t[138]=ge,t[139]=Re,t[140]=ze):ze=t[140],ze}function $e(e){switch(e){case`projectMcp`:return(0,Q.jsx)(r,{id:`ggMMa7`});case`projectSkill`:return(0,Q.jsx)(r,{id:`LtiJ5c`});case`globalMcp`:return(0,Q.jsx)(r,{id:`2gXnCO`});case`discoverySkill`:return(0,Q.jsx)(r,{id:`ejiJeW`})}}function et(e,t){return xe.flatMap(n=>{let r=e.cells[n];return r?.checked===!0?[{cell:r,part:n,label:$e(n),path:r.resolvedPath??Y(r.pathId),scope:r.scope===`project`?`project`:`machine`,alsoAffects:r.piece===`skill`&&r.sharedFolderWith.length>0?K(r.sharedFolderWith.map(nt),t):null}]:[]})}function tt(e){let t=(0,J.c)(12),{scope:n,rows:a}=e,{_:o}=i();if(a.length===0)return null;let s;t[0]===n?s=t[1]:(s=(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 border-b bg-muted/60 px-3 py-2 font-mono text-xs uppercase tracking-wide text-muted-foreground`,children:[n===`project`?(0,Q.jsx)(te,{"aria-hidden":!0,className:`size-3.5`}):(0,Q.jsx)(ne,{"aria-hidden":!0,className:`size-3.5`}),n===`project`?(0,Q.jsx)(r,{id:`ZWyHmq`}):(0,Q.jsx)(r,{id:`ImTzPZ`})]}),t[0]=n,t[1]=s);let c;if(t[2]!==o||t[3]!==a){let e;t[5]===o?e=t[6]:(e=e=>{let t=e.alsoAffects;return(0,Q.jsxs)(`li`,{className:`flex items-start gap-3 px-3 py-3`,children:[(0,Q.jsx)(H,{"aria-hidden":!0,className:`mt-0.5 size-4 shrink-0 text-destructive`}),(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`p`,{className:`text-sm font-medium`,children:e.label}),e.path===null?null:(0,Q.jsx)(`code`,{className:`block truncate text-xs text-muted-foreground`,children:e.path}),t===null?null:(0,Q.jsx)(`p`,{className:`text-xs text-amber-700 dark:text-amber-400`,children:o({id:`qze9od`,values:{alsoAffects:t}})})]})]},e.cell.satisfierId)},t[5]=o,t[6]=e),c=a.map(e),t[2]=o,t[3]=a,t[4]=c}else c=t[4];let l;t[7]===c?l=t[8]:(l=(0,Q.jsx)(`ul`,{className:`divide-y divide-border`,children:c}),t[7]=c,t[8]=l);let u;return t[9]!==s||t[10]!==l?(u=(0,Q.jsxs)(`div`,{children:[s,l]}),t[9]=s,t[10]=l,t[11]=u):u=t[11],u}function nt(e){return D[e]??e}function rt(e,t,n){let r=e.report.conflicts.filter(e=>e.kind===`unresolved-shared-copy`),i=new Set(Object.values(t.cells).map(e=>e.satisfierId)),a=[...new Set(r.flatMap(e=>e.satisfierIds))].filter(e=>!i.has(e)),o=[...new Set(r.flatMap(e=>e.agentIds))].filter(e=>e!==t.id);if(a.length===0&&o.length===0)return null;let s=[...new Set(r.map(e=>Y(e.pathId)).filter(e=>e!==null))];return{peers:K(o.map(nt),n),path:s.length===1?s[0]:null,peerSatisfierIds:a}}function it(e){let t=(0,J.c)(5),{choice:n}=e,{peers:i,path:a}=n;if(n.peerSatisfierIds.length===0){let e;return t[0]===i?e=t[1]:(e=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:(0,Q.jsx)(r,{id:`H8tj8y`,values:{peers:i}})}),t[0]=i,t[1]=e),e}let o;return t[2]!==a||t[3]!==i?(o=(0,Q.jsx)(`div`,{role:`status`,className:`rounded-md border bg-muted/50 p-3 text-sm`,children:a===null?(0,Q.jsx)(r,{id:`4C2RCg`,values:{peers:i}}):(0,Q.jsx)(r,{id:`fybwfg`,values:{peers:i,path:a},components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}),t[2]=a,t[3]=i,t[4]=o):o=t[4],o}function at(e){let t=(0,J.c)(96),{connection:n,open:a,onOpenChange:o,onRemove:s,paired:c}=e,l=c===void 0?!1:c,{i18n:y,_:b}=i(),x=(0,q.useRef)(null),S=(0,q.useRef)(null),C,w;t[0]===a?(C=t[1],w=t[2]):(C=()=>{if(!a)return;let e=document.activeElement;x.current=e,S.current=e?.closest(`section`)??null},w=[a],t[0]=a,t[1]=C,t[2]=w),(0,q.useEffect)(C,w);let[T,E]=(0,q.useState)(!1),[D,O]=(0,q.useState)(null),[k,A]=(0,q.useState)(null),j,M,N,P,F,I,L,R,ee,te,z,ne,B,V,H,re;if(t[3]!==b||t[4]!==n||t[5]!==y||t[6]!==o||t[7]!==s||t[8]!==a||t[9]!==T){F=n?et(n,y.locale):[];let e;t[26]!==n||t[27]!==y||t[28]!==o||t[29]!==s?(e=function(e){n!==null&&(E(!0),O(null),A(null),s(e).then(e=>{if(e.ok){o(!1);return}let t=rt(e,n,y.locale);t===null?O(e):A(t)}).catch(e=>O({ok:!1,report:{actions:[],conflicts:[],withheld:[]},snapshot:null,error:e instanceof Error?e.message:String(e)})).finally(()=>E(!1)))},t[26]=n,t[27]=y,t[28]=o,t[29]=s,t[30]=e):e=t[30],I=e,P=v,ee=a,t[31]!==o||t[32]!==T?(te=e=>!T&&o(e),t[31]=o,t[32]=T,t[33]=te):te=t[33],N=u,re=`sm:max-w-lg`,t[34]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{let t=x.current,n=t?.isConnected?t:Z(S.current);n?.isConnected&&(e.preventDefault(),n.focus())},t[34]=L):L=t[34];let i;t[35]===n?i=t[36]:(i=n?(0,Q.jsx)(Oe,{agentId:n.id,className:`size-5 text-muted-foreground`}):null,t[35]=n,t[36]=i);let c;t[37]!==b||t[38]!==n?(c=b(n?{id:`ApNWRQ`,values:{0:n.label}}:{id:`Y1wa2r`}),t[37]=b,t[38]=n,t[39]=c):c=t[39];let l;t[40]!==i||t[41]!==c?(l=(0,Q.jsxs)(p,{className:`flex items-center gap-2 text-lg`,children:[i,c]}),t[40]=i,t[41]=c,t[42]=l):l=t[42];let f;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,Q.jsx)(h,{children:(0,Q.jsx)(r,{id:`da7Yfw`})}),t[43]=f):f=t[43],t[44]===l?R=t[45]:(R=(0,Q.jsxs)(d,{className:`gap-2`,children:[l,f]}),t[44]=l,t[45]=R),M=g,H=`flex flex-col gap-4`,B=`overflow-hidden rounded-lg border`,V=(0,Q.jsx)(tt,{scope:`project`,rows:F.filter(st)}),j=tt,z=`machine`,ne=F.filter(ot),t[3]=b,t[4]=n,t[5]=y,t[6]=o,t[7]=s,t[8]=a,t[9]=T,t[10]=j,t[11]=M,t[12]=N,t[13]=P,t[14]=F,t[15]=I,t[16]=L,t[17]=R,t[18]=ee,t[19]=te,t[20]=z,t[21]=ne,t[22]=B,t[23]=V,t[24]=H,t[25]=re}else j=t[10],M=t[11],N=t[12],P=t[13],F=t[14],I=t[15],L=t[16],R=t[17],ee=t[18],te=t[19],z=t[20],ne=t[21],B=t[22],V=t[23],H=t[24],re=t[25];let ie;t[46]!==j||t[47]!==z||t[48]!==ne?(ie=(0,Q.jsx)(j,{scope:z,rows:ne}),t[46]=j,t[47]=z,t[48]=ne,t[49]=ie):ie=t[49];let ae;t[50]!==ie||t[51]!==B||t[52]!==V?(ae=(0,Q.jsxs)(`div`,{className:B,children:[V,ie]}),t[50]=ie,t[51]=B,t[52]=V,t[53]=ae):ae=t[53];let oe;t[54]!==n||t[55]!==l?(oe=l&&n?(0,Q.jsx)(Ze,{label:n.label}):null,t[54]=n,t[55]=l,t[56]=oe):oe=t[56];let se;t[57]===Symbol.for(`react.memo_cache_sentinel`)?(se=(0,Q.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:(0,Q.jsx)(r,{id:`Evsh6U`})}),t[57]=se):se=t[57];let ce;t[58]!==n||t[59]!==D||t[60]!==k?(ce=k===null?D!==null&&n!==null?(0,Q.jsx)(Ge,{result:D,connection:n}):null:(0,Q.jsx)(it,{choice:k}),t[58]=n,t[59]=D,t[60]=k,t[61]=ce):ce=t[61];let le;t[62]!==M||t[63]!==ae||t[64]!==oe||t[65]!==ce||t[66]!==H?(le=(0,Q.jsxs)(M,{className:H,children:[ae,oe,se,ce]}),t[62]=M,t[63]=ae,t[64]=oe,t[65]=ce,t[66]=H,t[67]=le):le=t[67];let ue;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ue=(0,Q.jsx)(r,{id:`dEgA5A`}),t[68]=ue):ue=t[68];let de;t[69]===T?de=t[70]:(de=(0,Q.jsx)(f,{disabled:T,children:ue}),t[69]=T,t[70]=de);let fe=T||F.length===0||k!==null&&k.peerSatisfierIds.length===0,U;t[71]!==k?.peerSatisfierIds||t[72]!==I?(U=e=>{e.preventDefault(),I(k?.peerSatisfierIds)},t[71]=k?.peerSatisfierIds,t[72]=I,t[73]=U):U=t[73];let pe;t[74]!==T||t[75]!==k?(pe=T?(0,Q.jsx)(r,{id:`uF9ruK`}):k!==null&&k.peerSatisfierIds.length>0?(0,Q.jsx)(r,{id:`dGcsnU`}):(0,Q.jsx)(r,{id:`t_YqKh`}),t[74]=T,t[75]=k,t[76]=pe):pe=t[76];let W;t[77]!==fe||t[78]!==U||t[79]!==pe?(W=(0,Q.jsx)(m,{variant:`destructive`,className:`font-mono uppercase`,disabled:fe,onClick:U,children:pe}),t[77]=fe,t[78]=U,t[79]=pe,t[80]=W):W=t[80];let G;t[81]!==de||t[82]!==W?(G=(0,Q.jsxs)(_,{children:[de,W]}),t[81]=de,t[82]=W,t[83]=G):G=t[83];let K;t[84]!==N||t[85]!==L||t[86]!==R||t[87]!==le||t[88]!==G||t[89]!==re?(K=(0,Q.jsxs)(N,{className:re,onCloseAutoFocus:L,children:[R,le,G]}),t[84]=N,t[85]=L,t[86]=R,t[87]=le,t[88]=G,t[89]=re,t[90]=K):K=t[90];let Y;return t[91]!==P||t[92]!==ee||t[93]!==te||t[94]!==K?(Y=(0,Q.jsx)(P,{open:ee,onOpenChange:te,children:K}),t[91]=P,t[92]=ee,t[93]=te,t[94]=K,t[95]=Y):Y=t[95],Y}function ot(e){return e.scope===`machine`}function st(e){return e.scope===`project`}function ct(e,t,n=[]){let r=je(e);return[...n.map(e=>({satisfierId:e,desired:`absent`})),...xe.flatMap(n=>{let i=e.cells[n];return i===void 0||t[n]===r[n]?[]:[{satisfierId:i.satisfierId,desired:t[n]?`present`:`absent`}]})]}function lt(e,t=[]){let n=je(e),r=Object.fromEntries(xe.map(t=>[t,e.cells[t]?!1:n[t]])),i=t.map(e=>({satisfierId:e,desired:`absent`}));return[...ct(e,r),...i]}function ut(e){if(e.status===`nothing-required`)return`met`;let t=!1;for(let n of e.options){if(n.confidence===`unverified`){t=!0;continue}if(n.counts)return`met`}return t?`unprobed`:`unmet`}function dt(e,t,n){return n===!1?`absent`:n===!0?`present`:t===null||!t.detection.probed?`unknown`:L(t.detection,e)?`present`:`absent`}function ft(e){let{agentId:t,mode:n,snapshot:r,detected:i}=e;if(dt(t,r,i)===`absent`)return`not-installed`;if(r===null)return`no-status`;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.filter(e=>e.level===`required`);if(a.length===0)return`no-status`;let o=a.map(ut);return o.includes(`unprobed`)?`no-status`:o.includes(`unmet`)?`not-connected`:`connected`}function pt(e){return e===`enable-manually`?`external`:`terminal`}function mt(e){let{agentId:t,mode:n,snapshot:r,projectMcp:i}=e;if(r===null||i?.followup===void 0||ft(e)!==`connected`)return;let a=R({agentId:t,mode:n,probes:r.probes}).requirements.find(e=>e.level===`required`&&e.piece===`mcp`);if(a===void 0||a.status!==`met`)return;let o=a.options.filter(e=>e.counts);if(!(o.length!==1||o[0]?.id!==i.satisfierId))return i.followup}var ht={actions:[],conflicts:[],withheld:[]};function gt(e){return{ok:!1,report:ht,snapshot:null,error:e}}function _t(e){return e.conflicts.length===0&&e.actions.every(e=>e.errorId===void 0)}async function vt(e,t){let n=globalThis.window?.okDesktop;if(n!==void 0)try{let t=await n.agentIntegrations.apply({intents:e});return t.ok?{ok:!0,report:t.report,snapshot:t.snapshot}:{ok:!1,report:t.report,snapshot:t.snapshot,error:t.error,...t.unavailable===!0?{unavailable:!0}:{},...t.devBuild===!0?{devBuild:!0}:{}}}catch(e){return{ok:!1,report:ht,snapshot:null,error:e instanceof Error?e.message:String(e)}}let r;try{r=await fetch(`/api/agent-integrations/apply`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify({intents:e}),signal:t?.webSignal})}catch(e){return gt(e instanceof Error?e.message:String(e))}if(!r.ok)return gt(`HTTP ${r.status} ${r.statusText}`.trimEnd());let i;try{i=await r.json()}catch(e){return gt(e instanceof Error?e.message:String(e))}let a=w.safeParse(i);if(!a.success){let e=a.error.issues.map(e=>e.path.join(`.`));return console.warn(`[agent-connections] response schema drift`,{issues:e}),gt(`Unexpected response shape at ${e.join(`, `)}`)}let o={actions:a.data.actions,conflicts:a.data.conflicts,withheld:a.data.withheld};return{ok:_t(o),report:o,snapshot:a.data.snapshot}}var yt=new Set;function bt(e){return yt.add(e),()=>{yt.delete(e)}}async function xt(e,t){let n=await vt(e,t);if(e.length>0){let e=[...yt];for(let t of e)try{t(n)}catch(e){console.warn(`[agent-connections] change listener failed:`,e)}}return n}export{je as _,pt as a,Oe as c,De as d,ke as f,ct as g,Ne as h,mt as i,at as l,Ae as m,bt as n,dt as o,Pe as p,ft as r,Qe as s,xt as t,Fe as u,lt as v,Z as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,a as t,f as n,g as r,i,m as a,p as o,s,t as c,u as l,v as u,y as ee}from"./schemas-B93JY9Ef.js";import{Ft as d,It as te,Lt as ne,Mt as re,Nt as ie,Pt as ae,Rt as f,jt as oe}from"./schemas-api-DbKS2FSh.js";import{i as p,t as m}from"./constants-editors-DLxv8SuP.js";import{b as se}from"./handoff-Ccrokk1b.js";var h=[...m,`gemini`],g=c(h);function _(e){return h.includes(e)}var ce=c([`acp`,`terminal`,`external`]),le=c([...se,`gemini`]),ue=c([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),v=c([`mcp`,`skill`]),de=[`project`,`user`,`session`],fe=c(de),y=u().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),pe=u().min(1).transform(e=>e),me=u().min(1).transform(e=>e);function b(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function he(e){return e}function ge(e){return e}var _e=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],ve=he(`central-skill-store`);function x(e,t){return he(`${e}:${t}`)}function ye(e){if(e===ve)return{kind:`central-skill-store`};let t=e.indexOf(`:`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!_e.includes(n)||!m.includes(r)?null:{kind:n,editor:r}}var be=c(m),S=o({kind:c([`source-read`,`measured`,`vendor-doc`,`upstream-issue`,`observation`]),ref:u().min(1),note:u().optional()}),C=o({version:u().min(1).optional(),observedAt:u().min(1)}),xe=s(`confidence`,[o({confidence:l(`verified`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`assumed`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`contested`),evidence:i(S).min(1),verifiedAgainst:C})]),w=o({id:me,params:r(u(),ee([u(),n(),t()])).optional()}),Se=s(`mode`,[o({mode:l(`probeable`),strictness:i(d).min(1)}),o({mode:l(`unprobeable`),reason:c([`no-readable-state`,`different-machine`,`no-programmatic-path`,`session-scoped`]),note:u().optional()})]),Ce=c([`this-project`,`this-user`,`this-machine`]),we=c([`installable`,`user-completes`,`not-installable`]),Te=o({id:y,agent:g,piece:v,scope:fe,kind:ne,pathId:pe.optional(),sharedWith:i(g).default([]),prerequisites:i(y).default([]),consentClass:re.default(`none`),probe:Se,attestation:xe,audience:Ce,installability:we.default(`installable`),notInstallableReason:c([`no-non-interactive-verb`,`session-scoped`,`no-surface`]).optional(),preferred:t().default(!1),guidance:w.optional(),followup:w.optional(),troubleshooting:i(w).default([])}),Ee=o({piece:v,level:te,satisfiedByAny:i(y)}),De=o({acpAgentId:u().min(1),featuredOrder:n().int().nonnegative().nullable(),harnessCli:le.nullable(),harnessReadsEditorConfig:be.nullable(),harnessReadsEditorConfigAttestation:xe,verifiedPosture:c([`asks`,`self-managed`,`autonomous`]).nullable()}),Oe=o({cliId:u().min(1)}),T=[`darwin`,`win32`,`linux`],ke=c(T),Ae=o({targetId:ue,knownOrder:n().int().nonnegative(),visible:t(),displayName:u().min(1),appBrandName:u().min(1).optional(),schemes:i(u().min(1)),installUrl:u().min(1),platforms:i(ke).min(1),tagline:u().min(1).optional()}),je=o({requirements:i(Ee),caveats:i(w).default([])});o({id:g,setupDocSlug:u().min(1).nullable(),offerOnlyWhenDetected:t().default(!1),offersConnectionRow:t().default(!1),detectionSources:i(u().min(1)).default([]),satisfiers:i(Te),modes:a(ce,je),acp:De.optional(),terminal:Oe.optional(),external:Ae.optional()}),o({id:u().min(1),requiredStrictness:d,scope:fe.optional(),piece:v,revokedByForeignEntry:t().default(!1),guidance:w.optional()});var Me=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function E(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:Me(o),id:b({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??`none`,installability:i??`installable`,preferred:a??!1}}function D(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...a}=e,o={};for(let[e,t]of Object.entries(i))o[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...a,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:o}}var O=(e,t,n,r)=>b({agent:e,piece:t,scope:n,kind:r}),k=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),A=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),j=(...e)=>({mode:`probeable`,strictness:e}),Ne=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),M=(e,t)=>({id:ge(e),...t===void 0?{}:{params:t}}),Pe=(e,t)=>{let n=ae.find(t=>t===e);return n===void 0?void 0:M(`followup.${n}`,{agent:t})},N=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),P=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},Fe=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function F(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function I(e){let{appBrandName:t,tagline:n,platforms:r=T,...i}=e;return{...i,platforms:[...r],...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var L=(e,t)=>({kind:`observation`,ref:e,note:t}),R={observedAt:`2026-07-02`},z={cliEditors:`packages/cli/src/commands/editors.ts`,coreEditors:`packages/core/src/constants/editors.ts`,acpRegistry:`packages/server/src/acp/registry.ts`,threadManager:`packages/server/src/acp/thread-manager.ts`,writeProjectSkill:`packages/cli/src/integrations/write-project-skill.ts`,repairSkills:`packages/cli/src/commands/repair-skills.ts`,skillInstall:`packages/server/src/skill-install.ts`,presenceProbes:`packages/desktop/src/main/integrations-settings.ts`};function B(e){return E({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:x(`editor-user-config`,e.agent),probe:j(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:M(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function V(e){return E({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:x(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:j(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.mcp.project-config`,{agent:e.agent}),followup:Pe(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function H(e){return E({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:x(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function U(e){return E({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:x(`editor-user-skill-root`,e.agent),probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:M(`guidance.skill.user`,{agent:e.agent})})}function W(e){return E({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:Ne(`session-scoped`),attestation:P([N(z.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:M(`guidance.mcp.session-injection`,{agent:e})})}var G={claude:D({id:`claude`,setupDocSlug:p.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[B({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors,`user-global MCP config target`)])}),V({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors),N(z.coreEditors)]),troubleshooting:M(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),H({agent:`claude`,prerequisites:[O(`claude`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`claude`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`claude`)],modes:{external:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`claude`,`mcp`,`session`,`session-injection`),O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:P([N(z.threadManager,`the injection-skip probe reads the managed entry for this editor`),L(`claude-acp adapter`,`The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.`)],R),verifiedPosture:`asks`}),external:I({targetId:`claude-code`,knownOrder:1,visible:!0,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`})}),"claude-desktop":D({id:`claude-desktop`,setupDocSlug:p[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[B({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:M(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[k([O(`claude-desktop`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`claude-cowork`,knownOrder:0,visible:!1,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`})}),cursor:D({id:`cursor`,setupDocSlug:p.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[B({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors),N(z.coreEditors),{kind:`observation`,ref:`cursor-3.19.19-project-server-default-off`,note:`project .cursor/mcp.json server listed Disabled under Customize → MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it`}],{version:`3.19.19`,observedAt:`2026-09-09`}),troubleshooting:M(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),H({agent:`cursor`,prerequisites:[O(`cursor`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`cursor`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`cursor`)],modes:{external:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`cursor`,`mcp`,`session`,`session-injection`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:P([L(`cursor-agent mcp list`,`Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.`),N(z.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:I({targetId:`cursor`,knownOrder:3,visible:!0,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`})}),codex:D({id:`codex`,setupDocSlug:p.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[B({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`TOML user-global config target`)])}),V({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:Fe([N(z.cliEditors,`project config path added by analogy with the other editors`),{kind:`upstream-issue`,ref:`openai/codex#13025`,note:`open, reproduced on builds newer than the one OK checked`},{kind:`upstream-issue`,ref:`openai/codex#36960`,note:`requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks`},{kind:`vendor-doc`,ref:`OpenAI Codex: Advanced configuration`,note:`project-scoped config loads only for a trusted project`},{kind:`observation`,ref:`codex-desktop-project-config-load`,note:`single non-repro on 26.623.81905; the CLI honors it only for a trusted project`}],{version:`26.707.72221`,observedAt:`2026-07-15`}),troubleshooting:[M(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),M(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),H({agent:`codex`,prerequisites:[O(`codex`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)]),troubleshooting:M(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),U({agent:`codex`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`codex`)],modes:{external:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`codex`,`mcp`,`session`,`session-injection`),O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),L(`codex-acp adapter`,`The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.`)],R),verifiedPosture:`self-managed`}),external:I({targetId:`codex`,knownOrder:2,visible:!0,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`})}),copilot:D({id:`copilot`,setupDocSlug:p.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[B({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:P([{kind:`vendor-doc`,ref:`GitHub Copilot CLI — MCP configuration`,note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:`vendor-doc`,ref:`GitHub Docs: Adding MCP servers for Copilot CLI`,note:`project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`},N(z.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:M(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),H({agent:`copilot`,prerequisites:[O(`copilot`,`mcp`,`project`,`config-entry`),O(`copilot`,`mcp`,`user`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)])}),U({agent:`copilot`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`copilot`)],modes:{external:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`copilot`,`mcp`,`session`,`session-injection`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[L(`copilot CLI 1.0.80`,"The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:`1.0.80`,observedAt:`2026-08-20`}},verifiedPosture:null}),external:I({targetId:`copilot`,knownOrder:4,visible:!1,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`})}),opencode:D({id:`opencode`,setupDocSlug:p.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[B({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),V({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`the one project config that is not under a dotdir`)])}),H({agent:`opencode`,prerequisites:[O(`opencode`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`opencode`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`opencode`)],modes:{external:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`opencode`,`mcp`,`session`,`session-injection`),O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the opencode config`),L(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],R),verifiedPosture:null}),external:I({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:D({id:`openclaw`,setupDocSlug:p.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[B({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),E({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:ve,probe:j(`reclaim-permissive`),attestation:P([N(z.coreEditors),N(z.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:M(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:M(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:I({targetId:`openclaw`,knownOrder:8,visible:!1,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`})}),pi:D({id:`pi`,setupDocSlug:p.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[E({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:x(`editor-project-config`,`pi`),probe:j(`reclaim-permissive`,`injection-functional`),attestation:P([N(z.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),N(z.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:M(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),H({agent:`pi`,prerequisites:[O(`pi`,`mcp`,`project`,`managed-file`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)]),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),U({agent:`pi`,attestation:P([N(z.coreEditors,`the agent home nests one level below the dotdir`),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:P([L(`pi-acp@0.0.33`,"Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting — the same mapping, a different shape."),N(z.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:I({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:D({id:`antigravity`,setupDocSlug:p.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[B({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),U({agent:`antigravity`,attestation:P([N(z.coreEditors),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:I({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":D({id:`lm-studio`,setupDocSlug:p[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[B({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:P([N(z.cliEditors,`two candidate locations, resolved against what already exists`),{kind:`upstream-issue`,ref:`lmstudio-ai/lmstudio-bug-tracker#1371`,note:`documented config path differs from the one the app reads on macOS`},N(z.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:M(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[k([O(`lm-studio`,`mcp`,`user`,`config-entry`)]),A([])]}}}),hermes:D({id:`hermes`,setupDocSlug:p.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[B({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]},terminal:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:D({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[W(`gemini`)],modes:{acp:{requirements:[k([O(`gemini`,`mcp`,`session`,`session-injection`)]),A([])]}},acp:F({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:P([N(z.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],R),verifiedPosture:null})})};function Ie(e){return G[e]}var Le=Object.values(G).flatMap(e=>e.satisfiers),Re=new Map(Le.map(e=>[e.id,e]));function ze(e){return Re.get(e)}var K=Object.values(G).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));K.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var Be=Object.fromEntries(K.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(K.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var Ve=Object.fromEntries(K.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),He=Object.values(G).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),Ue=He.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,platforms:a,tagline:o})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,platforms:a,...o===void 0?{}:{tagline:o}}));function We(e,t){return t==null||e.platforms.includes(t)}var Ge=new Set(He.filter(e=>e.visible).map(e=>e.targetId)),Ke=Ue.filter(e=>Ge.has(e.id)),qe=m.filter(e=>G[e].offersConnectionRow),Je=new Map(Object.values(G).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function Ye(e){return Je.get(e)}var Xe=new Map(Object.values(G).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function Ze(e){return Xe.get(e)}Object.fromEntries(Object.values(G).flatMap(e=>{let t=e.satisfiers.find(e=>e.piece===`mcp`&&e.scope===`project`&&e.consentClass!==`none`)?.consentClass;return t===void 0?[]:[[e.id,t]]})),new Set(oe);var Qe=[{id:`mcp-preapproval`,piece:`mcp`,scope:`project`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!1},{id:`tool-autoapprove`,piece:`mcp`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!0}];Qe.map(e=>e.id);var q={satisfied:{counts:!0,exception:null},"present-consent-unknown":{counts:!0,exception:`info`},absent:{counts:!1,exception:null},foreign:{counts:!1,exception:`warning`},"foreign-replaceable":{counts:!1,exception:`warning`},drifted:{counts:!1,exception:`warning`},excluded:{counts:!1,exception:`info`},"structural-na":{counts:!1,exception:`info`},undetected:{counts:!1,exception:null},unprobeable:{counts:!0,exception:`info`},unprobed:{counts:!1,exception:`info`}};c([`count-unverified`,`not-count`]);var $e={acp:{unprobed:`count-unverified`},terminal:{unprobed:`count-unverified`},external:{unprobed:`not-count`}};c([`acp-catalog-supported`,`harness-cli-on-path`,`os-scheme-handler`]);var et={acp:{signal:`acp-catalog-supported`,unresolved:`show`,negativeOutranksOverride:!0},terminal:{signal:`harness-cli-on-path`,unresolved:`show`,negativeOutranksOverride:!1},external:{signal:`os-scheme-handler`,unresolved:`hide`,negativeOutranksOverride:!1}};function J(e){return typeof e==`object`&&!!e}function Y(e,t){if(!J(e))return;let{satisfiers:n}=e;if(!J(n))return;let r=n[t];if(!J(r))return;let{state:i,strictness:a,sharedWith:o}=r;if(typeof i!=`string`||i.length===0)return;let s=Array.isArray(a)?a.filter(e=>typeof e==`string`):void 0,c=Array.isArray(o)?o.filter(e=>typeof e==`string`&&_(e)):void 0;return{state:i,...s===void 0?{}:{strictness:s},...c===void 0||c.length===0?{}:{sharedWith:c}}}function tt(e,t){if(!J(e))return!1;let{detected:n}=e;return Array.isArray(n)&&n.includes(t)}function X(e,t){return e.probe.mode===`unprobeable`?`unprobeable`:Y(t,e.id)?.state??`unprobed`}function Z(e){return f(e)?q[e]:q.unprobed}function nt(e,t){let n=e.filter(e=>{let n=ze(e);return n===void 0?!0:!Z(X(n,t)).counts});return n.length===e.length?n:[]}function rt(e){return Z(e).exception===`warning`}function it(e){return e.state===`foreign`?`foreign`:e.state===`structural-na`?`structural-na`:e.installability===`not-installable`?`not-installable`:e.agentFolded?`agent-undetected`:null}function at(e,t){let n=t?.probed===!0?tt(t,e.id):null;return{detected:n,folded:e.offerOnlyWhenDetected&&n===!1}}function ot(e,t){return(Y(t,e.id)?.sharedWith??[]).filter(t=>t!==e.agent)}var st=de.filter(e=>e!==`session`);function ct(e){return ie.includes(e)}function lt(e,t,n){let r=[];for(let i of e.satisfiers){if(!ct(i.kind))continue;let a=X(i,t),o=t?.satisfiers?.[i.id]?.path,s=Z(a),c=nt(i.prerequisites,t),l=it({state:a,installability:i.installability,agentFolded:n});r.push({satisfierId:i.id,agentId:e.id,piece:i.piece,scope:i.scope,kind:i.kind,...i.pathId===void 0?{}:{pathId:i.pathId},...o===void 0?{}:{resolvedPath:o},audience:i.audience,state:a,checked:s.counts,exception:s.exception,folded:a===`undetected`,enabled:l===null,disabledReason:l,sharedWith:i.sharedWith,sharedFolderWith:ot(i,t),prerequisites:i.prerequisites,unmetPrerequisites:c,consentClass:i.consentClass,installability:i.installability,...i.guidance===void 0?{}:{guidance:i.guidance},...i.followup===void 0?{}:{followup:i.followup},troubleshooting:i.troubleshooting})}return r}function ut(e){let t=[];for(let n of st){let r=e.filter(e=>e.scope===n);r.length!==0&&t.push({scope:n,cells:r})}return t}function dt(e,t,n){let{detected:r,folded:i}=at(e,n),a=lt(e,t,i);return{agentId:e.id,detected:r,folded:i,setupDocSlug:e.setupDocSlug,scopes:ut(a)}}function ft(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&_(e)):h}function pt(e={}){let{agentIds:t,probes:n,detection:r}=e;return{rows:ft(t).map(e=>G[e]).filter(e=>e!==void 0).map(e=>dt(e,n,r))}}var Q={agent:g},mt={"followup.enable-manually":{params:e(Q)},"guidance.mcp.user-config":{params:e(Q)},"guidance.mcp.project-config":{params:e(Q)},"guidance.mcp.session-injection":{params:e(Q)},"guidance.mcp.managed-file":{params:e(Q)},"guidance.skill.project":{params:e(Q)},"guidance.skill.user":{params:e(Q)},"guidance.skill.central-store":{params:e(Q)},"troubleshooting.claude.project-entry-not-approved":{params:e(Q)},"troubleshooting.claude-desktop.per-tool-approval":{params:e(Q)},"troubleshooting.cursor.project-entry-not-loaded":{params:e({...Q,server:u().optional()})},"troubleshooting.codex.desktop-project-config":{params:e({...Q,honoredByDesktop:t()})},"troubleshooting.codex.folder-trust":{params:e(Q)},"troubleshooting.copilot.shared-workspace-config":{params:e({...Q,sourceAgent:g})},"troubleshooting.openclaw.central-store-missing":{params:e(Q)},"troubleshooting.pi.folder-trust":{params:e(Q)},"troubleshooting.lm-studio.config-path-mismatch":{params:e(Q)}};Object.keys(mt).sort(),Le.flatMap(e=>e.probe.mode===`probeable`?[{satisfierId:e.id,agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind,pathId:e.pathId??null,strictness:e.probe.strictness}]:[]).map(e=>e.satisfierId);var ht={verified:3,unverifiable:2,unverified:1};function gt(e,t){let n=et[e],r=typeof t==`boolean`?t:null;return{signal:n.signal,resolved:r,show:r??n.unresolved===`show`}}function _t(e,t,n){let r=ze(e);if(r===void 0)return{id:e,state:`absent`,counts:!1,confidence:`unverified`,exception:q.absent.exception,consentClass:`none`,troubleshooting:[]};let i=X(r,n),a=!f(i)||i===`unprobed`,o=$e[t].unprobed===`count-unverified`;return{id:e,state:i,counts:a?o:Z(i).counts,confidence:a?`unverified`:i===`unprobeable`?`unverifiable`:`verified`,exception:Z(i).exception,consentClass:r.consentClass,...r.guidance===void 0?{}:{guidance:r.guidance},...r.followup===void 0?{}:{followup:r.followup},troubleshooting:r.troubleshooting}}function vt(e,t,n){let r=e.satisfiedByAny.map(e=>_t(e,t,n));if(r.length===0)return{piece:e.piece,level:e.level,status:`nothing-required`,confidence:null,satisfiedBy:null,options:r};let i=null;for(let e of r)e.counts&&(i===null||ht[e.confidence]>ht[i.confidence])&&(i=e);return{piece:e.piece,level:e.level,status:i===null?`unmet`:`met`,confidence:i?.confidence??null,satisfiedBy:i?.id??null,options:r}}var yt=[`absent`,`structural-na`];function bt(e,t){let n=[];for(let r of Qe){let i=e.satisfiers.filter(e=>e.piece===r.piece&&e.kind!==`session-injection`&&(r.scope===void 0||e.scope===r.scope));r.revokedByForeignEntry&&i.some(e=>yt.includes(X(e,t))?!1:!$(Y(t,e.id),r.requiredStrictness))||i.some(e=>e.probe.mode!==`probeable`||!e.probe.strictness.includes(r.requiredStrictness)||!Z(X(e,t)).counts?!1:$(Y(t,e.id),r.requiredStrictness))&&n.push(r.id)}return n}function $(e,t){return e?.strictness?.includes(t)===!0}function xt(e){let{agentId:t,mode:n,probes:r,modeSignal:i}=e,a=_(t)?Ie(t):void 0;if(a===void 0)return{agentId:t,mode:n,verdict:`not-registered`,visibility:{...gt(n,i),show:!0},requirements:[],grantedCapabilities:[],modeCaveats:[]};let o=gt(n,i),s=a.modes[n];if(s===void 0)return{agentId:t,mode:n,verdict:`mode-not-available`,visibility:o,requirements:[],grantedCapabilities:[],modeCaveats:[]};let c=s.requirements.map(e=>vt(e,n,r)),l=c.some(e=>e.level===`required`&&e.status===`unmet`),u=c.some(e=>e.status===`unmet`);return{agentId:t,mode:n,verdict:l?`blocked`:u?`ready-with-nudges`:`ready`,visibility:o,requirements:c,grantedCapabilities:bt(a,r),modeCaveats:s.caveats}}export{Be as a,qe as c,Ye as d,Ze as f,ye as h,rt as i,Ue as l,We as m,pt as n,Ve as o,Ie as p,tt as r,G as s,xt as t,Ke as u};
|
|
1
|
+
import{_ as e,a as t,f as n,g as r,i,m as a,p as o,s,t as c,u as l,v as u,y as ee}from"./schemas-B93JY9Ef.js";import{Ft as d,It as te,Lt as ne,Mt as re,Nt as ie,Pt as ae,Rt as f,jt as oe}from"./schemas-api-CzN0ZSyO.js";import{i as p,t as m}from"./constants-editors-DLxv8SuP.js";import{b as se}from"./handoff-Dqe1NvVI.js";var h=[...m,`gemini`],g=c(h);function _(e){return h.includes(e)}var ce=c([`acp`,`terminal`,`external`]),le=c([...se,`gemini`]),ue=c([`claude-cowork`,`claude-code`,`codex`,`cursor`,`copilot`,`opencode`,`pi`,`antigravity`,`openclaw`,`hermes`]),v=c([`mcp`,`skill`]),de=[`project`,`user`,`session`],fe=c(de),y=u().regex(/^[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+\/[a-z0-9-]+$/).transform(e=>e),pe=u().min(1).transform(e=>e),me=u().min(1).transform(e=>e);function b(e){return`${e.agent}/${e.piece}/${e.scope}/${e.kind}`}function he(e){return e}function ge(e){return e}var _e=[`editor-user-config`,`editor-project-config`,`editor-project-skill-root`,`editor-user-skill-root`],ve=he(`central-skill-store`);function x(e,t){return he(`${e}:${t}`)}function ye(e){if(e===ve)return{kind:`central-skill-store`};let t=e.indexOf(`:`);if(t===-1)return null;let n=e.slice(0,t),r=e.slice(t+1);return!_e.includes(n)||!m.includes(r)?null:{kind:n,editor:r}}var be=c(m),S=o({kind:c([`source-read`,`measured`,`vendor-doc`,`upstream-issue`,`observation`]),ref:u().min(1),note:u().optional()}),C=o({version:u().min(1).optional(),observedAt:u().min(1)}),xe=s(`confidence`,[o({confidence:l(`verified`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`assumed`),evidence:i(S).min(1),verifiedAgainst:C.optional()}),o({confidence:l(`contested`),evidence:i(S).min(1),verifiedAgainst:C})]),w=o({id:me,params:r(u(),ee([u(),n(),t()])).optional()}),Se=s(`mode`,[o({mode:l(`probeable`),strictness:i(d).min(1)}),o({mode:l(`unprobeable`),reason:c([`no-readable-state`,`different-machine`,`no-programmatic-path`,`session-scoped`]),note:u().optional()})]),Ce=c([`this-project`,`this-user`,`this-machine`]),we=c([`installable`,`user-completes`,`not-installable`]),Te=o({id:y,agent:g,piece:v,scope:fe,kind:ne,pathId:pe.optional(),sharedWith:i(g).default([]),prerequisites:i(y).default([]),consentClass:re.default(`none`),probe:Se,attestation:xe,audience:Ce,installability:we.default(`installable`),notInstallableReason:c([`no-non-interactive-verb`,`session-scoped`,`no-surface`]).optional(),preferred:t().default(!1),guidance:w.optional(),followup:w.optional(),troubleshooting:i(w).default([])}),Ee=o({piece:v,level:te,satisfiedByAny:i(y)}),De=o({acpAgentId:u().min(1),featuredOrder:n().int().nonnegative().nullable(),harnessCli:le.nullable(),harnessReadsEditorConfig:be.nullable(),harnessReadsEditorConfigAttestation:xe,verifiedPosture:c([`asks`,`self-managed`,`autonomous`]).nullable()}),Oe=o({cliId:u().min(1)}),T=[`darwin`,`win32`,`linux`],ke=c(T),Ae=o({targetId:ue,knownOrder:n().int().nonnegative(),visible:t(),displayName:u().min(1),appBrandName:u().min(1).optional(),schemes:i(u().min(1)),installUrl:u().min(1),platforms:i(ke).min(1),tagline:u().min(1).optional()}),je=o({requirements:i(Ee),caveats:i(w).default([])});o({id:g,setupDocSlug:u().min(1).nullable(),offerOnlyWhenDetected:t().default(!1),offersConnectionRow:t().default(!1),detectionSources:i(u().min(1)).default([]),satisfiers:i(Te),modes:a(ce,je),acp:De.optional(),terminal:Oe.optional(),external:Ae.optional()}),o({id:u().min(1),requiredStrictness:d,scope:fe.optional(),piece:v,revokedByForeignEntry:t().default(!1),guidance:w.optional()});var Me=e=>e===void 0?[]:Array.isArray(e)?[...e]:[e];function E(e){let{sharedWith:t,prerequisites:n,consentClass:r,installability:i,preferred:a,troubleshooting:o,...s}=e;return{...s,troubleshooting:Me(o),id:b({agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind}),sharedWith:t??[],prerequisites:n??[],consentClass:r??`none`,installability:i??`installable`,preferred:a??!1}}function D(e){let{offerOnlyWhenDetected:t,offersConnectionRow:n,detectionSources:r,modes:i,...a}=e,o={};for(let[e,t]of Object.entries(i))o[e]={requirements:t.requirements,caveats:t.caveats??[]};return{...a,offerOnlyWhenDetected:t??!1,offersConnectionRow:n??!1,detectionSources:r??[],modes:o}}var O=(e,t,n,r)=>b({agent:e,piece:t,scope:n,kind:r}),k=e=>({piece:`mcp`,level:`required`,satisfiedByAny:e}),A=e=>({piece:`skill`,level:`recommended`,satisfiedByAny:e}),j=(...e)=>({mode:`probeable`,strictness:e}),Ne=(e,t)=>({mode:`unprobeable`,reason:e,...t===void 0?{}:{note:t}}),M=(e,t)=>({id:ge(e),...t===void 0?{}:{params:t}}),Pe=(e,t)=>{let n=ae.find(t=>t===e);return n===void 0?void 0:M(`followup.${n}`,{agent:t})},N=(e,t)=>({kind:`source-read`,ref:e,...t===void 0?{}:{note:t}}),P=(e,t)=>t===void 0?{confidence:`verified`,evidence:e}:{confidence:`verified`,evidence:e,verifiedAgainst:t},Fe=(e,t)=>({confidence:`contested`,evidence:e,verifiedAgainst:t});function F(e){return{acpAgentId:e.acpAgentId,featuredOrder:e.featuredOrder,harnessCli:e.harnessCli,harnessReadsEditorConfig:e.readsEditorConfig,harnessReadsEditorConfigAttestation:e.readsEditorConfigAttestation,verifiedPosture:e.verifiedPosture}}function I(e){let{appBrandName:t,tagline:n,platforms:r=T,...i}=e;return{...i,platforms:[...r],...t===void 0?{}:{appBrandName:t},...n===void 0?{}:{tagline:n}}}var L=(e,t)=>({kind:`observation`,ref:e,note:t}),R={observedAt:`2026-07-02`},z={cliEditors:`packages/cli/src/commands/editors.ts`,coreEditors:`packages/core/src/constants/editors.ts`,acpRegistry:`packages/server/src/acp/registry.ts`,threadManager:`packages/server/src/acp/thread-manager.ts`,writeProjectSkill:`packages/cli/src/integrations/write-project-skill.ts`,repairSkills:`packages/cli/src/commands/repair-skills.ts`,skillInstall:`packages/server/src/skill-install.ts`,presenceProbes:`packages/desktop/src/main/integrations-settings.ts`};function B(e){return E({agent:e.agent,piece:`mcp`,scope:`user`,kind:`config-entry`,pathId:x(`editor-user-config`,e.agent),probe:j(...e.strictness),attestation:e.attestation,audience:`this-user`,installability:e.installability,notInstallableReason:e.notInstallableReason,guidance:M(`guidance.mcp.user-config`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function V(e){return E({agent:e.agent,piece:`mcp`,scope:`project`,kind:`config-entry`,pathId:x(`editor-project-config`,e.fileOwner??e.agent),sharedWith:e.sharedWith,consentClass:e.consentClass,probe:j(...e.strictness),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.mcp.project-config`,{agent:e.agent}),followup:Pe(e.consentClass,e.agent),troubleshooting:e.troubleshooting})}function H(e){return E({agent:e.agent,piece:`skill`,scope:`project`,kind:`skill-bundle-copy`,pathId:x(`editor-project-skill-root`,e.agent),prerequisites:e.prerequisites,probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-project`,guidance:M(`guidance.skill.project`,{agent:e.agent}),troubleshooting:e.troubleshooting})}function U(e){return E({agent:e.agent,piece:`skill`,scope:`user`,kind:`skill-bundle-copy`,pathId:x(`editor-user-skill-root`,e.agent),probe:j(`reclaim-permissive`),attestation:e.attestation,audience:`this-user`,guidance:M(`guidance.skill.user`,{agent:e.agent})})}function W(e){return E({agent:e,piece:`mcp`,scope:`session`,kind:`session-injection`,probe:Ne(`session-scoped`),attestation:P([N(z.threadManager,`the session MCP config the thread manager builds per thread`)]),audience:`this-project`,installability:`not-installable`,notInstallableReason:`session-scoped`,guidance:M(`guidance.mcp.session-injection`,{agent:e})})}var G={claude:D({id:`claude`,setupDocSlug:p.claude,offersConnectionRow:!0,detectionSources:[`cli-on-path:claude`,`scheme-handler:claude-code`],satisfiers:[B({agent:`claude`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors,`user-global MCP config target`)])}),V({agent:`claude`,sharedWith:[`copilot`],consentClass:`approve-once`,strictness:[`reclaim-permissive`,`pre-approval-exact`,`injection-functional`],attestation:P([N(z.cliEditors),N(z.coreEditors)]),troubleshooting:M(`troubleshooting.claude.project-entry-not-approved`,{agent:`claude`})}),H({agent:`claude`,prerequisites:[O(`claude`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`claude`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`claude`)],modes:{external:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`claude`,`mcp`,`session`,`session-injection`),O(`claude`,`mcp`,`user`,`config-entry`),O(`claude`,`mcp`,`project`,`config-entry`)]),A([O(`claude`,`skill`,`project`,`skill-bundle-copy`),O(`claude`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`claude-acp`,featuredOrder:0,harnessCli:`claude`,readsEditorConfig:`claude`,readsEditorConfigAttestation:P([N(z.threadManager,`the injection-skip probe reads the managed entry for this editor`),L(`claude-acp adapter`,`The adapter runs Claude Code, which loads the MCP entry OK writes for the Claude editor on its own, so injecting a same-name duplicate would be redundant.`)],R),verifiedPosture:`asks`}),external:I({targetId:`claude-code`,knownOrder:1,visible:!0,displayName:`Claude`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Agentic coding in Claude Desktop's Code tab.`})}),"claude-desktop":D({id:`claude-desktop`,setupDocSlug:p[`claude-desktop`],offersConnectionRow:!1,detectionSources:[`scheme-handler:claude-code`],satisfiers:[B({agent:`claude-desktop`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`user-global config target; its path resolution throws on Linux`)]),troubleshooting:M(`troubleshooting.claude-desktop.per-tool-approval`,{agent:`claude-desktop`})})],modes:{external:{requirements:[k([O(`claude-desktop`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`claude-cowork`,knownOrder:0,visible:!1,displayName:`Claude Cowork`,appBrandName:`Claude Desktop`,schemes:[`claude:`],installUrl:`https://claude.com/download`,tagline:`Conversational pairing in Claude Desktop's Cowork tab.`})}),cursor:D({id:`cursor`,setupDocSlug:p.cursor,offersConnectionRow:!0,detectionSources:[`cli-on-path:cursor`,`scheme-handler:cursor`],satisfiers:[B({agent:`cursor`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`cursor`,consentClass:`enable-manually`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors),N(z.coreEditors),{kind:`observation`,ref:`cursor-3.19.19-project-server-default-off`,note:`project .cursor/mcp.json server listed Disabled under Customize → MCPs with no prompt; enabled via the per-source toggle in its Configure dialog; with a same-named user-level entry present, the user entry connected and the disabled project entry did not shadow it`}],{version:`3.19.19`,observedAt:`2026-09-09`}),troubleshooting:M(`troubleshooting.cursor.project-entry-not-loaded`,{agent:`cursor`})}),H({agent:`cursor`,prerequisites:[O(`cursor`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`cursor`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`cursor`)],modes:{external:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`cursor`,`mcp`,`user`,`config-entry`),O(`cursor`,`mcp`,`project`,`config-entry`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`cursor`,`mcp`,`session`,`session-injection`)]),A([O(`cursor`,`skill`,`project`,`skill-bundle-copy`),O(`cursor`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`cursor`,featuredOrder:3,harnessCli:`cursor`,readsEditorConfig:null,readsEditorConfigAttestation:P([L(`cursor-agent mcp list`,`Reports a config-declared entry that has not been approved as "not loaded (needs approval)", so a present entry says nothing about whether the agent will have the tools.`),N(z.threadManager,`the one agent the skip probe never stands down for`)],{observedAt:`2026-08-20`}),verifiedPosture:`self-managed`}),external:I({targetId:`cursor`,knownOrder:3,visible:!0,displayName:`Cursor`,schemes:[`cursor:`],installUrl:`https://cursor.com/`,tagline:`AI-first VS Code fork with multi-file edits.`})}),codex:D({id:`codex`,setupDocSlug:p.codex,offersConnectionRow:!0,detectionSources:[`cli-on-path:codex`,`scheme-handler:codex`],satisfiers:[B({agent:`codex`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`TOML user-global config target`)])}),V({agent:`codex`,consentClass:`trust-gated`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:Fe([N(z.cliEditors,`project config path added by analogy with the other editors`),{kind:`upstream-issue`,ref:`openai/codex#13025`,note:`open, reproduced on builds newer than the one OK checked`},{kind:`upstream-issue`,ref:`openai/codex#36960`,note:`requires an explicit trust decision in rust-v0.147.0, reverting #36935's automatic trust from the same release; builds from 0.113 asked but did not reliably persist the answer (#14547); codex exec never asks`},{kind:`vendor-doc`,ref:`OpenAI Codex: Advanced configuration`,note:`project-scoped config loads only for a trusted project`},{kind:`observation`,ref:`codex-desktop-project-config-load`,note:`single non-repro on 26.623.81905; the CLI honors it only for a trusted project`}],{version:`26.707.72221`,observedAt:`2026-07-15`}),troubleshooting:[M(`troubleshooting.codex.desktop-project-config`,{agent:`codex`,honoredByDesktop:!1}),M(`troubleshooting.codex.folder-trust`,{agent:`codex`})]}),H({agent:`codex`,prerequisites:[O(`codex`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)]),troubleshooting:M(`troubleshooting.codex.folder-trust`,{agent:`codex`})}),U({agent:`codex`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`codex`)],modes:{external:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`codex`,`mcp`,`session`,`session-injection`),O(`codex`,`mcp`,`user`,`config-entry`),O(`codex`,`mcp`,`project`,`config-entry`)]),A([O(`codex`,`skill`,`project`,`skill-bundle-copy`),O(`codex`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`codex-acp`,featuredOrder:1,harnessCli:`codex`,readsEditorConfig:`codex`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the Codex TOML config`),L(`codex-acp adapter`,`The adapter runs the Codex CLI, which loads the MCP servers declared in its own config, so the managed entry is already in the session.`)],R),verifiedPosture:`self-managed`}),external:I({targetId:`codex`,knownOrder:2,visible:!0,displayName:`ChatGPT`,appBrandName:`ChatGPT Desktop`,schemes:[`codex:`],installUrl:`https://developers.openai.com/codex/app`,tagline:`OpenAI's ChatGPT desktop app, home of the Codex agent.`})}),copilot:D({id:`copilot`,setupDocSlug:p.copilot,offersConnectionRow:!0,detectionSources:[`cli-on-path:copilot`],satisfiers:[B({agent:`copilot`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors)])}),V({agent:`copilot`,fileOwner:`claude`,sharedWith:[`claude`],consentClass:`trust-gated`,strictness:[`reclaim-permissive`],attestation:P([{kind:`vendor-doc`,ref:`GitHub Copilot CLI — MCP configuration`,note:"reads workspace `.mcp.json` or `.github/mcp.json`"},{kind:`vendor-doc`,ref:`GitHub Docs: Adding MCP servers for Copilot CLI`,note:`project-level servers load only after folder-trust confirmation; skipped silently in untrusted folders; under copilot -p they load only in an already-trusted folder unless GITHUB_COPILOT_PROMPT_MODE_WORKSPACE_MCP=true`},N(z.coreEditors,`OK deliberately writes no second copy for copilot`)],{version:`copilot CLI 1.0.80`,observedAt:`2026-08-20`}),troubleshooting:M(`troubleshooting.copilot.shared-workspace-config`,{agent:`copilot`,sourceAgent:`claude`})}),H({agent:`copilot`,prerequisites:[O(`copilot`,`mcp`,`project`,`config-entry`),O(`copilot`,`mcp`,`user`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)])}),U({agent:`copilot`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`copilot`)],modes:{external:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`copilot`,`mcp`,`user`,`config-entry`),O(`copilot`,`mcp`,`project`,`config-entry`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`copilot`,`mcp`,`session`,`session-injection`)]),A([O(`copilot`,`skill`,`project`,`skill-bundle-copy`),O(`copilot`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`github-copilot-cli`,featuredOrder:4,harnessCli:null,readsEditorConfig:null,readsEditorConfigAttestation:{confidence:`assumed`,evidence:[L(`copilot CLI 1.0.80`,"The CLI does read a workspace `.mcp.json`, but nobody has observed the ACP adapter loading the managed entry inside a session. Claiming it would stand our injection down on an unverified read and risk a thread with no OK tools, so the claim stays unmade and OK keeps injecting.")],verifiedAgainst:{version:`1.0.80`,observedAt:`2026-08-20`}},verifiedPosture:null}),external:I({targetId:`copilot`,knownOrder:4,visible:!1,displayName:`GitHub Copilot`,schemes:[],installUrl:`https://docs.github.com/en/copilot/how-tos/copilot-cli/cli-getting-started`,tagline:`GitHub's terminal-native coding agent.`})}),opencode:D({id:`opencode`,setupDocSlug:p.opencode,offersConnectionRow:!0,detectionSources:[`cli-on-path:opencode`],satisfiers:[B({agent:`opencode`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`XDG config dir; the win32 location is by analogy and unverified`)])}),V({agent:`opencode`,consentClass:`none`,strictness:[`reclaim-permissive`,`injection-functional`],attestation:P([N(z.cliEditors,`the one project config that is not under a dotdir`)])}),H({agent:`opencode`,prerequisites:[O(`opencode`,`mcp`,`project`,`config-entry`)],attestation:P([N(z.coreEditors),N(z.repairSkills)])}),U({agent:`opencode`,attestation:P([N(z.coreEditors),N(z.skillInstall)])}),W(`opencode`)],modes:{external:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`opencode`,`mcp`,`session`,`session-injection`),O(`opencode`,`mcp`,`user`,`config-entry`),O(`opencode`,`mcp`,`project`,`config-entry`)]),A([O(`opencode`,`skill`,`project`,`skill-bundle-copy`),O(`opencode`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`opencode`,featuredOrder:5,harnessCli:`opencode`,readsEditorConfig:`opencode`,readsEditorConfigAttestation:P([N(z.cliEditors,`the managed MCP entry OK writes into the opencode config`),L(`opencode-acp adapter`,`The adapter runs opencode, which loads its own configured MCP servers, so the managed entry is already in the session.`)],R),verifiedPosture:null}),external:I({targetId:`opencode`,knownOrder:5,visible:!1,displayName:`OpenCode`,schemes:[],installUrl:`https://opencode.ai`,tagline:`Open-source terminal coding agent; bring any local model.`})}),openclaw:D({id:`openclaw`,setupDocSlug:p.openclaw,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:openclaw`],satisfiers:[B({agent:`openclaw`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,"the one two-level server map, nested under `mcp.servers`")])}),E({agent:`openclaw`,piece:`skill`,scope:`user`,kind:`central-store-copy`,pathId:ve,probe:j(`reclaim-permissive`),attestation:P([N(z.coreEditors),N(z.skillInstall,`the hub is written only when it already exists`)]),audience:`this-user`,guidance:M(`guidance.skill.central-store`,{agent:`openclaw`}),troubleshooting:M(`troubleshooting.openclaw.central-store-missing`,{agent:`openclaw`})})],modes:{external:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]},terminal:{requirements:[k([O(`openclaw`,`mcp`,`user`,`config-entry`)]),A([O(`openclaw`,`skill`,`user`,`central-store-copy`)])]}},external:I({targetId:`openclaw`,knownOrder:8,visible:!1,displayName:`OpenClaw`,schemes:[],installUrl:`https://openclaw.ai`,tagline:`Open-source agent gateway; runs agents against your MCP servers.`})}),pi:D({id:`pi`,setupDocSlug:p.pi,offersConnectionRow:!0,detectionSources:[`cli-on-path:pi`],satisfiers:[E({agent:`pi`,piece:`mcp`,scope:`project`,kind:`managed-file`,pathId:x(`editor-project-config`,`pi`),probe:j(`reclaim-permissive`,`injection-functional`),attestation:P([N(z.cliEditors,`OK owns the whole file; currency is a first-line sentinel`),N(z.acpRegistry,`the thread provisions this file instead of injecting`)]),audience:`this-project`,guidance:M(`guidance.mcp.managed-file`,{agent:`pi`}),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),H({agent:`pi`,prerequisites:[O(`pi`,`mcp`,`project`,`managed-file`)],attestation:P([N(z.coreEditors),N(z.writeProjectSkill)]),troubleshooting:M(`troubleshooting.pi.folder-trust`,{agent:`pi`})}),U({agent:`pi`,attestation:P([N(z.coreEditors,`the agent home nests one level below the dotdir`),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]},acp:{requirements:[k([O(`pi`,`mcp`,`project`,`managed-file`)]),A([O(`pi`,`skill`,`project`,`skill-bundle-copy`),O(`pi`,`skill`,`user`,`skill-bundle-copy`)])]}},acp:F({acpAgentId:`pi-acp`,featuredOrder:null,harnessCli:`pi`,readsEditorConfig:`pi`,readsEditorConfigAttestation:P([L(`pi-acp@0.0.33`,"Pi has no MCP client at all: it accepts `mcpServers` at session/new, stores them write-only and never connects. Its wiring is a managed extension FILE in the project, which OK provisions instead of injecting — the same mapping, a different shape."),N(z.threadManager,`the bridge route that provisions the extension instead of injecting`)],{version:`0.0.33`,observedAt:`2026-08-20`}),verifiedPosture:`autonomous`}),external:I({targetId:`pi`,knownOrder:6,visible:!1,displayName:`Pi`,schemes:[],installUrl:`https://pi.dev`,tagline:`Minimal open-source terminal coding agent, extensible in TypeScript.`})}),antigravity:D({id:`antigravity`,setupDocSlug:p.antigravity,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:antigravity`],satisfiers:[B({agent:`antigravity`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`one user-global file shared by the IDE, the app and the CLI; per project you can only filter it`)])}),U({agent:`antigravity`,attestation:P([N(z.coreEditors),N(z.skillInstall)])})],modes:{external:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]},terminal:{requirements:[k([O(`antigravity`,`mcp`,`user`,`config-entry`)]),A([O(`antigravity`,`skill`,`user`,`skill-bundle-copy`)])]}},external:I({targetId:`antigravity`,knownOrder:7,visible:!1,displayName:`Antigravity`,schemes:[],installUrl:`https://antigravity.google`,tagline:"Google's agentic IDE + `agy` terminal agent."})}),"lm-studio":D({id:`lm-studio`,setupDocSlug:p[`lm-studio`],offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[],satisfiers:[B({agent:`lm-studio`,strictness:[`reclaim-permissive`],installability:`not-installable`,notInstallableReason:`no-non-interactive-verb`,attestation:P([N(z.cliEditors,`two candidate locations, resolved against what already exists`),{kind:`upstream-issue`,ref:`lmstudio-ai/lmstudio-bug-tracker#1371`,note:`documented config path differs from the one the app reads on macOS`},N(z.presenceProbes,`deliberately absent from the presence probes`)]),troubleshooting:M(`troubleshooting.lm-studio.config-path-mismatch`,{agent:`lm-studio`})})],modes:{external:{requirements:[k([O(`lm-studio`,`mcp`,`user`,`config-entry`)]),A([])]}}}),hermes:D({id:`hermes`,setupDocSlug:p.hermes,offersConnectionRow:!0,offerOnlyWhenDetected:!0,detectionSources:[`cli-on-path:hermes`],satisfiers:[B({agent:`hermes`,strictness:[`reclaim-permissive`],attestation:P([N(z.cliEditors,`the one YAML target; the whole config is a single user-global file`)])})],modes:{external:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]},terminal:{requirements:[k([O(`hermes`,`mcp`,`user`,`config-entry`)]),A([])]}},external:I({targetId:`hermes`,knownOrder:9,visible:!1,displayName:`Hermes`,schemes:[],installUrl:`https://hermes-agent.nousresearch.com`,tagline:`Nous Research's terminal coding agent.`})}),gemini:D({id:`gemini`,setupDocSlug:null,detectionSources:[`harness-bin:gemini`],satisfiers:[W(`gemini`)],modes:{acp:{requirements:[k([O(`gemini`,`mcp`,`session`,`session-injection`)]),A([])]}},acp:F({acpAgentId:`gemini`,featuredOrder:2,harnessCli:`gemini`,readsEditorConfig:null,readsEditorConfigAttestation:P([N(z.coreEditors,`gemini reaches OK as an ACP agent only; it has no editor config target`)],R),verifiedPosture:null})})};function Ie(e){return G[e]}var Le=Object.values(G).flatMap(e=>e.satisfiers),Re=new Map(Le.map(e=>[e.id,e]));function ze(e){return Re.get(e)}var K=Object.values(G).flatMap(e=>e.acp===void 0?[]:[{record:e,acp:e.acp}]).sort((e,t)=>e.acp.acpAgentId.localeCompare(t.acp.acpAgentId));K.filter(({acp:e})=>e.featuredOrder!==null).sort((e,t)=>(e.acp.featuredOrder??0)-(t.acp.featuredOrder??0)).map(({acp:e})=>e.acpAgentId);var Be=Object.fromEntries(K.flatMap(({acp:e})=>e.harnessCli===null?[]:[[e.acpAgentId,e.harnessCli]]));Object.fromEntries(K.flatMap(({acp:e})=>e.harnessReadsEditorConfig===null?[]:[[e.acpAgentId,e.harnessReadsEditorConfig]]));var Ve=Object.fromEntries(K.flatMap(({acp:e})=>e.verifiedPosture===null?[]:[[e.acpAgentId,e.verifiedPosture]])),He=Object.values(G).flatMap(e=>e.external===void 0?[]:[e.external]).sort((e,t)=>e.knownOrder-t.knownOrder),Ue=He.map(({targetId:e,displayName:t,appBrandName:n,schemes:r,installUrl:i,platforms:a,tagline:o})=>({id:e,displayName:t,...n===void 0?{}:{appBrandName:n},schemes:r,installUrl:i,platforms:a,...o===void 0?{}:{tagline:o}}));function We(e,t){return t==null||e.platforms.includes(t)}var Ge=new Set(He.filter(e=>e.visible).map(e=>e.targetId)),Ke=Ue.filter(e=>Ge.has(e.id)),qe=m.filter(e=>G[e].offersConnectionRow),Je=new Map(Object.values(G).flatMap(e=>e.external===void 0?[]:[[e.external.targetId,e.id]]));function Ye(e){return Je.get(e)}var Xe=new Map(Object.values(G).flatMap(e=>e.modes.terminal===void 0?[]:[[e.id,e.id]]));function Ze(e){return Xe.get(e)}Object.fromEntries(Object.values(G).flatMap(e=>{let t=e.satisfiers.find(e=>e.piece===`mcp`&&e.scope===`project`&&e.consentClass!==`none`)?.consentClass;return t===void 0?[]:[[e.id,t]]})),new Set(oe);var Qe=[{id:`mcp-preapproval`,piece:`mcp`,scope:`project`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!1},{id:`tool-autoapprove`,piece:`mcp`,requiredStrictness:`pre-approval-exact`,revokedByForeignEntry:!0}];Qe.map(e=>e.id);var q={satisfied:{counts:!0,exception:null},"present-consent-unknown":{counts:!0,exception:`info`},absent:{counts:!1,exception:null},foreign:{counts:!1,exception:`warning`},"foreign-replaceable":{counts:!1,exception:`warning`},drifted:{counts:!1,exception:`warning`},excluded:{counts:!1,exception:`info`},"structural-na":{counts:!1,exception:`info`},undetected:{counts:!1,exception:null},unprobeable:{counts:!0,exception:`info`},unprobed:{counts:!1,exception:`info`}};c([`count-unverified`,`not-count`]);var $e={acp:{unprobed:`count-unverified`},terminal:{unprobed:`count-unverified`},external:{unprobed:`not-count`}};c([`acp-catalog-supported`,`harness-cli-on-path`,`os-scheme-handler`]);var et={acp:{signal:`acp-catalog-supported`,unresolved:`show`,negativeOutranksOverride:!0},terminal:{signal:`harness-cli-on-path`,unresolved:`show`,negativeOutranksOverride:!1},external:{signal:`os-scheme-handler`,unresolved:`hide`,negativeOutranksOverride:!1}};function J(e){return typeof e==`object`&&!!e}function Y(e,t){if(!J(e))return;let{satisfiers:n}=e;if(!J(n))return;let r=n[t];if(!J(r))return;let{state:i,strictness:a,sharedWith:o}=r;if(typeof i!=`string`||i.length===0)return;let s=Array.isArray(a)?a.filter(e=>typeof e==`string`):void 0,c=Array.isArray(o)?o.filter(e=>typeof e==`string`&&_(e)):void 0;return{state:i,...s===void 0?{}:{strictness:s},...c===void 0||c.length===0?{}:{sharedWith:c}}}function tt(e,t){if(!J(e))return!1;let{detected:n}=e;return Array.isArray(n)&&n.includes(t)}function X(e,t){return e.probe.mode===`unprobeable`?`unprobeable`:Y(t,e.id)?.state??`unprobed`}function Z(e){return f(e)?q[e]:q.unprobed}function nt(e,t){let n=e.filter(e=>{let n=ze(e);return n===void 0?!0:!Z(X(n,t)).counts});return n.length===e.length?n:[]}function rt(e){return Z(e).exception===`warning`}function it(e){return e.state===`foreign`?`foreign`:e.state===`structural-na`?`structural-na`:e.installability===`not-installable`?`not-installable`:e.agentFolded?`agent-undetected`:null}function at(e,t){let n=t?.probed===!0?tt(t,e.id):null;return{detected:n,folded:e.offerOnlyWhenDetected&&n===!1}}function ot(e,t){return(Y(t,e.id)?.sharedWith??[]).filter(t=>t!==e.agent)}var st=de.filter(e=>e!==`session`);function ct(e){return ie.includes(e)}function lt(e,t,n){let r=[];for(let i of e.satisfiers){if(!ct(i.kind))continue;let a=X(i,t),o=t?.satisfiers?.[i.id]?.path,s=Z(a),c=nt(i.prerequisites,t),l=it({state:a,installability:i.installability,agentFolded:n});r.push({satisfierId:i.id,agentId:e.id,piece:i.piece,scope:i.scope,kind:i.kind,...i.pathId===void 0?{}:{pathId:i.pathId},...o===void 0?{}:{resolvedPath:o},audience:i.audience,state:a,checked:s.counts,exception:s.exception,folded:a===`undetected`,enabled:l===null,disabledReason:l,sharedWith:i.sharedWith,sharedFolderWith:ot(i,t),prerequisites:i.prerequisites,unmetPrerequisites:c,consentClass:i.consentClass,installability:i.installability,...i.guidance===void 0?{}:{guidance:i.guidance},...i.followup===void 0?{}:{followup:i.followup},troubleshooting:i.troubleshooting})}return r}function ut(e){let t=[];for(let n of st){let r=e.filter(e=>e.scope===n);r.length!==0&&t.push({scope:n,cells:r})}return t}function dt(e,t,n){let{detected:r,folded:i}=at(e,n),a=lt(e,t,i);return{agentId:e.id,detected:r,folded:i,setupDocSlug:e.setupDocSlug,scopes:ut(a)}}function ft(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`&&_(e)):h}function pt(e={}){let{agentIds:t,probes:n,detection:r}=e;return{rows:ft(t).map(e=>G[e]).filter(e=>e!==void 0).map(e=>dt(e,n,r))}}var Q={agent:g},mt={"followup.enable-manually":{params:e(Q)},"guidance.mcp.user-config":{params:e(Q)},"guidance.mcp.project-config":{params:e(Q)},"guidance.mcp.session-injection":{params:e(Q)},"guidance.mcp.managed-file":{params:e(Q)},"guidance.skill.project":{params:e(Q)},"guidance.skill.user":{params:e(Q)},"guidance.skill.central-store":{params:e(Q)},"troubleshooting.claude.project-entry-not-approved":{params:e(Q)},"troubleshooting.claude-desktop.per-tool-approval":{params:e(Q)},"troubleshooting.cursor.project-entry-not-loaded":{params:e({...Q,server:u().optional()})},"troubleshooting.codex.desktop-project-config":{params:e({...Q,honoredByDesktop:t()})},"troubleshooting.codex.folder-trust":{params:e(Q)},"troubleshooting.copilot.shared-workspace-config":{params:e({...Q,sourceAgent:g})},"troubleshooting.openclaw.central-store-missing":{params:e(Q)},"troubleshooting.pi.folder-trust":{params:e(Q)},"troubleshooting.lm-studio.config-path-mismatch":{params:e(Q)}};Object.keys(mt).sort(),Le.flatMap(e=>e.probe.mode===`probeable`?[{satisfierId:e.id,agent:e.agent,piece:e.piece,scope:e.scope,kind:e.kind,pathId:e.pathId??null,strictness:e.probe.strictness}]:[]).map(e=>e.satisfierId);var ht={verified:3,unverifiable:2,unverified:1};function gt(e,t){let n=et[e],r=typeof t==`boolean`?t:null;return{signal:n.signal,resolved:r,show:r??n.unresolved===`show`}}function _t(e,t,n){let r=ze(e);if(r===void 0)return{id:e,state:`absent`,counts:!1,confidence:`unverified`,exception:q.absent.exception,consentClass:`none`,troubleshooting:[]};let i=X(r,n),a=!f(i)||i===`unprobed`,o=$e[t].unprobed===`count-unverified`;return{id:e,state:i,counts:a?o:Z(i).counts,confidence:a?`unverified`:i===`unprobeable`?`unverifiable`:`verified`,exception:Z(i).exception,consentClass:r.consentClass,...r.guidance===void 0?{}:{guidance:r.guidance},...r.followup===void 0?{}:{followup:r.followup},troubleshooting:r.troubleshooting}}function vt(e,t,n){let r=e.satisfiedByAny.map(e=>_t(e,t,n));if(r.length===0)return{piece:e.piece,level:e.level,status:`nothing-required`,confidence:null,satisfiedBy:null,options:r};let i=null;for(let e of r)e.counts&&(i===null||ht[e.confidence]>ht[i.confidence])&&(i=e);return{piece:e.piece,level:e.level,status:i===null?`unmet`:`met`,confidence:i?.confidence??null,satisfiedBy:i?.id??null,options:r}}var yt=[`absent`,`structural-na`];function bt(e,t){let n=[];for(let r of Qe){let i=e.satisfiers.filter(e=>e.piece===r.piece&&e.kind!==`session-injection`&&(r.scope===void 0||e.scope===r.scope));r.revokedByForeignEntry&&i.some(e=>yt.includes(X(e,t))?!1:!$(Y(t,e.id),r.requiredStrictness))||i.some(e=>e.probe.mode!==`probeable`||!e.probe.strictness.includes(r.requiredStrictness)||!Z(X(e,t)).counts?!1:$(Y(t,e.id),r.requiredStrictness))&&n.push(r.id)}return n}function $(e,t){return e?.strictness?.includes(t)===!0}function xt(e){let{agentId:t,mode:n,probes:r,modeSignal:i}=e,a=_(t)?Ie(t):void 0;if(a===void 0)return{agentId:t,mode:n,verdict:`not-registered`,visibility:{...gt(n,i),show:!0},requirements:[],grantedCapabilities:[],modeCaveats:[]};let o=gt(n,i),s=a.modes[n];if(s===void 0)return{agentId:t,mode:n,verdict:`mode-not-available`,visibility:o,requirements:[],grantedCapabilities:[],modeCaveats:[]};let c=s.requirements.map(e=>vt(e,n,r)),l=c.some(e=>e.level===`required`&&e.status===`unmet`),u=c.some(e=>e.status===`unmet`);return{agentId:t,mode:n,verdict:l?`blocked`:u?`ready-with-nudges`:`ready`,visibility:o,requirements:c,grantedCapabilities:bt(a,r),modeCaveats:s.caveats}}export{Be as a,qe as c,Ye as d,Ze as f,ye as h,rt as i,Ue as l,We as m,pt as n,Ve as o,Ie as p,tt as r,G as s,xt as t,Ke as u};
|
|
@@ -1,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{Ht as l,Ut as u,Vt as d,at as f,ct as p,dt as m,ft as h,gt as g,ht as _,it as v,lt as y,nt as b,ot as x,rt as S,st as C,tt as w,ut 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{Ht as l,Ut as u,Vt as d,at as f,ct as p,dt as m,ft as h,gt as g,ht as _,it as v,lt as y,nt as b,ot as x,rt as S,st as C,tt as w,ut as T}from"./schemas-api-CzN0ZSyO.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-Qf_VPGzc.js";import{t as c}from"./dist-CSCUSbQc.js";import{t as l}from"./checkbox-CKD8LETI.js";import{t as u}from"./label-CvMpFFbN.js";import{i as d,n as ee,o as te,s as ne,t as re}from"./select-Bu4Wm3Rf.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as f}from"./dist-BGzUo_18.js";import{n as ae}from"./constants-editors-DLxv8SuP.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-CYZkBfwA.js";import{a as ce,c as le,i as ue,n as de,o as fe,s as pe,t as me}from"./dialog-BJEjKJjL.js";import{p as he,r as ge,t as _e}from"./skill-scope-N3jmnGIX.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-B9YEcMtk.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-NvVxu3-j.js";import{t as Ee}from"./use-skill-targets-ED9Nr02L.js";var p=a(),m=e(n(),1),h=t();function g(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(_,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function _(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:g,onOpenChange:_,returnFocus:v}=e,{_:y}=i(),Ne=(0,m.useId)(),Pe=he(),[b,Fe]=(0,m.useState)(c?.scope??o),Ie;t[0]!==n.names||t[1]!==c?(Ie=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ie):Ie=t[2];let[x,Le]=(0,m.useState)(Ie),[S,Re]=(0,m.useState)(!1),ze;t[3]===n.descriptions?ze=t[4]:(ze=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=ze);let[Be,Ve]=(0,m.useState)(ze),C=Ee(),[He,Ue]=(0,m.useState)(null),We=C.state.status===`ready`?C.state.data.targets:null,Ge;t[5]!==We||t[6]!==He?(Ge=He??new Set(We??[]),t[5]=We,t[6]=He,t[7]=Ge):Ge=t[7];let w=Ge,T=Te(),Ke=T.status===`ready`?T.data.find(e=>e.scope===b)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==b||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===b).map(Me)):new Set,t[8]=b,t[9]=T.data,t[10]=T.status,t[11]=Je):Je=t[11];let E=Je,Ye;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=new Set,t[12]=Ye):Ye=t[12];let[D,Xe]=(0,m.useState)(Ye),Ze=new Set;if(C.state.status===`ready`){let e;t[13]===C.state.data.folders?e=t[14]:(e=C.state.data.folders??[],t[13]=C.state.data.folders,t[14]=e);for(let t of e)t.scope===b&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===b)for(let t of e.customPlacements??[]){let e=ge(t);e&&Ze.add(e)}}let Qe=[...Ze].sort(),$e=c!==void 0,et,tt;t[15]!==a||t[16]!==$e?(et=()=>{if($e)return;let e=new AbortController;return ye(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(je)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,m.useEffect)(et,tt);let{plugin:O,names:k}=n,nt;if(t[19]!==E||t[20]!==k){let e;t[22]===E?e=t[23]:(e=e=>!E.has(e),t[22]=E,t[23]=e),nt=k.filter(e),t[19]=E,t[20]=k,t[21]=nt}else nt=t[21];let A=nt,j=x.size===A.length&&A.length>0,rt;t[24]===x?rt=t[25]:(rt=function(e,t){let n=new Set(x);t?n.add(e):n.delete(e),Le(n)},t[24]=x,t[25]=rt);let it=rt,at;t[26]!==y||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==g||t[31]!==_||t[32]!==O||t[33]!==b||t[34]!==x||t[35]!==a?(at=async function(){if(Re(!0),c){let e=await c.installSelected([...x]);if(Re(!1),e===null)return;e.size>0&&g?.(e),_(!1);return}let e=await be({source:a,skills:[...x],scope:b,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(y({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Ae).filter(ke),n=[...w];if(n.length>0)for(let e of t){let t=await ve({scope:b,name:e,targets:n,linkMode:!0});t.ok||f.error(y({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await xe({scope:b,name:n,dir:e,mode:`link`});t.ok||f.error(y({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}Re(!1);let{imported:r,alreadyImported:i,failed:o}=e;if(o>0){let t=e.results.filter(Oe).map(De).join(`, `);f.error(y({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(y({id:`uJfwF8`})):i>0?f.success(y({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(y({id:`-kKdCC`,values:{0:O??a,imported:r}}));let s=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||s.set(t.requested,t.name??t.requested);s.size>0&&g?.(s),_(!1)},t[26]=y,t[27]=D,t[28]=w,t[29]=c,t[30]=g,t[31]=_,t[32]=O,t[33]=b,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==_?(M=e=>{!e&&!S&&_(!1)},t[37]=S,t[38]=_,t[39]=M):M=t[39];let ct=ue,N;t[40]===v?N=t[41]:(N=e=>{v&&(e.preventDefault(),v())},t[40]=v,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,h.jsx)(le,{children:O?(0,h.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,h.jsx)(r,{id:`Q-DKvr`,values:{source:a}})}),t[42]=O,t[43]=a,t[44]=P):P=t[44];let F;t[45]===O?F=t[46]:(F=(0,h.jsx)(ce,{children:O?(0,h.jsx)(r,{id:`lj4cNf`}):(0,h.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,h.jsxs)(pe,{children:[P,F]}),t[47]=P,t[48]=F,t[49]=I):I=t[49];let lt=de,L;t[50]!==A.length||t[51]!==x.size?(L=(0,h.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,h.jsx)(r,{id:`lUtr1r`,values:{0:x.size,1:A.length}})}),t[50]=A.length,t[51]=x.size,t[52]=L):L=t[52];let R;t[53]!==j||t[54]!==A?(R=()=>Le(j?new Set:new Set(A)),t[53]=j,t[54]=A,t[55]=R):R=t[55];let z;t[56]===j?z=t[57]:(z=j?(0,h.jsx)(r,{id:`xCJdfg`}):(0,h.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,h.jsx)(ie,{variant:`ghost`,size:`sm`,disabled:S,onClick:R,children:z}),t[58]=S,t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==L||t[63]!==B?(V=(0,h.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,B]}),t[62]=L,t[63]=B,t[64]=V):V=t[64];let H;if(t[65]!==S||t[66]!==Be||t[67]!==E||t[68]!==k||t[69]!==x||t[70]!==it){let e;t[72]!==S||t[73]!==Be||t[74]!==E||t[75]!==x||t[76]!==it?(e=e=>{let t=Be.get(e),n=E.has(e);return(0,h.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,h.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,h.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,h.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,h.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=Be,t[74]=E,t[75]=x,t[76]=it,t[77]=e):e=t[77],H=k.map(e),t[65]=S,t[66]=Be,t[67]=E,t[68]=k,t[69]=x,t[70]=it,t[71]=H}else H=t[71];let U;t[78]===H?U=t[79]:(U=(0,h.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:H}),t[78]=H,t[79]=U);let W;t[80]===b?W=t[81]:(W=b===`project`?(0,h.jsx)(r,{id:`oVW7VD`}):(0,h.jsx)(r,{id:`7HY6fA`}),t[80]=b,t[81]=W);let ut=$e?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,h.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,h.jsx)(r,{id:`poAsUN`}),(0,h.jsxs)(we,{children:[(0,h.jsx)(Se,{asChild:!0,children:(0,h.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,h.jsx)(r,{id:`o-XJ9D`})})}),(0,h.jsxs)(Ce,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{htmlFor:Ne,children:(0,h.jsx)(r,{id:`7MSbAT`})}),(0,h.jsxs)(re,{value:b,disabled:S,onValueChange:e=>Fe(e),children:[(0,h.jsx)(te,{id:Ne,className:`w-full`,children:(0,h.jsx)(ne,{})}),(0,h.jsx)(ee,{children:_e.map(e=>(0,h.jsx)(d,{value:e,children:Pe[e]},e))})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{children:(0,h.jsx)(r,{id:`Y5la_5`})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,h.jsx)(l,{checked:w.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(w);t===!0?n.add(e):n.delete(e),Ue(n)}}),ae[e]??e]},e)),Qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,h.jsx)(l,{checked:D.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(D);t===!0?n.add(e):n.delete(e),Xe(n)}}),(0,h.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[W,ut]}),t[82]=W,t[83]=ut,t[84]=G):G=t[84];let K;t[85]!==lt||t[86]!==V||t[87]!==U||t[88]!==G?(K=(0,h.jsxs)(lt,{className:`flex flex-col gap-4`,children:[V,U,G]}),t[85]=lt,t[86]=V,t[87]=U,t[88]=G,t[89]=K):K=t[89];let q;t[90]===_?q=t[91]:(q=()=>_(!1),t[90]=_,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,h.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,h.jsx)(ie,{variant:`outline`,disabled:S,onClick:q,children:dt}),t[93]=S,t[94]=q,t[95]=J):J=t[95];let ft=S||x.size===0,Y;t[96]===ot?Y=t[97]:(Y=()=>void ot(),t[96]=ot,t[97]=Y);let X;t[98]!==S||t[99]!==x.size?(X=S?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,h.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,h.jsx)(r,{id:`TKQ7K-`}):(0,h.jsx)(r,{id:`9XwoPv`,values:{0:x.size}}),t[98]=S,t[99]=x.size,t[100]=X):X=t[100];let Z;t[101]!==ft||t[102]!==Y||t[103]!==X?(Z=(0,h.jsx)(ie,{"data-testid":`plugin-bundle-install`,disabled:ft,onClick:Y,children:X}),t[101]=ft,t[102]=Y,t[103]=X,t[104]=Z):Z=t[104];let Q;t[105]!==J||t[106]!==Z?(Q=(0,h.jsxs)(fe,{children:[J,Z]}),t[105]=J,t[106]=Z,t[107]=Q):Q=t[107];let $;t[108]!==ct||t[109]!==N||t[110]!==I||t[111]!==K||t[112]!==Q?($=(0,h.jsxs)(ct,{className:`sm:max-w-lg`,onCloseAutoFocus:N,children:[I,K,Q]}),t[108]=ct,t[109]=N,t[110]=I,t[111]=K,t[112]=Q,t[113]=$):$=t[113];let pt;return t[114]!==st||t[115]!==M||t[116]!==$?(pt=(0,h.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function De(e){return e.requested}function Oe(e){return e.status===`failed`||e.status===`not-found`}function ke(e){return typeof e==`string`}function Ae(e){return e.name}function je(e){return[e.name,e.description]}function Me(e){return e.name}function v(e){let t=(0,p.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,l=a!==void 0&&a?c:`div`,u;t[5]===n?u=t[6]:(u=o(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==r||t[9]!==s||t[10]!==u?(d=(0,h.jsx)(l,{"data-slot":`card`,"data-size":s,className:u,...r}),t[7]=l,t[8]=r,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function y(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ne(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function b(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ie(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ie as a,g as c,Pe as i,b as n,y as o,Fe as r,Ne as s,v as t};
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./compiler-runtime-BfE3aGVn.js";import{t as o}from"./utils-CPqDy6Hr.js";import{n as s}from"./AgentIconCluster-Qf_VPGzc.js";import{t as c}from"./dist-CSCUSbQc.js";import{t as l}from"./checkbox-CKD8LETI.js";import{t as u}from"./label-CvMpFFbN.js";import{i as d,n as ee,o as te,s as ne,t as re}from"./select-Bu4Wm3Rf.js";import{t as ie}from"./button-DzgjsZzC.js";import{n as f}from"./dist-BGzUo_18.js";import{n as ae}from"./constants-editors-DLxv8SuP.js";import{t as oe}from"./spinner-Bx8xD6f8.js";import{a as se}from"./SkillInstallMenu-ChTMNTo3.js";import{a as ce,c as le,i as ue,n as de,o as fe,s as pe,t as me}from"./dialog-BJEjKJjL.js";import{p as he,r as ge,t as _e}from"./skill-scope-N3jmnGIX.js";import{h as ve,i as ye,p as be,x as xe}from"./skills-api-DZKblPpK.js";import{a as Se,i as Ce,t as we}from"./popover-BhiLJhH5.js";import{t as Te}from"./use-skills-CdEaAQQ2.js";import{t as Ee}from"./use-skill-targets-6h1qor3V.js";var p=a(),m=e(n(),1),h=t();function g(e){let t=(0,p.c)(2);if(!e.bundle)return null;let n;return t[0]===e?n=t[1]:(n=(0,h.jsx)(_,{...e,bundle:e.bundle}),t[0]=e,t[1]=n),n}function _(e){let t=(0,p.c)(118),{bundle:n,source:a,defaultScope:o,installOverride:c,onInstalled:g,onOpenChange:_,returnFocus:v}=e,{_:y}=i(),Ne=(0,m.useId)(),Pe=he(),[b,Fe]=(0,m.useState)(c?.scope??o),Ie;t[0]!==n.names||t[1]!==c?(Ie=()=>c?new Set(n.names):new Set,t[0]=n.names,t[1]=c,t[2]=Ie):Ie=t[2];let[x,Le]=(0,m.useState)(Ie),[S,Re]=(0,m.useState)(!1),ze;t[3]===n.descriptions?ze=t[4]:(ze=()=>new Map(Object.entries(n.descriptions??{})),t[3]=n.descriptions,t[4]=ze);let[Be,Ve]=(0,m.useState)(ze),C=Ee(),[He,Ue]=(0,m.useState)(null),We=C.state.status===`ready`?C.state.data.targets:null,Ge;t[5]!==We||t[6]!==He?(Ge=He??new Set(We??[]),t[5]=We,t[6]=He,t[7]=Ge):Ge=t[7];let w=Ge,T=Te(),Ke=T.status===`ready`?T.data.find(e=>e.scope===b)?.installableEditors:void 0,qe=se.filter(e=>!Ke||Ke.includes(e)||w.has(e)),Je;t[8]!==b||t[9]!==T.data||t[10]!==T.status?(Je=T.status===`ready`?new Set(T.data.filter(e=>e.scope===b).map(Me)):new Set,t[8]=b,t[9]=T.data,t[10]=T.status,t[11]=Je):Je=t[11];let E=Je,Ye;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(Ye=new Set,t[12]=Ye):Ye=t[12];let[D,Xe]=(0,m.useState)(Ye),Ze=new Set;if(C.state.status===`ready`){let e;t[13]===C.state.data.folders?e=t[14]:(e=C.state.data.folders??[],t[13]=C.state.data.folders,t[14]=e);for(let t of e)t.scope===b&&(se.includes(t.host)||t.root&&Ze.add(t.root))}if(T.status===`ready`){for(let e of T.data)if(e.scope===b)for(let t of e.customPlacements??[]){let e=ge(t);e&&Ze.add(e)}}let Qe=[...Ze].sort(),$e=c!==void 0,et,tt;t[15]!==a||t[16]!==$e?(et=()=>{if($e)return;let e=new AbortController;return ye(a,e.signal).then(t=>{e.signal.aborted||!t.ok||Ve(new Map(t.skills.map(je)))}),()=>e.abort()},tt=[a,$e],t[15]=a,t[16]=$e,t[17]=et,t[18]=tt):(et=t[17],tt=t[18]),(0,m.useEffect)(et,tt);let{plugin:O,names:k}=n,nt;if(t[19]!==E||t[20]!==k){let e;t[22]===E?e=t[23]:(e=e=>!E.has(e),t[22]=E,t[23]=e),nt=k.filter(e),t[19]=E,t[20]=k,t[21]=nt}else nt=t[21];let A=nt,j=x.size===A.length&&A.length>0,rt;t[24]===x?rt=t[25]:(rt=function(e,t){let n=new Set(x);t?n.add(e):n.delete(e),Le(n)},t[24]=x,t[25]=rt);let it=rt,at;t[26]!==y||t[27]!==D||t[28]!==w||t[29]!==c||t[30]!==g||t[31]!==_||t[32]!==O||t[33]!==b||t[34]!==x||t[35]!==a?(at=async function(){if(Re(!0),c){let e=await c.installSelected([...x]);if(Re(!1),e===null)return;e.size>0&&g?.(e),_(!1);return}let e=await be({source:a,skills:[...x],scope:b,install:!1,marketplace:!0});if(!e.ok){Re(!1),f.error(y({id:`Lbl6KA`,values:{0:O??a,1:e.error}}));return}let t=e.results.map(Ae).filter(ke),n=[...w];if(n.length>0)for(let e of t){let t=await ve({scope:b,name:e,targets:n,linkMode:!0});t.ok||f.error(y({id:`1oSHI0`,values:{0:t.error,skillName:e}}))}for(let e of D)for(let n of t){let t=await xe({scope:b,name:n,dir:e,mode:`link`});t.ok||f.error(y({id:`OkC7-2`,values:{0:t.error,skillName:n,root:e}}))}Re(!1);let{imported:r,alreadyImported:i,failed:o}=e;if(o>0){let t=e.results.filter(Oe).map(De).join(`, `);f.error(y({id:`cMMb6H`,values:{imported:r,failed:o,failedNames:t}}))}else r===0?f.info(y({id:`uJfwF8`})):i>0?f.success(y({id:`tkIXtS`,values:{imported:r,alreadyImported:i}})):f.success(y({id:`-kKdCC`,values:{0:O??a,imported:r}}));let s=new Map;for(let t of e.results)t.status!==`imported`&&t.status!==`already-imported`||s.set(t.requested,t.name??t.requested);s.size>0&&g?.(s),_(!1)},t[26]=y,t[27]=D,t[28]=w,t[29]=c,t[30]=g,t[31]=_,t[32]=O,t[33]=b,t[34]=x,t[35]=a,t[36]=at):at=t[36];let ot=at,st=me,M;t[37]!==S||t[38]!==_?(M=e=>{!e&&!S&&_(!1)},t[37]=S,t[38]=_,t[39]=M):M=t[39];let ct=ue,N;t[40]===v?N=t[41]:(N=e=>{v&&(e.preventDefault(),v())},t[40]=v,t[41]=N);let P;t[42]!==O||t[43]!==a?(P=(0,h.jsx)(le,{children:O?(0,h.jsx)(r,{id:`J86siq`,values:{plugin:O}}):(0,h.jsx)(r,{id:`Q-DKvr`,values:{source:a}})}),t[42]=O,t[43]=a,t[44]=P):P=t[44];let F;t[45]===O?F=t[46]:(F=(0,h.jsx)(ce,{children:O?(0,h.jsx)(r,{id:`lj4cNf`}):(0,h.jsx)(r,{id:`4mDIcg`})}),t[45]=O,t[46]=F);let I;t[47]!==P||t[48]!==F?(I=(0,h.jsxs)(pe,{children:[P,F]}),t[47]=P,t[48]=F,t[49]=I):I=t[49];let lt=de,L;t[50]!==A.length||t[51]!==x.size?(L=(0,h.jsx)(`p`,{className:`font-medium text-xs font-mono text-foreground/70 uppercase tracking-wider`,children:(0,h.jsx)(r,{id:`lUtr1r`,values:{0:x.size,1:A.length}})}),t[50]=A.length,t[51]=x.size,t[52]=L):L=t[52];let R;t[53]!==j||t[54]!==A?(R=()=>Le(j?new Set:new Set(A)),t[53]=j,t[54]=A,t[55]=R):R=t[55];let z;t[56]===j?z=t[57]:(z=j?(0,h.jsx)(r,{id:`xCJdfg`}):(0,h.jsx)(r,{id:`wgNoIs`}),t[56]=j,t[57]=z);let B;t[58]!==S||t[59]!==R||t[60]!==z?(B=(0,h.jsx)(ie,{variant:`ghost`,size:`sm`,disabled:S,onClick:R,children:z}),t[58]=S,t[59]=R,t[60]=z,t[61]=B):B=t[61];let V;t[62]!==L||t[63]!==B?(V=(0,h.jsxs)(`div`,{className:`flex items-center justify-between`,children:[L,B]}),t[62]=L,t[63]=B,t[64]=V):V=t[64];let H;if(t[65]!==S||t[66]!==Be||t[67]!==E||t[68]!==k||t[69]!==x||t[70]!==it){let e;t[72]!==S||t[73]!==Be||t[74]!==E||t[75]!==x||t[76]!==it?(e=e=>{let t=Be.get(e),n=E.has(e);return(0,h.jsxs)(u,{className:`flex cursor-pointer items-start gap-3 p-3 text-sm font-normal hover:bg-muted/40`,children:[(0,h.jsx)(l,{checked:n||x.has(e),disabled:S||n,onCheckedChange:t=>it(e,t===!0),className:`mt-0.5`}),(0,h.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,h.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,h.jsx)(`span`,{className:`font-mono`,children:e}),n?(0,h.jsx)(`span`,{className:`shrink-0 rounded-sm bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground uppercase tracking-wide`,children:(0,h.jsx)(r,{id:`eQkgKV`})}):null]}),t?(0,h.jsx)(`span`,{className:`text-1sm text-muted-foreground line-clamp-2`,children:t}):null]})]},e)},t[72]=S,t[73]=Be,t[74]=E,t[75]=x,t[76]=it,t[77]=e):e=t[77],H=k.map(e),t[65]=S,t[66]=Be,t[67]=E,t[68]=k,t[69]=x,t[70]=it,t[71]=H}else H=t[71];let U;t[78]===H?U=t[79]:(U=(0,h.jsx)(`div`,{className:`max-h-72 overflow-y-auto rounded-md border border-border divide-y divide-border`,children:H}),t[78]=H,t[79]=U);let W;t[80]===b?W=t[81]:(W=b===`project`?(0,h.jsx)(r,{id:`oVW7VD`}):(0,h.jsx)(r,{id:`7HY6fA`}),t[80]=b,t[81]=W);let ut=$e?null:(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(`span`,{"aria-hidden":!0,children:`·`}),w.size+D.size>0?(0,h.jsx)(s,{hosts:[...w,...D],iconClassName:`size-3.5`}):(0,h.jsx)(r,{id:`poAsUN`}),(0,h.jsxs)(we,{children:[(0,h.jsx)(Se,{asChild:!0,children:(0,h.jsx)(ie,{variant:`link`,size:`sm`,className:`h-auto px-1`,disabled:S,"data-testid":`plugin-bundle-change-destination`,children:(0,h.jsx)(r,{id:`o-XJ9D`})})}),(0,h.jsxs)(Ce,{align:`start`,className:`flex w-72 flex-col gap-4`,children:[(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{htmlFor:Ne,children:(0,h.jsx)(r,{id:`7MSbAT`})}),(0,h.jsxs)(re,{value:b,disabled:S,onValueChange:e=>Fe(e),children:[(0,h.jsx)(te,{id:Ne,className:`w-full`,children:(0,h.jsx)(ne,{})}),(0,h.jsx)(ee,{children:_e.map(e=>(0,h.jsx)(d,{value:e,children:Pe[e]},e))})]})]}),(0,h.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,h.jsx)(u,{children:(0,h.jsx)(r,{id:`Y5la_5`})}),(0,h.jsxs)(`div`,{className:`flex flex-wrap gap-x-4 gap-y-2`,children:[qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 text-sm font-normal`,children:[(0,h.jsx)(l,{checked:w.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(w);t===!0?n.add(e):n.delete(e),Ue(n)}}),ae[e]??e]},e)),Qe.map(e=>(0,h.jsxs)(u,{className:`flex cursor-pointer items-center gap-2 font-normal text-sm`,children:[(0,h.jsx)(l,{checked:D.has(e),disabled:S,onCheckedChange:t=>{let n=new Set(D);t===!0?n.add(e):n.delete(e),Xe(n)}}),(0,h.jsx)(`span`,{className:`font-mono text-xs`,children:e})]},e))]})]})]})]})]}),G;t[82]!==W||t[83]!==ut?(G=(0,h.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 text-1sm text-muted-foreground`,"data-testid":`plugin-bundle-destination`,children:[W,ut]}),t[82]=W,t[83]=ut,t[84]=G):G=t[84];let K;t[85]!==lt||t[86]!==V||t[87]!==U||t[88]!==G?(K=(0,h.jsxs)(lt,{className:`flex flex-col gap-4`,children:[V,U,G]}),t[85]=lt,t[86]=V,t[87]=U,t[88]=G,t[89]=K):K=t[89];let q;t[90]===_?q=t[91]:(q=()=>_(!1),t[90]=_,t[91]=q);let dt;t[92]===Symbol.for(`react.memo_cache_sentinel`)?(dt=(0,h.jsx)(r,{id:`dEgA5A`}),t[92]=dt):dt=t[92];let J;t[93]!==S||t[94]!==q?(J=(0,h.jsx)(ie,{variant:`outline`,disabled:S,onClick:q,children:dt}),t[93]=S,t[94]=q,t[95]=J):J=t[95];let ft=S||x.size===0,Y;t[96]===ot?Y=t[97]:(Y=()=>void ot(),t[96]=ot,t[97]=Y);let X;t[98]!==S||t[99]!==x.size?(X=S?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(oe,{"aria-hidden":`true`,className:`size-4`}),(0,h.jsx)(r,{id:`Wtw22s`})]}):x.size===0?(0,h.jsx)(r,{id:`TKQ7K-`}):(0,h.jsx)(r,{id:`9XwoPv`,values:{0:x.size}}),t[98]=S,t[99]=x.size,t[100]=X):X=t[100];let Z;t[101]!==ft||t[102]!==Y||t[103]!==X?(Z=(0,h.jsx)(ie,{"data-testid":`plugin-bundle-install`,disabled:ft,onClick:Y,children:X}),t[101]=ft,t[102]=Y,t[103]=X,t[104]=Z):Z=t[104];let Q;t[105]!==J||t[106]!==Z?(Q=(0,h.jsxs)(fe,{children:[J,Z]}),t[105]=J,t[106]=Z,t[107]=Q):Q=t[107];let $;t[108]!==ct||t[109]!==N||t[110]!==I||t[111]!==K||t[112]!==Q?($=(0,h.jsxs)(ct,{className:`sm:max-w-lg`,onCloseAutoFocus:N,children:[I,K,Q]}),t[108]=ct,t[109]=N,t[110]=I,t[111]=K,t[112]=Q,t[113]=$):$=t[113];let pt;return t[114]!==st||t[115]!==M||t[116]!==$?(pt=(0,h.jsx)(st,{open:!0,onOpenChange:M,children:$}),t[114]=st,t[115]=M,t[116]=$,t[117]=pt):pt=t[117],pt}function De(e){return e.requested}function Oe(e){return e.status===`failed`||e.status===`not-found`}function ke(e){return typeof e==`string`}function Ae(e){return e.name}function je(e){return[e.name,e.description]}function Me(e){return e.name}function v(e){let t=(0,p.c)(12),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({className:n,size:i,asChild:a,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let s=i===void 0?`default`:i,l=a!==void 0&&a?c:`div`,u;t[5]===n?u=t[6]:(u=o(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl`,n),t[5]=n,t[6]=u);let d;return t[7]!==l||t[8]!==r||t[9]!==s||t[10]!==u?(d=(0,h.jsx)(l,{"data-slot":`card`,"data-size":s,className:u,...r}),t[7]=l,t[8]=r,t[9]=s,t[10]=u,t[11]=d):d=t[11],d}function y(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-header`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ne(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`cn-font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-title`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Pe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`text-sm text-muted-foreground`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-description`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function b(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`col-start-2 row-span-2 row-start-1 self-start justify-self-end`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-action`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Fe(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`px-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-content`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function Ie(e){let t=(0,p.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,h.jsx)(`div`,{"data-slot":`card-footer`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}export{Ie as a,g as c,Pe as i,b as n,y as o,Fe as r,Ne as s,v as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{m as i}from"./RegisteredAgentIcon-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./react-f2sANaYj.js";import{t as n}from"./useQuery-ZeEDLtxh.js";import{t as r}from"./compiler-runtime-BfE3aGVn.js";import{m as i}from"./RegisteredAgentIcon-B86I4fPj.js";var a=r(),o=e(t(),1);function s(e){return e.supported?e.harness?.availability===`present`||e.harness?.credentials===`present`:!1}function c(e){let t=[`claude-acp`,`codex-acp`,`cursor`,`opencode`],n=e=>{let n=t.indexOf(e);return n===-1?t.length:n};return e.filter(s).sort((e,t)=>n(e.id)-n(t.id))}function l(e){return e.harness?.credentials===`present`?0:+(e.harness?.availability===`not-found`)}async function u(e){let t=await fetch(`/api/acp/catalog`,{signal:e??AbortSignal.timeout(2e4)});if(!t.ok)throw Error(`agent catalog request failed: HTTP ${t.status}`);let n=await t.json();return{agents:Array.isArray(n.agents)?n.agents:[],stale:n.stale===!0,maxThreads:typeof n.maxThreads==`number`?n.maxThreads:8}}var d=300*1e3,f=null;function p(e){let t=(0,a.c)(6),r=e===void 0?!0:e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=[`acp-catalog`],t[0]=i):i=t[0];let s;t[1]===r?s=t[2]:(s={queryKey:i,queryFn:m,staleTime:d,enabled:r},t[1]=r,t[2]=s);let c=n(s),{error:l}=c,u,p;return t[3]===l?(u=t[4],p=t[5]):(u=()=>{l==null||l===f||(f=l,console.error(`[acp-catalog] agent catalog request failed`,l))},p=[l],t[3]=l,t[4]=u,t[5]=p),(0,o.useEffect)(u,p),c}function m(e){let{signal:t}=e;return u(t)}function h(){let e=(0,a.c)(3),{data:t}=p(),n=t?.agents,r,s;e[0]===n?(r=e[1],s=e[2]):(r=()=>{n&&i(n.map(g))},s=[n],e[0]=n,e[1]=r,e[2]=s),(0,o.useEffect)(r,s)}function g(e){return{source:e.source,id:e.id,name:e.name,supported:e.supported,featured:e.featured,...e.iconUrl===void 0?{}:{iconUrl:e.iconUrl}}}export{p as a,s as i,u as n,h as o,l as r,c as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.86.0-beta.
|
|
1
|
+
var e=`ok.client.surface`,t={protocol:`x-ok-client-protocol`,runtime:`x-ok-client-runtime`,kind:`x-ok-client-kind`};function n({hasDesktopBridge:e,embeddedHost:t}){return e?`desktop`:t===null?`browser`:`embedded:${t}`}function r({kind:e,runtimeVersion:n}){return{[t.protocol]:`2`,[t.runtime]:n,[t.kind]:e}}function i({kind:e,runtimeVersion:t}){return{clientProtocolVersion:2,clientRuntimeVersion:t,clientKind:e}}var a={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/};function o(){if(typeof navigator>`u`)return null;let e=navigator.userAgent;for(let[t,n]of Object.entries(a))if(n.test(e))return t;return null}var s={BASE_URL:`./`,DEV:!1,MODE:`production`,PROD:!0,SSR:!1,VITE_APP_VERSION:`0.86.0-beta.17`}?.VITE_APP_VERSION??`0.0.0-unknown`,c=n({hasDesktopBridge:typeof window<`u`&&window.okDesktop!==void 0,embeddedHost:o()});function l(){return r({kind:c,runtimeVersion:s})}function u(){return i({kind:c,runtimeVersion:s})}export{o as a,u as i,c as n,e as o,l as r,s as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Ei as t,Qn as n,Si as r,Xr as i,Yr as a,dr as o,fr as s,gr as c,mr as l,ni as u,yi as d}from"./DocumentContext-
|
|
1
|
+
import{t as e}from"./jsx-runtime-BUgB2tll.js";import{Ei as t,Qn as n,Si as r,Xr as i,Yr as a,dr as o,fr as s,gr as c,mr as l,ni as u,yi as d}from"./DocumentContext-B3kLPqqX.js";import{n as f,r as p}from"./dist-Nvb76hAm.js";import{t as m}from"./compiler-runtime-BfE3aGVn.js";import{t as h}from"./utils-CPqDy6Hr.js";import{i as g,n as _,t as ee}from"./tooltip-DBqLYfio.js";import{t as v}from"./button-DzgjsZzC.js";import{n as y}from"./dist-BGzUo_18.js";import{t as b}from"./dist-C_FzPxEX2.js";import{t as x}from"./createLucideIcon-DdBzwsHe.js";import{cr as S,sr as C}from"./CodeMirrorPropInput-L5MRgVTf.js";import{t as te}from"./x-DM2drskU.js";import{l as w}from"./doc-hash-BJkweiX9.js";var T=x(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),E=m(),ne=`var(--ok-comment-hue, rgb(37 99 235))`,re={fill:.22,line:.7},ie={fill:.45,line:1},ae=.45;function D(e){return`color-mix(in srgb,${ne} ${e*100}%,transparent)`}function oe(e,t){let{fill:n,line:r}=t?ie:re;return[`border-radius:2px`,`padding-bottom:1px`,...e.id===null?[]:[`cursor:pointer`],`background-color:${D(n)}`,`box-shadow:inset 0 -2px 0 ${D(r)}`,``].join(`;`)}function O(e){return e.map(e=>e.id??`·`).join(`|`)}function se(e){let t=null;for(let n of e)n.id!==null&&(t===null||n.to-n.from<t.to-t.from)&&(t=n);return t?.id??null}function ce(e,t){return e.id===null||e.id===t}function le(e,t=null){let n=[...e].filter(e=>e.from<e.to).sort((e,t)=>e.from-t.from||e.to-t.to||(e.id??``).localeCompare(t.id??``));if(n.length===0)return[];let r=[...new Set(n.flatMap(e=>[e.from,e.to]))].sort((e,t)=>e-t),i=[],a=null,o=()=>{if(a===null)return;let e=a.covering.find(e=>ce(e,t));i.push({from:a.from,to:a.to,style:oe(e??a.covering[0],e!==void 0),threadId:se(a.covering)}),a=null};for(let e=0;e<r.length-1;e++){let t=r[e],i=r[e+1],s=n.filter(e=>e.from<=t&&e.to>=i);if(s.length===0){o();continue}if(a!==null&&a.to===t&&O(a.covering)===O(s)){a.to=i;continue}o(),a={from:t,to:i,covering:s}}return o(),i}var k=`data-comment-reveal`;function A(e){return typeof CSS<`u`&&CSS.escape?CSS.escape(e):e}function ue(e){return e===``?null:document.querySelector(`[data-testid="property-row"][data-key="${A(e)}"]`)}function de(e){let t=ue(e);if(t===null)return null;let n=t.getBoundingClientRect();return n.height===0&&n.width===0?null:n}function fe(e){ue(e)?.scrollIntoView({block:`center`,behavior:`smooth`})}function pe(e){if(e.quote===``)return!1;let t=e.path.length===0?e.key:e.path[e.path.length-1],n=Array.from(document.querySelectorAll(`[data-testid="property-row"][data-key="${A(String(t))}"]`)),r=Array.from(document.querySelectorAll(`[data-testid="property-row"]`));for(let t of[...n,...r]){let n=t.querySelector(`textarea, input`);if(n===null)continue;let r=me(n.value,e.quote,e.start,e.end);if(r!==null)return t.scrollIntoView({block:`center`,behavior:`smooth`}),n.focus(),n.setSelectionRange(r.start,r.end),he(n),!0}return!1}function me(e,t,n,r){if(n!==void 0&&r!==void 0&&e.slice(n,r)===t)return{start:n,end:r};let i=e.indexOf(t);return i<0?null:{start:i,end:i+t.length}}function he(e){e.style.setProperty(`--comment-reveal-fill`,D(ae)),e.setAttribute(k,`true`);let t=()=>{e.removeAttribute(k),e.style.removeProperty(`--comment-reveal-fill`)};e.addEventListener(`blur`,t,{once:!0}),e.addEventListener(`pointerdown`,t,{once:!0}),e.addEventListener(`keydown`,t,{once:!0})}var ge=new Set([`*`,`_`,"`",`~`,`\\`,`$`]),_e=/^={2,}/,j=/^<(?:[A-Za-z][A-Za-z0-9+.-]*:[^<>\s]*|[^\s<>@]+@[^\s<>]+)>/,M=512;function ve(e,t){return j.test(e.slice(t,t+M))}function ye(e,t){let n=e.lastIndexOf(`<`,t);return n<0||t-n>M?!1:j.exec(e.slice(n,t+1))?.[0].length===t+1-n}var be=/^<\/?[A-Za-z][A-Za-z0-9-]*(?:\s[^>]*?)?\/?>/,xe=512,Se=/^!(?=\[)/,Ce=/^\[\^/,we=/^\]\[[^\]]*\]/,Te=/^\[\[[^\][|]*\|/,Ee=/^#[^\][|]*(?=\]\])/,N=512,De=/^\]\([^)]*\)/,Oe=512,ke=/^(?:#{1,6}[ \t]+|>[ \t]?|(?:[-*+]|\d{1,9}[.)])[ \t]+(?:\[[ xX]\][ \t]+)?)/,Ae=32,je=`|`,Me=/^(?:`{3,}[^`\n]*|~{3,}[^\n]*)$/,Ne=/^(?:(?:[-*_][ \t]*){3,}|=+[ \t]*|[|\-: \t]*-[|\-: \t]*)$/,Pe=1024;function Fe(e,t){let n=e.indexOf(`
|
|
2
2
|
`,t),r=n===-1?e.length:n;if(r>t&&e[r-1]===`\r`&&--r,r-t>Pe)return 0;let i=e.slice(t,r);return i.length===0||!Me.test(i)&&!Ne.test(i)?0:i.length}var P=/&#(?:x[0-9A-Fa-f]+|X[0-9A-Fa-f]+|[0-9]+);/y;function F(e,t){if(e[t]!==`&`)return null;let n=t,r=``;for(;;){P.lastIndex=n;let t=P.exec(e)?.[0];if(t===void 0)break;let i=C(t);if(i===null)break;r+=i,n+=t.length}return n===t?null:{length:n-t,rendered:r}}function I(e){return e===` `||e===` `||e===`
|
|
3
3
|
`||e===`\r`||e===`\f`||e===`\v`}function L(e,t){for(let n=t-1;n>=0;--n){let t=e[n];if(t===`
|
|
4
4
|
`)return!0;if(t!==` `&&t!==` `)return!1}return!0}function R(e,t){let n=e[t];if(n===void 0)return 0;if(L(e,t)){let n=Fe(e,t);if(n>0)return n}if(n===je)return 1;if(n===`<`){let n=be.exec(e.slice(t,t+xe))?.[0].length;return n===void 0?+!!ve(e,t):n}if(n===`>`&&ye(e,t))return 1;if(n===`=`){let n=_e.exec(e.slice(t,t+3))?.[0].length;if(n!==void 0)return n}if(n===`!`)return+!!Se.test(e.slice(t,t+2));if(ge.has(n))return 1;if(n===`[`){let n=e.slice(t,t+N),r=Te.exec(n)?.[0].length;return r===void 0?Ce.test(n)?2:1:r}if(n===`#`){let n=Ee.exec(e.slice(t,t+N))?.[0].length;if(n!==void 0)return n}if(n===`]`){if(e[t+1]===`]`)return 2;let n=e.slice(t,t+Math.max(Oe,N)),r=De.exec(n)?.[0].length;if(r!==void 0)return r;let i=we.exec(n)?.[0].length;return i===void 0?1:i}return L(e,t)?ke.exec(e.slice(t,t+Ae))?.[0].length??0:0}function z(e,t,{syntaxIn:n}){let r=[];if(t.length===0)return r;let i=n===`haystack`;for(let n=0;n<e.length;n+=1){let a=e[n];if(a===void 0||I(a)||i&&a!==t[0]&&(R(e,n)>0||F(e,n)!==null))continue;let o=n,s=0;for(;o<e.length&&s<t.length;){let n=e[o],r=t[s];if(n===r){o+=1,s+=1;continue}if(I(r)){s+=1;continue}if(I(n)){o+=1;continue}let a=i?R(e,o):R(t,s);if(a>0){i?o+=a:s+=a;continue}let c=i?F(e,o):F(t,s);if(c!==null){let n=i?t:e,r=i?s:o,a=!0;for(let e of c.rendered)if(!I(e)){for(;r<n.length&&I(n[r]);)r+=1;if(n[r]!==e){a=!1;break}r+=1}if(!a)break;i?(o+=c.length,s=r):(s+=c.length,o=r);continue}break}for(;s<t.length&&I(t[s]);)s+=1;s===t.length&&r.push({start:n,end:o})}return r}var B=8,V=64;function H(e,t,n,r){let i=``,a=Math.max(0,t),o=Math.min(e.length,n);for(;a<o;){let t=e[a];if(I(t)){a+=1;continue}if(r){let t=R(e,a);if(t>0){a+=t;continue}let n=F(e,a);if(n!==null){for(let e of n.rendered)I(e)||(i+=e);a+=n.length;continue}}i+=t,a+=1}return i}function Ie(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[e.length-1-r]===t[t.length-1-r];)r+=1;return r}function Le(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e[r]===t[r];)r+=1;return r}function U(e,t,n,{syntaxIn:r,syntaxInContext:i=!1}){let a=n.prefix??``,o=n.suffix??``,s=r===`haystack`,c=0;if(a.length>0){let n=a.length*B+V;c+=Ie(H(a,0,a.length,i),H(e,t.start-n,t.start,s))}if(o.length>0){let n=o.length*B+V;c+=Le(H(o,0,o.length,i),H(e,t.end,t.end+n,s))}return c}function Re(e,{syntaxInContext:t=!1}={}){let n=H(e.prefix??``,0,1/0,t).length+H(e.suffix??``,0,1/0,t).length;return Math.min(8,n)}function ze(e){return Math.max(e*4,e+64)}function W(e,{includeBlockComponents:t=!1}={}){let n=``,r=[];return e.descendants((e,i)=>{if(e.isText&&e.text){for(let t=0;t<e.text.length;t++)n+=e.text[t],r.push(i+t);return!0}if(e.isBlock&&!t)return!0;let a=o(e);if(a.length>0){let t=i+e.nodeSize-1;for(let e=0;e<a.length;e++)n+=a[e],r.push(e===a.length-1?t:i)}return!0}),{text:n,positions:r}}function Be(e,t){let n=[];if(t===``)return n;let r=e.indexOf(t);for(;r!==-1;)n.push(r),r=e.indexOf(t,r+1);return n}function G(e,t,n){let r=n?.prefix??``,i=n?.suffix??``;if(r===``&&i===``)return null;let a=r===``?[0]:z(e,r,{syntaxIn:`needle`}).map(e=>e.end),o=i===``?[e.length]:z(e,i,{syntaxIn:`needle`}).map(e=>e.start);if(a.length!==1||o.length!==1)return null;let s=a[0],c=o[0];for(;s<c&&/\s/.test(e[s]??``);)s+=1;for(;c>s&&/\s/.test(e[c-1]??``);)--c;if(c<=s)return null;let l=ze(t.length);return c-s>l?null:{start:s,end:c}}function K(e,t){let n=e.positions[t.start],r=e.positions[t.end-1];return n==null||r==null?null:{from:n,to:r+1}}function q(e,t,n){if(t.length===0)return null;let r=Be(e.text,t).map(e=>({start:e,end:e+t.length}));if(r.length===0&&(r=z(e.text,t,{syntaxIn:`needle`})),r.length===0){let r=G(e.text,t,n);return r===null?null:K(e,r)}let i=n?.prefix??``,a=n?.suffix??``,o=t=>e.text.includes(t)||z(e.text,t,{syntaxIn:`needle`}).length>0;if(i!==``&&a!==``&&!o(i+t+a)&&o(i+a))return null;let s=Re({prefix:i,suffix:a},{syntaxInContext:!0}),c=t=>s===0||U(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0})>=s;if(r.length===1){if(!c(r[0])){let r=G(e.text,t,n);return r===null?null:K(e,r)}return K(e,r[0])}let l=[],u=-1;for(let t of r){let n=U(e.text,t,{prefix:i,suffix:a},{syntaxIn:`none`,syntaxInContext:!0});n>u?(u=n,l=[t]):n===u&&l.push(t)}if(!c(l[0])){let r=G(e.text,t,n);return r===null?null:K(e,r)}return K(e,l[0])}var J=64;function Ve(e,t,n){return{prefix:s(e,Math.max(0,t-J),t),suffix:s(e,n,Math.min(e.content.size,n+J))}}function Y(e,t,n){return X(e)(t,n)}function X(e){let t=W(e),n=null;return(r,i)=>{let a=q(t,r,i);return a===null?(n??=W(e,{includeBlockComponents:!0}),q(n,r,i)):a}}var He=220,Ue=24;function We(e){let t=e.viewTop+e.insetTop,n=e.viewBottom-He;return e.anchorTop>=t&&e.anchorBottom<=n?0:e.anchorTop-(t+Ue)}function Z(e){let t=e?.parentElement??null;for(;t;){let e=getComputedStyle(t).overflowY;if(e===`auto`||e===`scroll`)return t;t=t.parentElement}return null}function Ge(e){let t=Number.parseFloat(getComputedStyle(e).scrollPaddingTop);return Number.isFinite(t)?t:0}function Ke(e,t,r,i){let a=S(e);if(!a)return!1;let o=Z(a.dom);if(!o)return n(r,`comment-reveal`,()=>e.commands.scrollIntoView());let s,c;try{s=a.coordsAtPos(t.from),c=a.coordsAtPos(t.to)}catch{return!1}let l=o.getBoundingClientRect(),u=We({anchorTop:s.top,anchorBottom:Math.max(s.bottom,c.bottom),viewTop:l.top,viewBottom:l.bottom,insetTop:Ge(o)});if(u===0)return!0;let d=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;return n(r,`comment-reveal`,()=>o.scrollTo({top:o.scrollTop+u,behavior:i?.instant||d?`auto`:`smooth`}))}var qe=1e4,Je=80,Ye=1500,Xe=[`wheel`,`touchstart`,`mousedown`,`keydown`];function Ze(e){let n=!1,r=null,o=null,s=-1,u=()=>{let t=l(e.docName);if(!t||t.isDestroyed)return!1;if(n||(n=!0,a(e.threadId)),e.quote===``)return r===null&&(r=Date.now(),i(e.threadId)),!0;let c=t.state.doc.content.size;return(o===null||c!==s)&&(o=Y(t.state.doc,e.quote,e.context),s=c),!o||!Ke(t,o,e.docName,{instant:!0})?!1:(r===null&&(r=Date.now(),i(e.threadId)),!0)};t(`comments`),u(),l(e.docName)===null&&window.location.assign(w(e.docName));let d=!1,f=()=>{if(!d){d=!0,h(),window.clearInterval(g),window.clearTimeout(_);for(let e of Xe)window.removeEventListener(e,p,!0)}},p=()=>f(),m=()=>{u()&&r!==null&&Date.now()-r>=Ye&&f()},h=c(m),g=window.setInterval(m,Je),_=window.setTimeout(()=>{r===null&&y.error(n?b._({id:`KeXgA-`}):b._({id:`JDQ5I5`})),f()},qe);for(let e of Xe)window.addEventListener(e,p,!0);m()}var Q=e();function Qe(){return d().length}function $e(){let e=(0,E.c)(4),t=d(),n;if(e[0]!==t){n=new Map;for(let e of t){let t=u(e)?.docName;t!==void 0&&n.set(t,(n.get(t)??0)+1)}e[0]=t,e[1]=n}else n=e[1];let r;return e[2]===n?r=e[3]:(r=[...n].map(et),e[2]=n,e[3]=r),r}function et(e){let[t,n]=e;return{docName:t,count:n}}function tt(e){let t=(0,E.c)(26),{count:n,docs:r,onDismiss:i}=e,a;t[0]===r?a=t[1]:(a=r===void 0?[]:r,t[0]=r,t[1]=a);let o=a,{_:s}=p();if(n===0)return null;let c;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(c=h(`inline-flex items-center gap-1 rounded-md border bg-muted/60 py-0.5 pr-0.5 pl-1.5`,`text-xs text-muted-foreground`),t[2]=c):c=t[2];let l;t[3]===s?l=t[4]:(l=s({id:`2zvUIK`}),t[3]=s,t[4]=l);let u;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,Q.jsx)(T,{className:`size-3`}),t[5]=u):u=t[5];let d;t[6]!==n||t[7]!==o.length?(d=o.length>1?(0,Q.jsx)(f,{id:`5TmrYN`,values:{0:o.length,count:n}}):(0,Q.jsx)(f,{id:`eiUA4k`,values:{count:n}}),t[6]=n,t[7]=o.length,t[8]=d):d=t[8];let m;t[9]!==l||t[10]!==d?(m=(0,Q.jsx)(g,{asChild:!0,children:(0,Q.jsxs)(v,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":l,onClick:rt,"data-testid":`composer-comments-open-panel`,className:`h-auto min-h-0 gap-1 px-0.5 py-0 text-xs font-normal text-muted-foreground hover:text-foreground`,children:[u,d]})}),t[9]=l,t[10]=d,t[11]=m):m=t[11];let y;t[12]===o?y=t[13]:(y=(0,Q.jsx)(_,{className:`max-w-64`,children:o.length>1?(0,Q.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:o.map(nt)}):(0,Q.jsx)(f,{id:`2zvUIK`})}),t[12]=o,t[13]=y);let b;t[14]!==m||t[15]!==y?(b=(0,Q.jsxs)(ee,{children:[m,y]}),t[14]=m,t[15]=y,t[16]=b):b=t[16];let x;t[17]===s?x=t[18]:(x=s({id:`pFRz_E`}),t[17]=s,t[18]=x);let S;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(S=(0,Q.jsx)(te,{className:`size-3`}),t[19]=S):S=t[19];let C;t[20]!==i||t[21]!==x?(C=(0,Q.jsx)(v,{type:`button`,size:`sm`,variant:`ghost`,"aria-label":x,onClick:i,className:`size-4 p-0 text-muted-foreground hover:text-foreground`,children:S}),t[20]=i,t[21]=x,t[22]=C):C=t[22];let w;return t[23]!==C||t[24]!==b?(w=(0,Q.jsxs)(`span`,{"data-testid":`composer-context-chip-comments`,className:c,children:[b,C]}),t[23]=C,t[24]=b,t[25]=w):w=t[25],w}function nt(e){return(0,Q.jsxs)(`li`,{className:`flex items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`tabular-nums`,children:e.count}),(0,Q.jsx)(`span`,{className:`truncate`,children:it(e.docName)})]},e.docName)}function rt(){return r()}function it(e){let t=e.lastIndexOf(`/`);return t>=0?e.slice(t+1):e}function at(e,t){let n=e;for(let e of t)n+=typeof e==`number`?`[${e}]`:`.${e}`;return n}function ot(e){Ze({docName:e.docName,quote:e.target.kind===`property`?``:e.anchor?.quote??``,threadId:e.id,context:e.anchor??void 0});let{target:t,anchor:n}=e;if(t.kind!==`property`||n===null)return;let r=0,i=()=>{pe({key:t.key,path:t.path,quote:n.quote,start:n.start,end:n.end})||(r+=1,!(r>=st)&&requestAnimationFrame(i))};requestAnimationFrame(i)}var st=30;function ct(e){return{docName:e.docName,body:e.instruction,propertyKey:e.property,quote:e.passage?.exact??``,anchorLost:e.anchorLost,prefix:e.passage?.prefix??``,suffix:e.passage?.suffix??``,repeats:e.passageRepeats}}var $=48;function lt(e){let t=e.replace(/\s+/g,` `).trimStart();return t.length>$?`…${t.slice(-$)}`:t}function ut(e){let t=e.replace(/\s+/g,` `).trimEnd();return t.length>$?`${t.slice(0,$)}…`:t}function dt(e){if(!e.repeats)return null;let t=lt(e.prefix),n=ut(e.suffix);return t===``&&n===``?null:`(This text appears more than once in the file. The one meant is ${t===``?`at the start of the file, followed by "${n}"`:n===``?`at the end of the file, preceded by "${t}"`:`between "${t}" and "${n}"`} — match that context rather than the first occurrence.)`}function ft(e,t,n){let r=t.trim(),i=[];if(i.push(r.length>0?r:`Address the following review comments by editing the documents directly.`),i.push(``),i.push(e.length===1?`The comment:`:`The ${e.length} comments:`),e.forEach((e,t)=>{if(i.push(``),e.propertyKey){let n=e.quote.trim();if(n===``)i.push(`${t+1}. In \`${e.docName}\`, on the \`${e.propertyKey}\` property (frontmatter):`),i.push(``),i.push(` ${e.body.trim()}`);else{i.push(`${t+1}. In \`${e.docName}\`, on this text within the \`${e.propertyKey}\` property (frontmatter):`),i.push(``);for(let e of n.split(`
|