@inkeep/open-knowledge 0.51.2 → 0.52.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/THIRD_PARTY_NOTICES.md +2 -2
- package/dist/{acp-harness-probe--VpGhtgu.mjs → acp-harness-probe-C6aHonBT.mjs} +2 -2
- package/dist/cli.mjs +61 -61
- package/dist/constants-FLf5VoJT.mjs +2 -0
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +1 -1
- package/dist/init-B3eO621O.mjs +638 -0
- package/dist/init-_151q0wb.mjs +1 -0
- package/dist/{launch-json-removal-2s_-SRpa.mjs → launch-json-removal-CmGm0tF9.mjs} +2 -2
- package/dist/loader-CFKng11E.mjs +1 -0
- package/dist/{loader-Cf18XdJV.mjs → loader-DAPg_yR9.mjs} +2 -2
- package/dist/{open-browser-De70N-tU.mjs → open-browser-CQP79XeJ.mjs} +2 -2
- package/dist/preview-BfP9Jf_p.mjs +1 -0
- package/dist/{preview-Be0uyPnN.mjs → preview-DJFUv75T.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-Cjkui6nd.js → ActivityModeContent-inbZ6Imy.js} +1 -1
- package/dist/public/assets/AgentDiffPane-D79ADgrY.js +2 -0
- package/dist/public/assets/{AgentThreadClientBinder-BrrOZdn1.js → AgentThreadClientBinder-BFNjsn1A.js} +1 -1
- package/dist/public/assets/AppMenubar-CYaE7Hn6.js +1 -0
- package/dist/public/assets/BugReportHistory-C59fSH13.js +1 -0
- package/dist/public/assets/{BugReportHistoryDialog-DpBx3OAi.js → BugReportHistoryDialog-C2b4xA3d.js} +1 -1
- package/dist/public/assets/ChangedOutsideBadge-B70WiFvp.js +7 -0
- package/dist/public/assets/{CodeMirrorPropInput-D50z9yLP.js → CodeMirrorPropInput-Dk5Y6lfV.js} +3 -3
- package/dist/public/assets/{ConfigSharingInfoTooltip-BPA8HEYl.js → ConfigSharingInfoTooltip-4T5uhyyt.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-KXeO_ZFL.js → ConsentDialogBody-DfhGpXdb.js} +1 -1
- package/dist/public/assets/{CopyButton-DhHoiQJR.js → CopyButton-ByR_1gcU.js} +1 -1
- package/dist/public/assets/{DiffView-BjOsi4GM.js → DiffView-BkhkquRc.js} +1 -1
- package/dist/public/assets/DocumentContext-0PqIw4Mp.js +38 -0
- package/dist/public/assets/EditorModeToggle-Dn28eLKD.js +1 -0
- package/dist/public/assets/EnableSyncConfirmDialog-DHSjSooL.js +1 -0
- package/dist/public/assets/FeedbackForm-BhNBNOJ7.js +1 -0
- package/dist/public/assets/{GraphPanel-H0Dz8I1Y.js → GraphPanel-D3eqDrvs.js} +2 -2
- package/dist/public/assets/ImportSkillDialog-CIwaj3Ws.js +1 -0
- package/dist/public/assets/{LintConfigEditor-DGxetApx.js → LintConfigEditor-B8H3gshD.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CnEs-Git.js +2 -0
- package/dist/public/assets/ManagedArtifactProperties-diaPr-SS.js +1 -0
- package/dist/public/assets/McpConsentDialogBody-CmWQQsvA.js +1 -0
- package/dist/public/assets/{Mermaid-D-pcyGRV.js → Mermaid-BHfANkja.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-BDExs-LW.js → MermaidDocEditor-CJTLkZwc.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-BgDInKA9.js → RegisteredAgentIcon-gjOJZp_B.js} +1 -1
- package/dist/public/assets/ReportBugDialogBody-AcYxCdAP.js +3 -0
- package/dist/public/assets/{SchemaConfigEditor-Dbn9RObT.js → SchemaConfigEditor-DkNcAkEt.js} +1 -1
- package/dist/public/assets/SessionsHost-BGHy03KJ.js +2 -0
- package/dist/public/assets/SettingsDialogBody-BWvLQrNH.js +12 -0
- package/dist/public/assets/ShareBranchSwitchDialog-ClrT-3XL.js +1 -0
- package/dist/public/assets/ShareReceiveDialog-CGp7LdmP.js +1 -0
- package/dist/public/assets/{ShareReceiveMissDialog-BHMkU4HH.js → ShareReceiveMissDialog-Cg4-FLXt.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-UvWXpguP.js → SkillEditBanner-DAXtbz8B.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-D8kmShJA.js → SkillOriginInline-CSKIzMpb.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-B9upYwy8.js → SkillToolbarControls-SVwkGBOq.js} +1 -1
- package/dist/public/assets/SlidesToolbarControls-bvIjkbin.js +1 -0
- package/dist/public/assets/SourceEditor-lnGI0Y3Z.js +1 -0
- package/dist/public/assets/{TerminalPanel-D5dGBcUr.js → TerminalPanel-CCfioVTh.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-C_F5ms5g.js → TerminalWindowApp-CNkz8ED8.js} +1 -1
- package/dist/public/assets/TextDocEditor-Cetftapm.js +1 -0
- package/dist/public/assets/ThreadView-BKPSGviS.js +10 -0
- package/dist/public/assets/TimelineDiffPane-Dgh-wIDe.js +2 -0
- package/dist/public/assets/{abnfDiagram-VRR7QNED-CQ5y3jGZ.js → abnfDiagram-VRR7QNED-By0_za11.js} +1 -1
- package/dist/public/assets/{agent-diff-store-ghKYlKOr.js → agent-diff-store-CKnzpnHj.js} +1 -1
- package/dist/public/assets/{arc-DllfmQO6.js → arc-5_RUQzQ7.js} +1 -1
- package/dist/public/assets/architecture-TIHT7OUA-DwJXOzeg.js +1 -0
- package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-DEDVgPeV.js → architectureDiagram-ZJ3FMSHR-PHjEFax1.js} +1 -1
- package/dist/public/assets/arrow-up-right-CGe6dTck.js +1 -0
- package/dist/public/assets/auth-state-cache-jQDyjv8z.js +11 -0
- package/dist/public/assets/{badge-zHd29IKW.js → badge-DFX4S3a5.js} +1 -1
- package/dist/public/assets/{blockDiagram-677ZJIJ3-Biovo5Vk.js → blockDiagram-677ZJIJ3-BUuJiGZl.js} +1 -1
- package/dist/public/assets/{braces-B2tgJ4cu.js → braces-CJEjDc1f.js} +1 -1
- package/dist/public/assets/{button-RQ5o7P7w.js → button-CA0dewJJ.js} +1 -1
- package/dist/public/assets/{c4Diagram-LMCZKHZV-BUMbkcfU.js → c4Diagram-LMCZKHZV-D4UjQlwU.js} +1 -1
- package/dist/public/assets/{calendar-q3K0fDI1.js → calendar-BTcSoUWo.js} +1 -1
- package/dist/public/assets/{case-sensitive-Cz58rAyi.js → case-sensitive-CE1B0vR4.js} +1 -1
- package/dist/public/assets/channel-DPiKu0N2.js +1 -0
- package/dist/public/assets/check-CGfmW4da.js +1 -0
- package/dist/public/assets/{checkbox-DxTkAw0k.js → checkbox-vidgONxv.js} +1 -1
- package/dist/public/assets/{chevron-down-DmoBYxyq.js → chevron-down-DabHDQTe.js} +1 -1
- package/dist/public/assets/chevron-left-UUhIKmW4.js +1 -0
- package/dist/public/assets/chevron-right-Diamp-K_.js +1 -0
- package/dist/public/assets/{chevron-up-eNJS5_XA.js → chevron-up-BNZIobnQ.js} +1 -1
- package/dist/public/assets/chunk-2Q5K7J3B-CSqFa28W.js +1 -0
- package/dist/public/assets/{chunk-32BRIVSS-CJfLw0io.js → chunk-32BRIVSS-CqHtBxci.js} +1 -1
- package/dist/public/assets/{chunk-52WLFC77-CKUXR-Lo.js → chunk-52WLFC77-Ct--wlEg.js} +1 -1
- package/dist/public/assets/{chunk-5FCAYU7R-Blhoqerk.js → chunk-5FCAYU7R-D4Qemx4Q.js} +1 -1
- package/dist/public/assets/{chunk-5HE753X5-Be3l52OO.js → chunk-5HE753X5-AFxpbWC8.js} +1 -1
- package/dist/public/assets/{chunk-5JV3BV7I-COJRGdXn.js → chunk-5JV3BV7I-DQech1b8.js} +1 -1
- package/dist/public/assets/{chunk-5TONJI2A-6Fwn-ZXg.js → chunk-5TONJI2A-DhQn7UEA.js} +1 -1
- package/dist/public/assets/{chunk-5VM5RSS4-CBB7ddJZ.js → chunk-5VM5RSS4-Mk-moEej.js} +1 -1
- package/dist/public/assets/{chunk-7BUUIJ7U-BCqa-5nq.js → chunk-7BUUIJ7U-NgiLm4do.js} +1 -1
- package/dist/public/assets/{chunk-BIQX33UG-DzD4i2B0.js → chunk-BIQX33UG-BGOx5d7P.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-KCTBsTca.js → chunk-BO2N2NFS-BD-R2P8f.js} +4 -4
- package/dist/public/assets/{chunk-C7G6YPKG-DxT1wdEz.js → chunk-C7G6YPKG-ETQuvHy_.js} +1 -1
- package/dist/public/assets/{chunk-CQNSW5MT-DFeH5OJq.js → chunk-CQNSW5MT-BtseeAyV.js} +1 -1
- package/dist/public/assets/{chunk-CYSBUYHQ-BnJMwkKI.js → chunk-CYSBUYHQ-BMn0BrMO.js} +1 -1
- package/dist/public/assets/{chunk-EMLP6XTP-MSvlJ735.js → chunk-EMLP6XTP-CMh4Lfqa.js} +1 -1
- package/dist/public/assets/{chunk-EX3LRPZG-DUzsTxw6.js → chunk-EX3LRPZG-9JJX2N4p.js} +1 -1
- package/dist/public/assets/{chunk-FWX5IMBZ-D3EMolHi.js → chunk-FWX5IMBZ-BG7sIfOm.js} +2 -2
- package/dist/public/assets/{chunk-HOUHSVGY-CA499J_e.js → chunk-HOUHSVGY-DZGPL4gA.js} +1 -1
- package/dist/public/assets/{chunk-ICXQ74PX-CNLojPkU.js → chunk-ICXQ74PX-CKtDW9ht.js} +1 -1
- package/dist/public/assets/{chunk-JG7HCLWE-BjvLoZ4O.js → chunk-JG7HCLWE-Bx0614Ks.js} +1 -1
- package/dist/public/assets/{chunk-JWPE2WC7-DKo0ygBr.js → chunk-JWPE2WC7-CTPvDarN.js} +1 -1
- package/dist/public/assets/{chunk-MOJQB5TN-hxtcpfx_.js → chunk-MOJQB5TN-BAhZ0kPA.js} +1 -1
- package/dist/public/assets/{chunk-MOZMSUNE-DQOK9LgW.js → chunk-MOZMSUNE-Cw75i_mo.js} +1 -1
- package/dist/public/assets/{chunk-OGEWGWER-DmUP6YIh.js → chunk-OGEWGWER-CXRXvI-G.js} +1 -1
- package/dist/public/assets/{chunk-OSBZ3O6U-D1WpsIpR.js → chunk-OSBZ3O6U-3rlBFXeF.js} +1 -1
- package/dist/public/assets/{chunk-PUDLZKDR-CQKVQESS.js → chunk-PUDLZKDR-m0_LideR.js} +1 -1
- package/dist/public/assets/{chunk-Q4XR5HBZ-CChmYrK9.js → chunk-Q4XR5HBZ-DtfMFxTy.js} +1 -1
- package/dist/public/assets/{chunk-QBLGF6JB-CgndLuEz.js → chunk-QBLGF6JB-ClgYvCDk.js} +1 -1
- package/dist/public/assets/{chunk-R7FJI6CG-DCv2sUq2.js → chunk-R7FJI6CG-Byfy5jLm.js} +1 -1
- package/dist/public/assets/{chunk-RYQCIY6F-AIaldrY4.js → chunk-RYQCIY6F-BcYiXXs_.js} +1 -1
- package/dist/public/assets/{chunk-U6XO7XAA-CxMMdww-.js → chunk-U6XO7XAA-BgHi1_DT.js} +1 -1
- package/dist/public/assets/{chunk-V7JOEXUC-CXy9SmJk.js → chunk-V7JOEXUC-87Dg_1li.js} +1 -1
- package/dist/public/assets/chunk-VAUOI2AC-BRgZjfPj.js +1 -0
- package/dist/public/assets/{chunk-VR4S4FIN-KG7H_g4c.js → chunk-VR4S4FIN-CgLu4IqR.js} +1 -1
- package/dist/public/assets/{chunk-WYO6CB5R-B368j75q.js → chunk-WYO6CB5R-DDQFGPZ4.js} +2 -2
- package/dist/public/assets/chunk-XXDRQBXY-CSo_IP1t.js +1 -0
- package/dist/public/assets/{chunk-YOTPTUD7-Cqb1OWoI.js → chunk-YOTPTUD7-Bb6P7QJ5.js} +1 -1
- package/dist/public/assets/{chunk-ZGVPDNZ5-BKdDRJat.js → chunk-ZGVPDNZ5-Cps1Smx5.js} +1 -1
- package/dist/public/assets/{chunk-ZIRB5QZD-CvXXd6Mf.js → chunk-ZIRB5QZD-BUb1k7IW.js} +1 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-B4b2FFhv.js +1 -0
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-D-BosVMB.js +1 -0
- package/dist/public/assets/client-version-Bqbynb6h.js +1 -0
- package/dist/public/assets/{cm-theme-ChFGbVCe.js → cm-theme-NiQt8zc0.js} +1 -1
- package/dist/public/assets/{code-highlighter-impl-CHS525hA.js → code-highlighter-impl-Dk8zJoMV.js} +1 -1
- package/dist/public/assets/{collapsible-OhEmjTXw.js → collapsible-COrqeoHr.js} +1 -1
- package/dist/public/assets/comment-chips-WeFvqsHB.js +5 -0
- package/dist/public/assets/{config-provider-BIse3_Yo.js → config-provider-CvgB96vD.js} +3 -3
- package/dist/public/assets/{context-menu-CYgsnEgV.js → context-menu-D1MgERPo.js} +1 -1
- package/dist/public/assets/{cose-bilkent-JH36ORCC-CwtkHR1Y.js → cose-bilkent-JH36ORCC-B5G6WpVe.js} +1 -1
- package/dist/public/assets/cynefin-VYW2F7L2-DCXxsTQd.js +1 -0
- package/dist/public/assets/{cynefinDiagram-TSTJHNR4-LsplRO2K.js → cynefinDiagram-TSTJHNR4-xWzANYbb.js} +1 -1
- package/dist/public/assets/{dagre-C6VKrNvO.js → dagre-DU0bSWB3.js} +1 -1
- package/dist/public/assets/{dagre-VKFMJZFB-DhzjgRUZ.js → dagre-VKFMJZFB-DRyoGqzk.js} +1 -1
- package/dist/public/assets/{diagram-FQU43EPY-a4jh9ybB.js → diagram-FQU43EPY-nZKoVz4B.js} +1 -1
- package/dist/public/assets/{diagram-G47NLZAW-Jgkwuc6y.js → diagram-G47NLZAW-DPNtUg-P.js} +1 -1
- package/dist/public/assets/{diagram-NH7WQ7WH-Cz1HEitz.js → diagram-NH7WQ7WH-Zm853285.js} +1 -1
- package/dist/public/assets/{diagram-OA4YK3LP-CIcVtjXP.js → diagram-OA4YK3LP-DAhRUKgQ.js} +1 -1
- package/dist/public/assets/{diagram-WEI45ONY-C8wU887b.js → diagram-WEI45ONY-D3E8BHEU.js} +1 -1
- package/dist/public/assets/dialog-DztIj-ZS.js +5 -0
- package/dist/public/assets/{dist-G89kioZo.js → dist-6Kl8HTi9.js} +1 -1
- package/dist/public/assets/{dist-Bb1r1o6u.js → dist-B55799jR.js} +1 -1
- package/dist/public/assets/{dist-B0Beym3_.js → dist-BSAh-TK7.js} +1 -1
- package/dist/public/assets/{dist-Bx9oFJRu.js → dist-BUDkMEzD.js} +1 -1
- package/dist/public/assets/{dist-DMj9iIHH.js → dist-Bme5LuHX.js} +1 -1
- package/dist/public/assets/{dist-DY-494HN.js → dist-BvwnbioL.js} +1 -1
- package/dist/public/assets/{dist-D_1xxRDt.js → dist-C6lhy_gK.js} +1 -1
- package/dist/public/assets/{dist-DuPjpj5-.js → dist-CADCdgrq.js} +1 -1
- package/dist/public/assets/{dist-BOhFaMG0.js → dist-CrYLos7c.js} +1 -1
- package/dist/public/assets/{dist-DRg5A_HQ.js → dist-DPG-4B8V.js} +1 -1
- package/dist/public/assets/{dist-DL1WTl5d.js → dist-DU3mip8Z.js} +1 -1
- package/dist/public/assets/{dist-CR6aO28t.js → dist-DX6BuR0m.js} +1 -1
- package/dist/public/assets/{dist-EpVTQF77.js → dist-DbcFk_pj.js} +1 -1
- package/dist/public/assets/{dist-DpaqLIPT.js → dist-DmTWt7nC.js} +1 -1
- package/dist/public/assets/{dist-CHVHOG7X2.js → dist-DoYGOGZp.js} +4 -4
- package/dist/public/assets/{dist-C9uRrl_E.js → dist-DpjZjxsY.js} +1 -1
- package/dist/public/assets/{dist-DgRDZMLf.js → dist-Ds8NLlxa.js} +1 -1
- package/dist/public/assets/{dist-Bi80hc1t.js → dist-DsLZcVyZ.js} +1 -1
- package/dist/public/assets/{dist-DrCK4JBL.js → dist-DwFjOxj-.js} +1 -1
- package/dist/public/assets/{dist-CFyOS6pn.js → dist-RxK2lKIj.js} +1 -1
- package/dist/public/assets/{dist-By2lAhKX.js → dist-gTGB_-tT.js} +1 -1
- package/dist/public/assets/{dist-CXSIgvvA.js → dist-lGeJn8Qx.js} +1 -1
- package/dist/public/assets/doc-paths-SFSlIMRQ.js +1 -0
- package/dist/public/assets/documents-events-a5eIuqSk.js +1 -0
- package/dist/public/assets/{download-btG_KeFQ.js → download-C3PYuI1f.js} +1 -1
- package/dist/public/assets/{dropdown-menu-K4eCFwQy.js → dropdown-menu-CLgDYkh1.js} +1 -1
- package/dist/public/assets/{ebnfDiagram-CCIWWBDH-CjptFZja.js → ebnfDiagram-CCIWWBDH-BildoPpV.js} +1 -1
- package/dist/public/assets/{erDiagram-Q63AITRT-BYiJa_5G.js → erDiagram-Q63AITRT-CrQn__5X.js} +1 -1
- package/dist/public/assets/{es2015-B2hWAwcf.js → es2015-wpLRKwCl.js} +1 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-CrAU37MM.js +1 -0
- package/dist/public/assets/{eye-j_4QS15C.js → eye-CSz7ogHo.js} +1 -1
- package/dist/public/assets/{field-9eXIpxzl.js → field-CtVP3IIV.js} +1 -1
- package/dist/public/assets/file-tree-adapter-oSszPvAJ.js +1 -0
- package/dist/public/assets/file-tree-utils-BG5IgULP.js +1 -0
- package/dist/public/assets/flowDiagram-23GEKE2U-BDzq_lmd.js +1 -0
- package/dist/public/assets/{folder-C8rE1Soy.js → folder-CopDpuy5.js} +1 -1
- package/dist/public/assets/{folder-config-api-Cm-dSVuA.js → folder-config-api-7-6Lsx3w.js} +1 -1
- package/dist/public/assets/{folder-open-CB-trByC.js → folder-open-DUSc8NL8.js} +1 -1
- package/dist/public/assets/follow-file-DtlRQ8jG.js +4 -0
- package/dist/public/assets/{form-_Bm7VdZa.js → form-dlFqxdSN.js} +1 -1
- package/dist/public/assets/{ganttDiagram-NO4QXBWP-TYuuGc0X.js → ganttDiagram-NO4QXBWP-D3jf9kZJ.js} +1 -1
- package/dist/public/assets/{git-branch-JnfmLuHd.js → git-branch-CCnsAeFH.js} +1 -1
- package/dist/public/assets/gitGraph-TEB2WS4Q-C3je2KR3.js +1 -0
- package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-BrjUrrk2.js → gitGraphDiagram-IHSO6WYX-DlDGz9cq.js} +1 -1
- package/dist/public/assets/globals-DXwGOGPM.css +1 -0
- package/dist/public/assets/{graphlib-D8PlvV2o.js → graphlib-C4PVrCSd.js} +1 -1
- package/dist/public/assets/{hash-DKiwvmF3.js → hash-DI30zEBt.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-eJrwOujA.js → highlighted-body-OFNGDK62-BRij1le7.js} +1 -1
- package/dist/public/assets/{history-eaFgPZWX.js → history-B1SZDFzE.js} +1 -1
- package/dist/public/assets/i18n-BAXNC2k8.js +1 -0
- package/dist/public/assets/index-Ca_TfGWK.js +2095 -0
- package/dist/public/assets/{info-CsTy513y.js → info-CV59RycV.js} +1 -1
- package/dist/public/assets/info-DKCQHKI2-CT9KyzjE.js +1 -0
- package/dist/public/assets/{infoDiagram-FWYZ7A6U-B6_Knuir.js → infoDiagram-FWYZ7A6U-Bl9xWhB1.js} +1 -1
- package/dist/public/assets/{input-group-BA2Li4LU.js → input-group-BiaQ-rIw.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-CqxHoebw.js → ishikawaDiagram-FXEZZL3T-gaFrf2SM.js} +1 -1
- package/dist/public/assets/{journeyDiagram-5HDEW3XC-B1-3fVtR.js → journeyDiagram-5HDEW3XC-DpjawWEP.js} +1 -1
- package/dist/public/assets/{kanban-definition-HUTT4EX6-CdhMOBCU.js → kanban-definition-HUTT4EX6-CEd1M9Jf.js} +1 -1
- package/dist/public/assets/{label-BT2yjpKR.js → label-B5yNUINo.js} +1 -1
- package/dist/public/assets/{lib-DcrRfjuF.js → lib-Bgq5iQnh.js} +1 -1
- package/dist/public/assets/{lib-BHGXbMkc.js → lib-C0Wr4O8I.js} +1 -1
- package/dist/public/assets/{line-C0o9Fjf4.js → line-DF4qqG3z.js} +1 -1
- package/dist/public/assets/{linear-CjM1R4zy.js → linear-B3i0ZXFo.js} +1 -1
- package/dist/public/assets/lint-config-client-DPKnQGxT.js +1 -0
- package/dist/public/assets/{list-plus-ByOuGBSE.js → list-plus-DBdmIc6v.js} +1 -1
- package/dist/public/assets/{local-menu-action-bus-BKJCODnD.js → local-menu-action-bus-Cypryz6Z.js} +1 -1
- package/dist/public/assets/{map-Cu759seX.js → map-DtIcVWDF.js} +1 -1
- package/dist/public/assets/markdownlint-rule-browser-CljNGtQ4.js +1 -0
- package/dist/public/assets/{mcp-consent-store-CBPF1Ll9.js → mcp-consent-store-BASpxNOZ.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-8B8K64kM.js +1 -0
- package/dist/public/assets/{mermaid-parser.core-DpHycRcl.js → mermaid-parser.core-ByQzJt56.js} +2 -2
- package/dist/public/assets/{mermaid.core-BnYdLHjl.js → mermaid.core-q87AkGda.js} +3 -3
- package/dist/public/assets/messages-B6vvv7H-.js +1 -0
- package/dist/public/assets/messages-Bf16a61t.js +1 -0
- package/dist/public/assets/messages-BlMkdPL-.js +1 -0
- package/dist/public/assets/messages-BrwWcQ1q.js +1 -0
- package/dist/public/assets/messages-Bsokz5p_.js +1 -0
- package/dist/public/assets/messages-CWnVB_17.js +1 -0
- package/dist/public/assets/messages-CgqvsJOb.js +1 -0
- package/dist/public/assets/messages-D3GzXczV.js +1 -0
- package/dist/public/assets/messages-DAiMiSQb.js +1 -0
- package/dist/public/assets/messages-DKla4fHa.js +1 -0
- package/dist/public/assets/messages-DhVrLKqA.js +1 -0
- package/dist/public/assets/{mindmap-definition-LN4V7U3C-D6FYi_vY.js → mindmap-definition-LN4V7U3C-Dn7sM2vD.js} +1 -1
- package/dist/public/assets/minus-D07ZsfDZ.js +1 -0
- package/dist/public/assets/{miss-dialog-store-DKfFwAsF.js → miss-dialog-store-sSyy54tn.js} +1 -1
- package/dist/public/assets/navigation-targets-CmqNPgrG.js +1 -0
- package/dist/public/assets/{now-Cd_fQsCQ.js → now-Bs9xiL-y.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-DflI2eed.js → open-managed-artifact-tab-ChY4GdUc.js} +1 -1
- package/dist/public/assets/{ordinal-oNJqAlZi.js → ordinal-CBsC_qub.js} +1 -1
- package/dist/public/assets/packet-7NZHBO7P-CH_5gegW.js +1 -0
- package/dist/public/assets/{panel-right-open-JxkSMPMb.js → panel-right-open-B66oA9M1.js} +1 -1
- package/dist/public/assets/{paperclip-BxFhnUjq.js → paperclip-BlKB6Xwa.js} +1 -1
- package/dist/public/assets/pdf-BFuk-PLE.js +54 -0
- package/dist/public/assets/pdf.worker-C9DGCxWN.js +1 -0
- package/dist/public/assets/{pdf.worker-B1D2UnXD.mjs → pdf.worker-CLesOks4.mjs} +10361 -8637
- package/dist/public/assets/{pegDiagram-2B236MQR-Cic2_Ooi.js → pegDiagram-2B236MQR-C05FQYWa.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-yXsV1Iit.js → pending-receive-nav-store-BHhLK9ql.js} +1 -1
- package/dist/public/assets/pie-RZYD4A2V-aYfmJZ12.js +1 -0
- package/dist/public/assets/{pieDiagram-ENE6RG2P-DgqO0C3j.js → pieDiagram-ENE6RG2P-yyTCawlg.js} +1 -1
- package/dist/public/assets/platform-labels-glrfxkSh.js +1 -0
- package/dist/public/assets/progress-BdSO2c_8.js +6 -0
- package/dist/public/assets/{project-paths-DC6bWLUQ.js → project-paths-_w2mRvRX.js} +1 -1
- package/dist/public/assets/prop-types-BuByQU-C.js +1 -0
- package/dist/public/assets/{propagation-api-DSg7UKuw.js → propagation-api-PBYTadVM.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-CC3ZGpWb.js → quadrantDiagram-ABIIQ3AL-B3sRVPYy.js} +1 -1
- package/dist/public/assets/radar-I7S5WNFK-DADBQ4w5.js +1 -0
- package/dist/public/assets/{radio-group-CmCnommQ.js → radio-group-BSCe7mNt.js} +1 -1
- package/dist/public/assets/railroad-3IZDKUUU-pWB1DEQS.js +1 -0
- package/dist/public/assets/railroad-abnf-AHOZXSZD-DyMKsKhG.js +1 -0
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-D6s4IM0k.js +1 -0
- package/dist/public/assets/railroad-peg-LSFZ7HO6-BTTgV3Yi.js +1 -0
- package/dist/public/assets/{railroadDiagram-RFXS5EU6-DaoKPEli.js → railroadDiagram-RFXS5EU6-BU6ZoyHj.js} +1 -1
- package/dist/public/assets/{receive-store-DrPPaP0S.js → receive-store-BJRLpWDq.js} +1 -1
- package/dist/public/assets/{refresh-cw-CAV3aG7d.js → refresh-cw-DQervzDZ.js} +1 -1
- package/dist/public/assets/{requirementDiagram-TGXJPOKE-qmFI0ev3.js → requirementDiagram-TGXJPOKE-CUJr32-2.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-HTMAVEWB-CYeZQsa5.js → sankeyDiagram-HTMAVEWB-bGsSEqGh.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-CeZOW3HG.js → schema-fields-view-intent-DiE8NL9y.js} +1 -1
- package/dist/public/assets/{select-BjNoD_FX.js → select-CguJodwX.js} +1 -1
- package/dist/public/assets/{selection-context-BxRPPU5Z.js → selection-context-Upvq3X7n.js} +1 -1
- package/dist/public/assets/{separator-BKbgOjgy.js → separator-vdmCepR4.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-DfXkoRwp.js → sequenceDiagram-DBY2YBRQ-d6rntmdd.js} +1 -1
- package/dist/public/assets/{sizeCapture-X5ZJPWSS-Bd7A4fpz.js → sizeCapture-X5ZJPWSS-CJquhL5U.js} +1 -1
- package/dist/public/assets/skill-actions-B0GhZcr8.js +2 -0
- package/dist/public/assets/skill-scope-ByxyMqpD.js +1 -0
- package/dist/public/assets/skills-api-CD1FoT1f.js +1 -0
- package/dist/public/assets/{spinner-D7fgqgRw.js → spinner-BqySY7qY.js} +1 -1
- package/dist/public/assets/{square-pen-hwoIfi3M.js → square-pen-Cb57Y3fg.js} +1 -1
- package/dist/public/assets/{src-CbX6YXDU.js → src-DGx6DijB.js} +1 -1
- package/dist/public/assets/{src-XHagG0Wj.js → src-DTnqSW2M.js} +1 -1
- package/dist/public/assets/{stateDiagram-2N3HPSRC-CCh_abZC.js → stateDiagram-2N3HPSRC-kGd_FNp8.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-6-zLyJUk.js +1 -0
- package/dist/public/assets/{swimlanes-5IMT3BWC-Dk2uoutn.js → swimlanes-5IMT3BWC-v_MAyooN.js} +2 -2
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-BBH-ZYmT.js +8 -0
- package/dist/public/assets/{switch-0kSGDL9E.js → switch-B2sF5R0q.js} +1 -1
- package/dist/public/assets/{tabs-CjOEhhKP.js → tabs-DlmsMbtD.js} +1 -1
- package/dist/public/assets/tag-pill-input-D9TPdQQY.js +1 -0
- package/dist/public/assets/{target-navigation-intent-CqhpK9cj.js → target-navigation-intent-Dn77egCV.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DlE3Lv5F.js → telemetry-impl-Dv6H2_tV.js} +2 -2
- package/dist/public/assets/telemetry-startup-BUcdYLE3.js +1 -0
- package/dist/public/assets/terminal-Cvoe7pfU.js +1 -0
- package/dist/public/assets/terminal-cli-display-ceeLXdxI.js +1 -0
- package/dist/public/assets/terminal-launch-events-un6YHfuE.js +1 -0
- package/dist/public/assets/{terminal-telemetry-BdrnMW3b.js → terminal-telemetry-DATv4VP7.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-BmEIetCD.js → text-viewer-languages-4qbY4VOt.js} +2 -2
- package/dist/public/assets/{thread-client-DySYYPC9.js → thread-client-DnaLPSLV.js} +1 -1
- package/dist/public/assets/{timeline-definition-FHXFAJF6-tb13RhWP.js → timeline-definition-FHXFAJF6-B79HsAbT.js} +1 -1
- package/dist/public/assets/{toggle-group-DAYvcc1F.js → toggle-group-CZcn-1gX.js} +1 -1
- package/dist/public/assets/{tooltip-x7BNUa3s.js → tooltip-DHXgxWLL.js} +1 -1
- package/dist/public/assets/{trash-2-CSpv7np3.js → trash-2-N0ilsnnr.js} +1 -1
- package/dist/public/assets/treeView-QDETBFTQ-Dx6w4y7n.js +1 -0
- package/dist/public/assets/treemap-6X3UGDF4-BDQteRlb.js +1 -0
- package/dist/public/assets/{triangle-alert-xKPljhlK.js → triangle-alert-COo6wbUK.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-COX8FDXD.js → typing-burst-detector-seDaKpRf.js} +2 -2
- package/dist/public/assets/{undo-2-D5cqFzyJ.js → undo-2-WGCwknr8.js} +1 -1
- package/dist/public/assets/uninstall-97GnPmGj.js +1 -0
- package/dist/public/assets/use-activity-panel-DR6Q_srT.js +1 -0
- package/dist/public/assets/use-apply-config-color-theme-Cwl6JTaa.js +1 -0
- package/dist/public/assets/use-collab-url-B6fAlmsp.js +1 -0
- package/dist/public/assets/{use-live-xterm-theme-CaipyTAZ.js → use-live-xterm-theme-XZ_rkAuD.js} +1 -1
- package/dist/public/assets/use-open-skill-CwUZqxzo.js +1 -0
- package/dist/public/assets/{use-popular-skills-BEpYkbxf.js → use-popular-skills-BI3UKF6g.js} +1 -1
- package/dist/public/assets/use-settings-route-D49weK6e.js +1 -0
- package/dist/public/assets/use-skill-origin-CbV3B2nV.js +1 -0
- package/dist/public/assets/use-skills-DWcQk94I.js +1 -0
- package/dist/public/assets/use-terminal-enabled-DOk0YJeH.js +1 -0
- package/dist/public/assets/{use-timeline-entry-diff-C9owRy-n.js → use-timeline-entry-diff--GTw5ypu.js} +1 -1
- package/dist/public/assets/use-workspace-DTMCKV7B.js +1 -0
- package/dist/public/assets/{vennDiagram-L72KCM5P-Cyp_-2xs.js → vennDiagram-L72KCM5P-CNfULt3I.js} +1 -1
- package/dist/public/assets/wardley-OPB4EBWU-D46U-qP9.js +1 -0
- package/dist/public/assets/{wardleyDiagram-EHGQE667-C5z1_r-x.js → wardleyDiagram-EHGQE667-CJYAF8du.js} +1 -1
- package/dist/public/assets/{wrench-yAsO-Pm9.js → wrench-CP2MIQHF.js} +1 -1
- package/dist/public/assets/x-DS57FvHW.js +1 -0
- package/dist/public/assets/{xychartDiagram-FW5EYKEG-DH9RxgRE.js → xychartDiagram-FW5EYKEG-CDXLQgim.js} +1 -1
- package/dist/public/index.html +162 -161
- package/dist/public/uninstall.html +30 -30
- package/dist/{repair-launch-json-Caz4Geku.mjs → repair-launch-json-DVvjguTT.mjs} +2 -2
- package/dist/{repair-mcp-configs-BqbRQlkK.mjs → repair-mcp-configs--mmvnnMC.mjs} +2 -2
- package/dist/{repair-skills-BFfQjF9F.mjs → repair-skills-CBiPGgau.mjs} +2 -2
- package/dist/repair-skills-D8TKPOmv.mjs +1 -0
- package/dist/{skill-teardown-BppNXkpR.mjs → skill-teardown-RIfU9RXJ.mjs} +2 -2
- package/dist/src-BGTR32Sk.mjs +1 -0
- package/dist/{src-CwuSSZyu.mjs → src-CLSt7s4C.mjs} +369 -368
- package/dist/src-DStuuia4.mjs +1 -0
- package/dist/{src-Df8kl5aO.mjs → src-LTdZB7V7.mjs} +8 -8
- package/dist/start--CwVBgru.mjs +1 -0
- package/dist/start-BFe4OpsP.mjs +12 -0
- package/dist/ui-CjlnXaCK.mjs +3 -0
- package/dist/ui-DQkCLucF.mjs +1 -0
- package/dist/{write-project-skill-DHsuRyv9.mjs → write-project-skill-KUk3TJzG.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-Dgd7GIo3.mjs +0 -2
- package/dist/init-BfNqRx0C.mjs +0 -1
- package/dist/init-Dhj82h89.mjs +0 -638
- package/dist/loader-DPW5tTWF.mjs +0 -1
- package/dist/preview-BzailyK2.mjs +0 -1
- package/dist/public/assets/AgentDiffPane-u-5ilTRE.js +0 -2
- package/dist/public/assets/AppMenubar-DzKyqu4x.js +0 -1
- package/dist/public/assets/BugReportHistory-mvsL4k28.js +0 -1
- package/dist/public/assets/ChangedOutsideBadge-BcoH6-nw.js +0 -1
- package/dist/public/assets/DocumentContext-CasGadtG.js +0 -38
- package/dist/public/assets/EditorModeToggle-6-QjT8Ga.js +0 -1
- package/dist/public/assets/EnableSyncConfirmDialog-CYGOKMM4.js +0 -1
- package/dist/public/assets/FeedbackForm-DiHjz-hT.js +0 -1
- package/dist/public/assets/ImportSkillDialog-mMdMQEcu.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-5u803JAP.js +0 -2
- package/dist/public/assets/ManagedArtifactProperties-CutBH5nQ.js +0 -1
- package/dist/public/assets/McpConsentDialogBody-BB44PQE6.js +0 -1
- package/dist/public/assets/ReportBugDialogBody-Cedm28lz.js +0 -3
- package/dist/public/assets/SessionsHost-DpaDtew-.js +0 -2
- package/dist/public/assets/SettingsDialogBody-Cy0NXh6T.js +0 -12
- package/dist/public/assets/ShareBranchSwitchDialog-Co8TuLoa.js +0 -1
- package/dist/public/assets/ShareReceiveDialog-DHLrIRs0.js +0 -1
- package/dist/public/assets/SlidesToolbarControls-B_zJy_NS.js +0 -1
- package/dist/public/assets/SourceEditor-BYbqK1qo.js +0 -1
- package/dist/public/assets/TextDocEditor-GLvDavbc.js +0 -1
- package/dist/public/assets/ThreadView-CMDGeM5p.js +0 -10
- package/dist/public/assets/TimelineDiffPane-CjnN3faR.js +0 -2
- package/dist/public/assets/architecture-TIHT7OUA-CIR5HZsg.js +0 -1
- package/dist/public/assets/arrow-up-right-D_WN0VGP.js +0 -1
- package/dist/public/assets/auth-state-cache-Z9zb3Xiw.js +0 -11
- package/dist/public/assets/channel-C6KgPQqg.js +0 -1
- package/dist/public/assets/check-xiKupoJh.js +0 -1
- package/dist/public/assets/chevron-left-CiNweXA3.js +0 -1
- package/dist/public/assets/chevron-right-DJvandMc.js +0 -1
- package/dist/public/assets/chunk-2Q5K7J3B-CgG_zTm9.js +0 -1
- package/dist/public/assets/chunk-VAUOI2AC-ujVxk4Ze.js +0 -1
- package/dist/public/assets/chunk-XXDRQBXY-B7w13F3i.js +0 -1
- package/dist/public/assets/classDiagram-OUVF2IWQ-CrrbWSrl.js +0 -1
- package/dist/public/assets/classDiagram-v2-EOCWNBFH-BYbi6pvW.js +0 -1
- package/dist/public/assets/client-version-C6LF52yy.js +0 -1
- package/dist/public/assets/comment-chips-S0s83wIP.js +0 -5
- package/dist/public/assets/cynefin-VYW2F7L2-BdPtv88z.js +0 -1
- package/dist/public/assets/dialog-Bxcn1sLm.js +0 -5
- package/dist/public/assets/doc-paths-DEUIlKvV.js +0 -1
- package/dist/public/assets/documents-events-CNRzblNO.js +0 -1
- package/dist/public/assets/eventmodeling-45OFAUF4-ur3Hg9pT.js +0 -1
- package/dist/public/assets/file-tree-adapter-DYdb8QDM.js +0 -1
- package/dist/public/assets/file-tree-utils-CaXhxBar.js +0 -1
- package/dist/public/assets/flowDiagram-23GEKE2U-C1BAvCbz.js +0 -1
- package/dist/public/assets/follow-file-CLEoGh92.js +0 -4
- package/dist/public/assets/gitGraph-TEB2WS4Q-l_1SzZcb.js +0 -1
- package/dist/public/assets/globals-CsoulcLa.css +0 -1
- package/dist/public/assets/i18n-lVHP3BYW.js +0 -1
- package/dist/public/assets/index-D2SnTfy9.js +0 -2095
- package/dist/public/assets/info-DKCQHKI2-CCDXfGhV.js +0 -1
- package/dist/public/assets/lint-config-client-Di_wU0g4.js +0 -1
- package/dist/public/assets/markdownlint-rule-browser-CepJct7F.js +0 -1
- package/dist/public/assets/mermaid-GHXKKRXX-C9G7CQ6h.js +0 -1
- package/dist/public/assets/messages-B12ABuMo.js +0 -1
- package/dist/public/assets/messages-BUufFcK8.js +0 -1
- package/dist/public/assets/messages-BV-Jgai1.js +0 -1
- package/dist/public/assets/messages-B_u6thtp.js +0 -1
- package/dist/public/assets/messages-CS-CWF8r.js +0 -1
- package/dist/public/assets/messages-CwQGRPEE.js +0 -1
- package/dist/public/assets/messages-Cwceyxby.js +0 -1
- package/dist/public/assets/messages-DGpodehZ.js +0 -1
- package/dist/public/assets/messages-DHl_AYzv.js +0 -1
- package/dist/public/assets/messages-DbRvxOAn.js +0 -1
- package/dist/public/assets/messages-DdKkPWw3.js +0 -1
- package/dist/public/assets/minus-H7UCODAH.js +0 -1
- package/dist/public/assets/navigation-targets-Dh0TaCXK.js +0 -1
- package/dist/public/assets/packet-7NZHBO7P-BBeRj-Du.js +0 -1
- package/dist/public/assets/pdf-19dxfod4.js +0 -54
- package/dist/public/assets/pdf.worker-Cn0IyjYR.js +0 -1
- package/dist/public/assets/pie-RZYD4A2V-BszLCTWh.js +0 -1
- package/dist/public/assets/prop-types-CLe_EOJt.js +0 -1
- package/dist/public/assets/radar-I7S5WNFK-CG0ShGDu.js +0 -1
- package/dist/public/assets/railroad-3IZDKUUU-N5ekmrCL.js +0 -1
- package/dist/public/assets/railroad-abnf-AHOZXSZD-DnjoKlG9.js +0 -1
- package/dist/public/assets/railroad-ebnf-EBAXGLYW-qDwmtJRh.js +0 -1
- package/dist/public/assets/railroad-peg-LSFZ7HO6-DSfMsKSD.js +0 -1
- package/dist/public/assets/skill-actions-Dj2NwLGa.js +0 -2
- package/dist/public/assets/skill-scope-BzUNaBG8.js +0 -1
- package/dist/public/assets/skills-api-VZRmji1_.js +0 -1
- package/dist/public/assets/stateDiagram-v2-6OUMAXLB-CUhlDos5.js +0 -1
- package/dist/public/assets/swimlanesDiagram-G3AALYLV-DHL99Ckz.js +0 -8
- package/dist/public/assets/tag-pill-input-GrIUFiT7.js +0 -1
- package/dist/public/assets/telemetry-startup-hv8lBqwj.js +0 -1
- package/dist/public/assets/terminal-bCsp6kPz.js +0 -1
- package/dist/public/assets/terminal-cli-display-DLfTA9tz.js +0 -1
- package/dist/public/assets/terminal-launch-events-DaPNTH_g.js +0 -1
- package/dist/public/assets/treeView-QDETBFTQ-DwFOcFO4.js +0 -1
- package/dist/public/assets/treemap-6X3UGDF4-D_-cggQd.js +0 -1
- package/dist/public/assets/uninstall-PZKO4_N9.js +0 -1
- package/dist/public/assets/use-activity-panel-CtHXJ4mx.js +0 -1
- package/dist/public/assets/use-apply-config-color-theme-Be4mSe54.js +0 -1
- package/dist/public/assets/use-collab-url-ChXwOaQi.js +0 -1
- package/dist/public/assets/use-open-skill-DASBRT-Y.js +0 -1
- package/dist/public/assets/use-settings-route-MF7LcF5y.js +0 -1
- package/dist/public/assets/use-skill-origin-qCGon4Nv.js +0 -1
- package/dist/public/assets/use-skills-C13KTW_J.js +0 -1
- package/dist/public/assets/use-terminal-enabled-r2pfLhCY.js +0 -1
- package/dist/public/assets/use-workspace-CEaEfKKU.js +0 -1
- package/dist/public/assets/wardley-OPB4EBWU-Dz0s9mBi.js +0 -1
- package/dist/public/assets/x-BopM5CF8.js +0 -1
- package/dist/repair-skills-Dz417BMs.mjs +0 -1
- package/dist/src-DR51i3QD.mjs +0 -1
- package/dist/src-DfSOnWpf.mjs +0 -1
- package/dist/start-BJ1MYSwN.mjs +0 -10
- package/dist/start-CR0_bdQ_.mjs +0 -1
- package/dist/ui-BBGFVQDX.mjs +0 -1
- package/dist/ui-CNA2d6cp.mjs +0 -3
- /package/dist/public/assets/{ActivityPanelDiffView-fDxLwTi2.js → ActivityPanelDiffView-GFnvFJPJ.js} +0 -0
- /package/dist/public/assets/{SkillModeBanner-d0ZDkWTk.js → SkillModeBanner-cMF-HPLA.js} +0 -0
- /package/dist/public/assets/{__vite-browser-external-D_48KNDi.js → __vite-browser-external-DD8Jl_VU.js} +0 -0
- /package/dist/public/assets/{agent-presence-DK_W4GTa.js → agent-presence-C3GIHDxc.js} +0 -0
- /package/dist/public/assets/{array-DYKIbRR-.js → array-Cf_JnmE6.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-DsHoHhCG.js → asset-dispatch-Cz1weVX3.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-CyiGTt3C.js → auth-prompt-store-BYOv6_8O.js} +0 -0
- /package/dist/public/assets/{chunk-KEIR6QF5-Z0IgTo4K.js → chunk-KEIR6QF5-BOpPjw4C.js} +0 -0
- /package/dist/public/assets/{chunk-Y2CYZVJY-Bmis3P2F.js → chunk-Y2CYZVJY-Bw2nvaMQ.js} +0 -0
- /package/dist/public/assets/{clike-l3ublWpW.js → clike-BBEjy26W.js} +0 -0
- /package/dist/public/assets/{clipboard-adapter-DEJxizFj.js → clipboard-adapter-DqemxSWT.js} +0 -0
- /package/dist/public/assets/{colors-C77NTF6g.js → colors-CElM_Snc.js} +0 -0
- /package/dist/public/assets/{copilot-BdGxiVpg.js → copilot-Dh1BU6kS.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-6iYxif1u.js → createLucideIcon-Bhw2PmPp.js} +0 -0
- /package/dist/public/assets/{cursor-CUtcHGV-.js → cursor-B6reg1lS.js} +0 -0
- /package/dist/public/assets/{cytoscape.esm-C2gIT5zZ.js → cytoscape.esm-h5J7wFxJ.js} +0 -0
- /package/dist/public/assets/{defaultLocale-BugBqEWo.js → defaultLocale-a-gWoIXg.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-oYPdTDmz.js → desktop-bridge-types-NXCK8Pd7.js} +0 -0
- /package/dist/public/assets/{diff-TXhtTD_D.js → diff-CvpcR3NJ.js} +0 -0
- /package/dist/public/assets/{dist-Bkx5dDHT2.js → dist-B6jB2qbD2.js} +0 -0
- /package/dist/public/assets/{dist-1ia0sKe1.js → dist-CK4VZUF5.js} +0 -0
- /package/dist/public/assets/{dist-CIv09IXf.js → dist-DH4zqp8r.js} +0 -0
- /package/dist/public/assets/{dist-DoS8xGN6.js → dist-DUfEoSbR.js} +0 -0
- /package/dist/public/assets/{dist-DNiTklSL.js → dist-DvG1-wV_.js} +0 -0
- /package/dist/public/assets/{dist-DUWYPul7.js → dist-mv8e6dBX.js} +0 -0
- /package/dist/public/assets/{documents-fetch-I34CgFeh.js → documents-fetch-CV8lWh8v.js} +0 -0
- /package/dist/public/assets/{external-link-CHCx4FXC.js → external-link-BIMZpgNa.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-DEuNOzhg.js → file-tree-rename-validation-CCqiFGp1.js} +0 -0
- /package/dist/public/assets/{floating-ui.dom-C0wusa09.js → floating-ui.dom-By-yeALv.js} +0 -0
- /package/dist/public/assets/{format-Dx1Bv63R.js → format-I3YtNHrv.js} +0 -0
- /package/dist/public/assets/{gherkin-Bu_VunKM.js → gherkin-D3uEvcwv.js} +0 -0
- /package/dist/public/assets/{globals-DDWjhIqB.js → globals-Ctlj0TIx.js} +0 -0
- /package/dist/public/assets/{go-BYJ3ESi0.js → go-fa_HI4OB.js} +0 -0
- /package/dist/public/assets/{html-void-elements-Bkr32DGT.js → html-void-elements-C35FEqss.js} +0 -0
- /package/dist/public/assets/{init-B44NBVpk.js → init-B1Vy7sk-.js} +0 -0
- /package/dist/public/assets/{input-VnbFvuKd.js → input-BYiOK210.js} +0 -0
- /package/dist/public/assets/{isObject-Dhzo1ma6.js → isObject-DaQSDnzB.js} +0 -0
- /package/dist/public/assets/{katex-BE6VA85g.js → katex-Bbx57GnP.js} +0 -0
- /package/dist/public/assets/{libesm-BYxokP1G.js → libesm-DQtLkQQh.js} +0 -0
- /package/dist/public/assets/{lint-plugin-meta-FPoTE-0t.js → lint-plugin-meta-CKntN3M1.js} +0 -0
- /package/dist/public/assets/{lru-string-cache-BgNKFfCO.js → lru-string-cache-Ckr1Pjrr.js} +0 -0
- /package/dist/public/assets/{lua-De9v6Xwm.js → lua-D7ZxzT_Z.js} +0 -0
- /package/dist/public/assets/{markdownit-CIgVFnWs.js → markdownit-C1Squg6O.js} +0 -0
- /package/dist/public/assets/{min-CgRbfTQR.js → min-Dbr9KJ3U.js} +0 -0
- /package/dist/public/assets/{overlay-layers-C1Y78Wu8.js → overlay-layers-Bj-TVfKw.js} +0 -0
- /package/dist/public/assets/{panel-9S5Pf2VO.js → panel-CbGx_cRv.js} +0 -0
- /package/dist/public/assets/{panzoom.es-CebiCTnw.js → panzoom.es-BtVt9FgW.js} +0 -0
- /package/dist/public/assets/{parse-api-error-Mgtc4OJu.js → parse-api-error-DfesE4Y7.js} +0 -0
- /package/dist/public/assets/{path-DNVjzh9n.js → path-kpTbN09k.js} +0 -0
- /package/dist/public/assets/{perl-DAC-0-L4.js → perl-B2T_oOXa.js} +0 -0
- /package/dist/public/assets/{properties-BuEq0L0N.js → properties-BlzchQr8.js} +0 -0
- /package/dist/public/assets/{r-D6J_8GbJ.js → r-BuKMh1KL.js} +0 -0
- /package/dist/public/assets/{rough.esm-hH2VdTtm.js → rough.esm-CP-YPkih.js} +0 -0
- /package/dist/public/assets/{ruby-BulDdqGQ.js → ruby-CUkUilNJ.js} +0 -0
- /package/dist/public/assets/{share-metadata-rows-CBd7DuHz.js → share-metadata-rows-D5y9TY7o.js} +0 -0
- /package/dist/public/assets/{shell-FYbPjPiK.js → shell-DhuGq92J.js} +0 -0
- /package/dist/public/assets/{skeleton-BOVIbSHk.js → skeleton-D4wPMdlV.js} +0 -0
- /package/dist/public/assets/{sortable.esm-mqYoEMD5.js → sortable.esm-Dd5A8_XI.js} +0 -0
- /package/dist/public/assets/{sql-BTcd-g6A.js → sql-PCnKIGcH.js} +0 -0
- /package/dist/public/assets/{src-D2oHIihg.js → src-DlFhp60C.js} +0 -0
- /package/dist/public/assets/{startup-marks-BYurBbnW.js → startup-marks-Cdkh8q3E.js} +0 -0
- /package/dist/public/assets/{stex-BmYSnOnf.js → stex-PMopVeEZ.js} +0 -0
- /package/dist/public/assets/{swift-CnW5XUwC.js → swift-BxR8RYdU.js} +0 -0
- /package/dist/public/assets/{terminal-command-events-mSM3ArSl.js → terminal-command-events-DXmeHtnk.js} +0 -0
- /package/dist/public/assets/{textarea-D59GB_Zy.js → textarea-yZk4yd9U.js} +0 -0
- /package/dist/public/assets/{thread-draft-staging-BZaq81Sj.js → thread-draft-staging-BG7XGHEN.js} +0 -0
- /package/dist/public/assets/{timeline-diff-store-cCBpDgND.js → timeline-diff-store-DnRthkM7.js} +0 -0
- /package/dist/public/assets/{toml-vEnVjPi4.js → toml-nuQJU7MH.js} +0 -0
- /package/dist/public/assets/{trace-api-DH580DYm.js → trace-api-18gcBe0u.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-CdB0ME5s.js → use-installed-clis-Cydpb5jd.js} +0 -0
- /package/dist/public/assets/{useLintConfigViewMode-C89oTBHY.js → useLintConfigViewMode-DX8l9aBY.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-hgmz1BF7.js → w3c-keyname-Bw5giFqP.js} +0 -0
- /package/dist/public/assets/{workspace-paths-C2pS_Pbn.js → workspace-paths-CKUFX0v6.js} +0 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import{i as e,o as t,t as n}from"./chunk-DTipWd-i.mjs";import{ft as r}from"./sleep-ChZE9826.mjs";import{$o as i,K as a,U as o,jo as s,ms as c}from"./src-DMpGVIiQ.mjs";import{$t as l,Br as u,Cr as d,Ea as f,Ir as p,Lr as m,Rr as h,Zr as g,_n as _,ar as v,c as y,en as b,hn as x,hr as S,ir as ee,kn as te,l as C,mn as ne,or as re,pr as ie,u as ae,wr as oe}from"./src-CLSt7s4C.mjs";import{F as w,N as se}from"./fs-traced-RPXwxrA5.mjs";import{r as ce,t as T}from"./esm-DmX1RzAi.mjs";import{i as E,n as D,o as O,r as le,s as k,t as A}from"./colors-BsmVIwfM.mjs";import{t as ue}from"./constants-FLf5VoJT.mjs";import{t as j}from"./is-object-ByG7RnjH.mjs";import{_ as de,a as fe,c as pe,d as me,i as he,l as ge,o as M,r as _e,t as ve,u as ye}from"./write-project-skill-KUk3TJzG.mjs";import{t as be}from"./preview-DJFUv75T.mjs";import{createRequire as xe}from"node:module";import{execFileSync as Se}from"node:child_process";import Ce,{dirname as N,isAbsolute as P,join as F,relative as I,resolve as we,sep as Te}from"node:path";import L from"node:process";import{fileURLToPath as Ee}from"node:url";import{existsSync as R,lstatSync as De,mkdirSync as Oe,readFileSync as z,readlinkSync as ke,realpathSync as Ae,statSync as je,writeFileSync as Me}from"node:fs";import{homedir as Ne}from"node:os";import*as Pe from"node:readline";import{inspect as Fe,stripVTControlCharacters as Ie,styleText as B}from"node:util";import{AsyncLocalStorage as Le,AsyncResource as Re}from"node:async_hooks";const ze=new Set([`emacs`,`vim`]);function Be(e){return ze.has(e)}function Ve(){let e=process.env.INQUIRER_KEYBINDINGS;return e?Array.from(new Set(e.toLowerCase().split(/[\s,]+/).filter(Be))):[]}const V=(e,t=[])=>e.name===`up`||t.includes(`vim`)&&e.name===`k`||t.includes(`emacs`)&&e.ctrl&&e.name===`p`,He=(e,t=[])=>e.name===`down`||t.includes(`vim`)&&e.name===`j`||t.includes(`emacs`)&&e.ctrl&&e.name===`n`,Ue=e=>e.name===`space`,We=e=>e.name===`backspace`,Ge=e=>`1234567890`.includes(e.name),Ke=e=>e.name===`enter`||e.name===`return`;var qe=class extends Error{name=`AbortPromptError`;message=`Prompt was aborted`;constructor(e){super(),this.cause=e?.cause}},Je=class extends Error{name=`CancelPromptError`;message=`Prompt was canceled`},Ye=class extends Error{name=`ExitPromptError`},Xe=class extends Error{name=`HookError`},Ze=class extends Error{name=`ValidationError`};const Qe=new Le;function $e(e){return{rl:e,hooks:[],hooksCleanup:[],hooksEffect:[],index:0,handleChange(){}}}function et(e,t){let n=$e(e);return Qe.run(n,()=>{function e(e){n.handleChange=()=>{n.index=0,e()},n.handleChange()}return t(e)})}function H(){let e=Qe.getStore();if(!e)throw new Xe(`[Inquirer] Hook functions can only be called from within a prompt`);return e}function tt(){return H().rl}function nt(e){return Re.bind((...t)=>{let n=H(),r=!1,i=n.handleChange;n.handleChange=()=>{r=!0};let a=e(...t);return r&&i(),n.handleChange=i,a})}function rt(e){let t=H(),{index:n}=t,r=e({get(){return t.hooks[n]},set(e){t.hooks[n]=e},initialized:n in t.hooks});return t.index++,r}function it(){H().handleChange()}const at={queue(e){let t=H(),{index:n}=t;t.hooksEffect.push(()=>{t.hooksCleanup[n]?.();let r=e(tt());if(r!=null&&typeof r!=`function`)throw new Ze(`useEffect return value must be a cleanup function or nothing.`);t.hooksCleanup[n]=r})},run(){let e=H();nt(()=>{e.hooksEffect.forEach(e=>{e()}),e.hooksEffect.length=0})()},clearAll(){let e=H();e.hooksCleanup.forEach(e=>{e?.()}),e.hooksEffect.length=0,e.hooksCleanup.length=0}};function ot(e){return typeof e==`function`}function U(e){return rt(t=>{let n=Re.bind(function(e){t.get()!==e&&(t.set(e),it())});if(t.initialized)return[t.get(),n];let r=ot(e)?e():e;return t.set(r),[r,n]})}function st(e,t){rt(n=>{let r=n.get();(!Array.isArray(r)||t.some((e,t)=>!Object.is(e,r[t])))&&at.queue(e),n.set(t)})}function ct(){return L.platform.startsWith(`win`)?!!L.env.CI||!!L.env.WT_SESSION||!!L.env.TERMINUS_SUBLIME||L.env.ConEmuTask===`{cmd::Cmder}`||L.env.TERM_PROGRAM===`Terminus-Sublime`||L.env.TERM_PROGRAM===`vscode`||L.env.TERM===`xterm-256color`||L.env.TERM===`alacritty`||L.env.TERMINAL_EMULATOR===`JetBrains-JediTerm`:L.env.TERM!==`linux`}const lt={circleQuestionMark:`(?)`,questionMarkPrefix:`(?)`,square:`█`,squareDarkShade:`▓`,squareMediumShade:`▒`,squareLightShade:`░`,squareTop:`▀`,squareBottom:`▄`,squareLeft:`▌`,squareRight:`▐`,squareCenter:`■`,bullet:`●`,dot:`․`,ellipsis:`…`,pointerSmall:`›`,triangleUp:`▲`,triangleUpSmall:`▴`,triangleDown:`▼`,triangleDownSmall:`▾`,triangleLeftSmall:`◂`,triangleRightSmall:`▸`,home:`⌂`,heart:`♥`,musicNote:`♪`,musicNoteBeamed:`♫`,arrowUp:`↑`,arrowDown:`↓`,arrowLeft:`←`,arrowRight:`→`,arrowLeftRight:`↔`,arrowUpDown:`↕`,almostEqual:`≈`,notEqual:`≠`,lessOrEqual:`≤`,greaterOrEqual:`≥`,identical:`≡`,infinity:`∞`,subscriptZero:`₀`,subscriptOne:`₁`,subscriptTwo:`₂`,subscriptThree:`₃`,subscriptFour:`₄`,subscriptFive:`₅`,subscriptSix:`₆`,subscriptSeven:`₇`,subscriptEight:`₈`,subscriptNine:`₉`,oneHalf:`½`,oneThird:`⅓`,oneQuarter:`¼`,oneFifth:`⅕`,oneSixth:`⅙`,oneEighth:`⅛`,twoThirds:`⅔`,twoFifths:`⅖`,threeQuarters:`¾`,threeFifths:`⅗`,threeEighths:`⅜`,fourFifths:`⅘`,fiveSixths:`⅚`,fiveEighths:`⅝`,sevenEighths:`⅞`,line:`─`,lineBold:`━`,lineDouble:`═`,lineDashed0:`┄`,lineDashed1:`┅`,lineDashed2:`┈`,lineDashed3:`┉`,lineDashed4:`╌`,lineDashed5:`╍`,lineDashed6:`╴`,lineDashed7:`╶`,lineDashed8:`╸`,lineDashed9:`╺`,lineDashed10:`╼`,lineDashed11:`╾`,lineDashed12:`−`,lineDashed13:`–`,lineDashed14:`‐`,lineDashed15:`⁃`,lineVertical:`│`,lineVerticalBold:`┃`,lineVerticalDouble:`║`,lineVerticalDashed0:`┆`,lineVerticalDashed1:`┇`,lineVerticalDashed2:`┊`,lineVerticalDashed3:`┋`,lineVerticalDashed4:`╎`,lineVerticalDashed5:`╏`,lineVerticalDashed6:`╵`,lineVerticalDashed7:`╷`,lineVerticalDashed8:`╹`,lineVerticalDashed9:`╻`,lineVerticalDashed10:`╽`,lineVerticalDashed11:`╿`,lineDownLeft:`┐`,lineDownLeftArc:`╮`,lineDownBoldLeftBold:`┓`,lineDownBoldLeft:`┒`,lineDownLeftBold:`┑`,lineDownDoubleLeftDouble:`╗`,lineDownDoubleLeft:`╖`,lineDownLeftDouble:`╕`,lineDownRight:`┌`,lineDownRightArc:`╭`,lineDownBoldRightBold:`┏`,lineDownBoldRight:`┎`,lineDownRightBold:`┍`,lineDownDoubleRightDouble:`╔`,lineDownDoubleRight:`╓`,lineDownRightDouble:`╒`,lineUpLeft:`┘`,lineUpLeftArc:`╯`,lineUpBoldLeftBold:`┛`,lineUpBoldLeft:`┚`,lineUpLeftBold:`┙`,lineUpDoubleLeftDouble:`╝`,lineUpDoubleLeft:`╜`,lineUpLeftDouble:`╛`,lineUpRight:`└`,lineUpRightArc:`╰`,lineUpBoldRightBold:`┗`,lineUpBoldRight:`┖`,lineUpRightBold:`┕`,lineUpDoubleRightDouble:`╚`,lineUpDoubleRight:`╙`,lineUpRightDouble:`╘`,lineUpDownLeft:`┤`,lineUpBoldDownBoldLeftBold:`┫`,lineUpBoldDownBoldLeft:`┨`,lineUpDownLeftBold:`┥`,lineUpBoldDownLeftBold:`┩`,lineUpDownBoldLeftBold:`┪`,lineUpDownBoldLeft:`┧`,lineUpBoldDownLeft:`┦`,lineUpDoubleDownDoubleLeftDouble:`╣`,lineUpDoubleDownDoubleLeft:`╢`,lineUpDownLeftDouble:`╡`,lineUpDownRight:`├`,lineUpBoldDownBoldRightBold:`┣`,lineUpBoldDownBoldRight:`┠`,lineUpDownRightBold:`┝`,lineUpBoldDownRightBold:`┡`,lineUpDownBoldRightBold:`┢`,lineUpDownBoldRight:`┟`,lineUpBoldDownRight:`┞`,lineUpDoubleDownDoubleRightDouble:`╠`,lineUpDoubleDownDoubleRight:`╟`,lineUpDownRightDouble:`╞`,lineDownLeftRight:`┬`,lineDownBoldLeftBoldRightBold:`┳`,lineDownLeftBoldRightBold:`┯`,lineDownBoldLeftRight:`┰`,lineDownBoldLeftBoldRight:`┱`,lineDownBoldLeftRightBold:`┲`,lineDownLeftRightBold:`┮`,lineDownLeftBoldRight:`┭`,lineDownDoubleLeftDoubleRightDouble:`╦`,lineDownDoubleLeftRight:`╥`,lineDownLeftDoubleRightDouble:`╤`,lineUpLeftRight:`┴`,lineUpBoldLeftBoldRightBold:`┻`,lineUpLeftBoldRightBold:`┷`,lineUpBoldLeftRight:`┸`,lineUpBoldLeftBoldRight:`┹`,lineUpBoldLeftRightBold:`┺`,lineUpLeftRightBold:`┶`,lineUpLeftBoldRight:`┵`,lineUpDoubleLeftDoubleRightDouble:`╩`,lineUpDoubleLeftRight:`╨`,lineUpLeftDoubleRightDouble:`╧`,lineUpDownLeftRight:`┼`,lineUpBoldDownBoldLeftBoldRightBold:`╋`,lineUpDownBoldLeftBoldRightBold:`╈`,lineUpBoldDownLeftBoldRightBold:`╇`,lineUpBoldDownBoldLeftRightBold:`╊`,lineUpBoldDownBoldLeftBoldRight:`╉`,lineUpBoldDownLeftRight:`╀`,lineUpDownBoldLeftRight:`╁`,lineUpDownLeftBoldRight:`┽`,lineUpDownLeftRightBold:`┾`,lineUpBoldDownBoldLeftRight:`╂`,lineUpDownLeftBoldRightBold:`┿`,lineUpBoldDownLeftBoldRight:`╃`,lineUpBoldDownLeftRightBold:`╄`,lineUpDownBoldLeftBoldRight:`╅`,lineUpDownBoldLeftRightBold:`╆`,lineUpDoubleDownDoubleLeftDoubleRightDouble:`╬`,lineUpDoubleDownDoubleLeftRight:`╫`,lineUpDownLeftDoubleRightDouble:`╪`,lineCross:`╳`,lineBackslash:`╲`,lineSlash:`╱`},ut={tick:`✔`,info:`ℹ`,warning:`⚠`,cross:`✘`,squareSmall:`◻`,squareSmallFilled:`◼`,circle:`◯`,circleFilled:`◉`,circleDotted:`◌`,circleDouble:`◎`,circleCircle:`ⓞ`,circleCross:`ⓧ`,circlePipe:`Ⓘ`,radioOn:`◉`,radioOff:`◯`,checkboxOn:`☒`,checkboxOff:`☐`,checkboxCircleOn:`ⓧ`,checkboxCircleOff:`Ⓘ`,pointer:`❯`,triangleUpOutline:`△`,triangleLeft:`◀`,triangleRight:`▶`,lozenge:`◆`,lozengeOutline:`◇`,hamburger:`☰`,smiley:`㋡`,mustache:`෴`,star:`★`,play:`▶`,nodejs:`⬢`,oneSeventh:`⅐`,oneNinth:`⅑`,oneTenth:`⅒`},dt={tick:`√`,info:`i`,warning:`‼`,cross:`×`,squareSmall:`□`,squareSmallFilled:`■`,circle:`( )`,circleFilled:`(*)`,circleDotted:`( )`,circleDouble:`( )`,circleCircle:`(○)`,circleCross:`(×)`,circlePipe:`(│)`,radioOn:`(*)`,radioOff:`( )`,checkboxOn:`[×]`,checkboxOff:`[ ]`,checkboxCircleOn:`(×)`,checkboxCircleOff:`( )`,pointer:`>`,triangleUpOutline:`∆`,triangleLeft:`◄`,triangleRight:`►`,lozenge:`♦`,lozengeOutline:`◊`,hamburger:`≡`,smiley:`☺`,mustache:`┌─┐`,star:`✶`,play:`►`,nodejs:`♦`,oneSeventh:`1/7`,oneNinth:`1/9`,oneTenth:`1/10`},ft={...lt,...ut},pt={...lt,...dt},W=ct()?ft:pt;Object.entries(ut);const mt={prefix:{idle:B(`blue`,`?`),done:B(`green`,W.tick)},spinner:{interval:80,frames:[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`].map(e=>B(`yellow`,e))},keybindings:[],style:{answer:e=>B(`cyan`,e),message:e=>B(`bold`,e),error:e=>B(`red`,`> ${e}`),defaultAnswer:e=>B(`dim`,`(${e})`),help:e=>B(`dim`,e),highlight:e=>B(`cyan`,e),key:e=>B(`cyan`,B(`bold`,`<${e}>`))}};function ht(){return{...mt,keybindings:Ve()}}function gt(e){if(typeof e!=`object`||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function _t(...e){let t={};for(let n of e)for(let[e,r]of Object.entries(n)){let n=t[e];t[e]=gt(n)&>(r)?_t(n,r):r}return t}function vt(...e){return _t(ht(),...e.filter(e=>e!=null))}function yt({status:e=`idle`,theme:t}){let[n,r]=U(!1),[i,a]=U(0),{prefix:o,spinner:s}=vt(t);return st(()=>{if(e===`loading`){let e,t=-1,n=setTimeout(()=>{r(!0),e=setInterval(()=>{t+=1,a(t%s.frames.length)},s.interval)},300);return()=>{clearTimeout(n),clearInterval(e)}}else r(!1)},[e]),n?s.frames[i]:typeof o==`string`?o:o[e===`loading`?`idle`:e]??o.idle}function bt(e,t){return rt(n=>{let r=n.get();if(!r||r.dependencies.length!==t.length||r.dependencies.some((e,n)=>e!==t[n])){let r=e();return n.set({value:r,dependencies:t}),r}return r.value})}function xt(e){return U({current:e})[0]}function St(e){let t=xt(e);t.current=e,st(e=>{let n=!1,r=nt((r,i)=>{n||t.current(i,e)});return e.input.on(`keypress`,r),()=>{n=!0,e.input.removeListener(`keypress`,r)}},[])}var Ct=t(n(((t,n)=>{n.exports=i;function r(t){let n={defaultWidth:0,output:process.stdout,tty:e(`tty`)};return t?(Object.keys(n).forEach(function(e){t[e]||(t[e]=n[e])}),t):n}function i(e){let t=r(e);if(t.output.getWindowSize)return t.output.getWindowSize()[0]||t.defaultWidth;if(t.tty.getWindowSize)return t.tty.getWindowSize()[1]||t.defaultWidth;if(t.output.columns)return t.output.columns;if(process.env.CLI_WIDTH){let e=parseInt(process.env.CLI_WIDTH,10);if(!isNaN(e)&&e!==0)return e}return t.defaultWidth}}))(),1);const wt=(()=>{let e=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;return t=>{let n=0;for(e.lastIndex=0;e.test(t);)n+=1;return t.length-n}})(),Tt=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,Et=e=>e===8987||e===9001||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e>=131072&&e<=196605||e>=196608&&e<=262141,Dt=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]|\u001b\]8;[^;]*;.*?(?:\u0007|\u001b\u005c)/y,Ot=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,kt=/(?:(?![\uFF61-\uFF9F\uFF00-\uFFEF])[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Tangut}]){1,1000}/uy,At=/\t{1,1000}/y,jt=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,Mt=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,Nt=/\p{M}+/gu,Pt={limit:1/0,ellipsis:``},Ft=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?Ft(i,Pt,n).width:0),o=n.controlWidth??0,s=n.tabWidth??8,c=n.emojiWidth??2,l=n.regularWidth??1,u=n.wideWidth??2,d=[[Mt,l],[Dt,0],[Ot,o],[At,s],[jt,c],[kt,u]],f=0,p=0,m=e.length,h=0,g=!1,_=m,v=Math.max(0,r-a),y=0,b=0,x=0,S=0;outer:for(;;){if(b>y||p>=m&&p>f){let t=e.slice(y,b)||e.slice(f,p);h=0;for(let e of t.replaceAll(Nt,``)){let t=e.codePointAt(0)||0;if(S=Tt(t)?2:Et(t)?u:l,x+S>v&&(_=Math.min(_,Math.max(y,f)+h)),x+S>r){g=!0;break outer}h+=e.length,x+=S}y=b=0}if(p>=m)break outer;for(let t=0,n=d.length;t<n;t++){let[n,i]=d[t];if(n.lastIndex=p,n.test(e)){if(h=n===kt?wt(e.slice(p,n.lastIndex)):n===jt?1:n.lastIndex-p,S=h*i,x+S>v&&(_=Math.min(_,p+Math.floor((v-x)/i))),x+S>r){g=!0;break outer}x+=S,y=f,b=p,p=f=n.lastIndex;continue outer}}p+=1}return{width:g?v:x,index:g?_:m,truncated:g,ellipsed:g&&r>=a}},It={limit:1/0,ellipsis:``,ellipsisWidth:0},G=(e,t={})=>Ft(e,It,t).width,Lt=`]8;;`,Rt=RegExp(`(?:\\[(?<code>\\d+)m|\\${Lt}(?<uri>.*))`,`y`),zt=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},Bt=e=>`[${e}m`,Vt=e=>`${Lt}${e}`,Ht=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:G(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=G(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(Lt,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Ut=e=>{let t=e.split(` `),n=t.length;for(;n&&!G(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Wt=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=G(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=G(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),Ht(s,r,t),c=G(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){Ht(s,r,t),c=G(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){Ht(s,r,t),c=G(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>Ut(e)));let l=s.join(`
|
|
2
|
+
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,u)u=!1;else if(u=t>=`\ud800`&&t<=`\udbff`,u)continue;if(t===`\x1B`||t===``){Rt.lastIndex=e+1;let t=Rt.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
3
|
+
`){a&&(r+=Vt(``));let e=i?zt(i):void 0;i&&e&&(r+=Bt(e))}else t===`
|
|
4
|
+
`&&(i&&zt(i)&&(r+=Bt(i)),a&&(r+=Vt(a)))}return r},Gt=/\r?\n/;function Kt(e,t,n){return String(e).normalize().split(Gt).map(e=>Wt(e,t,n)).join(`
|
|
5
|
+
`)}function qt(e,t){return e.split(`
|
|
6
|
+
`).flatMap(e=>Kt(e,t,{trim:!1,wordWrap:!1}).split(`
|
|
7
|
+
`).map(e=>e.trimEnd())).join(`
|
|
8
|
+
`)}function Jt(){return(0,Ct.default)({defaultWidth:80,output:tt().output})}function Yt({active:e,renderedItems:t,pageSize:n,loop:r}){let i=xt({lastPointer:e,lastActive:void 0}),{lastPointer:a,lastActive:o}=i.current,s=Math.floor(n/2),c=t.reduce((e,t)=>e+t.length,0),l=t.slice(0,e).reduce((e,t)=>e+t.length,0),u=l;if(c>n)if(r)u=a,o!=null&&o<e&&e-o<n&&(u=Math.min(s,Math.abs(e-o)===1?Math.min(a+(t[o]?.length??0),Math.max(l,a)):a+e-o));else{let r=t.slice(e).reduce((e,t)=>e+t.length,0);u=r<n-s?n-r:Math.min(l,s)}return i.current.lastPointer=u,i.current.lastActive=e,u}function Xt({items:e,active:t,renderItem:n,pageSize:r,loop:i=!0}){let a=Jt(),o=t=>(t%e.length+e.length)%e.length,s=e.map((e,r)=>e==null?[]:qt(n({item:e,index:r,isActive:r===t}),a).split(`
|
|
9
|
+
`)),c=s.reduce((e,t)=>e+t.length,0),l=e=>s[e]??[],u=Yt({active:t,renderedItems:s,pageSize:r,loop:i}),d=l(t).slice(0,r),f=u+d.length<=r?u:r-d.length,p=Array.from({length:r});p.splice(f,d.length,...d);let m=new Set([t]),h=f+d.length,g=o(t+1);for(;h<r&&!m.has(g)&&(i&&c>r?g!==t:g>t);){let e=l(g).slice(0,r-h);p.splice(h,e.length,...e),m.add(g),h+=e.length,g=o(g+1)}for(h=f-1,g=o(t-1);h>=0&&!m.has(g)&&(i&&c>r?g!==t:g<t);){let e=l(g),t=e.slice(Math.max(0,e.length-h-1));p.splice(h-t.length+1,t.length,...t),m.add(g),h-=t.length,g=o(g-1)}return p.filter(e=>typeof e==`string`).join(`
|
|
10
|
+
`)}var Zt=t(n(((t,n)=>{let r=e(`stream`);n.exports=class extends r{#e=null;constructor(e={}){super(e),this.writable=this.readable=!0,this.muted=!1,this.on(`pipe`,this._onpipe),this.replace=e.replace,this._prompt=e.prompt||null,this._hadControl=!1}#t(e,t){return this._dest?this._dest[e]:this._src?this._src[e]:t}#n(e,...t){typeof this._dest?.[e]==`function`&&this._dest[e](...t),typeof this._src?.[e]==`function`&&this._src[e](...t)}get isTTY(){return this.#e===null?this.#t(`isTTY`,!1):this.#e}set isTTY(e){this.#e=e}get rows(){return this.#t(`rows`)}get columns(){return this.#t(`columns`)}mute(){this.muted=!0}unmute(){this.muted=!1}_onpipe(e){this._src=e}pipe(e,t){return this._dest=e,super.pipe(e,t)}pause(){if(this._src)return this._src.pause()}resume(){if(this._src)return this._src.resume()}write(e){if(this.muted){if(!this.replace)return!0;if(e.match(/^\u001b/))return e.indexOf(this._prompt)===0&&(e=e.slice(this._prompt.length),e=e.replace(/./g,this.replace),e=this._prompt+e),this._hadControl=!0,this.emit(`data`,e);this._prompt&&this._hadControl&&e.indexOf(this._prompt)===0&&(this._hadControl=!1,this.emit(`data`,this._prompt),e=e.slice(this._prompt.length)),e=e.toString().replace(/./g,this.replace)}this.emit(`data`,e)}end(e){this.muted&&(e=e&&this.replace?e.toString().replace(/./g,this.replace):null),e&&this.emit(`data`,e),this.emit(`end`)}destroy(...e){return this.#n(`destroy`,...e)}destroySoon(...e){return this.#n(`destroySoon`,...e)}close(...e){return this.#n(`close`,...e)}}}))(),1);const K=[];K.push(`SIGHUP`,`SIGINT`,`SIGTERM`),process.platform!==`win32`&&K.push(`SIGALRM`,`SIGABRT`,`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&K.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`);const Qt=e=>!!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`,$t=Symbol.for(`signal-exit emitter`),en=globalThis,tn=Object.defineProperty.bind(Object);var nn=class{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(en[$t])return en[$t];tn(en,$t,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(e,t){this.listeners[e].push(t)}removeListener(e,t){let n=this.listeners[e],r=n.indexOf(t);r!==-1&&(r===0&&n.length===1?n.length=0:n.splice(r,1))}emit(e,t,n){if(this.emitted[e])return!1;this.emitted[e]=!0;let r=!1;for(let i of this.listeners[e])r=i(t,n)===!0||r;return e===`exit`&&(r=this.emit(`afterExit`,t,n)||r),r}},rn=class{};const an=e=>({onExit(t,n){return e.onExit(t,n)},load(){return e.load()},unload(){return e.unload()}});var on=class extends rn{onExit(){return()=>{}}load(){}unload(){}},sn=class extends rn{#e=cn.platform===`win32`?`SIGINT`:`SIGHUP`;#t=new nn;#n;#r;#i;#a={};#o=!1;constructor(e){super(),this.#n=e,this.#a={};for(let t of K)this.#a[t]=()=>{let n=this.#n.listeners(t),{count:r}=this.#t,i=e;if(typeof i.__signal_exit_emitter__==`object`&&typeof i.__signal_exit_emitter__.count==`number`&&(r+=i.__signal_exit_emitter__.count),n.length===r){this.unload();let n=this.#t.emit(`exit`,null,t),r=t===`SIGHUP`?this.#e:t;n||e.kill(e.pid,r)}};this.#i=e.reallyExit,this.#r=e.emit}onExit(e,t){if(!Qt(this.#n))return()=>{};this.#o===!1&&this.load();let n=t?.alwaysLast?`afterExit`:`exit`;return this.#t.on(n,e),()=>{this.#t.removeListener(n,e),this.#t.listeners.exit.length===0&&this.#t.listeners.afterExit.length===0&&this.unload()}}load(){if(!this.#o){this.#o=!0,this.#t.count+=1;for(let e of K)try{let t=this.#a[e];t&&this.#n.on(e,t)}catch{}this.#n.emit=(e,...t)=>this.#c(e,...t),this.#n.reallyExit=e=>this.#s(e)}}unload(){this.#o&&(this.#o=!1,K.forEach(e=>{let t=this.#a[e];if(!t)throw Error(`Listener not defined for signal: `+e);try{this.#n.removeListener(e,t)}catch{}}),this.#n.emit=this.#r,this.#n.reallyExit=this.#i,--this.#t.count)}#s(e){return Qt(this.#n)?(this.#n.exitCode=e||0,this.#t.emit(`exit`,this.#n.exitCode,null),this.#i.call(this.#n,this.#n.exitCode)):0}#c(e,...t){let n=this.#r;if(e===`exit`&&Qt(this.#n)){typeof t[0]==`number`&&(this.#n.exitCode=t[0]);let r=n.call(this.#n,e,...t);return this.#t.emit(`exit`,this.#n.exitCode,null),r}else return n.call(this.#n,e,...t)}};const cn=globalThis.process,{onExit:ln,load:un,unload:dn}=an(Qt(cn)?new sn(cn):new on),fn=`\x1B[?25l`,pn=(e=1)=>e>0?`[${e}A`:``,mn=(e=1)=>e>0?`[${e}B`:``,hn=(e,t)=>typeof t==`number`&&!Number.isNaN(t)?`[${t+1};${e+1}H`:`[${e+1}G`,gn=`\x1B[2K`,_n=e=>e>0?(gn+pn(1)).repeat(e-1)+gn+`\x1B[G`:``,vn=e=>e.split(`
|
|
11
|
+
`).length,yn=e=>e.split(`
|
|
12
|
+
`).pop()??``;var bn=class{height=0;extraLinesUnderPrompt=0;cursorPos;rl;constructor(e){this.rl=e,this.cursorPos=e.getCursorPos()}write(e){this.rl.output.unmute(),this.rl.output.write(e),this.rl.output.mute()}render(e,t=``){let n=Ie(yn(e)),r=n;this.rl.line.length>0&&(r=r.slice(0,-this.rl.line.length)),this.rl.setPrompt(r),this.cursorPos=this.rl.getCursorPos();let i=Jt();e=qt(e,i),t=qt(t,i),n.length%i===0&&(e+=`
|
|
13
|
+
`);let a=e+(t?`
|
|
14
|
+
`+t:``),o=Math.floor(n.length/i)-this.cursorPos.rows+(t?vn(t):0);o>0&&(a+=pn(o)),a+=hn(this.cursorPos.cols),this.write(mn(this.extraLinesUnderPrompt)+_n(this.height)+a),this.extraLinesUnderPrompt=o,this.height=vn(a)}checkCursorPos(){let e=this.rl.getCursorPos();e.cols!==this.cursorPos.cols&&(this.write(hn(e.cols)),this.cursorPos=e)}done({clearContent:e}){this.rl.setPrompt(``);let t=mn(this.extraLinesUnderPrompt);t+=e?_n(this.height):`
|
|
15
|
+
`,t+=`\x1B[G`,t+=`\x1B[?25h`,this.write(t),this.rl.close()}},xn=class extends Promise{static withResolver(){let e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}};const Sn=globalThis.setImmediate;function Cn(){let e=Error.prepareStackTrace,t=[];try{Error.prepareStackTrace=(e,n)=>{let r=n.slice(1);return t=r,r},Error().stack}catch{return t}return Error.prepareStackTrace=e,t}function wn(e){let t=Cn();return(n,r={})=>{let{input:i=process.stdin,signal:a}=r,o=new Set,s=new Zt.default;s.pipe(r.output??process.stdout);let c=Pe.createInterface({terminal:!0,input:i,output:s});s.mute();let l=new bn(c),{promise:u,resolve:d,reject:f}=xn.withResolver(),p=()=>f(new Je);if(a){let e=()=>f(new qe({cause:a.reason}));if(a.aborted)return e(),Object.assign(u,{cancel:p});a.addEventListener(`abort`,e),o.add(()=>a.removeEventListener(`abort`,e))}o.add(ln((e,t)=>{f(new Ye(`User force closed the prompt with ${e} ${t}`))}));let m=()=>f(new Ye(`User force closed the prompt with SIGINT`));return c.on(`SIGINT`,m),o.add(()=>c.removeListener(`SIGINT`,m)),et(c,a=>{let m=Re.bind(()=>at.clearAll());c.on(`close`,m),o.add(()=>c.removeListener(`close`,m));let h=()=>{let r=()=>l.checkCursorPos();c.input.on(`keypress`,r),o.add(()=>c.input.removeListener(`keypress`,r));let i=null;a(()=>{let r=!1;try{let a=e(n,e=>{r?d(e):i={value:e}});if(a===void 0){let e=t[1]?.getFileName();throw e&&!e.startsWith(`file://`)&&(e=Ce.resolve(e)),Error(`Prompt functions must return a string.\n at ${e}`)}let[o,s]=typeof a==`string`?[a]:a;l.render(o,s),at.run()}catch(e){f(e)}if(r=!0,i!==null){let{value:e}=i;i=null,d(e)}})};return`readableFlowing`in i?Sn(h):h(),Object.assign(u.then(e=>(at.clearAll(),e),e=>{throw at.clearAll(),e}).finally(()=>{o.forEach(e=>e()),l.done({clearContent:!!r.clearPromptOnDone}),s.end()}).then(()=>u),{cancel:p})})}}var q=class{separator=B(`dim`,Array.from({length:15}).join(W.line));type=`separator`;constructor(e){e&&(this.separator=e)}static isSeparator(e){return!!(e&&typeof e==`object`&&`type`in e&&e.type===`separator`)}},Tn=r();const En=`**/.ok/*`,Dn=`!**/${c}/`;function On(e){let t=[`.ok/`,`.okignore`];for(let n of he){let r=M[n];r.projectConfigPath&&t.push(zn(r.projectConfigPath(e),e))}t.push(`.claude/launch.json`);let n=F(e,...o);if(R(n))try{let e=a(z(n,`utf-8`));if(e){for(let[n,r]of Object.entries(e.skills))if(n!==`open-knowledge`)for(let e of r.hosts){let r=i[e];r&&t.push(`${r}/${n}/`)}}}catch{}return Array.from(new Set(t))}function kn(e,t){let n=Pn(e,t).tracked;if(n.length>0)return{kind:`refused-tracked`,tracked:n,remediation:Fn(n)};let r=J(e);if(r.kind!==`ok`)return r.result;let i=R(r.path)?z(r.path,`utf-8`):``,a=Rn(i),o=[],s=[];for(let e of t)Ln(a,e)?s.push(e):o.push(e);if(o.length===0)return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]};let c=i.length===0||i.endsWith(`
|
|
16
|
+
`)?``:`
|
|
17
|
+
`,l=`${o.join(`
|
|
18
|
+
`)}\n`;try{Me(r.path,`${i}${c}${l}`,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:o,alreadyPresent:s,removed:[]}}function An(e,t){let n=J(e);if(n.kind!==`ok`)return n.result;if(!R(n.path))return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let r=t.map(e=>In(e)),i=new Set;for(let e of r)for(let t of e)i.add(t);i.add(En),i.add(Dn);let a;try{a=z(n.path,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}let o=a.split(`
|
|
19
|
+
`),s=new Set,c=[];for(let e of o){let t=e.trim();if(i.has(t)){s.add(t);continue}c.push(e)}let l=t.filter(e=>{for(let t of In(e))if(s.has(t))return!0;return!1});if(s.size===0)return{kind:`updated`,appended:[],alreadyPresent:[],removed:[]};let u=c.join(`
|
|
20
|
+
`);if(u!==a)try{Me(n.path,u,`utf-8`)}catch{return{kind:`no-exclude`,reason:`inaccessible`}}return{kind:`updated`,appended:[],alreadyPresent:[],removed:l}}function jn(e){let t=J(e);if(t.kind!==`ok`)return t.result.reason===`no-git`||t.result.reason===`malformed-pointer`||t.result.reason===`inaccessible`?`no-git`:`shared`;if(!R(t.path))return`shared`;let n;try{n=z(t.path,`utf-8`)}catch{return`shared`}let r=Rn(n),i=On(e);for(let e of i)if(Ln(r,e))return`local-only`;return r.has(En)?`local-only`:`shared`}function Mn(e){let t=J(e);if(t.kind!==`ok`||!R(t.path))return[];let n;try{n=z(t.path,`utf-8`)}catch{return[]}let r=Rn(n);return On(e).filter(e=>Ln(r,e))}function Nn(e){let t=J(e);if(t.kind!==`ok`||!R(t.path))return!1;let n;try{n=z(t.path,`utf-8`)}catch{return!1}let r=Rn(n);return r.has(En)&&r.has(Dn)}function Pn(e,t){let n=[];for(let r of t)if(R(we(e,r)))try{Se(`git`,[`ls-files`,`--error-unmatch`,`--`,r],g({cwd:e,stdio:[`ignore`,`ignore`,`ignore`]})),n.push(r)}catch{}return{tracked:n}}function Fn(e){let t=[];t.push(`Cannot switch OpenKnowledge to local-only — these OK files are tracked upstream:`),t.push(``);for(let n of e)t.push(` ${n}`);t.push(``),t.push(`.git/info/exclude only hides files that git isn't already tracking. To proceed, untrack them first:`),t.push(``);for(let n of e){let e=n.replace(/\/$/,``),r=n.endsWith(`/`)?`-r `:``;t.push(` git rm --cached ${r}${e}`)}return t.push(``),t.push("Then re-run the command. Note: `git rm --cached` removes the files from the index — your teammates will see a deletion on their next pull. If you don't want that, leave sharing mode set to 'shared'."),t.join(`
|
|
21
|
+
`)}function J(e){let t=f(e);switch(t.kind){case`repository`:{let e=t.repository.readCommonDir();if(e.kind===`unreadable`)return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}};let n=F(e.path,`info`);return R(n)?{kind:`ok`,path:F(n,`exclude`)}:{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`no-info-dir`}}}case`absent`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`no-git`}};case`malformed-pointer`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`malformed-pointer`}};case`inaccessible`:return{kind:`no-exclude`,result:{kind:`no-exclude`,reason:`inaccessible`}}}}function In(e){let t=e.replace(/\/$/,``);return new Set([e,t,`/${e}`,`/${t}`])}function Ln(e,t){for(let n of In(t))if(e.has(n))return!0;return!1}function Rn(e){let t=new Set;for(let n of e.split(`
|
|
22
|
+
`)){let e=n.trim();e.length!==0&&t.add(e)}return t}function zn(e,t){return Bn(I(t,e))}function Bn(e){return Te===`/`?e:e.split(Te).join(`/`)}function Vn(e){for(let t of e.split(`
|
|
23
|
+
`)){let e=t.trimStart();if(!(e.length===0||e.length===t.length))return t.charCodeAt(0)===9?{insertSpaces:!1,tabSize:1}:{insertSpaces:!0,tabSize:t.length-e.length}}return{insertSpaces:!0,tabSize:2}}function Hn(e){let t=(e.match(/\r\n/g)??[]).length;return t===0?!1:t>=(e.match(/\n/g)??[]).length-t}function Y(e){try{return je(e).mode&511}catch{return}}function Un(e,t){let n=e.charCodeAt(0)===65279,r=n?e.slice(1):e,i=r.includes(`\r
|
|
24
|
+
`)?`\r
|
|
25
|
+
`:`
|
|
26
|
+
`,a=h(r,t,void 0,{formattingOptions:{...Vn(r),eol:i}});if(a.length===0)return{text:e,changed:!1};let o=`${n?``:``}${p(r,a)}`;return{text:o,changed:o!==e}}const Wn={icon:{checked:B(`green`,W.circleFilled),unchecked:W.circle,cursor:W.pointer,disabledChecked:B(`green`,W.circleDouble),disabledUnchecked:`-`},style:{disabled:e=>B(`dim`,e),renderSelectedChoices:e=>e.map(e=>e.short).join(`, `),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be toggled.`}};function Gn(e){return!q.isSeparator(e)&&!e.disabled}function Kn(e){return!q.isSeparator(e)}function qn(e){return!q.isSeparator(e)&&e.checked}function Jn(e){return Gn(e)?{...e,checked:!e.checked}:e}function Yn(e){return function(t){return Gn(t)?{...t,checked:e}:t}}function Xn(e){return e.map(e=>{if(q.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,checkedName:t,disabled:!1,checked:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,checkedName:e.checkedName??t,disabled:e.disabled??!1,checked:e.checked??!1};return e.description&&(n.description=e.description),n})}var Zn=wn((e,t)=>{let{pageSize:n=7,loop:r=!0,required:i,validate:a=()=>!0}=e,o={all:`a`,invert:`i`,...e.shortcuts},s=vt(Wn,e.theme),{keybindings:c}=s,[l,u]=U(`idle`),d=yt({status:l,theme:s}),[f,p]=U(Xn(e.choices)),m=bt(()=>{let e=f.findIndex(Kn),t=f.findLastIndex(Kn);if(e===-1)throw new Ze(`[checkbox prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[f]),[h,g]=U(m.first),[_,v]=U();St(async e=>{if(Ke(e)){let e=f.filter(qn),n=await a([...e]);i&&!e.length?v(`At least one choice must be selected`):n===!0?(u(`done`),t(e.map(e=>e.value))):v(n||`You must select a valid value`)}else if(V(e,c)||He(e,c)){if(_&&v(void 0),r||V(e,c)&&h!==m.first||He(e,c)&&h!==m.last){let t=V(e,c)?-1:1,n=h;do n=(n+t+f.length)%f.length;while(!Kn(f[n]));g(n)}}else if(Ue(e)){let e=f[h];e&&!q.isSeparator(e)&&(e.disabled?v(s.i18n.disabledError):(v(void 0),p(f.map((e,t)=>t===h?Jn(e):e))))}else if(e.name===o.all){let e=f.some(e=>Gn(e)&&!e.checked);p(f.map(Yn(e)))}else if(e.name===o.invert)p(f.map(Jn));else if(Ge(e)){let t=Number(e.name)-1,n=-1,r=f.findIndex(e=>q.isSeparator(e)?!1:(n++,n===t)),i=f[r];i&&Gn(i)&&(g(r),p(f.map((e,t)=>t===r?Jn(e):e)))}});let y=s.style.message(e.message,l),b,x=Xt({items:f,active:h,renderItem({item:e,isActive:t}){if(q.isSeparator(e))return` ${e.separator}`;let n=t?s.icon.cursor:` `;if(e.disabled){let t=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=e.checked?s.icon.disabledChecked:s.icon.disabledUnchecked;return s.style.disabled(`${n}${r} ${e.name} ${t}`)}t&&(b=e.description);let r=e.checked?s.icon.checked:s.icon.unchecked,i=e.checked?e.checkedName:e.name;return(t?s.style.highlight:e=>e)(`${n}${r} ${i}`)},pageSize:n,loop:r});if(l===`done`){let e=f.filter(qn);return[d,y,s.style.answer(s.style.renderSelectedChoices(e,f))].filter(Boolean).join(` `)}let S=[[`↑↓`,`navigate`],[`space`,`select`]];o.all&&S.push([o.all,`all`]),o.invert&&S.push([o.invert,`invert`]),S.push([`⏎`,`submit`]);let ee=s.style.keysHelpTip(S);return`${[[d,y].filter(Boolean).join(` `),x,` `,b?s.style.description(b):``,_?s.style.error(_):``,ee].filter(Boolean).join(`
|
|
27
|
+
`).trimEnd()}${fn}`});const Qn={icon:{cursor:W.pointer},style:{disabled:e=>B(`dim`,e),description:e=>B(`cyan`,e),keysHelpTip:e=>e.map(([e,t])=>`${B(`bold`,e)} ${B(`dim`,t)}`).join(B(`dim`,` • `))},i18n:{disabledError:`This option is disabled and cannot be selected.`},indexMode:`hidden`};function $n(e){return!q.isSeparator(e)&&!e.disabled}function er(e){return!q.isSeparator(e)}function tr(e){return e.map(e=>{if(q.isSeparator(e))return e;if(typeof e!=`object`||!e||!(`value`in e)){let t=String(e);return{value:e,name:t,short:t,disabled:!1}}let t=e.name??String(e.value),n={value:e.value,name:t,short:e.short??t,disabled:e.disabled??!1};return e.description&&(n.description=e.description),n})}var nr=wn((e,t)=>{let{loop:n=!0,pageSize:r=7}=e,i=vt(Qn,e.theme),{keybindings:a}=i,[o,s]=U(`idle`),c=yt({status:o,theme:i}),l=xt(),u=!a.includes(`vim`),d=bt(()=>tr(e.choices),[e.choices]),f=bt(()=>{let e=d.findIndex(er),t=d.findLastIndex(er);if(e===-1)throw new Ze(`[select prompt] No selectable choices. All choices are disabled.`);return{first:e,last:t}},[d]),p=bt(()=>`default`in e?d.findIndex(t=>$n(t)&&t.value===e.default):-1,[e.default,d]),[m,h]=U(p===-1?f.first:p),g=d[m];if(g==null||q.isSeparator(g))throw Error(`Active index does not point to a choice`);let[_,v]=U();St((e,r)=>{if(clearTimeout(l.current),_&&v(void 0),Ke(e))g.disabled?v(i.i18n.disabledError):(s(`done`),t(g.value));else if(V(e,a)||He(e,a)){if(r.clearLine(0),n||V(e,a)&&m!==f.first||He(e,a)&&m!==f.last){let t=V(e,a)?-1:1,n=m;do n=(n+t+d.length)%d.length;while(!er(d[n]));h(n)}}else if(Ge(e)&&!Number.isNaN(Number(r.line))){let e=Number(r.line)-1,t=-1,n=d.findIndex(n=>q.isSeparator(n)?!1:(t++,t===e)),i=d[n];i!=null&&$n(i)&&h(n),l.current=setTimeout(()=>{r.clearLine(0)},700)}else if(We(e))r.clearLine(0);else if(u){let e=r.line.toLowerCase(),t=d.findIndex(t=>q.isSeparator(t)||!$n(t)?!1:t.name.toLowerCase().startsWith(e));t!==-1&&h(t),l.current=setTimeout(()=>{r.clearLine(0)},700)}}),st(()=>()=>{clearTimeout(l.current)},[]);let y=i.style.message(e.message,o),b=i.style.keysHelpTip([[`↑↓`,`navigate`],[`⏎`,`select`]]),x=0,S=Xt({items:d,active:m,renderItem({item:e,isActive:t,index:n}){if(q.isSeparator(e))return x++,` ${e.separator}`;let r=t?i.icon.cursor:` `,a=i.indexMode===`number`?`${n+1-x}. `:``;if(e.disabled){let n=typeof e.disabled==`string`?e.disabled:`(disabled)`,r=t?i.icon.cursor:`-`;return i.style.disabled(`${r} ${a}${e.name} ${n}`)}return(t?i.style.highlight:e=>e)(`${r} ${a}${e.name}`)},pageSize:r,loop:n});if(o===`done`)return[c,y,i.style.answer(g.short)].filter(Boolean).join(` `);let{description:ee}=g;return`${[[c,y].filter(Boolean).join(` `),S,` `,ee?i.style.description(ee):``,_?i.style.error(_):``,b].filter(Boolean).join(`
|
|
28
|
+
`).trimEnd()}${fn}`});
|
|
29
|
+
/*!
|
|
30
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
31
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
32
|
+
*
|
|
33
|
+
* Redistribution and use in source and binary forms, with or without
|
|
34
|
+
* modification, are permitted provided that the following conditions are met:
|
|
35
|
+
*
|
|
36
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
37
|
+
* list of conditions and the following disclaimer.
|
|
38
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
39
|
+
* this list of conditions and the following disclaimer in the
|
|
40
|
+
* documentation and/or other materials provided with the distribution.
|
|
41
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
42
|
+
* may be used to endorse or promote products derived from this software without
|
|
43
|
+
* specific prior written permission.
|
|
44
|
+
*
|
|
45
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
46
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
47
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
48
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
49
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
50
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
51
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
52
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
53
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
54
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
55
|
+
*/
|
|
56
|
+
let rr=/^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;var ir=class e extends Date{#e=!1;#t=!1;#n=null;constructor(e){let t=!0,n=!0,r=`Z`;if(typeof e==`string`){let i=e.match(rr);i?(i[1]||(t=!1,e=`0000-01-01T${e}`),n=!!i[2],n&&e[10]===` `&&(e=e.replace(` `,`T`)),i[2]&&+i[2]>23?e=``:(r=i[3]||null,e=e.toUpperCase(),!r&&n&&(e+=`Z`))):e=``}super(e),isNaN(this.getTime())||(this.#e=t,this.#t=n,this.#n=r)}isDateTime(){return this.#e&&this.#t}isLocal(){return!this.#e||!this.#t||!this.#n}isDate(){return this.#e&&!this.#t}isTime(){return this.#t&&!this.#e}isValid(){return this.#e||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#n===null)return e.slice(0,-1);if(this.#n===`Z`)return e;let t=this.#n.slice(1,3)*60+ +this.#n.slice(4,6);return t=this.#n[0]===`-`?t:-t,new Date(this.getTime()-t*6e4).toISOString().slice(0,-1)+this.#n}static wrapAsOffsetDateTime(t,n=`Z`){let r=new e(t);return r.#n=n,r}static wrapAsLocalDateTime(t){let n=new e(t);return n.#n=null,n}static wrapAsLocalDate(t){let n=new e(t);return n.#t=!1,n.#n=null,n}static wrapAsLocalTime(t){let n=new e(t);return n.#e=!1,n.#n=null,n}};
|
|
57
|
+
/*!
|
|
58
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
59
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
|
+
*
|
|
61
|
+
* Redistribution and use in source and binary forms, with or without
|
|
62
|
+
* modification, are permitted provided that the following conditions are met:
|
|
63
|
+
*
|
|
64
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
65
|
+
* list of conditions and the following disclaimer.
|
|
66
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
67
|
+
* this list of conditions and the following disclaimer in the
|
|
68
|
+
* documentation and/or other materials provided with the distribution.
|
|
69
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
70
|
+
* may be used to endorse or promote products derived from this software without
|
|
71
|
+
* specific prior written permission.
|
|
72
|
+
*
|
|
73
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
74
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
75
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
76
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
77
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
78
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
79
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
80
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
81
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
82
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
83
|
+
*/
|
|
84
|
+
function ar(e,t){let n=e.slice(0,t).split(/\r\n|\n|\r/g);return[n.length,n.pop().length+1]}function or(e,t,n){let r=e.split(/\r\n|\n|\r/g),i=``,a=(Math.log10(t+1)|0)+1;for(let e=t-1;e<=t+1;e++){let o=r[e-1];o&&(i+=e.toString().padEnd(a,` `),i+=`: `,i+=o,i+=`
|
|
85
|
+
`,e===t&&(i+=` `.repeat(a+n+2),i+=`^
|
|
86
|
+
`))}return i}var X=class extends Error{line;column;codeblock;constructor(e,t){let[n,r]=ar(t.toml,t.ptr),i=or(t.toml,n,r);super(`Invalid TOML document: ${e}\n\n${i}`,t),this.line=n,this.column=r,this.codeblock=i}};
|
|
87
|
+
/*!
|
|
88
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
89
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
90
|
+
*
|
|
91
|
+
* Redistribution and use in source and binary forms, with or without
|
|
92
|
+
* modification, are permitted provided that the following conditions are met:
|
|
93
|
+
*
|
|
94
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
95
|
+
* list of conditions and the following disclaimer.
|
|
96
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
97
|
+
* this list of conditions and the following disclaimer in the
|
|
98
|
+
* documentation and/or other materials provided with the distribution.
|
|
99
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
100
|
+
* may be used to endorse or promote products derived from this software without
|
|
101
|
+
* specific prior written permission.
|
|
102
|
+
*
|
|
103
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
104
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
105
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
106
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
107
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
108
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
109
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
110
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
111
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
112
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
113
|
+
*/
|
|
114
|
+
let sr=/^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/,cr=/^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/,lr=/^[+-]?0[0-9_]/;function ur(e,t){let n=e[t++],r=n,i=n===`'`,a=n===e[t]&&n===e[t+1];a&&(e[t+=2]===`
|
|
115
|
+
`?t++:e[t]===`\r`&&e[t+1]===`
|
|
116
|
+
`&&(t+=2));let o=``,s=t,c=0;for(let l=t;l<e.length;l++)if(n=e[l],a&&(n===`
|
|
117
|
+
`||n===`\r`&&e[l+1]===`
|
|
118
|
+
`))c&&=3;else if(n<` `&&n!==` `||n===``)throw new X(`control characters are not allowed in strings`,{toml:e,ptr:l});else if((!c||c===3)&&n===r&&(!a||e[l+1]===r&&e[l+2]===r))return a&&(e[l+3]===r&&l++,e[l+3]===r&&l++),[c?o:o+e.slice(s,l),l+(a?3:1)];else if(!c)!i&&n===`\\`&&(o+=e.slice(s,s=l),c=1);else if(c===1)if(n===`x`||n===`u`||n===`U`){let t=0,r=n===`x`?2:n===`u`?4:8;for(let n=0;n<r;n++,l++){let n=e.charCodeAt(l+1),r=n>=48&&n<=57?n-48:n>=65&&n<=70?n-65+10:n>=97&&n<=102?n-97+10:-1;if(r<0)throw new X(`invalid non-hex character in unicode escape`,{toml:e,ptr:l+1});t=t<<4|r}if(t<0||t>1114111||t>=55296&&t<=57343)throw new X(`invalid unicode escape`,{toml:e,ptr:l});o+=String.fromCodePoint(t),s=l+1,c=0}else if(n===` `||n===` `)c=2;else{if(n===`b`)o+=`\b`;else if(n===`t`)o+=` `;else if(n===`n`)o+=`
|
|
119
|
+
`;else if(n===`f`)o+=`\f`;else if(n===`r`)o+=`\r`;else if(n===`e`)o+=`\x1B`;else if(n===`"`)o+=`"`;else if(n===`\\`)o+=`\\`;else throw new X(`unrecognized escape sequence`,{toml:e,ptr:l});s=l+1,c=0}else if(n!==` `&&n!==` `){if(c===2)throw new X(`invalid escape: only line-ending whitespace may be escaped`,{toml:e,ptr:s});c=+(!i&&n===`\\`),s=l}throw new X(`unfinished string`,{toml:e,ptr:t})}function dr(e,t,n,r){if(e===`true`)return!0;if(e===`false`)return!1;if(e===`-inf`)return-1/0;if(e===`inf`||e===`+inf`)return 1/0;if(e===`nan`||e===`+nan`||e===`-nan`)return NaN;if(e===`-0`)return r?0n:0;let i=sr.test(e);if(i||cr.test(e)){if(lr.test(e))throw new X(`leading zeroes are not allowed`,{toml:t,ptr:n});e=e.replace(/_/g,``);let a=+e;if(isNaN(a))throw new X(`invalid number`,{toml:t,ptr:n});if(i){if((i=!Number.isSafeInteger(a))&&!r)throw new X(`integer value cannot be represented losslessly`,{toml:t,ptr:n});(i||r===!0)&&(a=BigInt(e))}return a}let a=new ir(e);if(!a.isValid())throw new X(`invalid value`,{toml:t,ptr:n});return a}
|
|
120
|
+
/*!
|
|
121
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
122
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
123
|
+
*
|
|
124
|
+
* Redistribution and use in source and binary forms, with or without
|
|
125
|
+
* modification, are permitted provided that the following conditions are met:
|
|
126
|
+
*
|
|
127
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
128
|
+
* list of conditions and the following disclaimer.
|
|
129
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
130
|
+
* this list of conditions and the following disclaimer in the
|
|
131
|
+
* documentation and/or other materials provided with the distribution.
|
|
132
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
133
|
+
* may be used to endorse or promote products derived from this software without
|
|
134
|
+
* specific prior written permission.
|
|
135
|
+
*
|
|
136
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
137
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
138
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
139
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
140
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
141
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
142
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
143
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
144
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
145
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
146
|
+
*/
|
|
147
|
+
function fr(e,t=0,n=e.length){let r=e.indexOf(`
|
|
148
|
+
`,t);return e[r-1]===`\r`&&r--,r<=n?r:-1}function pr(e,t){for(let n=t;n<e.length;n++){let r=e[n];if(r===`
|
|
149
|
+
`)return n;if(r===`\r`&&e[n+1]===`
|
|
150
|
+
`)return n+1;if(r<` `&&r!==` `||r===``)throw new X(`control characters are not allowed in comments`,{toml:e,ptr:t})}return e.length}function Z(e,t,n,r){let i;for(;;){for(;(i=e[t])===` `||i===` `||!n&&(i===`
|
|
151
|
+
`||i===`\r`&&e[t+1]===`
|
|
152
|
+
`);)t++;if(r||i!==`#`)break;t=pr(e,t)}return t}function mr(e,t,n,r,i=!1){if(!r)return t=fr(e,t),t<0?e.length:t;for(let a=t;a<e.length;a++){let t=e[a];if(t===`#`)a=fr(e,a);else if(t===n)return a+1;else if(t===r||i&&(t===`
|
|
153
|
+
`||t===`\r`&&e[a+1]===`
|
|
154
|
+
`))return a}throw new X(`cannot find end of structure`,{toml:e,ptr:t})}
|
|
155
|
+
/*!
|
|
156
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
157
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
158
|
+
*
|
|
159
|
+
* Redistribution and use in source and binary forms, with or without
|
|
160
|
+
* modification, are permitted provided that the following conditions are met:
|
|
161
|
+
*
|
|
162
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
163
|
+
* list of conditions and the following disclaimer.
|
|
164
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
165
|
+
* this list of conditions and the following disclaimer in the
|
|
166
|
+
* documentation and/or other materials provided with the distribution.
|
|
167
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
168
|
+
* may be used to endorse or promote products derived from this software without
|
|
169
|
+
* specific prior written permission.
|
|
170
|
+
*
|
|
171
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
172
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
173
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
174
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
175
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
176
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
177
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
178
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
179
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
180
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
181
|
+
*/
|
|
182
|
+
function hr(e,t,n){let r=e.slice(t,n),i=r.indexOf(`#`);return i>-1&&(pr(e,i),r=r.slice(0,i)),[r.trimEnd(),i]}function gr(e,t,n,r,i){if(r===0)throw new X(`document contains excessively nested structures. aborting.`,{toml:e,ptr:t});let a=e[t];if(a===`[`||a===`{`){let[o,s]=a===`[`?br(e,t,r,i):yr(e,t,r,i);if(n){if(s=Z(e,s),e[s]===`,`)s++;else if(e[s]!==n)throw new X(`expected comma or end of structure`,{toml:e,ptr:s})}return[o,s]}if(a===`"`||a===`'`){let[r,i]=ur(e,t);if(n){if(i=Z(e,i),e[i]&&e[i]!==`,`&&e[i]!==n&&e[i]!==`
|
|
183
|
+
`&&e[i]!==`\r`)throw new X(`unexpected character encountered`,{toml:e,ptr:i});e[i]===`,`&&i++}return[r,i]}let o=mr(e,t,`,`,n),s=hr(e,t,o-+(e[o-1]===`,`));if(!s[0])throw new X(`incomplete key-value declaration: no value specified`,{toml:e,ptr:t});return n&&s[1]>-1&&(o=Z(e,t+s[1]),e[o]===`,`&&o++),[dr(s[0],e,t,i),o]}
|
|
184
|
+
/*!
|
|
185
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
186
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
187
|
+
*
|
|
188
|
+
* Redistribution and use in source and binary forms, with or without
|
|
189
|
+
* modification, are permitted provided that the following conditions are met:
|
|
190
|
+
*
|
|
191
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
192
|
+
* list of conditions and the following disclaimer.
|
|
193
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
194
|
+
* this list of conditions and the following disclaimer in the
|
|
195
|
+
* documentation and/or other materials provided with the distribution.
|
|
196
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
197
|
+
* may be used to endorse or promote products derived from this software without
|
|
198
|
+
* specific prior written permission.
|
|
199
|
+
*
|
|
200
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
201
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
202
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
203
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
204
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
205
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
206
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
207
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
208
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
209
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
210
|
+
*/
|
|
211
|
+
let _r=/^[a-zA-Z0-9-_]+[ \t]*$/;function vr(e,t,n=`=`){let r=t-1,i=[],a=e.indexOf(n,t);if(a<0)throw new X(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});do{let o=e[t=++r];if(o!==` `&&o!==` `)if(o===`"`||o===`'`){if(o===e[t+1]&&o===e[t+2])throw new X(`multiline strings are not allowed in keys`,{toml:e,ptr:t});let[s,c]=ur(e,t);r=e.indexOf(`.`,c);let l=e.slice(c,r<0||r>a?a:r),u=fr(l);if(u>-1)throw new X(`newlines are not allowed in keys`,{toml:e,ptr:t+r+u});if(l.trimStart())throw new X(`found extra tokens after the string part`,{toml:e,ptr:c});if(a<c&&(a=e.indexOf(n,c),a<0))throw new X(`incomplete key-value: cannot find end of key`,{toml:e,ptr:t});i.push(s)}else{r=e.indexOf(`.`,t);let n=e.slice(t,r<0||r>a?a:r);if(!_r.test(n))throw new X(`only letter, numbers, dashes and underscores are allowed in keys`,{toml:e,ptr:t});i.push(n.trimEnd())}}while(r+1&&r<a);return[i,Z(e,a+1,!0,!0)]}function yr(e,t,n,r){let i={},a=new Set,o;for(t++;(o=e[t++])!==`}`&&o;)if(o===`,`)throw new X(`expected value, found comma`,{toml:e,ptr:t-1});else if(o===`#`)t=pr(e,t);else if(o!==` `&&o!==` `&&o!==`
|
|
212
|
+
`&&o!==`\r`){let o,s=i,c=!1,[l,u]=vr(e,t-1);for(let n=0;n<l.length;n++){if(n&&(s=c?s[o]:s[o]={}),o=l[n],(c=Object.hasOwn(s,o))&&(typeof s[o]!=`object`||a.has(s[o])))throw new X(`trying to redefine an already defined value`,{toml:e,ptr:t});!c&&o===`__proto__`&&Object.defineProperty(s,o,{enumerable:!0,configurable:!0,writable:!0})}if(c)throw new X(`trying to redefine an already defined value`,{toml:e,ptr:t});let[d,f]=gr(e,u,`}`,n-1,r);a.add(d),s[o]=d,t=f}if(!o)throw new X(`unfinished table encountered`,{toml:e,ptr:t});return[i,t]}function br(e,t,n,r){let i=[],a;for(t++;(a=e[t++])!==`]`&&a;)if(a===`,`)throw new X(`expected value, found comma`,{toml:e,ptr:t-1});else if(a===`#`)t=pr(e,t);else if(a!==` `&&a!==` `&&a!==`
|
|
213
|
+
`&&a!==`\r`){let a=gr(e,t-1,`]`,n-1,r);i.push(a[0]),t=a[1]}if(!a)throw new X(`unfinished array encountered`,{toml:e,ptr:t});return[i,t]}
|
|
214
|
+
/*!
|
|
215
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
216
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
217
|
+
*
|
|
218
|
+
* Redistribution and use in source and binary forms, with or without
|
|
219
|
+
* modification, are permitted provided that the following conditions are met:
|
|
220
|
+
*
|
|
221
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
222
|
+
* list of conditions and the following disclaimer.
|
|
223
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
224
|
+
* this list of conditions and the following disclaimer in the
|
|
225
|
+
* documentation and/or other materials provided with the distribution.
|
|
226
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
227
|
+
* may be used to endorse or promote products derived from this software without
|
|
228
|
+
* specific prior written permission.
|
|
229
|
+
*
|
|
230
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
231
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
232
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
233
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
234
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
235
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
236
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
237
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
238
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
239
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
240
|
+
*/
|
|
241
|
+
function xr(e,t,n,r){let i=t,a=n,o,s=!1,c;for(let t=0;t<e.length;t++){if(t){if(i=s?i[o]:i[o]={},a=(c=a[o]).c,r===0&&(c.t===1||c.t===2))return null;if(c.t===2){let e=i.length-1;i=i[e],a=a[e].c}}if(o=e[t],(s=Object.hasOwn(i,o))&&a[o]?.t===0&&a[o]?.d)return null;s||(o===`__proto__`&&(Object.defineProperty(i,o,{enumerable:!0,configurable:!0,writable:!0}),Object.defineProperty(a,o,{enumerable:!0,configurable:!0,writable:!0})),a[o]={t:t<e.length-1&&r===2?3:r,d:!1,i:0,c:{}})}if(c=a[o],c.t!==r&&!(r===1&&c.t===3)||(r===2&&(c.d||(c.d=!0,i[o]=[]),i[o].push(i={}),c.c[c.i++]=c={t:1,d:!1,i:0,c:{}}),c.d))return null;if(c.d=!0,r===1)i=s?i[o]:i[o]={};else if(r===0&&s)return null;return[o,i,c.c]}function Sr(e,{maxDepth:t=1e3,integersAsBigInt:n}={}){let r={},i={},a=r,o=i;for(let s=Z(e,0);s<e.length;){if(e[s]===`[`){let t=e[++s]===`[`,n=vr(e,s+=+t,`]`);if(t){if(e[n[1]-1]!==`]`)throw new X(`expected end of table declaration`,{toml:e,ptr:n[1]-1});n[1]++}let c=xr(n[0],r,i,t?2:1);if(!c)throw new X(`trying to redefine an already defined table or value`,{toml:e,ptr:s});o=c[2],a=c[1],s=n[1]}else{let r=vr(e,s),i=xr(r[0],a,o,0);if(!i)throw new X(`trying to redefine an already defined table or value`,{toml:e,ptr:s});let c=gr(e,r[1],void 0,t,n);i[1][i[0]]=c[0],s=c[1]}if(s=Z(e,s,!0),e[s]&&e[s]!==`
|
|
242
|
+
`&&e[s]!==`\r`)throw new X(`each key-value declaration must be followed by an end-of-line`,{toml:e,ptr:s});s=Z(e,s)}return r}
|
|
243
|
+
/*!
|
|
244
|
+
* Copyright (c) Squirrel Chat et al., All rights reserved.
|
|
245
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
246
|
+
*
|
|
247
|
+
* Redistribution and use in source and binary forms, with or without
|
|
248
|
+
* modification, are permitted provided that the following conditions are met:
|
|
249
|
+
*
|
|
250
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
251
|
+
* list of conditions and the following disclaimer.
|
|
252
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
253
|
+
* this list of conditions and the following disclaimer in the
|
|
254
|
+
* documentation and/or other materials provided with the distribution.
|
|
255
|
+
* 3. Neither the name of the copyright holder nor the names of its contributors
|
|
256
|
+
* may be used to endorse or promote products derived from this software without
|
|
257
|
+
* specific prior written permission.
|
|
258
|
+
*
|
|
259
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
260
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
261
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
262
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
263
|
+
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
264
|
+
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
265
|
+
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
266
|
+
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
267
|
+
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
268
|
+
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
269
|
+
*/
|
|
270
|
+
let Cr=/^[a-z0-9-_]+$/i;function wr(e){let t=typeof e;if(t===`object`){if(Array.isArray(e))return`array`;if(e instanceof Date)return`date`}return t}function Tr(e){for(let t=0;t<e.length;t++)if(wr(e[t])!==`object`)return!1;return e.length!=0}function Er(e){return JSON.stringify(e).replace(/\x7f/g,`\\u007f`)}function Dr(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);if(t===`number`)return isNaN(e)?`nan`:e===1/0?`inf`:e===-1/0?`-inf`:Number.isInteger(e)&&(r||!Number.isSafeInteger(e))?e.toFixed(1):e.toString();if(t===`bigint`||t===`boolean`)return e.toString();if(t===`string`)return Er(e);if(t===`date`){if(isNaN(e.getTime()))throw TypeError(`cannot serialize invalid date`);return e.toISOString()}if(t===`object`)return Or(e,n,r);if(t===`array`)return kr(e,n,r)}function Or(e,t,n){let r=Object.keys(e);if(r.length===0)return`{}`;let i=`{ `;for(let a=0;a<r.length;a++){let o=r[a];a&&(i+=`, `),i+=Cr.test(o)?o:Er(o),i+=` = `,i+=Dr(e[o],wr(e[o]),t-1,n)}return i+` }`}function kr(e,t,n){if(e.length===0)return`[]`;let r=`[ `;for(let i=0;i<e.length;i++){if(i&&(r+=`, `),e[i]===null||e[i]===void 0)throw TypeError(`arrays cannot contain null or undefined values`);r+=Dr(e[i],wr(e[i]),t-1,n)}return r+` ]`}function Ar(e,t,n,r){if(n===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let i=``;for(let a=0;a<e.length;a++)i+=`${i&&`
|
|
271
|
+
`}[[${t}]]\n`,i+=jr(0,e[a],t,n,r);return i}function jr(e,t,n,r,i){if(r===0)throw Error(`Could not stringify the object: maximum object depth exceeded`);let a=``,o=``,s=Object.keys(t);for(let e=0;e<s.length;e++){let c=s[e];if(t[c]!==null&&t[c]!==void 0){let e=wr(t[c]);if(e===`symbol`||e===`function`)throw TypeError(`cannot serialize values of type '${e}'`);let s=Cr.test(c)?c:Er(c);if(e===`array`&&Tr(t[c]))o+=(o&&`
|
|
272
|
+
`)+Ar(t[c],n?`${n}.${s}`:s,r-1,i);else if(e===`object`){let e=n?`${n}.${s}`:s;o+=(o&&`
|
|
273
|
+
`)+jr(e,t[c],e,r-1,i)}else a+=s,a+=` = `,a+=Dr(t[c],e,r,i),a+=`
|
|
274
|
+
`}}return e&&(a||!o)&&(a=a?`[${e}]\n${a}`:`[${e}]`),a&&o?`${a}\n${o}`:a||o}function Mr(e,{maxDepth:t=1e3,numbersAsFloat:n=!1}={}){if(wr(e)!==`object`)throw TypeError(`stringify can only be called with an object`);let r=jr(0,e,``,t,n);return r[r.length-1]===`
|
|
275
|
+
`?r:r+`
|
|
276
|
+
`}const Nr=`${pe}-dev`;function Pr(e){return e.startsWith(pe)}function Fr(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command!==`ok-pi-managed-extension`||!Array.isArray(t.args))return!1;let n=t.args[0];return typeof n==`string`&&Pr(n)}function Ir(e){return{command:ye,args:[e]}}function Lr(e={}){let t=e.mode===`dev`?Nr:ge,n={unix:me({...e,platformName:`darwin`}),win32:me({...e,platformName:`win32`})};return`${t}
|
|
277
|
+
/**
|
|
278
|
+
* Open Knowledge bridge for Pi — MANAGED FILE, written by \`ok init\`.
|
|
279
|
+
* Hand edits are overwritten whenever OK re-syncs this project; remove it
|
|
280
|
+
* with \`ok deinit\` (or delete the file) to disconnect Pi from OK.
|
|
281
|
+
*
|
|
282
|
+
* On session start it spawns Open Knowledge's MCP stdio server via OK's
|
|
283
|
+
* resilient launcher (bundle, then npx, then version-manager probes), performs
|
|
284
|
+
* the MCP handshake, and registers each MCP tool as a Pi tool under an
|
|
285
|
+
* \`ok_\` prefix (Pi has no MCP namespacing; the prefix keeps OK's \`edit\` /
|
|
286
|
+
* \`write\` from shadowing Pi's built-in tools).
|
|
287
|
+
*/
|
|
288
|
+
import { spawn } from "node:child_process";
|
|
289
|
+
import type { ChildProcessWithoutNullStreams } from "node:child_process";
|
|
290
|
+
|
|
291
|
+
const LAUNCHERS = ${JSON.stringify(n,null,2)} as const;
|
|
292
|
+
|
|
293
|
+
const TOOL_PREFIX = "ok_";
|
|
294
|
+
// First contact may cold-install the CLI through npx — allow a generous window.
|
|
295
|
+
const INIT_TIMEOUT_MS = 120000;
|
|
296
|
+
const STDERR_TAIL_LIMIT = 2000;
|
|
297
|
+
|
|
298
|
+
interface McpContentItem {
|
|
299
|
+
type: string;
|
|
300
|
+
text?: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
interface McpToolInfo {
|
|
304
|
+
name: string;
|
|
305
|
+
description?: string;
|
|
306
|
+
inputSchema?: Record<string, unknown>;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface PendingRequest {
|
|
310
|
+
resolve: (value: Record<string, unknown>) => void;
|
|
311
|
+
reject: (err: Error) => void;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
class OkMcpClient {
|
|
315
|
+
private child: ChildProcessWithoutNullStreams;
|
|
316
|
+
private pending = new Map<number, PendingRequest>();
|
|
317
|
+
private nextId = 1;
|
|
318
|
+
private buffer = "";
|
|
319
|
+
private stderrTail = "";
|
|
320
|
+
alive = true;
|
|
321
|
+
|
|
322
|
+
constructor(cwd: string, onExit: () => void) {
|
|
323
|
+
const launcher = process.platform === "win32" ? LAUNCHERS.win32 : LAUNCHERS.unix;
|
|
324
|
+
const env: Record<string, string | undefined> = { ...process.env };
|
|
325
|
+
const launcherEnv = (launcher as { env?: Record<string, string> }).env;
|
|
326
|
+
if (launcherEnv) Object.assign(env, launcherEnv);
|
|
327
|
+
this.child = spawn(launcher.command, [...launcher.args], {
|
|
328
|
+
cwd,
|
|
329
|
+
env,
|
|
330
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
331
|
+
// Inline (not the withHiddenWindowsConsole helper): this spawn lives in the
|
|
332
|
+
// GENERATED Pi extension source, which must stay dependency-free (Pi loads
|
|
333
|
+
// it with jiti; no npm packages resolve). Hide the console on Windows anyway.
|
|
334
|
+
windowsHide: true,
|
|
335
|
+
});
|
|
336
|
+
this.child.stdout.setEncoding("utf8");
|
|
337
|
+
this.child.stdout.on("data", (chunk: string) => this.onStdout(chunk));
|
|
338
|
+
this.child.stderr.setEncoding("utf8");
|
|
339
|
+
this.child.stderr.on("data", (chunk: string) => {
|
|
340
|
+
this.stderrTail = (this.stderrTail + chunk).slice(-STDERR_TAIL_LIMIT);
|
|
341
|
+
});
|
|
342
|
+
// A write buffered before the pipe breaks surfaces as an 'error' on stdin
|
|
343
|
+
// (not on the child); unhandled it would crash Pi's extension host.
|
|
344
|
+
// Swallow it — the exit handler owns teardown.
|
|
345
|
+
this.child.stdin.on("error", () => {});
|
|
346
|
+
const fail = () => {
|
|
347
|
+
if (!this.alive) return;
|
|
348
|
+
this.alive = false;
|
|
349
|
+
const err = new Error(
|
|
350
|
+
"Open Knowledge MCP server exited" +
|
|
351
|
+
(this.stderrTail ? ": " + this.stderrTail.trim() : ""),
|
|
352
|
+
);
|
|
353
|
+
for (const p of this.pending.values()) p.reject(err);
|
|
354
|
+
this.pending.clear();
|
|
355
|
+
onExit();
|
|
356
|
+
};
|
|
357
|
+
this.child.on("exit", fail);
|
|
358
|
+
this.child.on("error", fail);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
private onStdout(chunk: string): void {
|
|
362
|
+
this.buffer += chunk;
|
|
363
|
+
let newline = this.buffer.indexOf("\\n");
|
|
364
|
+
while (newline !== -1) {
|
|
365
|
+
const line = this.buffer.slice(0, newline).trim();
|
|
366
|
+
this.buffer = this.buffer.slice(newline + 1);
|
|
367
|
+
if (line.startsWith("{")) {
|
|
368
|
+
try {
|
|
369
|
+
this.onMessage(JSON.parse(line) as Record<string, unknown>);
|
|
370
|
+
} catch {
|
|
371
|
+
// Non-JSON noise on stdout is ignored; framing recovers on the next line.
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
newline = this.buffer.indexOf("\\n");
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
private onMessage(msg: Record<string, unknown>): void {
|
|
379
|
+
const id = msg.id;
|
|
380
|
+
if (typeof msg.method === "string") {
|
|
381
|
+
// Server-initiated request (e.g. roots/list). This bridge declares no
|
|
382
|
+
// client capabilities, so decline rather than leave the server hanging.
|
|
383
|
+
if (id !== undefined && id !== null) {
|
|
384
|
+
this.send({
|
|
385
|
+
jsonrpc: "2.0",
|
|
386
|
+
id,
|
|
387
|
+
error: { code: -32601, message: "Method not supported by the OK Pi bridge" },
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
if (typeof id !== "number") return;
|
|
393
|
+
const pending = this.pending.get(id);
|
|
394
|
+
if (!pending) return;
|
|
395
|
+
this.pending.delete(id);
|
|
396
|
+
const error = msg.error as { message?: string } | undefined;
|
|
397
|
+
if (error) {
|
|
398
|
+
pending.reject(new Error(error.message || "Open Knowledge MCP error"));
|
|
399
|
+
return;
|
|
400
|
+
}
|
|
401
|
+
pending.resolve((msg.result ?? {}) as Record<string, unknown>);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
private send(msg: Record<string, unknown>): void {
|
|
405
|
+
// Buffered stdout can still dispatch onMessage replies after close() ends
|
|
406
|
+
// stdin; writing then would raise ERR_STREAM_WRITE_AFTER_END unhandled.
|
|
407
|
+
if (!this.alive) return;
|
|
408
|
+
this.child.stdin.write(JSON.stringify(msg) + "\\n");
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
request(
|
|
412
|
+
method: string,
|
|
413
|
+
params: Record<string, unknown>,
|
|
414
|
+
opts: { timeoutMs?: number; signal?: AbortSignal } = {},
|
|
415
|
+
): Promise<Record<string, unknown>> {
|
|
416
|
+
if (!this.alive) return Promise.reject(new Error("Open Knowledge MCP server is not running"));
|
|
417
|
+
const id = this.nextId++;
|
|
418
|
+
return new Promise<Record<string, unknown>>((resolve, reject) => {
|
|
419
|
+
let timer: ReturnType<typeof setTimeout> | undefined;
|
|
420
|
+
let onAbort: (() => void) | undefined;
|
|
421
|
+
const cleanup = () => {
|
|
422
|
+
if (timer !== undefined) clearTimeout(timer);
|
|
423
|
+
if (onAbort && opts.signal) opts.signal.removeEventListener("abort", onAbort);
|
|
424
|
+
this.pending.delete(id);
|
|
425
|
+
};
|
|
426
|
+
const done: PendingRequest = {
|
|
427
|
+
resolve: (value) => {
|
|
428
|
+
cleanup();
|
|
429
|
+
resolve(value);
|
|
430
|
+
},
|
|
431
|
+
reject: (err) => {
|
|
432
|
+
cleanup();
|
|
433
|
+
reject(err);
|
|
434
|
+
},
|
|
435
|
+
};
|
|
436
|
+
this.pending.set(id, done);
|
|
437
|
+
if (opts.timeoutMs) {
|
|
438
|
+
timer = setTimeout(() => {
|
|
439
|
+
done.reject(new Error(method + " timed out after " + opts.timeoutMs + "ms"));
|
|
440
|
+
}, opts.timeoutMs);
|
|
441
|
+
}
|
|
442
|
+
if (opts.signal) {
|
|
443
|
+
onAbort = () => {
|
|
444
|
+
this.notify("notifications/cancelled", { requestId: id, reason: "aborted" });
|
|
445
|
+
done.reject(new Error("Cancelled"));
|
|
446
|
+
};
|
|
447
|
+
if (opts.signal.aborted) {
|
|
448
|
+
onAbort();
|
|
449
|
+
return;
|
|
450
|
+
}
|
|
451
|
+
opts.signal.addEventListener("abort", onAbort, { once: true });
|
|
452
|
+
}
|
|
453
|
+
this.send({ jsonrpc: "2.0", id, method, params });
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
notify(method: string, params: Record<string, unknown>): void {
|
|
458
|
+
if (!this.alive) return;
|
|
459
|
+
this.send({ jsonrpc: "2.0", method, params });
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
close(): void {
|
|
463
|
+
this.alive = false;
|
|
464
|
+
for (const p of this.pending.values()) {
|
|
465
|
+
p.reject(new Error("Open Knowledge MCP client closed"));
|
|
466
|
+
}
|
|
467
|
+
this.pending.clear();
|
|
468
|
+
// ok mcp exits on stdin EOF; the delayed kill is a backstop.
|
|
469
|
+
try {
|
|
470
|
+
this.child.stdin.end();
|
|
471
|
+
} catch {
|
|
472
|
+
// Already gone.
|
|
473
|
+
}
|
|
474
|
+
const child = this.child;
|
|
475
|
+
setTimeout(() => {
|
|
476
|
+
try {
|
|
477
|
+
child.kill();
|
|
478
|
+
} catch {
|
|
479
|
+
// Already gone.
|
|
480
|
+
}
|
|
481
|
+
}, 2000).unref();
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** JSON Schema pass-through: Pi validates plain JSON Schema parameters. */
|
|
486
|
+
function toParameters(inputSchema: Record<string, unknown> | undefined): Record<string, unknown> {
|
|
487
|
+
if (!inputSchema || typeof inputSchema !== "object") {
|
|
488
|
+
return { type: "object", properties: {} };
|
|
489
|
+
}
|
|
490
|
+
const schema = { ...inputSchema };
|
|
491
|
+
delete schema.$schema;
|
|
492
|
+
return schema;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function contentText(content: unknown): string {
|
|
496
|
+
if (!Array.isArray(content)) return "";
|
|
497
|
+
return (content as McpContentItem[])
|
|
498
|
+
.filter((item) => item && item.type === "text" && typeof item.text === "string")
|
|
499
|
+
.map((item) => item.text as string)
|
|
500
|
+
.join("\\n");
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export default function okBridge(pi: {
|
|
504
|
+
on(event: string, handler: (event: unknown, ctx: unknown) => unknown): void;
|
|
505
|
+
registerTool(definition: Record<string, unknown>): void;
|
|
506
|
+
}) {
|
|
507
|
+
let client: OkMcpClient | null = null;
|
|
508
|
+
let starting: Promise<OkMcpClient> | null = null;
|
|
509
|
+
let sessionCwd = process.cwd();
|
|
510
|
+
const registeredTools = new Set<string>();
|
|
511
|
+
|
|
512
|
+
async function ensureClient(): Promise<OkMcpClient> {
|
|
513
|
+
if (client && client.alive) return client;
|
|
514
|
+
if (starting) return starting;
|
|
515
|
+
starting = (async () => {
|
|
516
|
+
const next = new OkMcpClient(sessionCwd, () => {
|
|
517
|
+
if (client === next) client = null;
|
|
518
|
+
});
|
|
519
|
+
try {
|
|
520
|
+
await next.request(
|
|
521
|
+
"initialize",
|
|
522
|
+
{
|
|
523
|
+
protocolVersion: "2025-06-18",
|
|
524
|
+
capabilities: {},
|
|
525
|
+
clientInfo: { name: "pi", version: "1.0.0" },
|
|
526
|
+
},
|
|
527
|
+
{ timeoutMs: INIT_TIMEOUT_MS },
|
|
528
|
+
);
|
|
529
|
+
} catch (err) {
|
|
530
|
+
// A timed-out initialize rejects the request while the child may
|
|
531
|
+
// still be running; tear it down so retries don't stack orphans.
|
|
532
|
+
next.close();
|
|
533
|
+
throw err;
|
|
534
|
+
}
|
|
535
|
+
next.notify("notifications/initialized", {});
|
|
536
|
+
client = next;
|
|
537
|
+
return next;
|
|
538
|
+
})();
|
|
539
|
+
try {
|
|
540
|
+
return await starting;
|
|
541
|
+
} finally {
|
|
542
|
+
starting = null;
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
async function registerOkTools(): Promise<number> {
|
|
547
|
+
const mcp = await ensureClient();
|
|
548
|
+
const listed = await mcp.request("tools/list", {}, { timeoutMs: INIT_TIMEOUT_MS });
|
|
549
|
+
const tools = Array.isArray(listed.tools) ? (listed.tools as McpToolInfo[]) : [];
|
|
550
|
+
for (const tool of tools) {
|
|
551
|
+
const name = TOOL_PREFIX + tool.name;
|
|
552
|
+
if (registeredTools.has(name)) continue;
|
|
553
|
+
registeredTools.add(name);
|
|
554
|
+
pi.registerTool({
|
|
555
|
+
name,
|
|
556
|
+
label: "OK " + tool.name,
|
|
557
|
+
description: tool.description || "Open Knowledge " + tool.name + " tool.",
|
|
558
|
+
parameters: toParameters(tool.inputSchema),
|
|
559
|
+
execute: async (
|
|
560
|
+
_toolCallId: string,
|
|
561
|
+
params: Record<string, unknown>,
|
|
562
|
+
signal: AbortSignal | undefined,
|
|
563
|
+
) => {
|
|
564
|
+
const live = await ensureClient();
|
|
565
|
+
const result = await live.request(
|
|
566
|
+
"tools/call",
|
|
567
|
+
{ name: tool.name, arguments: params ?? {} },
|
|
568
|
+
{ signal },
|
|
569
|
+
);
|
|
570
|
+
const text = contentText(result.content);
|
|
571
|
+
if (result.isError) {
|
|
572
|
+
throw new Error(text || "Open Knowledge tool " + tool.name + " failed");
|
|
573
|
+
}
|
|
574
|
+
return {
|
|
575
|
+
content: [{ type: "text", text }],
|
|
576
|
+
details: result.structuredContent,
|
|
577
|
+
};
|
|
578
|
+
},
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
return tools.length;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
pi.on("session_start", async (_event, ctx) => {
|
|
585
|
+
const cwd = (ctx as { cwd?: string } | undefined)?.cwd;
|
|
586
|
+
if (typeof cwd === "string" && cwd.length > 0) sessionCwd = cwd;
|
|
587
|
+
try {
|
|
588
|
+
await registerOkTools();
|
|
589
|
+
} catch (err) {
|
|
590
|
+
const ui = (ctx as { ui?: { notify?: (m: string, level: string) => void } } | undefined)?.ui;
|
|
591
|
+
try {
|
|
592
|
+
ui?.notify?.(
|
|
593
|
+
"Open Knowledge tools unavailable: " + (err instanceof Error ? err.message : String(err)),
|
|
594
|
+
"warning",
|
|
595
|
+
);
|
|
596
|
+
} catch {
|
|
597
|
+
// Non-interactive mode; the failure will resurface on first tool use.
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
|
|
602
|
+
pi.on("session_shutdown", async () => {
|
|
603
|
+
const pending = starting;
|
|
604
|
+
starting = null;
|
|
605
|
+
const current = client;
|
|
606
|
+
client = null;
|
|
607
|
+
current?.close();
|
|
608
|
+
// An in-flight ensureClient would otherwise assign a live client after
|
|
609
|
+
// shutdown; await it and tear that one down too.
|
|
610
|
+
if (pending) {
|
|
611
|
+
try {
|
|
612
|
+
(await pending).close();
|
|
613
|
+
} catch {
|
|
614
|
+
// Initialization failed — its catch path already closed the client.
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
`}function Rr(e){try{return Ae.native(e)}catch{return e}}function zr(e,t){let n=I(Rr(t),Rr(e));return n.length>0&&!n.startsWith(`..`)&&!P(n)}const Br=e=>{try{let t=Se(`git`,[`rev-parse`,`--show-toplevel`],g({cwd:e,encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]})).trim();return t.length>0?t:null}catch{return null}};function Vr(e,t={}){let n=t.homeDir??Ne(),r=t.gitTopLevel??Br,i=we(e),a;try{a=Ae(i)}catch{a=i}let o=a,s=0;for(;s<30&&!(o===n||o===`/`||o===``);){if(te(o))return{projectRoot:o,defaultContentDir:`.`,ancestorPromoted:o!==a,gitRootPromoted:!1};let e=N(o);if(e===o)break;o=e,s+=1}let c=r(a);return c!==null&&zr(c,n)?c===a?{projectRoot:i,defaultContentDir:`.`,ancestorPromoted:!1,gitRootPromoted:!1}:{projectRoot:c,defaultContentDir:`.`,ancestorPromoted:!1,gitRootPromoted:!0}:{projectRoot:i,defaultContentDir:`.`,ancestorPromoted:!1,gitRootPromoted:!1}}function Hr(e){let t=e&&typeof e==`object`&&`code`in e?e.code:void 0;return t===`MODULE_NOT_FOUND`||t===`ERR_MODULE_NOT_FOUND`}function Q(e,t){if(!process.env.OK_DEBUG_NATIVE)return;let n=t instanceof Error?t.message:String(t);process.stderr.write(`[ok] native-config ${e}: ${n}\n`)}const Ur=[`native`,`index.js`];function Wr(e={}){let t=e.moduleUrl??import.meta.url,n=e.requireModule??xe(t);try{return n(F(N(Ee(t)),...Ur))}catch(e){Hr(e)||Q(`bundled loader failed to load`,e)}try{return n(`@inkeep/open-knowledge-native-config`)}catch(e){return Hr(e)||Q(`workspace addon failed to load`,e),null}}function Gr(){let e=Wr();return e&&typeof e.resolveSymlinkWritePath==`function`?e:null}function Kr(e){let t=e,n=new Set;for(;;){let r;try{r=De(t).isSymbolicLink()}catch(n){return n.code===`ENOENT`?{readPath:t,writePath:t}:{readPath:null,writePath:e}}if(!r)return{readPath:t,writePath:t};if(n.has(t))return{readPath:null,writePath:e};n.add(t);let i;try{i=ke(t)}catch(t){return Q(`readlinkSync threw during symlink walk`,t),{readPath:null,writePath:e}}t=P(i)?i:F(N(t),i)}}let qr;function Jr(){return qr===void 0&&(qr=Gr()),qr}function Yr(e,t=Jr){let n=t();if(n)try{let t=n.resolveSymlinkWritePath(e);return{readPath:t.readPath??null,writePath:t.writePath}}catch(e){Q(`resolveSymlinkWritePath threw`,e)}return Kr(e)}function Xr(){let e=Wr();return e&&typeof e.parseTomlToJson==`function`?e:null}function Zr(e){try{let t=e.parseTomlToJson(`probe = 1`);return typeof t==`string`&&t.includes(`probe`)}catch(e){return Q(`addon loaded but probe failed`,e),!1}}function Qr(e){if(!j(e))throw Error(`TOML root is not a table`);return e}function $r(e){return{backend:`native`,parseToObject(t){return Qr(JSON.parse(e.parseTomlToJson(t)))},upsertEntry(t,n,r){let i=e.upsertMcpServer(t,n,JSON.stringify(r));return{text:i.text,existed:i.existed}},removeEntry(t,n){let r=e.removeMcpServer(t,n);return{text:r.text,existed:r.existed}}}}function ei(){return{backend:`fallback`,parseToObject(e){return Qr(Sr(e))}}}function ti(e=Xr){let t=e();return t&&Zr(t)?$r(t):ei()}let ni=null;function ri(){return ni===null&&(ni=ti()),ni}const ii={allowTrailingComma:!0,disallowComments:!1};function ai(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function oi(e){let t=[],n=u(e,t,ii);return t.some(t=>!ai(t,e))||!n||n.type!==`object`?null:n}function si(e,t){let n=0;for(let r of e.children??[]){let e=r.children?.[0];e!==void 0&&m(e)===t&&(n+=1)}return n}function ci(e,t){w(e,`${JSON.stringify(t,null,2)}\n`)}function li(e,t){let n=Mr(t);w(e,n.endsWith(`
|
|
620
|
+
`)?n:`${n}\n`)}function ui(e,t){let n=(0,Tn.stringify)(t);w(e,n.endsWith(`
|
|
621
|
+
`)?n:`${n}\n`)}const di=10*1024*1024;function fi(e,t){if(e===t)return!0;if(Array.isArray(e)||Array.isArray(t))return!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>fi(e,t[n]));if(j(e)&&j(t)){let n=Object.keys(e);return n.length===Object.keys(t).length?n.every(n=>Object.hasOwn(t,n)&&fi(e[n],t[n])):!1}return!1}function pi(e){for(let t of e.split(`
|
|
622
|
+
`)){let e=t.trimStart();if(!(e.length===0||e.length===t.length))return t.charCodeAt(0)===9?{insertSpaces:!1,tabSize:1}:{insertSpaces:!0,tabSize:t.length-e.length}}return{insertSpaces:!0,tabSize:2}}function mi(e,t,n){return t===void 0?[e,n]:[e,t,n]}function hi(e,t,n,r){let i={[n]:r};return{[e]:t===void 0?i:{[t]:i}}}function gi(e,t,n){let r=e[t];return n===void 0?r:j(r)?r[n]:void 0}function _i(e,t,n,r,i){if(!R(e))return ci(e,hi(t,i,n,r)),{kind:`written`};let a;try{a=z(e,`utf-8`)}catch(e){return Q(`json config read failed`,e),{kind:`declined`,reason:`unparseable`}}if(a.trim()===``)return ci(e,hi(t,i,n,r)),{kind:`written`};if(Buffer.byteLength(a,`utf-8`)>di)return{kind:`declined`,reason:`oversize`};let o=oi(a);if(!o)return{kind:`declined`,reason:`unparseable`};if(si(o,t)>1)return{kind:`declined`,reason:`duplicate-container`};let s=gi(m(o),t,i),c=j(s)?s[n]:void 0,l=c!==void 0;if(l&&fi(c,r))return{kind:`overwritten`};let u=a.charCodeAt(0)===65279,d=u?a.slice(1):a,f=d.includes(`\r
|
|
623
|
+
`)?`\r
|
|
624
|
+
`:`
|
|
625
|
+
`,g=h(d,mi(t,i,n),r,{formattingOptions:{...pi(d),eol:f}}),_=`${u?``:``}${p(d,g)}`;return _!==a&&w(e,_,{mode:Y(e)}),{kind:l?`overwritten`:`written`}}function vi(e,t,n,r,i){let a=``;if(R(t))try{a=z(t,`utf-8`)}catch(e){return Q(`toml config read failed`,e),{kind:`declined`,reason:`unparseable`}}let o=a.trim()===``;if(e.backend===`fallback`)return o?(li(t,{[n]:{[r]:i}}),{kind:`written`}):{kind:`declined`,reason:`no-native-writer`};let s=a.charCodeAt(0)===65279,c=s?a.slice(1):a,l=Hn(c),u=o||c.endsWith(`
|
|
626
|
+
`),d;try{d=e.upsertEntry(c,r,i)}catch(e){return Q(`upsertEntry failed`,e),{kind:`declined`,reason:`unparseable`}}let f=d.text;u?f.endsWith(`
|
|
627
|
+
`)||(f=`${f}\n`):f=f.replace(/\n+$/,``),l&&(f=f.replace(/\r\n/g,`
|
|
628
|
+
`).replace(/\n/g,`\r
|
|
629
|
+
`));let p=`${s?``:``}${f}`;return p!==a&&w(t,p,{mode:Y(t)}),{kind:d.existed?`overwritten`:`written`}}function yi(e,t,n,r){let i=``;if(R(e))try{i=z(e,`utf-8`)}catch(e){return Q(`yaml config read failed`,e),{kind:`declined`,reason:`unparseable`}}if(i.trim()===``)return ui(e,{[t]:{[n]:r}}),{kind:`written`};if(Buffer.byteLength(i,`utf-8`)>di)return{kind:`declined`,reason:`oversize`};let a=i.charCodeAt(0)===65279,o=a?i.slice(1):i,s=(0,Tn.parseDocument)(o);if(s.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n],l=s.hasIn(c);s.hasIn([t])&&!(0,Tn.isCollection)(s.getIn([t],!0))&&s.deleteIn([t]),s.setIn(c,s.createNode(r));let u=s.toString(),d=Hn(o);o.endsWith(`
|
|
630
|
+
`)?u.endsWith(`
|
|
631
|
+
`)||(u=`${u}\n`):u=u.replace(/\n+$/,``),d&&(u=u.replace(/\r\n/g,`
|
|
632
|
+
`).replace(/\n/g,`\r
|
|
633
|
+
`));let f=`${a?``:``}${u}`;return f!==i&&w(e,f,{mode:Y(e)}),{kind:l?`overwritten`:`written`}}const bi=e=>e!==`project`,xi=e=>e!==`user`;async function Si(){let e=await Zn({message:`Where should the MCP server be configured?
|
|
634
|
+
`,required:!1,theme:{icon:{checked:`[x]`,unchecked:`[ ]`}},choices:[{name:`User-level (~/.claude.json, ~/.cursor/mcp.json, …)`,value:`user`,checked:!0},{name:`Project-level (.mcp.json, .cursor/mcp.json, …)`,value:`project`,checked:!0}]});return e.includes(`user`)&&e.includes(`project`)?`both`:e.includes(`user`)?`user`:e.includes(`project`)?`project`:null}async function Ci(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??Si)():`both`}async function wi(e){return nr({message:`How do you want to handle OpenKnowledge config files (.ok/, .mcp.json, project skills)?`,default:e,choices:[{name:`Share with my team (commit alongside content)`,value:`shared`,description:`OK config gets committed alongside your project content.`},{name:`Local only (keep out of git via .git/info/exclude)`,value:`local-only`,description:"OK config stays on this machine only; teammates do not see it. Safe escape hatch via `ok config-sharing share`."}]})}async function Ti(e){if(e.sharing!==void 0)return e.sharing;let t=jn(e.projectRoot)===`local-only`?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??wi)(t):t}var $=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function Ei(e){if(e===void 0||e===!0)return new Set(oe);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(oe.filter(e=>t.includes(e)))}function Di(e,t,n){let r=we(n,e),i;try{i=je(r)}catch(e){let t=e.code;throw t===`ENOENT`?new $(`--content-dir path does not exist: ${r}`):new $(`--content-dir path is not accessible (${t??`unknown error`}): ${r}`)}if(!i.isDirectory())throw new $(`--content-dir must be a directory: ${r}`);let a=I(Oi(t),Oi(r));if(a.startsWith(`..`)||P(a))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return a===``?`.`:a}function Oi(e){try{return Ae(e)}catch{return e}}const ki=`open-knowledge-ui`;function Ai(e,t,n){try{return R(e.detectPath?.(t,n)??N(e.configPath(t,n)))}catch{return!1}}function ji(e,t,n,r,i){let a=e.serverName(t),o;try{o=i??e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:a,error:t instanceof Error?t.message:String(t)}}let s=!n.skipAvailabilityCheck||e.offerOnlyWhenDetected===!0;if(!i&&s&&!Ai(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{ve(o,t)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),configScope:`project`}}if(e.format===`file`)return Ni(e,o,a,n,{isProjectScope:i!==void 0});let c;try{c=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}try{Oe(N(o),{recursive:!0})}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}let l={action:`written`},u;try{se(`${o}.lock`,()=>{let t=Yr(o).writePath;if(Oe(N(t),{recursive:!0}),e.format===`toml`){let n=vi(ri(),t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}if(e.format===`yaml`){let n=yi(t,e.topLevelKey,a,c);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason);return}let n=_i(t,e.topLevelKey,a,c,e.serverMapSubKey);l.action=n.kind,n.kind===`declined`&&(l.declineReason=n.reason)},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){u=e instanceof Error?e:Error(String(e))}return u?{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:u.message,...i===void 0?{}:{configScope:`project`}}:l.action===`declined`?{editorId:e.id,label:e.label,action:`declined`,configPath:o,serverName:a,declineReason:l.declineReason,...i===void 0?{}:{configScope:`project`}}:{editorId:e.id,label:e.label,action:l.action,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}}}const Mi={pi:Lr};function Ni(e,t,n,r,i){let a=i.isProjectScope?{configScope:`project`}:{},o=r=>({editorId:e.id,label:e.label,action:`failed`,configPath:t,serverName:n,error:r instanceof Error?r.message:String(r),...a}),s=Mi[e.id];if(!s)return o(Error(`No managed-file builder registered for editor "${e.id}" (format: 'file' targets need a MANAGED_FILE_BUILDERS entry).`));let c;try{c=s(r)}catch(e){return o(e)}try{Oe(N(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{se(`${t}.lock`,()=>{let e=null;try{e=z(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}w(t,c,e===null?void 0:{mode:Y(t)}),l.action=e===null?`written`:`overwritten`},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){return o(e)}return{editorId:e.id,label:e.label,action:l.action,configPath:t,serverName:n,...a}}function Pi(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!R(n)))return{editorId:e.id,label:e.label,path:n}}function Fi(e,t,n,r){let i=Li(e,t,n,r);return i.kind===`present`?i.entry:null}function Ii(e,t,n,r){let i=gi(e,t,r);if(!j(i))return{kind:`no-entry`};let a=i[n];return j(a)?{kind:`present`,entry:a}:{kind:`no-entry`}}function Li(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!R(i))return{kind:`absent`};try{if(je(i).size>di)return{kind:`decline`,reason:`oversize`}}catch{return{kind:`decline`,reason:`unparseable`}}let a;try{a=z(i,`utf-8`)}catch{return{kind:`decline`,reason:`unparseable`}}if(a.trim()===``)return{kind:`absent`};if(e.format===`file`)return{kind:`present`,entry:Ir(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=ri().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Ii(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,Tn.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:Ii(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=oi(a);return s?si(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Ii(m(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Ri(e={}){let t=we(e.cwd??process.cwd()),n=Vr(t,{homeDir:e.home}),r=n.projectRoot,i=!R(F(r,`.ok`)),a=n.gitRootPromoted?I(r,t):void 0,o=e.contentDir===void 0?n.defaultContentDir:Di(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&o===`.`&&process.stderr.write(`${k(`[ok] Content scope promoted to the git repo root: ${r}`)}\n Ran in ${a}/, but .ok/ lives at the git root (one .ok/ per git repo),\n so the whole repo is now the content scope. To narrow it, re-run with\n \`ok init --content-dir .\`, or set content.dir: ${a} in .ok/config.yml.\n`);let c={mode:e.devMcp?`dev`:`published`},l=await ae(r),u;try{u=x(r,{contentDir:o})}catch(t){let i=M.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:l.didInit,rootGitignoreCreated:!1,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDirRequested:e.contentDir,contentScaffoldFailed:!0,mcpAction:`failed`,mcpPath:i,mcpError:`Content scaffolding failed: ${t instanceof Error?t.message:String(t)}`,sharing:{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:!1}}}let f=u.created.includes(ue),p=!1;if(l.didInit)try{p=_(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{ne(r)}catch(e){console.warn(`[ok] Skipping project-skill .gitignore entry at ${r}: ${e instanceof Error?e.message:String(e)}`)}let m=await y(r);m.kind===`untracked`&&console.warn(`[ok] Untracked the OpenKnowledge project skill (${m.dirs.join(`, `)}) — it is now local-only. Teammates will see this as a deletion on their next pull.`);let h=await Ci({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),g=e.editors??Wi(r,e.home),b=e.editors??he.filter(e=>M[e].projectConfigPath!==void 0||M[e].projectSkillPath!==void 0),te=de(g),C=de(b),w=e.mcp===!1||h===null,se=Array.from(new Map([...te,...w?[]:C].map(e=>[e.id,e])).values()),ce=te.filter(t=>Ai(t,r,e.home)),T=[],E=[],D=new Set;for(let t of se){if(w){let n=``;try{n=t.configPath(r,e.home)}catch{}T.push({editorId:t.id,label:t.label,action:`skipped-flag`,configPath:n,serverName:t.serverName(r)});continue}if(bi(h)&&te.includes(t)&&t.scope===`global`&&T.push(ji(t,r,c,e.home)),xi(h)&&C.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=ji(t,r,c,e.home,n);T.push(i),(i.action===`written`||i.action===`overwritten`)&&D.add(n)}}let O=new Set;for(let t of C){let n=t.projectSkillPath?.(r);!n||O.has(n)||(O.add(n),E.push(_e(t,r,{home:e.home})))}let le=E.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.editorId);if(le.length>0){let t=e.home??Ne();re({source:s,skills:[d.project],agents:le,scope:r},{home:t,enabled:S(t).enabled})}let A=!w&&h!==null&&xi(h)?C.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,j=w?[]:ce.map(e=>Pi(e,r)).filter(e=>e!==void 0).filter(e=>!D.has(e.path)),fe=e.installUserSkill??v,pe=e.home??Ne(),me=Ei(e.skills),ge=!1,ve=!1,ye=!1,be=!1,xe=!1;for(let t of oe){if(!me.has(t))continue;await ie(pe,d[t],!0).catch(()=>{}),ge=!0;let n=await fe({home:e.home,bundleId:t,force:!0});n===`installed`?ve=!0:n===`failed`?ye=!0:n===`no-hosts`?xe=!0:be=!0}let Se=ye?`failed`:ve?`installed`:ge&&be?`skip-current`:ge&&xe?`no-hosts`:`declined`,Ce=ve?ee(pe).map(e=>e.editorId):[],N=w?`skipped-flag`:`skipped-missing`,P=T.find(e=>e.editorId===`claude`)??T[0]??{action:N,configPath:M.claude.configPath(r,e.home)},Te=await zi({projectRoot:r,desiredMode:await Ti({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:u.created,contentUpdated:u.updated,contentSkipped:u.skipped,editors:T,projectSkills:E,legacyProjectConfigs:j,skillInstall:Se,skillHosts:Ce,didGitInit:l.didInit,rootGitignoreCreated:p,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:f?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:P.action,mcpPath:P.configPath,mcpError:`error`in P?P.error:void 0,projectScopeUnsupportedLabels:A,sharing:Te}}async function zi(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=jn(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=On(t);if(n===`local-only`){let e=kn(t,a);if(e.kind===`refused-tracked`){let t=e;return{kind:`refused-tracked`,tracked:t.tracked,remediation:t.remediation}}return e.kind===`no-exclude`?{kind:`no-exclude`,reason:e.reason,localOnlyRequested:r===`local-only`}:Bi(t,e,`add`)}if(i===`shared`)return{kind:`applied`,mode:`shared`,action:`noop`,appended:[],alreadyPresent:[],removed:[]};let o=An(t,a);return o.kind===`no-exclude`?{kind:`no-exclude`,reason:o.reason,localOnlyRequested:!1}:Bi(t,o,`remove`)}function Bi(e,t,n){let r=jn(e);return n===`add`?{kind:`applied`,mode:r,action:t.appended.length>0?`added`:`noop`,appended:t.appended,alreadyPresent:t.alreadyPresent,removed:[]}:{kind:`applied`,mode:r,action:`removed`,appended:[],alreadyPresent:[],removed:t.removed}}function Vi(e){switch(e){case`oversize`:return`config too large to edit safely`;case`duplicate-container`:return`duplicate server block`;case`no-native-writer`:return`no format-preserving writer available`;default:return`config not readable`}}function Hi(e,t){let n=[],r=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),i=e.editors.some(e=>e.action===`failed`)||e.projectSkills.some(e=>e.action===`failed`),a=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`);e.didGitInit&&n.push(`Initialized git repo at ${t}/.git/ (default branch: main)`),e.rootGitignoreCreated&&n.push(`Seeded .gitignore at ${t}/.gitignore (.DS_Store)`);let s=F(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(A(`Content scaffolded at ${s}/`)),e.contentCreated.length>0&&n.push(` Created: ${e.contentCreated.join(`, `)}`),e.contentUpdated.length>0&&n.push(` Updated: ${e.contentUpdated.join(`, `)}`)):n.push(A(`Content already present at ${s}/`)),e.contentSkipped.length>0&&n.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),n.push(``),e.mcpError&&e.editors.length===0)n.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)if(n.push(A(`MCP server configuration:`)),e.mcpAction===`skipped-flag`)n.push(` MCP config not written — use without --no-mcp to configure editors`);else if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}else n.push(` No supported editor config directories detected; skipped MCP registration`);else if(a)n.push(`MCP config not written — use without --no-mcp to configure editors`);else if(o)n.push(A(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(A(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?I(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),i=r.serverName===`open-knowledge`?``:` (${r.serverName})`,a=r.configScope===`project`?` (project)`:``,o=`${r.label}${a}`,s=` `.repeat(Math.max(1,20-o.length)),c=r.editorId===`claude-desktop`&&(r.action===`written`||r.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(r.action){case`written`:n.push(` ${o}${s}${e} ${O(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${O(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${le(`FAILED`)}: ${r.error}`);break;case`declined`:n.push(` ${o}${s}${e} left unchanged (${Vi(r.declineReason)})`);break;case`skipped-flag`:break;default:r.action}}if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}}if(e.projectSkills.length>0){n.push(``),n.push(A(`Project-local skills:`));for(let r of e.projectSkills){let e=`${r.label} (project)`,i=` `.repeat(Math.max(1,20-e.length)),a=r.path?I(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${O(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${O(`updated`)}`);break;case`skipped-unsupported`:n.push(` ${e}${i}no known project skill surface; skipped`);break;case`skipped-prerequisite`:n.push(` ${e}${i}OpenKnowledge MCP is not configured; skipped`);break;case`failed`:n.push(` ${e}${i}${a} ${le(`FAILED`)}: ${r.error}`);break}}}if(i&&(n.push(``),n.push(`For failed editors, add the MCP server entry or project skill manually. See:`),n.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){n.push(``),n.push(`Project MCP configs found:`);for(let r of e.legacyProjectConfigs)n.push(` ${r.label} ${I(t,r.path)}`);n.push(` These project-local files may override the global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(n.push(``),n.push(A(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>fe[e]??e),r=t.length>0?t.join(`, `):`the shared ~/.agents store`;n.push(` open-knowledge ${O(`installed for ${r}`)}`),n.push(` ${D(`Counted on skills.sh (skill name + source repo, once per machine).`)}`),n.push(` ${D(`Opt out: DO_NOT_TRACK=1, or Settings → Preferences.`)}`);break}case`skip-current`:n.push(` open-knowledge ${O(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${D(`skipped for this run (--no-skills)`)}`),n.push(` ${D(`Nothing was installed or removed. Any built-in skills already on this`)}`),n.push(` ${D(`machine are untouched. Run init without the flag to install them:`)}`),n.push(` ${D(` ok init`)}`);break;case`no-hosts`:n.push(` open-knowledge ${D(`skipped — no supported agent host detected in your home directory`)}`);break;case`failed`:n.push(` ${k(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${k(` ok repair-skills`)}`);break}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(k(`⚠ --content-dir ${e.contentDirRequested} ignored — .ok/config.yml already exists`)),n.push(` Edit .ok/config.yml → content.dir directly to change the content scope.`)):e.contentDir!==void 0&&e.contentDir!==`.`?(n.push(``),n.push(`Content scope set to ${e.contentDir}/ (content.dir in .ok/config.yml).`)):e.gitRootPromoted&&e.contentDir===`.`&&e.contentDirRequested===void 0&&(n.push(``),n.push(k(`⚠ Content scope promoted to the git repo root`)),n.push(` .ok/ was initialized at ${t} because it contains a .git folder (one .ok/ per git repo),`),n.push(` not the sub-folder you ran \`ok init\` in${e.promotedFromDir?` (${e.promotedFromDir})`:``}. The whole repo is now the content scope.`),e.promotedFromDir&&(n.push(" To scope to just that sub-folder, re-run `ok init --content-dir .` from there, or set"),n.push(` content.dir: ${e.promotedFromDir} in .ok/config.yml.`))),e.preview?(n.push(``),n.push(be(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),n.push(``),n.push(...qi(e.sharing,t)),r){let t=new Set,r=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).filter(e=>!t.has(e.editorId)&&t.add(e.editorId)).map(e=>e.label);n.push(``),n.push(`${O(`✓`)} ${A(`Next steps:`)}`),n.push(` 1. Open your editor (${E(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${E(`ok seed --list-packs`)} — browse the starter packs`),n.push(` - ${E(`ok seed`)} — scaffold an empty repo`),n.push(` 4. Ask your agent to capture a source, research a topic, or build a wiki —`),n.push(` the procedures ship as skills alongside the MCP tools.`)}return n.join(`
|
|
635
|
+
`)}function Ui(e,t){return{projectRoot:e.projectRoot,gitRootPromoted:e.gitRootPromoted,promotedFromDir:e.promotedFromDir??null,contentDir:t.contentDir,contentDirRequested:e.contentDirRequested??null,contentDirApplied:e.contentDir!==void 0,contentFileCount:t.contentFileCount,previewError:e.previewWarning??null,didGitInit:e.didGitInit,mcpAction:e.mcpAction,editors:e.editors.map(e=>({editorId:e.editorId,label:e.label,action:e.action,configPath:e.configPath,scope:e.configScope===`project`?`project`:`user`}))}}function Wi(e,t){let n=[];for(let r of he)Ai(M[r],e,t)&&n.push(r);return n}function Gi(){let e={log:console.log,info:console.info,debug:console.debug},t=(...e)=>{process.stderr.write(`${e.map(e=>typeof e==`string`?e:Fe(e)).join(` `)}\n`)};return console.log=t,console.info=t,console.debug=t,()=>{console.log=e.log,console.info=e.info,console.debug=e.debug}}function Ki(){return new T(`init`).description(`Scaffold .ok/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the .ok/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).option(`--content-dir <dir>`,`Limit content to <dir> instead of the whole project. <dir> is interpreted relative to your current directory (e.g. "." = the folder you run the command in), then saved to .ok/config.yml as content.dir.`).option(`--json`,`Emit a structured JSON summary to stdout (diagnostics stay on stderr)`).option(`--skills <ids>`,`Install only the named user-global skill bundles (comma list: discovery,write-skill)`).option(`--no-skills`,`Do not install any user-global skill bundles`).addOption(new ce(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new ce(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new ce(`--local-only`,`Keep OK config out of git via .git/info/exclude (per-clone, not committed)`).conflicts(`shared`)).action(async e=>{let t=process.cwd(),n=e.shared?`shared`:e.localOnly?`local-only`:void 0,r=e.json?Gi():null;try{let r;try{r=await Ri({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope,sharing:n,contentDir:e.contentDir,skills:e.skills})}catch(e){if(e instanceof $){process.stderr.write(`${e.message}\n`),process.exitCode=64;return}if(e instanceof l||e instanceof b){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof C){process.stderr.write(`open-knowledge could not initialize a git repo for this project. Re-run, or run 'git init' yourself in the project folder.
|
|
636
|
+
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}let i=r.contentDir??`.`,a=null,{loadConfig:o}=await import(`./loader-CFKng11E.mjs`),{resolveContentDir:s}=await import(`./src-DStuuia4.mjs`),c;try{c=o(r.projectRoot).config,i=c.content.dir}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}if(c)try{let{previewContent:e}=await import(`./preview-BfP9Jf_p.mjs`),t=s(c,r.projectRoot);r.preview=e({projectDir:r.projectRoot,contentDir:t}),a=r.preview.totalCount}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}e.json?process.stdout.write(`${JSON.stringify(Ui(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Hi(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function qi(e,t){let n=[];switch(e.kind){case`applied`:return n.push(A(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?n.push(` ${O(`local-only`)} — appended ${e.appended.length} path(s) to ${A(`${t}/.git/info/exclude`)} (per-clone, not committed).`):e.action===`noop`&&e.alreadyPresent.length>0?n.push(` ${O(`local-only`)} — already excluded; nothing to do.`):n.push(` ${O(`local-only`)}`):e.action===`removed`?n.push(` ${O(`shared`)} — removed OK paths from ${A(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${O(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(k(`Sharing mode: switch to local-only deferred`));for(let t of e.remediation.split(`
|
|
637
|
+
`))n.push(t.length>0?` ${t}`:``);return n.push(` Re-run ${E(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(k(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${E(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${E(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(k(`Sharing mode unavailable: ${e.reason}.`));return n}}export{On as A,U as B,Zn as C,kn as D,Un as E,wn as F,fn as I,St as L,jn as M,Nn as N,Fn as O,An as P,yt as R,nr as S,Hn as T,Ke as V,mi as _,Ui as a,Vr as b,Hi as c,Fi as d,Ei as f,Ri as g,Ti as h,zi as i,Pn as j,Mn as k,qi as l,Di as m,ki as n,Li as o,Ci as p,Mi as r,Wi as s,$ as t,Ki as u,ji as v,Y as w,Fr as x,ri as y,vt as z};
|
|
638
|
+
//# sourceMappingURL=init-B3eO621O.mjs.map
|