@inkeep/open-knowledge 0.53.0-beta.0 → 0.53.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/{acp-harness-probe-DvXLWBwm.mjs → acp-harness-probe-B5_ar7rl.mjs} +2 -2
- package/dist/assets/skills/project/references/linking.md +1 -1
- package/dist/cli.mjs +62 -62
- package/dist/constants-BGKDDuS6.mjs +2 -0
- package/dist/{git-handle-VuHcNtS4.mjs → git-handle-CH1DpBYP.mjs} +2 -2
- package/dist/git-handle-D_uW8fTU.mjs +1 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-ja0T-etx.mjs → init-BGPdBpY7.mjs} +4 -4
- package/dist/init-CJLXPIkG.mjs +1 -0
- package/dist/{launch-json-removal-DaMY_ELf.mjs → launch-json-removal-BYbu5C86.mjs} +2 -2
- package/dist/{loader-CZJtDyW1.mjs → loader-ejjX_n1a.mjs} +2 -2
- package/dist/loader-gRh8KR8b.mjs +1 -0
- package/dist/md-manager-CUGZ0GRt.mjs +2 -0
- package/dist/{open-browser-BfbWvPXH.mjs → open-browser-CtVpc_8x.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-Ddz36Ink.mjs +1 -0
- package/dist/{preview-DZFeEN5M.mjs → preview-R6iAeACo.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-BMqdsZEQ.js → ActivityModeContent-rgEhhGgw.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-D_ubtipg.js → AgentDiffPane-DtG18o1u.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-B7pwGsKU.js → AgentThreadClientBinder-DkD2M_dd.js} +1 -1
- package/dist/public/assets/{BugReportHistory-CDRTpJV0.js → BugReportHistory-C59fSH13.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog--YdGm_GJ.js → BugReportHistoryDialog-C2b4xA3d.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-4TgQdQOf.js → ChangedOutsideBadge-DdpCQcxq.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-Cydg0jHr.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-CuqrTakc.js → ConfigSharingInfoTooltip-4T5uhyyt.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-CmMu4IpT.js → ConsentDialogBody-DfhGpXdb.js} +1 -1
- package/dist/public/assets/{DiffView-BcZip7m3.js → DiffView-C-imhjB8.js} +1 -1
- package/dist/public/assets/DocumentContext-BN8gSwJ-.js +38 -0
- package/dist/public/assets/{EditorModeToggle-CFFhQhHA.js → EditorModeToggle-CrnEz11k.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BiThAkoH.js → EnableSyncConfirmDialog-623sSYbd.js} +1 -1
- package/dist/public/assets/FeedbackForm-CiQQiFp-.js +1 -0
- package/dist/public/assets/{GraphPanel-CsRKre3D.js → GraphPanel-C-3KrSdC.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-DcZoBHf-.js → ImportSkillDialog-B7gKx_GY.js} +1 -1
- package/dist/public/assets/{LintConfigEditor--yFdaWpg.js → LintConfigEditor-B-XaVu0m.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-CUMQh4tz.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-CIVfnd15.js → ManagedArtifactProperties-iclZPRJv.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-DEhSeOSg.js → McpConsentDialogBody-BS3RE3LY.js} +1 -1
- package/dist/public/assets/{Mermaid-mUyEEsA0.js → Mermaid-BHfANkja.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-civq6mkL.js → MermaidDocEditor-CI90q10w.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-BxpJAHOj.js → RegisteredAgentIcon-gjOJZp_B.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-DO7eotFd.js → ReportBugDialogBody-BWXO0gto.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-NxaI-Jdd.js → SchemaConfigEditor-eh-ijdLu.js} +1 -1
- package/dist/public/assets/{SessionsHost-PjSsebux.js → SessionsHost-BOgQOcv6.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-BaYDHshm.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-B7Bl6qR0.js → ShareBranchSwitchDialog-DpmQmmrq.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BmMkjWTr.js → ShareReceiveDialog-C3fS1Ax2.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-R20sy2ia.js → ShareReceiveMissDialog-DzeOwnyS.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-B2U7UdOB.js → SkillEditBanner-DGB_nnDm.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-B3wOLT3t.js → SkillOriginInline-C4x3nMIH.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-B_RJpm5V.js → SkillToolbarControls-DXBGIWug.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-56-P71vE.js → SlidesToolbarControls-Buv-SEot.js} +1 -1
- package/dist/public/assets/{SourceEditor-BW7yuIvG.js → SourceEditor-B64VJl_F.js} +1 -1
- package/dist/public/assets/{TerminalPanel-Clr6j-jo.js → TerminalPanel-Bch10p1r.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-DRbYHuvS.js → TerminalWindowApp-s4mNyUki.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Bwwrrcn5.js → TextDocEditor-DtDvo7eF.js} +1 -1
- package/dist/public/assets/{ThreadView-BA7gxPI6.js → ThreadView-CGOz1ms_.js} +2 -2
- package/dist/public/assets/{TimelineDiffPane-CTJnk9me.js → TimelineDiffPane-B7aD7QN-.js} +1 -1
- package/dist/public/assets/{agent-diff-store-BvxTke2d.js → agent-diff-store-BJiYj2BI.js} +1 -1
- package/dist/public/assets/{auth-state-cache-DrAhOPTB.js → auth-state-cache-5wocICj2.js} +3 -3
- package/dist/public/assets/{checkbox-Bxl4H4lV.js → checkbox-vidgONxv.js} +1 -1
- package/dist/public/assets/client-version---DsZj2h.js +1 -0
- package/dist/public/assets/{cm-theme-BygK2tYf.js → cm-theme-DZT10ikr.js} +1 -1
- package/dist/public/assets/{comment-chips-W2ozPSpm.js → comment-chips-BjkVSykR.js} +1 -1
- package/dist/public/assets/{config-provider-DamFbxl8.js → config-provider-DGQwNZtP.js} +3 -3
- package/dist/public/assets/{dialog-R8GugqUq.js → dialog-DztIj-ZS.js} +1 -1
- package/dist/public/assets/{dist-BZW14CKf.js → dist-BRmJz2fY.js} +1 -1
- package/dist/public/assets/{dist-DRufJFR7.js → dist-BVpMlVG3.js} +1 -1
- package/dist/public/assets/{dist-BE8rPie-.js → dist-BgBcg3TP.js} +1 -1
- package/dist/public/assets/{dist-Dm-VLxvd.js → dist-BiwzWInZ.js} +1 -1
- package/dist/public/assets/{dist-BR5M-SiF.js → dist-CkFATl39.js} +1 -1
- package/dist/public/assets/{dist-Cfmj7R4I.js → dist-DM6osNK2.js} +1 -1
- package/dist/public/assets/{dist-DBhufbLS.js → dist-DQyQPRvE.js} +1 -1
- package/dist/public/assets/{dist-BTo1AB3U.js → dist-DfLFtHzK.js} +1 -1
- package/dist/public/assets/{dist-CUhsr-gg.js → dist-DsH7eETa.js} +1 -1
- package/dist/public/assets/{dist-ILlrHFKs.js → dist-GenOktAv.js} +183 -183
- package/dist/public/assets/{dist-CcIAtWVJ.js → dist-dO0W-CVt.js} +1 -1
- package/dist/public/assets/{dist-D7MIhDGJ.js → dist-ofeGnIBD.js} +1 -1
- package/dist/public/assets/{dist-CElLQlwI.js → dist-z-y_5Bgj.js} +1 -1
- package/dist/public/assets/{doc-paths-DAh95jxf.js → doc-paths-CB3USVY1.js} +1 -1
- package/dist/public/assets/{documents-events-CCW6R-r2.js → documents-events-rgFBXE2Z.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-Bf1ZqkPA.js → file-tree-adapter-4JTjxhHS.js} +1 -1
- package/dist/public/assets/{file-tree-utils-CgJ4lrP9.js → file-tree-utils-CYn1f82_.js} +1 -1
- package/dist/public/assets/{folder-config-api-CKV5STj1.js → folder-config-api-ByqyyP9w.js} +1 -1
- package/dist/public/assets/follow-file-kuGZjRsi.js +4 -0
- package/dist/public/assets/globals-tIUZlcbW.css +1 -0
- package/dist/public/assets/i18n-CrYaxckE.js +1 -0
- package/dist/public/assets/{index-qtxLhYJO.js → index-DmXrGqKD.js} +17 -17
- package/dist/public/assets/{input-group-ClrIuhWi.js → input-group-BiaQ-rIw.js} +1 -1
- package/dist/public/assets/{lint-config-client-xawAT1mQ.js → lint-config-client-DydgEnDK.js} +1 -1
- package/dist/public/assets/lint-plugin-meta-FPoTE-0t.js +1 -0
- package/dist/public/assets/{markdownlint-rule-browser-B3UPVPG_.js → markdownlint-rule-browser-DwEGxp2H.js} +1 -1
- package/dist/public/assets/messages-7cAk2vbZ.js +1 -0
- package/dist/public/assets/messages-BNv51jKY.js +1 -0
- package/dist/public/assets/messages-BS_zCLy8.js +1 -0
- package/dist/public/assets/messages-BmYExk_R.js +1 -0
- package/dist/public/assets/messages-C3vvvgBK.js +1 -0
- package/dist/public/assets/messages-CmD7dBQ3.js +1 -0
- package/dist/public/assets/messages-CpVNkvrj.js +1 -0
- package/dist/public/assets/messages-CxF28E4J.js +1 -0
- package/dist/public/assets/messages-D9UyuwOS.js +1 -0
- package/dist/public/assets/messages-DQ5yKIrs.js +1 -0
- package/dist/public/assets/messages-DdBrUUBf.js +1 -0
- package/dist/public/assets/navigation-targets-iVnea4YK.js +1 -0
- package/dist/public/assets/{open-managed-artifact-tab-G7xdjHph.js → open-managed-artifact-tab-DpfEVLG-.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CpVItLnx.js → pending-receive-nav-store-BHeTqy0Z.js} +1 -1
- package/dist/public/assets/{project-paths-DOOtPmjl.js → project-paths-_w2mRvRX.js} +1 -1
- package/dist/public/assets/prop-types-ClS-DLuz.js +1 -0
- package/dist/public/assets/{receive-store-BrOspwat.js → receive-store-R5sEQn80.js} +1 -1
- package/dist/public/assets/{schema-fields-view-intent-D0jz38_6.js → schema-fields-view-intent-DiE8NL9y.js} +1 -1
- package/dist/public/assets/{selection-context-nm7zlSXJ.js → selection-context-CHJ-gfRx.js} +1 -1
- package/dist/public/assets/{skill-actions-e3PRoOA3.js → skill-actions-B9BGbzJZ.js} +2 -2
- package/dist/public/assets/{skill-scope-8PP6d5Gw.js → skill-scope-CFwClOyk.js} +1 -1
- package/dist/public/assets/{skills-api-DQ0PK-8O.js → skills-api-B41p5sp3.js} +1 -1
- package/dist/public/assets/{src-BKQkpwCc.js → src-gXOrH5MP.js} +1 -1
- package/dist/public/assets/{tag-pill-input-BHj2SAnj.js → tag-pill-input-BTKlFD92.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-DpIU3fe6.js → target-navigation-intent-CIjVZTkZ.js} +1 -1
- package/dist/public/assets/{telemetry-impl-Byic_ID0.js → telemetry-impl-Bvv5kEhb.js} +1 -1
- package/dist/public/assets/{telemetry-startup-D_ttbNLC.js → telemetry-startup-C8JOSRcr.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-CgJpdKCI.js → terminal-cli-display-CW7j5kqb.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-DQ0KtteM.js → terminal-launch-events-CW7Dk9L6.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-CE1yzjKD.js → terminal-telemetry-CxkpCpp5.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-epnUVwhY.js → text-viewer-languages-oVDGEYYY.js} +2 -2
- package/dist/public/assets/{typing-burst-detector-B6UhFT8T.js → typing-burst-detector-fIHJv2J1.js} +4 -4
- package/dist/public/assets/{uninstall-BE8yLKij.js → uninstall-CYpAgTNE.js} +1 -1
- package/dist/public/assets/{use-activity-panel-CF6Guvjl.js → use-activity-panel-BEnqyFcJ.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-BatIDUX7.js → use-apply-config-color-theme-Dw8J4H8Z.js} +1 -1
- package/dist/public/assets/{use-collab-url-7XE2_0_k.js → use-collab-url-CbdhvhFJ.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DS89T4Os.js → use-live-xterm-theme-B_qB957b.js} +1 -1
- package/dist/public/assets/{use-open-skill-CtzMj-sg.js → use-open-skill-Ca4D1I53.js} +1 -1
- package/dist/public/assets/{use-popular-skills-BY0ulPzk.js → use-popular-skills-ByV4BHXd.js} +1 -1
- package/dist/public/assets/{use-settings-route-DN0TWdfX.js → use-settings-route-4qI--CpZ.js} +1 -1
- package/dist/public/assets/{use-skill-origin-COh1_mOK.js → use-skill-origin-DGj0sj4C.js} +1 -1
- package/dist/public/assets/{use-skills-C_HuRxth.js → use-skills-WWbAKl3q.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CIQB6jgW.js → use-terminal-enabled-Dz_qAFuD.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-RrvwSA9l.js +6 -0
- package/dist/public/assets/{use-workspace-CNCW4CS8.js → use-workspace-BRfhPAI8.js} +1 -1
- package/dist/public/index.html +104 -104
- package/dist/public/uninstall.html +12 -12
- package/dist/{repair-launch-json-D0g7JIQF.mjs → repair-launch-json-D4L6s57C.mjs} +2 -2
- package/dist/{repair-mcp-configs-hbX7fywV.mjs → repair-mcp-configs-1m14wb_8.mjs} +2 -2
- package/dist/{repair-skills-BVCJQr-D.mjs → repair-skills-Dn9wtbHi.mjs} +2 -2
- package/dist/repair-skills-cJ41S9pk.mjs +1 -0
- package/dist/server-lock-CTrzO_5l.mjs +1 -0
- package/dist/{server-lock-CeKMy65H.mjs → server-lock-D8tFCW-G.mjs} +2 -2
- package/dist/{skill-teardown-CybJJo-5.mjs → skill-teardown-riJHlPak.mjs} +2 -2
- package/dist/{src--OhnhRml.mjs → src-BVxZYLJj.mjs} +328 -328
- package/dist/src-CclRwMug.mjs +1 -0
- package/dist/{src-3gxGmFyn.mjs → src-CeMQBLDa.mjs} +1 -1
- package/dist/{src-DNgZpbWL.mjs → src-ISYL0cXX.mjs} +4 -4
- package/dist/{src-Dj6UxpKM.mjs → src-RGB2pEts.mjs} +124 -124
- package/dist/start-8PynebPz.mjs +1 -0
- package/dist/start-DqsRiUST.mjs +12 -0
- package/dist/{ui-DXs7IMUP.mjs → ui-CyO6JCpp.mjs} +3 -3
- package/dist/{write-project-skill-B4M4CzQe.mjs → write-project-skill-Bx22NW0a.mjs} +3 -3
- package/package.json +5 -5
- package/dist/constants-GVvlP0F1.mjs +0 -2
- package/dist/git-handle-CEoe8TIl.mjs +0 -1
- package/dist/init-CXnCnSQu.mjs +0 -1
- package/dist/loader-zzsiCoMM.mjs +0 -1
- package/dist/md-manager-45eVlaBq.mjs +0 -2
- package/dist/preview-BqJFFDSI.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-CjgqNZXo.js +0 -3
- package/dist/public/assets/DocumentContext-tOm4SkOp.js +0 -38
- package/dist/public/assets/FeedbackForm-tTwFtkKO.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-Bb9ghWb1.js +0 -1
- package/dist/public/assets/SettingsDialogBody-BNYz-D4X.js +0 -12
- package/dist/public/assets/client-version-DFQNNQh_.js +0 -1
- package/dist/public/assets/follow-file-D0HdtSlc.js +0 -4
- package/dist/public/assets/globals-CZFxK0Rt.css +0 -1
- package/dist/public/assets/i18n-CUKvPzxt.js +0 -1
- package/dist/public/assets/lint-plugin-meta-CsGPauME.js +0 -1
- package/dist/public/assets/messages-BD6xU0hl.js +0 -1
- package/dist/public/assets/messages-BrOihCC2.js +0 -1
- package/dist/public/assets/messages-CeGZ3qGI.js +0 -1
- package/dist/public/assets/messages-DLAxD4Ea.js +0 -1
- package/dist/public/assets/messages-DiRAd1Pa.js +0 -1
- package/dist/public/assets/messages-DoSs73jK.js +0 -1
- package/dist/public/assets/messages-FGGtYX0Z.js +0 -1
- package/dist/public/assets/messages-QNJusJtV.js +0 -1
- package/dist/public/assets/messages-T7J7xjCi.js +0 -1
- package/dist/public/assets/messages-rE7VifgH.js +0 -1
- package/dist/public/assets/messages-zscDryNK.js +0 -1
- package/dist/public/assets/navigation-targets-C1boWExT.js +0 -1
- package/dist/public/assets/prop-types-BIrEWnOv.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-CDFU16yg.js +0 -6
- package/dist/repair-skills-BmAntgZP.mjs +0 -1
- package/dist/server-lock-CDm0H6LS.mjs +0 -1
- package/dist/src-BqNFscyh.mjs +0 -1
- package/dist/start-DYelgMjm.mjs +0 -1
- package/dist/start-xJV4Y-0A.mjs +0 -12
- /package/dist/public/assets/{CopyButton-CKyZY1PL.js → CopyButton-ByR_1gcU.js} +0 -0
- /package/dist/public/assets/{asset-dispatch-Ccnji1rt.js → asset-dispatch-Cz1weVX3.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-C4YJf5De.js → auth-prompt-store-BYOv6_8O.js} +0 -0
- /package/dist/public/assets/{badge-BYteLKha.js → badge-DFX4S3a5.js} +0 -0
- /package/dist/public/assets/{copilot-CmkvU8CH.js → copilot-Dh1BU6kS.js} +0 -0
- /package/dist/public/assets/{cursor-CIl_AjI1.js → cursor-B6reg1lS.js} +0 -0
- /package/dist/public/assets/{dist-sSZdzHur.js → dist-DAqA-GDU.js} +0 -0
- /package/dist/public/assets/{documents-fetch-DnpUYK4R.js → documents-fetch-CV8lWh8v.js} +0 -0
- /package/dist/public/assets/{download-Dn5ulvxm.js → download-C3PYuI1f.js} +0 -0
- /package/dist/public/assets/{external-link-3El87eIe.js → external-link-BIMZpgNa.js} +0 -0
- /package/dist/public/assets/{eye-DmhHKPNd.js → eye-CSz7ogHo.js} +0 -0
- /package/dist/public/assets/{field-CvwbVfuf.js → field-CtVP3IIV.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-C2Ibtqn6.js → file-tree-rename-validation-CCqiFGp1.js} +0 -0
- /package/dist/public/assets/{folder-CWlDik9N.js → folder-CopDpuy5.js} +0 -0
- /package/dist/public/assets/{folder-open-BTTec8yg.js → folder-open-DUSc8NL8.js} +0 -0
- /package/dist/public/assets/{globals-CfOSCw3_.js → globals-CLY_4Hw9.js} +0 -0
- /package/dist/public/assets/{hash-PyoMEEnH.js → hash-DI30zEBt.js} +0 -0
- /package/dist/public/assets/{info-w0kv2CeC.js → info-CV59RycV.js} +0 -0
- /package/dist/public/assets/{input-BFt4qZaV.js → input-BYiOK210.js} +0 -0
- /package/dist/public/assets/{list-plus-2r7_ATZj.js → list-plus-DBdmIc6v.js} +0 -0
- /package/dist/public/assets/{minus-DNhR60ON.js → minus-D07ZsfDZ.js} +0 -0
- /package/dist/public/assets/{miss-dialog-store-DzXIxgCB.js → miss-dialog-store-sSyy54tn.js} +0 -0
- /package/dist/public/assets/{panel-D2VXQC58.js → panel-CbGx_cRv.js} +0 -0
- /package/dist/public/assets/{panel-right-open-DAyUhiQN.js → panel-right-open-B66oA9M1.js} +0 -0
- /package/dist/public/assets/{paperclip-B6sgPA4f.js → paperclip-BlKB6Xwa.js} +0 -0
- /package/dist/public/assets/{refresh-cw-CR2QWccs.js → refresh-cw-DQervzDZ.js} +0 -0
- /package/dist/public/assets/{spinner-CHTY-VE-.js → spinner-BqySY7qY.js} +0 -0
- /package/dist/public/assets/{square-pen-DdAKbKU7.js → square-pen-Cb57Y3fg.js} +0 -0
- /package/dist/public/assets/{startup-marks-CTM7uDIJ.js → startup-marks-Cdkh8q3E.js} +0 -0
- /package/dist/public/assets/{stex-s_JxeNEZ.js → stex-PMopVeEZ.js} +0 -0
- /package/dist/public/assets/{terminal-DRi0ugpC.js → terminal-Cvoe7pfU.js} +0 -0
- /package/dist/public/assets/{textarea-CzW0aR0j.js → textarea-yZk4yd9U.js} +0 -0
- /package/dist/public/assets/{trash-2-BWJWOK8-.js → trash-2-N0ilsnnr.js} +0 -0
- /package/dist/public/assets/{triangle-alert-DV20-jn9.js → triangle-alert-COo6wbUK.js} +0 -0
- /package/dist/public/assets/{undo-2-CMyZc9mZ.js → undo-2-WGCwknr8.js} +0 -0
- /package/dist/public/assets/{use-installed-clis-DmyaQmU9.js → use-installed-clis-Cydpb5jd.js} +0 -0
- /package/dist/public/assets/{wrench-C3BL-uHg.js → wrench-CP2MIQHF.js} +0 -0
- /package/dist/public/assets/{x-BaJrHZK_.js → x-DS57FvHW.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,o as t,p as n}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{i as e,o as t,p as n}from"./write-project-skill-Bx22NW0a.mjs";import{d as r,v as i}from"./init-BGPdBpY7.mjs";import{t as a}from"./mcp-migrate-event-B1gJf6bG.mjs";import{homedir as o}from"node:os";function s(n){let r=n.logger??u,i=n.home??o(),a=[];if(n.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of e){let e=t[o],s=c(()=>e.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:e,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),e.projectConfigPath){let t=e.projectConfigPath,i=c(()=>t(n.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:e,home:void 0,cwd:n.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(e){let t={scope:e.scope,editorId:e.editorId,configPath:e.configPath},o=r(e.target,e.cwd,e.home,e.configPathOverride);if(o===null)return{...t,outcome:`no-entry`};if(n(o))return{...t,outcome:`canonical`};e.logger(a({scope:e.scope,surface:`cli-repair`,editorId:e.editorId,configPath:e.configPath,priorEntry:o}));let s=i(e.target,e.cwd,{mode:`published`,skipAvailabilityCheck:!0},e.home,e.configPathOverride);if(s.action===`failed`){let n=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:n}),{...t,outcome:`write-failed`,error:n}}return s.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:s.declineReason}),{...t,outcome:`declined`}):{...t,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-1m14wb_8.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{z as e}from"./src-RGB2pEts.mjs";import{Cr as t,_r as n,cr as r,fr as i,lr as a,mr as o,pr as s,wr as c,yr as l}from"./src-BVxZYLJj.mjs";import{o as u,s as d,t as f,v as p}from"./write-project-skill-Bx22NW0a.mjs";import{n as m,s as h,t as g}from"./colors-BsmVIwfM.mjs";import{n as _,r as v,t as y}from"./skill-teardown-riJHlPak.mjs";import{dirname as b,join as x,relative as S,resolve as C}from"node:path";import{existsSync as w,mkdirSync as T,readFileSync as E,readdirSync as D,rmSync as O,statSync as k,writeFileSync as A}from"node:fs";import{homedir as j}from"node:os";import{createInterface as M}from"node:readline/promises";const N={existsSync:e=>w(e),isDirectory:e=>{try{return k(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>D(e),readFileSync:e=>E(e),writeFileSync:(e,t)=>{A(e,t)},mkdirSync:(e,t)=>{T(e,t)},rmSync:(e,t)=>{O(e,t)}},P={resolveProjectBundledSkillDir:()=>l(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>l(e,{checkDesktop:!1}),readBundledVersion:()=>a(),readRecordedVersion:e=>i(e,`cli-hosts`),writeRecordedVersion:(e,t)=>o(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>n(e),readBundleDecision:(e,t)=>r(e,t),writeBundleDecision:(e,t,n)=>s(e,t,n),removeBundleFromDisk:(e,t)=>v(e,t)};function F(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function I(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(b(t),{recursive:!0}),L(e,t,n)}function L(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=x(e,r),a=x(t,r);n.isDirectory(i)?L(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function R(e,t,n,r,i,a){let o=[],s=x(e,`.agents`,`skills`,t),c=!1;if(r.existsSync(s))o.push({kind:`central`,path:s,outcome:`skipped-present`});else try{I(n,s,r),c=!0,o.push({kind:`central`,path:s,outcome:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:!1,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`central`,path:s,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-central-failed`,scope:`user`,path:s,error:t})}for(let c of d){let l=x(e,c.hostDir),u=x(l,`skills`,t);if(u===s){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!r.existsSync(l)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-host-absent`});continue}if(r.existsSync(u)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-present`});continue}try{I(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:!1,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,error:t})}}return{entries:o,centralWritten:c}}function z(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function B(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of d){let o=x(e,t.hostDir,`skills`,`open-knowledge`),s=x(o,`SKILL.md`);if(n.existsSync(s)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`present`});continue}let c=u[t.editorId]?.projectConfigPath?.(e);if(!z(c,n)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:o});continue}try{f(o,e),I(i,o,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`created`}),r({event:`project-skill-reclaim-created`,scope:`project`,editorId:t.editorId,path:o})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:o,error:n})}}return{outcome:`done`,entries:a}}async function V(n,r,i,a){let o=e=>{r.recordEvent(e).catch(()=>{})},s=()=>new Date().toISOString(),l;try{l=await r.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return a({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await r.readRecordedVersion(n)}catch(e){a({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of c)try{d.push({id:e,sourceDir:r.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return a({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let o of d){let s=t[o.id],c=i.existsSync(x(n,`.agents`,`skills`,s)),l=await r.readBundleDecision(n,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{r.removeBundleFromDisk(n,o.id),a({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:o.id})}catch(e){a({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await r.writeBundleDecision(n,s,!0)}catch(e){a({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}p.push(o)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>i.existsSync(x(n,`.agents`,`skills`,t[e.id])));if(u!==null&&u===l&&m)return a({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===c.length,_=[];for(let{id:e,sourceDir:r}of p){let o=R(n,t[e],r,i,a,l);h.push(...o.entries),_.push({id:e,centralWritten:o.centralWritten})}let v=h.some(e=>e.kind===`central`&&e.outcome===`failed`);if(g&&!v){let e=null;try{await r.writeRecordedVersion(n,l),a({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),a({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t,centralWritten:n}of _)o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?n?`installed`:`skip-current`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:g?e?`all-writes-failed`:`central-write-failed`:`bundle-unresolved`})}return{outcome:`done`,version:l,entries:h}}async function H(e){let t=e.logger??F,n=e.fs??N,r=e.home??j(),i={...P,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=B(e.projectDir,i,n,t),o=await V(r,i,n,t),s=_(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=y(r,s)}catch(e){u=!0,t({event:`legacy-fanout-cleanup-refused`,scope:`user`,error:e instanceof Error?e.message:String(e)})}for(let e of c)t({event:`legacy-fanout-path-removed`,scope:`user`,path:e})}else l=!0,t({event:`legacy-fanout-cleanup-declined`,scope:`user`});return{status:`done`,project:a,user:o,legacySwept:c,legacyCleanupDeclined:l,legacyCleanupFailed:u}}function U(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`&&e.user.reason!==`all-bundles-declined`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function W(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`present`).length,r=e.project.entries.filter(e=>e.outcome===`created`).length,i=e.project.entries.filter(e=>e.outcome===`no-token`).length,a=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} present, ${r} created, ${i} no-token, ${a} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-present`).length,i=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,a=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} present, ${i} skipped, ${a} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return e.legacySwept.length>0?t.push(` Cleanup: removed ${e.legacySwept.length} path(s) from a pre-0.42 install.`):e.legacyCleanupFailed?t.push(` Cleanup: failed — see logs; pre-0.42 directories left in place.`):e.legacyCleanupDeclined&&t.push(` Cleanup: declined — pre-0.42 directories left in place.`),t.join(`
|
|
2
2
|
`)}function G(){return new p(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").option(`-y, --yes`,`Skip the confirmation prompt for removing directories left by a pre-0.42 install.`).action(async e=>{let t=await H({projectDir:C(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null,confirmLegacyCleanup:t=>K(t,{yes:e.yes===!0})});process.stdout.write(`${W(t)}\n`),process.exitCode=U(t)})}async function K(e,t){let n=j(),r=e=>`~/${S(n,e)}`,i=t.input??process.stdin,a=[``,g(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),m(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${g(`Remove OpenKnowledge skills:`)} ${e.skillDirs.length}`,...e.skillDirs.map(e=>` ${r(e)}`)),e.emptyDirs.length>0){let t=e.skillDirs.length>0?`Then remove these, which hold nothing else once the above are gone:`:`Remove these empty directories, left behind by that install:`;a.push(``,`${g(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,m(`Nothing outside these paths is touched. A directory that still holds anything is kept.`)),process.stdout.write(`${a.join(`
|
|
3
3
|
`)}\n`),t.yes)return!0;if(!i.isTTY)return process.stdout.write(`${h("Not a terminal — skipping cleanup. Re-run with `ok repair-skills --yes` to remove these.")}\n`),!1;let o=M({input:i,output:process.stdout});try{let e=(await o.question(`\n${g(`Remove them?`)} ${m(`[y/N] `)}`)).trim().toLowerCase();return e===`y`||e===`yes`}finally{o.close()}}export{G as n,H as t};
|
|
4
|
-
//# sourceMappingURL=repair-skills-
|
|
4
|
+
//# sourceMappingURL=repair-skills-Dn9wtbHi.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-Dn9wtbHi.mjs";export{e as repairSkills};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,o as t,r as n}from"./server-lock-D8tFCW-G.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./src-
|
|
2
|
-
//# sourceMappingURL=server-lock-
|
|
1
|
+
import"./src-RGB2pEts.mjs";import{r as e}from"./logger-DFxEUjvj.mjs";import{dirname as t,join as n,resolve as r}from"node:path";import{fileURLToPath as i}from"node:url";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c,readFileSync as l,unlinkSync as u,writeFileSync as d,writeSync as f}from"node:fs";import{homedir as p,hostname as m}from"node:os";import{randomUUID as h}from"node:crypto";function g(e){try{return process.kill(e,0),!0}catch(e){return!!(e&&typeof e==`object`&&`code`in e&&e.code===`EPERM`)}}function _(e){return!(typeof e!=`number`||!Number.isInteger(e)||e<2||e>2147483647)}function v(e){return new URL(e.url??``,`http://localhost`).searchParams}function y(e){let t=e?.code;return typeof t==`string`?t:void 0}const b=/^[A-Za-z0-9-]{8,64}$/;let x=null;function S(e){return n(e??p(),`.ok`,`machine-id`)}function C(n){if(n===void 0&&x!==null)return x;let r=S(n),i=null;try{let e=l(r,`utf-8`).trim();b.test(e)&&(i=e)}catch{}if(i===null){i=h();try{s(t(r),{recursive:!0}),d(r,`${i}\n`,{encoding:`utf-8`,mode:384})}catch(t){e(`machine-id`).warn({path:r,err:t},`Failed to persist ${r} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${t instanceof Error?t.message:String(t)}`)}}return n===void 0&&(x=i),i}function w(){try{let e=r(t(i(import.meta.url)),`..`,`package.json`),n=JSON.parse(l(e,`utf-8`));if(typeof n.version==`string`&&n.version.length>0)return n.version}catch{}return`0.0.0-unknown`}const T=w(),E=1,D=e(`process-lock`);var O=class extends Error{existing;lockPath;lockName;constructor(e,t,n){super(`OpenKnowledge ${n} already running at ${e.url??`port ${e.port}`} (pid ${e.pid}, started ${e.startedAt}). Stop it first or use a different directory. Lock: ${t}`),this.name=`ProcessLockCollisionError`,this.existing=e,this.lockPath=t,this.lockName=n}};function k(e,t){return r(e,`${t}.lock`)}const A=new Map;function j(e){A.set(e,(A.get(e)??0)+1)}function M(e){let t=A.get(e);return t===void 0||t<=1?(A.delete(e),!0):(A.set(e,t-1),!1)}function N(e){return typeof e.machineId==`string`?e.machineId===C():e.hostname===m()}const P=new Set;let F=!1;function I(e){P.add(e),!F&&(F=!0,process.on(`exit`,()=>{for(let e of P)try{let t=JSON.parse(l(e,`utf-8`));if(t?.pid!==process.pid||typeof t.machineId==`string`&&t.machineId!==C()||t.machineId===void 0&&typeof t.hostname==`string`&&t.hostname!==m())continue;u(e)}catch{}}))}function L(e,t){try{let n=JSON.parse(l(e,`utf-8`));return n&&typeof n==`object`&&_(n.pid)?n:(D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null)}catch{return D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null}}function R(e){let{lockName:t,lockDir:n,metadata:r}=e,i=`[${t}-lock]`;s(n,{recursive:!0});let l=k(n,t),p={pid:process.pid,hostname:m(),port:r.port,...r.url!==void 0&&{url:r.url},startedAt:new Date().toISOString(),worktreeRoot:r.worktreeRoot,machineId:C(),...r.kind!==void 0&&{kind:r.kind},...r.parentPid!==void 0&&{parentPid:r.parentPid},...r.capabilities!==void 0&&{capabilities:r.capabilities},protocolVersion:r.protocolVersion??1,runtimeVersion:r.runtimeVersion??T},h=JSON.stringify(p,null,2);for(let e=0;e<3;e++){if(!o(l))try{let e=c(l,`wx`,384);try{f(e,h)}finally{a(e)}return j(l),I(l),z({lockName:t,lockDir:n,lockPath:l})}catch(e){if(y(e)!==`EEXIST`)throw e}let e=L(l,i);if(e){if(N(e)&&e.pid===process.pid)return d(l,h,{encoding:`utf-8`,mode:384}),j(l),I(l),z({lockName:t,lockDir:n,lockPath:l});if(g(e.pid))throw new O(e,l,t);D.warn({pid:e.pid,host:e.hostname},`${i} Stale lock detected (pid=${e.pid}, host=${e.hostname}) — replacing`)}try{u(l)}catch{}}throw Error(`${i} Failed to acquire ${l} after 3 attempts (concurrent acquire contention).`)}function z(e){let{lockName:t,lockDir:n,lockPath:r}=e;return{lockPath:r,release:()=>q({lockName:t,lockDir:n}),updatePort:(e,r)=>H({lockName:t,lockDir:n,port:e,url:r})}}function B(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`)return null;let n=t.hostname;return n===`localhost`||n===`[::1]`||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(n)?t.origin:null}function V(e,t){if(typeof e.url==`string`&&e.url.length>0){let t=B(e.url);if(t!==null)return t}if(e.port>0){let n=t?.fallbackHost??`localhost`;return`http://${n===`0.0.0.0`||n===`::`?`localhost`:n.includes(`:`)&&!n.startsWith(`[`)?`[${n}]`:n}:${e.port}`}return null}function H(e){let{lockName:t,lockDir:n,port:r,url:i}=e,a=`[${t}-lock]`,s=k(n,t);if(!o(s)){D.warn({lockPath:s},`${a} Lock file missing at ${s} during port update — skipping`);return}let c;try{let e=JSON.parse(l(s,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:s},`${a} Corrupt lock at ${s} during port update — skipping`);return}c=e}catch{D.warn({lockPath:s},`${a} Unreadable lock at ${s} during port update — skipping`);return}if(c.pid===process.pid&&N(c)){c.port=r,i===void 0?delete c.url:c.url=i;try{d(s,JSON.stringify(c,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:s,err:e},`${a} Failed to update port in ${s}: ${e instanceof Error?e.message:String(e)}`)}}}function U(e){let{lockName:t,lockDir:n}=e,r=`[${t}-lock]`,i=k(n,t);if((A.get(i)??0)>1)return;let a;try{let e=JSON.parse(l(i,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:i},`${r} Corrupt lock at ${i} during draining mark — skipping`);return}a=e}catch(e){y(e)!==`ENOENT`&&D.warn({lockPath:i,err:e},`${r} Unreadable lock at ${i} during draining mark — skipping: ${e instanceof Error?e.message:String(e)}`);return}if(a.pid===process.pid&&N(a)&&a.draining!==!0){a.draining=!0;try{d(i,JSON.stringify(a,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:i,err:e},`${r} Failed to mark ${i} draining: ${e instanceof Error?e.message:String(e)}`)}}}function W(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return null;let i;try{let e=JSON.parse(l(r,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid))return null;i=e}catch{return null}if(!N(i))return null;if(!g(i.pid)){try{u(r)}catch{}return null}return i}function G(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return{status:`absent`};let i;try{i=JSON.parse(l(r,`utf-8`))}catch{return{status:`incompatible`,reason:`corrupt`,raw:void 0}}if(!i||typeof i!=`object`)return{status:`incompatible`,reason:`corrupt`,raw:i};let a=i;if(!_(a.pid)||typeof a.hostname!=`string`||typeof a.port!=`number`||typeof a.startedAt!=`string`||typeof a.worktreeRoot!=`string`)return{status:`incompatible`,reason:`corrupt`,raw:i};let s={pid:a.pid,hostname:a.hostname,port:a.port,url:typeof a.url==`string`?a.url:void 0,startedAt:a.startedAt,worktreeRoot:a.worktreeRoot,machineId:typeof a.machineId==`string`?a.machineId:void 0,draining:a.draining===!0?!0:void 0,capabilities:Array.isArray(a.capabilities)&&a.capabilities.every(e=>typeof e==`string`)?a.capabilities:void 0,protocolVersion:typeof a.protocolVersion==`number`?a.protocolVersion:void 0,runtimeVersion:typeof a.runtimeVersion==`string`?a.runtimeVersion:void 0};if(!N(s))return{status:`stale`,lock:s};if(!g(s.pid)){try{u(r)}catch{}return{status:`stale`,lock:s}}return s.protocolVersion===void 0||s.runtimeVersion===void 0?{status:`incompatible`,reason:`missing-fields`,raw:i}:{status:`live`,lock:s}}async function K(e){let{lockName:t,lockDir:n}=e,r=e.timeoutMs??1e4,i=e.pollIntervalMs??100,a=e.readLock??(()=>W({lockName:t,lockDir:n})),o=e.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a();if(s===null||s.draining!==!0)return`no-drain`;let c=Date.now()+r;for(;Date.now()<c;){await o(i);let e=a();if(e===null)return`released`;if(e.draining!==!0)return`no-drain`}return`timeout`}function q(e){let{lockName:t,lockDir:n,deferUnlinkToExit:r=!1}=e,i=`[${t}-lock]`,a=k(n,t);if(M(a)){if(r){U({lockName:t,lockDir:n});return}if(o(a))try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||typeof e.pid!=`number`||e.pid!==process.pid||!N(e))return;u(a),P.delete(a)}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to release ${a}: ${e instanceof Error?e.message:String(e)}`)}}}var J=class extends O{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function Y(e,t){try{return R({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof O&&e.lockName===`server`?new J(e.existing,e.lockPath):e}}function X(e,t,n){H({lockName:`server`,lockDir:e,port:t,url:n})}function Z(e){return W({lockName:`server`,lockDir:e})}function Q(e,t){q({lockName:`server`,lockDir:e,...t})}function $(e){U({lockName:`server`,lockDir:e})}function ee(e,t){return K({lockName:`server`,lockDir:e,...t})}export{_ as C,g as S,T as _,Q as a,y as b,O as c,k as d,U as f,H as g,q as h,Z as i,R as l,G as m,Y as n,X as o,W as p,$ as r,ee as s,J as t,V as u,E as v,v as x,C as y};
|
|
2
|
+
//# sourceMappingURL=server-lock-D8tFCW-G.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Cr as e,wr as t}from"./src
|
|
2
|
-
//# sourceMappingURL=skill-teardown-
|
|
1
|
+
import{Cr as e,wr as t}from"./src-BVxZYLJj.mjs";import{s as n}from"./write-project-skill-Bx22NW0a.mjs";import{dirname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import{existsSync as l,lstatSync as u,readdirSync as d,rmSync as f,rmdirSync as p}from"node:fs";const m=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],h=[...t.map(t=>e[t]),`open-knowledge`];function g(e){if(!i(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=s(e);if(t===c||r(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function _(e,t){let n=o(e,t);if(n.startsWith(`..`)||i(n))return!1;let r=e;for(let e of n.split(c)){r=a(r,e);try{if(!u(r).isDirectory())return!1}catch{return!1}}return!0}function v(e,t){try{return d(e).every(n=>t.has(a(e,n)))}catch{return!1}}function y(e){let t=g(e),n=[],i=[],o=new Set;for(let e of m){let s=a(t,e.hostDir,`skills`);if(!_(t,s))continue;let u=h.map(e=>a(s,e)).filter(e=>l(e));n.push(...u);for(let e of u)o.add(e);let d=a(t,e.pruneRoot),f=s;for(;v(f,o)&&(i.push(f),o.add(f),f!==d);){let e=r(f);if(e===f||e===t||!e.startsWith(t+c))break;f=e}}return{skillDirs:n,emptyDirs:i}}function b(e){try{if(!u(e).isDirectory())return!1;let t=d(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function x(e){let t=new Set,n=new Set;for(let i of m){let o=a(e,i.hostDir,`skills`);for(let e of h)t.add(a(o,e));let s=a(e,i.pruneRoot),l=o;for(;n.add(l),l!==s;){let t=r(l);if(t===l||t===e||!t.startsWith(e+c))break;l=t}}return{skillDirs:t,emptyDirs:n}}function S(e,t){let n=g(e),r=x(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(_(n,e)&&b(e))try{f(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(_(n,e))try{p(e),a.push(e)}catch{}return a}function C(r){let i=g(r),o=[];for(let r of t){let t=e[r];o.push({path:a(i,`.agents`,`skills`,t),bundleId:r,scope:`central`});for(let e of n)o.push({path:a(i,e.hostDir,`skills`,t),bundleId:r,scope:`host`,hostDir:e.hostDir})}return o}function w(e,t){let n=[];for(let r of C(e))if(r.bundleId===t)try{f(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}export{C as i,y as n,w as r,S as t};
|
|
2
|
+
//# sourceMappingURL=skill-teardown-riJHlPak.mjs.map
|