@inkeep/open-knowledge 0.72.0-beta.2 → 0.72.0-beta.4
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 +24 -4
- package/dist/cli.mjs +67 -67
- package/dist/constants-tN6BLxqK.mjs +1 -0
- package/dist/{dist-C7Oi9AkI.mjs → dist-B7NFh0MZ.mjs} +464 -464
- package/dist/dist-D7HUGErx.mjs +1 -0
- package/dist/index.d.mts +59 -1
- package/dist/index.mjs +2 -2
- package/dist/init-0RF5mT_e.mjs +1 -0
- package/dist/{init-CFhk-KKz.mjs → init-R__-FL-k.mjs} +26 -26
- package/dist/{launch-json-removal-7nhKMMtQ.mjs → launch-json-removal-7D0nQT56.mjs} +1 -1
- package/dist/{loader-KtGbC19j.mjs → loader-BRYG-jTN.mjs} +1 -1
- package/dist/loader-BicS4rg_.mjs +1 -0
- package/dist/{open-browser-B9QXUTKM.mjs → open-browser-4-j8NELI.mjs} +1 -1
- package/dist/{preview-CyJ8a7Fo.mjs → preview-DjhHIWGN.mjs} +1 -1
- package/dist/preview-DtEWXaoq.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-D6Br5xYs.js → ActivityModeContent-DLnzCgfz.js} +1 -1
- package/dist/public/assets/AddPropertiesButton-5U2Y3uKp.js +2 -0
- package/dist/public/assets/{AgentDiffPane-Bbm1t3vi.js → AgentDiffPane-B5amlfmP.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-RWclNpfz.js → AgentIconCluster-DiWkEX6O.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-zhmAd3N4.js → AgentThreadClientBinder-iSWzdyTG.js} +1 -1
- package/dist/public/assets/{AppMenubar-B76J1mnO.js → AppMenubar-CCjUhkgg.js} +1 -1
- package/dist/public/assets/{BugReportHistory-DdAlxeKa.js → BugReportHistory-CounGQhT.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-BWMg-utz.js → BugReportHistoryDialog-CgPrrnbM.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-Cmq0OheO.js +3 -0
- package/dist/public/assets/{ConfigSharingInfoTooltip-BT8NSNpC.js → ConfigSharingInfoTooltip-CK9XrP2K.js} +1 -1
- package/dist/public/assets/ConsentDialogBody-BD4DWbp5.js +2 -0
- package/dist/public/assets/{DiffViewBoundary-BrG_w2xt.js → DiffViewBoundary-BXdwk2Iq.js} +1 -1
- package/dist/public/assets/DocumentContext-TAFDDp6U.js +39 -0
- package/dist/public/assets/{EditorModeToggle-Bw00uYRx.js → EditorModeToggle-Dg7vVHl3.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-AIzGmViP.js → EnableSyncConfirmDialog-R-Z946N5.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-B3lMLUyK.js → ExcalidrawDocEditor-CY1lJS-2.js} +1 -1
- package/dist/public/assets/FeedbackForm-CUHxAufb.js +1 -0
- package/dist/public/assets/{GraphPanel-BslSE6Rs.js → GraphPanel-omwwsp_N.js} +1 -1
- package/dist/public/assets/{ImageAttachments-B3v4V_wq.js → ImageAttachments-BpYJnzlN.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-_-_27gp-.js → ImportSkillDialog-BTpla3g7.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-b5hf0c12.js → LintConfigEditor-CVkLVVX0.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-C4m9IvIx.js → ManagedArtifactProperties-C1nhYITR.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-D_9Orim7.js +1 -0
- package/dist/public/assets/McpConsentDialogBody-CXF6JRwT.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-Bw0spqld.js → MermaidDocEditor-Nc0VfQkz.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuItem-BDg1hjU8.js → OpenInAgentMenuItem-CzPwpHyZ.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-CqAThkeg.js → PropertyDisplayRow-BGe6-4L9.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-D2Kzp4_r.js → RegisteredAgentIcon-Dit7Zlh0.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-D5gnrY-R.js → ReportBugDialogBody-CiI1lRKj.js} +2 -2
- package/dist/public/assets/{ReportBugMenuTrigger-C3h3CSq-.js → ReportBugMenuTrigger-DoDCPu1X.js} +2 -2
- package/dist/public/assets/{RowDisclosure-7_AiotxM.js → RowDisclosure-D03pq8gd.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-D1R3Sh2v.js → SchemaConfigEditor-CSINzXTv.js} +1 -1
- package/dist/public/assets/{SessionsHost-BZSJ7b41.js → SessionsHost-Crwf7ff-.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-Bl3NZ37F.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-CSAWwldJ.js → ShareBranchSwitchDialog-DqSgSjyg.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-CuDoDPVy.js → ShareReceiveDialog-BZtxSZra.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BLGRUEIB.js → ShareReceiveMissDialog-dnAsxL19.js} +1 -1
- package/dist/public/assets/{SkillCostValue-n_G2nfYn.js → SkillCostValue-CHZQh8Rq.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-rv5kIgLF.js → SkillEditBanner-SYzSHptQ.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-B8iWPj-U.js → SkillForkDialog-Cz82rkwA.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-BuIpRm5q.js → SkillInstallMenu-CNY0p5vX.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DkPpXgsk.js → SkillOriginInline-DuKHAOBP.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-o69NuC2o.js → SkillToolbarControls-CjE7B4SI.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DRYjoVIj.js → SlidesToolbarControls-C5RytnIw.js} +1 -1
- package/dist/public/assets/SourceEditor-CAEGq_cL.js +1 -0
- package/dist/public/assets/{TerminalPanel-Dt20JtHr.js → TerminalPanel-Lr-gSBEo.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-BmX3dvBA.js → TerminalWindowApp-Cbqv2j6x.js} +1 -1
- package/dist/public/assets/{TextDocEditor-Dg49b5Fz.js → TextDocEditor-BbjLCMRm.js} +1 -1
- package/dist/public/assets/{ThreadView-DHQJWRJ8.js → ThreadView-BhfeLCUr.js} +3 -3
- package/dist/public/assets/{TimelineDiffPane-ihWm-KX_.js → TimelineDiffPane-DeUhHr6c.js} +1 -1
- package/dist/public/assets/agent-connection-status-XSdlZ0uj.js +1 -0
- package/dist/public/assets/auth-state-cache-lPOpwdxt.js +11 -0
- package/dist/public/assets/{bug-report-send-manager-CdO7h2kH.js → bug-report-send-manager-C8UOqZop.js} +1 -1
- package/dist/public/assets/client-version-DMKN1tA1.js +1 -0
- package/dist/public/assets/{comment-chips-MmWHfkrw.js → comment-chips-DG6TcreO.js} +1 -1
- package/dist/public/assets/config-provider-CL2LHJwy.js +4 -0
- package/dist/public/assets/css-color-to-hex-21hHTVNl.js +1 -0
- package/dist/public/assets/{dist-CyWcc58M.js → dist-75Tp0j2s.js} +1 -1
- package/dist/public/assets/{dist-BjJaywqn.js → dist-BX7qfUal.js} +1 -1
- package/dist/public/assets/{dist-DBMXz-r_.js → dist-CsrrNdnj.js} +1 -1
- package/dist/public/assets/dist-DYso7MCm.js +1 -0
- package/dist/public/assets/{dist-wcXwpuqG.js → dist-tLQ-ULW1.js} +1 -1
- package/dist/public/assets/{dist-GoOli512.js → dist-zcYT-cpc.js} +1 -1
- package/dist/public/assets/{doc-hash-BEmc5wpM.js → doc-hash-0sJsliMq.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-CNOE_leW.js → doc-undo-manager-CUMz1Lu7.js} +1 -1
- package/dist/public/assets/{documents-events-D_K3dHNa.js → documents-events-DvTemRtX.js} +1 -1
- package/dist/public/assets/{dropdown-menu--ZF4igWe.js → dropdown-menu-SORDKiaq.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-D5yCyoxr.js → file-tree-adapter-C-zUZxGY.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Css5oRd6.js → file-tree-utils-DQrKhuvs.js} +1 -1
- package/dist/public/assets/floating-ui.dom-CDtYEnEj.js +1 -0
- package/dist/public/assets/{folder-config-api-CYCg3Hjc.js → folder-config-api-O8wiP8u9.js} +1 -1
- package/dist/public/assets/globals-MNUe1ruv.css +1 -0
- package/dist/public/assets/index-YzLx3klx.js +2205 -0
- package/dist/public/assets/{lint-config-client-D2CVLI8s.js → lint-config-client-D_K_I33M.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-C70syIyl.js → markdownlint-rule-browser-D_33Iwwv.js} +1 -1
- package/dist/public/assets/messages-BYiJXmNN.js +1 -0
- package/dist/public/assets/messages-BwGMYA_G.js +1 -0
- package/dist/public/assets/messages-CFWXeDS9.js +1 -0
- package/dist/public/assets/messages-CbXu74T2.js +1 -0
- package/dist/public/assets/messages-Czy5uUdz.js +1 -0
- package/dist/public/assets/messages-DKoHMjaK.js +1 -0
- package/dist/public/assets/messages-DVDSsf5u.js +1 -0
- package/dist/public/assets/messages-Dnppvuua.js +1 -0
- package/dist/public/assets/messages-IHf96h9y.js +1 -0
- package/dist/public/assets/messages-ijpiuVRD.js +1 -0
- package/dist/public/assets/messages-lPluOXUP.js +1 -0
- package/dist/public/assets/messages-nbT9wGXG.js +1 -0
- package/dist/public/assets/navigation-targets-CLA-LGSO.js +1 -0
- package/dist/public/assets/{page-list-cache-B2Cbn6_1.js → page-list-cache-DmQP_SV8.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-JHjfq5my.js → pending-receive-nav-store-lpN2Xg2z.js} +1 -1
- package/dist/public/assets/{popover-BYD_0UMt.js → popover-CBJqdXoA.js} +1 -1
- package/dist/public/assets/{prod-CjhMsIt8.js → prod-DDPjOXpF.js} +1 -1
- package/dist/public/assets/{progress-DyuMaHpo.js → progress-CpKCXRqy.js} +3 -3
- package/dist/public/assets/{project-paths-CTKMJD3w.js → project-paths-gqDqqCq-.js} +1 -1
- package/dist/public/assets/{prop-types-BZCimyh-.js → prop-types-Cz_4UFXS.js} +1 -1
- package/dist/public/assets/{receive-store-DzTOlR0N.js → receive-store-CmP1Rnn7.js} +1 -1
- package/dist/public/assets/{select-BKzcW_PB.js → select-ByJwKu6h.js} +1 -1
- package/dist/public/assets/{selection-context-b6fqlX7H.js → selection-context-BYtzxyLE.js} +1 -1
- package/dist/public/assets/{skill-scope-N9lA7J2A.js → skill-scope-zjfKF_hV.js} +1 -1
- package/dist/public/assets/{skills-api-t8N6VdpP.js → skills-api-DefDq-V9.js} +1 -1
- package/dist/public/assets/{src-YPYliXpo.js → src-DyfxwlyE.js} +2 -2
- package/dist/public/assets/{startup-marks-w6Ilv1dh.js → startup-marks-DkofILWo.js} +1 -1
- package/dist/public/assets/{tag-pill-input-NZmlTNmF.js → tag-pill-input-fBTfmjgu.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-Bu5cNTBP.js → target-navigation-intent-JS6hYcot.js} +1 -1
- package/dist/public/assets/{telemetry-impl-CKvjKher.js → telemetry-impl-CFkmFcv6.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BfBWUHVq.js → telemetry-startup-Bac091X8.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-B4B1SuEp.js → terminal-cli-display-B8ySenln.js} +1 -1
- package/dist/public/assets/{terminal-command-events-BGXJdDho.js → terminal-command-events-DrvZC8Eu.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-DCbQD5pb.js → terminal-launch-events-qWlFGuUx.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-C3BIM0C7.js → terminal-telemetry-CpRQ96Ji.js} +1 -1
- package/dist/public/assets/{tooltip-DttaCTqz.js → tooltip-BnyyQDRs.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-B8XZFG6h.js → typing-burst-detector-BBbOZnKo.js} +4 -4
- package/dist/public/assets/uninstall-v61_ZoXT.js +1 -0
- package/dist/public/assets/{use-activity-panel-BTpRB5o1.js → use-activity-panel-DCGFCgW4.js} +1 -1
- package/dist/public/assets/use-apply-config-language-BS-vov2w.js +2 -0
- package/dist/public/assets/{use-collab-url-B_rNmVb_.js → use-collab-url-mFOjr2IA.js} +1 -1
- package/dist/public/assets/{use-conflicts-DwqMCspl.js → use-conflicts-C8dN_iXo.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-WB5uWQWt.js → use-live-xterm-theme-B9dAAZD3.js} +1 -1
- package/dist/public/assets/{use-open-skill-BRRyog-h.js → use-open-skill-BAPaR7kA.js} +1 -1
- package/dist/public/assets/{use-settings-route-D7psIUas.js → use-settings-route-BxaIY7g8.js} +1 -1
- package/dist/public/assets/{use-skill-origin-D-hrfwwb.js → use-skill-origin-CZlBPaka.js} +1 -1
- package/dist/public/assets/{use-skills-Drb1FGEU.js → use-skills-C6QmTsGG.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-D53OcVAl.js → use-terminal-enabled-D0rb9s4e.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-6pBvX9Gh.js +5 -0
- package/dist/public/assets/{use-workspace-BY7Os3yY.js → use-workspace-CPN4D3G_.js} +1 -1
- package/dist/public/index.html +70 -70
- package/dist/public/uninstall.html +7 -6
- package/dist/{registry-probes-RTMO-HFE.mjs → registry-probes-Cthf_D-E.mjs} +10 -10
- package/dist/{removal-file-path-Crs4OKht.mjs → removal-file-path-B3Ia2LYa.mjs} +1 -1
- package/dist/{repair-launch-json-Tte7sWD6.mjs → repair-launch-json-LAfXDQlt.mjs} +1 -1
- package/dist/{repair-mcp-configs-yyQ7PZIM.mjs → repair-mcp-configs-Dz9benJ2.mjs} +1 -1
- package/dist/src-BCVXAb8B.mjs +1 -0
- package/dist/src-CQqhz0Kv.mjs +11 -0
- package/dist/start-C5D7Sm06.mjs +1 -0
- package/dist/{start-B4ByX6yB.mjs → start-C9LxTCYi.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-D-T_nFfi.mjs +0 -1
- package/dist/dist-s4KdL8xn.mjs +0 -1
- package/dist/init-BU3jv3FQ.mjs +0 -1
- package/dist/loader-DHDkFl6q.mjs +0 -1
- package/dist/preview-CoUWhiJn.mjs +0 -1
- package/dist/public/assets/AddPropertiesButton-D2QC5a0y.js +0 -2
- package/dist/public/assets/CodeMirrorPropInput-CaBn84Ep.js +0 -3
- package/dist/public/assets/ConsentDialogBody-CdTmAsAj.js +0 -2
- package/dist/public/assets/DocumentContext-avYx9HfE.js +0 -39
- package/dist/public/assets/FeedbackForm-CQP7-Thy.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BTZ9pf__.js +0 -1
- package/dist/public/assets/McpConsentDialogBody-B0cKqNAZ.js +0 -1
- package/dist/public/assets/SettingsDialogBody-DJlVd3Lf.js +0 -12
- package/dist/public/assets/SourceEditor-j0Oy5-Ub.js +0 -1
- package/dist/public/assets/agent-connection-status-DNcSO8Of.js +0 -1
- package/dist/public/assets/auth-state-cache-BFwDxz1x.js +0 -11
- package/dist/public/assets/client-version-B-nUcRRZ.js +0 -1
- package/dist/public/assets/config-provider-DDlH5XLd.js +0 -5
- package/dist/public/assets/css-color-to-hex-D4ROZoal.js +0 -1
- package/dist/public/assets/dist-CMrReMig.js +0 -1
- package/dist/public/assets/floating-ui.dom-BcZPrP06.js +0 -1
- package/dist/public/assets/globals-Ch23_3FO.css +0 -1
- package/dist/public/assets/i18n-C4053E1c.js +0 -1
- package/dist/public/assets/index-CMIN3mxx.js +0 -2205
- package/dist/public/assets/messages-3gjCM9Hp.js +0 -1
- package/dist/public/assets/messages-4g9WFtqZ.js +0 -1
- package/dist/public/assets/messages-82g1isaV.js +0 -1
- package/dist/public/assets/messages-A3t6jG7o.js +0 -1
- package/dist/public/assets/messages-BYVte33c.js +0 -1
- package/dist/public/assets/messages-CFy1VdRh.js +0 -1
- package/dist/public/assets/messages-CHMCyj_H.js +0 -1
- package/dist/public/assets/messages-CvZuXVc5.js +0 -1
- package/dist/public/assets/messages-DCzNz6_z.js +0 -1
- package/dist/public/assets/messages-DN76EHsp.js +0 -1
- package/dist/public/assets/messages-QY_0Lilx.js +0 -1
- package/dist/public/assets/messages-tLVODCA0.js +0 -1
- package/dist/public/assets/navigation-targets-Fxss68va.js +0 -1
- package/dist/public/assets/uninstall-BxVvvQ3I.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-BCOSn9yc.js +0 -5
- package/dist/src-BM5JsMhJ.mjs +0 -11
- package/dist/src-XLbP6EmC.mjs +0 -1
- package/dist/start-DhToq7IR.mjs +0 -1
- /package/dist/public/assets/{globals-CQVYUd1p.js → globals-iI2jjGV8.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Al as e,Cs as t,Da as n,Io as r,To as i,_u as a,gn as o,hl as s,qn as c,xn as l,zt as u}from"./md-manager-BGnqyqi1-hmuoZRep.mjs";import{$ as d,$a as f,$i as p,$n as m,$r as h,$t as g,A as _,Aa as v,Ai as y,An as b,Ao as x,Ar as S,At as C,B as w,Ba as T,Bi as E,Bn as D,Bo as O,Br as k,Bt as A,C as j,Ca as M,Ci as N,Cn as P,Cr as F,Ct as I,D as L,Da as R,Di as z,Dn as B,Dr as V,Dt as H,E as U,Ea as W,Ei as G,En as K,Er as q,Et as J,F as Y,Fa as X,Fi as Z,Fn as Q,Fo as $,Fr as ee,Ft as te,G as ne,Ga as re,Gi as ie,Gn as ae,Gr as oe,Gt as se,H as ce,Ha as le,Hi as ue,Hn as de,Ho as fe,Hr as pe,Ht as me,I as he,Ia as ge,Ii as _e,In as ve,Io as ye,Ir as be,It as xe,J as Se,Ja as Ce,Ji as we,Jn as Te,Jr as Ee,Jt as De,K as Oe,Ka as ke,Ki as Ae,Kn as je,Kr as Me,Kt as Ne,L as Pe,La as Fe,Li as Ie,Ln as Le,Lo as Re,Lr as ze,Lt as Be,M as Ve,Ma as He,Mi as Ue,Mn as We,Mr as Ge,Mt as Ke,N as qe,Na as Je,Ni as Ye,Nn as Xe,Nr as Ze,Nt as Qe,O as $e,Oa as et,Oi as tt,On as nt,Or as rt,Ot as it,P as at,Pa as ot,Pi as st,Pn as ct,Pr as lt,Pt as ut,Q as dt,Qa as ft,Qi as pt,Qn as mt,Qr as ht,Qt as gt,R as _t,Ra as vt,Ri as yt,Rn as bt,Ro as xt,Rr as St,Rt as Ct,S as wt,Sa as Tt,Si as Et,Sn as Dt,Sr as Ot,St as kt,T as At,Ta as jt,Ti as Mt,Tn as Nt,Tr as Pt,Tt as Ft,U as It,Ua as Lt,Ui as Rt,Un as zt,Uo as Bt,Ur as Vt,Ut as Ht,V as Ut,Va as Wt,Vi as Gt,Vn as Kt,Vo as qt,Vr as Jt,Vt as Yt,W as Xt,Wa as Zt,Wi as Qt,Wn as $t,Wr as en,Wt as tn,X as nn,Xa as rn,Xi as an,Xn as on,Xr as sn,Xt as cn,Y as ln,Ya as un,Yi as dn,Yn as fn,Yr as pn,Yt as mn,Z as hn,Za as gn,Zi as _n,Zn as vn,Zr as yn,Zt as bn,_ as xn,_a as Sn,_i as Cn,_n as wn,_r as Tn,_t as En,a as Dn,aa as On,ai as kn,an as An,ao as jn,ar as Mn,at as Nn,b as Pn,ba as Fn,bi as In,bn as Ln,br as Rn,bt as zn,c as Bn,ca as Vn,ci as Hn,cn as Un,cr as Wn,ct as Gn,d as Kn,da as qn,di as Jn,dn as Yn,dr as Xn,dt as Zn,ea as Qn,ei as $n,en as er,eo as tr,er as nr,et as rr,f as ir,fa as ar,fi as or,fn as sr,fr as cr,ft as lr,g as ur,ga as dr,gi as fr,gn as pr,gr as mr,gt as hr,h as gr,ha as _r,hi as vr,hn as yr,hr as br,ht as xr,i as Sr,ia as Cr,ii as wr,in as Tr,io as Er,ir as Dr,it as Or,j as kr,ja as Ar,ji as jr,jn as Mr,jo as Nr,jr as Pr,jt as Fr,k as Ir,ka as Lr,ki as Rr,kn as zr,kr as Br,kt as Vr,l as Hr,la as Ur,li as Wr,ln as Gr,lr as Kr,lt as qr,m as Jr,ma as Yr,mi as Xr,mn as Zr,mr as Qr,mt as $r,n as ei,na as ti,ni,nn as ri,no as ii,nr as ai,nt as oi,o as si,oa as ci,oi as li,on as ui,oo as di,or as fi,ot as pi,p as mi,pa as hi,pi as gi,pn as _i,pr as vi,pt as yi,q as bi,qa as xi,qi as Si,qn as Ci,qr as wi,qt as Ti,r as Ei,ra as Di,ri as Oi,rn as ki,ro as Ai,rr as ji,rt as Mi,s as Ni,sa as Pi,si as Fi,sn as Ii,so as Li,sr as Ri,st as zi,t as Bi,ta as Vi,ti as Hi,tn as Ui,to as Wi,tr as Gi,tt as Ki,u as qi,ua as Ji,ui as Yi,un as Xi,ur as Zi,ut as Qi,v as $i,va as ea,vi as ta,vn as na,vr as ra,vt as ia,w as aa,wa as oa,wi as sa,wn as ca,wr as la,wt as ua,x as da,xa as fa,xi as pa,xn as ma,xr as ha,xt as ga,y as _a,ya as va,yi as ya,yn as ba,yr as xa,yt as Sa,z as Ca,za as wa,zi as Ta,zn as Ea,zo as Da,zr as Oa,zt as ka}from"./dist-B7NFh0MZ.mjs";export{Bi as AGENT_ID_MAX_LEN,ei as AGENT_ID_RE,Ei as AGENT_WRITE_ORIGIN,Sr as AcpPermissionStore,Dn as AcpRegistry,si as AcpThreadManager,Ni as AgentFocusBroadcaster,Bn as AgentPresenceBroadcaster,Hr as AgentSessionCapacityError,qi as AgentSessionManager,Kn as AutoStartDisabledError,ir as BUNDLE_IDS,mi as BUNDLE_SCOPE,Jr as BUNDLE_SKILL_NAME,gr as BacklinkIndex,ur as CC1Broadcaster,s as CC1_CONTRACT_VERSION,xn as CONFIG_FILENAME,$i as CONFLICT_MARKER_RE,_a as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pn as ConfigSchema,da as DEFAULT_CHECKPOINT_RETENTION,wt as DEFAULT_EMBEDDINGS_DIMENSIONS,j as DEFAULT_PACK_ID,aa as DocumentDurabilityState,At as DocumentDurabilityStateError,U as EMBEDDINGS_API_KEY_ENV,L as EPHEMERAL_PROJECT_DIR_PREFIX,$e as ExposureConsentError,Ir as FEATURED_AGENT_IDS,_ as FILE_SYSTEM_WRITER,kr as FILE_WATCHER_ORIGIN,Ve as FileEmbeddingsBackend,qe as GIT_PREFLIGHT_FAIL_SPAN_NAME,at as GIT_UPSTREAM_WRITER,x as GitDirAccessError,Y as GitNotAvailableError,he as GitTooOldError,Pe as HOCUSPOCUS_AUTH_REJECTION_REASONS,_t as HocuspocusAuthRejection,Ca as HocuspocusAuthTokenSchema,w as HomeProjectRootError,Ut as INSTALLED_AGENTS_SCHEMES,ce as JSON_SCHEMA_DIALECT_2020_12,u as LINEAGE_EPOCH_KEY,It as LIVE_DERIVED_INDEX_DEBOUNCE_MS,Xt as MANAGED_RENAME_ORIGIN,ne as MAX_ACP_THREADS,Oe as MAX_AGENT_SESSIONS,bi as MCP_CONNECTION_ID_HEADER,a as MCP_SERVER_NAME,Se as MIN_EVICTABLE_IDLE_MS,ln as MIN_GIT_VERSION,nn as MISSING_OK_CONFIG_MESSAGE,Nr as MalformedGitPointerError,hn as McpLogger,dt as MissingOkConfigError,d as OBSERVER_SYNC_ORIGIN,rr as OK_OKIGNORE_TEMPLATE,Ki as ONBOARDING_BUNDLE_IDS,o as ORPHAN_MODES,l as PROTOCOL_VERSION,$ as PinoLogger,oi as ProcessLockCollisionError,Mi as ProjectGitInitError,Or as ROLLBACK_ORIGIN,Nn as ROOT_GITIGNORE_TEMPLATE,pi as RUNTIME_VERSION,zi as SERVICE_WRITER,Gn as SKILL_INSTALL_EVENTS_FILE_REL,c as SKILL_STATE_TARGETS,qr as STARTER_FOLDER_FRONTMATTER_FILENAME,Qi as STARTER_PACKS,Zn as STARTER_PACK_IDS,lr as STATE_MANIFEST_FILENAME,yi as STATE_SCHEMA_VERSION,e as SYSTEM_DOC_NAME,$r as SeedPrerequisiteError,xr as SeedRootDirError,hr as ServerLockCollisionError,En as SingleFileNotAFileError,ia as SingleFileNotFoundError,Sa as SingleFileNotMarkdownError,zn as SingleFileProjectOverrideError,ga as StateManifestError,kt as TagIndex,I as USER_GLOBAL_BUNDLE_IDS,ua as __getShowAllWalkStatsForTesting,Ft as __resetShowAllWalkStatsForTesting,J as acquireProcessLock,H as acquireServerLock,it as applyAgentMarkdownWrite,Vr as applyExternalChange,C as applySeed,Fr as assertCompatibleStateManifest,Ke as assertGitAvailable,Qe as assertNeverDiskEvent,ut as assertNotHomeProjectRoot,te as attachAcpThreadSocket,xe as attachCollabClientCounter,Be as attachIdleShutdown,Ct as bootServer,ka as buildAndOpenSkill,A as buildConfigYmlContent,Yt as buildExecResult,me as buildIngressPolicy,Ht as buildOkMcpStdioCommand,tn as buildSkillZip,se as buildStarterFolderFrontmatterYaml,Ne as buildWipTree,Ti as bundleSkillMdPath,De as canonicalProjectKey,mn as canonicalizeForCompare,cn as classifyEvents,bn as classifyFsPath,gt as clearAllEmbeddingsKeys,g as coercePackId,er as collectServerHostSnapshot,n as colorFromSeed,Ui as commitUpstreamImport,ri as commitWip,ki as commitWipFromTree,Tr as compareSemver,An as composeEffectiveLinterConfig,ui as composeFrontmatterSchemasConfig,Ii as containsConflictMarkers,Un as contentHash,Gr as contributorCount,Xi as countShadowObjects,Yn as countStaleAgentWipRefs,sr as countWipRefs,_i as createApiExtension,Zr as createAssetServeMiddleware,yr as createCollaborationHost,pr as createContentFilter,wn as createContentFilterAsync,na as createEmbeddingsSecretStore,ba as createEphemeralProjectDir,Ln as createExternalChangeHandler,ma as createFileLogger,Dt as createLiveDerivedIndexExtension,P as createMcpHttpHandler,ca as createOsProbe,Nt as createPersistenceExtension,K as createServer,B as createServerObserverExtension,nt as createServerProbeResolver,zr as createStreamingErrorWriter,ye as createTestLogger,b as describeStoredEmbeddingsKey,Mr as detectClaudeDesktopPresence,We as detectGit,Xe as detectProjectShape,ct as detectUserSkillHosts,Q as discoverLockDirs,ve as discoverMarkdownlintConfig,Le as emitPreflightFailureSpan,bt as encodeDocName,Ea as encodeFolderRoute,D as encodeSkillRoute,Kt as ensureProjectGit,de as errorResponse,zt as evictStaleTrackerEntries,$t as extractHeadings,ae as extractOkBinaryPath,je as extractWikiLinksFromMarkdown,Ci as fallbackPaths,Te as findEnclosingGitRoot,fn as findEnclosingProjectRoot,on as findNativeMarkdownlintFile,vn as flushFileLogger,mt as formatAuditBrokenLinkSuppressionLine,m as formatAuthRejectionWire,nr as formatContributorsFrom,Gi as formatPackRationale,ai as gcCheckpointRefs,ji as getCurrentMcpLogger,Dr as getIngressContext,Mn as getLocalDir,fi as getLogFilePath,Re as getLogger,Ri as getLogsDir,Wn as getMachineId,Kr as getMeter,Zi as getMetrics,Xn as getTracer,cr as handleCollabSocketError,vi as handleSpawnCursor,Qr as hasForwardingHeaders,br as hasGcLogLatch,i as iconFromClientName,mr as incrementCollabSocketFilteredError,Tn as incrementServerObserverFire,ra as initContent,xa as initShadowRepo,Rn as initTelemetry,ha as initToleranceTelemetryWriter,Ot as installJsonSchemaDialect,F as installPrettyZodErrors,xt as installTestLoggers,la as installUserSkill,Pt as isAllowedApiOrigin,q as isAllowedWorkspaceHostHeader,V as isConfigDoc,rt as isHocuspocusAuthRejectionReason,Br as isHomeDir,S as isHostAdmitted,Pr as isKnownPackId,Ge as isLinkIndexExcludedDoc,Ze as isLoopbackAddress,lt as isManagedArtifactDoc,ee as isOriginAdmitted,r as isOrphanMode,be as isPairedWriteOrigin,ze as isPathWithinDir,St as isPeerAdmitted,Oa as isProcessAlive,k as isProjectRoot,Jt as isReservedForUserTree,pe as isSelfWrite,Vt as isSystemDoc,en as isToleranceTelemetryEnabled,oe as isValidLockPid,Me as lastKnownHash,wi as listRescueCheckpoints,Ee as listStarterPacks,pn as loadCustomAgents,sn as loadPrincipal,yn as lockAdvertisesUi,ht as lockBaseUrl,h as lockFilePath,Da as loggerFactory,$n as loginShapedUserinfoUser,O as logsCurrentPath,qt as logsPreviousPath,Hi as makeLazyEmbeddingsKeyStore,ni as markServerLockDraining,Oi as mountMcpAndApi,wr as normalizeFsPath,kn as observeReadiness,li as originGitHubHost,Fi as packageVersionMajorMinor,Hn as parseAuthRejectionWire,Wr as parseGitVersion,Yi as parseHocuspocusAuthToken,Jn as parseKeepaliveConnectionId,or as pathToDocName,gi as planSeed,Xr as prepareSingleFileOpen,vr as processCommand,fr as processUsage,Cn as readAllTargets,ta as readBundleDecision,ya as readOwnNativeRules,In as readProcessLock,pa as readProcessLockDetailed,Et as readProjectHeadState,N as readProjectLocalSemanticConfig,sa as readServerLock,Mt as readServerPackageVersion,G as readSkillInstallStateSnapshot,z as readStateManifest,tt as readTargetRecordedAt,Rr as readTargetVersion,y as reconcile,jr as recordContributor,Ue as recordSkillInstallEvent,Ye as redactShareSubprocessStderr,st as registerAllTools,Z as registerWrite,_e as releaseProcessLock,Ie as releaseServerLock,yt as removeLastKnownHash,Ta as removeProjectSkillGitignoreBlock,E as reportSkillInstall,Gt as resetMetrics,ue as resolveBuiltinSkillHosts,t as resolveBundleEnabled,Rt as resolveBundledSkillDir,Qt as resolveContentDir,ie as resolveCursorBinaryDefault,Ae as resolveCursorSpawnInvocation,Si as resolveEffectiveLinterConfig,we as resolveEmbeddingsCredential,dn as resolveGitHubAccountFromUrl,an as resolveLockDir,_n as resolveNativeConfigForDoc,pt as resolveNativeMarkdownlintConfig,p as resolvePack,Qn as resolvePackageVersion,Vi as resolveSkillInstallReportSettings,ti as resolveUiInfo,Di as restoreContributors,Cr as restoreLifecycleFromConflictsJson,On as rewriteMarkdownLinksForDocumentRename,ci as rewriteWikiLinksForDocumentRename,Pi as runAuthReposSubprocess,Vn as runAuthStatusSubprocess,Ur as runCloneSubprocess,Ji as runDeviceFlowSubprocess,qn as runWithMcpLogger,ar as safeContentPath,hi as safeSubdir,Yr as safetyCheckpoint,_r as sameGitHubLogin,dr as sanitizeClientName,Sn as saveInMemoryCheckpoint,ea as saveVersion,va as scanLockProcesses,Fn as seedBasenameIndex,fa as seedEphemeralProjectDir,Tt as serializeError,M as setActiveSpanAttributes,oa as setupServerObservers,jt as shadowGit,W as shutdownTelemetry,fe as spansCurrentPath,Bt as spansPreviousPath,R as spawnDetached,et as splitMarkdownBlocks,Lr as startWatcher,v as streamingProblemEvent,Ar as swapContributors,He as teardownToleranceTelemetryWriter,Je as toBroadcasterKey,ot as tracedAppendFileSync,X as tracedLinkSync,ge as tracedMkdir,Fe as tracedMkdirSync,vt as tracedRename,wa as tracedRenameSync,T as tracedRmSync,Wt as tracedRmdirSync,le as tracedUnlinkSync,Lt as tracedWriteFile,Zt as tracedWriteFileSync,re as trustSystemCertificates,ke as updateLastKnownHash,xi as updateProcessLockPort,Ce as updateServerLockPort,un as validateAgentId,rn as validateCloneInputs,gn as validateSkillZip,ft as waitForServerLockDrain,f as withHiddenWindowsConsole,tr as withSpan,Wi as withSpanSync,ii as writeBundleDecision,Ai as writeMarkdownlintRule,Er as writeRootGitignoreForNewRepo,jn as writeStateManifest,di as writeTargetVersion,Li as writeTracker};
|
package/dist/index.d.mts
CHANGED
|
@@ -10993,7 +10993,53 @@ type OkMenuDispatchRequest = {
|
|
|
10993
10993
|
} | {
|
|
10994
10994
|
readonly kind: 'role';
|
|
10995
10995
|
readonly role: OkMenuDispatchRole;
|
|
10996
|
+
} | {
|
|
10997
|
+
readonly kind: 'spelling-languages-query';
|
|
10998
|
+
} | {
|
|
10999
|
+
readonly kind: 'spelling-languages-set';
|
|
11000
|
+
readonly languages: readonly string[];
|
|
11001
|
+
} | {
|
|
11002
|
+
readonly kind: 'spellcheck-enabled-set';
|
|
11003
|
+
readonly enabled: boolean;
|
|
11004
|
+
};
|
|
11005
|
+
type OkSpellingLanguagesSetReason = 'invalid-request' | 'empty-selection' | 'unsupported-language' | 'engine-error';
|
|
11006
|
+
interface OkSpellingLanguagesState {
|
|
11007
|
+
readonly available: readonly string[];
|
|
11008
|
+
readonly selected: readonly string[];
|
|
11009
|
+
readonly defaults: readonly string[];
|
|
11010
|
+
}
|
|
11011
|
+
type OkSpellingLanguagesQueryResult = {
|
|
11012
|
+
readonly kind: 'spelling-languages-query';
|
|
11013
|
+
readonly ok: true;
|
|
11014
|
+
readonly state: OkSpellingLanguagesState;
|
|
11015
|
+
} | {
|
|
11016
|
+
readonly kind: 'spelling-languages-query';
|
|
11017
|
+
readonly ok: false;
|
|
11018
|
+
readonly reason: 'engine-error';
|
|
11019
|
+
};
|
|
11020
|
+
type OkSpellingLanguagesSetResult = {
|
|
11021
|
+
readonly kind: 'spelling-languages-set';
|
|
11022
|
+
readonly ok: true;
|
|
11023
|
+
readonly state: OkSpellingLanguagesState;
|
|
11024
|
+
} | {
|
|
11025
|
+
readonly kind: 'spelling-languages-set';
|
|
11026
|
+
readonly ok: false;
|
|
11027
|
+
readonly reason: OkSpellingLanguagesSetReason;
|
|
10996
11028
|
};
|
|
11029
|
+
type OkSpellcheckEnabledSetResult = {
|
|
11030
|
+
readonly kind: 'spellcheck-enabled-set';
|
|
11031
|
+
readonly ok: true;
|
|
11032
|
+
readonly enabled: boolean;
|
|
11033
|
+
readonly saved: boolean;
|
|
11034
|
+
} | {
|
|
11035
|
+
readonly kind: 'spellcheck-enabled-set';
|
|
11036
|
+
readonly ok: false;
|
|
11037
|
+
readonly reason: 'engine-error' | 'invalid-request';
|
|
11038
|
+
};
|
|
11039
|
+
type OkSpellingDispatchResult = OkSpellingLanguagesQueryResult | OkSpellingLanguagesSetResult | OkSpellcheckEnabledSetResult;
|
|
11040
|
+
type OkMenuUiDispatchRequest = Exclude<OkMenuDispatchRequest, {
|
|
11041
|
+
readonly kind: OkSpellingDispatchResult['kind'];
|
|
11042
|
+
}>;
|
|
10997
11043
|
interface OkMenuRendererSnapshot {
|
|
10998
11044
|
readonly recentProjects: ReadonlyArray<{
|
|
10999
11045
|
readonly path: string;
|
|
@@ -11405,6 +11451,9 @@ interface OkDesktopBridge {
|
|
|
11405
11451
|
};
|
|
11406
11452
|
spellcheck: {
|
|
11407
11453
|
toggle(): Promise<boolean>;
|
|
11454
|
+
languages(): Promise<OkSpellingLanguagesQueryResult>;
|
|
11455
|
+
setLanguages(languages: readonly string[]): Promise<OkSpellingLanguagesSetResult>;
|
|
11456
|
+
setEnabled(enabled: boolean): Promise<OkSpellcheckEnabledSetResult>;
|
|
11408
11457
|
};
|
|
11409
11458
|
integrations: {
|
|
11410
11459
|
status(): Promise<OkIntegrationsStatus>;
|
|
@@ -11463,7 +11512,7 @@ interface OkDesktopBridge {
|
|
|
11463
11512
|
}): void;
|
|
11464
11513
|
};
|
|
11465
11514
|
menu: {
|
|
11466
|
-
dispatch(request:
|
|
11515
|
+
dispatch(request: OkMenuUiDispatchRequest): Promise<OkMenuRendererSnapshot | undefined>;
|
|
11467
11516
|
};
|
|
11468
11517
|
startup: {
|
|
11469
11518
|
reportMarks(marks: {
|
|
@@ -11857,10 +11906,19 @@ type LockState = {
|
|
|
11857
11906
|
} | {
|
|
11858
11907
|
status: 'corrupt';
|
|
11859
11908
|
lockPath: string;
|
|
11909
|
+
foreignHost?: boolean;
|
|
11910
|
+
} | {
|
|
11911
|
+
status: 'read-error';
|
|
11912
|
+
lockPath: string;
|
|
11913
|
+
error: string;
|
|
11860
11914
|
} | {
|
|
11861
11915
|
status: 'foreign-host';
|
|
11862
11916
|
lockPath: string;
|
|
11863
11917
|
lock: ProcessLockMetadata;
|
|
11918
|
+
} | {
|
|
11919
|
+
status: 'unverified-owner';
|
|
11920
|
+
lockPath: string;
|
|
11921
|
+
pid: number;
|
|
11864
11922
|
} | {
|
|
11865
11923
|
status: 'dead-pid';
|
|
11866
11924
|
lockPath: string;
|
package/dist/index.mjs
CHANGED
|
@@ -1524,13 +1524,13 @@ GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){funct
|
|
|
1524
1524
|
`),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
|
|
1525
1525
|
`)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
|
|
1526
1526
|
`).replace(/\n/g,`\r
|
|
1527
|
-
`));let u=`${i?``:``}${l}`;return u!==r&&IQ(e,u,{mode:o7(e)}),{kind:`removed`}}function lke(e){return{event:`mcp-config-decline`,scope:e.scope,surface:e.surface,editorId:e.editorId,reason:e.reason}}function uke(e){let{priorCommand:t,priorArgs:n}=h9(e.priorEntry);return{event:`mcp-config-migrate`,scope:e.scope,surface:e.surface,editorId:e.editorId,configPath:e.configPath,priorCommand:t,priorArgs:n}}function h9(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}function g9(e,t,n={}){let r=QTe(e,t);if(!g(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(S(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!lTe(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??U6)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??ZTe())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??ce();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}async function dke(e,t=void 0){let n=g9(e,`server`);if(n.status!==`alive`&&n.status!==`foreign-host`)return null;let r=eEe(n.lock);if(r===null)return null;try{let n=await fetch(`${r}/api/server-info`,{signal:AbortSignal.timeout(1500)});if(!n.ok)return t?.warn({lockDir:e,baseUrl:r,outcome:`http-error`,status:n.status},`stop client-probe failed`),null;let i=(await n.json())?.collabClients;return typeof i==`number`&&Number.isFinite(i)?i:(t?.warn({lockDir:e,baseUrl:r,outcome:`no-client-count`,received:typeof i},`stop client-probe failed`),null)}catch(n){return t?.warn({lockDir:e,baseUrl:r,outcome:`unreachable`,err:n},`stop client-probe failed`),null}}function fke(e,t={}){return{targets:mke(e,t.isAlive??U6)?[{name:`server`,pid:e.lock.pid,port:e.lock.port}]:[]}}async function pke(e){let t=e.inspect??(()=>g9(e.lockDir,`server`)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=e.probeClients??dke,o=e.logger??void 0,s=fke(t(),{isAlive:e.isAlive});if(s.targets.length===0)return r(`No running open-knowledge processes.`),o?.info({lockDir:e.lockDir,targets:0},`stop found nothing to signal`),{stopped:[],failed:[],hadTargets:!1};if(e.force!==!0){let t=await a(e.lockDir,o);if(t!==null&&t>0)return i(`Not stopping: ${t} collaboration client${t===1?``:`s`} (editor window${t===1?``:`s`} or agents) still connected to the server at ${e.lockDir}. Close them, or re-run with --force to terminate anyway.`),o?.warn({lockDir:e.lockDir,clients:t,pids:s.targets.map(e=>e.pid)},`stop declined: live collaboration clients`),{stopped:[],failed:[],hadTargets:!0,declined:{clients:t}}}let c=[],l=[];for(let e of s.targets)try{n(e.pid,`SIGTERM`),c.push(e)}catch(t){l.push({target:e,error:t instanceof Error?t.message:String(t)})}return c.length>0&&r(`Stopped: ${c.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),o?.info({lockDir:e.lockDir,signalled:c.map(e=>({name:e.name,pid:e.pid,port:e.port})),failed:l.map(({target:e,error:t})=>({pid:e.pid,error:t})),forced:e.force===!0},`stop signalled processes`),l.length>0&&i(`Failed to stop: ${l.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:c,failed:l,hadTargets:!0}}function mke(e,t){return e.status===`alive`||e.status===`foreign-host`&&t(e.lock.pid)}function _9(e){if(!g(e))return{value:null,path:e,source:null,doc:null};let t;try{t=S(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,rn.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return q8(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function hke(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),r={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=du({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...r,source:e}}return r})}function gke(e){let t=e??process.cwd(),n=[],r=[],i=[],a=[],o=BQ(`user`,t),s=FQ({absPath:o});r.push(...s.diagnostics),!s.valid&&s.sidelinedTo!==void 0&&i.push({from:o,to:s.sidelinedTo}),s.valid&&s.source!==void 0&&n.push(o);let c=(e,t=!1)=>{let i=_9(e);if(i.diagnostic!==void 0&&r.push(i.diagnostic),i.value===null)return{};let o=Nu({value:i.value,file:i.path,source:i.source,doc:i.doc});r.push(...o),n.push(e);let s=o.length>0?Fu(i.value):i.value;return t&&a.push(...gR({value:s,file:i.path,source:i.source,doc:i.doc})),s},l=be(t,`.ok`,`config.yml`),u=c(l,!0),d=c(BQ(`project-local`,t)),f=_R(s.value,u,d),p=mEe.safeParse(f);if(!p.success){let e=_9(l),t={code:`SCHEMA_INVALID`,issues:hke(p.error.issues,e)};throw Error(Ou(t))}return{config:p.data,sources:n,diagnostics:r,sidelined:i,ignoredCommittedKeys:a}}function v9(e){return e.replace(/:\d+$/,``)}function y9(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/(?:[^/?#]*@)?([^@/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:v9(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[^/?#]*@)?([^@/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:v9(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:v9(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.\-~%]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function b9(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`https:`)return null;let n=TR(t.hostname);if(n===null)return null;let r=t.pathname.split(`/`).filter(e=>e.length>0);if(r.length<5||r[2]!==`blob`)return null;let i,a,o,s;try{i=decodeURIComponent(r[0]),a=decodeURIComponent(r[1]),o=decodeURIComponent(r[3]),s=r.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.length===0||s.some(e=>e.length===0)?null:{host:n,owner:i,repo:a,branch:o,path:s.join(`/`)}}function x9(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`https:`)return null;let n=TR(t.hostname);if(n===null)return null;let r=t.pathname.split(`/`);if(r.length<5||r[0]!==``||r[3]!==`tree`)return null;let i=r.slice(5);i.length===1&&i[0]===``&&i.pop();let a,o,s,c;try{a=decodeURIComponent(r[1]),o=decodeURIComponent(r[2]),s=decodeURIComponent(r[4]),c=i.map(e=>decodeURIComponent(e))}catch{return null}return!a||!o||!s||c.some(e=>e.length===0)?null:{host:n,owner:a,repo:o,branch:s,path:c.join(`/`)}}function _ke(e){let t=b9(e);if(t)return{kind:`doc`,...t};let n=x9(e);return n?{kind:`folder`,...n}:null}async function vke(e,t){let n,r;try{n=await De(be(e)),r=await De(be(M(e)))}catch{return{kind:`not-git`}}if(!S9(n,r))return{kind:`symlink-escape`};let i=N(n,`.git`),a;try{a=te(i)}catch{return{kind:`not-git`}}if(a.isDirectory()){let e;try{e=await De(i)}catch{return{kind:`not-git`}}if(!S9(e,n))return{kind:`symlink-escape`}}else if(!a.isFile())return{kind:`not-git`};let o=kge(n);if(o.kind!==`repository`)return{kind:`not-git`};let s=o.repository.readRemoteUrl(`origin`);if(s.kind===`unreadable`)return{kind:`not-git`};if(s.kind===`absent`)return s.reason===`config-missing`?{kind:`not-git`}:{kind:`no-origin`};let c=s.url,l=y9(c);if(l===null)return{kind:`non-github`};let u=TR(l.hostname);if(u===null)return{kind:`non-github`};let d=u===t.host.toLowerCase(),f=l.owner.toLowerCase()===t.owner.toLowerCase(),p=l.name.toLowerCase()===t.repo.toLowerCase();return!d&&f&&p?{kind:`wrong-host`,actualHost:u}:!d||!f||!p?{kind:`wrong-repo`,actualOwner:l.owner,actualRepo:l.name}:{kind:`ok`,gitRemoteUrl:`https://${u}/${l.owner}/${l.name}.git`}}function S9(e,t){if(e===t)return!0;let n=ye(t,e);return n.length>0&&!n.startsWith(`..`)&&!ge(n)}const yke=`# >>> open-knowledge cli >>>`,bke=`# <<< open-knowledge cli <<<`,xke=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Ske(e){return N(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}function C9(e,t,n=[]){let r=g(N(e,Z6[t]))?`satisfied`:`absent`;return{...r===`satisfied`?{state:r,strictness:[`reclaim-permissive`]}:{state:r},...n.length===0?{}:{sharedWith:n}}}function Cke(e,t){let n=e5.flatMap(t=>{let n=e[t];return n===null?[]:[{editor:t,root:n}]}),r=fn.filter(e=>e.scope===t).map(e=>({editor:e.editorId,root:bs}));return[...n,...r]}function w9(e,t,n,r){let i=sCe(e,Cke(t,r)),a=i.find(e=>e.host===n);if(a===void 0||a.state===`absent`)return[];let o=a.real;return i.filter(e=>e.host!==n&&e.state!==`absent`&&e.real===o).map(e=>e.host)}function wke(e,t){let n=(t??k()).replace(/[\\/]+$/,``);if(!n.includes(`\\`))return e.startsWith(`${n}/`)?`~/${e.slice(n.length+1)}`:e;let r=e=>e.replace(/\\/g,`/`),i=r(n),a=r(e);return a.startsWith(`${i}/`)?`~/${a.slice(i.length+1)}`:e}function Tke(e,t){let n=j5[e];return g7(n,``,t)&&!h7(n,``,t)}function T9(e,t,n,r,i){let a=j5[e],o;if(i===void 0)try{o=a.configPath(n,r)}catch{return{state:`structural-na`}}else o=i;let s=i===void 0?wke(o,r):void 0,c=b7(a,n,r,i);switch(c.kind){case`absent`:case`no-entry`:return i===void 0&&Tke(e,r)?{state:`structural-na`}:{state:`absent`,path:s};case`decline`:return{state:`unprobed`};case`present`:{let{entry:r}=c,i=[];d5(r)&&i.push(`reclaim-permissive`),m5(r)&&i.push(`pre-approval-exact`),x7(e)(r)&&i.push(`injection-functional`);let o=YEe(a,n);return i.length>0&&(o!==null&&XEe(r,o)||t.includes(`pre-approval-exact`)&&i.includes(`reclaim-permissive`)&&!i.includes(`pre-approval-exact`))?{state:`drifted`,strictness:i,path:s}:i.length>0?{state:`satisfied`,strictness:i,path:s}:WEe(a)?{state:`foreign-replaceable`,path:s}:{state:`foreign`,path:s}}}}function Eke(e){let{cwd:t,home:n}=e;return e=>{if(e.pathId===null)return null;let r=Ho(e.pathId);if(r===null)return null;if(r.kind===`central-skill-store`)return n===void 0?null:C9(N(n,bs),`discovery`,w9(n,dn,e.agent,`global`));let i=r.editor;switch(r.kind){case`editor-user-skill-root`:{let e=dn[i];return e===null||n===void 0?null:t8(n).some(e=>e.editorId===i)?C9(N(n,e),`discovery`,w9(n,dn,i,`global`)):{state:`structural-na`}}case`editor-project-skill-root`:{let e=un[i];return e===null?null:C9(N(t,e),`project`,w9(t,un,i,`project`))}case`editor-user-config`:return T9(i,e.strictness,t,n);case`editor-project-config`:{let r=_n[i];return r===null?null:T9(i,e.strictness,t,n,N(t,r))}}}}[...Q6.map(e=>Z6[e])];function Dke(e){if(!ge(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=be(e);if(t===xe||M(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function E9(e){let t=Dke(e),n=[];for(let e of Q6){let r=Z6[e];n.push({path:N(t,`.agents`,`skills`,r),bundleId:e,scope:`central`});for(let i of hn)n.push({path:N(t,i.skillsRoot,r),bundleId:e,scope:`host`,hostDir:i.hostDir})}return n}function Oke(e,t){let n=[];for(let r of E9(e))if(r.bundleId===t)try{O(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}`)}const kke=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=_7(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:i.action===`declined`?{integration:`mcp-config`,editorId:e.id,action:`declined`,path:i.configPath,...i.declineReason===void 0?{}:{reason:i.declineReason}}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let r=W5(e,t,{home:n.home});return{integration:`project-skill`,editorId:e.id,action:r.action,...r.path?{path:r.path}:{},...r.error?{error:r.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function Ake(e,t,n={},r=kke){let i=[];for(let a of t){let t=j5[a];for(let a of r)i.push(a.write(t,e,n))}let a=PDe(e,t);return a&&i.push({integration:`project-skill`,editorId:a.editorId,action:a.action,...a.path?{path:a.path}:{},...a.error?{error:a.error}:{}}),i}function jke(e,t,n={}){return{integrations:Ake(e,t,n)}}function D9(e,t){let n=dn[e];return n===null?null:N(t,...n.split(`/`),Z6.discovery,`SKILL.md`)}function Mke(e,t){let n=D9(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};if(!t8(t).some(t=>t.editorId===e))return{editorId:e,label:e,action:`skipped-unsupported`,path:n};try{let r=e8(`discovery`,{checkDesktop:!0});return B5(M(n),t),{editorId:e,label:e,action:V5(r,n),path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function Nke(e){return g(N(e,...`.agents/skills`.split(`/`),Z6.discovery))?!0:ln.some(t=>{let n=D9(t,e);return n!==null&&g(M(n))})}function Pke(e,t){let n=D9(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};let r=M(n);try{return g(n)?(B5(r,t),O(r,{recursive:!0,force:!0}),{editorId:e,label:e,action:`removed`,path:n}):{editorId:e,label:e,action:`not-present`,path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function Fke(e){return FQ({absPath:BQ(`user`,e,e),sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function O9({home:e=k(),env:t=process.env}={}){let n=Fke(e),{override:r,preferenceList:i}=bye(t),{locale:a,source:o}=_B({override:r,storedPreference:n,supportedLocales:sl,preferenceList:i,autoDetectableLocales:ll});return{preference:n,locale:a,source:o,systemLanguages:i}}function k9(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function Ike(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function A9(e,t){if(typeof e==`string`)return k9(e,t.contentDir);if(Array.isArray(e))return e.map(e=>A9(e,t));if(!Ike(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=A9(i,t);return n}function j9(e,t){let n=S(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
1527
|
+
`));let u=`${i?``:``}${l}`;return u!==r&&IQ(e,u,{mode:o7(e)}),{kind:`removed`}}function lke(e){return{event:`mcp-config-decline`,scope:e.scope,surface:e.surface,editorId:e.editorId,reason:e.reason}}function uke(e){let{priorCommand:t,priorArgs:n}=h9(e.priorEntry);return{event:`mcp-config-migrate`,scope:e.scope,surface:e.surface,editorId:e.editorId,configPath:e.configPath,priorCommand:t,priorArgs:n}}function h9(e){return{priorCommand:typeof e.command==`string`?e.command.slice(0,200):null,priorArgs:Array.isArray(e.args)?e.args.slice(0,10).map(e=>typeof e==`string`?e.slice(0,200):e):null}}function g9(e,t,n={}){let r=QTe(e,t),i;try{i=S(r,`utf-8`)}catch(e){return e&&typeof e==`object`&&`code`in e&&e.code===`ENOENT`?{status:`missing`,lockPath:r}:{status:`read-error`,lockPath:r,error:e instanceof Error?e.message:String(e)}}let a;try{a=JSON.parse(i)}catch{return{status:`corrupt`,lockPath:r}}let o=a&&typeof a==`object`?a:{},s=`machineId`in o&&typeof o.machineId==`string`?o.machineId!==(n.machineId??ZTe()):`hostname`in o&&typeof o.hostname==`string`&&o.hostname!==(n.host??ce());if(!a||typeof a!=`object`||!lTe(a.pid))return{status:`corrupt`,lockPath:r,...s?{foreignHost:!0}:{}};let c=a.pid,l=`machineId`in o&&typeof o.machineId==`string`||`hostname`in o&&typeof o.hostname==`string`;return s?{status:`foreign-host`,lockPath:r,lock:a}:(n.isAlive??U6)(c)?l?{status:`alive`,lockPath:r,lock:a}:{status:`unverified-owner`,lockPath:r,pid:c}:{status:`dead-pid`,lockPath:r,lock:a}}async function dke(e,t=void 0){let n=g9(e,`server`);if(n.status!==`alive`&&n.status!==`foreign-host`)return null;let r=eEe(n.lock);if(r===null)return null;try{let n=await fetch(`${r}/api/server-info`,{signal:AbortSignal.timeout(1500)});if(!n.ok)return t?.warn({lockDir:e,baseUrl:r,outcome:`http-error`,status:n.status},`stop client-probe failed`),null;let i=(await n.json())?.collabClients;return typeof i==`number`&&Number.isFinite(i)?i:(t?.warn({lockDir:e,baseUrl:r,outcome:`no-client-count`,received:typeof i},`stop client-probe failed`),null)}catch(n){return t?.warn({lockDir:e,baseUrl:r,outcome:`unreachable`,err:n},`stop client-probe failed`),null}}function fke(e,t={}){return{targets:mke(e,t.isAlive??U6)?[{name:`server`,pid:e.lock.pid,port:e.lock.port}]:[]}}async function pke(e){let t=e.inspect??(()=>g9(e.lockDir,`server`)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=e.probeClients??dke,o=e.logger??void 0,s=fke(t(),{isAlive:e.isAlive});if(s.targets.length===0)return r(`No running open-knowledge processes.`),o?.info({lockDir:e.lockDir,targets:0},`stop found nothing to signal`),{stopped:[],failed:[],hadTargets:!1};if(e.force!==!0){let t=await a(e.lockDir,o);if(t!==null&&t>0)return i(`Not stopping: ${t} collaboration client${t===1?``:`s`} (editor window${t===1?``:`s`} or agents) still connected to the server at ${e.lockDir}. Close them, or re-run with --force to terminate anyway.`),o?.warn({lockDir:e.lockDir,clients:t,pids:s.targets.map(e=>e.pid)},`stop declined: live collaboration clients`),{stopped:[],failed:[],hadTargets:!0,declined:{clients:t}}}let c=[],l=[];for(let e of s.targets)try{n(e.pid,`SIGTERM`),c.push(e)}catch(t){l.push({target:e,error:t instanceof Error?t.message:String(t)})}return c.length>0&&r(`Stopped: ${c.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),o?.info({lockDir:e.lockDir,signalled:c.map(e=>({name:e.name,pid:e.pid,port:e.port})),failed:l.map(({target:e,error:t})=>({pid:e.pid,error:t})),forced:e.force===!0},`stop signalled processes`),l.length>0&&i(`Failed to stop: ${l.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:c,failed:l,hadTargets:!0}}function mke(e,t){return e.status===`alive`||e.status===`foreign-host`&&t(e.lock.pid)}function _9(e){if(!g(e))return{value:null,path:e,source:null,doc:null};let t;try{t=S(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,rn.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return q8(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function hke(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),r={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=du({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...r,source:e}}return r})}function gke(e){let t=e??process.cwd(),n=[],r=[],i=[],a=[],o=BQ(`user`,t),s=FQ({absPath:o});r.push(...s.diagnostics),!s.valid&&s.sidelinedTo!==void 0&&i.push({from:o,to:s.sidelinedTo}),s.valid&&s.source!==void 0&&n.push(o);let c=(e,t=!1)=>{let i=_9(e);if(i.diagnostic!==void 0&&r.push(i.diagnostic),i.value===null)return{};let o=Nu({value:i.value,file:i.path,source:i.source,doc:i.doc});r.push(...o),n.push(e);let s=o.length>0?Fu(i.value):i.value;return t&&a.push(...gR({value:s,file:i.path,source:i.source,doc:i.doc})),s},l=be(t,`.ok`,`config.yml`),u=c(l,!0),d=c(BQ(`project-local`,t)),f=_R(s.value,u,d),p=mEe.safeParse(f);if(!p.success){let e=_9(l),t={code:`SCHEMA_INVALID`,issues:hke(p.error.issues,e)};throw Error(Ou(t))}return{config:p.data,sources:n,diagnostics:r,sidelined:i,ignoredCommittedKeys:a}}function v9(e){return e.replace(/:\d+$/,``)}function y9(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/(?:[^/?#]*@)?([^@/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:v9(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[^/?#]*@)?([^@/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:v9(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:v9(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.\-~%]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function b9(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`https:`)return null;let n=TR(t.hostname);if(n===null)return null;let r=t.pathname.split(`/`).filter(e=>e.length>0);if(r.length<5||r[2]!==`blob`)return null;let i,a,o,s;try{i=decodeURIComponent(r[0]),a=decodeURIComponent(r[1]),o=decodeURIComponent(r[3]),s=r.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.length===0||s.some(e=>e.length===0)?null:{host:n,owner:i,repo:a,branch:o,path:s.join(`/`)}}function x9(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`https:`)return null;let n=TR(t.hostname);if(n===null)return null;let r=t.pathname.split(`/`);if(r.length<5||r[0]!==``||r[3]!==`tree`)return null;let i=r.slice(5);i.length===1&&i[0]===``&&i.pop();let a,o,s,c;try{a=decodeURIComponent(r[1]),o=decodeURIComponent(r[2]),s=decodeURIComponent(r[4]),c=i.map(e=>decodeURIComponent(e))}catch{return null}return!a||!o||!s||c.some(e=>e.length===0)?null:{host:n,owner:a,repo:o,branch:s,path:c.join(`/`)}}function _ke(e){let t=b9(e);if(t)return{kind:`doc`,...t};let n=x9(e);return n?{kind:`folder`,...n}:null}async function vke(e,t){let n,r;try{n=await De(be(e)),r=await De(be(M(e)))}catch{return{kind:`not-git`}}if(!S9(n,r))return{kind:`symlink-escape`};let i=N(n,`.git`),a;try{a=te(i)}catch{return{kind:`not-git`}}if(a.isDirectory()){let e;try{e=await De(i)}catch{return{kind:`not-git`}}if(!S9(e,n))return{kind:`symlink-escape`}}else if(!a.isFile())return{kind:`not-git`};let o=kge(n);if(o.kind!==`repository`)return{kind:`not-git`};let s=o.repository.readRemoteUrl(`origin`);if(s.kind===`unreadable`)return{kind:`not-git`};if(s.kind===`absent`)return s.reason===`config-missing`?{kind:`not-git`}:{kind:`no-origin`};let c=s.url,l=y9(c);if(l===null)return{kind:`non-github`};let u=TR(l.hostname);if(u===null)return{kind:`non-github`};let d=u===t.host.toLowerCase(),f=l.owner.toLowerCase()===t.owner.toLowerCase(),p=l.name.toLowerCase()===t.repo.toLowerCase();return!d&&f&&p?{kind:`wrong-host`,actualHost:u}:!d||!f||!p?{kind:`wrong-repo`,actualOwner:l.owner,actualRepo:l.name}:{kind:`ok`,gitRemoteUrl:`https://${u}/${l.owner}/${l.name}.git`}}function S9(e,t){if(e===t)return!0;let n=ye(t,e);return n.length>0&&!n.startsWith(`..`)&&!ge(n)}const yke=`# >>> open-knowledge cli >>>`,bke=`# <<< open-knowledge cli <<<`,xke=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Ske(e){return N(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}function C9(e,t,n=[]){let r=g(N(e,Z6[t]))?`satisfied`:`absent`;return{...r===`satisfied`?{state:r,strictness:[`reclaim-permissive`]}:{state:r},...n.length===0?{}:{sharedWith:n}}}function Cke(e,t){let n=e5.flatMap(t=>{let n=e[t];return n===null?[]:[{editor:t,root:n}]}),r=fn.filter(e=>e.scope===t).map(e=>({editor:e.editorId,root:bs}));return[...n,...r]}function w9(e,t,n,r){let i=sCe(e,Cke(t,r)),a=i.find(e=>e.host===n);if(a===void 0||a.state===`absent`)return[];let o=a.real;return i.filter(e=>e.host!==n&&e.state!==`absent`&&e.real===o).map(e=>e.host)}function wke(e,t){let n=(t??k()).replace(/[\\/]+$/,``);if(!n.includes(`\\`))return e.startsWith(`${n}/`)?`~/${e.slice(n.length+1)}`:e;let r=e=>e.replace(/\\/g,`/`),i=r(n),a=r(e);return a.startsWith(`${i}/`)?`~/${a.slice(i.length+1)}`:e}function Tke(e,t){let n=j5[e];return g7(n,``,t)&&!h7(n,``,t)}function T9(e,t,n,r,i){let a=j5[e],o;if(i===void 0)try{o=a.configPath(n,r)}catch{return{state:`structural-na`}}else o=i;let s=i===void 0?wke(o,r):void 0,c=b7(a,n,r,i);switch(c.kind){case`absent`:case`no-entry`:return i===void 0&&Tke(e,r)?{state:`structural-na`}:{state:`absent`,path:s};case`decline`:return{state:`unprobed`};case`present`:{let{entry:r}=c,i=[];d5(r)&&i.push(`reclaim-permissive`),m5(r)&&i.push(`pre-approval-exact`),x7(e)(r)&&i.push(`injection-functional`);let o=YEe(a,n);return i.length>0&&(o!==null&&XEe(r,o)||t.includes(`pre-approval-exact`)&&i.includes(`reclaim-permissive`)&&!i.includes(`pre-approval-exact`))?{state:`drifted`,strictness:i,path:s}:i.length>0?{state:`satisfied`,strictness:i,path:s}:WEe(a)?{state:`foreign-replaceable`,path:s}:{state:`foreign`,path:s}}}}function Eke(e){let{cwd:t,home:n}=e;return e=>{if(e.pathId===null)return null;let r=Ho(e.pathId);if(r===null)return null;if(r.kind===`central-skill-store`)return n===void 0?null:C9(N(n,bs),`discovery`,w9(n,dn,e.agent,`global`));let i=r.editor;switch(r.kind){case`editor-user-skill-root`:{let e=dn[i];return e===null||n===void 0?null:t8(n).some(e=>e.editorId===i)?C9(N(n,e),`discovery`,w9(n,dn,i,`global`)):{state:`structural-na`}}case`editor-project-skill-root`:{let e=un[i];return e===null?null:C9(N(t,e),`project`,w9(t,un,i,`project`))}case`editor-user-config`:return T9(i,e.strictness,t,n);case`editor-project-config`:{let r=_n[i];return r===null?null:T9(i,e.strictness,t,n,N(t,r))}}}}[...Q6.map(e=>Z6[e])];function Dke(e){if(!ge(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=be(e);if(t===xe||M(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function E9(e){let t=Dke(e),n=[];for(let e of Q6){let r=Z6[e];n.push({path:N(t,`.agents`,`skills`,r),bundleId:e,scope:`central`});for(let i of hn)n.push({path:N(t,i.skillsRoot,r),bundleId:e,scope:`host`,hostDir:i.hostDir})}return n}function Oke(e,t){let n=[];for(let r of E9(e))if(r.bundleId===t)try{O(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}`)}const kke=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=_7(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:i.action===`declined`?{integration:`mcp-config`,editorId:e.id,action:`declined`,path:i.configPath,...i.declineReason===void 0?{}:{reason:i.declineReason}}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let r=W5(e,t,{home:n.home});return{integration:`project-skill`,editorId:e.id,action:r.action,...r.path?{path:r.path}:{},...r.error?{error:r.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function Ake(e,t,n={},r=kke){let i=[];for(let a of t){let t=j5[a];for(let a of r)i.push(a.write(t,e,n))}let a=PDe(e,t);return a&&i.push({integration:`project-skill`,editorId:a.editorId,action:a.action,...a.path?{path:a.path}:{},...a.error?{error:a.error}:{}}),i}function jke(e,t,n={}){return{integrations:Ake(e,t,n)}}function D9(e,t){let n=dn[e];return n===null?null:N(t,...n.split(`/`),Z6.discovery,`SKILL.md`)}function Mke(e,t){let n=D9(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};if(!t8(t).some(t=>t.editorId===e))return{editorId:e,label:e,action:`skipped-unsupported`,path:n};try{let r=e8(`discovery`,{checkDesktop:!0});return B5(M(n),t),{editorId:e,label:e,action:V5(r,n),path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function Nke(e){return g(N(e,...`.agents/skills`.split(`/`),Z6.discovery))?!0:ln.some(t=>{let n=D9(t,e);return n!==null&&g(M(n))})}function Pke(e,t){let n=D9(e,t);if(n===null)return{editorId:e,label:e,action:`skipped-unsupported`,path:``};let r=M(n);try{return g(n)?(B5(r,t),O(r,{recursive:!0,force:!0}),{editorId:e,label:e,action:`removed`,path:n}):{editorId:e,label:e,action:`not-present`,path:n}}catch(t){return{editorId:e,label:e,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function Fke(e){return FQ({absPath:BQ(`user`,e,e),sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function O9({home:e=k(),env:t=process.env}={}){let n=Fke(e),{override:r,preferenceList:i}=bye(t),{locale:a,source:o}=_B({override:r,storedPreference:n,supportedLocales:sl,preferenceList:i,autoDetectableLocales:ll});return{preference:n,locale:a,source:o,systemLanguages:i}}function k9(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function Ike(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function A9(e,t){if(typeof e==`string`)return k9(e,t.contentDir);if(Array.isArray(e))return e.map(e=>A9(e,t));if(!Ike(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=A9(i,t);return n}function j9(e,t){let n=S(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
1528
1528
|
`),i=n.split(`
|
|
1529
1529
|
`),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(e!==i.length-1||n!==``){if(n.length===0){a.push(``);continue}try{let e=A9(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}let o=r?`${a.join(`
|
|
1530
1530
|
`)}\n`:a.join(`
|
|
1531
1531
|
`);re(e,o)}function M9(e,t){let n=S(e,`utf-8`);if(n.trim().length!==0)try{let r=A9(JSON.parse(n),t),i=n.endsWith(`
|
|
1532
1532
|
`)?`
|
|
1533
1533
|
`:``;re(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=k9(n,t.contentDir);r!==n&&re(e,r)}}function N9(e,t){let n=S(e,`utf-8`),r=k9(n,t.contentDir);r!==n&&re(e,r)}function P9(e){try{return w(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>N(e,t.name))}catch{return[]}}const Lke=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function F9(e){return/\.log\.\d+$/.test(e)}function Rke(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||F9(e)}const zke=[`telemetry`,`logs`,`process`,`diagnostic-reports`];function Bke(e){let t={contentDir:e.contentDir};for(let n of zke)for(let r of P9(N(e.stagingDir,n)))Rke(r)?j9(r,t):r.endsWith(`.json`)?M9(r,t):N9(r,t);for(let n of P9(N(e.stagingDir,`state`))){let e=me(n);n.endsWith(`.jsonl`)?j9(n,t):Lke.has(e)?M9(n,t):N9(n,t)}}const I9=[`.ok`,`local`,`telemetry`],L9=[`.ok`,`local`,`logs`],R9=[`.ok`,`local`,`loss-capture`],z9=`spans-current.jsonl`,B9=`spans-prev.jsonl`,V9=`server-current.jsonl`,H9=`server-prev.jsonl`,U9=`loss-current.jsonl`,W9=`loss-prev.jsonl`;function Vke(e){return N(e,...I9,z9)}function Hke(e){return N(e,...I9,B9)}function Uke(e){return N(e,...L9,V9)}function Wke(e){return N(e,...L9,H9)}function Gke(e){return N(e,...R9,U9)}function Kke(e){return N(e,...R9,W9)}const G9=1e3;async function qke(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(G9)});return t.ok?await t.text():null}catch{return null}}async function Jke(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(G9)});return t.ok?await t.text():null}catch{return null}}async function Yke(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(G9)});return t.ok?await t.text():null}catch{return null}}function Xke(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
|
|
1534
|
-
`)}\n`:null}catch{return null}}function Zke(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`log`,`--oneline`,`-50`],G6({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Qke(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],G6({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function K9(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function $ke(){return{nodeVersion:process.version,platform:le(),arch:ae()}}function eAe(){return process.env.OTEL_SDK_DISABLED===`false`}function q9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function J9(e){if(!g(e))return{};let t;try{t=(0,rn.parse)(S(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!q9(t))return{};let n=t.telemetry;if(!q9(n))return{};let r=n.localSink;return q9(r)?r:{}}function Y9(e){return typeof e==`boolean`?e:void 0}function tAe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function X9(e){if(q9(e))return tAe(e.maxBytes)}function nAe(e){let t=J9(BQ(`project`,e)),n=J9(BQ(`project-local`,e));return{enabled:Y9(n.enabled)??Y9(t.enabled)??!0,spansMaxBytes:X9(n.spans)??X9(t.spans)??52428800,logsMaxBytes:X9(n.logs)??X9(t.logs)??26214400}}function rAe(e){return Ne(`sha256`).update(e).digest(`hex`)}function iAe(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const aAe=[`"doc.name"`,`"docName"`];function oAe(e){let t=S(e,`utf-8`),n=0;for(let e of aAe){let r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length)}return n}function Z9(e,t){if(!g(e))return!1;try{return v(M(t),{recursive:!0}),e.endsWith(`.ips`)?re(t,w7(S(e,`utf-8`))):m(e,t),!0}catch{return!1}}function Q9(e){let t=[],n=e=>{let r=w(e,{withFileTypes:!0});for(let i of r){let r=N(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const sAe=new Set([`.jsonl`]);function cAe(e){let t=e.lastIndexOf(`.`);return t!==-1&&sAe.has(e.slice(t))}const lAe=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function uAe(e){if(F9(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&lAe.has(e.slice(t))}function dAe(e){let t=[];for(let n of Q9(e)){let r=$9(e,n);if(!uAe(r))continue;let{redacted:i,patterns:a,lineCount:o}=TB(S(n,`utf-8`));a.length!==0&&(re(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function $9(e,t){return ye(e,t).split(xe).join(`/`)}async function fAe(e){let t=be(e.contentDir),n=be(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??qke,a=r.fetchAgentEffects??Jke,o=r.fetchWatcherRecent??Yke,s=r.readShadowHead??Zke,c=r.readCheckpointRefs??Qke,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.72.0-beta.
|
|
1534
|
+
`)}\n`:null}catch{return null}}function Zke(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`log`,`--oneline`,`-50`],G6({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Qke(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],G6({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function K9(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function $ke(){return{nodeVersion:process.version,platform:le(),arch:ae()}}function eAe(){return process.env.OTEL_SDK_DISABLED===`false`}function q9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function J9(e){if(!g(e))return{};let t;try{t=(0,rn.parse)(S(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!q9(t))return{};let n=t.telemetry;if(!q9(n))return{};let r=n.localSink;return q9(r)?r:{}}function Y9(e){return typeof e==`boolean`?e:void 0}function tAe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function X9(e){if(q9(e))return tAe(e.maxBytes)}function nAe(e){let t=J9(BQ(`project`,e)),n=J9(BQ(`project-local`,e));return{enabled:Y9(n.enabled)??Y9(t.enabled)??!0,spansMaxBytes:X9(n.spans)??X9(t.spans)??52428800,logsMaxBytes:X9(n.logs)??X9(t.logs)??26214400}}function rAe(e){return Ne(`sha256`).update(e).digest(`hex`)}function iAe(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const aAe=[`"doc.name"`,`"docName"`];function oAe(e){let t=S(e,`utf-8`),n=0;for(let e of aAe){let r=t.indexOf(e);for(;r!==-1;)n++,r=t.indexOf(e,r+e.length)}return n}function Z9(e,t){if(!g(e))return!1;try{return v(M(t),{recursive:!0}),e.endsWith(`.ips`)?re(t,w7(S(e,`utf-8`))):m(e,t),!0}catch{return!1}}function Q9(e){let t=[],n=e=>{let r=w(e,{withFileTypes:!0});for(let i of r){let r=N(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const sAe=new Set([`.jsonl`]);function cAe(e){let t=e.lastIndexOf(`.`);return t!==-1&&sAe.has(e.slice(t))}const lAe=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function uAe(e){if(F9(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&lAe.has(e.slice(t))}function dAe(e){let t=[];for(let n of Q9(e)){let r=$9(e,n);if(!uAe(r))continue;let{redacted:i,patterns:a,lineCount:o}=TB(S(n,`utf-8`));a.length!==0&&(re(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function $9(e,t){return ye(e,t).split(xe).join(`/`)}async function fAe(e){let t=be(e.contentDir),n=be(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??qke,a=r.fetchAgentEffects??Jke,o=r.fetchWatcherRecent??Yke,s=r.readShadowHead??Zke,c=r.readCheckpointRefs??Qke,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.72.0-beta.4`),d=r.readDesktopEnv??K9,f=r.readLanguage??O9,p=r.readRuntime??$ke,h=r.isOtlpPushEnabled??eAe,_=y(N(A(),`ok-bundle-`));try{v(N(_,`telemetry`),{recursive:!0}),v(N(_,`logs`),{recursive:!0}),v(N(_,`state`),{recursive:!0}),Z9(Vke(n),N(_,`telemetry`,z9)),Z9(Hke(n),N(_,`telemetry`,B9)),Z9(Uke(n),N(_,`logs`,V9)),Z9(Wke(n),N(_,`logs`,H9));for(let t of e.userLogFiles??[])Z9(t,N(_,`logs`,me(t)));for(let t of e.userStateFiles??[])Z9(t,N(_,rR,me(t)));let y=0;for(let t of e.diagnosticReports?.files??[])Z9(t,N(_,`diagnostic-reports`,me(t)))&&(y+=1);let b=N(n,`.ok`,`local`),x=N(b,`server.lock`),C=`not-running`,w=`no server.lock`,T=null;if(g(x)){Z9(x,N(_,`state`,`server.lock`));try{let e=S(x,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?T=t.port:w=`lock present but no port`}catch{w=`lock present but unparseable`}}if(T!==null){let e=await i(T);e===null?w=`agent-presence endpoint at :${T} unreachable`:(re(N(_,`state`,`agent-presence.json`),e),C=`running`,w=``);let t=await a(T);t!==null&&re(N(_,`state`,`agent-effects.json`),t);let n=await o(T);if(n!==null){let e=Xke(n);e!==null&&re(N(_,`state`,`watcher-recent.jsonl`),e)}}let E=s(t);E!==null&&re(N(_,`state`,`shadow-head.txt`),E);let D=c(t);D!==null&&re(N(_,`state`,`checkpoint-refs.txt`),D),Z9(Gke(n),N(_,`state`,U9)),Z9(Kke(n),N(_,`state`,W9)),Z9(N(b,`last-spawn-error.log`),N(_,`state`,`last-spawn-error.log`)),Z9(N(b,Iu),N(_,`state`,Iu)),Z9(N(b,Lu),N(_,`state`,Lu));let ee=p(),ne=d(),ie=f(),ae={ok:{version:u(),nodeVersion:ee.nodeVersion,platform:ee.platform,arch:ee.arch},host:{desktop:ne,language:ie}};re(N(_,`state`,`runtime.json`),`${JSON.stringify(ae,null,2)}\n`);let oe=C===`running`?`running
|
|
1535
1535
|
`:`not-running (${w})\n`;re(N(_,`state`,`server-status.txt`),oe);let se=e.diagnosticReports===void 0?`not-collected (no collection attempted)`:C7(e.diagnosticReports,y);if(re(N(_,`state`,`diagnostic-reports-status.txt`),`${se}\n`),e.processDir&&g(e.processDir)){let t=N(_,`process`);v(t,{recursive:!0}),m(e.processDir,t,{recursive:!0})}let k=e.redact===!0;k&&Bke({stagingDir:_,contentDir:t}),e.note&&re(N(_,`note.txt`),e.note);let ce=null;e.scrubSecrets===!0&&(ce=dAe(_));for(let t of e.extraFiles??[])Z9(t.sourcePath,N(_,`extra`,t.zipName??me(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let le=nAe(n),ue=Q9(_),A=[],j=0,de=0;for(let e of ue){let t=$9(_,e),n=te(e).size,r=cAe(t)?iAe(e):0;A.push({path:t,bytes:n,lines:r}),j+=n,(t.startsWith(`telemetry/`)||t.startsWith(`logs/`))&&(de+=oAe(e))}let fe={applied:k};ce!==null&&(fe.secretScrub=ce);let pe={schemaVersion:2,createdAt:l().toISOString(),ok:{version:u(),nodeVersion:ee.nodeVersion,platform:ee.platform,arch:ee.arch},host:{desktop:ne,language:ie},contentDir:{pathSha256:rAe(t),absolutePath:k?`<CONTENT_DIR>`:t},telemetry:{localSink:le,otlpPushEnabled:h()},redaction:fe,serverStatus:C,files:A};re(N(_,`manifest.json`),`${JSON.stringify(pe,null,2)}\n`);let M=ue.some(e=>{try{return S(e,`utf-8`).includes(t)}catch{return!1}}),he={stagedDiagnosticReports:y,totalBytes:j,fileCount:A.length,docNameCount:de,contentDirVisible:M,redacted:k},ge=!1;return{stagingDir:_,manifest:pe,summary:he,cleanup:()=>{ge||(ge=!0,O(_,{recursive:!0,force:!0}))}}}catch(e){throw O(_,{recursive:!0,force:!0}),e}}async function pAe(e){let{collected:t,outputPath:n}=e,r=M(n);if(!g(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new kSe.ZipFile,a=Q9(t.stagingDir);for(let e of a){let n=$9(t.stagingDir,e);i.addFile(e,n)}i.end();let o=h(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function mAe(e,t){let n=N(e,`.ok`,`config.yml`);if(g(n))try{let t=(0,rn.parse)(S(n,`utf-8`)),r=q8(t)?t.content:void 0,i=q8(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return be(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return be(e)}async function hAe(e,t,n,r,i){let a=E7(t,e.logger),o=await fAe({contentDir:mAe(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...TOe(a,e.userLogsDir??N(k(),`.ok`,`logs`)),...O7(e.cachesDir??N(k(),`Library`,`Caches`))],userStateFiles:k7(e.bugReportsDir??T7()),diagnosticReports:i,deps:{readDesktopEnv:n,readLanguage:r,logger:e.logger}});try{v(M(e.outputPath),{recursive:!0}),await pAe({collected:o,outputPath:e.outputPath});let t=o.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:a,files:o.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:o.manifest.createdAt}}}finally{o.cleanup()}}async function gAe(e){let{projectDir:t}=e,n=e.readDesktopEnv??K9,r=e.readLanguage??O9,i=()=>xOe(e.diagnosticReportsDir??N(k(),`Library`,`Logs`,`DiagnosticReports`),new Date);if(e.level===`full`&&t!==void 0)return hAe(e,t,n,r,i());let{zipPath:a,summary:o}=await AOe({projectDir:t,redact:e.redact,revealDocNames:e.level===`full`,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:O7(e.cachesDir??N(k(),`Library`,`Caches`)),bugReportLedgerFiles:k7(e.bugReportsDir??T7()),diagnosticReports:e.level===`full`?i():void 0,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n(),language:r()});return{zipPath:a,summary:{level:e.level,systemWide:t===void 0,projectSlug:o.projectSlug,files:o.files,redactions:o.redactions,redactedLineCount:o.redactedLineCount,generatedAt:o.generatedAt}}}export{e5 as ALL_EDITOR_IDS,t5 as EDITOR_LABELS,j5 as EDITOR_TARGETS,VEe as HOSTS_WITH_USER_SKILL_DIR,sOe as LAUNCH_CONFIG_NAME,yke as PATH_SHIM_BEGIN,xke as PATH_SHIM_BLOCK_RE,bke as PATH_SHIM_END,zDe as addOkPathsToGitExclude,R5 as assertProjectPathSafe,p5 as buildManagedServerEntry,lke as buildMcpConfigDeclineEvent,uke as buildMcpConfigMigrateEvent,b7 as classifyExistingMcpEntry,gAe as collectReportBundle,Eke as createCliProbeResolver,cn as createTokenStore,SOe as defaultBugReportZipPath,We as detectGh,qe as detectGhAccounts,dOe as detectInstalledEditors,S5 as droppedManagedKeys,cDe as editorConfigPathDisplay,sDe as editorEntryLocator,QOe as ensurePiBridge,Q5 as formatTrackedRemediation,HDe as getExcludedOkPaths,X5 as getInstalledSkillProjectionPaths,BEe as getNativeTomlMcpEditor,Y5 as getOkArtifactPaths,d5 as isEntryUpToDate,m5 as isOwnManagedEntry,gke as loadConfig,vee as makeLazyProbeTokenStore,T7 as okBugReportsDir,b9 as parseGitHubBlobUrl,_ke as parseGitHubShareUrl,x9 as parseGitHubTreeUrl,y9 as parseGitUrl,Ske as pathInstallMarkerPath,CDe as previewContent,fOe as probeOwnManagedEditorMcpEntry,XOe as probePiBridgeState,Z5 as probeTrackedOkPaths,v7 as readExistingMcpEntry,VDe as readSharingMode,TB as redactContent,BDe as removeOkPathsFromGitExclude,ake as removeOwnMcpEntry,FDe as removeProjectSkill,Oke as removeUserGlobalSkillBundle,Pke as removeUserSkill,kDe as resolveProjectRoot,pke as runStop,h9 as truncatePriorEntry,E9 as userGlobalSkillBundleTargets,Nke as userSkillPresentAnywhere,vke as validateLocalFolderForShare,_7 as writeEditorMcpConfig,jke as writeProjectAiIntegrations,W5 as writeProjectSkill,uOe as writeUserMcpConfigs,Mke as writeUserSkill};
|
|
1536
1536
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dist-B7NFh0MZ.mjs";import{_ as e}from"./init-R__-FL-k.mjs";export{e as runInit};
|