@inkeep/open-knowledge 0.47.0-beta.13 → 0.47.0-beta.15
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/{acp-harness-probe-63PZznFI.mjs → acp-harness-probe-MFQ2DQYM.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/constants-B8YpKtx5.mjs +2 -0
- package/dist/git-handle-Bt16fZHs.mjs +1 -0
- package/dist/{git-handle-C1UjT-hk.mjs → git-handle-I4Wo1xI2.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-BQFF32ZG.mjs → init-R18AB1HM.mjs} +3 -3
- package/dist/init-dHJJ86Zq.mjs +1 -0
- package/dist/{launch-json-removal-CfMlwE9w.mjs → launch-json-removal-DWwV_xCc.mjs} +2 -2
- package/dist/loader-CABp5jEg.mjs +1 -0
- package/dist/{loader-K5qVJN4Z.mjs → loader-TAORiDak.mjs} +2 -2
- package/dist/md-manager-5iZyY6ma.mjs +2 -0
- package/dist/{open-browser-EaffNuIE.mjs → open-browser-Iz1h8Lts.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-C_e9k5LQ.mjs → preview-BPqRxrwi.mjs} +2 -2
- package/dist/preview-Dwg2IisH.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-CfyqmPvT.js → ActivityModeContent-DnZx_iOU.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-BNFvAxuV.js → AgentDiffPane-DJ2-UsWA.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-CMHNZB8k.js → AgentThreadClientBinder-BnfaxmYs.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-8ooDTsgG.js → ChangedOutsideBadge-B7Nb_Prz.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-kJZpOqjB.js → CodeMirrorPropInput-BPC_zQgZ.js} +1 -1
- package/dist/public/assets/{DocumentContext-HM2CSkcl.js → DocumentContext-anJxeK9i.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-C7I7X4RS.js → EditorModeToggle-C9BKN-yE.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-C5lcZQ0m.js → EnableSyncConfirmDialog-DIz2gorY.js} +1 -1
- package/dist/public/assets/FeedbackForm-lsEggh84.js +1 -0
- package/dist/public/assets/{GraphPanel-BKU-sjWQ.js → GraphPanel-BVeL-7D5.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-Um4UPxTx.js → ImportSkillDialog-BSa0kpLo.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-xKBwOmU6.js → LintConfigEditor-BprWEWXR.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-B6Rxdr9G.js +8 -0
- package/dist/public/assets/ManagedArtifactProperties-Cf1VOAl2.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-5vUQ_tGC.js → McpConsentDialogBody-CxKa0U9E.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-BZ9qREZ6.js → MermaidDocEditor-Bzd-2Jzs.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-Cshj4bXU.js → ReportBugDialogBody--l9pSfnw.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BzlmoCOH.js → SchemaConfigEditor-DeGW895c.js} +1 -1
- package/dist/public/assets/{SessionsHost-OdSx1xd0.js → SessionsHost-D5UkI7-p.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CFbGJ5j4.js → SettingsDialogBody-IFOvZZqr.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-COHEBcfz.js → ShareBranchSwitchDialog-BIi10Y8l.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-DcNIOm6y.js → ShareReceiveDialog-CKAMTDsZ.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DVZqfzBh.js → ShareReceiveMissDialog-B0ferX65.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-nlYN__8g.js → SkillEditBanner-B34nvuqh.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-BBZCbGv3.js → SkillOriginInline-u1OYA4fd.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-D-G21LQU.js → SkillToolbarControls-1YGkO2th.js} +1 -1
- package/dist/public/assets/{SourceEditor-X9m2oi7l.js → SourceEditor-HVX16YXz.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BHk4hxn3.js → TerminalPanel-CJod-Zrx.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-B_GicTU1.js → TerminalWindowApp-Dwk2DcF6.js} +1 -1
- package/dist/public/assets/{TextDocEditor-BSQz8TPb.js → TextDocEditor-C5J4jgjO.js} +1 -1
- package/dist/public/assets/{ThreadView-Cu_iP2Z4.js → ThreadView-h4TbdkA3.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-CnHwY7Yd.js → TimelineDiffPane-CNiUuVNQ.js} +1 -1
- package/dist/public/assets/{agent-diff-store-C-s4qxlW.js → agent-diff-store-BeaPLwYM.js} +1 -1
- package/dist/public/assets/{agent-visibility-CRJC_Mmi.js → agent-visibility-DOI-aRe5.js} +1 -1
- package/dist/public/assets/{auth-state-cache-q9oJq1O-.js → auth-state-cache-1bfEn7hj.js} +1 -1
- package/dist/public/assets/{client-version-NCw3CPbg.js → client-version-CVk8TXQL.js} +1 -1
- package/dist/public/assets/{config-context-wTySMMh_.js → config-context-BlTWIu0S.js} +1 -1
- package/dist/public/assets/{config-provider-BtDy9McS.js → config-provider-VpKVpqSK.js} +1 -1
- package/dist/public/assets/{dist-0V5DS-jp2.js → dist-Dp50RPBY2.js} +2 -2
- package/dist/public/assets/{doc-paths-eqs57MlK.js → doc-paths-DGWtnOSZ.js} +1 -1
- package/dist/public/assets/{documents-events-BtZ7NV1t.js → documents-events-BMvnact8.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-CheEwQMW.js → file-tree-adapter-DGfCX-aq.js} +1 -1
- package/dist/public/assets/{file-tree-utils-KtcdmJ_g.js → file-tree-utils-Cawb-Fht.js} +1 -1
- package/dist/public/assets/{folder-config-api-DT4VLF_M.js → folder-config-api-Rk-XVk8n.js} +1 -1
- package/dist/public/assets/globals-BMBVXTkN.css +1 -0
- package/dist/public/assets/{globals-DGKgPqmX.js → globals-DpKvVzNS.js} +1 -1
- package/dist/public/assets/index-B7kLMpFo.js +2092 -0
- package/dist/public/assets/{lint-config-client-CKDOijIM.js → lint-config-client-DQhrbuBD.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-P1sDghK_.js → markdownlint-rule-browser-CXXfZ7AS.js} +1 -1
- package/dist/public/assets/{navigation-targets-gc61t_Ad.js → navigation-targets-_6Iwr-fQ.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DnKux2mI.js → open-managed-artifact-tab-C9oj9rmC.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-VNTolH5C.js → pending-receive-nav-store-DsY7F3C7.js} +1 -1
- package/dist/public/assets/{prop-types-BdjIW0eY.js → prop-types-cgBDAKXT.js} +1 -1
- package/dist/public/assets/{receive-store-Cv1sOLk9.js → receive-store-V-894b3Q.js} +1 -1
- package/dist/public/assets/{selection-context-0IddwVXe.js → selection-context-B-KMAXq0.js} +1 -1
- package/dist/public/assets/skill-actions-DgfuLyh3.js +2 -0
- package/dist/public/assets/{skill-scope-C6bIed6c.js → skill-scope-B08uDTjW.js} +1 -1
- package/dist/public/assets/{skills-api-MKau2YTq.js → skills-api-BRPaZddc.js} +1 -1
- package/dist/public/assets/{src-CChG2POU.js → src-CQwTZt_9.js} +1 -1
- package/dist/public/assets/{tag-pill-input-_lxupqbK.js → tag-pill-input-Diwtyypb.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BAyNSKBJ.js → target-navigation-intent-KPxzHOsd.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-CwG2wSZB.js → terminal-launch-events-oqilDUow.js} +1 -1
- package/dist/public/assets/{terminal-telemetry--GWjCDpk.js → terminal-telemetry-DyhaSTn5.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-DMgjdpae.js → typing-burst-detector-BK0ARuUX.js} +1 -1
- package/dist/public/assets/{uninstall-scdlMs6N.js → uninstall-DN3K5-qU.js} +1 -1
- package/dist/public/assets/{use-activity-panel-Ble7q_ev.js → use-activity-panel-DfWrpNMe.js} +1 -1
- package/dist/public/assets/{use-collab-url-BPCGWweY.js → use-collab-url-D0OTAOCR.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-ChdaDRFM.js → use-live-xterm-theme-7QgVqT2i.js} +1 -1
- package/dist/public/assets/{use-open-skill-DMcpLaVx.js → use-open-skill-NV7rKurq.js} +1 -1
- package/dist/public/assets/{use-settings-route-1lmVz-nQ.js → use-settings-route-DAGaZ39q.js} +1 -1
- package/dist/public/assets/{use-skill-directory-CylFMYpB.js → use-skill-directory-Ju1ZmlKr.js} +1 -1
- package/dist/public/assets/{use-skill-origin-_K8KHC47.js → use-skill-origin-C-FHHNBF.js} +1 -1
- package/dist/public/assets/{use-skills-BfXZuh-E.js → use-skills-CeXXLoHf.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BfSuv1_p.js → use-terminal-enabled-B9EaAD2q.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-COV0pe4F.js → use-timeline-entry-diff-CDiv4XcE.js} +1 -1
- package/dist/public/assets/{use-workspace-BqaxnWdM.js → use-workspace-7rqwaYpi.js} +1 -1
- package/dist/public/index.html +43 -43
- package/dist/public/uninstall.html +4 -4
- package/dist/{repair-launch-json-vvicXfuQ.mjs → repair-launch-json-DoW9bU8S.mjs} +2 -2
- package/dist/{repair-mcp-configs-DKCLhYM9.mjs → repair-mcp-configs-hMt4nq0f.mjs} +2 -2
- package/dist/repair-skills-6P4VO4ZF.mjs +1 -0
- package/dist/{repair-skills-Dr7H3Str.mjs → repair-skills-BPDUDXZb.mjs} +2 -2
- package/dist/{server-lock-kWlPDbSb.mjs → server-lock-CG7HATY5.mjs} +2 -2
- package/dist/server-lock-D7O44--l.mjs +1 -0
- package/dist/{src-BhR9uzLi.mjs → src-C4MIDZx5.mjs} +8 -8
- package/dist/{src-AR0NVXFF.mjs → src-Cd48emEJ.mjs} +3 -3
- package/dist/{src-DD75GxXa.mjs → src-CpObYRdr.mjs} +1 -1
- package/dist/{src-D0W7ol0k.mjs → src-K_OPGVuu.mjs} +2 -2
- package/dist/start-CLFaJuM4.mjs +1 -0
- package/dist/{start-lM2wbtM5.mjs → start-yyKV7n4Z.mjs} +3 -3
- package/dist/{write-project-skill-B8VIn_27.mjs → write-project-skill-Chpoa9hy.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-CoCaEPe3.mjs +0 -2
- package/dist/git-handle-DGQcA7NB.mjs +0 -1
- package/dist/init-D7tecbcH.mjs +0 -1
- package/dist/loader-DNt3MKeB.mjs +0 -1
- package/dist/md-manager-BWRwfd0O.mjs +0 -2
- package/dist/preview-BXozBkTu.mjs +0 -1
- package/dist/public/assets/FeedbackForm-BEFbjOjQ.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-Bda3pduK.js +0 -8
- package/dist/public/assets/ManagedArtifactProperties-sQ4J_us5.js +0 -1
- package/dist/public/assets/globals-BBHjGTLJ.css +0 -1
- package/dist/public/assets/index-tdo8sOwT.js +0 -2092
- package/dist/public/assets/skill-actions-ClS8PvVt.js +0 -2
- package/dist/repair-skills-G-dWeWp2.mjs +0 -1
- package/dist/server-lock-Du8KJQk8.mjs +0 -1
- package/dist/start-CJI2g8C5.mjs +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{L as n,Ln as r,R as i,bn as a,i as o,z as s}from"./DocumentContext-HM2CSkcl.js";import{t as c}from"./react-f2sANaYj.js";import{n as l,r as u}from"./dist-Nvb76hAm.js";import{t as d}from"./compiler-runtime-BfE3aGVn.js";import{l as f}from"./terminal-input-events-BGPQuYMh.js";import{t as p}from"./utils-CPqDy6Hr.js";import{t as m}from"./use-workspace-BqaxnWdM.js";import{c as h,i as g,n as _,o as v,s as y,t as b}from"./ChangedOutsideBadge-8ooDTsgG.js";import{t as x}from"./button-RQ5o7P7w.js";import{i as S,n as C,t as w}from"./tooltip-x7BNUa3s.js";import{a as T,c as E,i as D,n as O,o as ee,r as k,s as A,t as j}from"./dialog-FGMqkFjm.js";import{a as M,d as N,f as P,i as F,n as I,o as L,p as R,u as z}from"./dropdown-menu-AlVJ7dJz.js";import{t as te}from"./label-G0lbYOgL.js";import{C as B,a as V,f as H,h as U,m as W,n as G,o as K,p as q,r as J,s as Y,t as ne}from"./agent-visibility-CRJC_Mmi.js";import{$t as X,Ba as re,Cn as ie,Ct as ae,Jt as oe,Nt as se,Pt as ce,Ra as le,Sn as ue,Ua as de,_n as fe,ai as pe,gn as me,ha as he,hn as ge,it as _e,kt as ve,mn as ye,nn as be,rt as xe,tn as Se,wn as Ce,xn as we,xr as Te,yn as Ee}from"./dist-0V5DS-jp2.js";import{t as De}from"./createLucideIcon-DihYAFEK.js";import{t as Oe}from"./RegisteredAgentIcon-H3tp7x07.js";import{n as ke,r as Ae}from"./ManagedArtifactProperties-Bda3pduK.js";import{n as je}from"./CopyButton-D6N3opvE.js";import{t as Me}from"./folder-open-Ceue91os.js";import{t as Ne}from"./folder-DcWlgZbb.js";import{t as Pe}from"./trash-2-WxyktwvM.js";import{n as Z}from"./dist-uN7pEWl0.js";import{t as Fe}from"./input-Cm94Cun3.js";import{t as Ie}from"./dist-CzC3AWOn.js";import{i as Le}from"./use-settings-route-1lmVz-nQ.js";import{t as Re}from"./parse-api-error-Dmlzsw8v.js";import{G as ze,O as Be,W as Ve}from"./navigation-targets-gc61t_Ad.js";import{c as He,n as Ue,o as We}from"./documents-events-BtZ7NV1t.js";import{c as Ge,f as Ke,n as qe,r as Je}from"./skill-scope-C6bIed6c.js";import{t as Ye}from"./badge-CAMtyz4F.js";import{A as Xe,D as Ze,O as Qe,S as $e,_ as et,c as tt,f as nt,i as rt,n as it,t as at,v as ot,x as st,y as ct}from"./skills-api-MKau2YTq.js";import{n as lt}from"./config-context-wTySMMh_.js";import{t as ut}from"./use-skills-BfXZuh-E.js";import{t as dt}from"./use-open-skill-DMcpLaVx.js";import{n as ft}from"./clipboard-adapter-Brbch5VX.js";import{t as pt}from"./DiffView-BBC1fcoF.js";var mt=De(`arrow-left-right`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),ht=De(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),gt=De(`list-plus`,[[`path`,{d:`M16 5H3`,key:`m91uny`}],[`path`,{d:`M11 12H3`,key:`51ecnj`}],[`path`,{d:`M16 19H3`,key:`zzsher`}],[`path`,{d:`M18 9v6`,key:`1twb98`}],[`path`,{d:`M21 12h-6`,key:`bt1uis`}]]),_t=De(`pencil-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),vt=De(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Q=t(),$=e(c(),1),yt=d();function bt(e){return{async install(t){let n;try{n=await e.buildAndOpen(t?.force?{force:!0}:void 0)}catch(e){return{ok:!1,reason:`bridge-error`,message:e instanceof Error?e.message:String(e)}}return n.ok?{ok:!0,path:n.path}:{ok:!1,reason:n.reason,message:n.message}}}}function xt(e={}){let t=e.fetch??globalThis.fetch,n=`${e.apiOrigin??``}/api/install-skill`;return{async install(e){let r;try{r=await t(n,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e?.force?{force:!0}:{})})}catch(e){return{ok:!1,reason:`network-error`,message:e instanceof Error?e.message:String(e)}}if(!r.ok){let e=`HTTP ${r.status}`;try{let t=Re(await r.json());t&&(e=t)}catch{}return{ok:!1,reason:`http-error`,message:e}}let i;try{i=await r.json()}catch(e){return{ok:!1,reason:`parse-error`,message:e instanceof Error?e.message:`Invalid server response`}}return!i||typeof i.status!=`string`?{ok:!1,reason:`parse-error`,message:`Invalid server response shape`}:i.status===`failed`?{ok:!1,reason:`build-failed`,message:i.buildError??`unknown build failure`}:{ok:!0,path:i.outputPath,handoffWarning:i.handoffError?.message}}}}function St(){if(typeof window>`u`)return null;let e=window.okDesktop?.skill;return e?bt(e):xt()}var Ct=`ok:skill:cowork:installed`,wt=`1`,Tt=250,Et=`/api/skill/install-state`;function Dt(e){return`${Ct}:v${e}`}var Ot=new Map;async function kt(e={},t={}){let n=t.force?`__force__`:`__default__`,r=Ot.get(n);if(r)return r;let i=At(e,t);return Ot.set(n,i),i.finally(()=>{Ot.get(n)===i&&Ot.delete(n)}),i}async function At(e,t){let n=e.installer===void 0?St():e.installer,r=jt(e.storage),i=e.fetchSnapshot??Nt,a=e.serverTimeoutMs??Tt,o=null;if(!t.force){try{o=await Pt(i(),a)}catch(e){console.warn(`[cowork-skill] server install-state check failed; falling through:`,e)}if(o){let e=o.targets[`claude-cowork`]??null;if(e&&e.version===o.currentVersion)return{kind:`already-installed`,source:`server`}}}let s=Dt(o?.currentVersion??e.fallbackSkillVersion??Mt());if(!t.force&&r?.getItem(s)===wt)return{kind:`already-installed`,source:`local`};if(!n)return{kind:`host-unsupported`};let c=await n.install({force:t.force??!1});if(!c.ok)return{kind:`install-failed`,reason:c.reason,message:c.message};try{r?.setItem(s,wt)}catch(e){console.warn(`[cowork-skill] storage.setItem failed (guard will not persist):`,e)}return{kind:`installed-now`,path:c.path,handoffWarning:c.handoffWarning}}function jt(e){if(e!==void 0)return e;if(typeof window>`u`)return null;try{return window.localStorage}catch{return null}}function Mt(){return typeof window>`u`?`unknown`:window.okDesktop?.appVersion??`unknown`}async function Nt(){let e;try{e=await fetch(Et,{method:`GET`,cache:`no-store`})}catch{return null}if(!e.ok)return null;try{let t=await e.json();return typeof t?.currentVersion==`string`?t:null}catch{return null}}async function Pt(e,t){return Promise.race([e,new Promise(e=>{setTimeout(()=>e(null),t)})])}function Ft(e){return kt({},e)}function It(){return kt({},{force:!0})}async function Lt(e,t){let n;try{n=await t(`/api/handoff`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)})}catch(e){return{ok:!1,reason:`dispatch-error`,detail:e instanceof Error?e.message:String(e)}}return n.status===200?{ok:!0}:n.status===404?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned 404`}:n.status===422?{ok:!1,reason:`not-installed`,detail:`POST /api/handoff returned ${n.status}`}:{ok:!1,reason:`dispatch-error`,detail:`POST /api/handoff returned ${n.status}`}}async function Rt(e,t={}){let n=t.fetch??globalThis.fetch.bind(globalThis);switch(e.target){case`claude-cowork`:return Lt({target:`claude-cowork`,url:X({mode:`cowork`},e)},n);case`claude-code`:return Lt({target:`claude-code`,url:X({mode:`code`},e)},n);case`codex`:return Lt({target:`codex`,url:Se(e)},n);case`cursor`:return Lt({target:`cursor`,url:be(e),workspacePath:e.projectDir},n);case`copilot`:return{ok:!1,reason:`invalid-payload`,detail:`copilot is terminal-only; launch via requestTerminalLaunch`};case`opencode`:return{ok:!1,reason:`invalid-payload`,detail:`opencode is terminal-only; launch via requestTerminalLaunch`};case`pi`:return{ok:!1,reason:`invalid-payload`,detail:`pi is terminal-only; launch via requestTerminalLaunch`};case`antigravity`:return{ok:!1,reason:`invalid-payload`,detail:`antigravity is terminal-only; launch via requestTerminalLaunch`};case`openclaw`:return{ok:!1,reason:`invalid-payload`,detail:`openclaw is terminal-only; launch via requestTerminalLaunch`};case`hermes`:return{ok:!1,reason:`invalid-payload`,detail:`hermes is terminal-only; launch via requestTerminalLaunch`};default:{let t=e.target;return{ok:!1,reason:`invalid-payload`,detail:`unknown target: ${String(t)}`}}}}async function zt(e,t={}){let n=t.okDesktop??(typeof window<`u`?window.okDesktop:void 0);if(n?.shell?.recordHandoff)try{await n.shell.recordHandoff(e)}catch(e){(t.warn??(e=>console.warn(e)))(`[handoff] recordHandoff IPC rejected (telemetry skipped): ${e instanceof Error?e.message:String(e)}`)}}var Bt=`open-knowledge:agent-thread-launch`;function Vt(e,t=typeof window>`u`?new EventTarget:window){t.dispatchEvent(new CustomEvent(Bt,{detail:e}))}function Ht(e,t=typeof window>`u`?new EventTarget:window){let n=t=>{let n=t instanceof CustomEvent?t.detail:void 0;n&&typeof n.agentId==`string`&&e(n)};return t.addEventListener(Bt,n),()=>t.removeEventListener(Bt,n)}function Ut(e){if(!e.docName||!e.workspace)return null;let t=n(e.docName),{contentDir:r,pathSeparator:a}=e.workspace;return{docContext:{relativePath:t},projectDir:r,docPath:i(r,t,a)}}function Wt(e){return e.workspace?.contentDir?{docContext:null,projectDir:e.workspace.contentDir,docPath:``}:null}function Gt(e){return e.workspace?.contentDir?{docContext:null,createDescription:e.description,createScenario:e.scenario,createMentions:e.mentions,projectDir:e.workspace.contentDir,docPath:``}:null}function Kt(e){return q(e.installUrl).then(()=>void 0)}function qt(e){return!e.workspace?.contentDir||!e.folderRelativePath?null:{docContext:null,folderRelativePath:e.folderRelativePath,projectDir:e.workspace.contentDir,docPath:``}}function Jt(e){return!e.workspace?.contentDir||!e.skillName?null:{docContext:null,skill:{name:e.skillName,scope:e.scope},projectDir:e.workspace.contentDir,docPath:``}}function Yt(e){if(!e.workspace?.contentDir)return null;let{contentDir:t,pathSeparator:r}=e.workspace;if(e.docName){let a=e.docRelativePath??n(e.docName),o={scope:`doc`,docRelativePath:a,instruction:e.instruction,mentions:e.mentions};return{docContext:null,compose:e.selection===void 0?o:{...o,selection:e.selection},projectDir:t,docPath:i(t,a,r)}}return e.folderRelativePath?{docContext:null,compose:{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}:{docContext:null,compose:{scope:`project`,instruction:e.instruction,mentions:e.mentions},projectDir:t,docPath:``}}function Xt(e){return`Opened in ${e}.`}function Zt(e,t=1){return t>=3?`Couldn't reach ${e} — please try again later.`:t===2?`Still couldn't reach ${e} — try one more time?`:`Couldn't reach ${e} — try again?`}function Qt(e){return e>=3?null:e===2?`Try one more time`:`Retry`}function $t(e,t,n,r,i){let a=i===void 0?{}:{scope:i};return t.ok?{target:e,host:n,outcome:`ok`,ts:r,...a}:{target:e,host:n,outcome:`error`,ts:r,reason:t.reason,...a}}function en(e,t,n,r){if(e.scope===`doc`){let i={scope:`doc`,docRelativePath:e.docRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r};return e.selection===void 0?i:{...i,selection:e.selection}}return e.scope===`folder`?{scope:`folder`,folderRelativePath:e.folderRelativePath,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}:{scope:`project`,instruction:e.instruction,mentions:e.mentions,target:t,autoOpen:n,transport:r}}function tn(e,t,n,r){return e.compose?oe(en(e.compose,t,n,r)):e.selection?we({...e.selection,target:t,transport:r}):e.skill?ue(e.skill.name,e.skill.scope,n):e.ask?ye(e.ask.relativePath,e.ask.instruction,n,t,r):pe(e.docContext===null?e.folderRelativePath?Ee(e.folderRelativePath,n,e.instruction,r):e.createDescription===void 0?me(n,e.instruction,r):ge(e.createDescription,n,e.createScenario??`new-project`,e.createMentions??[],r):fe(e.docContext.relativePath,n,e.instruction,r))}function nn(e,t){let n=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||n?`${xe} ${tn(e,se[t].handoffTarget,!1,`terminal`)}`:ie(e.docContext?.relativePath??null)}function rn(e){let t=typeof e.instruction==`string`&&e.instruction.trim()!==``;return e.compose!==void 0||e.createDescription!==void 0||t?`${_e} ${tn(e,`claude-code`,!1,`terminal`)}`:Ce(e.docContext?.relativePath??null)}function an(e){let t=e.docContext?.relativePath;return typeof t!=`string`||t===``?null:t.replace(/\.(md|mdx)$/,``)}function on(e){let t=[e.compose?.instruction,e.selection?.instruction,e.ask?.instruction,e.createDescription,e.instruction];for(let e of t)if(typeof e==`string`&&e.trim()!==``)return e;return null}function sn(e,t){Vt({agentSource:t?.agent?.source??`registry`,agentId:t?.agent?.id??``,prompt:rn(e),docName:an(e),titleHint:on(e)})}async function cn(e,t,n,r=1){if(e===`claude-cowork`&&r===1){let e;try{e=await n.ensureCoworkSkillInstalled()}catch(e){let t=e instanceof Error?e.message:String(e);return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-error: ${t}`}}if(e.kind===`installed-now`)return n.toast.success(`OpenKnowledge skill saved. Upload it in Claude Desktop, then click Cowork again.`),{ok:!0};if(e.kind===`install-failed`){let t=e.message??e.reason;return n.toast.error(`Couldn't install OpenKnowledge skill — ${t}`),{ok:!1,reason:`dispatch-error`,detail:`install-failed: ${t}`}}}let i={target:e,projectDir:t.projectDir,docPath:t.docPath,prompt:tn(t,e,n.autoOpen,`url`)},a=await n.dispatchHandoff(i),o=n.isElectronHost()?`electron`:`web`,s=n.now().toISOString(),c=t.compose,l=$t(e,a,o,s,t.selection!=null||c?.scope===`doc`&&c.selection!==void 0?`selection`:void 0);await n.recordHandoff(l);let u=n.getDisplayName(e);if(a.ok)n.toast.success(Xt(u));else{let i=Qt(r),a=Zt(u,r);i===null?n.toast.error(a):n.toast.error(a,{action:{label:i,onClick:()=>{cn(e,t,n,r+1)}}})}return a}function ln(e){return W.find(t=>t.id===e)?.displayName??e}function un(e=typeof window<`u`?window:void 0){return e?.okDesktop!=null}function dn(){return{dispatchHandoff:Rt,recordHandoff:zt,toast:{success:e=>{Z.success(e)},error:(e,t)=>{Z.error(e,t?{action:t.action}:void 0)}},now:()=>new Date,isElectronHost:()=>un(),getDisplayName:ln,ensureCoworkSkillInstalled:Ft,autoOpen:!0}}function fn(){let e=(0,yt.c)(2),{merged:t}=lt(),n=t?.appearance?.preview?.autoOpen??!0,r;return e[0]===n?r=e[1]:(r={dispatch:(e,t)=>cn(e,t,{...dn(),autoOpen:n}),reinstallCoworkSkill:It},e[0]=n,e[1]=r),r}var pn=Object.freeze({hosts:null,source:null}),mn=new Map,hn=new Map;function gn(e,t){return`${e}:${t}`}function _n(e){return mn.get(e)??pn}function vn(e,t){let n=hn.get(e)??new Set;return hn.set(e,n),n.add(t),()=>{n.delete(t),n.size===0&&hn.delete(e)}}function yn(e,t){let n=_n(e),r={...n,...t};if(!(r.hosts===n.hosts&&r.source===n.source)){r.hosts===null&&r.source===null?mn.delete(e):mn.set(e,r);for(let t of hn.get(e)??[])t()}}var bn=ve.options,xn=`min-w-[24rem]`;function Sn(e,t){let n=(0,yt.c)(45),r=t.installingName===e.name,i=(0,$.useRef)(e),[a,o]=(0,$.useState)(!1),s=(0,$.useRef)(!1),c,l;n[0]===r?(c=n[1],l=n[2]):(c=()=>{s.current&&!r&&o(!0),s.current=r},l=[r],n[0]=r,n[1]=c,n[2]=l),(0,$.useEffect)(c,l);let u,d;n[3]===e?(u=n[4],d=n[5]):(u=()=>{e!==i.current&&(i.current=e,o(!1))},d=[e],n[3]=e,n[4]=u,n[5]=d),(0,$.useEffect)(u,d);let f=r||a,p;n[6]!==e.name||n[7]!==e.scope?(p=gn(e.scope,e.name),n[6]=e.name,n[7]=e.scope,n[8]=p):p=n[8];let m=p,h,g;n[9]===m?(h=n[10],g=n[11]):(h=e=>vn(m,e),g=()=>_n(m),n[9]=m,n[10]=h,n[11]=g);let _=(0,$.useSyncExternalStore)(h,g),v=_.hosts,y=_.source,b,x;n[12]!==y||n[13]!==m||n[14]!==e.hosts?(b=()=>{y!==null&&e.hosts[0]===y&&yn(m,{source:null})},x=[e.hosts,y,m],n[12]=y,n[13]=m,n[14]=e.hosts,n[15]=b,n[16]=x):(b=n[15],x=n[16]),(0,$.useEffect)(b,x);let S=e.linkMode===!0,C=v??e.hosts,w;n[17]===C?w=n[18]:(w=new Set(C),n[17]=C,n[18]=w);let T=w,E=v?v.length>0:e.installed,D=(0,$.useRef)(e.hosts),O,ee;n[19]!==v||n[20]!==e.hosts?(O=()=>{v===null&&(D.current=e.hosts)},ee=[v,e.hosts],n[19]=v,n[20]=e.hosts,n[21]=O,n[22]=ee):(O=n[21],ee=n[22]),(0,$.useEffect)(O,ee);let k;n[23]===e.hosts?k=n[24]:(k=[...e.hosts].sort().join(`,`),n[23]=e.hosts,n[24]=k);let A=k,j,M;n[25]!==m||n[26]!==A?(j=()=>{let e=_n(m).hosts;e&&[...e].sort().join(`,`)===A&&yn(m,{hosts:null})},M=[A,m],n[25]=m,n[26]=A,n[27]=j,n[28]=M):(j=n[27],M=n[28]),(0,$.useEffect)(j,M);let N=(0,$.useRef)(null),P=(0,$.useRef)(null),F,I;n[29]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>()=>{N.current&&clearTimeout(N.current),P.current?.(),P.current=null},I=[],n[29]=F,n[30]=I):(F=n[29],I=n[30]),(0,$.useEffect)(F,I);let L;n[31]!==t||n[32]!==m||n[33]!==e?(L=function(n,r){D.current=n,yn(m,{hosts:n}),N.current&&clearTimeout(N.current);let i=async()=>{P.current=null,N.current=null;let r=await t.install(e,n.filter(Te));if(!r.ok){yn(m,{hosts:null});return}D.current=[...r.hosts],yn(m,{hosts:[...r.hosts]})};r?(P.current=()=>void i(),N.current=setTimeout(()=>void i(),350)):(P.current=null,i())},n[31]=t,n[32]=m,n[33]=e,n[34]=L):L=n[34];let R=L,z;return n[35]!==t||n[36]!==R||n[37]!==T||n[38]!==E||n[39]!==f||n[40]!==y||n[41]!==m||n[42]!==S||n[43]!==e?(z={hostSet:T,installed:E,installing:f,toggleEditor(e,t){let n=new Set(D.current);t?n.add(e):n.delete(e),R([...n],!0)},installAll(){let t=D.current.filter(Tn),n=e.installableEditors??bn,r=bn.filter(e=>n.includes(e)||D.current.includes(e));R([...t,...r],!1)},linkMode:S,sourceHost:y??e.hosts[0],placeAt(n,r){t.runLocationWrite(e,()=>ot({scope:e.scope,name:e.name,dir:n,mode:r})).then(wn)},unplaceAt(n){t.runLocationWrite(e,()=>Qe({scope:e.scope,name:e.name,path:n})).then(Cn)},setSource(n){yn(m,{source:n}),t.runLocationWrite(e,()=>Ze({scope:e.scope,name:e.name,target:n})).then(e=>{e.ok||(yn(m,{source:null}),Z.error(e.error))})},convertLocation(n,r){t.convertLocations(e,[{target:n,mode:r}])},convertLocations(n){t.convertLocations(e,n)}},n[35]=t,n[36]=R,n[37]=T,n[38]=E,n[39]=f,n[40]=y,n[41]=m,n[42]=S,n[43]=e,n[44]=z):z=n[44],z}function Cn(e){e.ok||Z.error(e.error)}function wn(e){e.ok||Z.error(e.error)}function Tn(e){return!bn.includes(e)}function En(e){let t=(0,yt.c)(7),{hint:n,children:r}=e,i;t[0]===r?i=t[1]:(i=(0,Q.jsx)(S,{asChild:!0,children:r}),t[0]=r,t[1]=i);let a;t[2]===n?a=t[3]:(a=(0,Q.jsx)(C,{side:`right`,className:`max-w-xs`,children:n}),t[2]=n,t[3]=a);let o;return t[4]!==i||t[5]!==a?(o=(0,Q.jsxs)(w,{children:[i,a]}),t[4]=i,t[5]=a,t[6]=o):o=t[6],o}function Dn(e){let t=(0,yt.c)(155),{toggles:n,skill:r,onResolveFork:i,onRunStart:a}=e,{_:o}=u(),{hostSet:s,toggleEditor:c,installAll:d}=n,f;t[0]===r?f=t[1]:(f=e=>r?`${Ge(e,r.scope)}/${r.name}`:null,t[0]=r,t[1]=f);let p=f,m=ut(),h;t[2]!==m.data||t[3]!==m.status||t[4]!==r?(h=r!==void 0&&((r.hosts??[]).includes(`agents`)||m.status===`ready`&&m.data.some(zn)),t[2]=m.data,t[3]=m.status,t[4]=r,t[5]=h):h=t[5];let g=h,v;t[6]!==m.data||t[7]!==m.status||t[8]!==r?(v=r?.hostAliases??(r&&m.status===`ready`?Object.assign({},...m.data.filter(e=>e.scope===r.scope).map(Rn)):{}),t[6]=m.data,t[7]=m.status,t[8]=r,t[9]=v):v=t[9];let y=v,S;t[10]!==m.data||t[11]!==m.status||t[12]!==r?(S=r?.installableEditors??(r&&m.status===`ready`?m.data.find(e=>e.scope===r.scope)?.installableEditors:void 0),t[10]=m.data,t[11]=m.status,t[12]=r,t[13]=S):S=t[13];let C=S,w,T,E,D,O,ee,k;if(t[14]!==o||t[15]!==y||t[16]!==m.data||t[17]!==m.status||t[18]!==s||t[19]!==g||t[20]!==d||t[21]!==C||t[22]!==i||t[23]!==a||t[24]!==p||t[25]!==r||t[26]!==c||t[27]!==n){let e=C?new Set(C):null,u;t[35]===y?u=t[36]:(u=e=>!(e in y),t[35]=y,t[36]=u);let f=(g?[`agents`,...bn]:bn).filter(u).filter(t=>t===`agents`||e===null||e.has(t)||s.has(t)),h;t[37]===p?h=t[38]:(h=e=>p(e),t[37]=p,t[38]=h);let v=new Set(f.map(h)),S=r?.scope===`global`?`~/`:``,A;t[39]!==S||t[40]!==r?(A=r?.path?.includes(`/`)?`${S}${r.path.replace(/\/SKILL\.mdx?$/i,``)}`:null,t[39]=S,t[40]=r,t[41]=A):A=t[41];let j=A,M=j!==null&&!v.has(j)?j:null,N=M===null?n.sourceHost??r?.hosts?.[0]:void 0,P;t[42]===y?P=t[43]:(P=e=>qe(y,e),t[42]=y,t[43]=P);let F=P,R=Ln,z;t[44]!==o||t[45]!==F?(z=e=>{let t=F(e);return t.length===0?!0:window.confirm(o({id:`Uobeu9`,values:{0:t.map(R).join(`, `),rootRel:e}}))},t[44]=o,t[45]=F,t[46]=z):z=t[46];let te=z,B;t[47]!==o||t[48]!==r?(B=(e,t)=>{let n=e.includes(`/`)?e:Ge(e,r?.scope??`project`);return(0,Q.jsx)(En,{hint:o({id:`0dslv8`,values:{0:R(e),1:R(e),2:r?.name??``,poolRootRel:t,subRoot:n}}),children:(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-4 shrink-0 px-0`,"aria-label":o({id:`G6Lrs_`,values:{0:R(e)}}),onClick:i=>{i.preventDefault(),i.stopPropagation(),window.confirm(o({id:`iiqOKM`,values:{0:R(e),1:r.name,2:R(e),subRoot:n,poolRootRel:t}}))&&ct({scope:r.scope,root:n,action:`unlink`,exclude:[r.name]}).then(e=>{e.ok?We():Z.error(o({id:`PRgIJh`,values:{0:e.error,subRoot:n}}))})},"data-testid":`skill-audience-unfollow-${e}`,children:(0,Q.jsx)(_,{host:e,"aria-hidden":!0,className:`size-3.5`})})},e)},t[47]=o,t[48]=r,t[49]=B):B=t[49];let V=B,H;t[50]===r?.conflictHosts?H=t[51]:(H=r?.conflictHosts??[],t[50]=r?.conflictHosts,t[51]=H);let U;t[52]===H?U=t[53]:(U=new Set(H),t[52]=H,t[53]=U);let W=U,G;t[54]===r?.driftPaths?G=t[55]:(G=r?.driftPaths??[],t[54]=r?.driftPaths,t[55]=G);let K;t[56]===G?K=t[57]:(K=new Set(G),t[56]=G,t[57]=K);let q=K;w=n.installing;let J=In,Y;t[58]===r?.symlinkedHosts?Y=t[59]:(Y=r?.symlinkedHosts??[],t[58]=r?.symlinkedHosts,t[59]=Y);let ne;t[60]===Y?ne=t[61]:(ne=new Set(Y),t[60]=Y,t[61]=ne);let X=ne,re=[...[...s].filter(e=>e!==N&&!(e in y)&&!W.has(e)&&!e.includes(`/`)).map(e=>X.has(e)?`link`:`copy`),...(r?.customPlacements??[]).map(Fn)],ie=re.filter(Pn).length;E=re.length===0?n.linkMode?`link`:`copy`:ie*2>=re.length?`link`:`copy`;let ae;t[62]!==y||t[63]!==W||t[64]!==s||t[65]!==X||t[66]!==p||t[67]!==N?(ae=[...s].filter(e=>e!==N&&!(e in y)&&!W.has(e)&&!e.includes(`/`)).map(e=>({target:e,display:p(e)??R(e),mode:X.has(e)?`link`:`copy`})),t[62]=y,t[63]=W,t[64]=s,t[65]=X,t[66]=p,t[67]=N,t[68]=ae):ae=t[68];let oe;t[69]===r?.customPlacements?oe=t[70]:(oe=r?.customPlacements??[],t[69]=r?.customPlacements,t[70]=oe);let se;if(t[71]!==S||t[72]!==ae||t[73]!==oe){let e;t[75]===S?e=t[76]:(e=e=>({target:Je(e),display:`${S}${e.path}`,mode:e.mode}),t[75]=S,t[76]=e),se=[...ae,...oe.map(e)],t[71]=S,t[72]=ae,t[73]=oe,t[74]=se}else se=t[74];T=se;let ce;t[77]!==o||t[78]!==a||t[79]!==n?(ce=(e,t,r)=>{let i=r===`link`?`copy`:`link`;return(0,Q.jsx)(En,{hint:o(r===`link`?{id:`FeXcUS`,values:{display:t}}:{id:`ugQcJX`,values:{display:t}}),children:(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 font-normal text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:r=>{r.preventDefault(),r.stopPropagation(),window.confirm(o(i===`link`?{id:`m0eHej`,values:{display:t}}:{id:`HbcQYf`,values:{display:t}}))&&(a?.(),n.convertLocation?.(e,i))},"data-testid":`skill-convert-${e}`,children:r===`link`?(0,Q.jsx)(l,{id:`uUCrBv`}):(0,Q.jsx)(l,{id:`iaPtht`})})})},t[77]=o,t[78]=a,t[79]=n,t[80]=ce):ce=t[80];let le=ce,ue;t[81]===r?.customPlacements?ue=t[82]:(ue=r?.customPlacements??[],t[81]=r?.customPlacements,t[82]=ue);let de=new Map(ue.map(Nn)),fe=new Set(de.keys());if(m.status===`ready`&&r){for(let e of m.data)if(e.scope===r.scope)for(let t of e.customPlacements??[]){let e=Je(t);e!==``&&fe.add(e)}}let pe=r===void 0?[]:[...fe].sort().map(e=>({root:e,display:`${S}${e}/${r.name}`,placed:de.get(e)??null})).filter(e=>!v.has(e.display)&&e.display!==j&&!(e.root in y)),me;t[83]===Symbol.for(`react.memo_cache_sentinel`)?(me=(0,Q.jsx)(l,{id:`npcziF`}),t[83]=me):me=t[83];let ge;t[84]===o?ge=t[85]:(ge=o({id:`6f_UX4`}),t[84]=o,t[85]=ge);let _e;t[86]===d?_e=t[87]:(_e=()=>d(),t[86]=d,t[87]=_e);let ve;t[88]===Symbol.for(`react.memo_cache_sentinel`)?(ve=(0,Q.jsx)(l,{id:`N40H-G`}),t[88]=ve):ve=t[88];let ye;t[89]!==w||t[90]!==_e?(ye=(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-5 px-1.5 font-normal text-[11px] text-muted-foreground hover:text-foreground`,disabled:w,onClick:_e,"data-testid":`skill-install-all`,children:ve}),t[89]=w,t[90]=_e,t[91]=ye):ye=t[91],t[92]!==ge||t[93]!==ye?(D=(0,Q.jsxs)(L,{className:`flex items-center justify-between gap-2`,children:[me,(0,Q.jsx)(En,{hint:ge,children:ye})]}),t[92]=ge,t[93]=ye,t[94]=D):D=t[94],t[95]!==o||t[96]!==V||t[97]!==w||t[98]!==M||t[99]!==F?(O=M===null?null:(0,Q.jsx)(En,{hint:o({id:`pXB6SL`}),children:(0,Q.jsxs)(I,{disabled:w,checked:!0,onSelect:Mn,"data-testid":`skill-source-row`,children:[(0,Q.jsx)(Ne,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:M}),(()=>{let e=J(M).split(`/`).slice(0,-1).join(`/`),t=F(e);return t.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-source`,children:t.map(t=>V(t,e))}):null})(),(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(l,{id:`tiFPjk`})})]})]})}),t[95]=o,t[96]=V,t[97]=w,t[98]=M,t[99]=F,t[100]=O):O=t[100];let be;t[101]!==o||t[102]!==V||t[103]!==w||t[104]!==te||t[105]!==W||t[106]!==le||t[107]!==q||t[108]!==E||t[109]!==s||t[110]!==X||t[111]!==i||t[112]!==p||t[113]!==r?.hosts||t[114]!==N||t[115]!==F||t[116]!==c||t[117]!==n?(be=e=>{let t=p(e),a=e===`agents`?`.agents`:he[e],u=J(t).split(`/`).slice(0,-1).join(`/`),d=F(u);return(0,Q.jsx)(En,{hint:W.has(e)?o({id:`8HvJlU`,values:{0:t??a}}):e===N?t?o({id:`ssk6rl`,values:{path:t}}):a:s.has(e)?o(t?{id:`9ieZhu`,values:{path:t}}:{id:`n3T3EE`,values:{label:a}}):o(t?E===`link`?{id:`1LtA5r`,values:{path:t}}:{id:`opPbzN`,values:{path:t}}:{id:`Pp0Vgd`,values:{label:a}}),children:(0,Q.jsxs)(I,{disabled:w,checked:s.has(e),onCheckedChange:t=>{W.has(e)||t===!0&&!te(u)||c(e,t===!0)},onSelect:jn,className:`group`,"data-testid":`skill-install-editor-${e}`,children:[(0,Q.jsx)(_,{host:e,"aria-hidden":!0,className:`size-4`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:t??a}),d.length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-${e}`,children:d.map(e=>V(e,u))}):null,W.has(e)?(0,Q.jsx)(En,{hint:o({id:`_O7dJS`}),children:(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-yellow-500/40 bg-yellow-500/10 px-1 text-[10px] text-yellow-600 uppercase tracking-wide hover:bg-yellow-500/20`,onClick:t=>{t.preventDefault(),i?.(e)},"data-testid":`skill-fork-chip-${e}`,children:(0,Q.jsx)(l,{id:`jng7Ko`})})}):e===N?(0,Q.jsx)(`span`,{className:`inline-flex h-5 shrink-0 items-center rounded border border-border/60 px-1 text-[10px] uppercase tracking-wide text-muted-foreground`,children:(0,Q.jsx)(l,{id:`tiFPjk`})}):s.has(e)&&r?.hosts?(0,Q.jsxs)(Q.Fragment,{children:[!w&&(X.has(e)?`link`:`copy`)!==E?le(e,t??a,X.has(e)?`link`:`copy`):null,(0,Q.jsx)(En,{hint:o({id:`nBgzKO`}),children:(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e)},"data-testid":`skill-set-source-${e}`,children:(0,Q.jsx)(l,{id:`VNNRfN`})})})]}):null,!w&&q.has(J(t))?(0,Q.jsx)(En,{hint:o({id:`iz1LdD`}),children:(0,Q.jsx)(b,{testId:`skill-drift-${e}`})}):null]})]})},e)},t[101]=o,t[102]=V,t[103]=w,t[104]=te,t[105]=W,t[106]=le,t[107]=q,t[108]=E,t[109]=s,t[110]=X,t[111]=i,t[112]=p,t[113]=r?.hosts,t[114]=N,t[115]=F,t[116]=c,t[117]=n,t[118]=be):be=t[118],ee=f.map(be);let xe;t[119]!==o||t[120]!==V||t[121]!==w||t[122]!==te||t[123]!==le||t[124]!==q||t[125]!==E||t[126]!==F||t[127]!==n?(xe=e=>(0,Q.jsx)(En,{hint:e.placed===null?o(E===`link`?{id:`ybWWR2`,values:{0:e.display}}:{id:`fDjZxw`,values:{0:e.display}}):o({id:`C0cll5`,values:{0:e.display}}),children:(0,Q.jsxs)(I,{disabled:w,checked:e.placed!==null,onCheckedChange:t=>{if(t===!0&&e.placed===null){if(!te(e.root))return;n.placeAt(e.root,E)}else e.placed!==null&&n.unplaceAt?.(e.placed.path)},onSelect:An,className:`group`,"data-testid":`skill-custom-root-${e.root}`,children:[e.root===`.agents/skills`?(0,Q.jsx)(_,{host:`agents`,"aria-hidden":!0,className:`size-4`}):(0,Q.jsx)(Ne,{"aria-hidden":!0,className:`size-4 text-muted-foreground`}),(0,Q.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-baseline gap-1.5`,children:[(0,Q.jsx)(`span`,{className:`min-w-0 truncate font-mono text-xs`,children:e.display}),F(e.root).length>0?(0,Q.jsx)(`span`,{className:`flex shrink-0 items-center gap-0.5`,"data-testid":`skill-row-audience-custom-${e.root}`,children:F(e.root).map(t=>V(t,e.root))}):null,!w&&e.placed!==null&&q.has(e.placed.path)?(0,Q.jsx)(En,{hint:o({id:`iz1LdD`}),children:(0,Q.jsx)(b,{testId:`skill-drift-custom-${e.root}`})}):e.placed===null?null:(0,Q.jsxs)(Q.Fragment,{children:[!w&&e.placed.mode!==E?le(e.root,e.display,e.placed.mode):null,(0,Q.jsx)(En,{hint:o({id:`nBgzKO`}),children:(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-5 shrink-0 rounded border border-border/60 px-1 font-normal text-[10px] text-muted-foreground uppercase tracking-wide opacity-0 focus-visible:opacity-100 group-hover:opacity-100 hover:border-foreground/40 hover:text-foreground`,onClick:t=>{t.preventDefault(),t.stopPropagation(),n.setSource?.(e.root)},"data-testid":`skill-set-source-custom-${e.root}`,children:(0,Q.jsx)(l,{id:`VNNRfN`})})})]})]})]})},e.root),t[119]=o,t[120]=V,t[121]=w,t[122]=te,t[123]=le,t[124]=q,t[125]=E,t[126]=F,t[127]=n,t[128]=xe):xe=t[128],k=pe.map(xe),t[14]=o,t[15]=y,t[16]=m.data,t[17]=m.status,t[18]=s,t[19]=g,t[20]=d,t[21]=C,t[22]=i,t[23]=a,t[24]=p,t[25]=r,t[26]=c,t[27]=n,t[28]=w,t[29]=T,t[30]=E,t[31]=D,t[32]=O,t[33]=ee,t[34]=k}else w=t[28],T=t[29],E=t[30],D=t[31],O=t[32],ee=t[33],k=t[34];let A;t[129]!==o||t[130]!==w||t[131]!==T||t[132]!==E||t[133]!==a||t[134]!==n?(A=T.length>0&&n.convertLocations?(0,Q.jsxs)(`div`,{className:`flex items-center gap-1 px-2 pt-1 pb-1.5`,children:[(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,className:`h-auto whitespace-normal p-0 text-left font-normal text-[11px] text-muted-foreground leading-snug hover:bg-transparent hover:text-foreground`,onClick:e=>{e.preventDefault();let t=E===`link`?`copy`:`link`,r=T.filter(e=>e.mode!==t);if(r.length===0)return;let i=o(t===`copy`?{id:`iOAsF1`}:{id:`MS8lMS`}),s=o(t===`copy`?{id:`gZiT5e`}:{id:`PhIa-X`}),c=r.map(kn).join(`
|
|
2
|
-
`);window.confirm(`${i}\n\n${s}\n\n${c}\n\n${o({id:`Cu6GXQ`})}`)&&(a?.(),n.convertLocations?.(r.map(e=>({target:e.target,mode:t}))))},disabled:w,"data-testid":`skill-convert-all`,children:E===`link`?(0,Q.jsx)(l,{id:`rcJmK8`}):(0,Q.jsx)(l,{id:`LBv_TR`})}),(0,Q.jsx)(En,{hint:o({id:`0J6nhG`}),children:(0,Q.jsx)(x,{variant:`ghost`,size:`sm`,"aria-label":o({id:`qJSo0_`}),className:`size-4 shrink-0 rounded-full border border-border/60 p-0 font-normal text-[9px] text-muted-foreground hover:border-foreground/40 hover:bg-transparent hover:text-foreground`,onClick:On,"data-testid":`skill-convert-all-help`,children:`?`})})]}):null,t[129]=o,t[130]=w,t[131]=T,t[132]=E,t[133]=a,t[134]=n,t[135]=A):A=t[135];let j;t[136]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(z,{}),t[136]=j):j=t[136];let N;t[137]===o?N=t[138]:(N=o({id:`jqe7Yq`}),t[137]=o,t[138]=N);let P;t[139]===r?.scope?P=t[140]:(P=()=>{window.location.hash=r?.scope===`global`?`#settings/user-skills`:`#settings/skills`},t[139]=r?.scope,t[140]=P);let F,R;t[141]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(vt,{"aria-hidden":!0}),R=(0,Q.jsx)(l,{id:`ZBF9fn`}),t[141]=F,t[142]=R):(F=t[141],R=t[142]);let te;t[143]===P?te=t[144]:(te=(0,Q.jsxs)(M,{onSelect:P,children:[F,R]}),t[143]=P,t[144]=te);let B;t[145]!==N||t[146]!==te?(B=(0,Q.jsx)(En,{hint:N,children:te}),t[145]=N,t[146]=te,t[147]=B):B=t[147];let V;return t[148]!==B||t[149]!==D||t[150]!==O||t[151]!==ee||t[152]!==k||t[153]!==A?(V=(0,Q.jsxs)(Q.Fragment,{children:[D,O,ee,k,A,j,B]}),t[148]=B,t[149]=D,t[150]=O,t[151]=ee,t[152]=k,t[153]=A,t[154]=V):V=t[154],V}function On(e){return e.preventDefault()}function kn(e){return e.display}function An(e){return e.preventDefault()}function jn(e){return e.preventDefault()}function Mn(e){return e.preventDefault()}function Nn(e){return[Je(e),e]}function Pn(e){return e===`link`}function Fn(e){return e.mode}function In(e){return(e??``).replace(/^~\//,``)}function Ln(e){return e===`agents`?`.agents`:he[e]??e}function Rn(e){return e.hostAliases??{}}function zn(e){return e.hosts.includes(`agents`)||e.path.startsWith(`.agents/`)}function Bn(e){let t=(0,yt.c)(23),{onAddProperty:n,className:r,problemCount:i,problemMessages:a}=e,o=i===void 0?0:i,{_:s}=u(),c=o>0,d;t[0]!==s||t[1]!==c||t[2]!==o?(d=s(c?{id:`3KOHFt`,values:{problemCount:o}}:{id:`81H_23`}),t[0]=s,t[1]=c,t[2]=o,t[3]=d):d=t[3];let f=d,m;t[4]===r?m=t[5]:(m=p(`relative`,r),t[4]=r,t[5]=m);let h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,Q.jsx)(gt,{}),t[6]=h):h=t[6];let g;t[7]!==c||t[8]!==o?(g=c?(0,Q.jsx)(Ye,{variant:`notification`,"aria-hidden":`true`,"data-testid":`add-properties-problem-badge`,className:`pointer-events-none absolute -top-0.5 -right-0.5 size-3.5 rounded-full p-0 font-sans text-[9px] leading-none tabular-nums`,children:o>9?`9+`:o}):null,t[7]=c,t[8]=o,t[9]=g):g=t[9];let _;t[10]===g?_=t[11]:(_=(0,Q.jsxs)(S,{children:[h,g]}),t[10]=g,t[11]=_);let v;t[12]!==f||t[13]!==n||t[14]!==m||t[15]!==_?(v=(0,Q.jsx)(x,{variant:`ghost`,size:`icon`,"aria-label":f,onClick:n,"data-testid":`add-properties-button`,className:m,asChild:!0,children:_}),t[12]=f,t[13]=n,t[14]=m,t[15]=_,t[16]=v):v=t[16];let y;t[17]!==c||t[18]!==a?(y=(0,Q.jsx)(C,{side:`bottom`,children:c?(0,Q.jsxs)(`span`,{className:`flex flex-col gap-0.5`,children:[(0,Q.jsx)(`span`,{className:`font-medium`,children:(0,Q.jsx)(l,{id:`AwrGuz`})}),a?.map(Vn)]}):(0,Q.jsx)(l,{id:`81H_23`})}),t[17]=c,t[18]=a,t[19]=y):y=t[19];let b;return t[20]!==v||t[21]!==y?(b=(0,Q.jsxs)(w,{children:[v,y]}),t[20]=v,t[21]=y,t[22]=b):b=t[22],b}function Vn(e,t){return(0,Q.jsx)(`span`,{className:`opacity-90`,children:e},t)}function Hn(e){return e?Ie._({id:`wTcjov`}):null}function Un(e){let t=(0,yt.c)(47),{_:n}=u(),r=s(),i=v(),o=B(),c=H();if(r)return null;let{input:d,installStates:p,dispatch:m,onBeforeLaunch:h}=e,g=d===null,_,y,b,x,S,C,w,T,E,D,O;if(t[0]!==n||t[1]!==m||t[2]!==d||t[3]!==g||t[4]!==p||t[5]!==h||t[6]!==c||t[7]!==o||t[8]!==i){let e=Hn(g),r;t[20]===c?r=t[21]:(r=e=>ne(c,e.id),t[20]=c,t[21]=r);let s=U.filter(r),u;t[22]===c?u=t[23]:(u=e=>G(c,e.source,e.id,!0,e.supported),t[22]=c,t[23]=u);let f=o.filter(u),v=i?ce.filter(e=>J(c,e,i.installedClis)):[];b=s.length>0,x=i!==null&&v.length>0,S=f.length>0,y=N,t[24]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,Q.jsxs)(R,{children:[(0,Q.jsx)(a,{"aria-hidden":`true`}),(0,Q.jsx)(l,{id:`O7_W_a`})]}),t[24]=O):O=t[24],_=P,C=`max-h-80`,w=S?(0,Q.jsxs)(F,{"aria-label":n({id:`vPKX2i`}),children:[(0,Q.jsxs)(L,{className:`flex items-center gap-1.5`,children:[(0,Q.jsx)(l,{id:`RXEbZy`}),(0,Q.jsx)(Y,{})]}),f.map(t=>{let r=t.name;return(0,Q.jsxs)(M,{onSelect:()=>{d!==null&&(h?.(),sn(d,{agent:{source:t.source,id:t.id}}))},disabled:g,"data-testid":`file-tree-open-in-thread-${t.id}`,"aria-label":e?n({id:`gtGQ9S`,values:{agentName:r,hint:e}}):void 0,children:[(0,Q.jsx)(Oe,{agentId:t.id,iconUrl:t.iconUrl,className:`size-4`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(l,{id:`5PrrYw`,values:{agentName:r}})}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},`${t.source}:${t.id}`)})]}):null,t[25]!==b||t[26]!==x||t[27]!==S?(T=S&&(x||b)?(0,Q.jsx)(z,{}):null,t[25]=b,t[26]=x,t[27]=S,t[28]=T):T=t[28],E=x?(0,Q.jsxs)(F,{"aria-label":n({id:`ALhMYW`}),children:[(0,Q.jsx)(L,{children:(0,Q.jsx)(l,{id:`ALhMYW`})}),v.map(t=>{let{displayName:r}=se[t];return(0,Q.jsxs)(M,{onSelect:()=>{d!==null&&(h?.(),i.launchInTerminal(d,t))},disabled:g,"data-testid":`file-tree-open-in-terminal-${t}`,"aria-label":n(e?{id:`AIn2Yv`,values:{displayName:r,hint:e}}:{id:`QYfQdv`,values:{displayName:r}}),children:[(0,Q.jsx)(K,{id:V(t),"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:r}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t)})]}):null,D=b?(0,Q.jsxs)(Q.Fragment,{children:[x?(0,Q.jsx)(z,{}):null,(0,Q.jsxs)(F,{"aria-label":n({id:`BBqGS9`}),children:[(0,Q.jsx)(L,{children:(0,Q.jsx)(l,{id:`BBqGS9`})}),s.map(t=>{let r=!g,{displayName:i}=t,a=n(e?{id:`1ZpfyB`,values:{displayName:i,hint:e}}:{id:`WqLq6M`,values:{displayName:i}});return(0,Q.jsxs)(M,{disabled:!r,onSelect:()=>{if(d){if(h?.(),p[t.id]?.installed!==!0){Kt(t);return}m(t.id,d)}},"data-testid":`file-tree-open-in-${t.id}`,"aria-label":a,children:[(0,Q.jsx)(K,{id:t.id,"aria-hidden":`true`}),(0,Q.jsx)(`span`,{className:`flex-1`,children:t.displayName}),e?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`ml-2 text-muted-foreground text-xs`,children:e}):null]},t.id)})]})]}):null,t[0]=n,t[1]=m,t[2]=d,t[3]=g,t[4]=p,t[5]=h,t[6]=c,t[7]=o,t[8]=i,t[9]=_,t[10]=y,t[11]=b,t[12]=x,t[13]=S,t[14]=C,t[15]=w,t[16]=T,t[17]=E,t[18]=D,t[19]=O}else _=t[9],y=t[10],b=t[11],x=t[12],S=t[13],C=t[14],w=t[15],T=t[16],E=t[17],D=t[18],O=t[19];let ee;t[29]!==b||t[30]!==x||t[31]!==S?(ee=S||x||b?(0,Q.jsx)(z,{}):null,t[29]=b,t[30]=x,t[31]=S,t[32]=ee):ee=t[32];let k;t[33]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(f,{"aria-hidden":`true`}),t[33]=k):k=t[33];let A;t[34]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,Q.jsxs)(M,{onSelect:Le,"data-testid":`file-tree-open-in-settings`,children:[k,(0,Q.jsx)(`span`,{className:`flex-1`,children:(0,Q.jsx)(l,{id:`jRAGrQ`})})]}),t[34]=A):A=t[34];let j;t[35]!==_||t[36]!==C||t[37]!==w||t[38]!==T||t[39]!==E||t[40]!==D||t[41]!==ee?(j=(0,Q.jsxs)(_,{className:C,children:[w,T,E,D,ee,A]}),t[35]=_,t[36]=C,t[37]=w,t[38]=T,t[39]=E,t[40]=D,t[41]=ee,t[42]=j):j=t[42];let I;return t[43]!==y||t[44]!==O||t[45]!==j?(I=(0,Q.jsxs)(y,{children:[O,j]}),t[43]=y,t[44]=O,t[45]=j,t[46]=I):I=t[46],I}function Wn(e){let t=re(e);if(t)return{scope:`project`,name:t.name,rel:t.rel};let n=le(e);return n?{scope:`global`,name:n.name,rel:n.rel}:null}function Gn(e,t,n){return e.filter(e=>{let r=Be(e);if(r.kind===`skill-file`)return r.scope===t&&r.name===n;if(r.kind!==`doc`)return!1;let i=Wn(r.docName);return i?.scope===t&&i.name===n})}function Kn(e,t){let n=new Map(t.map(e=>[`${e.scope}\u0000${e.name}`,e])),r=[];for(let t of e){let e=Wn(t);if(!e||n.has(`${e.scope}\u0000${e.name}`))continue;let i=e.scope===`project`?`global`:`project`,a=n.get(`${i}\u0000${e.name}`);e.rel===null&&a!==void 0?r.push({kind:`retarget`,fromDocName:t,toDocName:ze(a)}):r.push({kind:`close`,docName:t})}return r}function qn(){let e=(0,yt.c)(15),{openTabs:t,closeDocument:n}=o(),r=ke(),i;e[0]===t?i=e[1]:(i=t.some(Yn),e[0]=t,e[1]=i);let a=i,s;e[2]===a?s=e[3]:(s={enabled:a},e[2]=a,e[3]=s);let c=ut(s),l=(0,$.useRef)(null),u;e[4]!==n||e[5]!==t||e[6]!==r||e[7]!==c.data||e[8]!==c.status?(u=()=>{if(c.status!==`ready`)return;let e=c.data,i=`${t.join(``)}\u0002${e.map(Jn).sort().join(``)}`;if(l.current===i)return;l.current=i;let a=Kn(t,e);for(let e of a)e.kind===`retarget`?r(e.fromDocName,e.toDocName):n(e.docName)},e[4]=n,e[5]=t,e[6]=r,e[7]=c.data,e[8]=c.status,e[9]=u):u=e[9];let d;e[10]!==n||e[11]!==t||e[12]!==r||e[13]!==c?(d=[c,t,r,n],e[10]=n,e[11]=t,e[12]=r,e[13]=c,e[14]=d):d=e[14],(0,$.useEffect)(u,d)}function Jn(e){return`${e.scope}\u0000${e.name}`}function Yn(e){return Wn(e)!==null}function Xn(e){let t=(0,yt.c)(19),{skill:n,onOpenChange:r,onDeleted:i}=e,{_:a}=u(),{setSkillsSidebar:s,closeTabs:c,openTabs:l}=o(),[d,f]=(0,$.useState)(!1),p;t[0]!==a||t[1]!==c||t[2]!==i||t[3]!==r||t[4]!==l||t[5]!==s?(p=async function(e){s(!0),f(!0);let t=await it(e.scope,e.name);if(f(!1),!t.ok){let{error:e}=t;Z.error(a({id:`AtBdnD`,values:{error:e}}));return}Z.success(a({id:`h9QFb9`,values:{0:e.name}})),c(Gn(l,e.scope,e.name),{force:!0}),i(),r(!1)},t[0]=a,t[1]=c,t[2]=i,t[3]=r,t[4]=l,t[5]=s,t[6]=p):p=t[6];let m=p,h=n!==null,_;t[7]!==d||t[8]!==r?(_=e=>{!e&&!d&&r(!1)},t[7]=d,t[8]=r,t[9]=_):_=t[9];let v;t[10]!==a||t[11]!==d||t[12]!==m||t[13]!==n?(v=n?(0,Q.jsx)(g,{itemName:a({id:`ExUzM4`,values:{0:n.name}}),isSubmitting:d,onDelete:()=>m(n),customDescription:n.origin?.source&&/\/plugins\/(?:cache|marketplaces)\//.test(n.origin.source)?a({id:`WnsbUT`,values:{0:n.path}}):a({id:`E1Da_b`,values:{0:n.path}})}):null,t[10]=a,t[11]=d,t[12]=m,t[13]=n,t[14]=v):v=t[14];let y;return t[15]!==h||t[16]!==_||t[17]!==v?(y=(0,Q.jsx)(j,{open:h,onOpenChange:_,children:v}),t[15]=h,t[16]=_,t[17]=v,t[18]=y):y=t[18],y}function Zn(e){let t=e.split(`/`);return t.some(e=>e===``||e===`.`||e===`..`)||t.length===0||t.length===1&&t[0].toLowerCase()===`skill.md`?!1:!/\s/.test(e)}function Qn(e){let t=(0,yt.c)(66),{target:n,onOpenChange:r}=e,{_:i}=u(),{openTarget:a}=o(),s=(0,$.useId)(),[c,d]=(0,$.useState)(``),[f,p]=(0,$.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.prefix??`references/`)},t[0]=n,t[1]=m);let h=n?.skill.scope,g=n?.skill.name,_=n?.prefix,v;if(t[2]!==h||t[3]!==g||t[4]!==_?(v=[h,g,_],t[2]=h,t[3]=g,t[4]=_,t[5]=v):v=t[5],(0,$.useEffect)(m,v),!n)return null;let y,b,S,C;t[6]!==c||t[7]!==f?(C=c.trim(),b=C===``||!Zn(C),y=!b&&!f,S=C.includes(`/`)?C.split(`/`).slice(0,-1).join(`/`):null,t[6]=c,t[7]=f,t[8]=y,t[9]=b,t[10]=S,t[11]=C):(y=t[8],b=t[9],S=t[10],C=t[11]);let w=S,O;t[12]!==i||t[13]!==y||t[14]!==r||t[15]!==a||t[16]!==n||t[17]!==C?(O=async function(){if(!n||!y)return;p(!0);let e=/\.mdx?$/i.test(C),t=await Xe({scope:n.skill.scope,name:n.skill.name,path:C,content:e?`# ${C.split(`/`).pop()?.replace(/\.mdx?$/i,``)??``}\n`:``});if(p(!1),!t.ok){Z.error(i({id:`a_2_uB`,values:{0:t.error,trimmed:C}}));return}if(Z.success(i({id:`MXSt4t`,values:{0:t.path}})),e){let e=Ve(n.skill,C);a({kind:`doc`,target:e,docName:e})}r(!1)},t[12]=i,t[13]=y,t[14]=r,t[15]=a,t[16]=n,t[17]=C,t[18]=O):O=t[18];let k=O,M;t[19]!==r||t[20]!==f?(M=e=>{!e&&!f&&r(!1)},t[19]=r,t[20]=f,t[21]=M):M=t[21];let N;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsx)(E,{children:(0,Q.jsx)(l,{id:`wQvvZY`})}),t[22]=N):N=t[22];let P;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsxs)(A,{children:[N,(0,Q.jsx)(T,{children:(0,Q.jsx)(l,{id:`lM4c-I`})})]}),t[23]=P):P=t[23];let F;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(l,{id:`I6gXOa`}),t[24]=F):F=t[24];let I;t[25]===s?I=t[26]:(I=(0,Q.jsx)(te,{htmlFor:s,children:F}),t[25]=s,t[26]=I);let L;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>d(e.target.value),t[27]=L):L=t[27];let R=b&&C!==``,z;t[28]===k?z=t[29]:(z=e=>{e.key===`Enter`&&k()},t[28]=k,t[29]=z);let B;t[30]!==s||t[31]!==c||t[32]!==R||t[33]!==z?(B=(0,Q.jsx)(Fe,{id:s,value:c,onChange:L,placeholder:`references/notes.md`,"aria-invalid":R,onKeyDown:z}),t[30]=s,t[31]=c,t[32]=R,t[33]=z,t[34]=B):B=t[34];let V;t[35]!==w||t[36]!==b||t[37]!==C?(V=b&&C!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(l,{id:`fVzizW`})}):w?(0,Q.jsx)(`p`,{className:`text-muted-foreground text-xs`,children:(0,Q.jsx)(l,{id:`9lso1Y`,values:{folderPart:w},components:{0:(0,Q.jsx)(`span`,{className:`font-mono text-foreground/80`})}})}):null,t[35]=w,t[36]=b,t[37]=C,t[38]=V):V=t[38];let H;t[39]!==I||t[40]!==B||t[41]!==V?(H=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[I,B,V]}),t[39]=I,t[40]=B,t[41]=V,t[42]=H):H=t[42];let U;t[43]===r?U=t[44]:(U=()=>r(!1),t[43]=r,t[44]=U);let W;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(W=(0,Q.jsx)(l,{id:`dEgA5A`}),t[45]=W):W=t[45];let G;t[46]!==f||t[47]!==U?(G=(0,Q.jsx)(x,{variant:`outline`,onClick:U,disabled:f,children:W}),t[46]=f,t[47]=U,t[48]=G):G=t[48];let K;t[49]===k?K=t[50]:(K=()=>void k(),t[49]=k,t[50]=K);let q=!y,J;t[51]===f?J=t[52]:(J=f?(0,Q.jsx)(l,{id:`E9bKSA`}):(0,Q.jsx)(l,{id:`hYgDIe`}),t[51]=f,t[52]=J);let Y;t[53]!==K||t[54]!==q||t[55]!==J?(Y=(0,Q.jsx)(x,{onClick:K,disabled:q,children:J}),t[53]=K,t[54]=q,t[55]=J,t[56]=Y):Y=t[56];let ne;t[57]!==G||t[58]!==Y?(ne=(0,Q.jsxs)(ee,{children:[G,Y]}),t[57]=G,t[58]=Y,t[59]=ne):ne=t[59];let X;t[60]!==H||t[61]!==ne?(X=(0,Q.jsxs)(D,{className:`sm:max-w-md`,children:[P,H,ne]}),t[60]=H,t[61]=ne,t[62]=X):X=t[62];let re;return t[63]!==X||t[64]!==M?(re=(0,Q.jsx)(j,{open:!0,onOpenChange:M,children:X}),t[63]=X,t[64]=M,t[65]=re):re=t[65],re}function $n(e){let t=(0,yt.c)(64),{target:n,onOpenChange:r}=e,{_:i}=u(),a=ke(),o=(0,$.useId)(),[s,c]=(0,$.useState)(``),[d,f]=(0,$.useState)(!1),p;t[0]===n?p=t[1]:(p=()=>{n&&c(n.filePath)},t[0]=n,t[1]=p);let m=n?.skill.scope,h=n?.skill.name,g=n?.filePath,_;if(t[2]!==m||t[3]!==h||t[4]!==g?(_=[m,h,g],t[2]=m,t[3]=h,t[4]=g,t[5]=_):_=t[5],(0,$.useEffect)(p,_),!n)return null;let v,y,b;t[6]!==s||t[7]!==n.filePath?(y=s.trim(),b=y===n.filePath,v=y===``||!Zn(y),t[6]=s,t[7]=n.filePath,t[8]=v,t[9]=y,t[10]=b):(v=t[8],y=t[9],b=t[10]);let S=v,C=!S&&!b&&!d,w;t[11]!==i||t[12]!==C||t[13]!==r||t[14]!==a||t[15]!==n||t[16]!==y?(w=async function(){if(!n||!C)return;f(!0);let e=await st({scope:n.skill.scope,name:n.skill.name,from:n.filePath,to:y});if(f(!1),!e.ok){Z.error(i({id:`11ukmX`,values:{0:e.error}}));return}e.fromDocName!==void 0&&e.toDocName!==void 0&&a(e.fromDocName,e.toDocName),Z.success(i({id:`XszXjc`,values:{0:e.to}})),r(!1)},t[11]=i,t[12]=C,t[13]=r,t[14]=a,t[15]=n,t[16]=y,t[17]=w):w=t[17];let O=w,k;t[18]!==r||t[19]!==d?(k=e=>{!e&&!d&&r(!1)},t[18]=r,t[19]=d,t[20]=k):k=t[20];let M;t[21]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(E,{children:(0,Q.jsx)(l,{id:`yckias`})}),t[21]=M):M=t[21];let N;t[22]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,Q.jsxs)(A,{children:[M,(0,Q.jsx)(T,{children:(0,Q.jsx)(l,{id:`HzVAoz`})})]}),t[22]=N):N=t[22];let P;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,Q.jsx)(l,{id:`I6gXOa`}),t[23]=P):P=t[23];let F;t[24]===o?F=t[25]:(F=(0,Q.jsx)(te,{htmlFor:o,children:P}),t[24]=o,t[25]=F);let I;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(I=e=>c(e.target.value),t[26]=I):I=t[26];let L=S&&y!==``,R;t[27]===O?R=t[28]:(R=e=>{e.key===`Enter`&&O()},t[27]=O,t[28]=R);let z;t[29]!==o||t[30]!==s||t[31]!==L||t[32]!==R?(z=(0,Q.jsx)(Fe,{id:o,value:s,onChange:I,"aria-invalid":L,onKeyDown:R}),t[29]=o,t[30]=s,t[31]=L,t[32]=R,t[33]=z):z=t[33];let B;t[34]!==S||t[35]!==y?(B=S&&y!==``?(0,Q.jsx)(`p`,{className:`text-destructive text-xs`,children:(0,Q.jsx)(l,{id:`fVzizW`})}):null,t[34]=S,t[35]=y,t[36]=B):B=t[36];let V;t[37]!==F||t[38]!==z||t[39]!==B?(V=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[F,z,B]}),t[37]=F,t[38]=z,t[39]=B,t[40]=V):V=t[40];let H;t[41]===r?H=t[42]:(H=()=>r(!1),t[41]=r,t[42]=H);let U;t[43]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(l,{id:`dEgA5A`}),t[43]=U):U=t[43];let W;t[44]!==d||t[45]!==H?(W=(0,Q.jsx)(x,{variant:`outline`,onClick:H,disabled:d,children:U}),t[44]=d,t[45]=H,t[46]=W):W=t[46];let G;t[47]===O?G=t[48]:(G=()=>void O(),t[47]=O,t[48]=G);let K=!C,q;t[49]===d?q=t[50]:(q=d?(0,Q.jsx)(l,{id:`tHKQ6j`}):(0,Q.jsx)(l,{id:`2wxgft`}),t[49]=d,t[50]=q);let J;t[51]!==G||t[52]!==K||t[53]!==q?(J=(0,Q.jsx)(x,{onClick:G,disabled:K,children:q}),t[51]=G,t[52]=K,t[53]=q,t[54]=J):J=t[54];let Y;t[55]!==W||t[56]!==J?(Y=(0,Q.jsxs)(ee,{children:[W,J]}),t[55]=W,t[56]=J,t[57]=Y):Y=t[57];let ne;t[58]!==V||t[59]!==Y?(ne=(0,Q.jsxs)(D,{className:`sm:max-w-md`,children:[N,V,Y]}),t[58]=V,t[59]=Y,t[60]=ne):ne=t[60];let X;return t[61]!==ne||t[62]!==k?(X=(0,Q.jsx)(j,{open:!0,onOpenChange:k,children:ne}),t[61]=ne,t[62]=k,t[63]=X):X=t[63],X}function er(e){let t=(0,yt.c)(59),{target:n,onOpenChange:r}=e,{_:i}=u(),a=(0,$.useId)(),[o,s]=(0,$.useState)(null),[c,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(!1),[m,h]=(0,$.useState)(!1),[g,_]=(0,$.useState)(``),[v,y]=(0,$.useState)(!1),b;t[0]===n?b=t[1]:(b=()=>{if(s(null),d(null),p(!1),h(!1),!n)return;let{skill:e,editor:t}=n,r=e.absolutePath?.slice(0,-`/${e.path}`.length)??null;if(r===null){p(!0);return}let i=`${r}/${e.path.replace(/\/SKILL\.mdx?$/i,``)}`,a=`${r}/${Ge(t,e.scope)}/${e.name}`,o=new AbortController;for(let[t,n]of[[i,d],[a,s]])tt({source:t,name:e.name},o.signal).then(e=>{o.signal.aborted||(e.ok?n(e.skillMd):p(!0))}).catch(()=>{o.signal.aborted||p(!0)});return()=>o.abort()},t[0]=n,t[1]=b);let S=n?.skill.scope,C=n?.skill.name,w=n?.editor,k;if(t[2]!==S||t[3]!==C||t[4]!==w?(k=[S,C,w],t[2]=S,t[3]=C,t[4]=w,t[5]=k):k=t[5],(0,$.useEffect)(b,k),!n)return null;let{skill:M,editor:N}=n,P;t[6]!==i||t[7]!==N||t[8]!==r||t[9]!==M.name||t[10]!==M.scope||t[11]!==n||t[12]!==g?(P=async function(e){if(!n)return;y(!0);let t=await $e({scope:M.scope,name:M.name,editor:N,action:e,...e===`rename`?{toName:g.trim()}:{}});if(y(!1),!t.ok){Z.error(i({id:`MIF36T`,values:{0:t.error}}));return}Z.success(i(e===`align`?{id:`QKgePK`,values:{editor:N}}:e===`make-source`?{id:`It9oAP`,values:{editor:N}}:{id:`b2ezG_`,values:{0:g.trim()}})),r(!1)},t[6]=i,t[7]=N,t[8]=r,t[9]=M.name,t[10]=M.scope,t[11]=n,t[12]=g,t[13]=P):P=t[13];let F=P,I,L;t[14]!==M.name||t[15]!==g?(L=g.trim(),I=L===``||!ae.test(L)||L===M.name,t[14]=M.name,t[15]=g,t[16]=I,t[17]=L):(I=t[16],L=t[17]);let R=I,z;t[18]!==v||t[19]!==r?(z=e=>{!e&&!v&&r(!1)},t[18]=v,t[19]=r,t[20]=z):z=t[20];let B;t[21]!==N||t[22]!==M.name?(B=(0,Q.jsx)(E,{children:(0,Q.jsx)(l,{id:`q8aCbb`,values:{0:M.name,editor:N}})}),t[21]=N,t[22]=M.name,t[23]=B):B=t[23];let V;t[24]===N?V=t[25]:(V=(0,Q.jsx)(T,{children:(0,Q.jsx)(l,{id:`QASTNu`,values:{editor:N}})}),t[24]=N,t[25]=V);let H;t[26]!==V||t[27]!==B?(H=(0,Q.jsxs)(A,{children:[B,V]}),t[26]=V,t[27]=B,t[28]=H):H=t[28];let U;t[29]!==c||t[30]!==o||t[31]!==f?(U=c!==null&&o!==null?(0,Q.jsx)(pt,{oldContent:c,newContent:o,layout:`unified`}):f?(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center px-6 text-center text-muted-foreground text-sm`,children:(0,Q.jsx)(l,{id:`5BlXTD`})}):(0,Q.jsx)(`div`,{className:`flex min-h-56 items-center justify-center text-muted-foreground text-sm`,children:(0,Q.jsx)(l,{id:`1V17kO`})}),t[29]=c,t[30]=o,t[31]=f,t[32]=U):U=t[32];let W;t[33]!==F||t[34]!==N||t[35]!==a||t[36]!==R||t[37]!==m||t[38]!==M.name||t[39]!==g||t[40]!==L?(W=m?(0,Q.jsxs)(`div`,{className:`mt-3 space-y-1.5`,children:[(0,Q.jsx)(te,{htmlFor:a,children:(0,Q.jsx)(l,{id:`pSimwP`,values:{editor:N}})}),(0,Q.jsx)(Fe,{id:a,value:g,onChange:e=>_(e.target.value),placeholder:`${M.name}-${N}`,"aria-invalid":R&&L!==``,onKeyDown:e=>{e.key===`Enter`&&!R&&F(`rename`)}})]}):null,t[33]=F,t[34]=N,t[35]=a,t[36]=R,t[37]=m,t[38]=M.name,t[39]=g,t[40]=L,t[41]=W):W=t[41];let G;t[42]!==U||t[43]!==W?(G=(0,Q.jsxs)(O,{className:`min-h-0 flex-1 overflow-auto`,children:[U,W]}),t[42]=U,t[43]=W,t[44]=G):G=t[44];let K;t[45]!==F||t[46]!==v||t[47]!==N||t[48]!==R||t[49]!==m||t[50]!==M.name?(K=(0,Q.jsx)(ee,{children:m?(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(x,{variant:`outline`,onClick:()=>h(!1),disabled:v,children:(0,Q.jsx)(l,{id:`iH8pgl`})}),(0,Q.jsx)(x,{onClick:()=>void F(`rename`),disabled:v||R,children:(0,Q.jsx)(l,{id:`AT0e50`})})]}):(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(x,{variant:`outline`,onClick:()=>{_(`${M.name}-${N}`),h(!0)},disabled:v,children:(0,Q.jsx)(l,{id:`AT0e50`})}),(0,Q.jsx)(x,{variant:`outline`,onClick:()=>void F(`make-source`),disabled:v,children:(0,Q.jsx)(l,{id:`xWomUD`,values:{editor:N}})}),(0,Q.jsx)(x,{onClick:()=>void F(`align`),disabled:v,children:(0,Q.jsx)(l,{id:`PZn2LP`})})]})}),t[45]=F,t[46]=v,t[47]=N,t[48]=R,t[49]=m,t[50]=M.name,t[51]=K):K=t[51];let q;t[52]!==H||t[53]!==G||t[54]!==K?(q=(0,Q.jsxs)(D,{className:`flex max-h-[85vh] w-full max-w-3xl flex-col`,children:[H,G,K]}),t[52]=H,t[53]=G,t[54]=K,t[55]=q):q=t[55];let J;return t[56]!==q||t[57]!==z?(J=(0,Q.jsx)(j,{open:!0,onOpenChange:z,children:q}),t[56]=q,t[57]=z,t[58]=J):J=t[58],J}function tr(e){let t=(0,yt.c)(75),{skill:n,existingNames:r,onOpenChange:i,onRenamed:a}=e,o=Ae(),s=n!==null,c=(0,$.useId)(),[u,d]=(0,$.useState)(``),[f,p]=(0,$.useState)(!1),m;t[0]===n?m=t[1]:(m=()=>{n&&d(n.name)},t[0]=n,t[1]=m);let h=n?.scope,g=n?.name,_;if(t[2]!==h||t[3]!==g?(_=[h,g],t[2]=h,t[3]=g,t[4]=_):_=t[4],(0,$.useEffect)(m,_),!n)return null;let v,y,b,S,C,w;if(t[5]!==r||t[6]!==u||t[7]!==n.name){C=u.trim(),w=C===n.name;let e;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=/\s/,t[14]=e):e=t[14];let i;t[15]===u?i=t[16]:(i=e.test(u),t[15]=u,t[16]=i),v=i,S=C.length>64,y=C===``||!ae.test(C)||S,b=!y&&!w&&r.has(C),t[5]=r,t[6]=u,t[7]=n.name,t[8]=v,t[9]=y,t[10]=b,t[11]=S,t[12]=C,t[13]=w}else v=t[8],y=t[9],b=t[10],S=t[11],C=t[12],w=t[13];let O=b,k=!y&&!O&&!w&&!f,M;t[17]!==k||t[18]!==i||t[19]!==a||t[20]!==o||t[21]!==n||t[22]!==C?(M=async function(){if(!n||!k)return;p(!0);let e=await o({scope:n.scope,name:n.name},C);p(!1),e.ok&&(a?.(C),i(!1))},t[17]=k,t[18]=i,t[19]=a,t[20]=o,t[21]=n,t[22]=C,t[23]=M):M=t[23];let N=M,P;t[24]===i?P=t[25]:(P=e=>e?null:i(!1),t[24]=i,t[25]=P);let F;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(F=(0,Q.jsx)(E,{children:(0,Q.jsx)(l,{id:`dw_3cv`})}),t[26]=F):F=t[26];let I;t[27]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,Q.jsxs)(A,{children:[F,(0,Q.jsx)(T,{children:(0,Q.jsx)(l,{id:`R9IDFz`})})]}),t[27]=I):I=t[27];let L;t[28]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,Q.jsx)(l,{id:`6YtxFj`}),t[28]=L):L=t[28];let R;t[29]===c?R=t[30]:(R=(0,Q.jsx)(te,{htmlFor:c,children:L}),t[29]=c,t[30]=R);let z;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>d(e.target.value),t[31]=z):z=t[31];let B;t[32]===N?B=t[33]:(B=e=>{e.key===`Enter`&&N()},t[32]=N,t[33]=B);let V=y||O,H=y&&C!==``||O?`${c}-error`:void 0,U;t[34]!==c||t[35]!==u||t[36]!==B||t[37]!==V||t[38]!==H?(U=(0,Q.jsx)(Fe,{id:c,value:u,onChange:z,onKeyDown:B,spellCheck:!1,autoCapitalize:`off`,autoCorrect:`off`,maxLength:64,"aria-invalid":V,"aria-describedby":H,className:`font-mono`}),t[34]=c,t[35]=u,t[36]=B,t[37]=V,t[38]=H,t[39]=U):U=t[39];let W;t[40]!==O||t[41]!==v||t[42]!==c||t[43]!==y||t[44]!==S||t[45]!==C?(W=y&&C!==``?(0,Q.jsx)(`p`,{id:`${c}-error`,className:`text-xs text-destructive`,children:v?(0,Q.jsx)(l,{id:`iUwpZI`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}}):S?(0,Q.jsx)(l,{id:`lK9c4T`}):(0,Q.jsx)(l,{id:`A50vr3`,components:{0:(0,Q.jsx)(`code`,{className:`font-mono`})}})}):O?(0,Q.jsx)(`p`,{id:`${c}-error`,className:`text-xs text-destructive`,children:(0,Q.jsx)(l,{id:`YJ1BTp`})}):null,t[40]=O,t[41]=v,t[42]=c,t[43]=y,t[44]=S,t[45]=C,t[46]=W):W=t[46];let G;t[47]!==R||t[48]!==U||t[49]!==W?(G=(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[R,U,W]}),t[47]=R,t[48]=U,t[49]=W,t[50]=G):G=t[50];let K;t[51]===i?K=t[52]:(K=()=>i(!1),t[51]=i,t[52]=K);let q;t[53]===Symbol.for(`react.memo_cache_sentinel`)?(q=(0,Q.jsx)(l,{id:`dEgA5A`}),t[53]=q):q=t[53];let J;t[54]!==f||t[55]!==K?(J=(0,Q.jsx)(x,{variant:`outline`,className:`font-mono uppercase`,onClick:K,disabled:f,children:q}),t[54]=f,t[55]=K,t[56]=J):J=t[56];let Y;t[57]===N?Y=t[58]:(Y=()=>void N(),t[57]=N,t[58]=Y);let ne=!k,X;t[59]===f?X=t[60]:(X=f?(0,Q.jsx)(l,{id:`tHKQ6j`}):(0,Q.jsx)(l,{id:`2wxgft`}),t[59]=f,t[60]=X);let re;t[61]!==Y||t[62]!==ne||t[63]!==X?(re=(0,Q.jsx)(x,{onClick:Y,disabled:ne,children:X}),t[61]=Y,t[62]=ne,t[63]=X,t[64]=re):re=t[64];let ie;t[65]!==J||t[66]!==re?(ie=(0,Q.jsxs)(ee,{children:[J,re]}),t[65]=J,t[66]=re,t[67]=ie):ie=t[67];let oe;t[68]!==G||t[69]!==ie?(oe=(0,Q.jsxs)(D,{children:[I,G,ie]}),t[68]=G,t[69]=ie,t[70]=oe):oe=t[70];let se;return t[71]!==s||t[72]!==oe||t[73]!==P?(se=(0,Q.jsx)(j,{open:s,onOpenChange:P,children:oe}),t[71]=s,t[72]=oe,t[73]=P,t[74]=se):se=t[74],se}function nr(){let e=(0,yt.c)(5),{_:t}=u(),n=Ke(),r=ke(),i=ut(),a;return e[0]!==t||e[1]!==r||e[2]!==n||e[3]!==i?(a=async(e,a)=>{if(a===e.scope)return!1;Ue(e.scope,e.name);let o=await et({name:e.name,fromScope:e.scope,toScope:a});if(He(e.scope,e.name),!o.ok)return Z.error(t({id:`07eGJB`,values:{0:o.error}})),!1;Z.success(t({id:`yhI6P0`,values:{0:e.name,1:n[a]}}));let s=i.status===`ready`?i.data.find(t=>t.scope===e.scope&&t.name===e.name):void 0;return r(s?ze(s):de(e.scope,e.name),a===`project`&&o.path!==void 0?`${o.path.replace(/\/+$/,``)}/SKILL`:de(a,e.name)),!0},e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a):a=e[4],a}function rr(e){let t=(0,yt.c)(38),{target:n,onOpenChange:r}=e,i=Ke(),a=nr(),[o,s]=(0,$.useState)(!1);if(!n)return null;let{scope:c,name:u,toScope:d}=n,f;t[0]!==o||t[1]!==r?(f=e=>!e&&!o&&r(!1),t[0]=o,t[1]=r,t[2]=f):f=t[2];let p=i[d],m;t[3]===p?m=t[4]:(m=(0,Q.jsx)(E,{children:(0,Q.jsx)(l,{id:`SXEdCq`,values:{0:p}})}),t[3]=p,t[4]=m);let h=i[c],g=i[d],_=i[d],v;t[5]!==u||t[6]!==h||t[7]!==g||t[8]!==_?(v={0:h,1:g,2:_,name:u},t[5]=u,t[6]=h,t[7]=g,t[8]=_,t[9]=v):v=t[9];let y;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(y={0:(0,Q.jsx)(`code`,{className:`font-mono`})},t[10]=y):y=t[10];let b;t[11]===v?b=t[12]:(b=(0,Q.jsx)(T,{children:(0,Q.jsx)(l,{id:`7bIiJ7`,values:v,components:y})}),t[11]=v,t[12]=b);let S;t[13]!==m||t[14]!==b?(S=(0,Q.jsxs)(A,{children:[m,b]}),t[13]=m,t[14]=b,t[15]=S):S=t[15];let C;t[16]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,Q.jsx)(l,{id:`dEgA5A`}),t[16]=C):C=t[16];let w;t[17]===o?w=t[18]:(w=(0,Q.jsx)(k,{asChild:!0,children:(0,Q.jsx)(x,{variant:`outline`,disabled:o,children:C})}),t[17]=o,t[18]=w);let O;t[19]!==a||t[20]!==u||t[21]!==r||t[22]!==c||t[23]!==d?(O=async()=>{s(!0),await a({scope:c,name:u},d),s(!1),r(!1)},t[19]=a,t[20]=u,t[21]=r,t[22]=c,t[23]=d,t[24]=O):O=t[24];let M;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(M=(0,Q.jsx)(l,{id:`QWdKwH`}),t[25]=M):M=t[25];let N;t[26]!==o||t[27]!==O?(N=(0,Q.jsx)(x,{"data-testid":`skill-scope-move-confirm`,disabled:o,onClick:O,children:M}),t[26]=o,t[27]=O,t[28]=N):N=t[28];let P;t[29]!==w||t[30]!==N?(P=(0,Q.jsxs)(ee,{children:[w,N]}),t[29]=w,t[30]=N,t[31]=P):P=t[31];let F;t[32]!==S||t[33]!==P?(F=(0,Q.jsxs)(D,{className:`sm:max-w-md`,children:[S,P]}),t[32]=S,t[33]=P,t[34]=F):F=t[34];let I;return t[35]!==f||t[36]!==F?(I=(0,Q.jsx)(j,{open:!0,onOpenChange:f,children:F}),t[35]=f,t[36]=F,t[37]=I):I=t[37],I}function ir(){let e=(0,yt.c)(45),{_:t}=u(),n=dt(),[r,i]=(0,$.useState)(null),[a,o]=(0,$.useState)(null),[s,c]=(0,$.useState)(null),[l,d]=(0,$.useState)(null),[f,p]=(0,$.useState)(null),[m,h]=(0,$.useState)(null),[g,_]=(0,$.useState)(null),v;e[0]===t?v=e[1]:(v=async function(e,n,r){_(e.name);let i=await nt({scope:e.scope,name:e.name,...n?{targets:[...n]}:{},...r?.linkMode===void 0?{}:{linkMode:r.linkMode}});if(_(null),!i.ok)return Z.error(t({id:`Mj8R8K`,values:{0:i.error}})),i;let a=ar,o=new Set(i.hosts),s=i.hosts.filter(t=>!e.hosts.includes(t)),c=e.hosts.filter(e=>!o.has(e)),l=e=>{let t=i.warningCodes.indexOf(e);return t>=0?i.warnings[t]:void 0},u=l(`no-targets`);if(u)return Z.warning(u),i;if(s.length>0){let e=l(`scripts-present`);e&&Z.warning(e);let t=l(`no-description`);t&&Z.warning(t)}return i.hosts.length===0?Z.success(t({id:`4pDZ2N`,values:{0:e.name}})):s.length>0&&c.length===0?Z.success(t({id:`PPFQ3o`,values:{0:e.name,1:a(s)}})):c.length>0&&s.length===0?Z.success(t({id:`OOIVJo`,values:{0:e.name,1:a(c)}})):s.length>0&&c.length>0?Z.success(t({id:`OxplNM`,values:{0:e.name,1:a(s),2:a(c)}})):Z.success(t({id:`wDgmsr`,values:{0:e.name,1:a(i.hosts)}})),i},e[0]=t,e[1]=v);let y=v,b;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(b=async function(e,t){if(t.length!==0){_(e.name);for(let{target:n,mode:r}of t){let t=await at({scope:e.scope,name:e.name,target:n,mode:r});if(!t.ok){Z.error(t.error);break}}_(null)}},e[2]=b):b=e[2];let x=b,S;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(S=async function(e,t){_(e.name);let n=await t();return _(null),n},e[3]=S):S=e[3];let C=S,w;e[4]!==t||e[5]!==n?(w=async function(e,r){let i=await rt({scope:e.scope,name:e.name,existingNames:r});if(!i.ok){Z.error(t({id:`UPjaXD`,values:{0:e.name,1:i.error}}));return}Z.success(t({id:`0g7rCZ`,values:{0:i.name}})),n(e.scope,i.name)},e[4]=t,e[5]=n,e[6]=w):w=e[6];let T=w,E,D;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{e||i(null)},D=()=>i(null),e[7]=E,e[8]=D):(E=e[7],D=e[8]);let O;e[9]===r?O=e[10]:(O=(0,Q.jsx)(Xn,{skill:r,onOpenChange:E,onDeleted:D}),e[9]=r,e[10]=O);let ee=a?.skill??null,k=a?.existingNames??sr,A,j;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(j=e=>{e||o(null)},A=()=>o(null),e[11]=A,e[12]=j):(A=e[11],j=e[12]);let M;e[13]!==ee||e[14]!==k?(M=(0,Q.jsx)(tr,{skill:ee,existingNames:k,onOpenChange:j,onRenamed:A}),e[13]=ee,e[14]=k,e[15]=M):M=e[15];let N;e[16]===Symbol.for(`react.memo_cache_sentinel`)?(N=e=>{e||c(null)},e[16]=N):N=e[16];let P;e[17]===s?P=e[18]:(P=(0,Q.jsx)(rr,{target:s,onOpenChange:N}),e[17]=s,e[18]=P);let F;e[19]===Symbol.for(`react.memo_cache_sentinel`)?(F=e=>{e||d(null)},e[19]=F):F=e[19];let I;e[20]===l?I=e[21]:(I=(0,Q.jsx)($n,{target:l,onOpenChange:F}),e[20]=l,e[21]=I);let L;e[22]===Symbol.for(`react.memo_cache_sentinel`)?(L=e=>{e||p(null)},e[22]=L):L=e[22];let R;e[23]===f?R=e[24]:(R=(0,Q.jsx)(Qn,{target:f,onOpenChange:L}),e[23]=f,e[24]=R);let z;e[25]===Symbol.for(`react.memo_cache_sentinel`)?(z=e=>{e||h(null)},e[25]=z):z=e[25];let te;e[26]===m?te=e[27]:(te=(0,Q.jsx)(er,{target:m,onOpenChange:z}),e[26]=m,e[27]=te);let B;e[28]!==M||e[29]!==P||e[30]!==I||e[31]!==R||e[32]!==te||e[33]!==O?(B=(0,Q.jsxs)(Q.Fragment,{children:[O,M,P,I,R,te]}),e[28]=M,e[29]=P,e[30]=I,e[31]=R,e[32]=te,e[33]=O,e[34]=B):B=e[34];let V=B,H,U,W,G,K;e[35]===Symbol.for(`react.memo_cache_sentinel`)?(H=(e,t)=>o({skill:e,existingNames:t}),U=(e,t)=>c({scope:e.scope,name:e.name,toScope:t}),W=(e,t)=>d({skill:e,filePath:t}),G=(e,t)=>p(t===void 0?{skill:e}:{skill:e,prefix:t}),K=(e,t)=>h({skill:e,editor:t}),e[35]=H,e[36]=U,e[37]=W,e[38]=G,e[39]=K):(H=e[35],U=e[36],W=e[37],G=e[38],K=e[39]);let q;return e[40]!==V||e[41]!==T||e[42]!==y||e[43]!==g?(q={installingName:g,install:y,convertLocations:x,runLocationWrite:C,duplicate:T,requestDelete:i,requestRename:H,requestScopeMove:U,requestFileRename:W,requestFileCreate:G,requestForkResolve:K,dialogs:V},e[40]=V,e[41]=T,e[42]=y,e[43]=g,e[44]=q):q=e[44],q}function ar(e){return e.map(or).join(`, `)}function or(e){return he[e]??e}var sr=new Set;function cr(e){let t=(0,yt.c)(29),{skill:n,filePath:r,actions:i}=e,{_:a}=u(),o=typeof window<`u`?window.okDesktop:void 0,s=n.absolutePath?`${n.absolutePath}/${r}`:void 0,c=`${n.path}/${r}`,d;t[0]===a?d=t[1]:(d=async function(e){try{await ft(e),Z.success(a({id:`SXCSQd`}))}catch{Z.error(a({id:`cRHuuI`}))}},t[0]=a,t[1]=d);let f=d,p;t[2]!==i||t[3]!==r||t[4]!==n?(p=()=>i.requestFileRename(n,r),t[2]=i,t[3]=r,t[4]=n,t[5]=p):p=t[5];let m,h;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,Q.jsx)(_t,{"aria-hidden":!0}),h=(0,Q.jsx)(l,{id:`2wxgft`}),t[6]=m,t[7]=h):(m=t[6],h=t[7]);let g;t[8]===p?g=t[9]:(g=(0,Q.jsxs)(M,{onSelect:p,children:[m,h]}),t[8]=p,t[9]=g);let _;t[10]===s?_=t[11]:(_=o&&s?(0,Q.jsxs)(M,{onSelect:()=>void o.shell.showItemInFolder(s),children:[(0,Q.jsx)(Me,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`LtSYdi`})]}):null,t[10]=s,t[11]=_);let v;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,Q.jsxs)(R,{children:[(0,Q.jsx)(je,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`zd00pH`})]}),t[12]=v):v=t[12];let y;t[13]!==s||t[14]!==f?(y=s?(0,Q.jsx)(M,{onSelect:()=>void f(s),children:(0,Q.jsx)(l,{id:`z2funE`})}):null,t[13]=s,t[14]=f,t[15]=y):y=t[15];let b;t[16]!==f||t[17]!==c?(b=()=>void f(c),t[16]=f,t[17]=c,t[18]=b):b=t[18];let x;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,Q.jsx)(l,{id:`xloBjn`}),t[19]=x):x=t[19];let S;t[20]===b?S=t[21]:(S=(0,Q.jsx)(M,{onSelect:b,children:x}),t[20]=b,t[21]=S);let C;t[22]!==S||t[23]!==y?(C=(0,Q.jsxs)(N,{children:[v,(0,Q.jsxs)(P,{children:[y,S]})]}),t[22]=S,t[23]=y,t[24]=C):C=t[24];let w;return t[25]!==C||t[26]!==g||t[27]!==_?(w=(0,Q.jsxs)(Q.Fragment,{children:[g,_,C]}),t[25]=C,t[26]=g,t[27]=_,t[28]=w):w=t[28],w}function lr(e){let t=(0,yt.c)(86),{skill:n,actions:i,existingNames:a}=e,{_:o}=u(),s=m(),c=Ke(),d=y().states,{dispatch:f}=fn(),p=Sn(n,i),g=typeof window<`u`?window.okDesktop:void 0,_=n.absolutePath,v;t[0]===o?v=t[1]:(v=async function(e){try{await ft(e),Z.success(o({id:`SXCSQd`}))}catch{Z.error(o({id:`cRHuuI`}))}},t[0]=o,t[1]=v);let b=v,x;t[2]===_?x=t[3]:(x=g&&_?(0,Q.jsxs)(M,{onSelect:()=>void g.shell.showItemInFolder(_),children:[(0,Q.jsx)(Me,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`LtSYdi`})]}):null,t[2]=_,t[3]=x);let S;t[4]!==n.name||t[5]!==n.scope||t[6]!==s?(S=Jt({skillName:n.name,scope:n.scope,workspace:s}),t[4]=n.name,t[5]=n.scope,t[6]=s,t[7]=S):S=t[7];let C;t[8]!==f||t[9]!==d||t[10]!==S?(C=(0,Q.jsx)(Un,{input:S,installStates:d,isElectronHost:g!=null,dispatch:f}),t[8]=f,t[9]=d,t[10]=S,t[11]=C):C=t[11];let w;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,Q.jsxs)(R,{children:[(0,Q.jsx)(je,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`zd00pH`})]}),t[12]=w):w=t[12];let T;t[13]!==_||t[14]!==b?(T=_?(0,Q.jsx)(M,{onSelect:()=>void b(_),children:(0,Q.jsx)(l,{id:`z2funE`})}):null,t[13]=_,t[14]=b,t[15]=T):T=t[15];let E;t[16]!==b||t[17]!==n.path?(E=()=>void b(n.path),t[16]=b,t[17]=n.path,t[18]=E):E=t[18];let D;t[19]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,Q.jsx)(l,{id:`xloBjn`}),t[19]=D):D=t[19];let O;t[20]===E?O=t[21]:(O=(0,Q.jsx)(M,{onSelect:E,children:D}),t[20]=E,t[21]=O);let ee;t[22]!==T||t[23]!==O?(ee=(0,Q.jsxs)(N,{children:[w,(0,Q.jsxs)(P,{children:[T,O]})]}),t[22]=T,t[23]=O,t[24]=ee):ee=t[24];let k;t[25]===Symbol.for(`react.memo_cache_sentinel`)?(k=(0,Q.jsx)(z,{}),t[25]=k):k=t[25];let A;t[26]!==i||t[27]!==a||t[28]!==n?(A=()=>void i.duplicate(n,a),t[26]=i,t[27]=a,t[28]=n,t[29]=A):A=t[29];let j,F;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(j=(0,Q.jsx)(r,{"aria-hidden":!0}),F=(0,Q.jsx)(l,{id:`euc6Ns`}),t[30]=j,t[31]=F):(j=t[30],F=t[31]);let I;t[32]===A?I=t[33]:(I=(0,Q.jsxs)(M,{onSelect:A,children:[j,F]}),t[32]=A,t[33]=I);let L;t[34]!==i||t[35]!==a||t[36]!==n?(L=()=>i.requestRename(n,a),t[34]=i,t[35]=a,t[36]=n,t[37]=L):L=t[37];let te,B;t[38]===Symbol.for(`react.memo_cache_sentinel`)?(te=(0,Q.jsx)(_t,{"aria-hidden":!0}),B=(0,Q.jsx)(l,{id:`2wxgft`}),t[38]=te,t[39]=B):(te=t[38],B=t[39]);let V;t[40]===L?V=t[41]:(V=(0,Q.jsxs)(M,{onSelect:L,children:[te,B]}),t[40]=L,t[41]=V);let H;t[42]!==i||t[43]!==n?(H=()=>i.requestFileCreate(n),t[42]=i,t[43]=n,t[44]=H):H=t[44];let U,W;t[45]===Symbol.for(`react.memo_cache_sentinel`)?(U=(0,Q.jsx)(h,{"aria-hidden":!0}),W=(0,Q.jsx)(l,{id:`HdkSiO`}),t[45]=U,t[46]=W):(U=t[45],W=t[46]);let G;t[47]===H?G=t[48]:(G=(0,Q.jsxs)(M,{onSelect:H,children:[U,W]}),t[47]=H,t[48]=G);let K;t[49]===Symbol.for(`react.memo_cache_sentinel`)?(K=(0,Q.jsxs)(R,{children:[(0,Q.jsx)(ht,{"aria-hidden":!0}),(0,Q.jsx)(l,{id:`TKQ7K-`})]}),t[49]=K):K=t[49];let q;t[50]!==i||t[51]!==n?(q=e=>i.requestForkResolve(n,e),t[50]=i,t[51]=n,t[52]=q):q=t[52];let J;t[53]!==p||t[54]!==n||t[55]!==q?(J=(0,Q.jsxs)(N,{children:[K,(0,Q.jsx)(P,{className:xn,children:(0,Q.jsx)(Dn,{toggles:p,skill:n,onResolveFork:q})})]}),t[53]=p,t[54]=n,t[55]=q,t[56]=J):J=t[56];let Y;t[57]!==i||t[58]!==n?(Y=()=>i.requestScopeMove(n,n.scope===`project`?`global`:`project`),t[57]=i,t[58]=n,t[59]=Y):Y=t[59];let ne;t[60]===Symbol.for(`react.memo_cache_sentinel`)?(ne=(0,Q.jsx)(mt,{"aria-hidden":!0}),t[60]=ne):ne=t[60];let X;t[61]!==c.global||t[62]!==c.project||t[63]!==n.scope?(X=n.scope===`project`?(0,Q.jsx)(l,{id:`bpytj4`,values:{0:c.global}}):(0,Q.jsx)(l,{id:`bpytj4`,values:{0:c.project}}),t[61]=c.global,t[62]=c.project,t[63]=n.scope,t[64]=X):X=t[64];let re;t[65]!==Y||t[66]!==X?(re=(0,Q.jsxs)(M,{onSelect:Y,children:[ne,X]}),t[65]=Y,t[66]=X,t[67]=re):re=t[67];let ie;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(ie=(0,Q.jsx)(z,{}),t[68]=ie):ie=t[68];let ae;t[69]!==i||t[70]!==n?(ae=()=>i.requestDelete(n),t[69]=i,t[70]=n,t[71]=ae):ae=t[71];let oe,se;t[72]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,Q.jsx)(Pe,{"aria-hidden":!0}),se=(0,Q.jsx)(l,{id:`cnGeoo`}),t[72]=oe,t[73]=se):(oe=t[72],se=t[73]);let ce;t[74]===ae?ce=t[75]:(ce=(0,Q.jsxs)(M,{variant:`destructive`,onSelect:ae,children:[oe,se]}),t[74]=ae,t[75]=ce);let le;return t[76]!==ee||t[77]!==I||t[78]!==V||t[79]!==x||t[80]!==G||t[81]!==J||t[82]!==re||t[83]!==ce||t[84]!==C?(le=(0,Q.jsxs)(Q.Fragment,{children:[x,C,ee,k,I,V,G,J,re,ie,ce]}),t[76]=ee,t[77]=I,t[78]=V,t[79]=x,t[80]=G,t[81]=J,t[82]=re,t[83]=ce,t[84]=C,t[85]=le):le=t[85],le}export{vt as C,Ht as S,mt as T,nn as _,qn as a,sn as b,bn as c,Sn as d,Yt as f,Wt as g,Ut as h,rr as i,xn as l,qt as m,cr as n,Un as o,Gt as p,ir as r,Bn as s,lr as t,Dn as u,ln as v,gt as w,fn as x,Kt as y};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-Dr7H3Str.mjs";export{e as repairSkills};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t,r as n}from"./server-lock-kWlPDbSb.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
|
package/dist/start-CJI2g8C5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,r as t,v as n}from"./start-lM2wbtM5.mjs";export{t as bootStartServer,e as resolveHost,n as startCommand};
|