@inkeep/open-knowledge 0.80.0-beta.5 → 0.80.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/cli.mjs +72 -74
  2. package/dist/config-schema.json +3 -3
  3. package/dist/config.project-local.schema.json +1 -1
  4. package/dist/config.user.schema.json +2 -2
  5. package/dist/constants-H8MPNRhO.mjs +1 -0
  6. package/dist/dist-BBi7mVvL.mjs +1 -0
  7. package/dist/dist-GcFBLEr5.mjs +2130 -0
  8. package/dist/index.mjs +233 -233
  9. package/dist/init-7G_l7gil.mjs +1 -0
  10. package/dist/{init-Boyt6ulg.mjs → init-DvYKQnB9.mjs} +17 -17
  11. package/dist/{js-exec-VXN6TZ7U-B4rL1N_3.mjs → js-exec-VXN6TZ7U-Z8_USGOo.mjs} +4 -4
  12. package/dist/{launch-json-removal-B7LKMRLc.mjs → launch-json-removal-7bCaKHP1.mjs} +1 -1
  13. package/dist/loader-BWhgdNl5.mjs +1 -0
  14. package/dist/{loader-DXL-jEwi.mjs → loader-DrjH_b9L.mjs} +1 -1
  15. package/dist/{lzma-C5bZvzmx.mjs → lzma-CEMDJHEs.mjs} +2 -2
  16. package/dist/{md-manager-BGnqyqi1-LuKRfqxD.mjs → md-manager-BGnqyqi1-DCa5-0ww.mjs} +153 -153
  17. package/dist/{open-browser-B_00nhl_.mjs → open-browser-CDL2mqCk.mjs} +1 -1
  18. package/dist/parse-worker.mjs +1 -1
  19. package/dist/{preview-B_9MsldP.mjs → preview-BYnQz9HD.mjs} +1 -1
  20. package/dist/preview-CuyQLuj5.mjs +1 -0
  21. package/dist/public/assets/{ActivityModeContent-Fa2Bc7H7.js → ActivityModeContent-BZzgyg-l.js} +1 -1
  22. package/dist/public/assets/{AddPropertiesButton-CY_aojnI.js → AddPropertiesButton-DARtVJlU.js} +2 -2
  23. package/dist/public/assets/{AgentDiffPane-VQlod0uk.js → AgentDiffPane-BdSQEzRZ.js} +1 -1
  24. package/dist/public/assets/{AgentThreadClientBinder-D83Ifc_u.js → AgentThreadClientBinder-CFgtBbQR.js} +1 -1
  25. package/dist/public/assets/{BugReportHistory-DNPLKDE6.js → BugReportHistory-DDQ7rrrr.js} +1 -1
  26. package/dist/public/assets/{BugReportHistoryDialog-BMwN9BIK.js → BugReportHistoryDialog-Bt-xM9-I.js} +1 -1
  27. package/dist/public/assets/{CodeMirrorPropInput-q5OQqF4N.js → CodeMirrorPropInput-Bf645WUa.js} +1 -1
  28. package/dist/public/assets/{ConsentDialogBody-BarwUkfl.js → ConsentDialogBody-RBMJ0gc0.js} +1 -1
  29. package/dist/public/assets/{DeleteConfirmationDialog-tv35CpzH.js → DeleteConfirmationDialog-n90yA0mh.js} +1 -1
  30. package/dist/public/assets/{DiffViewBoundary-Df7pBeha.js → DiffViewBoundary-DsG9GOLX.js} +1 -1
  31. package/dist/public/assets/{DocumentContext-VRYqEU-B.js → DocumentContext-D7jvhyCA.js} +2 -2
  32. package/dist/public/assets/{EditorModeToggle-Ey6xkZS2.js → EditorModeToggle-Blopqyef.js} +1 -1
  33. package/dist/public/assets/{EnableSyncConfirmDialog-Di9qhAZg.js → EnableSyncConfirmDialog-B056XoQ0.js} +1 -1
  34. package/dist/public/assets/{ExcalidrawDocEditor-CjG9RZeu.js → ExcalidrawDocEditor-C4F3udw2.js} +1 -1
  35. package/dist/public/assets/FeedbackForm-D0MIsMOt.js +1 -0
  36. package/dist/public/assets/{GraphPanel-sDvfmrPI.js → GraphPanel-CewYgyfZ.js} +1 -1
  37. package/dist/public/assets/{ImageAttachments-COJDM7Zs.js → ImageAttachments-DmjOMNqA.js} +1 -1
  38. package/dist/public/assets/{ImportSkillDialog-DZI_Ymxz.js → ImportSkillDialog-C6LzDIr2.js} +1 -1
  39. package/dist/public/assets/{LintConfigEditor-CMCb-_WR.js → LintConfigEditor-BgrTlSeu.js} +1 -1
  40. package/dist/public/assets/{ManagedArtifactProperties-C-o6w1oB.js → ManagedArtifactProperties-Cw4XtRx_.js} +1 -1
  41. package/dist/public/assets/ManagedArtifactProperties-Da_vwJzP.js +1 -0
  42. package/dist/public/assets/{MermaidDocEditor-af9-qY7T.js → MermaidDocEditor-C5hGyxfZ.js} +1 -1
  43. package/dist/public/assets/{OpenInAgentMenuItem-lbV79xn9.js → OpenInAgentMenuItem-QrteG6Br.js} +1 -1
  44. package/dist/public/assets/{PropertyDisplayRow-CbnGGdQB.js → PropertyDisplayRow-C8_v-Tu6.js} +1 -1
  45. package/dist/public/assets/{RegisteredAgentIcon-Btbw9w2J.js → RegisteredAgentIcon--fiCkSba.js} +1 -1
  46. package/dist/public/assets/{ReportBugDialogBody-B1H-65Sn.js → ReportBugDialogBody-BHJJSRc_.js} +1 -1
  47. package/dist/public/assets/{ReportBugMenuTrigger-B-ySnIcK.js → ReportBugMenuTrigger-DDbgWwFU.js} +1 -1
  48. package/dist/public/assets/{SchemaConfigEditor-T4_tM4AM.js → SchemaConfigEditor-CkjLP98S.js} +1 -1
  49. package/dist/public/assets/{SessionsHost-Df6cK8IF.js → SessionsHost-CGMm3aDb.js} +2 -2
  50. package/dist/public/assets/{SettingsDialogBody-7ULgKnMJ.js → SettingsDialogBody-k_8sF_t3.js} +1 -1
  51. package/dist/public/assets/{ShareBranchSwitchDialog-ycuaed88.js → ShareBranchSwitchDialog-C4Eqwx_r.js} +1 -1
  52. package/dist/public/assets/{ShareReceiveDialog-DmE16_gX.js → ShareReceiveDialog-CNa1HD1Q.js} +1 -1
  53. package/dist/public/assets/{ShareReceiveMissDialog-DqsqkZ98.js → ShareReceiveMissDialog-B-_2h-KD.js} +1 -1
  54. package/dist/public/assets/{SkillCostValue-C43y1frw.js → SkillCostValue-CYw_tCqR.js} +1 -1
  55. package/dist/public/assets/{SkillEditBanner-DttpBxOJ.js → SkillEditBanner-BuW2sJvG.js} +1 -1
  56. package/dist/public/assets/{SkillForkDialog-Dzre8M2R.js → SkillForkDialog-DAn5-JZV.js} +1 -1
  57. package/dist/public/assets/{SkillInstallMenu-B0JB7kZB.js → SkillInstallMenu-BRjVgdkn.js} +1 -1
  58. package/dist/public/assets/{SkillOriginInline-CShk5VBB.js → SkillOriginInline-_uPhVG7Y.js} +1 -1
  59. package/dist/public/assets/{SkillToolbarControls-1BYcSekj.js → SkillToolbarControls-OhQrSWSi.js} +1 -1
  60. package/dist/public/assets/{SlidesToolbarControls-CIR9Gt5P.js → SlidesToolbarControls-zHguPndQ.js} +1 -1
  61. package/dist/public/assets/{SourceEditor-dlengKQr.js → SourceEditor-CgtZzyfW.js} +1 -1
  62. package/dist/public/assets/{TerminalPanel-DVVYNGxU.js → TerminalPanel-BzL8_A5I.js} +1 -1
  63. package/dist/public/assets/{TerminalWindowApp-Dbf1LEIb.js → TerminalWindowApp-CFd6nVNH.js} +1 -1
  64. package/dist/public/assets/{TextDocEditor-Bfgflu7Y.js → TextDocEditor-DqBZzHgY.js} +1 -1
  65. package/dist/public/assets/{ThreadView-BAqefrNB.js → ThreadView-DL5_M7LX.js} +1 -1
  66. package/dist/public/assets/{TimelineDiffPane-C5Pk8YKQ.js → TimelineDiffPane-B_27zkg0.js} +1 -1
  67. package/dist/public/assets/{agent-connections-36VzA4Nj.js → agent-connections-BZwWjV-L.js} +1 -1
  68. package/dist/public/assets/{auth-state-cache-y7ZNLaEX.js → auth-state-cache-B5AZOzS0.js} +1 -1
  69. package/dist/public/assets/{bug-report-send-manager-WZvhB30v.js → bug-report-send-manager-DOLrtOEv.js} +1 -1
  70. package/dist/public/assets/{client-version-DAE_LnJT.js → client-version-CDitBjAS.js} +1 -1
  71. package/dist/public/assets/{comment-chips-mEcLNjUa.js → comment-chips-DuFqX1af.js} +1 -1
  72. package/dist/public/assets/{config-provider-Dc4ERnKv.js → config-provider-Ca2HUShB.js} +1 -1
  73. package/dist/public/assets/{css-color-to-hex-HXZok3qq.js → css-color-to-hex-AUn7eIel.js} +1 -1
  74. package/dist/public/assets/{diagnostic-breadcrumb-Da90WJfg.js → diagnostic-breadcrumb-g0QEaFL4.js} +1 -1
  75. package/dist/public/assets/{dist-BXv2iH4t.js → dist-DILeGueK.js} +192 -192
  76. package/dist/public/assets/{doc-paths-DbP8RoCY.js → doc-paths-BWrKtSx2.js} +1 -1
  77. package/dist/public/assets/{doc-undo-manager-BuQfcH7g.js → doc-undo-manager-DSaQkZ_X.js} +1 -1
  78. package/dist/public/assets/{documents-events-B9_p7FnW.js → documents-events-Do7TM3Hd.js} +1 -1
  79. package/dist/public/assets/{file-tree-adapter-CC3PZmuz.js → file-tree-adapter-C1_qOMsA.js} +1 -1
  80. package/dist/public/assets/{file-tree-utils-SoxHR8nZ.js → file-tree-utils-BcIIWtsU.js} +1 -1
  81. package/dist/public/assets/{folder-config-api-D2T7lLE2.js → folder-config-api-CDR1eAcz.js} +1 -1
  82. package/dist/public/assets/{index-ZJRhdCXy.js → index-DcJjM2Hn.js} +8 -8
  83. package/dist/public/assets/{lint-config-client-ByyVt3Ji.js → lint-config-client--83L6Vzq.js} +1 -1
  84. package/dist/public/assets/{markdownlint-rule-browser-DLR8ICzt.js → markdownlint-rule-browser-Dwh97LWk.js} +1 -1
  85. package/dist/public/assets/{navigation-targets-CPBRP2pX.js → navigation-targets-CJ9ZxyzV.js} +1 -1
  86. package/dist/public/assets/{page-list-cache-DP6EykyZ.js → page-list-cache-C6t_W1Qs.js} +1 -1
  87. package/dist/public/assets/{pending-receive-nav-store-BiglQO8z.js → pending-receive-nav-store-CRjoDiuf.js} +1 -1
  88. package/dist/public/assets/{preferred-session-events-Bw6PF8j6.js → preferred-session-events-CwZtdTs7.js} +1 -1
  89. package/dist/public/assets/{progress-3N7lmUHc.js → progress-C4SiEBGf.js} +1 -1
  90. package/dist/public/assets/{project-paths-WwDCX6Wj.js → project-paths-ygpKMwOT.js} +1 -1
  91. package/dist/public/assets/{prop-types-D7m1bgZd.js → prop-types-CT1xGqpW.js} +1 -1
  92. package/dist/public/assets/{receive-store-s0TOnYEX.js → receive-store-DutQ_RL1.js} +1 -1
  93. package/dist/public/assets/{selection-context-DFvB64m4.js → selection-context-COlhw5nL.js} +1 -1
  94. package/dist/public/assets/{sign-in-terminal-events-n2711hbP.js → sign-in-terminal-events-BqTVNN-V.js} +1 -1
  95. package/dist/public/assets/{skill-scope-BEZoxlA_.js → skill-scope-CUAEKGV-.js} +1 -1
  96. package/dist/public/assets/{skills-api-xEJYLsBT.js → skills-api-CM8h9xtl.js} +1 -1
  97. package/dist/public/assets/{src-DW6dj9Em.js → src-U7mQYf3e.js} +1 -1
  98. package/dist/public/assets/{startup-marks-BI3f20Ai.js → startup-marks-vgWlVGPK.js} +1 -1
  99. package/dist/public/assets/{tag-pill-input-9A5egJpq.js → tag-pill-input-BRyN2FKA.js} +1 -1
  100. package/dist/public/assets/{target-navigation-intent-KL1RgeS2.js → target-navigation-intent-7jeW8XWM.js} +1 -1
  101. package/dist/public/assets/{telemetry-startup-D5AbtRQp.js → telemetry-startup-DiFICPCo.js} +1 -1
  102. package/dist/public/assets/{terminal-command-events-Cwnlls-2.js → terminal-command-events-CVCqfbNT.js} +1 -1
  103. package/dist/public/assets/{terminal-launch-events-BeaRJslN.js → terminal-launch-events-DuaMfoq_.js} +1 -1
  104. package/dist/public/assets/{terminal-telemetry-B-Ex6x4P.js → terminal-telemetry-BHuv7G5q.js} +1 -1
  105. package/dist/public/assets/{thread-client-BohJshIz.js → thread-client-BZoVbxhe.js} +1 -1
  106. package/dist/public/assets/{typing-burst-detector-CRC92mGc.js → typing-burst-detector-H1V6TICJ.js} +1 -1
  107. package/dist/public/assets/{uninstall-BI1OhVGa.js → uninstall-D2krzbU2.js} +1 -1
  108. package/dist/public/assets/{use-activity-panel-DSA7U3E8.js → use-activity-panel-BP0UGAow.js} +1 -1
  109. package/dist/public/assets/{use-apply-config-language-BQbUd-j-.js → use-apply-config-language-BwIOrXvC.js} +1 -1
  110. package/dist/public/assets/{use-collab-url-BLYPZ3GH.js → use-collab-url-JUcW-mVG.js} +1 -1
  111. package/dist/public/assets/{use-conflicts-Bk4ek4CK.js → use-conflicts-yBw-ZjZM.js} +1 -1
  112. package/dist/public/assets/{use-git-sync-status-CDLRE1Yh.js → use-git-sync-status-CoUdayE7.js} +1 -1
  113. package/dist/public/assets/{use-installed-clis-e8k5ayDZ.js → use-installed-clis-j9XDtwV2.js} +2 -2
  114. package/dist/public/assets/{use-live-xterm-theme-CumqDZtn.js → use-live-xterm-theme-DBWjwre6.js} +1 -1
  115. package/dist/public/assets/{use-open-skill-LwyclBox.js → use-open-skill-C7UyAcdd.js} +1 -1
  116. package/dist/public/assets/{use-settings-route-4si6XFq0.js → use-settings-route-DHuAch1j.js} +1 -1
  117. package/dist/public/assets/{use-skill-origin-BuNz7780.js → use-skill-origin-DhcploXf.js} +1 -1
  118. package/dist/public/assets/{use-skills-C1ayg_tU.js → use-skills-DJX6inxB.js} +1 -1
  119. package/dist/public/assets/{use-terminal-enabled-DH9NZVb3.js → use-terminal-enabled-Y78SBxmZ.js} +1 -1
  120. package/dist/public/assets/{use-timeline-entry-diff-x56ANf6r.js → use-timeline-entry-diff-DY2_QU4I.js} +1 -1
  121. package/dist/public/assets/{use-workspace-DkzDvF62.js → use-workspace-2aIeQVoi.js} +1 -1
  122. package/dist/public/index.html +59 -59
  123. package/dist/public/uninstall.html +3 -3
  124. package/dist/{python3-DNGS4G3E-Cm5Hwa-u.mjs → python3-DNGS4G3E-CixyRGKv.mjs} +3 -3
  125. package/dist/registry-probes-p0ZApPjq.mjs +17 -0
  126. package/dist/{removal-file-path-3ZpUklLl.mjs → removal-file-path-Bx2ZAa33.mjs} +1 -1
  127. package/dist/{repair-launch-json-CMMYwCjW.mjs → repair-launch-json-Bfv2MHor.mjs} +1 -1
  128. package/dist/{repair-mcp-configs-DzGALib-.mjs → repair-mcp-configs-Dae5PZa1.mjs} +1 -1
  129. package/dist/schemas/v0/config.project-local.schema.json +1 -1
  130. package/dist/schemas/v0/config.user.schema.json +2 -2
  131. package/dist/{sqlite3-TE5AIOTF-DxxxT49W.mjs → sqlite3-TE5AIOTF-DVwda1Ow.mjs} +3 -3
  132. package/dist/src-BP-PBpUx.mjs +1 -0
  133. package/dist/src-Cy-zDyG6.mjs +11 -0
  134. package/dist/start-D6uOZUia.mjs +1 -0
  135. package/dist/{start-Jnb5yYdV.mjs → start-DTpjNc5f.mjs} +3 -3
  136. package/dist/{tar-MZQD7NO4-JRjaVj6V.mjs → tar-MZQD7NO4-BRGDcHqv.mjs} +2 -2
  137. package/package.json +4 -4
  138. package/dist/constants-BZiqchuc.mjs +0 -1
  139. package/dist/dist-CuWl8z8W.mjs +0 -1
  140. package/dist/dist-DZXRg1jC.mjs +0 -2130
  141. package/dist/init-Bx1lz5rE.mjs +0 -1
  142. package/dist/loader-C5L_-7Kf.mjs +0 -1
  143. package/dist/preview-C2LIBolB.mjs +0 -1
  144. package/dist/public/assets/FeedbackForm-0otENm61.js +0 -1
  145. package/dist/public/assets/ManagedArtifactProperties-C-JL8uLM.js +0 -1
  146. package/dist/registry-probes-3L8CRnGg.mjs +0 -17
  147. package/dist/src-DU6Xx1gD.mjs +0 -11
  148. package/dist/src-DjmVymt-.mjs +0 -1
  149. package/dist/start-B8Yg-ZtE.mjs +0 -1
@@ -94,7 +94,7 @@
94
94
  -->
95
95
  <script>(() => { try { const raw = localStorage.getItem('ok-language-v1'); if (!raw) return; const o = JSON.parse(raw); if (typeof o?.locale !== 'string' || !/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{2,8})*$/.test(o.locale)) return; document.documentElement.lang = o.locale; document.documentElement.dir = o.dir === 'rtl' ? 'rtl' : 'ltr'; } catch {} })();</script>
96
96
  <style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
97
- <script type="module" crossorigin src="./assets/index-ZJRhdCXy.js"></script>
97
+ <script type="module" crossorigin src="./assets/index-DcJjM2Hn.js"></script>
98
98
  <link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
99
99
  <link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
100
100
  <link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
@@ -108,19 +108,19 @@
108
108
  <link rel="modulepreload" crossorigin href="./assets/lib-DmueaA5E.js">
109
109
  <link rel="modulepreload" crossorigin href="./assets/markdownit-CugClK-K.js">
110
110
  <link rel="modulepreload" crossorigin href="./assets/w3c-keyname-C7Rznu6R.js">
111
- <link rel="modulepreload" crossorigin href="./assets/dist-BXv2iH4t.js">
111
+ <link rel="modulepreload" crossorigin href="./assets/dist-DILeGueK.js">
112
112
  <link rel="modulepreload" crossorigin href="./assets/dist-PQ5KMVDh.js">
113
113
  <link rel="modulepreload" crossorigin href="./assets/compiler-runtime-BfE3aGVn.js">
114
114
  <link rel="modulepreload" crossorigin href="./assets/jsx-runtime-BUgB2tll.js">
115
115
  <link rel="modulepreload" crossorigin href="./assets/dist-Cr4-nBVI.js">
116
116
  <link rel="modulepreload" crossorigin href="./assets/dist-CJhtNlOm2.js">
117
117
  <link rel="modulepreload" crossorigin href="./assets/messages-BfrQRlyf.js">
118
- <link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-BQbUd-j-.js">
119
- <link rel="modulepreload" crossorigin href="./assets/client-version-DAE_LnJT.js">
118
+ <link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-BwIOrXvC.js">
119
+ <link rel="modulepreload" crossorigin href="./assets/client-version-CDitBjAS.js">
120
120
  <link rel="modulepreload" crossorigin href="./assets/dist-Nvb76hAm.js">
121
121
  <link rel="modulepreload" crossorigin href="./assets/use-apply-config-theme-B5w38X1P.js">
122
- <link rel="modulepreload" crossorigin href="./assets/css-color-to-hex-HXZok3qq.js">
123
- <link rel="modulepreload" crossorigin href="./assets/config-provider-Dc4ERnKv.js">
122
+ <link rel="modulepreload" crossorigin href="./assets/css-color-to-hex-AUn7eIel.js">
123
+ <link rel="modulepreload" crossorigin href="./assets/config-provider-Ca2HUShB.js">
124
124
  <link rel="modulepreload" crossorigin href="./assets/dist-BHv-mziD.js">
125
125
  <link rel="modulepreload" crossorigin href="./assets/dist-BcvirUWL.js">
126
126
  <link rel="modulepreload" crossorigin href="./assets/dist-BDna-dOq.js">
@@ -160,15 +160,15 @@
160
160
  <link rel="modulepreload" crossorigin href="./assets/folder-open-BaM9INLo.js">
161
161
  <link rel="modulepreload" crossorigin href="./assets/trash-2-B9Flu-41.js">
162
162
  <link rel="modulepreload" crossorigin href="./assets/with-selector-PRoyWQiu.js">
163
- <link rel="modulepreload" crossorigin href="./assets/file-tree-utils-SoxHR8nZ.js">
164
- <link rel="modulepreload" crossorigin href="./assets/doc-paths-DbP8RoCY.js">
165
- <link rel="modulepreload" crossorigin href="./assets/navigation-targets-CPBRP2pX.js">
163
+ <link rel="modulepreload" crossorigin href="./assets/file-tree-utils-BcIIWtsU.js">
164
+ <link rel="modulepreload" crossorigin href="./assets/doc-paths-BWrKtSx2.js">
165
+ <link rel="modulepreload" crossorigin href="./assets/navigation-targets-CJ9ZxyzV.js">
166
166
  <link rel="modulepreload" crossorigin href="./assets/cm-theme-DSHZdfgZ.js">
167
- <link rel="modulepreload" crossorigin href="./assets/page-list-cache-DP6EykyZ.js">
167
+ <link rel="modulepreload" crossorigin href="./assets/page-list-cache-C6t_W1Qs.js">
168
168
  <link rel="modulepreload" crossorigin href="./assets/external-link-DCF8KwVP.js">
169
169
  <link rel="modulepreload" crossorigin href="./assets/documents-fetch-9IykZT4F.js">
170
170
  <link rel="modulepreload" crossorigin href="./assets/note-window-mode-CsmLTxU_.js">
171
- <link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-q5OQqF4N.js">
171
+ <link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-Bf645WUa.js">
172
172
  <link rel="modulepreload" crossorigin href="./assets/git-branch-B_QTfwFA.js">
173
173
  <link rel="modulepreload" crossorigin href="./assets/maximize-2-DaY3HCwc.js">
174
174
  <link rel="modulepreload" crossorigin href="./assets/triangle-alert-CCeXtPLU.js">
@@ -177,11 +177,11 @@
177
177
  <link rel="modulepreload" crossorigin href="./assets/Mermaid-DZf1Vjbg.js">
178
178
  <link rel="modulepreload" crossorigin href="./assets/chevron-right-C-g4JuT4.js">
179
179
  <link rel="modulepreload" crossorigin href="./assets/circle-alert-Czw40trT.js">
180
- <link rel="modulepreload" crossorigin href="./assets/documents-events-B9_p7FnW.js">
180
+ <link rel="modulepreload" crossorigin href="./assets/documents-events-Do7TM3Hd.js">
181
181
  <link rel="modulepreload" crossorigin href="./assets/parse-api-error-BtEdpaFC.js">
182
- <link rel="modulepreload" crossorigin href="./assets/diagnostic-breadcrumb-Da90WJfg.js">
183
- <link rel="modulepreload" crossorigin href="./assets/startup-marks-BI3f20Ai.js">
184
- <link rel="modulepreload" crossorigin href="./assets/prop-types-D7m1bgZd.js">
182
+ <link rel="modulepreload" crossorigin href="./assets/diagnostic-breadcrumb-g0QEaFL4.js">
183
+ <link rel="modulepreload" crossorigin href="./assets/startup-marks-vgWlVGPK.js">
184
+ <link rel="modulepreload" crossorigin href="./assets/prop-types-CT1xGqpW.js">
185
185
  <link rel="modulepreload" crossorigin href="./assets/eye-BQkq4vEg.js">
186
186
  <link rel="modulepreload" crossorigin href="./assets/hash-d98LeeWB.js">
187
187
  <link rel="modulepreload" crossorigin href="./assets/info-CilGMBpP.js">
@@ -195,62 +195,62 @@
195
195
  <link rel="modulepreload" crossorigin href="./assets/input-3o4m6NnP.js">
196
196
  <link rel="modulepreload" crossorigin href="./assets/dist-zcYT-cpc.js">
197
197
  <link rel="modulepreload" crossorigin href="./assets/popover-DwsSVA7z.js">
198
- <link rel="modulepreload" crossorigin href="./assets/use-collab-url-BLYPZ3GH.js">
198
+ <link rel="modulepreload" crossorigin href="./assets/use-collab-url-JUcW-mVG.js">
199
199
  <link rel="modulepreload" crossorigin href="./assets/excalidraw-scene-Dt53ij1C.js">
200
200
  <link rel="modulepreload" crossorigin href="./assets/known-skill-dirs-D8EeZYCk.js">
201
- <link rel="modulepreload" crossorigin href="./assets/skill-scope-BEZoxlA_.js">
202
- <link rel="modulepreload" crossorigin href="./assets/skills-api-xEJYLsBT.js">
203
- <link rel="modulepreload" crossorigin href="./assets/use-workspace-DkzDvF62.js">
204
- <link rel="modulepreload" crossorigin href="./assets/DocumentContext-VRYqEU-B.js">
201
+ <link rel="modulepreload" crossorigin href="./assets/skill-scope-CUAEKGV-.js">
202
+ <link rel="modulepreload" crossorigin href="./assets/skills-api-CM8h9xtl.js">
203
+ <link rel="modulepreload" crossorigin href="./assets/use-workspace-2aIeQVoi.js">
204
+ <link rel="modulepreload" crossorigin href="./assets/DocumentContext-D7jvhyCA.js">
205
205
  <link rel="modulepreload" crossorigin href="./assets/dist-Dhtu02232.js">
206
206
  <link rel="modulepreload" crossorigin href="./assets/dist-tLQ-ULW1.js">
207
207
  <link rel="modulepreload" crossorigin href="./assets/dist-BX7qfUal.js">
208
208
  <link rel="modulepreload" crossorigin href="./assets/dropdown-menu-BEhl0wvu.js">
209
- <link rel="modulepreload" crossorigin href="./assets/comment-chips-mEcLNjUa.js">
210
- <link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-CC3PZmuz.js">
209
+ <link rel="modulepreload" crossorigin href="./assets/comment-chips-DuFqX1af.js">
210
+ <link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-C1_qOMsA.js">
211
211
  <link rel="modulepreload" crossorigin href="./assets/acp-thread-protocol-fXXW5_Sv.js">
212
- <link rel="modulepreload" crossorigin href="./assets/thread-client-BohJshIz.js">
212
+ <link rel="modulepreload" crossorigin href="./assets/thread-client-BZoVbxhe.js">
213
213
  <link rel="modulepreload" crossorigin href="./assets/tool-list-format-BVkGh5Od.js">
214
214
  <link rel="modulepreload" crossorigin href="./assets/image-attachment-BA7bnIX9.js">
215
215
  <link rel="modulepreload" crossorigin href="./assets/workspace-paths-B4HZ2xXF.js">
216
- <link rel="modulepreload" crossorigin href="./assets/progress-3N7lmUHc.js">
216
+ <link rel="modulepreload" crossorigin href="./assets/progress-C4SiEBGf.js">
217
217
  <link rel="modulepreload" crossorigin href="./assets/radio-group-npdxiS6E.js">
218
218
  <link rel="modulepreload" crossorigin href="./assets/separator-CcvvqzEJ.js">
219
219
  <link rel="modulepreload" crossorigin href="./assets/toggle-group-BxIyZnUJ.js">
220
220
  <link rel="modulepreload" crossorigin href="./assets/useQuery-ZeEDLtxh.js">
221
221
  <link rel="modulepreload" crossorigin href="./assets/format-i5Jt838H.js">
222
222
  <link rel="modulepreload" crossorigin href="./assets/braces-OM56BU1Y.js">
223
- <link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-CbnGGdQB.js">
224
- <link rel="modulepreload" crossorigin href="./assets/folder-config-api-D2T7lLE2.js">
225
- <link rel="modulepreload" crossorigin href="./assets/SkillCostValue-C43y1frw.js">
223
+ <link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-C8_v-Tu6.js">
224
+ <link rel="modulepreload" crossorigin href="./assets/folder-config-api-CDR1eAcz.js">
225
+ <link rel="modulepreload" crossorigin href="./assets/SkillCostValue-CYw_tCqR.js">
226
226
  <link rel="modulepreload" crossorigin href="./assets/textarea-CKTD258L.js">
227
- <link rel="modulepreload" crossorigin href="./assets/selection-context-DFvB64m4.js">
228
- <link rel="modulepreload" crossorigin href="./assets/lint-config-client-ByyVt3Ji.js">
229
- <link rel="modulepreload" crossorigin href="./assets/use-skills-C1ayg_tU.js">
230
- <link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-C-o6w1oB.js">
231
- <link rel="modulepreload" crossorigin href="./assets/use-git-sync-status-CDLRE1Yh.js">
232
- <link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-Di9qhAZg.js">
227
+ <link rel="modulepreload" crossorigin href="./assets/selection-context-COlhw5nL.js">
228
+ <link rel="modulepreload" crossorigin href="./assets/lint-config-client--83L6Vzq.js">
229
+ <link rel="modulepreload" crossorigin href="./assets/use-skills-DJX6inxB.js">
230
+ <link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-Cw4XtRx_.js">
231
+ <link rel="modulepreload" crossorigin href="./assets/use-git-sync-status-CoUdayE7.js">
232
+ <link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-B056XoQ0.js">
233
233
  <link rel="modulepreload" crossorigin href="./assets/arrow-up-right-B3B9a7te.js">
234
234
  <link rel="modulepreload" crossorigin href="./assets/cursor-DNMIFrEn.js">
235
- <link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon-Btbw9w2J.js">
235
+ <link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon--fiCkSba.js">
236
236
  <link rel="modulepreload" crossorigin href="./assets/folder-BrDDZVzs.js">
237
237
  <link rel="modulepreload" crossorigin href="./assets/monitor-BZlB-tXl.js">
238
238
  <link rel="modulepreload" crossorigin href="./assets/copilot-D8KoiiZe.js">
239
- <link rel="modulepreload" crossorigin href="./assets/OpenInAgentMenuItem-lbV79xn9.js">
239
+ <link rel="modulepreload" crossorigin href="./assets/OpenInAgentMenuItem-QrteG6Br.js">
240
240
  <link rel="modulepreload" crossorigin href="./assets/mascot-outline-CtS592mc.js">
241
241
  <link rel="modulepreload" crossorigin href="./assets/field-BmnhqmEH.js">
242
- <link rel="modulepreload" crossorigin href="./assets/agent-connections-36VzA4Nj.js">
242
+ <link rel="modulepreload" crossorigin href="./assets/agent-connections-BZwWjV-L.js">
243
243
  <link rel="modulepreload" crossorigin href="./assets/dist-CsrrNdnj.js">
244
- <link rel="modulepreload" crossorigin href="./assets/DeleteConfirmationDialog-tv35CpzH.js">
244
+ <link rel="modulepreload" crossorigin href="./assets/DeleteConfirmationDialog-n90yA0mh.js">
245
245
  <link rel="modulepreload" crossorigin href="./assets/bool-pref-SOpULTKU.js">
246
- <link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-B0JB7kZB.js">
246
+ <link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-BRjVgdkn.js">
247
247
  <link rel="modulepreload" crossorigin href="./assets/list-plus-BmoxCvSM.js">
248
248
  <link rel="modulepreload" crossorigin href="./assets/agent-launcher-labels-BHkU9FJG.js">
249
- <link rel="modulepreload" crossorigin href="./assets/use-open-skill-LwyclBox.js">
250
- <link rel="modulepreload" crossorigin href="./assets/use-settings-route-4si6XFq0.js">
249
+ <link rel="modulepreload" crossorigin href="./assets/use-open-skill-C7UyAcdd.js">
250
+ <link rel="modulepreload" crossorigin href="./assets/use-settings-route-DHuAch1j.js">
251
251
  <link rel="modulepreload" crossorigin href="./assets/platform-labels-Cye5yRUr.js">
252
252
  <link rel="modulepreload" crossorigin href="./assets/clipboard-adapter-CRe0Py9L.js">
253
- <link rel="modulepreload" crossorigin href="./assets/AddPropertiesButton-CY_aojnI.js">
253
+ <link rel="modulepreload" crossorigin href="./assets/AddPropertiesButton-DARtVJlU.js">
254
254
  <link rel="modulepreload" crossorigin href="./assets/case-sensitive-B01mpdhT.js">
255
255
  <link rel="modulepreload" crossorigin href="./assets/chevron-left-BTZYHMSf.js">
256
256
  <link rel="modulepreload" crossorigin href="./assets/lint-plugin-meta-zA9wHIBR.js">
@@ -258,20 +258,20 @@
258
258
  <link rel="modulepreload" crossorigin href="./assets/wrench-Cjhn9plF.js">
259
259
  <link rel="modulepreload" crossorigin href="./assets/panel-BhR5IDqi.js">
260
260
  <link rel="modulepreload" crossorigin href="./assets/skeleton-C6CemrJA.js">
261
- <link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-CRC92mGc.js">
261
+ <link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-H1V6TICJ.js">
262
262
  <link rel="modulepreload" crossorigin href="./assets/terminal-DGmaW797.js">
263
- <link rel="modulepreload" crossorigin href="./assets/terminal-command-events-Cwnlls-2.js">
264
- <link rel="modulepreload" crossorigin href="./assets/use-conflicts-Bk4ek4CK.js">
265
- <link rel="modulepreload" crossorigin href="./assets/auth-state-cache-y7ZNLaEX.js">
263
+ <link rel="modulepreload" crossorigin href="./assets/terminal-command-events-CVCqfbNT.js">
264
+ <link rel="modulepreload" crossorigin href="./assets/use-conflicts-yBw-ZjZM.js">
265
+ <link rel="modulepreload" crossorigin href="./assets/auth-state-cache-B5AZOzS0.js">
266
266
  <link rel="modulepreload" crossorigin href="./assets/miss-dialog-store-CNJRdTPE.js">
267
- <link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-BiglQO8z.js">
268
- <link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-KL1RgeS2.js">
269
- <link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-BeaRJslN.js">
267
+ <link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-CRjoDiuf.js">
268
+ <link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-7jeW8XWM.js">
269
+ <link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-DuaMfoq_.js">
270
270
  <link rel="modulepreload" crossorigin href="./assets/contact-email-store-Dw8LjGGX.js">
271
- <link rel="modulepreload" crossorigin href="./assets/bug-report-send-manager-WZvhB30v.js">
271
+ <link rel="modulepreload" crossorigin href="./assets/bug-report-send-manager-DOLrtOEv.js">
272
272
  <link rel="modulepreload" crossorigin href="./assets/package-CeXWww6f.js">
273
273
  <link rel="modulepreload" crossorigin href="./assets/overlay-layers-Bj-TVfKw.js">
274
- <link rel="modulepreload" crossorigin href="./assets/preferred-session-events-Bw6PF8j6.js">
274
+ <link rel="modulepreload" crossorigin href="./assets/preferred-session-events-CwZtdTs7.js">
275
275
  <link rel="modulepreload" crossorigin href="./assets/panel-right-open-BxxSz62O.js">
276
276
  <link rel="modulepreload" crossorigin href="./assets/rotate-ccw-B05K_aam.js">
277
277
  <link rel="modulepreload" crossorigin href="./assets/square-pen-BhqhPrdL.js">
@@ -280,25 +280,25 @@
280
280
  <link rel="modulepreload" crossorigin href="./assets/dist-iktChXpw2.js">
281
281
  <link rel="modulepreload" crossorigin href="./assets/dist-D7atKMoz2.js">
282
282
  <link rel="modulepreload" crossorigin href="./assets/text-viewer-languages-t4JW0hup.js">
283
- <link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-Ey6xkZS2.js">
284
- <link rel="modulepreload" crossorigin href="./assets/ImageAttachments-COJDM7Zs.js">
283
+ <link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-Blopqyef.js">
284
+ <link rel="modulepreload" crossorigin href="./assets/ImageAttachments-DmjOMNqA.js">
285
285
  <link rel="modulepreload" crossorigin href="./assets/ConfigSharingInfoTooltip-CF-B970o.js">
286
286
  <link rel="modulepreload" crossorigin href="./assets/RowDisclosure-BU1n3yae.js">
287
- <link rel="modulepreload" crossorigin href="./assets/project-paths-WwDCX6Wj.js">
288
- <link rel="modulepreload" crossorigin href="./assets/use-installed-clis-e8k5ayDZ.js">
289
- <link rel="modulepreload" crossorigin href="./assets/ReportBugMenuTrigger-B-ySnIcK.js">
287
+ <link rel="modulepreload" crossorigin href="./assets/project-paths-ygpKMwOT.js">
288
+ <link rel="modulepreload" crossorigin href="./assets/use-installed-clis-j9XDtwV2.js">
289
+ <link rel="modulepreload" crossorigin href="./assets/ReportBugMenuTrigger-DDbgWwFU.js">
290
290
  <link rel="modulepreload" crossorigin href="./assets/SkillModeBanner-BVUswsIV.js">
291
291
  <link rel="modulepreload" crossorigin href="./assets/app-menubar-gate-CffaflWq.js">
292
292
  <link rel="modulepreload" crossorigin href="./assets/agent-diff-store-BYubPvgj.js">
293
293
  <link rel="modulepreload" crossorigin href="./assets/ok-BNXU3Bwu.js">
294
- <link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-CumqDZtn.js">
294
+ <link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-DBWjwre6.js">
295
295
  <link rel="modulepreload" crossorigin href="./assets/alert-CdTiH_ow.js">
296
296
  <link rel="modulepreload" crossorigin href="./assets/input-group-Bp9yqbay.js">
297
- <link rel="modulepreload" crossorigin href="./assets/use-skill-origin-BuNz7780.js">
298
- <link rel="modulepreload" crossorigin href="./assets/terminal-telemetry-B-Ex6x4P.js">
297
+ <link rel="modulepreload" crossorigin href="./assets/use-skill-origin-DhcploXf.js">
298
+ <link rel="modulepreload" crossorigin href="./assets/terminal-telemetry-BHuv7G5q.js">
299
299
  <link rel="modulepreload" crossorigin href="./assets/agent-presence-FHNXgNvc.js">
300
300
  <link rel="modulepreload" crossorigin href="./assets/auth-prompt-store-D3eTM4hj.js">
301
- <link rel="modulepreload" crossorigin href="./assets/receive-store-s0TOnYEX.js">
301
+ <link rel="modulepreload" crossorigin href="./assets/receive-store-DutQ_RL1.js">
302
302
  <link rel="modulepreload" crossorigin href="./assets/timeline-diff-store-S5tVgr-G.js">
303
303
  <link rel="stylesheet" crossorigin href="./assets/globals-Bx4DAP1K.css">
304
304
  <link rel="stylesheet" crossorigin href="./assets/DocumentContext-B0sQn39F.css">
@@ -32,7 +32,7 @@
32
32
  script above.
33
33
  -->
34
34
  <style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
35
- <script type="module" crossorigin src="./assets/uninstall-BI1OhVGa.js"></script>
35
+ <script type="module" crossorigin src="./assets/uninstall-D2krzbU2.js"></script>
36
36
  <link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
37
37
  <link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
38
38
  <link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
@@ -44,7 +44,7 @@
44
44
  <link rel="modulepreload" crossorigin href="./assets/lib-DmueaA5E.js">
45
45
  <link rel="modulepreload" crossorigin href="./assets/markdownit-CugClK-K.js">
46
46
  <link rel="modulepreload" crossorigin href="./assets/w3c-keyname-C7Rznu6R.js">
47
- <link rel="modulepreload" crossorigin href="./assets/dist-BXv2iH4t.js">
47
+ <link rel="modulepreload" crossorigin href="./assets/dist-DILeGueK.js">
48
48
  <link rel="modulepreload" crossorigin href="./assets/dist-Cr4-nBVI.js">
49
49
  <link rel="modulepreload" crossorigin href="./assets/jsx-runtime-BUgB2tll.js">
50
50
  <link rel="modulepreload" crossorigin href="./assets/dist-Nvb76hAm.js">
@@ -70,7 +70,7 @@
70
70
  <link rel="modulepreload" crossorigin href="./assets/textarea-CKTD258L.js">
71
71
  <link rel="modulepreload" crossorigin href="./assets/dist-CJhtNlOm2.js">
72
72
  <link rel="modulepreload" crossorigin href="./assets/messages-BfrQRlyf.js">
73
- <link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-BQbUd-j-.js">
73
+ <link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-BwIOrXvC.js">
74
74
  <link rel="stylesheet" crossorigin href="./assets/globals-Bx4DAP1K.css">
75
75
  </head>
76
76
 
@@ -1,7 +1,7 @@
1
- import"./chunk-R6VWJ2ZL-Cu1kOJ3f.mjs";import"./chunk-CWQS3NFK-Dma10iZG.mjs";import"./chunk-DXB73IDG-MLBj3lvC.mjs";import{t as e}from"./chunk-5QMZ5MUS-B37CnsNb.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-2_dxLAd1.mjs";import{n as r}from"./chunk-OJDRYQWQ-DOhqJ55-.mjs";import{n as i}from"./chunk-24IMIIXA-CZ-UxWg_.mjs";import{n as a,t as o}from"./chunk-3THT3N7L-DVKHLRUO.mjs";import{t as s}from"./chunk-44UOCSGV-CeGMLWmo.mjs";import{r as c,t as l}from"./chunk-74CEPOFO-BuzahJu2.mjs";import{n as u,t as d}from"./chunk-I57KEIP3-CtKTv_KT.mjs";import{randomBytes as f}from"node:crypto";import{fileURLToPath as p}from"node:url";import{Worker as m}from"node:worker_threads";var h=1e4,g=6e4,_={name:`python3`,summary:`Execute Python code via CPython Emscripten`,usage:`python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]`,description:[`Execute Python code using CPython compiled to WebAssembly via Emscripten.`,``,`This command runs Python in an isolated environment with access to`,`the virtual filesystem. Standard library modules are available.`],options:[`-c CODE Execute CODE as Python script`,`-m MODULE Run library module as a script`,`--version Show Python version`,`--help Show this help`],examples:[`python3 -c "print(1 + 2)"`,`python3 -c "import sys; print(sys.version)"`,`python3 script.py`,`python3 script.py arg1 arg2`,`echo 'print("hello")' | python3`],notes:[`CPython runs in WebAssembly, so execution may be slower than native Python.`,`Standard library modules are available (no pip install).`,`Maximum execution time is 30 seconds by default.`]};function v(e){let t={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(e.length===0)return t;let n=e.findIndex(e=>!e.startsWith(`-`)||e===`-`||e===`--`);for(let r=0;r<(n===-1?e.length:n);r++){let n=e[r];if(n===`-c`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'c'
1
+ import"./chunk-R6VWJ2ZL-Cu1kOJ3f.mjs";import"./chunk-CWQS3NFK-Dma10iZG.mjs";import"./chunk-DXB73IDG-MLBj3lvC.mjs";import{t as e}from"./chunk-5QMZ5MUS-B37CnsNb.mjs";import{n as t,t as n}from"./chunk-A5O5YHGN-2_dxLAd1.mjs";import{n as r}from"./chunk-OJDRYQWQ-DOhqJ55-.mjs";import{n as i}from"./chunk-24IMIIXA-CZ-UxWg_.mjs";import{n as a,t as o}from"./chunk-3THT3N7L-DVKHLRUO.mjs";import{t as s}from"./chunk-44UOCSGV-CeGMLWmo.mjs";import{r as c,t as l}from"./chunk-74CEPOFO-BuzahJu2.mjs";import{n as u,t as d}from"./chunk-I57KEIP3-CtKTv_KT.mjs";import{fileURLToPath as f}from"node:url";import{randomBytes as p}from"node:crypto";import{Worker as m}from"node:worker_threads";var h=1e4,g=6e4,_={name:`python3`,summary:`Execute Python code via CPython Emscripten`,usage:`python3 [OPTIONS] [-c CODE | -m MODULE | FILE] [ARGS...]`,description:[`Execute Python code using CPython compiled to WebAssembly via Emscripten.`,``,`This command runs Python in an isolated environment with access to`,`the virtual filesystem. Standard library modules are available.`],options:[`-c CODE Execute CODE as Python script`,`-m MODULE Run library module as a script`,`--version Show Python version`,`--help Show this help`],examples:[`python3 -c "print(1 + 2)"`,`python3 -c "import sys; print(sys.version)"`,`python3 script.py`,`python3 script.py arg1 arg2`,`echo 'print("hello")' | python3`],notes:[`CPython runs in WebAssembly, so execution may be slower than native Python.`,`Standard library modules are available (no pip install).`,`Maximum execution time is 30 seconds by default.`]};function v(e){let t={code:null,module:null,scriptFile:null,showVersion:!1,scriptArgs:[]};if(e.length===0)return t;let n=e.findIndex(e=>!e.startsWith(`-`)||e===`-`||e===`--`);for(let r=0;r<(n===-1?e.length:n);r++){let n=e[r];if(n===`-c`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'c'
2
2
  `,exitCode:2}:(t.code=e[r+1],t.scriptArgs=e.slice(r+2),t);if(n===`-m`)return r+1>=e.length?{stdout:``,stderr:`python3: option requires an argument -- 'm'
3
3
  `,exitCode:2}:(t.module=e[r+1],t.scriptArgs=e.slice(r+2),t);if(n===`--version`||n===`-V`)return t.showVersion=!0,t;if(n.startsWith(`-`)&&n!==`-`)return{stdout:``,stderr:`python3: unrecognized option '${n}'
4
- `,exitCode:2}}if(n!==-1){let r=e[n];r===`--`?n+1<e.length&&(t.scriptFile=e[n+1],t.scriptArgs=e.slice(n+2)):(t.scriptFile=r,t.scriptArgs=e.slice(n+1))}return t}var y=new WeakMap;function b(e){let t=y.get(e);return t||(t={executionQueue:[],isExecuting:!1},y.set(e,t)),t}var x=p(new URL(`./worker.js`,import.meta.url));function S(){return f(16).toString(`hex`)}function C(e,t){if(!e||typeof e!=`object`)return{success:!1,error:`Malformed worker response`};let n=e;return typeof n.protocolToken!=`string`||n.protocolToken!==t?{success:!1,error:`Malformed worker response: invalid protocol token`}:n.type===`security-violation`?{success:!1,error:`Security violation: ${typeof n.violation?.type==`string`?n.violation.type:`unknown`}`}:typeof n.success==`boolean`?n.success?{success:!0}:{success:!1,error:typeof n.error==`string`&&n.error.length>0?n.error:`Worker execution failed`}:{success:!1,error:`Malformed worker response: missing success flag`}}function w(t){if(t.isExecuting||t.executionQueue.length===0)return;for(;t.executionQueue.length>0&&t.executionQueue[0].canceled;)t.executionQueue.shift();if(t.executionQueue.length===0)return;let n=t.executionQueue.shift();if(!n)return;t.isExecuting=!0;let r;try{r=e.runTrusted(()=>new m(x,{workerData:n.input}))}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t);return}n.workerRef&&(n.workerRef.current=r);let a=i(n.requireDefenseContext,`python3`,`worker message callback`,e=>{n.resolve(C(e,n.input.protocolToken)),t.isExecuting=!1,r.terminate(),w(t)}),c=i(n.requireDefenseContext,`python3`,`worker error callback`,e=>{let r=o(s(e));n.resolve({success:!1,error:r}),t.isExecuting=!1,w(t)}),l=i(n.requireDefenseContext,`python3`,`worker exit callback`,()=>{t.isExecuting&&(n.resolve({success:!1,error:`Worker exited unexpectedly`}),t.isExecuting=!1,w(t))});r.on(`message`,e=>{try{a(e)}catch(e){let i=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(i)}),t.isExecuting=!1,r.terminate(),w(t)}}),r.on(`error`,e=>{try{c(e)}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}}),r.on(`exit`,()=>{try{l()}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}})}async function T(e,a,c,l=[]){let f=u(),p=new d(f,a.fs,a.cwd,`python3`,a.fetch,a.limits?.maxOutputSize??0),m=a.limits?.maxPythonTimeoutMs??h,_=a.fetch?Math.max(m,g):m,v=b(a.fs),y={protocolToken:S(),sharedBuffer:f,pythonCode:e,cwd:a.cwd,env:r(a.env),args:l,scriptPath:c,timeoutMs:_},x={current:null},C=new Promise(e=>{let r={input:y,resolve:()=>{},workerRef:x,requireDefenseContext:a.requireDefenseContext},s=i(a.requireDefenseContext,`python3`,`worker timeout callback`,()=>{x.current?x.current.terminate():r.canceled=!0,e({success:!1,error:`Execution timeout: exceeded ${_}ms limit`})}),c=n(()=>{try{s()}catch(t){let n=t instanceof Error?t.message:String(t);e({success:!1,error:o(n)})}},_);r.resolve=n=>{t(c),e(n)},v.executionQueue.push(r),w(v)}),[T,E]=await Promise.all([p.run(_).catch(e=>({stdout:``,stderr:`python3: bridge error: ${o(s(e))}
4
+ `,exitCode:2}}if(n!==-1){let r=e[n];r===`--`?n+1<e.length&&(t.scriptFile=e[n+1],t.scriptArgs=e.slice(n+2)):(t.scriptFile=r,t.scriptArgs=e.slice(n+1))}return t}var y=new WeakMap;function b(e){let t=y.get(e);return t||(t={executionQueue:[],isExecuting:!1},y.set(e,t)),t}var x=f(new URL(`./worker.js`,import.meta.url));function S(){return p(16).toString(`hex`)}function C(e,t){if(!e||typeof e!=`object`)return{success:!1,error:`Malformed worker response`};let n=e;return typeof n.protocolToken!=`string`||n.protocolToken!==t?{success:!1,error:`Malformed worker response: invalid protocol token`}:n.type===`security-violation`?{success:!1,error:`Security violation: ${typeof n.violation?.type==`string`?n.violation.type:`unknown`}`}:typeof n.success==`boolean`?n.success?{success:!0}:{success:!1,error:typeof n.error==`string`&&n.error.length>0?n.error:`Worker execution failed`}:{success:!1,error:`Malformed worker response: missing success flag`}}function w(t){if(t.isExecuting||t.executionQueue.length===0)return;for(;t.executionQueue.length>0&&t.executionQueue[0].canceled;)t.executionQueue.shift();if(t.executionQueue.length===0)return;let n=t.executionQueue.shift();if(!n)return;t.isExecuting=!0;let r;try{r=e.runTrusted(()=>new m(x,{workerData:n.input}))}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t);return}n.workerRef&&(n.workerRef.current=r);let a=i(n.requireDefenseContext,`python3`,`worker message callback`,e=>{n.resolve(C(e,n.input.protocolToken)),t.isExecuting=!1,r.terminate(),w(t)}),c=i(n.requireDefenseContext,`python3`,`worker error callback`,e=>{let r=o(s(e));n.resolve({success:!1,error:r}),t.isExecuting=!1,w(t)}),l=i(n.requireDefenseContext,`python3`,`worker exit callback`,()=>{t.isExecuting&&(n.resolve({success:!1,error:`Worker exited unexpectedly`}),t.isExecuting=!1,w(t))});r.on(`message`,e=>{try{a(e)}catch(e){let i=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(i)}),t.isExecuting=!1,r.terminate(),w(t)}}),r.on(`error`,e=>{try{c(e)}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}}),r.on(`exit`,()=>{try{l()}catch(e){let r=e instanceof Error?e.message:String(e);n.resolve({success:!1,error:o(r)}),t.isExecuting=!1,w(t)}})}async function T(e,a,c,l=[]){let f=u(),p=new d(f,a.fs,a.cwd,`python3`,a.fetch,a.limits?.maxOutputSize??0),m=a.limits?.maxPythonTimeoutMs??h,_=a.fetch?Math.max(m,g):m,v=b(a.fs),y={protocolToken:S(),sharedBuffer:f,pythonCode:e,cwd:a.cwd,env:r(a.env),args:l,scriptPath:c,timeoutMs:_},x={current:null},C=new Promise(e=>{let r={input:y,resolve:()=>{},workerRef:x,requireDefenseContext:a.requireDefenseContext},s=i(a.requireDefenseContext,`python3`,`worker timeout callback`,()=>{x.current?x.current.terminate():r.canceled=!0,e({success:!1,error:`Execution timeout: exceeded ${_}ms limit`})}),c=n(()=>{try{s()}catch(t){let n=t instanceof Error?t.message:String(t);e({success:!1,error:o(n)})}},_);r.resolve=n=>{t(c),e(n)},v.executionQueue.push(r),w(v)}),[T,E]=await Promise.all([p.run(_).catch(e=>({stdout:``,stderr:`python3: bridge error: ${o(s(e))}
5
5
  `,exitCode:1})),C.catch(e=>({success:!1,error:o(s(e))}))]);if(!E.success&&E.error){let e=o(E.error);return{stdout:T.stdout,stderr:`${T.stderr}python3: ${e}
6
6
  `,exitCode:T.exitCode||1}}return T}var E={name:`python3`,async execute(e,t){if(l(e))return c(_);let n=v(e);if(`exitCode`in n)return n;if(n.showVersion)return{stdout:`Python 3.13.2 (Emscripten)
7
7
  `,stderr:``,exitCode:0};let r,i;if(n.code!==null)r=n.code,i=`-c`;else if(n.module!==null){if(!/^[a-zA-Z_][a-zA-Z0-9_.]*$/.test(n.module))return{stdout:``,stderr:`python3: No module named '${n.module.slice(0,200)}'
@@ -9,4 +9,4 @@ import"./chunk-R6VWJ2ZL-Cu1kOJ3f.mjs";import"./chunk-CWQS3NFK-Dma10iZG.mjs";impo
9
9
  `,exitCode:2};try{r=await t.fs.readFile(e),i=n.scriptFile}catch(e){let t=a(e.message);return{stdout:``,stderr:`python3: can't open file '${n.scriptFile}': ${t}
10
10
  `,exitCode:2}}}else if(t.stdin.trim())r=t.stdin,i=`<stdin>`;else return{stdout:``,stderr:`python3: no input provided (use -c CODE, -m MODULE, or provide a script file)
11
11
  `,exitCode:2};return T(r,t,i,n.scriptArgs)}},D={name:`python`,async execute(e,t){return E.execute(e,t)}};export{E as python3Command,D as pythonCommand};
12
- //# sourceMappingURL=python3-DNGS4G3E-Cm5Hwa-u.mjs.map
12
+ //# sourceMappingURL=python3-DNGS4G3E-CixyRGKv.mjs.map
@@ -0,0 +1,17 @@
1
+ import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Cf as r,Ef as i,Tf as a,Yl as o,_d as s,bf as c,cd as l,ed as u,if as d,lf as f,of as p,sf as m}from"./md-manager-BGnqyqi1-DCa5-0ww.mjs";import{Dn as h,Ho as g,Jo as _,Vn as v,Vo as y,go as ee,ia as b,jo as te,m as x,nr as ne,qo as re}from"./dist-GcFBLEr5.mjs";import{$ as ie,A as ae,J as oe,M as S,O as C,P as se,R as ce,T as le,X as w,at as ue,ct as de,d as fe,dt as pe,f as me,it as he,j as ge,k as _e,lt as ve,nt as ye,o as be,rt as xe,tt as Se,v as Ce,w as we,x as Te,y as Ee}from"./init-DvYKQnB9.mjs";import{t as De}from"./is-object-BGze3w87.mjs";import{t as Oe}from"./removal-file-path-Bx2ZAa33.mjs";import{spawn as ke}from"node:child_process";import{basename as T,dirname as E,join as D,resolve as O,win32 as Ae}from"node:path";import{accessSync as je,constants as k,existsSync as A,lstatSync as j,mkdirSync as Me,readFileSync as M,readdirSync as N,realpathSync as P,rmSync as Ne,rmdirSync as Pe,statSync as F,unlinkSync as Fe}from"node:fs";import{homedir as I}from"node:os";import{createHash as Ie}from"node:crypto";import{isDeepStrictEqual as Le}from"node:util";import{setTimeout as Re}from"node:timers/promises";var ze=u();let Be;function Ve(){return Be}function He(e,t){if(t!==void 0&&t.length>0)return t;try{return ne(e)?.rootPath}catch{return}}function Ue(e){let t=He(e.cwd,e.configuredProjectName),n=h({name:`cli`,project:t});return Be=n,n.info({command:e.command,cwd:e.cwd,project:t},`cli command started`),n}function L(){return l(`auth.yml`)}function R(){return r().keyringService}function z(e){try{e()}catch{}}var We=class{backend=`keyring`;onKeychainRead;constructor(e){this.onKeychainRead=e}async get(e){let{Entry:t}=await import(`@napi-rs/keyring`),n;try{n=new t(R(),e).getPassword()}catch(t){return z(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return z(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return z(()=>this.onKeychainRead?.({kind:`corrupt-entry`,host:e,error:`corrupt-entry`})),null}}async set(e,t,n,r){let{Entry:i}=await import(`@napi-rs/keyring`),a=new i(R(),e),o={login:t,token:n,...r};a.setPassword(JSON.stringify(o))}async clear(e){let{Entry:t}=await import(`@napi-rs/keyring`);try{new t(R(),e).deletePassword()}catch{}}},B=class{backend=`file`;authFile;constructor(e){this.authFile=e??D(g(),`auth.yml`)}read(){if(!A(this.authFile))return{};try{let e=M(this.authFile,`utf-8`);return(0,ze.parse)(e)??{}}catch(e){let t=e instanceof Error?e.message:`unknown error`;return process.stderr.write(`[auth] Failed to parse ${this.authFile}: ${t}. Starting with empty credentials.\n`),{}}}write(e){let t=E(this.authFile);A(t)||Me(t,{recursive:!0,mode:448}),y(this.authFile,(0,ze.stringify)(e),{mode:384})}async get(e){return this.read()[e]??null}async set(e,t,n,r){let i=this.read();i[e]={login:t,token:n,...r},this.write(i)}async clear(e){let t=this.read();delete t[e],this.write(t)}},Ge=class{backend=`keyring`;keychain;file;constructor(e,t){this.keychain=e,this.file=t}async get(e){let t=await this.keychain.get(e);if(t!=null)return t;let n=await this.file.get(e);if(n==null)return null;try{await this.keychain.set(e,n.login,n.token,{gitProtocol:n.gitProtocol,name:n.name,email:n.email}),await this.file.clear(e),process.stderr.write(`[auth] migrated ${e} credential from ${L()} to the OS keychain\n`)}catch{}return n}set(e,t,n,r){return this.keychain.set(e,t,n,r)}async clear(e){await this.keychain.clear(e),await this.file.get(e)!=null&&await this.file.clear(e)}};async function Ke(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(R(),`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
2
+ `),z(()=>t?.onBackendSelected?.({backend:`keyring`})),new Ge(new We(t?.onKeychainRead),new B(e))}catch(n){let r=n instanceof Error?`${n.name}: ${n.message}`:String(n);return process.stderr.write(`[auth] token storage: file (${L()}) — OS keychain unavailable: ${r}\n`),z(()=>t?.onBackendSelected?.({backend:`file`,reason:r})),new B(e)}}function qe(e){let t=null;return function(){if(t)return t;let n=2e3;return t=(async()=>{let t=null,r=new Promise(r=>{t=setTimeout(()=>{process.stderr.write(`[auth] token storage: keyring init exceeded ${n}ms; falling back to file (${L()})\n`),r(new B(e))},n)});try{return await Promise.race([Ke(e),r])}catch{return new B(e)}finally{t!==null&&clearTimeout(t)}})(),t}}function Je(e){let t=qe(e);return{async get(e){let n=await(await t()).get(e);return n===null?null:{token:n.token,login:n.login}}}}function Ye(e){let t=qe(e);return{backend:`file`,async get(e){return(await t()).get(e)},async set(e,n,r,i){return(await t()).set(e,n,r,i)},async clear(e){return(await t()).clear(e)}}}async function Xe(e,t){let n=[],r=new B(t);await r.get(e)!=null&&(await r.clear(e),n.push(`file`));let i;try{let{Entry:t}=await import(`@napi-rs/keyring`);new t(R(),`__probe__`);let r,a=await new We(e=>{e.kind===`read-error`&&(r=e.error??`read-error`)}).get(e);if(r!==void 0)i=r;else if(a!=null)try{new t(R(),e).deletePassword(),n.push(`keychain`)}catch(e){i=e instanceof Error?e.name:`delete-error`}}catch{}return{touched:n,keychainError:i}}function Ze(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function Qe(e){let t=e?.code;return t===`ENOENT`||t===`EACCES`||t===`EPERM`?{ok:!1,reason:`not-installed`}:{ok:!1,reason:`spawn-error`}}function $e(e){return ee({detached:!0,stdio:`ignore`,shell:!1,env:Ze(e)})}function et(e,t,n={}){let r=(n.spawn??ke)(e,[...t],$e(n.env??process.env));return r.unref(),r}function tt(e,t,n={}){let r=n.spawn??ke,i=n.timeoutMs??2e3;return new Promise(a=>{let o=!1,s=e=>{o||(o=!0,a(e))},c=setTimeout(()=>s({ok:!1,reason:`timeout`}),i);try{let i=r(e,[...t],$e(n.env??process.env));i.once(`error`,e=>{clearTimeout(c),s(Qe(e))}),i.once(`spawn`,()=>{clearTimeout(c),s({ok:!0})});try{i.unref()}catch{}}catch(e){clearTimeout(c),s(Qe(e))}})}const nt=c.stable.appId,V=[c.stable,c.beta];function rt(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return F(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function it(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}let t=e.homeDir??I();for(let n of V)for(let r of[D(t,`Applications`),`/Applications`]){let t=D(r,`${n.productName}.app`);if(at(e,D(t,`Contents`,`MacOS`,n.productName)))return t}return null}function at(e,t){try{let n=e.statSync(t);return n?typeof n.isFile==`function`&&n.isFile():!1}catch{return!1}}function ot(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&V.find(t=>e.execPath.toLowerCase().endsWith(`\\${a(t).toLowerCase()}`)))return e.execPath;let t=e.env.LOCALAPPDATA;if(t)for(let n of V)for(let r of i(n)){let i=Ae.join(t,`Programs`,r,a(n));if(at(e,i))return i}return null}function st(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&V.find(t=>e.execPath.endsWith(`/${t.linuxExecutableName}`)))return e.execPath;for(let t of V){let n=`/opt/${t.productName}/${t.linuxExecutableName}`;if(at(e,n))return n}return null}function ct(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`&&e.platform!==`win32`&&e.platform!==`linux`)return{available:!1,reason:`unsupported-platform`};let t;try{t=e.platform===`darwin`?it(e):e.platform===`win32`?ot(e):st(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:!(e.isTTY===!0||e.platform===`win32`&&e.isTTY===void 0&&!e.env.CI)||e.env.SSH_CONNECTION||e.env.SSH_TTY||e.platform===`linux`&&!e.env.DISPLAY&&!e.env.WAYLAND_DISPLAY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function lt(e,t){let n=e.log??(e=>console.error(e)),r=e.platform??process.platform;n("Launching OpenKnowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)");let i=t?.bundlePath;if(!i){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}if(r===`darwin`){et(`open`,[`-a`,i],{spawn:e.spawn});return}et(i,[],{spawn:e.spawn})}function ut(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found (checked the standard install locations for this OS). Install it from https://openknowledge.ai/download, or omit --mode for browser mode.`;case`darwin-only`:case`unsupported-platform`:return`Desktop app is not available on this platform. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect the desktop install (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available but launch dispatch did not fire (caller bug).`}}function H(e){return e.replace(/[\p{Cc}\p{Zl}\p{Zp}\p{Bidi_Control}\u200b\ufeff]/gu,e=>`\\u${e.charCodeAt(0).toString(16).padStart(4,`0`)}`)}function dt(e){return Ie(`sha256`).update(e).digest(`hex`)}function U(e){return D(g(O(e)),`pi-trust`)}function ft(e,t){return D(U(e),dt(O(t)))}function pt(e,t,n){return D(ft(e,t),`${dt(n)}.json`)}var W=class extends Error{constructor(e,t,n,r){super(`Pi trust receipt at ${H(e)} ${H(t)}; ${H(n)}`,{cause:r}),this.name=`PiTrustReceiptError`}};function G(e,t,n){let r=n.code,i=n instanceof Error?n.message:String(n),a;switch(r){case`EACCES`:case`EPERM`:a=`check receipt and parent-directory permissions, then retry`;break;case`ENOENT`:a=`the location no longer exists; restore access to its expected location, then retry`;break;default:a=`check the path and available storage, then retry`}return new W(e,`could not ${t}: ${i}`,a,n)}function K(e){let t;try{t=j(e)}catch(t){if(t.code===`ENOENT`)return!1;throw G(e,`be inspected`,t)}if(!t.isDirectory())throw new W(e,`is not a regular directory`,`restore the intended receipt directory without a symlink, then retry`);return!0}function mt(e,t){return Object.keys(e).length===t.length&&t.every(t=>Object.hasOwn(e,t))}function ht(e,t){if(!De(e)||!mt(e,[`version`,`cwd`,`configuredTrustPath`,`canonicalTrustPath`,`state`,`previous`])||e.version!==1||typeof e.cwd!=`string`||e.cwd!==O(e.cwd)||typeof e.configuredTrustPath!=`string`||e.configuredTrustPath!==O(e.configuredTrustPath)||typeof e.canonicalTrustPath!=`string`||e.canonicalTrustPath!==O(e.canonicalTrustPath)||e.state!==`pending`&&e.state!==`committed`||!De(e.previous))throw new W(t,`has invalid contents`,`restore a valid ownership record from a backup without guessing its trust decision, then retry`);let n;if(e.previous.present===!1&&mt(e.previous,[`present`]))n={present:!1};else if(e.previous.present===!0&&mt(e.previous,[`present`,`value`]))n={present:!0,value:e.previous.value};else throw new W(t,`has an invalid previous decision`,`restore the recorded previous decision from a backup without guessing its value, then retry`);return{version:1,cwd:e.cwd,configuredTrustPath:e.configuredTrustPath,canonicalTrustPath:e.canonicalTrustPath,state:e.state,previous:n}}function gt(e,t,n){let r;try{r=j(n)}catch(e){throw G(n,`be inspected`,e)}if(!r.isFile())throw new W(n,`is not a regular file`,`restore the intended receipt as a regular file without a symlink, then retry`);let i;try{i=M(n,`utf8`)}catch(e){throw G(n,`be read`,e)}let a;try{a=JSON.parse(i)}catch(e){throw new W(n,`is not valid JSON`,`repair its JSON syntax without changing the recorded decision, then retry`,e)}let o=ht(a,n);if(o.cwd!==O(t)||n!==pt(e,t,o.canonicalTrustPath))throw new W(n,`does not match its project or trust-store location`,`restore the ownership record to its original project and trust-store location, then retry`);return{path:n,record:o}}function _t(e,t){let{record:n,path:r}=t;for(let t of[U(e),ft(e,n.cwd)])if(!K(t))throw new W(t,`no longer exists`,`restore access to the expected receipt directory, then retry`);let i=gt(e,n.cwd,r);if(!Le(i.record,n))throw new W(r,`changed while its trust decision was being updated`,`retry to read its current ownership record`);return i}function vt(e,t,n,r,i){let a={version:1,cwd:O(t),configuredTrustPath:O(n),canonicalTrustPath:O(r),state:`pending`,previous:i},o=pt(e,a.cwd,a.canonicalTrustPath),s=`${JSON.stringify(a,null,2)}\n`;if(!Le(ht(JSON.parse(s),o),a))throw new W(o,`cannot preserve the previous decision as JSON`,`provide the original decision as a JSON value before retrying`);K(U(e)),K(E(o));try{Me(E(o),{recursive:!0,mode:448})}catch(e){throw G(E(o),`be created`,e)}let c;try{c=j(o,{throwIfNoEntry:!1})}catch(e){throw G(o,`be inspected`,e)}if(c)throw new W(o,`already exists`,`reconcile the existing ownership record before recording another grant`);try{y(o,s,{mode:384})}catch(e){throw G(o,`be written`,e)}return{path:o,record:a}}function yt(e,t){let n=_t(e,t);if(n.record.state!==`pending`)throw new W(n.path,`is already committed`,`use the current ownership record without committing it again`);let r={...n.record,state:`committed`};try{y(n.path,`${JSON.stringify(r,null,2)}\n`,{mode:384})}catch(e){throw G(n.path,`be committed`,e)}return{path:n.path,record:r}}function q(e,t){if(!K(U(e)))return[];let n=ft(e,t);if(!K(n))return[];let r;try{r=N(n).sort()}catch(e){throw G(n,`be listed`,e)}return r.filter(e=>/^[a-f0-9]{64}\.json$/.test(e)).map(r=>gt(e,t,D(n,r)))}function J(e,t){let n=_t(e,t);try{Fe(n.path)}catch(e){throw G(n.path,`be removed after reconciling its grant`,e)}for(let t of[E(n.path),U(e)])try{Pe(t)}catch(e){let n=e.code;if(n!==`ENOTEMPTY`&&n!==`EEXIST`&&n!==`ENOENT`)throw G(t,`be removed after reconciling its grant`,e)}}var bt=n(((t,n)=>{var r=e(`constants`),i=process.cwd,a=null,o=process.env.GRACEFUL_FS_PLATFORM||process.platform;process.cwd=function(){return a||=i.call(process),a};try{process.cwd()}catch{}if(typeof process.chdir==`function`){var s=process.chdir;process.chdir=function(e){a=null,s.call(process,e)},Object.setPrototypeOf&&Object.setPrototypeOf(process.chdir,s)}n.exports=c;function c(e){r.hasOwnProperty(`O_SYMLINK`)&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&t(e),e.lutimes||n(e),e.chown=s(e.chown),e.fchown=s(e.fchown),e.lchown=s(e.lchown),e.chmod=i(e.chmod),e.fchmod=i(e.fchmod),e.lchmod=i(e.lchmod),e.chownSync=c(e.chownSync),e.fchownSync=c(e.fchownSync),e.lchownSync=c(e.lchownSync),e.chmodSync=a(e.chmodSync),e.fchmodSync=a(e.fchmodSync),e.lchmodSync=a(e.lchmodSync),e.stat=l(e.stat),e.fstat=l(e.fstat),e.lstat=l(e.lstat),e.statSync=u(e.statSync),e.fstatSync=u(e.fstatSync),e.lstatSync=u(e.lstatSync),e.chmod&&!e.lchmod&&(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.chown&&!e.lchown&&(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),o===`win32`&&(e.rename=typeof e.rename==`function`?(function(t){function n(n,r,i){var a=Date.now(),o=0;t(n,r,function s(c){if(c&&(c.code===`EACCES`||c.code===`EPERM`||c.code===`EBUSY`)&&Date.now()-a<6e4){setTimeout(function(){e.stat(r,function(e,a){e&&e.code===`ENOENT`?t(n,r,s):i(c)})},o),o<100&&(o+=10);return}i&&i(c)})}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.rename):e.rename),e.read=typeof e.read==`function`?(function(t){function n(n,r,i,a,o,s){var c;if(s&&typeof s==`function`){var l=0;c=function(u,d,f){if(u&&u.code===`EAGAIN`&&l<10)return l++,t.call(e,n,r,i,a,o,c);s.apply(this,arguments)}}return t.call(e,n,r,i,a,o,c)}return Object.setPrototypeOf&&Object.setPrototypeOf(n,t),n})(e.read):e.read,e.readSync=typeof e.readSync==`function`?(function(t){return function(n,r,i,a,o){for(var s=0;;)try{return t.call(e,n,r,i,a,o)}catch(e){if(e.code===`EAGAIN`&&s<10){s++;continue}throw e}}})(e.readSync):e.readSync;function t(e){e.lchmod=function(t,n,i){e.open(t,r.O_WRONLY|r.O_SYMLINK,n,function(t,r){if(t){i&&i(t);return}e.fchmod(r,n,function(t){e.close(r,function(e){i&&i(t||e)})})})},e.lchmodSync=function(t,n){var i=e.openSync(t,r.O_WRONLY|r.O_SYMLINK,n),a=!0,o;try{o=e.fchmodSync(i,n),a=!1}finally{if(a)try{e.closeSync(i)}catch{}else e.closeSync(i)}return o}}function n(e){r.hasOwnProperty(`O_SYMLINK`)&&e.futimes?(e.lutimes=function(t,n,i,a){e.open(t,r.O_SYMLINK,function(t,r){if(t){a&&a(t);return}e.futimes(r,n,i,function(t){e.close(r,function(e){a&&a(t||e)})})})},e.lutimesSync=function(t,n,i){var a=e.openSync(t,r.O_SYMLINK),o,s=!0;try{o=e.futimesSync(a,n,i),s=!1}finally{if(s)try{e.closeSync(a)}catch{}else e.closeSync(a)}return o}):e.futimes&&(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}function i(t){return t&&function(n,r,i){return t.call(e,n,r,function(e){d(e)&&(e=null),i&&i.apply(this,arguments)})}}function a(t){return t&&function(n,r){try{return t.call(e,n,r)}catch(e){if(!d(e))throw e}}}function s(t){return t&&function(n,r,i,a){return t.call(e,n,r,i,function(e){d(e)&&(e=null),a&&a.apply(this,arguments)})}}function c(t){return t&&function(n,r,i){try{return t.call(e,n,r,i)}catch(e){if(!d(e))throw e}}}function l(t){return t&&function(n,r,i){typeof r==`function`&&(i=r,r=null);function a(e,t){t&&(t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296)),i&&i.apply(this,arguments)}return r?t.call(e,n,r,a):t.call(e,n,a)}}function u(t){return t&&function(n,r){var i=r?t.call(e,n,r):t.call(e,n);return i&&(i.uid<0&&(i.uid+=4294967296),i.gid<0&&(i.gid+=4294967296)),i}}function d(e){return!e||e.code===`ENOSYS`||(!process.getuid||process.getuid()!==0)&&(e.code===`EINVAL`||e.code===`EPERM`)}}})),xt=n(((t,n)=>{var r=e(`stream`).Stream;n.exports=i;function i(e){return{ReadStream:t,WriteStream:n};function t(n,i){if(!(this instanceof t))return new t(n,i);r.call(this);var a=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags=`r`,this.mode=438,this.bufferSize=65536,i||={};for(var o=Object.keys(i),s=0,c=o.length;s<c;s++){var l=o[s];this[l]=i[l]}if(this.encoding&&this.setEncoding(this.encoding),this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.end===void 0)this.end=1/0;else if(typeof this.end!=`number`)throw TypeError(`end must be a Number`);if(this.start>this.end)throw Error(`start must be <= end`);this.pos=this.start}if(this.fd!==null){process.nextTick(function(){a._read()});return}e.open(this.path,this.flags,this.mode,function(e,t){if(e){a.emit(`error`,e),a.readable=!1;return}a.fd=t,a.emit(`open`,t),a._read()})}function n(t,i){if(!(this instanceof n))return new n(t,i);r.call(this),this.path=t,this.fd=null,this.writable=!0,this.flags=`w`,this.encoding=`binary`,this.mode=438,this.bytesWritten=0,i||={};for(var a=Object.keys(i),o=0,s=a.length;o<s;o++){var c=a[o];this[c]=i[c]}if(this.start!==void 0){if(typeof this.start!=`number`)throw TypeError(`start must be a Number`);if(this.start<0)throw Error(`start must be >= zero`);this.pos=this.start}this.busy=!1,this._queue=[],this.fd===null&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}})),St=n(((e,t)=>{t.exports=r;var n=Object.getPrototypeOf||function(e){return e.__proto__};function r(e){if(typeof e!=`object`||!e)return e;if(e instanceof Object)var t={__proto__:n(e)};else var t=Object.create(null);return Object.getOwnPropertyNames(e).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}),t}})),Ct=n(((t,n)=>{var r=e(`fs`),i=bt(),a=xt(),o=St(),s=e(`util`),c,l;typeof Symbol==`function`&&typeof Symbol.for==`function`?(c=Symbol.for(`graceful-fs.queue`),l=Symbol.for(`graceful-fs.previous`)):(c=`___graceful-fs.queue`,l=`___graceful-fs.previous`);function u(){}function d(e,t){Object.defineProperty(e,c,{get:function(){return t}})}var f=u;s.debuglog?f=s.debuglog(`gfs4`):/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&(f=function(){var e=s.format.apply(s,arguments);e=`GFS4: `+e.split(/\n/).join(`
3
+ GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){function t(t,n){return e.call(r,t,function(e){e||g(),typeof n==`function`&&n.apply(this,arguments)})}return Object.defineProperty(t,l,{value:e}),t})(r.close),r.closeSync=(function(e){function t(t){e.apply(r,arguments),g()}return Object.defineProperty(t,l,{value:e}),t})(r.closeSync),/\bgfs4\b/i.test(process.env.NODE_DEBUG||``)&&process.on(`exit`,function(){f(r[c]),e(`assert`).equal(r[c].length,0)})),global[c]||d(global,r[c]),n.exports=p(o(r)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&!r.__patched&&(n.exports=p(r),r.__patched=!0);function p(e){i(e),e.gracefulify=p,e.createReadStream=re,e.createWriteStream=ie;var t=e.readFile;e.readFile=n;function n(e,n,r){return typeof n==`function`&&(r=n,n=null),i(e,n,r);function i(e,n,r,a){return t(e,n,function(t){t&&(t.code===`EMFILE`||t.code===`ENFILE`)?m([i,[e,n,r],t,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var r=e.writeFile;e.writeFile=o;function o(e,t,n,i){return typeof n==`function`&&(i=n,n=null),a(e,t,n,i);function a(e,t,n,i,o){return r(e,t,n,function(r){r&&(r.code===`EMFILE`||r.code===`ENFILE`)?m([a,[e,t,n,i],r,o||Date.now(),Date.now()]):typeof i==`function`&&i.apply(this,arguments)})}}var s=e.appendFile;s&&(e.appendFile=c);function c(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return s(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var l=e.copyFile;l&&(e.copyFile=u);function u(e,t,n,r){return typeof n==`function`&&(r=n,n=0),i(e,t,n,r);function i(e,t,n,r,a){return l(e,t,n,function(o){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}var d=e.readdir;e.readdir=h;var f=/^v[0-5]\./;function h(e,t,n){typeof t==`function`&&(n=t,t=null);var r=f.test(process.version)?function(e,t,n,r){return d(e,i(e,t,n,r))}:function(e,t,n,r){return d(e,t,i(e,t,n,r))};return r(e,t,n);function i(e,t,n,i){return function(a,o){a&&(a.code===`EMFILE`||a.code===`ENFILE`)?m([r,[e,t,n],a,i||Date.now(),Date.now()]):(o&&o.sort&&o.sort(),typeof n==`function`&&n.call(this,a,o))}}}if(process.version.substr(0,4)===`v0.8`){var g=a(e);b=g.ReadStream,x=g.WriteStream}var _=e.ReadStream;_&&(b.prototype=Object.create(_.prototype),b.prototype.open=te);var v=e.WriteStream;v&&(x.prototype=Object.create(v.prototype),x.prototype.open=ne),Object.defineProperty(e,"ReadStream",{get:function(){return b},set:function(e){b=e},enumerable:!0,configurable:!0}),Object.defineProperty(e,"WriteStream",{get:function(){return x},set:function(e){x=e},enumerable:!0,configurable:!0});var y=b;Object.defineProperty(e,"FileReadStream",{get:function(){return y},set:function(e){y=e},enumerable:!0,configurable:!0});var ee=x;Object.defineProperty(e,"FileWriteStream",{get:function(){return ee},set:function(e){ee=e},enumerable:!0,configurable:!0});function b(e,t){return this instanceof b?(_.apply(this,arguments),this):b.apply(Object.create(b.prototype),arguments)}function te(){var e=this;oe(e.path,e.flags,e.mode,function(t,n){t?(e.autoClose&&e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n),e.read())})}function x(e,t){return this instanceof x?(v.apply(this,arguments),this):x.apply(Object.create(x.prototype),arguments)}function ne(){var e=this;oe(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function re(t,n){return new e.ReadStream(t,n)}function ie(t,n){return new e.WriteStream(t,n)}var ae=e.open;e.open=oe;function oe(e,t,n,r){return typeof n==`function`&&(r=n,n=null),i(e,t,n,r);function i(e,t,n,r,a){return ae(e,t,n,function(o,s){o&&(o.code===`EMFILE`||o.code===`ENFILE`)?m([i,[e,t,n,r],o,a||Date.now(),Date.now()]):typeof r==`function`&&r.apply(this,arguments)})}}return e}function m(e){f(`ENQUEUE`,e[0].name,e[1]),r[c].push(e),_()}var h;function g(){for(var e=Date.now(),t=0;t<r[c].length;++t)r[c][t].length>2&&(r[c][t][3]=e,r[c][t][4]=e);_()}function _(){if(clearTimeout(h),h=void 0,r[c].length!==0){var e=r[c].shift(),t=e[0],n=e[1],i=e[2],a=e[3],o=e[4];if(a===void 0)f(`RETRY`,t.name,n),t.apply(null,n);else if(Date.now()-a>=6e4){f(`TIMEOUT`,t.name,n);var s=n.pop();typeof s==`function`&&s.call(null,i)}else{var l=Date.now()-o,u=Math.max(o-a,1);l>=Math.min(u*1.2,100)?(f(`RETRY`,t.name,n),t.apply(null,n.concat([a]))):r[c].push(e)}h===void 0&&(h=setTimeout(_,0))}}})),wt=n(((e,t)=>{function n(e,t){typeof t==`boolean`&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}t.exports=n,n.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts},n.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null},n.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=new Date().getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.unshift(Error(`RetryOperation timeout occurred`)),!1;this._errors.push(e);var n=this._timeouts.shift();if(n===void 0){if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),n=this._timeouts.shift();else return!1}var r=this,i=setTimeout(function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)},n);return this._options.unref&&i.unref(),!0},n.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)},n.prototype.try=function(e){console.log(`Using RetryOperation.try() is deprecated`),this.attempt(e)},n.prototype.start=function(e){console.log(`Using RetryOperation.start() is deprecated`),this.attempt(e)},n.prototype.start=n.prototype.try,n.prototype.errors=function(){return this._errors},n.prototype.attempts=function(){return this._attempts},n.prototype.mainError=function(){if(this._errors.length===0)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],a=i.message,o=(e[a]||0)+1;e[a]=o,o>=n&&(t=i,n=o)}return t}})),Tt=n((e=>{var t=wt();e.operation=function(n){return new t(e.timeouts(n),{forever:n&&n.forever,unref:n&&n.unref,maxRetryTime:n&&n.maxRetryTime})},e.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw Error(`minTimeout is greater than maxTimeout`);for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort(function(e,t){return e-t}),r},e.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*t.minTimeout*t.factor**+e);return r=Math.min(r,t.maxTimeout),r},e.wrap=function(t,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],t)typeof t[i]==`function`&&r.push(i);for(var a=0;a<r.length;a++){var o=r[a],s=t[o];t[o]=function(r){var i=e.operation(n),a=Array.prototype.slice.call(arguments,1),o=a.pop();a.push(function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),o.apply(this,arguments))}),i.attempt(function(){r.apply(t,a)})}.bind(t,s),t[o].options=n}}})),Et=n(((e,t)=>{t.exports=Tt()})),Dt=n(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),Ot=n(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=Dt(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){!p||!i(global.process)||(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){p||!i(global.process)||(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=v,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,v=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}return _.apply(this,arguments)}}})),kt=n(((e,t)=>{let n=Symbol();function r(e,t,r){let i=t[n];if(i)return t.stat(e,(e,t)=>{if(e)return r(e);r(null,t.mtime,i)});let a=new Date(Math.ceil(Date.now()/1e3)*1e3+5);t.utimes(e,a,a,i=>{if(i)return r(i);t.stat(e,(e,i)=>{if(e)return r(e);let a=i.mtime.getTime()%1e3==0?`s`:`ms`;Object.defineProperty(t,n,{value:a}),r(null,i.mtime,a)})})}function i(e){let t=Date.now();return e===`s`&&(t=Math.ceil(t/1e3)*1e3),new Date(t)}t.exports.probe=r,t.exports.getMtime=i})),At=n(((t,n)=>{let r=e(`path`),i=Ct(),a=Et(),o=Ot(),s=kt(),c={};function l(e,t){return t.lockfilePath||`${e}.lock`}function u(e,t,n){if(!t.realpath)return n(null,r.resolve(e));t.fs.realpath(e,n)}function d(e,t,n){let r=l(e,t);t.fs.mkdir(r,i=>{if(!i)return s.probe(r,t.fs,(e,i,a)=>{if(e)return t.fs.rmdir(r,()=>{}),n(e);n(null,i,a)});if(i.code!==`EEXIST`)return n(i);if(t.stale<=0)return n(Object.assign(Error(`Lock file is already being held`),{code:`ELOCKED`,file:e}));t.fs.stat(r,(r,i)=>{if(r)return r.code===`ENOENT`?d(e,{...t,stale:0},n):n(r);if(!f(i,t))return n(Object.assign(Error(`Lock file is already being held`),{code:`ELOCKED`,file:e}));p(e,t,r=>{if(r)return n(r);d(e,{...t,stale:0},n)})})})}function f(e,t){return e.mtime.getTime()<Date.now()-t.stale}function p(e,t,n){t.fs.rmdir(l(e,t),e=>{if(e&&e.code!==`ENOENT`)return n(e);n()})}function m(e,t){let n=c[e];n.updateTimeout||(n.updateDelay=n.updateDelay||t.update,n.updateTimeout=setTimeout(()=>{n.updateTimeout=null,t.fs.stat(n.lockfilePath,(r,i)=>{let a=n.lastUpdate+t.stale<Date.now();if(r)return r.code===`ENOENT`||a?h(e,n,Object.assign(r,{code:`ECOMPROMISED`})):(n.updateDelay=1e3,m(e,t));if(n.mtime.getTime()!==i.mtime.getTime())return h(e,n,Object.assign(Error(`Unable to update lock within the stale threshold`),{code:`ECOMPROMISED`}));let o=s.getMtime(n.mtimePrecision);t.fs.utimes(n.lockfilePath,o,o,r=>{let i=n.lastUpdate+t.stale<Date.now();if(!n.released){if(r)return r.code===`ENOENT`||i?h(e,n,Object.assign(r,{code:`ECOMPROMISED`})):(n.updateDelay=1e3,m(e,t));n.mtime=o,n.lastUpdate=Date.now(),n.updateDelay=null,m(e,t)}})})},n.updateDelay),n.updateTimeout.unref&&n.updateTimeout.unref())}function h(e,t,n){t.released=!0,t.updateTimeout&&clearTimeout(t.updateTimeout),c[e]===t&&delete c[e],t.options.onCompromised(n)}function g(e,t,n){t={stale:1e4,update:null,realpath:!0,retries:0,fs:i,onCompromised:e=>{throw e},...t},t.retries=t.retries||0,t.retries=typeof t.retries==`number`?{retries:t.retries}:t.retries,t.stale=Math.max(t.stale||0,2e3),t.update=t.update==null?t.stale/2:t.update||0,t.update=Math.max(Math.min(t.update,t.stale/2),1e3),u(e,t,(e,r)=>{if(e)return n(e);let i=a.operation(t.retries);i.attempt(()=>{d(r,t,(e,a,o)=>{if(i.retry(e))return;if(e)return n(i.mainError());let s=c[r]={lockfilePath:l(r,t),mtime:a,mtimePrecision:o,options:t,lastUpdate:Date.now()};m(r,t),n(null,e=>{if(s.released)return e&&e(Object.assign(Error(`Lock is already released`),{code:`ERELEASED`}));_(r,{...t,realpath:!1},e)})})})})}function _(e,t,n){t={fs:i,realpath:!0,...t},u(e,t,(e,r)=>{if(e)return n(e);let i=c[r];if(!i)return n(Object.assign(Error(`Lock is not acquired/owned by you`),{code:`ENOTACQUIRED`}));i.updateTimeout&&clearTimeout(i.updateTimeout),i.released=!0,delete c[r],p(r,t,n)})}function v(e,t,n){t={stale:1e4,realpath:!0,fs:i,...t},t.stale=Math.max(t.stale||0,2e3),u(e,t,(e,r)=>{if(e)return n(e);t.fs.stat(l(r,t),(e,r)=>e?e.code===`ENOENT`?n(null,!1):n(e):n(null,!f(r,t)))})}function y(){return c}o(()=>{for(let e in c){let t=c[e].options;try{t.fs.rmdirSync(l(e,t))}catch{}}}),n.exports.lock=g,n.exports.unlock=_,n.exports.check=v,n.exports.getLocks=y})),jt=n(((e,t)=>{let n=Ct();function r(e){let t=[`mkdir`,`realpath`,`stat`,`rmdir`,`utimes`],n={...e};return t.forEach(t=>{n[t]=(...n)=>{let r=n.pop(),i;try{i=e[`${t}Sync`](...n)}catch(e){return r(e)}r(null,i)}}),n}function i(e){return(...t)=>new Promise((n,r)=>{t.push((e,t)=>{e?r(e):n(t)}),e(...t)})}function a(e){return(...t)=>{let n,r;if(t.push((e,t)=>{n=e,r=t}),e(...t),n)throw n;return r}}function o(e){if(e={...e},e.fs=r(e.fs||n),typeof e.retries==`number`&&e.retries>0||e.retries&&typeof e.retries.retries==`number`&&e.retries.retries>0)throw Object.assign(Error(`Cannot use retries with the sync api`),{code:`ESYNC`});return e}t.exports={toPromise:i,toSync:a,toSyncOptions:o}})),Mt=t(n(((e,t)=>{let n=At(),{toPromise:r,toSync:i,toSyncOptions:a}=jt();async function o(e,t){let i=await r(n.lock)(e,t);return r(i)}function s(e,t){let r=i(n.lock)(e,a(t));return i(r)}function c(e,t){return r(n.unlock)(e,t)}function l(e,t){return i(n.unlock)(e,a(t))}function u(e,t){return r(n.check)(e,t)}function d(e,t){return i(n.check)(e,a(t))}t.exports=o,t.exports.lock=o,t.exports.unlock=c,t.exports.lockSync=s,t.exports.unlockSync=l,t.exports.check=u,t.exports.checkSync=d}))(),1);const Nt=5e3;function Pt(e,t,n){if(!(e instanceof Error)||!(`code`in e)||e.code!==`ELOCKED`)throw e;let r=t-performance.now();if(r<=0)throw Object.assign(Error(`Could not acquire Pi trust lock at ${n}.lock within ${Nt}ms`,{cause:e}),{code:`ELOCKED`});return Math.min(25,r)}function Ft(e,t){Ve()?.warn(t,e)}function It(e,t){if(e.length===0)return;if(e.length===1)throw e[0];let[n,r]=e,i=n instanceof Error?n.message:String(n),a=r instanceof Error?r.message:String(r);throw AggregateError(e,`Pi trust update failed: ${i}\nReleasing Pi trust lock ${t}.lock also failed: ${a}`)}async function Lt(e,t,n){await re(`${t}.ok.lock`,async()=>{let t=performance.now()+Nt,r;for(;;)try{r=await Mt.default.lock(E(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){await Re(Pt(n,t,e))}let i=[];try{n()}catch(e){i.push(e)}finally{try{await r()}catch(e){i.push(e)}}It(i,e)},{onWarn:Ft})}function Rt(e,t,n){_(`${t}.ok.lock`,()=>{let t=performance.now()+Nt,r=new Int32Array(new SharedArrayBuffer(4)),i;for(;;)try{i=Mt.default.lockSync(E(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){Atomics.wait(r,0,0,Pt(n,t,e))}let a=[];try{n()}catch(e){a.push(e)}finally{try{i()}catch(e){a.push(e)}}It(a,e)},{onWarn:Ft})}const zt=[`settings.json`,`prompts`,`themes`,`SYSTEM.md`,`APPEND_SYSTEM.md`];var Bt=class extends Error{name=`PiResourceInspectionError`};function Y(e){let t;try{t=j(e)}catch(e){if(e.code===`ENOENT`)return!1;throw e}let n;try{n=F(e)}catch(e){throw t.isSymbolicLink()&&e.code===`ENOENT`?new Bt(ge(`missing-symlink-target`),{cause:e}):e}return je(e,k.R_OK|(n.isDirectory()?k.X_OK:0)),!0}function Vt(e){return e===`open-knowledge`||e.startsWith(`open-knowledge-`)}function Ht(e,t,n){let r=e;try{let i=P(e),a;r=t;try{a=P(t)}catch(e){if(e.code!==`ENOENT`)throw e;a=O(t)}let o=D(a,`.agents`,`skills`),s=[];for(let e of zt)r=D(i,`.pi`,e),Y(r)&&s.push(r);if(r=D(i,`.pi`,`extensions`),Y(r))for(let t of N(r).sort()){let i=D(r,t);O(n)!==D(O(e),`.pi`,`extensions`,t)&&s.push(i)}for(let e of[D(i,`.pi`,`skills`),D(i,`.agents`,`skills`)])if(e!==o&&(r=e,Y(e)))for(let t of N(e).sort())Vt(t)||s.push(D(e,t));let c=E(i);for(;c!==i;){r=D(c,`.agents`,`skills`),r!==o&&Y(r)&&s.push(r);let e=E(c);if(e===c)break;c=e}return s.length===0?{kind:`none`}:{kind:`shared`,paths:s.sort()}}catch(e){return{kind:`unreadable`,error:`Could not inspect Pi project resources at ${H(r)}: ${e instanceof Bt?e.message:ge(S(e))}`}}}function Ut(e,t,n){let r=O(e),i=de({home:t,env:n??(t===void 0?process.env:{})});return{cwd:r,bridgePath:w.pi.projectConfigPath(r),trustPath:D(i,`trust.json`)}}function X(e){try{let t=P(e);return F(t).isDirectory()?(je(t,k.X_OK),{kind:`ready`,project:{path:e,canonical:t}}):{kind:`refused`,error:`Pi project path ${H(e)} is not a directory; restore the intended project directory, then retry`}}catch(t){return{kind:`refused`,error:`Pi project directory ${H(e)} could not be resolved or accessed: ${H(t instanceof Error?t.message:String(t))}; restore the directory or symlink and check its permissions, then retry`}}}function Wt(e){let t=X(e.path);if(t.kind===`refused`)return t.error;if(t.project.canonical!==e.canonical)return`Pi project path ${H(e.path)} changed while waiting for its trust lock; restore the intended project location, then retry`}function Gt(e,t,n){let r=be(w.pi,e,n,t);if(r.kind===`absent`)return{state:`absent`,text:null};if(r.kind!==`present`)return{state:`unreadable`,text:null};let i=r.entry,a=Array.isArray(i.args)&&typeof i.args[0]==`string`?i.args[0]:null;return xe(i)?{state:`own-current`,text:a}:le(i)?{state:`own-stale`,text:a}:{state:`foreign`,text:a}}function Kt(e,t){let n;try{n=M(e.path,`utf-8`)}catch(t){let n=t.code;return e.kind===`missing`&&n===`ENOENT`?{state:`untrusted`,entries:{},trailingNewline:!1}:{state:`unreadable`,reason:S(t)}}if(n.trim()===``)return{state:`untrusted`,entries:{},trailingNewline:!1};let r;try{r=JSON.parse(n)}catch{return{state:`unreadable`,reason:`invalid-json`}}return De(r)?{state:r[t]===!0?`trusted`:`untrusted`,entries:r,trailingNewline:n.endsWith(`
4
+ `)}:{state:`unreadable`,reason:`invalid-json`}}function qt(e){switch(e){case`invalid-json`:return`the file is not a valid JSON object; repair its JSON, then retry`;case`path-changed`:return`the path changed while waiting for its lock; retry to check its current state`;case`unavailable-root`:return`the filesystem root is unavailable; reconnect the drive or network share, then retry`;default:return ge(e)}}function Z(e,t){return{kind:`refused`,error:`trust store ${H(e)}: ${qt(t)}`}}function Q(e){let t=Oe(e);try{switch(t.kind){case`declined`:return Z(e,t.reason);case`ready`:return{kind:`ready`,path:P(t.path)};case`not-present`:break;default:throw Error(`unhandled trust file resolution: ${t}`)}let n=E(e),r=[T(e)],i=j(n,{throwIfNoEntry:!1});for(;!i;){let t=E(n);if(t===n)return Z(e,`unavailable-root`);r.unshift(T(n)),n=t,i=j(n,{throwIfNoEntry:!1})}try{return{kind:`missing`,path:D(P(n),...r)}}catch(t){return Z(e,i.isSymbolicLink()&&t.code===`ENOENT`?`missing-symlink-target`:S(t))}}catch(t){return Z(e,S(t))}}function Jt(e,t){let n=Q(e);return n.kind===`refused`?n:n.path!==t.path||t.kind===`ready`&&n.kind===`missing`?Z(e,`path-changed`):n}function Yt(e,t,n){let r=Ut(e,t,n),i=X(r.cwd);if(i.kind===`refused`)return{...r,project:`unavailable`,error:i.error};let a=Gt(r.cwd,r.bridgePath,t).state,o=Q(r.trustPath),s=o.kind===`refused`?`unreadable`:o.kind===`missing`?`untrusted`:Kt(o,i.project.canonical).state;return{...r,project:`ready`,canonicalCwd:i.project.canonical,bridge:a,trust:s,bridgeLoadable:(a===`own-current`||a===`own-stale`)&&s===`trusted`,otherExtensions:Xt(r.bridgePath).displayNames}}function Xt(e){let t=E(e),n=T(e);try{return{displayNames:N(t).filter(e=>e!==n&&e.endsWith(`.ts`)).sort().map(e=>H(JSON.stringify(e)))}}catch{return{displayNames:[]}}}async function Zt(e,t={mode:`published`},n,r,i){let a=Ut(e,n,r),o=X(a.cwd);if(o.kind===`refused`)return{...a,ok:!1,bridge:`refused-project-path`,trust:`skipped`,error:o.error};if(i!==void 0&&o.project.canonical!==i)return{...a,ok:!1,bridge:`refused-project-path`,trust:`skipped`,error:`The approved Pi project directory ${H(i)} no longer matches the current directory ${H(o.project.canonical)}. Reopen the intended project and approve the Pi integration again; no bridge or trust settings were changed.`};let s=Gt(a.cwd,a.bridgePath,n);if(s.state===`foreign`)return{...a,ok:!1,bridge:`refused-foreign`,trust:`skipped`};if(s.state===`unreadable`)return{...a,ok:!1,bridge:`refused-unreadable`,trust:`skipped`};let c;if(s.state===`absent`)c=`written`;else{let e;try{e=we(t)}catch{e=void 0}c=e!==void 0&&s.text===e?`unchanged`:`refreshed`}if(c!==`unchanged`){let e=Ee(w.pi,a.cwd,t,n,a.bridgePath);if(e.action!==`written`&&e.action!==`overwritten`)return{...a,ok:!1,bridge:`failed`,trust:`skipped`,error:e.error===void 0?`bridge write ${e.action}`:H(e.error)}}let l=await Qt(a.trustPath,o.project,n??I());return{...a,ok:l.action===`already-trusted`||l.action===`added`,bridge:c,trust:l.action,...l.error===void 0?{}:{error:l.error}}}async function Qt(e,t,n){let r=t.canonical,i=Q(e);if(i.kind===`refused`)return{action:`refused-unreadable`,error:i.error};try{Me(E(i.path),{recursive:!0})}catch(e){return{action:`failed`,error:H(e instanceof Error?e.message:String(e))}}let a={action:`added`};try{await Lt(e,i.path,()=>{let o=Wt(t);if(o){a.action=`refused-unreadable`,a.error=o;return}let s=Jt(e,i);if(s.kind===`refused`){a.action=`refused-unreadable`,a.error=s.error;return}let c=Kt(s,r);if(c.state===`trusted`){a.action=`already-trusted`;return}if(c.state===`unreadable`){a.action=`refused-unreadable`,a.error=Z(e,c.reason).error;return}let l=$(n,()=>{let t=q(n,r).find(e=>e.record.canonicalTrustPath===s.path);return t&&J(n,t),vt(n,r,e,s.path,Object.hasOwn(c.entries,r)?{present:!0,value:c.entries[r]}:{present:!1})}),u={...c.entries,[r]:!0},d=JSON.stringify(u,null,2)+(c.trailingNewline?`
5
+ `:``),f=C(s.path);y(s.path,d,f===void 0?void 0:{mode:f}),$(n,()=>yt(n,l)),a.action=`added`})}catch(e){return{action:`failed`,error:H(e instanceof Error?e.message:String(e))}}return a}function $t(e){let t=[],n=e;try{for(;;){if(j(n,{throwIfNoEntry:!1})){if(t.length===0)return;let e=P(n);return F(e).isDirectory()?(je(e,k.X_OK),D(e,...t)):void 0}let e=E(n);if(e===n)return;t.unshift(T(n)),n=e}}catch{return}}function en(e){let t={"not-present":0,removed:1,"kept-unowned":2,"kept-shared":3,"kept-unverified":4,"refused-unreadable":5,failed:6},n=e.reduce((e,n)=>t[n.action]>t[e.action]?n:e,{action:`not-present`}),r=e.flatMap(e=>e.error??[]),i=e.flatMap(e=>e.detail??[]);return r.length>0?{action:n.error===void 0?`failed`:n.action,error:[...r,...i].join(`
6
+ `)}:n.detail===void 0?n:{...n,detail:i.join(`
7
+ `)}}function tn(e,t,n,r={}){let i=Ut(e,t,n),a=t??I(),o=X(i.cwd),s=o.kind===`refused`&&r.recordedOnly?$t(i.cwd):void 0,c=o.kind===`ready`?o.project.canonical:s,l;try{l=$(a,()=>{let e=q(a,i.cwd);return c===void 0||c===i.cwd?e:[...q(a,c),...e]})}catch(e){return{action:`failed`,error:H(e instanceof Error?e.message:String(e))}}if(l.length===0&&r.recordedOnly)return o.kind===`ready`||s!==void 0?{action:`not-present`}:{action:`kept-unverified`,error:`${o.error}. OpenKnowledge could not verify whether this path refers to a project with recorded Pi trust; cleanup was left pending. Retry once the project path can be resolved to check again.`};if(o.kind===`refused`){if(l.length===0)return{action:`kept-unverified`,error:o.error};let e=l.map(({path:e,record:t})=>`key ${H(JSON.stringify(t.cwd))}; configured store ${H(JSON.stringify(t.configuredTrustPath))}; recorded destination ${H(JSON.stringify(t.canonicalTrustPath))}; ownership record ${H(JSON.stringify(e))} (${t.state})`);return{action:`kept-unverified`,error:[`${o.error}. OpenKnowledge kept these Pi trust ownership records; current trust decisions were not checked:`,...e,`To review manually, close Pi, verify the intended store against its recorded destination, and inspect only the exact key. A pending record does not prove setup completed or ownership of a current grant. If you choose to undo a current true decision, restore the recorded previous value, or remove that key only when no previous entry was recorded. Preserve other current decisions; parent-folder and global trust settings still apply.`].join(`
8
+ `)}}let u=Ht(o.project.canonical,a,w.pi.projectConfigPath(o.project.canonical));if(u.kind===`unreadable`)return{action:`kept-unverified`,error:u.error};let d=u.kind===`shared`?u.paths:[],f=[],p=new Map,m=(e,t)=>{let n=p.get(e);if(!n){let t=Q(e);if(t.kind===`refused`){f.push({action:`refused-unreadable`,error:t.error});return}n={trustPath:e,resolved:t,keys:new Map},p.set(e,n)}if(t){if(n.resolved.path!==t.record.canonicalTrustPath){f.push({action:`refused-unreadable`,error:`Pi trust store ${H(e)} no longer points to its recorded destination ${H(t.record.canonicalTrustPath)}; restore the intended file location or symlink, then retry`});return}n.keys.set(t.record.cwd,{cwd:t.record.cwd,mode:`recorded`,receipt:t})}};for(let e of l)m(e.record.configuredTrustPath,e);m(i.trustPath);for(let e of p.values()){for(let t of[o.project.canonical,i.cwd])e.keys.has(t)||e.keys.set(t,{cwd:t,mode:`inspect`,receipt:l.find(n=>n.record.cwd===t&&n.record.canonicalTrustPath===e.resolved.path)});f.push(nn(e,a,d,o.project))}return en(f)}function $(e,t){try{return t()}catch(t){throw t instanceof W?t:Error(`Could not access OpenKnowledge's Pi trust ownership records at ${H(D(g(e),`pi-trust`))}: ${H(t instanceof Error?t.message:String(t))}. Check the records and their permissions, then retry.`,{cause:t})}}function nn(e,t,n,r){let{trustPath:i,resolved:a}=e,o=[...e.keys.values()];if(!o.some(e=>e.mode===`recorded`)&&a.kind===`missing`)return{action:`not-present`};if(a.kind===`missing`)try{j(E(a.path))}catch(e){return{action:`failed`,error:`The recorded Pi trust directory ${H(E(a.path))} is unavailable: ${H(e instanceof Error?e.message:String(e))}. Restore access to its parent directory or mounted drive, then retry; the ownership record was kept.`}}let s=[],c={result:{action:`not-present`}};try{Rt(i,a.path,()=>{let e=Wt(r);if(e){c.result={action:`kept-unverified`,error:e};return}let l=Jt(i,a);if(l.kind===`refused`){c.result={action:`refused-unreadable`,error:l.error};return}let u=Kt(l,r.canonical);if(u.state===`unreadable`){c.result={action:`refused-unreadable`,error:Z(i,u.reason).error};return}let d=o.map(e=>({cwd:e.cwd,mode:e.mode,expectedConfiguredPath:e.receipt?.record.configuredTrustPath,receipt:$(t,()=>q(t,e.cwd).find(e=>e.record.canonicalTrustPath===l.path))}));if(d.some(e=>e.receipt&&e.receipt.record.configuredTrustPath!==e.expectedConfiguredPath)){c.result={action:`failed`,error:`The Pi trust ownership record changed during cleanup; retry to read its current location.`};return}for(let e of d){try{rn(e,t,i,l.path,u,n,r,c)}catch(t){let n=H(t instanceof Error?t.message:String(t)),r=t instanceof W?``:`; retry to check its current state.`;s.push({action:`failed`,error:`Pi trust entry ${H(JSON.stringify(e.cwd))} in ${H(i)} could not be reconciled: ${n}${r}`})}s.push(c.result),c.result={action:`not-present`}}})}catch(e){s.push({action:`failed`,error:H(e instanceof Error?e.message:String(e))})}return en([...s,c.result])}function rn(e,t,n,r,i,a,o,s){let{cwd:c,receipt:l}=e;if(i.entries[c]!==!0){l&&e.mode===`recorded`&&$(t,()=>J(t,l)),s.result={action:`not-present`};return}let u=`To remove this grant manually, close Pi and remove only the ${H(JSON.stringify(c))} entry from ${H(n)}; parent-folder and global trust settings still apply.`;if(a.length>0&&c===o.canonical){let n=`kept Pi's folder trust because other resources still need it: ${a.slice(0,3).map(e=>H(JSON.stringify(e))).join(`, `)}${a.length>3?` (+${a.length-3} more)`:``}. ${u} Removing this grant may stop Pi from loading those resources, including any not listed here.`;s.result={action:`kept-shared`,detail:n},l&&e.mode===`recorded`&&$(t,()=>J(t,l)),s.result={action:`kept-shared`,detail:`${n} ${l?e.mode===`recorded`?`OpenKnowledge has relinquished this grant and will not revoke it on later cleanup runs.`:`OpenKnowledge kept the existing ownership record; cleanup of its recorded location remains incomplete.`:`OpenKnowledge has no ownership record for this grant and will not revoke it on later cleanup runs.`}`};return}if(e.mode===`inspect`||!l||l.record.state===`pending`){let e=l?l.record.state===`pending`?`its ownership record is pending after an interrupted setup; completion cannot be verified. Re-running setup or cleanup does not reconcile this record while the folder remains trusted.`:`OpenKnowledge must reconcile its recorded location at ${H(l.record.configuredTrustPath)} before removing it.`:`no OpenKnowledge ownership record exists; this includes every grant made before ownership recording was introduced.`;s.result={action:`kept-unowned`,detail:`${c===o.canonical?`kept Pi's folder trust because ${e}`:`kept a Pi trust entry under a non-canonical project path because ${e} Pi uses the real project directory instead of this key.`} ${u}`};return}let d={...i.entries};l.record.previous.present?d[c]=l.record.previous.value:delete d[c];let f=JSON.stringify(d,null,2)+(i.trailingNewline?`
9
+ `:``),p=C(r);y(r,f,p===void 0?void 0:{mode:p}),i.entries=d,$(t,()=>J(t,l)),s.result={action:`removed`}}function an(e){return xe(e)||he(e)||le(e)}const on=10485760;function sn(e,t,n,r=!1){let i=tn(e,t,n,{recordedOnly:r});switch(i.action){case`removed`:case`not-present`:return{trust:i.action};case`kept-shared`:case`kept-unowned`:return{trust:i.action,trustDetail:i.detail};case`failed`:case`refused-unreadable`:case`kept-unverified`:{let e=r?`Trust cleanup remains incomplete`:`The bridge file was left untouched`;throw Error(`Pi trust cleanup failed (${i.action}):\n${i.error}\n${e} so cleanup can be retried.`)}default:throw Error(`unhandled Pi trust cleanup result: ${i}`)}}function cn(e,t,n,r){if(e.id!==`pi`)return{kind:`not-present`};let i=sn(t,n,r,!0);return i.trust===`not-present`?{kind:`not-present`}:{kind:`removed`,...i}}function ln(e,t,n,r,i){let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=Oe(a);if(o.kind===`not-present`)return cn(e,t,n,i);if(o.kind===`declined`)return o;let s=be(e,t,n,o.path);if(s.kind===`absent`||s.kind===`no-entry`)return cn(e,t,n,i);if(s.kind===`decline`)return{kind:`declined`,reason:s.reason};if(!an(s.entry))return{kind:`left-foreign`};let c=e.serverName(t);if(e.format===`file`){let e=sn(t,n,i);try{Ne(a,{force:!0})}catch(t){throw e.trustDetail?Error(`${t instanceof Error?t.message:String(t)}\n${e.trustDetail}`,{cause:t}):t}return{kind:`removed`,...e}}return e.format===`toml`?fn(o.path,c):e.format===`yaml`?dn(o.path,e.topLevelKey,c):un(o.path,e.topLevelKey,e.serverMapSubKey,c)}function un(e,t,n,r){let i;try{i=M(e,`utf-8`)}catch(e){return{kind:`declined`,reason:S(e)}}if(Buffer.byteLength(i,`utf-8`)>on)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=ae(i,Ce(t,n,r));return o?(y(e,a,{mode:C(e)}),{kind:`removed`}):{kind:`not-present`}}function dn(e,t,n){let r;try{r=M(e,`utf-8`)}catch(e){return{kind:`declined`,reason:S(e)}}if(Buffer.byteLength(r,`utf-8`)>on)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,ze.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let c=o.toString(),l=_e(a);a.trim()===``||a.endsWith(`
10
+ `)?c.endsWith(`
11
+ `)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
12
+ `).replace(/\n/g,`\r
13
+ `));let u=`${i?``:``}${c}`;return u!==r&&y(e,u,{mode:C(e)}),{kind:`removed`}}function fn(e,t){let n=pe();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=M(e,`utf-8`)}catch(e){return{kind:`declined`,reason:S(e)}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=_e(a),s=a.trim()===``||a.endsWith(`
14
+ `),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
15
+ `)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
16
+ `).replace(/\n/g,`\r
17
+ `));let u=`${i?``:``}${l}`;return u!==r&&y(e,u,{mode:C(e)}),{kind:`removed`}}function pn(e,t){let n=m[e];return n===null?null:D(t,...n.split(`/`),x.discovery,`SKILL.md`)}function mn(e,t){let n=pn(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};if(!v(t).some(t=>t.editorId===e))return{editorId:e,label:e,action:`skipped-unsupported`,path:n};try{let r=b(`discovery`,{checkDesktop:!0});return se(E(n),t),{editorId:e,label:e,action:ce(r,n),path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function hn(e){return A(D(e,...`.agents/skills`.split(`/`),x.discovery))?!0:d.some(t=>{let n=pn(t,e);return n!==null&&A(E(n))})}function gn(e,t){let n=pn(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};let r=E(n);try{return A(n)?(se(r,t),Ne(r,{recursive:!0,force:!0}),{editorId:e,label:e,action:`removed`,path:n}):{editorId:e,label:e,action:`not-present`,path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function _n(e){return e===`opencode`?ue:ye}function vn(e,t,n){let r=w[e],i=_n(e),a=[],o=r.projectConfigPath?.(t);o!==void 0&&a.push({scope:`project`,configPath:o});try{a.push({scope:`user`,configPath:r.configPath(t,n)})}catch{}for(let o of a){let a=me(r,t,n,o.configPath);if(a!==null&&i(a))return{editorId:e,scope:o.scope,configPath:o.configPath}}return null}function yn(e,t,n=[]){let r=A(D(e,x[t]))?`satisfied`:`absent`;return{...r===`satisfied`?{state:r,strictness:[`reclaim-permissive`]}:{state:r},...n.length===0?{}:{sharedWith:n}}}function bn(e,t){let n=oe.flatMap(t=>{let n=e[t];return n===null?[]:[{editor:t,root:n}]}),r=f.filter(e=>e.scope===t).map(e=>({editor:e.editorId,root:o}));return[...n,...r]}function xn(e,t,n,r){let i=te(e,bn(t,r)),a=i.find(e=>e.host===n);if(a===void 0||a.state===`absent`)return[];let o=a.real;return i.filter(e=>e.host!==n&&e.state!==`absent`&&e.real===o).map(e=>e.host)}function Sn(e,t){let n=(t??I()).replace(/[\\/]+$/,``);if(!n.includes(`\\`))return e.startsWith(`${n}/`)?`~/${e.slice(n.length+1)}`:e;let r=e=>e.replace(/\\/g,`/`),i=r(n),a=r(e);return a.startsWith(`${i}/`)?`~/${a.slice(i.length+1)}`:e}function Cn(e,t){let n=w[e];return Te(n,``,t)&&!fe(n,``,t)}function wn(e,t,n,r,i){let a=w[e],o;if(i===void 0)try{o=a.configPath(n,r)}catch{return{state:`structural-na`}}else o=i;let s=i===void 0?Sn(o,r):void 0,c=be(a,n,r,i);switch(c.kind){case`absent`:case`no-entry`:return i===void 0&&Cn(e,r)?{state:`structural-na`}:{state:`absent`,path:s};case`decline`:return{state:`unprobed`};case`present`:{let{entry:r}=c,i=[];xe(r)&&i.push(`reclaim-permissive`),he(r)&&i.push(`pre-approval-exact`),_n(e)(r)&&i.push(`injection-functional`);let o=ie(a,n);return i.length>0&&(o!==null&&Se(r,o)||t.includes(`pre-approval-exact`)&&i.includes(`reclaim-permissive`)&&!i.includes(`pre-approval-exact`))?{state:`drifted`,strictness:i,path:s}:i.length>0?{state:`satisfied`,strictness:i,path:s}:ve(a)?{state:`foreign-replaceable`,path:s}:{state:`foreign`,path:s}}}}function Tn(e){let{cwd:t,home:n}=e;return e=>{if(e.pathId===null)return null;let r=s(e.pathId);if(r===null)return null;if(r.kind===`central-skill-store`)return n===void 0?null:yn(D(n,o),`discovery`,xn(n,m,e.agent,`global`));let i=r.editor;switch(r.kind){case`editor-user-skill-root`:{let e=m[i];return e===null||n===void 0?null:v(n).some(e=>e.editorId===i)?yn(D(n,e),`discovery`,xn(n,m,i,`global`)):{state:`structural-na`}}case`editor-project-skill-root`:{let e=p[i];return e===null?null:yn(D(t,e),`project`,xn(t,p,i,`project`))}case`editor-user-config`:return wn(i,e.strictness,t,n);case`editor-project-config`:{let r=w[i].projectConfigPath?.(t);return r===void 0?null:wn(i,e.strictness,t,n,r)}}}}export{Ue as S,Xe as _,mn as a,Ye as b,Yt as c,ct as d,lt as f,L as g,tt as h,hn as i,nt as l,et as m,vn as n,ln as o,ut as p,gn as r,Zt as s,Tn as t,rt as u,Ke as v,Ve as x,Je as y};
@@ -1 +1 @@
1
- import{M as e,S as t}from"./init-Boyt6ulg.mjs";import{lstatSync as n,statSync as r}from"node:fs";function i(i){let a;try{a=n(i).isSymbolicLink()}catch(t){return t.code===`ENOENT`?{kind:`not-present`}:{kind:`declined`,reason:e(t)}}let o=t(i);if(o.readPath===null)return{kind:`declined`,reason:`unresolved-symlink`};try{if(!r(o.readPath).isFile())return{kind:`declined`,reason:`not-a-file`}}catch(t){return{kind:`declined`,reason:a&&t.code===`ENOENT`?`missing-symlink-target`:e(t)}}return{kind:`ready`,path:o.writePath,symlink:a}}export{i as t};
1
+ import{M as e,S as t}from"./init-DvYKQnB9.mjs";import{lstatSync as n,statSync as r}from"node:fs";function i(i){let a;try{a=n(i).isSymbolicLink()}catch(t){return t.code===`ENOENT`?{kind:`not-present`}:{kind:`declined`,reason:e(t)}}let o=t(i);if(o.readPath===null)return{kind:`declined`,reason:`unresolved-symlink`};try{if(!r(o.readPath).isFile())return{kind:`declined`,reason:`not-a-file`}}catch(t){return{kind:`declined`,reason:a&&t.code===`ENOENT`?`missing-symlink-target`:e(t)}}return{kind:`ready`,path:o.writePath,symlink:a}}export{i as t};
@@ -1 +1 @@
1
- import{t as e}from"./launch-json-removal-B7LKMRLc.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,severity:`info`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=(n.removeOwnLaunchEntryFn??e)(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,severity:`warn`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`;return s&&i({event:`launch-json-repair-removed`,severity:`info`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
1
+ import{t as e}from"./launch-json-removal-7bCaKHP1.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,severity:`info`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=(n.removeOwnLaunchEntryFn??e)(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,severity:`warn`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`;return s&&i({event:`launch-json-repair-removed`,severity:`info`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
@@ -1 +1 @@
1
- import{Ma as e}from"./md-manager-BGnqyqi1-LuKRfqxD.mjs";import{J as t,X as n,et as r,f as i,rt as a,y as o}from"./init-Boyt6ulg.mjs";import{homedir as s}from"node:os";function c(e){let{priorCommand:t,priorArgs:n}=l(e.priorEntry);return{event:`mcp-config-migrate`,scope:e.scope,surface:e.surface,editorId:e.editorId,configPath:e.configPath,priorCommand:t,priorArgs:n}}function l(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}function u(e){let r=e.logger??m,i=e.home??s(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,severity:`info`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of t){let t=n[o],s=d(()=>t.configPath(``,i));if(s!==null&&a.push(f({scope:`user`,editorId:o,target:t,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),t.projectConfigPath){let n=t.projectConfigPath,i=d(()=>n(e.projectDir));i!==null&&a.push(f({scope:`project`,editorId:o,target:t,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function d(e){try{return e()}catch{return null}}function f(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},s=i(t.target,t.cwd,t.home,t.configPathOverride);if(s===null)return{...n,outcome:`no-entry`};if(t.target.format===`file`){if(a(s))return{...n,outcome:`canonical`}}else{let i=e(s);if(i.kind===`recognized`&&i.disposition===`keep`){let e=r(s,t.target.buildEntry(t.cwd,{}));if(e.length===0)return{...n,outcome:`canonical`};let i=p(t,n,o(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0,pruneOnly:!0},t.home,t.configPathOverride));return(i.outcome===`repaired`||i.outcome===`canonical`)&&t.logger({event:i.outcome===`repaired`?`mcp-config-repair-pruned`:`mcp-config-repair-prune-unchanged`,severity:i.outcome===`repaired`?`info`:`warn`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,keys:e}),i.outcome===`canonical`?{...n,outcome:`prune-unchanged`}:i}if(i.kind===`declined`&&t.scope===`project`)return t.logger({event:`mcp-config-repair-skipped-foreign`,severity:`info`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:i.reason}),{...n,outcome:`foreign`,reason:i.reason}}return t.logger({...c({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:s}),severity:`info`}),p(t,n,o(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride))}function p(e,t,n){if(n.action===`failed`){let r=n.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,severity:`warn`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:r}),{...t,outcome:`write-failed`,error:r}}return n.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,severity:`warn`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:n.declineReason}),{...t,outcome:`declined`,reason:n.declineReason}):n.action===`skipped-flag`?{...t,outcome:`canonical`}:{...t,outcome:`repaired`}}function m(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as n,u as repairMcpConfigs,c as t};
1
+ import{La as e}from"./md-manager-BGnqyqi1-DCa5-0ww.mjs";import{J as t,X as n,et as r,f as i,rt as a,y as o}from"./init-DvYKQnB9.mjs";import{homedir as s}from"node:os";function c(e){let{priorCommand:t,priorArgs:n}=l(e.priorEntry);return{event:`mcp-config-migrate`,scope:e.scope,surface:e.surface,editorId:e.editorId,configPath:e.configPath,priorCommand:t,priorArgs:n}}function l(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}function u(e){let r=e.logger??m,i=e.home??s(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,severity:`info`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of t){let t=n[o],s=d(()=>t.configPath(``,i));if(s!==null&&a.push(f({scope:`user`,editorId:o,target:t,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),t.projectConfigPath){let n=t.projectConfigPath,i=d(()=>n(e.projectDir));i!==null&&a.push(f({scope:`project`,editorId:o,target:t,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function d(e){try{return e()}catch{return null}}function f(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},s=i(t.target,t.cwd,t.home,t.configPathOverride);if(s===null)return{...n,outcome:`no-entry`};if(t.target.format===`file`){if(a(s))return{...n,outcome:`canonical`}}else{let i=e(s);if(i.kind===`recognized`&&i.disposition===`keep`){let e=r(s,t.target.buildEntry(t.cwd,{}));if(e.length===0)return{...n,outcome:`canonical`};let i=p(t,n,o(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0,pruneOnly:!0},t.home,t.configPathOverride));return(i.outcome===`repaired`||i.outcome===`canonical`)&&t.logger({event:i.outcome===`repaired`?`mcp-config-repair-pruned`:`mcp-config-repair-prune-unchanged`,severity:i.outcome===`repaired`?`info`:`warn`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,keys:e}),i.outcome===`canonical`?{...n,outcome:`prune-unchanged`}:i}if(i.kind===`declined`&&t.scope===`project`)return t.logger({event:`mcp-config-repair-skipped-foreign`,severity:`info`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:i.reason}),{...n,outcome:`foreign`,reason:i.reason}}return t.logger({...c({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:s}),severity:`info`}),p(t,n,o(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride))}function p(e,t,n){if(n.action===`failed`){let r=n.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,severity:`warn`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:r}),{...t,outcome:`write-failed`,error:r}}return n.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,severity:`warn`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:n.declineReason}),{...t,outcome:`declined`,reason:n.declineReason}):n.action===`skipped-flag`?{...t,outcome:`canonical`}:{...t,outcome:`repaired`}}function m(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as n,u as repairMcpConfigs,c as t};
@@ -260,7 +260,7 @@
260
260
  "agentSettable": false,
261
261
  "reload": "live",
262
262
  "defaultScope": "project-local",
263
- "description": "Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."
263
+ "description": "Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (stored in secrets.yml in the OpenKnowledge home folder); it is sent to whichever endpoint this names."
264
264
  },
265
265
  "model": {
266
266
  "default": "text-embedding-3-small",
@@ -441,7 +441,7 @@
441
441
  "agentSettable": false,
442
442
  "reload": "boot",
443
443
  "defaultScope": "user",
444
- "description": "Declares that this git host is a GitHub Enterprise Server instance, so OpenKnowledge treats its remotes the way it treats github.com (OpenKnowledge credential handling, the push-permission check, share links, and the default host for `ok auth`). 'github' is the only accepted value today. A host that is not declared here and is not github.com is treated as a generic git remote, so OpenKnowledge leaves the machine's own git credentials alone and does not check push permission. Per-machine (user scope, `~/.ok/global.yml`); a value in a project's `.ok/config.yml` is ignored. The declaration takes effect when OpenKnowledge next starts."
444
+ "description": "Declares that this git host is a GitHub Enterprise Server instance, so OpenKnowledge treats its remotes the way it treats github.com (OpenKnowledge credential handling, the push-permission check, share links, and the default host for `ok auth`). 'github' is the only accepted value today. A host that is not declared here and is not github.com is treated as a generic git remote, so OpenKnowledge leaves the machine's own git credentials alone and does not check push permission. Per-machine (user scope, global.yml in the OpenKnowledge home folder); a value in a project's `.ok/config.yml` is ignored. The declaration takes effect when OpenKnowledge next starts."
445
445
  }
446
446
  },
447
447
  "additionalProperties": {}
@@ -450,7 +450,7 @@
450
450
  "agentSettable": false,
451
451
  "reload": "boot",
452
452
  "defaultScope": "user",
453
- "description": "Per-git-host declarations, keyed by hostname (for example ghes.example.com). Each entry says how OpenKnowledge should treat remotes on that host; today the only key an entry carries is `provider`. Hosts absent from this map are treated as generic git remotes. Per-machine (user scope, `~/.ok/global.yml`); a value in a project's `.ok/config.yml` is ignored. Declarations take effect when OpenKnowledge next starts."
453
+ "description": "Per-git-host declarations, keyed by hostname (for example ghes.example.com). Each entry says how OpenKnowledge should treat remotes on that host; today the only key an entry carries is `provider`. Hosts absent from this map are treated as generic git remotes. Per-machine (user scope, global.yml in the OpenKnowledge home folder); a value in a project's `.ok/config.yml` is ignored. Declarations take effect when OpenKnowledge next starts."
454
454
  }
455
455
  },
456
456
  "additionalProperties": {}