@inkeep/open-knowledge 0.73.0-beta.11 → 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-BwQv6d-U.mjs → init-BsvUy5hk.mjs} +2 -2
- package/dist/init-CWsV3oYX.mjs +1 -0
- package/dist/{launch-json-removal-DwXqW1sd.mjs → launch-json-removal-BVRO8J0x.mjs} +1 -1
- package/dist/{loader-1vmsSG1u.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-Jix6Dpgk.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-BQwMWwsF.mjs → registry-probes-J6moEXgM.mjs} +1 -1
- package/dist/{removal-file-path-BxGgStJY.mjs → removal-file-path-CnudrZAc.mjs} +1 -1
- package/dist/{repair-launch-json-DJfcDn7I.mjs → repair-launch-json-CJFVrNHz.mjs} +1 -1
- package/dist/{repair-mcp-configs-DwhUexpn.mjs → repair-mcp-configs-BqPqIYwG.mjs} +1 -1
- package/dist/{src-CHTzmKcs.mjs → src-CATqYOnk.mjs} +1 -1
- package/dist/src-CqCC2CKz.mjs +1 -0
- package/dist/{start-Cjp-KZik.mjs → start-CtVYZ9RW.mjs} +3 -3
- package/dist/start-CtmvYQGm.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-HKqCPLyI.mjs +0 -1
- package/dist/dist-C2NLSbAt.mjs +0 -2104
- package/dist/init-CavCxyxE.mjs +0 -1
- package/dist/loader-Ddu2PtSx.mjs +0 -1
- package/dist/preview-DzYjhkgK.mjs +0 -1
- package/dist/public/assets/FeedbackForm-B30IpJr5.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-B26iJId9.js +0 -1
- package/dist/src-B5mJKpi7.mjs +0 -1
- package/dist/start-BcMD9MkP.mjs +0 -1
|
@@ -181,7 +181,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
181
181
|
`:`
|
|
182
182
|
`)+t:t}function Qc(e){if(e===``)return``;let t=e.match(Yc);return t?(t[1]??``).replace(/\r?\n$/,``):e}const $c={defaultKeyType:`PLAIN`,defaultStringType:`PLAIN`,lineWidth:0};function el(e){if(e.trim()===``)return{doc:new Bc.Document({}),map:{}};let t;try{t=(0,Bc.parseDocument)(e)}catch(e){let t=e instanceof Error?e.message:String(e);return{doc:new Bc.Document({}),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=Kc.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 tl(e){return Object.keys(e).length===0?``:new Bc.Document(e).toString($c)}function nl(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rl(e,t,n){if(Array.isArray(n)){let r=e.createNode(n),i=(0,Bc.isSeq)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}if(nl(n)){let r=e.createNode(n),i=(0,Bc.isMap)(t)?t.flow:void 0;return i!==void 0&&(r.flow=i),r}return n}function il(e){return e===``?``:`---\n${e.endsWith(`
|
|
183
183
|
`)?e.slice(0,-1):e}\n---\n`}function al(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)}const ol=`__system__`,sl=1,cl=`__config__/project`,ll=`__user__/config.yml`,ul=`__local__/project`,dl=`__config__/okignore`,fl=Object.freeze([cl,ul,ll,dl]),pl=`__skill__/`,ml=`__template__/`,hl=[`project`,`global`];function gl(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}function _l(e){return`__extskill__/${e}`}function vl(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 yl(e){return e.replace(/\.mdx?$/i,``)}const bl=`.ok/skills`;function xl(e){return`${bl}/${e}/SKILL`}const Sl=[`references`,`scripts`];function Cl(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)?kl(`global`,r):null}function wl(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=yl(e.trim()).split(`/`).filter(e=>e!==``&&e!==`.`),[a]=i;return!a||!Sl.includes(a)||i.includes(`..`)||i.length<2?null:`${r}/${i.join(`/`)}`}const Tl=/^\.[A-Za-z0-9_-]+\/skills\/([^/]+)\/(SKILL|references\/.+)$/;function El(e){let t=Tl.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)}}const Dl=/^__skill__\/global\/([^/]+)(?:\/(references\/.+))?$/;function Ol(e){let t=Dl.exec(e);if(!t)return null;let{name:n,host:r}=Al(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 kl(e,t,n){return e===`project`?xl(t):`${pl}${e}/${t}${n?`@${n}`:``}`}function Al(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 jl(e){if(e===``)return``;try{return e.split(`/`).map(e=>decodeURIComponent(e)).join(`/`)}catch{return e}}function Ml(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=jl(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}=Al(s);return l?{kind:`skill`,scope:r,name:l,host:u,rel:c}:null}return null}function Nl(e,t){let n=e.replace(/^\/+|\/+$/g,``);return n?`${n}/.ok/templates/${t}`:`.ok/templates/${t}`}const Pl=`.agents/skills`;function Fl(e){let t=e.trim();if(t===`inkeep/open-knowledge-skills`)return!0;if(!t.includes(`://`)&&!t.includes(`@`))return!1;if(t.includes(`://`))try{let e=new URL(t);return Il.has(e.hostname.toLowerCase())&&Ll(e.pathname)}catch{return!1}let n=/^(?:[\w.-]+@)?([\w.-]+):(.+)$/.exec(t);return n?Il.has(n[1].toLowerCase())&&Ll(n[2]):!1}const Il=new Set([`skills.sh`,`www.skills.sh`,`github.com`,`www.github.com`,`raw.githubusercontent.com`]);function Ll(e){let t=e.replace(/^\/+/,``).replace(/\.git$/,``);return t===`inkeep/open-knowledge-skills`||t.startsWith(`inkeep/open-knowledge-skills/`)}const Rl={"open-knowledge-pack-plain-notes":`note-taking`,"open-knowledge-pack-worldbuilding":`worldbuilding`,"open-knowledge-pack-writing-pipeline":`writing-workflow`,"open-knowledge-pack-codebase-wiki":`codebase-wiki`,"open-knowledge-pack-knowledge-base":`knowledge-base`,"open-knowledge-pack-software-lifecycle":`software-lifecycle`,"open-knowledge-pack-entity-vault":`personal-crm`,"open-knowledge-pack-okf":`okf-knowledge-base`,"open-knowledge-pack-software-lifecycle-frame-a-proposal":`frame-a-proposal`,"open-knowledge-pack-software-lifecycle-record-a-decision":`record-a-decision`,"open-knowledge-pack-software-lifecycle-write-a-spec":`write-a-spec`,"open-knowledge-pack-software-lifecycle-review-a-design":`review-a-design`,"open-knowledge-pack-software-lifecycle-write-a-postmortem":`write-a-postmortem`,"open-knowledge-pack-knowledge-base-research":`research-with-sources`,"open-knowledge-pack-knowledge-base-consolidate":`consolidate-notes`},zl=`inkeep/open-knowledge-skills`;function Bl(e,t){return e.startsWith(`open-knowledge-pack-`)&&Fl(t)}const Vl=/(^|[\s([])\/([a-z0-9][a-z0-9-]{1,63})(?=$|[\s.,;:!?)\]])/g,Hl=new Set([`tmp`,`usr`,`etc`,`var`,`dev`,`opt`,`bin`,`api`,`home`,`root`]);function Ul(e){return!Hl.has(e)}const Wl=/`\/([a-z0-9][a-z0-9-]{1,63})`/g;function Gl(e){let t=new Set;Vl.lastIndex=0;for(let n=Vl.exec(e);n!==null;n=Vl.exec(e)){let e=n[2];Ul(e)&&t.add(e)}Wl.lastIndex=0;for(let n=Wl.exec(e);n!==null;n=Wl.exec(e)){let e=n[1];Ul(e)&&t.add(e)}return[...t]}function Kl(e,t,n){if(t===n||!Ul(t)||!e.includes(`/${t}`))return e;Vl.lastIndex=0;let r=e.replace(Vl,(e,r,i)=>i===t?`${r}/${n}`:e);return Wl.lastIndex=0,r.replace(Wl,(e,r)=>r===t?`\`/${n}\``:e)}const ql=16777216,Jl=67108864;function Yl(e,t){let n=new Map;for(let r of e){let e=r.provenance.plugin,i=r.provenance.marketplace;if(!e||!i||n.has(r.name))continue;let a=t(r.home);a&&n.set(r.name,{source:`${e}@${i}`,plugin:e,marketplace:i,provider:r.sourceHarness,contentHash:a,...r.provenance.version===void 0?{}:{version:r.provenance.version},...r.provenance.repositoryUrl===void 0?{}:{repositoryUrl:r.provenance.repositoryUrl},home:r.home})}return n}const Xl=eo({name:M(),description:M(),files:eo({skillMd:M(),scripts:F(M()),references:F(M())})}),Zl=eo({pluginProvider:M().optional(),plugin:M().optional(),marketplace:M().optional(),repositoryUrl:M().optional(),version:M().optional(),gitCommitSha:M().optional(),scope:M().optional(),projectPath:M().optional()}),Ql=eo({commands:P(),hooks:P(),mcp:P()}),$l=eo({...Xl.shape,sourceHarness:M(),sourceHarnesses:F(M()),home:M(),provenance:Zl,inert:Ql,outsideProject:P().optional()}),eu=eo({schema:R(1),name:M(),version:M(),description:M().optional(),author:eo({name:M()}).optional(),skills:F(M()),hostCompatibility:F(M()).optional(),capabilities:eo({scripts:M(),network:M(),inert:F(M())}).optional(),provenance:eo({source:M(),ref:M(),contentHash:M()}).optional()}),tu=I({skills:F($l),packs:F(eu)}).loose(),nu=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:L([`skills.sh`,`github-fallback`]),degraded:P()}).loose(),ru=I({title:M(),description:M(),image:M().nullable(),skillsUrl:M().nullable(),sourceKind:L([`github`,`site`]),sourceUrl:M()}).loose(),iu=I({skills:F(I({name:M(),description:M().nullable()}).loose())}).loose(),au=I({kind:L([`local`,`import`,`none`]),scope:L(hl).optional(),name:M().optional(),dir:M().optional(),source:M().optional(),ref:M().optional(),via:L([`source`,`publisher`]).optional()}).loose(),ou=I({relPath:M(),content:M().nullable()}).loose(),su=I({provider:M(),plugin:M(),version:M().optional(),marketplace:M().optional(),repositoryUrl:M().optional()}).loose(),cu=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(),lu=I({name:M(),description:M().nullable(),skillMd:M(),files:F(ou),plugin:su.optional(),pluginBundle:cu.optional()}).loose(),uu=new Set([`project`,`local`]);function du(e){return e!==void 0&&uu.has(e)?`project`:`global`}function fu(e,t){let n=e=>/^[A-Za-z]:[\\/]/.test(e),r=n(e),i=n(t);if(r||i){if(!r||!i)return!1;let n=e=>{let t=e.replace(/[\\/]+/g,`/`).replace(/\/+$/,``);return`${t.slice(0,1).toLowerCase()}${t.slice(1)}`};return n(e)===n(t)}let a=e=>e.replace(/\/+$/,``);return a(e)===a(t)}function pu(e,t){if(du(e.scope)===`global`)return!0;let n=e.projectPath;return n===void 0||t===void 0||fu(n,t)}function mu(e,t,n){if(n===void 0||du(e.scope)!==`project`)return!1;let r=t.replace(/\/+$/,``),i=n.replace(/\/+$/,``);return r!==i&&!r.startsWith(`${i}/`)}const hu=/^([\w.-]+)\/([\w.-]+)$/,gu=/^(?=.{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 _u(e){let t=hu.exec(e);if(t){let[,e,n]=t;if(e&&n)return{kind:`github`,owner:e,repo:n}}return gu.test(e)?{kind:`site`,hostname:e}:null}function vu(e,t){let n=_u(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 yu(e){return e.includes(`/`)?e.split(`/`)[0]??null:null}function bu(e){let t=e.split(`/`).pop();return t&&t.length>0?t:e}function xu(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`)}const Su=`ok-checkpoint-v1: `;function Cu(e){if(!e)return null;for(let t of e.split(`
|
|
184
|
-
`)){let e=t.trim();if(!e.startsWith(Su))continue;let n;try{n=JSON.parse(e.slice(18))}catch{return null}if(typeof n!=`object`||!n)return null;let r=n,i=r.kind,a=r.metadata;if(typeof a!=`object`||!a)return null;let o=typeof r.docName==`string`?r.docName:null,s=typeof r.size==`number`&&Number.isFinite(r.size)?r.size:null;if(i===`bridge-merge-loss`){let e=a;return Array.isArray(e.lostSubstrings)&&e.lostSubstrings.every(e=>typeof e==`string`)?{kind:`bridge-merge-loss`,docName:o,size:s,metadata:{lostSubstrings:e.lostSubstrings}}:null}if(i===`producer-guard-loss`){let e=a;return typeof e.construct==`string`?{kind:`producer-guard-loss`,docName:o,size:s,metadata:{construct:e.construct}}:null}if(i===`observer-a-duplication`){let e=a;return typeof e.duplicatedLineCount==`number`&&Number.isFinite(e.duplicatedLineCount)?{kind:`observer-a-duplication`,docName:o,size:s,metadata:{duplicatedLineCount:e.duplicatedLineCount}}:null}if(i===`external-change-rescue`){let e=a;return typeof e.incomingDiskSha==`string`?{kind:`external-change-rescue`,docName:o,size:s,metadata:{incomingDiskSha:e.incomingDiskSha}}:null}if(i===`defer-exhaustion-loss`){let e=a;return typeof e.deferCount==`number`&&Number.isFinite(e.deferCount)?{kind:`defer-exhaustion-loss`,docName:o,size:s,metadata:{deferCount:e.deferCount}}:null}if(i===`observer-a-apply-loss`){let e=a;return Array.isArray(e.lostSubstrings)&&e.lostSubstrings.every(e=>typeof e==`string`)?{kind:`observer-a-apply-loss`,docName:o,size:s,metadata:{lostSubstrings:e.lostSubstrings}}:null}if(i===`bridge-derive-loss`){let e=a;return Array.isArray(e.lostSubstrings)&&e.lostSubstrings.every(e=>typeof e==`string`)?{kind:`bridge-derive-loss`,docName:o,size:s,metadata:{lostSubstrings:e.lostSubstrings}}:null}if(i===`bridge-backstop-trip`){let e=a;return typeof e.rounds==`number`&&Number.isFinite(e.rounds)?{kind:`bridge-backstop-trip`,docName:o,size:s,metadata:{rounds:e.rounds}}:null}if(i===`persistence-reconcile-loss`){let e=a;return typeof e.atRiskLines==`number`&&Number.isFinite(e.atRiskLines)&&typeof e.witnessAvailable==`boolean`?{kind:`persistence-reconcile-loss`,docName:o,size:s,metadata:{atRiskLines:e.atRiskLines,witnessAvailable:e.witnessAvailable}}:null}if(i===`persistence-duplication-reset`){let e=a;return typeof e.copies==`number`&&Number.isFinite(e.copies)&&typeof e.fragmentChildren==`number`&&Number.isFinite(e.fragmentChildren)?{kind:`persistence-duplication-reset`,docName:o,size:s,metadata:{copies:e.copies,fragmentChildren:e.fragmentChildren}}:null}if(i===`persistence-divergence-realign`||i===`managed-artifact-reconcile`){let e=a;return typeof e.diskBytes==`number`&&Number.isFinite(e.diskBytes)&&typeof e.discardedBytes==`number`&&Number.isFinite(e.discardedBytes)?{kind:i,docName:o,size:s,metadata:{diskBytes:e.diskBytes,discardedBytes:e.discardedBytes}}:null}if(i===`auto-consolidation`){let e=a;return typeof e.foldedRefs==`number`&&Number.isFinite(e.foldedRefs)&&typeof e.trigger==`string`?{kind:`auto-consolidation`,docName:o,size:s,metadata:{foldedRefs:e.foldedRefs,trigger:e.trigger}}:null}return null}return null}function wu(e){let t={kind:e.kind,metadata:e.metadata};return e.docName!==null&&(t.docName=e.docName),e.size!==null&&(t.size=e.size),`${Su}${JSON.stringify(t)}`}const Tu={"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}},Eu=Object.keys(Tu);function Du(e){return e==null||Tu[e].visibility===`surfaced`}function Ou(e){return e==null||Tu[e].chainAnchor}a();const ku=[`off`,`follow`,`full`],Au=`pull`,ju=[`off`,`follow`,`full`,Au],Mu=[`follow`,`full`,Au];function Nu(e){return e===Au?`follow`:Pu(e)?e:null}function Pu(e){return typeof e==`string`&&ku.includes(e)}function Fu(e){return e===!0?`full`:e===!1?`off`:null}function Iu(e){return e===!0?`full`:e===!1?`off`:Nu(e)}function Lu(e){let t=Nu(e?.mode);return t===null?Fu(e?.enabled):t}const Ru=3600;function zu(e,t){return typeof e!=`number`||!Number.isFinite(e)?t:Math.min(Ru,Math.max(30,Math.round(e)))}function Bu(e){return{pullIntervalSeconds:zu(e?.pullIntervalSeconds,30),pushIntervalSeconds:zu(e?.pushIntervalSeconds,60)}}const Vu=new Set(Object.keys({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`})),Hu=new Set([`md`,`mdx`,`mmd`,`mermaid`]),Uu=new Set([...Vu,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!Hu.has(e)));function Wu(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:Uu.has(t.slice(n+1).toLowerCase())}const Gu=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],Ku=[`video/mp4`,`video/webm`,`video/ogg`],qu=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Ju=[`application/pdf`],Yu=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Xu=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Zu=new Set([`pdf`]),Qu=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),$u=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(`.`)),ed=new Set(`exe.bat.cmd.ps1.com.msi.vbs.js.jse.wsf.wsh.hta.sh.command.csh.ksh.bash.zsh.fish.desktop.action.workflow.html.htm.svg.xml.mhtml.svgz.dmg.pkg.mpkg.scpt.applescript.terminal.prefpane.webloc.inetloc.fileloc.jar.appimage.deb.rpm.msix.appx.ipa.apk.pif.scr.lnk.url`.split(`.`)),td=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(`.`)),nd=new Set([`html`,`htm`]),rd=`sandbox allow-scripts; connect-src 'none'`,id=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(`.`)),ad=`same-dir`,od=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(`.`)),sd=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],cd=[`mp4`,`webm`,`mov`,`m4v`],ld=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],ud=[`pdf`],dd=[`json`,`toml`,`lock`];function fd(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}fd(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,sd,Yu),fd(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,cd,Xu),fd(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,ld,Qu),fd(`SIDEBAR_PDF_ASSET_EXTENSIONS`,ud,Zu),fd(`FILE_ATTACHMENT_EXTENSIONS`,[...$u],od),fd(`WIKI_EMBED_EXTENSIONS`,[...od],td);const pd=new Set(sd),md=new Set(cd),hd=new Set(ld),gd=new Set(ud),_d=new Set(dd);fd(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...sd,...cd,...ld,...ud,...dd])],id);const vd=new Set([`base`,`canvas`]),yd=new Set([`mmd`,`mermaid`]);function bd(e){let t=e.lastIndexOf(`.`);return t<0?!1:yd.has(e.slice(t+1).toLowerCase())}const xd=new Set([`excalidraw`]);function Sd(e){let t=e.lastIndexOf(`.`);return t<0?!1:xd.has(e.slice(t+1).toLowerCase())}const Cd=new Set([...td,...vd,...yd,...xd]);function wd(e){let t=e.toLowerCase().replace(/^\./,``);return pd.has(t)?`image`:md.has(t)?`video`:hd.has(t)?`audio`:gd.has(t)?`pdf`:_d.has(t)||vd.has(t)?`text`:yd.has(t)?`mermaid`:xd.has(t)?`excalidraw`:Vu.has(t)?`text`:null}const Td=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],Ed=new Set([`ar`,`ur`]),Dd=Td.filter(e=>!Ed.has(e)),Od=[`markdownlint`,`frontmatter`,`okf`],kd=[`missing`,`invalid`];[...Od];const Ad=[`off`,`warning`,`error`],jd=`warning`,Md=[`error`,`warning`],Nd=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],Pd={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`},Fd=/^#[0-9a-fA-F]{6}$/,Id=/\P{White_Space}/u;function Ld(e){return Id.test(e)}function Rd(e){return typeof e==`string`&&Fd.test(e)}function zd(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,...Hd(t)}}const Bd={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`},Vd=Object.keys(Bd);function Hd(e){let t={};for(let n of Vd)t[`ansi-${Ud(n)}`]=e[Bd[n]];return t}function Ud(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function Wd(e){return JSON.stringify(e).replace(/[\u007f-\u009f\u2028\u2029\ufffe\uffff]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function Gd(e){return`${[`system: "base16"`,`name: ${Wd(e.name)}`,...e.author?[`author: ${Wd(e.author)}`]:[],`variant: ${Wd(e.variant)}`,`palette:`,...Nd.map(t=>` ${t}: ${Wd(e.palette[t])}`)].join(`
|
|
184
|
+
`)){let e=t.trim();if(!e.startsWith(Su))continue;let n;try{n=JSON.parse(e.slice(18))}catch{return null}if(typeof n!=`object`||!n)return null;let r=n,i=r.kind,a=r.metadata;if(typeof a!=`object`||!a)return null;let o=typeof r.docName==`string`?r.docName:null,s=typeof r.size==`number`&&Number.isFinite(r.size)?r.size:null;if(i===`bridge-merge-loss`){let e=a;return Array.isArray(e.lostSubstrings)&&e.lostSubstrings.every(e=>typeof e==`string`)?{kind:`bridge-merge-loss`,docName:o,size:s,metadata:{lostSubstrings:e.lostSubstrings}}:null}if(i===`producer-guard-loss`){let e=a;return typeof e.construct==`string`?{kind:`producer-guard-loss`,docName:o,size:s,metadata:{construct:e.construct}}:null}if(i===`observer-a-duplication`){let e=a;return typeof e.duplicatedLineCount==`number`&&Number.isFinite(e.duplicatedLineCount)?{kind:`observer-a-duplication`,docName:o,size:s,metadata:{duplicatedLineCount:e.duplicatedLineCount}}:null}if(i===`external-change-rescue`){let e=a;return typeof e.incomingDiskSha==`string`?{kind:`external-change-rescue`,docName:o,size:s,metadata:{incomingDiskSha:e.incomingDiskSha}}:null}if(i===`external-change-rescue-disk-update`){let e=a;return typeof e.incomingDiskSha==`string`?{kind:`external-change-rescue-disk-update`,docName:o,size:s,metadata:{incomingDiskSha:e.incomingDiskSha}}:null}if(i===`defer-exhaustion-loss`){let e=a;return typeof e.deferCount==`number`&&Number.isFinite(e.deferCount)?{kind:`defer-exhaustion-loss`,docName:o,size:s,metadata:{deferCount:e.deferCount}}:null}if(i===`observer-a-apply-loss`){let e=a;return Array.isArray(e.lostSubstrings)&&e.lostSubstrings.every(e=>typeof e==`string`)?{kind:`observer-a-apply-loss`,docName:o,size:s,metadata:{lostSubstrings:e.lostSubstrings}}:null}if(i===`bridge-derive-loss`){let e=a;return Array.isArray(e.lostSubstrings)&&e.lostSubstrings.every(e=>typeof e==`string`)?{kind:`bridge-derive-loss`,docName:o,size:s,metadata:{lostSubstrings:e.lostSubstrings}}:null}if(i===`bridge-backstop-trip`){let e=a;return typeof e.rounds==`number`&&Number.isFinite(e.rounds)?{kind:`bridge-backstop-trip`,docName:o,size:s,metadata:{rounds:e.rounds}}:null}if(i===`persistence-reconcile-loss`){let e=a;return typeof e.atRiskLines==`number`&&Number.isFinite(e.atRiskLines)&&typeof e.witnessAvailable==`boolean`?{kind:`persistence-reconcile-loss`,docName:o,size:s,metadata:{atRiskLines:e.atRiskLines,witnessAvailable:e.witnessAvailable}}:null}if(i===`persistence-duplication-reset`){let e=a;return typeof e.copies==`number`&&Number.isFinite(e.copies)&&typeof e.fragmentChildren==`number`&&Number.isFinite(e.fragmentChildren)?{kind:`persistence-duplication-reset`,docName:o,size:s,metadata:{copies:e.copies,fragmentChildren:e.fragmentChildren}}:null}if(i===`persistence-divergence-realign`||i===`managed-artifact-reconcile`){let e=a;return typeof e.diskBytes==`number`&&Number.isFinite(e.diskBytes)&&typeof e.discardedBytes==`number`&&Number.isFinite(e.discardedBytes)?{kind:i,docName:o,size:s,metadata:{diskBytes:e.diskBytes,discardedBytes:e.discardedBytes}}:null}if(i===`auto-consolidation`){let e=a;return typeof e.foldedRefs==`number`&&Number.isFinite(e.foldedRefs)&&typeof e.trigger==`string`?{kind:`auto-consolidation`,docName:o,size:s,metadata:{foldedRefs:e.foldedRefs,trigger:e.trigger}}:null}return null}return null}function wu(e){let t={kind:e.kind,metadata:e.metadata};return e.docName!==null&&(t.docName=e.docName),e.size!==null&&(t.size=e.size),`${Su}${JSON.stringify(t)}`}const Tu={"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}},Eu=Object.keys(Tu);function Du(e){return e==null||Tu[e].visibility===`surfaced`}function Ou(e){return e==null||Tu[e].chainAnchor}a();const ku=[`off`,`follow`,`full`],Au=`pull`,ju=[`off`,`follow`,`full`,Au],Mu=[`follow`,`full`,Au];function Nu(e){return e===Au?`follow`:Pu(e)?e:null}function Pu(e){return typeof e==`string`&&ku.includes(e)}function Fu(e){return e===!0?`full`:e===!1?`off`:null}function Iu(e){return e===!0?`full`:e===!1?`off`:Nu(e)}function Lu(e){let t=Nu(e?.mode);return t===null?Fu(e?.enabled):t}const Ru=3600;function zu(e,t){return typeof e!=`number`||!Number.isFinite(e)?t:Math.min(Ru,Math.max(30,Math.round(e)))}function Bu(e){return{pullIntervalSeconds:zu(e?.pullIntervalSeconds,30),pushIntervalSeconds:zu(e?.pushIntervalSeconds,60)}}const Vu=new Set(Object.keys({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`})),Hu=new Set([`md`,`mdx`,`mmd`,`mermaid`]),Uu=new Set([...Vu,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!Hu.has(e)));function Wu(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:Uu.has(t.slice(n+1).toLowerCase())}const Gu=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],Ku=[`video/mp4`,`video/webm`,`video/ogg`],qu=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Ju=[`application/pdf`],Yu=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Xu=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Zu=new Set([`pdf`]),Qu=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),$u=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(`.`)),ed=new Set(`exe.bat.cmd.ps1.com.msi.vbs.js.jse.wsf.wsh.hta.sh.command.csh.ksh.bash.zsh.fish.desktop.action.workflow.html.htm.svg.xml.mhtml.svgz.dmg.pkg.mpkg.scpt.applescript.terminal.prefpane.webloc.inetloc.fileloc.jar.appimage.deb.rpm.msix.appx.ipa.apk.pif.scr.lnk.url`.split(`.`)),td=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(`.`)),nd=new Set([`html`,`htm`]),rd=`sandbox allow-scripts; connect-src 'none'`,id=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(`.`)),ad=`same-dir`,od=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(`.`)),sd=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],cd=[`mp4`,`webm`,`mov`,`m4v`],ld=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],ud=[`pdf`],dd=[`json`,`toml`,`lock`];function fd(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}fd(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,sd,Yu),fd(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,cd,Xu),fd(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,ld,Qu),fd(`SIDEBAR_PDF_ASSET_EXTENSIONS`,ud,Zu),fd(`FILE_ATTACHMENT_EXTENSIONS`,[...$u],od),fd(`WIKI_EMBED_EXTENSIONS`,[...od],td);const pd=new Set(sd),md=new Set(cd),hd=new Set(ld),gd=new Set(ud),_d=new Set(dd);fd(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...sd,...cd,...ld,...ud,...dd])],id);const vd=new Set([`base`,`canvas`]),yd=new Set([`mmd`,`mermaid`]);function bd(e){let t=e.lastIndexOf(`.`);return t<0?!1:yd.has(e.slice(t+1).toLowerCase())}const xd=new Set([`excalidraw`]);function Sd(e){let t=e.lastIndexOf(`.`);return t<0?!1:xd.has(e.slice(t+1).toLowerCase())}const Cd=new Set([...td,...vd,...yd,...xd]);function wd(e){let t=e.toLowerCase().replace(/^\./,``);return pd.has(t)?`image`:md.has(t)?`video`:hd.has(t)?`audio`:gd.has(t)?`pdf`:_d.has(t)||vd.has(t)?`text`:yd.has(t)?`mermaid`:xd.has(t)?`excalidraw`:Vu.has(t)?`text`:null}const Td=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],Ed=new Set([`ar`,`ur`]),Dd=Td.filter(e=>!Ed.has(e)),Od=[`markdownlint`,`frontmatter`,`okf`],kd=[`missing`,`invalid`];[...Od];const Ad=[`off`,`warning`,`error`],jd=`warning`,Md=[`error`,`warning`],Nd=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],Pd={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`},Fd=/^#[0-9a-fA-F]{6}$/,Id=/\P{White_Space}/u;function Ld(e){return Id.test(e)}function Rd(e){return typeof e==`string`&&Fd.test(e)}function zd(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,...Hd(t)}}const Bd={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`},Vd=Object.keys(Bd);function Hd(e){let t={};for(let n of Vd)t[`ansi-${Ud(n)}`]=e[Bd[n]];return t}function Ud(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function Wd(e){return JSON.stringify(e).replace(/[\u007f-\u009f\u2028\u2029\ufffe\uffff]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function Gd(e){return`${[`system: "base16"`,`name: ${Wd(e.name)}`,...e.author?[`author: ${Wd(e.author)}`]:[],`variant: ${Wd(e.variant)}`,`palette:`,...Nd.map(t=>` ${t}: ${Wd(e.palette[t])}`)].join(`
|
|
185
185
|
`)}\n`}function Kd(e){let t;try{t=(0,Bc.parse)(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 Nd){let t=i[e]??i[e.toLowerCase()];if(t==null){o.push(e);continue}let n=qd(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`&&!Ld(n.name)||typeof n.author==`string`&&!Ld(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:Yd(a),palette:a}}}function qd(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]}`),Fd.test(t)?t.toLowerCase():null}function Jd(e){let t=Rd(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 Yd(e){return Jd(e.base00)<Jd(e.base05)?`dark`:`light`}const Xd={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`}},Zd={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`}},Qd={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`}},$d={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`}},ef={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`}},tf={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 nf(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>zd(n)}}function rf(e,t){return{id:e,label:t,kind:`system`}}const af=[rf(`default`,`Default`),nf(`dracula`,`Dracula`,Xd),nf(`catppuccin-frappe`,`Catppuccin Frappé`,Zd),nf(`catppuccin-latte`,`Catppuccin Latte`,Qd),nf(`monokai`,`Monokai`,$d),nf(`gruvbox`,`Gruvbox`,ef),nf(`solarized`,`Solarized`,tf),rf(`custom`,`Custom`)],of=af.map(e=>e.id),sf=/^[a-z0-9-]{1,32}$/,cf=/\p{M}+/gu,lf=/['\u2019\u02bc]+/gu,uf=/[^a-z0-9]+/g;function df(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 ff(e){let t=e.trim();if(t.length===0)return{ok:!1,code:`empty`};let n=t.normalize(`NFKD`).replace(cf,``).toLowerCase().replace(lf,``).replace(uf,`-`).replace(/^-+|-+$/g,``),r=df(t),i=n.length===0?`theme-${r}`:n.length<=26?n:`${n.slice(0,26-r.length-1).replace(/-+$/g,``)}-${r}`,a=pf(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 pf(e){if(e.length===0)return{ok:!1,code:`empty`};let t=`saved-`+e;return sf.test(t)?{ok:!0,id:t}:{ok:!1,code:/^[a-z0-9-]+$/.test(t)?`too-long`:`invalid-chars`}}function mf(e){if(!sf.test(e)||!e.startsWith(`saved-`))return{ok:!1};let t=e.slice(6);return t.length===0?{ok:!1}:{ok:!0,stem:t}}new Map(af.map(e=>[e.id,e]));const hf=Symbol.for(`@inkeep/open-knowledge/field-registry`),gf=globalThis;gf[hf]===void 0&&(gf[hf]=ir());const _f=gf[hf];function vf(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=yf(t)?_f.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function yf(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function bf(){return Object.fromEntries(Nd.map(e=>[e,M().register(_f,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${Pd[e]}, as a #rrggbb hex string.`}).optional()]))}function xf(){return of.filter(e=>e!=="default"&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}const Sf=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),Cf=52428800,wf=26214400,Tf=12582912,Ef=`https://api.openai.com/v1`,Df=`text-embedding-3-small`,Of=96e3,kf=3e4,Af=2048,jf=16384e3,Mf=6e5,Nf=Object.freeze([`127.0.0.1`]),Pf=/^[1-9]\d*(s|m|h)$/,Ff=/^https?:\/\//;function If(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 Lf(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&If(e)?null:`insecure-scheme`}function Rf(e){let t=e.trim();return t===``?`./`:t}function zf(e){let t=Rf(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`||!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}const Bf=eo({content:eo({dir:M().register(_f,{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(_f,{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(zf,{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:eo({theme:L([`light`,`dark`,`system`]).register(_f,{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:L([`system`,...Td]).register(_f,{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(_f,{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 ${xf()}, 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(sf,{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(_f,{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 ${xf()}, 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(sf,{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(_f,{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(sf,{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(_f,{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:eo({name:M().register(_f,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:M().register(_f,{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:L([`dark`,`light`]).register(_f,{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(),...bf()}).optional(),preview:eo({autoOpen:P().register(_f,{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:eo({showHiddenFiles:P().register(_f,{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(_f,{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(_f,{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(_f,{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(_f,{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(_f,{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(_f,{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:eo({wordWrap:P().register(_f,{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(_f,{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:eo({autoApproveOkTools:P().register(_f,{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:eo({mode:L(ju).register(_f,{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(_f,{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:L(Mu).register(_f,{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(Ru).register(_f,{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(Ru).register(_f,{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:no([P(),L(ju)]).register(_f,{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:eo({enabled:P().register(_f,{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(_f,{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:eo({enabled:P().register(_f,{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:eo({localSink:eo({enabled:P().register(_f,{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:eo({maxBytes:N().register(_f,{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(Cf)}).default({maxBytes:Cf}),logs:eo({maxBytes:N().register(_f,{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(wf)}).default({maxBytes:wf}),attributeDenylist:F(M()).register(_f,{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([...Sf])}).default({enabled:!0,spans:{maxBytes:Cf},logs:{maxBytes:wf},attributeDenylist:[...Sf]}),skillInstallReports:eo({enabled:P().register(_f,{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:Cf},logs:{maxBytes:wf},attributeDenylist:[...Sf]},skillInstallReports:{enabled:!0}}),lossCapture:eo({enabled:P().register(_f,{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(_f,{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(Tf)}).default({enabled:!0,maxBytes:Tf}),bridge:eo({backgroundThrottle:eo({enabled:P().register(_f,{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:eo({enabled:P().register(_f,{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:eo({enabled:P().register(_f,{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:eo({enabled:P().register(_f,{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:eo({enabled:P().register(_f,{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:eo({enabled:P().register(_f,{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:eo({semantic:eo({enabled:P().register(_f,{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(_f,{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(Ef),model:M().register(_f,{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(Df),dimensions:N().int().positive().register(_f,{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(_f,{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(Af).register(_f,{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(jf).register(_f,{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(Of).catch(Of),docTimeoutMs:N().int().min(1).max(Mf).register(_f,{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(kf).catch(kf)}).default({enabled:!1,baseUrl:Ef,model:Df,maxBatchSize:96,maxBatchChars:Of,docTimeoutMs:kf})}).default({semantic:{enabled:!1,baseUrl:Ef,model:Df,maxBatchSize:96,maxBatchChars:Of,docTimeoutMs:kf}}),contentRules:eo({markdownlint:I({enabled:P().register(_f,{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(_f,{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:no([M(),F(M())]).optional(),file:M(),enabled:P().optional()})).register(_f,{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(_f,{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:co(M(),P()).register(_f,{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(_f,{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:eo({links:L(Ad).register(_f,{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(jd),fileTreeIndicators:P().register(_f,{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(_f,{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:jd,fileTreeIndicators:!0,suppressLogLinkAdvisories:!0}),linkPreviews:eo({enabled:P().register(_f,{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:eo({port:N().int().min(1).max(65535).register(_f,{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(_f,{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([...Nf]),externalUrl:Ca({protocol:/^https?$/}).regex(Ff).register(_f,{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(_f,{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(_f,{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:no([R(`off`),M().regex(Pf)]).register(_f,{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:[...Nf],allowExternal:!1})}),Vf=`open-knowledge-config`;async function Hf(e,t,n){let r=i.getTracer(Vf),a=t?{attributes:t}:{};return r.startActiveSpan(e,a,async e=>{try{return await n(e)}catch(t){throw e.recordException(t),e.setStatus({code:o.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Uf(e,t,n){let r=i.getTracer(Vf),a=t?{attributes:t}:{};return r.startActiveSpan(e,a,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:o.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Wf(e,t){let n=i.getActiveSpan();n&&n.addEvent(e,t)}function Gf(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 Kf(e,t){let n=e;for(let e of t){n=Gf(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function qf(e,t){let n=Kf(e,t);if(n!==void 0)return vf(n)}function kte(e,t){return e===`either`||e===t}function Ate(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=qf(Bf,i);a?.scope!==void 0&&(kte(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 Jf(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);if(!e.hasIn(r))continue;let i=e.getIn(r,!0);(0,Bc.isCollection)(i)||e.deleteIn(r)}}function jte(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)){Jf(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}Jf(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Mte(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}function Nte(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,Bc.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,Bc.isNode)(r))return r}return e.contents??null}function Pte(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function Yf(e,t,n,r,i){let a=e.split(`
|
|
186
186
|
`),o=r-1;if(o<0||o>=a.length)return``;let s=a[o]??``,c=t-(i-1)+s.length,l=Math.max(1,Math.min(n,c)-t),u=[],d=String(o+2).length;for(let e=Math.max(0,o-1);e<=Math.min(a.length-1,o+1);e++){let t=e===o,n=t?`>`:` `,r=String(e+1).padStart(d,` `);if(u.push(`${n} ${r} | ${a[e]??``}`),t){let e=` `.repeat(2+d+3+i-1);u.push(`${e}${`^`.repeat(l)}`)}}return u.join(`
|
|
187
187
|
`)}function Xf(e){let t=Nte(e.doc,e.path);if(!t)return;let n=t.range;if(!n)return;let[r,,i=r]=n,{line:a,column:o}=Pte(e.source,r),s=(0,Bc.isCollection)(t)?Yf(e.source,r,r+1,a,o):Yf(e.source,r,i,a,o);return{file:e.file,line:a,column:o,snippet:s.length>0?s:void 0}}const Zf=I({file:M(),line:N().int().min(1),column:N().int().min(1),snippet:M().optional()}),Fte=I({path:F(no([M(),N()])),message:M(),issueCode:M(),params:co(M(),Ja()).optional(),source:Zf.optional()}),Ite=L([`user`,`project`,`project-local`,`either`]),Qf=L([`user`,`project`,`project-local`]),$f=I({code:R(`YAML_PARSE`),detail:M()}),ep=I({code:R(`UNREADABLE`),detail:M()}),tp=I({code:R(`SCHEMA_INVALID`),issues:F(Fte)}),np=I({code:R(`REMOVED_KEY`),path:F(M()),redirect:M(),source:Zf.optional()}),rp=I({path:F(M()),message:M(),source:Zf.omit({snippet:!0}).optional()}),ip=I({code:R(`VALUE_FALLBACK`),issues:F(rp)}),ap=io(`code`,[$f,tp,ep,I({code:R(`SCOPE_VIOLATION`),path:F(M()),expectedScope:Ite,actualScope:Qf}),I({code:R(`NOT_AGENT_SETTABLE`),path:F(M())}),I({code:R(`MIXED_SCOPE`),paths:F(I({path:F(M()),scope:Qf}))}),np,I({code:R(`NOT_SYNCED`),detail:M()}),I({code:R(`WRITE_ERROR`),detail:M()}),I({code:R(`OKIGNORE_INVALID`),detail:M(),lineNumber:N().int().min(1).optional()}),I({code:R(`UNKNOWN`),message:M().optional()})]);io(`code`,[np,ip,$f,tp,ep]);const Lte=I({diagnostics:F(io(`code`,[I({code:R(`VALUE_FALLBACK`),scope:Qf,file:M(),issues:F(rp.omit({source:!0}).extend({line:Zf.shape.line.optional(),column:Zf.shape.column.optional()}))}),I({code:R(`REMOVED_KEY`),scope:Qf,file:M(),path:F(M()),redirect:M()}),I({code:R(`YAML_PARSE`),scope:Qf,file:M()}),I({code:R(`SCHEMA_INVALID`),scope:Qf,file:M()}),I({code:R(`UNREADABLE`),scope:Qf,file:M()})]))}),Rte=new Set(ap.options.map(e=>e.shape.code.value)),zte=no([ap,eo({code:M(),message:M().optional()})]);function op(e){return Rte.has(e.code)}function sp(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 Bte(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 Vte(e){if(e.code===`VALUE_FALLBACK`){let t=ip.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(`
|
|
@@ -463,7 +463,7 @@ $2`).split(`
|
|
|
463
463
|
</div>`}];function M0(e){return["```html preview",e.html,"```"].join(`
|
|
464
464
|
`)}const N0=[{name:`--chart-1`,light:`oklch(0.62 0.19 259)`,dark:`oklch(0.72 0.14 259)`},{name:`--chart-2`,light:`oklch(0.58 0.14 145)`,dark:`oklch(0.73 0.13 145)`},{name:`--chart-3`,light:`oklch(0.62 0.15 70)`,dark:`oklch(0.77 0.14 70)`},{name:`--chart-4`,light:`oklch(0.55 0.18 290)`,dark:`oklch(0.72 0.16 290)`},{name:`--chart-5`,light:`oklch(0.58 0.21 25)`,dark:`oklch(0.72 0.2 25)`},{name:`--primary`,light:`oklch(0.5621 0.1983 259.59)`,dark:`#69a3ff`},{name:`--primary-foreground`,light:`oklch(0.985 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--background`,light:`oklch(1 0 0)`,dark:`oklch(0.145 0 0)`},{name:`--card`,light:`oklch(1 0 0)`,dark:`oklch(0.205 0 0)`},{name:`--card-foreground`,light:`oklch(0.145 0 0)`,dark:`oklch(0.985 0 0)`},{name:`--muted-foreground`,light:`oklch(0.556 0 0)`,dark:`oklch(0.708 0 0)`},{name:`--border`,light:`oklch(0.922 0 0)`,dark:`oklch(1 0 0 / 10%)`},{name:`--destructive`,light:`oklch(0.577 0.245 27.325)`,dark:`oklch(0.704 0.191 22.216)`},{name:`--radius`,light:`0.625rem`,dark:`0.625rem`}];function P0(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);if(n<=0)return t;let r=t.slice(n).toLowerCase();return v0.includes(r)?t.slice(0,n):t}function F0(e){return P0(e)===`log`}const I0=`127.0.0.1`,L0=Object.freeze([{value:`workflow-fit`,label:`It didn't fit into my workflow`},{value:`missing-feature`,label:`It was missing a feature I needed`},{value:`hard-to-start`,label:`It was too hard to set up or get started`},{value:`unreliable`,label:`Bugs, crashes, or it felt unreliable`},{value:`switched-tool`,label:`I'm switching to another tool`},{value:`one-off`,label:`It was a trial or one-off project`},{value:`other`,label:`Something else`}]);new Set(L0.map(e=>e.value));const R0=Iw.extend({priority:60,addAttributes(){return{...this.parent?.(),fenceDelimiter:{default:"`"},fenceLength:{default:3},meta:{default:null},sourceStyle:{default:`fenced`},sourceClosingFenceLength:{default:null,rendered:!1},sourceUnclosedFence:{default:!1,rendered:!1},sourceFenceIndent:{default:null,rendered:!1},sourceInfoPadding:{default:null,rendered:!1},sourceIndents:{default:null,rendered:!1}}}}),z0=Yw.extend({name:`emphasis`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`*`}}},addInputRules(){return[mw({find:Ww,type:this.type,getAttributes:{sourceDelimiter:`*`}}),mw({find:Kw,type:this.type,getAttributes:{sourceDelimiter:`_`}})]}}),B0=Uw.extend({name:`strong`,priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`**`}}},addInputRules(){return[mw({find:Rw,type:this.type,getAttributes:{sourceDelimiter:`**`}}),mw({find:Bw,type:this.type,getAttributes:{sourceDelimiter:`__`}})]}}),V0=ew.create({name:`escapeMark`,priority:10,excludes:``,inclusive:!1,parseHTML(){return[{tag:`span[data-escape-mark]`}]},renderHTML(){return[`span`,{"data-escape-mark":``},0]}}),H0=Aw.create({name:`footnoteDefinition`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){let e=e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}};return[{tag:`aside[data-footnote-def]`,getAttrs:e},{tag:`aside.footnote-def`,getAttrs:e}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.identifier??``);return[`aside`,{...t,"data-footnote-def":``,"data-footnote-id":n,id:`fn-${n}`,class:`footnote-def`},[`div`,{class:`footnote-body`},0],[`a`,{href:`#fnref-${n}`,class:`footnote-backref`,contentEditable:`false`,"aria-label":`Back to reference`},`↩`]]},addCommands(){return{insertFootnoteDefinition:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e},content:[{type:`paragraph`}]})}}});function U0({node:e}){return``.repeat(e.nodeSize-e.content.size)}const W0=Aw.create({name:`footnoteReference`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,draggable:!1,priority:60,renderText:U0,addAttributes(){return{identifier:{default:``},label:{default:null}}},parseHTML(){return[{tag:`sup[data-footnote-ref]`,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-footnote-id`)||``;return{identifier:t,label:t||null}}}]},renderHTML({node:e}){let t=String(e.attrs.identifier??``);return[`sup`,{id:`fnref-${t}`,"data-footnote-ref":``,"data-footnote-id":t,class:`footnote-ref`},[`a`,{href:`#fn-${t}`,class:`footnote-ref-link`},`[${t}]`]]},addCommands(){return{insertFootnoteReference:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{identifier:e,label:e}})}}}),G0=Zw.extend({marks:`_`,priority:60,addAttributes(){return{...this.parent?.(),hardBreakStyle:{default:`backslash`},sourceRaw:{default:null}}}}),K0=$w.extend({priority:60,addAttributes(){return{...this.parent?.(),headingStyle:{default:`atx`},sourceTrailingHashes:{default:null},sourceUnderlineLength:{default:null},sourceContiguousNext:{default:!1},sourceLeadingIndent:{default:null,rendered:!1},sourceInteriorSpacing:{default:null,rendered:!1}}}}),q0=Aw.create({name:`htmlBlock`,group:`block`,atom:!0,priority:60,addAttributes(){return{content:{default:``}}},parseHTML(){return[{tag:`div[data-html-block]`}]},renderHTML({node:e}){return[`div`,{"data-html-block":``,class:`html-block`},e.attrs.content]}}),J0=Aw.create({name:`imageReference`,marks:`_`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:U0,addAttributes(){return{alt:{default:``},label:{default:``},identifier:{default:``},referenceType:{default:`shortcut`}}},parseHTML(){return[{tag:`img[data-image-reference]`}]},renderHTML({node:e}){let{alt:t,label:n,referenceType:r}=e.attrs;return[`img`,{"data-image-reference":``,"data-reference-type":r,"data-label":n,alt:t||n}]}});function Y0(e){if(typeof e!=`string`||!e.startsWith(`/`))return e;let t=globalThis.window?.okDesktop?.config?.apiOrigin;return typeof t==`string`&&t?t+e:e}const X0=tT.extend({marks:`_`,priority:60,renderText:U0,addAttributes(){return{...this.parent?.(),sourceUrl:{default:null,rendered:!1}}},renderHTML({HTMLAttributes:e}){let t=ZS(this.options.HTMLAttributes,e);return typeof t.src==`string`&&(t.src=Y0(t.src)),[`img`,t]}}),Z0=Aw.create({name:`jsxComponent`,group:`block`,atom:!1,content:`block*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`div[data-jsx-component]`,getAttrs:e=>typeof e!=`string`&&{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-jsx-component":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]},addCommands(){return{insertJsxComponent:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{sourceRaw:e}})}}}),Q0=Aw.create({name:`jsxInline`,group:`inline`,inline:!0,atom:!1,content:`text*`,isolating:!1,selectable:!0,priority:60,renderText:U0,addAttributes(){return{componentName:{default:``},kind:{default:`element`},attributes:{default:[]},sourceRaw:{default:``},sourceDirty:{default:!1},props:{default:{}}}},parseHTML(){return[{tag:`span[data-jsx-inline]`,getAttrs:e=>typeof e!=`string`&&{componentName:e.getAttribute(`data-component-name`)||``,sourceRaw:e.getAttribute(`data-source-raw`)||``}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-jsx-inline":``,"data-component-name":e.componentName,"data-source-raw":e.sourceRaw},0]}}),$0=[`https`,`http`,`mailto`,`tel`,`ftp`,`sms`],e2=$0.map(e=>`${e}:`).join(`|`);RegExp(`^(?:${e2}|\\/|#|\\?|\\.\\/|\\.\\.\\/)`,`i`);function t2(e){let t=e.trim();if(t===``)return!0;let n=t.indexOf(`:`);if(n===-1)return!0;let r=t.indexOf(`/`),i=t.indexOf(`?`),a=t.indexOf(`#`);return n>Math.min(r===-1?1/0:r,i===-1?1/0:i,a===-1?1/0:a)}const n2=new Set($0.map(e=>`${e}:`));function r2(e){try{let t=new URL(e,`https://placeholder.invalid`);return n2.has(t.protocol.toLowerCase())}catch{return!1}}const i2=`LinkFidelity must be derived from the Link extension`,a2=pT.extend({priority:60,addOptions(){let e=this.parent?.();if(e===void 0)throw Error(i2);return{...e,openOnClick:!1,enableClickSelection:!1,linkOnPaste:!0,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer`},isAllowedUri:r2,shouldAutoLink:()=>!0}},addAttributes(){let e=this.parent?.();if(e===void 0)throw Error(i2);return{...e,linkStyle:{default:`inline`,rendered:!1},refLabel:{default:null,rendered:!1},sourceForm:{default:null,rendered:!1},target:{default:null,rendered:!1},anchor:{default:null,rendered:!1},alias:{default:null,rendered:!1},sourceUrlForm:{default:null,rendered:!1},sourceTitleMarker:{default:null,rendered:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}}}),o2=Aw.create({name:`linkRefDef`,group:`block`,atom:!0,priority:60,addAttributes(){return{label:{default:``},href:{default:``},title:{default:null},sourceLayout:{default:null},sourceTitleMarker:{default:null}}},parseHTML(){return[{tag:`div[data-link-ref-def]`}]},renderHTML({node:e}){let{label:t,href:n,title:r}=e.attrs;return[`div`,{"data-link-ref-def":``,class:`link-ref-def`},r?`[${t}]: ${n} "${r}"`:`[${t}]: ${n}`]}});function s2(e){return e.type.name===`list`&&!e.attrs.ordered}function c2(e){return e.type.name===`list`&&!!e.attrs.ordered}function l2(e){let t=!1;return e.forEach(e=>{e.type.name===`listItem`&&e.attrs.checked!==null&&(t=!0)}),t}function u2(e,t,n,r,i,a,o){let s=VS(e=>e.type.name===`list`)(e.selection);if(s&&i(s.node)){let{$from:n,$to:i}=e.selection;return n.blockRange(i)?zg(r)(e,t):!1}if(s){if(!t)return!0;let{tr:n}=e;return n.setNodeMarkup(s.pos,void 0,{...s.node.attrs,...a}),o!==void 0&&s.node.forEach((e,t)=>{if(e.type.name===`listItem`){let r=s.pos+1+t;n.setNodeMarkup(r,void 0,{...e.attrs,...o})}}),t(n),!0}return Ig(n,a)(e,void 0)?!t||Ig(n,a)(e,n=>{if(o){let t=n.mapping.map(e.selection.$from.pos),r=n.doc.resolve(t);for(let e=r.depth;e>0;e--){let t=r.node(e);if(t.type.name===`listItem`){n.setNodeMarkup(r.before(e),void 0,{...t.attrs,...o});break}}}t(n)}):!1}function d2(e){return e===`x`||e===`X`}function f2(e){return e===`X`?`X`:null}function p2(e,t,n,r){let i=e.schema.nodes.list;if(!i)return!1;let a=e.doc.resolve(t.from),o=a.depth-1;if(o>0&&a.node(o).type.name===`listItem`&&a.index(o)===0){let i=a.node(o);return e.tr.delete(t.from,t.to).setNodeMarkup(a.before(o),void 0,{...i.attrs,checked:n,sourceCheckboxChar:r}),!0}let s=a.blockRange();if(!s)return!1;let c=Ym(s,i,{ordered:!1});if(!c)return!1;let l=e.tr;l.wrap(s,c),l.delete(l.mapping.map(t.from),l.mapping.map(t.to));let u=l.doc.resolve(l.mapping.map(t.from));for(let e=u.depth;e>0;e--){let t=u.node(e);if(t.type.name===`listItem`){l.setNodeMarkup(u.before(e),void 0,{...t.attrs,checked:n,sourceCheckboxChar:r});break}}return!0}const m2=/^\s*([-+*])\s$/,h2=/^\s*(\d+)([.)])\s$/,g2=/^\s*[-*+]\s\[([ xX]?)\]\s$/,_2=/^\s*\[([ xX]?)\]\s$/,v2=Aw.create({name:`list`,group:`block list`,content:`listItem+`,priority:60,addAttributes(){return{ordered:{default:!1},start:{default:1},spread:{default:!1},bulletMarker:{default:null},listMarkerDelimiter:{default:null}}},parseHTML(){return[{tag:`ul`,getAttrs:()=>({ordered:!1})},{tag:`ol`,getAttrs:e=>({ordered:!0,start:e.getAttribute(`start`)?Number(e.getAttribute(`start`)):1})}]},renderHTML({node:e,HTMLAttributes:t}){let n=e.attrs.ordered?`ol`:`ul`,r={};return e.attrs.ordered&&e.attrs.start!==1&&(r.start=e.attrs.start),[n,ZS(t,r),0]},addCommands(){return{toggleBulletList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:u2(e,t,n,r,e=>s2(e)&&!l2(e),{ordered:!1},{checked:null})},toggleOrderedList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:u2(e,t,n,r,e=>c2(e),{ordered:!0},{checked:null})},toggleTaskList:()=>({state:e,dispatch:t})=>{let n=e.schema.nodes.list,r=e.schema.nodes.listItem;return!n||!r?!1:u2(e,t,n,r,e=>s2(e)&&l2(e),{ordered:!1},{checked:!1})}}},addInputRules(){return[_w({find:m2,type:this.type,getAttributes:e=>({ordered:!1,bulletMarker:e[1]}),joinPredicate:(e,t)=>t.attrs.ordered===!1}),_w({find:h2,type:this.type,getAttributes:e=>({ordered:!0,start:Number(e[1]),listMarkerDelimiter:e[2]}),joinPredicate:(e,t)=>t.attrs.ordered===!0}),new YC({find:g2,handler:({state:e,range:t,match:n})=>p2(e,t,d2(n[1]),f2(n[1]))?void 0:null}),new YC({find:_2,handler:({state:e,range:t,match:n})=>p2(e,t,d2(n[1]),f2(n[1]))?void 0:null})]},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList(),"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList(),"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}}),y2=Aw.create({name:`listItem`,content:`paragraph block*`,defining:!0,addAttributes(){return{checked:{default:null},spread:{default:!1},sourceMarkerSpacing:{default:null,rendered:!1},sourceOrdinal:{default:null,rendered:!1},sourceCheckboxChar:{default:null,rendered:!1},sourceContinuationIndent:{default:null,rendered:!1}}},parseHTML(){return[{tag:`li`,getAttrs:e=>{let t=e.querySelector(`input[type="checkbox"]`);return{checked:t?t.checked:null}}}]},renderHTML({node:e,HTMLAttributes:t}){return e.attrs.checked===null?[`li`,ZS(t),0]:[`li`,ZS(t,{"data-type":`taskItem`,"data-checked":e.attrs.checked?`true`:`false`}),[`label`,{contenteditable:`false`},[`input`,{type:`checkbox`,...e.attrs.checked?{checked:`checked`}:{}}]],[`div`,0]]},addNodeView(){return({node:e,getPos:t,editor:n,HTMLAttributes:r})=>{let i=document.createElement(`li`);Object.entries(ZS(r,e.attrs.checked===null?{}:{"data-type":`taskItem`,"data-checked":String(!!e.attrs.checked)})).forEach(([e,t])=>{t!=null&&i.setAttribute(e,String(t))});let a=null,o=null,s=document.createElement(`div`),c=()=>{o&&(o.disabled=!n.isEditable)};return e.attrs.checked!==null&&(a=document.createElement(`label`),a.contentEditable=`false`,o=document.createElement(`input`),o.type=`checkbox`,o.checked=!!e.attrs.checked,c(),n.on(`update`,c),o.addEventListener(`change`,()=>{let r=t();r!==void 0&&typeof r==`number`&&n.view.dispatch(n.view.state.tr.setNodeMarkup(r,void 0,{...e.attrs,checked:o?.checked??!1}))}),a.appendChild(o),i.appendChild(a)),i.appendChild(s),{dom:i,contentDOM:s,update(t){return t.type!==e.type||t.attrs.checked!==null!=(e.attrs.checked!==null)?!1:(o&&t.attrs.checked!==null&&(o.checked=!!t.attrs.checked,o.disabled=!n.isEditable,i.setAttribute(`data-checked`,String(!!t.attrs.checked))),e=t,!0)},destroy(){n.off(`update`,c)}}}},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.sinkListItem(this.name);return!1},"Shift-Tab":()=>{let{$from:e}=this.editor.state.selection;for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return this.editor.commands.liftListItem(this.name);return!1}}}}),b2=v2,x2=y2,S2=Aw.create({name:`mathInline`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,renderText:U0,addAttributes(){return{formula:{default:``},id:{default:null},language:{default:`latex`},sourceDelimiter:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-math-inline]`,getAttrs:e=>typeof e!=`string`&&{formula:e.getAttribute(`data-formula`)||``,id:e.getAttribute(`id`)||null,language:e.getAttribute(`data-language`)||`latex`}}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-math-inline":``,"data-formula":e.formula,"data-language":e.language,...e.id?{id:e.id}:{}}]},addCommands(){return{insertMathInline:e=>({commands:t})=>t.insertContent({type:this.name,attrs:{formula:e}})}}}),C2=Aw.create({name:`rawMdxFallback`,group:`block`,atom:!1,content:`text*`,isolating:!0,selectable:!0,defining:!0,priority:60,addAttributes(){return{reason:{default:``},originalSpan:{default:{start:0,end:0}}}},parseHTML(){let e=e=>typeof e!=`string`&&{reason:e.getAttribute(`data-reason`)||``};return[{tag:`div[data-raw-mdx-fallback]`,getAttrs:e},{tag:`pre[data-raw-mdx-fallback]`,getAttrs:e}]},renderHTML({HTMLAttributes:e}){return[`div`,{"data-raw-mdx-fallback":``,"data-raw-badge":`raw`,"data-reason":e.reason,contenteditable:`false`,class:`raw-mdx-fallback`},0]},addNodeView(){return({HTMLAttributes:e})=>{let t=document.createElement(`div`);t.setAttribute(`data-raw-mdx-fallback`,``),t.setAttribute(`data-raw-badge`,`raw`),t.setAttribute(`contenteditable`,`false`),t.classList.add(`raw-mdx-fallback`),e.reason&&t.setAttribute(`data-reason`,e.reason);let n=document.createElement(`pre`);return n.classList.add(`raw-mdx-fallback-content`),n.setAttribute(`contenteditable`,`false`),t.appendChild(n),{dom:t,contentDOM:n,ignoreMutation:()=>!0}}}}),w2=jre.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceMarkerSpacings:{default:null}}}}),T2=Pre.extend({excludes:``,addAttributes(){return{...this.parent?.(),sourceFenceChar:{default:"`"},sourceFenceLength:{default:1},sourcePadded:{default:!1,rendered:!1}}}}),E2=Aw.create({name:`commentBlock`,group:`block`,content:`block+`,defining:!0,priority:60,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}},sourceLayout:{default:`block`,parseHTML:e=>e.getAttribute(`data-source-layout`)===`inline`?`inline`:`block`,renderHTML:e=>e.sourceLayout===`inline`?{"data-source-layout":`inline`}:{}}}},parseHTML(){return[{tag:`aside[data-comment-block]`},{tag:`aside.comment-block`}]},renderHTML({HTMLAttributes:e}){return[`aside`,{"data-comment-block":``,"data-clipboard-omit":`true`,class:`comment-block`,...e},0]},addCommands(){return{setCommentBlock:()=>({commands:e})=>e.wrapIn(this.name),toggleCommentBlock:()=>({commands:e})=>e.toggleWrap(this.name),unsetCommentBlock:()=>({commands:e})=>e.lift(this.name)}}}),D2=ew.create({name:`comment`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceForm:{default:`percent`,parseHTML:e=>e.getAttribute(`data-source-form`)===`html`?`html`:`percent`,renderHTML:e=>e.sourceForm===`html`?{"data-source-form":`html`}:{}}}},parseHTML(){return[{tag:`span[data-comment-mark]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-comment-mark":``,"data-clipboard-omit":`true`,class:`comment-mark`,...e},0]},addCommands(){return{setComment:()=>({commands:e})=>e.setMark(this.name),toggleComment:()=>({commands:e})=>e.toggleMark(this.name),unsetComment:()=>({commands:e})=>e.unsetMark(this.name)}}}),O2=nw.create({name:`docFidelity`,addGlobalAttributes(){return[{types:[`doc`],attributes:{sourceDocBoundary:{default:null,rendered:!1}}}]}});function k2(e){for(let t=e.depth;t>0;t--)if(e.node(t).type.name===`listItem`)return t;return null}function A2(e){let t=!1;return e.descendants(e=>!t&&(e.type.name===`list`&&(t=!0),!t)),t}function j2(e){let{selection:t}=e;return t instanceof Rh?t.$cursor:null}function M2(e){let t=j2(e);if(t?.parentOffset!==0)return!1;let n=k2(t);if(n===null||t.depth!==n+1||t.index(n)!==0)return!1;let r=t.index(n-1);return r!==0&&A2(t.node(n-1).child(r-1))}function N2(e,t){for(let n=t-1;n>=0;n--){let t=e.node(n),r=e.index(n);if(r<t.childCount-1){let e=t.child(r+1),i=n+1;for(;e.type.name===`list`&&e.firstChild;)e=e.firstChild,i+=1;return e.type.name===`listItem`?i:null}}return null}function P2(e){let t=j2(e);if(!t||t.parentOffset!==t.parent.content.size)return!1;let n=k2(t);if(n===null)return!1;for(let e=t.depth;e>n;e--)if(t.index(e-1)!==t.node(e-1).childCount-1)return!1;let r=N2(t,n);return r!==null&&r<n}const F2=nw.create({name:`listBoundaryMerge`,addKeyboardShortcuts(){let e=()=>{let{editor:e}=this;if(!M2(e.state))return!1;if(e.commands.undoInputRule())return!0;let{state:t,view:n}=e;return ng(t,n.dispatch,n)},t=()=>{let{editor:e}=this;if(!P2(e.state))return!1;let{state:t,view:n}=e;return rg(t,n.dispatch,n)};return{Backspace:e,"Mod-Backspace":e,Delete:t,"Mod-Delete":t}}}),I2=nw.create({name:`plainTextClipboard`,priority:1e3,addProseMirrorPlugins(){return[new Yh({key:new Qh(`okPlainTextClipboard`),props:{clipboardTextSerializer:e=>e.content.textBetween(0,e.content.size,`
|
|
465
465
|
|
|
466
|
-
`)}})]}}),L2=ew.create({name:`sourceLiteral`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-source-literal]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-source-literal":``,...e},0]}});function R2(e,t){if(typeof e!=`string`||typeof t!=`string`||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll(`\xA0`,` `),r=t.replaceAll(`\xA0`,` `);return n===r||z2(n)===r||m1(e)===t}function z2(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}const B2=Zre.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),V2=yE.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),H2=fE.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),U2=pE.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),W2=Aw.create({name:`tag`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,renderText:U0,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e!=`string`&&{value:e.getAttribute(`data-tag`)||``}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??``);return[`a`,{...t,"data-tag":n,href:`#tag/${n}`,class:`tag`},`#${n}`]},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:`tag`,attrs:{value:e}}).run()}}}),G2=/^(?:---|—-|___\s|\*\*\*\s)$/;function K2(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}const q2=Ire.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[hw({find:G2,type:this.type,getAttributes:e=>({sourceRaw:K2(e)})})]}}),J2=$re.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceForm:{default:`u`,rendered:!1}}}});function Y2(e,t){let{target:n,anchor:r,alias:i}=e;if(!t.separatorCrossed)return e;if(r!==null){let e=$2(r);return{target:n,anchor:e.length>0?e:null,alias:i===null?null:e4(i)}}return{target:$2(n),anchor:null,alias:i===null?null:e4(i)}}function X2(e,t,n){let r=e.trim();return r===t?!0:n===`alias`?e4(r)===t:$2(r)===t}function Z2(e,t,n){return typeof e==`string`&&X2(e,t,n)?e:t}function Q2(e){return $2(e.trim())===``}function $2(e){return e.endsWith(`\\`)?e.slice(0,-1):e}function e4(e){return e.replace(/\\\|/g,`|`)}function t4(e){let t=``,n=0;for(let r of e)r===`\\`?n++:(r===`|`&&n%2==0&&(t+=`\\`),n=0),t+=r;return t}function n4(e){return e.replace(/\|/g,`\\|`)}function r4(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function i4(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const a4=Aw.create({name:`wikiLink`,marks:`_`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:U0,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e!=`string`&&{target:e.getAttribute(`data-target`)||``,alias:r4(e.getAttribute(`data-alias`)),anchor:r4(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:r4(e.getAttribute(`data-alias`)),anchor:r4(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=r4(e.attrs.alias),i=r4(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},i4({target:n,alias:r,anchor:i})]}});function o4(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function s4(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const c4=[Z0,C2,Q0,S2,a4,Aw.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:U0,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}},parseHTML(){let e=e=>typeof e==`string`||!e.hasAttribute(`data-wiki-embed`)?!1:{target:e.getAttribute(`data-target`)||``,alias:r4(e.getAttribute(`data-alias`)),anchor:r4(e.getAttribute(`data-anchor`))};return[{tag:`img[data-wiki-embed]`,getAttrs:e,priority:100},{tag:`a[data-wiki-embed]`,getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=r4(e.attrs.alias),i=r4(e.attrs.anchor),a=r4(e.attrs.resolvedSrc),o=o4(n);if(Yu.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let s=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${s}#${i}`:s,target:`_blank`,rel:`noopener noreferrer`},s4({target:n,alias:r,anchor:i})]}}),W2,b2,x2,z0,B0,B2,J2,T2,R0,w2,K0,q2,a2,q0,o2,G0,V0,O2,L2,I2,Cie.configure({trailingNode:!1,undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,listKeymap:{listTypes:[{itemName:`listItem`,wrapperNames:[`list`]}]},italic:!1,bold:!1,strike:!1,underline:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:`color-mix(in oklch, var(--primary) 50%, transparent)`,width:2}}),F2,V2.configure({resizable:!0}),mE,U2,H2,X0.configure({inline:!0}),J0,gT,D2,E2,W0,H0];function l4(e){let{frontmatter:t}=Xc(e);if(t===``)return null;let n;try{let e=(0,Bc.parseDocument)(Qc(t));if(e.errors.length>0)return null;n=e.toJS()}catch{return null}return typeof n!=`object`||!n||Array.isArray(n)?null:n}const u4=/^[a-zA-Z0-9][\w/-]*$/;function d4(e){return e.startsWith(`#`)?e.slice(1):e}function f4(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function p4(e){if(!e||e.trim()===``)return[];let{map:t}=el(e);if(!t)return[];let n=f4(t.tags),r=[];for(let e of n){let t=d4(e);u4.test(t)&&r.push(t)}return r}const m4=I({changes:F(io(`kind`,[I({key:M(),kind:R(`added`),after:Wc}).loose(),I({key:M(),kind:R(`removed`),before:Wc}).loose(),I({key:M(),kind:R(`changed`),before:Wc,after:Wc}).loose()])),unparseable:I({before:M(),after:M()}).loose().nullable()}).loose();function h4(e){let{fenced:t}=tQ(e),n=rQ(t);if(n.map===null)return{fenced:t,map:{},keys:[],parseError:n.parseError};let r=al(n.doc);return{fenced:t,map:n.map,keys:r.length>0?r:Object.keys(n.map),parseError:void 0}}function g4(e,t){let n=h4(e),r=h4(t);if(n.parseError!==void 0||r.parseError!==void 0)return{changes:[],unparseable:{before:n.fenced,after:r.fenced}};let i=[],a=new Set;for(let e of r.keys){if(a.has(e))continue;a.add(e);let t=r.map[e];if(t===void 0)continue;let o=n.map[e];if(o===void 0){i.push({key:e,kind:`added`,after:t});continue}Jc(o,t)||i.push({key:e,kind:`changed`,before:o,after:t})}for(let e of n.keys){if(a.has(e))continue;a.add(e);let t=n.map[e];t!==void 0&&i.push({key:e,kind:`removed`,before:t})}return{changes:i,unparseable:null}}function _4(e,t){switch(e){case`darwin`:return[`/opt/homebrew/bin`,`/usr/local/bin`,`/opt/local/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`];case`win32`:return[];default:return[`/usr/local/bin`,`/home/linuxbrew/.linuxbrew/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`]}}function v4(e,t,n){let r=n.delimiter,i=(e??``).split(r).filter(e=>e.length>0),a=new Set(i),o=[];for(let e of t)!a.has(e)&&n.isDir(e)&&(a.add(e),o.push(e));return[...i,...o].join(r)}function y4(e,t){return v4(e,_4(t.platform,t.homeDir),t)}function b4(e,t){switch(e){case`darwin`:return[`${t}/Library/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`];case`win32`:return[];default:return[`${t}/.local/share/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`]}}function x4(e,t){return v4(e,[..._4(t.platform,t.homeDir),...b4(t.platform,t.homeDir)],t)}const S4=`:(literal)`;function C4(e){if(e===``)throw Error(`toPathspec: empty path. ":(literal)" is an empty pattern that matches every tracked path; pass "." if you meant the repo root.`);return`${S4}${e}`}function w4(e){if(e.length===0)throw Error(`pathspecArgs: empty path list. A bare "--" removes the pathspec restriction rather than selecting nothing.`);return[`--`,...e.map(e=>C4(e))]}function T4(e){return e.replaceAll(S4,``)}3072-E4("This is an OpenKnowledge project: load the `open-knowledge` skill and use the OpenKnowledge MCP tools for all markdown — don't probe for `.ok/` or use native file tools on `.md` / `.mdx`. ",`cursor`),new TextEncoder;function E4(e,t){let n=encodeURIComponent(e);return t===`cursor`?encodeURIComponent(n).length:n.length}function D4(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}}const O4=new Set([`opencode.json`]),k4=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function A4(e){return k4.test(e)}function j4(e){return A4(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:O4.has(e.slice(e.lastIndexOf(`/`)+1))}function M4(e,t){let n=D4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const N4=M().superRefine(M4).optional(),P4=M().superRefine(M4),F4={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},I4=M().optional(),L4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,R4=io(`kind`,[I({kind:R(`doc`),docPath:M().min(1)}).loose(),I({kind:R(`folder`),folderPath:M()}).loose()]),z4=L([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),B4=L([`current`,`stale`,`absent`,`empty`]),V4=io(`ok`,[I({ok:R(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:B4.optional().catch(void 0)}).loose(),I({ok:R(!1),error:z4,branch:M().min(1).optional()}).loose()]),H4=L([`user`,`org`]),U4=I({login:M().min(1),kind:H4,avatarUrl:M().optional()}).loose(),W4=L([`auth-required`,`network`]),G4=io(`ok`,[I({ok:R(!0),owners:F(U4)}).loose(),I({ok:R(!1),error:W4}).loose()]),K4=io(`ok`,[I({ok:R(!0),available:P()}).loose(),I({ok:R(!1),error:W4}).loose()]),q4=L([`public`,`private`]),J4=I({owner:M().min(1),name:M().min(1),visibility:q4,description:M().optional()}).loose(),Y4=L([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),X4=io(`ok`,[I({ok:R(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:R(!1),error:Y4}).loose()]);function Z4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const Q4=e=>e.refine(Z4,`invalid branch name`);function $4(e){if(e==null)return!1;let t=e instanceof Error?e.message:String(e);return/couldn'?t find remote ref|Remote branch .+ not found/i.test(t)}const e3=[/could not read (username|password)/i,/terminal prompts disabled/i,/user interactivity has been disabled/i,/unable to get password from user/i],eoe=[/insufficient scopes/i,/missing.*scope/i,/required scope/i],toe=[/permission denied.*\(publickey\)/i,/host key verification failed/i],t3=/fatal:.*repository.*not found/i,noe=[/\b(401|403)\b/,/authentication failed/i,/authorization failed/i,/invalid credentials/i,/credential helper/i,/bad credentials/i,/token.*expired/i,/expired.*token/i,t3];function roe(e){if(typeof e!=`object`||!e)return``;let t=e.git;return t==null?``:String(t)}function ioe(e){if(e==null)return{kind:`non-auth`};let t=`${e instanceof Error?e.message:String(e)}\n${roe(e)}`;return e3.some(e=>e.test(t))?{kind:`auth`,subclass:`no-credential`}:eoe.some(e=>e.test(t))?{kind:`auth`,subclass:`scope-mismatch`}:toe.some(e=>e.test(t))?{kind:`auth`,subclass:`ssh-auth`}:noe.some(e=>e.test(t))?/\b401\b/.test(t)||/token.*expired/i.test(t)?{kind:`auth`,subclass:`401`}:/\b403\b/.test(t)?{kind:`auth`,subclass:`403`}:t3.test(t)?{kind:`auth`,subclass:`not-found-as-identity`}:{kind:`auth`,subclass:`unknown-auth`}:{kind:`non-auth`}}function aoe(e){return e.kind===`auth`?e.subclass===`no-credential`||e.subclass===`401`||e.subclass===`unknown-auth`:!1}const n3={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()},ooe=io(`detached`,[I({detached:R(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Wa(),...n3}).loose(),I({detached:R(!0),currentBranch:Wa(),currentHeadSha:M().min(1),...n3}).loose()]),soe=I({branch:Q4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose(),coe=L([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]),loe=io(`ok`,[I({ok:R(!0)}).loose(),I({ok:R(!1),reason:coe,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]);L([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]);const uoe=I({branch:Q4(M().min(1)),path:M(),kind:L([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),doe=io(`verdict`,[I({verdict:R(`on-origin`)}).loose(),I({verdict:R(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:R(`deleted`)}).loose(),I({verdict:R(`never-on-branch`)}).loose(),I({verdict:R(`changed-locally`)}).loose(),I({verdict:R(`unknown`)}).loose()]).catch({verdict:`unknown`}),foe=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()}),poe=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:co(M().min(1),M().min(1)).optional(),boot:foe.optional(),collabClients:N().int().nonnegative().optional()}).loose(),moe=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:L([`git-config`,`synthesized`]),created_at:M().min(1)}).loose(),hoe=I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose(),r3=L(`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(`.`));function goe(e){throw Error(`Unexpected ProblemType variant: ${JSON.stringify(e)}`)}const i3=I({type:r3,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex(L4,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose(),_oe=I({parentDocName:M().min(1),placement:L([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose(),voe=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose(),yoe=I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(Z4,`invalid branch name`).optional()}).loose(),boe=I({type:R(`error`),problem:i3}).loose();function a3(e,t){let n=t.map(e=>[mp(e),e]);for(let t of e){let e=mp(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function xoe(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=a3([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=a3(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}const Soe=[`.ok`,`local`,`installed-skills.json`],Coe=L(hl),woe=eo({hosts:F(M()),scope:Coe,scripts:P(),installedAt:Ki(),projection:L([`symlink`,`copy`]).optional(),contentHash:M().optional()}),o3=eo({schema:R(1),skills:co(M(),woe).default({})});function Toe(){return{schema:1,skills:{}}}function Eoe(e){let t;try{t=JSON.parse(e)}catch{return null}let n=o3.safeParse(t);return n.success?n.data:null}const s3=[{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:`~`}],Doe=s3.map(e=>e.name);function c3(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
466
|
+
`)}})]}}),L2=ew.create({name:`sourceLiteral`,priority:10,excludes:``,inclusive:!1,addAttributes(){return{sourceRaw:{default:``}}},parseHTML(){return[{tag:`span[data-source-literal]`}]},renderHTML({HTMLAttributes:e}){return[`span`,{"data-source-literal":``,...e},0]}});function R2(e,t){if(typeof e!=`string`||typeof t!=`string`||/[\x00-\x1F\x7F]/.test(e))return!1;let n=e.replaceAll(`\xA0`,` `),r=t.replaceAll(`\xA0`,` `);return n===r||z2(n)===r||m1(e)===t}function z2(e){return e.replace(/\\([!-/:-@[-`{-~])/g,`$1`)}const B2=Zre.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDelimiter:{default:`~~`,rendered:!1}}}}),V2=yE.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceDashCounts:{default:null},sourceOuterPipes:{default:null,rendered:!1},sourceAlignmentPadding:{default:null,rendered:!1}}}}),H2=fE.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),U2=pE.extend({priority:60,addAttributes(){return{...this.parent?.(),sourcePadding:{default:null}}}}),W2=Aw.create({name:`tag`,marks:`_`,group:`inline`,inline:!0,atom:!0,selectable:!0,priority:60,renderText:U0,addAttributes(){return{value:{default:``}}},parseHTML(){return[{tag:`a[data-tag]`,getAttrs:e=>typeof e!=`string`&&{value:e.getAttribute(`data-tag`)||``}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.value??``);return[`a`,{...t,"data-tag":n,href:`#tag/${n}`,class:`tag`},`#${n}`]},addCommands(){return{insertTag:e=>({chain:t})=>t().insertContent({type:`tag`,attrs:{value:e}}).run()}}}),G2=/^(?:---|—-|___\s|\*\*\*\s)$/;function K2(e){let t=String(e[0]??``).replace(/\s+$/,``);return t===`—-`?`---`:t}const q2=Ire.extend({name:`thematicBreak`,priority:60,addAttributes(){return{...this.parent?.(),sourceRaw:{default:`---`}}},addInputRules(){return[hw({find:G2,type:this.type,getAttributes:e=>({sourceRaw:K2(e)})})]}}),J2=$re.extend({priority:60,addAttributes(){return{...this.parent?.(),sourceForm:{default:`u`,rendered:!1}}}});function Y2(e,t){let{target:n,anchor:r,alias:i}=e;if(!t.separatorCrossed)return e;if(r!==null){let e=$2(r);return{target:n,anchor:e.length>0?e:null,alias:i===null?null:e4(i)}}return{target:$2(n),anchor:null,alias:i===null?null:e4(i)}}function X2(e,t,n){let r=e.trim();return r===t?!0:n===`alias`?e4(r)===t:$2(r)===t}function Z2(e,t,n){return typeof e==`string`&&X2(e,t,n)?e:t}function Q2(e){return $2(e.trim())===``}function $2(e){return e.endsWith(`\\`)?e.slice(0,-1):e}function e4(e){return e.replace(/\\\|/g,`|`)}function t4(e){let t=``,n=0;for(let r of e)r===`\\`?n++:(r===`|`&&n%2==0&&(t+=`\\`),n=0),t+=r;return t}function n4(e){return e.replace(/\|/g,`\\|`)}function r4(e){if(typeof e!=`string`)return null;let t=e.trim();return t.length>0?t:null}function i4(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const a4=Aw.create({name:`wikiLink`,marks:`_`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:U0,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolved:{default:!1},sourceTarget:{default:null,rendered:!1},sourceAnchor:{default:null,rendered:!1},sourceAlias:{default:null,rendered:!1}}},parseHTML(){return[{tag:`span[data-wiki-link]`,getAttrs:e=>typeof e!=`string`&&{target:e.getAttribute(`data-target`)||``,alias:r4(e.getAttribute(`data-alias`)),anchor:r4(e.getAttribute(`data-anchor`)),resolved:e.getAttribute(`data-resolved`)===`true`}},{tag:`a.wiki-link[data-target]`,priority:100,getAttrs:e=>{if(typeof e==`string`)return!1;let t=e.getAttribute(`data-target`)??``;return t?{target:t,alias:r4(e.getAttribute(`data-alias`)),anchor:r4(e.getAttribute(`data-anchor`)),resolved:!1}:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=r4(e.attrs.alias),i=r4(e.attrs.anchor),a=e.attrs.resolved===!0;return[`span`,{...t,"data-wiki-link":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,"data-resolved":a?`true`:`false`},i4({target:n,alias:r,anchor:i})]}});function o4(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0||n===t.length-1?``:t.slice(n+1).toLowerCase()}function s4(e){return e.alias?e.alias:e.anchor?`${e.target}#${e.anchor}`:e.target}const c4=[Z0,C2,Q0,S2,a4,Aw.create({name:`wikiLinkEmbed`,group:`inline`,inline:!0,atom:!0,priority:60,renderText:U0,addAttributes(){return{target:{default:``},alias:{default:null},anchor:{default:null},resolvedSrc:{default:null,rendered:!1,parseHTML:()=>null}}},parseHTML(){let e=e=>typeof e==`string`||!e.hasAttribute(`data-wiki-embed`)?!1:{target:e.getAttribute(`data-target`)||``,alias:r4(e.getAttribute(`data-alias`)),anchor:r4(e.getAttribute(`data-anchor`))};return[{tag:`img[data-wiki-embed]`,getAttrs:e,priority:100},{tag:`a[data-wiki-embed]`,getAttrs:e,priority:100}]},renderHTML({node:e,HTMLAttributes:t}){let n=String(e.attrs.target??``),r=r4(e.attrs.alias),i=r4(e.attrs.anchor),a=r4(e.attrs.resolvedSrc),o=o4(n);if(Yu.has(o))return[`img`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,src:a??n,alt:r??n}];let s=a??n;return[`a`,{...t,"data-wiki-embed":``,"data-target":n,"data-alias":r??``,"data-anchor":i??``,href:i?`${s}#${i}`:s,target:`_blank`,rel:`noopener noreferrer`},s4({target:n,alias:r,anchor:i})]}}),W2,b2,x2,z0,B0,B2,J2,T2,R0,w2,K0,q2,a2,q0,o2,G0,V0,O2,L2,I2,Cie.configure({trailingNode:!1,undoRedo:!1,bulletList:!1,orderedList:!1,listItem:!1,listKeymap:{listTypes:[{itemName:`listItem`,wrapperNames:[`list`]}]},italic:!1,bold:!1,strike:!1,underline:!1,code:!1,codeBlock:!1,heading:!1,horizontalRule:!1,hardBreak:!1,link:!1,blockquote:!1,dropcursor:{color:`color-mix(in oklch, var(--primary) 50%, transparent)`,width:2}}),F2,V2.configure({resizable:!0}),mE,U2,H2,X0.configure({inline:!0}),J0,gT,D2,E2,W0,H0];function l4(e){let{frontmatter:t}=Xc(e);if(t===``)return null;let n;try{let e=(0,Bc.parseDocument)(Qc(t));if(e.errors.length>0)return null;n=e.toJS()}catch{return null}return typeof n!=`object`||!n||Array.isArray(n)?null:n}const u4=/^[a-zA-Z0-9][\w/-]*$/;function d4(e){return e.startsWith(`#`)?e.slice(1):e}function f4(e){return typeof e==`string`?[e]:Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function p4(e){if(!e||e.trim()===``)return[];let{map:t}=el(e);if(!t)return[];let n=f4(t.tags),r=[];for(let e of n){let t=d4(e);u4.test(t)&&r.push(t)}return r}const m4=I({changes:F(io(`kind`,[I({key:M(),kind:R(`added`),after:Wc}).loose(),I({key:M(),kind:R(`removed`),before:Wc}).loose(),I({key:M(),kind:R(`changed`),before:Wc,after:Wc}).loose()])),unparseable:I({before:M(),after:M()}).loose().nullable()}).loose();function h4(e){let{fenced:t}=tQ(e),n=rQ(t);if(n.map===null)return{fenced:t,map:{},keys:[],parseError:n.parseError};let r=al(n.doc);return{fenced:t,map:n.map,keys:r.length>0?r:Object.keys(n.map),parseError:void 0}}function g4(e,t){let n=h4(e),r=h4(t);if(n.parseError!==void 0||r.parseError!==void 0)return{changes:[],unparseable:{before:n.fenced,after:r.fenced}};let i=[],a=new Set;for(let e of r.keys){if(a.has(e))continue;a.add(e);let t=r.map[e];if(t===void 0)continue;let o=n.map[e];if(o===void 0){i.push({key:e,kind:`added`,after:t});continue}Jc(o,t)||i.push({key:e,kind:`changed`,before:o,after:t})}for(let e of n.keys){if(a.has(e))continue;a.add(e);let t=n.map[e];t!==void 0&&i.push({key:e,kind:`removed`,before:t})}return{changes:i,unparseable:null}}function _4(e,t){switch(e){case`darwin`:return[`/opt/homebrew/bin`,`/usr/local/bin`,`/opt/local/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`];case`win32`:return[];default:return[`/usr/local/bin`,`/home/linuxbrew/.linuxbrew/bin`,`${t}/.local/bin`,`${t}/.asdf/shims`,`${t}/.local/share/mise/shims`]}}function v4(e,t,n){let r=n.delimiter,i=(e??``).split(r).filter(e=>e.length>0),a=new Set(i),o=[];for(let e of t)!a.has(e)&&n.isDir(e)&&(a.add(e),o.push(e));return[...i,...o].join(r)}function y4(e,t){return v4(e,_4(t.platform,t.homeDir),t)}function b4(e,t){switch(e){case`darwin`:return[`${t}/Library/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`];case`win32`:return[];default:return[`${t}/.local/share/pnpm`,`${t}/.bun/bin`,`${t}/.volta/bin`,`${t}/.yarn/bin`,`${t}/.npm-global/bin`]}}function x4(e,t){return v4(e,[..._4(t.platform,t.homeDir),...b4(t.platform,t.homeDir)],t)}const S4=`:(literal)`;function C4(e){if(e===``)throw Error(`toPathspec: empty path. ":(literal)" is an empty pattern that matches every tracked path; pass "." if you meant the repo root.`);return`${S4}${e}`}function w4(e){if(e.length===0)throw Error(`pathspecArgs: empty path list. A bare "--" removes the pathspec restriction rather than selecting nothing.`);return[`--`,...e.map(e=>C4(e))]}function T4(e){return e.replaceAll(S4,``)}3072-E4("This is an OpenKnowledge project: load the `open-knowledge` skill and use the OpenKnowledge MCP tools for all markdown — don't probe for `.ok/` or use native file tools on `.md` / `.mdx`. ",`cursor`),new TextEncoder;function E4(e,t){let n=encodeURIComponent(e);return t===`cursor`?encodeURIComponent(n).length:n.length}function D4(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}}const O4=new Set([`opencode.json`]),k4=/^\.[A-Za-z0-9_-]+\/skills\/[^/]+\/.+$/;function A4(e){return k4.test(e)}function j4(e){return A4(e)?!1:e.split(`/`).some(e=>e.startsWith(`.`))?!0:O4.has(e.slice(e.lastIndexOf(`/`)+1))}function M4(e,t){let n=D4(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const N4=M().superRefine(M4).optional(),P4=M().superRefine(M4),F4={agentId:M().optional(),agentName:M().optional(),colorSeed:M().optional(),clientName:M().optional(),clientVersion:M().optional(),label:M().optional()},I4=M().optional(),L4=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,R4=io(`kind`,[I({kind:R(`doc`),docPath:M().min(1)}).loose(),I({kind:R(`folder`),folderPath:M()}).loose()]),z4=L([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),B4=L([`current`,`stale`,`absent`,`empty`]),V4=io(`ok`,[I({ok:R(!0),shareUrl:M().min(1),sharedUrl:M().min(1),branch:M().min(1),freshness:B4.optional().catch(void 0)}).loose(),I({ok:R(!1),error:z4,branch:M().min(1).optional()}).loose()]),H4=L([`user`,`org`]),U4=I({login:M().min(1),kind:H4,avatarUrl:M().optional()}).loose(),W4=L([`auth-required`,`network`]),G4=io(`ok`,[I({ok:R(!0),owners:F(U4)}).loose(),I({ok:R(!1),error:W4}).loose()]),K4=io(`ok`,[I({ok:R(!0),available:P()}).loose(),I({ok:R(!1),error:W4}).loose()]),q4=L([`public`,`private`]),J4=I({owner:M().min(1),name:M().min(1),visibility:q4,description:M().optional()}).loose(),Y4=L([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]),X4=io(`ok`,[I({ok:R(!0),ownerLogin:M().min(1),repoName:M().min(1),cloneUrl:M().min(1),defaultBranch:M().min(1)}).loose(),I({ok:R(!1),error:Y4}).loose()]);function Z4(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const Q4=e=>e.refine(Z4,`invalid branch name`);function $4(e){if(e==null)return!1;let t=e instanceof Error?e.message:String(e);return/couldn'?t find remote ref|Remote branch .+ not found/i.test(t)}const e3=[/could not read (username|password)/i,/terminal prompts disabled/i,/user interactivity has been disabled/i,/unable to get password from user/i],eoe=[/insufficient scopes/i,/missing.*scope/i,/required scope/i],toe=[/permission denied.*\(publickey\)/i,/host key verification failed/i],t3=/fatal:.*repository.*not found/i,noe=[/\b(401|403)\b/,/authentication failed/i,/authorization failed/i,/invalid credentials/i,/credential helper/i,/bad credentials/i,/token.*expired/i,/expired.*token/i,t3];function roe(e){if(typeof e!=`object`||!e)return``;let t=e.git;return t==null?``:String(t)}function ioe(e){if(e==null)return{kind:`non-auth`};let t=`${e instanceof Error?e.message:String(e)}\n${roe(e)}`;return e3.some(e=>e.test(t))?{kind:`auth`,subclass:`no-credential`}:eoe.some(e=>e.test(t))?{kind:`auth`,subclass:`scope-mismatch`}:toe.some(e=>e.test(t))?{kind:`auth`,subclass:`ssh-auth`}:noe.some(e=>e.test(t))?/\b401\b/.test(t)||/token.*expired/i.test(t)?{kind:`auth`,subclass:`401`}:/\b403\b/.test(t)?{kind:`auth`,subclass:`403`}:t3.test(t)?{kind:`auth`,subclass:`not-found-as-identity`}:{kind:`auth`,subclass:`unknown-auth`}:{kind:`non-auth`}}function aoe(e){return e.kind===`auth`?e.subclass===`no-credential`||e.subclass===`401`||e.subclass===`unknown-auth`:!1}const n3={shareTargetExists:P(),dirtyConflicts:I({conflicts:P(),files:F(M().min(1))}).loose(),branchIsLocal:P(),shareTargetOnOriginBranch:P().optional()},ooe=io(`detached`,[I({detached:R(!1),currentBranch:M().min(1).nullable(),currentHeadSha:Wa(),...n3}).loose(),I({detached:R(!0),currentBranch:Wa(),currentHeadSha:M().min(1),...n3}).loose()]),soe=I({branch:Q4(M().min(1)),principalId:M().optional(),fastForward:P().optional()}).loose(),coe=L([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`]),loe=io(`ok`,[I({ok:R(!0)}).loose(),I({ok:R(!1),reason:coe,files:F(M().min(1)).optional(),otherWorktreePath:M().min(1).optional()}).loose()]);L([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]);const uoe=I({branch:Q4(M().min(1)),path:M(),kind:L([`doc`,`folder`]),contentRootDepth:N().int().min(1).max(65535).optional()}).loose(),doe=io(`verdict`,[I({verdict:R(`on-origin`)}).loose(),I({verdict:R(`renamed`),renamedTo:M().min(1)}).loose(),I({verdict:R(`deleted`)}).loose(),I({verdict:R(`never-on-branch`)}).loose(),I({verdict:R(`changed-locally`)}).loose(),I({verdict:R(`unknown`)}).loose()]).catch({verdict:`unknown`}),foe=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()}),poe=I({serverInstanceId:M().min(1),currentBranch:M().min(1).optional(),currentDiskAckSVs:co(M().min(1),M().min(1)).optional(),boot:foe.optional(),collabClients:N().int().nonnegative().optional()}).loose(),moe=I({id:M().min(1),display_name:M().min(1),display_email:M(),source:L([`git-config`,`synthesized`]),created_at:M().min(1)}).loose(),hoe=I({collabUrl:M().nullable(),previewUrl:M().nullable(),port:N(),singleFile:P().default(!1)}).loose(),r3=L(`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(`.`));function goe(e){throw Error(`Unexpected ProblemType variant: ${JSON.stringify(e)}`)}const i3=I({type:r3,title:M().min(1),status:N().int().min(400).max(599),instance:M().regex(L4,`instance must be urn:uuid:<uuid>`).optional(),detail:M().optional()}).loose(),_oe=I({parentDocName:M().min(1),placement:L([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:M().min(1).optional(),agentName:M().min(1).optional()}).loose(),voe=I({src:M().min(1),path:M().min(1).optional(),deduped:P().optional()}).loose(),yoe=I({url:M().min(1),dir:M().min(1),branch:M().min(1).refine(Z4,`invalid branch name`).optional()}).loose(),boe=I({type:R(`error`),problem:i3}).loose();function a3(e,t){let n=t.map(e=>[mp(e),e]);for(let t of e){let e=mp(t);if(e===null)continue;let r=n.find(([t])=>t===e);if(r!==void 0)return r[1]}}function xoe(e){let{override:t,storedPreference:n,preferenceList:r,supportedLocales:i}=e,a=e.autoDetectableLocales??i;if(t!==void 0){let e=a3([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=a3(r,a);return o===void 0?{locale:`en`,source:`fallback`}:{locale:o,source:`system`}}const Soe=[`.ok`,`local`,`installed-skills.json`],Coe=L(hl),woe=eo({hosts:F(M()),scope:Coe,scripts:P(),installedAt:Ki(),projection:L([`symlink`,`copy`]).optional(),contentHash:M().optional()}),o3=eo({schema:R(1),skills:co(M(),woe).default({})});function Toe(){return{schema:1,skills:{}}}function Eoe(e){let t;try{t=JSON.parse(e)}catch{return null}let n=o3.safeParse(t);return n.success?n.data:null}const s3=[{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:`~`}],Doe=s3.map(e=>e.name);function c3(e){let t=new Set,n=0;return{redacted:e.split(`
|
|
467
467
|
`).map(e=>{let r=e,i=!1;for(let{name:e,regex:n,replacement:a}of s3)n.lastIndex=0,n.test(r)&&(t.add(e),i=!0,n.lastIndex=0,r=r.replace(n,a));return i&&n++,r}).join(`
|
|
468
468
|
`),patterns:[...t],lineCount:n}}function Ooe(e){return c3(e).redacted}function koe(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
|
|
469
469
|
`)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}function Aoe(e){let t=MO(`## ${e.replace(/\s+/g,` `).trim()}`).children[0];return t===void 0||t.type!==`heading`?``:fD(t,{includeHtml:!1}).replace(/\s+/g,` `).trim().normalize(`NFC`)}function joe(e){let t=[],n=0,r=()=>{t.length>0&&(n+=1)},i=e=>{for(;n>0;)t.push({type:`break`}),--n;t.push(e)},a=e=>{e.split(`
|
|
@@ -541,7 +541,7 @@ $2`).split(`
|
|
|
541
541
|
`?(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(sde(e[0]),s)}})}),lde=[`index`,`log`],ude=_5(`reserved-casing`,(e,t)=>{let n=t.data.okfDocName;if(n===void 0)return;let r=P0(n),i=r.toLowerCase();lde.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.`)}),x5=[{id:`no-wiki-links`,rule:cde},{id:`log-shape`,rule:ade},{id:`index-shape`,rule:tde},{id:`reserved-casing`,rule:ude}],dde=x5.map(e=>e.rule);function fde(e){return e===void 0?dde:x5.filter(t=>u5(e,t.id)).map(e=>e.rule)}const pde=no([P(),L(Md),co(M(),Ja())]),mde={id:`markdownlint`,sliceSchema:I({enabled:P(),rules:co(M(),pde)}),defaultSlice:{enabled:!1,rules:q8},async lint(e,t){return Iue(e,J8(t.rules))},fix(e,t){return Fue(e,J8(t.rules))}},hde=I({appliesTo:no([M(),F(M())]).optional(),file:M(),enabled:P().optional(),key:M().optional(),schema:co(M(),Ja()).optional()}),S5=[mde,{id:`frontmatter`,sliceSchema:I({enabled:P(),schemas:F(hde)}),defaultSlice:{enabled:!1,schemas:[]},async lint(e,t,n){return l5(e,Z8(t.schemas,n.docName))},frontmatter:{schemasForDoc:(e,t)=>Z8(e.schemas,t),narrowSliceToFrontmatter:e=>e,advertisedMappings:e=>e.schemas}},{id:`okf`,sliceSchema:I({enabled:P(),rules:co(M(),P()).optional(),generate:I({index:P().optional()}).optional()}),defaultSlice:{enabled:!1},async lint(e,t,n){return[...$ue(e,fde(t.rules),n.docName),...Xue(e,t.rules,n.docName)]},frontmatter:{schemasForDoc:(e,t)=>g5(e.rules,t),narrowSliceToFrontmatter:e=>({...e,rules:{...e.rules,...Jue}}),advertisedMappings:e=>Yue(e.rules)}}],gde={enabled:!0,plugins:Object.fromEntries(S5.map(e=>[e.id,e.defaultSlice]))};function C5(e,t){return e.enabled&&e.plugins[t]?.enabled===!0}function _de(e){if(!e?.enabled)return[];let t=[];for(let n of S5){if(n.frontmatter===void 0)continue;let r=e.plugins[n.id];r?.enabled===!0&&t.push(...n.frontmatter.advertisedMappings(r))}return t}const vde=I({docName:N4,summary:I4,content:M().optional(),...F4}).loose(),yde=I({docName:N4,summary:I4,markdown:M(),position:L([`append`,`prepend`,`replace`]).optional(),extension:L(v0).optional(),...F4}).loose(),bde=I({docName:N4,summary:I4,find:M().min(1),replace:M(),offset:N().int().nonnegative().optional(),...F4}).loose(),xde=I({docName:N4,connectionId:M().min(1),scope:L([`last`,`session`,`file`,`count`]).optional(),count:N().int().positive().optional(),...F4}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]}),w5=I({value:M(),truncatedFrom:N().int().nonnegative().optional(),hint:M().optional()}).loose(),Sde=io(`kind`,[I({kind:R(`inline`),content:M()}),I({kind:R(`truncated`),byteLength:N().int().nonnegative(),hint:M()})]),T5=I({kind:R(`content-divergence`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),divergenceType:M().optional(),currentState:Sde.optional(),hint:M().optional()}).loose(),Cde=I({type:R(`orphan`),parentCandidates:F(M()),message:M()}).loose(),E5=I({kind:R(`disk-edit-reconciled`),intendedBytes:N().int().nonnegative(),actualBytes:N().int().nonnegative(),byteDelta:N().int(),mergeOutcome:M().optional(),hint:M().optional()}).loose();io(`kind`,[T5,E5]);const D5=Object.keys({"content-divergence":!0,"disk-edit-reconciled":!0});function wde(e){return D5.includes(e)}function Tde(e){throw Error(`Unexpected WriteWarning variant: ${JSON.stringify(e)}`)}const Ede=I({kind:R(`mermaid-parse-error`),fenceIndex:N().int().positive(),fenceFirstLine:M(),message:M(),line:N().int().positive().optional()}).loose(),O5=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(),k5=io(`kind`,[T5,E5,Ede,I({kind:R(`lint-violation`),source:M(),code:M(),message:M(),severity:L([`error`,`warning`,`info`,`hint`]),line:N().int().positive(),column:N().int().positive(),linkTarget:M().optional(),localTarget:O5.optional()}).loose()]),A5=F(k5).min(1),j5=I({href:M(),resolvedTo:M().nullable(),reason:L([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:O5.optional()}).loose(),M5=F(j5),Dde=[`reserved-log-policy`],N5=I({reason:M().min(1),count:N().int().positive()}).loose(),Ode=I({timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),kde=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),hints:F(Cde).optional(),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),Ade=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),jde=I({docName:M().min(1),scope:L([`last`,`session`,`count`]),undone:P()}).loose(),Mde=I({docs:F(I({docName:P4,markdown:M(),position:L([`append`,`prepend`,`replace`]).optional(),extension:L(v0).optional(),summary:I4}).loose()).min(1).max(100),...F4}).loose(),Nde=I({type:r3,title:M(),detail:M().optional()}).loose(),Pde=io(`status`,[I({status:R(`written`),docName:M().min(1),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose(),I({status:R(`error`),docName:M().min(1),error:Nde}).loose()]),Fde=I({timestamp:M().min(1),results:F(Pde),written:N().int().nonnegative(),failed:N().int().nonnegative()}).loose(),Ide=I({docName:N4,patch:co(M(),no([Wc,Wa()])),types:co(M(),L(Vc)).optional(),summary:I4,...F4}).loose(),Lde=I({timestamp:M().min(1),subscriberCount:N().int().nonnegative(),systemSubscriberCount:N().int().nonnegative(),appliedKeys:F(M()),summary:w5.optional(),warnings:A5.optional(),brokenLinks:M5,brokenLinkSuppression:N5.optional()}).loose();function Rde(e){return{enabled:e.enabled??!0,plugins:{markdownlint:{...e.markdownlint,rules:e.markdownlint.rules??q8},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}}}}}const zde=Object.fromEntries(S5.map(e=>[e.id,e.sliceSchema])),Bde=I({effective:I({enabled:P(),plugins:I(zde)}),configFile:M().nullable().optional(),configProblems:F(M()).optional()}),Vde=no([P(),co(M(),Ja())]),Hde=new Set([`__proto__`]),P5=M().min(1).max(256).refine(e=>!Hde.has(e),{message:`schema property name cannot be __proto__`}),Ude=I({ruleId:M().min(1).max(64).regex(/^[A-Za-z][A-Za-z0-9_-]*$/),value:no([Vde,Wa()])}),Wde=I({file:M().min(1).max(512),delete:R(!0).optional(),field:P5.optional(),parentPath:F(no([P5,I({items:R(!0)}).strict()])).max(8).optional(),removeField:R(!0).optional(),renameTo:P5.optional(),constraint:I({type:L([`string`,`number`,`boolean`,`array`,`object`]).nullable().optional(),enum:F(no([M(),N(),P()])).nullable().optional(),itemsEnum:F(no([M(),N(),P()])).nullable().optional(),itemsType:L([`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`}),Gde=I({schemas:F(M()),truncated:P()}).strict(),F5=I({line:N(),character:N()}),I5=I({start:F5,end:F5}),L5=I({range:I5,severity:L([`error`,`warning`,`info`,`hint`]),source:M(),code:M(),message:M(),fixes:F(I({range:I5,newText:M()})).optional(),frontmatterScope:L(kd).optional(),frontmatterProperty:M().optional()}),R5=F(M()).optional(),z5=I({file:M(),diagnostics:F(L5),ran:R5,warnings:F(M()).optional()}),Kde=I({files:F(z5),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:R5}),qde=L5.extend({linkTarget:M().optional(),localTarget:O5.optional()}),Jde=I({files:F(I({file:M(),diagnostics:F(qde)})),fileCount:N(),errorCount:N(),warningCount:N(),warnings:F(M()),ran:R5,brokenLinkSuppression:N5.optional()}),B5=I({errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative()}),Yde=I({files:F(I({file:M(),lint:B5,links:B5})),fileCount:N().int().nonnegative(),errorCount:N().int().nonnegative(),warningCount:N().int().nonnegative(),warnings:F(M()),brokenLinkSuppression:N5.optional()}),Xde=I({docName:N4,summary:I4,...F4}).loose(),V5=`Re-lint after fix failed: `;function Zde(e){return e.startsWith(V5)}const H5=[`re-lint-threw`,`source-went-blind`];function Qde(e){return typeof e==`string`&&H5.includes(e)}const U5=I({reason:L(H5),message:M().min(1)}),$de=I({file:M(),fixedCount:N(),diagnostics:F(L5),errorCount:N(),warningCount:N(),ran:R5,warnings:F(M()).optional(),diagnosticsArePreFix:P().optional(),reLintFailure:U5.optional()});function W5(){let e=Q8[e5];return`${JSON.stringify({$schema:e,type:`object`},null,2)}\n`}function efe(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 tfe(e){let t=e.trim().toLowerCase().split(`/`).pop()??``;return t.endsWith(`.schema.json`)&&t.length>12?!0:efe(e)&&t.endsWith(`.json`)}var G5=class extends Error{};function K5(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q5(e,t,n){let r=e;for(let e of t){if(typeof e!=`string`){let e=r.items;if(e===void 0){if(!n)throw new G5(`field path items does not exist`);let e={type:`object`};r.items=e,r=e;continue}if(!K5(e))throw new G5(`field path items is not an object sub-schema`);r=e;continue}let t=Y5(r),i=Object.hasOwn(t,e)?t[e]:void 0;if(i===void 0){if(!n)throw new G5(`field path ${JSON.stringify(e)} does not exist`);let i={type:`object`};r.properties={...t,[e]:i},r=i;continue}if(!K5(i))throw new G5(`field path ${JSON.stringify(e)} is not an object property`);r=i}return r}function nfe(e,t,n,r=[]){let i;i=e.trim()===``?JSON.parse(W5()):J5(e);let a=q5(i,r,!0),o=Y5(a),s=Object.hasOwn(o,t)?o[t]:void 0,c={...K5(s)?s:{}};for(let e of[`type`,`enum`,`pattern`,`format`,`description`]){if(!(e in n))continue;let t=n[e];t==null?delete c[e]:c[e]=t}if(`itemsEnum`in n||`itemsType`in n){if(c.items!==void 0&&!K5(c.items))throw new G5(`field path items is not an object sub-schema`);let e=K5(c.items)?{...c.items}:{};`itemsEnum`in n&&(n.itemsEnum===null||n.itemsEnum===void 0?delete e.enum:e.enum=n.itemsEnum),`itemsType`in n&&(n.itemsType===null||n.itemsType===void 0?delete e.type:e.type=n.itemsType),Object.keys(e).length>0?c.items=e:delete c.items}if(Object.keys(c).length>0)a.properties={...o,[t]:c};else if(Object.hasOwn(o,t)){let{[t]:e,...n}=o;Object.keys(n).length>0?a.properties=n:delete a.properties}if(n.required!==void 0){let e=X5(a),r=e.includes(t);n.required&&!r?a.required=[...e,t]:!n.required&&r&&Z5(a,e.filter(e=>e!==t))}return`${JSON.stringify(i,null,2)}\n`}function J5(e){let t;try{t=JSON.parse(e)}catch(e){throw new G5(`schema is not valid JSON (${e instanceof Error?e.message:String(e)})`)}if(!K5(t))throw new G5(`schema is not a JSON object`);return t}function Y5(e){return K5(e.properties)?e.properties:{}}function X5(e){return Array.isArray(e.required)?e.required.filter(e=>typeof e==`string`):[]}function Z5(e,t){t.length>0?e.required=t:delete e.required}function rfe(e,t,n=[]){let r=J5(e),i=q5(r,n,!1),a=Y5(i);if(Object.hasOwn(a,t)){let{[t]:e,...n}=a;Object.keys(n).length>0?i.properties=n:delete i.properties}return Z5(i,X5(i).filter(e=>e!==t)),`${JSON.stringify(r,null,2)}\n`}function ife(e,t,n,r=[]){let i=J5(e),a=q5(i,r,!1),o=Y5(a);if(!Object.hasOwn(o,t))throw new G5(`field ${JSON.stringify(t)} does not exist`);if(Object.hasOwn(o,n))throw new G5(`field ${JSON.stringify(n)} already exists`);return a.properties=Object.fromEntries(Object.entries(o).map(([e,r])=>[e===t?n:e,r])),Z5(a,X5(a).map(e=>e===t?n:e)),`${JSON.stringify(i,null,2)}\n`}function afe(){return h5.map(e=>({path:`${d5}/${f5(e.id)}`,ruleId:e.id,contents:`${JSON.stringify({$comment:"Generated by the OpenKnowledge `okf` lint plugin — do not edit. The plugin validates from its own compiled copy and never reads this file, so changes here have no effect and are overwritten when the server restarts. This describes an external format (Google’s Open Knowledge Format); to change what is enforced, change the rule toggles under Settings → this project → Plugins → OKF.",...e.schema},null,2)}\n`}))}function Q5(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?{stem:t,ext:``}:{stem:t.slice(0,n),ext:t.slice(n)}}function ofe(e){let t=new Set(e.filter(e=>Q5(e).ext.toLowerCase()===`.md`).map(e=>e.slice(0,e.lastIndexOf(`.`)))),n=[];for(let r of e){if(Q5(r).ext.toLowerCase()!==`.mdx`)continue;let e=r.slice(0,r.lastIndexOf(`.`)),i=`"${r}" won't be picked up by an Open Knowledge Format consumer — the format is .md-only, and nothing scanning for .md files will open an .mdx.`;n.push({file:r,code:`project-no-mdx`,message:t.has(e)?`${i} It is also shadowed by "${e}.md", so a consumer reads that file instead and gets different content than this project shows you.`:i})}return n}const sfe=[{id:`project-no-mdx`,run:ofe}];function cfe(e,t){let n=e.filter(e=>v0.some(t=>e.toLowerCase().endsWith(t)));return n.length===0?[]:sfe.filter(e=>u5(t,e.id)).flatMap(e=>e.run(n))}function $5(e){return`source "${e.source}" ${e.phase} failed`}function lfe(e){let t=e.docName===void 0?``:` on "${e.docName}"`;return`${$5(e)}${t}: ${e.message}`}function ufe(e){let t=new Map;for(let n of e){let e=[n.source,n.phase,n.message].join(`\0`),r=t.get(e)??{first:n,docNames:new Set};n.docName!==void 0&&r.docNames.add(n.docName),t.set(e,r)}return[...t.values()].map(({first:e,docNames:t})=>t.size<=1?lfe(e):`${$5(e)} on ${t.size} documents (first: "${e.docName}"): ${e.message}`)}const dfe=[{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}]}],ffe=(()=>{let e=new Map;for(let t of dfe){e.set(t.id.toUpperCase(),t.id);for(let n of t.aliases)e.set(n.toUpperCase(),t.id)}return e})();function e7(e){return ffe.get(e.toUpperCase())??null}function pfe(e,t){let n=e7(t);if(n===null)return;let r;for(let[t,i]of Object.entries(e))e7(t)===n&&(r={key:t,value:i});return r}function mfe(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}function hfe(e,t){let n=S5.filter(t=>C5(e,t.id)).map(e=>e.id);return t.mode===`audit`&&t.linksValidation!==`off`&&n.push(`links`),n}function gfe(e){return e===void 0?[]:e.length===0?[`No checks ran.`]:[`Checks run: ${e.join(`, `)}.`]}async function _fe(e,t,n,r){if(!t.enabled)return[];let i=[];for(let a of S5){if(!C5(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:t7(e)})}}return i}function vfe(e,t,n,r){if(!t.enabled)return e;let i=e;for(let e of S5){if(!C5(t,e.id)||!e.fix)continue;let a=t.plugins[e.id];try{i=e.fix(i,a)}catch(t){console.warn(`[lint] plugin "${e.id}" fix failed${n?` on "${n}"`:``}`,t),r?.({source:e.id,phase:`fix`,...n===void 0?{}:{docName:n},message:t7(t)})}}return i}function t7(e){let t=n7(e);return t.length>500?`${t.slice(0,500)}… (truncated)`:t}function n7(e,t=0){if(e instanceof Error)return e.cause===void 0||t>=3?e.message:`${e.message} (cause: ${n7(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)}const yfe=/\p{M}+/gu,bfe=/[^\p{L}\p{N}]+/gu,xfe=/^-+|-+$/g;function r7(e){return e.trim().normalize(`NFKD`).replace(yfe,``).toLowerCase().replace(bfe,`-`).replace(xfe,``)}function Sfe(e,t){let n=t.get(e)??0;return t.set(e,n+1),n===0?e:`${e}-${n}`}function Cfe(e,t){let n=r7(e);return n?Sfe(n,t):``}const wfe=new Set([`img`,`video`,`audio`,`mark`,`u`,`ins`]);new Map(j3.flatMap(e=>e.surface===`compat`&&wfe.has(e.rendersAs)?[[e.name,e]]:[])),Mie(`<>`);const i7=[{tagName:`Mirror`,attrName:`src`,resolution:`bare-doc-name`},{tagName:`Excalidraw`,attrName:`src`,resolution:`doc-relative`}];for(let e of i7){let t=j3.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.`)}const Tfe=PB(),Efe=Qz(),Dfe=$z();function Ofe(){return j3.filter(e=>e.surface===`canonical`&&e.name!==`*`)}function a7(){return Ofe().filter(e=>{let t=o7(e);return t!==`fence`&&t!==`html`})}function o7(e){return e.name===`MermaidFence`?`fence`:e.name===`HtmlAlignBlock`?`html`:e.hasChildren?`jsx-block`:`jsx-void`}function s7(e){return{id:e.name,displayName:e.displayName??e.name,description:e.description??``,kind:o7(e)}}function kfe(e){if(e.hidden!==!0&&e.type!==`reactnode`){if(`defaultValue`in e&&e.defaultValue!==void 0)return e.defaultValue;if(e.type===`enum`)return e.enumValues[0];if(e.type===`string`)return``;if(e.type===`number`)return 0;if(e.type===`boolean`)return!1}}function Afe(e,t){return!(e.omitOnDefault===!0&&`defaultValue`in e&&Object.is(e.defaultValue,t)||e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&t===``)}function jfe(e){let t=[];for(let n of e.props){let e=kfe(n);e!==void 0&&Afe(n,e)&&t.push(u3(n.name,e))}return t}function Mfe(e){return MO(e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`Body content here.`,{extensions:[Tfe],mdastExtensions:[Efe]}).children}function Nfe(e){let t=o7(e),n;if(t===`fence`)n={type:`code`,lang:`mermaid`,meta:null,value:e.exampleBody&&e.exampleBody.trim().length>0?e.exampleBody:`graph LR
|
|
542
542
|
A --> B`};else{let r=jfe(e),i=t===`jsx-block`?Mfe(e):[];n={type:`mdxJsxFlowElement`,name:e.name,attributes:r,children:i}}return OI({type:`root`,children:[n]},{extensions:[Dfe]}).trimEnd()}function Pfe(e){let t=[];for(let n of e.props){if(n.hidden===!0)continue;let e={name:n.name,type:n.type,required:n.required};n.description!==void 0&&(e.description=n.description),n.advanced===!0&&(e.advanced=!0),n.omitOnDefault===!0&&(e.omitOnDefault=!0),n.type===`enum`&&(e.values=n.enumValues,n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue)),n.type===`string`&&(n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.language!==void 0&&(e.language=n.language),n.accept!==void 0&&(e.accept=n.accept)),n.type===`boolean`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),n.type===`number`&&n.defaultValue!==void 0&&(e.defaultValue=n.defaultValue),t.push(e)}return t}function Ffe(e){return{...s7(e),example:Nfe(e),params:Pfe(e)}}function c7(){return[``,"**Custom canonical components.** OK `.md` / `.mdx` supports the JSX components below. For source syntax + parameter schemas, call `palette({ components: [ids] })`. Arbitrary `<TagName>` JSX falls through as raw MDX when no canonical fits.",``,...a7().map(s7).map(e=>`- \`${e.id}\` (${e.kind}) — ${e.description}`)].join(`
|
|
543
543
|
`)}function Ife(){return[c7(),``,"Fenced code blocks render naturally and don't need a fetch — including ` ```mermaid ` for diagrams (mermaid label text has sharp edges — `palette({ components: [\"Mermaid\"] })` lists them; parse failures come back as `warnings` entries on write/edit) and ` ```html preview ` for interactive HTML/JS/CSS pages (the fence info-string `preview` token renders the block as a live iframe; works for `html` / `htm` / `xml`; optional `h=` / `w=` tokens set size, e.g. ` ```html preview h=400px `). Use ` ```html preview ` whenever you want anything interactive or JS-powered (charts, demos, calculators, animations) — just author the standalone HTML page in the fence. Call `palette` for the markdown-native component forms (write `> [!NOTE]`, not `<Callout>`), copy-ready themed `html preview` starters, and the theme tokens (`var(--chart-1)`, `var(--foreground)`, …) an embed should reference so it tracks the reader's light/dark theme."].join(`
|
|
544
|
-
`)}const Lfe=I({intents:F(I({satisfierId:M().min(1),desired:L([`present`,`absent`])}).loose()),...F4,summary:I4}).loose(),Rfe=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:L([`present`,`absent`]),action:L(ko),errorId:M().optional()}).loose(),zfe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),Bfe=I({state:M(),strictness:F(L(Do)).optional()}).loose(),Vfe=I({probes:I({env:L([`desktop`,`local-web`,`remote-web`]),satisfiers:co(M(),Bfe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),Hfe=I({actions:F(Rfe),conflicts:F(zfe),withheld:F(M()),snapshot:Vfe}).loose(),Ufe=I({entries:F(I({level:L([`info`,`warn`,`error`]),message:M().max(8192),event:M().optional(),fields:co(M(),Ja()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),Wfe=I({accepted:N().int().min(0)}).loose(),Gfe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),Kfe=F(no([M(),N().int().nonnegative()])),qfe=io(`kind`,[I({kind:R(`body`)}),I({kind:R(`property`),key:M().min(1),path:Kfe.default([])})]).default({kind:`body`}),Jfe=L([`anchored`,`orphaned`,`resolved`]),l7=I({threadId:M().min(1),docName:M().min(1),target:qfe,anchor:Gfe.nullable(),state:Jfe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),u7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),d7=I({threadId:M(),ok:R(!0)}),f7=I({threadId:M(),ok:R(!1),error:R(`not-found`)}),Yfe=I({threads:F(l7)}).loose(),Xfe=I({meta:l7,orphaned:P()}).loose(),Zfe=I({threadId:M()}).loose(),Qfe=I({meta:l7,payload:u7}).loose(),$fe=I({results:F(no([d7.extend({meta:l7,payload:u7}),f7]))}).loose(),epe=I({results:F(no([d7.extend({meta:l7}),f7]))}).loose(),tpe=I({status:M().min(1),reason:M()}).loose(),npe=I({docName:M().min(1),content:M(),lifecycle:tpe.nullable()}).loose(),rpe=I({documents:F(I({kind:L([`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:L([`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)`})),truncated:P().optional()}).loose(),ipe=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),ape=I({docName:M().min(1),backlinks:F(ipe)}).loose(),ope=I({counts:co(M().min(1),N().int().nonnegative())}).loose(),spe=I({counts:co(M().min(1),N().int().nonnegative())}).loose(),cpe=io(`kind`,[I({kind:R(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:R(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),lpe=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(),upe=I({docName:M().min(1),forwardLinks:F(cpe),localTargets:F(lpe).optional()}).loose(),dpe=io(`kind`,[I({id:M().min(1),kind:R(`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:R(`external`),url:M().min(1),label:M()}).loose()]),fpe=I({source:M().min(1),target:M().min(1)}).loose(),ppe=I({nodes:F(dpe),links:F(fpe)}).loose(),mpe=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(),hpe=I({app:no([R(`cursor`),R(`codex`),R(`claude`),Wa()]),signals_fired:F(M())}).loose(),gpe=I({entries:F(mpe),count:N().int().min(0),detection:hpe}).loose(),p7=[`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `],m7=I({path:M().min(1),code:L(p7),origPath:M().min(1).optional(),syncScoped:P(),open:io(`kind`,[I({kind:R(`doc`),docName:M().min(1)}),I({kind:R(`asset`),path:M().min(1)})]).optional()}).loose(),_pe=I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(m7),notStaged:F(m7),untracked:F(m7),incoming:F(m7),truncated:P(),readable:P().default(!0)}).loose(),vpe=I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:I4,...F4}).loose(),ype=I({checkpointRef:M().min(1)}).loose(),bpe=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose(),xpe=I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:L([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(bpe),checkpoint:Ja().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),Spe=I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose(),Cpe=I({contentDir:M().min(1),pathSeparator:L([`/`,`\\`]),symlinkResolved:P()}).loose(),wpe=F(io(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:R(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:R(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),h7=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose(),Tpe=I({url:M()}).loose(),Epe=io(`ok`,[I({ok:R(!0),metadata:h7}).loose(),I({ok:R(!1),reason:M()}).loose()]),Dpe=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Ope=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),kpe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose(),Ape=I({deadLinks:F(I({target:M().min(1),sources:F(kpe)}).loose())}).loose(),jpe=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(),Mpe=I({projectPath:M().min(1)}).loose(),Npe=L([`not-a-git-worktree`,`init-failed`]),Ppe=io(`ok`,[I({ok:R(!0),projectPath:M().min(1)}).loose(),I({ok:R(!1),reason:Npe,message:M().min(1)}).loose()]),Fpe=I({host:M().min(1).optional()}).loose(),Ipe=I({host:M().min(1).optional(),token:M().min(1)}).loose(),Lpe=I({host:M(),login:M()}).loose(),Rpe=I({key:M().min(1)}).loose(),zpe=I({keyPresent:P()}).loose(),Bpe=L([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),Vpe=io(`ok`,[I({ok:R(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:R(!1),endpoint:M().min(1),model:M().min(1),reason:Bpe,status:N().int().optional()}).loose()]),Hpe=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(),Upe=I({authenticated:P()}).loose(),Wpe=I({channel:L([`login`,`gh-login`]).default(`login`)}).loose(),Gpe=I({}).loose(),Kpe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),qpe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(Kpe)}).loose(),Jpe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),Ype=I({sessionAlive:P(),agent:Jpe.nullable(),files:F(qpe)}).loose(),Xpe=I({diff:M(),before:M(),after:M(),properties:m4,generatedAt:N().int().min(0)}).loose(),Zpe=I({}).loose(),Qpe=I({}).loose(),$pe=I({}).loose(),eme=I({}).loose(),tme=I({}).loose(),nme=I({}).loose(),rme=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:L([`idle`,`writing`]),ts:N().int().min(0)}).loose(),ime=I({presence:co(M().min(1),rme)}).loose(),ame=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(),ome=I({effects:F(I({"doc.name":M().min(1),entries:F(ame)}).loose())}).loose(),sme=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(),cme=co(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();const lme=I({}).loose(),ume=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),dme=I({fromPath:M().min(1),toPath:M().min(1)}).loose(),fme=I({}).loose(),pme=I({path:M().min(1),...F4,summary:I4}).loose(),mme=I({docName:M().min(1)}).loose(),hme=I({path:M().min(1),...F4,summary:I4}).loose(),gme=I({path:M().min(1)}).loose(),_me=I({kind:L([`file`,`folder`]),path:M().min(1),...F4,summary:I4}).loose(),vme=I({kind:L([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),yme=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(),bme=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),xme=I({docName:M().min(1),headings:F(bme)}).loose(),Sme=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose(),Cme=I({kind:L([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...F4,summary:I4}).loose(),wme=I({renamed:F(ume),renamedAssets:F(dme),rewrittenDocs:F(Sme).optional(),summary:w5.optional()}).loose(),Tme=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...F4}).loose(),Eme=I({deletedDocNames:F(M().min(1))}).loose(),Dme=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...F4,summary:I4}).loose(),Ome=I({deletedDocNames:F(M().min(1))}).loose(),kme=I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:I4,...F4}).loose(),Ame=I({restoredFrom:M().min(1),timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),jme=/^#[0-9a-fA-F]{6}$/,Mme=I(Object.fromEntries(Nd.map(e=>[e,M().regex(jme,`must be a #rrggbb hex color`)]))),g7=M().min(1).refine(Ld,{message:`must contain a non-whitespace character`}),_7=I({name:g7,author:g7.optional(),variant:L([`dark`,`light`]),palette:Mme}).loose(),Nme=I({name:M().min(1),scheme:_7,stem:M().min(1).optional(),extension:L([`.yaml`,`.yml`]).optional()}).loose(),Pme=I({id:M().min(1),filename:M().min(1)}).loose(),Fme=I({id:M().min(1),scheme:_7}).loose(),Ime=I({id:M().min(1),filename:M().min(1)}).loose(),Lme=io(`existed`,[I({existed:R(!1)}).loose(),I({existed:R(!0),filename:M().min(1),scheme:_7}).loose()]),Rme=I({themes:F(io(`ok`,[I({ok:R(!0),id:M().min(1),filename:M().min(1),scheme:_7}),I({ok:R(!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(),zme=L([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),Bme=I({label:M().min(1),webUrl:Ca().nullable()}).loose(),Vme=io(`checkStatus`,[I({checkStatus:R(`allowed`)}).loose(),I({checkStatus:R(`denied`),deniedReason:L([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:R(`unknown`),unknownError:L([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),v7=L([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),Hme=L(ku),Ume=L([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]),Wme=I({state:zme,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:Bme.nullable().optional(),pushError:M().optional(),pushErrorCode:v7.optional(),pullError:M().optional(),pullErrorCode:v7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:Vme.optional(),syncMode:Hme.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:Ume.nullable().optional()}).loose(),Gme=I({action:L([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),Kme=I({action:L([`commit`])}).loose(),qme=I({op:L([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),Jme=I({op:L([`sync`,`push`,`pull`,`fetch`])}).loose(),y7=[`merge-native`,`working-tree`,`reconcile`],b7=L(y7),x7=[`merged-with-markers`,`refused-conflict-markers`,`refused-too-large`,`disk-markers`,`stale-external-write`],S7=L(x7),Yme=L([`mine`,`theirs`,`content`,`delete`]),C7=I({file:M().min(1),detectedAt:M().min(1),conflict:b7,reason:S7.optional(),conflictKind:L([`git`,`stale-external-write`]).optional(),docName:M().nullable(),theirsSha:M().optional(),baseSha:M().optional()}).loose(),Xme=I({conflicts:F(C7)}).loose(),Zme=I({file:M().min(1),strategy:L([`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`]}),Qme=I({}).loose(),$me=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:L([`both-modified`,`delete-modify`,`modify-delete`]),conflict:b7,reason:S7.optional(),conflictKind:L([`git`,`stale-external-write`]).optional(),resolutionOptions:F(Yme)}).loose(),ehe=I({plan:bo(e=>e!==void 0,{message:`plan is required`})}).loose(),the=I({plan:bo(e=>e!==void 0,{message:`plan is required`})}).loose(),nhe=I({result:bo(e=>e!==void 0,{message:`result is required`})}).loose(),rhe=I({packId:M().min(1)}).strict(),ihe=I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict(),ahe=I({path:M().min(1),summary:M().min(1)}).loose(),ohe=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose(),she=I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(ahe),entryCounts:ohe}).loose())}).loose(),che=I({noOpen:P().optional(),out:M().min(1).optional()}).loose(),lhe=I({reason:L([`unsupported-platform`,`spawn-error`]),message:M()}).loose(),uhe=io(`status`,[I({status:R(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:R(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:lhe.optional()}).loose(),I({status:R(`failed`),buildError:M()}).loose(),I({status:R(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]),w7=L(T),dhe=L(E);function fhe(e){return e===`agents`||E.includes(e)}const phe=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),mhe=[`.md`,`.mdx`,`.txt`];function T7(e){return Math.round(e/4)}function hhe(e){let t=e.lastIndexOf(`.`);return t!==-1&&mhe.includes(e.slice(t).toLowerCase())}function ghe(e){let t=T7((e.name??``).length+(e.description??``).length),n=T7(Xc(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/`)||hhe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:T7(i)}}const _he=I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose(),vhe=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose(),yhe=I({name:M().min(1),docs:F(vhe)}).loose(),bhe=I({folder:Ja(),frontmatter_local:co(M(),Ja()).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(L([`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(),xhe=I({path:M(),frontmatter:co(M(),Ja()).optional()}).loose(),She=I({applied:Ja()}).loose(),E7=co(M(),Ja()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Che=I({template:I({name:M().min(1),folder:M(),scope:L([`local`,`inherited`]),path:M().min(1),frontmatter:E7,body:M()}).strict()}).strict(),whe=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(),D7=I({folder:M(),name:M(),body:M().optional(),frontmatter:E7.optional(),...F4,summary:I4}).strict(),The=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Ehe=I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...F4,summary:I4}).strict(),Dhe=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Ohe=I({existed:P(),path:M().min(1)}).strict(),khe=I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:E7.optional(),...F4,summary:I4}).strict(),Ahe=I({from:M().min(1),to:M().min(1),committed:P()}).strict(),O7=L(hl),jhe=/^[a-z0-9-]+$/,Mhe=/<\/?[A-Za-z][^>]*>/;function Nhe(e){return Mhe.test(e)}const Phe=/^[A-Za-z0-9_-]+$/,k7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict(),Fhe=I({skill:I({name:M().min(1),scope:O7,path:M().min(1),frontmatter:k7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict(),Ihe=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),Lhe=I({name:M().min(1),description:M().optional(),scope:O7,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:co(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:L([`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:Ihe.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:phe.optional()}).strict(),Rhe=I({name:M().min(1),scope:O7,apply:P().optional()}).strict(),zhe=I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict(),Bhe=I({skills:F(Lhe),truncated:P()}).strict(),Vhe=I({scope:O7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:k7,...F4,summary:I4}).strict(),A7=[`skill-name-vendor-word`,`skill-body-too-long`],j7=F(L(A7)).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."}),Hhe=I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:j7}).strict(),Uhe=I({scope:O7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...F4,summary:I4}).strict(),Whe=I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:j7}).strict(),Ghe=I({scope:O7.default(`project`),name:M(),...F4,summary:I4}).strict(),Khe=I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict(),M7=`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.`,qhe=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. ${M7}`})}).strict(),Jhe=I({scope:O7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:k7.optional(),...F4,summary:I4}).strict(),Yhe=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. ${M7}`})}).strict(),Xhe=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:O7,toScope:O7,...F4,summary:I4}).strict(),N7=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function Zhe(e){return typeof e==`string`&&N7.includes(e)}const P7=[`intact`,`lossy`,`unknown`];function F7(e){return typeof e==`string`&&P7.includes(e)}const I7=[`unreadable`,`occupant-unverifiable`];function Qhe(e){return typeof e==`string`&&I7.includes(e)}const $he={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function ege(e){return $he[e]}function tge(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=Zhe(n)?n:void 0,o=F7(r)?r:void 0,s=Qhe(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}:(ege(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}}const L7=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function nge(e){if(e===void 0)return[];let t=L7;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}const rge=I({scope:O7,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. ${M7}`})}).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."}),ige=I({scope:O7,name:M(),toName:M(),...F4,summary:I4}).strict(),age=I({name:M().min(1)}).strict(),oge=I({name:M(),home:M().min(1)}).strict(),sge=I({docName:M().min(1)}).strict(),R7=L([`reference`,`script`,`file`]),cge=I({scope:O7.default(`project`),name:M(),path:M().min(1),content:M(),...F4,summary:I4}).strict(),lge=I({path:M().min(1),created:P(),kind:R7,content:P()}).strict(),uge=I({scope:O7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...F4,summary:I4}).strict(),dge=I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),fge=I({path:M().min(1),kind:R7,text:M()}).strict(),pge=I({path:M().min(1),existed:P(),kind:R7}).strict(),z7=no([dhe,R(`agents`)]),B7=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`}),V7=no([z7,B7]),mge=I({scope:O7.default(`project`),name:M(),targets:F(z7).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(V7).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(V7).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:L([`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:V7.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:L([`copy`,`link`])}).strict().optional(),convert:I({target:V7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:L([`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(),...F4,summary:I4,fork:I({editor:M().min(1),action:L([`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"}),H7=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`],hge=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(L(H7)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),gge=I({scope:O7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),_ge=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(),vge=I({targets:F(w7),configured:P(),folders:F(I({scope:O7,host:M(),root:M(),state:L([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:R(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),U7=I({action:R(`link`),scope:O7,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.`})}),W7=I({action:R(`unlink`),scope:O7,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(),G7=I({action:R(`add-root`),scope:O7,root:B7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),yge=io(`action`,[U7.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),W7,G7]),bge=io(`action`,[U7.strict(),W7,G7]),xge=I({folderAction:yge}).strict(),Sge=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict(),Cge=I({targets:F(w7),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:Sge.optional()}).strict(),wge=I({scope:O7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...F4,summary:I4}).strict(),Tge=I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),Ege=I({query:M().optional(),intent:L([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:L([`navigation`,`relevance`]).optional(),scopes:F(L([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:L([`omnibar`,`mcp`,`http`]).optional()}).loose(),Dge=I({kind:L([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:co(M(),Ja()),snippet:M().optional()}).loose(),K7=L([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),q7=L([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Oge(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function kge(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Age(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 kge(n)}}function jge(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}const J7=I({capable:P(),applied:P(),outcome:K7,providerErrorReason:q7.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),Mge=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:L([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:q7.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function Nge(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}const Pge=I({query:M(),intent:L([`autocomplete`,`full_text`,`omnibar`]),results:F(Dge),elapsedMs:N().nonnegative(),semantic:J7.optional(),truncated:P().optional(),ready:P().optional()}).loose(),Fge=I({version:M().min(1),recordedAt:M().min(1)}).loose(),Ige=I({currentVersion:M().min(1),targets:co(M(),Fge.nullable())}).loose(),Lge=I({scope:O7.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."}),...F4,summary:I4}).strict(),Rge=I({scope:O7.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."}),...F4,summary:I4}).strict(),zge=I({results:F(I({requested:M(),status:L([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:j7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),Bge=I({scope:O7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...F4,summary:I4}).strict(),Vge=I({results:F(I({requested:M(),status:L([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:j7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose(),Hge=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose(),Uge=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:Hge,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:j7}).loose(),Y7=`server-info`,X7=`branch-switched`,Z7=`disk-ack`,Q7=`config-validation-rejected`,$7=`config-ignore-nested-error`,Wge=L([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),Gge=I({v:R(1),ch:R(Y7),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),Kge=I({v:R(1),ch:R(X7),seq:N(),branch:M().min(1)}).loose(),qge=I({v:R(1),ch:Wge,seq:N()}).loose(),Jge=I({v:R(1),ch:R(Z7),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),Yge=I({v:R(1),ch:R(Q7),seq:N(),docName:M().min(1),error:zte}).loose(),Xge=I({v:R(1),ch:R($7),seq:N(),path:M().min(1),error:M().min(1)}).loose(),Zge={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},e9=new WeakMap;function Qge(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function t9(e){return e.trim().toLowerCase()}const $ge=/\.(?:md|mdx)$/;function e_e(e,t){if(t!==`page`)return e;let n=e.replace($ge,``);return n.length>0?n:e}function t_e(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function n_e(e){let t=t_e(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}}const n9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,r9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function r_e(){let e=lY({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!r9||typeof e!=`string`||!n9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of r9.segment(e)){if(!n||!n9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function i9(e){let t=CY({schema:Zge,components:{tokenizer:r_e()}});return e.length>0&&PY(t,e),t}function a9(e){let t={documents:e};return e9.set(t,i9(e)),t}function i_e(e){let t=e9.get(e);if(t)return t;let n=i9(e.documents);return e9.set(e,n),n}const o9=new WeakSet;function a_e(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function o_e(e,t){let n=e=>({corpus:a9(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=e9.get(e);if(!r)return n(`no-index`);if(o9.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?a_e(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);o9.add(e);try{if(a.length>0&&BY(r,a),o.length>0&&PY(r,o),TY(r)!==t.length)throw Error(`Search index count ${TY(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return e9.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function s_e(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function s9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function c_e(e,t){let n=t9(t);if(!n)return 0;let r=e_e(n,e.kind),i=t9(e.title),a=t9(e.name),o=t9(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}function c9(e,t){let n=c_e(e,t);return n<=0?n:j4(e.path)?n*.5:n}function l_e(e){return e===`file`?-60:0}function u_e(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function l9(e,t,n,r){return e+t*20+n+l_e(r)}function u9(e,t,n,r,i,a){return e===`relevance`?l9(t,n,r,i):u_e(t,n,r,i,a)}function d_e(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function d9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function f_e(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 p_e(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function m_e(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}}const h_e=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function g_e(e,t){let n=t9(t);return n.length<4||h_e.test(n)?0:+(e===`full_text`)}function __e(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function v_e(e){let t=[],n=[],r=[];for(let i of e){let e=__e(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function f9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=v_e(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 y_e(e,t,n={}){let r=n.intent??`omnibar`,i=d_e(r,n.ranking),a=Qge(n.limit),o=new Set(n.scopes??s_e(r)),s=e.documents.filter(e=>s9(e,o)),c=t9(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=gX(i_e(e),{term:c,properties:p_e(r),boost:m_e(r),tolerance:g_e(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>s9(e.document,o)).map(e=>[e.document.id,e.score])),d=f_e(s),f=new Map;for(let e of s)c9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)s9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=d9(f.values(),u);return f9([...f.values()].map(t=>{let n=Math.max(0,c9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:u9(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 f9(b_e({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function p9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function b_e(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=d9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,c9(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?u9(o,t,n,s,e.kind,m):l9(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=p9(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)),_=p9(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 x_e(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}const S_e=/^[A-Za-z0-9._-]+$/,C_e=/^(?:\d{1,3}\.){3}\d{1,3}$/;var m9=class extends Error{constructor(e){super(e),this.name=`InvalidShareUrlError`}};function w_e(e,t=0){if(g9(t,!0),t===0)return D_e(e);if(e.length>2985)throw new m9(`Share URL exceeds the v2 URL size limit`);E_e(h9(e),t);let n=new TextEncoder().encode(e);if(n.length>2985)throw new m9(`Share URL exceeds the v2 URL size limit`);let r=new Uint8Array(3+n.length);if(r[0]=2,r[1]=t>>>8,r[2]=t&255,r.set(n,3),r.length>2988)throw new m9(`Share payload exceeds the v2 size limit`);let i=S9(r);if(i.length>3984)throw new m9(`Share token exceeds the v2 size limit`);return i}function h9(e){if(!e.startsWith(`https://`))throw new m9(`Share URL must use canonical HTTPS spelling`);if(e.includes(`?`)||e.includes(`#`))throw new m9(`Share URL cannot contain a query or fragment`);let t=e.slice(8),n=t.indexOf(`/`);if(n<=0)throw new m9(`Share URL is missing its repository path`);let r=t.slice(0,n);_9(r);let i=t.slice(n+1).split(`/`);if(i.length<4||i.some(e=>e.length===0))throw new m9(`Share URL has an invalid path shape`);let[a,o,s,c,...l]=i;if(s!==`blob`&&s!==`tree`)throw new m9(`Share URL has an unsupported repository path shape`);let u=v9(a,`owner`),d=v9(o,`repository`),f=O_e(c),p=l.map(e=>k_e(e,`target`)),m=s===`blob`?`doc`:`folder`;if(m===`doc`&&p.length===0)throw new m9(`Document share URL is missing its target path`);let h={host:r,owner:u,repo:d,branch:f,kind:m,targetSegments:p};if(T_e(h)!==e)throw new m9(`Share URL is not canonically serialized`);return h}function T_e(e){if(_9(e.host),x9(e.owner,`owner`),x9(e.repo,`repository`),!Z4(e.branch))throw new m9(`Share URL branch is invalid`);if(e.kind!==`doc`&&e.kind!==`folder`)throw new m9(`Share URL target kind is invalid`);if(e.kind===`doc`&&e.targetSegments.length===0)throw new m9(`Document share URL is missing its target path`);for(let t of e.targetSegments)b9(t,`target`);let t=e.kind===`doc`?`blob`:`tree`,n=[encodeURIComponent(e.owner),encodeURIComponent(e.repo),t,encodeURIComponent(e.branch),...e.targetSegments.map(e=>encodeURIComponent(e))];return`https://${e.host}/${n.join(`/`)}`}function E_e(e,t){if(g9(t,!1),t>e.targetSegments.length)throw new m9(`Content root depth exceeds the repository target path`);let n=e.targetSegments.slice(t).join(`/`);if(e.kind===`doc`){if(n.length===0)throw new m9(`Document share target cannot be the content root`);return{kind:`doc`,docPath:n}}return{kind:`folder`,folderPath:n}}function D_e(e){let t=new TextEncoder().encode(e),n=new Uint8Array(1+t.length);return n[0]=1,n.set(t,1),S9(n)}function g9(e,t){if(!Number.isInteger(e)||e<+!t||e>65535)throw new m9(`Content root depth is invalid`)}function _9(e){if(e.length===0||e.length>253||e.endsWith(`.`)||e!==e.toLowerCase()||C_e.test(e))throw new m9(`Share URL host is not canonical`);if(e.split(`.`).some(e=>e.length===0||e.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e)))throw new m9(`Share URL host is not a DNS name`);if(w0(e)!==e)throw new m9(`Share URL host is not a canonical GitHub host`)}function O_e(e){let t=y9(e,`branch`);if(!Z4(t))throw new m9(`Share URL branch is invalid`);return t}function k_e(e,t){let n=y9(e,t);return b9(n,t),n}function v9(e,t){let n=y9(e,t);return x9(n,t),n}function y9(e,t){let n;try{n=decodeURIComponent(e)}catch{throw new m9(`Share URL ${t} has malformed percent encoding`)}if(encodeURIComponent(n)!==e)throw new m9(`Share URL ${t} is not canonically encoded`);return n}function b9(e,t){if(e.length===0||e===`.`||e===`..`||e.toLowerCase()===`.git`||e.includes(`/`)||e.includes(`\\`)||A_e(e))throw new m9(`Share URL ${t} component is invalid`)}function x9(e,t){if(b9(e,t),!S_e.test(e)||e.startsWith(`-`))throw new m9(`Share URL ${t} component is invalid`)}function A_e(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function S9(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}const C9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),w9=globalThis;w9[C9]===void 0&&(w9[C9]=ir());const T9=w9[C9],j_e=[`.ok`,`skill-state.yml`],M_e=[`claude-cowork`,`cli-hosts`],N_e=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],E9=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,D9=eo({version:M().regex(E9,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(T9,{description:`Recorded skill version for this target.`}),recordedAt:Ki().register(T9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:L(N_e).register(T9,{description:`Install-source surface that recorded this entry.`}).optional()}),P_e=eo({enabled:P().register(T9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Ki().register(T9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),F_e=eo({schema:R(1).register(T9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:eo({"claude-cowork":D9.optional(),"cli-hosts":D9.optional()}).register(T9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:co(M(),P_e).register(T9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(T9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function I_e(e,t){return e??t.installedOnDisk}function L_e(){return{schema:1,targets:{}}}const R_e=[`auth-error`,`detached-head`,`dirty-tree`,`diverged-local-commits`,`external-changes-pending`,`git-index-locked`,`git-operation-in-progress`,`no-commits-yet`,`no-push-permission`,`non-content-merge-failure`,`protected-branch`],O9=`template`;function k9(e){if(e.trim()===``)return{};let t;try{t=(0,Bc.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function A9(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function z_e(e){let{frontmatter:t,body:n}=Xc(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Qc(t),markdown:n}}function B_e(e){let t=e.split(`
|
|
544
|
+
`)}const Lfe=I({intents:F(I({satisfierId:M().min(1),desired:L([`present`,`absent`])}).loose()),...F4,summary:I4}).loose(),Rfe=I({satisfierId:M(),agentId:M(),piece:M(),scope:M(),kind:M(),pathId:M().optional(),desired:L([`present`,`absent`]),action:L(ko),errorId:M().optional()}).loose(),zfe=I({kind:M(),satisfierIds:F(M()),agentIds:F(M()),pathId:M().optional(),blockedReason:M().optional()}).loose(),Bfe=I({state:M(),strictness:F(L(Do)).optional()}).loose(),Vfe=I({probes:I({env:L([`desktop`,`local-web`,`remote-web`]),satisfiers:co(M(),Bfe)}).loose(),detection:I({detected:F(M()),probed:P()}).loose()}).loose(),Hfe=I({actions:F(Rfe),conflicts:F(zfe),withheld:F(M()),snapshot:Vfe}).loose(),Ufe=I({entries:F(I({level:L([`info`,`warn`,`error`]),message:M().max(8192),event:M().optional(),fields:co(M(),Ja()).optional(),ts:N().optional(),sourceId:M().optional(),lineNumber:N().optional()}).loose()).max(100),droppedSinceLastFlush:N().int().min(0).optional()}).loose(),Wfe=I({accepted:N().int().min(0)}).loose(),Gfe=I({exact:M().min(1),prefix:M(),suffix:M(),start:N().int().nonnegative(),end:N().int().nonnegative()}),Kfe=F(no([M(),N().int().nonnegative()])),qfe=io(`kind`,[I({kind:R(`body`)}),I({kind:R(`property`),key:M().min(1),path:Kfe.default([])})]).default({kind:`body`}),Jfe=L([`anchored`,`orphaned`,`resolved`]),l7=I({threadId:M().min(1),docName:M().min(1),target:qfe,anchor:Gfe.nullable(),state:Jfe,queued:P(),latestComment:M(),createdBy:M().min(1),createdAt:N(),updatedAt:N().optional()}),u7=I({docName:M(),instruction:M(),property:M().nullable(),passage:I({exact:M(),prefix:M(),suffix:M()}).nullable(),anchorLost:P(),passageRepeats:P()}).loose(),d7=I({threadId:M(),ok:R(!0)}),f7=I({threadId:M(),ok:R(!1),error:R(`not-found`)}),Yfe=I({threads:F(l7)}).loose(),Xfe=I({meta:l7,orphaned:P()}).loose(),Zfe=I({threadId:M()}).loose(),Qfe=I({meta:l7,payload:u7}).loose(),$fe=I({results:F(no([d7.extend({meta:l7,payload:u7}),f7]))}).loose(),epe=I({results:F(no([d7.extend({meta:l7}),f7]))}).loose(),tpe=I({status:M().min(1),reason:M()}).loose(),npe=I({docName:M().min(1),content:M(),lifecycle:tpe.nullable()}).loose(),rpe=I({documents:F(I({kind:L([`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:L([`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)`})),truncated:P().optional()}).loose(),ipe=I({source:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),ape=I({docName:M().min(1),backlinks:F(ipe)}).loose(),ope=I({counts:co(M().min(1),N().int().nonnegative())}).loose(),spe=I({counts:co(M().min(1),N().int().nonnegative())}).loose(),cpe=io(`kind`,[I({kind:R(`doc`),docName:M().min(1),anchor:M().nullable(),title:M(),snippet:M().nullable()}).loose(),I({kind:R(`external`),url:M().min(1),title:M(),snippet:M().nullable()}).loose()]),lpe=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(),upe=I({docName:M().min(1),forwardLinks:F(cpe),localTargets:F(lpe).optional()}).loose(),dpe=io(`kind`,[I({id:M().min(1),kind:R(`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:R(`external`),url:M().min(1),label:M()}).loose()]),fpe=I({source:M().min(1),target:M().min(1)}).loose(),ppe=I({nodes:F(dpe),links:F(fpe)}).loose(),mpe=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(),hpe=I({app:no([R(`cursor`),R(`codex`),R(`claude`),Wa()]),signals_fired:F(M())}).loose(),gpe=I({entries:F(mpe),count:N().int().min(0),detection:hpe}).loose(),p7=[`M`,`A`,`D`,`R`,`C`,`U`,`T`,`?`,`!`,` `],m7=I({path:M().min(1),code:L(p7),origPath:M().min(1).optional(),syncScoped:P(),open:io(`kind`,[I({kind:R(`doc`),docName:M().min(1)}),I({kind:R(`asset`),path:M().min(1)})]).optional()}).loose(),_pe=I({branch:M().nullable(),detached:P(),upstream:M().nullable(),staged:F(m7),notStaged:F(m7),untracked:F(m7),incoming:F(m7),truncated:P(),readable:P().default(!0)}).loose(),vpe=I({writers:F(I({id:M().min(1),name:M().optional(),email:M().optional()}).loose()).optional(),summary:I4,...F4}).loose(),ype=I({checkpointRef:M().min(1)}).loose(),bpe=I({v:N().int().optional(),id:M().min(1),name:M().min(1),colorSeed:M().optional(),docs:F(M()),summaries:F(M()).optional()}).loose(),xpe=I({entries:F(I({sha:M().min(1),timestamp:M().min(1),author:M(),authorEmail:M(),type:L([`checkpoint`,`wip`,`upstream`,`park`]),message:M(),contributors:F(bpe),checkpoint:Ja().nullable(),parentSha:M().nullable().optional()}).loose()),total:N().int().nonnegative().optional(),truncated:P().optional(),hasMore:P().optional()}).loose(),Spe=I({sha:M().regex(/^[0-9a-f]{40}$/i),content:M(),timestamp:M(),author:M()}).loose(),Cpe=I({contentDir:M().min(1),pathSeparator:L([`/`,`\\`]),symlinkResolved:P()}).loose(),wpe=F(io(`source`,[I({docName:M().min(1),timestamp:M().min(1),size:N().int().nonnegative(),source:R(`flat`)}).loose(),I({docName:M().min(1),timestamp:M().min(1),source:R(`timeline`),sha:M().min(1)}).loose()])).meta({description:"Flat array of rescue buffer entries; discriminated via `source`."}),h7=I({domain:M().min(1),title:M().optional(),description:M().optional(),siteName:M().optional(),faviconDataUri:M().optional()}).loose(),Tpe=I({url:M()}).loose(),Epe=io(`ok`,[I({ok:R(!0),metadata:h7}).loose(),I({ok:R(!1),reason:M()}).loose()]),Dpe=I({orphans:F(I({docName:M().min(1),title:M()}).loose())}).loose(),Ope=I({hubs:F(I({docName:M().min(1),title:M(),count:N().int().nonnegative()}).loose())}).loose(),kpe=I({source:M().min(1),title:M(),snippet:M().nullable()}).loose(),Ape=I({deadLinks:F(I({target:M().min(1),sources:F(kpe)}).loose())}).loose(),jpe=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(),Mpe=I({projectPath:M().min(1)}).loose(),Npe=L([`not-a-git-worktree`,`init-failed`]),Ppe=io(`ok`,[I({ok:R(!0),projectPath:M().min(1)}).loose(),I({ok:R(!1),reason:Npe,message:M().min(1)}).loose()]),Fpe=I({host:M().min(1).optional()}).loose(),Ipe=I({host:M().min(1).optional(),token:M().min(1)}).loose(),Lpe=I({host:M(),login:M()}).loose(),Rpe=I({key:M().min(1)}).loose(),zpe=I({keyPresent:P()}).loose(),Bpe=L([`no_key`,`invalid_endpoint`,`rate_limit`,`timeout`,`http_error`,`network`,`dims_mismatch`,`malformed_response`]),Vpe=io(`ok`,[I({ok:R(!0),endpoint:M().min(1),model:M().min(1),dimensions:N().int().positive()}).loose(),I({ok:R(!1),endpoint:M().min(1),model:M().min(1),reason:Bpe,status:N().int().optional()}).loose()]),Hpe=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(),Upe=I({authenticated:P()}).loose(),Wpe=I({channel:L([`login`,`gh-login`]).default(`login`)}).loose(),Gpe=I({}).loose(),Kpe=I({stackIndex:N().int().min(0),ts:N().int().min(0),additions:N().int().min(0),deletions:N().int().min(0)}).loose(),qpe=I({docName:M().min(1),additionsTotal:N().int().min(0),deletionsTotal:N().int().min(0),lastTs:N().int().min(0),bursts:F(Kpe)}).loose(),Jpe=I({displayName:M().min(1),color:M().min(1),icon:M().optional(),connectionId:M().min(1)}).loose(),Ype=I({sessionAlive:P(),agent:Jpe.nullable(),files:F(qpe)}).loose(),Xpe=I({diff:M(),before:M(),after:M(),properties:m4,generatedAt:N().int().min(0)}).loose(),Zpe=I({}).loose(),Qpe=I({}).loose(),$pe=I({}).loose(),eme=I({}).loose(),tme=I({}).loose(),nme=I({}).loose(),rme=I({displayName:M().min(1),icon:M(),color:M().min(1),currentDoc:M().nullable(),mode:L([`idle`,`writing`]),ts:N().int().min(0)}).loose(),ime=I({presence:co(M().min(1),rme)}).loose(),ame=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(),ome=I({effects:F(I({"doc.name":M().min(1),entries:F(ame)}).loose())}).loose(),sme=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(),cme=co(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();const lme=I({}).loose(),ume=I({fromDocName:M().min(1),toDocName:M().min(1)}).loose(),dme=I({fromPath:M().min(1),toPath:M().min(1)}).loose(),fme=I({}).loose(),pme=I({path:M().min(1),...F4,summary:I4}).loose(),mme=I({docName:M().min(1)}).loose(),hme=I({path:M().min(1),...F4,summary:I4}).loose(),gme=I({path:M().min(1)}).loose(),_me=I({kind:L([`file`,`folder`]),path:M().min(1),...F4,summary:I4}).loose(),vme=I({kind:L([`file`,`folder`]),path:M().min(1),duplicatedDocNames:F(M().min(1))}).loose(),yme=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(),bme=I({level:N().int().min(1).max(6),text:M(),slug:M()}).loose(),xme=I({docName:M().min(1),headings:F(bme)}).loose(),Sme=I({docName:M().min(1),rewrites:N().int().nonnegative()}).loose(),Cme=I({kind:L([`file`,`folder`,`asset`]),fromPath:M().min(1),toPath:M().min(1),...F4,summary:I4}).loose(),wme=I({renamed:F(ume),renamedAssets:F(dme),rewrittenDocs:F(Sme).optional(),summary:w5.optional()}).loose(),Tme=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...F4}).loose(),Eme=I({deletedDocNames:F(M().min(1))}).loose(),Dme=I({kind:L([`file`,`folder`,`asset`]),path:M().min(1),...F4,summary:I4}).loose(),Ome=I({deletedDocNames:F(M().min(1))}).loose(),kme=I({docName:M().min(1),commitSha:M().regex(/^[0-9a-f]{40}$/i,{message:`commitSha must be a 40-char git SHA`}),summary:I4,...F4}).loose(),Ame=I({restoredFrom:M().min(1),timestamp:M().min(1),summary:w5.optional(),warnings:A5.optional()}).loose(),jme=/^#[0-9a-fA-F]{6}$/,Mme=I(Object.fromEntries(Nd.map(e=>[e,M().regex(jme,`must be a #rrggbb hex color`)]))),g7=M().min(1).refine(Ld,{message:`must contain a non-whitespace character`}),_7=I({name:g7,author:g7.optional(),variant:L([`dark`,`light`]),palette:Mme}).loose(),Nme=I({name:M().min(1),scheme:_7,stem:M().min(1).optional(),extension:L([`.yaml`,`.yml`]).optional()}).loose(),Pme=I({id:M().min(1),filename:M().min(1)}).loose(),Fme=I({id:M().min(1),scheme:_7}).loose(),Ime=I({id:M().min(1),filename:M().min(1)}).loose(),Lme=io(`existed`,[I({existed:R(!1)}).loose(),I({existed:R(!0),filename:M().min(1),scheme:_7}).loose()]),Rme=I({themes:F(io(`ok`,[I({ok:R(!0),id:M().min(1),filename:M().min(1),scheme:_7}),I({ok:R(!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(),zme=L([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),Bme=I({label:M().min(1),webUrl:Ca().nullable()}).loose(),Vme=io(`checkStatus`,[I({checkStatus:R(`allowed`)}).loose(),I({checkStatus:R(`denied`),deniedReason:L([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:M().optional(),declaredLogin:M().optional(),declaredSource:M().optional()}).loose(),I({checkStatus:R(`unknown`),unknownError:L([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),v7=L([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),Hme=L(ku),Ume=L([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]),Wme=I({state:zme,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:Bme.nullable().optional(),pushError:M().optional(),pushErrorCode:v7.optional(),pullError:M().optional(),pullErrorCode:v7.optional(),pausedReason:M().optional(),blockingPaths:F(M().min(1)).optional(),pushPermission:Vme.optional(),syncMode:Hme.optional(),lastPullUtc:M().nullable().optional(),lastPullOutcome:Ume.nullable().optional()}).loose(),Gme=I({action:L([`commit`]),paths:F(M().min(1)),commitSha:M().optional()}).loose(),Kme=I({action:L([`commit`])}).loose(),qme=I({op:L([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),Jme=I({op:L([`sync`,`push`,`pull`,`fetch`])}).loose(),y7=[`merge-native`,`working-tree`,`reconcile`],b7=L(y7),x7=[`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`],S7=L(x7),Yme=L([`mine`,`theirs`,`content`,`delete`]),C7=I({file:M().min(1),detectedAt:M().min(1),conflict:b7,reason:S7.optional().catch(void 0),conflictKind:L([`git`,`stale-external-write`]).optional(),docName:M().nullable(),theirsSha:M().optional(),baseSha:M().optional()}).loose(),Xme=I({conflicts:F(C7)}).loose(),Zme=I({file:M().min(1),strategy:L([`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`]}),Qme=I({}).loose(),$me=I({file:M().min(1),base:M(),ours:M(),theirs:M(),kind:L([`both-modified`,`delete-modify`,`modify-delete`]),conflict:b7,reason:S7.optional().catch(void 0),conflictKind:L([`git`,`stale-external-write`]).optional(),resolutionOptions:F(Yme)}).loose(),ehe=I({plan:bo(e=>e!==void 0,{message:`plan is required`})}).loose(),the=I({plan:bo(e=>e!==void 0,{message:`plan is required`})}).loose(),nhe=I({result:bo(e=>e!==void 0,{message:`result is required`})}).loose(),rhe=I({packId:M().min(1)}).strict(),ihe=I({installedHosts:F(M()),skills:F(I({name:M().min(1),created:P()}).strict())}).strict(),ahe=I({path:M().min(1),summary:M().min(1)}).loose(),ohe=I({files:N().int().nonnegative(),folders:N().int().nonnegative()}).loose(),she=I({packs:F(I({id:M().min(1),name:M().min(1),description:M().min(1),defaultSubfolder:M().optional(),folders:F(ahe),entryCounts:ohe}).loose())}).loose(),che=I({noOpen:P().optional(),out:M().min(1).optional()}).loose(),lhe=I({reason:L([`unsupported-platform`,`spawn-error`]),message:M()}).loose(),uhe=io(`status`,[I({status:R(`installed`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M()}).loose(),I({status:R(`built`),outputPath:M(),size:N().int().nonnegative(),sha256:M(),skillVersion:M(),handoffError:lhe.optional()}).loose(),I({status:R(`failed`),buildError:M()}).loose(),I({status:R(`skip-current`),skillVersion:M(),recordedAt:M().optional()}).loose()]),w7=L(T),dhe=L(E);function fhe(e){return e===`agents`||E.includes(e)}const phe=I({alwaysOn:N().int().nonnegative(),onTrigger:N().int().nonnegative(),onDemand:N().int().nonnegative()}).strict(),mhe=[`.md`,`.mdx`,`.txt`];function T7(e){return Math.round(e/4)}function hhe(e){let t=e.lastIndexOf(`.`);return t!==-1&&mhe.includes(e.slice(t).toLowerCase())}function ghe(e){let t=T7((e.name??``).length+(e.description??``).length),n=T7(Xc(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/`)||hhe(t.relPath)&&(i+=t.content.length));return{alwaysOn:t,onTrigger:n,onDemand:T7(i)}}const _he=I({tags:F(I({name:M().min(1),count:N().int().nonnegative(),isLeaf:P()}).loose())}).loose(),vhe=I({docName:M().min(1),title:M(),matchingTags:F(M().min(1)),snippet:M().nullable()}).loose(),yhe=I({name:M().min(1),docs:F(vhe)}).loose(),bhe=I({folder:Ja(),frontmatter_local:co(M(),Ja()).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(L([`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(),xhe=I({path:M(),frontmatter:co(M(),Ja()).optional()}).loose(),She=I({applied:Ja()}).loose(),E7=co(M(),Ja()).meta({description:`Free-form frontmatter map embedded in template payloads.`}),Che=I({template:I({name:M().min(1),folder:M(),scope:L([`local`,`inherited`]),path:M().min(1),frontmatter:E7,body:M()}).strict()}).strict(),whe=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(),D7=I({folder:M(),name:M(),body:M().optional(),frontmatter:E7.optional(),...F4,summary:I4}).strict(),The=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Ehe=I({sourcePath:M().min(1),targetFolder:M(),name:M().optional(),title:M().optional(),deleteSource:P().optional(),...F4,summary:I4}).strict(),Dhe=I({path:M().min(1),created:P(),warnings:F(M())}).strict(),Ohe=I({existed:P(),path:M().min(1)}).strict(),khe=I({fromFolder:M(),fromName:M(),toFolder:M(),toName:M(),body:M().optional(),frontmatter:E7.optional(),...F4,summary:I4}).strict(),Ahe=I({from:M().min(1),to:M().min(1),committed:P()}).strict(),O7=L(hl),jhe=/^[a-z0-9-]+$/,Mhe=/<\/?[A-Za-z][^>]*>/;function Nhe(e){return Mhe.test(e)}const Phe=/^[A-Za-z0-9_-]+$/,k7=I({name:M(),description:M(),metadata:I({pack:M()}).strict().optional()}).strict(),Fhe=I({skill:I({name:M().min(1),scope:O7,path:M().min(1),frontmatter:k7,body:M(),files:F(I({path:M().min(1),text:M().nullable()})).optional(),managed:P().optional()}).strict()}).strict(),Ihe=I({source:M().min(1),publisher:M().optional(),skill:M().optional(),marketplaceUrl:M().optional(),importedAt:M().min(1),autoUpdate:P().optional()}).strict(),Lhe=I({name:M().min(1),description:M().optional(),scope:O7,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:co(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:L([`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:Ihe.optional(),pack:M().optional(),modified:P().optional(),revertable:P().optional(),ignored:P().optional(),size:phe.optional()}).strict(),Rhe=I({name:M().min(1),scope:O7,apply:P().optional()}).strict(),zhe=I({line:M().min(1),gitignorePath:M().min(1),applied:P(),alreadyTracked:P().optional()}).strict(),Bhe=I({skills:F(Lhe),truncated:P()}).strict(),Vhe=I({scope:O7.default(`project`),name:M().meta({description:`Managed skill name to create or update.`}),body:M().optional(),frontmatter:k7,...F4,summary:I4}).strict(),A7=[`skill-name-vendor-word`,`skill-body-too-long`],j7=F(L(A7)).meta({description:"Machine-readable codes aligned 1:1 with `warnings` (`warnings[i]` is the display text for `warningCodes[i]`)."}),Hhe=I({path:M().min(1),created:P(),warnings:F(M()),warningCodes:j7}).strict(),Uhe=I({scope:O7.default(`project`),name:M(),dryRun:P().optional(),setAutoUpdate:P().optional(),...F4,summary:I4}).strict(),Whe=I({name:M().min(1),updated:P(),source:M().min(1),localBody:M().optional(),upstreamBody:M().optional(),gitTracked:P().optional(),warnings:F(M()),warningCodes:j7}).strict(),Ghe=I({scope:O7.default(`project`),name:M(),...F4,summary:I4}).strict(),Khe=I({name:M().min(1),baselineRef:M().min(1),restoredFiles:F(M()),warnings:F(M())}).strict(),M7=`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.`,qhe=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. ${M7}`})}).strict(),Jhe=I({scope:O7.default(`project`),fromName:M(),toName:M(),body:M().optional(),frontmatter:k7.optional(),...F4,summary:I4}).strict(),Yhe=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. ${M7}`})}).strict(),Xhe=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:O7,toScope:O7,...F4,summary:I4}).strict(),N7=[`nothing-written`,`destination-removed`,`destination-stray`,`destination-retained`,`destination-retained-blocking`,`destination-unreadable`,`partially-applied`];function Zhe(e){return typeof e==`string`&&N7.includes(e)}const P7=[`intact`,`lossy`,`unknown`];function F7(e){return typeof e==`string`&&P7.includes(e)}const I7=[`unreadable`,`occupant-unverifiable`];function Qhe(e){return typeof e==`string`&&I7.includes(e)}const $he={"nothing-written":!1,"destination-removed":!1,"destination-stray":!1,"destination-retained":!0,"destination-retained-blocking":!0,"destination-unreadable":!1,"partially-applied":!1};function ege(e){return $he[e]}function tge(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=Zhe(n)?n:void 0,o=F7(r)?r:void 0,s=Qhe(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}:(ege(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}}const L7=`The server reported warnings in a shape this build does not recognise; treat this result as unverified.`;function nge(e){if(e===void 0)return[];let t=L7;if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`);return n.length===e.length?n:[...n,t]}const rge=I({scope:O7,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. ${M7}`})}).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."}),ige=I({scope:O7,name:M(),toName:M(),...F4,summary:I4}).strict(),age=I({name:M().min(1)}).strict(),oge=I({name:M(),home:M().min(1)}).strict(),sge=I({docName:M().min(1)}).strict(),R7=L([`reference`,`script`,`file`]),cge=I({scope:O7.default(`project`),name:M(),path:M().min(1),content:M(),...F4,summary:I4}).strict(),lge=I({path:M().min(1),created:P(),kind:R7,content:P()}).strict(),uge=I({scope:O7.default(`project`),name:M(),from:M().min(1),to:M().min(1),...F4,summary:I4}).strict(),dge=I({from:M().min(1),to:M().min(1),fromDocName:M().optional(),toDocName:M().optional()}).strict(),fge=I({path:M().min(1),kind:R7,text:M()}).strict(),pge=I({path:M().min(1),existed:P(),kind:R7}).strict(),z7=no([dhe,R(`agents`)]),B7=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`}),V7=no([z7,B7]),mge=I({scope:O7.default(`project`),name:M(),targets:F(z7).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(V7).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(V7).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:L([`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:V7.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:L([`copy`,`link`])}).strict().optional(),convert:I({target:V7.meta({description:`The installed location to convert — an editor id, "agents", or a recorded custom placement path.`}),mode:L([`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(),...F4,summary:I4,fork:I({editor:M().min(1),action:L([`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"}),H7=[`no-targets`,`scripts-present`,`name-conflict`,`no-description`,`skill-fork-name-unpatched`,`place-path-invalid`,`place-fork-refused`],hge=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(L(H7)).meta({description:"Machine-readable warning codes aligned with `warnings`."}),placedAt:M().optional(),sourceMovedTo:M().optional()}).strict(),gge=I({scope:O7.default(`project`),name:M().meta({description:`Managed skill name to uninstall without deleting source.`})}).strict(),_ge=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(),vge=I({targets:F(w7),configured:P(),folders:F(I({scope:O7,host:M(),root:M(),state:L([`own`,`linked`,`linked-parent`,`absent`]),target:M().optional(),drift:R(!0).optional(),expected:M().optional()}).strict()).optional()}).strict(),U7=I({action:R(`link`),scope:O7,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.`})}),W7=I({action:R(`unlink`),scope:O7,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(),G7=I({action:R(`add-root`),scope:O7,root:B7.meta({description:`New custom skills root to declare (base-relative, e.g. ".team/skills").`})}).strict(),yge=io(`action`,[U7.extend({preview:P().optional().meta({description:`Return the merge plan only (moves, drops, removes, conflicts, strays) — nothing is written.`})}).strict(),W7,G7]),bge=io(`action`,[U7.strict(),W7,G7]),xge=I({folderAction:yge}).strict(),Sge=I({moves:F(M()),drops:F(M()),removes:F(M()),replaces:F(M()),conflicts:F(M()),strays:F(M())}).strict(),Cge=I({targets:F(w7),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:Sge.optional()}).strict(),wge=I({scope:O7.default(`project`),name:M(),version:M().regex(/^[0-9a-f]{40}$/i),...F4,summary:I4}).strict(),Tge=I({name:M().min(1),version:M(),restoredFiles:F(M()),warnings:F(M())}).strict(),Ege=I({query:M().optional(),intent:L([`autocomplete`,`full_text`,`omnibar`]).optional(),ranking:L([`navigation`,`relevance`]).optional(),scopes:F(L([`page`,`folder`,`content`,`file`])).optional(),scope:M().optional(),limit:N().int().nonnegative().optional(),semantic:P().optional(),source:L([`omnibar`,`mcp`,`http`]).optional()}).loose(),Dge=I({kind:L([`page`,`folder`,`content`,`file`]),path:M().min(1),title:M(),score:N(),signals:co(M(),Ja()),snippet:M().optional()}).loose(),K7=L([`applied`,`no_match`,`warming`,`incapable`,`provider_error`,`restart_required`,`query_too_short`]),q7=L([`warm`,`corpus`,`query`,`dimensions`,`configured_dimensions`]);function Oge(e){return e?.providerErrorReason===`dimensions`?`restart_required`:e?.providerErrorReason===`configured_dimensions`?`incapable`:e?.providerError||e?.providerErrorReason?`provider_error`:null}function kge(e){throw Error(`Unhandled SemanticProviderErrorReason variant: ${JSON.stringify(e)}`)}function Age(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 kge(n)}}function jge(e){throw Error(`Unhandled SemanticQueryOutcome variant: ${JSON.stringify(e)}`)}const J7=I({capable:P(),applied:P(),outcome:K7,providerErrorReason:q7.nullable().optional().catch(null),coverage:I({embedded:N().int().nonnegative(),total:N().int().nonnegative()})}).loose(),Mge=I({enabled:P(),keyPresent:P(),keyNotRequired:P(),keySource:L([`project`,`file`,`env`]).nullable(),keyHint:M().nullable(),ready:P(),capable:P(),providerError:P().optional(),providerErrorReason:q7.nullable().optional().catch(null),embedded:N().int().nonnegative(),total:N().int().nonnegative()}).loose();function Nge(e){return!!(e?.enabled&&(e.keyPresent||e.keyNotRequired))}const Pge=I({query:M(),intent:L([`autocomplete`,`full_text`,`omnibar`]),results:F(Dge),elapsedMs:N().nonnegative(),semantic:J7.optional(),truncated:P().optional(),ready:P().optional()}).loose(),Fge=I({version:M().min(1),recordedAt:M().min(1)}).loose(),Ige=I({currentVersion:M().min(1),targets:co(M(),Fge.nullable())}).loose(),Lge=I({scope:O7.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."}),...F4,summary:I4}).strict(),Rge=I({scope:O7.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."}),...F4,summary:I4}).strict(),zge=I({results:F(I({requested:M(),status:L([`imported`,`already-imported`,`not-found`,`failed`]),name:M().optional(),collisionRenamedFrom:M().optional(),warnings:F(M()),warningCodes:j7,error:M().optional()}).loose()),imported:N(),alreadyImported:N(),failed:N()}).loose(),Bge=I({scope:O7.default(`project`),names:F(M().min(1)).min(1).max(100).meta({description:`Managed skill names to refresh from their recorded upstreams.`}),...F4,summary:I4}).strict(),Vge=I({results:F(I({requested:M(),status:L([`updated`,`up-to-date`,`not-found`,`failed`]),source:M().optional(),warnings:F(M()),warningCodes:j7,error:M().optional()}).loose()),updated:N(),upToDate:N(),failed:N()}).loose(),Hge=I({source:M(),ref:M().optional(),contentHash:M(),publisher:M().optional()}).loose(),Uge=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:Hge,warnings:F(M()).meta({description:`Non-fatal import warnings, such as skipped unsupported files.`}),warningCodes:j7}).loose(),Y7=`server-info`,X7=`branch-switched`,Z7=`disk-ack`,Q7=`config-validation-rejected`,$7=`config-ignore-nested-error`,Wge=L([`files`,`backlinks`,`graph`,`sync-status`,`session-activity`,`tags`,`comments`,`lint-config`,`local-targets`]),Gge=I({v:R(1),ch:R(Y7),seq:N(),serverInstanceId:M().min(1),currentBranch:M().min(1).optional()}).loose(),Kge=I({v:R(1),ch:R(X7),seq:N(),branch:M().min(1)}).loose(),qge=I({v:R(1),ch:Wge,seq:N()}).loose(),Jge=I({v:R(1),ch:R(Z7),seq:N(),docName:M().min(1),sv:M().min(1)}).loose(),Yge=I({v:R(1),ch:R(Q7),seq:N(),docName:M().min(1),error:zte}).loose(),Xge=I({v:R(1),ch:R($7),seq:N(),path:M().min(1),error:M().min(1)}).loose(),Zge={id:`string`,kind:`enum`,path:`string`,title:`string`,name:`string`,pathSegments:`string`,content:`string`,modifiedTs:`number`},e9=new WeakMap;function Qge(e){return e===void 0||!Number.isFinite(e)?20:Math.max(1,Math.min(100,Math.trunc(e)))}function t9(e){return e.trim().toLowerCase()}const $ge=/\.(?:md|mdx)$/;function e_e(e,t){if(t!==`page`)return e;let n=e.replace($ge,``);return n.length>0?n:e}function t_e(e){let t=e.split(`/`).filter(Boolean);return t[t.length-1]??e}function n_e(e){let t=t_e(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}}const n9=/[^\P{L}a-zàèéìòóù]|[^\P{Nd}0-9]|\p{Nl}/iu,r9=(()=>{let e=globalThis.Intl.Segmenter;return e?new e(`en`,{granularity:`word`}):null})();function r_e(){let e=lY({language:`english`}),t=e.tokenize.bind(e);return e.tokenize=(e,n,r,i)=>{let a=t(e,n,r,i);if(!r9||typeof e!=`string`||!n9.test(e))return a;let o=new Set(a);for(let{segment:t,isWordLike:n}of r9.segment(e)){if(!n||!n9.test(t))continue;let e=t.toLowerCase();o.has(e)||(o.add(e),a.push(e))}return a},e}function i9(e){let t=CY({schema:Zge,components:{tokenizer:r_e()}});return e.length>0&&PY(t,e),t}function a9(e){let t={documents:e};return e9.set(t,i9(e)),t}function i_e(e){let t=e9.get(e);if(t)return t;let n=i9(e.documents);return e9.set(e,n),n}const o9=new WeakSet;function a_e(e,t){return e===t||e.kind===t.kind&&e.path===t.path&&e.title===t.title&&e.name===t.name&&e.pathSegments===t.pathSegments&&e.modifiedTs===t.modifiedTs&&e.content===t.content}function o_e(e,t){let n=e=>({corpus:a9(t),inserted:0,updated:0,removed:0,rebuilt:!0,rebuildReason:e}),r=e9.get(e);if(!r)return n(`no-index`);if(o9.has(e))return n(`stale-base`);let i=new Map(t.map(e=>[e.id,e]));if(i.size!==t.length)return n(`duplicate-id`);let a=[],o=[],s=0;for(let t of e.documents){let e=i.get(t.id);e?a_e(t,e)||(a.push(t.id),o.push(e),s+=1):a.push(t.id)}let c=new Set(e.documents.map(e=>e.id));for(let e of t)c.has(e.id)||o.push(e);if(a.length+o.length>t.length)return n(`bulk-change`);o9.add(e);try{if(a.length>0&&BY(r,a),o.length>0&&PY(r,o),TY(r)!==t.length)throw Error(`Search index count ${TY(r)} diverged from document count ${t.length} after incremental update`)}catch{return n(`mutation-failed`)}let l={documents:t};return e9.set(l,r),{corpus:l,inserted:o.length-s,updated:s,removed:a.length-s,rebuilt:!1}}function s_e(e){return e===`autocomplete`?[`page`]:e===`full_text`?[`page`,`content`,`file`]:[`page`,`folder`,`file`]}function s9(e,t){return t.has(e.kind)?!0:e.kind===`page`&&t.has(`content`)}function c_e(e,t){let n=t9(t);if(!n)return 0;let r=e_e(n,e.kind),i=t9(e.title),a=t9(e.name),o=t9(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}function c9(e,t){let n=c_e(e,t);return n<=0?n:j4(e.path)?n*.5:n}function l_e(e){return e===`file`?-60:0}function u_e(e,t,n,r,i){let a=i>0?t/i:0,o=n/50,s=r===`file`?-.001:0,c=1*a+1*o+s;return e*1e3+c}function l9(e,t,n,r){return e+t*20+n+l_e(r)}function u9(e,t,n,r,i,a){return e===`relevance`?l9(t,n,r,i):u_e(t,n,r,i,a)}function d_e(e,t){return t||(e===`full_text`?`relevance`:`navigation`)}function d9(e,t){let n=0;for(let r of e){let e=t.get(r.id)??0;e>n&&(n=e)}return n}function f_e(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 p_e(e){return e===`full_text`?[`title`,`name`,`path`,`pathSegments`,`content`]:[`title`,`name`,`path`,`pathSegments`]}function m_e(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}}const h_e=/[-ក- -〿-ゟ゠-ヿ㐀-䶿一-鿿\uf900--\u1100-\u11ff\u3130-\u318f\ua960-\ua97f\uac00-\ud7ff]/;function g_e(e,t){let n=t9(t);return n.length<4||h_e.test(n)?0:+(e===`full_text`)}function __e(e){let{lexical:t,fullText:n}=e.signals;return t>=500?`lexical`:t===450&&n<=0?`pathOnly`:`body`}function v_e(e){let t=[],n=[],r=[];for(let i of e){let e=__e(i);e===`lexical`?t.length<100&&t.push(i):e===`body`?n.length<6&&n.push(i):r.length<4&&r.push(i)}return[...t,...n,...r]}function f9(e,t,n){if(t===`relevance`)return e.slice(0,n);let r=v_e(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 y_e(e,t,n={}){let r=n.intent??`omnibar`,i=d_e(r,n.ranking),a=Qge(n.limit),o=new Set(n.scopes??s_e(r)),s=e.documents.filter(e=>s9(e,o)),c=t9(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=gX(i_e(e),{term:c,properties:p_e(r),boost:m_e(r),tolerance:g_e(r,c),limit:Math.max(a*4,40)}),u=new Map(l.hits.filter(e=>s9(e.document,o)).map(e=>[e.document.id,e.score])),d=f_e(s),f=new Map;for(let e of s)c9(e,c)>=0&&f.set(e.id,e);for(let e of l.hits)s9(e.document,o)&&f.set(e.document.id,e.document);if(!n.semantic){let e=d9(f.values(),u);return f9([...f.values()].map(t=>{let n=Math.max(0,c9(t,c)),r=u.get(t.id)??0,a=d.get(t.id)??0;return{document:t,score:u9(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 f9(b_e({scopedDocuments:s,candidates:f,fullTextScores:u,recency:d,normalizedQuery:c,ranking:i,semantic:n.semantic}),i,a)}function p9(e){let t=new Map;return e.forEach((e,n)=>{t.set(e,n+1)}),t}function b_e(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=d9(n.values(),r),h=[...n.values()].map(e=>{let t=Math.max(0,c9(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?u9(o,t,n,s,e.kind,m):l9(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=p9(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)),_=p9(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 x_e(e){return e.created.length>0||e.packSkills?.some(e=>e.pending)===!0||e.requiredPlugins?.some(e=>e.pending)===!0}const S_e=/^[A-Za-z0-9._-]+$/,C_e=/^(?:\d{1,3}\.){3}\d{1,3}$/;var m9=class extends Error{constructor(e){super(e),this.name=`InvalidShareUrlError`}};function w_e(e,t=0){if(g9(t,!0),t===0)return D_e(e);if(e.length>2985)throw new m9(`Share URL exceeds the v2 URL size limit`);E_e(h9(e),t);let n=new TextEncoder().encode(e);if(n.length>2985)throw new m9(`Share URL exceeds the v2 URL size limit`);let r=new Uint8Array(3+n.length);if(r[0]=2,r[1]=t>>>8,r[2]=t&255,r.set(n,3),r.length>2988)throw new m9(`Share payload exceeds the v2 size limit`);let i=S9(r);if(i.length>3984)throw new m9(`Share token exceeds the v2 size limit`);return i}function h9(e){if(!e.startsWith(`https://`))throw new m9(`Share URL must use canonical HTTPS spelling`);if(e.includes(`?`)||e.includes(`#`))throw new m9(`Share URL cannot contain a query or fragment`);let t=e.slice(8),n=t.indexOf(`/`);if(n<=0)throw new m9(`Share URL is missing its repository path`);let r=t.slice(0,n);_9(r);let i=t.slice(n+1).split(`/`);if(i.length<4||i.some(e=>e.length===0))throw new m9(`Share URL has an invalid path shape`);let[a,o,s,c,...l]=i;if(s!==`blob`&&s!==`tree`)throw new m9(`Share URL has an unsupported repository path shape`);let u=v9(a,`owner`),d=v9(o,`repository`),f=O_e(c),p=l.map(e=>k_e(e,`target`)),m=s===`blob`?`doc`:`folder`;if(m===`doc`&&p.length===0)throw new m9(`Document share URL is missing its target path`);let h={host:r,owner:u,repo:d,branch:f,kind:m,targetSegments:p};if(T_e(h)!==e)throw new m9(`Share URL is not canonically serialized`);return h}function T_e(e){if(_9(e.host),x9(e.owner,`owner`),x9(e.repo,`repository`),!Z4(e.branch))throw new m9(`Share URL branch is invalid`);if(e.kind!==`doc`&&e.kind!==`folder`)throw new m9(`Share URL target kind is invalid`);if(e.kind===`doc`&&e.targetSegments.length===0)throw new m9(`Document share URL is missing its target path`);for(let t of e.targetSegments)b9(t,`target`);let t=e.kind===`doc`?`blob`:`tree`,n=[encodeURIComponent(e.owner),encodeURIComponent(e.repo),t,encodeURIComponent(e.branch),...e.targetSegments.map(e=>encodeURIComponent(e))];return`https://${e.host}/${n.join(`/`)}`}function E_e(e,t){if(g9(t,!1),t>e.targetSegments.length)throw new m9(`Content root depth exceeds the repository target path`);let n=e.targetSegments.slice(t).join(`/`);if(e.kind===`doc`){if(n.length===0)throw new m9(`Document share target cannot be the content root`);return{kind:`doc`,docPath:n}}return{kind:`folder`,folderPath:n}}function D_e(e){let t=new TextEncoder().encode(e),n=new Uint8Array(1+t.length);return n[0]=1,n.set(t,1),S9(n)}function g9(e,t){if(!Number.isInteger(e)||e<+!t||e>65535)throw new m9(`Content root depth is invalid`)}function _9(e){if(e.length===0||e.length>253||e.endsWith(`.`)||e!==e.toLowerCase()||C_e.test(e))throw new m9(`Share URL host is not canonical`);if(e.split(`.`).some(e=>e.length===0||e.length>63||!/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/.test(e)))throw new m9(`Share URL host is not a DNS name`);if(w0(e)!==e)throw new m9(`Share URL host is not a canonical GitHub host`)}function O_e(e){let t=y9(e,`branch`);if(!Z4(t))throw new m9(`Share URL branch is invalid`);return t}function k_e(e,t){let n=y9(e,t);return b9(n,t),n}function v9(e,t){let n=y9(e,t);return x9(n,t),n}function y9(e,t){let n;try{n=decodeURIComponent(e)}catch{throw new m9(`Share URL ${t} has malformed percent encoding`)}if(encodeURIComponent(n)!==e)throw new m9(`Share URL ${t} is not canonically encoded`);return n}function b9(e,t){if(e.length===0||e===`.`||e===`..`||e.toLowerCase()===`.git`||e.includes(`/`)||e.includes(`\\`)||A_e(e))throw new m9(`Share URL ${t} component is invalid`)}function x9(e,t){if(b9(e,t),!S_e.test(e)||e.startsWith(`-`))throw new m9(`Share URL ${t} component is invalid`)}function A_e(e){for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<=31||n===127)return!0}return!1}function S9(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``)}const C9=Symbol.for(`@inkeep/open-knowledge/skill-state-field-registry`),w9=globalThis;w9[C9]===void 0&&(w9[C9]=ir());const T9=w9[C9],j_e=[`.ok`,`skill-state.yml`],M_e=[`claude-cowork`,`cli-hosts`],N_e=[`server-build-and-open`,`electron-build-and-open`,`cli-npx-skills-add`,`desktop-direct`,`cli-start`],E9=/^\d+\.\d+\.\d+(?:[-+][\w.-]+)?$/,D9=eo({version:M().regex(E9,`version must match /^\\d+\\.\\d+\\.\\d+(?:[-+][\\w.-]+)?$/`).register(T9,{description:`Recorded skill version for this target.`}),recordedAt:Ki().register(T9,{description:`ISO 8601 timestamp of the most recent successful write. Updated on every write, including reinstalls of the same version.`}),surface:L(N_e).register(T9,{description:`Install-source surface that recorded this entry.`}).optional()}),P_e=eo({enabled:P().register(T9,{description:`Whether this user-global skill bundle is opted in.`}),decidedAt:Ki().register(T9,{description:`ISO 8601 timestamp of the opt-in / opt-out decision.`})}),F_e=eo({schema:R(1).register(T9,{description:`Schema major version. Bumped only on breaking shape changes.`}),targets:eo({"claude-cowork":D9.optional(),"cli-hosts":D9.optional()}).register(T9,{description:`Per-target install-state entries. Absent target = no recorded install.`}).default({}),bundles:co(M(),P_e).register(T9,{description:`Per-bundle opt-in decisions keyed by install name. Absent key = no recorded decision.`}).optional(),installsReported:F(M()).register(T9,{description:"Skill installs already reported to skills.sh from this machine, as `<owner/repo>#<skill>`. Append-only; presence suppresses a re-report."}).optional()});function I_e(e,t){return e??t.installedOnDisk}function L_e(){return{schema:1,targets:{}}}const R_e=[`auth-error`,`detached-head`,`dirty-tree`,`diverged-local-commits`,`external-changes-pending`,`git-index-locked`,`git-operation-in-progress`,`no-commits-yet`,`no-push-permission`,`non-content-merge-failure`,`protected-branch`],O9=`template`;function k9(e){if(e.trim()===``)return{};let t;try{t=(0,Bc.parse)(e)}catch{return{}}return typeof t!=`object`||!t||Array.isArray(t)?{}:t}function A9(e,t){return e.trim()===``?t:`---\n${e}\n---\n${t}`}function z_e(e){let{frontmatter:t,body:n}=Xc(e);return t===``?{docFrontmatterText:``,markdown:e}:{docFrontmatterText:Qc(t),markdown:n}}function B_e(e){let t=e.split(`
|
|
545
545
|
`);if(!(t[0]??``).startsWith(`template:`))return null;let n=[t[0]??``],r=1;for(;r<t.length;){let e=t[r]??``;if(/^[ \t]/.test(e)){n.push(e),r++;continue}if(e.trim()===``){let i=r+1;for(;i<t.length&&(t[i]??``).trim()===``;)i++;if(i<t.length&&/^[ \t]/.test(t[i]??``)){n.push(e),r++;continue}}break}let i=k9(n.join(`
|
|
546
546
|
`))[O9];return{identity:typeof i==`object`&&i&&!Array.isArray(i)?i:{},docFrontmatterText:t.slice(r).join(`
|
|
547
547
|
`).replace(/\n+$/,``)}}function j9(e){let t=e.charCodeAt(0)===65279?e.slice(1):e,{frontmatter:n,body:r}=Xc(t);if(n===``)return{identity:{},starterContent:t};let i=Qc(n),a=B_e(i);if(a)return{identity:a.identity,starterContent:A9(a.docFrontmatterText,r)};let{frontmatter:o}=Xc(r);if(o!==``)return{identity:k9(i),starterContent:r};let s=k9(i);return typeof s.title==`string`?{identity:s,starterContent:r}:{identity:{},starterContent:A9(i,r)}}function V_e(e,t){let{docFrontmatterText:n,markdown:r}=z_e(t),i={};for(let[t,n]of Object.entries(e))n!==void 0&&(i[t]=n);let a=(0,Bc.stringify)({[O9]:i});return`---\n${n.trim()===``?a:`${a}${n}\n`}---\n${r}`}function H_e(e){return j9(e).starterContent}const M9=e=>e*8+4;M9(92),M9(40);const U_e=/^(#{1,6})\s+(.+)$/;function W_e(e,t){let n=(e.endsWith(`\r`)?e.slice(0,-1):e).match(U_e);if(!n)return null;let r=n[2].trim(),i=Cfe(r,t);return i?{level:n[1].length,text:r,slug:i}:null}Array.from({length:256},(e,t)=>(t+256).toString(16).slice(1));const G_e={fileSystem:`File System`,gitUpstream:`Git (upstream)`,service:`OpenKnowledge (service)`,generator:`OpenKnowledge (generated)`},K_e=[`#D97757`,`#1B1912`,`#F9F3E9`,`#7A9DFF`,`#8534F3`,`#9663F0`,`#727CF3`],q_e={claude:`#D97757`,cursor:`#1B1912`,windsurf:`#0B100F`,openai:`#7A9DFF`,github:`#8534F3`,cline:`#9663F0`,bot:`#727CF3`};function J_e(e,t=K_e){let n=0;for(let t of e)n=(n<<5)-n+t.charCodeAt(0)|0;return t[Math.abs(n)%t.length]}const Y_e={"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 N9(e){return e?Y_e[e]||(e.startsWith(`local-agent-mode-`)?`claude`:`bot`):`bot`}const X_e={claude:`Claude`,cursor:`Cursor`,windsurf:`Windsurf`,openai:`Codex`,github:`Copilot`,cline:`Cline`};function Z_e(e){let t=e?.trim();return t?X_e[N9(t)]??t:`Agent`}function P9(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 F9(e){return e===`.`||e===`..`?e:encodeURIComponent(e).replace(/[!'()*]/g,e=>`%${e.codePointAt(0)?.toString(16).toUpperCase()}`)}function Q_e(e){return e.split(`/`).map(F9).join(`/`)}function I9(e){return e.split(`/`).map(P9).join(`/`)}function L9(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=P9(o.split(`/`).pop()??``).match(/\.([a-z0-9]+)$/i);if(s){let e=`.${(s[1]??``).toLowerCase()}`;if(!v0.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=P9(d[e]??``);if(e===f&&(t=yl(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 $_e(e){throw Error(`Unhandled ClassifiedLinkTarget variant: ${JSON.stringify(e)}`)}const R9=/^[a-zA-Z][a-zA-Z\d+\-.]*:/;function z9(e){let t=(e.split(/[?#]/)[0]??e).match(/\.([a-z0-9]+)$/i);return t?(t[1]??``).toLowerCase():null}function B9(e){let t=e.trim();return R9.test(t)||t.startsWith(`//`)}function eve(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(B9(n))return{kind:`external`,url:n};let r=n.indexOf(`#`),i=I9(r<0?n:n.slice(0,r)),a=wl(i,t);if(a)return{kind:`doc`,docName:a,anchor:r<0?null:n.slice(r+1)};let o=Cl(i,t);if(o)return{kind:`doc`,docName:o,anchor:r<0?null:n.slice(r+1)};let s=L9(n,t);if(s)return{kind:`doc`,docName:s.docName,anchor:s.anchor};let c=z9(i);return c&&c!==`md`&&c!==`mdx`?{kind:`asset`,url:n,ext:c,literal:!1}:null}function V9(e,t){let n=e.trim();if(!n)return null;if(B9(n))return{kind:`external`,url:t?`${n}#${t}`:n};let r=z9(n);return r&&r!==`md`&&r!==`mdx`?{kind:`asset`,url:n,ext:r,literal:!0}:{kind:`doc`,docName:n,anchor:t?.trim()||null}}function tve(e,t,n){let r=e.trim();if(!r||R9.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:P9(e));return c.length===0?null:c.join(`/`)}function H9(e){let t=e;return t.startsWith(`./`)&&(t=t.slice(2)),t.startsWith(`/`)&&(t=t.slice(1)),t}function U9(e){let t=e.lastIndexOf(`/`);return t===-1?e:e.slice(t+1)}function W9(e){let t=e.lastIndexOf(`/`);return t===-1?``:e.slice(0,t)}function G9(e){return e.split(`/`).filter(e=>e!==``)}function nve(e,t){let n=W9(t);return e===``||n===e||n.startsWith(`${e}/`)}function K9(e,t){let n=W9(t);if(e===n)return 0;let r=e===``?n:n.slice(e.length+1);return r===``?0:G9(r).length}function q9(e,t){let n=G9(e),r=G9(t),i=0;for(;i<n.length&&i<r.length&&n[i]===r[i];)i++;return n.length-i+(r.length-i)}function rve(){let e=new Map;function t(t){let n=H9(t);if(n===``)return;let r=U9(n);if(r===``)return;let i=r.toLowerCase(),a=e.get(i);if(!a){e.set(i,[n]);return}a.includes(n)||a.push(n)}function n(t){let n=H9(t),r=U9(n).toLowerCase(),i=e.get(r);if(!i)return;let a=i.indexOf(n);a!==-1&&(i.splice(a,1),i.length===0&&e.delete(r))}function r(e,r){n(e),t(r)}function i(t,n){let r=t.toLowerCase(),i=e.get(r);if(!i||i.length===0)return null;if(i.length===1)return i[0];let a=W9(H9(n)),o=[],s=[];for(let e of i)nve(a,e)?o.push(e):s.push(e);return o.length>0?(e=>{let t=e[0],n=K9(a,t);for(let r=1;r<e.length;r++){let i=e[r],o=K9(a,i);(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(o):(e=>{let t=e[0],n=q9(a,W9(t));for(let r=1;r<e.length;r++){let i=e[r],o=q9(a,W9(i));(o<n||o===n&&i<t)&&(t=i,n=o)}return t})(s)}function a(){let t=new Map;for(let[n,r]of e)t.set(n,[...r]);return t}function o(){e.clear()}return{add:t,remove:n,rename:r,resolveEmbed:i,clear:o,snapshot:a,size:()=>e.size}}const J9=`unknown`;function ive(e,t=Date.now()){let n=Date.parse(e);if(!Number.isFinite(n))return J9;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 ave(e){if(!e)return[];let t=e.split(`/`),n=[],r=``;for(let e of t)r=r?`${r}/${e}`:e,n.push(r);return n}function ove(e,t){if(e.size===0)return new Set;if(t===``)return new Set(e);let n=new Set,r=`${t}/`;for(let i of e)(i===t||i.startsWith(r))&&n.add(i);return n}function Y9(e){let t=e?.trim();return t===void 0||t===``?void 0:t}function sve(e){return e.reason!==void 0||Y9(e.note)!==void 0||Y9(e.email)!==void 0}function cve(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol===`https:`)return t;let n=t.hostname===`localhost`||t.hostname===`127.0.0.1`||t.hostname===`[::1]`;return t.protocol===`http:`&&n?t:null}function lve(){return cve((typeof process>`u`?void 0:Y9(process.env?.OK_FEEDBACK_INTAKE_ORIGIN))??`https://openknowledge.ai`)}function uve(e){let t=Y9(e);if(t!==void 0)return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(t)?t:void 0}async function X9(e,t,n){try{let r=await fetch(e,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(t),signal:AbortSignal.timeout(n)});if(r.ok){let e=await r.json().catch(()=>null);return{ok:!0,reference:typeof e?.reference==`string`?e.reference:``}}return r.status===400||r.status===413?{ok:!1,reason:`invalid`}:r.status===503?{ok:!1,reason:`unavailable`}:{ok:!1,reason:`error`}}catch(e){return{ok:!1,reason:e instanceof Error&&(e.name===`TimeoutError`||e.name===`AbortError`)?`timeout`:`error`}}}async function dve(e,t={}){let n=lve();if(n===null)return{ok:!1,reason:`error`};let r=new URL(`/api/feedback`,n),i=Y9(e.note),a=uve(e.email),o={kind:`uninstall`,reasons:e.reason===void 0?[]:[e.reason],...i===void 0?{}:{message:i},appVersion:e.appVersion,platform:e.platform,source:e.source},s=Date.now()+(t.timeoutMs??4e3),c=()=>s-Date.now();if(a===void 0)return X9(r,o,c());let l=await X9(r,{...o,email:a},c());return l.ok||l.reason!==`invalid`||c()<=0?l:X9(r,o,c())}function Z9(e){return`pagesBySlug`in e}function fve(e){return Z9(e)?e.pages:e}function pve(e,t){return Z9(e)?e.assetPaths??new Set:t??new Set}function mve(e,t){return Z9(e)?e.filePaths??new Set:t??new Set}function Q9(e,t){return e<t?-1:+(e>t)}function hve(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 gve(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 _ve(e,t){let n=r7(e);if(n){if(Z9(t))return t.pagesBySlug.get(n);for(let e of t)if(r7(e)===n)return e}}function vve(e,t){if(e.includes(`/`))return;let n=r7(e);if(!n)return;if(Z9(t))return t.pagesByBasename?.get(n);let r;for(let e of t){let t=e.lastIndexOf(`/`);r7(t===-1?e:e.slice(t+1))===n&&(r===void 0||Q9(e,r)<0)&&(r=e)}return r}function yve(e){let t=e.trim();if(!t)return[];let n=r7(t);return n.length>0&&n!==t?[n]:[]}function $9(e,t){let n=e.trim();if(!n)return;let r=fve(t);if(r.has(n))return n;let i=_ve(n,t);if(i)return i;for(let e of yve(n))if(r.has(e))return e;return bve(n,r)||vve(n,t)}function bve(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 xve(e){let t=((e.trim().split(`#`)[0]??``).trim().split(`?`)[0]??``).trim();return t.startsWith(`/`)?t.slice(1):t}function Sve(e,t,n){let r=xve(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 Cve(e,t,n){let r=V9(e,t);return r===null||r.kind!==`asset`||Sve(r.url,pve(n),mve(n))!==null||$9(e,n)===void 0?r:{kind:`doc`,docName:e.trim(),anchor:t?.trim()||null}}const wve=new _ue({extensions:c4,deriveStructuralFreshness:!0}),Tve=sC(c4);export{mme as $,hfe as $a,pf as $c,Dme as $i,au as $l,R_e as $n,Eue as $o,rge as $r,ZX as $s,Ipe as $t,io as $u,Xge as A,eve as Aa,jd as Ac,y as Ad,Zme as Ai,Ou as Al,x7 as An,i4 as Ao,uoe as Ar,c7 as As,Spe as At,il as Au,s1 as B,eQ as Ba,Af as Bc,E as Bd,Che as Bi,Wc as Bl,Ame as Bn,j4 as Bo,lge as Br,$9 as Bs,y0 as Bt,gs as Bu,ooe as C,YX as Ca,Lte as Cc,Qe as Cd,lme as Ci,Ate as Cl,xme as Cn,V8 as Co,R4 as Cr,Ffe as Cs,Lde as Ct,tl as Cu,N5 as D,e7 as Da,kf as Dc,D as Dd,Xme as Di,Tu as Dl,moe as Dn,Aue as Do,G4 as Dr,rfe as Ds,p7 as Dt,Xc as Du,j5 as E,hZ as Ea,Ef as Ec,j as Ed,$me as Ei,Eu as El,Qfe as En,HQ as Eo,K4 as Er,c3 as Es,Gde as Et,bu as Eu,X7 as F,J_e as Fa,Pf as Fc,S as Fd,O9 as Fi,fl as Fl,U5 as Fn,H_e as Fo,oge as Fr,n0 as Fs,cme as Ft,ss as Fu,Wfe as G,rve as Ga,Yte as Gc,D7 as Gi,zl as Gl,jhe as Gn,D$ as Go,Lge as Gr,y_e as Gs,Kde as Gt,za as Gu,soe as H,V1 as Ha,rd as Hc,w as Hd,Dhe as Hi,pl as Hl,A7 as Hn,p0 as Ho,dge as Hr,cfe as Hs,h7 as Ht,Tte as Hu,$7 as I,G$ as Ia,id as Ic,T as Id,Phe as Ii,dl as Il,Cme as In,tge as Io,sge as Ir,L9 as Is,o3 as It,So as Iu,epe as J,Y6 as Ja,Wf as Jc,eme as Ji,Jl,j_e as Jn,Qde as Jo,Ige as Jr,gQ as Js,Xde as Jt,Wa as Ju,spe as K,Q6 as Ka,Gte as Kc,The as Ki,Rl as Kl,I7 as Kn,A4 as Ko,Uge as Kr,_de as Ks,Bde as Kt,fo as Ku,Q7 as L,X8 as La,Cd as Lc,te as Ld,yhe as Li,cl as Ll,wme as Ln,$4 as Lo,pge as Lr,xoe as Ls,m9 as Lt,ute as Lu,qge as M,Oge as Ma,Cf as Mc,b as Md,Wme as Mi,Cu as Ml,a1 as Mn,Aoe as Mo,qhe as Mr,m0 as Ms,Soe as Mt,hs as Mu,Jge as N,V9 as Na,Sf as Nc,x as Nd,qme as Ni,Pl as Nl,n1 as Nn,N9 as No,ige as Nr,tve as Ns,che as Nt,ms as Nu,Q8 as O,_0 as Oa,Of as Oc,ce as Od,Kme as Oi,xu as Ol,i3 as On,a7 as Oo,J4 as Or,ife as Os,_pe as Ot,Nl as Ou,Gge as P,c1 as Pa,ed as Pc,ne as Pd,Jme as Pi,sl as Pl,V5 as Pn,h0 as Po,age as Pr,I_e as Ps,uhe as Pt,ps as Pu,pme as Q,J$ as Qa,Lf as Qc,Yfe as Qi,lu as Ql,$8 as Qn,F7 as Qo,Xhe as Qr,ufe as Qs,Fpe as Qt,bo as Qu,Z7 as R,V_e as Ra,Mf as Rc,ee as Rd,_he as Ri,ul as Rl,wpe as Rn,B9 as Ro,fge as Rr,g0 as Rs,i7 as Rt,lte as Ru,ape as S,y4 as Sa,Wte as Sc,ot as Sd,Vge as Si,Mte as Sl,o1 as Sn,vfe as So,z4 as Sr,M0 as Ss,Ide as St,Kl as Su,YQ as T,hve as Ta,ad as Tc,_e as Td,jpe as Ti,Uf as Tl,$fe as Tn,ive as To,B4 as Tr,iQ as Ts,Wde as Tt,vu as Tu,loe as U,B1 as Ua,nd as Uc,khe as Ui,ml as Ul,H7 as Un,u5 as Uo,bge as Ur,W_e as Us,Tpe as Ut,dte as Uu,y7 as V,Nhe as Va,lp as Vc,re as Vd,Ehe as Vi,bl as Vl,Doe as Vn,aoe as Vo,uge as Vr,H1 as Vs,ppe as Vt,xs as Vu,Ufe as W,mfe as Wa,Xte as Wc,Ahe as Wi,hl as Wl,N7 as Wn,E0 as Wo,Fhe as Wr,Ooe as Ws,Epe as Wt,Co as Wu,hme as X,n_e as Xa,Zte as Xc,$pe as Xi,ru as Xl,E9 as Xn,Nge as Xo,V7 as Xr,FQ as Xs,Wpe as Xt,F as Xu,C7 as Y,a9 as Ya,jte as Yc,Qpe as Yi,ol as Yl,M_e as Yn,F0 as Yo,hge as Yr,t8 as Ys,$de as Yt,Ka as Yu,gme as Z,I9 as Za,Gd as Zc,Zpe as Zi,iu as Zl,v0 as Zn,fhe as Zo,Jhe as Zr,T4 as Zs,Gpe as Zt,P as Zu,vde as _,goe as _a,$te as _c,zn as _d,_ge as _i,Lu as _l,T0 as _n,p4 as _o,ehe as _r,w4 as _s,U1 as _t,_u,Ype as a,_oe as aa,qQ as ac,I as ad,wge as ai,Sd as al,Rpe as an,LQ as ao,Pme as ar,o0 as as,b0 as at,pu as au,Dde as b,CZ as ba,td as bc,nt as bd,Bhe as bi,Kte as bl,j0 as bn,pfe as bo,K7 as br,lZ as bs,She as bt,xl as bu,Hfe as c,D5 as ca,gfe as cc,co as cd,Khe as ci,bd as cl,Ppe as cn,Toe as co,Rme as cr,g$ as cs,Eme as ct,Fl as cu,xde as d,e0 as da,Qh as dc,Ja as dd,vge as di,wd as dl,ime as dn,Q_e as do,Pge as dr,Y2 as ds,npe as dt,yu as du,Ome as ea,ove as ec,Va as ed,Yhe as ei,ff as el,Lpe as en,y$ as eo,G_e as er,Z4 as es,S0 as et,tu as eu,jde as f,HZ as fa,B as fc,Ca as fd,xge as fi,Iu as fl,nme as fn,F9 as fo,the as fr,BQ as fs,_me as ft,vl as fu,kde as g,$_e as ga,tne as gc,vr as gd,gge as gi,Bu as gl,d5 as gn,ave as go,she as gr,j9 as gs,fme as gt,El as gu,yde as h,lQ as ha,vp as hc,Wi as hd,zhe as hi,mf as hl,h5 as hn,EX as ho,ihe as hr,Eoe as hs,gpe as ht,Ml as hu,k5 as i,voe as ia,r7 as ic,N as id,Whe as ii,Wu as il,zpe as in,Z_e as io,Nme as ir,n8 as is,I0 as it,Gl as iu,Yge as j,A0 as ja,wf as jc,ae as jd,Qme as ji,Du as jl,J9 as jn,sve as jo,doe as jr,afe as js,Ope as jt,zc as ju,Kge as k,ioe as ka,Df as kc,v as kd,Gme as ki,wu as kl,Xfe as kn,ose as ko,X4 as kr,Ife as ks,xpe as kt,Qc as ku,bde as l,Cpe as la,kH as lc,M as ld,O7 as li,zf as ll,Ude as ln,jX as lo,Ege as lr,A8 as ls,Zfe as lt,Bl as lu,Fde as m,VZ as ma,rne as mc,Ki as md,Rhe as mi,Kd as ml,sme as mn,ghe as mo,rhe as mr,l4 as ms,MX as mt,Ol as mu,Tve as n,L0 as na,Rde as nc,R as nd,Hhe as ni,qte as nl,Upe as nn,tQ as no,ype as nr,_fe as ns,q8 as nt,du as nu,Xpe as o,Yde as oa,o_e as oc,po as od,Tge as oi,op as ol,Vpe as on,_Q as oo,Fme as or,GQ as os,Ape as ot,qc as ou,Mde as p,nfe as pa,hp as pc,xa as pd,Cge as pi,Rf as pl,tme as pn,w_e as po,nhe as pr,h9 as ps,vme as pt,el as pu,l7 as q,AQ as qa,Td as qc,whe as qi,ql,P7 as qn,Zde as qo,mge as qr,Age as qs,z5 as qt,L as qu,q_e as r,L7 as ra,C4 as rc,eo as rd,Uhe as ri,Vte as rl,yoe as rn,g4 as ro,Lme as rr,bQ as rs,e5 as rt,_l as ru,Lfe as s,Jde as sa,D4 as sc,xo as sd,Ghe as si,If as sl,Mpe as sn,W5 as so,Ime as sr,nge as ss,Tme as st,gl as su,wve as t,x0 as ta,uQ as tc,oo as td,Vhe as ti,Hte as tl,Hpe as tn,i0 as to,vpe as tr,wde as ts,gde as tt,nu as tu,Ade as u,v$ as ua,JV as uc,no as ud,F_e as ui,Xf as ul,ome as un,L_e as uo,J7 as ur,W6 as us,rpe as ut,mu as uu,Ode as v,jge as va,ene as vc,Zt as vd,Rge as vi,Qte as vl,Dpe as vn,I1 as vo,Mge as vr,UQ as vs,bhe as vt,Yl as vu,dQ as w,gve as wa,Bf as wc,ke as wd,boe as wi,Hf as wl,yme as wn,a0 as wo,V4 as wr,Z2 as ws,G5 as wt,kl as wu,ope as x,x4 as xa,Dd as xc,it as xd,Bge as xi,Ute as xl,N0 as xn,wue as xo,poe as xr,dve as xs,upe as xt,wl as xu,hoe as y,Tde as ya,gp as yc,et as yd,zge as yi,Jte as yl,x$ as yn,$Q as yo,q7 as yr,x_e as ys,xhe as yt,Zc as yu,Y7 as z,$Z as za,jf as zc,oe as zd,Ohe as zi,ll as zl,kme as zn,tfe as zo,cge as zr,Cve as zs,C0 as zt,cte as zu};
|