@inkeep/open-knowledge 0.46.0-beta.22 → 0.46.0-beta.24
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 +0 -10
- package/dist/{acp-harness-probe-CRn8eK5E.mjs → acp-harness-probe-CNr_uL76.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/config-schema.json +108 -13
- package/dist/config.user.schema.json +108 -13
- package/dist/constants-Bi35H8-Y.mjs +2 -0
- package/dist/fs-traced-CbQ-GS7x.mjs +1 -0
- package/dist/{fs-traced-S0kTDDbJ.mjs → fs-traced-OS6B1cZZ.mjs} +2 -2
- package/dist/git-handle-BHI57rg_.mjs +1 -0
- package/dist/{git-handle-B4sZCaOF.mjs → git-handle-BX4T8btU.mjs} +2 -2
- package/dist/index.d.mts +10 -10
- package/dist/index.mjs +1 -1
- package/dist/init-BHEUjCX8.mjs +1 -0
- package/dist/{init-DB7V_L0g.mjs → init-BJIgDJa3.mjs} +3 -3
- package/dist/{launch-json-removal-D3Fmd63b.mjs → launch-json-removal-CJgXyPl3.mjs} +2 -2
- package/dist/{loader-C3960z78.mjs → loader-BVADW1fG.mjs} +2 -2
- package/dist/loader-DIKghq91.mjs +1 -0
- package/dist/md-manager-oHSV8G_7.mjs +2 -0
- package/dist/{open-browser-C7gapRCk.mjs → open-browser-DlO-Gsw_.mjs} +2 -2
- package/dist/parse-worker.mjs +1 -1
- package/dist/{preview-BptdoKu1.mjs → preview-BwdVoUBB.mjs} +2 -2
- package/dist/preview-CRUQ2pHj.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DSMkdCKH.js → ActivityModeContent-DQJfhFeQ.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-C4Ff6cFp.js → AgentDiffPane-D9VDqMCh.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-BGP2cYbn.js → AgentThreadClientBinder-D_oR-NzN.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-5cWobd6L.js → ChangedOutsideBadge-bIQSwxNT.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-C21yk3-k.js +3 -0
- package/dist/public/assets/DiffView-DuPfWTAC.js +3 -0
- package/dist/public/assets/DocumentContext-Bhb-Rllg.js +38 -0
- package/dist/public/assets/EditorModeToggle-DYt4xV0B.js +1 -0
- package/dist/public/assets/EnableSyncConfirmDialog-D7Jzb7yA.js +1 -0
- package/dist/public/assets/FeedbackForm-D46RvfHP.js +1 -0
- package/dist/public/assets/{GraphPanel-BHhs9d_j.js → GraphPanel-BK4oU7K8.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BBOb5ucQ.js → ImportSkillDialog-DT373DMA.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-BQrh8rjg.js → LintConfigEditor-CKLpAwfC.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-BijATHK9.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-C2RUr9ul.js → ManagedArtifactProperties-CTw29aB4.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-CnzWhv5d.js → McpConsentDialogBody-BICQmO-R.js} +1 -1
- package/dist/public/assets/MermaidDocEditor-CwRVCqx7.js +1 -0
- package/dist/public/assets/{ReportBugDialogBody-cxc30WKp.js → ReportBugDialogBody-COTMJPnc.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-BpQBtTyY.js → SchemaConfigEditor-bkLxSHte.js} +1 -1
- package/dist/public/assets/{SessionsHost-CbagO4xN.js → SessionsHost-Bw4MKgvL.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-DYh6a8hI.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-ChLbTjJf.js → ShareBranchSwitchDialog-BrnApKc6.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BV36sHT2.js → ShareReceiveDialog-iTAeKpJM.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BuwUGCen.js → ShareReceiveMissDialog-D4JlxFnU.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-CTLg7M8S.js → SkillEditBanner-B4YWkWzW.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-BC5LfTxy.js → SkillOriginInline-Uo33TCpC.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-B2lqqSNx.js → SkillToolbarControls-DjI3RNFS.js} +1 -1
- package/dist/public/assets/SourceEditor-BZSPCXoy.js +1 -0
- package/dist/public/assets/{TerminalPanel-BPqwq8Q7.js → TerminalPanel-CVHJq4Iu.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-DXkoU-Wq.js → TerminalWindowApp-BITwxu5N.js} +1 -1
- package/dist/public/assets/TextDocEditor-7FzBwfzQ.js +1 -0
- package/dist/public/assets/{ThreadView-De8W8Sau.js → ThreadView-1kpA4rse.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BgqJsURk.js → TimelineDiffPane-Cvmtozih.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D3wCGBNo.js → agent-diff-store-CC8aPVHS.js} +1 -1
- package/dist/public/assets/{agent-visibility-jMXG7qfn.js → agent-visibility-XcypjuYX.js} +1 -1
- package/dist/public/assets/{auth-state-cache-cFen_h-t.js → auth-state-cache-DZEPs4Pt.js} +5 -5
- package/dist/public/assets/client-version-DL1elh-R.js +1 -0
- package/dist/public/assets/{esm-Dn0h--OG.js → cm-theme-BIKMj2KE.js} +1 -1
- package/dist/public/assets/{comment-chips-Dyvy03mN.js → comment-chips-tOHcZ7p1.js} +1 -1
- package/dist/public/assets/config-context-CVWonKyE.js +1 -0
- package/dist/public/assets/config-provider-COjQaZZa.js +4 -0
- package/dist/public/assets/{dist-BawYG08a.js → dist-B42mX0YC.js} +1 -1
- package/dist/public/assets/{dist-BhBnufkS.js → dist-B4xkxNpz.js} +1 -1
- package/dist/public/assets/dist-BOFmnwXG.js +1 -0
- package/dist/public/assets/{dist-B_pBFyj72.js → dist-ChpE673Q.js} +1 -1
- package/dist/public/assets/{dist-1bY-7L2j.js → dist-Cka1ipRf.js} +1 -1
- package/dist/public/assets/{dist-Dsr-OKxp2.js → dist-D14X-mK2.js} +1 -1
- package/dist/public/assets/{dist-4KAJEfHq.js → dist-DZQQflzj.js} +1 -1
- package/dist/public/assets/{dist-2t_r6dn4.js → dist-DjACJACU.js} +1 -1
- package/dist/public/assets/dist-Dp7TiZ5u2.js +1 -0
- package/dist/public/assets/{dist-DhrsAcRJ.js → dist-DsE9X3Yz.js} +1 -1
- package/dist/public/assets/{dist-CVBOvb5_.js → dist-cmNR9Bbs.js} +1 -1
- package/dist/public/assets/{dist-B5YN73un.js → dist-gVPIADKn2.js} +1 -1
- package/dist/public/assets/{dist-Bs8DNjRh2.js → dist-lf4nG52q2.js} +181 -179
- package/dist/public/assets/{doc-paths-BbWRFVgi.js → doc-paths-CQTfUOZw.js} +1 -1
- package/dist/public/assets/{documents-events-BajItHup.js → documents-events-BwmrmAGX.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-J6QKEfhJ.js → file-tree-adapter-DESJhWoq.js} +1 -1
- package/dist/public/assets/{file-tree-utils-BbhSDaTW.js → file-tree-utils-BG34yBvw.js} +1 -1
- package/dist/public/assets/{folder-config-api-4IXvDZej.js → folder-config-api-DNrN753j.js} +1 -1
- package/dist/public/assets/{globals-DZAq1BKn.js → globals-BGbHjQJ2.js} +1 -1
- package/dist/public/assets/globals-BmAazS49.css +1 -0
- package/dist/public/assets/{index-HKhe_5r9.js → index-DEksXdTO.js} +14 -14
- package/dist/public/assets/{lint-config-client-DxXOFrgQ.js → lint-config-client-Bg_dSPOM.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-C30SWnqC.js → markdownlint-rule-browser-DrFQPMJg.js} +1 -1
- package/dist/public/assets/navigation-targets-0wZAeKrc.js +1 -0
- package/dist/public/assets/{open-managed-artifact-tab-JgSQJhTn.js → open-managed-artifact-tab-BVeI_6BU.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-DsrtuI8M.js → pending-receive-nav-store-iHnQtDVG.js} +1 -1
- package/dist/public/assets/{prop-types-CiBsNxle.js → prop-types-CHOFqrri.js} +1 -1
- package/dist/public/assets/{receive-store-CV99IXkf.js → receive-store-YZh_VQ02.js} +1 -1
- package/dist/public/assets/{selection-context-DEAlV4hy.js → selection-context-CtO8dzXv.js} +1 -1
- package/dist/public/assets/{skill-actions-Du0nfl4o.js → skill-actions-CKsFVZ7s.js} +1 -1
- package/dist/public/assets/{skill-scope-p6Dsw7Bl.js → skill-scope-DNo7_4lO.js} +1 -1
- package/dist/public/assets/{skills-api-ctJhutDo.js → skills-api-YMCgcUab.js} +1 -1
- package/dist/public/assets/{src-DvGM96LY.js → src-DKNcDpsX.js} +1 -1
- package/dist/public/assets/{tag-pill-input-BR6KfEym.js → tag-pill-input-BR-zZRy9.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CbnILhIU.js → target-navigation-intent-CTSKR5SK.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DWXkoD72.js → telemetry-impl-BJK36lQF.js} +1 -1
- package/dist/public/assets/{telemetry-startup-3Sng8oEw.js → telemetry-startup-D8rFEM2d.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-BO-PD_eo.js → terminal-launch-events-D7klM-xS.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-D8M0Ozm1.js → terminal-telemetry-JwJxpal6.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-DFJQsbAG.js → text-viewer-languages-BLSME92j.js} +2 -2
- package/dist/public/assets/{typing-burst-detector-J49yrfso.js → typing-burst-detector-X0S33jis.js} +1 -1
- package/dist/public/assets/{uninstall-CFuBiQfI.js → uninstall-CgrheMqc.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BkkZ0ANm.js → use-activity-panel-BZ9nGQPH.js} +1 -1
- package/dist/public/assets/{use-collab-url-DZPhaKCl.js → use-collab-url-D8N5M2pl.js} +1 -1
- package/dist/public/assets/use-live-xterm-theme-on3ebtaK.js +1 -0
- package/dist/public/assets/{use-open-skill-DLwXz8W_.js → use-open-skill-CI0ilwyX.js} +1 -1
- package/dist/public/assets/{use-settings-route-CS1B3HfO.js → use-settings-route-BiaOx7d8.js} +1 -1
- package/dist/public/assets/{use-skill-directory-jOoyjAPU.js → use-skill-directory-BVbrNJTi.js} +1 -1
- package/dist/public/assets/{use-skill-origin-DDWTwjBX.js → use-skill-origin-CEQwPxVb.js} +1 -1
- package/dist/public/assets/{use-skills-udAv99z6.js → use-skills-DdHlTORK.js} +1 -1
- package/dist/public/assets/use-terminal-enabled-DVN1muEr.js +1 -0
- package/dist/public/assets/{use-timeline-entry-diff-BN4My22X.js → use-timeline-entry-diff-Be73Nm0G.js} +1 -1
- package/dist/public/assets/{use-workspace-DGXA9Dn3.js → use-workspace--dJVq1a4.js} +1 -1
- package/dist/public/index.html +59 -59
- package/dist/public/uninstall.html +4 -4
- package/dist/{repair-launch-json-KmYO_2FG.mjs → repair-launch-json-kJ-N16X6.mjs} +2 -2
- package/dist/{repair-mcp-configs-CsIGV5-7.mjs → repair-mcp-configs-cRf1KHN2.mjs} +2 -2
- package/dist/{repair-skills-Cie1nS2r.mjs → repair-skills-CAgJh50Q.mjs} +2 -2
- package/dist/repair-skills-CXwfQm8m.mjs +1 -0
- package/dist/schemas/v0/config.user.schema.json +108 -13
- package/dist/{server-lock-DW5T6J_m.mjs → server-lock-BcVRTi0F.mjs} +2 -2
- package/dist/server-lock-CCA69O0D.mjs +1 -0
- package/dist/{sleep-CJdjw5UD.mjs → sleep-C5OfWWWx.mjs} +5 -5
- package/dist/{src-D0P0SFti.mjs → src-6SIlUA0g.mjs} +1 -1
- package/dist/{src-0sJ50HI5.mjs → src-CA2-5ky_.mjs} +2 -2
- package/dist/{src-BKLIxQOr.mjs → src-DlAv53T2.mjs} +6 -6
- package/dist/{src-CpgLre_H.mjs → src-K60Nfy_1.mjs} +2 -2
- package/dist/start-ak4kOBNH.mjs +1 -0
- package/dist/{start-DhBxzdcm.mjs → start-fAsaQwEs.mjs} +3 -3
- package/dist/{write-project-skill-CKuq5itB.mjs → write-project-skill-Bn1Fo5lw.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-BtN4Fp1d.mjs +0 -2
- package/dist/fs-traced-DbSNN5G0.mjs +0 -1
- package/dist/git-handle-uBCwtyAf.mjs +0 -1
- package/dist/init-Cx94zXdb.mjs +0 -1
- package/dist/loader-CRQzxtMB.mjs +0 -1
- package/dist/md-manager-DZuZjzrd.mjs +0 -2
- package/dist/preview-CLNTLfvK.mjs +0 -1
- package/dist/public/assets/CodeMirrorPropInput-BFenJemA.js +0 -3
- package/dist/public/assets/DiffView-DBpBW2MH.js +0 -3
- package/dist/public/assets/DocumentContext-CKMhLy2N.js +0 -38
- package/dist/public/assets/EditorModeToggle-BYt93vnW.js +0 -1
- package/dist/public/assets/EnableSyncConfirmDialog-V141T2QR.js +0 -1
- package/dist/public/assets/FeedbackForm-BFPoJkdK.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-C4CnV_IS.js +0 -1
- package/dist/public/assets/MermaidDocEditor-CNK3K4lC.js +0 -1
- package/dist/public/assets/SettingsDialogBody-hWpwDgnT.js +0 -7
- package/dist/public/assets/SourceEditor-hADslP9Q.js +0 -1
- package/dist/public/assets/TextDocEditor-D07aFI4B.js +0 -1
- package/dist/public/assets/client-version-BBVOjYrp.js +0 -1
- package/dist/public/assets/config-provider-D2FBTvIx.js +0 -4
- package/dist/public/assets/dist-ZmxLttHl.js +0 -1
- package/dist/public/assets/dist-zNz6UTbN.js +0 -1
- package/dist/public/assets/globals-Cd1sgqvz.css +0 -1
- package/dist/public/assets/navigation-targets-CnIm35UZ.js +0 -1
- package/dist/public/assets/use-apply-config-color-theme-C7h1V38B.js +0 -2
- package/dist/public/assets/use-live-xterm-theme-CbDRpOKw.js +0 -1
- package/dist/public/assets/use-terminal-enabled-87atXgw4.js +0 -1
- package/dist/repair-skills-C0rCwW3E.mjs +0 -1
- package/dist/server-lock-GGE1_Y5o.mjs +0 -1
- package/dist/start-DdGn_P_U.mjs +0 -1
- /package/dist/public/assets/{dist-pl6OT5yc.js → dist-CJ0cwmiC.js} +0 -0
- /package/dist/public/assets/{stex-WCjgSIWy.js → stex-7gT25hE_.js} +0 -0
package/dist/public/index.html
CHANGED
|
@@ -58,22 +58,22 @@
|
|
|
58
58
|
-->
|
|
59
59
|
<script>(() => { let t = 'system'; try { const r = localStorage.getItem('ok-theme-v1'); if (r === 'light' || r === 'dark' || r === 'system') t = r; } catch {} let ct = null; try { const c = localStorage.getItem('ok-color-theme-v1'); if (c && ['dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized', 'custom'].includes(c)) ct = c; } catch {} let dark = t === 'dark'; if (t === 'system') { try { dark = window.matchMedia('(prefers-color-scheme: dark)').matches; } catch {} } let customCss = null; if (ct === 'custom') { try { const raw = localStorage.getItem('ok-custom-theme-v1'); if (raw) { const o = JSON.parse(raw); if (o?.css) { customCss = o.css; dark = !!o.dark; } } } catch {} if (!customCss) ct = null; } else if (ct) { dark = !['catppuccin-latte'].includes(ct); } if (dark) document.documentElement.classList.add('dark'); if (ct) document.documentElement.setAttribute('data-color-theme', ct); if (customCss) { const s = document.createElement('style'); s.id = 'ok-custom-theme'; s.textContent = customCss; document.head.appendChild(s); } if (window.okDesktop) { document.documentElement.classList.add('electron-mode'); document.documentElement.classList.add(`electron-platform-${window.okDesktop.platform}`); } })();</script>
|
|
60
60
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
61
|
-
<script type="module" crossorigin src="./assets/index-
|
|
61
|
+
<script type="module" crossorigin src="./assets/index-DEksXdTO.js"></script>
|
|
62
62
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
63
63
|
<link rel="modulepreload" crossorigin href="./assets/dist-D6euTqbb.js">
|
|
64
64
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
65
65
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
66
|
-
<link rel="modulepreload" crossorigin href="./assets/globals-
|
|
66
|
+
<link rel="modulepreload" crossorigin href="./assets/globals-BGbHjQJ2.js">
|
|
67
67
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-Chd9yIcd.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="./assets/w3c-keyname-DKgbz_c6.js">
|
|
69
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
70
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
71
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
72
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
73
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
74
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
75
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
76
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
69
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-CJ0cwmiC.js">
|
|
70
|
+
<link rel="modulepreload" crossorigin href="./assets/cm-theme-BIKMj2KE.js">
|
|
71
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-DsE9X3Yz.js">
|
|
72
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-B42mX0YC.js">
|
|
73
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-B4xkxNpz.js">
|
|
74
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-ChpE673Q.js">
|
|
75
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-Dp7TiZ5u2.js">
|
|
76
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-gVPIADKn2.js">
|
|
77
77
|
<link rel="modulepreload" crossorigin href="./assets/jsx-runtime-BUgB2tll.js">
|
|
78
78
|
<link rel="modulepreload" crossorigin href="./assets/dist-Nvb76hAm.js">
|
|
79
79
|
<link rel="modulepreload" crossorigin href="./assets/dist-1J1E9P12.js">
|
|
@@ -81,19 +81,19 @@
|
|
|
81
81
|
<link rel="modulepreload" crossorigin href="./assets/compiler-runtime-BfE3aGVn.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="./assets/utils-CPqDy6Hr.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="./assets/button-D3xSRfT4.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
85
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
84
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-Cka1ipRf.js">
|
|
85
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-BOFmnwXG.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="./assets/dist-PQ5KMVDh.js">
|
|
87
|
-
<link rel="modulepreload" crossorigin href="./assets/DiffView-
|
|
87
|
+
<link rel="modulepreload" crossorigin href="./assets/DiffView-DuPfWTAC.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="./assets/sortable.esm-BuA5-2It.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="./assets/floating-ui.dom-DQ0F0qgY.js">
|
|
90
90
|
<link rel="modulepreload" crossorigin href="./assets/trace-api-C3cW9MnH.js">
|
|
91
91
|
<link rel="modulepreload" crossorigin href="./assets/lib-RJCjKODX.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="./assets/markdownit-BIJhOARi.js">
|
|
93
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
94
|
-
<link rel="modulepreload" crossorigin href="./assets/client-version-
|
|
95
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
96
|
-
<link rel="modulepreload" crossorigin href="./assets/config-provider-
|
|
93
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-lf4nG52q2.js">
|
|
94
|
+
<link rel="modulepreload" crossorigin href="./assets/client-version-DL1elh-R.js">
|
|
95
|
+
<link rel="modulepreload" crossorigin href="./assets/config-context-CVWonKyE.js">
|
|
96
|
+
<link rel="modulepreload" crossorigin href="./assets/config-provider-COjQaZZa.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="./assets/dist-BCIZY0Wq.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="./assets/dist-BM4ov2mK.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="./assets/dist-Dyi4atb6.js">
|
|
@@ -122,28 +122,28 @@
|
|
|
122
122
|
<link rel="modulepreload" crossorigin href="./assets/separator-BhGCtoZc.js">
|
|
123
123
|
<link rel="modulepreload" crossorigin href="./assets/toggle-group-DpvWeoN9.js">
|
|
124
124
|
<link rel="modulepreload" crossorigin href="./assets/useQuery-ZeEDLtxh.js">
|
|
125
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
126
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
127
|
-
<link rel="modulepreload" crossorigin href="./assets/stex-
|
|
125
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-DZQQflzj.js">
|
|
126
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-D14X-mK2.js">
|
|
127
|
+
<link rel="modulepreload" crossorigin href="./assets/stex-7gT25hE_.js">
|
|
128
128
|
<link rel="modulepreload" crossorigin href="./assets/propagation-api-DCmicIMI.js">
|
|
129
129
|
<link rel="modulepreload" crossorigin href="./assets/switch-BQ3qkbBx.js">
|
|
130
130
|
<link rel="modulepreload" crossorigin href="./assets/folder-open-DxWbBr3T.js">
|
|
131
131
|
<link rel="modulepreload" crossorigin href="./assets/trash-2-YBQNhePb.js">
|
|
132
|
-
<link rel="modulepreload" crossorigin href="./assets/file-tree-utils-
|
|
133
|
-
<link rel="modulepreload" crossorigin href="./assets/doc-paths-
|
|
134
|
-
<link rel="modulepreload" crossorigin href="./assets/skill-scope-
|
|
135
|
-
<link rel="modulepreload" crossorigin href="./assets/navigation-targets-
|
|
132
|
+
<link rel="modulepreload" crossorigin href="./assets/file-tree-utils-BG34yBvw.js">
|
|
133
|
+
<link rel="modulepreload" crossorigin href="./assets/doc-paths-CQTfUOZw.js">
|
|
134
|
+
<link rel="modulepreload" crossorigin href="./assets/skill-scope-DNo7_4lO.js">
|
|
135
|
+
<link rel="modulepreload" crossorigin href="./assets/navigation-targets-0wZAeKrc.js">
|
|
136
136
|
<link rel="modulepreload" crossorigin href="./assets/external-link-CKZFgCFq.js">
|
|
137
137
|
<link rel="modulepreload" crossorigin href="./assets/documents-fetch-D4kwvrzo.js">
|
|
138
|
-
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-
|
|
138
|
+
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-C21yk3-k.js">
|
|
139
139
|
<link rel="modulepreload" crossorigin href="./assets/git-branch-v159JGOd.js">
|
|
140
140
|
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-Dk8dL1G6.js">
|
|
141
141
|
<link rel="modulepreload" crossorigin href="./assets/Mermaid-Ba_Bj7D1.js">
|
|
142
142
|
<link rel="modulepreload" crossorigin href="./assets/CopyButton-Dk8yDsPs.js">
|
|
143
|
-
<link rel="modulepreload" crossorigin href="./assets/documents-events-
|
|
143
|
+
<link rel="modulepreload" crossorigin href="./assets/documents-events-BwmrmAGX.js">
|
|
144
144
|
<link rel="modulepreload" crossorigin href="./assets/parse-api-error-CGRziNbI.js">
|
|
145
145
|
<link rel="modulepreload" crossorigin href="./assets/startup-marks-Bl-kvAXX.js">
|
|
146
|
-
<link rel="modulepreload" crossorigin href="./assets/prop-types-
|
|
146
|
+
<link rel="modulepreload" crossorigin href="./assets/prop-types-CHOFqrri.js">
|
|
147
147
|
<link rel="modulepreload" crossorigin href="./assets/eye-DGKT_dXT.js">
|
|
148
148
|
<link rel="modulepreload" crossorigin href="./assets/hash-C-OUp5vU.js">
|
|
149
149
|
<link rel="modulepreload" crossorigin href="./assets/info-DybUB5k_.js">
|
|
@@ -153,72 +153,72 @@
|
|
|
153
153
|
<link rel="modulepreload" crossorigin href="./assets/file-tree-rename-validation-BH8L3cc3.js">
|
|
154
154
|
<link rel="modulepreload" crossorigin href="./assets/badge-DwfQ2IQa.js">
|
|
155
155
|
<link rel="modulepreload" crossorigin href="./assets/input-DcoGZoTQ.js">
|
|
156
|
-
<link rel="modulepreload" crossorigin href="./assets/use-collab-url-
|
|
157
|
-
<link rel="modulepreload" crossorigin href="./assets/skills-api-
|
|
158
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
156
|
+
<link rel="modulepreload" crossorigin href="./assets/use-collab-url-D8N5M2pl.js">
|
|
157
|
+
<link rel="modulepreload" crossorigin href="./assets/skills-api-YMCgcUab.js">
|
|
158
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-Bhb-Rllg.js">
|
|
159
159
|
<link rel="modulepreload" crossorigin href="./assets/format-DAPkd5Gj.js">
|
|
160
160
|
<link rel="modulepreload" crossorigin href="./assets/braces-CsvuNjsR.js">
|
|
161
|
-
<link rel="modulepreload" crossorigin href="./assets/folder-config-api-
|
|
162
|
-
<link rel="modulepreload" crossorigin href="./assets/comment-chips-
|
|
161
|
+
<link rel="modulepreload" crossorigin href="./assets/folder-config-api-DNrN753j.js">
|
|
162
|
+
<link rel="modulepreload" crossorigin href="./assets/comment-chips-tOHcZ7p1.js">
|
|
163
163
|
<link rel="modulepreload" crossorigin href="./assets/textarea-Cl4IJ1LU.js">
|
|
164
|
-
<link rel="modulepreload" crossorigin href="./assets/lint-config-client-
|
|
165
|
-
<link rel="modulepreload" crossorigin href="./assets/selection-context-
|
|
166
|
-
<link rel="modulepreload" crossorigin href="./assets/use-skills-
|
|
167
|
-
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-
|
|
168
|
-
<link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-
|
|
164
|
+
<link rel="modulepreload" crossorigin href="./assets/lint-config-client-Bg_dSPOM.js">
|
|
165
|
+
<link rel="modulepreload" crossorigin href="./assets/selection-context-CtO8dzXv.js">
|
|
166
|
+
<link rel="modulepreload" crossorigin href="./assets/use-skills-DdHlTORK.js">
|
|
167
|
+
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-CTw29aB4.js">
|
|
168
|
+
<link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-D7Jzb7yA.js">
|
|
169
169
|
<link rel="modulepreload" crossorigin href="./assets/cursor-D_UKSHL6.js">
|
|
170
170
|
<link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon-UInuA1Ei.js">
|
|
171
171
|
<link rel="modulepreload" crossorigin href="./assets/folder-CyL8AyXY.js">
|
|
172
172
|
<link rel="modulepreload" crossorigin href="./assets/copilot-_tsUyzgD.js">
|
|
173
|
-
<link rel="modulepreload" crossorigin href="./assets/agent-visibility-
|
|
174
|
-
<link rel="modulepreload" crossorigin href="./assets/ChangedOutsideBadge-
|
|
175
|
-
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-
|
|
176
|
-
<link rel="modulepreload" crossorigin href="./assets/use-settings-route-
|
|
173
|
+
<link rel="modulepreload" crossorigin href="./assets/agent-visibility-XcypjuYX.js">
|
|
174
|
+
<link rel="modulepreload" crossorigin href="./assets/ChangedOutsideBadge-bIQSwxNT.js">
|
|
175
|
+
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-CI0ilwyX.js">
|
|
176
|
+
<link rel="modulepreload" crossorigin href="./assets/use-settings-route-BiaOx7d8.js">
|
|
177
177
|
<link rel="modulepreload" crossorigin href="./assets/clipboard-adapter-Brbch5VX.js">
|
|
178
|
-
<link rel="modulepreload" crossorigin href="./assets/use-workspace
|
|
179
|
-
<link rel="modulepreload" crossorigin href="./assets/skill-actions-
|
|
178
|
+
<link rel="modulepreload" crossorigin href="./assets/use-workspace--dJVq1a4.js">
|
|
179
|
+
<link rel="modulepreload" crossorigin href="./assets/skill-actions-CKsFVZ7s.js">
|
|
180
180
|
<link rel="modulepreload" crossorigin href="./assets/arrow-up-right-CinCNAo3.js">
|
|
181
181
|
<link rel="modulepreload" crossorigin href="./assets/case-sensitive-OXVu8f1h.js">
|
|
182
182
|
<link rel="modulepreload" crossorigin href="./assets/chevron-left-CbL-Ysx_.js">
|
|
183
183
|
<link rel="modulepreload" crossorigin href="./assets/download-C_7Cu8X8.js">
|
|
184
184
|
<link rel="modulepreload" crossorigin href="./assets/refresh-cw-DaKSQ-xL.js">
|
|
185
185
|
<link rel="modulepreload" crossorigin href="./assets/field-mSLytCEk.js">
|
|
186
|
-
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-
|
|
186
|
+
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-DZEPs4Pt.js">
|
|
187
187
|
<link rel="modulepreload" crossorigin href="./assets/miss-dialog-store-DRsTysxn.js">
|
|
188
|
-
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-
|
|
189
|
-
<link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-
|
|
190
|
-
<link rel="modulepreload" crossorigin href="./assets/open-managed-artifact-tab-
|
|
191
|
-
<link rel="modulepreload" crossorigin href="./assets/use-skill-directory-
|
|
188
|
+
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-iHnQtDVG.js">
|
|
189
|
+
<link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-D7klM-xS.js">
|
|
190
|
+
<link rel="modulepreload" crossorigin href="./assets/open-managed-artifact-tab-BVeI_6BU.js">
|
|
191
|
+
<link rel="modulepreload" crossorigin href="./assets/use-skill-directory-BVbrNJTi.js">
|
|
192
192
|
<link rel="modulepreload" crossorigin href="./assets/panel-right-open-EPKoGQBE.js">
|
|
193
193
|
<link rel="modulepreload" crossorigin href="./assets/square-pen-BETfUJNH.js">
|
|
194
194
|
<link rel="modulepreload" crossorigin href="./assets/undo-2-1g5Fg6rD.js">
|
|
195
195
|
<link rel="modulepreload" crossorigin href="./assets/form-CDklsKOD.js">
|
|
196
|
-
<link rel="modulepreload" crossorigin href="./assets/text-viewer-languages-
|
|
197
|
-
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-
|
|
196
|
+
<link rel="modulepreload" crossorigin href="./assets/text-viewer-languages-BLSME92j.js">
|
|
197
|
+
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-DYt4xV0B.js">
|
|
198
198
|
<link rel="modulepreload" crossorigin href="./assets/wrench-86_Xzzag.js">
|
|
199
199
|
<link rel="modulepreload" crossorigin href="./assets/lint-plugin-meta-BxfSlkph.js">
|
|
200
200
|
<link rel="modulepreload" crossorigin href="./assets/panel-Bjv8raTx.js">
|
|
201
201
|
<link rel="modulepreload" crossorigin href="./assets/skeleton-Zj40UZU5.js">
|
|
202
|
-
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-
|
|
202
|
+
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-X0S33jis.js">
|
|
203
203
|
<link rel="modulepreload" crossorigin href="./assets/ConfigSharingInfoTooltip-OJruUI3H.js">
|
|
204
204
|
<link rel="modulepreload" crossorigin href="./assets/project-paths-DZoifJi3.js">
|
|
205
205
|
<link rel="modulepreload" crossorigin href="./assets/SkillModeBanner-BPmqGiVe.js">
|
|
206
206
|
<link rel="modulepreload" crossorigin href="./assets/follow-file-B9VBGXDD.js">
|
|
207
|
-
<link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-
|
|
208
|
-
<link rel="modulepreload" crossorigin href="./assets/agent-diff-store-
|
|
209
|
-
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-
|
|
210
|
-
<link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-
|
|
207
|
+
<link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-DESJhWoq.js">
|
|
208
|
+
<link rel="modulepreload" crossorigin href="./assets/agent-diff-store-CC8aPVHS.js">
|
|
209
|
+
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-CTSKR5SK.js">
|
|
210
|
+
<link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-on3ebtaK.js">
|
|
211
211
|
<link rel="modulepreload" crossorigin href="./assets/input-group-Dw-FNINK.js">
|
|
212
212
|
<link rel="modulepreload" crossorigin href="./assets/use-installed-clis-BpdGnrVu.js">
|
|
213
|
-
<link rel="modulepreload" crossorigin href="./assets/use-skill-origin-
|
|
214
|
-
<link rel="modulepreload" crossorigin href="./assets/terminal-telemetry-
|
|
213
|
+
<link rel="modulepreload" crossorigin href="./assets/use-skill-origin-CEQwPxVb.js">
|
|
214
|
+
<link rel="modulepreload" crossorigin href="./assets/terminal-telemetry-JwJxpal6.js">
|
|
215
215
|
<link rel="modulepreload" crossorigin href="./assets/agent-presence-Dn2bQ2Pn.js">
|
|
216
216
|
<link rel="modulepreload" crossorigin href="./assets/auth-prompt-store-2KB0Hew5.js">
|
|
217
217
|
<link rel="modulepreload" crossorigin href="./assets/mcp-consent-store-BcrhbRwc.js">
|
|
218
218
|
<link rel="modulepreload" crossorigin href="./assets/overlay-layers-DGwgwjHg.js">
|
|
219
|
-
<link rel="modulepreload" crossorigin href="./assets/receive-store-
|
|
219
|
+
<link rel="modulepreload" crossorigin href="./assets/receive-store-YZh_VQ02.js">
|
|
220
220
|
<link rel="modulepreload" crossorigin href="./assets/timeline-diff-store-B-Ea84Rl.js">
|
|
221
|
-
<link rel="stylesheet" crossorigin href="./assets/globals-
|
|
221
|
+
<link rel="stylesheet" crossorigin href="./assets/globals-BmAazS49.css">
|
|
222
222
|
<link rel="stylesheet" crossorigin href="./assets/DocumentContext-B0sQn39F.css">
|
|
223
223
|
<link rel="stylesheet" crossorigin href="./assets/index-CDpJ2gXn.css">
|
|
224
224
|
</head>
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
script above.
|
|
33
33
|
-->
|
|
34
34
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
35
|
-
<script type="module" crossorigin src="./assets/uninstall-
|
|
35
|
+
<script type="module" crossorigin src="./assets/uninstall-CgrheMqc.js"></script>
|
|
36
36
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="./assets/dist-D6euTqbb.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
39
39
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
40
|
-
<link rel="modulepreload" crossorigin href="./assets/globals-
|
|
40
|
+
<link rel="modulepreload" crossorigin href="./assets/globals-BGbHjQJ2.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-Chd9yIcd.js">
|
|
42
42
|
<link rel="modulepreload" crossorigin href="./assets/trace-api-C3cW9MnH.js">
|
|
43
43
|
<link rel="modulepreload" crossorigin href="./assets/lib-RJCjKODX.js">
|
|
44
44
|
<link rel="modulepreload" crossorigin href="./assets/markdownit-BIJhOARi.js">
|
|
45
45
|
<link rel="modulepreload" crossorigin href="./assets/w3c-keyname-DKgbz_c6.js">
|
|
46
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
46
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-lf4nG52q2.js">
|
|
47
47
|
<link rel="modulepreload" crossorigin href="./assets/jsx-runtime-BUgB2tll.js">
|
|
48
48
|
<link rel="modulepreload" crossorigin href="./assets/dist-Nvb76hAm.js">
|
|
49
49
|
<link rel="modulepreload" crossorigin href="./assets/dist-1J1E9P12.js">
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
<link rel="modulepreload" crossorigin href="./assets/badge-DwfQ2IQa.js">
|
|
67
67
|
<link rel="modulepreload" crossorigin href="./assets/input-DcoGZoTQ.js">
|
|
68
68
|
<link rel="modulepreload" crossorigin href="./assets/textarea-Cl4IJ1LU.js">
|
|
69
|
-
<link rel="stylesheet" crossorigin href="./assets/globals-
|
|
69
|
+
<link rel="stylesheet" crossorigin href="./assets/globals-BmAazS49.css">
|
|
70
70
|
</head>
|
|
71
71
|
|
|
72
72
|
<body class="antialiased">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./launch-json-removal-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{t as e}from"./launch-json-removal-CJgXyPl3.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=e(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`||o.kind===`removed-file`;return s&&i({event:`launch-json-repair-removed`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
|
|
2
|
+
//# sourceMappingURL=repair-launch-json-kJ-N16X6.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e,d as t,l as n}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{b as e,d as t,l as n}from"./write-project-skill-Bn1Fo5lw.mjs";import{d as r,v as i}from"./init-BJIgDJa3.mjs";import{t as a}from"./mcp-migrate-event-CWx0WLdE.mjs";import{homedir as o}from"node:os";function s(e){let r=e.logger??u,i=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of n){let n=t[o],s=c(()=>n.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:n,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),n.projectConfigPath){let t=n.projectConfigPath,i=c(()=>t(e.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:n,home:void 0,cwd:e.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(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},o=r(t.target,t.cwd,t.home,t.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(e(o))return{...n,outcome:`canonical`};t.logger(a({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:o}));let s=i(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return t.logger({event:`mcp-config-repair-write-failed`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,error:e}),{...n,outcome:`write-failed`,error:e}}return s.action===`declined`?(t.logger({event:`mcp-config-repair-declined`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:s.declineReason}),{...n,outcome:`declined`}):{...n,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-cRf1KHN2.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e}from"./src-
|
|
1
|
+
import{R as e}from"./src-CA2-5ky_.mjs";import{Qn as t,Zn as n,ar as r,dr as i,fr as a,nr as o,rr as s,sr as c,tr as l}from"./src-DlAv53T2.mjs";import{T as u,a as d,d as f,f as p,o as m,s as h,t as g}from"./write-project-skill-Bn1Fo5lw.mjs";import{n as _,s as v,t as y}from"./colors-BsmVIwfM.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:()=>c(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>c(e,{checkDesktop:!1}),readBundledVersion:()=>t(),readRecordedVersion:e=>l(e,`cli-hosts`),writeRecordedVersion:(e,t)=>s(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>r(e),readBundleDecision:(e,t)=>n(e,t),writeBundleDecision:(e,t,n)=>o(e,t,n),removeBundleFromDisk:(e,t)=>h(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 p){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 p){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=f[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{g(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(t,n,r,o){let s=e=>{n.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await n.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),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 n.readRecordedVersion(t)}catch(e){o({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 a)try{d.push({id:e,sourceDir:n.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let a of d){let s=i[a.id],c=r.existsSync(x(t,`.agents`,`skills`,s)),l=await n.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{n.removeBundleFromDisk(t,a.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:a.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:a.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await n.writeBundleDecision(t,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:a.id,error:e instanceof Error?e.message:String(e)})}p.push(a)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>r.existsSync(x(t,`.agents`,`skills`,i[e.id])));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===a.length,_=[];for(let{id:e,sourceDir:n}of p){let a=R(t,i[e],n,r,o,l);h.push(...a.entries),_.push({id:e,centralWritten:a.centralWritten})}let v=h.some(e=>e.kind===`central`&&e.outcome===`failed`);if(g&&!v){let e=null;try{await n.writeRecordedVersion(t,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t,centralWritten:n}of _)s({ts:c(),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`);s({ts:c(),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=m(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=d(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 u(`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=[``,y(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),_(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${y(`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(``,`${y(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,_(`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(`${v("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${y(`Remove them?`)} ${_(`[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-CAgJh50Q.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-CAgJh50Q.mjs";export{e as repairSkills};
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"scope": "user",
|
|
38
38
|
"agentSettable": false,
|
|
39
39
|
"defaultScope": "user",
|
|
40
|
-
"description": "IDE color palette: 'default' (follows the light/dark theme), one of 'dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized'
|
|
40
|
+
"description": "IDE color palette: 'default' (follows the light/dark theme), 'custom' (your own colors from appearance.customTheme), or one of 'dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized'. A personal preference (user scope) — not shared with the project."
|
|
41
41
|
},
|
|
42
42
|
"colorThemeEnabled": {
|
|
43
43
|
"type": "boolean",
|
|
@@ -49,47 +49,142 @@
|
|
|
49
49
|
"customTheme": {
|
|
50
50
|
"type": "object",
|
|
51
51
|
"properties": {
|
|
52
|
-
"
|
|
52
|
+
"name": {
|
|
53
53
|
"type": "string",
|
|
54
54
|
"scope": "user",
|
|
55
55
|
"agentSettable": false,
|
|
56
56
|
"defaultScope": "user",
|
|
57
|
-
"description": "Custom theme:
|
|
57
|
+
"description": "Custom theme: the scheme's display name."
|
|
58
58
|
},
|
|
59
|
-
"
|
|
59
|
+
"author": {
|
|
60
60
|
"type": "string",
|
|
61
61
|
"scope": "user",
|
|
62
62
|
"agentSettable": false,
|
|
63
63
|
"defaultScope": "user",
|
|
64
|
-
"description": "Custom theme:
|
|
64
|
+
"description": "Custom theme: the scheme's author credit, carried through from an imported base16 scheme."
|
|
65
65
|
},
|
|
66
|
-
"
|
|
66
|
+
"variant": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"enum": [
|
|
69
|
+
"dark",
|
|
70
|
+
"light"
|
|
71
|
+
],
|
|
72
|
+
"scope": "user",
|
|
73
|
+
"agentSettable": false,
|
|
74
|
+
"defaultScope": "user",
|
|
75
|
+
"description": "Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted."
|
|
76
|
+
},
|
|
77
|
+
"base00": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"scope": "user",
|
|
80
|
+
"agentSettable": false,
|
|
81
|
+
"defaultScope": "user",
|
|
82
|
+
"description": "Custom theme: base16 base00 — default background, as a #rrggbb hex string."
|
|
83
|
+
},
|
|
84
|
+
"base01": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"scope": "user",
|
|
87
|
+
"agentSettable": false,
|
|
88
|
+
"defaultScope": "user",
|
|
89
|
+
"description": "Custom theme: base16 base01 — alt background — cards, popovers, sidebar, as a #rrggbb hex string."
|
|
90
|
+
},
|
|
91
|
+
"base02": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"scope": "user",
|
|
94
|
+
"agentSettable": false,
|
|
95
|
+
"defaultScope": "user",
|
|
96
|
+
"description": "Custom theme: base16 base02 — selection background, borders, as a #rrggbb hex string."
|
|
97
|
+
},
|
|
98
|
+
"base03": {
|
|
99
|
+
"type": "string",
|
|
100
|
+
"scope": "user",
|
|
101
|
+
"agentSettable": false,
|
|
102
|
+
"defaultScope": "user",
|
|
103
|
+
"description": "Custom theme: base16 base03 — comments, invisibles, as a #rrggbb hex string."
|
|
104
|
+
},
|
|
105
|
+
"base04": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"scope": "user",
|
|
108
|
+
"agentSettable": false,
|
|
109
|
+
"defaultScope": "user",
|
|
110
|
+
"description": "Custom theme: base16 base04 — secondary text, as a #rrggbb hex string."
|
|
111
|
+
},
|
|
112
|
+
"base05": {
|
|
113
|
+
"type": "string",
|
|
114
|
+
"scope": "user",
|
|
115
|
+
"agentSettable": false,
|
|
116
|
+
"defaultScope": "user",
|
|
117
|
+
"description": "Custom theme: base16 base05 — default foreground, as a #rrggbb hex string."
|
|
118
|
+
},
|
|
119
|
+
"base06": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"scope": "user",
|
|
122
|
+
"agentSettable": false,
|
|
123
|
+
"defaultScope": "user",
|
|
124
|
+
"description": "Custom theme: base16 base06 — light foreground, as a #rrggbb hex string."
|
|
125
|
+
},
|
|
126
|
+
"base07": {
|
|
127
|
+
"type": "string",
|
|
128
|
+
"scope": "user",
|
|
129
|
+
"agentSettable": false,
|
|
130
|
+
"defaultScope": "user",
|
|
131
|
+
"description": "Custom theme: base16 base07 — lightest foreground, as a #rrggbb hex string."
|
|
132
|
+
},
|
|
133
|
+
"base08": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"scope": "user",
|
|
136
|
+
"agentSettable": false,
|
|
137
|
+
"defaultScope": "user",
|
|
138
|
+
"description": "Custom theme: base16 base08 — red — variables, tags, diff deleted, as a #rrggbb hex string."
|
|
139
|
+
},
|
|
140
|
+
"base09": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"scope": "user",
|
|
143
|
+
"agentSettable": false,
|
|
144
|
+
"defaultScope": "user",
|
|
145
|
+
"description": "Custom theme: base16 base09 — orange — numbers, constants, as a #rrggbb hex string."
|
|
146
|
+
},
|
|
147
|
+
"base0A": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"scope": "user",
|
|
150
|
+
"agentSettable": false,
|
|
151
|
+
"defaultScope": "user",
|
|
152
|
+
"description": "Custom theme: base16 base0A — yellow — classes, search highlight, as a #rrggbb hex string."
|
|
153
|
+
},
|
|
154
|
+
"base0B": {
|
|
155
|
+
"type": "string",
|
|
156
|
+
"scope": "user",
|
|
157
|
+
"agentSettable": false,
|
|
158
|
+
"defaultScope": "user",
|
|
159
|
+
"description": "Custom theme: base16 base0B — green — strings, diff inserted, as a #rrggbb hex string."
|
|
160
|
+
},
|
|
161
|
+
"base0C": {
|
|
67
162
|
"type": "string",
|
|
68
163
|
"scope": "user",
|
|
69
164
|
"agentSettable": false,
|
|
70
165
|
"defaultScope": "user",
|
|
71
|
-
"description": "Custom theme:
|
|
166
|
+
"description": "Custom theme: base16 base0C — cyan — support, escapes, quotes, as a #rrggbb hex string."
|
|
72
167
|
},
|
|
73
|
-
"
|
|
168
|
+
"base0D": {
|
|
74
169
|
"type": "string",
|
|
75
170
|
"scope": "user",
|
|
76
171
|
"agentSettable": false,
|
|
77
172
|
"defaultScope": "user",
|
|
78
|
-
"description": "Custom theme:
|
|
173
|
+
"description": "Custom theme: base16 base0D — blue — functions, headings, accent, as a #rrggbb hex string."
|
|
79
174
|
},
|
|
80
|
-
"
|
|
175
|
+
"base0E": {
|
|
81
176
|
"type": "string",
|
|
82
177
|
"scope": "user",
|
|
83
178
|
"agentSettable": false,
|
|
84
179
|
"defaultScope": "user",
|
|
85
|
-
"description": "Custom theme:
|
|
180
|
+
"description": "Custom theme: base16 base0E — magenta — keywords, storage, as a #rrggbb hex string."
|
|
86
181
|
},
|
|
87
|
-
"
|
|
182
|
+
"base0F": {
|
|
88
183
|
"type": "string",
|
|
89
184
|
"scope": "user",
|
|
90
185
|
"agentSettable": false,
|
|
91
186
|
"defaultScope": "user",
|
|
92
|
-
"description": "Custom theme:
|
|
187
|
+
"description": "Custom theme: base16 base0F — deprecated markers, embedded tags, as a #rrggbb hex string."
|
|
93
188
|
}
|
|
94
189
|
},
|
|
95
190
|
"additionalProperties": {}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./src-
|
|
2
|
-
//# sourceMappingURL=server-lock-
|
|
1
|
+
import"./src-CA2-5ky_.mjs";import{r as e}from"./logger-5LePyO3n.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 on 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,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:()=>G({lockName:t,lockDir:n}),updatePort:e=>B({lockName:t,lockDir:n,port:e})}}function B(e){let{lockName:t,lockDir:n,port:r}=e,i=`[${t}-lock]`,a=k(n,t);if(!o(a)){D.warn({lockPath:a},`${i} Lock file missing at ${a} during port update — skipping`);return}let s;try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:a},`${i} Corrupt lock at ${a} during port update — skipping`);return}s=e}catch{D.warn({lockPath:a},`${i} Unreadable lock at ${a} during port update — skipping`);return}if(s.pid===process.pid&&N(s)){s.port=r;try{d(a,JSON.stringify(s,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to update port in ${a}: ${e instanceof Error?e.message:String(e)}`)}}}function V(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 H(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 U(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,startedAt:a.startedAt,worktreeRoot:a.worktreeRoot,machineId:typeof a.machineId==`string`?a.machineId:void 0,draining:a.draining===!0?!0: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 W(e){let{lockName:t,lockDir:n}=e,r=e.timeoutMs??1e4,i=e.pollIntervalMs??100,a=e.readLock??(()=>H({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 G(e){let{lockName:t,lockDir:n,deferUnlinkToExit:r=!1}=e,i=`[${t}-lock]`,a=k(n,t);if(M(a)){if(r){V({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 K=class extends O{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function q(e,t){try{return R({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof O&&e.lockName===`server`?new K(e.existing,e.lockPath):e}}function J(e,t){B({lockName:`server`,lockDir:e,port:t})}function Y(e){return H({lockName:`server`,lockDir:e})}function X(e,t){G({lockName:`server`,lockDir:e,...t})}function Z(e){V({lockName:`server`,lockDir:e})}function Q(e,t){return W({lockName:`server`,lockDir:e,...t})}export{_ as S,E as _,X as a,v as b,O as c,V as d,H as f,T as g,B as h,Y as i,R as l,G as m,q as n,J as o,U as p,Z as r,Q as s,K as t,k as u,C as v,g as x,y};
|
|
2
|
+
//# sourceMappingURL=server-lock-BcVRTi0F.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,o as t,r as n}from"./server-lock-BcVRTi0F.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
|