@inkeep/open-knowledge 0.73.0-beta.10 → 0.73.0-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -6
- package/dist/constants-BVS0-9Fp.mjs +1 -0
- package/dist/{dist-C1kuxxvk.mjs → dist-DeJ8VxVy.mjs} +1 -1
- package/dist/dist-vRgduEwP.mjs +2104 -0
- package/dist/index.mjs +3 -3
- package/dist/{init-CWe5GGdt.mjs → init-BsvUy5hk.mjs} +2 -2
- package/dist/init-CWsV3oYX.mjs +1 -0
- package/dist/{launch-json-removal-C7loIkSK.mjs → launch-json-removal-BVRO8J0x.mjs} +1 -1
- package/dist/{loader-B-SUoghc.mjs → loader-BcDN2j8r.mjs} +1 -1
- package/dist/loader-KHp71PYp.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-DKOa5ntU.mjs → md-manager-BGnqyqi1-DrmFlrZd.mjs} +3 -3
- package/dist/{open-browser-Clr1xP0a.mjs → open-browser-C6sz1oaO.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-iaP7YSUj.mjs → preview-2E2oOz3t.mjs} +1 -1
- package/dist/preview-KXeUXFPc.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DzXxHpUn.js → ActivityModeContent-BXiVzdBA.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-DGnMHNXu.js → AddPropertiesButton-j8bNaGRg.js} +2 -2
- package/dist/public/assets/{AgentDiffPane-B_ZeA7-1.js → AgentDiffPane-D4dSQQjO.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-DRhRj-vM.js → AgentIconCluster-COtCC20-.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-B3NWvdCz.js → AgentThreadClientBinder-BghBCku3.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DsY_EPU_.js → BugReportHistory-no_Ung7b.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-DFKOX0fz.js → BugReportHistoryDialog-BTdzt1W5.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-D1Z4DFQU.js → CodeMirrorPropInput-7o8GVHa3.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-Bx13WhrI.js → ConsentDialogBody-tQYq8Gnt.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-BPV7RPEE.js → DiffViewBoundary-DSI1MLnH.js} +1 -1
- package/dist/public/assets/{DocumentContext-Dt_-DI02.js → DocumentContext-CG1Jry1O.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-Crki6E-o.js → EditorModeToggle-C_wenMzY.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CrDtezmO.js → EnableSyncConfirmDialog-BdGgzO8v.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-DVGS3p0c.js → ExcalidrawDocEditor-C941fJnt.js} +1 -1
- package/dist/public/assets/FeedbackForm-CtscqTMh.js +1 -0
- package/dist/public/assets/{GraphPanel-BhmcgwDS.js → GraphPanel-wDGH7qYI.js} +1 -1
- package/dist/public/assets/{ImageAttachments-BNGFouyx.js → ImageAttachments-7U8zH6gM.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BsyCN5q9.js → ImportSkillDialog-xqMDUfoS.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-C4wSG9Qr.js → LintConfigEditor-rHeyKPvB.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BeDijb6u.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-ei6zoy-O.js → ManagedArtifactProperties-aIQAXWri.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-D9rKYvRz.js → MermaidDocEditor-ChCStcXi.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuItem-BvdJFwzn.js → OpenInAgentMenuItem-3hmDMsqb.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-CS-PorQr.js → PropertyDisplayRow-EEAwTGz2.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-DyiRlP02.js → RegisteredAgentIcon-jQpWCIUq.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BtDhh6ob.js → ReportBugDialogBody-CHcn_e1r.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-BGDXD9vy.js → ReportBugMenuTrigger-C-YoNR5Z.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-CBdeVoch.js → SchemaConfigEditor-Bggsv0mO.js} +1 -1
- package/dist/public/assets/{SessionsHost-BrTi3H1Q.js → SessionsHost-CEMbRvdy.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CieBac-g.js → SettingsDialogBody-DqrJvD_6.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-CUOyS1w1.js → ShareBranchSwitchDialog-Cwaf6TsX.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-C9eiWF1o.js → ShareReceiveDialog-DR0zIZxL.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-Bx_jHTgG.js → ShareReceiveMissDialog-TP2nJGHX.js} +1 -1
- package/dist/public/assets/{SkillCostValue-DmP1tuVA.js → SkillCostValue-BhPu5Vz4.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-BeeYRaGl.js → SkillEditBanner-BGbY8NEB.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-72KacMVD.js → SkillForkDialog-D8N3xUWY.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-Dsyql91l.js → SkillInstallMenu-BXKHGDwu.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-Bc8suQdC.js → SkillOriginInline-DSLEJk5r.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-BdkmliRv.js → SkillToolbarControls-BVT7xQE7.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-CBUdpFGp.js → SlidesToolbarControls-MxsD6KlX.js} +1 -1
- package/dist/public/assets/{SourceEditor-_5hIppJ7.js → SourceEditor-DxHKBWLo.js} +1 -1
- package/dist/public/assets/{TerminalPanel-9O0SWC8s.js → TerminalPanel-BYhxPb-j.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-D3E8qOTR.js → TerminalWindowApp-CUFGDgHA.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Y_g-z818.js → TextDocEditor-BVZaAvpP.js} +1 -1
- package/dist/public/assets/{ThreadView-CMBgQren.js → ThreadView-B9h6WIFc.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-GACiiCVS.js → TimelineDiffPane-_hOa-i8T.js} +1 -1
- package/dist/public/assets/{agent-connection-status-C4yNQVsh.js → agent-connection-status-DuB1--ES.js} +1 -1
- package/dist/public/assets/{auth-state-cache-B9Bd6CAS.js → auth-state-cache-Cbsn2NzU.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-CfZDQwRK.js → bug-report-send-manager-PFUbdb6A.js} +1 -1
- package/dist/public/assets/{client-version-CC36kcO2.js → client-version-DZiwyber.js} +1 -1
- package/dist/public/assets/{comment-chips-D-BSLthh.js → comment-chips-DP8JIf-j.js} +1 -1
- package/dist/public/assets/{config-provider-B8b39FsC.js → config-provider-BZmHUWc2.js} +1 -1
- package/dist/public/assets/{css-color-to-hex-BePhu6wd.js → css-color-to-hex-DNfZeBXC.js} +1 -1
- package/dist/public/assets/{dist-BZdeL2V1.js → dist-CsRjQ3NI.js} +3 -3
- package/dist/public/assets/{doc-paths-D-gZXP-a.js → doc-paths-P5-BSakk.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-DtwdtZin.js → doc-undo-manager-BWfWkl_a.js} +1 -1
- package/dist/public/assets/{documents-events-Bq1frJ_v.js → documents-events-DvNZEYXa.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-6mffinoi.js → file-tree-adapter-cmU5SMzc.js} +1 -1
- package/dist/public/assets/{file-tree-utils-C5TYFjev.js → file-tree-utils-CvGfrRLH.js} +1 -1
- package/dist/public/assets/{folder-config-api-C-YvNI0O.js → folder-config-api-Cf0xNoMx.js} +1 -1
- package/dist/public/assets/{index-CtF5lseU.js → index-DdI9PeJ0.js} +8 -8
- package/dist/public/assets/{lint-config-client-DndoajWV.js → lint-config-client-V6SDdZAx.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CwalRGzg.js → markdownlint-rule-browser-ChTN5jnX.js} +1 -1
- package/dist/public/assets/{navigation-targets-Cd3zQyN-.js → navigation-targets-ChYNSIlg.js} +1 -1
- package/dist/public/assets/{page-list-cache-NdF8ZesO.js → page-list-cache-v0j_Fop3.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DvEgO595.js → pending-receive-nav-store-BkoaK7Al.js} +1 -1
- package/dist/public/assets/{progress-DMp0gFGR.js → progress-Bd_YYm43.js} +1 -1
- package/dist/public/assets/{project-paths-D9oGZSR6.js → project-paths-DI_lX0wT.js} +1 -1
- package/dist/public/assets/{prop-types-BH5isioq.js → prop-types-KG6EyaIL.js} +1 -1
- package/dist/public/assets/{receive-store-DwYJO5xb.js → receive-store-lAFmH9ox.js} +1 -1
- package/dist/public/assets/{selection-context-BGnwitoU.js → selection-context-BPU1Kpvh.js} +1 -1
- package/dist/public/assets/{skill-scope-Cdlx-KYQ.js → skill-scope-C5SW4_Pz.js} +1 -1
- package/dist/public/assets/{skills-api-Dyw4cKav.js → skills-api-BikIZSbG.js} +1 -1
- package/dist/public/assets/{src-BssjXQhA.js → src-C7JRqrhs.js} +1 -1
- package/dist/public/assets/{startup-marks-BvvR96e3.js → startup-marks--skwjmmG.js} +1 -1
- package/dist/public/assets/{tag-pill-input-qzrXWYUl.js → tag-pill-input-BwYI1lif.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-C2iaWC3P.js → target-navigation-intent-Dnc4EQn5.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BndqXUs2.js → telemetry-startup-Xl-3MSSA.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-CYudvqTJ.js → terminal-cli-display-DqoGnjWT.js} +1 -1
- package/dist/public/assets/{terminal-command-events-CNQNnXe7.js → terminal-command-events-BVXw0wjR.js} +1 -1
- package/dist/public/assets/{terminal-launch-events--U4VtfFx.js → terminal-launch-events-SLfoML9I.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CmBHsz4Z.js → terminal-telemetry-C6HrmHpX.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BW9CJE5e.js → typing-burst-detector-B2UGHmAO.js} +1 -1
- package/dist/public/assets/{uninstall-Da-lDDU1.js → uninstall-ByMyfn2r.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DANLH41w.js → use-activity-panel-BuEyM3PC.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-DjgLSYYW.js → use-apply-config-language-C7018Lei.js} +1 -1
- package/dist/public/assets/{use-collab-url-oVgBHIKc.js → use-collab-url-D8GfxOPj.js} +1 -1
- package/dist/public/assets/{use-conflicts-D-7AnXKJ.js → use-conflicts-BzGuBdfW.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-CiT3ykD6.js → use-live-xterm-theme-m8ZPjldd.js} +1 -1
- package/dist/public/assets/{use-open-skill-DOwdtHeV.js → use-open-skill-C3voEMxg.js} +1 -1
- package/dist/public/assets/{use-settings-route--6z60oAT.js → use-settings-route-Dvz-Hs8R.js} +1 -1
- package/dist/public/assets/{use-skill-origin-B5sZpTBn.js → use-skill-origin-C74pcYIC.js} +1 -1
- package/dist/public/assets/{use-skills-3aeQYeDX.js → use-skills-CA3QYRzR.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-ZPzXYuuu.js → use-terminal-enabled-BeacNAYl.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CUlr-o47.js → use-timeline-entry-diff-DE2wwIvB.js} +1 -1
- package/dist/public/assets/{use-workspace-DyA0l5Sr.js → use-workspace-Cqf3wGSQ.js} +1 -1
- package/dist/public/index.html +54 -54
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-Cb-vf7qL.mjs → registry-probes-J6moEXgM.mjs} +1 -1
- package/dist/{removal-file-path-BrCd2wig.mjs → removal-file-path-CnudrZAc.mjs} +1 -1
- package/dist/{repair-launch-json-CI0_qR-e.mjs → repair-launch-json-CJFVrNHz.mjs} +1 -1
- package/dist/{repair-mcp-configs-DA87kjDm.mjs → repair-mcp-configs-BqPqIYwG.mjs} +1 -1
- package/dist/{src-hAcdRCVi.mjs → src-CATqYOnk.mjs} +1 -1
- package/dist/src-CqCC2CKz.mjs +1 -0
- package/dist/{start-DxX-2Jw4.mjs → start-CtVYZ9RW.mjs} +3 -3
- package/dist/start-CtmvYQGm.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-_050cLwU.mjs +0 -1
- package/dist/dist-C2NLSbAt.mjs +0 -2104
- package/dist/init-B8SYC59J.mjs +0 -1
- package/dist/loader-BMHkWUxJ.mjs +0 -1
- package/dist/preview-Mfzp6yus.mjs +0 -1
- package/dist/public/assets/FeedbackForm-B30IpJr5.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B26iJId9.js +0 -1
- package/dist/src-DACyZW2F.mjs +0 -1
- package/dist/start-rNCqcKWK.mjs +0 -1
|
@@ -172,7 +172,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
172
172
|
`)?`\r
|
|
173
173
|
`:`
|
|
174
174
|
`)+t:t}function Wd(e){if(e===``)return``;let t=e.match(Bd);return t?(t[1]??``).replace(/\r?\n$/,``):e}var Gd={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function Kd(e){if(e.trim()===``)return{doc:new mu({}),map:{}};let t;try{t=Td(e)}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new mu({}),map:null,parseError:`parse threw: ${t}`}}if(t.errors.length>0)return{doc:t,map:null,parseError:t.errors[0]?.message??`yaml parse errors`};let n;try{n=t.toJS()}catch(e){let n=e instanceof Error?e.message:String(e);return{doc:t,map:null,parseError:`toJS threw: ${n}`}}if(typeof n!=`object`||!n||Array.isArray(n))return{doc:t,map:null,parseError:`top-level value is not a mapping`};let r=Id.safeParse(n);if(!r.success){let e=r.error.issues[0],n=e&&Array.isArray(e.path)?e.path.join(`.`):``,i=e?.message??`unknown`;return{doc:t,map:null,parseError:n?`value at "${n}" failed schema: ${i}`:`schema validation failed: ${i}`}}return{doc:t,map:r.data}}function qd(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Jd(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=Ks(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(qd(n)){let r=e.createNode(n),i=Us(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function Yd(e){return e===``?``:`---\n${e.endsWith(`
|
|
175
|
-
`)?e.slice(0,-1):e}\n---\n`}function Xd(e){let t=e.contents;return typeof t!=`object`||!t||!(`items`in t)?[]:t.items.map(e=>{let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}).filter(e=>e!==null)}var Zd=`__system__`,Qd=`__config__/project`,$d=`__user__/config.yml`,ef=`__local__/project`,tf=`__config__/okignore`,nf=Object.freeze([Qd,ef,$d,tf]),rf=`__skill__/`,af=`__extskill__/`,of=[`project`,`global`];function sf(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}function cf(e){return`${af}${e}`}function lf(e,t){return`${af}${e}/${ff(t)}`}function uf(e){return e.startsWith(af)}function df(e){if(!e.startsWith(`__extskill__/`))return null;let t=e.slice(13),n=t.indexOf(`/`),r=n<0?t:t.slice(0,n),i=n<0?null:t.slice(n+1);return/^[a-z0-9-]+$/.test(r)?{name:r,rel:i&&i.length>0?i:null}:null}function ff(e){return e.replace(/\.mdx?$/i,``)}var pf=`.ok/skills`;function mf(e){return`${pf}/${e}/SKILL`}var hf=[`references`,`scripts`];function gf(e,t){let n=e.trim();if(!n.startsWith(`/`))return null;let r=n.slice(1);if(r===``||r.includes(`/`))return null;let i=/^(\.[A-Za-z0-9_-]+\/skills)\/[^/]+\/(?:SKILL|references\/.+)$/.exec(t);return i?`${i[1]}/${r}/SKILL`:/^__skill__\/(global)\/[^/]+(?:\/references\/.+)?$/.exec(t)?Sf(`global`,r):null}function _f(e,t){let n=/^(\.[A-Za-z0-9_-]+\/skills\/[^/]+)\/(?:SKILL|references\/.+)$/.exec(t)??/^(__skill__\/global\/[^/]+)(?:\/references\/.+)?$/.exec(t)??/^(__extskill__\/[^/]+)(?:\/.+)?$/.exec(t);if(!n)return null;let r=n[1],i=ff(e.trim()).split(`/`).filter(e=>e!==``&&e!==`.`),[a]=i;return!a||!hf.includes(a)||i.includes(`..`)||i.length<2?null:`${r}/${i.join(`/`)}`}var vf=/^\.[A-Za-z0-9_-]+\/skills\/([^/]+)\/(SKILL|references\/.+)$/;function yf(e){let t=vf.exec(e);if(!t)return null;let n=t[1],r=t[2];return r===`SKILL`?{name:n,kind:`skill`,rel:null}:{name:n,kind:`reference`,rel:r.slice(11)}}var bf=/^__skill__\/global\/([^/]+)(?:\/(references\/.+))?$/;function xf(e){let t=bf.exec(e);if(!t)return null;let{name:n,host:r}=Cf(t[1]),i=t[2];return i===void 0?{name:n,kind:`skill`,rel:null,host:r}:{name:n,kind:`reference`,rel:i.slice(11),host:r}}function Sf(e,t,n){return e===`project`?mf(t):`${rf}${e}/${t}${n?`@${n}`:``}`}function Cf(e){let t=e.indexOf(`@`);if(t<0)return{name:e,host:null};let n=e.slice(t+1);return{name:e.slice(0,t),host:n===``?null:n}}function wf(e,t,n,r){let i=ff(n);return e===`project`?`${pf}/${t}/${i}`:`${rf}${e}/${t}${r?`@${r}`:``}/${i}`}function Tf(e){if(e===``)return``;try{return e.split(`/`).map(e=>decodeURIComponent(e)).join(`/`)}catch{return e}}function Ef(e){if(e.startsWith(`__skill__/`)){let t=e.slice(10),n=t.indexOf(`/`);if(n<0)return null;let r=t.slice(0,n);if(r!==`global`&&r!==`project`)return null;let i=t.slice(n+1);if(!i)return null;let a=Tf(i),o=a.indexOf(`/`),s=o<0?a:a.slice(0,o);if(!s)return null;let c=o<0?null:a.slice(o+1),{name:l,host:u}=Cf(s);return l?{kind:`skill`,scope:r,name:l,host:u,rel:c}:null}return null}var Df=/^(?:(.+)\/)?\.ok\/templates\/([^/]+?)(?:\.md)?$/;function Of(e,t){let n=e.replace(/^\/+|\/+$/g,``);return n?`${n}/.ok/templates/${t}`:`.ok/templates/${t}`}function kf(e){let t=Df.exec(e);return t?{folder:(t[1]??``).replace(/^\/+|\/+$/g,``),name:t[2]}:null}function Af(e){if(!e.startsWith(`__template__/`))return null;let t=e.slice(13);if(!t)return null;let n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return r?{folder:Tf(n<0?``:t.slice(0,n)),name:Tf(r)}:null}var jf=`.agents/skills`,Mf=`open-knowledge-pack-`,Nf=`inkeep/open-knowledge-skills`,Pf=/(^|[\s([])\/([a-z0-9][a-z0-9-]{1,63})(?=$|[\s.,;:!?)\]])/g,Ff=new Set([`tmp`,`usr`,`etc`,`var`,`dev`,`opt`,`bin`,`api`,`home`,`root`]);function If(e){return!Ff.has(e)}var Lf=L({name:M(),description:M(),files:L({skillMd:M(),scripts:F(M()),references:F(M())})}),Rf=L({pluginProvider:M().optional(),plugin:M().optional(),marketplace:M().optional(),repositoryUrl:M().optional(),version:M().optional(),gitCommitSha:M().optional(),scope:M().optional(),projectPath:M().optional()}),zf=L({commands:P(),hooks:P(),mcp:P()}),Bf=L({...Lf.shape,sourceHarness:M(),sourceHarnesses:F(M()),home:M(),provenance:Rf,inert:zf,outsideProject:P().optional()}),Vf=L({schema:z(1),name:M(),version:M(),description:M().optional(),author:L({name:M()}).optional(),skills:F(M()),hostCompatibility:F(M()).optional(),capabilities:L({scripts:M(),network:M(),inert:F(M())}).optional(),provenance:L({source:M(),ref:M(),contentHash:M()}).optional()});I({skills:F(Bf),packs:F(Vf)}).loose(),I({results:F(I({id:M().min(1),name:M().min(1),source:M().min(1),description:M(),installs:N().int().nonnegative().nullable(),publisher:M().nullable()}).loose()),backend:R([`skills.sh`,`github-fallback`]),degraded:P()}).loose(),I({title:M(),description:M(),image:M().nullable(),skillsUrl:M().nullable(),sourceKind:R([`github`,`site`]),sourceUrl:M()}).loose(),I({skills:F(I({name:M(),description:M().nullable()}).loose())}).loose(),I({kind:R([`local`,`import`,`none`]),scope:R(of).optional(),name:M().optional(),dir:M().optional(),source:M().optional(),ref:M().optional(),via:R([`source`,`publisher`]).optional()}).loose();var Hf=I({relPath:M(),content:M().nullable()}).loose(),Uf=I({provider:M(),plugin:M(),version:M().optional(),marketplace:M().optional(),repositoryUrl:M().optional()}).loose(),Wf=I({provider:M(),plugin:M(),version:M().optional(),description:M().optional(),repositoryUrl:M().optional(),bundledSkills:F(M()),capabilities:I({commands:P(),hooks:P(),mcp:P(),agents:P()}),setupSupported:P()}).loose();I({name:M(),description:M().nullable(),skillMd:M(),files:F(Hf),plugin:Uf.optional(),pluginBundle:Wf.optional()}).loose();var Gf=new Set([`project`,`local`]);function Kf(e){return e!==void 0&&Gf.has(e)?`project`:`global`}var qf=/^([\w.-]+)\/([\w.-]+)$/,Jf=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Yf(e){let t=qf.exec(e);if(t){let[,e,n]=t;if(e&&n)return{kind:`github`,owner:e,repo:n}}return Jf.test(e)?{kind:`site`,hostname:e}:null}function Xf(e,t){let n=Yf(e),r=t.trim();if(!n||!r)return null;let i=encodeURIComponent(r);if(n.kind===`github`){let e=encodeURIComponent(n.owner),t=encodeURIComponent(n.repo);return{sourceKind:`github`,skillsUrl:`https://www.skills.sh/${e}/${t}/${i}`,sourceUrl:`https://github.com/${e}/${t}`}}return{sourceKind:`site`,skillsUrl:`https://www.skills.sh/site/${encodeURIComponent(n.hostname)}/${i}`,sourceUrl:`https://${n.hostname}`}}function Zf(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}var Qf={"bridge-merge-loss":{visibility:`surfaced`,gcBucket:`bridge-merge-loss`,bundleExposure:`subject-only`,chainAnchor:!1},"producer-guard-loss":{visibility:`surfaced`,gcBucket:`producer-guard-loss`,bundleExposure:`metadata`,chainAnchor:!1},"observer-a-duplication":{visibility:`surfaced`,gcBucket:`observer-a-duplication`,bundleExposure:`metadata`,chainAnchor:!1},"external-change-rescue":{visibility:`surfaced`,gcBucket:`external-change-rescue`,bundleExposure:`metadata`,chainAnchor:!1},"defer-exhaustion-loss":{visibility:`surfaced`,gcBucket:`defer-exhaustion-loss`,bundleExposure:`metadata`,chainAnchor:!1},"observer-a-apply-loss":{visibility:`surfaced`,gcBucket:`observer-a-apply-loss`,bundleExposure:`subject-only`,chainAnchor:!1},"bridge-derive-loss":{visibility:`surfaced`,gcBucket:`bridge-derive-loss`,bundleExposure:`subject-only`,chainAnchor:!1},"bridge-backstop-trip":{visibility:`surfaced`,gcBucket:`bridge-backstop-trip`,bundleExposure:`metadata`,chainAnchor:!1},"persistence-reconcile-loss":{visibility:`surfaced`,gcBucket:`persistence-reconcile-loss`,bundleExposure:`metadata`,chainAnchor:!1},"persistence-duplication-reset":{visibility:`surfaced`,gcBucket:`persistence-duplication-reset`,bundleExposure:`metadata`,chainAnchor:!1},"persistence-divergence-realign":{visibility:`surfaced`,gcBucket:`persistence-divergence-realign`,bundleExposure:`metadata`,chainAnchor:!1},"managed-artifact-reconcile":{visibility:`surfaced`,gcBucket:`managed-artifact-reconcile`,bundleExposure:`metadata`,chainAnchor:!1},"auto-consolidation":{visibility:`hidden`,gcBucket:`auto-consolidation`,bundleExposure:`none`,chainAnchor:!0}};function $f(e){return e==null?!0:Qf[e].visibility===`surfaced`}var ep=[`off`,`follow`,`full`],tp=`pull`,np=[`off`,`follow`,`full`,tp],rp=[`follow`,`full`,tp];function ip(e){return e===tp?`follow`:ap(e)?e:null}function ap(e){return typeof e==`string`&&ep.includes(e)}function op(e){return e===!0?`full`:e===!1?`off`:null}function sp(e){return e===!0?`full`:e===!1?`off`:ip(e)}function cp(e){let t=ip(e?.mode);return t===null?op(e?.enabled):t}var lp=3600,up=[30,60,300,900,3600];function dp(e,t){return typeof e!=`number`||!Number.isFinite(e)?t:Math.min(lp,Math.max(30,Math.round(e)))}function fp(e){return{pullIntervalSeconds:dp(e?.pullIntervalSeconds,30),pushIntervalSeconds:dp(e?.pushIntervalSeconds,60)}}var pp={sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,feature:`gherkin`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`},mp=new Set(Object.keys(pp));function hp(e){return pp[e.toLowerCase().replace(/^\./,``)]??null}var gp=new Set([`md`,`mdx`,`mmd`,`mermaid`]),_p=new Set([...mp,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!gp.has(e))),vp={html:`html`,htm:`html`,svg:`xml`,vue:`html`,svelte:`html`,astro:`html`,lock:`yaml`};function yp(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:_p.has(t.slice(n+1).toLowerCase())}var bp=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],xp=[`video/mp4`,`video/webm`,`video/ogg`],Sp=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Cp=[`application/pdf`],wp=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Tp=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Ep=new Set([`pdf`]),Dp=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Op=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),kp=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),Ap=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),jp=`wikiembed`,Mp=`toast`,Np=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Pp=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Fp=[`mp4`,`webm`,`mov`,`m4v`],Ip=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Lp=[`pdf`],Rp=[`json`,`toml`,`lock`];function zp(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}zp(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,Pp,wp),zp(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Fp,Tp),zp(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Ip,Dp),zp(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Lp,Ep),zp(`FILE_ATTACHMENT_EXTENSIONS`,[...Op],Np),zp(`WIKI_EMBED_EXTENSIONS`,[...Np],kp);var Bp=new Set(Pp),Vp=new Set(Fp),Hp=new Set(Ip),Up=new Set(Lp),Wp=new Set(Rp);zp(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...Pp,...Fp,...Ip,...Lp,...Rp])],Ap);var Gp=new Set([`base`,`canvas`]),Kp=new Set([`mmd`,`mermaid`]);function qp(e){let t=e.lastIndexOf(`.`);return t<0?!1:Kp.has(e.slice(t+1).toLowerCase())}var Jp=new Set([`excalidraw`]);function Yp(e){let t=e.lastIndexOf(`.`);return t<0?!1:Jp.has(e.slice(t+1).toLowerCase())}function Xp(e){return!qp(e)&&!Yp(e)&&!yp(e)}[...kp,...Gp,...Kp,...Jp];function Zp(e){let t=e.toLowerCase().replace(/^\./,``);return Bp.has(t)?`image`:Vp.has(t)?`video`:Hp.has(t)?`audio`:Up.has(t)?`pdf`:Wp.has(t)||Gp.has(t)?`text`:Kp.has(t)?`mermaid`:Jp.has(t)?`excalidraw`:mp.has(t)?`text`:null}var Qp=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],$p=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`fr`,`bn`,`pt-BR`,`id`,`ko`],em=new Set([`ar`,`ur`]),tm=Qp.filter(e=>!em.has(e)),nm=[`markdownlint`,`frontmatter`,`okf`],rm=[`missing`,`invalid`];function im(e){return e.frontmatterScope!==void 0}[...nm];var am=[`off`,`warning`,`error`],om=`warning`,sm=[`error`,`warning`],cm=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],lm={base00:`default background`,base01:`alt background — cards, popovers, sidebar`,base02:`selection background, borders`,base03:`comments, invisibles`,base04:`secondary text`,base05:`default foreground`,base06:`light foreground`,base07:`lightest foreground`,base08:`red — variables, tags, diff deleted`,base09:`orange — numbers, constants`,base0A:`yellow — classes, search highlight`,base0B:`green — strings, diff inserted`,base0C:`cyan — support, escapes, quotes`,base0D:`blue — functions, headings, accent`,base0E:`magenta — keywords, storage`,base0F:`deprecated markers, embedded tags`},um=/^#[0-9a-fA-F]{6}$/,dm=/\P{White_Space}/u;function fm(e){return dm.test(e)}function pm(e){return typeof e==`string`&&um.test(e)}function mm(e){let t=e.palette;return{background:t.base00,foreground:t.base05,card:t.base01,"card-foreground":t.base05,popover:t.base01,"popover-foreground":t.base05,primary:t.base0D,"primary-foreground":t.base00,secondary:t.base01,"secondary-foreground":t.base05,muted:t.base01,"muted-foreground":t.base04,accent:t.base02,"accent-foreground":t.base05,destructive:t.base08,border:t.base02,input:t.base02,ring:t.base0D,"selection-soft":t.base02,"chart-1":t.base0D,"chart-2":t.base0B,"chart-3":t.base0A,"chart-4":t.base0E,"chart-5":t.base08,sidebar:t.base01,"sidebar-foreground":t.base05,"sidebar-primary":t.base0D,"sidebar-primary-foreground":t.base00,"sidebar-accent":t.base02,"sidebar-accent-foreground":t.base0D,"sidebar-hover":t.base02,"sidebar-border":t.base02,"sidebar-ring":t.base0D,"syntax-keyword":t.base0E,"syntax-tag":t.base08,"syntax-attr":t.base0D,"syntax-string":t.base0B,"syntax-number":t.base09,"syntax-atom":t.base0C,"syntax-comment":t.base03,"syntax-func":t.base0D,"syntax-var":t.base08,"syntax-type":t.base0A,"syntax-operator":t.base05,"syntax-meta":t.base0F,"syntax-bg":t.base01,"link-color":t.base0D,"broken-link-color":t.base08,"lint-warning-color":t.base0A,"lint-error-color":t.base08,"diff-added":t.base0B,"diff-removed":t.base08,"diff-modified":t.base0D,"callout-note-color":t.base0D,"callout-info-color":t.base0D,"callout-todo-color":t.base0D,"callout-abstract-color":t.base0C,"callout-tip-color":t.base0B,"callout-success-color":t.base0B,"callout-important-color":t.base0E,"callout-example-color":t.base0E,"callout-question-color":t.base0E,"callout-warning-color":t.base0A,"callout-caution-color":t.base09,"callout-danger-color":t.base09,"callout-failure-color":t.base08,"callout-bug-color":t.base08,"callout-quote-color":t.base03,..._m(t)}}var hm={black:`base00`,red:`base08`,green:`base0B`,yellow:`base0A`,blue:`base0D`,magenta:`base0E`,cyan:`base0C`,white:`base05`,brightBlack:`base03`,brightRed:`base08`,brightGreen:`base0B`,brightYellow:`base0A`,brightBlue:`base0D`,brightMagenta:`base0E`,brightCyan:`base0C`,brightWhite:`base07`},gm=Object.keys(hm);function _m(e){let t={};for(let n of gm)t[`ansi-${vm(n)}`]=e[hm[n]];return t}function vm(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function ym(e){return JSON.stringify(e).replace(/[\u007f-\u009f\u2028\u2029\ufffe\uffff]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function bm(e){return`${[`system: "base16"`,`name: ${ym(e.name)}`,...e.author?[`author: ${ym(e.author)}`]:[],`variant: ${ym(e.variant)}`,`palette:`,...cm.map(t=>` ${t}: ${ym(e.palette[t])}`)].join(`
|
|
175
|
+
`)?e.slice(0,-1):e}\n---\n`}function Xd(e){let t=e.contents;return typeof t!=`object`||!t||!(`items`in t)?[]:t.items.map(e=>{let t=e.key;return typeof t==`string`?t:t&&typeof t==`object`&&`value`in t&&typeof t.value==`string`?t.value:null}).filter(e=>e!==null)}var Zd=`__system__`,Qd=`__config__/project`,$d=`__user__/config.yml`,ef=`__local__/project`,tf=`__config__/okignore`,nf=Object.freeze([Qd,ef,$d,tf]),rf=`__skill__/`,af=`__extskill__/`,of=[`project`,`global`];function sf(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}function cf(e){return`${af}${e}`}function lf(e,t){return`${af}${e}/${ff(t)}`}function uf(e){return e.startsWith(af)}function df(e){if(!e.startsWith(`__extskill__/`))return null;let t=e.slice(13),n=t.indexOf(`/`),r=n<0?t:t.slice(0,n),i=n<0?null:t.slice(n+1);return/^[a-z0-9-]+$/.test(r)?{name:r,rel:i&&i.length>0?i:null}:null}function ff(e){return e.replace(/\.mdx?$/i,``)}var pf=`.ok/skills`;function mf(e){return`${pf}/${e}/SKILL`}var hf=[`references`,`scripts`];function gf(e,t){let n=e.trim();if(!n.startsWith(`/`))return null;let r=n.slice(1);if(r===``||r.includes(`/`))return null;let i=/^(\.[A-Za-z0-9_-]+\/skills)\/[^/]+\/(?:SKILL|references\/.+)$/.exec(t);return i?`${i[1]}/${r}/SKILL`:/^__skill__\/(global)\/[^/]+(?:\/references\/.+)?$/.exec(t)?Sf(`global`,r):null}function _f(e,t){let n=/^(\.[A-Za-z0-9_-]+\/skills\/[^/]+)\/(?:SKILL|references\/.+)$/.exec(t)??/^(__skill__\/global\/[^/]+)(?:\/references\/.+)?$/.exec(t)??/^(__extskill__\/[^/]+)(?:\/.+)?$/.exec(t);if(!n)return null;let r=n[1],i=ff(e.trim()).split(`/`).filter(e=>e!==``&&e!==`.`),[a]=i;return!a||!hf.includes(a)||i.includes(`..`)||i.length<2?null:`${r}/${i.join(`/`)}`}var vf=/^\.[A-Za-z0-9_-]+\/skills\/([^/]+)\/(SKILL|references\/.+)$/;function yf(e){let t=vf.exec(e);if(!t)return null;let n=t[1],r=t[2];return r===`SKILL`?{name:n,kind:`skill`,rel:null}:{name:n,kind:`reference`,rel:r.slice(11)}}var bf=/^__skill__\/global\/([^/]+)(?:\/(references\/.+))?$/;function xf(e){let t=bf.exec(e);if(!t)return null;let{name:n,host:r}=Cf(t[1]),i=t[2];return i===void 0?{name:n,kind:`skill`,rel:null,host:r}:{name:n,kind:`reference`,rel:i.slice(11),host:r}}function Sf(e,t,n){return e===`project`?mf(t):`${rf}${e}/${t}${n?`@${n}`:``}`}function Cf(e){let t=e.indexOf(`@`);if(t<0)return{name:e,host:null};let n=e.slice(t+1);return{name:e.slice(0,t),host:n===``?null:n}}function wf(e,t,n,r){let i=ff(n);return e===`project`?`${pf}/${t}/${i}`:`${rf}${e}/${t}${r?`@${r}`:``}/${i}`}function Tf(e){if(e===``)return``;try{return e.split(`/`).map(e=>decodeURIComponent(e)).join(`/`)}catch{return e}}function Ef(e){if(e.startsWith(`__skill__/`)){let t=e.slice(10),n=t.indexOf(`/`);if(n<0)return null;let r=t.slice(0,n);if(r!==`global`&&r!==`project`)return null;let i=t.slice(n+1);if(!i)return null;let a=Tf(i),o=a.indexOf(`/`),s=o<0?a:a.slice(0,o);if(!s)return null;let c=o<0?null:a.slice(o+1),{name:l,host:u}=Cf(s);return l?{kind:`skill`,scope:r,name:l,host:u,rel:c}:null}return null}var Df=/^(?:(.+)\/)?\.ok\/templates\/([^/]+?)(?:\.md)?$/;function Of(e,t){let n=e.replace(/^\/+|\/+$/g,``);return n?`${n}/.ok/templates/${t}`:`.ok/templates/${t}`}function kf(e){let t=Df.exec(e);return t?{folder:(t[1]??``).replace(/^\/+|\/+$/g,``),name:t[2]}:null}function Af(e){if(!e.startsWith(`__template__/`))return null;let t=e.slice(13);if(!t)return null;let n=t.lastIndexOf(`/`),r=n<0?t:t.slice(n+1);return r?{folder:Tf(n<0?``:t.slice(0,n)),name:Tf(r)}:null}var jf=`.agents/skills`,Mf=`open-knowledge-pack-`,Nf=`inkeep/open-knowledge-skills`,Pf=/(^|[\s([])\/([a-z0-9][a-z0-9-]{1,63})(?=$|[\s.,;:!?)\]])/g,Ff=new Set([`tmp`,`usr`,`etc`,`var`,`dev`,`opt`,`bin`,`api`,`home`,`root`]);function If(e){return!Ff.has(e)}var Lf=L({name:M(),description:M(),files:L({skillMd:M(),scripts:F(M()),references:F(M())})}),Rf=L({pluginProvider:M().optional(),plugin:M().optional(),marketplace:M().optional(),repositoryUrl:M().optional(),version:M().optional(),gitCommitSha:M().optional(),scope:M().optional(),projectPath:M().optional()}),zf=L({commands:P(),hooks:P(),mcp:P()}),Bf=L({...Lf.shape,sourceHarness:M(),sourceHarnesses:F(M()),home:M(),provenance:Rf,inert:zf,outsideProject:P().optional()}),Vf=L({schema:z(1),name:M(),version:M(),description:M().optional(),author:L({name:M()}).optional(),skills:F(M()),hostCompatibility:F(M()).optional(),capabilities:L({scripts:M(),network:M(),inert:F(M())}).optional(),provenance:L({source:M(),ref:M(),contentHash:M()}).optional()});I({skills:F(Bf),packs:F(Vf)}).loose(),I({results:F(I({id:M().min(1),name:M().min(1),source:M().min(1),description:M(),installs:N().int().nonnegative().nullable(),publisher:M().nullable()}).loose()),backend:R([`skills.sh`,`github-fallback`]),degraded:P()}).loose(),I({title:M(),description:M(),image:M().nullable(),skillsUrl:M().nullable(),sourceKind:R([`github`,`site`]),sourceUrl:M()}).loose(),I({skills:F(I({name:M(),description:M().nullable()}).loose())}).loose(),I({kind:R([`local`,`import`,`none`]),scope:R(of).optional(),name:M().optional(),dir:M().optional(),source:M().optional(),ref:M().optional(),via:R([`source`,`publisher`]).optional()}).loose();var Hf=I({relPath:M(),content:M().nullable()}).loose(),Uf=I({provider:M(),plugin:M(),version:M().optional(),marketplace:M().optional(),repositoryUrl:M().optional()}).loose(),Wf=I({provider:M(),plugin:M(),version:M().optional(),description:M().optional(),repositoryUrl:M().optional(),bundledSkills:F(M()),capabilities:I({commands:P(),hooks:P(),mcp:P(),agents:P()}),setupSupported:P()}).loose();I({name:M(),description:M().nullable(),skillMd:M(),files:F(Hf),plugin:Uf.optional(),pluginBundle:Wf.optional()}).loose();var Gf=new Set([`project`,`local`]);function Kf(e){return e!==void 0&&Gf.has(e)?`project`:`global`}var qf=/^([\w.-]+)\/([\w.-]+)$/,Jf=/^(?=.{1,253}$)(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function Yf(e){let t=qf.exec(e);if(t){let[,e,n]=t;if(e&&n)return{kind:`github`,owner:e,repo:n}}return Jf.test(e)?{kind:`site`,hostname:e}:null}function Xf(e,t){let n=Yf(e),r=t.trim();if(!n||!r)return null;let i=encodeURIComponent(r);if(n.kind===`github`){let e=encodeURIComponent(n.owner),t=encodeURIComponent(n.repo);return{sourceKind:`github`,skillsUrl:`https://www.skills.sh/${e}/${t}/${i}`,sourceUrl:`https://github.com/${e}/${t}`}}return{sourceKind:`site`,skillsUrl:`https://www.skills.sh/site/${encodeURIComponent(n.hostname)}/${i}`,sourceUrl:`https://${n.hostname}`}}function Zf(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}var Qf={"bridge-merge-loss":{visibility:`surfaced`,gcBucket:`bridge-merge-loss`,bundleExposure:`subject-only`,chainAnchor:!1},"producer-guard-loss":{visibility:`surfaced`,gcBucket:`producer-guard-loss`,bundleExposure:`metadata`,chainAnchor:!1},"observer-a-duplication":{visibility:`surfaced`,gcBucket:`observer-a-duplication`,bundleExposure:`metadata`,chainAnchor:!1},"external-change-rescue":{visibility:`surfaced`,gcBucket:`external-change-rescue`,bundleExposure:`metadata`,chainAnchor:!1},"external-change-rescue-disk-update":{visibility:`surfaced`,gcBucket:`external-change-rescue-disk-update`,bundleExposure:`metadata`,chainAnchor:!1},"defer-exhaustion-loss":{visibility:`surfaced`,gcBucket:`defer-exhaustion-loss`,bundleExposure:`metadata`,chainAnchor:!1},"observer-a-apply-loss":{visibility:`surfaced`,gcBucket:`observer-a-apply-loss`,bundleExposure:`subject-only`,chainAnchor:!1},"bridge-derive-loss":{visibility:`surfaced`,gcBucket:`bridge-derive-loss`,bundleExposure:`subject-only`,chainAnchor:!1},"bridge-backstop-trip":{visibility:`surfaced`,gcBucket:`bridge-backstop-trip`,bundleExposure:`metadata`,chainAnchor:!1},"persistence-reconcile-loss":{visibility:`surfaced`,gcBucket:`persistence-reconcile-loss`,bundleExposure:`metadata`,chainAnchor:!1},"persistence-duplication-reset":{visibility:`surfaced`,gcBucket:`persistence-duplication-reset`,bundleExposure:`metadata`,chainAnchor:!1},"persistence-divergence-realign":{visibility:`surfaced`,gcBucket:`persistence-divergence-realign`,bundleExposure:`metadata`,chainAnchor:!1},"managed-artifact-reconcile":{visibility:`surfaced`,gcBucket:`managed-artifact-reconcile`,bundleExposure:`metadata`,chainAnchor:!1},"auto-consolidation":{visibility:`hidden`,gcBucket:`auto-consolidation`,bundleExposure:`none`,chainAnchor:!0}};function $f(e){return e==null?!0:Qf[e].visibility===`surfaced`}var ep=[`off`,`follow`,`full`],tp=`pull`,np=[`off`,`follow`,`full`,tp],rp=[`follow`,`full`,tp];function ip(e){return e===tp?`follow`:ap(e)?e:null}function ap(e){return typeof e==`string`&&ep.includes(e)}function op(e){return e===!0?`full`:e===!1?`off`:null}function sp(e){return e===!0?`full`:e===!1?`off`:ip(e)}function cp(e){let t=ip(e?.mode);return t===null?op(e?.enabled):t}var lp=3600,up=[30,60,300,900,3600];function dp(e,t){return typeof e!=`number`||!Number.isFinite(e)?t:Math.min(lp,Math.max(30,Math.round(e)))}function fp(e){return{pullIntervalSeconds:dp(e?.pullIntervalSeconds,30),pushIntervalSeconds:dp(e?.pushIntervalSeconds,60)}}var pp={sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,feature:`gherkin`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`},mp=new Set(Object.keys(pp));function hp(e){return pp[e.toLowerCase().replace(/^\./,``)]??null}var gp=new Set([`md`,`mdx`,`mmd`,`mermaid`]),_p=new Set([...mp,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!gp.has(e))),vp={html:`html`,htm:`html`,svg:`xml`,vue:`html`,svelte:`html`,astro:`html`,lock:`yaml`};function yp(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:_p.has(t.slice(n+1).toLowerCase())}var bp=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],xp=[`video/mp4`,`video/webm`,`video/ogg`],Sp=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Cp=[`application/pdf`],wp=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Tp=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Ep=new Set([`pdf`]),Dp=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Op=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),kp=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),Ap=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),jp=`wikiembed`,Mp=`toast`,Np=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Pp=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Fp=[`mp4`,`webm`,`mov`,`m4v`],Ip=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Lp=[`pdf`],Rp=[`json`,`toml`,`lock`];function zp(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}zp(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,Pp,wp),zp(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Fp,Tp),zp(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Ip,Dp),zp(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Lp,Ep),zp(`FILE_ATTACHMENT_EXTENSIONS`,[...Op],Np),zp(`WIKI_EMBED_EXTENSIONS`,[...Np],kp);var Bp=new Set(Pp),Vp=new Set(Fp),Hp=new Set(Ip),Up=new Set(Lp),Wp=new Set(Rp);zp(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...Pp,...Fp,...Ip,...Lp,...Rp])],Ap);var Gp=new Set([`base`,`canvas`]),Kp=new Set([`mmd`,`mermaid`]);function qp(e){let t=e.lastIndexOf(`.`);return t<0?!1:Kp.has(e.slice(t+1).toLowerCase())}var Jp=new Set([`excalidraw`]);function Yp(e){let t=e.lastIndexOf(`.`);return t<0?!1:Jp.has(e.slice(t+1).toLowerCase())}function Xp(e){return!qp(e)&&!Yp(e)&&!yp(e)}[...kp,...Gp,...Kp,...Jp];function Zp(e){let t=e.toLowerCase().replace(/^\./,``);return Bp.has(t)?`image`:Vp.has(t)?`video`:Hp.has(t)?`audio`:Up.has(t)?`pdf`:Wp.has(t)||Gp.has(t)?`text`:Kp.has(t)?`mermaid`:Jp.has(t)?`excalidraw`:mp.has(t)?`text`:null}var Qp=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],$p=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`fr`,`bn`,`pt-BR`,`id`,`ko`],em=new Set([`ar`,`ur`]),tm=Qp.filter(e=>!em.has(e)),nm=[`markdownlint`,`frontmatter`,`okf`],rm=[`missing`,`invalid`];function im(e){return e.frontmatterScope!==void 0}[...nm];var am=[`off`,`warning`,`error`],om=`warning`,sm=[`error`,`warning`],cm=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],lm={base00:`default background`,base01:`alt background — cards, popovers, sidebar`,base02:`selection background, borders`,base03:`comments, invisibles`,base04:`secondary text`,base05:`default foreground`,base06:`light foreground`,base07:`lightest foreground`,base08:`red — variables, tags, diff deleted`,base09:`orange — numbers, constants`,base0A:`yellow — classes, search highlight`,base0B:`green — strings, diff inserted`,base0C:`cyan — support, escapes, quotes`,base0D:`blue — functions, headings, accent`,base0E:`magenta — keywords, storage`,base0F:`deprecated markers, embedded tags`},um=/^#[0-9a-fA-F]{6}$/,dm=/\P{White_Space}/u;function fm(e){return dm.test(e)}function pm(e){return typeof e==`string`&&um.test(e)}function mm(e){let t=e.palette;return{background:t.base00,foreground:t.base05,card:t.base01,"card-foreground":t.base05,popover:t.base01,"popover-foreground":t.base05,primary:t.base0D,"primary-foreground":t.base00,secondary:t.base01,"secondary-foreground":t.base05,muted:t.base01,"muted-foreground":t.base04,accent:t.base02,"accent-foreground":t.base05,destructive:t.base08,border:t.base02,input:t.base02,ring:t.base0D,"selection-soft":t.base02,"chart-1":t.base0D,"chart-2":t.base0B,"chart-3":t.base0A,"chart-4":t.base0E,"chart-5":t.base08,sidebar:t.base01,"sidebar-foreground":t.base05,"sidebar-primary":t.base0D,"sidebar-primary-foreground":t.base00,"sidebar-accent":t.base02,"sidebar-accent-foreground":t.base0D,"sidebar-hover":t.base02,"sidebar-border":t.base02,"sidebar-ring":t.base0D,"syntax-keyword":t.base0E,"syntax-tag":t.base08,"syntax-attr":t.base0D,"syntax-string":t.base0B,"syntax-number":t.base09,"syntax-atom":t.base0C,"syntax-comment":t.base03,"syntax-func":t.base0D,"syntax-var":t.base08,"syntax-type":t.base0A,"syntax-operator":t.base05,"syntax-meta":t.base0F,"syntax-bg":t.base01,"link-color":t.base0D,"broken-link-color":t.base08,"lint-warning-color":t.base0A,"lint-error-color":t.base08,"diff-added":t.base0B,"diff-removed":t.base08,"diff-modified":t.base0D,"callout-note-color":t.base0D,"callout-info-color":t.base0D,"callout-todo-color":t.base0D,"callout-abstract-color":t.base0C,"callout-tip-color":t.base0B,"callout-success-color":t.base0B,"callout-important-color":t.base0E,"callout-example-color":t.base0E,"callout-question-color":t.base0E,"callout-warning-color":t.base0A,"callout-caution-color":t.base09,"callout-danger-color":t.base09,"callout-failure-color":t.base08,"callout-bug-color":t.base08,"callout-quote-color":t.base03,..._m(t)}}var hm={black:`base00`,red:`base08`,green:`base0B`,yellow:`base0A`,blue:`base0D`,magenta:`base0E`,cyan:`base0C`,white:`base05`,brightBlack:`base03`,brightRed:`base08`,brightGreen:`base0B`,brightYellow:`base0A`,brightBlue:`base0D`,brightMagenta:`base0E`,brightCyan:`base0C`,brightWhite:`base07`},gm=Object.keys(hm);function _m(e){let t={};for(let n of gm)t[`ansi-${vm(n)}`]=e[hm[n]];return t}function vm(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function ym(e){return JSON.stringify(e).replace(/[\u007f-\u009f\u2028\u2029\ufffe\uffff]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function bm(e){return`${[`system: "base16"`,`name: ${ym(e.name)}`,...e.author?[`author: ${ym(e.author)}`]:[],`variant: ${ym(e.variant)}`,`palette:`,...cm.map(t=>` ${t}: ${ym(e.palette[t])}`)].join(`
|
|
176
176
|
`)}\n`}function xm(e){let t;try{t=Ed(e,{schema:`failsafe`})}catch(e){let t=e?.linePos;return{ok:!1,error:{kind:`unparseable`,line:typeof t?.[0]?.line==`number`?t[0].line:void 0}}}if(!t||typeof t!=`object`||Array.isArray(t))return{ok:!1,error:{kind:`not-a-scheme`}};let n=t,r=n.palette,i=r&&typeof r==`object`&&!Array.isArray(r)?r:n,a={},o=[],s=[];for(let e of cm){let t=i[e]??i[e.toLowerCase()];if(t==null){o.push(e);continue}let n=Sm(t);if(!n){s.push(e);continue}a[e]=n}return o.length?{ok:!1,error:{kind:`missing-slots`,slots:o}}:s.length?{ok:!1,error:{kind:`bad-hex`,slots:s}}:typeof n.name==`string`&&!fm(n.name)||typeof n.author==`string`&&!fm(n.author)?{ok:!1,error:{kind:`not-a-scheme`}}:{ok:!0,scheme:{name:typeof n.name==`string`?n.name:`Imported`,author:typeof n.author==`string`?n.author:void 0,variant:n.variant===`light`||n.variant===`dark`?n.variant:rne(a),palette:a}}}function Sm(e){if(typeof e!=`string`)return null;let t=e.trim();return t.startsWith(`#`)||(t=`#${t}`),/^#[0-9a-fA-F]{3}$/.test(t)&&(t=`#${t[1]}${t[1]}${t[2]}${t[2]}${t[3]}${t[3]}`),um.test(t)?t.toLowerCase():null}function Cm(e,t,n){let r=pm(e)?e:`#000000`,i=pm(t)?t:`#000000`,a=Math.min(1,Math.max(0,n)),o=`#`;for(let e=0;e<3;e++){let t=Number.parseInt(r.slice(1+e*2,3+e*2),16),n=Number.parseInt(i.slice(1+e*2,3+e*2),16);o+=Math.round(t+(n-t)*a).toString(16).padStart(2,`0`)}return o}function wm(e){let t=pm(e)?e:`#000000`,n=e=>{let n=Number.parseInt(t.slice(1+e*2,3+e*2),16)/255;return n<=.03928?n/12.92:((n+.055)/1.055)**2.4};return .2126*n(0)+.7152*n(1)+.0722*n(2)}function rne(e){return wm(e.base00)<wm(e.base05)?`dark`:`light`}var ine={name:`Dracula`,author:`clach04 (https://github.com/clach04)`,variant:`dark`,palette:{base00:`#282a36`,base01:`#21222c`,base02:`#44475a`,base03:`#6272a4`,base04:`#9ea8c7`,base05:`#f8f8f2`,base06:`#f8f8f2`,base07:`#ffffff`,base08:`#ff5555`,base09:`#ffb86c`,base0A:`#f1fa8c`,base0B:`#50fa7b`,base0C:`#8be9fd`,base0D:`#bd93f9`,base0E:`#ff79c6`,base0F:`#993333`}},ane={name:`Catppuccin Frappé`,author:`https://github.com/catppuccin/catppuccin`,variant:`dark`,palette:{base00:`#303446`,base01:`#292c3c`,base02:`#414559`,base03:`#51576d`,base04:`#626880`,base05:`#c6d0f5`,base06:`#f2d5cf`,base07:`#babbf1`,base08:`#e78284`,base09:`#ef9f76`,base0A:`#e5c890`,base0B:`#a6d189`,base0C:`#81c8be`,base0D:`#8caaee`,base0E:`#ca9ee6`,base0F:`#eebebe`}},one={name:`Catppuccin Latte`,author:`https://github.com/catppuccin/catppuccin`,variant:`light`,palette:{base00:`#eff1f5`,base01:`#e6e9ef`,base02:`#ccd0da`,base03:`#bcc0cc`,base04:`#acb0be`,base05:`#4c4f69`,base06:`#dc8a78`,base07:`#7287fd`,base08:`#d20f39`,base09:`#fe640b`,base0A:`#df8e1d`,base0B:`#40a02b`,base0C:`#179299`,base0D:`#1d62ec`,base0E:`#8839ef`,base0F:`#dd7878`}},sne={name:`Monokai`,author:`Wimer Hazenberg (http://www.monokai.nl)`,variant:`dark`,palette:{base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`}},cne={name:`Gruvbox dark, medium`,author:`Dawid Kurek, morhetz (https://github.com/morhetz/gruvbox)`,variant:`dark`,palette:{base00:`#282828`,base01:`#3c3836`,base02:`#504945`,base03:`#665c54`,base04:`#bdae93`,base05:`#d5c4a1`,base06:`#ebdbb2`,base07:`#fbf1c7`,base08:`#fb4934`,base09:`#fe8019`,base0A:`#fabd2f`,base0B:`#b8bb26`,base0C:`#8ec07c`,base0D:`#83a598`,base0E:`#d3869b`,base0F:`#d65d0e`}},lne={name:`Solarized Dark`,author:`Ethan Schoonover (modified by aramisgithub)`,variant:`dark`,palette:{base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#2995e1`,base0E:`#6c71c4`,base0F:`#d33682`}};function Tm(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>mm(n)}}function Em(e,t){return{id:e,label:t,kind:`system`}}var Dm=[Em(`default`,`Default`),Tm(`dracula`,`Dracula`,ine),Tm(`catppuccin-frappe`,`Catppuccin Frappé`,ane),Tm(`catppuccin-latte`,`Catppuccin Latte`,one),Tm(`monokai`,`Monokai`,sne),Tm(`gruvbox`,`Gruvbox`,cne),Tm(`solarized`,`Solarized`,lne),Em(`custom`,`Custom`)],une=Dm.map(e=>e.id),Om=/^[a-z0-9-]{1,32}$/,dne=`saved-`,km=26,fne=/\p{M}+/gu,pne=/['\u2019\u02bc]+/gu,mne=/[^a-z0-9]+/g;function hne(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}function gne(e){let t=e.trim();if(t.length===0)return{ok:!1,code:`empty`};let n=t.normalize(`NFKD`).replace(fne,``).toLowerCase().replace(pne,``).replace(mne,`-`).replace(/^-+|-+$/g,``),r=hne(t),i=n.length===0?`theme-${r}`:n.length<=km?n:`${n.slice(0,km-r.length-1).replace(/-+$/g,``)}-${r}`,a=_ne(i);if(!a.ok)throw Error(`Saved theme name derivation produced an invalid id`);return{ok:!0,name:t,stem:i,id:a.id}}function _ne(e){if(e.length===0)return{ok:!1,code:`empty`};let t=dne+e;return Om.test(t)?{ok:!0,id:t}:{ok:!1,code:/^[a-z0-9-]+$/.test(t)?`too-long`:`invalid-chars`}}function vne(e){if(!Om.test(e)||!e.startsWith(`saved-`))return{ok:!1};let t=e.slice(6);return t.length===0?{ok:!1}:{ok:!0,stem:t}}var yne=new Map(Dm.map(e=>[e.id,e]));function bne(e){return e&&yne.get(e)||Dm[0]}function xne(e,t=Dm){let n=new Set(t.map(e=>e.id)),r=e?.colorTheme,i=r&&n.has(r)?r:Dm[0].id,a=e=>e===void 0?i:n.has(e)?e:Dm[0].id;return{light:a(e?.colorThemeLight),dark:a(e?.colorThemeDark)}}function Sne(e,t){return e===`light`||e===`dark`?e:t?`dark`:`light`}function Cne(e,t,n){return`${e} {\n color-scheme: ${t};\n${Object.entries(n).map(([e,t])=>` --${e}: ${t};`).join(`
|
|
177
177
|
`)}\n}`}var Am=Symbol.for(`@inkeep/open-knowledge/field-registry`),jm=globalThis;jm[Am]===void 0&&(jm[Am]=fr());var U=jm[Am];function Mm(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=wne(t)?U.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function wne(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function Tne(){return Object.fromEntries(cm.map(e=>[e,M().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${lm[e]}, as a #rrggbb hex string.`}).optional()]))}function Nm(){return une.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}var Pm=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),Fm=52428800,Im=26214400,Lm=12582912,Rm=`https://api.openai.com/v1`,zm=`text-embedding-3-small`,Bm=96e3,Vm=3e4,Hm=2048,Um=16384e3,Wm=6e5,Gm=Object.freeze([`127.0.0.1`]),Ene=/^[1-9]\d*(s|m|h)$/,Dne=/^https?:\/\//,One=24550;function kne(e){let t;try{t=new URL(e)}catch{return!1}let n=t.hostname.toLowerCase();return n===`localhost`||n===`127.0.0.1`||n===`[::1]`}function Ane(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&kne(e)?null:`insecure-scheme`}function Km(e){let t=e.trim();return t===``?`./`:t}function jne(e){let t=Km(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}var qm=L({content:L({dir:M().register(U,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore. Read at server start; changing it requires a restart.`}).default(`.`),attachmentFolderPath:M().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(jne,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:L({theme:R([`light`,`dark`,`system`]).register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),language:R([`system`,...Qp]).register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Interface language. 'system' follows the operating system. A personal preference (user scope) — not shared with the project, and never applied to document content.`}).optional(),colorThemeLight:M().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${Nm()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project.`}).regex(Om,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorThemeDark:M().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`IDE color palette applied in dark mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), one of ${Nm()}, or the id of a saved theme. A short id of lowercase letters, digits, and hyphens (max 32 characters); an id no palette matches falls back to 'default' for this mode only, leaving the rest of your config untouched. A personal preference (user scope) — not shared with the project.`}).regex(Om,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorTheme:M().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A short theme id (lowercase letters, digits, and hyphens; max 32 characters); an id no palette matches falls back to 'default'. A personal preference (user scope) — not shared with the project.`}).regex(Om,{message:`Theme id must be lowercase letters, digits, and hyphens, 1–32 characters (e.g. 'dracula', 'custom', or a saved theme id).`}).optional(),colorThemeEnabled:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:L({name:M().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:M().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:R([`dark`,`light`]).register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted.`}).optional(),...Tne()}).optional(),preview:L({autoOpen:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:L({showHiddenFiles:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillGroups:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Group skills in the sidebar by where they came from — the publisher they were imported from, or the plugin that ships them. Skills you authored stay ungrouped at the top of their scope. Per-machine (project-local) — not shared with collaborators.`}).default(!0),pinnedProjectSkills:F(M()).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Project-scope skills pinned to the top of the Skills sidebar, by name. A pinned skill also keeps its normal row, so a provenance group still lists everything from its source. Per-machine (project-local) — not shared with collaborators.`}).default([]),pinnedGlobalSkills:F(M()).register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Global-scope skills pinned to the top of the Skills sidebar, by name. Stored per USER rather than per project, so a pinned global skill follows you into every project.`}).default([])}).optional()}).default({preview:{autoOpen:!0}}),editor:L({wordWrap:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0),previewTabs:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:L({autoApproveOkTools:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:L({mode:R(np).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`What this machine syncs on a schedule for this project: 'off' (Manual — nothing scheduled; the manual pull/push actions still work), 'follow' (Auto, pull only — scheduled pulls, never a scheduled push; 'pull' is accepted as a legacy alias), or 'full' (Auto, pull and push — bidirectional). Explicit user-triggered pushes work in every mode. null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:R(rp).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),pullIntervalSeconds:N().int().min(30).max(lp).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Seconds between scheduled pulls while autoSync.mode is follow or full (default 30). An unauthenticated follower is additionally floored to the anonymous poll minimum, so a lower value there has no effect. Per-machine (project-local) — not shared.`}).optional().catch(void 0),pushIntervalSeconds:N().int().min(30).max(lp).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Seconds between scheduled pushes while autoSync.mode is full (default 60). Ignored in every other mode, which never pushes on a schedule. Each cycle with pending edits authors a commit, so a shorter interval means more, smaller commits in the repo's shared history. Per-machine (project-local) — not shared.`}).optional().catch(void 0),default:Ya([P(),R(np)]).register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:L({enabled:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null),shell:M().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Absolute Windows shell executable override for the in-app terminal. PowerShell, cmd.exe, and Git Bash support OpenKnowledge-managed launches (agent chat tabs and fixed commands such as Resolve in terminal or Install Slidev) and dropped-file path insertion. A different existing executable remains usable for plain terminal tabs and shows a capability notice; requested agent and command launches open only the plain shell without running the agent or command, and dropped-file paths are refused. Empty values use automatic shell discovery. Per-machine (project-local), human-managed, and never shared via git, clone, or sync.`}).optional()}).default({enabled:null}),slides:L({enabled:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:L({localSink:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:L({maxBytes:N().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(Fm)}).default({maxBytes:Fm}),logs:L({maxBytes:N().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(Im)}).default({maxBytes:Im}),attributeDenylist:F(M()).register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...Pm])}).default({enabled:!0,spans:{maxBytes:Fm},logs:{maxBytes:Im},attributeDenylist:[...Pm]}),skillInstallReports:L({enabled:P().register(U,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off.`}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:Fm},logs:{maxBytes:Im},attributeDenylist:[...Pm]},skillInstallReports:{enabled:!0}}),lossCapture:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:N().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default(Lm)}).default({enabled:!0,maxBytes:Lm}),bridge:L({backgroundThrottle:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:L({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:L({semantic:L({enabled:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:M().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(Rm),model:M().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(zm),dimensions:N().int().positive().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:N().min(0).max(1).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional(),maxBatchSize:N().int().min(1).max(Hm).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Maximum number of text chunks sent in one indexing request (1–2048, default 96). The ceiling follows OpenAI's input-array limit; other providers may impose different limits. Larger requests may still be split by the character budget. Changing it preserves cached vectors and document chunking; it applies to the next indexing pass. Invalid values use the default and are reported by ok config validate and server logs.`}).default(96).catch(96),maxBatchChars:N().int().min(1).max(Um).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Approximate cumulative character budget per indexing request (1–16384000, default 96000). A single chunk can exceed this budget. OpenAI separately caps total input at 300000 tokens per request; this character budget does not enforce that limit, and high values can produce rejected requests. Other providers have their own limits. Changing it preserves cached vectors and document chunking; it applies to the next indexing pass. Invalid values use the default and are reported by ok config validate and server logs.`}).default(Bm).catch(Bm),docTimeoutMs:N().int().min(1).max(Wm).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Timeout in milliseconds for each indexing request attempt (1–600000, default 30000). A request can retry four times, and a failed grouped request can trigger individual-document requests. There is no total indexing-pass deadline: large timeouts can delay newly queued work for hours. The query timeout remains 8 seconds per attempt. Changing it preserves cached vectors and applies to the next indexing pass; an in-progress pass keeps its current timeout. Invalid values use the default and are reported by ok config validate and server logs.`}).default(Vm).catch(Vm)}).default({enabled:!1,baseUrl:Rm,model:zm,maxBatchSize:96,maxBatchChars:Bm,docTimeoutMs:Vm})}).default({semantic:{enabled:!1,baseUrl:Rm,model:zm,maxBatchSize:96,maxBatchChars:Bm,docTimeoutMs:Vm}}),contentRules:L({markdownlint:I({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:I({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:F(I({appliesTo:Ya([M(),F(M())]).optional(),file:M(),enabled:P().optional()})).register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]}),okf:I({enabled:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the OKF plugin (Open Knowledge Format portability + conformance rules) contributes diagnostics. Advisory warnings; never blocks a write.`}).default(!1),rules:to(M(),P()).register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Per-rule opt-outs for the OKF plugin, keyed by rule id (e.g. no-wiki-links). Omit a rule to leave it enabled; set false to silence it while keeping the plugin on.`}).optional(),generate:I({index:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether OK generates and maintains a navigation index.md in every folder that contains Markdown, each listing the documents in that folder grouped by frontmatter type and linking to its subfolders. OK owns these files: edits to them are replaced on the next rebuild.`}).default(!1)}).default({index:!1})}).default({enabled:!1,generate:{index:!1}})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]},okf:{enabled:!1,generate:{index:!1}}}),validation:L({links:R(am).register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(om),fileTreeIndicators:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0),suppressLogLinkAdvisories:P().register(U,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether unresolved links in the reserved change-history documents (lowercase-stemmed log.md / log.mdx at any depth, where the extension's case does not matter and the stem's does) are omitted from broken-link advisories: the Problems panel, file-tree indicators, source diagnostics, audits, and agent write/edit results. Default true. Raw link views still show them, and LOG.md, Log.md, and every other stem spelling are ordinary documents.`}).default(!0)}).default({links:om,fileTreeIndicators:!0,suppressLogLinkAdvisories:!0}),linkPreviews:L({enabled:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),server:L({port:N().int().min(1).max(65535).register(U,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`TCP port the server listens on. Unset by default: a local start picks a free port dynamically, and deployment platforms inject the PORT environment variable instead. Read at server start; changing it requires a restart.`}).optional(),bind:F(M().min(1)).min(1).register(U,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Addresses the server binds, e.g. [127.0.0.1] or [0.0.0.0]. Default loopback-only ([127.0.0.1]): nothing off this machine can connect. A non-loopback bind additionally requires the server.allowExternal consent interlock. Per-machine (project-local): a value committed to .ok/config.yml is ignored, so one machine exposing the server can never break local clones for the rest of the team — the exposing host sets it via OK_BIND, --bind, or .ok/local/config.yml. Lists replace, never merge. Read at server start; changing it requires a restart.`}).default([...Gm]),externalUrl:ya({protocol:/^https?$/}).regex(Dne).register(U,{scope:`project`,agentSettable:!1,reload:`boot`,defaultScope:`project`,description:`Canonical external origin the server is reached at, e.g. https://kb.example.com — its host joins the Host/Origin allowlists (external-Host + CORS admission). Unset by default: the server admits only loopback Hosts. Setting it declares external exposure, which additionally requires the server.allowExternal consent interlock. Read at server start; changing it requires a restart.`}).optional(),allowExternal:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Exposure consent interlock. A non-loopback server.bind without allowExternal: true is refused at boot with a one-line fix; a server.externalUrl without it boots (a committed externalUrl never arms exposure on clones — but it is project-scoped, so its host still joins the Host/Origin allowlists there), but requests carrying forwarding headers (X-Forwarded-For etc.) are refused until consent is given — proxy tolerance requires both keys. Default off. The server has no authentication of its own, so only consent behind an authenticating edge. Per-machine (project-local) — consent never travels via git, clone, or share; containers consent via the environment instead.`}).default(!1),openBrowser:P().register(U,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Open the UI in a browser when the server starts. Default derived: true when every bind address is loopback (a laptop start pops the UI), false otherwise (a container or exposed bind is headless and must never try). Acts once at start. Per-machine (project-local) — not shared.`}).optional(),idleShutdown:Ya([z(`off`),M().regex(Ene)]).register(U,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Shut the server down after this long with no activity: a duration like '30m' (positive integer with unit s, m, or h), or 'off'. Default derived: '30m' for a loopback-only, unexposed server; 'off' otherwise — a non-loopback bind, or a loopback bind declared externally reachable (server.allowExternal + server.externalUrl), stays up, because a remote agent keeps it busy over /mcp, which the idle timer does not count. Residual case the derivation cannot see: a loopback server reached by remote agents with no server.externalUrl (e.g. behind a same-box reverse proxy) still idles at 30m — set 'off' by hand. Reloadable — a valid change applies without a restart. Per-machine (project-local) — not shared.`}).optional()}).default({bind:[...Gm],allowExternal:!1})}),Mne=`open-knowledge-config`;function Jm(e,t,n){let r=c.getTracer(Mne),i=t?{attributes:t}:{};return r.startActiveSpan(e,i,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:s.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Ym(e,t){let n=c.getActiveSpan();n&&n.addEvent(e,t)}function Nne(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function Xm(e,t){let n=e;for(let e of t){n=Nne(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function Zm(e,t){let n=Xm(e,t);if(n!==void 0)return Mm(n)}function Pne(e,t){return e===`either`?!0:e===t}function Fne(e,t){let n=null;function r(e,i){if(n!==null||e===void 0)return;if(typeof e==`object`&&e&&!Array.isArray(e)){for(let[t,a]of Object.entries(e))if(r(a,[...i,t]),n!==null)return;return}let a=Zm(qm,i);a?.scope!==void 0&&(Pne(a.scope,t)||(n={code:`SCOPE_VIOLATION`,path:i,expectedScope:a.scope,actualScope:t}))}for(let[t,i]of Object.entries(e))if(r(i,[t]),n!==null)break;return n}function Qm(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&(qs(e.getIn(r,!0))||e.deleteIn(r))}}function Ine(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){Qm(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}Qm(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Lne(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}var $m=I({file:M(),line:N().int().min(1),column:N().int().min(1),snippet:M().optional()}),Rne=I({path:F(Ya([M(),N()])),message:M(),issueCode:M(),params:to(M(),Ha()).optional(),source:$m.optional()}),zne=R([`user`,`project`,`project-local`,`either`]),eh=R([`user`,`project`,`project-local`]),th=I({code:z(`YAML_PARSE`),detail:M()}),nh=I({code:z(`UNREADABLE`),detail:M()}),rh=I({code:z(`SCHEMA_INVALID`),issues:F(Rne)}),ih=I({code:z(`REMOVED_KEY`),path:F(M()),redirect:M(),source:$m.optional()}),ah=I({path:F(M()),message:M(),source:$m.omit({snippet:!0}).optional()}),oh=I({code:z(`VALUE_FALLBACK`),issues:F(ah)}),sh=Za(`code`,[th,rh,nh,I({code:z(`SCOPE_VIOLATION`),path:F(M()),expectedScope:zne,actualScope:eh}),I({code:z(`NOT_AGENT_SETTABLE`),path:F(M())}),I({code:z(`MIXED_SCOPE`),paths:F(I({path:F(M()),scope:eh}))}),ih,I({code:z(`NOT_SYNCED`),detail:M()}),I({code:z(`WRITE_ERROR`),detail:M()}),I({code:z(`OKIGNORE_INVALID`),detail:M(),lineNumber:N().int().min(1).optional()}),I({code:z(`UNKNOWN`),message:M().optional()})]);Za(`code`,[ih,oh,th,rh,nh]),I({diagnostics:F(Za(`code`,[I({code:z(`VALUE_FALLBACK`),scope:eh,file:M(),issues:F(ah.omit({source:!0}).extend({line:$m.shape.line.optional(),column:$m.shape.column.optional()}))}),I({code:z(`REMOVED_KEY`),scope:eh,file:M(),path:F(M()),redirect:M()}),I({code:z(`YAML_PARSE`),scope:eh,file:M()}),I({code:z(`SCHEMA_INVALID`),scope:eh,file:M()}),I({code:z(`UNREADABLE`),scope:eh,file:M()})]))});var Bne=new Set(sh.options.map(e=>e.shape.code.value)),Vne=Ya([sh,L({code:M(),message:M().optional()})]);function ch(e){return Bne.has(e.code)}function lh(e){switch(e){case`user`:return`~/.ok/global.yml`;case`project`:return`.ok/config.yml`;case`project-local`:return`.ok/local/config.yml`;case`either`:return`.ok/config.yml or ~/.ok/global.yml`}}function Hne(e){switch(e){case`user`:return`personal to you, across all projects`;case`project`:return`shared with your team via git`;case`project-local`:return`this machine only, not shared`;case`either`:return`user or project`}}function Une(e){if(e.code===`VALUE_FALLBACK`){let t=oh.safeParse(e);if(t.success){if(t.data.issues.length===0)return`Configuration loaded with defaults for invalid settings.`;let e=[`Configuration loaded with defaults for invalid settings:`];for(let n of t.data.issues)n.source&&e.push(` ${n.source.file}:${n.source.line}:${n.source.column}`),e.push(` ${n.path.join(`.`)}: ${n.message}`);return e.join(`
|
|
178
178
|
`)}}if(!ch(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`UNREADABLE`:return`Could not read the file: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
|
|
@@ -515,7 +515,7 @@ $2`).split(`
|
|
|
515
515
|
`)}function R2(e,t,n,r,i,a,o){if(e.kind===`lines`)return P2(e.startLine,e.endLine,n);if(e.kind===`anchor`)return N2(e.markdown,n);let s=M2(e.markdown);return l2(L2(t,``,s,r,i),a,o)<=u2(o,a2)?s:N2(e.markdown,n)}function z2(e,t,n,r){let{target:i}=e,a=e.transport??`url`,o=q0(e.docRelativePath),s=`Let's work on @${o} using OpenKnowledge.`,c=R2(t,s,o,n,r,i,a);return L2(s,E2(e.instruction,i,e=>L2(s,e,c,n,r),a),c,n,r)}function B2(e){let{target:t}=e,n=e.autoOpen?A2:``,r=F2(e.mentions);if(e.scope===`doc`&&e.selection!==void 0)return z2(e,e.selection,r,n);let i=I2(e);return L2(i,E2(e.instruction,t,e=>L2(i,e,``,r,n),e.transport??`url`),``,r,n)}function V2(e){let t=q0(e.relativePath),n=e.ruleAlias===void 0?`${e.source}/${e.code}`:`${e.source}/${e.code} (${e.ruleAlias})`,r=[`Fix this lint problem in @${t} using OpenKnowledge.`,``,`Problem: ${n} at line ${e.line}, column ${e.column}:`,``,j2(e.message.trim())],i=e.lineText??``;if(i.trim()!==``){let t=h2(i);r.push(``,`Line ${e.line} reads:`,``,t,i,t)}return r.push(``,`Edit @${t} via the OpenKnowledge MCP server, then re-lint it to confirm the problem is resolved.`),r.join(`
|
|
516
516
|
`)}function H2(e){if(e===null)return[`Fix every problem across this project's documents using OpenKnowledge.`,``,"Run the `audit` tool for the current list of lint violations and broken links, then work file by file — the `lint` tool with `fix: true` clears one document's mechanically-fixable problems at a time — and re-audit until it reports no problems."].join(`
|
|
517
517
|
`);let t=q0(e);return[`Fix every problem in @${t} using OpenKnowledge.`,``,`Run the \`audit\` tool scoped to it for the current list of lint violations and broken links, then fix each one — the \`lint\` tool with \`fix: true\` clears the mechanically-fixable ones — and re-audit @${t} until it reports no problems.`].join(`
|
|
518
|
-
`)}function U2(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}var W2=new Set([`opencode.json`]),G2=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function K2(e){return G2.test(e)}function q2(e){return K2(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:W2.has(e.slice(e.lastIndexOf(`/`)+1))}function J2(e,t){let n=U2(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var Y2=M().superRefine(J2).optional(),X2=M().superRefine(J2),Z2={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},Q2=M().optional(),$2=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Za(`kind`,[I({kind:z(`doc`),docPath:M().min(1)}).loose(),I({kind:z(`folder`),folderPath:M()}).loose()]);var e4=R([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),t4=R([`current`,`stale`,`absent`,`empty`]),n4=Za(`ok`,[I({ok:z(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:t4.optional().catch(void 0)}).loose(),I({ok:z(!1),error:e4,branch:M().min(1).optional()}).loose()]),r4=R([`user`,`org`]),i4=I({login:M().min(1),kind:r4,avatarUrl:M().optional()}).loose(),a4=R([`auth-required`,`network`]),o4=Za(`ok`,[I({ok:z(!0),owners:F(i4)}).loose(),I({ok:z(!1),error:a4}).loose()]),s4=Za(`ok`,[I({ok:z(!0),available:P()}).loose(),I({ok:z(!1),error:a4}).loose()]),c4=R([`public`,`private`]);I({owner:M().min(1),name:M().min(1),visibility:c4,description:M().optional()}).loose();var l4=R([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),u4=Za(`ok`,[I({ok:z(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:z(!1),error:l4}).loose()]);function d4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var f4=e=>e.refine(d4,`invalid branch name`),p4={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()};Za(`detached`,[I({detached:z(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Ba(),...p4}).loose(),I({detached:z(!0),currentBranch:Ba(),currentHeadSha:M().min(1),...p4}).loose()]),I({branch:f4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose();var m4=R([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]);Za(`ok`,[I({ok:z(!0)}).loose(),I({ok:z(!1),reason:m4,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]),R([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]),I({branch:f4(M().min(1)),path:M(),kind:R([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),Za(`verdict`,[I({verdict:z(`on-origin`)}).loose(),I({verdict:z(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:z(`deleted`)}).loose(),I({verdict:z(`never-on-branch`)}).loose(),I({verdict:z(`changed-locally`)}).loose(),I({verdict:z(`unknown`)}).loose()]).catch({verdict:`unknown`});var h4=I({startedAt:M().min(1),httpListenMs:N().nonnegative().optional(),seedWalkMs:N().nonnegative().optional(),indexesMs:N().nonnegative().optional(),readyMs:N().nonnegative().optional(),fileCount:N().nonnegative().optional()}),g4=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:to(M().min(1),M().min(1)).optional(),boot:h4.optional(),collabClients:N().int().nonnegative().optional()}).loose(),_4=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:R([`git-config`,`synthesized`]),created_at:M().min(1)}).loose();I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose();var v4=R(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:symlink-refused.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:derived-index-unavailable.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:stale-external-write.urn:ok:error:doc-removed.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`)),y4=I({type:v4,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex($2,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose();I({parentDocName:M().min(1),placement:R([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose();var b4=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose();I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(d4,`invalid branch name`).optional()}).loose(),I({type:z(`error`),problem:y4}).loose();function x4(e){let t=e??(typeof navigator>`u`?void 0:navigator);return t===void 0?[]:t.languages!==void 0&&t.languages.length>0?dh(t.languages):t.language===void 0?[]:dh([t.language])}var S4={en:`ltr`,"zh-Hans":`ltr`,"zh-Hant":`ltr`,hi:`ltr`,es:`ltr`,ar:`rtl`,fr:`ltr`,bn:`ltr`,"pt-BR":`ltr`,id:`ltr`,ur:`rtl`,ko:`ltr`};function C4(e){let t=new Intl.Locale(e).getTextInfo?.().direction;return t===`rtl`||t===`ltr`?t:S4[e]}function w4(e,t){let n=t.map(e=>[fh(e),e]);for(let t of e){let e=fh(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function T4(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=w4([t],i);if(e!==void 0)return{locale:e,source:`override`}}if(n!==void 0&&n!==`system`&&i.includes(n))return{locale:n,source:`explicit`};let o=w4(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}var E4=R(of),D4=L({hosts:F(M()),scope:E4,scripts:P(),installedAt:Hi(),projection:R([`symlink`,`copy`]).optional(),contentHash:M().optional()});L({schema:z(1),skills:to(M(),D4).default({})});var O4=`extra/screenshot.png`,k4=`extra/attachments/`,A4=3145728,j4=[`image/png`,`image/jpeg`,`image/webp`],M4={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function N4(e){return e.startsWith(k4)}var P4=[{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`linux-home-path`,regex:/\/home\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`windows-home-path`,regex:/[A-Za-z]:\\{1,2}Users\\{1,2}(?:(?![A-Za-z]:\\)[^\\"\r])+/gi,replacement:`~`}];P4.map(e=>e.name);function F4(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
518
|
+
`)}function U2(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}var W2=new Set([`opencode.json`]),G2=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function K2(e){return G2.test(e)}function q2(e){return K2(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:W2.has(e.slice(e.lastIndexOf(`/`)+1))}function J2(e,t){let n=U2(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}var Y2=M().superRefine(J2).optional(),X2=M().superRefine(J2),Z2={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},Q2=M().optional(),$2=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;Za(`kind`,[I({kind:z(`doc`),docPath:M().min(1)}).loose(),I({kind:z(`folder`),folderPath:M()}).loose()]);var e4=R([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),t4=R([`current`,`stale`,`absent`,`empty`]),n4=Za(`ok`,[I({ok:z(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:t4.optional().catch(void 0)}).loose(),I({ok:z(!1),error:e4,branch:M().min(1).optional()}).loose()]),r4=R([`user`,`org`]),i4=I({login:M().min(1),kind:r4,avatarUrl:M().optional()}).loose(),a4=R([`auth-required`,`network`]),o4=Za(`ok`,[I({ok:z(!0),owners:F(i4)}).loose(),I({ok:z(!1),error:a4}).loose()]),s4=Za(`ok`,[I({ok:z(!0),available:P()}).loose(),I({ok:z(!1),error:a4}).loose()]),c4=R([`public`,`private`]);I({owner:M().min(1),name:M().min(1),visibility:c4,description:M().optional()}).loose();var l4=R([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),u4=Za(`ok`,[I({ok:z(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:z(!1),error:l4}).loose()]);function d4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}var f4=e=>e.refine(d4,`invalid branch name`),p4={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()};Za(`detached`,[I({detached:z(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Ba(),...p4}).loose(),I({detached:z(!0),currentBranch:Ba(),currentHeadSha:M().min(1),...p4}).loose()]),I({branch:f4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose();var m4=R([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]);Za(`ok`,[I({ok:z(!0)}).loose(),I({ok:z(!1),reason:m4,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]),R([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]),I({branch:f4(M().min(1)),path:M(),kind:R([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),Za(`verdict`,[I({verdict:z(`on-origin`)}).loose(),I({verdict:z(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:z(`deleted`)}).loose(),I({verdict:z(`never-on-branch`)}).loose(),I({verdict:z(`changed-locally`)}).loose(),I({verdict:z(`unknown`)}).loose()]).catch({verdict:`unknown`});var h4=I({startedAt:M().min(1),httpListenMs:N().nonnegative().optional(),seedWalkMs:N().nonnegative().optional(),indexesMs:N().nonnegative().optional(),readyMs:N().nonnegative().optional(),fileCount:N().nonnegative().optional()}),g4=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:to(M().min(1),M().min(1)).optional(),boot:h4.optional(),collabClients:N().int().nonnegative().optional()}).loose(),_4=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:R([`git-config`,`synthesized`]),created_at:M().min(1)}).loose();I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose();var v4=R(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:symlink-refused.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:derived-index-unavailable.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:stale-external-write.urn:ok:error:store-refused.urn:ok:error:doc-removed.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`)),y4=I({type:v4,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex($2,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose();I({parentDocName:M().min(1),placement:R([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose();var b4=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose();I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(d4,`invalid branch name`).optional()}).loose(),I({type:z(`error`),problem:y4}).loose();function x4(e){let t=e??(typeof navigator>`u`?void 0:navigator);return t===void 0?[]:t.languages!==void 0&&t.languages.length>0?dh(t.languages):t.language===void 0?[]:dh([t.language])}var S4={en:`ltr`,"zh-Hans":`ltr`,"zh-Hant":`ltr`,hi:`ltr`,es:`ltr`,ar:`rtl`,fr:`ltr`,bn:`ltr`,"pt-BR":`ltr`,id:`ltr`,ur:`rtl`,ko:`ltr`};function C4(e){let t=new Intl.Locale(e).getTextInfo?.().direction;return t===`rtl`||t===`ltr`?t:S4[e]}function w4(e,t){let n=t.map(e=>[fh(e),e]);for(let t of e){let e=fh(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function T4(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=w4([t],i);if(e!==void 0)return{locale:e,source:`override`}}if(n!==void 0&&n!==`system`&&i.includes(n))return{locale:n,source:`explicit`};let o=w4(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}var E4=R(of),D4=L({hosts:F(M()),scope:E4,scripts:P(),installedAt:Hi(),projection:R([`symlink`,`copy`]).optional(),contentHash:M().optional()});L({schema:z(1),skills:to(M(),D4).default({})});var O4=`extra/screenshot.png`,k4=`extra/attachments/`,A4=3145728,j4=[`image/png`,`image/jpeg`,`image/webp`],M4={"image/png":`png`,"image/jpeg":`jpg`,"image/webp":`webp`};function N4(e){return e.startsWith(k4)}var P4=[{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)(?:\\"[^\s"\\]+\\"|"[A-Za-z0-9\-._~+/=]+"|[^\s"\\]+)/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@"]+:[^/\s:@"]+@/g,replacement:`://[REDACTED]@`},{name:`github-pat-fine-grained`,regex:/\bgithub_pat_[0-9A-Za-z_]{20,}/g,replacement:`[REDACTED-GH-PAT]`},{name:`openai-key-modern`,regex:/\bsk-(?:proj|svcacct|admin|None)-[A-Za-z0-9_-]{20,}/g,replacement:`[REDACTED-OPENAI]`},{name:`slack-token`,regex:/\bxox[a-z]-[A-Za-z0-9-]{10,}/g,replacement:`[REDACTED-SLACK]`},{name:`google-api-key`,regex:/\bAIza[0-9A-Za-z_-]{35}/g,replacement:`[REDACTED-GOOGLE]`},{name:`stripe-secret-key`,regex:/\b(?:sk|rk)_live_[0-9A-Za-z]{16,}\b/g,replacement:`[REDACTED-STRIPE]`},{name:`gitlab-pat`,regex:/\bglpat-[0-9A-Za-z_-]{20,}/g,replacement:`[REDACTED-GITLAB]`},{name:`bearer-token-json`,regex:/("[Aa]uthorization"\s*:\s*"[Bb]earer\s+)(?:\\"[^"\\]+\\"|[^"\\]+)/g,replacement:`$1[REDACTED]`},{name:`macos-home-path`,regex:/\/Users\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`linux-home-path`,regex:/\/home\/[^/"\r]*[^/"\r\\]/g,replacement:`~`},{name:`windows-home-path`,regex:/[A-Za-z]:\\{1,2}Users\\{1,2}(?:(?![A-Za-z]:\\)[^\\"\r])+/gi,replacement:`~`}];P4.map(e=>e.name);function F4(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
519
519
|
`).map(e=>{let r=e,i=!1;for(let{name:e,regex:n,replacement:a}of P4)n.lastIndex=0,n.test(r)&&(t.add(e),i=!0,n.lastIndex=0,r=r.replace(n,a));return i&&n++,r}).join(`
|
|
520
520
|
`),patterns:[...t],lineCount:n}}function I4(e){return F4(e).redacted}var L4=8192,R4=32768,z4=`…[truncated]`,B4=[`level`,`time`,`pid`,`hostname`,`msg`,`name`,`runtime`,`subsystem`,`trace_id`,`span_id`,`trace_flags`];function V4(e){let t=I4(e).trim();if(t.length===0||t[0]!==`{`)return null;let n;try{n=JSON.parse(t)}catch{return null}if(typeof n!=`object`||!n||Array.isArray(n))return null;let r=n;for(let e of B4)delete r[e];return{event:typeof r.event==`string`?r.event:void 0,fields:r}}function H4(e){return e.length<=8192?e:`${e.slice(0,8180)}${z4}`}function U4(e){return e.includes("`")?`~`:"`"}function W4(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
|
|
521
521
|
`)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}var G4=/notionvc:/i,K4=()=>e=>{q4(e)&&(J4(e),Y4(e))};function q4(e){if(!(`children`in e)||!Array.isArray(e.children))return!1;for(let t of e.children){if(t.type===`comment`){let e=String(t.value??``);if(G4.test(e))return!0}if(t.type===`element`&&q4(t))return!0}return!1}function J4(e){if(!(`children`in e)||!Array.isArray(e.children))return;for(let t of e.children)t.type===`element`&&J4(t);let t=[];for(let n of e.children){if(n.type!==`text`){t.push(n);continue}let e=String(n.value??``);if(!e.includes(`
|
|
@@ -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=Kue(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=Yue(e.instancePath);n!==null&&(o=a.get(n)??0);let r=Xue(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(`, `)}${z5(s)}`;else if(t===`format`&&R5(e.params)!==void 0){let t=e.params.format;l=`Frontmatter property "${r}" must be ${R5(e.params)} (format "${String(t)}")${z5(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 V5=`doc`;function Zue(e,t){return bG(e,_G({strings:{[V5]:e},config:t})[V5]??[])}function Que(e,t){let n=_G({strings:{[V5]:e},config:t})[V5]??[],r=e.split(`
|
|
595
595
|
`),i=$ue(t);return n.map(e=>tde(e,r,ede(e,i)))}function $ue(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 ede(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 tde(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?[nde(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 nde(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 H5=[`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 U5(e,t){return e?.[t]!==!1}var rde=[{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 ide(e){throw Error(`Unhandled OkfRuleId variant: ${JSON.stringify(e)}`)}function ade(e){throw Error(`Unhandled OkfRuleGroupId variant: ${JSON.stringify(e)}`)}var ode=`.ok/okf`;function sde(e){return`${e.replace(/^frontmatter-/,``)}.schema.json`}function W5(e){return`${ode}/${sde(e)}`}var cde={$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."}}},lde={$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."}}},ude={$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."}}},dde={$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."}}}}},fde={$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},pde={$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.'}}},G5=[`**`,`!**/{index,log}`],K5=[{id:`frontmatter-required`,appliesTo:G5,schema:cde},{id:`frontmatter-recommended`,appliesTo:G5,schema:lde},{id:`frontmatter-provenance`,appliesTo:G5,schema:ude},{id:`frontmatter-computation`,appliesTo:G5,schema:dde},{id:`frontmatter-reserved-index`,appliesTo:[`**/index`,`!index`],schema:fde},{id:`frontmatter-root-index`,appliesTo:[`index`],schema:pde}],mde=Object.fromEntries(H5.filter(e=>!K5.some(t=>t.id===e)).map(e=>[e,!1]));function q5(e,t){return t===void 0?[]:K5.filter(n=>U5(e,n.id)&&A5([...n.appliesTo]).matches(t))}function hde(e){return K5.filter(t=>U5(e,t.id)).map(e=>({appliesTo:[...e.appliesTo],file:W5(e.id)}))}function gde(e,t,n){let r=q5(t,n);return r.length===0?[]:B5(e,r.map(e=>({file:W5(e.id),schema:e.schema,ruleId:e.id})),{source:`okf`})}function J5(e,t){return xG(`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 Y5(e,t,n){let r=A5(t);return J5(e,(e,t)=>{r.matches(t.data.okfDocName)&&n(e,t)})}var X5=e=>({line:e.line-1,character:e.column-1});function _de(e,t){if(e&&`start`in e)return{start:X5(e.start),end:X5(e.end)};if(e){let n=X5(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 vde(e,t){return{range:_de(e.place,t),severity:`warning`,source:`okf`,code:e.ruleId??`okf`,message:e.reason}}function yde(e,t,n){if(t.length===0)return[];let r=xe().use(re).use(pe).use(aF,[`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=>vde(e,o))}var bde=`**/index`;function xde(e){let t=!1;return Ee(e,[`link`,`linkReference`],()=>(t=!0,!1)),t}var Sde=Y5(`index-shape`,bde,(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`)||xde(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)})}),Cde=`**/log`,wde=/^\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 Ede=/^\s*\d{4}[-/.]\d{1,2}[-/.]\d{1,2}/;function Z5(e){let t=e.trim();return t.length>60?`${t.slice(0,59)}…`:t}var Dde=Y5(`log-shape`,Cde,(e,t)=>{let n;Ee(e,`heading`,e=>{if(e.depth!==2)return;let r=be(e),i=wde.exec(r);if(!i){t.message(Ede.test(r)?`Log date heading "${Z5(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 "${Z5(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})}),Ode=/\[\[[^[\]\n]+\]\]/g;function kde(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 Ade=J5(`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(Ode)){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(kde(e[0]),s)}})}),jde=[`index`,`log`],Mde=J5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=J$(n),i=r.toLowerCase();jde.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.`)}),Q5=[{id:`no-wiki-links`,rule:Ade},{id:`log-shape`,rule:Dde},{id:`index-shape`,rule:Sde},{id:`reserved-casing`,rule:Mde}],Nde=Q5.map(e=>e.rule);function Pde(e){return e===void 0?Nde:Q5.filter(t=>U5(e,t.id)).map(e=>e.rule)}var Fde=Ya([P(),R(sm),to(M(),Ha())]),Ide={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:to(M(),Fde)}),defaultSlice:{enabled:!1,rules:D5},async lint(e,t){return Que(e,O5(t.rules))},fix(e,t){return Zue(e,O5(t.rules))}},Lde=I({appliesTo:Ya([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:to(M(),Ha()).optional()}),$5=[Ide,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(Lde)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return B5(e,N5(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>N5(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:to(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...yde(e,Pde(t.rules),n.docName),...gde(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>q5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...mde}}),advertisedMappings:e=>hde(e.rules)}}],Rde={enabled:!0,plugins:Object.fromEntries($5.map(e=>[e.id,e.defaultSlice]))};function zde(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function Bde(e,t){if(!e?.enabled||t===void 0||t===``)return[];let n=[];for(let r of $5){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 Vde(e){let t=Object.fromEntries($5.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 Hde=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function Ude(e){return Hde.has(e)}I({docName:Y2,summary:Q2,content:M().optional(),...Z2}).loose(),I({docName:Y2,summary:Q2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(F$).optional(),...Z2}).loose(),I({docName:Y2,summary:Q2,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...Z2}).loose(),I({docName:Y2,connectionId:M().min(1),scope:R([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...Z2}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var e7=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Wde=Za(`kind`,[I({kind:z(`inline`),content:M()}),I({kind:z(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),t7=I({kind:z(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Wde.optional(),hint:M().optional()}).loose(),Gde=I({type:z(`orphan`),parentCandidates:F(M()),message:M()}).loose(),n7=I({kind:z(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();Za(`kind`,[t7,n7]);var Kde=I({kind:z(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),r7=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(),i7=F(Za(`kind`,[t7,n7,Kde,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:r7.optional()}).loose()])).min(1),a7=F(I({href:M(),resolvedTo:M().nullable(),reason:R([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:r7.optional()}).loose()),o7=I({reason:M().min(1),count:N().int().positive()}).loose();I({timestamp:M().min(1),summary:e7.optional(),warnings:i7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(Gde).optional(),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose(),I({docName:M().min(1),scope:R([`last`,`session`,`count`]),undone:P()}).loose(),I({docs:F(I({docName:X2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(F$).optional(),summary:Q2}).loose()).min(1).max(100),...Z2}).loose();var qde=I({type:v4,title:M(),detail:M().optional()}).loose(),Jde=Za(`status`,[I({status:z(`written`),docName:M().min(1),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose(),I({status:z(`error`),docName:M().min(1),error:qde}).loose()]);I({timestamp:M().min(1),results:F(Jde),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),I({docName:Y2,patch:to(M(),Ya([jd,Ba()])),types:to(M(),R(Od)).optional(),summary:Q2,...Z2}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose();function Yde(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??D5},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 Xde=Object.fromEntries($5.map(e=>[e.id,e.sliceSchema])),Zde=I({effective:I({enabled:P(),plugins:I(Xde)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Qde=Ya([P(),to(M(),Ha())]),$de=new Set([`__proto__`]),s7=M().min(1).max(256).refine(e=>!$de.has(e),{message:`schema property name cannot be __proto__`});I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:Ya([Qde,Ba()])}),I({file:M().min(1).max(512),delete:z(!0).optional(),field:s7.optional(),parentPath:F(Ya([s7,I({items:z(!0)}).strict()])).max(8).optional(),removeField:z(!0).optional(),renameTo:s7.optional(),constraint:I({type:R([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(Ya([M(),N(),P()])).nullable().optional(),itemsEnum:F(Ya([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 efe=I({schemas:F(M()),truncated:P()}).strict(),c7=I({line:N(),character:N()}),l7=I({start:c7,end:c7}),u7=I({range:l7,severity:R([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:l7,newText:M()})).optional(),frontmatterScope:R(rm).optional(),frontmatterProperty:M().optional()}),d7=F(M()).optional();I({files:F(I({file:M(),diagnostics:F(u7),ran:d7,warnings:F(M()).optional()})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:d7});var tfe=u7.extend({linkTarget:M().optional(),localTarget:r7.optional()}),nfe=I({files:F(I({file:M(),diagnostics:F(tfe)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:d7,brokenLinkSuppression:o7.optional()}),f7=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),rfe=I({files:F(I({file:M(),lint:f7,links:f7})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:o7.optional()});I({docName:Y2,summary:Q2,...Z2}).loose();var ife=I({reason:R([`re-lint-threw`,`source-went-blind`]),message:M().min(1)}),afe=I({file:M(),fixedCount:N(),diagnostics:F(u7),errorCount:N(),warningCount:N(),ran:d7,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:ife.optional()});function ofe(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 sfe(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:ofe(e)&&t.endsWith(`.json`)}var p7=[{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}]}],cfe=(()=>{let e=new Map;for(let t of p7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function m7(e){return cfe.get(e.toUpperCase())??null}function lfe(e,t){let n=m7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))m7(t)===n&&(r={key:t,value:i});return r}var ufe=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],dfe=[[`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 ffe(e){for(let[t,n]of dfe)if(e.tags.includes(t))return n;return`Style`}function pfe(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 mfe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of $5){if(!zde(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:hfe(e)})}}return i}var h7=500;function hfe(e){let t=g7(e);return t.length>h7?`${t.slice(0,h7)}… (truncated)`:t}function g7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${g7(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 gfe=/\p{M}+/gu,_fe=/[^\p{L}\p{N}]+/gu,vfe=/^-+|-+$/g;function _7(e){return e.trim().normalize(`NFKD`).replace(gfe,``).toLowerCase().replace(_fe,`-`).replace(vfe,``)}function yfe(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function v7(e,t){let n=_7(e);return n?yfe(n,t):``}function y7(e,t){let n=_7(e);return t?`#${n}-${_7(t)}`:`#${n}`}var b7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),bfe=new Map(K3.flatMap(e=>e.surface===`compat`&&b7.has(e.rendersAs)?[[e.name,e]]:[]));function x7(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 S7(e){let t=e.name;if(!t||!b7.has(t))return null;let n=x7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function C7(e){let t=e.name;if(!t)return null;let n=bfe.get(t);if(!n)return null;let r=x7(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 xfe=(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:y7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Sfe=(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:y7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Cfe=(e,t)=>{let n=t,r=S7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=C7(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)},wfe=(e,t)=>{let n=t,r=S7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=C7(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)},Tfe=(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)]},Efe=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},Dfe=(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 w7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(w7).join(``):``}var T7={wikiLink:xfe,wikiLinkEmbed:Sfe,mdxJsxFlowElement:Cfe,mdxJsxTextElement:wfe,rawMdxFallback:Tfe,mark:Efe,underline:Dfe,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:w7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:w7(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)}},Ofe=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,kfe=/\bexpression\s*\(/i,Afe=1e4;function jfe(e){return!(e.length>Afe||Ofe.test(e)||kfe.test(e))}function E7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!v1(e.split(/\s+/)[0]??``))return!1}return!0}var Mfe={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Nfe=new Set([`href`,`src`]),Pfe=g(`<>`),D7=()=>e=>{Ee(e,`element`,e=>{let t=Mfe[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`?k6(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Nfe.has(e))if(t===`<>`||t===Pfe)r=``;else{let e=k6(t);r=e===t?t:g(e)}else r=k6(t);r!==t&&(n[e]=r)}})},O7=()=>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`&&!v1(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`&&!v1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!v1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!E7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!E7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!v1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!jfe(r)&&delete n.style})};function Ffe(e){let t=xe().use(Se,{handlers:T7}).use(D7).use(O7).use(CG),n=t.runSync(e);return String(t.stringify(n))}function Ife(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(k7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(k7(e.slice(r),r>0,!1)),n.join(``)}function k7(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 A7=/\r?\n|\r/,Lfe=(e,t)=>{let n=Ife(String(t.value));if(!A7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(A7),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 Rfe(e){let t=xe().use(re).use(aF,[`yaml`]).use(F8).use(pe).use(n5).use(C6).use(U8).use(F6).use(Se,{handlers:{...T7,text:Lfe}}).use(D7).use(O7).use(CG);return String(t.processSync(x6(P6(e))))}for(let e of[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}]){let t=K3.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.`)}MI(),ZF(),QF(),I({intents:F(I({satisfierId:M().min(1),desired:R([`present`,`absent`])}).loose()),...Z2,summary:Q2}).loose();var zfe=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(),Bfe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),Vfe=I({state:M(),strictness:F(R(Xo)).optional()}).loose(),Hfe=I({probes:I({env:R([`desktop`,`local-web`,`remote-web`]),satisfiers:to(M(),Vfe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),Ufe=I({actions:F(zfe),conflicts:F(Bfe),withheld:F(M()),snapshot:Hfe}).loose();I({entries:F(I({level:R([`info`,`warn`,`error`]),message:M().max(L4),event:M().optional(),fields:to(M(),Ha()).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 Wfe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),Gfe=F(Ya([M(),N().int().nonnegative()])),Kfe=Za(`kind`,[I({kind:z(`body`)}),I({kind:z(`property`),key:M().min(1),path:Gfe.default([])})]).default({kind:`body`}),qfe=R([`anchored`,`orphaned`,`resolved`]),j7=I({threadId:M().min(1),docName:M().min(1),target:Kfe,anchor:Wfe.nullable(),state:qfe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),M7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),N7=I({threadId:M(),ok:z(!0)}),P7=I({threadId:M(),ok:z(!1),error:z(`not-found`)});I({threads:F(j7)}).loose();var Jfe=I({meta:j7,orphaned:P()}).loose(),Yfe=I({threadId:M()}).loose();I({meta:j7,payload:M7}).loose();var Xfe=I({results:F(Ya([N7.extend({meta:j7,payload:M7}),P7]))}).loose(),Zfe=I({results:F(Ya([N7.extend({meta:j7}),P7]))}).loose(),Qfe=I({status:M().min(1),reason:M()}).loose(),$fe=I({docName:M().min(1),content:M(),lifecycle:Qfe.nullable()}).loose(),F7=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)`}),epe=I({documents:F(F7),truncated:P().optional()}).loose(),tpe=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),npe=I({docName:M().min(1),backlinks:F(tpe)}).loose(),rpe=I({counts:to(M().min(1),N().int().nonnegative())}).loose();I({counts:to(M().min(1),N().int().nonnegative())}).loose();var ipe=Za(`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()]),ape=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(),ope=I({docName:M().min(1),forwardLinks:F(ipe),localTargets:F(ape).optional()}).loose(),spe=Za(`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()]),cpe=I({source:M().min(1),target:M().min(1)}).loose(),lpe=I({nodes:F(spe),links:F(cpe)}).loose(),upe=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(),dpe=I({app:Ya([z(`cursor`),z(`codex`),z(`claude`),Ba()]),signals_fired:F(M())}).loose();I({entries:F(upe),count:N().int().min(0),detection:dpe}).loose();var I7=I({path:M().min(1),code:R([`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `]),origPath:M().min(1).optional(),syncScoped:P(),open:Za(`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(I7),notStaged:F(I7),untracked:F(I7),incoming:F(I7),truncated:P(),readable:P().default(!0)}).loose(),I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:Q2,...Z2}).loose(),I({checkpointRef:M().min(1)}).loose();var fpe=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(fpe),checkpoint:Ha().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 ppe=I({contentDir:M().min(1),pathSeparator:R([`/`,`\\`]),symlinkResolved:P()}).loose();F(Za(`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 L7=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose();I({url:M()}).loose();var mpe=Za(`ok`,[I({ok:z(!0),metadata:L7}).loose(),I({ok:z(!1),reason:M()}).loose()]),hpe=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),gpe=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),_pe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose();I({deadLinks:F(I({target:M().min(1),sources:F(_pe)}).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 vpe=R([`not-a-git-worktree`,`init-failed`]);Za(`ok`,[I({ok:z(!0),projectPath:M().min(1)}).loose(),I({ok:z(!1),reason:vpe,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 ype=R([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),bpe=Za(`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:ype,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 xpe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),Spe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(xpe)}).loose(),Cpe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),wpe=I({sessionAlive:P(),agent:Cpe.nullable(),files:F(Spe)}).loose(),Tpe=I({diff:M(),before:M(),after:M(),properties:L0,generatedAt:N().int().min(0)}).loose();I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose();var Epe=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:to(M().min(1),Epe)}).loose();var Dpe=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(Dpe)}).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(),to(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 Ope=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),kpe=I({fromPath:M().min(1),toPath:M().min(1)}).loose();I({}).loose(),I({path:M().min(1),...Z2,summary:Q2}).loose();var Ape=I({docName:M().min(1)}).loose();I({path:M().min(1),...Z2,summary:Q2}).loose();var jpe=I({path:M().min(1)}).loose();I({kind:R([`file`,`folder`]),path:M().min(1),...Z2,summary:Q2}).loose();var Mpe=I({kind:R([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),Npe=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(),Ppe=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),Fpe=I({docName:M().min(1),headings:F(Ppe)}).loose(),Ipe=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose();I({kind:R([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...Z2,summary:Q2}).loose();var Lpe=I({renamed:F(Ope),renamedAssets:F(kpe),rewrittenDocs:F(Ipe).optional(),summary:e7.optional()}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Z2}).loose();var Rpe=I({deletedDocNames:F(M().min(1))}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Z2,summary:Q2}).loose();var zpe=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:Q2,...Z2}).loose(),I({restoredFrom:M().min(1),timestamp:M().min(1),summary:e7.optional(),warnings:i7.optional()}).loose();var Bpe=/^#[0-9a-fA-F]{6}$/,Vpe=I(Object.fromEntries(cm.map(e=>[e,M().regex(Bpe,`must be a #rrggbb hex color`)]))),R7=M().min(1).refine(fm,{message:`must contain a non-whitespace character`}),z7=I({name:R7,author:R7.optional(),variant:R([`dark`,`light`]),palette:Vpe}).loose(),Hpe=I({name:M().min(1),scheme:z7,stem:M().min(1).optional(),extension:R([`.yaml`,`.yml`]).optional()}).loose(),Upe=I({id:M().min(1),filename:M().min(1)}).loose(),Wpe=I({id:M().min(1),scheme:z7}).loose(),Gpe=I({id:M().min(1),filename:M().min(1)}).loose(),Kpe=Za(`existed`,[I({existed:z(!1)}).loose(),I({existed:z(!0),filename:M().min(1),scheme:z7}).loose()]),qpe=I({themes:F(Za(`ok`,[I({ok:z(!0),id:M().min(1),filename:M().min(1),scheme:z7}),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(),Jpe=R([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),Ype=I({label:M().min(1),webUrl:ya().nullable()}).loose(),Xpe=Za(`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()]),B7=R([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),Zpe=R(ep),Qpe=R([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);I({state:Jpe,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:Ype.nullable().optional(),pushError:M().optional(),pushErrorCode:B7.optional(),pullError:M().optional(),pullErrorCode:B7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:Xpe.optional(),syncMode:Zpe.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:Qpe.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();var V7=R([`merge-native`,`working-tree`,`reconcile`]),H7=R([`merged-with-markers`,`refused-conflict-markers`,`refused-too-large`,`disk-markers`,`stale-external-write`]),$pe=R([`mine`,`theirs`,`content`,`delete`]),eme=I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflict:V7,reason:H7.optional(),conflictKind:R([`git`,`stale-external-write`]).optional(),docName:M().nullable(),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();var tme=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:R([`both-modified`,`delete-modify`,`modify-delete`]),conflict:V7,reason:H7.optional(),conflictKind:R([`git`,`stale-external-write`]).optional(),resolutionOptions:F($pe)}).loose();I({plan:Ao(e=>e!==void 0,{message:`plan is required`})}).loose(),I({plan:Ao(e=>e!==void 0,{message:`plan is required`})}).loose(),I({result:Ao(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 nme=I({path:M().min(1),summary:M().min(1)}).loose(),rme=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(nme),entryCounts:rme}).loose())}).loose(),I({noOpen:P().optional(),out:M().min(1).optional()}).loose();var ime=I({reason:R([`unsupported-platform`,`spawn-error`]),message:M()}).loose();Za(`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:ime.optional()}).loose(),I({status:z(`failed`),buildError:M()}).loose(),I({status:z(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]);var U7=R(He),W7=R(Ue);function ame(e){return e===`agents`||Ue.includes(e)}var ome=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),sme=[`.md`,`.mdx`,`.txt`],cme=5e3,lme=4;function G7(e){return Math.round(e/lme)}function ume(e){let t=e.lastIndexOf(`.`);return t===-1?!1:sme.includes(e.slice(t).toLowerCase())}function dme(e){let t=G7((e.name??``).length+(e.description??``).length),n=G7(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/`)||ume(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:G7(i)}}I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose();var fme=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose();I({name:M().min(1),docs:F(fme)}).loose(),I({folder:Ha(),frontmatter_local:to(M(),Ha()).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:to(M(),Ha()).optional()}).loose(),I({applied:Ha()}).loose();var K7=to(M(),Ha()).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:K7,body:M()}).strict()}).strict();var pme=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:K7.optional(),...Z2,summary:Q2}).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(),...Z2,summary:Q2}).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:K7.optional(),...Z2,summary:Q2}).strict(),I({from:M().min(1),to:M().min(1),committed:P()}).strict();var q7=R(of),mme=/^[a-z0-9-]+$/,hme=/^[A-Za-z0-9_-]+$/,J7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict();I({skill:I({name:M().min(1),scope:q7,path:M().min(1),frontmatter:J7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict();var gme=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),_me=I({name:M().min(1),description:M().optional(),scope:q7,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:to(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:gme.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:ome.optional()}).strict();I({name:M().min(1),scope:q7,apply:P().optional()}).strict(),I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict();var vme=I({skills:F(_me),truncated:P()}).strict();I({scope:q7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:J7,...Z2,summary:Q2}).strict();var Y7=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:Y7}).strict(),I({scope:q7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...Z2,summary:Q2}).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:Y7}).strict(),I({scope:q7.default(`project`),name:M(),...Z2,summary:Q2}).strict(),I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict();var X7=`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. ${X7}`})}).strict(),I({scope:q7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:J7.optional(),...Z2,summary:Q2}).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. ${X7}`})}).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:q7,toScope:q7,...Z2,summary:Q2}).strict();var yme=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function bme(e){return typeof e==`string`&&yme.includes(e)}var xme=[`intact`,`lossy`,`unknown`];function Sme(e){return typeof e==`string`&&xme.includes(e)}var Cme=[`unreadable`,`occupant-unverifiable`];function wme(e){return typeof e==`string`&&Cme.includes(e)}var Tme={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function Z7(e){return Tme[e]}function Eme(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=bme(n)?n:void 0,o=Sme(r)?r:void 0,s=wme(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}:(Z7(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 Dme=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function Ome(e){if(e===void 0)return[];let t=Dme;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}I({scope:q7,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. ${X7}`})}).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:q7,name:M(),toName:M(),...Z2,summary:Q2}).strict(),I({name:M().min(1)}).strict(),I({name:M(),home:M().min(1)}).strict(),I({docName:M().min(1)}).strict();var Q7=R([`reference`,`script`,`file`]);I({scope:q7.default(`project`),name:M(),path:M().min(1),content:M(),...Z2,summary:Q2}).strict(),I({path:M().min(1),created:P(),kind:Q7,content:P()}).strict(),I({scope:q7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...Z2,summary:Q2}).strict(),I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I({path:M().min(1),kind:Q7,text:M()}).strict(),I({path:M().min(1),existed:P(),kind:Q7}).strict();var $7=Ya([W7,z(`agents`)]),e9=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`}),t9=Ya([$7,e9]);I({scope:q7.default(`project`),name:M(),targets:F($7).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(t9).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(t9).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:t9.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:t9.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(),...Z2,summary:Q2,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:q7.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 kme=I({targets:F(U7),configured:P(),folders:F(I({scope:q7,host:M(),root:M(),state:R([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:z(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),n9=I({action:z(`link`),scope:q7,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.`})}),r9=I({action:z(`unlink`),scope:q7,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(),i9=I({action:z(`add-root`),scope:q7,root:e9.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),Ame=Za(`action`,[n9.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),r9,i9]);Za(`action`,[n9.strict(),r9,i9]),I({folderAction:Ame}).strict();var a9=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict();I({targets:F(U7),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:a9.optional()}).strict(),I({scope:q7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...Z2,summary:Q2}).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 jme=I({kind:R([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:to(M(),Ha()),snippet:M().optional()}).loose(),Mme=R([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),o9=R([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Nme(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function Pme(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Fme(e,t){let n=e?.providerErrorReason;switch(n){case null:case void 0:return e?.providerError===!0;case`corpus`:return!1;case`query`:return t===`query`;case`warm`:case`dimensions`:case`configured_dimensions`:return!0;default:return Pme(n)}}function Ime(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}var s9=I({capable:P(),applied:P(),outcome:Mme,providerErrorReason:o9.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),Lme=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:R([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:o9.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function Rme(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}I({query:M(),intent:R([`autocomplete`,`full_text`,`omnibar`]),results:F(jme),elapsedMs:N().nonnegative(),semantic:s9.optional(),truncated:P().optional(),ready:P().optional()}).loose();var zme=I({version:M().min(1),recordedAt:M().min(1)}).loose();I({currentVersion:M().min(1),targets:to(M(),zme.nullable())}).loose(),I({scope:q7.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."}),...Z2,summary:Q2}).strict(),I({scope:q7.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."}),...Z2,summary:Q2}).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:Y7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),I({scope:q7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...Z2,summary:Q2}).strict(),I({results:F(I({requested:M(),status:R([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:Y7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose();var Bme=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:Bme,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:Y7}).loose();var Vme=`server-info`,Hme=`branch-switched`,Ume=`disk-ack`,Wme=`config-validation-rejected`,Gme=`config-ignore-nested-error`,c9=R([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),Kme=I({v:z(1),ch:z(Vme),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),qme=I({v:z(1),ch:z(Hme),seq:N(),branch:M().min(1)}).loose(),Jme=I({v:z(1),ch:c9,seq:N()}).loose(),Yme=I({v:z(1),ch:z(Ume),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),Xme=I({v:z(1),ch:z(Wme),seq:N(),docName:M().min(1),error:Vne}).loose(),Zme=I({v:z(1),ch:z(Gme),seq:N(),path:M().min(1),error:M().min(1)}).loose(),Qme=100,$me=500,ehe=450,the={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},l9=new WeakMap;function nhe(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 rhe=/\.(?:md|mdx)$/;function ihe(e,t){if(t!==`page`)return e;let n=e.replace(rhe,``);return n.length>0?n:e}function d9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function ahe(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 ohe(){let e=aJ({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=yJ({schema:the,components:{tokenizer:ohe()}});return e.length>0&&AJ(t,e),t}function she(e){let t={documents:e};return l9.set(t,m9(e)),t}function che(e){let t=l9.get(e);if(t)return t;let n=m9(e.documents);return l9.set(e,n),n}function lhe(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 uhe(e,t){let n=u9(t);if(!n)return 0;let r=ihe(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 dhe=.5;function g9(e,t){let n=uhe(e,t);return n<=0?n:q2(e.path)?n*dhe:n}function fhe(e){return e===`file`?-60:0}var phe=1e3,mhe=50,hhe=1,ghe=1;function _he(e,t,n,r,i){let a=i>0?t/i:0,o=n/mhe,s=r===`file`?-.001:0,c=hhe*a+ghe*o+s;return e*phe+c}function _9(e,t,n,r){return e+t*20+n+fhe(r)}function v9(e,t,n,r,i,a){return e===`relevance`?_9(t,n,r,i):_he(t,n,r,i,a)}function vhe(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 yhe(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 bhe(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function xhe(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 She=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Che(e,t){let n=u9(t);return n.length<4||She.test(n)?0:+(e===`full_text`)}function whe(e){let{lexical:t,fullText:n}=e.signals;return t>=$me?`lexical`:t===ehe&&n<=0?`pathOnly`:`body`}function The(e){let t=[],n=[],r=[];for(let i of e){let e=whe(i);e===`lexical`?t.length<Qme&&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=The(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 Ehe(e,t,n={}){let r=n.intent??`omnibar`,i=vhe(r,n.ranking),a=nhe(n.limit),o=new Set(n.scopes??lhe(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=oY(che(e),{term:c,properties:bhe(r),boost:xhe(r),tolerance:Che(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=yhe(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(Dhe({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 Dhe(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 Ohe(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}function khe(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function Ahe(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]=fr());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:Hi().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()}),jhe=L({enabled:P().register(w9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Hi().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:to(M(),jhe).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 Mhe(e){return e===`right`||e===`bottom`?e:E9}function Nhe(e){return typeof e!=`number`||!Number.isFinite(e)?O9:Math.max(k9,Math.round(e))}var Phe=new Set([`(connected)`,`(agent thread)`]);function Fhe(e){return e!=null&&Phe.has(e)}var Ihe=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 Lhe(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 zhe(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 Bhe(e){if(typeof e!=`string`||e.length===0)return e;let t=k3(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(D3(e)){let t=zhe(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=T3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Vhe=`https://api.github.com/repos/inkeep/open-knowledge`;async function Hhe(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Vhe,{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 Uhe=/^(#{1,6})\s+(.+)$/;function Whe(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(Uhe);if(!n)return null;let r=n[2].trim(),i=v7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var Ghe=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=Ghe;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 Khe={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},qhe=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Jhe={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Yhe={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},M9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function Xhe(e,t=qhe){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Zhe(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 Qhe(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 $he={"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 ege(e){return e?$he[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function tge(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 nge(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 rge(e){let[t]=tge(e);return nge(t,45,32)}var ige=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],age=[`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 oge(){return`${F9(ige)} ${F9(age)}`}function sge(){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 cge(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=j9(),n=I9(N9),r=I9(P9);return n||(n=oge(),L9(N9,n)),r||(r=sge(),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 lge(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function uge(e){return e.split(`/`).map(lge).join(`/`)}function dge(e){return e.split(`/`).map(R9).join(`/`)}function fge(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(!F$.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 pge(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 mge(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=dge(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=fge(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 hge(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 gge(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 _ge(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}`),`${uge(l)}${r}${n?`#${n}`:``}`}function vge(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 yge=`unknown`;function bge(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return yge;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 xge(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 Sge(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 Cge(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=_7(e);if(n){if(U9(t))return t.pagesBySlug.get(n);for(let e of t)if(_7(e)===n)return e}}function Y9(e,t){if(e.includes(`/`))return;let n=_7(e);if(!n)return;if(U9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);_7(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=_7(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 wge(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=wge(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 Tge(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 Ege(e,t,n){let r=hge(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{B4 as $,OT as $a,xge as $i,H2 as $n,Ane as $o,hY as $r,Ef as $s,U7 as $t,L$ as A,die as Aa,_te as Ac,c5 as Ai,H0 as An,qm as Ao,x5 as Ar,tf as As,L4 as At,j0 as B,Pw as Ba,M as Bc,Ohe as Bi,mge as Bn,Op as Bo,ege as Br,Zd as Bs,Upe as Bt,Z$ as C,cj as Ca,ene as Cc,Rfe as Ci,ide as Cn,G as Co,B9 as Cr,cp as Cs,Fpe as Ct,Ape as D,Rk as Da,Dte as Dc,r1 as Di,ZX as Dn,tm as Do,a1 as Dr,$f as Ds,y4 as Dt,jpe as E,Ck as Ea,kte as Ec,w$ as Ei,_$ as En,Dp as Eo,r$ as Er,Zf as Es,_4 as Et,epe as F,nD as Fa,F as Fc,T3 as Fi,_ge as Fn,zm as Fo,cge as Fr,of as Fs,_1 as Ft,gpe as G,rT as Ga,Ke as Gc,yY as Gi,Xhe as Gn,$p as Go,rse as Gr,Pd as Gs,s9 as Gt,efe as H,dT as Ha,oee as Hc,x4 as Hi,pQ as Hn,Wm as Ho,ase as Hr,lf as Hs,Wpe as Ht,$fe as I,rD as Ia,P as Ic,vge as Ii,khe as In,jp as Io,X9 as Ir,Nf as Is,mme as It,f1 as J,ET as Ja,We as Jc,$9 as Ji,A5 as Jn,Dm as Jo,Qoe as Jr,sf as Js,n4 as Jt,$ce as K,aT as Ka,Be as Kc,gge as Ki,xQ as Kn,Qp as Ko,$oe as Kr,uf as Ks,Lme as Kt,Mpe as L,eD as La,ha as Lc,V4 as Li,Lhe as Ln,om as Lo,T0 as Lr,Mf as Ls,Khe as Lt,Yfe as M,vE as Ma,Ko as Mc,y8 as Mi,U0 as Mn,Rm as Mo,bge as Mr,ef as Ms,H1 as Mt,c9 as N,tE as Na,R as Nc,Mhe as Ni,Cge as Nn,Vm as No,Hhe as Nr,$d as Ns,Lpe as Nt,Rde as O,zk as Oa,Os as Oc,Ome as Oi,C$ as On,cm as Oo,lfe as Or,jf as Os,Jfe as Ot,F7 as P,TT as Pa,No as Pc,Nhe as Pi,Sge as Pn,Bm as Po,v7 as Pr,Vd as Ps,h1 as Pt,$5 as Q,qw as Qa,Bhe as Qi,e2 as Qn,bm as Qo,Eme as Qr,Af as Qs,a9 as Qt,k$ as R,Mw as Ra,z as Rc,w0 as Ri,cQ as Rn,One as Ro,j$ as Rr,Dd as Rs,Kpe as Rt,A9 as S,lj as Sa,Zte as Sc,sQ as Si,ade as Sn,Lh as So,D0 as Sr,Xm as Ss,q$ as St,Zfe as T,Pk as Ta,Ote as Tc,Coe as Ti,zY as Tn,kp as To,nX as Tr,bne as Ts,Xfe as Tt,M9 as U,fT as Ua,Nt as Uc,vX as Ui,mQ as Un,Um as Uo,Xoe as Ur,cf as Us,Gpe as Ut,ope as V,Fw as Va,aee as Vc,j9 as Vi,Nme as Vn,wp as Vo,ise as Vr,Kf as Vs,z7 as Vt,b3 as W,Jw as Wa,ze as Wc,_X as Wi,i1 as Wn,Hm as Wo,Zoe as Wr,zd as Ws,qpe as Wt,m1 as X,dw as Xa,Z9 as Xi,i2 as Xn,Np as Xo,ese as Xr,df as Xs,o4 as Xt,p1 as Y,HE as Ya,Je as Yc,Ege as Yi,k2 as Yn,Tp as Yo,Yoe as Yr,If as Ys,s4 as Yt,I$ as Z,HC as Za,d$ as Zi,r2 as Zn,mm as Zo,tse as Zr,xf as Zs,u4 as Zt,N$ as _,y7 as _a,zo as _c,Z7 as _i,k0 as _n,Ng as _o,z0 as _r,vne as _s,G$ as _t,Ufe as a,Bde as aa,Sf as ac,q2 as ai,hme as an,tC as ao,Q0 as ar,yp as as,bpe as at,gQ as b,mj as ba,Wo as bc,mfe as bi,B2 as bn,ug as bo,hQ as br,fp as bs,O9 as bt,O4 as c,oQ as ca,ff as cc,U5 as ci,pme as cn,K_ as co,u$ as cr,ch as cs,A4 as ct,qme as d,rQ as da,Jte as dc,K2 as di,Y$ as dn,D_ as do,E8 as dr,ap as ds,V1 as dt,Whe as ea,yf as ec,S1 as ei,kme as en,$E as eo,n2 as er,hp as es,w1 as et,Zme as f,d1 as fa,Yte as fc,y1 as fi,Ihe as fn,q as fo,q3 as fr,Zp as fs,rde as ft,Kme as g,W4 as ga,Ro as gc,ame as gi,E0 as gn,Pg as go,V$ as gr,xm as gs,cme as gt,Yme as h,H4 as ha,Ns as hc,Rme as hi,nfe as hn,Ag as ho,rge as hr,Km as hs,Z0 as ht,Tpe as i,Vde as ia,wf as ic,sfe as ii,eme as in,xS as io,$0 as ir,pm as is,afe as it,Rpe as j,NE as ja,Bo as jc,C0 as ji,kY as jn,Mp as jo,Qhe as jr,Qd as js,ufe as jt,E9 as k,Ek as ka,Hte as kc,SZ as ki,V0 as kn,lm as ko,Nue as kr,nf as ks,R4 as kt,rpe as l,B0 as la,Of as lc,U$ as li,zpe as ln,Y_ as lo,l$ as lr,Xp as ls,k9 as lt,Jme as m,_7 as ma,Qte as mc,v1 as mi,rfe as mn,wg as mo,ahe as mr,sp as ms,X0 as mt,Yhe as n,Ehe as na,kf as nc,R$ as ni,vme as nn,mC as no,D2 as nr,Mm as ns,mpe as nt,j4 as o,Fme as oa,Xf as oc,E3 as oi,z$ as on,M_ as oo,dX as or,Yp as os,W$ as ot,Xme as p,Yde as pa,Ds as pc,Tge as pi,b4 as pn,kg as po,she as pr,Cm as ps,H5 as pt,u1 as q,oT as qa,Ve as qc,T4 as qi,SQ as qn,up as qo,nse as qr,Rd as qs,g4 as qt,wpe as r,U4 as ra,mf as rc,H9 as ri,tme as rn,vS as ro,t2 as rr,Une as rs,Zde as rt,M4 as s,A0 as sa,Hd as sc,Ude as si,l0 as sn,J as so,Zhe as sr,im as ss,p7 as st,Jhe as t,I4 as ta,Yf as tc,N4 as ti,W7 as tn,IE as to,V2 as tr,gne as ts,lpe as tt,npe as u,Iue as ua,Wd as uc,Fhe as ui,X$ as un,K as uo,pfe as ur,qp as us,Eue as ut,M$ as v,Y0 as va,Lo as vc,M0 as vi,ppe as vn,T_ as vo,ffe as vr,wm as vs,H$ as vt,j7 as w,GA as wa,nne as wc,Ffe as wi,Ime as wn,bp as wo,I0 as wr,Sne as ws,Npe as wt,P$ as x,oj as xa,Go as xc,C4 as xi,pge as xn,W as xo,A$ as xr,xne as xs,K$ as xt,dQ as y,d9 as ya,Io as yc,D3 as yi,wZ as yn,o_ as yo,dme as yr,Cne as ys,hpe as yt,N0 as z,VE as za,I as zc,k3 as zi,Ahe as zn,vp as zo,Soe as zr,Pf as zs,Hpe as zt};
|
|
597
|
+
`?(c+=1,l=1):l+=1;return{line:c,column:l}};for(let e of o.matchAll(Ode)){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(kde(e[0]),s)}})}),jde=[`index`,`log`],Mde=J5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=J$(n),i=r.toLowerCase();jde.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.`)}),Q5=[{id:`no-wiki-links`,rule:Ade},{id:`log-shape`,rule:Dde},{id:`index-shape`,rule:Sde},{id:`reserved-casing`,rule:Mde}],Nde=Q5.map(e=>e.rule);function Pde(e){return e===void 0?Nde:Q5.filter(t=>U5(e,t.id)).map(e=>e.rule)}var Fde=Ya([P(),R(sm),to(M(),Ha())]),Ide={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:to(M(),Fde)}),defaultSlice:{enabled:!1,rules:D5},async lint(e,t){return Que(e,O5(t.rules))},fix(e,t){return Zue(e,O5(t.rules))}},Lde=I({appliesTo:Ya([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:to(M(),Ha()).optional()}),$5=[Ide,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(Lde)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return B5(e,N5(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>N5(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:to(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...yde(e,Pde(t.rules),n.docName),...gde(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>q5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...mde}}),advertisedMappings:e=>hde(e.rules)}}],Rde={enabled:!0,plugins:Object.fromEntries($5.map(e=>[e.id,e.defaultSlice]))};function zde(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function Bde(e,t){if(!e?.enabled||t===void 0||t===``)return[];let n=[];for(let r of $5){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 Vde(e){let t=Object.fromEntries($5.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 Hde=new Set([`.markdownlint.json`,`.markdownlint.jsonc`]);function Ude(e){return Hde.has(e)}I({docName:Y2,summary:Q2,content:M().optional(),...Z2}).loose(),I({docName:Y2,summary:Q2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(F$).optional(),...Z2}).loose(),I({docName:Y2,summary:Q2,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...Z2}).loose(),I({docName:Y2,connectionId:M().min(1),scope:R([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...Z2}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});var e7=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Wde=Za(`kind`,[I({kind:z(`inline`),content:M()}),I({kind:z(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),t7=I({kind:z(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Wde.optional(),hint:M().optional()}).loose(),Gde=I({type:z(`orphan`),parentCandidates:F(M()),message:M()}).loose(),n7=I({kind:z(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();Za(`kind`,[t7,n7]);var Kde=I({kind:z(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),r7=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(),i7=F(Za(`kind`,[t7,n7,Kde,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:r7.optional()}).loose()])).min(1),a7=F(I({href:M(),resolvedTo:M().nullable(),reason:R([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:r7.optional()}).loose()),o7=I({reason:M().min(1),count:N().int().positive()}).loose();I({timestamp:M().min(1),summary:e7.optional(),warnings:i7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(Gde).optional(),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose(),I({docName:M().min(1),scope:R([`last`,`session`,`count`]),undone:P()}).loose(),I({docs:F(I({docName:X2,markdown:M(),position:R([`append`,`prepend`,`replace`]).optional(),extension:R(F$).optional(),summary:Q2}).loose()).min(1).max(100),...Z2}).loose();var qde=I({type:v4,title:M(),detail:M().optional()}).loose(),Jde=Za(`status`,[I({status:z(`written`),docName:M().min(1),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose(),I({status:z(`error`),docName:M().min(1),error:qde}).loose()]);I({timestamp:M().min(1),results:F(Jde),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),I({docName:Y2,patch:to(M(),Ya([jd,Ba()])),types:to(M(),R(Od)).optional(),summary:Q2,...Z2}).loose(),I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:e7.optional(),warnings:i7.optional(),brokenLinks:a7,brokenLinkSuppression:o7.optional()}).loose();function Yde(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??D5},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 Xde=Object.fromEntries($5.map(e=>[e.id,e.sliceSchema])),Zde=I({effective:I({enabled:P(),plugins:I(Xde)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Qde=Ya([P(),to(M(),Ha())]),$de=new Set([`__proto__`]),s7=M().min(1).max(256).refine(e=>!$de.has(e),{message:`schema property name cannot be __proto__`});I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:Ya([Qde,Ba()])}),I({file:M().min(1).max(512),delete:z(!0).optional(),field:s7.optional(),parentPath:F(Ya([s7,I({items:z(!0)}).strict()])).max(8).optional(),removeField:z(!0).optional(),renameTo:s7.optional(),constraint:I({type:R([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(Ya([M(),N(),P()])).nullable().optional(),itemsEnum:F(Ya([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 efe=I({schemas:F(M()),truncated:P()}).strict(),c7=I({line:N(),character:N()}),l7=I({start:c7,end:c7}),u7=I({range:l7,severity:R([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:l7,newText:M()})).optional(),frontmatterScope:R(rm).optional(),frontmatterProperty:M().optional()}),d7=F(M()).optional();I({files:F(I({file:M(),diagnostics:F(u7),ran:d7,warnings:F(M()).optional()})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:d7});var tfe=u7.extend({linkTarget:M().optional(),localTarget:r7.optional()}),nfe=I({files:F(I({file:M(),diagnostics:F(tfe)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:d7,brokenLinkSuppression:o7.optional()}),f7=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),rfe=I({files:F(I({file:M(),lint:f7,links:f7})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:o7.optional()});I({docName:Y2,summary:Q2,...Z2}).loose();var ife=I({reason:R([`re-lint-threw`,`source-went-blind`]),message:M().min(1)}),afe=I({file:M(),fixedCount:N(),diagnostics:F(u7),errorCount:N(),warningCount:N(),ran:d7,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:ife.optional()});function ofe(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 sfe(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:ofe(e)&&t.endsWith(`.json`)}var p7=[{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}]}],cfe=(()=>{let e=new Map;for(let t of p7){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function m7(e){return cfe.get(e.toUpperCase())??null}function lfe(e,t){let n=m7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))m7(t)===n&&(r={key:t,value:i});return r}var ufe=[`Headings`,`Lists`,`Whitespace`,`Code`,`Links & images`,`Style`],dfe=[[`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 ffe(e){for(let[t,n]of dfe)if(e.tags.includes(t))return n;return`Style`}function pfe(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 mfe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of $5){if(!zde(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:hfe(e)})}}return i}var h7=500;function hfe(e){let t=g7(e);return t.length>h7?`${t.slice(0,h7)}… (truncated)`:t}function g7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${g7(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 gfe=/\p{M}+/gu,_fe=/[^\p{L}\p{N}]+/gu,vfe=/^-+|-+$/g;function _7(e){return e.trim().normalize(`NFKD`).replace(gfe,``).toLowerCase().replace(_fe,`-`).replace(vfe,``)}function yfe(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function v7(e,t){let n=_7(e);return n?yfe(n,t):``}function y7(e,t){let n=_7(e);return t?`#${n}-${_7(t)}`:`#${n}`}var b7=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]),bfe=new Map(K3.flatMap(e=>e.surface===`compat`&&b7.has(e.rendersAs)?[[e.name,e]]:[]));function x7(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 S7(e){let t=e.name;if(!t||!b7.has(t))return null;let n=x7(e);return n===null?null:{type:`element`,tagName:t,properties:n,children:[]}}function C7(e){let t=e.name;if(!t)return null;let n=bfe.get(t);if(!n)return null;let r=x7(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 xfe=(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:y7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Sfe=(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:y7(r,i)},children:n.children.length>0?e.all(n):[{type:`text`,value:n.value}]};return e.patch(t,o),e.applyData(t,o)},Cfe=(e,t)=>{let n=t,r=S7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=C7(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)},wfe=(e,t)=>{let n=t,r=S7(n);if(r)return n.children.length>0&&(r.children=e.all(n)),e.patch(t,r),e.applyData(t,r);let i=C7(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)},Tfe=(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)]},Efe=(e,t)=>{let n={type:`element`,tagName:`mark`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)},Dfe=(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 w7(e){if(typeof e!=`object`||!e)return``;let t=e;return typeof t.value==`string`?t.value:Array.isArray(t.children)?t.children.map(w7).join(``):``}var T7={wikiLink:xfe,wikiLinkEmbed:Sfe,mdxJsxFlowElement:Cfe,mdxJsxTextElement:wfe,rawMdxFallback:Tfe,mark:Efe,underline:Dfe,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:w7(t).replace(/--/g,`—`)};return e.patch(t,n),e.applyData(t,n)},commentBlock:(e,t)=>{let n={type:`comment`,value:w7(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)}},Ofe=/url\s*\(\s*['"]?\s*(?:javascript|vbscript|data)\s*:/i,kfe=/\bexpression\s*\(/i,Afe=1e4;function jfe(e){return!(e.length>Afe||Ofe.test(e)||kfe.test(e))}function E7(e){for(let t of e.split(`,`)){let e=t.trim();if(e!==``&&!v1(e.split(/\s+/)[0]??``))return!1}return!0}var Mfe={a:[`href`,`title`],img:[`src`,`alt`,`title`],video:[`src`,`title`],audio:[`src`,`title`],code:[`className`]},Nfe=new Set([`href`,`src`]),Pfe=g(`<>`),D7=()=>e=>{Ee(e,`element`,e=>{let t=Mfe[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`?k6(e):e);r.some((e,n)=>e!==t[n])&&(n[e]=r);continue}if(typeof t!=`string`)continue;let r;if(Nfe.has(e))if(t===`<>`||t===Pfe)r=``;else{let e=k6(t);r=e===t?t:g(e)}else r=k6(t);r!==t&&(n[e]=r)}})},O7=()=>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`&&!v1(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`&&!v1(e)&&delete n.src}if(t===`form`){let e=n.action;typeof e==`string`&&!v1(e)&&delete n.action}if(t===`img`||t===`source`){let e=n.srcSet;typeof e==`string`&&!E7(e)&&delete n.srcSet;let t=n.srcset;typeof t==`string`&&!E7(t)&&delete n.srcset}if(t===`video`){let e=n.poster;typeof e==`string`&&!v1(e)&&delete n.poster}let r=n.style;typeof r==`string`&&!jfe(r)&&delete n.style})};function Ffe(e){let t=xe().use(Se,{handlers:T7}).use(D7).use(O7).use(CG),n=t.runSync(e);return String(t.stringify(n))}function Ife(e){let t=/\r?\n|\r/g,n=[],r=0,i=t.exec(e);for(;i!==null;)n.push(k7(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=t.exec(e);return n.push(k7(e.slice(r),r>0,!1)),n.join(``)}function k7(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 A7=/\r?\n|\r/,Lfe=(e,t)=>{let n=Ife(String(t.value));if(!A7.test(n)){let r={type:`text`,value:n};return e.patch(t,r),e.applyData(t,r)}let r=n.split(A7),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 Rfe(e){let t=xe().use(re).use(aF,[`yaml`]).use(F8).use(pe).use(n5).use(C6).use(U8).use(F6).use(Se,{handlers:{...T7,text:Lfe}}).use(D7).use(O7).use(CG);return String(t.processSync(x6(P6(e))))}for(let e of[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}]){let t=K3.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.`)}MI(),ZF(),QF(),I({intents:F(I({satisfierId:M().min(1),desired:R([`present`,`absent`])}).loose()),...Z2,summary:Q2}).loose();var zfe=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(),Bfe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),Vfe=I({state:M(),strictness:F(R(Xo)).optional()}).loose(),Hfe=I({probes:I({env:R([`desktop`,`local-web`,`remote-web`]),satisfiers:to(M(),Vfe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),Ufe=I({actions:F(zfe),conflicts:F(Bfe),withheld:F(M()),snapshot:Hfe}).loose();I({entries:F(I({level:R([`info`,`warn`,`error`]),message:M().max(L4),event:M().optional(),fields:to(M(),Ha()).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 Wfe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),Gfe=F(Ya([M(),N().int().nonnegative()])),Kfe=Za(`kind`,[I({kind:z(`body`)}),I({kind:z(`property`),key:M().min(1),path:Gfe.default([])})]).default({kind:`body`}),qfe=R([`anchored`,`orphaned`,`resolved`]),j7=I({threadId:M().min(1),docName:M().min(1),target:Kfe,anchor:Wfe.nullable(),state:qfe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),M7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),N7=I({threadId:M(),ok:z(!0)}),P7=I({threadId:M(),ok:z(!1),error:z(`not-found`)});I({threads:F(j7)}).loose();var Jfe=I({meta:j7,orphaned:P()}).loose(),Yfe=I({threadId:M()}).loose();I({meta:j7,payload:M7}).loose();var Xfe=I({results:F(Ya([N7.extend({meta:j7,payload:M7}),P7]))}).loose(),Zfe=I({results:F(Ya([N7.extend({meta:j7}),P7]))}).loose(),Qfe=I({status:M().min(1),reason:M()}).loose(),$fe=I({docName:M().min(1),content:M(),lifecycle:Qfe.nullable()}).loose(),F7=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)`}),epe=I({documents:F(F7),truncated:P().optional()}).loose(),tpe=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),npe=I({docName:M().min(1),backlinks:F(tpe)}).loose(),rpe=I({counts:to(M().min(1),N().int().nonnegative())}).loose();I({counts:to(M().min(1),N().int().nonnegative())}).loose();var ipe=Za(`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()]),ape=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(),ope=I({docName:M().min(1),forwardLinks:F(ipe),localTargets:F(ape).optional()}).loose(),spe=Za(`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()]),cpe=I({source:M().min(1),target:M().min(1)}).loose(),lpe=I({nodes:F(spe),links:F(cpe)}).loose(),upe=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(),dpe=I({app:Ya([z(`cursor`),z(`codex`),z(`claude`),Ba()]),signals_fired:F(M())}).loose();I({entries:F(upe),count:N().int().min(0),detection:dpe}).loose();var I7=I({path:M().min(1),code:R([`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `]),origPath:M().min(1).optional(),syncScoped:P(),open:Za(`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(I7),notStaged:F(I7),untracked:F(I7),incoming:F(I7),truncated:P(),readable:P().default(!0)}).loose(),I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:Q2,...Z2}).loose(),I({checkpointRef:M().min(1)}).loose();var fpe=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(fpe),checkpoint:Ha().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 ppe=I({contentDir:M().min(1),pathSeparator:R([`/`,`\\`]),symlinkResolved:P()}).loose();F(Za(`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 L7=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose();I({url:M()}).loose();var mpe=Za(`ok`,[I({ok:z(!0),metadata:L7}).loose(),I({ok:z(!1),reason:M()}).loose()]),hpe=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),gpe=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),_pe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose();I({deadLinks:F(I({target:M().min(1),sources:F(_pe)}).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 vpe=R([`not-a-git-worktree`,`init-failed`]);Za(`ok`,[I({ok:z(!0),projectPath:M().min(1)}).loose(),I({ok:z(!1),reason:vpe,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 ype=R([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),bpe=Za(`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:ype,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 xpe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),Spe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(xpe)}).loose(),Cpe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),wpe=I({sessionAlive:P(),agent:Cpe.nullable(),files:F(Spe)}).loose(),Tpe=I({diff:M(),before:M(),after:M(),properties:L0,generatedAt:N().int().min(0)}).loose();I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose(),I({}).loose();var Epe=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:to(M().min(1),Epe)}).loose();var Dpe=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(Dpe)}).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(),to(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 Ope=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),kpe=I({fromPath:M().min(1),toPath:M().min(1)}).loose();I({}).loose(),I({path:M().min(1),...Z2,summary:Q2}).loose();var Ape=I({docName:M().min(1)}).loose();I({path:M().min(1),...Z2,summary:Q2}).loose();var jpe=I({path:M().min(1)}).loose();I({kind:R([`file`,`folder`]),path:M().min(1),...Z2,summary:Q2}).loose();var Mpe=I({kind:R([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),Npe=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(),Ppe=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),Fpe=I({docName:M().min(1),headings:F(Ppe)}).loose(),Ipe=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose();I({kind:R([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...Z2,summary:Q2}).loose();var Lpe=I({renamed:F(Ope),renamedAssets:F(kpe),rewrittenDocs:F(Ipe).optional(),summary:e7.optional()}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Z2}).loose();var Rpe=I({deletedDocNames:F(M().min(1))}).loose();I({kind:R([`file`,`folder`,`asset`]),path:M().min(1),...Z2,summary:Q2}).loose();var zpe=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:Q2,...Z2}).loose(),I({restoredFrom:M().min(1),timestamp:M().min(1),summary:e7.optional(),warnings:i7.optional()}).loose();var Bpe=/^#[0-9a-fA-F]{6}$/,Vpe=I(Object.fromEntries(cm.map(e=>[e,M().regex(Bpe,`must be a #rrggbb hex color`)]))),R7=M().min(1).refine(fm,{message:`must contain a non-whitespace character`}),z7=I({name:R7,author:R7.optional(),variant:R([`dark`,`light`]),palette:Vpe}).loose(),Hpe=I({name:M().min(1),scheme:z7,stem:M().min(1).optional(),extension:R([`.yaml`,`.yml`]).optional()}).loose(),Upe=I({id:M().min(1),filename:M().min(1)}).loose(),Wpe=I({id:M().min(1),scheme:z7}).loose(),Gpe=I({id:M().min(1),filename:M().min(1)}).loose(),Kpe=Za(`existed`,[I({existed:z(!1)}).loose(),I({existed:z(!0),filename:M().min(1),scheme:z7}).loose()]),qpe=I({themes:F(Za(`ok`,[I({ok:z(!0),id:M().min(1),filename:M().min(1),scheme:z7}),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(),Jpe=R([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),Ype=I({label:M().min(1),webUrl:ya().nullable()}).loose(),Xpe=Za(`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()]),B7=R([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),Zpe=R(ep),Qpe=R([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);I({state:Jpe,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:Ype.nullable().optional(),pushError:M().optional(),pushErrorCode:B7.optional(),pullError:M().optional(),pullErrorCode:B7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:Xpe.optional(),syncMode:Zpe.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:Qpe.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();var V7=R([`merge-native`,`working-tree`,`reconcile`]),H7=R([`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`]),$pe=R([`mine`,`theirs`,`content`,`delete`]),eme=I({conflicts:F(I({file:M().min(1),detectedAt:M().min(1),conflict:V7,reason:H7.optional().catch(void 0),conflictKind:R([`git`,`stale-external-write`]).optional(),docName:M().nullable(),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();var tme=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:R([`both-modified`,`delete-modify`,`modify-delete`]),conflict:V7,reason:H7.optional().catch(void 0),conflictKind:R([`git`,`stale-external-write`]).optional(),resolutionOptions:F($pe)}).loose();I({plan:Ao(e=>e!==void 0,{message:`plan is required`})}).loose(),I({plan:Ao(e=>e!==void 0,{message:`plan is required`})}).loose(),I({result:Ao(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 nme=I({path:M().min(1),summary:M().min(1)}).loose(),rme=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(nme),entryCounts:rme}).loose())}).loose(),I({noOpen:P().optional(),out:M().min(1).optional()}).loose();var ime=I({reason:R([`unsupported-platform`,`spawn-error`]),message:M()}).loose();Za(`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:ime.optional()}).loose(),I({status:z(`failed`),buildError:M()}).loose(),I({status:z(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]);var U7=R(He),W7=R(Ue);function ame(e){return e===`agents`||Ue.includes(e)}var ome=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),sme=[`.md`,`.mdx`,`.txt`],cme=5e3,lme=4;function G7(e){return Math.round(e/lme)}function ume(e){let t=e.lastIndexOf(`.`);return t===-1?!1:sme.includes(e.slice(t).toLowerCase())}function dme(e){let t=G7((e.name??``).length+(e.description??``).length),n=G7(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/`)||ume(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:G7(i)}}I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose();var fme=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose();I({name:M().min(1),docs:F(fme)}).loose(),I({folder:Ha(),frontmatter_local:to(M(),Ha()).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:to(M(),Ha()).optional()}).loose(),I({applied:Ha()}).loose();var K7=to(M(),Ha()).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:K7,body:M()}).strict()}).strict();var pme=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:K7.optional(),...Z2,summary:Q2}).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(),...Z2,summary:Q2}).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:K7.optional(),...Z2,summary:Q2}).strict(),I({from:M().min(1),to:M().min(1),committed:P()}).strict();var q7=R(of),mme=/^[a-z0-9-]+$/,hme=/^[A-Za-z0-9_-]+$/,J7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict();I({skill:I({name:M().min(1),scope:q7,path:M().min(1),frontmatter:J7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict();var gme=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),_me=I({name:M().min(1),description:M().optional(),scope:q7,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:to(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:gme.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:ome.optional()}).strict();I({name:M().min(1),scope:q7,apply:P().optional()}).strict(),I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict();var vme=I({skills:F(_me),truncated:P()}).strict();I({scope:q7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:J7,...Z2,summary:Q2}).strict();var Y7=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:Y7}).strict(),I({scope:q7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...Z2,summary:Q2}).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:Y7}).strict(),I({scope:q7.default(`project`),name:M(),...Z2,summary:Q2}).strict(),I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict();var X7=`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. ${X7}`})}).strict(),I({scope:q7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:J7.optional(),...Z2,summary:Q2}).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. ${X7}`})}).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:q7,toScope:q7,...Z2,summary:Q2}).strict();var yme=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function bme(e){return typeof e==`string`&&yme.includes(e)}var xme=[`intact`,`lossy`,`unknown`];function Sme(e){return typeof e==`string`&&xme.includes(e)}var Cme=[`unreadable`,`occupant-unverifiable`];function wme(e){return typeof e==`string`&&Cme.includes(e)}var Tme={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function Z7(e){return Tme[e]}function Eme(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=bme(n)?n:void 0,o=Sme(r)?r:void 0,s=wme(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}:(Z7(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 Dme=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function Ome(e){if(e===void 0)return[];let t=Dme;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}I({scope:q7,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. ${X7}`})}).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:q7,name:M(),toName:M(),...Z2,summary:Q2}).strict(),I({name:M().min(1)}).strict(),I({name:M(),home:M().min(1)}).strict(),I({docName:M().min(1)}).strict();var Q7=R([`reference`,`script`,`file`]);I({scope:q7.default(`project`),name:M(),path:M().min(1),content:M(),...Z2,summary:Q2}).strict(),I({path:M().min(1),created:P(),kind:Q7,content:P()}).strict(),I({scope:q7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...Z2,summary:Q2}).strict(),I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),I({path:M().min(1),kind:Q7,text:M()}).strict(),I({path:M().min(1),existed:P(),kind:Q7}).strict();var $7=Ya([W7,z(`agents`)]),e9=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`}),t9=Ya([$7,e9]);I({scope:q7.default(`project`),name:M(),targets:F($7).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(t9).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(t9).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:t9.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:t9.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(),...Z2,summary:Q2,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:q7.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 kme=I({targets:F(U7),configured:P(),folders:F(I({scope:q7,host:M(),root:M(),state:R([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:z(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),n9=I({action:z(`link`),scope:q7,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.`})}),r9=I({action:z(`unlink`),scope:q7,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(),i9=I({action:z(`add-root`),scope:q7,root:e9.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),Ame=Za(`action`,[n9.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),r9,i9]);Za(`action`,[n9.strict(),r9,i9]),I({folderAction:Ame}).strict();var a9=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict();I({targets:F(U7),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:a9.optional()}).strict(),I({scope:q7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...Z2,summary:Q2}).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 jme=I({kind:R([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:to(M(),Ha()),snippet:M().optional()}).loose(),Mme=R([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),o9=R([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Nme(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function Pme(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Fme(e,t){let n=e?.providerErrorReason;switch(n){case null:case void 0:return e?.providerError===!0;case`corpus`:return!1;case`query`:return t===`query`;case`warm`:case`dimensions`:case`configured_dimensions`:return!0;default:return Pme(n)}}function Ime(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}var s9=I({capable:P(),applied:P(),outcome:Mme,providerErrorReason:o9.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),Lme=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:R([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:o9.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function Rme(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}I({query:M(),intent:R([`autocomplete`,`full_text`,`omnibar`]),results:F(jme),elapsedMs:N().nonnegative(),semantic:s9.optional(),truncated:P().optional(),ready:P().optional()}).loose();var zme=I({version:M().min(1),recordedAt:M().min(1)}).loose();I({currentVersion:M().min(1),targets:to(M(),zme.nullable())}).loose(),I({scope:q7.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."}),...Z2,summary:Q2}).strict(),I({scope:q7.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."}),...Z2,summary:Q2}).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:Y7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),I({scope:q7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...Z2,summary:Q2}).strict(),I({results:F(I({requested:M(),status:R([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:Y7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose();var Bme=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:Bme,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:Y7}).loose();var Vme=`server-info`,Hme=`branch-switched`,Ume=`disk-ack`,Wme=`config-validation-rejected`,Gme=`config-ignore-nested-error`,c9=R([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),Kme=I({v:z(1),ch:z(Vme),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),qme=I({v:z(1),ch:z(Hme),seq:N(),branch:M().min(1)}).loose(),Jme=I({v:z(1),ch:c9,seq:N()}).loose(),Yme=I({v:z(1),ch:z(Ume),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),Xme=I({v:z(1),ch:z(Wme),seq:N(),docName:M().min(1),error:Vne}).loose(),Zme=I({v:z(1),ch:z(Gme),seq:N(),path:M().min(1),error:M().min(1)}).loose(),Qme=100,$me=500,ehe=450,the={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},l9=new WeakMap;function nhe(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 rhe=/\.(?:md|mdx)$/;function ihe(e,t){if(t!==`page`)return e;let n=e.replace(rhe,``);return n.length>0?n:e}function d9(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function ahe(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 ohe(){let e=aJ({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=yJ({schema:the,components:{tokenizer:ohe()}});return e.length>0&&AJ(t,e),t}function she(e){let t={documents:e};return l9.set(t,m9(e)),t}function che(e){let t=l9.get(e);if(t)return t;let n=m9(e.documents);return l9.set(e,n),n}function lhe(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 uhe(e,t){let n=u9(t);if(!n)return 0;let r=ihe(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 dhe=.5;function g9(e,t){let n=uhe(e,t);return n<=0?n:q2(e.path)?n*dhe:n}function fhe(e){return e===`file`?-60:0}var phe=1e3,mhe=50,hhe=1,ghe=1;function _he(e,t,n,r,i){let a=i>0?t/i:0,o=n/mhe,s=r===`file`?-.001:0,c=hhe*a+ghe*o+s;return e*phe+c}function _9(e,t,n,r){return e+t*20+n+fhe(r)}function v9(e,t,n,r,i,a){return e===`relevance`?_9(t,n,r,i):_he(t,n,r,i,a)}function vhe(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 yhe(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 bhe(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function xhe(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 She=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function Che(e,t){let n=u9(t);return n.length<4||She.test(n)?0:+(e===`full_text`)}function whe(e){let{lexical:t,fullText:n}=e.signals;return t>=$me?`lexical`:t===ehe&&n<=0?`pathOnly`:`body`}function The(e){let t=[],n=[],r=[];for(let i of e){let e=whe(i);e===`lexical`?t.length<Qme&&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=The(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 Ehe(e,t,n={}){let r=n.intent??`omnibar`,i=vhe(r,n.ranking),a=nhe(n.limit),o=new Set(n.scopes??lhe(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=oY(che(e),{term:c,properties:bhe(r),boost:xhe(r),tolerance:Che(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=yhe(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(Dhe({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 Dhe(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 Ohe(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}function khe(e){return`https://${e.host}/${e.owner}/${e.repo}.git`}function Ahe(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]=fr());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:Hi().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()}),jhe=L({enabled:P().register(w9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Hi().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:to(M(),jhe).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 Mhe(e){return e===`right`||e===`bottom`?e:E9}function Nhe(e){return typeof e!=`number`||!Number.isFinite(e)?O9:Math.max(k9,Math.round(e))}var Phe=new Set([`(connected)`,`(agent thread)`]);function Fhe(e){return e!=null&&Phe.has(e)}var Ihe=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 Lhe(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 zhe(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 Bhe(e){if(typeof e!=`string`||e.length===0)return e;let t=k3(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(D3(e)){let t=zhe(e);return t?`https://player.vimeo.com/video/${t}`:e}let n=T3(e);if(n){let e=n.startRaw===null?``:`?t=${n.startRaw}`;return`https://www.loom.com/embed/${n.id}${e}`}return e}var Vhe=`https://api.github.com/repos/inkeep/open-knowledge`;async function Hhe(e){let{signal:t,...n}=e??{},r=t?AbortSignal.any([AbortSignal.timeout(5e3),t]):AbortSignal.timeout(5e3);try{let e=await fetch(Vhe,{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 Uhe=/^(#{1,6})\s+(.+)$/;function Whe(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(Uhe);if(!n)return null;let r=n[2].trim(),i=v7(r,t);return i?{level:n[1].length,text:r,slug:i}:null}var Ghe=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=Ghe;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 Khe={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},qhe=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],Jhe={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`},Yhe={cursor:`#FFFFFF`,windsurf:`#FFFFFF`},M9=[`#f0ece3`,`#fff5e1`,`#f9e1db`,`#f5def7`,`#ece2fb`,`#dce8fa`,`#DBF3FB`];function Xhe(e,t=qhe){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}function Zhe(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 Qhe(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 $he={"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 ege(e){return e?$he[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}function tge(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 nge(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 rge(e){let[t]=tge(e);return nge(t,45,32)}var ige=[`Curious`,`Brave`,`Clever`,`Swift`,`Gentle`,`Bright`,`Wise`,`Bold`,`Calm`,`Keen`],age=[`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 oge(){return`${F9(ige)} ${F9(age)}`}function sge(){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 cge(){let e=new URLSearchParams(window.location.search).get(`coeditor`)||`standalone`,t=j9(),n=I9(N9),r=I9(P9);return n||(n=oge(),L9(N9,n)),r||(r=sge(),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 lge(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function uge(e){return e.split(`/`).map(lge).join(`/`)}function dge(e){return e.split(`/`).map(R9).join(`/`)}function fge(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(!F$.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 pge(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 mge(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=dge(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=fge(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 hge(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 gge(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 _ge(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}`),`${uge(l)}${r}${n?`#${n}`:``}`}function vge(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 yge=`unknown`;function bge(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return yge;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 xge(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 Sge(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 Cge(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=_7(e);if(n){if(U9(t))return t.pagesBySlug.get(n);for(let e of t)if(_7(e)===n)return e}}function Y9(e,t){if(e.includes(`/`))return;let n=_7(e);if(!n)return;if(U9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);_7(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=_7(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 wge(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=wge(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 Tge(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 Ege(e,t,n){let r=hge(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{B4 as $,OT as $a,xge as $i,H2 as $n,Ane as $o,hY as $r,Ef as $s,U7 as $t,L$ as A,die as Aa,_te as Ac,c5 as Ai,H0 as An,qm as Ao,x5 as Ar,tf as As,L4 as At,j0 as B,Pw as Ba,M as Bc,Ohe as Bi,mge as Bn,Op as Bo,ege as Br,Zd as Bs,Upe as Bt,Z$ as C,cj as Ca,ene as Cc,Rfe as Ci,ide as Cn,G as Co,B9 as Cr,cp as Cs,Fpe as Ct,Ape as D,Rk as Da,Dte as Dc,r1 as Di,ZX as Dn,tm as Do,a1 as Dr,$f as Ds,y4 as Dt,jpe as E,Ck as Ea,kte as Ec,w$ as Ei,_$ as En,Dp as Eo,r$ as Er,Zf as Es,_4 as Et,epe as F,nD as Fa,F as Fc,T3 as Fi,_ge as Fn,zm as Fo,cge as Fr,of as Fs,_1 as Ft,gpe as G,rT as Ga,Ke as Gc,yY as Gi,Xhe as Gn,$p as Go,rse as Gr,Pd as Gs,s9 as Gt,efe as H,dT as Ha,oee as Hc,x4 as Hi,pQ as Hn,Wm as Ho,ase as Hr,lf as Hs,Wpe as Ht,$fe as I,rD as Ia,P as Ic,vge as Ii,khe as In,jp as Io,X9 as Ir,Nf as Is,mme as It,f1 as J,ET as Ja,We as Jc,$9 as Ji,A5 as Jn,Dm as Jo,Qoe as Jr,sf as Js,n4 as Jt,$ce as K,aT as Ka,Be as Kc,gge as Ki,xQ as Kn,Qp as Ko,$oe as Kr,uf as Ks,Lme as Kt,Mpe as L,eD as La,ha as Lc,V4 as Li,Lhe as Ln,om as Lo,T0 as Lr,Mf as Ls,Khe as Lt,Yfe as M,vE as Ma,Ko as Mc,y8 as Mi,U0 as Mn,Rm as Mo,bge as Mr,ef as Ms,H1 as Mt,c9 as N,tE as Na,R as Nc,Mhe as Ni,Cge as Nn,Vm as No,Hhe as Nr,$d as Ns,Lpe as Nt,Rde as O,zk as Oa,Os as Oc,Ome as Oi,C$ as On,cm as Oo,lfe as Or,jf as Os,Jfe as Ot,F7 as P,TT as Pa,No as Pc,Nhe as Pi,Sge as Pn,Bm as Po,v7 as Pr,Vd as Ps,h1 as Pt,$5 as Q,qw as Qa,Bhe as Qi,e2 as Qn,bm as Qo,Eme as Qr,Af as Qs,a9 as Qt,k$ as R,Mw as Ra,z as Rc,w0 as Ri,cQ as Rn,One as Ro,j$ as Rr,Dd as Rs,Kpe as Rt,A9 as S,lj as Sa,Zte as Sc,sQ as Si,ade as Sn,Lh as So,D0 as Sr,Xm as Ss,q$ as St,Zfe as T,Pk as Ta,Ote as Tc,Coe as Ti,zY as Tn,kp as To,nX as Tr,bne as Ts,Xfe as Tt,M9 as U,fT as Ua,Nt as Uc,vX as Ui,mQ as Un,Um as Uo,Xoe as Ur,cf as Us,Gpe as Ut,ope as V,Fw as Va,aee as Vc,j9 as Vi,Nme as Vn,wp as Vo,ise as Vr,Kf as Vs,z7 as Vt,b3 as W,Jw as Wa,ze as Wc,_X as Wi,i1 as Wn,Hm as Wo,Zoe as Wr,zd as Ws,qpe as Wt,m1 as X,dw as Xa,Z9 as Xi,i2 as Xn,Np as Xo,ese as Xr,df as Xs,o4 as Xt,p1 as Y,HE as Ya,Je as Yc,Ege as Yi,k2 as Yn,Tp as Yo,Yoe as Yr,If as Ys,s4 as Yt,I$ as Z,HC as Za,d$ as Zi,r2 as Zn,mm as Zo,tse as Zr,xf as Zs,u4 as Zt,N$ as _,y7 as _a,zo as _c,Z7 as _i,k0 as _n,Ng as _o,z0 as _r,vne as _s,G$ as _t,Ufe as a,Bde as aa,Sf as ac,q2 as ai,hme as an,tC as ao,Q0 as ar,yp as as,bpe as at,gQ as b,mj as ba,Wo as bc,mfe as bi,B2 as bn,ug as bo,hQ as br,fp as bs,O9 as bt,O4 as c,oQ as ca,ff as cc,U5 as ci,pme as cn,K_ as co,u$ as cr,ch as cs,A4 as ct,qme as d,rQ as da,Jte as dc,K2 as di,Y$ as dn,D_ as do,E8 as dr,ap as ds,V1 as dt,Whe as ea,yf as ec,S1 as ei,kme as en,$E as eo,n2 as er,hp as es,w1 as et,Zme as f,d1 as fa,Yte as fc,y1 as fi,Ihe as fn,q as fo,q3 as fr,Zp as fs,rde as ft,Kme as g,W4 as ga,Ro as gc,ame as gi,E0 as gn,Pg as go,V$ as gr,xm as gs,cme as gt,Yme as h,H4 as ha,Ns as hc,Rme as hi,nfe as hn,Ag as ho,rge as hr,Km as hs,Z0 as ht,Tpe as i,Vde as ia,wf as ic,sfe as ii,eme as in,xS as io,$0 as ir,pm as is,afe as it,Rpe as j,NE as ja,Bo as jc,C0 as ji,kY as jn,Mp as jo,Qhe as jr,Qd as js,ufe as jt,E9 as k,Ek as ka,Hte as kc,SZ as ki,V0 as kn,lm as ko,Nue as kr,nf as ks,R4 as kt,rpe as l,B0 as la,Of as lc,U$ as li,zpe as ln,Y_ as lo,l$ as lr,Xp as ls,k9 as lt,Jme as m,_7 as ma,Qte as mc,v1 as mi,rfe as mn,wg as mo,ahe as mr,sp as ms,X0 as mt,Yhe as n,Ehe as na,kf as nc,R$ as ni,vme as nn,mC as no,D2 as nr,Mm as ns,mpe as nt,j4 as o,Fme as oa,Xf as oc,E3 as oi,z$ as on,M_ as oo,dX as or,Yp as os,W$ as ot,Xme as p,Yde as pa,Ds as pc,Tge as pi,b4 as pn,kg as po,she as pr,Cm as ps,H5 as pt,u1 as q,oT as qa,Ve as qc,T4 as qi,SQ as qn,up as qo,nse as qr,Rd as qs,g4 as qt,wpe as r,U4 as ra,mf as rc,H9 as ri,tme as rn,vS as ro,t2 as rr,Une as rs,Zde as rt,M4 as s,A0 as sa,Hd as sc,Ude as si,l0 as sn,J as so,Zhe as sr,im as ss,p7 as st,Jhe as t,I4 as ta,Yf as tc,N4 as ti,W7 as tn,IE as to,V2 as tr,gne as ts,lpe as tt,npe as u,Iue as ua,Wd as uc,Fhe as ui,X$ as un,K as uo,pfe as ur,qp as us,Eue as ut,M$ as v,Y0 as va,Lo as vc,M0 as vi,ppe as vn,T_ as vo,ffe as vr,wm as vs,H$ as vt,j7 as w,GA as wa,nne as wc,Ffe as wi,Ime as wn,bp as wo,I0 as wr,Sne as ws,Npe as wt,P$ as x,oj as xa,Go as xc,C4 as xi,pge as xn,W as xo,A$ as xr,xne as xs,K$ as xt,dQ as y,d9 as ya,Io as yc,D3 as yi,wZ as yn,o_ as yo,dme as yr,Cne as ys,hpe as yt,N0 as z,VE as za,I as zc,k3 as zi,Ahe as zn,vp as zo,Soe as zr,Pf as zs,Hpe as zt};
|