@inkeep/open-knowledge 0.87.3 → 0.87.4-beta.0

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 (145) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +1 -0
  2. package/dist/assets/skills/project/references/conflict-resolution.md +1 -1
  3. package/dist/assets/skills/project/references/doc-editing.md +1 -1
  4. package/dist/cli.mjs +75 -75
  5. package/dist/constants-BxYU-W85.mjs +1 -0
  6. package/dist/dist-BJZIDN3k.mjs +2220 -0
  7. package/dist/dist-Dly9AMSy.mjs +1 -0
  8. package/dist/index.d.mts +1 -0
  9. package/dist/index.mjs +223 -223
  10. package/dist/init-BECqR4z5.mjs +1 -0
  11. package/dist/{init-DKr3mAYb.mjs → init-DAt352Cb.mjs} +37 -37
  12. package/dist/{launch-json-removal-DZEf1Xkv.mjs → launch-json-removal-Dgb32hCB.mjs} +1 -1
  13. package/dist/{loader-BjiMfGjg.mjs → loader-B6O7IvYr.mjs} +1 -1
  14. package/dist/loader-DGSDCWET.mjs +1 -0
  15. package/dist/{md-manager-BGnqyqi1-I7NmBKjQ.mjs → md-manager-BGnqyqi1-CuOBBDL0.mjs} +140 -140
  16. package/dist/{open-browser-kPiLSvpr.mjs → open-browser-Dn4EWvoa.mjs} +1 -1
  17. package/dist/parse-worker.mjs +1 -1
  18. package/dist/preview-BagRttds.mjs +1 -0
  19. package/dist/{preview-DYak5SYR.mjs → preview-vam38uZa.mjs} +1 -1
  20. package/dist/public/assets/{AccountSection-xEdD05tW.js → AccountSection-CB7CDjMG.js} +1 -1
  21. package/dist/public/assets/{ActivityModeContent-CmpyZXn6.js → ActivityModeContent-DvPNvgf8.js} +1 -1
  22. package/dist/public/assets/{AddPropertiesButton-CaGJK03A.js → AddPropertiesButton-D9O40Sa0.js} +2 -2
  23. package/dist/public/assets/{AgentConnectionsSection-CFTMQXUz.js → AgentConnectionsSection-BP4v8Jzk.js} +1 -1
  24. package/dist/public/assets/{AgentDiffPane-CeQSD852.js → AgentDiffPane-0_6Kk-OC.js} +1 -1
  25. package/dist/public/assets/{AttachmentsSection-CItcxDXd.js → AttachmentsSection-DfG9Nl_-.js} +1 -1
  26. package/dist/public/assets/{AuthModal-CDv9Ka9d.js → AuthModal-DR2nnIe4.js} +1 -1
  27. package/dist/public/assets/{CodeMirrorPropInput-B_mJwxj5.js → CodeMirrorPropInput-u2_2jHS_.js} +1 -1
  28. package/dist/public/assets/{ContentRulesSection-Cf2VMeVj.js → ContentRulesSection-3US5PoEh.js} +1 -1
  29. package/dist/public/assets/{DiffViewBoundary-DS5sFg8l.js → DiffViewBoundary-HF9wG1D5.js} +1 -1
  30. package/dist/public/assets/{DocumentContext-CwQ1oaSh.js → DocumentContext-DUjEW8u4.js} +1 -1
  31. package/dist/public/assets/{EditorModeToggle-CsNsdazg.js → EditorModeToggle-Cu0pHbiP.js} +1 -1
  32. package/dist/public/assets/{ExcalidrawDocEditor-D3s-BPUM.js → ExcalidrawDocEditor-Bip9Ubqq.js} +1 -1
  33. package/dist/public/assets/FeedbackForm-CusD41pH.js +1 -0
  34. package/dist/public/assets/{GraphPanel-BqNuC1PH.js → GraphPanel-D-NAOA44.js} +1 -1
  35. package/dist/public/assets/{ImportSkillDialog-Uih4wSGU.js → ImportSkillDialog-CpvbAEjJ.js} +1 -1
  36. package/dist/public/assets/{LinkPreviewsSection-Dauw-uzK.js → LinkPreviewsSection-B4A0DxBJ.js} +1 -1
  37. package/dist/public/assets/{LintConfigEditor-DUoZy0bj.js → LintConfigEditor-DFBRocCp.js} +1 -1
  38. package/dist/public/assets/{LintingSection-xaQv5BXj.js → LintingSection-4xNHBcmO.js} +1 -1
  39. package/dist/public/assets/{ManagedArtifactProperties-RRJJJ5iD.js → ManagedArtifactProperties-CLFV7Mcu.js} +1 -1
  40. package/dist/public/assets/ManagedArtifactProperties-DRdRpbdP.js +1 -0
  41. package/dist/public/assets/{MermaidDocEditor-DgWz43Vs.js → MermaidDocEditor-DhAt04cF.js} +1 -1
  42. package/dist/public/assets/{NetworkAccessSection-CCP2ad6X.js → NetworkAccessSection-5V9ZCRBW.js} +1 -1
  43. package/dist/public/assets/{ProjectTemplatesSection-BtUwaSYs.js → ProjectTemplatesSection-B7Ooul87.js} +1 -1
  44. package/dist/public/assets/{PropertyDisplayRow-V938UoF4.js → PropertyDisplayRow-D43pENxf.js} +1 -1
  45. package/dist/public/assets/{PublishToGitHubDialog-CfAyMsqz.js → PublishToGitHubDialog-CNTkWUNd.js} +1 -1
  46. package/dist/public/assets/{RegisteredAgentIcon-B0qjAvei.js → RegisteredAgentIcon-CAJfDHjD.js} +1 -1
  47. package/dist/public/assets/{SchemaConfigEditor-7kpbhfQO.js → SchemaConfigEditor-Csu8qLuF.js} +1 -1
  48. package/dist/public/assets/{SearchSection-3golRmTw.js → SearchSection-DVvMh3lH.js} +1 -1
  49. package/dist/public/assets/{SessionsHost-BZS5gjJ9.js → SessionsHost-DfZwS6qh.js} +2 -2
  50. package/dist/public/assets/{SettingsDialogBody-CMfti5d7.js → SettingsDialogBody-DqYqc4my.js} +2 -2
  51. package/dist/public/assets/{ShareReceiveMissDialog-DGhF69QI.js → ShareReceiveMissDialog-BkT_YdaX.js} +1 -1
  52. package/dist/public/assets/{SkillCostValue-DK-VfwfI.js → SkillCostValue-BFJMlQId.js} +1 -1
  53. package/dist/public/assets/{SkillForkDialog-Cp2VfBKT.js → SkillForkDialog-cfPQA1If.js} +1 -1
  54. package/dist/public/assets/{SkillInstallMenu-CsSIF4d7.js → SkillInstallMenu-CpyTgAOO.js} +1 -1
  55. package/dist/public/assets/{SkillOriginInline-DXmcEqEw.js → SkillOriginInline-reReggq9.js} +1 -1
  56. package/dist/public/assets/{SkillPluginBundleDialog-D8f_Pygy.js → SkillPluginBundleDialog-Ct2pafVZ.js} +1 -1
  57. package/dist/public/assets/{SkillToolbarControls-Bfnu-caI.js → SkillToolbarControls-Dt7zvk3G.js} +1 -1
  58. package/dist/public/assets/{SkillsManagerSection-BQ6eCTsP.js → SkillsManagerSection-Ba3qS3d6.js} +1 -1
  59. package/dist/public/assets/{SlidesToolbarControls-DXn_DkWH.js → SlidesToolbarControls-Ctd7A4Q8.js} +1 -1
  60. package/dist/public/assets/{SourceEditor-uyVGPZVz.js → SourceEditor-Bhh0RMkf.js} +1 -1
  61. package/dist/public/assets/{SpellingSettings-Bqz9pslj.js → SpellingSettings-CWteA58C.js} +1 -1
  62. package/dist/public/assets/{SyncSection-CHdkBvr_.js → SyncSection-96p0Bvsg.js} +1 -1
  63. package/dist/public/assets/{SyncStatusBadge-D8kZ-UVu.js → SyncStatusBadge-Bi-a1KVS.js} +1 -1
  64. package/dist/public/assets/{TemplateRow-CQTK4uJX.js → TemplateRow-DybWEh-V.js} +1 -1
  65. package/dist/public/assets/{TerminalLaunchContext-VC_1IQ2O.js → TerminalLaunchContext-zaxrx8Ob.js} +1 -1
  66. package/dist/public/assets/{TerminalPanel-DYxs61YB.js → TerminalPanel-CzyduRsB.js} +1 -1
  67. package/dist/public/assets/{TerminalSection-DSwPotQY.js → TerminalSection-D-FarFrO.js} +1 -1
  68. package/dist/public/assets/{TerminalWindowApp-Dc3r2kpi.js → TerminalWindowApp-CjO1HPt0.js} +1 -1
  69. package/dist/public/assets/{TextDocEditor-C-LtGMe_.js → TextDocEditor-BQO_dN7M.js} +1 -1
  70. package/dist/public/assets/{ThemePluginSection-DyuaEmFe.js → ThemePluginSection-GfXRIsMz.js} +1 -1
  71. package/dist/public/assets/ThreadView-hZyerxM7.js +28 -0
  72. package/dist/public/assets/{TimelineDiffPane-CA1gVTWW.js → TimelineDiffPane-BkKFnaJa.js} +1 -1
  73. package/dist/public/assets/{agent-connections-BdU_6bUV.js → agent-connections-CKjjlHMQ.js} +1 -1
  74. package/dist/public/assets/{agent-registry-BdHe0AEQ.js → agent-registry-CHWxsZbl.js} +1 -1
  75. package/dist/public/assets/{bridge-BMIee44l.js → bridge-nc43unzY.js} +1 -1
  76. package/dist/public/assets/{catalog-CEXii1s5.js → catalog-B9JwWDPk.js} +1 -1
  77. package/dist/public/assets/{client-version-DmgW9FXt.js → client-version-kkepkREF.js} +1 -1
  78. package/dist/public/assets/{comment-chips-DQXR3C-O.js → comment-chips-Jmrwo5Hd.js} +1 -1
  79. package/dist/public/assets/{config-provider-DaAAjkEU.js → config-provider-CPYdYpEf.js} +1 -1
  80. package/dist/public/assets/config-schema-B9u6M8He.js +1 -0
  81. package/dist/public/assets/{css-color-to-hex-Csde6-Qs.js → css-color-to-hex-BUw_awQK.js} +1 -1
  82. package/dist/public/assets/{doc-undo-manager-Dn-9YJtJ.js → doc-undo-manager-DbITmbUh.js} +1 -1
  83. package/dist/public/assets/field-controls-CKK_bzDT.js +1 -0
  84. package/dist/public/assets/{field-controls-D31F23S8.js → field-controls-kKc5F9zV.js} +1 -1
  85. package/dist/public/assets/{ime-composition-B56Lnl92.js → ime-composition-sf57BdPh.js} +1 -1
  86. package/dist/public/assets/{index-9o_6tZBQ.js → index-Di8-FkAo.js} +7 -7
  87. package/dist/public/assets/{lint-config-client-CLttd-hM.js → lint-config-client-CMydN46i.js} +1 -1
  88. package/dist/public/assets/{lint-plugins-zerBpEpu.js → lint-plugins-CThm4iHI.js} +1 -1
  89. package/dist/public/assets/{markdown-lint-wCP_bSbs.js → markdown-lint-B8Z_0Kvy.js} +1 -1
  90. package/dist/public/assets/{markdownlint-rule-browser-nIryvJXe.js → markdownlint-rule-browser-CXbjrFdy.js} +1 -1
  91. package/dist/public/assets/{pending-receive-nav-store-B_OOdCPc.js → pending-receive-nav-store-B7V1Rg9x.js} +1 -1
  92. package/dist/public/assets/{preferred-session-events-BnXTJh1z.js → preferred-session-events-69rtaUyj.js} +1 -1
  93. package/dist/public/assets/progress-DIQhloBy.js +10 -0
  94. package/dist/public/assets/{saved-themes-client-BPWMEtsb.js → saved-themes-client-DmclwZ8v.js} +1 -1
  95. package/dist/public/assets/{schema-section-Ceiv9_HZ.js → schema-section-BXgkFDyQ.js} +1 -1
  96. package/dist/public/assets/{schemas-api-CL5ZXlEj.js → schemas-api-B9gBqMLK.js} +1 -1
  97. package/dist/public/assets/{selection-context-D6LrKySj.js → selection-context-dbGtxQBF.js} +1 -1
  98. package/dist/public/assets/sign-in-terminal-events-gIutiXLp.js +1 -0
  99. package/dist/public/assets/{skills-api-DjykKWn7.js → skills-api-5TsLTlcr.js} +1 -1
  100. package/dist/public/assets/{src-B2H75EGD.js → src-BL_fN-D8.js} +1 -1
  101. package/dist/public/assets/storage-scope-Cnm-5Aal.js +1 -0
  102. package/dist/public/assets/{tag-pill-input-D_fe_Zbo.js → tag-pill-input-DOxurUWT.js} +1 -1
  103. package/dist/public/assets/{telemetry-impl-DnaOV3NJ.js → telemetry-impl-CXXiQc57.js} +1 -1
  104. package/dist/public/assets/{telemetry-startup-BRRC1yb-.js → telemetry-startup-DzMu0hx1.js} +1 -1
  105. package/dist/public/assets/{terminal-launch-events-3vnER_eI.js → terminal-launch-events-BFXRsi4V.js} +1 -1
  106. package/dist/public/assets/{typing-burst-detector-ynzb1FVj.js → typing-burst-detector-B3wt6IKV.js} +1 -1
  107. package/dist/public/assets/{use-activity-panel-DQMWxOEX.js → use-activity-panel-ucWiCMhm.js} +1 -1
  108. package/dist/public/assets/{use-apply-config-color-theme-Bpi7AD0s.js → use-apply-config-color-theme-BPRaqk9x.js} +1 -1
  109. package/dist/public/assets/{use-conflicts-CIjDyM9c.js → use-conflicts-BKMO-Ys4.js} +1 -1
  110. package/dist/public/assets/{use-live-xterm-theme-BJbDRXxo.js → use-live-xterm-theme-8O2LGwCv.js} +1 -1
  111. package/dist/public/assets/{use-open-skill-CpycrCy6.js → use-open-skill-4UI_Rt49.js} +1 -1
  112. package/dist/public/assets/{use-semantic-search-status-D9HCPCCa.js → use-semantic-search-status-lORVQFbY.js} +1 -1
  113. package/dist/public/assets/{use-skill-origin-CiJpOXFq.js → use-skill-origin-14pvHqaa.js} +1 -1
  114. package/dist/public/assets/{use-skill-targets-EVebu2kh.js → use-skill-targets-d0ssmszt.js} +1 -1
  115. package/dist/public/assets/{use-skills-BWAh3dDS.js → use-skills-CEIGHZpc.js} +1 -1
  116. package/dist/public/assets/{use-terminal-enabled-CuNtq9W_.js → use-terminal-enabled-DG0rrtVc.js} +1 -1
  117. package/dist/public/assets/{use-timeline-entry-diff-Mgt2cSla.js → use-timeline-entry-diff-LiNGovKG.js} +1 -1
  118. package/dist/public/assets/{use-workspace-h2j0Puyv.js → use-workspace-CAGIeY37.js} +1 -1
  119. package/dist/public/index.html +47 -47
  120. package/dist/{registry-probes-Fz7xs4XZ.mjs → registry-probes-CvdAGpV3.mjs} +7 -7
  121. package/dist/{removal-file-path-BhVtJjmx.mjs → removal-file-path-C_21UYfe.mjs} +1 -1
  122. package/dist/{repair-launch-json-Bn-fk60m.mjs → repair-launch-json-Cwg1Hh00.mjs} +1 -1
  123. package/dist/{repair-mcp-configs-DTDzYLVm.mjs → repair-mcp-configs-CDG-W2sF.mjs} +1 -1
  124. package/dist/src-62vCU-5L.mjs +16 -0
  125. package/dist/src-D47eU9XX.mjs +1 -0
  126. package/dist/start-CKoud1mN.mjs +1 -0
  127. package/dist/{start-CZlfozPm.mjs → start-CY5gJiIk.mjs} +3 -3
  128. package/package.json +4 -4
  129. package/dist/constants-Fdcn8dix.mjs +0 -1
  130. package/dist/dist-PmCem0Y1.mjs +0 -2213
  131. package/dist/dist-cFe3RAar.mjs +0 -1
  132. package/dist/init-BV6CaDe-.mjs +0 -1
  133. package/dist/loader-BXcZEYYI.mjs +0 -1
  134. package/dist/preview-O9J1QgiJ.mjs +0 -1
  135. package/dist/public/assets/FeedbackForm-DSpktxby.js +0 -1
  136. package/dist/public/assets/ManagedArtifactProperties-QH9vWdiF.js +0 -1
  137. package/dist/public/assets/ThreadView-nqVvbJMD.js +0 -28
  138. package/dist/public/assets/config-schema-gPKGwQR7.js +0 -1
  139. package/dist/public/assets/field-controls-BpWrodXJ.js +0 -1
  140. package/dist/public/assets/progress-DGkGZKMH.js +0 -10
  141. package/dist/public/assets/sign-in-terminal-events-D1Wi4Xw6.js +0 -1
  142. package/dist/public/assets/storage-scope-GPc8n3Ml.js +0 -1
  143. package/dist/src-DhH0qZar.mjs +0 -1
  144. package/dist/src-gEJ0A8MC.mjs +0 -16
  145. package/dist/start-HGsUijz1.mjs +0 -1
@@ -1 +1 @@
1
- import{ls as e,ms as t,os as n}from"./dist-PmCem0Y1.mjs";import{N as r,j as i,k as a}from"./init-DKr3mAYb.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-BhVtJjmx.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-DAt352Cb.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-C_21UYfe.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-I7NmBKjQ.mjs";import{_s as s,x as c,ys as l}from"./dist-PmCem0Y1.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-Fdcn8dix.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=l(`user`,i),_=s({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(l(`project-local`,i)),w=n(_.value,S,C),T=c.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-BxYU-W85.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-B6O7IvYr.mjs";export{e as loadConfig};