@inkeep/open-knowledge 0.63.0-beta.9 → 0.63.1

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 (223) hide show
  1. package/dist/{acp-harness-probe-B-xjxuR2.mjs → acp-harness-probe-XMxFGBoY.mjs} +2 -2
  2. package/dist/assets/skills/packs/codebase-wiki/references/generate-and-refresh.md +2 -2
  3. package/dist/assets/skills/packs/knowledge-base/research/SKILL.md +1 -1
  4. package/dist/assets/skills/packs/okf/SKILL.md +1 -1
  5. package/dist/assets/skills/packs/software-lifecycle/frame-a-proposal/SKILL.md +1 -1
  6. package/dist/assets/skills/packs/software-lifecycle/record-a-decision/SKILL.md +2 -2
  7. package/dist/assets/skills/packs/software-lifecycle/write-a-postmortem/SKILL.md +1 -1
  8. package/dist/assets/skills/packs/software-lifecycle/write-a-spec/SKILL.md +1 -1
  9. package/dist/assets/skills/project/SKILL.md +1 -1
  10. package/dist/assets/skills/project/references/folder-model.md +1 -1
  11. package/dist/assets/skills/project/references/linking.md +1 -1
  12. package/dist/assets/skills/project/references/media-and-assets.md +4 -4
  13. package/dist/assets/skills/project/references/onboard-existing-repo.md +5 -5
  14. package/dist/cli.mjs +6 -6
  15. package/dist/constants-YeJcPjI1.mjs +2 -0
  16. package/dist/git-handle-Bp1KC5ON.mjs +1 -0
  17. package/dist/{git-handle-CIYTlUEZ.mjs → git-handle-DBSBLTQr.mjs} +2 -2
  18. package/dist/index.mjs +161 -165
  19. package/dist/init-CWbX0ELh.mjs +1 -0
  20. package/dist/{init-C5X8MWLw.mjs → init-w448Zb1P.mjs} +3 -3
  21. package/dist/{launch-json-removal-BuklIvO9.mjs → launch-json-removal-BGxa7kOw.mjs} +2 -2
  22. package/dist/loader-CNMujsT-.mjs +1 -0
  23. package/dist/{loader-C0hPcI3q.mjs → loader-DWWsI9JR.mjs} +2 -2
  24. package/dist/md-manager-YCnEcytX.mjs +2 -0
  25. package/dist/{open-browser-C8W8YLUr.mjs → open-browser-ycZBGuNV.mjs} +2 -2
  26. package/dist/parse-worker.mjs +1 -1
  27. package/dist/{preview-xW7AU3WF.mjs → preview-Cd_2hNw6.mjs} +2 -2
  28. package/dist/preview-DVXKfAP5.mjs +1 -0
  29. package/dist/public/assets/{ActivityModeContent-BTKcB4s7.js → ActivityModeContent-BJkv-wtf.js} +1 -1
  30. package/dist/public/assets/{AddPropertiesButton-D7HalV7U.js → AddPropertiesButton-DZrj-WbN.js} +1 -1
  31. package/dist/public/assets/{AgentDiffPane-ijX5j8oV.js → AgentDiffPane-DdTUH5Iy.js} +1 -1
  32. package/dist/public/assets/{AgentThreadClientBinder-BnFaLWWD.js → AgentThreadClientBinder-B7GHdT50.js} +1 -1
  33. package/dist/public/assets/{BugReportHistory-Z6vKgPlz.js → BugReportHistory-CDjs-UvS.js} +1 -1
  34. package/dist/public/assets/{BugReportHistoryDialog-yatep397.js → BugReportHistoryDialog-gMqpgd_4.js} +1 -1
  35. package/dist/public/assets/{CodeMirrorPropInput-Bq-GOVaY.js → CodeMirrorPropInput-BQbWlwTu.js} +2 -2
  36. package/dist/public/assets/{ConsentDialogBody-tSHLrPbK.js → ConsentDialogBody-BrU01-jw.js} +1 -1
  37. package/dist/public/assets/{DiffView-BiSpsGNT.js → DiffView-DBOYN8TZ.js} +1 -1
  38. package/dist/public/assets/{DocumentContext-BALlgby5.js → DocumentContext-DQusF2ho.js} +1 -1
  39. package/dist/public/assets/{EditorModeToggle-T-DEua_N.js → EditorModeToggle-BdGWhpIY.js} +1 -1
  40. package/dist/public/assets/{EnableSyncConfirmDialog-L0fDVr4w.js → EnableSyncConfirmDialog-BI3oSfND.js} +1 -1
  41. package/dist/public/assets/{ExcalidrawDocEditor-CxqDZYJT.js → ExcalidrawDocEditor-DJV8Vr7i.js} +1 -1
  42. package/dist/public/assets/FeedbackForm-CzfpNEYX.js +1 -0
  43. package/dist/public/assets/{GraphPanel-BGmJGDQa.js → GraphPanel-fAs0m1k4.js} +1 -1
  44. package/dist/public/assets/{ImportSkillDialog-1Cbzf9hO.js → ImportSkillDialog-BhUc9wrT.js} +1 -1
  45. package/dist/public/assets/{LintConfigEditor-CzrTw7-N.js → LintConfigEditor-BbQC5XBO.js} +1 -1
  46. package/dist/public/assets/ManagedArtifactProperties-DeJMraIa.js +1 -0
  47. package/dist/public/assets/ManagedArtifactProperties-ToX26_H8.js +1 -0
  48. package/dist/public/assets/{McpConsentDialogBody-CAzcaI7R.js → McpConsentDialogBody-BhVT9dPx.js} +1 -1
  49. package/dist/public/assets/{Mermaid-eWUbMYt7.js → Mermaid-NYQ6RsUB.js} +1 -1
  50. package/dist/public/assets/{MermaidDocEditor-9oN0JLay.js → MermaidDocEditor-CLd3gDFx.js} +1 -1
  51. package/dist/public/assets/{PropertyDisplayRow-Bk3DJiht.js → PropertyDisplayRow-BqNNqtQq.js} +1 -1
  52. package/dist/public/assets/{ReportBugDialogBody-CxWq0sl_.js → ReportBugDialogBody-7G3gDx90.js} +1 -1
  53. package/dist/public/assets/{SchemaConfigEditor-DZz98wbc.js → SchemaConfigEditor-DJdskJ7F.js} +1 -1
  54. package/dist/public/assets/{SessionsHost-C0SgrJWZ.js → SessionsHost-C0KNjtqL.js} +2 -2
  55. package/dist/public/assets/{SettingsDialogBody-DfMiN6Fz.js → SettingsDialogBody-eG4WwStf.js} +4 -4
  56. package/dist/public/assets/{ShareBranchSwitchDialog-C_2lIS4H.js → ShareBranchSwitchDialog-BVSorWIl.js} +1 -1
  57. package/dist/public/assets/{ShareReceiveDialog-DODZ9lJO.js → ShareReceiveDialog-MMs7AIMS.js} +1 -1
  58. package/dist/public/assets/{ShareReceiveMissDialog-VU9jVnF2.js → ShareReceiveMissDialog-Brs6R8I6.js} +1 -1
  59. package/dist/public/assets/{SkillCostValue-C0wQq_rb.js → SkillCostValue-_Y5l2XwJ.js} +1 -1
  60. package/dist/public/assets/{SkillEditBanner-B_co3gK-.js → SkillEditBanner-D7_vEL-Q.js} +1 -1
  61. package/dist/public/assets/{SkillInstallMenu-dLqh_jLu.js → SkillInstallMenu-CK7w8oqi.js} +1 -1
  62. package/dist/public/assets/{SkillOriginInline-BSVuZQmJ.js → SkillOriginInline-CPhIPMvZ.js} +1 -1
  63. package/dist/public/assets/{SkillToolbarControls-_B6u1D0o.js → SkillToolbarControls-mIxMbZvN.js} +1 -1
  64. package/dist/public/assets/{SlidesToolbarControls-BWTKaM60.js → SlidesToolbarControls-BMDuGCKO.js} +1 -1
  65. package/dist/public/assets/{SourceEditor-CKI37mlw.js → SourceEditor-D61sV5zD.js} +1 -1
  66. package/dist/public/assets/{TerminalPanel-BPoxkeWP.js → TerminalPanel-CyBB22vO.js} +1 -1
  67. package/dist/public/assets/{TerminalWindowApp-D0Y7fAlx.js → TerminalWindowApp-8SJJG0FH.js} +1 -1
  68. package/dist/public/assets/{TextDocEditor-1tsxK98Z.js → TextDocEditor-YEyv9FD3.js} +1 -1
  69. package/dist/public/assets/ThreadView-DusalK06.js +14 -0
  70. package/dist/public/assets/{TimelineDiffPane-Dd8x4PB7.js → TimelineDiffPane-CuowvgxZ.js} +1 -1
  71. package/dist/public/assets/{agent-diff-store-CDsDNb32.js → agent-diff-store-B3q363Zs.js} +1 -1
  72. package/dist/public/assets/{alert-dialog-AUOAbMRk.js → alert-dialog-C8E8SkhJ.js} +1 -1
  73. package/dist/public/assets/auth-state-cache-Cy2yuigh.js +11 -0
  74. package/dist/public/assets/{bug-report-send-manager-Cla-OHd1.js → bug-report-send-manager-BVeLqplu.js} +1 -1
  75. package/dist/public/assets/{client-version-zlMsTjr7.js → client-version-D29tmSfy.js} +1 -1
  76. package/dist/public/assets/{cm-theme-CGAHtEG_.js → cm-theme-CqnwWjn0.js} +1 -1
  77. package/dist/public/assets/comment-chips-B11UWYP_.js +5 -0
  78. package/dist/public/assets/{config-provider-BthPv03F.js → config-provider-Cn54Nsso.js} +3 -3
  79. package/dist/public/assets/{dialog-CVDWyFAg.js → dialog-BH80AfFt.js} +1 -1
  80. package/dist/public/assets/{dist-BcgfSGhc.js → dist--D6RzOfD.js} +1 -1
  81. package/dist/public/assets/{dist-JRmCQvyK2.js → dist-1N70TEoy2.js} +1 -1
  82. package/dist/public/assets/{dist-CIoKswYf.js → dist-CFs5UHD5.js} +1 -1
  83. package/dist/public/assets/{dist-DTXRiVka.js → dist-CLS9aKf7.js} +1 -1
  84. package/dist/public/assets/{dist-BcBK7-Dp.js → dist-CPvLRdmt.js} +1 -1
  85. package/dist/public/assets/{dist-Ce8QgKUj2.js → dist-D3fPY7nj2.js} +11 -11
  86. package/dist/public/assets/{dist-BoZByILK2.js → dist-D8CXqbDc2.js} +1 -1
  87. package/dist/public/assets/{dist-D-kVP57h.js → dist-DxgTfwGf.js} +1 -1
  88. package/dist/public/assets/{dist-Btpne29j.js → dist-awmOdYf0.js} +1 -1
  89. package/dist/public/assets/{dist-DlLRNnIh.js → dist-cQHiWmQq.js} +1 -1
  90. package/dist/public/assets/{dist-C7UyijYm.js → dist-ezYezphN.js} +1 -1
  91. package/dist/public/assets/{dist-DEMReymG.js → dist-tUuSMxU2.js} +1 -1
  92. package/dist/public/assets/{dist-ChwF_jJh.js → dist-yHiImJTb.js} +1 -1
  93. package/dist/public/assets/{doc-paths-Ctsm9A3g.js → doc-paths-82OyHgqG.js} +1 -1
  94. package/dist/public/assets/{documents-events-xbEOOZ0r.js → documents-events-DuT0NGpP.js} +1 -1
  95. package/dist/public/assets/field-CtUgODi9.js +1 -0
  96. package/dist/public/assets/{file-tree-adapter-Ls8GiCCR.js → file-tree-adapter-QHHr7v_y.js} +1 -1
  97. package/dist/public/assets/{file-tree-utils-B0rpFzyn.js → file-tree-utils-dEjn4DTA.js} +1 -1
  98. package/dist/public/assets/{folder-config-api-CU0L7tKK.js → folder-config-api-CCs-JTL1.js} +1 -1
  99. package/dist/public/assets/globals-CgRBo3fB.css +1 -0
  100. package/dist/public/assets/i18n-CrTwsN89.js +1 -0
  101. package/dist/public/assets/index-D1NhpG7M.js +2196 -0
  102. package/dist/public/assets/{input-group-CG4QcWr2.js → input-group-BG4x9Co0.js} +1 -1
  103. package/dist/public/assets/{lint-config-client-DRimdQdD.js → lint-config-client-sUKnaDfE.js} +1 -1
  104. package/dist/public/assets/markdownlint-rule-browser-DoSn8IJz.js +1 -0
  105. package/dist/public/assets/messages-B8yzAqdX.js +1 -0
  106. package/dist/public/assets/messages-B_leGMuj.js +1 -0
  107. package/dist/public/assets/messages-BjsESsFx.js +1 -0
  108. package/dist/public/assets/messages-CgRQxqOr.js +1 -0
  109. package/dist/public/assets/messages-ClYIPasG.js +1 -0
  110. package/dist/public/assets/messages-DKj1XaXP.js +1 -0
  111. package/dist/public/assets/messages-DoiuiDAc.js +1 -0
  112. package/dist/public/assets/messages-WY-HJ7CG.js +1 -0
  113. package/dist/public/assets/messages-XTC09BUs.js +1 -0
  114. package/dist/public/assets/messages-rsgDLMpR.js +1 -0
  115. package/dist/public/assets/messages-rvWZA8Dv.js +1 -0
  116. package/dist/public/assets/messages-su76b0h7.js +1 -0
  117. package/dist/public/assets/{ok-BdLqM2Gu.js → ok-D3euoYhD.js} +1 -1
  118. package/dist/public/assets/{page-list-cache-QkTJWl8s.js → page-list-cache-SxA5m5if.js} +1 -1
  119. package/dist/public/assets/{pending-receive-nav-store-kUesnzvY.js → pending-receive-nav-store-DY4RHmGg.js} +1 -1
  120. package/dist/public/assets/progress-Bsmo7TE1.js +9 -0
  121. package/dist/public/assets/{project-paths-BQEzqGA4.js → project-paths-DFtdLgxL.js} +1 -1
  122. package/dist/public/assets/{prop-types-DPeMJ-QC.js → prop-types-CPMCR1bB.js} +1 -1
  123. package/dist/public/assets/{receive-store-BA-7J_9S.js → receive-store-DXkS-6fp.js} +1 -1
  124. package/dist/public/assets/{selection-context-sB0L4ytB.js → selection-context-Bjtq9RIN.js} +1 -1
  125. package/dist/public/assets/separator-BmK42_9U.js +1 -0
  126. package/dist/public/assets/{skill-scope-DVS0Hl6u.js → skill-scope-CSgNqFEM.js} +1 -1
  127. package/dist/public/assets/skills-api-Bk-f3oIn.js +1 -0
  128. package/dist/public/assets/{src-B2g0kIMf.js → src-M-32C9_n.js} +1 -1
  129. package/dist/public/assets/{tag-pill-input-DMkVt_d_.js → tag-pill-input-vXWkMHt_.js} +1 -1
  130. package/dist/public/assets/{target-navigation-intent-CaN3Dafh.js → target-navigation-intent-B6pF65mo.js} +1 -1
  131. package/dist/public/assets/{telemetry-startup-D3po15VV.js → telemetry-startup-wvejDKve.js} +1 -1
  132. package/dist/public/assets/{terminal-cli-display-BOx5rFUv.js → terminal-cli-display-D8ya3OyM.js} +1 -1
  133. package/dist/public/assets/{terminal-launch-events-CLgfK16W.js → terminal-launch-events-CEw1ZoL3.js} +1 -1
  134. package/dist/public/assets/{terminal-telemetry-akEbrUKt.js → terminal-telemetry-BkPbxfR9.js} +1 -1
  135. package/dist/public/assets/{text-viewer-languages-DiEHGSrX.js → text-viewer-languages-D1G0H8jz.js} +2 -2
  136. package/dist/public/assets/{typing-burst-detector-DUYhlR1q.js → typing-burst-detector-B2N-OjvB.js} +1 -1
  137. package/dist/public/assets/{uninstall-B_W5vlkD.js → uninstall-D6ZjikLo.js} +1 -1
  138. package/dist/public/assets/{use-activity-panel-BGjPHK7b.js → use-activity-panel-DDPT7XZw.js} +1 -1
  139. package/dist/public/assets/{use-apply-config-color-theme-DNsKMjZ7.js → use-apply-config-color-theme-Chbv5kIz.js} +1 -1
  140. package/dist/public/assets/{use-collab-url-rDCxo50p.js → use-collab-url-CLES09HL.js} +1 -1
  141. package/dist/public/assets/{use-live-xterm-theme-C2BpqZgC.js → use-live-xterm-theme-BeGlZWUx.js} +1 -1
  142. package/dist/public/assets/use-open-skill-BfEbXDC8.js +1 -0
  143. package/dist/public/assets/{use-settings-route-juHfAFnp.js → use-settings-route-1RDLdzh1.js} +1 -1
  144. package/dist/public/assets/{use-skill-origin-nFRJyGWt.js → use-skill-origin-BPSEVtzI.js} +1 -1
  145. package/dist/public/assets/use-skills-X0D5g-_u.js +1 -0
  146. package/dist/public/assets/{use-terminal-enabled-Cq6DIDKZ.js → use-terminal-enabled-FDOP0Dht.js} +1 -1
  147. package/dist/public/assets/{use-timeline-entry-diff-C7uHbazM.js → use-timeline-entry-diff-Bj-dtOq4.js} +1 -1
  148. package/dist/public/assets/{use-workspace-Cq3LTz0y.js → use-workspace-BuKQ4WE6.js} +1 -1
  149. package/dist/public/index.html +85 -85
  150. package/dist/public/uninstall.html +8 -8
  151. package/dist/{repair-launch-json-BGM5T2SA.mjs → repair-launch-json-DKNYsvM3.mjs} +2 -2
  152. package/dist/{repair-mcp-configs-B-WnALb4.mjs → repair-mcp-configs-CkxrN_Wr.mjs} +2 -2
  153. package/dist/repair-skills-DnJVC8BQ.mjs +1 -0
  154. package/dist/{repair-skills-B7T9ybuC.mjs → repair-skills-Dye90u_k.mjs} +2 -2
  155. package/dist/{resolve-project-root-BF1NyEri.mjs → resolve-project-root-Bc1ADd86.mjs} +2 -2
  156. package/dist/server-lock-0Z4DgFB6.mjs +1 -0
  157. package/dist/{server-lock-C0j1Yr_I.mjs → server-lock-DmHwX0B4.mjs} +2 -2
  158. package/dist/{skill-teardown-B9-HO2ID.mjs → skill-teardown-D6lPMY6n.mjs} +2 -2
  159. package/dist/src-AM93pMhZ.mjs +1 -0
  160. package/dist/{src-pWpSZzzm.mjs → src-B3B2YRvO.mjs} +2 -2
  161. package/dist/{src-Bt6_UxL9.mjs → src-BOzh5nAU.mjs} +60 -60
  162. package/dist/src-BqTdx7nf.mjs +2030 -0
  163. package/dist/{src-DQyTLMJF.mjs → src-CzJVDa-w.mjs} +1 -1
  164. package/dist/start-CIWCAkyi.mjs +1 -0
  165. package/dist/{start-BXQxKUGp.mjs → start-CaFctwyb.mjs} +3 -3
  166. package/package.json +4 -4
  167. package/dist/constants-au7a_EGv.mjs +0 -2
  168. package/dist/git-handle-B0iwHPX9.mjs +0 -1
  169. package/dist/init-B1lxqXtH.mjs +0 -1
  170. package/dist/loader-CKif709X.mjs +0 -1
  171. package/dist/md-manager-N3eB5SRj.mjs +0 -2
  172. package/dist/preview-qVTXt2N5.mjs +0 -1
  173. package/dist/public/assets/FeedbackForm-BXuYBean.js +0 -1
  174. package/dist/public/assets/ManagedArtifactProperties-Bi-E4YRv.js +0 -1
  175. package/dist/public/assets/ManagedArtifactProperties-CK9B-hm2.js +0 -1
  176. package/dist/public/assets/ThreadView-CsLuiypa.js +0 -14
  177. package/dist/public/assets/auth-state-cache-DVYBlfUl.js +0 -11
  178. package/dist/public/assets/comment-chips-BOg_nIYo.js +0 -5
  179. package/dist/public/assets/field-5c9smYxo.js +0 -1
  180. package/dist/public/assets/globals-BClfVevn.css +0 -1
  181. package/dist/public/assets/i18n-BRlTyJZZ.js +0 -1
  182. package/dist/public/assets/index-BRw4vLZd.js +0 -2196
  183. package/dist/public/assets/markdownlint-rule-browser-bLNgOZDj.js +0 -1
  184. package/dist/public/assets/messages-BMS7FJ_d.js +0 -1
  185. package/dist/public/assets/messages-BRhYVkgM.js +0 -1
  186. package/dist/public/assets/messages-BydmSYjg.js +0 -1
  187. package/dist/public/assets/messages-CVWvfqyb.js +0 -1
  188. package/dist/public/assets/messages-Chm_fdij.js +0 -1
  189. package/dist/public/assets/messages-DDHuYMhL.js +0 -1
  190. package/dist/public/assets/messages-DHLSa100.js +0 -1
  191. package/dist/public/assets/messages-DL85qpw8.js +0 -1
  192. package/dist/public/assets/messages-DZrrLggA.js +0 -1
  193. package/dist/public/assets/messages-DpGwrwba.js +0 -1
  194. package/dist/public/assets/messages-QvU0ijSD.js +0 -1
  195. package/dist/public/assets/messages-eeoJTDMn.js +0 -1
  196. package/dist/public/assets/progress-C2DqvF0S.js +0 -9
  197. package/dist/public/assets/rotate-ccw-Dh7y6tzD.js +0 -1
  198. package/dist/public/assets/skills-api-CLHdhjYN.js +0 -1
  199. package/dist/public/assets/use-open-skill-BQQ22AWB.js +0 -1
  200. package/dist/public/assets/use-skills-Dqn_Ujd2.js +0 -1
  201. package/dist/repair-skills-D33RJQek.mjs +0 -1
  202. package/dist/server-lock-CJBewXA-.mjs +0 -1
  203. package/dist/src-DB9Clga0.mjs +0 -1
  204. package/dist/src-bhsVUHJJ.mjs +0 -2038
  205. package/dist/start-DG3IuMZ-.mjs +0 -1
  206. /package/dist/public/assets/{asset-dispatch-KsnhYIM1.js → asset-dispatch-CD6rGcnF.js} +0 -0
  207. /package/dist/public/assets/{badge-D4OsXAAp.js → badge-DGD9B_-e.js} +0 -0
  208. /package/dist/public/assets/{dist-DKm6IJJD.js → dist-EbTHn-HD.js} +0 -0
  209. /package/dist/public/assets/{documents-fetch-UmC9duIp.js → documents-fetch-Bw4lKnRN.js} +0 -0
  210. /package/dist/public/assets/{external-link-B0bVg1hn.js → external-link-DGqXfQJy.js} +0 -0
  211. /package/dist/public/assets/{file-tree-rename-validation-B5TvPsC_.js → file-tree-rename-validation-DmGgIR2S.js} +0 -0
  212. /package/dist/public/assets/{globals-DZdLwnph.js → globals-4Lwslben.js} +0 -0
  213. /package/dist/public/assets/{input-DJ1c1x-M.js → input-Cy2M_Avq.js} +0 -0
  214. /package/dist/public/assets/{popover-DSqCLFbz.js → popover-DAe-_3rj.js} +0 -0
  215. /package/dist/public/assets/{square-pen-Blyr7NAu.js → square-pen-BlKNuUz7.js} +0 -0
  216. /package/dist/public/assets/{startup-marks-Cdkh8q3E.js → startup-marks-BYurBbnW.js} +0 -0
  217. /package/dist/public/assets/{stex-C-5D68LN.js → stex-s_JxeNEZ.js} +0 -0
  218. /package/dist/public/assets/{terminal-DVIah3Gz.js → terminal-CmHqE3At.js} +0 -0
  219. /package/dist/public/assets/{trash-2-Do7iD2Jd.js → trash-2-BVoWHmfV.js} +0 -0
  220. /package/dist/public/assets/{triangle-alert-CVlKiRjP.js → triangle-alert-CJVfCxE0.js} +0 -0
  221. /package/dist/public/assets/{undo-2-BPqljtN7.js → undo-2-CXHp9Ngg.js} +0 -0
  222. /package/dist/public/assets/{wrench-Bdjt-UuV.js → wrench-JX3g_hHJ.js} +0 -0
  223. /package/dist/public/assets/{x-DYxy1Cx_.js → x-wQUDJS55.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sleep-D4NlDISj.mjs";import{Ac as i,Co as a,Fc as o,Ic as s,jc as c,lt as l,ut as u}from"./src-Bt6_UxL9.mjs";import{Ri as d,ct as f,di as p,kn as m,lt as h,ot as g,st as ee}from"./src-bhsVUHJJ.mjs";import{D as _,F as v,I as y,k as b}from"./fs-traced-Dm4NQ6S5.mjs";import{C as x,S,_ as C,f as w,r as T}from"./server-lock-C0j1Yr_I.mjs";import{t as E}from"./yazl-DejPO9b3.mjs";import{h as D,m as te,x as ne}from"./resolve-project-root-BF1NyEri.mjs";import{c as O}from"./colors-DSyAT9Cz.mjs";import{a as k,i as re}from"./acp-harness-probe-B-xjxuR2.mjs";import{D as ie,E as A,S as ae,T as j,_ as oe,b as se,o as ce}from"./init-C5X8MWLw.mjs";import{n as le}from"./constants-au7a_EGv.mjs";import{t as M}from"./is-object-Bw0-z8qH.mjs";import"./loader-C0hPcI3q.mjs";import"./skill-teardown-B9-HO2ID.mjs";import"./preview-xW7AU3WF.mjs";import{execSync as ue,spawnSync as de}from"node:child_process";import{basename as N,dirname as P,join as F,relative as fe,resolve as I,sep as pe}from"node:path";import{cpSync as me,createWriteStream as he,existsSync as L,lstatSync as ge,mkdirSync as R,mkdtempSync as _e,readFileSync as z,readdirSync as B,readlinkSync as ve,rmSync as ye,statSync as be,writeFileSync as V}from"node:fs";import{arch as xe,freemem as Se,homedir as H,hostname as Ce,platform as we,release as Te,tmpdir as Ee,totalmem as De,type as Oe,uptime as ke}from"node:os";import"node:fs/promises";import{createHash as Ae}from"node:crypto";var je=n();const Me=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Ne(e,t,n=m){if(e!==void 0&&!Me.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Pe=null;function Fe(e){Pe=e}function Ie(){return Pe??process.cwd()}function U(){return F(H(),`.ok`,`bug-reports`)}function Le(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=U(),r=`${t}-bugreport`,i=F(n,`${r}.zip`);for(let e=2;L(i);e+=1)i=F(n,`${r}-${e}.zip`);return i}function Re(e,t){let n=F(e,`.ok`,`config.yml`);if(L(n))try{let e=z(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return L(F(e,`.ok`))?Ae(`sha256`).update(I(e)).digest(`hex`).slice(0,12):null}function ze(){let e={timestamp:new Date().toISOString(),platform:we(),osType:Oe(),osRelease:Te(),hostname:`[redacted]`,uptime:ke(),freeMem:Se(),totalMem:De(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=ue(`sw_vers -productVersion 2>/dev/null`,d({encoding:`utf8`})).trim()}catch{}try{let t=F(__dirname,`..`,`..`,`package.json`);L(t)&&(e.okVersion=JSON.parse(z(t,`utf8`)).version)}catch{}return e}const Be=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function Ve(e){let t=N(e);return Be.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function He(e,t){return Ke(e,t).files}const Ue=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function We(e,t=k){let n=F(e,`${t}.ShipIt`);return L(n)?Ue.map(e=>F(n,e)).filter(e=>L(e)):[]}function Ge(e){if(!L(e))return[];try{let t=new Map;for(let n of B(e).filter(e=>e.endsWith(`.yaml`)).sort()){let e=n.endsWith(`.sent.yaml`)?n.slice(0,-o.length):n.slice(0,-5),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return[...t.values()].slice(-25).flat().map(t=>F(e,t))}catch{return[]}}function Ke(e,t){if(!L(t))return{files:[],excludedByProjectSlug:0};let n=B(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>F(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(Ve),i=[],a=r.filter(t=>{try{return z(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!Ve(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function qe(e){let t=F(e,`.ok`,`local`);return L(t)?{files:[`server.lock`,`last-spawn-error.log`,l].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Je(e){let t=F(e,`.ok`,`local`,`logs`);return L(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Ye(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=c(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function W(e){for(let t of e.files)try{Ye({zipfile:e.zipfile,name:`${e.prefix}/${N(t)}`,content:z(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function Xe(t){let{redact:n,outputPath:r,logger:a}=t,o=t.userLogsDir??F(H(),`.ok`,`logs`),c=t.projectDir?Re(t.projectDir,a):null;R(P(r),{recursive:!0}),a?.info({projectSlug:c},`gathering diagnostic data`);let l=ze();l.desktop=t.desktop??null,l.language=t.language??null;let{files:u,excludedByProjectSlug:d}=Ke(c,o),{files:f}=t.projectDir?qe(t.projectDir):{files:[]},{files:p}=t.projectDir?Je(t.projectDir):{files:[]},m=t.shipItLogFiles??[];a?.info({logFileCount:u.length,logFilesExcludedByProjectSlug:d,lockFileCount:f.length,localSinkFileCount:p.length,shipItLogFileCount:m.length},`files collected`);let h=[],g=[],{ZipFile:ee}=await import(`./yazl-BwMlCqRQ.mjs`).then(t=>e(t.default,1)),_=new ee;W({zipfile:_,files:[...u,...m],prefix:`logs`,redact:n,bundleFiles:g,redactions:h,logger:a}),W({zipfile:_,files:f,prefix:`lockdir`,redact:n,bundleFiles:g,redactions:h,logger:a}),W({zipfile:_,files:p,prefix:`local-logs`,redact:n,bundleFiles:g,redactions:h,logger:a}),W({zipfile:_,files:t.bugReportLedgerFiles??[],prefix:s,redact:n,bundleFiles:g,redactions:h,logger:a});for(let e of t.extraFiles??[])try{let t=z(e.sourcePath),n=`extra/${e.zipName??N(e.sourcePath)}`;_.addBuffer(t,n),g.push(n)}catch(t){a?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Ye({zipfile:_,name:`note.txt`,content:t.note,redact:n,bundleFiles:g,redactions:h});let v=JSON.stringify(l,null,2);_.addBuffer(Buffer.from(v,`utf8`),`sysinfo.json`),g.push(`sysinfo.json`);let y={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:c,files:g,redactions:h,sysinfo:l};_.addBuffer(Buffer.from(JSON.stringify(y,null,2),`utf8`),`MANIFEST.json`);let b=h.reduce((e,t)=>e+t.lineCount,0),x=new Set(m.map(e=>`logs/${N(e)}`)),S=g.filter(e=>x.has(e)),C=new Set((t.bugReportLedgerFiles??[]).map(e=>`${s}/${N(e)}`)),w=g.filter(e=>C.has(e)),T=c?g.filter(e=>e.startsWith(`logs/`)&&!Ve(e)&&!x.has(e)):[],E=[`# Bug Report Bundle`,``,`Generated: ${y.generatedAt}`,`Project: ${c??`(unscoped)`}`,`Discipline version: ${y.disciplineVersion}`,``,`## Contents`,``,...g.map(e=>`- ${e}`),``,`## Privacy`,``,...T.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...T.map(e=>`- ${e}`),``]:[],...S.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...S.map(e=>`- ${e}`),``]:[],...w.length>0?[`Send history: a small record for each bug report previously generated`,`on this machine — when it was generated, whether sending it`,`succeeded, and why it failed if it did. This is what makes a failed`,`send diagnosable at all. It is machine-wide rather than scoped to`,`this project, so it names the other projects reports were filed`,`from. It carries no document content:`,...w.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${i.join(`, `)}`,b>0?`${b} line(s) were scrubbed across ${h.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
1
+ import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sleep-D4NlDISj.mjs";import{Ac as i,Co as a,Fc as o,Ic as s,jc as c,lt as l,ut as u}from"./src-BOzh5nAU.mjs";import{Ri as d,ct as f,di as p,kn as m,lt as h,ot as g,st as ee}from"./src-BqTdx7nf.mjs";import{D as _,F as v,I as y,k as b}from"./fs-traced-Dm4NQ6S5.mjs";import{C as x,S,_ as C,f as w,r as T}from"./server-lock-DmHwX0B4.mjs";import{t as E}from"./yazl-DejPO9b3.mjs";import{h as D,m as te,x as ne}from"./resolve-project-root-Bc1ADd86.mjs";import{c as O}from"./colors-DSyAT9Cz.mjs";import{a as k,i as re}from"./acp-harness-probe-XMxFGBoY.mjs";import{D as ie,E as A,S as ae,T as j,_ as oe,b as se,o as ce}from"./init-w448Zb1P.mjs";import{n as le}from"./constants-YeJcPjI1.mjs";import{t as M}from"./is-object-Bw0-z8qH.mjs";import"./loader-DWWsI9JR.mjs";import"./skill-teardown-D6lPMY6n.mjs";import"./preview-Cd_2hNw6.mjs";import{execSync as ue,spawnSync as de}from"node:child_process";import{basename as N,dirname as P,join as F,relative as fe,resolve as I,sep as pe}from"node:path";import{cpSync as me,createWriteStream as he,existsSync as L,lstatSync as ge,mkdirSync as R,mkdtempSync as _e,readFileSync as z,readdirSync as B,readlinkSync as ve,rmSync as ye,statSync as be,writeFileSync as V}from"node:fs";import{arch as xe,freemem as Se,homedir as H,hostname as Ce,platform as we,release as Te,tmpdir as Ee,totalmem as De,type as Oe,uptime as ke}from"node:os";import"node:fs/promises";import{createHash as Ae}from"node:crypto";var je=n();const Me=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Ne(e,t,n=m){if(e!==void 0&&!Me.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let Pe=null;function Fe(e){Pe=e}function Ie(){return Pe??process.cwd()}function U(){return F(H(),`.ok`,`bug-reports`)}function Le(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=U(),r=`${t}-bugreport`,i=F(n,`${r}.zip`);for(let e=2;L(i);e+=1)i=F(n,`${r}-${e}.zip`);return i}function Re(e,t){let n=F(e,`.ok`,`config.yml`);if(L(n))try{let e=z(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return L(F(e,`.ok`))?Ae(`sha256`).update(I(e)).digest(`hex`).slice(0,12):null}function ze(){let e={timestamp:new Date().toISOString(),platform:we(),osType:Oe(),osRelease:Te(),hostname:`[redacted]`,uptime:ke(),freeMem:Se(),totalMem:De(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=ue(`sw_vers -productVersion 2>/dev/null`,d({encoding:`utf8`})).trim()}catch{}try{let t=F(__dirname,`..`,`..`,`package.json`);L(t)&&(e.okVersion=JSON.parse(z(t,`utf8`)).version)}catch{}return e}const Be=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function Ve(e){let t=N(e);return Be.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function He(e,t){return Ke(e,t).files}const Ue=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function We(e,t=k){let n=F(e,`${t}.ShipIt`);return L(n)?Ue.map(e=>F(n,e)).filter(e=>L(e)):[]}function Ge(e){if(!L(e))return[];try{let t=new Map;for(let n of B(e).filter(e=>e.endsWith(`.yaml`)).sort()){let e=n.endsWith(`.sent.yaml`)?n.slice(0,-o.length):n.slice(0,-5),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return[...t.values()].slice(-25).flat().map(t=>F(e,t))}catch{return[]}}function Ke(e,t){if(!L(t))return{files:[],excludedByProjectSlug:0};let n=B(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>F(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(Ve),i=[],a=r.filter(t=>{try{return z(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!Ve(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function qe(e){let t=F(e,`.ok`,`local`);return L(t)?{files:[`server.lock`,`last-spawn-error.log`,l].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Je(e){let t=F(e,`.ok`,`local`,`logs`);return L(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>F(t,e)).filter(e=>L(e))}:{files:[]}}function Ye(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=c(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function W(e){for(let t of e.files)try{Ye({zipfile:e.zipfile,name:`${e.prefix}/${N(t)}`,content:z(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function Xe(t){let{redact:n,outputPath:r,logger:a}=t,o=t.userLogsDir??F(H(),`.ok`,`logs`),c=t.projectDir?Re(t.projectDir,a):null;R(P(r),{recursive:!0}),a?.info({projectSlug:c},`gathering diagnostic data`);let l=ze();l.desktop=t.desktop??null,l.language=t.language??null;let{files:u,excludedByProjectSlug:d}=Ke(c,o),{files:f}=t.projectDir?qe(t.projectDir):{files:[]},{files:p}=t.projectDir?Je(t.projectDir):{files:[]},m=t.shipItLogFiles??[];a?.info({logFileCount:u.length,logFilesExcludedByProjectSlug:d,lockFileCount:f.length,localSinkFileCount:p.length,shipItLogFileCount:m.length},`files collected`);let h=[],g=[],{ZipFile:ee}=await import(`./yazl-BwMlCqRQ.mjs`).then(t=>e(t.default,1)),_=new ee;W({zipfile:_,files:[...u,...m],prefix:`logs`,redact:n,bundleFiles:g,redactions:h,logger:a}),W({zipfile:_,files:f,prefix:`lockdir`,redact:n,bundleFiles:g,redactions:h,logger:a}),W({zipfile:_,files:p,prefix:`local-logs`,redact:n,bundleFiles:g,redactions:h,logger:a}),W({zipfile:_,files:t.bugReportLedgerFiles??[],prefix:s,redact:n,bundleFiles:g,redactions:h,logger:a});for(let e of t.extraFiles??[])try{let t=z(e.sourcePath),n=`extra/${e.zipName??N(e.sourcePath)}`;_.addBuffer(t,n),g.push(n)}catch(t){a?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Ye({zipfile:_,name:`note.txt`,content:t.note,redact:n,bundleFiles:g,redactions:h});let v=JSON.stringify(l,null,2);_.addBuffer(Buffer.from(v,`utf8`),`sysinfo.json`),g.push(`sysinfo.json`);let y={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:c,files:g,redactions:h,sysinfo:l};_.addBuffer(Buffer.from(JSON.stringify(y,null,2),`utf8`),`MANIFEST.json`);let b=h.reduce((e,t)=>e+t.lineCount,0),x=new Set(m.map(e=>`logs/${N(e)}`)),S=g.filter(e=>x.has(e)),C=new Set((t.bugReportLedgerFiles??[]).map(e=>`${s}/${N(e)}`)),w=g.filter(e=>C.has(e)),T=c?g.filter(e=>e.startsWith(`logs/`)&&!Ve(e)&&!x.has(e)):[],E=[`# Bug Report Bundle`,``,`Generated: ${y.generatedAt}`,`Project: ${c??`(unscoped)`}`,`Discipline version: ${y.disciplineVersion}`,``,`## Contents`,``,...g.map(e=>`- ${e}`),``,`## Privacy`,``,...T.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...T.map(e=>`- ${e}`),``]:[],...S.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...S.map(e=>`- ${e}`),``]:[],...w.length>0?[`Send history: a small record for each bug report previously generated`,`on this machine — when it was generated, whether sending it`,`succeeded, and why it failed if it did. This is what makes a failed`,`send diagnosable at all. It is machine-wide rather than scoped to`,`this project, so it names the other projects reports were filed`,`from. It carries no document content:`,...w.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${i.join(`, `)}`,b>0?`${b} line(s) were scrubbed across ${h.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
2
2
  `);_.addBuffer(Buffer.from(E,`utf8`),`README.md`),_.end();let D=he(r);return _.outputStream.pipe(D),await new Promise((e,t)=>{D.on(`close`,e),D.on(`error`,t)}),a?.info({bundlePath:r,fileCount:g.length,redactionCount:b},`bundle written`),{zipPath:r,summary:{projectSlug:c,files:g,redactions:h,redactedLineCount:b,generatedAt:y.generatedAt}}}var Ze=e(E(),1),G=e(O(),1);function Qe(e){return y({absPath:b(`user`,e,e),sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function $e({home:e=H(),env:n=process.env}={}){let i=Qe(e),{override:o,preferenceList:s}=_(n),{locale:c,source:l}=a({override:o,storedPreference:i,supportedLocales:r,preferenceList:s,autoDetectableLocales:t});return{preference:i,locale:c,source:l,systemLanguages:s}}function et(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function tt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function K(e,t){if(typeof e==`string`)return et(e,t.contentDir);if(Array.isArray(e))return e.map(e=>K(e,t));if(!tt(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=K(i,t);return n}function nt(e,t){let n=z(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
3
3
  `),i=n.split(`
4
4
  `),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=K(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}V(e,r?`${a.join(`
@@ -17,4 +17,4 @@ import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sle
17
17
  `).replace(/\n/g,`\r
18
18
  `));let u=`${i?``:``}${l}`;return u!==r&&v(e,u,{mode:j(e)}),{kind:`removed`}}function gn(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function _n(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function vn(e,t,n,r){if(t.status===`missing`||t.status===`corrupt`)return null;let i=t.lock,a=t.status===`alive`&&T(i)?{port:i.port,status:t.status,pid:i.pid,startedAt:i.startedAt,usage:r}:null;return{directory:i.worktreeRoot,server:{port:i.port,status:t.status,pid:i.pid,startedAt:i.startedAt,usage:r},ui:a,hostname:i.hostname,lockPath:t.lockPath,binary:n==null?null:ee(n),command:n,isDesktop:gn(n)}}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:`stale`}const yn=new Set([`running`,`desktop`,`foreign`]);function bn(e){switch(e){case`running`:return G.default.green(e);case`desktop`:return G.default.blue(e);case`foreign`:return G.default.cyan(e);case`stale`:return G.default.yellow(e)}}function xn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function Sn(e){return`${xn(e.server.usage)} | ${xn(e.ui?.usage??null)}`}function Cn(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null?`—`:String(e.ui.port)}`}function wn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>[e.directory,Cn(e),Sn(e),Q(e),String(e.server.pid),_n(e.server.startedAt),e.binary??`—`]),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=bn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=G.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
19
19
  `)}async function Tn(e={}){let t=e.discover??g,n=e.inspect??X,r=e.log??(e=>console.log(e)),i=e.resolveCommand??f,a=e.resolveUsage??h,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=vn(e,t,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid));r!=null&&s.push(r)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(wn(e.all?s:s.filter(e=>yn.has(Q(e)))))}function En(){return new ne(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await Tn({all:t.all===!0||e===`all`,json:t.json===!0})})}function Dn(e,t,n={}){let r=n.isAlive??S,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function On(e){let t=e.inspect??(t=>t===`ui`?Z(e.lockDir):X(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=Dn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function kn(e,t=S){let n=await g(),r=null;for(let i of n){let n=X(i,`server`),a=Z(i);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function An(e){let t=On({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function jn(e){return new ne(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=On({lockDir:p(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await Tn({});return}if(n===`all`){let e=await g();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=X(n,`server`),r=Z(n);!$(e,S)&&!$(r,S)||(An(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await kn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}An(t);return}An(p(I(Ie(),n)))})}export{U as _,rn as a,Ne as b,sn as c,Z as d,X as f,Le as g,Xt as h,fn as i,cn as l,Yt as m,jn as n,ln as o,$t as p,En as r,an as s,On as t,nn as u,Ie as v,Fe as y};
20
- //# sourceMappingURL=src-pWpSZzzm.mjs.map
20
+ //# sourceMappingURL=src-B3B2YRvO.mjs.map