@guanghechen/kit-copilot 0.4.6 → 0.6.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/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # @guanghechen/kit-copilot
2
+
3
+ GitHub Copilot proxy server for `Claude`, `Codex`, and `Gemini` compatible endpoints.
4
+
5
+ ## Environment Model
6
+
7
+ `kit-copilot` follows a strict environment flow:
8
+
9
+ 1. CLI entry passes `process.env` to `@guanghechen/commander/node`.
10
+ 2. Commander merges user envs with preset envs into `ctx.envs`.
11
+ 3. Runtime logic consumes `ctx.envs` only.
12
+
13
+ There is no runtime fallback from business logic to global `process.env` for critical keys such as:
14
+
15
+ - `GH_PRIMARY_TOKEN`
16
+ - `COPILOT_MODEL_REFRESH_SEC`
17
+
18
+ ## Preset Root And `.env.local`
19
+
20
+ Preset root:
21
+
22
+ - `$XDG_CONFIG_HOME/kit/copilot` when `XDG_CONFIG_HOME` is set
23
+ - `~/.config/kit/copilot` otherwise
24
+
25
+ Default preset env file:
26
+
27
+ - `<preset-root>/.env.local`
28
+
29
+ The file is loaded by commander preset logic and merged into `ctx.envs`.
30
+
31
+ ## Token Persistence
32
+
33
+ `kit-copilot auth` persists `GH_PRIMARY_TOKEN` to preset env storage.
34
+
35
+ - Persist target: `<preset-root>/.env.local`
36
+ - `GH_COPILOT_TOKEN` is not persisted
37
+
38
+ ## Examples
39
+
40
+ ```bash
41
+ kit-copilot auth
42
+ kit-copilot start --port=4141
43
+ ```
44
+
45
+ With preset env file:
46
+
47
+ ```dotenv
48
+ GH_PRIMARY_TOKEN=ghu_xxx
49
+ COPILOT_MODEL_REFRESH_SEC=300
50
+ ```
package/lib/esm/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x56328b,_0x209ad2){const _0x514793={_0x2985ad:0x276,_0x3cd03f:0x262,_0x38826f:'y(m@',_0x4eac51:0x267,_0x1c34bf:0x26c,_0x4f59d0:0x25c,_0x5622f5:0x12d,_0x571e95:0x12a,_0x11a7fb:')]eZ',_0x1406ec:0x25b,_0x26bc66:0x23e,_0x4d1ef9:0x254,_0x351c11:'89]3',_0x3857b2:0x27a,_0x31babf:0x26b,_0x8c805c:0x266,_0x4f29b3:0x153,_0x57342f:0x133,_0x5d48c4:'Y#K@',_0x2faf8c:0x144,_0x3b3a04:'%BbG',_0x4756f6:'tTgI',_0x5710f6:0x244,_0x2bff48:0x256,_0x3c7e98:0x123,_0x1c4347:0x121,_0x2b00fe:0x112,_0x4df952:'[JWH'},_0x29024a={_0x322799:0x9f},_0x18740e={_0x487fd2:0x1c3};function _0x499662(_0x4971b8,_0x4f98fe,_0x468e34,_0x177933){return _0x1745(_0x177933-_0x18740e._0x487fd2,_0x4971b8);}const _0x512d5d=_0x56328b();function _0x5273e1(_0x2dbdb6,_0x533a3d,_0x56cc58,_0x3f1d4f){return _0x1745(_0x2dbdb6-_0x29024a._0x322799,_0x3f1d4f);}while(!![]){try{const _0x4dbcbd=parseInt(_0x499662(')]eZ',0x272,_0x514793._0x2985ad,_0x514793._0x3cd03f))/(-0xafc+-0x15cd*0x1+0x577*0x6)+-parseInt(_0x499662(_0x514793._0x38826f,_0x514793._0x4eac51,_0x514793._0x1c34bf,_0x514793._0x4f59d0))/(0x116e+-0x20a0+0xf34)+-parseInt(_0x5273e1(_0x514793._0x5622f5,0x11b,_0x514793._0x571e95,'wVLR'))/(-0x1*-0x205e+0x1*0xee1+-0x2f3c)+-parseInt(_0x499662(_0x514793._0x11a7fb,_0x514793._0x1406ec,_0x514793._0x26bc66,_0x514793._0x4d1ef9))/(-0x1bb0+-0x15c+0x1e*0xf8)+-parseInt(_0x499662(_0x514793._0x351c11,_0x514793._0x3857b2,_0x514793._0x31babf,_0x514793._0x8c805c))/(-0x4b*0x55+-0x1*-0x1c+0x18d0)+-parseInt(_0x5273e1(0x14a,_0x514793._0x4f29b3,_0x514793._0x57342f,_0x514793._0x5d48c4))/(0x18ea+-0xd*0x22+-0x172a)*(-parseInt(_0x5273e1(0x12e,0x13a,_0x514793._0x2faf8c,_0x514793._0x3b3a04))/(0x1658+-0x59+-0x15f8))+parseInt(_0x499662(_0x514793._0x4756f6,_0x514793._0x5710f6,_0x514793._0x2bff48,0x25a))/(-0x1661+0x5*0x6d8+0xbcf*-0x1)*(parseInt(_0x5273e1(_0x514793._0x3c7e98,_0x514793._0x1c4347,_0x514793._0x2b00fe,_0x514793._0x4df952))/(-0x1ff4+-0x2*0x30d+-0xc7*-0x31));if(_0x4dbcbd===_0x209ad2)break;else _0x512d5d['push'](_0x512d5d['shift']());}catch(_0x3c071c){_0x512d5d['push'](_0x512d5d['shift']());}}}(_0x1f49,0x5e4*-0x76+0xaaf7a+-0x12b9f));import{CompletionCommand}from'@guanghechen/commander';import{Reporter}from'@guanghechen/reporter';import{a as _0x182635,C as _0x25df53}from'./command-BchMPCk5.mjs';import'node:module';function _0x15b450(_0x374b88,_0x499bd9,_0x532804,_0xb47a6c){const _0xc7fd75={_0x3c8e75:0x7d};return _0x1745(_0xb47a6c- -_0xc7fd75._0x3c8e75,_0x374b88);}function _0x45a492(_0x2f743e,_0x4a8831,_0x5f16e4,_0x2e9a66){return _0x1745(_0x2e9a66-0x13f,_0x5f16e4);}import'node:os';import'node:http';import'node:fs';import'node:fs/promises';import'node:path';import'node:child_process';import'@hono/node-server';function _0x1f49(){const _0x1dfeb2=['W5LBWOZcV287WQldLW','WQbXaGaoW4ZdNeNcPJSVW6e','W5/dUa3dQeuNW7BcVSkalYbIwq','WO/dTCodv1u','WQpcG8kxW53cOG','CJvyW7RcPa','sCkcWRGabG','DrFcH8ojWQ8','W5VdLdizWQNdN2FdHujuW57dLdi','WOhdVSkotmkv','W7XBWQlcVc8Hs8kkfYKLpCoy','WOtdUCodtbS','h8oqiv8N','WQart0BdIG','B8koCSoTWRi','W7RdIKldIa','W5/dUa7dOKmMWOZcJCkceYDy','WONcOJ93rW','bI0zWRG','W5/dO0i1WOW','W5pcOmkjeqrYW7fUWP8HhSoxlq','WQr0aqqhW43cPxFcSIeIW7ddTq','ix7dNa7dKa','Fmkiz8kI','a1hdKCoeW40','WQ8mW6ldPtG','zCoJuCo5bq','WRZdHG49iG','bSoVCZaVfYJcHcLqqmoh','hvBdJmolWPe','kwBdR2xdJG','DtRcJftcJIGvzwiXWQ5VW4S','tNupaCkm','j2xdMbhdKG','auxdIW','hCkLW5STkq','W4mTWR7dOSou','nMfiW7tcNSoce10','W5hcUX8+W4W','WQ3dHGWT','btadWR8C','W47cQaK','rWxdGCokW7FcNt7dQq','p3JdTgNdMq','iSkkE8o0dG','qqFcKmkuWORdMHldSSoHyG3dTW','WQzZaaqkW4NcOw7cKcWmW77dVa','BGBcHmkAW5ZdOmkBnwi8cmkLzG'];_0x1f49=function(){return _0x1dfeb2;};return _0x1f49();}import'hono';import'hono/cors';import'uuid';import'zod';import'hono/streaming';import'node:url';import'node:worker_threads';function _0x1745(_0x8b0958,_0x283d69){_0x8b0958=_0x8b0958-(-0xcd+0x2418+-0x22ce);const _0x10821d=_0x1f49();let _0x3c4789=_0x10821d[_0x8b0958];if(_0x1745['IpLFBz']===undefined){var _0x288100=function(_0x3e2952){const _0x4c26b8='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x179885='',_0x1c0fae='';for(let _0x56328b=0x2f7*0x7+0x12d8+0x3*-0xd33,_0x209ad2,_0x512d5d,_0x4dbcbd=-0x57*-0x51+-0x27*-0x3e+-0x24f9;_0x512d5d=_0x3e2952['charAt'](_0x4dbcbd++);~_0x512d5d&&(_0x209ad2=_0x56328b%(0x6e5+0x18ee+-0x1fcf)?_0x209ad2*(-0x2697+-0x15b*-0xd+0xe*0x184)+_0x512d5d:_0x512d5d,_0x56328b++%(-0x1*0x219b+-0x7e4+0x1*0x2983))?_0x179885+=String['fromCharCode'](-0x1f26+-0xc49+0x2c6e&_0x209ad2>>(-(0x8b*-0x25+-0x29b+0x16b4)*_0x56328b&0xc17+-0x23c3+0x17b2)):0x22e1+-0x2162+-0x17f){_0x512d5d=_0x4c26b8['indexOf'](_0x512d5d);}for(let _0x3c071c=-0xbb2+0xe81*0x2+-0x2*0x8a8,_0x22cf40=_0x179885['length'];_0x3c071c<_0x22cf40;_0x3c071c++){_0x1c0fae+='%'+('00'+_0x179885['charCodeAt'](_0x3c071c)['toString'](0xa*-0x29d+0x61c+-0x2*-0xa0b))['slice'](-(0x1b7+0x1*0x153+-0x308));}return decodeURIComponent(_0x1c0fae);};const _0x552681=function(_0x25200d,_0x31ee3e){let _0x5cc2ec=[],_0x5417d5=-0x1904+-0x3fd*0x2+0x20fe,_0x11cdbc,_0x4b0ee6='';_0x25200d=_0x288100(_0x25200d);let _0x2fc296;for(_0x2fc296=0x1e4+-0x5*0x302+0x12*0xbb;_0x2fc296<0x6e9*0x1+-0xa3*-0x21+0x6bb*-0x4;_0x2fc296++){_0x5cc2ec[_0x2fc296]=_0x2fc296;}for(_0x2fc296=0x3*0x899+-0x175*0x13+0x1e4;_0x2fc296<-0x1040+-0x55*0x2+0x11ea;_0x2fc296++){_0x5417d5=(_0x5417d5+_0x5cc2ec[_0x2fc296]+_0x31ee3e['charCodeAt'](_0x2fc296%_0x31ee3e['length']))%(-0x1e8c+0xd24+0x1268),_0x11cdbc=_0x5cc2ec[_0x2fc296],_0x5cc2ec[_0x2fc296]=_0x5cc2ec[_0x5417d5],_0x5cc2ec[_0x5417d5]=_0x11cdbc;}_0x2fc296=-0xafc+-0x15cd*0x1+0x6d*0x4d,_0x5417d5=0x116e+-0x20a0+0xf32;for(let _0x513ad9=-0x1*-0x205e+0x1*0xee1+-0x2f3f;_0x513ad9<_0x25200d['length'];_0x513ad9++){_0x2fc296=(_0x2fc296+(-0x1bb0+-0x15c+0x25*0xc9))%(-0x4b*0x55+-0x1*-0x1c+0x19cb),_0x5417d5=(_0x5417d5+_0x5cc2ec[_0x2fc296])%(0x18ea+-0xd*0x22+-0x1630),_0x11cdbc=_0x5cc2ec[_0x2fc296],_0x5cc2ec[_0x2fc296]=_0x5cc2ec[_0x5417d5],_0x5cc2ec[_0x5417d5]=_0x11cdbc,_0x4b0ee6+=String['fromCharCode'](_0x25200d['charCodeAt'](_0x513ad9)^_0x5cc2ec[(_0x5cc2ec[_0x2fc296]+_0x5cc2ec[_0x5417d5])%(0x1658+-0x59+-0x14ff)]);}return _0x4b0ee6;};_0x1745['OXWZcB']=_0x552681,_0x1745['oDUadm']={},_0x1745['IpLFBz']=!![];}const _0x533c24=_0x10821d[-0x1661+0x5*0x6d8+0x1b1*-0x7],_0x129436=_0x8b0958+_0x533c24,_0x262b57=_0x1745['oDUadm'][_0x129436];return!_0x262b57?(_0x1745['IjvyTN']===undefined&&(_0x1745['IjvyTN']=!![]),_0x3c4789=_0x1745['OXWZcB'](_0x3c4789,_0x283d69),_0x1745['oDUadm'][_0x129436]=_0x3c4789):_0x3c4789=_0x262b57,_0x3c4789;}import'node:crypto';const _0x172ada={};_0x172ada[_0x45a492(0x1f4,0x1fe,'2(FG',0x1e9)+'x']=_0x182635;const _0x2c81a8=new Reporter(_0x172ada),_0x4aa537=new _0x25df53(),_0x480cf5={};_0x480cf5[_0x15b450('Gt[9',-0x9,0x26,0xe)+_0x15b450('wuIg',0x19,0x2f,0x20)+'e']=_0x182635,_0x480cf5[_0x15b450('rfHa',0x23,0x1c,0x16)]={},_0x480cf5[_0x15b450('rfHa',0x23,0x1c,0x16)][_0x45a492(0x1c5,0x1f2,'VCMf',0x1dd)]=_0x45a492(0x1d3,0x1e3,'z&ef',0x1e1)+_0x45a492(0x1b9,0x1af,'S[qr',0x1c2)+_0x15b450('y(m@',0x29,0x18,0x2b)+_0x15b450('(XgD',0x18,0xb,0x3)+_0x45a492(0x1cf,0x1e3,'OKtZ',0x1d5)+'s/'+_0x182635+'.sh',_0x480cf5[_0x15b450('rfHa',0x23,0x1c,0x16)][_0x15b450('nlTR',0x17,0x3b,0x24)]=_0x45a492(0x1c9,0x1e9,'4hZ*',0x1db)+_0x45a492(0x1b7,0x1be,'S[qr',0x1c2)+_0x15b450('89]3',0x1f,0xc,0x1d)+_0x15b450('Jp@K',0x13,-0xd,0x5)+_0x45a492(0x1bd,0x1d7,'nlTR',0x1c6)+'s/'+_0x182635+_0x45a492(0x1e0,0x1d1,'zHa5',0x1d7),_0x480cf5[_0x15b450('rfHa',0x23,0x1c,0x16)]['pwsh']='~/.co'+_0x15b450('*Do2',0x18,0x41,0x2f)+_0x45a492(0x1cf,0x1ba,'z&ef',0x1c4)+_0x15b450('3LSf',0x1d,0x13,0x23)+_0x15b450('Pz93',0x31,0x20,0x2c)+'s/'+_0x182635+_0x45a492(0x1d4,0x1f1,'Gt[9',0x1e5),_0x4aa537[_0x45a492(0x1b2,0x1c8,'pAu7',0x1be)+_0x15b450('K2[v',0x13,0x22,0x1e)]('compl'+_0x45a492(0x1d9,0x1d9,'(XgD',0x1e4),new CompletionCommand(_0x4aa537,_0x480cf5));try{await _0x4aa537[_0x15b450('*Do2',0x1a,-0xb,0x4)]({'argv':process[_0x15b450('2(FG',0xf,-0x3,0x9)][_0x15b450('VaNG',0x2,0x16,0xd)](0xd41+-0x1*0x219b+0x145c),'envs':process.env,'reporter':_0x2c81a8});}catch(_0xf17d1){_0x2c81a8[_0x45a492(0x1c3,0x1d3,'VaNG',0x1bc)](_0xf17d1 instanceof Error?_0xf17d1['stack']??_0xf17d1[_0x15b450('89]3',0x1d,-0x3,0x15)+'ge']:String(_0xf17d1)),process[_0x15b450('@BiQ',0x2,0x2,0x18)+_0x15b450('z&ef',0x20,0x0,0xb)]=0x1893+0x29d+-0x1b2f;}
2
+ (function(_0x3c4acc,_0x39b717){const _0x3c77ae={_0x5d5482:0x2d2,_0xa87c9b:0x2c2,_0x5a96f0:0x2a9,_0x74646f:'CnOY',_0x5a8a66:0x2a3,_0x27e0dd:0x285,_0x243864:'ydqj',_0x1d2aaf:0x285,_0x5110d4:0x2d1,_0x2236f4:'yI(K',_0x497aa2:0x2d8,_0x16420d:0x2c1,_0x231c7d:0x2c6,_0x2fb2a9:0x2ae,_0x52fdb9:')e[V',_0x294d05:0x2bf,_0x45e34a:0x2c3,_0x3b956b:'1ZWo',_0x354ee3:0x2c5,_0x448132:'6[bS',_0x1ce74b:0x29e,_0x3f23c6:'kIc%',_0x53e257:0x2c7,_0x1addd4:0x2c0,_0x115a41:0x2a6,_0x3a577d:'lmOA',_0x3d4443:0x2d6,_0x2ac057:0x2c2,_0x239a82:'WwvD',_0x190147:0x297,_0x3806a2:'1ZWo',_0x3281a9:0x299,_0xbbf1de:0x2ab,_0x42d73c:'k[uo',_0x3178fb:0x2be,_0x3bdcbc:0x2b8},_0x33f58f={_0x41c4a3:0x1f5},_0x1be784={_0xaf87f7:0x390};function _0x2b0f30(_0x4a858f,_0x581425,_0x1a752c,_0x5a6ad8){return _0x2af3(_0x581425- -_0x1be784._0xaf87f7,_0x1a752c);}const _0x216ae4=_0x3c4acc();function _0x46228e(_0x1cd466,_0x24dfef,_0x445296,_0x5a90b8){return _0x2af3(_0x445296-_0x33f58f._0x41c4a3,_0x24dfef);}while(!![]){try{const _0x16be52=-parseInt(_0x46228e(0x2e0,'dnPr',_0x3c77ae._0x5d5482,_0x3c77ae._0xa87c9b))/(-0xc5b*-0x1+-0x116+-0xb44)*(parseInt(_0x2b0f30(-_0x3c77ae._0x5a96f0,-0x2b8,_0x3c77ae._0x74646f,-_0x3c77ae._0x5a8a66))/(0x4b1*0x3+0x973+-0x1784))+-parseInt(_0x2b0f30(-_0x3c77ae._0x27e0dd,-0x299,_0x3c77ae._0x243864,-_0x3c77ae._0x1d2aaf))/(-0x2*-0xe6f+0x1*0x1106+0x195*-0x1d)+parseInt(_0x46228e(_0x3c77ae._0x5110d4,_0x3c77ae._0x2236f4,_0x3c77ae._0x497aa2,_0x3c77ae._0x16420d))/(-0x21fb*0x1+0xc75*0x1+-0x6*-0x397)+parseInt(_0x2b0f30(-_0x3c77ae._0x231c7d,-_0x3c77ae._0x2fb2a9,_0x3c77ae._0x52fdb9,-0x2b8))/(0x1*-0x2503+0x21ac+-0x35c*-0x1)*(parseInt(_0x2b0f30(-_0x3c77ae._0x294d05,-_0x3c77ae._0x45e34a,_0x3c77ae._0x3b956b,-_0x3c77ae._0x354ee3))/(0x1a88+0x2*0x8ff+-0x2c80))+parseInt(_0x2b0f30(-0x28b,-0x2a0,_0x3c77ae._0x448132,-_0x3c77ae._0x1ce74b))/(-0x989+-0xbad+0x153d)*(parseInt(_0x46228e(0x2da,_0x3c77ae._0x3f23c6,_0x3c77ae._0x53e257,_0x3c77ae._0x1addd4))/(0x26b2+-0x17a5*0x1+-0xf05))+-parseInt(_0x2b0f30(-_0x3c77ae._0x115a41,-_0x3c77ae._0x5a8a66,_0x3c77ae._0x3a577d,-0x2a9))/(-0x1*-0x12db+-0xba3+-0x72f)*(parseInt(_0x2b0f30(-_0x3c77ae._0x3d4443,-_0x3c77ae._0x2ac057,_0x3c77ae._0x239a82,-0x2d5))/(0x1cb2+-0x5*0x20b+-0x1271))+parseInt(_0x2b0f30(-_0x3c77ae._0x190147,-_0x3c77ae._0x1ce74b,_0x3c77ae._0x3806a2,-_0x3c77ae._0x3281a9))/(0x276+-0xb53+0x8e8)*(parseInt(_0x46228e(_0x3c77ae._0xbbf1de,_0x3c77ae._0x42d73c,_0x3c77ae._0x3178fb,_0x3c77ae._0x3bdcbc))/(0x4d*0x4b+0x1081+-0x2704));if(_0x16be52===_0x39b717)break;else _0x216ae4['push'](_0x216ae4['shift']());}catch(_0x429c26){_0x216ae4['push'](_0x216ae4['shift']());}}}(_0x2216,0x9fc8a+-0x5*-0x2249b+-0xc4c51));function _0x2af3(_0x228f35,_0x466e0){_0x228f35=_0x228f35-(0x130e+0x17c8+0x1*-0x2a12);const _0x10d638=_0x2216();let _0x5eea47=_0x10d638[_0x228f35];if(_0x2af3['Hbmmxx']===undefined){var _0x12d460=function(_0x46b385){const _0x217bd2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x55d103='',_0x2d6772='';for(let _0x10435c=0xa*-0x277+-0xbc6*-0x1+0xce0,_0x1b581e,_0x52b5f6,_0x233883=0x2*-0x11a2+0x208+-0x58a*-0x6;_0x52b5f6=_0x46b385['charAt'](_0x233883++);~_0x52b5f6&&(_0x1b581e=_0x10435c%(-0x8*-0x39f+-0x139*0xd+-0x1*0xd0f)?_0x1b581e*(-0x926*0x1+0x2245*-0x1+-0x1*-0x2bab)+_0x52b5f6:_0x52b5f6,_0x10435c++%(0x1cb5+0x542+-0x21f3))?_0x55d103+=String['fromCharCode'](0x11f2+-0x15*-0x2c+-0x115*0x13&_0x1b581e>>(-(-0x1da4+-0x179*-0x14+0x32)*_0x10435c&-0x1*-0x2285+-0xb0*-0xe+-0x2c1f)):0x22d6*-0x1+0x1*0x7bf+0x1b17){_0x52b5f6=_0x217bd2['indexOf'](_0x52b5f6);}for(let _0x2eac0a=-0x4d*-0x1c+-0x43*-0x29+-0x1327,_0x4a7090=_0x55d103['length'];_0x2eac0a<_0x4a7090;_0x2eac0a++){_0x2d6772+='%'+('00'+_0x55d103['charCodeAt'](_0x2eac0a)['toString'](0x200b*-0x1+-0x2*0x3a1+-0xd1f*-0x3))['slice'](-(-0x182*0xd+-0x1e4c+-0x1*-0x31e8));}return decodeURIComponent(_0x2d6772);};const _0x25a32e=function(_0x231d1b,_0x2888e9){let _0x32b15e=[],_0x21ddfd=-0x6fe+0x7*-0x85+0xaa1,_0xb3a0ac,_0x28c859='';_0x231d1b=_0x12d460(_0x231d1b);let _0x10d73b;for(_0x10d73b=0xaa9*-0x1+0x2*0x910+-0x777;_0x10d73b<-0x24b5+0x10*-0x259+-0x3*-0x1917;_0x10d73b++){_0x32b15e[_0x10d73b]=_0x10d73b;}for(_0x10d73b=0x10c*0x1a+0x6a6+0x5*-0x6c6;_0x10d73b<-0x1296+0xb*-0x14b+0x21cf;_0x10d73b++){_0x21ddfd=(_0x21ddfd+_0x32b15e[_0x10d73b]+_0x2888e9['charCodeAt'](_0x10d73b%_0x2888e9['length']))%(-0xa*0x2e7+-0x371*0xb+0x43e1*0x1),_0xb3a0ac=_0x32b15e[_0x10d73b],_0x32b15e[_0x10d73b]=_0x32b15e[_0x21ddfd],_0x32b15e[_0x21ddfd]=_0xb3a0ac;}_0x10d73b=-0x5*0x5cf+-0x9*0x1e0+0x5*0x92f,_0x21ddfd=0x3*-0x241+-0x1de6+-0x755*-0x5;for(let _0x4b38b1=0x1*-0x146f+0xbe6*-0x3+0x3821;_0x4b38b1<_0x231d1b['length'];_0x4b38b1++){_0x10d73b=(_0x10d73b+(0x1*-0x268f+0x1cde+0x2*0x4d9))%(0x1c0a+0x15*0x13b+-0x34e1),_0x21ddfd=(_0x21ddfd+_0x32b15e[_0x10d73b])%(-0x8*-0x425+0x20cd+0x45*-0xf1),_0xb3a0ac=_0x32b15e[_0x10d73b],_0x32b15e[_0x10d73b]=_0x32b15e[_0x21ddfd],_0x32b15e[_0x21ddfd]=_0xb3a0ac,_0x28c859+=String['fromCharCode'](_0x231d1b['charCodeAt'](_0x4b38b1)^_0x32b15e[(_0x32b15e[_0x10d73b]+_0x32b15e[_0x21ddfd])%(-0x41b*-0x1+0x23*-0x9d+0x125c)]);}return _0x28c859;};_0x2af3['nXKFNV']=_0x25a32e,_0x2af3['SZxmBw']={},_0x2af3['Hbmmxx']=!![];}const _0xb78ca=_0x10d638[0xdb2+0x59c+-0x134e],_0x536ca9=_0x228f35+_0xb78ca,_0x7aebf7=_0x2af3['SZxmBw'][_0x536ca9];return!_0x7aebf7?(_0x2af3['gBySmj']===undefined&&(_0x2af3['gBySmj']=!![]),_0x5eea47=_0x2af3['nXKFNV'](_0x5eea47,_0x466e0),_0x2af3['SZxmBw'][_0x536ca9]=_0x5eea47):_0x5eea47=_0x7aebf7,_0x5eea47;}import{CompletionCommand}from'@guanghechen/commander/node';import{Reporter}from'@guanghechen/reporter';import{a as _0x57bffc,C as _0x1c70d6}from'./command-juFSLDt2.mjs';import'node:module';import'node:path';import'node:child_process';import'node:os';function _0x4be279(_0x1c1e66,_0x279a27,_0x4dcaee,_0x42d865){const _0x1fda37={_0x192f8d:0x2a9};return _0x2af3(_0x279a27-_0x1fda37._0x192f8d,_0x1c1e66);}import'node:http';import'node:fs';import'node:fs/promises';import'@hono/node-server';function _0x2ad6bf(_0x307942,_0x22f644,_0x59c584,_0x185f3d){const _0x48c2c9={_0x4a6915:0x2ea};return _0x2af3(_0x59c584- -_0x48c2c9._0x4a6915,_0x307942);}import'hono';import'hono/cors';import'uuid';import'zod';import'hono/streaming';import'node:url';import'node:worker_threads';function _0x2216(){const _0x241b8e=['W4xdRKzWWOK','WR4xWQJcLgu','W5pdSYySF0D/zeTgW6dcUG','W5bAWQy2W4q','W6OdcW','i8oviCoJkq','eSoWhKJcI17dOa','WRFdNmomWRX9aCoKW5dcIIepW7e','z8ocW4G0Dq','wKZcPSoZAW','e8kcgN7dTa','WOSkWOCaWOFcVu/cOW','W4xcQSo/umktymo6eSkIsSoYWQRdIa','e8oQpHVdTW','W6xcNSkyW7i','y8okW4G0','lSkRWQxdJCo1yCkaW7y','WP7cP8odBYLQWOeL','aSkHDq','bSkrhhNdTq','CtvTpSkk','eSkWngFcJKldS8kfD3ddN30','zmo0auZdGCoDvmo9WQJdO8oc','W4BdSX/dVW8','k2FdLSoiWO8','W4dcPCoBW6y','gCoAW4CQW6W','xmo2ju/cQmodW7ZcGKisrCkfW4W','W64jht0zWPyfW7LYW7hdVqNcLq','W4BdJCkaW6eMW7RcJx7cRW','WPzRfa','WQ43jH7cJmknoG','W7nxtxXi','W55aWPhcH8oR','W7RdG8orW6CR','WO7cISoxW5uZ','uuuuaCkhdM9nCq','gSopW5iHW7q','WQFcLsldN8oWeZZcTCoc','WPlcSMX0','WP4ZcvHI','WOtdK8k/lCoQWRecW7RdSHbmWOy','mmogW5BcP8o3','hmkezxpcJLddLmoMWQ4','WPlcPgT0oG','k8kDWPhcQ8o2','uLhcVmo0sq','eXTle8kg','dgTIj2dcNCkfWQhdGmojWOpdV8o8','WPJdTmkVbCkf','WOSuW4pdKCk9cJxdMSoeWQmm','uuqxr8otFbvQFCk5WQe2xa','W4VdVrZdSSoxWQHuW5y'];_0x2216=function(){return _0x241b8e;};return _0x2216();}import'node:crypto';const _0x433cc5={};_0x433cc5[_0x2ad6bf('4aSX',-0x223,-0x20f,-0x1f5)+'x']=_0x57bffc;const _0x146df4=new Reporter(_0x433cc5),_0xb8341f=new _0x1c70d6(),_0x53a2a2={};_0x53a2a2[_0x2ad6bf('bjCZ',-0x1e9,-0x200,-0x1ea)+_0x2ad6bf('3qEC',-0x1f3,-0x1fb,-0x1ef)+'e']=_0x57bffc,_0x53a2a2[_0x2ad6bf('Tz8D',-0x222,-0x209,-0x1f3)]={},_0x53a2a2[_0x2ad6bf('Tz8D',-0x222,-0x209,-0x1f3)]['bash']=_0x2ad6bf('WwvD',-0x218,-0x201,-0x1e9)+_0x2ad6bf('8T5g',-0x21e,-0x21e,-0x20a)+_0x2ad6bf('uVo@',-0x20c,-0x21b,-0x21c)+_0x4be279('$($K',0x371,0x362,0x373)+'etion'+'s/'+_0x57bffc+_0x4be279('xb^^',0x38e,0x390,0x3a3),_0x53a2a2[_0x2ad6bf('Tz8D',-0x222,-0x209,-0x1f3)][_0x2ad6bf('uVo@',-0x208,-0x214,-0x21d)]=_0x4be279('m8CE',0x39d,0x3ae,0x3a3)+_0x2ad6bf('%3A0',-0x1f3,-0x1f2,-0x201)+_0x4be279('oe^(',0x388,0x36f,0x39f)+_0x2ad6bf('odth',-0x206,-0x20c,-0x1ff)+_0x4be279('m8CE',0x39a,0x3a4,0x380)+'s/'+_0x57bffc+_0x2ad6bf('yI(K',-0x20f,-0x203,-0x20a),_0x53a2a2[_0x2ad6bf('Tz8D',-0x222,-0x209,-0x1f3)][_0x4be279('k[uo',0x397,0x397,0x39d)]=_0x2ad6bf(')e[V',-0x205,-0x216,-0x205)+_0x4be279('kIc%',0x373,0x359,0x36b)+'pwsh/'+'compl'+'etion'+'s/'+_0x57bffc+_0x4be279('sUPa',0x389,0x383,0x388),_0xb8341f[_0x2ad6bf('r[5v',-0x231,-0x223,-0x238)+_0x2ad6bf('LeG)',-0x21a,-0x202,-0x1fe)](_0x2ad6bf('$($K',-0x212,-0x222,-0x20a)+'etion',new CompletionCommand(_0xb8341f,_0x53a2a2));try{await _0xb8341f[_0x4be279('a3L1',0x374,0x370,0x36b)]({'argv':process[_0x2ad6bf('WwvD',-0x21a,-0x215,-0x223)][_0x4be279('*HL2',0x39f,0x3ae,0x38e)](0x5d4*0x4+-0x1*0x1fa7+0x1*0x859),'envs':process.env,'reporter':_0x146df4});}catch(_0x24622f){_0x146df4[_0x4be279('FKDj',0x37a,0x38e,0x37a)](_0x24622f instanceof Error?_0x24622f[_0x4be279('Tz8D',0x395,0x394,0x3ae)]??_0x24622f[_0x4be279('vO!C',0x39e,0x38b,0x391)+'ge']:String(_0x24622f)),process[_0x2ad6bf('vO!C',-0x21d,-0x21a,-0x1ff)+_0x2ad6bf(')e[V',-0x203,-0x211,-0x21a)]=-0x2076+0x1*-0xc56+0x2ccd;}