@axhub/genie 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/App-BxazfNJn.js +484 -0
- package/dist/assets/{ReviewApp-DOAHmxVe.js → ReviewApp-CsqTAlGU.js} +1 -1
- package/dist/assets/{_basePickBy-CAs6HGVw.js → _basePickBy-CFRQvihx.js} +1 -1
- package/dist/assets/{_baseUniq-qvm36g_v.js → _baseUniq-Dhh8nCvs.js} +1 -1
- package/dist/assets/{arc-60yKSsVt.js → arc-DQ0v3dU4.js} +1 -1
- package/dist/assets/{architectureDiagram-2XIMDMQ5-C5Ik86xM.js → architectureDiagram-2XIMDMQ5-DmUHdvQH.js} +1 -1
- package/dist/assets/{blockDiagram-WCTKOSBZ-CGqfB5z7.js → blockDiagram-WCTKOSBZ-Bbxhj5KC.js} +1 -1
- package/dist/assets/{c4Diagram-IC4MRINW-C02h4qfL.js → c4Diagram-IC4MRINW-BOivDlQU.js} +1 -1
- package/dist/assets/channel-Cj8xVD0X.js +1 -0
- package/dist/assets/{chunk-4BX2VUAB-BVVwu3tU.js → chunk-4BX2VUAB-DlvtrM0q.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-Dyehrd1R.js → chunk-55IACEB6-DJUSHyTa.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-ByEz0wOl.js → chunk-FMBD7UC4-C6Ch-htf.js} +1 -1
- package/dist/assets/{chunk-JSJVCQXG-BXHZvm_e.js → chunk-JSJVCQXG-DzQIht58.js} +1 -1
- package/dist/assets/{chunk-KX2RTZJC-DJPATr22.js → chunk-KX2RTZJC-C05jARMH.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-RgZbucc4.js → chunk-NQ4KR5QH-Ci-n7jfu.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-DMIXCLGh.js → chunk-QZHKN3VN-jxti9HTX.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-Bg4bzqqP.js → chunk-WL4C6EOR-C559Mk71.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-CI2zklxw.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-CI2zklxw.js +1 -0
- package/dist/assets/clone-BEVqubrI.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-BZeDiX7Y.js → cose-bilkent-S5V4N54A-DNO9ncXL.js} +1 -1
- package/dist/assets/{dagre-KLK3FWXG-BrwI_1JI.js → dagre-KLK3FWXG-DJ3dNSYk.js} +1 -1
- package/dist/assets/{diagram-E7M64L7V-CxAlKNFG.js → diagram-E7M64L7V-Ba_LGLun.js} +1 -1
- package/dist/assets/{diagram-IFDJBPK2-VClYIYo3.js → diagram-IFDJBPK2-Da6K4aP-.js} +1 -1
- package/dist/assets/{diagram-P4PSJMXO-CYRL57cP.js → diagram-P4PSJMXO-vZZKB92A.js} +1 -1
- package/dist/assets/{erDiagram-INFDFZHY-ZySJDqNG.js → erDiagram-INFDFZHY-Csb8dFdP.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-Ct9-q2zS.js → flowDiagram-PKNHOUZH-DUV13pHi.js} +1 -1
- package/dist/assets/{ganttDiagram-A5KZAMGK-Qn4VUvVR.js → ganttDiagram-A5KZAMGK-B5Kv9Wfz.js} +1 -1
- package/dist/assets/{gitGraphDiagram-K3NZZRJ6-CaveIlg3.js → gitGraphDiagram-K3NZZRJ6-BZ5gW69I.js} +1 -1
- package/dist/assets/{graph-B1tvcjpq.js → graph-BbvHswRd.js} +1 -1
- package/dist/assets/{highlighted-body-TPN3WLV5-Cx4aCKGT.js → highlighted-body-TPN3WLV5-DZJajMGm.js} +1 -1
- package/dist/assets/{index-Q-dfaLIv.js → index-BiErUGrv.js} +2 -2
- package/dist/assets/{infoDiagram-LFFYTUFH-FNMZEktA.js → infoDiagram-LFFYTUFH-8auUIPKW.js} +1 -1
- package/dist/assets/{ishikawaDiagram-PHBUUO56-D9db2Pov.js → ishikawaDiagram-PHBUUO56-JmsNlo2I.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-BzYKMYOM.js → journeyDiagram-4ABVD52K-Cuudv7Vv.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-qC9Xmf0j.js → kanban-definition-K7BYSVSG-Bappd2YO.js} +1 -1
- package/dist/assets/{layout-dbzqH_4Q.js → layout-BmbfFZKy.js} +1 -1
- package/dist/assets/{linear-HOAktq-3.js → linear-WZnF-PT6.js} +1 -1
- package/dist/assets/{mermaid-O7DHMXV3-CazKksAH.js → mermaid-O7DHMXV3-D-2fQRvw.js} +5 -5
- package/dist/assets/{mindmap-definition-YRQLILUH-DlfKip6Z.js → mindmap-definition-YRQLILUH-BQHnzzud.js} +1 -1
- package/dist/assets/{pieDiagram-SKSYHLDU-BYv9DU8d.js → pieDiagram-SKSYHLDU-uxjlAy1t.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-l21TFCGi.js → quadrantDiagram-337W2JSQ-DpwZU-f_.js} +1 -1
- package/dist/assets/{requirementDiagram-Z7DCOOCP-DwM1YiVc.js → requirementDiagram-Z7DCOOCP-C_9ClOWm.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-DaSSXYkb.js → sankeyDiagram-WA2Y5GQK-2-FHHM-R.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-BPBhAefs.js → sequenceDiagram-2WXFIKYE-egns-0XI.js} +1 -1
- package/dist/assets/{stateDiagram-RAJIS63D-Cs4xILlc.js → stateDiagram-RAJIS63D-DoW8U53H.js} +1 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-BoFZZ4Ds.js +1 -0
- package/dist/assets/{timeline-definition-YZTLITO2-BPnQPJ2R.js → timeline-definition-YZTLITO2-chPa8ppH.js} +1 -1
- package/dist/assets/{treemap-KZPCXAKY-BRWkr5mn.js → treemap-KZPCXAKY-ajdAP-72.js} +1 -1
- package/dist/assets/{vennDiagram-LZ73GAT5-DioBg_XD.js → vennDiagram-LZ73GAT5-C9If0AT0.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-Bh2R2Uzh.js → xychartDiagram-JWTSCODW-DD42U6Or.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +6 -3
- package/server/bin/codex-sdk-wrapper +68 -0
- package/server/bin/codex-sdk-wrapper.cmd +3 -0
- package/server/claude-sdk.js +79 -1
- package/server/index.js +17 -1
- package/server/openai-codex.js +13 -5
- package/server/utils/codexPath.js +29 -6
- package/dist/assets/App-Ddoy7BIl.js +0 -484
- package/dist/assets/channel-B3JUshOm.js +0 -1
- package/dist/assets/classDiagram-VBA2DB6C-DZEYhtwP.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-DZEYhtwP.js +0 -1
- package/dist/assets/clone-B2sPtF_O.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-DeUj7MLk.js +0 -1
package/dist/assets/{xychartDiagram-JWTSCODW-Bh2R2Uzh.js → xychartDiagram-JWTSCODW-DD42U6Or.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as a,s as gi,g as xi,t as Xt,q as di,a as fi,b as pi,l as Nt,N as mi,e as yi,A as bi,K as St,H as Yt,L as Ai,a4 as wi,i as Ci,aN as Si,ac as Wt}from"./mermaid-O7DHMXV3-
|
|
1
|
+
import{_ as a,s as gi,g as xi,t as Xt,q as di,a as fi,b as pi,l as Nt,N as mi,e as yi,A as bi,K as St,H as Yt,L as Ai,a4 as wi,i as Ci,aN as Si,ac as Wt}from"./mermaid-O7DHMXV3-D-2fQRvw.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-WZnF-PT6.js";import"./vendor-react-Cpt6D04s.js";import"./vendor-codemirror-Dz7_EqNA.js";import"./index-BiErUGrv.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function yt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,g,m=!1,p=0,k=0,v=.5;delete e.unknown;function C(){var b=t().length,E=n<s,D=E?n:s,P=E?s:n;o=(P-D)/Math.max(1,b-p+k*2),m&&(o=Math.floor(o)),D+=(P-D-o*(b-p))*v,g=o*(1-p),m&&(D=Math.round(D),g=Math.round(g));var I=Ri(b).map(function(y){return D+o*y});return i(E?I.reverse():I)}return e.domain=function(b){return arguments.length?(t(b),C()):t()},e.range=function(b){return arguments.length?([s,n]=b,s=+s,n=+n,C()):[s,n]},e.rangeRound=function(b){return[s,n]=b,s=+s,n=+n,m=!0,C()},e.bandwidth=function(){return g},e.step=function(){return o},e.round=function(b){return arguments.length?(m=!!b,C()):m},e.padding=function(b){return arguments.length?(p=Math.min(1,k=+b),C()):p},e.paddingInner=function(b){return arguments.length?(p=Math.min(1,b),C()):p},e.paddingOuter=function(b){return arguments.length?(k=+b,C()):k},e.align=function(b){return arguments.length?(v=Math.max(0,Math.min(1,b)),C()):v},e.copy=function(){return yt(t(),[s,n]).round(m).paddingInner(p).paddingOuter(k).align(v)},_i.apply(C(),arguments)}var bt=function(){var e=a(function(O,h,u,x){for(u=u||{},x=O.length;x--;u[O[x]]=h);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],g=[1,7],m=[1,5,10,12,14,16,18,19,21,23,34,35,36],p=[1,25],k=[1,26],v=[1,28],C=[1,29],b=[1,30],E=[1,31],D=[1,32],P=[1,33],I=[1,34],y=[1,35],_=[1,36],c=[1,37],W=[1,43],z=[1,42],U=[1,47],X=[1,50],l=[1,10,12,14,16,18,19,21,23,34,35,36],L=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],R=[1,64],$={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,u,x,d,w,r,at){var f=r.length-1;switch(w){case 5:d.setOrientation(r[f]);break;case 9:d.setDiagramTitle(r[f].text.trim());break;case 12:d.setLineData({text:"",type:"text"},r[f]);break;case 13:d.setLineData(r[f-1],r[f]);break;case 14:d.setBarData({text:"",type:"text"},r[f]);break;case 15:d.setBarData(r[f-1],r[f]);break;case 16:this.$=r[f].trim(),d.setAccTitle(this.$);break;case 17:case 18:this.$=r[f].trim(),d.setAccDescription(this.$);break;case 19:this.$=r[f-1];break;case 20:this.$=[Number(r[f-2]),...r[f]];break;case 21:this.$=[Number(r[f])];break;case 22:d.setXAxisTitle(r[f]);break;case 23:d.setXAxisTitle(r[f-1]);break;case 24:d.setXAxisTitle({type:"text",text:""});break;case 25:d.setXAxisBand(r[f]);break;case 26:d.setXAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 27:this.$=r[f-1];break;case 28:this.$=[r[f-2],...r[f]];break;case 29:this.$=[r[f]];break;case 30:d.setYAxisTitle(r[f]);break;case 31:d.setYAxisTitle(r[f-1]);break;case 32:d.setYAxisTitle({type:"text",text:""});break;case 33:d.setYAxisRangeData(Number(r[f-2]),Number(r[f]));break;case 37:this.$={text:r[f],type:"text"};break;case 38:this.$={text:r[f],type:"text"};break;case 39:this.$={text:r[f],type:"markdown"};break;case 40:this.$=r[f];break;case 41:this.$=r[f-1]+""+r[f];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:g}),{1:[2,3]},e(m,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:g}),{11:23,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:39,13:38,24:W,27:z,29:40,30:41,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:45,15:44,27:U,33:46,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:49,17:48,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{11:52,17:51,24:X,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},{20:[1,53]},{22:[1,54]},e(l,[2,18]),{1:[2,2]},e(l,[2,8]),e(l,[2,9]),e(L,[2,37],{40:55,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c}),e(L,[2,38]),e(L,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(l,[2,10]),e(l,[2,22],{30:41,29:56,24:W,27:z}),e(l,[2,24]),e(l,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,11]),e(l,[2,30],{33:60,27:U}),e(l,[2,32]),{31:[1,61]},e(l,[2,12]),{17:62,24:X},{25:63,27:R},e(l,[2,14]),{17:65,24:X},e(l,[2,16]),e(l,[2,17]),e(S,[2,41]),e(l,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(l,[2,31]),{27:[1,69]},e(l,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(l,[2,15]),e(l,[2,26]),e(l,[2,27]),{11:59,32:72,37:24,38:p,39:k,40:27,41:v,42:C,43:b,44:E,45:D,46:P,47:I,48:y,49:_,50:c},e(l,[2,33]),e(l,[2,19]),{25:73,27:R},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,u){if(u.recoverable)this.trace(h);else{var x=new Error(h);throw x.hash=u,x}},"parseError"),parse:a(function(h){var u=this,x=[0],d=[],w=[null],r=[],at=this.table,f="",lt=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),T=Object.create(this.lexer),Y={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(Y.yy[dt]=this.yy[dt]);T.setInput(h,Y.yy),Y.yy.lexer=T,Y.yy.parser=this,typeof T.yylloc>"u"&&(T.yylloc={});var ft=T.yylloc;r.push(ft);var ci=T.options&&T.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(V){x.length=x.length-2*V,w.length=w.length-V,r.length=r.length-V}a(ui,"popStack");function Vt(){var V;return V=d.pop()||T.lex()||Mt,typeof V!="number"&&(V instanceof Array&&(d=V,V=d.pop()),V=u.symbols_[V]||V),V}a(Vt,"lex");for(var M,H,B,pt,q={},ct,F,Bt,ut;;){if(H=x[x.length-1],this.defaultActions[H]?B=this.defaultActions[H]:((M===null||typeof M>"u")&&(M=Vt()),B=at[H]&&at[H][M]),typeof B>"u"||!B.length||!B[0]){var mt="";ut=[];for(ct in at[H])this.terminals_[ct]&&ct>hi&&ut.push("'"+this.terminals_[ct]+"'");T.showPosition?mt="Parse error on line "+(lt+1)+`:
|
|
2
2
|
`+T.showPosition()+`
|
|
3
3
|
Expecting `+ut.join(", ")+", got '"+(this.terminals_[M]||M)+"'":mt="Parse error on line "+(lt+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(mt,{text:T.match,token:this.terminals_[M]||M,line:T.yylineno,loc:ft,expected:ut})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+H+", token: "+M);switch(B[0]){case 1:x.push(M),w.push(T.yytext),r.push(T.yylloc),x.push(B[1]),M=null,It=T.yyleng,f=T.yytext,lt=T.yylineno,ft=T.yylloc;break;case 2:if(F=this.productions_[B[1]][1],q.$=w[w.length-F],q._$={first_line:r[r.length-(F||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(F||1)].first_column,last_column:r[r.length-1].last_column},ci&&(q._$.range=[r[r.length-(F||1)].range[0],r[r.length-1].range[1]]),pt=this.performAction.apply(q,[f,It,lt,Y.yy,B[1],w,r].concat(li)),typeof pt<"u")return pt;F&&(x=x.slice(0,-1*F*2),w=w.slice(0,-1*F),r=r.slice(0,-1*F)),x.push(this.productions_[B[1]][0]),w.push(q.$),r.push(q._$),Bt=at[x[x.length-2]][x[x.length-1]],x.push(Bt);break;case 3:return!0}}return!0},"parse")},Et=function(){var O={EOF:1,parseError:a(function(u,x){if(this.yy.parser)this.yy.parser.parseError(u,x);else throw new Error(u)},"parseError"),setInput:a(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.match(/(?:\r\n?|\n).*/g);return u?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var u=h.length,x=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===d.length?this.yylloc.first_column:0)+d[d.length-x.length].length-x[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/dist/index.html
CHANGED
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
window.__clearLegacyOfflineState__();
|
|
57
57
|
</script>
|
|
58
|
-
<script type="module" crossorigin src="/assets/index-
|
|
58
|
+
<script type="module" crossorigin src="/assets/index-BiErUGrv.js"></script>
|
|
59
59
|
<link rel="modulepreload" crossorigin href="/assets/vendor-react-Cpt6D04s.js">
|
|
60
60
|
<link rel="modulepreload" crossorigin href="/assets/vendor-codemirror-Dz7_EqNA.js">
|
|
61
61
|
<link rel="stylesheet" crossorigin href="/assets/index-BFX9lxRB.css">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axhub/genie",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "A proxy for Claude Code, Codex, Gemini, and OpenCode services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server/index.js",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"files": [
|
|
14
14
|
"server/**/*.js",
|
|
15
|
+
"server/bin/codex-sdk-wrapper",
|
|
16
|
+
"server/bin/codex-sdk-wrapper.cmd",
|
|
15
17
|
"shared/",
|
|
16
18
|
"dist/",
|
|
17
19
|
"README.md"
|
|
@@ -23,6 +25,7 @@
|
|
|
23
25
|
"docs:build": "node scripts/generate-api-docs.mjs",
|
|
24
26
|
"docs:check": "node scripts/generate-api-docs.mjs --check",
|
|
25
27
|
"test:open-api": "node scripts/test-open-api.mjs",
|
|
28
|
+
"test:release-package": "node scripts/test-release-package.mjs",
|
|
26
29
|
"prebuild": "npm run docs:build",
|
|
27
30
|
"build": "vite build",
|
|
28
31
|
"preview": "vite preview",
|
|
@@ -39,7 +42,7 @@
|
|
|
39
42
|
],
|
|
40
43
|
"license": "GPL-3.0",
|
|
41
44
|
"dependencies": {
|
|
42
|
-
"@anthropic-ai/claude-agent-sdk": "
|
|
45
|
+
"@anthropic-ai/claude-agent-sdk": "0.1.29",
|
|
43
46
|
"@assistant-ui/react": "^0.12.17",
|
|
44
47
|
"@assistant-ui/react-streamdown": "^0.1.5",
|
|
45
48
|
"@codemirror/lang-css": "^6.3.1",
|
|
@@ -115,4 +118,4 @@
|
|
|
115
118
|
"typescript": "^5.9.3",
|
|
116
119
|
"vite": "^7.0.4"
|
|
117
120
|
}
|
|
118
|
-
}
|
|
121
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
set -eu
|
|
4
|
+
|
|
5
|
+
SCRIPT_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
|
|
6
|
+
ROOT_DIR=$(CDPATH= cd -- "$SCRIPT_DIR/../.." && pwd)
|
|
7
|
+
|
|
8
|
+
platform=$(uname -s)
|
|
9
|
+
arch=$(uname -m)
|
|
10
|
+
|
|
11
|
+
case "$platform:$arch" in
|
|
12
|
+
Darwin:arm64)
|
|
13
|
+
target_triple="aarch64-apple-darwin"
|
|
14
|
+
;;
|
|
15
|
+
Darwin:x86_64)
|
|
16
|
+
target_triple="x86_64-apple-darwin"
|
|
17
|
+
;;
|
|
18
|
+
Linux:arm64|Linux:aarch64)
|
|
19
|
+
target_triple="aarch64-unknown-linux-musl"
|
|
20
|
+
;;
|
|
21
|
+
Linux:x86_64)
|
|
22
|
+
target_triple="x86_64-unknown-linux-musl"
|
|
23
|
+
;;
|
|
24
|
+
*)
|
|
25
|
+
echo "Unsupported Codex platform: $platform ($arch)" >&2
|
|
26
|
+
exit 1
|
|
27
|
+
;;
|
|
28
|
+
esac
|
|
29
|
+
|
|
30
|
+
codex_bin="$ROOT_DIR/node_modules/@openai/codex-sdk/vendor/$target_triple/codex/codex"
|
|
31
|
+
|
|
32
|
+
has_config_override() {
|
|
33
|
+
key="$1"
|
|
34
|
+
shift
|
|
35
|
+
expect_value=0
|
|
36
|
+
|
|
37
|
+
for arg in "$@"; do
|
|
38
|
+
if [ "$expect_value" -eq 1 ]; then
|
|
39
|
+
case "$arg" in
|
|
40
|
+
"$key="*)
|
|
41
|
+
return 0
|
|
42
|
+
;;
|
|
43
|
+
esac
|
|
44
|
+
expect_value=0
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
case "$arg" in
|
|
48
|
+
--config)
|
|
49
|
+
expect_value=1
|
|
50
|
+
;;
|
|
51
|
+
--config="$key="*)
|
|
52
|
+
return 0
|
|
53
|
+
;;
|
|
54
|
+
esac
|
|
55
|
+
done
|
|
56
|
+
|
|
57
|
+
return 1
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if ! has_config_override "ghost_snapshot.ignore_large_untracked_dirs" "$@"; then
|
|
61
|
+
set -- "$@" --config "ghost_snapshot.ignore_large_untracked_dirs=1000"
|
|
62
|
+
fi
|
|
63
|
+
|
|
64
|
+
if ! has_config_override "ghost_snapshot.ignore_large_untracked_files" "$@"; then
|
|
65
|
+
set -- "$@" --config "ghost_snapshot.ignore_large_untracked_files=104857600"
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
exec "$codex_bin" "$@"
|
package/server/claude-sdk.js
CHANGED
|
@@ -222,6 +222,43 @@ function mapCliOptionsToSDK(options = {}) {
|
|
|
222
222
|
return sdkOptions;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
async function loadClaudeSettingsEnv() {
|
|
226
|
+
try {
|
|
227
|
+
const settingsPath = path.join(os.homedir(), '.claude', 'settings.json');
|
|
228
|
+
const content = await fs.readFile(settingsPath, 'utf8');
|
|
229
|
+
const parsed = JSON.parse(content);
|
|
230
|
+
const env = parsed?.env;
|
|
231
|
+
|
|
232
|
+
if (!env || typeof env !== 'object' || Array.isArray(env)) {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
const sanitizedEnv = {};
|
|
237
|
+
for (const [key, value] of Object.entries(env)) {
|
|
238
|
+
if (value !== undefined && value !== null) {
|
|
239
|
+
sanitizedEnv[key] = String(value);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
return Object.keys(sanitizedEnv).length > 0 ? sanitizedEnv : null;
|
|
244
|
+
} catch {
|
|
245
|
+
return null;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
function getDisabledClaudeSdkMcpServers() {
|
|
250
|
+
const configured = typeof process.env.CLAUDE_SDK_DISABLED_MCP_SERVERS === 'string'
|
|
251
|
+
? process.env.CLAUDE_SDK_DISABLED_MCP_SERVERS
|
|
252
|
+
: 'pencil';
|
|
253
|
+
|
|
254
|
+
return new Set(
|
|
255
|
+
configured
|
|
256
|
+
.split(',')
|
|
257
|
+
.map((value) => value.trim())
|
|
258
|
+
.filter(Boolean)
|
|
259
|
+
);
|
|
260
|
+
}
|
|
261
|
+
|
|
225
262
|
/**
|
|
226
263
|
* Adds a session to the active sessions map
|
|
227
264
|
* @param {string} sessionId - Session identifier
|
|
@@ -497,6 +534,20 @@ async function loadMcpConfig(cwd) {
|
|
|
497
534
|
return null;
|
|
498
535
|
}
|
|
499
536
|
|
|
537
|
+
const disabledServers = getDisabledClaudeSdkMcpServers();
|
|
538
|
+
if (disabledServers.size > 0) {
|
|
539
|
+
for (const serverName of Object.keys(mcpServers)) {
|
|
540
|
+
if (disabledServers.has(serverName)) {
|
|
541
|
+
delete mcpServers[serverName];
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
if (Object.keys(mcpServers).length === 0) {
|
|
547
|
+
console.log('All configured MCP servers were filtered for Claude SDK runs');
|
|
548
|
+
return null;
|
|
549
|
+
}
|
|
550
|
+
|
|
500
551
|
console.log(`Total MCP servers loaded: ${Object.keys(mcpServers).length}`);
|
|
501
552
|
return mcpServers;
|
|
502
553
|
} catch (error) {
|
|
@@ -597,10 +648,19 @@ async function queryClaudeSDK(command, options = {}, ws) {
|
|
|
597
648
|
// Map CLI options to SDK format
|
|
598
649
|
const sdkOptions = mapCliOptionsToSDK(effectiveOptions);
|
|
599
650
|
|
|
651
|
+
const claudeSettingsEnv = await loadClaudeSettingsEnv();
|
|
652
|
+
if (claudeSettingsEnv) {
|
|
653
|
+
sdkOptions.env = {
|
|
654
|
+
...claudeSettingsEnv,
|
|
655
|
+
...process.env
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
|
|
600
659
|
// Load MCP configuration
|
|
601
660
|
const mcpServers = await loadMcpConfig(effectiveOptions.cwd);
|
|
602
661
|
if (mcpServers) {
|
|
603
662
|
sdkOptions.mcpServers = mcpServers;
|
|
663
|
+
sdkOptions.strictMcpConfig = true;
|
|
604
664
|
}
|
|
605
665
|
|
|
606
666
|
// Handle images - save to temp files and modify prompt
|
|
@@ -800,10 +860,28 @@ async function queryClaudeSDK(command, options = {}, ws) {
|
|
|
800
860
|
// Clean up temporary image files on error
|
|
801
861
|
await cleanupTempFiles(tempImagePaths, tempDir);
|
|
802
862
|
|
|
863
|
+
// Provide actionable diagnostics for EBADF spawn failures.
|
|
864
|
+
// This error is a known issue on macOS with Node.js v22+ where
|
|
865
|
+
// child_process.spawn fails due to invalid inherited file descriptors,
|
|
866
|
+
// especially when running via npx or in nested process contexts.
|
|
867
|
+
let userFacingError = timeoutErrorMessage || error.message;
|
|
868
|
+
if (error.code === 'EBADF' && error.syscall === 'spawn') {
|
|
869
|
+
const nodeVersion = process.version;
|
|
870
|
+
const platform = `${process.platform}/${process.arch}`;
|
|
871
|
+
userFacingError =
|
|
872
|
+
`Claude process failed to start (spawn EBADF). ` +
|
|
873
|
+
`This is a known issue on macOS with Node.js v22+. ` +
|
|
874
|
+
`Current environment: Node ${nodeVersion}, ${platform}. ` +
|
|
875
|
+
`Possible fixes: (1) Downgrade to Node.js v20 LTS, ` +
|
|
876
|
+
`(2) Restart the application, ` +
|
|
877
|
+
`(3) Run with 'node server/index.js' instead of npx.`;
|
|
878
|
+
console.error('[EBADF] Spawn failure diagnostic:', userFacingError);
|
|
879
|
+
}
|
|
880
|
+
|
|
803
881
|
// Send error to WebSocket
|
|
804
882
|
ws.send({
|
|
805
883
|
type: 'claude-error',
|
|
806
|
-
error:
|
|
884
|
+
error: userFacingError,
|
|
807
885
|
provider: 'claude',
|
|
808
886
|
sessionId: capturedSessionId || sessionId || null
|
|
809
887
|
});
|
package/server/index.js
CHANGED
|
@@ -83,7 +83,16 @@ import http from 'http';
|
|
|
83
83
|
import cors from 'cors';
|
|
84
84
|
import { promises as fsPromises } from 'fs';
|
|
85
85
|
import { spawn } from 'child_process';
|
|
86
|
-
|
|
86
|
+
// node-pty is lazy-loaded to avoid native module fd manipulation at startup.
|
|
87
|
+
// Eagerly importing it can corrupt the file descriptor table in npx contexts,
|
|
88
|
+
// causing subsequent spawn() calls (e.g. Claude SDK) to fail with EBADF.
|
|
89
|
+
let _pty = null;
|
|
90
|
+
async function getPty() {
|
|
91
|
+
if (!_pty) {
|
|
92
|
+
_pty = (await import('node-pty')).default;
|
|
93
|
+
}
|
|
94
|
+
return _pty;
|
|
95
|
+
}
|
|
87
96
|
import fetch from 'node-fetch';
|
|
88
97
|
import mime from 'mime-types';
|
|
89
98
|
|
|
@@ -258,6 +267,7 @@ async function setupProjectsWatcher() {
|
|
|
258
267
|
const claudeProjectsPath = path.join(os.homedir(), '.claude', 'projects');
|
|
259
268
|
const codexSessionsPath = path.join(os.homedir(), '.codex', 'sessions');
|
|
260
269
|
const watchRoots = [claudeProjectsPath, codexSessionsPath];
|
|
270
|
+
const shouldUsePollingWatcher = process.platform === 'darwin';
|
|
261
271
|
|
|
262
272
|
if (projectsWatcher) {
|
|
263
273
|
projectsWatcher.close();
|
|
@@ -279,6 +289,11 @@ async function setupProjectsWatcher() {
|
|
|
279
289
|
ignoreInitial: true, // Don't fire events for existing files on startup
|
|
280
290
|
followSymlinks: false,
|
|
281
291
|
depth: 10, // Reasonable depth limit
|
|
292
|
+
// On macOS, native watching on these session directories can corrupt
|
|
293
|
+
// later child_process.spawn calls and surface as EBADF across providers.
|
|
294
|
+
// Polling avoids the bad watcher backend while keeping session refreshes.
|
|
295
|
+
usePolling: shouldUsePollingWatcher,
|
|
296
|
+
interval: shouldUsePollingWatcher ? 500 : undefined,
|
|
282
297
|
awaitWriteFinish: {
|
|
283
298
|
stabilityThreshold: 100, // Wait 100ms for file to stabilize
|
|
284
299
|
pollInterval: 50
|
|
@@ -1343,6 +1358,7 @@ function handleShellConnection(ws) {
|
|
|
1343
1358
|
const termRows = data.rows || 24;
|
|
1344
1359
|
console.log('📐 Using terminal dimensions:', termCols, 'x', termRows);
|
|
1345
1360
|
|
|
1361
|
+
const pty = await getPty();
|
|
1346
1362
|
shellProcess = pty.spawn(shell, shellArgs, {
|
|
1347
1363
|
name: 'xterm-256color',
|
|
1348
1364
|
cols: termCols,
|
package/server/openai-codex.js
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import { Codex } from '@openai/codex-sdk';
|
|
17
17
|
import { parseCodexTurnUsage } from './utils/codexTokenUsage.js';
|
|
18
|
-
import { getCodexPathOverride } from './utils/codexPath.js';
|
|
18
|
+
import { getCodexPathOverride, getCodexProcessEnv } from './utils/codexPath.js';
|
|
19
19
|
import { cleanupMaterializedImages, materializeImagesToTempFiles } from './utils/agentImages.js';
|
|
20
20
|
import { resolveWorkingDirectory } from './utils/defaultWorkingDirectory.js';
|
|
21
21
|
|
|
@@ -363,7 +363,8 @@ export async function queryCodex(command, options = {}, ws) {
|
|
|
363
363
|
try {
|
|
364
364
|
// Initialize Codex SDK
|
|
365
365
|
codex = new Codex({
|
|
366
|
-
codexPathOverride: getCodexPathOverride()
|
|
366
|
+
codexPathOverride: getCodexPathOverride(),
|
|
367
|
+
env: getCodexProcessEnv()
|
|
367
368
|
});
|
|
368
369
|
|
|
369
370
|
// Thread options with sandbox and approval settings
|
|
@@ -669,11 +670,18 @@ export function getActiveCodexSessions() {
|
|
|
669
670
|
*/
|
|
670
671
|
function sendMessage(ws, data) {
|
|
671
672
|
try {
|
|
672
|
-
|
|
673
|
-
|
|
673
|
+
const isStructuredWriter = !!(
|
|
674
|
+
ws?.isSSEStreamWriter ||
|
|
675
|
+
ws?.isWebSocketWriter ||
|
|
676
|
+
typeof ws?.setSessionId === 'function' ||
|
|
677
|
+
typeof ws?.getSessionId === 'function'
|
|
678
|
+
);
|
|
679
|
+
|
|
680
|
+
if (isStructuredWriter) {
|
|
681
|
+
// Internal writers expect plain objects and handle serialization themselves.
|
|
674
682
|
ws.send(data);
|
|
675
683
|
} else if (typeof ws.send === 'function') {
|
|
676
|
-
// Raw WebSocket
|
|
684
|
+
// Raw WebSocket clients expect a serialized payload.
|
|
677
685
|
ws.send(JSON.stringify(data));
|
|
678
686
|
}
|
|
679
687
|
} catch (error) {
|
|
@@ -4,6 +4,16 @@ import { fileURLToPath } from 'url';
|
|
|
4
4
|
const __filename = fileURLToPath(import.meta.url);
|
|
5
5
|
const __dirname = path.dirname(__filename);
|
|
6
6
|
|
|
7
|
+
function getCodexSdkRoot() {
|
|
8
|
+
try {
|
|
9
|
+
const sdkEntryUrl = import.meta.resolve('@openai/codex-sdk');
|
|
10
|
+
const sdkEntryPath = fileURLToPath(sdkEntryUrl);
|
|
11
|
+
return path.resolve(path.dirname(sdkEntryPath), '..');
|
|
12
|
+
} catch {
|
|
13
|
+
return path.join(__dirname, '..', '..', 'node_modules', '@openai', 'codex-sdk');
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
7
17
|
export function getBundledCodexPath() {
|
|
8
18
|
const { platform, arch } = process;
|
|
9
19
|
let targetTriple = null;
|
|
@@ -25,12 +35,7 @@ export function getBundledCodexPath() {
|
|
|
25
35
|
|
|
26
36
|
const binaryName = platform === 'win32' ? 'codex.exe' : 'codex';
|
|
27
37
|
return path.join(
|
|
28
|
-
|
|
29
|
-
'..',
|
|
30
|
-
'..',
|
|
31
|
-
'node_modules',
|
|
32
|
-
'@openai',
|
|
33
|
-
'codex-sdk',
|
|
38
|
+
getCodexSdkRoot(),
|
|
34
39
|
'vendor',
|
|
35
40
|
targetTriple,
|
|
36
41
|
'codex',
|
|
@@ -45,3 +50,21 @@ export function getCodexPathOverride() {
|
|
|
45
50
|
|
|
46
51
|
return path.join(__dirname, '..', 'bin', 'codex-sdk-wrapper.js');
|
|
47
52
|
}
|
|
53
|
+
|
|
54
|
+
export function getCodexProcessEnv(baseEnv = process.env) {
|
|
55
|
+
const env = {};
|
|
56
|
+
|
|
57
|
+
for (const [key, value] of Object.entries(baseEnv || {})) {
|
|
58
|
+
if (value !== undefined) {
|
|
59
|
+
env[key] = value;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Hosted Node environments can leak IPC-related variables into children.
|
|
64
|
+
// If a Node-based helper inherits them, startup may fail with EBADF.
|
|
65
|
+
delete env.NODE_CHANNEL_FD;
|
|
66
|
+
delete env.NODE_UNIQUE_ID;
|
|
67
|
+
delete env.ELECTRON_RUN_AS_NODE;
|
|
68
|
+
|
|
69
|
+
return env;
|
|
70
|
+
}
|