heyiam 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/dist/assets/index-BGQkmy7q.css +1 -0
- package/app/dist/assets/index-CbLHxerW.js +14 -0
- package/app/dist/favicon.svg +1 -0
- package/app/dist/icons.svg +24 -0
- package/app/dist/index.html +20 -0
- package/dist/analyzer.d.ts +96 -0
- package/dist/analyzer.js +249 -0
- package/dist/analyzer.js.map +1 -0
- package/dist/auth.d.ts +34 -0
- package/dist/auth.js +99 -0
- package/dist/auth.js.map +1 -0
- package/dist/bridge.d.ts +32 -0
- package/dist/bridge.js +211 -0
- package/dist/bridge.js.map +1 -0
- package/dist/config.d.ts +4 -0
- package/dist/config.js +5 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +129 -0
- package/dist/index.js.map +1 -0
- package/dist/llm/anthropic-provider.d.ts +11 -0
- package/dist/llm/anthropic-provider.js +16 -0
- package/dist/llm/anthropic-provider.js.map +1 -0
- package/dist/llm/index.d.ts +16 -0
- package/dist/llm/index.js +25 -0
- package/dist/llm/index.js.map +1 -0
- package/dist/llm/project-enhance.d.ts +71 -0
- package/dist/llm/project-enhance.js +236 -0
- package/dist/llm/project-enhance.js.map +1 -0
- package/dist/llm/proxy-provider.d.ts +16 -0
- package/dist/llm/proxy-provider.js +60 -0
- package/dist/llm/proxy-provider.js.map +1 -0
- package/dist/llm/triage.d.ts +66 -0
- package/dist/llm/triage.js +283 -0
- package/dist/llm/triage.js.map +1 -0
- package/dist/llm/types.d.ts +19 -0
- package/dist/llm/types.js +2 -0
- package/dist/llm/types.js.map +1 -0
- package/dist/machine-key.d.ts +10 -0
- package/dist/machine-key.js +51 -0
- package/dist/machine-key.js.map +1 -0
- package/dist/parsers/claude.d.ts +18 -0
- package/dist/parsers/claude.js +265 -0
- package/dist/parsers/claude.js.map +1 -0
- package/dist/parsers/index.d.ts +28 -0
- package/dist/parsers/index.js +124 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/types.d.ts +81 -0
- package/dist/parsers/types.js +2 -0
- package/dist/parsers/types.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.js +857 -0
- package/dist/server.js.map +1 -0
- package/dist/settings.d.ts +92 -0
- package/dist/settings.js +160 -0
- package/dist/settings.js.map +1 -0
- package/dist/summarize.d.ts +72 -0
- package/dist/summarize.js +312 -0
- package/dist/summarize.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="46" fill="none" viewBox="0 0 48 46"><path fill="#863bff" d="M25.946 44.938c-.664.845-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.287c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.497 0-3.578-1.842-3.578H1.237c-.92 0-1.456-1.04-.92-1.788L10.013.474c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.579 1.842 3.579h11.377c.943 0 1.473 1.088.89 1.83L25.947 44.94z" style="fill:#863bff;fill:color(display-p3 .5252 .23 1);fill-opacity:1"/><mask id="a" width="48" height="46" x="0" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M25.842 44.938c-.664.844-2.021.375-2.021-.698V33.937a2.26 2.26 0 0 0-2.262-2.262H10.183c-.92 0-1.456-1.04-.92-1.788l7.48-10.471c1.07-1.498 0-3.579-1.842-3.579H1.133c-.92 0-1.456-1.04-.92-1.787L9.91.473c.214-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.471c-1.07 1.498 0 3.578 1.842 3.578h11.377c.943 0 1.473 1.088.89 1.832L25.843 44.94z" style="fill:#000;fill-opacity:1"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#ede6ff" rx="5.508" ry="14.704" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -4.47 31.516)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#ede6ff" rx="10.399" ry="29.851" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -39.328 7.883)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#7e14ff" rx="5.508" ry="30.487" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -25.913 -14.639)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.814 -32.644 -3.334)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#7e14ff" rx="5.508" ry="30.599" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="matrix(.00324 1 1 -.00324 -34.34 30.47)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#ede6ff" rx="14.072" ry="22.078" style="fill:#ede6ff;fill:color(display-p3 .9275 .9033 1);fill-opacity:1" transform="rotate(93.35 24.506 48.493)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#7e14ff" rx="3.47" ry="21.501" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(89.009 28.708 47.59)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx=".387" cy="8.972" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(39.51 .387 8.972)"/></g><g filter="url(#k)"><ellipse cx="47.523" cy="-6.092" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 47.523 -6.092)"/></g><g filter="url(#l)"><ellipse cx="41.412" cy="6.333" fill="#47bfff" rx="5.971" ry="9.665" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 41.412 6.333)"/></g><g filter="url(#m)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#n)"><ellipse cx="-1.879" cy="38.332" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 -1.88 38.332)"/></g><g filter="url(#o)"><ellipse cx="35.651" cy="29.907" fill="#7e14ff" rx="4.407" ry="29.108" style="fill:#7e14ff;fill:color(display-p3 .4922 .0767 1);fill-opacity:1" transform="rotate(37.892 35.651 29.907)"/></g><g filter="url(#p)"><ellipse cx="38.418" cy="32.4" fill="#47bfff" rx="5.971" ry="15.297" style="fill:#47bfff;fill:color(display-p3 .2799 .748 1);fill-opacity:1" transform="rotate(37.892 38.418 32.4)"/></g></g><defs><filter id="b" width="60.045" height="41.654" x="-19.77" y="16.149" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-54.613" y="-7.533" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-49.64" y="2.03" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-45.045" y="20.029" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-43.513" y="21.178" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="15.756" y="-17.901" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="23.548" y="2.284" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-27.636" y="-22.853" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="20.116" y="-38.415" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="24.641" y="-11.323" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-29.286" y="6.009" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="8.244" y="-2.416" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="18.713" y="10.588" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17158" stdDeviation="4.596"/></filter></defs></svg>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<symbol id="bluesky-icon" viewBox="0 0 16 17">
|
|
3
|
+
<g clip-path="url(#bluesky-clip)"><path fill="#08060d" d="M7.75 7.735c-.693-1.348-2.58-3.86-4.334-5.097-1.68-1.187-2.32-.981-2.74-.79C.188 2.065.1 2.812.1 3.251s.241 3.602.398 4.13c.52 1.744 2.367 2.333 4.07 2.145-2.495.37-4.71 1.278-1.805 4.512 3.196 3.309 4.38-.71 4.987-2.746.608 2.036 1.307 5.91 4.93 2.746 2.72-2.746.747-4.143-1.747-4.512 1.702.189 3.55-.4 4.07-2.145.156-.528.397-3.691.397-4.13s-.088-1.186-.575-1.406c-.42-.19-1.06-.395-2.741.79-1.755 1.24-3.64 3.752-4.334 5.099"/></g>
|
|
4
|
+
<defs><clipPath id="bluesky-clip"><path fill="#fff" d="M.1.85h15.3v15.3H.1z"/></clipPath></defs>
|
|
5
|
+
</symbol>
|
|
6
|
+
<symbol id="discord-icon" viewBox="0 0 20 19">
|
|
7
|
+
<path fill="#08060d" d="M16.224 3.768a14.5 14.5 0 0 0-3.67-1.153c-.158.286-.343.67-.47.976a13.5 13.5 0 0 0-4.067 0c-.128-.306-.317-.69-.476-.976A14.4 14.4 0 0 0 3.868 3.77C1.546 7.28.916 10.703 1.231 14.077a14.7 14.7 0 0 0 4.5 2.306q.545-.748.965-1.587a9.5 9.5 0 0 1-1.518-.74q.191-.14.372-.293c2.927 1.369 6.107 1.369 8.999 0q.183.152.372.294-.723.437-1.52.74.418.838.963 1.588a14.6 14.6 0 0 0 4.504-2.308c.37-3.911-.63-7.302-2.644-10.309m-9.13 8.234c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.894 0 1.614.82 1.599 1.82.001 1-.705 1.82-1.6 1.82m5.91 0c-.878 0-1.599-.82-1.599-1.82 0-.998.705-1.82 1.6-1.82.893 0 1.614.82 1.599 1.82 0 1-.706 1.82-1.6 1.82"/>
|
|
8
|
+
</symbol>
|
|
9
|
+
<symbol id="documentation-icon" viewBox="0 0 21 20">
|
|
10
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="m15.5 13.333 1.533 1.322c.645.555.967.833.967 1.178s-.322.623-.967 1.179L15.5 18.333m-3.333-5-1.534 1.322c-.644.555-.966.833-.966 1.178s.322.623.966 1.179l1.534 1.321"/>
|
|
11
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M17.167 10.836v-4.32c0-1.41 0-2.117-.224-2.68-.359-.906-1.118-1.621-2.08-1.96-.599-.21-1.349-.21-2.848-.21-2.623 0-3.935 0-4.983.369-1.684.591-3.013 1.842-3.641 3.428C3 6.449 3 7.684 3 10.154v2.122c0 2.558 0 3.838.706 4.726q.306.383.713.671c.76.536 1.79.64 3.581.66"/>
|
|
12
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M3 10a2.78 2.78 0 0 1 2.778-2.778c.555 0 1.209.097 1.748-.047.48-.129.854-.503.982-.982.145-.54.048-1.194.048-1.749a2.78 2.78 0 0 1 2.777-2.777"/>
|
|
13
|
+
</symbol>
|
|
14
|
+
<symbol id="github-icon" viewBox="0 0 19 19">
|
|
15
|
+
<path fill="#08060d" fill-rule="evenodd" d="M9.356 1.85C5.05 1.85 1.57 5.356 1.57 9.694a7.84 7.84 0 0 0 5.324 7.44c.387.079.528-.168.528-.376 0-.182-.013-.805-.013-1.454-2.165.467-2.616-.935-2.616-.935-.349-.91-.864-1.143-.864-1.143-.71-.48.051-.48.051-.48.787.051 1.2.805 1.2.805.695 1.194 1.817.857 2.268.649.064-.507.27-.857.49-1.052-1.728-.182-3.545-.857-3.545-3.87 0-.857.31-1.558.8-2.104-.078-.195-.349-1 .077-2.078 0 0 .657-.208 2.14.805a7.5 7.5 0 0 1 1.946-.26c.657 0 1.328.092 1.946.26 1.483-1.013 2.14-.805 2.14-.805.426 1.078.155 1.883.078 2.078.502.546.799 1.247.799 2.104 0 3.013-1.818 3.675-3.558 3.87.284.247.528.714.528 1.454 0 1.052-.012 1.896-.012 2.156 0 .208.142.455.528.377a7.84 7.84 0 0 0 5.324-7.441c.013-4.338-3.48-7.844-7.773-7.844" clip-rule="evenodd"/>
|
|
16
|
+
</symbol>
|
|
17
|
+
<symbol id="social-icon" viewBox="0 0 20 20">
|
|
18
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M12.5 6.667a4.167 4.167 0 1 0-8.334 0 4.167 4.167 0 0 0 8.334 0"/>
|
|
19
|
+
<path fill="none" stroke="#aa3bff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.35" d="M2.5 16.667a5.833 5.833 0 0 1 8.75-5.053m3.837.474.513 1.035c.07.144.257.282.414.309l.93.155c.596.1.736.536.307.965l-.723.73a.64.64 0 0 0-.152.531l.207.903c.164.715-.213.991-.84.618l-.872-.52a.63.63 0 0 0-.577 0l-.872.52c-.624.373-1.003.094-.84-.618l.207-.903a.64.64 0 0 0-.152-.532l-.723-.729c-.426-.43-.289-.864.306-.964l.93-.156a.64.64 0 0 0 .412-.31l.513-1.034c.28-.562.735-.562 1.012 0"/>
|
|
20
|
+
</symbol>
|
|
21
|
+
<symbol id="x-icon" viewBox="0 0 19 19">
|
|
22
|
+
<path fill="#08060d" fill-rule="evenodd" d="M1.893 1.98c.052.072 1.245 1.769 2.653 3.77l2.892 4.114c.183.261.333.48.333.486s-.068.089-.152.183l-.522.593-.765.867-3.597 4.087c-.375.426-.734.834-.798.905a1 1 0 0 0-.118.148c0 .01.236.017.664.017h.663l.729-.83c.4-.457.796-.906.879-.999a692 692 0 0 0 1.794-2.038c.034-.037.301-.34.594-.675l.551-.624.345-.392a7 7 0 0 1 .34-.374c.006 0 .93 1.306 2.052 2.903l2.084 2.965.045.063h2.275c1.87 0 2.273-.003 2.266-.021-.008-.02-1.098-1.572-3.894-5.547-2.013-2.862-2.28-3.246-2.273-3.266.008-.019.282-.332 2.085-2.38l2-2.274 1.567-1.782c.022-.028-.016-.03-.65-.03h-.674l-.3.342a871 871 0 0 1-1.782 2.025c-.067.075-.405.458-.75.852a100 100 0 0 1-.803.91c-.148.172-.299.344-.99 1.127-.304.343-.32.358-.345.327-.015-.019-.904-1.282-1.976-2.808L6.365 1.85H1.8zm1.782.91 8.078 11.294c.772 1.08 1.413 1.973 1.425 1.984.016.017.241.02 1.05.017l1.03-.004-2.694-3.766L7.796 5.75 5.722 2.852l-1.039-.004-1.039-.004z" clip-rule="evenodd"/>
|
|
23
|
+
</symbol>
|
|
24
|
+
</svg>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>heyi.am</title>
|
|
8
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
|
+
<link
|
|
11
|
+
href="https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap"
|
|
12
|
+
rel="stylesheet"
|
|
13
|
+
/>
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CbLHxerW.js"></script>
|
|
15
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BGQkmy7q.css">
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<div id="root"></div>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
export interface ParsedTurn {
|
|
2
|
+
timestamp: string;
|
|
3
|
+
type: 'prompt' | 'response' | 'tool' | 'error';
|
|
4
|
+
content: string;
|
|
5
|
+
toolName?: string;
|
|
6
|
+
toolInput?: string;
|
|
7
|
+
toolOutput?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ParsedFileChange {
|
|
10
|
+
path: string;
|
|
11
|
+
additions: number;
|
|
12
|
+
deletions: number;
|
|
13
|
+
}
|
|
14
|
+
export interface SessionAnalysis {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
date: string;
|
|
18
|
+
/** End time as ISO timestamp */
|
|
19
|
+
endTime?: string;
|
|
20
|
+
durationMinutes: number;
|
|
21
|
+
/** Wall-clock minutes (first to last timestamp, includes idle) */
|
|
22
|
+
wallClockMinutes?: number;
|
|
23
|
+
projectName: string;
|
|
24
|
+
turns: ParsedTurn[];
|
|
25
|
+
filesChanged: ParsedFileChange[];
|
|
26
|
+
rawLog: string[];
|
|
27
|
+
childSessions?: SessionAnalysis[];
|
|
28
|
+
agentRole?: string;
|
|
29
|
+
parentSessionId?: string | null;
|
|
30
|
+
/** Working directory where the session was started */
|
|
31
|
+
cwd?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ExecutionStep {
|
|
34
|
+
stepNumber: number;
|
|
35
|
+
title: string;
|
|
36
|
+
description: string;
|
|
37
|
+
type?: 'analysis' | 'implementation' | 'testing' | 'deployment' | 'decision';
|
|
38
|
+
}
|
|
39
|
+
export interface ToolUsage {
|
|
40
|
+
tool: string;
|
|
41
|
+
count: number;
|
|
42
|
+
}
|
|
43
|
+
export interface TurnEvent {
|
|
44
|
+
timestamp: string;
|
|
45
|
+
type: 'prompt' | 'response' | 'tool' | 'error';
|
|
46
|
+
content: string;
|
|
47
|
+
}
|
|
48
|
+
export interface FileChange {
|
|
49
|
+
path: string;
|
|
50
|
+
additions: number;
|
|
51
|
+
deletions: number;
|
|
52
|
+
}
|
|
53
|
+
export interface Session {
|
|
54
|
+
id: string;
|
|
55
|
+
title: string;
|
|
56
|
+
date: string;
|
|
57
|
+
/** End time as ISO timestamp */
|
|
58
|
+
endTime?: string;
|
|
59
|
+
/** Active time in minutes (excludes idle gaps) */
|
|
60
|
+
durationMinutes: number;
|
|
61
|
+
/** Wall-clock time in minutes (first to last timestamp) */
|
|
62
|
+
wallClockMinutes?: number;
|
|
63
|
+
turns: number;
|
|
64
|
+
linesOfCode: number;
|
|
65
|
+
status: 'draft' | 'enhanced' | 'published' | 'archived';
|
|
66
|
+
projectName: string;
|
|
67
|
+
rawLog: string[];
|
|
68
|
+
skills: string[];
|
|
69
|
+
executionPath: ExecutionStep[];
|
|
70
|
+
toolBreakdown: ToolUsage[];
|
|
71
|
+
filesChanged: FileChange[];
|
|
72
|
+
turnTimeline: TurnEvent[];
|
|
73
|
+
toolCalls: number;
|
|
74
|
+
/** AI-generated fields (populated from enhanced data) */
|
|
75
|
+
context?: string;
|
|
76
|
+
developerTake?: string;
|
|
77
|
+
qaPairs?: Array<{
|
|
78
|
+
question: string;
|
|
79
|
+
answer: string;
|
|
80
|
+
}>;
|
|
81
|
+
childSessions?: Session[];
|
|
82
|
+
parentSessionId?: string | null;
|
|
83
|
+
agentRole?: string;
|
|
84
|
+
isOrchestrated?: boolean;
|
|
85
|
+
/** Working directory where the session was started */
|
|
86
|
+
cwd?: string;
|
|
87
|
+
/** True when enhanced via bulk mode with auto-accepted AI suggestions */
|
|
88
|
+
quickEnhanced?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export declare function extractSkills(analysis: SessionAnalysis): string[];
|
|
91
|
+
export declare function computeToolBreakdown(turns: ParsedTurn[]): ToolUsage[];
|
|
92
|
+
export declare function generateExecutionPath(turns: ParsedTurn[]): ExecutionStep[];
|
|
93
|
+
export declare function buildTurnTimeline(turns: ParsedTurn[]): TurnEvent[];
|
|
94
|
+
export declare function detectContext(analysis: SessionAnalysis): string | undefined;
|
|
95
|
+
export declare function computeLinesOfCode(filesChanged: ParsedFileChange[]): number;
|
|
96
|
+
export declare function analyzeSession(analysis: SessionAnalysis): Session;
|
package/dist/analyzer.js
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// Session Analyzer — transforms raw parser output into the rich Session type
|
|
2
|
+
// the React frontend expects (see cli/app/src/types.ts)
|
|
3
|
+
// ── Skill extraction ───────────────────────────────────────────
|
|
4
|
+
const EXTENSION_SKILLS = {
|
|
5
|
+
'.ts': 'TypeScript', '.tsx': 'React', '.jsx': 'React', '.js': 'JavaScript',
|
|
6
|
+
'.rs': 'Rust', '.go': 'Go', '.py': 'Python', '.rb': 'Ruby',
|
|
7
|
+
'.java': 'Java', '.kt': 'Kotlin', '.swift': 'Swift',
|
|
8
|
+
'.css': 'CSS', '.scss': 'SCSS', '.html': 'HTML',
|
|
9
|
+
'.sql': 'SQL', '.graphql': 'GraphQL',
|
|
10
|
+
'.ex': 'Elixir', '.exs': 'Elixir', '.erl': 'Erlang',
|
|
11
|
+
'.c': 'C', '.cpp': 'C++', '.h': 'C', '.hpp': 'C++',
|
|
12
|
+
'.sh': 'Shell', '.bash': 'Shell', '.zsh': 'Shell',
|
|
13
|
+
'.yml': 'YAML', '.yaml': 'YAML', '.toml': 'TOML',
|
|
14
|
+
'.proto': 'Protobuf', '.tf': 'Terraform',
|
|
15
|
+
};
|
|
16
|
+
const CONFIG_FILE_SKILLS = {
|
|
17
|
+
'Dockerfile': 'Docker', 'docker-compose.yml': 'Docker',
|
|
18
|
+
'package.json': 'Node.js', 'tsconfig.json': 'TypeScript',
|
|
19
|
+
'Cargo.toml': 'Rust', 'go.mod': 'Go', 'requirements.txt': 'Python',
|
|
20
|
+
'Gemfile': 'Ruby', 'mix.exs': 'Elixir', 'build.gradle': 'Gradle',
|
|
21
|
+
'pom.xml': 'Maven', '.eslintrc': 'ESLint', 'jest.config': 'Jest',
|
|
22
|
+
'vitest.config': 'Vitest', 'webpack.config': 'Webpack',
|
|
23
|
+
'vite.config': 'Vite', 'tailwind.config': 'Tailwind CSS',
|
|
24
|
+
'prisma/schema.prisma': 'Prisma', 'drizzle.config': 'Drizzle',
|
|
25
|
+
};
|
|
26
|
+
const IMPORT_PATTERNS = [
|
|
27
|
+
{ pattern: /from\s+['"]react['"]/, skill: 'React' },
|
|
28
|
+
{ pattern: /from\s+['"]express['"]/, skill: 'Express' },
|
|
29
|
+
{ pattern: /from\s+['"]next/, skill: 'Next.js' },
|
|
30
|
+
{ pattern: /from\s+['"]@angular/, skill: 'Angular' },
|
|
31
|
+
{ pattern: /from\s+['"]vue['"]/, skill: 'Vue' },
|
|
32
|
+
{ pattern: /from\s+['"]@nestjs/, skill: 'NestJS' },
|
|
33
|
+
{ pattern: /from\s+['"]fastify['"]/, skill: 'Fastify' },
|
|
34
|
+
{ pattern: /from\s+['"]zod['"]/, skill: 'Zod' },
|
|
35
|
+
{ pattern: /from\s+['"]@prisma/, skill: 'Prisma' },
|
|
36
|
+
{ pattern: /from\s+['"]redis['"]/, skill: 'Redis' },
|
|
37
|
+
{ pattern: /from\s+['"]pg['"]/, skill: 'PostgreSQL' },
|
|
38
|
+
{ pattern: /from\s+['"]mongoose['"]/, skill: 'MongoDB' },
|
|
39
|
+
{ pattern: /from\s+['"]@aws-sdk/, skill: 'AWS' },
|
|
40
|
+
{ pattern: /from\s+['"]@anthropic/, skill: 'Claude API' },
|
|
41
|
+
{ pattern: /from\s+['"]openai['"]/, skill: 'OpenAI' },
|
|
42
|
+
];
|
|
43
|
+
export function extractSkills(analysis) {
|
|
44
|
+
const skills = new Set();
|
|
45
|
+
// From file extensions
|
|
46
|
+
for (const file of analysis.filesChanged) {
|
|
47
|
+
const ext = extname(file.path);
|
|
48
|
+
if (ext && EXTENSION_SKILLS[ext]) {
|
|
49
|
+
skills.add(EXTENSION_SKILLS[ext]);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// From config file names
|
|
53
|
+
for (const file of analysis.filesChanged) {
|
|
54
|
+
const basename = file.path.split('/').pop() ?? '';
|
|
55
|
+
for (const [configFile, skill] of Object.entries(CONFIG_FILE_SKILLS)) {
|
|
56
|
+
if (basename.startsWith(configFile) || file.path.includes(configFile)) {
|
|
57
|
+
skills.add(skill);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// From import statements and tool output in turns
|
|
62
|
+
const allContent = analysis.turns
|
|
63
|
+
.filter((t) => t.type === 'tool' || t.type === 'response')
|
|
64
|
+
.map((t) => [t.content, t.toolOutput ?? ''].join('\n'))
|
|
65
|
+
.join('\n');
|
|
66
|
+
for (const { pattern, skill } of IMPORT_PATTERNS) {
|
|
67
|
+
if (pattern.test(allContent)) {
|
|
68
|
+
skills.add(skill);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
// From tool names (if Claude Code tools are used)
|
|
72
|
+
const toolNames = new Set(analysis.turns.filter((t) => t.toolName).map((t) => t.toolName));
|
|
73
|
+
if (toolNames.has('Bash'))
|
|
74
|
+
skills.add('Shell');
|
|
75
|
+
return [...skills].sort();
|
|
76
|
+
}
|
|
77
|
+
function extname(filePath) {
|
|
78
|
+
const dot = filePath.lastIndexOf('.');
|
|
79
|
+
return dot > 0 ? filePath.slice(dot) : '';
|
|
80
|
+
}
|
|
81
|
+
// ── Tool breakdown ─────────────────────────────────────────────
|
|
82
|
+
export function computeToolBreakdown(turns) {
|
|
83
|
+
const counts = new Map();
|
|
84
|
+
for (const turn of turns) {
|
|
85
|
+
if (turn.type === 'tool' && turn.toolName) {
|
|
86
|
+
counts.set(turn.toolName, (counts.get(turn.toolName) ?? 0) + 1);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return [...counts.entries()]
|
|
90
|
+
.map(([tool, count]) => ({ tool, count }))
|
|
91
|
+
.sort((a, b) => b.count - a.count);
|
|
92
|
+
}
|
|
93
|
+
function classifyStepType(group) {
|
|
94
|
+
const tools = group.turns.filter((t) => t.type === 'tool');
|
|
95
|
+
const toolNames = new Set(tools.map((t) => t.toolName).filter(Boolean));
|
|
96
|
+
const contents = group.turns.map((t) => t.content.toLowerCase()).join(' ');
|
|
97
|
+
if (contents.includes('test') || contents.includes('spec') || contents.includes('assert')) {
|
|
98
|
+
return 'testing';
|
|
99
|
+
}
|
|
100
|
+
if (contents.includes('deploy') || contents.includes('release') || contents.includes('ci')) {
|
|
101
|
+
return 'deployment';
|
|
102
|
+
}
|
|
103
|
+
const readOnlyTools = new Set(['Read', 'Grep', 'Glob']);
|
|
104
|
+
if (toolNames.size > 0 && [...toolNames].every((n) => readOnlyTools.has(n))) {
|
|
105
|
+
return 'analysis';
|
|
106
|
+
}
|
|
107
|
+
if (tools.some((t) => t.content.toLowerCase().includes('chose') || t.content.toLowerCase().includes('decided'))) {
|
|
108
|
+
return 'decision';
|
|
109
|
+
}
|
|
110
|
+
return 'implementation';
|
|
111
|
+
}
|
|
112
|
+
function summarizeGroup(group) {
|
|
113
|
+
const tools = group.turns.filter((t) => t.type === 'tool');
|
|
114
|
+
const files = tools
|
|
115
|
+
.filter((t) => t.toolInput)
|
|
116
|
+
.map((t) => t.toolInput.split('/').pop() ?? t.toolInput)
|
|
117
|
+
.filter((v, i, a) => a.indexOf(v) === i);
|
|
118
|
+
const toolNames = [...new Set(tools.map((t) => t.toolName).filter(Boolean))];
|
|
119
|
+
// Use the first prompt or response as description basis
|
|
120
|
+
const narrative = group.turns.find((t) => t.type === 'response' || t.type === 'prompt');
|
|
121
|
+
const desc = narrative?.content ?? `Used ${toolNames.join(', ')} on ${files.join(', ')}`;
|
|
122
|
+
// Title: derive from the dominant action
|
|
123
|
+
let title;
|
|
124
|
+
if (toolNames.length === 0 && group.turns.some((t) => t.type === 'prompt')) {
|
|
125
|
+
title = 'Discussed approach';
|
|
126
|
+
}
|
|
127
|
+
else if (files.length > 0) {
|
|
128
|
+
const readOnly = toolNames.every((n) => n === 'Read' || n === 'Grep' || n === 'Glob');
|
|
129
|
+
if (readOnly) {
|
|
130
|
+
title = `Analyzed ${files.slice(0, 3).join(', ')}`;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
title = `Modified ${files.slice(0, 3).join(', ')}`;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
else if (toolNames.includes('Bash')) {
|
|
137
|
+
title = 'Ran shell commands';
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
title = 'Worked on implementation';
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
title,
|
|
144
|
+
description: desc.length > 200 ? desc.slice(0, 197) + '...' : desc,
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export function generateExecutionPath(turns) {
|
|
148
|
+
if (turns.length === 0)
|
|
149
|
+
return [];
|
|
150
|
+
// Group turns into logical steps: a prompt starts a new group,
|
|
151
|
+
// consecutive tool calls are grouped together, responses end groups
|
|
152
|
+
const groups = [];
|
|
153
|
+
let current = { turns: [], startIndex: 0 };
|
|
154
|
+
for (let i = 0; i < turns.length; i++) {
|
|
155
|
+
const turn = turns[i];
|
|
156
|
+
if (turn.type === 'prompt' && current.turns.length > 0) {
|
|
157
|
+
groups.push(current);
|
|
158
|
+
current = { turns: [], startIndex: i };
|
|
159
|
+
}
|
|
160
|
+
current.turns.push(turn);
|
|
161
|
+
}
|
|
162
|
+
if (current.turns.length > 0) {
|
|
163
|
+
groups.push(current);
|
|
164
|
+
}
|
|
165
|
+
return groups.map((group, idx) => {
|
|
166
|
+
const { title, description } = summarizeGroup(group);
|
|
167
|
+
return {
|
|
168
|
+
stepNumber: idx + 1,
|
|
169
|
+
title,
|
|
170
|
+
description,
|
|
171
|
+
type: classifyStepType(group),
|
|
172
|
+
};
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
// ── Turn timeline ──────────────────────────────────────────────
|
|
176
|
+
export function buildTurnTimeline(turns) {
|
|
177
|
+
return turns.map((t) => ({
|
|
178
|
+
timestamp: t.timestamp,
|
|
179
|
+
type: t.type,
|
|
180
|
+
content: t.type === 'tool' && t.toolName
|
|
181
|
+
? `${t.toolName} ${t.toolInput ?? ''}`.trim()
|
|
182
|
+
: t.content,
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
// ── Context detection ──────────────────────────────────────────
|
|
186
|
+
export function detectContext(analysis) {
|
|
187
|
+
// Try to extract git branch from Bash commands
|
|
188
|
+
const bashTurns = analysis.turns.filter((t) => t.type === 'tool' && t.toolName === 'Bash');
|
|
189
|
+
let branch;
|
|
190
|
+
for (const turn of bashTurns) {
|
|
191
|
+
const branchMatch = turn.content.match(/git\s+(?:checkout|switch)\s+(?:-[bc]\s+)?(\S+)/);
|
|
192
|
+
if (branchMatch) {
|
|
193
|
+
branch = branchMatch[1];
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
const outputMatch = turn.toolOutput?.match(/On branch (\S+)/);
|
|
197
|
+
if (outputMatch) {
|
|
198
|
+
branch = outputMatch[1];
|
|
199
|
+
break;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
// Detect project type from config files touched
|
|
203
|
+
const configFiles = analysis.filesChanged
|
|
204
|
+
.map((f) => f.path.split('/').pop() ?? '')
|
|
205
|
+
.filter((f) => CONFIG_FILE_SKILLS[f]);
|
|
206
|
+
const parts = [];
|
|
207
|
+
if (branch)
|
|
208
|
+
parts.push(`Branch: ${branch}`);
|
|
209
|
+
if (configFiles.length > 0) {
|
|
210
|
+
const types = configFiles.map((f) => CONFIG_FILE_SKILLS[f]).filter((v, i, a) => a.indexOf(v) === i);
|
|
211
|
+
parts.push(`Stack: ${types.join(', ')}`);
|
|
212
|
+
}
|
|
213
|
+
return parts.length > 0 ? parts.join('. ') : undefined;
|
|
214
|
+
}
|
|
215
|
+
// ── Lines of code ──────────────────────────────────────────────
|
|
216
|
+
export function computeLinesOfCode(filesChanged) {
|
|
217
|
+
return filesChanged.reduce((sum, f) => sum + f.additions + f.deletions, 0);
|
|
218
|
+
}
|
|
219
|
+
// ── Main analyzer ──────────────────────────────────────────────
|
|
220
|
+
export function analyzeSession(analysis) {
|
|
221
|
+
const toolTurns = analysis.turns.filter((t) => t.type === 'tool');
|
|
222
|
+
const childSessions = analysis.childSessions?.map(analyzeSession);
|
|
223
|
+
const isOrchestrated = childSessions !== undefined && childSessions.length > 0;
|
|
224
|
+
return {
|
|
225
|
+
id: analysis.id,
|
|
226
|
+
title: analysis.title,
|
|
227
|
+
date: analysis.date,
|
|
228
|
+
...(analysis.endTime ? { endTime: analysis.endTime } : {}),
|
|
229
|
+
durationMinutes: analysis.durationMinutes,
|
|
230
|
+
...(analysis.wallClockMinutes != null ? { wallClockMinutes: analysis.wallClockMinutes } : {}),
|
|
231
|
+
turns: analysis.turns.length,
|
|
232
|
+
linesOfCode: computeLinesOfCode(analysis.filesChanged),
|
|
233
|
+
status: 'draft',
|
|
234
|
+
projectName: analysis.projectName,
|
|
235
|
+
rawLog: analysis.rawLog,
|
|
236
|
+
skills: extractSkills(analysis),
|
|
237
|
+
executionPath: generateExecutionPath(analysis.turns),
|
|
238
|
+
toolBreakdown: computeToolBreakdown(analysis.turns),
|
|
239
|
+
filesChanged: analysis.filesChanged,
|
|
240
|
+
turnTimeline: buildTurnTimeline(analysis.turns),
|
|
241
|
+
toolCalls: toolTurns.length,
|
|
242
|
+
...(childSessions && childSessions.length > 0 ? { childSessions } : {}),
|
|
243
|
+
...(analysis.parentSessionId != null ? { parentSessionId: analysis.parentSessionId } : {}),
|
|
244
|
+
...(analysis.agentRole ? { agentRole: analysis.agentRole } : {}),
|
|
245
|
+
...(isOrchestrated ? { isOrchestrated } : {}),
|
|
246
|
+
...(analysis.cwd ? { cwd: analysis.cwd } : {}),
|
|
247
|
+
};
|
|
248
|
+
}
|
|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E,QAAQ,CAAC,YAAY;QACnC,YAAY,EAAE,iBAAiB,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC/C,SAAS,EAAE,SAAS,CAAC,MAAM;QAC3B,GAAG,CAAC,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,GAAG,CAAC,QAAQ,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC1F,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,QAAQ,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChE,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7C,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/C,CAAC;AACJ,CAAC"}
|
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface AuthConfig {
|
|
2
|
+
token: string;
|
|
3
|
+
username: string;
|
|
4
|
+
savedAt: string;
|
|
5
|
+
}
|
|
6
|
+
export interface DeviceCodeResponse {
|
|
7
|
+
device_code: string;
|
|
8
|
+
user_code: string;
|
|
9
|
+
verification_uri: string;
|
|
10
|
+
expires_in: number;
|
|
11
|
+
interval: number;
|
|
12
|
+
}
|
|
13
|
+
export interface PublishPayload {
|
|
14
|
+
session: unknown;
|
|
15
|
+
signature: string;
|
|
16
|
+
publicKey: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function ensureConfigDir(configDir?: string): void;
|
|
19
|
+
export declare function readConfig<T>(filename: string, configDir?: string): T | null;
|
|
20
|
+
export declare function writeConfig(filename: string, data: unknown, configDir?: string): void;
|
|
21
|
+
export declare function getAuthToken(configDir?: string): AuthConfig | null;
|
|
22
|
+
export declare function deleteAuthToken(configDir?: string): void;
|
|
23
|
+
export declare function saveAuthToken(token: string, username: string, configDir?: string): void;
|
|
24
|
+
export declare function checkAuthStatus(apiBaseUrl: string, configDir?: string, fetchFn?: typeof fetch): Promise<{
|
|
25
|
+
authenticated: boolean;
|
|
26
|
+
username?: string;
|
|
27
|
+
}>;
|
|
28
|
+
export declare function deviceAuthFlow(apiBaseUrl: string, configDir?: string, options?: {
|
|
29
|
+
fetchFn?: typeof fetch;
|
|
30
|
+
openBrowser?: (url: string) => Promise<void>;
|
|
31
|
+
onUserCode?: (code: string, verificationUri: string) => void;
|
|
32
|
+
pollIntervalMs?: number;
|
|
33
|
+
}): Promise<AuthConfig>;
|
|
34
|
+
export declare function buildPublishPayload(session: unknown, signature: string, publicKey: string): PublishPayload;
|
package/dist/auth.js
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync, mkdirSync, existsSync, unlinkSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { homedir } from 'node:os';
|
|
4
|
+
const CONFIG_DIR = join(homedir(), '.config', 'heyiam');
|
|
5
|
+
const AUTH_FILE = 'auth.json';
|
|
6
|
+
export function ensureConfigDir(configDir = CONFIG_DIR) {
|
|
7
|
+
mkdirSync(configDir, { recursive: true });
|
|
8
|
+
}
|
|
9
|
+
export function readConfig(filename, configDir = CONFIG_DIR) {
|
|
10
|
+
const filePath = join(configDir, filename);
|
|
11
|
+
if (!existsSync(filePath))
|
|
12
|
+
return null;
|
|
13
|
+
return JSON.parse(readFileSync(filePath, 'utf-8'));
|
|
14
|
+
}
|
|
15
|
+
export function writeConfig(filename, data, configDir = CONFIG_DIR) {
|
|
16
|
+
ensureConfigDir(configDir);
|
|
17
|
+
writeFileSync(join(configDir, filename), JSON.stringify(data, null, 2), { mode: 0o600 });
|
|
18
|
+
}
|
|
19
|
+
export function getAuthToken(configDir = CONFIG_DIR) {
|
|
20
|
+
return readConfig(AUTH_FILE, configDir);
|
|
21
|
+
}
|
|
22
|
+
export function deleteAuthToken(configDir = CONFIG_DIR) {
|
|
23
|
+
const filePath = join(configDir, AUTH_FILE);
|
|
24
|
+
if (existsSync(filePath)) {
|
|
25
|
+
unlinkSync(filePath);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
export function saveAuthToken(token, username, configDir = CONFIG_DIR) {
|
|
29
|
+
const config = { token, username, savedAt: new Date().toISOString() };
|
|
30
|
+
writeConfig(AUTH_FILE, config, configDir);
|
|
31
|
+
}
|
|
32
|
+
export async function checkAuthStatus(apiBaseUrl, configDir = CONFIG_DIR, fetchFn = fetch) {
|
|
33
|
+
const auth = getAuthToken(configDir);
|
|
34
|
+
if (!auth)
|
|
35
|
+
return { authenticated: false };
|
|
36
|
+
const res = await fetchFn(`${apiBaseUrl}/api/auth/status`, {
|
|
37
|
+
headers: { Authorization: `Bearer ${auth.token}` },
|
|
38
|
+
});
|
|
39
|
+
if (!res.ok)
|
|
40
|
+
return { authenticated: false };
|
|
41
|
+
const body = (await res.json());
|
|
42
|
+
return { authenticated: true, username: body.username };
|
|
43
|
+
}
|
|
44
|
+
export async function deviceAuthFlow(apiBaseUrl, configDir = CONFIG_DIR, options = {}) {
|
|
45
|
+
const fetchFn = options.fetchFn ?? fetch;
|
|
46
|
+
const pollInterval = options.pollIntervalMs ?? 5000;
|
|
47
|
+
// Step 1: Request device code
|
|
48
|
+
const codeRes = await fetchFn(`${apiBaseUrl}/api/device/code`, { method: 'POST' });
|
|
49
|
+
if (!codeRes.ok) {
|
|
50
|
+
throw new Error(`Failed to request device code: ${codeRes.status}`);
|
|
51
|
+
}
|
|
52
|
+
const codeData = (await codeRes.json());
|
|
53
|
+
// Step 2: Notify caller of user code and open browser
|
|
54
|
+
if (options.onUserCode) {
|
|
55
|
+
options.onUserCode(codeData.user_code, codeData.verification_uri);
|
|
56
|
+
}
|
|
57
|
+
if (options.openBrowser) {
|
|
58
|
+
await options.openBrowser(codeData.verification_uri);
|
|
59
|
+
}
|
|
60
|
+
// Step 3: Poll for token
|
|
61
|
+
const deadline = Date.now() + codeData.expires_in * 1000;
|
|
62
|
+
const interval = Math.max((codeData.interval ?? 5) * 1000, pollInterval);
|
|
63
|
+
while (Date.now() < deadline) {
|
|
64
|
+
await sleep(interval);
|
|
65
|
+
const tokenRes = await fetchFn(`${apiBaseUrl}/api/device/token`, {
|
|
66
|
+
method: 'POST',
|
|
67
|
+
headers: { 'Content-Type': 'application/json' },
|
|
68
|
+
body: JSON.stringify({ device_code: codeData.device_code }),
|
|
69
|
+
});
|
|
70
|
+
if (tokenRes.ok) {
|
|
71
|
+
const tokenData = (await tokenRes.json());
|
|
72
|
+
saveAuthToken(tokenData.access_token, tokenData.username, configDir);
|
|
73
|
+
return getAuthToken(configDir);
|
|
74
|
+
}
|
|
75
|
+
const errorBody = (await tokenRes.json());
|
|
76
|
+
if (errorBody.error === 'authorization_pending') {
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
if (errorBody.error === 'slow_down') {
|
|
80
|
+
// Back off — handled by next iteration naturally since interval is constant
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if (errorBody.error === 'expired_token') {
|
|
84
|
+
throw new Error('Device authorization expired. Please try again.');
|
|
85
|
+
}
|
|
86
|
+
if (errorBody.error === 'access_denied') {
|
|
87
|
+
throw new Error('Authorization was denied by the user.');
|
|
88
|
+
}
|
|
89
|
+
throw new Error(`Device auth failed: ${errorBody.error}`);
|
|
90
|
+
}
|
|
91
|
+
throw new Error('Device authorization timed out.');
|
|
92
|
+
}
|
|
93
|
+
export function buildPublishPayload(session, signature, publicKey) {
|
|
94
|
+
return { session, signature, publicKey };
|
|
95
|
+
}
|
|
96
|
+
function sleep(ms) {
|
|
97
|
+
return new Promise((resolve) => setTime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C,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AAC3D,CAAC"}
|
package/dist/bridge.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { SessionAnalysis as ParserOutput } from "./parsers/types.js";
|
|
2
|
+
import type { SessionAnalysis as AnalyzerInput, Session } from "./analyzer.js";
|
|
3
|
+
import { type SessionMeta } from "./parsers/index.js";
|
|
4
|
+
export interface BridgeOptions {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
projectName: string;
|
|
7
|
+
agentRole?: string;
|
|
8
|
+
parentSessionId?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function bridgeToAnalyzer(parsed: ParserOutput, opts: BridgeOptions): AnalyzerInput;
|
|
11
|
+
/**
|
|
12
|
+
* Deduplicate worktree clones: agents with same role and start time within
|
|
13
|
+
* 30 seconds are considered duplicates. Keep the one with more turns.
|
|
14
|
+
*/
|
|
15
|
+
export declare function deduplicateChildren(children: Session[]): Session[];
|
|
16
|
+
/** Parse, bridge, and analyze each child session. Attaches results to parent. */
|
|
17
|
+
export declare function bridgeChildSessions(parentMeta: SessionMeta, projectName: string): Promise<Session[]>;
|
|
18
|
+
/** Lightweight child summary for list endpoints — no full parse needed. */
|
|
19
|
+
export interface ChildSessionSummary {
|
|
20
|
+
sessionId: string;
|
|
21
|
+
role?: string;
|
|
22
|
+
title?: string;
|
|
23
|
+
durationMinutes?: number;
|
|
24
|
+
linesOfCode?: number;
|
|
25
|
+
date?: string;
|
|
26
|
+
}
|
|
27
|
+
/** Compute aggregated stats from fully-parsed child sessions. */
|
|
28
|
+
export declare function aggregateChildStats(children: Session[]): {
|
|
29
|
+
totalLoc: number;
|
|
30
|
+
totalDurationMinutes: number;
|
|
31
|
+
agentCount: number;
|
|
32
|
+
};
|