@inkeep/open-knowledge 0.59.0-beta.3 → 0.59.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/{acp-harness-probe-BRZF_0dC.mjs → acp-harness-probe-Bs0bGk85.mjs} +3 -3
- package/dist/cli.mjs +63 -63
- package/dist/constants-BaQvtYMu.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Cev2-Dt6.mjs → init-CwTjc7sX.mjs} +3 -3
- package/dist/init-Dl5-8jx_.mjs +1 -0
- package/dist/{launch-json-removal-sHGeN2zb.mjs → launch-json-removal-CrTIzd9e.mjs} +2 -2
- package/dist/loader-BoaQLRD4.mjs +1 -0
- package/dist/{loader-sEXYCat9.mjs → loader-rMfYfMuQ.mjs} +2 -2
- package/dist/{open-browser-CtfBqG33.mjs → open-browser-S9VrM_aN.mjs} +2 -2
- package/dist/{preview-CCd5hlq8.mjs → preview-BIlYbx8V.mjs} +2 -2
- package/dist/preview-CYaNmTji.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-D6uA_m7H.js → ActivityModeContent-16L4CN2t.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-D4PWUKcp.js → AgentDiffPane-DWuD5gDF.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-BkFI4cSq.js → CodeMirrorPropInput-DuZeupvc.js} +1 -1
- package/dist/public/assets/{DocumentContext-HSIpKTjH.js → DocumentContext-EVe8T_4V.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-DmglY6xV.js → EditorModeToggle-C89Lmfvi.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-VRpK89T0.js → EnableSyncConfirmDialog-DuuoUeCA.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-C8bpwBA4.js → ExcalidrawDocEditor-DKpnK_Te.js} +1 -1
- package/dist/public/assets/FeedbackForm-GJ-gi37F.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-59ssHpH-.js → ImportSkillDialog-BW8hYUMC.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-Bij2fHgM.js → LintConfigEditor-DI9ZL8t7.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-HsfjkNmc.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-DkJQ1vVn.js → ManagedArtifactProperties-SInV_eE5.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-C8bhqP4t.js → MermaidDocEditor-Taa4xIn5.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-DW6AeN1K.js → PropertyDisplayRow-DY3LkrAq.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-DNaQmo_3.js → SchemaConfigEditor-08j6Goue.js} +1 -1
- package/dist/public/assets/{SessionsHost-D_oypiot.js → SessionsHost-D2TiYy-t.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-D8qSj91O.js → SettingsDialogBody-DDFx4vDq.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-C8yHT5CC.js → ShareReceiveMissDialog-9uyWPE2r.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-DXZKa7ir.js → SkillInstallMenu-7rF7_Qqj.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-BsyoVC5Q.js → SkillToolbarControls-Ib5ly02n.js} +1 -1
- package/dist/public/assets/{SourceEditor-BVVe4FH-.js → SourceEditor-Dmdy2M_V.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-Cjr_tele.js → TerminalWindowApp-BgdbGRUg.js} +1 -1
- package/dist/public/assets/{TextDocEditor-m87BSysa.js → TextDocEditor-O6cHtSVn.js} +1 -1
- package/dist/public/assets/{ThreadView-a9UBrGPP.js → ThreadView-nJXOmPeX.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-DyW8LDRD.js → TimelineDiffPane-B3xMtotK.js} +1 -1
- package/dist/public/assets/{agent-diff-store-D4tFKX4K.js → agent-diff-store-_LXkwhjL.js} +1 -1
- package/dist/public/assets/{auth-state-cache-Cfy-VA-P.js → auth-state-cache-CYlHHIOy.js} +1 -1
- package/dist/public/assets/{client-version-C5E9Q07s.js → client-version-Q-5pX-lW.js} +1 -1
- package/dist/public/assets/{comment-chips-Ba1WfR06.js → comment-chips-Cyvt-GuB.js} +1 -1
- package/dist/public/assets/{config-provider-Bs9S-Mvn.js → config-provider-Bab4_nwt.js} +1 -1
- package/dist/public/assets/{follow-file-BKlnqkgL.js → follow-file-CXSEufj8.js} +1 -1
- package/dist/public/assets/{index-hVkgGI1V.js → index-CvOmEWwY.js} +7 -7
- package/dist/public/assets/{pending-receive-nav-store-CZyI0Y3v.js → pending-receive-nav-store-YRIcYpak.js} +1 -1
- package/dist/public/assets/{selection-context-CcGgvqKu.js → selection-context-B9p1R6mm.js} +1 -1
- package/dist/public/assets/{skill-actions-Dm7_Q9qA.js → skill-actions-Dmiv-OaH.js} +1 -1
- package/dist/public/assets/{src-BxKUvqJT.js → src-954nlWtx.js} +1 -1
- package/dist/public/assets/{telemetry-impl-B-PaTlR_.js → telemetry-impl-BEwAvzD6.js} +1 -1
- package/dist/public/assets/{telemetry-startup-toj6ifVD.js → telemetry-startup-Buxh4qDW.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-B9Z2sXqG.js → typing-burst-detector-CtytQZKZ.js} +1 -1
- package/dist/public/assets/{use-activity-panel-CVOuigTa.js → use-activity-panel-Ch01VK0x.js} +1 -1
- package/dist/public/assets/{use-open-skill-D7aPRwcl.js → use-open-skill-BtJdSHXl.js} +1 -1
- package/dist/public/assets/{use-popular-skills-0Mbrn7FI.js → use-popular-skills-Pfi6527q.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-50K5tfJr.js → use-terminal-enabled-CGezX1Y6.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-yvOI8kJw.js → use-timeline-entry-diff-D_77fB53.js} +1 -1
- package/dist/public/index.html +20 -20
- package/dist/{repair-launch-json-BgwkQCzC.mjs → repair-launch-json-DkWTVP2d.mjs} +2 -2
- package/dist/{repair-mcp-configs-B8rMxvOc.mjs → repair-mcp-configs-D6iL-1dV.mjs} +2 -2
- package/dist/{repair-skills-D7rSfppe.mjs → repair-skills-D5l11Fpo.mjs} +2 -2
- package/dist/repair-skills-DBAJQgpx.mjs +1 -0
- package/dist/{skill-teardown-Cx7h3ooY.mjs → skill-teardown-W9f5SFoc.mjs} +2 -2
- package/dist/src-BSU8tNb8.mjs +1 -0
- package/dist/{src-DlY7G7Fh.mjs → src-CTWYtZuP.mjs} +2 -2
- package/dist/{src-COqGK-op.mjs → src-CUP74RDx.mjs} +1 -1
- package/dist/{src-Cqh-Fhfh.mjs → src-DJejT6Wt.mjs} +335 -335
- package/dist/{start-B_0dBwHO.mjs → start-5bM-wvr0.mjs} +5 -5
- package/dist/start-BbL2GeGg.mjs +1 -0
- package/dist/{ui-C7ao4aMi.mjs → ui-Ci1Xxx_K.mjs} +3 -3
- package/dist/{write-project-skill-B7q9oxw9.mjs → write-project-skill-BpvX1zW9.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-BvMjJ1WL.mjs +0 -2
- package/dist/init-BwsBZ6MB.mjs +0 -1
- package/dist/loader-J7e4OBoj.mjs +0 -1
- package/dist/preview-BStcisK6.mjs +0 -1
- package/dist/public/assets/FeedbackForm-C9DN3mVr.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-P2EDJZ3f.js +0 -1
- package/dist/repair-skills-aO5Yt4lm.mjs +0 -1
- package/dist/src-OwWRhjCC.mjs +0 -1
- package/dist/start-CvE7iXWH.mjs +0 -1
package/dist/public/assets/{use-popular-skills-0Mbrn7FI.js → use-popular-skills-Pfi6527q.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./useQuery-ZeEDLtxh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./button-CA0dewJJ.js";import{sr as c}from"./dist-DGemBD_J.js";import{t as l}from"./createLucideIcon-Bhw2PmPp.js";import{t as u}from"./check-CGfmW4da.js";import{t as d}from"./use-open-skill-
|
|
1
|
+
import{o as e}from"./chunk-CYidjpOJ.js";import{t}from"./jsx-runtime-BUgB2tll.js";import{t as n}from"./react-f2sANaYj.js";import{n as r,r as i}from"./dist-Nvb76hAm.js";import{t as a}from"./useQuery-ZeEDLtxh.js";import{t as o}from"./compiler-runtime-BfE3aGVn.js";import{t as s}from"./button-CA0dewJJ.js";import{sr as c}from"./dist-DGemBD_J.js";import{t as l}from"./createLucideIcon-Bhw2PmPp.js";import{t as u}from"./check-CGfmW4da.js";import{t as d}from"./use-open-skill-BtJdSHXl.js";import{t as f}from"./badge-BG5JKjNK.js";import{F as p,s as m,u as h}from"./skills-api-DO54o34O.js";import{t as g}from"./skeleton-D4wPMdlV.js";import{n as _}from"./open-managed-artifact-tab-ENQgQOde.js";import{n as v}from"./SkillCostValue-6xiHOBnl.js";var y=[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]],b=l(`package`,y),x=e(n(),1),S=o(),C=t();function w(e){let t=(0,S.c)(28),{name:n,description:r,onOpen:a,onHover:o,action:c,meta:l,leading:u}=e,{_:d}=i(),f;t[0]===n?f=t[1]:(f=(0,C.jsx)(`div`,{className:`truncate font-medium text-sm`,children:n}),t[0]=n,t[1]=f);let p=f,m;t[2]!==d||t[3]!==n?(m=d({id:`9_euHO`,values:{name:n}}),t[2]=d,t[3]=n,t[4]=m):m=t[4];let h;t[5]!==a||t[6]!==m?(h=(0,C.jsx)(s,{variant:`ghost`,"aria-label":m,onClick:a,className:`absolute inset-0 h-auto w-full rounded-xl p-0 opacity-0`}),t[5]=a,t[6]=m,t[7]=h):h=t[7];let g;t[8]===u?g=t[9]:(g=u?(0,C.jsx)(`div`,{className:`shrink-0`,children:u}):null,t[8]=u,t[9]=g);let _;t[10]!==l||t[11]!==p?(_=(0,C.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[p,l]}),t[10]=l,t[11]=p,t[12]=_):_=t[12];let v;t[13]===c?v=t[14]:(v=(0,C.jsx)(`div`,{className:`relative z-10 shrink-0`,children:c}),t[13]=c,t[14]=v);let y;t[15]!==g||t[16]!==_||t[17]!==v?(y=(0,C.jsxs)(`div`,{className:`flex items-center gap-3`,children:[g,_,v]}),t[15]=g,t[16]=_,t[17]=v,t[18]=y):y=t[18];let b;t[19]===r?b=t[20]:(b=r?(0,C.jsx)(`p`,{className:`line-clamp-2 text-muted-foreground text-xs leading-relaxed`,children:r}):null,t[19]=r,t[20]=b);let x;t[21]!==y||t[22]!==b?(x=(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[y,b]}),t[21]=y,t[22]=b,t[23]=x):x=t[23];let w;return t[24]!==o||t[25]!==h||t[26]!==x?(w=(0,C.jsxs)(`li`,{className:`relative rounded-xl border border-border bg-card p-4 transition-colors hover:border-border/60 hover:bg-accent/40 focus-within:ring-2 focus-within:ring-ring`,onMouseEnter:o,onFocus:o,children:[h,x]}),t[24]=o,t[25]=h,t[26]=x,t[27]=w):w=t[27],w}function T(e,t){return new Intl.NumberFormat(t||void 0,{notation:`compact`,compactDisplay:`short`}).format(e)}var E=new Map,D=new Map;function O(e,t){return`${e}::${t}`}function k(e,t){return E.get(O(e,t))}async function A(e,t){let n=O(e,t),r=E.get(n);if(r!==void 0)return r;let i=D.get(n);if(i)return i;let a=(async()=>{try{let n=await h({source:e,name:t});return n.ok?c({name:n.name,description:n.description??``,skillMd:n.skillMd,files:n.files}):null}catch{return null}})();D.set(n,a);try{let e=await a;return E.set(n,e),e}finally{D.delete(n)}}function j(e){let t=(0,S.c)(4),{login:n}=e,[r,i]=(0,x.useState)(!0);if(n&&r){let e=`https://github.com/${encodeURIComponent(n)}.png?size=96`,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=()=>i(!1),t[0]=r):r=t[0];let a;return t[1]===e?a=t[2]:(a=(0,C.jsx)(`img`,{src:e,alt:``,loading:`lazy`,className:`size-10 rounded border border-border bg-background object-cover`,onError:r}),t[1]=e,t[2]=a),a}let a;return t[3]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,C.jsx)(`div`,{className:`flex size-10 items-center justify-center rounded border border-border bg-muted text-muted-foreground`,children:(0,C.jsx)(b,{className:`size-5`,"aria-hidden":!0})}),t[3]=a):a=t[3],a}function M(e){let t=(0,S.c)(34),{result:n,imported:a,onOpen:o}=e,{i18n:s}=i(),c;t[0]!==n.name||t[1]!==n.source?(c=()=>k(n.source,n.name)??null,t[0]=n.name,t[1]=n.source,t[2]=c):c=t[2];let[l,d]=(0,x.useState)(c),p=(0,x.useRef)(!0),m,h;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(m=()=>(p.current=!0,()=>{p.current=!1}),h=[],t[3]=m,t[4]=h):(m=t[3],h=t[4]),(0,x.useEffect)(m,h);let g;t[5]!==n.name||t[6]!==n.source?(g=()=>{k(n.source,n.name)===void 0&&A(n.source,n.name).then(e=>{p.current&&d(e)})},t[5]=n.name,t[6]=n.source,t[7]=g):g=t[7];let _=g,y;t[8]===n.publisher?y=t[9]:(y=(0,C.jsx)(j,{login:n.publisher}),t[8]=n.publisher,t[9]=y);let b;t[10]===a?b=t[11]:(b=a?(0,C.jsxs)(f,{variant:`primary`,className:`gap-1`,children:[(0,C.jsx)(u,{"aria-hidden":!0}),(0,C.jsx)(r,{id:`hp8OtS`})]}):null,t[10]=a,t[11]=b);let E=n.publisher??n.source,D;t[12]===E?D=t[13]:(D=(0,C.jsx)(`span`,{className:`truncate`,children:E}),t[12]=E,t[13]=D);let O;t[14]===n.publisher?O=t[15]:(O=n.publisher===`openknowledge`||n.publisher===`inkeep`?(0,C.jsx)(f,{variant:`secondary`,className:`h-4 px-1 text-[10px] uppercase tracking-wide`,children:(0,C.jsx)(r,{id:`o0bHtA`})}):null,t[14]=n.publisher,t[15]=O);let M;t[16]!==s||t[17]!==n.installs?(M=n.installs==null?null:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,C.jsxs)(`span`,{className:`shrink-0`,children:[(0,C.jsx)(`span`,{"aria-hidden":`true`,children:`↓ `}),(0,C.jsxs)(`span`,{className:`sr-only`,children:[(0,C.jsx)(r,{id:`7m3Ade`}),` `]}),T(n.installs,s.locale)]})]}),t[16]=s,t[17]=n.installs,t[18]=M):M=t[18];let N;t[19]===l?N=t[20]:(N=l?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(`span`,{"aria-hidden":!0,children:`·`}),(0,C.jsxs)(`span`,{className:`shrink-0 whitespace-nowrap`,"data-testid":`skill-card-always-on`,children:[v(l.alwaysOn),` `,(0,C.jsx)(r,{id:`MiMTvb`})]})]}):null,t[19]=l,t[20]=N);let P;t[21]!==M||t[22]!==N||t[23]!==D||t[24]!==O?(P=(0,C.jsxs)(`div`,{className:`mt-0.5 flex items-center gap-1.5 text-muted-foreground text-xs`,children:[D,O,M,N]}),t[21]=M,t[22]=N,t[23]=D,t[24]=O,t[25]=P):P=t[25];let F;return t[26]!==_||t[27]!==o||t[28]!==n.description||t[29]!==n.name||t[30]!==P||t[31]!==y||t[32]!==b?(F=(0,C.jsx)(w,{name:n.name,description:n.description,onOpen:o,onHover:_,leading:y,action:b,meta:P}),t[26]=_,t[27]=o,t[28]=n.description,t[29]=n.name,t[30]=P,t[31]=y,t[32]=b,t[33]=F):F=t[33],F}function N(e,t){return e.find(e=>e.origin?.source===t.source&&(e.name===t.name||e.name===`${t.name}-imported`||e.name.startsWith(`${t.name}-imported-`)))??null}function P(e){let t=(0,S.c)(15),n;t[0]===e?n=t[1]:(n=e===void 0?{}:e,t[0]=e,t[1]=n);let{scope:r,onNavigate:i}=n,a=d(),o=p(),s;t[2]!==o.data||t[3]!==o.status?(s=o.status===`ready`?o.data.filter(F):[],t[2]=o.data,t[3]=o.status,t[4]=s):s=t[4];let c=s,l;t[5]===c?l=t[6]:(l=e=>N(c,e),t[5]=c,t[6]=l);let u=l,f;t[7]!==u||t[8]!==i||t[9]!==a||t[10]!==r?(f=function(e){i?.();let t=u(e);if(t){a(t.scope,t.name);return}_({flavor:`explore`,source:e.source,name:e.name,subtitle:e.source,level:r})},t[7]=u,t[8]=i,t[9]=a,t[10]=r,t[11]=f):f=t[11];let m=f,h;return t[12]!==u||t[13]!==m?(h={importedEntry:u,openResult:m},t[12]=u,t[13]=m,t[14]=h):h=t[14],h}function F(e){return e.origin}var I=[`s1`,`s2`,`s3`,`s4`,`s5`,`s6`,`s7`,`s8`];function L(e){let t=(0,S.c)(17),{results:n,pending:r,skeletonCount:i,label:a,action:o,loadingLabel:s,scope:c,onNavigate:l,testId:u}=e,d=r===void 0?!1:r,f=i===void 0?8:i,p;t[0]!==l||t[1]!==c?(p={scope:c,onNavigate:l},t[0]=l,t[1]=c,t[2]=p):p=t[2];let{importedEntry:m,openResult:h}=P(p),g;t[3]!==o||t[4]!==a?(g=a===void 0?null:(0,C.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,C.jsx)(`h3`,{className:`font-mono text-2xs uppercase tracking-wider text-muted-foreground`,children:a}),o]}),t[3]=o,t[4]=a,t[5]=g):g=t[5];let _;t[6]!==m||t[7]!==s||t[8]!==h||t[9]!==d||t[10]!==n||t[11]!==f?(_=d?(0,C.jsxs)(`div`,{"aria-busy":`true`,children:[(0,C.jsx)(`span`,{className:`sr-only`,children:s}),(0,C.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,"aria-hidden":!0,children:I.slice(0,f).map(R)})]}):(0,C.jsx)(`ul`,{className:`grid grid-cols-1 gap-2.5 sm:grid-cols-2`,children:n.map(e=>(0,C.jsx)(M,{result:e,imported:m(e),onOpen:()=>h(e)},e.id))}),t[6]=m,t[7]=s,t[8]=h,t[9]=d,t[10]=n,t[11]=f,t[12]=_):_=t[12];let v;return t[13]!==g||t[14]!==_||t[15]!==u?(v=(0,C.jsxs)(`section`,{className:`flex flex-col gap-3`,"data-testid":u,children:[g,_]}),t[13]=g,t[14]=_,t[15]=u,t[16]=v):v=t[16],v}function R(e){return(0,C.jsx)(g,{className:`h-18 rounded-xl`},e)}function z(){let e=(0,S.c)(7),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t={queryKey:[`skills`,`popular`],queryFn:B,staleTime:3e5},e[0]=t):t=e[0];let{data:n,isPending:r,isError:i}=a(t),o;e[1]===n?o=e[2]:(o=n??[],e[1]=n,e[2]=o);let s;return e[3]!==i||e[4]!==r||e[5]!==o?(s={skills:o,isPending:r,failed:i},e[3]=i,e[4]=r,e[5]=o,e[6]=s):s=e[6],s}async function B(){let e=await m();if(!e.ok)throw Error(e.error);return e.results}export{y as i,L as n,b as r,z as t};
|
package/dist/public/assets/{use-terminal-enabled-50K5tfJr.js → use-terminal-enabled-CGezX1Y6.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./compiler-runtime-BfE3aGVn.js";import{t}from"./terminal-telemetry-BC3JNC05.js";import{vs as n}from"./dist-DGemBD_J.js";import{h as r}from"./use-apply-config-color-theme-DZRctrdg.js";import"./config-provider-
|
|
1
|
+
import{t as e}from"./compiler-runtime-BfE3aGVn.js";import{t}from"./terminal-telemetry-BC3JNC05.js";import{vs as n}from"./dist-DGemBD_J.js";import{h as r}from"./use-apply-config-color-theme-DZRctrdg.js";import"./config-provider-Bab4_nwt.js";var i=e();function a(){let e=(0,i.c)(3),{projectLocalConfig:t,projectLocalSynced:n}=r(),a=t?.terminal?.enabled??null,o;return e[0]!==n||e[1]!==a?(o={enabled:a,synced:n},e[0]=n,e[1]=a,e[2]=o):o=e[2],o}function o(){let e=(0,i.c)(2),{projectLocalBinding:a}=r();if(a===null)return null;let o;return e[0]===a?o=e[1]:(o=e=>{let r=a.patch({terminal:{enabled:e}});return r.ok&&e&&t(),r.ok?{ok:!0}:{ok:!1,error:n(r.error)}},e[0]=a,e[1]=o),o}export{o as n,a as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{Rn as r,_ as i,a}from"./DocumentContext-HSIpKTjH.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./react-dom-DPxgxlDT.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{c as d}from"./local-menu-action-bus-CIYp0C2E.js";import{T as f,et as p,q as m}from"./CodeMirrorPropInput-BkFI4cSq.js";import{Ba as h,Co as g,Fa as _,Ja as v,K as y,Ka as b,Pa as x,Sa as S,Wa as ee,Xa as te,Ya as C,ar as ne,la as re,za as ie,zo as w}from"./dist-DGemBD_J.js";import{i as ae,l as oe,m as T,n as se,t as ce}from"./PropertyDisplayRow-DW6AeN1K.js";import{t as le}from"./minus-CeGy7JpL.js";import{t as ue}from"./libesm-CKzT_-OB.js";var E=u(),D=n(),O=200;function de(e){let t=(0,E.c)(27),{delta:n,open:r,onOpenChange:i}=e;if(n.unparseable!==null){let e;return t[0]===n.unparseable?e=t[1]:(e=(0,D.jsx)(ge,{regions:n.unparseable}),t[0]=n.unparseable,t[1]=e),e}if(n.changes.length===0)return null;let a,o,c,l,u,d,f,p,m;if(t[2]!==n.changes||t[3]!==i||t[4]!==r){let e=n.changes.slice(0,50);o=n.changes.length-e.length,a=se,t[14]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,D.jsx)(s,{id:`l_UFPv`}),t[14]=c):c=t[14],l=n.changes.length,u=`property-diff-block`,d=`border-b border-border py-3`,f=r,p=i,m=e.map(fe),t[2]=n.changes,t[3]=i,t[4]=r,t[5]=a,t[6]=o,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m}else a=t[5],o=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13];let h;t[15]===o?h=t[16]:(h=o>0&&(0,D.jsx)(`p`,{className:`px-2 pt-1 text-xs text-muted-foreground italic`,children:(0,D.jsx)(s,{id:`6qFchx`,values:{omitted:o}})}),t[15]=o,t[16]=h);let g;return t[17]!==a||t[18]!==c||t[19]!==l||t[20]!==u||t[21]!==d||t[22]!==f||t[23]!==p||t[24]!==m||t[25]!==h?(g=(0,D.jsxs)(a,{title:c,count:l,testId:u,className:d,open:f,onOpenChange:p,children:[m,h]}),t[17]=a,t[18]=c,t[19]=l,t[20]=u,t[21]=d,t[22]=f,t[23]=p,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function fe(e){return(0,D.jsx)(pe,{change:e},`${e.kind}-${e.key}`)}function pe(e){let t=(0,E.c)(22),{change:n}=e,{_:i}=c(),a=oe[g(n.kind===`removed`?n.before:n.after)],o;t[0]!==i||t[1]!==n.kind?(o=n.kind===`added`?{KindIcon:d,kindLabel:i({id:`hp8OtS`})}:n.kind===`removed`?{KindIcon:le,kindLabel:i({id:`eps54V`})}:{KindIcon:r,kindLabel:i({id:`cNsIJf`})},t[0]=i,t[1]=n.kind,t[2]=o):o=t[2];let{KindIcon:s,kindLabel:l}=o,u;t[3]===s?u=t[4]:(u=(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=s,t[4]=u);let f;t[5]===l?f=t[6]:(f=(0,D.jsx)(`span`,{className:`sr-only`,children:l}),t[5]=l,t[6]=f);let p;t[7]!==u||t[8]!==f?(p=(0,D.jsxs)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:[u,f]}),t[7]=u,t[8]=f,t[9]=p):p=t[9];let m;t[10]===a?m=t[11]:(m=(0,D.jsx)(a,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=a,t[11]=m);let h;t[12]===n?h=t[13]:(h=(0,D.jsx)(me,{change:n}),t[12]=n,t[13]=h);let _;t[14]!==n.key||t[15]!==m||t[16]!==h?(_=(0,D.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,D.jsx)(ce,{icon:m,label:n.key,dataKey:n.key,children:h})}),t[14]=n.key,t[15]=m,t[16]=h,t[17]=_):_=t[17];let v;return t[18]!==n.key||t[19]!==p||t[20]!==_?(v=(0,D.jsxs)(`div`,{"data-property-change":``,"data-key":n.key,"data-testid":`property-diff-row`,className:`flex items-start gap-1`,children:[p,_]}),t[18]=n.key,t[19]=p,t[20]=_,t[21]=v):v=t[21],v}function me(e){let t=(0,E.c)(17),{change:n}=e;if(n.kind===`added`){let e;return t[0]!==n.after||t[1]!==n.key?(e=(0,D.jsx)(k,{value:n.after,keyName:n.key}),t[0]=n.after,t[1]=n.key,t[2]=e):e=t[2],e}if(n.kind===`removed`){let e;return t[3]!==n.before||t[4]!==n.key?(e=(0,D.jsx)(k,{value:n.before,keyName:n.key,removed:!0}),t[3]=n.before,t[4]=n.key,t[5]=e):e=t[5],e}let r=T(n.before)||T(n.after)?`flex flex-col gap-1`:`flex flex-wrap items-center gap-1.5`,i;t[6]!==n.before||t[7]!==n.key?(i=(0,D.jsx)(k,{value:n.before,keyName:n.key,removed:!0}),t[6]=n.before,t[7]=n.key,t[8]=i):i=t[8];let a;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`→`}),t[9]=a):a=t[9];let o;t[10]!==n.after||t[11]!==n.key?(o=(0,D.jsx)(k,{value:n.after,keyName:n.key}),t[10]=n.after,t[11]=n.key,t[12]=o):o=t[12];let s;return t[13]!==r||t[14]!==i||t[15]!==o?(s=(0,D.jsxs)(`div`,{className:r,"data-testid":`property-diff-change-pair`,children:[i,a,o]}),t[13]=r,t[14]=i,t[15]=o,t[16]=s):s=t[16],s}function k(e){let t=(0,E.c)(17),{value:n,keyName:r,removed:i}=e,a=i===void 0?!1:i;if(T(n)){let e=a?`opacity-70`:void 0,i;t[0]!==r||t[1]!==n?(i=(0,D.jsx)(ae,{keyName:r,value:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let o;return t[3]!==e||t[4]!==i?(o=(0,D.jsx)(`div`,{className:e,children:i}),t[3]=e,t[4]=i,t[5]=o):o=t[5],o}let o,s,c,l;if(t[6]!==a||t[7]!==n){let e=Array.isArray(n)?n.filter(he).join(`, `):String(n),r=e.length>O;o=a?`px-1 text-sm break-words text-muted-foreground line-through`:`px-1 text-sm break-words`,s=r?e:void 0,c=`property-diff-value`,l=r?`${e.slice(0,O)}…`:e,t[6]=a,t[7]=n,t[8]=o,t[9]=s,t[10]=c,t[11]=l}else o=t[8],s=t[9],c=t[10],l=t[11];let u;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,D.jsx)(`span`,{className:o,title:s,"data-testid":c,children:l}),t[12]=o,t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function he(e){return typeof e==`string`}function ge(e){let t=(0,E.c)(10),{regions:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:(0,D.jsx)(s,{id:`wFyXOW`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,D.jsx)(s,{id:`EmSrGB`}),t[1]=i):i=t[1];let a;t[2]===n.before?a=t[3]:(a=(0,D.jsx)(A,{label:i,text:n.before}),t[2]=n.before,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,D.jsx)(s,{id:`NawEr2`}),t[4]=o):o=t[4];let c;t[5]===n.after?c=t[6]:(c=(0,D.jsx)(A,{label:o,text:n.after}),t[5]=n.after,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,D.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,"data-testid":`property-diff-unparseable`,"data-property-change":``,children:[r,(0,D.jsxs)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[a,c]})]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function A(e){let t=(0,E.c)(7),{label:n,text:r}=e,i;t[0]===n?i=t[1]:(i=(0,D.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:n}),t[0]=n,t[1]=i);let a=r===``?`—`:r,o;t[2]===a?o=t[3]:(o=(0,D.jsx)(`pre`,{className:`overflow-x-auto rounded-md bg-muted px-2 py-1.5 font-mono text-xs whitespace-pre-wrap`,children:a}),t[2]=a,t[3]=o);let s;return t[4]!==i||t[5]!==o?(s=(0,D.jsxs)(`div`,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=s):s=t[6],s}var j=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),M=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),N=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=M();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),_e=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=j(),r=M(),i=N(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),ve=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=j();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=_e(),r=N();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),P=e(o(),1),ye=e(l(),1),F=ve();function I(){}I.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(be(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function be(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var xe=new I;function Se(e,t,n){return xe.diff(e,t,n)}var L=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,R=/\S/,z=new I;z.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!R.test(e)&&!R.test(t)},z.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&L.test(t[n])&&L.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function Ce(e,t,n){return z.diff(e,t,n)}var B=new I;B.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
1
|
+
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{Rn as r,_ as i,a}from"./DocumentContext-EVe8T_4V.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./react-dom-DPxgxlDT.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{c as d}from"./local-menu-action-bus-CIYp0C2E.js";import{T as f,et as p,q as m}from"./CodeMirrorPropInput-DuZeupvc.js";import{Ba as h,Co as g,Fa as _,Ja as v,K as y,Ka as b,Pa as x,Sa as S,Wa as ee,Xa as te,Ya as C,ar as ne,la as re,za as ie,zo as w}from"./dist-DGemBD_J.js";import{i as ae,l as oe,m as T,n as se,t as ce}from"./PropertyDisplayRow-DY3LkrAq.js";import{t as le}from"./minus-CeGy7JpL.js";import{t as ue}from"./libesm-CKzT_-OB.js";var E=u(),D=n(),O=200;function de(e){let t=(0,E.c)(27),{delta:n,open:r,onOpenChange:i}=e;if(n.unparseable!==null){let e;return t[0]===n.unparseable?e=t[1]:(e=(0,D.jsx)(ge,{regions:n.unparseable}),t[0]=n.unparseable,t[1]=e),e}if(n.changes.length===0)return null;let a,o,c,l,u,d,f,p,m;if(t[2]!==n.changes||t[3]!==i||t[4]!==r){let e=n.changes.slice(0,50);o=n.changes.length-e.length,a=se,t[14]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,D.jsx)(s,{id:`l_UFPv`}),t[14]=c):c=t[14],l=n.changes.length,u=`property-diff-block`,d=`border-b border-border py-3`,f=r,p=i,m=e.map(fe),t[2]=n.changes,t[3]=i,t[4]=r,t[5]=a,t[6]=o,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m}else a=t[5],o=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13];let h;t[15]===o?h=t[16]:(h=o>0&&(0,D.jsx)(`p`,{className:`px-2 pt-1 text-xs text-muted-foreground italic`,children:(0,D.jsx)(s,{id:`6qFchx`,values:{omitted:o}})}),t[15]=o,t[16]=h);let g;return t[17]!==a||t[18]!==c||t[19]!==l||t[20]!==u||t[21]!==d||t[22]!==f||t[23]!==p||t[24]!==m||t[25]!==h?(g=(0,D.jsxs)(a,{title:c,count:l,testId:u,className:d,open:f,onOpenChange:p,children:[m,h]}),t[17]=a,t[18]=c,t[19]=l,t[20]=u,t[21]=d,t[22]=f,t[23]=p,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function fe(e){return(0,D.jsx)(pe,{change:e},`${e.kind}-${e.key}`)}function pe(e){let t=(0,E.c)(22),{change:n}=e,{_:i}=c(),a=oe[g(n.kind===`removed`?n.before:n.after)],o;t[0]!==i||t[1]!==n.kind?(o=n.kind===`added`?{KindIcon:d,kindLabel:i({id:`hp8OtS`})}:n.kind===`removed`?{KindIcon:le,kindLabel:i({id:`eps54V`})}:{KindIcon:r,kindLabel:i({id:`cNsIJf`})},t[0]=i,t[1]=n.kind,t[2]=o):o=t[2];let{KindIcon:s,kindLabel:l}=o,u;t[3]===s?u=t[4]:(u=(0,D.jsx)(s,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=s,t[4]=u);let f;t[5]===l?f=t[6]:(f=(0,D.jsx)(`span`,{className:`sr-only`,children:l}),t[5]=l,t[6]=f);let p;t[7]!==u||t[8]!==f?(p=(0,D.jsxs)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:[u,f]}),t[7]=u,t[8]=f,t[9]=p):p=t[9];let m;t[10]===a?m=t[11]:(m=(0,D.jsx)(a,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=a,t[11]=m);let h;t[12]===n?h=t[13]:(h=(0,D.jsx)(me,{change:n}),t[12]=n,t[13]=h);let _;t[14]!==n.key||t[15]!==m||t[16]!==h?(_=(0,D.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,D.jsx)(ce,{icon:m,label:n.key,dataKey:n.key,children:h})}),t[14]=n.key,t[15]=m,t[16]=h,t[17]=_):_=t[17];let v;return t[18]!==n.key||t[19]!==p||t[20]!==_?(v=(0,D.jsxs)(`div`,{"data-property-change":``,"data-key":n.key,"data-testid":`property-diff-row`,className:`flex items-start gap-1`,children:[p,_]}),t[18]=n.key,t[19]=p,t[20]=_,t[21]=v):v=t[21],v}function me(e){let t=(0,E.c)(17),{change:n}=e;if(n.kind===`added`){let e;return t[0]!==n.after||t[1]!==n.key?(e=(0,D.jsx)(k,{value:n.after,keyName:n.key}),t[0]=n.after,t[1]=n.key,t[2]=e):e=t[2],e}if(n.kind===`removed`){let e;return t[3]!==n.before||t[4]!==n.key?(e=(0,D.jsx)(k,{value:n.before,keyName:n.key,removed:!0}),t[3]=n.before,t[4]=n.key,t[5]=e):e=t[5],e}let r=T(n.before)||T(n.after)?`flex flex-col gap-1`:`flex flex-wrap items-center gap-1.5`,i;t[6]!==n.before||t[7]!==n.key?(i=(0,D.jsx)(k,{value:n.before,keyName:n.key,removed:!0}),t[6]=n.before,t[7]=n.key,t[8]=i):i=t[8];let a;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,D.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`→`}),t[9]=a):a=t[9];let o;t[10]!==n.after||t[11]!==n.key?(o=(0,D.jsx)(k,{value:n.after,keyName:n.key}),t[10]=n.after,t[11]=n.key,t[12]=o):o=t[12];let s;return t[13]!==r||t[14]!==i||t[15]!==o?(s=(0,D.jsxs)(`div`,{className:r,"data-testid":`property-diff-change-pair`,children:[i,a,o]}),t[13]=r,t[14]=i,t[15]=o,t[16]=s):s=t[16],s}function k(e){let t=(0,E.c)(17),{value:n,keyName:r,removed:i}=e,a=i===void 0?!1:i;if(T(n)){let e=a?`opacity-70`:void 0,i;t[0]!==r||t[1]!==n?(i=(0,D.jsx)(ae,{keyName:r,value:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let o;return t[3]!==e||t[4]!==i?(o=(0,D.jsx)(`div`,{className:e,children:i}),t[3]=e,t[4]=i,t[5]=o):o=t[5],o}let o,s,c,l;if(t[6]!==a||t[7]!==n){let e=Array.isArray(n)?n.filter(he).join(`, `):String(n),r=e.length>O;o=a?`px-1 text-sm break-words text-muted-foreground line-through`:`px-1 text-sm break-words`,s=r?e:void 0,c=`property-diff-value`,l=r?`${e.slice(0,O)}…`:e,t[6]=a,t[7]=n,t[8]=o,t[9]=s,t[10]=c,t[11]=l}else o=t[8],s=t[9],c=t[10],l=t[11];let u;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,D.jsx)(`span`,{className:o,title:s,"data-testid":c,children:l}),t[12]=o,t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function he(e){return typeof e==`string`}function ge(e){let t=(0,E.c)(10),{regions:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,D.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:(0,D.jsx)(s,{id:`wFyXOW`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,D.jsx)(s,{id:`EmSrGB`}),t[1]=i):i=t[1];let a;t[2]===n.before?a=t[3]:(a=(0,D.jsx)(A,{label:i,text:n.before}),t[2]=n.before,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,D.jsx)(s,{id:`NawEr2`}),t[4]=o):o=t[4];let c;t[5]===n.after?c=t[6]:(c=(0,D.jsx)(A,{label:o,text:n.after}),t[5]=n.after,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,D.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,"data-testid":`property-diff-unparseable`,"data-property-change":``,children:[r,(0,D.jsxs)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[a,c]})]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function A(e){let t=(0,E.c)(7),{label:n,text:r}=e,i;t[0]===n?i=t[1]:(i=(0,D.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:n}),t[0]=n,t[1]=i);let a=r===``?`—`:r,o;t[2]===a?o=t[3]:(o=(0,D.jsx)(`pre`,{className:`overflow-x-auto rounded-md bg-muted px-2 py-1.5 font-mono text-xs whitespace-pre-wrap`,children:a}),t[2]=a,t[3]=o);let s;return t[4]!==i||t[5]!==o?(s=(0,D.jsxs)(`div`,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=s):s=t[6],s}var j=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),M=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),N=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=M();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),_e=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=j(),r=M(),i=N(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),ve=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=j();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=_e(),r=N();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),P=e(o(),1),ye=e(l(),1),F=ve();function I(){}I.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(be(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function be(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var xe=new I;function Se(e,t,n){return xe.diff(e,t,n)}var L=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,R=/\S/,z=new I;z.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!R.test(e)&&!R.test(t)},z.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&L.test(t[n])&&L.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function Ce(e,t,n){return z.diff(e,t,n)}var B=new I;B.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
2
2
|
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var we=new I;we.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Te=new I;Te.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function V(e){"@babel/helpers - typeof";return V=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},V(e)}var Ee=Object.prototype.toString,H=new I;H.useLongestToken=!0,H.tokenize=B.tokenize,H.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(U(e,null,null,i),i,` `)},H.equals=function(e,t){return I.prototype.equals.call(H,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function U(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var o;if(Ee.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=U(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),V(e)===`object`&&e!==null){t.push(e),o={},n.push(o);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)c=s[a],o[c]=U(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var W=new I;W.tokenize=function(e){return e.slice()},W.join=W.removeEmpty=function(e){return e};function G(e,t){let n=t.content.findDiffStart(e.content);if(n===null)return!1;let{a:r,b:i}=t.content.findDiffEnd(e.content),a=n-Math.min(r,i);return a>0&&(e.resolve(n-a).depth<t.resolve(r+a).depth?n-=a:(r+=a,i+=a)),new v(n,i,t.slice(n,r))}function De(e){if(!e.steps.length)return;let t=new C(e.docs[0]),n=e.steps.slice();for(;n.length;){let e=n.shift();for(;n.length&&e.merge(n[0]);){let r=n.shift();e=e instanceof v&&r instanceof v?G(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function K(e){let t=new C(e);return t.removeMark(0,e.nodeSize-2),t.doc}function Oe(e,t){let n=t.split(`/`);for(n.shift();n.length;){if(typeof e!=`object`)throw Error();let t=n.shift();e=e[t]}return e}function q(e){return JSON.parse(JSON.stringify(e))}var ke=class{fromDoc;toDoc;complexSteps;wordDiffs;simplifyDiff;schema;tr;currentJSON;finalJSON;ops;constructor(e,t,n={}){let r={complexSteps:!0,wordDiffs:!1,simplifyDiff:!0,...n};this.fromDoc=e,this.toDoc=t,this.complexSteps=r.complexSteps,this.wordDiffs=r.wordDiffs,this.simplifyDiff=r.simplifyDiff,this.schema=e.type.schema,this.tr=new C(e),this.currentJSON={},this.finalJSON={},this.ops=[]}init(){return this.complexSteps?(this.currentJSON=K(this.fromDoc).toJSON(),this.finalJSON=K(this.toDoc).toJSON(),this.ops=(0,F.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,F.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=De(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=q(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,F.applyPatch)(r,[t]);try{n=this.schema.nodeFromJSON(r),n.check()}catch{if(n=null,this.ops.length>0)t=this.ops.shift(),e.push(t);else throw Error(`No valid diff possible applying ${t.path}`)}}this.complexSteps&&e.length===1&&(i.includes(`attrs`)||i.includes(`type`))?(this.addSetNodeMarkup(),e=[]):e.length===1&&t.op===`replace`&&i[i.length-1]===`text`?(this.addReplaceTextSteps(t,r),e=[]):this.addReplaceStep(n,r)&&(e=[])}}addSetNodeMarkup(){let e=this.schema.nodeFromJSON(this.currentJSON),t=this.schema.nodeFromJSON(this.finalJSON),n=t.content.findDiffStart(e.content),r=e.nodeAt(n),i=t.nodeAt(n);if(n!=null){let e=r.type===i.type?null:i.type;try{this.tr.setNodeMarkup(n,e,i.attrs,i.marks)}catch(t){if(e&&t.message.includes(`Invalid content`))this.tr.replaceWith(n,n+r.nodeSize,i);else throw t}return this.currentJSON=K(this.tr.doc).toJSON(),this.ops=(0,F.createPatch)(this.currentJSON,this.finalJSON),!0}return!1}recreateChangeMarkSteps(){this.toDoc.descendants((e,t)=>{if(!e.isInline)return!0;this.tr.doc.nodesBetween(t,t+e.nodeSize,(n,r)=>{if(!n.isInline)return!0;let i=Math.max(t,r),a=Math.min(t+e.nodeSize,r+n.nodeSize);n.marks.forEach(t=>{t.isInSet(e.marks)||this.tr.removeMark(i,a,t)}),e.marks.forEach(e=>{e.isInSet(n.marks)||this.tr.addMark(i,a,e)})})})}addReplaceStep(e,t){let n=G(this.schema.nodeFromJSON(this.currentJSON),e);if(!n)return!1;if(!this.tr.maybeStep(n).failed)return this.currentJSON=t,!0;throw Error(`No valid step found.`)}addReplaceTextSteps(e,t){let n={...e,value:`xx`},r={...e,value:`yy`},i=q(this.currentJSON),a=q(this.currentJSON);(0,F.applyPatch)(i,[n]),(0,F.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=Oe(this.currentJSON,e.path),u=this.wordDiffs?Ce(l,c):Se(l,c),d=o.content.findDiffStart(s.content),f=o.resolve(d+1).marks();for(;u.length;){let e=u.shift();if(e.added){let t=this.schema.nodeFromJSON({type:`text`,text:e.value}).mark(f);if(u.length&&u[0].removed){let e=u.shift();this.tr.replaceWith(d,d+e.value.length,t)}else this.tr.insert(d,t);d+=e.value.length}else if(e.removed)if(u.length&&u[0].added){let t=u.shift(),n=this.schema.nodeFromJSON({type:`text`,text:t.value}).mark(f);this.tr.replaceWith(d,d+e.value.length,n),d+=t.value.length}else this.tr.delete(d,d+e.value.length);else d+=e.value.length}this.currentJSON=t}};function Ae(e,t,n={}){return new ke(e,t,n).init()}var je=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function J(e){let t=[];return e.forEach((e,n)=>{if(je.has(e.type.name)){let r=n+1,i=0;e.forEach(e=>{let n=r+i;t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`}),i+=e.nodeSize})}else t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`})}),t}function Me(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a].key===t[n].key?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o].key===t[s].key?(a.push({type:`same`,b:t[s]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,a:e[o]}),o++):(a.push({type:`ins`,b:t[s]}),s++);for(;o<n;)a.push({type:`del`,a:e[o++]});for(;s<r;)a.push({type:`ins`,b:t[s++]});return a}function Ne(e,t){let n=Me(J(e),J(t)),r=[],i=0;for(let e of n)e.type===`same`?i=e.b.to:e.type===`ins`?(r.push({fromA:0,toA:0,fromB:e.b.from,toB:e.b.to}),i=e.b.to):r.push({fromA:e.a.from,toA:e.a.to,fromB:i,toB:i});return r}var Pe=400;function Y(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function Fe(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof ee?`add`:t instanceof b?`remove`:null;if(a===null)return;let o=t,s=e.mapping.slice(i+1),c=s.map(o.from,-1),l=s.map(o.to,1);if(l<=c||n.some(e=>e.fromB<=c&&l<=e.toB))return;let u=e.mapping.slice(0,i).invert(),d=u.map(o.from),f=u.map(o.to);f<=d||r.push({fromA:d,toA:f,fromB:c,toB:l,markName:o.mark.type.name,kind:a})}),r}function Ie(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=Y(r,n,e),a=Y(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=Ae(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=Ne(i,o),l=s?Fe(s,c):[];return c.length+l.length>Pe?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var Le=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function Re(e){return e.changes.length+2*e.markChanges.length}function X(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function ze(e){if(e.childCount===0)return!1;let t=!0;return e.forEach(e=>{e.type.name!==`listItem`&&e.type.name!==`taskItem`&&(t=!1)}),t}function Z(e,t,n){let r=document.createElement(n?`div`:`span`);r.className=n?`ok-diff-del ok-diff-del-block`:`ok-diff-del`,r.setAttribute(`data-diff-deleted`,``);let i=e.serializeFragment(t);if(n&&ze(t)){let e=document.createElement(`ul`);e.appendChild(i),r.appendChild(e)}else r.appendChild(i);return r}function Be(e,t,n,r,i){let a=te.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=X(n.content);o.push(x.widget(e.fromB,()=>Z(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(x.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(x.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=X(n.content);o.push(x.widget(e.fromB,()=>Z(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return _.create(e,o)}var Ve=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),Q=i.filter(e=>!Ve.has(e.name)).map(e=>e.name===`jsxComponent`?y:e),He=S(Q);function Ue(e,t){return Ie(e,t,He,f())}var We=re.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:_.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new ie({key:new h(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function Ge(e){let t=(0,E.c)(31),{diff:n}=e,r,i,a,o;if(t[0]!==n.afterDoc||t[1]!==n.beforeDoc||t[2]!==n.changes||t[3]!==n.markChanges){let e=Be(n.afterDoc,n.beforeDoc,n.changes,n.markChanges,He);o=p,a=!1,r=Q,i=We.configure({decorations:e}),t[0]=n.afterDoc,t[1]=n.beforeDoc,t[2]=n.changes,t[3]=n.markChanges,t[4]=r,t[5]=i,t[6]=a,t[7]=o}else r=t[4],i=t[5],a=t[6],o=t[7];let s;t[8]!==r||t[9]!==i?(s=[...r,i],t[8]=r,t[9]=i,t[10]=s):s=t[10];let c;t[11]===n.afterDoc?c=t[12]:(c=n.afterDoc.toJSON(),t[11]=n.afterDoc,t[12]=c);let l;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(l={attributes:{class:`pt-4`}},t[13]=l):l=t[13];let u;t[14]!==a||t[15]!==s||t[16]!==c?(u={editable:a,extensions:s,content:c,editorProps:l},t[14]=a,t[15]=s,t[16]=c,t[17]=u):u=t[17];let d;t[18]===n?d=t[19]:(d=[n],t[18]=n,t[19]=d);let f=o(u,d),[h]=(0,P.useState)(Ke),g=(0,P.useRef)(null),_,v;t[20]===h?(_=t[21],v=t[22]):(_=()=>{let e=g.current;if(e)return e.appendChild(h),()=>{h.parentNode===e&&e.removeChild(h)}},v=[h],t[20]=h,t[21]=_,t[22]=v),(0,P.useLayoutEffect)(_,v);let y;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,D.jsx)(`div`,{className:`tiptap-editor`,children:(0,D.jsx)(`div`,{ref:g,style:{display:`contents`}})}),t[23]=y):y=t[23];let b;t[24]===f?b=t[25]:(b=(0,D.jsx)(m,{editor:f,className:`tiptap-editor-portal-content`}),t[24]=f,t[25]=b);let x;t[26]!==h||t[27]!==b?(x=(0,ye.createPortal)(b,h),t[26]=h,t[27]=b,t[28]=x):x=t[28];let S;return t[29]===x?S=t[30]:(S=(0,D.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1`,"data-testid":`rendered-diff-view`,children:[y,x]}),t[29]=x,t[30]=S),S}function Ke(){let e=document.createElement(`div`);return e.style.display=`contents`,e}var qe=`[data-property-change]`;function Je(e){let t=0,n=!1;for(let r of e.split(`
|
|
3
3
|
`)){let e=r.startsWith(`+`)&&!r.startsWith(`+++`)||r.startsWith(`-`)&&!r.startsWith(`---`);e&&!n&&(t+=1),n=e}return t}function Ye(e){let t=Array.from(e.querySelectorAll(`.diff-code-insert, .diff-code-delete`)),n=[],r=null;for(let e of t){let t=e.closest(`tr`);t&&((r===null||t.previousElementSibling!==r)&&n.push(e),r=t)}return n}function $(e){let t=0,n=0;for(let r of e.split(`
|
|
4
4
|
`))r.startsWith(`+`)&&!r.startsWith(`+++`)?t++:r.startsWith(`-`)&&!r.startsWith(`---`)&&n++;return{additions:t,deletions:n}}function Xe(e,t){return`${e}\u0000${t}`}function Ze(e,t,n){let r=w(e).body,i=w(t).body;return r===i?``:ue(n,r,i,``,``,{context:Math.max(r.split(`
|
package/dist/public/index.html
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
-->
|
|
95
95
|
<script>(() => { try { const raw = localStorage.getItem('ok-language-v1'); if (!raw) return; const o = JSON.parse(raw); if (typeof o?.locale !== 'string' || !/^[a-zA-Z]{2,8}(-[a-zA-Z0-9]{2,8})*$/.test(o.locale)) return; document.documentElement.lang = o.locale; document.documentElement.dir = o.dir === 'rtl' ? 'rtl' : 'ltr'; } catch {} })();</script>
|
|
96
96
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
97
|
-
<script type="module" crossorigin src="./assets/index-
|
|
97
|
+
<script type="module" crossorigin src="./assets/index-CvOmEWwY.js"></script>
|
|
98
98
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
99
99
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
100
100
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
<link rel="modulepreload" crossorigin href="./assets/markdownit-C1Squg6O.js">
|
|
131
131
|
<link rel="modulepreload" crossorigin href="./assets/dist-DGemBD_J.js">
|
|
132
132
|
<link rel="modulepreload" crossorigin href="./assets/dist-D81TFAXh.js">
|
|
133
|
-
<link rel="modulepreload" crossorigin href="./assets/client-version-
|
|
133
|
+
<link rel="modulepreload" crossorigin href="./assets/client-version-Q-5pX-lW.js">
|
|
134
134
|
<link rel="modulepreload" crossorigin href="./assets/use-apply-config-color-theme-DZRctrdg.js">
|
|
135
135
|
<link rel="modulepreload" crossorigin href="./assets/messages-7TQ4p_5e.js">
|
|
136
136
|
<link rel="modulepreload" crossorigin href="./assets/i18n-BzFVw6me.js">
|
|
137
|
-
<link rel="modulepreload" crossorigin href="./assets/config-provider-
|
|
137
|
+
<link rel="modulepreload" crossorigin href="./assets/config-provider-Bab4_nwt.js">
|
|
138
138
|
<link rel="modulepreload" crossorigin href="./assets/dist-DsLZcVyZ.js">
|
|
139
139
|
<link rel="modulepreload" crossorigin href="./assets/dist-DX6BuR0m.js">
|
|
140
140
|
<link rel="modulepreload" crossorigin href="./assets/dist-DmTWt7nC.js">
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
<link rel="modulepreload" crossorigin href="./assets/asset-dispatch-CdZ_--jl.js">
|
|
175
175
|
<link rel="modulepreload" crossorigin href="./assets/external-link-B4qPZwve.js">
|
|
176
176
|
<link rel="modulepreload" crossorigin href="./assets/documents-fetch-B1PtbYbS.js">
|
|
177
|
-
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-
|
|
177
|
+
<link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-DuZeupvc.js">
|
|
178
178
|
<link rel="modulepreload" crossorigin href="./assets/git-branch-CCnsAeFH.js">
|
|
179
179
|
<link rel="modulepreload" crossorigin href="./assets/triangle-alert-CRXAJBn4.js">
|
|
180
180
|
<link rel="modulepreload" crossorigin href="./assets/Mermaid-CHnWO5AG.js">
|
|
@@ -195,10 +195,10 @@
|
|
|
195
195
|
<link rel="modulepreload" crossorigin href="./assets/input-lp6-d0mX.js">
|
|
196
196
|
<link rel="modulepreload" crossorigin href="./assets/skills-api-DO54o34O.js">
|
|
197
197
|
<link rel="modulepreload" crossorigin href="./assets/use-collab-url-B7oEo69p.js">
|
|
198
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
199
|
-
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-
|
|
198
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-EVe8T_4V.js">
|
|
199
|
+
<link rel="modulepreload" crossorigin href="./assets/use-open-skill-BtJdSHXl.js">
|
|
200
200
|
<link rel="modulepreload" crossorigin href="./assets/mascot-outline-CtS592mc.js">
|
|
201
|
-
<link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-
|
|
201
|
+
<link rel="modulepreload" crossorigin href="./assets/SkillInstallMenu-7rF7_Qqj.js">
|
|
202
202
|
<link rel="modulepreload" crossorigin href="./assets/checkbox-hfBCQ901.js">
|
|
203
203
|
<link rel="modulepreload" crossorigin href="./assets/label-B5yNUINo.js">
|
|
204
204
|
<link rel="modulepreload" crossorigin href="./assets/radio-group--UnhPoMH.js">
|
|
@@ -206,18 +206,18 @@
|
|
|
206
206
|
<link rel="modulepreload" crossorigin href="./assets/toggle-group-BhPXEnmq.js">
|
|
207
207
|
<link rel="modulepreload" crossorigin href="./assets/useQuery-ZeEDLtxh.js">
|
|
208
208
|
<link rel="modulepreload" crossorigin href="./assets/workspace-paths-CKUFX0v6.js">
|
|
209
|
-
<link rel="modulepreload" crossorigin href="./assets/follow-file-
|
|
209
|
+
<link rel="modulepreload" crossorigin href="./assets/follow-file-CXSEufj8.js">
|
|
210
210
|
<link rel="modulepreload" crossorigin href="./assets/format-I3YtNHrv.js">
|
|
211
211
|
<link rel="modulepreload" crossorigin href="./assets/braces-CJEjDc1f.js">
|
|
212
|
-
<link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-
|
|
212
|
+
<link rel="modulepreload" crossorigin href="./assets/PropertyDisplayRow-DY3LkrAq.js">
|
|
213
213
|
<link rel="modulepreload" crossorigin href="./assets/folder-config-api-DPWmRi8a.js">
|
|
214
|
-
<link rel="modulepreload" crossorigin href="./assets/comment-chips-
|
|
214
|
+
<link rel="modulepreload" crossorigin href="./assets/comment-chips-Cyvt-GuB.js">
|
|
215
215
|
<link rel="modulepreload" crossorigin href="./assets/SkillCostValue-6xiHOBnl.js">
|
|
216
216
|
<link rel="modulepreload" crossorigin href="./assets/textarea-dRxJ8TN6.js">
|
|
217
|
-
<link rel="modulepreload" crossorigin href="./assets/selection-context-
|
|
217
|
+
<link rel="modulepreload" crossorigin href="./assets/selection-context-B9p1R6mm.js">
|
|
218
218
|
<link rel="modulepreload" crossorigin href="./assets/lint-config-client-sK38eqbj.js">
|
|
219
|
-
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-
|
|
220
|
-
<link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-
|
|
219
|
+
<link rel="modulepreload" crossorigin href="./assets/ManagedArtifactProperties-SInV_eE5.js">
|
|
220
|
+
<link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-DuuoUeCA.js">
|
|
221
221
|
<link rel="modulepreload" crossorigin href="./assets/arrow-up-right-CGe6dTck.js">
|
|
222
222
|
<link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon-CP1iDML-.js">
|
|
223
223
|
<link rel="modulepreload" crossorigin href="./assets/list-plus-CT84Vd_h.js">
|
|
@@ -225,7 +225,7 @@
|
|
|
225
225
|
<link rel="modulepreload" crossorigin href="./assets/platform-labels-B2q9roOE.js">
|
|
226
226
|
<link rel="modulepreload" crossorigin href="./assets/clipboard-adapter-DqemxSWT.js">
|
|
227
227
|
<link rel="modulepreload" crossorigin href="./assets/use-workspace-8Sxb8Z6Q.js">
|
|
228
|
-
<link rel="modulepreload" crossorigin href="./assets/skill-actions-
|
|
228
|
+
<link rel="modulepreload" crossorigin href="./assets/skill-actions-Dmiv-OaH.js">
|
|
229
229
|
<link rel="modulepreload" crossorigin href="./assets/case-sensitive-CE1B0vR4.js">
|
|
230
230
|
<link rel="modulepreload" crossorigin href="./assets/chevron-left-UUhIKmW4.js">
|
|
231
231
|
<link rel="modulepreload" crossorigin href="./assets/lint-plugin-meta-24C-xIZB.js">
|
|
@@ -233,30 +233,30 @@
|
|
|
233
233
|
<link rel="modulepreload" crossorigin href="./assets/wrench-Pum_Z20m.js">
|
|
234
234
|
<link rel="modulepreload" crossorigin href="./assets/panel-DzcaKH-k.js">
|
|
235
235
|
<link rel="modulepreload" crossorigin href="./assets/skeleton-D4wPMdlV.js">
|
|
236
|
-
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-
|
|
236
|
+
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-CtytQZKZ.js">
|
|
237
237
|
<link rel="modulepreload" crossorigin href="./assets/download-Dn5ulvxm.js">
|
|
238
238
|
<link rel="modulepreload" crossorigin href="./assets/field-BZySvRxx.js">
|
|
239
|
-
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-
|
|
239
|
+
<link rel="modulepreload" crossorigin href="./assets/auth-state-cache-CYlHHIOy.js">
|
|
240
240
|
<link rel="modulepreload" crossorigin href="./assets/miss-dialog-store-CveL5d4F.js">
|
|
241
|
-
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-
|
|
241
|
+
<link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-YRIcYpak.js">
|
|
242
242
|
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-BqElNT05.js">
|
|
243
243
|
<link rel="modulepreload" crossorigin href="./assets/history-DnsnwPsA.js">
|
|
244
244
|
<link rel="modulepreload" crossorigin href="./assets/open-managed-artifact-tab-ENQgQOde.js">
|
|
245
|
-
<link rel="modulepreload" crossorigin href="./assets/use-popular-skills-
|
|
245
|
+
<link rel="modulepreload" crossorigin href="./assets/use-popular-skills-Pfi6527q.js">
|
|
246
246
|
<link rel="modulepreload" crossorigin href="./assets/panel-right-open-DjTdbkpr.js">
|
|
247
247
|
<link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-DNmxO4ft.js">
|
|
248
248
|
<link rel="modulepreload" crossorigin href="./assets/square-pen-NShYDQ74.js">
|
|
249
249
|
<link rel="modulepreload" crossorigin href="./assets/undo-2-DAbhEXY-.js">
|
|
250
250
|
<link rel="modulepreload" crossorigin href="./assets/form-C2vo2-_o.js">
|
|
251
251
|
<link rel="modulepreload" crossorigin href="./assets/text-viewer-languages-CF6DiXgT.js">
|
|
252
|
-
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-
|
|
252
|
+
<link rel="modulepreload" crossorigin href="./assets/EditorModeToggle-C89Lmfvi.js">
|
|
253
253
|
<link rel="modulepreload" crossorigin href="./assets/ConfigSharingInfoTooltip-DjzTrJv7.js">
|
|
254
254
|
<link rel="modulepreload" crossorigin href="./assets/project-paths-DWofrp-d.js">
|
|
255
255
|
<link rel="modulepreload" crossorigin href="./assets/SkillModeBanner-CFrx5Bz6.js">
|
|
256
256
|
<link rel="modulepreload" crossorigin href="./assets/app-menubar-gate-CVNDuMMQ.js">
|
|
257
257
|
<link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-Bo3rGytc.js">
|
|
258
258
|
<link rel="modulepreload" crossorigin href="./assets/terminal-command-events-CwHEMoPz.js">
|
|
259
|
-
<link rel="modulepreload" crossorigin href="./assets/agent-diff-store-
|
|
259
|
+
<link rel="modulepreload" crossorigin href="./assets/agent-diff-store-_LXkwhjL.js">
|
|
260
260
|
<link rel="modulepreload" crossorigin href="./assets/use-live-xterm-theme-C1EtEd_i.js">
|
|
261
261
|
<link rel="modulepreload" crossorigin href="./assets/input-group-4bFGj8B8.js">
|
|
262
262
|
<link rel="modulepreload" crossorigin href="./assets/use-installed-clis-DZ3aSVtd.js">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./launch-json-removal-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{t as e}from"./launch-json-removal-CrTIzd9e.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=e(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`;return s&&i({event:`launch-json-repair-removed`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
|
|
2
|
+
//# sourceMappingURL=repair-launch-json-DkWTVP2d.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ps as e}from"./src-BxdlvOrw.mjs";import{i as t,o as n,p as r}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{ps as e}from"./src-BxdlvOrw.mjs";import{i as t,o as n,p as r}from"./write-project-skill-BpvX1zW9.mjs";import{d as i,v as a}from"./init-CwTjc7sX.mjs";import{t as o}from"./mcp-migrate-event-B1gJf6bG.mjs";import{homedir as s}from"node:os";function c(e){let r=e.logger??d,i=e.home??s(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of t){let t=n[o],s=l(()=>t.configPath(``,i));if(s!==null&&a.push(u({scope:`user`,editorId:o,target:t,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),t.projectConfigPath){let n=t.projectConfigPath,i=l(()=>n(e.projectDir));i!==null&&a.push(u({scope:`project`,editorId:o,target:t,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function l(e){try{return e()}catch{return null}}function u(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},s=i(t.target,t.cwd,t.home,t.configPathOverride);if(s===null)return{...n,outcome:`no-entry`};if(t.editorId===`pi`){if(r(s))return{...n,outcome:`canonical`}}else{let r=e(s);if(r.kind===`recognized`&&r.disposition===`keep`)return{...n,outcome:`canonical`};if(r.kind===`declined`&&t.scope===`project`)return t.logger({event:`mcp-config-repair-declined`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:r.reason}),{...n,outcome:`declined`,reason:r.reason}}t.logger(o({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:s}));let c=a(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride);if(c.action===`failed`){let e=c.error??`unknown write failure`;return t.logger({event:`mcp-config-repair-write-failed`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,error:e}),{...n,outcome:`write-failed`,error:e}}return c.action===`declined`?(t.logger({event:`mcp-config-repair-declined`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:c.declineReason}),{...n,outcome:`declined`}):{...n,outcome:`repaired`}}function d(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{c as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-D6iL-1dV.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{Ms as e,W as t}from"./src-BxdlvOrw.mjs";import{Er as n,Or as r,Sr as i,_r as a,br as o,dr as s,fr as c,gr as l,hr as u}from"./src-Cqh-Fhfh.mjs";import{o as d,s as f,t as p,v as m}from"./write-project-skill-B7q9oxw9.mjs";import{n as h,s as g,t as _}from"./colors-BsmVIwfM.mjs";import{n as v,r as y,t as b}from"./skill-teardown-Cx7h3ooY.mjs";import{dirname as x,join as S,relative as C,resolve as w}from"node:path";import{existsSync as T,mkdirSync as E,readFileSync as D,readdirSync as O,rmSync as k,statSync as A,writeFileSync as j}from"node:fs";import{homedir as M}from"node:os";import{createInterface as N}from"node:readline/promises";const P={existsSync:e=>T(e),isDirectory:e=>{try{return A(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>O(e),readFileSync:e=>D(e),writeFileSync:(e,t)=>{j(e,t)},mkdirSync:(e,t)=>{E(e,t)},rmSync:(e,t)=>{k(e,t)}},F={resolveProjectBundledSkillDir:()=>i(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>i(e,{checkDesktop:!1}),readBundledVersion:()=>c(),readRecordedVersion:e=>u(e,`cli-hosts`),writeRecordedVersion:(e,t)=>a(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>o(e),readBundleDecision:(e,t)=>s(e,t),writeBundleDecision:(e,t,n)=>l(e,t,n),removeBundleFromDisk:(e,t)=>y(e,t)};function I(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function L(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(x(t),{recursive:!0}),R(e,t,n)}function R(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=S(e,r),a=S(t,r);n.isDirectory(i)?R(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function z(t,n,r){return r.existsSync(S(t,`.agents`,`skills`,n))||e.some(e=>r.existsSync(S(t,e.skillsRoot,n)))}function B(t,n,r,i,a,o){let s=[],c=S(t,`.agents`,`skills`,n);if(z(t,n,i)){i.existsSync(c)&&s.push({kind:`central`,path:c,outcome:`skipped-present`});for(let r of e){let e=S(t,r.skillsRoot,n);if(e!==c){if(!i.existsSync(S(t,r.hostDir))){s.push({kind:`host`,editorId:r.editorId,hostDir:r.hostDir,path:e,outcome:`skipped-host-absent`});continue}i.existsSync(e)&&s.push({kind:`host`,editorId:r.editorId,hostDir:r.hostDir,path:e,outcome:`skipped-present`})}}return{entries:s,anyWritten:!1,anyDestinationSucceeded:!0}}let l=i.existsSync(S(t,`.agents`));if(l&&i.existsSync(c))s.push({kind:`central`,path:c,outcome:`skipped-present`});else if(l)try{L(r,c,i),s.push({kind:`central`,path:c,outcome:`written`}),a({event:`user-skill-reclaim-central-written`,scope:`user`,path:c,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`central`,path:c,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-central-failed`,scope:`user`,path:c,error:t})}for(let l of e){let e=S(t,l.hostDir),u=S(t,l.skillsRoot,n);if(u===c){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!i.existsSync(e)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-host-absent`});continue}if(i.existsSync(u)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-present`});continue}try{L(r,u,i),s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`written`}),a({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,error:t})}}return{entries:s,anyWritten:s.some(e=>e.outcome===`written`),anyDestinationSucceeded:s.some(e=>e.outcome===`written`||e.outcome===`skipped-present`)}}function V(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function H(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of f){let o=S(e,t.hostDir,`skills`,`open-knowledge`),s=S(o,`SKILL.md`);if(n.existsSync(s)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`present`});continue}let c=d[t.editorId]?.projectConfigPath?.(e);if(!V(c,n)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:o});continue}try{p(o,e),L(i,o,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`created`}),r({event:`project-skill-reclaim-created`,scope:`project`,editorId:t.editorId,path:o})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:o,error:n})}}return{outcome:`done`,entries:a}}async function U(e,i,a,o){let s=e=>{i.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await i.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await i.readRecordedVersion(e)}catch(e){o({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of r)try{d.push({id:e,sourceDir:i.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let r of d){let s=n[r.id],c=z(e,s,a),l=await i.readBundleDecision(e,s).catch(()=>null);if(!t(l,{installedOnDisk:c})){if(c)try{i.removeBundleFromDisk(e,r.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:r.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await i.writeBundleDecision(e,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}p.push(r)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(t=>z(e,n[t.id],a));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===r.length,_=[];for(let{id:t,sourceDir:r}of p){let i=B(e,n[t],r,a,o,l);h.push(...i.entries),_.push({id:t,anyWritten:i.anyWritten,landed:i.anyDestinationSucceeded,centralFailed:i.entries.some(e=>e.kind===`central`&&e.outcome===`failed`),hostFailed:i.entries.some(e=>e.kind===`host`&&e.outcome===`failed`)})}let v=_.some(e=>e.centralFailed),y=_.every(e=>e.landed);if(g&&y&&!v){let t=null;try{await i.writeRecordedVersion(e,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(e){t=e instanceof Error?e.message:String(e),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:t})}for(let{id:e,anyWritten:n}of _)s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:t===null?n?`installed`:`skip-current`:`failed`,version:l,...t===null?{}:{reason:`state-write-failed:${t}`}})}else{g||s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:`bundle-unresolved`});for(let{id:e,centralFailed:t,hostFailed:n}of _)!t&&!n||s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:`failed`,version:l,reason:n?`all-writes-failed`:`central-write-failed`})}return{outcome:`done`,version:l,entries:h}}async function W(e){let t=e.logger??I,n=e.fs??P,r=e.home??M(),i={...F,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=H(e.projectDir,i,n,t),o=await U(r,i,n,t),s=v(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=b(r,s)}catch(e){u=!0,t({event:`legacy-fanout-cleanup-refused`,scope:`user`,error:e instanceof Error?e.message:String(e)})}for(let e of c)t({event:`legacy-fanout-path-removed`,scope:`user`,path:e})}else l=!0,t({event:`legacy-fanout-cleanup-declined`,scope:`user`});return{status:`done`,project:a,user:o,legacySwept:c,legacyCleanupDeclined:l,legacyCleanupFailed:u}}function G(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`&&e.user.reason!==`all-bundles-declined`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function K(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`present`).length,r=e.project.entries.filter(e=>e.outcome===`created`).length,i=e.project.entries.filter(e=>e.outcome===`no-token`).length,a=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} present, ${r} created, ${i} no-token, ${a} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-present`).length,i=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,a=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} present, ${i} skipped, ${a} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return e.legacySwept.length>0?t.push(` Cleanup: removed ${e.legacySwept.length} path(s) from a pre-0.42 install.`):e.legacyCleanupFailed?t.push(` Cleanup: failed — see logs; pre-0.42 directories left in place.`):e.legacyCleanupDeclined&&t.push(` Cleanup: declined — pre-0.42 directories left in place.`),t.join(`
|
|
1
|
+
import{Ms as e,W as t}from"./src-BxdlvOrw.mjs";import{Er as n,Or as r,Sr as i,_r as a,br as o,dr as s,fr as c,gr as l,hr as u}from"./src-DJejT6Wt.mjs";import{o as d,s as f,t as p,v as m}from"./write-project-skill-BpvX1zW9.mjs";import{n as h,s as g,t as _}from"./colors-BsmVIwfM.mjs";import{n as v,r as y,t as b}from"./skill-teardown-W9f5SFoc.mjs";import{dirname as x,join as S,relative as C,resolve as w}from"node:path";import{existsSync as T,mkdirSync as E,readFileSync as D,readdirSync as O,rmSync as k,statSync as A,writeFileSync as j}from"node:fs";import{homedir as M}from"node:os";import{createInterface as N}from"node:readline/promises";const P={existsSync:e=>T(e),isDirectory:e=>{try{return A(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>O(e),readFileSync:e=>D(e),writeFileSync:(e,t)=>{j(e,t)},mkdirSync:(e,t)=>{E(e,t)},rmSync:(e,t)=>{k(e,t)}},F={resolveProjectBundledSkillDir:()=>i(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>i(e,{checkDesktop:!1}),readBundledVersion:()=>c(),readRecordedVersion:e=>u(e,`cli-hosts`),writeRecordedVersion:(e,t)=>a(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>o(e),readBundleDecision:(e,t)=>s(e,t),writeBundleDecision:(e,t,n)=>l(e,t,n),removeBundleFromDisk:(e,t)=>y(e,t)};function I(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function L(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(x(t),{recursive:!0}),R(e,t,n)}function R(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=S(e,r),a=S(t,r);n.isDirectory(i)?R(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function z(t,n,r){return r.existsSync(S(t,`.agents`,`skills`,n))||e.some(e=>r.existsSync(S(t,e.skillsRoot,n)))}function B(t,n,r,i,a,o){let s=[],c=S(t,`.agents`,`skills`,n);if(z(t,n,i)){i.existsSync(c)&&s.push({kind:`central`,path:c,outcome:`skipped-present`});for(let r of e){let e=S(t,r.skillsRoot,n);if(e!==c){if(!i.existsSync(S(t,r.hostDir))){s.push({kind:`host`,editorId:r.editorId,hostDir:r.hostDir,path:e,outcome:`skipped-host-absent`});continue}i.existsSync(e)&&s.push({kind:`host`,editorId:r.editorId,hostDir:r.hostDir,path:e,outcome:`skipped-present`})}}return{entries:s,anyWritten:!1,anyDestinationSucceeded:!0}}let l=i.existsSync(S(t,`.agents`));if(l&&i.existsSync(c))s.push({kind:`central`,path:c,outcome:`skipped-present`});else if(l)try{L(r,c,i),s.push({kind:`central`,path:c,outcome:`written`}),a({event:`user-skill-reclaim-central-written`,scope:`user`,path:c,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`central`,path:c,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-central-failed`,scope:`user`,path:c,error:t})}for(let l of e){let e=S(t,l.hostDir),u=S(t,l.skillsRoot,n);if(u===c){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!i.existsSync(e)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-host-absent`});continue}if(i.existsSync(u)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-present`});continue}try{L(r,u,i),s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`written`}),a({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,error:t})}}return{entries:s,anyWritten:s.some(e=>e.outcome===`written`),anyDestinationSucceeded:s.some(e=>e.outcome===`written`||e.outcome===`skipped-present`)}}function V(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function H(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of f){let o=S(e,t.hostDir,`skills`,`open-knowledge`),s=S(o,`SKILL.md`);if(n.existsSync(s)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`present`});continue}let c=d[t.editorId]?.projectConfigPath?.(e);if(!V(c,n)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:o});continue}try{p(o,e),L(i,o,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`created`}),r({event:`project-skill-reclaim-created`,scope:`project`,editorId:t.editorId,path:o})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:o,error:n})}}return{outcome:`done`,entries:a}}async function U(e,i,a,o){let s=e=>{i.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await i.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await i.readRecordedVersion(e)}catch(e){o({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of r)try{d.push({id:e,sourceDir:i.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let r of d){let s=n[r.id],c=z(e,s,a),l=await i.readBundleDecision(e,s).catch(()=>null);if(!t(l,{installedOnDisk:c})){if(c)try{i.removeBundleFromDisk(e,r.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:r.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await i.writeBundleDecision(e,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}p.push(r)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(t=>z(e,n[t.id],a));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===r.length,_=[];for(let{id:t,sourceDir:r}of p){let i=B(e,n[t],r,a,o,l);h.push(...i.entries),_.push({id:t,anyWritten:i.anyWritten,landed:i.anyDestinationSucceeded,centralFailed:i.entries.some(e=>e.kind===`central`&&e.outcome===`failed`),hostFailed:i.entries.some(e=>e.kind===`host`&&e.outcome===`failed`)})}let v=_.some(e=>e.centralFailed),y=_.every(e=>e.landed);if(g&&y&&!v){let t=null;try{await i.writeRecordedVersion(e,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(e){t=e instanceof Error?e.message:String(e),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:t})}for(let{id:e,anyWritten:n}of _)s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:t===null?n?`installed`:`skip-current`:`failed`,version:l,...t===null?{}:{reason:`state-write-failed:${t}`}})}else{g||s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:`bundle-unresolved`});for(let{id:e,centralFailed:t,hostFailed:n}of _)!t&&!n||s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:`failed`,version:l,reason:n?`all-writes-failed`:`central-write-failed`})}return{outcome:`done`,version:l,entries:h}}async function W(e){let t=e.logger??I,n=e.fs??P,r=e.home??M(),i={...F,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=H(e.projectDir,i,n,t),o=await U(r,i,n,t),s=v(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=b(r,s)}catch(e){u=!0,t({event:`legacy-fanout-cleanup-refused`,scope:`user`,error:e instanceof Error?e.message:String(e)})}for(let e of c)t({event:`legacy-fanout-path-removed`,scope:`user`,path:e})}else l=!0,t({event:`legacy-fanout-cleanup-declined`,scope:`user`});return{status:`done`,project:a,user:o,legacySwept:c,legacyCleanupDeclined:l,legacyCleanupFailed:u}}function G(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`&&e.user.reason!==`all-bundles-declined`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function K(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`present`).length,r=e.project.entries.filter(e=>e.outcome===`created`).length,i=e.project.entries.filter(e=>e.outcome===`no-token`).length,a=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} present, ${r} created, ${i} no-token, ${a} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-present`).length,i=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,a=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} present, ${i} skipped, ${a} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return e.legacySwept.length>0?t.push(` Cleanup: removed ${e.legacySwept.length} path(s) from a pre-0.42 install.`):e.legacyCleanupFailed?t.push(` Cleanup: failed — see logs; pre-0.42 directories left in place.`):e.legacyCleanupDeclined&&t.push(` Cleanup: declined — pre-0.42 directories left in place.`),t.join(`
|
|
2
2
|
`)}function q(){return new m(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").option(`-y, --yes`,`Skip the confirmation prompt for removing directories left by a pre-0.42 install.`).action(async e=>{let t=await W({projectDir:w(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null,confirmLegacyCleanup:t=>J(t,{yes:e.yes===!0})});process.stdout.write(`${K(t)}\n`),process.exitCode=G(t)})}async function J(e,t){let n=M(),r=e=>`~/${C(n,e)}`,i=t.input??process.stdin,a=[``,_(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),h(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${_(`Remove OpenKnowledge skills:`)} ${e.skillDirs.length}`,...e.skillDirs.map(e=>` ${r(e)}`)),e.emptyDirs.length>0){let t=e.skillDirs.length>0?`Then remove these, which hold nothing else once the above are gone:`:`Remove these empty directories, left behind by that install:`;a.push(``,`${_(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,h(`Nothing outside these paths is touched. A directory that still holds anything is kept.`)),process.stdout.write(`${a.join(`
|
|
3
3
|
`)}\n`),t.yes)return!0;if(!i.isTTY)return process.stdout.write(`${g("Not a terminal — skipping cleanup. Re-run with `ok repair-skills --yes` to remove these.")}\n`),!1;let o=N({input:i,output:process.stdout});try{let e=(await o.question(`\n${_(`Remove them?`)} ${h(`[y/N] `)}`)).trim().toLowerCase();return e===`y`||e===`yes`}finally{o.close()}}export{q as n,W as t};
|
|
4
|
-
//# sourceMappingURL=repair-skills-
|
|
4
|
+
//# sourceMappingURL=repair-skills-D5l11Fpo.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-D5l11Fpo.mjs";export{e as repairSkills};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ms as e}from"./src-BxdlvOrw.mjs";import{Er as t,Or as n}from"./src-
|
|
2
|
-
//# sourceMappingURL=skill-teardown-
|
|
1
|
+
import{Ms as e}from"./src-BxdlvOrw.mjs";import{Er as t,Or as n}from"./src-DJejT6Wt.mjs";import{dirname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import{existsSync as l,lstatSync as u,readdirSync as d,rmSync as f,rmdirSync as p}from"node:fs";const m=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],h=[...n.map(e=>t[e]),`open-knowledge`];function g(e){if(!i(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=s(e);if(t===c||r(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function _(e,t){let n=o(e,t);if(n.startsWith(`..`)||i(n))return!1;let r=e;for(let e of n.split(c)){r=a(r,e);try{if(!u(r).isDirectory())return!1}catch{return!1}}return!0}function v(e,t){try{return d(e).every(n=>t.has(a(e,n)))}catch{return!1}}function y(e){let t=g(e),n=[],i=[],o=new Set;for(let e of m){let s=a(t,e.hostDir,`skills`);if(!_(t,s))continue;let u=h.map(e=>a(s,e)).filter(e=>l(e));n.push(...u);for(let e of u)o.add(e);let d=a(t,e.pruneRoot),f=s;for(;v(f,o)&&(i.push(f),o.add(f),f!==d);){let e=r(f);if(e===f||e===t||!e.startsWith(t+c))break;f=e}}return{skillDirs:n,emptyDirs:i}}function b(e){try{if(!u(e).isDirectory())return!1;let t=d(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function x(e){let t=new Set,n=new Set;for(let i of m){let o=a(e,i.hostDir,`skills`);for(let e of h)t.add(a(o,e));let s=a(e,i.pruneRoot),l=o;for(;n.add(l),l!==s;){let t=r(l);if(t===l||t===e||!t.startsWith(e+c))break;l=t}}return{skillDirs:t,emptyDirs:n}}function S(e,t){let n=g(e),r=x(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(_(n,e)&&b(e))try{f(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(_(n,e))try{p(e),a.push(e)}catch{}return a}function C(r){let i=g(r),o=[];for(let r of n){let n=t[r];o.push({path:a(i,`.agents`,`skills`,n),bundleId:r,scope:`central`});for(let t of e)o.push({path:a(i,t.skillsRoot,n),bundleId:r,scope:`host`,hostDir:t.hostDir})}return o}function w(e,t){let n=[];for(let r of C(e))if(r.bundleId===t)try{f(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}export{C as i,y as n,w as r,S as t};
|
|
2
|
+
//# sourceMappingURL=skill-teardown-W9f5SFoc.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./src-BxdlvOrw.mjs";import"./write-project-skill-BpvX1zW9.mjs";import"./src-CTWYtZuP.mjs";import"./acp-harness-probe-Bs0bGk85.mjs";import"./init-CwTjc7sX.mjs";import{n as e}from"./loader-rMfYfMuQ.mjs";import"./skill-teardown-W9f5SFoc.mjs";import"./preview-BIlYbx8V.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sleep-B416PNUo.mjs";import{bc as i,ho as a,it as o,rt as s,yc as c}from"./src-BxdlvOrw.mjs";import{Fn as l,at as u,it as d,ot as f,rt as p,ti as m,wi as h}from"./src-
|
|
1
|
+
import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sleep-B416PNUo.mjs";import{bc as i,ho as a,it as o,rt as s,yc as c}from"./src-BxdlvOrw.mjs";import{Fn as l,at as u,it as d,ot as f,rt as p,ti as m,wi as h}from"./src-DJejT6Wt.mjs";import{D as g,F as _,I as v,k as y}from"./fs-traced-CJ0NSnI0.mjs";import{C as b,S as x,_ as S,d as C}from"./server-lock-BmwIVWMl.mjs";import{t as w}from"./yazl-DZr4PyKA.mjs";import{m as T,p as E,v as D}from"./write-project-skill-BpvX1zW9.mjs";import{c as ee}from"./colors-BsmVIwfM.mjs";import{n as te}from"./acp-harness-probe-Bs0bGk85.mjs";import{D as O,E as k,S as ne,T as A,_ as j,b as M,o as N}from"./init-CwTjc7sX.mjs";import{n as re}from"./constants-BaQvtYMu.mjs";import{t as P}from"./is-object-ByG7RnjH.mjs";import"./loader-rMfYfMuQ.mjs";import"./skill-teardown-W9f5SFoc.mjs";import"./preview-BIlYbx8V.mjs";import{execSync as ie,spawnSync as ae}from"node:child_process";import{basename as F,dirname as I,join as L,relative as oe,resolve as R,sep as se}from"node:path";import{cpSync as ce,createWriteStream as le,existsSync as z,lstatSync as ue,mkdirSync as B,mkdtempSync as de,readFileSync as V,readdirSync as H,readlinkSync as fe,rmSync as U,statSync as pe,writeFileSync as W}from"node:fs";import{arch as me,freemem as he,homedir as G,hostname as ge,platform as _e,release as ve,tmpdir as ye,totalmem as be,type as xe,uptime as Se}from"node:os";import"node:fs/promises";import{createHash as Ce}from"node:crypto";var we=n();const Te=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Ee(e,t,n=l){if(e!==void 0&&!Te.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let De=null;function Oe(e){De=e}function ke(){return De??process.cwd()}function Ae(){return L(G(),`.ok`,`bug-reports`)}function je(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=Ae(),r=`${t}-bugreport`,i=L(n,`${r}.zip`);for(let e=2;z(i);e+=1)i=L(n,`${r}-${e}.zip`);return i}function Me(e,t){let n=L(e,`.ok`,`config.yml`);if(z(n))try{let e=V(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return z(L(e,`.ok`))?Ce(`sha256`).update(R(e)).digest(`hex`).slice(0,12):null}function Ne(){let e={timestamp:new Date().toISOString(),platform:_e(),osType:xe(),osRelease:ve(),hostname:`[redacted]`,uptime:Se(),freeMem:he(),totalMem:be(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=ie(`sw_vers -productVersion 2>/dev/null`,m({encoding:`utf8`})).trim()}catch{}try{let t=L(__dirname,`..`,`..`,`package.json`);z(t)&&(e.okVersion=JSON.parse(V(t,`utf8`)).version)}catch{}return e}const Pe=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function Fe(e){let t=F(e);return Pe.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function Ie(e,t){return ze(e,t).files}const Le=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function Re(e,t=te){let n=L(e,`${t}.ShipIt`);return z(n)?Le.map(e=>L(n,e)).filter(e=>z(e)):[]}function ze(e,t){if(!z(t))return{files:[],excludedByProjectSlug:0};let n=H(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>L(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(Fe),i=[],a=r.filter(t=>{try{return V(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!Fe(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function Be(e){let t=L(e,`.ok`,`local`);return z(t)?{files:[`server.lock`,`last-spawn-error.log`,s].map(e=>L(t,e)).filter(e=>z(e))}:{files:[]}}function Ve(e){let t=L(e,`.ok`,`local`,`logs`);return z(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>L(t,e)).filter(e=>z(e))}:{files:[]}}function He(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=i(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function Ue(e){for(let t of e.files)try{He({zipfile:e.zipfile,name:`${e.prefix}/${F(t)}`,content:V(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function We(t){let{redact:n,outputPath:r,logger:i}=t,a=t.userLogsDir??L(G(),`.ok`,`logs`),o=t.projectDir?Me(t.projectDir,i):null;B(I(r),{recursive:!0}),i?.info({projectSlug:o},`gathering diagnostic data`);let s=Ne();s.desktop=t.desktop??null,s.language=t.language??null;let{files:l,excludedByProjectSlug:u}=ze(o,a),{files:d}=t.projectDir?Be(t.projectDir):{files:[]},{files:f}=t.projectDir?Ve(t.projectDir):{files:[]},p=t.shipItLogFiles??[];i?.info({logFileCount:l.length,logFilesExcludedByProjectSlug:u,lockFileCount:d.length,localSinkFileCount:f.length,shipItLogFileCount:p.length},`files collected`);let m=[],h=[],{ZipFile:g}=await import(`./yazl-jVENrf5i.mjs`).then(t=>e(t.default,1)),_=new g;Ue({zipfile:_,files:[...l,...p],prefix:`logs`,redact:n,bundleFiles:h,redactions:m,logger:i}),Ue({zipfile:_,files:d,prefix:`lockdir`,redact:n,bundleFiles:h,redactions:m,logger:i}),Ue({zipfile:_,files:f,prefix:`local-logs`,redact:n,bundleFiles:h,redactions:m,logger:i});for(let e of t.extraFiles??[])try{let t=V(e.sourcePath),n=`extra/${e.zipName??F(e.sourcePath)}`;_.addBuffer(t,n),h.push(n)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&He({zipfile:_,name:`note.txt`,content:t.note,redact:n,bundleFiles:h,redactions:m});let v=JSON.stringify(s,null,2);_.addBuffer(Buffer.from(v,`utf8`),`sysinfo.json`),h.push(`sysinfo.json`);let y={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:o,files:h,redactions:m,sysinfo:s};_.addBuffer(Buffer.from(JSON.stringify(y,null,2),`utf8`),`MANIFEST.json`);let b=m.reduce((e,t)=>e+t.lineCount,0),x=new Set(p.map(e=>`logs/${F(e)}`)),S=h.filter(e=>x.has(e)),C=o?h.filter(e=>e.startsWith(`logs/`)&&!Fe(e)&&!x.has(e)):[],w=[`# Bug Report Bundle`,``,`Generated: ${y.generatedAt}`,`Project: ${o??`(unscoped)`}`,`Discipline version: ${y.disciplineVersion}`,``,`## Contents`,``,...h.map(e=>`- ${e}`),``,`## Privacy`,``,...C.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...C.map(e=>`- ${e}`),``]:[],...S.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...S.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${c.join(`, `)}`,b>0?`${b} line(s) were scrubbed across ${m.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
|
|
2
2
|
`);_.addBuffer(Buffer.from(w,`utf8`),`README.md`),_.end();let T=le(r);return _.outputStream.pipe(T),await new Promise((e,t)=>{T.on(`close`,e),T.on(`error`,t)}),i?.info({bundlePath:r,fileCount:h.length,redactionCount:b},`bundle written`),{zipPath:r,summary:{projectSlug:o,files:h,redactions:m,redactedLineCount:b,generatedAt:y.generatedAt}}}var Ge=e(w(),1),K=e(ee(),1);function Ke(e){return v({absPath:y(`user`,e,e),sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function qe({home:e=G(),env:n=process.env}={}){let i=Ke(e),{override:o,preferenceList:s}=g(n),{locale:c,source:l}=a({override:o,storedPreference:i,supportedLocales:r,preferenceList:s,autoDetectableLocales:t});return{preference:i,locale:c,source:l,systemLanguages:s}}function Je(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function Ye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q(e,t){if(typeof e==`string`)return Je(e,t.contentDir);if(Array.isArray(e))return e.map(e=>q(e,t));if(!Ye(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=q(i,t);return n}function Xe(e,t){let n=V(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
|
|
3
3
|
`),i=n.split(`
|
|
4
4
|
`),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=q(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}W(e,r?`${a.join(`
|
|
@@ -17,4 +17,4 @@ import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sle
|
|
|
17
17
|
`).replace(/\n/g,`\r
|
|
18
18
|
`));let u=`${i?``:``}${l}`;return u!==r&&_(e,u,{mode:A(e)}),{kind:`removed`}}function ln(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function un(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function dn(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:d(r),command:r,isDesktop:ln(r)}}function fn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&fn(e)?`ui-orphan`:`stale`}const pn=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function mn(e){switch(e){case`running`:return K.default.green(e);case`desktop`:return K.default.blue(e);case`foreign`:return K.default.cyan(e);case`ui-orphan`:return K.default.magenta(e);case`stale`:return K.default.yellow(e)}}function hn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function gn(e){return`${hn(e.server.usage)} | ${hn(e.ui?.usage??null)}`}function _n(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function vn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,_n(e),gn(e),t,String(n),un(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=mn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=K.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
|
|
19
19
|
`)}async function yn(e={}){let t=e.discover??p,n=e.inspect??Z,r=e.log??(e=>console.log(e)),i=e.resolveCommand??u,a=e.resolveUsage??f,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=dn(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(vn(e.all?s:s.filter(e=>pn.has(Q(e)))))}function bn(){return new D(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await yn({all:t.all===!0||e===`all`,json:t.json===!0})})}function xn(e,t,n={}){let r=n.isAlive??x,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function Sn(e){let t=e.inspect??(t=>Z(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=xn(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function Cn(e,t=x){let n=await p(),r=null;for(let i of n){let n=Z(i,`server`),a=Z(i,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function wn(e){let t=Sn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function Tn(e){return new D(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=Sn({lockDir:h(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await yn({});return}if(n===`all`){let e=await p();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Z(n,`server`),r=Z(n,`ui`);!$(e,x)&&!$(r,x)||(wn(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await Cn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}wn(t);return}wn(h(R(ke(),n)))})}export{ke as _,Xt as a,$t as c,Z as d,qt as f,Ae as g,je as h,an as i,en as l,Wt as m,Tn as n,tn as o,Ut as p,bn as r,Zt as s,Sn as t,Yt as u,Oe as v,Ee as y};
|
|
20
|
-
//# sourceMappingURL=src-
|
|
20
|
+
//# sourceMappingURL=src-CTWYtZuP.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as e,Cc as t,Fs as n,Ls as r,W as i,_s as a,g as o,ms as s,qs as c,v as l,vs as u}from"./src-BxdlvOrw.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Bt as w,C as T,Ca as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Da as M,Di as N,Dn as P,Dr as F,Dt as I,E as L,Ea as R,Ei as z,En as B,Er as V,Et as H,F as U,Fi as W,Fn as G,Fr as K,Ft as q,G as J,Gi as Y,Gn as X,Gr as Z,Gt as Q,H as $,Hi as ee,Hn as te,Ht as ne,I as re,Ii as ie,In as ae,Ir as oe,It as se,J as ce,Ji as le,Jn as ue,Jr as de,Jt as fe,K as pe,Ki as me,Kn as he,Kr as ge,Kt as _e,L as ve,Li as ye,Ln as be,Lr as xe,Lt as Se,M as Ce,Mi as we,Mn as Te,Mr as Ee,Mt as De,N as Oe,Ni as ke,Nn as Ae,Nr as je,Nt as Me,O as Ne,Oi as Pe,On as Fe,Or as Ie,Ot as Le,P as Re,Pi as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qi as We,Qn as Ge,Qr as Ke,Qt as qe,R as Je,Ri as Ye,Rn as Xe,Rr as Ze,Rt as Qe,S as $e,Sa as et,Si as tt,Sn as nt,Sr as rt,St as it,T as at,Ta as ot,Tn as st,Tr as ct,Tt as lt,U as ut,Ui as dt,Un as ft,Ut as pt,V as mt,Vi as ht,Vn as gt,Vt as _t,W as vt,Wi as yt,Wn as bt,Wt as xt,X as St,Xi as Ct,Xn as wt,Xr as Tt,Xt as Et,Y as Dt,Yi as Ot,Yn as kt,Yr as At,Yt as jt,Z as Mt,Zi as Nt,Zn as Pt,Zr as Ft,Zt as It,_ as Lt,_a as Rt,_i as zt,_n as Bt,_r as Vt,_t as Ht,a as Ut,aa as Wt,ai as Gt,an as Kt,ar as qt,at as Jt,b as Yt,ba as Xt,bi as Zt,bn as Qt,br as $t,bt as en,c as tn,ca as nn,ci as rn,cn as an,cr as on,ct as sn,d as cn,da as ln,di as un,dn,dr as fn,ea as pn,ei as mn,en as hn,er as gn,et as _n,f as vn,fa as yn,fi as bn,fn as xn,fr as Sn,g as Cn,ga as wn,gi as Tn,gn as En,gr as Dn,gt as On,h as kn,ha as An,hi as jn,hn as Mn,hr as Nn,i as Pn,ia as Fn,ii as In,in as Ln,ir as Rn,it as zn,j as Bn,ji as Vn,jn as Hn,jr as Un,jt as Wn,k as Gn,ki as Kn,kn as qn,kr as Jn,kt as Yn,l as Xn,la as Zn,li as Qn,ln as $n,lr as er,lt as tr,m as nr,ma as rr,mi as ir,mn as ar,mr as or,n as sr,na as cr,ni as lr,nn as ur,nr as dr,nt as fr,o as pr,oa as mr,oi as hr,on as gr,or as _r,ot as vr,p as yr,pa as br,pi as xr,pn as Sr,pr as Cr,q as wr,qi as Tr,qn as Er,qr as Dr,qt as Or,r as kr,ra as Ar,ri as jr,rn as Mr,rr as Nr,rt as Pr,s as Fr,sa as Ir,si as Lr,sn as Rr,sr as zr,st as Br,t as Vr,ta as Hr,ti as Ur,tn as Wr,tr as Gr,tt as Kr,u as qr,ua as Jr,ui as Yr,un as Xr,ur as Zr,v as Qr,va as $r,vi as ei,vn as ti,vr as ni,vt as ri,w as ii,wa as ai,wi as oi,wn as si,wr as ci,wt as li,x as ui,xa as di,xi as fi,xn as pi,xr as mi,xt as hi,y as gi,ya as _i,yi as vi,yn as yi,yr as bi,yt as xi,z as Si,zi as Ci,zn as wi,zr as Ti,zt as Ei}from"./src-Cqh-Fhfh.mjs";import{C as Di,E as Oi,T as ki,_ as Ai,b as ji,c as Mi,d as Ni,g as Pi,i as Fi,l as Ii,m as Li,n as Ri,p as zi,s as Bi,t as Vi,u as Hi,v as Ui,w as Wi,x as Gi,y as Ki}from"./fs-traced-CJ0NSnI0.mjs";import{a as qi,d as Ji,f as Yi,i as Xi,l as Zi,n as Qi,r as $i,t as ea,u as ta}from"./logger-DFxEUjvj.mjs";import{C as na,S as ra,_ as ia,a as aa,b as oa,c as sa,d as ca,g as la,h as ua,i as da,l as fa,m as pa,n as ma,o as ha,p as ga,r as _a,s as va,t as ya,u as ba,x as xa}from"./server-lock-BmwIVWMl.mjs";export{$r as AGENT_ID_MAX_LEN,_i as AGENT_ID_RE,ze as AGENT_WRITE_ORIGIN,ot as AcpPermissionStore,et as AcpRegistry,Kn as AcpThreadManager,N as AgentFocusBroadcaster,z as AgentPresenceBroadcaster,W as AgentSessionCapacityError,ie as AgentSessionManager,Ht as AutoStartDisabledError,ci as BUNDLE_IDS,ct as BUNDLE_SCOPE,V as BUNDLE_SKILL_NAME,Nr as BacklinkIndex,me as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Bt as CONFIG_FILENAME,Pt as CONFLICT_MARKER_RE,Dr as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Lt as ConfigSchema,We as DEFAULT_CHECKPOINT_RETENTION,bn as DEFAULT_EMBEDDINGS_DIMENSIONS,ne as DEFAULT_PACK_ID,mt as DocumentDurabilityState,xr as EMBEDDINGS_API_KEY_ENV,st as ExposureConsentError,E as FEATURED_AGENT_IDS,f as FILE_SYSTEM_WRITER,Gr as FILE_WATCHER_ORIGIN,hr as FileEmbeddingsBackend,Ln as GIT_PREFLIGHT_FAIL_SPAN_NAME,pn as GIT_UPSTREAM_WRITER,R as GitDirAccessError,gr as GitNotAvailableError,Rr as GitTooOldError,ri as HOCUSPOCUS_AUTH_REJECTION_REASONS,xi as HocuspocusAuthRejection,en as HocuspocusAuthTokenSchema,m as INSTALLED_AGENTS_SCHEMES,sn as JSON_SCHEMA_DIALECT_2020_12,n as LINEAGE_EPOCH_KEY,Je as LIVE_DERIVED_INDEX_DEBOUNCE_MS,pt as LOG_MD_TEMPLATE,I as MANAGED_RENAME_ORIGIN,_ as MAX_ACP_THREADS,ye as MAX_AGENT_SESSIONS,we as MCP_CONNECTION_ID_HEADER,s as MCP_SERVER_NAME,Ye as MIN_EVICTABLE_IDLE_MS,an as MIN_GIT_VERSION,$ as MISSING_OK_CONFIG_MESSAGE,M as MalformedGitPointerError,_n as McpLogger,ut as MissingOkConfigError,S as OBSERVER_SYNC_ORIGIN,ti as OK_OKIGNORE_TEMPLATE,F as ONBOARDING_BUNDLE_IDS,a as ORPHAN_MODES,t as PROTOCOL_VERSION,ea as PinoLogger,sa as ProcessLockCollisionError,Xn as ProjectGitInitError,Le as ROLLBACK_ORIGIN,yi as ROOT_GITIGNORE_TEMPLATE,oa as RUNTIME_VERSION,Hr as SERVICE_WRITER,bi as SKILL_INSTALL_EVENTS_FILE_REL,e as SKILL_STATE_TARGETS,xt as STARTER_FOLDERS,Q as STARTER_FOLDER_FRONTMATTER_FILENAME,_e as STARTER_PACKS,Or as STARTER_PACK_IDS,fe as STARTER_TEMPLATES,at as STATE_MANIFEST_FILENAME,xa as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,hn as SeedPrerequisiteError,Wr as SeedRootDirError,ya as ServerLockCollisionError,Vr as SingleFileNotAFileError,sr as SingleFileNotFoundError,kr as SingleFileNotMarkdownError,L as StateManifestError,dr as TagIndex,Ie as USER_GLOBAL_BUNDLE_IDS,He as UiLockCollisionError,Yn as __getShowAllWalkStatsForTesting,b as __resetShowAllWalkStatsForTesting,fa as acquireProcessLock,ma as acquireServerLock,q as acquireUiLock,Ci as applyAgentMarkdownWrite,kt as applyExternalChange,_t as applySeed,j as assertCompatibleStateManifest,$n as assertGitAvailable,be as assertNeverDiskEvent,Pe as attachAcpThreadSocket,On as attachIdleShutdown,Qr as bootServer,qt as buildAndOpenSkill,Qt as buildConfigYmlContent,Dt as buildExecResult,B as buildIngressPolicy,Vn as buildOkMcpStdioCommand,mi as buildSkillZip,jt as buildStarterFolderFrontmatterYaml,cr as buildWipTree,Jn as bundleSkillMdPath,Lr as canonicalProjectKey,Xe as classifyEvents,Vi as classifyFsPath,rn as clearAllEmbeddingsKeys,jn as clearContributors,Et as coercePackId,o as colorFromSeed,Ar as commitUpstreamImport,Fn as commitWip,Wt as commitWipFromTree,Xr as compareSemver,Ee as composeEffectiveLinterConfig,je as composeFrontmatterSchemasConfig,Ge as containsConflictMarkers,wi as contentHash,Tn as contributorCount,Re as countShadowObjects,U as countStaleAgentWipRefs,re as countWipRefs,Wn as createApiExtension,H as createAssetServeMiddleware,J as createCollaborationHost,Z as createContentFilter,ge as createContentFilterAsync,Qn as createEmbeddingsSecretStore,Pn as createEphemeralProjectDir,wt as createExternalChangeHandler,vn as createFileLogger,Si as createLiveDerivedIndexExtension,wr as createMcpHttpHandler,mn as createOsProbe,Oe as createPersistenceExtension,T as createServer,Bn as createServerObserverExtension,dt as createStreamingErrorWriter,Qi as createTestLogger,Yr as describeStoredEmbeddingsKey,Cn as detectClaudeDesktopPresence,dn as detectGit,Ne as detectProjectShape,_r as detectUserSkillHosts,Pr as discoverLockDirs,oe as discoverMarkdownlintConfig,Kt as emitPreflightFailureSpan,St as encodeDocName,Mt as encodeFolderRoute,Ue as encodeSkillRoute,qr as ensureProjectGit,pi as ensureProjectSkillGitignore,yt as errorResponse,C as evictStaleTrackerEntries,De as extractHeadings,zn as extractOkBinaryPath,Rn as extractWikiLinksFromMarkdown,xn as fallbackPaths,cn as findEnclosingGitRoot,G as findEnclosingProjectRoot,xe as findNativeMarkdownlintFile,yr as flushFileLogger,hi as formatAuthRejectionWire,zt as formatContributors,ei as formatContributorsFrom,Ei as formatPackRationale,mr as gcCheckpointRefs,Kr as getCurrentMcpLogger,P as getIngressContext,tt as getLocalDir,nr as getLogFilePath,$i as getLogger,kn as getLogsDir,ia as getMachineId,Ki as getMeter,br as getMetrics,ji as getTracer,rr as handleCollabSocketError,de as handleSpawnCursor,Fe as hasForwardingHeaders,ve as hasGcLogLatch,l as iconFromClientName,An as incrementCollabSocketFilteredError,wn as incrementServerObserverFire,nt as initContent,Ir as initShadowRepo,Gi as initTelemetry,Yt as initToleranceTelemetryWriter,tr as installJsonSchemaDialect,Br as installPrettyZodErrors,Xi as installTestLoggers,zr as installUserSkill,Be as isAllowedApiOrigin,Te as isAllowedWorkspaceHostHeader,Tr as isConfigDoc,it as isHocuspocusAuthRejectionReason,qn as isHostAdmitted,It as isKnownPackId,le as isLinkIndexExcludedDoc,Ae as isLoopbackAddress,Ot as isManagedArtifactDoc,v as isOriginAdmitted,u as isOrphanMode,ht as isPairedWriteOrigin,At as isPathWithinDir,Hn as isPeerAdmitted,ra as isProcessAlive,ae as isProjectRoot,Ct as isReservedForUserTree,gt as isSelfWrite,Nt as isSystemDoc,ui as isToleranceTelemetryEnabled,na as isValidLockPid,te as lastKnownHash,nn as listRescueCheckpoints,qe as listStarterPacks,ai as loadCustomAgents,Ce as loadPrincipal,ba as lockBaseUrl,ca as lockFilePath,qi as loggerFactory,Zi as logsCurrentPath,ta as logsPreviousPath,un as makeLazyEmbeddingsKeyStore,_a as markServerLockDraining,vt as mountMcpAndApi,Ri as normalizeFsPath,y as originGitHubHost,O as packageVersionMajorMinor,A as parseAuthRejectionWire,Sr as parseGitVersion,li as parseHocuspocusAuthToken,pe as parseKeepaliveConnectionId,ft as pathToDocName,w as planSeed,Ut as prepareSingleFileOpen,Jt as processCommand,vr as processUsage,Zr as readAllTargets,fn as readBundleDecision,Ze as readOwnNativeRules,ga as readProcessLock,pa as readProcessLockDetailed,x as readProjectHeadState,Gt as readProjectLocalSemanticConfig,da as readServerLock,Sn as readServerPackageVersion,Cr as readSkillInstallStateSnapshot,Gn as readStateManifest,or as readTargetRecordedAt,Nn as readTargetVersion,se as readUiLock,p as reconcile,vi as recordContributor,$t as recordSkillInstallEvent,ce as registerAllTools,bt as registerWrite,ua as releaseProcessLock,aa as releaseServerLock,Se as releaseUiLock,X as removeLastKnownHash,er as reportSkillInstall,Rt as resetMetrics,on as resolveBuiltinSkillHosts,i as resolveBundleEnabled,rt as resolveBundledSkillDir,D as resolveContentDir,Tt as resolveCursorBinaryDefault,Ft as resolveCursorSpawnInvocation,Ve as resolveEffectiveLinterConfig,ir as resolveEmbeddingsCredential,oi as resolveLockDir,K as resolveNativeConfigForDoc,Ti as resolveNativeMarkdownlintConfig,h as resolvePack,Fr as resolvePackageVersion,ni as resolveSkillInstallReportSettings,d as resolveUiInfo,Zt as restoreContributors,gi as restoreLifecycleFromConflictsJson,jr as rewriteMarkdownLinksForDocumentRename,In as rewriteWikiLinksForDocumentRename,ar as runAuthReposSubprocess,Mn as runAuthStatusSubprocess,ur as runCloneSubprocess,En as runDeviceFlowSubprocess,fr as runWithMcpLogger,lr as safeContentPath,Me as safeSubdir,Zn as safetyCheckpoint,ke as sanitizeClientName,Jr as saveInMemoryCheckpoint,ln as saveVersion,lt as seedBasenameIndex,pr as serializeError,Di as setActiveSpanAttributes,ee as setupServerObservers,yn as shadowGit,Wi as shutdownTelemetry,Ji as spansCurrentPath,Yi as spansPreviousPath,Ke as spawnDetached,gn as splitMarkdownBlocks,he as startWatcher,Y as streamingProblemEvent,fi as swapContributors,$e as teardownToleranceTelemetryWriter,Xt as toBroadcasterKey,Fi as tracedAppendFileSync,Bi as tracedLinkSync,Mi as tracedMkdir,Ii as tracedMkdirSync,Hi as tracedRename,Ni as tracedRenameSync,zi as tracedRmSync,Li as tracedRmdirSync,Pi as tracedUnlinkSync,Ai as tracedWriteFile,Ui as tracedWriteFileSync,ii as trustSystemCertificates,tn as untrackTrackedProjectSkillProjection,Er as updateLastKnownHash,la as updateProcessLockPort,ha as updateServerLockPort,Qe as updateUiLockPort,di as validateAgentId,Mr as validateCloneInputs,k as validateSkillZip,va as waitForServerLockDrain,Ur as withHiddenWindowsConsole,ki as withSpan,Oi as withSpanSync,Dn as writeBundleDecision,Un as writeMarkdownlintRule,si as writeRootGitignoreForNewRepo,g as writeStateManifest,Vt as writeTargetVersion,ue as writeTracker};
|
|
1
|
+
import{B as e,Cc as t,Fs as n,Ls as r,W as i,_s as a,g as o,ms as s,qs as c,v as l,vs as u}from"./src-BxdlvOrw.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Bt as w,C as T,Ca as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Da as M,Di as N,Dn as P,Dr as F,Dt as I,E as L,Ea as R,Ei as z,En as B,Er as V,Et as H,F as U,Fi as W,Fn as G,Fr as K,Ft as q,G as J,Gi as Y,Gn as X,Gr as Z,Gt as Q,H as $,Hi as ee,Hn as te,Ht as ne,I as re,Ii as ie,In as ae,Ir as oe,It as se,J as ce,Ji as le,Jn as ue,Jr as de,Jt as fe,K as pe,Ki as me,Kn as he,Kr as ge,Kt as _e,L as ve,Li as ye,Ln as be,Lr as xe,Lt as Se,M as Ce,Mi as we,Mn as Te,Mr as Ee,Mt as De,N as Oe,Ni as ke,Nn as Ae,Nr as je,Nt as Me,O as Ne,Oi as Pe,On as Fe,Or as Ie,Ot as Le,P as Re,Pi as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qi as We,Qn as Ge,Qr as Ke,Qt as qe,R as Je,Ri as Ye,Rn as Xe,Rr as Ze,Rt as Qe,S as $e,Sa as et,Si as tt,Sn as nt,Sr as rt,St as it,T as at,Ta as ot,Tn as st,Tr as ct,Tt as lt,U as ut,Ui as dt,Un as ft,Ut as pt,V as mt,Vi as ht,Vn as gt,Vt as _t,W as vt,Wi as yt,Wn as bt,Wt as xt,X as St,Xi as Ct,Xn as wt,Xr as Tt,Xt as Et,Y as Dt,Yi as Ot,Yn as kt,Yr as At,Yt as jt,Z as Mt,Zi as Nt,Zn as Pt,Zr as Ft,Zt as It,_ as Lt,_a as Rt,_i as zt,_n as Bt,_r as Vt,_t as Ht,a as Ut,aa as Wt,ai as Gt,an as Kt,ar as qt,at as Jt,b as Yt,ba as Xt,bi as Zt,bn as Qt,br as $t,bt as en,c as tn,ca as nn,ci as rn,cn as an,cr as on,ct as sn,d as cn,da as ln,di as un,dn,dr as fn,ea as pn,ei as mn,en as hn,er as gn,et as _n,f as vn,fa as yn,fi as bn,fn as xn,fr as Sn,g as Cn,ga as wn,gi as Tn,gn as En,gr as Dn,gt as On,h as kn,ha as An,hi as jn,hn as Mn,hr as Nn,i as Pn,ia as Fn,ii as In,in as Ln,ir as Rn,it as zn,j as Bn,ji as Vn,jn as Hn,jr as Un,jt as Wn,k as Gn,ki as Kn,kn as qn,kr as Jn,kt as Yn,l as Xn,la as Zn,li as Qn,ln as $n,lr as er,lt as tr,m as nr,ma as rr,mi as ir,mn as ar,mr as or,n as sr,na as cr,ni as lr,nn as ur,nr as dr,nt as fr,o as pr,oa as mr,oi as hr,on as gr,or as _r,ot as vr,p as yr,pa as br,pi as xr,pn as Sr,pr as Cr,q as wr,qi as Tr,qn as Er,qr as Dr,qt as Or,r as kr,ra as Ar,ri as jr,rn as Mr,rr as Nr,rt as Pr,s as Fr,sa as Ir,si as Lr,sn as Rr,sr as zr,st as Br,t as Vr,ta as Hr,ti as Ur,tn as Wr,tr as Gr,tt as Kr,u as qr,ua as Jr,ui as Yr,un as Xr,ur as Zr,v as Qr,va as $r,vi as ei,vn as ti,vr as ni,vt as ri,w as ii,wa as ai,wi as oi,wn as si,wr as ci,wt as li,x as ui,xa as di,xi as fi,xn as pi,xr as mi,xt as hi,y as gi,ya as _i,yi as vi,yn as yi,yr as bi,yt as xi,z as Si,zi as Ci,zn as wi,zr as Ti,zt as Ei}from"./src-DJejT6Wt.mjs";import{C as Di,E as Oi,T as ki,_ as Ai,b as ji,c as Mi,d as Ni,g as Pi,i as Fi,l as Ii,m as Li,n as Ri,p as zi,s as Bi,t as Vi,u as Hi,v as Ui,w as Wi,x as Gi,y as Ki}from"./fs-traced-CJ0NSnI0.mjs";import{a as qi,d as Ji,f as Yi,i as Xi,l as Zi,n as Qi,r as $i,t as ea,u as ta}from"./logger-DFxEUjvj.mjs";import{C as na,S as ra,_ as ia,a as aa,b as oa,c as sa,d as ca,g as la,h as ua,i as da,l as fa,m as pa,n as ma,o as ha,p as ga,r as _a,s as va,t as ya,u as ba,x as xa}from"./server-lock-BmwIVWMl.mjs";export{$r as AGENT_ID_MAX_LEN,_i as AGENT_ID_RE,ze as AGENT_WRITE_ORIGIN,ot as AcpPermissionStore,et as AcpRegistry,Kn as AcpThreadManager,N as AgentFocusBroadcaster,z as AgentPresenceBroadcaster,W as AgentSessionCapacityError,ie as AgentSessionManager,Ht as AutoStartDisabledError,ci as BUNDLE_IDS,ct as BUNDLE_SCOPE,V as BUNDLE_SKILL_NAME,Nr as BacklinkIndex,me as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Bt as CONFIG_FILENAME,Pt as CONFLICT_MARKER_RE,Dr as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Lt as ConfigSchema,We as DEFAULT_CHECKPOINT_RETENTION,bn as DEFAULT_EMBEDDINGS_DIMENSIONS,ne as DEFAULT_PACK_ID,mt as DocumentDurabilityState,xr as EMBEDDINGS_API_KEY_ENV,st as ExposureConsentError,E as FEATURED_AGENT_IDS,f as FILE_SYSTEM_WRITER,Gr as FILE_WATCHER_ORIGIN,hr as FileEmbeddingsBackend,Ln as GIT_PREFLIGHT_FAIL_SPAN_NAME,pn as GIT_UPSTREAM_WRITER,R as GitDirAccessError,gr as GitNotAvailableError,Rr as GitTooOldError,ri as HOCUSPOCUS_AUTH_REJECTION_REASONS,xi as HocuspocusAuthRejection,en as HocuspocusAuthTokenSchema,m as INSTALLED_AGENTS_SCHEMES,sn as JSON_SCHEMA_DIALECT_2020_12,n as LINEAGE_EPOCH_KEY,Je as LIVE_DERIVED_INDEX_DEBOUNCE_MS,pt as LOG_MD_TEMPLATE,I as MANAGED_RENAME_ORIGIN,_ as MAX_ACP_THREADS,ye as MAX_AGENT_SESSIONS,we as MCP_CONNECTION_ID_HEADER,s as MCP_SERVER_NAME,Ye as MIN_EVICTABLE_IDLE_MS,an as MIN_GIT_VERSION,$ as MISSING_OK_CONFIG_MESSAGE,M as MalformedGitPointerError,_n as McpLogger,ut as MissingOkConfigError,S as OBSERVER_SYNC_ORIGIN,ti as OK_OKIGNORE_TEMPLATE,F as ONBOARDING_BUNDLE_IDS,a as ORPHAN_MODES,t as PROTOCOL_VERSION,ea as PinoLogger,sa as ProcessLockCollisionError,Xn as ProjectGitInitError,Le as ROLLBACK_ORIGIN,yi as ROOT_GITIGNORE_TEMPLATE,oa as RUNTIME_VERSION,Hr as SERVICE_WRITER,bi as SKILL_INSTALL_EVENTS_FILE_REL,e as SKILL_STATE_TARGETS,xt as STARTER_FOLDERS,Q as STARTER_FOLDER_FRONTMATTER_FILENAME,_e as STARTER_PACKS,Or as STARTER_PACK_IDS,fe as STARTER_TEMPLATES,at as STATE_MANIFEST_FILENAME,xa as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,hn as SeedPrerequisiteError,Wr as SeedRootDirError,ya as ServerLockCollisionError,Vr as SingleFileNotAFileError,sr as SingleFileNotFoundError,kr as SingleFileNotMarkdownError,L as StateManifestError,dr as TagIndex,Ie as USER_GLOBAL_BUNDLE_IDS,He as UiLockCollisionError,Yn as __getShowAllWalkStatsForTesting,b as __resetShowAllWalkStatsForTesting,fa as acquireProcessLock,ma as acquireServerLock,q as acquireUiLock,Ci as applyAgentMarkdownWrite,kt as applyExternalChange,_t as applySeed,j as assertCompatibleStateManifest,$n as assertGitAvailable,be as assertNeverDiskEvent,Pe as attachAcpThreadSocket,On as attachIdleShutdown,Qr as bootServer,qt as buildAndOpenSkill,Qt as buildConfigYmlContent,Dt as buildExecResult,B as buildIngressPolicy,Vn as buildOkMcpStdioCommand,mi as buildSkillZip,jt as buildStarterFolderFrontmatterYaml,cr as buildWipTree,Jn as bundleSkillMdPath,Lr as canonicalProjectKey,Xe as classifyEvents,Vi as classifyFsPath,rn as clearAllEmbeddingsKeys,jn as clearContributors,Et as coercePackId,o as colorFromSeed,Ar as commitUpstreamImport,Fn as commitWip,Wt as commitWipFromTree,Xr as compareSemver,Ee as composeEffectiveLinterConfig,je as composeFrontmatterSchemasConfig,Ge as containsConflictMarkers,wi as contentHash,Tn as contributorCount,Re as countShadowObjects,U as countStaleAgentWipRefs,re as countWipRefs,Wn as createApiExtension,H as createAssetServeMiddleware,J as createCollaborationHost,Z as createContentFilter,ge as createContentFilterAsync,Qn as createEmbeddingsSecretStore,Pn as createEphemeralProjectDir,wt as createExternalChangeHandler,vn as createFileLogger,Si as createLiveDerivedIndexExtension,wr as createMcpHttpHandler,mn as createOsProbe,Oe as createPersistenceExtension,T as createServer,Bn as createServerObserverExtension,dt as createStreamingErrorWriter,Qi as createTestLogger,Yr as describeStoredEmbeddingsKey,Cn as detectClaudeDesktopPresence,dn as detectGit,Ne as detectProjectShape,_r as detectUserSkillHosts,Pr as discoverLockDirs,oe as discoverMarkdownlintConfig,Kt as emitPreflightFailureSpan,St as encodeDocName,Mt as encodeFolderRoute,Ue as encodeSkillRoute,qr as ensureProjectGit,pi as ensureProjectSkillGitignore,yt as errorResponse,C as evictStaleTrackerEntries,De as extractHeadings,zn as extractOkBinaryPath,Rn as extractWikiLinksFromMarkdown,xn as fallbackPaths,cn as findEnclosingGitRoot,G as findEnclosingProjectRoot,xe as findNativeMarkdownlintFile,yr as flushFileLogger,hi as formatAuthRejectionWire,zt as formatContributors,ei as formatContributorsFrom,Ei as formatPackRationale,mr as gcCheckpointRefs,Kr as getCurrentMcpLogger,P as getIngressContext,tt as getLocalDir,nr as getLogFilePath,$i as getLogger,kn as getLogsDir,ia as getMachineId,Ki as getMeter,br as getMetrics,ji as getTracer,rr as handleCollabSocketError,de as handleSpawnCursor,Fe as hasForwardingHeaders,ve as hasGcLogLatch,l as iconFromClientName,An as incrementCollabSocketFilteredError,wn as incrementServerObserverFire,nt as initContent,Ir as initShadowRepo,Gi as initTelemetry,Yt as initToleranceTelemetryWriter,tr as installJsonSchemaDialect,Br as installPrettyZodErrors,Xi as installTestLoggers,zr as installUserSkill,Be as isAllowedApiOrigin,Te as isAllowedWorkspaceHostHeader,Tr as isConfigDoc,it as isHocuspocusAuthRejectionReason,qn as isHostAdmitted,It as isKnownPackId,le as isLinkIndexExcludedDoc,Ae as isLoopbackAddress,Ot as isManagedArtifactDoc,v as isOriginAdmitted,u as isOrphanMode,ht as isPairedWriteOrigin,At as isPathWithinDir,Hn as isPeerAdmitted,ra as isProcessAlive,ae as isProjectRoot,Ct as isReservedForUserTree,gt as isSelfWrite,Nt as isSystemDoc,ui as isToleranceTelemetryEnabled,na as isValidLockPid,te as lastKnownHash,nn as listRescueCheckpoints,qe as listStarterPacks,ai as loadCustomAgents,Ce as loadPrincipal,ba as lockBaseUrl,ca as lockFilePath,qi as loggerFactory,Zi as logsCurrentPath,ta as logsPreviousPath,un as makeLazyEmbeddingsKeyStore,_a as markServerLockDraining,vt as mountMcpAndApi,Ri as normalizeFsPath,y as originGitHubHost,O as packageVersionMajorMinor,A as parseAuthRejectionWire,Sr as parseGitVersion,li as parseHocuspocusAuthToken,pe as parseKeepaliveConnectionId,ft as pathToDocName,w as planSeed,Ut as prepareSingleFileOpen,Jt as processCommand,vr as processUsage,Zr as readAllTargets,fn as readBundleDecision,Ze as readOwnNativeRules,ga as readProcessLock,pa as readProcessLockDetailed,x as readProjectHeadState,Gt as readProjectLocalSemanticConfig,da as readServerLock,Sn as readServerPackageVersion,Cr as readSkillInstallStateSnapshot,Gn as readStateManifest,or as readTargetRecordedAt,Nn as readTargetVersion,se as readUiLock,p as reconcile,vi as recordContributor,$t as recordSkillInstallEvent,ce as registerAllTools,bt as registerWrite,ua as releaseProcessLock,aa as releaseServerLock,Se as releaseUiLock,X as removeLastKnownHash,er as reportSkillInstall,Rt as resetMetrics,on as resolveBuiltinSkillHosts,i as resolveBundleEnabled,rt as resolveBundledSkillDir,D as resolveContentDir,Tt as resolveCursorBinaryDefault,Ft as resolveCursorSpawnInvocation,Ve as resolveEffectiveLinterConfig,ir as resolveEmbeddingsCredential,oi as resolveLockDir,K as resolveNativeConfigForDoc,Ti as resolveNativeMarkdownlintConfig,h as resolvePack,Fr as resolvePackageVersion,ni as resolveSkillInstallReportSettings,d as resolveUiInfo,Zt as restoreContributors,gi as restoreLifecycleFromConflictsJson,jr as rewriteMarkdownLinksForDocumentRename,In as rewriteWikiLinksForDocumentRename,ar as runAuthReposSubprocess,Mn as runAuthStatusSubprocess,ur as runCloneSubprocess,En as runDeviceFlowSubprocess,fr as runWithMcpLogger,lr as safeContentPath,Me as safeSubdir,Zn as safetyCheckpoint,ke as sanitizeClientName,Jr as saveInMemoryCheckpoint,ln as saveVersion,lt as seedBasenameIndex,pr as serializeError,Di as setActiveSpanAttributes,ee as setupServerObservers,yn as shadowGit,Wi as shutdownTelemetry,Ji as spansCurrentPath,Yi as spansPreviousPath,Ke as spawnDetached,gn as splitMarkdownBlocks,he as startWatcher,Y as streamingProblemEvent,fi as swapContributors,$e as teardownToleranceTelemetryWriter,Xt as toBroadcasterKey,Fi as tracedAppendFileSync,Bi as tracedLinkSync,Mi as tracedMkdir,Ii as tracedMkdirSync,Hi as tracedRename,Ni as tracedRenameSync,zi as tracedRmSync,Li as tracedRmdirSync,Pi as tracedUnlinkSync,Ai as tracedWriteFile,Ui as tracedWriteFileSync,ii as trustSystemCertificates,tn as untrackTrackedProjectSkillProjection,Er as updateLastKnownHash,la as updateProcessLockPort,ha as updateServerLockPort,Qe as updateUiLockPort,di as validateAgentId,Mr as validateCloneInputs,k as validateSkillZip,va as waitForServerLockDrain,Ur as withHiddenWindowsConsole,ki as withSpan,Oi as withSpanSync,Dn as writeBundleDecision,Un as writeMarkdownlintRule,si as writeRootGitignoreForNewRepo,g as writeStateManifest,Vt as writeTargetVersion,ue as writeTracker};
|