@inkeep/open-knowledge 0.83.0-beta.4 → 0.83.0-beta.5
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/assets/skills/project/SKILL.md +1 -1
- package/dist/assets/skills/project/references/linking.md +1 -1
- package/dist/cli.mjs +6 -6
- package/dist/constants-DPhkbJXs.mjs +1 -0
- package/dist/{dist-Db3MAmfg.mjs → dist-BHg9XI3A.mjs} +503 -503
- package/dist/{dist-CuKjbrew.mjs → dist-ByQ8IZXo.mjs} +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{init-CL_e6Q1D.mjs → init-CrjTf1pi.mjs} +2 -2
- package/dist/init-Kw-TosnB.mjs +1 -0
- package/dist/{launch-json-removal-D3kd2brC.mjs → launch-json-removal-BEKplNGY.mjs} +1 -1
- package/dist/{loader-C7EEsDKg.mjs → loader-CrmSAWIW.mjs} +1 -1
- package/dist/loader-CwZvWeL0.mjs +1 -0
- package/dist/{md-manager-BGnqyqi1-IqwoPmS1.mjs → md-manager-BGnqyqi1-DsBy1Dky.mjs} +1 -1
- package/dist/{open-browser-DNGrx2It.mjs → open-browser-CJogphTe.mjs} +1 -1
- package/dist/parse-worker.mjs +1 -1
- package/dist/preview-AWnyLtzP.mjs +1 -0
- package/dist/{preview-BlJ1Z0op.mjs → preview-B2beHnfh.mjs} +1 -1
- package/dist/public/assets/{AccountSection-BRBXF1vN.js → AccountSection-Droiytue.js} +1 -1
- package/dist/public/assets/{ActivityModeContent-CJJP9rF8.js → ActivityModeContent-CbnLPTIH.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-D3pJsHJb.js → AddPropertiesButton-KfKILXo9.js} +2 -2
- package/dist/public/assets/{AgentConnectionsSection-CmOmHMSc.js → AgentConnectionsSection-CJhM0Oqw.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-tNG4XT0X.js → AgentDiffPane-B0odJ1aT.js} +1 -1
- package/dist/public/assets/{AttachmentsSection-JCBkP1bH.js → AttachmentsSection-Mw0-ZVyb.js} +1 -1
- package/dist/public/assets/{AuthModal-D1eciNeA.js → AuthModal-DcixDUcD.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-a3VwRUQz.js → CodeMirrorPropInput-CJK_-B_x.js} +1 -1
- package/dist/public/assets/{ContentRulesSection-D5HpfzEM.js → ContentRulesSection-Bss4zUDP.js} +1 -1
- package/dist/public/assets/{DiffViewBoundary-DnPwZD0g.js → DiffViewBoundary-B5VRWFoq.js} +1 -1
- package/dist/public/assets/{DocumentContext-mYOuQjoP.js → DocumentContext-Bsl186nT.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-CzpyTCmQ.js → EditorModeToggle-DPAypJvm.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-DOGkm6OY.js → ExcalidrawDocEditor-C_j2ekRK.js} +1 -1
- package/dist/public/assets/FeedbackForm-CQ0MZzAX.js +1 -0
- package/dist/public/assets/{GraphPanel-CpJ-EZeA.js → GraphPanel-ZgCaGJ14.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-DnFzketi.js → ImportSkillDialog-CYgy5v1q.js} +1 -1
- package/dist/public/assets/{LinkPreviewsSection-DoydKz8c.js → LinkPreviewsSection-uXIP-dp3.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-CRNgDVC9.js → LintConfigEditor-BFYDnPot.js} +1 -1
- package/dist/public/assets/{LintingSection-6XJ9IDh1.js → LintingSection-CKk0R2XV.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-D4nKksLq.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-KZga5-nk.js → ManagedArtifactProperties-oK6vCr7C.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-Db30lOly.js → MermaidDocEditor-7zbWvNHd.js} +1 -1
- package/dist/public/assets/{NetworkAccessSection-Br-oNBym.js → NetworkAccessSection-Bn8H6wuf.js} +1 -1
- package/dist/public/assets/{ProjectTemplatesSection-BgjUl8Rv.js → ProjectTemplatesSection-Cf5bgyHk.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-D6hboSk0.js → PropertyDisplayRow-DtQD10NU.js} +1 -1
- package/dist/public/assets/{PublishToGitHubDialog-CwKAOyMe.js → PublishToGitHubDialog-Bi_yfoyq.js} +1 -1
- package/dist/public/assets/{RegisteredAgentIcon-DHzxArZN.js → RegisteredAgentIcon-jysj1Acv.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DB6DsLhh.js → SchemaConfigEditor-CmvHbYD0.js} +1 -1
- package/dist/public/assets/{SearchSection-Dk-yosmd.js → SearchSection-NRyXWfQ3.js} +1 -1
- package/dist/public/assets/{SessionsHost-hUeKJj7l.js → SessionsHost-Cc2oV3dV.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-De0p1s3_.js → SettingsDialogBody-CWnpUal4.js} +2 -2
- package/dist/public/assets/{ShareReceiveMissDialog-hMFYD5AW.js → ShareReceiveMissDialog-ChcdZosR.js} +1 -1
- package/dist/public/assets/{SkillCostValue-DC_VaXgy.js → SkillCostValue-Bgy3wkjV.js} +1 -1
- package/dist/public/assets/{SkillForkDialog-DeoTv3wY.js → SkillForkDialog-CwCSC6Z0.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-1E0cH5_q.js → SkillInstallMenu-BIs2wAUZ.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-CLKoMHNo.js → SkillOriginInline-Dr1zcAGa.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-nnJTYYrn.js → SkillToolbarControls-BXSkUGmd.js} +1 -1
- package/dist/public/assets/{SkillsManagerSection-DKedsWHo.js → SkillsManagerSection-CiaThXM_.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-BSKDSVIG.js → SlidesToolbarControls-BpGxFSJu.js} +1 -1
- package/dist/public/assets/{SourceEditor-BCeRHOW_.js → SourceEditor-AolrPcnF.js} +1 -1
- package/dist/public/assets/{SpellingSettings-Cmy-eBih.js → SpellingSettings-Bp5WJ0V7.js} +1 -1
- package/dist/public/assets/{SyncSection-Ctc1ZAYE.js → SyncSection-DN4BNjYi.js} +1 -1
- package/dist/public/assets/{SyncStatusBadge-CykVps4K.js → SyncStatusBadge-BO6CFavL.js} +1 -1
- package/dist/public/assets/{TemplateRow-B2jVmQlY.js → TemplateRow-Bj4hpJ-E.js} +1 -1
- package/dist/public/assets/{TerminalLaunchContext-BReEuF5W.js → TerminalLaunchContext-kR8NUVFa.js} +1 -1
- package/dist/public/assets/{TerminalPanel-DQg3L4EK.js → TerminalPanel-CBpH9VnO.js} +1 -1
- package/dist/public/assets/{TerminalSection-CcQc7fKK.js → TerminalSection-DnexOFJv.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-a7QkAGXd.js → TerminalWindowApp-CYOc89Z0.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CdGAdSor.js → TextDocEditor-DcTmh_sa.js} +1 -1
- package/dist/public/assets/{ThemePluginSection-B4oIayEG.js → ThemePluginSection-DOCAYKOj.js} +1 -1
- package/dist/public/assets/{ThreadView-Cu22t-sf.js → ThreadView-H4YeUz_6.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-CcFwzBDW.js → TimelineDiffPane-DBRzt5of.js} +1 -1
- package/dist/public/assets/{agent-connections-D-XX-7tC.js → agent-connections-BmjcmCOh.js} +1 -1
- package/dist/public/assets/{agent-registry-CC-eSzdu.js → agent-registry--47SG0kt.js} +1 -1
- package/dist/public/assets/{bridge-1xVdv27q.js → bridge-njD5PB6P.js} +1 -1
- package/dist/public/assets/{card-CUu_Dbtf.js → card-BsBNZHzU.js} +1 -1
- package/dist/public/assets/{catalog-DQ0C9DYn.js → catalog-DtlAjcAT.js} +1 -1
- package/dist/public/assets/{comment-chips-ucdDq5Q3.js → comment-chips-CO_v36hx.js} +1 -1
- package/dist/public/assets/{config-provider-BDWGnun_.js → config-provider-DYjwca1V.js} +1 -1
- package/dist/public/assets/config-schema-CjObvyCB.js +1 -0
- package/dist/public/assets/{css-color-to-hex-Ds26W_X-.js → css-color-to-hex-vFOfC-Pa.js} +1 -1
- package/dist/public/assets/{doc-undo-manager-CdteDFL9.js → doc-undo-manager-Dn9t2Iwn.js} +1 -1
- package/dist/public/assets/field-controls-23rf_c2g.js +1 -0
- package/dist/public/assets/{field-controls-CFLl9l2A.js → field-controls-CAjZIoxe.js} +1 -1
- package/dist/public/assets/{frontmatter-tags-BIkfDL6K.js → frontmatter-tags-B-pVcI4P.js} +1 -1
- package/dist/public/assets/{index-X6cytEL5.js → index-jj7AN3ys.js} +7 -7
- package/dist/public/assets/{lint-config-client-DgV9TE2y.js → lint-config-client-DRl_GTbs.js} +1 -1
- package/dist/public/assets/{lint-plugins-DmlA1sEu.js → lint-plugins-DQC4DG_-.js} +1 -1
- package/dist/public/assets/{markdown-lint-CfRH6CjV.js → markdown-lint-C_9h2J3z.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CN1TwJhU.js → markdownlint-rule-browser-BShldaY9.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-NYViaTsT.js → pending-receive-nav-store-DIU-Po1C.js} +1 -1
- package/dist/public/assets/{preferred-session-events-78C4kXpL.js → preferred-session-events-Ayg96deM.js} +1 -1
- package/dist/public/assets/{progress-C_Q7qzuf.js → progress-BpdOUTnu.js} +1 -1
- package/dist/public/assets/{saved-themes-client-D5M6AESh.js → saved-themes-client-BdzXiLZg.js} +1 -1
- package/dist/public/assets/{schema-section-Cn4ovS7A.js → schema-section-AjQemGau.js} +1 -1
- package/dist/public/assets/{schemas-api-KjBzkxAy.js → schemas-api-C4CP1G39.js} +1 -1
- package/dist/public/assets/{selection-context-C9FxlvvI.js → selection-context-Dj_iPBku.js} +1 -1
- package/dist/public/assets/{skills-api-DfXaxEkX.js → skills-api-BUVVp6gv.js} +1 -1
- package/dist/public/assets/{src-zjRc3l1B.js → src-CS5ZPUzW.js} +1 -1
- package/dist/public/assets/storage-scope-DRWogX35.js +1 -0
- package/dist/public/assets/{tag-pill-input-D_82NbMi.js → tag-pill-input-BoyxN9pC.js} +1 -1
- package/dist/public/assets/{terminal-launch-events-BBXwmVEO.js → terminal-launch-events-Cy8GAcTt.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-Ba4T0Jvq.js → typing-burst-detector-Clq1sSnx.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DgFEYoQD.js → use-activity-panel-I5AELaRz.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-DyzsFMYv.js → use-apply-config-color-theme-lLFWDFMc.js} +1 -1
- package/dist/public/assets/{use-conflicts-B9eHyj9o.js → use-conflicts-B0yvUiLf.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-D9OrOkx3.js → use-live-xterm-theme-BIzA-mu0.js} +1 -1
- package/dist/public/assets/{use-open-skill-DX2J-XUP.js → use-open-skill-Bro5-8rY.js} +1 -1
- package/dist/public/assets/{use-semantic-search-status-BGdqXgED.js → use-semantic-search-status-CGPJyDjj.js} +1 -1
- package/dist/public/assets/{use-skill-origin-BqSrJPU6.js → use-skill-origin-Cv_S5gSq.js} +1 -1
- package/dist/public/assets/{use-skill-targets-oy2zvORL.js → use-skill-targets-D-Tfz8TQ.js} +1 -1
- package/dist/public/assets/{use-skills-CV4zn3OT.js → use-skills-CRuEYkjM.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-MKxsix4h.js → use-terminal-enabled-DASwB3kR.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-DsZ2Vu7B.js → use-timeline-entry-diff-DePScbzI.js} +1 -1
- package/dist/public/assets/{use-workspace-Co3BqTgM.js → use-workspace-Bf2VHQrp.js} +1 -1
- package/dist/public/index.html +45 -45
- package/dist/{registry-probes-eRPQMY-y.mjs → registry-probes-CtY_1ly1.mjs} +1 -1
- package/dist/{removal-file-path-CLkfpBwn.mjs → removal-file-path-CNIqq13J.mjs} +1 -1
- package/dist/{repair-launch-json-VnuW7Q8d.mjs → repair-launch-json-CJpZgLgO.mjs} +1 -1
- package/dist/{repair-mcp-configs-CE_7diVc.mjs → repair-mcp-configs-DlqDZ1Q-.mjs} +1 -1
- package/dist/{src-DRsRktps.mjs → src-CnRhVti_.mjs} +1 -1
- package/dist/src-lCnJgf0p.mjs +1 -0
- package/dist/start-CIrEb03P.mjs +1 -0
- package/dist/{start-CpHu1y5K.mjs → start-UcVINga1.mjs} +3 -3
- package/package.json +4 -4
- package/dist/constants-ClUiDros.mjs +0 -1
- package/dist/init-B5hTJt74.mjs +0 -1
- package/dist/loader-DsVfCsZZ.mjs +0 -1
- package/dist/preview-BSdoL4SZ.mjs +0 -1
- package/dist/public/assets/FeedbackForm-CAstgJmN.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DccpG1E9.js +0 -1
- package/dist/public/assets/config-schema-mXZFcyl-.js +0 -1
- package/dist/public/assets/field-controls-k0sTXrth.js +0 -1
- package/dist/public/assets/storage-scope-BVU9p11A.js +0 -1
- package/dist/src-mWhQUBg3.mjs +0 -1
- package/dist/start-BqJyj8XY.mjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Js as e,Na as t,Vs as n,g as r,gt as i,ic as a,mt as o,q as s}from"./md-manager-BGnqyqi1-IqwoPmS1.mjs";import{$ as c,$a as l,$i as u,$n as d,$r as f,$t as p,A as m,Aa as h,Ai as g,An as _,Ao as v,Ar as y,At as b,B as x,Ba as S,Bi as C,Bn as w,Br as T,Bt as E,C as D,Ca as O,Ci as k,Cn as A,Co as j,Cr as M,Cs as N,Ct as P,D as F,Da as I,Di as L,Dn as R,Do as z,Dr as B,Dt as V,E as H,Ea as U,Ei as W,En as G,Eo as K,Er as q,Et as J,F as Y,Fa as X,Fi as Z,Fn as Q,Fr as $,Ft as ee,G as te,Ga as ne,Gi as re,Gn as ie,Gr as ae,Gt as oe,H as se,Ha as ce,Hi as le,Hn as ue,Hr as de,Ht as fe,I as pe,Ia as me,Ii as he,In as ge,Ir as _e,It as ve,J as ye,Ja as be,Ji as xe,Jn as Se,Jr as Ce,Jt as we,K as Te,Ka as Ee,Ki as De,Kn as Oe,Kr as ke,Kt as Ae,L as je,La as Me,Li as Ne,Ln as Pe,Lr as Fe,Lt as Ie,M as Le,Ma as Re,Mi as ze,Mn as Be,Mo as Ve,Mr as He,Mt as Ue,N as We,Na as Ge,Ni as Ke,Nn as qe,Nr as Je,Nt as Ye,O as Xe,Oa as Ze,Oi as Qe,On as $e,Oo as et,Or as tt,Ot as nt,P as rt,Pa as it,Pi as at,Pn as ot,Pr as st,Pt as ct,Q as lt,Qa as ut,Qi as dt,Qn as ft,Qr as pt,Qt as mt,R as ht,Ra as gt,Ri as _t,Rn as vt,Rr as yt,Rt as bt,S as xt,Sa as St,Si as Ct,Sn as wt,So as Tt,Sr as Et,Ss as Dt,St as Ot,T as kt,Ta as At,Ti as jt,Tn as Mt,To as Nt,Tr as Pt,Tt as Ft,U as It,Ua as Lt,Ui as Rt,Un as zt,Ur as Bt,Ut as Vt,V as Ht,Va as Ut,Vi as Wt,Vn as Gt,Vr as Kt,Vt as qt,W as Jt,Wa as Yt,Wi as Xt,Wn as Zt,Wr as Qt,Wt as $t,X as en,Xa as tn,Xi as nn,Xn as rn,Xr as an,Xt as on,Y as sn,Ya as cn,Yi as ln,Yn as un,Yr as dn,Yt as fn,Z as pn,Za as mn,Zi as hn,Zn as gn,Zr as _n,Zt as vn,_ as yn,_a as bn,_i as xn,_n as Sn,_o as Cn,_r as wn,_s as Tn,_t as En,a as Dn,aa as On,ai as kn,an as An,ao as jn,ar as Mn,as as Nn,at as Pn,b as Fn,ba as In,bi as Ln,bn as Rn,bo as zn,br as Bn,bs as Vn,bt as Hn,c as Un,ca as Wn,ci as Gn,cn as Kn,co as qn,cr as Jn,ct as Yn,d as Xn,da as Zn,di as Qn,dn as $n,do as er,dr as tr,ds as nr,dt as rr,ea as ir,ei as ar,en as or,eo as sr,er as cr,et as lr,f as ur,fa as dr,fi as fr,fn as pr,fo as mr,fr as hr,fs as gr,ft as _r,g as vr,ga as yr,gi as br,gn as xr,go as Sr,gr as Cr,gs as wr,gt as Tr,h as Er,ha as Dr,hi as Or,hn as kr,ho as Ar,hr as jr,hs as Mr,ht as Nr,i as Pr,ia as Fr,ii as Ir,in as Lr,io as Rr,ir as zr,is as Br,it as Vr,j as Hr,ja as Ur,ji as Wr,jn as Gr,jo as Kr,jr as qr,jt as Jr,k as Yr,ka as Xr,ki as Zr,kn as Qr,ko as $r,kr as ei,kt as ti,l as ni,la as ri,li as ii,ln as ai,lo as oi,lr as si,ls as ci,lt as li,m as ui,ma as di,mi as fi,mn as pi,mo as mi,mr as hi,ms as gi,mt as _i,n as vi,na as yi,ni as bi,nn as xi,no as Si,nr as Ci,nt as wi,o as Ti,oa as Ei,oi as Di,on as Oi,oo as ki,or as Ai,ot as ji,p as Mi,pa as Ni,pi as Pi,pn as Fi,po as Ii,pr as Li,ps as Ri,pt as zi,q as Bi,qa as Vi,qi as Hi,qn as Ui,qr as Wi,qt as Gi,r as Ki,ra as qi,ri as Ji,rn as Yi,ro as Xi,rr as Zi,rt as Qi,s as $i,sa as ea,si as ta,sn as na,so as ra,sr as ia,st as aa,t as oa,ta as sa,ti as ca,tn as la,to as ua,tr as da,tt as fa,u as pa,ua as ma,ui as ha,un as ga,uo as _a,ur as va,us as ya,ut as ba,v as xa,va as Sa,vi as Ca,vn as wa,vo as Ta,vr as Ea,vt as Da,w as Oa,wa as ka,wi as Aa,wn as ja,wo as Ma,wr as Na,wt as Pa,x as Fa,xa as Ia,xi as La,xn as Ra,xo as za,xr as Ba,xs as Va,xt as Ha,y as Ua,ya as Wa,yi as Ga,yn as Ka,yo as qa,yr as Ja,yt as Ya,z as Xa,za as Za,zi as Qa,zn as $a,zr as eo,zt as to}from"./dist-Db3MAmfg.mjs";export{oa as AGENT_ID_MAX_LEN,vi as AGENT_ID_RE,Ki as AGENT_WRITE_ORIGIN,t as AUDIT_EMPTY_SCOPE_WARNING,Pr as AcpPermissionStore,Dn as AcpRegistry,Ti as AcpThreadManager,$i as AgentFocusBroadcaster,Un as AgentPresenceBroadcaster,ni as AgentSessionCapacityError,pa as AgentSessionManager,Xn as AutoStartDisabledError,ur as BUNDLE_IDS,Mi as BUNDLE_SCOPE,ui as BUNDLE_SKILL_NAME,Er as BacklinkIndex,vr as CC1Broadcaster,e as CC1_CONTRACT_VERSION,yn as CONCURRENT_REPLACE_WINDOW_MS,xa as CONFIG_FILENAME,Ua as CONFLICT_MARKER_RE,Fn as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Fa as ConfigSchema,xt as ConflictAuthority,D as DEFAULT_CHECKPOINT_RETENTION,Oa as DEFAULT_EMBEDDINGS_DIMENSIONS,kt as DEFAULT_PACK_ID,H as DocumentDurabilityState,F as DocumentDurabilityStateError,Xe as EMBEDDINGS_API_KEY_ENV,Yr as EPHEMERAL_PROJECT_DIR_PREFIX,m as ExposureConsentError,Hr as FEATURED_AGENT_IDS,Le as FILE_SYSTEM_WRITER,We as FILE_WATCHER_ORIGIN,rt as FileEmbeddingsBackend,Y as GIT_PREFLIGHT_FAIL_SPAN_NAME,pe as GIT_UPSTREAM_WRITER,Br as GitDirAccessError,je as GitNotAvailableError,ht as GitTooOldError,Xa as HOCUSPOCUS_AUTH_REJECTION_REASONS,x as HocuspocusAuthRejection,Ht as HocuspocusAuthTokenSchema,se as HomeProjectRootError,It as INSTALLED_AGENTS_SCHEMES,Jt as JSON_SCHEMA_DIALECT_2020_12,Dt as LINEAGE_EPOCH_KEY,te as LIVE_DERIVED_INDEX_DEBOUNCE_MS,Te as MANAGED_RENAME_ORIGIN,Bi as MAX_ACP_THREADS,ye as MAX_AGENT_SESSIONS,sn as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,en as MIN_EVICTABLE_IDLE_MS,pn as MIN_GIT_VERSION,lt as MISSING_OK_CONFIG_MESSAGE,Nn as MalformedGitPointerError,c as McpLogger,lr as MissingOkConfigError,fa as OBSERVER_SYNC_ORIGIN,wi as OK_OKIGNORE_TEMPLATE,Qi as ONBOARDING_BUNDLE_IDS,Vn as ORPHAN_MODES,N as PROTOCOL_VERSION,ci as PinoLogger,Vr as ProcessLockCollisionError,Pn as ProjectGitInitError,ji as ROLLBACK_ORIGIN,aa as ROOT_GITIGNORE_TEMPLATE,Yn as RUNTIME_VERSION,li as SERVICE_WRITER,ba as SKILL_INSTALL_EVENTS_FILENAME,r as SKILL_STATE_TARGETS,rr as STARTER_FOLDER_FRONTMATTER_FILENAME,_r as STARTER_PACKS,zi as STARTER_PACK_IDS,_i as STATE_MANIFEST_FILENAME,Nr as STATE_SCHEMA_VERSION,Tr as SYMLINK_MERGE_MIN_GIT_LABEL,En as SYMLINK_MERGE_MIN_GIT_VERSION,a as SYSTEM_DOC_NAME,Da as SeedPrerequisiteError,Ya as SeedRootDirError,Hn as ServerLockCollisionError,Ha as SingleFileNotAFileError,Ot as SingleFileNotFoundError,P as SingleFileNotMarkdownError,Pa as SingleFileProjectOverrideError,Ft as StateManifestError,J as TagIndex,V as USER_GLOBAL_BUNDLE_IDS,nt as UnsafeIncomingSymlinkError,ti as __getShowAllWalkStatsForTesting,b as __resetShowAllWalkStatsForTesting,Jr as acpThreadStoreRoots,Ue as acpThreadsDir,Ye as acquireProcessLock,ct as acquireServerLock,ee as applyAgentMarkdownWrite,ve as applyExternalChange,Ie as applySeed,bt as assertCheckoutSymlinksSafe,to as assertCompatibleStateManifest,E as assertGitAvailable,qt as assertIncomingSymlinksSafe,fe as assertMergeNameResolvesTo,Vt as assertNeverDiskEvent,$t as assertNotHomeProjectRoot,oe as assertRepoCheckoutSymlinksSafe,Ae as attachAcpThreadSocket,Gi as attachCollabClientCounter,we as attachIdleShutdown,fn as auditScopeNotFoundTitle,on as bindConflictAuthority,vn as bootServer,mt as buildAndOpenSkill,p as buildConfigYmlContent,or as buildExecResult,la as buildIngressPolicy,xi as buildOkMcpStdioCommand,Yi as buildSkillZip,Lr as buildStarterFolderFrontmatterYaml,An as buildWipTree,Oi as bundleSkillMdPath,na as canonicalProjectKey,Kn as canonicalizeForCompare,ai as classifyEvents,ga as classifyFsPath,$n as clearAllEmbeddingsKeys,pr as coercePackId,Fi as collectServerHostSnapshot,o as colorFromSeed,pi as commitUpstreamImport,kr as commitWip,xr as commitWipFromTree,Sn as compareSemver,wa as composeEffectiveLinterConfig,Ka as composeFrontmatterSchemasConfig,Rn as containsConflictMarkers,Ra as contentHash,wt as contributorCount,A as countShadowObjects,ja as countStaleAgentWipRefs,Mt as countWipRefs,G as createApiExtension,R as createAssetServeMiddleware,$e as createCollaborationHost,Qr as createContentFilter,_ as createContentFilterAsync,Gr as createEmbeddingsSecretStore,Be as createEphemeralProjectDir,qe as createExternalChangeHandler,ot as createFileLogger,Q as createLiveDerivedIndexExtension,ge as createMcpHttpHandler,Pe as createOsProbe,vt as createPersistenceExtension,$a as createProbeFailureReporter,w as createServer,Gt as createServerObserverExtension,ue as createServerProbeResolver,zt as createStreamingErrorWriter,ya as createTestLogger,Zt as describeStoredEmbeddingsKey,ie as detectClaudeDesktopPresence,Oe as detectGit,Ui as detectProjectShape,Se as detectUserSkillHosts,un as discoverLockDirs,rn as discoverMarkdownlintConfig,gn as emitPreflightFailureSpan,ft as encodeDocName,d as encodeFolderRoute,cr as encodeSkillRoute,da as ensureProjectGit,Ci as errorResponse,Zi as evictStaleTrackerEntries,zr as extractHeadings,Mn as extractOkBinaryPath,Ai as extractWikiLinksFromMarkdown,ia as fallbackPaths,Jn as findEnclosingGitRoot,si as findEnclosingProjectRoot,va as findNativeMarkdownlintFile,tr as flushFileLogger,hr as formatAuditBrokenLinkSuppressionLine,Li as formatAuthRejectionWire,hi as formatContributorsFrom,jr as formatPackRationale,Cr as gcCheckpointRefs,wn as getCurrentMcpLogger,Ea as getIngressContext,Ja as getLocalDir,Bn as getLogFilePath,nr as getLogger,Ba as getLogsDir,Et as getMachineId,M as getMeter,Na as getMetrics,Pt as getTracer,q as handleCollabSocketError,B as handleSpawnCursor,tt as hasForwardingHeaders,ei as hasGcLogLatch,i as iconFromClientName,y as incrementCollabSocketFilteredError,qr as incrementServerObserverFire,He as initContent,Je as initShadowRepo,st as initTelemetry,$ as initToleranceTelemetryWriter,_e as installJsonSchemaDialect,Fe as installPrettyZodErrors,gr as installTestLoggers,yt as installUserSkill,eo as isAllowedApiOrigin,T as isAllowedWorkspaceHostHeader,Kt as isConfigDoc,de as isDefunctProcess,Bt as isDocInConflict,Qt as isHocuspocusAuthRejectionReason,ae as isHomeDir,ke as isHostAdmitted,Wi as isKnownPackId,Ce as isLinkIndexExcludedDoc,dn as isLockProcessRunning,an as isLoopbackAddress,_n as isManagedArtifactDoc,pt as isMintedThreadId,f as isOriginAdmitted,Va as isOrphanMode,ar as isPairedWriteOrigin,ca as isPathWithinDir,bi as isPeerAdmitted,Ji as isProcessAlive,Ir as isProjectRoot,kn as isReservedForUserTree,Di as isSelfWrite,ta as isSystemDoc,Gn as isToleranceTelemetryEnabled,ii as isValidLockPid,ha as lastKnownHash,Qn as listRescueCheckpoints,fr as listStarterPacks,Pi as loadCustomAgents,fi as loadPrincipal,Or as lockAdvertisesUi,br as lockBaseUrl,xn as lockFilePath,Ri as loggerFactory,Ca as loginShapedUserinfoUser,gi as logsCurrentPath,Mr as logsPreviousPath,Ga as makeLazyEmbeddingsKeyStore,Ln as markServerLockDraining,La as mountMcpAndApi,Ct as normalizeFsPath,k as observeReadiness,Aa as packageVersionMajorMinor,jt as parseAuthRejectionWire,W as parseGitVersion,L as parseHocuspocusAuthToken,Qe as parseKeepaliveConnectionId,Zr as pathToDocName,g as planSeed,Wr as prepareSingleFileOpen,ze as processCommand,Ke as processUsage,at as readAgentBrowserTools,Z as readAllTargets,he as readBundleDecision,Ne as readDeclaredGitHubHosts,_t as readOriginCredentialHost,Qa as readOriginGitHubRepo,C as readOwnNativeRules,Wt as readProcessLock,le as readProcessLockDetailed,Rt as readProcessState,Xt as readProjectHeadState,re as readProjectLocalSemanticConfig,De as readServerLock,Hi as readServerPackageVersion,xe as readSkillInstallStateSnapshot,ln as readStateManifest,nn as readTargetRecordedAt,hn as readTargetVersion,dt as reconcile,u as recordContributor,ir as recordSkillInstallEvent,sa as redactShareSubprocessStderr,yi as registerAllTools,qi as registerWrite,Fr as releaseProcessLock,On as releaseServerLock,Ei as removeLastKnownHash,ea as removeProjectSkillGitignoreBlock,Wn as reportSkillInstall,ri as resetMetrics,ma as resolveAuditScope,Zn as resolveBuiltinSkillHosts,s as resolveBundleEnabled,dr as resolveBundledSkillDir,Ni as resolveContentDir,di as resolveCursorBinaryDefault,Dr as resolveCursorSpawnInvocation,yr as resolveEffectiveLinterConfig,bn as resolveEmbeddingsCredential,Sa as resolveGitHubAccountFromUrl,Wa as resolveGitHubAuthHost,In as resolveLockDir,Ia as resolveNativeConfigForDoc,St as resolveNativeMarkdownlintConfig,O as resolvePack,ka as resolvePackageVersion,At as resolveSkillInstallReportSettings,U as resolveUiInfo,I as restoreContributors,Ze as rewriteMarkdownLinksForDocumentRename,Xr as rewriteWikiLinksForDocumentRename,h as runAuthReposSubprocess,Ur as runAuthStatusSubprocess,Re as runCloneSubprocess,Ge as runDeviceFlowSubprocess,it as runWithMcpLogger,X as safeContentPath,me as safeSubdir,Me as safetyCheckpoint,gt as sameGitHubLogin,Za as sanitizeClientName,S as saveInMemoryCheckpoint,Ut as saveVersion,ce as scanLockProcesses,Lt as seedBasenameIndex,Yt as seedEphemeralProjectDir,ne as serializeError,Ee as setActiveSpanAttributes,Vi as setupServerObservers,be as shadowGit,cn as shutdownTelemetry,wr as spansCurrentPath,Tn as spansPreviousPath,tn as spawnDetached,mn as splitMarkdownBlocks,ut as startWatcher,l as strategiesFor,sr as streamedChunkOf,ua as streamingProblemEvent,Si as swapContributors,Xi as teardownToleranceTelemetryWriter,Rr as toBroadcasterKey,jn as tracedAppendFileSync,ki as tracedLinkSync,ra as tracedMkdir,qn as tracedMkdirSync,oi as tracedRename,_a as tracedRenameSync,er as tracedRmSync,mr as tracedRmdirSync,Ii as tracedUnlinkSync,mi as tracedWriteFile,Ar as tracedWriteFileSync,Sr as trustSystemCertificates,Cn as updateLastKnownHash,Ta as updateProcessLockPort,qa as updateServerLockPort,zn as validateAgentId,za as validateCloneInputs,Tt as validateSkillZip,j as waitForServerLockDrain,Ma as withHiddenWindowsConsole,Nt as withSpan,K as withSpanSync,z as writeBundleDecision,et as writeMarkdownlintRule,$r as writeRootGitignoreForNewRepo,v as writeStateManifest,Kr as writeTargetVersion,Ve as writeTracker};
|
|
1
|
+
import{Js as e,Na as t,Vs as n,g as r,gt as i,ic as a,mt as o,q as s}from"./md-manager-BGnqyqi1-DsBy1Dky.mjs";import{$ as c,$a as l,$i as u,$n as d,$r as f,$t as p,A as m,Aa as h,Ai as g,An as _,Ao as v,Ar as y,At as b,B as x,Ba as S,Bi as C,Bn as w,Br as T,Bt as E,C as D,Ca as O,Ci as k,Cn as A,Co as j,Cr as M,Cs as N,Ct as P,D as F,Da as I,Di as L,Dn as R,Do as z,Dr as B,Dt as V,E as H,Ea as U,Ei as W,En as G,Eo as K,Er as q,Et as J,F as Y,Fa as X,Fi as Z,Fn as Q,Fr as $,Ft as ee,G as te,Ga as ne,Gi as re,Gn as ie,Gr as ae,Gt as oe,H as se,Ha as ce,Hi as le,Hn as ue,Hr as de,Ht as fe,I as pe,Ia as me,Ii as he,In as ge,Ir as _e,It as ve,J as ye,Ja as be,Ji as xe,Jn as Se,Jr as Ce,Jt as we,K as Te,Ka as Ee,Ki as De,Kn as Oe,Kr as ke,Kt as Ae,L as je,La as Me,Li as Ne,Ln as Pe,Lr as Fe,Lt as Ie,M as Le,Ma as Re,Mi as ze,Mn as Be,Mo as Ve,Mr as He,Mt as Ue,N as We,Na as Ge,Ni as Ke,Nn as qe,Nr as Je,Nt as Ye,O as Xe,Oa as Ze,Oi as Qe,On as $e,Oo as et,Or as tt,Ot as nt,P as rt,Pa as it,Pi as at,Pn as ot,Pr as st,Pt as ct,Q as lt,Qa as ut,Qi as dt,Qn as ft,Qr as pt,Qt as mt,R as ht,Ra as gt,Ri as _t,Rn as vt,Rr as yt,Rt as bt,S as xt,Sa as St,Si as Ct,Sn as wt,So as Tt,Sr as Et,Ss as Dt,St as Ot,T as kt,Ta as At,Ti as jt,Tn as Mt,To as Nt,Tr as Pt,Tt as Ft,U as It,Ua as Lt,Ui as Rt,Un as zt,Ur as Bt,Ut as Vt,V as Ht,Va as Ut,Vi as Wt,Vn as Gt,Vr as Kt,Vt as qt,W as Jt,Wa as Yt,Wi as Xt,Wn as Zt,Wr as Qt,Wt as $t,X as en,Xa as tn,Xi as nn,Xn as rn,Xr as an,Xt as on,Y as sn,Ya as cn,Yi as ln,Yn as un,Yr as dn,Yt as fn,Z as pn,Za as mn,Zi as hn,Zn as gn,Zr as _n,Zt as vn,_ as yn,_a as bn,_i as xn,_n as Sn,_o as Cn,_r as wn,_s as Tn,_t as En,a as Dn,aa as On,ai as kn,an as An,ao as jn,ar as Mn,as as Nn,at as Pn,b as Fn,ba as In,bi as Ln,bn as Rn,bo as zn,br as Bn,bs as Vn,bt as Hn,c as Un,ca as Wn,ci as Gn,cn as Kn,co as qn,cr as Jn,ct as Yn,d as Xn,da as Zn,di as Qn,dn as $n,do as er,dr as tr,ds as nr,dt as rr,ea as ir,ei as ar,en as or,eo as sr,er as cr,et as lr,f as ur,fa as dr,fi as fr,fn as pr,fo as mr,fr as hr,fs as gr,ft as _r,g as vr,ga as yr,gi as br,gn as xr,go as Sr,gr as Cr,gs as wr,gt as Tr,h as Er,ha as Dr,hi as Or,hn as kr,ho as Ar,hr as jr,hs as Mr,ht as Nr,i as Pr,ia as Fr,ii as Ir,in as Lr,io as Rr,ir as zr,is as Br,it as Vr,j as Hr,ja as Ur,ji as Wr,jn as Gr,jo as Kr,jr as qr,jt as Jr,k as Yr,ka as Xr,ki as Zr,kn as Qr,ko as $r,kr as ei,kt as ti,l as ni,la as ri,li as ii,ln as ai,lo as oi,lr as si,ls as ci,lt as li,m as ui,ma as di,mi as fi,mn as pi,mo as mi,mr as hi,ms as gi,mt as _i,n as vi,na as yi,ni as bi,nn as xi,no as Si,nr as Ci,nt as wi,o as Ti,oa as Ei,oi as Di,on as Oi,oo as ki,or as Ai,ot as ji,p as Mi,pa as Ni,pi as Pi,pn as Fi,po as Ii,pr as Li,ps as Ri,pt as zi,q as Bi,qa as Vi,qi as Hi,qn as Ui,qr as Wi,qt as Gi,r as Ki,ra as qi,ri as Ji,rn as Yi,ro as Xi,rr as Zi,rt as Qi,s as $i,sa as ea,si as ta,sn as na,so as ra,sr as ia,st as aa,t as oa,ta as sa,ti as ca,tn as la,to as ua,tr as da,tt as fa,u as pa,ua as ma,ui as ha,un as ga,uo as _a,ur as va,us as ya,ut as ba,v as xa,va as Sa,vi as Ca,vn as wa,vo as Ta,vr as Ea,vt as Da,w as Oa,wa as ka,wi as Aa,wn as ja,wo as Ma,wr as Na,wt as Pa,x as Fa,xa as Ia,xi as La,xn as Ra,xo as za,xr as Ba,xs as Va,xt as Ha,y as Ua,ya as Wa,yi as Ga,yn as Ka,yo as qa,yr as Ja,yt as Ya,z as Xa,za as Za,zi as Qa,zn as $a,zr as eo,zt as to}from"./dist-BHg9XI3A.mjs";export{oa as AGENT_ID_MAX_LEN,vi as AGENT_ID_RE,Ki as AGENT_WRITE_ORIGIN,t as AUDIT_EMPTY_SCOPE_WARNING,Pr as AcpPermissionStore,Dn as AcpRegistry,Ti as AcpThreadManager,$i as AgentFocusBroadcaster,Un as AgentPresenceBroadcaster,ni as AgentSessionCapacityError,pa as AgentSessionManager,Xn as AutoStartDisabledError,ur as BUNDLE_IDS,Mi as BUNDLE_SCOPE,ui as BUNDLE_SKILL_NAME,Er as BacklinkIndex,vr as CC1Broadcaster,e as CC1_CONTRACT_VERSION,yn as CONCURRENT_REPLACE_WINDOW_MS,xa as CONFIG_FILENAME,Ua as CONFLICT_MARKER_RE,Fn as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Fa as ConfigSchema,xt as ConflictAuthority,D as DEFAULT_CHECKPOINT_RETENTION,Oa as DEFAULT_EMBEDDINGS_DIMENSIONS,kt as DEFAULT_PACK_ID,H as DocumentDurabilityState,F as DocumentDurabilityStateError,Xe as EMBEDDINGS_API_KEY_ENV,Yr as EPHEMERAL_PROJECT_DIR_PREFIX,m as ExposureConsentError,Hr as FEATURED_AGENT_IDS,Le as FILE_SYSTEM_WRITER,We as FILE_WATCHER_ORIGIN,rt as FileEmbeddingsBackend,Y as GIT_PREFLIGHT_FAIL_SPAN_NAME,pe as GIT_UPSTREAM_WRITER,Br as GitDirAccessError,je as GitNotAvailableError,ht as GitTooOldError,Xa as HOCUSPOCUS_AUTH_REJECTION_REASONS,x as HocuspocusAuthRejection,Ht as HocuspocusAuthTokenSchema,se as HomeProjectRootError,It as INSTALLED_AGENTS_SCHEMES,Jt as JSON_SCHEMA_DIALECT_2020_12,Dt as LINEAGE_EPOCH_KEY,te as LIVE_DERIVED_INDEX_DEBOUNCE_MS,Te as MANAGED_RENAME_ORIGIN,Bi as MAX_ACP_THREADS,ye as MAX_AGENT_SESSIONS,sn as MCP_CONNECTION_ID_HEADER,n as MCP_SERVER_NAME,en as MIN_EVICTABLE_IDLE_MS,pn as MIN_GIT_VERSION,lt as MISSING_OK_CONFIG_MESSAGE,Nn as MalformedGitPointerError,c as McpLogger,lr as MissingOkConfigError,fa as OBSERVER_SYNC_ORIGIN,wi as OK_OKIGNORE_TEMPLATE,Qi as ONBOARDING_BUNDLE_IDS,Vn as ORPHAN_MODES,N as PROTOCOL_VERSION,ci as PinoLogger,Vr as ProcessLockCollisionError,Pn as ProjectGitInitError,ji as ROLLBACK_ORIGIN,aa as ROOT_GITIGNORE_TEMPLATE,Yn as RUNTIME_VERSION,li as SERVICE_WRITER,ba as SKILL_INSTALL_EVENTS_FILENAME,r as SKILL_STATE_TARGETS,rr as STARTER_FOLDER_FRONTMATTER_FILENAME,_r as STARTER_PACKS,zi as STARTER_PACK_IDS,_i as STATE_MANIFEST_FILENAME,Nr as STATE_SCHEMA_VERSION,Tr as SYMLINK_MERGE_MIN_GIT_LABEL,En as SYMLINK_MERGE_MIN_GIT_VERSION,a as SYSTEM_DOC_NAME,Da as SeedPrerequisiteError,Ya as SeedRootDirError,Hn as ServerLockCollisionError,Ha as SingleFileNotAFileError,Ot as SingleFileNotFoundError,P as SingleFileNotMarkdownError,Pa as SingleFileProjectOverrideError,Ft as StateManifestError,J as TagIndex,V as USER_GLOBAL_BUNDLE_IDS,nt as UnsafeIncomingSymlinkError,ti as __getShowAllWalkStatsForTesting,b as __resetShowAllWalkStatsForTesting,Jr as acpThreadStoreRoots,Ue as acpThreadsDir,Ye as acquireProcessLock,ct as acquireServerLock,ee as applyAgentMarkdownWrite,ve as applyExternalChange,Ie as applySeed,bt as assertCheckoutSymlinksSafe,to as assertCompatibleStateManifest,E as assertGitAvailable,qt as assertIncomingSymlinksSafe,fe as assertMergeNameResolvesTo,Vt as assertNeverDiskEvent,$t as assertNotHomeProjectRoot,oe as assertRepoCheckoutSymlinksSafe,Ae as attachAcpThreadSocket,Gi as attachCollabClientCounter,we as attachIdleShutdown,fn as auditScopeNotFoundTitle,on as bindConflictAuthority,vn as bootServer,mt as buildAndOpenSkill,p as buildConfigYmlContent,or as buildExecResult,la as buildIngressPolicy,xi as buildOkMcpStdioCommand,Yi as buildSkillZip,Lr as buildStarterFolderFrontmatterYaml,An as buildWipTree,Oi as bundleSkillMdPath,na as canonicalProjectKey,Kn as canonicalizeForCompare,ai as classifyEvents,ga as classifyFsPath,$n as clearAllEmbeddingsKeys,pr as coercePackId,Fi as collectServerHostSnapshot,o as colorFromSeed,pi as commitUpstreamImport,kr as commitWip,xr as commitWipFromTree,Sn as compareSemver,wa as composeEffectiveLinterConfig,Ka as composeFrontmatterSchemasConfig,Rn as containsConflictMarkers,Ra as contentHash,wt as contributorCount,A as countShadowObjects,ja as countStaleAgentWipRefs,Mt as countWipRefs,G as createApiExtension,R as createAssetServeMiddleware,$e as createCollaborationHost,Qr as createContentFilter,_ as createContentFilterAsync,Gr as createEmbeddingsSecretStore,Be as createEphemeralProjectDir,qe as createExternalChangeHandler,ot as createFileLogger,Q as createLiveDerivedIndexExtension,ge as createMcpHttpHandler,Pe as createOsProbe,vt as createPersistenceExtension,$a as createProbeFailureReporter,w as createServer,Gt as createServerObserverExtension,ue as createServerProbeResolver,zt as createStreamingErrorWriter,ya as createTestLogger,Zt as describeStoredEmbeddingsKey,ie as detectClaudeDesktopPresence,Oe as detectGit,Ui as detectProjectShape,Se as detectUserSkillHosts,un as discoverLockDirs,rn as discoverMarkdownlintConfig,gn as emitPreflightFailureSpan,ft as encodeDocName,d as encodeFolderRoute,cr as encodeSkillRoute,da as ensureProjectGit,Ci as errorResponse,Zi as evictStaleTrackerEntries,zr as extractHeadings,Mn as extractOkBinaryPath,Ai as extractWikiLinksFromMarkdown,ia as fallbackPaths,Jn as findEnclosingGitRoot,si as findEnclosingProjectRoot,va as findNativeMarkdownlintFile,tr as flushFileLogger,hr as formatAuditBrokenLinkSuppressionLine,Li as formatAuthRejectionWire,hi as formatContributorsFrom,jr as formatPackRationale,Cr as gcCheckpointRefs,wn as getCurrentMcpLogger,Ea as getIngressContext,Ja as getLocalDir,Bn as getLogFilePath,nr as getLogger,Ba as getLogsDir,Et as getMachineId,M as getMeter,Na as getMetrics,Pt as getTracer,q as handleCollabSocketError,B as handleSpawnCursor,tt as hasForwardingHeaders,ei as hasGcLogLatch,i as iconFromClientName,y as incrementCollabSocketFilteredError,qr as incrementServerObserverFire,He as initContent,Je as initShadowRepo,st as initTelemetry,$ as initToleranceTelemetryWriter,_e as installJsonSchemaDialect,Fe as installPrettyZodErrors,gr as installTestLoggers,yt as installUserSkill,eo as isAllowedApiOrigin,T as isAllowedWorkspaceHostHeader,Kt as isConfigDoc,de as isDefunctProcess,Bt as isDocInConflict,Qt as isHocuspocusAuthRejectionReason,ae as isHomeDir,ke as isHostAdmitted,Wi as isKnownPackId,Ce as isLinkIndexExcludedDoc,dn as isLockProcessRunning,an as isLoopbackAddress,_n as isManagedArtifactDoc,pt as isMintedThreadId,f as isOriginAdmitted,Va as isOrphanMode,ar as isPairedWriteOrigin,ca as isPathWithinDir,bi as isPeerAdmitted,Ji as isProcessAlive,Ir as isProjectRoot,kn as isReservedForUserTree,Di as isSelfWrite,ta as isSystemDoc,Gn as isToleranceTelemetryEnabled,ii as isValidLockPid,ha as lastKnownHash,Qn as listRescueCheckpoints,fr as listStarterPacks,Pi as loadCustomAgents,fi as loadPrincipal,Or as lockAdvertisesUi,br as lockBaseUrl,xn as lockFilePath,Ri as loggerFactory,Ca as loginShapedUserinfoUser,gi as logsCurrentPath,Mr as logsPreviousPath,Ga as makeLazyEmbeddingsKeyStore,Ln as markServerLockDraining,La as mountMcpAndApi,Ct as normalizeFsPath,k as observeReadiness,Aa as packageVersionMajorMinor,jt as parseAuthRejectionWire,W as parseGitVersion,L as parseHocuspocusAuthToken,Qe as parseKeepaliveConnectionId,Zr as pathToDocName,g as planSeed,Wr as prepareSingleFileOpen,ze as processCommand,Ke as processUsage,at as readAgentBrowserTools,Z as readAllTargets,he as readBundleDecision,Ne as readDeclaredGitHubHosts,_t as readOriginCredentialHost,Qa as readOriginGitHubRepo,C as readOwnNativeRules,Wt as readProcessLock,le as readProcessLockDetailed,Rt as readProcessState,Xt as readProjectHeadState,re as readProjectLocalSemanticConfig,De as readServerLock,Hi as readServerPackageVersion,xe as readSkillInstallStateSnapshot,ln as readStateManifest,nn as readTargetRecordedAt,hn as readTargetVersion,dt as reconcile,u as recordContributor,ir as recordSkillInstallEvent,sa as redactShareSubprocessStderr,yi as registerAllTools,qi as registerWrite,Fr as releaseProcessLock,On as releaseServerLock,Ei as removeLastKnownHash,ea as removeProjectSkillGitignoreBlock,Wn as reportSkillInstall,ri as resetMetrics,ma as resolveAuditScope,Zn as resolveBuiltinSkillHosts,s as resolveBundleEnabled,dr as resolveBundledSkillDir,Ni as resolveContentDir,di as resolveCursorBinaryDefault,Dr as resolveCursorSpawnInvocation,yr as resolveEffectiveLinterConfig,bn as resolveEmbeddingsCredential,Sa as resolveGitHubAccountFromUrl,Wa as resolveGitHubAuthHost,In as resolveLockDir,Ia as resolveNativeConfigForDoc,St as resolveNativeMarkdownlintConfig,O as resolvePack,ka as resolvePackageVersion,At as resolveSkillInstallReportSettings,U as resolveUiInfo,I as restoreContributors,Ze as rewriteMarkdownLinksForDocumentRename,Xr as rewriteWikiLinksForDocumentRename,h as runAuthReposSubprocess,Ur as runAuthStatusSubprocess,Re as runCloneSubprocess,Ge as runDeviceFlowSubprocess,it as runWithMcpLogger,X as safeContentPath,me as safeSubdir,Me as safetyCheckpoint,gt as sameGitHubLogin,Za as sanitizeClientName,S as saveInMemoryCheckpoint,Ut as saveVersion,ce as scanLockProcesses,Lt as seedBasenameIndex,Yt as seedEphemeralProjectDir,ne as serializeError,Ee as setActiveSpanAttributes,Vi as setupServerObservers,be as shadowGit,cn as shutdownTelemetry,wr as spansCurrentPath,Tn as spansPreviousPath,tn as spawnDetached,mn as splitMarkdownBlocks,ut as startWatcher,l as strategiesFor,sr as streamedChunkOf,ua as streamingProblemEvent,Si as swapContributors,Xi as teardownToleranceTelemetryWriter,Rr as toBroadcasterKey,jn as tracedAppendFileSync,ki as tracedLinkSync,ra as tracedMkdir,qn as tracedMkdirSync,oi as tracedRename,_a as tracedRenameSync,er as tracedRmSync,mr as tracedRmdirSync,Ii as tracedUnlinkSync,mi as tracedWriteFile,Ar as tracedWriteFileSync,Sr as trustSystemCertificates,Cn as updateLastKnownHash,Ta as updateProcessLockPort,qa as updateServerLockPort,zn as validateAgentId,za as validateCloneInputs,Tt as validateSkillZip,j as waitForServerLockDrain,Ma as withHiddenWindowsConsole,Nt as withSpan,K as withSpanSync,z as writeBundleDecision,et as writeMarkdownlintRule,$r as writeRootGitignoreForNewRepo,v as writeStateManifest,Kr as writeTargetVersion,Ve as writeTracker};
|
package/dist/index.mjs
CHANGED
|
@@ -189,7 +189,7 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
189
189
|
`)].join(`
|
|
190
190
|
`);case`REMOVED_KEY`:{let t=e.path.join(`.`),n=[`${e.source?`Removed key at ${e.source.file}:${e.source.line}:${e.source.column}`:`Removed key in configuration`}: ${t}`,e.redirect];if(e.source?.snippet&&e.source.snippet.length>0)for(let t of e.source.snippet.split(`
|
|
191
191
|
`))n.push(` ${t}`);return n.join(`
|
|
192
|
-
`)}case`NOT_SYNCED`:return`Settings are still loading. Try again in a moment.`;case`WRITE_ERROR`:return`Failed to write config file: ${e.detail}`;case`OKIGNORE_INVALID`:return e.lineNumber===void 0?`.okignore: ${e.detail}`:`.okignore line ${e.lineNumber}: ${e.detail}`;case`UNKNOWN`:return e.message??`Unknown error.`}}function qie(e,t,n){return xd([e,t,n],[])}function xd(e,t){if(t.length>0){let n=Bl(zl,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[0]}let n=Jie(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>Yie(e)?e:void 0),i=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))i.add(t);let a={};for(let e of i)a[e]=xd(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return a}function Jie(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function Yie(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const Xie=Object.freeze([`__config__/project`,`__local__/project`,`__user__/config.yml`,`__config__/okignore`]),Sd=[`project`,`global`];function Zie(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}const Cd=[`.mdx`,`.md`],wd={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/},Qie=et.stable.mcpServerName,$ie=[`exec`,`search`,`history`,`links`,`skills`,`config`,`palette`,`preview_url`,`share_link`,`lint`,`audit`,`write`,`edit`,`delete`,`move`,`install`,`import`,`checkpoint`,`restore_version`];function eae(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}const Td=B(I().min(1)).max(50),tae=U([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),nae=V({label:I().min(1),webUrl:Ri().nullable(),transport:U([`https`,`http`,`ssh`,`git`]).optional()}).loose(),rae=Ji(`checkStatus`,[V({checkStatus:W(`allowed`)}).loose(),V({checkStatus:W(`denied`),deniedReason:U([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:I().optional(),declaredLogin:I().optional(),declaredSource:I().optional()}).loose(),V({checkStatus:W(`unknown`),unknownError:U([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),Ed=U([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),iae=U(nc),aae=U([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);V({state:tae,lastSyncUtc:I().nullable(),lastRunUtc:I().nullable().optional(),lastPullOkUtc:I().nullable().optional(),lastPushOkUtc:I().nullable().optional(),lastFetchUtc:I().nullable(),lastPushedSha:I().nullable(),ahead:L().int().min(0),behind:L().int().min(0),consecutiveFailures:L().int().min(0),consecutivePushFailures:L().int().min(0).optional(),conflictCount:L().int().min(0),hasRemote:R(),syncEnabled:R(),identityUnresolved:R(),remote:nae.nullable().optional(),pushError:I().optional(),pushErrorCode:Ed.optional(),pullError:I().optional(),pullErrorCode:Ed.optional(),pausedReason:I().optional(),blockingPaths:B(I().min(1)).optional(),refusedSymlinkPaths:Td.optional(),pushPermission:rae.optional(),syncMode:iae.optional(),lastPullUtc:I().nullable().optional(),lastPullOutcome:aae.nullable().optional()}).loose(),V({action:U([`commit`]),paths:B(I().min(1)),commitSha:I().optional()}).loose(),V({action:U([`commit`])}).loose(),V({op:U([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),V({op:U([`sync`,`push`,`pull`,`fetch`])}).loose();const Dd=U([`merge-native`,`working-tree`,`reconcile`]),Od=U([`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`]),oae=U([`mine`,`theirs`,`content`,`delete`]);V({conflicts:B(V({file:I().min(1),detectedAt:I().min(1),conflict:Dd,reason:Od.optional().catch(void 0),conflictKind:U([`git`,`stale-external-write`]).optional(),docName:I().nullable(),theirsSha:I().optional(),baseSha:I().optional()}).loose())}).loose(),V({file:I().min(1),strategy:U([`mine`,`theirs`,`content`,`delete`]),content:I().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),V({}).loose(),V({file:I().min(1),base:I(),ours:I(),theirs:I(),kind:U([`both-modified`,`delete-modify`,`modify-delete`]),conflict:Dd,reason:Od.optional().catch(void 0),conflictKind:U([`git`,`stale-external-write`]).optional(),resolutionOptions:B(oae)}).loose(),V({plan:sa(e=>e!==void 0,{message:`plan is required`})}).loose(),V({plan:sa(e=>e!==void 0,{message:`plan is required`})}).loose(),V({result:sa(e=>e!==void 0,{message:`result is required`})}).loose(),V({packId:I().min(1)}).strict(),V({installedHosts:B(I()),skills:B(V({name:I().min(1),created:R()}).strict())}).strict();const sae=V({path:I().min(1),summary:I().min(1)}).loose(),cae=V({files:L().int().nonnegative(),folders:L().int().nonnegative()}).loose();V({packs:B(V({id:I().min(1),name:I().min(1),description:I().min(1),defaultSubfolder:I().optional(),folders:B(sae),entryCounts:cae}).loose())}).loose(),V({noOpen:R().optional(),out:I().min(1).optional()}).loose();const lae=V({reason:U([`unsupported-platform`,`spawn-error`]),message:I()}).loose();Ji(`status`,[V({status:W(`installed`),outputPath:I(),size:L().int().nonnegative(),sha256:I(),skillVersion:I()}).loose(),V({status:W(`built`),outputPath:I(),size:L().int().nonnegative(),sha256:I(),skillVersion:I(),handoffError:lae.optional()}).loose(),V({status:W(`failed`),buildError:I()}).loose(),V({status:W(`skip-current`),skillVersion:I(),recordedAt:I().optional()}).loose()]),Ji(`kind`,[V({kind:W(`doc`),docPath:I().min(1)}).loose(),V({kind:W(`folder`),folderPath:I()}).loose()]);const kd=U([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),Ad=U([`current`,`stale`,`absent`,`empty`]);Ji(`ok`,[V({ok:W(!0),shareUrl:I().min(1),sharedUrl:I().min(1),branch:I().min(1),freshness:Ad.optional().catch(void 0)}).loose(),V({ok:W(!1),error:kd,branch:I().min(1).optional()}).loose()]);const uae=U([`user`,`org`]),dae=V({login:I().min(1),kind:uae,avatarUrl:I().optional()}).loose(),jd=U([`auth-required`,`network`]);Ji(`ok`,[V({ok:W(!0),owners:B(dae)}).loose(),V({ok:W(!1),error:jd}).loose()]),Ji(`ok`,[V({ok:W(!0),available:R()}).loose(),V({ok:W(!1),error:jd}).loose()]);const fae=U([`public`,`private`]);V({owner:I().min(1),name:I().min(1),visibility:fae,description:I().optional()}).loose();const pae=U([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]);Ji(`ok`,[V({ok:W(!0),ownerLogin:I().min(1),repoName:I().min(1),cloneUrl:I().min(1),defaultBranch:I().min(1)}).loose(),V({ok:W(!1),error:pae}).loose()]);function Md(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const Nd=e=>e.refine(Md,`invalid branch name`),Pd={shareTargetExists:R(),dirtyConflicts:V({conflicts:R(),files:B(I().min(1))}).loose(),branchIsLocal:R(),shareTargetOnOriginBranch:R().optional()};Ji(`detached`,[V({detached:W(!1),currentBranch:I().min(1).nullable(),currentHeadSha:Vi(),...Pd}).loose(),V({detached:W(!0),currentBranch:Vi(),currentHeadSha:I().min(1),...Pd}).loose()]),V({branch:Nd(I().min(1)),principalId:I().optional(),fastForward:R().optional()}).loose();const mae=U([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`,`unsafe-symlinks`,`symlink-check-failed`]);Ji(`ok`,[V({ok:W(!0)}).loose(),V({ok:W(!1),reason:mae,files:B(I().min(1)).optional(),otherWorktreePath:I().min(1).optional(),refusedSymlinkPaths:Td.optional()}).loose()]),U([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]),V({branch:Nd(I().min(1)),path:I(),kind:U([`doc`,`folder`]),contentRootDepth:L().int().min(1).max(65535).optional()}).loose(),Ji(`verdict`,[V({verdict:W(`on-origin`)}).loose(),V({verdict:W(`renamed`),renamedTo:I().min(1)}).loose(),V({verdict:W(`deleted`)}).loose(),V({verdict:W(`never-on-branch`)}).loose(),V({verdict:W(`changed-locally`)}).loose(),V({verdict:W(`unknown`)}).loose()]).catch({verdict:`unknown`});function Fd(e,t){let n=eae(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const Id=I().superRefine(Fd).optional(),hae=I().superRefine(Fd),Ld={agentId:I().optional(),agentName:I().optional(),colorSeed:I().optional(),clientName:I().optional(),clientVersion:I().optional(),label:I().optional()},Rd=I().optional(),gae=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,_ae=V({startedAt:I().min(1),httpListenMs:L().nonnegative().optional(),seedWalkMs:L().nonnegative().optional(),indexesMs:L().nonnegative().optional(),readyMs:L().nonnegative().optional(),fileCount:L().nonnegative().optional()});V({serverInstanceId:I().min(1),currentBranch:I().min(1).optional(),currentDiskAckSVs:H(I().min(1),I().min(1)).optional(),boot:_ae.optional(),collabClients:L().int().nonnegative().optional()}).loose(),V({id:I().min(1),display_name:I().min(1),display_email:I(),source:U([`git-config`,`synthesized`]),created_at:I().min(1)}).loose(),V({collabUrl:I().nullable(),previewUrl:I().nullable(),port:L(),singleFile:R().default(!1)}).loose();const zd=U(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:symlink-refused.urn:ok:error:links-not-permitted.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:unsupported-media-type.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:derived-index-unavailable.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:stale-external-write.urn:ok:error:store-refused.urn:ok:error:doc-removed.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:non-github-origin.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:concurrent-overwrite-refused.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`)),vae=V({type:zd,title:I().min(1),status:L().int().min(400).max(599),instance:I().regex(gae,`instance must be urn:uuid:<uuid>`).optional(),detail:I().optional()}).loose();V({parentDocName:I().min(1),placement:U([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:I().min(1).optional(),agentName:I().min(1).optional()}).loose(),V({src:I().min(1),path:I().min(1).optional(),deduped:R().optional()}).loose(),V({url:I().min(1),dir:I().min(1),branch:I().min(1).refine(Md,`invalid branch name`).optional()}).loose(),V({type:W(`error`),problem:vae}).loose(),V({docName:Id,summary:Rd,content:I().optional(),...Ld}).loose(),V({docName:Id,summary:Rd,markdown:I(),position:U([`append`,`prepend`,`replace`]).optional(),extension:U(Cd).optional(),...Ld}).loose(),V({docName:Id,summary:Rd,find:I().min(1),replace:I(),offset:L().int().nonnegative().optional(),...Ld}).loose(),V({docName:Id,connectionId:I().min(1),scope:U([`last`,`session`,`file`,`count`]).optional(),count:L().int().positive().optional(),...Ld}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});const Bd=V({value:I(),truncatedFrom:L().int().nonnegative().optional(),hint:I().optional()}).loose(),yae=Ji(`kind`,[V({kind:W(`inline`),content:I()}),V({kind:W(`truncated`),byteLength:L().int().nonnegative(),hint:I()})]),Vd=V({kind:W(`content-divergence`),intendedBytes:L().int().nonnegative(),actualBytes:L().int().nonnegative(),byteDelta:L().int(),divergenceType:I().optional(),currentState:yae.optional(),hint:I().optional()}).loose(),bae=V({type:W(`orphan`),parentCandidates:B(I()),message:I()}).loose(),Hd=V({kind:W(`disk-edit-reconciled`),intendedBytes:L().int().nonnegative(),actualBytes:L().int().nonnegative(),byteDelta:L().int(),mergeOutcome:I().optional(),hint:I().optional()}).loose();Ji(`kind`,[Vd,Hd]);const xae=Object.keys({"content-divergence":!0,"disk-edit-reconciled":!0}),Sae=V({kind:W(`mermaid-parse-error`),fenceIndex:L().int().positive(),fenceFirstLine:I(),message:I(),line:L().int().positive().optional()}).loose(),Ud=V({href:I(),targetKind:I(),role:I(),sourceForm:I(),resolvedTarget:I().nullable(),reason:I(),resolutionMethod:I(),fallbackTarget:I().nullable().optional(),definition:V({line:L().int().nonnegative(),label:I()}).loose().optional()}).loose(),Wd=Ji(`kind`,[Vd,Hd,Sae,V({kind:W(`lint-violation`),source:I(),code:I(),message:I(),severity:U([`error`,`warning`,`info`,`hint`]),line:L().int().positive(),column:L().int().positive(),linkTarget:I().optional(),localTarget:Ud.optional()}).loose()]),Gd=B(Wd).min(1),Kd=V({href:I(),resolvedTo:I().nullable(),reason:U([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:Ud.optional()}).loose(),qd=B(Kd),Jd=V({reason:I().min(1),count:L().int().positive()}).loose();V({timestamp:I().min(1),summary:Bd.optional(),warnings:Gd.optional()}).loose(),V({timestamp:I().min(1),subscriberCount:L().int().nonnegative(),systemSubscriberCount:L().int().nonnegative(),hints:B(bae).optional(),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose(),V({timestamp:I().min(1),subscriberCount:L().int().nonnegative(),systemSubscriberCount:L().int().nonnegative(),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose(),V({docName:I().min(1),scope:U([`last`,`session`,`count`]),undone:R()}).loose(),V({docs:B(V({docName:hae,markdown:I(),position:U([`append`,`prepend`,`replace`]).optional(),extension:U(Cd).optional(),summary:Rd}).loose()).min(1).max(100),...Ld}).loose();const Cae=V({type:zd,title:I(),detail:I().optional()}).loose(),wae=Ji(`status`,[V({status:W(`written`),docName:I().min(1),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose(),V({status:W(`error`),docName:I().min(1),error:Cae}).loose()]);V({timestamp:I().min(1),results:B(wae),written:L().int().nonnegative(),failed:L().int().nonnegative()}).loose(),V({docName:Id,patch:H(I(),qi([$a,Vi()])),types:H(I(),U(Za)).optional(),summary:Rd,...Ld}).loose(),V({timestamp:I().min(1),subscriberCount:L().int().nonnegative(),systemSubscriberCount:L().int().nonnegative(),appliedKeys:B(I()),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose();function Yd(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Xd=of(/[A-Za-z]/),Zd=of(/[\dA-Za-z]/),Tae=of(/[#-'*+\--9=?A-Z^-~]/);function Qd(e){return e!==null&&(e<32||e===127)}const $d=of(/\d/),Eae=of(/[\dA-Fa-f]/),Dae=of(/[!-/:-@[-`{-~]/);function ef(e){return e!==null&&e<-2}function tf(e){return e!==null&&(e<0||e===32)}function nf(e){return e===-2||e===-1||e===32}const rf=of(/\p{P}|\p{S}/u),af=of(/\s/);function of(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function sf(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}const cf=(function(e,t,n,r,i){let a=lf(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!cf(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return df(e)?a.call(i,e,n,r):!1}),lf=(function(e){if(e==null)return jae;if(typeof e==`function`)return uf(e);if(typeof e==`object`)return Array.isArray(e)?Oae(e):kae(e);if(typeof e==`string`)return Aae(e);throw Error(`Expected function, string, or object as test`)});function Oae(e){let t=[],n=-1;for(;++n<e.length;)t[n]=lf(e[n]);return uf(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function kae(e){let t=e;return uf(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Aae(e){return uf(t);function t(t){return t&&t.type===e}}function uf(e){return t;function t(t,n,r){return!!(df(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function jae(){return!0}function df(e){return typeof e==`object`&&!!e&&`type`in e}function Mae(e){return`\x1B[33m`+e+`\x1B[39m`}const ff=[],pf=`skip`;function mf(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=lf(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Mae(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ff,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Nae(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Nae(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ff:[e]}function Pae(e,t,n){let r=lf((n||{}).ignore||[]),i=Fae(t),a=-1;for(;++a<i.length;)mf(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Fae(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Iae(e[0]),Lae(e[1])])}return t}function Iae(e){return typeof e==`string`?new RegExp(sf(e),`g`):e}function Lae(e){return typeof e==`function`?e:function(){return e}}const hf=`phrasing`,gf=[`autolink`,`link`,`image`,`label`];function Rae(){return{transforms:[Gae],enter:{literalAutolink:Bae,literalAutolinkEmail:_f,literalAutolinkHttp:_f,literalAutolinkWww:_f},exit:{literalAutolink:Wae,literalAutolinkEmail:Uae,literalAutolinkHttp:Vae,literalAutolinkWww:Hae}}}function zae(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:hf,notInConstruct:gf},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:hf,notInConstruct:gf},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:hf,notInConstruct:gf}]}}function Bae(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function _f(e){this.config.enter.autolinkProtocol.call(this,e)}function Vae(e){this.config.exit.autolinkProtocol.call(this,e)}function Hae(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Uae(e){this.config.exit.autolinkEmail.call(this,e)}function Wae(e){this.exit(e)}function Gae(e){Pae(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kae],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,qae]],{ignore:[`link`,`linkReference`]})}function Kae(e,t,n,r,i){let a=``;if(!vf(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Jae(n)))return!1;let o=Yae(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function qae(e,t,n,r){return!vf(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Jae(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Yae(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Yd(e,`(`),a=Yd(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function vf(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||af(n)||rf(n))&&(!t||n!==47)}function yf(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}bf.peek=ioe;function Xae(){this.buffer()}function Zae(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Qae(){this.buffer()}function $ae(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function eoe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yf(this.sliceSerialize(e)).toLowerCase(),n.label=t}function toe(e){this.exit(e)}function noe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yf(this.sliceSerialize(e)).toLowerCase(),n.label=t}function roe(e){this.exit(e)}function ioe(){return`[`}function bf(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function aoe(){return{enter:{gfmFootnoteCallString:Xae,gfmFootnoteCall:Zae,gfmFootnoteDefinitionLabelString:Qae,gfmFootnoteDefinition:$ae},exit:{gfmFootnoteCallString:eoe,gfmFootnoteCall:toe,gfmFootnoteDefinitionLabelString:noe,gfmFootnoteDefinition:roe}}}function ooe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:bf},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
192
|
+
`)}case`NOT_SYNCED`:return`Settings are still loading. Try again in a moment.`;case`WRITE_ERROR`:return`Failed to write config file: ${e.detail}`;case`OKIGNORE_INVALID`:return e.lineNumber===void 0?`.okignore: ${e.detail}`:`.okignore line ${e.lineNumber}: ${e.detail}`;case`UNKNOWN`:return e.message??`Unknown error.`}}function qie(e,t,n){return xd([e,t,n],[])}function xd(e,t){if(t.length>0){let n=Bl(zl,t);if(n?.scope===`user`)return e[0];if(n?.scope===`project`)return e[1]??e[0];if(n?.scope===`project-local`)return e[2]??e[0]}let n=Jie(e);if(n===void 0)return;if(n===null)return null;if(Array.isArray(n)||typeof n!=`object`)return n;let r=e.map(e=>Yie(e)?e:void 0),i=new Set;for(let e of r)if(e!==void 0)for(let t of Object.keys(e))i.add(t);let a={};for(let e of i)a[e]=xd(r.map(t=>t===void 0?void 0:t[e]),[...t,e]);return a}function Jie(e){for(let t=e.length-1;t>=0;t--)if(e[t]!==void 0)return e[t]}function Yie(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}const Xie=Object.freeze([`__config__/project`,`__local__/project`,`__user__/config.yml`,`__config__/okignore`]),Sd=[`project`,`global`];function Zie(e){return e.startsWith(`__skill__/`)||e.startsWith(`__template__/`)||e.startsWith(`__extskill__/`)}const Cd=[`.mdx`,`.md`],wd={cursor:/\bCursor(?:\([^)]+\))?\/\d/,codex:/\bCodex(?:\([^)]+\))?\/\d/,"claude-desktop":/\bClaude(?:\([^)]+\))?\/\d/},Qie=et.stable.mcpServerName,$ie=[`exec`,`search`,`history`,`links`,`skills`,`config`,`palette`,`preview_url`,`share_link`,`lint`,`audit`,`write`,`edit`,`delete`,`move`,`install`,`import`,`checkpoint`,`restore_version`];function eae(e){if(e.length===0)return{ok:!1,reason:`docName must not be empty`};if(e.trim().length===0)return{ok:!1,reason:`docName must not be blank (whitespace only)`};if(e!==e.trim())return{ok:!1,reason:`docName must not have leading or trailing whitespace`};for(let t=0;t<e.length;t++){let n=e.charCodeAt(t);if(n<32||n===127)return{ok:!1,reason:`docName must not contain control characters`}}if(e.includes(`..`)||e.startsWith(`/`)||e.includes(`\\`))return{ok:!1,reason:`docName must not contain "..", a leading "/", or a backslash`};for(let t of e.split(`/`)){if(t.length===0)return{ok:!1,reason:`docName must not contain empty path segments (no leading, trailing, or doubled "/")`};if(t.startsWith(`.`))return{ok:!1,reason:`docName path segments must not start with "." (hidden files are not addressable)`}}return{ok:!0}}const Td=B(I().min(1)).max(50),tae=U([`dormant`,`idle`,`fetching`,`pulling`,`pushing`,`conflict`,`offline`,`auth-error`,`disabled`]),nae=V({label:I().min(1),webUrl:Ri().nullable(),transport:U([`https`,`http`,`ssh`,`git`]).optional()}).loose(),rae=Ji(`checkStatus`,[V({checkStatus:W(`allowed`)}).loose(),V({checkStatus:W(`denied`),deniedReason:U([`no-collaborator`,`private-no-access`,`repo-not-found`,`not-authenticated`]),resolvedLogin:I().optional(),declaredLogin:I().optional(),declaredSource:I().optional()}).loose(),V({checkStatus:W(`unknown`),unknownError:U([`network`,`timeout`,`rate-limit`,`token-invalid`,`malformed-response`,`ssh-unverified`]).optional()}).loose()]),Ed=U([`auth-403`,`auth-401`,`auth-scope-mismatch`,`auth-no-credential`,`auth-not-found-as-identity`,`semantic-protected-branch`]),iae=U(nc),aae=U([`succeeded`,`up-to-date`,`conflict`,`refused`,`error`]);V({state:tae,lastSyncUtc:I().nullable(),lastRunUtc:I().nullable().optional(),lastPullOkUtc:I().nullable().optional(),lastPushOkUtc:I().nullable().optional(),lastFetchUtc:I().nullable(),lastPushedSha:I().nullable(),ahead:L().int().min(0),behind:L().int().min(0),consecutiveFailures:L().int().min(0),consecutivePushFailures:L().int().min(0).optional(),conflictCount:L().int().min(0),hasRemote:R(),syncEnabled:R(),identityUnresolved:R(),remote:nae.nullable().optional(),pushError:I().optional(),pushErrorCode:Ed.optional(),pullError:I().optional(),pullErrorCode:Ed.optional(),pausedReason:I().optional(),blockingPaths:B(I().min(1)).optional(),refusedSymlinkPaths:Td.optional(),pushPermission:rae.optional(),syncMode:iae.optional(),lastPullUtc:I().nullable().optional(),lastPullOutcome:aae.nullable().optional()}).loose(),V({action:U([`commit`]),paths:B(I().min(1)),commitSha:I().optional()}).loose(),V({action:U([`commit`])}).loose(),V({op:U([`sync`,`push`,`pull`,`fetch`]).optional()}).loose(),V({op:U([`sync`,`push`,`pull`,`fetch`])}).loose();const Dd=U([`merge-native`,`working-tree`,`reconcile`]),Od=U([`merged-with-markers`,`refused-conflict-markers`,`refused-no-base`,`refused-too-large`,`disk-markers`,`stale-external-write`]),oae=U([`mine`,`theirs`,`content`,`delete`]);V({conflicts:B(V({file:I().min(1),detectedAt:I().min(1),conflict:Dd,reason:Od.optional().catch(void 0),conflictKind:U([`git`,`stale-external-write`]).optional(),docName:I().nullable(),theirsSha:I().optional(),baseSha:I().optional()}).loose())}).loose(),V({file:I().min(1),strategy:U([`mine`,`theirs`,`content`,`delete`]),content:I().optional()}).loose().refine(e=>e.strategy!==`content`||e.content!==void 0,{message:`content must be provided when strategy is 'content' (an empty string keeps an empty file)`,path:[`content`]}),V({}).loose(),V({file:I().min(1),base:I(),ours:I(),theirs:I(),kind:U([`both-modified`,`delete-modify`,`modify-delete`]),conflict:Dd,reason:Od.optional().catch(void 0),conflictKind:U([`git`,`stale-external-write`]).optional(),resolutionOptions:B(oae)}).loose(),V({plan:sa(e=>e!==void 0,{message:`plan is required`})}).loose(),V({plan:sa(e=>e!==void 0,{message:`plan is required`})}).loose(),V({result:sa(e=>e!==void 0,{message:`result is required`})}).loose(),V({packId:I().min(1)}).strict(),V({installedHosts:B(I()),skills:B(V({name:I().min(1),created:R()}).strict())}).strict();const sae=V({path:I().min(1),summary:I().min(1)}).loose(),cae=V({files:L().int().nonnegative(),folders:L().int().nonnegative()}).loose();V({packs:B(V({id:I().min(1),name:I().min(1),description:I().min(1),defaultSubfolder:I().optional(),folders:B(sae),entryCounts:cae}).loose())}).loose(),V({noOpen:R().optional(),out:I().min(1).optional()}).loose();const lae=V({reason:U([`unsupported-platform`,`spawn-error`]),message:I()}).loose();Ji(`status`,[V({status:W(`installed`),outputPath:I(),size:L().int().nonnegative(),sha256:I(),skillVersion:I()}).loose(),V({status:W(`built`),outputPath:I(),size:L().int().nonnegative(),sha256:I(),skillVersion:I(),handoffError:lae.optional()}).loose(),V({status:W(`failed`),buildError:I()}).loose(),V({status:W(`skip-current`),skillVersion:I(),recordedAt:I().optional()}).loose()]),Ji(`kind`,[V({kind:W(`doc`),docPath:I().min(1)}).loose(),V({kind:W(`folder`),folderPath:I()}).loose()]);const kd=U([`no-remote`,`detached-head`,`branch-not-on-origin`,`non-github-remote`,`invalid-path`,`unsupported-share-url`]),Ad=U([`current`,`stale`,`absent`,`empty`]);Ji(`ok`,[V({ok:W(!0),shareUrl:I().min(1),sharedUrl:I().min(1),branch:I().min(1),freshness:Ad.optional().catch(void 0)}).loose(),V({ok:W(!1),error:kd,branch:I().min(1).optional()}).loose()]);const uae=U([`user`,`org`]),dae=V({login:I().min(1),kind:uae,avatarUrl:I().optional()}).loose(),jd=U([`auth-required`,`network`]);Ji(`ok`,[V({ok:W(!0),owners:B(dae)}).loose(),V({ok:W(!1),error:jd}).loose()]),Ji(`ok`,[V({ok:W(!0),available:R()}).loose(),V({ok:W(!1),error:jd}).loose()]);const fae=U([`public`,`private`]);V({owner:I().min(1),name:I().min(1),visibility:fae,description:I().optional()}).loose();const pae=U([`name-conflict`,`saml-sso`,`auth-required`,`push-failed`,`init-failed`,`network`,`no-project`]);Ji(`ok`,[V({ok:W(!0),ownerLogin:I().min(1),repoName:I().min(1),cloneUrl:I().min(1),defaultBranch:I().min(1)}).loose(),V({ok:W(!1),error:pae}).loose()]);function Md(e){return!(typeof e!=`string`||e.length===0||e.startsWith(`-`)||/[\x00-\x1F\x7F]/.test(e)||/\s/.test(e)||e.includes(`:`)||e.split(`/`).includes(`..`))}const Nd=e=>e.refine(Md,`invalid branch name`),Pd={shareTargetExists:R(),dirtyConflicts:V({conflicts:R(),files:B(I().min(1))}).loose(),branchIsLocal:R(),shareTargetOnOriginBranch:R().optional()};Ji(`detached`,[V({detached:W(!1),currentBranch:I().min(1).nullable(),currentHeadSha:Vi(),...Pd}).loose(),V({detached:W(!0),currentBranch:Vi(),currentHeadSha:I().min(1),...Pd}).loose()]),V({branch:Nd(I().min(1)),principalId:I().optional(),fastForward:R().optional()}).loose();const mae=U([`dirty-conflict`,`branch-not-found`,`fetch-failed`,`checkout-failed`,`branch-in-other-worktree`,`ff-diverged`,`unsafe-symlinks`,`symlink-check-failed`]);Ji(`ok`,[V({ok:W(!0)}).loose(),V({ok:W(!1),reason:mae,files:B(I().min(1)).optional(),otherWorktreePath:I().min(1).optional(),refusedSymlinkPaths:Td.optional()}).loose()]),U([`on-origin`,`renamed`,`deleted`,`never-on-branch`,`changed-locally`,`unknown`]),V({branch:Nd(I().min(1)),path:I(),kind:U([`doc`,`folder`]),contentRootDepth:L().int().min(1).max(65535).optional()}).loose(),Ji(`verdict`,[V({verdict:W(`on-origin`)}).loose(),V({verdict:W(`renamed`),renamedTo:I().min(1)}).loose(),V({verdict:W(`deleted`)}).loose(),V({verdict:W(`never-on-branch`)}).loose(),V({verdict:W(`changed-locally`)}).loose(),V({verdict:W(`unknown`)}).loose()]).catch({verdict:`unknown`});function Fd(e,t){let n=eae(e);n.ok||t.addIssue({code:`custom`,message:n.reason})}const Id=I().superRefine(Fd).optional(),hae=I().superRefine(Fd),Ld={agentId:I().optional(),agentName:I().optional(),colorSeed:I().optional(),clientName:I().optional(),clientVersion:I().optional(),label:I().optional()},Rd=I().optional(),gae=/^urn:uuid:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,_ae=V({startedAt:I().min(1),httpListenMs:L().nonnegative().optional(),seedWalkMs:L().nonnegative().optional(),indexesMs:L().nonnegative().optional(),readyMs:L().nonnegative().optional(),fileCount:L().nonnegative().optional()});V({serverInstanceId:I().min(1),currentBranch:I().min(1).optional(),currentDiskAckSVs:H(I().min(1),I().min(1)).optional(),boot:_ae.optional(),collabClients:L().int().nonnegative().optional()}).loose(),V({id:I().min(1),display_name:I().min(1),display_email:I(),source:U([`git-config`,`synthesized`]),created_at:I().min(1)}).loose(),V({collabUrl:I().nullable(),previewUrl:I().nullable(),port:L(),singleFile:R().default(!1)}).loose();const zd=U(`urn:ok:error:malformed-upload.urn:ok:error:collision-exhaustion.urn:ok:error:storage-full.urn:ok:error:storage-readonly.urn:ok:error:storage-error.urn:ok:error:no-file-received.urn:ok:error:path-escape.urn:ok:error:symlink-refused.urn:ok:error:links-not-permitted.urn:ok:error:method-not-allowed.urn:ok:error:invalid-request.urn:ok:error:unsupported-media-type.urn:ok:error:payload-too-large.urn:ok:error:request-timeout.urn:ok:error:internal-server-error.urn:ok:error:derived-index-unavailable.urn:ok:error:loopback-required.urn:ok:error:invalid-origin.urn:ok:error:url-not-allowed.urn:ok:error:dir-outside-home.urn:ok:error:concurrent-operation.urn:ok:error:clone-failed.urn:ok:error:clone-timeout.urn:ok:error:server-start-failed.urn:ok:error:reserved-doc-name.urn:ok:error:target-not-found.urn:ok:error:stale-target.urn:ok:error:frontmatter-edit-not-supported.urn:ok:error:invalid-frontmatter-patch.urn:ok:error:frontmatter-malformed.urn:ok:error:no-active-session.urn:ok:error:too-many-agent-sessions.urn:ok:error:disk-divergence.urn:ok:error:stale-external-write.urn:ok:error:store-refused.urn:ok:error:doc-removed.urn:ok:error:doc-not-found.urn:ok:error:doc-already-exists.urn:ok:error:doc-not-open.urn:ok:error:rollback-not-configured.urn:ok:error:doc-not-available.urn:ok:error:backlink-index-not-configured.urn:ok:error:file-rescan-not-configured.urn:ok:error:shadow-not-configured.urn:ok:error:host-not-allowed.urn:ok:error:principal-not-available.urn:ok:error:not-found.urn:ok:error:auth-failed.urn:ok:error:no-project-dir.urn:ok:error:non-github-origin.urn:ok:error:server-open-failed.urn:ok:error:doc-in-conflict.urn:ok:error:concurrent-overwrite-refused.urn:ok:error:unresolved-conflict-markers.urn:ok:error:no-conflict-tracked.urn:ok:error:no-blocking-changes.urn:ok:error:sync-not-active.urn:ok:error:project-repo-not-configured.urn:ok:error:seed-prerequisite-missing.urn:ok:error:seed-invalid-root.urn:ok:error:tag-index-not-configured.urn:ok:error:template-not-found.urn:ok:error:unsupported-asset-type.urn:ok:error:asset-not-found.urn:ok:error:single-file-mode.urn:ok:error:collab-server-not-running.urn:ok:error:gateway-timeout.urn:ok:error:cursor-not-installed.urn:ok:error:cursor-spawn-timeout.urn:ok:error:cursor-spawn-failed.urn:ok:error:handoff-target-not-installed.urn:ok:error:handoff-spawn-timeout.urn:ok:error:handoff-spawn-failed.urn:ok:error:registry-unreachable.urn:ok:error:config-not-writable.urn:ok:error:audit-superseded.urn:ok:error:theme-name-taken.urn:ok:error:theme-name-invalid`.split(`.`)),vae=V({type:zd,title:I().min(1),status:L().int().min(400).max(599),instance:I().regex(gae,`instance must be urn:uuid:<uuid>`).optional(),detail:I().optional()}).loose();V({parentDocName:I().min(1),placement:U([`configured-attachments`,`parent-dir`]).default(`configured-attachments`),agentId:I().min(1).optional(),agentName:I().min(1).optional()}).loose(),V({src:I().min(1),path:I().min(1).optional(),deduped:R().optional()}).loose(),V({url:I().min(1),dir:I().min(1),branch:I().min(1).refine(Md,`invalid branch name`).optional()}).loose(),V({type:W(`error`),problem:vae}).loose(),V({docName:Id,summary:Rd,content:I().optional(),...Ld}).loose(),V({docName:Id,summary:Rd,markdown:I(),position:U([`append`,`prepend`,`replace`]).optional(),extension:U(Cd).optional(),...Ld}).loose(),V({docName:Id,summary:Rd,find:I().min(1),replace:I(),offset:L().int().nonnegative().optional(),...Ld}).loose(),V({docName:Id,connectionId:I().min(1),scope:U([`last`,`session`,`file`,`count`]).optional(),count:L().int().positive().optional(),...Ld}).loose().refine(e=>e.scope!==`count`||e.count!==void 0,{message:`count is required when scope is 'count'`,path:[`count`]});const Bd=V({value:I(),truncatedFrom:L().int().nonnegative().optional(),hint:I().optional()}).loose(),yae=Ji(`kind`,[V({kind:W(`inline`),content:I()}),V({kind:W(`truncated`),byteLength:L().int().nonnegative(),hint:I()})]),Vd=V({kind:W(`content-divergence`),intendedBytes:L().int().nonnegative(),actualBytes:L().int().nonnegative(),byteDelta:L().int(),divergenceType:I().optional(),currentState:yae.optional(),hint:I().optional()}).loose(),bae=V({type:W(`orphan`),parentCandidates:B(I()),message:I()}).loose(),Hd=V({kind:W(`disk-edit-reconciled`),intendedBytes:L().int().nonnegative(),actualBytes:L().int().nonnegative(),byteDelta:L().int(),mergeOutcome:I().optional(),hint:I().optional()}).loose();Ji(`kind`,[Vd,Hd]);const xae=Object.keys({"content-divergence":!0,"disk-edit-reconciled":!0}),Sae=V({kind:W(`mermaid-parse-error`),fenceIndex:L().int().positive(),fenceFirstLine:I(),message:I(),line:L().int().positive().optional()}).loose(),Ud=V({href:I(),targetKind:I(),role:I(),sourceForm:I(),resolvedTarget:I().nullable(),reason:I(),resolutionMethod:I(),fallbackTarget:I().nullable().optional(),definition:V({line:L().int().nonnegative(),label:I()}).loose().optional()}).loose(),Wd=Ji(`kind`,[Vd,Hd,Sae,V({kind:W(`lint-violation`),source:I(),code:I(),message:I(),severity:U([`error`,`warning`,`info`,`hint`]),line:L().int().positive(),column:L().int().positive(),linkTarget:I().optional(),localTarget:Ud.optional()}).loose(),V({kind:W(`link-check-deferred`),message:I()}).loose()]),Gd=B(Wd).min(1),Kd=V({href:I(),resolvedTo:I().nullable(),reason:U([`no-such-doc`,`no-such-file`,`unresolvable`]),localTarget:Ud.optional()}).loose(),qd=B(Kd),Jd=V({reason:I().min(1),count:L().int().positive()}).loose();V({timestamp:I().min(1),summary:Bd.optional(),warnings:Gd.optional()}).loose(),V({timestamp:I().min(1),subscriberCount:L().int().nonnegative(),systemSubscriberCount:L().int().nonnegative(),hints:B(bae).optional(),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose(),V({timestamp:I().min(1),subscriberCount:L().int().nonnegative(),systemSubscriberCount:L().int().nonnegative(),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose(),V({docName:I().min(1),scope:U([`last`,`session`,`count`]),undone:R()}).loose(),V({docs:B(V({docName:hae,markdown:I(),position:U([`append`,`prepend`,`replace`]).optional(),extension:U(Cd).optional(),summary:Rd}).loose()).min(1).max(100),...Ld}).loose();const Cae=V({type:zd,title:I(),detail:I().optional()}).loose(),wae=Ji(`status`,[V({status:W(`written`),docName:I().min(1),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose(),V({status:W(`error`),docName:I().min(1),error:Cae}).loose()]);V({timestamp:I().min(1),results:B(wae),written:L().int().nonnegative(),failed:L().int().nonnegative()}).loose(),V({docName:Id,patch:H(I(),qi([$a,Vi()])),types:H(I(),U(Za)).optional(),summary:Rd,...Ld}).loose(),V({timestamp:I().min(1),subscriberCount:L().int().nonnegative(),systemSubscriberCount:L().int().nonnegative(),appliedKeys:B(I()),summary:Bd.optional(),warnings:Gd.optional(),brokenLinks:qd,brokenLinkSuppression:Jd.optional()}).loose();function Yd(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Xd=of(/[A-Za-z]/),Zd=of(/[\dA-Za-z]/),Tae=of(/[#-'*+\--9=?A-Z^-~]/);function Qd(e){return e!==null&&(e<32||e===127)}const $d=of(/\d/),Eae=of(/[\dA-Fa-f]/),Dae=of(/[!-/:-@[-`{-~]/);function ef(e){return e!==null&&e<-2}function tf(e){return e!==null&&(e<0||e===32)}function nf(e){return e===-2||e===-1||e===32}const rf=of(/\p{P}|\p{S}/u),af=of(/\s/);function of(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function sf(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}const cf=(function(e,t,n,r,i){let a=lf(t);if(n!=null&&(typeof n!=`number`||n<0||n===1/0))throw Error(`Expected positive finite index`);if(r!=null&&(!cf(r)||!r.children))throw Error(`Expected parent node`);if(r==null!=(n==null))throw Error(`Expected both parent and index`);return df(e)?a.call(i,e,n,r):!1}),lf=(function(e){if(e==null)return jae;if(typeof e==`function`)return uf(e);if(typeof e==`object`)return Array.isArray(e)?Oae(e):kae(e);if(typeof e==`string`)return Aae(e);throw Error(`Expected function, string, or object as test`)});function Oae(e){let t=[],n=-1;for(;++n<e.length;)t[n]=lf(e[n]);return uf(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function kae(e){let t=e;return uf(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Aae(e){return uf(t);function t(t){return t&&t.type===e}}function uf(e){return t;function t(t,n,r){return!!(df(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function jae(){return!0}function df(e){return typeof e==`object`&&!!e&&`type`in e}function Mae(e){return`\x1B[33m`+e+`\x1B[39m`}const ff=[],pf=`skip`;function mf(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=lf(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+Mae(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ff,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Nae(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Nae(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ff:[e]}function Pae(e,t,n){let r=lf((n||{}).ignore||[]),i=Fae(t),a=-1;for(;++a<i.length;)mf(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function Fae(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Iae(e[0]),Lae(e[1])])}return t}function Iae(e){return typeof e==`string`?new RegExp(sf(e),`g`):e}function Lae(e){return typeof e==`function`?e:function(){return e}}const hf=`phrasing`,gf=[`autolink`,`link`,`image`,`label`];function Rae(){return{transforms:[Gae],enter:{literalAutolink:Bae,literalAutolinkEmail:_f,literalAutolinkHttp:_f,literalAutolinkWww:_f},exit:{literalAutolink:Wae,literalAutolinkEmail:Uae,literalAutolinkHttp:Vae,literalAutolinkWww:Hae}}}function zae(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:hf,notInConstruct:gf},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:hf,notInConstruct:gf},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:hf,notInConstruct:gf}]}}function Bae(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function _f(e){this.config.enter.autolinkProtocol.call(this,e)}function Vae(e){this.config.exit.autolinkProtocol.call(this,e)}function Hae(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function Uae(e){this.config.exit.autolinkEmail.call(this,e)}function Wae(e){this.exit(e)}function Gae(e){Pae(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Kae],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,qae]],{ignore:[`link`,`linkReference`]})}function Kae(e,t,n,r,i){let a=``;if(!vf(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Jae(n)))return!1;let o=Yae(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function qae(e,t,n,r){return!vf(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Jae(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Yae(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Yd(e,`(`),a=Yd(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function vf(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||af(n)||rf(n))&&(!t||n!==47)}function yf(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}bf.peek=ioe;function Xae(){this.buffer()}function Zae(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Qae(){this.buffer()}function $ae(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function eoe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yf(this.sliceSerialize(e)).toLowerCase(),n.label=t}function toe(e){this.exit(e)}function noe(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yf(this.sliceSerialize(e)).toLowerCase(),n.label=t}function roe(e){this.exit(e)}function ioe(){return`[`}function bf(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function aoe(){return{enter:{gfmFootnoteCallString:Xae,gfmFootnoteCall:Zae,gfmFootnoteDefinitionLabelString:Qae,gfmFootnoteDefinition:$ae},exit:{gfmFootnoteCallString:eoe,gfmFootnoteCall:toe,gfmFootnoteDefinitionLabelString:noe,gfmFootnoteDefinition:roe}}}function ooe(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:bf},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
|
|
193
193
|
`:` `)+r.indentLines(r.containerFlow(e,a.current()),t?xf:soe))),s(),o}}function soe(e,t,n){return t===0?e:xf(e,t,n)}function xf(e,t,n){return(n?``:` `)+e}const coe=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Sf.peek=poe;function loe(){return{canContainEols:[`delete`],enter:{strikethrough:doe},exit:{strikethrough:foe}}}function uoe(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:coe}],handlers:{delete:Sf}}}function doe(e){this.enter({type:`delete`,children:[]},e)}function foe(e){this.exit(e)}function Sf(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function poe(){return`~`}function moe(e){return e.length}function hoe(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||moe,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=goe(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Cf(r[d]);else{let e=Cf(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
|
|
194
194
|
`)}function goe(e){return e==null?``:String(e)}function Cf(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}const wf={}.hasOwnProperty;function Tf(e,t){let n=t||{};function r(t,...n){let i=r.invalid,a=r.handlers;if(t&&wf.call(t,e)){let n=String(t[e]);i=wf.call(a,n)?a[n]:r.unknown}if(i)return i.call(this,t,...n)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const _oe={}.hasOwnProperty;function Ef(e,t){let n=-1,r;if(t.extensions)for(;++n<t.extensions.length;)Ef(e,t.extensions[n]);for(r in t)if(_oe.call(t,r))switch(r){case`extensions`:break;case`unsafe`:Df(e[r],t[r]);break;case`join`:Df(e[r],t[r]);break;case`handlers`:voe(e[r],t[r]);break;default:e.options[r]=t[r]}return e}function Df(e,t){t&&e.push(...t)}function voe(e,t){t&&Object.assign(e,t)}function yoe(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),boe);return i(),o}function boe(e,t,n){return`>`+(n?``:` `)+e}function Of(e,t){return kf(e,t.inConstruct,!0)&&!kf(e,t.notInConstruct,!1)}function kf(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Af(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
195
195
|
`&&Of(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
|
|
@@ -1106,7 +1106,7 @@ caused by: `+i(o,t)):a},a=e=>i(e,new Set),o=(e,t,i)=>{if(!n(e))return``;let a=i?
|
|
|
1106
1106
|
`),process.exit(2));let s=new Set(n),c={roots:[{uri:t.pathToFileURL(i).href,name:`chat files`}]},l=e.spawn(a,o,{cwd:r,stdio:[`pipe`,`pipe`,`inherit`],windowsHide:!0}),u=l.stdin,d=l.stdout;(u===null||d===null)&&(process.stderr.write(`ok-browser relay: the browser server has no pipes
|
|
1107
1107
|
`),process.exit(1));let f=e=>typeof e==`object`&&e&&!Array.isArray(e)?e:null,p=e=>{u.write(`${JSON.stringify(e)}\n`)},m=e=>{process.stdout.write(`${JSON.stringify(e)}\n`)},h=(e,t)=>{process.stderr.write(`ok-browser relay: dropped a ${e} line that ${t}\n`)},g=(e,t,n)=>{if(e.trim()===``)return null;let r;try{r=JSON.parse(e)}catch{return h(t,`is not JSON`),null}let i=f(r);if(i!==null)return i;if(Array.isArray(r))for(let e of r){let t=f(e);t?.method!==void 0&&t.id!==void 0&&n({jsonrpc:`2.0`,id:t.id,error:{code:-32600,message:`Batched messages are not supported`}})}return h(t,`is not a single JSON-RPC message`),null},_=e=>{let t=g(e,`client`,m);if(t===null||t.method===`notifications/roots/list_changed`)return null;let n=f(t.params),r=n?.name;return t.method===`tools/call`&&(typeof r!=`string`||!s.has(r))?(t.id!==void 0&&m({jsonrpc:`2.0`,id:t.id,error:{code:-32602,message:`Tool ${String(r)} is not available`}}),null):(t.method===`initialize`&&n!==null&&(n.capabilities={...f(n.capabilities),roots:{listChanged:!1}}),JSON.stringify(t))},v=e=>{let t=g(e,`server`,p);if(t===null)return null;if(t.method===`roots/list`)return t.id!==void 0&&p({jsonrpc:`2.0`,id:t.id,result:c}),null;let n=f(t.result),r=n?.tools;if(n===null||!Array.isArray(r))return e;let i=r.filter(e=>{let t=f(e)?.name;return typeof t==`string`&&s.has(t)});for(let e of i){let t=f(f(e)?.annotations);t!==null&&(t.readOnlyHint=!1)}return n.tools=i,JSON.stringify(t)},y=(e,t,n,r)=>{let i=``,a=e=>{let r=n(e);r!==null&&t.write(`${r}\n`)};e.setEncoding(`utf8`),e.on(`data`,e=>{i+=String(e);let t=i.indexOf(`
|
|
1108
1108
|
`);for(;t!==-1;)a(i.slice(0,t)),i=i.slice(t+1),t=i.indexOf(`
|
|
1109
|
-
`)}),e.on(`end`,()=>{i!==``&&a(i),r&&t.end()})};u.on(`error`,()=>{}),y(process.stdin,u,_,!0),y(d,process.stdout,v,!1);for(let e of[`SIGINT`,`SIGTERM`,`SIGHUP`])process.on(e,()=>l.kill());l.on(`error`,e=>{process.stderr.write(`${e.message}\n`),process.exit(1)}),l.on(`close`,e=>{process.exitCode=e??1,process.stdin.destroy()})}`${pke.toString()}${JSON.stringify([`browser_click`,`browser_close`,`browser_console_messages`,`browser_drag`,`browser_drop`,`browser_emulate_media`,`browser_evaluate`,`browser_file_upload`,`browser_fill_form`,`browser_find`,`browser_handle_dialog`,`browser_hover`,`browser_navigate`,`browser_navigate_back`,`browser_network_request`,`browser_network_requests`,`browser_press_key`,`browser_resize`,`browser_select_option`,`browser_snapshot`,`browser_tabs`,`browser_take_screenshot`,`browser_type`,`browser_wait_for`])}`;const h5=V({name:I(),version:I().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/)});qi([B(h5),H(I(),h5).transform(e=>Object.values(e))]).pipe(ere([h5])),RegExp(`^(?:${`do you mind.i would like you to.i'd like you to.i want you to.i need you to.i would like to.i'd like to.i want to.i need to.we need to.we want to.we should.go ahead and.take a look at.have a look at.look into.look at.help me with.help me to.help me.can you.could you.would you.will you.can we.could we.should we.let's.lets.try to.please.kindly.hello.alright.actually.anyway.also.okay.hey.hi.yo.ok.so.pls.plz.just.maybe`.split(`.`).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})\\b(?:[\\s,:;!.\\-–—]+|$)`,`i`),Me(x),CZ(`agent-registry-apply`),CZ(`local-op-security`),new class{capacity;store;writeIndex=0;filled=!1;constructor(e){if(!Number.isInteger(e)||e<=0)throw RangeError(`RingBuffer capacity must be a positive integer, got ${e}`);this.capacity=e,this.store=Array(e)}push(e){this.store[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.writeIndex===0&&(this.filled=!0)}read(){let e=[],t=this.filled?this.capacity:this.writeIndex;for(let n=1;n<=t;n++){let t=(this.writeIndex-n+this.capacity)%this.capacity,r=this.store[t];r!==void 0&&e.push(r)}return e}get size(){return this.filled?this.capacity:this.writeIndex}}(256),wd.cursor,wd.codex,wd[`claude-desktop`],E8(()=>{}),Object.freeze({source:`local`,skipStoreHooks:!0,context:Object.freeze({origin:`effect-capture`,paired:!1})}),CZ(`external-change-attribution`),CZ(`mermaid-validator`),CZ(`rename-log`),CZ(`history`),CZ(`backlinks`);function g5(e){return ht.filter(t=>g(j(e,t.hostDir)))}function _5(e,t){return[...Object.entries(e).filter(e=>e[1]!==null).map(([e,t])=>({editor:e,root:t})),{editor:`agents`,root:t}]}_5(ut,SS),[..._5(dt,SS)].sort((e,t)=>{let n=G4.indexOf(e.editor),r=G4.indexOf(t.editor);return(n===-1?G4.length:n)-(r===-1?G4.length:r)||e.editor.localeCompare(t.editor)}),CZ(`installed-skills-marker`),CZ(`skill-import`),CZ(`tag-index`),CZ(`derived-document-index`);const v5={start:L().int().nonnegative().optional(),end:L().int().nonnegative().optional(),quote:I().min(1).optional(),prefix:I().max(1e3).optional(),suffix:I().max(1e3).optional()};V({docName:I().min(1),...v5,propertyKey:I().min(1).optional(),propertyPath:B(qi([I(),L().int().nonnegative()])).optional(),body:I(),queue:R().optional(),summary:I().optional()});const y5=kne();Ji(`action`,[V({action:W(`edit`),id:y5,body:I(),summary:I().optional()}),V({action:W(`resolve`),id:y5,summary:I().optional()}),V({action:W(`reopen`),id:y5,summary:I().optional()}),V({action:W(`replace`),id:y5,...v5,summary:I().optional()}),V({action:W(`queue`),id:y5,summary:I().optional()}),V({action:W(`unqueue`),id:y5,summary:I().optional()}),V({action:W(`dispatch-prepare`),id:y5,summary:I().optional()}),V({action:W(`dispatch-complete`),id:y5,summary:I().optional()}),V({action:W(`dispatch-prepare-batch`),ids:B(y5).min(1).max(200),summary:I().optional()}),V({action:W(`dispatch-complete-batch`),ids:B(y5).min(1).max(200),summary:I().optional()})]),CZ(`embeddings`),CZ(`embeddings`);function mke(e){try{let t=new URL(e),n=t.pathname.replace(/\/+$/,``);return`${t.protocol}//${t.host.toLowerCase()}${n}`}catch{return e.trim().replace(/\/+$/,``)}}mke(kl),CZ(`embeddings`),CZ(`embeddings`);const hke=/^[A-Za-z0-9-]{8,64}$/;let b5=null;function gke(e){return j(e??_e(),`.ok`,`machine-id`)}function _ke(e){if(e===void 0&&b5!==null)return b5;let t=gke(e),n=null;try{let e=S(t,`utf-8`).trim();hke.test(e)&&(n=e)}catch{}if(n===null){n=Ae();try{v(k(t),{recursive:!0}),re(t,`${n}\n`,{encoding:`utf-8`,mode:384})}catch(e){CZ(`machine-id`).warn({path:t,err:e},`Failed to persist ${t} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${e instanceof Error?e.message:String(e)}`)}}return e===void 0&&(b5=n),n}CZ(`process-lock`);function vke(e,t){return N(e,`${t}.lock`)}function yke(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`)return null;let n=t.hostname;return n===`localhost`||n===`[::1]`||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(n)?t.origin:null}function bke(e,t){if(typeof e.url==`string`&&e.url.length>0){let t=yke(e.url);if(t!==null)return t}if(e.port>0){let n=t?.fallbackHost??`localhost`;return`http://${n===`0.0.0.0`||n===`::`?`localhost`:n.includes(`:`)&&!n.startsWith(`[`)?`[${n}]`:n}:${e.port}`}return null}CZ(`asset-references`),CZ(`file-ops`),CZ(`upload-streaming`);const x5=`Absolute OK project/worktree path. Routed stdio: required until set unless one client root exists. Project-bound HTTP: optional, confined to its root.`,S5=`Canonical ids: ${V_e().map(e=>e.name).join(`, `)}. Call palette({components:[ids]}) before authoring for syntax/props, markdown-native forms, Mermaid and themed html preview for interactive charts/demos. Other JSX stays raw MDX when no canonical fits.`;I().max(200).optional().describe(`Optional one-line user-outcome description (≤80 chars). Appears as a bullet in the timeline.`),I().length(40).regex(/^[0-9a-f]+$/i).describe("A 40-character commit SHA identifying a saved version. Produced by `checkpoint`, listed by `history` as `entries[].version`, and consumed here — the same `version` field name across all three."),I().nullable().describe("Route-only preview URL (`/#/<doc>`, no host:port), or null when no UI is running."),I().optional().describe(`How the previewUrl was resolved (e.g. the UI lock).`),I().optional().describe(`Route of the prior/removed path, for closing a stale preview tab.`);const xke=V({value:I(),truncatedFrom:L().optional(),hint:I().optional()}).describe(`Normalized change-note summary, when one was recorded.`),Ske=B(H(I(),z()));H(I(),z()).optional().describe("Preview-attach hint (`{ action, previewUrl?, message? }`) when relevant."),B(Kd).describe('Outbound internal links in the just-written doc that do not resolve. Always present — `[]` means every link resolves UNLESS `brokenLinkSuppression` is also present, in which case a project policy withheld findings. A withholding that arrives in a shape this build cannot validate is dropped rather than relayed, so `brokenLinkSuppression` stays absent even though findings were withheld. The `audit` tool is the surface that discloses that case, through its `warnings`. Each: `{ href (as written), resolvedTo (the docName or content-root file path it pointed at, or null), reason: "no-such-doc" | "no-such-file" | "unresolvable" }`. Report-only — the write landed regardless; fix in a follow-up edit.'),Jd.optional().describe('Present ONLY when a project policy omitted detected broken links from `brokenLinks` — so an empty `brokenLinks` beside it does NOT mean every link resolves. `{ reason, count }`; `reason` today is `"reserved-log-policy"` (a reserved `log.md` records history whose links are expected not to resolve) and is an open token, so treat one you do not recognize as a withholding policy all the same. `count` is how many findings were withheld; the hrefs are deliberately not returned, because none of them is yours to repair.'),xke.optional(),B(Wd).min(1).optional().describe("Advisory entries discriminated by `kind`. Write-integrity kinds — `content-divergence` (converged Y.Text didn't byte-match what you composed) and `disk-edit-reconciled` (an out-of-band disk edit was folded in before your write) — mean re-read the doc. The renderability kind `mermaid-parse-error` means the write landed but that fence will not render — fix it and re-edit."),B(V({name:I(),description:I().optional()})).min(1).optional().describe("Templates the parent folder offers, present only when a create passed no `template`. A nudge — the write already landed; pass `template` next time to match the folder's shape.");const Cke=I().optional().describe("Auto-duplicated body text. `textPlusStructured` mirrors the visible body here as a Claude / Claude Desktop client-quirk workaround (those clients hide `content[]` when `structuredContent` is present). Internal — programmatic consumers should prefer the `content[0].text` channel.");function C5(e){return{text:Cke,...e}}function wke(e){return`Machine-readable codes aligned 1:1 with \`warnings\` (\`warnings[i]\` is the display text for \`warningCodes[i]\`) — switch on these, never on the English. Absent when ${e} sent warning text it did not pair with codes, or paired one with a code this build does not recognise; \`warnings\` still carries the full text either way, so treat a missing field as unknown rather than as an all-clear.`}wke(`the server`);function Tke(e){return`Always emitted, \`[]\` when there were none. \`warningCodes\` accompanies this list 1:1 whenever ${e} paired every warning it sent with a code this build recognises; otherwise \`warningCodes\` is absent and this list still carries the full text. \`content[0].text\` lists every warning either way. A \`warnings\` payload in a shape this build cannot read at all becomes one entry saying so, with \`warningCodes\` absent — \`[]\` never means "unreadable".`}Tke(`the server`),CZ(`git-checkout`),CZ(`git-worktree-status`),CZ(`managed-artifact-persistence`),CZ(`timeline`),CZ(`suggest-links`),CZ(`git-context`),CZ(`clone-flow`),Me(o),u5.project,Object.fromEntries(Object.entries(CS).map(([e,t])=>[t,e])),[`These are patterns to adapt to your domain, not a layout to copy verbatim.`,"To build a variant: create your own folders (via `write` or your editor) and reuse only the ideas that fit.","To adopt this pack as-is: re-run without `--dry-run`."].join(`
|
|
1109
|
+
`)}),e.on(`end`,()=>{i!==``&&a(i),r&&t.end()})};u.on(`error`,()=>{}),y(process.stdin,u,_,!0),y(d,process.stdout,v,!1);for(let e of[`SIGINT`,`SIGTERM`,`SIGHUP`])process.on(e,()=>l.kill());l.on(`error`,e=>{process.stderr.write(`${e.message}\n`),process.exit(1)}),l.on(`close`,e=>{process.exitCode=e??1,process.stdin.destroy()})}`${pke.toString()}${JSON.stringify([`browser_click`,`browser_close`,`browser_console_messages`,`browser_drag`,`browser_drop`,`browser_emulate_media`,`browser_evaluate`,`browser_file_upload`,`browser_fill_form`,`browser_find`,`browser_handle_dialog`,`browser_hover`,`browser_navigate`,`browser_navigate_back`,`browser_network_request`,`browser_network_requests`,`browser_press_key`,`browser_resize`,`browser_select_option`,`browser_snapshot`,`browser_tabs`,`browser_take_screenshot`,`browser_type`,`browser_wait_for`])}`;const h5=V({name:I(),version:I().regex(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)$/)});qi([B(h5),H(I(),h5).transform(e=>Object.values(e))]).pipe(ere([h5])),RegExp(`^(?:${`do you mind.i would like you to.i'd like you to.i want you to.i need you to.i would like to.i'd like to.i want to.i need to.we need to.we want to.we should.go ahead and.take a look at.have a look at.look into.look at.help me with.help me to.help me.can you.could you.would you.will you.can we.could we.should we.let's.lets.try to.please.kindly.hello.alright.actually.anyway.also.okay.hey.hi.yo.ok.so.pls.plz.just.maybe`.split(`.`).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`)})\\b(?:[\\s,:;!.\\-–—]+|$)`,`i`),Me(x),CZ(`agent-registry-apply`),CZ(`local-op-security`),new class{capacity;store;writeIndex=0;filled=!1;constructor(e){if(!Number.isInteger(e)||e<=0)throw RangeError(`RingBuffer capacity must be a positive integer, got ${e}`);this.capacity=e,this.store=Array(e)}push(e){this.store[this.writeIndex]=e,this.writeIndex=(this.writeIndex+1)%this.capacity,this.writeIndex===0&&(this.filled=!0)}read(){let e=[],t=this.filled?this.capacity:this.writeIndex;for(let n=1;n<=t;n++){let t=(this.writeIndex-n+this.capacity)%this.capacity,r=this.store[t];r!==void 0&&e.push(r)}return e}get size(){return this.filled?this.capacity:this.writeIndex}}(256),wd.cursor,wd.codex,wd[`claude-desktop`],E8(()=>{}),Object.freeze({source:`local`,skipStoreHooks:!0,context:Object.freeze({origin:`effect-capture`,paired:!1})}),CZ(`external-change-attribution`),CZ(`mermaid-validator`),CZ(`rename-log`),CZ(`history`);function g5(e){return ht.filter(t=>g(j(e,t.hostDir)))}function _5(e,t){return[...Object.entries(e).filter(e=>e[1]!==null).map(([e,t])=>({editor:e,root:t})),{editor:`agents`,root:t}]}_5(ut,SS),[..._5(dt,SS)].sort((e,t)=>{let n=G4.indexOf(e.editor),r=G4.indexOf(t.editor);return(n===-1?G4.length:n)-(r===-1?G4.length:r)||e.editor.localeCompare(t.editor)}),CZ(`installed-skills-marker`),CZ(`skill-import`),CZ(`backlinks`),CZ(`tag-index`),CZ(`derived-document-index`);const v5={start:L().int().nonnegative().optional(),end:L().int().nonnegative().optional(),quote:I().min(1).optional(),prefix:I().max(1e3).optional(),suffix:I().max(1e3).optional()};V({docName:I().min(1),...v5,propertyKey:I().min(1).optional(),propertyPath:B(qi([I(),L().int().nonnegative()])).optional(),body:I(),queue:R().optional(),summary:I().optional()});const y5=kne();Ji(`action`,[V({action:W(`edit`),id:y5,body:I(),summary:I().optional()}),V({action:W(`resolve`),id:y5,summary:I().optional()}),V({action:W(`reopen`),id:y5,summary:I().optional()}),V({action:W(`replace`),id:y5,...v5,summary:I().optional()}),V({action:W(`queue`),id:y5,summary:I().optional()}),V({action:W(`unqueue`),id:y5,summary:I().optional()}),V({action:W(`dispatch-prepare`),id:y5,summary:I().optional()}),V({action:W(`dispatch-complete`),id:y5,summary:I().optional()}),V({action:W(`dispatch-prepare-batch`),ids:B(y5).min(1).max(200),summary:I().optional()}),V({action:W(`dispatch-complete-batch`),ids:B(y5).min(1).max(200),summary:I().optional()})]),CZ(`embeddings`),CZ(`embeddings`);function mke(e){try{let t=new URL(e),n=t.pathname.replace(/\/+$/,``);return`${t.protocol}//${t.host.toLowerCase()}${n}`}catch{return e.trim().replace(/\/+$/,``)}}mke(kl),CZ(`embeddings`),CZ(`embeddings`);const hke=/^[A-Za-z0-9-]{8,64}$/;let b5=null;function gke(e){return j(e??_e(),`.ok`,`machine-id`)}function _ke(e){if(e===void 0&&b5!==null)return b5;let t=gke(e),n=null;try{let e=S(t,`utf-8`).trim();hke.test(e)&&(n=e)}catch{}if(n===null){n=Ae();try{v(k(t),{recursive:!0}),re(t,`${n}\n`,{encoding:`utf-8`,mode:384})}catch(e){CZ(`machine-id`).warn({path:t,err:e},`Failed to persist ${t} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${e instanceof Error?e.message:String(e)}`)}}return e===void 0&&(b5=n),n}CZ(`process-lock`);function vke(e,t){return N(e,`${t}.lock`)}function yke(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`)return null;let n=t.hostname;return n===`localhost`||n===`[::1]`||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(n)?t.origin:null}function bke(e,t){if(typeof e.url==`string`&&e.url.length>0){let t=yke(e.url);if(t!==null)return t}if(e.port>0){let n=t?.fallbackHost??`localhost`;return`http://${n===`0.0.0.0`||n===`::`?`localhost`:n.includes(`:`)&&!n.startsWith(`[`)?`[${n}]`:n}:${e.port}`}return null}CZ(`asset-references`),CZ(`file-ops`),CZ(`upload-streaming`);const x5=`Absolute OK project/worktree path. Routed stdio: required until set unless one client root exists. Project-bound HTTP: optional, confined to its root.`,S5=`Canonical ids: ${V_e().map(e=>e.name).join(`, `)}. Call palette({components:[ids]}) before authoring for syntax/props, markdown-native forms, Mermaid and themed html preview for interactive charts/demos. Other JSX stays raw MDX when no canonical fits.`;I().max(200).optional().describe(`Optional one-line user-outcome description (≤80 chars). Appears as a bullet in the timeline.`),I().length(40).regex(/^[0-9a-f]+$/i).describe("A 40-character commit SHA identifying a saved version. Produced by `checkpoint`, listed by `history` as `entries[].version`, and consumed here — the same `version` field name across all three."),I().nullable().describe("Route-only preview URL (`/#/<doc>`, no host:port), or null when no UI is running."),I().optional().describe(`How the previewUrl was resolved (e.g. the UI lock).`),I().optional().describe(`Route of the prior/removed path, for closing a stale preview tab.`);const xke=V({value:I(),truncatedFrom:L().optional(),hint:I().optional()}).describe(`Normalized change-note summary, when one was recorded.`),Ske=B(H(I(),z()));H(I(),z()).optional().describe("Preview-attach hint (`{ action, previewUrl?, message? }`) when relevant."),B(Kd).describe('Outbound internal links in the just-written doc that do not resolve. Always present — `[]` means every link resolves UNLESS `brokenLinkSuppression` is also present, in which case a project policy withheld findings, or `warnings` carries `link-check-deferred`, in which case the links were not checked because the server is still starting. A withholding that arrives in a shape this build cannot validate is dropped rather than relayed, so `brokenLinkSuppression` stays absent even though findings were withheld. The `audit` tool is the surface that discloses that case, through its `warnings`. Each: `{ href (as written), resolvedTo (the docName or content-root file path it pointed at, or null), reason: "no-such-doc" | "no-such-file" | "unresolvable" }`. Report-only — the write landed regardless; fix in a follow-up edit.'),Jd.optional().describe('Present ONLY when a project policy omitted detected broken links from `brokenLinks` — so an empty `brokenLinks` beside it does NOT mean every link resolves. `{ reason, count }`; `reason` today is `"reserved-log-policy"` (a reserved `log.md` records history whose links are expected not to resolve) and is an open token, so treat one you do not recognize as a withholding policy all the same. `count` is how many findings were withheld; the hrefs are deliberately not returned, because none of them is yours to repair.'),xke.optional(),B(Wd).min(1).optional().describe("Advisory entries discriminated by `kind`. Write-integrity kinds — `content-divergence` (converged Y.Text didn't byte-match what you composed) and `disk-edit-reconciled` (an out-of-band disk edit was folded in before your write) — mean re-read the doc. The renderability kind `mermaid-parse-error` means the write landed but that fence will not render — fix it and re-edit. `link-check-deferred` means links were not checked because the server is still starting — that doc is re-checked only by a later write or edit of it, or an `audit`, which can time out until startup finishes."),B(V({name:I(),description:I().optional()})).min(1).optional().describe("Templates the parent folder offers, present only when a create passed no `template`. A nudge — the write already landed; pass `template` next time to match the folder's shape.");const Cke=I().optional().describe("Auto-duplicated body text. `textPlusStructured` mirrors the visible body here as a Claude / Claude Desktop client-quirk workaround (those clients hide `content[]` when `structuredContent` is present). Internal — programmatic consumers should prefer the `content[0].text` channel.");function C5(e){return{text:Cke,...e}}function wke(e){return`Machine-readable codes aligned 1:1 with \`warnings\` (\`warnings[i]\` is the display text for \`warningCodes[i]\`) — switch on these, never on the English. Absent when ${e} sent warning text it did not pair with codes, or paired one with a code this build does not recognise; \`warnings\` still carries the full text either way, so treat a missing field as unknown rather than as an all-clear.`}wke(`the server`);function Tke(e){return`Always emitted, \`[]\` when there were none. \`warningCodes\` accompanies this list 1:1 whenever ${e} paired every warning it sent with a code this build recognises; otherwise \`warningCodes\` is absent and this list still carries the full text. \`content[0].text\` lists every warning either way. A \`warnings\` payload in a shape this build cannot read at all becomes one entry saying so, with \`warningCodes\` absent — \`[]\` never means "unreadable".`}Tke(`the server`),CZ(`git-checkout`),CZ(`git-worktree-status`),CZ(`managed-artifact-persistence`),CZ(`timeline`),CZ(`suggest-links`),CZ(`git-context`),CZ(`clone-flow`),Me(o),u5.project,Object.fromEntries(Object.entries(CS).map(([e,t])=>[t,e])),[`These are patterns to adapt to your domain, not a layout to copy verbatim.`,"To build a variant: create your own folders (via `write` or your editor) and reuse only the ideas that fit.","To adopt this pack as-is: re-run without `--dry-run`."].join(`
|
|
1110
1110
|
`),CZ(`skills-leaderboard`),CZ(`handoff-dispatch`),V({target:U(Object.keys({"claude-cowork":{type:`app-bundle`,appName:`Claude`,urlScheme:`claude:`,probeScheme:`claude`,quitFirst:!1},"claude-code":{type:`app-bundle`,appName:`Claude`,urlScheme:`claude:`,probeScheme:`claude`,quitFirst:!1},codex:{type:`app-bundle`,appName:`Codex`,urlScheme:`codex:`,probeScheme:`codex`,quitFirst:!0},cursor:{type:`cli-binary`,binaryName:`cursor`,urlScheme:`cursor:`}})),url:I().min(1).max(4096),workspacePath:I().optional()}),V({}).loose(),CZ(`github-permissions`),CZ(`github-reference`),CZ(`github-reference`),CZ(`link-preview.guarded-fetch`),CZ(`link-preview.cache`),CZ(`saved-themes`),V({enabled:R(),active:R(),git:V({state:U([`not-applicable`,`ready`,`missing`,`conflict`,`unavailable`]),ownership:U([`open-knowledge`,`existing`]).optional()}),applied:R().optional(),reason:U([`git-conflict`,`git-unavailable`,`config-write`]).optional()}),V({enabled:R()}).strict(),CZ(`managed-rename`),Object.assign(vEe,{m4v:`video/mp4`,mkv:`video/x-matroska`,flac:`audio/flac`,toml:`application/toml`,lock:`text/plain`,"7z":`application/x-7z-compressed`,tar:`application/x-tar`,rar:`application/vnd.rar`,xls:`application/vnd.ms-excel`,ppt:`application/vnd.ms-powerpoint`,odt:`application/vnd.oasis.opendocument.text`,ods:`application/vnd.oasis.opendocument.spreadsheet`,odp:`application/vnd.oasis.opendocument.presentation`,pages:`application/vnd.apple.pages`,numbers:`application/vnd.apple.numbers`,key:`application/vnd.apple.keynote`,mobi:`application/x-mobipocket-ebook`}),CZ(`search`),CZ(`skill-install`),CZ(`api`),V({principalId:I().optional(),tabSessionId:I().optional(),expectedServerInstanceId:I().optional(),expectedBranch:I().optional(),expectedDocLineageEpoch:I().optional(),clientProtocolVersion:L().optional(),clientRuntimeVersion:I().optional(),clientKind:I().optional()}).loose(),new Be,E8(()=>{}),[...xae],["Read-only validation of markdownlint, frontmatter, OKF and broken internal links. Requires the Hocuspocus server. No args scans all in-scope .md/.mdx; `path` narrows to file/folder. `links` is the navigation/graph tool.","ran names selected `markdownlint`, `frontmatter`, `okf`, `links`. A family absent from `ran` was not checked. A selected family remains in ran if degraded; warnings explain why and it may still have contributed findings. okf covers document and project-tree OKF checks here.",`Broken links are reported under the source doc. Default-on validation.suppressLogLinkAdvisories omits links inside lowercase log.md/log.mdx at any depth; LOG.md is ordinary. brokenLinkSuppression reports reason reserved-log-policy and count without paths/hrefs. Logs are append-only history: never rewrite old entries to clear links. links({kind:'dead'}) reads raw state.`,`Diagnostics carry source, code, message, 0-based LSP range (link columns approximate) and severity. Broken links default to warning; validation.links can raise/hide them. Only problematic files are listed; fileCount/errorCount/warningCount reflect full scan. Output is capped at 10 files × 10 diagnostics each and project-wide at 10 warnings; omittedWarningCount reports dropped warnings. Narrow path reduces competing files; per-file caps still apply. Follow runtime hints for document lint and raw dead links; project-tree OKF findings remain capped.`,`Nothing is modified. Auto-fix document lint with lint({document,fix:true}); fix broken links with edit/write.`].join(`
|
|
1111
1111
|
`),[`Save a project-wide checkpoint of every document. Requires the Hocuspocus server. Optional summary ≤80 chars defaults to "Checkpoint version"; avoid secrets or PII because it persists in git history. Returns version (40-char SHA). Find it with history and restore one doc with restore_version({document,version}).`].join(`
|
|
1112
1112
|
`),[`Read effective config merged defaults → user → project; no running OK server needed. Optional key is a dotted path (content, appearance.theme); omit for the full config. All fields are readable. Re-read after disk changes or before relying on an old value.`,"Removed server.*, mcp.*, github.*, preview.baseUrl and preview.scriptSrc return exists:false; appearance.preview.autoOpen remains live. This is a pure read. Use `install` skillFolders for folder topology."].join(`
|
|
@@ -1537,6 +1537,6 @@ GFS4: `),console.error(e)}),r[c]||(d(r,global[c]||[]),r.close=(function(e){funct
|
|
|
1537
1537
|
`);re(e,o)}function j9(e,t){let n=S(e,`utf-8`);if(n.trim().length!==0)try{let r=k9(JSON.parse(n),t),i=n.endsWith(`
|
|
1538
1538
|
`)?`
|
|
1539
1539
|
`:``;re(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=O9(n,t.contentDirSpellings);r!==n&&re(e,r)}}function M9(e,t){let n=S(e,`utf-8`),r=O9(n,t.contentDirSpellings);r!==n&&re(e,r)}function N9(e){try{return w(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>j(e,t.name))}catch{return[]}}const cMe=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function P9(e){return/\.log\.\d+$/.test(e)}function lMe(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||P9(e)}const uMe=[`telemetry`,`logs`,`process`,`diagnostic-reports`];function dMe(e){let t={contentDirSpellings:D9(e.contentDir)};for(let n of uMe)for(let r of N9(j(e.stagingDir,n)))lMe(r)?A9(r,t):r.endsWith(`.json`)?j9(r,t):M9(r,t);for(let n of N9(j(e.stagingDir,`state`))){let e=ae(n);n.endsWith(`.jsonl`)?A9(n,t):cMe.has(e)?j9(n,t):M9(n,t)}}const F9=[`.ok`,`local`,`telemetry`],I9=[`.ok`,`local`,`logs`],L9=[`.ok`,`local`,`loss-capture`],R9=`spans-current.jsonl`,z9=`spans-prev.jsonl`,B9=`server-current.jsonl`,V9=`server-prev.jsonl`,H9=`loss-current.jsonl`,U9=`loss-prev.jsonl`;function fMe(e){return j(e,...F9,R9)}function pMe(e){return j(e,...F9,z9)}function mMe(e){return j(e,...I9,B9)}function hMe(e){return j(e,...I9,V9)}function gMe(e){return j(e,...L9,H9)}function _Me(e){return j(e,...L9,U9)}const W9=1e3;async function vMe(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(W9)});return t.ok?await t.text():null}catch{return null}}async function yMe(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(W9)});return t.ok?await t.text():null}catch{return null}}async function bMe(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(W9)});return t.ok?await t.text():null}catch{return null}}function xMe(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(`
|
|
1540
|
-
`)}\n`:null}catch{return null}}function SMe(e){let t=j(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`log`,`--oneline`,`-50`],j8({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function CMe(e){let t=j(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/`],j8({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function G9(){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 wMe(){return{nodeVersion:process.version,platform:ye(),arch:me()}}function TMe(){return process.env.OTEL_SDK_DISABLED===`false`}function K9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q9(e){if(!g(e))return{};let t;try{t=(0,gs.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(!K9(t))return{};let n=t.telemetry;if(!K9(n))return{};let r=n.localSink;return K9(r)?r:{}}function J9(e){return typeof e==`boolean`?e:void 0}function EMe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y9(e){if(K9(e))return EMe(e.maxBytes)}function DMe(e){let t=q9(bY(`project`,e)),n=q9(bY(`project-local`,e));return{enabled:J9(n.enabled)??J9(t.enabled)??!0,spansMaxBytes:Y9(n.spans)??Y9(t.spans)??52428800,logsMaxBytes:Y9(n.logs)??Y9(t.logs)??26214400}}function OMe(e){return ke(`sha256`).update(e).digest(`hex`)}function kMe(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const AMe=[`"doc.name"`,`"docName"`];function X9(e){let t=S(e,`utf-8`),n=0;for(let e of AMe){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(k(t),{recursive:!0}),e.endsWith(`.ips`)?re(t,x7(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=j(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const jMe=new Set([`.jsonl`]);function MMe(e){let t=e.lastIndexOf(`.`);return t!==-1&&jMe.has(e.slice(t))}const NMe=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function PMe(e){if(P9(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&NMe.has(e.slice(t))}function FMe(e){let t=[];for(let n of Q9(e)){let r=$9(e,n);if(!PMe(r))continue;let{redacted:i,patterns:a,lineCount:o}=eF(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 M(e,t).split(le).join(`/`)}async function IMe(e){let t=N(e.contentDir),n=N(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??vMe,a=r.fetchAgentEffects??yMe,o=r.fetchWatcherRecent??bMe,s=r.readShadowHead??SMe,c=r.readCheckpointRefs??CMe,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.83.0-beta.
|
|
1540
|
+
`)}\n`:null}catch{return null}}function SMe(e){let t=j(e,`.git`,`ok`);if(!g(t))return null;let n=l(`git`,[`-C`,t,`log`,`--oneline`,`-50`],j8({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function CMe(e){let t=j(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/`],j8({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function G9(){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 wMe(){return{nodeVersion:process.version,platform:ye(),arch:me()}}function TMe(){return process.env.OTEL_SDK_DISABLED===`false`}function K9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q9(e){if(!g(e))return{};let t;try{t=(0,gs.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(!K9(t))return{};let n=t.telemetry;if(!K9(n))return{};let r=n.localSink;return K9(r)?r:{}}function J9(e){return typeof e==`boolean`?e:void 0}function EMe(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y9(e){if(K9(e))return EMe(e.maxBytes)}function DMe(e){let t=q9(bY(`project`,e)),n=q9(bY(`project-local`,e));return{enabled:J9(n.enabled)??J9(t.enabled)??!0,spansMaxBytes:Y9(n.spans)??Y9(t.spans)??52428800,logsMaxBytes:Y9(n.logs)??Y9(t.logs)??26214400}}function OMe(e){return ke(`sha256`).update(e).digest(`hex`)}function kMe(e){let t=S(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}const AMe=[`"doc.name"`,`"docName"`];function X9(e){let t=S(e,`utf-8`),n=0;for(let e of AMe){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(k(t),{recursive:!0}),e.endsWith(`.ips`)?re(t,x7(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=j(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const jMe=new Set([`.jsonl`]);function MMe(e){let t=e.lastIndexOf(`.`);return t!==-1&&jMe.has(e.slice(t))}const NMe=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`,`.yaml`,`.yml`,`.ips`]);function PMe(e){if(P9(e))return!0;let t=e.lastIndexOf(`.`);return t!==-1&&NMe.has(e.slice(t))}function FMe(e){let t=[];for(let n of Q9(e)){let r=$9(e,n);if(!PMe(r))continue;let{redacted:i,patterns:a,lineCount:o}=eF(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 M(e,t).split(le).join(`/`)}async function IMe(e){let t=N(e.contentDir),n=N(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??vMe,a=r.fetchAgentEffects??yMe,o=r.fetchWatcherRecent??bMe,s=r.readShadowHead??SMe,c=r.readCheckpointRefs??CMe,l=r.now??(()=>new Date),u=r.okVersion??(()=>`0.83.0-beta.5`),d=r.readDesktopEnv??G9,f=r.readLanguage??E9,p=r.readRuntime??wMe,h=r.isOtlpPushEnabled??TMe,_=y(j(xe(),`ok-bundle-`));try{v(j(_,`telemetry`),{recursive:!0}),v(j(_,`logs`),{recursive:!0}),v(j(_,`state`),{recursive:!0}),Z9(fMe(n),j(_,`telemetry`,R9)),Z9(pMe(n),j(_,`telemetry`,z9)),Z9(mMe(n),j(_,`logs`,B9)),Z9(hMe(n),j(_,`logs`,V9));for(let t of e.userLogFiles??[])Z9(t,j(_,`logs`,ae(t)));for(let t of e.userStateFiles??[])Z9(t,j(_,eY,ae(t)));let y=0;for(let t of e.diagnosticReports?.files??[])Z9(t,j(_,`diagnostic-reports`,ae(t)))&&(y+=1);let b=j(n,`.ok`,`local`),x=j(b,`server.lock`),C=`not-running`,w=`no server.lock`,T=null;if(g(x)){Z9(x,j(_,`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(j(_,`state`,`agent-presence.json`),e),C=`running`,w=``);let t=await a(T);t!==null&&re(j(_,`state`,`agent-effects.json`),t);let n=await o(T);if(n!==null){let e=xMe(n);e!==null&&re(j(_,`state`,`watcher-recent.jsonl`),e)}}let E=s(t);E!==null&&re(j(_,`state`,`shadow-head.txt`),E);let D=c(t);D!==null&&re(j(_,`state`,`checkpoint-refs.txt`),D),Z9(gMe(n),j(_,`state`,H9)),Z9(_Me(n),j(_,`state`,U9)),Z9(j(b,`last-spawn-error.log`),j(_,`state`,`last-spawn-error.log`)),Z9(j(b,nd),j(_,`state`,nd)),Z9(j(b,rd),j(_,`state`,rd)),Z9(j(b,td),j(_,`state`,td));let ee=p(),ne=d(),ie=f(),k={ok:{version:u(),nodeVersion:ee.nodeVersion,platform:ee.platform,arch:ee.arch},host:{desktop:ne,language:ie}};re(j(_,`state`,`runtime.json`),`${JSON.stringify(k,null,2)}\n`);let oe=C===`running`?`running
|
|
1541
1541
|
`:`not-running (${w})\n`;re(j(_,`state`,`server-status.txt`),oe);let A=e.diagnosticReports===void 0?`not-collected (no collection attempted)`:b7(e.diagnosticReports,y);if(re(j(_,`state`,`diagnostic-reports-status.txt`),`${A}\n`),e.processDir&&g(e.processDir)){let t=j(_,`process`);v(t,{recursive:!0}),m(e.processDir,t,{recursive:!0})}let se=e.redact===!0;se&&dMe({stagingDir:_,contentDir:t}),e.note&&re(j(_,`note.txt`),e.note);let ce=null;e.scrubSecrets===!0&&(ce=FMe(_));for(let t of e.extraFiles??[]){let e=t.zipName??ae(t.sourcePath);if(!Z9(t.sourcePath,j(_,`extra`,e))){r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);continue}let n=C7(t,`extra/${e}`);n!==null&&(ce??={redactions:[],redactedLineCount:0},ce.redactions.push(n),ce.redactedLineCount+=n.lineCount)}let M=DMe(n),N=Q9(_),le=[],ue=0,de=0;for(let e of N){let t=$9(_,e),n=te(e).size,r=MMe(t)?kMe(e):0;le.push({path:t,bytes:n,lines:r}),ue+=n,(t.startsWith(`telemetry/`)||t.startsWith(`logs/`))&&(de+=X9(e))}let fe={applied:se};ce!==null&&(fe.secretScrub=ce);let P={schemaVersion:2,createdAt:l().toISOString(),ok:{version:u(),nodeVersion:ee.nodeVersion,platform:ee.platform,arch:ee.arch},host:{desktop:ne,language:ie},contentDir:{pathSha256:OMe(t),absolutePath:se?`<CONTENT_DIR>`:t},telemetry:{localSink:M,otlpPushEnabled:h()},redaction:fe,serverStatus:C,files:le};re(j(_,`manifest.json`),`${JSON.stringify(P,null,2)}\n`);let pe=D9(t),me=N.some(e=>{try{let t=S(e,`utf-8`);return pe.some(e=>t.includes(e))}catch{return!1}}),he={stagedDiagnosticReports:y,totalBytes:ue,fileCount:le.length,docNameCount:de,contentDirVisible:me,redacted:se},ge=!1;return{stagingDir:_,manifest:P,summary:he,cleanup:()=>{ge||(ge=!0,O(_,{recursive:!0,force:!0}))}}}catch(e){throw O(_,{recursive:!0,force:!0}),e}}async function LMe(e){let{collected:t,outputPath:n}=e,r=k(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 jTe.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 RMe(e,t){let n=j(e,`.ok`,`config.yml`);if(g(n))try{let t=(0,gs.parse)(S(n,`utf-8`)),r=BY(t)?t.content:void 0,i=BY(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return N(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 N(e)}async function zMe(e,t,n,r,i){let a=w7(t,e.logger),o=await IMe({contentDir:RMe(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...YAe(a,e.userLogsDir??j(pY(),`logs`)),...E7(e.cachesDir??j(_e(),`Library`,`Caches`))],userStateFiles:D7(e.bugReportsDir??S7()),diagnosticReports:i,deps:{readDesktopEnv:n,readLanguage:r,logger:e.logger}});try{v(k(e.outputPath),{recursive:!0}),await LMe({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 BMe(e){let{projectDir:t}=e,n=e.readDesktopEnv??G9,r=e.readLanguage??E9,i=()=>WAe(e.diagnosticReportsDir??j(_e(),`Library`,`Logs`,`DiagnosticReports`),new Date);if(e.level===`full`&&t!==void 0)return zMe(e,t,n,r,i());let{zipPath:a,summary:o}=await eje({projectDir:t,redact:e.redact,revealDocNames:e.level===`full`,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:E7(e.cachesDir??j(_e(),`Library`,`Caches`)),bugReportLedgerFiles:D7(e.bugReportsDir??S7()),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{qY as ALL_EDITOR_IDS,JY as EDITOR_LABELS,wX as EDITOR_TARGETS,Rve as HOSTS_WITH_USER_SKILL_DIR,AAe as LAUNCH_CONFIG_NAME,Wje as PATH_SHIM_BEGIN,Kje as PATH_SHIM_BLOCK_RE,Gje as PATH_SHIM_END,P5 as ProjectPathSafetyError,cAe as addOkPathsToGitExclude,F5 as assertProjectPathSafe,oX as buildManagedServerEntry,Nje as buildMcpConfigDeclineEvent,Pje as buildMcpConfigMigrateEvent,_7 as classifyExistingMcpEntry,BMe as collectReportBundle,Zje as createCliProbeResolver,EY as createTokenStore,KAe as defaultBugReportZipPath,Ue as detectGh,Ke as detectGhAccounts,PAe as detectInstalledEditors,hX as droppedManagedKeys,aye as editorConfigPathDisplay,iye as editorEntryLocator,Sje as ensurePiBridge,Y5 as formatTrackedRemediation,dAe as getExcludedOkPaths,q5 as getInstalledSkillProjectionPaths,Lve as getNativeTomlMcpEditor,K5 as getOkArtifactPaths,iX as isEntryUpToDate,sX as isOwnManagedEntry,Vje as loadConfig,lve as makeLazyProbeTokenStore,S7 as okBugReportsDir,v9 as parseGitHubBlobUrl,Hje as parseGitHubShareUrl,y9 as parseGitHubTreeUrl,_9 as parseGitUrl,qje as pathInstallMarkerPath,qke as previewContent,FAe as probeOwnManagedEditorMcpEntry,bje as probePiBridgeState,J5 as probeTrackedOkPaths,h7 as readExistingMcpEntry,uAe as readSharingMode,eF as redactContent,lAe as removeOkPathsFromGitExclude,kje as removeOwnMcpEntry,iAe as removeProjectSkill,$je as removeUserGlobalSkillBundle,aMe as removeUserSkill,Qke as resolveProjectRoot,Rje as runStop,p9 as truncatePriorEntry,w9 as userGlobalSkillBundleTargets,iMe as userSkillPresentAnywhere,Uje as validateLocalFolderForShare,m7 as writeEditorMcpConfig,nMe as writeProjectAiIntegrations,V5 as writeProjectSkill,NAe as writeUserMcpConfigs,rMe as writeUserSkill};
|
|
1542
1542
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Bd as r,Da as i,Ea as a,Hd as o,I as s,Kd as c,Ku as l,Q as u,Qd as d,R as f,Rd as p,U as m,Ud as h,Yu as g,Zd as _,a as v,cf as y,ec as b,ef as x,if as S,ku as ee,qd as te,rf as C,tf as ne,zd as re}from"./md-manager-BGnqyqi1-
|
|
1
|
+
import{i as e,o as t,t as n}from"./rolldown-runtime-tZXQYakl.mjs";import{Bd as r,Da as i,Ea as a,Hd as o,I as s,Kd as c,Ku as l,Q as u,Qd as d,R as f,Rd as p,U as m,Ud as h,Yu as g,Zd as _,a as v,cf as y,ec as b,ef as x,if as S,ku as ee,qd as te,rf as C,tf as ne,zd as re}from"./md-manager-BGnqyqi1-DsBy1Dky.mjs";import{Bo as ie,Do as ae,Dt as oe,Gr as se,H as ce,Ho as le,Jn as ue,L as de,Mr as fe,R as pe,Rr as me,Ta as he,Uo as ge,Vo as _e,Wo as ve,Yo as w,at as ye,ca as be,cn as xe,cs as Se,fa as Ce,ii as we,ko as Te,m as Ee,ns as De,rt as Oe,sa as ke,tr as Ae,wo as je}from"./dist-BHg9XI3A.mjs";import{i as T,n as E,o as D,r as Me,s as O,t as k}from"./colors-r_owlCuY.mjs";import{t as A}from"./is-object-BGze3w87.mjs";import{t as Ne}from"./constants-DPhkbJXs.mjs";import{t as Pe}from"./preview-B2beHnfh.mjs";import{createRequire as Fe}from"node:module";import{execFileSync as Ie}from"node:child_process";import Le,{basename as Re,dirname as j,isAbsolute as ze,join as M,posix as Be,relative as N,resolve as P,sep as F,win32 as Ve}from"node:path";import I from"node:process";import{fileURLToPath as He}from"node:url";import{cpSync as Ue,existsSync as L,lstatSync as We,mkdirSync as Ge,readFileSync as R,readdirSync as Ke,readlinkSync as qe,realpathSync as Je,rmSync as Ye,statSync as Xe,writeFileSync as Ze}from"node:fs";import{homedir as z}from"node:os";import{inspect as Qe,stripVTControlCharacters as $e,styleText as B}from"node:util";import*as et from"node:readline";import{AsyncLocalStorage as tt,AsyncResource as nt}from"node:async_hooks";var rt=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})),it=n((e=>{let{InvalidArgumentError:t}=rt();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})),at=n((e=>{let{humanReadableArgName:t}=it();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})),ot=n((e=>{let{InvalidArgumentError:t}=rt();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&&w(e,g,{mode:Aa(e)}),a&&g===o?{kind:`unchanged`}:{kind:d?`overwritten`:`written`}}const Co=e=>e!==`project`,wo=e=>e!==`user`;async function To(){let e=await za({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 Eo(e){return e.mcp===!1?null:e.scope?e.scope:e.isTTY??process.stdout.isTTY?(e.promptFn??To)():`both`}async function Do(e){return Wa({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 Oo(e){if(e.sharing!==void 0)return e.sharing;let t=$i(e.projectRoot)===`local-only`||e.freshProject===!0?`local-only`:`shared`;return e.isTTY??process.stdout.isTTY?(e.promptFn??Do)(t):t}var ko=class extends Error{constructor(e){super(e),this.name=`ContentDirError`}};function Ao(e){if(e===void 0||e===!0)return new Set(Oe);if(e===!1)return new Set;let t=e.split(`,`).map(e=>e.trim()).filter(Boolean);return new Set(oe.filter(e=>t.includes(e)))}function jo(e,t,n){let r=P(n,e),i;try{i=Xe(r)}catch(e){let t=e.code;throw t===`ENOENT`?new ko(`--content-dir path does not exist: ${r}`):new ko(`--content-dir path is not accessible (${t??`unknown error`}): ${r}`)}if(!i.isDirectory())throw new ko(`--content-dir must be a directory: ${r}`);let a=Mo(t),o=Mo(r),s=N(a,o);if(s.startsWith(`..`)||ze(s))throw new ko(`--content-dir must be inside the project root (${t}); got ${r}`);return s===``?`.`:s}function Mo(e){try{return Je(e)}catch{return e}}const No=`open-knowledge-ui`;function Po(e,t,n){try{let r=e.detectPath?.(t,n)??j(e.configPath(t,n));return L(r)}catch{return!1}}function Fo(e,t,n){try{let r=P(j(e.configPath(t,n))),i=P(e.detectPath?.(t,n)??r);return i===r||r.startsWith(i+F)}catch{return!1}}function Io(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`||!L(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||Fo(e,t,r);if(!i&&c&&!Po(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:o,serverName:a};if(i!==void 0)try{pa(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 Ro(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||Ge(j(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{De(`${o}.lock`,()=>{let t=no(o).writePath;if(s||Ge(j(t),{recursive:!0}),e.format===`toml`){let r=yo(Yr(),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=So(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=vo(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 Lo={pi:Ja};function Ro(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=Lo[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{Ge(j(t),{recursive:!0})}catch(e){return o(e)}let l={action:`written`};try{De(`${t}.lock`,()=>{let e=null;try{e=R(t,`utf-8`)}catch{e=null}if(e===c){l.action=`overwritten`;return}w(t,c,e===null?void 0:{mode:Aa(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 zo(e,t){let n=e.projectConfigPath?.(t);if(!(!n||!L(n)))return{editorId:e.id,label:e.label,path:n}}async function Bo(e){let t=Ki(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=>Io(t,``,n,e.home))}function Vo(e,t,n,r){let i=Uo(e,t,n,r);return i.kind===`present`?i.entry:null}function Ho(e,t,n,r){let i=_o(e,t,r);if(!A(i))return{kind:`no-entry`};let a=i[n];return A(a)?{kind:`present`,entry:a}:{kind:`no-entry`}}function Uo(e,t,n,r){let i;try{i=r??e.configPath(t,n)}catch{return{kind:`absent`}}if(!L(i))return{kind:`absent`};try{if(Xe(i).size>uo)return{kind:`decline`,reason:`oversize`}}catch(e){return{kind:`decline`,reason:Ea(e)}}let a;try{a=R(i,`utf-8`)}catch(e){return{kind:`decline`,reason:Ea(e)}}if(a.trim()===``)return{kind:`absent`};if(e.format===`file`)return{kind:`present`,entry:qa(a)};let o=e.serverName(t);if(e.format===`toml`){let t;try{t=Yr().parseToObject(a)}catch{return{kind:`decline`,reason:`unparseable`}}return Ho(t,e.topLevelKey,o,e.serverMapSubKey)}if(e.format===`yaml`){let t=(0,Ir.parseDocument)(a.charCodeAt(0)===65279?a.slice(1):a);return t.errors.length>0?{kind:`decline`,reason:`unparseable`}:Ho(t.toJS()??{},e.topLevelKey,o,e.serverMapSubKey)}let s=ao(a);return s?oo(s,e.topLevelKey)>1?{kind:`decline`,reason:`duplicate-container`}:Ho(_e(s),e.topLevelKey,o,e.serverMapSubKey):{kind:`decline`,reason:`unparseable`}}async function Wo(e={}){let t=P(e.cwd??process.cwd()),n=Za(t,{homeDir:e.home}),r=n.projectRoot;if(se(r,e.home??z()))throw new ce(r);let a=!L(M(r,`.ok`)),o=n.gitRootPromoted?N(r,t):void 0,s=e.contentDir===void 0?n.defaultContentDir:jo(e.contentDir,r,t);n.ancestorPromoted?console.log(`[ok] Opened existing project at ${r}`):n.gitRootPromoted&&a&&s===`.`&&process.stderr.write(`${O(`[ok] Content scope promoted to the git repo root: ${r}`)}\n Ran in ${o}/, 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: ${o} in .ok/config.yml.\n`);let c={mode:e.devMcp?`dev`:`published`},l=await Ae(r),u;try{u=fe(r,{contentDir:s})}catch(t){let i=$.claude.configPath(r,e.home);return{projectRoot:r,contentCreated:[],contentUpdated:[],contentSkipped:[],editors:[],projectSkills:[],legacyProjectConfigs:[],didGitInit:l.didInit,rootGitignoreCreated:!1,gitRootPromoted:n.gitRootPromoted,promotedFromDir:o,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(Ne),f=!1;if(l.didInit)try{f=Te(r)===`created`}catch(e){console.warn(`[ok] Skipping .gitignore seed at ${r}: ${e instanceof Error?e.message:String(e)}`)}try{ke(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 Eo({scope:e.scope,mcp:e.mcp,isTTY:e.isTTY,promptFn:e.promptFn}),m=e.editors??Xo(r,e.home),h=e.editors??m,g=Ki(m),_=Ki(h),v=e.mcp===!1||p===null,y=Array.from(new Map([...g,...v?[]:_].map(e=>[e.id,e])).values()),b=g.filter(t=>Po(t,r,e.home)),x=[],S=[],ee=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(Co(p)&&g.includes(t)&&t.scope===`global`&&x.push(Io(t,r,c,e.home)),wo(p)&&_.includes(t)&&t.projectConfigPath){let n=t.projectConfigPath(r),i=Io(t,r,c,e.home,n);x.push(i),(i.action===`written`||i.action===`overwritten`)&&ee.add(n)}}let te=new Set;for(let t of _){let n=t.projectSkillPath?.(r);!n||te.has(n)||(te.add(n),S.push(wa(t,r,{home:e.home})))}let C=Ca(r,_.map(e=>e.id));C&&S.push(C);let ne=S.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.editorId);if(ne.length>0){let t=e.home??z();be({source:i,skills:[Ee.project],agents:ne,scope:r},{home:t,enabled:he(t).enabled})}let re=!v&&p!==null&&wo(p)?_.filter(e=>!e.projectConfigPath&&!e.projectSkillPath).map(e=>e.label):void 0,ie=v?[]:b.map(e=>zo(e,r)).filter(e=>e!==void 0).filter(e=>!ee.has(e.path)),le=e.installUserSkill??me,de=e.home??z(),pe=Ao(e.skills),ge=!1,_e=!1,ve=!1,w=!1,ye=!1;for(let t of oe){if(!pe.has(t))continue;await ae(de,Ee[t],!0).catch(()=>{}),ge=!0;let n=await le({home:e.home,bundleId:t,force:!0});n===`installed`?_e=!0:n===`failed`?ve=!0:n===`no-hosts`?ye=!0:w=!0}let xe=ve?`failed`:_e?`installed`:ge&&w?`skip-current`:ge&&ye?`no-hosts`:`declined`,Se=_e?ue(de).map(e=>e.editorId):[],Ce=v?`skipped-flag`:`skipped-missing`,we=x.find(e=>e.editorId===`claude`)??x[0]??{action:Ce,configPath:$.claude.configPath(r,e.home)},De=await Go({projectRoot:r,desiredMode:await Oo({sharing:e.sharing,projectRoot:r,isTTY:e.isTTY,freshProject:a,promptFn:e.sharingPromptFn}),explicitFlag:e.sharing});return{projectRoot:r,contentCreated:u.created,contentUpdated:u.updated,contentSkipped:u.skipped,editors:x,projectSkills:S,legacyProjectConfigs:ie,skillInstall:xe,skillHosts:Se,didGitInit:l.didInit,rootGitignoreCreated:f,gitRootPromoted:n.gitRootPromoted,promotedFromDir:o,contentDir:d?s:void 0,contentDirRequested:e.contentDir,contentScaffoldFailed:!1,mcpAction:we.action,mcpPath:we.configPath,mcpError:`error`in we?we.error:void 0,projectScopeUnsupportedLabels:re,sharing:De}}async function Go(e){let{projectRoot:t,desiredMode:n,explicitFlag:r}=e,i=$i(t);if(i===`no-git`)return{kind:`no-exclude`,reason:`no-git`,localOnlyRequested:r===`local-only`};let a=Yi(t);if(n===`local-only`){let e=Zi(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`}:Ko(t,e,`add`)}if(i===`shared`)return{kind:`applied`,mode:`shared`,action:`noop`,appended:[],alreadyPresent:[],removed:[]};let o=Qi(t,a);return o.kind===`no-exclude`?{kind:`no-exclude`,reason:o.reason,localOnlyRequested:!1}:Ko(t,o,`remove`)}function Ko(e,t,n){let r=$i(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 qo(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 Jo(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=M(t,`.ok`);if(e.contentCreated.length>0||e.contentUpdated.length>0?(n.push(k(`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(k(`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(k(`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(k(`MCP server configuration:`)),n.push(` No supported editor config directories detected; skipped MCP registration`);else{n.push(k(`MCP server configuration:`));for(let r of e.editors){let e=r.configPath.startsWith(t)?N(t,r.configPath):r.configPath.replace(/^\/Users\/[^/]+/,`~`),i=r.serverName===S()?``:` (${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} ${D(`registered`)}${i}${c}`);break;case`overwritten`:n.push(` ${o}${s}${e} ${D(`updated`)}${i}${c}`);break;case`skipped-missing`:n.push(` ${o}${s}${e} config root missing; skipped`);break;case`failed`:n.push(` ${o}${s}${e} ${Me(`FAILED`)}: ${r.error}`);break;case`declined`:n.push(` ${o}${s}${e} left unchanged (${qo(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(k(`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?N(t,r.path):``;switch(r.action){case`written`:n.push(` ${e}${i}${a} ${D(`installed`)}`);break;case`overwritten`:n.push(` ${e}${i}${a} ${D(`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} ${Me(`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} ${N(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(k(`User-global skill:`)),e.skillInstall){case`installed`:{let t=(e.skillHosts??[]).map(e=>X[e]??e),r=t.length>0?t.join(`, `):`the shared ~/.agents store`;n.push(` open-knowledge ${D(`installed for ${r}`)}`),n.push(` ${E(`Counted on skills.sh (skill name + source repo, once per machine).`)}`),n.push(` ${E(`Opt out: DO_NOT_TRACK=1, or Settings → User → Preferences.`)}`);break}case`skip-current`:n.push(` open-knowledge ${D(`already installed at current version`)}`);break;case`declined`:n.push(` open-knowledge ${E(`skipped for this run (--no-skills)`)}`),n.push(` ${E(`Nothing was installed or removed. Any built-in skills already on this`)}`),n.push(` ${E(`machine are untouched. Run init without the flag to install them:`)}`),n.push(` ${E(` ok init`)}`);break;case`no-hosts`:n.push(` open-knowledge ${E(`skipped — no supported agent host detected in your home directory`)}`);break;case`failed`:n.push(` ${O(`open-knowledge install failed — MCP still configured; retry with:`)}`),n.push(` ${O(` ok repair-skills`)}`)}if(e.contentDirRequested!==void 0&&e.contentDir===void 0&&!e.contentScaffoldFailed?(n.push(``),n.push(O(`⚠ --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(O(`⚠ 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(Pe(e.preview,t))):e.previewWarning&&(n.push(``),n.push(`Content preview unavailable: ${e.previewWarning}`)),n.push(``),n.push(...$o(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(`${D(`✓`)} ${k(`Next steps:`)}`),n.push(` 1. Open your editor (${T(r.join(` / `))})`),n.push(` 2. Approve the MCP server when prompted`),n.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),n.push(` - ${T(`ok seed --list-packs`)} — browse the starter packs`),n.push(` - ${T(`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 Yo(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 Xo(e,t){let n=[];for(let r of Zr)r!==`claude-desktop`&&Po($[r],e,t)&&n.push(r);return n}function Zo(){let e={log:console.log,info:console.info,debug:console.debug},t=(...e)=>{process.stderr.write(`${e.map(e=>typeof e==`string`?e:Qe(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 Qo(){return new gt(`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 vt(`--scope <scope>`,`Write MCP config at user level, project level, or both`).choices([`user`,`project`,`both`])).addOption(new vt(`--shared`,`Commit OK config alongside content (the default for fresh repos)`).conflicts(`localOnly`)).addOption(new vt(`--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?Zo():null;try{let r;try{r=await Wo({cwd:t,mcp:e.mcp,devMcp:e.devMcp,scope:e.scope,sharing:n,contentDir:e.contentDir,skills:e.skills})}catch(e){if(e instanceof ko||e instanceof ce){process.stderr.write(`${e.message}\n`),process.exitCode=64;return}if(e instanceof de||e instanceof pe){process.stderr.write(`${e.message}\n`),process.exitCode=78;return}if(e instanceof ye){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-CwZvWeL0.mjs`),{resolveContentDir:s}=await import(`./dist-ByQ8IZXo.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-AWnyLtzP.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(Yo(r,{contentDir:i,contentFileCount:a}),null,2)}\n`):process.stdout.write(`${Jo(r,r.projectRoot)}\n`),(r.editors.some(e=>e.action===`failed`)||r.mcpAction===`failed`)&&(process.exitCode=1)}finally{r?.()}})}function $o(e,t){let n=[];switch(e.kind){case`applied`:return n.push(k(`Sharing mode:`)),e.mode===`local-only`?e.action===`added`?(n.push(` ${D(`local-only`)} — appended ${e.appended.length} path(s) to ${k(`${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(` ${D(`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(` ${D(`local-only`)} — already excluded; nothing to do.`):n.push(` ${D(`local-only`)}`):e.action===`removed`?n.push(` ${D(`shared`)} — removed OK paths from ${k(`${t}/.git/info/exclude`)}; commit the files to share with teammates.`):n.push(` ${D(`shared`)} — OK config will be committed alongside content.`),n;case`refused-tracked`:n.push(O(`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 ${T(`ok config-sharing unshare`)} after resolving to complete the switch.`),n;case`no-exclude`:if(e.localOnlyRequested)n.push(O(`Sharing mode: --local-only requested but no git repo found — option ignored`)),n.push(` Run ${T(`git init`)} (or open this folder via OK Desktop, which can scaffold a repo) and then ${T(`ok config-sharing unshare`)}.`);else if(e.reason===`no-git`)return[];else n.push(O(`Sharing mode unavailable: ${e.reason}.`));return n}}export{Ei as $,ja as A,Zi as B,Za as C,gt as Ct,za as D,Wa as E,pa as F,ta as G,ea as H,ma as I,Zr as J,$i as K,Ta as L,Ea as M,fa as N,Aa as O,ga as P,Z as Q,_a as R,no as S,Dt as St,Ka as T,vt as Tt,Xi as U,aa as V,Yi as W,$ as X,X as Y,Qr as Z,Wo as _,Jn as _t,Yo as a,ki as at,Bo as b,$t as bt,Jo as c,Vi as ct,Po as d,Yr as dt,Ti as et,Vo as f,Y as ft,Oo as g,ar as gt,jo as h,Vr as ht,Go as i,di as it,Da as j,ka as k,$o as l,hi as lt,Eo as m,Rr as mt,No as n,Oi as nt,Uo as o,Q as ot,Ao as p,zr as pt,Qi as q,Lo as r,ci as rt,Xo as s,Ai as st,ko as t,Di as tt,Qo as u,Xr as ut,ho as v,rn as vt,Ja as w,mt as wt,Fo as x,U as xt,Io as y,en as yt,wa as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./dist-BHg9XI3A.mjs";import{_ as e}from"./init-CrjTf1pi.mjs";export{e as runInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Vo as e,Wo as t,Yo as n}from"./dist-
|
|
1
|
+
import{Vo as e,Wo as t,Yo as n}from"./dist-BHg9XI3A.mjs";import{A as r,M as i,O as a}from"./init-CrjTf1pi.mjs";import{t as o}from"./is-object-BGze3w87.mjs";import{t as s}from"./removal-file-path-CNIqq13J.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=[],_=t(h,g,u)??void 0;if(g.some(e=>!d(e,h))||_?.type!==`object`)return{kind:`declined`,reason:`unparseable`};let v=e(_).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?(n(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};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as e,Hc as t,Ic as n,Rc as r,_c as i,hc as a,ku as o}from"./md-manager-BGnqyqi1-
|
|
1
|
+
import{E as e,Hc as t,Ic as n,Rc as r,_c as i,hc as a,ku as o}from"./md-manager-BGnqyqi1-DsBy1Dky.mjs";import{Qo as s,es as c,x as l}from"./dist-BHg9XI3A.mjs";import{t as u}from"./is-object-BGze3w87.mjs";import{t as d}from"./constants-DPhkbJXs.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=o();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),i={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=r({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...i,source:e}}return i})}function b(r){let o=r??process.cwd(),u=[],p=[],m=[],h=[],g=c(`user`,o),_=s({absPath:g});p.push(..._.diagnostics),!_.valid&&_.sidelinedTo!==void 0&&m.push({from:g,to:_.sidelinedTo}),_.valid&&_.source!==void 0&&u.push(g);let b=(r,i=!1)=>{let a=v(r);if(a.diagnostic!==void 0&&p.push(a.diagnostic),a.value===null)return{};let o=n({value:a.value,file:a.path,source:a.source,doc:a.doc});p.push(...o),u.push(r);let s=o.length>0?t(a.value):a.value;return i&&h.push(...e({value:s,file:a.path,source:a.source,doc:a.doc})),s},x=f(o,`.ok`,d),S=b(x,!0),C=b(c(`project-local`,o)),w=a(_.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(i(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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-CrmSAWIW.mjs";export{e as loadConfig};
|