@inkeep/open-knowledge 0.76.0-beta.2 → 0.76.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +6 -6
- package/dist/constants-B6lHSTE5.mjs +1 -0
- package/dist/{dist-D-tZrAhg.mjs → dist-Cao3SE0M.mjs} +2 -2
- package/dist/{dist-Do11N7Tz.mjs → dist-CmcNpgS2.mjs} +1 -1
- package/dist/index.mjs +2 -2
- package/dist/init-CckAh5J1.mjs +1 -0
- package/dist/{init-DYFDc_AM.mjs → init-S1_zVNWd.mjs} +2 -2
- package/dist/{launch-json-removal-GEBAvUYG.mjs → launch-json-removal-BZJclmVp.mjs} +1 -1
- package/dist/loader-BzS64wOt.mjs +1 -0
- package/dist/{loader-BL3dafAq.mjs → loader-ymIF6hGV.mjs} +1 -1
- package/dist/{md-manager-BGnqyqi1-RVTa3VvL.mjs → md-manager-BGnqyqi1-BZhj8566.mjs} +1 -1
- package/dist/{open-browser-DXg92RYa.mjs → open-browser-BOsYkMjA.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-BwExCg0_.mjs +1 -0
- package/dist/{preview-CKQSX1fz.mjs → preview-DjofmF_T.mjs} +1 -1
- package/dist/public/assets/{ActivityModeContent-sEWbUM2h.js → ActivityModeContent-Y8gSWVUE.js} +1 -1
- package/dist/public/assets/AddPropertiesButton-C-4pht4k.js +2 -0
- package/dist/public/assets/{AgentDiffPane-CJt6NegL.js → AgentDiffPane-xNIBUX9b.js} +1 -1
- package/dist/public/assets/{AgentIconCluster-Bfnw1qcQ.js → AgentIconCluster-BjhMMJvg.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-CIEni8Z-.js → AgentThreadClientBinder-9BUeCC2i.js} +1 -1
- package/dist/public/assets/{BugReportHistory-y8Wn379B.js → BugReportHistory-DRk2wfmX.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-Dgz75O0I.js → BugReportHistoryDialog-BRt_mvxb.js} +1 -1
- package/dist/public/assets/CodeMirrorPropInput-BmJVd5ie.js +3 -0
- package/dist/public/assets/{ConsentDialogBody-DtLolAtJ.js → ConsentDialogBody-LH1oK-K1.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-BSyhNpcd.js → DiffViewBoundary-CHGMiI3o.js} +1 -1
- package/dist/public/assets/DocumentContext-3tSfyT4u.js +39 -0
- package/dist/public/assets/{EditorModeToggle-BTeNrSSH.js → EditorModeToggle-vCyHuxcP.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-CrIPAXpZ.js → EnableSyncConfirmDialog-BVl1rWxR.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-BELOgESV.js → ExcalidrawDocEditor-BRLL2l_F.js} +1 -1
- package/dist/public/assets/FeedbackForm-C2iTmSw9.js +1 -0
- package/dist/public/assets/{GraphPanel-BGy5jVGr.js → GraphPanel-7OJGN-lc.js} +2 -2
- package/dist/public/assets/{ImageAttachments-qWX-htol.js → ImageAttachments-NcjC3Vh7.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-CSX58ht8.js → ImportSkillDialog-MLKooPR_.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-Dkws9z0m.js → LintConfigEditor-8nbzftWe.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-3kFpzDB_.js → ManagedArtifactProperties-DSK_y6l8.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DnN54IwH.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-uSFJFk-Q.js → MermaidDocEditor-VvK21kJ7.js} +1 -1
- package/dist/public/assets/{OpenInAgentMenuItem-yTb5ScY1.js → OpenInAgentMenuItem-BOkiSyJj.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-BMw5KnKz.js → PropertyDisplayRow--Arw18Ls.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-CpYJv3Cv.js → RegisteredAgentIcon-wza-YtV5.js} +1 -1
- package/dist/public/assets/{ReportBugDialogBody-BnvYXojE.js → ReportBugDialogBody-DzspPXQX.js} +2 -2
- package/dist/public/assets/{ReportBugMenuTrigger-I8HBt3IX.js → ReportBugMenuTrigger-lEPMbjE8.js} +2 -2
- package/dist/public/assets/{SchemaConfigEditor-C0O1YHLZ.js → SchemaConfigEditor-CB0ciOXE.js} +1 -1
- package/dist/public/assets/{SessionsHost-BFLSEjDn.js → SessionsHost-B_HqzNv8.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-C5hX7NBY.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-BZJDp5FQ.js → ShareBranchSwitchDialog-Cf-6mqfV.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-BfhbLBaC.js → ShareReceiveDialog-BhARlQ5y.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-CMC3ICe-.js → ShareReceiveMissDialog-5SsxwO0Y.js} +1 -1
- package/dist/public/assets/{SkillCostValue-YxVPmSYK.js → SkillCostValue-yjmq3zbE.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-DsoGh7Tv.js → SkillEditBanner-Dm70GN3t.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-BVSBVDf3.js → SkillForkDialog-C11FyNmp.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-DW4e-S7w.js → SkillInstallMenu-B6dyzecr.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-C4sCVeyL.js → SkillOriginInline-DE7ODwX7.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DlGFhm-i.js → SkillToolbarControls-BKBcDvQr.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-Bdcz7tkM.js → SlidesToolbarControls-DFQKJb27.js} +1 -1
- package/dist/public/assets/{SourceEditor-dlV7KOrj.js → SourceEditor-CZlo1guK.js} +1 -1
- package/dist/public/assets/{TerminalPanel-BVYvbm3j.js → TerminalPanel-DJScfB1V.js} +3 -3
- package/dist/public/assets/{TerminalWindowApp-vm-X0E3X.js → TerminalWindowApp-DIOkTapK.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CtJNgvoq.js → TextDocEditor-Bx7g-d1v.js} +1 -1
- package/dist/public/assets/{ThreadView-DEcTVFTW.js → ThreadView-C0W2YcdF.js} +4 -4
- package/dist/public/assets/{TimelineDiffPane-C3TJ75M_.js → TimelineDiffPane-DUAuqacD.js} +1 -1
- package/dist/public/assets/{agent-connection-status-PHc1Zzq8.js → agent-connection-status-GVtpWcVR.js} +1 -1
- package/dist/public/assets/auth-state-cache-DRtxi4oE.js +11 -0
- package/dist/public/assets/{bug-report-send-manager-CIwCFBmr.js → bug-report-send-manager-nPQrCST0.js} +1 -1
- package/dist/public/assets/client-version-CtIheFYi.js +1 -0
- package/dist/public/assets/{comment-chips-B5qzry8g.js → comment-chips-BLtdWJnE.js} +1 -1
- package/dist/public/assets/{config-provider-C0MBq3LM.js → config-provider-BMsi12sY.js} +2 -2
- package/dist/public/assets/{css-color-to-hex-B3FQXagN.js → css-color-to-hex-SSX32gXw.js} +1 -1
- package/dist/public/assets/{dist-PxGOwAUj.js → dist-868Gd8gd.js} +97 -97
- package/dist/public/assets/{doc-paths-DPXJQXNY.js → doc-paths-ZgPMU9hv.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-DxsHGwsi.js → doc-undo-manager-BPMtEL01.js} +1 -1
- package/dist/public/assets/{documents-events-B96TBXRu.js → documents-events-DyVmV0Qo.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-DEUi21g-.js → file-tree-adapter-gYa-13I5.js} +1 -1
- package/dist/public/assets/{file-tree-utils-2ZD5gFbM.js → file-tree-utils-Cz4iVcHq.js} +1 -1
- package/dist/public/assets/{folder-config-api-BuejvyCq.js → folder-config-api-CL7I86xK.js} +1 -1
- package/dist/public/assets/{index-D9OhJE5u.js → index-PC05Sa-p.js} +15 -15
- package/dist/public/assets/{lint-config-client-BPntTg9s.js → lint-config-client-DkLK3D4G.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-DvzDPV1j.js → markdownlint-rule-browser-D9Z_1KbZ.js} +1 -1
- package/dist/public/assets/messages-BAMdRODV.js +1 -0
- package/dist/public/assets/messages-BAY3MkPp.js +1 -0
- package/dist/public/assets/messages-BDdtHSCo.js +1 -0
- package/dist/public/assets/messages-BEF3wxiG.js +1 -0
- package/dist/public/assets/messages-BT0aZGab.js +1 -0
- package/dist/public/assets/messages-BmlevpVU.js +1 -0
- package/dist/public/assets/messages-CR-7ufDn.js +1 -0
- package/dist/public/assets/messages-CYKphHSL.js +1 -0
- package/dist/public/assets/messages-DiEzyUul.js +1 -0
- package/dist/public/assets/messages-gadlKE8F.js +1 -0
- package/dist/public/assets/messages-phBEtaqq.js +1 -0
- package/dist/public/assets/messages-q0qKAdXk.js +1 -0
- package/dist/public/assets/navigation-targets-Dz7Mj6yW.js +1 -0
- package/dist/public/assets/{page-list-cache-CvgJb27U.js → page-list-cache-CLQGWEib.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-CI_hCxBY.js → pending-receive-nav-store-aX0-Bi4Q.js} +1 -1
- package/dist/public/assets/{progress-BF784yhL.js → progress-BCKVnfXK.js} +5 -5
- package/dist/public/assets/{project-paths-DWu_AV-Y.js → project-paths-BXwPEPQG.js} +1 -1
- package/dist/public/assets/{prop-types-3AkeLtyh.js → prop-types-xcUPxUpJ.js} +1 -1
- package/dist/public/assets/{receive-store-Bc_vQgvG.js → receive-store-C_l3XIQE.js} +1 -1
- package/dist/public/assets/{selection-context-D1XXdKYq.js → selection-context-FjhkYfiH.js} +1 -1
- package/dist/public/assets/{skill-scope-B8EYySZH.js → skill-scope-BUi8busH.js} +1 -1
- package/dist/public/assets/{skills-api-CEPYeJT3.js → skills-api-Cx2rJHH9.js} +1 -1
- package/dist/public/assets/{src-CZud-6kC.js → src-D4vpD-On.js} +1 -1
- package/dist/public/assets/{startup-marks-DvV0-HSR.js → startup-marks-C-4hCO0g.js} +1 -1
- package/dist/public/assets/{tag-pill-input-OXRPOwTz.js → tag-pill-input-nlqSiq7s.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BM5W4Xq4.js → target-navigation-intent-B26HXIhC.js} +1 -1
- package/dist/public/assets/{telemetry-impl-D_RVw4yU.js → telemetry-impl-necIgQyy.js} +1 -1
- package/dist/public/assets/{telemetry-startup-Ska2GwWw.js → telemetry-startup-B2Y0fFTN.js} +1 -1
- package/dist/public/assets/{terminal-cli-display-BFx4Fujy.js → terminal-cli-display-OF8nDzxb.js} +1 -1
- package/dist/public/assets/{terminal-command-events-qIdVZXUJ.js → terminal-command-events-DQbD5--h.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-BG3QjK-a.js → terminal-launch-events-BI8c6JIE.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-Ckc3_myT.js → terminal-telemetry-BiZK7c9d.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BDkwn93x.js → typing-burst-detector-BeiThJwr.js} +4 -4
- package/dist/public/assets/{uninstall-DidFl7EF.js → uninstall-DxE_1wQZ.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BkGfVF3o.js → use-activity-panel-2YPwXTEA.js} +1 -1
- package/dist/public/assets/{use-apply-config-language-B7_mA2hk.js → use-apply-config-language-DmbZDqgv.js} +2 -2
- package/dist/public/assets/{use-collab-url-BcwQXkF9.js → use-collab-url-Bm6gv2VZ.js} +1 -1
- package/dist/public/assets/{use-conflicts-BLsv7YlL.js → use-conflicts-D-6loWer.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-Co4zj3Am.js → use-live-xterm-theme-BSNONOSQ.js} +1 -1
- package/dist/public/assets/{use-open-skill-BeSy8-rJ.js → use-open-skill-BtF9wYOl.js} +1 -1
- package/dist/public/assets/{use-settings-route-sC35wz8H.js → use-settings-route-Dmjvvjxd.js} +1 -1
- package/dist/public/assets/{use-skill-origin-fangpBrR.js → use-skill-origin-BJ_uQdjo.js} +1 -1
- package/dist/public/assets/{use-skills-BFl3ykEt.js → use-skills-CpkfrpBl.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BmCX_MX_.js → use-terminal-enabled-_bz1Qovt.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-UEnUD4Is.js +5 -0
- package/dist/public/assets/{use-workspace-DfO_Xv1Y.js → use-workspace-uVXshHxD.js} +1 -1
- package/dist/public/index.html +55 -55
- package/dist/public/uninstall.html +4 -4
- package/dist/{registry-probes-CZq0pq3Q.mjs → registry-probes-B2IFFMYL.mjs} +1 -1
- package/dist/{removal-file-path-CIezznPj.mjs → removal-file-path-CejMmhKV.mjs} +1 -1
- package/dist/{repair-launch-json-YORXWt3i.mjs → repair-launch-json-Bv7xuyT_.mjs} +1 -1
- package/dist/{repair-mcp-configs-Cvj1Kmvc.mjs → repair-mcp-configs-Dd_927pD.mjs} +1 -1
- package/dist/src-BZWC5BVN.mjs +1 -0
- package/dist/{src-Cl2uWN9c.mjs → src-CQfRqvyR.mjs} +1 -1
- package/dist/start-BBg9UyEM.mjs +1 -0
- package/dist/{start-CiIEKnLx.mjs → start-BMSoymGY.mjs} +3 -3
- package/package.json +5 -5
- package/dist/constants-BzdeY7dd.mjs +0 -1
- package/dist/init-BOK2A-mx.mjs +0 -1
- package/dist/loader-D3o22fPd.mjs +0 -1
- package/dist/preview-cSKF3GU4.mjs +0 -1
- package/dist/public/assets/AddPropertiesButton-DM-ePjNt.js +0 -2
- package/dist/public/assets/CodeMirrorPropInput-BJoiebyC.js +0 -3
- package/dist/public/assets/DocumentContext-CIEyfEzg.js +0 -39
- package/dist/public/assets/FeedbackForm-CRiaQgic.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DkvvCLki.js +0 -1
- package/dist/public/assets/SettingsDialogBody-iQz3nDWh.js +0 -12
- package/dist/public/assets/auth-state-cache-Bu3ElpXQ.js +0 -11
- package/dist/public/assets/client-version-BZyuYcjM.js +0 -1
- package/dist/public/assets/messages-A4_1oeLq.js +0 -1
- package/dist/public/assets/messages-B-GuOMHc.js +0 -1
- package/dist/public/assets/messages-B1vm3zWw.js +0 -1
- package/dist/public/assets/messages-BGrs212S.js +0 -1
- package/dist/public/assets/messages-BQ4IdAtB.js +0 -1
- package/dist/public/assets/messages-CRlJEY5h.js +0 -1
- package/dist/public/assets/messages-CbDvYKBi.js +0 -1
- package/dist/public/assets/messages-CryJhJWd.js +0 -1
- package/dist/public/assets/messages-CwpyOYl3.js +0 -1
- package/dist/public/assets/messages-DGusA3qN.js +0 -1
- package/dist/public/assets/messages-Di2gj9bu.js +0 -1
- package/dist/public/assets/messages-l1QmC8Hw.js +0 -1
- package/dist/public/assets/navigation-targets-CqBARqd5.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-k3vq-Xn1.js +0 -5
- package/dist/src-G670cEwT.mjs +0 -1
- package/dist/start-Hhs84znx.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Bt as e,Fa as t,Iu as n,Mo as r,Pl as i,Ps as a,Sn as o,Wo as s,Yl as c,Yn as l,_n as u}from"./md-manager-BGnqyqi1-RVTa3VvL.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,Ar as x,At as S,B as C,Ba as w,Bi as T,Bn as E,Bo as D,Br as O,Bt as k,C as A,Ca as j,Ci as M,Cn as N,Cr as P,Ct as F,D as I,Da as L,Di as R,Dn as z,Dr as B,Dt as V,E as H,Ea as U,Ei as W,En as G,Er as K,Et as q,F as J,Fa as Y,Fi as X,Fn as Z,Fo as Q,Fr as $,Ft as ee,G as te,Ga as ne,Gi as re,Gn as ie,Go 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,Jo as Ee,Jr as De,Jt as Oe,K as ke,Ka as Ae,Ki as je,Kn as Me,Ko as Ne,Kr as Pe,Kt as Fe,L as Ie,La as Le,Li as Re,Ln as ze,Lr as Be,Lt as Ve,M as He,Ma as Ue,Mi as We,Mn as Ge,Mr as Ke,Mt as qe,N as Je,Na as Ye,Ni as Xe,Nn as Ze,Nr as Qe,Nt as $e,O as et,Oa as tt,Oi as nt,On as rt,Or as it,Ot as at,P as ot,Pa as st,Pi as ct,Pn as lt,Pr as ut,Pt as dt,Q as ft,Qa as pt,Qi as mt,Qn as ht,Qr as gt,Qt as _t,R as vt,Ra as yt,Ri as bt,Rn 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,Wo as en,Wr as tn,Wt as nn,X as rn,Xa as an,Xi as on,Xn as sn,Xr as cn,Xt as ln,Y as un,Ya as dn,Yi as fn,Yn as pn,Yr as mn,Yt as hn,Z as gn,Za as _n,Zi as vn,Zn as yn,Zr as bn,Zt as xn,_ as Sn,_a as Cn,_i as wn,_n as Tn,_r as En,_t as Dn,a as On,aa as kn,ai as An,an as jn,ao as Mn,ar as Nn,at as Pn,b as Fn,ba as In,bi as Ln,bn as Rn,br as zn,bt as Bn,c as Vn,ca as Hn,ci as Un,cn as Wn,co as Gn,cr as Kn,ct as qn,d as Jn,da as Yn,di as Xn,dn as Zn,do as Qn,dr as $n,dt as er,ea as tr,ei as nr,en as rr,eo as ir,er as ar,et as or,f as sr,fa as cr,fi as lr,fn as ur,fr as dr,ft as fr,g as pr,ga as mr,gi as hr,gn as gr,gr as _r,gt as vr,h as yr,ha as br,hi as xr,hn as Sr,hr as Cr,ht as wr,i as Tr,ia as Er,ii as Dr,in as Or,io as kr,ir as Ar,it as jr,j as Mr,ja as Nr,ji as Pr,jn as Fr,jr as Ir,jt as Lr,k as Rr,ka as zr,ki as Br,kn as Vr,kr as Hr,kt as Ur,l as Wr,la as Gr,li as Kr,ln as qr,lo as Jr,lr as Yr,lt as Xr,m as Zr,ma as Qr,mi as $r,mn as ei,mr as ti,mt as ni,n as ri,na as ii,ni as ai,nn as oi,no as si,nr as ci,nt as li,o as ui,oa as di,oi as fi,on as pi,oo as mi,or as hi,ot as gi,p as _i,pa as vi,pi as yi,pn as bi,pr as xi,pt as Si,q as Ci,qa as wi,qi as Ti,qn as Ei,qo as Di,qr as Oi,qt as ki,r as Ai,ra as ji,ri as Mi,rn as Ni,ro as Pi,rr as Fi,rt as Ii,s as Li,sa as Ri,si as zi,sn as Bi,so as Vi,sr as Hi,st as Ui,t as Wi,ta as Gi,ti as Ki,tn as qi,to as Ji,tr as Yi,tt as Xi,u as Zi,ua as Qi,ui as $i,un as ea,uo as ta,ur as na,ut as ra,v as ia,va as aa,vi as oa,vn as sa,vr as ca,vt as la,w as ua,wa as da,wi as fa,wn as pa,wr as ma,wt as ha,x as ga,xa as _a,xi as va,xn as ya,xr as ba,xt as xa,y as Sa,ya as Ca,yi as wa,yn as Ta,yr as Ea,yt as Da,z as Oa,za as ka,zi as Aa,zn as ja,zr as Ma,zt as Na}from"./dist-D-tZrAhg.mjs";export{Wi as AGENT_ID_MAX_LEN,ri as AGENT_ID_RE,Ai as AGENT_WRITE_ORIGIN,Tr as AcpPermissionStore,On as AcpRegistry,ui as AcpThreadManager,Li as AgentFocusBroadcaster,Vn as AgentPresenceBroadcaster,Wr as AgentSessionCapacityError,Zi as AgentSessionManager,Jn as AutoStartDisabledError,sr as BUNDLE_IDS,_i as BUNDLE_SCOPE,Zr as BUNDLE_SKILL_NAME,yr as BacklinkIndex,pr as CC1Broadcaster,i as CC1_CONTRACT_VERSION,Sn as CONCURRENT_REPLACE_WINDOW_MS,ia as CONFIG_FILENAME,Sa as CONFLICT_MARKER_RE,Fn as CURSOR_BUNDLE_PATHS_BY_PLATFORM,ga as ConfigSchema,wt as ConflictAuthority,A as DEFAULT_CHECKPOINT_RETENTION,ua as DEFAULT_EMBEDDINGS_DIMENSIONS,At as DEFAULT_PACK_ID,H as DocumentDurabilityState,I as DocumentDurabilityStateError,et as EMBEDDINGS_API_KEY_ENV,Rr as EPHEMERAL_PROJECT_DIR_PREFIX,_ as ExposureConsentError,Mr as FEATURED_AGENT_IDS,He as FILE_SYSTEM_WRITER,Je as FILE_WATCHER_ORIGIN,ot as FileEmbeddingsBackend,J as GIT_PREFLIGHT_FAIL_SPAN_NAME,he as GIT_UPSTREAM_WRITER,Q as GitDirAccessError,Ie as GitNotAvailableError,vt as GitTooOldError,Oa as HOCUSPOCUS_AUTH_REJECTION_REASONS,C as HocuspocusAuthRejection,Ut as HocuspocusAuthTokenSchema,ce as HomeProjectRootError,It as INSTALLED_AGENTS_SCHEMES,Xt as JSON_SCHEMA_DIALECT_2020_12,e as LINEAGE_EPOCH_KEY,te as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ke as MANAGED_RENAME_ORIGIN,Ci as MAX_ACP_THREADS,Se as MAX_AGENT_SESSIONS,un as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,rn as MIN_EVICTABLE_IDLE_MS,gn as MIN_GIT_VERSION,ft as MISSING_OK_CONFIG_MESSAGE,ye as MalformedGitPointerError,d as McpLogger,or as MissingOkConfigError,Xi as OBSERVER_SYNC_ORIGIN,li as OK_OKIGNORE_TEMPLATE,Ii as ONBOARDING_BUNDLE_IDS,u as ORPHAN_MODES,o as PROTOCOL_VERSION,D as PinoLogger,jr as ProcessLockCollisionError,Pn as ProjectGitInitError,gi as ROLLBACK_ORIGIN,Ui as ROOT_GITIGNORE_TEMPLATE,qn as RUNTIME_VERSION,Xr as SERVICE_WRITER,ra as SKILL_INSTALL_EVENTS_FILE_REL,l as SKILL_STATE_TARGETS,er as STARTER_FOLDER_FRONTMATTER_FILENAME,fr as STARTER_PACKS,Si as STARTER_PACK_IDS,ni as STATE_MANIFEST_FILENAME,wr as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,vr as SeedPrerequisiteError,Dn as SeedRootDirError,la as ServerLockCollisionError,Da as SingleFileNotAFileError,Bn as SingleFileNotFoundError,xa as SingleFileNotMarkdownError,kt as SingleFileProjectOverrideError,F as StateManifestError,ha as TagIndex,Ft as USER_GLOBAL_BUNDLE_IDS,q as __getShowAllWalkStatsForTesting,V as __resetShowAllWalkStatsForTesting,at as acquireProcessLock,Ur as acquireServerLock,S as applyAgentMarkdownWrite,Lr as applyExternalChange,qe as applySeed,$e as assertCompatibleStateManifest,dt as assertGitAvailable,ee as assertNeverDiskEvent,xe as assertNotHomeProjectRoot,Ve as attachAcpThreadSocket,Ct as attachCollabClientCounter,Na as attachIdleShutdown,k as bindConflictAuthority,Yt as bootServer,me as buildAndOpenSkill,Ht as buildConfigYmlContent,nn as buildExecResult,se as buildIngressPolicy,Fe as buildOkMcpStdioCommand,ki as buildSkillZip,Oe as buildStarterFolderFrontmatterYaml,hn as buildWipTree,ln as bundleSkillMdPath,xn as canonicalProjectKey,_t as canonicalizeForCompare,g as classifyEvents,rr as classifyFsPath,qi as clearAllEmbeddingsKeys,oi as coercePackId,Ni as collectServerHostSnapshot,t as colorFromSeed,Or as commitUpstreamImport,jn as commitWip,pi as commitWipFromTree,Bi as compareSemver,Wn as composeEffectiveLinterConfig,qr as composeFrontmatterSchemasConfig,ea as containsConflictMarkers,Zn as contentHash,ur as contributorCount,bi as countShadowObjects,ei as countStaleAgentWipRefs,Sr as countWipRefs,gr as createApiExtension,Tn as createAssetServeMiddleware,sa as createCollaborationHost,Ta as createContentFilter,Rn as createContentFilterAsync,ya as createEmbeddingsSecretStore,Dt as createEphemeralProjectDir,N as createExternalChangeHandler,pa as createFileLogger,Nt as createLiveDerivedIndexExtension,G as createMcpHttpHandler,z as createOsProbe,rt as createPersistenceExtension,Vr as createServer,b as createServerObserverExtension,Fr as createServerProbeResolver,Ge as createStreamingErrorWriter,qt as createTestLogger,Ze as describeStoredEmbeddingsKey,lt as detectClaudeDesktopPresence,Z as detectGit,ve as detectProjectShape,ze as detectUserSkillHosts,xt as discoverLockDirs,ja as discoverMarkdownlintConfig,E as emitPreflightFailureSpan,Kt as encodeDocName,de as encodeFolderRoute,zt as encodeSkillRoute,$t as ensureProjectGit,ie as errorResponse,Me as evictStaleTrackerEntries,Ei as extractHeadings,Te as extractOkBinaryPath,pn as extractWikiLinksFromMarkdown,sn as fallbackPaths,yn as findEnclosingGitRoot,ht as findEnclosingProjectRoot,m as findNativeMarkdownlintFile,ar as flushFileLogger,Yi as formatAuditBrokenLinkSuppressionLine,ci as formatAuthRejectionWire,Fi as formatContributorsFrom,Ar as formatPackRationale,Nn as gcCheckpointRefs,hi as getCurrentMcpLogger,Hi as getIngressContext,Kn as getLocalDir,Yr as getLogFilePath,fe as getLogger,na as getLogsDir,$n as getMachineId,dr as getMeter,xi as getMetrics,ti as getTracer,Cr as handleCollabSocketError,_r as handleSpawnCursor,En as hasForwardingHeaders,ca as hasGcLogLatch,r as iconFromClientName,Ea as incrementCollabSocketFilteredError,zn as incrementServerObserverFire,ba as initContent,Ot as initShadowRepo,P as initTelemetry,ma as initToleranceTelemetryWriter,Pt as installJsonSchemaDialect,K as installPrettyZodErrors,Bt as installTestLoggers,B as installUserSkill,it as isAllowedApiOrigin,Hr as isAllowedWorkspaceHostHeader,x as isConfigDoc,Ir as isDocInConflict,Ke as isHocuspocusAuthRejectionReason,Qe as isHomeDir,ut as isHostAdmitted,$ as isKnownPackId,be as isLinkIndexExcludedDoc,Be as isLoopbackAddress,St as isManagedArtifactDoc,Ma as isOriginAdmitted,s as isOrphanMode,O as isPairedWriteOrigin,Jt as isPathWithinDir,pe as isPeerAdmitted,Vt as isProcessAlive,tn as isProjectRoot,oe as isReservedForUserTree,Pe as isSelfWrite,Oi as isSystemDoc,De as isToleranceTelemetryEnabled,mn as isValidLockPid,cn as lastKnownHash,bn as listRescueCheckpoints,gt as listStarterPacks,h as loadCustomAgents,nr as loadPrincipal,Ki as lockAdvertisesUi,ai as lockBaseUrl,Mi as lockFilePath,en as loggerFactory,Dr as loginShapedUserinfoUser,ae as logsCurrentPath,Ne as logsPreviousPath,An as makeLazyEmbeddingsKeyStore,fi as markServerLockDraining,zi as mountMcpAndApi,Un as normalizeFsPath,Kr as observeReadiness,$i as originGitHubHost,Xn as packageVersionMajorMinor,lr as parseAuthRejectionWire,yi as parseGitVersion,$r as parseHocuspocusAuthToken,xr as parseKeepaliveConnectionId,hr as pathToDocName,wn as planSeed,oa as prepareSingleFileOpen,wa as processCommand,Ln as processUsage,va as readAllTargets,Et as readBundleDecision,M as readOwnNativeRules,fa as readProcessLock,Mt as readProcessLockDetailed,W as readProjectHeadState,R as readProjectLocalSemanticConfig,nt as readServerLock,Br as readServerPackageVersion,y as readSkillInstallStateSnapshot,Pr as readStateManifest,We as readTargetRecordedAt,Xe as readTargetVersion,ct as reconcile,X as recordContributor,_e as recordSkillInstallEvent,Re as redactShareSubprocessStderr,bt as registerAllTools,Aa as registerWrite,T as releaseProcessLock,Gt as releaseServerLock,ue as removeLastKnownHash,Rt as removeProjectSkillGitignoreBlock,Qt as reportSkillInstall,re as resetMetrics,je as resolveBuiltinSkillHosts,a as resolveBundleEnabled,Ti as resolveBundledSkillDir,we as resolveContentDir,fn as resolveCursorBinaryDefault,on as resolveCursorSpawnInvocation,vn as resolveEffectiveLinterConfig,mt as resolveEmbeddingsCredential,p as resolveGitHubAccountFromUrl,tr as resolveLockDir,Gi as resolveNativeConfigForDoc,ii as resolveNativeMarkdownlintConfig,ji as resolvePack,Er as resolvePackageVersion,kn as resolveSkillInstallReportSettings,di as resolveUiInfo,Ri as restoreContributors,Hn as rewriteMarkdownLinksForDocumentRename,Gr as rewriteWikiLinksForDocumentRename,Qi as runAuthReposSubprocess,Yn as runAuthStatusSubprocess,cr as runCloneSubprocess,vi as runDeviceFlowSubprocess,Qr as runWithMcpLogger,br as safeContentPath,mr as safeSubdir,Cn as safetyCheckpoint,aa as sameGitHubLogin,Ca as sanitizeClientName,In as saveInMemoryCheckpoint,_a as saveVersion,Tt as scanLockProcesses,j as seedBasenameIndex,da as seedEphemeralProjectDir,jt as serializeError,U as setActiveSpanAttributes,L as setupServerObservers,tt as shadowGit,zr as shutdownTelemetry,Di as spansCurrentPath,Ee as spansPreviousPath,v as spawnDetached,Nr as splitMarkdownBlocks,Ue as startWatcher,Ye as strategiesFor,st as streamingProblemEvent,Y as swapContributors,ge as teardownToleranceTelemetryWriter,Le as toBroadcasterKey,yt as tracedAppendFileSync,ka as tracedLinkSync,w as tracedMkdir,Wt as tracedMkdirSync,le as tracedRename,Lt as tracedRenameSync,Zt as tracedRmSync,ne as tracedRmdirSync,Ae as tracedUnlinkSync,wi as tracedWriteFile,Ce as tracedWriteFileSync,dn as trustSystemCertificates,an as updateLastKnownHash,_n as updateProcessLockPort,pt as updateServerLockPort,f as validateAgentId,ir as validateCloneInputs,Ji as validateSkillZip,si as waitForServerLockDrain,Pi as withHiddenWindowsConsole,kr as withSpan,Mn as withSpanSync,mi as writeBundleDecision,Vi as writeMarkdownlintRule,Gn as writeRootGitignoreForNewRepo,Jr as writeStateManifest,ta as writeTargetVersion,Qn as writeTracker};
|
|
1
|
+
import{Bt as e,Fa as t,Iu as n,Mo as r,Pl as i,Ps as a,Sn as o,Wo as s,Yl as c,Yn as l,_n as u}from"./md-manager-BGnqyqi1-BZhj8566.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,Ar as x,At as S,B as C,Ba as w,Bi as T,Bn as E,Bo as D,Br as O,Bt as k,C as A,Ca as j,Ci as M,Cn as N,Cr as P,Ct as F,D as I,Da as L,Di as R,Dn as z,Dr as B,Dt as V,E as H,Ea as U,Ei as W,En as G,Er as K,Et as q,F as J,Fa as Y,Fi as X,Fn as Z,Fo as Q,Fr as $,Ft as ee,G as te,Ga as ne,Gi as re,Gn as ie,Go 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,Jo as Ee,Jr as De,Jt as Oe,K as ke,Ka as Ae,Ki as je,Kn as Me,Ko as Ne,Kr as Pe,Kt as Fe,L as Ie,La as Le,Li as Re,Ln as ze,Lr as Be,Lt as Ve,M as He,Ma as Ue,Mi as We,Mn as Ge,Mr as Ke,Mt as qe,N as Je,Na as Ye,Ni as Xe,Nn as Ze,Nr as Qe,Nt as $e,O as et,Oa as tt,Oi as nt,On as rt,Or as it,Ot as at,P as ot,Pa as st,Pi as ct,Pn as lt,Pr as ut,Pt as dt,Q as ft,Qa as pt,Qi as mt,Qn as ht,Qr as gt,Qt as _t,R as vt,Ra as yt,Ri as bt,Rn 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,Wo as en,Wr as tn,Wt as nn,X as rn,Xa as an,Xi as on,Xn as sn,Xr as cn,Xt as ln,Y as un,Ya as dn,Yi as fn,Yn as pn,Yr as mn,Yt as hn,Z as gn,Za as _n,Zi as vn,Zn as yn,Zr as bn,Zt as xn,_ as Sn,_a as Cn,_i as wn,_n as Tn,_r as En,_t as Dn,a as On,aa as kn,ai as An,an as jn,ao as Mn,ar as Nn,at as Pn,b as Fn,ba as In,bi as Ln,bn as Rn,br as zn,bt as Bn,c as Vn,ca as Hn,ci as Un,cn as Wn,co as Gn,cr as Kn,ct as qn,d as Jn,da as Yn,di as Xn,dn as Zn,do as Qn,dr as $n,dt as er,ea as tr,ei as nr,en as rr,eo as ir,er as ar,et as or,f as sr,fa as cr,fi as lr,fn as ur,fr as dr,ft as fr,g as pr,ga as mr,gi as hr,gn as gr,gr as _r,gt as vr,h as yr,ha as br,hi as xr,hn as Sr,hr as Cr,ht as wr,i as Tr,ia as Er,ii as Dr,in as Or,io as kr,ir as Ar,it as jr,j as Mr,ja as Nr,ji as Pr,jn as Fr,jr as Ir,jt as Lr,k as Rr,ka as zr,ki as Br,kn as Vr,kr as Hr,kt as Ur,l as Wr,la as Gr,li as Kr,ln as qr,lo as Jr,lr as Yr,lt as Xr,m as Zr,ma as Qr,mi as $r,mn as ei,mr as ti,mt as ni,n as ri,na as ii,ni as ai,nn as oi,no as si,nr as ci,nt as li,o as ui,oa as di,oi as fi,on as pi,oo as mi,or as hi,ot as gi,p as _i,pa as vi,pi as yi,pn as bi,pr as xi,pt as Si,q as Ci,qa as wi,qi as Ti,qn as Ei,qo as Di,qr as Oi,qt as ki,r as Ai,ra as ji,ri as Mi,rn as Ni,ro as Pi,rr as Fi,rt as Ii,s as Li,sa as Ri,si as zi,sn as Bi,so as Vi,sr as Hi,st as Ui,t as Wi,ta as Gi,ti as Ki,tn as qi,to as Ji,tr as Yi,tt as Xi,u as Zi,ua as Qi,ui as $i,un as ea,uo as ta,ur as na,ut as ra,v as ia,va as aa,vi as oa,vn as sa,vr as ca,vt as la,w as ua,wa as da,wi as fa,wn as pa,wr as ma,wt as ha,x as ga,xa as _a,xi as va,xn as ya,xr as ba,xt as xa,y as Sa,ya as Ca,yi as wa,yn as Ta,yr as Ea,yt as Da,z as Oa,za as ka,zi as Aa,zn as ja,zr as Ma,zt as Na}from"./dist-Cao3SE0M.mjs";export{Wi as AGENT_ID_MAX_LEN,ri as AGENT_ID_RE,Ai as AGENT_WRITE_ORIGIN,Tr as AcpPermissionStore,On as AcpRegistry,ui as AcpThreadManager,Li as AgentFocusBroadcaster,Vn as AgentPresenceBroadcaster,Wr as AgentSessionCapacityError,Zi as AgentSessionManager,Jn as AutoStartDisabledError,sr as BUNDLE_IDS,_i as BUNDLE_SCOPE,Zr as BUNDLE_SKILL_NAME,yr as BacklinkIndex,pr as CC1Broadcaster,i as CC1_CONTRACT_VERSION,Sn as CONCURRENT_REPLACE_WINDOW_MS,ia as CONFIG_FILENAME,Sa as CONFLICT_MARKER_RE,Fn as CURSOR_BUNDLE_PATHS_BY_PLATFORM,ga as ConfigSchema,wt as ConflictAuthority,A as DEFAULT_CHECKPOINT_RETENTION,ua as DEFAULT_EMBEDDINGS_DIMENSIONS,At as DEFAULT_PACK_ID,H as DocumentDurabilityState,I as DocumentDurabilityStateError,et as EMBEDDINGS_API_KEY_ENV,Rr as EPHEMERAL_PROJECT_DIR_PREFIX,_ as ExposureConsentError,Mr as FEATURED_AGENT_IDS,He as FILE_SYSTEM_WRITER,Je as FILE_WATCHER_ORIGIN,ot as FileEmbeddingsBackend,J as GIT_PREFLIGHT_FAIL_SPAN_NAME,he as GIT_UPSTREAM_WRITER,Q as GitDirAccessError,Ie as GitNotAvailableError,vt as GitTooOldError,Oa as HOCUSPOCUS_AUTH_REJECTION_REASONS,C as HocuspocusAuthRejection,Ut as HocuspocusAuthTokenSchema,ce as HomeProjectRootError,It as INSTALLED_AGENTS_SCHEMES,Xt as JSON_SCHEMA_DIALECT_2020_12,e as LINEAGE_EPOCH_KEY,te as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ke as MANAGED_RENAME_ORIGIN,Ci as MAX_ACP_THREADS,Se as MAX_AGENT_SESSIONS,un as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,rn as MIN_EVICTABLE_IDLE_MS,gn as MIN_GIT_VERSION,ft as MISSING_OK_CONFIG_MESSAGE,ye as MalformedGitPointerError,d as McpLogger,or as MissingOkConfigError,Xi as OBSERVER_SYNC_ORIGIN,li as OK_OKIGNORE_TEMPLATE,Ii as ONBOARDING_BUNDLE_IDS,u as ORPHAN_MODES,o as PROTOCOL_VERSION,D as PinoLogger,jr as ProcessLockCollisionError,Pn as ProjectGitInitError,gi as ROLLBACK_ORIGIN,Ui as ROOT_GITIGNORE_TEMPLATE,qn as RUNTIME_VERSION,Xr as SERVICE_WRITER,ra as SKILL_INSTALL_EVENTS_FILE_REL,l as SKILL_STATE_TARGETS,er as STARTER_FOLDER_FRONTMATTER_FILENAME,fr as STARTER_PACKS,Si as STARTER_PACK_IDS,ni as STATE_MANIFEST_FILENAME,wr as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,vr as SeedPrerequisiteError,Dn as SeedRootDirError,la as ServerLockCollisionError,Da as SingleFileNotAFileError,Bn as SingleFileNotFoundError,xa as SingleFileNotMarkdownError,kt as SingleFileProjectOverrideError,F as StateManifestError,ha as TagIndex,Ft as USER_GLOBAL_BUNDLE_IDS,q as __getShowAllWalkStatsForTesting,V as __resetShowAllWalkStatsForTesting,at as acquireProcessLock,Ur as acquireServerLock,S as applyAgentMarkdownWrite,Lr as applyExternalChange,qe as applySeed,$e as assertCompatibleStateManifest,dt as assertGitAvailable,ee as assertNeverDiskEvent,xe as assertNotHomeProjectRoot,Ve as attachAcpThreadSocket,Ct as attachCollabClientCounter,Na as attachIdleShutdown,k as bindConflictAuthority,Yt as bootServer,me as buildAndOpenSkill,Ht as buildConfigYmlContent,nn as buildExecResult,se as buildIngressPolicy,Fe as buildOkMcpStdioCommand,ki as buildSkillZip,Oe as buildStarterFolderFrontmatterYaml,hn as buildWipTree,ln as bundleSkillMdPath,xn as canonicalProjectKey,_t as canonicalizeForCompare,g as classifyEvents,rr as classifyFsPath,qi as clearAllEmbeddingsKeys,oi as coercePackId,Ni as collectServerHostSnapshot,t as colorFromSeed,Or as commitUpstreamImport,jn as commitWip,pi as commitWipFromTree,Bi as compareSemver,Wn as composeEffectiveLinterConfig,qr as composeFrontmatterSchemasConfig,ea as containsConflictMarkers,Zn as contentHash,ur as contributorCount,bi as countShadowObjects,ei as countStaleAgentWipRefs,Sr as countWipRefs,gr as createApiExtension,Tn as createAssetServeMiddleware,sa as createCollaborationHost,Ta as createContentFilter,Rn as createContentFilterAsync,ya as createEmbeddingsSecretStore,Dt as createEphemeralProjectDir,N as createExternalChangeHandler,pa as createFileLogger,Nt as createLiveDerivedIndexExtension,G as createMcpHttpHandler,z as createOsProbe,rt as createPersistenceExtension,Vr as createServer,b as createServerObserverExtension,Fr as createServerProbeResolver,Ge as createStreamingErrorWriter,qt as createTestLogger,Ze as describeStoredEmbeddingsKey,lt as detectClaudeDesktopPresence,Z as detectGit,ve as detectProjectShape,ze as detectUserSkillHosts,xt as discoverLockDirs,ja as discoverMarkdownlintConfig,E as emitPreflightFailureSpan,Kt as encodeDocName,de as encodeFolderRoute,zt as encodeSkillRoute,$t as ensureProjectGit,ie as errorResponse,Me as evictStaleTrackerEntries,Ei as extractHeadings,Te as extractOkBinaryPath,pn as extractWikiLinksFromMarkdown,sn as fallbackPaths,yn as findEnclosingGitRoot,ht as findEnclosingProjectRoot,m as findNativeMarkdownlintFile,ar as flushFileLogger,Yi as formatAuditBrokenLinkSuppressionLine,ci as formatAuthRejectionWire,Fi as formatContributorsFrom,Ar as formatPackRationale,Nn as gcCheckpointRefs,hi as getCurrentMcpLogger,Hi as getIngressContext,Kn as getLocalDir,Yr as getLogFilePath,fe as getLogger,na as getLogsDir,$n as getMachineId,dr as getMeter,xi as getMetrics,ti as getTracer,Cr as handleCollabSocketError,_r as handleSpawnCursor,En as hasForwardingHeaders,ca as hasGcLogLatch,r as iconFromClientName,Ea as incrementCollabSocketFilteredError,zn as incrementServerObserverFire,ba as initContent,Ot as initShadowRepo,P as initTelemetry,ma as initToleranceTelemetryWriter,Pt as installJsonSchemaDialect,K as installPrettyZodErrors,Bt as installTestLoggers,B as installUserSkill,it as isAllowedApiOrigin,Hr as isAllowedWorkspaceHostHeader,x as isConfigDoc,Ir as isDocInConflict,Ke as isHocuspocusAuthRejectionReason,Qe as isHomeDir,ut as isHostAdmitted,$ as isKnownPackId,be as isLinkIndexExcludedDoc,Be as isLoopbackAddress,St as isManagedArtifactDoc,Ma as isOriginAdmitted,s as isOrphanMode,O as isPairedWriteOrigin,Jt as isPathWithinDir,pe as isPeerAdmitted,Vt as isProcessAlive,tn as isProjectRoot,oe as isReservedForUserTree,Pe as isSelfWrite,Oi as isSystemDoc,De as isToleranceTelemetryEnabled,mn as isValidLockPid,cn as lastKnownHash,bn as listRescueCheckpoints,gt as listStarterPacks,h as loadCustomAgents,nr as loadPrincipal,Ki as lockAdvertisesUi,ai as lockBaseUrl,Mi as lockFilePath,en as loggerFactory,Dr as loginShapedUserinfoUser,ae as logsCurrentPath,Ne as logsPreviousPath,An as makeLazyEmbeddingsKeyStore,fi as markServerLockDraining,zi as mountMcpAndApi,Un as normalizeFsPath,Kr as observeReadiness,$i as originGitHubHost,Xn as packageVersionMajorMinor,lr as parseAuthRejectionWire,yi as parseGitVersion,$r as parseHocuspocusAuthToken,xr as parseKeepaliveConnectionId,hr as pathToDocName,wn as planSeed,oa as prepareSingleFileOpen,wa as processCommand,Ln as processUsage,va as readAllTargets,Et as readBundleDecision,M as readOwnNativeRules,fa as readProcessLock,Mt as readProcessLockDetailed,W as readProjectHeadState,R as readProjectLocalSemanticConfig,nt as readServerLock,Br as readServerPackageVersion,y as readSkillInstallStateSnapshot,Pr as readStateManifest,We as readTargetRecordedAt,Xe as readTargetVersion,ct as reconcile,X as recordContributor,_e as recordSkillInstallEvent,Re as redactShareSubprocessStderr,bt as registerAllTools,Aa as registerWrite,T as releaseProcessLock,Gt as releaseServerLock,ue as removeLastKnownHash,Rt as removeProjectSkillGitignoreBlock,Qt as reportSkillInstall,re as resetMetrics,je as resolveBuiltinSkillHosts,a as resolveBundleEnabled,Ti as resolveBundledSkillDir,we as resolveContentDir,fn as resolveCursorBinaryDefault,on as resolveCursorSpawnInvocation,vn as resolveEffectiveLinterConfig,mt as resolveEmbeddingsCredential,p as resolveGitHubAccountFromUrl,tr as resolveLockDir,Gi as resolveNativeConfigForDoc,ii as resolveNativeMarkdownlintConfig,ji as resolvePack,Er as resolvePackageVersion,kn as resolveSkillInstallReportSettings,di as resolveUiInfo,Ri as restoreContributors,Hn as rewriteMarkdownLinksForDocumentRename,Gr as rewriteWikiLinksForDocumentRename,Qi as runAuthReposSubprocess,Yn as runAuthStatusSubprocess,cr as runCloneSubprocess,vi as runDeviceFlowSubprocess,Qr as runWithMcpLogger,br as safeContentPath,mr as safeSubdir,Cn as safetyCheckpoint,aa as sameGitHubLogin,Ca as sanitizeClientName,In as saveInMemoryCheckpoint,_a as saveVersion,Tt as scanLockProcesses,j as seedBasenameIndex,da as seedEphemeralProjectDir,jt as serializeError,U as setActiveSpanAttributes,L as setupServerObservers,tt as shadowGit,zr as shutdownTelemetry,Di as spansCurrentPath,Ee as spansPreviousPath,v as spawnDetached,Nr as splitMarkdownBlocks,Ue as startWatcher,Ye as strategiesFor,st as streamingProblemEvent,Y as swapContributors,ge as teardownToleranceTelemetryWriter,Le as toBroadcasterKey,yt as tracedAppendFileSync,ka as tracedLinkSync,w as tracedMkdir,Wt as tracedMkdirSync,le as tracedRename,Lt as tracedRenameSync,Zt as tracedRmSync,ne as tracedRmdirSync,Ae as tracedUnlinkSync,wi as tracedWriteFile,Ce as tracedWriteFileSync,dn as trustSystemCertificates,an as updateLastKnownHash,_n as updateProcessLockPort,pt as updateServerLockPort,f as validateAgentId,ir as validateCloneInputs,Ji as validateSkillZip,si as waitForServerLockDrain,Pi as withHiddenWindowsConsole,kr as withSpan,Mn as withSpanSync,mi as writeBundleDecision,Vi as writeMarkdownlintRule,Gn as writeRootGitignoreForNewRepo,Jr as writeStateManifest,ta as writeTargetVersion,Qn as writeTracker};
|
package/dist/index.mjs
CHANGED
|
@@ -346,7 +346,7 @@ ${t.slice(l+2)}`,d+=1;else break}t.push({indent:l,number:parseInt(s,10),content:
|
|
|
346
346
|
`),patterns:[...t],lineCount:n}}function vB(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
|
|
347
347
|
`)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}function yB(e){let t=[],n=0,r=()=>{t.length>0&&(n+=1)},i=e=>{for(;n>0;)t.push({type:`break`}),--n;t.push(e)},a=e=>{e.split(`
|
|
348
348
|
`).forEach((e,t)=>{t>0&&r(),e.length>0&&i({type:`text`,value:e})})},o=e=>{let t=e.ordered===!0,n=typeof e.start==`number`?e.start:1,a=e.data,o=typeof a?.bulletMarker==`string`?a.bulletMarker:`-`,c=typeof a?.listMarkerDelimiter==`string`?a.listMarkerDelimiter:`.`;e.children.forEach((e,a)=>{a>0&&r();let l=t?`${n+a}${c} `:`${o} `;i({type:`text`,value:l}),e.children.forEach((e,t)=>{t>0&&r(),s(e)})})},s=e=>{switch(e.type){case`paragraph`:case`heading`:e.children.forEach(i);return;case`list`:o(e);return;case`code`:case`html`:a(e.value);return;case`thematicBreak`:i({type:`text`,value:e.data?.sourceRaw??`---`});return;default:{let t=e;if(Array.isArray(t.children)&&t.children.length>0){t.children.forEach((e,t)=>{t>0&&r(),s(e)});return}let n=e;if(typeof n.value==`string`){a(n.value);return}console.warn(JSON.stringify({event:`table-cell-flatten-dropped-block`,nodeType:e.type}))}}};return e.forEach((e,t)=>{t>0&&r(),s(e)}),t}function bB(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&xB(e.value.value,t))continue}let o=SB(e,t);r>=0?n[r]=o:n.push(o)}return n}function xB(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function SB(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function CB(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:bB(t,r),children:n.all(t),data:{}}}function wB(e,t,n){let r=t.attrs.props?.children;return{type:`mdxJsxTextElement`,name:e,attributes:bB(t,n),children:typeof r==`string`&&r!==``?[{type:`text`,value:r}]:[],data:{}}}const TB=/^[A-Za-z0-9]{20,}$/,EB=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function DB(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function OB(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return TB.test(n)?n:null}function kB(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!DB(t.hostname))return null;let n=OB(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&EB.test(r)?r:null}}function AB(e){return kB(e)!==null}function jB(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function MB(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:jB(t.hostname)}const NB=/^[A-Za-z0-9_-]{11}$/;function PB(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function FB(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function IB(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return NB.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return NB.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function LB(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!PB(t.hostname))return null;let n=IB(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?FB(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}const RB=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],zB=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:Mc,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],BB=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],VB=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:Nc,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(MB(e.src)||AB(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:Mc,hideWhen:e=>typeof e.src==`string`&&(MB(e.src)||AB(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&AB(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(MB(e.src)||AB(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(LB(e.src)!==null||MB(e.src)||AB(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],HB=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:Pc,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],UB=[{name:`title`,type:`string`,required:!0,description:`Heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the block renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],WB=[RB[0],RB[1],RB[4],RB[5],RB[6]],GB=[zB[0],zB[1],zB[7]],KB=[UB[0],UB[1],UB[4],UB[5]],qB=[{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`,`justify`],required:!1,defaultValue:`center`,description:"Block alignment from the `<div align>` attribute."},{name:`tag`,type:`string`,required:!1,defaultValue:`div`,hidden:!0,description:`Source wrapper tag (div or center).`},{name:`sourceAttrs`,type:`string`,required:!1,defaultValue:``,hidden:!0,description:`Raw opener-tag attribute bytes preserved for round-trip.`}],JB=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],YB=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],XB=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],ZB=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],QB=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],$B=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],eV=[$B[0]],tV=[$B[0]],nV=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],rV=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],iV=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],aV=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:Fc,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],oV=[{name:`src`,type:`string`,required:!0,description:"Path to the `.excalidraw` board this embed renders",autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded board`}],sV=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],cV=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function lV(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function uV(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function dV(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=typeof t?.sourceTarget==`string`?t.sourceTarget:null,o=typeof t?.sourceAnchor==`string`?t.sourceAnchor:null,s=typeof t?.sourceAlias==`string`?t.sourceAlias:null,c=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:c,data:{target:n,anchor:i,alias:r,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}const fV=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:RB,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>CB(`Callout`,e,t,RB)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:zB,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>CB(`img`,e,t,zB)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:VB,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>CB(`video`,e,t,VB)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:HB,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>CB(`audio`,e,t,HB)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:aV,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>CB(`Pdf`,e,t,aV)},{name:`Excalidraw`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:oV,icon:`PenTool`,category:`embed`,displayName:`Excalidraw`,description:"Embedded snapshot of an `.excalidraw` board, linking to its canvas editor",searchTerms:[`excalidraw`,`board`,`whiteboard`,`sketch`,`drawing`,`canvas`],serialize:(e,t)=>CB(`Excalidraw`,e,t,oV)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:iV,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>CB(`File`,e,t,iV)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:BB,icon:`AppWindow`,category:`embed`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>CB(`Embed`,e,t,BB)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:UB,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>CB(`Accordion`,e,t,UB)},{name:`Toggle`,surface:`canonical`,hasChildren:!0,props:UB,icon:`ChevronRight`,category:`content`,displayName:`Toggle`,description:"Standalone expand/collapse block (Notion-style). Same render + props as `<Accordion>` — pick whichever vocabulary matches the vault.",searchTerms:[`toggle`,`collapsible`,`expand`,`details`,`disclosure`,`fold`],exampleBody:`Body content revealed when the toggle is expanded.`,serialize:(e,t)=>CB(`Toggle`,e,t,UB)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:ZB,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
349
|
-
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>CB(`Tabs`,e,t,ZB)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:QB,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>CB(`Tab`,e,t,QB)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:$B,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>CB(`Math`,e,t,$B)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:nV,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:sV,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>CB(`Mirror`,e,t,sV)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:cV,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>CB(`MirrorSource`,e,t,cV)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:WB,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:GB,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:JB,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:dV},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:YB,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:dV},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:XB,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:dV},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:rV,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:dV},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:KB,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${lV(n.name)}"`:``,a=n?.id?` id="${lV(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${uV(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:qB,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${lV(i)}"`):`${a} align="${lV(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:eV,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:tV,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],pV={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>CB(e.attrs.componentName||`*`,e,t)};function mV(){let e=new Map;e.set(`*`,pV);for(let t of fV)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}const hV={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxActionAborted:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},jsxChromeDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function gV(){hV.parseFallback.blockLevel++}function _V(){hV.parseFallback.wholeDoc++}function vV(){hV.parseFallback.wholeDocBudget++}const yV=/^(`{3,}|~{3,})/gm;function bV(e){let t=[],n=null;for(let r of e.matchAll(yV)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function xV(e,t){return t.some(([t,n])=>e>=t&&e<n)}const SV=/`+/g;function CV(e){let t=[];SV.lastIndex=0;for(let n of e.matchAll(SV))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const wV=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function TV(e){let t=bV(e),n=[];for(let r of e.matchAll(wV))xV(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
349
|
+
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>CB(`Tabs`,e,t,ZB)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:QB,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>CB(`Tab`,e,t,QB)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:$B,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>CB(`Math`,e,t,$B)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:nV,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:sV,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>CB(`Mirror`,e,t,sV)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:cV,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>CB(`MirrorSource`,e,t,cV)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:WB,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:GB,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:JB,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:dV},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:YB,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:dV},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:XB,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:dV},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:rV,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:dV},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:KB,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${lV(n.name)}"`:``,a=n?.id?` id="${lV(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${uV(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:qB,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${lV(i)}"`):`${a} align="${lV(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:eV,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:tV,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],pV={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>CB(e.attrs.componentName||`*`,e,t)};function mV(){let e=new Map;e.set(`*`,pV);for(let t of fV)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}const hV={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function gV(){hV.parseFallback.blockLevel++}function _V(){hV.parseFallback.wholeDoc++}function vV(){hV.parseFallback.wholeDocBudget++}const yV=/^(`{3,}|~{3,})/gm;function bV(e){let t=[],n=null;for(let r of e.matchAll(yV)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function xV(e,t){return t.some(([t,n])=>e>=t&&e<n)}const SV=/`+/g;function CV(e){let t=[];SV.lastIndex=0;for(let n of e.matchAll(SV))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const wV=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function TV(e){let t=bV(e),n=[];for(let r of e.matchAll(wV))xV(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
350
350
|
`)}\n\n`:``}function EV(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return kV(e,t.parse,0,n)}function DV(e){return e.calls>=1e3||(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=500}function OV(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split(`
|
|
351
351
|
`).slice(0,4).join(`
|
|
352
352
|
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function kV(e,t,n,r){if(n>20)return _V(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),RV(e);if(r){if(DV(r))return vV(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),RV(e);r.calls+=1}try{return t(e)}catch(i){let a=AV(i),o=OV(i);if(a===void 0){if(n===0){let n=LV(e,t,i,r);if(n)return n}return _V(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),RV(e)}gV(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=FV(e,a),s=e.slice(i.start,i.end),c=e.slice(0,i.start).replace(/\n+$/,``),l=e.slice(i.end).replace(/^\n+/,``),u=c.trim()?kV(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?kV(TV(c)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:s?[{type:`text`,text:s}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){_V();let n=OV(t);return console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${n.message}`,recoveryPath:`block-split-then-rejoin`,error:n,originalError:o})),RV(e)}}}function AV(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function jV(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function MV(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function NV(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(xV(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+32768),l=!1,u=0,d=-1,f=!1;for(let t=s;t<c;t++){let n=e[t];if(l){n===`"`&&(l=!1),n===`\\`&&t+1<c&&t++;continue}if(n===`"`){l=!0;continue}if(n===`{`){u++;continue}if(n===`}`&&u>0){u--;continue}if(!(u>0)&&n===`>`){d=t,t>0&&e[t-1]===`/`&&(f=!0);break}}if(d===-1)continue;let p=d+1;a?n.push({kind:`close`,name:o,start:i,end:p}):f?n.push({kind:`self-close`,name:o,start:i,end:p}):n.push({kind:`open`,name:o,start:i,end:p})}return n}function PV(e){let t=NV(e,bV(e)),n=[],r=[];for(let i of t){if(i.kind===`self-close`)continue;if(i.kind===`open`){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(t!==-1){for(let a=n.length-1;a>t;a--){let t=n[a],o=MV(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,o),source:`unmatched`})}r.push({start:n[t].start,end:i.end,source:`pair`}),n.length=t}}for(let t of n){let n=MV(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function FV(e,t){let n=PV(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:jV(e,t)??0,end:MV(e,t)??e.length}}function IV(e){let t=bV(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;xV(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function LV(e,t,n,r){let i=IV(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&DV(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=TV(e.src);let r=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(r.length===0&&n.length>0){o=!0;continue}a.push(...r),o=!0}catch(t){gV();let r=t?.message?.slice(0,200)??`unknown block error`,i=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${i}`,blockError:r,blockErrorName:t?.name})),a.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return o?{type:`doc`,content:a.length>0?a:[{type:`paragraph`,content:[]}]}:null}function RV(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}function zV(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function BV(e){return zV(e).kind===`valid`}const VV=[[``,``],[``,``],[``,``],[``,``],[``,``]],HV=/[\uE000-\uE004]/,UV=/[\uE005-\uE009]/,WV=VV.map(([e,t])=>({from:e,to:t})),GV=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,KV=/<!--[\s\S]*?-->/g,qV=/<\/([a-z][a-z0-9]*)\s*>/g,JV=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,YV=new Set([`img`,`video`,`audio`]),XV=new Set([`mark`,`u`,`ins`]);function ZV(e,t,n,r){let i=0,a=0,o=`<${t}`;for(;a<n;){let t=e.indexOf(o,a);if(t===-1||t>=n)break;a=t+o.length;let s=e[t+o.length];if(s!==void 0&&s!==`>`&&s!==`/`&&!/\s/.test(s)||xV(t,r))continue;let c=e.indexOf(`>`,t);(c===-1||e[c-1]!==`/`)&&i++}return i}const QV=/<\/([A-Z][A-Za-z0-9.]*)>/g;function $V(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function eH(e){let t=new Map,n=new RegExp(QV.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function tH(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function nH(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}const rH=1024;function iH(e,t){if(t[e-1]!==`(`||t[e-2]!==`]`)return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&t[e]===`\\`;e--)r++;if(r%2==1)return!1;let i=!1,a=Math.max(0,n-rH);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
|
|
@@ -1535,6 +1535,6 @@ GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){funct
|
|
|
1535
1535
|
`);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(`
|
|
1536
1536
|
`)?`
|
|
1537
1537
|
`:``;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 KAe=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function F9(e){return/\.log\.\d+$/.test(e)}function qAe(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||F9(e)}const JAe=[`telemetry`,`logs`,`process`,`diagnostic-reports`];function YAe(e){let t={contentDir:e.contentDir};for(let n of JAe)for(let r of P9(N(e.stagingDir,n)))qAe(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):KAe.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 XAe(e){return N(e,...I9,z9)}function ZAe(e){return N(e,...I9,B9)}function QAe(e){return N(e,...L9,V9)}function $Ae(e){return N(e,...L9,H9)}function eje(e){return N(e,...R9,U9)}function tje(e){return N(e,...R9,W9)}const G9=1e3;async function nje(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 rje(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 ije(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 aje(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(`
|
|
1538
|
-
`)}\n`:null}catch{return null}}function oje(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`log`,`--oneline`,`-50`],W6({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function sje(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/`],W6({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 cje(){return{nodeVersion:process.version,platform:le(),arch:ae()}}function lje(){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,tn.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 uje(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function X9(e){if(q9(e))return uje(e.maxBytes)}function dje(e){let t=J9(LQ(`project`,e)),n=J9(LQ(`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 fje(e){return Ne(`sha256`).update(e).digest(`hex`)}function pje(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const mje=[`"doc.name"`,`"docName"`];function hje(e){let t=S(e,`utf-8`),n=0;for(let e of mje){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 gje=new Set([`.jsonl`]);function _je(e){let t=e.lastIndexOf(`.`);return t!==-1&&gje.has(e.slice(t))}const vje=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function yje(e){if(F9(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&vje.has(e.slice(t))}function bje(e){let t=[];for(let n of Q9(e)){let r=$9(e,n);if(!yje(r))continue;let{redacted:i,patterns:a,lineCount:o}=_B(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 xje(e){let t=be(e.contentDir),n=be(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??nje,a=r.fetchAgentEffects??rje,o=r.fetchWatcherRecent??ije,s=r.readShadowHead??oje,c=r.readCheckpointRefs??sje,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.76.
|
|
1538
|
+
`)}\n`:null}catch{return null}}function oje(e){let t=N(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`log`,`--oneline`,`-50`],W6({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function sje(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/`],W6({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 cje(){return{nodeVersion:process.version,platform:le(),arch:ae()}}function lje(){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,tn.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 uje(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function X9(e){if(q9(e))return uje(e.maxBytes)}function dje(e){let t=J9(LQ(`project`,e)),n=J9(LQ(`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 fje(e){return Ne(`sha256`).update(e).digest(`hex`)}function pje(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const mje=[`"doc.name"`,`"docName"`];function hje(e){let t=S(e,`utf-8`),n=0;for(let e of mje){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 gje=new Set([`.jsonl`]);function _je(e){let t=e.lastIndexOf(`.`);return t!==-1&&gje.has(e.slice(t))}const vje=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function yje(e){if(F9(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&vje.has(e.slice(t))}function bje(e){let t=[];for(let n of Q9(e)){let r=$9(e,n);if(!yje(r))continue;let{redacted:i,patterns:a,lineCount:o}=_B(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 xje(e){let t=be(e.contentDir),n=be(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??nje,a=r.fetchAgentEffects??rje,o=r.fetchWatcherRecent??ije,s=r.readShadowHead??oje,c=r.readCheckpointRefs??sje,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.76.1`),d=r.readDesktopEnv??K9,f=r.readLanguage??O9,p=r.readRuntime??cje,h=r.isOtlpPushEnabled??lje,_=y(N(A(),`ok-bundle-`));try{v(N(_,`telemetry`),{recursive:!0}),v(N(_,`logs`),{recursive:!0}),v(N(_,`state`),{recursive:!0}),Z9(XAe(n),N(_,`telemetry`,z9)),Z9(ZAe(n),N(_,`telemetry`,B9)),Z9(QAe(n),N(_,`logs`,V9)),Z9($Ae(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(_,VL,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=aje(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(eje(n),N(_,`state`,U9)),Z9(tje(n),N(_,`state`,W9)),Z9(N(b,`last-spawn-error.log`),N(_,`state`,`last-spawn-error.log`)),Z9(N(b,ku),N(_,`state`,ku)),Z9(N(b,Au),N(_,`state`,Au));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
|
|
1539
1539
|
`:`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&&YAe({stagingDir:_,contentDir:t}),e.note&&re(N(_,`note.txt`),e.note);let ce=null;e.scrubSecrets===!0&&(ce=bje(_));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=dje(n),ue=Q9(_),A=[],j=0,de=0;for(let e of ue){let t=$9(_,e),n=te(e).size,r=_je(t)?pje(e):0;A.push({path:t,bytes:n,lines:r}),j+=n,(t.startsWith(`telemetry/`)||t.startsWith(`logs/`))&&(de+=hje(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:fje(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 Sje(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 PCe.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 Cje(e,t){let n=N(e,`.ok`,`config.yml`);if(g(n))try{let t=(0,tn.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 wje(e,t,n,r,i){let a=E7(t,e.logger),o=await xje({contentDir:Cje(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...Pke(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 Sje({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 Tje(e){let{projectDir:t}=e,n=e.readDesktopEnv??K9,r=e.readLanguage??O9,i=()=>Ake(e.diagnosticReportsDir??N(k(),`Library`,`Logs`,`DiagnosticReports`),new Date);if(e.level===`full`&&t!==void 0)return wje(e,t,n,r,i());let{zipPath:a,summary:o}=await zke({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,XDe as HOSTS_WITH_USER_SKILL_DIR,gke as LAUNCH_CONFIG_NAME,OAe as PATH_SHIM_BEGIN,AAe as PATH_SHIM_BLOCK_RE,kAe as PATH_SHIM_END,JOe as addOkPathsToGitExclude,R5 as assertProjectPathSafe,p5 as buildManagedServerEntry,vAe as buildMcpConfigDeclineEvent,yAe as buildMcpConfigMigrateEvent,b7 as classifyExistingMcpEntry,Tje as collectReportBundle,FAe as createCliProbeResolver,on as createTokenStore,jke as defaultBugReportZipPath,We as detectGh,qe as detectGhAccounts,bke as detectInstalledEditors,S5 as droppedManagedKeys,_Oe as editorConfigPathDisplay,gOe as editorEntryLocator,sAe as ensurePiBridge,Q5 as formatTrackedRemediation,ZOe as getExcludedOkPaths,X5 as getInstalledSkillProjectionPaths,YDe as getNativeTomlMcpEditor,Y5 as getOkArtifactPaths,d5 as isEntryUpToDate,m5 as isOwnManagedEntry,TAe as loadConfig,bee as makeLazyProbeTokenStore,T7 as okBugReportsDir,b9 as parseGitHubBlobUrl,EAe as parseGitHubShareUrl,x9 as parseGitHubTreeUrl,y9 as parseGitUrl,jAe as pathInstallMarkerPath,MOe as previewContent,xke as probeOwnManagedEditorMcpEntry,aAe as probePiBridgeState,Z5 as probeTrackedOkPaths,v7 as readExistingMcpEntry,XOe as readSharingMode,_B as redactContent,YOe as removeOkPathsFromGitExclude,mAe as removeOwnMcpEntry,WOe as removeProjectSkill,LAe as removeUserGlobalSkillBundle,UAe as removeUserSkill,ROe as resolveProjectRoot,SAe as runStop,h9 as truncatePriorEntry,E9 as userGlobalSkillBundleTargets,HAe as userSkillPresentAnywhere,DAe as validateLocalFolderForShare,_7 as writeEditorMcpConfig,BAe as writeProjectAiIntegrations,W5 as writeProjectSkill,yke as writeUserMcpConfigs,VAe as writeUserSkill};
|
|
1540
1540
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dist-Cao3SE0M.mjs";import{_ as e}from"./init-S1_zVNWd.mjs";export{e as runInit};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Ad as r,Bd as i,Fd as a,Fu as o,Gl as s,Hu as c,Id as l,Iu as u,Mt as d,Nd as f,Nl as p,Vl as m,_s as h,hs as g,jd as _,ju as v,rc as y,zd as b}from"./md-manager-BGnqyqi1-
|
|
1
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Ad as r,Bd as i,Fd as a,Fu as o,Gl as s,Hu as c,Id as l,Iu as u,Mt as d,Nd as f,Nl as p,Vl as m,_s as h,hs as g,jd as _,ju as v,rc as y,zd as b}from"./md-manager-BGnqyqi1-BZhj8566.mjs";import{Co as x,Do as S,Dr as ee,H as te,L as ne,Ln as re,No as ie,Nr as ae,Qt as oe,R as se,So as ce,Tt as le,Ui as ue,Wi as de,Wn as fe,Wr as pe,aa as me,at as he,bo as ge,co as _e,m as ve,oo as ye,qi as be,ro as xe,rt as Se,xo as C,xr as Ce,yo as we,zo as Te}from"./dist-Cao3SE0M.mjs";import{i as w,n as T,o as E,r as Ee,s as D,t as O}from"./colors-r_owlCuY.mjs";import{t as k}from"./is-object-BGze3w87.mjs";import{t as De}from"./constants-B6lHSTE5.mjs";import{t as Oe}from"./preview-DjofmF_T.mjs";import{createRequire as ke}from"node:module";import{execFileSync as Ae}from"node:child_process";import je,{basename as Me,dirname as A,isAbsolute as Ne,join as j,posix as Pe,relative as M,resolve as N,sep as P,win32 as Fe}from"node:path";import F from"node:process";import{fileURLToPath as Ie}from"node:url";import{cpSync as Le,existsSync as I,lstatSync as Re,mkdirSync as ze,readFileSync as L,readdirSync as Be,readlinkSync as Ve,realpathSync as He,rmSync as Ue,statSync as We,writeFileSync as Ge}from"node:fs";import{homedir as R}from"node:os";import{inspect as Ke,stripVTControlCharacters as qe,styleText as z}from"node:util";import*as Je from"node:readline";import{AsyncLocalStorage as Ye,AsyncResource as Xe}from"node:async_hooks";var Ze=n((e=>{var t=class extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}},n=class extends t{constructor(e){super(1,`commander.invalidArgument`,e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};e.CommanderError=t,e.InvalidArgumentError=n})),Qe=n((e=>{let{InvalidArgumentError:t}=Ze();var n=class{constructor(e,t){switch(this.description=t||``,this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case`<`:this.required=!0,this._name=e.slice(1,-1);break;case`[`:this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.endsWith(`...`)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}};function r(e){let t=e.name()+(e.variadic===!0?`...`:``);return e.required?`<`+t+`>`:`[`+t+`]`}e.Argument=n,e.humanReadableArgName=r})),$e=n((e=>{let{humanReadableArgName:t}=Qe();var n=class{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(e){this.helpWidth=this.helpWidth??e.helpWidth??80}visibleCommands(e){let t=e.commands.filter(e=>!e._hidden),n=e._getHelpCommand();return n&&!n._hidden&&t.push(n),this.sortSubcommands&&t.sort((e,t)=>e.name().localeCompare(t.name())),t}compareOptions(e,t){let n=e=>e.short?e.short.replace(/^-/,``):e.long.replace(/^--/,``);return n(e).localeCompare(n(t))}visibleOptions(e){let t=e.options.filter(e=>!e.hidden),n=e._getHelpOption();if(n&&!n.hidden){let r=n.short&&e._findOption(n.short),i=n.long&&e._findOption(n.long);!r&&!i?t.push(n):n.long&&!i?t.push(e.createOption(n.long,n.description)):n.short&&!r&&t.push(e.createOption(n.short,n.description))}return this.sortOptions&&t.sort(this.compareOptions),t}visibleGlobalOptions(e){if(!this.showGlobalOptions)return[];let t=[];for(let n=e.parent;n;n=n.parent){let e=n.options.filter(e=>!e.hidden);t.push(...e)}return this.sortOptions&&t.sort(this.compareOptions),t}visibleArguments(e){return e._argsDescription&&e.registeredArguments.forEach(t=>{t.description=t.description||e._argsDescription[t.name()]||``}),e.registeredArguments.find(e=>e.description)?e.registeredArguments:[]}subcommandTerm(e){let n=e.registeredArguments.map(e=>t(e)).join(` `);return e._name+(e._aliases[0]?`|`+e._aliases[0]:``)+(e.options.length?` [options]`:``)+(n?` `+n:``)}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleSubcommandTerm(t.subcommandTerm(n)))),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestGlobalOptionTermLength(e,t){return t.visibleGlobalOptions(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleOptionTerm(t.optionTerm(n)))),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce((e,n)=>Math.max(e,this.displayWidth(t.styleArgumentTerm(t.argumentTerm(n)))),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+`|`+e._aliases[0]);let n=``;for(let t=e.parent;t;t=t.parent)n=t.name()+` `+n;return n+t+` `+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&(e.required||e.optional||e.isBoolean()&&typeof e.defaultValue==`boolean`)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),e.presetArg!==void 0&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),e.envVar!==void 0&&t.push(`env: ${e.envVar}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}argumentDescription(e){let t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map(e=>JSON.stringify(e)).join(`, `)}`),e.defaultValue!==void 0&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){let n=`(${t.join(`, `)})`;return e.description?`${e.description} ${n}`:n}return e.description}formatItemList(e,t,n){return t.length===0?[]:[n.styleTitle(e),...t,``]}groupItems(e,t,n){let r=new Map;return e.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[])}),t.forEach(e=>{let t=n(e);r.has(t)||r.set(t,[]),r.get(t).push(e)}),r}formatHelp(e,t){let n=t.padWidth(e,t),r=t.helpWidth??80;function i(e,r){return t.formatItem(e,n,r,t)}let a=[`${t.styleTitle(`Usage:`)} ${t.styleUsage(t.commandUsage(e))}`,``],o=t.commandDescription(e);o.length>0&&(a=a.concat([t.boxWrap(t.styleCommandDescription(o),r),``]));let s=t.visibleArguments(e).map(e=>i(t.styleArgumentTerm(t.argumentTerm(e)),t.styleArgumentDescription(t.argumentDescription(e))));if(a=a.concat(this.formatItemList(`Arguments:`,s,t)),this.groupItems(e.options,t.visibleOptions(e),e=>e.helpGroupHeading??`Options:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),t.showGlobalOptions){let n=t.visibleGlobalOptions(e).map(e=>i(t.styleOptionTerm(t.optionTerm(e)),t.styleOptionDescription(t.optionDescription(e))));a=a.concat(this.formatItemList(`Global Options:`,n,t))}return this.groupItems(e.commands,t.visibleCommands(e),e=>e.helpGroup()||`Commands:`).forEach((e,n)=>{let r=e.map(e=>i(t.styleSubcommandTerm(t.subcommandTerm(e)),t.styleSubcommandDescription(t.subcommandDescription(e))));a=a.concat(this.formatItemList(n,r,t))}),a.join(`
|
|
2
2
|
`)}displayWidth(e){return r(e).length}styleTitle(e){return e}styleUsage(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e===`[command]`?this.styleSubcommandText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleCommandText(e)).join(` `)}styleCommandDescription(e){return this.styleDescriptionText(e)}styleOptionDescription(e){return this.styleDescriptionText(e)}styleSubcommandDescription(e){return this.styleDescriptionText(e)}styleArgumentDescription(e){return this.styleDescriptionText(e)}styleDescriptionText(e){return e}styleOptionTerm(e){return this.styleOptionText(e)}styleSubcommandTerm(e){return e.split(` `).map(e=>e===`[options]`?this.styleOptionText(e):e[0]===`[`||e[0]===`<`?this.styleArgumentText(e):this.styleSubcommandText(e)).join(` `)}styleArgumentTerm(e){return this.styleArgumentText(e)}styleOptionText(e){return e}styleArgumentText(e){return e}styleSubcommandText(e){return e}styleCommandText(e){return e}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestGlobalOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}preformatted(e){return/\n[^\S\r\n]/.test(e)}formatItem(e,t,n,r){let i=` `.repeat(2);if(!n)return i+e;let a=e.padEnd(t+e.length-r.displayWidth(e)),o=(this.helpWidth??80)-t-2-2,s;return s=o<this.minWidthToWrap||r.preformatted(n)?n:r.boxWrap(n,o).replace(/\n/g,`
|
|
3
3
|
`+` `.repeat(t+2)),i+a+` `.repeat(2)+s.replace(/\n/g,`\n${i}`)}boxWrap(e,t){if(t<this.minWidthToWrap)return e;let n=e.split(/\r\n|\n/),r=/[\s]*[^\s]+/g,i=[];return n.forEach(e=>{let n=e.match(r);if(n===null){i.push(``);return}let a=[n.shift()],o=this.displayWidth(a[0]);n.forEach(e=>{let n=this.displayWidth(e);if(o+n<=t){a.push(e),o+=n;return}i.push(a.join(``));let r=e.trimStart();a=[r],o=this.displayWidth(r)}),i.push(a.join(``))}),i.join(`
|
|
4
4
|
`)}};function r(e){return e.replace(/\x1b\[\d*(;\d*)*m/g,``)}e.Help=n,e.stripColor=r})),et=n((e=>{let{InvalidArgumentError:t}=Ze();var n=class{constructor(e,t){this.flags=e,this.description=t||``,this.required=e.includes(`<`),this.optional=e.includes(`[`),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;let n=a(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith(`--no-`)),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){let t=e;return typeof e==`string`&&(t={[e]:!0}),this.implied=Object.assign(this.implied||{},t),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_collectValue(e,t){return t===this.defaultValue||!Array.isArray(t)?[e]:(t.push(e),t)}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,n)=>{if(!this.argChoices.includes(e))throw new t(`Allowed choices are ${this.argChoices.join(`, `)}.`);return this.variadic?this._collectValue(e,n):e},this}name(){return this.long?this.long.replace(/^--/,``):this.short.replace(/^-/,``)}attributeName(){return this.negate?i(this.name().replace(/^no-/,``)):i(this.name())}helpGroup(e){return this.helpGroupHeading=e,this}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},r=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach(e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)}),this.negativeOptions.forEach((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)})}valueFromOption(e,t){let n=t.attributeName();if(!this.dualOptions.has(n))return!0;let r=this.negativeOptions.get(n).presetArg,i=r!==void 0&&r;return t.negate===(i===e)}};function i(e){return e.split(`-`).reduce((e,t)=>e+t[0].toUpperCase()+t.slice(1))}function a(e){let t,n,r=/^-[^-]$/,i=/^--[^-]/,a=e.split(/[ |,]+/).concat(`guard`);if(r.test(a[0])&&(t=a.shift()),i.test(a[0])&&(n=a.shift()),!t&&r.test(a[0])&&(t=a.shift()),!t&&i.test(a[0])&&(t=n,n=a.shift()),a[0].startsWith(`-`)){let t=a[0],n=`option creation failed due to '${t}' in option flags '${e}'`;throw/^-[^-][^-]/.test(t)?Error(`${n}
|
|
@@ -689,5 +689,5 @@ export default function okBridge(pi: {
|
|
|
689
689
|
`));let g=`${s?``:``}${m}`;return g!==o&&S(e,g,{mode:Ca(e)}),a&&g===o?{kind:`unchanged`}:{kind:d?`overwritten`:`written`}}const _o=e=>e!==`project`,vo=e=>e!==`user`;async function yo(){let e=await Ma({message:`Where should the MCP server be configured?
|
|
690
690
|
`,required:!1,theme:{icon:{checked:`[x]`,unchecked:`[ ]`}},choices:[{name:`User-level (~/.claude.json, ~/.cursor/mcp.json, …)`,value:`user`,checked:!0},{name:`Project-level (.mcp.json, .cursor/mcp.json, …)`,value:`project`,checked:!0}]});return e.includes(`user`)&&e.includes(`project`)?`both`:e.includes(`user`)?`user`:e.includes(`project`)?`project`:null}async function bo(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??yo)():`both`}async function xo(e){return La({message:`How do you want to handle OpenKnowledge config files (.ok/, .mcp.json)?`,default:e,choices:[{name:`Share with my team (commit alongside content)`,value:`shared`,description:`OK config gets committed alongside your project content.`},{name:`Local only (keep out of git via .git/info/exclude)`,value:`local-only`,description:"OK config stays on this machine only; teammates do not see it. Safe escape hatch via `ok config-sharing share`."}]})}async function So(e){if(e.sharing!==void 0)return e.sharing;let t=qi(e.projectRoot)===`local-only`||e.freshProject===!0?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??xo)(t):t}var $=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function Co(e){if(e===void 0||e===!0)return new Set(Se);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(le.filter(e=>t.includes(e)))}function wo(e,t,n){let r=N(n,e),i;try{i=We(r)}catch(e){let t=e.code;throw t===`ENOENT`?new $(`--content-dir path does not exist: ${r}`):new $(`--content-dir path is not accessible (${t??`unknown error`}): ${r}`)}if(!i.isDirectory())throw new $(`--content-dir must be a directory: ${r}`);let a=To(t),o=To(r),s=M(a,o);if(s.startsWith(`..`)||Ne(s))throw new $(`--content-dir must be inside the project root (${t}); got ${r}`);return s===``?`.`:s}function To(e){try{return He(e)}catch{return e}}const Eo=`open-knowledge-ui`;function Do(e,t,n){try{let r=e.detectPath?.(t,n)??A(e.configPath(t,n));return I(r)}catch{return!1}}function Oo(e,t,n){try{let r=N(A(e.configPath(t,n))),i=N(e.detectPath?.(t,n)??r);return i===r||r.startsWith(i+P)}catch{return!1}}function ko(e,t,n,r,i){let a=e.serverName(t),o;try{o=i??e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:a,error:t instanceof Error?t.message:String(t)}}let s=n.pruneOnly===!0;if(s&&(e.format===`file`||!I(o)))return{editorId:e.id,label:e.label,action:`skipped-flag`,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}};let c=!n.skipAvailabilityCheck||e.offerOnlyWhenDetected===!0||Oo(e,t,r);if(!i&&c&&!Do(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{oa(o,t)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),configScope:`project`}}if(e.format===`file`)return jo(e,o,a,n,{isProjectScope:i!==void 0});let l;try{l=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}try{s||ze(A(o),{recursive:!0})}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:t instanceof Error?t.message:String(t),...i===void 0?{}:{configScope:`project`}}}let u={action:`written`},d;try{ie(`${o}.lock`,()=>{let t=Xa(o).writePath;if(s||ze(A(t),{recursive:!0}),e.format===`toml`){let r=po(Ur(),t,e.topLevelKey,a,l,n.replaceEntry===!0,n.pruneOnly===!0);u.action=r.kind,r.kind===`declined`&&(u.declineReason=r.reason);return}if(e.format===`yaml`){let r=go(t,e.topLevelKey,a,l,n.replaceEntry===!0,n.pruneOnly===!0);u.action=r.kind,r.kind===`declined`&&(u.declineReason=r.reason);return}let r=fo(t,e.topLevelKey,a,l,e.serverMapSubKey,n.replaceEntry===!0,n.pruneOnly===!0);u.action=r.kind,r.kind===`declined`&&(u.declineReason=r.reason)},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){d=e instanceof Error?e:Error(String(e))}return d?{editorId:e.id,label:e.label,action:`failed`,configPath:o,serverName:a,error:d.message,...i===void 0?{}:{configScope:`project`}}:u.action===`declined`?{editorId:e.id,label:e.label,action:`declined`,configPath:o,serverName:a,declineReason:u.declineReason,...i===void 0?{}:{configScope:`project`}}:{editorId:e.id,label:e.label,action:u.action===`unchanged`?`skipped-flag`:u.action,configPath:o,serverName:a,...i===void 0?{}:{configScope:`project`}}}const Ao={pi:Ha};function jo(e,t,n,r,i){let a=i.isProjectScope?{configScope:`project`}:{},o=r=>({editorId:e.id,label:e.label,action:`failed`,configPath:t,serverName:n,error:r instanceof Error?r.message:String(r),...a}),s=Ao[e.id];if(!s)return o(Error(`No managed-file builder registered for editor "${e.id}" (format: 'file' targets need a MANAGED_FILE_BUILDERS entry).`));let c;try{c=s(r)}catch(e){return o(e)}try{ze(A(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{ie(`${t}.lock`,()=>{let e=null;try{e=L(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}S(t,c,e===null?void 0:{mode:Ca(t)}),l.action=e===null?`written`:`overwritten`},{onWarn:(e,t)=>process.stderr.write(`[ok] ${e} ${JSON.stringify(t)}\n`)})}catch(e){return o(e)}return{editorId:e.id,label:e.label,action:l.action,configPath:t,serverName:n,...a}}function Mo(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!I(n)))return{editorId:e.id,label:e.label,path:n}}async function No(e){let t=Bi(e.editors).filter(e=>e.scope===`global`),n={mode:`published`,skipAvailabilityCheck:!0,...e.replaceEntry===!0?{replaceEntry:!0}:{},...e.pruneOnly===!0?{pruneOnly:!0}:{}};return t.map(t=>ko(t,``,n,e.home))}function Po(e,t,n,r){let i=Io(e,t,n,r);return i.kind===`present`?i.entry:null}function Fo(e,t,n,r){let i=uo(e,t,r);if(!k(i))return{kind:`no-entry`};let a=i[n];return k(a)?{kind:`present`,entry:a}:{kind:`no-entry`}}function Io(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!I(i))return{kind:`absent`};try{if(We(i).size>io)return{kind:`decline`,reason:`oversize`}}catch(e){return{kind:`decline`,reason:ya(e)}}let a;try{a=L(i,`utf-8`)}catch(e){return{kind:`decline`,reason:ya(e)}}if(a.trim()===``)return{kind:`absent`};if(e.format===`file`)return{kind:`present`,entry:Va(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=Ur().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Fo(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,Ar.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:Fo(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=$a(a);return s?eo(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Fo(ge(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Lo(e={}){let t=N(e.cwd??process.cwd()),n=Ga(t,{homeDir:e.home}),r=n.projectRoot;if(ae(r,e.home??R()))throw new te(r);let i=!I(j(r,`.ok`)),a=n.gitRootPromoted?M(r,t):void 0,o=e.contentDir===void 0?n.defaultContentDir:wo(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&i&&o===`.`&&process.stderr.write(`${D(`[ok] Content scope promoted to the git repo root: ${r}`)}\n Ran in ${a}/, but .ok/ lives at the git root (one .ok/ per git repo),\n so the whole repo is now the content scope. To narrow it, re-run with\n \`ok init --content-dir .\`, or set content.dir: ${a} in .ok/config.yml.\n`);let c={mode:e.devMcp?`dev`:`published`},l=await fe(r),u;try{u=Ce(r,{contentDir:o})}catch(t){let i=Q.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:l.didInit,rootGitignoreCreated:!1,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDirRequested:e.contentDir,contentScaffoldFailed:!0,mcpAction:`failed`,mcpPath:i,mcpError:`Content scaffolding failed: ${t instanceof Error?t.message:String(t)}`,sharing:{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:!1}}}let d=u.created.includes(De),f=!1;if(l.didInit)try{f=_e(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{ue(r)===`removed`&&console.warn(`[ok] Removed the OpenKnowledge project-skill lines from .gitignore. The skill is ordinary project content now — commit it if your team wants it on clone.`)}catch(e){console.warn(`[ok] Skipping project-skill .gitignore cleanup at ${r}: ${e instanceof Error?e.message:String(e)}`)}let p=await bo({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),m=e.editors??Uo(r,e.home),h=e.editors??m,g=Bi(m),_=Bi(h),v=e.mcp===!1||p===null,y=Array.from(new Map([...g,...v?[]:_].map(e=>[e.id,e])).values()),b=g.filter(t=>Do(t,r,e.home)),x=[],S=[],ne=new Set;for(let t of y){if(v){let n=``;try{n=t.configPath(r,e.home)}catch{}x.push({editorId:t.id,label:t.label,action:`skipped-flag`,configPath:n,serverName:t.serverName(r)});continue}if(_o(p)&&g.includes(t)&&t.scope===`global`&&x.push(ko(t,r,c,e.home)),vo(p)&&_.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=ko(t,r,c,e.home,n);x.push(i),(i.action===`written`||i.action===`overwritten`)&&ne.add(n)}}let ie=new Set;for(let t of _){let n=t.projectSkillPath?.(r);!n||ie.has(n)||(ie.add(n),S.push(_a(t,r,{home:e.home})))}let oe=ga(r,_.map(e=>e.id));oe&&S.push(oe);let se=S.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.editorId);if(se.length>0){let t=e.home??R();de({source:s,skills:[ve.project],agents:se,scope:r},{home:t,enabled:me(t).enabled})}let ce=!v&&p!==null&&vo(p)?_.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,pe=v?[]:b.map(e=>Mo(e,r)).filter(e=>e!==void 0).filter(e=>!ne.has(e.path)),he=e.installUserSkill??ee,ge=e.home??R(),be=Co(e.skills),xe=!1,Se=!1,C=!1,we=!1,Te=!1;for(let t of le){if(!be.has(t))continue;await ye(ge,ve[t],!0).catch(()=>{}),xe=!0;let n=await he({home:e.home,bundleId:t,force:!0});n===`installed`?Se=!0:n===`failed`?C=!0:n===`no-hosts`?Te=!0:we=!0}let w=C?`failed`:Se?`installed`:xe&&we?`skip-current`:xe&&Te?`no-hosts`:`declined`,T=Se?re(ge).map(e=>e.editorId):[],E=v?`skipped-flag`:`skipped-missing`,Ee=x.find(e=>e.editorId===`claude`)??x[0]??{action:E,configPath:Q.claude.configPath(r,e.home)},O=await Ro({projectRoot:r,desiredMode:await So({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,freshProject:i,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:u.created,contentUpdated:u.updated,contentSkipped:u.skipped,editors:x,projectSkills:S,legacyProjectConfigs:pe,skillInstall:w,skillHosts:T,didGitInit:l.didInit,rootGitignoreCreated:f,gitRootPromoted:n.gitRootPromoted,promotedFromDir:a,contentDir:d?o:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:Ee.action,mcpPath:Ee.configPath,mcpError:`error`in Ee?Ee.error:void 0,projectScopeUnsupportedLabels:ce,sharing:O}}async function Ro(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=qi(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=Ui(t);if(n===`local-only`){let e=Gi(t,a);if(e.kind===`refused-tracked`){let t=e;return{kind:`refused-tracked`,tracked:t.tracked,remediation:t.remediation}}return e.kind===`no-exclude`?{kind:`no-exclude`,reason:e.reason,localOnlyRequested:r===`local-only`}:zo(t,e,`add`)}if(i===`shared`)return{kind:`applied`,mode:`shared`,action:`noop`,appended:[],alreadyPresent:[],removed:[]};let o=Ki(t,a);return o.kind===`no-exclude`?{kind:`no-exclude`,reason:o.reason,localOnlyRequested:!1}:zo(t,o,`remove`)}function zo(e,t,n){let r=qi(e);return n===`add`?{kind:`applied`,mode:r,action:t.appended.length>0?`added`:t.removed.length>0?`cleaned`:`noop`,appended:t.appended,alreadyPresent:t.alreadyPresent,removed:t.removed}:{kind:`applied`,mode:r,action:`removed`,appended:[],alreadyPresent:[],removed:t.removed}}function Bo(e){switch(e){case`permission-denied`:return`permission denied; check file and parent-directory permissions`;case`unresolved-symlink`:return`could not resolve the path or symlink; check permissions and symlink cycles`;case`not-a-file`:return`config path is not a regular file`;case`disappeared`:return`config disappeared while being read; retry to check its current state`;case`unreadable`:return`could not read the config file; check that the path is accessible`;case`unparseable`:return`config could not be parsed`;case`oversize`:return`config too large to edit safely`;case`duplicate-container`:return`duplicate server block`;case`no-native-writer`:return`no format-preserving writer available`;case void 0:return`config not readable`;default:throw Error(`unhandled MCP decline reason: ${e}`)}}function Vo(e,t){let n=[],r=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),i=e.editors.some(e=>e.action===`failed`)||e.projectSkills.some(e=>e.action===`failed`),a=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`);e.didGitInit&&n.push(`Initialized git repo at ${t}/.git/ (default branch: main)`),e.rootGitignoreCreated&&n.push(`Seeded .gitignore at ${t}/.gitignore (.DS_Store)`);let s=j(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(O(`Content scaffolded at ${s}/`)),e.contentCreated.length>0&&n.push(` Created: ${e.contentCreated.join(`, `)}`),e.contentUpdated.length>0&&n.push(` Updated: ${e.contentUpdated.join(`, `)}`)):n.push(O(`Content already present at ${s}/`)),e.contentSkipped.length>0&&n.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),n.push(``),e.mcpError&&e.editors.length===0)n.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0){if(n.push(O(`MCP server configuration:`)),e.mcpAction===`skipped-flag`)n.push(` MCP config not written — use without --no-mcp to configure editors`);else if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}else n.push(` No supported editor config directories detected; skipped MCP registration`)}else if(a)n.push(`MCP config not written — use without --no-mcp to configure editors`);else if(o)n.push(O(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(O(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?M(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),i=r.serverName===`open-knowledge`?``:` (${r.serverName})`,a=r.configScope===`project`?` (project)`:``,o=`${r.label}${a}`,s=` `.repeat(Math.max(1,20-o.length)),c=r.editorId===`claude-desktop`&&(r.action===`written`||r.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(r.action){case`written`:n.push(` ${o}${s}${e} ${E(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${E(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${Ee(`FAILED`)}: ${r.error}`);break;case`declined`:n.push(` ${o}${s}${e} left unchanged (${Bo(r.declineReason)})`);break;case`skipped-flag`:break;default:r.action}}if(e.projectScopeUnsupportedLabels&&e.projectScopeUnsupportedLabels.length>0){let t=e.projectScopeUnsupportedLabels.join(`, `),r=e.projectScopeUnsupportedLabels.length===1?`does`:`do`;n.push(` ${t} ${r} not support project-level config; skipped`)}}if(e.projectSkills.length>0){n.push(``),n.push(O(`Project-local skills:`));for(let r of e.projectSkills){let e=`${r.label} (project)`,i=` `.repeat(Math.max(1,20-e.length)),a=r.path?M(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${E(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${E(`updated`)}`);break;case`skipped-unsupported`:n.push(` ${e}${i}no known project skill surface; skipped`);break;case`skipped-prerequisite`:n.push(` ${e}${i}OpenKnowledge MCP is not configured; skipped`);break;case`failed`:n.push(` ${e}${i}${a} ${Ee(`FAILED`)}: ${r.error}`)}}}if(i&&(n.push(``),n.push(`For failed editors, add the MCP server entry or project skill manually. See:`),n.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){n.push(``),n.push(`Project MCP configs found:`);for(let r of e.legacyProjectConfigs)n.push(` ${r.label} ${M(t,r.path)}`);n.push(` These project-local files may override the global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(n.push(``),n.push(O(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>Y[e]??e),r=t.length>0?t.join(`, `):`the shared ~/.agents store`;n.push(` open-knowledge ${E(`installed for ${r}`)}`),n.push(` ${T(`Counted on skills.sh (skill name + source repo, once per machine).`)}`),n.push(` ${T(`Opt out: DO_NOT_TRACK=1, or Settings → User → Preferences.`)}`);break}case`skip-current`:n.push(` open-knowledge ${E(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${T(`skipped for this run (--no-skills)`)}`),n.push(` ${T(`Nothing was installed or removed. Any built-in skills already on this`)}`),n.push(` ${T(`machine are untouched. Run init without the flag to install them:`)}`),n.push(` ${T(` ok init`)}`);break;case`no-hosts`:n.push(` open-knowledge ${T(`skipped — no supported agent host detected in your home directory`)}`);break;case`failed`:n.push(` ${D(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${D(` ok repair-skills`)}`)}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(D(`⚠ --content-dir ${e.contentDirRequested} ignored — .ok/config.yml already exists`)),n.push(` Edit .ok/config.yml → content.dir directly to change the content scope.`)):e.contentDir!==void 0&&e.contentDir!==`.`?(n.push(``),n.push(`Content scope set to ${e.contentDir}/ (content.dir in .ok/config.yml).`)):e.gitRootPromoted&&e.contentDir===`.`&&e.contentDirRequested===void 0&&(n.push(``),n.push(D(`⚠ Content scope promoted to the git repo root`)),n.push(` .ok/ was initialized at ${t} because it contains a .git folder (one .ok/ per git repo),`),n.push(` not the sub-folder you ran \`ok init\` in${e.promotedFromDir?` (${e.promotedFromDir})`:``}. The whole repo is now the content scope.`),e.promotedFromDir&&(n.push(" To scope to just that sub-folder, re-run `ok init --content-dir .` from there, or set"),n.push(` content.dir: ${e.promotedFromDir} in .ok/config.yml.`))),e.preview?(n.push(``),n.push(Oe(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),n.push(``),n.push(...Ko(e.sharing,t)),r){let t=new Set,r=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).filter(e=>!t.has(e.editorId)&&t.add(e.editorId)).map(e=>e.label);n.push(``),n.push(`${E(`✓`)} ${O(`Next steps:`)}`),n.push(` 1. Open your editor (${w(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${w(`ok seed --list-packs`)} — browse the starter packs`),n.push(` - ${w(`ok seed`)} — scaffold an empty repo`),n.push(` 4. Ask your agent to capture a source, research a topic, or build a wiki —`),n.push(` the procedures ship as skills alongside the MCP tools.`)}return n.join(`
|
|
691
691
|
`)}function Ho(e,t){return{projectRoot:e.projectRoot,gitRootPromoted:e.gitRootPromoted,promotedFromDir:e.promotedFromDir??null,contentDir:t.contentDir,contentDirRequested:e.contentDirRequested??null,contentDirApplied:e.contentDir!==void 0,contentFileCount:t.contentFileCount,previewError:e.previewWarning??null,didGitInit:e.didGitInit,mcpAction:e.mcpAction,editors:e.editors.map(e=>({editorId:e.editorId,label:e.label,action:e.action,configPath:e.configPath,scope:e.configScope===`project`?`project`:`user`}))}}function Uo(e,t){let n=[];for(let r of Gr)r!==`claude-desktop`&&Do(Q[r],e,t)&&n.push(r);return n}function Wo(){let e={log:console.log,info:console.info,debug:console.debug},t=(...e)=>{process.stderr.write(`${e.map(e=>typeof e==`string`?e:Ke(e)).join(` `)}\n`)};return console.log=t,console.info=t,console.debug=t,()=>{console.log=e.log,console.info=e.info,console.debug=e.debug}}function Go(){return new ut(`init`).description(`Scaffold .ok/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the .ok/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).option(`--content-dir <dir>`,`Limit content to <dir> instead of the whole project. <dir> is interpreted relative to your current directory (e.g. "." = the folder you run the command in), then saved to .ok/config.yml as content.dir.`).option(`--json`,`Emit a structured JSON summary to stdout (diagnostics stay on stderr)`).option(`--skills <ids>`,`Install only the named user-global skill bundles (comma list: discovery,write-skill)`).option(`--no-skills`,`Do not install any user-global skill bundles`).addOption(new ft(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new ft(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new ft(`--local-only`,`Keep OK config out of git via .git/info/exclude (per-clone, not committed)`).conflicts(`shared`)).action(async e=>{let t=process.cwd(),n=e.shared?`shared`:e.localOnly?`local-only`:void 0,r=e.json?Wo():null;try{let r;try{r=await Lo({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope,sharing:n,contentDir:e.contentDir,skills:e.skills})}catch(e){if(e instanceof $||e instanceof te){process.stderr.write(`${e.message}\n`),process.exitCode=64;return}if(e instanceof ne||e instanceof se){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof he){process.stderr.write(`open-knowledge could not initialize a git repo for this project. Re-run, or run 'git init' yourself in the project folder.
|
|
692
|
-
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}let i=r.contentDir??`.`,a=null,{loadConfig:o}=await import(`./loader-
|
|
692
|
+
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}let i=r.contentDir??`.`,a=null,{loadConfig:o}=await import(`./loader-BzS64wOt.mjs`),{resolveContentDir:s}=await import(`./dist-CmcNpgS2.mjs`),c;try{c=o(r.projectRoot).config,i=c.content.dir}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}if(c)try{let{previewContent:e}=await import(`./preview-BwExCg0_.mjs`),t=s(c,r.projectRoot);r.preview=e({projectDir:r.projectRoot,contentDir:t}),a=r.preview.totalCount}catch(e){r.previewWarning=e instanceof Error?e.message:String(e)}e.json?process.stdout.write(`${JSON.stringify(Ho(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Vo(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function Ko(e,t){let n=[];switch(e.kind){case`applied`:return n.push(O(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?(n.push(` ${E(`local-only`)} — appended ${e.appended.length} path(s) to ${O(`${t}/.git/info/exclude`)} (per-clone, not committed).`),e.removed.length>0&&n.push(` cleared ${e.removed.length} stale entry(s) left by an older version: ${e.removed.join(`, `)}.`)):e.action===`cleaned`?n.push(` ${E(`local-only`)} — already excluded; cleared ${e.removed.length} stale entry(s) left by an older version: ${e.removed.join(`, `)}.`):e.action===`noop`&&e.alreadyPresent.length>0?n.push(` ${E(`local-only`)} — already excluded; nothing to do.`):n.push(` ${E(`local-only`)}`):e.action===`removed`?n.push(` ${E(`shared`)} — removed OK paths from ${O(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${E(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(D(`Sharing mode: switch to local-only deferred`));for(let t of e.remediation.split(`
|
|
693
693
|
`))n.push(t.length>0?` ${t}`:``);return n.push(` Re-run ${w(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(D(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${w(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${w(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(D(`Sharing mode unavailable: ${e.reason}.`));return n}}export{yi as $,wa as A,$i as B,Ga as C,ct as Ct,Ma as D,La as E,sa as F,qi as G,Wi as H,va as I,Y as J,Ki as K,ua as L,ya as M,la as N,Ca as O,oa as P,bi as Q,_a as R,Xa as S,ut as St,Ba as T,Ui as U,Ji as V,Yi as W,Kr as X,Q as Y,X as Z,Lo as _,Zt as _t,Ho as a,Z as at,No as b,H as bt,Vo as c,li as ct,Do as d,J as dt,xi as et,Po as f,Nr as ft,So as g,Hn as gt,wo as h,$n as ht,Ro as i,Ci as it,ba as j,Sa as k,Ko as l,Wr as lt,bo as m,Fr as mt,Eo as n,ni as nt,Io as o,wi as ot,Co as p,Mr as pt,Gr as q,Ao as r,ai as rt,Uo as s,Fi as st,$ as t,Si as tt,Go as u,Ur as ut,co as v,Jt as vt,Ha as w,ft as wt,Oo as x,xt,ko as y,qt as yt,Gi as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Co as e,Do as t,bo as n}from"./dist-
|
|
1
|
+
import{Co as e,Do as t,bo as n}from"./dist-Cao3SE0M.mjs";import{A as r,M as i,O as a}from"./init-S1_zVNWd.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-CejMmhKV.mjs";import{join as c}from"node:path";import{readFileSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(o){let f=s(c(o,`.claude`,`launch.json`));if(f.kind!==`ready`)return f;let m=f.path,h;try{h=l(m,`utf-8`)}catch(e){return{kind:`declined`,reason:i(e)}}let g=[],_=e(h,g,u)??void 0;if(g.some(e=>!d(e,h))||_?.type!==`object`)return{kind:`declined`,reason:`unparseable`};let v=n(_).configurations;if(!Array.isArray(v))return{kind:`not-present`};let y=v.findIndex(p);if(y===-1)return{kind:`not-present`};let{text:b,changed:x}=r(h,[`configurations`,y]);return x?(t(m,b,{mode:a(m)}),{kind:`removed`}):{kind:`not-present`}}function p(e){if(!o(e))return!1;let t=e;if(t.name!==`open-knowledge-ui`||!Array.isArray(t.runtimeArgs))return!1;let n=t.runtimeArgs;return t.runtimeExecutable===`/bin/sh`?n.length===3&&n[0]===`-l`&&n[1]===`-c`&&typeof n[2]==`string`&&/^# ok-ui-v[1-9]\d*$/.test(n[2].split(/\r?\n/,1)[0]??``):t.runtimeExecutable===`npx`?m.some(e=>h(n,e)):t.runtimeExecutable===`powershell`&&n.length===4&&n[0]===`-NoProfile`&&n[1]===`-NonInteractive`&&n[2]===`-Command`&&typeof n[3]==`string`&&/^# ok-ui-win-v[1-9]\d*$/.test(n[3].split(/\r?\n/,1)[0]??``)}const m=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge@latest`,`ui`]];function h(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}export{f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-ymIF6hGV.mjs";export{e as loadConfig};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{as as e,ju as t,rl as n,tl as r,to as i,ul as a,xl as o}from"./md-manager-BGnqyqi1-
|
|
1
|
+
import{as as e,ju as t,rl as n,tl as r,to as i,ul as a,xl as o}from"./md-manager-BGnqyqi1-BZhj8566.mjs";import{jo as s,ko as c,x as l}from"./dist-Cao3SE0M.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-B6lHSTE5.mjs";import{resolve as f}from"node:path";import{existsSync as p,readFileSync as m}from"node:fs";import{realpath as h}from"node:fs/promises";var g=t();async function _(e){let t=f(e);try{return await h(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function v(e){if(!p(e))return{value:null,path:e,source:null,doc:null};let t;try{t=m(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,g.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 u(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function y(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=a({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...r,source:e}}return r})}function b(t){let a=t??process.cwd(),u=[],p=[],m=[],h=[],g=s(`user`,a),_=c({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(e,t=!1)=>{let n=v(e);if(n.diagnostic!==void 0&&p.push(n.diagnostic),n.value===null)return{};let a=r({value:n.value,file:n.path,source:n.source,doc:n.doc});p.push(...a),u.push(e);let s=a.length>0?o(n.value):n.value;return t&&h.push(...i({value:s,file:n.path,source:n.source,doc:n.doc})),s},x=f(a,`.ok`,d),S=b(x,!0),C=b(s(`project-local`,a)),w=e(_.value,S,C),T=l.safeParse(w);if(!T.success){let e=v(x),t={code:`SCHEMA_INVALID`,issues:y(T.error.issues,e)};throw Error(n(t))}return{config:T.data,sources:u,diagnostics:p,sidelined:m,ignoredCommittedKeys:h}}function x(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??b,r=new Map,i=new Map,a=_(e.startupCwd);return async o=>{let s=await _(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{b as n,x as t};
|
|
@@ -468,7 +468,7 @@ $2`).split(`
|
|
|
468
468
|
`),patterns:[...t],lineCount:n}}function Loe(e){return a3(e).redacted}function Roe(e,t,n=3){let r=RegExp(`^ {0,3}(\\${e}+)[ \\t]*$`),i=Math.max(3,n);for(let e of t.split(`
|
|
469
469
|
`)){let t=r.exec(e);t&&t[1].length>=i&&(i=t[1].length+1)}return i}function zoe(e){let t=[],n=0,r=()=>{t.length>0&&(n+=1)},i=e=>{for(;n>0;)t.push({type:`break`}),--n;t.push(e)},a=e=>{e.split(`
|
|
470
470
|
`).forEach((e,t)=>{t>0&&r(),e.length>0&&i({type:`text`,value:e})})},o=e=>{let t=e.ordered===!0,n=typeof e.start==`number`?e.start:1,a=e.data,o=typeof a?.bulletMarker==`string`?a.bulletMarker:`-`,c=typeof a?.listMarkerDelimiter==`string`?a.listMarkerDelimiter:`.`;e.children.forEach((e,a)=>{a>0&&r();let l=t?`${n+a}${c} `:`${o} `;i({type:`text`,value:l}),e.children.forEach((e,t)=>{t>0&&r(),s(e)})})},s=e=>{switch(e.type){case`paragraph`:case`heading`:e.children.forEach(i);return;case`list`:o(e);return;case`code`:case`html`:a(e.value);return;case`thematicBreak`:i({type:`text`,value:e.data?.sourceRaw??`---`});return;default:{let t=e;if(Array.isArray(t.children)&&t.children.length>0){t.children.forEach((e,t)=>{t>0&&r(),s(e)});return}let n=e;if(typeof n.value==`string`){a(n.value);return}console.warn(JSON.stringify({event:`table-cell-flatten-dropped-block`,nodeType:e.type}))}}};return e.forEach((e,t)=>{t>0&&r(),s(e)}),t}function o3(e,t){let n=Array.isArray(e.attrs.attributes)?e.attrs.attributes.filter(e=>typeof e==`object`&&!!e&&`type`in e):[],r=e.attrs.props??{},i=new Map,a=new Set;if(t)for(let e of t)e.omitOnDefault===!0&&`defaultValue`in e&&e.defaultValue!==void 0&&i.set(e.name,e.defaultValue),e.type===`string`&&e.required===!1&&e.defaultValue===void 0&&a.add(e.name);for(let[e,t]of Object.entries(r)){let r=n.findIndex(t=>t.type===`mdxJsxAttribute`&&t.name===e);if(i.has(e)&&Object.is(i.get(e),t)){r>=0&&n.splice(r,1);continue}if(a.has(e)&&t===``){r>=0&&n.splice(r,1);continue}if(r>=0){let e=n[r];if(e.type===`mdxJsxAttribute`&&e.value!=null&&typeof e.value==`object`&&e.value.type===`mdxJsxAttributeValueExpression`&&Boe(e.value.value,t))continue}let o=s3(e,t);r>=0?n[r]=o:n.push(o)}return n}function Boe(e,t){try{return JSON.stringify(JSON.parse(e))===JSON.stringify(t)}catch{return!1}}function s3(e,t){if(t===!0)return{type:`mdxJsxAttribute`,name:e,value:null};if(t===!1)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:`false`}};if(t==null)return{type:`mdxJsxAttribute`,name:e,value:null};if(typeof t==`string`)return{type:`mdxJsxAttribute`,name:e,value:t};if(typeof t==`number`)return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:JSON.stringify(t)}};if(typeof t==`object`){let n;try{n=JSON.stringify(t)}catch{n=String(t)}return{type:`mdxJsxAttribute`,name:e,value:{type:`mdxJsxAttributeValueExpression`,value:n}}}return{type:`mdxJsxAttribute`,name:e,value:String(t)}}function c3(e,t,n,r){return{type:`mdxJsxFlowElement`,name:e,attributes:o3(t,r),children:n.all(t),data:{}}}function Voe(e,t,n){let r=t.attrs.props?.children;return{type:`mdxJsxTextElement`,name:e,attributes:o3(t,n),children:typeof r==`string`&&r!==``?[{type:`text`,value:r}]:[],data:{}}}const Hoe=/^[A-Za-z0-9]{20,}$/,Uoe=/^(?:\d+s?|(?:\d+h)?(?:\d+m)?(?:\d+s)?)$/;function Woe(e){let t=e.toLowerCase();return t===`loom.com`||t===`www.loom.com`}function Goe(e){let t=e.pathname.match(/^\/(?:share|embed)\/([A-Za-z0-9]+)\/?$/);if(!t)return null;let n=t[1]??``;return Hoe.test(n)?n:null}function Koe(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!Woe(t.hostname))return null;let n=Goe(t);if(!n)return null;let r=t.searchParams.get(`t`);return{id:n,startRaw:r&&r.length>0&&Uoe.test(r)?r:null}}function l3(e){return Koe(e)!==null}function qoe(e){let t=e.toLowerCase();return t===`vimeo.com`||t===`www.vimeo.com`||t===`player.vimeo.com`}function u3(e){if(typeof e!=`string`||e.length===0)return!1;let t;try{t=new URL(e)}catch{return!1}return t.protocol!==`http:`&&t.protocol!==`https:`?!1:qoe(t.hostname)}const d3=/^[A-Za-z0-9_-]{11}$/;function Joe(e){let t=e.toLowerCase();return t===`youtube.com`||t===`www.youtube.com`||t===`m.youtube.com`||t===`music.youtube.com`||t===`youtu.be`||t===`youtube-nocookie.com`||t===`www.youtube-nocookie.com`}function Yoe(e){if(e.length===0)return null;if(/^[0-9]+$/.test(e)){let t=Number.parseInt(e,10);return t>0?t:null}let t=e.match(/^(?:([0-9]+)h)?(?:([0-9]+)m)?(?:([0-9]+)s?)?$/);if(!t)return null;let n=t[1]?Number.parseInt(t[1],10):0,r=t[2]?Number.parseInt(t[2],10):0,i=t[3]?Number.parseInt(t[3],10):0,a=n*3600+r*60+i;return a>0?a:null}function Xoe(e){if(e.hostname.toLowerCase()===`youtu.be`){let t=e.pathname.replace(/^\//,``).split(`/`)[0]??``;return d3.test(t)?t:null}if(e.pathname===`/watch`){let t=e.searchParams.get(`v`)??``;return d3.test(t)?t:null}let t=e.pathname.match(/^\/(?:embed|shorts|v)\/([A-Za-z0-9_-]{11})\/?$/);return t?t[1]??null:null}function Zoe(e){if(typeof e!=`string`||e.length===0)return null;let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`||!Joe(t.hostname))return null;let n=Xoe(t);if(!n)return null;let r=t.searchParams.get(`t`)??t.searchParams.get(`start`)??``;return{id:n,startSeconds:r.length>0?Yoe(r):null,noCookie:t.hostname.toLowerCase().endsWith(`youtube-nocookie.com`)}}const f3=[{name:`type`,type:`enum`,enumValues:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`],defaultValue:`note`,required:!1,description:`Callout variant`},{name:`title`,type:`string`,required:!1,description:`Optional heading shown above the body`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Lightbulb`)",iconPicker:!0},{name:`color`,type:`string`,required:!1,advanced:!0,description:"Optional accent color override (hex — e.g. `#F05032`)",colorPicker:!0},{name:`collapsible`,type:`boolean`,required:!1,defaultValue:!1,advanced:!0,description:"Render as a foldable `<details>` (Obsidian `[!TYPE]+/-`)"},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,description:`When collapsible, start in the open state`,hideWhen:e=>e.collapsible!==!0},{name:`children`,type:`reactnode`,required:!0,description:`Callout content`}],p3=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Image source URL`,accept:Du,autoFocus:!0},{name:`alt`,type:`string`,required:!0,description:`Alt text`},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Image width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Image height`},{name:`srcset`,type:`string`,required:!1,advanced:!0,description:`Responsive image candidate set (e.g. "x.png 1x, y.png 2x")`},{name:`sizes`,type:`string`,required:!1,advanced:!0,description:`Responsive image sizes hint paired with srcset`},{name:`loading`,type:`enum`,enumValues:[`eager`,`lazy`],defaultValue:`lazy`,required:!1,advanced:!0,omitOnDefault:!0,description:`Native img loading strategy (defaults to lazy)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`decoding`,type:`enum`,enumValues:[`sync`,`async`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Hint for how the browser should decode the image`},{name:`fetchpriority`,type:`enum`,enumValues:[`high`,`low`,`auto`],defaultValue:`auto`,required:!1,advanced:!0,omitOnDefault:!0,description:`Resource fetch priority hint`},{name:`crossorigin`,type:`enum`,enumValues:[`anonymous`,`use-credentials`],required:!1,advanced:!0,description:`CORS mode for the image fetch`},{name:`referrerpolicy`,type:`string`,required:!1,advanced:!0,description:`Referrer policy for the image fetch (HTML referrerpolicy values)`},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],m3=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Embedded page URL (must start with http:// or https://)`,autoFocus:!0},{name:`title`,type:`string`,required:!1,description:`Iframe title (accessible label for screen readers)`},{name:`width`,type:`string`,required:!1,advanced:!0,description:`Embed width as a CSS length (e.g. "100%", "640px")`,cssLengthInput:!0},{name:`height`,type:`string`,required:!1,advanced:!0,description:`Embed height as a CSS length (e.g. "26rem", "480px")`,cssLengthInput:!0},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],h3=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Video source URL`,accept:Ou,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 video controls (defaults to true)`,hideWhen:e=>typeof e.src==`string`&&(u3(e.src)||l3(e.src))},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`poster`,type:`string`,required:!1,advanced:!0,description:`Poster image URL shown before playback`,accept:Du,hideWhen:e=>typeof e.src==`string`&&(u3(e.src)||l3(e.src))},{name:`width`,type:`number`,required:!1,advanced:!0,description:`Video width`},{name:`height`,type:`number`,required:!1,advanced:!0,description:`Video height`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`,hideWhen:e=>typeof e.src==`string`&&l3(e.src)},{name:`playsinline`,type:`boolean`,required:!1,advanced:!0,description:`Play inline on iOS rather than entering fullscreen`,hideWhen:e=>typeof e.src==`string`&&(u3(e.src)||l3(e.src))},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the video to preload`,hideWhen:e=>typeof e.src==`string`&&(Zoe(e.src)!==null||u3(e.src)||l3(e.src))},{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`],defaultValue:`center`,required:!1,omitOnDefault:!0,description:`Alignment within the column`,hidden:!0}],g3=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`Audio source URL`,accept:ku,autoFocus:!0},{name:`controls`,type:`boolean`,required:!1,defaultValue:!0,advanced:!0,omitOnDefault:!0,description:`Show native HTML5 audio controls (defaults to true)`},{name:`autoplay`,type:`boolean`,required:!1,advanced:!0,description:`Begin playback as soon as possible (usually requires muted)`},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Native HTML title attribute (tooltip)`},{name:`muted`,type:`boolean`,required:!1,advanced:!0,description:`Mute audio on load`},{name:`loop`,type:`boolean`,required:!1,advanced:!0,description:`Restart from the beginning when playback ends`},{name:`preload`,type:`enum`,enumValues:[`none`,`metadata`,`auto`],required:!1,advanced:!0,description:`Hint for how much of the audio to preload`}],_3=[{name:`title`,type:`string`,required:!0,description:`Heading shown inside the <summary>`},{name:`defaultOpen`,type:`boolean`,required:!1,defaultValue:!1,description:`When true, the block renders expanded on initial load`},{name:`icon`,type:`string`,required:!1,advanced:!0,description:"Custom lucide icon override (e.g. `lucide:Rocket`)",iconPicker:!0},{name:`description`,type:`string`,required:!1,advanced:!0,description:`Optional subtitle rendered below the title inside <summary>`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#advanced-options`)"},{name:`name`,type:`string`,required:!1,advanced:!0,description:`HTML5 <details name=> group — siblings with the same name are mutually exclusive`}],Qoe=[f3[0],f3[1],f3[4],f3[5],f3[6]],$oe=[p3[0],p3[1],p3[7]],ese=[_3[0],_3[1],_3[4],_3[5]],tse=[{name:`align`,type:`enum`,enumValues:[`center`,`left`,`right`,`justify`],required:!1,defaultValue:`center`,description:"Block alignment from the `<div align>` attribute."},{name:`tag`,type:`string`,required:!1,defaultValue:`div`,hidden:!0,description:`Source wrapper tag (div or center).`},{name:`sourceAttrs`,type:`string`,required:!1,defaultValue:``,hidden:!0,description:`Raw opener-tag attribute bytes preserved for round-trip.`}],nse=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Alt text (Obsidian alias syntax: `![[file.png|alt text]]`)"}],rse=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[clip.mp4|title]]`)"}],ise=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Title text (Obsidian alias syntax: `![[song.mp3|title]]`)"}],v3=[{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#install-tabs`)"}],y3=[{name:`label`,type:`string`,required:!0,autoFocus:!0,defaultValue:`Tab`,description:`Tab strip label — shown in the clickable pill at the top`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#tab-npm`)"}],b3=[{name:`formula`,type:`string`,required:!0,autoFocus:!0,language:`latex`,description:`LaTeX math source (rendered with KaTeX in the browser)`},{name:`id`,type:`string`,required:!1,advanced:!0,description:"HTML id attribute for deep-linking (e.g. `#eq-pythagoras`)"},{name:`language`,type:`string`,required:!1,advanced:!0,description:"Forward-compat hint for the math source language (default `latex`). Reserved for future MathJax / Typst / AsciiMath substrates."}],ase=[b3[0]],ose=[b3[0]],sse=[{name:`chart`,type:`string`,required:!0,hidden:!0,description:`Mermaid chart source (graph / flowchart / sequenceDiagram / class / state / etc.)`}],cse=[{name:`alias`,type:`string`,required:!1,defaultValue:``,description:"Display name override (Obsidian alias syntax: `![[file.zip|label]]`)"}],x3=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`File URL`,accept:[`*/*`],autoFocus:!0}],S3=[{name:`src`,type:`string`,required:!0,defaultValue:``,description:`PDF source URL`,accept:Au,autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded PDF viewer`},{name:`anchor`,type:`string`,required:!1,advanced:!0,description:"PDF viewer parameters as a single URL-fragment string (e.g. `page=3&height=600`)"}],C3=[{name:`src`,type:`string`,required:!0,description:"Path to the `.excalidraw` board this embed renders",autoFocus:!0},{name:`title`,type:`string`,required:!1,advanced:!0,description:`Accessible label for the embedded board`}],w3=[{name:`src`,type:`string`,required:!0,description:"Path of the source doc, extension-less (e.g. `api-spec`).",autoFocus:!0},{name:`anchor`,type:`string`,required:!0,description:"Id of the `<MirrorSource>` block within the source doc."}],T3=[{name:`id`,type:`string`,required:!0,description:"Stable id agents and authors use to reference this block from `<Mirror>` elsewhere.",autoFocus:!0},{name:`children`,type:`reactnode`,required:!0,description:`Block content this MirrorSource owns — paragraphs, callouts, code, nested JSX, anything.`}];function E3(e){return e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`).replace(/>/g,`>`)}function lse(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function D3(e){let t=e.attrs.props,n=t?.target??``,r=typeof t?.alias==`string`&&t.alias.length>0?t.alias:null,i=typeof t?.anchor==`string`&&t.anchor.length>0?t.anchor:null,a=typeof t?.sourceTarget==`string`?t.sourceTarget:null,o=typeof t?.sourceAnchor==`string`?t.sourceAnchor:null,s=typeof t?.sourceAlias==`string`?t.sourceAlias:null,c=r??(i?`${n}#${i}`:n);return{type:`wikiLinkEmbed`,value:c,data:{target:n,anchor:i,alias:r,sourceTarget:a,sourceAnchor:o,sourceAlias:s},children:[{type:`text`,value:c}]}}const O3=[{name:`Callout`,surface:`canonical`,hasChildren:!0,props:f3,icon:`MessageSquareWarning`,category:`content`,displayName:`Callout`,description:`Alert / admonition with 15 type variants — 5 GFM (note, tip, important, warning, caution) plus 10 Obsidian-parity (abstract, info, todo, success, question, failure, danger, bug, example, quote)`,searchTerms:[`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`,`alert`,`admonition`,`callout`],serialize:(e,t)=>c3(`Callout`,e,t,f3)},{name:`img`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:p3,icon:`Image`,category:`media`,displayName:`Image`,description:`Image with click-to-zoom and HTML-native attributes`,searchTerms:[`image`,`zoom`,`picture`,`photo`],placeholder:{label:`Add an image`},serialize:(e,t)=>c3(`img`,e,t,p3)},{name:`video`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:h3,icon:`SquarePlay`,category:`media`,displayName:`Video`,description:`HTML5 video player with native controls`,searchTerms:[`video`,`media`,`player`,`mp4`,`webm`,`movie`],placeholder:{label:`Add a video`},serialize:(e,t)=>c3(`video`,e,t,h3)},{name:`audio`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:g3,icon:`Volume2`,category:`media`,displayName:`Audio`,description:`HTML5 audio player with native controls`,searchTerms:[`audio`,`sound`,`music`,`mp3`,`podcast`,`player`],placeholder:{label:`Add audio`},serialize:(e,t)=>c3(`audio`,e,t,g3)},{name:`Pdf`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:S3,icon:`FileText`,category:`media`,displayName:`PDF`,description:"Embedded PDF viewer (`#page=N` to open at page N, `#height=N` for viewer height)",searchTerms:[`pdf`,`document`,`embed`,`pdfjs`],placeholder:{label:`Add a PDF`},serialize:(e,t)=>c3(`Pdf`,e,t,S3)},{name:`Excalidraw`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:C3,icon:`PenTool`,category:`embed`,displayName:`Excalidraw`,description:"Embedded snapshot of an `.excalidraw` board, linking to its canvas editor",searchTerms:[`excalidraw`,`board`,`whiteboard`,`sketch`,`drawing`,`canvas`],serialize:(e,t)=>c3(`Excalidraw`,e,t,C3)},{name:`File`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:x3,icon:`Paperclip`,category:`media`,displayName:`File`,description:`Downloadable file attachment — inline row with name + size + download link`,searchTerms:[`file`,`attachment`,`download`,`document`,`zip`,`docx`,`doc`],placeholder:{label:`Add a file`},serialize:(e,t)=>c3(`File`,e,t,x3)},{name:`Embed`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:m3,icon:`AppWindow`,category:`embed`,displayName:`Embed`,description:'Inline web embed (iframe) — drop a URL, get a resizable preview pane. For YouTube / Vimeo / Loom prefer `<video src="…">` (player props, click-facade); `<Embed>` auto-rewrites watch URLs as a fallback.',searchTerms:[`embed`,`iframe`,`website`,`page`,`inline`,`frame`,`preview`],placeholder:{label:`Embed a URL`},serialize:(e,t)=>c3(`Embed`,e,t,m3)},{name:`Accordion`,surface:`canonical`,hasChildren:!0,props:_3,icon:`ChevronRight`,category:`content`,displayName:`Accordion`,description:"Standalone expand/collapse via native HTML5 <details>/<summary>. Group siblings with the `name` prop for exclusive-accordion UX.",searchTerms:[`accordion`,`expandable`,`details`,`disclosure`,`collapse`,`fold`],exampleBody:`Body content revealed when the accordion is expanded.`,serialize:(e,t)=>c3(`Accordion`,e,t,_3)},{name:`Toggle`,surface:`canonical`,hasChildren:!0,props:_3,icon:`ChevronRight`,category:`content`,displayName:`Toggle`,description:"Standalone expand/collapse block (Notion-style). Same render + props as `<Accordion>` — pick whichever vocabulary matches the vault.",searchTerms:[`toggle`,`collapsible`,`expand`,`details`,`disclosure`,`fold`],exampleBody:`Body content revealed when the toggle is expanded.`,serialize:(e,t)=>c3(`Toggle`,e,t,_3)},{name:`Tabs`,surface:`canonical`,hasChildren:!0,emptyChildName:`Tab`,props:v3,icon:`LayoutPanelTop`,category:`content`,displayName:`Tabs`,description:"Horizontal tab strip + active panel below. Each `<Tab>` child is one panel; clickable pills at the top switch the active one. Active selection is ephemeral (resets on reload).",searchTerms:[`tabs`,`tabbed`,`panels`,`tabgroup`,`switcher`],exampleBody:`<Tab label="One">Body of the first tab panel.</Tab>
|
|
471
|
-
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>c3(`Tabs`,e,t,v3)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:y3,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>c3(`Tab`,e,t,y3)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:b3,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>c3(`Math`,e,t,b3)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:sse,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:w3,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>c3(`Mirror`,e,t,w3)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:T3,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>c3(`MirrorSource`,e,t,T3)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:Qoe,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:$oe,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:nse,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:D3},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:rse,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:D3},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:ise,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:D3},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:cse,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:D3},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:ese,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${E3(n.name)}"`:``,a=n?.id?` id="${E3(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${lse(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:tse,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${E3(i)}"`):`${a} align="${E3(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:ase,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:ose,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],use={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>c3(e.attrs.componentName||`*`,e,t)};function dse(){let e=new Map;e.set(`*`,use);for(let t of O3)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}function fse(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const k3={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxActionAborted:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},jsxChromeDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function A3(){k3.parseFallback.blockLevel++}function j3(){k3.parseFallback.wholeDoc++}function pse(){k3.parseFallback.wholeDocBudget++}function mse(){let e=fse();return{parseFallback:{...k3.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...k3.jsxRenderFailure},jsxAutoConvertFailed:{...k3.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...k3.jsxAutoConvertSucceeded},jsxActionAborted:{...k3.jsxActionAborted},jsxPropDropped:{...k3.jsxPropDropped},jsxMoveFailed:{...k3.jsxMoveFailed},jsxStuckCopyFailed:{...k3.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...k3.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...k3.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...k3.jsxKeyboardDeleteFailed},jsxChromeDeleteFailed:{...k3.jsxChromeDeleteFailed},blockGripClickSelectFailed:{...k3.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...k3.jsxArrowNodeSelectFailed}}}const hse=/^(`{3,}|~{3,})/gm;function M3(e){let t=[],n=null;for(let r of e.matchAll(hse)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function N3(e,t){return t.some(([t,n])=>e>=t&&e<n)}const P3=/`+/g;function gse(e){let t=[];P3.lastIndex=0;for(let n of e.matchAll(P3))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const _se=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function F3(e){let t=M3(e),n=[];for(let r of e.matchAll(_se))N3(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
471
|
+
<Tab label="Two">Body of the second tab panel.</Tab>`,serialize:(e,t)=>c3(`Tabs`,e,t,v3)},{name:`Tab`,surface:`canonical`,hasChildren:!0,props:y3,icon:`PanelTop`,category:`content`,displayName:`Tab`,description:"A single tab panel inside a `<Tabs>` container — carries the strip label and the block-content body.",searchTerms:[`tab`,`panel`],exampleBody:"Panel content — must be nested inside a `<Tabs>` parent.",serialize:(e,t)=>c3(`Tab`,e,t,y3)},{name:`Math`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:b3,icon:`Sigma`,category:`content`,displayName:`Math`,description:`Block math equation rendered with KaTeX from a LaTeX source string`,searchTerms:[`math`,`latex`,`equation`,`formula`,`katex`,`tex`],serialize:(e,t)=>c3(`Math`,e,t,b3)},{name:`MermaidFence`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:sse,icon:`Workflow`,category:`content`,displayName:`Mermaid`,placeholder:{label:`Add a Mermaid diagram`},description:"Diagram rendered from Mermaid source (flowchart, sequence, class, state, ER, gantt, pie). Authored exclusively as ` ```mermaid ` fenced code.",searchTerms:[`mermaid`,`diagram`,`flowchart`,`graph`,`sequence`,`sequencediagram`,`class`,`state`,`er`,`erdiagram`,`gantt`,`pie`,`chart`],serialize:e=>({type:`code`,lang:`mermaid`,meta:null,value:e.attrs.props?.chart??``})},{name:`Mirror`,surface:`canonical`,hasChildren:!1,isSelfClosing:!0,props:w3,icon:`CopyPlus`,category:`content`,displayName:`Mirror`,description:"Render a read-only copy of a `<MirrorSource>` block from another doc. Use to keep the same content in sync across multiple docs without copy-paste — edits land at the source, every Mirror reflects the change.",searchTerms:[`mirror`,`sync`,`synced`,`transclude`,`embed`,`reference`,`shared block`],serialize:(e,t)=>c3(`Mirror`,e,t,w3)},{name:`MirrorSource`,surface:`canonical`,hasChildren:!0,props:T3,icon:`GitBranch`,category:`content`,displayName:`Mirror Source`,description:'Mark a block as the source of truth for content that appears in multiple docs. Wrap any block content; `<Mirror src="…" anchor="<id>">` references render this verbatim read-only at every call-site. Edit here, propagate everywhere.',searchTerms:[`mirror source`,`sync source`,`source block`,`master block`,`shared`],exampleBody:"Authoritative content lives inside this block — edits here propagate to every `<Mirror>` that references this id.",serialize:(e,t)=>c3(`MirrorSource`,e,t,T3)},{name:`GFMCallout`,surface:`compat`,hasChildren:!0,props:Qoe,icon:`MessageSquareWarning`,category:`content`,displayName:`GFM Callout`,description:"GFM blockquote alert (`> [!NOTE]`) — read-only compat. Preserves `> [!NOTE]` syntax on round-trip; insert a fresh Callout block for the full prop surface.",rendersAs:`Callout`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=new Set([`note`,`tip`,`important`,`warning`,`caution`,`abstract`,`info`,`todo`,`success`,`question`,`failure`,`danger`,`bug`,`example`,`quote`]),i=n?.type??`note`;return{type:`blockquote`,children:[{type:`html`,value:`[!${(r.has(i.toLowerCase())?i:`note`).toUpperCase()}]${n?.collapsible?n.defaultOpen===!1?`-`:`+`:``}${n?.title?` ${n.title}`:``}`},...t.all(e).filter(e=>{if(e.type!==`paragraph`)return!0;let t=e;return Array.isArray(t.children)&&t.children.length>0})]}}},{name:`CommonMarkImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:$oe,icon:`Image`,category:`media`,displayName:`CommonMark Image`,description:'CommonMark image (``) — read-only compat. Preserves `` syntax on round-trip; insert a fresh Image block for the full HTML-native attribute surface (srcset, sizes, decoding, etc.).',rendersAs:`img`,translateProps:e=>e,serialize:e=>{let t=e.attrs.props;return{type:`paragraph`,children:[{type:`image`,url:t?.sourceUrl??t?.src??``,alt:t?.alt??``,title:t?.title??null}]}}},{name:`WikiEmbedImage`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:nse,icon:`ZoomIn`,category:`media`,displayName:`Wiki Embed Image`,description:"Obsidian-style `![[file.png]]` wiki-embed — read-only compat. Edit the alt-text via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`img`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,alt:t??n}},serialize:D3},{name:`WikiEmbedVideo`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:rse,icon:`Film`,category:`media`,displayName:`Wiki Embed Video`,description:"Obsidian-style `![[clip.mp4]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`video`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:D3},{name:`WikiEmbedAudio`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:ise,icon:`Volume2`,category:`media`,displayName:`Wiki Embed Audio`,description:"Obsidian-style `![[song.mp3]]` wiki-embed — read-only compat. Edit the title via the alias slot; the embed target / anchor stay on the prop bag and round-trip byte-identical.",rendersAs:`audio`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.target==`string`?e.target:``;return{src:e.src,title:t??n}},serialize:D3},{name:`WikiEmbedFile`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:cse,icon:`Paperclip`,category:`media`,displayName:`Wiki Embed File`,description:"Obsidian-style `![[file.zip]]` wiki-embed — read-only compat for arbitrary downloadable attachments. Renders through the `File` canonical (inline row with file-up icon + bold name + optional dim size). Edit the display name via the alias slot.",rendersAs:`File`,translateProps:e=>{let t=typeof e.alias==`string`&&e.alias.length>0?e.alias:null,n=typeof e.size==`string`&&e.size.length>0?e.size:null;return{src:e.src,name:t??void 0,size:n??void 0}},serialize:D3},{name:`HtmlDetailsAccordion`,surface:`compat`,hasChildren:!0,props:ese,icon:`ChevronRight`,category:`content`,displayName:`HTML5 Details`,description:"HTML5 `<details><summary>` collapsible — read-only compat. Preserves `<details>` syntax on round-trip; insert a fresh Accordion block for icon / description / group-name props.",rendersAs:`Accordion`,translateProps:e=>e,serialize:(e,t)=>{let n=e.attrs.props,r=n?.defaultOpen?` open`:``,i=n?.name?` name="${E3(n.name)}"`:``,a=n?.id?` id="${E3(n.id)}"`:``,o=n?.title?.trim(),s=o?`<summary>${lse(o)}</summary>`:``;return{type:`mdxJsxFlowElement`,name:`HtmlDetailsAccordion`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<details${r}${i}${a}>\n${s}`,closer:`</details>`}}}}},{name:`HtmlAlignBlock`,surface:`canonical`,hasChildren:!0,props:tse,icon:`AlignCenter`,category:`content`,displayName:`Align block`,description:"GitHub-style `<div align>` wrapper. Children render as normal blocks with the alignment applied; the `<div align>` syntax is preserved on round-trip.",searchTerms:[`align`,`center`,`centered`,`div`],serialize:(e,t)=>{let n=e.attrs.props,r=n?.tag===`center`?`center`:`div`,i=typeof n?.align==`string`&&n.align?n.align:null,a=typeof n?.sourceAttrs==`string`?n.sourceAttrs:``,o=/(\balign\s*=\s*)(?:"[^"]*"|'[^']*'|[^\s"'<>]+)/i;return i!==null&&(r===`div`||i!==`center`)?a=o.test(a)?a.replace(o,`$1"${E3(i)}"`):`${a} align="${E3(i)}"`:(i===null||r===`center`&&i===`center`)&&(a=a.replace(RegExp(`\\s*${o.source}`,`i`),``)),{type:`mdxJsxFlowElement`,name:`HtmlAlignBlock`,attributes:[],children:t.all(e),data:{htmlBoundary:{opener:`<${r}${a}>`,closer:`</${r}>`}}}}},{name:`DollarMath`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:ase,icon:`Sigma`,category:`content`,displayName:`Dollar Math`,description:"Block math via `$$…$$` syntax — read-only compat. Preserves `$$…$$` form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`math`,value:e.attrs.props?.formula??``})},{name:`MathFence`,surface:`compat`,hasChildren:!1,isSelfClosing:!0,props:ose,icon:`Sigma`,category:`content`,displayName:`Math Fence`,description:"Block math via ` ```math ` fenced code syntax — read-only compat. Preserves the fence form on round-trip; insert a fresh Math block for the full prop surface (id, language).",rendersAs:`Math`,translateProps:e=>e,serialize:e=>({type:`code`,lang:`math`,meta:null,value:e.attrs.props?.formula??``})}],use={name:`*`,surface:`canonical`,hasChildren:!0,props:[],description:`Unregistered component — children editable as markdown`,serialize:(e,t)=>c3(e.attrs.componentName||`*`,e,t)};function dse(){let e=new Map;e.set(`*`,use);for(let t of O3)e.set(t.name,t);return{get(t){return e.get(t)},getOrWildcard(t){return e.get(t)??e.get(`*`)},set(t,n){e.set(t,n)},has(t){return e.has(t)},entries(){return e.entries()}}}function fse(){let e=globalThis;return e.__okYpsCounters||={block:0,inline:0},e.__okYpsCounters}const k3={parseFallback:{blockLevel:0,wholeDoc:0,wholeDocBudget:0},jsxRenderFailure:{},jsxAutoConvertFailed:{},jsxAutoConvertSucceeded:{},jsxPropDropped:{},jsxMoveFailed:{},jsxStuckCopyFailed:{},jsxStuckDeleteFailed:{},jsxPopoverCloseRestoreFailed:{},jsxKeyboardDeleteFailed:{},blockGripClickSelectFailed:{},jsxArrowNodeSelectFailed:{}};function A3(){k3.parseFallback.blockLevel++}function j3(){k3.parseFallback.wholeDoc++}function pse(){k3.parseFallback.wholeDocBudget++}function mse(){let e=fse();return{parseFallback:{...k3.parseFallback},ypsMismatch:{block:e.block,inline:e.inline},jsxRenderFailure:{...k3.jsxRenderFailure},jsxAutoConvertFailed:{...k3.jsxAutoConvertFailed},jsxAutoConvertSucceeded:{...k3.jsxAutoConvertSucceeded},jsxPropDropped:{...k3.jsxPropDropped},jsxMoveFailed:{...k3.jsxMoveFailed},jsxStuckCopyFailed:{...k3.jsxStuckCopyFailed},jsxStuckDeleteFailed:{...k3.jsxStuckDeleteFailed},jsxPopoverCloseRestoreFailed:{...k3.jsxPopoverCloseRestoreFailed},jsxKeyboardDeleteFailed:{...k3.jsxKeyboardDeleteFailed},blockGripClickSelectFailed:{...k3.blockGripClickSelectFailed},jsxArrowNodeSelectFailed:{...k3.jsxArrowNodeSelectFailed}}}const hse=/^(`{3,}|~{3,})/gm;function M3(e){let t=[],n=null;for(let r of e.matchAll(hse)){let e=r[1],i=r.index;n?e[0]===n.marker[0]&&e.length>=n.marker.length&&(t.push([n.offset,i+r[0].length]),n=null):n={marker:e,offset:i}}return n&&t.push([n.offset,e.length]),t}function N3(e,t){return t.some(([t,n])=>e>=t&&e<n)}const P3=/`+/g;function gse(e){let t=[];P3.lastIndex=0;for(let n of e.matchAll(P3))t.push({offset:n.index,length:n[0].length});let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let i=e+1;i<t.length;i++){let a=t[i];if(a.length===r.length){n.push([r.offset,a.offset+a.length]),e=i;break}}}return n}const _se=/^[ \t]{0,3}\[([^\]]+)\]:\s*(\S+)(\s+(?:"[^"]*"|'[^']*'|\([^)]*\)))?\s*$/gm;function F3(e){let t=M3(e),n=[];for(let r of e.matchAll(_se))N3(r.index,t)||n.push(r[0].trimEnd());return n.length>0?`${n.join(`
|
|
472
472
|
`)}\n\n`:``}function vse(e,t){let n={startMs:typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now(),calls:0};return R3(e,t.parse,0,n)}function I3(e){return e.calls>=1e3||(typeof performance<`u`&&typeof performance.now==`function`?performance.now():Date.now())-e.startMs>=500}function L3(e){return e instanceof Error?{name:e.name,message:e.message.slice(0,500),stack:e.stack?.split(`
|
|
473
473
|
`).slice(0,4).join(`
|
|
474
474
|
`)}:{name:`UnknownError`,message:String(e??`unknown`).slice(0,500)}}function R3(e,t,n,r){if(n>20)return j3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`MAX_SPLIT_DEPTH exceeded`})),B3(e);if(r){if(I3(r))return pse(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`parse budget exhausted`,calls:r.calls})),B3(e);r.calls+=1}try{return t(e)}catch(i){let a=yse(i),o=L3(i);if(a===void 0){if(n===0){let n=Tse(e,t,i,r);if(n)return n}return j3(),console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:o.message,error:o})),B3(e)}A3(),console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:a,reason:o.message,error:o}));try{let i=Cse(e,a),s=e.slice(i.start,i.end),c=e.slice(0,i.start).replace(/\n+$/,``),l=e.slice(i.end).replace(/^\n+/,``),u=c.trim()?R3(c,t,n+1,r):{type:`doc`,content:[]},d=l.trim()?R3(F3(c)+l,t,n+1,r):{type:`doc`,content:[]},f={type:`rawMdxFallback`,attrs:{reason:o.message,originalSpan:{start:i.start,end:i.end}},content:s?[{type:`text`,text:s}]:[]},p=[...u.content??[],f,...d.content??[]];return{type:`doc`,content:p.length>0?p:[{type:`paragraph`,content:[]}]}}catch(t){j3();let n=L3(t);return console.warn(JSON.stringify({event:`mdx-whole-doc-fallback`,reason:`Recovery failed: ${n.message}`,recoveryPath:`block-split-then-rejoin`,error:n,originalError:o})),B3(e)}}}function yse(e){if(!e||typeof e!=`object`)return;let t=e;if(t.place&&typeof t.place.offset==`number`)return t.place.offset;if(t.place?.start&&typeof t.place.start.offset==`number`)return t.place.start.offset;if(t.position&&typeof t.position.offset==`number`)return t.position.offset;if(t.position?.start&&typeof t.position.start.offset==`number`)return t.position.start.offset}function bse(e,t){let n=/\n\s*\n/g,r=null;for(let i of e.matchAll(n)){if(i.index>=t)break;r=i.index+i[0].length}return r}function z3(e,t){for(let n of e.matchAll(/\n\s*\n/g))if(n.index>=t)return n.index;return null}function xse(e,t){let n=[];for(let r of e.matchAll(/<(\/?)([A-Z][A-Za-z0-9.]*)/g)){let i=r.index;if(N3(i,t))continue;let a=r[1]===`/`,o=r[2],s=i+r[0].length,c=Math.min(e.length,s+32768),l=!1,u=0,d=-1,f=!1;for(let t=s;t<c;t++){let n=e[t];if(l){n===`"`&&(l=!1),n===`\\`&&t+1<c&&t++;continue}if(n===`"`){l=!0;continue}if(n===`{`){u++;continue}if(n===`}`&&u>0){u--;continue}if(!(u>0)&&n===`>`){d=t,t>0&&e[t-1]===`/`&&(f=!0);break}}if(d===-1)continue;let p=d+1;a?n.push({kind:`close`,name:o,start:i,end:p}):f?n.push({kind:`self-close`,name:o,start:i,end:p}):n.push({kind:`open`,name:o,start:i,end:p})}return n}function Sse(e){let t=xse(e,M3(e)),n=[],r=[];for(let i of t){if(i.kind===`self-close`)continue;if(i.kind===`open`){n.push(i);continue}let t=-1;for(let e=n.length-1;e>=0;e--)if(n[e].name===i.name){t=e;break}if(t!==-1){for(let a=n.length-1;a>t;a--){let t=n[a],o=z3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(i.start,o),source:`unmatched`})}r.push({start:n[t].start,end:i.end,source:`pair`}),n.length=t}}for(let t of n){let n=z3(e,t.start)??e.length;r.push({start:t.start,end:Math.min(e.length,n),source:`unmatched`})}return r}function Cse(e,t){let n=Sse(e),r=null;for(let e of n)e.start<=t&&t<=e.end&&(!r||e.end-e.start<r.end-r.start)&&(r=e);return r?{start:r.start,end:r.end}:{start:bse(e,t)??0,end:z3(e,t)??e.length}}function wse(e){let t=M3(e),n=/\n[ \t]*\n/g,r=[0];for(let i of e.matchAll(n)){let e=i.index;N3(e,t)||r.push(e+i[0].length)}r.push(e.length);let i=[];for(let t=0;t<r.length-1;t++){let n=r[t],a=r[t+1];if(a<=n)continue;let o=e.slice(n,a);o.trim()&&i.push({src:o,start:n,end:a})}return i}function Tse(e,t,n,r){let i=wse(e);if(i.length<2)return null;let a=[],o=!1,s=``;for(let e of i){if(r&&I3(r))break;r&&(r.calls+=1);let i=s+e.src;try{let n=t(i).content??[];s+=F3(e.src);let r=n.filter(e=>e.type!==`paragraph`||Array.isArray(e.content)&&e.content.length>0);if(r.length===0&&n.length>0){o=!0;continue}a.push(...r),o=!0}catch(t){A3();let r=t?.message?.slice(0,200)??`unknown block error`,i=n?.message?.slice(0,160)??`unknown`;console.warn(JSON.stringify({event:`mdx-block-fallback`,offset:e.start,reason:`Per-block recovery after position-less error: ${i}`,blockError:r,blockErrorName:t?.name})),a.push({type:`rawMdxFallback`,attrs:{reason:r,originalSpan:{start:e.start,end:e.end}},content:[{type:`text`,text:e.src}]})}}return o?{type:`doc`,content:a.length>0?a:[{type:`paragraph`,content:[]}]}:null}function B3(e){return{type:`doc`,content:[{type:`paragraph`,content:[{type:`text`,text:e}]}]}}function V3(e){if(typeof e!=`object`||!e||!Object.hasOwn(e,`escapedChars`))return{kind:`absent`};let t=e.escapedChars;return Array.isArray(t)&&t.every(e=>{if(typeof e!=`object`||!e)return!1;let t=e.offset;return typeof t==`number`&&Number.isInteger(t)&&t>=0&&typeof e.char==`string`})?{kind:`valid`,data:{escapedChars:t}}:{kind:`malformed`}}function H3(e){return V3(e).kind===`valid`}const U3=[[``,``],[``,``],[``,``],[``,``],[``,``]],W3=/[\uE000-\uE004]/,G3=/[\uE005-\uE009]/,Ese=U3.map(([e,t])=>({from:e,to:t})),Dse=/<([a-zA-Z][a-zA-Z0-9+.-]*:[^\s<>]+)>/g,Ose=/<!--[\s\S]*?-->/g,kse=/<\/([a-z][a-z0-9]*)\s*>/g,Ase=/<([a-z][a-z0-9]*)(\s[^>]*)?\/?>/g,K3=new Set([`img`,`video`,`audio`]),q3=new Set([`mark`,`u`,`ins`]);function jse(e,t,n,r){let i=0,a=0,o=`<${t}`;for(;a<n;){let t=e.indexOf(o,a);if(t===-1||t>=n)break;a=t+o.length;let s=e[t+o.length];if(s!==void 0&&s!==`>`&&s!==`/`&&!/\s/.test(s)||N3(t,r))continue;let c=e.indexOf(`>`,t);(c===-1||e[c-1]!==`/`)&&i++}return i}const Mse=/<\/([A-Z][A-Za-z0-9.]*)>/g;function J3(e,t){let n=0,r=e.length;for(;n<r;){let i=n+r>>>1;e[i]<t?n=i+1:r=i}return n}function Nse(e){let t=new Map,n=new RegExp(Mse.source,`g`),r=n.exec(e);for(;r!==null;){let i=t.get(r[1]);i?i.push(r.index):t.set(r[1],[r.index]),r=n.exec(e)}return t}function Pse(e){let t=[],n=/\n\s*\n/g,r=n.exec(e);for(;r!==null;)t.push(r.index),r=n.exec(e);return t}function Fse(e){let t=[],n=e.indexOf(`>`);for(;n!==-1;)t.push(n),n=e.indexOf(`>`,n+1);return t}const Y3=1024;function Ise(e,t){if(t[e-1]!==`(`||t[e-2]!==`]`)return!1;let n=e-2,r=0;for(let e=n-1;e>=0&&t[e]===`\\`;e--)r++;if(r%2==1)return!1;let i=!1,a=Math.max(0,n-Y3);for(let e=n-1;e>=a;e--){let n=t[e];if(n===`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ro as e}from"./dist-
|
|
1
|
+
import{ro as e}from"./dist-Cao3SE0M.mjs";import{execFile as t}from"node:child_process";const n=new Set([`http:`,`https:`]),r=/[\u0000-\u0020\u007F-\u009F"'`\\&|<>^()$;{}[\]*?!~]/;function i(e,t){console.warn(`Could not auto-open browser (${t}); visit ${e} manually`)}function a(a){let o;try{o=new URL(a)}catch{i(a,`invalid URL`);return}if(!n.has(o.protocol)){i(a,`unsupported scheme '${o.protocol}'`);return}if(r.test(a)){i(a,`URL contains unsafe characters`);return}let s=process.platform===`darwin`?`open`:process.platform===`win32`?`cmd`:`xdg-open`,c=process.platform===`win32`?[`/c`,`start`,``,a]:[a];t(s,c,e({}),e=>{e&&console.warn(`Could not auto-open browser (${e.message}); visit ${a} manually`)})}export{a as openBrowser};
|
package/dist/parse-worker.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./md-manager-BGnqyqi1-
|
|
1
|
+
import{t as e}from"./md-manager-BGnqyqi1-BZhj8566.mjs";import{parentPort as t}from"node:worker_threads";function n(t){try{let n,r;if(t.embedTable!==void 0&&t.sourcePath!==void 0){let e=t.embedTable;r={sourcePath:t.sourcePath,resolveEmbed:t=>e[t]?.path??null,...t.wantSizes?{resolveSize:t=>e[t]?.size??null}:{}}}else if(t.recordEmbeds&&t.sourcePath!==void 0){let e=new Set;n=e,r={sourcePath:t.sourcePath,resolveEmbed:t=>(e.add(t),null),...t.wantSizes?{resolveSize:t=>(e.add(t),null)}:{}}}let i=e.parseWithFallback(t.body,r);return n!==void 0&&n.size>0?{id:t.id,ok:!0,parsedJson:i,requestedTargets:[...n]}:{id:t.id,ok:!0,parsedJson:i}}catch(e){return{id:t.id,ok:!1,message:e instanceof Error?e.message.slice(0,500):String(e).slice(0,500)}}}t?.on(`message`,e=>{t?.postMessage(n(e))});export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-DjofmF_T.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{yn as e}from"./dist-
|
|
1
|
+
import{yn as e}from"./dist-Cao3SE0M.mjs";import"./constants-B6lHSTE5.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);a.push(``);let c=t(i,`.ok`,`config.yml`);return r(c)?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|