@inkeep/open-knowledge 0.87.4 → 0.87.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +1 -0
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/assets/skills/project/references/conflict-resolution.md +1 -1
- package/dist/assets/skills/project/references/doc-editing.md +1 -1
- package/dist/cli.mjs +75 -75
- package/dist/constants-DpDsY5an.mjs +1 -0
- package/dist/dist-Be8q4E8P.mjs +2224 -0
- package/dist/dist-CAVfTttU.mjs +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +248 -248
- package/dist/{init-CtkZ5ntp.mjs → init-CAX7eVNx.mjs} +41 -41
- package/dist/init-DKprWOvJ.mjs +1 -0
- package/dist/{launch-json-removal-CjUjpJup.mjs → launch-json-removal-Dxu_Lz6l.mjs} +1 -1
- package/dist/loader-Biutv0tI.mjs +1 -0
- package/dist/{loader-BYOYY3hL.mjs → loader-Df4p271f.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-BeOFzphu.mjs → md-manager-BGnqyqi1-CU8xHS4D.mjs} +169 -169
- package/dist/{open-browser-Cv1yuEQw.mjs → open-browser-BBYzWw_v.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-Cbp_rERj.mjs +1 -0
- package/dist/{preview-CeHrvBq4.mjs → preview-icmJu7Kd.mjs} +1 -1
- package/dist/public/assets/{AccountSection-BurxCF8l.js → AccountSection-6IC0PuC_.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-8hgKX4kQ.js → ActivityModeContent-D3vguJ9G.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-CxDe0H4U.js → AddPropertiesButton-CvP0prMu.js} +2 -2
- package/dist/public/assets/{AgentConnectionsSection-CFTMQXUz.js → AgentConnectionsSection-CIV6IvM9.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-Bon1Mefz.js → AgentDiffPane-ClyLzIYU.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-B8Wp9-pG.js → AttachmentsSection-Fa_a7uwJ.js} +1 -1
- package/dist/public/assets/{AuthModal-CDv9Ka9d.js → AuthModal-BF2Z7OJL.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CLRzs9yV.js → CodeMirrorPropInput-Bp863w-S.js} +2 -2
- package/dist/public/assets/{ContentRulesSection-CiSCYYYz.js → ContentRulesSection-BzYrpu5v.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-DS5sFg8l.js → DiffViewBoundary-Ct8EAcvE.js} +1 -1
- package/dist/public/assets/{DocumentContext-DtZqcp3S.js → DocumentContext-CYEtGh9P.js} +3 -3
- package/dist/public/assets/{EditorModeToggle-B6gl2EvP.js → EditorModeToggle-DpVPuW6o.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-BQUNQJoA.js → ExcalidrawDocEditor-B5aDVmiH.js} +1 -1
- package/dist/public/assets/FeedbackForm-BVXqBFQp.js +1 -0
- package/dist/public/assets/{GraphPanel-BqNuC1PH.js → GraphPanel-Cjjh0X-I.js} +2 -2
- package/dist/public/assets/{ImportSkillDialog-6aqTeLYF.js → ImportSkillDialog-DU8URPUN.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-B6QY8KXg.js → LinkPreviewsSection-B4Mb26O6.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BWmlc3a0.js → LintConfigEditor-Bgcif27S.js} +1 -1
- package/dist/public/assets/{LintingSection-D1fhs-RL.js → LintingSection-CrM7A9Pu.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CzDNg07Y.js +1 -0
- package/dist/public/assets/ManagedArtifactProperties-wAOzK2s4.js +1 -0
- package/dist/public/assets/{McpConsentDialogBody-xbsziJ8M.js → McpConsentDialogBody-T-AsMqAM.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-JGnJWwb9.js → MermaidDocEditor-CFyc7az-.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-BgZzZ87v.js → NetworkAccessSection-D70-r8l0.js} +1 -1
- package/dist/public/assets/{OkignoreSection-CQywQkmc.js → OkignoreSection-CRFoJuYb.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-BtUwaSYs.js → ProjectTemplatesSection-WddJ1lhc.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-sIydl1hK.js → PropertyDisplayRow-CIPMHB1z.js} +2 -2
- package/dist/public/assets/{PublishToGitHubDialog-Dekqq75i.js → PublishToGitHubDialog-BSewRvqe.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-B0qjAvei.js → RegisteredAgentIcon-Bq2z3oRf.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BFi4RmA-.js → SchemaConfigEditor-CFEd3Soc.js} +1 -1
- package/dist/public/assets/{SearchSection-BQ0PeoxW.js → SearchSection-BqJPWJjo.js} +1 -1
- package/dist/public/assets/{SessionsHost-DGLINUR-.js → SessionsHost-OlqCKR31.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-Bv_2oyGd.js → SettingsDialogBody-thd1s5Jf.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-D_mEwrMY.js → ShareReceiveMissDialog-YI2u6d7L.js} +1 -1
- package/dist/public/assets/{SkillCostValue-DK-VfwfI.js → SkillCostValue-DDhTa5Kn.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-BYQhRIjd.js → SkillEditBanner-1xI4AWZN.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-Cp2VfBKT.js → SkillForkDialog-BcgrUab0.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-CsSIF4d7.js → SkillInstallMenu-f08QXFO6.js} +1 -1
- package/dist/public/assets/SkillModeBanner-DJo427go.js +1 -0
- package/dist/public/assets/{SkillOriginInline-DXmcEqEw.js → SkillOriginInline-BQhnp-U4.js} +1 -1
- package/dist/public/assets/{SkillPluginBundleDialog-D8f_Pygy.js → SkillPluginBundleDialog-AajGslYO.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DccyBI_f.js → SkillToolbarControls-3am6dR2z.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-BQ6eCTsP.js → SkillsManagerSection-cOVbfp1s.js} +1 -1
- package/dist/public/assets/{SlidesPluginSection-dXy1hGNp.js → SlidesPluginSection-CayFA0zh.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DXn_DkWH.js → SlidesToolbarControls-BTg9RQ0D.js} +1 -1
- package/dist/public/assets/{SourceEditor-BMHMeiLi.js → SourceEditor-CRCsnrFo.js} +1 -1
- package/dist/public/assets/{SpellingSettings-Bqz9pslj.js → SpellingSettings-C3gKNkGi.js} +1 -1
- package/dist/public/assets/{SyncSection-Be1kbaHR.js → SyncSection-C9fwr4y1.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-DVA4l5tM.js → SyncStatusBadge-Cj83WuBK.js} +1 -1
- package/dist/public/assets/{TemplateRow-CQTK4uJX.js → TemplateRow-B1g-a4Pw.js} +2 -2
- package/dist/public/assets/{TerminalLaunchContext-VC_1IQ2O.js → TerminalLaunchContext-CGtoVZtX.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DYxs61YB.js → TerminalPanel-COTcQZbU.js} +1 -1
- package/dist/public/assets/{TerminalSection-qnEvYDzw.js → TerminalSection-CWB1b2pE.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-C3XdM8e9.js → TerminalWindowApp-vThWyHoc.js} +1 -1
- package/dist/public/assets/{TextDocEditor-BotHHBgT.js → TextDocEditor-CSKNTrXF.js} +1 -1
- package/dist/public/assets/ThemePluginSection-Dhue16Q2.js +6 -0
- package/dist/public/assets/ThreadView-BT8OZ1HL.js +28 -0
- package/dist/public/assets/{TimelineDiffPane-Z-Z6OYJ-.js → TimelineDiffPane-COtkC6YJ.js} +1 -1
- package/dist/public/assets/{_envelope-q8XHEv4O-C-Qnl5Tu.js → _envelope-aSbxdSNI-BbmN1FUH.js} +1 -1
- package/dist/public/assets/{agent-connections-BdU_6bUV.js → agent-connections-DOlRC9J4.js} +1 -1
- package/dist/public/assets/{agent-registry-BdHe0AEQ.js → agent-registry-Dw7Mum0u.js} +1 -1
- package/dist/public/assets/{bridge-BMIee44l.js → bridge-C-lLcgzt.js} +3 -3
- package/dist/public/assets/{calendar-B0urmsQ1.js → calendar-aomRwj8d.js} +1 -1
- package/dist/public/assets/{catalog-CEXii1s5.js → catalog-BNmmHvVJ.js} +1 -1
- package/dist/public/assets/{client-version-C4buVdIf.js → client-version-Dj7y7X2p.js} +1 -1
- package/dist/public/assets/{comment-chips-BX5-1eNn.js → comment-chips-DvoKtv_l.js} +1 -1
- package/dist/public/assets/{config-provider-CVaw14ix.js → config-provider-3wkoDnhc.js} +1 -1
- package/dist/public/assets/config-schema-GlF078Yz.js +1 -0
- package/dist/public/assets/{css-color-to-hex-Csde6-Qs.js → css-color-to-hex-Cnqvo0uF.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-DuvN5hZT.js → doc-undo-manager-BYzRP5g6.js} +1 -1
- package/dist/public/assets/{field-controls-D31F23S8.js → field-controls-BwRnSCqe.js} +1 -1
- package/dist/public/assets/field-controls-OOVz_aSI.js +1 -0
- package/dist/public/assets/{handoff-DzPPe6fp.js → handoff-BDTTOcb6.js} +1 -1
- package/dist/public/assets/{ime-composition-B56Lnl92.js → ime-composition-C6RElBur.js} +1 -1
- package/dist/public/assets/index-DHUYes5V.js +2209 -0
- package/dist/public/assets/{lint-config-client-CLttd-hM.js → lint-config-client-CkU0vqu3.js} +1 -1
- package/dist/public/assets/{lint-plugins-GWfmagND.js → lint-plugins-V3EMqFLw.js} +1 -1
- package/dist/public/assets/{markdown-lint-wCP_bSbs.js → markdown-lint-BDbIoz4f.js} +3 -3
- package/dist/public/assets/{markdownlint-rule-browser-nIryvJXe.js → markdownlint-rule-browser-B7stW6Oh.js} +1 -1
- package/dist/public/assets/messages--ehzGEyL.js +1 -0
- package/dist/public/assets/messages-BY8vnrN5.js +1 -0
- package/dist/public/assets/messages-BsaUfgyT.js +1 -0
- package/dist/public/assets/messages-C3jyZ-tQ.js +1 -0
- package/dist/public/assets/messages-CRaWmTK3.js +1 -0
- package/dist/public/assets/messages-CjxzZ_an.js +1 -0
- package/dist/public/assets/messages-D9Q_Zb27.js +1 -0
- package/dist/public/assets/messages-Di5PZudR.js +1 -0
- package/dist/public/assets/messages-Dt7AN68O.js +1 -0
- package/dist/public/assets/messages-SQ_HVqr-.js +1 -0
- package/dist/public/assets/messages-VFA4QUBO.js +1 -0
- package/dist/public/assets/messages-kSFbJVg5.js +1 -0
- package/dist/public/assets/messages-mX7CV8Xh.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-CDYFX9HM.js → pending-receive-nav-store-Dd1br4ja.js} +1 -1
- package/dist/public/assets/{preferred-session-events-VMYut6j3.js → preferred-session-events-XveQLNcI.js} +1 -1
- package/dist/public/assets/progress-ROPletxo.js +10 -0
- package/dist/public/assets/{saved-themes-client-BPWMEtsb.js → saved-themes-client-B3RNutYm.js} +1 -1
- package/dist/public/assets/{schema-section-Ceiv9_HZ.js → schema-section-B7Ec9YkJ.js} +1 -1
- package/dist/public/assets/{schemas-api-CL5ZXlEj.js → schemas-api-DYoYU1Zh.js} +2 -2
- package/dist/public/assets/{selection-context-BG6PSBQy.js → selection-context-Df0KmJCv.js} +1 -1
- package/dist/public/assets/sign-in-terminal-events-gIutiXLp.js +1 -0
- package/dist/public/assets/{skills-api-DjykKWn7.js → skills-api-DPNzK8ks.js} +1 -1
- package/dist/public/assets/{src-iKYGO1NJ.js → src-DSVx1YPZ.js} +1 -1
- package/dist/public/assets/storage-scope-D82mTrBx.js +1 -0
- package/dist/public/assets/{tag-pill-input-D_fe_Zbo.js → tag-pill-input-CHT8aIYs.js} +1 -1
- package/dist/public/assets/{telemetry-impl-Ccn7F9CM.js → telemetry-impl-C8N3qCpc.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BseU7449.js → telemetry-startup-DIO-T71a.js} +1 -1
- package/dist/public/assets/terminal-cli-display-B__FxqFM.js +1 -0
- package/dist/public/assets/{terminal-command-events-h-p66odT.js → terminal-command-events-DEYKqKZt.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-3vnER_eI.js → terminal-launch-events-Bg7uGfvu.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-CBXlppnn.js → typing-burst-detector-B6bKsypc.js} +1 -1
- package/dist/public/assets/{uninstall-DyYmGM9i.js → uninstall-DizefbDX.js} +1 -1
- package/dist/public/assets/{use-activity-panel-3NhYZFG6.js → use-activity-panel-CF3KFrd9.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-Bpi7AD0s.js → use-apply-config-color-theme-KcqN_kbT.js} +2 -2
- package/dist/public/assets/{use-apply-config-language-DlSviEmN.js → use-apply-config-language-CbiUoguW.js} +2 -2
- package/dist/public/assets/{use-conflicts-CIjDyM9c.js → use-conflicts-2mx0_ZrI.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-BJbDRXxo.js → use-live-xterm-theme-BD2co7eQ.js} +1 -1
- package/dist/public/assets/{use-open-skill-CMj5RT7g.js → use-open-skill-CRn4rlJ-.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-D9HCPCCa.js → use-semantic-search-status-DdF3HjO-.js} +1 -1
- package/dist/public/assets/{use-skill-origin-CiJpOXFq.js → use-skill-origin-DKeppfSH.js} +1 -1
- package/dist/public/assets/{use-skill-targets-EVebu2kh.js → use-skill-targets-DuCl3F30.js} +1 -1
- package/dist/public/assets/{use-skills-BWAh3dDS.js → use-skills-BxAjFPL9.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-DFltB7g8.js → use-terminal-enabled-CGbqSTTh.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-BJUx5Axc.js → use-timeline-entry-diff-CLv-FT2j.js} +1 -1
- package/dist/public/assets/{use-workspace-h2j0Puyv.js → use-workspace-CFQdH1aL.js} +1 -1
- package/dist/public/index.html +60 -60
- package/dist/public/uninstall.html +3 -3
- package/dist/{registry-probes-qG55FHEn.mjs → registry-probes-BH7U4quJ.mjs} +7 -7
- package/dist/{removal-file-path-DPTOhjIq.mjs → removal-file-path-DBusekL7.mjs} +1 -1
- package/dist/{repair-launch-json-BvgDTED_.mjs → repair-launch-json-nZw0r3iQ.mjs} +1 -1
- package/dist/{repair-mcp-configs-DoxrMgJo.mjs → repair-mcp-configs-9NUper1w.mjs} +1 -1
- package/dist/src-ChGfUh2I.mjs +1 -0
- package/dist/src-XxTqG9KM.mjs +16 -0
- package/dist/{start-DNjgLf7p.mjs → start-5VcppmHb.mjs} +3 -3
- package/dist/start-oDeJSMOK.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-ofU405yq.mjs +0 -1
- package/dist/dist-B_I6SNFI.mjs +0 -1
- package/dist/dist-WFhah2YJ.mjs +0 -2214
- package/dist/init-qlrTVip_.mjs +0 -1
- package/dist/loader--WQX2fk-.mjs +0 -1
- package/dist/preview-BGbIVCB4.mjs +0 -1
- package/dist/public/assets/FeedbackForm-COE3ouZf.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-Cumv-gvX.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-_9pd4KhG.js +0 -1
- package/dist/public/assets/SkillModeBanner-CmfPlHVL.js +0 -1
- package/dist/public/assets/ThemePluginSection-DyuaEmFe.js +0 -6
- package/dist/public/assets/ThreadView-DgLAaoDb.js +0 -28
- package/dist/public/assets/config-schema-gPKGwQR7.js +0 -1
- package/dist/public/assets/field-controls-BpWrodXJ.js +0 -1
- package/dist/public/assets/index-wgWGDOqh.js +0 -2209
- package/dist/public/assets/messages-BDCxJPx2.js +0 -1
- package/dist/public/assets/messages-BEW0uPVX.js +0 -1
- package/dist/public/assets/messages-BO-eBk9m.js +0 -1
- package/dist/public/assets/messages-BaDp2_Fp.js +0 -1
- package/dist/public/assets/messages-CDO-xexo.js +0 -1
- package/dist/public/assets/messages-CRHWN_nJ.js +0 -1
- package/dist/public/assets/messages-CVuWmrbN.js +0 -1
- package/dist/public/assets/messages-C_w7Btlk.js +0 -1
- package/dist/public/assets/messages-CtVlTdzP.js +0 -1
- package/dist/public/assets/messages-Cz11LTJA.js +0 -1
- package/dist/public/assets/messages-D3qz2TwL.js +0 -1
- package/dist/public/assets/messages-DHXe_6Gj.js +0 -1
- package/dist/public/assets/messages-DKWtuhsU.js +0 -1
- package/dist/public/assets/progress-b1vLE7k7.js +0 -10
- package/dist/public/assets/sign-in-terminal-events-D1Wi4Xw6.js +0 -1
- package/dist/public/assets/storage-scope-GPc8n3Ml.js +0 -1
- package/dist/public/assets/terminal-cli-display-nVuidfOl.js +0 -1
- package/dist/src-BX6g-fva.mjs +0 -1
- package/dist/src-DAwcN3NM.mjs +0 -16
- package/dist/start-4jkc3Pls.mjs +0 -1
- /package/dist/public/assets/{DeleteConfirmationDialog-B0lltyMh.js → DeleteConfirmationDialog-BsTU-OWm.js} +0 -0
- /package/dist/public/assets/{alert-RmVFIy8D.js → alert-Bb4K23ol.js} +0 -0
- /package/dist/public/assets/{folder-config-api-BDhEYA86.js → folder-config-api-oMYXBtrq.js} +0 -0
- /package/dist/public/assets/{format-CJ1bI5np.js → format-eyy9pWAn.js} +0 -0
- /package/dist/public/assets/{settings-section-labels-VKfUFuEe.js → settings-section-labels-DX7VF2VJ.js} +0 -0
- /package/dist/public/assets/{sortable.esm-CFAacZUM.js → sortable.esm-CtrUfCv8.js} +0 -0
package/dist/public/index.html
CHANGED
|
@@ -86,13 +86,13 @@
|
|
|
86
86
|
-->
|
|
87
87
|
<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>
|
|
88
88
|
<style>html { background-color: #fafafa } html.dark { background-color: #292929 }</style>
|
|
89
|
-
<script type="module" crossorigin src="./assets/index-
|
|
89
|
+
<script type="module" crossorigin src="./assets/index-DHUYes5V.js"></script>
|
|
90
90
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="./assets/globals-DcxxoWPt.js">
|
|
94
94
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-Chd9yIcd.js">
|
|
95
|
-
<link rel="modulepreload" crossorigin href="./assets/sortable.esm-
|
|
95
|
+
<link rel="modulepreload" crossorigin href="./assets/sortable.esm-CtrUfCv8.js">
|
|
96
96
|
<link rel="modulepreload" crossorigin href="./assets/floating-ui.dom-BYl7JZd0.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="./assets/w3c-keyname-C7Rznu6R.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="./assets/dist-B8KZUrr_.js">
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
<link rel="modulepreload" crossorigin href="./assets/schemas-B93JY9Ef.js">
|
|
115
115
|
<link rel="modulepreload" crossorigin href="./assets/share-D-LUU2aX-B7Yg0G_m.js">
|
|
116
116
|
<link rel="modulepreload" crossorigin href="./assets/util-doc-name-DRKmy6g9.js">
|
|
117
|
-
<link rel="modulepreload" crossorigin href="./assets/_envelope-
|
|
117
|
+
<link rel="modulepreload" crossorigin href="./assets/_envelope-aSbxdSNI-BbmN1FUH.js">
|
|
118
118
|
<link rel="modulepreload" crossorigin href="./assets/constants-cc1-Bt4QPTUe.js">
|
|
119
119
|
<link rel="modulepreload" crossorigin href="./assets/constants-github-B7yhDvQc.js">
|
|
120
120
|
<link rel="modulepreload" crossorigin href="./assets/doc-extensions-CcO7K8uD-DG9uHV54.js">
|
|
@@ -122,19 +122,19 @@
|
|
|
122
122
|
<link rel="modulepreload" crossorigin href="./assets/constants-product-BVSOzxVs.js">
|
|
123
123
|
<link rel="modulepreload" crossorigin href="./assets/constants-editors-DmmORwNP.js">
|
|
124
124
|
<link rel="modulepreload" crossorigin href="./assets/skill-targets-schema-D6kA7J61.js">
|
|
125
|
-
<link rel="modulepreload" crossorigin href="./assets/schemas-api-
|
|
125
|
+
<link rel="modulepreload" crossorigin href="./assets/schemas-api-DYoYU1Zh.js">
|
|
126
126
|
<link rel="modulepreload" crossorigin href="./assets/dist-C_FzPxEX2.js">
|
|
127
127
|
<link rel="modulepreload" crossorigin href="./assets/dist-BGzUo_18.js">
|
|
128
|
-
<link rel="modulepreload" crossorigin href="./assets/messages
|
|
129
|
-
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-
|
|
130
|
-
<link rel="modulepreload" crossorigin href="./assets/client-version-
|
|
128
|
+
<link rel="modulepreload" crossorigin href="./assets/messages--ehzGEyL.js">
|
|
129
|
+
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-CbiUoguW.js">
|
|
130
|
+
<link rel="modulepreload" crossorigin href="./assets/client-version-Dj7y7X2p.js">
|
|
131
131
|
<link rel="modulepreload" crossorigin href="./assets/dist-Nvb76hAm.js">
|
|
132
132
|
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-theme-CYFG76sS.js">
|
|
133
|
-
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-color-theme-
|
|
134
|
-
<link rel="modulepreload" crossorigin href="./assets/css-color-to-hex-
|
|
133
|
+
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-color-theme-KcqN_kbT.js">
|
|
134
|
+
<link rel="modulepreload" crossorigin href="./assets/css-color-to-hex-Cnqvo0uF.js">
|
|
135
135
|
<link rel="modulepreload" crossorigin href="./assets/constants-upload-CVKO8P4d.js">
|
|
136
|
-
<link rel="modulepreload" crossorigin href="./assets/saved-themes-client-
|
|
137
|
-
<link rel="modulepreload" crossorigin href="./assets/config-provider-
|
|
136
|
+
<link rel="modulepreload" crossorigin href="./assets/saved-themes-client-B3RNutYm.js">
|
|
137
|
+
<link rel="modulepreload" crossorigin href="./assets/config-provider-3wkoDnhc.js">
|
|
138
138
|
<link rel="modulepreload" crossorigin href="./assets/dist-Dc8tD1th.js">
|
|
139
139
|
<link rel="modulepreload" crossorigin href="./assets/ccount-D2axTgHX.js">
|
|
140
140
|
<link rel="modulepreload" crossorigin href="./assets/lib-B4aE3tlX.js">
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
<link rel="modulepreload" crossorigin href="./assets/documents-fetch-C22H7c-g.js">
|
|
158
158
|
<link rel="modulepreload" crossorigin href="./assets/note-window-mode-CI3Yju9B.js">
|
|
159
159
|
<link rel="modulepreload" crossorigin href="./assets/structural-freshness-CIbkMFA3-CWi_lyiW.js">
|
|
160
|
-
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-
|
|
160
|
+
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-Bp863w-S.js">
|
|
161
161
|
<link rel="modulepreload" crossorigin href="./assets/dist-CSCUSbQc.js">
|
|
162
162
|
<link rel="modulepreload" crossorigin href="./assets/dist-DTFuvKje.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="./assets/dist-CRjqnzU7.js">
|
|
@@ -184,7 +184,7 @@
|
|
|
184
184
|
<link rel="modulepreload" crossorigin href="./assets/context-api-B9rp0hJb.js">
|
|
185
185
|
<link rel="modulepreload" crossorigin href="./assets/switch-BKZTXkzu.js">
|
|
186
186
|
<link rel="modulepreload" crossorigin href="./assets/lib-CUUpVIaO.js">
|
|
187
|
-
<link rel="modulepreload" crossorigin href="./assets/bridge-
|
|
187
|
+
<link rel="modulepreload" crossorigin href="./assets/bridge-C-lLcgzt.js">
|
|
188
188
|
<link rel="modulepreload" crossorigin href="./assets/lib-DlCf5-vZ.js">
|
|
189
189
|
<link rel="modulepreload" crossorigin href="./assets/lib-BZo-U1ex.js">
|
|
190
190
|
<link rel="modulepreload" crossorigin href="./assets/git-branch-CeTudSak.js">
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
<link rel="modulepreload" crossorigin href="./assets/circle-check-nK1yRBIw.js">
|
|
201
201
|
<link rel="modulepreload" crossorigin href="./assets/copy-DpWa6i2v.js">
|
|
202
202
|
<link rel="modulepreload" crossorigin href="./assets/download-BouT3__0.js">
|
|
203
|
-
<link rel="modulepreload" crossorigin href="./assets/ime-composition-
|
|
203
|
+
<link rel="modulepreload" crossorigin href="./assets/ime-composition-C6RElBur.js">
|
|
204
204
|
<link rel="modulepreload" crossorigin href="./assets/settings-2-DoBlNQMk.js">
|
|
205
205
|
<link rel="modulepreload" crossorigin href="./assets/prop-types-ZtKgQMRh.js">
|
|
206
206
|
<link rel="modulepreload" crossorigin href="./assets/hash-C4CJQURT.js">
|
|
@@ -236,55 +236,55 @@
|
|
|
236
236
|
<link rel="modulepreload" crossorigin href="./assets/single-file-mode-BxiPl4Ah.js">
|
|
237
237
|
<link rel="modulepreload" crossorigin href="./assets/constants-skills-BLHVRW90.js">
|
|
238
238
|
<link rel="modulepreload" crossorigin href="./assets/skill-scope-DlzReYLC.js">
|
|
239
|
-
<link rel="modulepreload" crossorigin href="./assets/skills-api-
|
|
240
|
-
<link rel="modulepreload" crossorigin href="./assets/storage-scope-
|
|
241
|
-
<link rel="modulepreload" crossorigin href="./assets/use-workspace-
|
|
239
|
+
<link rel="modulepreload" crossorigin href="./assets/skills-api-DPNzK8ks.js">
|
|
240
|
+
<link rel="modulepreload" crossorigin href="./assets/storage-scope-D82mTrBx.js">
|
|
241
|
+
<link rel="modulepreload" crossorigin href="./assets/use-workspace-CFQdH1aL.js">
|
|
242
242
|
<link rel="modulepreload" crossorigin href="./assets/utils-random-uuid-D7CMpgvf.js">
|
|
243
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
243
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-CYEtGh9P.js">
|
|
244
244
|
<link rel="modulepreload" crossorigin href="./assets/dist-BKgU0kag.js">
|
|
245
245
|
<link rel="modulepreload" crossorigin href="./assets/dist-d2WYntJB.js">
|
|
246
246
|
<link rel="modulepreload" crossorigin href="./assets/dist-C0nuYMFu.js">
|
|
247
247
|
<link rel="modulepreload" crossorigin href="./assets/dropdown-menu-5XqyQTVx.js">
|
|
248
|
-
<link rel="modulepreload" crossorigin href="./assets/comment-chips-
|
|
248
|
+
<link rel="modulepreload" crossorigin href="./assets/comment-chips-DvoKtv_l.js">
|
|
249
249
|
<link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-B_KOESNY.js">
|
|
250
250
|
<link rel="modulepreload" crossorigin href="./assets/tool-list-format-CS7MZY1Q.js">
|
|
251
251
|
<link rel="modulepreload" crossorigin href="./assets/acp-thread-protocol-CWbl02Jp.js">
|
|
252
252
|
<link rel="modulepreload" crossorigin href="./assets/image-attachment-BPChXLGL.js">
|
|
253
253
|
<link rel="modulepreload" crossorigin href="./assets/workspace-paths-BjilyZF6.js">
|
|
254
254
|
<link rel="modulepreload" crossorigin href="./assets/acp-tool-call-input-BvswXDFl.js">
|
|
255
|
-
<link rel="modulepreload" crossorigin href="./assets/progress-
|
|
255
|
+
<link rel="modulepreload" crossorigin href="./assets/progress-ROPletxo.js">
|
|
256
256
|
<link rel="modulepreload" crossorigin href="./assets/radio-group-G1GR05Rb.js">
|
|
257
257
|
<link rel="modulepreload" crossorigin href="./assets/separator-D7s_9ZwH.js">
|
|
258
258
|
<link rel="modulepreload" crossorigin href="./assets/toggle-group-B7p69Qfd.js">
|
|
259
259
|
<link rel="modulepreload" crossorigin href="./assets/useQuery-ZeEDLtxh.js">
|
|
260
260
|
<link rel="modulepreload" crossorigin href="./assets/markdownit-Ck6NoOTM.js">
|
|
261
|
-
<link rel="modulepreload" crossorigin href="./assets/markdown-lint-
|
|
262
|
-
<link rel="modulepreload" crossorigin href="./assets/format-
|
|
261
|
+
<link rel="modulepreload" crossorigin href="./assets/markdown-lint-BDbIoz4f.js">
|
|
262
|
+
<link rel="modulepreload" crossorigin href="./assets/format-eyy9pWAn.js">
|
|
263
263
|
<link rel="modulepreload" crossorigin href="./assets/braces--g9Mwtim.js">
|
|
264
|
-
<link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-
|
|
264
|
+
<link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-CIPMHB1z.js">
|
|
265
265
|
<link rel="modulepreload" crossorigin href="./assets/grip-vertical-DNbkgWZL.js">
|
|
266
|
-
<link rel="modulepreload" crossorigin href="./assets/SkillCostValue-
|
|
266
|
+
<link rel="modulepreload" crossorigin href="./assets/SkillCostValue-DDhTa5Kn.js">
|
|
267
267
|
<link rel="modulepreload" crossorigin href="./assets/textarea-DYYN2PV4.js">
|
|
268
|
-
<link rel="modulepreload" crossorigin href="./assets/selection-context-
|
|
269
|
-
<link rel="modulepreload" crossorigin href="./assets/lint-config-client-
|
|
270
|
-
<link rel="modulepreload" crossorigin href="./assets/use-skills-
|
|
271
|
-
<link rel="modulepreload" crossorigin href="./assets/folder-config-api-
|
|
272
|
-
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-
|
|
268
|
+
<link rel="modulepreload" crossorigin href="./assets/selection-context-Df0KmJCv.js">
|
|
269
|
+
<link rel="modulepreload" crossorigin href="./assets/lint-config-client-CkU0vqu3.js">
|
|
270
|
+
<link rel="modulepreload" crossorigin href="./assets/use-skills-BxAjFPL9.js">
|
|
271
|
+
<link rel="modulepreload" crossorigin href="./assets/folder-config-api-oMYXBtrq.js">
|
|
272
|
+
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-CzDNg07Y.js">
|
|
273
273
|
<link rel="modulepreload" crossorigin href="./assets/arrow-up-right-nJaICi16.js">
|
|
274
274
|
<link rel="modulepreload" crossorigin href="./assets/git-merge-VDBzSZBV.js">
|
|
275
275
|
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-CC7UZEnZ.js">
|
|
276
276
|
<link rel="modulepreload" crossorigin href="./assets/terminal-Cpb4l1oH.js">
|
|
277
277
|
<link rel="modulepreload" crossorigin href="./assets/DisclosureWarning-CYHeueUe.js">
|
|
278
|
-
<link rel="modulepreload" crossorigin href="./assets/handoff-
|
|
279
|
-
<link rel="modulepreload" crossorigin href="./assets/terminal-command-events-
|
|
280
|
-
<link rel="modulepreload" crossorigin href="./assets/use-conflicts-
|
|
278
|
+
<link rel="modulepreload" crossorigin href="./assets/handoff-BDTTOcb6.js">
|
|
279
|
+
<link rel="modulepreload" crossorigin href="./assets/terminal-command-events-DEYKqKZt.js">
|
|
280
|
+
<link rel="modulepreload" crossorigin href="./assets/use-conflicts-2mx0_ZrI.js">
|
|
281
281
|
<link rel="modulepreload" crossorigin href="./assets/use-git-sync-status-PkMYmN4D.js">
|
|
282
282
|
<link rel="modulepreload" crossorigin href="./assets/keyboard-shortcuts-FtScAm_I.js">
|
|
283
283
|
<link rel="modulepreload" crossorigin href="./assets/use-settings-route-Bj-m9X61.js">
|
|
284
|
-
<link rel="modulepreload" crossorigin href="./assets/SyncStatusBadge-
|
|
284
|
+
<link rel="modulepreload" crossorigin href="./assets/SyncStatusBadge-Cj83WuBK.js">
|
|
285
285
|
<link rel="modulepreload" crossorigin href="./assets/cursor-DWbF35K0.js">
|
|
286
|
-
<link rel="modulepreload" crossorigin href="./assets/agent-registry-
|
|
287
|
-
<link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon-
|
|
286
|
+
<link rel="modulepreload" crossorigin href="./assets/agent-registry-Dw7Mum0u.js">
|
|
287
|
+
<link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon-Bq2z3oRf.js">
|
|
288
288
|
<link rel="modulepreload" crossorigin href="./assets/file-plus-DKxOZh2k.js">
|
|
289
289
|
<link rel="modulepreload" crossorigin href="./assets/list-plus-CYMJBvrm.js">
|
|
290
290
|
<link rel="modulepreload" crossorigin href="./assets/folder-QqUoFRPR.js">
|
|
@@ -295,71 +295,71 @@
|
|
|
295
295
|
<link rel="modulepreload" crossorigin href="./assets/ChangedOutsideBadge-BfH3veLO.js">
|
|
296
296
|
<link rel="modulepreload" crossorigin href="./assets/dist-BzicVdNV.js">
|
|
297
297
|
<link rel="modulepreload" crossorigin href="./assets/context-menu-DSlq1GYo.js">
|
|
298
|
-
<link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-
|
|
299
|
-
<link rel="modulepreload" crossorigin href="./assets/DeleteConfirmationDialog-
|
|
298
|
+
<link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-f08QXFO6.js">
|
|
299
|
+
<link rel="modulepreload" crossorigin href="./assets/DeleteConfirmationDialog-BsTU-OWm.js">
|
|
300
300
|
<link rel="modulepreload" crossorigin href="./assets/monitor-IXzxTnmk.js">
|
|
301
301
|
<link rel="modulepreload" crossorigin href="./assets/field-DFJgKWGh.js">
|
|
302
|
-
<link rel="modulepreload" crossorigin href="./assets/agent-connections-
|
|
302
|
+
<link rel="modulepreload" crossorigin href="./assets/agent-connections-DOlRC9J4.js">
|
|
303
303
|
<link rel="modulepreload" crossorigin href="./assets/bool-pref-CqB9j4bL.js">
|
|
304
|
-
<link rel="modulepreload" crossorigin href="./assets/TerminalLaunchContext-
|
|
304
|
+
<link rel="modulepreload" crossorigin href="./assets/TerminalLaunchContext-CGtoVZtX.js">
|
|
305
305
|
<link rel="modulepreload" crossorigin href="./assets/agent-launcher-labels-WHKiZE2H.js">
|
|
306
|
-
<link rel="modulepreload" crossorigin href="./assets/terminal-cli-display-
|
|
306
|
+
<link rel="modulepreload" crossorigin href="./assets/terminal-cli-display-B__FxqFM.js">
|
|
307
307
|
<link rel="modulepreload" crossorigin href="./assets/open-managed-artifact-tab-Bt4fZblC.js">
|
|
308
|
-
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-
|
|
308
|
+
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-CRn4rlJ-.js">
|
|
309
309
|
<link rel="modulepreload" crossorigin href="./assets/platform-labels-CC-o2Aps.js">
|
|
310
310
|
<link rel="modulepreload" crossorigin href="./assets/clipboard-adapter-BzEuR0hT.js">
|
|
311
|
-
<link rel="modulepreload" crossorigin href="./assets/AddPropertiesButton-
|
|
311
|
+
<link rel="modulepreload" crossorigin href="./assets/AddPropertiesButton-CvP0prMu.js">
|
|
312
312
|
<link rel="modulepreload" crossorigin href="./assets/case-sensitive-DIxypOE0.js">
|
|
313
313
|
<link rel="modulepreload" crossorigin href="./assets/chevron-left-C5T97PNU.js">
|
|
314
314
|
<link rel="modulepreload" crossorigin href="./assets/lint-plugin-meta-CtDE2R0v.js">
|
|
315
315
|
<link rel="modulepreload" crossorigin href="./assets/wrench-DqFwoSdV.js">
|
|
316
316
|
<link rel="modulepreload" crossorigin href="./assets/panel-dxdTyKXc.js">
|
|
317
|
-
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-
|
|
317
|
+
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-B6bKsypc.js">
|
|
318
318
|
<link rel="modulepreload" crossorigin href="./assets/miss-dialog-store-CsiJb9Ou.js">
|
|
319
|
-
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-
|
|
319
|
+
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-Dd1br4ja.js">
|
|
320
320
|
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-Bh2lFZbu.js">
|
|
321
|
-
<link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-
|
|
321
|
+
<link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-Bg7uGfvu.js">
|
|
322
322
|
<link rel="modulepreload" crossorigin href="./assets/contact-email-store-K5cpIvvi.js">
|
|
323
323
|
<link rel="modulepreload" crossorigin href="./assets/bug-report-send-manager-BAnvVPby.js">
|
|
324
324
|
<link rel="modulepreload" crossorigin href="./assets/InstallInClaudeDesktopDialog-RH9RYFyV.js">
|
|
325
325
|
<link rel="modulepreload" crossorigin href="./assets/package-PkCmIx3S.js">
|
|
326
326
|
<link rel="modulepreload" crossorigin href="./assets/overlay-layers-CKMAjef3.js">
|
|
327
|
-
<link rel="modulepreload" crossorigin href="./assets/preferred-session-events-
|
|
327
|
+
<link rel="modulepreload" crossorigin href="./assets/preferred-session-events-XveQLNcI.js">
|
|
328
328
|
<link rel="modulepreload" crossorigin href="./assets/panel-right-open-BSU2gtLb.js">
|
|
329
329
|
<link rel="modulepreload" crossorigin href="./assets/rotate-ccw-Zi1IjIg9.js">
|
|
330
330
|
<link rel="modulepreload" crossorigin href="./assets/square-pen-BoydeSu6.js">
|
|
331
331
|
<link rel="modulepreload" crossorigin href="./assets/undo-2-xEF_s_Io.js">
|
|
332
332
|
<link rel="modulepreload" crossorigin href="./assets/form-U6OjlA0v.js">
|
|
333
|
-
<link rel="modulepreload" crossorigin href="./assets/AuthModal-
|
|
333
|
+
<link rel="modulepreload" crossorigin href="./assets/AuthModal-BF2Z7OJL.js">
|
|
334
334
|
<link rel="modulepreload" crossorigin href="./assets/dist-B1oPuPz8.js">
|
|
335
335
|
<link rel="modulepreload" crossorigin href="./assets/dist-8cadZTcN.js">
|
|
336
336
|
<link rel="modulepreload" crossorigin href="./assets/text-viewer-languages-CKtwqOI2.js">
|
|
337
|
-
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-
|
|
337
|
+
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-DpVPuW6o.js">
|
|
338
338
|
<link rel="modulepreload" crossorigin href="./assets/ImageAttachments-oSzqgO9z.js">
|
|
339
|
-
<link rel="modulepreload" crossorigin href="./assets/TemplateRow-
|
|
339
|
+
<link rel="modulepreload" crossorigin href="./assets/TemplateRow-B1g-a4Pw.js">
|
|
340
340
|
<link rel="modulepreload" crossorigin href="./assets/ConfigSharingInfoTooltip-DySl2X4f.js">
|
|
341
341
|
<link rel="modulepreload" crossorigin href="./assets/RowDisclosure-BIxlyswE.js">
|
|
342
342
|
<link rel="modulepreload" crossorigin href="./assets/project-paths-DtCPeXsO.js">
|
|
343
|
-
<link rel="modulepreload" crossorigin href="./assets/PublishToGitHubDialog-
|
|
343
|
+
<link rel="modulepreload" crossorigin href="./assets/PublishToGitHubDialog-BSewRvqe.js">
|
|
344
344
|
<link rel="modulepreload" crossorigin href="./assets/use-installed-clis-D3LjLTuG.js">
|
|
345
345
|
<link rel="modulepreload" crossorigin href="./assets/ReportBugMenuTrigger-xHppTUcT.js">
|
|
346
|
-
<link rel="modulepreload" crossorigin href="./assets/SkillModeBanner-
|
|
347
|
-
<link rel="modulepreload" crossorigin href="./assets/use-skill-targets-
|
|
348
|
-
<link rel="modulepreload" crossorigin href="./assets/SkillPluginBundleDialog-
|
|
346
|
+
<link rel="modulepreload" crossorigin href="./assets/SkillModeBanner-DJo427go.js">
|
|
347
|
+
<link rel="modulepreload" crossorigin href="./assets/use-skill-targets-DuCl3F30.js">
|
|
348
|
+
<link rel="modulepreload" crossorigin href="./assets/SkillPluginBundleDialog-AajGslYO.js">
|
|
349
349
|
<link rel="modulepreload" crossorigin href="./assets/app-menubar-gate-BY-AgMO4.js">
|
|
350
|
-
<link rel="modulepreload" crossorigin href="./assets/use-semantic-search-status-
|
|
350
|
+
<link rel="modulepreload" crossorigin href="./assets/use-semantic-search-status-DdF3HjO-.js">
|
|
351
351
|
<link rel="modulepreload" crossorigin href="./assets/agent-diff-store-B_PHpjoM.js">
|
|
352
352
|
<link rel="modulepreload" crossorigin href="./assets/ok-BY7he6h3.js">
|
|
353
353
|
<link rel="modulepreload" crossorigin href="./assets/config-ignore-nested-error-events-DvR3WEey.js">
|
|
354
354
|
<link rel="modulepreload" crossorigin href="./assets/settings-fields-CAtLOUgy.js">
|
|
355
355
|
<link rel="modulepreload" crossorigin href="./assets/settings-host-gates-DEfVpJcs.js">
|
|
356
|
-
<link rel="modulepreload" crossorigin href="./assets/settings-section-labels-
|
|
357
|
-
<link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-
|
|
358
|
-
<link rel="modulepreload" crossorigin href="./assets/alert-
|
|
356
|
+
<link rel="modulepreload" crossorigin href="./assets/settings-section-labels-DX7VF2VJ.js">
|
|
357
|
+
<link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-BD2co7eQ.js">
|
|
358
|
+
<link rel="modulepreload" crossorigin href="./assets/alert-Bb4K23ol.js">
|
|
359
359
|
<link rel="modulepreload" crossorigin href="./assets/input-group-xi315pKE.js">
|
|
360
|
-
<link rel="modulepreload" crossorigin href="./assets/use-skill-origin-
|
|
361
|
-
<link rel="modulepreload" crossorigin href="./assets/use-terminal-enabled-
|
|
362
|
-
<link rel="modulepreload" crossorigin href="./assets/catalog-
|
|
360
|
+
<link rel="modulepreload" crossorigin href="./assets/use-skill-origin-DKeppfSH.js">
|
|
361
|
+
<link rel="modulepreload" crossorigin href="./assets/use-terminal-enabled-CGbqSTTh.js">
|
|
362
|
+
<link rel="modulepreload" crossorigin href="./assets/catalog-BNmmHvVJ.js">
|
|
363
363
|
<link rel="modulepreload" crossorigin href="./assets/agent-presence-DttIZzMw.js">
|
|
364
364
|
<link rel="modulepreload" crossorigin href="./assets/auth-prompt-store-C_-QXZFC.js">
|
|
365
365
|
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-Bx6C01Jt.js">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
script above.
|
|
28
28
|
-->
|
|
29
29
|
<style>html { background-color: #fafafa } html.dark { background-color: #151515 }</style>
|
|
30
|
-
<script type="module" crossorigin src="./assets/uninstall-
|
|
30
|
+
<script type="module" crossorigin src="./assets/uninstall-DizefbDX.js"></script>
|
|
31
31
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
32
32
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
33
33
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
<link rel="modulepreload" crossorigin href="./assets/textarea-DYYN2PV4.js">
|
|
59
59
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-Chd9yIcd.js">
|
|
60
60
|
<link rel="modulepreload" crossorigin href="./assets/dist-BGzUo_18.js">
|
|
61
|
-
<link rel="modulepreload" crossorigin href="./assets/messages
|
|
62
|
-
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-
|
|
61
|
+
<link rel="modulepreload" crossorigin href="./assets/messages--ehzGEyL.js">
|
|
62
|
+
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-language-CbiUoguW.js">
|
|
63
63
|
<link rel="stylesheet" crossorigin href="./assets/globals-Bwyn_Aih.css">
|
|
64
64
|
</head>
|
|
65
65
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{
|
|
2
|
-
`),H(()=>t?.onBackendSelected?.({backend:`keyring`})),new qe(new Ke(t?.onKeychainRead),new U(e))}catch(n){let r=n instanceof Error?`${n.name}: ${n.message}`:String(n);return process.stderr.write(`[auth] token storage: file (${B()}) — OS keychain unavailable: ${r}\n`),H(()=>t?.onBackendSelected?.({backend:`file`,reason:r})),new U(e)}}function Ye(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 (${B()})\n`),r(new U(e))},n)});try{return await Promise.race([Je(e),r])}catch{return new U(e)}finally{t!==null&&clearTimeout(t)}})(),t}}function Xe(e){let t=Ye(e);return{async get(e){let n=await(await t()).get(e);return n===null?null:{token:n.token,login:n.login}}}}function Ze(e){let t=Ye(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 Qe(e,t){let n=[],r=new U(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(V(),`__probe__`);let r,a=await new Ke(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(V(),e).deletePassword(),n.push(`keychain`)}catch(e){i=e instanceof Error?e.name:`delete-error`}}catch{}return{touched:n,keychainError:i}}function $e(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function et(e){let t=e?.code;return t===`ENOENT`||t===`EACCES`||t===`EPERM`?{ok:!1,reason:`not-installed`}:{ok:!1,reason:`spawn-error`}}function tt(e){return b({detached:!0,stdio:`ignore`,shell:!1,env:$e(e)})}function nt(e,t,n={}){let r=(n.spawn??je)(e,[...t],tt(n.env??process.env));return r.unref(),r}function rt(e,t,n={}){let r=n.spawn??je,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],tt(n.env??process.env));i.once(`error`,e=>{clearTimeout(c),s(et(e))}),i.once(`spawn`,()=>{clearTimeout(c),s({ok:!0})});try{i.unref()}catch{}}catch(e){clearTimeout(c),s(et(e))}})}const it=o.stable.appId,W=g,at=[`stable`,`beta`];function ot(e,t,n=e=>console.error(e)){try{return i(e,t)}catch(r){let o=i({...e,[a]:void 0},t);return n(`Treating this CLI as ${s(o)} for this command: ${r instanceof Error?r.message:String(r)}`),o}}function G(e){return at.includes(e)||!W.includes(e)?at:[e,...at]}function st(e){return e.bundlePath===void 0?null:{bundlePath:e.bundlePath,protocolScheme:o[e.product].protocolScheme}}function ct(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return R(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function lt(e,t){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let n=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(n?.[1]){let e=n[1];return{path:e,product:W.find(t=>e.endsWith(`/${o[t].productName}.app`))??t}}}let n=e.homeDir??z();for(let r of G(t)){let{productName:t}=o[r];for(let i of[A(n,`Applications`),`/Applications`]){let n=A(i,`${t}.app`);if(ut(e,A(n,`Contents`,`MacOS`,t)))return{path:n,product:r}}}return null}function ut(e,t){try{let n=e.statSync(t);return n?typeof n.isFile==`function`&&n.isFile():!1}catch{return!1}}function dt(e,t){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=W.find(t=>e.execPath.toLowerCase().endsWith(`\\${c(o[t]).toLowerCase()}`));if(t)return{path:e.execPath,product:t}}let n=e.env.LOCALAPPDATA;if(n)for(let r of G(t))for(let t of u(o[r])){let i=Me.join(n,`Programs`,t,c(o[r]));if(ut(e,i))return{path:i,product:r}}return null}function ft(e,t){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=W.find(t=>e.execPath.endsWith(`/${o[t].linuxExecutableName}`));if(t)return{path:e.execPath,product:t}}for(let n of G(t)){let{productName:t,linuxExecutableName:r}=o[n],i=`/opt/${t}/${r}`;if(ut(e,i))return{path:i,product:n}}return null}function pt(e){let t=ot(e.env,e.execPath,e.warn);if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`,cliProduct:t};if(e.platform!==`darwin`&&e.platform!==`win32`&&e.platform!==`linux`)return{available:!1,reason:`unsupported-platform`,cliProduct:t};let n;try{n=e.platform===`darwin`?lt(e,t):e.platform===`win32`?dt(e,t):ft(e,t)}catch{return{available:!1,reason:`stat-error`,cliProduct:t}}if(!n)return{available:!1,reason:`no-bundle`,cliProduct:t};let r={bundlePath:n.path,product:n.product,cliProduct:t};return e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,...r}:!(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`,...r}:{available:!0,reason:`available`,...r}}function mt(e,t){let n=e.log??(e=>console.error(e)),r=e.platform??process.platform;if(t.bundlePath===void 0){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}let{productName:i}=o[t.product],[a]=o[t.cliProduct].cliCommandNames;n(`Launching ${i} desktop (use \`${a} start\` for the browser server, or \`OK_FORCE_BROWSER=1\` to always skip)`);let s=t.bundlePath;if(r===`darwin`){nt(`open`,[`-a`,s],{spawn:e.spawn});return}nt(s,[],{spawn:e.spawn})}function ht(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 K(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 gt(e){return Re(`sha256`).update(e).digest(`hex`)}function q(e){return A(S(j(e)),`pi-trust`)}function _t(e,t){return A(q(e),gt(j(t)))}function vt(e,t,n){return A(_t(e,t),`${gt(n)}.json`)}var J=class extends Error{constructor(e,t,n,r){super(`Pi trust receipt at ${K(e)} ${K(t)}; ${K(n)}`,{cause:r}),this.name=`PiTrustReceiptError`}};function Y(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 J(e,`could not ${t}: ${i}`,a,n)}function X(e){let t;try{t=P(e)}catch(t){if(t.code===`ENOENT`)return!1;throw Y(e,`be inspected`,t)}if(!t.isDirectory())throw new J(e,`is not a regular directory`,`restore the intended receipt directory without a symlink, then retry`);return!0}function yt(e,t){return Object.keys(e).length===t.length&&t.every(t=>Object.hasOwn(e,t))}function bt(e,t){if(!ke(e)||!yt(e,[`version`,`cwd`,`configuredTrustPath`,`canonicalTrustPath`,`state`,`previous`])||e.version!==1||typeof e.cwd!=`string`||e.cwd!==j(e.cwd)||typeof e.configuredTrustPath!=`string`||e.configuredTrustPath!==j(e.configuredTrustPath)||typeof e.canonicalTrustPath!=`string`||e.canonicalTrustPath!==j(e.canonicalTrustPath)||e.state!==`pending`&&e.state!==`committed`||!ke(e.previous))throw new J(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&&yt(e.previous,[`present`]))n={present:!1};else if(e.previous.present===!0&&yt(e.previous,[`present`,`value`]))n={present:!0,value:e.previous.value};else throw new J(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 xt(e,t,n){let r;try{r=P(n)}catch(e){throw Y(n,`be inspected`,e)}if(!r.isFile())throw new J(n,`is not a regular file`,`restore the intended receipt as a regular file without a symlink, then retry`);let i;try{i=F(n,`utf8`)}catch(e){throw Y(n,`be read`,e)}let a;try{a=JSON.parse(i)}catch(e){throw new J(n,`is not valid JSON`,`repair its JSON syntax without changing the recorded decision, then retry`,e)}let o=bt(a,n);if(o.cwd!==j(t)||n!==vt(e,t,o.canonicalTrustPath))throw new J(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 St(e,t){let{record:n,path:r}=t;for(let t of[q(e),_t(e,n.cwd)])if(!X(t))throw new J(t,`no longer exists`,`restore access to the expected receipt directory, then retry`);let i=xt(e,n.cwd,r);if(!ze(i.record,n))throw new J(r,`changed while its trust decision was being updated`,`retry to read its current ownership record`);return i}function Ct(e,t,n,r,i){let a={version:1,cwd:j(t),configuredTrustPath:j(n),canonicalTrustPath:j(r),state:`pending`,previous:i},o=vt(e,a.cwd,a.canonicalTrustPath),s=`${JSON.stringify(a,null,2)}\n`;if(!ze(bt(JSON.parse(s),o),a))throw new J(o,`cannot preserve the previous decision as JSON`,`provide the original decision as a JSON value before retrying`);X(q(e)),X(k(o));try{Pe(k(o),{recursive:!0,mode:448})}catch(e){throw Y(k(o),`be created`,e)}let c;try{c=P(o,{throwIfNoEntry:!1})}catch(e){throw Y(o,`be inspected`,e)}if(c)throw new J(o,`already exists`,`reconcile the existing ownership record before recording another grant`);try{w(o,s,{mode:384})}catch(e){throw Y(o,`be written`,e)}return{path:o,record:a}}function wt(e,t){let n=St(e,t);if(n.record.state!==`pending`)throw new J(n.path,`is already committed`,`use the current ownership record without committing it again`);let r={...n.record,state:`committed`};try{w(n.path,`${JSON.stringify(r,null,2)}\n`,{mode:384})}catch(e){throw Y(n.path,`be committed`,e)}return{path:n.path,record:r}}function Z(e,t){if(!X(q(e)))return[];let n=_t(e,t);if(!X(n))return[];let r;try{r=I(n).sort()}catch(e){throw Y(n,`be listed`,e)}return r.filter(e=>/^[a-f0-9]{64}\.json$/.test(e)).map(r=>xt(e,t,A(n,r)))}function Tt(e,t){let n=St(e,t);try{Le(n.path)}catch(e){throw Y(n.path,`be removed after reconciling its grant`,e)}for(let t of[k(n.path),q(e)])try{Ie(t)}catch(e){let n=e.code;if(n!==`ENOTEMPTY`&&n!==`EEXIST`&&n!==`ENOENT`)throw Y(t,`be removed after reconciling its grant`,e)}}var Et=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`)}}})),Dt=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())}}})),Ot=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}})),kt=n(((t,n)=>{var r=e(`fs`),i=Et(),a=Dt(),o=Ot(),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=S,e.createWriteStream=re;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;w(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;w(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function S(t,n){return new e.ReadStream(t,n)}function re(t,n){return new e.WriteStream(t,n)}var C=e.open;e.open=w;function w(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 C(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))}}})),At=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}})),jt=n((e=>{var t=At();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}}})),Mt=n(((e,t)=>{t.exports=jt()})),Nt=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`)})),Pt=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=Nt(),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)}}})),Ft=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})),It=n(((t,n)=>{let r=e(`path`),i=kt(),a=Mt(),o=Pt(),s=Ft(),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})),Lt=n(((e,t)=>{let n=kt();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}})),Rt=t(n(((e,t)=>{let n=It(),{toPromise:r,toSync:i,toSyncOptions:a}=Lt();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 zt=5e3;function Bt(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 ${zt}ms`,{cause:e}),{code:`ELOCKED`});return Math.min(25,r)}function Vt(e,t){Ue()?.warn(t,e)}function Ht(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 Ut(e,t,n){await x(`${t}.ok.lock`,async()=>{let t=performance.now()+zt,r;for(;;)try{r=await Rt.default.lock(k(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){await Be(Bt(n,t,e))}let i=[];try{n()}catch(e){i.push(e)}finally{try{await r()}catch(e){i.push(e)}}Ht(i,e)},{onWarn:Vt})}function Wt(e,t,n){ae(`${t}.ok.lock`,()=>{let t=performance.now()+zt,r=new Int32Array(new SharedArrayBuffer(4)),i;for(;;)try{i=Rt.default.lockSync(k(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){Atomics.wait(r,0,0,Bt(n,t,e))}let a=[];try{n()}catch(e){a.push(e)}finally{try{i()}catch(e){a.push(e)}}Ht(a,e)},{onWarn:Vt})}const Gt=[`settings.json`,`prompts`,`themes`,`SYSTEM.md`,`APPEND_SYSTEM.md`];var Kt=class extends Error{name=`PiResourceInspectionError`};function qt(e){let t;try{t=P(e)}catch(e){if(e.code===`ENOENT`)return!1;throw e}let n;try{n=R(e)}catch(e){throw t.isSymbolicLink()&&e.code===`ENOENT`?new Kt(le(`missing-symlink-target`),{cause:e}):e}return Ne(e,M.R_OK|(n.isDirectory()?M.X_OK:0)),!0}function Jt(e){return e===`open-knowledge`||e.startsWith(`open-knowledge-`)}function Yt(e,t,n){let r=e;try{let i=L(e),a;r=t;try{a=L(t)}catch(e){if(e.code!==`ENOENT`)throw e;a=j(t)}let o=A(a,`.agents`,`skills`),s=[];for(let e of Gt)r=A(i,`.pi`,e),qt(r)&&s.push(r);if(r=A(i,`.pi`,`extensions`),qt(r))for(let t of I(r).sort()){let i=A(r,t);j(n)!==A(j(e),`.pi`,`extensions`,t)&&s.push(i)}for(let e of[A(i,`.pi`,`skills`),A(i,`.agents`,`skills`)])if(e!==o&&(r=e,qt(e)))for(let t of I(e).sort())Jt(t)||s.push(A(e,t));let c=k(i);for(;c!==i;){r=A(c,`.agents`,`skills`),r!==o&&qt(r)&&s.push(r);let e=k(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 ${K(r)}: ${e instanceof Kt?e.message:le(T(e))}`}}}function Xt(e,t,n){let r=j(e),i=be({home:t,env:n??(t===void 0?process.env:{})});return{cwd:r,bridgePath:E.pi.projectConfigPath(r),trustPath:A(i,`trust.json`)}}function Zt(e){try{let t=L(e);return R(t).isDirectory()?(Ne(t,M.X_OK),{kind:`ready`,project:{path:e,canonical:t}}):{kind:`refused`,error:`Pi project path ${K(e)} is not a directory; restore the intended project directory, then retry`}}catch(t){return{kind:`refused`,error:`Pi project directory ${K(e)} could not be resolved or accessed: ${K(t instanceof Error?t.message:String(t))}; restore the directory or symlink and check its permissions, then retry`}}}function Qt(e){let t=Zt(e.path);if(t.kind===`refused`)return t.error;if(t.project.canonical!==e.canonical)return`Pi project path ${K(e.path)} changed while waiting for its trust lock; restore the intended project location, then retry`}function $t(e,t,n){let r=Te(E.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 ve(i)?{state:`own-current`,text:a}:se(i)?{state:`own-stale`,text:a}:{state:`foreign`,text:a}}function en(e,t){let n;try{n=F(e.path,`utf-8`)}catch(t){let n=t.code;return e.kind===`missing`&&n===`ENOENT`?{state:`untrusted`,entries:{},trailingNewline:!1}:{state:`unreadable`,reason:T(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 ke(r)?{state:r[t]===!0?`trusted`:`untrusted`,entries:r,trailingNewline:n.endsWith(`
|
|
4
|
-
`)}:{state:`unreadable`,reason:`invalid-json`}}function tn(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
|
|
1
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Ed as r,Hf as i,If as a,Nf as o,Pf as s,Uf as c,Wf as l,Xa as u,Xc as d,gf as f,od as p,qf as m,tl as h,vf as g,xf as _,yf as v,zf as y}from"./md-manager-BGnqyqi1-CU8xHS4D.mjs";import{Aa as ee,Ss as b,Uo as te,Vn as x,gr as ne,gs as S,is as re,m as C,ms as w,tr as ie,xs as ae}from"./dist-Be8q4E8P.mjs";import{A as oe,B as se,E as ce,F as le,M as ue,N as T,S as de,T as fe,Y as pe,Z as E,at as me,b as he,et as ge,f as _e,ft as ve,it as ye,j as be,k as D,lt as xe,nt as Se,ot as Ce,p as we,rt as Te,s as Ee,ut as De,y as Oe}from"./init-CAX7eVNx.mjs";import{t as ke}from"./is-object-BGze3w87.mjs";import{t as Ae}from"./removal-file-path-DBusekL7.mjs";import{spawn as je}from"node:child_process";import{basename as O,dirname as k,join as A,resolve as j,win32 as Me}from"node:path";import{accessSync as Ne,constants as M,existsSync as N,lstatSync as P,mkdirSync as Pe,readFileSync as F,readdirSync as I,realpathSync as L,rmSync as Fe,rmdirSync as Ie,statSync as R,unlinkSync as Le}from"node:fs";import{homedir as z}from"node:os";import{createHash as Re}from"node:crypto";import{isDeepStrictEqual as ze}from"node:util";import{setTimeout as Be}from"node:timers/promises";var Ve=p();let He;function Ue(){return He}function We(e,t){if(t!==void 0&&t.length>0)return t;try{return ne(e)?.rootPath}catch{return}}function Ge(e){let t=We(e.cwd,e.configuredProjectName),n=x({name:`cli`,project:t});return He=n,n.info({command:e.command,cwd:e.cwd,project:t},`cli command started`),n}function B(){return h(d)}function V(){return y().keyringService}function H(e){try{e()}catch{}}var Ke=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(V(),e).getPassword()}catch(t){return H(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return H(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return H(()=>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(V(),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(V(),e).deletePassword()}catch{}}},U=class{backend=`file`;authFile;constructor(e){this.authFile=e??A(S(),`auth.yml`)}read(){if(!N(this.authFile))return{};try{let e=F(this.authFile,`utf-8`);return(0,Ve.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=k(this.authFile);N(t)||Pe(t,{recursive:!0,mode:448}),w(this.authFile,(0,Ve.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)}},qe=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 ${B()} 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 Je(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(V(),`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
|
|
2
|
+
`),H(()=>t?.onBackendSelected?.({backend:`keyring`})),new qe(new Ke(t?.onKeychainRead),new U(e))}catch(n){let r=n instanceof Error?`${n.name}: ${n.message}`:String(n);return process.stderr.write(`[auth] token storage: file (${B()}) — OS keychain unavailable: ${r}\n`),H(()=>t?.onBackendSelected?.({backend:`file`,reason:r})),new U(e)}}function Ye(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 (${B()})\n`),r(new U(e))},n)});try{return await Promise.race([Je(e),r])}catch{return new U(e)}finally{t!==null&&clearTimeout(t)}})(),t}}function Xe(e){let t=Ye(e);return{async get(e){let n=await(await t()).get(e);return n===null?null:{token:n.token,login:n.login}}}}function Ze(e){let t=Ye(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 Qe(e,t){let n=[],r=new U(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(V(),`__probe__`);let r,a=await new Ke(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(V(),e).deletePassword(),n.push(`keychain`)}catch(e){i=e instanceof Error?e.name:`delete-error`}}catch{}return{touched:n,keychainError:i}}function $e(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function et(e){let t=e?.code;return t===`ENOENT`||t===`EACCES`||t===`EPERM`?{ok:!1,reason:`not-installed`}:{ok:!1,reason:`spawn-error`}}function tt(e){return te({detached:!0,stdio:`ignore`,shell:!1,env:$e(e)})}function nt(e,t,n={}){let r=(n.spawn??je)(e,[...t],tt(n.env??process.env));return r.unref(),r}function rt(e,t,n={}){let r=n.spawn??je,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],tt(n.env??process.env));i.once(`error`,e=>{clearTimeout(c),s(et(e))}),i.once(`spawn`,()=>{clearTimeout(c),s({ok:!0})});try{i.unref()}catch{}}catch(e){clearTimeout(c),s(et(e))}})}const it=o.stable.appId,W=a,at=[`stable`,`beta`];function ot(e,t,n=e=>console.error(e)){try{return m(e,t)}catch(r){let a=m({...e,[s]:void 0},t);return n(`Treating this CLI as ${i(a)} for this command: ${r instanceof Error?r.message:String(r)}`),a}}function G(e){return at.includes(e)||!W.includes(e)?at:[e,...at]}function st(e){return e.bundlePath===void 0?null:{bundlePath:e.bundlePath,protocolScheme:o[e.product].protocolScheme}}function ct(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return R(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function lt(e,t){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let n=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(n?.[1]){let e=n[1];return{path:e,product:W.find(t=>e.endsWith(`/${o[t].productName}.app`))??t}}}let n=e.homeDir??z();for(let r of G(t)){let{productName:t}=o[r];for(let i of[A(n,`Applications`),`/Applications`]){let n=A(i,`${t}.app`);if(ut(e,A(n,`Contents`,`MacOS`,t)))return{path:n,product:r}}}return null}function ut(e,t){try{let n=e.statSync(t);return n?typeof n.isFile==`function`&&n.isFile():!1}catch{return!1}}function dt(e,t){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=W.find(t=>e.execPath.toLowerCase().endsWith(`\\${c(o[t]).toLowerCase()}`));if(t)return{path:e.execPath,product:t}}let n=e.env.LOCALAPPDATA;if(n)for(let r of G(t))for(let t of l(o[r])){let i=Me.join(n,`Programs`,t,c(o[r]));if(ut(e,i))return{path:i,product:r}}return null}function ft(e,t){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=W.find(t=>e.execPath.endsWith(`/${o[t].linuxExecutableName}`));if(t)return{path:e.execPath,product:t}}for(let n of G(t)){let{productName:t,linuxExecutableName:r}=o[n],i=`/opt/${t}/${r}`;if(ut(e,i))return{path:i,product:n}}return null}function pt(e){let t=ot(e.env,e.execPath,e.warn);if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`,cliProduct:t};if(e.platform!==`darwin`&&e.platform!==`win32`&&e.platform!==`linux`)return{available:!1,reason:`unsupported-platform`,cliProduct:t};let n;try{n=e.platform===`darwin`?lt(e,t):e.platform===`win32`?dt(e,t):ft(e,t)}catch{return{available:!1,reason:`stat-error`,cliProduct:t}}if(!n)return{available:!1,reason:`no-bundle`,cliProduct:t};let r={bundlePath:n.path,product:n.product,cliProduct:t};return e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,...r}:!(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`,...r}:{available:!0,reason:`available`,...r}}function mt(e,t){let n=e.log??(e=>console.error(e)),r=e.platform??process.platform;if(t.bundlePath===void 0){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}let{productName:i}=o[t.product],[a]=o[t.cliProduct].cliCommandNames;n(`Launching ${i} desktop (use \`${a} start\` for the browser server, or \`OK_FORCE_BROWSER=1\` to always skip)`);let s=t.bundlePath;if(r===`darwin`){nt(`open`,[`-a`,s],{spawn:e.spawn});return}nt(s,[],{spawn:e.spawn})}function ht(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 K(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 gt(e){return Re(`sha256`).update(e).digest(`hex`)}function q(e){return A(S(j(e)),`pi-trust`)}function _t(e,t){return A(q(e),gt(j(t)))}function vt(e,t,n){return A(_t(e,t),`${gt(n)}.json`)}var J=class extends Error{constructor(e,t,n,r){super(`Pi trust receipt at ${K(e)} ${K(t)}; ${K(n)}`,{cause:r}),this.name=`PiTrustReceiptError`}};function Y(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 J(e,`could not ${t}: ${i}`,a,n)}function X(e){let t;try{t=P(e)}catch(t){if(t.code===`ENOENT`)return!1;throw Y(e,`be inspected`,t)}if(!t.isDirectory())throw new J(e,`is not a regular directory`,`restore the intended receipt directory without a symlink, then retry`);return!0}function yt(e,t){return Object.keys(e).length===t.length&&t.every(t=>Object.hasOwn(e,t))}function bt(e,t){if(!ke(e)||!yt(e,[`version`,`cwd`,`configuredTrustPath`,`canonicalTrustPath`,`state`,`previous`])||e.version!==1||typeof e.cwd!=`string`||e.cwd!==j(e.cwd)||typeof e.configuredTrustPath!=`string`||e.configuredTrustPath!==j(e.configuredTrustPath)||typeof e.canonicalTrustPath!=`string`||e.canonicalTrustPath!==j(e.canonicalTrustPath)||e.state!==`pending`&&e.state!==`committed`||!ke(e.previous))throw new J(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&&yt(e.previous,[`present`]))n={present:!1};else if(e.previous.present===!0&&yt(e.previous,[`present`,`value`]))n={present:!0,value:e.previous.value};else throw new J(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 xt(e,t,n){let r;try{r=P(n)}catch(e){throw Y(n,`be inspected`,e)}if(!r.isFile())throw new J(n,`is not a regular file`,`restore the intended receipt as a regular file without a symlink, then retry`);let i;try{i=F(n,`utf8`)}catch(e){throw Y(n,`be read`,e)}let a;try{a=JSON.parse(i)}catch(e){throw new J(n,`is not valid JSON`,`repair its JSON syntax without changing the recorded decision, then retry`,e)}let o=bt(a,n);if(o.cwd!==j(t)||n!==vt(e,t,o.canonicalTrustPath))throw new J(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 St(e,t){let{record:n,path:r}=t;for(let t of[q(e),_t(e,n.cwd)])if(!X(t))throw new J(t,`no longer exists`,`restore access to the expected receipt directory, then retry`);let i=xt(e,n.cwd,r);if(!ze(i.record,n))throw new J(r,`changed while its trust decision was being updated`,`retry to read its current ownership record`);return i}function Ct(e,t,n,r,i){let a={version:1,cwd:j(t),configuredTrustPath:j(n),canonicalTrustPath:j(r),state:`pending`,previous:i},o=vt(e,a.cwd,a.canonicalTrustPath),s=`${JSON.stringify(a,null,2)}\n`;if(!ze(bt(JSON.parse(s),o),a))throw new J(o,`cannot preserve the previous decision as JSON`,`provide the original decision as a JSON value before retrying`);X(q(e)),X(k(o));try{Pe(k(o),{recursive:!0,mode:448})}catch(e){throw Y(k(o),`be created`,e)}let c;try{c=P(o,{throwIfNoEntry:!1})}catch(e){throw Y(o,`be inspected`,e)}if(c)throw new J(o,`already exists`,`reconcile the existing ownership record before recording another grant`);try{w(o,s,{mode:384})}catch(e){throw Y(o,`be written`,e)}return{path:o,record:a}}function wt(e,t){let n=St(e,t);if(n.record.state!==`pending`)throw new J(n.path,`is already committed`,`use the current ownership record without committing it again`);let r={...n.record,state:`committed`};try{w(n.path,`${JSON.stringify(r,null,2)}\n`,{mode:384})}catch(e){throw Y(n.path,`be committed`,e)}return{path:n.path,record:r}}function Z(e,t){if(!X(q(e)))return[];let n=_t(e,t);if(!X(n))return[];let r;try{r=I(n).sort()}catch(e){throw Y(n,`be listed`,e)}return r.filter(e=>/^[a-f0-9]{64}\.json$/.test(e)).map(r=>xt(e,t,A(n,r)))}function Tt(e,t){let n=St(e,t);try{Le(n.path)}catch(e){throw Y(n.path,`be removed after reconciling its grant`,e)}for(let t of[k(n.path),q(e)])try{Ie(t)}catch(e){let n=e.code;if(n!==`ENOTEMPTY`&&n!==`EEXIST`&&n!==`ENOENT`)throw Y(t,`be removed after reconciling its grant`,e)}}var Et=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`)}}})),Dt=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())}}})),Ot=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}})),kt=n(((t,n)=>{var r=e(`fs`),i=Et(),a=Dt(),o=Ot(),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=S,e.createWriteStream=re;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;w(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;w(e.path,e.flags,e.mode,function(t,n){t?(e.destroy(),e.emit(`error`,t)):(e.fd=n,e.emit(`open`,n))})}function S(t,n){return new e.ReadStream(t,n)}function re(t,n){return new e.WriteStream(t,n)}var C=e.open;e.open=w;function w(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 C(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))}}})),At=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}})),jt=n((e=>{var t=At();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}}})),Mt=n(((e,t)=>{t.exports=jt()})),Nt=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`)})),Pt=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=Nt(),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)}}})),Ft=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})),It=n(((t,n)=>{let r=e(`path`),i=kt(),a=Mt(),o=Pt(),s=Ft(),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})),Lt=n(((e,t)=>{let n=kt();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}})),Rt=t(n(((e,t)=>{let n=It(),{toPromise:r,toSync:i,toSyncOptions:a}=Lt();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 zt=5e3;function Bt(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 ${zt}ms`,{cause:e}),{code:`ELOCKED`});return Math.min(25,r)}function Vt(e,t){Ue()?.warn(t,e)}function Ht(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 Ut(e,t,n){await ae(`${t}.ok.lock`,async()=>{let t=performance.now()+zt,r;for(;;)try{r=await Rt.default.lock(k(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){await Be(Bt(n,t,e))}let i=[];try{n()}catch(e){i.push(e)}finally{try{await r()}catch(e){i.push(e)}}Ht(i,e)},{onWarn:Vt})}function Wt(e,t,n){b(`${t}.ok.lock`,()=>{let t=performance.now()+zt,r=new Int32Array(new SharedArrayBuffer(4)),i;for(;;)try{i=Rt.default.lockSync(k(e),{realpath:!1,lockfilePath:`${e}.lock`});break}catch(n){Atomics.wait(r,0,0,Bt(n,t,e))}let a=[];try{n()}catch(e){a.push(e)}finally{try{i()}catch(e){a.push(e)}}Ht(a,e)},{onWarn:Vt})}const Gt=[`settings.json`,`prompts`,`themes`,`SYSTEM.md`,`APPEND_SYSTEM.md`];var Kt=class extends Error{name=`PiResourceInspectionError`};function qt(e){let t;try{t=P(e)}catch(e){if(e.code===`ENOENT`)return!1;throw e}let n;try{n=R(e)}catch(e){throw t.isSymbolicLink()&&e.code===`ENOENT`?new Kt(ue(`missing-symlink-target`),{cause:e}):e}return Ne(e,M.R_OK|(n.isDirectory()?M.X_OK:0)),!0}function Jt(e){return e===`open-knowledge`||e.startsWith(`open-knowledge-`)}function Yt(e,t,n){let r=e;try{let i=L(e),a;r=t;try{a=L(t)}catch(e){if(e.code!==`ENOENT`)throw e;a=j(t)}let o=A(a,`.agents`,`skills`),s=[];for(let e of Gt)r=A(i,`.pi`,e),qt(r)&&s.push(r);if(r=A(i,`.pi`,`extensions`),qt(r))for(let t of I(r).sort()){let i=A(r,t);j(n)!==A(j(e),`.pi`,`extensions`,t)&&s.push(i)}for(let e of[A(i,`.pi`,`skills`),A(i,`.agents`,`skills`)])if(e!==o&&(r=e,qt(e)))for(let t of I(e).sort())Jt(t)||s.push(A(e,t));let c=k(i);for(;c!==i;){r=A(c,`.agents`,`skills`),r!==o&&qt(r)&&s.push(r);let e=k(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 ${K(r)}: ${e instanceof Kt?e.message:ue(T(e))}`}}}function Xt(e,t,n){let r=j(e),i=xe({home:t,env:n??(t===void 0?process.env:{})});return{cwd:r,bridgePath:E.pi.projectConfigPath(r),trustPath:A(i,`trust.json`)}}function Zt(e){try{let t=L(e);return R(t).isDirectory()?(Ne(t,M.X_OK),{kind:`ready`,project:{path:e,canonical:t}}):{kind:`refused`,error:`Pi project path ${K(e)} is not a directory; restore the intended project directory, then retry`}}catch(t){return{kind:`refused`,error:`Pi project directory ${K(e)} could not be resolved or accessed: ${K(t instanceof Error?t.message:String(t))}; restore the directory or symlink and check its permissions, then retry`}}}function Qt(e){let t=Zt(e.path);if(t.kind===`refused`)return t.error;if(t.project.canonical!==e.canonical)return`Pi project path ${K(e.path)} changed while waiting for its trust lock; restore the intended project location, then retry`}function $t(e,t,n){let r=Ee(E.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 ye(i)?{state:`own-current`,text:a}:ce(i)?{state:`own-stale`,text:a}:{state:`foreign`,text:a}}function en(e,t){let n;try{n=F(e.path,`utf-8`)}catch(t){let n=t.code;return e.kind===`missing`&&n===`ENOENT`?{state:`untrusted`,entries:{},trailingNewline:!1}:{state:`unreadable`,reason:T(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 ke(r)?{state:r[t]===!0?`trusted`:`untrusted`,entries:r,trailingNewline:n.endsWith(`
|
|
4
|
+
`)}:{state:`unreadable`,reason:`invalid-json`}}function tn(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 ue(e)}}function Q(e,t){return{kind:`refused`,error:`trust store ${K(e)}: ${tn(t)}`}}function nn(e){let t=Ae(e);try{switch(t.kind){case`declined`:return Q(e,t.reason);case`ready`:return{kind:`ready`,path:L(t.path)};case`not-present`:break;default:throw Error(`unhandled trust file resolution: ${t}`)}let n=k(e),r=[O(e)],i=P(n,{throwIfNoEntry:!1});for(;!i;){let t=k(n);if(t===n)return Q(e,`unavailable-root`);r.unshift(O(n)),n=t,i=P(n,{throwIfNoEntry:!1})}try{return{kind:`missing`,path:A(L(n),...r)}}catch(t){return Q(e,i.isSymbolicLink()&&t.code===`ENOENT`?`missing-symlink-target`:T(t))}}catch(t){return Q(e,T(t))}}function rn(e,t){let n=nn(e);return n.kind===`refused`?n:n.path!==t.path||t.kind===`ready`&&n.kind===`missing`?Q(e,`path-changed`):n}function an(e,t,n){let r=Xt(e,t,n),i=Zt(r.cwd);if(i.kind===`refused`)return{...r,project:`unavailable`,error:i.error};let a=$t(r.cwd,r.bridgePath,t).state,o=nn(r.trustPath),s=o.kind===`refused`?`unreadable`:o.kind===`missing`?`untrusted`:en(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:on(r.bridgePath).displayNames}}function on(e){let t=k(e),n=O(e);try{return{displayNames:I(t).filter(e=>e!==n&&e.endsWith(`.ts`)).sort().map(e=>K(JSON.stringify(e)))}}catch{return{displayNames:[]}}}async function sn(e,t={mode:`published`},n,r,i){let a=Xt(e,n,r),o=Zt(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 ${K(i)} no longer matches the current directory ${K(o.project.canonical)}. Reopen the intended project and approve the Pi integration again; no bridge or trust settings were changed.`};let s=$t(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=fe(t)}catch{e=void 0}c=e!==void 0&&s.text===e?`unchanged`:`refreshed`}if(c!==`unchanged`){let e=he(E.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}`:K(e.error)}}let l=await cn(a.trustPath,o.project,n??z());return{...a,ok:l.action===`already-trusted`||l.action===`added`,bridge:c,trust:l.action,...l.error===void 0?{}:{error:l.error}}}async function cn(e,t,n){let r=t.canonical,i=nn(e);if(i.kind===`refused`)return{action:`refused-unreadable`,error:i.error};try{Pe(k(i.path),{recursive:!0})}catch(e){return{action:`failed`,error:K(e instanceof Error?e.message:String(e))}}let a={action:`added`};try{await Ut(e,i.path,()=>{let o=Qt(t);if(o){a.action=`refused-unreadable`,a.error=o;return}let s=rn(e,i);if(s.kind===`refused`){a.action=`refused-unreadable`,a.error=s.error;return}let c=en(s,r);if(c.state===`trusted`){a.action=`already-trusted`;return}if(c.state===`unreadable`){a.action=`refused-unreadable`,a.error=Q(e,c.reason).error;return}let l=$(n,()=>{let t=Z(n,r).find(e=>e.record.canonicalTrustPath===s.path);return t&&Tt(n,t),Ct(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
5
|
`:``),f=D(s.path);w(s.path,d,f===void 0?void 0:{mode:f}),$(n,()=>wt(n,l)),a.action=`added`})}catch(e){return{action:`failed`,error:K(e instanceof Error?e.message:String(e))}}return a}function ln(e){let t=[],n=e;try{for(;;){if(P(n,{throwIfNoEntry:!1})){if(t.length===0)return;let e=L(n);return R(e).isDirectory()?(Ne(e,M.X_OK),A(e,...t)):void 0}let e=k(n);if(e===n)return;t.unshift(O(n)),n=e}}catch{return}}function un(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
6
|
`)}:n.detail===void 0?n:{...n,detail:i.join(`
|
|
7
7
|
`)}}function dn(e,t,n,r={}){let i=Xt(e,t,n),a=t??z(),o=Zt(i.cwd),s=o.kind===`refused`&&r.recordedOnly?ln(i.cwd):void 0,c=o.kind===`ready`?o.project.canonical:s,l;try{l=$(a,()=>{let e=Z(a,i.cwd);return c===void 0||c===i.cwd?e:[...Z(a,c),...e]})}catch(e){return{action:`failed`,error:K(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 ${K(JSON.stringify(t.cwd))}; configured store ${K(JSON.stringify(t.configuredTrustPath))}; recorded destination ${K(JSON.stringify(t.canonicalTrustPath))}; ownership record ${K(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
8
|
`)}}let u=Yt(o.project.canonical,a,E.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=nn(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 ${K(e)} no longer points to its recorded destination ${K(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(fn(e,a,d,o.project))}return un(f)}function $(e,t){try{return t()}catch(t){throw t instanceof J?t:Error(`Could not access OpenKnowledge's Pi trust ownership records at ${K(A(S(e),`pi-trust`))}: ${K(t instanceof Error?t.message:String(t))}. Check the records and their permissions, then retry.`,{cause:t})}}function fn(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{P(k(a.path))}catch(e){return{action:`failed`,error:`The recorded Pi trust directory ${K(k(a.path))} is unavailable: ${K(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{Wt(i,a.path,()=>{let e=Qt(r);if(e){c.result={action:`kept-unverified`,error:e};return}let l=rn(i,a);if(l.kind===`refused`){c.result={action:`refused-unreadable`,error:l.error};return}let u=en(l,r.canonical);if(u.state===`unreadable`){c.result={action:`refused-unreadable`,error:Q(i,u.reason).error};return}let d=o.map(e=>({cwd:e.cwd,mode:e.mode,expectedConfiguredPath:e.receipt?.record.configuredTrustPath,receipt:$(t,()=>Z(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{pn(e,t,i,l.path,u,n,r,c)}catch(t){let n=K(t instanceof Error?t.message:String(t)),r=t instanceof J?``:`; retry to check its current state.`;s.push({action:`failed`,error:`Pi trust entry ${K(JSON.stringify(e.cwd))} in ${K(i)} could not be reconciled: ${n}${r}`})}s.push(c.result),c.result={action:`not-present`}}})}catch(e){s.push({action:`failed`,error:K(e instanceof Error?e.message:String(e))})}return un([...s,c.result])}function pn(e,t,n,r,i,a,o,s){let{cwd:c,receipt:l}=e;if(i.entries[c]!==!0){l&&e.mode===`recorded`&&$(t,()=>Tt(t,l)),s.result={action:`not-present`};return}let u=`To remove this grant manually, close Pi and remove only the ${K(JSON.stringify(c))} entry from ${K(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=>K(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,()=>Tt(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 ${K(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=D(r);w(r,f,p===void 0?void 0:{mode:p}),i.entries=d,$(t,()=>Tt(t,l)),s.result={action:`removed`}}function mn(e){return
|
|
9
|
+
`:``),p=D(r);w(r,f,p===void 0?void 0:{mode:p}),i.entries=d,$(t,()=>Tt(t,l)),s.result={action:`removed`}}function mn(e){return ye(e)||me(e)||ce(e)}const hn=10485760;function gn(e,t,n,r=!1){let i=dn(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 _n(e,t,n,r){if(e.id!==`pi`)return{kind:`not-present`};let i=gn(t,n,r,!0);return i.trust===`not-present`?{kind:`not-present`}:{kind:`removed`,...i}}function vn(e,t,n,r,i){let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=Ae(a);if(o.kind===`not-present`)return _n(e,t,n,i);if(o.kind===`declined`)return o;let s=Ee(e,t,n,o.path);if(s.kind===`absent`||s.kind===`no-entry`)return _n(e,t,n,i);if(s.kind===`decline`)return{kind:`declined`,reason:s.reason};if(!mn(s.entry))return{kind:`left-foreign`};let c=e.serverName(t);if(e.format===`file`){let e=gn(t,n,i);try{Fe(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`?xn(o.path,c):e.format===`yaml`?bn(o.path,e.topLevelKey,c):yn(o.path,e.topLevelKey,e.serverMapSubKey,c)}function yn(e,t,n,r){let i;try{i=F(e,`utf-8`)}catch(e){return{kind:`declined`,reason:T(e)}}if(Buffer.byteLength(i,`utf-8`)>hn)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=be(i,Oe(t,n,r));return o?(w(e,a,{mode:D(e)}),{kind:`removed`}):{kind:`not-present`}}function bn(e,t,n){let r;try{r=F(e,`utf-8`)}catch(e){return{kind:`declined`,reason:T(e)}}if(Buffer.byteLength(r,`utf-8`)>hn)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,Ve.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=oe(a);a.trim()===``||a.endsWith(`
|
|
10
10
|
`)?c.endsWith(`
|
|
11
11
|
`)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
|
|
12
12
|
`).replace(/\n/g,`\r
|
|
13
|
-
`));let u=`${i?``:``}${c}`;return u!==r&&w(e,u,{mode:D(e)}),{kind:`removed`}}function xn(e,t){let n=
|
|
13
|
+
`));let u=`${i?``:``}${c}`;return u!==r&&w(e,u,{mode:D(e)}),{kind:`removed`}}function xn(e,t){let n=ve();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=F(e,`utf-8`)}catch(e){return{kind:`declined`,reason:T(e)}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=oe(a),s=a.trim()===``||a.endsWith(`
|
|
14
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
15
|
`)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
|
|
16
16
|
`).replace(/\n/g,`\r
|
|
17
|
-
`));let u=`${i?``:``}${l}`;return u!==r&&w(e,u,{mode:D(e)}),{kind:`removed`}}function Sn(e,t){let n=
|
|
17
|
+
`));let u=`${i?``:``}${l}`;return u!==r&&w(e,u,{mode:D(e)}),{kind:`removed`}}function Sn(e,t){let n=v[e];return n===null?null:A(t,...n.split(`/`),C.discovery,`SKILL.md`)}function Cn(e,t){let n=Sn(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};if(!ie(t).some(t=>t.editorId===e))return{editorId:e,label:e,action:`skipped-unsupported`,path:n};try{let r=ee(`discovery`,{checkDesktop:!0});return le(k(n),t),{editorId:e,label:e,action:se(r,n),path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function wn(e){return N(A(e,...`.agents/skills`.split(`/`),C.discovery))?!0:f.some(t=>{let n=Sn(t,e);return n!==null&&N(k(n))})}function Tn(e,t){let n=Sn(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};let r=k(n);try{return N(n)?(le(r,t),Fe(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 En(e){return e===`opencode`?Ce:Te}function Dn(e,t,n){let r=E[e],i=En(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=we(r,t,n,o.configPath);if(a!==null&&i(a))return{editorId:e,scope:o.scope,configPath:o.configPath}}return null}function On(e,t,n=[]){let r=N(A(e,C[t]))?`satisfied`:`absent`;return{...r===`satisfied`?{state:r,strictness:[`reclaim-permissive`]}:{state:r},...n.length===0?{}:{sharedWith:n}}}function kn(e,t){let n=pe.flatMap(t=>{let n=e[t];return n===null?[]:[{editor:t,root:n}]}),r=_.filter(e=>e.scope===t).map(e=>({editor:e.editorId,root:u}));return[...n,...r]}function An(e,t,n,r){let i=re(e,kn(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 jn(e,t){let n=(t??z()).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 Mn(e,t){let n=E[e];return de(n,``,t)&&!_e(n,``,t)}function Nn(e,t,n,r,i){let a=E[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?jn(o,r):void 0,c=Ee(a,n,r,i);switch(c.kind){case`absent`:case`no-entry`:return i===void 0&&Mn(e,r)?{state:`structural-na`}:{state:`absent`,path:s};case`decline`:return{state:`unprobed`};case`present`:{let{entry:r}=c,i=[];ye(r)&&i.push(`reclaim-permissive`),me(r)&&i.push(`pre-approval-exact`),En(e)(r)&&i.push(`injection-functional`);let o=ge(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}:De(a)?{state:`foreign-replaceable`,path:s}:{state:`foreign`,path:s}}}}function Pn(e){let{cwd:t,home:n}=e;return e=>{if(e.pathId===null)return null;let i=r(e.pathId);if(i===null)return null;if(i.kind===`central-skill-store`)return n===void 0?null:On(A(n,u),`discovery`,An(n,v,e.agent,`global`));let a=i.editor;switch(i.kind){case`editor-user-skill-root`:{let e=v[a];return e===null||n===void 0?null:ie(n).some(e=>e.editorId===a)?On(A(n,e),`discovery`,An(n,v,a,`global`)):{state:`structural-na`}}case`editor-project-skill-root`:{let e=g[a];return e===null?null:On(A(t,e),`project`,An(t,g,a,`project`))}case`editor-user-config`:return Nn(a,e.strictness,t,n);case`editor-project-config`:{let r=E[a].projectConfigPath?.(t);return r===void 0?null:Nn(a,e.strictness,t,n,r)}}}}export{Xe as C,Ge as E,Je as S,Ue as T,ot as _,Cn as a,B as b,an as c,ct as d,st as f,ht as g,mt as h,wn as i,K as l,pt as m,Dn as n,vn as o,G as p,Tn as r,sn as s,Pn as t,it as u,nt as v,Ze as w,Qe as x,rt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,N as t}from"./init-
|
|
1
|
+
import{C as e,N as t}from"./init-CAX7eVNx.mjs";import{lstatSync as n,statSync as r}from"node:fs";function i(i){let a;try{a=n(i).isSymbolicLink()}catch(e){return e.code===`ENOENT`?{kind:`not-present`}:{kind:`declined`,reason:t(e)}}let o=e(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(e){return{kind:`declined`,reason:a&&e.code===`ENOENT`?`missing-symlink-target`:t(e)}}return{kind:`ready`,path:o.writePath,symlink:a}}export{i as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./launch-json-removal-
|
|
1
|
+
import{t as e}from"./launch-json-removal-Dxu_Lz6l.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};
|