@guanghechen/kit-copilot 0.6.12 → 0.6.13
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 +34 -0
- package/lib/esm/cli.mjs +1 -1
- package/lib/esm/command-Bisi_QJe.mjs +1 -0
- package/lib/esm/index.mjs +1 -1
- package/package.json +6 -4
- package/lib/esm/command-Bazmm3_W.mjs +0 -1
package/README.md
CHANGED
|
@@ -70,3 +70,37 @@ COPILOT_CODEX_EXPERIMENTAL_HEADERS_ENABLED=true
|
|
|
70
70
|
COPILOT_CODEX_BETA_FEATURES_ALLOWLIST=feature_a
|
|
71
71
|
COPILOT_OPENAI_BETA_ALLOWLIST=responses_websockets=2026-02-06
|
|
72
72
|
```
|
|
73
|
+
|
|
74
|
+
## Realtime Voice (Codex)
|
|
75
|
+
|
|
76
|
+
`kit-copilot` supports Codex Realtime voice input via WebSocket handoff events.
|
|
77
|
+
|
|
78
|
+
Supported WS paths:
|
|
79
|
+
|
|
80
|
+
- `/api/codex`
|
|
81
|
+
- `/api/codex/realtime`
|
|
82
|
+
- `/api/codex/v1/realtime`
|
|
83
|
+
|
|
84
|
+
Path matching is exact by design:
|
|
85
|
+
|
|
86
|
+
- Trailing slash variants like `/api/codex/` and `/api/codex/realtime/` are rejected.
|
|
87
|
+
|
|
88
|
+
STT runtime envs (required):
|
|
89
|
+
|
|
90
|
+
- `KIT_STT_AZURE_API_KEY`
|
|
91
|
+
- `KIT_STT_AZURE_API_ENDPOINT`
|
|
92
|
+
|
|
93
|
+
Audio buffering policy:
|
|
94
|
+
|
|
95
|
+
- Flush is triggered by either idle debounce (`600ms`) or max segment duration (`4000ms`).
|
|
96
|
+
- Per-connection pending input audio has a hard cap of `20MB`; overflow emits `error` with `input_audio_buffer_overflow` and drops pending buffered audio.
|
|
97
|
+
- `input_audio_buffer.append.audio` must be canonical RFC4648 base64 (decode+re-encode must exactly match input).
|
|
98
|
+
|
|
99
|
+
Example:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
KIT_STT_AZURE_API_KEY=... \
|
|
103
|
+
KIT_STT_AZURE_API_ENDPOINT=https://<resource>.openai.azure.com \
|
|
104
|
+
OPENAI_BASE_URL=http://127.0.0.1:4141/api/codex \
|
|
105
|
+
codex
|
|
106
|
+
```
|
package/lib/esm/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
(function(
|
|
2
|
+
(function(_0x566a7c,_0x32b974){const _0x4a85e2={_0x500851:0x1da,_0x1929a0:0x1c6,_0x4f8d31:0x1c6,_0x37e21d:'&Bi7',_0x565731:0x1df,_0x2f7175:'R%IQ',_0x59c99c:0x1fe,_0x2a7d61:0x20d,_0x25a85e:0x207,_0x429860:'cfr2',_0x45121f:0x22b,_0x50bae9:'W7NV',_0xd19d1:0x214,_0x58f022:0x21a,_0x430c20:0x230,_0x4d3098:'YC3F',_0x3b019e:0x1c7,_0x6a07aa:0x1bd,_0x4e1231:'T@&y',_0x35bb3d:0x1cb,_0x20b46a:0x1bf,_0x3f68db:0x1d4,_0x35dc3e:0x1c4,_0x39de50:'YC3F',_0x56c9d4:0x21b,_0x8bbf11:'@^[J'},_0x6b2f03={_0x599e28:0x7b};function _0x28182a(_0x528275,_0x215b82,_0x368a1c,_0xd7848f){return _0x432b(_0x215b82- -0x360,_0xd7848f);}function _0x402f53(_0x590b3e,_0x14f4b6,_0x1baec5,_0x38d025){return _0x432b(_0x590b3e-_0x6b2f03._0x599e28,_0x38d025);}const _0x2f5a63=_0x566a7c();while(!![]){try{const _0x41fb01=parseInt(_0x402f53(_0x4a85e2._0x500851,_0x4a85e2._0x1929a0,_0x4a85e2._0x4f8d31,_0x4a85e2._0x37e21d))/(-0x4a6*-0x1+-0x1*0x240f+0xfb5*0x2)*(-parseInt(_0x402f53(0x1dc,_0x4a85e2._0x565731,0x1e3,_0x4a85e2._0x2f7175))/(0x3a*0x6b+-0x74c*0x5+0xc40))+parseInt(_0x28182a(-_0x4a85e2._0x59c99c,-_0x4a85e2._0x2a7d61,-_0x4a85e2._0x25a85e,_0x4a85e2._0x429860))/(0x7fd*0x3+0x691*0x3+-0x2ba7)+parseInt(_0x28182a(-0x238,-0x226,-_0x4a85e2._0x45121f,_0x4a85e2._0x50bae9))/(-0x15e5+-0x1202*-0x1+0x3e7)+parseInt(_0x28182a(-_0x4a85e2._0xd19d1,-_0x4a85e2._0x58f022,-_0x4a85e2._0x430c20,_0x4a85e2._0x4d3098))/(-0x106d+0x1754+0x1*-0x6e2)+-parseInt(_0x402f53(_0x4a85e2._0x3b019e,_0x4a85e2._0x6a07aa,0x1c0,_0x4a85e2._0x4e1231))/(-0x688+-0x29*0xcb+0x2711)*(-parseInt(_0x402f53(_0x4a85e2._0x35bb3d,0x1c7,0x1de,'1jBn'))/(0x194a+0xc4d*0x3+0x2*-0x1f15))+-parseInt(_0x402f53(_0x4a85e2._0x20b46a,_0x4a85e2._0x3f68db,_0x4a85e2._0x35dc3e,_0x4a85e2._0x39de50))/(-0x1a07+-0x48a*-0x2+0x3f*0x45)+-parseInt(_0x28182a(-0x210,-_0x4a85e2._0x56c9d4,-0x226,_0x4a85e2._0x8bbf11))/(0x18+0x17f+0xc7*-0x2);if(_0x41fb01===_0x32b974)break;else _0x2f5a63['push'](_0x2f5a63['shift']());}catch(_0x50f24e){_0x2f5a63['push'](_0x2f5a63['shift']());}}}(_0x590b,-0x72827*-0x2+0x13*-0x4e65+0x69e0c));import{CompletionCommand}from'@guanghechen/commander/node';import{Reporter as _0x527827}from'@guanghechen/reporter';import{a as _0x1a4ae0,C as _0x537cc1}from'./command-Bisi_QJe.mjs';import'node:fs';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'@guanghechen/kit-stt';import'uuid';import'ws';import'zod';import'hono/streaming';import'node:url';import'node:module';function _0x4850d0(_0x3997bf,_0x5550e4,_0x1ffb6d,_0x54a22c){const _0x2bbcc5={_0x22799a:0x9b};return _0x432b(_0x5550e4-_0x2bbcc5._0x22799a,_0x1ffb6d);}import'node:worker_threads';import'node:crypto';function _0x590b(){const _0x4a1e90=['ntxcVCo3WQa','zJZdIImIeSoWW7pcPCo+WOrUtq','W4FdNtrWsG','hSkSWPP2WRW','x8o8WRRcL8kX','FSkUsmkNkdjMWQ4ktW','eCoTyx/cKa','WQW+DHTovK/cRSoypMD1WPa','p8odW6lcUSkj','WQ8IW6PQWPpcMmk1W5uYEvG','W6tcSmkCuN8','WO3dHCkXWQjE','WR1eWPpdT25UphVdUZj5k8kx','WPJdISoJta','WOb3r8kzCW','sXJcH0bT','f8oLWRRdJG','W6esW5BcVtK','ywxcI11br8ks','B3lcR8kdWPu','W60AW6VcRZu','W5VdLtG','fqZcGvr3','W43cS3lcPMi','rCkCW49NWPtdOcGAc8oHWR/cKq','mtRcGSkOW7G','WRCvnmkhWPrwW6q','fsWpWPLb','W71sy8kRWQ8','WRjiFmo6W7CeWOeBWPjkEmo2DgO','CCoZW7hdNW','WO3dG8kQWQjc','W5VcGmoGW7WhW5TDW7dcNCkUtH7dNq','WO7dSLxcImoq','F003WOGG','oIhcS8oM','WPNcI1q8wa','W6tcSmkCuG','WQC1ENLQ','p8oRcSo9DW','iSo7j8kkEG','tmoOW4qPW6DCiXbbWRKNBmk9','W6FcGYBcHCkhl1lcM3FcSSoLWQBdKxq','dSkFsuJcHSk6BSo7WOW6hdNdVa','W6hcHIdcH8kfk1tdN3ZcNSoRWQldVG'];_0x590b=function(){return _0x4a1e90;};return _0x590b();}const _0x1a5b21={};function _0x93eb40(_0x5f6309,_0x31fe0e,_0x332334,_0x1a8832){const _0x17784c={_0x6a3444:0x115};return _0x432b(_0x332334-_0x17784c._0x6a3444,_0x31fe0e);}function _0x432b(_0x5d8b74,_0x5959bc){_0x5d8b74=_0x5d8b74-(-0xae4+-0x11a*-0x13+0x2f1*-0x3);const _0x57d034=_0x590b();let _0x46d93f=_0x57d034[_0x5d8b74];if(_0x432b['cLxALC']===undefined){var _0x2fcd37=function(_0x49ddf8){const _0x46447c='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2682a7='',_0x3b5071='';for(let _0x157073=0x1*-0x6ec+-0x13*0xb7+0x1481,_0x346858,_0x362f58,_0x15dfc3=0x1*0x26d1+0xa2b+-0x11d*0x2c;_0x362f58=_0x49ddf8['charAt'](_0x15dfc3++);~_0x362f58&&(_0x346858=_0x157073%(-0x1c70+0x1a*0xc1+-0x46d*-0x2)?_0x346858*(-0x5fc+-0x1aba+0x107b*0x2)+_0x362f58:_0x362f58,_0x157073++%(0x72b+-0x5ea+-0x13d))?_0x2682a7+=String['fromCharCode'](-0x14a8+0x82*0x32+-0x1d*0x21&_0x346858>>(-(0x1d55+-0x117a+-0xbd9)*_0x157073&0xbf1+0x4*0x98f+0x3227*-0x1)):-0x4a*0x81+0xb3f+0x1a0b){_0x362f58=_0x46447c['indexOf'](_0x362f58);}for(let _0x566a7c=0x143f+-0x1037+-0x408,_0x32b974=_0x2682a7['length'];_0x566a7c<_0x32b974;_0x566a7c++){_0x3b5071+='%'+('00'+_0x2682a7['charCodeAt'](_0x566a7c)['toString'](0x652+0x1564+-0x1ba6))['slice'](-(0x37c*-0x8+-0x207+-0x1de9*-0x1));}return decodeURIComponent(_0x3b5071);};const _0x54736e=function(_0x2f5a63,_0x41fb01){let _0x50f24e=[],_0x2b25ef=-0x628+0x4*0x58f+-0x1014,_0x488d98,_0x1248a5='';_0x2f5a63=_0x2fcd37(_0x2f5a63);let _0x185e08;for(_0x185e08=-0x10d3*0x2+0x1bf6+0x5b0;_0x185e08<-0x2455+-0x1b0f*0x1+0x4064;_0x185e08++){_0x50f24e[_0x185e08]=_0x185e08;}for(_0x185e08=0x2649+0x689+-0x2cd2*0x1;_0x185e08<-0xdef+0x4a3*-0x6+0x2ac1;_0x185e08++){_0x2b25ef=(_0x2b25ef+_0x50f24e[_0x185e08]+_0x41fb01['charCodeAt'](_0x185e08%_0x41fb01['length']))%(0x2a*0x24+-0xb0+-0x438),_0x488d98=_0x50f24e[_0x185e08],_0x50f24e[_0x185e08]=_0x50f24e[_0x2b25ef],_0x50f24e[_0x2b25ef]=_0x488d98;}_0x185e08=-0x1a89*-0x1+-0x912+-0x1177*0x1,_0x2b25ef=-0x2*-0x23e+0x371*-0xb+-0x215f*-0x1;for(let _0xb89a2d=-0x4c1*-0x1+0x1054+0x101*-0x15;_0xb89a2d<_0x2f5a63['length'];_0xb89a2d++){_0x185e08=(_0x185e08+(0x17*0x2+0x207b+-0x20a8))%(-0x1202*-0x1+-0x4e2+-0xc20),_0x2b25ef=(_0x2b25ef+_0x50f24e[_0x185e08])%(0x1754+0x1*-0x1e81+0x82d),_0x488d98=_0x50f24e[_0x185e08],_0x50f24e[_0x185e08]=_0x50f24e[_0x2b25ef],_0x50f24e[_0x2b25ef]=_0x488d98,_0x1248a5+=String['fromCharCode'](_0x2f5a63['charCodeAt'](_0xb89a2d)^_0x50f24e[(_0x50f24e[_0x185e08]+_0x50f24e[_0x2b25ef])%(-0x29*0xcb+-0x117d+0x1980*0x2)]);}return _0x1248a5;};_0x432b['SqkpTk']=_0x54736e,_0x432b['aVMoMm']={},_0x432b['cLxALC']=!![];}const _0x318328=_0x57d034[0x21*-0x8d+-0x2011*-0x1+-0x2*0x6f2],_0x29ab1b=_0x5d8b74+_0x318328,_0x2ac863=_0x432b['aVMoMm'][_0x29ab1b];return!_0x2ac863?(_0x432b['dLjydD']===undefined&&(_0x432b['dLjydD']=!![]),_0x46d93f=_0x432b['SqkpTk'](_0x46d93f,_0x5959bc),_0x432b['aVMoMm'][_0x29ab1b]=_0x46d93f):_0x46d93f=_0x2ac863,_0x46d93f;}_0x1a5b21[_0x4850d0(0x1e3,0x1f9,'6EXz',0x1f2)+'x']=_0x1a4ae0;const _0x274a7d=new _0x527827(_0x1a5b21),_0xd5931c=new _0x537cc1(),_0x292484={};_0x292484[_0x4850d0(0x1ef,0x1f1,'Xian',0x1e6)+_0x4850d0(0x20a,0x1f6,'cfr2',0x1ef)+'e']=_0x1a4ae0,_0x292484[_0x93eb40(0x282,'W#@u',0x277,0x275)]={},_0x292484[_0x93eb40(0x282,'W#@u',0x277,0x275)][_0x4850d0(0x1ef,0x1da,'i3M!',0x1ce)]=_0x93eb40(0x265,'R%IQ',0x278,0x277)+_0x93eb40(0x260,'2A$*',0x26f,0x275)+_0x4850d0(0x1d5,0x1ec,'i3M!',0x1ec)+'compl'+_0x4850d0(0x1d9,0x1db,'mvUS',0x1c8)+'s/'+_0x1a4ae0+'.sh',_0x292484[_0x93eb40(0x282,'W#@u',0x277,0x275)][_0x93eb40(0x244,'Qm*]',0x24d,0x249)]=_0x4850d0(0x1ed,0x1dd,'U^3b',0x1f0)+_0x93eb40(0x259,'pFo(',0x25c,0x247)+_0x93eb40(0x25b,'PaC4',0x260,0x24f)+_0x4850d0(0x1c3,0x1d9,'iVNC',0x1d8)+_0x93eb40(0x277,'W7NV',0x267,0x25b)+'s/'+_0x1a4ae0+_0x93eb40(0x263,'Xian',0x272,0x272),_0x292484[_0x93eb40(0x282,'W#@u',0x277,0x275)][_0x93eb40(0x253,'*IM*',0x269,0x271)]=_0x93eb40(0x27f,'DlH[',0x26a,0x261)+_0x4850d0(0x205,0x1fb,'50X#',0x205)+_0x4850d0(0x1c8,0x1dc,'T@&y',0x1f2)+'compl'+_0x93eb40(0x271,'KXJf',0x25f,0x24c)+'s/'+_0x1a4ae0+_0x93eb40(0x25a,'PaC4',0x26c,0x265),_0xd5931c['subco'+'mmand'](_0x4850d0(0x1ec,0x1d6,'JTZC',0x1ca)+_0x93eb40(0x25a,'#9oa',0x262,0x260),new CompletionCommand(_0xd5931c,_0x292484));try{await _0xd5931c['run']({'argv':process[_0x4850d0(0x1db,0x1d8,'pFo(',0x1e8)][_0x4850d0(0x1e5,0x1e4,'bELE',0x1d0)](0x67*-0xd+-0x2*0x1166+0x2809),'envs':process.env,'reporter':_0x274a7d});}catch(_0x3e438c){_0x274a7d[_0x4850d0(0x1bf,0x1d4,'W7NV',0x1db)](_0x3e438c instanceof Error?_0x3e438c['stack']??_0x3e438c[_0x4850d0(0x1e9,0x1f3,'cfr2',0x1e5)+'ge']:String(_0x3e438c)),process[_0x4850d0(0x1c9,0x1d7,'*GrW',0x1cd)+_0x93eb40(0x266,'bELE',0x271,0x275)]=-0x561+-0x2b*0x25+0xb99*0x1;}
|