@inkeep/open-knowledge 0.84.0-beta.14 → 0.84.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -6
- package/dist/constants-Dx_xivnl.mjs +1 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +1 -1
- package/dist/init-D6udPHxT.mjs +1 -0
- package/dist/{init-PjjvTgrO.mjs → init-D7xJ2Da1.mjs} +2 -2
- package/dist/{launch-json-removal-DlVzHl6B.mjs → launch-json-removal-yITANHVv.mjs} +1 -1
- package/dist/{loader-BQS4fl0m.mjs → loader-DEsJ6cbi.mjs} +1 -1
- package/dist/loader-cbffIJh0.mjs +1 -0
- package/dist/{preview-3gk2i1xX.mjs → preview-BpNAQwx1.mjs} +1 -1
- package/dist/preview-CWFiSHpN.mjs +1 -0
- package/dist/public/assets/AboutSection-D_23z-dF.js +1 -0
- package/dist/public/assets/{AccountSection-CcrCMfiM.js → AccountSection-CX8JFSjG.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-Dxzg-NgH.js → ActivityModeContent-BEykNw6x.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-BUhk-vu0.js → AddPropertiesButton-QwmSbaJ_.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-B_LwSP7B.js → AgentDiffPane-CW6t8oHQ.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-BJiZQ2MV.js → AttachmentsSection-DJe75llC.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-DkRMFYIK.js → CodeMirrorPropInput-Bw2exRGi.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-D4g32j4R.js → ContentRulesSection-DjXLncHK.js} +1 -1
- package/dist/public/assets/{DocumentContext-BZi2BNlk.js → DocumentContext-DxFlTFCf.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-CCHArnnt.js → EditorModeToggle-BqdUrhSe.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-ffnyxme7.js → ExcalidrawDocEditor-B_6khl7R.js} +1 -1
- package/dist/public/assets/FeedbackForm-Ba24EUkr.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-D_5FqPZM.js → ImportSkillDialog-DXmAbBD6.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-rwx7LdIg.js → LinkPreviewsSection-KiL4sajy.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DaoCksvr.js → LintConfigEditor-C245enSy.js} +1 -1
- package/dist/public/assets/{LintingSection-D5I7tYlt.js → LintingSection-Fz0wphRq.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-CUpup7ho.js → ManagedArtifactProperties-8EMT2aWH.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CZRptWJk.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-B3KYptUs.js → MermaidDocEditor-CEpP16q2.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-LjctJODc.js → NetworkAccessSection-DFuCKJ8K.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-7RWIVmXg.js → ProjectTemplatesSection-B-AUPC6m.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-CrzwKvEA.js → PropertyDisplayRow-BrzUitO1.js} +2 -2
- package/dist/public/assets/{PublishToGitHubDialog-DYdMkEyQ.js → PublishToGitHubDialog-UZDC6_Vr.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DIGJxK72.js → SchemaConfigEditor-CcJ5M-75.js} +1 -1
- package/dist/public/assets/{SearchSection-BS4FOrKH.js → SearchSection-64mL6tsL.js} +1 -1
- package/dist/public/assets/{SessionsHost-BtjoWr0r.js → SessionsHost-MdX8mKaO.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-C2zy-q5H.js +2 -0
- package/dist/public/assets/{ShareReceiveMissDialog-DUrgcHzv.js → ShareReceiveMissDialog-DXX82j6K.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-Cvg-HsNg.js → SkillToolbarControls-D7q-4E-v.js} +1 -1
- package/dist/public/assets/{SlidesPluginSection-DuBoITZp.js → SlidesPluginSection-Dc5MqsXL.js} +1 -1
- package/dist/public/assets/{SourceEditor-D9DNsiLu.js → SourceEditor-CGMTOKej.js} +1 -1
- package/dist/public/assets/{SpellingSettings-BpZv35LE.js → SpellingSettings-DUJM89JE.js} +1 -1
- package/dist/public/assets/{SyncSection-CrxvCruv.js → SyncSection-CXjvKELx.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-BDB1rnZs.js → SyncStatusBadge-C0M3Vh9t.js} +1 -1
- package/dist/public/assets/{TerminalSection-D8ayxcw-.js → TerminalSection-CxpJhGiA.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-5w8Pgr5J.js → TerminalWindowApp-Ds3qDmZM.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CJVX7Iiq.js → TextDocEditor-D4uIqVnA.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-Dj2GGGoa.js → ThemePluginSection-CizNpiAG.js} +1 -1
- package/dist/public/assets/{ThreadView-B8B9FyFL.js → ThreadView-CJtpu--q.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-Dap3gK1f.js → TimelineDiffPane-q1KqK6Y3.js} +1 -1
- package/dist/public/assets/{comment-chips-BuYSFClb.js → comment-chips-BGf8nvaY.js} +1 -1
- package/dist/public/assets/{config-provider-CyBtB5MG.js → config-provider-MlOyOUAX.js} +1 -1
- package/dist/public/assets/config-schema-DSj91SAu.js +1 -0
- package/dist/public/assets/{doc-undo-manager-SYl0ECng.js → doc-undo-manager-Cqbr9JQk.js} +1 -1
- package/dist/public/assets/{field-controls-BBWVj3AF.js → field-controls-BLwJrin4.js} +1 -1
- package/dist/public/assets/field-controls-BxZbpvVJ.js +1 -0
- package/dist/public/assets/index-C2sVwj67.js +2205 -0
- package/dist/public/assets/{lint-config-client-CB91vevq.js → lint-config-client-DhP_RDHH.js} +1 -1
- package/dist/public/assets/{lint-plugins-CvfQPI2r.js → lint-plugins-DSBUViTP.js} +1 -1
- package/dist/public/assets/{markdown-lint-ZeKFkjFe.js → markdown-lint-BmjyI9ZU.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-BbmlUEor.js → markdownlint-rule-browser-BADH1Lka.js} +1 -1
- package/dist/public/assets/messages-BT33WTY4.js +1 -0
- package/dist/public/assets/messages-B_gBh8es.js +1 -0
- package/dist/public/assets/messages-BkJsr6GH.js +1 -0
- package/dist/public/assets/messages-CUhRQF6Z.js +1 -0
- package/dist/public/assets/messages-CfM_V0is.js +1 -0
- package/dist/public/assets/messages-Cilh2EEK.js +1 -0
- package/dist/public/assets/messages-CoC6kH02.js +1 -0
- package/dist/public/assets/messages-D8jal7DN.js +1 -0
- package/dist/public/assets/messages-DHbSVEtI.js +1 -0
- package/dist/public/assets/messages-DlgKcLpa.js +1 -0
- package/dist/public/assets/messages-Dot6gpGm.js +1 -0
- package/dist/public/assets/messages-Dy_NuDHm.js +1 -0
- package/dist/public/assets/messages-Zy-8a3Uz.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-BRYTI4O-.js → pending-receive-nav-store-DBlCLQls.js} +1 -1
- package/dist/public/assets/{progress-CTEVJNXO.js → progress-CRDr9er-.js} +1 -1
- package/dist/public/assets/{saved-themes-client-DQK5ylqX.js → saved-themes-client-CSjCi4YD.js} +1 -1
- package/dist/public/assets/{schema-section-BdTNVIyL.js → schema-section-H3icVnyE.js} +1 -1
- package/dist/public/assets/{selection-context-D9wsGgDp.js → selection-context-DioyxMXd.js} +1 -1
- package/dist/public/assets/{src-DOSqBXQd.js → src-CuvAhAc9.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DYOSyLF7.js → telemetry-impl-IKiAVHH4.js} +2 -2
- package/dist/public/assets/{telemetry-startup-CjpELDqd.js → telemetry-startup-BFzjCsbk.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-CNLhok7Q.js → typing-burst-detector-DbyT-0Jk.js} +1 -1
- package/dist/public/assets/{uninstall-CfBkwPz3.js → uninstall-Bo2t4rIS.js} +1 -1
- package/dist/public/assets/{use-activity-panel-JcDF_NGH.js → use-activity-panel-vvKYIJn4.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-quJJgq3F.js → use-apply-config-language-D-iaXzSu.js} +2 -2
- package/dist/public/assets/{use-open-skill-BejdmcK8.js → use-open-skill-DeZKcKIH.js} +1 -1
- package/dist/public/assets/use-settings-route-CikTq5Vq.js +1 -0
- package/dist/public/assets/{use-terminal-enabled-CqtBhC9Q.js → use-terminal-enabled-Bettx1jk.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-JiMHabs-.js → use-timeline-entry-diff-CPNjboIa.js} +1 -1
- package/dist/public/index.html +22 -22
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-BJWCp_zI.mjs → registry-probes-DgQrTNN0.mjs} +1 -1
- package/dist/{removal-file-path-CnXRatEs.mjs → removal-file-path-DFn5hKsA.mjs} +1 -1
- package/dist/{repair-launch-json-DCtFnoyJ.mjs → repair-launch-json-DKTYbYxZ.mjs} +1 -1
- package/dist/{repair-mcp-configs-BbWY7hPn.mjs → repair-mcp-configs-DeeefhTM.mjs} +1 -1
- package/dist/{src-BQPZHOpx.mjs → src-DxlSnL0q.mjs} +1 -1
- package/dist/src-TaiFuA_p.mjs +1 -0
- package/dist/{start-6rBE8R0Q.mjs → start-DjkskNc7.mjs} +2 -2
- package/dist/start-kmmviJeA.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-B3X-QRRf.mjs +0 -1
- package/dist/init-SyGGlOHV.mjs +0 -1
- package/dist/loader-aoEqsyEe.mjs +0 -1
- package/dist/preview-BhWNX5ES.mjs +0 -1
- package/dist/public/assets/FeedbackForm-DNCliMhK.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-Cjwb2bDX.js +0 -1
- package/dist/public/assets/SettingsDialogBody-BA2gB2VO.js +0 -2
- package/dist/public/assets/config-schema-Dj0e1pm8.js +0 -1
- package/dist/public/assets/field-controls-BshUGsc5.js +0 -1
- package/dist/public/assets/index-CbKG13-E.js +0 -2205
- package/dist/public/assets/messages-ANXyJliY.js +0 -1
- package/dist/public/assets/messages-B1FZsv56.js +0 -1
- package/dist/public/assets/messages-B4Ao4T-h.js +0 -1
- package/dist/public/assets/messages-BcdGkp91.js +0 -1
- package/dist/public/assets/messages-CHvjKumb.js +0 -1
- package/dist/public/assets/messages-D0VuVwkB.js +0 -1
- package/dist/public/assets/messages-DY9xlGMT.js +0 -1
- package/dist/public/assets/messages-DfEF3nXA.js +0 -1
- package/dist/public/assets/messages-MLW9EqLI.js +0 -1
- package/dist/public/assets/messages-WD_ZkqZv.js +0 -1
- package/dist/public/assets/messages-WyXTlpZd.js +0 -1
- package/dist/public/assets/messages-dexq95NM.js +0 -1
- package/dist/public/assets/messages-jgN1s75x.js +0 -1
- package/dist/public/assets/use-settings-route-BVEU1nrV.js +0 -1
- package/dist/src-B6vlrcvu.mjs +0 -1
- package/dist/start-uwbHcniG.mjs +0 -1
- /package/dist/public/assets/{AgentConnectionsSection-DuO_iqz2.js → AgentConnectionsSection-C4Y6AXkF.js} +0 -0
- /package/dist/public/assets/{HotkeysSection-CR1clX0T.js → HotkeysSection-BroWUkWa.js} +0 -0
- /package/dist/public/assets/{IntegrationsSection-DXEcrIhV.js → IntegrationsSection-Bem--yGZ.js} +0 -0
- /package/dist/public/assets/{OkCliPathRow-uIsebjQL.js → OkCliPathRow-BtSsFiGL.js} +0 -0
- /package/dist/public/assets/{OkignoreSection-BsqOZ0wD.js → OkignoreSection-DYAQ4Haz.js} +0 -0
- /package/dist/public/assets/{SharingSection-B3wW6gUI.js → SharingSection-XR4AeJT9.js} +0 -0
- /package/dist/public/assets/{SkillsManagerSection-C4ytRUcq.js → SkillsManagerSection-DJfOBpFG.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-B5RT0rw6.js → __vite-browser-external-pK7FQf_r.js} +0 -0
- /package/dist/public/assets/{calendar-o4QOcHc0.js → calendar-CEVo5Hrz.js} +0 -0
- /package/dist/public/assets/{code-highlighter-impl-DMSeGAy3.js → code-highlighter-impl-BTCJ4NQn.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{F as e,S as t,X as n,Z as r,hl as i,i as a,sd as o}from"./md-manager-BGnqyqi1-BTvqIsKE.mjs";import{Ii as s,as as c,bi as l,ci as u,gs as d,k as f,rs as p,wi as m}from"./dist-CjYbXRTw.mjs";import{Ct as h,L as g,Tt as _,X as v,b as y,ut as b,wt as x,y as S,z as C}from"./init-
|
|
2
|
-
`)){let e=r.replace(me,``),i=de.exec(e)?.[1];if(i){n={login:i,active:!1},t.push(n);continue}if(fe.test(e)){n=void 0;continue}n&&pe.test(e)&&(n.active=!0)}return t}const ge={mode:`published`,skipAvailabilityCheck:!0,replaceEntry:!0};function K(){return{action:`failed`,errorId:`write-failed`}}function q(){return{action:`skipped-missing`,errorId:`surface-missing`}}function J(e,t,n){d(`agent-integrations-apply`).warn({editor:e,path:t,reason:n},`skill write failed`)}function Y(){return{action:`skipped-unsupported`,errorId:`no-writer`}}function _e(e){switch(e){case`removed`:return{action:`removed`};case`not-present`:return{action:`no-op`};case`left-foreign`:return{action:`skipped-foreign`,errorId:`foreign-artifact`};case`declined`:return{action:`declined`,errorId:`write-declined`}}}function ve(e,t,n,r,i){let a=v[e];try{let o=j(a,t,n,r,i);return o.kind===`removed`&&o.trustDetail&&d(`agent-integrations-apply`).warn({editor:e,path:r??a.configPath(t,n),trust:o.trust,trustDetail:o.trustDetail},`MCP config removal retained Pi folder trust`),_e(o.kind)}catch(i){return d(`agent-integrations-apply`).warn({editor:e,path:r??a.configPath(t,n),reason:i instanceof Error?i.message:String(i)},`MCP config removal failed`),K()}}async function ye(e,t,n){if(v[e].scope!==`global`)return q();if(n===`absent`)return ve(e,``,t.home,void 0,t.env);let r=(await y({editors:[e],home:t.home,replaceEntry:!0})).find(t=>t.editorId===e);if(r===void 0)return K();switch(r.action){case`written`:case`overwritten`:return{action:r.action};case`declined`:return{action:`declined`,errorId:`write-declined`};case`skipped-missing`:return q();case`skipped-flag`:return Y();default:return K()}}function be(e,t,n){let r=v[e].projectConfigPath?.(t.cwd);if(r===void 0)return q();if(n===`absent`)return ve(e,t.cwd,t.home,r,t.env);let i=S(v[e],t.cwd,ge,void 0,r);switch(i.action){case`written`:case`overwritten`:return{action:i.action};case`declined`:return{action:`declined`,errorId:`write-declined`};default:return K()}}function xe(e,t,n){let r=t.home??ne();if(n===`absent`){let t=N(e,r);switch(t.action){case`removed`:return{action:`removed`};case`not-present`:return{action:`no-op`};case`skipped-unsupported`:return q();case`failed`:return J(e,t.path,t.error),K()}}let i=T(e,r);switch(i.action){case`written`:return{action:`written`};case`overwritten`:return{action:`overwritten`};case`skipped-unsupported`:return q();case`failed`:return J(e,i.path,i.error),K()}}function Se(e,t,n){if(n===`absent`){let n=g(v[e],t.cwd);switch(n.action){case`removed`:return{action:`removed`};case`not-present`:return{action:`no-op`};case`skipped-unsupported`:return q();case`failed`:return J(e,n.path,n.error),K()}}let r=C(v[e],t.cwd);switch(r.action){case`written`:return{action:`written`};case`overwritten`:return{action:`overwritten`};case`skipped-unsupported`:return q();case`skipped-prerequisite`:return{action:`skipped-prerequisite`,errorId:`dependency-failed`};case`failed`:return J(e,r.path,r.error),K()}}function Ce(e){return t=>{if(t.pathId===void 0)return Y();let n=o(t.pathId);if(n===null||n.kind===`central-skill-store`)return Y();switch(n.kind){case`editor-user-config`:return ye(n.editor,e,t.desired);case`editor-project-config`:return be(n.editor,e,t.desired);case`editor-project-skill-root`:return Se(n.editor,e,t.desired);case`editor-user-skill-root`:return xe(n.editor,e,t.desired)}}}function we(e,t){return e.bind?.[0]??t.HOST??`127.0.0.1`}function Te(e){if(e===`server`)return e;throw new x(`--only must be 'server'`)}function Ee(e=H){let t=import.meta.dirname??new URL(`.`,import.meta.url).pathname;return[V(t,`public`),V(t,`../../app/dist`),V(t,`../../../app/dist`)].find(t=>e(t))}function De(e){if(e.explicitDir!==void 0)return{dir:e.explicitDir,missingBundle:!1};if(e.only===`server`)return{dir:void 0,missingBundle:!1};let t=e.findBundledDir();return{dir:t,missingBundle:t===void 0}}function Oe(e){if(e===`off`)return`off`;if(!i.test(e))throw new x(`--idle-shutdown must be 'off' or a duration like 90s, 30m, 2h`);return e}function ke(e){return e===`localhost`||e===`::1`||e===`[::1]`||e.startsWith(`127.`)}function Ae(e){return!e.flagBindSet&&!e.okBindSet&&e.hostEnvSet&&e.fileBindCount>1}function je(e){return!e.openBrowser||e.ephemeral||e.only===`server`||!e.servesUi?!1:(e.explicitOn||ke(e.host))&&e.isTTY}function Me(e,t){let n;try{n=new URL(t)}catch{throw new x(`${e} is not a valid URL: ${t}`)}if(n.protocol!==`http:`&&n.protocol!==`https:`)throw new x(`${e} must be an http(s) origin (got: ${t})`);return t}function Ne(e){return Me(`--external-url`,e)}function Pe(e){let t=z(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var X=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}},Z=class extends Error{projectDir;constructor(e){super(`--project-dir must be a throwaway ${f}* directory under the OS temp dir. Refusing to write ephemeral session state into ${e}. Omit --project-dir to let ok start create (and clean up) its own.`),this.name=`EphemeralProjectDirNotThrowawayError`,this.projectDir=e}};function Q(e,t={}){let n=t.tmpdirFn??re,r=t.realpathFn??te,i=e=>{try{return r(e)}catch(t){return t.code===`ENOENT`?V(e):null}},a=V(e),o;try{o=r(a)}catch(e){if(e.code===`ENOENT`){let e=i(B(a));o=e===null?null:V(e,z(a))}else o=null}if(o===null)return!1;let s=i(n());return s!==null&&B(o)===s&&z(o).startsWith(`ok-ephemeral-`)}function $(e,t,n=e=>ie(e,{recursive:!0,force:!0})){return async()=>{try{await e()}finally{if(Q(t))try{await n(t)}catch(e){process.stderr.write(`[start] ephemeral temp dir reap failed for ${t}: ${e instanceof Error?e.message:String(e)}\n`)}else process.stderr.write(`[start] leaving ${t} in place: only ${f}* dirs under the OS temp dir are removed on ephemeral teardown\n`)}}}function Fe(e,t={}){let n=t.exit??(e=>process.exit(e)),r=t.getActiveHandles??(()=>{let e=process._getActiveHandles;return e?e.call(process):null});return async()=>{let i=!1;try{await e()}catch(e){i=!0,t.log?.error({err:e},`idle-shutdown: destroy failed — exiting anyway`)}finally{let e=null;try{let t=r();if(t!==null){e={};for(let n of t){let t=n?.constructor?.name??`unknown`;e[t]=(e[t]??0)+1}}}catch{e=null}t.log?.info({event:`idle-shutdown-exit`,exitCode:+!!i,openHandles:e??{},handlesAvailable:e!==null},`idle-shutdown: teardown finished — exiting process`),n(+!!i)}}}async function Ie(e){let{config:t,cwd:n,host:r}=e,i=e.skipAutoInit??!1,a=e.idleThresholdMs===void 0?18e5:e.idleThresholdMs,{existsSync:o,mkdirSync:c}=await import(`node:fs`),{basename:l,dirname:d,resolve:f}=await import(`node:path`),{bootServer:p,createEphemeralProjectDir:h,getLogger:g,resolveContentDir:_,resolveLockDir:v,seedEphemeralProjectDir:y,waitForServerLockDrain:x}=await import(`./dist-BrRa6ui7.mjs`),S=e.log??g(`start`),C=e.singleFile!==void 0,T=C?s(e.singleFile).canonicalFilePath:void 0,D=T?d(T):void 0,k=T?l(T):void 0,j,M=!1;if(D!==void 0){if(e.projectDir!==void 0){if(j=e.projectDir,!Q(j))throw new Z(j);o(f(j,`.ok`,`config.yml`))||y(j,D)}else j=h(D),M=!0}let N=async()=>{if(!(!M||j===void 0)){if(!Q(j)){S.warn({ephemeralProjectDir:j},`[start] refusing to reap self-provisioned ephemeral dir: no longer resolves to an ok-ephemeral-* temp dir`);return}try{await ie(j,{recursive:!0,force:!0})}catch(e){S.warn({err:e,ephemeralProjectDir:j},`[start] failed to reap self-provisioned ephemeral temp dir`)}}},F=j;if(!C){if(!i&&!u(n))throw new X(n);let t=process.env.OK_RECLAIM_DISABLE??null,r=e=>{e.severity===`info`?S.debug({event:e},`[start] reclaim sweep event`):S.warn({event:e},`[start] reclaim sweep reported a problem`)};try{let i=(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-BbWY7hPn.mjs`)).repairMcpConfigs)({projectDir:n,reclaimDisableEnv:t,logger:r}).outcomes.filter(e=>e.outcome!==`no-entry`&&e.outcome!==`canonical`&&e.outcome!==`repaired`&&e.outcome!==`foreign`);i.length>0&&S.warn({unhealed:i},`[start] reclaim sweep left entries it could not heal`)}catch(e){S.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-DCtFnoyJ.mjs`)).repairLaunchJson)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}}let I=D??_(t,n);!C&&!o(I)&&(c(I,{recursive:!0}),S.info({contentDir:I},`Created content directory`));let L=w(),R=m(),z;try{{let e=v(j??n),t=Date.now(),r=await x(e);r!==`no-drain`&&S.info({event:`start-waited-for-draining-predecessor`,outcome:r,waitedMs:Date.now()-t,drainLockDir:e},r===`released`?`[start] predecessor server finished draining — proceeding`:`[start] predecessor server still draining after wait — proceeding to collide`)}z=await p({config:t,contentDir:I,projectDir:j??n,contentRoot:C?void 0:t.content.dir,port:e.port,host:r,quiet:!1,detectGh:ce,detectGhAccounts:W,tokenStore:L,embeddingsKeyStore:R,mcpTomlEditor:b(),...C?{ephemeral:!0,singleDocRelPath:k,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],probeHarnessManagedMcpEntry:(e,t)=>A(e,t),probePiAcpBridge:e=>E(e),ensurePiAcpBridge:(e,t)=>P(e,void 0,void 0,void 0,t),agentIntegrations:(()=>{let e={cwd:j??n,home:ne(),env:process.env};return{probe:ee(e),execute:Ce(e),userSkillPresentAnywhere:O}})(),idleShutdownMs:a,...e.serverRuntime===void 0?{}:{serverRuntime:e.serverRuntime},...e.bind===void 0?{}:{bind:e.bind},skipAutoInit:!0,idleShutdownHandler:t=>{let n=t;return Fe(F===void 0?n:$(n,F),{log:S,exit:e.idleExit})},log:S,...e.serveContentAssets===void 0?{}:{serveContentAssets:e.serveContentAssets},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{},...e.terminalAuthAvailable===!0?{terminalAuthAvailable:!0}:{}})}catch(e){throw await N(),e}let B=z.destroy,V=M?async()=>{try{await B()}finally{await N()}}:B;return{httpServer:z.httpServer,destroy:V,lockDir:z.lockDir,contentDir:I,port:z.port,ready:z.ready,degraded:z.degraded}}function Le(e,t,n=()=>p({absPath:c(`user`,process.cwd()),sideline:!1,warn:()=>{}}).value){return t===void 0?e:n()}function Re(e){if(e===`browser`||e===`app`)return e;throw new x(`--mode must be 'browser' or 'app'`)}function ze(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function Be(e){let t=[`Stopping OpenKnowledge…`,`Saving pending changes and releasing the server lock — this can take a few seconds.`];return e===`SIGINT`&&t.push(`Press Ctrl+C again to force quit.`),t}async function Ve(i,o){let s=Le(i,o.singleFile),c=ze(process.env);c!==null&&(process.env.OK_CONSOLE_LEVEL=c);let{renderBanner:l}=await import(`./banner-kywHhVaC.mjs`),{accent:u,dim:d,error:f,warning:p}=await import(`./colors-SgU3JHQu.mjs`),m=process.cwd();process.title=Pe(m);let h;try{h=n(process.env)}catch(e){throw e instanceof a&&(console.error(f(e.message)),process.exit(78)),e}for(let e of h.diagnostics)console.warn(p(`[config] ${e.message}`));let g=t(s,h.layer),_=h.overrides.some(e=>e.envVar===`OK_BIND`),v=o.bind!==void 0&&o.bind.length>0?o.bind:void 0,y=process.env.HOST,b=y!==void 0&&y.trim()!==``?y:void 0,x=r(g),S=v??(_||b===void 0?[...x.bind]:[b]);Ae({flagBindSet:v!==void 0,okBindSet:_,hostEnvSet:b!==void 0,fileBindCount:x.bind.length})&&console.warn(p(`[config] HOST=${b} overrides server.bind — dropping the file-configured addresses (${x.bind.join(`, `)}). Use OK_BIND with a space-separated list to keep multiple binds.`));let C=S[0]??`127.0.0.1`,w=S,T=o.externalUrl,E=r(t(g,{server:{bind:w,...T===void 0?{}:{externalUrl:T}}}));if(E.allowExternal&&(!E.loopbackOnly||E.externalUrl)){let e=E.externalUrl??E.bind.join(`, `);console.warn(p([``,`⚠ EXTERNAL ACCESS ENABLED (server.allowExternal) — no server-side authentication.`,` This server is reachable beyond this machine (${e}). Anyone who can`,` reach it has FULL control of this knowledge base — sync, publishing, GitHub`,` credentials, and local operations (clone, sign-in, repo spawn).`,` Restrict who can reach it at the edge: a Tailscale ACL, a reverse proxy with`,` auth (Cloudflare Access, oauth2-proxy), or a firewall.`,``].join(`
|
|
1
|
+
import{F as e,S as t,X as n,Z as r,hl as i,i as a,sd as o}from"./md-manager-BGnqyqi1-BTvqIsKE.mjs";import{Ii as s,as as c,bi as l,ci as u,gs as d,k as f,rs as p,wi as m}from"./dist-CjYbXRTw.mjs";import{Ct as h,L as g,Tt as _,X as v,b as y,ut as b,wt as x,y as S,z as C}from"./init-D7xJ2Da1.mjs";import{S as w,a as T,c as E,h as D,i as O,m as k,n as A,o as j,p as M,r as N,s as P,t as ee,u as F}from"./registry-probes-DgQrTNN0.mjs";import{n as I}from"./constants-Dx_xivnl.mjs";import{execFileSync as L,spawn as R}from"node:child_process";import{basename as z,dirname as B,resolve as V}from"node:path";import{existsSync as H,realpathSync as te}from"node:fs";import{homedir as ne,tmpdir as re}from"node:os";import{rm as ie}from"node:fs/promises";import{setTimeout as ae}from"node:timers/promises";const oe=[`/opt/homebrew/bin/gh`,`/usr/local/bin/gh`,`/opt/local/bin/gh`,`/snap/bin/gh`,`/usr/bin/gh`],se={encoding:`utf-8`,stdio:[`ignore`,`pipe`,`pipe`],timeout:5e3,windowsHide:!0};function ce(e,t={}){let{login:n}=t,r=t._exec??L,i=le(t._fileExists??H),a=e?[`--hostname`,e]:[];if(n){let e=U(r,i,[`auth`,`token`,...a,`--user`,n]);if(e)return{available:!0,token:e,resolvedLogin:n,fallback:!1}}let o=U(r,i,[`auth`,`token`,...a]);return o?n?{available:!0,token:o,fallback:!0}:{available:!0,token:o}:{available:!1}}function le(e){return[`gh`,...oe.filter(e)]}function U(e,t,n){for(let r of t)try{let t=e(r,n,se).toString().trim();if(t.length>0)return t}catch{}}function W(e,t={}){let n=t._exec??L,r=le(t._fileExists??H),i=[`auth`,`status`,...e?[`--hostname`,e]:[]],a=U(n,r,[...i,`--json`,`hosts`]);if(a!==void 0){let t=ue(a,e);if(t)return t}let o=U(n,r,i);if(o!==void 0){let e=he(o);if(e.length>0)return e}}function G(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function ue(e,t){let n;try{n=JSON.parse(e)}catch{return}let r=G(G(n)?.hosts);if(!r||t!==void 0&&r[t]===void 0)return;let i=t===void 0?Object.values(r):[r[t]],a=[];for(let e of i){if(!Array.isArray(e))return;for(let t of e){let e=G(t);if(!e)continue;let n=e.login;typeof n==`string`&&n.length!==0&&a.push({login:n,active:e.active===!0})}}return a}const de=/Logged in to \S+ account (\S+) \(/,fe=/(?:Failed to log in to|Timeout trying to log in to) \S+/,pe=/^\s*-\s*Active account:\s*true\s*$/,me=/\u001b\[[0-9;]*m/g;function he(e){let t=[],n;for(let r of e.split(`
|
|
2
|
+
`)){let e=r.replace(me,``),i=de.exec(e)?.[1];if(i){n={login:i,active:!1},t.push(n);continue}if(fe.test(e)){n=void 0;continue}n&&pe.test(e)&&(n.active=!0)}return t}const ge={mode:`published`,skipAvailabilityCheck:!0,replaceEntry:!0};function K(){return{action:`failed`,errorId:`write-failed`}}function q(){return{action:`skipped-missing`,errorId:`surface-missing`}}function J(e,t,n){d(`agent-integrations-apply`).warn({editor:e,path:t,reason:n},`skill write failed`)}function Y(){return{action:`skipped-unsupported`,errorId:`no-writer`}}function _e(e){switch(e){case`removed`:return{action:`removed`};case`not-present`:return{action:`no-op`};case`left-foreign`:return{action:`skipped-foreign`,errorId:`foreign-artifact`};case`declined`:return{action:`declined`,errorId:`write-declined`}}}function ve(e,t,n,r,i){let a=v[e];try{let o=j(a,t,n,r,i);return o.kind===`removed`&&o.trustDetail&&d(`agent-integrations-apply`).warn({editor:e,path:r??a.configPath(t,n),trust:o.trust,trustDetail:o.trustDetail},`MCP config removal retained Pi folder trust`),_e(o.kind)}catch(i){return d(`agent-integrations-apply`).warn({editor:e,path:r??a.configPath(t,n),reason:i instanceof Error?i.message:String(i)},`MCP config removal failed`),K()}}async function ye(e,t,n){if(v[e].scope!==`global`)return q();if(n===`absent`)return ve(e,``,t.home,void 0,t.env);let r=(await y({editors:[e],home:t.home,replaceEntry:!0})).find(t=>t.editorId===e);if(r===void 0)return K();switch(r.action){case`written`:case`overwritten`:return{action:r.action};case`declined`:return{action:`declined`,errorId:`write-declined`};case`skipped-missing`:return q();case`skipped-flag`:return Y();default:return K()}}function be(e,t,n){let r=v[e].projectConfigPath?.(t.cwd);if(r===void 0)return q();if(n===`absent`)return ve(e,t.cwd,t.home,r,t.env);let i=S(v[e],t.cwd,ge,void 0,r);switch(i.action){case`written`:case`overwritten`:return{action:i.action};case`declined`:return{action:`declined`,errorId:`write-declined`};default:return K()}}function xe(e,t,n){let r=t.home??ne();if(n===`absent`){let t=N(e,r);switch(t.action){case`removed`:return{action:`removed`};case`not-present`:return{action:`no-op`};case`skipped-unsupported`:return q();case`failed`:return J(e,t.path,t.error),K()}}let i=T(e,r);switch(i.action){case`written`:return{action:`written`};case`overwritten`:return{action:`overwritten`};case`skipped-unsupported`:return q();case`failed`:return J(e,i.path,i.error),K()}}function Se(e,t,n){if(n===`absent`){let n=g(v[e],t.cwd);switch(n.action){case`removed`:return{action:`removed`};case`not-present`:return{action:`no-op`};case`skipped-unsupported`:return q();case`failed`:return J(e,n.path,n.error),K()}}let r=C(v[e],t.cwd);switch(r.action){case`written`:return{action:`written`};case`overwritten`:return{action:`overwritten`};case`skipped-unsupported`:return q();case`skipped-prerequisite`:return{action:`skipped-prerequisite`,errorId:`dependency-failed`};case`failed`:return J(e,r.path,r.error),K()}}function Ce(e){return t=>{if(t.pathId===void 0)return Y();let n=o(t.pathId);if(n===null||n.kind===`central-skill-store`)return Y();switch(n.kind){case`editor-user-config`:return ye(n.editor,e,t.desired);case`editor-project-config`:return be(n.editor,e,t.desired);case`editor-project-skill-root`:return Se(n.editor,e,t.desired);case`editor-user-skill-root`:return xe(n.editor,e,t.desired)}}}function we(e,t){return e.bind?.[0]??t.HOST??`127.0.0.1`}function Te(e){if(e===`server`)return e;throw new x(`--only must be 'server'`)}function Ee(e=H){let t=import.meta.dirname??new URL(`.`,import.meta.url).pathname;return[V(t,`public`),V(t,`../../app/dist`),V(t,`../../../app/dist`)].find(t=>e(t))}function De(e){if(e.explicitDir!==void 0)return{dir:e.explicitDir,missingBundle:!1};if(e.only===`server`)return{dir:void 0,missingBundle:!1};let t=e.findBundledDir();return{dir:t,missingBundle:t===void 0}}function Oe(e){if(e===`off`)return`off`;if(!i.test(e))throw new x(`--idle-shutdown must be 'off' or a duration like 90s, 30m, 2h`);return e}function ke(e){return e===`localhost`||e===`::1`||e===`[::1]`||e.startsWith(`127.`)}function Ae(e){return!e.flagBindSet&&!e.okBindSet&&e.hostEnvSet&&e.fileBindCount>1}function je(e){return!e.openBrowser||e.ephemeral||e.only===`server`||!e.servesUi?!1:(e.explicitOn||ke(e.host))&&e.isTTY}function Me(e,t){let n;try{n=new URL(t)}catch{throw new x(`${e} is not a valid URL: ${t}`)}if(n.protocol!==`http:`&&n.protocol!==`https:`)throw new x(`${e} must be an http(s) origin (got: ${t})`);return t}function Ne(e){return Me(`--external-url`,e)}function Pe(e){let t=z(e).replace(/[^\x20-\x7E]/g,``).trim().slice(0,64);return`open-knowledge-server ${t.length>0?t:`unknown`}`}var X=class extends Error{cwd;constructor(e){super("This directory isn't set up yet. Run `ok init` first, then `ok start` again."),this.name=`OkDirMissingError`,this.cwd=e}},Z=class extends Error{projectDir;constructor(e){super(`--project-dir must be a throwaway ${f}* directory under the OS temp dir. Refusing to write ephemeral session state into ${e}. Omit --project-dir to let ok start create (and clean up) its own.`),this.name=`EphemeralProjectDirNotThrowawayError`,this.projectDir=e}};function Q(e,t={}){let n=t.tmpdirFn??re,r=t.realpathFn??te,i=e=>{try{return r(e)}catch(t){return t.code===`ENOENT`?V(e):null}},a=V(e),o;try{o=r(a)}catch(e){if(e.code===`ENOENT`){let e=i(B(a));o=e===null?null:V(e,z(a))}else o=null}if(o===null)return!1;let s=i(n());return s!==null&&B(o)===s&&z(o).startsWith(`ok-ephemeral-`)}function $(e,t,n=e=>ie(e,{recursive:!0,force:!0})){return async()=>{try{await e()}finally{if(Q(t))try{await n(t)}catch(e){process.stderr.write(`[start] ephemeral temp dir reap failed for ${t}: ${e instanceof Error?e.message:String(e)}\n`)}else process.stderr.write(`[start] leaving ${t} in place: only ${f}* dirs under the OS temp dir are removed on ephemeral teardown\n`)}}}function Fe(e,t={}){let n=t.exit??(e=>process.exit(e)),r=t.getActiveHandles??(()=>{let e=process._getActiveHandles;return e?e.call(process):null});return async()=>{let i=!1;try{await e()}catch(e){i=!0,t.log?.error({err:e},`idle-shutdown: destroy failed — exiting anyway`)}finally{let e=null;try{let t=r();if(t!==null){e={};for(let n of t){let t=n?.constructor?.name??`unknown`;e[t]=(e[t]??0)+1}}}catch{e=null}t.log?.info({event:`idle-shutdown-exit`,exitCode:+!!i,openHandles:e??{},handlesAvailable:e!==null},`idle-shutdown: teardown finished — exiting process`),n(+!!i)}}}async function Ie(e){let{config:t,cwd:n,host:r}=e,i=e.skipAutoInit??!1,a=e.idleThresholdMs===void 0?18e5:e.idleThresholdMs,{existsSync:o,mkdirSync:c}=await import(`node:fs`),{basename:l,dirname:d,resolve:f}=await import(`node:path`),{bootServer:p,createEphemeralProjectDir:h,getLogger:g,resolveContentDir:_,resolveLockDir:v,seedEphemeralProjectDir:y,waitForServerLockDrain:x}=await import(`./dist-BrRa6ui7.mjs`),S=e.log??g(`start`),C=e.singleFile!==void 0,T=C?s(e.singleFile).canonicalFilePath:void 0,D=T?d(T):void 0,k=T?l(T):void 0,j,M=!1;if(D!==void 0){if(e.projectDir!==void 0){if(j=e.projectDir,!Q(j))throw new Z(j);o(f(j,`.ok`,`config.yml`))||y(j,D)}else j=h(D),M=!0}let N=async()=>{if(!(!M||j===void 0)){if(!Q(j)){S.warn({ephemeralProjectDir:j},`[start] refusing to reap self-provisioned ephemeral dir: no longer resolves to an ok-ephemeral-* temp dir`);return}try{await ie(j,{recursive:!0,force:!0})}catch(e){S.warn({err:e,ephemeralProjectDir:j},`[start] failed to reap self-provisioned ephemeral temp dir`)}}},F=j;if(!C){if(!i&&!u(n))throw new X(n);let t=process.env.OK_RECLAIM_DISABLE??null,r=e=>{e.severity===`info`?S.debug({event:e},`[start] reclaim sweep event`):S.warn({event:e},`[start] reclaim sweep reported a problem`)};try{let i=(e.repairMcpConfigsFn??(await import(`./repair-mcp-configs-DeeefhTM.mjs`)).repairMcpConfigs)({projectDir:n,reclaimDisableEnv:t,logger:r}).outcomes.filter(e=>e.outcome!==`no-entry`&&e.outcome!==`canonical`&&e.outcome!==`repaired`&&e.outcome!==`foreign`);i.length>0&&S.warn({unhealed:i},`[start] reclaim sweep left entries it could not heal`)}catch(e){S.warn({err:e},`[start] mcp-config repair sweep failed; continuing`)}try{(e.repairLaunchJsonFn??(await import(`./repair-launch-json-DKTYbYxZ.mjs`)).repairLaunchJson)({projectDir:n,reclaimDisableEnv:t,logger:r})}catch(e){S.warn({err:e},`[start] launch.json repair sweep failed; continuing`)}}let I=D??_(t,n);!C&&!o(I)&&(c(I,{recursive:!0}),S.info({contentDir:I},`Created content directory`));let L=w(),R=m(),z;try{{let e=v(j??n),t=Date.now(),r=await x(e);r!==`no-drain`&&S.info({event:`start-waited-for-draining-predecessor`,outcome:r,waitedMs:Date.now()-t,drainLockDir:e},r===`released`?`[start] predecessor server finished draining — proceeding`:`[start] predecessor server still draining after wait — proceeding to collide`)}z=await p({config:t,contentDir:I,projectDir:j??n,contentRoot:C?void 0:t.content.dir,port:e.port,host:r,quiet:!1,detectGh:ce,detectGhAccounts:W,tokenStore:L,embeddingsKeyStore:R,mcpTomlEditor:b(),...C?{ephemeral:!0,singleDocRelPath:k,gitEnabled:!1,gitPreflight:()=>({ok:!0,version:`0.0.0`,resolvedPath:`git`,source:`PATH`})}:{},localOpCliArgs:[process.execPath,process.argv[1]],probeHarnessManagedMcpEntry:(e,t)=>A(e,t),probePiAcpBridge:e=>E(e),ensurePiAcpBridge:(e,t)=>P(e,void 0,void 0,void 0,t),agentIntegrations:(()=>{let e={cwd:j??n,home:ne(),env:process.env};return{probe:ee(e),execute:Ce(e),userSkillPresentAnywhere:O}})(),idleShutdownMs:a,...e.serverRuntime===void 0?{}:{serverRuntime:e.serverRuntime},...e.bind===void 0?{}:{bind:e.bind},skipAutoInit:!0,idleShutdownHandler:t=>{let n=t;return Fe(F===void 0?n:$(n,F),{log:S,exit:e.idleExit})},log:S,...e.serveContentAssets===void 0?{}:{serveContentAssets:e.serveContentAssets},...e.reactShellDistDir?{reactShellDistDir:e.reactShellDistDir}:{},...e.terminalAuthAvailable===!0?{terminalAuthAvailable:!0}:{}})}catch(e){throw await N(),e}let B=z.destroy,V=M?async()=>{try{await B()}finally{await N()}}:B;return{httpServer:z.httpServer,destroy:V,lockDir:z.lockDir,contentDir:I,port:z.port,ready:z.ready,degraded:z.degraded}}function Le(e,t,n=()=>p({absPath:c(`user`,process.cwd()),sideline:!1,warn:()=>{}}).value){return t===void 0?e:n()}function Re(e){if(e===`browser`||e===`app`)return e;throw new x(`--mode must be 'browser' or 'app'`)}function ze(e){return e.OK_CONSOLE_LEVEL!==void 0||e.LOG_LEVEL!==void 0?null:`warn`}function Be(e){let t=[`Stopping OpenKnowledge…`,`Saving pending changes and releasing the server lock — this can take a few seconds.`];return e===`SIGINT`&&t.push(`Press Ctrl+C again to force quit.`),t}async function Ve(i,o){let s=Le(i,o.singleFile),c=ze(process.env);c!==null&&(process.env.OK_CONSOLE_LEVEL=c);let{renderBanner:l}=await import(`./banner-kywHhVaC.mjs`),{accent:u,dim:d,error:f,warning:p}=await import(`./colors-SgU3JHQu.mjs`),m=process.cwd();process.title=Pe(m);let h;try{h=n(process.env)}catch(e){throw e instanceof a&&(console.error(f(e.message)),process.exit(78)),e}for(let e of h.diagnostics)console.warn(p(`[config] ${e.message}`));let g=t(s,h.layer),_=h.overrides.some(e=>e.envVar===`OK_BIND`),v=o.bind!==void 0&&o.bind.length>0?o.bind:void 0,y=process.env.HOST,b=y!==void 0&&y.trim()!==``?y:void 0,x=r(g),S=v??(_||b===void 0?[...x.bind]:[b]);Ae({flagBindSet:v!==void 0,okBindSet:_,hostEnvSet:b!==void 0,fileBindCount:x.bind.length})&&console.warn(p(`[config] HOST=${b} overrides server.bind — dropping the file-configured addresses (${x.bind.join(`, `)}). Use OK_BIND with a space-separated list to keep multiple binds.`));let C=S[0]??`127.0.0.1`,w=S,T=o.externalUrl,E=r(t(g,{server:{bind:w,...T===void 0?{}:{externalUrl:T}}}));if(E.allowExternal&&(!E.loopbackOnly||E.externalUrl)){let e=E.externalUrl??E.bind.join(`, `);console.warn(p([``,`⚠ EXTERNAL ACCESS ENABLED (server.allowExternal) — no server-side authentication.`,` This server is reachable beyond this machine (${e}). Anyone who can`,` reach it has FULL control of this knowledge base — sync, publishing, GitHub`,` credentials, and local operations (clone, sign-in, repo spawn).`,` Restrict who can reach it at the edge: a Tailscale ACL, a reverse proxy with`,` auth (Cloudflare Access, oauth2-proxy), or a firewall.`,``].join(`
|
|
3
3
|
`)))}let D=o.port===void 0?void 0:Number(o.port),O=h.overrides.find(e=>e.envVar===`PORT`)?.value,k=D??O??s.server?.port,A=De({explicitDir:o.reactShellDistDir,only:o.only,findBundledDir:Ee}),j=A.dir;A.missingBundle&&console.warn(`bundled web UI not found — serving /api and /mcp only. Reinstall @inkeep/open-knowledge, or build packages/app in a source checkout.`);let M;try{M=await Ie({config:s,cwd:m,host:C,port:k,bind:w,...o.serveContentAssets===void 0?{}:{serveContentAssets:o.serveContentAssets},...j?{reactShellDistDir:j}:{},idleThresholdMs:e(o.idleShutdown??E.idleShutdown),serverRuntime:E,...o.singleFile?{singleFile:o.singleFile}:{},...o.projectDir?{projectDir:o.projectDir}:{},...o.terminalAuth===!0?{terminalAuthAvailable:!0}:{}})}catch(e){e instanceof X&&(console.error(f(e.message)),process.exit(1)),e instanceof Z&&(console.error(f(e.message)),process.exit(1));let t=await import(`./dist-BrRa6ui7.mjs`);if((e instanceof t.GitNotAvailableError||e instanceof t.GitTooOldError)&&process.exit(78),e instanceof t.ExposureConsentError&&(console.error(f(e.message)),process.exit(78)),(e instanceof t.SingleFileNotFoundError||e instanceof t.SingleFileNotAFileError||e instanceof t.SingleFileNotMarkdownError)&&(console.error(f(e.message)),process.exit(1)),(e instanceof t.MissingOkConfigError||e instanceof t.DocumentDurabilityStateError)&&(console.error(f(e.message)),process.exit(1)),We(e,t,m)){let e=t.resolveLockDir(m),n=null;try{n=await He({readServerLock:()=>t.readServerLock(e),now:Date.now,sleep:e=>ae(e),timeoutMs:3e3,pollIntervalMs:50})}catch(e){process.stderr.write(`[start] spawn-or-reuse: lock poll failed (${e instanceof Error?e.message:String(e)}) — falling back to the collision message\n`)}if(n!==null){let[e,...t]=Ue(n);console.log(u(e));for(let e of t)console.log(d(e));process.exit(0)}}let n=Ge(e,m,t);n!==null&&(console.error(f(n)),process.exit(1)),console.error(`${f(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let N=!1,P=async e=>{if(N)return;N=!0;let[t,...n]=Be(e);console.log(u(`\n${t}`));for(let e of n)console.log(d(` ${e}`));try{await M.destroy(`external-signal`)}catch(e){console.error(`${f(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)};process.once(`SIGINT`,()=>{P(`SIGINT`)}),process.once(`SIGTERM`,()=>{P(`SIGTERM`)});let ee=`http://${C.includes(`:`)&&!C.startsWith(`[`)?`[${C}]`:C}:${M.port}`,F=C===`0.0.0.0`||C===`::`?`http://0.0.0.0:${M.port}`:void 0,L=ee;console.log(l({name:`open-knowledge`,version:I,localUrl:L,networkUrl:F,nextSteps:[`Open the Editor URL in your browser to start editing.`]}));let R={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};M.ready.then(async()=>{if(M.degraded.length>0){console.log();for(let e of M.degraded){let t=R[e]??`${e} (check server logs for details)`;console.warn(` ${p(`⚠`)} ${p(e)}: ${d(t)}`)}console.log()}if(je({openBrowser:o.openBrowser!==!1&&E.openBrowser,explicitOn:o.openBrowser!==!1&&g.server?.openBrowser===!0,host:C,isTTY:process.stdout.isTTY===!0,ephemeral:o.singleFile!==void 0,only:o.only,servesUi:j!==void 0})){let{openBrowser:e}=await import(`./open-browser-BLOo3kBG.mjs`);e(L)}}).catch(e=>{console.error(` ${f(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})}async function He(e){let t=e.now()+e.timeoutMs,n=e.readServerLock();for(;n!==null&&n.draining!==!0&&n.port<=0&&e.now()<t;)await e.sleep(e.pollIntervalMs),n=e.readServerLock();return n===null||n.draining===!0||n.port<=0?null:l(n)&&n.url!==void 0?{url:n.url,kind:n.kind,pid:n.pid,servesUi:!0}:{url:n.url??`http://127.0.0.1:${n.port}`,kind:n.kind,pid:n.pid,servesUi:!1}}function Ue(e){return[`${e.kind===`mcp-spawned`?`An MCP-spawned OpenKnowledge server is already running on this project`:`OpenKnowledge is already running on this project`} (pid ${e.pid}).`,` ${e.url}`,"Leaving it running — run `ok stop` first if you want a fresh server."]}function We(e,t,n){let r=t.ServerLockCollisionError;if(r!==void 0&&e instanceof r)return!0;let i=t.ServerAuthorityCollisionError;if(i===void 0||!(e instanceof i))return!1;try{return e.existing.scope.kind===`tree`&&te.native(n)===e.existing.projectDir}catch{return!1}}function Ge(e,t,n){let r=n.ServerAuthorityCollisionError;if(r!==void 0&&e instanceof r)return e.message;let i=n.ServerAuthorityRegistryError;if(i!==void 0&&e instanceof i)return e.message;let a=n.ServerLockCollisionError;if(a===void 0||!(e instanceof a))return null;try{let e=n.readServerLock(n.resolveLockDir(t));return e&&e.kind===`mcp-spawned`?"An MCP-spawned server holds this lock; it should release on idle-shutdown (~30 min). Or run `ok stop`.":"OpenKnowledge server is already running on this project — check `ok status` or `ok stop`."}catch{return null}}function Ke(e){return new h(`start`).description(`Start the OpenKnowledge server (UI + API + MCP + collab on one port)`).option(`-p, --port <port>`,`Server port`,void 0).option(`--bind <address>`,`Bind address (repeatable; default 127.0.0.1 — loopback only)`,(e,t)=>[...t??[],e]).option(`--no-open-browser`,`Do not open the browser after start (interactive loopback starts open it by default)`).option(`--only <module>`,`Serve one module: 'server' (API + MCP only, no shell or browser)`,Te).option(`--idle-shutdown <duration>`,`Shut the server down after this long with no connected clients ('off', or a duration like 90s, 30m, 2h; default 30m)`,Oe).option(`--mode <mode>`,`Force dispatch mode: 'browser' or 'app'`,Re).option(`--serve-content-assets`,`Serve content assets from this server (now the default; kept for compatibility)`).option(`--react-shell-dist-dir <path>`,`Serve React shell from <path>`).addOption(new _(`--single-file <path>`,`No-project ephemeral single-file mode: scope the server to one markdown file (git + MCP off)`).hideHelp()).addOption(new _(`--project-dir <dir>`,`Throwaway project root for --single-file (where ephemeral .ok/ state lives)`).hideHelp()).addOption(new _(`--terminal-auth`,`Tell in-app agents that this server's client can run terminal sign-ins (the desktop app passes it when it has a terminal)`).hideHelp()).option(`--external-url <url>`,`Canonical external origin clients dial (sets server.externalUrl for this run) — its host joins the Host/Origin allowlists (CORS + external-Host admission). External exposure additionally requires consent (OK_ALLOW_EXTERNAL=1 or server.allowExternal).`,Ne).action(async t=>{let n=e();if(t.only===`server`&&t.reactShellDistDir!==void 0&&(process.stderr.write(`error: option '--only server' cannot be combined with '--react-shell-dist-dir'
|
|
4
4
|
`),process.exit(2)),t.projectDir!==void 0&&t.singleFile===void 0&&(process.stderr.write(`error: option '--project-dir' requires '--single-file'
|
|
5
5
|
`),process.exit(2)),t.mode===`app`){let e=[];if(t.port!==void 0&&e.push(`--port`),t.bind!==void 0&&e.push(`--bind`),t.only!==void 0&&e.push(`--only`),t.idleShutdown!==void 0&&e.push(`--idle-shutdown`),t.openBrowser===!1&&e.push(`--no-open-browser`),t.externalUrl!==void 0&&e.push(`--external-url`),e.length>0){let t=process.env.OK_LOG_LEVEL??`info`;(t===`debug`||t===`trace`)&&console.error(`--mode=app: ignoring ${e.join(`, `)}`)}let n=M(F());if(n.available){k({spawn:R},n);return}console.error(D(n.reason)),process.exit(1)}await Ve(n,t)})}export{Ge as C,W as D,ce as E,Ke as S,Fe as T,ze as _,Ue as a,je as b,Q as c,Oe as d,Te as f,Le as g,He as h,Pe as i,We as l,we as m,X as n,Be as o,Ee as p,Ie as r,ke as s,Z as t,Ne as u,De as v,$ as w,Ae as x,Ve as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e,m as t,p as n,r}from"./start-DjkskNc7.mjs";export{r as bootStartServer,n as resolveBundledReactShellDir,t as resolveHost,e as startCommand};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/open-knowledge",
|
|
3
|
-
"version": "0.84.0-beta.
|
|
3
|
+
"version": "0.84.0-beta.15",
|
|
4
4
|
"description": "Local-first, agent-friendly Markdown knowledge base with a cross-platform CLI and web editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"knowledge-base",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@parcel/watcher": "^2.5.6"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@inkeep/open-knowledge-app": "0.84.0-beta.
|
|
69
|
-
"@inkeep/open-knowledge-core": "0.84.0-beta.
|
|
68
|
+
"@inkeep/open-knowledge-app": "0.84.0-beta.15",
|
|
69
|
+
"@inkeep/open-knowledge-core": "0.84.0-beta.15",
|
|
70
70
|
"@inkeep/open-knowledge-native-config": "0.0.0",
|
|
71
|
-
"@inkeep/open-knowledge-server": "0.84.0-beta.
|
|
71
|
+
"@inkeep/open-knowledge-server": "0.84.0-beta.15",
|
|
72
72
|
"@types/node": "^24.7.0",
|
|
73
73
|
"@types/proper-lockfile": "^4.1.4",
|
|
74
74
|
"@types/yazl": "^3.3.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./md-manager-BGnqyqi1-BTvqIsKE.mjs";var e=`0.84.0-beta.14`;const t=`config.yml`,n=e;export{n,t};
|
package/dist/init-SyGGlOHV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./dist-CjYbXRTw.mjs";import{_ as e}from"./init-PjjvTgrO.mjs";export{e as runInit};
|
package/dist/loader-aoEqsyEe.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./loader-BQS4fl0m.mjs";export{e as loadConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./preview-3gk2i1xX.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./index-CbKG13-E.js";export{e as FeedbackForm};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./ManagedArtifactProperties-CUpup7ho.js";export{e as ManagedArtifactProperties};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SharingSection-B3wW6gUI.js","./chunk-CYidjpOJ.js","./dist-Nvb76hAm.js","./jsx-runtime-BUgB2tll.js","./react-f2sANaYj.js","./radio-group-G1GR05Rb.js","./dist-DTFuvKje.js","./dist-CSCUSbQc.js","./react-dom-DPxgxlDT.js","./dist-uiDX6Nr9.js","./dist-BKgU0kag.js","./dist-DBXmXNZF.js","./dist-CRjqnzU7.js","./compiler-runtime-BfE3aGVn.js","./utils-CPqDy6Hr.js","./bundle-mjs-SHeFpKGC.js","./dist-BGzUo_18.js","./ConfigSharingInfoTooltip-B2YLIcK1.js","./tooltip-DBqLYfio.js","./dist-YVu4MRkZ2.js","./floating-ui.dom-DkPPH5vF.js","./dist-CxbWbOvU.js","./info-CyR0W2SK.js","./createLucideIcon-DdBzwsHe.js","./SettingsSectionHeader-D-JSH4bX.js","./arrow-up-right-nJaICi16.js","./badge-DmdA1C7r.js","./dist-BsJYDohW.js","./external-link-CldCnbtR.js","./button-DzgjsZzC.js","./skeleton-BPb29aFG.js","./AccountSection-CcrCMfiM.js","./label-CvMpFFbN.js","./SyncStatusBadge-BDB1rnZs.js","./config-provider-CyBtB5MG.js","./trace-api-BjgnT4Mc.js","./status-SIkheD7g.js","./dist-PQ5KMVDh.js","./schemas-api-BbYGQuTW.js","./schemas-B93JY9Ef.js","./_envelope-Dwl6i2K9-DPqJ_Q4W.js","./share-D-LUU2aX-DfD-mrg-.js","./util-doc-name-D-_o-n0R.js","./constants-cc1-Bt4QPTUe.js","./constants-github-DOek7bCt.js","./doc-extensions-CcO7K8uD-B004ggqh.js","./logging-renderer-log-Bvxj7ztp.js","./skill-targets-schema-BujW07bM.js","./constants-editors-DLxv8SuP.js","./constants-product-C4Nt9vD3.js","./use-apply-config-language-quJJgq3F.js","./preload-helper-Chd9yIcd.js","./dist-C_FzPxEX2.js","./messages-CHvjKumb.js","./client-version-uAhaPZPt.js","./css-color-to-hex-D-oM_f97.js","./use-apply-config-color-theme-DiRXrQH-.js","./use-apply-config-theme-CYFG76sS.js","./saved-themes-client-DQK5ylqX.js","./constants-upload-CVKO8P4d.js","./select-Bu4Wm3Rf.js","./es2015-Dtr4fzLT.js","./check-B2OLRY33.js","./chevron-down-CEv6N8LG.js","./collapsible-BKbszYZV.js","./arrow-up-BGHhPj4y.js","./chevron-right-Bofu4lib.js","./settings-2-DoBlNQMk.js","./git-merge-VDBzSZBV.js","./spinner-Bx8xD6f8.js","./refresh-cw-CC7UZEnZ.js","./terminal-Cpb4l1oH.js","./triangle-alert-BXrUEeRU.js","./DisclosureWarning-DGH1_U0o.js","./terminal-command-events-DylLB9_L.js","./handoff-ClTYrgLm.js","./dialog-BJEjKJjL.js","./electron-drag-strip-D9GZhMg_.js","./x-DM2drskU.js","./popover-BhiLJhH5.js","./dist-D1AbXGbs.js","./use-conflicts-E9tj1NHs.js","./documents-events-ckNvVQCr.js","./schemas-cc1-DNrPPikD.js","./config-errors-tVoeK4OC.js","./use-git-sync-status-DPG8QuKs.js","./doc-hash-BJkweiX9.js","./use-settings-route-BVEU1nrV.js","./keyboard-shortcuts-FtScAm_I.js","./dist-Dc8tD1th.js","./w3c-keyname-C7Rznu6R.js","./trash-2-CchZ0T47.js","./AuthModal-SudaNBin.js","./copy-DpWa6i2v.js","./input-C-Qm8YDT.js","./auth-state-cache-fRITSReW.js","./AgentConnectionsSection-DuO_iqz2.js","./switch-BKZTXkzu.js","./useQuery-ZeEDLtxh.js","./RegisteredAgentIcon-DjlAkIlP.js","./cursor-B6reg1lS.js","./agent-registry-B4dxoiaL.js","./search-CFu4WXqc.js","./TerminalLaunchContext-CJTkwtCs.js","./agent-connections-D2w6claM.js","./alert-dialog-BA3e7-10.js","./checkbox-CKD8LETI.js","./minus-DdRxss3A.js","./folder-QqUoFRPR.js","./monitor-IXzxTnmk.js","./sparkles-BS2TX_Um.js","./AgentIconCluster-Qf_VPGzc.js","./OpenInAgentMenuItem-Bd9Zl2ks.js","./dropdown-menu-DtLu9NwU.js","./dist-UouvQIiM.js","./dist-d0R4nnoB.js","./copilot-Dh1BU6kS.js","./utils-random-uuid-D7CMpgvf.js","./mascot-outline-CtS592mc.js","./field-DFJgKWGh.js","./separator-D7s_9ZwH.js","./tool-list-format-CS7MZY1Q.js","./constants-skills-BLHVRW90.js","./bool-pref-CqB9j4bL.js","./storage-scope-DSPgNqch.js","./bridge-DsUUjTsy.js","./structural-freshness-CIbkMFA3-CWi_lyiW.js","./terminal-cli-display-BbrhD8t2.js","./settings-section-labels-BA8paawN.js","./catalog-Bdh906tM.js","./use-workspace-Dyz_XHeI.js","./AttachmentsSection-BJiZQ2MV.js","./field-controls-BBWVj3AF.js","./toggle-group-B7p69Qfd.js","./circle-alert-eBm4JPxY.js","./ThemePicker-pc5gwEur.js","./plus-zPnYzcqL.js","./rotate-ccw-Zi1IjIg9.js","./form-BGyym9kP.js","./textarea-CMYJSlFq.js","./config-schema-Dj0e1pm8.js","./config-validation-events-01z0iLZK.js","./ContentRulesSection-D4g32j4R.js","./markdown-lint-ZeKFkjFe.js","./lib-QQS1Brzc.js","./ccount-BoHE53_k.js","./syntax-CKL08zSk.js","./markdownit-Cn1WWq3J.js","./field-controls-BshUGsc5.js","./HotkeysSection-CR1clX0T.js","./settings-host-gates-BdPynUVr.js","./kbd-Cg1nrB7U.js","./IntegrationsSection-DXEcrIhV.js","./InstallInClaudeDesktopDialog-DNy01p3t.js","./arrow-right-NOQZeKIW.js","./circle-check-nK1yRBIw.js","./download-BouT3__0.js","./LinkPreviewsSection-rwx7LdIg.js","./LintingSection-D5I7tYlt.js","./CodeMirrorPropInput-DkRMFYIK.js","./dist-DseqKdAU.js","./dist-D2SphF3p.js","./dist-CjyZozAk.js","./dist-BxTTaZ5o.js","./dist-C2Kstufe.js","./dist-BvhrN0Uj.js","./dist-DKYEqMZn.js","./dist-D5mDCusD.js","./dist-BpU-J2LR.js","./dist-BkE9d74i.js","./stex-CUzil_LB.js","./lib-DlDYgFfS.js","./space-separated-tokens-l9yufOSK.js","./trim-lines-DfV8CCf7.js","./folder-open-COGOeTzI.js","./with-selector-zVo3Fruj.js","./navigation-targets-DTSxcGor.js","./file-tree-utils-DUpeRMj2.js","./doc-paths-cEiFVCxr.js","./cm-theme-Cvtw80TE.js","./page-list-cache-BNFVKu-D.js","./documents-fetch-Y7Dt9_Tn.js","./note-window-mode-CI3Yju9B.js","./DocumentContext-BZi2BNlk.js","./propagation-api-BP58TooP.js","./context-api-D2PVlCLE.js","./lib-JGveGkyb.js","./lib-TFtgHRaJ.js","./lib-7Zm1Z07d.js","./git-branch-CeTudSak.js","./Mermaid-CprZhBlA.js","./maximize-2-DjzhPUDZ.js","./frontmatter-tags-DIPhIb6q.js","./prop-types-ZtKgQMRh.js","./hash-C4CJQURT.js","./constants-embedded-host-Cc7UiZn-.js","./paperclip-BHdV1F_7.js","./react-error-boundary-6ac6QM6R.js","./CopyButton-BGYz3S5f.js","./PageListContext-DgTeRFU-.js","./parse-api-error-B5EVRh3T.js","./startup-marks-aftNzVFI.js","./perf-DZJpLc5j.js","./diagnostic-breadcrumb-Cr0C15nJ.js","./file-tree-rename-validation-CQF8z42p.js","./use-collab-url-DPmF-V5e.js","./excalidraw-scene-WvG0vu5I.js","./known-skill-dirs-DtxJ8qaH.js","./skill-scope-N3jmnGIX.js","./skills-api-DronAhV9.js","./DocumentContext-B0sQn39F.css","./lint-plugin-meta-CtDE2R0v.js","./square-pen-BoydeSu6.js","./DeleteConfirmationDialog-CCv72H-k.js","./card-DdkXkyr5.js","./SkillInstallMenu-BQHSpQsX.js","./ChangedOutsideBadge-Yx_v8aj4.js","./context-menu-CKOBjlWm.js","./dist-ecS2llwR.js","./use-skills-D9Qpt2AT.js","./use-skill-targets-DcxmfKVk.js","./markdownlint-rule-browser-BbmlUEor.js","./tag-pill-input-etcmLbrt.js","./lint-config-client-CB91vevq.js","./use-open-skill-BejdmcK8.js","./open-managed-artifact-tab-2lsv2g--.js","./schema-fields-view-intent-CGV401S6.js","./NetworkAccessSection-LjctJODc.js","./restart-collab-server-BLCoCY2a.js","./OkignoreSection-BsqOZ0wD.js","./sortable.esm-BdFZmZc5.js","./grip-vertical-DNbkgWZL.js","./config-ignore-nested-error-events-9jefebwW.js","./ProjectTemplatesSection-7RWIVmXg.js","./TemplateRow-xwZoU5JB.js","./file-plus-DKxOZh2k.js","./folder-config-api-Db5-uEQR.js","./SearchSection-BS4FOrKH.js","./use-semantic-search-status-Bq4BpHMI.js","./SkillsManagerSection-C4ytRUcq.js","./SlidesPluginSection-DuBoITZp.js","./input-group-MLVCQYFm.js","./SyncSection-CrxvCruv.js","./PublishToGitHubDialog-DYdMkEyQ.js","./clipboard-adapter-DOdbK8py.js","./TerminalSection-D8ayxcw-.js","./use-terminal-enabled-CqtBhC9Q.js","./terminal-telemetry-DkL8V654.js","./ThemePluginSection-Dj2GGGoa.js","./schema-section-BdTNVIyL.js","./settings-fields-DLfIBRfX.js","./lint-plugins-CvfQPI2r.js","./OkCliPathRow-uIsebjQL.js","./SpellingSettings-BpZv35LE.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./preload-helper-Chd9yIcd.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{t as r}from"./react-f2sANaYj.js";import{n as i,r as a}from"./dist-Nvb76hAm.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./triangle-alert-BXrUEeRU.js";import{n as c,r as l,t as u}from"./alert-CF8zw7ni.js";import{t as d}from"./lazy-with-preload-vPXQq10U.js";import{r as f}from"./settings-host-gates-BdPynUVr.js";import{n as p}from"./settings-fields-DLfIBRfX.js";import{t as m}from"./SettingsSectionHeader-D-JSH4bX.js";var h=o(),g=e(r(),1),_=n();function v(e){return(0,g.lazy)(async()=>({default:await e()}))}var y=v(async()=>(await t(async()=>{let{SharingSection:e}=await import(`./SharingSection-B3wW6gUI.js`);return{SharingSection:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30]),import.meta.url)).SharingSection),b=v(async()=>(await t(async()=>{let{AccountSection:e}=await import(`./AccountSection-CcrCMfiM.js`);return{AccountSection:e}},__vite__mapDeps([31,1,2,3,4,32,6,7,8,13,14,15,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,53,54,55,56,57,58,59,60,19,20,12,9,21,61,18,11,23,62,63,64,65,25,66,67,68,69,70,71,72,73,74,75,26,27,29,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,28,24,30,95]),import.meta.url)).AccountSection),x=v(async()=>(await t(async()=>{let{AgentConnectionsSection:e}=await import(`./AgentConnectionsSection-DuO_iqz2.js`);return{AgentConnectionsSection:e}},__vite__mapDeps([96,1,52,2,3,4,97,6,7,8,11,12,13,14,15,98,23,25,99,100,101,38,39,40,41,42,43,44,45,46,47,48,49,75,62,69,102,72,103,104,105,77,21,61,29,27,106,107,32,18,19,20,108,22,109,110,78,111,112,113,114,115,9,10,66,37,116,117,118,26,76,119,120,121,122,123,124,125,126,127,24,28,128,94,129,130]),import.meta.url)).AgentConnectionsSection),S=v(async()=>(await t(async()=>{let{AttachmentsSection:e}=await import(`./AttachmentsSection-BJiZQ2MV.js`);return{AttachmentsSection:e}},__vite__mapDeps([131,1,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,60,19,20,6,7,12,9,21,61,18,14,15,11,23,62,63,132,97,133,10,27,134,135,5,109,136,137,91,72,138,32,29,76,77,78,119,120,94,30,139,84,140,24,25,26,28,141]),import.meta.url)).AttachmentsSection),C=v(async()=>(await t(async()=>{let{ContentRulesSection:e}=await import(`./ContentRulesSection-D4g32j4R.js`);return{ContentRulesSection:e}},__vite__mapDeps([142,34,1,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,60,19,20,6,7,12,9,21,61,18,14,15,11,23,62,63,32,97,143,144,145,146,147,24,25,26,27,28,84]),import.meta.url)).ContentRulesSection),w=v(async()=>(await t(async()=>{let{SectionSkeleton:e}=await import(`./field-controls-BshUGsc5.js`);return{SectionSkeleton:e}},__vite__mapDeps([148,132,1,2,3,4,35,60,19,20,6,7,8,12,9,21,61,18,13,14,15,11,23,62,63,97,133,10,27,134,135,5,109,57,37,136,137,91,72,138,32,16,38,39,40,41,42,43,44,45,46,47,48,49,29,76,77,78,119,120,94,30,139,50,51,52,53,56,58,59,84,140]),import.meta.url)).SectionSkeleton),T=v(async()=>(await t(async()=>{let{HotkeysSection:e}=await import(`./HotkeysSection-CR1clX0T.js`);return{HotkeysSection:e}},__vite__mapDeps([149,2,1,3,4,13,24,18,19,20,6,7,8,12,21,14,15,25,23,26,27,28,150,151,88,89,90]),import.meta.url)).HotkeysSection),E=v(async()=>(await t(async()=>{let{IntegrationsSection:e}=await import(`./IntegrationsSection-DXEcrIhV.js`);return{IntegrationsSection:e}},__vite__mapDeps([152,1,2,3,4,153,23,154,155,93,156,69,13,14,15,16,8,29,7,27,76,77,6,21,61,78,28,24,18,19,20,12,25,26]),import.meta.url)).IntegrationsSection),D=v(async()=>(await t(async()=>{let{LinkPreviewsSection:e}=await import(`./LinkPreviewsSection-rwx7LdIg.js`);return{LinkPreviewsSection:e}},__vite__mapDeps([157,1,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,97,6,7,11,12,14,15,24,18,19,20,21,25,23,26,27,28,29,76,77,61,78,84]),import.meta.url)).LinkPreviewsSection),O=v(async()=>(await t(async()=>{let{MarkdownlintPluginSection:e}=await import(`./LintingSection-D5I7tYlt.js`);return{MarkdownlintPluginSection:e}},__vite__mapDeps([158,1,159,51,160,161,90,162,163,164,165,166,167,168,169,170,20,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,52,16,8,53,54,55,56,57,2,58,59,89,144,145,171,172,173,146,23,174,91,175,176,177,178,179,180,28,86,181,182,126,105,6,7,77,21,61,29,27,15,14,32,97,11,12,183,184,185,60,19,9,18,62,63,64,186,125,187,188,189,65,190,154,191,72,76,78,66,134,155,93,156,192,67,193,194,22,69,107,195,196,136,102,110,197,198,199,82,83,84,200,201,202,203,204,26,94,151,79,80,205,206,207,208,122,209,124,130,117,210,143,147,25,211,68,212,213,73,214,106,215,113,114,115,10,108,111,112,100,116,118,216,217,218,219,220,24,221,137,119,120,30,222,223,224,225,226,87,88]),import.meta.url)).MarkdownlintPluginSection),k=v(async()=>(await t(async()=>{let{ProjectPluginsManageSection:e}=await import(`./LintingSection-D5I7tYlt.js`);return{ProjectPluginsManageSection:e}},__vite__mapDeps([158,1,159,51,160,161,90,162,163,164,165,166,167,168,169,170,20,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,52,16,8,53,54,55,56,57,2,58,59,89,144,145,171,172,173,146,23,174,91,175,176,177,178,179,180,28,86,181,182,126,105,6,7,77,21,61,29,27,15,14,32,97,11,12,183,184,185,60,19,9,18,62,63,64,186,125,187,188,189,65,190,154,191,72,76,78,66,134,155,93,156,192,67,193,194,22,69,107,195,196,136,102,110,197,198,199,82,83,84,200,201,202,203,204,26,94,151,79,80,205,206,207,208,122,209,124,130,117,210,143,147,25,211,68,212,213,73,214,106,215,113,114,115,10,108,111,112,100,116,118,216,217,218,219,220,24,221,137,119,120,30,222,223,224,225,226,87,88]),import.meta.url)).ProjectPluginsManageSection),A=v(async()=>(await t(async()=>{let{UserPluginsManageSection:e}=await import(`./LintingSection-D5I7tYlt.js`);return{UserPluginsManageSection:e}},__vite__mapDeps([158,1,159,51,160,161,90,162,163,164,165,166,167,168,169,170,20,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,52,16,8,53,54,55,56,57,2,58,59,89,144,145,171,172,173,146,23,174,91,175,176,177,178,179,180,28,86,181,182,126,105,6,7,77,21,61,29,27,15,14,32,97,11,12,183,184,185,60,19,9,18,62,63,64,186,125,187,188,189,65,190,154,191,72,76,78,66,134,155,93,156,192,67,193,194,22,69,107,195,196,136,102,110,197,198,199,82,83,84,200,201,202,203,204,26,94,151,79,80,205,206,207,208,122,209,124,130,117,210,143,147,25,211,68,212,213,73,214,106,215,113,114,115,10,108,111,112,100,116,118,216,217,218,219,220,24,221,137,119,120,30,222,223,224,225,226,87,88]),import.meta.url)).UserPluginsManageSection),j=v(async()=>(await t(async()=>{let{NetworkAccessSection:e}=await import(`./NetworkAccessSection-LjctJODc.js`);return{NetworkAccessSection:e}},__vite__mapDeps([227,1,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,105,6,7,77,21,61,29,27,15,14,32,5,9,10,11,12,97,24,18,19,20,25,23,26,28,94,228,84,140]),import.meta.url)).NetworkAccessSection),M=v(async()=>(await t(async()=>{let{OkignoreSection:e}=await import(`./OkignoreSection-BsqOZ0wD.js`);return{OkignoreSection:e}},__vite__mapDeps([229,1,230,8,4,2,3,18,19,20,6,7,12,21,13,14,15,62,23,231,72,78,16,199,52,176,177,43,42,178,59,45,180,82,83,39,84,49,181,200,201,202,203,46,24,25,26,27,28,232,29,94,30,141]),import.meta.url)).OkignoreSection),N=v(async()=>(await t(async()=>{let{ProjectTemplatesSection:e}=await import(`./ProjectTemplatesSection-7RWIVmXg.js`);return{ProjectTemplatesSection:e}},__vite__mapDeps([233,1,2,3,4,136,23,13,234,52,105,6,7,8,77,21,61,29,27,15,14,113,114,115,19,20,12,9,10,62,66,235,91,78,16,38,39,40,41,42,43,44,45,46,47,48,49,213,69,76,119,32,120,94,139,82,83,84,236,200,24,18,25,26,28,30,225,86,87,88,89,90]),import.meta.url)).ProjectTemplatesSection),P=v(async()=>(await t(async()=>{let{SearchSection:e}=await import(`./SearchSection-BS4FOrKH.js`);return{SearchSection:e}},__vite__mapDeps([237,1,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,64,6,7,97,11,12,14,15,66,23,238,82,83,84,24,18,19,20,21,25,26,27,28,29,76,77,61,78,119,32,120,94,140]),import.meta.url)).SearchSection),F=v(async()=>(await t(async()=>{let{SkillsManagerSection:e}=await import(`./SkillsManagerSection-C4ytRUcq.js`);return{SkillsManagerSection:e}},__vite__mapDeps([239,1,2,3,4,105,6,7,8,77,21,61,13,29,27,15,14,23,154,113,114,115,19,20,12,9,10,62,66,93,91,16,111,18,108,110,112,37,100,116,117,118,48,49,216,24,25,26,28,76,78,94,30,220,52,38,39,40,41,42,43,44,45,46,47,82,83,84,200,209,219,207,225,86,202,203,208,122,121]),import.meta.url)).SkillsManagerSection),I=v(async()=>(await t(async()=>{let{SlidesPluginSection:e}=await import(`./SlidesPluginSection-DuBoITZp.js`);return{SlidesPluginSection:e}},__vite__mapDeps([240,1,2,3,4,25,23,71,13,198,18,19,20,6,7,8,12,21,14,15,62,93,29,27,74,75,40,39,41,42,24,26,28,241,94,139,87,88,89,90]),import.meta.url)).SlidesPluginSection),L=v(async()=>(await t(async()=>{let{SyncSection:e}=await import(`./SyncSection-CrxvCruv.js`);return{SyncSection:e}},__vite__mapDeps([242,1,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,60,19,20,6,7,12,9,21,61,18,14,15,11,23,62,63,64,133,10,27,33,65,25,66,67,68,69,70,71,72,73,74,75,26,29,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,92,93,94,28,243,32,5,183,160,161,162,163,164,165,166,167,168,169,170,159,144,145,171,172,173,146,174,91,175,176,177,178,179,180,181,182,126,184,185,97,186,125,187,188,189,190,154,191,134,155,156,192,193,194,22,107,195,196,136,102,110,197,198,199,200,201,202,203,204,151,205,206,207,208,122,209,124,130,117,210,119,120,139,244,24,30]),import.meta.url)).SyncSection),R=v(async()=>(await t(async()=>{let{TerminalSection:e}=await import(`./TerminalSection-D8ayxcw-.js`);return{TerminalSection:e}},__vite__mapDeps([245,1,34,35,36,37,4,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,16,8,53,54,55,56,57,2,58,59,97,6,7,11,12,14,15,24,18,19,20,21,25,23,26,27,28,246,247,84]),import.meta.url)).TerminalSection),z=v(async()=>(await t(async()=>{let{ThemePluginSection:e}=await import(`./ThemePluginSection-Dj2GGGoa.js`);return{ThemePluginSection:e}},__vite__mapDeps([248,1,2,3,4,32,6,7,8,13,14,15,25,23,37,16,38,39,40,41,42,43,44,45,46,47,48,49,249,138,132,35,60,19,20,12,9,21,61,18,11,62,63,97,133,10,27,134,135,5,109,57,136,137,91,72,29,76,77,78,119,120,94,30,139,50,51,52,53,56,58,59,84,140,24,26,28,141,250]),import.meta.url)).ThemePluginSection),B=v(async()=>{let{LINT_PLUGIN_UI:e}=await t(async()=>{let{LINT_PLUGIN_UI:e}=await import(`./lint-plugins-CvfQPI2r.js`);return{LINT_PLUGIN_UI:e}},__vite__mapDeps([251,211,23,1,4,158,159,51,160,161,90,162,163,164,165,166,167,168,169,170,20,34,35,36,37,13,3,38,39,40,41,42,43,44,45,46,47,48,49,50,52,16,8,53,54,55,56,57,2,58,59,89,144,145,171,172,173,146,174,91,175,176,177,178,179,180,28,86,181,182,126,105,6,7,77,21,61,29,27,15,14,32,97,11,12,183,184,185,60,19,9,18,62,63,64,186,125,187,188,189,65,190,154,191,72,76,78,66,134,155,93,156,192,67,193,194,22,69,107,195,196,136,102,110,197,198,199,82,83,84,200,201,202,203,204,26,94,151,79,80,205,206,207,208,122,209,124,130,117,210,143,147,25,68,212,213,73,214,106,215,113,114,115,10,108,111,112,100,116,118,216,217,218,219,220,24,221,137,119,120,30,222,223,224,225,226,87,88]),import.meta.url);return function({id:t}){let n=e.find(e=>e.id===t);if(!n)return null;let r=n.Section;return(0,_.jsx)(r,{})}}),V=d(async()=>{let[{BoundSchemaSection:e},{OkCliPathRow:n},{SpellingSettings:r}]=await Promise.all([t(()=>import(`./schema-section-BdTNVIyL.js`),__vite__mapDeps([249,1,138,7,4,32,6,8,3,13,14,15,16,132,2,35,60,19,20,12,9,21,61,18,11,23,62,63,97,133,10,27,134,135,5,109,57,37,136,137,91,72,38,39,40,41,42,43,44,45,46,47,48,49,29,76,77,78,119,120,94,30,139,50,51,52,53,56,58,59,84,140,24,25,26,28,141]),import.meta.url),t(()=>import(`./OkCliPathRow-uIsebjQL.js`),__vite__mapDeps([252,1,2,3,4,106,6,7,8,11,12,62,23,107,13,14,15,32,18,19,20,21,22,16,29,27]),import.meta.url),t(()=>import(`./SpellingSettings-BpZv35LE.js`),__vite__mapDeps([253,1,20,19,6,7,4,8,3,12,52,2,97,11,13,14,15,18,21,62,23,137,78,16,175,132,35,60,9,61,63,133,10,27,134,135,5,109,57,37,136,91,72,138,32,38,39,40,41,42,43,44,45,46,47,48,49,29,76,77,119,120,94,30,139,50,51,53,56,58,59,84,140,150]),import.meta.url)]);return{default:function({title:t,description:i,binding:a}){return(0,_.jsx)(e,{title:t,description:i,scope:`user`,scopeBadge:`user`,binding:a,fields:p,slotsAfter:{"appearance.theme":(0,_.jsx)(n,{}),"appearance.language":(0,_.jsx)(r,{})}})}}}),H=V.preload;function U(e){let t=(0,h.c)(4),{loadFailed:n}=e;if(!n){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(w,{}),t[0]=e):e=t[0],e}let r;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,_.jsx)(s,{"aria-hidden":`true`}),t[1]=r):r=t[1];let a;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,_.jsx)(l,{children:(0,_.jsx)(i,{id:`PXg8xK`})}),t[2]=a):a=t[2];let o;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,_.jsxs)(u,{"data-testid":`settings-user-config-unavailable`,children:[r,a,(0,_.jsx)(c,{children:(0,_.jsx)(i,{id:`rFbQzX`})})]}),t[3]=o):o=t[3],o}function W(e){let t=(0,h.c)(36),{activeId:n,userBinding:r,userLoadFailed:o,okignoreBinding:s,okignoreSynced:c,markdownlintRuleQuery:l}=e,u=o===void 0?!1:o,{_:d}=a();if(n===`preferences`){let e;return t[0]!==d||t[1]!==r||t[2]!==u?(e=r?(0,_.jsx)(V,{title:d({id:`Q6hhn8`}),description:d({id:`Y_kL7X`}),binding:r}):(0,_.jsx)(U,{loadFailed:u}),t[0]=d,t[1]=r,t[2]=u,t[3]=e):e=t[3],e}if(n===`project-preferences`){let e;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(i,{id:`Q6hhn8`}),t[4]=e):e=t[4];let n;return t[5]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-project-preferences-title`,className:`space-y-8`,"data-testid":`settings-project-preferences`,children:[(0,_.jsx)(m,{titleId:`settings-project-preferences-title`,title:e,scope:`project`,children:(0,_.jsx)(i,{id:`FKVmcC`})}),(0,_.jsx)(S,{}),(0,_.jsx)(C,{}),f()?(0,_.jsx)(R,{}):null]}),t[5]=n):n=t[5],n}if(n===`agent-connections`){let e;return t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(x,{}),t[6]=e):e=t[6],e}if(n===`hotkeys`){let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(T,{}),t[7]=e):e=t[7],e}if(n===`account`){let e;return t[8]!==r||t[9]!==u?(e=r?(0,_.jsx)(b,{userBinding:r}):(0,_.jsx)(U,{loadFailed:u}),t[8]=r,t[9]=u,t[10]=e):e=t[10],e}if(n===`sync`){let e;return t[11]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsxs)(`section`,{"aria-labelledby":`settings-sync-sharing-title`,className:`space-y-8`,"data-testid":`settings-sync-sharing`,children:[(0,_.jsx)(m,{titleId:`settings-sync-sharing-title`,title:(0,_.jsx)(i,{id:`AznQ2V`}),children:(0,_.jsx)(i,{id:`HADdBA`})}),(0,_.jsx)(L,{}),(0,_.jsx)(y,{})]}),t[11]=e):e=t[11],e}if(n===`search`){let e;return t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(P,{}),t[12]=e):e=t[12],e}if(n===`link-previews`){let e;return t[13]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(D,{}),t[13]=e):e=t[13],e}if(n===`plugins-manage`){let e;return t[14]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(k,{}),t[14]=e):e=t[14],e}if(n===`user-plugins-manage`){let e;return t[15]===r?e=t[16]:(e=(0,_.jsx)(A,{userBinding:r}),t[15]=r,t[16]=e),e}if(n===`plugin:theme`){let e;return t[17]!==r||t[18]!==u?(e=r?(0,_.jsx)(z,{userBinding:r}):(0,_.jsx)(U,{loadFailed:u}),t[17]=r,t[18]=u,t[19]=e):e=t[19],e}if(n===`plugin:slides`){let e;return t[20]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(I,{}),t[20]=e):e=t[20],e}if(n===`plugin:markdownlint`){let e=l??null,n;return t[21]===e?n=t[22]:(n=(0,_.jsx)(O,{initialRuleQuery:e}),t[21]=e,t[22]=n),n}if(n.startsWith(`plugin:`)){let e;t[23]===n?e=t[24]:(e=n.slice(7),t[23]=n,t[24]=e);let r;return t[25]!==n||t[26]!==e?(r=(0,_.jsx)(B,{id:e},n),t[25]=n,t[26]=e,t[27]=r):r=t[27],r}if(n===`project-templates`){let e;return t[28]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(N,{}),t[28]=e):e=t[28],e}if(n===`skills`){let e;return t[29]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(F,{scope:`project`}),t[29]=e):e=t[29],e}if(n===`user-skills`){let e;return t[30]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(F,{scope:`global`}),t[30]=e):e=t[30],e}if(n===`okignore`){let e;return t[31]!==s||t[32]!==c?(e=(0,_.jsx)(M,{binding:s,synced:c}),t[31]=s,t[32]=c,t[33]=e):e=t[33],e}if(n===`network-access`){let e;return t[34]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(j,{}),t[34]=e):e=t[34],e}if(n===`claude-desktop`){let e;return t[35]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,_.jsx)(E,{}),t[35]=e):e=t[35],e}return null}export{W as SettingsDialogBody,H as preloadPreferencesSection};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./saved-themes-client-DQK5ylqX.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./field-controls-BBWVj3AF.js";export{e as SectionSkeleton};
|