@inkeep/open-knowledge 0.87.6 → 0.87.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.
Files changed (137) hide show
  1. package/dist/assets/skills/project/references/conflict-resolution.md +1 -1
  2. package/dist/assets/skills/project/references/doc-editing.md +1 -1
  3. package/dist/cli.mjs +72 -72
  4. package/dist/constants-wCQfICWN.mjs +1 -0
  5. package/dist/{dist-BCgS3tMP.mjs → dist-BJZIDN3k.mjs} +502 -502
  6. package/dist/{dist-Bahmzpn7.mjs → dist-Dly9AMSy.mjs} +1 -1
  7. package/dist/index.mjs +223 -223
  8. package/dist/{init-CMq3nWYa.mjs → init-DFoAgX20.mjs} +37 -37
  9. package/dist/init-DvoEz8sG.mjs +1 -0
  10. package/dist/{launch-json-removal-nTBFtHl-.mjs → launch-json-removal-4BsSVH6y.mjs} +1 -1
  11. package/dist/{loader-3RybSKD0.mjs → loader-DPvRxBUd.mjs} +1 -1
  12. package/dist/loader-DdLopZ3r.mjs +1 -0
  13. package/dist/{md-manager-BGnqyqi1-BeOFzphu.mjs → md-manager-BGnqyqi1-CuOBBDL0.mjs} +140 -140
  14. package/dist/{open-browser-CtoHi9I1.mjs → open-browser-Dn4EWvoa.mjs} +1 -1
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-DM8Y8VM9.mjs → preview-COOcHnbs.mjs} +1 -1
  17. package/dist/preview-D8gDYXIZ.mjs +1 -0
  18. package/dist/public/assets/{AccountSection-BoccBfx6.js → AccountSection-5hIj1Ywi.js} +1 -1
  19. package/dist/public/assets/{ActivityModeContent-CNPnra1u.js → ActivityModeContent-DxK2vP9C.js} +1 -1
  20. package/dist/public/assets/{AddPropertiesButton-DBmLjAsi.js → AddPropertiesButton-C8Q5GH74.js} +2 -2
  21. package/dist/public/assets/{AgentConnectionsSection-CFTMQXUz.js → AgentConnectionsSection-BP4v8Jzk.js} +1 -1
  22. package/dist/public/assets/{AgentDiffPane-CwXg1_JA.js → AgentDiffPane-CBTJtBVL.js} +1 -1
  23. package/dist/public/assets/{AttachmentsSection-Cb-AQ8gb.js → AttachmentsSection-98LztrgK.js} +1 -1
  24. package/dist/public/assets/{AuthModal-CDv9Ka9d.js → AuthModal-DR2nnIe4.js} +1 -1
  25. package/dist/public/assets/{CodeMirrorPropInput-BylEaDRS.js → CodeMirrorPropInput-Co68Qtgj.js} +1 -1
  26. package/dist/public/assets/{ContentRulesSection-CybFuqi0.js → ContentRulesSection-6_hKvwws.js} +1 -1
  27. package/dist/public/assets/{DiffViewBoundary-DS5sFg8l.js → DiffViewBoundary-HF9wG1D5.js} +1 -1
  28. package/dist/public/assets/{DocumentContext-CUqscNM0.js → DocumentContext-BDehDo5h.js} +1 -1
  29. package/dist/public/assets/{EditorModeToggle-Dkkd8RQ0.js → EditorModeToggle-DVN_dozt.js} +1 -1
  30. package/dist/public/assets/{ExcalidrawDocEditor--5ZtW451.js → ExcalidrawDocEditor-TnqIl-Pg.js} +1 -1
  31. package/dist/public/assets/FeedbackForm-DDMzZj0T.js +1 -0
  32. package/dist/public/assets/{GraphPanel-BqNuC1PH.js → GraphPanel-D-NAOA44.js} +1 -1
  33. package/dist/public/assets/{ImportSkillDialog-3UdvnRCe.js → ImportSkillDialog-Bs0VIZvT.js} +1 -1
  34. package/dist/public/assets/{LinkPreviewsSection-BTDA2atC.js → LinkPreviewsSection-Dr5fmtZr.js} +1 -1
  35. package/dist/public/assets/{LintConfigEditor-Bd8kaAgh.js → LintConfigEditor-WbVu7H_A.js} +1 -1
  36. package/dist/public/assets/{LintingSection-DUMuHerm.js → LintingSection-XMXkf-vv.js} +1 -1
  37. package/dist/public/assets/ManagedArtifactProperties-DA7a-weA.js +1 -0
  38. package/dist/public/assets/{ManagedArtifactProperties-BS1cxvbW.js → ManagedArtifactProperties-DqShcsiZ.js} +1 -1
  39. package/dist/public/assets/{MermaidDocEditor-CqqLk_Mh.js → MermaidDocEditor-DQQrPAhr.js} +1 -1
  40. package/dist/public/assets/{NetworkAccessSection-BFSyRt3w.js → NetworkAccessSection-DCs676MG.js} +1 -1
  41. package/dist/public/assets/{ProjectTemplatesSection-BtUwaSYs.js → ProjectTemplatesSection-B7Ooul87.js} +1 -1
  42. package/dist/public/assets/{PropertyDisplayRow-B2fYD10U.js → PropertyDisplayRow-BrprDBf7.js} +1 -1
  43. package/dist/public/assets/{PublishToGitHubDialog-D3zz0mDr.js → PublishToGitHubDialog-Tv6p7uVq.js} +1 -1
  44. package/dist/public/assets/{RegisteredAgentIcon-B0qjAvei.js → RegisteredAgentIcon-CAJfDHjD.js} +1 -1
  45. package/dist/public/assets/{SchemaConfigEditor-BPwXrf5p.js → SchemaConfigEditor-Dt7B-r1C.js} +1 -1
  46. package/dist/public/assets/{SearchSection-DtTQQspB.js → SearchSection-LiYk8r8A.js} +1 -1
  47. package/dist/public/assets/{SessionsHost-FipBtqUM.js → SessionsHost-DM1p-E_r.js} +2 -2
  48. package/dist/public/assets/{SettingsDialogBody-1SBj7m-H.js → SettingsDialogBody-gIqPA-06.js} +2 -2
  49. package/dist/public/assets/{ShareReceiveMissDialog-BbsAB4Zm.js → ShareReceiveMissDialog-Brp9IMno.js} +1 -1
  50. package/dist/public/assets/{SkillCostValue-DK-VfwfI.js → SkillCostValue-BFJMlQId.js} +1 -1
  51. package/dist/public/assets/{SkillForkDialog-Cp2VfBKT.js → SkillForkDialog-cfPQA1If.js} +1 -1
  52. package/dist/public/assets/{SkillInstallMenu-CsSIF4d7.js → SkillInstallMenu-CpyTgAOO.js} +1 -1
  53. package/dist/public/assets/{SkillOriginInline-DXmcEqEw.js → SkillOriginInline-reReggq9.js} +1 -1
  54. package/dist/public/assets/{SkillPluginBundleDialog-D8f_Pygy.js → SkillPluginBundleDialog-Ct2pafVZ.js} +1 -1
  55. package/dist/public/assets/{SkillToolbarControls-BqMhdWz_.js → SkillToolbarControls-HwGhpS1F.js} +1 -1
  56. package/dist/public/assets/{SkillsManagerSection-BQ6eCTsP.js → SkillsManagerSection-Ba3qS3d6.js} +1 -1
  57. package/dist/public/assets/{SlidesToolbarControls-DXn_DkWH.js → SlidesToolbarControls-Ctd7A4Q8.js} +1 -1
  58. package/dist/public/assets/{SourceEditor-DolwFQ_n.js → SourceEditor-CNmpPANh.js} +1 -1
  59. package/dist/public/assets/{SpellingSettings-Bqz9pslj.js → SpellingSettings-CWteA58C.js} +1 -1
  60. package/dist/public/assets/{SyncSection-X92LOabz.js → SyncSection-C8nHOofm.js} +1 -1
  61. package/dist/public/assets/{SyncStatusBadge-MYUQfkav.js → SyncStatusBadge-BDTWfT7H.js} +1 -1
  62. package/dist/public/assets/{TemplateRow-CQTK4uJX.js → TemplateRow-DybWEh-V.js} +1 -1
  63. package/dist/public/assets/{TerminalLaunchContext-VC_1IQ2O.js → TerminalLaunchContext-zaxrx8Ob.js} +1 -1
  64. package/dist/public/assets/{TerminalPanel-DYxs61YB.js → TerminalPanel-CzyduRsB.js} +1 -1
  65. package/dist/public/assets/{TerminalSection-DBkXMZL1.js → TerminalSection-BE6sW3r8.js} +1 -1
  66. package/dist/public/assets/{TerminalWindowApp-gfW7MU1G.js → TerminalWindowApp-BuA61_Qt.js} +1 -1
  67. package/dist/public/assets/{TextDocEditor-BS99jSE3.js → TextDocEditor-B-4zePS8.js} +1 -1
  68. package/dist/public/assets/{ThemePluginSection-DyuaEmFe.js → ThemePluginSection-GfXRIsMz.js} +1 -1
  69. package/dist/public/assets/{ThreadView-Bxd_Y88x.js → ThreadView-Bd3MtAsq.js} +1 -1
  70. package/dist/public/assets/{TimelineDiffPane-CggwMmmO.js → TimelineDiffPane-BUs1FdYV.js} +1 -1
  71. package/dist/public/assets/{agent-connections-BdU_6bUV.js → agent-connections-CKjjlHMQ.js} +1 -1
  72. package/dist/public/assets/{agent-registry-BdHe0AEQ.js → agent-registry-CHWxsZbl.js} +1 -1
  73. package/dist/public/assets/{bridge-BMIee44l.js → bridge-nc43unzY.js} +1 -1
  74. package/dist/public/assets/{catalog-CEXii1s5.js → catalog-B9JwWDPk.js} +1 -1
  75. package/dist/public/assets/{client-version-t-JbjjxV.js → client-version-CLoB560i.js} +1 -1
  76. package/dist/public/assets/{comment-chips-DlClgeJp.js → comment-chips-7O0rkVt9.js} +1 -1
  77. package/dist/public/assets/{config-provider-Czqe_ZMN.js → config-provider-CZyNT69z.js} +1 -1
  78. package/dist/public/assets/config-schema-B9u6M8He.js +1 -0
  79. package/dist/public/assets/{css-color-to-hex-Csde6-Qs.js → css-color-to-hex-BUw_awQK.js} +1 -1
  80. package/dist/public/assets/{doc-undo-manager-CbhM5c-w.js → doc-undo-manager-C39elvdt.js} +1 -1
  81. package/dist/public/assets/field-controls-CKK_bzDT.js +1 -0
  82. package/dist/public/assets/{field-controls-D31F23S8.js → field-controls-kKc5F9zV.js} +1 -1
  83. package/dist/public/assets/{ime-composition-B56Lnl92.js → ime-composition-sf57BdPh.js} +1 -1
  84. package/dist/public/assets/{index-Cg57di3n.js → index-BVDqMhbr.js} +7 -7
  85. package/dist/public/assets/{lint-config-client-CLttd-hM.js → lint-config-client-CMydN46i.js} +1 -1
  86. package/dist/public/assets/{lint-plugins-CGhNlBxc.js → lint-plugins-B9Sx6T-K.js} +1 -1
  87. package/dist/public/assets/{markdown-lint-wCP_bSbs.js → markdown-lint-B8Z_0Kvy.js} +1 -1
  88. package/dist/public/assets/{markdownlint-rule-browser-nIryvJXe.js → markdownlint-rule-browser-CXbjrFdy.js} +1 -1
  89. package/dist/public/assets/{pending-receive-nav-store-D3GdSDoW.js → pending-receive-nav-store-B4VaB7tn.js} +1 -1
  90. package/dist/public/assets/{preferred-session-events-CgmuJluh.js → preferred-session-events-CrFREFZ_.js} +1 -1
  91. package/dist/public/assets/{progress-DSTt93jH.js → progress-18OX3ADn.js} +1 -1
  92. package/dist/public/assets/{saved-themes-client-BPWMEtsb.js → saved-themes-client-DmclwZ8v.js} +1 -1
  93. package/dist/public/assets/{schema-section-Ceiv9_HZ.js → schema-section-BXgkFDyQ.js} +1 -1
  94. package/dist/public/assets/{schemas-api-CL5ZXlEj.js → schemas-api-B9gBqMLK.js} +1 -1
  95. package/dist/public/assets/{selection-context-DDzIsV4R.js → selection-context-CfhVNTq2.js} +1 -1
  96. package/dist/public/assets/{skills-api-DjykKWn7.js → skills-api-5TsLTlcr.js} +1 -1
  97. package/dist/public/assets/{src-WuWF2bZL.js → src-CXLgOvQh.js} +1 -1
  98. package/dist/public/assets/storage-scope-Cnm-5Aal.js +1 -0
  99. package/dist/public/assets/{tag-pill-input-D_fe_Zbo.js → tag-pill-input-DOxurUWT.js} +1 -1
  100. package/dist/public/assets/{telemetry-impl-wSSCAdRc.js → telemetry-impl-D7Q93UnT.js} +1 -1
  101. package/dist/public/assets/{telemetry-startup-Cgub3Wcm.js → telemetry-startup-BmNczWSW.js} +1 -1
  102. package/dist/public/assets/{terminal-launch-events-3vnER_eI.js → terminal-launch-events-BFXRsi4V.js} +1 -1
  103. package/dist/public/assets/{typing-burst-detector-BBhFoOzd.js → typing-burst-detector-nD07A0yS.js} +1 -1
  104. package/dist/public/assets/{use-activity-panel-qHwa4JTF.js → use-activity-panel-BBjBZOw4.js} +1 -1
  105. package/dist/public/assets/{use-apply-config-color-theme-Bpi7AD0s.js → use-apply-config-color-theme-BPRaqk9x.js} +1 -1
  106. package/dist/public/assets/{use-conflicts-CIjDyM9c.js → use-conflicts-BKMO-Ys4.js} +1 -1
  107. package/dist/public/assets/{use-live-xterm-theme-BJbDRXxo.js → use-live-xterm-theme-8O2LGwCv.js} +1 -1
  108. package/dist/public/assets/{use-open-skill-3tDIxH_z.js → use-open-skill-Cg7Qb-lN.js} +1 -1
  109. package/dist/public/assets/{use-semantic-search-status-D9HCPCCa.js → use-semantic-search-status-lORVQFbY.js} +1 -1
  110. package/dist/public/assets/{use-skill-origin-CiJpOXFq.js → use-skill-origin-14pvHqaa.js} +1 -1
  111. package/dist/public/assets/{use-skill-targets-EVebu2kh.js → use-skill-targets-d0ssmszt.js} +1 -1
  112. package/dist/public/assets/{use-skills-BWAh3dDS.js → use-skills-CEIGHZpc.js} +1 -1
  113. package/dist/public/assets/{use-terminal-enabled-DodRuzTa.js → use-terminal-enabled-gzWlI4Jz.js} +1 -1
  114. package/dist/public/assets/{use-timeline-entry-diff-Bc_-dfRX.js → use-timeline-entry-diff-D00Cmyyj.js} +1 -1
  115. package/dist/public/assets/{use-workspace-h2j0Puyv.js → use-workspace-CAGIeY37.js} +1 -1
  116. package/dist/public/index.html +47 -47
  117. package/dist/{registry-probes-BPfJ5Mbm.mjs → registry-probes-XAh0dMwy.mjs} +7 -7
  118. package/dist/{removal-file-path-BPtBJty1.mjs → removal-file-path-B7jm5zS-.mjs} +1 -1
  119. package/dist/{repair-launch-json-CJiDy3Uu.mjs → repair-launch-json-BMHc6HTH.mjs} +1 -1
  120. package/dist/{repair-mcp-configs-B06-_Z2n.mjs → repair-mcp-configs-q4j978ub.mjs} +1 -1
  121. package/dist/src-CcMRvSRU.mjs +1 -0
  122. package/dist/src-RPvkOvVk.mjs +16 -0
  123. package/dist/start-C4Tih_DW.mjs +1 -0
  124. package/dist/{start-CfKiNaO-.mjs → start-DsVVe_gU.mjs} +3 -3
  125. package/package.json +4 -4
  126. package/dist/constants-CL8sDEOf.mjs +0 -1
  127. package/dist/init-CoLgNutq.mjs +0 -1
  128. package/dist/loader-DdkMZk2A.mjs +0 -1
  129. package/dist/preview-lYuQVTsq.mjs +0 -1
  130. package/dist/public/assets/FeedbackForm-a6rCXxKK.js +0 -1
  131. package/dist/public/assets/ManagedArtifactProperties-CmyuawfQ.js +0 -1
  132. package/dist/public/assets/config-schema-gPKGwQR7.js +0 -1
  133. package/dist/public/assets/field-controls-BpWrodXJ.js +0 -1
  134. package/dist/public/assets/storage-scope-GPc8n3Ml.js +0 -1
  135. package/dist/src-BMqbglGv.mjs +0 -16
  136. package/dist/src-BzIV2zM8.mjs +0 -1
  137. package/dist/start-CCX8sVBo.mjs +0 -1
@@ -0,0 +1 @@
1
+ import"./dist-BJZIDN3k.mjs";import{v as e}from"./init-DFoAgX20.mjs";export{e as runInit};
@@ -1 +1 @@
1
- import{ls as e,ms as t,os as n}from"./dist-BCgS3tMP.mjs";import{N as r,j as i,k as a}from"./init-CMq3nWYa.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-BPtBJty1.mjs";import{join as c}from"node:path";import{readFileSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(o){let f=s(c(o,`.claude`,`launch.json`));if(f.kind!==`ready`)return f;let m=f.path,h;try{h=l(m,`utf-8`)}catch(e){return{kind:`declined`,reason:r(e)}}let g=[],_=e(h,g,u)??void 0;if(g.some(e=>!d(e,h))||_?.type!==`object`)return{kind:`declined`,reason:`unparseable`};let v=n(_).configurations;if(!Array.isArray(v))return{kind:`not-present`};let y=v.findIndex(p);if(y===-1)return{kind:`not-present`};let{text:b,changed:x}=i(h,[`configurations`,y]);return x?(t(m,b,{mode:a(m)}),{kind:`removed`}):{kind:`not-present`}}function p(e){if(!o(e))return!1;let t=e;if(t.name!==`open-knowledge-ui`||!Array.isArray(t.runtimeArgs))return!1;let n=t.runtimeArgs;return t.runtimeExecutable===`/bin/sh`?n.length===3&&n[0]===`-l`&&n[1]===`-c`&&typeof n[2]==`string`&&/^# ok-ui-v[1-9]\d*$/.test(n[2].split(/\r?\n/,1)[0]??``):t.runtimeExecutable===`npx`?m.some(e=>h(n,e)):t.runtimeExecutable===`powershell`&&n.length===4&&n[0]===`-NoProfile`&&n[1]===`-NonInteractive`&&n[2]===`-Command`&&typeof n[3]==`string`&&/^# ok-ui-win-v[1-9]\d*$/.test(n[3].split(/\r?\n/,1)[0]??``)}const m=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge@latest`,`ui`]];function h(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}export{f as t};
1
+ import{ls as e,ms as t,os as n}from"./dist-BJZIDN3k.mjs";import{N as r,j as i,k as a}from"./init-DFoAgX20.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-B7jm5zS-.mjs";import{join as c}from"node:path";import{readFileSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(o){let f=s(c(o,`.claude`,`launch.json`));if(f.kind!==`ready`)return f;let m=f.path,h;try{h=l(m,`utf-8`)}catch(e){return{kind:`declined`,reason:r(e)}}let g=[],_=e(h,g,u)??void 0;if(g.some(e=>!d(e,h))||_?.type!==`object`)return{kind:`declined`,reason:`unparseable`};let v=n(_).configurations;if(!Array.isArray(v))return{kind:`not-present`};let y=v.findIndex(p);if(y===-1)return{kind:`not-present`};let{text:b,changed:x}=i(h,[`configurations`,y]);return x?(t(m,b,{mode:a(m)}),{kind:`removed`}):{kind:`not-present`}}function p(e){if(!o(e))return!1;let t=e;if(t.name!==`open-knowledge-ui`||!Array.isArray(t.runtimeArgs))return!1;let n=t.runtimeArgs;return t.runtimeExecutable===`/bin/sh`?n.length===3&&n[0]===`-l`&&n[1]===`-c`&&typeof n[2]==`string`&&/^# ok-ui-v[1-9]\d*$/.test(n[2].split(/\r?\n/,1)[0]??``):t.runtimeExecutable===`npx`?m.some(e=>h(n,e)):t.runtimeExecutable===`powershell`&&n.length===4&&n[0]===`-NoProfile`&&n[1]===`-NonInteractive`&&n[2]===`-Command`&&typeof n[3]==`string`&&/^# ok-ui-win-v[1-9]\d*$/.test(n[3].split(/\r?\n/,1)[0]??``)}const m=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge@latest`,`ui`]];function h(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}export{f as t};
@@ -1 +1 @@
1
- import{$u as e,Ic as t,Pc as n,cl as r,il as i,k as a,nl as o}from"./md-manager-BGnqyqi1-BeOFzphu.mjs";import{bs as s,vs as c,x as l}from"./dist-BCgS3tMP.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-CL8sDEOf.mjs";import{resolve as f}from"node:path";import{existsSync as p,readFileSync as m}from"node:fs";import{realpath as h}from"node:fs/promises";var g=e();async function _(e){let t=f(e);try{return await h(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function v(e){if(!p(e))return{value:null,path:e,source:null,doc:null};let t;try{t=m(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,g.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function y(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),r={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=i({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...r,source:e}}return r})}function b(e){let i=e??process.cwd(),u=[],p=[],m=[],h=[],g=s(`user`,i),_=c({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(e,t=!1)=>{let n=v(e);if(n.diagnostic!==void 0&&p.push(n.diagnostic),n.value===null)return{};let i=o({value:n.value,file:n.path,source:n.source,doc:n.doc});p.push(...i),u.push(e);let s=i.length>0?r(n.value):n.value;return t&&h.push(...a({value:s,file:n.path,source:n.source,doc:n.doc})),s},x=f(i,`.ok`,d),S=b(x,!0),C=b(s(`project-local`,i)),w=n(_.value,S,C),T=l.safeParse(w);if(!T.success){let e=v(x),n={code:`SCHEMA_INVALID`,issues:y(T.error.issues,e)};throw Error(t(n))}return{config:T.data,sources:u,diagnostics:p,sidelined:m,ignoredCommittedKeys:h}}function x(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=_(e.startupCwd);return async o=>{let s=await _(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,x as t};
1
+ import{Fc as e,Lc as t,al as n,ed as r,k as i,ll as a,rl as o}from"./md-manager-BGnqyqi1-CuOBBDL0.mjs";import{bs as s,vs as c,x as l}from"./dist-BJZIDN3k.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-wCQfICWN.mjs";import{resolve as f}from"node:path";import{existsSync as p,readFileSync as m}from"node:fs";import{realpath as h}from"node:fs/promises";var g=r();async function _(e){let t=f(e);try{return await h(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function v(e){if(!p(e))return{value:null,path:e,source:null,doc:null};let t;try{t=m(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,g.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function y(e,t){return e.map(e=>{let r=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=n({file:t.path,source:t.source,doc:t.doc,path:r});if(e!==void 0)return{...i,source:e}}return i})}function b(n){let r=n??process.cwd(),u=[],p=[],m=[],h=[],g=s(`user`,r),_=c({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(e,t=!1)=>{let n=v(e);if(n.diagnostic!==void 0&&p.push(n.diagnostic),n.value===null)return{};let r=o({value:n.value,file:n.path,source:n.source,doc:n.doc});p.push(...r),u.push(e);let s=r.length>0?a(n.value):n.value;return t&&h.push(...i({value:s,file:n.path,source:n.source,doc:n.doc})),s},x=f(r,`.ok`,d),S=b(x,!0),C=b(s(`project-local`,r)),w=e(_.value,S,C),T=l.safeParse(w);if(!T.success){let e=v(x),n={code:`SCHEMA_INVALID`,issues:y(T.error.issues,e)};throw Error(t(n))}return{config:T.data,sources:u,diagnostics:p,sidelined:m,ignoredCommittedKeys:h}}function x(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=_(e.startupCwd);return async o=>{let s=await _(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,x as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./loader-DPvRxBUd.mjs";export{e as loadConfig};