@inkeep/open-knowledge 0.72.0-beta.3 → 0.72.0-beta.4
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 +67 -67
- package/dist/constants-tN6BLxqK.mjs +1 -0
- package/dist/{dist-C7Oi9AkI.mjs → dist-B7NFh0MZ.mjs} +464 -464
- package/dist/dist-D7HUGErx.mjs +1 -0
- package/dist/index.d.mts +9 -0
- package/dist/index.mjs +2 -2
- package/dist/init-0RF5mT_e.mjs +1 -0
- package/dist/{init-CWcaDlCV.mjs → init-R__-FL-k.mjs} +26 -26
- package/dist/{launch-json-removal-D0gfkVnw.mjs → launch-json-removal-7D0nQT56.mjs} +1 -1
- package/dist/{loader-hAzEG8eI.mjs → loader-BRYG-jTN.mjs} +1 -1
- package/dist/loader-BicS4rg_.mjs +1 -0
- package/dist/{open-browser-B9QXUTKM.mjs → open-browser-4-j8NELI.mjs} +1 -1
- package/dist/{preview-FVftoA1B.mjs → preview-DjhHIWGN.mjs} +1 -1
- package/dist/preview-DtEWXaoq.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-CSx6poL6.js → ActivityModeContent-DLnzCgfz.js} +1 -1
- package/dist/public/assets/AddPropertiesButton-5U2Y3uKp.js +2 -0
- package/dist/public/assets/{AgentDiffPane-D3ZqC-5y.js → AgentDiffPane-B5amlfmP.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-mIIoSODi.js → AgentIconCluster-DiWkEX6O.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-zhmAd3N4.js → AgentThreadClientBinder-iSWzdyTG.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DdAlxeKa.js → BugReportHistory-CounGQhT.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-BWMg-utz.js → BugReportHistoryDialog-CgPrrnbM.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-Cmq0OheO.js +3 -0
- package/dist/public/assets/ConsentDialogBody-BD4DWbp5.js +2 -0
- package/dist/public/assets/{DiffViewBoundary-BrG_w2xt.js → DiffViewBoundary-BXdwk2Iq.js} +1 -1
- package/dist/public/assets/DocumentContext-TAFDDp6U.js +39 -0
- package/dist/public/assets/{EditorModeToggle-CRx6a4xr.js → EditorModeToggle-Dg7vVHl3.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BbglKynl.js → EnableSyncConfirmDialog-R-Z946N5.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-Cx-PkkWC.js → ExcalidrawDocEditor-CY1lJS-2.js} +1 -1
- package/dist/public/assets/FeedbackForm-CUHxAufb.js +1 -0
- package/dist/public/assets/{GraphPanel-BERS2Xxc.js → GraphPanel-omwwsp_N.js} +1 -1
- package/dist/public/assets/{ImageAttachments-n3q9E21B.js → ImageAttachments-BpYJnzlN.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-Buq_cGPy.js → ImportSkillDialog-BTpla3g7.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-oCqNvP7d.js → LintConfigEditor-CVkLVVX0.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-CPB8QDOa.js → ManagedArtifactProperties-C1nhYITR.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-D_9Orim7.js +1 -0
- package/dist/public/assets/McpConsentDialogBody-CXF6JRwT.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-DoSSJiAU.js → MermaidDocEditor-Nc0VfQkz.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuItem-B-A26xF4.js → OpenInAgentMenuItem-CzPwpHyZ.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-CqbjHwwA.js → PropertyDisplayRow-BGe6-4L9.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-D2Kzp4_r.js → RegisteredAgentIcon-Dit7Zlh0.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-ByKRBwrn.js → ReportBugDialogBody-CiI1lRKj.js} +2 -2
- package/dist/public/assets/{ReportBugMenuTrigger-BT4k4UZV.js → ReportBugMenuTrigger-DoDCPu1X.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-DLF8mr_B.js → SchemaConfigEditor-CSINzXTv.js} +1 -1
- package/dist/public/assets/{SessionsHost-PvYlMZLt.js → SessionsHost-Crwf7ff-.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-Bl3NZ37F.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-CSAWwldJ.js → ShareBranchSwitchDialog-DqSgSjyg.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CuDoDPVy.js → ShareReceiveDialog-BZtxSZra.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-4JK4Afbo.js → ShareReceiveMissDialog-dnAsxL19.js} +1 -1
- package/dist/public/assets/{SkillCostValue-EajgoFy_.js → SkillCostValue-CHZQh8Rq.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-rv5kIgLF.js → SkillEditBanner-SYzSHptQ.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-B8iWPj-U.js → SkillForkDialog-Cz82rkwA.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-vK6OSpiK.js → SkillInstallMenu-CNY0p5vX.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-Dj_Ri0FX.js → SkillOriginInline-DuKHAOBP.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-C6eBVVk1.js → SkillToolbarControls-CjE7B4SI.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DY6ttC2a.js → SlidesToolbarControls-C5RytnIw.js} +1 -1
- package/dist/public/assets/SourceEditor-CAEGq_cL.js +1 -0
- package/dist/public/assets/{TerminalPanel-lplfgXxO.js → TerminalPanel-Lr-gSBEo.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-CzStYFjF.js → TerminalWindowApp-Cbqv2j6x.js} +1 -1
- package/dist/public/assets/{TextDocEditor-BVU_T1nc.js → TextDocEditor-BbjLCMRm.js} +1 -1
- package/dist/public/assets/{ThreadView-B3rNh-vX.js → ThreadView-BhfeLCUr.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-Dz0cEdgE.js → TimelineDiffPane-DeUhHr6c.js} +1 -1
- package/dist/public/assets/agent-connection-status-XSdlZ0uj.js +1 -0
- package/dist/public/assets/auth-state-cache-lPOpwdxt.js +11 -0
- package/dist/public/assets/{bug-report-send-manager-CdO7h2kH.js → bug-report-send-manager-C8UOqZop.js} +1 -1
- package/dist/public/assets/client-version-DMKN1tA1.js +1 -0
- package/dist/public/assets/{comment-chips-BTwi9aHu.js → comment-chips-DG6TcreO.js} +1 -1
- package/dist/public/assets/config-provider-CL2LHJwy.js +4 -0
- package/dist/public/assets/css-color-to-hex-21hHTVNl.js +1 -0
- package/dist/public/assets/{dist-CyWcc58M.js → dist-75Tp0j2s.js} +1 -1
- package/dist/public/assets/{doc-hash-BEmc5wpM.js → doc-hash-0sJsliMq.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-CPWQABEA.js → doc-undo-manager-CUMz1Lu7.js} +1 -1
- package/dist/public/assets/{documents-events-D_K3dHNa.js → documents-events-DvTemRtX.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-D5yCyoxr.js → file-tree-adapter-C-zUZxGY.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Css5oRd6.js → file-tree-utils-DQrKhuvs.js} +1 -1
- package/dist/public/assets/{folder-config-api-CYCg3Hjc.js → folder-config-api-O8wiP8u9.js} +1 -1
- package/dist/public/assets/globals-MNUe1ruv.css +1 -0
- package/dist/public/assets/{index-pdO5v09U.js → index-YzLx3klx.js} +15 -15
- package/dist/public/assets/{lint-config-client-D2CVLI8s.js → lint-config-client-D_K_I33M.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BhjLeHcZ.js → markdownlint-rule-browser-D_33Iwwv.js} +1 -1
- package/dist/public/assets/messages-BYiJXmNN.js +1 -0
- package/dist/public/assets/messages-BwGMYA_G.js +1 -0
- package/dist/public/assets/messages-CFWXeDS9.js +1 -0
- package/dist/public/assets/messages-CbXu74T2.js +1 -0
- package/dist/public/assets/messages-Czy5uUdz.js +1 -0
- package/dist/public/assets/messages-DKoHMjaK.js +1 -0
- package/dist/public/assets/messages-DVDSsf5u.js +1 -0
- package/dist/public/assets/messages-Dnppvuua.js +1 -0
- package/dist/public/assets/messages-IHf96h9y.js +1 -0
- package/dist/public/assets/messages-ijpiuVRD.js +1 -0
- package/dist/public/assets/messages-lPluOXUP.js +1 -0
- package/dist/public/assets/messages-nbT9wGXG.js +1 -0
- package/dist/public/assets/navigation-targets-CLA-LGSO.js +1 -0
- package/dist/public/assets/{page-list-cache-B2Cbn6_1.js → page-list-cache-DmQP_SV8.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-D5-DrypM.js → pending-receive-nav-store-lpN2Xg2z.js} +1 -1
- package/dist/public/assets/{progress-DeFcA31j.js → progress-CpKCXRqy.js} +3 -3
- package/dist/public/assets/{project-paths-BHj1N2_J.js → project-paths-gqDqqCq-.js} +1 -1
- package/dist/public/assets/{prop-types-BZCimyh-.js → prop-types-Cz_4UFXS.js} +1 -1
- package/dist/public/assets/{receive-store-DzTOlR0N.js → receive-store-CmP1Rnn7.js} +1 -1
- package/dist/public/assets/{selection-context-BIa29kJ8.js → selection-context-BYtzxyLE.js} +1 -1
- package/dist/public/assets/{skill-scope-N9lA7J2A.js → skill-scope-zjfKF_hV.js} +1 -1
- package/dist/public/assets/{skills-api-t8N6VdpP.js → skills-api-DefDq-V9.js} +1 -1
- package/dist/public/assets/{src-ByO9uVZB.js → src-DyfxwlyE.js} +2 -2
- package/dist/public/assets/{startup-marks-w6Ilv1dh.js → startup-marks-DkofILWo.js} +1 -1
- package/dist/public/assets/{tag-pill-input-By-KRpAS.js → tag-pill-input-fBTfmjgu.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-Bu5cNTBP.js → target-navigation-intent-JS6hYcot.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CKvjKher.js → telemetry-impl-CFkmFcv6.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BfBWUHVq.js → telemetry-startup-Bac091X8.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-BNnRIpgq.js → terminal-cli-display-B8ySenln.js} +1 -1
- package/dist/public/assets/{terminal-command-events-BGXJdDho.js → terminal-command-events-DrvZC8Eu.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-DCbQD5pb.js → terminal-launch-events-qWlFGuUx.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-C3BIM0C7.js → terminal-telemetry-CpRQ96Ji.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-PnjW2-x3.js → typing-burst-detector-BBbOZnKo.js} +4 -4
- package/dist/public/assets/uninstall-v61_ZoXT.js +1 -0
- package/dist/public/assets/{use-activity-panel-HmfzKdzs.js → use-activity-panel-DCGFCgW4.js} +1 -1
- package/dist/public/assets/use-apply-config-language-BS-vov2w.js +2 -0
- package/dist/public/assets/{use-collab-url-B_rNmVb_.js → use-collab-url-mFOjr2IA.js} +1 -1
- package/dist/public/assets/{use-conflicts-DwqMCspl.js → use-conflicts-C8dN_iXo.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-WB5uWQWt.js → use-live-xterm-theme-B9dAAZD3.js} +1 -1
- package/dist/public/assets/{use-open-skill-DzszCWzx.js → use-open-skill-BAPaR7kA.js} +1 -1
- package/dist/public/assets/{use-settings-route-D7psIUas.js → use-settings-route-BxaIY7g8.js} +1 -1
- package/dist/public/assets/{use-skill-origin-D-hrfwwb.js → use-skill-origin-CZlBPaka.js} +1 -1
- package/dist/public/assets/{use-skills-Drb1FGEU.js → use-skills-C6QmTsGG.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-Bre_0Sqg.js → use-terminal-enabled-D0rb9s4e.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-6pBvX9Gh.js +5 -0
- package/dist/public/assets/{use-workspace-BY7Os3yY.js → use-workspace-CPN4D3G_.js} +1 -1
- package/dist/public/index.html +58 -58
- package/dist/public/uninstall.html +7 -6
- package/dist/{registry-probes-BK8Gw65W.mjs → registry-probes-Cthf_D-E.mjs} +10 -10
- package/dist/{removal-file-path-BhN_h0Rm.mjs → removal-file-path-B3Ia2LYa.mjs} +1 -1
- package/dist/{repair-launch-json-QWDfpWfu.mjs → repair-launch-json-LAfXDQlt.mjs} +1 -1
- package/dist/{repair-mcp-configs-CGM7N62T.mjs → repair-mcp-configs-Dz9benJ2.mjs} +1 -1
- package/dist/src-BCVXAb8B.mjs +1 -0
- package/dist/src-CQqhz0Kv.mjs +11 -0
- package/dist/start-C5D7Sm06.mjs +1 -0
- package/dist/{start-BcH8YieI.mjs → start-C9LxTCYi.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-BWwITVsY.mjs +0 -1
- package/dist/dist-s4KdL8xn.mjs +0 -1
- package/dist/init-B-wniKG4.mjs +0 -1
- package/dist/loader-ClY3YXAr.mjs +0 -1
- package/dist/preview-C605fqZX.mjs +0 -1
- package/dist/public/assets/AddPropertiesButton-DXjzjICF.js +0 -2
- package/dist/public/assets/CodeMirrorPropInput-Bo7jcqv0.js +0 -3
- package/dist/public/assets/ConsentDialogBody-CpPyfOOm.js +0 -2
- package/dist/public/assets/DocumentContext-DW2Sgfp0.js +0 -39
- package/dist/public/assets/FeedbackForm-gNbKRMDT.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DwP8yFwK.js +0 -1
- package/dist/public/assets/McpConsentDialogBody-DBFdcvuZ.js +0 -1
- package/dist/public/assets/SettingsDialogBody-CGABSyyD.js +0 -12
- package/dist/public/assets/SourceEditor-BRi3EW6e.js +0 -1
- package/dist/public/assets/agent-connection-status-VLm1l6MH.js +0 -1
- package/dist/public/assets/auth-state-cache-wQqrLqzV.js +0 -11
- package/dist/public/assets/client-version-B-nUcRRZ.js +0 -1
- package/dist/public/assets/config-provider-CkrfHldq.js +0 -5
- package/dist/public/assets/css-color-to-hex-D4ROZoal.js +0 -1
- package/dist/public/assets/globals-Dphjn3Yt.css +0 -1
- package/dist/public/assets/i18n-Da7WHZe6.js +0 -1
- package/dist/public/assets/messages--JnqpgOb.js +0 -1
- package/dist/public/assets/messages--gUdia_5.js +0 -1
- package/dist/public/assets/messages-Bg6waVkx.js +0 -1
- package/dist/public/assets/messages-BjU_8px0.js +0 -1
- package/dist/public/assets/messages-CPorGTui.js +0 -1
- package/dist/public/assets/messages-D2kPydYD.js +0 -1
- package/dist/public/assets/messages-DK2UgHWp.js +0 -1
- package/dist/public/assets/messages-DMbO4A7Z.js +0 -1
- package/dist/public/assets/messages-IESTLOtJ.js +0 -1
- package/dist/public/assets/messages-JiwS-kMF.js +0 -1
- package/dist/public/assets/messages-bHA62mu3.js +0 -1
- package/dist/public/assets/messages-hiCq1tp-.js +0 -1
- package/dist/public/assets/navigation-targets-Fxss68va.js +0 -1
- package/dist/public/assets/uninstall-Cfx0qbqa.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-BexxkO9d.js +0 -5
- package/dist/src-2phljj3W.mjs +0 -1
- package/dist/src-8U8NRuX2.mjs +0 -11
- package/dist/start-CWRlBbxO.mjs +0 -1
- /package/dist/public/assets/{globals-Cs3w5NCz.js → globals-iI2jjGV8.js} +0 -0
|
@@ -594,4 +594,4 @@ $2`).split(`
|
|
|
594
594
|
`),s=e=>({start:{line:e,character:0},end:{line:e,character:o[e]?.length??0}}),c=[];for(let{schema:e,ruleId:n}of t){let t=Sue(e);if(t&&!t(i))for(let e of t.errors??[]){let t=e.keyword;if(t===`if`)continue;let o=0,l,u=`invalid`,d;if(t===`maxProperties`&&e.instancePath===``)l=`This document must not have frontmatter`;else if(t===`required`&&e.instancePath===``){let t=String(e.params.missingProperty??``);l=`Frontmatter property "${t}" is required`,u=`missing`,t!==``&&(d=t)}else if(e.instancePath===``)l=`Frontmatter ${e.message??`violates "${t}"`}`;else{let n=Tue(e.instancePath);n!==null&&(o=a.get(n)??0);let r=Eue(e.instancePath),s=n!==null&&r===n?i[n]:void 0;if(t===`enum`)l=`Frontmatter property "${r}" must be one of: ${(e.params.allowedValues??[]).map(String).join(`, `)}${W5(s)}`;else if(t===`format`&&U5(e.params)!==void 0){let t=e.params.format;l=`Frontmatter property "${r}" must be ${U5(e.params)} (format "${String(t)}")${W5(s)}`}else l=`Frontmatter property "${r}" ${e.message??`violates "${t}"`}`}c.push({range:s(o),severity:`warning`,source:r,code:n??t,message:l,frontmatterScope:u,...d===void 0?{}:{frontmatterProperty:d}})}}return c}var K5=`doc`;function Due(e,t){return wG(e,xG({strings:{[K5]:e},config:t})[K5]??[])}function Oue(e,t){let n=xG({strings:{[K5]:e},config:t})[K5]??[],r=e.split(`
|
|
595
595
|
`),i=kue(t);return n.map(e=>jue(e,r,Aue(e,i)))}function kue(e){let t=new Map;return Object.entries(e).forEach(([e,n],r)=>{let i=e.toUpperCase();if(i===`DEFAULT`)return;let a=null;if(n===`error`||n===`warning`)a=n;else if(typeof n==`object`&&n&&!Array.isArray(n)){let e=n.severity;(e===`error`||e===`warning`)&&(a=e)}a!==null&&t.set(i,{entryIndex:r,severity:a})}),t}function Aue(e,t){let n;for(let r of e.ruleNames){let e=t.get(r.toUpperCase());e!==void 0&&(n===void 0||e.entryIndex>n.entryIndex)&&(n=e)}return n?.severity??`warning`}function jue(e,t,n){let[r,i]=e.errorRange??[1,null],a=e.lineNumber-1,o=(r??1)-1,s=t[a]?.length??0,c=i==null?s:Math.min(o+i,s),l=e.fixInfo?[Mue(e.fixInfo,e.lineNumber,t)]:void 0;return{range:{start:{line:a,character:o},end:{line:a,character:Math.max(c,o)}},severity:n,source:`markdownlint`,code:e.ruleNames[0]??`MD000`,message:e.errorDetail?`${e.ruleDescription}: ${e.errorDetail}`:e.ruleDescription,...l?{fixes:l}:{}}}function Mue(e,t,n){let r=e.lineNumber??t,i=r-1;if(e.deleteCount===-1){if(r<n.length)return{range:{start:{line:i,character:0},end:{line:i+1,character:0}},newText:``};if(i>0){let e=n[i-1]?.length??0;return{range:{start:{line:i-1,character:e},end:{line:i,character:n[i]?.length??0}},newText:``}}return{range:{start:{line:0,character:0},end:{line:0,character:n[0]?.length??0}},newText:``}}let a=(e.editColumn??1)-1;return{range:{start:{line:i,character:a},end:{line:i,character:a+Math.max(0,e.deleteCount??0)}},newText:e.insertText??``}}var q5=[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`,`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`,`project-no-mdx`];function J5(e,t){return e?.[t]!==!1}var Nue=[{id:`structure`,ids:[`no-wiki-links`,`log-shape`,`index-shape`,`reserved-casing`]},{id:`frontmatter`,ids:[`frontmatter-required`,`frontmatter-recommended`,`frontmatter-provenance`,`frontmatter-computation`,`frontmatter-reserved-index`,`frontmatter-root-index`]},{id:`project`,ids:[`project-no-mdx`]}];function Pue(e){throw Error(`Unhandled OkfRuleId variant: ${JSON.stringify(e)}`)}function Fue(e){throw Error(`Unhandled OkfRuleGroupId variant: ${JSON.stringify(e)}`)}var Iue=`.ok/okf`;function Lue(e){return`${e.replace(/^frontmatter-/,``)}.schema.json`}function Y5(e){return`${Iue}/${Lue(e)}`}var Rue={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — required frontmatter`,description:"The OKF v0.2 conformance floor. A bundle is conformant when every non-reserved .md file contains a parseable YAML frontmatter block whose `type` is non-empty. This schema is the whole of that floor: a concept carrying only `type` is fully conformant. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#11-conformance",type:`object`,required:[`type`],properties:{type:{type:`string`,pattern:`\\S`,description:"REQUIRED, and the only always-required key in OKF. A short string identifying the kind of concept; consumers use it for routing, filtering, and presentation. Type values are not registered centrally — pick something descriptive and self-explanatory (`BigQuery Table`, `BigQuery Dataset`, `API Endpoint`, `Metric`, `Playbook`, `Reference`, `Attested Computation`). Consumers must tolerate unknown types, typically by treating them as generic concepts. The `\\S` pattern is what makes §11 rule 2 mean what it says, and it replaces a `minLength` rather than joining one: a length check alone accepts a whitespace-only value that no consumer can route on, and having both would report one mistake twice. OKF v0.2 §4.1, §11."}}},zue={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — recommended frontmatter`,description:"Shapes for the OKF v0.2 recommended keys. Every key here is optional, and nothing is constrained beyond the shape OKF states: declaring a key pins its YAML type when present (so `tags` written as a comma-separated string warns) and advertises it to agents at read time. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#41-frontmatter",type:`object`,properties:{title:{type:`string`,description:`Human-readable display name. If omitted, consumers MAY derive a title from the filename. OKF v0.2 §4.1.`},description:{type:`string`,description:"A single sentence summarizing the concept. Used by `index.md` generators, search snippets, and previews. OKF v0.2 §4.1."},resource:{type:`string`,format:`uri-reference`,description:"A URI that uniquely identifies the underlying asset the concept describes. Absent for concepts that describe abstract ideas rather than physical resources. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or an ordinary relative path — hence `uri-reference`, not `uri`, which would reject `/tables/customers.md`. OKF v0.2 §4.1, §6.2."},tags:{type:`array`,items:{type:`string`},description:`A YAML list of short strings for cross-cutting categorization. Tags stay a first-class concept through this field; OKF specifies no separate per-tag file format, so a consumer that wants a tag-browsing view synthesizes one by scanning frontmatter. OKF v0.2 §3.1, §4.1.`},timestamp:{description:"LEGACY (OKF v0.1), superseded by `generated.at` in v0.2 — one of the two deliberate breaking changes. Consumers MAY fall back to it when `generated` is absent; new documents SHOULD write `generated: { by, at }` instead. Documented here so agents are told what it is and what replaced it, but deliberately left unconstrained: v0.2 does not define it as a producer field, so validating its shape would be a rule OKF no longer has. OKF v0.2 §5.2, §13.1."}}},Bue={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — provenance, trust, and lifecycle frontmatter`,description:'The optional OKF v0.2 families that make "where did this come from", "how much should I trust it", and "is it still current" answerable from frontmatter alone. Every key is optional, and absence carries meaning rather than being an error: a concept with no `verified` is unverified, and a consumer must not reject it. Only `sources[].resource` and `generated.by` are required-when-their-parent-is-present, because those are the two fields OKF marks REQUIRED in this family; every other field is described but not mandated, so nothing else is enforced. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#5-provenance-trust-and-lifecycle',type:`object`,properties:{sources:{type:`array`,description:"The materials this concept derives from, external or internal to the bundle. Lineage is expressed through links rather than a dedicated field: when an entry's `resource` points at another OKF concept, the derivation edge already exists in the bundle graph, so a consumer may recurse into that source's own `sources`. OKF v0.2 §5.1.",items:{type:`object`,required:[`resource`],properties:{resource:{type:`string`,description:"REQUIRED within an entry. Either a concrete artifact a consumer can follow (an absolute URL, a bundle-relative path, or a path into a `references/` subdirectory) or a population or scope descriptor it cannot, for example `all queries in BigQuery project X`. Deliberately NOT format-constrained: a scope descriptor is prose, so a `uri-reference` check here would warn on conformant documents. OKF v0.2 §5.1, §6.2, §6.3."},id:{type:`string`,description:"Optional. A stable key used to attribute individual claims: a markdown footnote whose label is this id (`[^ga4-schema]`) attributes the claim it follows. SHOULD be present when the body cites the source. Keyed rather than positional because agents constantly rewrite these documents — a positional index misattributes silently the moment the list is reordered. OKF v0.2 §5.1."},title:{type:`string`,description:`Optional. Human-readable label for the source. OKF v0.2 §5.1.`},author:{type:`string`,description:"Optional credibility signal — an authority signal: who or what produced the source. OKF describes this as following the actor convention (§7), but its own examples use a `team:<id>` prefix that the three §7 forms do not cover, so no pattern is enforced. OKF v0.2 §5.1, §7."},usage_count:{type:`integer`,description:"Optional credibility signal — an adoption and liveness signal: how often `resource` was exercised (dashboard views, query executions, page reads) over `usage_window`. For a single artifact it is that artifact's own exercise count; for a scope descriptor it is the number of exercises within the scope that touch the concept. Coarse by design: comparable at the alive-versus-dead and order-of-magnitude level and against a source's own history, but not a precise cross-kind ranking. Read as liveness and trend, not as a score. OKF v0.2 §5.1."},last_modified:{type:`string`,format:`date-time`,description:"Optional credibility signal — a recency signal: when the source itself last changed, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-15T00:00:00Z`). Distinct from `generated.at`, which records when the concept was written. OKF v0.2 §5, §5.1."},usage_window:{type:`object`,description:"Optional per-entry override of the `usage_window` written as a sibling of `sources`. OKF v0.2 §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the window framing this entry's `usage_count`, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}}}}},usage_window:{type:`object`,description:"Written once as a sibling of `sources`, this frames every `usage_count` in the list with a `{ from, to }` range. A single entry may carry its own `usage_window` to override it. OKF v0.2 §5, §5.1.",properties:{from:{type:`string`,format:`date-time`,description:"Start of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-01T00:00:00Z`). OKF v0.2 §5, §5.1."},to:{type:`string`,format:`date-time`,description:"End of the shared usage window, as an ISO 8601 datetime with an explicit UTC offset (`2026-06-30T00:00:00Z`). OKF v0.2 §5, §5.1."}}},generated:{type:`object`,required:[`by`],description:"How the current content was produced. Kept distinct from `verified` because who wrote a concept need not be who confirmed it. OKF v0.2 §5.2.",properties:{by:{type:`string`,description:"REQUIRED within `generated`. An actor in the OKF convention: `<producer>/<version>` for agents and tools (`reference_agent/gemini-2.5-pro`), `human:<id>` for a person (`human:ahormati`), or `process:<id>` for an automated process (`process:finance-nightly`). Consumers that classify trust key off the `human:` prefix, so producers MUST use it for hand-authored or human-confirmed content — a rule about which form to pick for which content, which frontmatter alone cannot check, so the three forms are documented here rather than enforced by a pattern. OKF v0.2 §5.2, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-06-30T14:00:00Z`) marking the content's last meaningful change. Consumers use it to tell a recent edit from a stale fact. Supersedes v0.1's top-level `timestamp`. OKF v0.2 §5, §5.2, §13.1."}}},verified:{description:'Who or what has confirmed the content against its sources or `resource` — a list of verification events. Multiple entries capture independent checks, for example a human sign-off plus a nightly process; "how recently" is the latest `at`. Independent of `generated.at`: content can change without re-confirmation, and facts can be re-confirmed without regeneration. A single verifier MAY be written as one bare `{ by, at }` mapping without the list dash, and consumers MUST treat that as a one-element list — hence the two accepted shapes here. Absence means unverified, which is a valid state, never a rejection. OKF v0.2 §5.2, §5.3, §11.',anyOf:[{type:`object`,description:`The bare single-verifier mapping form. OKF v0.2 §5.2.`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}},{type:`array`,description:`The list form: one entry per independent verification event. OKF v0.2 §5.2.`,items:{type:`object`,properties:{by:{type:`string`,description:"The verifying actor: `<producer>/<version>`, `human:<id>`, or `process:<id>`. A `human:` verifier is what raises the trust tier to human-reviewed; non-human verifiers alone yield machine-confirmed. OKF v0.2 §5.2, §5.3, §7."},at:{type:`string`,format:`date-time`,description:"An ISO 8601 datetime with an explicit UTC offset (`2026-07-01T09:00:00Z`) recording when the verification event happened. OKF v0.2 §5, §5.2."}}}}]},status:{enum:[`draft`,`stable`,`deprecated`],description:"Lifecycle state. `draft` = not yet reviewed, possibly incomplete. `stable` = ready for consumption. `deprecated` = kept for links and history, no longer current. Absent means `stable`, so the key is only worth writing to say draft or deprecated. These three values are the whole set OKF defines, which is why this is the pack's only enum. OKF v0.2 §5.4."},stale_after:{type:`string`,format:`date-time`,description:"An absolute instant, an ISO 8601 datetime with an explicit UTC offset (`2026-12-31T00:00:00Z`): the concept is stale when `now >= stale_after`. Absolute rather than a relative TTL so staleness stays a plain comparison with no reference to when the concept was read. An instant in the past is a freshness signal for consumers, not a violation. OKF v0.2 §5, §5.5, §10.5."}}},Vue={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — Attested Computation frontmatter`,description:'Shapes for the OKF v0.2 computation keys, which turn a concept into a sanctioned way to compute a value so a consumer can confirm the agent ran the blessed computation instead of improvising its own. Provenance answers "where did this claim come from"; attestation answers "was this number produced the way we said it must be". This file also carries the one value-shaped rule in the pack: `runtime` is the single key OKF marks REQUIRED here, and only when `type` is `Attested Computation`. Ordinary concepts never match that condition and are unaffected, and no other key in the family is mandated. OKF records the computation and the means to check it and executes nothing itself; receipts and verdicts are runtime artifacts that are never stored in the bundle. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#10-attested-computations-concept',type:`object`,if:{required:[`type`],properties:{type:{const:`Attested Computation`,description:"The condition, not a constraint: everything in `then` applies only to documents whose `type` is exactly `Attested Computation`. An ordinary concept never matches, so nothing in this schema is ever asked of it. `type` is also required inside the condition so a document with no type at all fails the conformance floor once, rather than also being told it is missing a `runtime` for a type it never claimed."}}},then:{required:[`runtime`]},properties:{runtime:{type:`string`,description:"REQUIRED for `type: Attested Computation`. The single field that says how to run the computation, and therefore how the executor and attester interpret it and what `parameters` mean — a parameter is a SQL bind variable, a dbt var, or a Python argument depending on the runtime. Keeping `runtime` and `parameters` in one frontmatter is what makes the binding semantics self-evident. Example values: `bigquery`, `postgres`, `dbt`, `python`, `Looker`. Not a closed set, so no enum. OKF v0.2 §10.1, §10.2."},parameters:{type:`array`,description:`The typed, named holes the agent may fill. An agent MAY only supply values for these parameters; it MUST NOT author or edit the computation. That parameter-only surface is what makes "did the sanctioned thing run" a mechanical comparison rather than a judgement call. OKF v0.2 §10.2, §10.3.`,items:{type:`object`,properties:{name:{type:`string`,description:"The parameter name the computation binds, for example `year` bound as `@year` in BigQuery SQL or `{{ var('year') }}` in dbt. OKF v0.2 §10.2, §10.3."},type:{type:`string`,description:"The parameter's type, interpreted by `runtime` (`integer`, `string`, and so on). Deliberately not constrained to JSON Schema type names, because the vocabulary belongs to the runtime. OKF v0.2 §10.2."},required:{type:`boolean`,description:`Whether the agent must supply a value for this parameter. OKF v0.2 §10.2.`}}}},computation:{type:`string`,format:`uri-reference`,description:"Optional. A path to a file holding the computation, used instead of an inline body fence — best for a long or generated computation, or one already kept as a real file shared with non-OKF tooling. When absent, the body's `# Computation` fence IS the computation. Path-valued: an absolute URL, a bundle-relative path beginning with `/`, or a relative path. OKF v0.2 §6.2, §10.2, §10.3."},executor:{type:`object`,description:"How the computation is run. A runner — an agent, or deterministic consumer code — follows `resource`, and the run returns a receipt shaped by `receipt`. Binding the computation with the parameter values into the executable artifact is the consumer's job. OKF v0.2 §10.2, §10.5.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names the run instructions or code. What sits behind it — a Skill, a script, a container — is a packaging choice; OKF fixes the interface, not the packaging. Conventionally points into a `references/` subdirectory, for example `references/skills/run-on-bq.md`. OKF v0.2 §1, §6.2, §6.3, §10.2."},receipt:{type:`array`,items:{type:`string`},description:"Declares the fields a run must return — the evidence the attester inspects, for example `[job_id, executed_sql, result]` for BigQuery or `[run_id, compiled_sql, result]` for dbt. Because the attester compares the expanded, compiled artifact the receipt carries, a rewritten query, a swapped computation file, or a mutated dependency fails the check. The receipt itself is a runtime artifact and is never stored in the bundle. OKF v0.2 §10.2, §10.3, §10.5."}}},attester:{type:`object`,description:"The deterministic check that inspects a receipt and returns a verdict. Meant to run consumer-side. Distinct from `verified`: `verified` confirms the definition still matches policy and is recorded in the bundle, while attestation confirms a single run produced the value the sanctioned way and is not stored. OKF v0.2 §10.2, §10.6.",properties:{resource:{type:`string`,format:`uri-reference`,description:"Names code — no LLM — that takes a receipt and returns a verdict, independently re-deriving the binding of `computation` with the claimed parameter values to compare against what actually ran. Conventionally points into a `references/` subdirectory, for example `references/attesters/sql-equality.py`. OKF v0.2 §6.2, §6.3, §10.2, §10.3."}}}}},Hue={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — index files carry no frontmatter`,description:"`index.md` is a reserved filename at any level of the hierarchy and must not be used for a concept document. Index files contain no frontmatter, with exactly one exception — a bundle-root `index.md` may carry `okf_version` — which the scope carves out with a `!index` exclusion rather than a keyword here. `maxProperties: 0` is the mechanism rather than the boolean schema `false`, because a document with no frontmatter block validates as `{}` and `false` would reject that too, flagging the very documents that are correct. `log.md` is deliberately NOT covered: §9 constrains a log's date headings, ordering, and prose entries but never its frontmatter, and OKF's own reference bundle ships a `log.md` carrying `type` and `title`. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#8-index-files",type:`object`,maxProperties:0},Uue={$schema:`http://json-schema.org/draft-07/schema#`,title:`OKF v0.2 — bundle-root index.md`,description:"The bundle-root `index.md` is the only index file OKF permits frontmatter in, and `okf_version` is the key it names there. OKF states the declaration as a MAY, so it is not required here. Nor is the frontmatter closed to other keys: §8 grants the exception for `okf_version` specifically, but §11 tells consumers not to reject a bundle over unknown additional keys, and that ambiguity is resolved in favor of the looser reading. The one thing pinned is the value's shape, because a YAML float is provably lossy where a version string is not. Section numbers cite OKF v0.2: https://github.com/GoogleCloudPlatform/open-knowledge-format/blob/ad30107c31c06aec8a7d5636e0d1058118604e6f/SPEC.md#12-versioning",type:`object`,properties:{okf_version:{type:`string`,pattern:`^[0-9]+\\.[0-9]+$`,description:'The OKF version this bundle targets, as `<major>.<minor>` — currently `"0.2"`. Quote it: unquoted `0.2` parses as a YAML number, so a consumer comparing version strings sees a float instead, and `0.10` would silently become `0.1`. A minor bump is backward-compatible additions; a major bump may rename required fields or change reserved filenames. Consumers that do not understand the declared version should attempt best-effort consumption rather than refusing the bundle. OKF v0.2 §12.'}}},X5=[`**`,`!**/{index,log}`],Z5=[{id:`frontmatter-required`,appliesTo:X5,schema:Rue},{id:`frontmatter-recommended`,appliesTo:X5,schema:zue},{id:`frontmatter-provenance`,appliesTo:X5,schema:Bue},{id:`frontmatter-computation`,appliesTo:X5,schema:Vue},{id:`frontmatter-reserved-index`,appliesTo:[`**/index`,`!index`],schema:Hue},{id:`frontmatter-root-index`,appliesTo:[`index`],schema:Uue}],Wue=Object.fromEntries(q5.filter(e=>!Z5.some(t=>t.id===e)).map(e=>[e,!1]));function Q5(e,t){return t===void 0?[]:Z5.filter(n=>J5(e,n.id)&&F5([...n.appliesTo]).matches(t))}function Gue(e){return Z5.filter(t=>J5(e,t.id)).map(e=>({appliesTo:[...e.appliesTo],file:Y5(e.id)}))}function Kue(e,t,n){let r=Q5(t,n);return r.length===0?[]:G5(e,r.map(e=>({file:Y5(e.id),schema:e.schema,ruleId:e.id})),{source:`okf`})}function $5(e,t){return TG(`okf:${e}`,(n,r)=>{try{t(n,r)}catch(t){console.warn(`[lint] OKF rule "${e}" failed${r.data.okfDocName?` on "${r.data.okfDocName}"`:``}`,t)}})}function e7(e,t,n){let r=F5(t);return $5(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}var t7=e=>({line:e.line-1,character:e.column-1});function que(e,t){if(e&&`start`in e)return{start:t7(e.start),end:t7(e.end)};if(e){let n=t7(e);return{start:n,end:{line:n.line,character:t[n.line]?.length??0}}}return{start:{line:0,character:0},end:{line:0,character:t[0]?.length??0}}}function Jue(e,t){return{range:que(e.place,t),severity:`warning`,source:`okf`,code:e.ruleId??`okf`,message:e.reason}}function Yue(e,t,n){if(t.length===0)return[];let r=xe().use(re).use(pe).use(lF,[`yaml`]);for(let e of t)r.use(e);let i=new u({value:e});n!==void 0&&(i.data.okfDocName=n);let a=r.parse(i);r.runSync(a,i);let o=e.split(`
|
|
596
596
|
`);return i.messages.map(e=>Jue(e,o))}var Xue=`**/index`;function Zue(e){let t=!1;return Ee(e,[`link`,`linkReference`],()=>(t=!0,!1)),t}var Que=e7(`index-shape`,Xue,(e,t)=>{let n=!1;for(let r of e.children){if(r.type===`heading`){n=!0;continue}r.type===`list`&&!n&&t.message(`This index list is not under a section heading, so an Open Knowledge Format consumer reading the file as navigation has no name to file its entries under — an index is one or more heading-led sections of bulleted links.`,r)}Ee(e,`listItem`,e=>{e.children.some(e=>e.type===`list`)||Zue(e)||t.message(`This index entry has no link, so an Open Knowledge Format consumer reading the file as navigation has nowhere to follow it. Every entry in the format's own reference bundles is a link followed by a short description.`,e)})}),$ue=`**/log`,ede=/^\s*(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])(?!\d)/;function tde(e,t,n){let r=new Date(Date.UTC(e,t-1,n));return r.getUTCFullYear()===e&&r.getUTCMonth()===t-1&&r.getUTCDate()===n}var nde=/^\s*\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/;function n7(e){let t=e.trim();return t.length>60?`${t.slice(0,59)}…`:t}var rde=e7(`log-shape`,$ue,(e,t)=>{let n;Ee(e,`heading`,e=>{if(e.depth!==2)return;let r=be(e),i=ede.exec(r);if(!i){t.message(nde.test(r)?`Log date heading "${n7(r)}" is not in ISO 8601 YYYY-MM-DD form, the one form an Open Knowledge Format log requires of its date headings.`:`Log entry heading "${n7(r)}" is not a date, so it falls outside the dated-entry format an Open Knowledge Format consumer reads a log as — nothing under it reaches the change-history timeline.`,e);return}let a=`${i[1]}-${i[2]}-${i[3]}`;if(!tde(Number(i[1]),Number(i[2]),Number(i[3]))){t.message(`Log date heading "${a}" is not a real calendar date, so it is not ISO 8601 — the one form an Open Knowledge Format log requires of its date headings.`,e);return}n!==void 0&&a>n&&t.message(`Log date heading "${a}" is newer than the entry above it — an Open Knowledge Format log is a flat list of date-grouped entries, newest first.`,e),n=a})}),ide=/\[\[[^[\]\n]+\]\]/g;function ade(e){let t=`Wiki-link ${e} won't resolve for an external Open Knowledge Format consumer — it renders as literal text and its graph edge is lost.`;return e.includes(`|`)?`${t} The alias "|" also splits a GFM table cell.`:t}var ode=$5(`no-wiki-links`,(e,t)=>{let n=typeof t.value==`string`?t.value:String(t.value);Ee(e,`text`,e=>{let r=e.position?.start,i=e.position?.end,a=r?.offset,o=a===void 0||i?.offset===void 0?e.value:n.slice(a,i.offset),s=0,c=r?.line??0,l=r?.column??0,u=e=>{for(;s<e;s+=1)o[s]===`
|
|
597
|
-
`?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(ide)){let{index:i}=e;if((a===void 0?o[i-1]:n[a+i-1])===`!`)continue;let s=r&&a!==void 0?{start:u(i),end:u(i+e[0].length)}:void 0;t.message(ade(e[0]),s)}})}),sde=[`index`,`log`],cde=$5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=Q$(n),i=r.toLowerCase();sde.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)}),r7=[{id:`no-wiki-links`,rule:ode},{id:`log-shape`,rule:rde},{id:`index-shape`,rule:Que},{id:`reserved-casing`,rule:cde}],lde=r7.map(e=>e.rule);function ude(e){return e===void 0?lde:r7.filter(t=>J5(e,t.id)).map(e=>e.rule)}var dde=Xa([P(),R(sm),no(M(),Ua())]),fde={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:no(M(),dde)}),defaultSlice:{enabled:!1,rules:M5},async lint(e,t){return Oue(e,N5(t.rules))},fix(e,t){return Due(e,N5(t.rules))}},pde=I({appliesTo:Xa([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:no(M(),Ua()).optional()}),i7=[fde,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(pde)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return G5(e,R5(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>R5(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:no(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...Yue(e,ude(t.rules),n.docName),...Kue(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>Q5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...Wue}}),advertisedMappings:e=>Gue(e.rules)}}],mde={enabled:!0,plugins:Object.fromEntries(i7.map(e=>[e.id,e.defaultSlice]))};function hde(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function gde(e,t){if(!e?.enabled||t===void 0||t===``)return[];let n=[];for(let r of i7){if(r.frontmatter===void 0)continue;let i=e.plugins[r.id];i?.enabled===!0&&n.push(...r.frontmatter.schemasForDoc(i,t))}return n}function _de(e){let t=Object.fromEntries(i7.map(t=>{let n=e.plugins[t.id]??t.defaultSlice;return t.frontmatter===void 0?[t.id,{...n,enabled:!1}]:[t.id,t.frontmatter.narrowSliceToFrontmatter(n)]}));return{...e,plugins:t}}var vde=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function yde(e){return vde.has(e)}I({docName:G2,summary:J2,content:M().optional(),...q2}).loose(),I({docName:G2,summary:J2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(z$).optional(),...q2}).loose(),I({docName:G2,summary:J2,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...q2}).loose(),I({docName:G2,connectionId:M().min(1),scope:R([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...q2}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var a7=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),bde=Qa(`kind`,[I({kind:z(`inline`),content:M()}),I({kind:z(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),o7=I({kind:z(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:bde.optional(),hint:M().optional()}).loose(),xde=I({type:z(`orphan`),parentCandidates:F(M()),message:M()}).loose(),s7=I({kind:z(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();Qa(`kind`,[o7,s7]);var Sde=I({kind:z(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),c7=I({href:M(),targetKind:M(),role:M(),sourceForm:M(),resolvedTarget:M().nullable(),reason:M(),resolutionMethod:M(),fallbackTarget:M().nullable().optional(),definition:I({line:N().int().nonnegative(),label:M()}).loose().optional()}).loose(),l7=F(Qa(`kind`,[o7,s7,Sde,I({kind:z(`lint-violation`),source:M(),code:M(),message:M(),severity:R([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:c7.optional()}).loose()])).min(1),u7=F(I({href:M(),resolvedTo:M().nullable(),reason:R([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:c7.optional()}).loose()),d7=I({reason:M().min(1),count:N().int().positive()}).loose();I({timestamp:M().min(1),summary:a7.optional(),warnings:l7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(xde).optional(),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose(),I({docName:M().min(1),scope:R([`last`,`session`,`count`]),undone:P()}).loose(),I({docs:F(I({docName:K2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(z$).optional(),summary:J2}).loose()).min(1).max(100),...q2}).loose();var Cde=I({type:m4,title:M(),detail:M().optional()}).loose(),wde=Qa(`status`,[I({status:z(`written`),docName:M().min(1),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose(),I({status:z(`error`),docName:M().min(1),error:Cde}).loose()]);I({timestamp:M().min(1),results:F(wde),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),I({docName:G2,patch:no(M(),Xa([jd,Va()])),types:no(M(),R(Od)).optional(),summary:J2,...q2}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose();function Tde(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??M5},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]},okf:{enabled:e.okf?.enabled??!1,...e.okf?.rules===void 0?{}:{rules:e.okf.rules},generate:{index:e.okf?.generate?.index??!1}}}}}var Ede=Object.fromEntries(i7.map(e=>[e.id,e.sliceSchema])),Dde=I({effective:I({enabled:P(),plugins:I(Ede)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Ode=Xa([P(),no(M(),Ua())]);I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:Xa([Ode,Va()])}),I({file:M().min(1).max(512),delete:z(!0).optional(),field:M().min(1).max(256).optional(),parentPath:F(Xa([M().min(1).max(256),I({items:z(!0)}).strict()])).max(8).optional(),removeField:z(!0).optional(),renameTo:M().min(1).max(256).optional(),constraint:I({type:R([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(Xa([M(),N(),P()])).nullable().optional(),itemsEnum:F(Xa([M(),N(),P()])).nullable().optional(),itemsType:R([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:M().nullable().optional(),format:M().nullable().optional(),description:M().max(2048).nullable().optional(),required:P().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`});var kde=I({schemas:F(M()),truncated:P()}).strict(),f7=I({line:N(),character:N()}),p7=I({start:f7,end:f7}),m7=I({range:p7,severity:R([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:p7,newText:M()})).optional(),frontmatterScope:R(rm).optional(),frontmatterProperty:M().optional()}),h7=F(M()).optional();I({files:F(I({file:M(),diagnostics:F(m7),ran:h7,warnings:F(M()).optional()})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:h7});var Ade=m7.extend({linkTarget:M().optional(),localTarget:c7.optional()}),jde=I({files:F(I({file:M(),diagnostics:F(Ade)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:h7,brokenLinkSuppression:d7.optional()}),g7=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),Mde=I({files:F(I({file:M(),lint:g7,links:g7})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:d7.optional()});I({docName:G2,summary:J2,...q2}).loose();var Nde=I({reason:R([`re-lint-threw`,`source-went-blind`]),message:M().min(1)}),Pde=I({file:M(),fixedCount:N(),diagnostics:F(m7),errorCount:N(),warningCount:N(),ran:h7,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:Nde.optional()});function Fde(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function Ide(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:Fde(e)&&t.endsWith(`.json`)}var _7=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],Lde=(()=>{let e=new Map;for(let t of _7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function v7(e){return Lde.get(e.toUpperCase())??null}function Rde(e,t){let n=v7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))v7(t)===n&&(r={key:t,value:i});return r}var zde=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],Bde=[[`headings`,`Headings`],[`bullet`,`Lists`],[`ul`,`Lists`],[`ol`,`Lists`],[`links`,`Links & images`],[`images`,`Links & images`],[`accessibility`,`Links & images`],[`code`,`Code`],[`language`,`Code`],[`emphasis`,`Style`],[`html`,`Style`],[`line_length`,`Whitespace`],[`whitespace`,`Whitespace`],[`hard_tab`,`Whitespace`],[`blank_lines`,`Whitespace`],[`indentation`,`Whitespace`]];function Vde(e){for(let[t,n]of Bde)if(e.tags.includes(t))return n;return`Style`}function Hde(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}async function Ude(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of i7){if(!hde(t,a.id))continue;let o=t.plugins[a.id];try{i.push(...await a.lint(e,o,{docName:n}))}catch(e){console.warn(`[lint] plugin "${a.id}" failed${n?` on "${n}"`:``}`,e),r?.({source:a.id,phase:`lint`,...n===void 0?{}:{docName:n},message:Wde(e)})}}return i}var y7=500;function Wde(e){let t=b7(e);return t.length>y7?`${t.slice(0,y7)}… (truncated)`:t}function b7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${b7(e.cause,t+1)})`;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return String(e)}var Gde=/\p{M}+/gu,Kde=/[^\p{L}\p{N}]+/gu,qde=/^-+|-+$/g;function x7(e){return e.trim().normalize(`NFKD`).replace(Gde,``).toLowerCase().replace(Kde,`-`).replace(qde,``)}function Jde(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function S7(e,t){let n=x7(e);return n?Jde(n,t):``}function C7(e,t){let n=x7(e);return t?`#${n}-${x7(t)}`:`#${n}`}var w7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),Yde=new Map(Q3.flatMap(e=>e.surface===`compat`&&w7.has(e.rendersAs)?[[e.name,e]]:[]));function T7(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function E7(e){let t=e.name;if(!t||!w7.has(t))return null;let n=T7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function D7(e){let t=e.name;if(!t)return null;let n=Yde.get(t);if(!n)return null;let r=T7(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var Xde=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:C7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Zde=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:C7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Qde=(e,t)=>{let n=t,r=E7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=D7(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},$de=(e,t)=>{let n=t,r=E7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=D7(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},efe=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},tfe=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},nfe=(e,t)=>{let n=t,r={type:`element`,tagName:n.data?.sourceForm===`ins`?`ins`:`u`,properties:{},children:e.all(n)};return e.patch(t,r),e.applyData(t,r)};function O7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(O7).join(``):``}var k7={wikiLink:Xde,wikiLinkEmbed:Zde,mdxJsxFlowElement:Qde,mdxJsxTextElement:$de,rawMdxFallback:efe,mark:tfe,underline:nfe,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:O7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:O7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},rfe=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,ife=/\bexpression\s*\(/i,afe=1e4;function ofe(e){return!(e.length>afe||rfe.test(e)||ife.test(e))}function A7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!S1(e.split(/\s+/)[0]??``))return!1}return!0}var sfe={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},cfe=new Set([`href`,`src`]),lfe=g(`<>`),j7=()=>e=>{Ee(e,`element`,e=>{let t=sfe[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?F6(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(cfe.has(e))if(t===`<>`||t===lfe)r=``;else{let e=F6(t);r=e===t?t:g(e)}else r=F6(t);r!==t&&(n[e]=r)}})},M7=()=>e=>{Ee(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!S1(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!S1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!S1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!A7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!A7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!S1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!ofe(r)&&delete n.style})};function ufe(e){let t=xe().use(Se,{handlers:k7}).use(j7).use(M7).use(DG),n=t.runSync(e);return String(t.stringify(n))}function dfe(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(N7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(N7(e.slice(r),r>0,!1)),n.join(``)}function N7(e,t,n){let r=0,i=e.length,a=e=>e===9||e===32;for(;t&&r<i&&a(e.charCodeAt(r));)r++;for(;n&&i>r&&a(e.charCodeAt(i-1));)i--;return i>r?e.slice(r,i):``}var P7=/\r?\n|\r/,ffe=(e,t)=>{let n=dfe(String(t.value));if(!P7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(P7),i=[];for(let e=0;e<r.length;e++)e>0&&i.push({type:`element`,tagName:`br`,properties:{},children:[]}),r[e].length>0&&i.push({type:`text`,value:r[e]});return i};function pfe(e){let t=xe().use(re).use(lF,[`yaml`]).use(V8).use(pe).use(s5).use(k6).use(Y8).use(V6).use(Se,{handlers:{...k7,text:ffe}}).use(j7).use(M7).use(DG);return String(t.processSync(D6(B6(e))))}for(let e of[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}]){let t=Q3.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}II(),tI(),nI(),I({intents:F(I({satisfierId:M().min(1),desired:R([`present`,`absent`])}).loose()),...q2,summary:J2}).loose();var mfe=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:R([`present`,`absent`]),action:R(Qo),errorId:M().optional()}).loose(),hfe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),gfe=I({state:M(),strictness:F(R(Xo)).optional()}).loose(),_fe=I({probes:I({env:R([`desktop`,`local-web`,`remote-web`]),satisfiers:no(M(),gfe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),vfe=I({actions:F(mfe),conflicts:F(hfe),withheld:F(M()),snapshot:_fe}).loose();I({entries:F(I({level:R([`info`,`warn`,`error`]),message:M().max(N4),event:M().optional(),fields:no(M(),Ua()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),I({accepted:N().int().min(0)}).loose();var yfe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),bfe=F(Xa([M(),N().int().nonnegative()])),xfe=Qa(`kind`,[I({kind:z(`body`)}),I({kind:z(`property`),key:M().min(1),path:bfe.default([])})]).default({kind:`body`}),Sfe=R([`anchored`,`orphaned`,`resolved`]),F7=I({threadId:M().min(1),docName:M().min(1),target:xfe,anchor:yfe.nullable(),state:Sfe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),I7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),L7=I({threadId:M(),ok:z(!0)}),R7=I({threadId:M(),ok:z(!1),error:z(`not-found`)});I({threads:F(F7)}).loose();var Cfe=I({meta:F7,orphaned:P()}).loose(),wfe=I({threadId:M()}).loose();I({meta:F7,payload:I7}).loose();var Tfe=I({results:F(Xa([L7.extend({meta:F7,payload:I7}),R7]))}).loose(),Efe=I({results:F(Xa([L7.extend({meta:F7}),R7]))}).loose(),Dfe=I({status:M().min(1),reason:M()}).loose(),Ofe=I({docName:M().min(1),content:M(),lifecycle:Dfe.nullable()}).loose(),z7=I({kind:R([`document`,`asset`,`folder`,`file`]).default(`document`),docName:M().min(1).optional(),docExt:M().min(1).default(`.md`),size:N().int().nonnegative(),modified:M().min(1),isSymlink:P().default(!1),canonicalDocName:M().nullable().default(null),targetPath:M().nullable().default(null),path:M().min(1).optional(),assetExt:M().min(1).optional(),mediaKind:R([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:F(M().min(1)).optional(),hasChildren:P().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),kfe=I({documents:F(z7),truncated:P().optional()}).loose(),Afe=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),jfe=I({docName:M().min(1),backlinks:F(Afe)}).loose(),Mfe=I({counts:no(M().min(1),N().int().nonnegative())}).loose();I({counts:no(M().min(1),N().int().nonnegative())}).loose();var Nfe=Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:z(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),Pfe=I({role:M().min(1),sourceForm:M().min(1),targetKind:M().min(1),href:M(),resolvedTarget:M().nullable(),status:M().min(1),reason:M().nullable(),resolutionMethod:M().min(1),fallbackTarget:M().nullable().default(null),range:I({start:N().int().nonnegative(),end:N().int().nonnegative()}),line:N().int().nonnegative(),column:N().int().nonnegative(),definition:I({label:M(),line:N().int().nonnegative()}).nullable().default(null)}).loose(),Ffe=I({docName:M().min(1),forwardLinks:F(Nfe),localTargets:F(Pfe).optional()}).loose(),Ife=Qa(`kind`,[I({id:M().min(1),kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),label:M(),cluster:M().nullable(),category:M().nullable(),tags:F(M()).nullable(),managed:P().optional()}).loose(),I({id:M().min(1),kind:z(`external`),url:M().min(1),label:M()}).loose()]),Lfe=I({source:M().min(1),target:M().min(1)}).loose(),Rfe=I({nodes:F(Ife),links:F(Lfe)}).loose(),zfe=I({ts:N().int().min(0),url:M(),method:M(),ua:M().optional(),origin:M().optional(),referer:M().optional(),host:M().optional(),remote:M().optional(),secChUa:M().optional(),secChUaMobile:M().optional(),secChUaPlatform:M().optional(),secFetchSite:M().optional(),secFetchDest:M().optional(),secFetchMode:M().optional(),secFetchUser:M().optional()}).loose(),Bfe=I({app:Xa([z(`cursor`),z(`codex`),z(`claude`),Va()]),signals_fired:F(M())}).loose();I({entries:F(zfe),count:N().int().min(0),detection:Bfe}).loose();var B7=I({path:M().min(1),code:R([`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `]),origPath:M().min(1).optional(),syncScoped:P(),open:Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1)}),I({kind:z(`asset`),path:M().min(1)})]).optional()}).loose();I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(B7),notStaged:F(B7),untracked:F(B7),incoming:F(B7),truncated:P(),readable:P().default(!0)}).loose(),I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:J2,...q2}).loose(),I({checkpointRef:M().min(1)}).loose();var Vfe=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose();I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:R([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(Vfe),checkpoint:Ua().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose();var Hfe=I({contentDir:M().min(1),pathSeparator:R([`/`,`\\`]),symlinkResolved:P()}).loose();F(Qa(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:z(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:z(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Ufe=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose();I({url:M()}).loose();var Wfe=Qa(`ok`,[I({ok:z(!0),metadata:Ufe}).loose(),I({ok:z(!1),reason:M()}).loose()]),Gfe=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Kfe=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),qfe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose();I({deadLinks:F(I({target:M().min(1),sources:F(qfe)}).loose())}).loose(),I({target:I({docName:M().min(1),title:M(),aliases:F(M())}).loose(),mentions:F(I({source:M().min(1),excerpt:M(),offset:N().int().nonnegative()}).loose()),truncated:P()}).loose(),I({projectPath:M().min(1)}).loose();var Jfe=R([`not-a-git-worktree`,`init-failed`]);Qa(`ok`,[I({ok:z(!0),projectPath:M().min(1)}).loose(),I({ok:z(!1),reason:Jfe,message:M().min(1)}).loose()]),I({host:M().min(1).optional()}).loose(),I({host:M().min(1).optional(),token:M().min(1)}).loose(),I({host:M(),login:M()}).loose(),I({key:M().min(1)}).loose(),I({keyPresent:P()}).loose();var Yfe=R([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),Xfe=Qa(`ok`,[I({ok:z(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:z(!1),endpoint:M().min(1),model:M().min(1),reason:Yfe,status:N().int().optional()}).loose()]);I({name:M().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:M().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),I({authenticated:P()}).loose(),I({channel:R([`login`,`gh-login`]).default(`login`)}).loose(),I({}).loose();var Zfe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),Qfe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(Zfe)}).loose(),$fe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),epe=I({sessionAlive:P(),agent:$fe.nullable(),files:F(Qfe)}).loose(),tpe=I({diff:M(),before:M(),after:M(),properties:M0,generatedAt:N().int().min(0)}).loose();I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose();var npe=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:R([`idle`,`writing`]),ts:N().int().min(0)}).loose();I({presence:no(M().min(1),npe)}).loose();var rpe=I({sessionId:M().min(1),agentType:M().min(1),ts:N().int().min(0),insertedChars:N().int().min(0),deletedChars:N().int().min(0)}).loose();I({effects:F(I({"doc.name":M().min(1),entries:F(rpe)}).loose())}).loose(),I({decisions:F(I({ts:N().int().min(0),decision:M().min(1),kind:M().min(1),"doc.name":M().min(1),pathRole:M().min(1)}).loose())}).loose(),no(M().min(1),P()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),I({path:M().min(1,`path must be non-empty`)}).loose(),I({}).loose();var ipe=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),ape=I({fromPath:M().min(1),toPath:M().min(1)}).loose();I({}).loose(),I({path:M().min(1),...q2,summary:J2}).loose();var V7=I({docName:M().min(1)}).loose();I({path:M().min(1),...q2,summary:J2}).loose();var ope=I({path:M().min(1)}).loose();I({kind:R([`file`,`folder`]),path:M().min(1),...q2,summary:J2}).loose();var spe=I({kind:R([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),cpe=I({pages:F(I({docName:M().min(1),title:M(),docExt:M().min(1),size:N().int().nonnegative(),modified:M().min(1),icon:M().min(1).max(2048).optional()}).loose())}).loose(),lpe=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),upe=I({docName:M().min(1),headings:F(lpe)}).loose(),dpe=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose();I({kind:R([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...q2,summary:J2}).loose();var fpe=I({renamed:F(ipe),renamedAssets:F(ape),rewrittenDocs:F(dpe).optional(),summary:a7.optional()}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...q2}).loose();var ppe=I({deletedDocNames:F(M().min(1))}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...q2,summary:J2}).loose();var mpe=I({deletedDocNames:F(M().min(1))}).loose();I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:J2,...q2}).loose(),I({restoredFrom:M().min(1),timestamp:M().min(1),summary:a7.optional(),warnings:l7.optional()}).loose();var hpe=/^#[0-9a-fA-F]{6}$/,gpe=I(Object.fromEntries(cm.map(e=>[e,M().regex(hpe,`must be a #rrggbb hex color`)]))),H7=M().min(1).refine(fm,{message:`must contain a non-whitespace character`}),U7=I({name:H7,author:H7.optional(),variant:R([`dark`,`light`]),palette:gpe}).loose(),_pe=I({name:M().min(1),scheme:U7,stem:M().min(1).optional(),extension:R([`.yaml`,`.yml`]).optional()}).loose(),vpe=I({id:M().min(1),filename:M().min(1)}).loose(),ype=I({id:M().min(1),scheme:U7}).loose(),bpe=I({id:M().min(1),filename:M().min(1)}).loose(),xpe=Qa(`existed`,[I({existed:z(!1)}).loose(),I({existed:z(!0),filename:M().min(1),scheme:U7}).loose()]),Spe=I({themes:F(Qa(`ok`,[I({ok:z(!0),id:M().min(1),filename:M().min(1),scheme:U7}),I({ok:z(!1),filename:M().min(1),id:M().min(1).optional(),code:M().min(1),conflictingFilenames:F(M().min(1)).min(2).optional()})])),truncated:P()}).loose(),Cpe=R([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),wpe=I({label:M().min(1),webUrl:ba().nullable()}).loose(),Tpe=Qa(`checkStatus`,[I({checkStatus:z(`allowed`)}).loose(),I({checkStatus:z(`denied`),deniedReason:R([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:z(`unknown`),unknownError:R([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),W7=R([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),Epe=R(ep),Dpe=R([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);I({state:Cpe,lastSyncUtc:M().nullable(),lastRunUtc:M().nullable().optional(),lastPullOkUtc:M().nullable().optional(),lastPushOkUtc:M().nullable().optional(),lastFetchUtc:M().nullable(),lastPushedSha:M().nullable(),ahead:N().int().min(0),behind:N().int().min(0),consecutiveFailures:N().int().min(0),consecutivePushFailures:N().int().min(0).optional(),conflictCount:N().int().min(0),hasRemote:P(),syncEnabled:P(),identityUnresolved:P(),remote:wpe.nullable().optional(),pushError:M().optional(),pushErrorCode:W7.optional(),pullError:M().optional(),pullErrorCode:W7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:Tpe.optional(),syncMode:Epe.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:Dpe.nullable().optional()}).loose(),I({action:R([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),I({action:R([`commit`])}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`])}).loose(),I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflictKind:R([`git`,`stale-external-write`]).optional().catch(void 0),variant:z(`working-tree`).optional().catch(void 0),oursSha:M().optional(),theirsSha:M().optional(),baseSha:M().optional()}).loose())}).loose(),I({file:M().min(1),strategy:R([`mine`,`theirs`,`content`,`delete`]),content:M().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),I({}).loose(),I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:R([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:M().nullable(),conflictKind:R([`git`,`stale-external-write`]).optional()}).loose(),I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({result:jo(e=>e!==void 0,{message:`result is required`})}).loose(),I({packId:M().min(1)}).strict(),I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict();var Ope=I({path:M().min(1),summary:M().min(1)}).loose(),kpe=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose();I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(Ope),entryCounts:kpe}).loose())}).loose(),I({noOpen:P().optional(),out:M().min(1).optional()}).loose();var Ape=I({reason:R([`unsupported-platform`,`spawn-error`]),message:M()}).loose();Qa(`status`,[I({status:z(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:z(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:Ape.optional()}).loose(),I({status:z(`failed`),buildError:M()}).loose(),I({status:z(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]);var G7=R(He),K7=R(Ue);function jpe(e){return e===`agents`||Ue.includes(e)}var Mpe=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),Npe=[`.md`,`.mdx`,`.txt`],Ppe=5e3,Fpe=4;function q7(e){return Math.round(e/Fpe)}function Ipe(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Npe.includes(e.slice(t).toLowerCase())}function Lpe(e){let t=q7((e.name??``).length+(e.description??``).length),n=q7(Hd(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||Ipe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:q7(i)}}I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose();var Rpe=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose();I({name:M().min(1),docs:F(Rpe)}).loose(),I({folder:Ua(),frontmatter_local:no(M(),Ua()).nullable(),warnings:F(M()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete — the aligned `warningCodes` entry names which field and how."}),warningCodes:F(R([`symlink-refused`,`malformed-yaml`,`unverifiable`,`templates-symlink-refused`,`templates-unverifiable`])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) — `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from — a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure — `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),I({path:M(),frontmatter:no(M(),Ua()).optional()}).loose(),I({applied:Ua()}).loose();var J7=no(M(),Ua()).meta({description:`Free-form frontmatter map embedded in template payloads.`});I({template:I({name:M().min(1),folder:M(),scope:R([`local`,`inherited`]),path:M().min(1),frontmatter:J7,body:M()}).strict()}).strict();var zpe=I({templates:F(I({name:M().min(1),title:M().optional(),description:M().optional(),path:M().min(1),source_folder:M()}).strict()),truncated:P()}).strict();I({folder:M(),name:M(),body:M().optional(),frontmatter:J7.optional(),...q2,summary:J2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...q2,summary:J2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({existed:P(),path:M().min(1)}).strict(),I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:J7.optional(),...q2,summary:J2}).strict(),I({from:M().min(1),to:M().min(1),committed:P()}).strict();var Y7=R(of),Bpe=/^[a-z0-9-]+$/,Vpe=/^[A-Za-z0-9_-]+$/,X7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict();I({skill:I({name:M().min(1),scope:Y7,path:M().min(1),frontmatter:X7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict();var Hpe=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),Upe=I({name:M().min(1),description:M().optional(),scope:Y7,path:M().min(1),canonicalPath:M().min(1).optional(),filePaths:F(M()).optional(),absolutePath:M().min(1).optional(),installed:P(),hosts:F(M()),hostQualifier:M().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:F(M()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:no(M(),M()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:F(M()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:F(M()).optional(),installableEditors:F(M()).optional(),hubOffered:P().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine — server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads it is installed (`HUB_READER_EDITORS`)."}),linkMode:P().optional(),customPlacements:F(I({path:M(),mode:R([`copy`,`link`])}).strict()).optional(),plugin:I({name:M().min(1),marketplace:M().min(1),provider:M().min(1),url:M().optional()}).strict().optional(),managed:P().optional(),origin:Hpe.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:Mpe.optional()}).strict();I({name:M().min(1),scope:Y7,apply:P().optional()}).strict(),I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict();var Wpe=I({skills:F(Upe),truncated:P()}).strict();I({scope:Y7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:X7,...q2,summary:J2}).strict();var Z7=F(R([`skill-name-vendor-word`,`skill-body-too-long`])).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."});I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:Z7}).strict(),I({scope:Y7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...q2,summary:J2}).strict(),I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:Z7}).strict(),I({scope:Y7.default(`project`),name:M(),...q2,summary:J2}).strict(),I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict();var Q7=`This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.`;I({existed:P(),path:M().min(1),warnings:F(M()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged — either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${Q7}`})}).strict(),I({scope:Y7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:X7.optional(),...q2,summary:J2}).strict(),I({from:M().min(1),to:M().min(1),committed:P(),warnings:F(M()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${Q7}`})}).strict(),I({name:M(),toName:M().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:Y7,toScope:Y7,...q2,summary:J2}).strict();var Gpe=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function Kpe(e){return typeof e==`string`&&Gpe.includes(e)}var qpe=[`intact`,`lossy`,`unknown`];function Jpe(e){return typeof e==`string`&&qpe.includes(e)}var Ype=[`unreadable`,`occupant-unverifiable`];function Xpe(e){return typeof e==`string`&&Ype.includes(e)}var Zpe={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function $7(e){return Zpe[e]}function Qpe(e){let t=typeof e==`object`&&e?e:{},n=t.moveState,r=t.sourceState,i=t.retentionLedger;if(n===void 0&&r===void 0&&i===void 0)return{kind:`coherent`};let a=Kpe(n)?n:void 0,o=Jpe(r)?r:void 0,s=Xpe(i)?i:void 0,c={...a===void 0?{}:{moveState:a},...o===void 0?{}:{sourceState:o},...s===void 0?{}:{retentionLedger:s}};return n!==void 0&&a===void 0||r!==void 0&&o===void 0||i!==void 0&&s===void 0||a===void 0?{kind:`unverified`,...c}:($7(a)?o!==void 0&&s===void 0:a===`nothing-written`?o===void 0:o===void 0&&s===void 0)?{kind:`coherent`,...c}:{kind:`unverified`,...c}}var $pe=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function eme(e){if(e===void 0)return[];let t=$pe;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}I({scope:Y7,path:M().optional(),droppedLocations:F(M()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:F(M()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${Q7}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),I({scope:Y7,name:M(),toName:M(),...q2,summary:J2}).strict(),I({name:M().min(1)}).strict(),I({name:M(),home:M().min(1)}).strict(),I({docName:M().min(1)}).strict();var e9=R([`reference`,`script`,`file`]);I({scope:Y7.default(`project`),name:M(),path:M().min(1),content:M(),...q2,summary:J2}).strict(),I({path:M().min(1),created:P(),kind:e9,content:P()}).strict(),I({scope:Y7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...q2,summary:J2}).strict(),I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I({path:M().min(1),kind:e9,text:M()}).strict(),I({path:M().min(1),existed:P(),kind:e9}).strict();var t9=Xa([K7,z(`agents`)]),n9=M().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),r9=Xa([t9,n9]);I({scope:Y7.default(`project`),name:M(),targets:F(t9).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:F(r9).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:F(r9).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:R([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:r9.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:P().optional(),setSource:M().min(1).optional(),place:I({dir:M().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:R([`copy`,`link`])}).strict().optional(),convert:I({target:r9.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:R([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:I({path:M().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...q2,summary:J2,fork:I({editor:M().min(1),action:R([`align`,`make-source`,`rename`]),toName:M().optional()}).strict().optional()}).strict().refine(e=>!(e.targets!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>!(e.source!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),I({name:M().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:F(M()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:P().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:F(M()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:F(R([`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),I({scope:Y7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),I({name:M().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:P().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict();var tme=I({targets:F(G7),configured:P(),folders:F(I({scope:Y7,host:M(),root:M(),state:R([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:z(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),i9=I({action:z(`link`),scope:Y7,root:M().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:M().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),a9=I({action:z(`unlink`),scope:Y7,root:M().min(1).meta({description:`The linked folder to materialize back.`}),exclude:F(M().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),o9=I({action:z(`add-root`),scope:Y7,root:n9.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),nme=Qa(`action`,[i9.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),a9,o9]);Qa(`action`,[i9.strict(),a9,o9]),I({folderAction:nme}).strict();var s9=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict();I({targets:F(G7),reprojected:F(I({name:M(),hosts:F(M())}).strict()),bundleHosts:F(M()),removedFrom:F(M()),folder:I({moved:F(M()),dropped:F(M()),linked:F(M())}).strict().optional(),preview:s9.optional()}).strict(),I({scope:Y7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...q2,summary:J2}).strict(),I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),I({query:M().optional(),intent:R([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:R([`navigation`,`relevance`]).optional(),scopes:F(R([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:R([`omnibar`,`mcp`,`http`]).optional()}).loose();var rme=I({kind:R([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:no(M(),Ua()),snippet:M().optional()}).loose(),ime=I({capable:P(),applied:P(),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose();I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:R([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose(),I({query:M(),intent:R([`autocomplete`,`full_text`,`omnibar`]),results:F(rme),elapsedMs:N().nonnegative(),semantic:ime.optional(),truncated:P().optional(),ready:P().optional()}).loose();var ame=I({version:M().min(1),recordedAt:M().min(1)}).loose();I({currentVersion:M().min(1),targets:no(M(),ame.nullable())}).loose(),I({scope:Y7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:M().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...q2,summary:J2}).strict(),I({scope:Y7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:F(M().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...q2,summary:J2}).strict(),I({results:F(I({requested:M(),status:R([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:Z7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),I({scope:Y7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...q2,summary:J2}).strict(),I({results:F(I({requested:M(),status:R([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:Z7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose();var ome=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose();I({name:M().min(1).meta({description:`Managed skill name created or matched.`}),path:M().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:P().meta({description:`True when this request created new source files.`}),alreadyImported:P().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:M().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:ome,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:Z7}).loose();var sme=`server-info`,cme=`branch-switched`,lme=`disk-ack`,ume=`config-validation-rejected`,dme=`config-ignore-nested-error`,c9=R([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),fme=I({v:z(1),ch:z(sme),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),pme=I({v:z(1),ch:z(cme),seq:N(),branch:M().min(1)}).loose(),mme=I({v:z(1),ch:c9,seq:N()}).loose(),hme=I({v:z(1),ch:z(lme),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),gme=I({v:z(1),ch:z(ume),seq:N(),docName:M().min(1),error:Rne}).loose(),_me=I({v:z(1),ch:z(dme),seq:N(),path:M().min(1),error:M().min(1)}).loose(),vme=100,yme=500,bme=450,xme={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},l9=new WeakMap;function Sme(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function u9(e){return e.trim().toLowerCase()}var Cme=/\.(?:md|mdx)$/;function wme(e,t){if(t!==`page`)return e;let n=e.replace(Cme,``);return n.length>0?n:e}function d9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Tme(e){let t=d9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}var f9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,p9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function Eme(){let e=lJ({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!p9||typeof e!=`string`||!f9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of p9.segment(e)){if(!n||!f9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function m9(e){let t=CJ({schema:xme,components:{tokenizer:Eme()}});return e.length>0&&PJ(t,e),t}function Dme(e){let t={documents:e};return l9.set(t,m9(e)),t}function Ome(e){let t=l9.get(e);if(t)return t;let n=m9(e.documents);return l9.set(e,n),n}function kme(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function h9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Ame(e,t){let n=u9(t);if(!n)return 0;let r=wme(n,e.kind),i=u9(e.title),a=u9(e.name),o=u9(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}var jme=.5;function g9(e,t){let n=Ame(e,t);return n<=0?n:U2(e.path)?n*jme:n}function Mme(e){return e===`file`?-60:0}var Nme=1e3,Pme=50,Fme=1,Ime=1;function Lme(e,t,n,r,i){let a=i>0?t/i:0,o=n/Pme,s=r===`file`?-.001:0,c=Fme*a+Ime*o+s;return e*Nme+c}function _9(e,t,n,r){return e+t*20+n+Mme(r)}function v9(e,t,n,r,i,a){return e===`relevance`?_9(t,n,r,i):Lme(t,n,r,i,a)}function Rme(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function y9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function zme(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Bme(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Vme(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}var Hme=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Ume(e,t){let n=u9(t);return n.length<4||Hme.test(n)?0:+(e===`full_text`)}function Wme(e){let{lexical:t,fullText:n}=e.signals;return t>=yme?`lexical`:t===bme&&n<=0?`pathOnly`:`body`}function Gme(e){let t=[],n=[],r=[];for(let i of e){let e=Wme(i);e===`lexical`?t.length<vme&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function b9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Gme(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function Kme(e,t,n={}){let r=n.intent??`omnibar`,i=Rme(r,n.ranking),a=Sme(n.limit),o=new Set(n.scopes??kme(r)),s=e.documents.filter(e=>h9(e,o)),c=u9(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=uY(Ome(e),{term:c,properties:Bme(r),boost:Vme(r),tolerance:Ume(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>h9(e.document,o)).map(e=>[e.document.id,e.score])),d=zme(s),f=new Map;for(let e of s)g9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)h9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=y9(f.values(),u);return b9([...f.values()].map(t=>{let n=Math.max(0,g9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:v9(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return b9(qme({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function x9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function qme(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=y9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,g9(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?v9(o,t,n,s,e.kind,m):_9(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=x9(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=x9(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}function Jme(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}function Yme(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function Xme(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var S9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),C9=globalThis;C9[S9]===void 0&&(C9[S9]=pr());var w9=C9[S9],T9=L({version:M().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(w9,{description:`Recorded skill version for this target.`}),recordedAt:Ui().register(w9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:R([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(w9,{description:`Install-source surface that recorded this entry.`}).optional()}),Zme=L({enabled:P().register(w9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Ui().register(w9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})});L({schema:z(1).register(w9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:L({"claude-cowork":T9.optional(),"cli-hosts":T9.optional()}).register(w9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:no(M(),Zme).register(w9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(w9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});var E9=`bottom`,D9=e=>e*8+4,O9=D9(92),k9=D9(40);function Qme(e){return e===`right`||e===`bottom`?e:E9}function $me(e){return typeof e!=`number`||!Number.isFinite(e)?O9:Math.max(k9,Math.round(e))}var ehe=new Set([`(connected)`,`(agent thread)`]);function the(e){return e!=null&&ehe.has(e)}var A9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function nhe(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??rhe,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new A9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function rhe(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function ihe(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function ahe(e){if(typeof e!=`string`||e.length===0)return e;let t=F3(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(N3(e)){let t=ihe(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=j3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var ohe=`https://api.github.com/repos/inkeep/open-knowledge`;async function she(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(ohe,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}var che=/^(#{1,6})\s+(.+)$/;function lhe(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(che);if(!n)return null;let r=n[2].trim(),i=S7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var uhe=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function j9(){let e=globalThis.crypto;if(e&&typeof e.randomUUID==`function`)return e.randomUUID();let t=new Uint8Array(16);if(e&&typeof e.getRandomValues==`function`)e.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=uhe;return`${n[t[0]]}${n[t[1]]}${n[t[2]]}${n[t[3]]}-${n[t[4]]}${n[t[5]]}-${n[t[6]]}${n[t[7]]}-${n[t[8]]}${n[t[9]]}-${n[t[10]]}${n[t[11]]}${n[t[12]]}${n[t[13]]}${n[t[14]]}${n[t[15]]}`}var dhe={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},fhe=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],phe={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},mhe={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},M9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function hhe(e,t=fhe){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function ghe(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function _he(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var vhe={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function yhe(e){return e?vhe[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function bhe(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function xhe(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function She(e){let[t]=bhe(e);return xhe(t,45,32)}var Che=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],whe=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],N9=`ok-user-name-v3`,P9=`ok-user-color-v3`;function F9(e){return e[Math.floor(Math.random()*e.length)]}function The(){return`${F9(Che)} ${F9(whe)}`}function Ehe(){return F9(M9)}function I9(e){try{return localStorage.getItem(e)}catch{return null}}function L9(e,t){try{localStorage.setItem(e,t)}catch{}}function Dhe(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=j9(),n=I9(N9),r=I9(P9);return n||(n=The(),L9(N9,n)),r||(r=Ehe(),L9(P9,r)),{name:n,color:r,coeditor:e,tabId:t}}function R9(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function Ohe(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function khe(e){return e.split(`/`).map(Ohe).join(`/`)}function Ahe(e){return e.split(`/`).map(R9).join(`/`)}function jhe(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=R9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!z$.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=R9(d[e]??``);if(e===f&&(t=ff(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function Mhe(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var z9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function B9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function V9(e){return e.split(`/`).filter(Boolean)}function H9(e){let t=e.trim();return z9.test(t)||t.startsWith(`//`)}function Nhe(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(H9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=Ahe(r<0?n:n.slice(0,r)),a=_f(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=gf(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=jhe(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=B9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function Phe(e,t){let n=e.trim();if(!n)return null;if(H9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=B9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Fhe(e,t,n){let r=e.trim();if(!r||z9.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:R9(e));return c.length===0?null:c.join(`/`)}function Ihe(e,t,n=null,r=`.md`){let i=V9(e);i.pop();let a=V9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${khe(l)}${r}${n?`#${n}`:``}`}function Lhe(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}var Rhe=`unknown`;function zhe(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return Rhe;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function Bhe(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}function U9(e){return`pagesBySlug`in e}function W9(e){return U9(e)?e.pages:e}function G9(e,t){return U9(e)?e.assetPaths??new Set:t??new Set}function K9(e,t){return U9(e)?e.filePaths??new Set:t??new Set}function q9(e,t){return e<t?-1:+(e>t)}function Vhe(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function Hhe(e,t){let n=new Map,r=[...e].sort(q9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function J9(e,t){let n=x7(e);if(n){if(U9(t))return t.pagesBySlug.get(n);for(let e of t)if(x7(e)===n)return e}}function Y9(e,t){if(e.includes(`/`))return;let n=x7(e);if(!n)return;if(U9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);x7(t===-1?e:e.slice(t+1))===n&&(r===void 0||q9(e,r)<0)&&(r=e)}return r}function X9(e){let t=e.trim();if(!t)return[];let n=x7(t);return n.length>0&&n!==t?[n]:[]}function Z9(e,t){let n=e.trim();if(!n)return;let r=W9(t);if(r.has(n))return n;let i=J9(n,t);if(i)return i;for(let e of X9(n))if(r.has(e))return e;return Q9(n,r)||Y9(n,t)}function Q9(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function Uhe(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function $9(e,t,n){let r=Uhe(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(q9)[0]??null}function Whe(e,t,n,r){let i=e.trim();if(!i)return!1;if($9(i,G9(t,n),K9(t,r)))return!0;let a=W9(t);return a.has(i)||X9(i).some(e=>a.has(e))||J9(i,t)!==void 0||Q9(i,a)?!0:Y9(i,t)!==void 0}function Ghe(e,t,n){let r=Phe(e,t);return r===null||r.kind!==`asset`||$9(r.url,G9(n),K9(n))!==null||Z9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}export{I4 as $,G_ as $a,uQ as $i,hX as $n,lh as $o,M3 as $r,ff as $s,K7 as $t,V$ as A,BE as Aa,aee as Ac,b0 as Ai,Yme as An,vp as Ao,x0 as Ar,Pf as As,N4 as At,D0 as B,VE as Ba,$9 as Bi,EQ as Bn,Tp as Bo,Foe as Br,If as Bs,vpe as Bt,t1 as C,_E as Ca,Po as Cc,y0 as Ci,I0 as Cn,zm as Co,E5 as Cr,ef as Cs,upe as Ct,V7 as D,nD as Da,z as Dc,j3 as Di,Hhe as Dn,jp as Do,S7 as Dr,Nf as Ds,h4 as Dt,ope as E,tD as Ea,ga as Ec,$me as Ei,z0 as En,Bm as Eo,she as Er,of as Es,p4 as Et,kfe as F,qw as Fa,Be as Fc,SX as Fi,_Q as Fn,Um as Fo,Roe as Fr,zd as Fs,x1 as Ft,Kfe as G,QE as Ga,Bhe as Gi,X0 as Gn,hp as Go,Qpe as Gr,yf as Gs,f4 as Gt,kde as H,VC as Ha,Z9 as Hi,T2 as Hn,mm as Ho,Ooe as Hr,xf as Hs,ype as Ht,Ofe as I,nT as Ia,Ve as Ic,xX as Ii,vQ as In,$p as Io,koe as Ir,Pd as Is,Bpe as It,g1 as J,_S as Ja,Kme as Ji,L2 as Jn,Bne as Jo,k4 as Jr,mf as Js,n4 as Jt,Mce as K,FE as Ka,lhe as Ki,R2 as Kn,pne as Ko,yY as Kr,Yf as Ks,Q2 as Kt,spe as L,iT as La,We as Lc,CY as Li,c1 as Ln,Qp as Lo,Aoe as Lr,uf as Ls,dhe as Lt,wfe as M,Pw as Ma,Nt as Mc,Jme as Mi,fQ as Mn,wp as Mo,toe as Mr,Kf as Ms,K1 as Mt,c9 as N,uT as Na,ze as Nc,j9 as Ni,Xme as Nn,Gm as No,yhe as Nr,lf as Ns,fpe as Nt,mde as O,$E as Oa,I as Oc,Lhe as Oi,Vhe as On,om as Oo,Dhe as Or,Mf as Os,Cfe as Ot,z7 as P,dT as Pa,Ke as Pc,_4 as Pi,Nhe as Pn,Wm as Po,Loe as Pr,cf as Ps,y1 as Pt,i7 as Q,J as Qa,E0 as Qi,J0 as Qn,im as Qo,U2 as Qr,Hd as Qs,tme as Qt,N$ as R,aT as Ra,Je as Rc,Fhe as Ri,hhe as Rn,up as Ro,Ioe as Rr,Rd as Rs,xpe as Rt,A9 as S,ME as Sa,R as Sc,p5 as Si,D$ as Sn,Mp as So,lue as Sr,Qd as Ss,Z$ as St,Efe as T,wT as Ta,P as Tc,Qme as Ti,NY as Tn,Vm as To,zhe as Tr,Vd as Ts,Tfe as Tt,M9 as U,Kw as Ua,h$ as Ui,e2 as Un,bm as Uo,Noe as Ur,Af as Us,bpe as Ut,Ffe as V,uw as Va,Ghe as Vi,F5 as Vn,Np as Vo,joe as Vr,df as Vs,U7 as Vt,E3 as W,DT as Wa,ahe as Wi,$0 as Wn,Dne as Wo,Poe as Wr,Ef as Ws,Spe as Wt,v1 as X,eC as Xa,_de as Xi,Z0 as Xn,yp as Xo,H9 as Xr,Sf as Xs,s9 as Xt,_1 as Y,bS as Ya,z4 as Yi,C2 as Yn,pm as Yo,H$ as Yr,wf as Ys,o4 as Yt,B$ as Z,j_ as Za,gde as Zi,Y0 as Zn,Yp as Zo,Ide as Zr,Xf as Zs,G7 as Zt,L$ as _,Tk as _a,Os as _c,noe as _i,Fue as _n,Dp as _o,j0 as _r,Zf as _s,Y$ as _t,vfe as a,x7 as aa,Xte as ac,C1 as ai,mpe as an,Cg as ao,$3 as ar,sp as as,Xfe as at,bQ as b,Ok as ba,zo as bc,eme as bi,x$ as bn,lm as bo,l1 as br,nf as bs,O9 as bt,w4 as c,C7 as ca,Ro as cc,jpe as ci,g4 as cn,Mg as co,She as cr,hne as cs,E4 as ct,pme as d,vj as da,Yte as dc,N3 as di,S0 as dn,lg as do,Vde as dr,fp as ds,G1 as dt,F0 as ea,Of as ec,yde as ei,Wpe as en,J_ as eo,ghe as er,Xp as es,O1 as et,_me as f,uj as fa,Qte as fc,Ude as fi,T0 as fn,W as fo,Lpe as fr,vne as fs,Nue as ft,fme as g,Ik as ga,Tte as gc,ufe as gi,Mhe as gn,kp as go,B9 as gr,_ne as gs,Ppe as gt,hme as h,qA as ha,Dte as hc,pfe as hi,I2 as hn,bp as ho,C0 as hr,yne as hs,q0 as ht,tpe as i,Tde as ia,Ds as ic,H2 as ii,zpe as in,Og as io,M8 as ir,Cm as is,Pde as it,ppe as j,Nw as ja,oee as jc,F3 as ji,nhe as jn,Op as jo,F$ as jr,Zd as js,zde as jt,E9 as k,jw as ka,M as kc,L4 as ki,Ihe as kn,Tne as ko,X9 as kr,Dd as ks,P4 as kt,Mfe as l,G0 as la,Wo as lc,$7 as li,Mde as ln,w_ as lo,G$ as lr,wm as ls,k9 as lt,mme as m,fj as ma,Ete as mc,dQ as mi,OZ as mn,G as mo,P$ as mr,cp as ms,K0 as mt,mhe as n,sQ as na,Kte as nc,q$ as ni,U$ as nn,E_ as no,p$ as nr,ap as ns,Wfe as nt,D4 as o,R4 as oa,Ns as oc,Whe as oi,e1 as on,kg as oo,Dme as or,qm as os,J$ as ot,gme as p,pj as pa,ene as pc,y4 as pi,Hfe as pn,Ih as po,yQ as pr,Zm as ps,q5 as pt,m1 as q,pC as qa,M4 as qi,Q0 as qn,Nm as qo,E1 as qr,kf as qs,r4 as qt,epe as r,h1 as ra,qte as rc,the as ri,p0 as rn,q as ro,Hde as rr,Zp as rs,Dde as rt,O4 as s,B4 as sa,Lo as sc,S1 as si,$$ as sn,Ng as so,Tme as sr,xm as ss,_7 as st,phe as t,fue as ta,Wd as tc,J5 as ti,Vpe as tn,K as to,m$ as tr,qp as ts,Rfe as tt,jfe as u,d9 as ua,Go as uc,Iae as ui,jde as un,a_ as uo,P0 as ur,bne as us,nue as ut,I$ as v,Bk as va,Bte as vc,O$ as vi,Pue as vn,tm as vo,oX as vr,$f as vs,K$ as vt,F7 as w,eE as wa,F as wc,T8 as wi,L0 as wn,Hm as wo,_he as wr,$d as ws,cpe as wt,R$ as x,nie as xa,Ko as xc,EZ as xi,tZ as xn,Jm as xo,Rde as xr,tf as xs,X$ as xt,hQ as y,Vk as ya,hte as yc,s1 as yi,UY as yn,cm as yo,s$ as yr,jf as ys,Gfe as yt,O0 as z,TT as za,x4 as zi,TQ as zn,Om as zo,Moe as zr,sf as zs,_pe as zt};
|
|
597
|
+
`?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(ide)){let{index:i}=e;if((a===void 0?o[i-1]:n[a+i-1])===`!`)continue;let s=r&&a!==void 0?{start:u(i),end:u(i+e[0].length)}:void 0;t.message(ade(e[0]),s)}})}),sde=[`index`,`log`],cde=$5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=Q$(n),i=r.toLowerCase();sde.includes(i)&&r!==i&&t.message(`This file is named "${r}", but the Open Knowledge Format only recognizes "${i}". On a case-sensitive filesystem a consumer reads it as an ordinary concept document rather than the reserved file it is meant to be.`)}),r7=[{id:`no-wiki-links`,rule:ode},{id:`log-shape`,rule:rde},{id:`index-shape`,rule:Que},{id:`reserved-casing`,rule:cde}],lde=r7.map(e=>e.rule);function ude(e){return e===void 0?lde:r7.filter(t=>J5(e,t.id)).map(e=>e.rule)}var dde=Xa([P(),R(sm),no(M(),Ua())]),fde={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:no(M(),dde)}),defaultSlice:{enabled:!1,rules:M5},async lint(e,t){return Oue(e,N5(t.rules))},fix(e,t){return Due(e,N5(t.rules))}},pde=I({appliesTo:Xa([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:no(M(),Ua()).optional()}),i7=[fde,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(pde)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return G5(e,R5(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>R5(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:no(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...Yue(e,ude(t.rules),n.docName),...Kue(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>Q5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...Wue}}),advertisedMappings:e=>Gue(e.rules)}}],mde={enabled:!0,plugins:Object.fromEntries(i7.map(e=>[e.id,e.defaultSlice]))};function hde(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function gde(e,t){if(!e?.enabled||t===void 0||t===``)return[];let n=[];for(let r of i7){if(r.frontmatter===void 0)continue;let i=e.plugins[r.id];i?.enabled===!0&&n.push(...r.frontmatter.schemasForDoc(i,t))}return n}function _de(e){let t=Object.fromEntries(i7.map(t=>{let n=e.plugins[t.id]??t.defaultSlice;return t.frontmatter===void 0?[t.id,{...n,enabled:!1}]:[t.id,t.frontmatter.narrowSliceToFrontmatter(n)]}));return{...e,plugins:t}}var vde=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function yde(e){return vde.has(e)}I({docName:G2,summary:J2,content:M().optional(),...q2}).loose(),I({docName:G2,summary:J2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(z$).optional(),...q2}).loose(),I({docName:G2,summary:J2,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...q2}).loose(),I({docName:G2,connectionId:M().min(1),scope:R([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...q2}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var a7=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),bde=Qa(`kind`,[I({kind:z(`inline`),content:M()}),I({kind:z(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),o7=I({kind:z(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:bde.optional(),hint:M().optional()}).loose(),xde=I({type:z(`orphan`),parentCandidates:F(M()),message:M()}).loose(),s7=I({kind:z(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();Qa(`kind`,[o7,s7]);var Sde=I({kind:z(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),c7=I({href:M(),targetKind:M(),role:M(),sourceForm:M(),resolvedTarget:M().nullable(),reason:M(),resolutionMethod:M(),fallbackTarget:M().nullable().optional(),definition:I({line:N().int().nonnegative(),label:M()}).loose().optional()}).loose(),l7=F(Qa(`kind`,[o7,s7,Sde,I({kind:z(`lint-violation`),source:M(),code:M(),message:M(),severity:R([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:c7.optional()}).loose()])).min(1),u7=F(I({href:M(),resolvedTo:M().nullable(),reason:R([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:c7.optional()}).loose()),d7=I({reason:M().min(1),count:N().int().positive()}).loose();I({timestamp:M().min(1),summary:a7.optional(),warnings:l7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(xde).optional(),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose(),I({docName:M().min(1),scope:R([`last`,`session`,`count`]),undone:P()}).loose(),I({docs:F(I({docName:K2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(z$).optional(),summary:J2}).loose()).min(1).max(100),...q2}).loose();var Cde=I({type:m4,title:M(),detail:M().optional()}).loose(),wde=Qa(`status`,[I({status:z(`written`),docName:M().min(1),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose(),I({status:z(`error`),docName:M().min(1),error:Cde}).loose()]);I({timestamp:M().min(1),results:F(wde),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),I({docName:G2,patch:no(M(),Xa([jd,Va()])),types:no(M(),R(Od)).optional(),summary:J2,...q2}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:a7.optional(),warnings:l7.optional(),brokenLinks:u7,brokenLinkSuppression:d7.optional()}).loose();function Tde(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??M5},frontmatter:{enabled:e.frontmatter?.enabled??!1,schemas:e.frontmatter?.schemas??[]},okf:{enabled:e.okf?.enabled??!1,...e.okf?.rules===void 0?{}:{rules:e.okf.rules},generate:{index:e.okf?.generate?.index??!1}}}}}var Ede=Object.fromEntries(i7.map(e=>[e.id,e.sliceSchema])),Dde=I({effective:I({enabled:P(),plugins:I(Ede)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Ode=Xa([P(),no(M(),Ua())]);I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:Xa([Ode,Va()])}),I({file:M().min(1).max(512),delete:z(!0).optional(),field:M().min(1).max(256).optional(),parentPath:F(Xa([M().min(1).max(256),I({items:z(!0)}).strict()])).max(8).optional(),removeField:z(!0).optional(),renameTo:M().min(1).max(256).optional(),constraint:I({type:R([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(Xa([M(),N(),P()])).nullable().optional(),itemsEnum:F(Xa([M(),N(),P()])).nullable().optional(),itemsType:R([`string`,`number`,`boolean`,`object`]).nullable().optional(),pattern:M().nullable().optional(),format:M().nullable().optional(),description:M().max(2048).nullable().optional(),required:P().optional()}).optional()}).refine(e=>e.delete===void 0||e.field===void 0&&e.constraint===void 0&&e.removeField===void 0&&e.renameTo===void 0,{message:`delete cannot be combined with a field edit`}).refine(e=>[e.constraint,e.removeField,e.renameTo].filter(e=>e!==void 0).length<=1,{message:`constraint, removeField, and renameTo are mutually exclusive`}).refine(e=>e.removeField===void 0&&e.renameTo===void 0||e.field!==void 0,{message:`removeField and renameTo require field`}).refine(e=>e.parentPath===void 0||e.field!==void 0,{message:`parentPath requires field`}).refine(e=>e.field===void 0?e.constraint===void 0:e.constraint!==void 0||e.removeField!==void 0||e.renameTo!==void 0,{message:`field requires constraint, removeField, or renameTo`});var kde=I({schemas:F(M()),truncated:P()}).strict(),f7=I({line:N(),character:N()}),p7=I({start:f7,end:f7}),m7=I({range:p7,severity:R([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:p7,newText:M()})).optional(),frontmatterScope:R(rm).optional(),frontmatterProperty:M().optional()}),h7=F(M()).optional();I({files:F(I({file:M(),diagnostics:F(m7),ran:h7,warnings:F(M()).optional()})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:h7});var Ade=m7.extend({linkTarget:M().optional(),localTarget:c7.optional()}),jde=I({files:F(I({file:M(),diagnostics:F(Ade)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:h7,brokenLinkSuppression:d7.optional()}),g7=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),Mde=I({files:F(I({file:M(),lint:g7,links:g7})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:d7.optional()});I({docName:G2,summary:J2,...q2}).loose();var Nde=I({reason:R([`re-lint-threw`,`source-went-blind`]),message:M().min(1)}),Pde=I({file:M(),fixedCount:N(),diagnostics:F(m7),errorCount:N(),warningCount:N(),ran:h7,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:Nde.optional()});function Fde(e){let t=e.trim().replace(/^\.\//,``);if(!t.startsWith(`.ok/schemas/`))return!1;let n=t.slice(12);return n.length>0&&!n.includes(`/`)&&!n.includes(`\\`)&&n!==`.`&&n!==`..`}function Ide(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:Fde(e)&&t.endsWith(`.json`)}var _7=[{id:`MD001`,alias:`heading-increment`,aliases:[`heading-increment`],name:`Heading levels should only increment by one level at a time`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md001.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`}]},{id:`MD003`,alias:`heading-style`,aliases:[`heading-style`],name:`Heading style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md003.md`,tags:[`headings`],options:[{key:`style`,type:`enum`,description:`Heading style`,enum:[`consistent`,`atx`,`atx_closed`,`setext`,`setext_with_atx`,`setext_with_atx_closed`],default:`consistent`}]},{id:`MD004`,alias:`ul-style`,aliases:[`ul-style`],name:`Unordered list style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md004.md`,tags:[`bullet`,`ul`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`consistent`,`asterisk`,`plus`,`dash`,`sublist`],default:`consistent`}]},{id:`MD005`,alias:`list-indent`,aliases:[`list-indent`],name:`Inconsistent indentation for list items at the same level`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md005.md`,tags:[`bullet`,`ul`,`indentation`],options:[]},{id:`MD007`,alias:`ul-indent`,aliases:[`ul-indent`],name:`Unordered list indentation`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md007.md`,tags:[`bullet`,`ul`,`indentation`],options:[{key:`indent`,type:`integer`,description:`Spaces for indent`,default:2,minimum:1},{key:`start_indented`,type:`boolean`,description:`Whether to indent the first level of the list`,default:!1},{key:`start_indent`,type:`integer`,description:`Spaces for first level indent (when start_indented is set)`,default:2,minimum:1}]},{id:`MD009`,alias:`no-trailing-spaces`,aliases:[`no-trailing-spaces`],name:`Trailing spaces`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md009.md`,tags:[`whitespace`],options:[{key:`br_spaces`,type:`integer`,description:`Spaces for line break`,default:2,minimum:0},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!1},{key:`list_item_empty_lines`,type:`boolean`,description:`Allow spaces for empty lines in list items`,default:!1},{key:`strict`,type:`boolean`,description:`Include unnecessary breaks`,default:!1}]},{id:`MD010`,alias:`no-hard-tabs`,aliases:[`no-hard-tabs`],name:`Hard tabs`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md010.md`,tags:[`whitespace`,`hard_tab`],options:[{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`ignore_code_languages`,type:`string-array`,description:`Fenced code languages to ignore`,default:[]},{key:`spaces_per_tab`,type:`integer`,description:`Number of spaces for each hard tab`,default:1,minimum:0}]},{id:`MD011`,alias:`no-reversed-links`,aliases:[`no-reversed-links`],name:`Reversed link syntax`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md011.md`,tags:[`links`],options:[]},{id:`MD012`,alias:`no-multiple-blanks`,aliases:[`no-multiple-blanks`],name:`Multiple consecutive blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md012.md`,tags:[`whitespace`,`blank_lines`],options:[{key:`maximum`,type:`integer`,description:`Consecutive blank lines`,default:1,minimum:1}]},{id:`MD013`,alias:`line-length`,aliases:[`line-length`],name:`Line length`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md013.md`,tags:[`line_length`],options:[{key:`line_length`,type:`integer`,description:`Number of characters`,default:80,minimum:1},{key:`heading_line_length`,type:`integer`,description:`Number of characters for headings`,default:80,minimum:1},{key:`code_block_line_length`,type:`integer`,description:`Number of characters for code blocks`,default:80,minimum:1},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`tables`,type:`boolean`,description:`Include tables`,default:!0},{key:`headings`,type:`boolean`,description:`Include headings`,default:!0},{key:`strict`,type:`boolean`,description:`Strict length checking`,default:!1},{key:`stern`,type:`boolean`,description:`Stern length checking`,default:!1}]},{id:`MD014`,alias:`commands-show-output`,aliases:[`commands-show-output`],name:`Dollar signs used before commands without showing output`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md014.md`,tags:[`code`],options:[]},{id:`MD018`,alias:`no-missing-space-atx`,aliases:[`no-missing-space-atx`],name:`No space after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md018.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD019`,alias:`no-multiple-space-atx`,aliases:[`no-multiple-space-atx`],name:`Multiple spaces after hash on atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md019.md`,tags:[`headings`,`atx`,`spaces`],options:[]},{id:`MD020`,alias:`no-missing-space-closed-atx`,aliases:[`no-missing-space-closed-atx`],name:`No space inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md020.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD021`,alias:`no-multiple-space-closed-atx`,aliases:[`no-multiple-space-closed-atx`],name:`Multiple spaces inside hashes on closed atx style heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md021.md`,tags:[`headings`,`spaces`,`atx_closed`],options:[]},{id:`MD022`,alias:`blanks-around-headings`,aliases:[`blanks-around-headings`],name:`Headings should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md022.md`,tags:[`headings`,`blank_lines`],options:[{key:`include_front_matter`,type:`boolean`,description:`Include front matter content`,default:!1},{key:`lines_above`,type:`unsupported`,description:`Blank lines above heading`,default:1},{key:`lines_below`,type:`unsupported`,description:`Blank lines below heading`,default:1}]},{id:`MD023`,alias:`heading-start-left`,aliases:[`heading-start-left`],name:`Headings must start at the beginning of the line`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md023.md`,tags:[`headings`,`spaces`],options:[]},{id:`MD024`,alias:`no-duplicate-heading`,aliases:[`no-duplicate-heading`],name:`Multiple headings with the same content`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md024.md`,tags:[`headings`],options:[{key:`siblings_only`,type:`boolean`,description:`Only check sibling headings`,default:!1}]},{id:`MD025`,alias:`single-title`,aliases:[`single-title`,`single-h1`],name:`Multiple top-level headings in the same document`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md025.md`,tags:[`headings`],options:[{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD026`,alias:`no-trailing-punctuation`,aliases:[`no-trailing-punctuation`],name:`Trailing punctuation in heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md026.md`,tags:[`headings`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!。,;:!`}]},{id:`MD027`,alias:`no-multiple-space-blockquote`,aliases:[`no-multiple-space-blockquote`],name:`Multiple spaces after blockquote symbol`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md027.md`,tags:[`indentation`,`whitespace`,`blockquote`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD028`,alias:`no-blanks-blockquote`,aliases:[`no-blanks-blockquote`],name:`Blank line inside blockquote`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md028.md`,tags:[`whitespace`,`blockquote`],options:[]},{id:`MD029`,alias:`ol-prefix`,aliases:[`ol-prefix`],name:`Ordered list item prefix`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md029.md`,tags:[`ol`],options:[{key:`style`,type:`enum`,description:`List style`,enum:[`one`,`ordered`,`one_or_ordered`,`zero`],default:`one_or_ordered`}]},{id:`MD030`,alias:`list-marker-space`,aliases:[`list-marker-space`],name:`Spaces after list markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md030.md`,tags:[`ul`,`whitespace`,`ol`],options:[{key:`ul_single`,type:`integer`,description:`Spaces for single-line unordered list items`,default:1,minimum:1},{key:`ol_single`,type:`integer`,description:`Spaces for single-line ordered list items`,default:1,minimum:1},{key:`ul_multi`,type:`integer`,description:`Spaces for multi-line unordered list items`,default:1,minimum:1},{key:`ol_multi`,type:`integer`,description:`Spaces for multi-line ordered list items`,default:1,minimum:1}]},{id:`MD031`,alias:`blanks-around-fences`,aliases:[`blanks-around-fences`],name:`Fenced code blocks should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md031.md`,tags:[`blank_lines`,`code`],options:[{key:`list_items`,type:`boolean`,description:`Include list items`,default:!0}]},{id:`MD032`,alias:`blanks-around-lists`,aliases:[`blanks-around-lists`],name:`Lists should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md032.md`,tags:[`bullet`,`ul`,`blank_lines`,`ol`],options:[]},{id:`MD033`,alias:`no-inline-html`,aliases:[`no-inline-html`],name:`Inline HTML`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md033.md`,tags:[`html`],options:[{key:`allowed_elements`,type:`string-array`,description:`Allowed elements`,default:[]},{key:`table_allowed_elements`,type:`string-array`,description:`Allowed elements in tables`,default:[]}]},{id:`MD034`,alias:`no-bare-urls`,aliases:[`no-bare-urls`],name:`Bare URL used`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md034.md`,tags:[`links`,`url`],options:[]},{id:`MD035`,alias:`hr-style`,aliases:[`hr-style`],name:`Horizontal rule style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md035.md`,tags:[`hr`],options:[{key:`style`,type:`string`,description:`Horizontal rule style`,default:`consistent`}]},{id:`MD036`,alias:`no-emphasis-as-heading`,aliases:[`no-emphasis-as-heading`],name:`Emphasis used instead of a heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md036.md`,tags:[`headings`,`emphasis`],options:[{key:`punctuation`,type:`string`,description:`Punctuation characters`,default:`.,;:!?。,;:!?`}]},{id:`MD037`,alias:`no-space-in-emphasis`,aliases:[`no-space-in-emphasis`],name:`Spaces inside emphasis markers`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md037.md`,tags:[`whitespace`,`emphasis`],options:[]},{id:`MD038`,alias:`no-space-in-code`,aliases:[`no-space-in-code`],name:`Spaces inside code span elements`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md038.md`,tags:[`whitespace`,`code`],options:[]},{id:`MD039`,alias:`no-space-in-links`,aliases:[`no-space-in-links`],name:`Spaces inside link text`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md039.md`,tags:[`whitespace`,`links`],options:[]},{id:`MD040`,alias:`fenced-code-language`,aliases:[`fenced-code-language`],name:`Fenced code blocks should have a language specified`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md040.md`,tags:[`code`,`language`],options:[{key:`allowed_languages`,type:`string-array`,description:`List of languages`,default:[]},{key:`language_only`,type:`boolean`,description:`Require language only`,default:!1}]},{id:`MD041`,alias:`first-line-heading`,aliases:[`first-line-heading`,`first-line-h1`],name:`First line in a file should be a top-level heading`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md041.md`,tags:[`headings`],options:[{key:`allow_preamble`,type:`boolean`,description:`Allow content before first heading`,default:!1},{key:`front_matter_title`,type:`string`,description:`RegExp for matching title in front matter`,default:`^\\s*title\\s*[:=]`},{key:`level`,type:`integer`,description:`Heading level`,default:1,minimum:1,maximum:6}]},{id:`MD042`,alias:`no-empty-links`,aliases:[`no-empty-links`],name:`No empty links`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md042.md`,tags:[`links`],options:[]},{id:`MD043`,alias:`required-headings`,aliases:[`required-headings`],name:`Required heading structure`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md043.md`,tags:[`headings`],options:[{key:`headings`,type:`string-array`,description:`List of headings`,default:[]},{key:`match_case`,type:`boolean`,description:`Match case of headings`,default:!1}]},{id:`MD044`,alias:`proper-names`,aliases:[`proper-names`],name:`Proper names should have the correct capitalization`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md044.md`,tags:[`spelling`],options:[{key:`names`,type:`string-array`,description:`List of proper names`,default:[]},{key:`code_blocks`,type:`boolean`,description:`Include code blocks`,default:!0},{key:`html_elements`,type:`boolean`,description:`Include HTML elements`,default:!0}]},{id:`MD045`,alias:`no-alt-text`,aliases:[`no-alt-text`],name:`Images should have alternate text (alt text)`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md045.md`,tags:[`accessibility`,`images`],options:[]},{id:`MD046`,alias:`code-block-style`,aliases:[`code-block-style`],name:`Code block style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md046.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Block style`,enum:[`consistent`,`fenced`,`indented`],default:`consistent`}]},{id:`MD047`,alias:`single-trailing-newline`,aliases:[`single-trailing-newline`],name:`Files should end with a single newline character`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md047.md`,tags:[`blank_lines`],options:[]},{id:`MD048`,alias:`code-fence-style`,aliases:[`code-fence-style`],name:`Code fence style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md048.md`,tags:[`code`],options:[{key:`style`,type:`enum`,description:`Code fence style`,enum:[`consistent`,`backtick`,`tilde`],default:`consistent`}]},{id:`MD049`,alias:`emphasis-style`,aliases:[`emphasis-style`],name:`Emphasis style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md049.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Emphasis style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD050`,alias:`strong-style`,aliases:[`strong-style`],name:`Strong style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md050.md`,tags:[`emphasis`],options:[{key:`style`,type:`enum`,description:`Strong style`,enum:[`consistent`,`asterisk`,`underscore`],default:`consistent`}]},{id:`MD051`,alias:`link-fragments`,aliases:[`link-fragments`],name:`Link fragments should be valid`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md051.md`,tags:[`links`],options:[{key:`ignore_case`,type:`boolean`,description:`Ignore case of fragments`,default:!1},{key:`ignored_pattern`,type:`string`,description:`Pattern for ignoring additional fragments`,default:``}]},{id:`MD052`,alias:`reference-links-images`,aliases:[`reference-links-images`],name:`Reference links and images should use a label that is defined`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md052.md`,tags:[`links`,`images`],options:[{key:`ignored_labels`,type:`string-array`,description:`Ignored link labels`,default:[`x`]},{key:`shortcut_syntax`,type:`boolean`,description:`Include shortcut syntax`,default:!1}]},{id:`MD053`,alias:`link-image-reference-definitions`,aliases:[`link-image-reference-definitions`],name:`Link and image reference definitions should be needed`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md053.md`,tags:[`links`,`images`],options:[{key:`ignored_definitions`,type:`string-array`,description:`Ignored definitions`,default:[`//`]}]},{id:`MD054`,alias:`link-image-style`,aliases:[`link-image-style`],name:`Link and image style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md054.md`,tags:[`links`,`images`],options:[{key:`autolink`,type:`boolean`,description:`Allow autolinks`,default:!0},{key:`inline`,type:`boolean`,description:`Allow inline links and images`,default:!0},{key:`full`,type:`boolean`,description:`Allow full reference links and images`,default:!0},{key:`collapsed`,type:`boolean`,description:`Allow collapsed reference links and images`,default:!0},{key:`shortcut`,type:`boolean`,description:`Allow shortcut reference links and images`,default:!0},{key:`url_inline`,type:`boolean`,description:`Allow URLs as inline links`,default:!0}]},{id:`MD055`,alias:`table-pipe-style`,aliases:[`table-pipe-style`],name:`Table pipe style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md055.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table pipe style`,enum:[`consistent`,`leading_only`,`trailing_only`,`leading_and_trailing`,`no_leading_or_trailing`],default:`consistent`}]},{id:`MD056`,alias:`table-column-count`,aliases:[`table-column-count`],name:`Table column count`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md056.md`,tags:[`table`],options:[]},{id:`MD058`,alias:`blanks-around-tables`,aliases:[`blanks-around-tables`],name:`Tables should be surrounded by blank lines`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md058.md`,tags:[`table`],options:[]},{id:`MD059`,alias:`descriptive-link-text`,aliases:[`descriptive-link-text`],name:`Link text should be descriptive`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md059.md`,tags:[`links`,`accessibility`],options:[{key:`prohibited_texts`,type:`string-array`,description:`Prohibited link texts`,default:[`click here`,`here`,`link`,`more`]}]},{id:`MD060`,alias:`table-column-style`,aliases:[`table-column-style`],name:`Table column style`,docUrl:`https://github.com/DavidAnson/markdownlint/blob/v0.41.1/doc/md060.md`,tags:[`table`],options:[{key:`style`,type:`enum`,description:`Table column style`,enum:[`any`,`aligned`,`compact`,`tight`],default:`any`},{key:`aligned_delimiter`,type:`boolean`,description:`Aligned delimiter columns`,default:!1}]}],Lde=(()=>{let e=new Map;for(let t of _7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function v7(e){return Lde.get(e.toUpperCase())??null}function Rde(e,t){let n=v7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))v7(t)===n&&(r={key:t,value:i});return r}var zde=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],Bde=[[`headings`,`Headings`],[`bullet`,`Lists`],[`ul`,`Lists`],[`ol`,`Lists`],[`links`,`Links & images`],[`images`,`Links & images`],[`accessibility`,`Links & images`],[`code`,`Code`],[`language`,`Code`],[`emphasis`,`Style`],[`html`,`Style`],[`line_length`,`Whitespace`],[`whitespace`,`Whitespace`],[`hard_tab`,`Whitespace`],[`blank_lines`,`Whitespace`],[`indentation`,`Whitespace`]];function Vde(e){for(let[t,n]of Bde)if(e.tags.includes(t))return n;return`Style`}function Hde(e){let t={lint:{errorCount:0,warningCount:0},links:{errorCount:0,warningCount:0}};for(let n of e){let e=n.source===`links`?t.links:t.lint;n.severity===`error`?e.errorCount+=1:e.warningCount+=1}return t}async function Ude(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of i7){if(!hde(t,a.id))continue;let o=t.plugins[a.id];try{i.push(...await a.lint(e,o,{docName:n}))}catch(e){console.warn(`[lint] plugin "${a.id}" failed${n?` on "${n}"`:``}`,e),r?.({source:a.id,phase:`lint`,...n===void 0?{}:{docName:n},message:Wde(e)})}}return i}var y7=500;function Wde(e){let t=b7(e);return t.length>y7?`${t.slice(0,y7)}… (truncated)`:t}function b7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${b7(e.cause,t+1)})`;if(typeof e==`object`&&e)try{let t=JSON.stringify(e);if(t!==void 0)return t}catch{}return String(e)}var Gde=/\p{M}+/gu,Kde=/[^\p{L}\p{N}]+/gu,qde=/^-+|-+$/g;function x7(e){return e.trim().normalize(`NFKD`).replace(Gde,``).toLowerCase().replace(Kde,`-`).replace(qde,``)}function Jde(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function S7(e,t){let n=x7(e);return n?Jde(n,t):``}function C7(e,t){let n=x7(e);return t?`#${n}-${x7(t)}`:`#${n}`}var w7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),Yde=new Map(Q3.flatMap(e=>e.surface===`compat`&&w7.has(e.rendersAs)?[[e.name,e]]:[]));function T7(e){let t={};for(let n of e.attributes){if(n.type!==`mdxJsxAttribute`)return null;let e=n.name.toLowerCase();if(!(e.length>=3&&e.startsWith(`on`)))if(n.value===null)t[n.name]=!0;else if(typeof n.value==`string`)t[n.name]=n.value;else return null}return t}function E7(e){let t=e.name;if(!t||!w7.has(t))return null;let n=T7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function D7(e){let t=e.name;if(!t)return null;let n=Yde.get(t);if(!n)return null;let r=T7(e);if(r===null)return null;let i=n.translateProps(r),a={};for(let[e,t]of Object.entries(i))(typeof t==`string`||typeof t==`boolean`)&&(a[e]=t);return{type:`element`,tagName:n.rendersAs,properties:a,children:[]}}var Xde=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-link`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:C7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Zde=(e,t)=>{let n=t,{target:r,anchor:i,alias:a}=n.data,o={type:`element`,tagName:`a`,properties:{className:[`wiki-embed`],dataTarget:r,dataAnchor:i??``,dataAlias:a??``,href:C7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Qde=(e,t)=>{let n=t,r=E7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=D7(n);if(i){e.patch(t,i);let n=e.applyData(t,i);return n.tagName===`img`?{type:`element`,tagName:`p`,properties:{},children:[n]}:n}let a={type:`element`,tagName:`pre`,properties:{className:[`mdx-component`]},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]}]};return e.patch(t,a),e.applyData(t,a)},$de=(e,t)=>{let n=t,r=E7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=D7(n);if(i)return e.patch(t,i),e.applyData(t,i);let a={type:`element`,tagName:`span`,properties:{className:[`mdx-inline`],dataJsxInline:``},children:[{type:`text`,value:typeof n.data?.sourceRaw==`string`?n.data.sourceRaw:``}]};return e.patch(t,a),e.applyData(t,a)},efe=(e,t)=>{let n=t,r=n.data.reason||`unknown`,i=n.value||``,a=r.replace(/--/g,`—`),o={type:`comment`,value:` Parse error: ${a} `},s={type:`element`,tagName:`pre`,properties:{className:[`mdx-fallback`],dataRawMdxFallback:``,dataReason:a},children:[{type:`element`,tagName:`code`,properties:{},children:[{type:`text`,value:i}]}]};return e.patch(t,s),[o,e.applyData(t,s)]},tfe=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},nfe=(e,t)=>{let n=t,r={type:`element`,tagName:n.data?.sourceForm===`ins`?`ins`:`u`,properties:{},children:e.all(n)};return e.patch(t,r),e.applyData(t,r)};function O7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(O7).join(``):``}var k7={wikiLink:Xde,wikiLinkEmbed:Zde,mdxJsxFlowElement:Qde,mdxJsxTextElement:$de,rawMdxFallback:efe,mark:tfe,underline:nfe,tag:(e,t)=>{let n=t.value,r={type:`element`,tagName:`a`,properties:{className:[`tag`],dataTag:n,href:`#tag/${n}`},children:[{type:`text`,value:`#${n}`}]};return e.patch(t,r),e.applyData(t,r)},comment:(e,t)=>{let n={type:`comment`,value:O7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:O7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},footnoteReference:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`sup`,properties:{id:`fnref-${n}`,dataFootnoteRef:``,dataFootnoteId:n,className:[`footnote-ref`]},children:[{type:`element`,tagName:`a`,properties:{href:`#fn-${n}`,className:[`footnote-ref-link`]},children:[{type:`text`,value:`[${n}]`}]}]};return e.patch(t,r),e.applyData(t,r)},footnoteDefinition:(e,t)=>{let n=t.identifier,r={type:`element`,tagName:`aside`,properties:{id:`fn-${n}`,dataFootnoteDef:``,dataFootnoteId:n,className:[`footnote-def`]},children:[{type:`element`,tagName:`div`,properties:{className:[`footnote-body`]},children:e.all(t)},{type:`element`,tagName:`a`,properties:{href:`#fnref-${n}`,className:[`footnote-backref`],ariaLabel:`Back to reference`},children:[{type:`text`,value:`↩`}]}]};return e.patch(t,r),e.applyData(t,r)}},rfe=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,ife=/\bexpression\s*\(/i,afe=1e4;function ofe(e){return!(e.length>afe||rfe.test(e)||ife.test(e))}function A7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!S1(e.split(/\s+/)[0]??``))return!1}return!0}var sfe={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},cfe=new Set([`href`,`src`]),lfe=g(`<>`),j7=()=>e=>{Ee(e,`element`,e=>{let t=sfe[e.tagName.toLowerCase()],n=e.properties;if(!(!t||!n))for(let e of t){let t=n[e];if(Array.isArray(t)){let r=t.map(e=>typeof e==`string`?F6(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(cfe.has(e))if(t===`<>`||t===lfe)r=``;else{let e=F6(t);r=e===t?t:g(e)}else r=F6(t);r!==t&&(n[e]=r)}})},M7=()=>e=>{Ee(e,`element`,e=>{let t=e.tagName.toLowerCase(),n=e.properties;if(!n)return;if(t===`a`||t===`area`||t===`link`||t===`base`){let e=n.href;typeof e==`string`&&!S1(e)&&delete n.href}if(t===`img`||t===`iframe`||t===`script`||t===`embed`||t===`source`||t===`audio`||t===`video`||t===`track`){let e=n.src;typeof e==`string`&&!S1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!S1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!A7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!A7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!S1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!ofe(r)&&delete n.style})};function ufe(e){let t=xe().use(Se,{handlers:k7}).use(j7).use(M7).use(DG),n=t.runSync(e);return String(t.stringify(n))}function dfe(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(N7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(N7(e.slice(r),r>0,!1)),n.join(``)}function N7(e,t,n){let r=0,i=e.length,a=e=>e===9||e===32;for(;t&&r<i&&a(e.charCodeAt(r));)r++;for(;n&&i>r&&a(e.charCodeAt(i-1));)i--;return i>r?e.slice(r,i):``}var P7=/\r?\n|\r/,ffe=(e,t)=>{let n=dfe(String(t.value));if(!P7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(P7),i=[];for(let e=0;e<r.length;e++)e>0&&i.push({type:`element`,tagName:`br`,properties:{},children:[]}),r[e].length>0&&i.push({type:`text`,value:r[e]});return i};function pfe(e){let t=xe().use(re).use(lF,[`yaml`]).use(V8).use(pe).use(s5).use(k6).use(Y8).use(V6).use(Se,{handlers:{...k7,text:ffe}}).use(j7).use(M7).use(DG);return String(t.processSync(D6(B6(e))))}for(let e of[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}]){let t=Q3.find(t=>t.name===e.tagName);if(!t)throw Error(`JSX_SRC_REF_TAGS: no built-in component descriptor named '${e.tagName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the tagName to match a descriptor in builtInComponents.`);if(!t.props.some(t=>t.name===e.attrName))throw Error(`JSX_SRC_REF_TAGS: component '${e.tagName}' declares no prop named '${e.attrName}' — the rename-rewrite and backlink passes for this entry would silently never match. Fix the attrName to match one of the descriptor's props.`)}II(),tI(),nI(),I({intents:F(I({satisfierId:M().min(1),desired:R([`present`,`absent`])}).loose()),...q2,summary:J2}).loose();var mfe=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:R([`present`,`absent`]),action:R(Qo),errorId:M().optional()}).loose(),hfe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),gfe=I({state:M(),strictness:F(R(Xo)).optional()}).loose(),_fe=I({probes:I({env:R([`desktop`,`local-web`,`remote-web`]),satisfiers:no(M(),gfe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),vfe=I({actions:F(mfe),conflicts:F(hfe),withheld:F(M()),snapshot:_fe}).loose();I({entries:F(I({level:R([`info`,`warn`,`error`]),message:M().max(N4),event:M().optional(),fields:no(M(),Ua()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),I({accepted:N().int().min(0)}).loose();var yfe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),bfe=F(Xa([M(),N().int().nonnegative()])),xfe=Qa(`kind`,[I({kind:z(`body`)}),I({kind:z(`property`),key:M().min(1),path:bfe.default([])})]).default({kind:`body`}),Sfe=R([`anchored`,`orphaned`,`resolved`]),F7=I({threadId:M().min(1),docName:M().min(1),target:xfe,anchor:yfe.nullable(),state:Sfe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),I7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),L7=I({threadId:M(),ok:z(!0)}),R7=I({threadId:M(),ok:z(!1),error:z(`not-found`)});I({threads:F(F7)}).loose();var Cfe=I({meta:F7,orphaned:P()}).loose(),wfe=I({threadId:M()}).loose();I({meta:F7,payload:I7}).loose();var Tfe=I({results:F(Xa([L7.extend({meta:F7,payload:I7}),R7]))}).loose(),Efe=I({results:F(Xa([L7.extend({meta:F7}),R7]))}).loose(),Dfe=I({status:M().min(1),reason:M()}).loose(),Ofe=I({docName:M().min(1),content:M(),lifecycle:Dfe.nullable()}).loose(),z7=I({kind:R([`document`,`asset`,`folder`,`file`]).default(`document`),docName:M().min(1).optional(),docExt:M().min(1).default(`.md`),size:N().int().nonnegative(),modified:M().min(1),isSymlink:P().default(!1),canonicalDocName:M().nullable().default(null),targetPath:M().nullable().default(null),path:M().min(1).optional(),assetExt:M().min(1).optional(),mediaKind:R([`image`,`video`,`audio`,`pdf`,`text`,`mermaid`,`excalidraw`]).nullable().optional(),referencedBy:F(M().min(1)).optional(),hasChildren:P().optional()}).loose().refine(e=>e.kind===`document`?e.docName!==void 0&&e.path===void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.kind===`folder`?e.docName===void 0&&e.path!==void 0&&e.assetExt===void 0&&e.mediaKind===void 0&&e.referencedBy===void 0:e.kind===`file`?e.path!==void 0&&e.mediaKind===void 0&&e.referencedBy===void 0&&e.hasChildren===void 0:e.path!==void 0&&e.assetExt!==void 0&&e.referencedBy!==void 0&&e.hasChildren===void 0,{message:`document/asset/folder/file kind must match its required fields (document → docName; asset → path+assetExt+referencedBy; folder → path only, no docName; file → path, no mediaKind/referencedBy/hasChildren)`}),kfe=I({documents:F(z7),truncated:P().optional()}).loose(),Afe=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),jfe=I({docName:M().min(1),backlinks:F(Afe)}).loose(),Mfe=I({counts:no(M().min(1),N().int().nonnegative())}).loose();I({counts:no(M().min(1),N().int().nonnegative())}).loose();var Nfe=Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:z(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),Pfe=I({role:M().min(1),sourceForm:M().min(1),targetKind:M().min(1),href:M(),resolvedTarget:M().nullable(),status:M().min(1),reason:M().nullable(),resolutionMethod:M().min(1),fallbackTarget:M().nullable().default(null),range:I({start:N().int().nonnegative(),end:N().int().nonnegative()}),line:N().int().nonnegative(),column:N().int().nonnegative(),definition:I({label:M(),line:N().int().nonnegative()}).nullable().default(null)}).loose(),Ffe=I({docName:M().min(1),forwardLinks:F(Nfe),localTargets:F(Pfe).optional()}).loose(),Ife=Qa(`kind`,[I({id:M().min(1),kind:z(`doc`),docName:M().min(1),anchor:M().nullable(),label:M(),cluster:M().nullable(),category:M().nullable(),tags:F(M()).nullable(),managed:P().optional()}).loose(),I({id:M().min(1),kind:z(`external`),url:M().min(1),label:M()}).loose()]),Lfe=I({source:M().min(1),target:M().min(1)}).loose(),Rfe=I({nodes:F(Ife),links:F(Lfe)}).loose(),zfe=I({ts:N().int().min(0),url:M(),method:M(),ua:M().optional(),origin:M().optional(),referer:M().optional(),host:M().optional(),remote:M().optional(),secChUa:M().optional(),secChUaMobile:M().optional(),secChUaPlatform:M().optional(),secFetchSite:M().optional(),secFetchDest:M().optional(),secFetchMode:M().optional(),secFetchUser:M().optional()}).loose(),Bfe=I({app:Xa([z(`cursor`),z(`codex`),z(`claude`),Va()]),signals_fired:F(M())}).loose();I({entries:F(zfe),count:N().int().min(0),detection:Bfe}).loose();var B7=I({path:M().min(1),code:R([`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `]),origPath:M().min(1).optional(),syncScoped:P(),open:Qa(`kind`,[I({kind:z(`doc`),docName:M().min(1)}),I({kind:z(`asset`),path:M().min(1)})]).optional()}).loose();I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(B7),notStaged:F(B7),untracked:F(B7),incoming:F(B7),truncated:P(),readable:P().default(!0)}).loose(),I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:J2,...q2}).loose(),I({checkpointRef:M().min(1)}).loose();var Vfe=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose();I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:R([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(Vfe),checkpoint:Ua().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose();var Hfe=I({contentDir:M().min(1),pathSeparator:R([`/`,`\\`]),symlinkResolved:P()}).loose();F(Qa(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:z(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:z(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."});var Ufe=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose();I({url:M()}).loose();var Wfe=Qa(`ok`,[I({ok:z(!0),metadata:Ufe}).loose(),I({ok:z(!1),reason:M()}).loose()]),Gfe=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Kfe=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),qfe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose();I({deadLinks:F(I({target:M().min(1),sources:F(qfe)}).loose())}).loose(),I({target:I({docName:M().min(1),title:M(),aliases:F(M())}).loose(),mentions:F(I({source:M().min(1),excerpt:M(),offset:N().int().nonnegative()}).loose()),truncated:P()}).loose(),I({projectPath:M().min(1)}).loose();var Jfe=R([`not-a-git-worktree`,`init-failed`]);Qa(`ok`,[I({ok:z(!0),projectPath:M().min(1)}).loose(),I({ok:z(!1),reason:Jfe,message:M().min(1)}).loose()]),I({host:M().min(1).optional()}).loose(),I({host:M().min(1).optional(),token:M().min(1)}).loose(),I({host:M(),login:M()}).loose(),I({key:M().min(1)}).loose(),I({keyPresent:P()}).loose();var Yfe=R([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),Xfe=Qa(`ok`,[I({ok:z(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:z(!1),endpoint:M().min(1),model:M().min(1),reason:Yfe,status:N().int().optional()}).loose()]);I({name:M().refine(e=>e.trim().length>0,{message:`name must be non-empty`}),email:M().refine(e=>e.trim().length>0,{message:`email must be non-empty`})}).loose(),I({authenticated:P()}).loose(),I({channel:R([`login`,`gh-login`]).default(`login`)}).loose(),I({}).loose();var Zfe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),Qfe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(Zfe)}).loose(),$fe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),epe=I({sessionAlive:P(),agent:$fe.nullable(),files:F(Qfe)}).loose(),tpe=I({diff:M(),before:M(),after:M(),properties:M0,generatedAt:N().int().min(0)}).loose();I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose();var npe=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:R([`idle`,`writing`]),ts:N().int().min(0)}).loose();I({presence:no(M().min(1),npe)}).loose();var rpe=I({sessionId:M().min(1),agentType:M().min(1),ts:N().int().min(0),insertedChars:N().int().min(0),deletedChars:N().int().min(0)}).loose();I({effects:F(I({"doc.name":M().min(1),entries:F(rpe)}).loose())}).loose(),I({decisions:F(I({ts:N().int().min(0),decision:M().min(1),kind:M().min(1),"doc.name":M().min(1),pathRole:M().min(1)}).loose())}).loose(),no(M().min(1),P()).meta({description:`Flat boolean record keyed by agent-scheme name (claude / codex / cursor). True = installed.`}),I({path:M().min(1,`path must be non-empty`)}).loose(),I({}).loose();var ipe=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),ape=I({fromPath:M().min(1),toPath:M().min(1)}).loose();I({}).loose(),I({path:M().min(1),...q2,summary:J2}).loose();var V7=I({docName:M().min(1)}).loose();I({path:M().min(1),...q2,summary:J2}).loose();var ope=I({path:M().min(1)}).loose();I({kind:R([`file`,`folder`]),path:M().min(1),...q2,summary:J2}).loose();var spe=I({kind:R([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),cpe=I({pages:F(I({docName:M().min(1),title:M(),docExt:M().min(1),size:N().int().nonnegative(),modified:M().min(1),icon:M().min(1).max(2048).optional()}).loose())}).loose(),lpe=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),upe=I({docName:M().min(1),headings:F(lpe)}).loose(),dpe=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose();I({kind:R([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...q2,summary:J2}).loose();var fpe=I({renamed:F(ipe),renamedAssets:F(ape),rewrittenDocs:F(dpe).optional(),summary:a7.optional()}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...q2}).loose();var ppe=I({deletedDocNames:F(M().min(1))}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...q2,summary:J2}).loose();var mpe=I({deletedDocNames:F(M().min(1))}).loose();I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:J2,...q2}).loose(),I({restoredFrom:M().min(1),timestamp:M().min(1),summary:a7.optional(),warnings:l7.optional()}).loose();var hpe=/^#[0-9a-fA-F]{6}$/,gpe=I(Object.fromEntries(cm.map(e=>[e,M().regex(hpe,`must be a #rrggbb hex color`)]))),H7=M().min(1).refine(fm,{message:`must contain a non-whitespace character`}),U7=I({name:H7,author:H7.optional(),variant:R([`dark`,`light`]),palette:gpe}).loose(),_pe=I({name:M().min(1),scheme:U7,stem:M().min(1).optional(),extension:R([`.yaml`,`.yml`]).optional()}).loose(),vpe=I({id:M().min(1),filename:M().min(1)}).loose(),ype=I({id:M().min(1),scheme:U7}).loose(),bpe=I({id:M().min(1),filename:M().min(1)}).loose(),xpe=Qa(`existed`,[I({existed:z(!1)}).loose(),I({existed:z(!0),filename:M().min(1),scheme:U7}).loose()]),Spe=I({themes:F(Qa(`ok`,[I({ok:z(!0),id:M().min(1),filename:M().min(1),scheme:U7}),I({ok:z(!1),filename:M().min(1),id:M().min(1).optional(),code:M().min(1),conflictingFilenames:F(M().min(1)).min(2).optional()})])),truncated:P()}).loose(),Cpe=R([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),wpe=I({label:M().min(1),webUrl:ba().nullable()}).loose(),Tpe=Qa(`checkStatus`,[I({checkStatus:z(`allowed`)}).loose(),I({checkStatus:z(`denied`),deniedReason:R([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:z(`unknown`),unknownError:R([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),W7=R([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),Epe=R(ep),Dpe=R([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);I({state:Cpe,lastSyncUtc:M().nullable(),lastRunUtc:M().nullable().optional(),lastPullOkUtc:M().nullable().optional(),lastPushOkUtc:M().nullable().optional(),lastFetchUtc:M().nullable(),lastPushedSha:M().nullable(),ahead:N().int().min(0),behind:N().int().min(0),consecutiveFailures:N().int().min(0),consecutivePushFailures:N().int().min(0).optional(),conflictCount:N().int().min(0),hasRemote:P(),syncEnabled:P(),identityUnresolved:P(),remote:wpe.nullable().optional(),pushError:M().optional(),pushErrorCode:W7.optional(),pullError:M().optional(),pullErrorCode:W7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:Tpe.optional(),syncMode:Epe.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:Dpe.nullable().optional()}).loose(),I({action:R([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),I({action:R([`commit`])}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),I({op:R([`sync`,`push`,`pull`,`fetch`])}).loose(),I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflictKind:R([`git`,`stale-external-write`]).optional().catch(void 0),variant:z(`working-tree`).optional().catch(void 0),oursSha:M().optional(),theirsSha:M().optional(),baseSha:M().optional()}).loose())}).loose(),I({file:M().min(1),strategy:R([`mine`,`theirs`,`content`,`delete`]),content:M().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),I({}).loose(),I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:R([`both-modified`,`delete-modify`,`modify-delete`]),lifecycleStatus:M().nullable(),conflictKind:R([`git`,`stale-external-write`]).optional()}).loose(),I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({plan:jo(e=>e!==void 0,{message:`plan is required`})}).loose(),I({result:jo(e=>e!==void 0,{message:`result is required`})}).loose(),I({packId:M().min(1)}).strict(),I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict();var Ope=I({path:M().min(1),summary:M().min(1)}).loose(),kpe=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose();I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(Ope),entryCounts:kpe}).loose())}).loose(),I({noOpen:P().optional(),out:M().min(1).optional()}).loose();var Ape=I({reason:R([`unsupported-platform`,`spawn-error`]),message:M()}).loose();Qa(`status`,[I({status:z(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:z(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:Ape.optional()}).loose(),I({status:z(`failed`),buildError:M()}).loose(),I({status:z(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]);var G7=R(He),K7=R(Ue);function jpe(e){return e===`agents`||Ue.includes(e)}var Mpe=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),Npe=[`.md`,`.mdx`,`.txt`],Ppe=5e3,Fpe=4;function q7(e){return Math.round(e/Fpe)}function Ipe(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Npe.includes(e.slice(t).toLowerCase())}function Lpe(e){let t=q7((e.name??``).length+(e.description??``).length),n=q7(Hd(e.skillMd).body.length),r=e.files.some(e=>e.relPath===`overlay.yaml`),i=0;for(let t of e.files)t.content!==null&&t.relPath!==`SKILL.md`&&(r&&t.relPath.startsWith(`upstream/`)||Ipe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:q7(i)}}I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose();var Rpe=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose();I({name:M().min(1),docs:F(Rpe)}).loose(),I({folder:Ua(),frontmatter_local:no(M(),Ua()).nullable(),warnings:F(M()).optional().meta({description:"Non-fatal degradations of this response, one per entry; the field each affects is absent, null, or incomplete — the aligned `warningCodes` entry names which field and how."}),warningCodes:F(R([`symlink-refused`,`malformed-yaml`,`unverifiable`,`templates-symlink-refused`,`templates-unverifiable`])).optional().meta({description:"Machine-readable codes aligned 1:1 with `warnings`; switch on these, never on the English. `symlink-refused` / `malformed-yaml` / `unverifiable`: this folder's own `.ok/frontmatter.yml` (a symlink, malformed YAML, or an lstat failure) — `frontmatter_local` is null. `templates-symlink-refused` / `templates-unverifiable`: the `.ok/templates` directory on this folder, or a `.ok` or `.ok/templates` directory on an ancestor it inherits from — a symlink (wherever it points, dangling included), or a non-ENOTDIR `lstat` failure — `folder.templates_available` omits that directory's templates and may still list others. A non-directory `.ok` / `.ok/templates` (ENOTDIR) is treated as empty and yields no `templates-*` code. This folder's own symlinked `.ok` is a 400, never a warning."})}).loose(),I({path:M(),frontmatter:no(M(),Ua()).optional()}).loose(),I({applied:Ua()}).loose();var J7=no(M(),Ua()).meta({description:`Free-form frontmatter map embedded in template payloads.`});I({template:I({name:M().min(1),folder:M(),scope:R([`local`,`inherited`]),path:M().min(1),frontmatter:J7,body:M()}).strict()}).strict();var zpe=I({templates:F(I({name:M().min(1),title:M().optional(),description:M().optional(),path:M().min(1),source_folder:M()}).strict()),truncated:P()}).strict();I({folder:M(),name:M(),body:M().optional(),frontmatter:J7.optional(),...q2,summary:J2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...q2,summary:J2}).strict(),I({path:M().min(1),created:P(),warnings:F(M())}).strict(),I({existed:P(),path:M().min(1)}).strict(),I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:J7.optional(),...q2,summary:J2}).strict(),I({from:M().min(1),to:M().min(1),committed:P()}).strict();var Y7=R(of),Bpe=/^[a-z0-9-]+$/,Vpe=/^[A-Za-z0-9_-]+$/,X7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict();I({skill:I({name:M().min(1),scope:Y7,path:M().min(1),frontmatter:X7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict();var Hpe=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),Upe=I({name:M().min(1),description:M().optional(),scope:Y7,path:M().min(1),canonicalPath:M().min(1).optional(),filePaths:F(M()).optional(),absolutePath:M().min(1).optional(),installed:P(),hosts:F(M()),hostQualifier:M().optional().meta({description:"Set on a GLOBAL entry that shares its name with a distinct-content bundle in another host dir AND is not the by-name default: the host id whose root holds THIS bundle. Doc-name builders append it (`__skill__/global/<name>@<host>`) so each same-named bundle keeps its own tab and its own write-back path; the default bundle keeps the stable unqualified name."}),driftPaths:F(M()).optional().meta({description:`Recorded locations whose on-disk form (copy vs symlink) no longer matches what OK last wrote there — evidence another tool rewrote the path.`}),hostAliases:no(M(),M()).optional().meta({description:`Host skills roots that are symlink ALIASES of another location (host id → base-relative target root). An aliased folder is a derived view — no menu row, never a write target; the host's icon rides the target root's row.`}),conflictHosts:F(M()).optional().meta({description:`Hosts whose dir holds a DIFFERENT same-name skill (fork/conflict) — occupied, not this skill.`}),symlinkedHosts:F(M()).optional(),installableEditors:F(M()).optional(),hubOffered:P().optional().meta({description:"Whether the vendor-neutral `.agents/skills` hub is a live destination at this scope on THIS machine — server-computed via the same predicate that filters the Folders surface, so the install menu and Settings cannot disagree. True when the project already uses the hub OR a host that reads it is installed (`HUB_READER_EDITORS`)."}),linkMode:P().optional(),customPlacements:F(I({path:M(),mode:R([`copy`,`link`])}).strict()).optional(),plugin:I({name:M().min(1),marketplace:M().min(1),provider:M().min(1),url:M().optional()}).strict().optional(),managed:P().optional(),origin:Hpe.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:Mpe.optional()}).strict();I({name:M().min(1),scope:Y7,apply:P().optional()}).strict(),I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict();var Wpe=I({skills:F(Upe),truncated:P()}).strict();I({scope:Y7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:X7,...q2,summary:J2}).strict();var Z7=F(R([`skill-name-vendor-word`,`skill-body-too-long`])).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."});I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:Z7}).strict(),I({scope:Y7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...q2,summary:J2}).strict(),I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:Z7}).strict(),I({scope:Y7.default(`project`),name:M(),...q2,summary:J2}).strict(),I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict();var Q7=`This member also carries the one bookkeeping failure that does not undo the operation: the content change landed, but a state file this server keeps beside it refused to be rewritten because it could not be read, so the install or import records still describe the old state until an operator repairs that file. Absent when there is nothing to report; a server that predates this member omits it, so treat its absence as no warning rather than as an error.`;I({existed:P(),path:M().min(1),warnings:F(M()).optional().meta({description:`Present when this delete removed a directory a retention record ties to a recovery copy an earlier failed move kept, whose source was never verified unchanged — either because this server verified the deleted directory against the copy that record describes, or because it could not read the directory and so could not confirm either way. Each entry says which of the two it is; neither claims more than the check established. ${Q7}`})}).strict(),I({scope:Y7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:X7.optional(),...q2,summary:J2}).strict(),I({from:M().min(1),to:M().min(1),committed:P(),warnings:F(M()).optional().meta({description:`Present when the rename itself completed but something beside it did not. ${Q7}`})}).strict(),I({name:M(),toName:M().optional().meta({description:"Name for the skill at the destination scope; defaults to `name`. The SKILL.md `name` frontmatter is rewritten to match."}),fromScope:Y7,toScope:Y7,...q2,summary:J2}).strict();var Gpe=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function Kpe(e){return typeof e==`string`&&Gpe.includes(e)}var qpe=[`intact`,`lossy`,`unknown`];function Jpe(e){return typeof e==`string`&&qpe.includes(e)}var Ype=[`unreadable`,`occupant-unverifiable`];function Xpe(e){return typeof e==`string`&&Ype.includes(e)}var Zpe={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function $7(e){return Zpe[e]}function Qpe(e){let t=typeof e==`object`&&e?e:{},n=t.moveState,r=t.sourceState,i=t.retentionLedger;if(n===void 0&&r===void 0&&i===void 0)return{kind:`coherent`};let a=Kpe(n)?n:void 0,o=Jpe(r)?r:void 0,s=Xpe(i)?i:void 0,c={...a===void 0?{}:{moveState:a},...o===void 0?{}:{sourceState:o},...s===void 0?{}:{retentionLedger:s}};return n!==void 0&&a===void 0||r!==void 0&&o===void 0||i!==void 0&&s===void 0||a===void 0?{kind:`unverified`,...c}:($7(a)?o!==void 0&&s===void 0:a===`nothing-written`?o===void 0:o===void 0&&s===void 0)?{kind:`coherent`,...c}:{kind:`unverified`,...c}}var $pe=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function eme(e){if(e===void 0)return[];let t=$pe;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}I({scope:Y7,path:M().optional(),droppedLocations:F(M()).default([]).meta({description:"Locations the skill occupied at the source that were removed and not re-created at the destination: the `agents` hub and custom roots, which projection does not cover. Entries are install location ids, so they can be passed straight back as an install `add` list with `scope` set to the destination scope; custom roots resolve against that scope's base."}),warnings:F(M()).optional().meta({description:`Present when the move itself completed but something beside it did not. ${Q7}`})}).strict().meta({description:"Scope-move result. Rename paths deliberately do not emit authoring warnings, consistent with same-scope rename and duplicate. Content-authoring and import responses carry those warnings and their codes. The Skills Studio client parses `droppedLocations` off the wire but deliberately does not render it yet; how a human is told what was removed is an open product decision."}),I({scope:Y7,name:M(),toName:M(),...q2,summary:J2}).strict(),I({name:M().min(1)}).strict(),I({name:M(),home:M().min(1)}).strict(),I({docName:M().min(1)}).strict();var e9=R([`reference`,`script`,`file`]);I({scope:Y7.default(`project`),name:M(),path:M().min(1),content:M(),...q2,summary:J2}).strict(),I({path:M().min(1),created:P(),kind:e9,content:P()}).strict(),I({scope:Y7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...q2,summary:J2}).strict(),I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I({path:M().min(1),kind:e9,text:M()}).strict(),I({path:M().min(1),existed:P(),kind:e9}).strict();var t9=Xa([K7,z(`agents`)]),n9=M().min(1).refine(e=>!e.startsWith(`/`)&&!e.startsWith(`~`)&&!/^[A-Za-z]:/.test(e),{error:`a custom root is base-relative (e.g. ".tim/skills"), not absolute or ~-prefixed`}).refine(e=>e.split(`/`).every(e=>e!==``&&e!==`.`&&e!==`..`),{error:`a custom root may not contain "..", "." or empty path segments`}).refine(e=>e.includes(`/`),{error:`a custom root is a path (e.g. ".tim/skills") — bare editor names are host ids`}),r9=Xa([t9,n9]);I({scope:Y7.default(`project`),name:M(),targets:F(t9).optional().meta({description:'SET-EXACT install targets (editor ids, plus "agents" for the .agents hub — in-place skills only): the COMPLETE resulting host set. Omit to use project-configured editors; pass [] to uninstall everywhere. Stateless callers should prefer `add`/`remove`.'}),add:F(r9).optional().meta({description:`Locations to ADD the skill to (everything else untouched). Editor ids fan out a managed copy/symlink; a custom root path (".tim/skills") places the bundle there.`}),remove:F(r9).optional().meta({description:"Locations to REMOVE the skill from (lossless only — a hand-edited fork is refused, never deleted). The source cannot be removed; move it first with `source`."}),mode:R([`copy`,`link`]).optional().meta({description:`"link": one real folder (the source); every other location becomes a symlink to it. "copy": independent real folders, refreshed from the source until hand-edited (a hand-edit forks that copy). Converts existing locations losslessly. Omit to follow the form the skill already uses.`}),source:r9.optional().meta({description:`Move the skill's REAL folder to this location (the old source becomes a symlink to it — never a removal). Sticky across rescans.`}),linkMode:P().optional(),setSource:M().min(1).optional(),place:I({dir:M().min(1).meta({description:`Project-relative directory the bundle dir is created under (e.g. ".windsurf/skills").`}),mode:R([`copy`,`link`])}).strict().optional(),convert:I({target:r9.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:R([`copy`,`link`]).meta({description:`"link": replace this location with a symlink to the source. "copy": replace it with an independent real folder.`})}).strict().optional(),unplace:I({path:M().min(1).meta({description:`The recorded placement bundle path (e.g. ".windsurf/skills/my-skill").`})}).strict().optional(),...q2,summary:J2,fork:I({editor:M().min(1),action:R([`align`,`make-source`,`rename`]),toName:M().optional()}).strict().optional()}).strict().refine(e=>!(e.targets!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"`targets` is set-exact; `add`/`remove` are additive — use one style per call"}).refine(e=>e.fork===void 0||e.targets===void 0&&e.add===void 0&&e.remove===void 0&&e.source===void 0&&e.setSource===void 0,{error:"`fork` is its own operation — run it in a separate call"}).refine(e=>e.fork?.action!==`rename`||e.fork.toName!==void 0,{error:"`fork.rename` requires `toName`"}).refine(e=>!(e.source!==void 0&&(e.add!==void 0||e.remove!==void 0)),{error:"a `source` move is its own operation — run it in a separate call from `add`/`remove`"}).refine(e=>[e.targets!==void 0||e.add!==void 0||e.remove!==void 0,e.place!==void 0,e.unplace!==void 0,e.convert!==void 0,e.source!==void 0||e.setSource!==void 0,e.fork!==void 0].filter(Boolean).length<=1,{error:"one operation per call — membership (`targets`/`add`/`remove`), `place`, `unplace`, `convert`, `source`, and `fork` are mutually exclusive"}),I({name:M().min(1).meta({description:`Managed skill name installed or uninstalled.`}),hosts:F(M()).meta({description:`Editor ids the skill is projected into after the operation; [] is expected after uninstall.`}),scripts:P().meta({description:`True when the skill ships executable scripts, projected but never run.`}),warnings:F(M()).meta({description:`Non-fatal install/uninstall warnings from target projection.`}),warningCodes:F(R([`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`])).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),I({scope:Y7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),I({name:M().min(1).meta({description:`Managed skill name requested for uninstall.`}),uninstalled:P().meta({description:`True when an install marker existed and was removed; false for an idempotent no-op.`})}).strict();var tme=I({targets:F(G7),configured:P(),folders:F(I({scope:Y7,host:M(),root:M(),state:R([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:z(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),i9=I({action:z(`link`),scope:Y7,root:M().min(1).meta({description:`The folder to link (e.g. ".codex/skills").`}),target:M().min(1).meta({description:`The root it merges into (e.g. ".agents/skills"). Required.`})}),a9=I({action:z(`unlink`),scope:Y7,root:M().min(1).meta({description:`The linked folder to materialize back.`}),exclude:F(M().min(1)).optional().meta({description:`Skill names to LEAVE OUT when materializing — the folder keeps every other skill it currently sees (as per-skill links) and stops auto-following the target root.`})}).strict(),o9=I({action:z(`add-root`),scope:Y7,root:n9.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),nme=Qa(`action`,[i9.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),a9,o9]);Qa(`action`,[i9.strict(),a9,o9]),I({folderAction:nme}).strict();var s9=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict();I({targets:F(G7),reprojected:F(I({name:M(),hosts:F(M())}).strict()),bundleHosts:F(M()),removedFrom:F(M()),folder:I({moved:F(M()),dropped:F(M()),linked:F(M())}).strict().optional(),preview:s9.optional()}).strict(),I({scope:Y7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...q2,summary:J2}).strict(),I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),I({query:M().optional(),intent:R([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:R([`navigation`,`relevance`]).optional(),scopes:F(R([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:R([`omnibar`,`mcp`,`http`]).optional()}).loose();var rme=I({kind:R([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:no(M(),Ua()),snippet:M().optional()}).loose(),ime=I({capable:P(),applied:P(),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose();I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:R([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose(),I({query:M(),intent:R([`autocomplete`,`full_text`,`omnibar`]),results:F(rme),elapsedMs:N().nonnegative(),semantic:ime.optional(),truncated:P().optional(),ready:P().optional()}).loose();var ame=I({version:M().min(1),recordedAt:M().min(1)}).loose();I({currentVersion:M().min(1),targets:no(M(),ame.nullable())}).loose(),I({scope:Y7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL (https://www.skills.sh/<owner>/<repo>/<skill>, or https://www.skills.sh/site/<hostname>/<skill> for a website catalog), GitHub owner/repo[/subpath], git URL, or local/file path.`}),skill:M().min(1).optional().meta({description:`Specific skill name to import from a multi-skill source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection (the caller installs explicitly afterwards). Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (the Explore tab), so the install is reported to skills.sh and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...q2,summary:J2}).strict(),I({scope:Y7.default(`project`),source:M().min(1).meta({description:`External skill source: full skills.sh skill-page URL, GitHub owner/repo[/subpath], git URL, or local/file path.`}),skills:F(M().min(1)).min(1).max(100).meta({description:`Skill names to import from the source.`}),install:P().optional().meta({description:`Pass false to import WITHOUT the default-editor auto-projection. Default true.`}),marketplace:P().optional().meta({description:"The source came from a skills.sh listing the user chose (a marketplace plugin bundle), so the import is reported to skills.sh as one batched install event and counts toward that listing. Off by default: a hand-typed repo must not be announced to skills.sh. Honors the `telemetry.skillInstallReports.enabled` setting and DO_NOT_TRACK."}),...q2,summary:J2}).strict(),I({results:F(I({requested:M(),status:R([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:Z7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),I({scope:Y7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...q2,summary:J2}).strict(),I({results:F(I({requested:M(),status:R([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:Z7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose();var ome=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose();I({name:M().min(1).meta({description:`Managed skill name created or matched.`}),path:M().min(1).meta({description:`Store-relative path to the imported skill source.`}),created:P().meta({description:`True when this request created new source files.`}),alreadyImported:P().meta({description:`True when identical content was already present and no files changed.`}),collisionRenamedFrom:M().optional().meta({description:`Original source name when collision handling renamed the import.`}),provenance:ome,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:Z7}).loose();var sme=`server-info`,cme=`branch-switched`,lme=`disk-ack`,ume=`config-validation-rejected`,dme=`config-ignore-nested-error`,c9=R([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),fme=I({v:z(1),ch:z(sme),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),pme=I({v:z(1),ch:z(cme),seq:N(),branch:M().min(1)}).loose(),mme=I({v:z(1),ch:c9,seq:N()}).loose(),hme=I({v:z(1),ch:z(lme),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),gme=I({v:z(1),ch:z(ume),seq:N(),docName:M().min(1),error:Rne}).loose(),_me=I({v:z(1),ch:z(dme),seq:N(),path:M().min(1),error:M().min(1)}).loose(),vme=100,yme=500,bme=450,xme={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},l9=new WeakMap;function Sme(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function u9(e){return e.trim().toLowerCase()}var Cme=/\.(?:md|mdx)$/;function wme(e,t){if(t!==`page`)return e;let n=e.replace(Cme,``);return n.length>0?n:e}function d9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function Tme(e){let t=d9(e.path),n=e.title?.trim()||t,r=e.modifiedTs??0,i=e.path.split(`/`).filter(Boolean),a=new Set(i),o=[...new Set((e.aliases??[]).flatMap(e=>e.split(`/`).filter(Boolean)).filter(e=>!a.has(e)))];return{id:`${e.kind}:${e.path}`,kind:e.kind,path:e.path,title:n,name:t,pathSegments:[...i,...o].join(` `),content:e.content??``,modifiedTs:Number.isFinite(r)?r:0}}var f9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,p9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function Eme(){let e=lJ({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!p9||typeof e!=`string`||!f9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of p9.segment(e)){if(!n||!f9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function m9(e){let t=CJ({schema:xme,components:{tokenizer:Eme()}});return e.length>0&&PJ(t,e),t}function Dme(e){let t={documents:e};return l9.set(t,m9(e)),t}function Ome(e){let t=l9.get(e);if(t)return t;let n=m9(e.documents);return l9.set(e,n),n}function kme(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function h9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function Ame(e,t){let n=u9(t);if(!n)return 0;let r=wme(n,e.kind),i=u9(e.title),a=u9(e.name),o=u9(e.path),s=o.split(`/`);return i===r||a===r?700:o===r?650:i.startsWith(r)||a.startsWith(r)?600:s.some(e=>e.startsWith(r))?550:i.includes(r)||a.includes(r)?500:o.includes(r)?450:-1}var jme=.5;function g9(e,t){let n=Ame(e,t);return n<=0?n:U2(e.path)?n*jme:n}function Mme(e){return e===`file`?-60:0}var Nme=1e3,Pme=50,Fme=1,Ime=1;function Lme(e,t,n,r,i){let a=i>0?t/i:0,o=n/Pme,s=r===`file`?-.001:0,c=Fme*a+Ime*o+s;return e*Nme+c}function _9(e,t,n,r){return e+t*20+n+Mme(r)}function v9(e,t,n,r,i,a){return e===`relevance`?_9(t,n,r,i):Lme(t,n,r,i,a)}function Rme(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function y9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function zme(e){let t=e.map(e=>e.modifiedTs).filter(e=>Number.isFinite(e)&&e>0);if(t.length===0)return new Map;let n=1/0,r=-1/0;for(let e of t)e<n&&(n=e),e>r&&(r=e);let i=Math.max(1,r-n);return new Map(e.map(e=>[e.id,e.modifiedTs>0?(e.modifiedTs-n)/i*50:0]))}function Bme(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function Vme(e){return e===`full_text`?{title:8,name:7,path:5,pathSegments:4,content:1}:e===`autocomplete`?{title:10,name:9,path:5,pathSegments:4}:{title:8,name:7,path:5,pathSegments:4}}var Hme=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Ume(e,t){let n=u9(t);return n.length<4||Hme.test(n)?0:+(e===`full_text`)}function Wme(e){let{lexical:t,fullText:n}=e.signals;return t>=yme?`lexical`:t===bme&&n<=0?`pathOnly`:`body`}function Gme(e){let t=[],n=[],r=[];for(let i of e){let e=Wme(i);e===`lexical`?t.length<vme&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function b9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=Gme(e),i=[],a=0,o=0;for(let e of r){if(e.document.kind===`folder`){if(a>=3)continue;a+=1}else if(e.document.kind===`file`){if(o>=3)continue;o+=1}if(i.push(e),i.length>=n)break}return i}function Kme(e,t,n={}){let r=n.intent??`omnibar`,i=Rme(r,n.ranking),a=Sme(n.limit),o=new Set(n.scopes??kme(r)),s=e.documents.filter(e=>h9(e,o)),c=u9(t);if(!c)return s.slice().sort((e,t)=>e.path.localeCompare(t.path)).slice(0,a).map(e=>({document:e,score:0,signals:{lexical:0,fullText:0,recency:0}}));let l=uY(Ome(e),{term:c,properties:Bme(r),boost:Vme(r),tolerance:Ume(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>h9(e.document,o)).map(e=>[e.document.id,e.score])),d=zme(s),f=new Map;for(let e of s)g9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)h9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=y9(f.values(),u);return b9([...f.values()].map(t=>{let n=Math.max(0,g9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:v9(i,n,r,a,t.kind,e),signals:{lexical:n,fullText:r,recency:a}}}).sort((e,t)=>e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score),i,a)}return b9(qme({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function x9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function qme(e){let{scopedDocuments:t,candidates:n,fullTextScores:r,recency:i,normalizedQuery:a,ranking:o,semantic:s}=e,c=s.rrfK??60,l=s.candidateLimit??64,u=s.similarityFloor??0,d=s.scores,f=new Map(t.map(e=>[e.id,e])),p=[...d.entries()].filter(([e,t])=>t>=u&&f.has(e)).sort((e,t)=>t[1]-e[1]||e[0].localeCompare(t[0])).slice(0,l);for(let[e]of p)if(!n.has(e)){let t=f.get(e);t&&n.set(e,t)}let m=y9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,g9(e,a)),n=r.get(e.id)??0,s=i.get(e.id)??0,c=d.get(e.id),l=c!==void 0&&c>=u;return{document:e,score:t>0?v9(o,t,n,s,e.kind,m):_9(t,n,s,e.kind),signals:l?{lexical:t,fullText:n,recency:s,vector:c}:{lexical:t,fullText:n,recency:s},lexical:t,fullText:n,recency:s,cosine:c}}),g=x9(h.filter(e=>e.fullText>0).sort((e,t)=>t.fullText-e.fullText||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),_=x9(h.filter(e=>e.cosine!==void 0&&e.cosine>=u).sort((e,t)=>t.cosine-e.cosine||e.document.path.localeCompare(t.document.path)).map(e=>e.document.id)),v=e=>{let t=0,n=g.get(e);n!==void 0&&(t+=1/(c+n));let r=_.get(e);return r!==void 0&&(t+=1/(c+r)),t};return h.sort((e,t)=>{let n=+(e.lexical>0),r=+(t.lexical>0);if(n!==r)return r-n;if(n===1)return e.score===t.score?e.document.path.localeCompare(t.document.path):t.score-e.score;let i=v(e.document.id),a=v(t.document.id);return i===a?e.recency===t.recency?e.document.path.localeCompare(t.document.path):t.recency-e.recency:a-i}).map(({document:e,score:t,signals:n})=>({document:e,score:t,signals:n}))}function Jme(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}function Yme(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function Xme(e,t){return!e||e.length===0?`true`:t.detached?`detached`:t.currentBranch===null||t.currentBranch===e?`true`:`false`}var S9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),C9=globalThis;C9[S9]===void 0&&(C9[S9]=pr());var w9=C9[S9],T9=L({version:M().regex(/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(w9,{description:`Recorded skill version for this target.`}),recordedAt:Ui().register(w9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:R([`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`]).register(w9,{description:`Install-source surface that recorded this entry.`}).optional()}),Zme=L({enabled:P().register(w9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Ui().register(w9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})});L({schema:z(1).register(w9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:L({"claude-cowork":T9.optional(),"cli-hosts":T9.optional()}).register(w9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:no(M(),Zme).register(w9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(w9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});var E9=`bottom`,D9=e=>e*8+4,O9=D9(92),k9=D9(40);function Qme(e){return e===`right`||e===`bottom`?e:E9}function $me(e){return typeof e!=`number`||!Number.isFinite(e)?O9:Math.max(k9,Math.round(e))}var ehe=new Set([`(connected)`,`(agent thread)`]);function the(e){return e!=null&&ehe.has(e)}var nhe=6e5,A9=class extends Error{chunksCompleted;totalChunks;bytesWritten;bytesRemaining;cause;constructor(e,t){let n=e instanceof Error?e.message:typeof e==`string`?e:`unknown error`;super(`chunked insert failed after ${t.chunksCompleted}/${t.totalChunks} chunks (${t.bytesWritten} bytes written, ${t.bytesRemaining} bytes lost): ${n}`),this.name=`ChunkedInsertError`,this.chunksCompleted=t.chunksCompleted,this.totalChunks=t.totalChunks,this.bytesWritten=t.bytesWritten,this.bytesRemaining=t.bytesRemaining,this.cause=e}};async function rhe(e,t,n,r,i={}){let a=i.thresholdBytes??512e3,o=i.chunkSizeBytes??51200,s=i.origin,c=i.yieldFn??ihe,l=i.resolveOffset??(e=>e);if(r.length<=a){e.transact(()=>{t.insert(n,r)},s);return}let u=Math.ceil(r.length/o),d=0,f=n,p=0,m=0;for(;d<r.length;){let n=Math.min(d+o,r.length),i=r.slice(d,n);try{let n=l(f);e.transact(()=>{t.insert(n,i)},s)}catch(e){throw new A9(e,{chunksCompleted:p,totalChunks:u,bytesWritten:m,bytesRemaining:r.length-d})}p++,m+=i.length,f+=i.length,d=n,d<r.length&&await c()}}function ihe(){return new Promise(e=>{let t=globalThis;t.document?.hidden!==!0&&typeof t.requestAnimationFrame==`function`?t.requestAnimationFrame(()=>e()):setTimeout(()=>e(),0)})}function ahe(e){let t;try{t=new URL(e)}catch{return null}let n=t.pathname.match(/^\/video\/(\d+)/);if(n)return n[1]??null;let r=t.pathname.match(/^\/(\d+)/);return r?r[1]??null:null}function ohe(e){if(typeof e!=`string`||e.length===0)return e;let t=F3(e);if(t){let e=t.noCookie?`www.youtube-nocookie.com`:`www.youtube.com`,n=t.startSeconds===null?``:`?start=${t.startSeconds}`;return`https://${e}/embed/${t.id}${n}`}if(N3(e)){let t=ahe(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=j3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var she=`https://api.github.com/repos/inkeep/open-knowledge`;async function che(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(she,{headers:{accept:`application/vnd.github+json`,"user-agent":`openknowledge.ai`},...n,signal:r});if(!e.ok)return console.warn(`[github-stars] GitHub API responded ${e.status}`),null;let t=await e.json();return typeof t.stargazers_count==`number`?t.stargazers_count:null}catch(e){return console.warn(`[github-stars] fetch failed: ${e instanceof Error?e.message:String(e)}`),null}}var lhe=/^(#{1,6})\s+(.+)$/;function uhe(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(lhe);if(!n)return null;let r=n[2].trim(),i=S7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var dhe=Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));function j9(){let e=globalThis.crypto;if(e&&typeof e.randomUUID==`function`)return e.randomUUID();let t=new Uint8Array(16);if(e&&typeof e.getRandomValues==`function`)e.getRandomValues(t);else for(let e=0;e<16;e++)t[e]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=dhe;return`${n[t[0]]}${n[t[1]]}${n[t[2]]}${n[t[3]]}-${n[t[4]]}${n[t[5]]}-${n[t[6]]}${n[t[7]]}-${n[t[8]]}${n[t[9]]}-${n[t[10]]}${n[t[11]]}${n[t[12]]}${n[t[13]]}${n[t[14]]}${n[t[15]]}`}var fhe={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},phe=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],mhe={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},hhe={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},M9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function ghe(e,t=phe){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function _he(e){let t=e.trim();if(!t)return`?`;let n=t.split(/[-\s]+/).filter(Boolean);if(!n.length)return`?`;if(n.length>=2)return n.slice(0,2).map(e=>e[0]??``).join(``).toUpperCase();let r=n[0],i=[r[0]];for(let e=1;e<r.length&&i.length<2;e++){let t=r[e-1],n=r[e];t===t.toLowerCase()&&n===n.toUpperCase()&&n!==n.toLowerCase()&&i.push(n)}return i.length>=2?i.join(``).toUpperCase():r.slice(0,2).toUpperCase()}function vhe(e){let t=e.trim();if(!t)return e;if(t.includes(` `)||!/[-_]/.test(t))return t;let n=t.split(/[-_]+/).filter(Boolean);return n.length?n.map(e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()).join(` `):t}var yhe={"claude-code":`claude`,"claude-ai":`claude`,cursor:`cursor`,"cursor-vscode":`cursor`,cascade:`windsurf`,codex:`openai`,"codex-mcp-client":`openai`,copilot:`github`,cline:`cline`,"claude-acp":`claude`,"codex-acp":`openai`,"github-copilot-cli":`github`};function bhe(e){return e?yhe[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function xhe(e){let t=parseInt(e.slice(1,3),16)/255,n=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,i=Math.max(t,n,r),a=Math.min(t,n,r),o=(i+a)/2;if(i===a)return[0,0,o*100];let s=i-a,c=o>.5?s/(2-i-a):s/(i+a),l;return l=i===t?((n-r)/s+(n<r?6:0))/6:i===n?((r-t)/s+2)/6:((t-n)/s+4)/6,[l*360,c*100,o*100]}function She(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(Math.min(n-3,9-n,1),-1);return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Che(e){let[t]=xhe(e);return She(t,45,32)}var whe=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],The=[`Bird`,`Cat`,`Dog`,`Fish`,`Mouse`,`Rabbit`,`Shrimp`,`Snail`,`Squirrel`,`Turtle`],N9=`ok-user-name-v3`,P9=`ok-user-color-v3`;function F9(e){return e[Math.floor(Math.random()*e.length)]}function Ehe(){return`${F9(whe)} ${F9(The)}`}function Dhe(){return F9(M9)}function I9(e){try{return localStorage.getItem(e)}catch{return null}}function L9(e,t){try{localStorage.setItem(e,t)}catch{}}function Ohe(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=j9(),n=I9(N9),r=I9(P9);return n||(n=Ehe(),L9(N9,n)),r||(r=Dhe(),L9(P9,r)),{name:n,color:r,coeditor:e,tabId:t}}function R9(e){if(!e.includes(`%`))return e;let t;try{t=decodeURIComponent(e)}catch{return e}return t===`.`||t===`..`||t.includes(`/`)||t.includes(`\\`)||t.includes(`\0`)?e:t}function khe(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function Ahe(e){return e.split(`/`).map(khe).join(`/`)}function jhe(e){return e.split(`/`).map(R9).join(`/`)}function Mhe(e,t){let n=e.trim();if(!n||/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(n)||n.startsWith(`//`)||n.startsWith(`#`))return null;let r=n.indexOf(`#`),i=r>=0?n.slice(0,r):n,a=r>=0?n.slice(r+1):null,o=(i.split(`?`)[0]??``).trim();if(!o)return null;let s=R9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!z$.includes(e))return null}let c=o.startsWith(`/`),l=c?o.slice(1):o,u=c?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[],d=l.split(`/`),f=d.length-1;for(let e=0;e<d.length;e++){let t=R9(d[e]??``);if(e===f&&(t=ff(t)),t===`..`){if(u.length===0)return null;u.pop()}else t!==`.`&&t!==``&&u.push(t)}return u.length===0?null:{docName:u.join(`/`),anchor:a||null}}function Nhe(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}var z9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function B9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function V9(e){return e.split(`/`).filter(Boolean)}function H9(e){let t=e.trim();return z9.test(t)||t.startsWith(`//`)}function Phe(e,t){let n=e.trim();if(!n)return null;if(n.startsWith(`#`)){let e=n.slice(1).trim();return e?{kind:`anchor`,anchor:e}:null}if(H9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=jhe(r<0?n:n.slice(0,r)),a=_f(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=gf(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=Mhe(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=B9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function Fhe(e,t){let n=e.trim();if(!n)return null;if(H9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=B9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function Ihe(e,t,n){let r=e.trim();if(!r||z9.test(r)||r.startsWith(`//`)||r.startsWith(`#`))return null;let i=r.indexOf(`#`),a=((i>=0?r.slice(0,i):r).split(`?`)[0]??``).trim();if(!a)return null;let o=a.startsWith(`/`),s=o?a.slice(1):a,c=o?[]:t.includes(`/`)?t.split(`/`).slice(0,-1):[];for(let e of s.split(`/`))if(e===`..`){if(c.length===0)return null;c.pop()}else e!==`.`&&e!==``&&c.push(n.literal?e:R9(e));return c.length===0?null:c.join(`/`)}function Lhe(e,t,n=null,r=`.md`){let i=V9(e);i.pop();let a=V9(t),o=0;for(;o<i.length&&o<a.length&&i[o]===a[o];)o+=1;let s=i.slice(o).map(()=>`..`),c=a.slice(o),l=[...s,...c].join(`/`);return l||=a.at(-1)??t,!l.startsWith(`./`)&&!l.startsWith(`../`)&&(l=`./${l}`),`${Ahe(l)}${r}${n?`#${n}`:``}`}function Rhe(e){if(!e)return{height:null,viewerFragment:``};let t=e.split(`&`).filter(e=>e.length>0),n=null,r=[];for(let e of t){let t=e.indexOf(`=`);if(t===-1){r.push(e);continue}let i=e.slice(0,t),a=e.slice(t+1);if(i===`height`){let e=Number.parseInt(a,10);!Number.isNaN(e)&&e>0&&(n=e);continue}r.push(e)}return{height:n,viewerFragment:r.join(`&`)}}var zhe=`unknown`;function Bhe(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return zhe;let r=Math.floor(Math.max(0,t-n)/1e3);if(r<60)return`${r}s ago`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);return a<24?`${a}h ago`:`${Math.floor(a/24)}d ago`}function Vhe(e){return e.replace(/[/\\:*?"<>|\0]/g,`-`).replace(/\s+/g,` `).replace(/-+/g,`-`).trim().replace(/^[-.\s]+|[-.\s]+$/g,``)}function U9(e){return`pagesBySlug`in e}function W9(e){return U9(e)?e.pages:e}function G9(e,t){return U9(e)?e.assetPaths??new Set:t??new Set}function K9(e,t){return U9(e)?e.filePaths??new Set:t??new Set}function q9(e,t){return e<t?-1:+(e>t)}function Hhe(e,t){let n=new Map;for(let r of e){let e=t(r);e&&!n.has(e)&&n.set(e,r)}return n}function Uhe(e,t){let n=new Map,r=[...e].sort(q9);for(let e of r){let r=e.lastIndexOf(`/`),i=t(r===-1?e:e.slice(r+1));i&&!n.has(i)&&n.set(i,e)}return n}function J9(e,t){let n=x7(e);if(n){if(U9(t))return t.pagesBySlug.get(n);for(let e of t)if(x7(e)===n)return e}}function Y9(e,t){if(e.includes(`/`))return;let n=x7(e);if(!n)return;if(U9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);x7(t===-1?e:e.slice(t+1))===n&&(r===void 0||q9(e,r)<0)&&(r=e)}return r}function X9(e){let t=e.trim();if(!t)return[];let n=x7(t);return n.length>0&&n!==t?[n]:[]}function Z9(e,t){let n=e.trim();if(!n)return;let r=W9(t);if(r.has(n))return n;let i=J9(n,t);if(i)return i;for(let e of X9(n))if(r.has(e))return e;return Q9(n,r)||Y9(n,t)}function Q9(e,t){let n=`${e}/index`;if(t.has(n))return n;let r=e.lastIndexOf(`/`),i=r===-1?e:e.slice(r+1),a=i?`${e}/${i}`:null;if(a&&t.has(a))return a}function Whe(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function $9(e,t,n){let r=Whe(e);if(!r)return null;let i=r.toLowerCase(),a=n?[t,n]:[t];for(let e of a){if(e.has(r))return r;for(let t of e)if(t.toLowerCase()===i)return t}if(r.includes(`/`))return null;let o=[];for(let e of a)for(let t of e){let e=t.lastIndexOf(`/`);(e===-1?t:t.slice(e+1)).toLowerCase()===i&&o.push(t)}return o.length===0?null:o.sort(q9)[0]??null}function Ghe(e,t,n,r){let i=e.trim();if(!i)return!1;if($9(i,G9(t,n),K9(t,r)))return!0;let a=W9(t);return a.has(i)||X9(i).some(e=>a.has(e))||J9(i,t)!==void 0||Q9(i,a)?!0:Y9(i,t)!==void 0}function Khe(e,t,n){let r=Fhe(e,t);return r===null||r.kind!==`asset`||$9(r.url,G9(n),K9(n))!==null||Z9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}export{I4 as $,J as $a,E0 as $i,J0 as $n,im as $o,U2 as $r,Hd as $s,K7 as $t,V$ as A,jw as Aa,M as Ac,L4 as Ai,Lhe as An,Tne as Ao,X9 as Ar,Dd as As,N4 as At,D0 as B,TT as Ba,x4 as Bi,TQ as Bn,Om as Bo,Moe as Br,sf as Bs,vpe as Bt,t1 as C,ME as Ca,R as Cc,p5 as Ci,D$ as Cn,Mp as Co,lue as Cr,Qd as Cs,upe as Ct,V7 as D,tD as Da,ga as Dc,$me as Di,z0 as Dn,Bm as Do,che as Dr,of as Ds,h4 as Dt,ope as E,wT as Ea,P as Ec,Qme as Ei,NY as En,Vm as Eo,Bhe as Er,Vd as Es,p4 as Et,kfe as F,dT as Fa,Ke as Fc,_4 as Fi,Phe as Fn,Wm as Fo,Loe as Fr,cf as Fs,x1 as Ft,Kfe as G,DT as Ga,ohe as Gi,$0 as Gn,Dne as Go,Poe as Gr,Ef as Gs,f4 as Gt,kde as H,uw as Ha,Khe as Hi,F5 as Hn,Np as Ho,joe as Hr,df as Hs,ype as Ht,Ofe as I,qw as Ia,Be as Ic,SX as Ii,_Q as In,Um as Io,Roe as Ir,zd as Is,Bpe as It,g1 as J,pC as Ja,M4 as Ji,Q0 as Jn,Nm as Jo,E1 as Jr,kf as Js,n4 as Jt,Mce as K,QE as Ka,Vhe as Ki,X0 as Kn,hp as Ko,Qpe as Kr,yf as Ks,Q2 as Kt,spe as L,nT as La,Ve as Lc,xX as Li,vQ as Ln,$p as Lo,koe as Lr,Pd as Ls,fhe as Lt,wfe as M,Nw as Ma,oee as Mc,F3 as Mi,rhe as Mn,Op as Mo,F$ as Mr,Zd as Ms,K1 as Mt,c9 as N,Pw as Na,Nt as Nc,Jme as Ni,fQ as Nn,wp as No,toe as Nr,Kf as Ns,fpe as Nt,mde as O,nD as Oa,z as Oc,j3 as Oi,Uhe as On,jp as Oo,S7 as Or,Nf as Os,Cfe as Ot,z7 as P,uT as Pa,ze as Pc,j9 as Pi,Xme as Pn,Gm as Po,bhe as Pr,lf as Ps,y1 as Pt,i7 as Q,j_ as Qa,gde as Qi,Y0 as Qn,Yp as Qo,Ide as Qr,Xf as Qs,tme as Qt,N$ as R,iT as Ra,We as Rc,CY as Ri,c1 as Rn,Qp as Ro,Aoe as Rr,uf as Rs,xpe as Rt,A9 as S,nie as Sa,Ko as Sc,EZ as Si,tZ as Sn,Jm as So,Rde as Sr,tf as Ss,Z$ as St,Efe as T,eE as Ta,F as Tc,T8 as Ti,L0 as Tn,Hm as To,vhe as Tr,$d as Ts,Tfe as Tt,M9 as U,VC as Ua,Z9 as Ui,T2 as Un,mm as Uo,Ooe as Ur,xf as Us,bpe as Ut,Ffe as V,VE as Va,$9 as Vi,EQ as Vn,Tp as Vo,Foe as Vr,If as Vs,U7 as Vt,E3 as W,Kw as Wa,h$ as Wi,e2 as Wn,bm as Wo,Noe as Wr,Af as Ws,Spe as Wt,v1 as X,bS as Xa,z4 as Xi,C2 as Xn,pm as Xo,H$ as Xr,wf as Xs,s9 as Xt,_1 as Y,_S as Ya,Kme as Yi,L2 as Yn,Bne as Yo,k4 as Yr,mf as Ys,o4 as Yt,B$ as Z,eC as Za,_de as Zi,Z0 as Zn,yp as Zo,H9 as Zr,Sf as Zs,G7 as Zt,L$ as _,Ik as _a,Tte as _c,ufe as _i,Nhe as _n,kp as _o,B9 as _r,_ne as _s,Y$ as _t,vfe as a,Tde as aa,Ds as ac,H2 as ai,mpe as an,Og as ao,M8 as ar,Cm as as,Xfe as at,bQ as b,Vk as ba,hte as bc,s1 as bi,UY as bn,cm as bo,s$ as br,jf as bs,O9 as bt,w4 as c,B4 as ca,Lo as cc,S1 as ci,nhe as cn,Ng as co,Tme as cr,xm as cs,E4 as ct,pme as d,d9 as da,Go as dc,Iae as di,jde as dn,a_ as do,P0 as dr,bne as ds,G1 as dt,uQ as ea,ff as ec,M3 as ei,Wpe as en,G_ as eo,hX as er,lh as es,O1 as et,_me as f,vj as fa,Yte as fc,N3 as fi,S0 as fn,lg as fo,Vde as fr,fp as fs,Nue as ft,fme as g,qA as ga,Dte as gc,pfe as gi,I2 as gn,bp as go,C0 as gr,yne as gs,Ppe as gt,hme as h,fj as ha,Ete as hc,dQ as hi,OZ as hn,G as ho,P$ as hr,cp as hs,q0 as ht,tpe as i,h1 as ia,qte as ic,the as ii,zpe as in,q as io,Hde as ir,Zp as is,Pde as it,ppe as j,BE as ja,aee as jc,b0 as ji,Yme as jn,vp as jo,x0 as jr,Pf as js,zde as jt,E9 as k,$E as ka,I as kc,Rhe as ki,Hhe as kn,om as ko,Ohe as kr,Mf as ks,P4 as kt,Mfe as l,C7 as la,Ro as lc,jpe as li,g4 as ln,Mg as lo,Che as lr,hne as ls,k9 as lt,mme as m,pj as ma,ene as mc,y4 as mi,Hfe as mn,Ih as mo,yQ as mr,Zm as ms,K0 as mt,hhe as n,fue as na,Wd as nc,J5 as ni,U$ as nn,K as no,m$ as nr,qp as ns,Wfe as nt,D4 as o,x7 as oa,Xte as oc,C1 as oi,e1 as on,Cg as oo,$3 as or,sp as os,J$ as ot,gme as p,uj as pa,Qte as pc,Ude as pi,T0 as pn,W as po,Lpe as pr,vne as ps,q5 as pt,m1 as q,FE as qa,uhe as qi,R2 as qn,pne as qo,yY as qr,Yf as qs,r4 as qt,epe as r,sQ as ra,Kte as rc,q$ as ri,p0 as rn,E_ as ro,p$ as rr,ap as rs,Dde as rt,O4 as s,R4 as sa,Ns as sc,Ghe as si,$$ as sn,kg as so,Dme as sr,qm as ss,_7 as st,mhe as t,F0 as ta,Of as tc,yde as ti,Vpe as tn,J_ as to,_he as tr,Xp as ts,Rfe as tt,jfe as u,G0 as ua,Wo as uc,$7 as ui,Mde as un,w_ as uo,G$ as ur,wm as us,nue as ut,I$ as v,Tk as va,Os as vc,noe as vi,Fue as vn,Dp as vo,j0 as vr,Zf as vs,K$ as vt,F7 as w,_E as wa,Po as wc,y0 as wi,I0 as wn,zm as wo,E5 as wr,ef as ws,cpe as wt,R$ as x,Ok as xa,zo as xc,eme as xi,x$ as xn,lm as xo,l1 as xr,nf as xs,X$ as xt,hQ as y,Bk as ya,Bte as yc,O$ as yi,Pue as yn,tm as yo,oX as yr,$f as ys,Gfe as yt,O0 as z,aT as za,Je as zc,Ihe as zi,ghe as zn,up as zo,Ioe as zr,Rd as zs,_pe as zt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Ds as e}from"./dist-75Tp0j2s.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(b)||e.startsWith(w)||e.startsWith(T)||e.startsWith(D)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=x(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(b)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}var i=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function a(e){return encodeURIComponent(e.replace(i,`�`))}function o(e){return e.split(`/`).map(a).join(`/`)}function s(e,t){let n=`#/${o(e)}`;return t?`${n}#${a(t)}`:n}function c(e,t){return e===t||l(e)===l(t)}function l(e){try{return decodeURIComponent(e)}catch{return e}}var u=`__okHashHistoryEntry`;function d(e){return{...typeof e==`object`&&e?e:{},[u]:!0}}function f(e){return typeof e==`object`&&!!e&&e[u]===!0}function p(){f(window.history.state)||window.history.replaceState(d(window.history.state),``)}function m(e){let{pathname:t,search:n}=window.location;window.history.replaceState(d(window.history.state),``,`${t}${n}${e}`)}function h(e){if(c(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(d(window.history.state),``,`${t}${n}${e}`)}function g(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function _(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${o(n)}/`:`#/`;return t?`${r}#${a(t)}`:r}function v(e,t,n){if(e===`folder`)return _(t);let r=`#/${a(t)}`;return n==null||n===``?r:`${r}?branch=${a(n)}`}function y(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var b=`#/__asset__/`;function x(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function S(e){if(!e.startsWith(b))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function C(e){return`${b}${o(e)}`}var w=`#/__skill-file__/`,T=`#/__skills__`;function E(e){return e===T||e.startsWith(`${T}/`)}var D=`#/__skill-preview__/`,O=[`explore`,`detected`,`builtin`,`foreign`,`linked`];function k(e){return e!==void 0&&O.includes(e)}var A=`project`;function j(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??A].map(a).join(`/`)}function M(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!k(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function N(e){let t=j(e);return e.path&&(t+=`/${a(e.path)}`),`${D}${t}`}function P(e){return e.startsWith(D)?M(e.slice(20)):null}var F=`:`;function I(e){let t=e.host===void 0?e.name:`${e.name}${F}${e.host}`;return`${w}${[e.scope,t].map(a).join(`/`)}/${o(e.path)}`}function L(e){if(!e.startsWith(w))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(F),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}export{h as _,v as a,P as b,C as c,I as d,N as f,p as g,c as h,n as i,s as l,f as m,S as n,j as o,y as p,M as r,g as s,r as t,_ as u,m as v,E as x,L as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{p as e}from"./config-provider-CL2LHJwy.js";var t=new WeakMap;function n(n,r){let i=t.get(r);if(i)return i;let a=new e(r);t.set(r,a);let o=r.doc,s=!1,c=()=>{s||(s=!0,n.off(`destroy`,c),o?.off(`destroy`,c),t.get(r)===a&&t.delete(r),a.clear(),a.destroy())};return n.on(`destroy`,c),o?.on(`destroy`,c),a}export{n as t};
|