@guanghechen/kit-copilot 0.6.10 → 0.6.12
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 +10 -5
- package/lib/esm/cli.mjs +1 -1
- package/lib/esm/command-Bazmm3_W.mjs +1 -0
- package/lib/esm/index.mjs +1 -1
- package/package.json +3 -3
- package/lib/esm/command-DLiH1pI3.mjs +0 -1
package/README.md
CHANGED
|
@@ -12,8 +12,10 @@ GitHub Copilot proxy server for `Claude`, `Codex`, and `Gemini` compatible endpo
|
|
|
12
12
|
|
|
13
13
|
There is no runtime fallback from business logic to global `process.env` for critical keys such as:
|
|
14
14
|
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
15
|
+
- `KIT_COPILOT_GITHUB_TOKEN`
|
|
16
|
+
- `COPILOT_CODEX_EXPERIMENTAL_HEADERS_ENABLED`
|
|
17
|
+
- `COPILOT_CODEX_BETA_FEATURES_ALLOWLIST`
|
|
18
|
+
- `COPILOT_OPENAI_BETA_ALLOWLIST`
|
|
17
19
|
|
|
18
20
|
## Preset File (`preset.json`)
|
|
19
21
|
|
|
@@ -45,7 +47,7 @@ Example `preset.json`:
|
|
|
45
47
|
|
|
46
48
|
## Token Persistence
|
|
47
49
|
|
|
48
|
-
`kit-copilot auth` persists `
|
|
50
|
+
`kit-copilot auth` persists `KIT_COPILOT_GITHUB_TOKEN` to preset env storage.
|
|
49
51
|
|
|
50
52
|
- Persist target: `<config-root>/.env.local`
|
|
51
53
|
- `GH_COPILOT_TOKEN` is not persisted
|
|
@@ -62,6 +64,9 @@ kit-copilot start --port=4141
|
|
|
62
64
|
With preset env file:
|
|
63
65
|
|
|
64
66
|
```dotenv
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
KIT_COPILOT_GITHUB_TOKEN=ghu_xxx
|
|
68
|
+
# Optional: allow forwarding high-risk Codex beta/experimental headers
|
|
69
|
+
COPILOT_CODEX_EXPERIMENTAL_HEADERS_ENABLED=true
|
|
70
|
+
COPILOT_CODEX_BETA_FEATURES_ALLOWLIST=feature_a
|
|
71
|
+
COPILOT_OPENAI_BETA_ALLOWLIST=responses_websockets=2026-02-06
|
|
67
72
|
```
|
package/lib/esm/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
(function(_0x5c80bf,_0xde7c7b){const _0x20436c={_0xa08d24:'cK&H',_0x4c8b38:0x4bd,_0xbb060c:0x4b1,_0x87f6f:0x1dc,_0x36ad56:0x1ea,_0x596a22:0x1e3,_0x48a122:'EsRD',_0x333f09:'PWY1',_0x268c8a:0x4df,_0x45471b:0x4d1,_0x523f37:0x1b8,_0xc8d736:0x1c9,_0x4b6703:'oupy',_0x557419:0x1d1,_0x3f9e30:0x1c0,_0x226989:'UDO&',_0x26deb4:0x1d6,_0x874a5d:0x1f3,_0x42652c:0x4a2,_0x1ce813:0x4ae,_0x1c13d4:0x4bf,_0x4c99bf:0x1db,_0x40d30a:0x1e6,_0x34d90c:0x1cd,_0x5cbb31:'@DRz',_0x4eadf8:0x4e8,_0x3446aa:0x4d9,_0x9e949:'JtxT',_0xea99cb:0x49a,_0x1da45c:0x49e},_0xef0a0f={_0x5f1d83:0x316},_0x44be26={_0x55900e:0x26};function _0x125352(_0x221031,_0x56852d,_0x5eab84,_0x581b85){return _0x2a1a(_0x221031-_0x44be26._0x55900e,_0x581b85);}const _0x5c87d0=_0x5c80bf();function _0x184069(_0x435b7c,_0x1c9c37,_0x523575,_0x245349){return _0x2a1a(_0x523575-_0xef0a0f._0x5f1d83,_0x435b7c);}while(!![]){try{const _0x4af00d=-parseInt(_0x184069(_0x20436c._0xa08d24,0x4be,_0x20436c._0x4c8b38,_0x20436c._0xbb060c))/(0x66f*0x5+-0x35*0x47+-0x1*0x1177)*(parseInt(_0x125352(_0x20436c._0x87f6f,_0x20436c._0x36ad56,_0x20436c._0x596a22,_0x20436c._0x48a122))/(-0x1eaf+0x29*0xf1+0x7e8*-0x1))+parseInt(_0x184069(_0x20436c._0x333f09,_0x20436c._0x268c8a,0x4cd,_0x20436c._0x45471b))/(-0x1*0x9ef+0x1c08+-0x1216)+-parseInt(_0x125352(_0x20436c._0x523f37,0x1ad,_0x20436c._0xc8d736,_0x20436c._0x4b6703))/(0xd54*-0x1+0x1*0x1719+-0x9c1)+-parseInt(_0x125352(_0x20436c._0x557419,0x1c4,_0x20436c._0x3f9e30,_0x20436c._0x226989))/(-0x1444+0x1641+-0x2a*0xc)*(parseInt(_0x125352(0x1e6,_0x20436c._0x26deb4,_0x20436c._0x874a5d,'*]Ig'))/(0x177b*0x1+-0x310+-0x1465))+-parseInt(_0x184069(_0x20436c._0xa08d24,_0x20436c._0x42652c,_0x20436c._0x1ce813,_0x20436c._0x1c13d4))/(-0x726+0x48d+-0x2a0*-0x1)+parseInt(_0x125352(_0x20436c._0x4c99bf,_0x20436c._0x40d30a,_0x20436c._0x34d90c,_0x20436c._0x5cbb31))/(0xf*-0xbf+0x1712+-0xbd9)*(-parseInt(_0x184069('7qGA',_0x20436c._0x4eadf8,_0x20436c._0x3446aa,0x4eb))/(0x13*0x187+0x1*0x10db+0x2dd7*-0x1))+parseInt(_0x184069(_0x20436c._0x9e949,_0x20436c._0xea99cb,0x4a9,_0x20436c._0x1da45c))/(0x23f0+0x1612+-0x39f8);if(_0x4af00d===_0xde7c7b)break;else _0x5c87d0['push'](_0x5c87d0['shift']());}catch(_0x1f7813){_0x5c87d0['push'](_0x5c87d0['shift']());}}}(_0x4e51,-0x97277+0x41*0x129a+0xbd521));import{CompletionCommand}from'@guanghechen/commander/node';function _0x461e3d(_0x47f72e,_0x112f5e,_0x389dd8,_0x1033cb){const _0x547c3f={_0x541216:0x23a};return _0x2a1a(_0x389dd8- -_0x547c3f._0x541216,_0x112f5e);}function _0x2a1a(_0x967ccd,_0x531ae9){_0x967ccd=_0x967ccd-(-0x1*0x11d8+0x1471+-0x107*0x1);const _0x444259=_0x4e51();let _0x4b0d2b=_0x444259[_0x967ccd];if(_0x2a1a['Qeifuu']===undefined){var _0x3d24ca=function(_0x5b8d53){const _0x4a9fa0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1a150a='',_0x1801fb='';for(let _0xa24851=-0x3df*0x2+0x1bf6+-0x1*0x1438,_0x100181,_0x3f8730,_0x9ad53e=0x2703+-0x3*0x886+0x1f*-0x6f;_0x3f8730=_0x5b8d53['charAt'](_0x9ad53e++);~_0x3f8730&&(_0x100181=_0xa24851%(-0xd53+-0x1a40*0x1+-0x5*-0x7eb)?_0x100181*(0x3d*0x4d+-0x6*-0x4c6+-0x2ebd)+_0x3f8730:_0x3f8730,_0xa24851++%(-0x39*0xf+-0x15*-0x95+-0x8de))?_0x1a150a+=String['fromCharCode'](-0x1d*-0x153+0xf71+-0x34d9&_0x100181>>(-(-0x1611+0x1db0+-0x1*0x79d)*_0xa24851&-0x262b+-0x1*0x24f+0x2880)):-0x53+0x1cb3+0xe30*-0x2){_0x3f8730=_0x4a9fa0['indexOf'](_0x3f8730);}for(let _0x4c46ed=0x26e7*-0x1+-0x1*-0x1ac6+0xc21,_0x433dba=_0x1a150a['length'];_0x4c46ed<_0x433dba;_0x4c46ed++){_0x1801fb+='%'+('00'+_0x1a150a['charCodeAt'](_0x4c46ed)['toString'](-0x21f*-0xd+0x267f+-0x22*0x1f1))['slice'](-(-0x9*-0x7b+0xd3f+-0x1190));}return decodeURIComponent(_0x1801fb);};const _0x5bfd68=function(_0x27b7a6,_0x5c80bf){let _0xde7c7b=[],_0x5c87d0=0xbb8+-0xf9a+0x3e2,_0x4af00d,_0x1f7813='';_0x27b7a6=_0x3d24ca(_0x27b7a6);let _0x302a3f;for(_0x302a3f=-0x1b8*-0xf+-0xfdd+-0x9eb;_0x302a3f<0x26*-0x7c+-0x1b55+0x5*0x959;_0x302a3f++){_0xde7c7b[_0x302a3f]=_0x302a3f;}for(_0x302a3f=-0x17ed+-0x1f6*-0x10+-0x773;_0x302a3f<0x1473+-0x153+0x122*-0x10;_0x302a3f++){_0x5c87d0=(_0x5c87d0+_0xde7c7b[_0x302a3f]+_0x5c80bf['charCodeAt'](_0x302a3f%_0x5c80bf['length']))%(-0x1*0xb6f+0x1*0x1d3b+0x56*-0x32),_0x4af00d=_0xde7c7b[_0x302a3f],_0xde7c7b[_0x302a3f]=_0xde7c7b[_0x5c87d0],_0xde7c7b[_0x5c87d0]=_0x4af00d;}_0x302a3f=0x8aa*-0x1+-0x3a6+0x628*0x2,_0x5c87d0=-0x1*-0x74+-0xecf+-0x93*-0x19;for(let _0x59593a=0x2118*0x1+0xaaf+0x641*-0x7;_0x59593a<_0x27b7a6['length'];_0x59593a++){_0x302a3f=(_0x302a3f+(-0x75b+-0x2225+0x11*0x271))%(-0xc*-0x2f2+0xfca+-0x5d*0x8a),_0x5c87d0=(_0x5c87d0+_0xde7c7b[_0x302a3f])%(-0x13b8+-0x1*-0x1983+0x199*-0x3),_0x4af00d=_0xde7c7b[_0x302a3f],_0xde7c7b[_0x302a3f]=_0xde7c7b[_0x5c87d0],_0xde7c7b[_0x5c87d0]=_0x4af00d,_0x1f7813+=String['fromCharCode'](_0x27b7a6['charCodeAt'](_0x59593a)^_0xde7c7b[(_0xde7c7b[_0x302a3f]+_0xde7c7b[_0x5c87d0])%(-0x20a1+-0x2a5*0xb+0x3eb8)]);}return _0x1f7813;};_0x2a1a['LWjTCB']=_0x5bfd68,_0x2a1a['CnnVtS']={},_0x2a1a['Qeifuu']=!![];}const _0x42f315=_0x444259[0x1444+0xa*-0x3c3+-0x8ad*-0x2],_0x397070=_0x967ccd+_0x42f315,_0x39fe17=_0x2a1a['CnnVtS'][_0x397070];return!_0x39fe17?(_0x2a1a['MUpQPC']===undefined&&(_0x2a1a['MUpQPC']=!![]),_0x4b0d2b=_0x2a1a['LWjTCB'](_0x4b0d2b,_0x531ae9),_0x2a1a['CnnVtS'][_0x397070]=_0x4b0d2b):_0x4b0d2b=_0x39fe17,_0x4b0d2b;}import{Reporter as _0x5e8f26}from'@guanghechen/reporter';import{a as _0x428887,C as _0x3cebf0}from'./command-Bazmm3_W.mjs';import'node:fs';function _0x4e51(){const _0xaf6367=['W58KoZpdRa','W6fkgmokDq','W5fTyW','W6RcVIqAWOxdQ8od','WQ1naSormG','WQeWoSkCW5uIW6rhiY9CW57dUW','WOmeiqJdKSoBWQu','W43cMbiogLBdICoAgaSroG','cSkeWQFcHZpcNuyBygpdG8oZzSk1','W4BcNryhg13cHCoHjH8ii8oP','w8kIkJjx','WO1HWPFdUYa','WRGQcmolW4S','W77dM3mBn2ldUCoIyqRcHSog','W7KSFCoO','lmk5wCogWPXtma','WPBdG0LgtG','W6JdRSoB','j8o8W5e9yG','ACoIWRRcJSkt','WO0suczM','W6xcHd8EWP7dU8oc','W79jt0mbWPaelNVcPXlcHW','FCkZWRVdOf1ldSoNW7RdNcvt','lLdcPuNcLG','WPqGiw0','F8kJwmo5WRK','dYCHsCkz','W7/cSq11qYRdHa','WO1lW5ddOca','kmoVamkKW6CeuSkEW5OhWOrlpcC','WONdJJXfDG','WOO8mZZcLmk9rmkVCaZcR8kXpG','WP0rvdvV','qGFcHCkuW7y','WOSezM0B','FmoVpmojEW','W67cQCooW7K','W4FcQCkVBeG','kmkfESomWPPpeq','W4NdP8o1z1q','WRRcUt8IW6e','W7qOW5dcRCoMDSoxl8k6uZ7dMwq','ECkZWRJdOLnpemowW7/dLbj1','kmoKb8kKW6vfiSoNW4W2WR4','FmoIWQ3cH8ki','W5HGDwu','WObzhciT','W47dSmoMW6RcQa','h0xcLY5U'];_0x4e51=function(){return _0xaf6367;};return _0x4e51();}import'node:path';import'node:child_process';import'node:os';import'node:http';import'node:fs/promises';import'@hono/node-server';import'hono';import'hono/cors';import'uuid';import'zod';import'hono/streaming';import'node:url';import'node:module';import'node:worker_threads';import'node:crypto';const _0x21a879={};_0x21a879[_0x210b3b(0x4e0,0x4ec,'&Goe',0x4e4)+'x']=_0x428887;const _0x13a413=new _0x5e8f26(_0x21a879),_0x28ef91=new _0x3cebf0(),_0x14c17d={};_0x14c17d[_0x210b3b(0x4e5,0x4d7,'m]qd',0x4e6)+_0x210b3b(0x4ea,0x4f1,'yCyA',0x4db)+'e']=_0x428887,_0x14c17d[_0x210b3b(0x4bc,0x4b5,'o#Vk',0x4c3)]={},_0x14c17d[_0x210b3b(0x4bc,0x4b5,'o#Vk',0x4c3)][_0x210b3b(0x4da,0x4ac,'C6om',0x4c5)]='~/.co'+'nfig/'+_0x461e3d(-0x6f,'q@)0',-0x7c,-0x7f)+_0x210b3b(0x4d8,0x4c0,'%n*C',0x4d8)+_0x210b3b(0x4c4,0x4be,'PWY1',0x4d1)+'s/'+_0x428887+_0x210b3b(0x4b1,0x4d9,'esM#',0x4c8),_0x14c17d[_0x210b3b(0x4bc,0x4b5,'o#Vk',0x4c3)][_0x210b3b(0x4e4,0x4f8,'UDO&',0x4e5)]=_0x461e3d(-0xa0,'Ke5n',-0x89,-0x70)+'nfig/'+_0x210b3b(0x4d1,0x4e8,'*]Ig',0x4e0)+'compl'+_0x461e3d(-0x8e,'EEWP',-0x7f,-0x77)+'s/'+_0x428887+_0x461e3d(-0x62,'q@)0',-0x79,-0x75);function _0x210b3b(_0x4e89a6,_0x471db8,_0x40669c,_0x404be4){const _0x1f771d={_0x458fd9:0x32c};return _0x2a1a(_0x404be4-_0x1f771d._0x458fd9,_0x40669c);}_0x14c17d[_0x210b3b(0x4bc,0x4b5,'o#Vk',0x4c3)]['pwsh']=_0x461e3d(-0xa2,'JWy4',-0x9d,-0x89)+'nfig/'+_0x461e3d(-0xa8,'Tib4',-0x90,-0x85)+_0x461e3d(-0x8f,'4LBg',-0x97,-0xaf)+_0x461e3d(-0x84,'7qGA',-0x7d,-0x81)+'s/'+_0x428887+_0x210b3b(0x4c7,0x4da,'7qGA',0x4d0),_0x28ef91['subco'+_0x210b3b(0x4ad,0x4bf,'k*ep',0x4c2)](_0x210b3b(0x4e0,0x4bc,'oupy',0x4c7)+_0x210b3b(0x4e1,0x4e4,'Uf#O',0x4d9),new CompletionCommand(_0x28ef91,_0x14c17d));try{await _0x28ef91['run']({'argv':process[_0x461e3d(-0x88,'y7ZB',-0x8a,-0x94)][_0x210b3b(0x4b9,0x4d2,'%n*C',0x4cb)](-0x1*-0x3fd+0x127a+-0x1675),'envs':process.env,'reporter':_0x13a413});}catch(_0x53ecc4){_0x13a413[_0x210b3b(0x4c1,0x4c7,'&Goe',0x4ca)](_0x53ecc4 instanceof Error?_0x53ecc4[_0x210b3b(0x4ea,0x4d5,'*ga5',0x4da)]??_0x53ecc4[_0x210b3b(0x4d2,0x4dc,'tbIs',0x4d4)+'ge']:String(_0x53ecc4)),process[_0x461e3d(-0xac,'Nc9n',-0xa5,-0xb8)+_0x461e3d(-0x7c,'UDO&',-0x7b,-0x6b)]=0xc39+-0x33*-0x57+-0x1d8d;}
|