geneseed 4.22.0 → 4.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/SHIPPED.md +1 -1
  3. package/docs/web-ui.md +21 -15
  4. package/harness.config.json +1 -1
  5. package/js/web/api.mjs +3 -0
  6. package/package.json +1 -1
  7. package/src/skills/parallel-agents.md +1 -1
  8. package/web/dist/assets/Activity-D0GfEonq.js +1 -0
  9. package/web/dist/assets/ActivityDetail-Bf5sBm8_.js +1 -0
  10. package/web/dist/assets/Dashboard-gYZLE4r3.js +2 -0
  11. package/web/dist/assets/DataTable-BWbUx4bY.js +1 -0
  12. package/web/dist/assets/Docs-CQifoJkX.js +4 -0
  13. package/web/dist/assets/FilterInput-CZREvrjX.js +1 -0
  14. package/web/dist/assets/GreenhouseView-R6epl1PY.js +1 -0
  15. package/web/dist/assets/Installs-DBH3NEOC.js +3 -0
  16. package/web/dist/assets/JournalView-DKqMrN35.js +1 -0
  17. package/web/dist/assets/KitApply-DCBS0ZWz.js +1 -0
  18. package/web/dist/assets/Kits-BpUFbYHr.js +1 -0
  19. package/web/dist/assets/Laws-Qnzc5Lp7.js +3 -0
  20. package/web/dist/assets/Library-CWjWbVwS.js +2 -0
  21. package/web/dist/assets/Loops-BRuz2YFL.js +2 -0
  22. package/web/dist/assets/Markdown-DpmmtW2Y.js +65 -0
  23. package/web/dist/assets/OperatorHudView-NW_xAOj1.js +1 -0
  24. package/web/dist/assets/Personal-d5Ssk-SW.js +2 -0
  25. package/web/dist/assets/RailCats-BtIstKaH.js +1 -0
  26. package/web/dist/assets/Tabs-DQLuylEi.js +1 -0
  27. package/web/dist/assets/index-BX3zc2Yi.css +1 -0
  28. package/web/dist/assets/index-DMDF5Y3Y.js +3 -0
  29. package/web/dist/assets/motion-CXaUMNkg.js +1 -0
  30. package/web/dist/index.html +3 -2
  31. package/web/dist/assets/Activity-DsKkFGhT.js +0 -1
  32. package/web/dist/assets/ActivityDetail-BWY-vaiK.js +0 -1
  33. package/web/dist/assets/Dashboard-BZmw2a7d.js +0 -2
  34. package/web/dist/assets/Docs-CNuRuMin.js +0 -4
  35. package/web/dist/assets/GreenhouseView-BCiZP9f9.js +0 -1
  36. package/web/dist/assets/Installs-xkBX6OjK.js +0 -3
  37. package/web/dist/assets/JournalView-BSR51TKR.js +0 -1
  38. package/web/dist/assets/KitApply-BR8AcZ62.js +0 -1
  39. package/web/dist/assets/Kits-e0DCj9sT.js +0 -1
  40. package/web/dist/assets/Laws-BuG2_HFE.js +0 -3
  41. package/web/dist/assets/Library-BYfB4mhf.js +0 -2
  42. package/web/dist/assets/Loops-r6L7a1g1.js +0 -2
  43. package/web/dist/assets/Markdown-OReRRoEV.js +0 -65
  44. package/web/dist/assets/OperatorHudView-BLXm0zzn.js +0 -1
  45. package/web/dist/assets/Personal-kEfKCxlh.js +0 -1
  46. package/web/dist/assets/RailCats-DNlJKicm.js +0 -1
  47. package/web/dist/assets/StackBar-Y_gkoC3t.js +0 -1
  48. package/web/dist/assets/Tabs-2uMB511T.js +0 -1
  49. package/web/dist/assets/activity-BEWV9er4.js +0 -1
  50. package/web/dist/assets/drawable-ixCquffB.js +0 -1
  51. package/web/dist/assets/index-CDSHv_7s.css +0 -1
  52. package/web/dist/assets/index-Dwo3Gxek.js +0 -2
  53. package/web/dist/assets/jobBuckets-Dpjvbfm1.js +0 -2
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t}from"./react-DlYQp10C.js";var n=typeof window<`u`,r=n?window:null,i=n?document:null,a={OBJECT:0,ATTRIBUTE:1,CSS:2,TRANSFORM:3,CSS_VAR:4},o={NUMBER:0,UNIT:1,COLOR:2,COMPLEX:3},s={NONE:0,AUTO:1,FORCE:2},c={replace:0,none:1,blend:2},l=Symbol(),u=Symbol(),d=Symbol(),f=Symbol(),p=Symbol(),m=1e-11,h=0xe8d4a51000,g=1e3,_=[],v=(()=>{let e=new Map;return e.set(`x`,`translateX`),e.set(`y`,`translateY`),e.set(`z`,`translateZ`),e})(),y=[`perspective`,`translateX`,`translateY`,`translateZ`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`scale`,`scaleX`,`scaleY`,`scaleZ`,`skew`,`skewX`,`skewY`],b=y.reduce((e,t)=>({...e,[t]:t+`(`}),{}),x=()=>{},S=e=>e,C=/\)\s*[-.\d]/,w=/(^#([\da-f]{3}){1,2}$)|(^#([\da-f]{4}){1,2}$)/i,T=/rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i,E=/rgba\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,D=/hsl\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*\)/i,O=/hsla\(\s*(-?\d+|-?\d*.\d+)\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)%\s*,\s*(-?\d+|-?\d*.\d+)\s*\)/i,k=/[-+]?\d*\.?\d+(?:e[-+]?\d)?/gi,ee=/^([-+]?\d*\.?\d+(?:e[-+]?\d+)?)([a-z]+|%)$/i,te=/([a-z])([A-Z])/g,ne=/(\*=|\+=|-=)/,re=/var\(\s*(--[\w-]+)(?:\s*,\s*([^)]+))?\s*\)/,A={id:null,keyframes:null,playbackEase:null,playbackRate:1,frameRate:240,loop:0,reversed:!1,alternate:!1,autoplay:!0,persist:!1,duration:g,delay:0,loopDelay:0,ease:`out(2)`,composition:c.replace,modifier:S,onBegin:x,onBeforeUpdate:x,onUpdate:x,onLoop:x,onPause:x,onComplete:x,onRender:x},j={current:null,root:i},M={defaults:A,precision:4,timeScale:1,tickThreshold:200,editor:null},N={version:`4.5.0`,engine:null};n&&(r.AnimeJS||=[],r.AnimeJS.push(N));var P=e=>e.replace(te,`$1-$2`).toLowerCase(),F=(e,t)=>e.indexOf(t)===0,I=Date.now,ie=Array.isArray,ae=e=>e&&e.constructor===Object,oe=e=>typeof e==`number`&&!isNaN(e),se=e=>typeof e==`string`,ce=e=>typeof e==`function`,L=e=>e===void 0,le=e=>L(e)||e===null,ue=e=>n&&e instanceof SVGElement,de=e=>w.test(e),fe=e=>F(e,`rgb`),pe=e=>F(e,`hsl`),me=e=>de(e)||(fe(e)||pe(e))&&(e[e.length-1]===`)`||!C.test(e)),he=e=>!M.defaults.hasOwnProperty(e),ge=[`opacity`,`rotate`,`overflow`,`color`],R=(e,t)=>{if(ge.includes(t))return!1;if(e.getAttribute(t)||t in e){if(t===`scale`){let t=e.parentNode;return t&&t.tagName===`filter`}return!0}},_e=e=>se(e)?parseFloat(e):e,ve=Math.pow,ye=Math.sqrt,be=Math.sin,xe=Math.cos,Se=Math.abs,z=Math.floor,Ce=Math.asin,we=Math.PI,Te=Math.round,B=(e,t,n)=>e<t?t:e>n?n:e,V=(e,t)=>{if(t<0)return e;if(!t)return Te(e);let n=10**t;return Te(e*n)/n},Ee=(e,t,n)=>n===1?t:n===0?e:e+(t-e)*n,De=e=>e===1/0?h:e===-1/0?-h:e,Oe=e=>e<=1e-11?m:De(V(e,11)),H=e=>ie(e)?[...e]:e,ke=(e,t)=>{let n={...e};for(let r in t){let i=e[r];n[r]=L(i)?t[r]:i}return n},U=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._head,o=i;for(n&&(a=e._tail,o=r);a;){let e=a[o];t(a),a=e}},Ae=(e,t,n=`_prev`,r=`_next`)=>{let i=t[n],a=t[r];i?i[r]=a:e._head=a,a?a[n]=i:e._tail=i,t[n]=null,t[r]=null},je=(e,t,n,r=`_prev`,i=`_next`)=>{let a=e._tail;for(;a&&n&&n(a,t);)a=a[r];let o=a?a[i]:e._head;a?a[i]=t:e._head=t,o?o[r]=t:e._tail=t,t[r]=a,t[i]=o},Me=(e,t,n)=>{let r=e.style.transform;if(r){let i=e[f],a=0,o=r.length,s;for(;a<o;){for(;a<o&&r.charCodeAt(a)===32;)a++;if(a>=o)break;let e=a;for(;a<o&&r.charCodeAt(a)!==40;)a++;if(a>=o)break;let t=r.substring(e,a),n=1,c=a+1,l=-1,u=-1;for(a++;a<o&&n>0;){let e=r.charCodeAt(a);e===40?n++:e===41?n--:e===44&&n===1&&(l===-1?l=a:u===-1&&(u=a)),a++}let d=a-1;t===`translate`||t===`translate3d`?(l===-1?i.translateX=r.substring(c,d).trim():(i.translateX=r.substring(c,l).trim(),u===-1?i.translateY=r.substring(l+1,d).trim():(i.translateY=r.substring(l+1,u).trim(),i.translateZ=r.substring(u+1,d).trim())),s=r.substring(c,d)):t===`scale`||t===`scale3d`?l===-1?i.scale=r.substring(c,d).trim():(i.scaleX=r.substring(c,l).trim(),u===-1?i.scaleY=r.substring(l+1,d).trim():(i.scaleY=r.substring(l+1,u).trim(),i.scaleZ=r.substring(u+1,d).trim())):i[t]=r.substring(c,d)}if(t===`translate3d`&&s)return n&&(n[t]=s),s;let c=i[t];if(!L(c))return n&&(n[t]=c),c}return t===`translate3d`?`0px, 0px, 0px`:t===`rotate3d`?`0, 0, 0, 0deg`:F(t,`scale`)?`1`:F(t,`rotate`)||F(t,`skew`)?`0deg`:`0px`},Ne=e=>{let t=``;for(let n=0,r=y.length;n<r;n++){let r=y[n],i=e[r];if(i!==void 0){if(r===`translateX`){let r=e.translateY;if(r!==void 0){let a=e.translateZ;a===void 0?(t+=`translate(${i},${r}) `,n+=1):(t+=`translate3d(${i},${r},${a}) `,n+=2);continue}}if(r===`scaleX`&&e.scale===void 0){let r=e.scaleY;if(r!==void 0){let a=e.scaleZ;a===void 0?(t+=`scale(${i},${r}) `,n+=1):(t+=`scale3d(${i},${r},${a}) `,n+=2);continue}}t+=`${b[r]}${i}) `}r===`rotateZ`&&e.rotate3d!==void 0&&(t+=`rotate3d(${e.rotate3d}) `)}return e.matrix!==void 0&&(t+=`matrix(${e.matrix}) `),e.matrix3d!==void 0&&(t+=`matrix3d(${e.matrix3d}) `),t},Pe=[];function Fe(e,t){if(!e)return null;let n=Pe.length;outer:for(let r=0;r<n;r++){let n=Pe[r];if(n.detect&&!n.detect(e))continue;let i=n.targetAdapters;for(let n=0,r=i.length;n<r;n++){let r=i[n];if(r.detect(e)){let n=r.props[t];if(n&&(!n.gate||n.gate(e)))return n;break outer}}}for(let r=0;r<n;r++){let n=Pe[r];if(n.detect&&!n.detect(e))continue;let i=n.propertyResolvers;for(let n=0,r=i.length;n<r;n++){let r=i[n](e,t);if(r)return r}}return null}var Ie=e=>{let t=T.exec(e)||E.exec(e),n=L(t[4])?1:+t[4];return[+t[1],+t[2],+t[3],n]},Le=e=>{let t=e.length,n=t===4||t===5;return[+(`0x`+e[1]+e[n?1:2]),+(`0x`+e[n?2:3]+e[n?2:4]),+(`0x`+e[n?3:5]+e[n?3:6]),t===5||t===9?+((`0x`+e[n?4:7]+e[n?4:8])/255).toFixed(3):1]},Re=(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),ze=e=>{let t=D.exec(e)||O.exec(e),n=t[1]/360,r=t[2]/100,i=t[3]/100,a=L(t[4])?1:+t[4],o,s,c;if(r===0)o=s=c=i;else{let e=i<.5?i*(1+r):i+r-i*r,t=2*i-e;o=V(Re(t,e,n+1/3)*255,0),s=V(Re(t,e,n)*255,0),c=V(Re(t,e,n-1/3)*255,0)}return[o,s,c,a]},Be=e=>fe(e)?Ie(e):de(e)?Le(e):pe(e)?ze(e):[0,0,0,1],W=(e,t)=>L(e)?t:e,Ve=(e,t)=>{let n=e.match(re),r=t[u]?t:document.documentElement,i=getComputedStyle(r)?.getPropertyValue(n[1]);return(!i||i.trim()===``)&&n[2]&&(i=n[2].trim()),i||0},G=(e,t,n,r,i,a)=>{if(ce(e)){if(!i){let i=e(t,n,r,a);return isNaN(+i)?i||0:+i}let o=()=>{let i=e(t,n,r,a);return isNaN(+i)?i||0:+i};return i.func=o,o()}if(se(e)&&F(e,`var(`)){if(!i)return Ve(e,t);let n=()=>Ve(e,t);return i.func=n,n()}return e},He=(e,t)=>e[u]?e[d]&&R(e,t)?a.ATTRIBUTE:y.includes(t)||v.get(t)?a.TRANSFORM:F(t,`--`)?a.CSS_VAR:t in e.style?a.CSS:t in e?a.OBJECT:a.ATTRIBUTE:a.OBJECT,Ue=(e,t,n)=>{let r=e.style[t];r&&n&&(n[t]=r);let i=r||getComputedStyle(e[p]||e).getPropertyValue(t);return i===`auto`?`0`:i},We=(e,t,n,r)=>{let i=L(n)?He(e,t):n,o=Fe(e,t);if(o){let n=o.get(e);return n&&r&&(r[t]=n),n??0}if(i===a.OBJECT){let n=e[t];return n&&r&&(r[t]=n),n||0}if(i===a.ATTRIBUTE){let n=e.getAttribute(t);return n&&r&&(r[t]=n),n}return i===a.TRANSFORM?Me(e,t,r):i===a.CSS_VAR?Ue(e,t,r).trimStart():Ue(e,t,r)},Ge=(e,t,n)=>n===`-`?e-t:n===`+`?e+t:e*t,Ke=()=>({t:o.NUMBER,n:0,u:null,o:null,d:null,s:null}),K=(e,t)=>{if(t.t=o.NUMBER,t.n=0,t.u=null,t.o=null,t.d=null,t.s=null,!e)return t;let n=+e;if(!isNaN(n))return t.n=n,t;let r=e;r[1]===`=`&&(t.o=r[0],r=r.slice(2));let i=!r.includes(` `)&&ee.exec(r);if(i)return t.t=o.UNIT,t.n=+i[1],t.u=i[2],t;if(t.o)return t.n=+r,t;if(me(r))return t.t=o.COLOR,t.d=Be(r),t;{let e=r.match(k);return t.t=o.COMPLEX,t.d=e?e.map(Number):[],t.s=r.split(k)||[],t}},qe=(e,t)=>(t.t=e._valueType,t.n=e._toNumber,t.u=e._unit,t.o=null,t.d=H(e._toNumbers),t.s=H(e._strings),t),q=Ke(),Je=(e,t,n)=>{let r=e._modifier,i=e._fromNumbers,a=e._toNumbers,o=e._strings,s=o[0];for(let c=0,l=a.length;c<l;c++){let l=r(V(Ee(i[c],a[c],t),n)),u=o[c+1];s+=`${u?l+u:l}`,e._numbers[c]=l}return s},Ye=(e,t,n,r,i)=>{let l=e.parent,u=e.duration,d=e.completed,p=e.iterationDuration,h=e.iterationCount,g=e._currentIteration,_=e._loopDelay,v=e._reversed,y=e._alternate,b=e._hasChildren,x=e._delay,S=e._currentTime,C=x+p,w=t-x,T=B(S,-x,u),E=B(w,-x,u),D=w-S,O=E>0,k=E>=u,ee=u<=m,te=i===s.FORCE,ne=0,re=w,A=0;if(h>1){let t=p+(k?0:_),n=~~(E/t);e._currentIteration=B(n,0,h),k&&e._currentIteration--,ne=e._currentIteration%2,re=E-n*t||0}let j=v^(y&&ne),N=e._ease,P=k?j?0:u:j?p-re:re;N&&(P=p*N(P/p)||0);let F=(l?l.backwards:w<S)?!j:!!j;if(e._currentTime=w,e._iterationTime=P,e.backwards=F,O&&!e.began?(e.began=!0,!n&&(!l||!F&&l.began)&&e.onBegin(e)):w<=0&&(e.began=!1),!n&&!b&&O&&e._currentIteration!==g&&e.onLoop(e),te||i===s.AUTO&&(t>=(l&&x>0?0:x)&&t<=C||t<=x&&T>x||t>=C&&T!==u)||P>=C&&T!==u||P<=x&&T>0&&!k||t<=T&&T===u&&d||k&&!d&&ee){if(O&&(e.computeDeltaTime(T),n||e.onBeforeUpdate(e)),!b){let t=te||(F?D*-1:D)>=M.tickThreshold,i=V(e._offset+(l?l._offset:0)+x+P,12),s=e._head,u,d,p,m,h=0;for(;s;){let e=s._composition,n=s._currentTime,l=s._changeDuration,g=s._absoluteStartTime+s._changeDuration,_=s._nextRep,v=s._prevRep,y=e!==c.none,b=v?v._absoluteStartTime+v._changeDuration:0,x=v&&v.parent!==s.parent,S=!_||_._isOverridden?g:_.parent===s.parent?g+_._delay:_._absoluteStartTime<_._absoluteUpdateStartTime?_._absoluteStartTime:_._absoluteUpdateStartTime;if((t||(n!==l||i<=S||v&&!x&&(!_||_.parent!==s.parent))&&(n!==0||i>=s._absoluteStartTime||x&&!s._hasFromValue&&!v._isOverridden&&i>=b||_&&!_._isOverridden&&_.parent===s.parent&&_._currentTime!==0&&P<_._startTime))&&(!v||x||P>=s._startTime)&&(!y||!s._isOverridden&&(!s._isOverlapped||i<=g)&&(!_||_._isOverridden||i<=S)&&(!v||v._isOverridden||(x?i>=s._absoluteStartTime||!s._hasFromValue&&i>=b:i>=b+s._delay)))){let t=s._currentTime=B(P-s._startTime,0,l),n=s._ease(t/s._updateDuration),i=s._modifier,g=s._valueType,_=s._tweenType,v=_===a.OBJECT,b=g===o.NUMBER,x=b&&v||n===0||n===1?-1:M.precision,S,C;if(b)S=C=i(V(Ee(s._fromNumber,s._toNumber,n),x));else if(g===o.UNIT)C=i(V(Ee(s._fromNumber,s._toNumber,n),x)),S=`${C}${s._unit}`;else if(g===o.COLOR){let e=s._numbers,t=s._fromNumbers,a=s._toNumbers,o=1-n,c=t[0],l=t[1],u=t[2],d=a[0],f=a[1],p=a[2];e[0]=i(Math.sqrt(c*c*o+d*d*n)),e[1]=i(Math.sqrt(l*l*o+f*f*n)),e[2]=i(Math.sqrt(u*u*o+p*p*n)),e[3]=i(Ee(t[3],a[3],n)),(!s._setter||r)&&(S=`rgba(${V(e[0],0)},${V(e[1],0)},${V(e[2],0)},${e[3]})`)}else g===o.COMPLEX&&(S=Je(s,n,x));if(y&&(s._number=C),!r&&e!==c.blend){let e=s.property;u=s.target,s._setter?s._setter(u,C,s):v?u[e]=S:_===a.ATTRIBUTE?u.setAttribute(e,S):(d=u.style,_===a.TRANSFORM?(u!==p&&(p=u,m=u[f]),m[e]=S,h=1):_===a.CSS?d[e]=S:_===a.CSS_VAR&&d.setProperty(e,S)),O&&(A=1)}else s._value=S}else n&&v&&!x&&P<s._startTime&&(s._currentTime=0);h&&s._renderTransforms&&(d.transform=Ne(m),h=0),s=s._next}!n&&A&&e.onRender(e)}!n&&O&&e.onUpdate(e)}return l&&ee?!n&&(l.began&&!F&&w>0&&!d||F&&w<=1e-11&&d)&&(e.onComplete(e),e.completed=!F):O&&k?h===1/0?e._startTime+=e.duration:e._currentIteration>=h-1&&(e.paused=!0,!d&&!b&&(e.completed=!0,!n&&(!l||!F&&l.began)&&(e.onComplete(e),e._resolve(e)))):e.completed=!1,A},Xe=(e,t,n,r,i)=>{let a=e._currentIteration;if(Ye(e,t,n,r,i),e._hasChildren){let o=e,c=o.backwards,l=r?t:o._iterationTime,u=I(),d=0,f=!0;if(!r&&o._currentIteration!==a){let e=o.iterationDuration;U(o,t=>{if(!c)!t.completed&&!t.backwards&&t._currentTime<t.iterationDuration&&Ye(t,e,n,1,s.FORCE),t.began=!1,t.completed=!1;else{let r=t.duration,i=t._offset+t._delay,a=i+r;!n&&r<=1e-11&&(!i||a===e)&&t.onComplete(t)}}),n||o.onLoop(o)}U(o,e=>{let t=V((l-e._offset)*e._speed,12);if(c&&t>e._delay+e.duration)return;let a=e._fps<o._fps?e.requestTick(u):i;d+=Ye(e,t,n,r,a),!e.completed&&f&&(f=!1)},c),!n&&d&&o.onRender(o),(f||c)&&o._currentTime>=o.duration&&(o.paused=!0,o.completed||(o.completed=!0,n||(o.onComplete(o),o._resolve(o))))}},Ze={},Qe=(e,t,n)=>{if(n===a.TRANSFORM)return v.get(e)||e;if(n===a.CSS||n===a.ATTRIBUTE&&ue(t)&&e in t.style){let t=Ze[e];if(t)return t;{let t=e&&P(e);return Ze[e]=t,t}}return e},$e=(e,t=!1)=>{if(e._hasChildren)U(e,e=>$e(e,t),!0);else{let n=e;n.pause(),U(n,e=>{let r=e.property,i=e.target,o=e._tweenType,s=e._inlineValue,c=le(s)||s===``;if(e._setter){if(!t&&!c){if(K(s,q),q.d){let t=q.d,n=e._numbers;for(let e=0,r=t.length;e<r;e++)n[e]=t[e]}else e._number=q.n;e._setter(e.target,e._number,e)}}else if(o===a.OBJECT)!t&&!c&&(i[r]=s);else if(i[u]){if(o===a.ATTRIBUTE)t||(c?i.removeAttribute(r):i.setAttribute(r,s));else{let t=i.style;if(o===a.TRANSFORM){let n=i[f];c?delete n[r]:n[r]=s,e._renderTransforms&&(Object.keys(n).length?t.transform=Ne(n):t.removeProperty(`transform`))}else c?t.removeProperty(P(r)):t[r]=s}}i[u]&&n._tail===e&&n.targets.forEach(e=>{e.getAttribute&&e.getAttribute(`style`)===``&&e.removeAttribute(`style`)})})}return e},et=class{constructor(e=0){this.deltaTime=0,this._currentTime=e,this._lastTickTime=e,this._startTime=e,this._lastTime=e,this._frameDuration=g/240,this._fps=240,this._speed=1,this._hasChildren=!1,this._head=null,this._tail=null}get fps(){return this._fps}set fps(e){let t=+e,n=t<1e-11?m:t,r=g/n;n>A.frameRate&&(A.frameRate=n),this._fps=n,this._frameDuration=r}get speed(){return this._speed}set speed(e){let t=+e;this._speed=t<1e-11?m:t}requestTick(e){let t=this._frameDuration,n=e-this._lastTickTime,r=t*.25;return n+(r<4?r:4)<t?s.NONE:(this._lastTickTime=n>=t?e-n%t:e,s.AUTO)}computeDeltaTime(e){let t=e-this._lastTime;return this.deltaTime=t,this._lastTime=e,t}},tt={animation:null,update:x},nt=e=>{let t=tt.animation;return t||(t={duration:m,computeDeltaTime:x,_offset:0,_delay:0,_head:null,_tail:null},tt.animation=t,tt.update=()=>{e.forEach(e=>{for(let t in e){let n=e[t],r=n._head;if(r){let e=r._valueType,t=e===o.COMPLEX||e===o.COLOR?H(r._fromNumbers):null,i=r._fromNumber,a=n._tail;for(;a&&a!==r;){if(t)for(let e=0,n=a._numbers.length;e<n;e++)t[e]+=a._numbers[e];else i+=a._number;a=a._prevAdd}r._toNumber=i,r._toNumbers=t}}}),Ye(t,1,1,0,s.FORCE)}),t},rt=n?requestAnimationFrame:setImmediate,it=n?cancelAnimationFrame:clearImmediate,at=class extends et{constructor(e){super(e),this.useDefaultMainLoop=!0,this.pauseOnDocumentHidden=!0,this.defaults=A,this.paused=!0,this.reqId=0}update(){let e=this._currentTime=I();if(this.requestTick(e)){this.computeDeltaTime(e);let t=this._speed,n=this._fps,r=this._head;for(;r;){let i=r._next;r.paused?(Ae(this,r),this._hasChildren=!!this._tail,r._running=!1,r.completed&&!r._cancelled&&r.cancel()):Xe(r,(e-r._startTime)*r._speed*t,0,0,r._fps<n?r.requestTick(e):s.AUTO),r=i}tt.update()}}wake(){return this.useDefaultMainLoop&&!this.reqId&&(this.requestTick(I()),this.reqId=rt(ot)),this}pause(){if(this.reqId)return this.paused=!0,st()}resume(){if(this.paused)return this.paused=!1,U(this,e=>e.resetTime()),this.wake()}get speed(){return this._speed*(M.timeScale===1?1:g)}set speed(e){let t=e*M.timeScale;this._speed!==t&&(this._speed=t,U(this,e=>e.speed=e._speed))}get timeUnit(){return M.timeScale===1?`ms`:`s`}set timeUnit(e){let t=.001,n=e===`s`,r=n?t:1;if(M.timeScale!==r){M.timeScale=r,M.tickThreshold=200*r;let e=n?t:g;this.defaults.duration*=e,this._speed*=e}}get precision(){return M.precision}set precision(e){M.precision=e}},J=(()=>{let e=new at(I());return n&&(N.engine=e,i.addEventListener(`visibilitychange`,()=>{e.pauseOnDocumentHidden&&(i.hidden?e.pause():e.resume())})),e})(),ot=()=>{J._head?(J.reqId=rt(ot),J.update()):J.reqId=0},st=()=>(it(J.reqId),J.reqId=0,J),ct={_rep:new WeakMap,_add:new Map},lt=(e,t,n=`_rep`)=>{let r=ct[n],i=r.get(e);return i||(i={},r.set(e,i)),i[t]?i[t]:i[t]={_head:null,_tail:null}},ut=(e,t)=>e._isOverridden||e._absoluteStartTime>t._absoluteStartTime,dt=e=>{e._isOverlapped=1,e._isOverridden=1,e._changeDuration=m,e._currentTime=m},ft=(e,t)=>{let n=e._composition;if(n===c.replace){let n=e._absoluteStartTime;je(t,e,ut,`_prevRep`,`_nextRep`);let r=e._prevRep;if(r){let t=r.parent,i=r._absoluteEndTime;if(e.parent.id!==t.id&&t.iterationCount>1&&i+(t.duration-t.iterationDuration)>n){dt(r);let e=r._prevRep;for(;e&&e.parent.id===t.id;)dt(e),e=e._prevRep}let a=e._absoluteUpdateStartTime;if(i>a){let e=r._startTime,t=V(a-(i-(e+r._updateDuration))-e,12);r._changeDuration=t,r._currentTime=t,r._isOverlapped=1,t<1e-11&&dt(r)}let o=e.parent.parent;if(!o||o!==t.parent){let e=!0;if(U(t,t=>{t._isOverlapped||(e=!1)}),e){let e=t.parent;if(e){let n=!0;U(e,e=>{e!==t&&U(e,e=>{e._isOverlapped||(n=!1)})}),n&&e.cancel()}else t.cancel()}}}}else if(n===c.blend){let t=lt(e.target,e.property,`_add`),n=nt(ct._add),r=t._head;r||(r={...e},r._composition=c.replace,r._updateDuration=m,r._startTime=0,r._numbers=H(e._fromNumbers),r._number=0,r._next=null,r._prev=null,je(t,r),je(n,r));let i=e._toNumber;if(e._fromNumber=r._fromNumber-i,e._toNumber=0,e._numbers=H(e._fromNumbers),e._number=0,r._fromNumber=i,e._toNumbers.length){let t=H(e._toNumbers);t.forEach((t,n)=>{e._fromNumbers[n]=r._fromNumbers[n]-t,e._toNumbers[n]=0}),r._fromNumbers=t}je(t,e,null,`_prevAdd`,`_nextAdd`)}return e},pt=e=>{let t=e._composition;if(t!==c.none){let n=e.target,r=e.property,i=ct._rep.get(n)[r];if(Ae(i,e,`_prevRep`,`_nextRep`),t===c.blend){let t=ct._add,i=t.get(n);if(!i)return;let a=i[r],o=tt.animation;Ae(a,e,`_prevAdd`,`_nextAdd`);let s=a._head;if(s&&s===a._tail){Ae(a,s,`_prevAdd`,`_nextAdd`),Ae(o,s);let e=!0;for(let t in i)if(i[t]._head){e=!1;break}e&&t.delete(n)}}}return e},mt=(e,t,n)=>{let r=!1;return U(t,i=>{let o=i.target;if(e.includes(o)){let e=i.property,s=i._tweenType,c=Qe(n,o,s);(!c||c&&c===e)&&(i.parent._tail===i&&i._tweenType===a.TRANSFORM&&i._prev&&i._prev._tweenType===a.TRANSFORM&&(i._prev._renderTransforms=1),Ae(t,i),pt(i),r=!0)}},!0),r},ht=(e,t,n)=>{let r=t||J,i;if(r._hasChildren){let t=0;U(r,a=>{if(!a._hasChildren){if(i=mt(e,a,n),i&&!a._head)a.cancel(),Ae(r,a);else{let e=a._offset+a._delay+a.duration;e>t&&(t=e)}}a._head?ht(e,a,n):a._hasChildren=!1},!0),L(r.iterationDuration)||(r.iterationDuration=t)}else i=mt(e,r,n);i&&!r._head&&(r._hasChildren=!1,r.cancel&&r.cancel())},gt=e=>(e.paused=!0,e.began=!1,e.completed=!1,e),_t=e=>e._cancelled?(e._hasChildren?U(e,_t):U(e,e=>{e._composition!==c.none&&ft(e,lt(e.target,e.property))}),e._cancelled=0,e):e,vt=0,yt=(e,t)=>e._priority>t._priority,bt=class extends et{constructor(e={},t=null,n=0){super(0),++vt;let{id:r,delay:i,duration:a,reversed:o,alternate:s,loop:c,loopDelay:l,autoplay:u,frameRate:d,playbackRate:f,priority:p,onComplete:m,onLoop:h,onPause:g,onBegin:_,onBeforeUpdate:v,onUpdate:y}=e;j.current&&j.current.register(this);let b=t?0:J._lastTickTime,S=t?t.defaults:M.defaults,C=ce(i)||L(i)?S.delay:+i,w=ce(a)||L(a)?1/0:+a,T=W(c,S.loop),E=W(l,S.loopDelay),D=T===!0||T===1/0||T<0?1/0:T+1,O=0;t?O=n:(J.reqId||J.requestTick(I()),O=(J._lastTickTime-J._startTime)*M.timeScale),this.id=L(r)?vt:r,this.parent=t,this.duration=De((w+E)*D-E)||1e-11,this.backwards=!1,this.paused=!0,this.began=!1,this.completed=!1,this.onBegin=_||S.onBegin,this.onBeforeUpdate=v||S.onBeforeUpdate,this.onUpdate=y||S.onUpdate,this.onLoop=h||S.onLoop,this.onPause=g||S.onPause,this.onComplete=m||S.onComplete,this.iterationDuration=w,this.iterationCount=D,this._autoplay=!t&&W(u,S.autoplay),this._offset=O,this._delay=C,this._loopDelay=E,this._iterationTime=0,this._currentIteration=0,this._resolve=x,this._running=!1,this._reversed=+W(o,S.reversed),this._reverse=this._reversed,this._cancelled=0,this._alternate=W(s,S.alternate),this._prev=null,this._next=null,this._lastTickTime=b,this._startTime=b,this._lastTime=b,this._fps=W(d,S.frameRate),this._speed=W(f,S.playbackRate),this._priority=+W(p,1)}get cancelled(){return!!this._cancelled}set cancelled(e){e?this.cancel():this.reset(!0).play()}get currentTime(){return B(V(this._currentTime,M.precision),-this._delay,this.duration)}set currentTime(e){let t=this.paused;this.pause().seek(+e),t||this.resume()}get iterationCurrentTime(){return B(V(this._iterationTime,M.precision),0,this.iterationDuration)}set iterationCurrentTime(e){this.currentTime=this.iterationDuration*this._currentIteration+e}get progress(){return B(V(this._currentTime/this.duration,10),0,1)}set progress(e){this.currentTime=this.duration*e}get iterationProgress(){return B(V(this._iterationTime/this.iterationDuration,10),0,1)}set iterationProgress(e){let t=this.iterationDuration;this.currentTime=t*this._currentIteration+t*e}get currentIteration(){return this._currentIteration}set currentIteration(e){this.currentTime=this.iterationDuration*B(+e,0,this.iterationCount-1)}get reversed(){return!!this._reversed}set reversed(e){e?this.reverse():this.play()}get speed(){return super.speed}set speed(e){super.speed=e,this.resetTime()}reset(e=!1){return _t(this),this._reversed&&!this._reverse&&(this.reversed=!1),this._iterationTime=this.iterationDuration,Xe(this,0,1,~~e,s.FORCE),gt(this),this._hasChildren&&U(this,gt),this}init(e=!1){this.fps=this._fps,this.speed=this._speed,!e&&this._hasChildren&&Xe(this,this.duration,1,~~e,s.FORCE),this.reset(e);let t=this._autoplay;return t===!0?this.resume():t&&!L(t.linked)&&t.link(this),this}resetTime(){let e=1/(this._speed*J._speed);return this._startTime=I()-(this._currentTime+this._delay)*e,this}pause(){return this.paused?this:(this.paused=!0,this.onPause(this),this)}resume(){return this.paused?(this.paused=!1,this.duration<=1e-11&&!this._hasChildren?Xe(this,m,0,0,s.FORCE):(this._running||=(je(J,this,yt),J._hasChildren=!0,!0),this.resetTime(),this._startTime-=12,J.wake()),this):this}restart(){return this.reset().resume()}seek(e,t=0,n=0){_t(this),this.completed=!1;let r=this.paused;return this.paused=!0,Xe(this,e+this._delay,~~t,~~n,s.AUTO),r?this:this.resume()}alternate(){let e=this._reversed,t=this.iterationCount,n=this.iterationDuration,r=t===1/0?z(h/n):t;return this._reversed=+(this._alternate&&!(r%2)?e:!e),t===1/0?this.iterationProgress=this._reversed?1-this.iterationProgress:this.iterationProgress:this.seek(n*r-this._currentTime),this.resetTime(),this}play(){return this._reversed&&this.alternate(),this.resume()}reverse(){return this._reversed||this.alternate(),this.resume()}cancel(){return this._hasChildren?U(this,e=>e.cancel(),!0):U(this,pt),this._cancelled=1,this.pause()}stretch(e){let t=this.duration,n=Oe(e);if(t===n)return this;let r=e/t,i=e<=m;return this.duration=i?m:n,this.iterationDuration=i?m:Oe(this.iterationDuration*r),this._offset*=r,this._delay*=r,this._loopDelay*=r,this}revert(){Xe(this,0,1,0,s.AUTO);let e=this._autoplay;return e&&e.linked&&e.linked===this&&e.revert(),this.cancel()}complete(e=0){return this.seek(this.duration,e).cancel()}then(e=x){let t=this.then,n=()=>{this.then=null,e(this),this.then=t,this._resolve=x};return new Promise(e=>(this._resolve=()=>e(n()),this.completed&&this._resolve(),this))}};function xt(e){let t=se(e)?j.root.querySelectorAll(e):e;if(t instanceof NodeList||t instanceof HTMLCollection)return t}function St(e){if(le(e))return[];if(!n)return ie(e)&&e.flat(1/0)||[e];if(ie(e)){let t=e.flat(1/0),n=[];for(let e=0,r=t.length;e<r;e++){let r=t[e];if(!le(r)){let e=xt(r);if(e)for(let t=0,r=e.length;t<r;t++){let r=e[t];if(!le(r)){let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}else{let e=!1;for(let t=0,i=n.length;t<i;t++)if(n[t]===r){e=!0;break}e||n.push(r)}}}return n}let t=xt(e);return t?Array.from(t):[e]}function Ct(e){let t=St(e),n=t.length;for(let e=0;e<n;e++){let n=t[e];if(!n[l]){n[l]=!0;let e=ue(n);(n.nodeType||e)&&(n[u]=!0,n[d]=e,n[f]={})}}return t}var wt={deg:1,rad:180/we,turn:360},Tt={},Et=(e,t,n,r=!1)=>{let a=t.u,s=t.n;if(t.t===o.UNIT&&a===n)return t;let c=s+a+n,l=Tt[c];if(!L(l)&&!r)t.n=l;else{let r;if(a in wt)r=s*wt[a]/wt[n];else{let t=e.cloneNode(),o=e.parentNode,c=o&&o!==i?o:i.body;c.appendChild(t);let l=t.style;l.width=100+a;let u=t.offsetWidth||100;l.width=100+n;let d=u/(t.offsetWidth||100);c.removeChild(t),r=d*s}t.n=r,Tt[c]=r}return t.t,o.UNIT,t.u=n,t},Y=e=>e,Dt=(e=1.68)=>t=>ve(t,+e),Ot={in:e=>t=>e(t),out:e=>t=>1-e(1-t),inOut:e=>t=>t<.5?e(t*2)/2:1-e(t*-2+2)/2,outIn:e=>t=>t<.5?(1-e(1-t*2))/2:(e(t*2-1)+1)/2},kt=we/2,At=we*2,jt={"":Dt,Quad:Dt(2),Cubic:Dt(3),Quart:Dt(4),Quint:Dt(5),Sine:e=>1-xe(e*kt),Circ:e=>1-ye(1-e*e),Expo:e=>e?ve(2,10*e-10):0,Bounce:e=>{let t,n=4;for(;e<((t=ve(2,--n))-1)/11;);return 1/ve(4,3-n)-7.5625*ve((t*3-2)/22-e,2)},Back:(e=1.7)=>t=>(+e+1)*t*t*t-+e*t*t,Elastic:(e=1,t=.3)=>{let n=B(+e,1,10),r=B(+t,m,2),i=r/At*Ce(1/n),a=At/r;return e=>e===0||e===1?e:-n*ve(2,-10*(1-e))*be((1-e-i)*a)}},Mt=(()=>{let e={linear:Y,none:Y};for(let t in Ot)for(let n in jt){let r=jt[n],i=Ot[t];e[t+n]=n===``||n===`Back`||n===`Elastic`?(e,t)=>i(r(e,t)):i(r)}return e})(),Nt={linear:Y,none:Y},Pt=e=>{if(Nt[e])return Nt[e];if(e.indexOf(`(`)<=-1){let t=Ot[e]||e.includes(`Back`)||e.includes(`Elastic`)?Mt[e]():Mt[e];return t?Nt[e]=t:Y}{let t=e.slice(0,-1).split(`(`),n=Mt[t[0]];return n?Nt[e]=n(...t[1].split(`,`)):Y}},Ft=[`steps(`,`irregular(`,`linear(`,`cubicBezier(`],It=e=>{if(se(e)){for(let t=0,n=Ft.length;t<n;t++)if(F(e,Ft[t]))return console.warn(`String syntax for \`ease: "${e}"\` has been removed from the core and replaced by importing and passing the easing function directly: \`ease: ${e}\``),Y}return ce(e)?e:se(e)?Pt(e):Y},X=Ke(),Z=Ke(),Lt={},Rt={func:null},zt={func:null},Bt=[null],Vt=[null,null],Ht={to:null},Ut=0,Wt=0,Gt,Q,Kt=(e,t)=>{let n={};if(ie(e)){let t=[].concat(...e.map(e=>Object.keys(e))).filter(he);for(let r=0,i=t.length;r<i;r++){let i=t[r];n[i]=e.map(e=>{let t={};for(let n in e){let r=e[n];he(n)?n===i&&(t.to=r):t[n]=r}return t})}}else{let r=W(t.duration,M.defaults.duration);Object.keys(e).map(t=>({o:parseFloat(t)/100,p:e[t]})).sort((e,t)=>e.o-t.o).forEach(e=>{let t=e.o,i=e.p;for(let e in i)if(he(e)){let a=n[e];a||=n[e]=[];let o=t*r,s=a.length,c=a[s-1],l={to:i[e]},u=0;for(let e=0;e<s;e++)u+=a[e].duration;s===1&&(l.from=c.to),i.ease&&(l.ease=i.ease),l.duration=o-(s?u:0),a.push(l)}return e});for(let e in n){let t=n[e],r;for(let e=0,n=t.length;e<n;e++){let n=t[e],i=n.ease;n.ease=r||void 0,r=i}t[0].duration||t.shift()}}return n},qt=class extends bt{constructor(e,t,n,r,i=!1,s=0,l){super(t,n,r),this._head,this._tail,++Wt;let u=Ct(e),d=u.length,f=t.keyframes,p=f?ke(Kt(f,t),t):t,{id:h,delay:g,duration:v,ease:y,playbackEase:b,modifier:x,composition:S,onRender:C}=p,w=n?n.defaults:M.defaults,T=W(y,w.ease),E=W(b,w.playbackEase),D=E?It(E):null,O=!L(T.ease),k=O?T.ease:W(y,D?`linear`:w.ease),ee=O?T.settlingDuration:W(v,w.duration),te=W(g,w.delay),ne=x||w.modifier,re=L(S)&&d>=1e3?c.none:L(S)?w.composition:S,A=this._offset+(n?n._offset:0);O&&(T.parent=this);let j=NaN,N=NaN,P=0,F=0;for(let e=0;e<d;e++){let t=u[e],r=s||e,d=l||u,f=NaN,m=NaN;for(let e in p)if(he(e)){let s=He(t,e),l=Fe(t,e),u=Qe(e,t,s),h=p[e],g=ie(h);if(i&&!g&&(Vt[0]=h,Vt[1]=h,h=Vt),g){let e=h.length,t=!ae(h[0]);e===2&&t?(Ht.to=h,Bt[0]=Ht,Gt=Bt):e>2&&t?(Gt=[],h.forEach((e,t)=>{t?t===1?(Vt[1]=e,Gt.push(Vt)):Gt.push(e):Vt[0]=e})):Gt=h}else Bt[0]=h,Gt=Bt;let v=null,y=null,b=NaN,x=0,S=0;for(let e=Gt.length;S<e;S++){let i=Gt[S];ae(i)?Q=i:(Ht.to=i,Q=Ht),Rt.func=null,zt.func=null;let a=G(W(Q.composition,re),t,r,d,null,null),f=oe(a)?a:c[a];!v&&f!==c.none&&(v=lt(t,u));let p=v?v._tail:null,m=n&&p&&p.parent.parent===n?p:y,h=G(Q.to,t,r,d,Rt,m),g;ae(h)&&!L(h.to)?(Q=h,g=h.to):g=h;let C=G(Q.from,t,r,d,zt,m),w=Q.ease||k,T=G(w,t,r,d,null,m),E=ce(T)||se(T)?T:w,D=!L(E)&&!L(E.ease),O=D?E.ease:E,j=D?E.settlingDuration:G(W(Q.duration,e>1?G(ee,t,r,d,null,m)/e:ee),t,r,d,null,m),M=G(W(Q.delay,S?0:te),t,r,d,null,m),N=Q.modifier||ne,I=!L(C),ue=!L(g),de=ie(g),fe=de||I&&ue,pe=y?x:0,me=y?x+M:M,he=V(A+me,12),ge=V(A+pe,12);!F&&(I||de)&&(F=1);let R=y;if(f!==c.none){let e=v._head;for(;e&&e._absoluteStartTime<=he;)if(e._isOverridden||(R=e),e=e._nextRep,e&&e._absoluteStartTime>=he)for(;e;)dt(e),e=e._nextRep}if(fe){K(de?G(g[0],t,r,d,zt,m):C,X),K(de?G(g[1],t,r,d,Rt,m):g,Z);let e=We(t,u,s,Lt);X.t===o.NUMBER&&(R?R._valueType===o.UNIT&&(X.t=o.UNIT,X.u=R._unit):(K(e,q),q.t===o.UNIT&&(X.t=o.UNIT,X.u=q.u)))}else ue?K(g,Z):y?qe(y,Z):K(n&&R&&R.parent.parent===n?R._value:We(t,u,s,Lt),Z),I?K(C,X):y?qe(y,X):K(n&&R&&R.parent.parent===n?R._value:We(t,u,s,Lt),X);if(X.o&&(X.n=Ge(R?R._toNumber:K(We(t,u,s,Lt),q).n,X.n,X.o)),Z.o&&(Z.n=Ge(X.n,Z.n,Z.o)),X.t!==Z.t){if(X.t===o.COMPLEX||Z.t===o.COMPLEX){let e=X.t===o.COMPLEX?X:Z,t=X.t===o.COMPLEX?Z:X;t.t=o.COMPLEX,t.s=H(e.s),t.d=e.d.map(()=>t.n)}else if(X.t===o.UNIT||Z.t===o.UNIT){let e=X.t===o.UNIT?X:Z,t=X.t===o.UNIT?Z:X;t.t=o.UNIT,t.u=e.u}else if(X.t===o.COLOR||Z.t===o.COLOR){let e=X.t===o.COLOR?X:Z,t=X.t===o.COLOR?Z:X;t.t=o.COLOR,t.d=e.d.map(()=>0)}}if(X.u!==Z.u){let e=Z.u?X:Z;e=Et(t,e,Z.u?Z.u:X.u,!1)}if(Z.d&&X.d&&Z.d.length!==X.d.length){let e=X.d.length>Z.d.length?X:Z,t=e===X?Z:X;t.d=e.d.map((e,n)=>L(t.d[n])?0:t.d[n]),t.s=H(e.s)}let _e=V(+j||1e-11,12),ve=Lt[u];le(ve)||(Lt[u]=null);let ye=l?l.set:null;x=V(me+_e,12);let be=X.d,xe=Z.d,Se=Z.s,z={parent:this,id:Ut++,property:u,target:t,_value:null,_toFunc:Rt.func,_fromFunc:zt.func,_ease:It(O),_fromNumbers:be?H(be):_,_toNumbers:xe?H(xe):_,_strings:Se?H(Se):_,_fromNumber:X.n,_toNumber:Z.n,_numbers:be?H(be):_,_number:X.n,_unit:Z.u,_modifier:N,_currentTime:0,_startTime:me,_delay:+M,_updateDuration:_e,_changeDuration:_e,_absoluteStartTime:he,_absoluteUpdateStartTime:ge,_absoluteEndTime:V(A+x,12),_hasFromValue:I||de?1:0,_tweenType:s,_setter:ye,_valueType:Z.t,_composition:f,_isOverlapped:0,_isOverridden:0,_renderTransforms:0,_inlineValue:ve,_prevRep:null,_nextRep:null,_prevAdd:null,_nextAdd:null,_prev:null,_next:null};f!==c.none&&ft(z,v);let Ce=z._valueType;if(Ce===o.COMPLEX)z._value=Je(z,1,-1);else if(Ce===o.UNIT)z._value=`${N(z._toNumber)}${z._unit}`;else if(Ce===o.COLOR){let e=Z.d;z._value=`rgba(${V(e[0],0)},${V(e[1],0)},${V(e[2],0)},${e[3]})`}else z._value=N(z._toNumber);isNaN(b)&&(b=z._startTime),y=z,P++,je(this,z)}(isNaN(N)||b<N)&&(N=b),(isNaN(j)||x>j)&&(j=x),s===a.TRANSFORM&&(f=P-S,m=P)}if(!isNaN(f)){let e=0;U(this,t=>{e>=f&&e<m&&(t._renderTransforms=1,t._composition===c.blend&&U(tt.animation,e=>{e.id===t.id&&(e._renderTransforms=1)})),e++})}}d||console.warn(`No target found. Make sure the element you're trying to animate is accessible before creating your animation.`),N?(U(this,e=>{e._startTime-e._delay||(e._delay-=N),e._startTime-=N}),j-=N):N=0,j||(j=m,this.iterationCount=0),this.targets=u,this.id=L(h)?Wt:h,this.duration=j===1e-11?m:De((j+this._loopDelay)*this.iterationCount-this._loopDelay)||1e-11,this.onRender=C||w.onRender,this._ease=D,this._delay=N,this.iterationDuration=j,!this._autoplay&&F&&this.onRender(this)}stretch(e){let t=this.duration;if(t===Oe(e))return this;let n=e/t;return U(this,e=>{e._updateDuration=Oe(e._updateDuration*n),e._changeDuration=Oe(e._changeDuration*n),e._currentTime*=n,e._delay*=n,e._startTime*=n,e._absoluteStartTime*=n,e._absoluteUpdateStartTime*=n,e._absoluteEndTime*=n}),super.stretch(e)}refresh(){return U(this,e=>{let t=e._toFunc,n=e._fromFunc;(t||n)&&(n?(K(n(),X),X.u!==e._unit&&e.target[u]&&Et(e.target,X,e._unit,!0),e._fromNumbers=H(X.d),e._fromNumber=X.n):t&&(K(We(e.target,e.property,e._tweenType),q),e._fromNumbers=H(q.d),e._fromNumber=q.n),t&&(K(t(),Z),e._toNumbers=H(Z.d),e._strings=H(Z.s),e._toNumber=Z.o?Ge(e._fromNumber,Z.n,Z.o):Z.n))}),this.duration===1e-11&&this.restart(),this}revert(){return super.revert(),$e(this)}then(e){return super.then(e)}},Jt=(e,t)=>M.editor?M.editor.addAnimation(e,t):new qt(e,t,null,0,!1).init(),Yt=(e,t)=>{if(!L(t))return M.editor&&M.editor.addSet?M.editor.addSet(e,t):(t.duration=m,t.composition=W(t.composition,c.none),new qt(e,t,null,0,!0).resume())},$=e(t(),1);function Xt(){return typeof window>`u`||!window.matchMedia?!1:!window.matchMedia(`(prefers-reduced-motion: reduce)`).matches}function Zt(e,t){let n=setTimeout(()=>e.complete(),t+400);return()=>{clearTimeout(n),e.complete()}}function Qt(e,t=700){let n=typeof e==`number`&&Number.isFinite(e)?e:null,r=n!==null&&Xt(),[i,a]=(0,$.useState)(0),o=(0,$.useRef)(0);return(0,$.useEffect)(()=>{if(!r)return;let e={n:o.current},i=Jt(e,{n,duration:t,ease:`outExpo`,onUpdate:()=>{o.current=e.n,a(e.n)},onComplete:()=>{o.current=n,a(n)}}),s=setTimeout(()=>i.complete(),t+400);return()=>{clearTimeout(s),i.pause()}},[n,t,r]),r?i:n}function $t({value:e,duration:t}){let n=Qt(e,t);return n===null?e??null:Math.round(n)}function en(e){let t=(0,$.useRef)(null),n=(0,$.useRef)(null),r=(0,$.useRef)(()=>{}),i=(0,$.useRef)(null);return(0,$.useLayoutEffect)(()=>{let a=t.current,o=a?.querySelector(`:scope > .glide`);o&&(r.current=t=>{let r=a.querySelector(e);if(!r){o.style.opacity=`0`,n.current=null;return}let s=a.getBoundingClientRect(),c=r.getBoundingClientRect(),l={translateX:c.left-s.left+a.scrollLeft-a.clientLeft,translateY:c.top-s.top+a.scrollTop-a.clientTop,width:c.width,height:c.height},u=n.current;if(n.current={el:r,...l},!(u&&u.el===r&&[`translateX`,`translateY`,`width`,`height`].every(e=>Math.abs(u[e]-l[e])<.5))){if(o.style.opacity=`1`,i.current&&=(clearTimeout(i.current.t),i.current.anim.pause(),null),t&&u&&u.el!==r&&Xt()){let e=Jt(o,{...l,duration:280,ease:`outExpo`});i.current={anim:e,t:setTimeout(()=>e.complete(),680)}}else Yt(o,l)}},r.current(!0))}),(0,$.useEffect)(()=>{let e=()=>r.current(!1);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),t}function tn(){let e=(0,$.useRef)(null),t=(0,$.useRef)(null);return(0,$.useLayoutEffect)(()=>{let n=e.current;if(!n){t.current=null;return}let r=[...n.querySelectorAll(`:scope > [data-flip]`)],i=new Map(r.map(e=>[e.dataset.flip,e.offsetTop])),a=t.current;if(t.current=i,a&&Xt())for(let e of r){let t=a.get(e.dataset.flip);t===void 0?Zt(Jt(e,{opacity:[0,1],translateY:[-12,0],duration:340,ease:`outExpo`}),340):Math.abs(t-i.get(e.dataset.flip))>1&&Zt(Jt(e,{translateY:[t-i.get(e.dataset.flip),0],duration:340,ease:`outExpo`}),340)}}),e}export{se as A,c as B,z as C,le as D,ce as E,V as F,ee as G,p as H,ye as I,F as L,ke as M,Oe as N,oe as O,_e as P,M as R,De as S,ie as T,ne as U,m as V,s as W,We as _,tn as a,Se as b,qt as c,St as d,Ct as f,Xe as g,$e as h,Qt as i,L as j,ae as k,Jt as l,ht as m,Xt as n,en as o,bt as p,Zt as r,Yt as s,$t as t,It as u,Ge as v,U as w,je as x,W as y,g as z};
@@ -11,12 +11,13 @@
11
11
  <!-- The brand sprout as an inline SVG favicon (no extra asset to serve). -->
12
12
  <link rel="icon" type="image/svg+xml"
13
13
  href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.5v-9' stroke='%233AD4C4' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3Cpath d='M12 13c0-4.5 3.2-7.5 7.5-7.5 0 4.5-3.2 7.5-7.5 7.5z' fill='%233AD4C4'/%3E%3Cpath d='M12 14.5c0-3.6-2.6-6-6-6 0 3.6 2.6 6 6 6z' fill='%233AD4C4' opacity='.42'/%3E%3C/svg%3E" />
14
- <script type="module" crossorigin src="/assets/index-Dwo3Gxek.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-DMDF5Y3Y.js"></script>
15
15
  <link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-hePW80VL.js">
16
16
  <link rel="modulepreload" crossorigin href="/assets/react-DlYQp10C.js">
17
17
  <link rel="modulepreload" crossorigin href="/assets/api-BfpZmUMI.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/motion-CXaUMNkg.js">
18
19
  <link rel="modulepreload" crossorigin href="/assets/sections-ChwaobfW.js">
19
- <link rel="stylesheet" crossorigin href="/assets/index-CDSHv_7s.css">
20
+ <link rel="stylesheet" crossorigin href="/assets/index-BX3zc2Yi.css">
20
21
  </head>
21
22
  <body>
22
23
  <div id="root"></div>
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{A as i,J as a,K as o,T as s,V as c,k as l,st as u,u as d}from"./index-Dwo3Gxek.js";import{n as f}from"./jobBuckets-Dpjvbfm1.js";import{c as p,d as m,i as h,l as g,n as _,o as v,r as y,s as b,t as x,u as S}from"./activity-BEWV9er4.js";import{t as C}from"./EmptyState-1sPNleqv.js";import{t as w}from"./usePoll-bDFN-Hr6.js";var T=e(t(),1),E=n(),D=e=>e.catch(()=>null);function O({s:e}){let t=(0,T.useId)(),n=e.todos,r=b(e);return(0,E.jsxs)(`a`,{className:`card pad-md act-card`,href:`#/activity/${encodeURIComponent(e.session_id)}`,"aria-labelledby":`${t}-t ${t}-st`,"aria-describedby":r?`${t}-c`:void 0,children:[(0,E.jsx)(x,{s:e,id:t,heading:e.title||h(e.cwd)||e.session_id,children:(0,E.jsx)(c,{name:`chevron`,className:`glyph act-chev`})}),n&&n.total>0&&(0,E.jsx)(`div`,{className:`act-foot`,children:(0,E.jsxs)(`span`,{className:`row gap-8 dim act-sm`,children:[(0,E.jsx)(y,{done:n.done,total:n.total}),`plan `,n.done,`/`,n.total]})}),(0,E.jsxs)(`div`,{className:`dim mono act-updated`,children:[`updated `,o(e.updated_at),` ago`]})]})}var k=[[`all`,`All`],[`needs`,`Needs you`],[`runs`,`Runs`],[`gates`,`Gate asks`]];function A(){let e=new URLSearchParams(window.location.hash.split(`?`)[1]||``),t=e.get(`f`);return{f:k.some(([e])=>e===t)?t:`all`,host:e.get(`host`)||``,project:e.get(`project`)||``}}function j(e){let t=new URLSearchParams;e.f!==`all`&&t.set(`f`,e.f),e.host&&t.set(`host`,e.host),e.project&&t.set(`project`,e.project);let n=t.toString();window.history.replaceState(null,``,`#/activity${n?`?${n}`:``}`)}function M({enabled:e,onToggle:t}){return(0,E.jsxs)(`section`,{className:`card pad-md act-track`,"aria-labelledby":`act-track-h`,children:[(0,E.jsx)(c,{name:`activity`,className:`glyph act-fixed`}),(0,E.jsxs)(`div`,{className:`act-grow`,children:[(0,E.jsx)(`h2`,{id:`act-track-h`,className:`act-track-title`,children:e?`Live sessions are on`:`Live sessions are off`}),!e&&(0,E.jsx)(`p`,{className:`dim act-sm act-track-p`,children:`Runs and gate asks below come from the job log and the gate ledger. Turn tracking on to see what each session is doing now.`})]}),(0,E.jsxs)(`div`,{className:`row gap-10 act-fixed act-sm`,children:[(0,E.jsx)(`span`,{id:`act-track-l`,children:`Track live sessions`}),(0,E.jsx)(`div`,{className:`sw-toggle${e?` on`:``}`,role:`switch`,"aria-checked":e,"aria-labelledby":`act-track-l`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.key===` `&&e.preventDefault(),t())}})]})]})}function N({jobs:e,loading:t}){let n=typeof e?.cap==`number`?e.cap:void 0,r=g(e?.jobs,{days:14,cap:n}),i=m(r.map(e=>e.nodata?`-`:e.n).join(`,`),`scaleY`),a=Math.max(1,...r.map(e=>e.n)),o=r.reduce((e,t)=>e+t.n,0),s=r.find(e=>!e.nodata),c=r.some(e=>e.nodata),l=`Runs per day: ${r.filter(e=>e.n).map(e=>`${e.n} on ${S(e.key)}`).join(`, `)||`none`}.`+(c?s?` Days before ${S(s.key)} are older than the runs the log keeps.`:` No run is in the log yet.`:``);return(0,E.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-runs-h`,children:[(0,E.jsxs)(`div`,{className:`act-stat-head`,children:[(0,E.jsx)(`h2`,{id:`act-runs-h`,className:`act-lbl`,children:`Runs per day · 14 days`}),e&&(0,E.jsx)(`span`,{className:`act-big`,children:o})]}),t?(0,E.jsx)(`p`,{className:`dim act-sm`,children:`Reading the job log…`}):e?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`div`,{className:`act-runs`,role:`img`,"aria-label":l,ref:i,children:r.map(e=>e.nodata?(0,E.jsx)(`i`,{className:`nodata`},e.key):e.n?(0,E.jsx)(`i`,{"data-sweep":!0,style:{height:`${e.n/a*100}%`},title:`${S(e.key)}: ${e.n}`},e.key):(0,E.jsx)(`i`,{className:`zero`},e.key))}),(0,E.jsxs)(`div`,{className:`mono act-axis`,"aria-hidden":`true`,children:[(0,E.jsx)(`span`,{children:S(r[0].key)}),(0,E.jsx)(`span`,{children:S(r[7].key)}),(0,E.jsx)(`span`,{children:`today`})]}),c&&(0,E.jsxs)(`span`,{className:`dim act-xs`,children:[`Hatched: older than the runs the log keeps`,n?` (last ${n})`:``,`.`]})]}):(0,E.jsx)(`p`,{className:`dim act-sm`,children:`The job log could not be read.`})]})}function ee({rows:e,gates:t,loading:n}){let r=e.reduce((e,t)=>e+t.n,0);return(0,E.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-gates-h`,children:[(0,E.jsxs)(`div`,{className:`act-stat-head`,children:[(0,E.jsx)(`h2`,{id:`act-gates-h`,className:`act-lbl`,children:`Gate asks by rule · 30 days`}),t&&(0,E.jsx)(`span`,{className:`act-big`,children:r})]}),n?(0,E.jsx)(`p`,{className:`dim act-sm`,children:`Reading the gate ledger…`}):e.length?(0,E.jsx)(`ul`,{className:`gate-rows`,children:e.slice(0,6).map((e,t)=>(0,E.jsxs)(`li`,{children:[(0,E.jsxs)(`span`,{className:`act-ell`,children:[e.name,` `,(0,E.jsx)(`span`,{className:`mono dim act-xs`,children:e.rule})]}),(0,E.jsx)(_,{vals:e.per_day,i:t,sweep:!0}),(0,E.jsx)(`span`,{className:`mono`,children:e.n})]},e.rule))}):(0,E.jsx)(`p`,{className:`dim act-sm`,children:t?`No gate asked in 30 days.`:`The gate ledger could not be read.`})]})}var P={done:[`ok`,`done`],failed:[`bad`,`failed`],running:[``,`running`]};function F({job:e,longest:t}){let n=f(e),r=e.duration?Math.round(e.duration*10)/10:0,[i,a]=P[e.status]||[``,e.status||`…`],o=e.status===`running`?`Still running`:r?`Took ${r} second${r===1?``:`s`}`:`No duration`,s=e.started?new Date(e.started*1e3).toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`}):`—`;return(0,E.jsxs)(`li`,{className:`act-row`,children:[(0,E.jsx)(`span`,{className:`mono dim act-xs`,children:s}),(0,E.jsx)(c,{name:`play`,className:`glyph act-glyph`}),(0,E.jsxs)(`span`,{className:`act-what`,children:[(0,E.jsx)(`span`,{className:`act-row-title`,children:n.verb}),n.scope&&(0,E.jsx)(`span`,{className:`dim act-xs act-ell`,title:n.command,children:n.scope})]}),(0,E.jsx)(`span`,{className:`act-dur`,role:`img`,"aria-label":o,children:(0,E.jsx)(`span`,{"data-sweep":!0,style:{width:t>0?`${(e.duration||0)/t*100}%`:`0%`}})}),(0,E.jsx)(`span`,{className:`badge ${i}`,children:a})]})}function I({gate:e}){return(0,E.jsxs)(`li`,{className:`act-row gate`,children:[(0,E.jsx)(`span`,{className:`mono dim act-xs`,children:`—`}),(0,E.jsx)(c,{name:`rule`,className:`glyph act-glyph t-warn`}),(0,E.jsxs)(`span`,{className:`act-what`,children:[(0,E.jsx)(`span`,{className:`act-row-title`,children:e.title}),(0,E.jsx)(`span`,{className:`dim act-xs`,children:`Gate ledger`})]}),(0,E.jsx)(`span`,{className:`act-dur-none`,"aria-hidden":`true`}),(0,E.jsx)(`span`,{className:`badge warn`,children:`asked`})]})}var L=(e,t)=>[...new Set([...e.filter(Boolean),t].filter(Boolean))];function R(){let[e,t]=(0,T.useState)(null),[n,o]=(0,T.useState)(``),[c,f]=(0,T.useState)(A),g=e=>{let t={...c,...e};f(t),j(t)};w(e=>r.activity().then(n=>{e()&&(t(n),o(``))},t=>{e()&&o(t.message)}),2e3,[]);let _=a(()=>D(r.jobs()),[]),y=a(()=>D(r.gates()),[]),b=a(()=>D(r.catalog(`laws`)),[]),x=!e||e.enabled!==!1,S=[...e?.activity||[]].sort((e,t)=>e.session_id<t.session_id?-1:+(e.session_id>t.session_id)),P=u(),R=x&&e?S.filter(p).length:null,z=L(S.map(e=>e.host),c.host),B=L(S.map(e=>h(e.cwd)),c.project),V=c.host&&c.project?`host or project`:c.host?`host`:c.project?`project`:``,H=e=>(!c.host||e.host===c.host)&&(!c.project||h(e.cwd)===c.project),U=S.filter(e=>H(e)&&(c.f!==`needs`||p(e))),W=c.f===`all`||c.f===`needs`,G=!V&&(c.f===`all`||c.f===`runs`),K=!V&&(c.f===`all`||c.f===`gates`),q=_.data?.jobs||[],J=d(y.data,b.data),Y=v(q,J,y.data?.days).map(e=>({...e,runs:G?e.runs:[],gate:K?e.gate:null})).filter(e=>e.runs.length||e.gate),X=Math.max(0,...q.map(e=>e.duration||0)),Z=m(Y.flatMap(e=>e.runs.map(e=>`${e.id}:${e.duration}`)).join(`,`),`scaleX`),Q=async()=>{let e=!x;try{let n=await r.activityToggle(e);if(n.ok===!1){o(n.error||`Could not change tracking`);return}t(e=>({...e||{},enabled:n.enabled,activity:n.enabled&&e?.activity||[]})),o(``)}catch(e){o(e.message)}},$=(e,t,n)=>(0,E.jsxs)(`span`,{className:`row gap-8 act-sm`,children:[(0,E.jsx)(`label`,{htmlFor:`act-f-${e}`,children:t}),(0,E.jsxs)(`select`,{id:`act-f-${e}`,className:`sel`,value:c[e],disabled:n.length===0,title:n.length===0?`No source carries a ${e} yet`:void 0,onChange:t=>g({[e]:t.target.value}),children:[(0,E.jsxs)(`option`,{value:``,children:[`All `,e===`host`?`hosts`:`projects`]}),n.map(e=>(0,E.jsx)(`option`,{value:e,children:e},e))]})]});return(0,E.jsxs)(`div`,{className:`narrow`,children:[(0,E.jsx)(s,{title:`Activity`,sub:`What your agents ran, what the gates asked, and which sessions are waiting on you.`}),n&&(0,E.jsx)(`div`,{className:`act-gap`,children:(0,E.jsx)(l,{error:n})}),e&&(0,E.jsx)(M,{enabled:x,onToggle:Q}),(0,E.jsxs)(`div`,{className:`act-today`,children:[(0,E.jsx)(N,{jobs:_.data,loading:_.loading}),(0,E.jsx)(ee,{rows:J,gates:y.data,loading:y.loading}),(0,E.jsxs)(`section`,{className:`card pad-md act-stat`,"aria-labelledby":`act-wait-h`,children:[(0,E.jsx)(`h2`,{id:`act-wait-h`,className:`act-lbl`,children:`Waiting on you`}),(0,E.jsxs)(`span`,{className:`act-big act-wait`,children:[R??`—`,` `,(0,E.jsx)(`span`,{className:`dim act-sm`,children:`sessions`})]}),(0,E.jsx)(`p`,{className:`dim act-sm`,children:x?`A session that waits on an approval or on your answer counts here.`:`Turn tracking on to count the sessions that wait on you.`})]})]}),(0,E.jsxs)(`div`,{className:`row wrap gap-8 act-filters`,children:[(0,E.jsx)(`div`,{role:`group`,"aria-label":`Filter`,className:`row wrap gap-8`,children:k.map(([e,t])=>(0,E.jsxs)(`button`,{type:`button`,className:c.f===e?`chip-f on`:`chip-f`,"aria-pressed":c.f===e,onClick:()=>g({f:e}),children:[t,e===`needs`&&R>0?(0,E.jsxs)(`span`,{className:`mono`,children:[` `,R]}):null]},e))}),$(`host`,`Host`,z),$(`project`,`Project`,B)]}),V&&c.f!==`needs`&&(0,E.jsxs)(`p`,{className:`dim act-sm`,children:[`Runs and gate asks carry no `,V,`; showing sessions only.`]}),W&&(e?!x&&c.f!==`needs`?null:U.length===0?c.f===`needs`?(0,E.jsx)(C,{title:`Nothing waits on you`}):(0,E.jsxs)(C,{title:`No active sessions`,children:[`Run `,(0,E.jsx)(`code`,{children:`opencode`}),` and the sessions it spins up appear here.`]}):(0,E.jsx)(`div`,{className:`stack gap-12 act-live`,ref:P,children:U.map(e=>(0,E.jsx)(`div`,{"data-flip":e.session_id,children:(0,E.jsx)(O,{s:e})},e.session_id))}):(0,E.jsx)(i,{label:`Reading live sessions…`})),c.f!==`needs`&&(0,E.jsx)(`section`,{"aria-label":`Feed`,className:`stack gap-16 act-feed`,ref:Z,children:Y.map(e=>(0,E.jsxs)(`section`,{className:`card act-day`,children:[(0,E.jsxs)(`h3`,{className:`act-day-h`,children:[(0,E.jsx)(`span`,{children:e.title}),(0,E.jsx)(`span`,{className:`mono dim`,children:e.sum})]}),(0,E.jsxs)(`ul`,{className:`act-rows`,children:[e.runs.map(e=>(0,E.jsx)(F,{job:e,longest:X},e.id)),e.gate&&(0,E.jsx)(I,{gate:e.gate})]})]},e.key))})]})}export{R as default};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{A as i,K as a,T as o,V as s,k as c}from"./index-Dwo3Gxek.js";import{a as l,i as u,t as d}from"./activity-BEWV9er4.js";import{t as f}from"./EmptyState-1sPNleqv.js";import{t as p}from"./usePoll-bDFN-Hr6.js";var m=e(t(),1),h=n();function g(e){return e.kind===`tool`?e.status===`error`?`bad`:e.status===`completed`?`ok`:`acc`:{retry:`warn`,error:`bad`,subtask:`acc`,text:`acc`}[e.kind]||``}function _({rec:e}){let t=e.who===`you`,n=[];t||(e.kind===`tool`&&e.ms!=null&&n.push(`${(e.ms/1e3).toFixed(1)}s`),e.kind===`step`&&(e.tokens&&n.push(`${l(e.tokens)} tok`),e.cost&&n.push(`$${e.cost.toFixed(2)}`)),e.kind===`subtask`&&e.agent&&n.unshift(e.agent));let r=!t&&(e.kind===`text`||e.kind===`thinking`||e.kind===`step`),i=t?e.text:e.label||e.snippet||e.kind;return(0,h.jsxs)(`div`,{className:`row gap-10 act-line`,children:[(0,h.jsx)(`span`,{className:`badge act-who ${t?``:`acc`}`,children:t?`you`:`agent`}),(0,h.jsxs)(`div`,{className:`act-grow act-sm`,children:[!t&&(0,h.jsx)(`span`,{className:`feed-dot act-inline-dot ${g(e)||`acc`}`}),e.kind===`thinking`&&(0,h.jsx)(`span`,{className:`dim`,children:`thinking: `}),r?(0,h.jsx)(`span`,{className:`dim`,children:i}):t?i:(0,h.jsx)(`b`,{children:i}),e.error&&(0,h.jsxs)(`span`,{className:`dim`,children:[`: `,e.error]})]}),n.length>0&&(0,h.jsx)(`span`,{className:`dim mono act-xs act-fixed`,children:n.join(` · `)}),e.t?(0,h.jsx)(`time`,{className:`mono dim act-xs act-fixed`,dateTime:new Date(e.t).toISOString(),title:`${a(e.t/1e3)} ago`,children:new Date(e.t).toTimeString().slice(0,8)}):null]})}function v({turns:e}){return!e||e.length===0?(0,h.jsx)(`div`,{className:`dim act-sm`,children:`No conversation captured yet.`}):(0,h.jsx)(`div`,{className:`stack gap-12`,children:e.map((e,t)=>{let n=e.role===`user`;return(0,h.jsxs)(`div`,{className:`row gap-10 act-line`,children:[(0,h.jsx)(`span`,{className:`badge act-who ${n?``:`acc`}`,children:n?`you`:`agent`}),(0,h.jsx)(`div`,{className:`act-min act-sm${n?``:` muted`}`,children:e.text})]},t)})})}function y({sid:e}){let[t,n]=(0,m.useState)(null),[l,g]=(0,m.useState)(``),[y,b]=(0,m.useState)(!1),[x,S]=(0,m.useState)(!1),C=(0,m.useId)();p(t=>y?void 0:r.activityDetail(e).then(e=>{t()&&(n(e),g(``),b(!1))},e=>{t()&&(e.status===404?b(!0):g(e.message))}),2e3,[e,y]);let w=(0,h.jsxs)(`a`,{className:`btn ghost sm act-back`,href:`#/activity`,children:[(0,h.jsx)(s,{name:`arrow`}),` Activity`]});if(y)return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,(0,h.jsx)(f,{title:`Session ended`,action:(0,h.jsx)(`a`,{href:`#/activity`,children:`Back to Activity`}),children:`It's no longer live.`})]});if(!t)return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,l?(0,h.jsx)(c,{error:l}):(0,h.jsx)(i,{label:`Loading session…`})]});let T=t.session,E=T.files,D=T.todos,O=!!(E&&E.items&&E.items.length>0),k=!!(D&&D.items&&D.items.length>0),A=t.conversation||[],j=t.timeline||[],M=[...A.filter(e=>e.role===`user`).map(e=>({who:`you`,text:e.text,t:e.t||0})),...j.map(e=>({...e,who:`agent`}))].sort((e,t)=>(e.t||0)-(t.t||0));return(0,h.jsxs)(`div`,{className:`narrow`,children:[w,(0,h.jsx)(o,{title:T.title||u(T.cwd)||T.session_id,sub:T.cwd?(0,h.jsx)(`span`,{className:`mono act-cwd`,title:T.cwd,children:T.cwd}):null}),l&&(0,h.jsx)(`div`,{className:`act-gap`,children:(0,h.jsx)(c,{error:l})}),(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(d,{s:T}),(0,h.jsxs)(`div`,{className:`dim act-updated`,children:[`updated `,a(T.updated_at),` ago`]})]}),(O||k)&&(0,h.jsxs)(`div`,{className:`grid gap-12 act-panels${O&&k?` two`:``}`,children:[O&&(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(`div`,{className:`card-head`,children:(0,h.jsxs)(`h2`,{children:[`Files touched `,(0,h.jsxs)(`span`,{className:`dim`,children:[`(`,E.count,`)`]})]})}),(0,h.jsx)(`div`,{className:`stack act-list`,children:E.items.map(e=>(0,h.jsxs)(`div`,{className:`row between gap-12 act-sm`,children:[(0,h.jsx)(`span`,{className:`mono act-ell act-grow`,title:e.file,children:e.file}),(0,h.jsxs)(`span`,{className:`act-fixed`,children:[(0,h.jsxs)(`span`,{className:`t-good`,children:[`+`,e.additions]}),` `,(0,h.jsxs)(`span`,{className:`t-bad`,children:[`−`,e.deletions]})]})]},e.file))})]}),k&&(0,h.jsxs)(`div`,{className:`card pad-md`,children:[(0,h.jsx)(`div`,{className:`card-head`,children:(0,h.jsxs)(`h2`,{children:[`Plan`,` `,(0,h.jsxs)(`span`,{className:`dim`,children:[`(`,D.done,`/`,D.total,`)`]})]})}),(0,h.jsx)(`div`,{className:`stack act-list`,children:D.items.map((e,t)=>(0,h.jsxs)(`div`,{className:`row gap-8 act-sm`,children:[(0,h.jsx)(`span`,{className:`feed-dot ${e.status===`completed`?`ok`:e.status===`in_progress`?`acc`:``}`}),(0,h.jsx)(`span`,{className:e.status===`completed`?`act-done`:void 0,children:e.content})]},t))})]})]}),(0,h.jsxs)(`div`,{className:`card pad-md act-mt`,children:[(0,h.jsxs)(`div`,{className:`card-head act-tl-head`,children:[(0,h.jsx)(`h2`,{children:`Timeline`}),j.length>0&&(0,h.jsx)(`button`,{className:`btn ghost sm`,"aria-expanded":x,"aria-controls":C,onClick:()=>S(e=>!e),children:x?`Show conversation`:`Show full stream (${M.length})`})]}),(0,h.jsx)(`div`,{id:C,children:x?(0,h.jsx)(`div`,{className:`stack gap-12`,children:M.map((e,t)=>(0,h.jsx)(_,{rec:e},t))}):(0,h.jsx)(v,{turns:A})})]})]})}export{y as default};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/GreenhouseView-BCiZP9f9.js","assets/rolldown-runtime-hePW80VL.js","assets/react-DlYQp10C.js","assets/sections-ChwaobfW.js","assets/index-Dwo3Gxek.js","assets/api-BfpZmUMI.js","assets/index-CDSHv_7s.css","assets/jobBuckets-Dpjvbfm1.js","assets/OperatorHudView-BLXm0zzn.js","assets/JournalView-BSR51TKR.js","assets/drawable-ixCquffB.js"])))=>i.map(i=>d[i]);
2
- import{n as e,r as t}from"./rolldown-runtime-hePW80VL.js";import{i as n,t as r}from"./react-DlYQp10C.js";import{t as i}from"./api-BfpZmUMI.js";import{t as a}from"./drawable-ixCquffB.js";import{n as o,r as s}from"./sections-ChwaobfW.js";import{A as c,G as l,J as u,K as d,M as f,O as p,U as m,V as h,W as g,at as _,ft as v,it as y,k as b,l as x,lt as S,ot as C,rt as w,t as T,tt as E,w as D}from"./index-Dwo3Gxek.js";import{r as O}from"./jobBuckets-Dpjvbfm1.js";var k=t(n(),1),A=r();function j({segments:e,value:t,max:n,size:r=120,stroke:i=12,label:o,sweepMs:s=650}){let c=n>0?n:0,l=e||[{key:`v`,label:o,n:Math.min(Math.max(t||0,0),c),tone:`accent`}],u=e?l.reduce((e,t)=>e+t.n,0):c,d=e?l.map(e=>`${e.label}: ${e.n} of ${u}`).join(`, `):`${l[0].n} of ${u}`,f=r/2-i/2,p=r/2,m=e=>[p+f*Math.cos(e),p+f*Math.sin(e)],h=[],g=0;for(let e of l)h.push(g),g+=e.n;let b=(0,k.useRef)(null),x=l.map(e=>e.n).join(`,`);return(0,k.useLayoutEffect)(()=>{let e=b.current?.querySelectorAll(`path.ring-arc`);if(!s||!e?.length||!y())return;let t=l.map(e=>e.n/u).filter(e=>e>0),n=t.map((e,n)=>t.slice(0,n).reduce((e,t)=>e+t,0)),r=a(e);S(r,{draw:`0 0`});let i=v(r,{draw:[`0 0`,`0 1`],duration:(e,n)=>Math.max(s*t[n],60),delay:(e,t)=>s*n[t],ease:`linear`});return _(i,s)},[x,s]),(0,A.jsxs)(`svg`,{className:`ring`,width:r,height:r,viewBox:`0 0 ${r} ${r}`,role:`img`,"aria-label":o?`${o}: ${d}`:d,children:[(0,A.jsx)(`circle`,{className:`ring-track`,cx:p,cy:p,r:f,fill:`none`,strokeWidth:i}),(0,A.jsx)(`g`,{ref:b,children:u>0?l.map((e,t)=>{let n=e.n/u;if(!(n>0))return null;let r=h[t]/u*2*Math.PI-Math.PI/2,a=r+n*2*Math.PI,[o,s]=m(r),[c,l]=m(a),d=n>=.9999?`M ${o} ${s} A ${f} ${f} 0 1 1 ${2*p-o} ${2*p-s} A ${f} ${f} 0 1 1 ${o} ${s}`:`M ${o} ${s} A ${f} ${f} 0 ${+(n>.5)} 1 ${c} ${l}`;return(0,A.jsx)(`path`,{className:`ring-arc tone-${e.tone||`muted`}`,d,fill:`none`,strokeWidth:i,children:(0,A.jsxs)(`title`,{children:[e.label,`: `,e.n]})},e.key)}):null})]})}var M={neutral:`Loaded & ready`,imperial:`The Codex in force`,military:`The unit stands ready`,cyberpunk:`Jacked in`,wizard:`Wards in place`,pirate:`The crew stands ready`,gamer:`Game loaded`,sports:`The squad takes the field`,biker:`The crew rolls out`,commentator:`Lights out, away we go`,verstappen:`Setup's in`,joker:`Mic check`,mean:`Rules are up`,marvin:`Online. Reluctantly.`},N=(e,t)=>e.deployed?t===void 0||t===`good`?M[e.theme]||`Loaded & ready`:`Deployed`:`Not deployed`,P={good:`ok`,warn:`warn`,bad:`bad`};function F({verdict:e}){return e?(0,A.jsxs)(`span`,{className:`badge ${P[e.tone]}`,role:`status`,style:{alignSelf:`flex-start`},children:[(0,A.jsx)(`span`,{className:`dot`}),e.head]}):null}function I({overview:e,dataRev:t}){let{data:n}=u(()=>Promise.resolve().then(()=>i.catalog(`laws`)),[t],`catalog:laws`),r=m(e.diff),a=e.counts||{},o=[{key:`agents`,label:`Agents`,hash:`#/agents`},{key:`skills`,label:`Skills`,hash:`#/skills`},{key:`laws`,label:n?.nouns?.laws||`Dictates`,hash:`#/laws`}];return(0,A.jsxs)(`div`,{className:`card kpiband rise mb-16`,children:[o.map(e=>{let t=a[e.key];return(0,A.jsxs)(`a`,{className:`kseg`,href:e.hash,title:`Open ${e.label}`,children:[(0,A.jsx)(`span`,{className:`kseg-n`+(t===0?` zero`:``),children:t==null?`—`:(0,A.jsx)(w,{value:t})}),(0,A.jsx)(`span`,{className:`kseg-l`,children:e.label})]},e.key)}),(0,A.jsx)(`div`,{className:`kseg-spacer`}),(0,A.jsxs)(`button`,{className:`kseg`+(r>0?` hot`:``),onClick:()=>E(`#/diff`),title:`Open changes`,children:[(0,A.jsx)(`span`,{className:`kseg-n`+(r===0?` zero`:``),children:(0,A.jsx)(w,{value:r})}),(0,A.jsx)(`span`,{className:`kseg-l`,children:`Local edits`}),r>0&&(0,A.jsx)(`span`,{className:`delta up`,children:`▲`})]})]})}function L({overview:e}){return(0,A.jsx)(`div`,{className:`genome`,children:s.map((t,n)=>{let r=o[t],i=e.counts?.[t];return(0,A.jsxs)(`div`,{className:`card gcell rise`,style:{"--i":n},onClick:()=>E(`#/section/`+t),children:[(0,A.jsxs)(`div`,{className:`gtop`,children:[(0,A.jsx)(`span`,{className:`gname`,children:r.label}),(0,A.jsx)(h,{name:r.icon,className:`gicon`})]}),(0,A.jsx)(`div`,{className:`gcount`+(i===0?` zero`:``),children:i==null?`—`:(0,A.jsx)(w,{value:i})}),(0,A.jsx)(`div`,{className:`gdesc`,children:r.desc})]},t)})})}function R({jobs:e}){if(!e||e.length===0)return(0,A.jsx)(`div`,{className:`feed`,children:(0,A.jsxs)(`div`,{className:`empty`,children:[(0,A.jsx)(`div`,{className:`big`,children:`No activity yet`}),`Actions you run appear here.`]})});let t={done:`ok`,running:`acc`,failed:`bad`},n=O(e,8);return(0,A.jsx)(`div`,{className:`feed`,children:n.map(e=>(0,A.jsxs)(`div`,{className:`feed-row`,children:[(0,A.jsx)(`span`,{className:`feed-dot ${t[e.status]||`ok`}`}),(0,A.jsx)(`span`,{className:`feed-txt`,children:(0,A.jsx)(`b`,{children:e.action})}),(0,A.jsxs)(`span`,{className:`feed-when`,children:[d(e.started),` ago`]})]},e.id))})}function z({value:e}){let t=C(e,1100)??0,n=Math.round(t*100);return(0,A.jsxs)(`div`,{className:`ring-box`,children:[(0,A.jsx)(j,{value:n,max:100,label:`germination`,size:232,stroke:10,sweepMs:0}),(0,A.jsxs)(`div`,{className:`ring-center`,children:[(0,A.jsxs)(`div`,{className:`pct`,children:[n,(0,A.jsx)(`span`,{className:`pct-unit`,children:`%`})]}),(0,A.jsx)(`div`,{className:`lbl`,children:`germination`})]})]})}function B({overview:e,sigil:t,setup:n,jobs:r,lens:i,dataRev:a}){let o=N(e,i?.tone),c=l(e,n,i?.tone);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`card pad-lg rise mb-16`,children:(0,A.jsxs)(`div`,{className:`hero`,children:[(0,A.jsx)(z,{value:c}),(0,A.jsxs)(`div`,{className:`hero-facts`,children:[(0,A.jsx)(`div`,{className:`ttl`,children:o}),(0,A.jsx)(F,{verdict:i?.verdict}),t&&(0,A.jsxs)(`div`,{className:`voice-readout`,children:[(0,A.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,A.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,A.jsxs)(`p`,{className:`sub`,children:[`One source rendered into `,(0,A.jsx)(`code`,{children:e.target}),`. Every repo on this machine inherits it.`]}),(0,A.jsxs)(`div`,{className:`hero-chips`,children:[(0,A.jsxs)(`span`,{className:`chip`,children:[(0,A.jsx)(`span`,{className:`ck`,children:`voice`}),(0,A.jsx)(`span`,{className:`cv t-cap`,children:e.theme})]}),(0,A.jsxs)(`span`,{className:`chip`,children:[(0,A.jsx)(`span`,{className:`ck`,children:`mode`}),(0,A.jsx)(`span`,{className:`cv`,children:e.emit})]}),(0,A.jsxs)(`span`,{className:`chip`,children:[(0,A.jsx)(`span`,{className:`ck`,children:`footprint`}),(0,A.jsx)(`span`,{className:`cv`,children:e.footprint})]}),(0,A.jsxs)(`span`,{className:`chip`,children:[(0,A.jsx)(`span`,{className:`ck`,children:`built`}),(0,A.jsx)(`span`,{className:`cv`,children:e.build_time||`unknown`})]}),(0,A.jsxs)(`span`,{className:`chip`,children:[(0,A.jsx)(`span`,{className:`ck`,children:`fp`}),(0,A.jsx)(`span`,{className:`cv`,children:n?.installed_fp||`—`})]})]})]})]})}),(0,A.jsx)(I,{overview:e,dataRev:a}),(0,A.jsxs)(`div`,{className:`grid split-status`,children:[(0,A.jsxs)(`div`,{className:`card pad-lg`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h3`,{children:`Capability genome`}),(0,A.jsx)(`div`,{className:`right`,children:(0,A.jsxs)(`span`,{className:`tick`,children:[s.length,` sections`]})})]}),(0,A.jsx)(L,{overview:e})]}),(0,A.jsxs)(`div`,{className:`card pad-lg`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h3`,{children:`Recent activity`}),(0,A.jsx)(`div`,{className:`right`,children:(0,A.jsxs)(`span`,{className:`badge acc`,children:[(0,A.jsx)(`span`,{className:`dot`}),`live`]})})]}),(0,A.jsx)(R,{jobs:r})]})]})]})}function V({k:e,overview:t,max:n}){let r=o[e],i=t.counts?.[e]??0;return(0,A.jsxs)(`div`,{className:`strand`,children:[(0,A.jsxs)(`span`,{className:`strand-name`,children:[(0,A.jsx)(`span`,{className:`strand-dot`}),(0,A.jsx)(`a`,{href:`#/section/`+e,className:`strand-link stretch-link`,children:r.label})]}),(0,A.jsx)(`div`,{className:`hbar`,children:(0,A.jsx)(`i`,{style:{width:`${i/n*100}%`}})}),(0,A.jsx)(`span`,{className:`strand-val`,children:i})]})}function H(e){return e?e.includes(`up to date`)?{label:`in sync`,tone:`ok`}:e.includes(`no Geneseed install`)?{label:`not installed`,tone:``}:{label:`behind source`,tone:`warn`}:null}function U({overview:e,sigil:t,setup:n,jobs:r,lens:i}){let a=g(e.counts),o=n?.version_verdict||``,c=H(o),l=m(e.diff),u=[[`Source`,`src/, the canonical genetic material`,n?.source_fp||`—`,!0],[`Render`,`geneseed build → ${e.emit}`,e.theme+` voice`,!0],[`Deployed`,e.target,`inherited by every repo`,!1]];return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`mb-16`,children:(0,A.jsxs)(`div`,{className:`card pad-lg rise`,style:{position:`relative`,overflow:`hidden`},children:[(0,A.jsx)(`h2`,{className:`h`,style:{fontSize:22,margin:`0 0 18px`},children:`Gene-seed lineage`}),(0,A.jsxs)(`div`,{className:`lineage-track`,children:[(0,A.jsx)(`div`,{className:`spine`}),u.map(([e,t,n,r],i)=>(0,A.jsxs)(`div`,{className:`lineage-step`,children:[(0,A.jsx)(`span`,{className:`node ${r?`on`:``}`}),(0,A.jsx)(`div`,{className:`lt`,children:e}),(0,A.jsx)(`div`,{className:`ld`,children:t}),(0,A.jsx)(`div`,{className:`ltag`,children:n})]},i))]}),(0,A.jsx)(`hr`,{className:`hr`}),t&&(0,A.jsxs)(`div`,{className:`voice-readout`,style:{marginBottom:14},children:[(0,A.jsx)(`span`,{className:`vr-cur`,children:`▕`}),(0,A.jsx)(`span`,{className:`vr-txt`,children:t})]},e.theme),(0,A.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,A.jsx)(F,{verdict:i?.verdict}),c&&(0,A.jsxs)(`span`,{className:`badge ${c.tone}`,title:o,children:[(0,A.jsx)(`span`,{className:`dot`}),c.label]}),(0,A.jsxs)(`span`,{className:`badge`,children:[(0,A.jsx)(`span`,{className:`dot`}),l,` local edits`]})]})]})}),(0,A.jsxs)(`div`,{className:`grid split-even`,children:[(0,A.jsxs)(`div`,{className:`card pad-lg`,children:[(0,A.jsxs)(`div`,{className:`card-head`,children:[(0,A.jsx)(`h3`,{children:`Genome strand`}),(0,A.jsx)(`div`,{className:`right`,children:(0,A.jsx)(`span`,{className:`tick`,children:`by volume`})})]}),s.map(t=>(0,A.jsx)(V,{k:t,overview:e,max:a},t))]}),(0,A.jsxs)(`div`,{className:`card pad-lg`,children:[(0,A.jsx)(`div`,{className:`card-head`,children:(0,A.jsx)(`h3`,{children:`Recent activity`})}),(0,A.jsx)(R,{jobs:r})]})]})]})}function W({overview:e,setup:t,jobs:n,lens:r}){let i=s.reduce((t,n)=>t+(e.counts?.[n]??0),0),a=g(e.counts),c=e.doctor?.ok,l=e.doctor?.problems?.length??0,u=m(e.diff);return(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(`div`,{className:`card pad-md rise mb-16`,children:(0,A.jsx)(`div`,{className:`row wrap between gap-16`,children:(0,A.jsxs)(`div`,{className:`row`,style:{gap:20,flexWrap:`wrap`},children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`tick`,children:`status`}),(0,A.jsxs)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:[(0,A.jsxs)(`span`,{className:`badge ${e.deployed?`ok`:`warn`}`,children:[(0,A.jsx)(`span`,{className:`dot`}),e.deployed?`deployed`:`not deployed`]}),(0,A.jsx)(F,{verdict:r?.verdict})]})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`tick`,children:`voice`}),(0,A.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6,textTransform:`capitalize`},children:e.theme})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`tick`,children:`mode`}),(0,A.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6},children:e.emit})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`tick`,children:`fingerprint`}),(0,A.jsx)(`div`,{className:`mono`,style:{fontSize:14,marginTop:6,color:`var(--accent)`},children:t?.installed_fp||`—`})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`tick`,children:`doctor`}),(0,A.jsx)(`div`,{className:`row`,style:{gap:8,marginTop:4},children:c?(0,A.jsxs)(`span`,{className:`badge ok`,children:[(0,A.jsx)(`span`,{className:`dot`}),`clean`]}):(0,A.jsxs)(`span`,{className:`badge warn`,children:[(0,A.jsx)(`span`,{className:`dot`}),l,` issue`,l===1?``:`s`]})})]}),(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`div`,{className:`tick`,children:`edits`}),(0,A.jsx)(`div`,{className:`metric`,style:{fontSize:18,marginTop:6},children:u})]})]})})}),(0,A.jsxs)(`div`,{className:`grid split-operator`,children:[(0,A.jsxs)(`div`,{className:`card rise`,style:{"--i":1},children:[(0,A.jsxs)(`div`,{className:`card-head pad-lg`,style:{padding:`18px 20px 0`,marginBottom:14},children:[(0,A.jsx)(`h3`,{children:`Sections`}),(0,A.jsx)(`div`,{className:`right`,children:(0,A.jsxs)(`span`,{className:`tick`,children:[i,` entries total`]})})]}),(0,A.jsxs)(`table`,{className:`tbl`,children:[(0,A.jsx)(`thead`,{children:(0,A.jsxs)(`tr`,{children:[(0,A.jsx)(`th`,{children:`Section`}),(0,A.jsx)(`th`,{children:`Detail`}),(0,A.jsx)(`th`,{style:{width:130},children:`Share`}),(0,A.jsx)(`th`,{className:`num`,children:`Count`})]})}),(0,A.jsx)(`tbody`,{children:s.map(t=>{let n=o[t],r=e.counts?.[t]??0;return(0,A.jsxs)(`tr`,{className:`clickable`,children:[(0,A.jsx)(`td`,{className:`name`,children:(0,A.jsx)(`a`,{href:`#/section/`+t,className:`stretch-link`,children:n.label})}),(0,A.jsx)(`td`,{className:`muted`,children:n.desc}),(0,A.jsx)(`td`,{children:(0,A.jsx)(`div`,{className:`hbar`,children:(0,A.jsx)(`i`,{style:{width:`${r/a*100}%`}})})}),(0,A.jsx)(`td`,{className:`num`,children:r})]},t)})})]})]}),(0,A.jsxs)(`div`,{className:`card pad-lg rise`,style:{"--i":2},children:[(0,A.jsx)(`div`,{className:`card-head`,children:(0,A.jsx)(`h3`,{children:`Run log`})}),(0,A.jsx)(R,{jobs:n})]})]})]})}var G=Symbol(`failed`),K=e=>Promise.resolve().then(e).catch(()=>G);function q({dataRev:e,needDoctor:t}){let n=u(()=>K(()=>i.fleet()),[e]),r=u(()=>t?K(()=>i.doctor()):Promise.resolve(null),[t,e]),a=n.data,o=a==null?`loading`:a===G?`failed`:`ok`,s=o===`ok`?a:null,c=s?x(s):null,l=r.data,d=t?l==null?`loading`:l===G?`failed`:`ok`:`idle`;return{fleet:s,fleetState:o,verdict:c,tone:o===`failed`?`failed`:c?.tone,doctor:{state:d,data:d===`ok`?r.data:null}}}var J=e({default:()=>Q}),Y=(0,k.lazy)(()=>T(()=>import(`./GreenhouseView-BCiZP9f9.js`),__vite__mapDeps([0,1,2,3,4,5,6,7]))),X=(0,k.lazy)(()=>T(()=>import(`./OperatorHudView-BLXm0zzn.js`),__vite__mapDeps([8,1,2,3,4,5,6,7]))),Z=(0,k.lazy)(()=>T(()=>import(`./JournalView-BSR51TKR.js`),__vite__mapDeps([9,1,2,5,10,4,3,6])));function Q({overview:e,overviewError:t,onRetry:n,themes:r,setup:a,runs:o,onAction:s,layout:l=`cultivar`,dataRev:d}){let m=l,[h,g]=(0,k.useState)(`status`),_=e&&r.find(t=>t.name===e.theme)?.sigil||``,v=q({dataRev:d,needDoctor:m===`greenhouse`||m===`operator`}),{data:y}=u(()=>m===`journal`?i.recent().catch(()=>null):Promise.resolve(null),[m,d]);if(!e)return t?(0,A.jsx)(b,{error:`Could not load the harness overview: ${t}`,onRetry:n}):(0,A.jsx)(c,{});let x=e.daemon_stale?(0,A.jsx)(p,{}):null;return e.deployed?h===`status`&&m===`journal`?(0,A.jsxs)(k.Suspense,{fallback:(0,A.jsx)(c,{}),children:[x,(0,A.jsx)(Z,{overview:e,recent:y,lens:v,onDirection:g,dataRev:d})]}):(0,A.jsxs)(A.Fragment,{children:[x,(0,A.jsx)(`div`,{className:`head-row`,children:(0,A.jsx)(f,{"aria-label":`Dashboard view`,children:[[`status`,`Status`],[`lineage`,`Lineage`],[`operator`,`Operator`,`Operator data`]].map(([e,t,n])=>(0,A.jsx)(`button`,{className:h===e?`on`:``,onClick:()=>g(e),"aria-pressed":h===e,"aria-label":n,children:t},e))})}),(0,A.jsxs)(`div`,{className:`view-in`,children:[h===`status`&&m===`cultivar`&&(0,A.jsx)(B,{overview:e,sigil:_,setup:a,jobs:o,lens:v,dataRev:d}),h===`status`&&m===`greenhouse`&&(0,A.jsx)(k.Suspense,{fallback:(0,A.jsx)(c,{}),children:(0,A.jsx)(Y,{overview:e,sigil:_,jobs:o,lens:v,onAction:s})}),h===`status`&&m===`operator`&&(0,A.jsx)(k.Suspense,{fallback:(0,A.jsx)(c,{}),children:(0,A.jsx)(X,{overview:e,jobs:o,lens:v})}),h===`lineage`&&(0,A.jsx)(U,{overview:e,sigil:_,setup:a,jobs:o,lens:v}),h===`operator`&&(0,A.jsx)(W,{overview:e,setup:a,jobs:o,lens:v})]},h)]}):(0,A.jsxs)(A.Fragment,{children:[x,(0,A.jsx)(D,{onAction:s})]})}export{Q as default,j as i,F as n,N as r,J as t};
@@ -1,4 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{A as i,F as a,I as o,J as s,M as c,P as l,T as u,V as d,a as f,c as p,i as m,k as h,n as g,o as _,r as v,s as ee,tt as y}from"./index-Dwo3Gxek.js";import{t as b}from"./EmptyState-1sPNleqv.js";import{a as te,n as ne,o as x,r as S,t as C}from"./RailCats-DNlJKicm.js";import{i as w,n as T,r as E}from"./Markdown-OReRRoEV.js";var D=e(t(),1);function O(e,t=0){let n=String(e).toLowerCase().trim().replace(/[^a-z0-9\s-]/g,``).replace(/\s+/g,`-`).replace(/-+/g,`-`).replace(/^-+|-+$/g,``);return n&&/^[a-z]/.test(n)?n:`h-${t}-${n||`section`}`}function k(e){let t=[],n=[],r=`before`;for(let i of(e||``).split(`
2
- `))r===`before`&&/^\|\s*piece\s*\|/i.test(i)?r=`map`:r===`map`&&!i.trimStart().startsWith(`|`)&&(r=`after`),r===`before`?t.push(i):r===`after`&&n.push(i);return[t.join(`
3
- `),n.join(`
4
- `)]}function A(e,t){let n=document.createElement(`template`);return n.innerHTML=e,n.content.querySelectorAll(`h1, h2, h3`).forEach(e=>{e.tagName!==`H1`&&(t.idx+=1);let n=e.id||O(e.textContent||``,t.idx),r=n;for(let e=2;t.ids.has(r);e++)r=`${n}-${e}`;t.ids.add(r),e.id=r,e.tagName!==`H1`&&t.toc.push({level:Number(e.tagName[1]),title:(e.textContent||``).trim(),id:r})}),n.content.querySelectorAll(`table`).forEach(e=>{let t=document.createElement(`div`);t.className=`table-scroll`,t.setAttribute(`tabindex`,`0`),t.setAttribute(`role`,`region`),t.setAttribute(`aria-label`,`Table`),e.replaceWith(t),t.appendChild(e)}),n.innerHTML}function j(e){let t={ids:new Set,idx:0,toc:[]},n=n=>A(T(n,e?.links),t);if(e?.rows){let[r,i]=k(e.body);return{before:n(r),after:n(i),toc:t.toc}}return{html:n(e?.body),toc:t.toc}}var M=n(),N={"opencode-global":[`install-opencode`,`Global (recommended)`],opencode:[`install-opencode`,`Per repo`],"claude-global":[`install-claude-code`],claude:[`install-claude-code`],"openclaude-global":[`install-openclaude`],openclaude:[`install-openclaude`],"bob-global":[`install-bob`],bob:[`install-bob`],files:[`install-agent-md`]},P=`you already know this`;function F({page:e,overview:t,onAction:n}){let r=(0,D.useRef)(null),i=(0,D.useMemo)(()=>j({body:e.body,links:e.links}).html,[e.body,e.links]);(0,D.useEffect)(()=>{let e=r.current;e&&e.querySelectorAll(`blockquote`).forEach(e=>{(e.querySelector(`strong`)?.textContent||``).toLowerCase().startsWith(P)&&e.classList.add(`analogy`)})},[i]),(0,D.useEffect)(()=>{let e=r.current;if(!e)return;let t=e=>{let t=e.target.closest(`a[href]`);if(!t)return;let n=t.getAttribute(`href`);n&&n.startsWith(`#/`)&&(e.preventDefault(),y(n))};return e.addEventListener(`click`,t),()=>e.removeEventListener(`click`,t)},[i]),(0,D.useEffect)(()=>{let n=r.current;if(!n)return;n.querySelectorAll(`.docs-here`).forEach(e=>e.classList.remove(`docs-here`));let[i,a]=N[t?.emit]||[];if(!i)return;let o=null;e.id===`install`?o=n.querySelector(`a[href="#/docs/${i}"]`)?.closest(`li`):e.id===i&&a&&(o=[...n.querySelectorAll(`h2`)].find(e=>O(e.textContent||``)===O(a))),o?.classList.add(`docs-here`)},[i,e.id,t?.emit]);let a=[];return e.id===`install`&&(a.push({label:`Run doctor`,action:`doctor`}),a.push({label:`Rebuild`,action:`build`})),e.id===`verify`&&a.push({label:`Run doctor`,action:`doctor`}),e.id===`upgrade`&&a.push({label:`Update`,action:`update`}),(0,M.jsxs)(`div`,{className:`detail-doc`,children:[(0,M.jsx)(u,{title:e.title,actions:a.length>0&&a.map(e=>e.hash?(0,M.jsx)(`a`,{className:`btn ghost sm`,href:e.hash,children:e.label},e.label):(0,M.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>n&&n(e.action),children:e.label},e.label))}),e.source&&(0,M.jsx)(`div`,{className:`doc-meta`,children:(0,M.jsxs)(`span`,{className:`badge`,children:[(0,M.jsx)(`span`,{className:`dot`}),e.source]})}),(0,M.jsx)(`div`,{className:`markdown`,ref:r,dangerouslySetInnerHTML:{__html:i}}),e.link&&(0,M.jsx)(`div`,{className:`doc-link`,children:(0,M.jsx)(`a`,{className:`btn soft sm`,href:e.link.hash,children:e.link.label})})]})}var I=e=>`cmd-`+String(e).replace(/[^\w-]+/g,`-`),L=1200;function R({a:e,kind:t}){let n=t===`positional`?e.dest:e.names.join(`, `),r=[];return e.metavar&&r.push(e.metavar),e.choices&&r.push(`{${e.choices.join(`|`)}}`),e.default!==null&&e.default!==void 0&&e.default!==``&&!e.is_flag&&r.push(`default: ${e.default}`),e.required&&r.push(`required`),(0,M.jsxs)(`div`,{className:`cli-arg`,children:[(0,M.jsx)(`code`,{className:`cli-arg-name`,children:n}),r.length>0&&(0,M.jsxs)(`code`,{className:`cli-arg-meta`,children:[` `,r.join(` · `)]}),e.help&&(0,M.jsx)(`div`,{className:`cli-arg-help`,children:e.help})]})}function z({text:e}){let[t,n]=(0,D.useState)(!1);return(0,M.jsxs)(`button`,{className:`btn ghost sm`,onClick:async()=>{try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),L)}catch{}},title:`Copy command`,children:[(0,M.jsx)(d,{name:t?`spark`:`copy`}),t?`Copied`:`Copy`]})}function B({cmd:e,prog:t}){let n=[t,e.name];for(let t of e.positionals||[]){let e=(t.metavar||t.dest||``).toUpperCase();n.push(t.required?e:`[${e}]`)}(e.options||[]).length&&n.push(`[OPTIONS]`);let r=n.join(` `);return(0,M.jsxs)(`div`,{className:`card pad-md mb-12 cli-card`,children:[(0,M.jsxs)(`div`,{className:`row wrap between cli-head`,children:[(0,M.jsxs)(`div`,{className:`stack gap-4`,children:[(0,M.jsx)(`h2`,{id:I(e.name),children:(0,M.jsx)(`code`,{children:e.name})}),e.help&&(0,M.jsx)(`p`,{className:`sub`,children:e.help})]}),(0,M.jsx)(z,{text:`${t} ${e.name}`})]}),(0,M.jsx)(`pre`,{className:`cli-syn`,children:r}),(e.positionals||[]).length>0&&(0,M.jsxs)(`div`,{className:`cli-block`,children:[(0,M.jsx)(`div`,{className:`cli-block-head`,children:`Arguments`}),e.positionals.map(e=>(0,M.jsx)(R,{a:e,kind:`positional`},e.dest))]}),(e.options||[]).length>0&&(0,M.jsxs)(`div`,{className:`cli-block`,children:[(0,M.jsx)(`div`,{className:`cli-block-head`,children:`Options`}),e.options.map(e=>(0,M.jsx)(R,{a:e,kind:`option`},e.names.join(`,`)))]})]})}function V({page:e}){let t=e.prog||`geneseed`,n=e.commands||[];return(0,M.jsxs)(`div`,{className:`detail-doc`,children:[(0,M.jsx)(u,{title:e.title,sub:(0,M.jsxs)(M.Fragment,{children:[`Every subcommand of `,(0,M.jsx)(`code`,{children:t}),`. Generated from the parser at request time (the same one `,(0,M.jsx)(`code`,{children:`geneseed`}),` actually parses), so this page cannot drift.`]})}),(0,M.jsx)(`div`,{children:n.map(e=>(0,M.jsx)(B,{cmd:e,prog:t},e.name))})]})}function H({page:e}){let t=e.rows||[],n=e.theme||`neutral`;return(0,M.jsxs)(`div`,{className:`detail-doc`,children:[(0,M.jsx)(u,{title:e.title,sub:(0,M.jsxs)(M.Fragment,{children:[`Geneseed's invented vocabulary, decoded. Left: the neutral, plain-English term. Right: the word your `,(0,M.jsx)(`code`,{className:`cap`,children:n}),` theme actually uses in the agent's voice. Last: the developer idea it maps to.`]})}),(0,M.jsx)(`div`,{className:`card pad-md`,children:(0,M.jsxs)(`table`,{className:`glossary-table`,children:[(0,M.jsx)(`thead`,{children:(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`th`,{children:`Concept`}),(0,M.jsx)(`th`,{children:`Neutral term`}),(0,M.jsxs)(`th`,{children:[`In `,n]}),(0,M.jsx)(`th`,{children:`Meaning`}),(0,M.jsx)(`th`,{children:`In dev terms`})]})}),(0,M.jsx)(`tbody`,{children:t.map(e=>(0,M.jsxs)(`tr`,{children:[(0,M.jsx)(`td`,{children:(0,M.jsx)(`strong`,{children:e.label})}),(0,M.jsx)(`td`,{children:(0,M.jsx)(`code`,{children:e.neutral||`—`})}),(0,M.jsx)(`td`,{children:(0,M.jsx)(`code`,{children:e.themed||e.neutral||`—`})}),(0,M.jsx)(`td`,{className:`dim`,children:e.desc}),(0,M.jsx)(`td`,{className:`dim`,children:e.analogy||`—`})]},e.label))})]})})]})}var U={enforced:`ok`,automatic:`ok`,asked:`warn`,"on demand":`warn`},W=({text:e})=>(0,M.jsx)(`span`,{dangerouslySetInnerHTML:{__html:E(w.parseInline(e||``))}}),G=({kind:e})=>(0,M.jsx)(`span`,{className:`tag ${U[e]||``}`,children:e});function K({page:e,overview:t,onAction:n}){let[r,i]=(0,D.useState)(0),{before:a,after:o}=(0,D.useMemo)(()=>j(e),[e]);if(!e.rows)return(0,M.jsx)(F,{page:e,overview:t,onAction:n});let s=e.rows[r]||e.rows[0];return(0,M.jsxs)(`div`,{className:`detail-doc`,children:[(0,M.jsx)(u,{title:e.title}),(0,M.jsx)(`div`,{className:`markdown`,dangerouslySetInnerHTML:{__html:a}}),(0,M.jsxs)(`div`,{className:`docs-map`,children:[(0,M.jsx)(`ul`,{className:`map-tree`,"aria-label":`Pieces`,children:e.rows.map((e,t)=>(0,M.jsx)(`li`,{children:(0,M.jsxs)(`button`,{className:`map-node ${t===r?`on`:``}`,"aria-pressed":t===r,onClick:()=>i(t),children:[(0,M.jsx)(`span`,{className:`map-piece`,children:(0,M.jsx)(W,{text:e.piece})}),(0,M.jsx)(G,{kind:e.kind}),(0,M.jsx)(`span`,{className:`mono dim map-cost`,children:(0,M.jsx)(W,{text:e.cost})})]})},t))}),s&&(0,M.jsxs)(`div`,{className:`card pad-md map-detail`,"aria-live":`polite`,children:[(0,M.jsx)(`h2`,{children:(0,M.jsx)(W,{text:s.piece})}),(0,M.jsx)(G,{kind:s.kind}),(0,M.jsxs)(`dl`,{children:[(0,M.jsx)(`dt`,{children:`Does`}),(0,M.jsx)(`dd`,{children:(0,M.jsx)(W,{text:s.does})}),(0,M.jsx)(`dt`,{children:`Costs`}),(0,M.jsx)(`dd`,{children:(0,M.jsx)(W,{text:s.cost})}),(0,M.jsx)(`dt`,{children:`Turn it off`}),(0,M.jsx)(`dd`,{children:(0,M.jsx)(W,{text:s.off})})]})]})]}),o.trim()&&(0,M.jsx)(`div`,{className:`markdown`,dangerouslySetInnerHTML:{__html:o}})]})}var q=5,J=e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);function Y(e,t){let n=e||``,r=[];for(let e of t||[])if([...new Set([e.themed,e.neutral,e.label].filter(Boolean))].some(e=>RegExp(`(?<![\\w-])${J(e)}s?(?![\\w-])`,`i`).test(n))&&r.push(e),r.length===q)break;return r}var X=e=>document.getElementById(e)?.scrollIntoView({behavior:`smooth`});function Z({page:e,glossaryRows:t}){let n=e?.body,r=(0,D.useMemo)(()=>e?.kind===`cli`?(e.commands||[]).map(e=>({id:I(e.name),title:e.name,level:2})):j(e).toc,[e]),i=(0,D.useMemo)(()=>Y(n,t),[n,t]);return!r.length&&!i.length?null:(0,M.jsxs)(`aside`,{className:`docs-margin`,children:[r.length>0&&(0,M.jsxs)(`nav`,{className:`docs-toc`,"aria-label":`On this page`,children:[(0,M.jsx)(`div`,{className:`docs-toc-head`,children:`On this page`}),(0,M.jsx)(`ul`,{children:r.map(e=>(0,M.jsx)(`li`,{className:`lvl-${e.level}`,children:(0,M.jsx)(`a`,{href:`#${e.id}`,onClick:t=>{t.preventDefault(),X(e.id)},children:e.title})},e.id))})]}),i.length>0&&(0,M.jsxs)(`div`,{className:`docs-gloss`,children:[(0,M.jsx)(`div`,{className:`docs-toc-head`,children:`Terms on this page`}),i.map(e=>(0,M.jsxs)(`div`,{className:`docs-gloss-card`,children:[(0,M.jsx)(`b`,{children:e.themed||e.neutral||e.label}),(0,M.jsx)(`p`,{children:e.desc})]},e.label))]})]})}function re({page:e}){let t=e.version||{},n=[[`Theme`,e.theme],[`Install mode`,e.emit],[`Deployed`,e.deployed?`yes`:`no`],[`Target`,(0,M.jsx)(`code`,{children:e.target},`t`)],[`Source root`,(0,M.jsx)(`code`,{children:e.root},`r`)],[`Installed build`,(0,M.jsx)(`code`,{children:t.installed_fp||`(none)`},`i`)],[`Source build`,(0,M.jsx)(`code`,{children:t.source_fp||`—`},`s`)],[`Match?`,t.verdict||`—`],[`License`,e.license]];return(0,M.jsxs)(`div`,{className:`detail-doc`,children:[(0,M.jsx)(u,{title:e.title,sub:`Live snapshot of the install behind this UI, plus where to go next.`}),(0,M.jsx)(`div`,{className:`card pad-md mb-18`,children:n.map(([e,t])=>(0,M.jsxs)(`div`,{className:`kv`,children:[(0,M.jsx)(`span`,{className:`k`,children:e}),(0,M.jsx)(`span`,{className:`v`,children:t??`—`})]},e))}),(0,M.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,M.jsxs)(`a`,{className:`btn ghost`,href:e.repo,target:`_blank`,rel:`noreferrer`,children:[(0,M.jsx)(d,{name:`external`}),e.repo_is_github?`GitHub repo`:`Source repo`]}),e.repo_is_github&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,M.jsx)(d,{name:`external`}),`File an issue`]}),(0,M.jsxs)(`a`,{className:`btn ghost`,href:`${e.repo}/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,M.jsx)(d,{name:`external`}),`License`]})]})]})]})}function Q(e){return e?.groups?.[0]?.pages?.[0]?.id||``}function ie({data:e,error:t,overview:n,onAction:r}){if(t)return(0,M.jsx)(h,{error:t,style:{margin:18}});if(!e)return(0,M.jsx)(i,{label:`Loading page…`});switch(e.kind){case`markdown`:case`concept`:return(0,M.jsx)(F,{page:e,overview:n,onAction:r});case`map`:return(0,M.jsx)(K,{page:e,overview:n,onAction:r});case`cli`:return(0,M.jsx)(V,{page:e});case`glossary`:return(0,M.jsx)(H,{page:e});case`about`:return(0,M.jsx)(re,{page:e});default:return(0,M.jsx)(b,{title:`Unknown page kind`,children:e.kind})}}function $(e){return(e?.pages||[]).map(e=>({name:e.id,title:e.title,desc:e.description||``,group:e.section||`General`,groupC:`var(--accent)`}))}function ae({page:e,overview:t,onAction:n}){let[u,d]=o(a(t?.emit)),{data:y,error:b}=s(()=>r.docs(u),[u]),w=e||Q(y),{data:T,error:E,loading:O}=s(()=>w?r.docsPage(w,u):Promise.resolve(null),[w,u]),{data:k}=s(()=>r.docsPage(`glossary`,u).catch(()=>null),[u],`docs:glossary`);(0,D.useEffect)(()=>{if(y&&w&&!y.groups.some(e=>e.pages.some(e=>e.id===w))){let e=Q(y);e&&e!==w&&window.location.replace(f(e))}},[y,w]),(0,D.useEffect)(()=>{let e=document.scrollingElement||document.documentElement;for(let t of[document.getElementById(`main`),e])t&&(t.scrollTop=0)},[w]);let A=ee(y,w),j=A.part||y?.groups?.[0]||null,N=j?.id===v;(0,D.useEffect)(()=>{N&&T?.id===w&&_(w)},[N,T,w]);let P=N?[...p(),w]:[],[F,I]=(0,D.useState)(``),[L,R]=(0,D.useState)(`all`),[z,B]=(0,D.useState)(j?.id);j?.id!==z&&(B(j?.id),I(``),R(`all`));let V=$(j),H=ne(V),U=L===`all`?V:V.filter(e=>e.group===L),W=x(U,F);return b?(0,M.jsx)(h,{error:b}):(0,M.jsx)(`div`,{className:`docs-wrap`,children:(0,M.jsxs)(`div`,{className:`library docs-lib`,children:[(0,M.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Docs parts`,children:[(0,M.jsxs)(`div`,{className:`lib-title`,children:[(0,M.jsx)(`p`,{className:`h`,children:`Docs`}),(0,M.jsx)(`span`,{className:`dim`,children:`How it works, and how to use it`})]}),(0,M.jsx)(c,{"aria-label":`Harness`,children:l.map(e=>(0,M.jsx)(`button`,{className:u===e.id?`on`:``,onClick:()=>d(e.id),"aria-pressed":u===e.id,children:e.label},e.id))}),(0,M.jsx)(`nav`,{className:`kind-list`,"aria-label":`Parts`,children:(y?.groups||[]).map(e=>(0,M.jsxs)(D.Fragment,{children:[(0,M.jsxs)(`a`,{href:e.pages[0]?f(e.pages[0].id):`#/docs`,className:j?.id===e.id?`on`:``,"aria-current":j?.id===e.id?`page`:void 0,children:[e.label,(0,M.jsx)(`span`,{className:`mono dim`,children:e.pages.length})]}),j?.id===e.id&&(0,M.jsx)(C,{label:`Sections`,total:V.length,cats:H,cat:L,onChange:R})]},e.id))})]}),(0,M.jsx)(te,{label:j?.label||`Docs`,count:F.trim()?`${W.length} of ${U.length}`:U.length||``,extra:N&&(0,M.jsx)(m,{pages:j.pages,seen:P}),q:F,onQ:I,matched:W.length,inView:[j?.id,w],children:y?(0,M.jsx)(S,{rows:W,activeName:w,hrefOf:e=>f(e.name),pills:N?e=>P.includes(e.name)&&e.name!==w?(0,M.jsx)(`span`,{className:`docs-read-mark`,role:`img`,"aria-label":`, read`,children:`✓`}):null:void 0}):(0,M.jsx)(i,{label:`Loading docs…`})}),(0,M.jsxs)(`article`,{className:`lib-reader docs-reader`,"aria-label":`Page`,children:[A.page&&(0,M.jsxs)(`nav`,{className:`docs-crumbs mono`,"aria-label":`Breadcrumb`,children:[(0,M.jsx)(`a`,{href:f(A.part.pages[0].id),children:A.part.label}),(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,M.jsx)(`a`,{href:f(A.part.pages.find(e=>(e.section||`General`)===A.section).id),children:A.section}),(0,M.jsx)(`span`,{"aria-hidden":`true`,children:`›`}),(0,M.jsx)(`span`,{"aria-current":`page`,children:A.page.title})]}),(0,M.jsxs)(`div`,{className:`docs-read`,children:[(0,M.jsxs)(`div`,{className:`docs-article`,children:[(0,M.jsx)(ie,{data:O?null:T,error:E,overview:t,onAction:n},`${w}|${u}`),!O&&(0,M.jsx)(g,{menu:y,pageId:w})]}),!O&&(0,M.jsx)(Z,{page:T,glossaryRows:k?.rows})]})]})]})})}export{ae as default,$ as docRows};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime-hePW80VL.js";import{i as e,t}from"./react-DlYQp10C.js";import{n,r}from"./sections-ChwaobfW.js";import{K as i,U as a,V as o,rt as s}from"./index-Dwo3Gxek.js";import{n as c,r as l,t as u}from"./jobBuckets-Dpjvbfm1.js";import{i as d,n as f,r as p}from"./Dashboard-BZmw2a7d.js";e();var m=t(),h=12,g=[`#2BB673`,`#16A6A6`,`#E8A23B`,`#E07A5F`,`#8E7DBE`,`#5BD08A`,`#79856E`],_=650;function v({segments:e,size:t=186,stroke:n=26,caption:r=`capabilities`}){let i=e.reduce((e,t)=>e+t.n,0);return(0,m.jsxs)(`div`,{className:`ring-box`,children:[(0,m.jsx)(d,{segments:e,size:t,stroke:n,label:r,sweepMs:_}),(0,m.jsxs)(`div`,{className:`ring-center`,children:[(0,m.jsx)(`div`,{className:`donut-c-num`,children:(0,m.jsx)(s,{value:i,duration:_})}),(0,m.jsx)(`div`,{className:`donut-c-cap`,children:r})]})]})}function y(e){if(e.length<2)return e.length?`M${e[0][0]},${e[0][1]}`:``;let t=`M${e[0][0]},${e[0][1]}`;for(let n=0;n<e.length-1;n++){let r=e[n-1]||e[n],i=e[n],a=e[n+1],o=e[n+2]||a,s=i[0]+(a[0]-r[0])/6,c=i[1]+(a[1]-r[1])/6,l=a[0]-(o[0]-i[0])/6,u=a[1]-(o[1]-i[1])/6;t+=` C${s},${c} ${l},${u} ${a[0]},${a[1]}`}return t}function b({data:e,height:t=156,accent:n}){if(!e.length)return null;let r=t,i=Math.max(...e.map(e=>e.v),1)+1,a=e.length>1?588/(e.length-1):588,o=e.map((e,t)=>[6+t*a,r-6-e.v/i*(r-14-6)]),s=y(o),c=o[o.length-1],l=o[0],u=`${s} L${c[0]},${r} L${l[0]},${r} Z`;return(0,m.jsxs)(`svg`,{viewBox:`0 0 600 ${r}`,preserveAspectRatio:`none`,style:{width:`100%`,height:t,display:`block`,overflow:`visible`},children:[(0,m.jsx)(`defs`,{children:(0,m.jsxs)(`linearGradient`,{id:`b-grad`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,m.jsx)(`stop`,{offset:`0`,stopColor:n,stopOpacity:`.28`}),(0,m.jsx)(`stop`,{offset:`1`,stopColor:n,stopOpacity:`0`})]})}),(0,m.jsx)(`path`,{d:u,fill:`url(#b-grad)`}),(0,m.jsx)(`path`,{d:s,fill:`none`,stroke:n,strokeWidth:`2`,strokeLinejoin:`round`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),(0,m.jsx)(`circle`,{cx:c[0],cy:c[1],r:`3.5`,fill:n,vectorEffect:`non-scaling-stroke`})]})}function x({label:e,value:t,sub:n,color:r,icon:i}){return(0,m.jsxs)(`div`,{className:`b-tile`,children:[(0,m.jsx)(`span`,{className:`b-tile-ic`,style:{background:`color-mix(in srgb, ${r} 18%, transparent)`,color:r},children:(0,m.jsx)(o,{name:i})}),(0,m.jsxs)(`div`,{className:`b-tile-body`,children:[(0,m.jsx)(`div`,{className:`b-tile-val`+(t===0?` zero`:``),children:t}),(0,m.jsx)(`div`,{className:`b-tile-label`,children:e})]}),(0,m.jsx)(`div`,{className:`b-tile-sub`,children:n})]})}function S({overview:e,sigil:t,jobs:d,lens:_,onAction:y}){let S=e.counts||{},C=_?.doctor?.state||`loading`,w=_?.doctor?.data?.groups||[],T=C===`ok`,E=w.filter(e=>e.problems.length===0).length,D=w.length,O=p(e,_?.tone),k=l(d,h),A=a(e.diff),j=r.filter(e=>(S[e]||0)>0).map((e,t)=>({key:e,label:n[e].label,n:S[e]||0,tone:`cat`+t%g.length,color:g[t%g.length]})),M=j.reduce((e,t)=>e+t.n,0),N=u(d||[],10),P=N.reduce((e,t)=>e+t.v,0);return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`div`,{className:`b-greet`,children:(0,m.jsxs)(`div`,{children:[(0,m.jsx)(`div`,{className:`eyebrow`,children:`your harness`}),(0,m.jsx)(`h2`,{className:`h b-h`,children:O}),(0,m.jsx)(f,{verdict:_?.verdict}),(0,m.jsx)(`p`,{className:`sub`,children:t||`A friendly read of every layer growing in your harness.`})]})}),(0,m.jsxs)(`div`,{className:`grid b-hero-grid mb-16`,children:[(0,m.jsxs)(`div`,{className:`card b-hero`,children:[(0,m.jsx)(`div`,{className:`b-hero-ring`,children:(0,m.jsx)(v,{segments:[{key:`pass`,label:`pass`,n:E,tone:`good`},{key:`attention`,label:`attention`,n:Math.max(D-E,0),tone:`warn`}],size:168,stroke:20,caption:`checks`})}),(0,m.jsxs)(`div`,{className:`b-hero-side`,children:[(0,m.jsx)(`h3`,{className:`b-hero-title`,children:T?`${E} of ${D} checks pass`:C===`failed`?`Doctor did not answer`:`Checking…`}),C===`failed`&&(0,m.jsxs)(`button`,{className:`btn ghost b-hero-retry`,"aria-label":`Run doctor again`,onClick:()=>y(`doctor`),children:[(0,m.jsx)(o,{name:`doctor`}),`Run doctor`]}),(0,m.jsxs)(`p`,{className:`sub`,children:[`One source, rendered into `,(0,m.jsx)(`code`,{children:e.target}),` and inherited by every repo on this machine.`]}),T&&(0,m.jsx)(`ul`,{className:`b-hero-checks`,children:w.map(e=>{let t=e.problems.length===0;return(0,m.jsxs)(`li`,{className:`b-hcheck ${t?`ok`:`bad`}`,title:t?`clean`:e.problems.join(`; `),children:[(0,m.jsx)(`span`,{className:`b-hcheck-mark`,children:t?`✓`:`!`}),(0,m.jsx)(`span`,{className:`b-hcheck-label`,children:e.label})]},e.label)})}),(0,m.jsxs)(`div`,{className:`b-chips`,children:[(0,m.jsxs)(`span`,{className:`b-chip`,children:[(0,m.jsx)(`b`,{className:`t-cap`,children:e.theme}),` voice`]}),(0,m.jsx)(`span`,{className:`b-chip`,children:(0,m.jsx)(`b`,{children:e.emit})}),(0,m.jsxs)(`span`,{className:`b-chip`,children:[`built `,(0,m.jsx)(`b`,{children:e.build_time||`unknown`})]})]})]})]}),(0,m.jsxs)(`div`,{className:`b-tiles`,children:[(0,m.jsx)(x,{label:`Agents`,value:S.agents??`—`,sub:`specialists`,color:g[0],icon:`layers`}),(0,m.jsx)(x,{label:`Skills`,value:S.skills??`—`,sub:`workflows`,color:g[1],icon:`skill`}),(0,m.jsx)(x,{label:`Dictates`,value:S.laws??`—`,sub:S.doctrines?`${S.doctrines.active}/${S.doctrines.total} packs · ${S.doctrines.rules} rules`:`all upheld`,color:g[2],icon:`law`}),(0,m.jsx)(x,{label:`Edits`,value:A,sub:`to graft`,color:g[3],icon:`changes`})]})]}),(0,m.jsxs)(`div`,{className:`grid split-even mb-16`,children:[(0,m.jsxs)(`div`,{className:`card pad-lg b-mix-card`,children:[(0,m.jsxs)(`div`,{className:`card-head`,children:[(0,m.jsx)(`h3`,{children:`Capability mix`}),(0,m.jsx)(`div`,{className:`right`,children:(0,m.jsxs)(`span`,{className:`tick`,children:[M,` total`]})})]}),(0,m.jsxs)(`div`,{className:`b-mix`,children:[(0,m.jsx)(v,{segments:j,size:186,stroke:26}),(0,m.jsx)(`div`,{className:`b-legend`,children:j.map(e=>(0,m.jsxs)(`div`,{className:`b-leg-row`,children:[(0,m.jsx)(`span`,{className:`b-leg-dot`,style:{background:e.color}}),(0,m.jsx)(`span`,{className:`b-leg-name`,children:e.label}),(0,m.jsx)(`span`,{className:`b-leg-bar`,children:(0,m.jsx)(`i`,{style:{width:`${e.n/M*100}%`,background:e.color}})}),(0,m.jsx)(`span`,{className:`b-leg-val`,children:e.n})]},e.label))})]})]}),(0,m.jsxs)(`div`,{className:`card pad-lg`,children:[(0,m.jsxs)(`div`,{className:`card-head`,children:[(0,m.jsx)(`h3`,{children:`Recent runs`}),(0,m.jsx)(`div`,{className:`right`,children:(0,m.jsxs)(`span`,{className:`badge ok`,children:[(0,m.jsx)(`span`,{className:`dot`}),`job log`]})})]}),(0,m.jsxs)(`div`,{className:`b-stat-lead`,children:[(0,m.jsx)(`span`,{className:`b-stat-big`,children:(0,m.jsx)(s,{value:P})}),(0,m.jsxs)(`span`,{className:`b-stat-cap`,children:[`runs in the last 10 days`,T&&D>0&&` · ${E}/${D} checks pass now`]})]}),(0,m.jsx)(b,{data:N,accent:g[0],height:156})]})]}),(0,m.jsxs)(`div`,{className:`card pad-lg`,children:[(0,m.jsxs)(`div`,{className:`card-head`,children:[(0,m.jsx)(`h3`,{children:`Recent activity`}),(0,m.jsx)(`div`,{className:`right`,children:(0,m.jsxs)(`span`,{className:`tick`,children:[`last `,k.length,` runs`]})})]}),(0,m.jsxs)(`div`,{className:`b-timeline`,children:[k.map(e=>{let t=e.status===`done`,n=e.status===`failed`?`warn`:t?`ok`:`acc`,r=c(e);return(0,m.jsxs)(`div`,{className:`b-tl-row`,children:[(0,m.jsx)(`span`,{className:`b-tl-node ${n}`}),(0,m.jsxs)(`div`,{className:`b-tl-body`,title:r.command||void 0,children:[(0,m.jsx)(`b`,{children:r.verb}),[r.scope,r.result,r.duration].map(e=>e?` · ${e}`:``).join(``)]}),(0,m.jsx)(`span`,{className:`b-tl-when`,children:e.started?`${i(e.started)} ago`:`—`})]},e.id)}),(!d||d.length===0)&&(0,m.jsxs)(`div`,{className:`b-tl-row`,children:[(0,m.jsx)(`span`,{className:`b-tl-node`}),(0,m.jsx)(`div`,{className:`b-tl-body sub`,children:`No runs yet. Trigger an action to populate this.`}),(0,m.jsx)(`span`,{className:`b-tl-when`,children:`—`})]})]})]})]})}export{S as default};
@@ -1,3 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{A as i,B as a,H as o,J as s,K as c,L as l,M as u,N as d,Q as f,R as p,T as m,U as h,V as g,X as _,Y as v,Z as y,et as b,it as x,j as S,k as C,z as w}from"./index-Dwo3Gxek.js";import{t as T}from"./EmptyState-1sPNleqv.js";import{t as E}from"./Tabs-2uMB511T.js";import{a as D,c as O,n as k,o as A,r as j,s as M,t as N}from"./KitApply-BR8AcZ62.js";import{n as P}from"./StackBar-Y_gkoC3t.js";var F=e(t(),1),I=n();function L({host:e,theme:t,options:n,onAction:i,onClose:a,onNote:o}){let[s,c]=(0,F.useState)({path:``,host:e,theme:t,footprint:`lean`,posture:`peer`,mode:`direct`,trust:`balanced`}),[u,d]=(0,F.useState)(!1),[f,m]=(0,F.useState)(``),h=(e,t)=>c(n=>({...n,[e]:t})),g=async()=>{d(!0),o(``);try{let e=await r.pickFolder();e.path?(h(`path`,e.path),m(``)):e.error&&o(e.error)}catch(e){o(e.message)}finally{d(!1)}},_=async()=>{let e=s.path.trim();if(!e){m(`Choose or type a folder to deploy into.`);return}m(``),o(``),await i?.(`deploy`,{host:s.host,path:e,theme:s.theme,footprint:s.footprint,posture:s.posture,mode:s.mode,trust:s.trust})&&a()};return(0,I.jsxs)(`div`,{className:`deploy-pop`,children:[(0,I.jsxs)(`div`,{className:`dp-row`,children:[(0,I.jsx)(`input`,{className:`inp dp-path`,type:`text`,placeholder:`/path/to/project, or click Browse…`,value:s.path,onChange:e=>{h(`path`,e.target.value),m(``)},onKeyDown:e=>e.key===`Enter`&&_(),"aria-label":`Folder to deploy into`,"aria-invalid":f?!0:void 0,"aria-describedby":f?`dp-path-err`:void 0}),(0,I.jsx)(`button`,{className:`btn ghost sm`,disabled:u,onClick:g,children:u?`Choosing…`:`Browse…`})]}),f?(0,I.jsx)(`p`,{id:`dp-path-err`,className:`tag bad note`,role:`alert`,children:f}):null,(0,I.jsxs)(`div`,{className:`dp-row`,children:[(0,I.jsxs)(`label`,{className:`dp-field`,children:[(0,I.jsx)(`span`,{children:`Deploy as`}),(0,I.jsx)(`select`,{className:`sel`,"aria-label":`host for the new harness`,value:s.host,onChange:e=>h(`host`,e.target.value),children:l.map(e=>(0,I.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,I.jsx)(M,{value:s,options:n,onChange:h,who:`the new harness`}),(0,I.jsx)(`button`,{className:`btn ghost sm`,onClick:_,children:`Deploy`}),(0,I.jsx)(`button`,{className:`btn ghost sm`,onClick:a,children:`Cancel`})]}),(0,I.jsxs)(`p`,{className:`sub dp-note`,children:[`Adds a per-repo harness (`,(0,I.jsx)(`code`,{children:p(s.host).deployAdds}),`) into the folder, non-destructively. It’s then tracked here even after you leave its directory.`]})]})}function R(){let{data:e,error:t,reload:n}=s(()=>r.excludes(),[]),[i,a]=(0,F.useState)(!1),[o,c]=(0,F.useState)([]),l=async(e,t)=>{a(!0);try{let n=await r.excludeMutate(e,t);c(n.messages||[])}catch(e){c(e.body?.messages||[e.message])}finally{a(!1),n()}};return t||!e?.installs?.length?null:(0,I.jsxs)(`div`,{className:`card pad-lg mb-16`,children:[(0,I.jsx)(`div`,{className:`card-head`,children:(0,I.jsx)(`h3`,{children:`Excluded folders`})}),(0,I.jsx)(`p`,{className:`sub mb-16`,children:`Sovereign repos: inside these folders every global harness goes dormant — hooks stay silent and the global preamble is not loaded.`}),(e.excludes||[]).map(e=>(0,I.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,I.jsx)(`code`,{children:e.path}),(0,I.jsx)(`span`,{className:`mono muted`,children:e.hosts.map(e=>p(e).label).join(`, `)}),(0,I.jsx)(`button`,{className:`btn ghost sm`,disabled:i,"aria-label":`Stop excluding ${e.path}`,onClick:()=>l(`remove`,e.path),children:`Remove`})]},e.path)),(0,I.jsxs)(`button`,{className:`btn ghost sm`,disabled:i,onClick:async()=>{a(!0);try{let e=await r.pickFolder();e.path?await l(`add`,e.path):e.error&&c([e.error])}catch(e){c([e.message])}finally{a(!1)}},children:[(0,I.jsx)(g,{name:`folder`}),` Exclude a folder…`]}),o.map((e,t)=>(0,I.jsx)(`p`,{className:`sub`,children:e},t))]})}function z({targets:e,onReveal:t}){let n=e.flatMap(e=>e.servers);return(0,I.jsxs)(`div`,{className:`ip-block`,children:[(0,I.jsxs)(`span`,{className:`ip-label`,children:[`MCP servers `,(0,I.jsx)(`span`,{className:`mono dim`,children:n.length})]}),e.map(e=>(0,I.jsxs)(`div`,{className:`mcp-target`,children:[(0,I.jsxs)(`div`,{className:`mt-head`,children:[(0,I.jsx)(`code`,{title:e.path,children:e.label}),e.exists?(0,I.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:()=>t(e),"aria-label":`Open the folder holding ${e.label}`,title:`Open the folder holding ${e.path} to edit it`,children:`Open folder`}):null]}),e.exists?e.servers.length?e.servers.map(e=>(0,I.jsxs)(`div`,{className:`mcp-row`,children:[(0,I.jsx)(`span`,{className:`mono`,children:e.name}),(0,I.jsx)(`span`,{className:`tag ${e.state===`enabled`?`ok`:`warn`}`,children:e.state===`enabled`?`Enabled`:`Disabled`})]},e.name)):(0,I.jsx)(`p`,{className:`sub`,children:`None configured in this file.`}):(0,I.jsxs)(`p`,{className:`sub`,children:[`No MCP file yet (it would be `,(0,I.jsx)(`code`,{children:e.path}),`).`]})]},e.path))]})}var B={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`],absent:[`Not installed`,``]};function ee({inst:e,targets:t,choice:n,unchanged:r,options:i,onPick:a,canAct:o,busy:s,memory:c,onMemory:l,onApply:u,onToggleInstall:d,onRemove:f,onRevealMcp:m}){let h=`${p(e.host).label} · ${e.scope}`,[g,_]=B[e.state]||B.absent,v=e.state===`active`,y=e.state===`absent`;return(0,I.jsxs)(`aside`,{className:`install-panel`,"aria-label":`${h} install`,children:[(0,I.jsx)(`span`,{className:`ip-eyebrow`,children:`Selected install`}),(0,I.jsxs)(`div`,{className:`ip-head`,children:[(0,I.jsx)(`h2`,{children:w(e)}),(0,I.jsx)(`span`,{className:`tag ${_}`,children:g})]}),(0,I.jsx)(`span`,{className:`ip-kind`,children:e.scope===`global`?`Global install`:`Per-project install · ${p(e.host).label}`}),(0,I.jsx)(`code`,{className:`ip-path`,children:e.path}),y?(0,I.jsxs)(`p`,{className:`sub`,children:[`Install Geneseed here as `,(0,I.jsx)(`strong`,{children:p(e.host).label}),`. Files are added non-destructively; deactivate or uninstall later.`]}):null,(v||y)&&o?(0,I.jsx)(`div`,{className:`ip-picks`,children:(0,I.jsx)(M,{value:n,options:i,onChange:a,who:h})}):null,v&&t.length?(0,I.jsx)(z,{targets:t,onReveal:m}):null,v&&e.scope===`global`?(0,I.jsx)(R,{}):null,y?null:(0,I.jsxs)(`label`,{className:`ip-switch`,children:[(0,I.jsx)(O,{on:v,disabled:s,label:`activate ${h}`,onToggle:d}),(0,I.jsx)(`span`,{children:v?`Active: loads in every session`:`Disabled: files moved aside`})]}),(0,I.jsx)(`div`,{className:`ip-spacer`}),o?(0,I.jsxs)(`div`,{className:`ip-actions`,children:[y?(0,I.jsx)(`button`,{type:`button`,className:`btn`,onClick:u,children:`Install`}):v?(0,I.jsx)(`button`,{type:`button`,className:`btn`,disabled:r,onClick:u,children:`Apply and rebuild`}):null,y?null:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`label`,{className:`field`,children:[(0,I.jsx)(`span`,{children:`On uninstall, memory and notebook`}),(0,I.jsxs)(`select`,{className:`sel`,value:c,onChange:e=>l(e.target.value),children:[(0,I.jsx)(`option`,{value:`keep`,children:`keep in place`}),(0,I.jsx)(`option`,{value:`archive`,children:`archive aside`}),(0,I.jsx)(`option`,{value:`delete`,children:`delete too`})]})]}),(0,I.jsx)(`button`,{type:`button`,className:`btn ghost danger-line`,"aria-label":`remove ${h} from ${e.path}`,disabled:s,onClick:f,children:`Uninstall…`})]})]}):null]})}var V=(e,t)=>`${e} ${t}`,te=[`claude`,`bob`,`openclaude`],H={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`]};function ne(e,t){let n=e.drift?.stale??0,r={behind:`Behind ${t||`source`}`+(n?` · ${n} file${n===1?``:`s`}`:``),synced:`In sync`,unknown:`Not checked`}[e.verdict],i=e.diffable?h(e.drift):0;return i?`${r} · ${i} edited`:r}function re({inst:e,fleet:t,version:n,onEdits:r}){if(t===void 0)return(0,I.jsx)(`span`,{className:`dim`,children:`…`});if(!t)return(0,I.jsx)(`span`,{className:`dim`,children:`—`});let i=t.drift?.stale??0,a=t.diffable?h(t.drift):0;return(0,I.jsxs)(`div`,{className:`sync-cell`,children:[t.diffable&&i+a>0?(0,I.jsx)(P,{label:`Sync with source of ${w(e)}`,parts:[{key:`stale`,label:`behind source`,n:i,tone:`warn`},{key:`edited`,label:`edited by hand`,n:a,tone:`bad`}]}):null,(0,I.jsx)(`span`,{className:`dim`,children:ne(t,n)}),t.diffable?null:(0,I.jsxs)(`span`,{className:`dim`,title:`Drift is only checked for global installs`,children:[` `,`· not checkable`]}),a?(0,I.jsxs)(I.Fragment,{children:[` `,(0,I.jsx)(`a`,{href:`#/installs/edits`,onClick:t=>{t.preventDefault(),t.stopPropagation(),r(e)},children:`Local edits`})]}):null]})}function ie({rows:e,project:t,currentId:n,onPick:r,label:i,fleet:a,onEdits:o}){let s=e=>a===void 0?void 0:a?.installs?.find(t=>t.id===e.id)||null;return(0,I.jsx)(`div`,{className:`tbl-scroll`,children:(0,I.jsxs)(`table`,{className:`tbl hosts-tbl`,"aria-label":i,children:[(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[(0,I.jsx)(`th`,{scope:`col`,children:t?`Project`:`Host`}),(0,I.jsx)(`th`,{scope:`col`,children:t?`Host`:`Path`}),(0,I.jsx)(`th`,{scope:`col`,children:`Voice`}),(0,I.jsx)(`th`,{scope:`col`,children:`Footprint`}),(0,I.jsx)(`th`,{scope:`col`,children:`State`}),(0,I.jsx)(`th`,{scope:`col`,children:`Sync with source`}),(0,I.jsx)(`th`,{scope:`col`,children:(0,I.jsx)(`span`,{className:`sr-only`,children:`Selected`})})]})}),(0,I.jsx)(`tbody`,{children:e.map(e=>{let[i,c]=H[e.state]||[`Not installed`,``],l=n===e.id,u=e.state===`absent`;return(0,I.jsxs)(`tr`,{className:`pickable${l?` on`:``}${u?` quiet`:``}`,onClick:()=>r(e.id),children:[(0,I.jsx)(`td`,{children:(0,I.jsx)(`button`,{type:`button`,className:`row-pick`,"aria-pressed":l,title:e.path,onClick:()=>r(e.id),children:w(e)})}),t?(0,I.jsx)(`td`,{children:p(e.host).label}):(0,I.jsx)(`td`,{className:`mono path-cell`,title:e.path,children:e.path}),(0,I.jsx)(`td`,{children:u?``:e.theme||``}),(0,I.jsx)(`td`,{children:u?``:e.footprint||``}),(0,I.jsx)(`td`,{children:(0,I.jsx)(`span`,{className:`tag ${c}`,children:i})}),(0,I.jsx)(`td`,{children:(0,I.jsx)(re,{inst:e,fleet:s(e),version:a?.version,onEdits:o})}),(0,I.jsx)(`td`,{className:`pick-mark`,children:l?`Editing ›`:``})]},e.id)})})]})})}function ae({themes:e,current:t}){if(!e.length||!t)return null;let n=[...e].sort((e,n)=>e.name===t?-1:+(n.name===t));return(0,I.jsxs)(`details`,{className:`panel voice-ref`,children:[(0,I.jsxs)(`summary`,{children:[(0,I.jsx)(`span`,{className:`vr-title`,children:`Voices`}),(0,I.jsxs)(`span`,{className:`mono dim`,children:[e.length,` to choose from, set per install`]})]}),(0,I.jsx)(`div`,{className:`vr-list`,children:n.map(e=>(0,I.jsxs)(`div`,{className:`voice-row${e.name===t?` current`:``}`,children:[(0,I.jsx)(`span`,{className:`vr-name`,children:e.name}),(0,I.jsx)(`span`,{className:`vr-desc`,children:e.tagline?`“${e.tagline}”`:e.blurb})]},e.name))})]})}function oe({setup:e,overview:t}){if(!e)return null;let n=e.installed_fp&&e.installed_fp===e.source_fp;return(0,I.jsxs)(`section`,{className:`panel`,"aria-labelledby":`checkout-h`,children:[(0,I.jsxs)(`div`,{className:`panel-head`,children:[(0,I.jsx)(`h2`,{id:`checkout-h`,children:`This checkout`}),(0,I.jsx)(`span`,{className:`mono ${n?`t-good`:`t-warn`}`,children:e.version_verdict})]}),(0,I.jsxs)(`dl`,{className:`kv-grid`,children:[(0,I.jsx)(`dt`,{children:`Source`}),(0,I.jsx)(`dd`,{className:`mono`,children:e.root}),(0,I.jsx)(`dt`,{children:`Version`}),(0,I.jsx)(`dd`,{className:`mono`,children:t?.version||`unknown`}),(0,I.jsx)(`dt`,{children:`Fingerprint`}),(0,I.jsx)(`dd`,{className:`mono`,children:e.source_fp})]})]})}function U({onAction:e,themes:t=[],currentTheme:n,overview:o,setup:c,dataRev:l,onMutated:u}){let f=d(),{data:m,error:h,reload:_}=s(()=>r.installs(),[l]),{data:v,error:y,reload:b}=s(()=>r.mcp(),[l]),{data:x,error:S}=s(()=>r.fleet(),[l]),w=S?null:x??void 0,[E,D]=(0,F.useState)(null),[O,k]=(0,F.useState)(``),[j,M]=(0,F.useState)({}),[N,P]=(0,F.useState)(!1),[R,z]=(0,F.useState)({id:``,value:`keep`}),B=e=>R.id===e?.id?R.value:`keep`,[H,ne]=(0,F.useState)(``),re=(0,F.useMemo)(()=>{let e={};for(let t of v?.targets||[]){let n=V(t.host||`opencode`,t.root);(e[n]||(e[n]=[])).push(t)}return e},[v]);if(h||y)return(0,I.jsx)(C,{error:h||y,onRetry:()=>{_(),b()}});if(!m||!v)return(0,I.jsx)(i,{});let U={active:0,disabled:1,absent:2},W=[...m.installs].sort((e,t)=>(e.scope===`global`?0:1)-(t.scope===`global`?0:1)||(U[e.state]??3)-(U[t.state]??3)),G=W.find(e=>e.id===H)||W.find(e=>e.selected)||W.find(e=>e.state===`active`)||W[0],K=e=>{let t=j[e.id]||{};return{theme:t.theme||e.theme||n||`neutral`,footprint:t.footprint||e.state!==`absent`&&e.footprint||`lean`,posture:t.posture||e.posture||`peer`,mode:t.mode||e.mode||`direct`,trust:t.trust||e.trust||`balanced`}},se=(e,t,n)=>M(r=>({...r,[e.id]:{...r[e.id],[t]:n}})),q=e=>{let t=K(e);return t.theme===e.theme&&t.footprint===(e.footprint||`lean`)&&t.posture===(e.posture||`peer`)&&t.mode===(e.mode||`direct`)&&t.trust===(e.trust||`balanced`)},J={theme:t.map(e=>e.name),footprint:A,posture:m.postures||[],mode:m.modes||[],trust:m.trusts||[]},ce=async t=>{let{theme:n,footprint:r,posture:i,mode:a,trust:o}=K(t),s=p(t.host).label,c=`${r} footprint, ${i} posture, ${a} mode, ${o} loop trust`,l=t.state===`absent`?`Install Geneseed for ${s} into ${t.path} with the “${n}” voice (${c})? Files are added non-destructively (your own config is left untouched); deactivate or uninstall later.`:`Rebuild this ${s} install (voice “${n}”, ${c})? It rebuilds in place, non-destructive.`;await f(l,{title:t.state===`absent`?`Install Geneseed?`:`Rebuild this install?`,confirmLabel:t.state===`absent`?`Install`:`Rebuild`})&&e?.(`install`,{host:t.host,scope:t.scope,path:t.path,theme:n,footprint:r,posture:i,mode:a,trust:o})},le=async e=>{if(e.state!==`active`||await f(`Deactivate this install? Files are moved aside, not deleted; reactivate any time.`,{title:`Deactivate this install?`,confirmLabel:`Deactivate`})){k(e.id),D(null);try{let t=await r.installToggle(e.host,e.path,e.state===`active`?`deactivate`:`activate`);if(!t.ok){let e=Array.isArray(t.failed)?t.failed.join(`, `):``;D({text:t.error||e&&`unrestored: ${e}`||`action failed`,tone:`bad`});return}u?.()}catch(e){D({text:e.message,tone:`bad`})}finally{k(``)}}},Y=(e,t)=>{let n=e.path.includes(`\\`)&&!e.path.includes(`/`)?`\\`:`/`,r=e.path.replace(/[\\/]+$/,``);return`${e.scope===`project`&&te.includes(e.host)?`${r}${n}.${e.host}`:r}${n}${t}`},ue=async e=>{let t=B(e),n=e.scope===`project`?` and de-lists it`:`; the row stays, marked “not installed”`,i=t===`delete`?`, and permanently deletes ${Y(e,`memory`)} and ${Y(e,`notebook`)}`:t===`archive`?`; memory and notebook are archived aside`:`; memory and notebook stay in place`;if(await f(`Uninstall ${p(e.host).label} · ${e.scope}? It deletes ${a(e.host,e.scope)}${n}${i}. This can’t be undone.`,{title:e.scope===`project`?`Remove this harness?`:`Remove the global install?`,confirmLabel:t===`delete`?`Remove and delete memory`:`Remove`,tone:`danger`})){k(e.id),D(null);try{let n=await r.installRemove(e.host,e.path,t);if(!n.ok){D({text:n.error||`remove failed`,tone:`bad`});return}z({id:``,value:`keep`}),n.kept?.length&&D({text:`Removed. Kept ${n.kept.length} file(s) you edited: ${n.kept.join(`, `)} — they are yours now (the CLI geneseed uninstall --force deletes edited files too).`,tone:`ok`}),u?.()}catch(e){D({text:e.message,tone:`bad`})}finally{k(``)}}},de=async e=>{D(null);try{let t=await r.mcpReveal(e.path);D({text:`Opening ${t.dir}. If no window appeared, open that folder by hand.`,tone:``})}catch(e){D({text:e.message,tone:`bad`})}},fe=W.find(e=>e.selected)?.host||W.find(e=>e.state===`active`)?.host||W[0]?.host||`opencode`,X=W.filter(e=>e.scope===`global`),Z=W.filter(e=>e.scope!==`global`),Q=e=>{ne(e)},$=async e=>{if(!e.selected){try{await r.selectView(e.host,e.path)}catch{}u?.()}window.location.hash=`#/installs/edits`};return(0,I.jsxs)(`div`,{className:`hosts`,children:[(0,I.jsxs)(`div`,{className:`hosts-main`,children:[(0,I.jsxs)(`div`,{className:`toolbar`,children:[(0,I.jsxs)(`span`,{className:`dim`,children:[W.filter(e=>e.state===`active`).length,` active of `,W.length,` `,`detected.`]}),e?(0,I.jsx)(`div`,{className:`row gap-8`,children:(0,I.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>e(`build-all`),children:[(0,I.jsx)(g,{name:`refresh`}),` Rebuild all`]})}):null]}),E?.tone===`bad`?(0,I.jsx)(`p`,{className:`tag bad note`,role:`alert`,children:E.text}):E?(0,I.jsx)(`p`,{className:`tag ${E.tone===`ok`?`ok `:``}note`,role:`status`,children:E.text}):null,(0,I.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-global`,children:[(0,I.jsx)(`div`,{className:`inst-head`,children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{id:`inst-global`,children:`Global installs`}),(0,I.jsx)(`p`,{className:`dim`,children:`One per tool. Loaded in every folder, except excluded ones.`})]})}),(0,I.jsx)(ie,{rows:X,currentId:G?.id,onPick:Q,label:`Global installs`,fleet:w,onEdits:$})]}),(0,I.jsxs)(`section`,{className:`panel flush`,"aria-labelledby":`inst-project`,children:[(0,I.jsxs)(`div`,{className:`inst-head`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{id:`inst-project`,children:`Per-project installs`}),(0,I.jsx)(`p`,{className:`dim`,children:`A repo with its own harness. Inside it, only that harness loads.`})]}),e?(0,I.jsxs)(`button`,{type:`button`,className:`btn ghost`,onClick:()=>P(e=>!e),children:[(0,I.jsx)(g,{name:`folder`}),` Deploy to a repo…`]}):null]}),N?(0,I.jsx)(`div`,{className:`inst-deploy`,children:(0,I.jsx)(L,{host:fe,theme:n||`neutral`,options:J,onAction:e,onClose:()=>P(!1),onNote:e=>D(e?{text:e,tone:`bad`}:null)})}):null,Z.length?(0,I.jsx)(ie,{rows:Z,project:!0,currentId:G?.id,onPick:Q,label:`Per-project installs`,fleet:w,onEdits:$}):(0,I.jsx)(T,{children:`No repo has its own harness yet. Deploy one to give a project its own rules and voice.`})]}),(0,I.jsx)(oe,{setup:c,overview:o}),(0,I.jsx)(ae,{themes:t,current:o?.theme})]}),G?(0,I.jsx)(ee,{inst:G,targets:re[V(G.host,G.path)]||[],choice:K(G),unchanged:q(G),options:J,onPick:(e,t)=>se(G,e,t),canAct:!!e,busy:O===G.id,memory:B(G),onMemory:e=>z({id:G.id,value:e}),onApply:()=>ce(G),onToggleInstall:()=>le(G),onRemove:()=>ue(G),onRevealMcp:de},G.id):null]})}function W({onAction:e,dataRev:t}){let{data:n,error:a}=s(()=>r.kits(),[t]),o=D(n,e);return a||n?.error?(0,I.jsx)(C,{error:a||n.error}):n?n.installs.length?n.kits.length?(0,I.jsx)(`div`,{className:`kits-tab`,children:n.installs.map(e=>{let t=j(e),r=o.setOf(e),i=`${e.host} · ${e.scope}`;return(0,I.jsxs)(`section`,{className:`panel flush`,"aria-label":i,children:[(0,I.jsxs)(`div`,{className:`inst-head`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{children:i}),(0,I.jsx)(`p`,{className:`dim mono`,children:e.path})]}),(0,I.jsx)(k,{row:e})]}),t&&(0,I.jsx)(`p`,{className:`kit-lock`,children:e.reason||e.error}),(0,I.jsx)(`ul`,{className:`kit-list`,children:n.kits.map(n=>(0,I.jsxs)(`li`,{className:`kit-row`,children:[(0,I.jsxs)(`div`,{className:`kit-main`,children:[(0,I.jsx)(`a`,{className:`kit-name`,href:`#/kits/${encodeURIComponent(n.name)}`,children:n.name}),n.description?(0,I.jsx)(`span`,{className:`kit-desc`,children:n.description}):null,(0,I.jsxs)(`span`,{className:`mono dim`,children:[n.skills.length,` skills · `,n.agents.length,` agents`]})]}),(0,I.jsx)(O,{on:r.has(n.name),disabled:t||o.running(e),label:`${n.name} for ${i}`,onToggle:()=>o.toggle(e,n.name)})]},n.name))}),Object.entries(e.keptKitFiles||{}).map(([e,t])=>(0,I.jsxs)(`p`,{className:`kit-kept mono dim`,children:[`kept from inactive kit `,e,`: `,t.join(`, `),` — delete by hand`]},e)),(0,I.jsx)(N,{row:e,stage:o})]},e.id)})}):(0,I.jsx)(`div`,{className:`empty inst-empty`,children:`This Geneseed ships no kit.`}):(0,I.jsx)(`div`,{className:`empty inst-empty`,children:`No install yet.`}):(0,I.jsx)(i,{})}function G(e){return e.startsWith(`@@`)||e.startsWith(`+++`)||e.startsWith(`---`)?`hunk`:e.startsWith(`+`)?`add`:e.startsWith(`-`)?`del`:`ctx`}var K=300;function se({onMutated:e,onAction:t,dataRev:n,overview:a}){let o=d(),{data:c,error:l,reload:u}=s(()=>r.diff(),[n]),[f,p]=(0,F.useState)(!1),[m,h]=(0,F.useState)(``),[_,v]=(0,F.useState)(()=>new Set),[y,b]=(0,F.useState)(()=>new Set),[x,S]=(0,F.useState)(null);if(c&&c!==x){S(c),v(new Set);let e=c.files.reduce((e,t)=>e+t.diff.length,0);b(new Set(e<=K?c.files.map(e=>e.rel):[]))}let w=e=>v(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),E=()=>v(e=>e.size===k.length?new Set:new Set(k.map(e=>e.rel))),D=()=>t?.(`export`),O=async()=>{let t=[..._],n=t.filter(e=>c.files.find(t=>t.rel===e)?.status===`added`),i=n.length?`Restoring will DELETE ${n.length} deployed-only file(s):\n${n.join(`
2
- `)}\n\n`:``;if(await o(`${i}Discard local edits and restore ${t.length} file(s) from source?`,{title:`Restore from source?`,confirmLabel:`Restore`,tone:`danger`})){p(!0);try{let n=await r.restore(t),i=n.errors.length?` · ${n.errors.length} error(s): ${n.errors.join(`; `)}`:``;h(`Restored ${n.restored.length}, archived ${n.deleted.length}${i}`),await u(),e?.()}catch(e){h(e.message)}finally{p(!1)}}};if(l)return(0,I.jsx)(C,{error:l,onRetry:u});if(!c)return(0,I.jsx)(i,{});if(!c.deployed)return(0,I.jsx)(T,{title:`No deployed harness`,children:`Nothing to diff against.`});if(!c.diffable)return(0,I.jsx)(T,{title:`No drift check for this install`,docs:{href:`#/installs/hosts`,label:`Pick a global install in Hosts`},children:`The drift check covers global installs only.`});let k=c.files.filter(e=>e.status!==`linked`&&e.status!==`stale`),A=c.files.filter(e=>e.status===`linked`),j=c.files.filter(e=>e.status===`stale`),M=k.filter(e=>e.status===`edited`).length,N=k.filter(e=>e.status===`added`).length,P=k.filter(e=>e.status===`missing`).length,L=e=>b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n});return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`h`,children:`Local edits`}),c.target?(0,I.jsxs)(`p`,{className:`sub`,children:[`Comparing `,(0,I.jsx)(`code`,{children:c.target}),c.theme?` (${c.theme} voice)`:``,` with source`,` `,a?.version||`unknown`,`.`]}):null,M>0?(0,I.jsx)(`p`,{className:`sub`,children:`The agent refines its own deployed files in place. A rebuild keeps an edited file, which then stops receiving source updates — export it, then Restore to take the new source.`}):N+P>0?(0,I.jsx)(`p`,{className:`sub`,children:`These files differ from the source: added in the install, or missing from it.`}):null]}),(0,I.jsxs)(`div`,{className:`row gap-10`,children:[(0,I.jsxs)(`button`,{className:`btn ghost danger-line`,disabled:f||_.size===0,onClick:O,children:[`Restore`,_.size?` (${_.size})`:``]}),(0,I.jsxs)(`button`,{className:`btn`,disabled:f,onClick:D,children:[(0,I.jsx)(g,{name:`download`}),`Export improvements`]})]})]}),m?(0,I.jsx)(`p`,{className:`sub mb-14`,children:m}):null,A.length?(0,I.jsxs)(`p`,{className:`sub dim mb-14`,title:A.map(e=>e.rel).join(`
3
- `),children:[A.length,` linked — yours, left alone`]}):null,k.length===0&&j.length===0?(0,I.jsx)(T,{title:`In sync`,children:`Deployed harness matches source.`}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`row between mb-14`,children:[(0,I.jsxs)(`div`,{className:`row gap-10`,children:[(0,I.jsxs)(`span`,{className:`badge warn`,children:[(0,I.jsx)(`span`,{className:`dot`}),M,` edited`]}),(0,I.jsxs)(`span`,{className:`badge`,children:[(0,I.jsx)(`span`,{className:`dot`}),N,` added`]}),P>0&&(0,I.jsxs)(`span`,{className:`badge bad`,children:[(0,I.jsx)(`span`,{className:`dot`}),P,` missing`]}),j.length>0&&(0,I.jsxs)(`span`,{className:`badge`,children:[(0,I.jsx)(`span`,{className:`dot`}),j.length,` behind`]})]}),(0,I.jsxs)(`div`,{className:`row gap-10`,children:[(0,I.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>b(new Set(c.files.map(e=>e.rel))),children:`Expand all`}),(0,I.jsx)(`button`,{className:`btn ghost sm`,onClick:()=>b(new Set),children:`Collapse all`}),k.length?(0,I.jsxs)(`label`,{className:`row gap-8 dim sel-all`,children:[(0,I.jsx)(`input`,{type:`checkbox`,checked:_.size===k.length,onChange:E}),`Select all`]}):null]})]}),(0,I.jsx)(`div`,{className:`stack gap-12`,children:k.map(e=>R(e,!0))}),j.length?(0,I.jsxs)(`div`,{className:`stack gap-12 diff-behind`,children:[(0,I.jsx)(`h3`,{children:`Behind source`}),(0,I.jsxs)(`div`,{className:`row between`,children:[(0,I.jsx)(`p`,{className:`sub`,children:`This install is built from older source — rebuild to bring these files up to date.`}),(0,I.jsx)(`button`,{className:`btn ghost`,disabled:f,onClick:()=>t?.(`build-all`),"aria-label":`Rebuild all installs`,children:`Rebuild`})]}),j.map(e=>R(e,!1))]}):null]})]});function R(e,t){let n=y.has(e.rel),r=e.status===`stale`||e.status===`added`?``:e.status===`missing`?`bad`:`warn`;return(0,I.jsxs)(`div`,{className:`card diff-file${n?` open`:``}`,children:[(0,I.jsxs)(`div`,{className:`diff-head`,children:[t?(0,I.jsx)(`input`,{type:`checkbox`,className:`chk`,checked:_.has(e.rel),onChange:()=>w(e.rel),onClick:e=>e.stopPropagation(),"aria-label":`Select ${e.rel}`}):null,(0,I.jsx)(`span`,{className:`fname`,children:e.rel}),(0,I.jsxs)(`span`,{className:`badge ${r}`,children:[(0,I.jsx)(`span`,{className:`dot`}),e.status===`stale`?`behind source`:e.status]}),(0,I.jsxs)(`span`,{className:`dim mono diff-lines`,children:[e.diff.length,` lines`]}),(0,I.jsx)(`button`,{className:`iconbtn`,onClick:()=>L(e.rel),"aria-label":n?`Collapse ${e.rel}`:`Expand ${e.rel}`,"aria-expanded":n,children:(0,I.jsx)(g,{name:`chevron`})})]}),n&&(0,I.jsx)(`div`,{className:`diff-body`,children:e.diff.map((e,t)=>(0,I.jsx)(`div`,{className:`diff-line ${G(e)}`,children:e},t))})]},e.rel)}}function q({group:e,i:t}){let n=e.problems.length===0,[r,i]=(0,F.useState)(!n);return(0,I.jsxs)(`div`,{className:`card check rise ${n?``:`bad`} ${r?`open`:``}`,style:{"--i":t*.6},children:[(0,I.jsxs)(`button`,{className:`check-head`,onClick:()=>i(e=>!e),disabled:n,"aria-expanded":n?void 0:r,children:[(0,I.jsx)(`span`,{className:`feed-dot ${n?`ok`:`bad`}`}),(0,I.jsx)(`h3`,{children:e.label}),(0,I.jsxs)(`span`,{className:`badge ${n?`ok`:`bad`}`,children:[(0,I.jsx)(`span`,{className:`dot`}),n?`clean`:`${e.problems.length} problem${e.problems.length===1?``:`s`}`]}),!n&&(0,I.jsx)(g,{name:`chevron`,className:`chev glyph`})]}),!n&&r&&(0,I.jsx)(`div`,{className:`check-body`,children:e.problems.map(e=>(0,I.jsxs)(`div`,{className:`problem`,children:[(0,I.jsx)(`span`,{className:`x`,children:`✕`}),(0,I.jsx)(`span`,{children:e})]},e))})]})}function J({dataRev:e}){let t=(0,F.useRef)(!1),{data:n,error:a,reload:o,setData:c}=s(()=>{let e=t.current;return t.current=!1,r.doctor(e)},[e]),l=()=>{t.current=!0,c(null),o()};if(a)return(0,I.jsx)(C,{error:a,onRetry:o});let u=n?n.groups.filter(e=>e.problems.length):[],d=n?n.groups.filter(e=>!e.problems.length):[];return(0,I.jsxs)(`div`,{className:`narrow`,children:[(0,I.jsxs)(`div`,{className:`head-row mb-16`,children:[(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`h`,children:`Doctor`}),(0,I.jsx)(`p`,{className:`sub`,children:`Every check builds each theme in a sandbox and validates the result: token resolution, link integrity, parity, and drift.`})]}),(0,I.jsxs)(`button`,{className:`btn`,onClick:l,disabled:!n,children:[(0,I.jsx)(g,{name:`refresh`}),n?`Re-run checks`:`Running…`]})]}),n?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`div`,{className:`card pad-md mb-16 doc-summary`,children:(0,I.jsxs)(`div`,{className:`row wrap between gap-12`,children:[(0,I.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,I.jsxs)(`span`,{className:`dim mono`,children:[`validated `,n.themes.length,` theme`,n.themes.length===1?``:`s`]}),n.checked_at?(0,I.jsxs)(`span`,{className:`dim mono`,title:n.checked_at,children:[`checked `,n.checked_at.slice(11)]}):null,n.themes.map(e=>(0,I.jsx)(`span`,{className:`badge cap`,children:e},e))]}),n.ok?(0,I.jsxs)(`span`,{className:`badge ok`,children:[(0,I.jsx)(`span`,{className:`dot`}),`all clean`]}):(0,I.jsxs)(`span`,{className:`badge bad`,children:[(0,I.jsx)(`span`,{className:`dot`}),n.problems.length,` problem`,n.problems.length===1?``:`s`]})]})}),(0,I.jsxs)(`div`,{className:`stack gap-12`,children:[u.map((e,t)=>(0,I.jsx)(q,{group:e,i:t},e.label)),d.length?(0,I.jsxs)(`details`,{className:`check-fold`,children:[(0,I.jsxs)(`summary`,{children:[d.length,` clean check`,d.length===1?``:`s`]}),(0,I.jsx)(`div`,{className:`stack gap-12`,children:d.map((e,t)=>(0,I.jsx)(q,{group:e,i:u.length+t},e.label))})]}):null]})]}):(0,I.jsx)(i,{label:`Running every check (builds each theme in a sandbox)…`})]})}function ce(){let e=d(),[t,n]=(0,F.useState)(!1),[i,a]=(0,F.useState)(null);return t?(0,I.jsxs)(`p`,{className:`sub`,children:[`Server stopped. You can close this tab and reopen any time with `,(0,I.jsx)(`code`,{children:`geneseed web`}),`.`]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(C,{error:i}),(0,I.jsxs)(`button`,{className:`btn ghost danger-line`,onClick:async()=>{if(await e(`Stop the local Geneseed server? The console goes offline until you start it again.`,{title:`Stop the server?`,confirmLabel:`Stop server`,tone:`danger`})){a(null);try{await r.shutdown()}catch(e){if(e.status)return a(e.message)}n(!0)}},children:[(0,I.jsx)(g,{name:`x`}),`Stop server`]})]})}function le(){let e=d(),[t,n]=(0,F.useState)(!1),[r,i]=(0,F.useState)(null);return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(C,{error:r}),(0,I.jsxs)(`button`,{className:`btn ghost`,onClick:async()=>{if(await e(`Restart the local Geneseed server? The console reconnects in a moment.`,{title:`Restart the server?`,confirmLabel:`Restart`})){n(!0),i(null);try{await y()}catch(e){i(e.message),n(!1)}}},disabled:t,children:[(0,I.jsx)(g,{name:`refresh`}),t?`Restarting…`:`Restart server`]})]})}var Y=`https://github.com/Arylmera/Geneseed`,ue=`https://github.com/Arylmera`,de=[[`appearance`,`Appearance`],[`machine`,`Machine`],[`server`,`Server`],[`about`,`About`],[`danger`,`Danger zone`]],fe=[`Host check`,`token on writes`,`framing refused`,`cross-site GET refused`];function X({k:e,help:t,children:n,control:r}){return(0,I.jsxs)(`div`,{className:`sheet-row`,children:[(0,I.jsxs)(`span`,{className:`sheet-k`,children:[e,t?(0,I.jsx)(`span`,{className:`sheet-h sub`,children:t}):null]}),(0,I.jsx)(`div`,{className:`sheet-v`,children:n}),(0,I.jsx)(`div`,{className:`sheet-c`,children:r})]})}function Z({id:e,title:t,head:n,className:r=``,children:i}){return(0,I.jsxs)(`section`,{id:`set-${e}`,className:`card sheet-sec ${r}`,"aria-labelledby":`${e}-h`,children:[(0,I.jsxs)(`div`,{className:`card-head`,children:[(0,I.jsx)(`h3`,{id:`${e}-h`,children:t}),n]}),i]})}function Q(){let e=e=>document.getElementById(`set-${e}`)?.scrollIntoView?.({behavior:x()?`smooth`:`auto`,block:`start`});return(0,I.jsx)(`nav`,{className:`sheet-index`,"aria-label":`On this page`,children:de.map(([t,n])=>(0,I.jsx)(`button`,{type:`button`,className:t===`danger`?`t-bad`:``,onClick:()=>e(t),children:n},t))})}function $({version:e}){let[t,n]=(0,F.useState)(Y),[i,a]=(0,F.useState)(!0);(0,F.useEffect)(()=>{Promise.resolve(r.docsPage?.(`about`)).then(e=>{e?.repo&&(n(e.repo),a(!!e.repo_is_github))}).catch(()=>{})},[]);let o=(e,t)=>(0,I.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:[t,` `,(0,I.jsx)(g,{name:`external`})]});return(0,I.jsxs)(Z,{id:`about`,title:`About`,children:[(0,I.jsx)(X,{k:`Version`,control:i?o(t+`/blob/main/CHANGELOG.md`,`Changelog`):null,children:(0,I.jsx)(`span`,{className:`mono`,children:e||`unknown`})}),i?(0,I.jsx)(X,{k:`Credits`,control:o(t+`#-credits`,`Credits`),children:(0,I.jsx)(`span`,{className:`sub`,children:`Skills and agents adapted from other projects, with their licences`})}):null,(0,I.jsx)(X,{k:`Geneseed`,help:`MIT-licensed`,control:(0,I.jsxs)(`div`,{className:`row wrap gap-10`,children:[(0,I.jsxs)(`a`,{className:`btn ghost`,href:t,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(g,{name:`github`}),i?`Source on GitHub`:`Source repo`]}),i&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`a`,{className:`btn ghost`,href:t+`/issues`,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(g,{name:`external`}),`Issues`]}),(0,I.jsxs)(`a`,{className:`btn ghost`,href:t+`/blob/main/LICENSE`,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(g,{name:`external`}),`MIT License`]})]})]}),children:(0,I.jsx)(`span`,{className:`sub`,children:`A portable, theme-able harness you implant once and use everywhere to grow a disciplined AI coding agent. One canonical source, many voices.`})}),(0,I.jsx)(X,{k:`Creator`,control:(0,I.jsxs)(`a`,{className:`btn ghost`,href:ue,target:`_blank`,rel:`noreferrer`,children:[(0,I.jsx)(g,{name:`github`}),`@Arylmera on GitHub`]}),children:(0,I.jsxs)(`span`,{className:`sub`,children:[`Built by `,(0,I.jsx)(`strong`,{children:`Guillaume Lemer`}),`. It started as a personal, Obsidian-vault-grown agent operating system and was distilled into the repo you are running. If you find it useful, a star on the repo or an issue with feedback is the best way to help shape what comes next.`]})})]})}function pe({overview:e,onAction:t,flavour:n,onFlavour:r,accentMode:i,onAccentMode:a,layout:o,onLayout:s}){let l=d(),m=e?.install,h=e?.footprint,y=e?.server,x=e?.daemon_stale,C=async e=>{m&&e!==h&&await l(`Rebuild ${p(m.host).label} · ${m.scope} with the “${e}” footprint? It rebuilds in place, non-destructive.`,{title:`Change the footprint?`,confirmLabel:`Rebuild`})&&t?.(`install`,{...m,footprint:e})},w=y?.autostart===!0?`On · login script`:y?.autostart===!1?`Off`:`unknown`;return(0,I.jsxs)(`div`,{className:`narrow-lg`,children:[(0,I.jsx)(`div`,{className:`head-row mb-18`,children:(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`h2`,{className:`h`,children:b.server}),(0,I.jsx)(`p`,{className:`sub`,children:`Console appearance, this copy of Geneseed, the local server, and about. Each install is managed on the Hosts tab.`})]})}),(0,I.jsxs)(`div`,{className:`sheet`,children:[(0,I.jsx)(Q,{}),(0,I.jsxs)(`div`,{className:`sheet-body`,children:[(0,I.jsxs)(Z,{id:`appearance`,title:`Appearance`,children:[i&&a&&(0,I.jsxs)(X,{k:(0,I.jsx)(`span`,{id:`dir-accent-label`,children:`Accent`}),help:`Live, saved in this browser`,children:[(0,I.jsx)(S,{value:i,onChange:a,labelledBy:`dir-accent-label`}),(0,I.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:_(i)})]}),o&&s&&(0,I.jsxs)(X,{k:(0,I.jsx)(`span`,{id:`dir-layout-label`,children:`Overview view`}),help:`The Overview, or one of the older dashboards`,children:[(0,I.jsx)(u,{"aria-labelledby":`dir-layout-label`,children:v.map(e=>(0,I.jsx)(`button`,{className:o===e.id?`on`:``,onClick:()=>s(e.id),"aria-pressed":o===e.id,title:e.tagline,children:e.short},e.id))}),(0,I.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:v.find(e=>e.id===o)?.tagline??``})]}),n&&r&&(0,I.jsx)(X,{k:`Console direction`,help:`${f.length} takes on the same data; applies instantly`,children:(0,I.jsx)(`div`,{className:`dir-grid`,children:f.map(e=>(0,I.jsxs)(`button`,{className:`dir-tile dir-${e.id} ${n===e.id?`on`:``}`,onClick:()=>r(e.id),"aria-pressed":n===e.id,children:[(0,I.jsxs)(`span`,{className:`dir-thumb`,"aria-hidden":`true`,children:[(0,I.jsx)(`span`,{className:`dir-thumb-rail`}),(0,I.jsx)(`span`,{className:`dir-thumb-bar`}),(0,I.jsx)(`span`,{className:`dir-thumb-bar w70`}),(0,I.jsx)(`span`,{className:`dir-thumb-bar w52`}),(0,I.jsx)(`span`,{className:`dir-thumb-dot`})]}),(0,I.jsxs)(`span`,{className:`dir-meta`,children:[(0,I.jsxs)(`span`,{className:`dir-name`,children:[e.short,n===e.id&&(0,I.jsx)(`span`,{className:`dir-check`,children:`● active`})]}),(0,I.jsx)(`span`,{className:`dir-tag`,children:e.tagline})]})]},e.id))})})]}),(0,I.jsxs)(Z,{id:`machine`,title:`Machine`,children:[(0,I.jsx)(X,{k:`Geneseed`,help:`This copy of the source`,control:(0,I.jsxs)(`button`,{className:`btn`,onClick:()=>t(`update`),children:[(0,I.jsx)(g,{name:`download`}),`Update (git pull + rebuild)`]}),children:(0,I.jsx)(`span`,{className:`mono`,children:e?.version||`unknown`})}),(0,I.jsx)(X,{k:`Command on PATH`,help:`Run geneseed from any folder`,control:(0,I.jsxs)(`button`,{className:`btn ghost`,onClick:()=>t(`link`),children:[(0,I.jsx)(g,{name:`external`}),`Add to PATH`]})}),m&&h&&(0,I.jsxs)(X,{k:(0,I.jsx)(`span`,{id:`footprint-label`,children:`Harness footprint`}),help:(0,I.jsxs)(I.Fragment,{children:[`For `,p(m.host).label,` · `,m.scope,`; every Rule stays in force.`,` `,(0,I.jsx)(`a`,{href:`#/docs/footprint`,children:`Learn more →`})]}),children:[(0,I.jsx)(u,{"aria-labelledby":`footprint-label`,children:[`lean`,`full`].map(e=>(0,I.jsx)(`button`,{className:h===e?`on`:``,onClick:()=>C(e),"aria-pressed":h===e,children:e},e))}),(0,I.jsx)(`span`,{className:`dir-layout-note sub`,role:`status`,"aria-live":`polite`,children:h===`lean`?`Lean: terse rule lines + a pointer to the full law file (~40% smaller, lighter context per turn).`:`Full: every Rule’s complete text and rationale inlined (maximum guidance, largest context).`})]})]}),(0,I.jsxs)(Z,{id:`server`,title:`Server`,head:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`span`,{className:`pill good`,children:`running`}),(0,I.jsxs)(`span`,{className:`mono dim`,children:[`127.0.0.1:`,window.location.port||`80`,y?` · pid ${y.pid} · up ${c(y.started)}`:``]})]}),children:[(0,I.jsx)(X,{k:`Code`,help:`The page you see matches the build on disk`,control:(0,I.jsx)(le,{}),children:x?(0,I.jsx)(`span`,{className:`pill warn`,children:`disk has newer code → Restart`}):(0,I.jsx)(`span`,{className:`pill good`,children:`matches disk`})}),(0,I.jsx)(X,{k:`Start at login`,help:`A login script you set up by hand (install guide)`,children:(0,I.jsx)(`span`,{className:`sub`,children:w})}),(0,I.jsx)(X,{k:`Guards`,help:`What stops another page from driving the console`,children:(0,I.jsx)(`span`,{className:`row wrap gap-8`,children:fe.map(e=>(0,I.jsx)(`span`,{className:`pill good`,children:e},e))})})]}),(0,I.jsx)($,{version:e?.version}),(0,I.jsxs)(Z,{id:`danger`,title:`Danger zone`,className:`danger-zone`,children:[(0,I.jsx)(X,{k:`Stop the server`,help:`The console goes offline until you run geneseed web`,control:(0,I.jsx)(ce,{})}),(0,I.jsx)(X,{k:`The geneseed command`,help:`Installs keep working; only the command goes`,control:(0,I.jsx)(`button`,{className:`btn ghost danger-line`,onClick:()=>t(`unlink`),children:`Remove from PATH`})}),(0,I.jsx)(X,{k:`Uninstall a harness`,children:(0,I.jsxs)(`span`,{className:`sub`,children:[`Each install has its own Uninstall in `,(0,I.jsx)(`a`,{href:`#/installs/hosts`,children:`Hosts`}),`, bound to its host and path.`]})})]})]})]})]})}function me({tab:e=`hosts`,overview:t,setup:n,themes:r,onAction:i,onMutated:a,dataRev:s,appearance:c={}}){let l=t?.doctor,u=t?.diff,d={edits:u?o(u):null,doctor:l?l.ok?`clean`:l.problems.length:null};return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(m,{title:`Installs`,sub:`Where the harness lives on this machine, and how each copy is built.`}),(0,I.jsx)(E,{page:`installs`,current:e,badges:d,label:`Installs`}),e===`hosts`&&(0,I.jsx)(U,{onAction:i,themes:r,currentTheme:t?.theme,overview:t,setup:n,dataRev:s,onMutated:a}),e===`kits`&&(0,I.jsx)(W,{onAction:i,dataRev:s}),e===`edits`&&(0,I.jsx)(se,{onMutated:a,onAction:i,dataRev:s,overview:t}),e===`doctor`&&(0,I.jsx)(J,{dataRev:s}),e===`server`&&(0,I.jsx)(pe,{overview:t,onAction:i,...c})]})}export{me as default};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{t as i}from"./drawable-ixCquffB.js";import{n as a}from"./sections-ChwaobfW.js";import{Ct as o,Dt as s,Et as c,It as l,J as u,K as d,Nt as f,Ot as p,Pt as m,St as h,Tt as g,_t as _,at as v,bt as y,ct as b,dt as x,ft as S,gt as C,ht as w,it as T,jt as E,kt as D,lt as O,mt as k,pt as A,q as j,tt as M,ut as N,vt as P,wt as F,x as I,xt as ee,yt as L}from"./index-Dwo3Gxek.js";import{n as R}from"./Dashboard-BZmw2a7d.js";function z(e){return ee((e.iterationDuration+e._loopDelay)*e.iterationCount-e._loopDelay)||1e-11}function B(e,t,n,r,i,a){let o=F(e.duration)&&e.duration<=1e-11?n-m:n;t.composition&&P(t,o,1,1,l.AUTO);let s=r?new x(r,e,t,o,!1,i,a):new w(e,t,o);return t.composition&&s.init(!0),y(t,s),h(t,e=>{let n=e._offset+e._delay+e.duration;n>t.iterationDuration&&(t.iterationDuration=n)}),t.duration=z(t),t}var V=0,H=class extends w{constructor(e={}){super(e,null,0),++V,this.id=s(e.id)?V:e.id,this.duration=0,this.labels={};let t=e.defaults,n=E.defaults;this.defaults=t?p(t,n):n,this.composition=L(e.composition,!0),this.onRender=e.onRender||n.onRender;let r=L(e.playbackEase,n.playbackEase);this._ease=r?A(r):null,this.iterationDuration=0}add(e,t,n){let r=g(t),i=g(e);if(r||i){if(this._hasChildren=!0,r){let r=t,i=E.editor&&E.editor.addTimelineChild,a=n&&n.type===`Stagger`&&E.editor,c=o(n)?n:null;if(c||a){let t=k(e),a=this.duration,o=this.iterationDuration,l=r.id,u=0,d=t.length,f=i?i(e,r,this.id,n,d):null,p=c||E.editor.resolveStagger(n.defaultValue);t.forEach(e=>{let n={...f||r};this.duration=a,this.iterationDuration=o,s(l)||(n.id=l+`-`+u);let i=N(this,p(e,u,t,null,this));B(n,this,i,e,u,t),u++})}else{let t=i?i(e,r,this.id,n):r,a=n&&n.type?n.defaultValue:n;B(t,this,N(this,a),e)}}else B(e,this,N(this,t));return this.composition&&this.init(!0),this}}sync(e,t){if(s(e)||e&&s(e.pause))return this;e.pause();let n=+(e.effect?e.effect.getTiming().duration:e.duration);!s(e)&&!s(e.persist)&&(e.persist=!0);let r=E.editor,i=r&&r.addTimelineChild;r&&r.addTimelineSync&&(t=r.addTimelineSync(e,t,this.id),r.addTimelineChild=null);let a=this.add(e,{currentTime:[0,n],duration:n,delay:0,ease:`linear`,playbackEase:`linear`},t);return r&&(r.addTimelineChild=i),a}set(e,t,n){return s(t)?this:(t.duration=m,t.composition=f.replace,this.add(e,t,n))}call(e,t){return s(e)||e&&!o(e)?this:(E.editor&&E.editor.addTimelineCall&&(t=E.editor.addTimelineCall(e,t,this.id)),this.add({duration:0,delay:0,onComplete:()=>e(this)},t))}label(e,t){return s(e)||e&&!c(e)?this:(E.editor&&E.editor.addTimelineLabel&&(t=E.editor.addTimelineLabel(e,t,this.id)),this.labels[e]=N(this,t),this)}remove(e,t){return C(k(e),this,t),this}stretch(e){let t=this.duration;if(t===D(e))return this;let n=e/t,r=this.labels;h(this,e=>e.stretch(e.duration*n));for(let e in r)r[e]*=n;return super.stretch(e)}refresh(){return h(this,e=>{e.refresh&&e.refresh()}),this}revert(){return super.revert(),h(this,e=>e.revert,!0),_(this)}then(e){return super.then(e)}},U=e=>E.editor?E.editor.addTimeline(e):new H(e).init(),W=e(t(),1),G=n(),K=.62,q=(e,t)=>String(e).length*t*K;function J(e,t){let n=0;for(let t of e){if(t.t===``||t.t==null)continue;let e=q(t.t,t.size)/2;n=Math.max(n,Math.hypot(e,t.dy-t.size*.75),Math.hypot(e,t.dy+t.size*.25))}return Math.ceil(n+t)}function Y(e,t,n=0){let r=t.x-e.x,i=t.y-e.y,a=Math.hypot(r,i)||1,o=r/a,s=i/a,c=e.x+o*e.r,l=e.y+s*e.r,u=t.x-o*t.r,d=t.y-s*t.r,f=n*a,p=e=>e.toFixed(1);return`M${p(c)} ${p(l)} C${p(c+o*a*.3-s*f)} ${p(l+s*a*.3+o*f)} ${p(u-o*a*.3-s*f)} ${p(d-s*a*.3+o*f)} ${p(u)} ${p(d)}`}var X=!1,Z=!1,Q=850;function $({hash:e,label:t,part:n,children:r}){return(0,G.jsx)(`g`,{className:`cm-node`,"data-cm":n,role:`button`,tabIndex:0,"aria-label":t,onClick:()=>M(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),M(e))},children:r})}function te({overview:e,dataRev:t}){let{data:n}=u(()=>r.catalog(`laws`),[t],`catalog:laws`),a=n?.items??null,o=n?.nouns?.ontology||`Ethos`,s=n?.nouns?.laws||`Dictates`,c=n?.nouns?.doctrines||`Doctrines`,l=(0,W.useRef)(null),d=(0,W.useRef)(!0),f=(0,W.useRef)(null);(0,W.useLayoutEffect)(()=>{let e=l.current;if(!e||X||!T())return;X=!0;let t=t=>[...e.querySelectorAll(t)],n=t(`[data-cm="hub"]`),r=t(`[data-cm="sat"]`),a=t(`[data-cm="gov"]`),o=t(`.cm-edge-gov`),s=t(`.cm-note, .cm-govern-label`),c=i(t(`.cm-edge`));O([...n,...r,...a],{opacity:0,scale:.7}),O([...o,...s],{opacity:0}),O(c,{draw:`0 0`});let u=U({autoplay:!1,defaults:{ease:`outExpo`}}).add(n,{opacity:1,scale:1,duration:450},0).add(c,{draw:`0 1`,duration:380,delay:b(70)},140).add(r,{opacity:1,scale:1,duration:420,delay:b(70)},260).add(o,{opacity:1,duration:300,delay:b(50)},420).add(a,{opacity:1,scale:1,duration:380,delay:b(50)},470).add(s,{opacity:1,duration:300},520);d.current=!1;let p=()=>u.complete(),m=()=>{u.play(),p=v(u,Q),d.current=!0,f.current?.()};if(typeof IntersectionObserver>`u`)return m(),()=>p();let h=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&(h.disconnect(),m())},{threshold:.33});return h.observe(e),()=>{h.disconnect(),d.current=!0,p()}},[]);let p=e?.counts||{},m=j(p),h=[];for(let e of(a||[]).filter(e=>e.tier===`doctrine`)){let t=h.find(t=>t.id===e.pack);t||h.push(t={id:e.pack,on:0}),e.active!==!1&&(t.on+=1)}let g=e?.footprint===`lean`?`lean — first line only`:`full text inlined`,_={x:330,y:165,r:J([{t:`Constitution`,size:17,dy:-12},{t:`${m} rules in force`,size:10,dy:8},{t:g,size:8.5,dy:24}],12)},y={x:126,y:95,r:J([{t:o,size:12.5,dy:-7},{t:`${p.ontology??0} sections`,size:10,dy:10}],11)},x={x:560,y:78,r:J([{t:s,size:12.5,dy:-6},{t:`${p.laws??0}`,size:13,dy:12}],11)},C={x:560,y:252,r:J([{t:c,size:12.5,dy:-6},{t:`${p.doctrines?.rules??0}`,size:13,dy:12}],11)},w=(e,t,n,r)=>({x:e,y:t,label:n,count:r,r:J([{t:n,size:10.5,dy:-2},{t:`${r}`,size:9,dy:10}],9)}),E=[{...w(812,52,`Skills`,p.skills??0),hash:`#/skills`,from:x},{...w(820,126,`Agents`,p.agents??0),hash:`#/agents`,from:x},{...w(816,232,`Memory`,p.memory??0),hash:`#/section/memory`,from:C},{...w(812,300,`Wiki`,p.wiki??0),hash:`#/section/wiki`,from:C}],D={rx:122,ry:68,from:212,to:112},k=h.map((e,t)=>{let n=(h.length===1?(D.from+D.to)/2:D.from+(D.to-D.from)*t/(h.length-1))*Math.PI/180;return{...e,x:C.x+D.rx*Math.cos(n),y:C.y+D.ry*Math.sin(n),r:J([{t:e.id,size:7.5,dy:-2},{t:`${e.on}`,size:7.5,dy:8}],4)}}),A=k.length;return(0,W.useLayoutEffect)(()=>{let e=l.current;if(!e||!A||Z||!T())return;Z=!0;let t=[...e.querySelectorAll(`.cm-mini > g`)];O(t,{opacity:0,scale:.5});let n=()=>O(t,{opacity:1,scale:1}),r=()=>{f.current=null;let e=S(t,{opacity:1,scale:1,duration:380,delay:b(45,{start:420}),ease:`outExpo`});n=v(e,420+45*A+380)};return d.current?r():f.current=r,()=>{f.current=null,n()}},[A]),(0,G.jsxs)(`svg`,{ref:l,className:`cmap`,viewBox:`0 0 940 350`,role:`group`,"aria-label":`The constitution map`,children:[(0,G.jsx)(`path`,{d:Y(_,y,.05),className:`cm-edge`}),(0,G.jsx)(`path`,{d:Y(_,x,-.07),className:`cm-edge`}),(0,G.jsx)(`path`,{d:Y(_,C,.07),className:`cm-edge`}),E.map(e=>(0,G.jsx)(`path`,{d:Y(e.from,e,.03),className:`cm-edge-gov`},`e-${e.label}`)),(0,G.jsxs)($,{hash:`#/laws`,part:`hub`,label:`Constitution: ${m} rules in force`,children:[(0,G.jsx)(`circle`,{cx:_.x,cy:_.y,r:_.r,className:`cm-hub-disc`}),(0,G.jsx)(`text`,{x:_.x,y:_.y-12,textAnchor:`middle`,className:`cm-hub-name`,children:`Constitution`}),(0,G.jsxs)(`text`,{x:_.x,y:_.y+8,textAnchor:`middle`,className:`cm-hub-num`,children:[m,` rules in force`]}),(0,G.jsx)(`text`,{x:_.x,y:_.y+24,textAnchor:`middle`,className:`cm-note`,children:g})]}),(0,G.jsxs)($,{hash:`#/laws`,part:`sat`,label:`${o}: ${p.ontology??0} sections`,children:[(0,G.jsx)(`circle`,{cx:y.x,cy:y.y,r:y.r,className:`cm-sat-disc`}),(0,G.jsx)(`text`,{x:y.x,y:y.y-7,textAnchor:`middle`,className:`cm-sat-name`,children:o}),(0,G.jsxs)(`text`,{x:y.x,y:y.y+10,textAnchor:`middle`,className:`cm-sat-num`,children:[p.ontology??0,` sections`]})]}),(0,G.jsx)(`text`,{x:y.x,y:y.y+y.r+16,textAnchor:`middle`,className:`cm-note`,children:`how it thinks, not a rule`}),(0,G.jsxs)($,{hash:`#/laws`,part:`sat`,label:`${s}: ${p.laws??0}, never broken`,children:[(0,G.jsx)(`circle`,{cx:x.x,cy:x.y,r:x.r,className:`cm-sat-disc`}),(0,G.jsx)(`text`,{x:x.x,y:x.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:s}),(0,G.jsx)(`text`,{x:x.x,y:x.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:p.laws??0})]}),(0,G.jsx)(`text`,{x:x.x,y:x.y+x.r+16,textAnchor:`middle`,className:`cm-note`,children:`never broken`}),(0,G.jsxs)($,{hash:`#/laws`,part:`sat`,label:`${c}: ${p.doctrines?.rules??0} rules chosen at build`,children:[(0,G.jsx)(`circle`,{cx:C.x,cy:C.y,r:C.r,className:`cm-sat-disc`}),(0,G.jsx)(`text`,{x:C.x,y:C.y-6,textAnchor:`middle`,className:`cm-sat-name`,children:c}),(0,G.jsx)(`text`,{x:C.x,y:C.y+12,textAnchor:`middle`,className:`cm-sat-big`,children:p.doctrines?.rules??0})]}),(0,G.jsx)(`text`,{x:C.x+22,y:C.y+C.r+20,className:`cm-note`,children:p.doctrines?`chosen at build · ${p.doctrines.active}/${p.doctrines.total} packs lit`:`chosen at build`}),(0,G.jsx)(`g`,{className:`cm-mini`,children:k.map(e=>(0,G.jsxs)(`g`,{children:[(0,G.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-pack-disc`,style:{stroke:I(e.id)}}),(0,G.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-pack-id`,children:e.id}),(0,G.jsx)(`text`,{x:e.x,y:e.y+8,textAnchor:`middle`,style:{fill:I(e.id)},children:e.on})]},e.id))}),(0,G.jsx)(`text`,{x:866,y:16,textAnchor:`middle`,className:`cm-govern-label`,children:`GOVERNS THE HARNESS`}),E.map(e=>(0,G.jsxs)($,{hash:e.hash,part:`gov`,label:`${e.label}: ${e.count}`,children:[(0,G.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r,className:`cm-gov-disc`}),(0,G.jsx)(`text`,{x:e.x,y:e.y-2,textAnchor:`middle`,className:`cm-gov-name`,children:e.label}),(0,G.jsx)(`text`,{x:e.x,y:e.y+10,textAnchor:`middle`,className:`cm-gov-num`,children:e.count})]},e.label)),(0,G.jsx)(`text`,{x:y.x,y:228,textAnchor:`middle`,className:`cm-note`,children:`tap any node to open its ledger`})]})}function ne(){let e=new Date,t=e=>String(e).padStart(2,`0`);return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function re({counts:e}){let t=[{label:a.skills.label,n:e.skills??0,hash:`#/skills`},{label:`Rules in force`,n:j(e),hash:`#/laws`},{label:a.agents.label,n:e.agents??0,hash:`#/agents`},{label:a.memory.label,n:e.memory??0,hash:`#/section/memory`},{label:a.notebook.label,n:e.notebook??0,hash:`#/section/notebook`},{label:a.wiki.label,n:e.wiki??0,hash:`#/section/wiki`},{label:a.config.label,n:e.config??0,hash:`#/section/config`}],n=Math.max(...t.map(e=>e.n),1);return(0,G.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,G.jsxs)(`div`,{className:`card-head`,children:[(0,G.jsx)(`h3`,{children:`Growth rings`}),(0,G.jsx)(`span`,{className:`tick right`,children:`by section`})]}),t.map(e=>(0,G.jsxs)(`button`,{className:`jr-ring`,onClick:()=>M(e.hash),children:[(0,G.jsx)(`span`,{className:`jr-ring-label`,children:e.label}),(0,G.jsx)(`span`,{className:`jr-ring-track`,children:(0,G.jsx)(`span`,{className:`jr-ring-fill`,style:{width:`${e.n/n*100}%`}})}),(0,G.jsx)(`span`,{className:`jr-ring-num`,children:e.n})]},e.label))]})}function ie({recent:e,buildEpoch:t}){let n=e?.items||[],r=e?.skipped||[];return(0,G.jsxs)(`div`,{className:`card pad-lg jr-card`,children:[(0,G.jsxs)(`div`,{className:`card-head`,children:[(0,G.jsx)(`h3`,{children:`Freshly grown`}),(0,G.jsx)(`span`,{className:`tick right`,children:`newest`})]}),e?n.length===0?(0,G.jsx)(`p`,{className:`sub`,children:`Nothing here carries a date yet.`}):n.slice(0,5).map(e=>(0,G.jsxs)(`button`,{className:`jr-fresh`,onClick:()=>M(`#/item/${e.type}/${encodeURIComponent(e.name)}`),children:[(0,G.jsx)(`span`,{className:`jr-fresh-kind`,children:e.section}),(0,G.jsx)(`span`,{className:`jr-fresh-name`,children:e.title}),(0,G.jsx)(`span`,{className:`jr-fresh-when`,children:d(e.mtime)})]},`${e.section}:${e.name}`)):(0,G.jsx)(`p`,{className:`sub`,children:`Reading the shelves…`}),r.length>0&&(0,G.jsxs)(`p`,{className:`sub jr-skipped`,children:[`Not dated: `,r.join(`, `),` — too many files to stat on every load.`]}),(0,G.jsxs)(`p`,{className:`jr-care`,children:[t?`Last built ✓ ${d(t)}`:`Never built here`,` ·`,` `,(0,G.jsx)(`button`,{className:`jr-go`,onClick:()=>M(`#/activity`),children:`log →`})]})]})}function ae({overview:e,recent:t,lens:n,onDirection:r,dataRev:i}){let a=e?.counts||{};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`head-row jr-head`,children:(0,G.jsxs)(`div`,{children:[(0,G.jsxs)(`div`,{className:`eyebrow`,children:[`Field journal · `,ne()]}),(0,G.jsx)(`h2`,{className:`h`,children:`Today in this harness`}),(0,G.jsx)(R,{verdict:n?.verdict})]})}),(0,G.jsxs)(`div`,{className:`jr-row2`,children:[(0,G.jsx)(re,{counts:a}),(0,G.jsx)(ie,{recent:t,buildEpoch:e?.build_epoch})]}),(0,G.jsxs)(`div`,{className:`card pad-lg jr-map`,children:[(0,G.jsxs)(`div`,{className:`card-head`,children:[(0,G.jsx)(`h3`,{children:`The Constitution — and the harness it governs`}),(0,G.jsx)(`button`,{className:`jr-go right`,onClick:()=>M(`#/laws`),children:`open →`})]}),(0,G.jsx)(te,{overview:e,dataRev:i})]}),(0,G.jsxs)(`p`,{className:`sub jr-others`,children:[`Other views:`,` `,(0,G.jsx)(`button`,{className:`jr-go`,onClick:()=>r?.(`lineage`),children:`Lineage`}),` `,`·`,` `,(0,G.jsx)(`button`,{className:`jr-go`,onClick:()=>r?.(`operator`),children:`Operator`})]})]})}export{ae as default};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{D as r,E as i,N as a}from"./index-Dwo3Gxek.js";var o=e(t(),1),s=n();function c({label:e,value:t,options:n,onChange:r}){return n.length?(0,s.jsx)(`select`,{className:`sel`,"aria-label":e,value:t,onChange:e=>r(e.target.value),children:n.map(e=>(0,s.jsx)(`option`,{value:e,children:e},e))}):null}var l=[`lean`,`full`];function u({on:e,disabled:t,label:n,onToggle:r}){return(0,s.jsx)(`input`,{type:`checkbox`,role:`switch`,className:`sw-toggle${e?` on`:``}`,checked:e,"aria-checked":e,disabled:t,"aria-label":n,onChange:r,onKeyDown:e=>{e.key===`Enter`&&!t&&r()}})}var d=[{key:`theme`,name:`voice`,title:`Voice`},{key:`footprint`,name:`footprint`,title:`Footprint`},{key:`posture`,name:`posture`,title:`Posture`},{key:`mode`,name:`mode`,title:`Mode`},{key:`trust`,name:`trust`,title:`Loop trust`}];function f({value:e,options:t,onChange:n,who:r}){return d.map(i=>(0,s.jsxs)(`label`,{className:`dp-field`,children:[(0,s.jsx)(`span`,{children:i.title}),(0,s.jsx)(c,{label:`${i.name} for ${r}`,value:e[i.key],options:t[i.key],onChange:e=>n(i.key,e)})]},i.key))}var p=e=>e.kits||[],m=e=>!e.editable||e.state===`unreadable`;function h(e,t){let n=a(),s=r(),c=e=>{let t=s.get(`kits`,e.id);return t&&t.base===i(p(e))?t:null},{prune:l}=s;(0,o.useEffect)(()=>{if(!e?.installs)return;let t=new Map(e.installs.map(e=>[e.id,i(p(e))]));l(`kits`,(e,n)=>t.has(e)&&t.get(e)!==n.base)},[e,l]);let u=e=>c(e)?.value??new Set(p(e));return{setOf:u,toggle:(e,t)=>{let n=new Set(u(e));n.delete(t)||n.add(t),s.put(`kits`,e.id,n,i(p(e)))},change:e=>{let t=u(e),n=new Set(p(e));return{on:[...t].filter(e=>!n.has(e)),off:[...n].filter(e=>!t.has(e))}},apply:async e=>{let r=[...u(e)],i=`Rebuild ${e.host} · ${e.scope} with kits: ${r.join(`, `)||`none`}? Members of kits turned off are removed; files you edited are kept.`;await n(i,{confirmLabel:`Rebuild`})&&await t(`install`,{host:e.host,path:e.path,kits:r})&&s.startApply(`kits`,e.id)},running:e=>s.running(`kits`,e.id)||!!c(e)?.applied,failed:e=>!!c(e)?.failed}}function g({row:e,stage:t}){let{on:n,off:r}=t.change(e),i=n.length+r.length>0,a=t.running(e),o=[...n.map(e=>`turn on ${e}`),...r.map(e=>`turn off ${e}`)].join(` · `),c=t.failed(e)?`Last rebuild failed — see console`:``,l=a?`Rebuilding…`:[c,o].filter(Boolean).join(` · `)||`No staged changes`;return(0,s.jsxs)(`div`,{className:`kit-foot`,children:[(0,s.jsx)(`span`,{className:`kit-hint${i?` staged`:``}`,role:`status`,children:l}),(0,s.jsx)(`button`,{type:`button`,className:`btn soft sm`,"aria-label":`Apply kits for ${e.host} · ${e.scope}`,disabled:m(e)||!i||a,onClick:()=>t.apply(e),children:`Apply`})]})}var _={active:[`Active`,`ok`],disabled:[`Disabled`,`warn`]},v=({row:e})=>{let[t,n]=_[e.state]||[e.state||`Unknown`,``];return(0,s.jsx)(`span`,{className:`tag ${n}`,children:t})};export{h as a,u as c,p as i,v as n,l as o,m as r,f as s,g as t};
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{A as i,J as a,k as o}from"./index-Dwo3Gxek.js";import{t as s}from"./EmptyState-1sPNleqv.js";import{a as c,n as l,o as u,r as d,t as f}from"./RailCats-DNlJKicm.js";import{t as p}from"./Markdown-OReRRoEV.js";import{a as m,c as h,i as g,n as _,r as v,t as y}from"./KitApply-BR8AcZ62.js";var b=e(t(),1),x=n(),S=encodeURIComponent,C=`Enabled`,w=`Not enabled`,T=e=>(e||``).split(/\s+/).filter(Boolean).length,E=e=>[...new Set(e.filter(Boolean))],D=e=>(e||``).slice(0,7);function O(e,t){return[C,w].flatMap(n=>e.map(e=>({k:e,on:t.filter(t=>g(t).includes(e.name))})).filter(({on:e})=>e.length>0==(n===C)).map(({k:e,on:t})=>{let r=e.credits||[],i=E(r.map(e=>e.author||e.repo)).join(`, `),a=E(r.map(e=>e.license)).join(`, `);return{name:e.name,desc:e.description,group:n,def:e,meta:[`${(e.skills||[]).length} skills · ${(e.agents||[]).length} agents · ${T(e.rules)} rule words`,t.length?`on in ${t.map(e=>`${e.host} · ${e.scope}`).join(`, `)}`:null,i?`from ${i}${a?` (${a})`:``}`:null].filter(Boolean).join(` — `)}}))}var k=({type:e,names:t,listed:n})=>t.length?(0,x.jsx)(`ul`,{className:`kit-links`,children:t.map(t=>(0,x.jsx)(`li`,{children:n?.has(t)?(0,x.jsx)(`a`,{href:`#/item/${e}/${S(t)}`,children:t}):(0,x.jsx)(`span`,{className:`kit-link-off`,title:`Installed when this kit is on`,children:t})},t))}):(0,x.jsx)(`p`,{className:`panel-note`,children:`None.`});function A({kit:e,installs:t,stage:n,listed:r}){let i=e.credits||[];return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`reader-tags`,children:[(0,x.jsx)(`span`,{className:`tag acc`,children:`Kit`}),E(i.map(e=>e.license)).map(e=>(0,x.jsx)(`span`,{className:`tag`,children:e},e))]}),(0,x.jsx)(`h2`,{className:`reader-title`,children:e.name}),e.description?(0,x.jsx)(`p`,{className:`reader-lede`,children:e.description}):null,(0,x.jsxs)(`p`,{className:`mono dim reader-src`,children:[`kits/`,e.name,`/`]}),(0,x.jsx)(`hr`,{className:`hr`}),(0,x.jsx)(`h3`,{className:`loop-h2`,children:`Installs`}),t.length?(0,x.jsx)(`ul`,{className:`kit-list kit-box`,"aria-label":`Installs for ${e.name}`,children:t.map(t=>{let r=v(t),i=`${t.host} · ${t.scope}`;return(0,x.jsxs)(`li`,{className:`kit-install`,children:[(0,x.jsxs)(`div`,{className:`kit-row`,children:[(0,x.jsxs)(`div`,{className:`kit-main`,children:[(0,x.jsx)(`b`,{children:i}),(0,x.jsx)(`span`,{className:`mono dim`,children:t.path})]}),(0,x.jsx)(_,{row:t}),(0,x.jsx)(h,{on:n.setOf(t).has(e.name),disabled:r||n.running(t),label:`${e.name} for ${i}`,onToggle:()=>n.toggle(t,e.name)})]}),r&&(0,x.jsx)(`p`,{className:`kit-lock`,children:t.reason||t.error}),(0,x.jsx)(y,{row:t,stage:n})]},t.id)})}):(0,x.jsx)(`p`,{className:`panel-note`,children:`No install yet.`}),i.length?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h3`,{className:`loop-h2`,children:`Upstream`}),(0,x.jsx)(`dl`,{className:`loop-facts`,children:i.map(e=>(0,x.jsxs)(b.Fragment,{children:[(0,x.jsx)(`dt`,{children:e.author||e.repo}),(0,x.jsxs)(`dd`,{children:[(0,x.jsx)(`span`,{className:`mono`,children:e.repo}),e.commit?(0,x.jsxs)(`span`,{className:`mono dim`,children:[`@ `,D(e.commit)]}):null,e.compareUrl?(0,x.jsx)(`a`,{href:e.compareUrl,target:`_blank`,rel:`noreferrer`,"aria-label":`Compare ${e.repo} @ ${D(e.commit)} with HEAD`,children:`compare`}):null,e.license?(0,x.jsx)(`span`,{className:`tag`,children:e.license}):null]})]},e.key||e.repo))})]}):null,(0,x.jsx)(`h3`,{className:`loop-h2`,children:`Skills`}),(0,x.jsx)(k,{type:`skill`,names:e.skills||[],listed:r?.skills}),(0,x.jsx)(`h3`,{className:`loop-h2`,children:`Agents`}),(0,x.jsx)(k,{type:`agent`,names:e.agents||[],listed:r?.agents}),e.rules?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`h3`,{className:`loop-h2`,children:[`Rules`,` `,(0,x.jsxs)(`span`,{className:`mono dim`,children:[T(e.rules),e.rulesWordBudget?` / ${e.rulesWordBudget}`:``,` words`]})]}),(0,x.jsx)(`div`,{className:`lib-doc detail-doc`,children:(0,x.jsx)(p,{body:e.rules})})]}):null,e.banned?.length?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(`h3`,{className:`loop-h2`,children:`Banned APIs`}),(0,x.jsx)(`ul`,{className:`kit-links`,"aria-label":`Banned APIs`,children:e.banned.map(e=>(0,x.jsx)(`li`,{children:(0,x.jsx)(`span`,{className:`kit-link-off`,children:e})},e))})]}):null]})}function j({item:e,onAction:t,dataRev:n}){let{data:p,error:h}=a(()=>r.kits(),[n]),g=m(p,t),[_,v]=(0,b.useState)(``),[y,C]=(0,b.useState)(`all`),w=p?.kits||[],T=p?.installs||[],E=O(w,T),D=y===`all`?E:E.filter(e=>e.group===y),k=u(D,_),j=!!e&&!!p&&!E.some(t=>t.name===e),M=j?null:E.find(t=>t.name===e)||E[0]||null,{data:N}=a(()=>Promise.all([r.catalog(`skills`),r.catalog(`agents`)]).then(([e,t])=>({skills:new Set((e.items||[]).map(e=>e.name)),agents:new Set((t.items||[]).map(e=>e.name))})).catch(()=>null),[n]),P=h||p?.error,F=E.length>=8?l(E):[];return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{error:P,style:{margin:`0 0 var(--sp-3)`}}),(0,x.jsxs)(`div`,{className:`library`,children:[(0,x.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Kits sections`,children:[(0,x.jsxs)(`div`,{className:`lib-title`,children:[(0,x.jsx)(`h1`,{className:`h`,children:`Kits`}),(0,x.jsx)(`span`,{className:`dim`,children:`Optional bundles`})]}),F.length>1?(0,x.jsx)(`nav`,{className:`kind-list`,"aria-label":`Sections`,children:(0,x.jsx)(f,{label:`Status`,total:E.length,cats:F,cat:y,onChange:C})}):null]}),(0,x.jsx)(c,{label:`Kits`,count:_.trim()?`${k.length} of ${D.length}`:p?D.length:``,q:_,onQ:v,matched:k.length,inView:[e],children:p?E.length===0?P?null:(0,x.jsx)(s,{title:`No kits`,children:`This Geneseed ships no kit.`}):(0,x.jsx)(d,{rows:k,activeName:M?.name,hrefOf:e=>`#/kits/${S(e.name)}`}):P?null:(0,x.jsx)(i,{})}),(0,x.jsx)(`article`,{className:`lib-reader`,"aria-label":`Entry`,children:j?(0,x.jsxs)(s,{title:`No such kit`,action:(0,x.jsx)(`a`,{href:`#/kits`,children:`Back to all kits`}),children:[`No kit is named “`,e,`”.`]}):M?(0,x.jsx)(A,{kit:M.def,installs:T,stage:g,listed:N},M.name):null})]})]})}export{j as default};
@@ -1,3 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{A as i,C as a,D as o,E as s,J as c,M as l,N as u,T as d,_ as f,d as p,f as m,g as h,h as g,k as _,m as v,p as y,tt as b,v as x}from"./index-Dwo3Gxek.js";import{t as ee}from"./EmptyState-1sPNleqv.js";import{a as te,t as S}from"./Markdown-OReRRoEV.js";import{t as C}from"./StackBar-Y_gkoC3t.js";var w=e(t(),1);function T({items:e,packs:t,install:n,canApply:r,onAction:i,gateArmed:a}){let c=u(),l=e.filter(e=>e.tier===`doctrine`&&e.active!==!1).map(e=>e.name),d=l.join(`,`),f=o(),p=n?`${n.host}:${n.scope}:${n.path}`:``,m=s(l),{prune:h}=f,g=e.length>0;(0,w.useEffect)(()=>{g&&h(`rules`,(e,t)=>e===p&&t.base!==m)},[g,p,m,h]);let _=f.get(`rules`,p),v=_&&_.base===m?_.value:l,y=e=>f.put(`rules`,p,e(v),m),b=e=>v.includes(e),x=e=>y(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),ee=e=>e.rules.some(e=>b(e.addr)),te=e=>{let t=e.rules.map(e=>e.addr),n=e.rules.every(e=>b(e.addr));y(e=>n?e.filter(e=>!t.includes(e)):[...new Set([...e,...t])])},S=e=>{let t=e.rules.filter(e=>b(e.addr)).length;return t?e.active?`${t} of ${e.rules.length} active`:`staged on · ${t} of ${e.rules.length}`:e.active?`staged off`:`not built in`},C=t.flatMap(e=>e.rules.map(e=>e.addr)),T=C.filter(b),E=T.join(`,`)!==d,D=`process.5`,O=l.includes(D)&&!v.includes(D);return{deployedRules:l,isOn:b,toggleRule:x,packOn:ee,togglePack:te,packState:S,allRules:C,pickedRules:T,dirty:E,losingConsent:O,applyPacks:async()=>{if(!r||!E)return;let e=t.filter(e=>e.rules.some(e=>b(e.addr))).map(e=>e.pack),o=t.filter(t=>e.includes(t.pack)).flatMap(e=>e.rules.filter(e=>!b(e.addr)).map(e=>e.addr)),s=O?`
2
-
3
- process 5 carries commit/push consent. Dropping it also removes the git-gate hook, so commits and pushes stop being confirmed at the tool boundary. `+(a?`(Real data loss stays gated: that is Rule IV’s, not the pack’s.)`:`(Rule IV’s deletion gate is off on this install, so real data loss is not asked about either.)`):``,l=T.length?`${T.length} of ${C.length} doctrine rules`:`no doctrine rules`;await c(`Rebuild ${n.host} · ${n.scope} with ${l}? It rebuilds in place, non-destructive.${s}`,{title:`Rebuild with these rules?`,confirmLabel:`Rebuild`})&&await i(`install`,{...n,doctrines:e,excludeRules:o})&&f.startApply(`rules`,p)},revert:()=>f.drop(`rules`,p)}}var E=n();function D({addr:e,isOpen:t,onToggle:n,className:i,style:a,head:o,label:s,rev:l,toggleCol:u=null,renderBody:d,srcLine:f}){let p=(0,w.useId)(),{data:m,error:h,reload:g}=c(()=>t?r.item(`law`,e):Promise.resolve(null),[t,e,l],`law-item`),v=t&&(0,E.jsxs)(`div`,{className:`law-expand`,id:p,children:[h?(0,E.jsx)(_,{error:h,onRetry:g}):m?d(m):(0,E.jsx)(`p`,{className:`dim`,children:`Loading…`}),(0,E.jsx)(`div`,{className:`law-srcline`,children:f})]}),y={type:`button`,onClick:n,"aria-expanded":t,"aria-controls":p,"aria-label":s};return u?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`div`,{className:i,style:a,"data-addr":e,children:[(0,E.jsx)(`button`,{className:`law-disclosure`,...y,children:o}),(0,E.jsx)(`span`,{className:`toggle-col`,children:u})]}),v]}):(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(`button`,{className:i,style:a,"data-addr":e,...y,children:o}),v]})}function O({law:e,isOpen:t,onToggle:n,rev:r,toggleCol:i=null}){let a=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`span`,{className:`law-no`,children:[(0,E.jsx)(`span`,{className:`x`,"aria-hidden":`true`,children:`›`}),e.no]}),(0,E.jsxs)(`span`,{className:`law-name`,children:[(0,E.jsx)(`span`,{children:e.name}),e.ess?(0,E.jsx)(`span`,{className:`law-princ`,children:e.ess}):null]}),(0,E.jsx)(`span`,{className:`law-latin`,children:e.latin}),(0,E.jsx)(`span`,{className:`law-status ${e.statusTone}`,children:e.status}),(0,E.jsx)(`span`,{className:`law-enf${e.enf===`Hook gate`?` hook`:e.enf===`Gate off`?` gate-off`:``}`,children:e.enf})]});return(0,E.jsx)(D,{addr:e.addr,isOpen:t,onToggle:n,className:`law-row${i?` has-toggle`:``}${t?` on`:``}${e.off?` law-off`:``}`,style:{"--cc":e.c},head:a,label:`${e.no?e.no+` `:``}${e.name}, ${e.status}, ${e.enf}`,rev:r,toggleCol:i,renderBody:t=>(0,E.jsx)(S,{body:t.body||e.ess,links:t.links}),srcLine:`$ geneseed law ${e.addr} · ${e.src}`})}var k=[`invariants`,`doctrines`];function ne({tiers:e,current:t,onPick:n}){return(0,E.jsx)(`div`,{className:`tier-strip`,children:e.map((e,r)=>{let i=(0,E.jsxs)(E.Fragment,{children:[(0,E.jsxs)(`span`,{className:`tier-k mono`,children:[`RANK `,r+1]}),(0,E.jsxs)(`span`,{className:`tier-top`,children:[(0,E.jsx)(`span`,{className:`tier-name`,children:e.name}),(0,E.jsx)(`span`,{className:`tier-n mono`,children:e.n})]}),(0,E.jsx)(`span`,{className:`tier-bar`,"aria-hidden":`true`,children:(0,E.jsx)(`span`,{style:{width:`${Math.round(e.fill*100)}%`}})}),(0,E.jsx)(`span`,{className:`tier-sub`,children:e.sub}),(0,E.jsx)(`span`,{className:`tier-sub tier-rule`,children:e.rule})]}),a=`tier${t===e.key?` on`:``}`;return e.href?(0,E.jsx)(`a`,{className:`tier`,href:e.href,children:i},e.key):n&&k.includes(e.key)?(0,E.jsx)(`button`,{type:`button`,className:a,"aria-pressed":t===e.key,onClick:()=>n(t===e.key?`all`:e.key),children:i},e.key):(0,E.jsx)(`div`,{className:a,children:i},e.key)})})}function re({gates:e,byAddr:t,onJump:n,disarmed:r=()=>!1}){let i=Object.entries(e?.asks||{}).map(([e,t])=>[e,t,r(g(e))]).sort((e,t)=>e[2]-t[2]||t[1]-e[1]),a=Math.max(1,...i.map(([,e])=>e));return(0,E.jsxs)(`section`,{className:`panel`,"aria-labelledby":`gate-asks`,children:[(0,E.jsxs)(`div`,{className:`panel-head`,children:[(0,E.jsx)(`h2`,{id:`gate-asks`,children:`Gate asks`}),(0,E.jsxs)(`span`,{className:`mono dim`,children:[e?.total??0,` in ledger`]})]}),i.length?(0,E.jsx)(`ul`,{className:`gate-list`,children:i.map(([e,r,i])=>{let o=g(e),s=t[o]?.name||o;return(0,E.jsxs)(`li`,{children:[(0,E.jsx)(`button`,{type:`button`,className:`gate-row`,onClick:()=>n(o),children:(0,E.jsxs)(`span`,{className:`gate-top`,children:[(0,E.jsx)(`span`,{className:`gate-name${i?` dim`:``}`,children:s}),(0,E.jsx)(`span`,{className:`mono dim`,children:o}),i&&(0,E.jsx)(`span`,{className:`mono off`,children:`off`}),(0,E.jsx)(`span`,{className:`mono gate-n`,children:r})]})}),(0,E.jsx)(C,{value:r,max:a,label:`${s} asks`,tone:i?`accent`:`warn`})]},e)})}):(0,E.jsx)(`p`,{className:`sub`,children:`No gate has asked yet.`}),(0,E.jsx)(`p`,{className:`panel-note`,children:e?.standing_down?.length?`Standing down: ${e.standing_down.join(`, `)}.`:`None standing down.`})]})}function ie({packs:e,sel:t,canApply:n,install:r,gateArmed:i}){let{isOn:a,packOn:o,togglePack:s,dirty:c,losingConsent:l,revert:u}=t,d=Math.max(1,...e.map(e=>e.rules.length));return(0,E.jsxs)(`section`,{className:`panel`,"aria-labelledby":`doc-packs`,children:[(0,E.jsxs)(`div`,{className:`panel-head`,children:[(0,E.jsx)(`h2`,{id:`doc-packs`,children:`Doctrine packs`}),(0,E.jsxs)(`span`,{className:`mono dim`,children:[e.filter(o).length,`/`,e.length,` on`]})]}),e.length?(0,E.jsx)(`ul`,{className:`pack-list`,children:e.map(e=>{let t=e.rules.filter(e=>a(e.addr)).length;return(0,E.jsxs)(`li`,{className:o(e)?``:`off`,children:[(0,E.jsx)(`span`,{className:`pl-name`,title:e.desc,children:e.title}),(0,E.jsx)(C,{value:t,max:d,label:`${e.title} rules on`}),(0,E.jsx)(`span`,{className:`mono pl-n`,children:t}),n?(0,E.jsx)(`button`,{type:`button`,className:`sw-toggle${o(e)?` on`:``}${t&&t<e.rules.length?` mixed`:``}`,role:`checkbox`,"aria-checked":e.rules.length&&t===e.rules.length?`true`:t?`mixed`:`false`,"aria-label":`${e.title} pack`,onClick:()=>s(e)}):null]},e.pack)})}):(0,E.jsx)(`p`,{className:`sub`,children:`This install predates the three-tier constitution.`}),n&&e.length>0&&(0,E.jsxs)(E.Fragment,{children:[l&&(0,E.jsxs)(`p`,{className:`pack-warn`,role:`status`,"aria-live":`polite`,children:[`Dropping `,(0,E.jsx)(`b`,{children:`process 5`}),` also removes the commit/push consent gate:`,` `,(0,E.jsx)(`code`,{children:`git commit`}),` and `,(0,E.jsx)(`code`,{children:`git push`}),` stop being confirmed at the tool boundary.`,` `,i?`Real data loss stays gated by Rule IV.`:`Rule IV’s deletion gate is off on this install too.`]}),(0,E.jsx)(`div`,{className:`pack-apply`,children:(0,E.jsx)(`button`,{type:`button`,className:`btn ghost`,onClick:u,disabled:!c,children:`Revert`})}),(0,E.jsx)(`p`,{className:`panel-note`,role:`status`,"aria-live":`polite`,children:c?`Not applied yet. Apply rebuilds ${r.host} · ${r.scope} once, with every change together.`:`Matches the deployed install. Changing a pack rebuilds it.`})]})]})}function ae(e){let t=[];for(let n of e){if(n.tier!==`doctrine`)continue;let e=t.find(e=>e.pack===n.pack);e||(e={pack:n.pack,title:n.packTitle||n.pack,desc:n.packDesc||``,active:n.packActive!==!1,rules:[]},t.push(e));let r=h(n.title);e.rules.push({addr:n.name,no:`${n.pack} ${n.name.split(`.`)[1]||``}`,name:r.name,latin:r.latin,ess:n.summary||``,enf:v(n.name),c:x[n.pack]||`var(--text-3)`,src:`doctrines/${n.pack}.md`})}return t}function A({selected:e,overview:t,setup:n,onAction:o,dataRev:s}){let g=u(),{data:S,error:C}=c(()=>r.catalog(`laws`),[s],`catalog:laws`),{data:D}=a(s),[k,A]=(0,w.useState)(`all`),[j,oe]=(0,w.useState)(``),M=e||null,N=e=>b(M===e?`#/laws`:`#/item/law/${encodeURIComponent(e)}`),[se,ce]=(0,w.useState)(0),P=(0,w.useRef)(null);(0,w.useEffect)(()=>{if(!e)return;let t=requestAnimationFrame(()=>{let t=document.querySelector(`[data-addr="${e}"]`);if(!t)return;let n=P.current===e;P.current=null;let r=t.getBoundingClientRect();if(n||r.top<80||r.bottom>window.innerHeight){let e=window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches;t.scrollIntoView?.({block:`center`,behavior:e?`auto`:`smooth`})}n&&(t.classList.remove(`law-flash`),t.offsetWidth,t.classList.add(`law-flash`))});return()=>cancelAnimationFrame(t)},[e,se,S]);let F=S?.items||[],I=ae(F),L=e=>t?.install?.[m[e].key]!==!1,R=L(`IV`),z=t?.install,B=!!(z&&o),V=T({items:F,packs:I,install:z,canApply:B,onAction:o,gateArmed:R}),{deployedRules:H,isOn:U,toggleRule:le,packOn:ue,packState:de,allRules:W}=V;if(C)return(0,E.jsx)(_,{error:C});if(!S)return(0,E.jsx)(i,{});let G={ontology:S.nouns?.ontology||`Ethos`,law:S.nouns?.law||`Dictate`,laws:S.nouns?.laws||`Dictates`,doctrines:S.nouns?.doctrines||`Doctrines`},K=F.filter(e=>e.tier===`ontology`).map(e=>({addr:e.name,no:``,name:e.title,latin:``,ess:``,status:`Always`,statusTone:`ok`,enf:`Instruction`,c:`var(--text-3)`,src:`ontology/universal.md`})),q=F.filter(e=>(e.tier??`invariant`)===`invariant`).map(e=>{let n=e.klass&&f[e.klass]?e.klass:`craft`,r=h(e.title);return{addr:e.name,no:e.name,name:r.name,latin:r.latin,ess:e.summary||``,retired:r.retired,status:r.retired?`Retired`:`Active`,statusTone:r.retired?``:`ok`,enf:r.retired?`None`:v(e.name,t?.install),cat:n,c:f[n].c,off:r.retired,src:`laws/universal.md`}}),fe=e=>{let t=U(e.addr),n=H.includes(e.addr),r=t===n?t?`Active`:`Off`:t?`Staged on`:`Staged off`;return{...e,off:!t,status:r,statusTone:t?`ok`:t===n?``:`warn`}},pe=I.filter(e=>e.active).flatMap(e=>e.rules.filter(e=>!H.includes(e.addr)).map(e=>e.addr)),me=async e=>{if(!B)return;let{key:t,label:n}=m[e],r=n.toLowerCase(),i=!L(e),a=`${z.host} · ${z.scope}`,s=V.dirty?` Your staged doctrine changes are not part of this rebuild; they stay staged.`:``;await g((i?`Re-arm the ${r} on ${a}? ${p[e].arm} It rebuilds in place, non-destructive.`:`Switch the ${r} off on ${a}? ${p[e].off} It rebuilds in place, non-destructive.`)+s,{title:i?`Re-arm the ${r}?`:`Switch the ${r} off?`,confirmLabel:i?`Re-arm`:`Switch off`})&&o(`install`,{...z,[t]:i})},J=j.trim().toLowerCase(),Y=e=>!J||`${e.addr} ${e.name} ${e.latin} ${e.ess}`.toLowerCase().includes(J),he=e=>{let t=ye[e],n=String(e).includes(`.`);(n&&k===`invariants`||!n&&k===`doctrines`)&&A(`all`),t&&!Y(t)&&oe(``),P.current=e,ce(e=>e+1),b(`#/item/law/${encodeURIComponent(e)}`)},X=q.filter(e=>!e.retired).length,Z=H.length,Q=D?.stats,ge={ethos:{name:G.ontology,n:K.length,fill:1,sub:`${K.length} sections`},invariants:{name:G.laws,n:X,fill:q.length?X/q.length:0,sub:q.length>X?`${X} active · ${q.length-X} retired`:`${X} active`},doctrines:{name:G.doctrines,n:Z,fill:W.length?Z/W.length:0,sub:`${Z} rules · ${I.filter(e=>e.active).length} of ${I.length} packs`},yours:{name:`Your rules`,n:Q?.rules??0,fill:Q?Q.rules/Q.max_rules:0,sub:Q?`${Q.rules} of ${Q.max_rules} · ${Q.tokens}/${Q.max_tokens} tok`:`user-rules.md`,href:`#/personal/rules`}},_e=e=>{if(e===`—`)return`Nothing outranks them.`;let t=e.replace(`{{LAW}}`,G.law);return`${t[0].toUpperCase()}${t.slice(1)}.`},ve=y.map(e=>({key:e.key,...ge[e.key],rule:_e(e.against)})),ye=Object.fromEntries([...q,...I.flatMap(e=>e.rules)].map(e=>[e.addr,e])),be=[[`all`,`All`,q.length+W.length],[`invariants`,G.laws,q.length],[`doctrines`,G.doctrines,W.length]],xe=k===`all`||k===`invariants`,Se=k===`all`||k===`doctrines`,Ce=(e,t)=>(0,E.jsxs)(`div`,{className:`band-head`,role:`presentation`,children:[(0,E.jsx)(`h2`,{className:`tier-h`,children:e}),(0,E.jsx)(`span`,{className:`mono dim`,children:t})]}),$=q.filter(Y),we=(xe?$.length:0)+(Se?I.reduce((e,t)=>e+t.rules.filter(Y).length,0):0);return(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(d,{title:`Constitution`,sub:`What the agent follows on every turn. Ranked: a lower rank may tighten a higher one, never repeal it. Open any rule to read its canonical text.`,primary:B&&I.length>0&&V.dirty?(0,E.jsxs)(`button`,{type:`button`,className:`btn`,onClick:V.applyPacks,children:[`Apply (`,V.pickedRules.length,`/`,W.length,` rules)`]}):null}),(0,E.jsx)(ne,{tiers:ve,current:k,onPick:A}),(0,E.jsxs)(`div`,{className:`split`,children:[(0,E.jsxs)(`section`,{className:`panel flush law-wrap${B?` with-toggle`:``}`,"aria-label":`Rules`,children:[K.length>0&&(0,E.jsxs)(E.Fragment,{children:[Ce(G.ontology,`ontology/universal.md`),K.map(e=>(0,E.jsx)(O,{law:e,rev:s,isOpen:M===e.addr,onToggle:()=>N(e.addr)},e.addr))]}),(0,E.jsxs)(`div`,{className:`law-toolbar`,children:[(0,E.jsx)(l,{"aria-label":`Show`,children:be.map(([e,t,n])=>(0,E.jsxs)(`button`,{type:`button`,className:k===e?`on`:``,"aria-pressed":k===e,onClick:()=>A(e),children:[t,` `,(0,E.jsx)(`span`,{className:`mono`,children:n})]},e))}),(0,E.jsx)(te,{className:`law-filter`,value:j,onChange:oe,placeholder:`Filter rules`,label:`Filter rules`})]}),(0,E.jsxs)(`div`,{className:`law-rowhead`,children:[(0,E.jsx)(`span`,{children:`No.`}),(0,E.jsx)(`span`,{children:`Rule`}),(0,E.jsx)(`span`,{children:`Latin name`}),(0,E.jsx)(`span`,{children:`Status`}),(0,E.jsx)(`span`,{children:`Enforced by`})]}),xe&&$.length>0&&(0,E.jsxs)(E.Fragment,{children:[Ce(G.laws,`laws/universal.md`),$.map(e=>(0,E.jsx)(O,{law:e,rev:s,isOpen:M===e.addr,onToggle:()=>N(e.addr),toggleCol:!B||e.retired?null:m[e.addr]?(0,E.jsx)(`button`,{type:`button`,className:`sw-toggle${L(e.addr)?` on`:``}`,role:`switch`,"aria-checked":L(e.addr),"aria-label":m[e.addr].label,onClick:()=>me(e.addr)}):(0,E.jsx)(`span`,{className:`no-gate`,title:`Enforced by its text alone: no hook gate`,children:`no gate`})},e.addr))]}),Se&&I.map(e=>{let t=e.rules.filter(Y);return t.length?(0,E.jsxs)(`div`,{className:`pack-wrap${ue(e)?``:` pack-off`}`,children:[(0,E.jsxs)(`div`,{className:`band-head pack-head`,children:[(0,E.jsx)(`h2`,{className:`tier-h`,style:{"--cc":x[e.pack]},children:e.title}),(0,E.jsx)(`span`,{className:`pack-desc dim`,children:e.desc}),(0,E.jsx)(`span`,{className:`pack-state mono`,children:de(e)})]}),!e.active&&!B&&(0,E.jsxs)(`div`,{className:`pack-enable`,children:[`$ geneseed-build --doctrines`,` `,I.filter(t=>t.active||t.pack===e.pack).map(e=>e.pack).join(`,`),pe.length>0&&` --exclude-rules ${pe.join(`,`)}`]}),t.map(e=>(0,E.jsx)(O,{law:fe(e),rev:s,isOpen:M===e.addr,onToggle:()=>N(e.addr),toggleCol:B?(0,E.jsx)(`button`,{type:`button`,className:`sw-toggle${U(e.addr)?` on`:``}`,role:`switch`,"aria-checked":U(e.addr),"aria-label":`${e.name} rule`,onClick:()=>le(e.addr)}):null},e.addr))]},e.pack):null}),we===0&&(0,E.jsx)(ee,{title:J?`No matching rules`:`Nothing in this tier`,children:J?(0,E.jsxs)(E.Fragment,{children:[`Nothing matches “`,j.trim(),`”.`]}):(0,E.jsx)(E.Fragment,{children:`This install predates the tier.`})})]}),(0,E.jsxs)(`aside`,{className:`aside-stack`,children:[(0,E.jsx)(ie,{packs:I,sel:V,canApply:B,install:z,gateArmed:R}),(0,E.jsx)(re,{gates:n?.gates,byAddr:ye,onJump:he,disarmed:e=>!!m[e]&&!L(e)})]})]})]})}export{A as default};
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{n as i,t as a}from"./sections-ChwaobfW.js";import{J as o,M as s,N as ee,S as te,V as c,b as l,k as ne,ot as u,tt as re,y as d}from"./index-Dwo3Gxek.js";import{t as f}from"./EmptyState-1sPNleqv.js";import{a as ie,i as ae,o as oe,r as se,s as ce,t as le}from"./RailCats-DNlJKicm.js";import{t as ue}from"./Markdown-OReRRoEV.js";var p=e(t(),1),m=n();function de({load:e}){let t=String(e||`lazy`).toLowerCase();return(0,m.jsx)(`span`,{className:`mf-load mf-load-${t===`eager`?`ok`:t===`exclude`?`warn`:`muted`}`,children:t})}function h({entries:e}){return e.length?(0,m.jsxs)(`table`,{className:`mf-entries`,children:[(0,m.jsx)(`thead`,{className:`sr-only`,children:(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`th`,{scope:`col`,children:`Path`}),(0,m.jsx)(`th`,{scope:`col`,children:`Load`}),(0,m.jsx)(`th`,{scope:`col`,children:`Description`})]})}),(0,m.jsx)(`tbody`,{children:e.map((e,t)=>{let n=String(e.load).toLowerCase()===`exclude`;return(0,m.jsxs)(`tr`,{children:[(0,m.jsx)(`td`,{className:`mf-path mono ${n?`mf-struck`:``}`,children:e.path||`·`}),(0,m.jsx)(`td`,{className:`mf-load-cell`,children:(0,m.jsx)(de,{load:e.load})}),(0,m.jsx)(`td`,{className:`mf-edesc`,children:e.description||``})]},`${e.path||t}-${t}`)})})]}):null}function g({wiki:e}){let t=Array.isArray(e.entries)?e.entries:[],n=Array.isArray(e.protected)?e.protected:[];return(0,m.jsxs)(`div`,{className:`mf-vault`,children:[(0,m.jsxs)(`div`,{className:`mf-vault-head`,children:[(0,m.jsx)(`div`,{className:`mf-vault-name`,children:e.name||`wiki`}),e.path?(0,m.jsx)(`code`,{className:`mf-vault-path mono`,children:e.path}):null]}),e.description?(0,m.jsx)(`p`,{className:`mf-vault-desc`,children:e.description}):null,(0,m.jsxs)(`div`,{className:`mf-roles`,children:[e.conventions?(0,m.jsxs)(`span`,{className:`mf-role`,children:[(0,m.jsx)(c,{name:`skill`,className:`glyph`}),` conventions: `,e.conventions]}):null,e.inbox?(0,m.jsxs)(`span`,{className:`mf-role`,children:[(0,m.jsx)(c,{name:`notebook`,className:`glyph`}),` inbox: `,e.inbox]}):null,n.map(e=>(0,m.jsxs)(`span`,{className:`mf-role mf-role-danger`,children:[(0,m.jsx)(c,{name:`law`,className:`glyph`}),` protected: `,e]},e))]}),(0,m.jsx)(h,{entries:t})]})}function _({body:e}){let[t,n]=(0,p.useState)(!1),r=(0,p.useId)();return e?(0,m.jsxs)(`div`,{className:`mf-raw`,children:[(0,m.jsxs)(`button`,{type:`button`,className:`mf-raw-toggle`,"aria-expanded":t,"aria-controls":r,onClick:()=>n(e=>!e),children:[(0,m.jsx)(c,{name:`chevron`,className:`glyph mf-caret ${t?`on`:``}`}),`Raw source`]}),t?(0,m.jsx)(`pre`,{id:r,className:`mf-raw-pre`,children:e.replace(/^```json\n|\n```$/g,``)}):null]}):null}function fe({manifest:e,body:t,name:n}){if(!e)return(0,m.jsx)(`pre`,{className:`mf-raw-pre`,children:(t||``).replace(/^```json\n|\n```$/g,``)});if(e.kind===`wiki`){let n=e.wikis||[];return n.length?(0,m.jsxs)(`div`,{className:`mf-doc`,children:[n.map((e,t)=>(0,m.jsx)(g,{wiki:e},e.name||t)),(0,m.jsx)(_,{body:t})]}):(0,m.jsxs)(`div`,{className:`mf-empty`,children:[(0,m.jsx)(`div`,{className:`mf-empty-title`,children:`No wiki declared yet`}),(0,m.jsxs)(`p`,{children:[`A wiki is your machine-wide knowledge base — an Obsidian vault or any folder of linked markdown the agent reads from and writes back to. Declare one in`,` `,(0,m.jsx)(`code`,{className:`mono`,children:`geneseed-wiki.jsonc`}),` to switch it on.`]}),(0,m.jsx)(`a`,{className:`btn ghost sm`,href:`#/docs/wiki`,children:`How to configure a wiki`}),(0,m.jsx)(_,{body:t})]})}let r=e.context||[];return r.length?(0,m.jsxs)(`div`,{className:`mf-doc`,children:[(0,m.jsx)(h,{entries:r}),(0,m.jsx)(_,{body:t})]}):(0,m.jsxs)(`div`,{className:`mf-empty`,children:[(0,m.jsx)(`div`,{className:`mf-empty-title`,children:`No project context declared`}),(0,m.jsxs)(`p`,{children:[`Point the agent at the docs for this project by adding entries to`,` `,(0,m.jsx)(`code`,{className:`mono`,children:n||`context.json`}),` — each with a`,` `,(0,m.jsx)(`code`,{className:`mono`,children:`path`}),`, a `,(0,m.jsx)(`code`,{className:`mono`,children:`load`}),` mode (eager or lazy), and a description.`]}),(0,m.jsx)(_,{body:t})]})}var v={fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},y={advocate:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M16 50h14M23 50V14`}),(0,m.jsx)(`path`,{className:`ag-wave ag-f`,d:`M23 15h20l-5 7.5 5 7.5H23z`}),(0,m.jsx)(`path`,{className:`ag-call`,d:`M47 38a6 6 0 0 1 0 8M51 35a11 11 0 0 1 0 14`})]}),architect:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`rect`,{x:`14`,y:`14`,width:`36`,height:`32`,rx:`2`,opacity:`.3`}),(0,m.jsx)(`path`,{className:`ag-draw`,pathLength:`100`,d:`M20 40V22h12v9h12v9z`}),(0,m.jsx)(`path`,{className:`ag-draw ag-late`,pathLength:`100`,d:`M32 31v9`}),(0,m.jsx)(`path`,{d:`M14 52h36M14 50v4M50 50v4`,opacity:`.5`})]}),developer:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`rect`,{className:`ag-f`,x:`10`,y:`14`,width:`44`,height:`36`,rx:`4`}),(0,m.jsx)(`path`,{d:`M10 22h44`,opacity:`.5`}),(0,m.jsx)(`circle`,{cx:`15`,cy:`18`,r:`1`}),(0,m.jsx)(`circle`,{cx:`19`,cy:`18`,r:`1`}),(0,m.jsx)(`path`,{className:`ag-nudge-l`,d:`M24 30l-6 6 6 6`}),(0,m.jsx)(`path`,{className:`ag-nudge-r`,d:`M40 30l6 6-6 6`}),(0,m.jsx)(`path`,{className:`ag-blink`,d:`M30 42h5`})]}),"devops-engineer":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M32 32c-5-9-18-9-18 0s13 9 18 0c5-9 18-9 18 0s-13 9-18 0z`,opacity:`.3`}),(0,m.jsx)(`path`,{className:`ag-draw`,pathLength:`100`,d:`M32 32c-5-9-18-9-18 0s13 9 18 0c5-9 18-9 18 0s-13 9-18 0z`}),(0,m.jsx)(`circle`,{className:`ag-pulse ag-f`,cx:`32`,cy:`32`,r:`3`})]}),"docker-expert":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`rect`,{className:`ag-rise ag-f`,x:`14`,y:`36`,width:`10`,height:`9`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-late ag-f`,x:`27`,y:`36`,width:`10`,height:`9`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-later ag-f`,x:`40`,y:`36`,width:`10`,height:`9`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-late ag-f`,x:`20`,y:`25`,width:`10`,height:`9`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-later ag-f`,x:`34`,y:`25`,width:`10`,height:`9`}),(0,m.jsx)(`path`,{d:`M8 52c5 0 5-3 10-3s5 3 10 3 5-3 10-3 5 3 10 3 5-3 10-3`,opacity:`.5`})]}),docs:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{className:`ag-f`,d:`M16 10h22l8 8v36H16z`}),(0,m.jsx)(`path`,{d:`M38 10v8h8`,opacity:`.5`}),(0,m.jsx)(`path`,{className:`ag-draw`,pathLength:`100`,d:`M21 26h18`}),(0,m.jsx)(`path`,{className:`ag-draw ag-late`,pathLength:`100`,d:`M21 33h18`}),(0,m.jsx)(`path`,{className:`ag-draw ag-later`,pathLength:`100`,d:`M21 40h11`}),(0,m.jsx)(`g`,{className:`ag-write`,children:(0,m.jsx)(`path`,{d:`M40 44l12-20 3 2-12 20-4 1z`})})]}),empiricist:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M12 12v40h40`,opacity:`.5`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-f`,x:`18`,y:`36`,width:`6`,height:`14`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-late ag-f`,x:`29`,y:`28`,width:`6`,height:`22`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-later ag-f`,x:`40`,y:`20`,width:`6`,height:`30`}),(0,m.jsx)(`path`,{className:`ag-draw`,pathLength:`100`,d:`M16 34l12-8 10 3 12-14`})]}),explorer:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{cx:`32`,cy:`32`,r:`18`,opacity:`.5`}),(0,m.jsx)(`path`,{d:`M32 10v4M32 50v4M10 32h4M50 32h4`}),(0,m.jsxs)(`g`,{className:`ag-search`,children:[(0,m.jsx)(`path`,{className:`ag-f`,d:`M32 18l5 14h-10z`}),(0,m.jsx)(`path`,{d:`M32 18l5 14-5 14-5-14z`})]}),(0,m.jsx)(`circle`,{cx:`32`,cy:`32`,r:`2`})]}),framer:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`g`,{className:`ag-frame`,children:(0,m.jsx)(`path`,{d:`M12 22V12h10M42 12h10v10M52 42v10H42M22 52H12V42`})}),(0,m.jsx)(`circle`,{className:`ag-pulse`,cx:`32`,cy:`32`,r:`7`,opacity:`.6`}),(0,m.jsx)(`path`,{d:`M32 22v6M32 36v6M22 32h6M36 32h6`,opacity:`.6`}),(0,m.jsx)(`circle`,{cx:`32`,cy:`32`,r:`1.5`})]}),historian:(0,m.jsxs)(`g`,{className:`ag-turn`,children:[(0,m.jsx)(`path`,{d:`M20 12h24M20 52h24`}),(0,m.jsx)(`path`,{d:`M22 12c0 12 20 12 20 20s-20 8-20 20M42 12c0 12-20 12-20 20s20 8 20 20`}),(0,m.jsx)(`path`,{className:`ag-drain ag-f`,d:`M25 17h14c-1 6-5 9-7 11-2-2-6-5-7-11z`}),(0,m.jsx)(`path`,{className:`ag-fill ag-f`,d:`M24 49h16c-1-5-5-8-8-9-3 1-7 4-8 9z`})]}),operator:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M12 42a20 20 0 0 1 40 0`,opacity:`.4`}),(0,m.jsx)(`path`,{className:`ag-f`,d:`M40 24a20 20 0 0 1 12 18`,strokeWidth:`4`,opacity:`.7`}),(0,m.jsx)(`path`,{d:`M16 30l3 2M32 22v4M48 30l-3 2`,opacity:`.6`}),(0,m.jsx)(`g`,{className:`ag-gauge`,children:(0,m.jsx)(`path`,{d:`M32 42l10-13`})}),(0,m.jsx)(`circle`,{cx:`32`,cy:`42`,r:`3`}),(0,m.jsx)(`path`,{d:`M22 50h20`,opacity:`.5`})]}),pragmatist:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M32 14v36M22 50h20`}),(0,m.jsx)(`circle`,{cx:`32`,cy:`14`,r:`2`}),(0,m.jsxs)(`g`,{className:`ag-tilt`,children:[(0,m.jsx)(`path`,{d:`M14 18h36`}),(0,m.jsx)(`path`,{className:`ag-f`,d:`M14 18l-5 12h10zM50 18l-5 12h10z`})]})]}),"kubernetes-specialist":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{cx:`32`,cy:`32`,r:`16`}),(0,m.jsx)(`path`,{d:`M32 8v13M32 43v13M8 32h13M43 32h13M15 15l9 9M40 40l9 9M49 15l-9 9M24 40l-9 9`,opacity:`.6`}),(0,m.jsx)(`circle`,{className:`ag-pulse ag-f`,cx:`32`,cy:`32`,r:`5`})]}),"memory-curator":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`rect`,{className:`ag-rise ag-f`,x:`17`,y:`16`,width:`14`,height:`20`,rx:`1`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-late ag-f`,x:`25`,y:`12`,width:`14`,height:`24`,rx:`1`}),(0,m.jsx)(`rect`,{className:`ag-rise ag-later ag-f`,x:`33`,y:`18`,width:`14`,height:`18`,rx:`1`}),(0,m.jsx)(`path`,{d:`M12 32h40v16a2 2 0 0 1-2 2H14a2 2 0 0 1-2-2z`}),(0,m.jsx)(`path`,{d:`M26 40h12`,opacity:`.6`})]}),researcher:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{className:`ag-f`,cx:`30`,cy:`34`,r:`16`}),(0,m.jsx)(`path`,{d:`M14 34h32M30 18c-6 5-6 27 0 32`,opacity:`.5`}),(0,m.jsx)(`ellipse`,{className:`ag-spin`,cx:`30`,cy:`34`,rx:`7`,ry:`16`}),(0,m.jsx)(`g`,{className:`ag-orbit`,children:(0,m.jsx)(`circle`,{cx:`50`,cy:`14`,r:`3`})})]}),reviewer:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M12 18h30M12 26h40M12 34h24M12 42h34`,opacity:`.4`}),(0,m.jsx)(`path`,{className:`ag-mark`,d:`M42 30l3 3 6-6`}),(0,m.jsxs)(`g`,{className:`ag-sweep`,children:[(0,m.jsx)(`circle`,{className:`ag-f`,cx:`22`,cy:`30`,r:`9`}),(0,m.jsx)(`path`,{d:`M29 37l8 8`,strokeWidth:`3`})]})]}),performance:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M26 10h8M30 10v6M44 18l3-3`}),(0,m.jsx)(`circle`,{className:`ag-f`,cx:`30`,cy:`34`,r:`18`}),(0,m.jsx)(`path`,{d:`M30 19v3M45 34h-3M30 49v-3M15 34h3`,opacity:`.6`}),(0,m.jsx)(`g`,{className:`ag-orbit`,children:(0,m.jsx)(`path`,{d:`M30 34V22`})}),(0,m.jsx)(`circle`,{cx:`30`,cy:`34`,r:`2`})]}),security:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{className:`ag-ripple`,d:`M32 8l18 6v13c0 12-8 21-18 26-10-5-18-14-18-26V14z`}),(0,m.jsx)(`path`,{className:`ag-f`,d:`M32 8l18 6v13c0 12-8 21-18 26-10-5-18-14-18-26V14z`}),(0,m.jsx)(`path`,{className:`ag-draw`,pathLength:`100`,d:`M24 31l6 6 11-11`})]}),skeptic:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{className:`ag-f`,d:`M12 14h40v28H30l-10 8v-8h-8z`}),(0,m.jsxs)(`g`,{className:`ag-lean`,children:[(0,m.jsx)(`path`,{d:`M27 23a5 5 0 1 1 7 4.5c-1.5.8-2 2-2 3.5v1`}),(0,m.jsx)(`circle`,{cx:`32`,cy:`36`,r:`1.2`})]})]}),"spring-boot-engineer":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M22 20a16 16 0 1 0 20 0`}),(0,m.jsx)(`path`,{className:`ag-pulse`,d:`M32 12v18`}),(0,m.jsx)(`path`,{className:`ag-sway ag-f`,d:`M32 50c0-8 5-12 13-12 0 8-5 12-13 12z`})]}),"spring-reviewer":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M12 18h26M12 26h18M12 34h22M12 42h14`,opacity:`.4`}),(0,m.jsx)(`path`,{className:`ag-sway ag-f`,d:`M42 28c0-8 4-12 11-12 0 8-4 12-11 12z`}),(0,m.jsxs)(`g`,{className:`ag-sweep`,children:[(0,m.jsx)(`circle`,{className:`ag-f`,cx:`24`,cy:`32`,r:`9`}),(0,m.jsx)(`path`,{d:`M31 39l8 8`,strokeWidth:`3`})]})]}),"spring-security":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{className:`ag-ripple`,d:`M22 28v-6a10 10 0 0 1 20 0v6`}),(0,m.jsx)(`path`,{d:`M22 28v-6a10 10 0 0 1 20 0v6`}),(0,m.jsx)(`rect`,{className:`ag-f`,x:`16`,y:`28`,width:`32`,height:`24`,rx:`4`}),(0,m.jsx)(`circle`,{cx:`32`,cy:`38`,r:`3`}),(0,m.jsx)(`path`,{className:`ag-draw`,pathLength:`100`,d:`M32 41v6`})]}),"react-engineer":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`g`,{className:`ag-spin`,children:[(0,m.jsx)(`ellipse`,{cx:`32`,cy:`32`,rx:`20`,ry:`8`}),(0,m.jsx)(`ellipse`,{cx:`32`,cy:`32`,rx:`20`,ry:`8`,transform:`rotate(60 32 32)`}),(0,m.jsx)(`ellipse`,{cx:`32`,cy:`32`,rx:`20`,ry:`8`,transform:`rotate(120 32 32)`})]}),(0,m.jsx)(`circle`,{className:`ag-pulse ag-f`,cx:`32`,cy:`32`,r:`4`})]}),"react-reviewer":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`g`,{opacity:`.4`,children:[(0,m.jsx)(`ellipse`,{cx:`30`,cy:`30`,rx:`18`,ry:`7`}),(0,m.jsx)(`ellipse`,{cx:`30`,cy:`30`,rx:`18`,ry:`7`,transform:`rotate(60 30 30)`}),(0,m.jsx)(`ellipse`,{cx:`30`,cy:`30`,rx:`18`,ry:`7`,transform:`rotate(120 30 30)`})]}),(0,m.jsxs)(`g`,{className:`ag-sweep`,children:[(0,m.jsx)(`circle`,{className:`ag-f`,cx:`30`,cy:`30`,r:`8`}),(0,m.jsx)(`path`,{d:`M36 36l9 9`,strokeWidth:`3`})]})]}),steward:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M12 52h40`,opacity:`.5`}),(0,m.jsx)(`path`,{d:`M22 52c2-3 6-4 10-4s8 1 10 4`,opacity:`.4`}),(0,m.jsxs)(`g`,{className:`ag-grow`,children:[(0,m.jsx)(`path`,{d:`M32 50V26`}),(0,m.jsx)(`path`,{className:`ag-sway ag-f`,d:`M32 32c0-9 6-14 15-14 0 9-6 14-15 14z`}),(0,m.jsx)(`path`,{className:`ag-sway ag-late ag-f`,d:`M32 38c0-7-5-11-12-11 0 7 5 11 12 11z`})]})]}),tester:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{d:`M26 10h12M28 10v14L15 48a3 3 0 0 0 2.6 4.5h28.8A3 3 0 0 0 49 48L36 24V10`}),(0,m.jsx)(`path`,{className:`ag-f ag-slosh`,d:`M20 40h24l4.5 8.5H15.5z`}),(0,m.jsx)(`circle`,{className:`ag-bubble`,cx:`28`,cy:`44`,r:`2`}),(0,m.jsx)(`circle`,{className:`ag-bubble ag-late`,cx:`35`,cy:`46`,r:`1.5`}),(0,m.jsx)(`circle`,{className:`ag-bubble ag-later`,cx:`31`,cy:`42`,r:`1`})]}),"user-advocate":(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`circle`,{cx:`24`,cy:`20`,r:`6`}),(0,m.jsx)(`path`,{d:`M12 50c0-9 5-15 12-15 4 0 7 1.5 9 4`}),(0,m.jsx)(`path`,{className:`ag-beat ag-f`,d:`M44 52s-10-6-10-12.5a5 5 0 0 1 10-1.5 5 5 0 0 1 10 1.5C54 46 44 52 44 52z`}),(0,m.jsx)(`path`,{className:`ag-twinkle`,d:`M48 22v4M46 24h4`})]}),visionary:(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`g`,{className:`ag-rays`,opacity:`.5`,children:(0,m.jsx)(`path`,{d:`M32 6v6M32 52v6M6 32h6M52 32h6M13.6 13.6l4.2 4.2M46.2 46.2l4.2 4.2M13.6 50.4l4.2-4.2M46.2 17.8l4.2-4.2`})}),(0,m.jsx)(`path`,{className:`ag-f ag-pulse`,d:`M32 16l4.7 10.4 11.3 1.2-8.5 7.6 2.4 11.1L32 40.6l-9.9 5.7 2.4-11.1-8.5-7.6 11.3-1.2z`}),(0,m.jsx)(`path`,{className:`ag-twinkle`,d:`M50 8v6M47 11h6`})]})},b=(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(`path`,{className:`ag-f`,d:`M32 12l17 10v20L32 52 15 42V22z`}),(0,m.jsx)(`circle`,{className:`ag-pulse`,cx:`32`,cy:`32`,r:`6`})]});function pe({name:e,size:t=64}){return(0,m.jsxs)(`svg`,{className:`agent-glyph`,viewBox:`0 0 64 64`,width:t,height:t,"aria-hidden":`true`,...v,children:[(0,m.jsx)(`circle`,{className:`ag-disc`,cx:`32`,cy:`32`,r:`31`}),(0,m.jsx)(`circle`,{className:`ag-ring`,cx:`32`,cy:`32`,r:`31`,strokeWidth:`1`,strokeDasharray:`2 7`}),y[e]||b]})}function x({label:e,value:t,delta:n,children:r}){let i=u(Number.isInteger(t)?t:null);return(0,m.jsxs)(`div`,{className:`stat`,children:[(0,m.jsx)(`div`,{className:`stat-label`,children:e}),(0,m.jsx)(`div`,{className:`stat-value mono`,children:i===null?t:Math.round(i)}),n==null?null:(0,m.jsx)(`div`,{className:`stat-delta`,children:n}),r]})}var me={skills:`skill`,agents:`agent`},S=(e,t)=>`${t?e/t*100:0}%`,C=e=>e.split(`:`).slice(0,2).join(` `);function w(e,t){return e===`memory`?`memory/${t}`:e===`notebook`?`notebook/${t}`:e===`wiki`?`geneseed-wiki.jsonc`:e===`config`?t:`${e}/${t}.md`}function he({section:e,source:t}){return(0,m.jsxs)(`div`,{className:`lib-doc-empty`,children:[(0,m.jsx)(c,{name:i[e].icon,className:`glyph`}),(0,m.jsxs)(`span`,{children:[`This entry is part of the `,i[e].label.toLowerCase(),` convention; see`,` `,(0,m.jsx)(`code`,{className:`mono`,children:t}),`. It has no standalone per-entry document.`]})]})}var T=e=>e.replace(/\s+/g,` `).trim(),E=e=>e.replace(/^(?:[ \t]*\n)+/,``);function D(e,t){let n=e.replace(/\r\n/g,`
2
- `),r=/^(?:[ \t]*\n)*[ ]{0,3}#[ \t]+(.*?)(?:[ \t]+#+)?[ \t]*(?:\n|$)/.exec(n);if(!r)return{title:null,body:e};let i=E(n.slice(r[0].length)),a=/^(?:>[^\n]*(?:\n|$))+/.exec(i),o=a?T(a[0].replace(/^>[ \t]?/gm,``)):``,s=t?T(t):``;return o&&(s===o||s.startsWith(o+` `))&&(i=E(i.slice(a[0].length))),{title:r[1].trim(),body:i}}function ge({u:e,usage:t,noCall:n}){if(!e||e.n===0&&!e.last)return(0,m.jsx)(`div`,{className:`lib-stats`,children:(0,m.jsx)(x,{label:`Used`,value:0,delta:n})});let r=[...new Set(e.installs.map(C))].join(`, `),i=t.days_counted>=30?`in the last 30 days`:`since ${t.since}`,a=Math.max(1,...e.per_day);return(0,m.jsxs)(`div`,{className:`lib-stats`,children:[(0,m.jsx)(x,{label:`Used`,value:e.n,delta:r?`${i} · on ${r}`:i,children:(0,m.jsx)(`div`,{className:`cols30`,"aria-hidden":`true`,children:e.per_day.map((e,t)=>(0,m.jsx)(`i`,{className:t===29?`today`:``,style:{height:S(e,a)}},t))})}),e.last?(0,m.jsx)(x,{label:`Last used`,value:e.last}):null]})}var O=(e,t)=>t||(e&&a.includes(e)?e:a[0]),k=encodeURIComponent;function A(e){let t=e=>d[e.klass]?e.klass:`personal`,n=l.flatMap(n=>e.filter(e=>t(e)===n).map(e=>({...e,cat:n,group:d[n].label,groupC:d[n].c})));return{rows:n,cats:l.map(e=>({key:e,label:d[e].label,c:d[e].c,n:n.filter(t=>t.cat===e).length})).filter(e=>e.n>0)}}function j({overview:e,section:t,selected:n,dataRev:c,lock:l,base:u,onRulesChanged:de}){let h=ee(),[g,_]=(0,p.useState)(()=>O(t,l)),[v,y]=(0,p.useState)(``),[b,x]=(0,p.useState)(`all`),[C,T]=(0,p.useState)(`all`),[E,j]=(0,p.useState)(``),[_e,ve]=(0,p.useState)(t);if(t!==_e){ve(t);let e=O(t,l);e!==g&&(_(e),y(``),x(`all`),T(`all`))}let{data:M,error:ye,reload:N}=o(()=>r.catalog(g),[g,c],`catalog`),be=l?null:me[g]||null,P=be!==null,{data:F}=o(()=>P?Promise.resolve().then(()=>r.usage()).catch(()=>null):Promise.resolve(null),[P,c],`usage`,{revalidate:!0}),I=P&&!!F?.enabled&&Array.isArray(F.names),xe=(0,p.useMemo)(()=>new Map((Array.isArray(F?.names)?F.names:[]).map(e=>[`${e.kind}\u0000${e.name}`,e])),[F]),L=e=>I&&xe.get(`${be}\u0000${e}`)||null,Se=e=>{let t=L(e.name);return!t||t.n===0&&!t.last},Ce=F?.since?`No call since ${F.since}`:`No call recorded yet`,R=M?.section===g&&M?.items||[],z=g===`skills`,B=z?A(R):null,V=n||(z?B.rows[0]:R[0])?.name||null,H=V?R.find(e=>e.name===V):null,we=H?.type||i[g].type,{data:Te,error:U}=o(()=>V?r.item(we,V):Promise.resolve(null),[g,V,we,c]),W=U?null:Te,Ee=E||ye||U,De=V?{name:V,title:W?.title||V,desc:W?.desc||``}:null,G=H||De,Oe=e?.counts||{},K=z?B.rows.filter(e=>b===`all`||e.cat===b):R,ke=I?K.filter(Se).length:0,q=I?C:`all`,J=q===`all`?K:K.filter(e=>Se(e)===(q===`unused`)),Ae=I?Math.max(0,...R.map(e=>L(e.name)?.n||0)):0,Y=z?1/0:50,X=v.trim().toLowerCase(),Z=X?oe(J,X):J.slice(0,Y),je=!X&&b===`all`&&q===`all`&&V&&!Z.some(e=>e.name===V)?[...Z,...R.filter(e=>e.name===V)]:Z,Me=e=>u?`${u}/${k(e.name)}`:`#/item/${e.type||i[g].type}/${k(e.name)}`,Ne=async()=>{let e=G?.name;if(e&&await h(`Forget the memory fact "${e}"? It leaves the index and moves to memory/archive/ (geneseed memory rm --archived --purge deletes it for good).`,{title:`Forget this fact?`,confirmLabel:`Forget`,tone:`danger`})){j(``);try{await r.memoryDelete(e)}catch(t){j(`Could not forget "${e}": ${t.message}`);return}re(u||`#/section/memory`),N()}},Pe=async()=>{let e=G?.name;if(e&&await h(`Promote "${e}" into a standing rule? It is appended to user-rules.md as a trial rule (a month of probation), and the memory fact moves to memory/archive/ so the lesson isn't loaded twice.`,{title:`Promote to a rule?`,confirmLabel:`Promote`})){j(``);try{let t=await r.rules();await r.rulesPromote({name:e,fingerprint:t.fingerprint,delete_memory:!0}),te(),de?.(),re(`#/personal/rules`)}catch(e){j(`Could not promote: ${e.message}`),N()}}},Q=W?.body?D(W.body,W.desc||G?.desc):null,Fe=W?.title||G?.title||G?.name,Ie=Fe===G?.name&&Q?.title?Q.title:Fe,Le=M?.section===g&&R.length===0,Re=W?.status||G?.status,ze=g===`skills`?d[H?.klass]:null,$=i[g].label;return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(ne,{error:Ee,style:{margin:`0 0 var(--sp-3)`}}),(0,m.jsxs)(`div`,{className:`library${l?` locked`:``}`,children:[l?null:(0,m.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Library kinds`,children:[(0,m.jsxs)(`div`,{className:`lib-title`,children:[(0,m.jsx)(`h1`,{className:`h`,children:`Library`}),(0,m.jsx)(`span`,{className:`dim`,children:`What the agent knows`})]}),(0,m.jsx)(`nav`,{className:`kind-list`,"aria-label":`Kinds`,children:a.map(e=>(0,m.jsxs)(p.Fragment,{children:[(0,m.jsxs)(`a`,{href:`#/section/${e}`,className:g===e?`on`:``,"aria-current":g===e?`page`:void 0,children:[i[e].label,(0,m.jsx)(`span`,{className:`mono dim`,children:Oe[e]??``})]}),e===g&&z&&(0,m.jsx)(le,{label:`Skill types`,total:R.length,cats:B.cats,cat:b,onChange:x})]},e))})]}),(0,m.jsxs)(ie,{label:$,count:X?`${Z.length} of ${J.length}`:J.length,q:v,onQ:y,matched:Z.length,inView:[g,n],extra:I?(0,m.jsx)(s,{"aria-label":`Show`,children:[[`all`,`All`,K.length,void 0],[`used`,`Used`,K.length-ke,void 0],[`unused`,`Not used yet`,ke,Ce]].map(([e,t,n,r])=>(0,m.jsxs)(`button`,{type:`button`,className:C===e?`on`:``,"aria-pressed":C===e,title:r,onClick:()=>T(e),children:[t,` `,(0,m.jsx)(`span`,{className:`mono`,children:n})]},e))}):null,children:[(0,m.jsx)(se,{rows:je,activeName:G?.name,hrefOf:Me,pills:I?e=>{let t=L(e.name)?.n||0;return(0,m.jsxs)(`span`,{className:`lr-use`,children:[(0,m.jsx)(`span`,{className:`ub-trk`,"aria-hidden":`true`,children:(0,m.jsx)(`i`,{style:{width:S(t,Ae)}})}),(0,m.jsxs)(`span`,{className:`mono`,children:[t,(0,m.jsx)(`span`,{className:`sr-only`,children:t===1?` call`:` calls`})]})]})}:void 0}),!X&&R.length>Y&&(0,m.jsxs)(`div`,{className:`lib-more`,children:[`Showing `,Y,` of `,R.length,`; type to search the rest.`]}),Le&&(g===`wiki`?(0,m.jsxs)(f,{title:`No wiki entries`,action:(0,m.jsx)(`a`,{href:`#/section/config`,children:`Open the setup files`}),docs:{href:`#/docs/wiki`,label:`How to configure a wiki →`},children:[`Declare a wiki in `,(0,m.jsx)(`code`,{className:`mono`,children:`geneseed-wiki.jsonc`}),` and its entries appear here.`]}):(0,m.jsx)(f,{title:`Nothing here yet`,children:`Once the harness produces entries they appear here.`}))]}),(0,m.jsx)(`article`,{className:`lib-reader`,"aria-label":`Entry`,children:G?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsxs)(`div`,{className:`reader-tags`,children:[(0,m.jsx)(`span`,{className:`tag acc`,children:$.replace(/s$/,``)}),ze?(0,m.jsx)(`span`,{className:`tag`,children:ze.label}):null,W?.kit??G.kit?(0,m.jsx)(ae,{name:W?.kit??G.kit}):null,(0,m.jsx)(ce,{status:Re})]}),(0,m.jsxs)(`div`,{className:`reader-head`,children:[(0,m.jsx)(`h2`,{className:`reader-title`,children:Ie}),g===`agents`?(0,m.jsx)(pe,{name:G.name}):null]}),(W?.desc||G.desc)&&(0,m.jsx)(`p`,{className:`reader-lede`,children:W?.desc||G.desc}),(0,m.jsx)(`p`,{className:`mono dim reader-src`,children:W?.source||G.source||(U?null:w(g,G.name))}),I?(0,m.jsx)(ge,{u:L(G.name),usage:F,noCall:Ce}):null,g===`memory`&&G.name!==`MEMORY`&&G.name!==`README`&&(0,m.jsxs)(`div`,{className:`row gap-8`,children:[(0,m.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:Pe,title:`Turn this lesson into a standing trial rule in user-rules.md`,children:`Promote to rule`}),(0,m.jsx)(`button`,{type:`button`,className:`btn ghost sm`,onClick:Ne,children:`Forget this fact`})]}),(0,m.jsx)(`hr`,{className:`hr`}),U?(0,m.jsxs)(`p`,{className:`sub`,children:[`No `,$.replace(/s$/,``).toLowerCase(),` named `,(0,m.jsx)(`em`,{children:G.name}),` could be read in this install.`]}):G?.kind===`manifest`||W?.manifest!==void 0?W?(0,m.jsx)(fe,{manifest:W.manifest,body:W.body,name:G.name}):(0,m.jsx)(`p`,{className:`sub`,children:`Loading…`}):W?.body?(0,m.jsx)(`div`,{className:`lib-doc detail-doc`,children:(0,m.jsx)(ue,{body:Q.body,links:W.links||[]})}):W===null&&V?(0,m.jsx)(`p`,{className:`sub`,children:`Loading…`}):(0,m.jsx)(he,{section:g,source:w(g,G.name)})]}):Le?null:(0,m.jsx)(f,{title:`Select an entry`,children:`Pick something from the list to read it.`})})]})]})}export{D as bodyHead,j as default,A as splitSkills};
@@ -1,2 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-DlYQp10C.js";import{t as r}from"./api-BfpZmUMI.js";import{$ as i,A as a,J as o,et as s,k as c}from"./index-Dwo3Gxek.js";import{t as l}from"./EmptyState-1sPNleqv.js";import{t as u}from"./usePoll-bDFN-Hr6.js";import{a as d,n as f,o as p,r as m,t as h}from"./RailCats-DNlJKicm.js";import{t as g}from"./Markdown-OReRRoEV.js";var _=e(t(),1),v={x:260,y:190},y=110,b=28,x=14,S=44,C=e=>e*Math.PI/180,w=e=>Math.round(e*10)/10,T=(e,t=y,n=v)=>({x:w(n.x+t*Math.cos(C(e))),y:w(n.y+t*Math.sin(C(e)))}),E=e=>e/y*(180/Math.PI)+3,D=(e,t,n,r=0)=>`M${t.x},${t.y} A${e},${e} 0 ${r} 1 ${n.x},${n.y}`,O=w(T(205).x-6),k=e=>e.length*6.4,A=e=>({x:e.x-k(e.name)/2,y:e.y-7,w:k(e.name),h:14}),j=(e,t)=>e.x<t.x+t.w&&t.x<e.x+e.w&&e.y<t.y+t.h&&t.y<e.y+e.h,M=(e,t)=>e.some((n,r)=>[...e.slice(r+1),...t.filter(e=>!e.gate)].some(e=>j(A(n),A(e))));function N(e){return e?.gate===`human`?e.gateOn?.length?`Human gate on ${e.gateOn.join(`, `)}`:`Human gate`:null}function P(e,t=[]){let n=e=>t.find(t=>t.name===e),r=e=>n(e)?.effect??null,i=e=>N(n(e)),a=e.loops||[],o=a.find(e=>e.iteration);if(!o||o.nodes.length>8)return F(e,r,i);let s=Math.max(...e.nodes.map(e=>a.filter(t=>t.nodes.includes(e)).length)),c=a.filter(e=>e!==o);if(s>3||c.some(e=>!e.nodes.every(e=>o.nodes.includes(e))))return F(e,r,i);let l=o.nodes[0],u=new Set(e.edges.filter(e=>e.to===l).map(e=>e.from)),d=new Map;for(let e of[...c].sort((e,t)=>e.nodes.length-t.nodes.length))for(let t of e.nodes.slice(1))t!==l&&!u.has(t)&&!d.has(t)&&d.set(t,e);let f=o.nodes.filter(e=>!d.has(e));if(f.length<2||c.some(e=>d.has(e.nodes[0])))return F(e,r,i);let p=360/f.length,m=f.map((e,t)=>({name:e,a:-90+t*p,r:b})),h=m.findIndex(e=>r(e.name)===`mutate`);h>=0&&m.splice(h,0,{name:`validate`,a:m[h].a-p/2,r:x,gate:!0});let g=m.map(e=>({name:e.name,...T(e.a),r:e.r,effect:e.gate?null:r(e.name),gate:!!e.gate,inner:!1,human:e.gate?null:i(e.name)})),_=m.map((e,t)=>{let n=m[(t+1)%m.length],r=(t+1===m.length?n.a+360:n.a)-E(n.r)-2,i=e.a+E(e.r);return{d:D(y,T(i),T(r),+(r-i>180)),kind:`ring`}}),C=[],O=new Map;for(let e of c)O.set(e.nodes[0],[...O.get(e.nodes[0])||[],e]);for(let[e,t]of O){let n=m.find(t=>t.name===e),a=T(n.a),o=t.length>1;t.sort((e,t)=>e.nodes.length-t.nodes.length).forEach((e,t)=>{let s=T(n.a+(o?t?18:-18:0),y+(o?54:44)),c=Math.atan2(s.y-a.y,s.x-a.x)*(180/Math.PI),l=e.nodes.filter(t=>d.get(t)===e),u=e=>l.map((t,n)=>({name:t,...T(c+(n-(l.length-1)/2)*e,S,s)})),f=105;for(;f<150&&M(u(f),g);)f+=5;u(f).forEach(({name:e,...t})=>{g.push({name:e,...t,r:b,effect:r(e),gate:!1,inner:!0,human:i(e)})});let p=c+180;_.push({d:D(S,T(p+42,S,s),T(p+138,S,s)),kind:`inner`}),_.push({d:D(S,T(p+222,S,s),T(p+318,S,s)),kind:`inner`});let m=`${e.nodes.join(e.nodes.length===2?` ⇄ `:` → `)} · max ${e.max}`,h={lx:s.x,ly:s.y+S+20,anchor:`middle`};if(o){let e=s.x>=v.x,t=Math.max(S,...l.map(e=>{let t=g.find(t=>t.name===e);return Math.abs(t.x-s.x)+b}));h={lx:w(s.x+(e?t+8:-t-8)),ly:w(s.y+4),anchor:e?`start`:`end`}}C.push({loop:e.name,cx:s.x,cy:s.y,r:S,label:m,...h})})}let A=T(205).y,j=e.nodes.filter(e=>!o.nodes.includes(e)),P=j.map((e,t)=>({name:e,x:40,y:w(A-44*(j.length-1-t)),human:i(e)})),I=e.edges.find(e=>e.to===`$close`)?.from,L=g.find(e=>e.name===I),R=L?{from:I,x:L.x+200,y:L.y-30,d:`M${L.x+b},${L.y-6} C${L.x+90},${L.y-40} ${L.x+170},${L.y-40} ${L.x+200},${L.y-30}`}:null,z=Math.max(540,...g.map(e=>e.x+e.r+8),...C.map(e=>e.cx+e.r+8),...C.map(e=>e.anchor===`start`?e.lx+k(e.label)+8:e.lx+k(e.label)/2+8)),B=Math.max(300,...g.map(e=>e.y+e.r+12),...C.map(e=>Math.max(e.cy+e.r,e.ly)+12));return{mode:`ring`,width:Math.ceil(z),height:Math.ceil(B),center:{x:v.x,y:v.y,r:y},nodes:g,arcs:_,inner:C,entry:P,exit:R}}function F(e,t,n){let r=e.loops||[],i=e=>36+16*r.filter(t=>t!==e&&t.nodes.every(t=>e.nodes.includes(t))).length,a=Math.max(b,...r.map(i))+30,o=new Map(e.nodes.map((e,t)=>[e,60+t*100])),s=e.nodes.map(e=>({name:e,x:o.get(e),y:a,r:b,effect:t(e),gate:!1,inner:!1,human:n(e)})),c=e.nodes.slice(1).map((t,n)=>({d:`M${o.get(e.nodes[n])+b},${a} L${o.get(t)-b-4},${a}`,kind:`flow`})),l=r.map(e=>{let t=i(e),n=Math.min(...e.nodes.map(e=>o.get(e))),r=Math.max(...e.nodes.map(e=>o.get(e))),s={x:n-t,y:a-t,w:r-n+2*t,h:2*t};return c.push({d:`M${r},${s.y+s.h} L${n+4},${s.y+s.h}`,kind:`flow`}),{loop:e.name,label:`${e.name} · max ${e.max}`,box:s}});return{mode:`flow`,width:60+e.nodes.length*100,height:2*a,center:null,nodes:s,arcs:c,inner:l,entry:[],exit:null}}var I=n();function L({x:e,y:t,label:n}){return(0,I.jsxs)(`g`,{className:`lr-human`,children:[(0,I.jsx)(`title`,{children:n}),(0,I.jsx)(`circle`,{cx:e,cy:t,r:`9`}),(0,I.jsx)(`circle`,{cx:e,cy:t-2.4,r:`2.6`,className:`lr-human-fig`}),(0,I.jsx)(`path`,{d:`M${e-4.6},${t+5.6} a4.6,4.6 0 0 1 9.2,0 Z`,className:`lr-human-fig`})]})}function R({graph:e,bricks:t,onSelect:n,highlight:r}){let i=P(e,t),a=(e.loops||[]).find(e=>e.iteration),o=e=>t=>{(t.type===`click`||t.key===`Enter`||t.key===` `)&&(t.preventDefault(),n?.(e))};return(0,I.jsxs)(`svg`,{className:`loop-ring`,viewBox:`0 0 ${i.width} ${i.height}`,role:`img`,"aria-label":`${e.name} loop: ${e.nodes.join(`, `)}`,children:[(0,I.jsx)(`defs`,{children:[`ring`,`inner`,`flow`].map(e=>(0,I.jsx)(`marker`,{id:`lr-arrow-${e}`,markerWidth:`10`,markerHeight:`10`,refX:`7`,refY:`4`,orient:`auto`,children:(0,I.jsx)(`path`,{d:`M0,0 L8,4 L0,8 Z`,className:`lr-head-${e}`})},e))}),i.mode===`ring`&&i.inner.map(e=>(0,I.jsxs)(`g`,{children:[(0,I.jsx)(`circle`,{cx:e.cx,cy:e.cy,r:e.r,className:`lr-inner`}),(0,I.jsx)(`text`,{x:e.lx,y:e.ly,textAnchor:e.anchor,className:`lr-sub lr-good`,children:e.label})]},e.loop)),i.mode===`flow`&&i.inner.map(e=>(0,I.jsxs)(`g`,{children:[(0,I.jsx)(`rect`,{x:e.box.x,y:e.box.y,width:e.box.w,height:e.box.h,rx:`14`,className:`lr-box`}),(0,I.jsx)(`text`,{x:e.box.x+10,y:e.box.y-6,className:`lr-sub lr-good`,children:e.label})]},e.loop)),i.arcs.map((e,t)=>(0,I.jsx)(`path`,{d:e.d,className:`lr-${e.kind}`,markerEnd:`url(#lr-arrow-${e.kind})`},t)),i.entry.length>0&&(0,I.jsxs)(`g`,{children:[(0,I.jsx)(`path`,{d:`M40,${i.entry.at(-1).y} L${O},${i.entry.at(-1).y}`,className:`lr-flow`,markerEnd:`url(#lr-arrow-flow)`}),i.entry.map(e=>(0,I.jsxs)(`g`,{children:[(0,I.jsx)(`text`,{x:e.x,y:e.y-10,className:`lr-lbl`,children:e.name}),(0,I.jsx)(`text`,{x:e.x,y:e.y+18,className:`lr-sub`,children:`setup · 1×`}),e.human?(0,I.jsx)(L,{x:e.x-14,y:e.y-14,label:e.human}):null]},e.name))]}),i.nodes.map(e=>e.gate?(0,I.jsxs)(`g`,{className:`lr-gate`,children:[(0,I.jsx)(`title`,{children:`validate — the engine scores the change before the first mutate step`}),(0,I.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r}),(0,I.jsx)(`text`,{x:e.x,y:e.y+5,textAnchor:`middle`,children:`⛨`}),(0,I.jsx)(`text`,{x:e.x+20,y:e.y-10,className:`lr-sub lr-warn`,children:`validate`})]},e.name):(0,I.jsxs)(`g`,{className:`lr-node${e.inner?` inner`:``}${e.effect===`mutate`?` mutate`:``}${e.name===r?` current`:``}`,"aria-current":e.name===r?`step`:void 0,role:`button`,tabIndex:0,"aria-label":`${e.name} brick${e.human?`, ${e.human.toLowerCase()}`:``}`,onClick:o(e.name),onKeyDown:o(e.name),children:[(0,I.jsx)(`circle`,{cx:e.x,cy:e.y,r:e.r}),(0,I.jsx)(`text`,{x:e.x,y:e.y+4,textAnchor:`middle`,children:e.name}),e.human?(0,I.jsx)(L,{x:e.x+e.r*.74,y:e.y-e.r*.74,label:e.human}):null]},e.name)),i.exit&&(0,I.jsxs)(`g`,{children:[(0,I.jsx)(`path`,{d:i.exit.d,className:`lr-flow`,markerEnd:`url(#lr-arrow-flow)`}),(0,I.jsx)(`text`,{x:i.exit.x+6,y:i.exit.y+4,className:`lr-lbl`,children:`close`}),(0,I.jsx)(`text`,{x:i.exit.x-90,y:i.exit.y-10,textAnchor:`middle`,className:`lr-sub`,children:`done`})]}),i.center&&a&&(0,I.jsxs)(`g`,{children:[(0,I.jsx)(`text`,{x:i.center.x,y:i.center.y-4,textAnchor:`middle`,className:`lr-title`,children:e.name}),(0,I.jsxs)(`text`,{x:i.center.x,y:i.center.y+16,textAnchor:`middle`,className:`lr-sub lr-acc`,children:[`iterations · max `,a.max]})]})]})}function z({caption:e,captionHidden:t,columns:n,rows:r,rowKey:i,rowAction:a}){let o=e=>e.align?{textAlign:e.align}:void 0;return(0,I.jsx)(`div`,{className:`tbl-scroll`,children:(0,I.jsxs)(`table`,{className:`tbl`,children:[(0,I.jsx)(`caption`,{className:t?`sr-only`:`tbl-caption`,children:e}),(0,I.jsx)(`thead`,{children:(0,I.jsxs)(`tr`,{children:[n.map(e=>(0,I.jsx)(`th`,{scope:`col`,style:o(e),children:e.label},e.key)),a?(0,I.jsx)(`th`,{scope:`col`,children:(0,I.jsx)(`span`,{className:`sr-only`,children:`Actions`})}):null]})}),(0,I.jsx)(`tbody`,{children:r.map(e=>(0,I.jsxs)(`tr`,{children:[n.map(t=>(0,I.jsx)(`td`,{style:o(t),children:t.render?t.render(e):e[t.key]},t.key)),a?(0,I.jsx)(`td`,{className:`tbl-act`,children:a(e)}):null]},i(e)))})]})})}var B=5e3,ee=[`prudent`,`balanced`,`aggressive`],V={running:`acc`,awaiting:`warn`,unreadable:`bad`},H=e=>!!e.graph;function te(){let[e,t]=(0,_.useState)(null),[n,i]=(0,_.useState)(null),[a,o]=(0,_.useState)(0);return u(e=>r.activeLoops().then(n=>e()&&(t(n),i(null)),t=>e()&&i(t.message)),B,[a]),{loops:e?.loops??null,error:n,onPreset:(e,t)=>r.setLoopPreset(e,t).then(()=>o(e=>e+1),e=>i(e.message))}}var U=e=>({key:e,label:e,align:`right`,render:t=>(0,I.jsx)(`span`,{className:`num`,children:t[e]})}),ne=[U(`iteration`),{key:`intent`,label:`intent`},U(`declared`),U(`actual`),{key:`decision`,label:`decision`},{key:`tests`,label:`tests`}];function re({history:e}){return e.length?(0,I.jsx)(`div`,{className:`loop-history`,children:(0,I.jsx)(z,{caption:`Iterations`,captionHidden:!0,columns:ne,rows:e,rowKey:e=>e.iteration})}):(0,I.jsx)(`p`,{className:`panel-note`,children:`No iteration finished yet.`})}function ie({loop:e,bricks:t,onPreset:n}){let r=H(e)?(e.graph.loops||[]).find(e=>e.iteration):null;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`reader-tags`,children:[(0,I.jsx)(`span`,{className:`tag acc`,children:`Active loop`}),(0,I.jsx)(`span`,{className:`tag${V[e.status]?` ${V[e.status]}`:``}`,children:e.status})]}),(0,I.jsx)(`h2`,{className:`reader-title`,children:e.title}),(0,I.jsxs)(`p`,{className:`mono dim reader-src`,children:[e.branch,` · `,e.root]}),H(e)?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`p`,{className:`reader-lede`,children:[`Iteration `,e.iteration,r?` / ${r.max}`:``,` · at `,e.node]}),e.awaiting?(0,I.jsxs)(`p`,{className:`loop-run-wait t-warn`,children:[(0,I.jsxs)(`b`,{children:[`Awaiting `,e.awaiting.kind,e.awaiting.kind===`gate`?` at ${e.awaiting.node}`:``]}),` `,`— Answer in the agent's session.`]}):null,(0,I.jsxs)(`label`,{className:`panel-note loop-run-preset`,children:[`preset`,(0,I.jsx)(`select`,{className:`sel`,"aria-label":`Preset for ${e.title}`,value:e.preset,onChange:t=>n(e.root,t.target.value),children:ee.map(e=>(0,I.jsx)(`option`,{children:e},e))})]}),(0,I.jsx)(`a`,{href:`#/docs/loop-risk`,children:`What presets mean →`}),(0,I.jsx)(`hr`,{className:`hr`}),(0,I.jsx)(`div`,{className:`loop-graph`,children:(0,I.jsx)(R,{graph:e.graph,bricks:t,highlight:e.node})}),(0,I.jsx)(`h3`,{className:`loop-h2`,children:`Iterations`}),(0,I.jsx)(re,{history:e.history})]}):(0,I.jsx)(`p`,{className:`reader-lede`,children:e.status===`unreadable`?`Its LOOP.md cannot be read, so there is no state to show.`:`Its LOOP.md is gone: the loop closed and its state went with it.`})]})}var W=encodeURIComponent,G=i.loops.map(e=>[e,s[e]]),K={architecture:`Architecture`,tests:`Tests`,development:`Development`,refactoring:`Refactoring`,"day-to-day":`Day-to-day`},ae={project:`Project`,global:`Global`,shipped:`Shipped`},oe={templates:`Categories`,bricks:`Origins`,active:`Statuses`},se=[[`awaiting`,`Awaiting`],[`running`,`Running`],[`done`,`Done · stopped`],[`stopped`,`Done · stopped`],[`finished`,`Finished · unreadable`],[`unreadable`,`Finished · unreadable`]];function q(e,t){let n=e.filter(e=>e.startsWith(`${t} (`)).at(-1);return n?/(overrides \w+)\)$/.exec(n)?.[1]:null}var J=(e,t,n)=>n.flatMap(([n,r])=>e.filter(e=>t(e)===n).map(e=>({...e,group:r})));function Y(e,t){let n=new Set(t.filter(e=>e.gate===`human`).map(e=>e.name));return J(e.map(e=>({...e,desc:e.description,human:e.graph.nodes.some(e=>n.has(e))})),e=>K[e.graph.category]?e.graph.category:`other`,[...Object.entries(K),[`other`,`Other`]])}function X(e,t){return J(e.map(e=>({...e,desc:e.description,override:q(t,e.name)})),e=>e.origin,Object.entries(ae))}function Z(e){return J(e.map(e=>({...e,name:e.root,desc:e.branch})),e=>e.status,se)}var Q=(e,t)=>(0,I.jsx)(`span`,{className:`tag${e?` ${e}`:``}`,children:t},t),$={templates:e=>e.human?Q(`human`,`human gate`):null,bricks:e=>[e.effect===`mutate`?Q(`warn`,`mutate`):null,N(e)?Q(`human`,`human gate`):null,e.override?Q(`acc`,e.override):null,e.available===!1?Q(`bad`,`unavailable`):null],active:e=>Q(V[e.status],e.status)};function ce({name:e,brick:t,override:n,on:r}){let i=`loop-brick${r?` on`:``}${!t||t.available===!1?` dimmed`:``}`;return t?(0,I.jsxs)(`li`,{className:i,id:`brick-${e}`,children:[(0,I.jsx)(`b`,{children:(0,I.jsx)(`a`,{href:`#/loops/bricks/${W(e)}`,children:e})}),Q(t.effect===`mutate`?`warn`:``,t.effect),(0,I.jsx)(`span`,{className:`mono dim`,children:t.agent||t.skill}),(0,I.jsx)(`span`,{className:`panel-note`,children:t.outcomes.join(` · `)}),N(t)?Q(`human`,N(t).toLowerCase()):null,n?Q(`acc`,n):null]}):(0,I.jsxs)(`li`,{className:i,id:`brick-${e}`,children:[(0,I.jsx)(`b`,{children:e}),(0,I.jsx)(`span`,{className:`panel-note`,children:`Not in the catalogue: this template cannot run as is.`})]})}function le({t:e,bricks:t,overridden:n}){let[r,i]=(0,_.useState)(null),a=new Map(t.map(e=>[e.name,e]));return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`reader-tags`,children:[(0,I.jsx)(`span`,{className:`tag acc`,children:`Template`}),K[e.graph.category]?Q(``,K[e.graph.category]):null,e.human?Q(`human`,`human gate`):null]}),(0,I.jsx)(`h2`,{className:`reader-title`,children:e.name}),e.description?(0,I.jsx)(`p`,{className:`reader-lede`,children:e.description}):null,(0,I.jsxs)(`p`,{className:`mono dim reader-src`,children:[`loops/`,e.name,`.json · `,e.origin]}),(0,I.jsx)(`hr`,{className:`hr`}),(0,I.jsx)(`div`,{className:`loop-graph`,children:(0,I.jsx)(R,{graph:e.graph,bricks:t,onSelect:e=>{i(e),document.getElementById(`brick-${e}`)?.scrollIntoView?.({behavior:`smooth`,block:`nearest`})}})}),e.graph.rules?.length?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`h3`,{className:`loop-h2`,children:`Rules`}),(0,I.jsx)(`ul`,{className:`loop-rules`,"aria-label":`Rules every brick follows`,children:e.graph.rules.map(e=>(0,I.jsx)(`li`,{children:e},e))})]}):null,(0,I.jsx)(`h3`,{className:`loop-h2`,children:`Bricks`}),(0,I.jsx)(`ul`,{className:`loop-brick-list`,"aria-label":`Bricks in ${e.name}`,children:e.graph.nodes.map(e=>(0,I.jsx)(ce,{name:e,brick:a.get(e),override:q(n,e),on:r===e},e))})]})}function ue(e){return`---\n${[[`name`,e.name],[`description`,e.description],[`effect`,e.effect],[e.agent?`agent`:`skill`,e.agent||e.skill],[`gate`,e.gate],[`gateOn`,e.gateOn?.join(`, `)],[`outcomes`,e.outcomes.join(`, `)]].filter(([,e])=>e).map(([e,t])=>`${e}: ${t}`).join(`
2
- `)}\n---\n${e.body}`}function de({b:e}){let[t,n]=(0,_.useState)(!1),r=[[`effect`,Q(e.effect===`mutate`?`warn`:``,e.effect)],[e.agent?`agent`:`skill`,(0,I.jsx)(`span`,{className:`mono`,children:e.agent||e.skill},`who`)],[`outcomes`,e.outcomes.map(e=>Q(``,e))],[`gate`,N(e)?Q(`human`,N(e).toLowerCase()):`none`],[`origin`,e.override?`${e.origin}, ${e.override}`:e.origin],[`available`,e.available===!1?(0,I.jsxs)(`span`,{className:`t-warn`,children:[`no — `,e.reason]},`why`):`yes`]];return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsxs)(`div`,{className:`reader-tags`,children:[(0,I.jsx)(`span`,{className:`tag acc`,children:`Brick`}),$.bricks(e)]}),(0,I.jsx)(`h2`,{className:`reader-title`,children:e.name}),e.description?(0,I.jsx)(`p`,{className:`reader-lede`,children:e.description}):null,(0,I.jsxs)(`p`,{className:`mono dim reader-src`,children:[`bricks/`,e.name,`.md`]}),(0,I.jsx)(`dl`,{className:`loop-facts`,children:r.map(([e,t])=>(0,I.jsxs)(_.Fragment,{children:[(0,I.jsx)(`dt`,{children:e}),(0,I.jsx)(`dd`,{children:t})]},e))}),(0,I.jsx)(`hr`,{className:`hr`}),(0,I.jsx)(`div`,{className:`row gap-8 loop-src-bar`,children:(0,I.jsx)(`button`,{type:`button`,className:`btn ghost sm`,"aria-expanded":t,onClick:()=>n(!t),children:t?`Hide source`:`View source`})}),t?(0,I.jsx)(`pre`,{className:`loop-brick-src`,"aria-label":`Source`,children:ue(e)}):(0,I.jsx)(`div`,{className:`lib-doc detail-doc`,children:(0,I.jsx)(g,{body:e.body})})]})}function fe({problems:e}){if(!e?.length)return null;let t=e.length;return(0,I.jsxs)(`div`,{className:`panel loop-problems`,role:`status`,"aria-label":`Catalogue files skipped`,children:[(0,I.jsxs)(`b`,{className:`t-warn`,children:[t,` catalogue `,t===1?`problem`:`problems`,`: these files were skipped`]}),(0,I.jsx)(`ul`,{className:`panel-note`,children:e.map(e=>(0,I.jsx)(`li`,{className:`mono`,children:e},e))})]})}var pe={templates:{title:`No templates`,body:(0,I.jsxs)(I.Fragment,{children:[`Add one under `,(0,I.jsx)(`code`,{className:`mono`,children:`.geneseed/loops/`}),` in the repo.`]})},bricks:{title:`No bricks`,body:(0,I.jsxs)(I.Fragment,{children:[`Add one under `,(0,I.jsx)(`code`,{className:`mono`,children:`.geneseed/bricks/`}),` in the repo.`]})},active:{title:`No loops yet`,body:(0,I.jsxs)(I.Fragment,{children:[`Start one with `,(0,I.jsx)(`code`,{className:`mono`,children:`geneseed loop init`}),` in a worktree, or ask the agent to run a loop. It shows up here while it runs.`]})}},me={templates:(0,I.jsxs)(I.Fragment,{children:[`A template wires bricks into a loop. `,(0,I.jsx)(`a`,{href:`#/docs/loops`,children:`How loops work →`}),` `,(0,I.jsx)(`a`,{href:`#/docs/loop-which-template`,children:`Which template? →`})]}),bricks:(0,I.jsxs)(I.Fragment,{children:[`A brick is one step: a skill or agent and its outcomes.`,` `,(0,I.jsx)(`a`,{href:`#/docs/loop-bricks`,children:`About bricks →`})]}),active:(0,I.jsxs)(I.Fragment,{children:[`Loops registered on this machine, read from their LOOP.md.`,` `,(0,I.jsx)(`a`,{href:`#/docs/loop-running`,children:`Running a loop →`})]})};function he({tab:e=`templates`,item:t,dataRev:n}){let{data:i,error:s}=o(()=>r.loops(),[n],`loops`),u=te(),[g,v]=(0,_.useState)(``),[y,b]=(0,_.useState)(`all`),[x,S]=(0,_.useState)(e);e!==x&&(S(e),v(``),b(`all`));let C=i?.bricks||[],w=e===`active`?u.loops&&Z(u.loops):i&&(e===`bricks`?X(i.bricks,i.overridden):Y(i.templates,i.bricks)),T=w||[],E=f(T),D=y===`all`?T:T.filter(e=>e.group===y),O=g.trim(),k=p(D,O),A=T.find(e=>e.name===t)||e===`active`&&T.find(H)||T[0]||null,j={templates:i?.templates.length,bricks:i?.bricks.length,active:u.loops?.length},M=G.find(([t])=>t===e)[1],N=e===`active`?u.error:s;return(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(c,{error:N,style:{margin:`0 0 var(--sp-3)`}}),(0,I.jsx)(fe,{problems:i?.problems}),(0,I.jsxs)(`div`,{className:`library`,children:[(0,I.jsxs)(`aside`,{className:`lib-kinds`,"aria-label":`Loops sections`,children:[(0,I.jsxs)(`div`,{className:`lib-title`,children:[(0,I.jsx)(`h1`,{className:`h`,children:`Loops`}),(0,I.jsx)(`span`,{className:`dim`,children:`What the engine runs`})]}),(0,I.jsx)(`p`,{className:`panel-note lib-lede`,children:me[e]}),(0,I.jsx)(`nav`,{className:`kind-list`,"aria-label":`Sections`,children:G.map(([t,n])=>(0,I.jsxs)(_.Fragment,{children:[(0,I.jsxs)(`a`,{href:`#/loops/${t}`,className:e===t?`on`:``,"aria-current":e===t?`page`:void 0,children:[n,(0,I.jsx)(`span`,{className:`mono dim`,children:j[t]??``})]}),e===t&&(0,I.jsx)(h,{label:oe[t],total:T.length,cats:E,cat:y,onChange:b})]},t))})]}),(0,I.jsx)(d,{label:M,count:O?`${k.length} of ${D.length}`:w?D.length:``,q:g,onQ:v,matched:k.length,inView:[e,t],children:w?T.length===0?(0,I.jsx)(l,{title:pe[e].title,children:pe[e].body}):(0,I.jsx)(m,{rows:k,activeName:A?.name,hrefOf:t=>`#/loops/${e}/${W(t.name)}`,pills:$[e]}):N?null:(0,I.jsx)(a,{})}),(0,I.jsx)(`article`,{className:`lib-reader`,"aria-label":`Entry`,children:A?e===`active`?(0,I.jsx)(ie,{loop:A,bricks:C,onPreset:u.onPreset}):e===`bricks`?(0,I.jsx)(de,{b:A}):(0,I.jsx)(le,{t:A,bricks:C,overridden:i.overridden},A.name):e===`active`&&w?(0,I.jsx)(l,{title:`What is a loop?`,docs:{href:`#/docs/loops`,label:`How loops work →`},children:`A loop runs bricks in a ring until its gate passes.`}):null})]})]})}export{Z as activeRows,X as brickRows,ue as brickSource,he as default,Y as templateRows};