trimprompt 1.0.35 → 1.0.37
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 +14 -0
- package/cache-manager.js +1 -1
- package/cache.js +1 -1
- package/ccr.js +1 -1
- package/cli.js +1 -1
- package/dashboard.js +1 -1
- package/executor.js +1 -1
- package/file-watcher.js +1 -1
- package/filters/devops.js +1 -1
- package/filters/generic.js +1 -1
- package/filters/git.js +1 -1
- package/filters/go.js +1 -1
- package/filters/index.js +1 -1
- package/filters/js.js +1 -1
- package/filters/python.js +1 -1
- package/filters/rust.js +1 -1
- package/filters/shell.js +1 -1
- package/hooks/claude-hook.js +1 -1
- package/index.html +12 -12
- package/mcp.js +1 -1
- package/package.json +3 -4
- package/proxy-conv.js +1 -1
- package/proxy-resp.js +1 -1
- package/redactor.js +1 -1
- package/seed.js +1 -1
- package/shims.js +1 -1
- package/simulate.js +1 -1
- package/sync.js +1 -1
- package/tracker.js +1 -1
package/README.md
CHANGED
|
@@ -108,5 +108,19 @@ To keep your disk usage lightweight, TrimPrompt runs a background cleanup proces
|
|
|
108
108
|
|
|
109
109
|
---
|
|
110
110
|
|
|
111
|
+
## Privacy & Telemetry
|
|
112
|
+
TrimPrompt sends usage telemetry to the TrimPrompt cloud to power the savings dashboard and let us know a new install happened. Specifically:
|
|
113
|
+
|
|
114
|
+
- **On install:** an anonymous event (a randomly generated install ID, your OS, and the version). No personal data.
|
|
115
|
+
- **On first run and daily thereafter:** an event that includes the **domain of your `git config user.email`** (for example `acme.com` — never your full address), your OS, and aggregate token/cost savings. The domain is a company-level signal, not a personal email address.
|
|
116
|
+
|
|
117
|
+
**This is shown to you in the terminal the first time you run `trim`, before any identified data is sent.**
|
|
118
|
+
|
|
119
|
+
**Opt out at any time** — set the environment variable `TRIMPROMPT_NO_TELEMETRY=1` and no telemetry (anonymous or identified) is sent.
|
|
120
|
+
|
|
121
|
+
Questions or a deletion request? See this package page: https://www.npmjs.com/package/trimprompt
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
111
125
|
## License
|
|
112
126
|
Proprietary — TrimPrompt.ai
|
package/cache-manager.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0x2cce9b=a0_0x3a58;(function(_0x4e5d5b,_0x1d7dfb){const _0x3307d8=a0_0x3a58,_0x3c2891=_0x4e5d5b();while(!![]){try{const _0x4e3d7a=-parseInt(_0x3307d8(0xdb))/0x1*(parseInt(_0x3307d8(0xcb))/0x2)+-parseInt(_0x3307d8(0xcc))/0x3*(-parseInt(_0x3307d8(0x103))/0x4)+-parseInt(_0x3307d8(0xe7))/0x5+-parseInt(_0x3307d8(0xd0))/0x6*(-parseInt(_0x3307d8(0xfb))/0x7)+parseInt(_0x3307d8(0xe4))/0x8+parseInt(_0x3307d8(0xec))/0x9+parseInt(_0x3307d8(0xd7))/0xa;if(_0x4e3d7a===_0x1d7dfb)break;else _0x3c2891['push'](_0x3c2891['shift']());}catch(_0x55db56){_0x3c2891['push'](_0x3c2891['shift']());}}}(a0_0x2e9b,0x838ee));var __createBinding=this&&this[a0_0x2cce9b(0xd1)]||(Object[a0_0x2cce9b(0xf0)]?function(_0x2a9bd9,_0x2a383a,_0x1a9e8a,_0x50e92f){const _0x10d245=a0_0x2cce9b;if(_0x50e92f===undefined)_0x50e92f=_0x1a9e8a;var _0x5a4a90=Object['getOwnPropertyDescriptor'](_0x2a383a,_0x1a9e8a);(!_0x5a4a90||(_0x10d245(0x102)in _0x5a4a90?!_0x2a383a['__esModule']:_0x5a4a90['writable']||_0x5a4a90[_0x10d245(0xef)]))&&(_0x5a4a90={'enumerable':!![],'get':function(){return _0x2a383a[_0x1a9e8a];}}),Object[_0x10d245(0xf8)](_0x2a9bd9,_0x50e92f,_0x5a4a90);}:function(_0x9193c6,_0xda920d,_0x331d33,_0xde4dbc){if(_0xde4dbc===undefined)_0xde4dbc=_0x331d33;_0x9193c6[_0xde4dbc]=_0xda920d[_0x331d33];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x255cf3,_0x5308d8){const _0x2dc500=a0_0x2cce9b;Object[_0x2dc500(0xf8)](_0x255cf3,_0x2dc500(0xda),{'enumerable':!![],'value':_0x5308d8});}:function(_0x4cf96e,_0x421bf0){const _0xad47e=a0_0x2cce9b;_0x4cf96e[_0xad47e(0xda)]=_0x421bf0;}),__importStar=this&&this[a0_0x2cce9b(0xe2)]||(function(){var _0x136872=function(_0x5792b9){const _0x18bb4e=a0_0x3a58;return _0x136872=Object[_0x18bb4e(0xdd)]||function(_0x2a990d){const _0xe0497a=_0x18bb4e;var _0x523ef5=[];for(var _0x2935d1 in _0x2a990d)if(Object['prototype']['hasOwnProperty'][_0xe0497a(0xee)](_0x2a990d,_0x2935d1))_0x523ef5[_0x523ef5[_0xe0497a(0xf5)]]=_0x2935d1;return _0x523ef5;},_0x136872(_0x5792b9);};return function(_0x4aba3b){const _0x219ee9=a0_0x3a58;if(_0x4aba3b&&_0x4aba3b[_0x219ee9(0xf2)])return _0x4aba3b;var _0xe65b79={};if(_0x4aba3b!=null){for(var _0x34327b=_0x136872(_0x4aba3b),_0x532780=0x0;_0x532780<_0x34327b['length'];_0x532780++)if(_0x34327b[_0x532780]!=='default')__createBinding(_0xe65b79,_0x4aba3b,_0x34327b[_0x532780]);}return __setModuleDefault(_0xe65b79,_0x4aba3b),_0xe65b79;};}());Object[a0_0x2cce9b(0xf8)](exports,a0_0x2cce9b(0xf2),{'value':!![]}),exports[a0_0x2cce9b(0xf1)]=saveChunk,exports[a0_0x2cce9b(0xf4)]=retrieveChunk,exports['enforceEvictionPolicy']=enforceEvictionPolicy;const fs=__importStar(require('fs')),path=__importStar(require(a0_0x2cce9b(0xed))),os=__importStar(require('os')),crypto=__importStar(require('crypto')),baseDir=path[a0_0x2cce9b(0x101)](os[a0_0x2cce9b(0xd3)](),a0_0x2cce9b(0xfc)),cacheDir=path[a0_0x2cce9b(0x101)](baseDir,a0_0x2cce9b(0xd4)),MAX_CACHE_BYTES=0x1f4*0x400*0x400,TTL_MS=0xe*0x18*0x3c*0x3c*0x3e8;function ensureCacheDir(){const _0x3a5b89=a0_0x2cce9b;!fs['existsSync'](cacheDir)&&fs[_0x3a5b89(0xe6)](cacheDir,{'recursive':!![]});}function a0_0x2e9b(){const _0x2716d0=['.json','2626224LvoqLC','toISOString','mkdirSync','4846735EqVAnd','hex','digest','created_at','utf8','170406vJBvrB','path','call','configurable','create','saveChunk','__esModule','push','retrieveChunk','length','sort','getTime','defineProperty','birthtime','parse','226240rFZUFa','.trimprompt','existsSync','endsWith','statSync','lastAccessed','join','get','512jGjlZY','1829046sciVvk','18705PQvWMP','writeFileSync','isDirectory','substring','186kNFrvH','__createBinding','createHash','homedir','cache','update','unlinkSync','2755200vgPybQ','size','ceil','default','1kFIzzz','last_accessed_at','getOwnPropertyNames','tp_chk_','readFileSync','stringify','now','__importStar'];a0_0x2e9b=function(){return _0x2716d0;};return a0_0x2e9b();}function saveChunk(_0x536a9b,_0x589f70,_0x38f5b8,_0x12ce9b){const _0x2e766c=a0_0x2cce9b;ensureCacheDir();const _0x48b42a=crypto[_0x2e766c(0xd2)]('sha256')[_0x2e766c(0xd5)](_0x38f5b8)[_0x2e766c(0xe9)](_0x2e766c(0xe8))[_0x2e766c(0xcf)](0x0,0x8),_0xd72c40=_0x2e766c(0xde)+_0x48b42a,_0x52f61b=path['join'](cacheDir,_0x536a9b);!fs[_0x2e766c(0xfd)](_0x52f61b)&&fs['mkdirSync'](_0x52f61b,{'recursive':!![]});const _0x2bfe77=path['join'](_0x52f61b,_0xd72c40+_0x2e766c(0xe3)),_0x43f4d7=new Date()[_0x2e766c(0xe5)](),_0x9220bc=Math[_0x2e766c(0xd9)](_0x38f5b8[_0x2e766c(0xf5)]/0x4),_0x465659=Math['ceil'](_0x12ce9b['length']/0x4),_0x38b4ff={'chunk_id':_0xd72c40,'session_id':_0x536a9b,'agent_key':_0x589f70,'raw_tokens':_0x9220bc,'compressed_tokens':_0x465659,'created_at':_0x43f4d7,'last_accessed_at':_0x43f4d7,'summary':_0x12ce9b,'raw_payload':_0x38f5b8};return fs[_0x2e766c(0xcd)](_0x2bfe77,JSON[_0x2e766c(0xe0)](_0x38b4ff,null,0x2),_0x2e766c(0xeb)),enforceEvictionPolicy(),_0x38b4ff;}function retrieveChunk(_0x34de72){const _0x35b0b3=a0_0x2cce9b;ensureCacheDir();try{const _0x2d6f50=fs['readdirSync'](cacheDir);for(const _0x5e4b49 of _0x2d6f50){const _0x1359cd=path['join'](cacheDir,_0x5e4b49);if(fs[_0x35b0b3(0xff)](_0x1359cd)[_0x35b0b3(0xce)]()){const _0xa2b15f=path[_0x35b0b3(0x101)](_0x1359cd,_0x34de72+_0x35b0b3(0xe3));if(fs[_0x35b0b3(0xfd)](_0xa2b15f)){const _0x953ea5=fs[_0x35b0b3(0xdf)](_0xa2b15f,_0x35b0b3(0xeb)),_0x53385c=JSON[_0x35b0b3(0xfa)](_0x953ea5);return _0x53385c[_0x35b0b3(0xdc)]=new Date()['toISOString'](),fs['writeFileSync'](_0xa2b15f,JSON['stringify'](_0x53385c,null,0x2),'utf8'),_0x53385c;}}}}catch{}return null;}function a0_0x3a58(_0x12c789,_0x79f36){const _0x2e9be1=a0_0x2e9b();return a0_0x3a58=function(_0x3a58b8,_0x2c5c0b){_0x3a58b8=_0x3a58b8-0xcb;let _0x46b3d0=_0x2e9be1[_0x3a58b8];return _0x46b3d0;},a0_0x3a58(_0x12c789,_0x79f36);}function enforceEvictionPolicy(){const _0x1d75f5=a0_0x2cce9b;ensureCacheDir();try{const _0x60ae3c=Date[_0x1d75f5(0xe1)]();let _0x475bda=0x0;const _0x3b483d=[],_0x5656c7=fs['readdirSync'](cacheDir);for(const _0x224e65 of _0x5656c7){const _0x5ee122=path[_0x1d75f5(0x101)](cacheDir,_0x224e65);if(fs[_0x1d75f5(0xff)](_0x5ee122)['isDirectory']()){const _0x17137f=fs['readdirSync'](_0x5ee122);for(const _0x26d158 of _0x17137f){if(_0x26d158[_0x1d75f5(0xfe)](_0x1d75f5(0xe3))){const _0x5ed2dc=path[_0x1d75f5(0x101)](_0x5ee122,_0x26d158),_0x85bd65=fs[_0x1d75f5(0xff)](_0x5ed2dc);try{const _0x5dfedd=JSON[_0x1d75f5(0xfa)](fs['readFileSync'](_0x5ed2dc,_0x1d75f5(0xeb))),_0x2cbbe9=new Date(_0x5dfedd[_0x1d75f5(0xea)]||_0x85bd65[_0x1d75f5(0xf9)])['getTime'](),_0x5b1eae=new Date(_0x5dfedd[_0x1d75f5(0xdc)]||_0x85bd65['mtime'])[_0x1d75f5(0xf7)]();if(_0x60ae3c-_0x2cbbe9>TTL_MS){fs[_0x1d75f5(0xd6)](_0x5ed2dc);continue;}_0x475bda+=_0x85bd65['size'],_0x3b483d[_0x1d75f5(0xf3)]({'path':_0x5ed2dc,'size':_0x85bd65[_0x1d75f5(0xd8)],'lastAccessed':_0x5b1eae,'createdAt':_0x2cbbe9});}catch{fs['unlinkSync'](_0x5ed2dc);}}}}}if(_0x475bda>MAX_CACHE_BYTES){_0x3b483d[_0x1d75f5(0xf6)]((_0x425d29,_0x33f19f)=>_0x425d29[_0x1d75f5(0x100)]-_0x33f19f[_0x1d75f5(0x100)]);for(const _0x4d43fe of _0x3b483d){if(_0x475bda<=MAX_CACHE_BYTES*0.8)break;try{fs[_0x1d75f5(0xd6)](_0x4d43fe[_0x1d75f5(0xed)]),_0x475bda-=_0x4d43fe[_0x1d75f5(0xd8)];}catch{}}}}catch{}}
|
package/cache.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';function a0_0x1f45(){const _0x303cb2=['writable','yadm\x20show','\x20ls\x20','configurable','go-vet','defineProperty','includes','11fnkWmi','timestamp','\x20entries','length','yadm\x20status','yadm\x20log','go\x20vet','178466IPsYBU','\x20chars','__esModule','digest','split','kubectl\x20describe','docker-ps','git\x20log','kubectl','ruff\x20','kubectl\x20get','get','[cached\x20—\x20unchanged\x20since\x20','\x20lines,\x20','md5','79911SDCcrW','__createBinding','git\x20show','git-log','\x20tree','445235vBbeeg','git-status','slice','mkdirSync','file','homedir','getOwnPropertyNames','create','startsWith','339198SMDujN','crypto','1791Mcubwu','default','\x20lines','round','\x20tree\x20','\x20ls','git-show','6728luByub','utf8','35OxTrwn','.trimprompt','tree','cwd','update','__importStar','docker','stringify','existsSync','sort','2jEuzID','710230vqecaY','409224skUhzC','match','dedup','writeFileSync','__setModuleDefault','trim','s\x20ago,\x20'];a0_0x1f45=function(){return _0x303cb2;};return a0_0x1f45();}const a0_0x28261a=a0_0x2c3c;(function(_0x1a49e9,_0x5e91eb){const _0x4cea9b=a0_0x2c3c,_0x3e4007=_0x1a49e9();while(!![]){try{const _0x339866=parseInt(_0x4cea9b(0xc8))/0x1*(parseInt(_0x4cea9b(0xb1))/0x2)+-parseInt(_0x4cea9b(0x8e))/0x3+-parseInt(_0x4cea9b(0xb3))/0x4+-parseInt(_0x4cea9b(0x93))/0x5+parseInt(_0x4cea9b(0x9c))/0x6*(parseInt(_0x4cea9b(0xa7))/0x7)+-parseInt(_0x4cea9b(0xa5))/0x8*(parseInt(_0x4cea9b(0x9e))/0x9)+-parseInt(_0x4cea9b(0xb2))/0xa*(-parseInt(_0x4cea9b(0xc1))/0xb);if(_0x339866===_0x5e91eb)break;else _0x3e4007['push'](_0x3e4007['shift']());}catch(_0x3db79d){_0x3e4007['push'](_0x3e4007['shift']());}}}(a0_0x1f45,0x23d75));var __createBinding=this&&this[a0_0x28261a(0x8f)]||(Object[a0_0x28261a(0x9a)]?function(_0x31e601,_0x4a9b2c,_0x5539d1,_0x2a8919){const _0x39fb1d=a0_0x28261a;if(_0x2a8919===undefined)_0x2a8919=_0x5539d1;var _0x366ef1=Object['getOwnPropertyDescriptor'](_0x4a9b2c,_0x5539d1);(!_0x366ef1||(_0x39fb1d(0x8a)in _0x366ef1?!_0x4a9b2c[_0x39fb1d(0xca)]:_0x366ef1[_0x39fb1d(0xba)]||_0x366ef1[_0x39fb1d(0xbd)]))&&(_0x366ef1={'enumerable':!![],'get':function(){return _0x4a9b2c[_0x5539d1];}}),Object[_0x39fb1d(0xbf)](_0x31e601,_0x2a8919,_0x366ef1);}:function(_0x35ec2a,_0x5a0bc1,_0xd973db,_0x57e2ee){if(_0x57e2ee===undefined)_0x57e2ee=_0xd973db;_0x35ec2a[_0x57e2ee]=_0x5a0bc1[_0xd973db];}),__setModuleDefault=this&&this[a0_0x28261a(0xb7)]||(Object[a0_0x28261a(0x9a)]?function(_0x2c7307,_0x1dbf67){Object['defineProperty'](_0x2c7307,'default',{'enumerable':!![],'value':_0x1dbf67});}:function(_0x3d326d,_0x5da07b){_0x3d326d['default']=_0x5da07b;}),__importStar=this&&this[a0_0x28261a(0xac)]||(function(){var _0x3be821=function(_0x28f0ff){const _0x2f2765=a0_0x2c3c;return _0x3be821=Object[_0x2f2765(0x99)]||function(_0x4b333){const _0x452e4a=_0x2f2765;var _0x5b5bea=[];for(var _0x2c2548 in _0x4b333)if(Object['prototype']['hasOwnProperty']['call'](_0x4b333,_0x2c2548))_0x5b5bea[_0x5b5bea[_0x452e4a(0xc4)]]=_0x2c2548;return _0x5b5bea;},_0x3be821(_0x28f0ff);};return function(_0x21b137){const _0x15b673=a0_0x2c3c;if(_0x21b137&&_0x21b137[_0x15b673(0xca)])return _0x21b137;var _0x59fdfa={};if(_0x21b137!=null){for(var _0x1cfcc7=_0x3be821(_0x21b137),_0x34401e=0x0;_0x34401e<_0x1cfcc7['length'];_0x34401e++)if(_0x1cfcc7[_0x34401e]!==_0x15b673(0x9f))__createBinding(_0x59fdfa,_0x21b137,_0x1cfcc7[_0x34401e]);}return __setModuleDefault(_0x59fdfa,_0x21b137),_0x59fdfa;};}());Object[a0_0x28261a(0xbf)](exports,a0_0x28261a(0xca),{'value':!![]}),exports[a0_0x28261a(0xb5)]=dedup;function a0_0x2c3c(_0x30658e,_0x5ced6e){const _0x1f4582=a0_0x1f45();return a0_0x2c3c=function(_0x2c3c27,_0x17d46b){_0x2c3c27=_0x2c3c27-0x87;let _0x3f6af1=_0x1f4582[_0x2c3c27];return _0x3f6af1;},a0_0x2c3c(_0x30658e,_0x5ced6e);}const fs=__importStar(require('fs')),path=__importStar(require('path')),os=__importStar(require('os')),crypto=__importStar(require(a0_0x28261a(0x9d))),CACHE_DIR=path['join'](os[a0_0x28261a(0x98)](),a0_0x28261a(0xa8)),CACHE_FILE=path['join'](CACHE_DIR,'cache.json'),MAX_ENTRIES=0x12c,TTL_SECONDS={'file':0x78,'git-status':0x1e,'git-log':0x3c,'git-show':0xe10,'ls':0x3c,'tree':0x3c,'docker-ps':0x1e,'docker-images':0x3c,'kubectl':0x1e,'ruff':0x3c,'go-vet':0x3c};function classifyCommand(_0x1b1557){const _0x164f17=a0_0x28261a,_0x27d91b=_0x1b1557[_0x164f17(0xb8)]()['toLowerCase']();if(_0x27d91b['match'](/^(cat|head|tail|read|bat)\s/))return'file';if(_0x27d91b[_0x164f17(0xc0)]('git\x20status')||_0x27d91b['includes'](_0x164f17(0xc5)))return _0x164f17(0x94);if(_0x27d91b['includes'](_0x164f17(0xcf))||_0x27d91b['includes'](_0x164f17(0xc6)))return _0x164f17(0x91);if(_0x27d91b[_0x164f17(0xc0)](_0x164f17(0x90))||_0x27d91b[_0x164f17(0xc0)](_0x164f17(0xbb)))return _0x164f17(0xa4);if(_0x27d91b['match'](/^(ls|dir)(\s|$)/)||_0x27d91b[_0x164f17(0xc0)](_0x164f17(0xbc))||_0x27d91b['endsWith'](_0x164f17(0xa3)))return'ls';if(_0x27d91b['match'](/^tree(\s|$)/)||_0x27d91b[_0x164f17(0xc0)](_0x164f17(0xa2))||_0x27d91b['endsWith'](_0x164f17(0x92)))return _0x164f17(0xa9);if(_0x27d91b[_0x164f17(0xb4)](/docker\s+ps/))return _0x164f17(0xce);if(_0x27d91b[_0x164f17(0xb4)](/docker\s+images/))return'docker-images';if(_0x27d91b['includes'](_0x164f17(0x89))||_0x27d91b[_0x164f17(0xc0)](_0x164f17(0xcd)))return _0x164f17(0x87);if(_0x27d91b[_0x164f17(0xc0)]('ruff\x20check')||_0x27d91b[_0x164f17(0xc0)](_0x164f17(0x88)))return'ruff';if(_0x27d91b[_0x164f17(0xc0)](_0x164f17(0xc7)))return _0x164f17(0xbe);return'';}function md5(_0x2c8445){const _0x5a93ef=a0_0x28261a;return crypto['createHash'](_0x5a93ef(0x8d))[_0x5a93ef(0xab)](_0x2c8445)[_0x5a93ef(0xcb)]('hex');}function loadStore(){const _0x5ae976=a0_0x28261a;try{if(fs[_0x5ae976(0xaf)](CACHE_FILE))return JSON['parse'](fs['readFileSync'](CACHE_FILE,_0x5ae976(0xa6)));}catch{}return{};}function saveStore(_0x51151f){const _0xd8b5b5=a0_0x28261a;try{if(!fs[_0xd8b5b5(0xaf)](CACHE_DIR))fs[_0xd8b5b5(0x96)](CACHE_DIR,{'recursive':!![]});const _0x5c347e=Object['keys'](_0x51151f);if(_0x5c347e[_0xd8b5b5(0xc4)]>MAX_ENTRIES){const _0x549237=_0x5c347e[_0xd8b5b5(0xb0)]((_0x2c1d63,_0x1bbca2)=>_0x51151f[_0x2c1d63]['timestamp']-_0x51151f[_0x1bbca2][_0xd8b5b5(0xc2)]);for(const _0x20cb7e of _0x549237[_0xd8b5b5(0x95)](0x0,_0x5c347e[_0xd8b5b5(0xc4)]-MAX_ENTRIES)){delete _0x51151f[_0x20cb7e];}}fs[_0xd8b5b5(0xb6)](CACHE_FILE,JSON[_0xd8b5b5(0xae)](_0x51151f),_0xd8b5b5(0xa6));}catch{}}function buildSummary(_0x3374b1,_0x49b52f){const _0x53e433=a0_0x28261a,_0x1e365f=_0x3374b1[_0x53e433(0xcc)]('\x0a')[_0x53e433(0xc4)],_0x3db4b6=_0x3374b1['length'];if(_0x49b52f===_0x53e433(0x97))return _0x1e365f+_0x53e433(0x8c)+_0x3db4b6+'\x20chars';if(_0x49b52f===_0x53e433(0x94))return _0x1e365f+_0x53e433(0xa0);if(_0x49b52f===_0x53e433(0x91))return _0x1e365f+_0x53e433(0xc3);if(_0x49b52f[_0x53e433(0x9b)](_0x53e433(0xad)))return _0x1e365f+'\x20lines';return _0x1e365f+_0x53e433(0x8c)+_0x3db4b6+_0x53e433(0xc9);}function dedup(_0x239f52,_0x4c7491){const _0x3bb2c0=a0_0x28261a;try{const _0x49abb0=classifyCommand(_0x239f52);if(!_0x49abb0)return null;const _0x4e36cf=TTL_SECONDS[_0x49abb0];if(!_0x4e36cf)return null;const _0x5de8b1=process[_0x3bb2c0(0xaa)](),_0x5c7c84=md5(_0x5de8b1+'::'+_0x239f52[_0x3bb2c0(0xb8)]()),_0x3db687=md5(_0x4c7491),_0xa6a325=Date['now'](),_0x211ee1=loadStore(),_0x3390c6=_0x211ee1[_0x5c7c84];if(_0x3390c6&&_0x3390c6['hash']===_0x3db687&&_0xa6a325-_0x3390c6[_0x3bb2c0(0xc2)]<_0x4e36cf*0x3e8){const _0x1e78af=Math[_0x3bb2c0(0xa1)]((_0xa6a325-_0x3390c6['timestamp'])/0x3e8);return _0x3bb2c0(0x8b)+_0x1e78af+_0x3bb2c0(0xb9)+_0x3390c6['summary']+']';}_0x211ee1[_0x5c7c84]={'hash':_0x3db687,'summary':buildSummary(_0x4c7491,_0x49abb0),'timestamp':_0xa6a325,'chars':_0x4c7491[_0x3bb2c0(0xc4)]},saveStore(_0x211ee1);}catch{}return null;}
|
package/ccr.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const a0_0xd18535=a0_0x7539;function a0_0x4e1c(){const _0x35e916=['#\x20...\x20[collapsed]','md5','trim','package','class','.trimprompt','join','24jYUNys','def\x20','.ts','var','existsSync','__esModule','match','74QCSFcT','mkdirSync','346906dyxSMK','.java','3138110fURDBa','length','[TrimPrompt:\x20CCR\x20Active.\x20Body\x20of\x20functions\x20collapsed\x20to\x20save\x20tokens.\x20Hash:\x20','defineProperty','slice','10086Votest','.py','\x0a...\x20[','220736Hffbzl','path','4267nadOgf','\x22\x22\x22','replace','.txt','toLowerCase','create','digest','325WDLnHy','tp_','getOwnPropertyDescriptor','default','type','.jsx','repeat','function','get','createHash','.js','homedir','hasOwnProperty','push','hex','utf8','writeFileSync','skeletonize','call','176922tYdWbr','interface','from\x20','11OEPSmg','startsWith','extname','split','includes','class\x20','.\x20To\x20read\x20the\x20full\x20raw\x20content,\x20run\x20the\x20shell\x20command:\x20trim\x20retrieve\x20','\x20lines\x20collapsed\x20to\x20save\x20tokens]\x20...\x0a','substring','endsWith','export','ccr','import','__createBinding','904167RHmUSA','pub','const','crypto'];a0_0x4e1c=function(){return _0x35e916;};return a0_0x4e1c();}function a0_0x7539(_0x1d98c5,_0x1662ef){const _0x4e1cbe=a0_0x4e1c();return a0_0x7539=function(_0x753994,_0x5201ec){_0x753994=_0x753994-0x103;let _0x5aff26=_0x4e1cbe[_0x753994];return _0x5aff26;},a0_0x7539(_0x1d98c5,_0x1662ef);}(function(_0x399826,_0x1664d1){const _0x312bbc=a0_0x7539,_0x28f9f1=_0x399826();while(!![]){try{const _0x47129b=-parseInt(_0x312bbc(0x106))/0x1*(-parseInt(_0x312bbc(0x143))/0x2)+parseInt(_0x312bbc(0x120))/0x3+parseInt(_0x312bbc(0x104))/0x4+-parseInt(_0x312bbc(0x10d))/0x5*(-parseInt(_0x312bbc(0x14c))/0x6)+-parseInt(_0x312bbc(0x145))/0x7*(-parseInt(_0x312bbc(0x13c))/0x8)+-parseInt(_0x312bbc(0x131))/0x9+parseInt(_0x312bbc(0x147))/0xa*(-parseInt(_0x312bbc(0x123))/0xb);if(_0x47129b===_0x1664d1)break;else _0x28f9f1['push'](_0x28f9f1['shift']());}catch(_0x41f2be){_0x28f9f1['push'](_0x28f9f1['shift']());}}}(a0_0x4e1c,0x1c3f6));var __createBinding=this&&this[a0_0xd18535(0x130)]||(Object['create']?function(_0x44301e,_0x122b99,_0x4693c5,_0x551a74){const _0x395800=a0_0xd18535;if(_0x551a74===undefined)_0x551a74=_0x4693c5;var _0x20fb61=Object[_0x395800(0x10f)](_0x122b99,_0x4693c5);(!_0x20fb61||(_0x395800(0x115)in _0x20fb61?!_0x122b99[_0x395800(0x141)]:_0x20fb61['writable']||_0x20fb61['configurable']))&&(_0x20fb61={'enumerable':!![],'get':function(){return _0x122b99[_0x4693c5];}}),Object['defineProperty'](_0x44301e,_0x551a74,_0x20fb61);}:function(_0x5bac00,_0x4e8db0,_0xd3a2db,_0x680e7e){if(_0x680e7e===undefined)_0x680e7e=_0xd3a2db;_0x5bac00[_0x680e7e]=_0x4e8db0[_0xd3a2db];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0xd18535(0x10b)]?function(_0x9267c5,_0x427d48){const _0x25bcae=a0_0xd18535;Object[_0x25bcae(0x14a)](_0x9267c5,'default',{'enumerable':!![],'value':_0x427d48});}:function(_0x47bacf,_0x443fe3){const _0x13844b=a0_0xd18535;_0x47bacf[_0x13844b(0x110)]=_0x443fe3;}),__importStar=this&&this['__importStar']||(function(){var _0x45f30d=function(_0x29326b){return _0x45f30d=Object['getOwnPropertyNames']||function(_0xff358e){const _0x5b8365=a0_0x7539;var _0x23085e=[];for(var _0x3ba8c8 in _0xff358e)if(Object['prototype'][_0x5b8365(0x119)][_0x5b8365(0x11f)](_0xff358e,_0x3ba8c8))_0x23085e[_0x23085e[_0x5b8365(0x148)]]=_0x3ba8c8;return _0x23085e;},_0x45f30d(_0x29326b);};return function(_0xfc116){const _0x572895=a0_0x7539;if(_0xfc116&&_0xfc116['__esModule'])return _0xfc116;var _0x27d43a={};if(_0xfc116!=null){for(var _0x5cd7e0=_0x45f30d(_0xfc116),_0x5ff171=0x0;_0x5ff171<_0x5cd7e0[_0x572895(0x148)];_0x5ff171++)if(_0x5cd7e0[_0x5ff171]!=='default')__createBinding(_0x27d43a,_0xfc116,_0x5cd7e0[_0x5ff171]);}return __setModuleDefault(_0x27d43a,_0xfc116),_0x27d43a;};}());Object[a0_0xd18535(0x14a)](exports,'__esModule',{'value':!![]}),exports[a0_0xd18535(0x11e)]=skeletonize,exports['runCcr']=runCcr;const crypto=__importStar(require(a0_0xd18535(0x134))),fs=__importStar(require('fs')),path=__importStar(require(a0_0xd18535(0x105))),os=__importStar(require('os'));function skeletonize(_0x5a1a28,_0x35d0b5){const _0x15fbd1=a0_0xd18535,_0x308c83=path[_0x15fbd1(0x125)](_0x35d0b5[_0x15fbd1(0x126)]('\x20')['pop']()||'')[_0x15fbd1(0x10a)](),_0x159b54=_0x5a1a28['split']('\x0a'),_0x3036e1=[];if(_0x308c83===_0x15fbd1(0x14d)){let _0x203f42=![],_0x19e39b='';for(let _0x55ca2a=0x0;_0x55ca2a<_0x159b54['length'];_0x55ca2a++){const _0xf90856=_0x159b54[_0x55ca2a],_0x30fdc7=_0xf90856[_0x15fbd1(0x137)](),_0x3c38e7=_0xf90856[_0x15fbd1(0x148)]-_0xf90856['trimStart']()['length'];if(!_0x203f42&&(_0x30fdc7[_0x15fbd1(0x124)](_0x15fbd1(0x107))||_0x30fdc7[_0x15fbd1(0x124)]('\x27\x27\x27'))){_0x203f42=!![],_0x19e39b=_0x30fdc7[_0x15fbd1(0x12b)](0x0,0x3),_0x3036e1['push'](_0xf90856);_0x30fdc7['endsWith'](_0x19e39b)&&_0x30fdc7['length']>0x3&&(_0x203f42=![]);continue;}if(_0x203f42){_0x3036e1['push'](_0xf90856);_0x30fdc7[_0x15fbd1(0x12c)](_0x19e39b)&&(_0x203f42=![]);continue;}if(_0x30fdc7[_0x15fbd1(0x124)]('import\x20')||_0x30fdc7[_0x15fbd1(0x124)](_0x15fbd1(0x122))||_0x30fdc7[_0x15fbd1(0x124)](_0x15fbd1(0x128))||_0x30fdc7[_0x15fbd1(0x124)](_0x15fbd1(0x13d))||_0x30fdc7[_0x15fbd1(0x124)]('@')||_0x30fdc7['startsWith']('#')||_0x30fdc7[_0x15fbd1(0x148)]===0x0)_0x3036e1[_0x15fbd1(0x11a)](_0xf90856);else{const _0x5ec1e0=_0x3036e1[_0x3036e1[_0x15fbd1(0x148)]-0x1]||'';if(!_0x5ec1e0[_0x15fbd1(0x137)]()[_0x15fbd1(0x12c)](_0x15fbd1(0x135))){const _0xb5a96='\x20'[_0x15fbd1(0x113)](_0x3c38e7);_0x3036e1['push'](_0xb5a96+_0x15fbd1(0x135));}}}return _0x3036e1[_0x15fbd1(0x13b)]('\x0a');}if([_0x15fbd1(0x117),_0x15fbd1(0x13e),_0x15fbd1(0x112),'.tsx','.go','.rs',_0x15fbd1(0x146),'.c','.cpp','.h'][_0x15fbd1(0x127)](_0x308c83)){let _0x10b66a=0x0;for(let _0x59f510=0x0;_0x59f510<_0x159b54[_0x15fbd1(0x148)];_0x59f510++){const _0x15c9bc=_0x159b54[_0x59f510],_0x333ecc=_0x15c9bc[_0x15fbd1(0x137)](),_0x30f9a8=(_0x333ecc['match'](/\{/g)||[])[_0x15fbd1(0x148)],_0x3ee733=(_0x333ecc['match'](/\}/g)||[])['length'];if(_0x10b66a===0x0)(_0x333ecc['startsWith'](_0x15fbd1(0x12f))||_0x333ecc['startsWith'](_0x15fbd1(0x12d))||_0x333ecc[_0x15fbd1(0x124)](_0x15fbd1(0x133))||_0x333ecc[_0x15fbd1(0x124)]('let')||_0x333ecc[_0x15fbd1(0x124)](_0x15fbd1(0x13f))||_0x333ecc['startsWith'](_0x15fbd1(0x139))||_0x333ecc[_0x15fbd1(0x124)](_0x15fbd1(0x114))||_0x333ecc['startsWith'](_0x15fbd1(0x121))||_0x333ecc['startsWith'](_0x15fbd1(0x111))||_0x333ecc['startsWith'](_0x15fbd1(0x138))||_0x333ecc['startsWith']('fn')||_0x333ecc[_0x15fbd1(0x124)](_0x15fbd1(0x132))||_0x333ecc[_0x15fbd1(0x148)]===0x0||_0x333ecc[_0x15fbd1(0x124)]('//')||_0x333ecc[_0x15fbd1(0x124)]('/*')||_0x333ecc[_0x15fbd1(0x124)]('*'))&&_0x3036e1['push'](_0x15c9bc),_0x30f9a8>_0x3ee733&&(_0x10b66a+=_0x30f9a8-_0x3ee733);else{const _0x232d23=_0x10b66a+_0x30f9a8-_0x3ee733;if(_0x232d23<=0x0){const _0x3d20a6=_0x15c9bc[_0x15fbd1(0x142)](/^\s*/)?.[0x0]||'';_0x3036e1[_0x15fbd1(0x11a)](_0x3d20a6+'//\x20...\x20[collapsed]'),_0x3036e1[_0x15fbd1(0x11a)](_0x15c9bc),_0x10b66a=0x0;}else _0x10b66a=_0x232d23;}}return _0x3036e1['join']('\x0a');}if(_0x159b54[_0x15fbd1(0x148)]<=0x64)return _0x5a1a28;return[..._0x159b54[_0x15fbd1(0x14b)](0x0,0x1e),_0x15fbd1(0x103)+(_0x159b54[_0x15fbd1(0x148)]-0x32)+_0x15fbd1(0x12a),..._0x159b54['slice'](-0x14)][_0x15fbd1(0x13b)]('\x0a');}function runCcr(_0x3ec551,_0x1e00d6){const _0x5d2c57=a0_0xd18535,_0x4b1fea=_0x1e00d6[_0x5d2c57(0x108)](/\\/g,'/'),_0x3a71cf=_0x5d2c57(0x10e)+crypto[_0x5d2c57(0x116)](_0x5d2c57(0x136))['update'](_0x3ec551)[_0x5d2c57(0x10c)](_0x5d2c57(0x11b))[_0x5d2c57(0x12b)](0x0,0xa),_0x3d1167=path[_0x5d2c57(0x13b)](os[_0x5d2c57(0x118)](),_0x5d2c57(0x13a)),_0x45f9e6=path[_0x5d2c57(0x13b)](_0x3d1167,_0x5d2c57(0x12e));!fs[_0x5d2c57(0x140)](_0x45f9e6)&&fs[_0x5d2c57(0x144)](_0x45f9e6,{'recursive':!![]});fs[_0x5d2c57(0x11d)](path[_0x5d2c57(0x13b)](_0x45f9e6,_0x3a71cf+_0x5d2c57(0x109)),_0x3ec551,_0x5d2c57(0x11c));const _0xd4d4e3=skeletonize(_0x3ec551,_0x4b1fea);return _0x5d2c57(0x149)+_0x3a71cf+_0x5d2c57(0x129)+_0x3a71cf+']\x0a\x0a'+_0xd4d4e3;}
|
package/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const a0_0xfcec75=a0_0x1f09;(function(_0x4f3607,_0xd950f5){const _0x564c17=a0_0x1f09,_0x4780df=_0x4f3607();while(!![]){try{const _0x760def=parseInt(_0x564c17(0x1df))/0x1*(-parseInt(_0x564c17(0x26a))/0x2)+parseInt(_0x564c17(0x281))/0x3*(parseInt(_0x564c17(0x235))/0x4)+-parseInt(_0x564c17(0x287))/0x5*(parseInt(_0x564c17(0x22f))/0x6)+-parseInt(_0x564c17(0x1d7))/0x7+-parseInt(_0x564c17(0x21d))/0x8*(-parseInt(_0x564c17(0x26d))/0x9)+-parseInt(_0x564c17(0x1cf))/0xa+-parseInt(_0x564c17(0x1c3))/0xb*(-parseInt(_0x564c17(0x221))/0xc);if(_0x760def===_0xd950f5)break;else _0x4780df['push'](_0x4780df['shift']());}catch(_0xa6f4c1){_0x4780df['push'](_0x4780df['shift']());}}}(a0_0x1471,0x9087d));var __createBinding=this&&this[a0_0xfcec75(0x229)]||(Object[a0_0xfcec75(0x210)]?function(_0x23fe79,_0x41b095,_0x24428f,_0x4eafd1){const _0x19e01c=a0_0xfcec75;if(_0x4eafd1===undefined)_0x4eafd1=_0x24428f;var _0x7d1171=Object['getOwnPropertyDescriptor'](_0x41b095,_0x24428f);(!_0x7d1171||(_0x19e01c(0x24c)in _0x7d1171?!_0x41b095[_0x19e01c(0x288)]:_0x7d1171[_0x19e01c(0x21f)]||_0x7d1171['configurable']))&&(_0x7d1171={'enumerable':!![],'get':function(){return _0x41b095[_0x24428f];}}),Object['defineProperty'](_0x23fe79,_0x4eafd1,_0x7d1171);}:function(_0x4a678c,_0x1000be,_0x7daa8f,_0x4b7a57){if(_0x4b7a57===undefined)_0x4b7a57=_0x7daa8f;_0x4a678c[_0x4b7a57]=_0x1000be[_0x7daa8f];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object[a0_0xfcec75(0x210)]?function(_0x2f9929,_0x24bc3f){const _0x18de02=a0_0xfcec75;Object[_0x18de02(0x251)](_0x2f9929,_0x18de02(0x20e),{'enumerable':!![],'value':_0x24bc3f});}:function(_0x117f64,_0x3186ec){const _0x2962b4=a0_0xfcec75;_0x117f64[_0x2962b4(0x20e)]=_0x3186ec;}),__importStar=this&&this[a0_0xfcec75(0x24d)]||(function(){var _0x59e56a=function(_0x16d096){return _0x59e56a=Object['getOwnPropertyNames']||function(_0x55d7f4){const _0x545ec9=a0_0x1f09;var _0x11d9ed=[];for(var _0x207b76 in _0x55d7f4)if(Object[_0x545ec9(0x25e)][_0x545ec9(0x293)][_0x545ec9(0x25d)](_0x55d7f4,_0x207b76))_0x11d9ed[_0x11d9ed[_0x545ec9(0x1c8)]]=_0x207b76;return _0x11d9ed;},_0x59e56a(_0x16d096);};return function(_0xff7eef){const _0x3c212f=a0_0x1f09;if(_0xff7eef&&_0xff7eef[_0x3c212f(0x288)])return _0xff7eef;var _0x216ff5={};if(_0xff7eef!=null){for(var _0x126840=_0x59e56a(_0xff7eef),_0xb26cf8=0x0;_0xb26cf8<_0x126840['length'];_0xb26cf8++)if(_0x126840[_0xb26cf8]!=='default')__createBinding(_0x216ff5,_0xff7eef,_0x126840[_0xb26cf8]);}return __setModuleDefault(_0x216ff5,_0xff7eef),_0x216ff5;};}());Object['defineProperty'](exports,a0_0xfcec75(0x288),{'value':!![]});const commander_1=require(a0_0xfcec75(0x1d5)),executor_1=require('./executor'),filters_1=require('./filters'),tracker_1=require(a0_0xfcec75(0x1e1)),cache_1=require(a0_0xfcec75(0x275)),shims_1=require(a0_0xfcec75(0x1cb)),dashboard_1=require(a0_0xfcec75(0x208)),program=new commander_1[(a0_0xfcec75(0x1f4))]();function isDisabled(){return process.env.TRIMPROMPT_DISABLED==='1';}function adjustCommandArgs(_0x3adbbb,_0x18542a){const _0x49c487=a0_0xfcec75,_0xbe6aa9=_0x3adbbb[_0x49c487(0x220)]();if(_0xbe6aa9===_0x49c487(0x28c)||_0xbe6aa9===_0x49c487(0x272)){const _0x31d1bc=_0x18542a[0x0];if(_0x31d1bc===_0x49c487(0x1e4)){const _0x3b582d=_0x18542a['slice'](0x1),_0x317143=_0x3b582d[_0x49c487(0x1c8)]===0x0||_0x3b582d[_0x49c487(0x1fc)](_0x181672=>{const _0x297a94=_0x49c487;return _0x181672==='-b'||_0x181672===_0x297a94(0x1de)||_0x181672===_0x297a94(0x26f)||_0x181672==='-bs'||_0x181672==='-s'||_0x181672===_0x297a94(0x258);});if(_0x317143)return{'cmd':_0x3adbbb,'args':[_0x49c487(0x1e4),_0x49c487(0x27c),'-b']};}else{if(_0x31d1bc===_0x49c487(0x268)){const _0x4e9148=_0x18542a[_0x49c487(0x28d)](0x1),_0x573cfe=_0x4e9148[_0x49c487(0x1c1)](_0x3283dd=>_0x3283dd[_0x49c487(0x257)](_0x49c487(0x1c6))||_0x3283dd[_0x49c487(0x257)](_0x49c487(0x27e))||_0x3283dd[_0x49c487(0x257)](_0x49c487(0x228))),_0x525ffb=_0x4e9148[_0x49c487(0x1c1)](_0x1fc52c=>_0x1fc52c[_0x49c487(0x257)]('-')&&/^\d+$/['test'](_0x1fc52c['slice'](0x1))||_0x1fc52c==='-n'||_0x1fc52c[_0x49c487(0x257)](_0x49c487(0x203))),_0x3c1274=[..._0x18542a];if(!_0x573cfe){const _0x5c412a='--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---';_0x3c1274[_0x49c487(0x1c7)](process['platform']===_0x49c487(0x27b)?'\x22'+_0x5c412a+'\x22':_0x5c412a);}!_0x525ffb&&(_0x573cfe?_0x3c1274[_0x49c487(0x1c7)](_0x49c487(0x266)):_0x3c1274[_0x49c487(0x1c7)](_0x49c487(0x21e)));const _0x130eba=_0x4e9148[_0x49c487(0x1c1)](_0x46a2ec=>_0x46a2ec===_0x49c487(0x1f6)||_0x46a2ec===_0x49c487(0x20b)||_0x46a2ec[_0x49c487(0x257)](_0x49c487(0x1dd)));return!_0x130eba&&!_0x525ffb&&_0x3c1274[_0x49c487(0x1c7)](_0x49c487(0x20b)),{'cmd':_0x3adbbb,'args':_0x3c1274};}}}return{'cmd':_0x3adbbb,'args':_0x18542a};}function a0_0x1471(){const _0x3a2657=['mcp-proxy','4015422MiDjgk','watcher','-sb','config\x20parameter\x20name','%\x20reduction)','yadm','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','1.0.0','./cache','\x20USD',')\x20saved\x20','/dev/tty','proxy','<action>','win32','--porcelain','Manage\x20local\x20configuration\x20parameters','--pretty','dashboard','agent','1353dpAxYo','get\x20or\x20set','reductionPct','action','-p,\x20--port\x20<number>','Generate\x20a\x20clean,\x20compressed\x20copy\x20of\x20a\x20conversation\x20session\x20file\x20for\x20safe\x20resume','41285VlODOH','__esModule','compressOutput','version','Original\x20file\x20untouched:\x20','git','slice','keys','yarn','test','server-mcp','./mcp','hasOwnProperty','model_name','[TrimPrompt\x20Cache]\x20Chunk\x20\x27','./package.json','parse','some','getConfig','29344590hrcASF','=============================================','total_raw_tokens','--oneline','push','length','detectSessionTool','npx','./shims','resolve','Show\x20token\x20and\x20cost\x20savings\x20summary','tracker','9886030PYXBAT','stderr','Command\x20line\x20to\x20evaluate','exitCode','set','Port\x20to\x20run\x20the\x20dashboard\x20on','commander','Agent\x20key\x20(claude,\x20cursor,\x20codex,\x20...)','3667993ypyuZj','@modelcontextprotocol/','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','total_compressed_tokens','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','--min-parents','--branch','1NWoOwJ','true','./tracker','--help','savedTokens','status','join','existsSync','alias','-m,\x20--model\x20<string>','npm','value\x20to\x20set','[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','4000','mcp-server','modelcontextprotocol','\x20tokens\x1b[39m\x0a','\x20=\x20','port','\x0a=============================================','Command','retrieve','--merges','[value]','bun','antigravity','then','reason','every','config','help','./file-watcher','compressedTokens','node','./cache-manager','--max-count','1.0.35','cmd','Start\x20the\x20local\x20developer\x20dashboard','install','./dashboard','shims','false','--no-merges','\x20tokens\x20(','getStatsSummary','default','toLocaleString','create','Model\x20Context:\x20\x20\x20\x20\x20','lastRedactAudit','mcp','\x20(before\x20Trim)','\x0a\x1b[90m[TrimPrompt]\x20⚡\x20Active\x20session\x20(','money_saved_usd','rewriteCommand','\x0a[TrimPrompt\x20Compact]\x20Clean\x20compressed\x20session\x20copy\x20generated.','start','[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20','Raw:\x20\x20\x20\x20\x20\x20\x20\x20','claude','8bVbFzS','-10','writable','toLowerCase','12lfAXyx','Install\x20or\x20uninstall\x20system\x20command\x20shims','compressedBytes','tool','writeFileSync','<key>','executeCommand','--format','__createBinding','compact\x20[sessionId]','uninstall','command','__VERSION__','Saved:\x20\x20\x20\x20\x20\x20','498VOHdJQ','-a,\x20--agent\x20<agent>','raw_payload','lastFeatures','\x27\x20not\x20found\x20or\x20expired.','option','1692JVuyUu','stats','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','[TrimPrompt\x20Compact]\x20Could\x20not\x20find\x20a\x20session\x20file\x20for\x20\x27','redaction_enabled','install\x20or\x20uninstall','raw_cost_usd','rewrite','logExecution','compactPath','trim','(No\x20content\x20exceeded\x20the\x20offload\x20threshold\x20—\x20nothing\x20to\x20compress.)','\x20\x20claude\x20--resume\x20\x22','activeSavedTokens','args','message','\x20bytes)','---------------------------------------------','Retrieve\x20raw\x20offloaded\x20content\x20chunk\x20from\x20local\x20side-cache','startDashboard','stdout','fullPath','toFixed','get','__importStar','\x0aTo\x20resume\x20with\x20lightweight\x20context,\x20execute:','description','catch','defineProperty','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','\x20tokens\x20|\x20Total\x20savings:\x20','includes','argv','Error:\x20Value\x20required\x20for\x20set\x20action','startsWith','--short','write','uninstallShims','--version','model','call','prototype','=============================================\x0a','error','exit','[TrimPrompt\x20Compact]\x20','\x5c\x5c.\x5cCON','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','dedup','-50','total_tokens_saved','log','argument','1029382WfFNPp','Compact\x20session\x20copy:\x20\x20\x20\x20'];a0_0x1471=function(){return _0x3a2657;};return a0_0x1471();}function isMcpServerExecution(_0x58e3a5,_0x382b08){const _0x4df217=a0_0xfcec75,_0x3b132e=_0x58e3a5['toLowerCase'](),_0x3f99f2=_0x382b08[_0x4df217(0x1e5)]('\x20')[_0x4df217(0x220)]();if(_0x3b132e[_0x4df217(0x254)]('mcp')&&(_0x3b132e['includes']('server')||_0x3b132e[_0x4df217(0x254)](_0x4df217(0x279))))return!![];if(_0x3b132e===_0x4df217(0x1ca)||_0x3b132e===_0x4df217(0x201)||_0x3b132e===_0x4df217(0x1f8)||_0x3b132e===_0x4df217(0x1e9)||_0x3b132e==='pnpm'||_0x3b132e===_0x4df217(0x28f)){if(_0x3f99f2[_0x4df217(0x254)](_0x4df217(0x1d8))||_0x3f99f2['includes'](_0x4df217(0x1ef))||_0x3f99f2[_0x4df217(0x254)](_0x4df217(0x1ee))||_0x3f99f2[_0x4df217(0x254)]('server-mcp'))return!![];}if(_0x382b08[_0x4df217(0x1c1)](_0x469d41=>{const _0x28bb59=_0x4df217,_0x5494f4=_0x469d41[_0x28bb59(0x220)]();return _0x5494f4[_0x28bb59(0x254)](_0x28bb59(0x1ee))||_0x5494f4[_0x28bb59(0x254)](_0x28bb59(0x291))||_0x5494f4[_0x28bb59(0x254)](_0x28bb59(0x1d8))||_0x5494f4===_0x28bb59(0x26c)||_0x5494f4==='mcp';}))return!![];return![];}async function runProxy(_0x578db4){const _0x54694a=a0_0xfcec75;if(_0x578db4[_0x54694a(0x1c8)]===0x0){program[_0x54694a(0x1fe)]();return;}const _0x14e668=_0x578db4[0x0],_0x357151=_0x578db4[_0x54694a(0x28d)](0x1),_0x5a7241=_0x578db4[_0x54694a(0x1e5)]('\x20');if(isDisabled()){const _0x507075=await(0x0,executor_1[_0x54694a(0x227)])(_0x14e668,_0x357151);process[_0x54694a(0x249)]['write'](_0x507075[_0x54694a(0x249)]),process[_0x54694a(0x1d0)][_0x54694a(0x259)](_0x507075['stderr']),process[_0x54694a(0x261)](_0x507075[_0x54694a(0x1d2)]);}if(isMcpServerExecution(_0x14e668,_0x357151)){console['error'](_0x54694a(0x1eb));const {runMcpProxy:_0x4bf5e1}=await Promise[_0x54694a(0x1cc)]()['then'](()=>__importStar(require(_0x54694a(0x292))));_0x4bf5e1(_0x14e668,_0x357151);return;}const _0x11ab19=adjustCommandArgs(_0x14e668,_0x357151),_0x6eafca=await(0x0,executor_1[_0x54694a(0x227)])(_0x11ab19[_0x54694a(0x205)],_0x11ab19[_0x54694a(0x243)]),_0x1e8d9f=(0x0,filters_1[_0x54694a(0x289)])(_0x5a7241,_0x6eafca['stdout'],_0x6eafca['stderr'],tracker_1[_0x54694a(0x1ce)][_0x54694a(0x1c2)]()[_0x54694a(0x239)]),_0xab84ce={...filters_1[_0x54694a(0x212)]},_0x43441d=_0x6eafca['stdout']+(_0x6eafca[_0x54694a(0x1d0)][_0x54694a(0x23f)]()['length']>0x0?'\x0a'+_0x6eafca['stderr']:''),_0x570874=_0x1e8d9f['length']<_0x43441d[_0x54694a(0x1c8)]?_0x1e8d9f:_0x43441d,_0x5e9fab=_0x6eafca[_0x54694a(0x1d2)]===0x0?(0x0,cache_1[_0x54694a(0x265)])(_0x5a7241,_0x570874):null;tracker_1[_0x54694a(0x1ce)][_0x54694a(0x23d)](_0x5a7241,_0x43441d,_0x5e9fab||_0x570874,_0x6eafca[_0x54694a(0x1d2)],_0xab84ce,[...filters_1[_0x54694a(0x232)]]);_0x6eafca[_0x54694a(0x1d2)]===0x0?process['stdout']['write'](_0x570874+'\x0a'):(process[_0x54694a(0x249)][_0x54694a(0x259)](_0x1e8d9f+'\x0a'),_0x6eafca[_0x54694a(0x1d0)]['trim']()[_0x54694a(0x1c8)]>0x0&&!_0x1e8d9f[_0x54694a(0x254)](_0x6eafca['stderr'][_0x54694a(0x23f)]())&&process[_0x54694a(0x1d0)][_0x54694a(0x259)](_0x6eafca[_0x54694a(0x1d0)]+'\x0a'));try{const {loadSessionsState:_0x407d02,getLatestSessionFile:_0x598156}=await Promise[_0x54694a(0x1cc)]()[_0x54694a(0x1fa)](()=>__importStar(require(_0x54694a(0x1ff)))),_0x457b81=_0x407d02(),_0x1a8c1e=(0x0,tracker_1[_0x54694a(0x1c9)])(),_0x3839f0=_0x1a8c1e[_0x54694a(0x224)]===_0x54694a(0x1f9)?'gemini':_0x1a8c1e['tool']||_0x54694a(0x21c),_0x5e90a2=_0x598156(_0x3839f0);let _0x1fb2ef=0x0;_0x5e90a2&&_0x5e90a2[_0x54694a(0x24a)]&&_0x457b81[_0x5e90a2[_0x54694a(0x24a)]]&&(_0x1fb2ef=_0x457b81[_0x5e90a2['fullPath']][_0x54694a(0x242)]||0x0);let _0xad2192=0x0;for(const _0x5c047d of Object[_0x54694a(0x28e)](_0x457b81)){_0xad2192+=_0x457b81[_0x5c047d][_0x54694a(0x242)]||0x0;}(_0x1fb2ef>0x0||_0xad2192>0x0)&&process['stderr'][_0x54694a(0x259)](_0x54694a(0x215)+_0x3839f0+_0x54694a(0x277)+_0x1fb2ef[_0x54694a(0x20f)]()+_0x54694a(0x253)+_0xad2192[_0x54694a(0x20f)]()+_0x54694a(0x1f0));}catch{}process[_0x54694a(0x261)](_0x6eafca[_0x54694a(0x1d2)]);}program['name'](a0_0xfcec75(0x23f))[a0_0xfcec75(0x24f)]('TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%')['version'](((()=>{const _0x53e89e=a0_0xfcec75,_0x16fa7d=_0x53e89e(0x204);if(_0x16fa7d!==_0x53e89e(0x22d))return _0x16fa7d;try{return require('../package.json')[_0x53e89e(0x28a)];}catch{try{return require(_0x53e89e(0x1bf))['version'];}catch{return _0x53e89e(0x274);}}})())),program[a0_0xfcec75(0x22c)]('ui')[a0_0xfcec75(0x1e7)](a0_0xfcec75(0x27f))[a0_0xfcec75(0x24f)](a0_0xfcec75(0x206))[a0_0xfcec75(0x234)](a0_0xfcec75(0x285),a0_0xfcec75(0x1d4),a0_0xfcec75(0x1ed))[a0_0xfcec75(0x284)](_0x476494=>{const _0x43edf2=a0_0xfcec75,_0x1a6d0f=parseInt(_0x476494[_0x43edf2(0x1f2)],0xa);(0x0,dashboard_1[_0x43edf2(0x248)])(_0x1a6d0f);}),program['command'](a0_0xfcec75(0x236))[a0_0xfcec75(0x24f)](a0_0xfcec75(0x1cd))[a0_0xfcec75(0x234)](a0_0xfcec75(0x1e8),a0_0xfcec75(0x1da),'claude-3-5-sonnet')[a0_0xfcec75(0x284)](_0x495f08=>{const _0x1ff791=a0_0xfcec75,_0x3781ed=tracker_1['tracker'][_0x1ff791(0x20d)](_0x495f08[_0x1ff791(0x25c)]);console['log'](_0x1ff791(0x1f3)),console[_0x1ff791(0x268)](_0x1ff791(0x1d9)),console[_0x1ff791(0x268)](_0x1ff791(0x1c4)),console[_0x1ff791(0x268)](_0x1ff791(0x211)+_0x3781ed[_0x1ff791(0x294)]),console[_0x1ff791(0x268)](_0x1ff791(0x273)+_0x3781ed[_0x1ff791(0x1c5)][_0x1ff791(0x20f)]()),console['log'](_0x1ff791(0x1ec)+_0x3781ed[_0x1ff791(0x1db)]['toLocaleString']()),console[_0x1ff791(0x268)](_0x1ff791(0x264)+_0x3781ed[_0x1ff791(0x267)][_0x1ff791(0x20f)]()),console[_0x1ff791(0x268)]('Reduction\x20Rate:\x20\x20\x20\x20'+_0x3781ed['savings_percentage']+'%'),console['log']('Estimated\x20Cost:\x20\x20\x20\x20$'+_0x3781ed[_0x1ff791(0x23b)][_0x1ff791(0x24b)](0x4)+_0x1ff791(0x214)),console[_0x1ff791(0x268)](_0x1ff791(0x237)+_0x3781ed['compressed_cost_usd']['toFixed'](0x4)+'\x20(after\x20Trim)'),console['log'](_0x1ff791(0x246)),console[_0x1ff791(0x268)]('Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$'+_0x3781ed[_0x1ff791(0x216)]['toFixed'](0x4)+_0x1ff791(0x276)),console[_0x1ff791(0x268)](_0x1ff791(0x25f));}),program['command'](a0_0xfcec75(0x1fd))[a0_0xfcec75(0x24f)](a0_0xfcec75(0x27d))['argument'](a0_0xfcec75(0x27a),a0_0xfcec75(0x282))[a0_0xfcec75(0x269)](a0_0xfcec75(0x226),a0_0xfcec75(0x270))[a0_0xfcec75(0x269)](a0_0xfcec75(0x1f7),a0_0xfcec75(0x1ea))[a0_0xfcec75(0x284)]((_0x5a7062,_0x41f347,_0x237ebd)=>{const _0x5d0797=a0_0xfcec75;if(_0x5a7062===_0x5d0797(0x24c)){const _0x1dc12e=tracker_1[_0x5d0797(0x1ce)][_0x5d0797(0x1c2)]();console['log'](_0x41f347+':\x20'+_0x1dc12e[_0x41f347]);}else{if(_0x5a7062===_0x5d0797(0x1d3)){_0x237ebd===undefined&&(console['error'](_0x5d0797(0x256)),process['exit'](0x1));let _0x2b237a=_0x237ebd;if(_0x237ebd===_0x5d0797(0x1e0))_0x2b237a=!![];if(_0x237ebd===_0x5d0797(0x20a))_0x2b237a=![];if(/^\d+$/[_0x5d0797(0x290)](_0x237ebd))_0x2b237a=parseInt(_0x237ebd,0xa);tracker_1[_0x5d0797(0x1ce)]['setConfig'](_0x41f347,_0x2b237a),console[_0x5d0797(0x268)]('Config\x20set\x20'+_0x41f347+_0x5d0797(0x1f1)+_0x237ebd);}else console[_0x5d0797(0x260)](_0x5d0797(0x1dc)),process['exit'](0x1);}});function a0_0x1f09(_0x319480,_0x188e09){_0x319480=_0x319480-0x1be;const _0x1471ee=a0_0x1471();let _0x1f09ac=_0x1471ee[_0x319480];return _0x1f09ac;}function printMessage(_0x29ec6a){const _0x1766cf=a0_0xfcec75;if(process.env.npm_lifecycle_event==='postinstall')try{const _0xfaa301=require('fs'),_0x31b785=process['platform']===_0x1766cf(0x27b)?_0x1766cf(0x263):_0x1766cf(0x278);_0xfaa301[_0x1766cf(0x225)](_0x31b785,'\x0a'+_0x29ec6a+'\x0a');return;}catch{}console[_0x1766cf(0x268)](_0x29ec6a);}program['command'](a0_0xfcec75(0x209))['description'](a0_0xfcec75(0x222))['argument'](a0_0xfcec75(0x27a),a0_0xfcec75(0x23a))[a0_0xfcec75(0x284)](_0x35d8db=>{const _0xde122c=a0_0xfcec75;if(_0x35d8db==='install'){const _0x4c58ef=(0x0,shims_1['installShims'])();printMessage(_0x4c58ef[_0xde122c(0x244)]);}else{if(_0x35d8db===_0xde122c(0x22b)){const _0xef6685=(0x0,shims_1[_0xde122c(0x25a)])();printMessage(_0xef6685[_0xde122c(0x244)]);}else console[_0xde122c(0x260)]('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process[_0xde122c(0x261)](0x1);}}),program[a0_0xfcec75(0x22c)](a0_0xfcec75(0x23c))[a0_0xfcec75(0x24f)](a0_0xfcec75(0x252))[a0_0xfcec75(0x269)]('<commandLine>',a0_0xfcec75(0x1d1))[a0_0xfcec75(0x284)](_0x2651be=>{const _0x1d2470=a0_0xfcec75;if(isDisabled()){console['log'](_0x2651be);return;}const _0x33792d=(0x0,filters_1[_0x1d2470(0x217)])(_0x2651be);console['log'](_0x33792d);}),program[a0_0xfcec75(0x22c)]('watcher\x20[action]')[a0_0xfcec75(0x24f)]('Live\x20conversation\x20file-watcher\x20daemon\x20—\x20start,\x20install')[a0_0xfcec75(0x284)](async _0x21e833=>{const _0x975941=a0_0xfcec75,{startWatcherDaemon:_0x4437a2}=await Promise[_0x975941(0x1cc)]()[_0x975941(0x1fa)](()=>__importStar(require(_0x975941(0x1ff))));(!_0x21e833||_0x21e833===_0x975941(0x219)||_0x21e833===_0x975941(0x207))&&_0x4437a2();}),program[a0_0xfcec75(0x22c)]('retrieve\x20<chunkId>')[a0_0xfcec75(0x24f)](a0_0xfcec75(0x247))['action'](async _0x165dec=>{const _0x440971=a0_0xfcec75,{retrieveChunk:_0x2010fd}=await Promise[_0x440971(0x1cc)]()['then'](()=>__importStar(require(_0x440971(0x202)))),_0x2e656c=_0x2010fd(_0x165dec);_0x2e656c?console[_0x440971(0x268)](_0x2e656c[_0x440971(0x231)]):(console[_0x440971(0x260)](_0x440971(0x1be)+_0x165dec+_0x440971(0x233)),process[_0x440971(0x261)](0x1));}),program[a0_0xfcec75(0x22c)](a0_0xfcec75(0x22a))[a0_0xfcec75(0x24f)](a0_0xfcec75(0x286))['option'](a0_0xfcec75(0x230),a0_0xfcec75(0x1d6),a0_0xfcec75(0x21c))[a0_0xfcec75(0x284)](async(_0x440984,_0x2fe88d)=>{const _0x339c0e=a0_0xfcec75,{getLatestSessionFile:_0x6a4987,compactSessionCopy:_0x4e1af4}=await Promise[_0x339c0e(0x1cc)]()[_0x339c0e(0x1fa)](()=>__importStar(require(_0x339c0e(0x1ff)))),_0x512d86=await Promise['resolve']()[_0x339c0e(0x1fa)](()=>__importStar(require('fs'))),_0x4a2778=_0x2fe88d&&_0x2fe88d[_0x339c0e(0x280)]||_0x339c0e(0x21c);let _0x5ee0fc=_0x440984;if(!_0x440984||!_0x512d86[_0x339c0e(0x1e6)](_0x440984)){const _0x123397=_0x6a4987(_0x4a2778);_0x5ee0fc=_0x123397[_0x339c0e(0x24a)];}if(!_0x5ee0fc||!_0x512d86['existsSync'](_0x5ee0fc)){console[_0x339c0e(0x260)](_0x339c0e(0x238)+_0x4a2778+'\x27.');return;}const _0x29802e=_0x4e1af4(_0x5ee0fc,_0x4a2778);if(!_0x29802e['ok']){console['error'](_0x339c0e(0x262)+_0x29802e[_0x339c0e(0x1fb)]);return;}console[_0x339c0e(0x268)](_0x339c0e(0x218)),console[_0x339c0e(0x268)](_0x339c0e(0x28b)+_0x5ee0fc),console[_0x339c0e(0x268)](_0x339c0e(0x26b)+_0x29802e[_0x339c0e(0x23e)]),console['log'](_0x339c0e(0x21b)+_0x29802e['rawTokens']?.[_0x339c0e(0x20f)]()+_0x339c0e(0x20c)+_0x29802e['rawBytes']?.[_0x339c0e(0x20f)]()+_0x339c0e(0x245)),console['log']('Compressed:\x20'+_0x29802e[_0x339c0e(0x200)]?.[_0x339c0e(0x20f)]()+'\x20tokens\x20('+_0x29802e[_0x339c0e(0x223)]?.[_0x339c0e(0x20f)]()+'\x20bytes)'),console[_0x339c0e(0x268)](_0x339c0e(0x22e)+_0x29802e[_0x339c0e(0x1e3)]?.['toLocaleString']()+'\x20tokens\x20('+_0x29802e[_0x339c0e(0x283)]+_0x339c0e(0x271)),(_0x29802e[_0x339c0e(0x1e3)]||0x0)===0x0?console[_0x339c0e(0x268)](_0x339c0e(0x240)):(console['log'](_0x339c0e(0x24e)),console['log'](_0x339c0e(0x241)+_0x29802e[_0x339c0e(0x23e)]+'\x22')),console[_0x339c0e(0x268)]('');});const args=process[a0_0xfcec75(0x255)][a0_0xfcec75(0x28d)](0x2),firstArg=args[0x0],subcommands=['ui','dashboard',a0_0xfcec75(0x236),a0_0xfcec75(0x1fd),'shims','rewrite',a0_0xfcec75(0x26c),a0_0xfcec75(0x213),a0_0xfcec75(0x26e),a0_0xfcec75(0x1f5),'compact',a0_0xfcec75(0x1fe),a0_0xfcec75(0x1e2),'-h',a0_0xfcec75(0x28a),a0_0xfcec75(0x25b),'-v'];firstArg&&!subcommands['includes'](firstArg)?runProxy(args)[a0_0xfcec75(0x250)](_0x38504d=>{const _0x277059=a0_0xfcec75;console[_0x277059(0x260)](_0x277059(0x21a)+_0x38504d[_0x277059(0x244)]),process[_0x277059(0x261)](0x1);}):program[a0_0xfcec75(0x1c0)](process[a0_0xfcec75(0x255)]);
|
|
2
|
+
'use strict';const a0_0x8236b0=a0_0x3478;(function(_0x351407,_0x37e087){const _0x2b7470=a0_0x3478,_0x51719a=_0x351407();while(!![]){try{const _0x29fec9=parseInt(_0x2b7470(0x127))/0x1*(-parseInt(_0x2b7470(0x1c9))/0x2)+parseInt(_0x2b7470(0x1ee))/0x3+-parseInt(_0x2b7470(0x162))/0x4*(-parseInt(_0x2b7470(0x15a))/0x5)+-parseInt(_0x2b7470(0x139))/0x6+-parseInt(_0x2b7470(0x1c1))/0x7*(parseInt(_0x2b7470(0x1ea))/0x8)+-parseInt(_0x2b7470(0x1e9))/0x9+-parseInt(_0x2b7470(0x1e1))/0xa*(-parseInt(_0x2b7470(0x140))/0xb);if(_0x29fec9===_0x37e087)break;else _0x51719a['push'](_0x51719a['shift']());}catch(_0x1da27c){_0x51719a['push'](_0x51719a['shift']());}}}(a0_0x3f7f,0xc96ae));function a0_0x3478(_0x48d730,_0x459840){const _0x3f7ff7=a0_0x3f7f();return a0_0x3478=function(_0x3478fa,_0x290ea8){_0x3478fa=_0x3478fa-0x120;let _0x558566=_0x3f7ff7[_0x3478fa];return _0x558566;},a0_0x3478(_0x48d730,_0x459840);}var __createBinding=this&&this['__createBinding']||(Object[a0_0x8236b0(0x1f7)]?function(_0x37719b,_0x5e6208,_0x5d8c73,_0x1db845){const _0x5dbd07=a0_0x8236b0;if(_0x1db845===undefined)_0x1db845=_0x5d8c73;var _0x520646=Object[_0x5dbd07(0x1dc)](_0x5e6208,_0x5d8c73);(!_0x520646||(_0x5dbd07(0x214)in _0x520646?!_0x5e6208[_0x5dbd07(0x179)]:_0x520646[_0x5dbd07(0x1a0)]||_0x520646[_0x5dbd07(0x19f)]))&&(_0x520646={'enumerable':!![],'get':function(){return _0x5e6208[_0x5d8c73];}}),Object[_0x5dbd07(0x130)](_0x37719b,_0x1db845,_0x520646);}:function(_0x5ba71a,_0x5b453d,_0x46adb9,_0x4309e2){if(_0x4309e2===undefined)_0x4309e2=_0x46adb9;_0x5ba71a[_0x4309e2]=_0x5b453d[_0x46adb9];}),__setModuleDefault=this&&this[a0_0x8236b0(0x158)]||(Object['create']?function(_0x55ebb6,_0x48ff3c){const _0x1e7297=a0_0x8236b0;Object[_0x1e7297(0x130)](_0x55ebb6,_0x1e7297(0x143),{'enumerable':!![],'value':_0x48ff3c});}:function(_0x55cd52,_0x3e2108){_0x55cd52['default']=_0x3e2108;}),__importStar=this&&this[a0_0x8236b0(0x1c5)]||(function(){var _0x43aa9f=function(_0x5e3afb){const _0x952476=a0_0x3478;return _0x43aa9f=Object[_0x952476(0x1bc)]||function(_0x48e884){const _0x17d7fd=_0x952476;var _0xc84a9=[];for(var _0x573ba5 in _0x48e884)if(Object[_0x17d7fd(0x19c)][_0x17d7fd(0x1ec)][_0x17d7fd(0x17b)](_0x48e884,_0x573ba5))_0xc84a9[_0xc84a9['length']]=_0x573ba5;return _0xc84a9;},_0x43aa9f(_0x5e3afb);};return function(_0x5d6ecf){const _0x2f461b=a0_0x3478;if(_0x5d6ecf&&_0x5d6ecf[_0x2f461b(0x179)])return _0x5d6ecf;var _0x1d9490={};if(_0x5d6ecf!=null){for(var _0xe27aab=_0x43aa9f(_0x5d6ecf),_0x2d80bf=0x0;_0x2d80bf<_0xe27aab['length'];_0x2d80bf++)if(_0xe27aab[_0x2d80bf]!=='default')__createBinding(_0x1d9490,_0x5d6ecf,_0xe27aab[_0x2d80bf]);}return __setModuleDefault(_0x1d9490,_0x5d6ecf),_0x1d9490;};}());Object[a0_0x8236b0(0x130)](exports,a0_0x8236b0(0x179),{'value':!![]});function a0_0x3f7f(){const _0x5257b5=['executeCommand','Start\x20the\x20local\x20developer\x20dashboard','./tracker','.trimprompt','mcp-proxy','\x20\x20Then\x20just\x20work\x20normally.\x20TrimPrompt\x20trims\x20your\x20command','child_process','spawn','__setModuleDefault','Reduction\x20Rate:\x20\x20\x20\x20','5JJywdH','Try\x20it:','--branch','./filters','\x0a=============================================','dirname','../package.json','\x20tokens\x20(','4290976eiKQmB','push','Select\x20pricing\x20model\x20(e.g.\x20claude-3-5-sonnet,\x20gpt-4o)','Model\x20Context:\x20\x20\x20\x20\x20','compactPath','(No\x20content\x20exceeded\x20the\x20offload\x20threshold\x20—\x20nothing\x20to\x20compress.)','install\x20or\x20uninstall','sync.js','then','-50','keys','antigravity','getStatsSummary','cmd','Live\x20conversation\x20file-watcher\x20daemon\x20—\x20start,\x20install','\x1b[1m','compressed_cost_usd','getConfig','write','execPath','set','__VERSION__','name','__esModule','\x1b[36m','call','raw_cost_usd','startDashboard','──────────────────────────────────────────────────────────','\x20\x20·\x20\x20npmjs.com/package/trimprompt','Check\x20a\x20command\x20line\x20and\x20return\x20the\x20optimized\x20command\x20line','watcher','lastFeatures','\x5c\x5c.\x5cCON','claude','exit','-p,\x20--port\x20<number>','uninstallShims','<key>','toISOString','test','catch','-10','resolve','\x20\x20✂\x20\x20','Raw:\x20\x20\x20\x20\x20\x20\x20\x20','commander','setConfig','-a,\x20--agent\x20<agent>','\x20\x20\x20','rewriteCommand','stdout','→\x20\x20open\x20the\x20live\x20dashboard\x20in\x20your\x20browser','--pretty=format:%h\x20%s\x20(%ar)\x20(%an)%n%b%n---END---','--format','\x20(before\x20Trim)','argument','detectSessionTool','prototype','dashboard','total_tokens_saved','configurable','writable','version','\x1b[90m','install','some','gemini','Generate\x20a\x20clean,\x20compressed\x20copy\x20of\x20a\x20conversation\x20session\x20file\x20for\x20safe\x20resume','--pretty','.welcomed','port','⚠\x20\x20Restart\x20your\x20terminal\x20once','yadm','command','config','--max-count','writeFileSync','---------------------------------------------','start','log','dedup','env','./shims','@modelcontextprotocol/','[TrimPrompt\x20Compact]\x20Could\x20not\x20find\x20a\x20session\x20file\x20for\x20\x27','\x1b[33m','shims','stderr','4000','getOwnPropertyNames','Command\x20line\x20to\x20evaluate','\x1b[0m','npx','toFixed','1415267YMzpyb','\x20\x20to\x20our\x20cloud.\x20Opt\x20out:\x20','tracker','Saved:\x20\x20\x20\x20\x20\x20','__importStar','slice','status','\x1b[32m','156822SRqIcA','rewrite','./mcp','--version','\x20tokens\x1b[39m\x0a','Tokens\x20Saved:\x20\x20\x20\x20\x20\x20','\x20\x20output\x20automatically\x20in\x20the\x20background\x20—\x20nothing\x20to\x20configure.','mcp','Compressed:\x20\x20\x20\x20\x20\x20\x20\x20','model_name','→\x20\x20tokens\x20&\x20money\x20you\x27ve\x20saved\x20so\x20far','npm_lifecycle_event','homedir','description','TrimPrompt\x20is\x20installed\x20—\x20you\x27re\x20saving\x20tokens!','Config\x20set\x20','Port\x20to\x20run\x20the\x20dashboard\x20on','includes','raw_payload','getOwnPropertyDescriptor','money_saved_usd','\x20=\x20','Compact\x20session\x20copy:\x20\x20\x20\x20','tool','52370LEiCNt','./cache','startsWith','--oneline','proxy','TRIMPROMPT_NO_TELEMETRY=1','false','./package.json','11108232toMAqc','8VMxlwt','compact','hasOwnProperty','retrieve\x20<chunkId>','2245176qgoEaV','Show\x20token\x20and\x20cost\x20savings\x20summary','Agent\x20key\x20(claude,\x20cursor,\x20codex,\x20...)','[TrimPrompt\x20Compact]\x20','platform','\x20(or\x20your\x20AI\x20editor\x20—\x20Cursor\x20/','Compressed:\x20','Command','\x20\x20\x20\x20\x20\x20','create','\x20bytes)','Error:\x20Action\x20must\x20be\x20get\x20or\x20set','error','Dashboard:\x20http://localhost:4000','\x20USD','TrimPrompt.ai\x20-\x20Reduce\x20LLM\x20token\x20consumption\x20by\x2060-90%','exitCode','=============================================','server','Retrieve\x20raw\x20offloaded\x20content\x20chunk\x20from\x20local\x20side-cache','length','watcher\x20[action]','\x20\x20\x20\x20\x20Claude\x20Code)\x20so\x20the\x20optimized\x20commands\x20take\x20effect.','--no-merges','toLocaleString','Estimated\x20Cost:\x20\x20\x20\x20$','compressOutput','help','<action>','redaction_enabled','ignore','action','trim','join','=============================================\x0a','Money\x20Saved:\x20\x20\x20\x20\x20\x20\x20$','\x0a\x1b[90m[TrimPrompt]\x20⚡\x20Active\x20session\x20(','message','get','yarn','agent','npm','--merges','win32','postinstall','unref','total_compressed_tokens','args','--min-parents','toLowerCase','\x0aTo\x20resume\x20with\x20lightweight\x20context,\x20execute:','server-mcp','7SDWmlC','%\x20reduction)','compressedTokens','stats','./dashboard','-bs','savings_percentage','retrieve','Original\x20file\x20untouched:\x20','defineProperty','git','compact\x20[sessionId]','Manage\x20local\x20configuration\x20parameters','mcp-server','get\x20or\x20set','activeSavedTokens','claude-3-5-sonnet','\x20(after\x20Trim)','4025718CBkmaE','bun','option','--help','./file-watcher','Raw\x20Tokens:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20','3487MpfsUW','node','--install-id','default','Actual\x20Cost:\x20\x20\x20\x20\x20\x20\x20$','1.0.0','true','\x20tokens\x20|\x20Total\x20savings:\x20',')\x20saved\x20','\x20\x20\x20\x20\x20\x20\x20TRIMPROMPT.AI\x20SAVINGS\x20SUMMARY\x20\x20\x20\x20\x20\x20\x20\x20','existsSync','/dev/tty','argv','model','fullPath','compressedBytes'];a0_0x3f7f=function(){return _0x5257b5;};return a0_0x3f7f();}const commander_1=require(a0_0x8236b0(0x190)),executor_1=require('./executor'),filters_1=require(a0_0x8236b0(0x15d)),tracker_1=require(a0_0x8236b0(0x152)),cache_1=require(a0_0x8236b0(0x1e2)),shims_1=require(a0_0x8236b0(0x1b5)),dashboard_1=require(a0_0x8236b0(0x12b)),program=new commander_1[(a0_0x8236b0(0x1f5))]();function isDisabled(){return process['env']['TRIMPROMPT_DISABLED']==='1';}function adjustCommandArgs(_0x36ed7d,_0x2e466f){const _0x2e84d6=a0_0x8236b0,_0x492654=_0x36ed7d[_0x2e84d6(0x124)]();if(_0x492654===_0x2e84d6(0x131)||_0x492654===_0x2e84d6(0x1ab)){const _0xd5370=_0x2e466f[0x0];if(_0xd5370==='status'){const _0x347e3c=_0x2e466f['slice'](0x1),_0x1540fc=_0x347e3c[_0x2e84d6(0x202)]===0x0||_0x347e3c['every'](_0xae038=>{const _0x11a28c=_0x2e84d6;return _0xae038==='-b'||_0xae038===_0x11a28c(0x15c)||_0xae038==='-sb'||_0xae038===_0x11a28c(0x12c)||_0xae038==='-s'||_0xae038==='--short';});if(_0x1540fc)return{'cmd':_0x36ed7d,'args':[_0x2e84d6(0x1c7),'--porcelain','-b']};}else{if(_0xd5370===_0x2e84d6(0x1b2)){const _0x438f1c=_0x2e466f['slice'](0x1),_0xad9742=_0x438f1c[_0x2e84d6(0x1a4)](_0x39e753=>_0x39e753[_0x2e84d6(0x1e3)](_0x2e84d6(0x1e4))||_0x39e753['startsWith'](_0x2e84d6(0x1a7))||_0x39e753[_0x2e84d6(0x1e3)](_0x2e84d6(0x198))),_0x42e0ec=_0x438f1c[_0x2e84d6(0x1a4)](_0x99456a=>_0x99456a[_0x2e84d6(0x1e3)]('-')&&/^\d+$/['test'](_0x99456a[_0x2e84d6(0x1c6)](0x1))||_0x99456a==='-n'||_0x99456a['startsWith'](_0x2e84d6(0x1ae))),_0x54d8fc=[..._0x2e466f];if(!_0xad9742){const _0x48a9e4=_0x2e84d6(0x197);_0x54d8fc[_0x2e84d6(0x163)](process['platform']===_0x2e84d6(0x219)?'\x22'+_0x48a9e4+'\x22':_0x48a9e4);}!_0x42e0ec&&(_0xad9742?_0x54d8fc[_0x2e84d6(0x163)](_0x2e84d6(0x16b)):_0x54d8fc['push'](_0x2e84d6(0x18c)));const _0x3744a3=_0x438f1c[_0x2e84d6(0x1a4)](_0x18820a=>_0x18820a===_0x2e84d6(0x218)||_0x18820a===_0x2e84d6(0x205)||_0x18820a[_0x2e84d6(0x1e3)](_0x2e84d6(0x123)));return!_0x3744a3&&!_0x42e0ec&&_0x54d8fc[_0x2e84d6(0x163)]('--no-merges'),{'cmd':_0x36ed7d,'args':_0x54d8fc};}}}return{'cmd':_0x36ed7d,'args':_0x2e466f};}function isMcpServerExecution(_0x20d43d,_0x228aeb){const _0x3979b4=a0_0x8236b0,_0x21cc4b=_0x20d43d[_0x3979b4(0x124)](),_0x4c81e6=_0x228aeb[_0x3979b4(0x20f)]('\x20')[_0x3979b4(0x124)]();if(_0x21cc4b[_0x3979b4(0x1da)]('mcp')&&(_0x21cc4b['includes'](_0x3979b4(0x200))||_0x21cc4b[_0x3979b4(0x1da)](_0x3979b4(0x1e5))))return!![];if(_0x21cc4b===_0x3979b4(0x1bf)||_0x21cc4b===_0x3979b4(0x141)||_0x21cc4b===_0x3979b4(0x13a)||_0x21cc4b===_0x3979b4(0x217)||_0x21cc4b==='pnpm'||_0x21cc4b===_0x3979b4(0x215)){if(_0x4c81e6[_0x3979b4(0x1da)](_0x3979b4(0x1b6))||_0x4c81e6[_0x3979b4(0x1da)]('modelcontextprotocol')||_0x4c81e6[_0x3979b4(0x1da)](_0x3979b4(0x134))||_0x4c81e6['includes'](_0x3979b4(0x126)))return!![];}if(_0x228aeb[_0x3979b4(0x1a4)](_0x313d2b=>{const _0x551346=_0x3979b4,_0x12948f=_0x313d2b[_0x551346(0x124)]();return _0x12948f['includes']('mcp-server')||_0x12948f['includes']('server-mcp')||_0x12948f[_0x551346(0x1da)]('@modelcontextprotocol/')||_0x12948f===_0x551346(0x154)||_0x12948f===_0x551346(0x1d0);}))return!![];return![];}async function runProxy(_0x417cc4){const _0x53e093=a0_0x8236b0;if(_0x417cc4['length']===0x0){program[_0x53e093(0x209)]();return;}const _0x55dbf1=_0x417cc4[0x0],_0x1797bf=_0x417cc4[_0x53e093(0x1c6)](0x1),_0x395676=_0x417cc4['join']('\x20');if(isDisabled()){const _0x277b11=await(0x0,executor_1[_0x53e093(0x150)])(_0x55dbf1,_0x1797bf);process[_0x53e093(0x195)][_0x53e093(0x174)](_0x277b11[_0x53e093(0x195)]),process['stderr'][_0x53e093(0x174)](_0x277b11[_0x53e093(0x1ba)]),process[_0x53e093(0x185)](_0x277b11[_0x53e093(0x1fe)]);}if(isMcpServerExecution(_0x55dbf1,_0x1797bf)){console[_0x53e093(0x1fa)]('[TrimPrompt]\x20Autodetected\x20MCP\x20server\x20execution.\x20Activating\x20real-time\x20JSON-RPC\x20proxy...');const {runMcpProxy:_0x565e26}=await Promise[_0x53e093(0x18d)]()[_0x53e093(0x16a)](()=>__importStar(require(_0x53e093(0x1cb))));_0x565e26(_0x55dbf1,_0x1797bf);return;}const _0x55ff92=adjustCommandArgs(_0x55dbf1,_0x1797bf),_0x4ca680=await(0x0,executor_1[_0x53e093(0x150)])(_0x55ff92[_0x53e093(0x16f)],_0x55ff92[_0x53e093(0x122)]),_0x25502c=(0x0,filters_1[_0x53e093(0x208)])(_0x395676,_0x4ca680['stdout'],_0x4ca680[_0x53e093(0x1ba)],tracker_1[_0x53e093(0x1c3)]['getConfig']()[_0x53e093(0x20b)]),_0xb27474={...filters_1['lastRedactAudit']},_0x5a66db=_0x4ca680[_0x53e093(0x195)]+(_0x4ca680[_0x53e093(0x1ba)][_0x53e093(0x20e)]()[_0x53e093(0x202)]>0x0?'\x0a'+_0x4ca680[_0x53e093(0x1ba)]:''),_0x25e5e1=_0x25502c[_0x53e093(0x202)]<_0x5a66db['length']?_0x25502c:_0x5a66db,_0x5b0626=_0x4ca680['exitCode']===0x0?(0x0,cache_1[_0x53e093(0x1b3)])(_0x395676,_0x25e5e1):null;tracker_1[_0x53e093(0x1c3)]['logExecution'](_0x395676,_0x5a66db,_0x5b0626||_0x25e5e1,_0x4ca680[_0x53e093(0x1fe)],_0xb27474,[...filters_1[_0x53e093(0x182)]]);_0x4ca680[_0x53e093(0x1fe)]===0x0?process[_0x53e093(0x195)][_0x53e093(0x174)](_0x25e5e1+'\x0a'):(process[_0x53e093(0x195)][_0x53e093(0x174)](_0x25502c+'\x0a'),_0x4ca680['stderr'][_0x53e093(0x20e)]()[_0x53e093(0x202)]>0x0&&!_0x25502c[_0x53e093(0x1da)](_0x4ca680[_0x53e093(0x1ba)][_0x53e093(0x20e)]())&&process[_0x53e093(0x1ba)][_0x53e093(0x174)](_0x4ca680['stderr']+'\x0a'));try{const {loadSessionsState:_0x2a2c69,getLatestSessionFile:_0x1a7f98}=await Promise['resolve']()[_0x53e093(0x16a)](()=>__importStar(require(_0x53e093(0x13d)))),_0xd71111=_0x2a2c69(),_0x2829f1=(0x0,tracker_1[_0x53e093(0x19b)])(),_0xf011b7=_0x2829f1[_0x53e093(0x1e0)]===_0x53e093(0x16d)?_0x53e093(0x1a5):_0x2829f1['tool']||_0x53e093(0x184),_0x49830d=_0x1a7f98(_0xf011b7);let _0x21fff1=0x0;_0x49830d&&_0x49830d['fullPath']&&_0xd71111[_0x49830d[_0x53e093(0x14e)]]&&(_0x21fff1=_0xd71111[_0x49830d['fullPath']][_0x53e093(0x136)]||0x0);let _0x1d0c3b=0x0;for(const _0x3defb4 of Object[_0x53e093(0x16c)](_0xd71111)){_0x1d0c3b+=_0xd71111[_0x3defb4][_0x53e093(0x136)]||0x0;}(_0x21fff1>0x0||_0x1d0c3b>0x0)&&process[_0x53e093(0x1ba)][_0x53e093(0x174)](_0x53e093(0x212)+_0xf011b7+_0x53e093(0x148)+_0x21fff1[_0x53e093(0x206)]()+_0x53e093(0x147)+_0x1d0c3b['toLocaleString']()+_0x53e093(0x1cd));}catch{}process['exit'](_0x4ca680[_0x53e093(0x1fe)]);}program[a0_0x8236b0(0x178)](a0_0x8236b0(0x20e))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x1fd))[a0_0x8236b0(0x1a1)](((()=>{const _0x264613=a0_0x8236b0,_0x1e2572='1.0.37';if(_0x1e2572!==_0x264613(0x177))return _0x1e2572;try{return require(_0x264613(0x160))[_0x264613(0x1a1)];}catch{try{return require(_0x264613(0x1e8))[_0x264613(0x1a1)];}catch{return _0x264613(0x145);}}})())),program[a0_0x8236b0(0x1ac)]('ui')['alias']('dashboard')['description'](a0_0x8236b0(0x151))[a0_0x8236b0(0x13b)](a0_0x8236b0(0x186),a0_0x8236b0(0x1d9),a0_0x8236b0(0x1bb))['action'](_0x5b15ce=>{const _0x2b7433=a0_0x8236b0,_0x4cce0c=parseInt(_0x5b15ce[_0x2b7433(0x1a9)],0xa);(0x0,dashboard_1[_0x2b7433(0x17d)])(_0x4cce0c);}),program[a0_0x8236b0(0x1ac)](a0_0x8236b0(0x12a))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x1ef))[a0_0x8236b0(0x13b)]('-m,\x20--model\x20<string>',a0_0x8236b0(0x164),a0_0x8236b0(0x137))[a0_0x8236b0(0x20d)](_0x4d7e68=>{const _0x357c13=a0_0x8236b0,_0x19f1d0=tracker_1['tracker'][_0x357c13(0x16e)](_0x4d7e68[_0x357c13(0x14d)]);console[_0x357c13(0x1b2)](_0x357c13(0x15e)),console[_0x357c13(0x1b2)](_0x357c13(0x149)),console[_0x357c13(0x1b2)](_0x357c13(0x1ff)),console[_0x357c13(0x1b2)](_0x357c13(0x165)+_0x19f1d0[_0x357c13(0x1d2)]),console[_0x357c13(0x1b2)](_0x357c13(0x13e)+_0x19f1d0['total_raw_tokens']['toLocaleString']()),console[_0x357c13(0x1b2)](_0x357c13(0x1d1)+_0x19f1d0[_0x357c13(0x121)]['toLocaleString']()),console[_0x357c13(0x1b2)](_0x357c13(0x1ce)+_0x19f1d0[_0x357c13(0x19e)]['toLocaleString']()),console['log'](_0x357c13(0x159)+_0x19f1d0[_0x357c13(0x12d)]+'%'),console['log'](_0x357c13(0x207)+_0x19f1d0[_0x357c13(0x17c)][_0x357c13(0x1c0)](0x4)+_0x357c13(0x199)),console['log'](_0x357c13(0x144)+_0x19f1d0[_0x357c13(0x172)][_0x357c13(0x1c0)](0x4)+_0x357c13(0x138)),console[_0x357c13(0x1b2)](_0x357c13(0x1b0)),console[_0x357c13(0x1b2)](_0x357c13(0x211)+_0x19f1d0[_0x357c13(0x1dd)][_0x357c13(0x1c0)](0x4)+_0x357c13(0x1fc)),console[_0x357c13(0x1b2)](_0x357c13(0x210));}),program['command'](a0_0x8236b0(0x1ad))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x133))[a0_0x8236b0(0x19a)](a0_0x8236b0(0x20a),a0_0x8236b0(0x135))[a0_0x8236b0(0x19a)](a0_0x8236b0(0x188),'config\x20parameter\x20name')['argument']('[value]','value\x20to\x20set')[a0_0x8236b0(0x20d)]((_0x5ca2b3,_0xc21448,_0x2b2360)=>{const _0x3aba88=a0_0x8236b0;if(_0x5ca2b3==='get'){const _0x1c2b5c=tracker_1[_0x3aba88(0x1c3)][_0x3aba88(0x173)]();console[_0x3aba88(0x1b2)](_0xc21448+':\x20'+_0x1c2b5c[_0xc21448]);}else{if(_0x5ca2b3===_0x3aba88(0x176)){_0x2b2360===undefined&&(console[_0x3aba88(0x1fa)]('Error:\x20Value\x20required\x20for\x20set\x20action'),process['exit'](0x1));let _0xab5ec0=_0x2b2360;if(_0x2b2360===_0x3aba88(0x146))_0xab5ec0=!![];if(_0x2b2360===_0x3aba88(0x1e7))_0xab5ec0=![];if(/^\d+$/[_0x3aba88(0x18a)](_0x2b2360))_0xab5ec0=parseInt(_0x2b2360,0xa);tracker_1[_0x3aba88(0x1c3)][_0x3aba88(0x191)](_0xc21448,_0xab5ec0),console[_0x3aba88(0x1b2)](_0x3aba88(0x1d8)+_0xc21448+_0x3aba88(0x1de)+_0x2b2360);}else console['error'](_0x3aba88(0x1f9)),process[_0x3aba88(0x185)](0x1);}});function welcomeBanner(){const _0x449e82=a0_0x8236b0,_0x1cc63b=_0x449e82(0x171),_0x8e8721=_0x449e82(0x17a),_0x36f787=_0x449e82(0x1c8),_0x11936e=_0x449e82(0x1b8),_0x3b08a8=_0x449e82(0x1a2),_0x599254=_0x449e82(0x1be),_0x828de1=_0x8e8721+_0x449e82(0x17e)+_0x599254;return['',_0x828de1,_0x449e82(0x18e)+_0x1cc63b+_0x449e82(0x1d7)+_0x599254,_0x828de1,'','\x20\x20'+_0x11936e+_0x449e82(0x1aa)+_0x599254+_0x449e82(0x1f3),_0x449e82(0x204),'',_0x449e82(0x155),_0x449e82(0x1cf),'','\x20\x20'+_0x1cc63b+_0x449e82(0x15b)+_0x599254,_0x449e82(0x13f)+_0x36f787+'trim\x20stats'+_0x599254+_0x449e82(0x193)+_0x3b08a8+_0x449e82(0x1d3)+_0x599254,_0x449e82(0x13f)+_0x36f787+'trim\x20ui'+_0x599254+_0x449e82(0x1f6)+_0x3b08a8+_0x449e82(0x196)+_0x599254,'','\x20\x20'+_0x3b08a8+_0x449e82(0x1fb)+_0x599254,'','\x20\x20'+_0x3b08a8+'Telemetry:\x20sends\x20usage\x20stats\x20+\x20your\x20email\x20domain\x20(e.g.\x20acme.com)',_0x449e82(0x1c2)+_0x599254+_0x11936e+_0x449e82(0x1e6)+_0x599254+_0x3b08a8+_0x449e82(0x17f)+_0x599254,''][_0x449e82(0x20f)]('\x0a');}function showWelcomeIfFirstRun(_0x1a0b80=![]){const _0x3b79bb=a0_0x8236b0;try{const _0x1976a3=require('fs'),_0x49461c=require('os'),_0x505a99=require('path'),_0x5b91f4=_0x505a99['join'](_0x49461c[_0x3b79bb(0x1d5)](),_0x3b79bb(0x153),_0x3b79bb(0x1a8)),_0x1954cb=!_0x1976a3[_0x3b79bb(0x14a)](_0x5b91f4);if(!_0x1a0b80&&!_0x1954cb)return![];console[_0x3b79bb(0x1b2)](welcomeBanner());if(_0x1954cb){try{_0x1976a3['mkdirSync'](_0x505a99[_0x3b79bb(0x15f)](_0x5b91f4),{'recursive':!![]}),_0x1976a3[_0x3b79bb(0x1af)](_0x5b91f4,new Date()[_0x3b79bb(0x189)]());}catch{}try{const _0x156751=require(_0x3b79bb(0x156)),_0x42a696=_0x505a99[_0x3b79bb(0x20f)](__dirname,_0x3b79bb(0x169));if(_0x1976a3[_0x3b79bb(0x14a)](_0x42a696)){const _0x577b8d=_0x156751[_0x3b79bb(0x157)](process[_0x3b79bb(0x175)],[_0x42a696,_0x3b79bb(0x142)],{'detached':!![],'stdio':_0x3b79bb(0x20c),'windowsHide':!![]});_0x577b8d[_0x3b79bb(0x120)]();}}catch{}}return!![];}catch{return![];}}function printMessage(_0x369f8f){const _0x52d362=a0_0x8236b0;if(process['env'][_0x52d362(0x1d4)]==='postinstall')try{const _0x431f69=require('fs'),_0x1465e9=process[_0x52d362(0x1f2)]===_0x52d362(0x219)?_0x52d362(0x183):_0x52d362(0x14b);_0x431f69[_0x52d362(0x1af)](_0x1465e9,'\x0a'+_0x369f8f+'\x0a');return;}catch{}console[_0x52d362(0x1b2)](_0x369f8f);}program[a0_0x8236b0(0x1ac)](a0_0x8236b0(0x1b9))[a0_0x8236b0(0x1d6)]('Install\x20or\x20uninstall\x20system\x20command\x20shims')[a0_0x8236b0(0x19a)](a0_0x8236b0(0x20a),a0_0x8236b0(0x168))[a0_0x8236b0(0x20d)](_0x58225d=>{const _0x3d09cd=a0_0x8236b0;if(_0x58225d===_0x3d09cd(0x1a3)){const _0x3efc62=(0x0,shims_1['installShims'])();printMessage(_0x3efc62[_0x3d09cd(0x213)]);}else{if(_0x58225d==='uninstall'){const _0x131808=(0x0,shims_1[_0x3d09cd(0x187)])();printMessage(_0x131808[_0x3d09cd(0x213)]);}else console[_0x3d09cd(0x1fa)]('Error:\x20Action\x20must\x20be\x20install\x20or\x20uninstall'),process['exit'](0x1);}}),program[a0_0x8236b0(0x1ac)](a0_0x8236b0(0x1ca))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x180))[a0_0x8236b0(0x19a)]('<commandLine>',a0_0x8236b0(0x1bd))[a0_0x8236b0(0x20d)](_0x47e803=>{const _0x2a076a=a0_0x8236b0;if(isDisabled()){console['log'](_0x47e803);return;}const _0x21d292=(0x0,filters_1[_0x2a076a(0x194)])(_0x47e803);console[_0x2a076a(0x1b2)](_0x21d292);}),program[a0_0x8236b0(0x1ac)](a0_0x8236b0(0x203))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x170))[a0_0x8236b0(0x20d)](async _0x17965b=>{const _0x1a55c0=a0_0x8236b0,{startWatcherDaemon:_0x914d7}=await Promise[_0x1a55c0(0x18d)]()['then'](()=>__importStar(require('./file-watcher')));(!_0x17965b||_0x17965b===_0x1a55c0(0x1b1)||_0x17965b===_0x1a55c0(0x1a3))&&_0x914d7();}),program[a0_0x8236b0(0x1ac)](a0_0x8236b0(0x1ed))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x201))[a0_0x8236b0(0x20d)](async _0x3cd716=>{const _0x1ff1c2=a0_0x8236b0,{retrieveChunk:_0x9b6691}=await Promise[_0x1ff1c2(0x18d)]()[_0x1ff1c2(0x16a)](()=>__importStar(require('./cache-manager'))),_0x1eb08d=_0x9b6691(_0x3cd716);_0x1eb08d?console[_0x1ff1c2(0x1b2)](_0x1eb08d[_0x1ff1c2(0x1db)]):(console[_0x1ff1c2(0x1fa)]('[TrimPrompt\x20Cache]\x20Chunk\x20\x27'+_0x3cd716+'\x27\x20not\x20found\x20or\x20expired.'),process[_0x1ff1c2(0x185)](0x1));}),program[a0_0x8236b0(0x1ac)](a0_0x8236b0(0x132))[a0_0x8236b0(0x1d6)](a0_0x8236b0(0x1a6))[a0_0x8236b0(0x13b)](a0_0x8236b0(0x192),a0_0x8236b0(0x1f0),'claude')[a0_0x8236b0(0x20d)](async(_0x54ca70,_0x48a470)=>{const _0x422256=a0_0x8236b0,{getLatestSessionFile:_0x137b2c,compactSessionCopy:_0x387cac}=await Promise[_0x422256(0x18d)]()['then'](()=>__importStar(require('./file-watcher'))),_0x39c0e7=await Promise['resolve']()[_0x422256(0x16a)](()=>__importStar(require('fs'))),_0x3f8f14=_0x48a470&&_0x48a470[_0x422256(0x216)]||'claude';let _0x57ccf2=_0x54ca70;if(!_0x54ca70||!_0x39c0e7[_0x422256(0x14a)](_0x54ca70)){const _0x55316b=_0x137b2c(_0x3f8f14);_0x57ccf2=_0x55316b[_0x422256(0x14e)];}if(!_0x57ccf2||!_0x39c0e7[_0x422256(0x14a)](_0x57ccf2)){console[_0x422256(0x1fa)](_0x422256(0x1b7)+_0x3f8f14+'\x27.');return;}const _0x39c888=_0x387cac(_0x57ccf2,_0x3f8f14);if(!_0x39c888['ok']){console[_0x422256(0x1fa)](_0x422256(0x1f1)+_0x39c888['reason']);return;}console[_0x422256(0x1b2)]('\x0a[TrimPrompt\x20Compact]\x20Clean\x20compressed\x20session\x20copy\x20generated.'),console['log'](_0x422256(0x12f)+_0x57ccf2),console[_0x422256(0x1b2)](_0x422256(0x1df)+_0x39c888['compactPath']),console[_0x422256(0x1b2)](_0x422256(0x18f)+_0x39c888['rawTokens']?.[_0x422256(0x206)]()+_0x422256(0x161)+_0x39c888['rawBytes']?.[_0x422256(0x206)]()+_0x422256(0x1f8)),console[_0x422256(0x1b2)](_0x422256(0x1f4)+_0x39c888[_0x422256(0x129)]?.[_0x422256(0x206)]()+_0x422256(0x161)+_0x39c888[_0x422256(0x14f)]?.[_0x422256(0x206)]()+_0x422256(0x1f8)),console['log'](_0x422256(0x1c4)+_0x39c888['savedTokens']?.[_0x422256(0x206)]()+_0x422256(0x161)+_0x39c888['reductionPct']+_0x422256(0x128)),(_0x39c888['savedTokens']||0x0)===0x0?console[_0x422256(0x1b2)](_0x422256(0x167)):(console[_0x422256(0x1b2)](_0x422256(0x125)),console[_0x422256(0x1b2)]('\x20\x20claude\x20--resume\x20\x22'+_0x39c888[_0x422256(0x166)]+'\x22')),console[_0x422256(0x1b2)]('');});const args=process[a0_0x8236b0(0x14c)][a0_0x8236b0(0x1c6)](0x2),firstArg=args[0x0],subcommands=['ui',a0_0x8236b0(0x19d),a0_0x8236b0(0x12a),a0_0x8236b0(0x1ad),a0_0x8236b0(0x1b9),'rewrite',a0_0x8236b0(0x154),a0_0x8236b0(0x1d0),a0_0x8236b0(0x181),a0_0x8236b0(0x12e),'compact',a0_0x8236b0(0x209),a0_0x8236b0(0x13c),'-h',a0_0x8236b0(0x1a1),a0_0x8236b0(0x1cc),'-v'];if(firstArg&&!subcommands[a0_0x8236b0(0x1da)](firstArg))runProxy(args)[a0_0x8236b0(0x18b)](_0x20af0f=>{const _0x265030=a0_0x8236b0;console[_0x265030(0x1fa)]('[TrimPrompt]\x20Fatal\x20Proxy\x20Error:\x20'+_0x20af0f[_0x265030(0x213)]),process[_0x265030(0x185)](0x1);});else{const machineFacing=['shims',a0_0x8236b0(0x181),a0_0x8236b0(0x154),a0_0x8236b0(0x1d0),a0_0x8236b0(0x12e),a0_0x8236b0(0x1eb)],isPostinstall=process[a0_0x8236b0(0x1b4)][a0_0x8236b0(0x1d4)]===a0_0x8236b0(0x21a);if(!isPostinstall){if(!firstArg)showWelcomeIfFirstRun(!![]);else!machineFacing[a0_0x8236b0(0x1da)](firstArg)&&showWelcomeIfFirstRun(![]);}program['parse'](process[a0_0x8236b0(0x14c)]);}
|
package/dashboard.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const a0_0x38e848=a0_0x1f10;(function(_0x81e5ee,_0x24c9db){const _0x43dd32=a0_0x1f10,_0x4a374c=_0x81e5ee();while(!![]){try{const _0x13267e=-parseInt(_0x43dd32(0x1f7))/0x1+-parseInt(_0x43dd32(0x232))/0x2+parseInt(_0x43dd32(0x22f))/0x3+-parseInt(_0x43dd32(0x22b))/0x4*(-parseInt(_0x43dd32(0x222))/0x5)+parseInt(_0x43dd32(0x225))/0x6*(parseInt(_0x43dd32(0x1f2))/0x7)+parseInt(_0x43dd32(0x218))/0x8*(-parseInt(_0x43dd32(0x20f))/0x9)+-parseInt(_0x43dd32(0x229))/0xa*(parseInt(_0x43dd32(0x1d8))/0xb);if(_0x13267e===_0x24c9db)break;else _0x4a374c['push'](_0x4a374c['shift']());}catch(_0x44236a){_0x4a374c['push'](_0x4a374c['shift']());}}}(a0_0x37a0,0xafcde));var __createBinding=this&&this['__createBinding']||(Object[a0_0x38e848(0x213)]?function(_0x1c6a70,_0x4322d0,_0x51ed6c,_0x48677b){const _0x16e989=a0_0x38e848;if(_0x48677b===undefined)_0x48677b=_0x51ed6c;var _0x17d178=Object[_0x16e989(0x1c7)](_0x4322d0,_0x51ed6c);(!_0x17d178||(_0x16e989(0x205)in _0x17d178?!_0x4322d0[_0x16e989(0x1d9)]:_0x17d178[_0x16e989(0x1d3)]||_0x17d178['configurable']))&&(_0x17d178={'enumerable':!![],'get':function(){return _0x4322d0[_0x51ed6c];}}),Object[_0x16e989(0x1d1)](_0x1c6a70,_0x48677b,_0x17d178);}:function(_0xae0af9,_0x4be2b1,_0x2a1e7c,_0x3c1076){if(_0x3c1076===undefined)_0x3c1076=_0x2a1e7c;_0xae0af9[_0x3c1076]=_0x4be2b1[_0x2a1e7c];}),__setModuleDefault=this&&this[a0_0x38e848(0x226)]||(Object[a0_0x38e848(0x213)]?function(_0x594838,_0x2e797c){const _0x39c723=a0_0x38e848;Object[_0x39c723(0x1d1)](_0x594838,_0x39c723(0x207),{'enumerable':!![],'value':_0x2e797c});}:function(_0x51ba88,_0x3a74a7){const _0x175144=a0_0x38e848;_0x51ba88[_0x175144(0x207)]=_0x3a74a7;}),__importStar=this&&this[a0_0x38e848(0x200)]||(function(){var _0x5e7827=function(_0x3ba922){const _0x2e2024=a0_0x1f10;return _0x5e7827=Object[_0x2e2024(0x1ed)]||function(_0x4abd37){const _0x394cc2=_0x2e2024;var _0x302128=[];for(var _0x1e1928 in _0x4abd37)if(Object['prototype'][_0x394cc2(0x1e9)][_0x394cc2(0x201)](_0x4abd37,_0x1e1928))_0x302128[_0x302128[_0x394cc2(0x216)]]=_0x1e1928;return _0x302128;},_0x5e7827(_0x3ba922);};return function(_0x661d16){const _0x12cdad=a0_0x1f10;if(_0x661d16&&_0x661d16[_0x12cdad(0x1d9)])return _0x661d16;var _0xa64000={};if(_0x661d16!=null){for(var _0x4bffe1=_0x5e7827(_0x661d16),_0x2f2de3=0x0;_0x2f2de3<_0x4bffe1[_0x12cdad(0x216)];_0x2f2de3++)if(_0x4bffe1[_0x2f2de3]!==_0x12cdad(0x207))__createBinding(_0xa64000,_0x661d16,_0x4bffe1[_0x2f2de3]);}return __setModuleDefault(_0xa64000,_0x661d16),_0xa64000;};}()),__importDefault=this&&this['__importDefault']||function(_0x42c08e){const _0x103c67=a0_0x38e848;return _0x42c08e&&_0x42c08e[_0x103c67(0x1d9)]?_0x42c08e:{'default':_0x42c08e};};Object['defineProperty'](exports,a0_0x38e848(0x1d9),{'value':!![]}),exports['startDashboard']=startDashboard;const express_1=__importDefault(require(a0_0x38e848(0x1f6))),path=__importStar(require(a0_0x38e848(0x1c4))),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x38e848(0x1f4))),tracker_1=require(a0_0x38e848(0x1e6)),app=(0x0,express_1[a0_0x38e848(0x207)])();app[a0_0x38e848(0x1fc)](express_1[a0_0x38e848(0x207)][a0_0x38e848(0x21d)]());const baseDir=path[a0_0x38e848(0x1d2)](os[a0_0x38e848(0x1c5)](),a0_0x38e848(0x1cb)),logsDir=path[a0_0x38e848(0x1d2)](baseDir,a0_0x38e848(0x1e7));function a0_0x1f10(_0x4536c5,_0x4c981c){_0x4536c5=_0x4536c5-0x1c3;const _0x37a06f=a0_0x37a0();let _0x1f108e=_0x37a06f[_0x4536c5];return _0x1f108e;}app[a0_0x38e848(0x205)]('/',(_0x5aecab,_0xa562f0)=>{const _0x451065=a0_0x38e848,_0x433266=path[_0x451065(0x1d2)](__dirname,_0x451065(0x1f8));fs[_0x451065(0x1de)](_0x433266)?_0xa562f0[_0x451065(0x215)](_0x433266):_0xa562f0[_0x451065(0x215)](path[_0x451065(0x1d2)](__dirname,_0x451065(0x21a)));}),app[a0_0x38e848(0x205)](a0_0x38e848(0x21b),(_0x25d676,_0xacd34e)=>{const _0xf1c9f=a0_0x38e848,_0x3d14ba=path[_0xf1c9f(0x1d2)](__dirname,_0xf1c9f(0x210));fs['existsSync'](_0x3d14ba)?_0xacd34e[_0xf1c9f(0x215)](_0x3d14ba):_0xacd34e[_0xf1c9f(0x215)](path[_0xf1c9f(0x1d2)](__dirname,_0xf1c9f(0x228)));}),app[a0_0x38e848(0x205)](a0_0x38e848(0x1df),(_0x5f01bf,_0x29e577)=>{const _0x2902f7=a0_0x38e848,_0x4ce321=_0x5f01bf[_0x2902f7(0x1e0)][_0x2902f7(0x1dd)]||_0x2902f7(0x1ef),_0x234acf=tracker_1[_0x2902f7(0x1c8)][_0x2902f7(0x1ea)](_0x4ce321);_0x29e577['json'](_0x234acf);}),app['get'](a0_0x38e848(0x1fe),(_0x423c93,_0x2f66a3)=>{const _0x19c0f4=a0_0x38e848,_0x1ea30a=tracker_1[_0x19c0f4(0x1c8)][_0x19c0f4(0x206)]();_0x2f66a3[_0x19c0f4(0x21d)](_0x1ea30a[_0x19c0f4(0x216)]>0x1f4?_0x1ea30a['slice'](-0x1f4):_0x1ea30a);}),app[a0_0x38e848(0x205)](a0_0x38e848(0x21e),(_0x4bf5ba,_0x4259a5)=>{const _0x202888=a0_0x38e848,_0x169281=_0x4bf5ba[_0x202888(0x227)]['id'],_0x44455b=path['join'](logsDir,_0x169281+'.raw.txt'),_0xe8a80=path[_0x202888(0x1d2)](logsDir,_0x169281+_0x202888(0x1f9));let _0xc6ef1='Raw\x20output\x20log\x20file\x20not\x20found.',_0x15225e=_0x202888(0x20d);try{fs[_0x202888(0x1de)](_0x44455b)&&(_0xc6ef1=fs[_0x202888(0x221)](_0x44455b,_0x202888(0x1fa))),fs[_0x202888(0x1de)](_0xe8a80)&&(_0x15225e=fs[_0x202888(0x221)](_0xe8a80,'utf8'));}catch(_0x1d96f9){}_0x4259a5['json']({'id':_0x169281,'raw':_0xc6ef1,'compressed':_0x15225e});}),app[a0_0x38e848(0x205)]('/api/config/features',(_0x1bb1d3,_0x31d4e1)=>{const _0x336250=a0_0x38e848,_0x359e1a=tracker_1['tracker']['getConfig']();_0x31d4e1[_0x336250(0x21d)](_0x359e1a[_0x336250(0x1eb)]||{});}),app['post'](a0_0x38e848(0x1ce),(_0x142678,_0x4dd19f)=>{const _0x21f4d9=a0_0x38e848,_0x3823d9=_0x142678[_0x21f4d9(0x1c6)];tracker_1[_0x21f4d9(0x1c8)][_0x21f4d9(0x214)](_0x21f4d9(0x1eb),_0x3823d9),_0x4dd19f[_0x21f4d9(0x21d)]({'ok':!![]});}),app[a0_0x38e848(0x1ec)](a0_0x38e848(0x20b),async(_0x847c3d,_0x5056aa)=>{const _0x259948=a0_0x38e848;try{const {getLatestSessionFile:_0x1ecff2,compactSessionCopy:_0xb0a777}=await Promise[_0x259948(0x202)]()['then'](()=>__importStar(require('./file-watcher'))),{agentKey:_0x30dc15}=_0x847c3d[_0x259948(0x1c6)]||{},_0x5ef1bf=_0x30dc15||'claude',_0x153ab3=_0x1ecff2(_0x5ef1bf);if(_0x153ab3&&_0x153ab3[_0x259948(0x203)]&&fs['existsSync'](_0x153ab3['fullPath'])){const _0x2a7c52=_0xb0a777(_0x153ab3[_0x259948(0x203)],_0x5ef1bf);_0x2a7c52['ok']&&(_0x2a7c52['savedTokens']||0x0)>0x0?_0x5056aa[_0x259948(0x21d)]({'ok':!![],'fileName':_0x153ab3[_0x259948(0x1ff)],'tokensSaved':_0x2a7c52[_0x259948(0x1e1)],'rawTokens':_0x2a7c52['rawTokens'],'compressedTokens':_0x2a7c52[_0x259948(0x1cf)],'reductionPct':_0x2a7c52[_0x259948(0x20c)],'compactPath':_0x2a7c52[_0x259948(0x231)]}):_0x5056aa[_0x259948(0x21d)]({'ok':![],'message':_0x2a7c52[_0x259948(0x1d0)]||_0x259948(0x1cc)});}else _0x5056aa[_0x259948(0x21d)]({'ok':![],'message':_0x259948(0x1e2)});}catch(_0x3a991f){_0x5056aa[_0x259948(0x1cd)](0x1f4)[_0x259948(0x21d)]({'ok':![],'error':_0x3a991f[_0x259948(0x1e8)]});}}),app[a0_0x38e848(0x205)](a0_0x38e848(0x212),async(_0x19d299,_0x297c15)=>{const _0x19293e=a0_0x38e848,{loadConfig:_0x2ba44e,getAgentStoragePaths:_0xb81f76,getLatestSessionFile:_0x4ea13f,loadSessionsState:_0x4ecc8a}=await Promise[_0x19293e(0x202)]()[_0x19293e(0x21c)](()=>__importStar(require(_0x19293e(0x1e4)))),_0x498803=_0x2ba44e(),_0x55d79c=['claude',_0x19293e(0x1fd),_0x19293e(0x1d7),_0x19293e(0x1e5),_0x19293e(0x1c9),'copilot',_0x19293e(0x20e),'opencode',_0x19293e(0x219)],_0x206624={},_0x20b423={},_0x5cb24c={},_0x539e3f=_0x4ecc8a(),_0x41e647=tracker_1[_0x19293e(0x1c8)][_0x19293e(0x206)]()||[];for(const _0x32d6af of _0x55d79c){_0x206624[_0x32d6af]=_0xb81f76(_0x32d6af);const _0x5c9b68=_0x4ea13f(_0x32d6af);if(_0x5c9b68&&_0x5c9b68[_0x19293e(0x203)]&&_0x539e3f[_0x5c9b68[_0x19293e(0x203)]])_0x5c9b68[_0x19293e(0x209)]=_0x539e3f[_0x5c9b68[_0x19293e(0x203)]][_0x19293e(0x209)]||0x0;else{if(_0x5c9b68)_0x5c9b68[_0x19293e(0x209)]=0x0;}_0x5cb24c[_0x32d6af]=_0x5c9b68;const _0xa14930=_0x41e647[_0x19293e(0x230)](_0x2844f2=>_0x2844f2['command']&&_0x2844f2['command'][_0x19293e(0x1da)](_0x19293e(0x22a)+_0x32d6af));_0xa14930[_0x19293e(0x216)]>0x0?_0x20b423[_0x32d6af]=_0xa14930[_0xa14930[_0x19293e(0x216)]-0x1][_0x19293e(0x1d6)]:_0x20b423[_0x32d6af]=_0x5c9b68?_0x5c9b68[_0x19293e(0x20a)]:null;}_0x297c15[_0x19293e(0x21d)]({..._0x498803,'resolvedPaths':_0x206624,'lastActiveTimestamps':_0x20b423,'latestSessions':_0x5cb24c});}),app[a0_0x38e848(0x1ec)](a0_0x38e848(0x223),async(_0x2148df,_0x125cb9)=>{const _0xb37121=a0_0x38e848,{getAgentStoragePaths:_0x257ff4}=await Promise[_0xb37121(0x202)]()[_0xb37121(0x21c)](()=>__importStar(require(_0xb37121(0x1e4)))),{agentKey:_0x377b55}=_0x2148df[_0xb37121(0x1c6)]||{};if(!_0x377b55)return _0x125cb9[_0xb37121(0x1cd)](0x190)[_0xb37121(0x21d)]({'error':_0xb37121(0x1ca)});const _0x49956c=_0x257ff4(_0x377b55),_0x3aed83=_0x49956c[_0xb37121(0x1f5)](_0x358798=>fs[_0xb37121(0x1de)](_0x358798))||_0x49956c[0x0];if(_0x3aed83){if(!fs[_0xb37121(0x1de)](_0x3aed83))try{fs[_0xb37121(0x1d5)](_0x3aed83,{'recursive':!![]});}catch{}const {exec:_0x16f893}=await Promise[_0xb37121(0x202)]()[_0xb37121(0x21c)](()=>__importStar(require(_0xb37121(0x21f)))),_0x1c5cbe=process[_0xb37121(0x217)]===_0xb37121(0x22c)?_0xb37121(0x204)+_0x3aed83+'\x22':process[_0xb37121(0x217)]==='darwin'?_0xb37121(0x1c3)+_0x3aed83+'\x22':_0xb37121(0x208)+_0x3aed83+'\x22';return _0x16f893(_0x1c5cbe),_0x125cb9[_0xb37121(0x21d)]({'success':!![],'openedPath':_0x3aed83});}_0x125cb9[_0xb37121(0x1cd)](0x194)[_0xb37121(0x21d)]({'error':_0xb37121(0x1d4)});}),app['post']('/api/config/toggle',async(_0x41a059,_0x26371a)=>{const _0xb03822=a0_0x38e848,{saveConfig:_0x566de4}=await Promise[_0xb03822(0x202)]()[_0xb03822(0x21c)](()=>__importStar(require(_0xb03822(0x1e4)))),{key:_0x53df7b,value:_0xc38c6e}=_0x41a059[_0xb03822(0x1c6)]||{};if(_0x53df7b){const _0x52fa0f=_0x566de4({'conversation_toggles':{[_0x53df7b]:_0xc38c6e}});return _0x26371a[_0xb03822(0x21d)](_0x52fa0f);}_0x26371a['status'](0x190)[_0xb03822(0x21d)]({'error':_0xb03822(0x220)});}),app[a0_0x38e848(0x1ec)]('/api/config/custom-path',async(_0x1e0037,_0x27125c)=>{const _0x2ee7d9=a0_0x38e848,{saveConfig:_0x28b800}=await Promise[_0x2ee7d9(0x202)]()[_0x2ee7d9(0x21c)](()=>__importStar(require(_0x2ee7d9(0x1e4)))),{agentKey:_0x19a0c8,path:_0x194cd0}=_0x1e0037[_0x2ee7d9(0x1c6)]||{};if(_0x19a0c8){const _0x1ffd28=_0x28b800({'custom_storage_paths':{[_0x19a0c8]:_0x194cd0||null}});return _0x27125c['json'](_0x1ffd28);}_0x27125c['status'](0x190)[_0x2ee7d9(0x21d)]({'error':_0x2ee7d9(0x1ca)});});function a0_0x37a0(){const _0x3caacb=['512264NuTaCF','cortex','../src/index.html','/favicon.png','then','json','/api/stats/inspect/:id','child_process','Missing\x20key','readFileSync','939620aLScAy','/api/config/open-dir','EADDRINUSE','45894FzVTKB','__setModuleDefault','params','../src/favicon.png','56010VnHTCV','conv:','16YhBLxM','win32','listen','--headless','2211441KlRbNC','filter','compactPath','1198438vQaqNu','open\x20\x22','path','homedir','body','getOwnPropertyDescriptor','tracker','aider','Missing\x20agentKey','.trimprompt','No\x20compressible\x20content\x20found\x20in\x20this\x20session','status','/api/config/features','compressedTokens','reason','defineProperty','join','writable','Directory\x20not\x20found','mkdirSync','timestamp','codex','1463tcIaaX','__esModule','includes','startWatcherDaemon','[TrimPrompt]\x20Dashboard\x20error:\x20','model','existsSync','/api/stats/summary','query','savedTokens','No\x20active\x20session\x20file\x20found','argv','./file-watcher','cursor','./tracker','logs','message','hasOwnProperty','getStatsSummary','features_enabled','post','getOwnPropertyNames','log','auto','Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.','\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20','777yyrsUw','http://localhost:','open','find','express','209603RvATFZ','index.html','.comp.txt','utf8','catch','use','gemini','/api/stats/history','fileName','__importStar','call','resolve','fullPath','explorer\x20\x22','get','getLogs','default','xdg-open\x20\x22','activeSavedTokens','lastModified','/api/agent/compact','reductionPct','Compressed\x20output\x20log\x20file\x20not\x20found.','openclaw','9geVGXL','favicon.png','code','/api/config','create','setConfig','sendFile','length','platform'];a0_0x37a0=function(){return _0x3caacb;};return a0_0x37a0();}function startDashboard(_0x22e71c=0xfa0){const _0x35f452=a0_0x38e848;let _0x1b6123=_0x22e71c;const _0x1750e2=process[_0x35f452(0x1e3)][_0x35f452(0x1da)](_0x35f452(0x22e))||process.env.TRIMPROMPT_HEADLESS==='1',_0x285100=app[_0x35f452(0x22d)](_0x1b6123,()=>{const _0x2c3b01=_0x35f452,_0x144fef=_0x2c3b01(0x1f3)+_0x1b6123;!_0x1750e2&&(console[_0x2c3b01(0x1ee)](_0x2c3b01(0x1f1)+_0x144fef),console[_0x2c3b01(0x1ee)](_0x2c3b01(0x1f0))),Promise[_0x2c3b01(0x202)]()[_0x2c3b01(0x21c)](()=>__importStar(require('./file-watcher')))[_0x2c3b01(0x21c)](_0x196c55=>_0x196c55[_0x2c3b01(0x1db)]())['catch'](()=>{}),!_0x1750e2&&process.env.TRIMPROMPT_NO_OPEN!=='1'&&(0x0,open_1[_0x2c3b01(0x207)])(_0x144fef)[_0x2c3b01(0x1fb)](()=>{});});_0x285100['on']('error',_0x4c10aa=>{const _0x213aed=_0x35f452;_0x4c10aa[_0x213aed(0x211)]===_0x213aed(0x224)?startDashboard(_0x1b6123+0x1):console['error'](_0x213aed(0x1dc)+_0x4c10aa[_0x213aed(0x1e8)]);});}
|
|
1
|
+
'use strict';function a0_0x45d5(){const _0xe9c6f6=['18oIzwqw','existsSync','./tracker','savedTokens','then','win32','sendFile','18bKJQFI','getLogs','[TrimPrompt]\x20Dashboard\x20error:\x20','includes','error','timestamp','defineProperty','Directory\x20not\x20found','4064425rLbuqM','readFileSync','length','darwin','message','rawTokens','SIGINT','code','__importDefault','env','openclaw','resolve','1218908CaHVZR','3wcCQEt','conv:','logs','use','getOwnPropertyNames','getStatsSummary','.trimprompt','prototype','hasOwnProperty','No\x20active\x20session\x20file\x20found','kill','json','Missing\x20agentKey','argv','express','join','../src/favicon.png','/api/config/features','platform','__esModule','/api/config/custom-path','EADDRINUSE','cli.js','Raw\x20output\x20log\x20file\x20not\x20found.','Missing\x20key','setConfig','8453610oxDXpI','status','opencode','ignore','exit','__createBinding','claude','/api/stats/inspect/:id','/api/config/toggle','now','homedir','__setModuleDefault','TRIMPROMPT_HEADLESS','No\x20compressible\x20content\x20found\x20in\x20this\x20session','2271987oluXHb','123531DGQxNA','fullPath','codex','compressedTokens','activeSavedTokens','default','mkdirSync','model','getConfig','tracker','features_enabled','call','open\x20\x22','child_process','catch','.raw.txt','http://localhost:','.comp.txt','__importStar','../src/index.html','Compressed\x20output\x20log\x20file\x20not\x20found.','utf8','filter','SIGTERM','get','log','open','reductionPct','1195243txefrV','./file-watcher','command','body','create','params','copilot','query','getOwnPropertyDescriptor','listen','5351568NEQWRo','fileName','gemini','post'];a0_0x45d5=function(){return _0xe9c6f6;};return a0_0x45d5();}const a0_0x3ba464=a0_0x3df3;(function(_0x23a5a3,_0x4144c4){const _0x1f20f5=a0_0x3df3,_0x4da5de=_0x23a5a3();while(!![]){try{const _0x451f9b=-parseInt(_0x1f20f5(0x242))/0x1*(parseInt(_0x1f20f5(0x204))/0x2)+parseInt(_0x1f20f5(0x219))/0x3*(parseInt(_0x1f20f5(0x218))/0x4)+-parseInt(_0x1f20f5(0x20c))/0x5+-parseInt(_0x1f20f5(0x1fd))/0x6*(-parseInt(_0x1f20f5(0x1ef))/0x7)+parseInt(_0x1f20f5(0x1f9))/0x8+parseInt(_0x1f20f5(0x241))/0x9+parseInt(_0x1f20f5(0x233))/0xa;if(_0x451f9b===_0x4144c4)break;else _0x4da5de['push'](_0x4da5de['shift']());}catch(_0x240505){_0x4da5de['push'](_0x4da5de['shift']());}}}(a0_0x45d5,0xa0e74));var __createBinding=this&&this[a0_0x3ba464(0x238)]||(Object[a0_0x3ba464(0x1f3)]?function(_0x97991f,_0x13608c,_0x1707c2,_0x2cc56f){const _0x2a800a=a0_0x3ba464;if(_0x2cc56f===undefined)_0x2cc56f=_0x1707c2;var _0x8a45e=Object[_0x2a800a(0x1f7)](_0x13608c,_0x1707c2);(!_0x8a45e||(_0x2a800a(0x1eb)in _0x8a45e?!_0x13608c[_0x2a800a(0x22c)]:_0x8a45e['writable']||_0x8a45e['configurable']))&&(_0x8a45e={'enumerable':!![],'get':function(){return _0x13608c[_0x1707c2];}}),Object[_0x2a800a(0x20a)](_0x97991f,_0x2cc56f,_0x8a45e);}:function(_0x22e659,_0x1f549d,_0x21f3b7,_0x1a8c63){if(_0x1a8c63===undefined)_0x1a8c63=_0x21f3b7;_0x22e659[_0x1a8c63]=_0x1f549d[_0x21f3b7];}),__setModuleDefault=this&&this[a0_0x3ba464(0x23e)]||(Object[a0_0x3ba464(0x1f3)]?function(_0x513bac,_0x513d1c){const _0xd7817a=a0_0x3ba464;Object[_0xd7817a(0x20a)](_0x513bac,_0xd7817a(0x247),{'enumerable':!![],'value':_0x513d1c});}:function(_0x5bbef6,_0x539f2e){const _0xeca570=a0_0x3ba464;_0x5bbef6[_0xeca570(0x247)]=_0x539f2e;}),__importStar=this&&this[a0_0x3ba464(0x1e5)]||(function(){var _0x5485b0=function(_0x41892a){const _0x493149=a0_0x3df3;return _0x5485b0=Object[_0x493149(0x21d)]||function(_0x13b079){const _0xd16767=_0x493149;var _0x15a265=[];for(var _0x1ccdab in _0x13b079)if(Object[_0xd16767(0x220)][_0xd16767(0x221)][_0xd16767(0x24d)](_0x13b079,_0x1ccdab))_0x15a265[_0x15a265[_0xd16767(0x20e)]]=_0x1ccdab;return _0x15a265;},_0x5485b0(_0x41892a);};return function(_0x4f1677){const _0x45a34b=a0_0x3df3;if(_0x4f1677&&_0x4f1677[_0x45a34b(0x22c)])return _0x4f1677;var _0x21505a={};if(_0x4f1677!=null){for(var _0x2bfba6=_0x5485b0(_0x4f1677),_0xae1b18=0x0;_0xae1b18<_0x2bfba6[_0x45a34b(0x20e)];_0xae1b18++)if(_0x2bfba6[_0xae1b18]!=='default')__createBinding(_0x21505a,_0x4f1677,_0x2bfba6[_0xae1b18]);}return __setModuleDefault(_0x21505a,_0x4f1677),_0x21505a;};}()),__importDefault=this&&this[a0_0x3ba464(0x214)]||function(_0x5e27d0){const _0x215ebb=a0_0x3ba464;return _0x5e27d0&&_0x5e27d0[_0x215ebb(0x22c)]?_0x5e27d0:{'default':_0x5e27d0};};Object[a0_0x3ba464(0x20a)](exports,a0_0x3ba464(0x22c),{'value':!![]}),exports['startDashboard']=startDashboard;const express_1=__importDefault(require(a0_0x3ba464(0x227))),path=__importStar(require('path')),fs=__importStar(require('fs')),os=__importStar(require('os')),open_1=__importDefault(require(a0_0x3ba464(0x1ed))),tracker_1=require(a0_0x3ba464(0x1ff)),app=(0x0,express_1[a0_0x3ba464(0x247)])();app[a0_0x3ba464(0x21c)](express_1[a0_0x3ba464(0x247)][a0_0x3ba464(0x224)]());const baseDir=path[a0_0x3ba464(0x228)](os[a0_0x3ba464(0x23d)](),a0_0x3ba464(0x21f)),logsDir=path['join'](baseDir,a0_0x3ba464(0x21b));let configPayloadCache=null;const CONFIG_CACHE_TTL_MS=0x2710;function invalidateConfigCache(){configPayloadCache=null;}function a0_0x3df3(_0x34f0b3,_0x1e0440){const _0x45d50b=a0_0x45d5();return a0_0x3df3=function(_0x3df374,_0x4b89f2){_0x3df374=_0x3df374-0x1e3;let _0x39ea50=_0x45d50b[_0x3df374];return _0x39ea50;},a0_0x3df3(_0x34f0b3,_0x1e0440);}app[a0_0x3ba464(0x1eb)]('/',(_0x4bdb97,_0x15f01c)=>{const _0x2cf214=a0_0x3ba464,_0x432f24=path[_0x2cf214(0x228)](__dirname,'index.html');fs[_0x2cf214(0x1fe)](_0x432f24)?_0x15f01c[_0x2cf214(0x203)](_0x432f24):_0x15f01c[_0x2cf214(0x203)](path[_0x2cf214(0x228)](__dirname,_0x2cf214(0x1e6)));}),app[a0_0x3ba464(0x1eb)]('/favicon.png',(_0x64560b,_0x4184fa)=>{const _0xf5fd89=a0_0x3ba464,_0x3d5cf0=path[_0xf5fd89(0x228)](__dirname,'favicon.png');fs['existsSync'](_0x3d5cf0)?_0x4184fa[_0xf5fd89(0x203)](_0x3d5cf0):_0x4184fa['sendFile'](path[_0xf5fd89(0x228)](__dirname,_0xf5fd89(0x229)));}),app[a0_0x3ba464(0x1eb)]('/api/stats/summary',(_0x3031a8,_0x1d36b1)=>{const _0xc63955=a0_0x3ba464,_0x1cdf9b=_0x3031a8[_0xc63955(0x1f6)][_0xc63955(0x249)]||'auto',_0x3a1638=tracker_1[_0xc63955(0x24b)][_0xc63955(0x21e)](_0x1cdf9b);_0x1d36b1['json'](_0x3a1638);}),app[a0_0x3ba464(0x1eb)]('/api/stats/history',(_0x2c7103,_0x5c1da3)=>{const _0x1c288a=a0_0x3ba464,_0x2608e8=tracker_1[_0x1c288a(0x24b)][_0x1c288a(0x205)]();_0x5c1da3[_0x1c288a(0x224)](_0x2608e8['length']>0x1f4?_0x2608e8['slice'](-0x1f4):_0x2608e8);}),app[a0_0x3ba464(0x1eb)](a0_0x3ba464(0x23a),(_0x59147d,_0x7d3231)=>{const _0x58e177=a0_0x3ba464,_0x45660d=_0x59147d[_0x58e177(0x1f4)]['id'],_0x371ae9=path[_0x58e177(0x228)](logsDir,_0x45660d+_0x58e177(0x251)),_0x3dbb57=path[_0x58e177(0x228)](logsDir,_0x45660d+_0x58e177(0x1e4));let _0x532de8=_0x58e177(0x230),_0x49102f=_0x58e177(0x1e7);try{fs['existsSync'](_0x371ae9)&&(_0x532de8=fs['readFileSync'](_0x371ae9,_0x58e177(0x1e8))),fs['existsSync'](_0x3dbb57)&&(_0x49102f=fs[_0x58e177(0x20d)](_0x3dbb57,'utf8'));}catch(_0x20dfc7){}_0x7d3231[_0x58e177(0x224)]({'id':_0x45660d,'raw':_0x532de8,'compressed':_0x49102f});}),app[a0_0x3ba464(0x1eb)]('/api/config/features',(_0x5e6e71,_0x39ac94)=>{const _0x5c0991=a0_0x3ba464,_0x50b1ac=tracker_1[_0x5c0991(0x24b)][_0x5c0991(0x24a)]();_0x39ac94[_0x5c0991(0x224)](_0x50b1ac[_0x5c0991(0x24c)]||{});}),app[a0_0x3ba464(0x1fc)](a0_0x3ba464(0x22a),(_0x1d6ab1,_0x10e538)=>{const _0x49abbb=a0_0x3ba464,_0x1c7b8f=_0x1d6ab1[_0x49abbb(0x1f2)];tracker_1[_0x49abbb(0x24b)][_0x49abbb(0x232)]('features_enabled',_0x1c7b8f),invalidateConfigCache(),_0x10e538['json']({'ok':!![]});}),app['post']('/api/agent/compact',async(_0x2ce1f4,_0x5bebbe)=>{const _0x471e63=a0_0x3ba464;try{const {getLatestSessionFile:_0x529d09,compactSessionCopy:_0x15a973}=await Promise[_0x471e63(0x217)]()[_0x471e63(0x201)](()=>__importStar(require('./file-watcher'))),{agentKey:_0x1fefe7}=_0x2ce1f4[_0x471e63(0x1f2)]||{},_0x26371e=_0x1fefe7||_0x471e63(0x239),_0x222bf2=_0x529d09(_0x26371e);if(_0x222bf2&&_0x222bf2[_0x471e63(0x243)]&&fs['existsSync'](_0x222bf2[_0x471e63(0x243)])){const _0x5b204a=_0x15a973(_0x222bf2[_0x471e63(0x243)],_0x26371e);_0x5b204a['ok']&&(_0x5b204a[_0x471e63(0x200)]||0x0)>0x0?_0x5bebbe[_0x471e63(0x224)]({'ok':!![],'fileName':_0x222bf2[_0x471e63(0x1fa)],'tokensSaved':_0x5b204a[_0x471e63(0x200)],'rawTokens':_0x5b204a[_0x471e63(0x211)],'compressedTokens':_0x5b204a[_0x471e63(0x245)],'reductionPct':_0x5b204a[_0x471e63(0x1ee)],'compactPath':_0x5b204a['compactPath']}):_0x5bebbe['json']({'ok':![],'message':_0x5b204a['reason']||_0x471e63(0x240)});}else _0x5bebbe['json']({'ok':![],'message':_0x471e63(0x222)});}catch(_0x47c6ef){_0x5bebbe[_0x471e63(0x234)](0x1f4)[_0x471e63(0x224)]({'ok':![],'error':_0x47c6ef['message']});}}),app[a0_0x3ba464(0x1eb)]('/api/config',async(_0x4a0e5c,_0x173525)=>{const _0x1f7768=a0_0x3ba464;if(configPayloadCache&&Date[_0x1f7768(0x23c)]()-configPayloadCache['at']<CONFIG_CACHE_TTL_MS)return _0x173525[_0x1f7768(0x224)](configPayloadCache['payload']);const {loadConfig:_0x1d5c0f,getAgentStoragePaths:_0xe6b280,getLatestSessionFile:_0x32005c,loadSessionsState:_0x424fcb}=await Promise['resolve']()[_0x1f7768(0x201)](()=>__importStar(require('./file-watcher'))),_0x54fe58=_0x1d5c0f(),_0x1143bb=[_0x1f7768(0x239),_0x1f7768(0x1fb),_0x1f7768(0x244),'cursor','aider',_0x1f7768(0x1f5),_0x1f7768(0x216),_0x1f7768(0x235),'cortex'],_0x5af24f={},_0x1c722d={},_0x2ab46={},_0x100c15=_0x424fcb(),_0x1997db=tracker_1[_0x1f7768(0x24b)][_0x1f7768(0x205)]()||[];for(const _0x525a0c of _0x1143bb){_0x5af24f[_0x525a0c]=_0xe6b280(_0x525a0c);const _0x331eac=_0x32005c(_0x525a0c);if(_0x331eac&&_0x331eac[_0x1f7768(0x243)]&&_0x100c15[_0x331eac[_0x1f7768(0x243)]])_0x331eac[_0x1f7768(0x246)]=_0x100c15[_0x331eac['fullPath']]['activeSavedTokens']||0x0;else{if(_0x331eac)_0x331eac[_0x1f7768(0x246)]=0x0;}_0x2ab46[_0x525a0c]=_0x331eac;const _0x51b393=_0x1997db[_0x1f7768(0x1e9)](_0x3a744f=>_0x3a744f['command']&&_0x3a744f[_0x1f7768(0x1f1)][_0x1f7768(0x207)](_0x1f7768(0x21a)+_0x525a0c));_0x51b393['length']>0x0?_0x1c722d[_0x525a0c]=_0x51b393[_0x51b393[_0x1f7768(0x20e)]-0x1][_0x1f7768(0x209)]:_0x1c722d[_0x525a0c]=_0x331eac?_0x331eac['lastModified']:null;}const _0x4961db={..._0x54fe58,'resolvedPaths':_0x5af24f,'lastActiveTimestamps':_0x1c722d,'latestSessions':_0x2ab46};configPayloadCache={'at':Date[_0x1f7768(0x23c)](),'payload':_0x4961db},_0x173525[_0x1f7768(0x224)](_0x4961db);}),app[a0_0x3ba464(0x1fc)]('/api/config/open-dir',async(_0x44aa5,_0x561bf7)=>{const _0x1e93e0=a0_0x3ba464,{getAgentStoragePaths:_0x10c5be}=await Promise[_0x1e93e0(0x217)]()[_0x1e93e0(0x201)](()=>__importStar(require(_0x1e93e0(0x1f0)))),{agentKey:_0x5841a2}=_0x44aa5[_0x1e93e0(0x1f2)]||{};if(!_0x5841a2)return _0x561bf7[_0x1e93e0(0x234)](0x190)['json']({'error':_0x1e93e0(0x225)});const _0x239bf7=_0x10c5be(_0x5841a2),_0x382432=_0x239bf7['find'](_0x3ea719=>fs['existsSync'](_0x3ea719))||_0x239bf7[0x0];if(_0x382432){if(!fs['existsSync'](_0x382432))try{fs[_0x1e93e0(0x248)](_0x382432,{'recursive':!![]});}catch{}const {exec:_0x38a024}=await Promise[_0x1e93e0(0x217)]()[_0x1e93e0(0x201)](()=>__importStar(require(_0x1e93e0(0x24f)))),_0x4b0cb7=process[_0x1e93e0(0x22b)]===_0x1e93e0(0x202)?'explorer\x20\x22'+_0x382432+'\x22':process[_0x1e93e0(0x22b)]===_0x1e93e0(0x20f)?_0x1e93e0(0x24e)+_0x382432+'\x22':'xdg-open\x20\x22'+_0x382432+'\x22';return _0x38a024(_0x4b0cb7),_0x561bf7[_0x1e93e0(0x224)]({'success':!![],'openedPath':_0x382432});}_0x561bf7['status'](0x194)['json']({'error':_0x1e93e0(0x20b)});}),app['post'](a0_0x3ba464(0x23b),async(_0xfcb725,_0x1e0cd2)=>{const _0x1f3ae7=a0_0x3ba464,{saveConfig:_0x53b7f3}=await Promise[_0x1f3ae7(0x217)]()['then'](()=>__importStar(require(_0x1f3ae7(0x1f0)))),{key:_0x20e4fd,value:_0x32cf6f}=_0xfcb725[_0x1f3ae7(0x1f2)]||{};if(_0x20e4fd){const _0x3a7e70=_0x53b7f3({'conversation_toggles':{[_0x20e4fd]:_0x32cf6f}});return invalidateConfigCache(),_0x1e0cd2[_0x1f3ae7(0x224)](_0x3a7e70);}_0x1e0cd2[_0x1f3ae7(0x234)](0x190)['json']({'error':_0x1f3ae7(0x231)});}),app[a0_0x3ba464(0x1fc)](a0_0x3ba464(0x22d),async(_0x34951d,_0x1ce65c)=>{const _0x2c66f2=a0_0x3ba464,{saveConfig:_0x3b59ae}=await Promise[_0x2c66f2(0x217)]()['then'](()=>__importStar(require(_0x2c66f2(0x1f0)))),{agentKey:_0x5251c8,path:_0xfb0287}=_0x34951d[_0x2c66f2(0x1f2)]||{};if(_0x5251c8){const _0x5563f1=_0x3b59ae({'custom_storage_paths':{[_0x5251c8]:_0xfb0287||null}});return invalidateConfigCache(),_0x1ce65c[_0x2c66f2(0x224)](_0x5563f1);}_0x1ce65c[_0x2c66f2(0x234)](0x190)['json']({'error':_0x2c66f2(0x225)});});function startDashboard(_0x9b9a6d=0xfa0){const _0x4a853a=a0_0x3ba464;let _0x572af2=_0x9b9a6d;const _0x355ab4=process[_0x4a853a(0x226)][_0x4a853a(0x207)]('--headless')||process[_0x4a853a(0x215)][_0x4a853a(0x23f)]==='1',_0x6b465=app[_0x4a853a(0x1f8)](_0x572af2,()=>{const _0x12add7=_0x4a853a,_0x10a8cf=_0x12add7(0x1e3)+_0x572af2;!_0x355ab4&&(console[_0x12add7(0x1ec)]('\x0a[TrimPrompt]\x20Dashboard\x20server\x20started\x20at:\x20'+_0x10a8cf),console[_0x12add7(0x1ec)]('Press\x20Ctrl+C\x20in\x20this\x20terminal\x20to\x20shut\x20down.'));try{const {spawn:_0x1bc257}=require(_0x12add7(0x24f)),_0x479444=_0x1bc257(process['execPath'],[path['join'](__dirname,_0x12add7(0x22f)),'watcher','start'],{'stdio':_0x12add7(0x236),'windowsHide':!![]}),_0x274392=()=>{const _0x1c9d6c=_0x12add7;try{_0x479444[_0x1c9d6c(0x223)]();}catch{}};process['on'](_0x12add7(0x237),_0x274392),process['on'](_0x12add7(0x212),()=>{const _0x27c88e=_0x12add7;_0x274392(),process[_0x27c88e(0x237)](0x0);}),process['on'](_0x12add7(0x1ea),()=>{const _0x5a6e97=_0x12add7;_0x274392(),process[_0x5a6e97(0x237)](0x0);});}catch{}!_0x355ab4&&process[_0x12add7(0x215)]['TRIMPROMPT_NO_OPEN']!=='1'&&(0x0,open_1[_0x12add7(0x247)])(_0x10a8cf)[_0x12add7(0x250)](()=>{});});_0x6b465['on'](_0x4a853a(0x208),_0x324730=>{const _0x213dcc=_0x4a853a;_0x324730[_0x213dcc(0x213)]===_0x213dcc(0x22e)?startDashboard(_0x572af2+0x1):console[_0x213dcc(0x208)](_0x213dcc(0x206)+_0x324730[_0x213dcc(0x210)]);});}
|
package/executor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var a0_0x46b50b=a0_0x445c;(function(_0x992407,_0x549090){var _0x38e615=a0_0x445c,_0x4be770=_0x992407();while(!![]){try{var _0x5ebb57=-parseInt(_0x38e615(0x10b))/0x1*(parseInt(_0x38e615(0x118))/0x2)+-parseInt(_0x38e615(0x103))/0x3+-parseInt(_0x38e615(0x126))/0x4+parseInt(_0x38e615(0xff))/0x5*(-parseInt(_0x38e615(0x113))/0x6)+parseInt(_0x38e615(0x122))/0x7+-parseInt(_0x38e615(0x129))/0x8*(-parseInt(_0x38e615(0x128))/0x9)+parseInt(_0x38e615(0x11c))/0xa;if(_0x5ebb57===_0x549090)break;else _0x4be770['push'](_0x4be770['shift']());}catch(_0x150402){_0x4be770['push'](_0x4be770['shift']());}}}(a0_0x2ae8,0x63509));function a0_0x445c(_0x1f3ae0,_0x31063a){var _0x2ae80e=a0_0x2ae8();return a0_0x445c=function(_0x445c56,_0x129fe1){_0x445c56=_0x445c56-0xfe;var _0x21b15b=_0x2ae80e[_0x445c56];return _0x21b15b;},a0_0x445c(_0x1f3ae0,_0x31063a);}var __createBinding=this&&this[a0_0x46b50b(0x11b)]||(Object[a0_0x46b50b(0x12a)]?function(_0x550bb1,_0x2104cb,_0x208ef6,_0x28fd7a){var _0x1af164=a0_0x46b50b;if(_0x28fd7a===undefined)_0x28fd7a=_0x208ef6;var _0x4617df=Object['getOwnPropertyDescriptor'](_0x2104cb,_0x208ef6);(!_0x4617df||('get'in _0x4617df?!_0x2104cb[_0x1af164(0x115)]:_0x4617df[_0x1af164(0x10d)]||_0x4617df['configurable']))&&(_0x4617df={'enumerable':!![],'get':function(){return _0x2104cb[_0x208ef6];}}),Object[_0x1af164(0x123)](_0x550bb1,_0x28fd7a,_0x4617df);}:function(_0x388d61,_0x4e451a,_0x38a3b8,_0x4bc1ee){if(_0x4bc1ee===undefined)_0x4bc1ee=_0x38a3b8;_0x388d61[_0x4bc1ee]=_0x4e451a[_0x38a3b8];}),__setModuleDefault=this&&this[a0_0x46b50b(0x119)]||(Object[a0_0x46b50b(0x12a)]?function(_0x542404,_0x2ac699){var _0x219ad7=a0_0x46b50b;Object[_0x219ad7(0x123)](_0x542404,_0x219ad7(0x121),{'enumerable':!![],'value':_0x2ac699});}:function(_0x239d0e,_0x3cdf00){var _0x195237=a0_0x46b50b;_0x239d0e[_0x195237(0x121)]=_0x3cdf00;}),__importStar=this&&this[a0_0x46b50b(0x10f)]||(function(){var _0x5003e5=function(_0x5273c1){return _0x5003e5=Object['getOwnPropertyNames']||function(_0x476f7d){var _0x2146e0=a0_0x445c,_0x1a7ec6=[];for(var _0x4b5ae0 in _0x476f7d)if(Object[_0x2146e0(0x120)][_0x2146e0(0x108)][_0x2146e0(0x111)](_0x476f7d,_0x4b5ae0))_0x1a7ec6[_0x1a7ec6[_0x2146e0(0x10c)]]=_0x4b5ae0;return _0x1a7ec6;},_0x5003e5(_0x5273c1);};return function(_0x3d1295){var _0x5b4993=a0_0x445c;if(_0x3d1295&&_0x3d1295[_0x5b4993(0x115)])return _0x3d1295;var _0x45b0c4={};if(_0x3d1295!=null){for(var _0x2b72fa=_0x5003e5(_0x3d1295),_0x5cce43=0x0;_0x5cce43<_0x2b72fa[_0x5b4993(0x10c)];_0x5cce43++)if(_0x2b72fa[_0x5cce43]!==_0x5b4993(0x121))__createBinding(_0x45b0c4,_0x3d1295,_0x2b72fa[_0x5cce43]);}return __setModuleDefault(_0x45b0c4,_0x3d1295),_0x45b0c4;};}());Object['defineProperty'](exports,a0_0x46b50b(0x115),{'value':!![]}),exports[a0_0x46b50b(0x104)]=executeCommand;const child_process_1=require(a0_0x46b50b(0x11d)),path=__importStar(require(a0_0x46b50b(0x11e))),os=__importStar(require('os'));function executeCommand(_0x273454,_0x3e84ab){return new Promise(_0x31b08c=>{var _0x5b5bdc=a0_0x445c;const _0x35846f=path[_0x5b5bdc(0x101)](os[_0x5b5bdc(0x106)](),_0x5b5bdc(0x109),_0x5b5bdc(0x110)),_0x2b19c4=(process['env'][_0x5b5bdc(0x107)]||'')[_0x5b5bdc(0x105)](path[_0x5b5bdc(0x11f)])['filter'](_0x116b46=>_0x116b46['trim']()[_0x5b5bdc(0x11a)]()!==_0x35846f[_0x5b5bdc(0x11a)]())[_0x5b5bdc(0x101)](path[_0x5b5bdc(0x11f)]),_0x436726={...process['env'],'PATH':_0x2b19c4,'TRIMPROMPT_DISABLED':'1'},_0xc03609=_0x3e84ab[_0x5b5bdc(0x10a)](_0x31e7c3=>_0x31e7c3[_0x5b5bdc(0x10e)]('\x20')&&!_0x31e7c3[_0x5b5bdc(0x124)]('\x22')?'\x22'+_0x31e7c3+'\x22':_0x31e7c3),_0x5cde6b=[_0x273454,..._0xc03609]['join']('\x20'),_0x250686=(0x0,child_process_1['spawn'])(_0x5cde6b,[],{'stdio':[_0x5b5bdc(0xfe),'pipe',_0x5b5bdc(0x127)],'shell':!![],'env':_0x436726});let _0x3657eb='',_0x221af5='';_0x250686[_0x5b5bdc(0x102)]?.['on'](_0x5b5bdc(0x125),_0x427d21=>{var _0x24b14f=_0x5b5bdc;_0x3657eb+=_0x427d21[_0x24b14f(0x117)]();}),_0x250686[_0x5b5bdc(0x12b)]?.['on'](_0x5b5bdc(0x125),_0x4b22bc=>{var _0x419bdd=_0x5b5bdc;_0x221af5+=_0x4b22bc[_0x419bdd(0x117)]();}),_0x250686['on']('error',_0x38883e=>{var _0x22b2a6=_0x5b5bdc;_0x31b08c({'exitCode':0x1,'stdout':'','stderr':_0x22b2a6(0x100)+_0x273454+_0x22b2a6(0x112)+_0x38883e[_0x22b2a6(0x116)]});}),_0x250686['on'](_0x5b5bdc(0x114),_0x2831f0=>{_0x31b08c({'exitCode':_0x2831f0??0x0,'stdout':_0x3657eb,'stderr':_0x221af5});});});}function a0_0x2ae8(){var _0x2d5ab8=['map','2413xqtvlV','length','writable','includes','__importStar','shims','call','\x22:\x20','44838CVWjTH','close','__esModule','message','toString','658qBTDFw','__setModuleDefault','toLowerCase','__createBinding','18139730QKCLxT','child_process','path','delimiter','prototype','default','2841930PTHtfg','defineProperty','startsWith','data','2031896BHSfpw','pipe','72171FWRfXz','392jxCnXp','create','stderr','inherit','390XSufXz','Failed\x20to\x20spawn\x20command\x20\x22','join','stdout','964068NJJXQp','executeCommand','split','homedir','PATH','hasOwnProperty','.trimprompt'];a0_0x2ae8=function(){return _0x2d5ab8;};return a0_0x2ae8();}
|