@inkeep/open-knowledge 0.39.0-beta.4 → 0.39.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.
Files changed (63) hide show
  1. package/dist/{acp-harness-probe-Bun7bZox.mjs → acp-harness-probe-mVKWn2zY.mjs} +2 -2
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +1 -1
  4. package/dist/assets/skills/write-skill/SKILL.md +1 -1
  5. package/dist/cli.mjs +7 -7
  6. package/dist/constants-CuBfdn-q.mjs +2 -0
  7. package/dist/index.mjs +1 -1
  8. package/dist/init-C69gTqZY.mjs +1 -0
  9. package/dist/{init-BYlWtfT3.mjs → init-D_QACiH9.mjs} +3 -3
  10. package/dist/{launch-json-removal-DVEMBV0w.mjs → launch-json-removal-Yn1xs7X6.mjs} +2 -2
  11. package/dist/loader-BOLcXOpu.mjs +1 -0
  12. package/dist/{loader-JYGWtw5V.mjs → loader-BZOq--JN.mjs} +2 -2
  13. package/dist/{open-browser-CB6y-11T.mjs → open-browser-f7NgugNK.mjs} +2 -2
  14. package/dist/preview-Bzf9KjU0.mjs +1 -0
  15. package/dist/{preview-BHePDzDX.mjs → preview-D1bROKcs.mjs} +2 -2
  16. package/dist/public/assets/{ActivityModeContent-C16xzhnU.js → ActivityModeContent-WwD7nxKV.js} +1 -1
  17. package/dist/public/assets/{AgentDiffPane-uQ_jhHv3.js → AgentDiffPane-D7FSU_o0.js} +1 -1
  18. package/dist/public/assets/{CodeMirrorPropInput-ufSDtUVB.js → CodeMirrorPropInput-CDbpiMbE.js} +1 -1
  19. package/dist/public/assets/{DocumentContext-CW-upTbE.js → DocumentContext-CsyXsdHX.js} +1 -1
  20. package/dist/public/assets/{EnableSyncConfirmDialog-FWi5GxN5.js → EnableSyncConfirmDialog-DrdR2SD-.js} +1 -1
  21. package/dist/public/assets/{FeedbackForm-CTUqHrB3.js → FeedbackForm-Cs-qqR18.js} +1 -1
  22. package/dist/public/assets/{ManagedArtifactProperties-unR-MMXH.js → ManagedArtifactProperties-Bwre7RSv.js} +1 -1
  23. package/dist/public/assets/{MermaidDocEditor-D3vxfBbK.js → MermaidDocEditor-BbcdNZPM.js} +1 -1
  24. package/dist/public/assets/{PropertyPanel-E5o87cnX.js → PropertyPanel-COHlq2UM.js} +1 -1
  25. package/dist/public/assets/{SettingsDialogBody-Cp6WbByo.js → SettingsDialogBody-CZEy4yrr.js} +1 -1
  26. package/dist/public/assets/{ShareReceiveMissDialog-C2H6ndKk.js → ShareReceiveMissDialog-C9f31NFe.js} +1 -1
  27. package/dist/public/assets/{SourceEditor-R2mXCrh_.js → SourceEditor-8HGI09np.js} +1 -1
  28. package/dist/public/assets/{TerminalSessionsHost-B1jWnsIf.js → TerminalSessionsHost-Cfy2nrju.js} +2 -2
  29. package/dist/public/assets/{TerminalWindowApp-DOrXb7xt.js → TerminalWindowApp-CId1PS7d.js} +1 -1
  30. package/dist/public/assets/{ThreadView-CpND1HBw.js → ThreadView-D_rpxI0C.js} +1 -1
  31. package/dist/public/assets/{TimelineDiffPane-CzKjZbR4.js → TimelineDiffPane-bGZvj-YH.js} +1 -1
  32. package/dist/public/assets/{auth-state-cache-BjvJOU9Y.js → auth-state-cache-CFut20ab.js} +1 -1
  33. package/dist/public/assets/{client-version-Bnwkfa5Z.js → client-version-CLPm8_AV.js} +1 -1
  34. package/dist/public/assets/{config-provider-B9YGwxSn.js → config-provider-BTfdRpGo.js} +1 -1
  35. package/dist/public/assets/{dist-CXCa-Cti.js → dist-DcKGYW3b.js} +1 -1
  36. package/dist/public/assets/{index-HtxJOtEY.js → index-CWsvQ50b.js} +8 -8
  37. package/dist/public/assets/{pending-receive-nav-store-N7EQjZ6C.js → pending-receive-nav-store-DzOvxaOh.js} +1 -1
  38. package/dist/public/assets/{selection-context-CJ98XEP0.js → selection-context-B_6BJ8Di.js} +1 -1
  39. package/dist/public/assets/{src-BRv4Bv4N.js → src-DAnfIF0x.js} +1 -1
  40. package/dist/public/assets/{telemetry-impl-CVh9Cl5K.js → telemetry-impl-Dk81FUCX.js} +1 -1
  41. package/dist/public/assets/{telemetry-startup-BhFiIILp.js → telemetry-startup-1L_-YFXP.js} +1 -1
  42. package/dist/public/assets/{typing-burst-detector-CE612bZJ.js → typing-burst-detector-BxkPMT-n.js} +1 -1
  43. package/dist/public/assets/{use-activity-panel-Cb2gml2G.js → use-activity-panel-2Ha9Ijb1.js} +1 -1
  44. package/dist/public/assets/{use-terminal-enabled-BrSWg_ox.js → use-terminal-enabled-Bps4HJlk.js} +1 -1
  45. package/dist/public/assets/{use-timeline-entry-diff-C1k3sj4_.js → use-timeline-entry-diff-BEF0Xmt7.js} +1 -1
  46. package/dist/public/index.html +12 -12
  47. package/dist/{repair-launch-json-B3GSL_S6.mjs → repair-launch-json-Dhm2vZAj.mjs} +2 -2
  48. package/dist/{repair-mcp-configs-DmACbm3w.mjs → repair-mcp-configs-DYMJlcTV.mjs} +2 -2
  49. package/dist/repair-skills-B8sCkCSw.mjs +1 -0
  50. package/dist/{repair-skills-Cl1Ip2xg.mjs → repair-skills-DnkpKCSB.mjs} +2 -2
  51. package/dist/{src-DnfRngUF.mjs → src-DKa-TnuV.mjs} +1 -1
  52. package/dist/{src-Di1OsFoS.mjs → src-DO_fYaAw.mjs} +291 -291
  53. package/dist/{src-B6NlC6oi.mjs → src-LN14xlR9.mjs} +2 -2
  54. package/dist/start-B47u9XJA.mjs +1 -0
  55. package/dist/{start-DLAVWYtj.mjs → start-DdOtnXz9.mjs} +2 -2
  56. package/dist/{write-project-skill-CFRmQkUP.mjs → write-project-skill-gbFVJJ2C.mjs} +2 -2
  57. package/package.json +4 -4
  58. package/dist/constants-CdWq5GKk.mjs +0 -2
  59. package/dist/init-CbpoKwQL.mjs +0 -1
  60. package/dist/loader-C4u6kxAl.mjs +0 -1
  61. package/dist/preview-RoJWsuTR.mjs +0 -1
  62. package/dist/repair-skills-BMGUyydL.mjs +0 -1
  63. package/dist/start-BCnH8sOB.mjs +0 -1
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{n as t}from"./DocumentContext-CW-upTbE.js";import{t as n}from"./react-JNybMug3.js";import{t as r}from"./compiler-runtime-dQcBxOhn.js";import{B as i}from"./CodeMirrorPropInput-ufSDtUVB.js";import{a,gt as o,i as s}from"./dist-df-v6kvy.js";import{o as c}from"./documents-events-BHJB8gGz.js";import{n as l}from"./agent-presence-DdJtLtJ1.js";import{t as u}from"./lru-string-cache-D19dwCKJ.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new i(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=o.safeParse(r);throw e.success?Error(e.data.title):new i(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=s.safeParse(r);if(!a.success)throw new i(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,s=await fetch(r),c;try{c=await s.json()}catch(e){throw new i(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:s.status})}if(!s.ok){let e=o.safeParse(c);throw e.success?Error(e.data.title):new i(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:s.status})}let l=a.safeParse(c);if(!l.success)throw new i(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:s.status});let{diff:u,before:d,after:f}=l.data;return{diff:u,before:d,after:f}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;s(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),s(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),s(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),s(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=c(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
1
+ import{i as e}from"./chunk-DseTPa7n.js";import{n as t}from"./DocumentContext-CsyXsdHX.js";import{t as n}from"./react-JNybMug3.js";import{t as r}from"./compiler-runtime-dQcBxOhn.js";import{B as i}from"./CodeMirrorPropInput-CDbpiMbE.js";import{a,gt as o,i as s}from"./dist-df-v6kvy.js";import{o as c}from"./documents-events-BHJB8gGz.js";import{n as l}from"./agent-presence-DdJtLtJ1.js";import{t as u}from"./lru-string-cache-D19dwCKJ.js";var d=r(),f=e(n(),1),p=500,m=64;async function h(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t),r;try{r=await n.json()}catch(e){throw new i(`Could not parse /api/agent-activity response.`,{cause:e,status:n.status})}if(!n.ok){let e=o.safeParse(r);throw e.success?Error(e.data.title):new i(`/api/agent-activity returned a non-RFC-9457 error response.`,{cause:e.error,status:n.status})}let a=s.safeParse(r);if(!a.success)throw new i(`/api/agent-activity returned a body that did not match AgentActivitySuccessSchema.`,{cause:a.error,status:n.status});return a.data}async function g(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&keptCount=${n}`,s=await fetch(r),c;try{c=await s.json()}catch(e){throw new i(`Could not parse /api/agent-burst-diff response.`,{cause:e,status:s.status})}if(!s.ok){let e=o.safeParse(c);throw e.success?Error(e.data.title):new i(`/api/agent-burst-diff returned a non-RFC-9457 error response.`,{cause:e.error,status:s.status})}let l=a.safeParse(c);if(!l.success)throw new i(`/api/agent-burst-diff returned a body that did not match AgentBurstDiffSuccessSchema.`,{cause:l.error,status:s.status});let{diff:u,before:d,after:f}=l.data;return{diff:u,before:d,after:f}}function _(e){let n=(0,d.c)(23),{systemProvider:r}=t(),[i,a]=(0,f.useState)(null),[o,s]=(0,f.useState)(`idle`),[l,_]=(0,f.useState)(null),b;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(b=new u(m),n[0]=b):b=n[0];let x=(0,f.useRef)(b),S=(0,f.useRef)(0),C;n[1]===r?C=n[2]:(C=e=>{let t=S.current+=1;s(`loading`),_(null),h(e).then(n=>{if(S.current!==t)return;let i=y(r,e);a({...n,writingDocs:i}),s(`ready`)}).catch(e=>{S.current===t&&(_(e instanceof Error?e.message:String(e)),s(`error`))})},n[1]=r,n[2]=C);let w=C,T;n[3]!==e||n[4]!==w?(T=()=>{if(!e){S.current+=1,a(null),s(`idle`),_(null),x.current.clear();return}x.current.clear(),w(e);let t=null,n=c(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,w(e)},p))});return()=>{t&&clearTimeout(t),n()}},n[3]=e,n[4]=w,n[5]=T):T=n[5];let E;n[6]===e?E=n[7]:(E=[e],n[6]=e,n[7]=E),(0,f.useEffect)(T,E);let D,O;n[8]!==e||n[9]!==r?(D=()=>{if(!e||!r)return;let t=()=>{if(!r.awareness)return;let t=y(r,e);a(e=>!e||v(e.writingDocs,t)?e:{...e,writingDocs:t})},n=r.awareness;if(!n||typeof n.on!=`function`){t();return}n.on(`update`,t),t();let i=setInterval(t,1e3);return()=>{clearInterval(i),typeof n.off==`function`&&n.off(`update`,t)}},O=[e,r],n[8]=e,n[9]=r,n[10]=D,n[11]=O):(D=n[10],O=n[11]),(0,f.useEffect)(D,O);let k;n[12]===e?k=n[13]:(k=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=x.current.get(r);if(i!==void 0)return i;let{diff:a}=await g(e,t,n);return x.current.set(r,a),a},n[12]=e,n[13]=k);let A=k,j;n[14]!==e||n[15]!==w?(j=()=>{e&&w(e)},n[14]=e,n[15]=w,n[16]=j):j=n[16];let M=j,N;return n[17]!==i||n[18]!==l||n[19]!==A||n[20]!==M||n[21]!==o?(N={data:i,status:o,error:l,reload:M,fetchBurstDiff:A},n[17]=i,n[18]=l,n[19]=A,n[20]=M,n[21]=o,n[22]=N):N=n[22],N}function v(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function y(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!l(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}export{_ as n,g as t};
@@ -1 +1 @@
1
- import{t as e}from"./compiler-runtime-dQcBxOhn.js";import{t}from"./terminal-telemetry-D1lMQO11.js";import{Sa as n}from"./dist-df-v6kvy.js";import"./config-provider-B9YGwxSn.js";import{n as r}from"./config-context-C5AosGyi.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
+ import{t as e}from"./compiler-runtime-dQcBxOhn.js";import{t}from"./terminal-telemetry-D1lMQO11.js";import{Sa as n}from"./dist-df-v6kvy.js";import"./config-provider-BTfdRpGo.js";import{n as r}from"./config-context-C5AosGyi.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{i as e,t}from"./chunk-DseTPa7n.js";import{t as n}from"./jsx-runtime-DyiINK0N.js";import{n as r,p as i}from"./DocumentContext-CW-upTbE.js";import{t as a}from"./react-JNybMug3.js";import{t as o}from"./react-dom-Db7zF7dM.js";import{t as s}from"./compiler-runtime-dQcBxOhn.js";import{I as c,et as l,st as u}from"./CodeMirrorPropInput-ufSDtUVB.js";import{Bi as d,Gi as f,K as p,Ki as m,Oi as h,Qi as g,Vi as _,Xi as v,Yr as y,ea as b,hi as x,na as S,ta as C}from"./dist-df-v6kvy.js";import{t as ee}from"./libesm-BUX1Jc4h.js";var w=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}()})),T=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}})),E=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=T();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}]}})),te=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=w(),r=T(),i=E(),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)}})),ne=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=w();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=te(),r=E();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)}})),D=e(a(),1),re=e(o(),1),O=s(),k=ne();function A(){}A.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(ie(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 ie(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 j=new A;function ae(e,t,n){return j.diff(e,t,n)}var M=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N=/\S/,P=new A;P.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N.test(e)&&!N.test(t)},P.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]&&M.test(t[n])&&M.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function oe(e,t,n){return P.diff(e,t,n)}var F=new A;F.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
1
+ import{i as e,t}from"./chunk-DseTPa7n.js";import{t as n}from"./jsx-runtime-DyiINK0N.js";import{n as r,p as i}from"./DocumentContext-CsyXsdHX.js";import{t as a}from"./react-JNybMug3.js";import{t as o}from"./react-dom-Db7zF7dM.js";import{t as s}from"./compiler-runtime-dQcBxOhn.js";import{I as c,et as l,st as u}from"./CodeMirrorPropInput-CDbpiMbE.js";import{Bi as d,Gi as f,K as p,Ki as m,Oi as h,Qi as g,Vi as _,Xi as v,Yr as y,ea as b,hi as x,na as S,ta as C}from"./dist-df-v6kvy.js";import{t as ee}from"./libesm-BUX1Jc4h.js";var w=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}()})),T=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}})),E=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=T();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}]}})),te=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=w(),r=T(),i=E(),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)}})),ne=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=w();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=te(),r=E();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)}})),D=e(a(),1),re=e(o(),1),O=s(),k=ne();function A(){}A.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(ie(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 ie(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 j=new A;function ae(e,t,n){return j.diff(e,t,n)}var M=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,N=/\S/,P=new A;P.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!N.test(e)&&!N.test(t)},P.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]&&M.test(t[n])&&M.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function oe(e,t,n){return P.diff(e,t,n)}var F=new A;F.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 I=new A;I.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var se=new A;se.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function L(e){"@babel/helpers - typeof";return L=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},L(e)}var ce=Object.prototype.toString,R=new A;R.useLongestToken=!0,R.tokenize=F.tokenize,R.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(z(e,null,null,i),i,` `)},R.equals=function(e,t){return A.prototype.equals.call(R,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function z(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(ce.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=z(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),L(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]=z(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var B=new A;B.tokenize=function(e){return e.slice()},B.join=B.removeEmpty=function(e){return e};function V(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 b(n,i,t.slice(n,r))}function le(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 b&&r instanceof b?V(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function H(e){let t=new C(e);return t.removeMark(0,e.nodeSize-2),t.doc}function U(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 W(e){return JSON.parse(JSON.stringify(e))}var ue=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=H(this.fromDoc).toJSON(),this.finalJSON=H(this.toDoc).toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,k.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=le(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=W(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,k.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=H(this.tr.doc).toJSON(),this.ops=(0,k.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=V(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=W(this.currentJSON),a=W(this.currentJSON);(0,k.applyPatch)(i,[n]),(0,k.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=U(this.currentJSON,e.path),u=this.wordDiffs?oe(l,c):ae(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 de(e,t,n={}){return new ue(e,t,n).init()}var G=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function K(e){let t=[];return e.forEach((e,n)=>{if(G.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 fe(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 pe(e,t){let n=fe(K(e),K(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 me=400;function q(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function he(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof v?`add`:t instanceof g?`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 ge(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=q(r,n,e),a=q(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=de(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=pe(i,o),l=s?he(s,c):[];return c.length+l.length>me?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var _e=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function ve(e){return e.changes.length+2*e.markChanges.length}function J(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function ye(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 Y(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&&ye(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=S.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(d.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(d.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(d.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=J(n.content);o.push(d.widget(e.fromB,()=>Y(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return _.create(e,o)}var xe=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),X=i.filter(e=>!xe.has(e.name)).map(e=>e.name===`jsxComponent`?p:e),Z=n(),Q=h(X);function Se(e,t){return ge(e,t,Q,c())}var Ce=x.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:_.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new f({key:new m(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function we(e){let t=(0,O.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,Q);o=u,a=!1,r=X,i=Ce.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 d;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(d={attributes:{class:`pt-4`}},t[13]=d):d=t[13];let f;t[14]!==a||t[15]!==s||t[16]!==c?(f={editable:a,extensions:s,content:c,editorProps:d},t[14]=a,t[15]=s,t[16]=c,t[17]=f):f=t[17];let p;t[18]===n?p=t[19]:(p=[n],t[18]=n,t[19]=p);let m=o(f,p),[h]=(0,D.useState)(Te),g=(0,D.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,D.useLayoutEffect)(_,v);let y;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,Z.jsx)(`div`,{className:`tiptap-editor`,children:(0,Z.jsx)(`div`,{ref:g,style:{display:`contents`}})}),t[23]=y):y=t[23];let b;t[24]===m?b=t[25]:(b=(0,Z.jsx)(l,{editor:m,className:`tiptap-editor-portal-content`}),t[24]=m,t[25]=b);let x;t[26]!==h||t[27]!==b?(x=(0,re.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,Z.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 Te(){let e=document.createElement(`div`);return e.style.display=`contents`,e}function Ee(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 De(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 Oe(e,t){return`${e}\u0000${t}`}function ke(e,t,n){let r=y(e).body,i=y(t).body;return r===i?``:ee(n,r,i,``,``,{context:Math.max(r.split(`
@@ -58,7 +58,7 @@
58
58
  -->
59
59
  <script>(() => { let t = 'system'; try { const r = localStorage.getItem('ok-theme-v1'); if (r === 'light' || r === 'dark' || r === 'system') t = r; } catch {} let ct = null; try { const c = localStorage.getItem('ok-color-theme-v1'); if (c && ['dracula', 'catppuccin-frappe', 'catppuccin-latte', 'monokai', 'gruvbox', 'solarized', 'custom'].includes(c)) ct = c; } catch {} let dark = t === 'dark'; if (t === 'system') { try { dark = window.matchMedia('(prefers-color-scheme: dark)').matches; } catch {} } let customCss = null; if (ct === 'custom') { try { const raw = localStorage.getItem('ok-custom-theme-v1'); if (raw) { const o = JSON.parse(raw); if (o?.css) { customCss = o.css; dark = !!o.dark; } } } catch {} if (!customCss) ct = null; } else if (ct) { dark = !['catppuccin-latte'].includes(ct); } if (dark) document.documentElement.classList.add('dark'); if (ct) document.documentElement.setAttribute('data-color-theme', ct); if (customCss) { const s = document.createElement('style'); s.id = 'ok-custom-theme'; s.textContent = customCss; document.head.appendChild(s); } if (window.okDesktop) { document.documentElement.classList.add('electron-mode'); document.documentElement.classList.add(`electron-platform-${window.okDesktop.platform}`); } })();</script>
60
60
  <style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
61
- <script type="module" crossorigin src="./assets/index-HtxJOtEY.js"></script>
61
+ <script type="module" crossorigin src="./assets/index-CWsvQ50b.js"></script>
62
62
  <link rel="modulepreload" crossorigin href="./assets/chunk-DseTPa7n.js">
63
63
  <link rel="modulepreload" crossorigin href="./assets/preload-helper-2ej06EnG.js">
64
64
  <link rel="modulepreload" crossorigin href="./assets/w3c-keyname-Daddi42S.js">
@@ -81,10 +81,10 @@
81
81
  <link rel="modulepreload" crossorigin href="./assets/dist-COAuqNbv.js">
82
82
  <link rel="modulepreload" crossorigin href="./assets/compiler-runtime-dQcBxOhn.js">
83
83
  <link rel="modulepreload" crossorigin href="./assets/jsx-runtime-DyiINK0N.js">
84
- <link rel="modulepreload" crossorigin href="./assets/client-version-Bnwkfa5Z.js">
84
+ <link rel="modulepreload" crossorigin href="./assets/client-version-CLPm8_AV.js">
85
85
  <link rel="modulepreload" crossorigin href="./assets/use-apply-config-color-theme-R1RZkk5a.js">
86
86
  <link rel="modulepreload" crossorigin href="./assets/config-context-C5AosGyi.js">
87
- <link rel="modulepreload" crossorigin href="./assets/config-provider-B9YGwxSn.js">
87
+ <link rel="modulepreload" crossorigin href="./assets/config-provider-BTfdRpGo.js">
88
88
  <link rel="modulepreload" crossorigin href="./assets/dist-BD3698ve.js">
89
89
  <link rel="modulepreload" crossorigin href="./assets/dist-DBENJeML.js">
90
90
  <link rel="modulepreload" crossorigin href="./assets/bundle-mjs-Dy8bHgkj.js">
@@ -98,8 +98,8 @@
98
98
  <link rel="modulepreload" crossorigin href="./assets/navigation-targets-D1rdXyAI.js">
99
99
  <link rel="modulepreload" crossorigin href="./assets/external-link-BtglP1zb.js">
100
100
  <link rel="modulepreload" crossorigin href="./assets/documents-fetch-CyAk_i-3.js">
101
- <link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-ufSDtUVB.js">
102
- <link rel="modulepreload" crossorigin href="./assets/dist-CXCa-Cti.js">
101
+ <link rel="modulepreload" crossorigin href="./assets/CodeMirrorPropInput-CDbpiMbE.js">
102
+ <link rel="modulepreload" crossorigin href="./assets/dist-DcKGYW3b.js">
103
103
  <link rel="modulepreload" crossorigin href="./assets/sortable.esm-DcjmFgta.js">
104
104
  <link rel="modulepreload" crossorigin href="./assets/index.esm-DRU91WyY.js">
105
105
  <link rel="modulepreload" crossorigin href="./assets/zod-BmQcPlGk.js">
@@ -135,14 +135,14 @@
135
135
  <link rel="modulepreload" crossorigin href="./assets/badge-BDZGi1Ks.js">
136
136
  <link rel="modulepreload" crossorigin href="./assets/input-CsXmpyZP.js">
137
137
  <link rel="modulepreload" crossorigin href="./assets/use-collab-url-B-LUA0g9.js">
138
- <link rel="modulepreload" crossorigin href="./assets/DocumentContext-CW-upTbE.js">
138
+ <link rel="modulepreload" crossorigin href="./assets/DocumentContext-CsyXsdHX.js">
139
139
  <link rel="modulepreload" crossorigin href="./assets/checkbox-Cn88M3G6.js">
140
140
  <link rel="modulepreload" crossorigin href="./assets/dist-BJxDYUHt.js">
141
141
  <link rel="modulepreload" crossorigin href="./assets/dist-Cx2QCt5k.js">
142
142
  <link rel="modulepreload" crossorigin href="./assets/dropdown-menu-CcKe8PiU.js">
143
143
  <link rel="modulepreload" crossorigin href="./assets/label-bn6BDr7p.js">
144
144
  <link rel="modulepreload" crossorigin href="./assets/radio-group-DW_ypmKx.js">
145
- <link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-FWi5GxN5.js">
145
+ <link rel="modulepreload" crossorigin href="./assets/EnableSyncConfirmDialog-DrdR2SD-.js">
146
146
  <link rel="modulepreload" crossorigin href="./assets/arrow-up-right-BKliW282.js">
147
147
  <link rel="modulepreload" crossorigin href="./assets/cursor-AolWKuZw.js">
148
148
  <link rel="modulepreload" crossorigin href="./assets/RegisteredAgentIcon--E1135hW.js">
@@ -159,14 +159,14 @@
159
159
  <link rel="modulepreload" crossorigin href="./assets/skeleton-CA6hvjst.js">
160
160
  <link rel="modulepreload" crossorigin href="./assets/textarea-DwJR-19i.js">
161
161
  <link rel="modulepreload" crossorigin href="./assets/lint-config-client-BwIg_Zty.js">
162
- <link rel="modulepreload" crossorigin href="./assets/auth-state-cache-BjvJOU9Y.js">
162
+ <link rel="modulepreload" crossorigin href="./assets/auth-state-cache-CFut20ab.js">
163
163
  <link rel="modulepreload" crossorigin href="./assets/toggle-group-CxrQL99E.js">
164
164
  <link rel="modulepreload" crossorigin href="./assets/useQuery-NsPxD6kI.js">
165
165
  <link rel="modulepreload" crossorigin href="./assets/format-Dn5VT_ew.js">
166
- <link rel="modulepreload" crossorigin href="./assets/selection-context-CJ98XEP0.js">
167
- <link rel="modulepreload" crossorigin href="./assets/PropertyPanel-E5o87cnX.js">
166
+ <link rel="modulepreload" crossorigin href="./assets/selection-context-B_6BJ8Di.js">
167
+ <link rel="modulepreload" crossorigin href="./assets/PropertyPanel-COHlq2UM.js">
168
168
  <link rel="modulepreload" crossorigin href="./assets/miss-dialog-store-81J1GwFD.js">
169
- <link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-N7EQjZ6C.js">
169
+ <link rel="modulepreload" crossorigin href="./assets/pending-receive-nav-store-DzOvxaOh.js">
170
170
  <link rel="modulepreload" crossorigin href="./assets/chevron-left-fiDaD9J4.js">
171
171
  <link rel="modulepreload" crossorigin href="./assets/terminal-launch-events-vDhBoD8w.js">
172
172
  <link rel="modulepreload" crossorigin href="./assets/panel-right-open-CBweAP43.js">
@@ -174,7 +174,7 @@
174
174
  <link rel="modulepreload" crossorigin href="./assets/timeline-diff-store-dt1fl2gd.js">
175
175
  <link rel="modulepreload" crossorigin href="./assets/wrench-BDWKT3wQ.js">
176
176
  <link rel="modulepreload" crossorigin href="./assets/panel-DLUMbyPl.js">
177
- <link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-CE612bZJ.js">
177
+ <link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-BxkPMT-n.js">
178
178
  <link rel="modulepreload" crossorigin href="./assets/project-paths-DcJ4HDNl.js">
179
179
  <link rel="modulepreload" crossorigin href="./assets/file-tree-adapter-BnZwo5Ls.js">
180
180
  <link rel="modulepreload" crossorigin href="./assets/agent-diff-store-Bd0NDaYd.js">
@@ -1,2 +1,2 @@
1
- import{t as e}from"./launch-json-removal-DVEMBV0w.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=e(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`||o.kind===`removed-file`;return s&&i({event:`launch-json-repair-removed`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
2
- //# sourceMappingURL=repair-launch-json-B3GSL_S6.mjs.map
1
+ import{t as e}from"./launch-json-removal-Yn1xs7X6.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=e(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`||o.kind===`removed-file`;return s&&i({event:`launch-json-repair-removed`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
2
+ //# sourceMappingURL=repair-launch-json-Dhm2vZAj.mjs.map
@@ -1,2 +1,2 @@
1
- import{g as e,l as t,s as n}from"./write-project-skill-CFRmQkUP.mjs";import{d as r,v as i}from"./init-BYlWtfT3.mjs";import{t as a}from"./mcp-migrate-event-CWx0WLdE.mjs";import{homedir as o}from"node:os";function s(e){let r=e.logger??u,i=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of n){let n=t[o],s=c(()=>n.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:n,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),n.projectConfigPath){let t=n.projectConfigPath,i=c(()=>t(e.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:n,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},o=r(t.target,t.cwd,t.home,t.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(e(o))return{...n,outcome:`canonical`};t.logger(a({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:o}));let s=i(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return t.logger({event:`mcp-config-repair-write-failed`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,error:e}),{...n,outcome:`write-failed`,error:e}}return s.action===`declined`?(t.logger({event:`mcp-config-repair-declined`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:s.declineReason}),{...n,outcome:`declined`}):{...n,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
2
- //# sourceMappingURL=repair-mcp-configs-DmACbm3w.mjs.map
1
+ import{g as e,l as t,s as n}from"./write-project-skill-gbFVJJ2C.mjs";import{d as r,v as i}from"./init-D_QACiH9.mjs";import{t as a}from"./mcp-migrate-event-CWx0WLdE.mjs";import{homedir as o}from"node:os";function s(e){let r=e.logger??u,i=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of n){let n=t[o],s=c(()=>n.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:n,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),n.projectConfigPath){let t=n.projectConfigPath,i=c(()=>t(e.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:n,home:void 0,cwd:e.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},o=r(t.target,t.cwd,t.home,t.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(e(o))return{...n,outcome:`canonical`};t.logger(a({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:o}));let s=i(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return t.logger({event:`mcp-config-repair-write-failed`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,error:e}),{...n,outcome:`write-failed`,error:e}}return s.action===`declined`?(t.logger({event:`mcp-config-repair-declined`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,reason:s.declineReason}),{...n,outcome:`declined`}):{...n,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
2
+ //# sourceMappingURL=repair-mcp-configs-DYMJlcTV.mjs.map
@@ -0,0 +1 @@
1
+ import{t as e}from"./repair-skills-DnkpKCSB.mjs";export{e as repairSkills};
@@ -1,3 +1,3 @@
1
- import{C as e}from"./src-FuRMJntf.mjs";import{Cr as t,Dr as n,Nr as r,Pr as i,Tr as a,br as o,kr as s,wr as c,yr as l}from"./src-Di1OsFoS.mjs";import{a as u,l as d,t as f,u as p,x as m}from"./write-project-skill-CFRmQkUP.mjs";import{dirname as h,join as g,resolve as _}from"node:path";import{existsSync as v,mkdirSync as y,readFileSync as b,readdirSync as x,rmSync as S,statSync as C,writeFileSync as w}from"node:fs";import{homedir as T}from"node:os";const E={existsSync:e=>v(e),isDirectory:e=>{try{return C(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>x(e),readFileSync:e=>b(e),writeFileSync:(e,t)=>{w(e,t)},mkdirSync:(e,t)=>{y(e,t)},rmSync:(e,t)=>{S(e,t)}},D={resolveProjectBundledSkillDir:()=>s(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>s(e,{checkDesktop:!1}),readBundledVersion:()=>o(),readRecordedVersion:e=>t(e,`cli-hosts`),writeRecordedVersion:(e,t)=>a(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>n(e),readBundleDecision:(e,t)=>l(e,t),writeBundleDecision:(e,t,n)=>c(e,t,n),removeBundleFromDisk:(e,t)=>u(e,t)};function O(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function k(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(h(t),{recursive:!0}),A(e,t,n)}function A(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=g(e,r),a=g(t,r);n.isDirectory(i)?A(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function j(e,t,n,r,i,a){let o=[],s=g(e,`.agents`,`skills`,t),c=r.existsSync(s),l=!1;try{k(n,s,r),l=!0,o.push({kind:`central`,path:s,outcome:c?`overwritten`:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:c,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`central`,path:s,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-central-failed`,scope:`user`,path:s,error:t})}for(let c of p){let l=g(e,c.hostDir),u=g(l,`skills`,t);if(u===s){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!r.existsSync(l)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-host-absent`});continue}let d=r.existsSync(u);try{k(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:d?`overwritten`:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:d,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,error:t})}}return{entries:o,centralWritten:l}}function M(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function N(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of p){let o=g(e,t.hostDir,`skills`,`open-knowledge`),s=g(o,`SKILL.md`),c=n.existsSync(s),l=d[t.editorId]?.projectConfigPath?.(e),u=!c&&M(l,n);if(!c&&!u){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{f(o,e),k(i,o,n);let s=c?`reclaimed`:`created`;a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:s}),r({event:c?`project-skill-reclaim-reclaimed`:`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 P(t,n,a,o){let s=e=>{n.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await n.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await n.readRecordedVersion(t)}catch(e){o({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of i)try{d.push({id:e,sourceDir:n.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let i of d){let s=r[i.id],c=a.existsSync(g(t,`.agents`,`skills`,s)),l=await n.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{n.removeBundleFromDisk(t,i.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:i.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:i.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await n.writeBundleDecision(t,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:i.id,error:e instanceof Error?e.message:String(e)})}p.push(i)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>a.existsSync(g(t,`.agents`,`skills`,r[e.id])));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],_=d.length===i.length,v=!0;for(let{id:e,sourceDir:n}of p){let i=j(t,r[e],n,a,o,l);h.push(...i.entries),i.centralWritten||(v=!1)}let y=h.some(e=>e.kind===`central`&&(e.outcome===`written`||e.outcome===`overwritten`));if(_&&v&&y){let e=null;try{await n.writeRecordedVersion(t,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t}of p)s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?`installed`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:l,entries:h}}async function F(e){let t=e.logger??O,n=e.fs??E,r=e.home??T(),i={...D,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:N(e.projectDir,i,n,t),user:await P(r,i,n,t)}}function I(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 L(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===`reclaimed`).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} reclaimed, ${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`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
1
+ import{C as e}from"./src-FuRMJntf.mjs";import{Cr as t,Dr as n,Nr as r,Pr as i,Tr as a,br as o,kr as s,wr as c,yr as l}from"./src-DO_fYaAw.mjs";import{a as u,l as d,t as f,u as p,x as m}from"./write-project-skill-gbFVJJ2C.mjs";import{dirname as h,join as g,resolve as _}from"node:path";import{existsSync as v,mkdirSync as y,readFileSync as b,readdirSync as x,rmSync as S,statSync as C,writeFileSync as w}from"node:fs";import{homedir as T}from"node:os";const E={existsSync:e=>v(e),isDirectory:e=>{try{return C(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>x(e),readFileSync:e=>b(e),writeFileSync:(e,t)=>{w(e,t)},mkdirSync:(e,t)=>{y(e,t)},rmSync:(e,t)=>{S(e,t)}},D={resolveProjectBundledSkillDir:()=>s(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>s(e,{checkDesktop:!1}),readBundledVersion:()=>o(),readRecordedVersion:e=>t(e,`cli-hosts`),writeRecordedVersion:(e,t)=>a(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>n(e),readBundleDecision:(e,t)=>l(e,t),writeBundleDecision:(e,t,n)=>c(e,t,n),removeBundleFromDisk:(e,t)=>u(e,t)};function O(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function k(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(h(t),{recursive:!0}),A(e,t,n)}function A(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=g(e,r),a=g(t,r);n.isDirectory(i)?A(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function j(e,t,n,r,i,a){let o=[],s=g(e,`.agents`,`skills`,t),c=r.existsSync(s),l=!1;try{k(n,s,r),l=!0,o.push({kind:`central`,path:s,outcome:c?`overwritten`:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:c,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`central`,path:s,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-central-failed`,scope:`user`,path:s,error:t})}for(let c of p){let l=g(e,c.hostDir),u=g(l,`skills`,t);if(u===s){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!r.existsSync(l)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-host-absent`});continue}let d=r.existsSync(u);try{k(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:d?`overwritten`:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:d,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,error:t})}}return{entries:o,centralWritten:l}}function M(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function N(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of p){let o=g(e,t.hostDir,`skills`,`open-knowledge`),s=g(o,`SKILL.md`),c=n.existsSync(s),l=d[t.editorId]?.projectConfigPath?.(e),u=!c&&M(l,n);if(!c&&!u){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{f(o,e),k(i,o,n);let s=c?`reclaimed`:`created`;a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:s}),r({event:c?`project-skill-reclaim-reclaimed`:`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 P(t,n,a,o){let s=e=>{n.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await n.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await n.readRecordedVersion(t)}catch(e){o({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of i)try{d.push({id:e,sourceDir:n.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let i of d){let s=r[i.id],c=a.existsSync(g(t,`.agents`,`skills`,s)),l=await n.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{n.removeBundleFromDisk(t,i.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:i.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:i.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await n.writeBundleDecision(t,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:i.id,error:e instanceof Error?e.message:String(e)})}p.push(i)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>a.existsSync(g(t,`.agents`,`skills`,r[e.id])));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],_=d.length===i.length,v=!0;for(let{id:e,sourceDir:n}of p){let i=j(t,r[e],n,a,o,l);h.push(...i.entries),i.centralWritten||(v=!1)}let y=h.some(e=>e.kind===`central`&&(e.outcome===`written`||e.outcome===`overwritten`));if(_&&v&&y){let e=null;try{await n.writeRecordedVersion(t,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t}of p)s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?`installed`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:l,entries:h}}async function F(e){let t=e.logger??O,n=e.fs??E,r=e.home??T(),i={...D,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:N(e.projectDir,i,n,t),user:await P(r,i,n,t)}}function I(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 L(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===`reclaimed`).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} reclaimed, ${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`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
2
2
  `)}function R(){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.").action(async()=>{let e=await F({projectDir:_(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${L(e)}\n`),process.exitCode=I(e)})}export{R as n,F as t};
3
- //# sourceMappingURL=repair-skills-Cl1Ip2xg.mjs.map
3
+ //# sourceMappingURL=repair-skills-DnkpKCSB.mjs.map
@@ -1 +1 @@
1
- import{C as e,Ca as t,Fa as n,Ta as r,ca as i,d as a,l as o,la as s,qa as c,sa as l,y as u}from"./src-FuRMJntf.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,Br as w,Bt as T,C as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Fr as W,Ft as G,G as K,Gi as q,Gn as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,Ir as ie,It as ae,J as oe,Ji as se,Jn as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kt as pe,L as me,Li as he,Ln as ge,Lr as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nr as De,Nt as Oe,O as ke,Oi as Ae,On as je,Or as Me,Ot as Ne,P as Pe,Pi as Fe,Pn as Ie,Pr as Le,Pt as Re,Q as ze,Qi as Be,Qn as Ve,Qr as He,Qt as Ue,R as We,Ri as Ge,Rn as Ke,Rr as qe,Rt as Je,S as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Ti as tt,Tn as nt,Tr as rt,Tt as it,U as at,Ui as ot,Un as st,Ur as ct,Ut as lt,V as ut,Vi as dt,Vn as ft,Vr as pt,Vt as mt,W as ht,Wi as gt,Wn as _t,Wr as vt,Wt as yt,X as bt,Xi as xt,Xn as St,Xr as Ct,Xt as wt,Y as Tt,Yi as Et,Yn as Dt,Yt as Ot,Z as kt,Zi as At,Zn as jt,Zr as Mt,Zt as Nt,_ as Pt,_i as Ft,_n as It,_r as Lt,a as Rt,aa as zt,ai as Bt,an as Vt,ar as Ht,at as Ut,b as Wt,bi as Gt,bn as Kt,br as qt,bt as Jt,c as Yt,ca as Xt,ci as Zt,cn as Qt,cr as $t,ct as en,d as tn,da as nn,di as rn,dn as an,dr as on,dt as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fi as mn,fn as hn,fr as gn,ft as _n,g as vn,gi as yn,gn as bn,gr as xn,h as Sn,hi as Cn,hn as wn,hr as Tn,i as En,ia as Dn,ii as On,in as kn,ir as An,it as jn,j as Mn,ji as Nn,jn as Pn,jr as Fn,jt as In,k as Ln,ki as Rn,kn as zn,kr as Bn,kt as Vn,l as Hn,la as Un,li as Wn,ln as Gn,lr as Kn,lt as qn,m as Jn,mi as Yn,mn as Xn,mr as Zn,n as Qn,na as $n,ni as er,nn as tr,nr,nt as rr,o as ir,oa as ar,oi as or,on as sr,or as cr,ot as lr,p as ur,pi as dr,pn as fr,pr,q as mr,qi as hr,qn as gr,qt as _r,r as vr,ra as yr,ri as br,rn as xr,rr as Sr,rt as Cr,s as wr,sa as Tr,si as Er,sn as Dr,sr as Or,st as kr,t as Ar,ta as jr,ti as Mr,tn as Nr,tr as Pr,tt as Fr,u as Ir,ua as Lr,ui as Rr,un as zr,ur as Br,ut as Vr,v as Hr,vi as Ur,vn as Wr,vr as Gr,w as Kr,wi as qr,wn as Jr,wr as Yr,wt as Xr,x as Zr,xi as Qr,xn as $r,xr as ei,xt as ti,y as ni,yi as ri,yn as ii,yr as ai,yt as oi,z as si,zi as ci,zn as li,zr as ui,zt as di}from"./src-Di1OsFoS.mjs";import{C as fi,E as pi,T as mi,_ as hi,b as gi,c as _i,d as vi,g as yi,i as bi,l as xi,m as Si,n as Ci,p as wi,s as Ti,t as Ei,u as Di,v as Oi,w as ki,x as Ai,y as ji}from"./fs-traced-vMO6kYgZ.mjs";import{a as Mi,d as Ni,f as Pi,i as Fi,l as Ii,n as Li,r as Ri,t as zi,u as Bi}from"./logger-B7Z8XO-z.mjs";import{_ as Vi,a as Hi,b as Ui,c as Wi,f as Gi,g as Ki,h as qi,i as Ji,l as Yi,m as Xi,n as Zi,o as Qi,p as $i,r as ea,s as ta,t as na,u as ra,v as ia,y as aa}from"./server-lock-1KyShewk.mjs";export{$n as AGENT_ID_MAX_LEN,yr as AGENT_ID_RE,ne as AGENT_WRITE_ORIGIN,Un as AcpPermissionStore,ar as AcpRegistry,Te as AcpThreadManager,Nn as AgentFocusBroadcaster,_ as AgentPresenceBroadcaster,he as AgentSessionCapacityError,Ge as AgentSessionManager,Jt as AutoStartDisabledError,Fn as BUNDLE_IDS,Se as BUNDLE_SCOPE,De as BUNDLE_SKILL_NAME,jt as BacklinkIndex,q as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Dr as CONFIG_FILENAME,fe as CONFLICT_MARKER_RE,ln as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,Pn as DEFAULT_CHECKPOINT_RETENTION,Cn as DEFAULT_EMBEDDINGS_DIMENSIONS,Je as DEFAULT_PACK_ID,K as DocumentDurabilityState,yn as EMBEDDINGS_API_KEY_ENV,Tr as FEATURED_AGENT_IDS,xe as FILE_SYSTEM_WRITER,St as FILE_WATCHER_ORIGIN,Rr as FileEmbeddingsBackend,tr as GIT_PREFLIGHT_FAIL_SPAN_NAME,Ee as GIT_UPSTREAM_WRITER,Lr as GitDirAccessError,An as GitNotAvailableError,Ht as GitTooOldError,ti as HOCUSPOCUS_AUTH_REJECTION_REASONS,$e as HocuspocusAuthRejection,A as HocuspocusAuthTokenSchema,or as INSTALLED_AGENTS_SCHEMES,t as LINEAGE_EPOCH_KEY,X as LIVE_DERIVED_INDEX_DEBOUNCE_MS,di as LOG_MD_TEMPLATE,Vn as MANAGED_RENAME_ORIGIN,Fe as MAX_ACP_THREADS,ci as MAX_AGENT_SESSIONS,sn as MCP_CONNECTION_ID_HEADER,l as MCP_SERVER_NAME,S as MIN_EVICTABLE_IDLE_MS,cr as MIN_GIT_VERSION,ue as MISSING_OK_CONFIG_MESSAGE,nn as MalformedGitPointerError,Cr as McpLogger,mr as MissingOkConfigError,V as OBSERVER_SYNC_ORIGIN,Qt as OK_OKIGNORE_TEMPLATE,i as ORPHAN_MODES,c as PROTOCOL_VERSION,zi as PinoLogger,Wi as ProcessLockCollisionError,Hn as ProjectGitInitError,b as ROLLBACK_ORIGIN,Gn as ROOT_GITIGNORE_TEMPLATE,Ki as RUNTIME_VERSION,Ie as SERVICE_WRITER,z as SKILL_INSTALL_EVENTS_FILE_REL,u as SKILL_STATE_TARGETS,T as STARTER_FOLDERS,mt as STARTER_FOLDER_FRONTMATTER_FILENAME,ee as STARTER_PACKS,lt as STARTER_PACK_IDS,yt as STARTER_TEMPLATES,I as STATE_MANIFEST_FILENAME,Vi as STATE_SCHEMA_VERSION,n as SYSTEM_DOC_NAME,wt as SeedPrerequisiteError,Nt as SeedRootDirError,na as ServerLockCollisionError,Ar as SingleFileNotAFileError,Qn as SingleFileNotFoundError,vr as SingleFileNotMarkdownError,j as StateManifestError,et as TagIndex,Le as USER_GLOBAL_BUNDLE_IDS,p as UiLockCollisionError,In as __getShowAllWalkStatsForTesting,Ce as __resetShowAllWalkStatsForTesting,Yi as acquireProcessLock,Zi as acquireServerLock,dn as acquireUiLock,dt as applyAgentMarkdownWrite,zn as applyExternalChange,ve as applySeed,ke as assertCompatibleStateManifest,Or as assertGitAvailable,It as assertNeverDiskEvent,be as attachAcpThreadSocket,oi as attachIdleShutdown,Hr as bootServer,xn as buildAndOpenSkill,zr as buildConfigYmlContent,ze as buildExecResult,H as buildOkMcpStdioCommand,Me as buildSkillZip,Y as buildStarterFolderFrontmatterYaml,U as buildWipTree,W as bundleSkillMdPath,Wr as classifyEvents,Ei as classifyFsPath,Ft as clearContributors,rn as clearEmbeddingsKeyFromAllBackends,pe as coercePackId,o as colorFromSeed,re as commitUpstreamImport,ge as commitWip,Ke as commitWipFromTree,$t as compareSemver,qe as composeEffectiveLinterConfig,gr as containsConflictMarkers,ii as contentHash,Ur as contributorCount,We as countShadowObjects,si as countStaleAgentWipRefs,x as countWipRefs,Oe as createApiExtension,M as createAssetServeMiddleware,Ct as createContentFilter,Mt as createContentFilterAsync,mn as createEmbeddingsSecretStore,En as createEphemeralProjectDir,v as createExternalChangeHandler,pn as createFileLogger,at as createLiveDerivedIndexExtension,bt as createMcpHttpHandler,Er as createOsProbe,Pe as createPersistenceExtension,E as createServer,ye as createServerObserverExtension,Z as createStreamingErrorWriter,Li as createTestLogger,dr as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Kn as detectGit,Ln as detectProjectShape,lr as discoverLockDirs,pt as discoverMarkdownlintConfig,xr as emitPreflightFailureSpan,d as encodeDocName,fn as encodeFolderRoute,Fr as encodeSkillRoute,Ir as ensureProjectGit,an as ensureProjectSkillGitignore,ot as errorResponse,Kt as evictStaleTrackerEntries,kr as extractOkBinaryPath,Ve as extractWikiLinksFromMarkdown,Br as fallbackPaths,tn as findEnclosingGitRoot,wn as findEnclosingProjectRoot,$ as findNativeMarkdownlintFile,ur as flushFileLogger,Xr as formatAuthRejectionWire,ri as formatContributors,Gt as formatContributorsFrom,G as formatPackRationale,li as gcCheckpointRefs,jn as getCurrentMcpLogger,qr as getLocalDir,Jn as getLogFilePath,Ri as getLogger,Sn as getLogsDir,Ui as getMachineId,ji as getMeter,At as getMetrics,gi as getTracer,Be as handleCollabSocketError,Mr as handleSpawnCursor,ut as hasGcLogLatch,a as iconFromClientName,f as incrementCollabSocketFilteredError,cn as incrementServerObserverFire,hn as initContent,C as initShadowRepo,Ai as initTelemetry,Wt as initToleranceTelemetryWriter,Vr as installPrettyZodErrors,Fi as installTestLoggers,Lt as installUserSkill,Rn as isAllowedApiOrigin,Ue as isAllowedWorkspaceHostHeader,de as isConfigDoc,it as isHocuspocusAuthRejectionReason,_r as isKnownPackId,hr as isLinkIndexExcludedDoc,h as isLoopbackAddress,se as isManagedArtifactDoc,s as isOrphanMode,te as isPairedWriteOrigin,er as isPathWithinDir,ia as isProcessAlive,bn as isProjectRoot,gn as isProjectSkillManaged,Et as isReservedForUserTree,$r as isSelfWrite,xt as isSystemDoc,Zr as isToleranceTelemetryEnabled,aa as isValidLockPid,Ze as lastKnownHash,ft as listRescueCheckpoints,le as listStarterPacks,Xt as loadCustomAgents,we as loadPrincipal,ra as lockFilePath,Mi as loggerFactory,Ii as logsCurrentPath,Bi as logsPreviousPath,Yn as makeLazyEmbeddingsKeyStore,ea as markServerLockDraining,oe as mountMcpAndApi,Ci as normalizeFsPath,ie as originGitHubHost,fr as packageVersionMajorMinor,B as parseAuthRejectionWire,on as parseGitVersion,F as parseHocuspocusAuthToken,Tt as parseKeepaliveConnectionId,O as pathToDocName,ae as planSeed,Rt as prepareSingleFileOpen,en as processCommand,qn as processUsage,Gr as readAllTargets,ai as readBundleDecision,ct as readOwnNativeRules,Gi as readProcessLock,$i as readProcessLockDetailed,ht as readProjectHeadState,Wn as readProjectLocalSemanticConfig,Ji as readServerLock,qt as readServerPackageVersion,ei as readSkillInstallStateSnapshot,pr as readSkillManagement,g as readStateManifest,Qe as readTargetRecordedAt,k as readTargetVersion,Pr as readUiLock,ce as reconcile,Qr as recordContributor,P as recordSkillInstallEvent,kt as registerAllTools,Jr as registerWrite,Xi as releaseProcessLock,Hi as releaseServerLock,nr as releaseUiLock,nt as removeLastKnownHash,jr as resetMetrics,e as resolveBundleEnabled,Bn as resolveBundledSkillDir,tt as resolveContentDir,br as resolveCursorBinaryDefault,On as resolveCursorSpawnInvocation,ui as resolveEffectiveLinterConfig,L as resolveLockDir,w as resolveNativeConfigForDoc,vt as resolveNativeMarkdownlintConfig,Ot as resolvePack,wr as resolvePackageVersion,rr as resolveUiInfo,Xe as restoreContributors,ni as restoreLifecycleFromConflictsJson,He as rewriteMarkdownLinksForDocumentRename,m as rewriteWikiLinksForDocumentRename,kn as runAuthReposSubprocess,Vt as runAuthStatusSubprocess,un as runCloneSubprocess,sr as runDeviceFlowSubprocess,Ut as runWithMcpLogger,Ae as safeContentPath,Re as safeSubdir,Q as safetyCheckpoint,_n as sanitizeClientName,st as saveInMemoryCheckpoint,_t as saveVersion,Ne as seedBasenameIndex,ir as serializeError,fi as setActiveSpanAttributes,me as setupServerObservers,J as shadowGit,ki as shutdownTelemetry,Zn as skillManagementPath,Ni as spansCurrentPath,Pi as spansPreviousPath,Bt as spawnDetached,Dt as splitMarkdownBlocks,R as startWatcher,gt as streamingProblemEvent,D as swapContributors,Ye as teardownToleranceTelemetryWriter,Dn as toBroadcasterKey,bi as tracedAppendFileSync,Ti as tracedLinkSync,_i as tracedMkdir,xi as tracedMkdirSync,Di as tracedRename,vi as tracedRenameSync,wi as tracedRmSync,Si as tracedRmdirSync,yi as tracedUnlinkSync,hi as tracedWriteFile,Oi as tracedWriteFileSync,Kr as trustSystemCertificates,Yt as untrackTrackedProjectSkillProjection,N as updateLastKnownHash,qi as updateProcessLockPort,Qi as updateServerLockPort,Sr as updateUiLockPort,zt as validateAgentId,Nr as validateCloneInputs,y as validateSkillZip,ta as waitForServerLockDrain,Zt as withHiddenWindowsConsole,mi as withSpan,pi as withSpanSync,Yr as writeBundleDecision,_e as writeMarkdownlintRule,Xn as writeRootGitignoreForNewRepo,Tn as writeSkillManagement,Mn as writeStateManifest,rt as writeTargetVersion,je as writeTracker};
1
+ import{C as e,Ca as t,Fa as n,Ta as r,ca as i,d as a,l as o,la as s,qa as c,sa as l,y as u}from"./src-FuRMJntf.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,Br as w,Bt as T,C as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Fr as W,Ft as G,G as K,Gi as q,Gn as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,Ir as ie,It as ae,J as oe,Ji as se,Jn as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kt as pe,L as me,Li as he,Ln as ge,Lr as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nr as De,Nt as Oe,O as ke,Oi as Ae,On as je,Or as Me,Ot as Ne,P as Pe,Pi as Fe,Pn as Ie,Pr as Le,Pt as Re,Q as ze,Qi as Be,Qn as Ve,Qr as He,Qt as Ue,R as We,Ri as Ge,Rn as Ke,Rr as qe,Rt as Je,S as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Ti as tt,Tn as nt,Tr as rt,Tt as it,U as at,Ui as ot,Un as st,Ur as ct,Ut as lt,V as ut,Vi as dt,Vn as ft,Vr as pt,Vt as mt,W as ht,Wi as gt,Wn as _t,Wr as vt,Wt as yt,X as bt,Xi as xt,Xn as St,Xr as Ct,Xt as wt,Y as Tt,Yi as Et,Yn as Dt,Yt as Ot,Z as kt,Zi as At,Zn as jt,Zr as Mt,Zt as Nt,_ as Pt,_i as Ft,_n as It,_r as Lt,a as Rt,aa as zt,ai as Bt,an as Vt,ar as Ht,at as Ut,b as Wt,bi as Gt,bn as Kt,br as qt,bt as Jt,c as Yt,ca as Xt,ci as Zt,cn as Qt,cr as $t,ct as en,d as tn,da as nn,di as rn,dn as an,dr as on,dt as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fi as mn,fn as hn,fr as gn,ft as _n,g as vn,gi as yn,gn as bn,gr as xn,h as Sn,hi as Cn,hn as wn,hr as Tn,i as En,ia as Dn,ii as On,in as kn,ir as An,it as jn,j as Mn,ji as Nn,jn as Pn,jr as Fn,jt as In,k as Ln,ki as Rn,kn as zn,kr as Bn,kt as Vn,l as Hn,la as Un,li as Wn,ln as Gn,lr as Kn,lt as qn,m as Jn,mi as Yn,mn as Xn,mr as Zn,n as Qn,na as $n,ni as er,nn as tr,nr,nt as rr,o as ir,oa as ar,oi as or,on as sr,or as cr,ot as lr,p as ur,pi as dr,pn as fr,pr,q as mr,qi as hr,qn as gr,qt as _r,r as vr,ra as yr,ri as br,rn as xr,rr as Sr,rt as Cr,s as wr,sa as Tr,si as Er,sn as Dr,sr as Or,st as kr,t as Ar,ta as jr,ti as Mr,tn as Nr,tr as Pr,tt as Fr,u as Ir,ua as Lr,ui as Rr,un as zr,ur as Br,ut as Vr,v as Hr,vi as Ur,vn as Wr,vr as Gr,w as Kr,wi as qr,wn as Jr,wr as Yr,wt as Xr,x as Zr,xi as Qr,xn as $r,xr as ei,xt as ti,y as ni,yi as ri,yn as ii,yr as ai,yt as oi,z as si,zi as ci,zn as li,zr as ui,zt as di}from"./src-DO_fYaAw.mjs";import{C as fi,E as pi,T as mi,_ as hi,b as gi,c as _i,d as vi,g as yi,i as bi,l as xi,m as Si,n as Ci,p as wi,s as Ti,t as Ei,u as Di,v as Oi,w as ki,x as Ai,y as ji}from"./fs-traced-vMO6kYgZ.mjs";import{a as Mi,d as Ni,f as Pi,i as Fi,l as Ii,n as Li,r as Ri,t as zi,u as Bi}from"./logger-B7Z8XO-z.mjs";import{_ as Vi,a as Hi,b as Ui,c as Wi,f as Gi,g as Ki,h as qi,i as Ji,l as Yi,m as Xi,n as Zi,o as Qi,p as $i,r as ea,s as ta,t as na,u as ra,v as ia,y as aa}from"./server-lock-1KyShewk.mjs";export{$n as AGENT_ID_MAX_LEN,yr as AGENT_ID_RE,ne as AGENT_WRITE_ORIGIN,Un as AcpPermissionStore,ar as AcpRegistry,Te as AcpThreadManager,Nn as AgentFocusBroadcaster,_ as AgentPresenceBroadcaster,he as AgentSessionCapacityError,Ge as AgentSessionManager,Jt as AutoStartDisabledError,Fn as BUNDLE_IDS,Se as BUNDLE_SCOPE,De as BUNDLE_SKILL_NAME,jt as BacklinkIndex,q as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Dr as CONFIG_FILENAME,fe as CONFLICT_MARKER_RE,ln as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,Pn as DEFAULT_CHECKPOINT_RETENTION,Cn as DEFAULT_EMBEDDINGS_DIMENSIONS,Je as DEFAULT_PACK_ID,K as DocumentDurabilityState,yn as EMBEDDINGS_API_KEY_ENV,Tr as FEATURED_AGENT_IDS,xe as FILE_SYSTEM_WRITER,St as FILE_WATCHER_ORIGIN,Rr as FileEmbeddingsBackend,tr as GIT_PREFLIGHT_FAIL_SPAN_NAME,Ee as GIT_UPSTREAM_WRITER,Lr as GitDirAccessError,An as GitNotAvailableError,Ht as GitTooOldError,ti as HOCUSPOCUS_AUTH_REJECTION_REASONS,$e as HocuspocusAuthRejection,A as HocuspocusAuthTokenSchema,or as INSTALLED_AGENTS_SCHEMES,t as LINEAGE_EPOCH_KEY,X as LIVE_DERIVED_INDEX_DEBOUNCE_MS,di as LOG_MD_TEMPLATE,Vn as MANAGED_RENAME_ORIGIN,Fe as MAX_ACP_THREADS,ci as MAX_AGENT_SESSIONS,sn as MCP_CONNECTION_ID_HEADER,l as MCP_SERVER_NAME,S as MIN_EVICTABLE_IDLE_MS,cr as MIN_GIT_VERSION,ue as MISSING_OK_CONFIG_MESSAGE,nn as MalformedGitPointerError,Cr as McpLogger,mr as MissingOkConfigError,V as OBSERVER_SYNC_ORIGIN,Qt as OK_OKIGNORE_TEMPLATE,i as ORPHAN_MODES,c as PROTOCOL_VERSION,zi as PinoLogger,Wi as ProcessLockCollisionError,Hn as ProjectGitInitError,b as ROLLBACK_ORIGIN,Gn as ROOT_GITIGNORE_TEMPLATE,Ki as RUNTIME_VERSION,Ie as SERVICE_WRITER,z as SKILL_INSTALL_EVENTS_FILE_REL,u as SKILL_STATE_TARGETS,T as STARTER_FOLDERS,mt as STARTER_FOLDER_FRONTMATTER_FILENAME,ee as STARTER_PACKS,lt as STARTER_PACK_IDS,yt as STARTER_TEMPLATES,I as STATE_MANIFEST_FILENAME,Vi as STATE_SCHEMA_VERSION,n as SYSTEM_DOC_NAME,wt as SeedPrerequisiteError,Nt as SeedRootDirError,na as ServerLockCollisionError,Ar as SingleFileNotAFileError,Qn as SingleFileNotFoundError,vr as SingleFileNotMarkdownError,j as StateManifestError,et as TagIndex,Le as USER_GLOBAL_BUNDLE_IDS,p as UiLockCollisionError,In as __getShowAllWalkStatsForTesting,Ce as __resetShowAllWalkStatsForTesting,Yi as acquireProcessLock,Zi as acquireServerLock,dn as acquireUiLock,dt as applyAgentMarkdownWrite,zn as applyExternalChange,ve as applySeed,ke as assertCompatibleStateManifest,Or as assertGitAvailable,It as assertNeverDiskEvent,be as attachAcpThreadSocket,oi as attachIdleShutdown,Hr as bootServer,xn as buildAndOpenSkill,zr as buildConfigYmlContent,ze as buildExecResult,H as buildOkMcpStdioCommand,Me as buildSkillZip,Y as buildStarterFolderFrontmatterYaml,U as buildWipTree,W as bundleSkillMdPath,Wr as classifyEvents,Ei as classifyFsPath,Ft as clearContributors,rn as clearEmbeddingsKeyFromAllBackends,pe as coercePackId,o as colorFromSeed,re as commitUpstreamImport,ge as commitWip,Ke as commitWipFromTree,$t as compareSemver,qe as composeEffectiveLinterConfig,gr as containsConflictMarkers,ii as contentHash,Ur as contributorCount,We as countShadowObjects,si as countStaleAgentWipRefs,x as countWipRefs,Oe as createApiExtension,M as createAssetServeMiddleware,Ct as createContentFilter,Mt as createContentFilterAsync,mn as createEmbeddingsSecretStore,En as createEphemeralProjectDir,v as createExternalChangeHandler,pn as createFileLogger,at as createLiveDerivedIndexExtension,bt as createMcpHttpHandler,Er as createOsProbe,Pe as createPersistenceExtension,E as createServer,ye as createServerObserverExtension,Z as createStreamingErrorWriter,Li as createTestLogger,dr as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Kn as detectGit,Ln as detectProjectShape,lr as discoverLockDirs,pt as discoverMarkdownlintConfig,xr as emitPreflightFailureSpan,d as encodeDocName,fn as encodeFolderRoute,Fr as encodeSkillRoute,Ir as ensureProjectGit,an as ensureProjectSkillGitignore,ot as errorResponse,Kt as evictStaleTrackerEntries,kr as extractOkBinaryPath,Ve as extractWikiLinksFromMarkdown,Br as fallbackPaths,tn as findEnclosingGitRoot,wn as findEnclosingProjectRoot,$ as findNativeMarkdownlintFile,ur as flushFileLogger,Xr as formatAuthRejectionWire,ri as formatContributors,Gt as formatContributorsFrom,G as formatPackRationale,li as gcCheckpointRefs,jn as getCurrentMcpLogger,qr as getLocalDir,Jn as getLogFilePath,Ri as getLogger,Sn as getLogsDir,Ui as getMachineId,ji as getMeter,At as getMetrics,gi as getTracer,Be as handleCollabSocketError,Mr as handleSpawnCursor,ut as hasGcLogLatch,a as iconFromClientName,f as incrementCollabSocketFilteredError,cn as incrementServerObserverFire,hn as initContent,C as initShadowRepo,Ai as initTelemetry,Wt as initToleranceTelemetryWriter,Vr as installPrettyZodErrors,Fi as installTestLoggers,Lt as installUserSkill,Rn as isAllowedApiOrigin,Ue as isAllowedWorkspaceHostHeader,de as isConfigDoc,it as isHocuspocusAuthRejectionReason,_r as isKnownPackId,hr as isLinkIndexExcludedDoc,h as isLoopbackAddress,se as isManagedArtifactDoc,s as isOrphanMode,te as isPairedWriteOrigin,er as isPathWithinDir,ia as isProcessAlive,bn as isProjectRoot,gn as isProjectSkillManaged,Et as isReservedForUserTree,$r as isSelfWrite,xt as isSystemDoc,Zr as isToleranceTelemetryEnabled,aa as isValidLockPid,Ze as lastKnownHash,ft as listRescueCheckpoints,le as listStarterPacks,Xt as loadCustomAgents,we as loadPrincipal,ra as lockFilePath,Mi as loggerFactory,Ii as logsCurrentPath,Bi as logsPreviousPath,Yn as makeLazyEmbeddingsKeyStore,ea as markServerLockDraining,oe as mountMcpAndApi,Ci as normalizeFsPath,ie as originGitHubHost,fr as packageVersionMajorMinor,B as parseAuthRejectionWire,on as parseGitVersion,F as parseHocuspocusAuthToken,Tt as parseKeepaliveConnectionId,O as pathToDocName,ae as planSeed,Rt as prepareSingleFileOpen,en as processCommand,qn as processUsage,Gr as readAllTargets,ai as readBundleDecision,ct as readOwnNativeRules,Gi as readProcessLock,$i as readProcessLockDetailed,ht as readProjectHeadState,Wn as readProjectLocalSemanticConfig,Ji as readServerLock,qt as readServerPackageVersion,ei as readSkillInstallStateSnapshot,pr as readSkillManagement,g as readStateManifest,Qe as readTargetRecordedAt,k as readTargetVersion,Pr as readUiLock,ce as reconcile,Qr as recordContributor,P as recordSkillInstallEvent,kt as registerAllTools,Jr as registerWrite,Xi as releaseProcessLock,Hi as releaseServerLock,nr as releaseUiLock,nt as removeLastKnownHash,jr as resetMetrics,e as resolveBundleEnabled,Bn as resolveBundledSkillDir,tt as resolveContentDir,br as resolveCursorBinaryDefault,On as resolveCursorSpawnInvocation,ui as resolveEffectiveLinterConfig,L as resolveLockDir,w as resolveNativeConfigForDoc,vt as resolveNativeMarkdownlintConfig,Ot as resolvePack,wr as resolvePackageVersion,rr as resolveUiInfo,Xe as restoreContributors,ni as restoreLifecycleFromConflictsJson,He as rewriteMarkdownLinksForDocumentRename,m as rewriteWikiLinksForDocumentRename,kn as runAuthReposSubprocess,Vt as runAuthStatusSubprocess,un as runCloneSubprocess,sr as runDeviceFlowSubprocess,Ut as runWithMcpLogger,Ae as safeContentPath,Re as safeSubdir,Q as safetyCheckpoint,_n as sanitizeClientName,st as saveInMemoryCheckpoint,_t as saveVersion,Ne as seedBasenameIndex,ir as serializeError,fi as setActiveSpanAttributes,me as setupServerObservers,J as shadowGit,ki as shutdownTelemetry,Zn as skillManagementPath,Ni as spansCurrentPath,Pi as spansPreviousPath,Bt as spawnDetached,Dt as splitMarkdownBlocks,R as startWatcher,gt as streamingProblemEvent,D as swapContributors,Ye as teardownToleranceTelemetryWriter,Dn as toBroadcasterKey,bi as tracedAppendFileSync,Ti as tracedLinkSync,_i as tracedMkdir,xi as tracedMkdirSync,Di as tracedRename,vi as tracedRenameSync,wi as tracedRmSync,Si as tracedRmdirSync,yi as tracedUnlinkSync,hi as tracedWriteFile,Oi as tracedWriteFileSync,Kr as trustSystemCertificates,Yt as untrackTrackedProjectSkillProjection,N as updateLastKnownHash,qi as updateProcessLockPort,Qi as updateServerLockPort,Sr as updateUiLockPort,zt as validateAgentId,Nr as validateCloneInputs,y as validateSkillZip,ta as waitForServerLockDrain,Zt as withHiddenWindowsConsole,mi as withSpan,pi as withSpanSync,Yr as writeBundleDecision,_e as writeMarkdownlintRule,Xn as writeRootGitignoreForNewRepo,Tn as writeSkillManagement,Mn as writeStateManifest,rt as writeTargetVersion,je as writeTracker};