@inkeep/open-knowledge 0.65.0-beta.6 → 0.65.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-DYde9JLD.mjs → acp-harness-probe-0TsDLkSm.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/config-schema.json +1 -1
- package/dist/config.project-local.schema.json +1 -1
- package/dist/constants-5fvIhZpq.mjs +2 -0
- package/dist/fs-traced-CJauRo0X.mjs +1 -0
- package/dist/{fs-traced-C5oeVBiQ.mjs → fs-traced-DcgvOGgW.mjs} +2 -2
- package/dist/git-handle-2_ip1fTf.mjs +1 -0
- package/dist/{git-handle-CeLf_80_.mjs → git-handle-LrqWfHo9.mjs} +2 -2
- package/dist/index.mjs +2 -2
- package/dist/{init-D9c7bJgX.mjs → init-4m61hX8N.mjs} +3 -3
- package/dist/init-DTxzfZUK.mjs +1 -0
- package/dist/{launch-json-removal-CCE1hCzu.mjs → launch-json-removal-C_GDC4PP.mjs} +2 -2
- package/dist/loader-CX3-YjDu.mjs +1 -0
- package/dist/{loader-DfYCAjwQ.mjs → loader-CqMn0oDw.mjs} +2 -2
- package/dist/md-manager-BB0EfynB.mjs +2 -0
- package/dist/{open-browser-DScjpc4A.mjs → open-browser-BgX5g9kd.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-C1bqAAHy.mjs → preview-DAr0H_Nz.mjs} +2 -2
- package/dist/preview-Fg1Qh_be.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-iVCQqweq.js → ActivityModeContent-elWsfC63.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-CPf02Fwa.js → AddPropertiesButton-CjPwqhhi.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-BtpGOC45.js → AgentDiffPane-BrXppr_Y.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-byV-mbnY.js → AgentThreadClientBinder-9Kd_G6KF.js} +1 -1
- package/dist/public/assets/{BugReportHistory-Mvnt4SEp.js → BugReportHistory-BHIdpNMk.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-DcWVOW9N.js → BugReportHistoryDialog-Dr8-xNnX.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-B6CoPdiS.js → CodeMirrorPropInput-DBXjkPpK.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-0hoJ_ijU.js → ConsentDialogBody-DNra0D09.js} +1 -1
- package/dist/public/assets/{DocumentContext-cm1ZiCIR.js → DocumentContext-Bq5FEPlc.js} +2 -2
- package/dist/public/assets/{EditorModeToggle-CgD37GNE.js → EditorModeToggle-03bSlEYV.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DFj2_7qp.js → EnableSyncConfirmDialog-BiXLM9eF.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-Du-VDkG1.js → ExcalidrawDocEditor-ReIsu-q7.js} +1 -1
- package/dist/public/assets/FeedbackForm-Bh43LhOf.js +1 -0
- package/dist/public/assets/{GraphPanel-BV1qD1M6.js → GraphPanel-B85wHg1S.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-D3CIOCxg.js → ImportSkillDialog-Bf-a8cEF.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BgNu1pk8.js → LintConfigEditor-DQGDnaz9.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-B8EqUoZ3.js → ManagedArtifactProperties-CCxutXNq.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CD3zeeJm.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-DX11737F.js → MermaidDocEditor-DDq0vsai.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DFgojvKc.js → PropertyDisplayRow-RavoaS4I.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-rfqM32yk.js → ReportBugDialogBody-BTXd2_SI.js} +1 -1
- package/dist/public/assets/{ReportBugMenuTrigger-MbnqF2SK.js → ReportBugMenuTrigger-fKa7fr5P.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-D2sSopqD.js → SchemaConfigEditor-CkwRhR9w.js} +1 -1
- package/dist/public/assets/{SessionsHost-CL1ekzh8.js → SessionsHost-BI_A0-0s.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-CcLAF7VK.js → SettingsDialogBody-B_hpIt8k.js} +1 -1
- package/dist/public/assets/{ShareBranchSwitchDialog-BO0uIFs7.js → ShareBranchSwitchDialog-ZPNZoORX.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CskBIDXp.js → ShareReceiveDialog-BhjCenvH.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DbZQyqUj.js → ShareReceiveMissDialog-rCbmgHHt.js} +1 -1
- package/dist/public/assets/{SkillCostValue-CNJ4MgeB.js → SkillCostValue-DyXB8AqC.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DACxakQd.js → SkillEditBanner-D5qW2gc9.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-DsV7Zg_N.js → SkillInstallMenu-DvUCOYH9.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-Dy2zQZrT.js → SkillOriginInline-CWUNJzFn.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CK1hDwSR.js → SkillToolbarControls-B-aau0od.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DauhKnHa.js → SlidesToolbarControls-Dw1l0rjA.js} +1 -1
- package/dist/public/assets/{SourceEditor-BAFCEDOW.js → SourceEditor-BqtT3ujn.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BCS-RzlD.js → TerminalPanel-CRVCgsyx.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-Pr86JmqX.js → TerminalWindowApp-CEIrXzDF.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CuXA3fG7.js → TextDocEditor-Bekb_f2n.js} +1 -1
- package/dist/public/assets/{ThreadView-D7sS5GXu.js → ThreadView-BKnIKa0T.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-C4-v6VKa.js → TimelineDiffPane-BdoPYWED.js} +1 -1
- package/dist/public/assets/{agent-diff-store-BD87nz3F.js → agent-diff-store-6T45Gkgl.js} +1 -1
- package/dist/public/assets/{auth-state-cache-BmBuSpVr.js → auth-state-cache-Cjt2VSzF.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-CWBwJLhw.js → bug-report-send-manager-BWS3P1nQ.js} +1 -1
- package/dist/public/assets/{client-version-D2q-P0iF.js → client-version-CPgBWecL.js} +1 -1
- package/dist/public/assets/{comment-chips-DsXikPkv.js → comment-chips-BBA9zWtL.js} +1 -1
- package/dist/public/assets/{config-provider-CTJraL6m.js → config-provider-DP90oIbG.js} +3 -3
- package/dist/public/assets/{dist-7elyeD1s.js → dist-7pFMKYKc.js} +1 -1
- package/dist/public/assets/{doc-paths-D_8UvPYx.js → doc-paths-AnuejHgE.js} +1 -1
- package/dist/public/assets/{documents-events--JsHluy4.js → documents-events-CQFs1txA.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-DNXscpMG.js → file-tree-adapter-B0uo_ZTL.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BjUMUlWv.js → file-tree-utils-AlbsUKjT.js} +1 -1
- package/dist/public/assets/{folder-config-api-D4_ApcVY.js → folder-config-api-AaGTW4Vi.js} +1 -1
- package/dist/public/assets/i18n-B40Sn8GX.js +1 -0
- package/dist/public/assets/{index-B0vTL8Ml.js → index-BDcCP25E.js} +120 -120
- package/dist/public/assets/{launcher-selection-DGh5-Pqt.js → launcher-selection-XGS5cMvX.js} +1 -1
- package/dist/public/assets/{lint-config-client-RAMPJ8G7.js → lint-config-client-BD9KBHEH.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-DitAECCM.js → markdownlint-rule-browser-DDi01i_N.js} +1 -1
- package/dist/public/assets/messages-4RkxHe2V.js +1 -0
- package/dist/public/assets/messages-B2mYVhA4.js +1 -0
- package/dist/public/assets/messages-B66IfJmC.js +1 -0
- package/dist/public/assets/messages-BnuH_5SE.js +1 -0
- package/dist/public/assets/messages-C6nB3b-S.js +1 -0
- package/dist/public/assets/messages-CruCvJrt.js +1 -0
- package/dist/public/assets/messages-DHU55TlV.js +1 -0
- package/dist/public/assets/messages-DXoOD1yT.js +1 -0
- package/dist/public/assets/messages-DlIZYdug.js +1 -0
- package/dist/public/assets/messages-Tw_xE_s7.js +1 -0
- package/dist/public/assets/messages-W1AArZV6.js +1 -0
- package/dist/public/assets/messages-v9AyC868.js +1 -0
- package/dist/public/assets/{page-list-cache-prUKRtRa.js → page-list-cache-uXT-06Rv.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DC3PrSPg.js → pending-receive-nav-store-BZbhMqVl.js} +1 -1
- package/dist/public/assets/{progress-BEXaBNIb.js → progress-DZfOlTRL.js} +1 -1
- package/dist/public/assets/{project-paths-D9vcEZSb.js → project-paths-BfZmC0Xe.js} +1 -1
- package/dist/public/assets/{prop-types-BOXmr7Q9.js → prop-types-BGi0QyJN.js} +1 -1
- package/dist/public/assets/{receive-store-DMcyiDfj.js → receive-store-B5UCXtcM.js} +1 -1
- package/dist/public/assets/{selection-context-CLtjNgSV.js → selection-context-Dzqum4PM.js} +1 -1
- package/dist/public/assets/{skill-scope-CVSSymVB.js → skill-scope-D5Su1R0A.js} +1 -1
- package/dist/public/assets/{skills-api-DHpABbiE.js → skills-api-DoDgfzdK.js} +1 -1
- package/dist/public/assets/{src-Dq3nd0Lx.js → src-xOo02BAQ.js} +1 -1
- package/dist/public/assets/{startup-marks-lmLF_OO-.js → startup-marks-CLmRley0.js} +1 -1
- package/dist/public/assets/{tag-pill-input-DHmb-7zU.js → tag-pill-input-kJ01bH0I.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-zJ017p9i.js → target-navigation-intent-D4kqQyLi.js} +1 -1
- package/dist/public/assets/{telemetry-startup-DI_JMeyZ.js → telemetry-startup-DhGOoL9J.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-2og2-PQg.js → terminal-cli-display-DAGgFkPy.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-EBpBvXLS.js → typing-burst-detector-BLQPTYMY.js} +1 -1
- package/dist/public/assets/{uninstall-Cs7fpSSM.js → uninstall-C4c6_D4O.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BP6cVXAM.js → use-activity-panel-C3v_dGDR.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-DdXME66g.js → use-apply-config-color-theme-DbSHvgtI.js} +1 -1
- package/dist/public/assets/{use-collab-url-Bw-ux1e9.js → use-collab-url-C2Pj7Ql6.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-cynTCBxO.js → use-live-xterm-theme-kgq_fqMS.js} +1 -1
- package/dist/public/assets/{use-open-skill-C2S8Ju9E.js → use-open-skill-DIZ2AzWt.js} +1 -1
- package/dist/public/assets/{use-settings-route-DHPJ3RaJ.js → use-settings-route-B8Yh1epC.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CH9FS4YO.js → use-skill-origin-CqK8ccXn.js} +1 -1
- package/dist/public/assets/{use-skills-D56xe4F0.js → use-skills-Dg7qNR3F.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DTa27VwS.js → use-terminal-enabled-Cta7JKYN.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-7MYmjURO.js → use-timeline-entry-diff-pwdtUcXH.js} +1 -1
- package/dist/public/assets/{use-workspace-BiK7U2Dp.js → use-workspace-CpEi1UOP.js} +1 -1
- package/dist/public/index.html +48 -48
- package/dist/public/uninstall.html +4 -4
- package/dist/{repair-launch-json-zq4UShgG.mjs → repair-launch-json-B4A9iVBi.mjs} +2 -2
- package/dist/{repair-mcp-configs-Dg9WF_9I.mjs → repair-mcp-configs-D_eDwRH0.mjs} +2 -2
- package/dist/repair-skills-Bhl04NpZ.mjs +1 -0
- package/dist/{repair-skills-DkqRt0jh.mjs → repair-skills-BlANm1-D.mjs} +2 -2
- package/dist/{resolve-project-root-DZ8FUmWA.mjs → resolve-project-root-DVS2LVVT.mjs} +2 -2
- package/dist/schemas/v0/config.project-local.schema.json +1 -1
- package/dist/{server-lock-DE-aYwut.mjs → server-lock-B5HckUAb.mjs} +2 -2
- package/dist/server-lock-i4l0f8uD.mjs +1 -0
- package/dist/{skill-teardown-n1roKgm3.mjs → skill-teardown-DwNb2TRE.mjs} +2 -2
- package/dist/{sleep-DyLEGHvt.mjs → sleep-CKSyI4wt.mjs} +2 -2
- package/dist/{src-Bp6iyVLp.mjs → src-BF2VciaA.mjs} +2 -2
- package/dist/{src-Ct2lVbOu.mjs → src-BjPS9IEY.mjs} +3 -3
- package/dist/src-CuJVvkrO.mjs +1 -0
- package/dist/{src-DeoDqJay.mjs → src-D3A1jD_M.mjs} +6 -6
- package/dist/{src-DHmPa1LN.mjs → src-thqg3x4M.mjs} +1 -1
- package/dist/start-C2sq86ZK.mjs +1 -0
- package/dist/{start-bwJccpae.mjs → start-E8uCq6h7.mjs} +3 -3
- package/package.json +5 -5
- package/dist/constants-CXB_nN4r.mjs +0 -2
- package/dist/fs-traced-DiZ_Z58g.mjs +0 -1
- package/dist/git-handle-CUMkcH0Q.mjs +0 -1
- package/dist/init-QooMxlO-.mjs +0 -1
- package/dist/loader-GUgCYJc6.mjs +0 -1
- package/dist/md-manager-DrTOG_TR.mjs +0 -2
- package/dist/preview-BpsokUu6.mjs +0 -1
- package/dist/public/assets/FeedbackForm-HyVh8UGI.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BPguuakJ.js +0 -1
- package/dist/public/assets/i18n-BZGgf8Qd.js +0 -1
- package/dist/public/assets/messages-2TaFL8Ip.js +0 -1
- package/dist/public/assets/messages-5EoLltUL.js +0 -1
- package/dist/public/assets/messages-BC11FP6A.js +0 -1
- package/dist/public/assets/messages-Bd3nERvw.js +0 -1
- package/dist/public/assets/messages-ByriK8ln.js +0 -1
- package/dist/public/assets/messages-CHhnwg_r.js +0 -1
- package/dist/public/assets/messages-CYykrejt.js +0 -1
- package/dist/public/assets/messages-D0jFOlFs.js +0 -1
- package/dist/public/assets/messages-DLDevhFL.js +0 -1
- package/dist/public/assets/messages-DZU_0bet.js +0 -1
- package/dist/public/assets/messages-SZ8C0t5f.js +0 -1
- package/dist/public/assets/messages-lAaVwcVx.js +0 -1
- package/dist/repair-skills-BArwmDoi.mjs +0 -1
- package/dist/server-lock-Bdq8J23F.mjs +0 -1
- package/dist/src-Bx8EE6Hc.mjs +0 -1
- package/dist/start-aGvsyPiX.mjs +0 -1
|
@@ -170,7 +170,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
170
170
|
`)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
|
|
171
171
|
`,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=cu(su(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=cu(su(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}};function fu(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new ru||null,prettyErrors:t}}function pu(e,t={}){let{lineCounter:n,prettyErrors:r}=fu(t),i=new du(n?.addNewLine),a=new Ul(t),o=null;for(let t of a.compose(i.parse(e),!0,e.length))if(!o)o=t;else if(o.options.logLevel!==`silent`){o.errors.push(new al(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return r&&n&&(o.errors.forEach(sl(e,n)),o.warnings.forEach(sl(e,n))),o}function mu(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let i=pu(e,n);if(!i)return null;if(i.warnings.forEach(e=>Vs(i.options.logLevel,e)),i.errors.length>0){if(i.options.logLevel!==`silent`)throw i.errors[0];i.errors=[]}return i.toJS(Object.assign({reviver:r},n))}var hu=[`off`,`follow`,`full`],gu=`pull`,_u=[`off`,`follow`,`full`,gu],vu=[`follow`,`full`,gu];function yu(e){return e===gu?`follow`:bu(e)?e:null}function bu(e){return typeof e==`string`&&hu.includes(e)}function xu(e){return e===!0?`full`:e===!1?`off`:null}function Su(e){return e===!0?`full`:e===!1?`off`:yu(e)}function Cu(e){let t=yu(e?.mode);return t===null?xu(e?.enabled):t}var wu=3600,Tu=[30,60,300,900,3600];function Eu(e,t){return typeof e!=`number`||!Number.isFinite(e)?t:Math.min(wu,Math.max(30,Math.round(e)))}function Du(e){return{pullIntervalSeconds:Eu(e?.pullIntervalSeconds,30),pushIntervalSeconds:Eu(e?.pushIntervalSeconds,60)}}var Ou={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`},ku=new Set(Object.keys(Ou));function Au(e){return Ou[e.toLowerCase().replace(/^\./,``)]??null}var ju=new Set([`md`,`mdx`,`mmd`,`mermaid`]),Mu=new Set([...ku,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!ju.has(e))),Nu={html:`html`,htm:`html`,svg:`xml`,vue:`html`,svelte:`html`,astro:`html`,lock:`yaml`};function Pu(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:Mu.has(t.slice(n+1).toLowerCase())}var Fu=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],Iu=[`video/mp4`,`video/webm`,`video/ogg`],Lu=[`audio/mpeg`,`audio/wav`,`audio/ogg`],Ru=[`application/pdf`],zu=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Bu=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Vu=new Set([`pdf`]),Hu=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Uu=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(`.`)),Wu=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(`.`)),Gu=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(`.`)),Ku=`wikiembed`,qu=`toast`,Ju=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(`.`)),Yu=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Xu=[`mp4`,`webm`,`mov`,`m4v`],Zu=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Qu=[`pdf`],$u=[`json`,`toml`,`lock`];function ed(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}ed(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,Yu,zu),ed(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Xu,Bu),ed(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Zu,Hu),ed(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Qu,Vu),ed(`FILE_ATTACHMENT_EXTENSIONS`,[...Uu],Ju),ed(`WIKI_EMBED_EXTENSIONS`,[...Ju],Wu);var td=new Set(Yu),nd=new Set(Xu),rd=new Set(Zu),id=new Set(Qu),ad=new Set($u);ed(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...Yu,...Xu,...Zu,...Qu,...$u])],Gu);var od=new Set([`base`,`canvas`]),sd=new Set([`mmd`,`mermaid`]);function cd(e){let t=e.lastIndexOf(`.`);return t<0?!1:sd.has(e.slice(t+1).toLowerCase())}var ld=new Set([`excalidraw`]);function ud(e){let t=e.lastIndexOf(`.`);return t<0?!1:ld.has(e.slice(t+1).toLowerCase())}new Set([...Wu,...od,...sd,...ld]);function dd(e){let t=e.toLowerCase().replace(/^\./,``);return td.has(t)?`image`:nd.has(t)?`video`:rd.has(t)?`audio`:id.has(t)?`pdf`:ad.has(t)||od.has(t)?`text`:sd.has(t)?`mermaid`:ld.has(t)?`excalidraw`:ku.has(t)?`text`:null}var fd=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`,`ko`],pd=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`fr`,`bn`,`pt-BR`,`id`,`ko`],md=new Set([`ar`,`ur`]),hd=fd.filter(e=>!md.has(e)),gd=[`markdownlint`,`frontmatter`,`okf`],_d=[`missing`,`invalid`];function vd(e){return e.frontmatterScope!==void 0}[...gd];var yd=[`off`,`warning`,`error`],bd=`warning`,xd=[`error`,`warning`],Sd=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],Cd={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`},wd=/^#[0-9a-fA-F]{6}$/,Td=/\P{White_Space}/u;function Ed(e){return Td.test(e)}function Dd(e){return typeof e==`string`&&wd.test(e)}function Od(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,"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,...jd(t)}}var kd={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`},Ad=Object.keys(kd);function jd(e){let t={};for(let n of Ad)t[`ansi-${Md(n)}`]=e[kd[n]];return t}function Md(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}function Nd(e){return JSON.stringify(e).replace(/[\u007f-\u009f\u2028\u2029\ufffe\uffff]/g,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function Pd(e){return`${[`system: "base16"`,`name: ${Nd(e.name)}`,...e.author?[`author: ${Nd(e.author)}`]:[],`variant: ${Nd(e.variant)}`,`palette:`,...Sd.map(t=>` ${t}: ${Nd(e.palette[t])}`)].join(`
|
|
172
172
|
`)}\n`}function Fd(e){let t;try{t=mu(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 Sd){let t=i[e]??i[e.toLowerCase()];if(t==null){o.push(e);continue}let n=Id(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`&&!Ed(n.name)||typeof n.author==`string`&&!Ed(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:zd(a),palette:a}}}function Id(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]}`),wd.test(t)?t.toLowerCase():null}function Ld(e,t,n){let r=Dd(e)?e:`#000000`,i=Dd(t)?t:`#000000`,a=Math.min(1,Math.max(0,n)),o=`#`;for(let e=0;e<3;e++){let t=Number.parseInt(r.slice(1+e*2,3+e*2),16),n=Number.parseInt(i.slice(1+e*2,3+e*2),16);o+=Math.round(t+(n-t)*a).toString(16).padStart(2,`0`)}return o}function Rd(e){let t=Dd(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 zd(e){return Rd(e.base00)<Rd(e.base05)?`dark`:`light`}var Bd={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`}},Vd={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`}},Hd={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`}},Ud={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`}},Wd={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`}},Gd={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 Kd(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>Od(n)}}function qd(e,t){return{id:e,label:t,kind:`system`}}var Jd=[qd(`default`,`Default`),Kd(`dracula`,`Dracula`,Bd),Kd(`catppuccin-frappe`,`Catppuccin Frappé`,Vd),Kd(`catppuccin-latte`,`Catppuccin Latte`,Hd),Kd(`monokai`,`Monokai`,Ud),Kd(`gruvbox`,`Gruvbox`,Wd),Kd(`solarized`,`Solarized`,Gd),qd(`custom`,`Custom`)],Yd=Jd.map(e=>e.id),Xd=/^[a-z0-9-]{1,32}$/,Zd=`saved-`,Qd=26,$d=/\p{M}+/gu,ef=/['\u2019\u02bc]+/gu,tf=/[^a-z0-9]+/g;function nf(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 rf(e){let t=e.trim();if(t.length===0)return{ok:!1,code:`empty`};let n=t.normalize(`NFKD`).replace($d,``).toLowerCase().replace(ef,``).replace(tf,`-`).replace(/^-+|-+$/g,``),r=nf(t),i=n.length===0?`theme-${r}`:n.length<=Qd?n:`${n.slice(0,Qd-r.length-1).replace(/-+$/g,``)}-${r}`,a=af(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 af(e){if(e.length===0)return{ok:!1,code:`empty`};let t=Zd+e;return Xd.test(t)?{ok:!0,id:t}:{ok:!1,code:/^[a-z0-9-]+$/.test(t)?`too-long`:`invalid-chars`}}function of(e){if(!Xd.test(e)||!e.startsWith(`saved-`))return{ok:!1};let t=e.slice(6);return t.length===0?{ok:!1}:{ok:!0,stem:t}}var sf=new Map(Jd.map(e=>[e.id,e]));function cf(e){return e&&sf.get(e)||Jd[0]}function lf(e,t=Jd){let n=new Set(t.map(e=>e.id)),r=e?.colorTheme,i=r&&n.has(r)?r:Jd[0].id,a=e=>e===void 0?i:n.has(e)?e:Jd[0].id;return{light:a(e?.colorThemeLight),dark:a(e?.colorThemeDark)}}function uf(e,t){return e===`light`||e===`dark`?e:t?`dark`:`light`}function df(e,t,n){return`${e} {\n color-scheme: ${t};\n${Object.entries(n).map(([e,t])=>` --${e}: ${t};`).join(`
|
|
173
|
-
`)}\n}`}var ff=Symbol.for(`@inkeep/open-knowledge/field-registry`),pf=globalThis;pf[ff]===void 0&&(pf[ff]=Er());var V=pf[ff];function mf(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=hf(t)?V.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function hf(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function gf(){return Object.fromEntries(Sd.map(e=>[e,M().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${Cd[e]}, as a #rrggbb hex string.`}).optional()]))}function _f(){return Yd.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}var vf=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),yf=52428800,bf=26214400,xf=12582912,Sf=`https://api.openai.com/v1`,Cf=`text-embedding-3-small`,wf=Object.freeze([`127.0.0.1`]),Tf=/^[1-9]\d*(s|m|h)$/,Ef=/^https?:\/\//,Df=24550;function Of(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 kf(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&Of(e)?null:`insecure-scheme`}function Af(e){let t=e.trim();return t===``?`./`:t}function jf(e){let t=Af(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}var Mf=L({content:L({dir:M().register(V,{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(V,{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(jf,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:L({theme:R([`light`,`dark`,`system`]).register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),language:R([`system`,...fd]).register(V,{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(V,{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 ${_f()}, 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(Xd,{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(V,{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 ${_f()}, 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(Xd,{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(V,{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(Xd,{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(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:L({name:M().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:M().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:R([`dark`,`light`]).register(V,{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(),...gf()}).optional(),preview:L({autoOpen:P().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:L({showHiddenFiles:P().register(V,{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(V,{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(V,{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(V,{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(V,{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(V,{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(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Global-scope skills pinned to the top of the Skills sidebar, by name. Stored per USER rather than per project, so a pinned global skill follows you into every project.`}).default([])}).optional()}).default({preview:{autoOpen:!0}}),editor:L({wordWrap:P().register(V,{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(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:L({autoApproveOkTools:P().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:L({mode:R(_u).register(V,{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(V,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:R(vu).register(V,{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(wu).register(V,{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(wu).register(V,{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:eo([P(),R(_u)]).register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:L({enabled:P().register(V,{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)}).default({enabled:null}),slides:L({enabled:P().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:L({localSink:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:L({maxBytes:N().register(V,{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(yf)}).default({maxBytes:yf}),logs:L({maxBytes:N().register(V,{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(bf)}).default({maxBytes:bf}),attributeDenylist:F(M()).register(V,{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([...vf])}).default({enabled:!0,spans:{maxBytes:yf},logs:{maxBytes:bf},attributeDenylist:[...vf]}),skillInstallReports:L({enabled:P().register(V,{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:yf},logs:{maxBytes:bf},attributeDenylist:[...vf]},skillInstallReports:{enabled:!0}}),lossCapture:L({enabled:P().register(V,{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(V,{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(xf)}).default({enabled:!0,maxBytes:xf}),bridge:L({backgroundThrottle:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:L({semantic:L({enabled:P().register(V,{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(V,{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(Sf),model:M().register(V,{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(Cf),dimensions:N().int().positive().register(V,{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(V,{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()}).default({enabled:!1,baseUrl:Sf,model:Cf})}).default({semantic:{enabled:!1,baseUrl:Sf,model:Cf}}),contentRules:L({markdownlint:I({enabled:P().register(V,{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(V,{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:eo([M(),F(M())]).optional(),file:M(),enabled:P().optional()})).register(V,{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(V,{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:oo(M(),P()).register(V,{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(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether OK generates and maintains a navigation index.md in every folder that contains Markdown, each listing the documents in that folder grouped by frontmatter type and linking to its subfolders. OK owns these files: edits to them are replaced on the next rebuild.`}).default(!1)}).default({index:!1})}).default({enabled:!1,generate:{index:!1}})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]},okf:{enabled:!1,generate:{index:!1}}}),validation:L({links:R(yd).register(V,{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(bd),fileTreeIndicators:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:bd,fileTreeIndicators:!0}),linkPreviews:L({enabled:P().register(V,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),server:L({port:N().int().min(1).max(65535).register(V,{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(V,{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([...wf]),externalUrl:Ta({protocol:/^https?$/}).regex(Ef).register(V,{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(V,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Exposure consent interlock. Once the unified server boot lands, a non-loopback server.bind or a server.externalUrl without allowExternal: true will be refused at boot with a one-line fix. Default off. Per-machine (project-local) — consent never travels via git, clone, or share; containers consent via the environment instead.`}).default(!1),openBrowser:P().register(V,{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:eo([z(`off`),M().regex(Tf)]).register(V,{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' when every bind address is loopback, 'off' otherwise (an exposed or containerized server stays up). Reloadable — a valid change applies without a restart. Per-machine (project-local) — not shared.`}).optional()}).default({bind:[...wf],allowExternal:!1})}),Nf=`open-knowledge-config`;function Pf(e,t,n){let r=c.getTracer(Nf),i=t?{attributes:t}:{};return r.startActiveSpan(e,i,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:s.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Ff(e,t){let n=c.getActiveSpan();n&&n.addEvent(e,t)}function If(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 Lf(e,t){let n=e;for(let e of t){n=If(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function Rf(e,t){let n=Lf(e,t);if(n!==void 0)return mf(n)}function zf(e,t){return e===`either`?!0:e===t}function Bf(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=Rf(Mf,i);a?.scope!==void 0&&(zf(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 Vf(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&(Qo(e.getIn(r,!0))||e.deleteIn(r))}}function Hf(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)){Vf(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}Vf(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Uf(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}var Wf=I({file:M(),line:N().int().min(1),column:N().int().min(1),snippet:M().optional()}),Gf=I({path:F(eo([M(),N()])),message:M(),issueCode:M(),params:oo(M(),Ja()).optional(),source:Wf.optional()}),Kf=R([`user`,`project`,`project-local`,`either`]),qf=R([`user`,`project`,`project-local`]),Jf=I({code:z(`YAML_PARSE`),detail:M()}),Yf=I({code:z(`UNREADABLE`),detail:M()}),Xf=I({code:z(`SCHEMA_INVALID`),issues:F(Gf)}),Zf=I({code:z(`REMOVED_KEY`),path:F(M()),redirect:M(),source:Wf.optional()}),Qf=no(`code`,[Jf,Xf,Yf,I({code:z(`SCOPE_VIOLATION`),path:F(M()),expectedScope:Kf,actualScope:qf}),I({code:z(`NOT_AGENT_SETTABLE`),path:F(M())}),I({code:z(`MIXED_SCOPE`),paths:F(I({path:F(M()),scope:qf}))}),Zf,I({code:z(`WRITE_ERROR`),detail:M()}),I({code:z(`OKIGNORE_INVALID`),detail:M(),lineNumber:N().int().min(1).optional()}),I({code:z(`UNKNOWN`),message:M().optional()})]);no(`code`,[Zf,Jf,Xf,Yf]),I({diagnostics:F(no(`code`,[I({code:z(`REMOVED_KEY`),scope:qf,file:M(),path:F(M()),redirect:M()}),I({code:z(`YAML_PARSE`),scope:qf,file:M()}),I({code:z(`SCHEMA_INVALID`),scope:qf,file:M()}),I({code:z(`UNREADABLE`),scope:qf,file:M()})]))});var $f=new Set(Qf.options.map(e=>e.shape.code.value)),ep=eo([Qf,L({code:M(),message:M().optional()})]);function tp(e){return $f.has(e.code)}function np(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 rp(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 ip(e){if(!tp(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`UNREADABLE`:return`Could not read the file: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
|
|
173
|
+
`)}\n}`}var ff=Symbol.for(`@inkeep/open-knowledge/field-registry`),pf=globalThis;pf[ff]===void 0&&(pf[ff]=Er());var V=pf[ff];function mf(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=hf(t)?V.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function hf(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function gf(){return Object.fromEntries(Sd.map(e=>[e,M().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${Cd[e]}, as a #rrggbb hex string.`}).optional()]))}function _f(){return Yd.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}var vf=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),yf=52428800,bf=26214400,xf=12582912,Sf=`https://api.openai.com/v1`,Cf=`text-embedding-3-small`,wf=Object.freeze([`127.0.0.1`]),Tf=/^[1-9]\d*(s|m|h)$/,Ef=/^https?:\/\//,Df=24550;function Of(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 kf(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&Of(e)?null:`insecure-scheme`}function Af(e){let t=e.trim();return t===``?`./`:t}function jf(e){let t=Af(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}var Mf=L({content:L({dir:M().register(V,{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(V,{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(jf,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:L({theme:R([`light`,`dark`,`system`]).register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),language:R([`system`,...fd]).register(V,{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(V,{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 ${_f()}, 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(Xd,{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(V,{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 ${_f()}, 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(Xd,{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(V,{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(Xd,{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(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:L({name:M().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:M().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:R([`dark`,`light`]).register(V,{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(),...gf()}).optional(),preview:L({autoOpen:P().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:L({showHiddenFiles:P().register(V,{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(V,{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(V,{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(V,{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(V,{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(V,{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(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Global-scope skills pinned to the top of the Skills sidebar, by name. Stored per USER rather than per project, so a pinned global skill follows you into every project.`}).default([])}).optional()}).default({preview:{autoOpen:!0}}),editor:L({wordWrap:P().register(V,{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(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:L({autoApproveOkTools:P().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:L({mode:R(_u).register(V,{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(V,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:R(vu).register(V,{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(wu).register(V,{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(wu).register(V,{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:eo([P(),R(_u)]).register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:L({enabled:P().register(V,{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)}).default({enabled:null}),slides:L({enabled:P().register(V,{scope:`user`,agentSettable:!1,reload:`live`,defaultScope:`user`,description:"Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:L({localSink:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:L({maxBytes:N().register(V,{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(yf)}).default({maxBytes:yf}),logs:L({maxBytes:N().register(V,{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(bf)}).default({maxBytes:bf}),attributeDenylist:F(M()).register(V,{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([...vf])}).default({enabled:!0,spans:{maxBytes:yf},logs:{maxBytes:bf},attributeDenylist:[...vf]}),skillInstallReports:L({enabled:P().register(V,{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:yf},logs:{maxBytes:bf},attributeDenylist:[...vf]},skillInstallReports:{enabled:!0}}),lossCapture:L({enabled:P().register(V,{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(V,{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(xf)}).default({enabled:!0,maxBytes:xf}),bridge:L({backgroundThrottle:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:L({enabled:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:L({semantic:L({enabled:P().register(V,{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(V,{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(Sf),model:M().register(V,{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(Cf),dimensions:N().int().positive().register(V,{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(V,{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()}).default({enabled:!1,baseUrl:Sf,model:Cf})}).default({semantic:{enabled:!1,baseUrl:Sf,model:Cf}}),contentRules:L({markdownlint:I({enabled:P().register(V,{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(V,{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:eo([M(),F(M())]).optional(),file:M(),enabled:P().optional()})).register(V,{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(V,{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:oo(M(),P()).register(V,{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(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether OK generates and maintains a navigation index.md in every folder that contains Markdown, each listing the documents in that folder grouped by frontmatter type and linking to its subfolders. OK owns these files: edits to them are replaced on the next rebuild.`}).default(!1)}).default({index:!1})}).default({enabled:!1,generate:{index:!1}})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]},okf:{enabled:!1,generate:{index:!1}}}),validation:L({links:R(yd).register(V,{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(bd),fileTreeIndicators:P().register(V,{scope:`project`,agentSettable:!1,reload:`live`,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:bd,fileTreeIndicators:!0}),linkPreviews:L({enabled:P().register(V,{scope:`project-local`,agentSettable:!1,reload:`live`,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),server:L({port:N().int().min(1).max(65535).register(V,{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(V,{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([...wf]),externalUrl:Ta({protocol:/^https?$/}).regex(Ef).register(V,{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(V,{scope:`project-local`,agentSettable:!1,reload:`boot`,defaultScope:`project-local`,description:`Exposure consent interlock. Once the unified server boot lands, a non-loopback server.bind or a server.externalUrl without allowExternal: true will be refused at boot with a one-line fix. Default off. Per-machine (project-local) — consent never travels via git, clone, or share; containers consent via the environment instead.`}).default(!1),openBrowser:P().register(V,{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:eo([z(`off`),M().regex(Tf)]).register(V,{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:[...wf],allowExternal:!1})}),Nf=`open-knowledge-config`;function Pf(e,t,n){let r=c.getTracer(Nf),i=t?{attributes:t}:{};return r.startActiveSpan(e,i,e=>{try{return n(e)}catch(t){throw e.recordException(t),e.setStatus({code:s.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Ff(e,t){let n=c.getActiveSpan();n&&n.addEvent(e,t)}function If(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 Lf(e,t){let n=e;for(let e of t){n=If(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function Rf(e,t){let n=Lf(e,t);if(n!==void 0)return mf(n)}function zf(e,t){return e===`either`?!0:e===t}function Bf(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=Rf(Mf,i);a?.scope!==void 0&&(zf(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 Vf(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&(Qo(e.getIn(r,!0))||e.deleteIn(r))}}function Hf(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)){Vf(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}Vf(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Uf(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}var Wf=I({file:M(),line:N().int().min(1),column:N().int().min(1),snippet:M().optional()}),Gf=I({path:F(eo([M(),N()])),message:M(),issueCode:M(),params:oo(M(),Ja()).optional(),source:Wf.optional()}),Kf=R([`user`,`project`,`project-local`,`either`]),qf=R([`user`,`project`,`project-local`]),Jf=I({code:z(`YAML_PARSE`),detail:M()}),Yf=I({code:z(`UNREADABLE`),detail:M()}),Xf=I({code:z(`SCHEMA_INVALID`),issues:F(Gf)}),Zf=I({code:z(`REMOVED_KEY`),path:F(M()),redirect:M(),source:Wf.optional()}),Qf=no(`code`,[Jf,Xf,Yf,I({code:z(`SCOPE_VIOLATION`),path:F(M()),expectedScope:Kf,actualScope:qf}),I({code:z(`NOT_AGENT_SETTABLE`),path:F(M())}),I({code:z(`MIXED_SCOPE`),paths:F(I({path:F(M()),scope:qf}))}),Zf,I({code:z(`WRITE_ERROR`),detail:M()}),I({code:z(`OKIGNORE_INVALID`),detail:M(),lineNumber:N().int().min(1).optional()}),I({code:z(`UNKNOWN`),message:M().optional()})]);no(`code`,[Zf,Jf,Xf,Yf]),I({diagnostics:F(no(`code`,[I({code:z(`REMOVED_KEY`),scope:qf,file:M(),path:F(M()),redirect:M()}),I({code:z(`YAML_PARSE`),scope:qf,file:M()}),I({code:z(`SCHEMA_INVALID`),scope:qf,file:M()}),I({code:z(`UNREADABLE`),scope:qf,file:M()})]))});var $f=new Set(Qf.options.map(e=>e.shape.code.value)),ep=eo([Qf,L({code:M(),message:M().optional()})]);function tp(e){return $f.has(e.code)}function np(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 rp(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 ip(e){if(!tp(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`UNREADABLE`:return`Could not read the file: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
|
|
174
174
|
`))n.push(` ${e}`)}else n.push(` ${r}: ${t.message}`)}}return n.join(`
|
|
175
175
|
`)}case`SCOPE_VIOLATION`:return[`Setting ${e.path.join(`.`)} belongs in your ${e.expectedScope} config`,`(${np(e.expectedScope)} — ${rp(e.expectedScope)}),`,`but it was set in the ${e.actualScope} config (${np(e.actualScope)}).`,`Move it to ${np(e.expectedScope)}.`].join(` `);case`NOT_AGENT_SETTABLE`:return[`Setting ${e.path.join(`.`)} is human-only and can't be changed by an agent.`,`Change it in the Settings pane, or edit the config.yml by hand.`].join(` `);case`MIXED_SCOPE`:return[`This change touches settings that live in different config files. Apply them one file at a time:`,e.paths.map(({path:e,scope:t})=>` ${e.join(`.`)} → ${np(t)} (${t})`).join(`
|
|
176
176
|
`)].join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{yo as e}from"./dist-
|
|
1
|
+
import{yo as e}from"./dist-7pFMKYKc.js";function t(t){return e.includes(t)}function n(e){if(e.startsWith(b)||e.startsWith(w)||e.startsWith(T)||e.startsWith(D)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=x(t),r=n>=0?t.slice(0,n):t;if(!r)return null;try{return r.split(`/`).map(decodeURIComponent).join(`/`)}catch{return r}}function r(e){if(e.startsWith(b)||!e.startsWith(`#/`))return null;let t=e.slice(2),n=t.indexOf(`#`);if(n<0)return null;let r=t.slice(n+1);if(!r)return null;try{return decodeURIComponent(r)}catch{return r}}var i=/[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g;function a(e){return encodeURIComponent(e.replace(i,`�`))}function o(e){return e.split(`/`).map(a).join(`/`)}function s(e,t){let n=`#/${o(e)}`;return t?`${n}#${a(t)}`:n}function c(e,t){return e===t||l(e)===l(t)}function l(e){try{return decodeURIComponent(e)}catch{return e}}var u=`__okHashHistoryEntry`;function d(e){return{...typeof e==`object`&&e?e:{},[u]:!0}}function f(e){return typeof e==`object`&&!!e&&e[u]===!0}function p(){f(window.history.state)||window.history.replaceState(d(window.history.state),``)}function m(e){let{pathname:t,search:n}=window.location;window.history.replaceState(d(window.history.state),``,`${t}${n}${e}`)}function h(e){if(c(window.location.hash,e))return;let{pathname:t,search:n}=window.location;window.history.pushState(d(window.history.state),``,`${t}${n}${e}`)}function g(e){return e.endsWith(`.mdx`)?e.slice(0,-4):e.endsWith(`.md`)?e.slice(0,-3):e}function _(e,t){let n=e.replace(/^\/+|\/+$/g,``),r=n?`#/${o(n)}/`:`#/`;return t?`${r}#${a(t)}`:r}function v(e,t,n){if(e===`folder`)return _(t);let r=`#/${a(t)}`;return n==null||n===``?r:`${r}?branch=${a(n)}`}function y(e){if(e===`#/`)return!0;if(!e.startsWith(`#/`))return!1;let t=e.slice(2);return t.length>0&&t[0]===`?`}var b=`#/__asset__/`;function x(e){let t=e.indexOf(`?`),n=e.indexOf(`#`);return t<0?n:n<0?t:Math.min(t,n)}function S(e){if(!e.startsWith(b))return null;let t=e.slice(12);if(!t)return null;try{return t.split(`/`).map(decodeURIComponent).join(`/`)}catch{return t}}function C(e){return`${b}${o(e)}`}var w=`#/__skill-file__/`,T=`#/__skills__`;function E(e){return e===T||e.startsWith(`${T}/`)}var D=`#/__skill-preview__/`,O=[`explore`,`detected`,`builtin`,`foreign`,`linked`];function k(e){return e!==void 0&&O.includes(e)}var A=`project`;function j(e){return[e.flavor,e.source,e.name,e.subtitle,e.level??A].map(a).join(`/`)}function M(e){if(!e)return null;let n;try{n=e.split(`/`).map(decodeURIComponent)}catch{return null}if(n.length<4||n.length>6)return null;let[r,i,a,o,s,c]=n;return!k(r)||!i||!a?null:{flavor:r,source:i,name:a,subtitle:o??``,...s&&t(s)?{level:s}:{},...c?{path:c}:{}}}function N(e){let t=j(e);return e.path&&(t+=`/${a(e.path)}`),`${D}${t}`}function P(e){return e.startsWith(D)?M(e.slice(20)):null}var F=`:`;function I(e){let t=e.host===void 0?e.name:`${e.name}${F}${e.host}`;return`${w}${[e.scope,t].map(a).join(`/`)}/${o(e.path)}`}function L(e){if(!e.startsWith(w))return null;let n=e.slice(17);if(!n)return null;let r;try{r=n.split(`/`).map(decodeURIComponent)}catch{return null}if(r.length<3)return null;let[i,a,...o]=r,s=o.join(`/`);if(!i||!a||!s||!t(i))return null;let c=a.indexOf(F),l=c===-1?a:a.slice(0,c),u=c===-1?void 0:a.slice(c+1);return l?{scope:i,name:l,path:s,...u?{host:u}:{}}:null}var R=/\.(md|mdx)$/i;function z(e){return e.trim().replace(/^\.\/+/,``).replace(/^\/+/,``)}function B(e){return z(e).replace(R,``)}function V(e){let t=z(e);return t?R.test(t)?t:`${t}.md`:`untitled.md`}function H(e){let t=B(e),n=t.lastIndexOf(`/`);return{initialDir:n>0?t.slice(0,n):``,suggestedName:`${n>=0?t.slice(n+1):t||`untitled`}.md`}}export{P as C,L as S,f as _,S as a,h as b,v as c,C as d,s as f,y as g,N as h,r as i,j as l,I as m,V as n,M as o,_ as p,B as r,n as s,H as t,g as u,c as v,E as w,m as x,p as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e}from"./dist-
|
|
1
|
+
import{A as e}from"./dist-7pFMKYKc.js";var t=`open-knowledge:documents-changed`,n=new Set(e.options);function r(e){return e===void 0||!Array.isArray(e)?[`files`]:[...new Set(e.filter(e=>n.has(e)))]}function i(e=[`files`]){window.dispatchEvent(new CustomEvent(t,{detail:{channels:r(e)}}))}function a(e){let n=t=>{e(r(t instanceof CustomEvent?t.detail?.channels:void 0))};return window.addEventListener(t,n),()=>window.removeEventListener(t,n)}function o(e){return e.includes(`local-targets`)||e.includes(`files`)}var s=`open-knowledge:doc-persisted`;function c(e){window.dispatchEvent(new CustomEvent(s,{detail:{docName:e}}))}function l(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail?.docName;typeof n==`string`&&n.length>0&&e(n)};return window.addEventListener(s,t),()=>window.removeEventListener(s,t)}var u=`open-knowledge:branch-changed`;function d(e){window.dispatchEvent(new CustomEvent(u,{detail:{branch:e}}))}function f(e){let t=t=>{if(!(t instanceof CustomEvent))return;let n=t.detail;e(n?.branch??null)};return window.addEventListener(u,t),()=>window.removeEventListener(u,t)}var p=`open-knowledge:templates-changed`;function m(){window.dispatchEvent(new CustomEvent(p))}function h(e){let t=()=>e();return window.addEventListener(p,t),()=>window.removeEventListener(p,t)}var g=`open-knowledge:skills-changed`;function _(){window.dispatchEvent(new CustomEvent(g))}function v(e){let t=()=>e();return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}var y=`open-knowledge:skill-scope-moved`;function b(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}var S=new Set,C=(e,t)=>`${e}\u0000${t}`;function w(e,t){S.add(C(e,t)),_()}function T(e,t){S.delete(C(e,t))&&_()}var E=new Map;function D(e,t){let n=C(e,t);E.set(n,(E.get(n)??0)+1),_()}function O(e,t){let n=C(e,t),r=E.get(n);r!==void 0&&(r<=1?E.delete(n):E.set(n,r-1),_())}function k(e,t){return E.has(C(e,t))}function A(){return[...E.keys()].sort().join(``)}function j(e,t){return S.has(C(e,t))}function M(e){return S.size===0?e:e.filter(e=>!S.has(C(e.scope,e.name)))}export{l as _,c as a,v as b,_ as c,O as d,o as f,f as g,A as h,d as i,m as l,k as m,w as n,i as o,j as p,D as r,b as s,M as t,T as u,a as v,h as x,x as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ds as e,Ns as t,Os as n,js as r}from"./dist-
|
|
1
|
+
import{Ds as e,Ns as t,Os as n,js as r}from"./dist-7pFMKYKc.js";import{d as i,f as a,p as o}from"./doc-paths-AnuejHgE.js";import{c as s}from"./page-list-cache-uXT-06Rv.js";import{c,l,s as u}from"./file-tree-utils-AlbsUKjT.js";import{t as d}from"./file-tree-rename-validation-B5TvPsC_.js";var f=`application/x-open-knowledge-sidebar-item+json`,p={image:!0,video:!0,audio:!0,pdf:!0,text:!0,mermaid:!0,excalidraw:!0};function m(e){return JSON.stringify(e)}function h(e){return e?Array.from(e.types).includes(f):!1}function ee(e){return e.kind===`folder`?{target:{kind:`folder`,target:e.folderPath,folderPath:e.folderPath},hash:o(e.folderPath)}:e.kind===`asset`?{target:{kind:`asset`,target:e.assetPath,assetPath:e.assetPath,mediaKind:e.mediaKind},hash:i(e.assetPath)}:{target:s(e.docName,e.size)??{kind:`doc`,target:e.docName,docName:e.docName},hash:a(e.docName)}}function g(e){if(!e||!h(e))return null;let t=e.getData(f);if(!t)return null;let n;try{n=JSON.parse(t)}catch{return null}if(!_(n)||n.v!==1||typeof n.kind!=`string`)return null;if(n.kind===`doc`){if(typeof n.docName!=`string`||n.docName.length===0)return null;let e=n.size;return e!==null&&typeof e!=`number`?null:{v:1,kind:`doc`,docName:n.docName,size:e}}if(n.kind===`folder`)return typeof n.folderPath==`string`?{v:1,kind:`folder`,folderPath:n.folderPath}:null;if(n.kind===`asset`){if(typeof n.assetPath!=`string`||n.assetPath.length===0)return null;let e=n.mediaKind;return e!==null&&!v(e)?null:{v:1,kind:`asset`,assetPath:n.assetPath,mediaKind:e}}return null}function _(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function v(e){return typeof e==`string`&&Object.hasOwn(p,e)}var y=`.md`,b=/\.(md|mdx)$/i;function x(t,i=y){return b.test(t)||r(t)||n(t)||e(t)?t:`${t}${i}`}function S(e){return $(e).replace(b,``)}function C(e,t){let n=$(e),r=k(t),i=t.find(e=>c(e)&&A(e,r)===n)??t.find(e=>c(e)&&T(e)===n);if(i)return i.docName;let a=S(n);return t.find(e=>{let t=T(e);return t!==n&&b.test(t)&&S(t)===a})&&b.test(n)?n:a}function w(e,t){let n=k(t);return t.find(t=>A(t,n)===e)??t.find(t=>T(t)===e)}function T(e){return l(e)?O(e.path):u(e)?e.path:x(e.docName,e.docExt)}function E(e){let t=$(e).match(b);return t?`.${t[1].toLowerCase()}`:void 0}function D(e){return $(e)}function O(e){let t=$(e.trim());return t?`${t}/`:``}function te(e){return e.endsWith(`/`)?D(e):S(e)}function k(e){let t=new Map;for(let n of e){if(!c(n))continue;let e=n.docName.match(b);if(!e)continue;let r=n.docName.slice(0,-e[0].length),i=t.get(r);i?i.add(e[0]):t.set(r,new Set([e[0]]))}return t}function A(e,t){let n=T(e);if(!c(e))return n;let r=e.docName.match(b);if(!r)return n;let i=e.docName.slice(0,-r[0].length);return(t.get(i)?.size??0)>1?n:`${e.docName}${e.docExt??y}`}function j(e){let t=k(e),n=new Set,r=[];for(let i of e){let e=A(i,t);n.has(e)||(n.add(e),r.push(e))}return r}function M(e){return[...e].sort().join(`\0`)}function N(e){return M(j(e))}function P(e,t={}){let n=new Set;for(let r of e){let e=(l(r)||u(r)?r.path:r.docName).split(`/`).filter(Boolean);if(!t.includeOkFolders&&e.includes(`.ok`))continue;if(l(r)){let e=O(r.path);e&&n.add(e)}let i=l(r)?e.length:e.length-1;for(let t=1;t<=i;t++)n.add(`${e.slice(0,t).join(`/`)}/`)}return[...n].sort()}function F(e){if(!e)return[];let t=$(e.replace(b,``)).split(`/`).filter(Boolean),n=[],r=e.endsWith(`/`)?t.length:t.length-1;for(let e=1;e<=r;e++)n.push(`${t.slice(0,e).join(`/`)}/`);return n}function I(e,t,n){let r=E(e);if(r)return r;let i=n.find(e=>c(e)&&e.docName===t);return i?i.docExt??y:Q(e).includes(`.`)?void 0:y}function L(e,t){let n=e.lastIndexOf(`/`),r=n===-1?``:e.slice(0,n+1),i=n===-1?e:e.slice(n+1),a=t.filter(e=>{if(!u(e)||!e.path.startsWith(r))return!1;let t=e.path.slice(r.length);return!t.includes(`/`)&&t.startsWith(`${i}.`)});return a.length===1?a[0].path:null}function R(e,t,n){if(E(e))return null;let r=n.find(e=>u(e)&&e.path===t);return r?r.path:Q(e).includes(`.`)?t:L(t,n)}function z(e,t){let n=e.kind===`directory`,r=n?D(e.path):C(e.path,t);if(n)return{kind:`folder`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!0)};let i=R(e.path,r,t);if(i)return{kind:`asset`,name:$(Q(i)),path:i,treePath:i};let a=I(e.path,r,t);return{kind:`file`,name:$(Q(e.path)).replace(b,``),path:r,treePath:V(e.path,!1),docExt:a}}function B(e){return e.kind===`directory`?D(e.path):e.path}function V(e,t){return t?O(e):b.test(e)?e:`${e}${y}`}function H(e,t,n){let r=O(t),i=new Set(n);for(let t=0;t<100;t++){let n=t===0?``:` ${t+1}`;if(e===`file`){let e=`${r}Untitled${n}${y}`;if(!i.has(e))return{addPath:e,renamePath:e};continue}let a=`${r}New Folder${n}/`;if(!i.has(a))return{addPath:a,renamePath:a}}throw Error(`Could not allocate a unique tree placeholder`)}function U(e,t){return e===`file`?V(t,!1):`${D(t)}/index${y}`}function W(e,t){return t.kind===`root`||t.directoryPath==null?Q(e):`${t.directoryPath}${Q(e)}`}function G(e,t){if(t)return D(O(e));let n=S(e),r=n.lastIndexOf(`/`);return r===-1?``:n.slice(0,r)}function K(e,t){let n=D(O(e));return n?`${n}/${t}`:t}function q(e,t,n){e.append(`parentDocName`,K(t,n)),e.append(`placement`,`parent-dir`)}function J(e,t){return(t.path??K(e,t.src)).replace(/^\/+/,``)}function Y(e){let t=e.dataTransfer?.types;if(!t)return!1;let n=Array.from(t);return n.includes(`Files`)&&!n.includes(`application/x-open-knowledge-sidebar-item+json`)}function X(e){return Array.from(e.dataTransfer?.files??[]).filter(e=>e.name.length>0||e.size>0)}function Z(e,n){let r=d(e).toLowerCase();if(r===``)return null;let i=new Date().toISOString();if(r===`.md`||r===`.mdx`)return{kind:`document`,docName:S(e),docExt:r,modified:i,size:n.size};let a=r.startsWith(`.`)?r.slice(1):r;return{kind:`asset`,path:e,assetExt:a,mediaKind:t(a),modified:i,size:n.size}}function Q(e){let t=$(e),n=t.lastIndexOf(`/`),r=n===-1?t:t.slice(n+1);return e.endsWith(`/`)?`${r}/`:r}function $(e){return e.endsWith(`/`)?e.slice(0,-1):e}export{g as A,z as C,f as D,J as E,h as O,C as S,te as T,G as _,U as a,D as b,j as c,T as d,X as f,V as g,Y as h,W as i,m as j,ee as k,N as l,O as m,P as n,H as o,w as p,F as r,x as s,q as t,Z as u,B as v,M as w,S as x,L as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$r as e,No as t,qr as n}from"./dist-
|
|
1
|
+
import{$r as e,No as t,qr as n}from"./dist-7pFMKYKc.js";function r(e){return e.kind===`asset`}function i(e){return e.kind===`document`}function a(e){return e.kind===`folder`}function o(e){let t=[],n=0;for(let r of e)switch(r.kind){case`document`:if(r.docName===void 0){n+=1;break}t.push({kind:`document`,docName:r.docName,docExt:r.docExt,size:r.size,modified:r.modified,isSymlink:r.isSymlink,canonicalDocName:r.canonicalDocName,targetPath:r.targetPath});break;case`asset`:if(r.path===void 0||r.assetExt===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt,mediaKind:r.mediaKind??null,size:r.size,modified:r.modified,referencedBy:r.referencedBy});break;case`file`:if(r.path===void 0){n+=1;break}t.push({kind:`asset`,path:r.path,assetExt:r.assetExt??s(r.path),mediaKind:null,size:r.size,modified:r.modified,referencedBy:[]});break;case`folder`:if(r.path===void 0){n+=1;break}t.push({kind:`folder`,path:r.path,size:r.size,modified:r.modified,hasChildren:r.hasChildren,isSymlink:r.isSymlink,targetPath:r.targetPath});break;default:r.kind;break}return n>0&&console.warn(`[file-tree-utils] dropped ${n} listing entries missing variant identity fields`),t}function s(e){let t=e.includes(`/`)?e.split(`/`).pop()??e:e,n=t.lastIndexOf(`.`);return n>0&&n<t.length-1?t.slice(n+1).toLowerCase():t.startsWith(`.`)&&t.length>1?t.slice(1).toLowerCase():`file`}function c(e){if(!e)return[];let t=e.split(`/`).filter(Boolean),n=[];for(let e=1;e<t.length;e++)n.push(t.slice(0,e).join(`/`));return n}function l(e){if(!e)return``;let t=e.lastIndexOf(`/`);return t>0?e.slice(0,t):``}function u(e){return e.split(`/`).some(e=>e.toLowerCase()===`.ok`)}function d(e,t){return t&&e!==`document`&&e!==`folder`}function f(e,t){return!t&&n(e)}function p(t,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1,showOkFolders:o=!1}=r;return t.filter(t=>{let r=t.docName??t.path??``;if(r===``||d(t.kind,a))return!1;let s=r.split(`/`),c=s.indexOf(`.ok`);if(c!==-1){if(!o)return!1;let e=s.slice(0,c).join(`/`);return i||e===``||!n(e)}return e(r)?!1:!f(r,i)})}function m(n,r={}){let{showHiddenFiles:i=!1,showOnlyMarkdownFiles:a=!1}=r,o=n.docName??n.path??``;return o===``||t(o)||e(o)||u(o)?{hiddenFiles:!1,onlyMarkdownFiles:!1}:{hiddenFiles:f(o,i),onlyMarkdownFiles:d(n.kind,a)}}function h(e){let{visibility:t={},unfilteredRootEntryCount:n,knownPageCount:r}=e;return(n>0||r>0)&&(t.showOnlyMarkdownFiles??!1)?`filtered-to-zero`:`true-empty`}export{p as a,i as c,o as d,l as i,a as l,h as n,u as o,c as r,r as s,m as t,s as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./documents-events
|
|
1
|
+
import{l as e}from"./documents-events-CQFs1txA.js";import{t}from"./parse-api-error-Dd8VI2eu.js";import{t as n}from"./createLucideIcon-BulbvLvN.js";var r=n(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]);async function i(e){return t(await e.json().catch(()=>null))??`HTTP ${e.status}`}async function a(e,t){try{let n=await fetch(`/api/folder-config`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify({path:e,frontmatter:t})});return n.ok?{ok:!0}:{ok:!1,error:await i(n)}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function o(t){try{let n=await fetch(`/api/template`,{method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function s(t,n){try{let r=`?folder=${encodeURIComponent(t)}&name=${encodeURIComponent(n)}`,a=await fetch(`/api/template${r}`,{method:`DELETE`});if(!a.ok)return{ok:!1,error:await i(a)};let o=await a.json().catch(()=>null);return e(),{ok:!0,existed:o?.existed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function c(t){try{let n=await fetch(`/api/template`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,committed:r?.committed??!1}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}async function l(t){try{let n=await fetch(`/api/template/import`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(!n.ok)return{ok:!1,error:await i(n)};let r=await n.json().catch(()=>null);return e(),{ok:!0,path:r?.path??``,created:r?.created??!1,warnings:r?.warnings??[]}}catch(e){return{ok:!1,error:e instanceof Error?e.message:String(e)}}}export{o as a,a as i,l as n,r as o,c as r,s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dist-7pFMKYKc.js";import{t as e}from"./dist-Cr4-nBVI.js";import{t}from"./messages-B2mYVhA4.js";e.load(`en`,t.messages),e.activate(`en`);
|