woozlit 2.1.5 → 2.2.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 +28 -0
- package/dist/auth/login.js +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/server.js +1 -1
- package/dist/browser/tools.js +1 -1
- package/dist/chat/agent.js +1 -1
- package/dist/config/mcp.js +1 -1
- package/dist/config/settings.js +1 -1
- package/dist/discord/client.js +1 -1
- package/dist/discord/config.js +1 -1
- package/dist/discord/index.js +1 -1
- package/dist/discord/setup.js +1 -1
- package/dist/email/config.js +1 -1
- package/dist/email/index.js +1 -1
- package/dist/email/service.js +1 -1
- package/dist/email/setup.js +1 -1
- package/dist/github/api.js +1 -1
- package/dist/github/auth.js +1 -1
- package/dist/github/auto-setup.js +1 -1
- package/dist/github/index.js +1 -1
- package/dist/github/manual-setup.js +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp-servers/computer-use.js +1 -1
- package/dist/services/bot-manager.js +1 -1
- package/dist/services/notifications.js +1 -1
- package/dist/services/voice-agent.js +1 -1
- package/dist/telegram/bot.js +1 -1
- package/dist/telegram/config.js +1 -1
- package/dist/telegram/index.js +1 -1
- package/dist/telegram/reminders.js +1 -1
- package/dist/telegram/setup.js +1 -1
- package/dist/tools/command.js +1 -1
- package/dist/tools/file.d.ts +8 -0
- package/dist/tools/file.js +1 -1
- package/dist/tools/git.js +1 -1
- package/dist/tools/index.d.ts +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/knowledge.d.ts +4 -0
- package/dist/tools/knowledge.js +1 -0
- package/dist/tools/mcp.js +1 -1
- package/dist/tools/network.js +1 -1
- package/dist/tools/project.js +1 -1
- package/dist/tools/rollback.js +1 -1
- package/dist/tools/rules.js +1 -1
- package/dist/tools/system.js +1 -1
- package/dist/twilio/config.js +1 -1
- package/dist/twilio/index.js +1 -1
- package/dist/twilio/server.js +1 -1
- package/dist/twilio/setup.js +1 -1
- package/dist/ui/output.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/themes.js +1 -1
- package/dist/utils/api.d.ts +1 -1
- package/dist/utils/api.js +1 -1
- package/dist/utils/chat-history.js +1 -1
- package/dist/utils/history.js +1 -1
- package/dist/utils/mcp-installer.js +1 -1
- package/dist/utils/platform.js +1 -1
- package/dist/utils/storage.d.ts +3 -0
- package/dist/utils/storage.js +1 -1
- package/dist/utils/update-check.js +1 -1
- package/dist/utils/updater.js +1 -1
- package/dist/verify_repro.js +1 -1
- package/package.json +1 -1
package/dist/ui/select.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3c22ac,_0x40afce){const _0x21061f=a46_0x4e3c,_0x358809=_0x3c22ac();while(!![]){try{const _0x50a9d5=parseInt(_0x21061f(0xa6))/0x1*(parseInt(_0x21061f(0xa8))/0x2)+parseInt(_0x21061f(0xae))/0x3+-parseInt(_0x21061f(0xac))/0x4+parseInt(_0x21061f(0xab))/0x5*(-parseInt(_0x21061f(0xa7))/0x6)+-parseInt(_0x21061f(0xa3))/0x7*(-parseInt(_0x21061f(0xad))/0x8)+-parseInt(_0x21061f(0xa4))/0x9+parseInt(_0x21061f(0xa9))/0xa;if(_0x50a9d5===_0x40afce)break;else _0x358809['push'](_0x358809['shift']());}catch(_0x111fbc){_0x358809['push'](_0x358809['shift']());}}}(a46_0x2641,0xba16f));function a46_0x4e3c(_0x578898,_0x18b2e9){_0x578898=_0x578898-0xa1;const _0x26413b=a46_0x2641();let _0x4e3c86=_0x26413b[_0x578898];return _0x4e3c86;}import{select}from'@inquirer/prompts';import{MODELS}from'../config/settings.js';import{getSelectedModel,setSelectedModel}from'../utils/storage.js';function a46_0x2641(){const _0x435780=['101KqLQEZ','103434OIcJhf','19818KrUuoo','6475480FoWasa','map','265RqXhCV','5042540WXjnan','1887560ZDZjmq','2047761bKpabe','name','description','35dQsoUQ','5167296DxxMBV','xp)'];a46_0x2641=function(){return _0x435780;};return a46_0x2641();}export async function selectModel(){const _0x318174=a46_0x4e3c,_0x1d3db4=getSelectedModel(),_0x2a240b=MODELS[_0x318174(0xaa)](_0x55b52d=>({'name':''+_0x55b52d[_0x318174(0xa1)]+(_0x55b52d['xp']?'\x20('+_0x55b52d['xp']+_0x318174(0xa5):'')+(_0x55b52d['id']===_0x1d3db4?'\x20*':''),'value':_0x55b52d['id'],'description':_0x55b52d[_0x318174(0xa2)]})),_0x41da00=await select({'message':'Select\x20AI\x20Model','choices':_0x2a240b,'default':_0x1d3db4});return setSelectedModel(_0x41da00),_0x41da00;}export{getSelectedModel,setSelectedModel};
|
package/dist/ui/themes.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a47_0x408a0f=a47_0x59b7;function a47_0x59b7(_0x15b70b,_0x1ce6bd){_0x15b70b=_0x15b70b-0x7e;const _0x3838e8=a47_0x3838();let _0x59b702=_0x3838e8[_0x15b70b];return _0x59b702;}(function(_0x1ec573,_0x54a35c){const _0x38602c=a47_0x59b7,_0x29209b=_0x1ec573();while(!![]){try{const _0x25c671=parseInt(_0x38602c(0x8f))/0x1*(-parseInt(_0x38602c(0x7e))/0x2)+parseInt(_0x38602c(0x80))/0x3*(parseInt(_0x38602c(0x8e))/0x4)+parseInt(_0x38602c(0xa6))/0x5+parseInt(_0x38602c(0x94))/0x6*(-parseInt(_0x38602c(0x8b))/0x7)+parseInt(_0x38602c(0x93))/0x8+parseInt(_0x38602c(0x9f))/0x9+parseInt(_0x38602c(0xa7))/0xa;if(_0x25c671===_0x54a35c)break;else _0x29209b['push'](_0x29209b['shift']());}catch(_0x2dff99){_0x29209b['push'](_0x29209b['shift']());}}}(a47_0x3838,0xd05f8));import a47_0x46a4cb from'chalk';export const THEMES=[{'id':a47_0x408a0f(0xa3),'name':a47_0x408a0f(0xa8),'primary':'#3b82f6','secondary':a47_0x408a0f(0x9c),'tertiary':a47_0x408a0f(0x9e),'quaternary':a47_0x408a0f(0x91)},{'id':a47_0x408a0f(0x9d),'name':'Classic\x20Purple','primary':a47_0x408a0f(0x92),'secondary':a47_0x408a0f(0x8d),'tertiary':a47_0x408a0f(0x83),'quaternary':a47_0x408a0f(0x82)},{'id':'hacker_green','name':a47_0x408a0f(0x87),'primary':'#10b981','secondary':a47_0x408a0f(0x99),'tertiary':a47_0x408a0f(0x95),'quaternary':a47_0x408a0f(0x81)},{'id':a47_0x408a0f(0x9b),'name':a47_0x408a0f(0xab),'primary':a47_0x408a0f(0x98),'secondary':a47_0x408a0f(0x89),'tertiary':a47_0x408a0f(0xaa),'quaternary':a47_0x408a0f(0x96)},{'id':a47_0x408a0f(0x97),'name':a47_0x408a0f(0xa1),'primary':'#ec4899','secondary':'#f472b6','tertiary':a47_0x408a0f(0x86),'quaternary':a47_0x408a0f(0x85)},{'id':a47_0x408a0f(0x9a),'name':'Monochrome\x20Silver','primary':a47_0x408a0f(0x7f),'secondary':a47_0x408a0f(0xa9),'tertiary':a47_0x408a0f(0x90),'quaternary':a47_0x408a0f(0x8c)}];export const DEFAULT_THEME_ID=a47_0x408a0f(0xa3);export function getThemeById(_0x165327){const _0x3175da=a47_0x408a0f;return THEMES[_0x3175da(0x88)](_0x31a4cf=>_0x31a4cf['id']===_0x165327)||THEMES[0x0];}function a47_0x3838(){const _0x58bc80=['#34d399','monochrome','sunset_orange','#60a5fa','classic_purple','#93c5fd','14841yfmvVA','../utils/storage.js','Dracula\x20Pink','bold','woozlit_blue','hex','Select\x20UI\x20Theme','3491945lfpccX','3425500HhAOnw','Woozlit\x20Blue\x20(Default)','#a1a1aa','#fdba74','Sunset\x20Orange','@inquirer/prompts','20bDQAWK','#71717a','21yMOOQX','#047857','#7e22ce','#e9d5ff','primary','#be185d','#fbcfe8','Hacker\x20Green','find','#fb923c','map','3234791WICZZR','#3f3f46','#c084fc','124172mnwCvt','72137SytWIY','#d4d4d8','#2563eb','#a855f7','13610528qwSquu','18EUzzdx','#6ee7b7','#c2410c','dracula_pink','#f97316'];a47_0x3838=function(){return _0x58bc80;};return a47_0x3838();}export function getInquirerTheme(_0x309d0d){const _0x124399=a47_0x408a0f,_0x29a477=getThemeById(_0x309d0d);return{'prefix':{'idle':a47_0x46a4cb['hex'](_0x29a477[_0x124399(0x84)])('?'),'done':a47_0x46a4cb[_0x124399(0xa4)](_0x29a477[_0x124399(0x84)])('✔')},'icon':{'cursor':a47_0x46a4cb[_0x124399(0xa4)](_0x29a477[_0x124399(0x84)])('❯')},'style':{'answer':a47_0x46a4cb[_0x124399(0xa4)](_0x29a477['primary']),'message':_0x97fb8c=>a47_0x46a4cb[_0x124399(0xa2)](_0x97fb8c)}};}export async function selectTheme(){const _0x5230da=a47_0x408a0f,{select:_0x486f8a}=await import(_0x5230da(0xac)),{getTheme:_0x21c0ba,setTheme:_0x244827}=await import(_0x5230da(0xa0)),_0x5dbe67=_0x21c0ba(),_0x3baee0=THEMES[_0x5230da(0x8a)](_0x283dee=>({'name':_0x283dee['id']===_0x5dbe67?_0x283dee['name']+'\x20*':_0x283dee['name'],'value':_0x283dee['id']})),_0x1d176f=await _0x486f8a({'message':_0x5230da(0xa5),'choices':_0x3baee0,'default':_0x5dbe67,'theme':getInquirerTheme(_0x5dbe67)});return _0x244827(_0x1d176f),_0x1d176f;}
|
package/dist/utils/api.d.ts
CHANGED
package/dist/utils/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5e8456,_0x2a51eb){const _0x4091cb=a48_0x1a25,_0x2c33c0=_0x5e8456();while(!![]){try{const _0x39e3eb=parseInt(_0x4091cb(0xc1))/0x1+parseInt(_0x4091cb(0xbe))/0x2+parseInt(_0x4091cb(0xcb))/0x3+parseInt(_0x4091cb(0xb5))/0x4+-parseInt(_0x4091cb(0xf6))/0x5*(parseInt(_0x4091cb(0xbb))/0x6)+-parseInt(_0x4091cb(0xd0))/0x7+-parseInt(_0x4091cb(0xfa))/0x8;if(_0x39e3eb===_0x2a51eb)break;else _0x2c33c0['push'](_0x2c33c0['shift']());}catch(_0x19102d){_0x2c33c0['push'](_0x2c33c0['shift']());}}}(a48_0x212c,0xe8835));import{getApiUrl}from'../config/settings.js';import{getToken,getUser}from'./storage.js';import a48_0x361cbc from'crypto';import a48_0x29fb16 from'fs';import a48_0x136623 from'path';import{dirname}from'path';import{fileURLToPath}from'url';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getDecryptedSecret(){const _0x430e8d=a48_0x1a25;try{const _0xa89374=[a48_0x136623['join'](__dirname,_0x430e8d(0xc9)),a48_0x136623[_0x430e8d(0xba)](__dirname,_0x430e8d(0xd5)),a48_0x136623[_0x430e8d(0xba)](__dirname,_0x430e8d(0xe9)),a48_0x136623[_0x430e8d(0xba)](process[_0x430e8d(0xc7)](),'env.woozlit')];let _0xa788c3='';for(const _0x52b196 of _0xa89374){if(a48_0x29fb16[_0x430e8d(0xcc)](_0x52b196)){_0xa788c3=a48_0x29fb16[_0x430e8d(0xf9)](_0x52b196,'utf8')[_0x430e8d(0xce)]();break;}}if(!_0xa788c3)return reconstructSecret();const [_0x20ccb3,_0x58e6b9]=_0xa788c3['split'](':');if(!_0x20ccb3||!_0x58e6b9)return reconstructSecret();const _0xb37a38=Buffer[_0x430e8d(0xf4)](_0x20ccb3,_0x430e8d(0xc4)),_0x5f1bd7=a48_0x361cbc[_0x430e8d(0xc8)](_0x430e8d(0xe1))[_0x430e8d(0xb9)](_0x430e8d(0xb8))[_0x430e8d(0xe7)](),_0x1752b9=a48_0x361cbc[_0x430e8d(0xfb)]('aes-256-cbc',_0x5f1bd7,_0xb37a38);let _0xcfc782=_0x1752b9['update'](_0x58e6b9,_0x430e8d(0xc4),'utf8');return _0xcfc782+=_0x1752b9[_0x430e8d(0xdf)](_0x430e8d(0xeb)),_0xcfc782;}catch(_0x52b281){return reconstructSecret();}}function reconstructSecret(){const _0x5759d4=a48_0x1a25,_0x51a023=[0x77,0x7a,0x5f,0x63,0x6c,0x69,0x5f,0x70,0x72,0x6f,0x64,0x5f][_0x5759d4(0xb4)](_0x1cff59=>String['fromCharCode'](_0x1cff59))[_0x5759d4(0xba)](''),_0x965491=String['fromCharCode'](0x73,0x33,0x63,0x72,0x33,0x74,0x5f,0x78,0x39,0x32,0x5f),_0x55b5e0=(0x8*0x186a0+0x26610+0x190+0x32+0x6)['toString'](0x10)+'e5c'+(0x4*0xa+0x3)[_0x5759d4(0xd6)](0x10)+_0x5759d4(0xea),_0x5aad92=['s','e','c','u','r','e','_','h','a','s','h'][_0x5759d4(0xba)]('');return _0x51a023+_0x965491+_0x5759d4(0xbc)+_0x55b5e0[_0x5759d4(0xb7)](0x5)+_0x5aad92;}function simpleHash(_0x3e860c){const _0x1dbe0e=a48_0x1a25;let _0x3ba7b8=0x811c9dc5;for(let _0x477408=0x0;_0x477408<_0x3e860c['length'];_0x477408++){_0x3ba7b8^=_0x3e860c[_0x1dbe0e(0xf1)](_0x477408),_0x3ba7b8=Math[_0x1dbe0e(0xf0)](_0x3ba7b8,0x1000193);}const _0x3e4f9f=(_0x3ba7b8>>>0x0)[_0x1dbe0e(0xd6)](0x10)['padStart'](0x8,'0');let _0x31078a=0x0;for(let _0x48f3ed=0x0;_0x48f3ed<_0x3e860c[_0x1dbe0e(0xc2)];_0x48f3ed++){_0x31078a=(_0x31078a<<0x5)-_0x31078a+_0x3e860c['charCodeAt'](_0x48f3ed)|0x0;}const _0xbce22c=(_0x31078a>>>0x0)['toString'](0x10)[_0x1dbe0e(0xd3)](0x8,'0');return''+_0x3e4f9f+_0xbce22c;}function a48_0x212c(){const _0x1dff87=['text','API\x20error:\x20','platform','woozlit:','split','digest','cli-','../env.woozlit','3a2_','utf8','get','R9fC2XWkQeY1B6Z0aM3S7UoI5dVJH8NpbKTL4GmEAr','arch','No\x20response\x20body','imul','charCodeAt','\x20seconds.','Bearer\x20','from','resetIn','5lTVNSw','POST','error','readFileSync','3737296aXoKZX','createDecipheriv','map','1945884xAyQqi','/api/auth/verify','substring','woozlit_internal_secure_key_2026_v2_!!!','update','join','7896090dNQicg','8f7d6','\x20-\x20','2116826dqTtwC','status','version','1715048LTJxXZ','length','X-RateLimit-Reset','hex','json','now','cwd','createHash','../../env.woozlit','read','3596469FIBpQz','existsSync','Rate\x20limit\x20exceeded.\x20Try\x20again\x20in\x20','trim','headers','12062435okPRtW','/api/user/usage','slice','padStart','https://woozlit.com','../../../env.woozlit','toString','1.1.0','isRateLimit','/api/chat','endsWith','body','catch','stringify','startsWith','final','random','sha256'];a48_0x212c=function(){return _0x1dff87;};return a48_0x212c();}function a48_0x1a25(_0x276c40,_0x8272ab){_0x276c40=_0x276c40-0xb4;const _0x212c70=a48_0x212c();let _0x1a25a5=_0x212c70[_0x276c40];return _0x1a25a5;}function createRequestSignature(){const _0x4be1bf=a48_0x1a25,_0x2fbf21=Date[_0x4be1bf(0xc6)]()[_0x4be1bf(0xd6)](),_0x3089a5=_0x4be1bf(0xe5)+_0x2fbf21+':chat',_0x5d84b2=_0x4be1bf(0xed),_0x1520f1=simpleHash(_0x3089a5+_0x5d84b2);return{'signature':_0x1520f1,'timestamp':_0x2fbf21};}export async function sendChatMessage(_0x475f81,_0x1e0bc8,_0x40e27e,_0x3f7c07){const _0x35840d=a48_0x1a25,_0x168b5c=getToken(),_0x25954f=getApiUrl(),{userId:_0x548d4a}=getUser();if(!_0x168b5c||!_0x548d4a)throw new Error('Not\x20authenticated.\x20Please\x20run\x20\x27woozlit\x20login\x27\x20first.');const _0x19907c=_0x35840d(0xe8)+Date[_0x35840d(0xc6)]()+'-'+Math[_0x35840d(0xe0)]()[_0x35840d(0xd6)](0x24)[_0x35840d(0xb7)](0x2,0x9),_0x3e4009=process[_0x35840d(0xe4)]+'-'+process[_0x35840d(0xee)]+'-'+process[_0x35840d(0xc0)],_0x6d0407=getDecryptedSecret(),{signature:_0x56b836,timestamp:_0x5809b9}=createRequestSignature(),_0xb2f996=await fetch(_0x25954f+_0x35840d(0xd9),{'method':_0x35840d(0xf7),'headers':{'Content-Type':'application/json','X-Woozlit-CLI':'true','X-Woozlit-CLI-Version':_0x35840d(0xd7),'X-Request-ID':_0x19907c,'X-Device-Fingerprint':_0x3e4009,'Authorization':_0x35840d(0xf3)+_0x168b5c,'X-Woozlit-Token':_0x35840d(0xf3)+_0x168b5c,'Origin':_0x35840d(0xd4),'X-Woozlit-App-Secret':_0x6d0407,'X-Request-Signature':_0x56b836,'X-Request-Timestamp':_0x5809b9},'body':JSON[_0x35840d(0xdd)]({'model':_0x475f81,'messages':_0x1e0bc8,'stream':!![],'userId':_0x548d4a}),'signal':_0x3f7c07});if(!_0xb2f996['ok']){if(_0xb2f996[_0x35840d(0xbf)]===0x1ad){const _0x3eeb67=_0xb2f996[_0x35840d(0xcf)][_0x35840d(0xec)](_0x35840d(0xc3)),_0x1c6083=_0x3eeb67?parseInt(_0x3eeb67):0x3c,_0x5c25ae=await _0xb2f996[_0x35840d(0xc5)]()[_0x35840d(0xdc)](()=>({})),_0x568e5d=new Error(_0x5c25ae[_0x35840d(0xf8)]||_0x35840d(0xcd)+_0x1c6083+_0x35840d(0xf2));_0x568e5d[_0x35840d(0xbf)]=0x1ad,_0x568e5d[_0x35840d(0xf5)]=_0x1c6083,_0x568e5d[_0x35840d(0xd8)]=!![];throw _0x568e5d;}const _0x2219f2=await _0xb2f996[_0x35840d(0xe2)]();throw new Error(_0x35840d(0xe3)+_0xb2f996['status']+_0x35840d(0xbd)+_0x2219f2);}if(!_0xb2f996[_0x35840d(0xdb)])throw new Error(_0x35840d(0xef));const _0x26ed2e=_0xb2f996[_0x35840d(0xdb)]['getReader'](),_0x1dca00=new TextDecoder();let _0x263c08='';const _0x22a12f=[];while(!![]){const {done:_0x785950,value:_0x5c994c}=await _0x26ed2e[_0x35840d(0xca)]();if(_0x785950)break;const _0xc79a26=_0x1dca00['decode'](_0x5c994c,{'stream':!![]});if(_0xc79a26['includes']('0:')){const _0x1d547a=_0xc79a26[_0x35840d(0xe6)]('\x0a');for(const _0x896f68 of _0x1d547a){if(_0x896f68[_0x35840d(0xde)]('0:')){const _0x3d1281=_0x896f68[_0x35840d(0xd2)](0x2)[_0x35840d(0xce)]();if(_0x3d1281[_0x35840d(0xde)]('\x22')&&_0x3d1281[_0x35840d(0xda)]('\x22'))try{const _0xb6e765=JSON['parse'](_0x3d1281);_0x263c08+=_0xb6e765;if(_0x40e27e)_0x40e27e(_0xb6e765);}catch{}}}}else{_0x263c08+=_0xc79a26;if(_0x40e27e)_0x40e27e(_0xc79a26);}}return{'content':_0x263c08,'toolCalls':_0x22a12f};}export async function checkAuth(){const _0x14f7a5=a48_0x1a25,_0x2ac5c3=getToken();if(!_0x2ac5c3)return![];try{const _0x1b19bf=getApiUrl(),_0x5bd707=await fetch(_0x1b19bf+_0x14f7a5(0xb6),{'headers':{'Authorization':_0x14f7a5(0xf3)+_0x2ac5c3}});return _0x5bd707['ok'];}catch{return![];}}export async function getUserUsage(){const _0x268448=a48_0x1a25,_0x2f8eab=getToken();if(!_0x2f8eab)return null;try{const _0x368033=getApiUrl(),_0xfd8d47=await fetch(_0x368033+_0x268448(0xd1),{'headers':{'Authorization':'Bearer\x20'+_0x2f8eab}});if(!_0xfd8d47['ok'])return null;return await _0xfd8d47['json']();}catch(_0x1b941c){return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a49_0x4240fb=a49_0x4ec9;(function(_0x3132d3,_0x4dd323){const _0x5f16b5=a49_0x4ec9,_0x35f015=_0x3132d3();while(!![]){try{const _0x27237b=-parseInt(_0x5f16b5(0xd0))/0x1*(parseInt(_0x5f16b5(0xe1))/0x2)+-parseInt(_0x5f16b5(0xe4))/0x3+-parseInt(_0x5f16b5(0xd1))/0x4+-parseInt(_0x5f16b5(0xe3))/0x5+-parseInt(_0x5f16b5(0xd6))/0x6+-parseInt(_0x5f16b5(0xdf))/0x7+parseInt(_0x5f16b5(0xd5))/0x8;if(_0x27237b===_0x4dd323)break;else _0x35f015['push'](_0x35f015['shift']());}catch(_0x2053f3){_0x35f015['push'](_0x35f015['shift']());}}}(a49_0xa641,0x5baf9));import a49_0xa267c7 from'conf';const config=new a49_0xa267c7({'projectName':a49_0x4240fb(0xd9),'defaults':{'sessions':{}}});export function saveChatSession(_0x23fee6,_0x3c62ae){const _0x2955bc=a49_0x4240fb,_0x1a12c0=config[_0x2955bc(0xd7)](_0x2955bc(0xdc))||{};let _0x1d177c=_0x2955bc(0xd8);const _0x17858c=_0x3c62ae[_0x2955bc(0xe0)](_0xa588fa=>_0xa588fa['role']===_0x2955bc(0xcd));_0x17858c&&(_0x1d177c=_0x17858c[_0x2955bc(0xdd)][_0x2955bc(0xd3)](0x0,0x32)[_0x2955bc(0xdb)](/\\n/g,'\x20')+(_0x17858c['content'][_0x2955bc(0xd2)]>0x32?_0x2955bc(0xda):''));const _0x3adadb={'id':_0x23fee6,'updatedAt':Date[_0x2955bc(0xd4)](),'title':_0x1d177c,'messages':_0x3c62ae};return _0x1a12c0[_0x23fee6]=_0x3adadb,config[_0x2955bc(0xe2)](_0x2955bc(0xdc),_0x1a12c0),_0x3adadb;}function a49_0xa641(){const _0x48203e=['woozlit-cli-chats','...','replace','sessions','content','updatedAt','2118494BrudMp','find','1040042dRNJPM','set','2717190geqHWi','239499fXobsj','user','sort','values','1powsYd','648884KcMYAs','length','slice','now','18406056kIPUCY','1902342OHCIGU','get','New\x20Chat'];a49_0xa641=function(){return _0x48203e;};return a49_0xa641();}export function getChatSessions(){const _0x5b1669=a49_0x4240fb,_0x254f8a=config['get'](_0x5b1669(0xdc))||{};return Object[_0x5b1669(0xcf)](_0x254f8a)[_0x5b1669(0xce)]((_0x3a9c55,_0x2ba05b)=>_0x2ba05b['updatedAt']-_0x3a9c55[_0x5b1669(0xde)]);}export function getChatSession(_0x3c25f1){const _0x4414c1=a49_0x4240fb,_0x2063c0=config[_0x4414c1(0xd7)](_0x4414c1(0xdc))||{};return _0x2063c0[_0x3c25f1];}function a49_0x4ec9(_0x45e5de,_0x3fd516){_0x45e5de=_0x45e5de-0xcd;const _0xa64122=a49_0xa641();let _0x4ec912=_0xa64122[_0x45e5de];return _0x4ec912;}export function deleteChatSession(_0x599820){const _0x270e4c=a49_0x4240fb,_0x501c20=config['get']('sessions')||{};_0x501c20[_0x599820]&&(delete _0x501c20[_0x599820],config[_0x270e4c(0xe2)](_0x270e4c(0xdc),_0x501c20));}export function clearAllChatSessions(){config['set']('sessions',{});}
|
package/dist/utils/history.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a50_0xe0ede5=a50_0x517e;(function(_0x37aa3e,_0x4a1384){const _0x881cf4=a50_0x517e,_0x8122c7=_0x37aa3e();while(!![]){try{const _0x1155de=parseInt(_0x881cf4(0x199))/0x1*(-parseInt(_0x881cf4(0x19f))/0x2)+-parseInt(_0x881cf4(0x18d))/0x3+parseInt(_0x881cf4(0x191))/0x4+parseInt(_0x881cf4(0x19b))/0x5+parseInt(_0x881cf4(0x192))/0x6+parseInt(_0x881cf4(0x19c))/0x7+-parseInt(_0x881cf4(0x19d))/0x8*(-parseInt(_0x881cf4(0x18e))/0x9);if(_0x1155de===_0x4a1384)break;else _0x8122c7['push'](_0x8122c7['shift']());}catch(_0x46b423){_0x8122c7['push'](_0x8122c7['shift']());}}}(a50_0x599a,0x6f49a));import a50_0x41671b from'conf';const WEEK_MS=0x7*0x18*0x3c*0x3c*0x3e8,config=new a50_0x41671b({'projectName':a50_0xe0ede5(0x194),'defaults':{'entries':[],'lastCleanup':Date['now']()}});function cleanup(){const _0x5ac2b6=a50_0xe0ede5,_0x1f3737=Date[_0x5ac2b6(0x193)](),_0x4482af=config[_0x5ac2b6(0x190)](_0x5ac2b6(0x18f));if(_0x1f3737-_0x4482af<0x18*0x3c*0x3c*0x3e8)return;const _0x84913f=config['get'](_0x5ac2b6(0x19a)),_0x573fee=_0x84913f['filter'](_0xc8d1ee=>_0x1f3737-_0xc8d1ee[_0x5ac2b6(0x198)]<WEEK_MS);config[_0x5ac2b6(0x197)](_0x5ac2b6(0x19a),_0x573fee),config[_0x5ac2b6(0x197)](_0x5ac2b6(0x18f),_0x1f3737);}function a50_0x517e(_0x1825d1,_0x230967){_0x1825d1=_0x1825d1-0x18d;const _0x599ae6=a50_0x599a();let _0x517ef7=_0x599ae6[_0x1825d1];return _0x517ef7;}function a50_0x599a(){const _0x560cb9=['push','shift','set','timestamp','1aQfwgA','entries','2669310YNfQkI','1936158vmEUCM','4169336diCkVX','length','1140882kSckFj','2355288kiDUFE','9hVzfhg','lastCleanup','get','876464DshIDs','1563792woGNkm','now','woozlit-cli-history'];a50_0x599a=function(){return _0x560cb9;};return a50_0x599a();}export function addToHistory(_0x3519f8){const _0x305055=a50_0xe0ede5;cleanup();const _0x35526b=config[_0x305055(0x190)](_0x305055(0x19a));_0x35526b[_0x305055(0x195)]({'message':_0x3519f8,'timestamp':Date[_0x305055(0x193)]()});if(_0x35526b[_0x305055(0x19e)]>0x64)_0x35526b[_0x305055(0x196)]();config[_0x305055(0x197)](_0x305055(0x19a),_0x35526b);}export function getHistory(){const _0x29c18c=a50_0xe0ede5;return cleanup(),config[_0x29c18c(0x190)](_0x29c18c(0x19a))['map'](_0x5ed5e1=>_0x5ed5e1['message']);}export function clearHistory(){const _0x5ed20e=a50_0xe0ede5;config[_0x5ed20e(0x197)]('entries',[]);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a51_0x425d6f=a51_0x5979;function a51_0x5979(_0x543654,_0x30d553){_0x543654=_0x543654-0x134;const _0x323fbe=a51_0x323f();let _0x597957=_0x323fbe[_0x543654];return _0x597957;}(function(_0x12df1d,_0x3b970f){const _0x1dd5b0=a51_0x5979,_0x1b2997=_0x12df1d();while(!![]){try{const _0x5660fb=parseInt(_0x1dd5b0(0x15a))/0x1*(parseInt(_0x1dd5b0(0x182))/0x2)+-parseInt(_0x1dd5b0(0x147))/0x3+parseInt(_0x1dd5b0(0x175))/0x4*(-parseInt(_0x1dd5b0(0x171))/0x5)+parseInt(_0x1dd5b0(0x157))/0x6+parseInt(_0x1dd5b0(0x142))/0x7+-parseInt(_0x1dd5b0(0x150))/0x8+-parseInt(_0x1dd5b0(0x14e))/0x9;if(_0x5660fb===_0x3b970f)break;else _0x1b2997['push'](_0x1b2997['shift']());}catch(_0x514256){_0x1b2997['push'](_0x1b2997['shift']());}}}(a51_0x323f,0x8b9b7));function a51_0x323f(){const _0x455690=['scripts','9125872nrZTAX','success','split','servers','object','npm\x20install','info','5996790lflGtK','yarn\x20install','Failed\x20to\x20clone\x20repository:\x20','19431uEGdcr','node','Building\x20project...','endsWith','Successfully\x20installed\x20and\x20added\x20\x27','error','Failed\x20to\x20install\x20mcp-chrome-bridge\x20using\x20pnpm:\x20','Failed\x20to\x20install/build:\x20','main','src/index.ts','Failed\x20to\x20install\x20mcp-chrome-bridge:\x20','Trying\x20npm\x20as\x20fallback...','4.\x20Make\x20sure\x20\x27mcp-chrome-bridge\x27\x20is\x20running\x20(if\x20not\x20started\x20automatically)','Installed\x20mcp-chrome-bridge\x20and\x20added\x20configuration!','slice','Could\x20not\x20auto-detect\x20entry\x20point.\x20Please\x20add\x20the\x20server\x20manually\x20using\x20\x27woozlit\x20mcp\x20add\x27.','\x27\x20from\x20GitHub!','build','utf-8','keys','bin','.woozlit','git\x20clone\x20','265nnnaPp','mcp-chrome-bridge','http://127.0.0.1:12306/mcp','npm','3172iyVZmr','Try\x20running\x20with\x20sudo\x20or\x20administrative\x20privileges.','2.\x20Load\x20unpacked\x20extension\x20in\x20Chrome\x20Developer\x20Mode','tsx','test','yarn.lock','Unknown\x20installation\x20source.\x20Please\x20provide\x20a\x20GitHub\x20URL\x20or\x20\x27mcp-chrome-bridge\x27.','existsSync','Failed\x20to\x20update\x20repo.\x20Try\x20checking\x20it\x20out\x20manually\x20or\x20deleting\x20the\x20folder.','git\x20pull','pnpm-lock.yaml','...','Directory\x20','58PGTajU','parse','yarn','length','pnpm\x20install','Detected\x20entry\x20point:\x20','inherit','Installing\x20dependencies...','.git','pnpm\x20add\x20-g\x20mcp-chrome-bridge','1.\x20Download\x20the\x20Chrome\x20Extension:\x20https://github.com/hangwin/mcp-chrome/releases','Installing\x20mcp-chrome-bridge\x20globally...','\x20already\x20exists.\x20Updating...','chrome','3.\x20Click\x20extension\x20icon\x20and\x20\x27Connect\x27','warn','package.json','5242419spbied','homedir','dist/index.js','readFileSync','https://github.com/','1544457cgsOty','\x20run\x20build','includes','github.com','join','npm\x20install\x20-g\x20mcp-chrome-bridge','mcp-chrome','382212GUMEhM'];a51_0x323f=function(){return _0x455690;};return a51_0x323f();}import{execSync}from'child_process';import a51_0x25d186 from'path';import a51_0x144379 from'fs';import a51_0x344b93 from'os';import*as a51_0x14210b from'../ui/output.js';import{addMcpServer,addMcpHttpServer}from'../config/mcp.js';const SERVERS_DIR=a51_0x25d186[a51_0x425d6f(0x14b)](a51_0x344b93[a51_0x425d6f(0x143)](),a51_0x425d6f(0x16f),a51_0x425d6f(0x153));function ensureServersDir(){!a51_0x144379['existsSync'](SERVERS_DIR)&&a51_0x144379['mkdirSync'](SERVERS_DIR,{'recursive':!![]});}function getRepoName(_0x1c974b){const _0x52a221=a51_0x425d6f,_0x54e6ab=_0x1c974b[_0x52a221(0x152)]('/');let _0x11ebcc=_0x54e6ab[_0x54e6ab[_0x52a221(0x134)]-0x1];return _0x11ebcc[_0x52a221(0x15d)](_0x52a221(0x139))&&(_0x11ebcc=_0x11ebcc[_0x52a221(0x168)](0x0,-0x4)),_0x11ebcc;}async function installFromGithub(_0x30179c,_0xe2ab40){const _0x5079f8=a51_0x425d6f;ensureServersDir();const _0x4e6b21=_0xe2ab40||getRepoName(_0x30179c),_0x2b41f3=a51_0x25d186[_0x5079f8(0x14b)](SERVERS_DIR,_0x4e6b21);a51_0x14210b[_0x5079f8(0x156)]('Cloning\x20'+_0x30179c+'\x20to\x20'+_0x2b41f3+_0x5079f8(0x180));if(a51_0x144379[_0x5079f8(0x17c)](_0x2b41f3)){a51_0x14210b[_0x5079f8(0x140)](_0x5079f8(0x181)+_0x2b41f3+_0x5079f8(0x13d));try{execSync(_0x5079f8(0x17e),{'cwd':_0x2b41f3,'stdio':'inherit'});}catch(_0x4a75b8){a51_0x14210b[_0x5079f8(0x15f)](_0x5079f8(0x17d));return;}}else try{execSync(_0x5079f8(0x170)+_0x30179c+'\x20'+_0x2b41f3,{'stdio':_0x5079f8(0x137)});}catch(_0xd475ce){a51_0x14210b[_0x5079f8(0x15f)](_0x5079f8(0x159)+_0xd475ce);return;}a51_0x14210b[_0x5079f8(0x156)](_0x5079f8(0x138));try{const _0x12e832=a51_0x144379[_0x5079f8(0x17c)](a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x5079f8(0x17f))),_0x39d694=a51_0x144379[_0x5079f8(0x17c)](a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x5079f8(0x17a))),_0x4cdf36=_0x12e832?_0x5079f8(0x135):_0x39d694?_0x5079f8(0x158):_0x5079f8(0x155);execSync(_0x4cdf36,{'cwd':_0x2b41f3,'stdio':_0x5079f8(0x137)});const _0x18cbb0=a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x5079f8(0x141));if(a51_0x144379[_0x5079f8(0x17c)](_0x18cbb0)){const _0x5d0441=JSON[_0x5079f8(0x183)](a51_0x144379[_0x5079f8(0x145)](_0x18cbb0,_0x5079f8(0x16c)));_0x5d0441[_0x5079f8(0x14f)]&&_0x5d0441[_0x5079f8(0x14f)][_0x5079f8(0x16b)]&&(a51_0x14210b[_0x5079f8(0x156)](_0x5079f8(0x15c)),execSync((_0x12e832?'pnpm':_0x39d694?_0x5079f8(0x184):_0x5079f8(0x174))+_0x5079f8(0x148),{'cwd':_0x2b41f3,'stdio':_0x5079f8(0x137)}));}}catch(_0x22be33){a51_0x14210b[_0x5079f8(0x15f)](_0x5079f8(0x161)+_0x22be33);return;}const _0x59d7cd=a51_0x25d186['join'](_0x2b41f3,_0x5079f8(0x141));let _0x1f03de='';if(a51_0x144379[_0x5079f8(0x17c)](_0x59d7cd)){const _0x55d6f8=JSON[_0x5079f8(0x183)](a51_0x144379['readFileSync'](_0x59d7cd,_0x5079f8(0x16c)));if(_0x55d6f8[_0x5079f8(0x16e)]){if(typeof _0x55d6f8[_0x5079f8(0x16e)]==='string')_0x1f03de=a51_0x25d186['join'](_0x2b41f3,_0x55d6f8['bin']);else{if(typeof _0x55d6f8[_0x5079f8(0x16e)]===_0x5079f8(0x154)){const _0x27529b=Object[_0x5079f8(0x16d)](_0x55d6f8[_0x5079f8(0x16e)])[0x0];_0x1f03de=a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x55d6f8[_0x5079f8(0x16e)][_0x27529b]);}}}else _0x55d6f8[_0x5079f8(0x162)]&&(_0x1f03de=a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x55d6f8['main']));}if(!_0x1f03de){const _0x470a84=[_0x5079f8(0x144),'build/index.js',_0x5079f8(0x163),'index.js'];for(const _0x5ab0ba of _0x470a84){if(a51_0x144379[_0x5079f8(0x17c)](a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x5ab0ba))){_0x1f03de=a51_0x25d186[_0x5079f8(0x14b)](_0x2b41f3,_0x5ab0ba);break;}}}if(!_0x1f03de){a51_0x14210b[_0x5079f8(0x15f)](_0x5079f8(0x169));return;}const _0x219909=_0x1f03de[_0x5079f8(0x15d)]('.ts')?_0x5079f8(0x178):_0x5079f8(0x15b);a51_0x14210b[_0x5079f8(0x156)](_0x5079f8(0x136)+_0x1f03de),addMcpServer(_0x4e6b21,_0x219909,[_0x1f03de]),a51_0x14210b[_0x5079f8(0x151)](_0x5079f8(0x15e)+_0x4e6b21+_0x5079f8(0x16a));}async function installMcpChromeBridge(){const _0x3ec16c=a51_0x425d6f;a51_0x14210b[_0x3ec16c(0x156)](_0x3ec16c(0x13c));try{execSync(_0x3ec16c(0x13a),{'stdio':_0x3ec16c(0x137)});}catch(_0x377fc2){a51_0x14210b['error'](_0x3ec16c(0x160)+_0x377fc2),a51_0x14210b[_0x3ec16c(0x156)](_0x3ec16c(0x165));try{execSync(_0x3ec16c(0x14c),{'stdio':_0x3ec16c(0x137)});}catch(_0x59b281){a51_0x14210b[_0x3ec16c(0x15f)](_0x3ec16c(0x164)+_0x59b281),a51_0x14210b[_0x3ec16c(0x156)](_0x3ec16c(0x176));return;}}const _0x433071=_0x3ec16c(0x173);addMcpHttpServer(_0x3ec16c(0x14d),_0x433071),a51_0x14210b['success'](_0x3ec16c(0x167)),a51_0x14210b['header']('Next\x20Steps:'),a51_0x14210b[_0x3ec16c(0x156)](_0x3ec16c(0x13b)),a51_0x14210b[_0x3ec16c(0x156)](_0x3ec16c(0x177)),a51_0x14210b['info'](_0x3ec16c(0x13f)),a51_0x14210b[_0x3ec16c(0x156)](_0x3ec16c(0x166));}export async function installMcpServer(_0x15e19f,_0x2d9822){const _0x44ab23=a51_0x425d6f;if(_0x15e19f===_0x44ab23(0x172)||_0x15e19f===_0x44ab23(0x13e))return installMcpChromeBridge();if(_0x15e19f[_0x44ab23(0x149)](_0x44ab23(0x14a))||_0x15e19f[_0x44ab23(0x15d)](_0x44ab23(0x139)))return installFromGithub(_0x15e19f,_0x2d9822);if(/^[a-zA-Z0-9_-]+\/[a-zA-Z0-9_-]+$/[_0x44ab23(0x179)](_0x15e19f))return installFromGithub(_0x44ab23(0x146)+_0x15e19f+_0x44ab23(0x139),_0x2d9822);a51_0x14210b[_0x44ab23(0x15f)](_0x44ab23(0x17b));}
|
package/dist/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a52_0x287de2=a52_0x392d;function a52_0x41b9(){const _0x5cdd09=['1482290olhHgV','darwin','arch','2YkXYwM','3585138MsoGbc','sudo\x20','6BSUkSR','windows','42074956vkiPsn','Windows','macos','72XVwUBR','112510vHMkuk','5495546tDwBfE','platform','1388493PTqYnT','256mdSTpl','11014856jYtGDZ','macOS','linux','win32'];a52_0x41b9=function(){return _0x5cdd09;};return a52_0x41b9();}(function(_0x4b9a12,_0x29e5c5){const _0x4bb539=a52_0x392d,_0x5d1cb9=_0x4b9a12();while(!![]){try{const _0x2605c9=parseInt(_0x4bb539(0x197))/0x1*(-parseInt(_0x4bb539(0x18b))/0x2)+-parseInt(_0x4bb539(0x18c))/0x3+-parseInt(_0x4bb539(0x198))/0x4*(parseInt(_0x4bb539(0x194))/0x5)+parseInt(_0x4bb539(0x18e))/0x6*(parseInt(_0x4bb539(0x195))/0x7)+parseInt(_0x4bb539(0x199))/0x8+parseInt(_0x4bb539(0x193))/0x9*(-parseInt(_0x4bb539(0x188))/0xa)+parseInt(_0x4bb539(0x190))/0xb;if(_0x2605c9===_0x29e5c5)break;else _0x5d1cb9['push'](_0x5d1cb9['shift']());}catch(_0x392870){_0x5d1cb9['push'](_0x5d1cb9['shift']());}}}(a52_0x41b9,0xbdcd8));function a52_0x392d(_0x2a1f12,_0x135f38){_0x2a1f12=_0x2a1f12-0x188;const _0x41b933=a52_0x41b9();let _0x392d5b=_0x41b933[_0x2a1f12];return _0x392d5b;}const platform=process[a52_0x287de2(0x196)],arch=process[a52_0x287de2(0x18a)];export function getPlatform(){const _0x4f5742=a52_0x287de2;if(platform===_0x4f5742(0x19c))return _0x4f5742(0x18f);if(platform===_0x4f5742(0x189))return _0x4f5742(0x192);return _0x4f5742(0x19b);}export function getArch(){return arch;}export function isWindows(){const _0x16fa1b=a52_0x287de2;return platform===_0x16fa1b(0x19c);}export function isMac(){return platform==='darwin';}export function isLinux(){return platform==='linux';}export function getShellPrefix(){const _0x1cd71b=a52_0x287de2;return isWindows()?'':_0x1cd71b(0x18d);}export function getPlatformInfo(){const _0x3a553a=a52_0x287de2,_0x41f4f3=getPlatform(),_0x39ae5a=_0x41f4f3===_0x3a553a(0x18f)?_0x3a553a(0x191):_0x41f4f3===_0x3a553a(0x192)?_0x3a553a(0x19a):'Linux';return _0x39ae5a+'\x20('+arch+')';}
|
package/dist/utils/storage.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export declare function setTheme(themeId: string): void;
|
|
|
15
15
|
export declare function getRules(): string[];
|
|
16
16
|
export declare function addRule(rule: string): void;
|
|
17
17
|
export declare function clearRules(): void;
|
|
18
|
+
export declare function getKnowledge(): string[];
|
|
19
|
+
export declare function addKnowledge(preset: string): void;
|
|
20
|
+
export declare function clearKnowledge(): void;
|
|
18
21
|
export declare function isLoggedIn(): boolean;
|
|
19
22
|
export declare function logout(): void;
|
|
20
23
|
export declare function wipeAll(): void;
|
package/dist/utils/storage.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a53_0xc2206e=a53_0x8ae7;(function(_0x40a61a,_0xd569a1){const _0x4aa480=a53_0x8ae7,_0x5ecf67=_0x40a61a();while(!![]){try{const _0x4b74ff=parseInt(_0x4aa480(0x9c))/0x1+parseInt(_0x4aa480(0x90))/0x2*(parseInt(_0x4aa480(0x94))/0x3)+-parseInt(_0x4aa480(0x97))/0x4+-parseInt(_0x4aa480(0x9d))/0x5*(-parseInt(_0x4aa480(0xa9))/0x6)+-parseInt(_0x4aa480(0xa4))/0x7*(-parseInt(_0x4aa480(0xa8))/0x8)+parseInt(_0x4aa480(0x93))/0x9+-parseInt(_0x4aa480(0x9f))/0xa;if(_0x4b74ff===_0xd569a1)break;else _0x5ecf67['push'](_0x5ecf67['shift']());}catch(_0x3cca7f){_0x5ecf67['push'](_0x5ecf67['shift']());}}}(a53_0x58a1,0x4410e));import a53_0x1a333e from'conf';const config=new a53_0x1a333e({'projectName':a53_0xc2206e(0xa5)});export function getToken(){const _0x2c9e7b=a53_0xc2206e;return config[_0x2c9e7b(0xa0)](_0x2c9e7b(0x96));}export function setToken(_0x3b0cd9){const _0x3b2eb3=a53_0xc2206e;config[_0x3b2eb3(0xaa)]('token',_0x3b0cd9);}export function clearToken(){const _0x1cce17=a53_0xc2206e;config['delete'](_0x1cce17(0x96));}export function getUser(){const _0x33b54b=a53_0xc2206e;return{'userId':config[_0x33b54b(0xa0)](_0x33b54b(0xa6)),'email':config[_0x33b54b(0xa0)](_0x33b54b(0x99)),'displayName':config['get']('displayName')};}export function setUser(_0x4f1d19,_0x15dd6e,_0x593af){const _0x42111a=a53_0xc2206e;config['set']('userId',_0x4f1d19),config['set'](_0x42111a(0x99),_0x15dd6e),config['set'](_0x42111a(0xa7),_0x593af);}export function clearUser(){const _0x2a888c=a53_0xc2206e;config['delete']('userId'),config[_0x2a888c(0xa2)](_0x2a888c(0x99)),config[_0x2a888c(0xa2)](_0x2a888c(0xa7));}export function getSelectedModel(){const _0x238619=a53_0xc2206e;return config['get'](_0x238619(0x95))||'gemini-2.5-flash';}export function setSelectedModel(_0x1b33ac){const _0x29006f=a53_0xc2206e;config[_0x29006f(0xaa)](_0x29006f(0x95),_0x1b33ac);}export function getTheme(){const _0x3bec54=a53_0xc2206e;return config['get']('theme')||_0x3bec54(0x98);}export function setTheme(_0x1ac643){const _0x140141=a53_0xc2206e;config['set'](_0x140141(0xa1),_0x1ac643);}export function getRules(){const _0xa717e0=a53_0xc2206e;return config['get'](_0xa717e0(0x92))||[];}export function addRule(_0x3c6895){const _0x32ae76=a53_0xc2206e,_0xf38ef4=getRules();_0xf38ef4[_0x32ae76(0x9e)](_0x3c6895),config['set'](_0x32ae76(0x92),_0xf38ef4);}export function clearRules(){const _0x5327e6=a53_0xc2206e;config[_0x5327e6(0xaa)](_0x5327e6(0x92),[]);}function a53_0x8ae7(_0x265b29,_0x3355e4){_0x265b29=_0x265b29-0x8e;const _0x58a1c7=a53_0x58a1();let _0x8ae7fe=_0x58a1c7[_0x265b29];return _0x8ae7fe;}export function getKnowledge(){const _0x542bf3=a53_0xc2206e,_0x15550e=config[_0x542bf3(0xa0)](_0x542bf3(0x9a));if(!_0x15550e||_0x15550e[_0x542bf3(0xa3)]===0x0){const _0x1aced7=[_0x542bf3(0x91),_0x542bf3(0x9b),_0x542bf3(0x8f),'Use\x20Server\x20Actions\x20for\x20data\x20mutations\x20and\x20fetching.\x20Avoid\x20traditional\x20API\x20routes\x20unless\x20building\x20external\x20standard\x20REST\x20endpoints.','Follow\x20mobile-first\x20responsive\x20design\x20patterns.\x20Build\x20clean,\x20minimal\x20UI\x20components\x20using\x20Tailwind\x20CSS.'];return config[_0x542bf3(0xaa)](_0x542bf3(0x9a),_0x1aced7),_0x1aced7;}return _0x15550e||[];}function a53_0x58a1(){const _0x5cee17=['rules','3693141KLByfv','3Nvyare','selectedModel','token','390012jnVYjo','woozlit_blue','email','knowledge','Use\x20the\x20App\x20Router\x20(app/\x20directory)\x20exclusively.\x20Avoid\x20the\x20pages/\x20directory.','345019giEWZn','548245HlUvke','push','9495230gQffJD','get','theme','delete','length','9219QLTPTa','woozlit-cli','userId','displayName','1232nHrIAt','6endfCd','set','clear','Default\x20to\x20Server\x20Components.\x20Only\x20add\x20\x27use\x20client\x27\x20when\x20hooks\x20(useState,\x20useEffect)\x20or\x20DOM\x20event\x20listeners\x20are\x20strictly\x20necessary.','515978QroVOB','You\x20are\x20an\x20expert\x20Next.js\x2015,\x20React\x2019,\x20and\x20Tailwind\x20CSS\x20developer.'];a53_0x58a1=function(){return _0x5cee17;};return a53_0x58a1();}export function addKnowledge(_0x46087b){const _0x1ac225=a53_0xc2206e,_0x152ec7=getKnowledge();_0x152ec7[_0x1ac225(0x9e)](_0x46087b),config[_0x1ac225(0xaa)](_0x1ac225(0x9a),_0x152ec7);}export function clearKnowledge(){const _0x38a25a=a53_0xc2206e;config[_0x38a25a(0xaa)](_0x38a25a(0x9a),[]);}export function isLoggedIn(){const _0x5b618e=a53_0xc2206e;return!!config[_0x5b618e(0xa0)]('token')&&!!config['get']('userId');}export function logout(){clearToken(),clearUser();}export function wipeAll(){const _0x32823=a53_0xc2206e;config[_0x32823(0x8e)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a54_0x38c020=a54_0x5bb7;(function(_0x59e9b7,_0xb1a178){const _0x5b160a=a54_0x5bb7,_0x184a05=_0x59e9b7();while(!![]){try{const _0x1c15a4=-parseInt(_0x5b160a(0x1c6))/0x1*(-parseInt(_0x5b160a(0x1d8))/0x2)+-parseInt(_0x5b160a(0x1be))/0x3+parseInt(_0x5b160a(0x1c9))/0x4*(-parseInt(_0x5b160a(0x1c4))/0x5)+-parseInt(_0x5b160a(0x1c3))/0x6+-parseInt(_0x5b160a(0x1d6))/0x7+-parseInt(_0x5b160a(0x1d1))/0x8+parseInt(_0x5b160a(0x1c8))/0x9;if(_0x1c15a4===_0xb1a178)break;else _0x184a05['push'](_0x184a05['shift']());}catch(_0x2aea8a){_0x184a05['push'](_0x184a05['shift']());}}}(a54_0x5948,0xce5eb));import a54_0x32af28 from'chalk';function a54_0x5948(){const _0x51162d=['log','3573960GaeaIe','...','\x20\x20Failed\x20to\x20auto-update.\x20Please\x20run:\x20npm\x20install\x20-g\x20woozlit','split','dist-tags','305494OluFLI','gray','614idQIqX','\x20\x20✔\x20Woozlit\x20updated\x20successfully!','\x20→\x20','child_process','223716MLDbQB','application/json','json','map','\x20\x20Update\x20Available!\x20','112644UmcEDM','37915pstrNW','dim','503cgCtbb','repeat','21435489NCUQfq','584HwMzPE','\x20\x20Auto-updating\x20to\x20version\x20','https://registry.npmjs.org/woozlit','timeout','2.2.0','latest','red'];a54_0x5948=function(){return _0x51162d;};return a54_0x5948();}const CURRENT_VERSION=a54_0x38c020(0x1cd);function a54_0x5bb7(_0x4a2c86,_0x5a6556){_0x4a2c86=_0x4a2c86-0x1bb;const _0x594815=a54_0x5948();let _0x5bb7ed=_0x594815[_0x4a2c86];return _0x5bb7ed;}export async function checkForUpdate(){const _0x336891=a54_0x38c020;try{const _0xd59f4c=await fetch(_0x336891(0x1cb),{'headers':{'Accept':_0x336891(0x1bf)},'signal':AbortSignal[_0x336891(0x1cc)](0x5dc)});if(!_0xd59f4c['ok'])return;const _0x2006dd=await _0xd59f4c[_0x336891(0x1c0)](),_0x537f3a=_0x2006dd[_0x336891(0x1d5)]?.[_0x336891(0x1ce)];_0x537f3a&&_0x537f3a!==CURRENT_VERSION&&(isNewer(_0x537f3a,CURRENT_VERSION)&&printUpdateBox(_0x537f3a,CURRENT_VERSION));}catch{}}function isNewer(_0x24f8c5,_0x1e0b23){const _0x35dc95=a54_0x38c020,_0x19737b=_0x24f8c5['split']('.')[_0x35dc95(0x1c1)](Number),_0x1ff235=_0x1e0b23[_0x35dc95(0x1d4)]('.')[_0x35dc95(0x1c1)](Number);for(let _0x4308ac=0x0;_0x4308ac<0x3;_0x4308ac++){if(_0x19737b[_0x4308ac]>_0x1ff235[_0x4308ac])return!![];if(_0x19737b[_0x4308ac]<_0x1ff235[_0x4308ac])return![];}return![];}function printUpdateBox(_0x43647b,_0x31441b){const _0x41dc79=a54_0x38c020,_0x37e7de=a54_0x32af28['yellow']('─'[_0x41dc79(0x1c7)](0x32));console['log'](),console[_0x41dc79(0x1d0)](_0x37e7de),console[_0x41dc79(0x1d0)](a54_0x32af28['yellow'](_0x41dc79(0x1c2)+a54_0x32af28[_0x41dc79(0x1c5)](_0x31441b)+_0x41dc79(0x1bc)+a54_0x32af28['green'](_0x43647b))),console[_0x41dc79(0x1d0)](a54_0x32af28[_0x41dc79(0x1d7)](_0x41dc79(0x1ca)+_0x43647b+_0x41dc79(0x1d2))),console[_0x41dc79(0x1d0)](_0x37e7de),console['log']();try{const {execSync:_0x434eaa}=require(_0x41dc79(0x1bd));_0x434eaa('npm\x20install\x20-g\x20woozlit',{'stdio':'inherit'}),console[_0x41dc79(0x1d0)](),console[_0x41dc79(0x1d0)](a54_0x32af28['green'](_0x41dc79(0x1bb))),console['log'](a54_0x32af28[_0x41dc79(0x1c5)]('\x20\x20Please\x20restart\x20the\x20CLI\x20to\x20use\x20the\x20new\x20version.')),console[_0x41dc79(0x1d0)](),process['exit'](0x0);}catch(_0x3de066){console['error'](a54_0x32af28[_0x41dc79(0x1cf)](_0x41dc79(0x1d3)));}}
|
package/dist/utils/updater.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a55_0x186a(){const _0x11ff31=['woozlit_new','/version.json','2VBAziv','length','info','warn','map','3923514AeHsld','319HnUeVA','...','10998UvkqBt','platform','woozlit','Checking\x20for\x20updates...','split','423137koTOMv','760Tzzjrx','408497afOmNo','8adLQxz','argv','197930HeHdvw','\x20\x20Run:\x20woozlit\x20update','version','3774915BitNvd','darwin','win','linux','12dmKXaa','arrayBuffer','downloads','success','timeout','error','Updated\x20to\x20v','win32','from','200166AsfUng','20lRMRXU','mac','Download\x20failed','No\x20download\x20available\x20for\x20your\x20platform','Failed\x20to\x20check\x20for\x20updates'];a55_0x186a=function(){return _0x11ff31;};return a55_0x186a();}(function(_0x3c976e,_0xf4e98b){const _0x3d3736=a55_0x397a,_0x4b03f9=_0x3c976e();while(!![]){try{const _0x1b2559=parseInt(_0x3d3736(0x184))/0x1*(parseInt(_0x3d3736(0x175))/0x2)+-parseInt(_0x3d3736(0x197))/0x3*(-parseInt(_0x3d3736(0x198))/0x4)+-parseInt(_0x3d3736(0x183))/0x5*(-parseInt(_0x3d3736(0x17d))/0x6)+-parseInt(_0x3d3736(0x17a))/0x7+-parseInt(_0x3d3736(0x185))/0x8*(-parseInt(_0x3d3736(0x18a))/0x9)+parseInt(_0x3d3736(0x187))/0xa*(-parseInt(_0x3d3736(0x17b))/0xb)+-parseInt(_0x3d3736(0x18e))/0xc*(-parseInt(_0x3d3736(0x182))/0xd);if(_0x1b2559===_0xf4e98b)break;else _0x4b03f9['push'](_0x4b03f9['shift']());}catch(_0xd4493d){_0x4b03f9['push'](_0x4b03f9['shift']());}}}(a55_0x186a,0x52920));import*as a55_0x2e7aa1 from'../ui/output.js';const UPDATE_URL='https://cli.woozlit.com';export async function checkForUpdates(_0x579985){const _0x5a8975=a55_0x397a;try{const _0x25a6ff=await fetch(UPDATE_URL+'/version.json',{'signal':AbortSignal[_0x5a8975(0x192)](0x1388)});if(!_0x25a6ff['ok'])return;const _0x29374c=await _0x25a6ff['json']();_0x29374c['version']!==_0x579985&&isNewer(_0x29374c[_0x5a8975(0x189)],_0x579985)&&(a55_0x2e7aa1[_0x5a8975(0x178)]('Update\x20available:\x20v'+_0x579985+'\x20->\x20v'+_0x29374c[_0x5a8975(0x189)]),a55_0x2e7aa1['dim'](_0x5a8975(0x188)));}catch{}}function a55_0x397a(_0x3d1c3b,_0x5cc084){_0x3d1c3b=_0x3d1c3b-0x16f;const _0x186a6d=a55_0x186a();let _0x397af9=_0x186a6d[_0x3d1c3b];return _0x397af9;}export async function performUpdate(){const _0x2dc903=a55_0x397a;try{a55_0x2e7aa1[_0x2dc903(0x177)](_0x2dc903(0x180));const _0x49b08a=await fetch(UPDATE_URL+_0x2dc903(0x174),{'signal':AbortSignal[_0x2dc903(0x192)](0x2710)});if(!_0x49b08a['ok'])return a55_0x2e7aa1[_0x2dc903(0x193)](_0x2dc903(0x172)),![];const _0x342868=await _0x49b08a['json'](),_0x15ac03=process[_0x2dc903(0x17e)];let _0x1ad093='';if(_0x15ac03===_0x2dc903(0x195))_0x1ad093=_0x342868[_0x2dc903(0x190)][_0x2dc903(0x18c)];else{if(_0x15ac03===_0x2dc903(0x18b))_0x1ad093=_0x342868[_0x2dc903(0x190)][_0x2dc903(0x16f)];else _0x1ad093=_0x342868[_0x2dc903(0x190)][_0x2dc903(0x18d)];}if(!_0x1ad093)return a55_0x2e7aa1[_0x2dc903(0x193)](_0x2dc903(0x171)),![];a55_0x2e7aa1[_0x2dc903(0x177)]('Downloading\x20v'+_0x342868['version']+_0x2dc903(0x17c));const _0x4801a6=_0x15ac03===_0x2dc903(0x195),_0x271dd2=_0x4801a6?'.exe':'',_0x3fb3a2=_0x2dc903(0x17f)+_0x271dd2,_0x55296a=_0x2dc903(0x173)+_0x271dd2,_0x656ea9=await fetch(_0x1ad093,{'signal':AbortSignal[_0x2dc903(0x192)](0xea60)});if(!_0x656ea9['ok'])return a55_0x2e7aa1['error'](_0x2dc903(0x170)),![];const {writeFileSync:_0x3bb824,renameSync:_0x5050d0,chmodSync:_0x4e2834}=await import('fs'),_0x264459=Buffer[_0x2dc903(0x196)](await _0x656ea9[_0x2dc903(0x18f)]()),_0x3c924f=process[_0x2dc903(0x186)][0x0],{dirname:_0xeaa0c7,join:_0x575793}=await import('path'),_0x5a75b6=_0xeaa0c7(_0x3c924f),_0x51bf2b=_0x575793(_0x5a75b6,_0x55296a);_0x3bb824(_0x51bf2b,_0x264459);if(!_0x4801a6)_0x4e2834(_0x51bf2b,0x1ed);try{_0x5050d0(_0x3c924f,_0x575793(_0x5a75b6,'woozlit_old'+_0x271dd2)),_0x5050d0(_0x51bf2b,_0x575793(_0x5a75b6,_0x3fb3a2));}catch{_0x5050d0(_0x51bf2b,_0x575793(_0x5a75b6,_0x3fb3a2));}return a55_0x2e7aa1[_0x2dc903(0x191)](_0x2dc903(0x194)+_0x342868['version']),!![];}catch(_0x145873){return a55_0x2e7aa1['error']('Update\x20failed:\x20'+_0x145873),![];}}function isNewer(_0x2dbcaf,_0x108000){const _0x2c9e50=a55_0x397a,_0x22c612=_0x2dbcaf[_0x2c9e50(0x181)]('.')[_0x2c9e50(0x179)](Number),_0xb8c3b6=_0x108000[_0x2c9e50(0x181)]('.')[_0x2c9e50(0x179)](Number);for(let _0x4b635d=0x0;_0x4b635d<Math['max'](_0x22c612['length'],_0xb8c3b6[_0x2c9e50(0x176)]);_0x4b635d++){const _0x32d50f=_0x22c612[_0x4b635d]||0x0,_0x119741=_0xb8c3b6[_0x4b635d]||0x0;if(_0x32d50f>_0x119741)return!![];if(_0x32d50f<_0x119741)return![];}return![];}
|