@cuongtran001/kanna 1.26.6 → 1.26.8

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 (61) hide show
  1. package/README.md +4 -4
  2. package/dist/client/assets/{arc-CJD0u6h-.js → arc-ENlupM-O.js} +1 -1
  3. package/dist/client/assets/{architectureDiagram-3BPJPVTR-DI3SR-CC.js → architectureDiagram-3BPJPVTR-7thMLC5Q.js} +1 -1
  4. package/dist/client/assets/{blockDiagram-GPEHLZMM-CjpKyOce.js → blockDiagram-GPEHLZMM-B9Ac-6FQ.js} +1 -1
  5. package/dist/client/assets/{c4Diagram-AAUBKEIU-DuBWcSHn.js → c4Diagram-AAUBKEIU-CojnQgpV.js} +1 -1
  6. package/dist/client/assets/channel-DLvdzmL0.js +1 -0
  7. package/dist/client/assets/{chunk-2J33WTMH-C5MyuFcU.js → chunk-2J33WTMH-JvgBEpcC.js} +1 -1
  8. package/dist/client/assets/{chunk-4BX2VUAB-DtdZzjTM.js → chunk-4BX2VUAB-Ok3gcnbq.js} +1 -1
  9. package/dist/client/assets/{chunk-55IACEB6-BUWJeeb5.js → chunk-55IACEB6-BSt4zthO.js} +1 -1
  10. package/dist/client/assets/{chunk-727SXJPM-CG2xz9RA.js → chunk-727SXJPM-3R6oUmW5.js} +1 -1
  11. package/dist/client/assets/{chunk-AQP2D5EJ-Z-N2zGWN.js → chunk-AQP2D5EJ-DL2w-how.js} +1 -1
  12. package/dist/client/assets/{chunk-FMBD7UC4-ctIyozqy.js → chunk-FMBD7UC4-BivJqhwU.js} +1 -1
  13. package/dist/client/assets/{chunk-ND2GUHAM-CbIZBsr6.js → chunk-ND2GUHAM-DVa3zg8b.js} +1 -1
  14. package/dist/client/assets/{chunk-QZHKN3VN-BYks8Ppw.js → chunk-QZHKN3VN-BeoBO0de.js} +1 -1
  15. package/dist/client/assets/classDiagram-4FO5ZUOK-DR9eTIBq.js +1 -0
  16. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-DR9eTIBq.js +1 -0
  17. package/dist/client/assets/{cose-bilkent-S5V4N54A-CxbT5Llo.js → cose-bilkent-S5V4N54A-DvU6uYLA.js} +1 -1
  18. package/dist/client/assets/{dagre-BM42HDAG-BsWbRgml.js → dagre-BM42HDAG-yVk4Au2l.js} +1 -1
  19. package/dist/client/assets/{diagram-2AECGRRQ-BOu6Jrew.js → diagram-2AECGRRQ-CfmzrHnl.js} +1 -1
  20. package/dist/client/assets/{diagram-5GNKFQAL-Crolu383.js → diagram-5GNKFQAL-DpRjhY3R.js} +1 -1
  21. package/dist/client/assets/{diagram-KO2AKTUF-CxVVK78I.js → diagram-KO2AKTUF-BxEclSFD.js} +1 -1
  22. package/dist/client/assets/{diagram-LMA3HP47-lwtfmI0s.js → diagram-LMA3HP47-BgEv2oUj.js} +1 -1
  23. package/dist/client/assets/{diagram-OG6HWLK6-Btk016q5.js → diagram-OG6HWLK6-DzbBmJ3u.js} +1 -1
  24. package/dist/client/assets/{erDiagram-TEJ5UH35-D69XDFKN.js → erDiagram-TEJ5UH35-9k6kV_RS.js} +1 -1
  25. package/dist/client/assets/{flowDiagram-I6XJVG4X-KqTkb5Mq.js → flowDiagram-I6XJVG4X-BoD9c3TY.js} +1 -1
  26. package/dist/client/assets/{ganttDiagram-6RSMTGT7-BZNgRgyq.js → ganttDiagram-6RSMTGT7-Bzhs_0Fc.js} +1 -1
  27. package/dist/client/assets/{gitGraphDiagram-PVQCEYII-CksSHgjb.js → gitGraphDiagram-PVQCEYII-CDqcdAXq.js} +1 -1
  28. package/dist/client/assets/{index-CBwsSd4f.js → index-BXN_yXTB.js} +79 -79
  29. package/dist/client/assets/{index-DdWa4GcO.js → index-JDDoTo74.js} +1 -1
  30. package/dist/client/assets/{infoDiagram-5YYISTIA-tofGzHFo.js → infoDiagram-5YYISTIA-BuQ0oJbf.js} +1 -1
  31. package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DKx906VP.js → ishikawaDiagram-YF4QCWOH-B-Zsyq8C.js} +1 -1
  32. package/dist/client/assets/{journeyDiagram-JHISSGLW-Dhnd1vkt.js → journeyDiagram-JHISSGLW-Ds1wNDPp.js} +1 -1
  33. package/dist/client/assets/{kanban-definition-UN3LZRKU-Bb7nC4oX.js → kanban-definition-UN3LZRKU-DEwGQcfT.js} +1 -1
  34. package/dist/client/assets/{linear-D3sKfEs9.js → linear-CUVOhgAf.js} +1 -1
  35. package/dist/client/assets/{mermaid.core-DR8bVHgI.js → mermaid.core-DLGUlYka.js} +4 -4
  36. package/dist/client/assets/{mindmap-definition-RKZ34NQL-Cxj-OL1b.js → mindmap-definition-RKZ34NQL-CColHPNe.js} +1 -1
  37. package/dist/client/assets/{pieDiagram-4H26LBE5-ChNT5zpC.js → pieDiagram-4H26LBE5-B8SbTyZ1.js} +1 -1
  38. package/dist/client/assets/{quadrantDiagram-W4KKPZXB-CPmOQ-KN.js → quadrantDiagram-W4KKPZXB-DkIzWjWu.js} +1 -1
  39. package/dist/client/assets/{requirementDiagram-4Y6WPE33-CXE8t7nw.js → requirementDiagram-4Y6WPE33-BHEaInNz.js} +1 -1
  40. package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BenhBMvd.js → sankeyDiagram-5OEKKPKP-CYsOuVp7.js} +1 -1
  41. package/dist/client/assets/{sequenceDiagram-3UESZ5HK-OV846Lsl.js → sequenceDiagram-3UESZ5HK-B-1paLQi.js} +1 -1
  42. package/dist/client/assets/{stateDiagram-AJRCARHV-PTP9-n5W.js → stateDiagram-AJRCARHV-G9D7BJr9.js} +1 -1
  43. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-5AR2x9Ao.js +1 -0
  44. package/dist/client/assets/{timeline-definition-PNZ67QCA-Bl4-GfOm.js → timeline-definition-PNZ67QCA-CaZyu5nx.js} +1 -1
  45. package/dist/client/assets/{vennDiagram-CIIHVFJN-CJ2EqfPX.js → vennDiagram-CIIHVFJN-DEy2nECI.js} +1 -1
  46. package/dist/client/assets/{wardley-L42UT6IY-DFEchjjW.js → wardley-L42UT6IY-B5spvvPY.js} +1 -1
  47. package/dist/client/assets/{wardleyDiagram-YWT4CUSO-6vQBgTJS.js → wardleyDiagram-YWT4CUSO-BMieGPdm.js} +1 -1
  48. package/dist/client/assets/{xychartDiagram-2RQKCTM6-CWyTx1yb.js → xychartDiagram-2RQKCTM6-o8zXiMVH.js} +1 -1
  49. package/dist/client/index.html +1 -1
  50. package/package.json +1 -1
  51. package/src/server/discovery.adapter.ts +23 -18
  52. package/src/server/discovery.test.ts +2 -0
  53. package/src/server/read-models.test.ts +54 -0
  54. package/src/server/read-models.ts +19 -0
  55. package/src/server/ws-router-envelope.ts +4 -0
  56. package/src/server/ws-router.test.ts +29 -26
  57. package/src/shared/types.ts +1 -0
  58. package/dist/client/assets/channel-B1xQiNYc.js +0 -1
  59. package/dist/client/assets/classDiagram-4FO5ZUOK-BipoRb6c.js +0 -1
  60. package/dist/client/assets/classDiagram-v2-Q7XG4LA2-BipoRb6c.js +0 -1
  61. package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Dg5wLSfC.js +0 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <em>Community fork of <a href="https://github.com/jakemor/kanna">jakemor/kanna</a> — kept in sync with upstream and extended with subscription-billing PTY mode, OAuth token pooling, multi-provider chat (Claude + Codex + OpenRouter), subagent orchestration, custom MCP servers, a workflow status panel, durable tool-approval protocol, in-app self-update, and more.</em>
12
+ <em>Subscription-billing PTY mode, OAuth token pooling, multi-provider chat (Claude + Codex + OpenRouter), subagent orchestration, custom MCP servers, a workflow status panel, durable tool-approval protocol, in-app self-update, and more.</em>
13
13
  </p>
14
14
 
15
15
  <p align="center">
@@ -35,11 +35,11 @@
35
35
 
36
36
  <br />
37
37
 
38
- ## About this fork
38
+ ## About Kanna
39
39
 
40
- Kanna started life as [jakemor/kanna](https://github.com/jakemor/kanna) — a clean web UI for the Claude Code CLI. This fork (`@cuongtran001/kanna`) tracks upstream and layers on features needed for heavier day-to-day use, multi-account billing, and self-hosting.
40
+ Kanna (`@cuongtran001/kanna`) is a clean web UI for the Claude Code and Codex CLIs, built for heavier day-to-day use, multi-account billing, and self-hosting.
41
41
 
42
- **Headline additions vs. upstream:**
42
+ **Headline features:**
43
43
 
44
44
  - **Subscription-billing PTY driver** (`KANNA_CLAUDE_DRIVER=pty`) — runs the `claude` CLI under a pseudo-terminal so Pro/Max plans are charged instead of API rates. Parses the on-disk transcript JSONL as the sole event source, with HarnessEvent parity with the SDK driver, a cached per-spawn smoke-test gate, and failure-mode parity.
45
45
  - **OAuth token pool** — register multiple Claude OAuth tokens; Kanna rotates across them per chat with automatic fallover on rate-limit and an explicit disabled state.
@@ -1 +1 @@
1
- import{M as ln,N as an,O as Y,P as O,Q,R as un,S as y,T as tn,V as j,W as _,X as rn,Y as o,Z as on,$ as sn,a0 as fn}from"./mermaid.core-DR8bVHgI.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*u<y))return u=(n*(h-R)-d*(l-v))/u,[l+u*E,h+u*i]}function H(l,h,D,S,v,R,V){var a=l-D,E=h-S,i=(V?R:-R)/j(a*a+E*E),n=i*E,d=-i*a,u=l+n,s=h+d,f=D+n,c=S+d,W=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,A=m*m+g*g,T=v-R,P=u*c-f*s,I=(g<0?-1:1)*j(on(0,T*T*A-P*P)),M=(P*g-m*I)/A,N=(-P*m-g*I)/A,w=(P*g+m*I)/A,p=(-P*m+g*I)/A,x=M-W,e=N-t,r=w-W,X=p-t;return x*x+e*e>r*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(W<an)if(q=pn(Z,$,J,K,F,G,B,C)){var L=Z-q[0],U=$-q[1],k=F-q[0],b=G-q[1],nn=1/O(fn((L*k+U*b)/(j(L*L+U*U)*j(k*k+b*b)))/2),en=j(q[0]*q[0]+q[1]*q[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}I>y?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(Z,$),a.arc(0,0,s,m,g,!t)):a.moveTo(Z,$),!(u>y)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,A,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[Y(d)*n,O(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:Q(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:Q(+n),i):h},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Q(+n),i):D},i.padRadius=function(n){return arguments.length?(S=n==null?null:typeof n=="function"?n:Q(+n),i):S},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:Q(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Q(+n),i):R},i.padAngle=function(n){return arguments.length?(V=typeof n=="function"?n:Q(+n),i):V},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{M as ln,N as an,O as Y,P as O,Q,R as un,S as y,T as tn,V as j,W as _,X as rn,Y as o,Z as on,$ as sn,a0 as fn}from"./mermaid.core-DLGUlYka.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*u<y))return u=(n*(h-R)-d*(l-v))/u,[l+u*E,h+u*i]}function H(l,h,D,S,v,R,V){var a=l-D,E=h-S,i=(V?R:-R)/j(a*a+E*E),n=i*E,d=-i*a,u=l+n,s=h+d,f=D+n,c=S+d,W=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,A=m*m+g*g,T=v-R,P=u*c-f*s,I=(g<0?-1:1)*j(on(0,T*T*A-P*P)),M=(P*g-m*I)/A,N=(-P*m-g*I)/A,w=(P*g+m*I)/A,p=(-P*m+g*I)/A,x=M-W,e=N-t,r=w-W,X=p-t;return x*x+e*e>r*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(W<an)if(q=pn(Z,$,J,K,F,G,B,C)){var L=Z-q[0],U=$-q[1],k=F-q[0],b=G-q[1],nn=1/O(fn((L*k+U*b)/(j(L*L+U*U)*j(k*k+b*b)))/2),en=j(q[0]*q[0]+q[1]*q[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}I>y?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(Z,$),a.arc(0,0,s,m,g,!t)):a.moveTo(Z,$),!(u>y)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,A,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +R.apply(this,arguments))/2-an/2;return[Y(d)*n,O(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:Q(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:Q(+n),i):h},i.cornerRadius=function(n){return arguments.length?(D=typeof n=="function"?n:Q(+n),i):D},i.padRadius=function(n){return arguments.length?(S=n==null?null:typeof n=="function"?n:Q(+n),i):S},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:Q(+n),i):v},i.endAngle=function(n){return arguments.length?(R=typeof n=="function"?n:Q(+n),i):R},i.padAngle=function(n){return arguments.length?(V=typeof n=="function"?n:Q(+n),i):V},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};